@vlprojects-chat/chat 0.0.25 → 0.0.29

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.
Files changed (110) hide show
  1. package/dist/Chat.d.ts +1 -0
  2. package/dist/api/Api.d.ts +9 -13
  3. package/dist/api/index.d.ts +1 -1
  4. package/dist/components/ChannelList/components/LastMessage/LastMessage.d.ts +7 -0
  5. package/dist/components/ChannelList/components/LastMessage/index.d.ts +1 -0
  6. package/dist/components/ChannelList/styles.d.ts +1 -1
  7. package/dist/components/CreateChannelForm/styles.d.ts +1 -1
  8. package/dist/components/DirectList/styles.d.ts +1 -1
  9. package/dist/components/Drawer/styles.d.ts +1 -1
  10. package/dist/components/MessageInput/components/MessageInputActions/MessageInputActions.d.ts +5 -0
  11. package/dist/components/MessageInput/components/MessageInputActions/index.d.ts +1 -0
  12. package/dist/components/MessageInput/index.d.ts +1 -0
  13. package/dist/components/MessageInput/styles.d.ts +1 -1
  14. package/dist/components/MessageList/MessageList.d.ts +7 -0
  15. package/dist/components/MessageList/components/MessageActions/MessageActions.d.ts +9 -0
  16. package/dist/components/MessageList/components/MessageActions/index.d.ts +1 -0
  17. package/dist/components/MessageList/components/MessageRow/MessageRow.d.ts +8 -0
  18. package/dist/components/MessageList/components/MessageRow/index.d.ts +1 -0
  19. package/dist/components/MessageList/components/SystemMessage/SystemMessage.d.ts +7 -0
  20. package/dist/components/MessageList/components/SystemMessage/components/ChangedChannel/ChangedChannel.d.ts +6 -0
  21. package/dist/components/MessageList/components/SystemMessage/components/ChangedChannel/index.d.ts +1 -0
  22. package/dist/components/MessageList/components/SystemMessage/components/UserChanged/UserChanged.d.ts +7 -0
  23. package/dist/components/MessageList/components/SystemMessage/components/UserChanged/index.d.ts +1 -0
  24. package/dist/components/MessageList/components/SystemMessage/components/UserChangedChannel/UserChangedChannel.d.ts +7 -0
  25. package/dist/components/MessageList/components/SystemMessage/components/UserChangedChannel/index.d.ts +1 -0
  26. package/dist/components/MessageList/components/SystemMessage/components/UserJoined/UserJoined.d.ts +6 -0
  27. package/dist/components/MessageList/components/SystemMessage/components/UserJoined/index.d.ts +1 -0
  28. package/dist/components/MessageList/components/SystemMessage/index.d.ts +1 -0
  29. package/dist/components/MessageList/components/SystemMessage/styles.d.ts +2 -0
  30. package/dist/components/MessageList/components/UserMessage/UserMessage.d.ts +9 -0
  31. package/dist/components/MessageList/components/UserMessage/index.d.ts +1 -0
  32. package/dist/components/MessageList/components/UserMessage/styles.d.ts +5 -0
  33. package/dist/components/MessageList/index.d.ts +1 -7
  34. package/dist/components/MessageList/styles.d.ts +1 -1
  35. package/dist/components/NameInput/styles.d.ts +1 -1
  36. package/dist/components/PinnedMessageList/PinnedMessageList.d.ts +3 -0
  37. package/dist/components/PinnedMessageList/index.d.ts +1 -0
  38. package/dist/components/PinnedMessageList/styles.d.ts +2 -0
  39. package/dist/components/SubHeader/SubHeader.d.ts +7 -0
  40. package/dist/components/SubHeader/index.d.ts +1 -7
  41. package/dist/components/SubHeader/styles.d.ts +1 -1
  42. package/dist/containers/Auth/components/ActionBlock/styles.d.ts +1 -1
  43. package/dist/containers/Auth/components/Guest/styles.d.ts +1 -1
  44. package/dist/containers/Auth/components/Signin/styles.d.ts +1 -1
  45. package/dist/containers/Auth/components/Signup/styles.d.ts +1 -1
  46. package/dist/containers/Auth/styles.d.ts +1 -1
  47. package/dist/containers/ChannelPage/ChannelPage.d.ts +3 -3
  48. package/dist/containers/ChannelPage/service.d.ts +8 -0
  49. package/dist/containers/ChannelPage/styles.d.ts +1 -1
  50. package/dist/containers/Channels/components/Footer/styles.d.ts +1 -1
  51. package/dist/containers/Channels/styles.d.ts +1 -1
  52. package/dist/containers/CreatePollPage/components/CreatePollForm/styles.d.ts +1 -1
  53. package/dist/containers/CreatePollPage/components/ErrorMessage/styles.d.ts +1 -1
  54. package/dist/containers/CreatePollPage/styles.d.ts +1 -1
  55. package/dist/containers/PollListPage/components/PollCard/styles.d.ts +1 -1
  56. package/dist/containers/PollListPage/services.d.ts +1 -1
  57. package/dist/containers/PollPortal/services.d.ts +1 -1
  58. package/dist/containers/PollPortal/styles.d.ts +1 -1
  59. package/dist/containers/Profile/styles.d.ts +1 -1
  60. package/dist/containers/UsersListPage/components/UserList/styles.d.ts +1 -1
  61. package/dist/containers/UsersListPage/components/UserRow/styles.d.ts +1 -1
  62. package/dist/hoc/MoreButtonHOC.d.ts +9 -0
  63. package/dist/index.es.js +200 -5
  64. package/dist/index.js +200 -5
  65. package/dist/keystone/auth.d.ts +17 -6
  66. package/dist/keystone/chat/channel.d.ts +30 -4
  67. package/dist/keystone/chat/index.d.ts +9 -3
  68. package/dist/keystone/chat/message.d.ts +17 -3
  69. package/dist/keystone/chat/pinnedMessage.d.ts +21 -0
  70. package/dist/keystone/chat/poll.d.ts +15 -3
  71. package/dist/keystone/chat/pub.d.ts +7 -3
  72. package/dist/keystone/chat/user.d.ts +16 -3
  73. package/dist/keystone/index.d.ts +13 -3
  74. package/dist/keystone/service.d.ts +1 -0
  75. package/dist/keystone/settings.d.ts +34 -13
  76. package/dist/keystone/socket.d.ts +7 -5
  77. package/dist/keystone/ui.d.ts +17 -6
  78. package/dist/locales/index.d.ts +24 -6
  79. package/dist/theme/consts.d.ts +35 -18
  80. package/dist/theme/muicssbaseline.d.ts +4 -0
  81. package/dist/theme/theme.d.ts +1 -1
  82. package/dist/types/const.d.ts +1 -0
  83. package/dist/types/serverResponses.d.ts +7 -0
  84. package/dist/types/socketEvents.d.ts +4 -1
  85. package/dist/ui-kit/HeaderTitle/HeaderTitile.d.ts +8 -0
  86. package/dist/ui-kit/HeaderTitle/index.d.ts +1 -0
  87. package/dist/ui-kit/HeaderTitle/styles.d.ts +2 -0
  88. package/dist/ui-kit/components/Avatar/Avatar.d.ts +2 -0
  89. package/dist/ui-kit/components/Avatar/styles.d.ts +1 -1
  90. package/dist/ui-kit/components/Button/index.d.ts +1 -1
  91. package/dist/ui-kit/components/Button/styles.d.ts +1 -1
  92. package/dist/ui-kit/components/Checkbox/styles.d.ts +1 -1
  93. package/dist/ui-kit/components/DropMenu/DropMenu.d.ts +8 -0
  94. package/dist/ui-kit/components/DropMenu/DropMenuItem.d.ts +10 -0
  95. package/dist/ui-kit/components/DropMenu/index.d.ts +2 -0
  96. package/dist/ui-kit/components/DropMenu/styles.d.ts +2 -0
  97. package/dist/ui-kit/components/FormErrorMessage/styles.d.ts +1 -1
  98. package/dist/ui-kit/components/Input/styles.d.ts +1 -1
  99. package/dist/ui-kit/components/Loaders/WineLoader/styles.d.ts +1 -1
  100. package/dist/ui-kit/icons/{ChatUsersIcon.d.ts → CloseCircleIcon.d.ts} +0 -0
  101. package/dist/ui-kit/icons/PinnedIcon.d.ts +10 -0
  102. package/dist/ui-kit/icons/SubmitMessageIcon.d.ts +10 -0
  103. package/dist/utils/common.d.ts +1 -0
  104. package/dist/utils/errors.d.ts +1 -1
  105. package/package.json +59 -67
  106. package/dist/components/MessageList/UserMessage/SystemMessage.d.ts +0 -9
  107. package/dist/components/MessageList/UserMessage/index.d.ts +0 -13
  108. package/dist/components/MessageList/UserMessage/styles.d.ts +0 -2
  109. package/dist/ui-kit/ChannelName/ChannelName.d.ts +0 -6
  110. package/dist/ui-kit/ChannelName/index.d.ts +0 -1
