@integry/sdk 4.5.31 → 4.5.33

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.31",
3
+ "version": "4.5.33",
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",
@@ -102,9 +101,7 @@
102
101
  "fuzzysort": "^1.1.4",
103
102
  "htm": "3.1.0",
104
103
  "lit": "^3.2.1",
105
- "preact": "^10.26.2",
106
- "react": "^18.3.1",
107
- "react-dom": "^18.3.1",
104
+ "preact": "^10.2.0",
108
105
  "superstruct": "^0.15.2",
109
106
  "unfetch": "^4.2.0",
110
107
  "unistore": "^3.5.2"
@@ -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, render } from 'preact';
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 { createElement } from 'preact/compat';
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,22 +212,6 @@ const FieldDropdown = (props: FieldMenuProps) => {
213
212
  }
214
213
  }
215
214
 
216
- const deepClone = (obj: any) => JSON.parse(JSON.stringify(obj));
217
-
218
- const convertReactToPreact = (
219
- ReactComponent: any,
220
- propsLocal = {},
221
- mountNode: any,
222
- ) => {
223
- const PreactComponent = ReactCompat.createElement(
224
- ReactComponent,
225
- deepClone(propsLocal),
226
- );
227
- render(PreactComponent, mountNode);
228
- };
229
-
230
- const mountNode = document.getElementById('x-integry-container');
231
-
232
215
  return html` <div
233
216
  class=${`${styles.tagMenu} ${enableSearch ? styles.tagMenuWithSearch : ''}`}
234
217
  style=${parentContainer && tagMenyStyleRef?.current
@@ -354,13 +337,7 @@ const FieldDropdown = (props: FieldMenuProps) => {
354
337
  </div>`
355
338
  : html` <div className="${styles.mappedFieldMenu}">
356
339
  ${tagsComponent
357
- ? html`<div>
358
- ${convertReactToPreact(
359
- tagsComponent,
360
- { onSelect: '' },
361
- mountNode,
362
- )}
363
- </div>`
340
+ ? html``
364
341
  : html`${Object.keys(
365
342
  !isEditable ? searchJSON(tags, searchValue) : tags,
366
343
  ).length > 0
@@ -0,0 +1,116 @@
1
+ // import { useState } from 'react';
2
+
3
+ // const data: any = {
4
+ // setupForm: [
5
+ // {
6
+ // id: 'mailchimp',
7
+ // name: 'Configure Mailchimp (Add Subscriber)',
8
+ // fields: [
9
+ // 'mailchimp_list',
10
+ // 'email',
11
+ // 'mailchimp_status',
12
+ // 'mailchimp_custom_fields',
13
+ // ],
14
+ // },
15
+ // {
16
+ // id: 'slack',
17
+ // name: 'Configure Slack (Post Message)',
18
+ // fields: ['channel', 'message'],
19
+ // },
20
+ // ],
21
+ // triggers: [
22
+ // {
23
+ // id: 'webhook1',
24
+ // name: 'Incoming Webhook (Block)',
25
+ // fields: ['url', 'payload'],
26
+ // },
27
+ // {
28
+ // id: 'webhook2',
29
+ // name: 'Incoming Webhook',
30
+ // fields: ['endpoint', 'headers'],
31
+ // },
32
+ // ],
33
+ // };
34
+
35
+ // type Item = {
36
+ // id: string;
37
+ // name: string;
38
+ // fields: string[];
39
+ // };
40
+
41
+ // export default function TagsMenuComponent() {
42
+ // const [activeTab, setActiveTab] = useState('setupForm');
43
+ // const [activeItem, setActiveItem] = useState<Item>({
44
+ // id: '',
45
+ // name: '',
46
+ // fields: [],
47
+ // });
48
+
49
+ // const handleItemClick = (item: any) => setActiveItem(item);
50
+ // const handleBack = () =>
51
+ // setActiveItem({
52
+ // id: '',
53
+ // name: '',
54
+ // fields: [],
55
+ // });
56
+
57
+ // return (
58
+ // <div className="p-4">
59
+ // <div className="flex space-x-4 border-b">
60
+ // {['setupForm', 'triggers'].map((tab) => (
61
+ // <button
62
+ // key={tab}
63
+ // className={`p-2 ${
64
+ // activeTab === tab
65
+ // ? 'font-bold border-b-2 border-black'
66
+ // : 'text-gray-500'
67
+ // }`}
68
+ // onClick={() => {
69
+ // setActiveTab(tab);
70
+ // setActiveItem({
71
+ // id: '',
72
+ // name: '',
73
+ // fields: [],
74
+ // });
75
+ // }}
76
+ // >
77
+ // {tab === 'setupForm' ? 'Setup Form' : 'Triggers'}
78
+ // </button>
79
+ // ))}
80
+ // </div>
81
+
82
+ // <div className="mt-4">
83
+ // {activeItem ? (
84
+ // <div>
85
+ // <button className="text-blue-500 mb-4" onClick={handleBack}>
86
+ // &larr; Back
87
+ // </button>
88
+ // <h2 className="font-semibold mb-2">
89
+ // {activeItem ? activeItem.name : ''}
90
+ // </h2>
91
+ // <div className="space-y-2">
92
+ // {activeItem.fields.map((field) => (
93
+ // <div
94
+ // key={field}
95
+ // className="bg-gray-100 px-2 py-1 rounded text-gray-700"
96
+ // >
97
+ // {field}
98
+ // </div>
99
+ // ))}
100
+ // </div>
101
+ // </div>
102
+ // ) : (
103
+ // data[activeTab].map((item: any) => (
104
+ // <div
105
+ // key={item.id}
106
+ // className="flex items-center space-x-2 p-2 hover:bg-gray-100 cursor-pointer rounded"
107
+ // onClick={() => handleItemClick(item)}
108
+ // >
109
+ // <span>{item.name}</span>
110
+ // </div>
111
+ // ))
112
+ // )}
113
+ // </div>
114
+ // </div>
115
+ // );
116
+ // }
@@ -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
+ }
@@ -1,4 +1,4 @@
1
- declare module '@preact/compat' {
2
- export * from 'react';
3
- export { default } from 'react';
4
- }
1
+ // declare module '@preact/compat' {
2
+ // export * from 'react';
3
+ // export { default } from 'react';
4
+ // }
Binary file