@messenger-box/chakra-ui-inbox 7.2.1-alpha.2 → 7.2.4-alpha.0
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/CHANGELOG.md +23 -0
- package/lib/compute.js +2 -1
- package/lib/container/InboxWithLoader.d.ts +11 -0
- package/lib/container/InboxWithLoader.d.ts.map +1 -1
- package/lib/container/InboxWithLoader.js +18 -10
- package/lib/container/InboxWithLoader.js.map +1 -1
- package/lib/routes.json +2 -1
- package/package.json +5 -5
- package/src/container/InboxWithLoader.tsx +12 -8
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,29 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## 7.2.4-alpha.0 (2024-07-19)
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
- **chakra-ui:** add dynamic routing to inbox ([b498358](https://github.com/CDEBase/messenger-box/commit/b4983589f3ac88ea26f01ffe4f8d5d1f539609ac))
|
|
11
|
+
- **chakra-ui:** chat screen and list design ([132f893](https://github.com/CDEBase/messenger-box/commit/132f893848b86ec54fd92e1fa637e93bffd5f5c1))
|
|
12
|
+
- **chakra-ui:** stick message inbox to bottom ([86d0df8](https://github.com/CDEBase/messenger-box/commit/86d0df8393e01a27eddbe2825616e7aa8dc62e15))
|
|
13
|
+
- **chakra:** update inbox to be mobile resposive ([2ae7331](https://github.com/CDEBase/messenger-box/commit/2ae7331a8ada5ed8167f6eb0b753e86b0784eadd))
|
|
14
|
+
- **inbox:** add missing scrollbar in conversation list ([1450141](https://github.com/CDEBase/messenger-box/commit/1450141e8cf3d99ed51940551715cec914752e70))
|
|
15
|
+
- **messenger:** failed image uploads in messages ([ee327aa](https://github.com/CDEBase/messenger-box/commit/ee327aaff25393c2452d81c71a39b725e8f16712))
|
|
16
|
+
|
|
17
|
+
### Features
|
|
18
|
+
|
|
19
|
+
- add inbox right side bar slot ([a90e137](https://github.com/CDEBase/messenger-box/commit/a90e1370c010218c27b057526605e105f049cc5c))
|
|
20
|
+
- add proeprty ext module with fills based on property types ([9728317](https://github.com/CDEBase/messenger-box/commit/97283176059dca7e4bd78ad4de7bc26ae0492387))
|
|
21
|
+
- **chkra-ui:** move improved components from the pubngo repo to here ([0e1a7b1](https://github.com/CDEBase/messenger-box/commit/0e1a7b13373cb21f3c9ea2a3d9872022de69ea09))
|
|
22
|
+
- **messenger:** add filters to users channel query ([6b349c6](https://github.com/CDEBase/messenger-box/commit/6b349c6db204413dd3f5eb991f8fc8d80a0304a2))
|
|
23
|
+
- **messenger:** export components and containers to be used by ext repos ([2000aea](https://github.com/CDEBase/messenger-box/commit/2000aea37ff44c239b3fae0e6353db8f4d041c28))
|
|
24
|
+
|
|
25
|
+
## [7.2.1-alpha.4](https://github.com/CDEBase/messenger-box/compare/v7.2.1-alpha.3...v7.2.1-alpha.4) (2024-07-16)
|
|
26
|
+
|
|
27
|
+
**Note:** Version bump only for package @messenger-box/chakra-ui-inbox
|
|
28
|
+
|
|
6
29
|
## [7.2.1-alpha.2](https://github.com/CDEBase/messenger-box/compare/v7.2.1-alpha.1...v7.2.1-alpha.2) (2024-07-16)
|
|
7
30
|
|
|
8
31
|
**Note:** Version bump only for package @messenger-box/chakra-ui-inbox
|
package/lib/compute.js
CHANGED
|
@@ -14,8 +14,9 @@ const messengerPageStore = [{
|
|
|
14
14
|
,
|
|
15
15
|
componentPath: "@messenger-box/chakra-ui-inbox/lib/container/InboxWithLoader.js",
|
|
16
16
|
hasComponent: true,
|
|
17
|
+
queryParamsGenerator: true,
|
|
17
18
|
queries: {
|
|
18
|
-
GetChannelsByUserWithServiceChannelsDocument: "
|
|
19
|
+
GetChannelsByUserWithServiceChannelsDocument: "queryParamsGenerator_variable1",
|
|
19
20
|
MessagesDocument: "{channelId: params.channelId,parentId: params.parentId,limit: params.limit}",
|
|
20
21
|
ViewChannelDetailDocument: "{id: params.id}"
|
|
21
22
|
}
|
|
@@ -1,4 +1,15 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { IRoomType } from '@messenger-box/platform-client';
|
|
3
|
+
export declare const queryParamsGenerator: (params: any) => {
|
|
4
|
+
variable1: {
|
|
5
|
+
role: any;
|
|
6
|
+
criteria: any;
|
|
7
|
+
supportServices: boolean;
|
|
8
|
+
supportServiceCriteria: {
|
|
9
|
+
type: IRoomType;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
};
|
|
2
13
|
declare const _default: React.MemoExoticComponent<(props: any) => React.JSX.Element>;
|
|
3
14
|
export default _default;
|
|
4
15
|
//# sourceMappingURL=InboxWithLoader.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InboxWithLoader.d.ts","sourceRoot":"","sources":["../../src/container/InboxWithLoader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;;
|
|
1
|
+
{"version":3,"file":"InboxWithLoader.d.ts","sourceRoot":"","sources":["../../src/container/InboxWithLoader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAOxC,OAAO,EAIH,SAAS,EACZ,MAAM,gCAAgC,CAAC;AAKxC,eAAO,MAAM,oBAAoB;;;;;;;;;CAS/B,CAAC;;AAsDH,wBAA2C"}
|
|
@@ -1,6 +1,16 @@
|
|
|
1
|
-
import React__default from'react';import {useParams,Await}from'@remix-run/react';import {Spinner}from'@admin-layout/chakra-ui';import {Alert}from'@chakra-ui/react';import Inbox from'./Inbox.js';import {useGetChannelsByUserWithServiceChannelsQuery,
|
|
1
|
+
import React__default from'react';import {useParams,Await}from'@remix-run/react';import {Spinner}from'@admin-layout/chakra-ui';import {Alert}from'@chakra-ui/react';import Inbox from'./Inbox.js';import {IRoomType,useGetChannelsByUserWithServiceChannelsQuery,useMessagesQuery,useViewChannelDetailQuery}from'@messenger-box/platform-client';import {config}from'../config/env-config.js';const {
|
|
2
2
|
MESSAGES_PER_PAGE
|
|
3
3
|
} = config;
|
|
4
|
+
const queryParamsGenerator = params => ({
|
|
5
|
+
variable1: {
|
|
6
|
+
role: params.channelRole,
|
|
7
|
+
criteria: params.channelFilters,
|
|
8
|
+
supportServices: params.supportServices ? true : false,
|
|
9
|
+
supportServiceCriteria: {
|
|
10
|
+
type: IRoomType.Service
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
});
|
|
4
14
|
const InboxWithLoader = props => {
|
|
5
15
|
const {
|
|
6
16
|
channelFilters: channelFilterProp,
|
|
@@ -17,14 +27,12 @@ const InboxWithLoader = props => {
|
|
|
17
27
|
postId: pathPostId
|
|
18
28
|
} = path || {};
|
|
19
29
|
const GetChannelsByUserWithServiceChannelsLoaderQuery = useGetChannelsByUserWithServiceChannelsQuery({
|
|
20
|
-
variables: {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
}
|
|
27
|
-
},
|
|
30
|
+
variables: queryParamsGenerator({
|
|
31
|
+
...path,
|
|
32
|
+
channelRole,
|
|
33
|
+
channelFilters,
|
|
34
|
+
supportServices
|
|
35
|
+
}).variable1,
|
|
28
36
|
fetchPolicy: 'cache-only'
|
|
29
37
|
});
|
|
30
38
|
const MessagesLoaderQuery = useMessagesQuery({
|
|
@@ -53,4 +61,4 @@ const InboxWithLoader = props => {
|
|
|
53
61
|
...props
|
|
54
62
|
})));
|
|
55
63
|
};
|
|
56
|
-
var InboxWithLoader$1 = React__default.memo(InboxWithLoader);export{InboxWithLoader$1 as default};//# sourceMappingURL=InboxWithLoader.js.map
|
|
64
|
+
var InboxWithLoader$1 = React__default.memo(InboxWithLoader);export{InboxWithLoader$1 as default,queryParamsGenerator};//# sourceMappingURL=InboxWithLoader.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InboxWithLoader.js","sources":["../../src/container/InboxWithLoader.tsx"],"sourcesContent":[null],"names":[
|
|
1
|
+
{"version":3,"file":"InboxWithLoader.js","sources":["../../src/container/InboxWithLoader.tsx"],"sourcesContent":[null],"names":[],"mappings":"8XAeA,MAAM;AAEN,EAAM,iBAA2B;AAC7B,CAAA,GAAA,MAAA,CAAA;AACQ,MAAA,oBAAoB,GAAA,MAAA,KAAA;WAChB,EAAA;QACR,EAAe,MAAA,CAAA,WAAQ;AACvB,IAAA,QAAA,EAAA,MAAA,CAAA,cAAwB;mBACL,EAAA,MAAA,CAAC,eAAO,GAAA,IAAA,GAAA,KAAA;AAC1B,IAAA,sBAAA,EAAA;AACJ,MAAA,IAAA,EAAA,SAAA,CAAA,OAAA;AACJ,KAAE;AAEH,GAAA;AACI,CAAA,EAAA;AACA,MAAA,kBAAoB,KAAK,IAAG;AAE5B,EAAA,MAAA;AACA,IAAA,cAAY,EAAA,iBAAqB;IAEjC,WAAM;AACF,IAAA,eAAW;AACX,IAAA,UAAA;AACH,GAAA,GAAC,KAAC,CAAA;QAEG,cAAA,GAAA;AACF,IAAA,GAAA,iBAAW;AACP,GAAA,CAAA;AACA,EAAA,MAAA,IAAA,GAAA,SAAc,EAAA,CAAA;AACd,EAAA,MAAA;qBACc;AACjB,IAAA,MAAA,EAAA,UAAA;UACG,IAAE,EAAc,CAAA;AACpB,EAAA,MAAA,+CAAyB,GAAA,4CAAA,CAAA;AAC5B,IAAA,SAAE,EAAA,oBAAA,CAAA;MAEG,GAAA,IAAA;AACF,MAAA,WAAS;AACL,MAAA,cAAI;AACP,MAAA,eAAA;AACD,KAAA,CAAA,CAAA,SAAA;AACH,IAAA,WAAE,EAAA,YAAA;IAEH,CAAO;AAEC,EAAA,MAAA,mBAAA,mBACa,CAAO;;iBAEO,aAAA,EAAA,QAAA,EAAA;gBACnB,IAA4B;AAC/B,MAAA,KAAA,EAAA,iBACa;;;wBAKa;6BACS;AAC/B,GAAA,CAAA,CAAA;AAMrB,EAAE,MAAA,4BAAA,GAAA,yBAAA,CAAA;AACF,IAAA,SAAA,EAAe;;;;;;;;;;;;;;;"}
|
package/lib/routes.json
CHANGED
|
@@ -13,8 +13,9 @@
|
|
|
13
13
|
"path": "//inbox/:id?/:postId?",
|
|
14
14
|
"componentPath": "@messenger-box/chakra-ui-inbox/lib/container/InboxWithLoader.js",
|
|
15
15
|
"hasComponent": true,
|
|
16
|
+
"queryParamsGenerator": true,
|
|
16
17
|
"queries": {
|
|
17
|
-
"GetChannelsByUserWithServiceChannelsDocument": "
|
|
18
|
+
"GetChannelsByUserWithServiceChannelsDocument": "queryParamsGenerator_variable1",
|
|
18
19
|
"MessagesDocument": "{channelId: params.channelId,parentId: params.parentId,limit: params.limit}",
|
|
19
20
|
"ViewChannelDetailDocument": "{id: params.id}"
|
|
20
21
|
}
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@messenger-box/chakra-ui-inbox",
|
|
3
|
-
"version": "7.2.
|
|
3
|
+
"version": "7.2.4-alpha.0",
|
|
4
4
|
"description": "Account browser",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"author": "CDMBase LLC",
|
|
7
|
+
"type": "module",
|
|
7
8
|
"main": "lib/index.js",
|
|
8
9
|
"module": "lib/index.js",
|
|
9
|
-
"type": "module",
|
|
10
10
|
"typings": "lib/index.d.ts",
|
|
11
11
|
"scripts": {
|
|
12
12
|
"build": "npm run build:clean && npm run build:lib",
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
"watch": "npm run build:lib:watch"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@messenger-box/core": "7.2.
|
|
25
|
-
"@messenger-box/platform-client": "7.2.
|
|
24
|
+
"@messenger-box/core": "7.2.4-alpha.0",
|
|
25
|
+
"@messenger-box/platform-client": "7.2.4-alpha.0",
|
|
26
26
|
"date-fns": "^2.28.0",
|
|
27
27
|
"date-fns-tz": "^1.3.3",
|
|
28
28
|
"emoji-mart": "^3.0.1",
|
|
@@ -56,5 +56,5 @@
|
|
|
56
56
|
"typescript": {
|
|
57
57
|
"definition": "lib/index.d.ts"
|
|
58
58
|
},
|
|
59
|
-
"gitHead": "
|
|
59
|
+
"gitHead": "bc82c169b69625c6473614ed03668ebec9776820"
|
|
60
60
|
}
|
|
@@ -15,6 +15,17 @@ import { config } from '../config';
|
|
|
15
15
|
|
|
16
16
|
const { MESSAGES_PER_PAGE } = config;
|
|
17
17
|
|
|
18
|
+
export const queryParamsGenerator = (params) => ({
|
|
19
|
+
variable1: {
|
|
20
|
+
role: params.channelRole,
|
|
21
|
+
criteria: params.channelFilters,
|
|
22
|
+
supportServices: params.supportServices ? true : false,
|
|
23
|
+
supportServiceCriteria: {
|
|
24
|
+
type: IRoomType.Service,
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
});
|
|
28
|
+
|
|
18
29
|
const InboxWithLoader = (props) => {
|
|
19
30
|
const { channelFilters: channelFilterProp, channelRole, supportServices, pathPrefix } = props;
|
|
20
31
|
const channelFilters = { ...channelFilterProp };
|
|
@@ -23,14 +34,7 @@ const InboxWithLoader = (props) => {
|
|
|
23
34
|
const { id: pathChannelId, postId: pathPostId } = path || {};
|
|
24
35
|
|
|
25
36
|
const GetChannelsByUserWithServiceChannelsLoaderQuery = useGetChannelsByUserWithServiceChannelsQuery({
|
|
26
|
-
variables: {
|
|
27
|
-
role: channelRole,
|
|
28
|
-
criteria: channelFilters,
|
|
29
|
-
supportServices: supportServices ? true : false,
|
|
30
|
-
supportServiceCriteria: {
|
|
31
|
-
type: IRoomType.Service,
|
|
32
|
-
},
|
|
33
|
-
},
|
|
37
|
+
variables: queryParamsGenerator({ ...path, channelRole, channelFilters, supportServices }).variable1,
|
|
34
38
|
fetchPolicy: 'cache-only',
|
|
35
39
|
});
|
|
36
40
|
|