@decaf-ts/for-angular 0.1.31 → 0.1.35

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
@@ -397,7 +397,7 @@ interface IMenuItem {
397
397
  * @description CRUD form options configuration
398
398
  * @summary Defines the configuration options for CRUD form buttons including submit and clear buttons.
399
399
  * Each button can be customized with text, icon, and icon position.
400
- * @interface ICrudFormOptions
400
+ * @interface ICrudFormButtons
401
401
  * @property {Object} buttons - Configuration for form action buttons
402
402
  * @property {Object} buttons.submit - Submit button configuration
403
403
  * @property {string} [buttons.submit.icon] - Optional icon for the submit button
@@ -409,18 +409,16 @@ interface IMenuItem {
409
409
  * @property {string} [buttons.clear.text] - Text label for the clear button
410
410
  * @memberOf module:engine
411
411
  */
412
- interface ICrudFormOptions {
413
- buttons: {
414
- submit: {
415
- icon?: string;
416
- iconSlot?: 'start' | 'end';
417
- text?: string;
418
- };
419
- clear?: {
420
- icon?: string;
421
- iconSlot?: 'start' | 'end';
422
- text?: string;
423
- };
412
+ interface ICrudFormButtons {
413
+ submit: {
414
+ icon?: string;
415
+ iconSlot?: 'start' | 'end';
416
+ text?: string;
417
+ };
418
+ clear?: {
419
+ icon?: string;
420
+ iconSlot?: 'start' | 'end';
421
+ text?: string;
424
422
  };
425
423
  }
426
424
  /**
@@ -762,16 +760,16 @@ declare const CssClasses: {
762
760
  * @summary Provides default configuration for form buttons in CRUD operations.
763
761
  * Includes default text labels for submit and clear buttons, which can be
764
762
  * overridden by individual form implementations.
765
- * @type {ICrudFormOptions}
763
+ * @type {ICrudFormButtons}
766
764
  * @property {Object} buttons - Configuration for form action buttons
767
765
  * @property {Object} buttons.submit - Submit button configuration
768
766
  * @property {string} buttons.submit.text - Default text for submit button
769
767
  * @property {Object} buttons.clear - Clear button configuration
770
768
  * @property {string} buttons.clear.text - Default text for clear button
771
- * @const DefaultFormReactiveOptions
769
+ * @const DefaultFormButtonsOptions
772
770
  * @memberOf module:lib/engine/constants
773
771
  */
774
- declare const DefaultFormReactiveOptions: ICrudFormOptions;
772
+ declare const DefaultFormButtonsOptions: ICrudFormButtons;
775
773
  /**
776
774
  * @description Mapping of select field interface types used in Ionic components.
777
775
  * @summary Provides a set of supported select interface types for Ionic select fields,
@@ -3390,7 +3388,7 @@ declare class CrudFieldComponent extends NgxFormFieldDirective implements OnInit
3390
3388
  * When true, the browser will check the spelling of the input text.
3391
3389
  *
3392
3390
  * @type {boolean}
3393
- * @default false
3391
+ * @default true
3394
3392
  * @memberOf CrudFieldComponent
3395
3393
  */
3396
3394
  startEmpty: boolean;
@@ -3766,9 +3764,9 @@ declare abstract class NgxFormDirective extends NgxParentComponentDirective impl
3766
3764
  * validation, and behavior. These options are merged with default settings
3767
3765
  * during component initialization to customize the form's functionality.
3768
3766
  *
3769
- * @type {ICrudFormOptions}
3767
+ * @type {ICrudFormButtons}
3770
3768
  */
3771
- options: ICrudFormOptions;
3769
+ buttons: ICrudFormButtons;
3772
3770
  /**
3773
3771
  * @description Optional action identifier for form submission context.
3774
3772
  * @summary Specifies a custom action name that will be included in the submit event.
@@ -3891,7 +3889,7 @@ declare abstract class NgxFormDirective extends NgxParentComponentDirective impl
3891
3889
  */
3892
3890
  protected getActivePage(page: number): UIModelMetadata | UIModelMetadata[] | FieldDefinition | undefined;
3893
3891
  static ɵfac: i0.ɵɵFactoryDeclaration<NgxFormDirective, never>;
3894
- static ɵdir: i0.ɵɵDirectiveDeclaration<NgxFormDirective, never, never, { "parentFormId": { "alias": "parentFormId"; "required": false; }; "deepMerge": { "alias": "deepMerge"; "required": false; }; "path": { "alias": "path"; "required": false; }; "multiple": { "alias": "multiple"; "required": false; }; "updateOn": { "alias": "updateOn"; "required": false; }; "target": { "alias": "target"; "required": false; }; "method": { "alias": "method"; "required": false; }; "options": { "alias": "options"; "required": false; }; "action": { "alias": "action"; "required": false; }; "operation": { "alias": "operation"; "required": true; }; "handlers": { "alias": "handlers"; "required": false; }; "rendererId": { "alias": "rendererId"; "required": false; }; "allowClear": { "alias": "allowClear"; "required": false; }; "match": { "alias": "match"; "required": false; }; }, { "submitEvent": "submitEvent"; "formGroupLoadedEvent": "formGroupLoadedEvent"; }, never, never, true, never>;
3892
+ static ɵdir: i0.ɵɵDirectiveDeclaration<NgxFormDirective, never, never, { "parentFormId": { "alias": "parentFormId"; "required": false; }; "deepMerge": { "alias": "deepMerge"; "required": false; }; "path": { "alias": "path"; "required": false; }; "multiple": { "alias": "multiple"; "required": false; }; "updateOn": { "alias": "updateOn"; "required": false; }; "target": { "alias": "target"; "required": false; }; "method": { "alias": "method"; "required": false; }; "buttons": { "alias": "buttons"; "required": false; }; "action": { "alias": "action"; "required": false; }; "operation": { "alias": "operation"; "required": true; }; "handlers": { "alias": "handlers"; "required": false; }; "rendererId": { "alias": "rendererId"; "required": false; }; "allowClear": { "alias": "allowClear"; "required": false; }; "match": { "alias": "match"; "required": false; }; }, { "submitEvent": "submitEvent"; "formGroupLoadedEvent": "formGroupLoadedEvent"; }, never, never, true, never>;
3895
3893
  }
3896
3894
 
3897
3895
  /**
@@ -6026,7 +6024,7 @@ declare class ListComponent extends NgxComponentDirective implements OnInit, OnD
6026
6024
  * @param {string | number} uid - The ID of the item to create.
6027
6025
  * @returns {Promise<void>} A promise that resolves when the item is created and added to the list.
6028
6026
  */
6029
- handleCreate(data: Model, uid: string | number): Promise<void>;
6027
+ handleCreate(model: Model, uid: string | number): Promise<void>;
6030
6028
  /**
6031
6029
  * @description Handles the update event from the repository.
6032
6030
  * @summary Updates the list item with the specified ID based on the new data.
@@ -6036,7 +6034,7 @@ declare class ListComponent extends NgxComponentDirective implements OnInit, OnD
6036
6034
  * @private
6037
6035
  * @memberOf ListComponent
6038
6036
  */
6039
- handleUpdate(item: Model, uid: string | number): Promise<void>;
6037
+ handleUpdate(model: Model, uid: string | number): Promise<void>;
6040
6038
  /**
6041
6039
  * @description Removes an item from the list by ID.
6042
6040
  * @summary Filters out an item with the specified ID from the data array and
@@ -7860,7 +7858,7 @@ declare function getNgxModalComponent(props?: Partial<ModalComponent>, modalProp
7860
7858
  * @param {EnvironmentInjector} [injector] - Optional environment injector for dependency injection.
7861
7859
  * @returns {Promise<IonModal>} - A promise that resolves with the modal instance.
7862
7860
  */
7863
- declare function getNgxModalCrudComponent<M extends Model>(model: Partial<M>, props?: Partial<ModalComponent>, modalProps?: Partial<ModalOptions>, injector?: EnvironmentInjector): Promise<IonModal>;
7861
+ declare function getNgxModalCrudComponent<M extends Model>(model: Partial<M>, props?: Partial<ModalComponent>, formProps?: Partial<CrudFormComponent>, modalProps?: Partial<ModalOptions>, injector?: EnvironmentInjector): Promise<IonModal>;
7864
7862
  /**
7865
7863
  * @description Presents a lightbox modal with inline content.
7866
7864
  * @summary Displays a modal in lightbox mode with the specified content and properties.
@@ -8062,7 +8060,7 @@ declare class FileUploadComponent extends NgxFormFieldDirective implements OnIni
8062
8060
  * @default false
8063
8061
  */
8064
8062
  enableDirectoryMode: boolean;
8065
- previewHandler?: unknown;
8063
+ previewHandler?: FunctionLike;
8066
8064
  /**
8067
8065
  * @description Maximum file size allowed for upload.
8068
8066
  * @summary Specifies the maximum size (in MB) for files that can be uploaded.
@@ -8769,6 +8767,17 @@ declare class TableComponent extends ListComponent implements OnInit {
8769
8767
  * @return {Promise<void>}
8770
8768
  */
8771
8769
  handleFilterSelectClear(event: CustomEvent): Promise<void>;
8770
+ /**
8771
+ * @description Updates the matching rendered table row after an edit operation.
8772
+ * @summary Executes the default update flow inherited from `ListComponent` and then
8773
+ * finds the already-mapped row in `this.items` by `uid`. When found, it synchronizes
8774
+ * each displayed cell value (except the `uid` field) with the latest values from
8775
+ * `model`, preserving the mapped row structure used by the table.
8776
+ * @param {Model} model - Model instance containing updated values.
8777
+ * @param {string | number} uid - Unique identifier of the row to update.
8778
+ * @return {Promise<void>}
8779
+ */
8780
+ handleUpdate(model: Model, uid: string | number): Promise<void>;
8772
8781
  static ɵfac: i0.ɵɵFactoryDeclaration<TableComponent, never>;
8773
8782
  static ɵcmp: i0.ɵɵComponentDeclaration<TableComponent, "ngx-decaf-table", never, { "maxContentLength": { "alias": "maxContentLength"; "required": false; }; "preserve": { "alias": "preserve"; "required": false; }; "filterModel": { "alias": "filterModel"; "required": false; }; "filterOptions": { "alias": "filterOptions"; "required": false; }; "filterLabel": { "alias": "filterLabel"; "required": false; }; "filterOptionsMapper": { "alias": "filterOptionsMapper"; "required": false; }; "allowOperations": { "alias": "allowOperations"; "required": false; }; }, {}, never, never, true, never>;
8774
8783
  }
@@ -10497,7 +10506,8 @@ declare function filterString(original: string | string[], value: string, contai
10497
10506
  * @returns {string} The icon associated with the menu item if found, otherwise an empty string.
10498
10507
  */
10499
10508
  declare function getMenuIcon(label: string, menu: IMenuItem[]): string;
10500
- declare function dateFromString(value: string): Date;
10509
+ declare function dateFromString(value: string | Date): Date;
10510
+ declare function isValidBase64(value: string): boolean;
10501
10511
 
10502
10512
  declare class DecafFakerRepository<T extends Model> extends LoggedClass {
10503
10513
  protected model: string | Model;
@@ -10517,5 +10527,5 @@ declare class DecafFakerRepository<T extends Model> extends LoggedClass {
10517
10527
  }
10518
10528
  declare function getFakerData<T extends Model>(limit: number | undefined, data: Record<string, FunctionLike>, model?: string): T[];
10519
10529
 
10520
- export { ActionRoles, AngularEngineKeys, BaseComponentProps, CPTKN, CardComponent, ComponentRendererComponent, ComponentsTagNames, CrudFieldComponent, CrudFormComponent, CssClasses, DB_ADAPTER_FLAVOUR_TOKEN, DB_ADAPTER_PROVIDER_TOKEN, DecafFakerRepository, DecafTooltipDirective, DecafTranslatePipe, DecafTruncatePipe, DefaultFormReactiveOptions, DefaultListEmptyOptions, DefaultModalOptions, Dynamic, DynamicModule, EmptyStateComponent, FieldsetComponent, FileUploadComponent, FilterComponent, ForAngularCommonModule, ForAngularComponentsModule, I18N_CONFIG_TOKEN, I18nLoader, I18nLoaderFactory, I18nParser, IconComponent, LOCALE_ROOT_TOKEN, LayoutComponent, ListComponent, ListComponentsTypes, ListItemComponent, ListItemPositions, ModalComponent, ModalConfirmComponent, ModelRendererComponent, NgxComponentDirective, NgxEventHandler, NgxFormDirective, NgxFormFieldDirective, NgxFormService, NgxMediaService, NgxModelPageDirective, NgxPageDirective, NgxParentComponentDirective, NgxRenderingEngine, NgxRouterService, NgxSvgDirective, PaginationComponent, RouteDirections, SearchbarComponent, SelectFieldInterfaces, SteppedFormComponent, TableComponent, WindowColorSchemes, cleanSpaces, dataMapper, dateFromString, decafPageTransition, filterString, formatDate, generateRandomValue, getDbAdapterFlavour, getFakerData, getInjectablesRegistry, getLocaleContext, getLocaleContextByKey, getLocaleFromClassName, getLocaleLanguage, getLogger, getMenuIcon, getModelAndRepository, getNgxInlineModal, getNgxModalComponent, getNgxModalCrudComponent, getNgxSelectOptionsModal, getOnWindow, getOnWindowDocument, getWindow, getWindowDocument, getWindowWidth, isDarkMode, isDevelopmentMode, isNotUndefined, isValidDate, itemMapper, patternValidators, presentModalConfirm, presentNgxInlineModal, presentNgxLightBoxModal, provideDecafDarkMode, provideDecafDbAdapter, provideDecafDynamicComponents, provideDecafI18nConfig, provideDecafI18nLoader, provideDecafPageTransition, removeFocusTrap, setOnWindow, stringToBoolean, windowEventEmitter };
10521
- export type { ActionRole, AngularDynamicOutput, AngularFieldDefinition, AngularProvider, CheckboxOption, ComparisonValidationKey, ComponentMetadata, CrudEvent, CrudFieldOption, DecafComponentConstructor, DecafRepository, DecafRepositoryAdapter, ElementPosition, ElementSize, FieldUpdateMode, FilterCondition, FlexPosition, FormParent, FormParentGroup, FormServiceControl, FormServiceControls, FunctionLike, HTML5InputType, HTMLFormTarget, I18nResourceConfig, I18nResourceConfigType, I18nToken, IBaseCustomEvent, IComponentConfig, IComponentHolder, IComponentProperties, ICrudFormEvent, ICrudFormOptions, IFieldSetItem, IFieldSetValidationEvent, IFileUploadError, IFilterQuery, IFilterQueryItem, IFormComponentProperties, IFormElement, ILayoutModelContext, IListComponentRefreshEvent, IListEmptyOptions, IListItemCustomEvent, IMenuItem, IModelComponentSubmitEvent, IPaginationCustomEvent, IRenderedModel, IRepositoryModelProps, ISortObject, ITabItem, ITooltipConfig, IWindowResizeEvent, InputOption, KeyValue, LayoutGridGap, ListItemPosition, PossibleInputTypes, PropsMapperFn, RadioOption, RawQuery, SelectOption, StringOrBoolean, WindowColorScheme };
10530
+ export { ActionRoles, AngularEngineKeys, BaseComponentProps, CPTKN, CardComponent, ComponentRendererComponent, ComponentsTagNames, CrudFieldComponent, CrudFormComponent, CssClasses, DB_ADAPTER_FLAVOUR_TOKEN, DB_ADAPTER_PROVIDER_TOKEN, DecafFakerRepository, DecafTooltipDirective, DecafTranslatePipe, DecafTruncatePipe, DefaultFormButtonsOptions, DefaultListEmptyOptions, DefaultModalOptions, Dynamic, DynamicModule, EmptyStateComponent, FieldsetComponent, FileUploadComponent, FilterComponent, ForAngularCommonModule, ForAngularComponentsModule, I18N_CONFIG_TOKEN, I18nLoader, I18nLoaderFactory, I18nParser, IconComponent, LOCALE_ROOT_TOKEN, LayoutComponent, ListComponent, ListComponentsTypes, ListItemComponent, ListItemPositions, ModalComponent, ModalConfirmComponent, ModelRendererComponent, NgxComponentDirective, NgxEventHandler, NgxFormDirective, NgxFormFieldDirective, NgxFormService, NgxMediaService, NgxModelPageDirective, NgxPageDirective, NgxParentComponentDirective, NgxRenderingEngine, NgxRouterService, NgxSvgDirective, PaginationComponent, RouteDirections, SearchbarComponent, SelectFieldInterfaces, SteppedFormComponent, TableComponent, WindowColorSchemes, cleanSpaces, dataMapper, dateFromString, decafPageTransition, filterString, formatDate, generateRandomValue, getDbAdapterFlavour, getFakerData, getInjectablesRegistry, getLocaleContext, getLocaleContextByKey, getLocaleFromClassName, getLocaleLanguage, getLogger, getMenuIcon, getModelAndRepository, getNgxInlineModal, getNgxModalComponent, getNgxModalCrudComponent, getNgxSelectOptionsModal, getOnWindow, getOnWindowDocument, getWindow, getWindowDocument, getWindowWidth, isDarkMode, isDevelopmentMode, isNotUndefined, isValidBase64, isValidDate, itemMapper, patternValidators, presentModalConfirm, presentNgxInlineModal, presentNgxLightBoxModal, provideDecafDarkMode, provideDecafDbAdapter, provideDecafDynamicComponents, provideDecafI18nConfig, provideDecafI18nLoader, provideDecafPageTransition, removeFocusTrap, setOnWindow, stringToBoolean, windowEventEmitter };
10531
+ export type { ActionRole, AngularDynamicOutput, AngularFieldDefinition, AngularProvider, CheckboxOption, ComparisonValidationKey, ComponentMetadata, CrudEvent, CrudFieldOption, DecafComponentConstructor, DecafRepository, DecafRepositoryAdapter, ElementPosition, ElementSize, FieldUpdateMode, FilterCondition, FlexPosition, FormParent, FormParentGroup, FormServiceControl, FormServiceControls, FunctionLike, HTML5InputType, HTMLFormTarget, I18nResourceConfig, I18nResourceConfigType, I18nToken, IBaseCustomEvent, IComponentConfig, IComponentHolder, IComponentProperties, ICrudFormButtons, ICrudFormEvent, IFieldSetItem, IFieldSetValidationEvent, IFileUploadError, IFilterQuery, IFilterQueryItem, IFormComponentProperties, IFormElement, ILayoutModelContext, IListComponentRefreshEvent, IListEmptyOptions, IListItemCustomEvent, IMenuItem, IModelComponentSubmitEvent, IPaginationCustomEvent, IRenderedModel, IRepositoryModelProps, ISortObject, ITabItem, ITooltipConfig, IWindowResizeEvent, InputOption, KeyValue, LayoutGridGap, ListItemPosition, PossibleInputTypes, PropsMapperFn, 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.1.31",
3
+ "version": "0.1.35",
4
4
  "author": "Tiago Venceslau and Contributors",
5
5
  "license": "MPL-2.0 OR AGPL-3.0",
6
6
  "repository": {