@lowdefy/engine 3.23.2 → 4.0.0-alpha.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.
@@ -1,32 +1,19 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
-
8
- var _getBlockMatcher = _interopRequireDefault(require("../getBlockMatcher"));
9
-
10
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
-
12
- function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
13
-
14
- function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
15
-
16
- function ResetValidation(_x) {
17
- return _ResetValidation.apply(this, arguments);
18
- }
19
-
20
- function _ResetValidation() {
21
- _ResetValidation = _asyncToGenerator(function* (_ref) {
22
- var {
23
- context,
24
- params
25
- } = _ref;
26
- context.RootBlocks.resetValidation((0, _getBlockMatcher.default)(params));
27
- });
28
- return _ResetValidation.apply(this, arguments);
1
+ /*
2
+ Copyright 2020-2021 Lowdefy, Inc
3
+
4
+ Licensed under the Apache License, Version 2.0 (the "License");
5
+ you may not use this file except in compliance with the License.
6
+ You may obtain a copy of the License at
7
+
8
+ http://www.apache.org/licenses/LICENSE-2.0
9
+
10
+ Unless required by applicable law or agreed to in writing, software
11
+ distributed under the License is distributed on an "AS IS" BASIS,
12
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ See the License for the specific language governing permissions and
14
+ limitations under the License.
15
+ */ import getBlockMatcher from '../getBlockMatcher.js';
16
+ async function ResetValidation({ context , params }) {
17
+ context._internal.RootBlocks.resetValidation(getBlockMatcher(params));
29
18
  }
30
-
31
- var _default = ResetValidation;
32
- exports.default = _default;
19
+ export default ResetValidation;
@@ -1,14 +1,3 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
-
8
- function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
9
-
10
- function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
11
-
12
1
  /*
13
2
  Copyright 2020-2021 Lowdefy, Inc
14
3
 
@@ -23,30 +12,14 @@ function _asyncToGenerator(fn) { return function () { var self = this, args = ar
23
12
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
24
13
  See the License for the specific language governing permissions and
25
14
  limitations under the License.
26
- */
27
- function ScrollTo(_x) {
28
- return _ScrollTo.apply(this, arguments);
29
- }
30
-
31
- function _ScrollTo() {
32
- _ScrollTo = _asyncToGenerator(function* (_ref) {
33
- var {
34
- context,
35
- params = {}
36
- } = _ref;
37
-
15
+ */ async function ScrollTo({ context , params ={} }) {
38
16
  if (params.blockId) {
39
- var element = context.lowdefy.document.getElementById(params.blockId);
40
-
41
- if (element) {
42
- element.scrollIntoView(params.options);
43
- }
17
+ const element = context._internal.lowdefy._internal.document.getElementById(params.blockId);
18
+ if (element) {
19
+ element.scrollIntoView(params.options);
20
+ }
44
21
  } else {
45
- context.lowdefy.window.scrollTo(params);
22
+ context._internal.lowdefy._internal.window.scrollTo(params);
46
23
  }
47
- });
48
- return _ScrollTo.apply(this, arguments);
49
24
  }
50
-
51
- var _default = ScrollTo;
52
- exports.default = _default;
25
+ export default ScrollTo;
@@ -1,35 +1,23 @@
1
- "use strict";
1
+ /*
2
+ Copyright 2020-2021 Lowdefy, Inc
2
3
 
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
4
+ Licensed under the Apache License, Version 2.0 (the "License");
5
+ you may not use this file except in compliance with the License.
6
+ You may obtain a copy of the License at
7
7
 
8
- var _helpers = require("@lowdefy/helpers");
8
+ http://www.apache.org/licenses/LICENSE-2.0
9
9
 
10
- function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
11
-
12
- function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
13
-
14
- function SetGlobal(_x) {
15
- return _SetGlobal.apply(this, arguments);
16
- }
17
-
18
- function _SetGlobal() {
19
- _SetGlobal = _asyncToGenerator(function* (_ref) {
20
- var {
21
- arrayIndices,
22
- context,
23
- params
24
- } = _ref;
25
- Object.keys(params).forEach(key => {
26
- (0, _helpers.set)(context.lowdefy.lowdefyGlobal, (0, _helpers.applyArrayIndices)(arrayIndices, key), params[key]);
10
+ Unless required by applicable law or agreed to in writing, software
11
+ distributed under the License is distributed on an "AS IS" BASIS,
12
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ See the License for the specific language governing permissions and
14
+ limitations under the License.
15
+ */ import { applyArrayIndices, set } from '@lowdefy/helpers';
16
+ async function SetGlobal({ arrayIndices , context , params }) {
17
+ Object.keys(params).forEach((key)=>{
18
+ set(context._internal.lowdefy.lowdefyGlobal, applyArrayIndices(arrayIndices, key), params[key]);
27
19
  });
28
- context.RootBlocks.reset();
29
- context.update();
30
- });
31
- return _SetGlobal.apply(this, arguments);
20
+ context._internal.RootBlocks.reset();
21
+ context._internal.update();
32
22
  }