@@ -1,2 +1,2 @@
1
- declare const _default: (props?: any) => import("@material-ui/styles").ClassNameMap<"checkbox" | "input">;
1
+ declare const _default: (props?: any) => import("@mui/styles").ClassNameMap<"checkbox" | "input">;
2
2
  export default _default;
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ interface IProps {
3
+ open: boolean;
4
+ anchorEl: HTMLElement | null;
5
+ onClose: () => void;
6
+ }
7
+ export declare const DropMenu: React.FC<IProps>;
8
+ export default DropMenu;
@@ -0,0 +1,10 @@
1
+ import { MenuItemProps } from '@mui/material';
2
+ import React from 'react';
3
+ interface IProps {
4
+ onClose?: () => void;
5
+ href?: string;
6
+ action?: (e: React.SyntheticEvent) => void;
7
+ className?: string;
8
+ }
9
+ export declare const DropMenuItem: React.FC<IProps & MenuItemProps>;
10
+ export default DropMenuItem;
@@ -0,0 +1,2 @@
1
+ export { default as DropMenu } from './DropMenu';
2
+ export { default as DropMenuItem } from './DropMenuItem';
@@ -0,0 +1,2 @@
1
+ declare const _default: (props?: any) => import("@mui/styles").ClassNameMap<"paper" | "icon" | "menuItem">;
2
+ export default _default;
@@ -1,2 +1,2 @@
1
- declare const _default: (props?: any) => import("@material-ui/styles").ClassNameMap<"error">;
1
+ declare const _default: (props?: any) => import("@mui/styles").ClassNameMap<"error">;
2
2
  export default _default;
