@planningcenter/chat-react-native 1.6.2-rc.2 → 1.7.0-rc.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/build/components/conversation/message_reaction.d.ts +8 -0
- package/build/components/conversation/message_reaction.d.ts.map +1 -0
- package/build/components/conversation/message_reaction.js +44 -0
- package/build/components/conversation/message_reaction.js.map +1 -0
- package/build/components/display/badge.d.ts +58 -0
- package/build/components/display/badge.d.ts.map +1 -0
- package/build/components/display/badge.js +186 -0
- package/build/components/display/badge.js.map +1 -0
- package/build/components/display/button_color_utils.d.ts +1 -1
- package/build/components/display/index.d.ts +1 -0
- package/build/components/display/index.d.ts.map +1 -1
- package/build/components/display/index.js +1 -0
- package/build/components/display/index.js.map +1 -1
- package/build/hooks/use_conversation_messages.d.ts +45 -0
- package/build/hooks/use_conversation_messages.d.ts.map +1 -0
- package/build/hooks/use_conversation_messages.js +33 -0
- package/build/hooks/use_conversation_messages.js.map +1 -0
- package/build/hooks/use_suspense_api.d.ts +3 -2
- package/build/hooks/use_suspense_api.d.ts.map +1 -1
- package/build/hooks/use_suspense_api.js +3 -2
- package/build/hooks/use_suspense_api.js.map +1 -1
- package/build/navigation/index.d.ts +5 -0
- package/build/navigation/index.d.ts.map +1 -1
- package/build/navigation/index.js +9 -3
- package/build/navigation/index.js.map +1 -1
- package/build/screens/conversation_screen.d.ts.map +1 -1
- package/build/screens/conversation_screen.js +91 -37
- package/build/screens/conversation_screen.js.map +1 -1
- package/build/screens/design_system_screen.d.ts.map +1 -1
- package/build/screens/design_system_screen.js +407 -338
- package/build/screens/design_system_screen.js.map +1 -1
- package/build/screens/message_actions_screen.d.ts +10 -0
- package/build/screens/message_actions_screen.d.ts.map +1 -0
- package/build/screens/message_actions_screen.js +128 -0
- package/build/screens/message_actions_screen.js.map +1 -0
- package/build/types/api_primitives.d.ts +1 -2
- package/build/types/api_primitives.d.ts.map +1 -1
- package/build/types/api_primitives.js.map +1 -1
- package/build/utils/cache/index.d.ts +2 -0
- package/build/utils/cache/index.d.ts.map +1 -0
- package/build/utils/cache/index.js +2 -0
- package/build/utils/cache/index.js.map +1 -0
- package/build/utils/cache/page_mutations.d.ts +37 -0
- package/build/utils/cache/page_mutations.d.ts.map +1 -0
- package/build/utils/cache/page_mutations.js +42 -0
- package/build/utils/cache/page_mutations.js.map +1 -0
- package/build/utils/index.d.ts +1 -0
- package/build/utils/index.d.ts.map +1 -1
- package/build/utils/index.js +1 -0
- package/build/utils/index.js.map +1 -1
- package/build/utils/theme.d.ts +16 -0
- package/build/utils/theme.d.ts.map +1 -1
- package/build/utils/theme.js +31 -0
- package/build/utils/theme.js.map +1 -1
- package/build/vendor/tapestry/tokens.d.ts +30 -0
- package/build/vendor/tapestry/tokens.d.ts.map +1 -1
- package/build/vendor/tapestry/tokens.js +30 -0
- package/build/vendor/tapestry/tokens.js.map +1 -1
- package/package.json +3 -2
- package/src/__tests__/utils/cache/page_mutations.ts +206 -0
- package/src/components/conversation/message_reaction.tsx +57 -0
- package/src/components/display/badge.tsx +323 -0
- package/src/components/display/index.ts +1 -0
- package/src/hooks/use_conversation_messages.ts +43 -0
- package/src/hooks/use_suspense_api.ts +16 -2
- package/src/navigation/index.tsx +9 -3
- package/src/screens/conversation_screen.tsx +111 -40
- package/src/screens/design_system_screen.tsx +712 -580
- package/src/screens/message_actions_screen.tsx +167 -0
- package/src/types/api_primitives.ts +1 -1
- package/src/utils/cache/index.ts +1 -0
- package/src/utils/cache/page_mutations.ts +66 -0
- package/src/utils/index.ts +1 -0
- package/src/utils/theme.ts +47 -0
- package/src/vendor/tapestry/tokens.ts +30 -0
package/build/utils/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAA;AACzB,cAAc,SAAS,CAAA;AACvB,cAAc,UAAU,CAAA;AACxB,cAAc,SAAS,CAAA;AACvB,cAAc,UAAU,CAAA;AACxB,cAAc,OAAO,CAAA","sourcesContent":["export * from './session'\nexport * from './theme'\nexport * from './styles'\nexport * from './space'\nexport * from './client'\nexport * from './uri'\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAA;AACzB,cAAc,SAAS,CAAA;AACvB,cAAc,UAAU,CAAA;AACxB,cAAc,SAAS,CAAA;AACvB,cAAc,UAAU,CAAA;AACxB,cAAc,OAAO,CAAA;AACrB,cAAc,SAAS,CAAA","sourcesContent":["export * from './session'\nexport * from './theme'\nexport * from './styles'\nexport * from './space'\nexport * from './client'\nexport * from './uri'\nexport * from './cache'\n"]}
|
package/build/utils/theme.d.ts
CHANGED
|
@@ -22,6 +22,7 @@ export interface DefaultTheme {
|
|
|
22
22
|
button: {
|
|
23
23
|
borderRadius: number;
|
|
24
24
|
};
|
|
25
|
+
showBadgeLogo: boolean;
|
|
25
26
|
}
|
|
26
27
|
export declare const defaultTheme: (colorScheme: ColorSchemeName) => ChatTheme;
|
|
27
28
|
export type TemporaryDefaultColorsType = Partial<ChatColors>;
|
|
@@ -34,6 +35,21 @@ interface ChatColors {
|
|
|
34
35
|
switchTrackFalse: string | undefined;
|
|
35
36
|
switchThumbColor: string | undefined;
|
|
36
37
|
testColor: string;
|
|
38
|
+
statusInfoIcon: string;
|
|
39
|
+
statusInfoText: string;
|
|
40
|
+
statusInfoBackground: string;
|
|
41
|
+
statusSuccessIcon: string;
|
|
42
|
+
statusSuccessText: string;
|
|
43
|
+
statusSuccessBackground: string;
|
|
44
|
+
statusWarningIcon: string;
|
|
45
|
+
statusWarningText: string;
|
|
46
|
+
statusWarningBackground: string;
|
|
47
|
+
statusErrorIcon: string;
|
|
48
|
+
statusErrorText: string;
|
|
49
|
+
statusErrorBackground: string;
|
|
50
|
+
statusNeutralIcon: string;
|
|
51
|
+
statusNeutralText: string;
|
|
52
|
+
statusNeutralBackground: string;
|
|
37
53
|
}
|
|
38
54
|
export {};
|
|
39
55
|
//# sourceMappingURL=theme.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../src/utils/theme.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AAE9C,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAA;AAE/E,MAAM,WAAW,SAAU,SAAQ,YAAY;IAC7C,MAAM,EAAE,YAAY,CAAC,QAAQ,CAAC,GAC5B,CAAC,OAAO,mBAAmB,CAAC,KAAK,GAAG,OAAO,mBAAmB,CAAC,IAAI,CAAC,CAAA;CACvE;AAED;;;;;;;;;;;;;gDAagD;AAEhD,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,UAAU,CAAA;IAClB,MAAM,EAAE;QACN,YAAY,EAAE,MAAM,CAAA;KACrB,CAAA;
|
|
1
|
+
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../src/utils/theme.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AAE9C,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAA;AAE/E,MAAM,WAAW,SAAU,SAAQ,YAAY;IAC7C,MAAM,EAAE,YAAY,CAAC,QAAQ,CAAC,GAC5B,CAAC,OAAO,mBAAmB,CAAC,KAAK,GAAG,OAAO,mBAAmB,CAAC,IAAI,CAAC,CAAA;CACvE;AAED;;;;;;;;;;;;;gDAagD;AAEhD,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,UAAU,CAAA;IAClB,MAAM,EAAE;QACN,YAAY,EAAE,MAAM,CAAA;KACrB,CAAA;IACD,aAAa,EAAE,OAAO,CAAA;CACvB;AAED,eAAO,MAAM,YAAY,gBAAiB,eAAe,KAAG,SAe3D,CAAA;AAED,MAAM,MAAM,0BAA0B,GAAG,OAAO,CAAC,UAAU,CAAC,CAAA;AAE5D,UAAU,UAAU;IAClB,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,EAAE,MAAM,GAAG,SAAS,CAAA;IAC/B,SAAS,EAAE,MAAM,GAAG,SAAS,CAAA;IAC7B,WAAW,EAAE,MAAM,CAAA;IACnB,eAAe,EAAE,MAAM,GAAG,SAAS,CAAA;IACnC,gBAAgB,EAAE,MAAM,GAAG,SAAS,CAAA;IACpC,gBAAgB,EAAE,MAAM,GAAG,SAAS,CAAA;IACpC,SAAS,EAAE,MAAM,CAAA;IACjB,cAAc,EAAE,MAAM,CAAA;IACtB,cAAc,EAAE,MAAM,CAAA;IACtB,oBAAoB,EAAE,MAAM,CAAA;IAC5B,iBAAiB,EAAE,MAAM,CAAA;IACzB,iBAAiB,EAAE,MAAM,CAAA;IACzB,uBAAuB,EAAE,MAAM,CAAA;IAC/B,iBAAiB,EAAE,MAAM,CAAA;IACzB,iBAAiB,EAAE,MAAM,CAAA;IACzB,uBAAuB,EAAE,MAAM,CAAA;IAC/B,eAAe,EAAE,MAAM,CAAA;IACvB,eAAe,EAAE,MAAM,CAAA;IACvB,qBAAqB,EAAE,MAAM,CAAA;IAC7B,iBAAiB,EAAE,MAAM,CAAA;IACzB,iBAAiB,EAAE,MAAM,CAAA;IACzB,uBAAuB,EAAE,MAAM,CAAA;CAChC"}
|
package/build/utils/theme.js
CHANGED
|
@@ -11,6 +11,7 @@ export const defaultTheme = (colorScheme) => {
|
|
|
11
11
|
button: {
|
|
12
12
|
borderRadius: 40,
|
|
13
13
|
},
|
|
14
|
+
showBadgeLogo: true, // Overrides visibility of the product logo in `src/display/badge.tsx`
|
|
14
15
|
};
|
|
15
16
|
};
|
|
16
17
|
const colorsChatLight = {
|
|
@@ -22,6 +23,21 @@ const colorsChatLight = {
|
|
|
22
23
|
switchTrackFalse: undefined,
|
|
23
24
|
switchThumbColor: undefined,
|
|
24
25
|
testColor: 'hotpink',
|
|
26
|
+
statusInfoIcon: tokens.iconColorStatusInfoPrimary,
|
|
27
|
+
statusInfoText: tokens.textColorStatusInfo,
|
|
28
|
+
statusInfoBackground: tokens.fillColorStatusInfoGhost,
|
|
29
|
+
statusSuccessIcon: tokens.iconColorStatusSuccessPrimary,
|
|
30
|
+
statusSuccessText: tokens.textColorStatusSuccess,
|
|
31
|
+
statusSuccessBackground: tokens.fillColorStatusSuccessGhost,
|
|
32
|
+
statusWarningIcon: tokens.iconColorStatusWarningPrimary,
|
|
33
|
+
statusWarningText: tokens.textColorStatusWarning,
|
|
34
|
+
statusWarningBackground: tokens.fillColorStatusWarningGhost,
|
|
35
|
+
statusErrorIcon: tokens.iconColorStatusErrorPrimary,
|
|
36
|
+
statusErrorText: tokens.textColorStatusError,
|
|
37
|
+
statusErrorBackground: tokens.fillColorStatusErrorGhost,
|
|
38
|
+
statusNeutralIcon: tokens.iconColorStatusNeutralPrimary,
|
|
39
|
+
statusNeutralText: tokens.textColorStatusNeutral,
|
|
40
|
+
statusNeutralBackground: tokens.fillColorStatusNeutralGhost,
|
|
25
41
|
};
|
|
26
42
|
const colorsChatDark = {
|
|
27
43
|
name: 'dark',
|
|
@@ -32,6 +48,21 @@ const colorsChatDark = {
|
|
|
32
48
|
switchTrackFalse: undefined,
|
|
33
49
|
switchThumbColor: undefined,
|
|
34
50
|
testColor: 'pink',
|
|
51
|
+
statusInfoIcon: tokens.iconColorStatusInfoPrimaryDark,
|
|
52
|
+
statusInfoText: tokens.textColorStatusInfoDark,
|
|
53
|
+
statusInfoBackground: tokens.fillColorStatusInfoGhostDark,
|
|
54
|
+
statusSuccessIcon: tokens.iconColorStatusSuccessPrimaryDark,
|
|
55
|
+
statusSuccessText: tokens.textColorStatusSuccessDark,
|
|
56
|
+
statusSuccessBackground: tokens.fillColorStatusSuccessGhostDark,
|
|
57
|
+
statusWarningIcon: tokens.iconColorStatusWarningPrimaryDark,
|
|
58
|
+
statusWarningText: tokens.textColorStatusWarningDark,
|
|
59
|
+
statusWarningBackground: tokens.fillColorStatusWarningGhostDark,
|
|
60
|
+
statusErrorIcon: tokens.iconColorStatusErrorPrimaryDark,
|
|
61
|
+
statusErrorText: tokens.textColorStatusErrorDark,
|
|
62
|
+
statusErrorBackground: tokens.fillColorStatusErrorGhostDark,
|
|
63
|
+
statusNeutralIcon: tokens.iconColorStatusNeutralPrimaryDark,
|
|
64
|
+
statusNeutralText: tokens.textColorStatusNeutralDark,
|
|
65
|
+
statusNeutralBackground: tokens.fillColorStatusNeutralGhostDark,
|
|
35
66
|
};
|
|
36
67
|
const chatThemeColorMap = {
|
|
37
68
|
light: colorsChatLight,
|
package/build/utils/theme.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme.js","sourceRoot":"","sources":["../../src/utils/theme.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAA;AAClD,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAA;
|
|
1
|
+
{"version":3,"file":"theme.js","sourceRoot":"","sources":["../../src/utils/theme.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAA;AAClD,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAA;AA8B/E,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,WAA4B,EAAa,EAAE;IACtE,MAAM,MAAM,GAAG,WAAW,IAAI,OAAO,CAAA;IAErC,MAAM,aAAa,GAAG;QACpB,GAAG,iBAAiB,CAAC,MAAM,CAAC;QAC5B,GAAG,mBAAmB,CAAC,MAAM,CAAC;KAC/B,CAAA;IAED,OAAO;QACL,MAAM,EAAE,aAAa;QACrB,MAAM,EAAE;YACN,YAAY,EAAE,EAAE;SACjB;QACD,aAAa,EAAE,IAAI,EAAE,sEAAsE;KAC5F,CAAA;AACH,CAAC,CAAA;AA8BD,MAAM,eAAe,GAAe;IAClC,IAAI,EAAE,OAAO;IACb,WAAW,EAAE,SAAS;IACtB,SAAS,EAAE,SAAS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M,CAAC,+BAA+B;IAC/D,iBAAiB,EAAE,MAAM,CAAC,iCAAiC;IAC3D,iBAAiB,EAAE,MAAM,CAAC,0BAA0B;IACpD,uBAAuB,EAAE,MAAM,CAAC,+BAA+B;IAC/D,eAAe,EAAE,MAAM,CAAC,+BAA+B;IACvD,eAAe,EAAE,MAAM,CAAC,wBAAwB;IAChD,qBAAqB,EAAE,MAAM,CAAC,6BAA6B;IAC3D,iBAAiB,EAAE,MAAM,CAAC,iCAAiC;IAC3D,iBAAiB,EAAE,MAAM,CAAC,0BAA0B;IACpD,uBAAuB,EAAE,MAAM,CAAC,+BAA+B;CAChE,CAAA;AAED,MAAM,iBAAiB,GAAG;IACxB,KAAK,EAAE,eAAe;IACtB,IAAI,EAAE,cAAc;CACrB,CAAA","sourcesContent":["import { ColorSchemeName } from 'react-native'\nimport { tokens } from '../vendor/tapestry/tokens'\nimport { aliasTokensColorMap } from '../vendor/tapestry/alias_tokens_color_map'\n\nexport interface ChatTheme extends DefaultTheme {\n colors: DefaultTheme['colors'] &\n (typeof aliasTokensColorMap.light | typeof aliasTokensColorMap.dark)\n}\n\n/** =============================================\n NOTE: The specific values for `colors` and the `productBadge` are temporary examples that can be replaced once we start building out UI. This line's comment can be removed at that time too.\n\n The default theme is intended to support two types of customizations:\n 1. Specific color properties for a chat component (eg. `primaryButtonBackgroundColor`)\n 2. Any styles for a specific component. (Use only one level of nesting.)\n ```\n primaryButton: {\n borderRadius: number\n container: ViewStyle\n text: TextStyle\n }\n ```\n============================================= */\n\nexport interface DefaultTheme {\n colors: ChatColors\n button: {\n borderRadius: number\n }\n showBadgeLogo: boolean\n}\n\nexport const defaultTheme = (colorScheme: ColorSchemeName): ChatTheme => {\n const scheme = colorScheme || 'light'\n\n const defaultColors = {\n ...chatThemeColorMap[scheme],\n ...aliasTokensColorMap[scheme],\n }\n\n return {\n colors: defaultColors,\n button: {\n borderRadius: 40,\n },\n showBadgeLogo: true, // Overrides visibility of the product logo in `src/display/badge.tsx`\n }\n}\n\nexport type TemporaryDefaultColorsType = Partial<ChatColors>\n\ninterface ChatColors {\n name: string\n buttonStart: string | undefined\n buttonEnd: string | undefined\n interaction: string\n switchTrackTrue: string | undefined\n switchTrackFalse: string | undefined\n switchThumbColor: string | undefined\n testColor: string\n statusInfoIcon: string\n statusInfoText: string\n statusInfoBackground: string\n statusSuccessIcon: string\n statusSuccessText: string\n statusSuccessBackground: string\n statusWarningIcon: string\n statusWarningText: string\n statusWarningBackground: string\n statusErrorIcon: string\n statusErrorText: string\n statusErrorBackground: string\n statusNeutralIcon: string\n statusNeutralText: string\n statusNeutralBackground: string\n}\n\nconst colorsChatLight: ChatColors = {\n name: 'light',\n buttonStart: undefined,\n buttonEnd: undefined,\n interaction: tokens.fillColorInteractionDefault,\n switchTrackTrue: undefined,\n switchTrackFalse: undefined,\n switchThumbColor: undefined,\n testColor: 'hotpink',\n statusInfoIcon: tokens.iconColorStatusInfoPrimary,\n statusInfoText: tokens.textColorStatusInfo,\n statusInfoBackground: tokens.fillColorStatusInfoGhost,\n statusSuccessIcon: tokens.iconColorStatusSuccessPrimary,\n statusSuccessText: tokens.textColorStatusSuccess,\n statusSuccessBackground: tokens.fillColorStatusSuccessGhost,\n statusWarningIcon: tokens.iconColorStatusWarningPrimary,\n statusWarningText: tokens.textColorStatusWarning,\n statusWarningBackground: tokens.fillColorStatusWarningGhost,\n statusErrorIcon: tokens.iconColorStatusErrorPrimary,\n statusErrorText: tokens.textColorStatusError,\n statusErrorBackground: tokens.fillColorStatusErrorGhost,\n statusNeutralIcon: tokens.iconColorStatusNeutralPrimary,\n statusNeutralText: tokens.textColorStatusNeutral,\n statusNeutralBackground: tokens.fillColorStatusNeutralGhost,\n}\n\nconst colorsChatDark: ChatColors = {\n name: 'dark',\n buttonStart: undefined,\n buttonEnd: undefined,\n interaction: tokens.fillColorInteractionDefaultDark,\n switchTrackTrue: undefined,\n switchTrackFalse: undefined,\n switchThumbColor: undefined,\n testColor: 'pink',\n statusInfoIcon: tokens.iconColorStatusInfoPrimaryDark,\n statusInfoText: tokens.textColorStatusInfoDark,\n statusInfoBackground: tokens.fillColorStatusInfoGhostDark,\n statusSuccessIcon: tokens.iconColorStatusSuccessPrimaryDark,\n statusSuccessText: tokens.textColorStatusSuccessDark,\n statusSuccessBackground: tokens.fillColorStatusSuccessGhostDark,\n statusWarningIcon: tokens.iconColorStatusWarningPrimaryDark,\n statusWarningText: tokens.textColorStatusWarningDark,\n statusWarningBackground: tokens.fillColorStatusWarningGhostDark,\n statusErrorIcon: tokens.iconColorStatusErrorPrimaryDark,\n statusErrorText: tokens.textColorStatusErrorDark,\n statusErrorBackground: tokens.fillColorStatusErrorGhostDark,\n statusNeutralIcon: tokens.iconColorStatusNeutralPrimaryDark,\n statusNeutralText: tokens.textColorStatusNeutralDark,\n statusNeutralBackground: tokens.fillColorStatusNeutralGhostDark,\n}\n\nconst chatThemeColorMap = {\n light: colorsChatLight,\n dark: colorsChatDark,\n}\n"]}
|
|
@@ -51,6 +51,36 @@ export declare const tokens: {
|
|
|
51
51
|
colorNeutral98: "hsl(0, 0%, 98%)";
|
|
52
52
|
colorNeutral100White: "hsl(0, 0%, 100%)";
|
|
53
53
|
fillColorInteractionDefault: "hsl(204, 100%, 40%)";
|
|
54
|
+
fillColorStatusNeutralGhost: "hsl(0, 0%, 93%)";
|
|
55
|
+
fillColorStatusNeutralGhostDark: "hsl(0, 0%, 18%)";
|
|
56
|
+
textColorStatusNeutral: "hsl(0, 0%, 24%)";
|
|
57
|
+
textColorStatusNeutralDark: "hsl(0, 0%, 80%)";
|
|
58
|
+
iconColorStatusNeutralPrimary: "hsl(0, 0%, 45%)";
|
|
59
|
+
iconColorStatusNeutralPrimaryDark: "hsl(0, 0%, 54%)";
|
|
60
|
+
fillColorStatusErrorGhost: "hsl(9, 59%, 93%)";
|
|
61
|
+
fillColorStatusErrorGhostDark: "hsl(8, 20%, 16%)";
|
|
62
|
+
textColorStatusError: "hsl(8, 60%, 45%)";
|
|
63
|
+
textColorStatusErrorDark: "hsl(8, 61%, 61%)";
|
|
64
|
+
iconColorStatusErrorPrimary: "hsl(8, 60%, 47%)";
|
|
65
|
+
iconColorStatusErrorPrimaryDark: "hsl(8, 60%, 55%)";
|
|
66
|
+
fillColorStatusWarningGhost: "hsl(42, 87%, 94%)";
|
|
67
|
+
fillColorStatusWarningGhostDark: "hsl(41, 18%, 17%)";
|
|
68
|
+
textColorStatusWarning: "hsl(42, 100%, 29%)";
|
|
69
|
+
textColorStatusWarningDark: "hsl(42, 84%, 55%)";
|
|
70
|
+
iconColorStatusWarningPrimary: "hsl(42, 84%, 49%)";
|
|
71
|
+
iconColorStatusWarningPrimaryDark: "hsl(42, 84%, 49%)";
|
|
72
|
+
fillColorStatusSuccessGhost: "hsl(97, 57%, 90%)";
|
|
73
|
+
fillColorStatusSuccessGhostDark: "hsl(125, 17%, 15%)";
|
|
74
|
+
textColorStatusSuccess: "hsl(97, 57%, 28%)";
|
|
75
|
+
textColorStatusSuccessDark: "hsl(97, 57%, 41%)";
|
|
76
|
+
iconColorStatusSuccessPrimary: "hsl(96, 57%, 33%)";
|
|
77
|
+
iconColorStatusSuccessPrimaryDark: "hsl(96, 57%, 41%)";
|
|
78
|
+
fillColorStatusInfoGhost: "hsl(203, 94%, 94%)";
|
|
79
|
+
fillColorStatusInfoGhostDark: "hsl(204, 32%, 15%)";
|
|
80
|
+
textColorStatusInfo: "hsl(204, 100%, 35%)";
|
|
81
|
+
textColorStatusInfoDark: "hsl(204, 68%, 55%)";
|
|
82
|
+
iconColorStatusInfoPrimary: "hsl(204, 100%, 40%)";
|
|
83
|
+
iconColorStatusInfoPrimaryDark: "hsl(204, 78%, 38%)";
|
|
54
84
|
fillColorTransparencyLight010: "hsla(0, 0%, 100%, 0.1)";
|
|
55
85
|
fillColorTransparencyLight020: "hsla(0, 0%, 100%, 0.2)";
|
|
56
86
|
fillColorTransparencyLight030: "hsla(0, 0%, 100%, 0.3)";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tokens.d.ts","sourceRoot":"","sources":["../../../src/vendor/tapestry/tokens.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"tokens.d.ts","sourceRoot":"","sources":["../../../src/vendor/tapestry/tokens.ts"],"names":[],"mappings":"AAqHA,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAKlB,CAAA"}
|
|
@@ -21,6 +21,36 @@ const colorPrimitives = {
|
|
|
21
21
|
colorNeutral98: 'hsl(0, 0%, 98%)',
|
|
22
22
|
colorNeutral100White: 'hsl(0, 0%, 100%)',
|
|
23
23
|
fillColorInteractionDefault: 'hsl(204, 100%, 40%)',
|
|
24
|
+
fillColorStatusNeutralGhost: 'hsl(0, 0%, 93%)',
|
|
25
|
+
fillColorStatusNeutralGhostDark: 'hsl(0, 0%, 18%)',
|
|
26
|
+
textColorStatusNeutral: 'hsl(0, 0%, 24%)',
|
|
27
|
+
textColorStatusNeutralDark: 'hsl(0, 0%, 80%)',
|
|
28
|
+
iconColorStatusNeutralPrimary: 'hsl(0, 0%, 45%)',
|
|
29
|
+
iconColorStatusNeutralPrimaryDark: 'hsl(0, 0%, 54%)',
|
|
30
|
+
fillColorStatusErrorGhost: 'hsl(9, 59%, 93%)',
|
|
31
|
+
fillColorStatusErrorGhostDark: 'hsl(8, 20%, 16%)',
|
|
32
|
+
textColorStatusError: 'hsl(8, 60%, 45%)',
|
|
33
|
+
textColorStatusErrorDark: 'hsl(8, 61%, 61%)',
|
|
34
|
+
iconColorStatusErrorPrimary: 'hsl(8, 60%, 47%)',
|
|
35
|
+
iconColorStatusErrorPrimaryDark: 'hsl(8, 60%, 55%)',
|
|
36
|
+
fillColorStatusWarningGhost: 'hsl(42, 87%, 94%)',
|
|
37
|
+
fillColorStatusWarningGhostDark: 'hsl(41, 18%, 17%)',
|
|
38
|
+
textColorStatusWarning: 'hsl(42, 100%, 29%)',
|
|
39
|
+
textColorStatusWarningDark: 'hsl(42, 84%, 55%)',
|
|
40
|
+
iconColorStatusWarningPrimary: 'hsl(42, 84%, 49%)',
|
|
41
|
+
iconColorStatusWarningPrimaryDark: 'hsl(42, 84%, 49%)',
|
|
42
|
+
fillColorStatusSuccessGhost: 'hsl(97, 57%, 90%)',
|
|
43
|
+
fillColorStatusSuccessGhostDark: 'hsl(125, 17%, 15%)',
|
|
44
|
+
textColorStatusSuccess: 'hsl(97, 57%, 28%)',
|
|
45
|
+
textColorStatusSuccessDark: 'hsl(97, 57%, 41%)',
|
|
46
|
+
iconColorStatusSuccessPrimary: 'hsl(96, 57%, 33%)',
|
|
47
|
+
iconColorStatusSuccessPrimaryDark: 'hsl(96, 57%, 41%)',
|
|
48
|
+
fillColorStatusInfoGhost: 'hsl(203, 94%, 94%)',
|
|
49
|
+
fillColorStatusInfoGhostDark: 'hsl(204, 32%, 15%)',
|
|
50
|
+
textColorStatusInfo: 'hsl(204, 100%, 35%)',
|
|
51
|
+
textColorStatusInfoDark: 'hsl(204, 68%, 55%)',
|
|
52
|
+
iconColorStatusInfoPrimary: 'hsl(204, 100%, 40%)',
|
|
53
|
+
iconColorStatusInfoPrimaryDark: 'hsl(204, 78%, 38%)',
|
|
24
54
|
fillColorTransparencyLight010: 'hsla(0, 0%, 100%, 0.1)',
|
|
25
55
|
fillColorTransparencyLight020: 'hsla(0, 0%, 100%, 0.2)',
|
|
26
56
|
fillColorTransparencyLight030: 'hsla(0, 0%, 100%, 0.3)',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tokens.js","sourceRoot":"","sources":["../../../src/vendor/tapestry/tokens.ts"],"names":[],"mappings":"AAAA,kDAAkD;AAClD,2FAA2F;AAC3F,0GAA0G;AAE1G,MAAM,eAAe,GAAG;IACtB,aAAa,EAAE,gBAAgB;IAC/B,cAAc,EAAE,iBAAiB;IACjC,cAAc,EAAE,iBAAiB;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C;IACjB,cAAc,EAAE,CAAC;IACjB,cAAc,EAAE,CAAC;IACjB,cAAc,EAAE,EAAE;IAClB,iBAAiB,EAAE,EAAE;IACrB,iBAAiB,EAAE,CAAC;IACpB,eAAe,EAAE,CAAC;IAClB,gBAAgB,EAAE,KAAK;IACvB,gBAAgB,EAAE,KAAK;IACvB,kBAAkB,EAAE,KAAK;IACzB,cAAc,EAAE,KAAK;IACrB,WAAW,EAAE,EAAE;IACf,WAAW,EAAE,EAAE;IACf,WAAW,EAAE,EAAE;IACf,UAAU,EAAE,EAAE;IACd,UAAU,EAAE,EAAE;IACd,UAAU,EAAE,EAAE;IACd,UAAU,EAAE,EAAE;IACd,UAAU,EAAE,EAAE;IACd,WAAW,EAAE,EAAE;CACP,CAAA;AAEV,MAAM,cAAc,GAAG;IACrB,mBAAmB,EAAE,gBAAgB,CAAC,cAAc;CAC5C,CAAA;AAEV,gFAAgF;AAChF,MAAM,eAAe,GAAG;IACtB,6BAA6B,EAAE,oBAAoB;IACnD,+BAA+B,EAAE,qBAAqB;IACtD,0BAA0B,EAAE,kBAAkB;CACtC,CAAA;AAEV,MAAM,CAAC,MAAM,MAAM,GAAG;IACpB,GAAG,eAAe;IAClB,GAAG,gBAAgB;IACnB,GAAG,cAAc;IACjB,GAAG,eAAe;CACnB,CAAA","sourcesContent":["// Copied from `@planningcenter/tapestry` package.\n// Defining these tokens locally is a temporary solution until the package supports mobile.\n// Tokens Reference: https://planningcenter.github.io/tapestry/?path=/docs/foundations-design-tokens--docs\n\nconst colorPrimitives = {\n colorNeutral7: 'hsl(0, 0%, 7%)',\n colorNeutral12: 'hsl(0, 0%, 12%)',\n colorNeutral15: 'hsl(0, 0%, 15%)',\n colorNeutral17: 'hsl(0, 0%, 17%)',\n colorNeutral19: 'hsl(0, 0%, 19%)',\n colorNeutral24: 'hsl(0, 0%, 24%)',\n colorNeutral32: 'hsl(0, 0%, 32%)',\n colorNeutral45: 'hsl(0, 0%, 45%)',\n colorNeutral50: 'hsl(0, 0%, 50%)',\n colorNeutral58: 'hsl(0, 0%, 58%)',\n colorNeutral68: 'hsl(0, 0%, 68%)',\n colorNeutral81: 'hsl(0, 0%, 81%)',\n colorNeutral88: 'hsl(0, 0%, 88%)',\n colorNeutral93: 'hsl(0, 0%, 93%)',\n colorNeutral95: 'hsl(0, 0%, 95%)',\n colorNeutral97: 'hsl(0, 0%, 97%)',\n colorNeutral98: 'hsl(0, 0%, 98%)',\n colorNeutral100White: 'hsl(0, 0%, 100%)',\n fillColorInteractionDefault: 'hsl(204, 100%, 40%)',\n fillColorTransparencyLight010: 'hsla(0, 0%, 100%, 0.1)',\n fillColorTransparencyLight020: 'hsla(0, 0%, 100%, 0.2)',\n fillColorTransparencyLight030: 'hsla(0, 0%, 100%, 0.3)',\n fillColorTransparencyLight040: 'hsla(0, 0%, 100%, 0.4)',\n fillColorTransparencyLight050: 'hsla(0, 0%, 100%, 0.5)',\n fillColorTransparencyLight060: 'hsla(0, 0%, 100%, 0.6)',\n fillColorTransparencyLight070: 'hsla(0, 0%, 100%, 0.7)',\n fillColorTransparencyLight080: 'hsla(0, 0%, 100%, 0.8)',\n fillColorTransparencyLight090: 'hsla(0, 0%, 100%, 0.9)',\n fillColorTransparencyDark010: 'hsla(0, 0%, 0%, 0.1)',\n fillColorTransparencyDark020: 'hsla(0, 0%, 0%, 0.2)',\n fillColorTransparencyDark030: 'hsla(0, 0%, 0%, 0.3)',\n fillColorTransparencyDark040: 'hsla(0, 0%, 0%, 0.4)',\n fillColorTransparencyDark050: 'hsla(0, 0%, 0%, 0.5)',\n fillColorTransparencyDark060: 'hsla(0, 0%, 0%, 0.6)',\n fillColorTransparencyDark070: 'hsla(0, 0%, 0%, 0.7)',\n fillColorTransparencyDark080: 'hsla(0, 0%, 0%, 0.8)',\n fillColorTransparencyDark090: 'hsla(0, 0%, 0%, 0.9)',\n} as const\n\nconst numericPrimtives = {\n spacingFourth: 2,\n spacingHalf: 4,\n spacing1: 8,\n spacing2: 16,\n spacing3: 24,\n spacing4: 32,\n spacing5: 40,\n spacing6: 48,\n spacing7: 56,\n borderRadiusSm: 2,\n borderRadiusMd: 4,\n borderRadiusLg: 8,\n borderRadiusXl: 16,\n borderRadiusRound: 56,\n borderSizeDefault: 1,\n borderSizeThick: 2,\n fontWeightNormal: '400',\n fontWeightMedium: '500',\n fontWeightSemiBold: '600',\n fontWeightBold: '700',\n fontSize4xl: 32,\n fontSize3xl: 28,\n fontSize2xl: 24,\n fontSizeXl: 20,\n fontSizeLg: 18,\n fontSizeMd: 16,\n fontSizeSm: 14,\n fontSizeXs: 12,\n fontSize2xs: 10,\n} as const\n\nconst numericAliases = {\n borderRadiusDefault: numericPrimtives.borderRadiusMd,\n} as const\n\n// These tokens are specfic to Chat will not be replaced by the Tapestry library\nconst localChatTokens = {\n colorInteractionOnlineDefault: 'hsl(123, 38%, 57%)',\n fillColorInteractionDefaultDark: 'hsl(204, 100%, 40%)',\n fillColorStatusErrorMedium: 'hsl(0, 72%, 45%)',\n} as const\n\nexport const tokens = {\n ...colorPrimitives,\n ...numericPrimtives,\n ...numericAliases,\n ...localChatTokens,\n}\n"]}
|
|
1
|
+
{"version":3,"file":"tokens.js","sourceRoot":"","sources":["../../../src/vendor/tapestry/tokens.ts"],"names":[],"mappings":"AAAA,kDAAkD;AAClD,2FAA2F;AAC3F,0GAA0G;AAE1G,MAAM,eAAe,GAAG;IACtB,aAAa,EAAE,gBAAgB;IAC/B,cAAc,EAAE,iBAAiB;IACjC,cAAc,EAAE,iBAAiB;IACjC,cAAc,EAAE,iBAAiB;IACjC,cAAc,EAAE,iBAAiB;IACjC,cAAc,EAAE,iBAAiB;IACjC,cAAc,EAAE,iBAAiB;IACjC,cAAc,EAAE,iBAAiB;IACjC,cAAc,EAAE,iBAAiB;IACjC,cAAc,EAAE,iBAAiB;IACjC,cAAc,EAAE,iBAAiB;IACjC,cAAc,EAAE,iBAAiB;IACjC,cAAc,EAAE,iBAAiB;IACjC,cAAc,EAAE,iBAAiB;IACjC,c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tD,0BAA0B,EAAE,kBAAkB;CACtC,CAAA;AAEV,MAAM,CAAC,MAAM,MAAM,GAAG;IACpB,GAAG,eAAe;IAClB,GAAG,gBAAgB;IACnB,GAAG,cAAc;IACjB,GAAG,eAAe;CACnB,CAAA","sourcesContent":["// Copied from `@planningcenter/tapestry` package.\n// Defining these tokens locally is a temporary solution until the package supports mobile.\n// Tokens Reference: https://planningcenter.github.io/tapestry/?path=/docs/foundations-design-tokens--docs\n\nconst colorPrimitives = {\n colorNeutral7: 'hsl(0, 0%, 7%)',\n colorNeutral12: 'hsl(0, 0%, 12%)',\n colorNeutral15: 'hsl(0, 0%, 15%)',\n colorNeutral17: 'hsl(0, 0%, 17%)',\n colorNeutral19: 'hsl(0, 0%, 19%)',\n colorNeutral24: 'hsl(0, 0%, 24%)',\n colorNeutral32: 'hsl(0, 0%, 32%)',\n colorNeutral45: 'hsl(0, 0%, 45%)',\n colorNeutral50: 'hsl(0, 0%, 50%)',\n colorNeutral58: 'hsl(0, 0%, 58%)',\n colorNeutral68: 'hsl(0, 0%, 68%)',\n colorNeutral81: 'hsl(0, 0%, 81%)',\n colorNeutral88: 'hsl(0, 0%, 88%)',\n colorNeutral93: 'hsl(0, 0%, 93%)',\n colorNeutral95: 'hsl(0, 0%, 95%)',\n colorNeutral97: 'hsl(0, 0%, 97%)',\n colorNeutral98: 'hsl(0, 0%, 98%)',\n colorNeutral100White: 'hsl(0, 0%, 100%)',\n fillColorInteractionDefault: 'hsl(204, 100%, 40%)',\n fillColorStatusNeutralGhost: 'hsl(0, 0%, 93%)',\n fillColorStatusNeutralGhostDark: 'hsl(0, 0%, 18%)',\n textColorStatusNeutral: 'hsl(0, 0%, 24%)',\n textColorStatusNeutralDark: 'hsl(0, 0%, 80%)',\n iconColorStatusNeutralPrimary: 'hsl(0, 0%, 45%)',\n iconColorStatusNeutralPrimaryDark: 'hsl(0, 0%, 54%)',\n fillColorStatusErrorGhost: 'hsl(9, 59%, 93%)',\n fillColorStatusErrorGhostDark: 'hsl(8, 20%, 16%)',\n textColorStatusError: 'hsl(8, 60%, 45%)',\n textColorStatusErrorDark: 'hsl(8, 61%, 61%)',\n iconColorStatusErrorPrimary: 'hsl(8, 60%, 47%)',\n iconColorStatusErrorPrimaryDark: 'hsl(8, 60%, 55%)',\n fillColorStatusWarningGhost: 'hsl(42, 87%, 94%)',\n fillColorStatusWarningGhostDark: 'hsl(41, 18%, 17%)',\n textColorStatusWarning: 'hsl(42, 100%, 29%)',\n textColorStatusWarningDark: 'hsl(42, 84%, 55%)',\n iconColorStatusWarningPrimary: 'hsl(42, 84%, 49%)',\n iconColorStatusWarningPrimaryDark: 'hsl(42, 84%, 49%)',\n fillColorStatusSuccessGhost: 'hsl(97, 57%, 90%)',\n fillColorStatusSuccessGhostDark: 'hsl(125, 17%, 15%)',\n textColorStatusSuccess: 'hsl(97, 57%, 28%)',\n textColorStatusSuccessDark: 'hsl(97, 57%, 41%)',\n iconColorStatusSuccessPrimary: 'hsl(96, 57%, 33%)',\n iconColorStatusSuccessPrimaryDark: 'hsl(96, 57%, 41%)',\n fillColorStatusInfoGhost: 'hsl(203, 94%, 94%)',\n fillColorStatusInfoGhostDark: 'hsl(204, 32%, 15%)',\n textColorStatusInfo: 'hsl(204, 100%, 35%)',\n textColorStatusInfoDark: 'hsl(204, 68%, 55%)',\n iconColorStatusInfoPrimary: 'hsl(204, 100%, 40%)',\n iconColorStatusInfoPrimaryDark: 'hsl(204, 78%, 38%)',\n fillColorTransparencyLight010: 'hsla(0, 0%, 100%, 0.1)',\n fillColorTransparencyLight020: 'hsla(0, 0%, 100%, 0.2)',\n fillColorTransparencyLight030: 'hsla(0, 0%, 100%, 0.3)',\n fillColorTransparencyLight040: 'hsla(0, 0%, 100%, 0.4)',\n fillColorTransparencyLight050: 'hsla(0, 0%, 100%, 0.5)',\n fillColorTransparencyLight060: 'hsla(0, 0%, 100%, 0.6)',\n fillColorTransparencyLight070: 'hsla(0, 0%, 100%, 0.7)',\n fillColorTransparencyLight080: 'hsla(0, 0%, 100%, 0.8)',\n fillColorTransparencyLight090: 'hsla(0, 0%, 100%, 0.9)',\n fillColorTransparencyDark010: 'hsla(0, 0%, 0%, 0.1)',\n fillColorTransparencyDark020: 'hsla(0, 0%, 0%, 0.2)',\n fillColorTransparencyDark030: 'hsla(0, 0%, 0%, 0.3)',\n fillColorTransparencyDark040: 'hsla(0, 0%, 0%, 0.4)',\n fillColorTransparencyDark050: 'hsla(0, 0%, 0%, 0.5)',\n fillColorTransparencyDark060: 'hsla(0, 0%, 0%, 0.6)',\n fillColorTransparencyDark070: 'hsla(0, 0%, 0%, 0.7)',\n fillColorTransparencyDark080: 'hsla(0, 0%, 0%, 0.8)',\n fillColorTransparencyDark090: 'hsla(0, 0%, 0%, 0.9)',\n} as const\n\nconst numericPrimtives = {\n spacingFourth: 2,\n spacingHalf: 4,\n spacing1: 8,\n spacing2: 16,\n spacing3: 24,\n spacing4: 32,\n spacing5: 40,\n spacing6: 48,\n spacing7: 56,\n borderRadiusSm: 2,\n borderRadiusMd: 4,\n borderRadiusLg: 8,\n borderRadiusXl: 16,\n borderRadiusRound: 56,\n borderSizeDefault: 1,\n borderSizeThick: 2,\n fontWeightNormal: '400',\n fontWeightMedium: '500',\n fontWeightSemiBold: '600',\n fontWeightBold: '700',\n fontSize4xl: 32,\n fontSize3xl: 28,\n fontSize2xl: 24,\n fontSizeXl: 20,\n fontSizeLg: 18,\n fontSizeMd: 16,\n fontSizeSm: 14,\n fontSizeXs: 12,\n fontSize2xs: 10,\n} as const\n\nconst numericAliases = {\n borderRadiusDefault: numericPrimtives.borderRadiusMd,\n} as const\n\n// These tokens are specfic to Chat will not be replaced by the Tapestry library\nconst localChatTokens = {\n colorInteractionOnlineDefault: 'hsl(123, 38%, 57%)',\n fillColorInteractionDefaultDark: 'hsl(204, 100%, 40%)',\n fillColorStatusErrorMedium: 'hsl(0, 72%, 45%)',\n} as const\n\nexport const tokens = {\n ...colorPrimitives,\n ...numericPrimtives,\n ...numericAliases,\n ...localChatTokens,\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@planningcenter/chat-react-native",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.7.0-rc.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"types": "build/index.d.ts",
|
|
@@ -35,6 +35,7 @@
|
|
|
35
35
|
"react-native": "*",
|
|
36
36
|
"react-native-device-info": "*",
|
|
37
37
|
"react-native-linear-gradient": "^2.8.3",
|
|
38
|
+
"react-native-safe-area-context": ">=5.0.0",
|
|
38
39
|
"react-native-svg": "*"
|
|
39
40
|
},
|
|
40
41
|
"devDependencies": {
|
|
@@ -46,5 +47,5 @@
|
|
|
46
47
|
"prettier": "^3.4.2",
|
|
47
48
|
"typescript": "<5.6.0"
|
|
48
49
|
},
|
|
49
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "45c925959fee223156aa61022952aaea6437c09a"
|
|
50
51
|
}
|
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
import { addRecordInPagesData, updateRecordInPagesData } from '../../../utils/'
|
|
2
|
+
|
|
3
|
+
const data = {
|
|
4
|
+
pageParams: {},
|
|
5
|
+
pages: [
|
|
6
|
+
{
|
|
7
|
+
data: [
|
|
8
|
+
{ id: '1', type: 'Message', text: 'message 1' },
|
|
9
|
+
{ id: '2', type: 'Message', text: 'message 2' },
|
|
10
|
+
],
|
|
11
|
+
included: [],
|
|
12
|
+
links: {},
|
|
13
|
+
meta: { count: 2, totalCount: 2 },
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
data: [
|
|
17
|
+
{ id: '3', type: 'Message', text: 'message 3' },
|
|
18
|
+
{ id: '4', type: 'Message', text: 'message 4' },
|
|
19
|
+
],
|
|
20
|
+
included: [],
|
|
21
|
+
links: {},
|
|
22
|
+
meta: { count: 2, totalCount: 2 },
|
|
23
|
+
},
|
|
24
|
+
],
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
describe('updateRecordInPagesData', () => {
|
|
28
|
+
it('should update the record in the pages data', () => {
|
|
29
|
+
const id = '3'
|
|
30
|
+
const record = createRecord({ id })
|
|
31
|
+
const result = updateRecordInPagesData({ data, record })
|
|
32
|
+
|
|
33
|
+
expect(result).toEqual({
|
|
34
|
+
pageParams: {},
|
|
35
|
+
pages: [
|
|
36
|
+
{
|
|
37
|
+
data: [
|
|
38
|
+
{ id: '1', type: 'Message', text: 'message 1' },
|
|
39
|
+
{ id: '2', type: 'Message', text: 'message 2' },
|
|
40
|
+
],
|
|
41
|
+
included: [],
|
|
42
|
+
links: {},
|
|
43
|
+
meta: { count: 2, totalCount: 2 },
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
data: [
|
|
47
|
+
{ id: '3', type: 'Message', text: 'example 3' },
|
|
48
|
+
{ id: '4', type: 'Message', text: 'message 4' },
|
|
49
|
+
],
|
|
50
|
+
included: [],
|
|
51
|
+
links: {},
|
|
52
|
+
meta: { count: 2, totalCount: 2 },
|
|
53
|
+
},
|
|
54
|
+
],
|
|
55
|
+
})
|
|
56
|
+
})
|
|
57
|
+
|
|
58
|
+
it('should update the record in the pages data with a custom processRecord function', () => {
|
|
59
|
+
const id = '2'
|
|
60
|
+
const record = createRecord({ id })
|
|
61
|
+
|
|
62
|
+
const result = updateRecordInPagesData<typeof record>({
|
|
63
|
+
data,
|
|
64
|
+
record,
|
|
65
|
+
processRecord: r => ({ ...r, text: 'updated ' + r.text }),
|
|
66
|
+
})
|
|
67
|
+
|
|
68
|
+
expect(result).toEqual({
|
|
69
|
+
pageParams: {},
|
|
70
|
+
pages: [
|
|
71
|
+
{
|
|
72
|
+
data: [
|
|
73
|
+
{ id: '1', type: 'Message', text: 'message 1' },
|
|
74
|
+
{ id, type: 'Message', text: `updated example ${id}` },
|
|
75
|
+
],
|
|
76
|
+
included: [],
|
|
77
|
+
links: {},
|
|
78
|
+
meta: { count: 2, totalCount: 2 },
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
data: [
|
|
82
|
+
{ id: '3', type: 'Message', text: 'message 3' },
|
|
83
|
+
{ id: '4', type: 'Message', text: 'message 4' },
|
|
84
|
+
],
|
|
85
|
+
included: [],
|
|
86
|
+
links: {},
|
|
87
|
+
meta: { count: 2, totalCount: 2 },
|
|
88
|
+
},
|
|
89
|
+
],
|
|
90
|
+
})
|
|
91
|
+
})
|
|
92
|
+
|
|
93
|
+
it('should add records that do not yet exist', () => {
|
|
94
|
+
const id = '5'
|
|
95
|
+
const record = createRecord({ id })
|
|
96
|
+
|
|
97
|
+
const result = updateRecordInPagesData<typeof record>({
|
|
98
|
+
data,
|
|
99
|
+
record,
|
|
100
|
+
processRecord: r => ({ ...r, text: 'updated ' + r.text }),
|
|
101
|
+
})
|
|
102
|
+
|
|
103
|
+
expect(result).toEqual({
|
|
104
|
+
pageParams: {},
|
|
105
|
+
pages: [
|
|
106
|
+
{
|
|
107
|
+
data: [
|
|
108
|
+
{ id: '1', type: 'Message', text: 'message 1' },
|
|
109
|
+
{ id: '2', type: 'Message', text: 'message 2' },
|
|
110
|
+
],
|
|
111
|
+
included: [],
|
|
112
|
+
links: {},
|
|
113
|
+
meta: { count: 2, totalCount: 2 },
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
data: [
|
|
117
|
+
{ id: '3', type: 'Message', text: 'message 3' },
|
|
118
|
+
{ id: '4', type: 'Message', text: 'message 4' },
|
|
119
|
+
{ id, type: 'Message', text: `updated example ${id}` },
|
|
120
|
+
],
|
|
121
|
+
included: [],
|
|
122
|
+
links: {},
|
|
123
|
+
meta: { count: 2, totalCount: 2 },
|
|
124
|
+
},
|
|
125
|
+
],
|
|
126
|
+
})
|
|
127
|
+
})
|
|
128
|
+
})
|
|
129
|
+
|
|
130
|
+
describe('addRecordInPagesData', () => {
|
|
131
|
+
it('should add records that do not yet exist', () => {
|
|
132
|
+
const id = '7'
|
|
133
|
+
const record = createRecord({ id })
|
|
134
|
+
|
|
135
|
+
const result = addRecordInPagesData<typeof record>({
|
|
136
|
+
data,
|
|
137
|
+
record,
|
|
138
|
+
})
|
|
139
|
+
|
|
140
|
+
expect(result).toEqual({
|
|
141
|
+
pageParams: {},
|
|
142
|
+
pages: [
|
|
143
|
+
{
|
|
144
|
+
data: [
|
|
145
|
+
{ id: '1', type: 'Message', text: 'message 1' },
|
|
146
|
+
{ id: '2', type: 'Message', text: 'message 2' },
|
|
147
|
+
],
|
|
148
|
+
included: [],
|
|
149
|
+
links: {},
|
|
150
|
+
meta: { count: 2, totalCount: 2 },
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
data: [
|
|
154
|
+
{ id: '3', type: 'Message', text: 'message 3' },
|
|
155
|
+
{ id: '4', type: 'Message', text: 'message 4' },
|
|
156
|
+
record,
|
|
157
|
+
],
|
|
158
|
+
included: [],
|
|
159
|
+
links: {},
|
|
160
|
+
meta: { count: 2, totalCount: 2 },
|
|
161
|
+
},
|
|
162
|
+
],
|
|
163
|
+
})
|
|
164
|
+
})
|
|
165
|
+
|
|
166
|
+
it('should add the record in the pages data and update with a custom processRecord function', () => {
|
|
167
|
+
const id = '8'
|
|
168
|
+
const record = createRecord({ id })
|
|
169
|
+
const result = addRecordInPagesData<typeof record>({
|
|
170
|
+
data,
|
|
171
|
+
record,
|
|
172
|
+
processRecord: r => ({ ...r, text: 'updated ' + r.text }),
|
|
173
|
+
})
|
|
174
|
+
|
|
175
|
+
expect(result).toEqual({
|
|
176
|
+
pageParams: {},
|
|
177
|
+
pages: [
|
|
178
|
+
{
|
|
179
|
+
data: [
|
|
180
|
+
{ id: '1', type: 'Message', text: 'message 1' },
|
|
181
|
+
{ id: '2', type: 'Message', text: 'message 2' },
|
|
182
|
+
],
|
|
183
|
+
included: [],
|
|
184
|
+
links: {},
|
|
185
|
+
meta: { count: 2, totalCount: 2 },
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
data: [
|
|
189
|
+
{ id: '3', type: 'Message', text: 'message 3' },
|
|
190
|
+
{ id: '4', type: 'Message', text: 'message 4' },
|
|
191
|
+
{ ...record, text: `updated example ${id}` },
|
|
192
|
+
],
|
|
193
|
+
included: [],
|
|
194
|
+
links: {},
|
|
195
|
+
meta: { count: 2, totalCount: 2 },
|
|
196
|
+
},
|
|
197
|
+
],
|
|
198
|
+
})
|
|
199
|
+
})
|
|
200
|
+
})
|
|
201
|
+
|
|
202
|
+
const createRecord = ({ id }: { id: string }) => ({
|
|
203
|
+
id,
|
|
204
|
+
text: `example ${id}`,
|
|
205
|
+
type: 'Message',
|
|
206
|
+
})
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { PlatformPressable } from '@react-navigation/elements'
|
|
2
|
+
import colorFunction from 'color'
|
|
3
|
+
import React from 'react'
|
|
4
|
+
import { StyleSheet } from 'react-native'
|
|
5
|
+
import { Text } from '../../components/display'
|
|
6
|
+
import { useTheme } from '../../hooks'
|
|
7
|
+
import { ReactionCountResource } from '../../types/resources/reaction'
|
|
8
|
+
|
|
9
|
+
export const REACTION_EMOJIS: Record<ReactionCountResource['value'], string> = {
|
|
10
|
+
thumbs_up: '👍',
|
|
11
|
+
thumbs_down: '👎',
|
|
12
|
+
pray: '🙏',
|
|
13
|
+
laugh: '😂',
|
|
14
|
+
heart: '❤️',
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export function MessageReaction({
|
|
18
|
+
reaction,
|
|
19
|
+
onPress,
|
|
20
|
+
}: {
|
|
21
|
+
reaction: ReactionCountResource
|
|
22
|
+
onPress: () => void
|
|
23
|
+
}) {
|
|
24
|
+
const styles = useReactionStyles(reaction)
|
|
25
|
+
|
|
26
|
+
return (
|
|
27
|
+
<PlatformPressable key={reaction.value} style={styles.reaction} onPress={onPress}>
|
|
28
|
+
<Text style={styles.reactionEmoji}>{REACTION_EMOJIS[reaction.value]}</Text>
|
|
29
|
+
<Text style={styles.reactionText}>{reaction.count}</Text>
|
|
30
|
+
</PlatformPressable>
|
|
31
|
+
)
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
const useReactionStyles = ({ mine }: { mine: number }) => {
|
|
35
|
+
const { colors } = useTheme()
|
|
36
|
+
const activeBorderColor = colorFunction(colors.interaction).alpha(0.8).string()
|
|
37
|
+
const activeColor = colorFunction(colors.interaction).alpha(0.2).string()
|
|
38
|
+
|
|
39
|
+
return StyleSheet.create({
|
|
40
|
+
reaction: {
|
|
41
|
+
borderWidth: 1,
|
|
42
|
+
borderColor: mine ? activeBorderColor : colors.fillColorNeutral040,
|
|
43
|
+
backgroundColor: mine ? activeColor : colors.fillColorNeutral050Base,
|
|
44
|
+
borderRadius: 16,
|
|
45
|
+
paddingVertical: 2,
|
|
46
|
+
paddingHorizontal: 12,
|
|
47
|
+
flexDirection: 'row',
|
|
48
|
+
alignItems: 'center',
|
|
49
|
+
gap: 4,
|
|
50
|
+
},
|
|
51
|
+
reactionEmoji: { fontSize: 12, paddingTop: 0 },
|
|
52
|
+
reactionText: { fontSize: 12, color: colors.textColorDefaultPrimary },
|
|
53
|
+
pressed: {
|
|
54
|
+
opacity: 0.5,
|
|
55
|
+
},
|
|
56
|
+
})
|
|
57
|
+
}
|