@superblocksteam/library 2.0.6-next.98 → 2.0.6
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/{allPaths-DV_nqfgu.js → allPaths-CROgh4Wr.js} +2 -2
- package/dist/{allPaths-DV_nqfgu.js.map → allPaths-CROgh4Wr.js.map} +1 -1
- package/dist/{allPaths-Do8W1_hw.js → allPaths-Va1k8Bn4.js} +2 -2
- package/dist/{allPaths-Do8W1_hw.js.map → allPaths-Va1k8Bn4.js.map} +1 -1
- package/dist/{allPathsLoader-DZ4ej0yO.js → allPathsLoader-BJthmVkF.js} +3 -3
- package/dist/{allPathsLoader-BYPNQ715.js.map → allPathsLoader-BJthmVkF.js.map} +1 -1
- package/dist/{allPathsLoader-BYPNQ715.js → allPathsLoader-BdHvMdcd.js} +3 -3
- package/dist/{allPathsLoader-DZ4ej0yO.js.map → allPathsLoader-BdHvMdcd.js.map} +1 -1
- package/dist/{devtools-consolidated-Nb3opUCn.js → devtools-consolidated-Ck9KuyGf.js} +2 -2
- package/dist/{devtools-consolidated-Nb3opUCn.js.map → devtools-consolidated-Ck9KuyGf.js.map} +1 -1
- package/dist/{icons-lSlfQ50w.js → icons-NrNO8p_u.js} +14 -10
- package/dist/icons-NrNO8p_u.js.map +1 -0
- package/dist/{index-3q353Tib.js → index-CJuRwhWz.js} +17025 -19325
- package/dist/{index-3q353Tib.js.map → index-CJuRwhWz.js.map} +1 -1
- package/dist/index.js +149 -150
- package/dist/{splitPathsBySizeLoader-BSp5Jmf7.js → splitPathsBySizeLoader-3mcg6Jfx.js} +2 -2
- package/dist/{splitPathsBySizeLoader-BSp5Jmf7.js.map → splitPathsBySizeLoader-3mcg6Jfx.js.map} +1 -1
- package/dist/{splitPathsBySizeLoader-CtV8jbQy.js → splitPathsBySizeLoader-BFbna0L2.js} +2 -2
- package/dist/{splitPathsBySizeLoader-CtV8jbQy.js.map → splitPathsBySizeLoader-BFbna0L2.js.map} +1 -1
- package/dist-types/edit-mode/create-component.d.ts +1 -1
- package/dist-types/edit-mode/dnd/utils.d.ts +0 -4
- package/dist-types/edit-mode/features/properties-panel-manager.d.ts +1 -12
- package/dist-types/edit-mode/features/runtime-entities-manager.d.ts +22 -22
- package/dist-types/edit-mode/features/ui-store.d.ts +1 -1
- package/dist-types/edit-mode/iframe-wrappers.d.ts +0 -1
- package/dist-types/edit-mode/source-update-api.d.ts +0 -5
- package/dist-types/edit-mode/superblocks-editor-bridge.d.ts +1 -7
- package/dist-types/lib/index.d.ts +0 -1
- package/dist-types/lib/internal-details/actions-context.d.ts +1 -1
- package/dist-types/lib/internal-details/entities-state.d.ts +1 -2
- package/dist-types/lib/internal-details/is-sb-component.d.ts +1 -5
- package/dist-types/lib/internal-details/lib/evaluator/base-entity-manager.d.ts +27 -16
- package/dist-types/lib/internal-details/lib/evaluator/binding-strings/transform-bindings.d.ts +1 -1
- package/dist-types/lib/internal-details/lib/evaluator/compute-engines.d.ts +2 -3
- package/dist-types/lib/internal-details/lib/evaluator/create-global-object.d.ts +1 -1
- package/dist-types/lib/internal-details/lib/evaluator/create-scope-proxy.d.ts +2 -3
- package/dist-types/lib/internal-details/lib/evaluator/deep-observe.d.ts +2 -1
- package/dist-types/lib/internal-details/lib/evaluator/entity-manager.d.ts +7 -8
- package/dist-types/lib/internal-details/lib/evaluator/lazy-function.d.ts +1 -2
- package/dist-types/lib/internal-details/lib/evaluator/pretty-print-function.d.ts +2 -2
- package/dist-types/lib/internal-details/lib/evaluator/to-executables-or-values.d.ts +1 -2
- package/dist-types/lib/internal-details/lib/evaluator/use-shallow-mobx-observer.d.ts +1 -1
- package/dist-types/lib/internal-details/lib/features/component-registry.d.ts +1 -16
- package/dist-types/lib/internal-details/lib/root-store.d.ts +0 -2
- package/dist-types/lib/internal-details/lib/types.d.ts +1 -34
- package/dist-types/lib/internal-details/scope/global.d.ts +1 -1
- package/dist-types/lib/internal-details/scope/types.d.ts +2 -2
- package/dist-types/lib/sb-trigger.d.ts +48 -0
- package/dist-types/lib/triggers/base.d.ts +2 -1
- package/dist-types/lib/triggers/implementations/apis/cancel-apis.d.ts +8 -1
- package/dist-types/lib/triggers/implementations/apis/run-apis.d.ts +21 -3
- package/dist-types/lib/triggers/implementations/components/control-modal.d.ts +9 -3
- package/dist-types/lib/triggers/implementations/components/control-slideout.d.ts +10 -5
- package/dist-types/lib/triggers/implementations/components/reset-component.d.ts +9 -2
- package/dist-types/lib/triggers/implementations/components/set-component-property.d.ts +9 -2
- package/dist-types/lib/triggers/implementations/navigate/navigate-to-app.d.ts +13 -1
- package/dist-types/lib/triggers/implementations/navigate/navigate-to-route.d.ts +12 -1
- package/dist-types/lib/triggers/implementations/navigate/navigate-to.d.ts +9 -1
- package/dist-types/lib/triggers/implementations/navigate/set-query-params.d.ts +8 -2
- package/dist-types/lib/triggers/implementations/run-js.d.ts +8 -1
- package/dist-types/lib/triggers/implementations/set-profile.d.ts +7 -2
- package/dist-types/lib/triggers/implementations/show-alert.d.ts +12 -3
- package/dist-types/lib/triggers/implementations/state/reset-state-var.d.ts +9 -3
- package/dist-types/lib/triggers/implementations/state/set-state-var.d.ts +11 -4
- package/dist-types/lib/triggers/implementations/timers/control-timer.d.ts +9 -3
- package/dist-types/lib/triggers/implementations/trigger-event.d.ts +7 -1
- package/dist-types/lib/triggers/registry.d.ts +175 -4
- package/dist-types/lib/triggers/run-event-handlers.d.ts +2 -2
- package/dist-types/lib/user-facing/component-base/sb-component.d.ts +1 -5
- package/dist-types/lib/user-facing/components/button/index.d.ts +26 -26
- package/dist-types/lib/user-facing/components/button/props.d.ts +26 -26
- package/dist-types/lib/user-facing/components/checkbox/index.d.ts +31 -31
- package/dist-types/lib/user-facing/components/checkbox/props.d.ts +31 -31
- package/dist-types/lib/user-facing/components/column/index.d.ts +19 -19
- package/dist-types/lib/user-facing/components/column/props.d.ts +19 -19
- package/dist-types/lib/user-facing/components/container/index.d.ts +21 -21
- package/dist-types/lib/user-facing/components/container/props.d.ts +21 -21
- package/dist-types/lib/user-facing/components/custom/register-custom-component.d.ts +11 -14
- package/dist-types/lib/user-facing/components/date-picker/index.d.ts +48 -48
- package/dist-types/lib/user-facing/components/date-picker/props.d.ts +48 -48
- package/dist-types/lib/user-facing/components/dropdown/index.d.ts +54 -54
- package/dist-types/lib/user-facing/components/dropdown/props.d.ts +54 -54
- package/dist-types/lib/user-facing/components/dropdown/types.d.ts +2 -1
- package/dist-types/lib/user-facing/components/grid/index.d.ts +18 -20
- package/dist-types/lib/user-facing/components/grid/utils.d.ts +1 -0
- package/dist-types/lib/user-facing/components/icon/index.d.ts +13 -11
- package/dist-types/lib/user-facing/components/icon/props.d.ts +13 -11
- package/dist-types/lib/user-facing/components/image/index.d.ts +20 -20
- package/dist-types/lib/user-facing/components/image/props.d.ts +23 -23
- package/dist-types/lib/user-facing/components/input/index.d.ts +63 -63
- package/dist-types/lib/user-facing/components/input/input-component.d.ts +0 -1
- package/dist-types/lib/user-facing/components/input/props.d.ts +63 -63
- package/dist-types/lib/user-facing/components/key-value/properties-props.d.ts +21 -21
- package/dist-types/lib/user-facing/components/key-value/props.d.ts +27 -27
- package/dist-types/lib/user-facing/components/modal/index.d.ts +31 -27
- package/dist-types/lib/user-facing/components/modal/props.d.ts +27 -27
- package/dist-types/lib/user-facing/components/page/index.d.ts +13 -13
- package/dist-types/lib/user-facing/components/page/props.d.ts +13 -13
- package/dist-types/lib/user-facing/components/section/index.d.ts +16 -16
- package/dist-types/lib/user-facing/components/section/props.d.ts +16 -16
- package/dist-types/lib/user-facing/components/slideout/index.d.ts +1 -41
- package/dist-types/lib/user-facing/components/slideout/props.d.ts +19 -39
- package/dist-types/lib/user-facing/components/stack/index.d.ts +38 -38
- package/dist-types/lib/user-facing/components/switch/index.d.ts +32 -32
- package/dist-types/lib/user-facing/components/switch/props.d.ts +32 -32
- package/dist-types/lib/user-facing/components/table/column-properties-panel.d.ts +161 -262
- package/dist-types/lib/user-facing/components/table/components/table-header.d.ts +0 -1
- package/dist-types/lib/user-facing/components/table/index.d.ts +204 -305
- package/dist-types/lib/user-facing/components/table/props.d.ts +204 -305
- package/dist-types/lib/user-facing/components/table/table-component.d.ts +0 -1
- package/dist-types/lib/user-facing/components/table/table-utilities.d.ts +10 -7
- package/dist-types/lib/user-facing/components/table/table-widget.d.ts +6 -8
- package/dist-types/lib/user-facing/components/table/types.d.ts +32 -34
- package/dist-types/lib/user-facing/components/text/index.d.ts +35 -35
- package/dist-types/lib/user-facing/components/text/props.d.ts +35 -35
- package/dist-types/lib/user-facing/constants.d.ts +1 -1
- package/dist-types/lib/user-facing/entities/api/props.d.ts +11 -20
- package/dist-types/lib/user-facing/entities/timer/props.d.ts +12 -12
- package/dist-types/lib/user-facing/entities/variable/props.d.ts +7 -7
- package/dist-types/lib/user-facing/global-functions.d.ts +1 -2
- package/dist-types/lib/user-facing/internal-index.d.ts +1 -1
- package/dist-types/lib/user-facing/layers.d.ts +2 -1
- package/dist-types/lib/user-facing/properties-panel/create-managed-props-list.d.ts +0 -4
- package/dist-types/lib/user-facing/properties-panel/mixins/appearance-properties.d.ts +13 -13
- package/dist-types/lib/user-facing/properties-panel/mixins/appearance.d.ts +2 -2
- package/dist-types/lib/user-facing/properties-panel/mixins/form-inputs-properties.d.ts +10 -10
- package/dist-types/lib/user-facing/properties-panel/mixins/layout-section.d.ts +46 -46
- package/dist-types/lib/user-facing/properties-panel/mixins/loading.d.ts +1 -1
- package/dist-types/lib/user-facing/properties-panel/properties-panel-definition.d.ts +2 -1
- package/dist-types/lib/user-facing/properties-panel/props-builder.d.ts +13 -32
- package/dist-types/lib/user-facing/properties-panel/validators.d.ts +1 -1
- package/dist-types/lib/user-facing/sb-event-flow.d.ts +8 -6
- package/dist-types/lib/user-facing/sb-provider.d.ts +2 -1
- package/dist-types/lib/user-facing/state/create-bindable-entity-proxy.d.ts +2 -1
- package/dist-types/lib/user-facing/utils/notification.d.ts +2 -1
- package/package.json +3 -4
- package/dist/icons-lSlfQ50w.js.map +0 -1
- package/dist-types/edit-mode/vite.d.ts +0 -5
- package/dist-types/internal-testing/components/slideout.d.ts +0 -3
- package/dist-types/lib/internal-details/lib/evaluator/sanitize-object.d.ts +0 -6
- package/dist-types/lib/internal-details/lib/evaluator/suspense-helpers.d.ts +0 -8
- package/dist-types/lib/internal-details/location-store.d.ts +0 -18
- package/dist-types/lib/user-facing/build-manifest.d.ts +0 -2
- package/dist-types/lib/user-facing/components/slideout/constants.d.ts +0 -10
- package/dist-types/lib/user-facing/components/slideout/slideout-component.d.ts +0 -31
- package/dist-types/lib/user-facing/entities/api/suspensible-api.d.ts +0 -20
- package/dist-types/lib/user-facing/hooks/use-dialog-editing.d.ts +0 -14
|
@@ -1,17 +1,28 @@
|
|
|
1
|
+
import type { ObserveListener } from "./deep-observe.js";
|
|
1
2
|
import type { Name } from "./names.js";
|
|
2
3
|
import type { ValidateFn } from "../../../user-facing/properties-panel/validators.js";
|
|
3
4
|
import type { SbEventFlow } from "../../../user-facing/sb-event-flow.js";
|
|
4
|
-
import type {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
export type
|
|
9
|
-
export type
|
|
10
|
-
|
|
5
|
+
import type { BindingString, ComputedProperty } from "@superblocksteam/library-shared";
|
|
6
|
+
import type { SbElement, SbInstance, ValidationState } from "@superblocksteam/library-shared/types";
|
|
7
|
+
export type EntityOutputProp = Exclude<null | undefined | string | number | boolean | object | bigint | any[], BindingString | EntityDerivedProp<any[]>>;
|
|
8
|
+
export type EntityDerivedProp<ARGS extends any[] = any[]> = (this: Readonly<Entity>, state?: Readonly<ScopedState>, ...args: ARGS) => EntityOutputProp;
|
|
9
|
+
export type Executable<ARGS extends any[] = any[]> = (this: Entity, state?: ScopedState, ...args: ARGS) => void;
|
|
10
|
+
export type ValueInputProp<T = EntityOutputProp> = T | EntityDerivedProp | BindingString | ComputedProperty<T>;
|
|
11
|
+
export type SingleInputProp<T = EntityOutputProp> = ValueInputProp<T> | SbEventFlow;
|
|
12
|
+
export type NestedInputProp<T> = T extends object ? {
|
|
13
|
+
[K in keyof T]: SingleInputProp<T[K]> | NestedInputProp<T[K]>;
|
|
11
14
|
} : never;
|
|
12
|
-
export type InputProp<T = EntityOutputProp
|
|
13
|
-
export type EntityFunction<ARGS extends any[] = any[], R = EntityOutputProp> = (this: Entity, state: ScopedState, ...
|
|
15
|
+
export type InputProp<T = EntityOutputProp> = SingleInputProp<T> | NestedInputProp<T>;
|
|
16
|
+
export type EntityFunction<ARGS extends any[] = any[], R = EntityOutputProp> = (this: Entity, state: ScopedState, ...args: ARGS) => R;
|
|
17
|
+
export type EntityType = "global" | "theme" | "variable" | "api" | "timer" | (string & {});
|
|
18
|
+
export type Entity = {
|
|
19
|
+
[key: string]: EntityOutputProp;
|
|
20
|
+
type: EntityType;
|
|
21
|
+
};
|
|
14
22
|
export type ScopeId = string;
|
|
23
|
+
export type ScopedState = {
|
|
24
|
+
[key: string]: Entity | ScopedState;
|
|
25
|
+
};
|
|
15
26
|
export type InternalScope = {
|
|
16
27
|
id: string;
|
|
17
28
|
name?: string;
|
|
@@ -19,8 +30,8 @@ export type InternalScope = {
|
|
|
19
30
|
entityMeta: Record<string, Entity>;
|
|
20
31
|
childScopes: Record<ScopeId, InternalScope>;
|
|
21
32
|
idToName: Record<string, Name>;
|
|
22
|
-
getEntity(name: Name
|
|
23
|
-
getEntityMeta(name: Name
|
|
33
|
+
getEntity(name: Name): Entity;
|
|
34
|
+
getEntityMeta(name: Name): Entity;
|
|
24
35
|
getEntityName(id: string): Name;
|
|
25
36
|
setEntityName(id: string, name: Name, currentName?: Name): void;
|
|
26
37
|
};
|
|
@@ -28,9 +39,9 @@ export interface IEntityManager {
|
|
|
28
39
|
getFullState: Record<string, Entity>;
|
|
29
40
|
getValidationState: Record<string, ValidationState>;
|
|
30
41
|
getScopeName(scopeId: string): string;
|
|
31
|
-
getState(scopeId: string
|
|
32
|
-
getEntity(scopeId: string, name: Name
|
|
33
|
-
getEntityById(scopeId: string, id: SbInstance
|
|
42
|
+
getState(scopeId: string): ScopedState;
|
|
43
|
+
getEntity(scopeId: string, name: Name): Entity;
|
|
44
|
+
getEntityById(scopeId: string, id: SbInstance): Entity;
|
|
34
45
|
createScope(params: {
|
|
35
46
|
name?: string;
|
|
36
47
|
parentScopeId?: ScopeId;
|
|
@@ -79,11 +90,11 @@ export interface IEntityManager {
|
|
|
79
90
|
args?: ARGS;
|
|
80
91
|
excludeState?: boolean;
|
|
81
92
|
}): void;
|
|
82
|
-
computeValue<T
|
|
93
|
+
computeValue<T>(params: {
|
|
83
94
|
scopeId: ScopeId;
|
|
84
95
|
name: Name;
|
|
85
96
|
value: SingleInputProp<T>;
|
|
86
97
|
validator?: ValidateFn<T>;
|
|
87
|
-
args?: ARGS;
|
|
88
98
|
}): T;
|
|
99
|
+
observeScope(scopeId: string, listener: ObserveListener<InternalScope>): () => void;
|
|
89
100
|
}
|
package/dist-types/lib/internal-details/lib/evaluator/binding-strings/transform-bindings.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import type { EntityDerivedProp } from "../base-entity-manager.js";
|
|
1
2
|
import type { BindingString } from "@superblocksteam/library-shared";
|
|
2
|
-
import type { EntityDerivedProp } from "@superblocksteam/library-shared/types";
|
|
3
3
|
declare const transformBindings: (value: BindingString) => Function;
|
|
4
4
|
export declare const toEvalFunc: ([prop, binding]: [string, BindingString]) => [string, EntityDerivedProp];
|
|
5
5
|
export declare const stringToJS: (string: string) => string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import type { EntityDerivedProp, EntityOutputProp, ScopedState } from "./base-entity-manager.js";
|
|
1
2
|
import type { Name } from "./names.js";
|
|
2
|
-
import type { EntityDerivedProp, EntityOutputProp, ScopedState } from "@superblocksteam/library-shared/types";
|
|
3
3
|
export type ComputeParams<ARGS extends any[] = any[]> = {
|
|
4
4
|
snapshot: Readonly<ScopedState>;
|
|
5
5
|
entityName: Name;
|
|
@@ -13,8 +13,7 @@ export interface ComputeEngine {
|
|
|
13
13
|
}
|
|
14
14
|
declare class EvalComputeEngine implements ComputeEngine {
|
|
15
15
|
private statementFunction;
|
|
16
|
-
|
|
17
|
-
compute({ snapshot, entityName, func, args, path, excludeState, }: ComputeParams): any;
|
|
16
|
+
compute({ snapshot, entityName, func, args, path }: ComputeParams): any;
|
|
18
17
|
}
|
|
19
18
|
declare class DirectComputeEngine implements ComputeEngine {
|
|
20
19
|
compute({ snapshot, entityName, func, args, path, excludeState, }: ComputeParams): EntityOutputProp;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ScopedState } from "
|
|
1
|
+
import type { ScopedState } from "./base-entity-manager.js";
|
|
2
2
|
export declare const ARGS_VAR_NAME = "$SB_args";
|
|
3
3
|
export declare const USER_JS_CODE_VAR_NAME = "$SB_userJSCode";
|
|
4
4
|
export declare const SNAPSHOT_VAR_NAME = "$SB_snapshot";
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import type { InternalScope } from "./base-entity-manager.js";
|
|
2
|
-
|
|
3
|
-
export declare function createScopeProxy(scopes: InternalScope[], useSuspense?: boolean): ScopedState;
|
|
1
|
+
import type { ScopedState, InternalScope } from "./base-entity-manager.js";
|
|
2
|
+
export declare function createScopeProxy(scopes: InternalScope[]): ScopedState;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Entity } from "./base-entity-manager.js";
|
|
2
|
+
import type { DeepObserveChange } from "@superblocksteam/library-shared/types";
|
|
2
3
|
type IChange = DeepObserveChange;
|
|
3
4
|
type ChangeWithRelatedObject = IChange & {
|
|
4
5
|
relatedEntity?: Entity;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { type ValidationState, type SbElement, type SbInstance } from "@superblocksteam/library-shared/types";
|
|
2
2
|
import { type Name } from "./names.js";
|
|
3
|
-
import type { IEntityManager, SingleInputProp, InternalScope, ScopeId,
|
|
3
|
+
import type { IEntityManager, Executable, SingleInputProp, InternalScope, ScopedState, ScopeId, Entity, InputProp } from "./base-entity-manager.js";
|
|
4
|
+
import type { ObserveListener } from "./deep-observe.js";
|
|
4
5
|
import type { ValidateFn } from "../../../user-facing/properties-panel/validators.js";
|
|
5
6
|
import type { ComponentRegistry } from "../features/component-registry.js";
|
|
6
|
-
import type { Executable, Entity, ScopedState } from "@superblocksteam/library-shared/types";
|
|
7
7
|
export declare const GLOBAL_SCOPE_ID = "Global";
|
|
8
8
|
export declare class EntityManager implements IEntityManager {
|
|
9
9
|
readonly componentRegistry: ComponentRegistry;
|
|
@@ -15,9 +15,9 @@ export declare class EntityManager implements IEntityManager {
|
|
|
15
15
|
constructor(componentRegistry: ComponentRegistry, options?: {
|
|
16
16
|
devtools?: boolean;
|
|
17
17
|
});
|
|
18
|
-
getEntity(
|
|
19
|
-
getEntityById(scopeId: string, id: SbInstance
|
|
20
|
-
getState(scopeId: string
|
|
18
|
+
getEntity(ScopeId: string, name: Name): Entity;
|
|
19
|
+
getEntityById(scopeId: string, id: SbInstance): Entity;
|
|
20
|
+
getState(scopeId: string): ScopedState;
|
|
21
21
|
getScopeName(scopeId: string): string;
|
|
22
22
|
setValidationState(entityId: string, property: string, state: ValidationState): void;
|
|
23
23
|
get getValidationState(): Record<string, ValidationState>;
|
|
@@ -42,7 +42,6 @@ export declare class EntityManager implements IEntityManager {
|
|
|
42
42
|
sourceId?: SbElement;
|
|
43
43
|
}): Name;
|
|
44
44
|
private createEntityStructure;
|
|
45
|
-
private addInternalProperty;
|
|
46
45
|
private addProperty;
|
|
47
46
|
deleteEntity(params: {
|
|
48
47
|
name: Name;
|
|
@@ -84,12 +83,12 @@ export declare class EntityManager implements IEntityManager {
|
|
|
84
83
|
excludeState?: boolean;
|
|
85
84
|
args?: ARGS;
|
|
86
85
|
}): void;
|
|
87
|
-
computeValue<T
|
|
86
|
+
computeValue<T>(params: {
|
|
88
87
|
scopeId: ScopeId;
|
|
89
88
|
name: Name;
|
|
90
89
|
value: SingleInputProp<T>;
|
|
91
90
|
validator?: ValidateFn<T>;
|
|
92
|
-
args?: ARGS;
|
|
93
91
|
}): T;
|
|
94
92
|
private getOrCreateAtom;
|
|
93
|
+
observeScope(scopeId: string, listener: ObserveListener<InternalScope>): () => void;
|
|
95
94
|
}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { type ComputedArgs } from "@superblocksteam/library-shared";
|
|
2
1
|
declare const lazyFunctionSymbol: unique symbol;
|
|
3
2
|
export type LazyFunction = ((...args: unknown[]) => unknown) & {
|
|
4
3
|
[lazyFunctionSymbol]: true;
|
|
5
4
|
};
|
|
6
5
|
export declare const isLazyFunction: (value: unknown) => value is LazyFunction;
|
|
7
|
-
export declare const LazyFunction: (source: string, args?:
|
|
6
|
+
export declare const LazyFunction: (source: string, args?: string[]) => LazyFunction;
|
|
8
7
|
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { EntityDerivedProp } from "
|
|
2
|
-
export declare const prettyPrintFunction: (func: EntityDerivedProp, args: any[]
|
|
1
|
+
import type { EntityDerivedProp } from "./base-entity-manager.js";
|
|
2
|
+
export declare const prettyPrintFunction: (func: EntityDerivedProp, args: any[]) => string;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { SbEventFlow } from "../../../user-facing/sb-event-flow.js";
|
|
2
|
-
import type { SingleInputProp, InputProp, EntityFunction } from "./base-entity-manager.js";
|
|
2
|
+
import type { EntityDerivedProp, EntityOutputProp, SingleInputProp, InputProp, EntityFunction } from "./base-entity-manager.js";
|
|
3
3
|
import type { LazyFunction } from "./lazy-function.js";
|
|
4
4
|
import type { DataTypeString } from "@superblocksteam/library-shared/props";
|
|
5
|
-
import type { EntityDerivedProp, EntityOutputProp } from "@superblocksteam/library-shared/types";
|
|
6
5
|
type ExecutableType = "normal" | "mustache-bindings" | "external-function" | "event" | "lazy-function";
|
|
7
6
|
export type ExecutableOrValue = {
|
|
8
7
|
type: ExecutableType;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const useShallowMobxObserver: <T extends Record<string, unknown>>(obj: T
|
|
1
|
+
export declare const useShallowMobxObserver: <T extends Record<string, unknown>>(obj: T) => T;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ManagedPropsList
|
|
1
|
+
import type { ManagedPropsList } from "../../../user-facing/properties-panel/props-builder.js";
|
|
2
2
|
import type { RootStore } from "../root-store.js";
|
|
3
3
|
import type { ComponentRegistryShareState } from "@superblocksteam/library-shared/types";
|
|
4
4
|
import type * as React from "react";
|
|
@@ -7,14 +7,12 @@ export type Type = {
|
|
|
7
7
|
sbType: string;
|
|
8
8
|
isDroppable?: boolean;
|
|
9
9
|
hasExtendedClickArea?: boolean;
|
|
10
|
-
propertiesDefinition?: PropertiesDefinition;
|
|
11
10
|
} & React.ComponentType<any>;
|
|
12
11
|
export declare class ComponentRegistry implements ComponentRegistryShareState {
|
|
13
12
|
readonly rootStore: RootStore;
|
|
14
13
|
private _typeRegistry;
|
|
15
14
|
private _customComponentRegistry;
|
|
16
15
|
private _managedPropsRegistry;
|
|
17
|
-
private _internalPropsRegistry;
|
|
18
16
|
constructor(rootStore: RootStore);
|
|
19
17
|
addType(type: string, component: Type): void;
|
|
20
18
|
addCustomComponent(type: string, component: Type): void;
|
|
@@ -22,22 +20,9 @@ export declare class ComponentRegistry implements ComponentRegistryShareState {
|
|
|
22
20
|
renameCustomComponent(oldName: string, newName: string): void;
|
|
23
21
|
addManagedProps(type: string, props: ManagedPropsList): void;
|
|
24
22
|
deleteManagedProps(type: string): void;
|
|
25
|
-
addInternalProps(type: string, props: Array<{
|
|
26
|
-
path: string;
|
|
27
|
-
factory: () => any;
|
|
28
|
-
}>): void;
|
|
29
|
-
getInternalProps(type: string): Array<{
|
|
30
|
-
path: string;
|
|
31
|
-
factory: () => any;
|
|
32
|
-
}>;
|
|
33
23
|
get libraryComponentList(): string[];
|
|
34
24
|
get customComponentList(): string[];
|
|
35
25
|
get managedPropsRegistry(): Map<string, ManagedPropsList>;
|
|
36
26
|
getManagedProps(type: string): ManagedPropsList;
|
|
37
27
|
getComponent(type: string): Type | undefined;
|
|
38
|
-
/**
|
|
39
|
-
* Get the property path with the record identifier if it exists. For example,
|
|
40
|
-
* `columns.columnName.label` becomes `columns.*.label`, for record properties.
|
|
41
|
-
*/
|
|
42
|
-
getPropertyWithRecordIdentifier(type: string, path: string): string;
|
|
43
28
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { LocationStore } from "../location-store.js";
|
|
2
1
|
import ApiManager from "./features/api-store.js";
|
|
3
2
|
import { ComponentRegistry } from "./features/component-registry.js";
|
|
4
3
|
import { NameManager } from "./features/name-manager.js";
|
|
@@ -10,7 +9,6 @@ declare class RootStore {
|
|
|
10
9
|
entityManager: IEntityManager;
|
|
11
10
|
componentRegistry: ComponentRegistry;
|
|
12
11
|
editStore?: EditStore;
|
|
13
|
-
locationStore: LocationStore;
|
|
14
12
|
private editorRegisteredCallbacks;
|
|
15
13
|
private apisLoaded;
|
|
16
14
|
private pageScopeLoaded;
|
|
@@ -160,22 +160,11 @@ export type FromParentToChildMessageTypesMap = {
|
|
|
160
160
|
skipTriggerCreation?: boolean;
|
|
161
161
|
otherComponentsUpdates?: Record<SbElement, Record<string, PropertyInfo>>;
|
|
162
162
|
};
|
|
163
|
-
/**
|
|
164
|
-
* Request a route change in the child
|
|
165
|
-
*/
|
|
166
|
-
"route-change": {
|
|
167
|
-
route: string;
|
|
168
|
-
params?: Record<string, string>;
|
|
169
|
-
search?: Record<string, string>;
|
|
170
|
-
};
|
|
171
163
|
};
|
|
172
164
|
export type FromParentToChildMessageTypes = keyof FromParentToChildMessageTypesMap;
|
|
173
165
|
export type FromChildToParentMessageTypesMap = {
|
|
174
166
|
"sb-ready": void;
|
|
175
167
|
"iframe-action-batch": PayloadAction<unknown>[];
|
|
176
|
-
/**
|
|
177
|
-
* Navigate the parent window to a new URL
|
|
178
|
-
*/
|
|
179
168
|
"navigate-to": {
|
|
180
169
|
url: string;
|
|
181
170
|
newWindow?: boolean;
|
|
@@ -188,6 +177,7 @@ export type FromChildToParentMessageTypesMap = {
|
|
|
188
177
|
"sb-edit-operation-request": EditOperationPayload<EditOperationType>;
|
|
189
178
|
"client:selectWidgets": {
|
|
190
179
|
sourceIds: SbElement[];
|
|
180
|
+
selectingMultiple: boolean;
|
|
191
181
|
};
|
|
192
182
|
getDropTargetResult: {
|
|
193
183
|
offset: XYCoord;
|
|
@@ -234,31 +224,8 @@ export type FromChildToParentMessageTypesMap = {
|
|
|
234
224
|
message: any;
|
|
235
225
|
apiName: string;
|
|
236
226
|
};
|
|
237
|
-
/**
|
|
238
|
-
* Notify the parent of a route change
|
|
239
|
-
*/
|
|
240
|
-
"route-change": {
|
|
241
|
-
/**
|
|
242
|
-
* Uninterpolated route
|
|
243
|
-
* @example "/orders/:orderId"
|
|
244
|
-
*/
|
|
245
|
-
route: string;
|
|
246
|
-
/**
|
|
247
|
-
* Interpolated path
|
|
248
|
-
* @example "/orders/123"
|
|
249
|
-
*/
|
|
250
|
-
path: string;
|
|
251
|
-
/**
|
|
252
|
-
* Route parameters used
|
|
253
|
-
* @example { orderId: 123 }
|
|
254
|
-
*/
|
|
255
|
-
params: Record<string, unknown>;
|
|
256
|
-
};
|
|
257
227
|
undo: void;
|
|
258
228
|
redo: void;
|
|
259
|
-
"socket/error": {
|
|
260
|
-
message: string;
|
|
261
|
-
};
|
|
262
229
|
} & AppToEditorMessage<PropertiesPanelDefinition>;
|
|
263
230
|
export type FromChildToParentMessageTypes = keyof FromChildToParentMessageTypesMap;
|
|
264
231
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Global as GlobalType } from "./types.js";
|
|
2
|
-
import type { Theme as BaseTheme
|
|
2
|
+
import type { UserAccessibleTheme, Theme as BaseTheme } from "@superblocksteam/library-shared/types";
|
|
3
3
|
export declare const GlobalScope: import("react").FC<import("react").JSX.IntrinsicAttributes & {
|
|
4
4
|
children: React.ReactNode;
|
|
5
5
|
}>;
|
|
@@ -5,7 +5,7 @@ export declare const AppMode: {
|
|
|
5
5
|
readonly PREVIEW: "PREVIEW";
|
|
6
6
|
};
|
|
7
7
|
export type AppMode = (typeof AppMode)[keyof typeof AppMode];
|
|
8
|
-
export
|
|
8
|
+
export type Global = {
|
|
9
9
|
mode?: AppMode;
|
|
10
10
|
user?: User;
|
|
11
11
|
URL?: UrlState;
|
|
@@ -25,7 +25,7 @@ export interface Global {
|
|
|
25
25
|
id: string;
|
|
26
26
|
name: string;
|
|
27
27
|
};
|
|
28
|
-
}
|
|
28
|
+
};
|
|
29
29
|
type User = {
|
|
30
30
|
name: string;
|
|
31
31
|
email: string;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { ValidStepDef } from "./triggers/registry.js";
|
|
2
|
+
import type { TriggerStepType } from "@superblocksteam/library-shared/types";
|
|
3
|
+
type ApplicationScope = "APP" | "PAGE";
|
|
4
|
+
type WidgetTypes = string;
|
|
5
|
+
export type SelectedEventProps = {
|
|
6
|
+
id: string;
|
|
7
|
+
name: string;
|
|
8
|
+
scope?: ApplicationScope;
|
|
9
|
+
};
|
|
10
|
+
export type SelectedWidgetProps = {
|
|
11
|
+
id: string;
|
|
12
|
+
name: string;
|
|
13
|
+
type: WidgetTypes;
|
|
14
|
+
};
|
|
15
|
+
export type SelectedTimerProps = {
|
|
16
|
+
id: string;
|
|
17
|
+
name: string;
|
|
18
|
+
scope: ApplicationScope;
|
|
19
|
+
};
|
|
20
|
+
export interface BaseStepDef {
|
|
21
|
+
id: string;
|
|
22
|
+
type: TriggerStepType;
|
|
23
|
+
}
|
|
24
|
+
export type StepDef = {
|
|
25
|
+
id: string;
|
|
26
|
+
} | ValidStepDef;
|
|
27
|
+
export type RuntimeEventData = {
|
|
28
|
+
path: string;
|
|
29
|
+
stepDefs: StepDef[];
|
|
30
|
+
};
|
|
31
|
+
export type MultiStepDef = StepDef[];
|
|
32
|
+
export type ValidMultiStepDef = ValidStepDef[];
|
|
33
|
+
export type EventArg = {
|
|
34
|
+
id: string;
|
|
35
|
+
name: string;
|
|
36
|
+
};
|
|
37
|
+
export type EventDefinition = {
|
|
38
|
+
id: string;
|
|
39
|
+
name: string;
|
|
40
|
+
arguments: EventArg[];
|
|
41
|
+
onTrigger: MultiStepDef;
|
|
42
|
+
};
|
|
43
|
+
export type EventDefinitionLoose = Omit<EventDefinition, "onTrigger"> & {
|
|
44
|
+
onTrigger: unknown[];
|
|
45
|
+
};
|
|
46
|
+
export declare function isValidStepDef(step: unknown): step is ValidStepDef;
|
|
47
|
+
export declare function isValidMultiStepDef(steps: unknown[]): steps is ValidMultiStepDef;
|
|
48
|
+
export {};
|
|
@@ -2,7 +2,8 @@ import type { ScopeId } from "../internal-details/lib/evaluator/base-entity-mana
|
|
|
2
2
|
import type { Name } from "../internal-details/lib/evaluator/names.js";
|
|
3
3
|
import type { RootStore } from "../internal-details/lib/root-store.js";
|
|
4
4
|
import type { ApiV2ExecutionResponse } from "../internal-details/lib/types.js";
|
|
5
|
-
import type { BaseStepDef
|
|
5
|
+
import type { BaseStepDef } from "../sb-trigger.js";
|
|
6
|
+
import type { TriggerStepType } from "@superblocksteam/library-shared/types";
|
|
6
7
|
export interface ExecutionContext {
|
|
7
8
|
scopeId: ScopeId;
|
|
8
9
|
name: Name;
|
|
@@ -1,6 +1,13 @@
|
|
|
1
|
+
import { TriggerStepType } from "@superblocksteam/library-shared/types";
|
|
2
|
+
import type { BaseStepDef } from "../../../sb-trigger.js";
|
|
1
3
|
import type { SbEventFlow } from "../../../user-facing/sb-event-flow.js";
|
|
2
4
|
import type { ExecutionContext } from "../../base.js";
|
|
3
|
-
import type {
|
|
5
|
+
import type { SbApiWithFunctions } from "@superblocksteam/library-shared/types";
|
|
6
|
+
export interface CancelApisStep extends BaseStepDef {
|
|
7
|
+
type: typeof TriggerStepType.CANCEL_APIS;
|
|
8
|
+
apis: SbApiWithFunctions[];
|
|
9
|
+
onCancel?: SbEventFlow;
|
|
10
|
+
}
|
|
4
11
|
export declare const CancelApisTrigger: {
|
|
5
12
|
type: "cancelApi";
|
|
6
13
|
execute(_context: ExecutionContext, step: CancelApisStep): Promise<void>;
|
|
@@ -1,3 +1,21 @@
|
|
|
1
|
-
import type
|
|
2
|
-
import type {
|
|
3
|
-
|
|
1
|
+
import { TriggerStepType, type SbApiWithFunctions } from "@superblocksteam/library-shared/types";
|
|
2
|
+
import type { ApiV2ExecutionResponse } from "../../../internal-details/lib/types.js";
|
|
3
|
+
import type { BaseStepDef } from "../../../sb-trigger.js";
|
|
4
|
+
import type { SbEventFlow } from "../../../user-facing/sb-event-flow.js";
|
|
5
|
+
import type { ExecutionContext } from "../../base.js";
|
|
6
|
+
export interface RunApisStep extends BaseStepDef {
|
|
7
|
+
type: typeof TriggerStepType.RUN_APIS;
|
|
8
|
+
apis: SbApiWithFunctions[];
|
|
9
|
+
onSuccess?: SbEventFlow;
|
|
10
|
+
onError?: SbEventFlow;
|
|
11
|
+
}
|
|
12
|
+
export declare const RunApisTrigger: {
|
|
13
|
+
type: "executeApi";
|
|
14
|
+
execute(context: ExecutionContext, step: RunApisStep, onFinish?: (responses: PromiseSettledResult<ApiV2ExecutionResponse | undefined>[]) => void): Promise<void>;
|
|
15
|
+
create(apis: SbApiWithFunctions[], onSuccess?: SbEventFlow, onError?: SbEventFlow): {
|
|
16
|
+
type: "executeApi";
|
|
17
|
+
apis: SbApiWithFunctions[];
|
|
18
|
+
onSuccess: SbEventFlow | undefined;
|
|
19
|
+
onError: SbEventFlow | undefined;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
@@ -1,12 +1,18 @@
|
|
|
1
|
+
import { TriggerStepType } from "@superblocksteam/library-shared/types";
|
|
2
|
+
import type { BaseStepDef } from "../../../sb-trigger.js";
|
|
1
3
|
import type { ExecutionContext } from "../../base.js";
|
|
2
|
-
import type { ControlModalStep } from "@superblocksteam/library-shared/types";
|
|
3
4
|
import type { WithBindingIdentifier } from "@superblocksteam/library-shared/types";
|
|
5
|
+
export interface ControlModalStep extends BaseStepDef {
|
|
6
|
+
type: typeof TriggerStepType.CONTROL_MODAL;
|
|
7
|
+
name?: string;
|
|
8
|
+
direction: "open" | "close";
|
|
9
|
+
}
|
|
4
10
|
export declare const ControlModalTrigger: {
|
|
5
11
|
type: "controlModal";
|
|
6
12
|
execute(context: ExecutionContext, step: ControlModalStep): Promise<void>;
|
|
7
|
-
create(modal: WithBindingIdentifier,
|
|
13
|
+
create(modal: WithBindingIdentifier, direction: "open" | "close"): {
|
|
8
14
|
type: "controlModal";
|
|
9
15
|
name: string | undefined;
|
|
10
|
-
|
|
16
|
+
direction: "close" | "open";
|
|
11
17
|
};
|
|
12
18
|
};
|
|
@@ -1,12 +1,17 @@
|
|
|
1
|
+
import { TriggerStepType } from "@superblocksteam/library-shared/types";
|
|
2
|
+
import type { BaseStepDef } from "../../../sb-trigger.js";
|
|
1
3
|
import type { ExecutionContext } from "../../base.js";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
+
export interface ControlSlideoutStep extends BaseStepDef {
|
|
5
|
+
type: typeof TriggerStepType.CONTROL_SLIDEOUT;
|
|
6
|
+
name: string;
|
|
7
|
+
direction: "open" | "close";
|
|
8
|
+
}
|
|
4
9
|
export declare const ControlSlideoutTrigger: {
|
|
5
10
|
type: "controlSlideout";
|
|
6
11
|
execute(context: ExecutionContext, step: ControlSlideoutStep): Promise<void>;
|
|
7
|
-
create(
|
|
12
|
+
create(name: string, direction: "open" | "close"): {
|
|
8
13
|
type: "controlSlideout";
|
|
9
|
-
name: string
|
|
10
|
-
|
|
14
|
+
name: string;
|
|
15
|
+
direction: "close" | "open";
|
|
11
16
|
};
|
|
12
17
|
};
|
|
@@ -1,6 +1,13 @@
|
|
|
1
|
+
import { TriggerStepType } from "@superblocksteam/library-shared/types";
|
|
2
|
+
import type { ValueInputProp } from "../../../internal-details/lib/evaluator/base-entity-manager.js";
|
|
3
|
+
import type { BaseStepDef, SelectedWidgetProps } from "../../../sb-trigger.js";
|
|
1
4
|
import type { ExecutionContext } from "../../base.js";
|
|
2
|
-
|
|
3
|
-
|
|
5
|
+
export interface ResetComponentStep extends BaseStepDef {
|
|
6
|
+
type: typeof TriggerStepType.RESET_COMPONENT;
|
|
7
|
+
widget: SelectedWidgetProps;
|
|
8
|
+
propertyName: string;
|
|
9
|
+
resetChildren: ValueInputProp;
|
|
10
|
+
}
|
|
4
11
|
export declare const ResetComponentTrigger: {
|
|
5
12
|
type: "resetComponent";
|
|
6
13
|
execute(context: ExecutionContext, step: ResetComponentStep): Promise<void>;
|
|
@@ -1,6 +1,13 @@
|
|
|
1
|
+
import { TriggerStepType } from "@superblocksteam/library-shared/types";
|
|
2
|
+
import type { ValueInputProp } from "../../../internal-details/lib/evaluator/base-entity-manager.js";
|
|
3
|
+
import type { SelectedWidgetProps, BaseStepDef } from "../../../sb-trigger.js";
|
|
1
4
|
import type { ExecutionContext } from "../../base.js";
|
|
2
|
-
|
|
3
|
-
|
|
5
|
+
export interface SetComponentPropertyStep extends BaseStepDef {
|
|
6
|
+
type: typeof TriggerStepType.SET_COMPONENT_PROPERTY;
|
|
7
|
+
widget: SelectedWidgetProps;
|
|
8
|
+
propertyName: string;
|
|
9
|
+
propertyValue: ValueInputProp;
|
|
10
|
+
}
|
|
4
11
|
export declare const SetComponentPropertyTrigger: {
|
|
5
12
|
type: "setComponentProperty";
|
|
6
13
|
execute(context: ExecutionContext, step: SetComponentPropertyStep): Promise<void>;
|
|
@@ -1,5 +1,17 @@
|
|
|
1
|
+
import { TriggerStepType } from "@superblocksteam/library-shared/types";
|
|
2
|
+
import type { ValueInputProp } from "../../../internal-details/lib/evaluator/base-entity-manager.js";
|
|
3
|
+
import type { BaseStepDef } from "../../../sb-trigger.js";
|
|
1
4
|
import type { ExecutionContext } from "../../base.js";
|
|
2
|
-
|
|
5
|
+
export interface NavigateToAppStep extends BaseStepDef {
|
|
6
|
+
type: typeof TriggerStepType.NAVIGATE_TO_APP;
|
|
7
|
+
targetApp: {
|
|
8
|
+
name: string;
|
|
9
|
+
id: string;
|
|
10
|
+
url: string;
|
|
11
|
+
};
|
|
12
|
+
queryParams: ValueInputProp<Record<string, string>>;
|
|
13
|
+
newWindowApp: boolean;
|
|
14
|
+
}
|
|
3
15
|
export declare const NavigateToAppTrigger: {
|
|
4
16
|
type: "navigateToApp";
|
|
5
17
|
execute(_context: ExecutionContext, step: NavigateToAppStep): Promise<void>;
|
|
@@ -1,5 +1,16 @@
|
|
|
1
|
+
import { TriggerStepType } from "@superblocksteam/library-shared/types";
|
|
2
|
+
import type { ValueInputProp } from "../../../internal-details/lib/evaluator/base-entity-manager.js";
|
|
3
|
+
import type { BaseStepDef } from "../../../sb-trigger.js";
|
|
1
4
|
import type { ExecutionContext } from "../../base.js";
|
|
2
|
-
|
|
5
|
+
export interface NavigateToRouteStep extends BaseStepDef {
|
|
6
|
+
type: typeof TriggerStepType.NAVIGATE_TO_ROUTE;
|
|
7
|
+
routeId: string;
|
|
8
|
+
routePathDescriptor: string;
|
|
9
|
+
routeParams?: ValueInputProp<Record<string, string>>;
|
|
10
|
+
queryParams?: ValueInputProp<Record<string, string>>;
|
|
11
|
+
keepQueryParams?: boolean;
|
|
12
|
+
newWindow: boolean;
|
|
13
|
+
}
|
|
3
14
|
export declare const NavigateToRouteTrigger: {
|
|
4
15
|
type: "navigateToRoute";
|
|
5
16
|
execute(context: ExecutionContext, step: NavigateToRouteStep): Promise<void>;
|
|
@@ -1,5 +1,13 @@
|
|
|
1
|
+
import { TriggerStepType } from "@superblocksteam/library-shared/types";
|
|
2
|
+
import type { BaseStepDef } from "../../../sb-trigger.js";
|
|
1
3
|
import type { ExecutionContext } from "../../base.js";
|
|
2
|
-
|
|
4
|
+
export interface NavigateToStep extends BaseStepDef {
|
|
5
|
+
type: typeof TriggerStepType.NAVIGATE_TO;
|
|
6
|
+
url: string;
|
|
7
|
+
newWindow: boolean;
|
|
8
|
+
replaceHistory?: boolean;
|
|
9
|
+
arguments?: string;
|
|
10
|
+
}
|
|
3
11
|
export declare const NavigateToTrigger: {
|
|
4
12
|
type: "navigateTo";
|
|
5
13
|
execute(_context: ExecutionContext, step: NavigateToStep): Promise<void>;
|
|
@@ -1,6 +1,12 @@
|
|
|
1
|
+
import { TriggerStepType } from "@superblocksteam/library-shared/types";
|
|
2
|
+
import type { ValueInputProp } from "../../../internal-details/lib/evaluator/base-entity-manager.js";
|
|
3
|
+
import type { BaseStepDef } from "../../../sb-trigger.js";
|
|
1
4
|
import type { ExecutionContext } from "../../base.js";
|
|
2
|
-
|
|
3
|
-
|
|
5
|
+
export interface SetQueryParamsStep extends BaseStepDef {
|
|
6
|
+
type: typeof TriggerStepType.SET_QUERY_PARAMS;
|
|
7
|
+
queryParams?: Record<string, ValueInputProp<string>>;
|
|
8
|
+
keepQueryParams?: boolean;
|
|
9
|
+
}
|
|
4
10
|
export declare const SetQueryParamsTrigger: {
|
|
5
11
|
type: "setQueryParams";
|
|
6
12
|
execute(_context: ExecutionContext, step: SetQueryParamsStep): Promise<void>;
|
|
@@ -1,5 +1,12 @@
|
|
|
1
|
+
import { TriggerStepType } from "@superblocksteam/library-shared/types";
|
|
2
|
+
import type { Executable } from "../../internal-details/lib/evaluator/base-entity-manager.js";
|
|
3
|
+
import type { BaseStepDef } from "../../sb-trigger.js";
|
|
1
4
|
import type { ExecutionContext } from "../base.js";
|
|
2
|
-
|
|
5
|
+
export interface RunJsStep extends BaseStepDef {
|
|
6
|
+
type: typeof TriggerStepType.RUN_JS;
|
|
7
|
+
handler?: Executable;
|
|
8
|
+
code?: string;
|
|
9
|
+
}
|
|
3
10
|
export declare const RunJsTrigger: {
|
|
4
11
|
type: "runJs";
|
|
5
12
|
create(handler: Executable): {
|