@plasmicapp/react-web 0.2.406 → 0.2.407
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 +52 -1
- package/package.json +4 -4
package/dist/all.d.ts
CHANGED
|
@@ -12206,6 +12206,56 @@ declare global {
|
|
|
12206
12206
|
}
|
|
12207
12207
|
}
|
|
12208
12208
|
|
|
12209
|
+
/**
|
|
12210
|
+
* Control type for building a custom query format.
|
|
12211
|
+
*
|
|
12212
|
+
* This control is based on react-awesome-query-builder
|
|
12213
|
+
* and returns data in JsonLogic format.
|
|
12214
|
+
*
|
|
12215
|
+
* If using this control type, it's recommended to install
|
|
12216
|
+
* @react-awesome-query-builder/core and json-logic-js as devDependencies
|
|
12217
|
+
* so that you can reference their types.
|
|
12218
|
+
*
|
|
12219
|
+
* References:
|
|
12220
|
+
* - https://github.com/ukrbublik/react-awesome-query-builder
|
|
12221
|
+
* - https://github.com/jwadhams/json-logic-js
|
|
12222
|
+
* - https://jsonlogic.com/
|
|
12223
|
+
*/
|
|
12224
|
+
interface QueryBuilderCore<Ctx extends any[]> {
|
|
12225
|
+
type: "queryBuilder";
|
|
12226
|
+
/**
|
|
12227
|
+
* Return a @react-awesome-query-builder/core `Config` that will be merged
|
|
12228
|
+
* with Plasmic's built-in config.
|
|
12229
|
+
*
|
|
12230
|
+
* https://github.com/plasmicapp/plasmic/blob/master/platform/wab/src/wab/client/components/QueryBuilder/QueryBuilderConfig.tsx
|
|
12231
|
+
*
|
|
12232
|
+
* At a minimum, this should return fields and their types.
|
|
12233
|
+
* For configuration options, see react-awesome-query-builder docs.
|
|
12234
|
+
*/
|
|
12235
|
+
config: ContextDependentConfig<Ctx, SimplifiedConfig>;
|
|
12236
|
+
}
|
|
12237
|
+
/**
|
|
12238
|
+
* A simplified subset of @react-awesome-query-builder/core `Config`.
|
|
12239
|
+
*/
|
|
12240
|
+
interface SimplifiedConfig {
|
|
12241
|
+
fields: SimplifiedFields;
|
|
12242
|
+
}
|
|
12243
|
+
/**
|
|
12244
|
+
* A simplified subset of @react-awesome-query-builder/core `Fields`.
|
|
12245
|
+
*/
|
|
12246
|
+
interface SimplifiedFields {
|
|
12247
|
+
[key: string]: SimplifiedField;
|
|
12248
|
+
}
|
|
12249
|
+
/**
|
|
12250
|
+
* A simplified subset of @react-awesome-query-builder/core `FieldOrGroup`.
|
|
12251
|
+
*/
|
|
12252
|
+
interface SimplifiedField {
|
|
12253
|
+
type: "text" | "number" | "boolean" | "date" | "time" | "datetime" | "select" | "multiselect" | "treeselect" | "treemultiselect" | string;
|
|
12254
|
+
label?: string;
|
|
12255
|
+
defaultValue?: unknown;
|
|
12256
|
+
fieldSettings?: {};
|
|
12257
|
+
}
|
|
12258
|
+
|
|
12209
12259
|
type FunctionControlContext<P> = GenericContext<Partial<P>, // Partial function props
|
|
12210
12260
|
any>;
|
|
12211
12261
|
type FunctionContextConfig<Args extends any[], R> = ContextDependentConfig<FunctionControlContext<Args>, R>;
|
|
@@ -12242,6 +12292,7 @@ interface PlainUndefinedType extends BaseParam {
|
|
|
12242
12292
|
type UndefinedType = PlainUndefinedType | AnyType;
|
|
12243
12293
|
type ObjectType<P> = BaseParam & ObjectTypeBaseCore<FunctionControlContext<P>, AnyTyping<P, any>>;
|
|
12244
12294
|
type ArrayType<P> = BaseParam & ArrayTypeBaseCore<FunctionControlContext<P>, AnyTyping<P, any>>;
|
|
12295
|
+
type QueryBuilderType<P> = BaseParam & QueryBuilderCore<FunctionControlContext<P>>;
|
|
12245
12296
|
interface PlainAnyType extends BaseParam {
|
|
12246
12297
|
type: "any";
|
|
12247
12298
|
}
|
|
@@ -12272,7 +12323,7 @@ interface DynamicType<P> extends BaseParam, DynamicCore<FunctionControlContext<T
|
|
|
12272
12323
|
type RestrictedType<P, T> = IsAny<T> extends true ? AnyTyping<P, T> : [
|
|
12273
12324
|
T
|
|
12274
12325
|
] 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>;
|
|
12275
|
-
type ParamType<P, T> = RestrictedType<P, T> | DynamicType<P>;
|
|
12326
|
+
type ParamType<P, T> = RestrictedType<P, T> | DynamicType<P> | QueryBuilderType<P>;
|
|
12276
12327
|
type RequiredParam<P, T> = ParamType<P, T> & {
|
|
12277
12328
|
isOptional?: false;
|
|
12278
12329
|
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.407",
|
|
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.24",
|
|
99
|
-
"@plasmicapp/data-sources": "0.1.
|
|
99
|
+
"@plasmicapp/data-sources": "0.1.192",
|
|
100
100
|
"@plasmicapp/data-sources-context": "0.1.22",
|
|
101
|
-
"@plasmicapp/host": "1.0.
|
|
101
|
+
"@plasmicapp/host": "1.0.228",
|
|
102
102
|
"@plasmicapp/loader-splits": "1.0.66",
|
|
103
103
|
"@plasmicapp/nextjs-app-router": "1.0.19",
|
|
104
104
|
"@plasmicapp/prepass": "1.0.21",
|
|
@@ -153,5 +153,5 @@
|
|
|
153
153
|
"react": ">=16.8.0",
|
|
154
154
|
"react-dom": ">=16.8.0"
|
|
155
155
|
},
|
|
156
|
-
"gitHead": "
|
|
156
|
+
"gitHead": "8df40eebbc118bfe5537f29e66eb0f6a2e6b2f90"
|
|
157
157
|
}
|