Skip to content

Commit

Permalink
Merge branch 'develop' into fix/permission-for-video-audio
Browse files Browse the repository at this point in the history
  • Loading branch information
abirc8010 authored Jan 30, 2025
2 parents b14c2fd + b501f76 commit fb10370
Show file tree
Hide file tree
Showing 60 changed files with 1,253 additions and 208 deletions.
5 changes: 0 additions & 5 deletions .changeset/thick-moose-reply.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/wicked-cats-try.md

This file was deleted.

47 changes: 47 additions & 0 deletions packages/api/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,52 @@
# @embeddedchat/api

## 0.1.2

### Patch Changes

- Version Bump
- Updated dependencies
- @embeddedchat/auth@0.1.2

## 0.1.1

### Patch Changes

- Version Bump
- Updated dependencies
- @embeddedchat/auth@0.1.1

## 0.1.0

### Minor Changes

- 5f604c59: - Configure EC remotely: added settings, refactored read logic, introduced fetch function, and added useRemoteProps hook to override props.

See [#599](https://github.com/RocketChat/EmbeddedChat/pull/599).

### Patch Changes

- 5f604c59: - Restructured Auto Login, added loading screens, and cleaned up code.

See [#594](https://github.com/RocketChat/EmbeddedChat/pull/594).

- 5f604c59: - Modularized UiKit folder structure.

- Added logic for state and view updates, similar to Rocket.Chat.
- Implemented contexts and action handlers for modals and actions.
- Added interactions for sending values to the server.
- Introduced global states for modals and contextual bar.
- Resolved menu issues and added contextual bar support.
- Fixed stylings and addressed minor bugs.
- Added support for static and multi-select elements with custom components.
- Created stories for new components.

See [#593](https://github.com/RocketChat/EmbeddedChat/pull/593).

- Updated dependencies [5f604c59]
- Updated dependencies [5f604c59]
- @embeddedchat/auth@0.1.0

## 0.0.2

### Patch Changes
Expand Down
4 changes: 2 additions & 2 deletions packages/api/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@embeddedchat/api",
"version": "0.0.2",
"version": "0.1.2",
"description": "A comprehensive API wrapper for Rocket.Chat, facilitating seamless integration and interaction with chat functionalities in web applications.",
"main": "dist/index.js",
"module": "dist/index.mjs",
Expand All @@ -23,7 +23,7 @@
"rollup-plugin-serve": "^2.0.2"
},
"dependencies": {
"@embeddedchat/auth": "0.0.1",
"@embeddedchat/auth": "workspace:^",
"@rocket.chat/sdk": "^1.0.0-alpha.42"
}
}
41 changes: 41 additions & 0 deletions packages/api/src/EmbeddedChatApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -552,6 +552,47 @@ export default class EmbeddedChatApi {
}
}

async getOlderMessages(
anonymousMode = false,
options: {
query?: object | undefined;
field?: object | undefined;
offset?: number;
} = {
query: undefined,
field: undefined,
offset: 50,
},
isChannelPrivate = false
) {
const roomType = isChannelPrivate ? "groups" : "channels";
const endp = anonymousMode ? "anonymousread" : "messages";
const query = options?.query
? `&query=${JSON.stringify(options.query)}`
: "";
const field = options?.field
? `&field=${JSON.stringify(options.field)}`
: "";
const offset = options?.offset ? options.offset : 0;
try {
const { userId, authToken } = (await this.auth.getCurrentUser()) || {};
const messages = await fetch(
`${this.host}/api/v1/${roomType}.${endp}?roomId=${this.rid}${query}${field}&offset=${offset}`,
{
headers: {
"Content-Type": "application/json",
"X-Auth-Token": authToken,
"X-User-Id": userId,
},
method: "GET",
}
);
return await messages.json();
} catch (err) {
console.log(err);
}
}

