@decaf-ts/for-angular 0.0.3

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.
Files changed (43) hide show
  1. package/LICENSE.md +21 -0
  2. package/README.md +297 -0
  3. package/dist/for-angular/README.md +297 -0
  4. package/dist/for-angular/assets/i18n/en.json +21 -0
  5. package/dist/for-angular/components/decaf-crud-field/decaf-crud-field.component.d.ts +22 -0
  6. package/dist/for-angular/components/decaf-crud-form/constants.d.ts +5 -0
  7. package/dist/for-angular/components/decaf-crud-form/decaf-crud-form.component.d.ts +28 -0
  8. package/dist/for-angular/components/decaf-crud-form/types.d.ts +17 -0
  9. package/dist/for-angular/components/decaf-model-renderer/decaf-model-renderer.component.d.ts +20 -0
  10. package/dist/for-angular/directives/decaf-field.directive.d.ts +8 -0
  11. package/dist/for-angular/engine/DynamicModule.d.ts +2 -0
  12. package/dist/for-angular/engine/NgxCrudFormField.d.ts +115 -0
  13. package/dist/for-angular/engine/NgxFormService.d.ts +119 -0
  14. package/dist/for-angular/engine/NgxRenderingEngine.d.ts +17 -0
  15. package/dist/for-angular/engine/ValidatorFactory.d.ts +4 -0
  16. package/dist/for-angular/engine/constants.d.ts +10 -0
  17. package/dist/for-angular/engine/decorators.d.ts +1 -0
  18. package/dist/for-angular/engine/index.d.ts +5 -0
  19. package/dist/for-angular/engine/types.d.ts +32 -0
  20. package/dist/for-angular/esm2022/components/decaf-crud-field/decaf-crud-field.component.mjs +66 -0
  21. package/dist/for-angular/esm2022/components/decaf-crud-form/constants.mjs +14 -0
  22. package/dist/for-angular/esm2022/components/decaf-crud-form/decaf-crud-form.component.mjs +84 -0
  23. package/dist/for-angular/esm2022/components/decaf-crud-form/types.mjs +2 -0
  24. package/dist/for-angular/esm2022/components/decaf-model-renderer/decaf-model-renderer.component.mjs +46 -0
  25. package/dist/for-angular/esm2022/decaf-ts-for-angular.mjs +5 -0
  26. package/dist/for-angular/esm2022/directives/decaf-field.directive.mjs +23 -0
  27. package/dist/for-angular/esm2022/engine/DynamicModule.mjs +3 -0
  28. package/dist/for-angular/esm2022/engine/NgxCrudFormField.mjs +118 -0
  29. package/dist/for-angular/esm2022/engine/NgxFormService.mjs +232 -0
  30. package/dist/for-angular/esm2022/engine/NgxRenderingEngine.mjs +35 -0
  31. package/dist/for-angular/esm2022/engine/ValidatorFactory.mjs +48 -0
  32. package/dist/for-angular/esm2022/engine/constants.mjs +12 -0
  33. package/dist/for-angular/esm2022/engine/decorators.mjs +17 -0
  34. package/dist/for-angular/esm2022/engine/index.mjs +6 -0
  35. package/dist/for-angular/esm2022/engine/types.mjs +2 -0
  36. package/dist/for-angular/esm2022/interfaces.mjs +2 -0
  37. package/dist/for-angular/esm2022/public-apis.mjs +5 -0
  38. package/dist/for-angular/fesm2022/decaf-ts-for-angular.mjs +675 -0
  39. package/dist/for-angular/fesm2022/decaf-ts-for-angular.mjs.map +1 -0
  40. package/dist/for-angular/index.d.ts +5 -0
  41. package/dist/for-angular/interfaces.d.ts +8 -0
  42. package/dist/for-angular/public-apis.d.ts +4 -0
  43. package/package.json +81 -0
