@ruc-lib/metaform 2.2.2 → 3.1.0

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 (31) hide show
  1. package/README.md +1 -135
  2. package/fesm2022/ruc-lib-metaform.mjs +450 -0
  3. package/fesm2022/ruc-lib-metaform.mjs.map +1 -0
  4. package/index.d.ts +125 -2
  5. package/package.json +9 -36
  6. package/components/ruc-meta-checkbox-group/ruc-meta-checkbox-group.component.d.ts +0 -18
  7. package/components/ruc-meta-inputs/ruc-meta-inputs.component.d.ts +0 -23
  8. package/components/ruc-meta-radio-group/ruc-meta-radio-group.component.d.ts +0 -20
  9. package/components/ruc-meta-select/ruc-meta-select.component.d.ts +0 -17
  10. package/components/ruc-text-area/ruc-text-area.component.d.ts +0 -19
  11. package/esm2020/components/ruc-meta-checkbox-group/ruc-meta-checkbox-group.component.mjs +0 -42
  12. package/esm2020/components/ruc-meta-inputs/ruc-meta-inputs.component.mjs +0 -54
  13. package/esm2020/components/ruc-meta-radio-group/ruc-meta-radio-group.component.mjs +0 -38
  14. package/esm2020/components/ruc-meta-select/ruc-meta-select.component.mjs +0 -56
  15. package/esm2020/components/ruc-text-area/ruc-text-area.component.mjs +0 -39
  16. package/esm2020/index.mjs +0 -3
  17. package/esm2020/interfaces/metaFormsDefault.mjs +0 -2
  18. package/esm2020/lib/ruclib-metaform/ruclib-metaform.component.mjs +0 -105
  19. package/esm2020/lib/ruclib-metaform.module.mjs +0 -100
  20. package/esm2020/ruc-lib-metaform.mjs +0 -5
  21. package/esm2020/services/ruc-meta-form-validation.service.mjs +0 -29
  22. package/esm2020/services/ruc-meta-form.service.mjs +0 -23
  23. package/fesm2015/ruc-lib-metaform.mjs +0 -432
  24. package/fesm2015/ruc-lib-metaform.mjs.map +0 -1
  25. package/fesm2020/ruc-lib-metaform.mjs +0 -432
  26. package/fesm2020/ruc-lib-metaform.mjs.map +0 -1
  27. package/interfaces/metaFormsDefault.d.ts +0 -73
  28. package/lib/ruclib-metaform/ruclib-metaform.component.d.ts +0 -45
  29. package/lib/ruclib-metaform.module.d.ts +0 -27
  30. package/services/ruc-meta-form-validation.service.d.ts +0 -12
  31. package/services/ruc-meta-form.service.d.ts +0 -14
