@developer_tribe/react-native-comnyx 0.3.10 → 0.3.12
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/lib/commonjs/App.js +6 -2
- package/lib/commonjs/App.js.map +1 -1
- package/lib/commonjs/components/AppText.js +11 -1
- package/lib/commonjs/components/AppText.js.map +1 -1
- package/lib/commonjs/components/ChatList.js +67 -55
- package/lib/commonjs/components/ChatList.js.map +1 -1
- package/lib/commonjs/components/CustomerForm.js +13 -13
- package/lib/commonjs/components/CustomerForm.js.map +1 -1
- package/lib/commonjs/components/MessageItem.js +2 -1
- package/lib/commonjs/components/MessageItem.js.map +1 -1
- package/lib/commonjs/constants/translations.js +15 -15
- package/lib/commonjs/constants/translations.js.map +1 -1
- package/lib/commonjs/hooks/useTheme.js +12 -0
- package/lib/commonjs/hooks/useTheme.js.map +1 -0
- package/lib/commonjs/store.js +6 -0
- package/lib/commonjs/store.js.map +1 -1
- package/lib/commonjs/types/GlobalTheme.js +6 -0
- package/lib/commonjs/types/GlobalTheme.js.map +1 -0
- package/lib/module/App.js +6 -2
- package/lib/module/App.js.map +1 -1
- package/lib/module/components/AppText.js +11 -1
- package/lib/module/components/AppText.js.map +1 -1
- package/lib/module/components/ChatList.js +67 -55
- package/lib/module/components/ChatList.js.map +1 -1
- package/lib/module/components/CustomerForm.js +13 -13
- package/lib/module/components/CustomerForm.js.map +1 -1
- package/lib/module/components/MessageItem.js +2 -1
- package/lib/module/components/MessageItem.js.map +1 -1
- package/lib/module/constants/translations.js +15 -15
- package/lib/module/constants/translations.js.map +1 -1
- package/lib/module/hooks/useTheme.js +8 -0
- package/lib/module/hooks/useTheme.js.map +1 -0
- package/lib/module/store.js +6 -0
- package/lib/module/store.js.map +1 -1
- package/lib/module/types/GlobalTheme.js +4 -0
- package/lib/module/types/GlobalTheme.js.map +1 -0
- package/lib/typescript/commonjs/src/App.d.ts +2 -1
- package/lib/typescript/commonjs/src/App.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/AppText.d.ts +5 -1
- package/lib/typescript/commonjs/src/components/AppText.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/ChatList.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/constants/translations.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/hooks/useTheme.d.ts +3 -0
- package/lib/typescript/commonjs/src/hooks/useTheme.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/store.d.ts +2 -0
- package/lib/typescript/commonjs/src/store.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/types/GlobalTheme.d.ts +6 -0
- package/lib/typescript/commonjs/src/types/GlobalTheme.d.ts.map +1 -0
- package/lib/typescript/module/src/App.d.ts +2 -1
- package/lib/typescript/module/src/App.d.ts.map +1 -1
- package/lib/typescript/module/src/components/AppText.d.ts +5 -1
- package/lib/typescript/module/src/components/AppText.d.ts.map +1 -1
- package/lib/typescript/module/src/components/ChatList.d.ts.map +1 -1
- package/lib/typescript/module/src/constants/translations.d.ts.map +1 -1
- package/lib/typescript/module/src/hooks/useTheme.d.ts +3 -0
- package/lib/typescript/module/src/hooks/useTheme.d.ts.map +1 -0
- package/lib/typescript/module/src/store.d.ts +2 -0
- package/lib/typescript/module/src/store.d.ts.map +1 -1
- package/lib/typescript/module/src/types/GlobalTheme.d.ts +6 -0
- package/lib/typescript/module/src/types/GlobalTheme.d.ts.map +1 -0
- package/package.json +1 -1
- package/src/App.tsx +6 -1
- package/src/components/AppText.tsx +39 -1
- package/src/components/ChatList.tsx +90 -70
- package/src/components/CustomerForm.tsx +14 -14
- package/src/components/MessageItem.tsx +1 -0
- package/src/constants/translations.ts +15 -24
- package/src/hooks/useTheme.ts +7 -0
- package/src/store.ts +6 -0
- package/src/types/GlobalTheme.tsx +7 -0
package/src/store.ts
CHANGED
|
@@ -17,6 +17,7 @@ interface AppStoreState {
|
|
|
17
17
|
language: LanguageCode;
|
|
18
18
|
theme: 'light' | 'dark';
|
|
19
19
|
fake: boolean;
|
|
20
|
+
themes: any;
|
|
20
21
|
firstMessage: AppConversationMessage | null;
|
|
21
22
|
setData: (
|
|
22
23
|
cb: (
|
|
@@ -29,6 +30,7 @@ interface AppStoreState {
|
|
|
29
30
|
setLanguage: (language: LanguageCode) => void;
|
|
30
31
|
setTheme: (theme: 'light' | 'dark') => void;
|
|
31
32
|
setFake: (fake: boolean) => void;
|
|
33
|
+
setThemes: (themes: any) => void;
|
|
32
34
|
updateBaseDimensions: (config: {
|
|
33
35
|
baseHeight: number;
|
|
34
36
|
baseWidth: number;
|
|
@@ -45,6 +47,7 @@ const storeCreator: StateCreator<AppStoreState> = (set, get) => ({
|
|
|
45
47
|
language: 'en',
|
|
46
48
|
theme: 'light',
|
|
47
49
|
fake: false,
|
|
50
|
+
themes: {},
|
|
48
51
|
firstMessage: null,
|
|
49
52
|
setData: (cb) => {
|
|
50
53
|
const newData = cb(get().data);
|
|
@@ -68,6 +71,9 @@ const storeCreator: StateCreator<AppStoreState> = (set, get) => ({
|
|
|
68
71
|
setFake: (fake: boolean) => {
|
|
69
72
|
set({ fake });
|
|
70
73
|
},
|
|
74
|
+
setThemes: (themes: any) => {
|
|
75
|
+
set({ themes });
|
|
76
|
+
},
|
|
71
77
|
updateBaseDimensions: ({ baseWidth, baseHeight }) => {
|
|
72
78
|
set({ baseWidth, baseHeight });
|
|
73
79
|
},
|