@smartbit4all/ng-client 4.2.125 → 4.2.127

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,26 +1,30 @@
1
- import { EventEmitter } from '@angular/core';
1
+ import { ChangeDetectorRef, EventEmitter } from '@angular/core';
2
2
  import { SmartFileUploader } from '../../../smartform.form-model';
3
3
  import { UiAction, UiActionDescriptor, UiActionUploadDescriptor } from '../../../../view-context/api/model/models';
4
4
  import { ComponentLibrary } from '../../../../view-context/utility/componentLibrary';
5
- import { UiActionModel } from '../../../../view-context/smart-ui-action/ui-action.model';
6
5
  import { UiActionToolbarComponent } from '../../../../view-context/smart-ui-action/ui-action-toolbar.component';
6
+ import { ControlValueAccessor } from '@angular/forms';
7
7
  import * as i0 from "@angular/core";
8
- export declare class SmartFileEditorComponent {
8
+ export declare class SmartFileEditorComponent implements ControlValueAccessor {
9
+ private cdr;
9
10
  compLib?: ComponentLibrary | undefined;
10
11
  toolbar: UiActionToolbarComponent;
11
- widgetInstance: SmartFileUploader;
12
+ private _widgetInstance;
13
+ get widgetInstance(): SmartFileUploader;
14
+ set widgetInstance(value: SmartFileUploader);
12
15
  uploadFilesEvent: EventEmitter<{
13
16
  files: any[];
14
17
  uiAction: UiAction;
15
18
  uploadDescriptor?: UiActionUploadDescriptor | undefined;
16
19
  }>;
17
- uiActionModels: UiActionModel[];
18
20
  fileToChange?: any;
19
- constructor(compLib?: ComponentLibrary | undefined);
20
- ngOnInit(): void;
21
+ constructor(cdr: ChangeDetectorRef, compLib?: ComponentLibrary | undefined);
22
+ private clone;
21
23
  upload(event: any): void;
22
24
  change(file: any): void;
23
25
  cancelChange(): void;
26
+ isTypeSupported(value: any): boolean;
27
+ formatSize(bytes: number): string;
24
28
  getLabelNgClass(): {
25
29
  [className: string]: boolean;
26
30
  };
@@ -33,13 +37,18 @@ export declare class SmartFileEditorComponent {
33
37
  getStyle(): {
34
38
  [key: string]: string | number;
35
39
  };
36
- isTypeSupported(value: any): boolean;
37
- formatSize(bytes: number): string;
40
+ onChange: (value: any) => void;
41
+ onTouched: () => void;
42
+ isDisabled: boolean;
43
+ writeValue(value: any): void;
44
+ registerOnChange(fn: any): void;
45
+ registerOnTouched(fn: any): void;
46
+ setDisabledState?(isDisabled: boolean): void;
38
47
  get fileIcon(): string;
39
48
  get changeButton(): UiActionDescriptor;
40
49
  get removeButton(): UiActionDescriptor;
41
50
  get errorIcon(): string;
42
51
  get toolbarComponent(): UiActionToolbarComponent;
43
- static ɵfac: i0.ɵɵFactoryDeclaration<SmartFileEditorComponent, [{ optional: true; }]>;
52
+ static ɵfac: i0.ɵɵFactoryDeclaration<SmartFileEditorComponent, [null, { optional: true; }]>;
44
53
  static ɵcmp: i0.ɵɵComponentDeclaration<SmartFileEditorComponent, "smart-file-editor", never, { "widgetInstance": { "alias": "widgetInstance"; "required": false; }; }, { "uploadFilesEvent": "uploadFilesEvent"; }, never, never, false, never>;
45
54
  }
@@ -13,18 +13,12 @@ import { SmartButton, SmartFormWidget, SmartItem, SmartItems } from '../../smart
13
13
  import { SmartFormTextFieldButtonIconPosition, SmartValidator, SophisticatedValueChange, Value } from '../../smartform.model';
14
14
  import { ComponentLibrary } from '../../../view-context/utility/componentLibrary';
15
15
  import { EditorTextChangeEvent } from 'primeng/editor';
16
- import { UiAction, UiActionDescriptor, UiActionUploadDescriptor } from '../../../view-context/api';
16
+ import { UiActionDescriptor } from '../../../view-context/api';
17
17
  import { SmartFileEditorComponent } from '../components/smart-file-editor/smart-file-editor.component';
18
18
  import * as i0 from "@angular/core";
19
19
  export declare class SmartWidgetSettings {
20
20
  static useUtc: boolean;
21
21
  }
22
- export interface UploadCallbackProps {
23
- files: File[];
24
- uiAction: UiAction;
25
- uploadDescriptor: UiActionUploadDescriptor;
26
- }
27
- export type UploadCallback = (props: UploadCallbackProps) => Promise<void>;
28
22
  export declare class SmartformwidgetComponent implements OnInit, OnDestroy, AfterViewInit {
29
23
  private service;
30
24
  private cfService;
@@ -33,7 +27,7 @@ export declare class SmartformwidgetComponent implements OnInit, OnDestroy, Afte
33
27
  changeDetector: ChangeDetectorRef;
34
28
  private _destroy$;
35
29
  hidePassword: boolean;
36
- uploadCallback?: UploadCallback;
30
+ smartComponent: any;
37
31
  form: UntypedFormGroup;
38
32
  widgetInstance: SmartFormWidget<any>;
39
33
  onBlur?: Subject<any>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smartbit4all/ng-client",
3
- "version": "4.2.125",
3
+ "version": "4.2.127",
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