package/README.md CHANGED
@@ -1,135 +1 @@
1
- # ruclib-metaform
2
-
3
- The main aim of meta forms is to make forms based on JSON along with validation support, dependent fields, custom theming etc.
4
-
5
- ## RUC Library Installation Guide
6
-
7
- Users can easily install the RUC (Ruxptest Library) from npm. Additionally, they can also choose to install individual components based on their requirements.
8
- Install RUC Library.
9
-
10
- To install the entire RUC library:
11
-
12
- `npm install @uxpractice/ruc-lib`
13
-
14
- ## Install Individual Components
15
-
16
- If users only need the metaform component, they can install it separately:
17
-
18
- `npm install @ruc-lib/metaform`
19
-
20
- ## Usage
21
-
22
- To use the metaform component in your project, follow the integration guidelines provided in the documentation. Customize the metaform as per your requirements by adjusting the configuration options mentioned below.
23
-
24
- ## Import from RUC Library
25
-
26
- If you want to use metaform from RUC library then import into `app.module.ts` like -
27
-
28
- `import "@uxpractice/ruc-lib/metaform"`.
29
-
30
- If you installed metaform as a individual component then import like -
31
-
32
- `import "@ruc-lib/metaform"`
33
-
34
- Then add `RuclibMetaformModule` into `import` array.
35
-
36
- Then use the metaform selector in your HTML file.
37
-
38
- ```
39
- <uxp-ruclib-metaform [rucInputData]="formData" [customTheme]="customTheme"
40
- (rucEvent)="passEvent($event)"></uxp-ruclib-metaform>
41
- ```
42
-
43
- ## Input and Output
44
-
45
- Inputs:
46
- • rucInputData: Data to be passed to the metaform.
47
- • customTheme: Custom styling/theme for the metaform.
48
-
49
- Outputs:
50
- • rucEvent: Event emitted from the metaform.
51
-
52
- ## rucInputData configurations options-
53
-
54
- ```
55
- {
56
- formType?: 'simple' | 'stepper' // less priority
57
- inputType: 'text' | 'password' | 'button' | 'checkbox' | 'email' | 'color' | 'date' | 'file' | 'hidden' | 'image' | 'radio' | 'number' | 'range' | 'reset' | 'search' | 'submit' | 'time' | 'tel' | 'url' | 'week' | 'month' | 'number' | 'custom' | 'select' | 'rucMultiFileUpload' | 'rucMultiSelect',
58
- fieldType: string,
59
- id?: string,
60
- errorMsg? : boolean,
61
- name?: string,
62
- label?: string,
63
- value?: any,
64
- className?: string, // to be check value?: string, //Specifies the default value for an input field src?: string,
65
- alt?: string,
66
- appearance?: string,
67
- min?: string, //Specifies the minimum value for an input field
68
- max?: string, //Specifies the maximum value for an input field
69
- width?: string, // like for image
70
- height?: string, // like for image
71
- checked?: boolean, //Specifies that an input field should be pre-selected when the page loads (for type="checkbox" or type="radio")
72
- disabled?: boolean, //Specifies that an input field should be disabled
73
- maxlength?: string, //Specifies the maximum number of character for an input field
74
- readonly?: boolean, //Specifies that an input field is read only (cannot be changed)
75
- required?: boolean, //Specifies that an input field is required (must be filled out)
76
- size?: string, //Specifies the width (in characters) of an input field
77
- step?: string, //Specifies the legal number intervals for an input field
78
- sameRow? : boolean,
79
- sameRowColumnWidth? : string,
80
- tooltip? : string,
81
- tooltipPosition? : string, //'after', 'before', 'above', 'below', 'left', 'right'
82
- pattern? : any, // The input pattern attribute specifies a regular expression that the input field's value is checked against, when the form is submitted. The pattern attribute works with the following input types: text, date, search, url, tel, email, and password.
83
- placeholder?: any,
84
- autofocus?: any, //The input autofocus attribute specifies that an input field should automatically get focus when the page loads.
85
- autocomplete?: any,
86
- customComponentName?: 'multifileupload' | 'multiselect' | 'none',
87
- rucMultiselectInput? : {
88
- rucInputData? : any,
89
- dataSource? : any
90
- }, // multiselect interface
91
- rucMultiFileUpload? : {rucInputData? : any}
92
- hasDependentFields?: boolean,
93
- dependentFieldParentId?: any,
94
- dependentFields?: MetaFormConfig[];
95
- selectedParentId?: any;
96
- toolTipDescription?: string,
97
- customErrorMessage?: string,
98
- showErrorOnPopUp?: boolean, //need to be discuss more. as a enhancement
99
- groupOptions?: groupOptions[] = [{
100
- id: string,
101
- name: string,
102
- value?: string, // compulsary if its select option part selected?: boolean
103
- disable? : boolean
104
- }],
105
- stepperForm?: boolean;
106
- stepper?: Stepper[] = [{
107
- stepControl?: string;
108
- stepperlabel?: string;
109
- stepperFormData?: MetaFormConfig[];
110
- }],
111
- rucMultiFileUploadInput?:{
112
- rucInputData? : any,
113
- }
114
- }
115
-
116
- export interface groupOptions{
117
- id: string,
118
- name: string,
119
- value?: string,
120
- disable? : boolean
121
- }
122
- export interface Stepper{
123
- stepControl?: string;
124
- stepperlabel?: string;
125
- stepperFormData?: MetaFormConfig[];
126
- }
127
- ```
128
-
129
- ## Contribution
130
-
131
- Contributions are welcome! Feel free to open issues or pull requests for any enhancements or fixes.
132
-
133
- ## Acknowledgements
134
-
135
- Thank you for choosing the Metaform Component Library. If you have any feedback or suggestions, please let us know!
1
+ utf8