@lowdefy/engine 4.0.0-alpha.20 → 4.0.0-alpha.21

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.
@@ -13,12 +13,17 @@
13
13
  See the License for the specific language governing permissions and
14
14
  limitations under the License.
15
15
  */ import getFromObject from './getFromObject.js';
16
+ import { urlQuery } from '@lowdefy/helpers';
16
17
  function createGetUrlQuery({ arrayIndices , blockId , context }) {
17
18
  return function getUrlQuery(params) {
19
+ const { window } = context._internal.lowdefy._internal.globals;
20
+ if (!window?.location) {
21
+ throw new Error(`Browser window.location not available for getUrlQuery. Received: ${JSON.stringify(params)} on blockId: ${blockId}.`);
22
+ }
18
23
  return getFromObject({
19
24
  arrayIndices,
20
25
  location: blockId,
21
- object: context._internal.lowdefy.urlQuery,
26
+ object: urlQuery.parse(window.location.search.slice(1)),
22
27
  method: 'getUrlQuery',
23
28
  params
24
29
  });
@@ -38,7 +38,7 @@ function createLink({ backLink , disabledLink , lowdefy , newOriginLink , noLink
38
38
  pathname,
39
39
  query,
40
40
  setInput: ()=>{
41
- lowdefy.inputs[`page:${lowdefy.home.pageId}`] = props.input || {};
41
+ lowdefy.inputs[`page:${lowdefy.home.pageId}`] = props.input ?? {};
42
42
  }
43
43
  });
44
44
  }
@@ -48,7 +48,7 @@ function createLink({ backLink , disabledLink , lowdefy , newOriginLink , noLink
48
48
  pathname: `/${props.pageId}`,
49
49
  query,
50
50
  setInput: ()=>{
51
- lowdefy.inputs[`page:${props.pageId}`] = props.input || {};
51
+ lowdefy.inputs[`page:${props.pageId}`] = props.input ?? {};
52
52
  }
53
53
  });
54
54
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lowdefy/engine",
3
- "version": "4.0.0-alpha.20",
3
+ "version": "4.0.0-alpha.21",
4
4
  "license": "Apache-2.0",
5
5
  "description": "",
6
6
  "homepage": "https://lowdefy.com",
@@ -37,15 +37,15 @@
37
37
  "test": "yarn node --experimental-vm-modules $(yarn bin jest)"
38
38
  },
39
39
  "dependencies": {
40
- "@lowdefy/helpers": "4.0.0-alpha.20",
41
- "@lowdefy/operators": "4.0.0-alpha.20"
40
+ "@lowdefy/helpers": "4.0.0-alpha.21",
41
+ "@lowdefy/operators": "4.0.0-alpha.21"
42
42
  },
43
43
  "devDependencies": {
44
44
  "@jest/globals": "28.1.0",
45
- "@lowdefy/actions-core": "4.0.0-alpha.20",
46
- "@lowdefy/build": "4.0.0-alpha.20",
47
- "@lowdefy/operators-js": "4.0.0-alpha.20",
48
- "@lowdefy/operators-mql": "4.0.0-alpha.20",
45
+ "@lowdefy/actions-core": "4.0.0-alpha.21",
46
+ "@lowdefy/build": "4.0.0-alpha.21",
47
+ "@lowdefy/operators-js": "4.0.0-alpha.21",
48
+ "@lowdefy/operators-mql": "4.0.0-alpha.21",
49
49
  "@swc/cli": "0.1.57",
50
50
  "@swc/core": "1.2.194",
51
51
  "@swc/jest": "0.2.21",
@@ -54,5 +54,5 @@
54
54
  "publishConfig": {
55
55
  "access": "public"
56
56
  },
57
- "gitHead": "cf96c282e8ea38153ea815d72e2b95e5da1359f6"
57
+ "gitHead": "748794b56e36b9b63b8942a235b16e98c00e4e83"
58
58
  }