graphql-form 0.0.20 → 0.0.21

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.
@@ -1,18 +1,11 @@
1
- import { PassedFormProps, CastToWidgetSettingsPassedForm } from "./models";
2
- import React from 'react';
3
- export declare function createWidget<Props>({ name, Component, Settings, Description, requirements, displayName, }: {
4
- name: string;
5
- displayName?: string;
6
- Component: React.FC<PassedFormProps<Props>>;
7
- Settings?: React.FC<CastToWidgetSettingsPassedForm<Props>>;
8
- Description?: React.FC;
9
- requirements: (props: PassedFormProps) => boolean;
10
- }): {
1
+ /// <reference types="react" />
2
+ import { WidgetType } from "./models";
3
+ export declare function createWidget<Props>({ name, Component, Settings, Description, requirements, displayName }: WidgetType): {
11
4
  displayName: string | undefined;
12
- Component: React.FC<PassedFormProps<Props>>;
13
- Settings: React.FC<CastToWidgetSettingsPassedForm<Props>> | undefined;
14
- Description: React.FC<{}> | undefined;
15
- requirements: (props: PassedFormProps) => boolean;
5
+ Component: import("react").FC<import("@/models").PassedFormProps<any>>;
6
+ Settings: import("react").FC<import("@/models").CastToWidgetSettingsPassedForm<any>> | undefined;
7
+ Description: import("react").FC<{}> | undefined;
8
+ requirements: (props: import("./models").PassedFormProps<any>) => boolean;
16
9
  props: Props;
17
10
  name: string;
18
11
  };
@@ -1 +1 @@
1
- {"version":3,"file":"createWidget.js","sourceRoot":"","sources":["../src/createWidget.tsx"],"names":[],"mappings":";;;AAGA,SAAgB,YAAY,CAAQ,EAcnC;QAbG,IAAI,UAAA,EACJ,SAAS,eAAA,EACT,QAAQ,cAAA,EACR,WAAW,iBAAA,EACX,YAAY,kBAAA,EACZ,WAAW,iBAAA;IASX,OAAO;QACH,WAAW,aAAA;QACX,SAAS,WAAA;QACT,QAAQ,UAAA;QACR,WAAW,aAAA;QACX,YAAY,cAAA;QACZ,KAAK,EAAE,EAAW;QAClB,IAAI,MAAA;KACP,CAAC;AACN,CAAC;AAxBD,oCAwBC"}
1
+ {"version":3,"file":"createWidget.js","sourceRoot":"","sources":["../src/createWidget.tsx"],"names":[],"mappings":";;;AAEA,SAAgB,YAAY,CAAQ,EAAiF;QAA/E,IAAI,UAAA,EAAE,SAAS,eAAA,EAAE,QAAQ,cAAA,EAAE,WAAW,iBAAA,EAAE,YAAY,kBAAA,EAAE,WAAW,iBAAA;IACnG,OAAO;QACH,WAAW,aAAA;QACX,SAAS,WAAA;QACT,QAAQ,UAAA;QACR,WAAW,aAAA;QACX,YAAY,cAAA;QACZ,KAAK,EAAE,EAAW;QAClB,IAAI,MAAA;KACP,CAAC;AACN,CAAC;AAVD,oCAUC"}
package/lib/models.d.ts CHANGED
@@ -75,7 +75,7 @@ export declare type WidgetType = {
75
75
  Settings: React.FC<CastToWidgetSettingsPassedForm> | undefined;
76
76
  Description?: React.FC;
77
77
  requirements: (props: PassedFormProps) => boolean;
78
- props?: ReturnedDictType;
78
+ displayName?: string;
79
79
  name: string;
80
80
  };
81
81
  export declare type FormValue = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "graphql-form",
3
- "version": "0.0.20",
3
+ "version": "0.0.21",
4
4
  "description": "Easy form creation with GraphQL Editor and React",
5
5
  "main": "lib/index.js",
6
6
  "scripts": {
@@ -1,21 +1,6 @@
1
- import { PassedFormProps, CastToWidgetSettingsPassedForm } from '@/models';
2
- import React from 'react';
1
+ import { WidgetType } from '@/models';
3
2
 
4
- export function createWidget<Props>({
5
- name,
6
- Component,
7
- Settings,
8
- Description,
9
- requirements,
10
- displayName,
11
- }: {
12
- name: string;
13
- displayName?: string;
14
- Component: React.FC<PassedFormProps<Props>>;
15
- Settings?: React.FC<CastToWidgetSettingsPassedForm<Props>>;
16
- Description?: React.FC;
17
- requirements: (props: PassedFormProps) => boolean;
18
- }) {
3
+ export function createWidget<Props>({ name, Component, Settings, Description, requirements, displayName }: WidgetType) {
19
4
  return {
20
5
  displayName,
21
6
  Component,
package/src/models.ts CHANGED
@@ -95,7 +95,7 @@ export type WidgetType = {
95
95
  Settings: React.FC<CastToWidgetSettingsPassedForm> | undefined;
96
96
  Description?: React.FC;
97
97
  requirements: (props: PassedFormProps) => boolean;
98
- props?: ReturnedDictType;
98
+ displayName?: string;
99
99
  name: string;
100
100
  };
101
101