@superblocksteam/library 2.0.6 → 2.0.7
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-CROgh4Wr.js → allPaths-Boby_CDT.js} +2 -2
- package/dist/{allPaths-CROgh4Wr.js.map → allPaths-Boby_CDT.js.map} +1 -1
- package/dist/{allPaths-Va1k8Bn4.js → allPaths-d63_pjlB.js} +2 -2
- package/dist/{allPaths-Va1k8Bn4.js.map → allPaths-d63_pjlB.js.map} +1 -1
- package/dist/{allPathsLoader-BdHvMdcd.js → allPathsLoader-CmUnKzK9.js} +3 -3
- package/dist/{allPathsLoader-BdHvMdcd.js.map → allPathsLoader-CmUnKzK9.js.map} +1 -1
- package/dist/{allPathsLoader-BJthmVkF.js → allPathsLoader-DyTMsYjm.js} +3 -3
- package/dist/{allPathsLoader-BJthmVkF.js.map → allPathsLoader-DyTMsYjm.js.map} +1 -1
- package/dist/{devtools-consolidated-Ck9KuyGf.js → devtools-consolidated-B3U5EpYG.js} +2 -2
- package/dist/{devtools-consolidated-Ck9KuyGf.js.map → devtools-consolidated-B3U5EpYG.js.map} +1 -1
- package/dist/{icons-NrNO8p_u.js → icons-lSlfQ50w.js} +10 -14
- package/dist/icons-lSlfQ50w.js.map +1 -0
- package/dist/{index-CJuRwhWz.js → index-NrZGBHks.js} +19419 -17119
- package/dist/{index-CJuRwhWz.js.map → index-NrZGBHks.js.map} +1 -1
- package/dist/index.js +150 -149
- package/dist/{splitPathsBySizeLoader-3mcg6Jfx.js → splitPathsBySizeLoader-B6CeEPjz.js} +2 -2
- package/dist/{splitPathsBySizeLoader-3mcg6Jfx.js.map → splitPathsBySizeLoader-B6CeEPjz.js.map} +1 -1
- package/dist/{splitPathsBySizeLoader-BFbna0L2.js → splitPathsBySizeLoader-mTPqVWRR.js} +2 -2
- package/dist/{splitPathsBySizeLoader-BFbna0L2.js.map → splitPathsBySizeLoader-mTPqVWRR.js.map} +1 -1
- package/dist-types/edit-mode/create-component.d.ts +1 -1
- package/dist-types/edit-mode/dnd/utils.d.ts +4 -0
- package/dist-types/edit-mode/features/properties-panel-manager.d.ts +12 -1
- 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 +1 -0
- package/dist-types/edit-mode/source-update-api.d.ts +5 -0
- package/dist-types/edit-mode/superblocks-editor-bridge.d.ts +7 -1
- package/dist-types/edit-mode/vite.d.ts +5 -0
- package/dist-types/internal-testing/components/slideout.d.ts +3 -0
- package/dist-types/lib/index.d.ts +1 -0
- package/dist-types/lib/internal-details/actions-context.d.ts +1 -1
- package/dist-types/lib/internal-details/entities-state.d.ts +2 -1
- package/dist-types/lib/internal-details/is-sb-component.d.ts +5 -1
- package/dist-types/lib/internal-details/lib/evaluator/base-entity-manager.d.ts +16 -27
- 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 +3 -2
- 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 +3 -2
- package/dist-types/lib/internal-details/lib/evaluator/deep-observe.d.ts +1 -2
- package/dist-types/lib/internal-details/lib/evaluator/entity-manager.d.ts +8 -7
- package/dist-types/lib/internal-details/lib/evaluator/lazy-function.d.ts +2 -1
- package/dist-types/lib/internal-details/lib/evaluator/pretty-print-function.d.ts +2 -2
- package/dist-types/lib/internal-details/lib/evaluator/sanitize-object.d.ts +6 -0
- package/dist-types/lib/internal-details/lib/evaluator/suspense-helpers.d.ts +8 -0
- package/dist-types/lib/internal-details/lib/evaluator/to-executables-or-values.d.ts +2 -1
- 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 +16 -1
- package/dist-types/lib/internal-details/lib/root-store.d.ts +2 -0
- package/dist-types/lib/internal-details/lib/types.d.ts +34 -1
- package/dist-types/lib/internal-details/location-store.d.ts +18 -0
- 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/triggers/base.d.ts +1 -2
- package/dist-types/lib/triggers/implementations/apis/cancel-apis.d.ts +1 -8
- package/dist-types/lib/triggers/implementations/apis/run-apis.d.ts +3 -21
- package/dist-types/lib/triggers/implementations/components/control-modal.d.ts +3 -9
- package/dist-types/lib/triggers/implementations/components/control-slideout.d.ts +5 -10
- package/dist-types/lib/triggers/implementations/components/reset-component.d.ts +2 -9
- package/dist-types/lib/triggers/implementations/components/set-component-property.d.ts +2 -9
- package/dist-types/lib/triggers/implementations/navigate/navigate-to-app.d.ts +1 -13
- package/dist-types/lib/triggers/implementations/navigate/navigate-to-route.d.ts +1 -12
- package/dist-types/lib/triggers/implementations/navigate/navigate-to.d.ts +1 -9
- package/dist-types/lib/triggers/implementations/navigate/set-query-params.d.ts +2 -8
- package/dist-types/lib/triggers/implementations/run-js.d.ts +1 -8
- package/dist-types/lib/triggers/implementations/set-profile.d.ts +2 -7
- package/dist-types/lib/triggers/implementations/show-alert.d.ts +3 -12
- package/dist-types/lib/triggers/implementations/state/reset-state-var.d.ts +3 -9
- package/dist-types/lib/triggers/implementations/state/set-state-var.d.ts +4 -11
- package/dist-types/lib/triggers/implementations/timers/control-timer.d.ts +3 -9
- package/dist-types/lib/triggers/implementations/trigger-event.d.ts +1 -7
- package/dist-types/lib/triggers/registry.d.ts +4 -175
- package/dist-types/lib/triggers/run-event-handlers.d.ts +2 -2
- package/dist-types/lib/user-facing/build-manifest.d.ts +2 -0
- package/dist-types/lib/user-facing/component-base/sb-component.d.ts +5 -1
- 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 +14 -11
- 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 +1 -2
- package/dist-types/lib/user-facing/components/grid/index.d.ts +20 -18
- package/dist-types/lib/user-facing/components/icon/index.d.ts +11 -13
- package/dist-types/lib/user-facing/components/icon/props.d.ts +11 -13
- 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 +1 -0
- 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 +27 -31
- 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/constants.d.ts +10 -0
- package/dist-types/lib/user-facing/components/slideout/index.d.ts +41 -1
- package/dist-types/lib/user-facing/components/slideout/props.d.ts +39 -19
- package/dist-types/lib/user-facing/components/slideout/slideout-component.d.ts +31 -0
- 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 +262 -161
- package/dist-types/lib/user-facing/components/table/components/table-header.d.ts +1 -0
- package/dist-types/lib/user-facing/components/table/index.d.ts +305 -204
- package/dist-types/lib/user-facing/components/table/props.d.ts +305 -204
- package/dist-types/lib/user-facing/components/table/table-component.d.ts +1 -0
- package/dist-types/lib/user-facing/components/table/table-utilities.d.ts +7 -10
- package/dist-types/lib/user-facing/components/table/table-widget.d.ts +8 -6
- package/dist-types/lib/user-facing/components/table/types.d.ts +34 -32
- 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 +20 -11
- package/dist-types/lib/user-facing/entities/api/suspensible-api.d.ts +20 -0
- 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 +2 -1
- package/dist-types/lib/user-facing/hooks/use-dialog-editing.d.ts +14 -0
- package/dist-types/lib/user-facing/internal-index.d.ts +1 -1
- package/dist-types/lib/user-facing/layers.d.ts +1 -2
- package/dist-types/lib/user-facing/properties-panel/create-managed-props-list.d.ts +4 -0
- 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 +1 -2
- package/dist-types/lib/user-facing/properties-panel/props-builder.d.ts +32 -13
- package/dist-types/lib/user-facing/properties-panel/validators.d.ts +1 -1
- package/dist-types/lib/user-facing/sb-event-flow.d.ts +6 -8
- package/dist-types/lib/user-facing/sb-provider.d.ts +1 -2
- package/dist-types/lib/user-facing/state/create-bindable-entity-proxy.d.ts +1 -2
- package/dist-types/lib/user-facing/utils/notification.d.ts +1 -2
- package/package.json +4 -3
- package/dist/icons-NrNO8p_u.js.map +0 -1
- package/dist-types/lib/sb-trigger.d.ts +0 -48
- package/dist-types/lib/user-facing/components/grid/utils.d.ts +0 -1
|
@@ -1,28 +1,17 @@
|
|
|
1
|
-
import type { ObserveListener } from "./deep-observe.js";
|
|
2
1
|
import type { Name } from "./names.js";
|
|
3
2
|
import type { ValidateFn } from "../../../user-facing/properties-panel/validators.js";
|
|
4
3
|
import type { SbEventFlow } from "../../../user-facing/sb-event-flow.js";
|
|
5
|
-
import type {
|
|
6
|
-
|
|
7
|
-
|
|
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]>;
|
|
14
|
-
} : never;
|
|
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;
|
|
4
|
+
import type { Executable, SbElement, SbInstance, ValidationState, EntityOutputProp, Entity, ScopedState, ValueInputProp } from "@superblocksteam/library-shared/types";
|
|
5
|
+
export type GetterOptions = {
|
|
6
|
+
useSuspense?: boolean;
|
|
21
7
|
};
|
|
8
|
+
export type SingleInputProp<T = EntityOutputProp, ARGS extends any[] = any[]> = ValueInputProp<T, ARGS> | SbEventFlow;
|
|
9
|
+
export type NestedInputProp<T, ARGS extends any[] = any[]> = T extends object ? {
|
|
10
|
+
[K in keyof T]: SingleInputProp<T[K], ARGS> | NestedInputProp<T[K], ARGS>;
|
|
11
|
+
} : never;
|
|
12
|
+
export type InputProp<T = EntityOutputProp, ARGS extends any[] = any[]> = SingleInputProp<T, ARGS> | NestedInputProp<T, ARGS>;
|
|
13
|
+
export type EntityFunction<ARGS extends any[] = any[], R = EntityOutputProp> = (this: Entity, state: ScopedState, ...ARGS: ARGS) => R;
|
|
22
14
|
export type ScopeId = string;
|
|
23
|
-
export type ScopedState = {
|
|
24
|
-
[key: string]: Entity | ScopedState;
|
|
25
|
-
};
|
|
26
15
|
export type InternalScope = {
|
|
27
16
|
id: string;
|
|
28
17
|
name?: string;
|
|
@@ -30,8 +19,8 @@ export type InternalScope = {
|
|
|
30
19
|
entityMeta: Record<string, Entity>;
|
|
31
20
|
childScopes: Record<ScopeId, InternalScope>;
|
|
32
21
|
idToName: Record<string, Name>;
|
|
33
|
-
getEntity(name: Name): Entity;
|
|
34
|
-
getEntityMeta(name: Name): Entity;
|
|
22
|
+
getEntity(name: Name, options?: GetterOptions): Entity;
|
|
23
|
+
getEntityMeta(name: Name, options?: GetterOptions): Entity;
|
|
35
24
|
getEntityName(id: string): Name;
|
|
36
25
|
setEntityName(id: string, name: Name, currentName?: Name): void;
|
|
37
26
|
};
|
|
@@ -39,9 +28,9 @@ export interface IEntityManager {
|
|
|
39
28
|
getFullState: Record<string, Entity>;
|
|
40
29
|
getValidationState: Record<string, ValidationState>;
|
|
41
30
|
getScopeName(scopeId: string): string;
|
|
42
|
-
getState(scopeId: string): ScopedState;
|
|
43
|
-
getEntity(scopeId: string, name: Name): Entity;
|
|
44
|
-
getEntityById(scopeId: string, id: SbInstance): Entity;
|
|
31
|
+
getState(scopeId: string, options?: GetterOptions): ScopedState;
|
|
32
|
+
getEntity(scopeId: string, name: Name, options?: GetterOptions): Entity;
|
|
33
|
+
getEntityById(scopeId: string, id: SbInstance, options?: GetterOptions): Entity;
|
|
45
34
|
createScope(params: {
|
|
46
35
|
name?: string;
|
|
47
36
|
parentScopeId?: ScopeId;
|
|
@@ -90,11 +79,11 @@ export interface IEntityManager {
|
|
|
90
79
|
args?: ARGS;
|
|
91
80
|
excludeState?: boolean;
|
|
92
81
|
}): void;
|
|
93
|
-
computeValue<T>(params: {
|
|
82
|
+
computeValue<T, ARGS extends any[] = any[]>(params: {
|
|
94
83
|
scopeId: ScopeId;
|
|
95
84
|
name: Name;
|
|
96
85
|
value: SingleInputProp<T>;
|
|
97
86
|
validator?: ValidateFn<T>;
|
|
87
|
+
args?: ARGS;
|
|
98
88
|
}): T;
|
|
99
|
-
observeScope(scopeId: string, listener: ObserveListener<InternalScope>): () => void;
|
|
100
89
|
}
|
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";
|
|
2
1
|
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";
|
|
2
1
|
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,7 +13,8 @@ export interface ComputeEngine {
|
|
|
13
13
|
}
|
|
14
14
|
declare class EvalComputeEngine implements ComputeEngine {
|
|
15
15
|
private statementFunction;
|
|
16
|
-
|
|
16
|
+
private statementFunctionNoSnapshot;
|
|
17
|
+
compute({ snapshot, entityName, func, args, path, excludeState, }: ComputeParams): any;
|
|
17
18
|
}
|
|
18
19
|
declare class DirectComputeEngine implements ComputeEngine {
|
|
19
20
|
compute({ snapshot, entityName, func, args, path, excludeState, }: ComputeParams): EntityOutputProp;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ScopedState } from "
|
|
1
|
+
import type { ScopedState } from "@superblocksteam/library-shared/types";
|
|
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,2 +1,3 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
1
|
+
import type { InternalScope } from "./base-entity-manager.js";
|
|
2
|
+
import type { ScopedState } from "@superblocksteam/library-shared/types";
|
|
3
|
+
export declare function createScopeProxy(scopes: InternalScope[], useSuspense?: boolean): ScopedState;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import type { Entity } from "
|
|
2
|
-
import type { DeepObserveChange } from "@superblocksteam/library-shared/types";
|
|
1
|
+
import type { DeepObserveChange, Entity } from "@superblocksteam/library-shared/types";
|
|
3
2
|
type IChange = DeepObserveChange;
|
|
4
3
|
type ChangeWithRelatedObject = IChange & {
|
|
5
4
|
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,
|
|
4
|
-
import type { ObserveListener } from "./deep-observe.js";
|
|
3
|
+
import type { IEntityManager, SingleInputProp, InternalScope, ScopeId, InputProp, GetterOptions } from "./base-entity-manager.js";
|
|
5
4
|
import type { ValidateFn } from "../../../user-facing/properties-panel/validators.js";
|
|
6
5
|
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): Entity;
|
|
20
|
-
getState(scopeId: string): ScopedState;
|
|
18
|
+
getEntity(scopeId: string, name: Name, options?: GetterOptions): Entity;
|
|
19
|
+
getEntityById(scopeId: string, id: SbInstance, options?: GetterOptions): Entity;
|
|
20
|
+
getState(scopeId: string, options?: GetterOptions): 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,6 +42,7 @@ export declare class EntityManager implements IEntityManager {
|
|
|
42
42
|
sourceId?: SbElement;
|
|
43
43
|
}): Name;
|
|
44
44
|
private createEntityStructure;
|
|
45
|
+
private addInternalProperty;
|
|
45
46
|
private addProperty;
|
|
46
47
|
deleteEntity(params: {
|
|
47
48
|
name: Name;
|
|
@@ -83,12 +84,12 @@ export declare class EntityManager implements IEntityManager {
|
|
|
83
84
|
excludeState?: boolean;
|
|
84
85
|
args?: ARGS;
|
|
85
86
|
}): void;
|
|
86
|
-
computeValue<T>(params: {
|
|
87
|
+
computeValue<T, ARGS extends any[] = any[]>(params: {
|
|
87
88
|
scopeId: ScopeId;
|
|
88
89
|
name: Name;
|
|
89
90
|
value: SingleInputProp<T>;
|
|
90
91
|
validator?: ValidateFn<T>;
|
|
92
|
+
args?: ARGS;
|
|
91
93
|
}): T;
|
|
92
94
|
private getOrCreateAtom;
|
|
93
|
-
observeScope(scopeId: string, listener: ObserveListener<InternalScope>): () => void;
|
|
94
95
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import { type ComputedArgs } from "@superblocksteam/library-shared";
|
|
1
2
|
declare const lazyFunctionSymbol: unique symbol;
|
|
2
3
|
export type LazyFunction = ((...args: unknown[]) => unknown) & {
|
|
3
4
|
[lazyFunctionSymbol]: true;
|
|
4
5
|
};
|
|
5
6
|
export declare const isLazyFunction: (value: unknown) => value is LazyFunction;
|
|
6
|
-
export declare const LazyFunction: (source: string, args?:
|
|
7
|
+
export declare const LazyFunction: (source: string, args?: ComputedArgs) => LazyFunction;
|
|
7
8
|
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { EntityDerivedProp } from "
|
|
2
|
-
export declare const prettyPrintFunction: (func: EntityDerivedProp, args: any[]) => string;
|
|
1
|
+
import type { EntityDerivedProp } from "@superblocksteam/library-shared/types";
|
|
2
|
+
export declare const prettyPrintFunction: (func: EntityDerivedProp, args: any[], fnName: string) => string;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { Entity, ScopedState } from "@superblocksteam/library-shared/types";
|
|
2
|
+
declare function sanitizeObject<T extends object>(obj: T): T;
|
|
3
|
+
declare function sanitizeEntity<T extends Entity>(entity: T): T;
|
|
4
|
+
declare function sanitizeScopedState(state: ScopedState): ScopedState;
|
|
5
|
+
declare function sanitizedToJS<T>(value: T): T;
|
|
6
|
+
export { sanitizeObject, sanitizeEntity, sanitizeScopedState, sanitizedToJS };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
declare const SuspenseSymbol: unique symbol;
|
|
2
|
+
type SuspenseResult = {
|
|
3
|
+
__isSuspenseResult: typeof SuspenseSymbol;
|
|
4
|
+
};
|
|
5
|
+
declare function toJsOrSuspense<T extends Record<string, unknown>>(obj: T, key?: string): T | SuspenseResult;
|
|
6
|
+
declare function removeSuspense<T extends Record<string, unknown>>(keys: string[], result: T | SuspenseResult, prevSafeResult: T | undefined): T;
|
|
7
|
+
export { SuspenseSymbol, toJsOrSuspense, removeSuspense };
|
|
8
|
+
export type { SuspenseResult };
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { SbEventFlow } from "../../../user-facing/sb-event-flow.js";
|
|
2
|
-
import type {
|
|
2
|
+
import type { 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";
|
|
5
6
|
type ExecutableType = "normal" | "mustache-bindings" | "external-function" | "event" | "lazy-function";
|
|
6
7
|
export type ExecutableOrValue = {
|
|
7
8
|
type: ExecutableType;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const useShallowMobxObserver: <T extends Record<string, unknown>>(obj: T) => T;
|
|
1
|
+
export declare const useShallowMobxObserver: <T extends Record<string, unknown>>(obj: T, useSuspense?: boolean) => T;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ManagedPropsList } from "../../../user-facing/properties-panel/props-builder.js";
|
|
1
|
+
import type { ManagedPropsList, PropertiesDefinition } 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,12 +7,14 @@ export type Type = {
|
|
|
7
7
|
sbType: string;
|
|
8
8
|
isDroppable?: boolean;
|
|
9
9
|
hasExtendedClickArea?: boolean;
|
|
10
|
+
propertiesDefinition?: PropertiesDefinition;
|
|
10
11
|
} & React.ComponentType<any>;
|
|
11
12
|
export declare class ComponentRegistry implements ComponentRegistryShareState {
|
|
12
13
|
readonly rootStore: RootStore;
|
|
13
14
|
private _typeRegistry;
|
|
14
15
|
private _customComponentRegistry;
|
|
15
16
|
private _managedPropsRegistry;
|
|
17
|
+
private _internalPropsRegistry;
|
|
16
18
|
constructor(rootStore: RootStore);
|
|
17
19
|
addType(type: string, component: Type): void;
|
|
18
20
|
addCustomComponent(type: string, component: Type): void;
|
|
@@ -20,9 +22,22 @@ export declare class ComponentRegistry implements ComponentRegistryShareState {
|
|
|
20
22
|
renameCustomComponent(oldName: string, newName: string): void;
|
|
21
23
|
addManagedProps(type: string, props: ManagedPropsList): void;
|
|
22
24
|
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
|
+
}>;
|
|
23
33
|
get libraryComponentList(): string[];
|
|
24
34
|
get customComponentList(): string[];
|
|
25
35
|
get managedPropsRegistry(): Map<string, ManagedPropsList>;
|
|
26
36
|
getManagedProps(type: string): ManagedPropsList;
|
|
27
37
|
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;
|
|
28
43
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { LocationStore } from "../location-store.js";
|
|
1
2
|
import ApiManager from "./features/api-store.js";
|
|
2
3
|
import { ComponentRegistry } from "./features/component-registry.js";
|
|
3
4
|
import { NameManager } from "./features/name-manager.js";
|
|
@@ -9,6 +10,7 @@ declare class RootStore {
|
|
|
9
10
|
entityManager: IEntityManager;
|
|
10
11
|
componentRegistry: ComponentRegistry;
|
|
11
12
|
editStore?: EditStore;
|
|
13
|
+
locationStore: LocationStore;
|
|
12
14
|
private editorRegisteredCallbacks;
|
|
13
15
|
private apisLoaded;
|
|
14
16
|
private pageScopeLoaded;
|
|
@@ -160,11 +160,22 @@ 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
|
+
};
|
|
163
171
|
};
|
|
164
172
|
export type FromParentToChildMessageTypes = keyof FromParentToChildMessageTypesMap;
|
|
165
173
|
export type FromChildToParentMessageTypesMap = {
|
|
166
174
|
"sb-ready": void;
|
|
167
175
|
"iframe-action-batch": PayloadAction<unknown>[];
|
|
176
|
+
/**
|
|
177
|
+
* Navigate the parent window to a new URL
|
|
178
|
+
*/
|
|
168
179
|
"navigate-to": {
|
|
169
180
|
url: string;
|
|
170
181
|
newWindow?: boolean;
|
|
@@ -177,7 +188,6 @@ export type FromChildToParentMessageTypesMap = {
|
|
|
177
188
|
"sb-edit-operation-request": EditOperationPayload<EditOperationType>;
|
|
178
189
|
"client:selectWidgets": {
|
|
179
190
|
sourceIds: SbElement[];
|
|
180
|
-
selectingMultiple: boolean;
|
|
181
191
|
};
|
|
182
192
|
getDropTargetResult: {
|
|
183
193
|
offset: XYCoord;
|
|
@@ -224,8 +234,31 @@ export type FromChildToParentMessageTypesMap = {
|
|
|
224
234
|
message: any;
|
|
225
235
|
apiName: string;
|
|
226
236
|
};
|
|
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
|
+
};
|
|
227
257
|
undo: void;
|
|
228
258
|
redo: void;
|
|
259
|
+
"socket/error": {
|
|
260
|
+
message: string;
|
|
261
|
+
};
|
|
229
262
|
} & AppToEditorMessage<PropertiesPanelDefinition>;
|
|
230
263
|
export type FromChildToParentMessageTypes = keyof FromChildToParentMessageTypesMap;
|
|
231
264
|
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { RootStore } from "./lib/root-store.js";
|
|
2
|
+
import type { Global as GlobalType } from "./scope/types.js";
|
|
3
|
+
import type { Location } from "react-router";
|
|
4
|
+
type RouteInfo = Location & {
|
|
5
|
+
route: string;
|
|
6
|
+
path: string;
|
|
7
|
+
params: Record<string, unknown>;
|
|
8
|
+
};
|
|
9
|
+
export declare class LocationStore {
|
|
10
|
+
route?: RouteInfo;
|
|
11
|
+
rootStore: RootStore;
|
|
12
|
+
constructor(rootStore: RootStore);
|
|
13
|
+
updateLocation(route: RouteInfo): Promise<void>;
|
|
14
|
+
sendLocationToEditor(route: RouteInfo): void;
|
|
15
|
+
updateGlobalScopeUrl(route: RouteInfo): Promise<void>;
|
|
16
|
+
getUrlState(route: RouteInfo): NonNullable<GlobalType["URL"]>;
|
|
17
|
+
}
|
|
18
|
+
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Global as GlobalType } from "./types.js";
|
|
2
|
-
import type {
|
|
2
|
+
import type { Theme as BaseTheme, UserAccessibleTheme } 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 interface Global {
|
|
9
9
|
mode?: AppMode;
|
|
10
10
|
user?: User;
|
|
11
11
|
URL?: UrlState;
|
|
@@ -25,7 +25,7 @@ export type 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;
|
|
@@ -2,8 +2,7 @@ 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 } from "
|
|
6
|
-
import type { TriggerStepType } from "@superblocksteam/library-shared/types";
|
|
5
|
+
import type { BaseStepDef, TriggerStepType } from "@superblocksteam/library-shared/types";
|
|
7
6
|
export interface ExecutionContext {
|
|
8
7
|
scopeId: ScopeId;
|
|
9
8
|
name: Name;
|
|
@@ -1,13 +1,6 @@
|
|
|
1
|
-
import { TriggerStepType } from "@superblocksteam/library-shared/types";
|
|
2
|
-
import type { BaseStepDef } from "../../../sb-trigger.js";
|
|
3
1
|
import type { SbEventFlow } from "../../../user-facing/sb-event-flow.js";
|
|
4
2
|
import type { ExecutionContext } from "../../base.js";
|
|
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
|
-
}
|
|
3
|
+
import type { CancelApisStep, SbApiWithFunctions } from "@superblocksteam/library-shared/types";
|
|
11
4
|
export declare const CancelApisTrigger: {
|
|
12
5
|
type: "cancelApi";
|
|
13
6
|
execute(_context: ExecutionContext, step: CancelApisStep): Promise<void>;
|
|
@@ -1,21 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import type {
|
|
3
|
-
|
|
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
|
+
import type { Trigger } from "../../base.js";
|
|
2
|
+
import type { RunApisStep } from "@superblocksteam/library-shared/types";
|
|
3
|
+
export declare const RunApisTrigger: Trigger<RunApisStep>;
|
|
@@ -1,18 +1,12 @@
|
|
|
1
|
-
import { TriggerStepType } from "@superblocksteam/library-shared/types";
|
|
2
|
-
import type { BaseStepDef } from "../../../sb-trigger.js";
|
|
3
1
|
import type { ExecutionContext } from "../../base.js";
|
|
2
|
+
import type { ControlModalStep } from "@superblocksteam/library-shared/types";
|
|
4
3
|
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
|
-
}
|
|
10
4
|
export declare const ControlModalTrigger: {
|
|
11
5
|
type: "controlModal";
|
|
12
6
|
execute(context: ExecutionContext, step: ControlModalStep): Promise<void>;
|
|
13
|
-
create(modal: WithBindingIdentifier,
|
|
7
|
+
create(modal: WithBindingIdentifier, action: "open" | "close"): {
|
|
14
8
|
type: "controlModal";
|
|
15
9
|
name: string | undefined;
|
|
16
|
-
|
|
10
|
+
action: "close" | "open";
|
|
17
11
|
};
|
|
18
12
|
};
|
|
@@ -1,17 +1,12 @@
|
|
|
1
|
-
import { TriggerStepType } from "@superblocksteam/library-shared/types";
|
|
2
|
-
import type { BaseStepDef } from "../../../sb-trigger.js";
|
|
3
1
|
import type { ExecutionContext } from "../../base.js";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
name: string;
|
|
7
|
-
direction: "open" | "close";
|
|
8
|
-
}
|
|
2
|
+
import type { ControlSlideoutStep } from "@superblocksteam/library-shared/types";
|
|
3
|
+
import type { WithBindingIdentifier } from "@superblocksteam/library-shared/types";
|
|
9
4
|
export declare const ControlSlideoutTrigger: {
|
|
10
5
|
type: "controlSlideout";
|
|
11
6
|
execute(context: ExecutionContext, step: ControlSlideoutStep): Promise<void>;
|
|
12
|
-
create(
|
|
7
|
+
create(slideout: WithBindingIdentifier, action: "open" | "close"): {
|
|
13
8
|
type: "controlSlideout";
|
|
14
|
-
name: string;
|
|
15
|
-
|
|
9
|
+
name: string | undefined;
|
|
10
|
+
action: "close" | "open";
|
|
16
11
|
};
|
|
17
12
|
};
|
|
@@ -1,13 +1,6 @@
|
|
|
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";
|
|
4
1
|
import type { ExecutionContext } from "../../base.js";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
widget: SelectedWidgetProps;
|
|
8
|
-
propertyName: string;
|
|
9
|
-
resetChildren: ValueInputProp;
|
|
10
|
-
}
|
|
2
|
+
import type { SelectedWidgetProps, ValueInputProp } from "@superblocksteam/library-shared/types";
|
|
3
|
+
import type { ResetComponentStep } from "@superblocksteam/library-shared/types";
|
|
11
4
|
export declare const ResetComponentTrigger: {
|
|
12
5
|
type: "resetComponent";
|
|
13
6
|
execute(context: ExecutionContext, step: ResetComponentStep): Promise<void>;
|
|
@@ -1,13 +1,6 @@
|
|
|
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";
|
|
4
1
|
import type { ExecutionContext } from "../../base.js";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
widget: SelectedWidgetProps;
|
|
8
|
-
propertyName: string;
|
|
9
|
-
propertyValue: ValueInputProp;
|
|
10
|
-
}
|
|
2
|
+
import type { SelectedWidgetProps, ValueInputProp } from "@superblocksteam/library-shared/types";
|
|
3
|
+
import type { SetComponentPropertyStep } from "@superblocksteam/library-shared/types";
|
|
11
4
|
export declare const SetComponentPropertyTrigger: {
|
|
12
5
|
type: "setComponentProperty";
|
|
13
6
|
execute(context: ExecutionContext, step: SetComponentPropertyStep): Promise<void>;
|
|
@@ -1,17 +1,5 @@
|
|
|
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";
|
|
4
1
|
import type { ExecutionContext } from "../../base.js";
|
|
5
|
-
|
|
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
|
-
}
|
|
2
|
+
import type { NavigateToAppStep } from "@superblocksteam/library-shared/types";
|
|
15
3
|
export declare const NavigateToAppTrigger: {
|
|
16
4
|
type: "navigateToApp";
|
|
17
5
|
execute(_context: ExecutionContext, step: NavigateToAppStep): Promise<void>;
|
|
@@ -1,16 +1,5 @@
|
|
|
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";
|
|
4
1
|
import type { ExecutionContext } from "../../base.js";
|
|
5
|
-
|
|
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
|
-
}
|
|
2
|
+
import type { NavigateToRouteStep } from "@superblocksteam/library-shared/types";
|
|
14
3
|
export declare const NavigateToRouteTrigger: {
|
|
15
4
|
type: "navigateToRoute";
|
|
16
5
|
execute(context: ExecutionContext, step: NavigateToRouteStep): Promise<void>;
|
|
@@ -1,13 +1,5 @@
|
|
|
1
|
-
import { TriggerStepType } from "@superblocksteam/library-shared/types";
|
|
2
|
-
import type { BaseStepDef } from "../../../sb-trigger.js";
|
|
3
1
|
import type { ExecutionContext } from "../../base.js";
|
|
4
|
-
|
|
5
|
-
type: typeof TriggerStepType.NAVIGATE_TO;
|
|
6
|
-
url: string;
|
|
7
|
-
newWindow: boolean;
|
|
8
|
-
replaceHistory?: boolean;
|
|
9
|
-
arguments?: string;
|
|
10
|
-
}
|
|
2
|
+
import type { NavigateToStep } from "@superblocksteam/library-shared/types";
|
|
11
3
|
export declare const NavigateToTrigger: {
|
|
12
4
|
type: "navigateTo";
|
|
13
5
|
execute(_context: ExecutionContext, step: NavigateToStep): Promise<void>;
|
|
@@ -1,12 +1,6 @@
|
|
|
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";
|
|
4
1
|
import type { ExecutionContext } from "../../base.js";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
queryParams?: Record<string, ValueInputProp<string>>;
|
|
8
|
-
keepQueryParams?: boolean;
|
|
9
|
-
}
|
|
2
|
+
import type { ValueInputProp } from "@superblocksteam/library-shared/types";
|
|
3
|
+
import type { SetQueryParamsStep } from "@superblocksteam/library-shared/types";
|
|
10
4
|
export declare const SetQueryParamsTrigger: {
|
|
11
5
|
type: "setQueryParams";
|
|
12
6
|
execute(_context: ExecutionContext, step: SetQueryParamsStep): Promise<void>;
|
|
@@ -1,12 +1,5 @@
|
|
|
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";
|
|
4
1
|
import type { ExecutionContext } from "../base.js";
|
|
5
|
-
|
|
6
|
-
type: typeof TriggerStepType.RUN_JS;
|
|
7
|
-
handler?: Executable;
|
|
8
|
-
code?: string;
|
|
9
|
-
}
|
|
2
|
+
import type { Executable, RunJsStep } from "@superblocksteam/library-shared/types";
|
|
10
3
|
export declare const RunJsTrigger: {
|
|
11
4
|
type: "runJs";
|
|
12
5
|
create(handler: Executable): {
|
|
@@ -1,11 +1,5 @@
|
|
|
1
|
-
import { TriggerStepType } from "@superblocksteam/library-shared/types";
|
|
2
|
-
import type { BaseStepDef } from "../../sb-trigger.js";
|
|
3
1
|
import type { ExecutionContext } from "../base.js";
|
|
4
|
-
|
|
5
|
-
type: typeof TriggerStepType.SET_PROFILE;
|
|
6
|
-
profileId: string;
|
|
7
|
-
profileAction: "set" | "unset";
|
|
8
|
-
}
|
|
2
|
+
import type { SetProfileStep } from "@superblocksteam/library-shared/types";
|
|
9
3
|
export declare const SetProfileTrigger: {
|
|
10
4
|
type: "setProfile";
|
|
11
5
|
execute(_context: ExecutionContext, step: SetProfileStep): Promise<void>;
|
|
@@ -13,5 +7,6 @@ export declare const SetProfileTrigger: {
|
|
|
13
7
|
type: "setProfile";
|
|
14
8
|
profileId: string;
|
|
15
9
|
profileAction: "unset" | "set";
|
|
10
|
+
action: "unset" | "set";
|
|
16
11
|
};
|
|
17
12
|
};
|