@plasmicapp/react-web 0.2.402 → 0.2.403
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/all.d.ts +16 -2
- package/package.json +4 -4
package/dist/all.d.ts
CHANGED
|
@@ -11491,6 +11491,16 @@ interface GraphQLCore<Ctx extends any[]> {
|
|
|
11491
11491
|
method?: string | ContextDependentConfig<Ctx, string>;
|
|
11492
11492
|
headers?: object | ContextDependentConfig<Ctx, object>;
|
|
11493
11493
|
}
|
|
11494
|
+
/**
|
|
11495
|
+
* Dynamic prop/param type that returns different control types based on context
|
|
11496
|
+
*/
|
|
11497
|
+
interface DynamicCore<Ctx extends any[], ControlType> {
|
|
11498
|
+
type: "dynamic";
|
|
11499
|
+
/**
|
|
11500
|
+
* Function that takes the context and returns a control type
|
|
11501
|
+
*/
|
|
11502
|
+
control: ContextDependentConfig<Ctx, ControlType>;
|
|
11503
|
+
}
|
|
11494
11504
|
|
|
11495
11505
|
type Nullish<T> = T | null | undefined;
|
|
11496
11506
|
|
|
@@ -12147,8 +12157,10 @@ interface RichCustomType<P> extends PropTypeBaseDefault<P, any> {
|
|
|
12147
12157
|
control: CustomControl<P>;
|
|
12148
12158
|
}
|
|
12149
12159
|
type CustomType<P> = RichCustomType<P> | CustomControl<P>;
|
|
12160
|
+
interface DynamicType$1<P> extends PropTypeBase<ComponentControlContext<P>>, DynamicCore<ComponentControlContext<P>, PropType$1<P>> {
|
|
12161
|
+
}
|
|
12150
12162
|
type PrimitiveType<P = any> = Extract<StringType$1<P> | BooleanType$1<P> | NumberType$1<P> | JSONLikeType<P>, string>;
|
|
12151
|
-
type PropType$1<P> = StringType$1<P> | BooleanType$1<P> | GraphQLType$1<P> | NumberType$1<P> | JSONLikeType<P> | DataSourceType<P> | DataPickerType<P> | ExprEditorType<P> | FormValidationRulesType<P> | EventHandlerType<P> | ChoiceType$1<P> | CustomType<P> | ImageUrlType<P> | SlotType<P> | DateStringType$1<P> | DateRangeStringsType$1<P>;
|
|
12163
|
+
type PropType$1<P> = StringType$1<P> | BooleanType$1<P> | GraphQLType$1<P> | NumberType$1<P> | JSONLikeType<P> | DataSourceType<P> | DataPickerType<P> | ExprEditorType<P> | FormValidationRulesType<P> | EventHandlerType<P> | ChoiceType$1<P> | CustomType<P> | DynamicType$1<P> | ImageUrlType<P> | SlotType<P> | DateStringType$1<P> | DateRangeStringsType$1<P>;
|
|
12152
12164
|
type ArgType<P> = Exclude<PropType$1<P>, SlotType<P> | EventHandlerType<P>>;
|
|
12153
12165
|
type StringCompatType<P> = DateStringType$1<P> | StringType$1<P> | ChoiceType$1<P> | JSONLikeType<P> | ImageUrlType<P> | CustomType<P> | DataPickerType<P>;
|
|
12154
12166
|
type BoolCompatType<P> = BooleanType$1<P> | CustomType<P> | DataPickerType<P>;
|
|
@@ -12255,10 +12267,12 @@ interface CustomChoiceType<P, Opt extends ChoiceValue = ChoiceValue> extends Fun
|
|
|
12255
12267
|
type ChoiceType<P, T extends ChoiceValue = ChoiceValue> = SingleChoiceType<P, T> | MultiChoiceType<P, T> | CustomChoiceType<P, T>;
|
|
12256
12268
|
type DateStringType = BaseParam & DateStringCore;
|
|
12257
12269
|
type DateRangeStringsType = BaseParam & DateRangeStringsCore;
|
|
12270
|
+
interface DynamicType<P> extends BaseParam, DynamicCore<FunctionControlContext<ToTuple<P>>, ParamType<P, any>> {
|
|
12271
|
+
}
|
|
12258
12272
|
type RestrictedType<P, T> = IsAny<T> extends true ? AnyTyping<P, T> : [
|
|
12259
12273
|
T
|
|
12260
12274
|
] extends [string] ? StringType<P, T> : [T] extends [number] ? NumberType<P, T> : [T] extends [boolean] ? BooleanType<P, T> : T extends string | null | undefined ? Exclude<T, null | undefined> extends string ? StringType<P, T extends string ? T : string> : CommonType<P, T> : T extends number | null | undefined ? Exclude<T, null | undefined> extends number ? NumberType<P, T extends number ? T : number> : CommonType<P, T> : T extends boolean | null | undefined ? Exclude<T, null | undefined> extends boolean ? BooleanType<P, T extends boolean ? T : boolean> : CommonType<P, T> : CommonType<P, T>;
|
|
12261
|
-
type ParamType<P, T> = RestrictedType<P, T>;
|
|
12275
|
+
type ParamType<P, T> = RestrictedType<P, T> | DynamicType<P>;
|
|
12262
12276
|
type RequiredParam<P, T> = ParamType<P, T> & {
|
|
12263
12277
|
isOptional?: false;
|
|
12264
12278
|
isRestParameter?: false;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plasmicapp/react-web",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.403",
|
|
4
4
|
"description": "plasmic library for rendering in the presentational style",
|
|
5
5
|
"main": "dist/index.cjs.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -96,9 +96,9 @@
|
|
|
96
96
|
},
|
|
97
97
|
"dependencies": {
|
|
98
98
|
"@plasmicapp/auth-react": "0.0.23",
|
|
99
|
-
"@plasmicapp/data-sources": "0.1.
|
|
99
|
+
"@plasmicapp/data-sources": "0.1.190",
|
|
100
100
|
"@plasmicapp/data-sources-context": "0.1.22",
|
|
101
|
-
"@plasmicapp/host": "1.0.
|
|
101
|
+
"@plasmicapp/host": "1.0.226",
|
|
102
102
|
"@plasmicapp/loader-splits": "1.0.65",
|
|
103
103
|
"@plasmicapp/nextjs-app-router": "1.0.18",
|
|
104
104
|
"@plasmicapp/prepass": "1.0.20",
|
|
@@ -153,5 +153,5 @@
|
|
|
153
153
|
"react": ">=16.8.0",
|
|
154
154
|
"react-dom": ">=16.8.0"
|
|
155
155
|
},
|
|
156
|
-
"gitHead": "
|
|
156
|
+
"gitHead": "8c7b2566770ba6dbc181bd98a22cca50cc84c57e"
|
|
157
157
|
}
|