@maro-tech/form 0.0.13 → 0.0.14

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": "@maro-tech/form",
3
- "version": "0.0.13",
3
+ "version": "0.0.14",
4
4
  "private": false,
5
5
  "peerDependencies": {
6
6
  "@angular/cdk": "^21.2.0",
@@ -4,6 +4,7 @@ import { Observable } from 'rxjs';
4
4
  import * as lucide_angular from 'lucide-angular';
5
5
  import { ControlValueAccessor } from '@angular/forms';
6
6
  import { ConnectedPosition } from '@angular/cdk/overlay';
7
+ import * as _maro_tech_form from '@maro-tech/form';
7
8
  import { CdkDragDrop } from '@angular/cdk/drag-drop';
8
9
 
9
10
  type UiFormValue = Record<string, unknown>;
@@ -26,9 +27,14 @@ declare class UiFormContext {
26
27
  static ɵprov: _angular_core.ɵɵInjectableDeclaration<UiFormContext>;
27
28
  }
28
29
 
30
+ interface MaroUploadedFile {
31
+ imageId: string;
32
+ type?: string;
33
+ }
29
34
  declare class MaroFormsApiService {
30
35
  private readonly http;
31
36
  getSuggestByName(name: string, query?: string): Observable<Array<Record<string, unknown>>>;
37
+ uploadFile(file: File): Observable<MaroUploadedFile>;
32
38
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<MaroFormsApiService, never>;
33
39
  static ɵprov: _angular_core.ɵɵInjectableDeclaration<MaroFormsApiService>;
34
40
  }
@@ -266,6 +272,7 @@ declare class UiDynamicFormComponent implements OnInit, OnChanges, OnDestroy {
266
272
  ngOnChanges(changes: SimpleChanges): void;
267
273
  ngOnDestroy(): void;
268
274
  updateField(fieldId: string, nextValue: UiDynamicFormValue[string]): void;
275
+ private normalizeFieldValue;
269
276
  onBarcodeValueChange(field: UiDynamicFormField, value: string): void;
270
277
  onBarcodeScanned(field: UiDynamicFormField, value: string): void;
271
278
  onSelectValueChange(field: UiDynamicFormField, value: string | string[] | null): void;
@@ -348,6 +355,8 @@ declare class UiActionFormModalComponent implements OnChanges {
348
355
  }>;
349
356
  private readonly http;
350
357
  private readonly router;
358
+ private readonly formsApi;
359
+ readonly defaultUploadPhoto: (file: File) => Observable<_maro_tech_form.MaroUploadedFile>;
351
360
  ngOnChanges(changes: SimpleChanges): void;
352
361
  close(): void;
353
362
  onValueChange(value: UiDynamicFormValue): void;
@@ -363,6 +372,7 @@ declare class UiActionFormModalComponent implements OnChanges {
363
372
  confirm(): void;
364
373
  private loadForm;
365
374
  private resolveEndpoint;
375
+ private normalizePayload;
366
376
  private normalizeActionType;
367
377
  private isSubmitAction;
368
378
  private resolveMethod;
@@ -1025,4 +1035,4 @@ declare class UiTextareaInputComponent implements ControlValueAccessor {
1025
1035
  }
1026
1036
 
1027
1037
  export { ACTION_API, ACTION_FORM, ACTION_PRINT, ACTION_SUBMIT, MaroFormsApiService, UI_DYNAMIC_FORM_OPTIONS_SOURCE_RESOLVERS, UI_FORM_INPUT_REGISTRY, UiActionFormModalComponent, UiBarcodeScannerInputComponent, UiCheckboxInputComponent, UiColorInputComponent, UiDateInputComponent, UiDatetimeInputComponent, UiDynamicFormComponent, UiEmailInputComponent, UiFileInputComponent, UiFormContext, UiFormInputHostComponent, UiFormLookupService, UiInputComponent, UiNumberInputComponent, UiPasswordInputComponent, UiPhotoGalleryFieldComponent, UiPhotoInputComponent, UiRangeSliderComponent, UiSelectComponent, UiSlugInputComponent, UiTextInputComponent, UiTextareaInputComponent, flattenDynamicFormFields, isDynamicFormContainerField, isDynamicFormTemplateField };
1028
- export type { ActionType, ApiPluginMethod, MaroFormViewAction, MaroFormViewResponse, UiDynamicFieldType, UiDynamicFormBaseField, UiDynamicFormContainerField, UiDynamicFormField, UiDynamicFormFieldAction, UiDynamicFormOptionsSourceContext, UiDynamicFormOptionsSourceResolver, UiDynamicFormTemplateField, UiDynamicFormValue, UiFormErrors, UiFormInputType, UiFormSubmitState, UiFormValue, UiPhotoGalleryEntry, UiPhotoPreview, UiSelectOption, UiSelectValue };
1038
+ export type { ActionType, ApiPluginMethod, MaroFormViewAction, MaroFormViewResponse, MaroUploadedFile, UiDynamicFieldType, UiDynamicFormBaseField, UiDynamicFormContainerField, UiDynamicFormField, UiDynamicFormFieldAction, UiDynamicFormOptionsSourceContext, UiDynamicFormOptionsSourceResolver, UiDynamicFormTemplateField, UiDynamicFormValue, UiFormErrors, UiFormInputType, UiFormSubmitState, UiFormValue, UiPhotoGalleryEntry, UiPhotoPreview, UiSelectOption, UiSelectValue };