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.
- package/lib/createWidget.d.ts +7 -14
- package/lib/createWidget.js.map +1 -1
- package/lib/models.d.ts +1 -1
- package/package.json +1 -1
- package/src/createWidget.tsx +2 -17
- package/src/models.ts +1 -1
package/lib/createWidget.d.ts
CHANGED
@@ -1,18 +1,11 @@
|
|
1
|
-
|
2
|
-
import
|
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:
|
13
|
-
Settings:
|
14
|
-
Description:
|
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
|
};
|
package/lib/createWidget.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"createWidget.js","sourceRoot":"","sources":["../src/createWidget.tsx"],"names":[],"mappings":";;;
|
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
|
-
|
78
|
+
displayName?: string;
|
79
79
|
name: string;
|
80
80
|
};
|
81
81
|
export declare type FormValue = {
|
package/package.json
CHANGED
package/src/createWidget.tsx
CHANGED
@@ -1,21 +1,6 @@
|
|
1
|
-
import {
|
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