@superblocksteam/library 2.0.12 → 2.0.13-next.0
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-BuUgu-ep.js → allPaths-BjzQkMjc.js} +2 -2
- package/dist/{allPaths-BuUgu-ep.js.map → allPaths-BjzQkMjc.js.map} +1 -1
- package/dist/{allPaths-DlzHwWMX.js → allPaths-CQOhjpXk.js} +2 -2
- package/dist/{allPaths-DlzHwWMX.js.map → allPaths-CQOhjpXk.js.map} +1 -1
- package/dist/{allPathsLoader-BGvU53aT.js → allPathsLoader-BYewEWVh.js} +3 -3
- package/dist/{allPathsLoader-BGvU53aT.js.map → allPathsLoader-BYewEWVh.js.map} +1 -1
- package/dist/{allPathsLoader-DSciOCN7.js → allPathsLoader-BYj7sg41.js} +3 -3
- package/dist/{allPathsLoader-DSciOCN7.js.map → allPathsLoader-BYj7sg41.js.map} +1 -1
- package/dist/{devtools-consolidated-BUXNw6tW.js → devtools-consolidated-CHfJX3eH.js} +2 -2
- package/dist/{devtools-consolidated-BUXNw6tW.js.map → devtools-consolidated-CHfJX3eH.js.map} +1 -1
- package/dist/{index-Cqcbj1GQ.js → index-CH4jAtWn.js} +316 -276
- package/dist/{index-Cqcbj1GQ.js.map → index-CH4jAtWn.js.map} +1 -1
- package/dist/index.js +2 -2
- package/dist/{splitPathsBySizeLoader-B1MrW6Zz.js → splitPathsBySizeLoader-2oYHBTYy.js} +2 -2
- package/dist/{splitPathsBySizeLoader-B1MrW6Zz.js.map → splitPathsBySizeLoader-2oYHBTYy.js.map} +1 -1
- package/dist/{splitPathsBySizeLoader-CdGEkez6.js → splitPathsBySizeLoader-go6FZrRw.js} +2 -2
- package/dist/{splitPathsBySizeLoader-CdGEkez6.js.map → splitPathsBySizeLoader-go6FZrRw.js.map} +1 -1
- package/dist-types/edit-mode/create-component.d.ts +4 -3
- package/dist-types/lib/internal-details/lib/evaluator/to-executables-or-values.d.ts +5 -2
- package/dist-types/lib/internal-details/lib/types.d.ts +1 -1
- package/dist-types/lib/internal-details/sb-wrapper.d.ts +12 -0
- package/dist-types/lib/triggers/implementations/components/control-modal.d.ts +3 -1
- package/dist-types/lib/triggers/implementations/components/control-slideout.d.ts +3 -1
- package/dist-types/lib/triggers/implementations/navigate/navigate-to.d.ts +1 -2
- package/dist-types/lib/triggers/implementations/navigate/set-query-params.d.ts +4 -2
- package/dist-types/lib/triggers/implementations/navigate/utils.d.ts +1 -0
- package/dist-types/lib/triggers/implementations/set-profile.d.ts +3 -1
- package/dist-types/lib/triggers/implementations/show-alert.d.ts +5 -1
- package/dist-types/lib/triggers/implementations/state/set-state-var.d.ts +4 -2
- package/dist-types/lib/triggers/implementations/timers/control-timer.d.ts +3 -1
- package/dist-types/lib/triggers/implementations/trigger-event.d.ts +4 -2
- package/dist-types/lib/user-facing/event-flow.d.ts +66 -22
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a0 as clientExports } from "./index-
|
|
2
|
-
import { a1, a2, B, h, C, c, g, i, Y, D, O, Q, E, a3, L, a4, a5, a6, a7, l, n, d, a8, a9, v, aa, ab, M, ac, ad, ae, $, P, af, W, ag, ah, ai, aj, Z, u, R, v as v2, ak, al, S, am, e, q, A, an, ao, k, f, T, N, s, ap, aq, ar, as, at, au, av, aw, ax, ay, az, aA, aB, aC, aD, aE, aF, aG, aH, aI, aJ, aK, aL, aM, aN, X, w, aO, aP, aQ, aR, aS, aT, aU, aV, aW, aX, aY, K, aZ, a_, a$, b0, b1, b2, z, b3, b4, b5, b6, b7, G, b8, b9, x, ba, bb, bc, r, J, H, bd, be, bf, y, F, bg, bh, bi, bj, bk, bl, bm, bn, bo, bp, bq, br, bs, bt, bu, bv, bw, bx, by, bz, bA, bB, bC, bD, bE, bF, bG, bH, bI, bJ, bK, bL, bM, V, U, bN } from "./index-
|
|
1
|
+
import { a0 as clientExports } from "./index-CH4jAtWn.js";
|
|
2
|
+
import { a1, a2, B, h, C, c, g, i, Y, D, O, Q, E, a3, L, a4, a5, a6, a7, l, n, d, a8, a9, v, aa, ab, M, ac, ad, ae, $, P, af, W, ag, ah, ai, aj, Z, u, R, v as v2, ak, al, S, am, e, q, A, an, ao, k, f, T, N, s, ap, aq, ar, as, at, au, av, aw, ax, ay, az, aA, aB, aC, aD, aE, aF, aG, aH, aI, aJ, aK, aL, aM, aN, X, w, aO, aP, aQ, aR, aS, aT, aU, aV, aW, aX, aY, K, aZ, a_, a$, b0, b1, b2, z, b3, b4, b5, b6, b7, G, b8, b9, x, ba, bb, bc, r, J, H, bd, be, bf, y, F, bg, bh, bi, bj, bk, bl, bm, bn, bo, bp, bq, br, bs, bt, bu, bv, bw, bx, by, bz, bA, bB, bC, bD, bE, bF, bG, bH, bI, bJ, bK, bL, bM, V, U, bN } from "./index-CH4jAtWn.js";
|
|
3
3
|
const createRoot = clientExports.createRoot;
|
|
4
4
|
export {
|
|
5
5
|
a1 as Await,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as __awaiter, a as __generator, p as pascalCase, b as IconSize } from "./index-
|
|
1
|
+
import { _ as __awaiter, a as __generator, p as pascalCase, b as IconSize } from "./index-CH4jAtWn.js";
|
|
2
2
|
var splitPathsBySizeLoader = function(name, size) {
|
|
3
3
|
return __awaiter(void 0, void 0, void 0, function() {
|
|
4
4
|
var key, pathsRecord;
|
|
@@ -31,4 +31,4 @@ var splitPathsBySizeLoader = function(name, size) {
|
|
|
31
31
|
export {
|
|
32
32
|
splitPathsBySizeLoader
|
|
33
33
|
};
|
|
34
|
-
//# sourceMappingURL=splitPathsBySizeLoader-
|
|
34
|
+
//# sourceMappingURL=splitPathsBySizeLoader-2oYHBTYy.js.map
|
package/dist/{splitPathsBySizeLoader-B1MrW6Zz.js.map → splitPathsBySizeLoader-2oYHBTYy.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"splitPathsBySizeLoader-
|
|
1
|
+
{"version":3,"file":"splitPathsBySizeLoader-2oYHBTYy.js","sources":["../../../node_modules/.pnpm/@blueprintjs+icons@5.20.0_@types+react@18.3.18_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@blueprintjs/icons/lib/esm/paths-loaders/splitPathsBySizeLoader.js"],"sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { __awaiter, __generator } from \"tslib\";\nimport { pascalCase } from \"change-case\";\nimport { IconSize } from \"../iconTypes\";\n/**\n * A dynamic loader for icon paths that generates separate chunks for the two size variants.\n */\nexport var splitPathsBySizeLoader = function (name, size) { return __awaiter(void 0, void 0, void 0, function () {\n var key, pathsRecord;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n key = pascalCase(name);\n if (!(size === IconSize.STANDARD)) return [3 /*break*/, 2];\n return [4 /*yield*/, import(\n /* webpackChunkName: \"blueprint-icons-16px-paths\" */\n \"../generated/16px/paths\")];\n case 1:\n pathsRecord = _a.sent();\n return [3 /*break*/, 4];\n case 2: return [4 /*yield*/, import(\n /* webpackChunkName: \"blueprint-icons-20px-paths\" */\n \"../generated/20px/paths\")];\n case 3:\n pathsRecord = _a.sent();\n _a.label = 4;\n case 4: return [2 /*return*/, pathsRecord[key]];\n }\n });\n}); };\n//# sourceMappingURL=splitPathsBySizeLoader.js.map"],"names":[],"mappings":";AAqBU,IAAC,yBAAyB,SAAU,MAAM,MAAM;AAAE,SAAO,UAAU,QAAQ,QAAQ,QAAQ,WAAY;AAC7G,QAAI,KAAK;AACT,WAAO,YAAY,MAAM,SAAU,IAAI;AACnC,cAAQ,GAAG,OAAK;AAAA,QACZ,KAAK;AACD,gBAAM,WAAW,IAAI;AACrB,cAAI,EAAE,SAAS,SAAS,UAAW,QAAO,CAAC,GAAa,CAAC;AACzD,iBAAO,CAAC,GAAa;AAAA;AAAA,YAEjB;AAAA,UAAyB,kBAAC;AAAA,QAClC,KAAK;AACD,wBAAc,GAAG,KAAM;AACvB,iBAAO,CAAC,GAAa,CAAC;AAAA,QAC1B,KAAK;AAAG,iBAAO,CAAC,GAAa;AAAA;AAAA,YAEzB;AAAA,UAAyB,kBAAC;AAAA,QAC9B,KAAK;AACD,wBAAc,GAAG,KAAM;AACvB,aAAG,QAAQ;AAAA,QACf,KAAK;AAAG,iBAAO,CAAC,GAAc,YAAY,GAAG,CAAC;AAAA,MAC1D;AAAA,IACA,CAAK;AAAA,EACL,CAAC;AAAE;","x_google_ignoreList":[0]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as __awaiter, a as __generator, p as pascalCase, I as IconSize } from "./index-
|
|
1
|
+
import { _ as __awaiter, a as __generator, p as pascalCase, I as IconSize } from "./index-CH4jAtWn.js";
|
|
2
2
|
var splitPathsBySizeLoader = function(name, size) {
|
|
3
3
|
return __awaiter(void 0, void 0, void 0, function() {
|
|
4
4
|
var key, pathsRecord;
|
|
@@ -31,4 +31,4 @@ var splitPathsBySizeLoader = function(name, size) {
|
|
|
31
31
|
export {
|
|
32
32
|
splitPathsBySizeLoader
|
|
33
33
|
};
|
|
34
|
-
//# sourceMappingURL=splitPathsBySizeLoader-
|
|
34
|
+
//# sourceMappingURL=splitPathsBySizeLoader-go6FZrRw.js.map
|
package/dist/{splitPathsBySizeLoader-CdGEkez6.js.map → splitPathsBySizeLoader-go6FZrRw.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"splitPathsBySizeLoader-
|
|
1
|
+
{"version":3,"file":"splitPathsBySizeLoader-go6FZrRw.js","sources":["../../../node_modules/.pnpm/@blueprintjs+icons@5.18.1_@types+react@18.3.18_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@blueprintjs/icons/lib/esm/paths-loaders/splitPathsBySizeLoader.js"],"sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { __awaiter, __generator } from \"tslib\";\nimport { pascalCase } from \"change-case\";\nimport { IconSize } from \"../iconTypes\";\n/**\n * A dynamic loader for icon paths that generates separate chunks for the two size variants.\n */\nexport var splitPathsBySizeLoader = function (name, size) { return __awaiter(void 0, void 0, void 0, function () {\n var key, pathsRecord;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n key = pascalCase(name);\n if (!(size === IconSize.STANDARD)) return [3 /*break*/, 2];\n return [4 /*yield*/, import(\n /* webpackChunkName: \"blueprint-icons-16px-paths\" */\n \"../generated/16px/paths\")];\n case 1:\n pathsRecord = _a.sent();\n return [3 /*break*/, 4];\n case 2: return [4 /*yield*/, import(\n /* webpackChunkName: \"blueprint-icons-20px-paths\" */\n \"../generated/20px/paths\")];\n case 3:\n pathsRecord = _a.sent();\n _a.label = 4;\n case 4: return [2 /*return*/, pathsRecord[key]];\n }\n });\n}); };\n//# sourceMappingURL=splitPathsBySizeLoader.js.map"],"names":[],"mappings":";AAqBU,IAAC,yBAAyB,SAAU,MAAM,MAAM;AAAE,SAAO,UAAU,QAAQ,QAAQ,QAAQ,WAAY;AAC7G,QAAI,KAAK;AACT,WAAO,YAAY,MAAM,SAAU,IAAI;AACnC,cAAQ,GAAG,OAAK;AAAA,QACZ,KAAK;AACD,gBAAM,WAAW,IAAI;AACrB,cAAI,EAAE,SAAS,SAAS,UAAW,QAAO,CAAC,GAAa,CAAC;AACzD,iBAAO,CAAC,GAAa;AAAA;AAAA,YAEjB;AAAA,UAAyB,kBAAC;AAAA,QAClC,KAAK;AACD,wBAAc,GAAG,KAAM;AACvB,iBAAO,CAAC,GAAa,CAAC;AAAA,QAC1B,KAAK;AAAG,iBAAO,CAAC,GAAa;AAAA;AAAA,YAEzB;AAAA,UAAyB,kBAAC;AAAA,QAC9B,KAAK;AACD,wBAAc,GAAG,KAAM;AACvB,aAAG,QAAQ;AAAA,QACf,KAAK;AAAG,iBAAO,CAAC,GAAc,YAAY,GAAG,CAAC;AAAA,MAC1D;AAAA,IACA,CAAK;AAAA,EACL,CAAC;AAAE;","x_google_ignoreList":[0]}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { PropertyInfo, SbElement, SourceLocation } from "@superblocksteam/library-shared/types";
|
|
2
2
|
export declare const generateUniqueName: (componentType: string) => string;
|
|
3
|
-
export default function createComponent({ componentType, parent, scopeName, baseProperties,
|
|
3
|
+
export default function createComponent({ componentType, parent, scopeName, baseProperties, skipSecondaryComponentsCreation, // will only create the primary component. Secondary components are usually trigger components (e.g: Button that triggers the modal)
|
|
4
|
+
otherComponentsUpdates, }: {
|
|
4
5
|
componentType: string;
|
|
5
6
|
parent: SourceLocation;
|
|
6
7
|
scopeName: string;
|
|
7
8
|
baseProperties?: Record<string, PropertyInfo>;
|
|
8
|
-
|
|
9
|
+
skipSecondaryComponentsCreation?: boolean;
|
|
9
10
|
otherComponentsUpdates?: Record<SbElement, Record<string, PropertyInfo>>;
|
|
10
11
|
}): Promise<SbElement | undefined>;
|
|
@@ -3,12 +3,15 @@ import type { SingleInputProp, InputProp, EntityFunction } from "./base-entity-m
|
|
|
3
3
|
import type { LazyFunction } from "./lazy-function.js";
|
|
4
4
|
import type { DataTypeString } from "@superblocksteam/library-shared/props";
|
|
5
5
|
import type { EntityDerivedProp, EntityOutputProp } from "@superblocksteam/library-shared/types";
|
|
6
|
-
type ExecutableType = "normal" | "mustache-bindings" | "external-function" | "event" | "lazy-function";
|
|
6
|
+
type ExecutableType = "normal" | "function" | "mustache-bindings" | "external-function" | "event" | "lazy-function";
|
|
7
7
|
export type ExecutableOrValue = {
|
|
8
8
|
type: ExecutableType;
|
|
9
9
|
} & ({
|
|
10
10
|
type: "normal";
|
|
11
|
-
value:
|
|
11
|
+
value: EntityOutputProp;
|
|
12
|
+
} | {
|
|
13
|
+
type: "function";
|
|
14
|
+
value: EntityDerivedProp;
|
|
12
15
|
} | {
|
|
13
16
|
type: "mustache-bindings";
|
|
14
17
|
value: EntityDerivedProp | EntityOutputProp;
|
|
@@ -164,7 +164,7 @@ export type FromParentToChildMessageTypesMap = {
|
|
|
164
164
|
parent: SourceLocation;
|
|
165
165
|
scopeName: string;
|
|
166
166
|
baseProperties?: Record<string, PropertyInfo>;
|
|
167
|
-
|
|
167
|
+
skipSecondaryComponentsCreation?: boolean;
|
|
168
168
|
otherComponentsUpdates?: Record<SbElement, Record<string, PropertyInfo>>;
|
|
169
169
|
};
|
|
170
170
|
/**
|
|
@@ -27,6 +27,18 @@ export interface EditorTemplate<Def extends PropertiesDefinition> {
|
|
|
27
27
|
icon: string;
|
|
28
28
|
description?: string;
|
|
29
29
|
};
|
|
30
|
+
/***
|
|
31
|
+
* Config for the newly created component when added to the canvas from the Editor.
|
|
32
|
+
* @returns a single CreateRequest or an array of CreateRequests.
|
|
33
|
+
*
|
|
34
|
+
* When returning Array<CreateRequests>:
|
|
35
|
+
* - The 1st CreateRequest's type must match the componentType passed to createComponent.
|
|
36
|
+
* - The last CreateRequest's will be the selected component after drag & drop.
|
|
37
|
+
*
|
|
38
|
+
* Example: [Modal, Button]
|
|
39
|
+
* A modal that when drag & dropped on the page will add a trigger button.
|
|
40
|
+
* The modal is closed by default, so the selected component after drop will be the trigger button.
|
|
41
|
+
*/
|
|
30
42
|
create?: (context: CreationContext) => CreateRequest<Def> | Array<CreateRequest<Def>>;
|
|
31
43
|
}
|
|
32
44
|
export interface CreateRequest<Def extends PropertiesDefinition> {
|
|
@@ -4,7 +4,9 @@ import type { WithBindingIdentifier } from "@superblocksteam/library-shared/type
|
|
|
4
4
|
export declare const ControlModalTrigger: {
|
|
5
5
|
type: "controlModal";
|
|
6
6
|
execute(context: ExecutionContext, step: ControlModalStep): Promise<void>;
|
|
7
|
-
create(modal: WithBindingIdentifier,
|
|
7
|
+
create(modal: WithBindingIdentifier, opts: {
|
|
8
|
+
action: "open" | "close";
|
|
9
|
+
}): {
|
|
8
10
|
type: "controlModal";
|
|
9
11
|
name: string | undefined;
|
|
10
12
|
action: "close" | "open";
|
|
@@ -4,7 +4,9 @@ import type { WithBindingIdentifier } from "@superblocksteam/library-shared/type
|
|
|
4
4
|
export declare const ControlSlideoutTrigger: {
|
|
5
5
|
type: "controlSlideout";
|
|
6
6
|
execute(context: ExecutionContext, step: ControlSlideoutStep): Promise<void>;
|
|
7
|
-
create(slideout: WithBindingIdentifier,
|
|
7
|
+
create(slideout: WithBindingIdentifier, opts: {
|
|
8
|
+
action: "open" | "close";
|
|
9
|
+
}): {
|
|
8
10
|
type: "controlSlideout";
|
|
9
11
|
name: string | undefined;
|
|
10
12
|
action: "close" | "open";
|
|
@@ -3,8 +3,7 @@ import type { NavigateToStep } from "@superblocksteam/library-shared/types";
|
|
|
3
3
|
export declare const NavigateToTrigger: {
|
|
4
4
|
type: "navigateTo";
|
|
5
5
|
execute(_context: ExecutionContext, step: NavigateToStep): Promise<void>;
|
|
6
|
-
create(
|
|
7
|
-
url: string;
|
|
6
|
+
create(url: string, opts?: {
|
|
8
7
|
newWindow?: boolean;
|
|
9
8
|
replaceHistory?: boolean;
|
|
10
9
|
arguments?: string;
|
|
@@ -4,9 +4,11 @@ import type { SetQueryParamsStep } from "@superblocksteam/library-shared/types";
|
|
|
4
4
|
export declare const SetQueryParamsTrigger: {
|
|
5
5
|
type: "setQueryParams";
|
|
6
6
|
execute(_context: ExecutionContext, step: SetQueryParamsStep): Promise<void>;
|
|
7
|
-
create(queryParams: Record<string, ValueInputProp<string>>,
|
|
7
|
+
create(queryParams: Record<string, ValueInputProp<string>>, opts?: {
|
|
8
|
+
keep?: boolean;
|
|
9
|
+
}): {
|
|
8
10
|
type: "setQueryParams";
|
|
9
11
|
queryParams: Record<string, ValueInputProp<string>>;
|
|
10
|
-
keepQueryParams:
|
|
12
|
+
keepQueryParams: boolean;
|
|
11
13
|
};
|
|
12
14
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const isValidUrlScheme: (url: string) => boolean;
|
|
@@ -3,7 +3,9 @@ import type { SetProfileStep } from "@superblocksteam/library-shared/types";
|
|
|
3
3
|
export declare const SetProfileTrigger: {
|
|
4
4
|
type: "setProfile";
|
|
5
5
|
execute(_context: ExecutionContext, step: SetProfileStep): Promise<void>;
|
|
6
|
-
create(profileId: string,
|
|
6
|
+
create(profileId: string, opts: {
|
|
7
|
+
action: "set" | "unset";
|
|
8
|
+
}): {
|
|
7
9
|
type: "setProfile";
|
|
8
10
|
profileId: string;
|
|
9
11
|
action: "unset" | "set";
|
|
@@ -4,7 +4,11 @@ import type { ShowAlertStep, NotificationType, ValueInputProp } from "@superbloc
|
|
|
4
4
|
export declare const ShowAlertTrigger: {
|
|
5
5
|
type: "showAlert";
|
|
6
6
|
execute(context: ExecutionContext, step: ShowAlertStep): Promise<void>;
|
|
7
|
-
create(message: ValueInputProp<string>,
|
|
7
|
+
create(message: ValueInputProp<string>, opts?: {
|
|
8
|
+
type?: NotificationType;
|
|
9
|
+
durationMs?: number;
|
|
10
|
+
position?: NotificationPosition;
|
|
11
|
+
}): {
|
|
8
12
|
type: "showAlert";
|
|
9
13
|
message: ValueInputProp<string>;
|
|
10
14
|
style: NotificationType;
|
|
@@ -4,9 +4,11 @@ import type { SetStateVarStep, WithBindingIdentifier } from "@superblocksteam/li
|
|
|
4
4
|
export declare const SetStateVarTrigger: {
|
|
5
5
|
type: "setStateVar";
|
|
6
6
|
execute(context: ExecutionContext, step: SetStateVarStep): Promise<void>;
|
|
7
|
-
create(variable
|
|
7
|
+
create(variable: WithBindingIdentifier, opts: {
|
|
8
|
+
value: ValueInputProp;
|
|
9
|
+
}): {
|
|
8
10
|
type: "setStateVar";
|
|
9
|
-
variable: WithBindingIdentifier
|
|
11
|
+
variable: WithBindingIdentifier;
|
|
10
12
|
value: ValueInputProp;
|
|
11
13
|
};
|
|
12
14
|
};
|
|
@@ -3,7 +3,9 @@ import type { ControlTimerStep, WithBindingIdentifier } from "@superblocksteam/l
|
|
|
3
3
|
export declare const ControlTimerTrigger: {
|
|
4
4
|
type: "controlTimer";
|
|
5
5
|
execute(_context: ExecutionContext, step: ControlTimerStep): Promise<void>;
|
|
6
|
-
create(timer: WithBindingIdentifier,
|
|
6
|
+
create(timer: WithBindingIdentifier, opts: {
|
|
7
|
+
action: "start" | "stop" | "toggle";
|
|
8
|
+
}): {
|
|
7
9
|
type: "controlTimer";
|
|
8
10
|
timer: WithBindingIdentifier;
|
|
9
11
|
action: "toggle" | "stop" | "start";
|
|
@@ -3,9 +3,11 @@ import type { SelectedEventProps, TriggerEventStep } from "@superblocksteam/libr
|
|
|
3
3
|
export declare const TriggerEventTrigger: {
|
|
4
4
|
type: "triggerEvent";
|
|
5
5
|
execute(_context: ExecutionContext, step: TriggerEventStep): Promise<void>;
|
|
6
|
-
create(eventName: string,
|
|
6
|
+
create(eventName: string, opts?: {
|
|
7
|
+
data: Record<string, string>;
|
|
8
|
+
}): {
|
|
7
9
|
type: "triggerEvent";
|
|
8
10
|
event: SelectedEventProps;
|
|
9
|
-
eventPayload: Record<string, string
|
|
11
|
+
eventPayload: Record<string, string> | undefined;
|
|
10
12
|
};
|
|
11
13
|
};
|
|
@@ -6,28 +6,52 @@ declare class EventFlow implements IEventFlow<StepDef, ScopedState, ValueInputPr
|
|
|
6
6
|
static start(): EventFlow;
|
|
7
7
|
static runJS(handler: (s: ScopedState | any, additionalProps?: Record<string, any>) => void): EventFlow;
|
|
8
8
|
runJS(handler: (s: ScopedState | any, additionalProps?: Record<string, any>) => void): this;
|
|
9
|
-
static navigateTo(
|
|
10
|
-
url: string;
|
|
9
|
+
static navigateTo(url: string, opts?: {
|
|
11
10
|
newWindow?: boolean;
|
|
11
|
+
replaceHistory?: boolean;
|
|
12
|
+
arguments?: string;
|
|
12
13
|
}): EventFlow;
|
|
13
|
-
navigateTo(
|
|
14
|
-
url: string;
|
|
14
|
+
navigateTo(url: string, opts?: {
|
|
15
15
|
newWindow?: boolean;
|
|
16
|
+
replaceHistory?: boolean;
|
|
17
|
+
arguments?: string;
|
|
16
18
|
}): this;
|
|
17
19
|
static navigateToApp(appId: string): EventFlow;
|
|
18
20
|
navigateToApp(appId: string): this;
|
|
19
21
|
static navigateToRoute(route: string): EventFlow;
|
|
20
22
|
navigateToRoute(route: string): this;
|
|
21
|
-
static setQueryParams(params: Record<string, ValueInputProp<string>>,
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
static
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
23
|
+
static setQueryParams(params: Record<string, ValueInputProp<string>>, opts?: {
|
|
24
|
+
keep?: boolean;
|
|
25
|
+
}): EventFlow;
|
|
26
|
+
setQueryParams(params: Record<string, ValueInputProp<string>>, opts?: {
|
|
27
|
+
keep?: boolean;
|
|
28
|
+
}): this;
|
|
29
|
+
static controlSlideout(slideout: WithBindingIdentifier, opts: {
|
|
30
|
+
action: "open" | "close";
|
|
31
|
+
}): EventFlow;
|
|
32
|
+
controlSlideout(slideout: WithBindingIdentifier, opts: {
|
|
33
|
+
action: "open" | "close";
|
|
34
|
+
}): this;
|
|
35
|
+
static controlModal(modal: WithBindingIdentifier, opts: {
|
|
36
|
+
action: "open" | "close";
|
|
37
|
+
}): EventFlow;
|
|
38
|
+
controlModal(modal: WithBindingIdentifier, opts: {
|
|
39
|
+
action: "open" | "close";
|
|
40
|
+
}): this;
|
|
41
|
+
static controlTimer(stateTimer: WithBindingIdentifier, opts: {
|
|
42
|
+
action: "start" | "stop" | "toggle";
|
|
43
|
+
}): EventFlow;
|
|
44
|
+
controlTimer(stateTimer: WithBindingIdentifier, opts: {
|
|
45
|
+
action: "start" | "stop" | "toggle";
|
|
46
|
+
}): this;
|
|
47
|
+
static runApis(apis: any[], opts?: {
|
|
48
|
+
onSuccess?: EventFlow;
|
|
49
|
+
onError?: EventFlow;
|
|
50
|
+
}): EventFlow;
|
|
51
|
+
runApis(apis: any[], opts?: {
|
|
52
|
+
onSuccess?: EventFlow;
|
|
53
|
+
onError?: EventFlow;
|
|
54
|
+
}): this;
|
|
31
55
|
static cancelApis(apis: any[], onCancel?: EventFlow): EventFlow;
|
|
32
56
|
cancelApis(apis: any[], onCancel?: EventFlow): this;
|
|
33
57
|
static resetComponent(component: WithBindingIdentifier, opts?: {
|
|
@@ -38,8 +62,12 @@ declare class EventFlow implements IEventFlow<StepDef, ScopedState, ValueInputPr
|
|
|
38
62
|
}): this;
|
|
39
63
|
static resetStateVar(state: WithBindingIdentifier): EventFlow;
|
|
40
64
|
resetStateVar(state: WithBindingIdentifier): this;
|
|
41
|
-
static setStateVar(stateVarName: WithBindingIdentifier,
|
|
42
|
-
|
|
65
|
+
static setStateVar(stateVarName: WithBindingIdentifier, opts: {
|
|
66
|
+
value: ValueInputProp;
|
|
67
|
+
}): EventFlow;
|
|
68
|
+
setStateVar(stateVar: WithBindingIdentifier, opts: {
|
|
69
|
+
value: ValueInputProp;
|
|
70
|
+
}): this;
|
|
43
71
|
static setComponentProperty(component: WithBindingIdentifier, opts: {
|
|
44
72
|
property: string;
|
|
45
73
|
value: ValueInputProp;
|
|
@@ -48,12 +76,28 @@ declare class EventFlow implements IEventFlow<StepDef, ScopedState, ValueInputPr
|
|
|
48
76
|
property: string;
|
|
49
77
|
value: ValueInputProp;
|
|
50
78
|
}): this;
|
|
51
|
-
static showAlert(message: ValueInputProp<string>,
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
79
|
+
static showAlert(message: ValueInputProp<string>, opts?: {
|
|
80
|
+
type?: NotificationType;
|
|
81
|
+
durationMs?: number;
|
|
82
|
+
position?: NotificationPosition;
|
|
83
|
+
}): EventFlow;
|
|
84
|
+
showAlert(message: ValueInputProp<string>, opts?: {
|
|
85
|
+
type?: NotificationType;
|
|
86
|
+
durationMs?: number;
|
|
87
|
+
position?: NotificationPosition;
|
|
88
|
+
}): this;
|
|
89
|
+
static setProfile(profileId: string, opts: {
|
|
90
|
+
action: "set" | "unset";
|
|
91
|
+
}): EventFlow;
|
|
92
|
+
setProfile(profileId: string, opts: {
|
|
93
|
+
action: "set" | "unset";
|
|
94
|
+
}): this;
|
|
95
|
+
static triggerEvent(eventName: string, opts?: {
|
|
96
|
+
data: Record<string, string>;
|
|
97
|
+
}): EventFlow;
|
|
98
|
+
triggerEvent(eventName: string, opts?: {
|
|
99
|
+
data: Record<string, string>;
|
|
100
|
+
}): this;
|
|
57
101
|
static sequence(eventFlows: EventFlow[]): EventFlow;
|
|
58
102
|
sequence(eventFlows: EventFlow[]): this;
|
|
59
103
|
build(): StepDef[];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@superblocksteam/library",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.13-next.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"@react-hook/resize-observer": "1.2.6",
|
|
34
34
|
"@superblocksteam/fast-deep-equal": "3.1.4",
|
|
35
35
|
"@superblocksteam/iso-currency": "2.0.0",
|
|
36
|
-
"@superblocksteam/library-shared": "2.0.
|
|
36
|
+
"@superblocksteam/library-shared": "2.0.13-next.0",
|
|
37
37
|
"@superblocksteam/shared": "0.9160.0",
|
|
38
38
|
"antd": "4.24.15",
|
|
39
39
|
"apca-w3": "^0.1.9",
|