@bsol-oss/react-datatable5 13.0.1-beta.24 → 13.0.1-beta.26

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/dist/index.d.ts CHANGED
@@ -587,11 +587,11 @@ interface LoadInitialValuesResult {
587
587
  };
588
588
  idMap: Record<string, object>;
589
589
  }
590
- interface CustomJSONSchema7 extends JSONSchema7 {
590
+ interface CustomJSONSchema7 extends Omit<JSONSchema7, 'items' | 'additionalItems' | 'properties' | 'additionalProperties' | 'definitions' | 'patternProperties' | 'dependencies' | 'allOf' | 'anyOf' | 'oneOf' | 'not' | 'if' | 'then' | 'else' | 'contains'> {
591
591
  gridColumn?: string;
592
592
  gridRow?: string;
593
593
  customQueryFn?: CustomQueryFn;
594
- variant?: string;
594
+ variant?: 'custom-input' | 'id-picker' | 'text-area' | 'media-library-browser' | 'tag-picker' | 'file-picker' | 'date-range' | 'enum-picker';
595
595
  renderDisplay?: (item: unknown) => ReactNode;
596
596
  itemToValue?: (item: unknown) => string;
597
597
  loadInitialValues?: (params: LoadInitialValuesParams) => Promise<LoadInitialValuesResult>;
@@ -643,6 +643,29 @@ interface CustomJSONSchema7 extends JSONSchema7 {
643
643
  };
644
644
  showTimezoneSelector?: boolean;
645
645
  };
646
+ items?: CustomJSONSchema7 | CustomJSONSchema7[];
647
+ additionalItems?: CustomJSONSchema7;
648
+ properties?: {
649
+ [key: string]: CustomJSONSchema7;
650
+ };
651
+ additionalProperties?: boolean | CustomJSONSchema7;
652
+ definitions?: {
653
+ [key: string]: CustomJSONSchema7;
654
+ };
655
+ patternProperties?: {
656
+ [key: string]: CustomJSONSchema7;
657
+ };
658
+ dependencies?: {
659
+ [key: string]: CustomJSONSchema7 | string[];
660
+ };
661
+ allOf?: CustomJSONSchema7[];
662
+ anyOf?: CustomJSONSchema7[];
663
+ oneOf?: CustomJSONSchema7[];
664
+ not?: CustomJSONSchema7;
665
+ if?: CustomJSONSchema7;
666
+ then?: CustomJSONSchema7;
667
+ else?: CustomJSONSchema7;
668
+ contains?: CustomJSONSchema7;
646
669
  }
647
670
  declare const defaultRenderDisplay: (item: unknown) => ReactNode;
648
671
  interface TagPickerProps {
@@ -767,7 +790,7 @@ interface Translate {
767
790
  }
768
791
  interface UseFormProps {
769
792
  preLoadedValues?: FieldValues | undefined;
770
- schema?: JSONSchema7;
793
+ schema?: CustomJSONSchema7;
771
794
  }
772
795
  declare const useForm: ({ preLoadedValues, schema }: UseFormProps) => {
773
796
  form: react_hook_form.UseFormReturn<FieldValues, any, undefined>;
@@ -81,11 +81,11 @@ export interface LoadInitialValuesResult {
81
81
  };
82
82
  idMap: Record<string, object>;
83
83
  }
84
- export interface CustomJSONSchema7 extends JSONSchema7 {
84
+ export interface CustomJSONSchema7 extends Omit<JSONSchema7, 'items' | 'additionalItems' | 'properties' | 'additionalProperties' | 'definitions' | 'patternProperties' | 'dependencies' | 'allOf' | 'anyOf' | 'oneOf' | 'not' | 'if' | 'then' | 'else' | 'contains'> {
85
85
  gridColumn?: string;
86
86
  gridRow?: string;
87
87
  customQueryFn?: CustomQueryFn;
88
- variant?: string;
88
+ variant?: 'custom-input' | 'id-picker' | 'text-area' | 'media-library-browser' | 'tag-picker' | 'file-picker' | 'date-range' | 'enum-picker';
89
89
  renderDisplay?: (item: unknown) => ReactNode;
90
90
  itemToValue?: (item: unknown) => string;
91
91
  loadInitialValues?: (params: LoadInitialValuesParams) => Promise<LoadInitialValuesResult>;
@@ -137,6 +137,29 @@ export interface CustomJSONSchema7 extends JSONSchema7 {
137
137
  };
138
138
  showTimezoneSelector?: boolean;
139
139
  };
140
+ items?: CustomJSONSchema7 | CustomJSONSchema7[];
141
+ additionalItems?: CustomJSONSchema7;
142
+ properties?: {
143
+ [key: string]: CustomJSONSchema7;
144
+ };
145
+ additionalProperties?: boolean | CustomJSONSchema7;
146
+ definitions?: {
147
+ [key: string]: CustomJSONSchema7;
148
+ };
149
+ patternProperties?: {
150
+ [key: string]: CustomJSONSchema7;
151
+ };
152
+ dependencies?: {
153
+ [key: string]: CustomJSONSchema7 | string[];
154
+ };
155
+ allOf?: CustomJSONSchema7[];
156
+ anyOf?: CustomJSONSchema7[];
157
+ oneOf?: CustomJSONSchema7[];
158
+ not?: CustomJSONSchema7;
159
+ if?: CustomJSONSchema7;
160
+ then?: CustomJSONSchema7;
161
+ else?: CustomJSONSchema7;
162
+ contains?: CustomJSONSchema7;
140
163
  }
141
164
  export declare const defaultRenderDisplay: (item: unknown) => ReactNode;
142
165
  export interface TagPickerProps {
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
- import { JSONSchema7 } from 'json-schema';
3
2
  import { FieldValues } from 'react-hook-form';
3
+ import { CustomJSONSchema7 } from './components/types/CustomJSONSchema7';
4
4
  export interface Translate {
5
5
  t: (key: string, options?: any) => string;
6
6
  i18n?: any;
@@ -8,7 +8,7 @@ export interface Translate {
8
8
  }
9
9
  export interface UseFormProps {
10
10
  preLoadedValues?: FieldValues | undefined;
11
- schema?: JSONSchema7;
11
+ schema?: CustomJSONSchema7;
12
12
  }
13
13
  export declare const useForm: ({ preLoadedValues, schema }: UseFormProps) => {
14
14
  form: import("react-hook-form").UseFormReturn<FieldValues, any, undefined>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bsol-oss/react-datatable5",
3
- "version": "13.0.1-beta.24",
3
+ "version": "13.0.1-beta.26",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",