33
-
34
- var _default = SetGlobal;
35
- exports.default = _default;
23
+ export default SetGlobal;
@@ -1,35 +1,23 @@
1
- "use strict";
1
+ /*
2
+ Copyright 2020-2021 Lowdefy, Inc
2
3
 
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
4
+ Licensed under the Apache License, Version 2.0 (the "License");
5
+ you may not use this file except in compliance with the License.
6
+ You may obtain a copy of the License at
7
7
 
8
- var _helpers = require("@lowdefy/helpers");
8
+ http://www.apache.org/licenses/LICENSE-2.0
9
9
 
10
- function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
11
-
12
- function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
13
-
14
- function SetState(_x) {
15
- return _SetState.apply(this, arguments);
16
- }
17
-
18
- function _SetState() {
19
- _SetState = _asyncToGenerator(function* (_ref) {
20
- var {
21
- arrayIndices,
22
- context,
23
- params
24
- } = _ref;
25
- Object.keys(params).forEach(key => {
26
- context.State.set((0, _helpers.applyArrayIndices)(arrayIndices, key), params[key]);
10
+ Unless required by applicable law or agreed to in writing, software
11
+ distributed under the License is distributed on an "AS IS" BASIS,
12
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ See the License for the specific language governing permissions and
14
+ limitations under the License.
15
+ */ import { applyArrayIndices } from '@lowdefy/helpers';
16
+ async function SetState({ arrayIndices , context , params }) {
17
+ Object.keys(params).forEach((key)=>{
18
+ context._internal.State.set(applyArrayIndices(arrayIndices, key), params[key]);
27
19
  });
28
- context.RootBlocks.reset();
29
- context.update();
30
- });
31
- return _SetState.apply(this, arguments);
20
+ context._internal.RootBlocks.reset();
21
+ context._internal.update();
32
22
  }
