@integry/sdk 4.5.30 → 4.5.32
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/.vscode/launch.json +1 -1
- package/dist/esm/index.csm.js +1818 -1817
- package/dist/umd/index.umd.js +1818 -1817
- package/package.json +1 -2
- package/src/components/MultipurposeField/TagMenu/index.ts +6 -28
- package/src/components/React/TagsMenu/index.tsx +20 -0
- package/src/components/React/TagsMenu/styles.module.scss +16 -0
- package/integry-sdk-4.5.24.tgz +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@integry/sdk",
|
|
3
|
-
"version": "4.5.
|
|
3
|
+
"version": "4.5.32",
|
|
4
4
|
"description": "Integry SDK",
|
|
5
5
|
"main": "dist/umd/index.umd.js",
|
|
6
6
|
"module": "dist/esm/index.csm.js",
|
|
@@ -54,7 +54,6 @@
|
|
|
54
54
|
"@testing-library/preact": "^2.0.1",
|
|
55
55
|
"@testing-library/user-event": "^14.6.1",
|
|
56
56
|
"@types/jest": "^26.0.23",
|
|
57
|
-
"@types/react-dom": "^19.0.4",
|
|
58
57
|
"@types/yaireo__tagify": "^4.18.0",
|
|
59
58
|
"@typescript-eslint/eslint-plugin": "^4.20.0",
|
|
60
59
|
"@typescript-eslint/parser": "^4.20.0",
|
|
@@ -2,13 +2,12 @@
|
|
|
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
|
|
5
|
+
import { createRef } 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
|
-
import {
|
|
11
|
-
import ReactCompat from 'preact/compat';
|
|
10
|
+
import { TagsMenuComponent } from '@/components/React/TagsMenu';
|
|
12
11
|
import { TagOptions } from '../TagOptions';
|
|
13
12
|
import { ThreeDotLoader } from '../../ThreeDotLoader';
|
|
14
13
|
import styles from './styles.module.scss';
|
|
@@ -213,24 +212,6 @@ const FieldDropdown = (props: FieldMenuProps) => {
|
|
|
213
212
|
}
|
|
214
213
|
}
|
|
215
214
|
|
|
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');
|
|
233
|
-
|
|
234
215
|
return html` <div
|
|
235
216
|
class=${`${styles.tagMenu} ${enableSearch ? styles.tagMenuWithSearch : ''}`}
|
|
236
217
|
style=${parentContainer && tagMenyStyleRef?.current
|
|
@@ -356,13 +337,10 @@ const FieldDropdown = (props: FieldMenuProps) => {
|
|
|
356
337
|
</div>`
|
|
357
338
|
: html` <div className="${styles.mappedFieldMenu}">
|
|
358
339
|
${tagsComponent
|
|
359
|
-
? html
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
mountNode,
|
|
364
|
-
)}
|
|
365
|
-
</div>`
|
|
340
|
+
? html`<${TagsMenuComponent}
|
|
341
|
+
message="Hello from Preact now again!"
|
|
342
|
+
tagsComponent=${tagsComponent}
|
|
343
|
+
/>`
|
|
366
344
|
: html`${Object.keys(
|
|
367
345
|
!isEditable ? searchJSON(tags, searchValue) : tags,
|
|
368
346
|
).length > 0
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
interface TagsMenuProps {
|
|
4
|
+
message: string;
|
|
5
|
+
tagsComponent: React.ElementType;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export const TagsMenuComponent: React.FC<TagsMenuProps> = ({
|
|
9
|
+
message,
|
|
10
|
+
tagsComponent: TagsComponent,
|
|
11
|
+
}) => {
|
|
12
|
+
return (
|
|
13
|
+
<div>
|
|
14
|
+
<h2>This is a React Component: {message}</h2>
|
|
15
|
+
|
|
16
|
+
{/* Render the passed component with props */}
|
|
17
|
+
<TagsComponent tagName="Example Tag" />
|
|
18
|
+
</div>
|
|
19
|
+
);
|
|
20
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
.loader {
|
|
2
|
+
animation-name: ckw;
|
|
3
|
+
animation-duration: 1s;
|
|
4
|
+
animation-iteration-count: infinite;
|
|
5
|
+
animation-timing-function: linear;
|
|
6
|
+
transform-origin: 50% 50%;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
@keyframes ckw {
|
|
10
|
+
0% {
|
|
11
|
+
transform: rotate(0deg);
|
|
12
|
+
}
|
|
13
|
+
100% {
|
|
14
|
+
transform: rotate(360deg);
|
|
15
|
+
}
|
|
16
|
+
}
|
package/integry-sdk-4.5.24.tgz
DELETED
|
Binary file
|