@nvs-dynamic-form/react-core 1.2.1 → 1.2.2

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.
@@ -1,8 +1,11 @@
1
1
  /// <reference types="react" />
2
- import { FieldBase, SubmitButton } from "../types";
2
+ import { FieldBase, SubmitButtonOptions } from "../types";
3
3
  export interface INvsDynamicForm {
4
4
  onSubmit?: ((values: unknown) => void) | ((values: unknown) => Promise<void>);
5
- submitButton: SubmitButton;
5
+ submitButton: {
6
+ component: React.FC<any>;
7
+ defaultOptions: SubmitButtonOptions;
8
+ };
6
9
  formElements: {
7
10
  [key: string]: {
8
11
  component: React.FC<any>;
@@ -1,4 +1,4 @@
1
1
  export * from "./form-field.type";
2
2
  export * from "./screen-size.type";
3
- export * from "./submit-button.type";
4
3
  export * from "./dynamic-object.type";
4
+ export * from "./submit-button-options.type";
@@ -0,0 +1,5 @@
1
+ export declare class SubmitButtonOptions {
2
+ label: string;
3
+ isFullWidth: boolean;
4
+ position: "left" | "right" | "center";
5
+ }
package/dist/index.d.ts CHANGED
@@ -21,23 +21,22 @@ declare abstract class FieldBase<ValueType> {
21
21
  constructor(options: FieldBase<ValueType>, fieldDefaultValue?: ValueType);
22
22
  }
23
23
 
24
- declare class SubmitButton {
25
- component: React.FC<any>;
26
- defaultOptions: SubmitButtonOptions;
24
+ declare class DynamicObject {
25
+ [key: string]: number | string | boolean | null;
27
26
  }
27
+
28
28
  declare class SubmitButtonOptions {
29
29
  label: string;
30
30
  isFullWidth: boolean;
31
31
  position: "left" | "right" | "center";
32
32
  }
33
33
 
34
- declare class DynamicObject {
35
- [key: string]: number | string | boolean | null;
36
- }
37
-
38
34
  interface INvsDynamicForm {
39
35
  onSubmit?: ((values: unknown) => void) | ((values: unknown) => Promise<void>);
40
- submitButton: SubmitButton;
36
+ submitButton: {
37
+ component: React.FC<any>;
38
+ defaultOptions: SubmitButtonOptions;
39
+ };
41
40
  formElements: {
42
41
  [key: string]: {
43
42
  component: React.FC<any>;
@@ -54,4 +53,4 @@ interface INvsDynamicForm {
54
53
 
55
54
  declare const NvsDynamicForm: ({ onSubmit, formElements, fields, formClass, submitButton, submitButtonVisible, submitButtonLabel, submitButtonIsFullWidth, submitButtonPosition, }: INvsDynamicForm) => React$1.JSX.Element;
56
55
 
57
- export { DynamicObject, FieldBase, type INvsDynamicForm, type IScreenSize, NvsDynamicForm, type ScreenSizeType, SubmitButton, SubmitButtonOptions };
56
+ export { DynamicObject, FieldBase, type INvsDynamicForm, type IScreenSize, NvsDynamicForm, type ScreenSizeType, SubmitButtonOptions };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nvs-dynamic-form/react-core",
3
- "version": "1.2.1",
3
+ "version": "1.2.2",
4
4
  "main": "dist/cjs/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "files": [
@@ -8,7 +8,7 @@
8
8
  "packages.json"
9
9
  ],
10
10
  "scripts": {
11
- "build": "rollup -c --bundleConfigAsCjs",
11
+ "build": "rm -rf dist && rollup -c --bundleConfigAsCjs",
12
12
  "storybook": "storybook dev -p 6006",
13
13
  "build-storybook": "storybook build",
14
14
  "release": "standard-version"
@@ -1,10 +0,0 @@
1
- /// <reference types="react" />
2
- export declare class SubmitButton {
3
- component: React.FC<any>;
4
- defaultOptions: SubmitButtonOptions;
5
- }
6
- export declare class SubmitButtonOptions {
7
- label: string;
8
- isFullWidth: boolean;
9
- position: "left" | "right" | "center";
10
- }