@decaf-ts/for-angular 0.0.48 → 0.0.49

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/index.d.ts CHANGED
@@ -1549,6 +1549,14 @@ declare abstract class NgxComponentDirective extends DecafComponent implements O
1549
1549
  * @default false
1550
1550
  */
1551
1551
  refreshing: boolean;
1552
+ /**
1553
+ * @description Represents the color scheme used for application.
1554
+ * @summary This property determines the visual appearance of the application
1555
+ * based on predefined color schemes (e.g., light or dark mode).
1556
+ * @type {WindowColorScheme}
1557
+ * @default WindowColorSchemes.light
1558
+ */
1559
+ protected colorSchema: WindowColorScheme;
1552
1560
  /**
1553
1561
  * @description Constructor for NgxComponentDirective.
1554
1562
  * @summary Initializes the directive by setting up the component name, locale root,
@@ -3089,7 +3097,7 @@ declare class NgxParentComponentDirective extends NgxComponentDirective implemen
3089
3097
  protected timerSubscription: Subscription;
3090
3098
  ngOnInit(model?: Model | string): Promise<void>;
3091
3099
  ngOnDestroy(): Promise<void> | void;
3092
- protected getActivePage(page: number): UIModelMetadata | UIModelMetadata[] | FieldDefinition | undefined;
3100
+ protected getActivePage(page: number, firstClick?: boolean): UIModelMetadata | UIModelMetadata[] | FieldDefinition | undefined;
3093
3101
  static ɵfac: i0.ɵɵFactoryDeclaration<NgxParentComponentDirective, never>;
3094
3102
  static ɵdir: i0.ɵɵDirectiveDeclaration<NgxParentComponentDirective, never, never, { "page": { "alias": "page"; "required": false; }; "pages": { "alias": "pages"; "required": false; }; "parentForm": { "alias": "parentForm"; "required": false; }; "children": { "alias": "children"; "required": false; }; "cols": { "alias": "cols"; "required": false; }; "rows": { "alias": "rows"; "required": false; }; "cardBody": { "alias": "cardBody"; "required": false; }; "cardType": { "alias": "cardType"; "required": false; }; "breakpoint": { "alias": "breakpoint"; "required": false; }; "match": { "alias": "match"; "required": false; }; }, {}, never, never, true, never>;
3095
3103
  }
@@ -7130,6 +7138,13 @@ declare class ModalComponent extends NgxParentComponentDirective implements OnIn
7130
7138
  * @default false
7131
7139
  */
7132
7140
  lightBox: boolean;
7141
+ /**
7142
+ * @description Controls the visibility of the modal header.
7143
+ * @summary When set to true, the modal header is displayed; when false, it is hidden.
7144
+ * @type {boolean}
7145
+ * @default true
7146
+ */
7147
+ showHeader: boolean;
7133
7148
  /**
7134
7149
  * @description Event emitted when the modal is about to be dismissed.
7135
7150
  * @summary Emits an OverlayEventDetail object containing details about the dismiss event.
@@ -7205,7 +7220,7 @@ declare class ModalComponent extends NgxParentComponentDirective implements OnIn
7205
7220
  */
7206
7221
  confirm(event: IBaseCustomEvent): Promise<void>;
7207
7222
  static ɵfac: i0.ɵɵFactoryDeclaration<ModalComponent, never>;
7208
- static ɵcmp: i0.ɵɵComponentDeclaration<ModalComponent, "ngx-decaf-modal", never, { "title": { "alias": "title"; "required": false; }; "isOpen": { "alias": "isOpen"; "required": false; }; "tag": { "alias": "tag"; "required": false; }; "options": { "alias": "options"; "required": false; }; "globals": { "alias": "globals"; "required": false; }; "inlineContent": { "alias": "inlineContent"; "required": false; }; "inlineContentPosition": { "alias": "inlineContentPosition"; "required": false; }; "fullscreen": { "alias": "fullscreen"; "required": false; }; "lightBox": { "alias": "lightBox"; "required": false; }; }, { "willDismissEvent": "willDismissEvent"; }, never, never, true, never>;
7223
+ static ɵcmp: i0.ɵɵComponentDeclaration<ModalComponent, "ngx-decaf-modal", never, { "title": { "alias": "title"; "required": false; }; "isOpen": { "alias": "isOpen"; "required": false; }; "tag": { "alias": "tag"; "required": false; }; "options": { "alias": "options"; "required": false; }; "globals": { "alias": "globals"; "required": false; }; "inlineContent": { "alias": "inlineContent"; "required": false; }; "inlineContentPosition": { "alias": "inlineContentPosition"; "required": false; }; "fullscreen": { "alias": "fullscreen"; "required": false; }; "lightBox": { "alias": "lightBox"; "required": false; }; "showHeader": { "alias": "showHeader"; "required": false; }; }, { "willDismissEvent": "willDismissEvent"; }, never, never, true, never>;
7209
7224
  }
