Skip to content

Commit

Permalink
Release/v4.0.0 beta.3 (#58)
Browse files Browse the repository at this point in the history
* chore: ASC-00000 - css module typescript config (#233)

* fix: ASC-21254 - align api signature for draft page (#210)

* fix: can't upload story

* fix: story image renderer

* fix: align comment tray component props

* fix: align story tab component props

* fix: change export name to align signature api

* fix: ddraft page

* fix: align signature api

* fix: fill color

* fix: ASC-21249 - align story tab component props (#203)

* fix: can't upload story

* fix: story image renderer

* fix: align comment tray component props

* fix: align story tab component props

* fix: change export name to align signature api

* fix: ddraft page

* fix: align signature api

* fix: story tab

* fix: ASC-21260 - align comment tray component props (#202)

* fix: can't upload story

* fix: story image renderer

* fix: align comment tray component props

* fix: align story tab component props

* fix: change export name to align signature api

* fix: ddraft page

* fix: align signature api

* fix: story tab

* fix: remove unused

* fix: comment tray

* fix: ASC-21404 - AmityViewStoryPage signature alignment  (#209)

* fix z-index

* fix: signature alignment

* fix: view story page

* feat: add to support 6 users for storybook (#238)

* feat: ASC-00000 - use more env from secrets (#239)

* feat: add to support 6 users for storybook

* fix: add to read env from secrets

* feat: ASC-00000 - add more storybook user (#240)

* feat: add to support 6 users for storybook

* fix: add to read env from secrets

* fix: add use secret on staging

* fix: permission (#244)

* fix: ASC-21393 - refactor customization 4.0  (#211)

* feat: add generateShadeColors func

* feat: add AmityUIKitManager

* chore: add tsdoc to AmityUIKitManager

* fix: merge from develop

* fix: AmityUIKit manager

* fix: remove unused

* fix: revert uikit 3

* fix: remove unused

* fix: export

* fix: move to main v4

* fix: move to v4

* fix: export path

* Refactor theme generation logic in
ThemeProvider.tsx

* fix: theme color generation

* fix: theme provider

* fix: remove unused

* feat: add Typography component with css

* fix: css

* fix: add queryClient provider

* fix: import

* fix: import

* fix: v4

* fix: conflict

* fix: draft page

* fix: setup

* fix: export

* fix: move mergedNavigationBehavior

* fix: remove unused

* fix: remove unused

* fix: uikit manager

* fix: uncomment

* fix: remove unused

* fix: remove unused

* fix: remove unused

* fix: remove unused files

* fix: remove

* fix: login

* fix: css var

* fix: css var

* fix: condition

* fix: css var

* fix: css var

* fix: hook

* fix: type

* fix: ASC-00000 - V4 fix customization (#248)

* fix: config structure

* fix: add hyperlink config

* fix: add validate

* fix: config and hyperlink

* fix: hyperlink

* fix: css

* fix: border radius

* fix: hyperlink

* fix: hyperlink

* fix: add storybook user

* fix: aspect ratio

* fix: hyperlink config css var

Co-authored-by: Kiattirat Sujjapongse <[email protected]>

* fix: css var module

Co-authored-by: Kiattirat Sujjapongse <[email protected]>

* fix: ASC-21789 - create story on view story page doesn't work (#249)

* fix: video

* fix: uncomment

---------

Co-authored-by: Kiattirat Sujjapongse <[email protected]>

---------

Co-authored-by: Kiattirat Sujjapongse <[email protected]>

* feat(chat): ASC-0000 - Chat V4 big chunk 1 (#214)

* feat: add livechat ui

* feat: add chatButton and desktop view

* fix: bg color

* feat: move story to be under V4 storybook folder

* feat: add customComponent

* fix: change chat icon

* fix: remove unread notification

* fix: remove un-used hook

* fix: remove un-used

* fix: change style to module css

* fix: remove unused

* feat: add prefix`asc` to default css config

* fix: remove chatIcon

* fix: modal not open smoothly at the first time

* fix: remove un-used styling

* feat: update color pallate

* feat: update spacing

* feat: update color and fontSize

* fix: box shadow on header

* feat: re-structure folder to v4

* fix: import global css

* fix: use typograhy module css

* fix: remove unused

* feat: add message list and bubbles

* fix: wrap element

* fix: change file name

* feat: add compose bar

* feat: add home indicator

* feat: add sending a mesage action

* fix: sorting message to be asc

* feat: add badge for moderator

* fix: overflow message

* fix: sortBy segmentAsc

* feat: add message list pagination

* feat(chat): add draft-js as a compose bar

* feat: add loading indicator

* feat(chat): fix submit

* feat(chat): fix compose bar container

* feat: add viewing reply message

* fix: deleted message display

* fix: remove comment

* feat(chat): use default compose bar / remove draft-js

* feat(chat): remove draft

* feat(chat-state): asc-20903 done loading state

* feat(chat-state): asc-20903 restructure

* feat(chat-state): asc-20903 apply infinite scroll

* feat(chat-state): asc-20903 include error from sdk api to local hook

* feat(chat-state): asc-20903 add error state

* feat(chat-state): asc-20903 add error state

* feat(chat-mention): asc-00000 create message with mention

* feat: add popover action

* feat: add hover state for message action

* feat: add flag and mention button

* feat(chat-mention): asc-00000 click to mention

* feat: add more action

* fix: merge

* fix: hide mention and flag

* fix: ASC-20213 - fix message list (#219)

* fix: message list of the same user

* fix: z-index

* feat: confirm modal v3 to support dark mode

* fix: change to use i18n

* fix: TODO text display on Modal content

* fix: merge className

* fix: remove unused

* fix: bring overflow-y back

Co-authored-by: Kiattirat Sujjapongse <[email protected]>

---------

Co-authored-by: Kiattirat Sujjapongse <[email protected]>

* fix(chat): fix pagination issue (#223)

* feat(chat): ASC-21243 - create message with reply message (#218)

* feat(chat): reply placeholder

* feat(chat): create message with reply

* feat: ASC-00000 - dark mode hard code (#225)

* fix: dark theme color palatte

* fix: header color styling

* fix: colors on message bubble

* fix: color on popover

* fix: color on optionIcon

* fix(chat): asc-00000 -  fix loading state css broken (#221)

* fix(chat): asc-00000 loading state css missing

* fix(chat): asc-00000 loading state css missing

* feat(chat): ASC-20222 - connection offline alert (#213)

* feat(chat): asc-20222 - connection state

* feat(chat): asc-20222 - add more connection

* feat(chat): asc-20222 - update PR

* feat(chat): asc-20222 - update PR

* feat: update PR

* fix(chat): ASC-00000 - update mention payload (#224)

* fix(chat): update mention payload

* fix(chat): mention ALL

* fix: sample app to open sheet every selection

* fix: hide heart reaction

* feat: ASC-20213 - fix popover still show (#235)

* fix: popover still show

* fix: bring just ArrowTop code back

* fix: resize messagelist container (#232)

* feat: ASC-20213 - highlight mention message (#236)

* fix: popover still show

* fix: bring just ArrowTop code back

* feat: add hilight for mention message

* fix: truncate long text of replied message

* fix: change getTextWithMention to be a component

* fix: message not show as a new line

* feat: ASC-20213 - fix consequence message list (#237)

* fix: remove consequence message list

* fix: remove unused

* feat(chat): ASC-00000 - api alignment for chat header (#241)

* feat(chat): api alignment chat header

* Update src/v4/chat/components/AmityLiveChatHeader/livechatHeader.stories.tsx

* feat(chat): ASC-00000 - export AmityLiveChatHeader

* fix: ASC-21776 - reply message display on compose bar is over the screen (#242)

* fix: reply display message over the screen

* feat: remove comment

* feat(chat): duplicate useSocialMention => useMention and revert

* feat(chat): update pr

* fix(chat): ASC-00000 - change theme for message composer (#234)

* fix(chat): ASC-00000 - duplicate v4

* fix(chat): ASC-00000 - check message length before submit

* fix(chat): ASC-00000 -update styling

* fix(chat): ASC-00000 - update styling

* fix(chat): prettier remove code by accident

* fix(chat): remove styled component

* fix(chat): asc-21737 - update condition to prevent create duplicate message (#245)

* fix(chat): asc-21791 - fix mention payload (#243)

* feat(chat): update pr

* feat: ASC-20213 - message bubble api alignment (#247)

* fix: message bubble api aligment

* fix: to use action as params for message bubble

* feat: export elements

* fix: remove unused

* fix: change type name

Co-authored-by: Kiattirat Sujjapongse <[email protected]>

* fix: type name

* feat: expose component

* fix: wrong type name

* fix: modify expose component

* fix: storybook's name

---------

Co-authored-by: Kiattirat Sujjapongse <[email protected]>

* fix(chat): ASC-21796 - query chat after connection back to normal + api alignment (#246)

* fix(chat): asc-21796 reload data when connection back to normal

* feat(chat): api alignment for message list

* feat(chat): export

* feat(chat): api align live chat page

* feat(chat): api align for composer

* feat(chat): update pr

* feat(chat): update pr

* feat(chat): remove all v4 component from useCustomComponent

* feat(chat): update pr - remove chat header

* feat(chat): ASC-00000 - compose bar api alignment (#250)

* feat(chat): composebar alignment

* feat(chat): update pr

* fix(chat): revert code (#251)

* feat: ASC-20213 - modal notification v4 (#252)

* fix: add confirm modal v4

* fix: change to use Notification v4

* fix: remove unused

* fix: duplicate icon to v4

* fix: move confirm model component

* fix: revert modal and confirm v3 components

* fix: revert notification v3

* fix: move Icon to v4 and remove unused icon

* fix(chat): revert code

* feat: ASC-20213 -  fix delete message display (#256)

* fix: move component to v4 folder

* fix: delete message

* feat(chat): update pr

* fix(chat): ASC-21734 - Fix UI Bug (#255)

* fix(chat): update mention ui

* fix(chat): update mention ui

* fix(chat): update delete word

* fix(chat): update mention ui

* fix(chat): update mention ui

* Update src/i18n/en.json

Co-authored-by: Pitchaya T. <[email protected]>

* feat(chat): update mention logic

* feat(chat): update pr

* feat(chat): revert text

* feat(chat): update mention logic

* fix(chat): popup width

* fix(chat): font-color in light mode

* fix(chat): placeholder

* fix(chat): fix moderator

* feat(chat): fix mention

* feat(chat): fix avatar in reply

* feat(chat): update pr

* feat(chat): use rem

* feat(chat): update pr

---------

Co-authored-by: Pitchaya T. <[email protected]>

* fix: ASC-20213 - bug staging (#257)

* fix: bug staging

* fix: revert overflow-x

* feat: ASC-20213 - livechat configuration merge (#253)

* feat: add generateShadeColors func

* feat: add AmityUIKitManager

* chore: add tsdoc to AmityUIKitManager

* fix: merge from develop

* fix: AmityUIKit manager

* fix: remove unused

* fix: revert uikit 3

* fix: remove unused

* fix: export

* fix: move to main v4

* fix: move to v4

* fix: export path

* Refactor theme generation logic in
ThemeProvider.tsx

* fix: theme color generation

* fix: theme provider

* fix: remove unused

* feat: add Typography component with css

* fix: css

* fix: add queryClient provider

* fix: import

* fix: import

* fix: color palette

* fix: change global.css file

* fix: v4

* fix: conflict

* fix: draft page

* fix: setup

* fix: export

* fix: move mergedNavigationBehavior

* fix: remove unused

* fix: remove unused

* fix: uikit manager

* fix: uncomment

* fix: remove unused

* fix: remove unused

* fix: remove unused

* fix: remove unused files

* fix: remove

* fix: login

* fix: typography and style files

* fix: typography

* fix: message type

* fix: type

* fix: add background to livechat page

* feat: add config for message bubble

* feat: fix cannot load next page

* fix: type

* feat: add placeholder for compose bar configuration

* feat: revert storybook user

* fix: use primary color from theme

* fix: nested component style

* fix: to pass class

* fix: change to be module.css

* fix: remove unused file

* fix: remove unused config

* fix: typography

* fix: default user avatar

* feat: upgrade ts-sdk

* fix: revet theme file

---------

Co-authored-by: Chaiwat Trisuwan <[email protected]>

* fix(chat): change tag

---------

Co-authored-by: ptchaya_p <[email protected]>
Co-authored-by: ptchaya_p <[email protected]>
Co-authored-by: Pitchaya T <[email protected]>
Co-authored-by: Chaiwat Trisuwan <[email protected]>

* feat(chat): ASC-0000 - export compose bar (#258)

* feat: export v4 provider (#259)

* Release/v4.0.0 beta.1 (#262)

* fix: update ts-sdk version

* chore(release): 4.0.0-beta.1

---------

Co-authored-by: Chaiwat Trisuwan <[email protected]>
Co-authored-by: bmo-amity-bot <[email protected]>

* fix: ASC-00000 - export type (#263)

* fix: export type

* fix: update version

* fix: ASC-00000 - fix provider v4 props (#261)

* fix: provider

* fix: provider

* fix: export

* fix: export

* fix: type

* fix: pnpm lock

* fix: deps

* Release/v4.0.0 beta.2 (#265)

* fix: export wrong path (#264)

* chore(release): 4.0.0-beta.2

---------

Co-authored-by: bmo-amity-bot <[email protected]>

* feat: ASC-20277 - flag unflag message (#267)

* feat: add report button on message action sheet

* feat: add flag ui on message bubble container

* fix: cannot click report button

* feat: add unFlag button

* fix: unflag button text id

* feat: add flag/unflag toast

* feat: add livechat toast

* fix: icon to support color changing

* fix: message and id for report, unreport

* fix: remove unused

* fix: use color from palette

* fix: ASC-00000 - remove sheet loading state (#271)

* fix: remove sheet in loading state

* fix: remove wrong return

* fix: ASC-21913 - type and optional field on config (#268)

* fix: type and optional field on config

* fix: remove undefined checking

* fix: use config from customization provider

* fix: add error state on delete message (#269)

* fix: ASC-21767 - mention border when got mention (#272)

* fix: mention border when got mention

* fix: remove console.log

* feat: ASC-21691 - add hyperlink style to primary color (#270)

* feat: add hyperlink style to primary color

* fix: remove className because Linktify does not support

* fix: remove nested selector and open to new tab

* fix(social): asc-00000 use internal path (#266)

* feat: ASC-17980 - global feed story targets tab and story target circle (#254)

* feat: add generateShadeColors func

* feat: add AmityUIKitManager

* chore: add tsdoc to AmityUIKitManager

* fix: merge from develop

* fix: AmityUIKit manager

* fix: remove unused

* fix: revert uikit 3

* fix: remove unused

* fix: export

* fix: move to main v4

* fix: move to v4

* fix: export path

* Refactor theme generation logic in
ThemeProvider.tsx

* fix: theme color generation

* fix: theme provider

* fix: remove unused

* feat: add Typography component with css

* fix: css

* fix: add queryClient provider

* fix: import

* fix: import

* fix: v4

* fix: conflict

* fix: draft page

* feat: global feed story tab

* fix: empty state

* fix: css module

* fix: official badge

* fix: css

* fix: css

* fix: css

* fix: update from comments

* fix: story tab item

* feat: feed v4

* fix: private condition

* fix: story

* fix: css

* fix: remove unused

* fix: story

* fix: remove unused

* fix: ignore type

* fix: progress ring

* fix: use clsx

* fix: remove ts-ignore

* fix: remove unused

* feat(chat): ASC-00000 - Muted + Banned channel (#276)

* feat(chat): isMuted done

* feat(chat): asc-00000 remove comment

* feat(chat): banned user

* feat(chat): update PR

* feat(chat): update PR

* feat(chat): ASC-00000 - fix composebar styling + limit 200 character (#275)

* fix(social): asc-00000 use  from v4 folder

* fix(chat): asc-00000 fix mention styling in composebar

* fix: update styling

* fix: compose bar styling

* feat: limit text

* feat: revert file

* feat: revert file

* feat: remove deprecated func

* fix: ASC-21913 - config type (#278)

* fix: type and optional field on config

* fix: remove undefined checking

* fix: use config from customization provider

* fix: use defaultConfig

* fix: add blocked word + not allowed link (#280)

* fix: icon (#281)

* fix: using v3 and v4 provider separately for each stories (#284)

* fix: ASC-00000 - confirm context (#285)

* fix: confirm context

* chore: Update src/social/components/Comment/index.tsx

Co-authored-by: Pitchaya T. <[email protected]>

* chore: remove unused code

---------

Co-authored-by: Pitchaya T. <[email protected]>

* fix: ASC-00000 - notification context (#286)

* fix: NotificationProvider

* fix: add NotificationProvider into UiKitProvider

* chore: move LiveChatNotificationProvider to chat

* fix: ASC-00000 - add login step on UiKitProvider (#287)

* fix: login

* fix: Update src/core/providers/UiKitProvider/index.tsx

* fix: message remain on compose bar after sending success (#289)

* fix: user muted state (#293)

* fix: ASC-22026 - moderator cannot send message on muted channel (#294)

* fix: user muted state

* fix: moderator cannot send message on muted channel

* fix: ASC-219999 - incorrect comment count color (#283)

* fix: font

* fix: story tab gap

* fix: modal

* fix: ASC-21979 - can't click header on video preview (#282)

* fix: use css var

* fix: move v4 story

* fix: move folder

* fix: remove index path

* fix: styled to css module

* fix: use v4 (#295)

* fix: ASC-20502 - shouldAllowCreation condition (#296)

* fix: shouldAllowCreation

* fix: type

* fix: ASC-20883 - remove latestComments prop (#290)

* fix: pass latestComments to CommentList component

* fix: remove latestComments prop

* fix: add v3 provider (#298)

* fix: ASC-21980 - hyper link background color (#299)

* fix: use v4

* fix: hyperlink position and bg color

* fix: remove styled component

* feat: ASC-21665 - darkmode config (#279)

* fix: type and optional field on config

* fix: remove undefined checking

* fix: use config from customization provider

* feat: handle switch light/dark mode

* feat: add configuration live chat page

* feat: add config on livechat header

* feat: add theme configuration message list

* feat: add configuration theme on message composer

* fix: modal styling

* feat: add configuration for livechat notification

* fix: copy message to use livechat notification

* fix: pr review

* fix: pr

* fix: user preferred theme

* fix: ASC-21980 - fix remove link button style (#300)

* fix: use v4

* fix: hyperlink position and bg color

* fix: remove styled component

* fix: button

* fix: character limit (#302)

* fix: change permission to check if user is a moderator (#304)

* fix: ASC-22060 - remove onBack() on draft page (#303)

* fix: use v4

* fix: hyperlink position and bg color

* fix: remove styled component

* fix: button

* fix: hyperlink style

* fix: style

* fix: story tab item font color

* fix: css var

* fix: remove onBack()

* fix: css

* fix: remove unused

* fix: remove unused line

* fix: ASC-21980 - hyperlink style (#301)

* fix: use v4

* fix: hyperlink position and bg color

* fix: remove styled component

* fix: button

* fix: hyperlink style

* fix: style

* fix: story tab item font color

* fix: css var

* fix: css

* fix: remove unused

* fix: remove line

* fix: ASC-22063 - fix story global feed pagination (#305)

* fix: use v4

* fix: hyperlink position and bg color

* fix: remove styled component

* fix: button

* fix: hyperlink style

* fix: style

* fix: story tab item font color

* fix: css var

* fix: remove onBack()

* fix: story global feed pagination

* fix: add comment

* fix: remove new line

* fix: remove console.log

* fix: logic

* fix: story style

* chore: Update src/v4/styles/global.css

* fix: remove console.log

---------

Co-authored-by: Bonn <[email protected]>

* fix: official condition (#306)

* fix: ASC-19646 - notification error when failed create story (#307)

* fix: official condition

* fix: add error

* fix: ASC-22060 - navigate to community when create story (#308)

* fix: official condition

* fix: add error

* fix: navigate

* fix: ASC-21985 - navigate story target for global feed story (#309)

* fix: official condition

* fix: add error

* fix: navigate

* fix: story global feed navigate

* fix: onClose

* fix: ASC-22060 - create story on view story page (#310)

* fix: story global feed upload

* fix: remove console.log

* fix: navigate

* fix: ASC-21970 - story uploading state (#297)

* fix: font

* fix: story tab gap

* fix: use css var

* fix: modal

* fix: can't delete story

* fix: v4 component

* fix: hyperlink config

* fix: shouldAllowCreation

* fix: type

* fix: uploading state

* fix: remove console.log

* fix: use css var

* fix: modal

* fix: v4 component

* fix: hyperlink config

* fix: shouldAllowCreation

* fix: type

* fix: uploading state

* fix: remove console.log

* fix: storyRing state

* fix: remove fill in verified icon

* fix: story ring

* fix: icon

* fix: story

---------

Co-authored-by: Bonn <[email protected]>

* fix: notification style (#311)

* fix: add onAllStoriesEnd (#312)

* Release/v4.0.0 beta.3 (#314)

* chore: upgrade dependencies

* fix: cherry-pick bugs from v3

* chore(release): 4.0.0-beta.3

---------

Co-authored-by: bmo-amity-bot <[email protected]>

* chore: update dependencies

* fix: path

* chore(release): 4.0.0-beta.3

---------

Co-authored-by: Bonn <[email protected]>
Co-authored-by: Chaiwat Trisuwan <[email protected]>
Co-authored-by: Kiattirat Sujjapongse <[email protected]>
Co-authored-by: bmo-amity-bot <[email protected]>
  • Loading branch information
5 people authored Apr 26, 2024
1 parent 902dc76 commit 4dfd42b
Show file tree
Hide file tree
Showing 159 changed files with 5,584 additions and 3,560 deletions.
9 changes: 3 additions & 6 deletions .storybook/decorators/UiKitDecorator.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
import React, { useCallback } from 'react';
import { AmityUIKitProvider } from '../../src/v4/core/providers';
import UiKitProvider from '../../src/core/providers/UiKitProvider';
import { Preview } from '@storybook/react';
import amityConfig from '../../amity-uikit.config.json';

export type AmityUIKitConfig = typeof amityConfig;

const GLOBAL_NAME = 'user';
const global = {
[GLOBAL_NAME]: {
Expand Down Expand Up @@ -66,7 +64,7 @@ const decorator: NonNullable<Preview['decorators']>[number] = (
}, []);

return (
<AmityUIKitProvider
<UiKitProvider
apiKey={import.meta.env.STORYBOOK_API_KEY}
apiRegion={import.meta.env.STORYBOOK_API_REGION}
key={userId}
Expand All @@ -75,10 +73,9 @@ const decorator: NonNullable<Preview['decorators']>[number] = (
onConnectionStatusChange={handleConnectionStatusChange}
onConnected={handleConnected}
onDisconnected={handleDisconnected}
configs={amityConfig}
>
{Story()}
</AmityUIKitProvider>
</UiKitProvider>
);
};

Expand Down
84 changes: 84 additions & 0 deletions .storybook/decorators/UiKitV4Decorator.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
import React, { useCallback } from 'react';
import { AmityUIKitProvider } from '../../src/v4/core/providers';
import { Preview } from '@storybook/react';
import amityConfig from '../../amity-uikit.config.json';
import { Config } from '../../src/v4/core/providers/CustomizationProvider';

const GLOBAL_NAME = 'user';
const global = {
[GLOBAL_NAME]: {
name: 'User selector',
description: 'User switcher for SDK',
defaultValue: 'Web-Test',
toolbar: {
icon: 'user',
items: [
{ value: 'Web-Test,Web-test', title: 'Web-Test' },
{
value: import.meta.env.STORYBOOK_USER1,
title: import.meta.env.STORYBOOK_USER1?.split(',')[1],
},
{
value: import.meta.env.STORYBOOK_USER2,
title: import.meta.env.STORYBOOK_USER2?.split(',')[1],
},
{
value: import.meta.env.STORYBOOK_USER3,
title: import.meta.env.STORYBOOK_USER3?.split(',')[1],
},
{
value: import.meta.env.STORYBOOK_USER4,
title: import.meta.env.STORYBOOK_USER4?.split(',')[1],
},
{
value: import.meta.env.STORYBOOK_USER5,
title: import.meta.env.STORYBOOK_USER5?.split(',')[1],
},
{
value: import.meta.env.STORYBOOK_USER6,
title: import.meta.env.STORYBOOK_USER6?.split(',')[1],
},
],
},
},
};

const FALLBACK_USER = 'Web-Test,Web-Test';

const decorator: NonNullable<Preview['decorators']>[number] = (
Story,
{ globals: { [GLOBAL_NAME]: val, theme } },
) => {
const user = val || FALLBACK_USER;
const [userId, displayName] = user.split(',');

const handleConnectionStatusChange = useCallback((...args) => {
console.log(`[UiKitProvider.handleConnectionStatusChange]`, ...args);
}, []);

const handleConnected = useCallback((...args) => {
console.log(`[UiKitProvider.handleConnected]`, ...args);
}, []);

const handleDisconnected = useCallback((...args) => {
console.log(`[UiKitProvider.handleDisconnected]`, ...args);
}, []);

return (
<AmityUIKitProvider
apiKey={import.meta.env.STORYBOOK_API_KEY}
apiRegion={import.meta.env.STORYBOOK_API_REGION}
key={userId}
userId={userId}
displayName={displayName || userId}
onConnectionStatusChange={handleConnectionStatusChange}
onConnected={handleConnected}
onDisconnected={handleDisconnected}
configs={amityConfig as Config}
>
<Story />
</AmityUIKitProvider>
);
};

export default { global, decorator };
5 changes: 3 additions & 2 deletions .storybook/decorators/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
export { default as FluidControl } from './FluidControl'
export { default as UiKitDecorator } from './UiKitDecorator'
export { default as FluidControl } from './FluidControl';
export { default as UiKitDecorator } from './UiKitDecorator';
export { default as UiKitV4Decorator } from './UiKitV4Decorator';
13 changes: 11 additions & 2 deletions .storybook/preview.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
import { Preview } from '@storybook/react';
import { FluidControl, UiKitDecorator } from './decorators';
import { FluidControl, UiKitDecorator, UiKitV4Decorator } from './decorators';

const preview: Preview = {
decorators: [FluidControl.decorator, UiKitDecorator.decorator],
decorators: [
FluidControl.decorator,
(Story, ctx) => {
if (ctx.componentId.toLocaleLowerCase().includes('v4')) {
return UiKitV4Decorator.decorator(Story, ctx);
}
return UiKitDecorator.decorator(Story, ctx);
},
],
parameters: {
options: {
storySort: {
Expand All @@ -22,6 +30,7 @@ const preview: Preview = {
globalTypes: {
...FluidControl.global,
...UiKitDecorator.global,
...UiKitV4Decorator.global,
},
};

Expand Down
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,24 @@

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

## 4.0.0-beta.3 (2024-04-26)

### Bug Fixes

- path ([6b130f8](https://github.com/AmityCo/Amity-Social-Cloud-UIKit-Web-OpenSource/commit/6b130f840311ea6723061400a9f16db37444abe0))

## 4.0.0-beta.3 (2024-04-26)

### Bug Fixes

- cherry-pick bugs from v3 ([7b01a95](https://github.com/EkoCommunications/AmityUiKitWeb/commit/7b01a956db5a7c019164ee4ffaf781a55c588714))

## 4.0.0-beta.2 (2024-04-12)

### Bug Fixes

- export wrong path ([#264](https://github.com/EkoCommunications/AmityUiKitWeb/issues/264)) ([af08529](https://github.com/EkoCommunications/AmityUiKitWeb/commit/af08529265a6b620d7a543b438f96e44e1ef9eb1))

## 4.0.0-beta.1 (2024-04-05)

### Bug Fixes
Expand Down
39 changes: 35 additions & 4 deletions amity-uikit.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,20 @@
"base_shade3_color": "#a5a9b5",
"base_shade4_color": "#ebecef",
"alert_color": "#FA4D30",
"background_color": "#FFFFFF"
"background_color": "#FFFFFF",
"base_inverse_color": "#000000"
},
"dark": {
"primary_color": "#1054DE",
"secondary_color": "#292B32",
"secondary_color": "#ebecef",
"base_color": "#ebecef",
"base_shade1_color": "#a5a9b5",
"base_shade2_color": "#6e7487",
"base_shade3_color": "#40434e",
"base_shade4_color": "#292b32",
"alert_color": "#FA4D30",
"background_color": "#191919"
"background_color": "#191919",
"base_inverse_color": "#FFFFFF"
}
},
"excludes": [],
Expand Down Expand Up @@ -160,14 +162,43 @@
"create_new_story_icon": "plus.png",
"background_color": ""
},

"*/*/close_button": {
"theme": {},
"close_icon": "close.png"
},
"live_chat/*/*": {},
"live_chat/*/*": {
"theme": {
"light": {
"primary_color": "#1054DE",
"secondary_color": "#292B32",
"base_color": "#292b32",
"base_shade1_color": "#636878",
"base_shade2_color": "#898e9e",
"base_shade3_color": "#a5a9b5",
"base_shade4_color": "#ebecef",
"alert_color": "#FA4D30",
"background_color": "#FFFFFF",
"base_inverse_color": "#000000"
},
"dark": {
"primary_color": "#1054DE",
"secondary_color": "#ebecef",
"base_color": "#ebecef",
"base_shade1_color": "#a5a9b5",
"base_shade2_color": "#6e7487",
"base_shade3_color": "#40434e",
"base_shade4_color": "#292b32",
"alert_color": "#FA4D30",
"background_color": "#191919",
"base_inverse_color": "#FFFFFF"
}
}
},
"live_chat/chat_header/*": {},
"live_chat/message_list/*": {},
"live_chat/message_composer/*": {
"message_limit": 200,
"placeholder_text": "Write a message"
}
}
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@amityco/ui-kit-open-source",
"version": "4.0.0-beta.2",
"version": "4.0.0-beta.3",
"engines": {
"node": ">=16",
"pnpm": ">=8"
Expand Down Expand Up @@ -39,7 +39,7 @@
"react-dom": ">=17.0.2"
},
"devDependencies": {
"@amityco/ts-sdk": "6.21.0",
"@amityco/ts-sdk": "^6.23.0",
"@fortawesome/fontawesome-svg-core": "^1.2.36",
"@fortawesome/free-solid-svg-icons": "^5.15.4",
"@fortawesome/react-fontawesome": "^0.2.0",
Expand Down
Loading

0 comments on commit 4dfd42b

Please sign in to comment.