@lowdefy/client 0.0.0-experimental-20241205084114 → 0.0.0-experimental-20250625124206
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 +3 -3
- package/dist/block/CategorySwitch.js +10 -0
- package/dist/block/Container.js +2 -2
- package/dist/block/Hybrid.js +84 -0
- package/dist/block/List.js +1 -1
- package/package.json +6 -6
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.
|
|
63
|
+
properties: context._internal.RootAreas.map[config.pageConfig.blockId].eval.properties
|
|
64
64
|
}), /*#__PURE__*/ React.createElement(Block, {
|
|
65
|
-
block: context._internal.
|
|
66
|
-
Blocks: context._internal.
|
|
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 Hybrid from './Hybrid.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 'hybrid':
|
|
89
|
+
return /*#__PURE__*/ React.createElement(Hybrid, {
|
|
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}`,
|
package/dist/block/Container.js
CHANGED
|
@@ -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.
|
|
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.
|
|
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,84 @@
|
|
|
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 Hybrid = ({ block, Blocks, Component, context, loading, lowdefy })=>{
|
|
20
|
+
const content = {};
|
|
21
|
+
const contentList = [];
|
|
22
|
+
// eslint-disable-next-line prefer-destructuring
|
|
23
|
+
const SBlocks = Blocks.subAreas[block.id];
|
|
24
|
+
SBlocks.forEach((SBlock)=>{
|
|
25
|
+
Object.keys(SBlock.areas).forEach((areaKey, i)=>{
|
|
26
|
+
content[areaKey] = (areaStyle)=>/*#__PURE__*/ React.createElement(Area, {
|
|
27
|
+
area: block.eval.areas[areaKey],
|
|
28
|
+
areaKey: areaKey,
|
|
29
|
+
areaStyle: [
|
|
30
|
+
areaStyle,
|
|
31
|
+
block.eval.areas[areaKey]?.style
|
|
32
|
+
],
|
|
33
|
+
id: `ar-${block.blockId}-${areaKey}`,
|
|
34
|
+
key: `ar-${block.blockId}-${areaKey}-${i}`,
|
|
35
|
+
layout: block.eval.layout,
|
|
36
|
+
makeCssClass: makeCssClass
|
|
37
|
+
}, SBlock.areas[areaKey].blocks.map((bl, k)=>/*#__PURE__*/ React.createElement(Block, {
|
|
38
|
+
block: bl,
|
|
39
|
+
Blocks: Blocks.subAreas[block.id][0],
|
|
40
|
+
context: context,
|
|
41
|
+
key: `co-${bl.blockId}-${k}`,
|
|
42
|
+
lowdefy: lowdefy,
|
|
43
|
+
parentLoading: loading
|
|
44
|
+
})));
|
|
45
|
+
});
|
|
46
|
+
contentList.push({
|
|
47
|
+
...content
|
|
48
|
+
});
|
|
49
|
+
});
|
|
50
|
+
return /*#__PURE__*/ React.createElement(BlockLayout, {
|
|
51
|
+
blockStyle: block.eval.style,
|
|
52
|
+
id: `bl-${block.blockId}`,
|
|
53
|
+
layout: block.eval.layout,
|
|
54
|
+
makeCssClass: makeCssClass
|
|
55
|
+
}, /*#__PURE__*/ React.createElement(Component, {
|
|
56
|
+
methods: Object.assign(block.methods, {
|
|
57
|
+
makeCssClass,
|
|
58
|
+
registerEvent: block.registerEvent,
|
|
59
|
+
registerMethod: block.registerMethod,
|
|
60
|
+
triggerEvent: block.triggerEvent,
|
|
61
|
+
setValue: block.setValue,
|
|
62
|
+
moveItemDown: block.moveItemDown,
|
|
63
|
+
moveItemUp: block.moveItemUp,
|
|
64
|
+
pushItem: block.pushItem,
|
|
65
|
+
removeItem: block.removeItem,
|
|
66
|
+
unshiftItem: block.unshiftItem
|
|
67
|
+
}),
|
|
68
|
+
basePath: lowdefy.basePath,
|
|
69
|
+
blockId: block.blockId,
|
|
70
|
+
components: lowdefy._internal.components,
|
|
71
|
+
content: content,
|
|
72
|
+
events: block.eval.events,
|
|
73
|
+
key: block.blockId,
|
|
74
|
+
list: contentList,
|
|
75
|
+
loading: loading,
|
|
76
|
+
menus: lowdefy.menus,
|
|
77
|
+
pageId: lowdefy.pageId,
|
|
78
|
+
properties: block.eval.properties,
|
|
79
|
+
required: block.eval.required,
|
|
80
|
+
validation: block.eval.validation,
|
|
81
|
+
value: block.value
|
|
82
|
+
}));
|
|
83
|
+
};
|
|
84
|
+
export default Hybrid;
|
package/dist/block/List.js
CHANGED
|
@@ -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.
|
|
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-
|
|
3
|
+
"version": "0.0.0-experimental-20250625124206",
|
|
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-
|
|
38
|
-
"@lowdefy/engine": "0.0.0-experimental-
|
|
39
|
-
"@lowdefy/helpers": "0.0.0-experimental-
|
|
40
|
-
"@lowdefy/layout": "0.0.0-experimental-
|
|
37
|
+
"@lowdefy/block-utils": "0.0.0-experimental-20250625124206",
|
|
38
|
+
"@lowdefy/engine": "0.0.0-experimental-20250625124206",
|
|
39
|
+
"@lowdefy/helpers": "0.0.0-experimental-20250625124206",
|
|
40
|
+
"@lowdefy/layout": "0.0.0-experimental-20250625124206",
|
|
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-
|
|
48
|
+
"@lowdefy/jest-yaml-transform": "0.0.0-experimental-20250625124206",
|
|
49
49
|
"@swc/cli": "0.1.63",
|
|
50
50
|
"@swc/core": "1.3.99",
|
|
51
51
|
"@swc/jest": "0.2.29",
|