@integry/sdk 4.6.12 → 4.6.13

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.6.12",
3
+ "version": "4.6.13",
4
4
  "description": "Integry SDK",
5
5
  "main": "dist/umd/index.umd.js",
6
6
  "module": "dist/esm/index.csm.js",
@@ -51,15 +51,12 @@
51
51
  "@storybook/preact": "^8.5.7",
52
52
  "@storybook/preact-webpack5": "^8.5.7",
53
53
  "@storybook/preset-scss": "^1.0.3",
54
- "@testing-library/jest-dom": "^6.6.3",
55
54
  "@testing-library/preact": "^2.0.1",
56
55
  "@testing-library/user-event": "^14.6.1",
57
- "@types/jest": "^26.0.23",
58
56
  "@types/yaireo__tagify": "^4.18.0",
59
57
  "@typescript-eslint/eslint-plugin": "^4.20.0",
60
58
  "@typescript-eslint/parser": "^4.20.0",
61
59
  "autoprefixer": "^10.2.5",
62
- "babel-jest": "^29.7.0",
63
60
  "babel-loader": "^8.2.2",
64
61
  "chalk": "^4.1.0",
65
62
  "core-js": "^3.15.1",
@@ -96,6 +93,10 @@
96
93
  "vitest": "^3.0.4"
97
94
  },
98
95
  "dependencies": {
96
+ "@emotion/react": "^11.14.0",
97
+ "@emotion/styled": "^11.14.0",
98
+ "@mui/icons-material": "^6.4.6",
99
+ "@mui/material": "^6.4.6",
99
100
  "@preact/compat": "^18.3.1",
100
101
  "@yaireo/tagify": "^4.21.1",
101
102
  "classnames": "^2.3.1",
@@ -7,6 +7,7 @@ import { useOnClickOutside } from '@/hooks/useOnClickOutside';
7
7
  import { FieldDropdown } from '@/components/MultipurposeField/TagMenu';
8
8
  import { NestedObject } from '@/interfaces';
9
9
  import { TagProps } from '@/components/Tag';
10
+ // import { TagsMenu } from '@/components/TagsMenu';
10
11
  // @ts-ignore
11
12
  import Tagify from '@yaireo/tagify';
12
13
  import '@yaireo/tagify/dist/tagify.css'; // Tagify CSS
File without changes
@@ -0,0 +1,88 @@
1
+ .tagsMenuWrapper {
2
+ font-family: 'Inter';
3
+ padding: 5px;
4
+ font-size: 14px;
5
+ .tabsWrapper {
6
+ outline: none;
7
+ color: hsl(240 3.8% 46.1%);
8
+ padding: 0.25rem;
9
+ background-color: hsl(240 4.8% 95.9%);
10
+ border-radius: 6px;
11
+ justify-content: center;
12
+ align-items: center;
13
+ width: 100%;
14
+ height: 2.5rem;
15
+ display: inline-flex;
16
+ border-color: hsl(240 5.9% 90%);
17
+ .tab {
18
+ color: #71717a;
19
+ font-size: 0.875rem;
20
+ line-height: 1.25rem;
21
+ padding-top: 0.375rem;
22
+ padding-bottom: 0.375rem;
23
+ padding-left: 0.75rem;
24
+ padding-right: 0.75rem;
25
+ border-radius: 4px;
26
+ white-space: nowrap;
27
+ justify-content: center;
28
+ align-items: center;
29
+ flex: 1 1 0%;
30
+ display: inline-flex;
31
+ cursor: pointer;
32
+ }
33
+ .activeTab {
34
+ background-color: hsl(0 0% 100%);
35
+ color: hsl(240 10% 3.9%);
36
+ }
37
+ }
38
+ .tabContent {
39
+ padding: 12px 2px;
40
+ font-size: 14px;
41
+ .searchWrapper {
42
+ display: flex;
43
+ align-items: center;
44
+ gap: 10px;
45
+ input {
46
+ flex: 1;
47
+ padding: 8px;
48
+ border: 1px solid #ccc;
49
+ border-radius: 5px;
50
+ }
51
+ }
52
+ ul {
53
+ list-style: none;
54
+ li {
55
+ div {
56
+ cursor: pointer;
57
+ }
58
+ .listItemContent {
59
+ padding: 5px 0;
60
+ display: flex;
61
+ align-items: center;
62
+ span.expandIcon {
63
+ margin-right: 10px;
64
+ cursor: pointer;
65
+ }
66
+ span.tagIcon {
67
+ margin-right: 10px;
68
+ }
69
+ span.value {
70
+ color: hsl(240 3.8% 46.1%);
71
+ font-size: 0.75rem;
72
+ line-height: 1rem;
73
+ overflow: hidden;
74
+ text-overflow: ellipsis;
75
+ white-space: nowrap;
76
+ margin-left: 5px;
77
+ }
78
+ img {
79
+ width: 20px;
80
+ height: 20px;
81
+ object-fit: contain;
82
+ margin-right: 5px;
83
+ }
84
+ }
85
+ }
86
+ }
87
+ }
88
+ }
@@ -1040,6 +1040,25 @@ class ActionForm extends Component<ActionFormPropsType, ActionFormStateType> {
1040
1040
  ),
1041
1041
  );
1042
1042
 
1043
+ private getParentDynamicFields = (machineName: string, stepId: number) => {
1044
+ const parentFields =
1045
+ this.state.parentChildMapping?.[stepId]?.[machineName]?.parentFields ||
1046
+ [];
1047
+
1048
+ return parentFields.reduce((acc: Record<string, unknown>, key: string) => {
1049
+ const dynamicData = this.state.dynamicFieldsData as Record<
1050
+ string,
1051
+ unknown
1052
+ >;
1053
+
1054
+ if (key in dynamicData) {
1055
+ acc[key] = dynamicData[key];
1056
+ }
1057
+
1058
+ return acc;
1059
+ }, {});
1060
+ };
1061
+
1043
1062
  private onFieldChange = ({
1044
1063
  stepId,
1045
1064
  fieldId,
@@ -1342,6 +1361,15 @@ class ActionForm extends Component<ActionFormPropsType, ActionFormStateType> {
1342
1361
  case 'CHECKBOX':
1343
1362
  case 'RADIO':
1344
1363
  case 'SELECT': {
1364
+ let fieldVal = null;
1365
+ if (
1366
+ this.props.onFieldChangeCallback &&
1367
+ this.state.dynamicFieldsData
1368
+ ) {
1369
+ fieldVal = this.state.dynamicFieldsData[
1370
+ el.activity_field?.machine_name || ''
1371
+ ];
1372
+ }
1345
1373
  return html`
1346
1374
  <div key=${
1347
1375
  el.id
@@ -1372,6 +1400,7 @@ class ActionForm extends Component<ActionFormPropsType, ActionFormStateType> {
1372
1400
  // el.activity_field.is_searchable TODO: enable this when Serach is added for mulipurposes field
1373
1401
  }
1374
1402
  value=${
1403
+ fieldVal ||
1375
1404
  (selectedStepData &&
1376
1405
  selectedStepData[el.id] &&
1377
1406
  selectedStepData[el.id].value) ||