7210
7225
  /**
7211
7226
  * @description Retrieves a modal component instance.
@@ -7227,6 +7242,16 @@ declare function getNgxModalComponent(props?: Partial<ModalComponent>, modalProp
7227
7242
  * @returns {Promise<void>} - A promise that resolves when the modal is presented.
7228
7243
  */
7229
7244
  declare function presentNgxLightBoxModal(inlineContent: string | SafeHtml, props?: Partial<ModalComponent>, injector?: EnvironmentInjector): Promise<void>;
7245
+ /**
7246
+ * @description Presents a lightbox modal with inline content.
7247
+ * @summary Displays a modal in lightbox mode with the specified content and properties.
7248
+ *
7249
+ * @param {string | SafeHtml} inlineContent - The content to display in the lightbox modal.
7250
+ * @param {Partial<ModalComponent>} [props={}] - Properties to initialize the modal component.
7251
+ * @param {EnvironmentInjector} [injector] - Optional environment injector for dependency injection.
7252
+ * @returns {Promise<void>} - A promise that resolves when the modal is presented.
7253
+ */
7254
+ declare function presentNgxInlineModal(inlineContent: string | SafeHtml, props?: Partial<ModalComponent>, injector?: EnvironmentInjector): Promise<void>;
7230
7255
  /**
7231
7256
  * @description Retrieves a modal for selecting options.
7232
7257
  * @summary Creates and initializes a modal component for displaying a list of selectable options.
@@ -7395,6 +7420,7 @@ declare class FileUploadComponent extends NgxFormFieldDirective implements OnIni
7395
7420
  * @default false
7396
7421
  */
7397
7422
  enableDirectoryMode: boolean;
7423
+ previewHandler?: unknown;
7398
7424
  /**
7399
7425
  * @description Maximum file size allowed for upload.
7400
7426
  * @summary Specifies the maximum size (in MB) for files that can be uploaded.
@@ -7417,7 +7443,7 @@ declare class FileUploadComponent extends NgxFormFieldDirective implements OnIni
7417
7443
  *
7418
7444
  * @type {string | undefined}
7419
7445
  */
7420
- preview: string | undefined;
7446
+ previewFile: string | undefined;
7421
7447
  /**
7422
7448
  * @description List of files selected for upload.
7423
7449
  * @summary Contains the files selected by the user for upload. This array is updated
@@ -7425,7 +7451,7 @@ declare class FileUploadComponent extends NgxFormFieldDirective implements OnIni
7425
7451
  *
7426
7452
  * @type {File[]}
7427
7453
  */
7428
- files: File[];
7454
+ files: File[] | KeyValue[];
7429
7455
  /**
7430
7456
  * @description List of errors encountered during file validation.
7431
7457
  * @summary Stores validation errors for files that do not meet the specified criteria,
@@ -7461,6 +7487,7 @@ declare class FileUploadComponent extends NgxFormFieldDirective implements OnIni
7461
7487
  * @returns {void}
7462
7488
  */
7463
7489
  ngOnInit(): void;
7490
+ initialize(): Promise<void>;
7464
7491
  /**
7465
7492
  * @description Lifecycle hook that is called when a directive, pipe, or service is destroyed.
7466
7493
  * @summary Cleans up the component by calling the parent ngOnDestroy method and clearing the file upload state.
@@ -7547,7 +7574,7 @@ declare class FileUploadComponent extends NgxFormFieldDirective implements OnIni
7547
7574
  * @param {File | string} [file] - The file to be previewed. If not provided, the current preview file is used.
7548
7575
  * @returns {Promise<void>}
7549
7576
  */
7550
- showFilePreview(file: File | string, fileExtension?: string): Promise<void>;
7577
+ preview(file: File | string, fileExtension?: string): Promise<void | UIFunctionLike>;
7551
7578
  /**
7552
7579
  * @description Checks if a file is an image based on its MIME type.
7553
7580
  * @summary Determines if the file can be accepted as an image by checking
@@ -7557,6 +7584,7 @@ declare class FileUploadComponent extends NgxFormFieldDirective implements OnIni
7557
7584
  * @returns {boolean} - True if the file is an image, false otherwise.
7558
7585
  */
7559
7586
  isImageFile(file: File): boolean;
7587
+ getFileMime(base64: string): string;
7560
7588
  /**
7561
7589
  * @description Removes a file from the selection.
7562
7590
  * @summary Updates the file list to exclude the file at the specified index.
@@ -7619,7 +7647,7 @@ declare class FileUploadComponent extends NgxFormFieldDirective implements OnIni
7619
7647
  */
7620
7648
  private readFile;
