@integry/sdk 4.5.28 → 4.5.30
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/dist/esm/index.csm.js +1825 -1823
- package/dist/umd/index.umd.js +1825 -1823
- package/package.json +1 -1
- package/src/components/MultipurposeField/TagMenu/index.ts +26 -8
package/package.json
CHANGED
|
@@ -2,12 +2,13 @@
|
|
|
2
2
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
3
3
|
import { NestedObject } from '@/interfaces';
|
|
4
4
|
import { html } from 'htm/preact';
|
|
5
|
-
import { createRef } from 'preact';
|
|
5
|
+
import { createRef, render } from 'preact';
|
|
6
6
|
import { useEffect, useRef, useState } from 'preact/hooks';
|
|
7
7
|
import { isScrolledIntoView } from '@/utils/common';
|
|
8
8
|
import { searchJSON } from '@/utils/searchJson';
|
|
9
9
|
import { Input } from '@/components/Input';
|
|
10
10
|
import { createElement } from 'preact/compat';
|
|
11
|
+
import ReactCompat from 'preact/compat';
|
|
11
12
|
import { TagOptions } from '../TagOptions';
|
|
12
13
|
import { ThreeDotLoader } from '../../ThreeDotLoader';
|
|
13
14
|
import styles from './styles.module.scss';
|
|
@@ -212,12 +213,23 @@ const FieldDropdown = (props: FieldMenuProps) => {
|
|
|
212
213
|
}
|
|
213
214
|
}
|
|
214
215
|
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
216
|
+
const convertReactToPreact = (
|
|
217
|
+
ReactComponent: any,
|
|
218
|
+
propsLocal = {},
|
|
219
|
+
mountNode: any,
|
|
220
|
+
) => {
|
|
221
|
+
// Ensure props are mutable
|
|
222
|
+
const mutableProps = { ...propsLocal };
|
|
223
|
+
|
|
224
|
+
const PreactComponent = ReactCompat.createElement(
|
|
225
|
+
ReactComponent,
|
|
226
|
+
mutableProps,
|
|
227
|
+
);
|
|
228
|
+
|
|
229
|
+
render(PreactComponent, mountNode);
|
|
230
|
+
};
|
|
231
|
+
|
|
232
|
+
const mountNode = document.getElementById('x-integry-container');
|
|
221
233
|
|
|
222
234
|
return html` <div
|
|
223
235
|
class=${`${styles.tagMenu} ${enableSearch ? styles.tagMenuWithSearch : ''}`}
|
|
@@ -344,7 +356,13 @@ const FieldDropdown = (props: FieldMenuProps) => {
|
|
|
344
356
|
</div>`
|
|
345
357
|
: html` <div className="${styles.mappedFieldMenu}">
|
|
346
358
|
${tagsComponent
|
|
347
|
-
? html`<div
|
|
359
|
+
? html`<div>
|
|
360
|
+
${convertReactToPreact(
|
|
361
|
+
tagsComponent,
|
|
362
|
+
{ onSelect: '' },
|
|
363
|
+
mountNode,
|
|
364
|
+
)}
|
|
365
|
+
</div>`
|
|
348
366
|
: html`${Object.keys(
|
|
349
367
|
!isEditable ? searchJSON(tags, searchValue) : tags,
|
|
350
368
|
).length > 0
|