@@ -1,2 +1,2 @@
1
- declare const _default: (props?: any) => import("@material-ui/styles").ClassNameMap<"input" | "medium" | "text" | "large" | "fullWidth" | "outlined">;
1
+ declare const _default: (props?: any) => import("@mui/styles").ClassNameMap<"input" | "medium" | "text" | "large" | "fullWidth" | "outlined">;
2
2
  export default _default;
@@ -1,2 +1,2 @@
1
- declare const _default: (props?: any) => import("@material-ui/styles").ClassNameMap<"wineLoader" | "left" | "right" | "top" | "wineglass" | "ul" | "li" | "@keyframes rotate1" | "@keyframes rotate2" | "@keyframes fadeInUp">;
1
+ declare const _default: (props?: any) => import("@mui/styles").ClassNameMap<"wineLoader" | "left" | "right" | "top" | "wineglass" | "ul" | "li" | "@keyframes rotate1" | "@keyframes rotate2" | "@keyframes fadeInUp">;
2
2
  export default _default;
@@ -0,0 +1,10 @@
1
+ import { CSSProperties, ReactElement } from 'react';
2
+ interface IProps {
3
+ className?: string;
4
+ width?: number;
5
+ height?: number;
6
+ fill?: string;
7
+ style?: CSSProperties;
8
+ }
9
+ declare const _default: (props: IProps) => ReactElement;
10
+ export default _default;
@@ -0,0 +1,10 @@
1
+ import { CSSProperties, ReactElement } from 'react';
2
+ interface IProps {
3
+ className?: string;
4
+ width?: number;
5
+ height?: number;
6
+ fill?: string;
7
+ style?: CSSProperties;
8
+ }
9
+ declare const _default: (props: IProps) => ReactElement;
10
+ export default _default;
@@ -3,5 +3,6 @@ import Poll from '../keystone/chat/poll';
3
3
  export declare const findAppInitialData: () => {
4
4
  channelIdFromAttr?: string | null | undefined;
5
5
  appIdFromAttr?: string | null | undefined;
6
+ apiUrlFromAttr?: string | null | undefined;
6
7
  };
