@remoteoss/json-schema-form 0.11.1-beta.0 → 0.11.1-dev.20240726080523
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/CHANGELOG.md +0 -6
- package/dist/index.cjs +2 -2
- package/dist/index.js +2 -2
- package/dist/standalone.js +2 -2
- package/json-schema-form.d.ts +15 -19
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
#### 0.11.1-beta.0 (2024-07-26)
|
|
2
|
-
|
|
3
|
-
##### Chores
|
|
4
|
-
|
|
5
|
-
* **modify:** Add missing Typescript declarations ([#84](https://github.com/remoteoss/json-schema-form/pull/84)) ([86b3af2a](https://github.com/remoteoss/json-schema-form/commit/86b3af2a31981718ad349ac8d08fbdce3aa86acf))
|
|
6
|
-
|
|
7
1
|
#### 0.11.0-beta.0 (2024-07-25)
|
|
8
2
|
|
|
9
3
|
##### Breaking changes
|
package/dist/index.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
|
|
2
2
|
/*!
|
|
3
3
|
Copyright (c) 2024 Remote Technology, Inc.
|
|
4
|
-
NPM Package: @remoteoss/json-schema-form@0.11.1-
|
|
5
|
-
Generated: Fri, 26 Jul 2024
|
|
4
|
+
NPM Package: @remoteoss/json-schema-form@0.11.1-dev.20240726080523
|
|
5
|
+
Generated: Fri, 26 Jul 2024 08:05:36 GMT
|
|
6
6
|
|
|
7
7
|
MIT License
|
|
8
8
|
|
package/dist/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
|
|
2
2
|
/*!
|
|
3
3
|
Copyright (c) 2024 Remote Technology, Inc.
|
|
4
|
-
NPM Package: @remoteoss/json-schema-form@0.11.1-
|
|
5
|
-
Generated: Fri, 26 Jul 2024
|
|
4
|
+
NPM Package: @remoteoss/json-schema-form@0.11.1-dev.20240726080523
|
|
5
|
+
Generated: Fri, 26 Jul 2024 08:05:36 GMT
|
|
6
6
|
|
|
7
7
|
MIT License
|
|
8
8
|
|
package/dist/standalone.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
|
|
2
2
|
/*!
|
|
3
3
|
Copyright (c) 2024 Remote Technology, Inc.
|
|
4
|
-
NPM Package: @remoteoss/json-schema-form@0.11.1-
|
|
5
|
-
Generated: Fri, 26 Jul 2024
|
|
4
|
+
NPM Package: @remoteoss/json-schema-form@0.11.1-dev.20240726080523
|
|
5
|
+
Generated: Fri, 26 Jul 2024 08:05:36 GMT
|
|
6
6
|
|
|
7
7
|
MIT License
|
|
8
8
|
|
package/json-schema-form.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { WARNING_TYPES } from './src/modify';
|
|
2
|
+
|
|
1
3
|
/**
|
|
2
4
|
* Shorthand to lookup for keys with `x-jsf-*` preffix.
|
|
3
5
|
*/
|
|
@@ -135,23 +137,15 @@ type ModifyConfig = {
|
|
|
135
137
|
muteLogging?: boolean;
|
|
136
138
|
};
|
|
137
139
|
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
| 'FIELD_TO_CREATE_EXISTS'
|
|
142
|
-
| 'PICK_MISSED_FIELD';
|
|
140
|
+
const warningTypes = WARNING_TYPES satisfies Record<string, string>;
|
|
141
|
+
|
|
142
|
+
type WARNING_TYPES = keyof typeof warningTypes;
|
|
143
143
|
|
|
144
|
-
type
|
|
144
|
+
type Warnings = {
|
|
145
145
|
message: string;
|
|
146
|
-
type:
|
|
146
|
+
type: WARNING_TYPES;
|
|
147
147
|
meta?: Record<string, unknown>;
|
|
148
|
-
};
|
|
149
|
-
|
|
150
|
-
type ModifyOutput = {
|
|
151
|
-
schema: JSONSchemaObjectType;
|
|
152
|
-
warnings: Warning[];
|
|
153
|
-
};
|
|
154
|
-
|
|
148
|
+
}[];
|
|
155
149
|
/**
|
|
156
150
|
* Generates the Headless form based on the provided JSON schema
|
|
157
151
|
*/
|
|
@@ -162,16 +156,18 @@ export function createHeadlessForm(
|
|
|
162
156
|
): HeadlessFormOutput;
|
|
163
157
|
|
|
164
158
|
/**
|
|
165
|
-
*
|
|
166
|
-
* This does not mutate the original JSON Schema.
|
|
159
|
+
* Modifies the JSON schema based on the provided configuration.
|
|
167
160
|
*/
|
|
168
161
|
export function modify(
|
|
169
162
|
/**
|
|
170
|
-
* The original JSON schema
|
|
163
|
+
* The original JSON schema to be modified.
|
|
171
164
|
*/
|
|
172
165
|
originalSchema: JSONSchemaObjectType,
|
|
173
166
|
/**
|
|
174
|
-
* The configuration object
|
|
167
|
+
* The configuration object containing the fields and allFields properties.
|
|
175
168
|
*/
|
|
176
169
|
config?: ModifyConfig
|
|
177
|
-
):
|
|
170
|
+
): {
|
|
171
|
+
schema: JSONSchemaObjectType;
|
|
172
|
+
warnings: Warnings;
|
|
173
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remoteoss/json-schema-form",
|
|
3
|
-
"version": "0.11.1-
|
|
3
|
+
"version": "0.11.1-dev.20240726080523",
|
|
4
4
|
"description": "Headless UI form powered by JSON Schemas",
|
|
5
5
|
"author": "Remote.com <engineering@remote.com> (https://remote.com/)",
|
|
6
6
|
"license": "MIT",
|