@integry/sdk 4.5.25 → 4.5.27

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.5.25",
3
+ "version": "4.5.27",
4
4
  "description": "Integry SDK",
5
5
  "main": "dist/umd/index.umd.js",
6
6
  "module": "dist/esm/index.csm.js",
@@ -1,6 +1,5 @@
1
1
  /* eslint-disable no-nested-ternary */
2
2
  /* eslint-disable @typescript-eslint/no-explicit-any */
3
- import React from 'react';
4
3
  import { NestedObject } from '@/interfaces';
5
4
  import { html } from 'htm/preact';
6
5
  import { createRef } from 'preact';
@@ -9,7 +8,6 @@ import { isScrolledIntoView } from '@/utils/common';
9
8
  import { searchJSON } from '@/utils/searchJson';
10
9
  import { Input } from '@/components/Input';
11
10
  import { createElement } from 'preact/compat';
12
- import { createRoot } from 'react-dom/client';
13
11
  import { TagOptions } from '../TagOptions';
14
12
  import { ThreeDotLoader } from '../../ThreeDotLoader';
15
13
  import styles from './styles.module.scss';
@@ -221,34 +219,6 @@ const FieldDropdown = (props: FieldMenuProps) => {
221
219
  });
222
220
  }
223
221
 
224
- // This component handles rendering React components in a Preact app
225
- const ReactPortal = () => {
226
- const reactRootRef = useRef<HTMLDivElement | null>(null);
227
-
228
- useEffect(() => {
229
- if (reactRootRef.current) {
230
- // Ensure it's a valid React element
231
- const reactElement = React.createElement(tagsComponent, {
232
- onSelect: () => alert('Selected from React!'),
233
- });
234
-
235
- // Render using React's createRoot
236
- const root = createRoot(reactRootRef.current);
237
- root.render(reactElement);
238
-
239
- // Cleanup on unmount
240
- return () => root.unmount();
241
- }
242
-
243
- // Return a no-op cleanup to satisfy ESLint
244
- return () => {
245
- // No cleanup needed if reactRootRef is not set
246
- };
247
- }, []);
248
-
249
- return html`<div ref=${reactRootRef}></div>`;
250
- };
251
-
252
222
  return html` <div
253
223
  class=${`${styles.tagMenu} ${enableSearch ? styles.tagMenuWithSearch : ''}`}
254
224
  style=${parentContainer && tagMenyStyleRef?.current
@@ -374,7 +344,7 @@ const FieldDropdown = (props: FieldMenuProps) => {
374
344
  </div>`
375
345
  : html` <div className="${styles.mappedFieldMenu}">
376
346
  ${tagsComponent
377
- ? html`<${ReactPortal} />`
347
+ ? html`<div>${tagsComponentRender}</div>`
378
348
  : html`${Object.keys(
379
349
  !isEditable ? searchJSON(tags, searchValue) : tags,
380
350
  ).length > 0
package/src/index.ts CHANGED
@@ -2018,7 +2018,7 @@ export class IntegryJS {
2018
2018
  isReadOnly="${false}"
2019
2019
  selectedAuthId="${options.connectedAccountId}"
2020
2020
  accountConnected=${true}
2021
- tagsComponent=${options.tagsComponent}
2021
+ tagsComponent=${TestComponent}
2022
2022
  onFieldChangeCallback=${options.onFieldChangeCallback}
2023
2023
  tagsTree=${options.tagsTree}
2024
2024
  />