33
-
34
- var _default = SetState;
35
- exports.default = _default;
23
+ export default SetState;
@@ -1,13 +1,3 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.Throw = Throw;
7
- exports.ThrowActionError = exports.default = void 0;
8
-
9
- var _helpers = require("@lowdefy/helpers");
10
-
11
1
  /*
12
2
  Copyright 2020-2021 Lowdefy, Inc
13
3
 
@@ -22,46 +12,28 @@ var _helpers = require("@lowdefy/helpers");
22
12
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
23
13
  See the License for the specific language governing permissions and
24
14
  limitations under the License.
25
- */
26
- class ThrowActionError extends Error {
27
- constructor(message, _ref) {
28
- var {
29
- blockId,
30
- context,
31
- metaData
32
- } = _ref;
33
- super(message);
34
- this.blockId = blockId;
35
- this.metaData = metaData;
36
- this.name = 'ThrowError';
37
- this.pageId = context.pageId;
38
- }
39
-
15
+ */ import { type } from '@lowdefy/helpers';
16
+ let ThrowActionError = class ThrowActionError extends Error {
17
+ constructor(message, { blockId , context , metaData }){
18
+ super(message);
19
+ this.blockId = blockId;
20
+ this.metaData = metaData;
21
+ this.name = 'ThrowError';
22
+ this.pageId = context.pageId;
23
+ }
24
+ };
25
+ function Throw({ blockId , context , params ={} }) {
26
+ if (params.throw === false || type.isNone(params.throw)) {
27
+ return;
28
+ }
29
+ if (params.throw === true) {
30
+ throw new ThrowActionError(params.message, {
31
+ blockId,
32
+ context,
33
+ metaData: params.metaData
34
+ });
35
+ }
36
+ throw new Error(`Invalid Throw, check action params. Received "${JSON.stringify(params)}".`);
40
37
  }
41
-
42
- exports.ThrowActionError = ThrowActionError;
43
-
44
- function Throw(_ref2) {
45
- var {
46
- blockId,
47
- context,
48
- params = {}
49
- } = _ref2;
50
-
51
- if (params.throw === false || _helpers.type.isNone(params.throw)) {
52
- return;
53
- }
54
-
55
- if (params.throw === true) {
56
- throw new ThrowActionError(params.message, {
57
- blockId,
58
- context,
59
- metaData: params.metaData
60
- });
61
- }
62
-
63
- throw new Error("Invalid Throw, check action params. Received \"".concat(JSON.stringify(params), "\"."));
64
- }
65
-
66
- var _default = Throw;
67
- exports.default = _default;
38
+ export default Throw;
39
+ export { Throw, ThrowActionError };
@@ -1,37 +1,23 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
-
8
- var _getBlockMatcher = _interopRequireDefault(require("../getBlockMatcher"));
9
-
10
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
-
12
- function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
13
-
14
- function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
15
-
16
- function Validate(_x) {
17
- return _Validate.apply(this, arguments);
18
- }
19
-
20
- function _Validate() {
21
- _Validate = _asyncToGenerator(function* (_ref) {
22
- var {
23
- context,
24
- params
25
- } = _ref;
26
- var validationErrors = context.RootBlocks.validate((0, _getBlockMatcher.default)(params));
27
-
1
+ /*
2
+ Copyright 2020-2021 Lowdefy, Inc
3
+
4
+ Licensed under the Apache License, Version 2.0 (the "License");
5
+ you may not use this file except in compliance with the License.
6
+ You may obtain a copy of the License at
7
+
8
+ http://www.apache.org/licenses/LICENSE-2.0
9
+
10
+ Unless required by applicable law or agreed to in writing, software
11
+ distributed under the License is distributed on an "AS IS" BASIS,
12
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ See the License for the specific language governing permissions and
14
+ limitations under the License.
15
+ */ import getBlockMatcher from '../getBlockMatcher.js';
16
+ async function Validate({ context , params }) {
17
+ const validationErrors = context.RootBlocks.validate(getBlockMatcher(params));
28
18
  if (validationErrors.length > 0) {
29
- var error = new Error("Your input has ".concat(validationErrors.length, " validation error").concat(validationErrors.length !== 1 ? 's' : '', "."));
30
- throw error;
19
+ const error = new Error(`Your input has ${validationErrors.length} validation error${validationErrors.length !== 1 ? 's' : ''}.`);
20
+ throw error;
31
21
  }
32
- });
33
- return _Validate.apply(this, arguments);
34
22
  }
35
-
36
- var _default = Validate;
37
- exports.default = _default;
23
+ export default Validate;
@@ -1,34 +1,22 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
-
8
- var _helpers = require("@lowdefy/helpers");
9
-
10
- function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
11
-
12
- function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
13
-
14
- function Wait(_x) {
15
- return _Wait.apply(this, arguments);
16
- }
17
-
18
- function _Wait() {
19
- _Wait = _asyncToGenerator(function* (_ref) {
20
- var {
21
- params
22
- } = _ref;
23
-
24
- if (!_helpers.type.isInt(params.ms)) {
25
- throw new Error("Wait action \"ms\" param should be an integer.");
1
+ /*
2
+ Copyright 2020-2021 Lowdefy, Inc
3
+
4
+ Licensed under the Apache License, Version 2.0 (the "License");
5
+ you may not use this file except in compliance with the License.
6
+ You may obtain a copy of the License at
7
+
8
+ http://www.apache.org/licenses/LICENSE-2.0
9
+
10
+ Unless required by applicable law or agreed to in writing, software
11
+ distributed under the License is distributed on an "AS IS" BASIS,
12
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ See the License for the specific language governing permissions and
14
+ limitations under the License.
15
+ */ import { type, wait } from '@lowdefy/helpers';
16
+ async function Wait({ params }) {
17
+ if (!type.isInt(params.ms)) {
18
+ throw new Error(`Wait action "ms" param should be an integer.`);
26
19
  }
27
-
28
- return new Promise(resolve => setTimeout(resolve, params.ms));
29
- });
30
- return _Wait.apply(this, arguments);
20
+ return wait(params.ms);
31
21
  }
32
-
33
- var _default = Wait;
34
- exports.default = _default;
22
+ export default Wait;
@@ -1,42 +1,3 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
-
8
- var _CallMethod = _interopRequireDefault(require("./CallMethod"));
9
-
10
- var _JsAction = _interopRequireDefault(require("./JsAction"));
11
-
12
- var _Link = _interopRequireDefault(require("./Link"));
13
-
14
- var _Login = _interopRequireDefault(require("./Login"));
15
-
16
- var _Logout = _interopRequireDefault(require("./Logout"));
17
-
18
- var _Message = _interopRequireDefault(require("./Message"));
19
-
20
- var _Request = _interopRequireDefault(require("./Request"));
21
-
22
- var _Reset = _interopRequireDefault(require("./Reset"));
23
-
24
- var _ResetValidation = _interopRequireDefault(require("./ResetValidation"));
25
-
26
- var _ScrollTo = _interopRequireDefault(require("./ScrollTo"));
27
-
28
- var _SetGlobal = _interopRequireDefault(require("./SetGlobal"));
29
-
30
- var _SetState = _interopRequireDefault(require("./SetState"));
31
-
32
- var _Throw = _interopRequireDefault(require("./Throw"));
33
-
34
- var _Validate = _interopRequireDefault(require("./Validate"));
35
-
36
- var _Wait = _interopRequireDefault(require("./Wait"));
37
-
38
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
39
-
40
1
  /*
41
2
  Copyright 2020-2021 Lowdefy, Inc
42
3
 
@@ -51,22 +12,35 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
51
12
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
52
13
  See the License for the specific language governing permissions and
53
14
  limitations under the License.
54
- */
55
- var _default = {
56
- CallMethod: _CallMethod.default,
57
- JsAction: _JsAction.default,
58
- Link: _Link.default,
59
- Login: _Login.default,
60
- Logout: _Logout.default,
61
- Message: _Message.default,
62
- Request: _Request.default,
63
- Reset: _Reset.default,
64
- ResetValidation: _ResetValidation.default,
65
- ScrollTo: _ScrollTo.default,
66
- SetGlobal: _SetGlobal.default,
67
- SetState: _SetState.default,
68
- Throw: _Throw.default,
69
- Validate: _Validate.default,
70
- Wait: _Wait.default
15
+ */ import CallMethod from './CallMethod.js';
16
+ import JsAction from './JsAction.js';
17
+ import Link from './Link.js';
18
+ import Login from './Login.js';
19
+ import Logout from './Logout.js';
20
+ import Message from './Message.js';
21
+ import Request from './Request.js';
22
+ import Reset from './Reset.js';
23
+ import ResetValidation from './ResetValidation.js';
24
+ import ScrollTo from './ScrollTo.js';
25
+ import SetGlobal from './SetGlobal.js';
26
+ import SetState from './SetState.js';
27
+ import Throw from './Throw.js';
28
+ import Validate from './Validate.js';
29
+ import Wait from './Wait.js';
30
+ export default {
31
+ CallMethod,
32
+ JsAction,
33
+ Link,
34
+ Login,
35
+ Logout,
36
+ Message,
37
+ Request,
38
+ Reset,
39
+ ResetValidation,
40
+ ScrollTo,
41
+ SetGlobal,
42
+ SetState,
43
+ Throw,
44
+ Validate,
45
+ Wait
71
46
  };
72
- exports.default = _default;
@@ -1,14 +1,3 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
-
8
- var _helpers = require("@lowdefy/helpers");
9
-
10
- var _engine = require("@lowdefy/engine");
11
-
12
1
  /*
13
2
  Copyright 2020-2021 Lowdefy, Inc
14
3
 
@@ -23,53 +12,34 @@ var _engine = require("@lowdefy/engine");
23
12
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
24
13
  See the License for the specific language governing permissions and
25
14
  limitations under the License.
26
- */
27
- function createLink(_ref) {
28
- var {
29
- backLink,
30
- lowdefy,
31
- newOriginLink,
32
- sameOriginLink
33
- } = _ref;
34
-
35
- function link(_ref2) {
36
- var {
37
- back,
38
- home,
39
- input,
40
- newTab,
41
- pageId,
42
- url,
43
- urlQuery
44
- } = _ref2;
45
-
46
- if (back) {
47
- return backLink();
15
+ */ import { type, urlQuery as urlQueryFn } from '@lowdefy/helpers';
16
+ function createLink({ backLink , lowdefy , newOriginLink , sameOriginLink }) {
17
+ function link({ back , home , input , newTab , pageId , url , urlQuery }) {
18
+ let pathname = pageId;
19
+ if (back) {
20
+ return backLink();
21
+ }
22
+ const lowdefyUrlQuery = type.isNone(urlQuery) ? '' : `?${urlQueryFn.stringify(urlQuery)}`;
23
+ if (home) {
24
+ if (lowdefy.home.configured) {
25
+ pathname = '';
26
+ pageId = lowdefy.home.pageId;
27
+ } else {
28
+ pathname = lowdefy.home.pageId;
29
+ pageId = lowdefy.home.pageId;
30
+ }
31
+ }
32
+ if (!type.isNone(pathname)) {
33
+ if (!type.isNone(input)) {
34
+ lowdefy.inputs[pageId] = input;
35
+ }
36
+ return sameOriginLink(`/${pathname}${lowdefyUrlQuery}`, newTab);
37
+ }
38
+ if (!type.isNone(url)) {
39
+ return newOriginLink(`${url}${lowdefyUrlQuery}`, newTab);
40
+ }
41
+ throw new Error(`Invalid Link.`);
48
42
  }
49
-
50
- var lowdefyUrlQuery = _helpers.type.isNone(urlQuery) ? '' : "?".concat(_helpers.urlQuery.stringify(urlQuery));
51
- if (home) pageId = lowdefy.homePageId;
52
-
53
- if (pageId) {
54
- if (!_helpers.type.isNone(input)) {
55
- var nextContextId = (0, _engine.makeContextId)({
56
- pageId,
57
- urlQuery: urlQuery,
58
- blockId: pageId
59
- });
60
- lowdefy.inputs[nextContextId] = input;
61
- }
62
-
63
- return sameOriginLink("/".concat(pageId).concat(lowdefyUrlQuery), newTab);
64
- } else if (url) {
65
- return newOriginLink("".concat(url).concat(lowdefyUrlQuery), newTab);
66
- } else {
67
- throw new Error("Invalid Link.");
68
- }
69
- }
70
-
71
- return link;
43
+ return link;
72
44
  }
73
-
74
- var _default = createLink;
75
- exports.default = _default;
45
+ export default createLink;