async getThreadMessages(tmid: string, isChannelPrivate = false) {
try {
const { userId, authToken } = (await this.auth.getCurrentUser()) || {};
Expand Down
33 changes: 33 additions & 0 deletions packages/auth/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# @embeddedchat/auth

## 0.1.2

### Patch Changes

- Version Bump

## 0.1.1

### Patch Changes

- Version Bump

## 0.1.0

### Minor Changes

- 5f604c59: - Reordered code for better readability.

- Removed unnecessary global states, handled by ECOptions.
- Cleaned up EmbeddedChat component, moved layout-related functions to ChatLayout.js.
- Added AuthTokenEndpoint in RC-app for token management.
- Modified auth.js to support both secure and localStorage login.
- Added API calls in RocketChatAuth library.

See [#590](https://github.com/RocketChat/EmbeddedChat/pull/590).

### Patch Changes

- 5f604c59: - Restructured Auto Login, added loading screens, and cleaned up code.

See [#594](https://github.com/RocketChat/EmbeddedChat/pull/594).
2 changes: 1 addition & 1 deletion packages/auth/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@embeddedchat/auth",
"version": "0.0.1",
"version": "0.1.2",
"description": "This is the `@embeddedchat/auth` package, designed to simplify authentication processes in applications using EmbeddedChat. It provides a streamlined and easy-to-use API for handling various authentication methods.",
"main": "dist/index.js",
"module": "dist/index.mjs",
Expand Down
17 changes: 17 additions & 0 deletions packages/docs/docs/Usage/embeddedchat_setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,23 @@ npm install @embeddedchat/react
yarn add @embeddedchat/react
```

## Vite Configuration (If Applicable)

If you're using EmbeddedChat in a Vite project, you need to make adjustments to your Vite configuration file to ensure compatibility with how environment variables are handled in the browser.

### Update `vite.config.js` or `vite.config.ts`

Add the following settings inside the `defineConfig` function of your Vite configuration file:

```javascript
base: "/",
define: {
"process.env": {},
},
```

These changes address compatibility issues and allow EmbeddedChat to function properly in Vite projects.

## Importing the Component

Import the `EmbeddedChat` component into your file:
Expand Down
52 changes: 52 additions & 0 deletions packages/e2e-react/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# e2e-react

## 0.0.3

### Patch Changes

- Version Bump
- Updated dependencies
- @embeddedchat/react@0.2.2

## 0.0.2

### Patch Changes

- Version Bump
- Updated dependencies
- @embeddedchat/react@0.2.1

## 0.0.1

### Patch Changes

- 5f604c59: - Shifted to ShadCN naming system.

- Fixed theming system and various component stylings.
- Limited modal size to EC component using React Portals.
- Removed Dropbox
- Fixed ImageGallery and UI inconsistencies.
- Resolved Sidebar overlap issue.
- Redesigned 'RocketChat - Minimalist' UI variant.
- Fixed Popup, member list, and command list popup.
- Fixed swiper bugs and stylings.
- Removed unnecessary dependencies and matched colors.
- Updated test to check .ec-chat-header--channelName instead of .ec-chat-header--channelDescription.

See [#579](https://github.com/RocketChat/EmbeddedChat/pull/579).

- Updated dependencies [5f604c59]
- Updated dependencies [5f604c59]
- Updated dependencies [5f604c59]
- Updated dependencies [5f604c59]
- Updated dependencies [5f604c59]
- Updated dependencies [5f604c59]
- Updated dependencies [5f604c59]
- Updated dependencies [5f604c59]
- Updated dependencies [5f604c59]
- Updated dependencies [5f604c59]
- Updated dependencies [c8c9dee0]
- Updated dependencies [5f604c59]
- Updated dependencies [5f604c59]
- Updated dependencies [100c5f79]
- @embeddedchat/react@0.2.0
2 changes: 1 addition & 1 deletion packages/e2e-react/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "e2e-react",
"private": true,
"version": "0.0.0",
"version": "0.0.3",
"type": "module",
"scripts": {
"dev": "vite",
Expand Down
36 changes: 36 additions & 0 deletions packages/htmlembed/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,41 @@
# @embeddedchat/htmlembed

## 0.0.8

### Patch Changes

- Version Bump
- Updated dependencies
- @embeddedchat/react@0.2.2

## 0.0.7

### Patch Changes

- Version Bump
- Updated dependencies
- @embeddedchat/react@0.2.1

## 0.0.6

### Patch Changes

- Updated dependencies [5f604c59]
- Updated dependencies [5f604c59]
- Updated dependencies [5f604c59]
- Updated dependencies [5f604c59]
- Updated dependencies [5f604c59]
- Updated dependencies [5f604c59]
- Updated dependencies [5f604c59]
- Updated dependencies [5f604c59]
- Updated dependencies [5f604c59]
- Updated dependencies [5f604c59]
- Updated dependencies [c8c9dee0]
- Updated dependencies [5f604c59]
- Updated dependencies [5f604c59]
- Updated dependencies [100c5f79]
- @embeddedchat/react@0.2.0

## 0.0.5

### Patch Changes
Expand Down
4 changes: 2 additions & 2 deletions packages/htmlembed/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@embeddedchat/htmlembed",
"description": "A lightweight and easy-to-use package that allows seamless integration of Embedded Chat into web applications using a simple HTML snippet. Ideal for quickly embedding chat functionalities without complex setup",
"version": "0.0.5",
"version": "0.0.8",
"main": "index.js",
"license": "MIT",
"type": "module",
Expand All @@ -13,7 +13,7 @@
"format:check": "prettier --check 'src/' "
},
"dependencies": {
"@embeddedchat/react": "0.1.12",
"@embeddedchat/react": "workspace:^",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
Expand Down
35 changes: 35 additions & 0 deletions packages/layout_editor/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# layout_editor

## 0.1.2

### Patch Changes

- Version Bump
- Updated dependencies
- @embeddedchat/ui-elements@0.1.2
- @embeddedchat/markups@0.1.2

## 0.1.1

### Patch Changes

- Version Bump
- Updated dependencies
- @embeddedchat/ui-elements@0.1.1
- @embeddedchat/markups@0.1.1

## 0.1.0

### Minor Changes

- 5f604c59: - Introduced 'layout-editor' for real-time drag-and-drop layout customization and theme generation in EmbeddedChat.

See [#607](https://github.com/RocketChat/EmbeddedChat/pull/607).

### Patch Changes

- Updated dependencies [5f604c59]
- Updated dependencies [5f604c59]
- Updated dependencies [5f604c59]
- @embeddedchat/ui-elements@0.1.0
- @embeddedchat/markups@0.1.0
2 changes: 1 addition & 1 deletion packages/layout_editor/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "layout_editor",
"private": true,
"version": "0.0.0",
"version": "0.1.2",
"type": "module",
"scripts": {
"dev": "vite",
Expand Down
36 changes: 36 additions & 0 deletions packages/markups/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# @embeddedchat/markups

## 0.1.2

### Patch Changes

- Version Bump
- Updated dependencies
- @embeddedchat/ui-elements@0.1.2

## 0.1.1

### Patch Changes

- Version Bump
- Updated dependencies
- @embeddedchat/ui-elements@0.1.1

## 0.1.0

### Minor Changes

- 5f604c59: - Separated components, markups, and ui-kit into individual monorepos.

See [#604](https://github.com/RocketChat/EmbeddedChat/pull/604).

### Patch Changes

- 5f604c59: - Optimized package size for bundling.

See [#606](https://github.com/RocketChat/EmbeddedChat/pull/606).

- Updated dependencies [5f604c59]
- Updated dependencies [5f604c59]
- Updated dependencies [5f604c59]
- @embeddedchat/ui-elements@0.1.0
Loading

0 comments on commit fb10370

Please sign in to comment.