@integry/sdk 4.5.27 → 4.5.29
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 +1826 -1836
- package/dist/umd/index.umd.js +1826 -1836
- package/package.json +1 -1
- package/src/components/MultipurposeField/TagMenu/index.ts +21 -7
- package/src/index.ts +1 -1
package/package.json
CHANGED
|
@@ -8,6 +8,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,19 @@ 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
|
+
const PreactComponent = ReactCompat.createElement(
|
|
222
|
+
ReactComponent,
|
|
223
|
+
propsLocal,
|
|
224
|
+
);
|
|
225
|
+
ReactCompat.render(PreactComponent, mountNode);
|
|
226
|
+
};
|
|
227
|
+
|
|
228
|
+
const mountNode = document.getElementById('x-integry-container');
|
|
221
229
|
|
|
222
230
|
return html` <div
|
|
223
231
|
class=${`${styles.tagMenu} ${enableSearch ? styles.tagMenuWithSearch : ''}`}
|
|
@@ -344,7 +352,13 @@ const FieldDropdown = (props: FieldMenuProps) => {
|
|
|
344
352
|
</div>`
|
|
345
353
|
: html` <div className="${styles.mappedFieldMenu}">
|
|
346
354
|
${tagsComponent
|
|
347
|
-
? html`<div
|
|
355
|
+
? html`<div>
|
|
356
|
+
${convertReactToPreact(
|
|
357
|
+
tagsComponent,
|
|
358
|
+
{ onSelect: '' },
|
|
359
|
+
mountNode,
|
|
360
|
+
)}
|
|
361
|
+
</div>`
|
|
348
362
|
: html`${Object.keys(
|
|
349
363
|
!isEditable ? searchJSON(tags, searchValue) : tags,
|
|
350
364
|
).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=${
|
|
2021
|
+
tagsComponent=${options.tagsComponent}
|
|
2022
2022
|
onFieldChangeCallback=${options.onFieldChangeCallback}
|
|
2023
2023
|
tagsTree=${options.tagsTree}
|
|
2024
2024
|
/>
|