@uncharted.software/jsonforms-primevue 1.5.0 → 1.6.0

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.
@@ -0,0 +1,15 @@
1
+ import { JsonSchema, TesterContext, UISchemaElement } from '@jsonforms/core';
2
+ export declare const stringControlTester: (uischema: UISchemaElement, schema: JsonSchema, context: TesterContext) => number;
3
+ export declare const enumControlTester: (uischema: UISchemaElement, schema: JsonSchema, context: TesterContext) => number;
4
+ export declare const oneOfEnumControlTester: (uischema: UISchemaElement, schema: JsonSchema, context: TesterContext) => number;
5
+ export declare const labelledEnumControlTesters: readonly [{
6
+ readonly id: "string";
7
+ readonly tester: (uischema: UISchemaElement, schema: JsonSchema, context: TesterContext) => number;
8
+ }, {
9
+ readonly id: "enum";
10
+ readonly tester: (uischema: UISchemaElement, schema: JsonSchema, context: TesterContext) => number;
11
+ }, {
12
+ readonly id: "oneOfEnum";
13
+ readonly tester: (uischema: UISchemaElement, schema: JsonSchema, context: TesterContext) => number;
14
+ }];
15
+ export declare function winningLabelledEnumControlTesterId(uischema: UISchemaElement, schema: JsonSchema, context: TesterContext): (typeof labelledEnumControlTesters)[number]['id'] | undefined;
@@ -1,12 +1,16 @@
1
1
  import { EnumOption } from '@jsonforms/core';
2
+ type OneOfEnumSubschema = {
3
+ const?: unknown;
4
+ title?: string;
5
+ };
2
6
  type EnumControlLike = {
3
7
  schema?: {
4
8
  enum?: unknown[];
5
- oneOf?: {
6
- const?: unknown;
7
- }[];
9
+ oneOf?: OneOfEnumSubschema[];
8
10
  };
9
11
  options?: EnumOption[];
10
12
  };
11
- export declare function getEnumValuesFromControl(control: EnumControlLike): unknown[];
13
+ export declare function enumLabelForConst(value: unknown): string;
14
+ export declare function getEnumOptionsFromControl(control: EnumControlLike): EnumOption[];
15
+ export declare function enumDisplayLabelForValue(data: unknown, options: EnumOption[]): string;
12
16
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uncharted.software/jsonforms-primevue",
3
- "version": "1.5.0",
3
+ "version": "1.6.0",
4
4
  "description": "Vue 3 renderer set for JSON Forms (jsonforms.io) using PrimeVue 4",
5
5
  "type": "module",
6
6
  "main": "dist/jsonforms-primevue.cjs",