7
8
  export declare const convertServerPollToModel: (poll: IServerPoll) => Poll;
@@ -1,3 +1,3 @@
1
- export declare const getErrorMessage: (error: Error) => string;
1
+ export declare const getErrorMessage: (error: unknown) => string;
2
2
  declare const _default: {};
3
3
  export default _default;
package/package.json CHANGED
@@ -1,14 +1,12 @@
1
1
  {
2
2
  "name": "@vlprojects-chat/chat",
3
3
  "author": "vlprojects",
4
- "version": "0.0.25",
4
+ "version": "0.0.29",
5
5
  "description": "chat",
6
6
  "license": "ISC",
7
7
  "main": "dist/index.js",
8
8
  "module": "dist/index.es.js",
9
- "files": [
10
- "dist"
11
- ],
9
+ "files": ["dist"],
12
10
  "types": "dist/lib/index.d.ts",
13
11
  "repository": {
14
12
  "type": "git",
@@ -17,7 +15,7 @@
17
15
  "scripts": {
18
16
  "start": "react-scripts start",
19
17
  "build": "react-app-rewired build",
20
- "dist": "rm -rf dist && rollup -c",
18
+ "dist": "rm -rf dist && node --max-old-space-size=8192 node_modules/rollup/dist/bin/rollup -c rollup.config.js",
21
19
  "test": "react-scripts test",
22
20
  "eject": "react-scripts eject",
23
21
  "lint:js": "eslint ./src --ext .ts,.tsx",
@@ -25,101 +23,97 @@
25
23
  "mock": "json-server --watch ./src/mock-data/channels.json --routes ./src/mock-data/routes.json --port 8000"
26
24
  },
27
25
  "eslintConfig": {
28
- "extends": [
29
- "react-app",
30
- "react-app/jest"
31
- ]
26
+ "extends": ["react-app", "react-app/jest"]
32
27
  },
33
28
  "browserslist": {
34
- "production": [
35
- ">0.2%",
36
- "not dead",
37
- "not op_mini all"
38
- ],
39
- "development": [
40
- "last 1 chrome version",
41
- "last 1 firefox version",
42
- "last 1 safari version"
43
- ]
29
+ "production": [">0.2%", "not dead", "not op_mini all"],
30
+ "development": ["last 1 chrome version", "last 1 firefox version", "last 1 safari version"]
44
31
  },
45
32
  "dependencies": {
46
- "@material-ui/core": "^4.12.3",
47
- "@material-ui/icons": "^4.11.2",
48
- "@material-ui/lab": "^4.0.0-alpha.60",
49
- "axios": "^0.21.4",
50
- "centrifuge": "2.7.7",
33
+ "@emotion/react": "^11.5.0",
34
+ "@emotion/styled": "^11.3.0",
35
+ "@mui/icons-material": "^5.0.4",
36
+ "@mui/lab": "^5.0.0-alpha.51",
37
+ "@mui/material": "^5.0.4",
38
+ "@mui/styles": "^5.0.1",
39
+ "axios": "^0.23.0",
40
+ "centrifuge": "2.8.3",
51
41
  "classnames": "^2.3.1",
52
- "date-fns": "^2.23.0",
53
- "final-form": "^4.20.2",
42
+ "date-fns": "^2.25.0",
43
+ "final-form": "^4.20.4",
54
44
  "final-form-arrays": "^3.0.2",
55
45
  "js-cookie": "^2.2.1",
56
- "mobx": "^6.3.0",
57
- "mobx-keystone": "^0.60.6",
58
- "mobx-react": "^7.1.0",
59
- "mobx-react-lite": "^3.2.0",
46
+ "linkify-react": "^3.0.3",
47
+ "linkifyjs": "^3.0.3",
48
+ "mobx": "^6.3.5",
49
+ "mobx-keystone": "^0.63.2",
50
+ "mobx-react": "^7.2.1",
51
+ "mobx-react-lite": "^3.2.1",
60
52
  "mobx-utils": "^6.0.4",
61
- "notistack": "^1.0.10",
53
+ "notistack": "^2.0.2",
62
54
  "qs": "^6.10.1",
63
- "react-custom-scrollbars-2": "^4.4.0",
64
- "react-final-form": "^6.5.3",
55
+ "react-final-form": "^6.5.7",
65
56
  "react-final-form-arrays": "^3.1.3",
66
- "react-intl": "^5.20.12",
67
- "route-parser": "^0.0.5",
68
- "socket.io-client": "^4.2.0",
69
- "username-generator": "^1.1.0"
57
+ "react-intersection-observer": "^8.33.0",
58
+ "react-intl": "^5.21.0",
59
+ "react-virtuoso": "^2.2.8",
60
+ "route-parser": "^0.0.5"
70
61
  },
71
62
  "devDependencies": {
72
- "@rollup/plugin-alias": "^3.1.2",
73
- "@rollup/plugin-commonjs": "^19.0.0",
63
+ "@rollup/plugin-alias": "^3.1.6",
64
+ "@rollup/plugin-commonjs": "^20.0.0",
74
65
  "@rollup/plugin-json": "^4.1.0",
66
+ "@rollup/plugin-node-resolve": "^13.0.6",
67
+ "@rollup/plugin-url": "^6.1.0",
75
68
  "@rollup/plugin-image": "^2.1.1",
76
- "@rollup/plugin-node-resolve": "^13.0.0",
77
- "@rollup/plugin-url": "^6.0.0",
78
69
  "@svgr/rollup": "^5.5.0",
79
- "@testing-library/jest-dom": "^5.11.4",
80
- "@testing-library/react": "^11.1.0",
81
- "@testing-library/user-event": "^12.1.10",
82
- "@types/jest": "^26.0.23",
83
- "@types/js-cookie": "^2.2.6",
84
- "@types/node": "^15.0.1",
70
+ "@testing-library/jest-dom": "^5.14.1",
71
+ "@testing-library/react": "^11.2.7",
72
+ "@testing-library/user-event": "^12.8.3",
73
+ "@types/jest": "^26.0.24",
74
+ "@types/js-cookie": "^2.2.7",
75
+ "@types/node": "^16.11.1",
85
76
  "@types/qs": "^6.9.7",
86
- "@types/react": "^17.0.4",
87
- "@types/react-dom": "^17.0.3",
88
- "@types/react-router-dom": "^5.1.7",
77
+ "@types/react": "^17.0.32",
78
+ "@types/react-dom": "^17.0.10",
79
+ "@types/react-linkify": "^1.0.1",
80
+ "@types/react-router-dom": "^5.3.1",
89
81
  "@types/route-parser": "^0.1.3",
90
82
  "@types/socket.io": "^3.0.2",
91
- "@typescript-eslint/eslint-plugin": "^4.23.0",
83
+ "@typescript-eslint/eslint-plugin": "^4.33.0",
92
84
  "autoprefixer": "9.0.0",
93
85
  "customize-cra": "^1.0.0",
94
86
  "eslint-config-airbnb-typescript": "^12.3.1",
95
87
  "eslint-config-prettier": "^8.3.0",
96
- "eslint-plugin-import": "^2.22.1",
88
+ "eslint-plugin-import": "^2.25.2",
97
89
  "eslint-plugin-jsx-a11y": "^6.4.1",
98
- "eslint-plugin-react": "^7.23.2",
90
+ "eslint-plugin-react": "^7.26.1",
99
91
  "eslint-plugin-react-hooks": "^4.2.0",
100
- "json-server": "^0.16.3",
92
+ "json-server": "^0.17.0",
101
93
  "module-alias": "^2.2.2",
102
- "nanoid": "^3.1.23",
103
- "postcss": "^8.3.0",
94
+ "nanoid": "^3.1.30",
95
+ "node-sass": "^6.0.1",
96
+ "postcss": "^8.3.9",
104
97
  "postcss-loader": "^5.3.0",
98
+ "prettier": "^2.4.1",
105
99
  "react-app-rewired": "^2.1.8",
106
100
  "react-scripts": "^4.0.3",
107
- "react-use": "^17.2.4",
108
- "rollup": "^2.51.0",
101
+ "react-use": "^17.3.1",
102
+ "rollup": "^2.58.0",
109
103
  "rollup-plugin-analyzer": "^4.0.0",
110
- "rollup-plugin-base64": "^1.0.1",
111
104
  "rollup-plugin-copy": "^3.4.0",
112
- "rollup-plugin-dotenv": "^0.3.0",
113
105
  "rollup-plugin-font": "^1.1.2",
114
106
  "rollup-plugin-image-files": "^1.4.2",
115
107
  "rollup-plugin-peer-deps-external": "^2.2.4",
116
- "rollup-plugin-postcss": "^4.0.0",
117
- "rollup-plugin-scss": "^2.6.1",
108
+ "rollup-plugin-postcss": "^4.0.1",
109
+ "rollup-plugin-scss": "^3.0.0",
118
110
  "rollup-plugin-svg-import": "^1.5.1",
119
111
  "rollup-plugin-terser": "^7.0.2",
120
112
  "rollup-plugin-typescript2": "^0.30.0",
121
- "tslib": "^2.3.0",
122
- "typescript": "^4.2.4"
113
+ "rollup-plugin-base64": "^1.0.1",
114
+ "rollup-plugin-dotenv": "^0.3.0",
115
+ "tslib": "^2.3.1",
116
+ "typescript": "^4.4.4"
123
117
  },
124
118
  "peerDependencies": {
125
119
  "react": "^17.0.2",
@@ -129,7 +123,5 @@
129
123
  "url": "https://github.com/VLprojects/chat/issues"
130
124
  },
131
125
  "homepage": "https://github.com/VLprojects/chat#readme",
132
- "keywords": [
133
- "chat"
134
- ]
126
+ "keywords": ["chat"]
135
127
  }
@@ -1,9 +0,0 @@
1
- import { FC } from 'react';
2
- interface ISystemMessageProps {
3
- message: string;
4
- date?: string;
5
- isNew?: boolean;
6
- type?: 'system';
7
- }
8
- declare const SystemMessage: FC<ISystemMessageProps>;
9
- export default SystemMessage;
@@ -1,13 +0,0 @@
1
- import React from 'react';
2
- import User from '../../../keystone/chat/user';
3
- interface UserMessageProps {
4
- own?: boolean;
5
- user?: User;
6
- message: string;
7
- date?: string;
8
- isNew?: boolean;
9
- type?: 'system';
10
- short?: boolean;
11
- }
12
- declare const _default: React.FunctionComponent<UserMessageProps>;
13
- export default _default;
@@ -1,2 +0,0 @@
1
- declare const _default: (props?: any) => import("@material-ui/styles").ClassNameMap<"message" | "system" | "displayName" | "time" | "userMessage" | "userMessageOwn" | "isNew">;
2
- export default _default;
@@ -1,6 +0,0 @@
1
- import { FC } from 'react';
2
- interface IProps {
3
- name: string;
4
- }
5
- declare const ChannelName: FC<IProps>;
6
- export default ChannelName;
@@ -1 +0,0 @@
1
- export { default } from './ChannelName';