@lowdefy/client 0.0.0-experimental-20250218100608 → 0.0.0-experimental-20250702125311

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/Client.js CHANGED
@@ -60,10 +60,10 @@ const Client = ({ auth, Components, config: rawConfig, jsMap, lowdefy, resetCont
60
60
  if (!context._internal.onInitDone) return '';
61
61
  return /*#__PURE__*/ React.createElement(React.Fragment, null, /*#__PURE__*/ React.createElement(Head, {
62
62
  Component: Components.Head,
63
- properties: context._internal.RootBlocks.map[config.pageConfig.blockId].eval.properties
63
+ properties: context._internal.RootAreas.map[config.pageConfig.blockId].eval.properties
64
64
  }), /*#__PURE__*/ React.createElement(Block, {
65
- block: context._internal.RootBlocks.map[config.pageConfig.blockId],
66
- Blocks: context._internal.RootBlocks,
65
+ block: context._internal.RootAreas.map[config.pageConfig.blockId],
66
+ Blocks: context._internal.RootAreas,
67
67
  context: context,
68
68
  lowdefy: lowdefy,
69
69
  parentLoading: false
@@ -16,6 +16,7 @@
16
16
  import { BlockLayout } from '@lowdefy/layout';
17
17
  import { makeCssClass } from '@lowdefy/block-utils';
18
18
  import { type } from '@lowdefy/helpers';
19
+ import InputContainer from './InputContainer.js';
19
20
  import Container from './Container.js';
20
21
  import List from './List.js';
21
22
  import LoadingBlock from './LoadingBlock.js';
@@ -84,6 +85,15 @@ const CategorySwitch = ({ block, Blocks, context, loading, lowdefy })=>{
84
85
  validation: block.eval.validation,
85
86
  value: block.value
86
87
  }));
88
+ case 'input-container':
89
+ return /*#__PURE__*/ React.createElement(InputContainer, {
90
+ block: block,
91
+ Blocks: Blocks,
92
+ Component: Component,
93
+ context: context,
94
+ loading: loading,
95
+ lowdefy: lowdefy
96
+ });
87
97
  default:
88
98
  return /*#__PURE__*/ React.createElement(BlockLayout, {
89
99
  id: `bl-${block.blockId}`,
@@ -19,7 +19,7 @@ import Block from './Block.js';
19
19
  const Container = ({ block, Blocks, Component, context, loading, lowdefy })=>{
20
20
  const content = {};
21
21
  // eslint-disable-next-line prefer-destructuring
22
- const areas = Blocks.subBlocks[block.id][0].areas;
22
+ const areas = Blocks.subAreas[block.id][0].areas;
23
23
  Object.keys(areas).forEach((areaKey, i)=>{
24
24
  content[areaKey] = (areaStyle)=>/*#__PURE__*/ React.createElement(Area, {
25
25
  area: block.eval.areas[areaKey],
@@ -34,7 +34,7 @@ const Container = ({ block, Blocks, Component, context, loading, lowdefy })=>{
34
34
  makeCssClass: makeCssClass
35
35
  }, areas[areaKey].blocks.map((bl, k)=>/*#__PURE__*/ React.createElement(Block, {
36
36
  block: bl,
37
- Blocks: Blocks.subBlocks[block.id][0],
37
+ Blocks: Blocks.subAreas[block.id][0],
38
38
  context: context,
39
39
  key: `co-${bl.blockId}-${k}`,
40
40
  lowdefy: lowdefy,
@@ -0,0 +1,77 @@
1
+ /*
2
+ Copyright 2020-2024 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 React from 'react';
16
+ import { Area, BlockLayout } from '@lowdefy/layout';
17
+ import { makeCssClass } from '@lowdefy/block-utils';
18
+ import Block from './Block.js';
19
+ const InputContainer = ({ block, Blocks, Component, context, loading, lowdefy })=>{
20
+ const content = {};
21
+ // eslint-disable-next-line prefer-destructuring
22
+ const areas = Blocks.subAreas[block.id][0].areas;
23
+ Object.keys(areas).forEach((areaKey, i)=>{
24
+ content[areaKey] = (areaStyle)=>/*#__PURE__*/ React.createElement(Area, {
25
+ area: block.eval.areas[areaKey],
26
+ areaKey: areaKey,
27
+ areaStyle: [
28
+ areaStyle,
29
+ block.eval.areas[areaKey]?.style
30
+ ],
31
+ id: `ar-${block.blockId}-${areaKey}`,
32
+ key: `ar-${block.blockId}-${areaKey}-${i}`,
33
+ layout: block.eval.layout,
34
+ makeCssClass: makeCssClass
35
+ }, areas[areaKey].blocks.map((bl, k)=>/*#__PURE__*/ React.createElement(Block, {
36
+ block: bl,
37
+ Blocks: Blocks.subAreas[block.id][0],
38
+ context: context,
39
+ key: `co-${bl.blockId}-${k}`,
40
+ lowdefy: lowdefy,
41
+ parentLoading: loading
42
+ })));
43
+ });
44
+ return /*#__PURE__*/ React.createElement(BlockLayout, {
45
+ blockStyle: block.eval.style,
46
+ id: `bl-${block.blockId}`,
47
+ layout: block.eval.layout,
48
+ makeCssClass: makeCssClass
49
+ }, /*#__PURE__*/ React.createElement(Component, {
50
+ methods: Object.assign(block.methods, {
51
+ makeCssClass,
52
+ registerEvent: block.registerEvent,
53
+ registerMethod: block.registerMethod,
54
+ triggerEvent: block.triggerEvent,
55
+ setValue: block.setValue,
56
+ moveItemDown: block.moveItemDown,
57
+ moveItemUp: block.moveItemUp,
58
+ pushItem: block.pushItem,
59
+ removeItem: block.removeItem,
60
+ unshiftItem: block.unshiftItem
61
+ }),
62
+ basePath: lowdefy.basePath,
63
+ blockId: block.blockId,
64
+ components: lowdefy._internal.components,
65
+ content: content,
66
+ events: block.eval.events,
67
+ key: block.blockId,
68
+ loading: loading,
69
+ menus: lowdefy.menus,
70
+ pageId: lowdefy.pageId,
71
+ properties: block.eval.properties,
72
+ required: block.eval.required,
73
+ validation: block.eval.validation,
74
+ value: block.value
75
+ }));
76
+ };
77
+ export default InputContainer;
@@ -19,7 +19,7 @@ import Block from './Block.js';
19
19
  const List = ({ block, Blocks, Component, context, loading, lowdefy })=>{
20
20
  const content = {};
21
21
  const contentList = [];
22
- Blocks.subBlocks[block.id].forEach((SBlock)=>{
22
+ Blocks.subAreas[block.id].forEach((SBlock)=>{
23
23
  Object.keys(SBlock.areas).forEach((areaKey)=>{
24
24
  content[areaKey] = (areaStyle)=>/*#__PURE__*/ React.createElement(Area, {
25
25
  area: block.eval.areas[areaKey],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lowdefy/client",
3
- "version": "0.0.0-experimental-20250218100608",
3
+ "version": "0.0.0-experimental-20250702125311",
4
4
  "license": "Apache-2.0",
5
5
  "description": "Lowdefy Client",
6
6
  "homepage": "https://lowdefy.com",
@@ -34,10 +34,10 @@
34
34
  ],
35
35
  "dependencies": {
36
36
  "@ant-design/icons": "4.8.0",
37
- "@lowdefy/block-utils": "0.0.0-experimental-20250218100608",
38
- "@lowdefy/engine": "0.0.0-experimental-20250218100608",
39
- "@lowdefy/helpers": "0.0.0-experimental-20250218100608",
40
- "@lowdefy/layout": "0.0.0-experimental-20250218100608",
37
+ "@lowdefy/block-utils": "0.0.0-experimental-20250702125311",
38
+ "@lowdefy/engine": "0.0.0-experimental-20250702125311",
39
+ "@lowdefy/helpers": "0.0.0-experimental-20250702125311",
40
+ "@lowdefy/layout": "0.0.0-experimental-20250702125311",
41
41
  "classnames": "2.3.2",
42
42
  "react": "18.2.0",
43
43
  "react-dom": "18.2.0"
@@ -45,7 +45,7 @@
45
45
  "devDependencies": {
46
46
  "@emotion/jest": "11.10.5",
47
47
  "@jest/globals": "28.1.3",
48
- "@lowdefy/jest-yaml-transform": "0.0.0-experimental-20250218100608",
48
+ "@lowdefy/jest-yaml-transform": "0.0.0-experimental-20250702125311",
49
49
  "@swc/cli": "0.1.63",
50
50
  "@swc/core": "1.3.99",
51
51
  "@swc/jest": "0.2.29",