@redneckz/wildless-cms-uni-blocks 0.3.82 → 0.3.83
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/components/GroupBlock/renderBlocksTypes.js +4 -3
- package/dist/components/GroupBlock/renderBlocksTypes.js.map +1 -1
- package/lib/components/GroupBlock/renderBlocksTypes.js +4 -3
- package/lib/components/GroupBlock/renderBlocksTypes.js.map +1 -1
- package/mobile/dist/components/GroupBlock/renderBlocksTypes.js +4 -3
- package/mobile/dist/components/GroupBlock/renderBlocksTypes.js.map +1 -1
- package/mobile/lib/components/GroupBlock/renderBlocksTypes.js +4 -3
- package/mobile/lib/components/GroupBlock/renderBlocksTypes.js.map +1 -1
- package/mobile/src/components/GroupBlock/renderBlocksTypes.tsx +6 -3
- package/package.json +1 -1
- package/src/components/GroupBlock/renderBlocksTypes.tsx +6 -3
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
2
|
exports.renderBlock = void 0;
|
|
3
3
|
const jsx_runtime_1 = require("@redneckz/uni-jsx/jsx-runtime");
|
|
4
|
-
const EmbeddableGroupBlocks_1 = require("./EmbeddableGroupBlocks");
|
|
5
4
|
const style2className_1 = require("../../utils/style2className");
|
|
5
|
+
const EmbeddableGroupBlocks_1 = require("./EmbeddableGroupBlocks");
|
|
6
6
|
const renderBlock = ({ context, className }) => (block, i) => {
|
|
7
7
|
const type = block?.blockType;
|
|
8
8
|
if (!type || !(type in EmbeddableGroupBlocks_1.EmbeddableGroupBlocks)) {
|
|
9
9
|
return null;
|
|
10
10
|
}
|
|
11
|
-
const
|
|
11
|
+
const { style, ...rest } = block;
|
|
12
|
+
const classNameBlock = (0, style2className_1.style2className)(style);
|
|
12
13
|
const EmbeddedBlock = EmbeddableGroupBlocks_1.EmbeddableGroupBlocks[type];
|
|
13
|
-
return ((0, jsx_runtime_1.jsx)("div", { className: className, children: (0, jsx_runtime_1.jsx)(EmbeddedBlock, { context: context, ...
|
|
14
|
+
return ((0, jsx_runtime_1.jsx)("div", { className: className, children: (0, jsx_runtime_1.jsx)(EmbeddedBlock, { context: context, ...rest, className: classNameBlock }) }, `block_${i}`));
|
|
14
15
|
};
|
|
15
16
|
exports.renderBlock = renderBlock;
|
|
16
17
|
//# sourceMappingURL=renderBlocksTypes.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"renderBlocksTypes.js","sourceRoot":"","sources":["../../../src/components/GroupBlock/renderBlocksTypes.tsx"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"renderBlocksTypes.js","sourceRoot":"","sources":["../../../src/components/GroupBlock/renderBlocksTypes.tsx"],"names":[],"mappings":";;;AAEA,iEAA8D;AAE9D,mEAAgE;AAQzD,MAAM,WAAW,GACtB,CAAC,EAAE,OAAO,EAAE,SAAS,EAAyB,EAAE,EAAE,CAClD,CAAC,KAAoB,EAAE,CAAS,EAAE,EAAE;IAClC,MAAM,IAAI,GAAG,KAAK,EAAE,SAAS,CAAC;IAC9B,IAAI,CAAC,IAAI,IAAI,CAAC,CAAC,IAAI,IAAI,6CAAqB,CAAC,EAAE;QAC7C,OAAO,IAAI,CAAC;KACb;IAED,MAAM,EAAE,KAAK,EAAE,GAAG,IAAI,EAAE,GAAG,KAAK,CAAC;IAEjC,MAAM,cAAc,GAAG,IAAA,iCAAe,EAAC,KAAK,CAAC,CAAC;IAC9C,MAAM,aAAa,GAAa,6CAAqB,CAAC,IAAI,CAAC,CAAC;IAE5D,OAAO,CACL,gCAAK,SAAS,EAAE,SAAS,YACvB,uBAAC,aAAa,IAAC,OAAO,EAAE,OAAO,KAAM,IAAI,EAAE,SAAS,EAAE,cAAc,GAAI,IAD1C,SAAS,CAAC,EAAE,CAEtC,CACP,CAAC;AACJ,CAAC,CAAC;AAlBS,QAAA,WAAW,eAkBpB"}
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { jsx as _jsx } from "@redneckz/uni-jsx/jsx-runtime";
|
|
2
|
-
import { EmbeddableGroupBlocks } from './EmbeddableGroupBlocks.js';
|
|
3
2
|
import { style2className } from '../../utils/style2className.js';
|
|
3
|
+
import { EmbeddableGroupBlocks } from './EmbeddableGroupBlocks.js';
|
|
4
4
|
export const renderBlock = ({ context, className }) => (block, i) => {
|
|
5
5
|
const type = block?.blockType;
|
|
6
6
|
if (!type || !(type in EmbeddableGroupBlocks)) {
|
|
7
7
|
return null;
|
|
8
8
|
}
|
|
9
|
-
const
|
|
9
|
+
const { style, ...rest } = block;
|
|
10
|
+
const classNameBlock = style2className(style);
|
|
10
11
|
const EmbeddedBlock = EmbeddableGroupBlocks[type];
|
|
11
|
-
return (_jsx("div", { className: className, children: _jsx(EmbeddedBlock, { context: context, ...
|
|
12
|
+
return (_jsx("div", { className: className, children: _jsx(EmbeddedBlock, { context: context, ...rest, className: classNameBlock }) }, `block_${i}`));
|
|
12
13
|
};
|
|
13
14
|
//# sourceMappingURL=renderBlocksTypes.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"renderBlocksTypes.js","sourceRoot":"","sources":["../../../src/components/GroupBlock/renderBlocksTypes.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"renderBlocksTypes.js","sourceRoot":"","sources":["../../../src/components/GroupBlock/renderBlocksTypes.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAE9D,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAQhE,MAAM,CAAC,MAAM,WAAW,GACtB,CAAC,EAAE,OAAO,EAAE,SAAS,EAAyB,EAAE,EAAE,CAClD,CAAC,KAAoB,EAAE,CAAS,EAAE,EAAE;IAClC,MAAM,IAAI,GAAG,KAAK,EAAE,SAAS,CAAC;IAC9B,IAAI,CAAC,IAAI,IAAI,CAAC,CAAC,IAAI,IAAI,qBAAqB,CAAC,EAAE;QAC7C,OAAO,IAAI,CAAC;KACb;IAED,MAAM,EAAE,KAAK,EAAE,GAAG,IAAI,EAAE,GAAG,KAAK,CAAC;IAEjC,MAAM,cAAc,GAAG,eAAe,CAAC,KAAK,CAAC,CAAC;IAC9C,MAAM,aAAa,GAAa,qBAAqB,CAAC,IAAI,CAAC,CAAC;IAE5D,OAAO,CACL,cAAK,SAAS,EAAE,SAAS,YACvB,KAAC,aAAa,IAAC,OAAO,EAAE,OAAO,KAAM,IAAI,EAAE,SAAS,EAAE,cAAc,GAAI,IAD1C,SAAS,CAAC,EAAE,CAEtC,CACP,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
2
|
exports.renderBlock = void 0;
|
|
3
3
|
const jsx_runtime_1 = require("@redneckz/uni-jsx/jsx-runtime");
|
|
4
|
-
const EmbeddableGroupBlocks_1 = require("./EmbeddableGroupBlocks");
|
|
5
4
|
const style2className_1 = require("../../utils/style2className");
|
|
5
|
+
const EmbeddableGroupBlocks_1 = require("./EmbeddableGroupBlocks");
|
|
6
6
|
const renderBlock = ({ context, className }) => (block, i) => {
|
|
7
7
|
const type = block?.blockType;
|
|
8
8
|
if (!type || !(type in EmbeddableGroupBlocks_1.EmbeddableGroupBlocks)) {
|
|
9
9
|
return null;
|
|
10
10
|
}
|
|
11
|
-
const
|
|
11
|
+
const { style, ...rest } = block;
|
|
12
|
+
const classNameBlock = (0, style2className_1.style2className)(style);
|
|
12
13
|
const EmbeddedBlock = EmbeddableGroupBlocks_1.EmbeddableGroupBlocks[type];
|
|
13
|
-
return ((0, jsx_runtime_1.jsx)("div", { className: className, children: (0, jsx_runtime_1.jsx)(EmbeddedBlock, { context: context, ...
|
|
14
|
+
return ((0, jsx_runtime_1.jsx)("div", { className: className, children: (0, jsx_runtime_1.jsx)(EmbeddedBlock, { context: context, ...rest, className: classNameBlock }) }, `block_${i}`));
|
|
14
15
|
};
|
|
15
16
|
exports.renderBlock = renderBlock;
|
|
16
17
|
//# sourceMappingURL=renderBlocksTypes.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"renderBlocksTypes.js","sourceRoot":"","sources":["../../../src/components/GroupBlock/renderBlocksTypes.tsx"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"renderBlocksTypes.js","sourceRoot":"","sources":["../../../src/components/GroupBlock/renderBlocksTypes.tsx"],"names":[],"mappings":";;;AAEA,iEAA8D;AAE9D,mEAAgE;AAQzD,MAAM,WAAW,GACtB,CAAC,EAAE,OAAO,EAAE,SAAS,EAAyB,EAAE,EAAE,CAClD,CAAC,KAAoB,EAAE,CAAS,EAAE,EAAE;IAClC,MAAM,IAAI,GAAG,KAAK,EAAE,SAAS,CAAC;IAC9B,IAAI,CAAC,IAAI,IAAI,CAAC,CAAC,IAAI,IAAI,6CAAqB,CAAC,EAAE;QAC7C,OAAO,IAAI,CAAC;KACb;IAED,MAAM,EAAE,KAAK,EAAE,GAAG,IAAI,EAAE,GAAG,KAAK,CAAC;IAEjC,MAAM,cAAc,GAAG,IAAA,iCAAe,EAAC,KAAK,CAAC,CAAC;IAC9C,MAAM,aAAa,GAAa,6CAAqB,CAAC,IAAI,CAAC,CAAC;IAE5D,OAAO,CACL,gCAAK,SAAS,EAAE,SAAS,YACvB,uBAAC,aAAa,IAAC,OAAO,EAAE,OAAO,KAAM,IAAI,EAAE,SAAS,EAAE,cAAc,GAAI,IAD1C,SAAS,CAAC,EAAE,CAEtC,CACP,CAAC;AACJ,CAAC,CAAC;AAlBS,QAAA,WAAW,eAkBpB"}
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { jsx as _jsx } from "@redneckz/uni-jsx/jsx-runtime";
|
|
2
|
-
import { EmbeddableGroupBlocks } from './EmbeddableGroupBlocks.js';
|
|
3
2
|
import { style2className } from '../../utils/style2className.js';
|
|
3
|
+
import { EmbeddableGroupBlocks } from './EmbeddableGroupBlocks.js';
|
|
4
4
|
export const renderBlock = ({ context, className }) => (block, i) => {
|
|
5
5
|
const type = block?.blockType;
|
|
6
6
|
if (!type || !(type in EmbeddableGroupBlocks)) {
|
|
7
7
|
return null;
|
|
8
8
|
}
|
|
9
|
-
const
|
|
9
|
+
const { style, ...rest } = block;
|
|
10
|
+
const classNameBlock = style2className(style);
|
|
10
11
|
const EmbeddedBlock = EmbeddableGroupBlocks[type];
|
|
11
|
-
return (_jsx("div", { className: className, children: _jsx(EmbeddedBlock, { context: context, ...
|
|
12
|
+
return (_jsx("div", { className: className, children: _jsx(EmbeddedBlock, { context: context, ...rest, className: classNameBlock }) }, `block_${i}`));
|
|
12
13
|
};
|
|
13
14
|
//# sourceMappingURL=renderBlocksTypes.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"renderBlocksTypes.js","sourceRoot":"","sources":["../../../src/components/GroupBlock/renderBlocksTypes.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"renderBlocksTypes.js","sourceRoot":"","sources":["../../../src/components/GroupBlock/renderBlocksTypes.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAE9D,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAQhE,MAAM,CAAC,MAAM,WAAW,GACtB,CAAC,EAAE,OAAO,EAAE,SAAS,EAAyB,EAAE,EAAE,CAClD,CAAC,KAAoB,EAAE,CAAS,EAAE,EAAE;IAClC,MAAM,IAAI,GAAG,KAAK,EAAE,SAAS,CAAC;IAC9B,IAAI,CAAC,IAAI,IAAI,CAAC,CAAC,IAAI,IAAI,qBAAqB,CAAC,EAAE;QAC7C,OAAO,IAAI,CAAC;KACb;IAED,MAAM,EAAE,KAAK,EAAE,GAAG,IAAI,EAAE,GAAG,KAAK,CAAC;IAEjC,MAAM,cAAc,GAAG,eAAe,CAAC,KAAK,CAAC,CAAC;IAC9C,MAAM,aAAa,GAAa,qBAAqB,CAAC,IAAI,CAAC,CAAC;IAE5D,OAAO,CACL,cAAK,SAAS,EAAE,SAAS,YACvB,KAAC,aAAa,IAAC,OAAO,EAAE,OAAO,KAAM,IAAI,EAAE,SAAS,EAAE,cAAc,GAAI,IAD1C,SAAS,CAAC,EAAE,CAEtC,CACP,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { JSXBlock } from '../../components/ContentPage/ContentPage';
|
|
2
2
|
import type { ContentPageContext } from '../../components/ContentPage/ContentPageContext';
|
|
3
|
+
import { style2className } from '../../utils/style2className';
|
|
3
4
|
import type { GroupBlockDef } from './BlocksTypeProps';
|
|
4
5
|
import { EmbeddableGroupBlocks } from './EmbeddableGroupBlocks';
|
|
5
|
-
import { style2className } from '../../utils/style2className';
|
|
6
6
|
|
|
7
7
|
type EmbeddableBlocksProps = {
|
|
8
8
|
groupBlocks?: GroupBlockDef[];
|
|
@@ -17,12 +17,15 @@ export const renderBlock =
|
|
|
17
17
|
if (!type || !(type in EmbeddableGroupBlocks)) {
|
|
18
18
|
return null;
|
|
19
19
|
}
|
|
20
|
-
|
|
20
|
+
|
|
21
|
+
const { style, ...rest } = block;
|
|
22
|
+
|
|
23
|
+
const classNameBlock = style2className(style);
|
|
21
24
|
const EmbeddedBlock: JSXBlock = EmbeddableGroupBlocks[type];
|
|
22
25
|
|
|
23
26
|
return (
|
|
24
27
|
<div className={className} key={`block_${i}`}>
|
|
25
|
-
<EmbeddedBlock context={context} {...
|
|
28
|
+
<EmbeddedBlock context={context} {...rest} className={classNameBlock} />
|
|
26
29
|
</div>
|
|
27
30
|
);
|
|
28
31
|
};
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { JSXBlock } from '../../components/ContentPage/ContentPage';
|
|
2
2
|
import type { ContentPageContext } from '../../components/ContentPage/ContentPageContext';
|
|
3
|
+
import { style2className } from '../../utils/style2className';
|
|
3
4
|
import type { GroupBlockDef } from './BlocksTypeProps';
|
|
4
5
|
import { EmbeddableGroupBlocks } from './EmbeddableGroupBlocks';
|
|
5
|
-
import { style2className } from '../../utils/style2className';
|
|
6
6
|
|
|
7
7
|
type EmbeddableBlocksProps = {
|
|
8
8
|
groupBlocks?: GroupBlockDef[];
|
|
@@ -17,12 +17,15 @@ export const renderBlock =
|
|
|
17
17
|
if (!type || !(type in EmbeddableGroupBlocks)) {
|
|
18
18
|
return null;
|
|
19
19
|
}
|
|
20
|
-
|
|
20
|
+
|
|
21
|
+
const { style, ...rest } = block;
|
|
22
|
+
|
|
23
|
+
const classNameBlock = style2className(style);
|
|
21
24
|
const EmbeddedBlock: JSXBlock = EmbeddableGroupBlocks[type];
|
|
22
25
|
|
|
23
26
|
return (
|
|
24
27
|
<div className={className} key={`block_${i}`}>
|
|
25
|
-
<EmbeddedBlock context={context} {...
|
|
28
|
+
<EmbeddedBlock context={context} {...rest} className={classNameBlock} />
|
|
26
29
|
</div>
|
|
27
30
|
);
|
|
28
31
|
};
|