@gem-sdk/components 2.0.0-staging.131 → 2.0.0-staging.132

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.
@@ -32,7 +32,7 @@ const Row = ({ className, children, setting, builderAttrs, builderProps, styles,
32
32
  });
33
33
  //=== END lazyload section ====
34
34
  const childHasChildren = React.useMemo(()=>{
35
- return builderProps?.builderData?.rawChildrens?.find((child)=>child?.childrens?.length);
35
+ return builderProps?.builderData?.childrens?.length;
36
36
  }, [
37
37
  builderProps
38
38
  ]);
@@ -44,8 +44,9 @@ const IconListV2 = ({ builderProps, style, setting, styles, advanced, pageContex
44
44
  ...core.makeStyleResponsive('rg', verticalSpacing)
45
45
  }}">
46
46
  ${valueMap?.map((node, key)=>{
47
+ let value = helpers.replaceLinkData(childItem?.[key]);
47
48
  const textVal = helpers.getDynamicSourceLocales({
48
- val: childItem?.[key],
49
+ val: value,
49
50
  uid: builderProps?.uid,
50
51
  settingId: `childItem_${key}`,
51
52
  pageContext,
@@ -208,7 +208,7 @@ const ProductList = ({ children, className, setting, styles, builderProps })=>{
208
208
  if (isProductGridNotRender) return;
209
209
  setTimeout(()=>{
210
210
  const { builderData } = builderProps ?? {};
211
- const targetUid = mode === 'edit' ? builderData?.rawChildrens?.[0]?.childrens?.[0] : builderData?.childrens?.[0];
211
+ const targetUid = builderData?.childrens?.[0];
212
212
  if (!targetUid) return;
213
213
  const container = document.querySelector(mode === 'edit' ? `[data-uid=${targetUid}]` : `[data-id=${targetUid}] div`);
214
214
  if (!container) return;
@@ -10,6 +10,7 @@ var React = require('react');
10
10
  const Text = /*#__PURE__*/ React.forwardRef(({ styles, builderAttrs, style, setting, advanced, builderProps, className, children, ...props }, ref)=>{
11
11
  const { text, htmlTag: Element = 'div', options, tagWidth, excludeFlex } = setting ?? {};
12
12
  const composeGlobalSize = core.makeGlobalSize(setting?.globalSize);
13
+ console.log('Text: ', text);
13
14
  const mode = core.useEditorMode();
14
15
  const getPlaceHolderWhenContentNone = ()=>{
15
16
  let classList = '';
@@ -28,7 +28,7 @@ const Row = ({ className, children, setting, builderAttrs, builderProps, styles,
28
28
  });
29
29
  //=== END lazyload section ====
30
30
  const childHasChildren = useMemo(()=>{
31
- return builderProps?.builderData?.rawChildrens?.find((child)=>child?.childrens?.length);
31
+ return builderProps?.builderData?.childrens?.length;
32
32
  }, [
33
33
  builderProps
34
34
  ]);
@@ -1,5 +1,5 @@
1
1
  import { makeGlobalSize, composeTypographyStyle, composeTypographyClassName, template, dataStringify, getStyleBackgroundByDevice, RenderIf, makeStyleResponsive, makeStyle, getSingleColorVariable, isLocalEnv, baseAssetURL } from '@gem-sdk/core';
2
- import { getStaticLocale, getDynamicSourceLocales, getSettingPreloadData } from '../../helpers.js';
2
+ import { getStaticLocale, replaceLinkData, getDynamicSourceLocales, getSettingPreloadData } from '../../helpers.js';
3
3
 
4
4
  const IconListV2 = ({ builderProps, style, setting, styles, advanced, pageContext })=>{
5
5
  const { childItem, childConfig, iconType, iconSvg, iconWidth, globalSize, textTypo, translate } = setting ?? {};
@@ -40,8 +40,9 @@ const IconListV2 = ({ builderProps, style, setting, styles, advanced, pageContex
40
40
  ...makeStyleResponsive('rg', verticalSpacing)
41
41
  }}">
42
42
  ${valueMap?.map((node, key)=>{
43
+ let value = replaceLinkData(childItem?.[key]);
43
44
  const textVal = getDynamicSourceLocales({
44
- val: childItem?.[key],
45
+ val: value,
45
46
  uid: builderProps?.uid,
46
47
  settingId: `childItem_${key}`,
47
48
  pageContext,
@@ -204,7 +204,7 @@ const ProductList = ({ children, className, setting, styles, builderProps })=>{
204
204
  if (isProductGridNotRender) return;
205
205
  setTimeout(()=>{
206
206
  const { builderData } = builderProps ?? {};
207
- const targetUid = mode === 'edit' ? builderData?.rawChildrens?.[0]?.childrens?.[0] : builderData?.childrens?.[0];
207
+ const targetUid = builderData?.childrens?.[0];
208
208
  if (!targetUid) return;
209
209
  const container = document.querySelector(mode === 'edit' ? `[data-uid=${targetUid}]` : `[data-id=${targetUid}] div`);
210
210
  if (!container) return;
@@ -6,6 +6,7 @@ import { forwardRef, useMemo } from 'react';
6
6
  const Text = /*#__PURE__*/ forwardRef(({ styles, builderAttrs, style, setting, advanced, builderProps, className, children, ...props }, ref)=>{
7
7
  const { text, htmlTag: Element = 'div', options, tagWidth, excludeFlex } = setting ?? {};
8
8
  const composeGlobalSize = makeGlobalSize(setting?.globalSize);
9
+ console.log('Text: ', text);
9
10
  const mode = useEditorMode();
10
11
  const getPlaceHolderWhenContentNone = ()=>{
11
12
  let classList = '';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gem-sdk/components",
3
- "version": "2.0.0-staging.131",
3
+ "version": "2.0.0-staging.132",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "main": "dist/cjs/index.js",
@@ -22,7 +22,7 @@
22
22
  "relationship": "rollup -c ./scripts/rollup.config.settings.mjs && node ./scripts/get-control-relationship.js && node ./scripts/get-element-relationship.js"
23
23
  },
24
24
  "devDependencies": {
25
- "@gem-sdk/core": "2.0.0-staging.117",
25
+ "@gem-sdk/core": "2.0.0-staging.132",
26
26
  "@gem-sdk/styles": "2.0.0-staging.127",
27
27
  "@types/react-transition-group": "^4.4.5"
28
28
  },