@integry/sdk 4.5.32 → 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.32",
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",
@@ -101,9 +101,7 @@
101
101
  "fuzzysort": "^1.1.4",
102
102
  "htm": "3.1.0",
103
103
  "lit": "^3.2.1",
104
- "preact": "^10.26.2",
105
- "react": "^18.3.1",
106
- "react-dom": "^18.3.1",
104
+ "preact": "^10.2.0",
107
105
  "superstruct": "^0.15.2",
108
106
  "unfetch": "^4.2.0",
109
107
  "unistore": "^3.5.2"
@@ -7,7 +7,7 @@ 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 { TagsMenuComponent } from '@/components/React/TagsMenu';
10
+ // import TagsMenuComponent from '@/components/React/TagsMenu';
11
11
  import { TagOptions } from '../TagOptions';
12
12
  import { ThreeDotLoader } from '../../ThreeDotLoader';
13
13
  import styles from './styles.module.scss';
@@ -337,10 +337,7 @@ const FieldDropdown = (props: FieldMenuProps) => {
337
337
  </div>`
338
338
  : html` <div className="${styles.mappedFieldMenu}">
339
339
  ${tagsComponent
340
- ? html`<${TagsMenuComponent}
341
- message="Hello from Preact now again!"
342
- tagsComponent=${tagsComponent}
343
- />`
340
+ ? html``
344
341
  : html`${Object.keys(
345
342
  !isEditable ? searchJSON(tags, searchValue) : tags,
346
343
  ).length > 0
@@ -1,20 +1,116 @@
1
- import React from 'react';
1
+ // import { useState } from 'react';
2
2
 
3
- interface TagsMenuProps {
4
- message: string;
5
- tagsComponent: React.ElementType;
6
- }
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
+ // };
7
34
 
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>
35
+ // type Item = {
36
+ // id: string;
37
+ // name: string;
38
+ // fields: string[];
39
+ // };
15
40
 
16
- {/* Render the passed component with props */}
17
- <TagsComponent tagName="Example Tag" />
18
- </div>
19
- );
20
- };
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
+ // }
@@ -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
+ // }