@prismatic-io/spectral 7.3.4 → 7.3.6

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.
@@ -8,14 +8,15 @@ interface DisplayDefinition {
8
8
  /** Description to display to the user. */
9
9
  description: string;
10
10
  }
11
- interface ExtraDisplayDefinitionFields {
11
+ declare type PublicComponentCategory = "Application Connectors" | "Data Platforms" | "Helpers" | "Logic" | "Triggers";
12
+ interface ExtraDisplayDefinitionFields<TPublic extends boolean> {
12
13
  /** Path to icon to use for this Component. Path should be relative to the built component source. */
13
14
  iconPath: string;
14
15
  /** Category of the Component. */
15
- category?: string;
16
+ category?: TPublic extends true ? PublicComponentCategory : string;
16
17
  }
17
18
  /** Component extensions for display properties. */
18
- export declare type ComponentDisplayDefinition<T extends boolean> = T extends true ? DisplayDefinition & Required<ExtraDisplayDefinitionFields> : DisplayDefinition & ExtraDisplayDefinitionFields;
19
+ export declare type ComponentDisplayDefinition<TPublic extends boolean> = TPublic extends true ? DisplayDefinition & Required<ExtraDisplayDefinitionFields<TPublic>> : DisplayDefinition & ExtraDisplayDefinitionFields<TPublic>;
19
20
  /** Action-specific Display attributes. */
20
21
  export interface ActionDisplayDefinition extends DisplayDefinition {
21
22
  /** Directions to help guide the user if additional configuration is required for this Action. */
@@ -1,4 +1,5 @@
1
1
  import { ConditionalExpression } from "./conditional-logic";
2
+ import { JsonSchema, UISchemaElement } from "@jsonforms/core";
2
3
  export declare type Element = {
3
4
  key: string;
4
5
  label?: string;
@@ -22,9 +23,22 @@ export declare type ObjectFieldMap = {
22
23
  }[];
23
24
  };
24
25
  export declare type JSONForm = {
25
- schema: Record<string, unknown>;
26
- uiSchema: Record<string, unknown>;
27
- data: unknown;
26
+ /**
27
+ * The data/JSON schema defines the underlying data to
28
+ * be shown in the UI (objects, properties, and their
29
+ * types). See https://jsonforms.io/docs
30
+ */
31
+ schema: JsonSchema;
32
+ /**
33
+ * The UI schema defines how this data is rendered as a
34
+ * form, e.g. the order of controls, their visibility,
35
+ * and the layout. See https://jsonforms.io/docs/uischema/
36
+ */
37
+ uiSchema: UISchemaElement;
38
+ /**
39
+ * Optional default data to use in the inputs of your form
40
+ */
41
+ data?: Record<string, unknown>;
28
42
  };
29
43
  export declare type DynamicObjectSelection = string;
30
44
  export declare type DynamicFieldSelection = string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prismatic-io/spectral",
3
- "version": "7.3.4",
3
+ "version": "7.3.6",
4
4
  "description": "Utility library for building Prismatic components",
5
5
  "keywords": [
6
6
  "prismatic"
@@ -37,6 +37,7 @@
37
37
  "dist/"
38
38
  ],
39
39
  "dependencies": {
40
+ "@jsonforms/core": "3.0.0",
40
41
  "axios": "0.27.2",
41
42
  "axios-retry": "3.2.5",
42
43
  "date-fns": "2.28.0",