7621
7649
  static ɵfac: i0.ɵɵFactoryDeclaration<FileUploadComponent, never>;
7622
- static ɵcmp: i0.ɵɵComponentDeclaration<FileUploadComponent, "ngx-decaf-file-upload", never, { "formGroup": { "alias": "formGroup"; "required": false; }; "name": { "alias": "name"; "required": false; }; "formControl": { "alias": "formControl"; "required": false; }; "required": { "alias": "required"; "required": false; }; "multiple": { "alias": "multiple"; "required": false; }; "type": { "alias": "type"; "required": false; }; "label": { "alias": "label"; "required": false; }; "buttonLabel": { "alias": "buttonLabel"; "required": false; }; "size": { "alias": "size"; "required": false; }; "position": { "alias": "position"; "required": false; }; "accept": { "alias": "accept"; "required": false; }; "showIcon": { "alias": "showIcon"; "required": false; }; "enableDirectoryMode": { "alias": "enableDirectoryMode"; "required": false; }; "maxFileSize": { "alias": "maxFileSize"; "required": false; }; }, { "changeEvent": "changeEvent"; }, never, never, true, never>;
7650
+ static ɵcmp: i0.ɵɵComponentDeclaration<FileUploadComponent, "ngx-decaf-file-upload", never, { "formGroup": { "alias": "formGroup"; "required": false; }; "name": { "alias": "name"; "required": false; }; "formControl": { "alias": "formControl"; "required": false; }; "required": { "alias": "required"; "required": false; }; "multiple": { "alias": "multiple"; "required": false; }; "type": { "alias": "type"; "required": false; }; "label": { "alias": "label"; "required": false; }; "buttonLabel": { "alias": "buttonLabel"; "required": false; }; "size": { "alias": "size"; "required": false; }; "position": { "alias": "position"; "required": false; }; "accept": { "alias": "accept"; "required": false; }; "showIcon": { "alias": "showIcon"; "required": false; }; "enableDirectoryMode": { "alias": "enableDirectoryMode"; "required": false; }; "previewHandler": { "alias": "previewHandler"; "required": false; }; "maxFileSize": { "alias": "maxFileSize"; "required": false; }; }, { "changeEvent": "changeEvent"; }, never, never, true, never>;
7623
7651
  }
7624
7652
 
