@record-evolution/widget-form 1.0.26 → 1.0.28

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/README.md CHANGED
@@ -26,7 +26,7 @@ npm i @record-evolution/widget-form
26
26
 
27
27
  | Property | Type | Description |
28
28
  | ----------- | ----------- | ----------------------------- |
29
- | `inputData` | `InputData` | Form configuration and fields |
29
+ | `inputData` | `FormConfiguration` | Form configuration and fields |
30
30
  | `theme` | `Theme` | Theme object for styling |
31
31
 
32
32
  ## Events
@@ -40,7 +40,7 @@ npm i @record-evolution/widget-form
40
40
  The form is configured via the `inputData` property:
41
41
 
42
42
  ```ts
43
- interface InputData {
43
+ interface FormConfiguration {
44
44
  title?: string
45
45
  subTitle?: string
46
46
  formButton?: boolean // Show button to open form dialog
@@ -1,13 +1,13 @@
1
1
  import { CSSResult } from 'lit';
2
2
  import { DirectiveResult } from 'lit-html/directive.js';
3
- import { InputData } from './definition-schema.js';
3
+ import { FormConfiguration } from './definition-schema.js';
4
4
  import { Keyed } from 'lit-html/directives/keyed.js';
5
5
  import { LitElement } from 'lit';
6
6
  import { MdDialog } from '@material/web/dialog/dialog.js';
7
7
  import { PropertyValues } from 'lit';
8
8
  import { TemplateResult } from 'lit-html';
9
9
 
10
- declare type Column = Exclude<InputData['formFields'], undefined>[number];
10
+ declare type Column = Exclude<FormConfiguration['formFields'], undefined>[number];
11
11
 
12
12
  declare type Theme = {
13
13
  theme_name: string;
@@ -15,7 +15,7 @@ declare type Theme = {
15
15
  };
16
16
 
17
17
  export declare class WidgetForm extends LitElement {
18
- inputData?: InputData;
18
+ inputData?: FormConfiguration;
19
19
  theme?: Theme;
20
20
  route?: string;
21
21
  private themeBgColor?;
@@ -23,6 +23,7 @@ export declare class WidgetForm extends LitElement {
23
23
  dialogOpen: boolean;
24
24
  dialog: MdDialog;
25
25
  private formKey;
26
+ private fieldValues;
26
27
  version: string;
27
28
  update(changedProperties: Map<string, any>): void;
28
29
  protected firstUpdated(_changedProperties: PropertyValues): void;
@@ -46,6 +47,9 @@ export declare class WidgetForm extends LitElement {
46
47
  effectivePreFilledValue(field: Column): string | undefined;
47
48
  effectiveDefaultValue(field: Column): string | undefined;
48
49
  formatValue(value: string, type: string): any;
50
+ currentRawValue(field: Column, i: number, formData: FormData): string;
51
+ handleFieldChange(event: Event): void;
52
+ isFieldVisible(field: Column): boolean;
49
53
  renderTextField(field: Column, i: number): TemplateResult<1>;
50
54
  renderNumberField(field: Column, i: number): TemplateResult<1>;
51
55
  renderCheckbox(field: Column, i: number): TemplateResult<1>;