@@ -0,0 +1,5 @@
1
+ import { CrudFormOptions } from './types';
2
+ export declare const CssClasses: {
3
+ BUTTONS_CONTAINER: string;
4
+ };
5
+ export declare const DefaultFormReactiveOptions: CrudFormOptions;
@@ -0,0 +1,28 @@
1
+ import { ElementRef, OnInit, AfterViewInit, EventEmitter, OnDestroy } from '@angular/core';
2
+ import { FormGroup } from '@angular/forms';
3
+ import { FormElement } from '../../interfaces';
4
+ import { FieldUpdateMode, HTMLFormTarget } from '../../engine';
5
+ import { CrudFormOptions, FormReactiveSubmitEvent } from './types';
6
+ import { CrudOperations } from '@decaf-ts/db-decorators';
7
+ import * as i0 from "@angular/core";
8
+ export declare class DecafCrudFormComponent implements OnInit, AfterViewInit, FormElement, OnDestroy {
9
+ updateOn: FieldUpdateMode;
10
+ component: ElementRef;
11
+ target: HTMLFormTarget;
12
+ method: 'get' | 'post' | 'event';
13
+ options: CrudFormOptions;
14
+ action?: string;
15
+ operation: CrudOperations;
16
+ formGroup: FormGroup;
17
+ formId: string;
18
+ submitEvent: EventEmitter<FormReactiveSubmitEvent>;
19
+ ngAfterViewInit(): void;
20
+ ngOnInit(): void;
21
+ ngOnDestroy(): void;
22
+ /**
23
+ * @param {Event} event
24
+ */
25
+ submit(event: SubmitEvent): any;
26
+ static ɵfac: i0.ɵɵFactoryDeclaration<DecafCrudFormComponent, never>;
27
+ static ɵcmp: i0.ɵɵComponentDeclaration<DecafCrudFormComponent, "decaf-crud-form", never, { "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; }; "formGroup": { "alias": "formGroup"; "required": false; }; "formId": { "alias": "formId"; "required": false; }; }, { "submitEvent": "submitEvent"; }, never, ["*"], true, never>;
28
+ }
@@ -0,0 +1,17 @@
1
+ export interface FormReactiveSubmitEvent {
2
+ data: Record<string, unknown>;
3
+ }
4
+ export interface CrudFormOptions {
5
+ buttons: {
6
+ submit: {
7
+ icon?: string;
8
+ iconSlot?: 'start' | 'end';
9
+ text?: string;
10
+ };
11
+ clear?: {
12
+ icon?: string;
13
+ iconSlot?: 'start' | 'end';
14
+ text?: string;
15
+ };
16
+ };
17
+ }
@@ -0,0 +1,20 @@
1
+ import { OnChanges, OnInit, SimpleChanges, ViewContainerRef } from '@angular/core';
2
+ import { FieldDefinition } from '@decaf-ts/ui-decorators';
3
+ import { Model } from '@decaf-ts/decorator-validation';
4
+ import { AngularFieldDefinition } from '../../engine';
5
+ import * as i0 from "@angular/core";
6
+ export declare class DecafModelRendererComponent<M extends Model> implements OnInit, OnChanges {
7
+ private vcr;
8
+ model: M | string;
9
+ component: unknown;
10
+ props: Record<string, unknown>;
11
+ content: {
12
+ id: string;
13
+ }[][];
14
+ output: FieldDefinition<AngularFieldDefinition>;
15
+ constructor(vcr: ViewContainerRef);
16
+ ngOnInit(): void;
17
+ ngOnChanges(changes: SimpleChanges): void;
18
+ static ɵfac: i0.ɵɵFactoryDeclaration<DecafModelRendererComponent<any>, never>;
19
+ static ɵcmp: i0.ɵɵComponentDeclaration<DecafModelRendererComponent<any>, "decaf-model-renderer", never, { "model": { "alias": "model"; "required": true; }; }, {}, never, never, true, never>;
20
+ }
@@ -0,0 +1,8 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class DecafFieldDirective {
3
+ fieldName: string;
4
+ name: string;
5
+ constructor();
6
+ static ɵfac: i0.ɵɵFactoryDeclaration<DecafFieldDirective, never>;
7
+ static ɵdir: i0.ɵɵDirectiveDeclaration<DecafFieldDirective, "[appDecafField]", never, { "fieldName": { "alias": "appDecafField"; "required": false; }; }, {}, never, never, true, never>;
8
+ }
@@ -0,0 +1,2 @@
1
+ export declare abstract class DynamicModule {
2
+ }
@@ -0,0 +1,115 @@
1
+ import { CrudFormField } from '@decaf-ts/ui-decorators';
2
+ import { AngularFieldDefinition, FieldUpdateMode } from './types';
3
+ import { CrudOperations } from '@decaf-ts/db-decorators';
4
+ import { ControlValueAccessor, FormGroup } from '@angular/forms';
5
+ import { ElementRef } from '@angular/core';
6
+ /**
7
+ * @class NgxCrudFormField
8
+ * @implements {CrudFormField<AngularFieldDefinition>}
9
+ * @implements {ControlValueAccessor}
10
+ * @summary Abstract class representing a CRUD form field for Angular applications
11
+ * @description This class provides the base implementation for CRUD form fields in Angular,
12
+ * implementing both CrudFormField and ControlValueAccessor interfaces.
13
+ */
14
+ export declare abstract class NgxCrudFormField implements CrudFormField<AngularFieldDefinition>, ControlValueAccessor {
15
+ /**
16
+ * @summary Reference to the component's element
17
+ * @description ElementRef representing the component's native element
18
+ */
19
+ component: ElementRef;
20
+ /**
21
+ * @summary Current CRUD operation
22
+ * @description Represents the current CRUD operation being performed
23
+ */
24
+ operation: CrudOperations;
25
+ /**
26
+ * @summary Field properties
27
+ * @description Angular-specific field definition properties
28
+ */
29
+ props: AngularFieldDefinition;
30
+ /**
31
+ * @summary Form group for the field
32
+ * @description Angular FormGroup instance for the field
33
+ */
34
+ formGroup: FormGroup;
35
+ /**
36
+ * @summary Field name
37
+ * @description Name of the form field
38
+ */
39
+ name: string;
40
+ /**
41
+ * @summary Field value
42
+ * @description Current value of the form field
43
+ */
44
+ value: string;
45
+ /**
46
+ * @summary Parent HTML element
47
+ * @description Reference to the parent HTML element of the field
48
+ */
49
+ protected parent?: HTMLElement;
50
+ /**
51
+ * @summary String formatting function
52
+ * @description Provides access to the sf function for error message formatting
53
+ */
54
+ sf: typeof import("@decaf-ts/decorator-validation").stringFormat;
55
+ /**
56
+ * @summary Change callback function
57
+ * @description Function called when the field value changes
58
+ */
59
+ onChange: () => unknown;
60
+ /**
61
+ * @summary Touch callback function
62
+ * @description Function called when the field is touched
63
+ */
64
+ onTouch: () => unknown;
65
+ /**
66
+ * @summary Write value to the field
67
+ * @description Sets the value of the field
68
+ * @param {string} obj - The value to be set
69
+ */
70
+ writeValue(obj: string): void;
71
+ /**
72
+ * @summary Register change callback
73
+ * @description Registers a function to be called when the field value changes
74
+ * @param {() => unknown} fn - The function to be called on change
75
+ */
76
+ registerOnChange(fn: () => unknown): void;
77
+ /**
78
+ * @summary Register touch callback
79
+ * @description Registers a function to be called when the field is touched
80
+ * @param {() => unknown} fn - The function to be called on touch
81
+ */
82
+ registerOnTouched(fn: () => unknown): void;
83
+ /**
84
+ * @summary Set disabled state
85
+ * @description Sets the disabled state of the field
86
+ * @param {boolean} isDisabled - Whether the field should be disabled
87
+ */
88
+ setDisabledState?(isDisabled: boolean): void;
89
+ /**
90
+ * @summary After view initialization logic
91
+ * @description Performs necessary setup after the view has been initialized
92
+ * @returns {HTMLElement} The parent element of the field
93
+ */
94
+ afterViewInit(): HTMLElement;
95
+ /**
96
+ * @summary Cleanup on component destruction
97
+ * @description Unregisters the field when the component is destroyed
98
+ */
99
+ onDestroy(): void;
100
+ /**
101
+ * @summary Initialize the field
102
+ * @description Sets up the form group and field name
103
+ * @param {FieldUpdateMode} updateOn - The update mode for the field
104
+ */
105
+ onInit(updateOn: FieldUpdateMode): void;
106
+ /**
107
+ * @summary Get field errors
108
+ * @description Retrieves all errors associated with the field
109
+ * @returns {{key: string, message: string}[]} An array of error objects
110
+ */
111
+ getErrors(): {
112
+ key: string;
113
+ message: string;
114
+ }[];
115
+ }
@@ -0,0 +1,119 @@
1
+ import { FieldProperties } from '@decaf-ts/ui-decorators';
2
+ import { AngularFieldDefinition, FieldUpdateMode } from './types';
3
+ import { FormGroup } from '@angular/forms';
4
+ import { FormElement } from '../interfaces';
5
+ /**
6
+ * @summary Service for managing Angular forms and form controls.
7
+ * @description
8
+ * The NgxFormService provides utility methods for handling form initialization,
9
+ * validation, data retrieval, and form control management in Angular applications.
10
+ * It offers a centralized way to manage form controls, perform validations, and
11
+ * handle form-related operations.
12
+ */
13
+ export declare class NgxFormService {
14
+ /**
15
+ * @summary Storage for form controls.
16
+ * @description
17
+ * A static object that stores form controls indexed by form ID and field name.
18
+ * @type {Record<string, Record<string, { control: FormGroup; props: AngularFieldDefinition }>>}
19
+ */
20
+ private static controls;
21
+ private constructor();
22
+ /**
23
+ * Initializes the form after the view has been initialized.
24
+ * This method sets up the form controls and creates a FormGroup.
25
+ *
26
+ * @param el - The form element to initialize.
27
+ * @param formId - The unique identifier for the form.
28
+ * @param formUpdateMode - The update mode for the form. Defaults to 'blur'.
29
+ */
30
+ /**
31
+ * @summary Initializes the form after view initialization.
32
+ * @description
33
+ * Sets up form controls and creates a FormGroup for the given form element.
34
+ *
35
+ * @param {FormElement} el - The form element to initialize.
36
+ * @param {string} formId - The unique identifier for the form.
37
+ * @param {FieldUpdateMode} [formUpdateMode='blur'] - The update mode for the form.
38
+ */
39
+ static formAfterViewInit(el: FormElement, formId: string, formUpdateMode?: FieldUpdateMode): void;
40
+ /**
41
+ * @summary Handles form component destruction.
42
+ * @description
43
+ * Unregisters the form from the service when the component is destroyed.
44
+ *
45
+ * @param {FormElement} el - The form element being destroyed.
46
+ * @param {string} formId - The unique identifier of the form to unregister.
47
+ */
48
+ static forOnDestroy(el: FormElement, formId: string): void;
49
+ /**
50
+ * @summary Retrieves form data for a given form ID.
51
+ * @description
52
+ * Processes form controls and returns their values as an object.
53
+ *
54
+ * @param {string} formId - The unique identifier of the form to retrieve data from.
55
+ * @returns {Record<string, unknown>} An object containing the form data.
56
+ * @throws {Error} If the form with the given ID is not found.
57
+ */
58
+ static getFormData(formId: string): Record<string, unknown>;
59
+ /**
60
+ * @summary Validates form fields.
61
+ * @description
62
+ * Validates either a specific field or all fields in the form group.
63
+ *
64
+ * @param {FormGroup} formGroup - The FormGroup to validate.
65
+ * @param {string} [fieldName] - Optional name of a specific field to validate.
66
+ * @returns {boolean} Indicates whether the validation passed (true) or failed (false).
67
+ */
68
+ static validateFields(formGroup: FormGroup, fieldName?: string): boolean;
69
+ /**
70
+ * @summary Creates a FormGroup from field properties.
71
+ * @description
72
+ * Generates a new FormGroup instance based on the provided field definition and update mode.
73
+ *
74
+ * @param {AngularFieldDefinition} props - The Angular field definition properties.
75
+ * @param {FieldUpdateMode} updateMode - The update mode for the form group.
76
+ * @returns {FormGroup} A new FormGroup instance.
77
+ */
78
+ static fromProps(props: AngularFieldDefinition, updateMode: FieldUpdateMode): FormGroup;
79
+ /**
80
+ * Retrieves a form by its ID from the stored controls.
81
+ *
82
+ * @param id - The unique identifier of the form to retrieve.
83
+ * @returns The form controls associated with the given ID.
84
+ * @throws Error if the form with the given ID is not found.
85
+ */
86
+ private static getFormById;
87
+ /**
88
+ * Retrieves a specific field from a form by its name.
89
+ *
90
+ * @param formId - The unique identifier of the form.
91
+ * @param name - The name of the field to retrieve.
92
+ * @returns The field control and properties.
93
+ * @throws Error if the field is not found in the form.
94
+ */
95
+ private static getFieldByName;
96
+ /**
97
+ * Generates an array of validator functions from the provided field properties.
98
+ *
99
+ * @param props - The field properties containing validation rules.
100
+ * @returns An array of ValidatorFn instances.
101
+ */
102
+ private static validatorsFromProps;
103
+ /**
104
+ *
105
+ * @param el
106
+ * @param tag
107
+ *
108
+ * @throws {Error} when no parent exists with the provided tag
109
+ */
110
+ static getParentEl(el: HTMLElement, tag: string): HTMLElement;
111
+ static register(formId: string, control: FormGroup, props: FieldProperties & AngularFieldDefinition): void;
112
+ /**
113
+ * Unregisters a form or a specific field from the service.
114
+ *
115
+ * @param formId - The unique identifier of the form.
116
+ * @param field - Optional. The specific field to unregister. If not provided, the entire form is unregistered.
117
+ */
118
+ static unregister(formId: string, field?: HTMLElement): void;
119
+ }
@@ -0,0 +1,17 @@
1
+ import { RenderingEngine } from '@decaf-ts/ui-decorators';
2
+ import { AngularFieldDefinition, ComponentMetadata } from './types';
3
+ import { Constructor } from '@decaf-ts/decorator-validation';
4
+ export declare class NgxRenderingEngine extends RenderingEngine<AngularFieldDefinition> {
5
+ private static _components;
6
+ constructor();
7
+ initialize(...args: any[]): Promise<void>;
8
+ static registerComponent(name: string, constructor: Constructor<unknown>, metadata: ComponentMetadata): void;
9
+ static components(selector?: string): {
10
+ constructor: Constructor<unknown>;
11
+ metadata: ComponentMetadata;
12
+ } | {
13
+ constructor: Constructor<unknown>;
14
+ metadata: ComponentMetadata;
15
+ }[];
16
+ static key(key: string): string;
17
+ }
@@ -0,0 +1,4 @@
1
+ import { ValidatorFn } from '@angular/forms';
2
+ export declare class ValidatorFactory {
3
+ static spawn(key: string, arg: unknown): ValidatorFn;
4
+ }
@@ -0,0 +1,10 @@
1
+ export declare const AngularEngineKeys: {
2
+ REFLECT: string;
3
+ DYNAMIC: string;
4
+ ANNOTATIONS: string;
5
+ NG_REFLECT: string;
6
+ };
7
+ export declare const FormConstants: {
8
+ VALID: string;
9
+ INVALID: string;
10
+ };
@@ -0,0 +1 @@
1
+ export declare function Dynamic(): (target: object, propertyKey?: string | symbol | unknown, descriptor?: PropertyDescriptor) => void;
@@ -0,0 +1,5 @@
1
+ export * from './constants';
2
+ export * from './decorators';
3
+ export * from './DynamicModule';
4
+ export * from './NgxRenderingEngine';
5
+ export * from './types';
@@ -0,0 +1,32 @@
1
+ import { FieldProperties } from '@decaf-ts/ui-decorators';
2
+ import { IonCheckbox, IonInput, IonSelect, IonTextarea } from '@ionic/angular';
3
+ import { TextFieldTypes } from '@ionic/core';
4
+ export type FieldUpdateMode = 'change' | 'blur' | 'submit';
5
+ export interface ComponentMetadata {
6
+ changeDetection: number;
7
+ selector: string;
8
+ standalone: boolean;
9
+ imports: (new (...args: unknown[]) => unknown)[];
10
+ template: string;
11
+ styles: string[];
12
+ }
13
+ export type AngularFieldDefinition = FieldProperties & Omit<IonInput, 'ionInput' | 'ionFocus' | 'ionChange' | 'ionBlur' | 'getInputElement' | 'setFocus' | 'label' | 'el' | 'z' | 'type'> & Pick<IonSelect, 'cancelText' | 'interface' | 'selectedText' | 'interfaceOptions'> & Pick<IonTextarea, 'rows' | 'cols'> & Pick<IonCheckbox, 'alignment' | 'justify' | 'checked'> & {
14
+ type: 'checkbox' | 'radio' | 'select' | TextFieldTypes | 'textarea';
15
+ className: string | string[];
16
+ } & Record<string, unknown>;
17
+ export type StringOrBoolean = 'true' | 'false' | boolean;
18
+ export type SelectOption = InputOption & {
19
+ selected?: boolean;
20
+ };
21
+ export type CheckboxOption = RadioOption;
22
+ export type RadioOption = InputOption & {
23
+ checked?: boolean;
24
+ };
25
+ export interface InputOption {
26
+ text: string;
27
+ value: string | number;
28
+ disabled?: StringOrBoolean;
29
+ className?: string;
30
+ icon?: string;
31
+ }
32
+ export type HTMLFormTarget = '_blank' | '_self' | '_parent' | '_top' | string;
@@ -0,0 +1,66 @@
1
+ import { Component, CUSTOM_ELEMENTS_SCHEMA, ElementRef, Input, NO_ERRORS_SCHEMA, ViewChild, } from '@angular/core';
2
+ import { FormGroup, ReactiveFormsModule } from '@angular/forms';
3
+ import { HTML5InputTypes } from '@decaf-ts/ui-decorators';
4
+ import { IonCheckbox, IonInput, IonItem, IonRadio, IonRadioGroup, IonSelect, IonSelectOption, } from '@ionic/angular/standalone';
5
+ import { TranslatePipe } from '@ngx-translate/core';
6
+ import { DecafFieldDirective } from '../../directives/decaf-field.directive';
7
+ import { NgClass } from '@angular/common';
8
+ import { NgxCrudFormField } from '../../engine/NgxCrudFormField';
9
+ import * as i0 from "@angular/core";
10
+ import * as i1 from "@angular/forms";
11
+ // @Dynamic()
12
+ export class DecafCrudFieldComponent extends NgxCrudFormField {
13
+ constructor() {
14
+ super(...arguments);
15
+ this.updateOn = 'change';
16
+ this.translatable = true;
17
+ this.HTML5InputTypes = Object.values(HTML5InputTypes);
18
+ }
19
+ ngAfterViewInit() {
20
+ super.afterViewInit();
21
+ }
22
+ ngOnDestroy() {
23
+ this.onDestroy();
24
+ }
25
+ ngOnInit() {
26
+ super.onInit(this.updateOn);
27
+ }
28
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DecafCrudFieldComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
29
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: DecafCrudFieldComponent, isStandalone: true, selector: "decaf-crud-field", inputs: { updateOn: "updateOn", operation: "operation", props: "props", name: "name", options: "options", formGroup: "formGroup", translatable: "translatable" }, viewQueries: [{ propertyName: "component", first: true, predicate: ["component"], descendants: true, read: ElementRef }], usesInheritance: true, ngImport: i0, template: "<ng-container #component [formGroup]=\"formGroup\">\n @if(props.type === 'textarea') {\n <ion-item>\n <ion-textarea\n [ngClass]=\"props.className\"\n [mode]=\"props.mode\"\n [hidden]=\"props.hidden\"\n [required]=\"props.required !== undefined ? props.required : null\"\n [minlength]=\"props.minlength !== undefined ? props.minlength : null\"\n [maxlength]=\"props.maxlength !== undefined ? props.maxlength : null\"\n [readonly]=\"props.readonly !== undefined ? props.readonly : null\"\n [inputmode]=\"props.inputmode\"\n [spellcheck]=\"props.spellcheck\"\n [rows]=\"props.rows\"\n [labelPlacement]=\"props.labelPlacement\"\n [value]=\"props.value\"\n [fill]=\"props.fill\"\n [placeholder]=\"translatable ? (props.placeholder | translate) : props.placeholder\"\n [formControlName]=\"props.name\"\n [label]=\"translatable ? (props.label | translate) : props.label\">\n </ion-textarea>\n </ion-item>\n }\n @if(props.type === 'checkbox') {\n <ion-item [formControlName]=\"props.name\">\n <ion-checkbox\n #checkboxElement\n [name]=\"props.name\"\n [ngClass]=\"props.className\"\n [mode]=\"props.mode\"\n [hidden]=\"props.hidden\"\n [labelPlacement]=\"props.labelPlacement\"\n [alignment]=\"props.alignment\"\n [justify]=\"props.justify\"\n [disabled]=\"props.disabled || props.readonly\"\n [attr.checkedValue]=\"props.value\"\n [value]=\"props.value\"\n [checked]=\"props.checked\"\n (ionChange)=\"props.checked = !props.checked\"\n [formControlName]=\"props.name\">\n <span [innerHTML]=\"props.label | translate\"></span>\n </ion-checkbox>\n </ion-item>\n }\n @else if(props.type === 'radio') {\n <ion-radio-group [ngClass]=\"props.className\" [formControlName]=\"props.name\" [name]=\"props.name\" [value]=\"props.value\">\n <label class=\"radio-group-label\">{{props.label | translate}}</label>\n @for(option of options; track option.value) {\n <ion-item>\n <ion-radio\n [mode]=\"props.mode\"\n [hidden]=\"props.hidden\"\n [disabled]=\"props.readonly || props.disabled\"\n [labelPlacement]=\"props.labelPlacement\"\n [alignment]=\"props.alignment\"\n [justify]=\"props.justify\"\n [value]=\"option.value\"\n >{{ option.text | translate }}</ion-radio>\n </ion-item>\n }\n </ion-radio-group>\n }\n @else if(props.type === 'select') {\n <ion-item>\n <ion-select\n [name]=\"props.name\"\n [ngClass]=\"props.className\"\n [mode]=\"props.mode\"\n [hidden]=\"props.hidden\"\n [labelPlacement]=\"props.labelPlacement\"\n [cancelText]=\"props.cancelText | translate\"\n [label]=\"translatable ? (props.label | translate) : props.label\"\n [value]=\"props.value\"\n [fill]=\"props.fill\"\n [disabled]=\"props.readonly || props.disabled\"\n [placeholder]=\"props.placeholder | translate\"\n [formControlName]=\"props.name\"\n [interface]=\"props.interface\">\n @for(option of options; track option.value) {\n <ion-select-option [value]=\"option.value\">\n {{ translatable ? (option.text | translate) : option.text }}\n </ion-select-option>\n }\n </ion-select>\n </ion-item>\n }\n @else if(HTML5InputTypes.includes(props.type)) {\n <ion-item>\n <ion-input\n [ngClass]=\"props.className\"\n [type]=\"props.type\"\n [mode]=\"props.mode\"\n [hidden]=\"props.hidden\"\n [inputmode]=\"props.inputmode\"\n [autocomplete]=\"props.autocomplete\"\n [spellcheck]=\"props.spellcheck\"\n [labelPlacement]=\"props.labelPlacement\"\n [required]=\"props.required !== undefined ? props.required : false\"\n [minlength]=\"props.minlength !== undefined ? props.minlength : null\"\n [maxlength]=\"props.maxlength !== undefined ? props.maxlength : null\"\n [readonly]=\"props.readonly !== undefined ? props.readonly : null\"\n [max]=\"props.max !== undefined ? props.max : null\"\n [min]=\"props.min !== undefined ? props.min : null\"\n [pattern]=\"props.pattern !== undefined ? props.pattern : null\"\n [step]=\"props.step !== undefined ? props.step : null\"\n [value]=\"props.value\"\n [fill]=\"props.fill\"\n [placeholder]=\"props.placeholder | translate\"\n [formControlName]=\"props.name\"\n [label]=\"props.label | translate\">\n </ion-input>\n </ion-item>\n }\n @else {\n <h1>INVALID FIELD TYPE</h1>\n }\n @if((!formGroup.pristine || formGroup.touched) && !formGroup.valid) {\n <div class=\"error uk-flex uk-flex-top\">\n @for(item of getErrors(); track item.key) {\n <p>\n <span color=\"danger\" class=\"ti ti-alert-triangle\"></span>\n <span>{{item.key}} - {{ sf((\"errors.\" + item.message) | translate, props[item.key]) }}</span>\n </p>\n }\n </div>\n }\n</ng-container>\n", styles: [".disabled{opacity:.7;pointer-events:none;touch-action:none}.disabled *{pointer-events:none;touch-action:none}.proccessing,.proccessing *{pointer-events:none;touch-action:none;cursor:text}ion-item{--border-color: transparent;--padding-start: .75rem;--background: transparent;--background-hover-opacity: .1;--background-hover: var(--ion-color-primary);--background-activated-opacity: .15;--background-focused: var(--ion-color-primary);--background-focused-opacity: .15}ion-textarea textarea{scrollbar-width:thin!important;margin-bottom:.5rem!important}ion-select.select-label-placement-floating::part(label){line-height:1.2rem!important}.radio-group-label{margin-left:.5rem}.radio-group-label+ion-item{margin-top:.5rem}ion-checkbox{--size: 1.5rem;--checkbox-background-checked: var(--ion-color-primary);--checkmark-width: 2px}ion-checkbox::part(container){border-radius:50%;border:2px solid var(--ion-color-primary);padding:3px}ion-item+.helper,ion-radio-group+.helper{padding-left:.75rem;position:relative}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.MinLengthValidator, selector: "[minlength][formControlName],[minlength][formControl],[minlength][ngModel]", inputs: ["minlength"] }, { kind: "directive", type: i1.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i1.PatternValidator, selector: "[pattern][formControlName],[pattern][formControl],[pattern][ngModel]", inputs: ["pattern"] }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: IonInput, selector: "ion-input", inputs: ["accept", "autocapitalize", "autocomplete", "autocorrect", "autofocus", "clearInput", "clearOnEdit", "color", "counter", "counterFormatter", "debounce", "disabled", "enterkeyhint", "errorText", "fill", "helperText", "inputmode", "label", "labelPlacement", "max", "maxlength", "min", "minlength", "mode", "multiple", "name", "pattern", "placeholder", "readonly", "required", "shape", "size", "spellcheck", "step", "type", "value"] }, { kind: "component", type: IonItem, selector: "ion-item", inputs: ["button", "color", "detail", "detailIcon", "disabled", "download", "href", "lines", "mode", "rel", "routerAnimation", "routerDirection", "target", "type"] }, { kind: "component", type: IonCheckbox, selector: "ion-checkbox", inputs: ["checked", "color", "disabled", "indeterminate", "justify", "labelPlacement", "mode", "name", "value"] }, { kind: "component", type: IonRadioGroup, selector: "ion-radio-group", inputs: ["allowEmptySelection", "compareWith", "name", "value"] }, { kind: "component", type: IonRadio, selector: "ion-radio", inputs: ["alignment", "color", "disabled", "justify", "labelPlacement", "mode", "name", "value"] }, { kind: "component", type: IonSelect, selector: "ion-select", inputs: ["cancelText", "color", "compareWith", "disabled", "expandedIcon", "fill", "interface", "interfaceOptions", "justify", "label", "labelPlacement", "mode", "multiple", "name", "okText", "placeholder", "selectedText", "shape", "toggleIcon", "value"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }, { kind: "component", type: IonSelectOption, selector: "ion-select-option", inputs: ["disabled", "value"] }] }); }
30
+ }
31
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DecafCrudFieldComponent, decorators: [{
32
+ type: Component,
33
+ args: [{ standalone: true, imports: [
34
+ ReactiveFormsModule,
35
+ NgClass,
36
+ IonInput,
37
+ IonItem,
38
+ IonCheckbox,
39
+ IonRadioGroup,
40
+ IonRadio,
41
+ IonSelect,
42
+ TranslatePipe,
43
+ IonSelectOption,
44
+ DecafFieldDirective,
45
+ ], schemas: [CUSTOM_ELEMENTS_SCHEMA, NO_ERRORS_SCHEMA], selector: 'decaf-crud-field', template: "<ng-container #component [formGroup]=\"formGroup\">\n @if(props.type === 'textarea') {\n <ion-item>\n <ion-textarea\n [ngClass]=\"props.className\"\n [mode]=\"props.mode\"\n [hidden]=\"props.hidden\"\n [required]=\"props.required !== undefined ? props.required : null\"\n [minlength]=\"props.minlength !== undefined ? props.minlength : null\"\n [maxlength]=\"props.maxlength !== undefined ? props.maxlength : null\"\n [readonly]=\"props.readonly !== undefined ? props.readonly : null\"\n [inputmode]=\"props.inputmode\"\n [spellcheck]=\"props.spellcheck\"\n [rows]=\"props.rows\"\n [labelPlacement]=\"props.labelPlacement\"\n [value]=\"props.value\"\n [fill]=\"props.fill\"\n [placeholder]=\"translatable ? (props.placeholder | translate) : props.placeholder\"\n [formControlName]=\"props.name\"\n [label]=\"translatable ? (props.label | translate) : props.label\">\n </ion-textarea>\n </ion-item>\n }\n @if(props.type === 'checkbox') {\n <ion-item [formControlName]=\"props.name\">\n <ion-checkbox\n #checkboxElement\n [name]=\"props.name\"\n [ngClass]=\"props.className\"\n [mode]=\"props.mode\"\n [hidden]=\"props.hidden\"\n [labelPlacement]=\"props.labelPlacement\"\n [alignment]=\"props.alignment\"\n [justify]=\"props.justify\"\n [disabled]=\"props.disabled || props.readonly\"\n [attr.checkedValue]=\"props.value\"\n [value]=\"props.value\"\n [checked]=\"props.checked\"\n (ionChange)=\"props.checked = !props.checked\"\n [formControlName]=\"props.name\">\n <span [innerHTML]=\"props.label | translate\"></span>\n </ion-checkbox>\n </ion-item>\n }\n @else if(props.type === 'radio') {\n <ion-radio-group [ngClass]=\"props.className\" [formControlName]=\"props.name\" [name]=\"props.name\" [value]=\"props.value\">\n <label class=\"radio-group-label\">{{props.label | translate}}</label>\n @for(option of options; track option.value) {\n <ion-item>\n <ion-radio\n [mode]=\"props.mode\"\n [hidden]=\"props.hidden\"\n [disabled]=\"props.readonly || props.disabled\"\n [labelPlacement]=\"props.labelPlacement\"\n [alignment]=\"props.alignment\"\n [justify]=\"props.justify\"\n [value]=\"option.value\"\n >{{ option.text | translate }}</ion-radio>\n </ion-item>\n }\n </ion-radio-group>\n }\n @else if(props.type === 'select') {\n <ion-item>\n <ion-select\n [name]=\"props.name\"\n [ngClass]=\"props.className\"\n [mode]=\"props.mode\"\n [hidden]=\"props.hidden\"\n [labelPlacement]=\"props.labelPlacement\"\n [cancelText]=\"props.cancelText | translate\"\n [label]=\"translatable ? (props.label | translate) : props.label\"\n [value]=\"props.value\"\n [fill]=\"props.fill\"\n [disabled]=\"props.readonly || props.disabled\"\n [placeholder]=\"props.placeholder | translate\"\n [formControlName]=\"props.name\"\n [interface]=\"props.interface\">\n @for(option of options; track option.value) {\n <ion-select-option [value]=\"option.value\">\n {{ translatable ? (option.text | translate) : option.text }}\n </ion-select-option>\n }\n </ion-select>\n </ion-item>\n }\n @else if(HTML5InputTypes.includes(props.type)) {\n <ion-item>\n <ion-input\n [ngClass]=\"props.className\"\n [type]=\"props.type\"\n [mode]=\"props.mode\"\n [hidden]=\"props.hidden\"\n [inputmode]=\"props.inputmode\"\n [autocomplete]=\"props.autocomplete\"\n [spellcheck]=\"props.spellcheck\"\n [labelPlacement]=\"props.labelPlacement\"\n [required]=\"props.required !== undefined ? props.required : false\"\n [minlength]=\"props.minlength !== undefined ? props.minlength : null\"\n [maxlength]=\"props.maxlength !== undefined ? props.maxlength : null\"\n [readonly]=\"props.readonly !== undefined ? props.readonly : null\"\n [max]=\"props.max !== undefined ? props.max : null\"\n [min]=\"props.min !== undefined ? props.min : null\"\n [pattern]=\"props.pattern !== undefined ? props.pattern : null\"\n [step]=\"props.step !== undefined ? props.step : null\"\n [value]=\"props.value\"\n [fill]=\"props.fill\"\n [placeholder]=\"props.placeholder | translate\"\n [formControlName]=\"props.name\"\n [label]=\"props.label | translate\">\n </ion-input>\n </ion-item>\n }\n @else {\n <h1>INVALID FIELD TYPE</h1>\n }\n @if((!formGroup.pristine || formGroup.touched) && !formGroup.valid) {\n <div class=\"error uk-flex uk-flex-top\">\n @for(item of getErrors(); track item.key) {\n <p>\n <span color=\"danger\" class=\"ti ti-alert-triangle\"></span>\n <span>{{item.key}} - {{ sf((\"errors.\" + item.message) | translate, props[item.key]) }}</span>\n </p>\n }\n </div>\n }\n</ng-container>\n", styles: [".disabled{opacity:.7;pointer-events:none;touch-action:none}.disabled *{pointer-events:none;touch-action:none}.proccessing,.proccessing *{pointer-events:none;touch-action:none;cursor:text}ion-item{--border-color: transparent;--padding-start: .75rem;--background: transparent;--background-hover-opacity: .1;--background-hover: var(--ion-color-primary);--background-activated-opacity: .15;--background-focused: var(--ion-color-primary);--background-focused-opacity: .15}ion-textarea textarea{scrollbar-width:thin!important;margin-bottom:.5rem!important}ion-select.select-label-placement-floating::part(label){line-height:1.2rem!important}.radio-group-label{margin-left:.5rem}.radio-group-label+ion-item{margin-top:.5rem}ion-checkbox{--size: 1.5rem;--checkbox-background-checked: var(--ion-color-primary);--checkmark-width: 2px}ion-checkbox::part(container){border-radius:50%;border:2px solid var(--ion-color-primary);padding:3px}ion-item+.helper,ion-radio-group+.helper{padding-left:.75rem;position:relative}\n"] }]
46
+ }], propDecorators: { updateOn: [{
47
+ type: Input
48
+ }], component: [{
49
+ type: ViewChild,
50
+ args: ['component', { read: ElementRef }]
51
+ }], operation: [{
52
+ type: Input,
53
+ args: [{ required: true }]
54
+ }], props: [{
55
+ type: Input,
56
+ args: [{ required: true }]
57
+ }], name: [{
58
+ type: Input
59
+ }], options: [{
60
+ type: Input
61
+ }], formGroup: [{
62
+ type: Input
63
+ }], translatable: [{
64
+ type: Input
65
+ }] } });
66
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVjYWYtY3J1ZC1maWVsZC5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9zcmMvbGliL2NvbXBvbmVudHMvZGVjYWYtY3J1ZC1maWVsZC9kZWNhZi1jcnVkLWZpZWxkLmNvbXBvbmVudC50cyIsIi4uLy4uLy4uLy4uLy4uL3NyYy9saWIvY29tcG9uZW50cy9kZWNhZi1jcnVkLWZpZWxkL2RlY2FmLWNydWQtZmllbGQuY29tcG9uZW50Lmh0bWwiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBT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Gl0ZW0ubWVzc2FnZSkgfCB0cmFuc2xhdGUsIHByb3BzW2l0ZW0ua2V5XSkgfX08L3NwYW4+XG4gICAgICAgIDwvcD5cbiAgICAgIH1cbiAgICA8L2Rpdj5cbiAgfVxuPC9uZy1jb250YWluZXI+XG4iXX0=
@@ -0,0 +1,14 @@
1
+ export const CssClasses = {
2
+ BUTTONS_CONTAINER: 'buttons-container',
3
+ };
4
+ export const DefaultFormReactiveOptions = {
5
+ buttons: {
6
+ submit: {
7
+ text: 'Submit',
8
+ },
9
+ clear: {
10
+ text: 'Clear',
11
+ },
12
+ },
13
+ };
14
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uc3RhbnRzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vc3JjL2xpYi9jb21wb25lbnRzL2RlY2FmLWNydWQtZm9ybS9jb25zdGFudHMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBRUEsTUFBTSxDQUFDLE1BQU0sVUFBVSxHQUFHO0lBQ3hCLGlCQUFpQixFQUFFLG1CQUFtQjtDQUN2QyxDQUFDO0FBRUYsTUFBTSxDQUFDLE1BQU0sMEJBQTBCLEdBQW9CO0lBQ3pELE9BQU8sRUFBRTtRQUNQLE1BQU0sRUFBRTtZQUNOLElBQUksRUFBRSxRQUFRO1NBQ2Y7UUFDRCxLQUFLLEVBQUU7WUFDTCxJQUFJLEVBQUUsT0FBTztTQUNkO0tBQ0Y7Q0FDRixDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgQ3J1ZEZvcm1PcHRpb25zIH0gZnJvbSAnLi90eXBlcyc7XG5cbmV4cG9ydCBjb25zdCBDc3NDbGFzc2VzID0ge1xuICBCVVRUT05TX0NPTlRBSU5FUjogJ2J1dHRvbnMtY29udGFpbmVyJyxcbn07XG5cbmV4cG9ydCBjb25zdCBEZWZhdWx0Rm9ybVJlYWN0aXZlT3B0aW9uczogQ3J1ZEZvcm1PcHRpb25zID0ge1xuICBidXR0b25zOiB7XG4gICAgc3VibWl0OiB7XG4gICAgICB0ZXh0OiAnU3VibWl0JyxcbiAgICB9LFxuICAgIGNsZWFyOiB7XG4gICAgICB0ZXh0OiAnQ2xlYXInLFxuICAgIH0sXG4gIH0sXG59O1xuIl19