7625
7653
  declare class ForAngularComponentsModule {
@@ -8534,7 +8562,9 @@ declare class NgxFormService {
8534
8562
  }
8535
8563
 
8536
8564
  declare abstract class NgxEventHandler extends DecafEventHandler {
8565
+ constructor();
8537
8566
  refresh(args?: unknown[]): Promise<void>;
8567
+ preview(args?: unknown[]): Promise<void>;
8538
8568
  }
8539
8569
 
8540
8570
  /**
@@ -8799,7 +8829,6 @@ declare abstract class NgxModelPageDirective extends NgxPageDirective {
8799
8829
  * @return {Promise<IModelPageCustomEvent|void>} Promise that resolves on success or throws on error
8800
8830
  */
8801
8831
  submit(event: IBaseCustomEvent, repository?: DecafRepository<Model>, redirect?: boolean): Promise<IModelPageCustomEvent | void>;
8802
- create(data: Partial<Model>, repository: DecafRepository<Model>): Promise<IModelPageCustomEvent | void>;
8803
8832
  /**
8804
8833
  * @description Retrieves a model instance from the repository by unique identifier.
8805
8834
  * @summary Fetches a specific model instance using the repository's read method.
@@ -9493,5 +9522,5 @@ declare class ForAngularCommonModule {
9493
9522
  static ɵinj: i0.ɵɵInjectorDeclaration<ForAngularCommonModule>;
9494
9523
  }
9495
9524
 
9496
- export { ActionRoles, AngularEngineKeys, BaseComponentProps, CPTKN, CardComponent, ComponentEventNames, ComponentRendererComponent, ComponentsTagNames, CrudFieldComponent, CrudFormComponent, CssClasses, DB_ADAPTER_PROVIDER, DB_ADAPTER_PROVIDER_TOKEN, DecafFakerRepository, DefaultFormReactiveOptions, DefaultListEmptyOptions, DefaultModalOptions, Dynamic, DynamicModule, ElementPositions, ElementSizes, EmptyStateComponent, FieldsetComponent, FileUploadComponent, FilterComponent, ForAngularCommonModule, ForAngularComponentsModule, FormConstants, I18N_CONFIG_TOKEN, I18nLoader, I18nLoaderFactory, I18nParser, IconComponent, LOCALE_ROOT_TOKEN, LayoutComponent, LayoutGridGaps, ListComponent, ListComponentsTypes, ListItemComponent, ListItemPositions, LoggerLevels, ModalComponent, ModelRendererComponent, NgxComponentDirective, NgxEventHandler, NgxFormDirective, NgxFormFieldDirective, NgxFormService, NgxMediaService, NgxModelPageDirective, NgxPageDirective, NgxParentComponentDirective, NgxRenderingEngine, NgxSvgDirective, PaginationComponent, RouteDirections, SearchbarComponent, SteppedFormComponent, WindowColorSchemes, cleanSpaces, dataMapper, filterString, formatDate, generateRandomValue, getFakerData, getInjectablesRegistry, getLocaleContext, getLocaleContextByKey, getLocaleFromClassName, getLocaleLanguage, getLogger, getModelAndRepository, getNgxModalComponent, getNgxSelectOptionsModal, getOnWindow, getOnWindowDocument, getWindow, getWindowDocument, getWindowWidth, isDarkMode, isDevelopmentMode, isNotUndefined, isValidDate, itemMapper, parseToValidDate, presentNgxLightBoxModal, provideDbAdapter, provideDynamicComponents, provideI18n, provideI18nLoader, removeFocusTrap, setOnWindow, stringToBoolean, windowEventEmitter };
9525
+ export { ActionRoles, AngularEngineKeys, BaseComponentProps, CPTKN, CardComponent, ComponentEventNames, ComponentRendererComponent, ComponentsTagNames, CrudFieldComponent, CrudFormComponent, CssClasses, DB_ADAPTER_PROVIDER, DB_ADAPTER_PROVIDER_TOKEN, DecafFakerRepository, DefaultFormReactiveOptions, DefaultListEmptyOptions, DefaultModalOptions, Dynamic, DynamicModule, ElementPositions, ElementSizes, EmptyStateComponent, FieldsetComponent, FileUploadComponent, FilterComponent, ForAngularCommonModule, ForAngularComponentsModule, FormConstants, I18N_CONFIG_TOKEN, I18nLoader, I18nLoaderFactory, I18nParser, IconComponent, LOCALE_ROOT_TOKEN, LayoutComponent, LayoutGridGaps, ListComponent, ListComponentsTypes, ListItemComponent, ListItemPositions, LoggerLevels, ModalComponent, ModelRendererComponent, NgxComponentDirective, NgxEventHandler, NgxFormDirective, NgxFormFieldDirective, NgxFormService, NgxMediaService, NgxModelPageDirective, NgxPageDirective, NgxParentComponentDirective, NgxRenderingEngine, NgxSvgDirective, PaginationComponent, RouteDirections, SearchbarComponent, SteppedFormComponent, WindowColorSchemes, cleanSpaces, dataMapper, filterString, formatDate, generateRandomValue, getFakerData, getInjectablesRegistry, getLocaleContext, getLocaleContextByKey, getLocaleFromClassName, getLocaleLanguage, getLogger, getModelAndRepository, getNgxModalComponent, getNgxSelectOptionsModal, getOnWindow, getOnWindowDocument, getWindow, getWindowDocument, getWindowWidth, isDarkMode, isDevelopmentMode, isNotUndefined, isValidDate, itemMapper, parseToValidDate, presentNgxInlineModal, presentNgxLightBoxModal, provideDbAdapter, provideDynamicComponents, provideI18n, provideI18nLoader, removeFocusTrap, setOnWindow, stringToBoolean, windowEventEmitter };
9497
9526
  export type { ActionRole, AngularDynamicOutput, AngularFieldDefinition, CheckboxOption, ComponentMetadata, CrudFieldOption, DecafRepository, DecafRepositoryAdapter, ElementPosition, ElementSize, FieldUpdateMode, FlexPosition, FormParent, FormParentGroup, FormServiceControl, FormServiceControls, FunctionLike, HTML5InputType, HTMLFormTarget, I18nResourceConfig, I18nResourceConfigType, I18nToken, IBaseCustomEvent, IComponentConfig, IComponentHolder, IComponentProperties, ICrudFormEvent, ICrudFormOptions, IFieldSetItem, IFieldSetValidationEvent, IFileUploadError, IFilterQuery, IFilterQueryItem, IFormComponentProperties, IFormElement, IFormReactiveSubmitEvent, IListComponentRefreshEvent, IListEmptyOptions, IMenuItem, IModelPageCustomEvent, IPaginationCustomEvent, IRenderedModel, ISortObject, IWindowResizeEvent, InputOption, KeyValue, LayoutGridGap, ListItemCustomEvent, ListItemPosition, PossibleInputTypes, RadioOption, RawQuery, SelectOption, StringOrBoolean, WindowColorScheme };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@decaf-ts/for-angular",
3
- "version": "0.0.48",
3
+ "version": "0.0.49",
4
4
  "author": "Tiago Venceslau and Contributors",
5
5
  "license": "MPL-2.0 OR AGPL-3.0",
6
6
  "repository": {