@gem-sdk/core 1.45.0-dev.100 → 1.45.0-dev.104

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.
@@ -74,6 +74,9 @@ const Render = ({ uid, builder, components, parentId, extraFiles = {}, pageConte
74
74
  advanced: item.advanced,
75
75
  parentId: componentsRenderWithParentId.includes(item.tag) ? parentId : null,
76
76
  pageContext,
77
+ builderAttrs: {
78
+ 'data-id': uid
79
+ },
77
80
  ...passProps,
78
81
  rawChildren: item.childrens.map((id)=>{
79
82
  return {
@@ -103,6 +106,9 @@ const Render = ({ uid, builder, components, parentId, extraFiles = {}, pageConte
103
106
  uid,
104
107
  builderData: item
105
108
  },
109
+ builderAttrs: {
110
+ 'data-id': uid
111
+ },
106
112
  styles: item.styles,
107
113
  setting: item.settings,
108
114
  advanced: item.advanced,
@@ -123,6 +129,9 @@ const Render = ({ uid, builder, components, parentId, extraFiles = {}, pageConte
123
129
  },
124
130
  styles: item.styles,
125
131
  setting: item.settings,
132
+ builderAttrs: {
133
+ 'data-id': uid
134
+ },
126
135
  advanced: {
127
136
  ...componentUsingAdvanced.includes(item.tag) ? item?.advanced : {},
128
137
  cssClass: item?.advanced?.cssClass
@@ -157,6 +166,9 @@ const Render = ({ uid, builder, components, parentId, extraFiles = {}, pageConte
157
166
  uid,
158
167
  builderData: item
159
168
  },
169
+ builderAttrs: {
170
+ 'data-id': uid
171
+ },
160
172
  styles: item.styles,
161
173
  setting: item.settings,
162
174
  advanced: {
@@ -220,6 +232,7 @@ const appendAnimation = (props, liquid)=>{
220
232
  const appearTablet = getAnimationType(getSettingsByDevice('tablet'), 'appear');
221
233
  const appearMobile = getAnimationType(getSettingsByDevice('mobile'), 'appear');
222
234
  const enableAnimation = animation?.desktop?.enabled && (appearDesktop !== 'none' || hoverDesktop !== 'none') || animation?.tablet?.enabled && appearTablet !== 'none' || animation?.mobile?.enabled && appearMobile !== 'none';
235
+ if (!enableAnimation) return liquid;
223
236
  const getInitVisibility = (device)=>getSettingsByDevice(device)?.enabled && ![
224
237
  'shake',
225
238
  'none'
@@ -7,8 +7,8 @@ var zustand = require('zustand');
7
7
  const ModalContext = /*#__PURE__*/ react.createContext(null);
8
8
  const createModalProvider = (data)=>zustand.createStore((set)=>({
9
9
  activeId: data,
10
- setModalActive: (id, notPostMessage)=>{
11
- !!notPostMessage && window?.parent?.postMessage?.(JSON.stringify({
10
+ setModalActive: (id, postMessage)=>{
11
+ postMessage && window?.parent?.postMessage?.(JSON.stringify({
12
12
  type: 'active-element',
13
13
  uid: id
14
14
  }), '*');
@@ -70,6 +70,9 @@ const Render = ({ uid, builder, components, parentId, extraFiles = {}, pageConte
70
70
  advanced: item.advanced,
71
71
  parentId: componentsRenderWithParentId.includes(item.tag) ? parentId : null,
72
72
  pageContext,
73
+ builderAttrs: {
74
+ 'data-id': uid
75
+ },
73
76
  ...passProps,
74
77
  rawChildren: item.childrens.map((id)=>{
75
78
  return {
@@ -99,6 +102,9 @@ const Render = ({ uid, builder, components, parentId, extraFiles = {}, pageConte
99
102
  uid,
100
103
  builderData: item
101
104
  },
105
+ builderAttrs: {
106
+ 'data-id': uid
107
+ },
102
108
  styles: item.styles,
103
109
  setting: item.settings,
104
110
  advanced: item.advanced,
@@ -119,6 +125,9 @@ const Render = ({ uid, builder, components, parentId, extraFiles = {}, pageConte
119
125
  },
120
126
  styles: item.styles,
121
127
  setting: item.settings,
128
+ builderAttrs: {
129
+ 'data-id': uid
130
+ },
122
131
  advanced: {
123
132
  ...componentUsingAdvanced.includes(item.tag) ? item?.advanced : {},
124
133
  cssClass: item?.advanced?.cssClass
@@ -153,6 +162,9 @@ const Render = ({ uid, builder, components, parentId, extraFiles = {}, pageConte
153
162
  uid,
154
163
  builderData: item
155
164
  },
165
+ builderAttrs: {
166
+ 'data-id': uid
167
+ },
156
168
  styles: item.styles,
157
169
  setting: item.settings,
158
170
  advanced: {
@@ -216,6 +228,7 @@ const appendAnimation = (props, liquid)=>{
216
228
  const appearTablet = getAnimationType(getSettingsByDevice('tablet'), 'appear');
217
229
  const appearMobile = getAnimationType(getSettingsByDevice('mobile'), 'appear');
218
230
  const enableAnimation = animation?.desktop?.enabled && (appearDesktop !== 'none' || hoverDesktop !== 'none') || animation?.tablet?.enabled && appearTablet !== 'none' || animation?.mobile?.enabled && appearMobile !== 'none';
231
+ if (!enableAnimation) return liquid;
219
232
  const getInitVisibility = (device)=>getSettingsByDevice(device)?.enabled && ![
220
233
  'shake',
221
234
  'none'
@@ -5,8 +5,8 @@ import { useStore, createStore } from 'zustand';
5
5
  const ModalContext = /*#__PURE__*/ createContext(null);
6
6
  const createModalProvider = (data)=>createStore((set)=>({
7
7
  activeId: data,
8
- setModalActive: (id, notPostMessage)=>{
9
- !!notPostMessage && window?.parent?.postMessage?.(JSON.stringify({
8
+ setModalActive: (id, postMessage)=>{
9
+ postMessage && window?.parent?.postMessage?.(JSON.stringify({
10
10
  type: 'active-element',
11
11
  uid: id
12
12
  }), '*');
@@ -29013,7 +29013,7 @@ declare const useCollectionStore: <U>(selector: (state: ExtractState<StoreApi<Co
29013
29013
 
29014
29014
  type ModalContextProps = {
29015
29015
  activeId?: string;
29016
- setModalActive: (id?: string, notPostMessage?: boolean) => void;
29016
+ setModalActive: (id?: string, postMessage?: boolean) => void;
29017
29017
  clearModal: () => void;
29018
29018
  };
29019
29019
  type ModalProviderProps = Pick<ModalContextProps, 'activeId'> & {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gem-sdk/core",
3
- "version": "1.45.0-dev.100",
3
+ "version": "1.45.0-dev.104",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "main": "dist/cjs/index.js",