@trii/components 2.0.102 → 2.0.103
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/cjs/index.js +43 -65
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +43 -65
- package/dist/esm/index.js.map +1 -1
- package/dist/types/components/EditContactModal/components/Section/ContactInformation/components/EditModal/layout/AddressInput/AddressInput.d.ts +2 -1
- package/dist/types/components/EditContactModal/components/Section/ContactInformation/components/EditModal/layout/PhoneInput/PhoneInput.d.ts +2 -1
- package/dist/types/components/EditContactModal/components/Section/ContactInformation/components/EditModal/layout/WarningsDisplay/WarningsDisplay.d.ts +2 -1
- package/dist/types/components/EditContactModal/components/Section/ContactInformation/components/EditModal/layout/WarningsDisplay/components/Warning/Warning.d.ts +3 -1
- package/dist/types/components/EditContactModal/components/Section/ContactInformation/components/EditModal/layout/WarningsDisplay/components/Warning/hooks/useContactInfoPopup.d.ts +11 -0
- package/dist/types/components/EditContactModal/context/EditContactApiContext.d.ts +2 -0
- package/dist/types/components/EditContactModal/services/api.d.ts +1 -0
- package/package.json +159 -159
|
@@ -8,6 +8,7 @@ interface AddressInputProps {
|
|
|
8
8
|
data: NewAddress | IContactAddress;
|
|
9
9
|
onChange: (e: ChangeEvent<HTMLInputElement | HTMLTextAreaElement>, id: string, channelType: ChannelType) => void;
|
|
10
10
|
setWarnings: Dispatch<SetStateAction<string[]>>;
|
|
11
|
+
setExistingContactId?: Dispatch<SetStateAction<string | null>>;
|
|
11
12
|
}
|
|
12
|
-
declare const AddressInput: ({ data, onChange, setWarnings }: AddressInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
declare const AddressInput: ({ data, onChange, setWarnings, setExistingContactId }: AddressInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
14
|
export default AddressInput;
|
|
@@ -8,6 +8,7 @@ interface AddressInputProps {
|
|
|
8
8
|
data: NewAddress | IContactAddress;
|
|
9
9
|
onChange: (e: ChangeEvent<HTMLInputElement | HTMLTextAreaElement>, id: string, channelType: ChannelType) => void;
|
|
10
10
|
setWarnings: Dispatch<SetStateAction<string[]>>;
|
|
11
|
+
setExistingContactId?: Dispatch<SetStateAction<string | null>>;
|
|
11
12
|
}
|
|
12
|
-
declare const PhoneInput: ({ data, onChange, setWarnings }: AddressInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
declare const PhoneInput: ({ data, onChange, setWarnings, setExistingContactId }: AddressInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
14
|
export default PhoneInput;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
type WarningsDisplayProps = {
|
|
2
2
|
warnings: string[];
|
|
3
|
+
existingContactId?: string | null;
|
|
3
4
|
};
|
|
4
|
-
declare const WarningsDisplay: ({ warnings }: WarningsDisplayProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
declare const WarningsDisplay: ({ warnings, existingContactId }: WarningsDisplayProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
6
|
export default WarningsDisplay;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
type WarningProps = {
|
|
2
2
|
text: string;
|
|
3
|
+
code?: string;
|
|
4
|
+
existingContactId?: string | null;
|
|
3
5
|
};
|
|
4
|
-
declare const Warning: ({ text }: WarningProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
declare const Warning: ({ text, code, existingContactId }: WarningProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
7
|
export default Warning;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { MouseEvent } from 'react';
|
|
2
|
+
import type { IContact, IBusiness } from '@trii/types/dist/Contacts';
|
|
3
|
+
export declare const useContactInfoPopup: (contactId: string | null) => {
|
|
4
|
+
contactData: IContact | IBusiness;
|
|
5
|
+
anchorEl: HTMLElement;
|
|
6
|
+
isOpen: boolean;
|
|
7
|
+
isLoading: boolean;
|
|
8
|
+
openPopup: (event: MouseEvent<HTMLElement>) => Promise<void>;
|
|
9
|
+
closePopup: () => void;
|
|
10
|
+
navigate: import("../../../../../../../../../../context/NavigateContext").NavigateFn;
|
|
11
|
+
};
|
|
@@ -70,6 +70,7 @@ export declare const EditContactApiProvider: import("react").Provider<{
|
|
|
70
70
|
}) => Promise<{
|
|
71
71
|
success: boolean;
|
|
72
72
|
warnings: string[];
|
|
73
|
+
contactId?: string;
|
|
73
74
|
}>;
|
|
74
75
|
setContactAddress: ({ data, signal }: {
|
|
75
76
|
signal?: AbortSignal;
|
|
@@ -170,6 +171,7 @@ export declare const useEditContactApi: () => {
|
|
|
170
171
|
}) => Promise<{
|
|
171
172
|
success: boolean;
|
|
172
173
|
warnings: string[];
|
|
174
|
+
contactId?: string;
|
|
173
175
|
}>;
|
|
174
176
|
setContactAddress: ({ data, signal }: {
|
|
175
177
|
signal?: AbortSignal;
|
package/package.json
CHANGED
|
@@ -1,159 +1,159 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@trii/components",
|
|
3
|
-
"version": "2.0.
|
|
4
|
-
"description": "Trii components package",
|
|
5
|
-
"main": "dist/cjs/index.js",
|
|
6
|
-
"module": "dist/esm/index.js",
|
|
7
|
-
"types": "dist/index.d.ts",
|
|
8
|
-
"files": [
|
|
9
|
-
"dist"
|
|
10
|
-
],
|
|
11
|
-
"scripts": {
|
|
12
|
-
"dev": "npm-run-all --parallel dev:types dev:js",
|
|
13
|
-
"dev:types": "tsc --watch",
|
|
14
|
-
"dev:js": "rollup -c --watch",
|
|
15
|
-
"build": "npm-run-all --serial build:types build:js",
|
|
16
|
-
"build:types": "tsc --project tsconfig.build.json --emitDeclarationOnly",
|
|
17
|
-
"build:js": "rollup -c",
|
|
18
|
-
"test": "jest --watchAll --verbose",
|
|
19
|
-
"storybook": "storybook dev -p 6006",
|
|
20
|
-
"build-storybook": "storybook build"
|
|
21
|
-
},
|
|
22
|
-
"author": "Ezequiel",
|
|
23
|
-
"license": "MIT",
|
|
24
|
-
"babel": {
|
|
25
|
-
"sourceType": "unambiguous",
|
|
26
|
-
"presets": [
|
|
27
|
-
[
|
|
28
|
-
"@babel/preset-env",
|
|
29
|
-
{
|
|
30
|
-
"targets": {
|
|
31
|
-
"chrome": 100,
|
|
32
|
-
"safari": 15,
|
|
33
|
-
"firefox": 91
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
],
|
|
37
|
-
[
|
|
38
|
-
"@babel/preset-react",
|
|
39
|
-
{
|
|
40
|
-
"runtime": "automatic"
|
|
41
|
-
}
|
|
42
|
-
],
|
|
43
|
-
"@babel/preset-typescript"
|
|
44
|
-
]
|
|
45
|
-
},
|
|
46
|
-
"postcss": {
|
|
47
|
-
"plugins": {
|
|
48
|
-
"postcss-import": {}
|
|
49
|
-
}
|
|
50
|
-
},
|
|
51
|
-
"devDependencies": {
|
|
52
|
-
"@babel/core": "^7.23.0",
|
|
53
|
-
"@babel/preset-env": "^7.22.20",
|
|
54
|
-
"@babel/preset-react": "^7.22.15",
|
|
55
|
-
"@babel/preset-typescript": "^7.23.0",
|
|
56
|
-
"@emotion/react": "^11.11.4",
|
|
57
|
-
"@emotion/styled": "^11.11.5",
|
|
58
|
-
"@fontsource/material-icons": "^5.0.18",
|
|
59
|
-
"@fontsource/roboto": "^5.0.13",
|
|
60
|
-
"@mdi/js": "^7.4.47",
|
|
61
|
-
"@mdi/react": "^1.6.1",
|
|
62
|
-
"@mui/icons-material": "^5.15.15",
|
|
63
|
-
"@mui/lab": "^5.0.0-alpha.176",
|
|
64
|
-
"@mui/material": "^5.18.0",
|
|
65
|
-
"@reduxjs/toolkit": "^2.11.2",
|
|
66
|
-
"@rollup/plugin-commonjs": "^25.0.4",
|
|
67
|
-
"@rollup/plugin-image": "^3.0.3",
|
|
68
|
-
"@rollup/plugin-json": "^6.1.0",
|
|
69
|
-
"@rollup/plugin-node-resolve": "^15.2.1",
|
|
70
|
-
"@storybook/addon-essentials": "^8.5.3",
|
|
71
|
-
"@storybook/addon-interactions": "^8.5.3",
|
|
72
|
-
"@storybook/addon-links": "^8.5.3",
|
|
73
|
-
"@storybook/addon-onboarding": "^8.5.3",
|
|
74
|
-
"@storybook/addon-themes": "^8.5.3",
|
|
75
|
-
"@storybook/addon-webpack5-compiler-babel": "^3.0.5",
|
|
76
|
-
"@storybook/addon-webpack5-compiler-swc": "^2.0.0",
|
|
77
|
-
"@storybook/blocks": "^8.5.3",
|
|
78
|
-
"@storybook/react": "^8.5.3",
|
|
79
|
-
"@storybook/react-webpack5": "^8.5.3",
|
|
80
|
-
"@storybook/test": "^8.5.3",
|
|
81
|
-
"@testing-library/jest-dom": "^6.1.3",
|
|
82
|
-
"@testing-library/react": "^14.0.0",
|
|
83
|
-
"@types/google-libphonenumber": "^7.4.30",
|
|
84
|
-
"@types/google.maps": "^3.58.1",
|
|
85
|
-
"@types/jest": "^29.5.5",
|
|
86
|
-
"@types/react": "^18.2.23",
|
|
87
|
-
"@typescript-eslint/eslint-plugin": "^8.53.0",
|
|
88
|
-
"@typescript-eslint/parser": "^8.53.0",
|
|
89
|
-
"axios": "^1.14.0",
|
|
90
|
-
"babel-jest": "^29.7.0",
|
|
91
|
-
"date-fns": "^2.30.0",
|
|
92
|
-
"dompurify": "^2.5.8",
|
|
93
|
-
"esbuild": "^0.27.2",
|
|
94
|
-
"eslint": "^9.39.2",
|
|
95
|
-
"eslint-config-prettier": "^10.1.8",
|
|
96
|
-
"eslint-plugin-import": "^2.32.0",
|
|
97
|
-
"eslint-plugin-prettier": "^5.5.5",
|
|
98
|
-
"eslint-plugin-react": "^7.37.5",
|
|
99
|
-
"eslint-plugin-react-hooks": "^7.0.1",
|
|
100
|
-
"google-libphonenumber": "^3.2.44",
|
|
101
|
-
"handlebars": "^4.7.8",
|
|
102
|
-
"immer": "^11.1.4",
|
|
103
|
-
"jest": "^29.7.0",
|
|
104
|
-
"jest-environment-jsdom": "^29.7.0",
|
|
105
|
-
"markdown-it": "^14.1.0",
|
|
106
|
-
"markdown-it-emoji": "^3.0.0",
|
|
107
|
-
"npm-run-all": "^4.1.5",
|
|
108
|
-
"postcss": "^8.4.31",
|
|
109
|
-
"postcss-import": "^15.1.0",
|
|
110
|
-
"prettier": "^3.8.0",
|
|
111
|
-
"react": "^18.2.0",
|
|
112
|
-
"react-dom": "^18.2.0",
|
|
113
|
-
"react-file-icon": "^1.6.0",
|
|
114
|
-
"react-to-print": "^2.14.15",
|
|
115
|
-
"react-virtuoso": "^4.17.0",
|
|
116
|
-
"rollup": "^3.29.4",
|
|
117
|
-
"rollup-plugin-dts": "^6.0.2",
|
|
118
|
-
"rollup-plugin-esbuild": "^6.2.1",
|
|
119
|
-
"rollup-plugin-postcss": "^4.0.2",
|
|
120
|
-
"single-spa": "^5.9.3",
|
|
121
|
-
"single-spa-react": "^6.0.2",
|
|
122
|
-
"storybook": "^8.5.3",
|
|
123
|
-
"tslib": "^2.6.2",
|
|
124
|
-
"typescript": "^5.2.2",
|
|
125
|
-
"uuid": "^10.0.0",
|
|
126
|
-
"wavesurfer.js": "^6.6.3"
|
|
127
|
-
},
|
|
128
|
-
"peerDependencies": {
|
|
129
|
-
"@emotion/react": "^11.11.4",
|
|
130
|
-
"@mui/x-date-pickers": "^8.24.0",
|
|
131
|
-
"@mui/x-date-pickers-pro": "^8.24.0",
|
|
132
|
-
"@reduxjs/toolkit": ">=1.9.0",
|
|
133
|
-
"axios": ">=1.0.0",
|
|
134
|
-
"dayjs": "^1.11.19",
|
|
135
|
-
"google-libphonenumber": "^3.2.43",
|
|
136
|
-
"
|
|
137
|
-
"
|
|
138
|
-
"
|
|
139
|
-
"react
|
|
140
|
-
"react-
|
|
141
|
-
"
|
|
142
|
-
"single-spa
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
"@mdi/
|
|
147
|
-
"@
|
|
148
|
-
"
|
|
149
|
-
"
|
|
150
|
-
"
|
|
151
|
-
"markdown-it": "^14.1.0",
|
|
152
|
-
"markdown-it-emoji": "^3.0.0",
|
|
153
|
-
"react-file-icon": "^1.6.0",
|
|
154
|
-
"react-to-print": "^2.14.15",
|
|
155
|
-
"react-virtuoso": "^4.17.0",
|
|
156
|
-
"uuid": "^10.0.0",
|
|
157
|
-
"wavesurfer.js": "^6.6.3"
|
|
158
|
-
}
|
|
159
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@trii/components",
|
|
3
|
+
"version": "2.0.103",
|
|
4
|
+
"description": "Trii components package",
|
|
5
|
+
"main": "dist/cjs/index.js",
|
|
6
|
+
"module": "dist/esm/index.js",
|
|
7
|
+
"types": "dist/index.d.ts",
|
|
8
|
+
"files": [
|
|
9
|
+
"dist"
|
|
10
|
+
],
|
|
11
|
+
"scripts": {
|
|
12
|
+
"dev": "npm-run-all --parallel dev:types dev:js",
|
|
13
|
+
"dev:types": "tsc --watch",
|
|
14
|
+
"dev:js": "rollup -c --watch",
|
|
15
|
+
"build": "npm-run-all --serial build:types build:js",
|
|
16
|
+
"build:types": "tsc --project tsconfig.build.json --emitDeclarationOnly",
|
|
17
|
+
"build:js": "rollup -c",
|
|
18
|
+
"test": "jest --watchAll --verbose",
|
|
19
|
+
"storybook": "storybook dev -p 6006",
|
|
20
|
+
"build-storybook": "storybook build"
|
|
21
|
+
},
|
|
22
|
+
"author": "Ezequiel",
|
|
23
|
+
"license": "MIT",
|
|
24
|
+
"babel": {
|
|
25
|
+
"sourceType": "unambiguous",
|
|
26
|
+
"presets": [
|
|
27
|
+
[
|
|
28
|
+
"@babel/preset-env",
|
|
29
|
+
{
|
|
30
|
+
"targets": {
|
|
31
|
+
"chrome": 100,
|
|
32
|
+
"safari": 15,
|
|
33
|
+
"firefox": 91
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
],
|
|
37
|
+
[
|
|
38
|
+
"@babel/preset-react",
|
|
39
|
+
{
|
|
40
|
+
"runtime": "automatic"
|
|
41
|
+
}
|
|
42
|
+
],
|
|
43
|
+
"@babel/preset-typescript"
|
|
44
|
+
]
|
|
45
|
+
},
|
|
46
|
+
"postcss": {
|
|
47
|
+
"plugins": {
|
|
48
|
+
"postcss-import": {}
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
"devDependencies": {
|
|
52
|
+
"@babel/core": "^7.23.0",
|
|
53
|
+
"@babel/preset-env": "^7.22.20",
|
|
54
|
+
"@babel/preset-react": "^7.22.15",
|
|
55
|
+
"@babel/preset-typescript": "^7.23.0",
|
|
56
|
+
"@emotion/react": "^11.11.4",
|
|
57
|
+
"@emotion/styled": "^11.11.5",
|
|
58
|
+
"@fontsource/material-icons": "^5.0.18",
|
|
59
|
+
"@fontsource/roboto": "^5.0.13",
|
|
60
|
+
"@mdi/js": "^7.4.47",
|
|
61
|
+
"@mdi/react": "^1.6.1",
|
|
62
|
+
"@mui/icons-material": "^5.15.15",
|
|
63
|
+
"@mui/lab": "^5.0.0-alpha.176",
|
|
64
|
+
"@mui/material": "^5.18.0",
|
|
65
|
+
"@reduxjs/toolkit": "^2.11.2",
|
|
66
|
+
"@rollup/plugin-commonjs": "^25.0.4",
|
|
67
|
+
"@rollup/plugin-image": "^3.0.3",
|
|
68
|
+
"@rollup/plugin-json": "^6.1.0",
|
|
69
|
+
"@rollup/plugin-node-resolve": "^15.2.1",
|
|
70
|
+
"@storybook/addon-essentials": "^8.5.3",
|
|
71
|
+
"@storybook/addon-interactions": "^8.5.3",
|
|
72
|
+
"@storybook/addon-links": "^8.5.3",
|
|
73
|
+
"@storybook/addon-onboarding": "^8.5.3",
|
|
74
|
+
"@storybook/addon-themes": "^8.5.3",
|
|
75
|
+
"@storybook/addon-webpack5-compiler-babel": "^3.0.5",
|
|
76
|
+
"@storybook/addon-webpack5-compiler-swc": "^2.0.0",
|
|
77
|
+
"@storybook/blocks": "^8.5.3",
|
|
78
|
+
"@storybook/react": "^8.5.3",
|
|
79
|
+
"@storybook/react-webpack5": "^8.5.3",
|
|
80
|
+
"@storybook/test": "^8.5.3",
|
|
81
|
+
"@testing-library/jest-dom": "^6.1.3",
|
|
82
|
+
"@testing-library/react": "^14.0.0",
|
|
83
|
+
"@types/google-libphonenumber": "^7.4.30",
|
|
84
|
+
"@types/google.maps": "^3.58.1",
|
|
85
|
+
"@types/jest": "^29.5.5",
|
|
86
|
+
"@types/react": "^18.2.23",
|
|
87
|
+
"@typescript-eslint/eslint-plugin": "^8.53.0",
|
|
88
|
+
"@typescript-eslint/parser": "^8.53.0",
|
|
89
|
+
"axios": "^1.14.0",
|
|
90
|
+
"babel-jest": "^29.7.0",
|
|
91
|
+
"date-fns": "^2.30.0",
|
|
92
|
+
"dompurify": "^2.5.8",
|
|
93
|
+
"esbuild": "^0.27.2",
|
|
94
|
+
"eslint": "^9.39.2",
|
|
95
|
+
"eslint-config-prettier": "^10.1.8",
|
|
96
|
+
"eslint-plugin-import": "^2.32.0",
|
|
97
|
+
"eslint-plugin-prettier": "^5.5.5",
|
|
98
|
+
"eslint-plugin-react": "^7.37.5",
|
|
99
|
+
"eslint-plugin-react-hooks": "^7.0.1",
|
|
100
|
+
"google-libphonenumber": "^3.2.44",
|
|
101
|
+
"handlebars": "^4.7.8",
|
|
102
|
+
"immer": "^11.1.4",
|
|
103
|
+
"jest": "^29.7.0",
|
|
104
|
+
"jest-environment-jsdom": "^29.7.0",
|
|
105
|
+
"markdown-it": "^14.1.0",
|
|
106
|
+
"markdown-it-emoji": "^3.0.0",
|
|
107
|
+
"npm-run-all": "^4.1.5",
|
|
108
|
+
"postcss": "^8.4.31",
|
|
109
|
+
"postcss-import": "^15.1.0",
|
|
110
|
+
"prettier": "^3.8.0",
|
|
111
|
+
"react": "^18.2.0",
|
|
112
|
+
"react-dom": "^18.2.0",
|
|
113
|
+
"react-file-icon": "^1.6.0",
|
|
114
|
+
"react-to-print": "^2.14.15",
|
|
115
|
+
"react-virtuoso": "^4.17.0",
|
|
116
|
+
"rollup": "^3.29.4",
|
|
117
|
+
"rollup-plugin-dts": "^6.0.2",
|
|
118
|
+
"rollup-plugin-esbuild": "^6.2.1",
|
|
119
|
+
"rollup-plugin-postcss": "^4.0.2",
|
|
120
|
+
"single-spa": "^5.9.3",
|
|
121
|
+
"single-spa-react": "^6.0.2",
|
|
122
|
+
"storybook": "^8.5.3",
|
|
123
|
+
"tslib": "^2.6.2",
|
|
124
|
+
"typescript": "^5.2.2",
|
|
125
|
+
"uuid": "^10.0.0",
|
|
126
|
+
"wavesurfer.js": "^6.6.3"
|
|
127
|
+
},
|
|
128
|
+
"peerDependencies": {
|
|
129
|
+
"@emotion/react": "^11.11.4",
|
|
130
|
+
"@mui/x-date-pickers": "^8.24.0",
|
|
131
|
+
"@mui/x-date-pickers-pro": "^8.24.0",
|
|
132
|
+
"@reduxjs/toolkit": ">=1.9.0",
|
|
133
|
+
"axios": ">=1.0.0",
|
|
134
|
+
"dayjs": "^1.11.19",
|
|
135
|
+
"google-libphonenumber": "^3.2.43",
|
|
136
|
+
"handlebars": "^4.7.8",
|
|
137
|
+
"i18next": "^25.8.0",
|
|
138
|
+
"moment": "^2.30.1",
|
|
139
|
+
"react": ">=17.0.2 <19.0.0",
|
|
140
|
+
"react-dom": ">=17.0.2 <19.0.0",
|
|
141
|
+
"react-i18next": "^16.5.3",
|
|
142
|
+
"single-spa": "^5.9.3",
|
|
143
|
+
"single-spa-react": "^6.0.2"
|
|
144
|
+
},
|
|
145
|
+
"dependencies": {
|
|
146
|
+
"@mdi/js": "^7.4.47",
|
|
147
|
+
"@mdi/react": "^1.6.1",
|
|
148
|
+
"@trii/types": "^2.10.638",
|
|
149
|
+
"date-fns": "^2.30.0",
|
|
150
|
+
"dompurify": "^2.5.8",
|
|
151
|
+
"markdown-it": "^14.1.0",
|
|
152
|
+
"markdown-it-emoji": "^3.0.0",
|
|
153
|
+
"react-file-icon": "^1.6.0",
|
|
154
|
+
"react-to-print": "^2.14.15",
|
|
155
|
+
"react-virtuoso": "^4.17.0",
|
|
156
|
+
"uuid": "^10.0.0",
|
|
157
|
+
"wavesurfer.js": "^6.6.3"
|
|
158
|
+
}
|
|
159
|
+
}
|