@socotra/ec-react-components 2.2.2 → 2.2.3-alpha.4

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/package.json CHANGED
@@ -1,10 +1,19 @@
1
1
  {
2
2
  "name": "@socotra/ec-react-components",
3
- "version": "2.2.2",
3
+ "version": "2.2.3-alpha.4",
4
4
  "type": "module",
5
5
  "main": "./dist/index.umd.js",
6
6
  "module": "./dist/index.es.js",
7
7
  "types": "./dist/index.d.ts",
8
+ "homepage": "https://github.com/socotra/ec-react/tree/main/packages/components",
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "https://github.com/socotra/ec-react.git",
12
+ "directory": "packages/components"
13
+ },
14
+ "publishConfig": {
15
+ "registry": "https://registry.npmjs.org/"
16
+ },
8
17
  "files": [
9
18
  "dist"
10
19
  ],
@@ -32,8 +41,8 @@
32
41
  "@radix-ui/react-checkbox": "^1.1.1",
33
42
  "@radix-ui/react-slot": "^1.0.2",
34
43
  "@radix-ui/react-switch": "^1.1.0",
35
- "@socotra/ec-react-schemas": "2.2.2",
36
- "@socotra/ec-react-utils": "2.2.2",
44
+ "@socotra/ec-react-schemas": "2.2.3-alpha.4",
45
+ "@socotra/ec-react-utils": "2.2.3-alpha.4",
37
46
  "@tailwindcss/container-queries": "^0.1.1",
38
47
  "ajv-errors": "^3.0.0",
39
48
  "class-variance-authority": "^0.7.0",
@@ -54,8 +63,8 @@
54
63
  "@types/lodash": "^4.17.6",
55
64
  "@types/react": "^18.3.3",
56
65
  "@types/react-dom": "^18.3.0",
57
- "@typescript-eslint/eslint-plugin": "^7.2.0",
58
- "@typescript-eslint/parser": "^7.2.0",
66
+ "@typescript-eslint/eslint-plugin": "^8.0.1",
67
+ "@typescript-eslint/parser": "^8.0.1",
59
68
  "@vitejs/plugin-react": "^4.2.1",
60
69
  "@vitejs/plugin-react-swc": "^3.6.0",
61
70
  "autoprefixer": "^10.4.19",
@@ -64,5 +73,5 @@
64
73
  "postcss": "^8.4.38",
65
74
  "tailwindcss": "^3.4.3"
66
75
  },
67
- "gitHead": "d353975091447433375cb51457e911b7dc5ee995"
76
+ "gitHead": "dbb9d5d816b6d8aac319ec1cf4e322a348c92298"
68
77
  }
package/dist/index.d.ts DELETED
@@ -1,134 +0,0 @@
1
- import { AccountConfigRecord } from '@socotra/ec-react-schemas';
2
- import { AccountRequest } from '@socotra/ec-react-schemas';
3
- import { AccountResponse } from '@socotra/ec-react-schemas';
4
- import { DataTypeConfigRecord } from '@socotra/ec-react-schemas';
5
- import { JSX as JSX_2 } from 'react/jsx-runtime';
6
- import { ProductConfigRecord } from '@socotra/ec-react-schemas';
7
- import { QuoteRequest } from '@socotra/ec-react-schemas';
8
- import { QuoteResponse } from '@socotra/ec-react-schemas';
9
-
10
- /**
11
- * AccountForm is a form for creating or updating an account. It accepts a resolved data model, custom data types, and an optional account object to put the form in update mode. References: https://rjsf-team.github.io/react-jsonschema-form/docs/
12
- */
13
- export declare const AccountForm: {
14
- ({ accountsModel, accountType, dataTypes, disabled, handleSubmit, isSubmitting, preventFormResetOnDisabled, hideSubmitButton, account, submitButtonText, id, }: Props): JSX_2.Element;
15
- displayName: string;
16
- };
17
-
18
- /**
19
- * ElementForm is a form for updating a quote's element. It accepts a resolved data model, element locator, custom data types, and a quote object to build on.
20
- */
21
- export declare const ElementForm: () => JSX_2.Element;
22
-
23
- declare type Props = {
24
- /**
25
- * The resolved data model for accounts retrieved from the data model response
26
- */
27
- accountsModel: AccountConfigRecord;
28
- /**
29
- * The account type to use for the form
30
- */
31
- accountType: keyof AccountConfigRecord;
32
- /**
33
- * The custom data types for the configuration that may be referenced by the accountsModel
34
- */
35
- dataTypes: DataTypeConfigRecord;
36
- /**
37
- * The function to call when the form is submitted. It will create an AccountCreateRequest or AccountUpdateRequest based on the form data
38
- */
39
- handleSubmit: (data: AccountRequest) => void;
40
- /**
41
- * Set to true when the form is submitting to set fields to readonly and disable the submit button
42
- */
43
- isSubmitting?: boolean;
44
- /**
45
- * Disables the form
46
- */
47
- disabled?: boolean;
48
- /**
49
- * Prevents the form from resetting when disabled
50
- * default is true
51
- */
52
- preventFormResetOnDisabled?: boolean;
53
- /**
54
- * The account object to put the form in update mode
55
- */
56
- account?: AccountResponse;
57
- /**
58
- * Hides the submit button
59
- */
60
- hideSubmitButton?: boolean;
61
- /**
62
- * The text to display on the submit button
63
- */
64
- submitButtonText?: string;
65
- /**
66
- * ID for the form wrapper
67
- * */
68
- id?: string;
69
- };
70
-
71
- declare type Props_2 = {
72
- /**
73
- * The quote object
74
- */
75
- quote: QuoteResponse;
76
- /**
77
- * The resolved data model for quotes retrieved from the data model response
78
- */
79
- productsModel: ProductConfigRecord;
80
- /**
81
- * The quote type to use for the form
82
- */
83
- productType: keyof ProductConfigRecord;
84
- /**
85
- * The custom data types for the configuration that may be referenced by the DataModel
86
- */
87
- dataTypes: DataTypeConfigRecord;
88
- /**
89
- * The function to call when the form is submitted. It will create an QuoteUpdateRequest from the form data.
90
- */
91
- handleSubmit: (data: QuoteRequest) => void;
92
- /**
93
- * Set to true when the form is submitting to set fields to readonly and disable the submit button
94
- */
95
- isSubmitting?: boolean;
96
- /**
97
- * Disables the form
98
- */
99
- disabled?: boolean;
100
- /**
101
- * Prevents the form from resetting when disabled
102
- * default is true
103
- */
104
- preventFormResetOnDisabled?: boolean;
105
- /**
106
- * Hides the submit button
107
- */
108
- hideSubmitButton?: boolean;
109
- /**
110
- * The text to display on the submit button
111
- */
112
- /**
113
- * Whether to validate the form on submit
114
- */
115
- validateOnSubmit?: boolean;
116
- /**
117
- * The text to display on the submit button
118
- */
119
- submitButtonText?: string;
120
- /**
121
- * ID for the form wrapper
122
- * */
123
- id?: string;
124
- };
125
-
126
- /**
127
- * QuoteForm is a form for creating or updating an quote. It accepts a resolved data model, custom data types, and an optional quote object to put the form in update mode. References: https://rjsf-team.github.io/react-jsonschema-form/docs/
128
- */
129
- export declare const QuoteForm: {
130
- ({ quote, productType, productsModel, dataTypes, disabled, handleSubmit, isSubmitting, preventFormResetOnDisabled, validateOnSubmit, hideSubmitButton, submitButtonText, id, }: Props_2): JSX_2.Element;
131
- displayName: string;
132
- };
133
-
134
- export { }