@gem-sdk/core 1.23.0-staging.230 → 1.23.0-staging.233

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.
@@ -213,10 +213,11 @@ const ComponentToolbarPreview = ({ ...props })=>{
213
213
  return false;
214
214
  };
215
215
  const getSectionName = ()=>{
216
- if (props.name && props.name === `Section ${props.uid}`) {
217
- return `Section ${getIndexSection() + 1}${getSectionNumber() >= SECTION_LIMIT - 5 ? `/${SECTION_LIMIT}` : ''}`;
216
+ const checkRenamedSection = props.name && props.name === `Section ${props.uid}`;
217
+ if (getSectionNumber() >= SECTION_LIMIT - 5) {
218
+ return checkRenamedSection ? 'Section' : `${props?.name} ${getIndexSection() + 1}/${SECTION_LIMIT}`;
218
219
  }
219
- return props.name;
220
+ return checkRenamedSection ? `Section ${getIndexSection() + 1}` : props?.name;
220
221
  };
221
222
  return /*#__PURE__*/ jsxRuntime.jsxs(jsxRuntime.Fragment, {
222
223
  children: [
@@ -211,10 +211,11 @@ const ComponentToolbarPreview = ({ ...props })=>{
211
211
  return false;
212
212
  };
213
213
  const getSectionName = ()=>{
214
- if (props.name && props.name === `Section ${props.uid}`) {
215
- return `Section ${getIndexSection() + 1}${getSectionNumber() >= SECTION_LIMIT - 5 ? `/${SECTION_LIMIT}` : ''}`;
214
+ const checkRenamedSection = props.name && props.name === `Section ${props.uid}`;
215
+ if (getSectionNumber() >= SECTION_LIMIT - 5) {
216
+ return checkRenamedSection ? 'Section' : `${props?.name} ${getIndexSection() + 1}/${SECTION_LIMIT}`;
216
217
  }
217
- return props.name;
218
+ return checkRenamedSection ? `Section ${getIndexSection() + 1}` : props?.name;
218
219
  };
219
220
  return /*#__PURE__*/ jsxs(Fragment, {
220
221
  children: [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gem-sdk/core",
3
- "version": "1.23.0-staging.230",
3
+ "version": "1.23.0-staging.233",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "main": "dist/cjs/index.js",
@@ -25,7 +25,7 @@
25
25
  },
26
26
  "devDependencies": {
27
27
  "@gem-sdk/adapter-shopify": "1.23.0-staging.26",
28
- "@gem-sdk/styles": "1.23.0-staging.207"
28
+ "@gem-sdk/styles": "1.23.0-staging.233"
29
29
  },
30
30
  "dependencies": {
31
31
  "react-error-boundary": "4.0.10",