@integry/sdk 4.6.55 → 4.6.57

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@integry/sdk",
3
- "version": "4.6.55",
3
+ "version": "4.6.57",
4
4
  "description": "Integry SDK",
5
5
  "main": "dist/umd/index.umd.js",
6
6
  "module": "dist/esm/index.csm.js",
@@ -179,79 +179,9 @@ const HTMLContent = (props: HTMLFieldProps) => {
179
179
  }
180
180
  }
181
181
  }, 500);
182
- } else if (containerRef.current) {
183
- try {
184
- containerRef.current.innerHTML = htmlContentState;
185
-
186
- // Extract and process link tags
187
- const links = containerRef.current.querySelectorAll(
188
- 'link[rel="stylesheet"]',
189
- );
190
- links.forEach((link) => {
191
- const newLink = document.createElement('link');
192
- Array.from(link.attributes).forEach((attr) =>
193
- newLink.setAttribute(attr.name, attr.value),
194
- );
195
-
196
- // Avoid duplicates
197
- if (
198
- !Array.from(document.head.querySelectorAll('link')).some(
199
- (existingLink) => existingLink.href === newLink.href,
200
- )
201
- ) {
202
- document.head.appendChild(newLink);
203
- }
204
- link.remove();
205
- });
206
-
207
- // Extract and process scripts
208
- const scripts = containerRef.current.querySelectorAll('script');
209
-
210
- // Define loadScript with proper typing
211
- const loadScript = (
212
- script: HTMLScriptElement,
213
- callback: () => void,
214
- ) => {
215
- const newScript = document.createElement('script');
216
-
217
- if (script.src) {
218
- // For external scripts
219
- newScript.src = script.src;
220
- newScript.onload = callback;
221
- } else {
222
- // For inline scripts
223
- newScript.textContent = script.textContent;
224
- callback(); // Inline scripts can execute immediately
225
- }
226
-
227
- // Copy attributes if any
228
- Array.from(script.attributes).forEach((attr) =>
229
- newScript.setAttribute(attr.name, attr.value),
230
- );
231
-
232
- document.body.appendChild(newScript);
233
- script.remove();
234
- };
235
-
236
- // Process scripts in sequence
237
- const processScripts = (
238
- scripts: NodeListOf<HTMLScriptElement>,
239
- index = 0,
240
- ) => {
241
- if (index < scripts.length) {
242
- loadScript(scripts[index], () =>
243
- processScripts(scripts, index + 1),
244
- );
245
- }
246
- };
247
-
248
- processScripts(scripts);
249
- } catch (e) {
250
- console.error(e);
251
- }
252
182
  }
253
183
  setHasPreprocessedHtmlContent(true);
254
- }, [htmlContentState]);
184
+ }, [htmlContent]);
255
185
 
256
186
  return html`
257
187
  ${hasPreprocessedHtmlContent && !props.isAction
@@ -807,7 +807,16 @@ const TagList = ({
807
807
  }
808
808
  const isExpanded = expandedNodes[key];
809
809
  const isOutputExpanded = expandedOutputs[key];
810
- const currentPath = path ? `${path}.${key}` : key;
810
+ let currentPath: string;
811
+ if (path) {
812
+ if (key.startsWith('[') && key.endsWith(']')) {
813
+ currentPath = `${path}${key}`;
814
+ } else {
815
+ currentPath = `${path}.${key}`;
816
+ }
817
+ } else {
818
+ currentPath = key;
819
+ }
811
820
  const nodeMatches =
812
821
  searchTerm && nodeMatchesSearch(key, value, searchTerm);
813
822
  let text: string;
@@ -2112,13 +2112,7 @@ class ActionForm extends Component<ActionFormPropsType, ActionFormStateType> {
2112
2112
  return html` <${HTMLContent}
2113
2113
  htmlContent=${el.default_value}
2114
2114
  />`;
2115
- return html`
2116
- <div
2117
- dangerouslySetInnerHTML=${{
2118
- __html: el.default_value,
2119
- }}
2120
- />
2121
- `;
2115
+
2122
2116
  case 'TEXT_CONTENT':
2123
2117
  return html` <${TextContent}
2124
2118
  textContent=${el.default_value}