@planningcenter/chat-react-native 4.8.0-qa-staging.5 → 4.8.0-qa-staging.7
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/conversations/bulk_conversation_actions_bar.d.ts.map +1 -1
- package/build/components/conversations/bulk_conversation_actions_bar.js +137 -45
- package/build/components/conversations/bulk_conversation_actions_bar.js.map +1 -1
- package/build/components/conversations/conversation_actions.js +113 -109
- package/build/components/conversations/conversation_actions.js.map +1 -1
- package/build/components/conversations/conversation_preview.d.ts.map +1 -1
- package/build/components/conversations/conversation_preview.js +129 -115
- package/build/components/conversations/conversation_preview.js.map +1 -1
- package/build/components/display/button.js +0 -1
- package/build/components/display/button.js.map +1 -1
- package/build/components/display/icon.d.ts +3 -1
- package/build/components/display/icon.d.ts.map +1 -1
- package/build/components/display/icon.js +2 -0
- package/build/components/display/icon.js.map +1 -1
- package/build/screens/conversation_actions_screen.d.ts +2 -0
- package/build/screens/conversation_actions_screen.d.ts.map +1 -1
- package/build/screens/conversation_actions_screen.js +359 -67
- package/build/screens/conversation_actions_screen.js.map +1 -1
- package/package.json +3 -3
- package/src/components/conversations/__tests__/conversation_actions.test.tsx +5 -1
- package/src/components/conversations/bulk_conversation_actions_bar.tsx +62 -33
- package/src/components/conversations/conversation_actions.tsx +2 -2
- package/src/components/conversations/conversation_preview.tsx +8 -1
- package/src/components/display/button.tsx +0 -1
- package/src/components/display/icon.tsx +3 -0
- package/src/screens/__tests__/conversation_actions_screen.test.tsx +36 -5
- package/src/screens/conversation_actions_screen.tsx +135 -22
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bulk_conversation_actions_bar.d.ts","sourceRoot":"","sources":["../../../src/components/conversations/bulk_conversation_actions_bar.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"bulk_conversation_actions_bar.d.ts","sourceRoot":"","sources":["../../../src/components/conversations/bulk_conversation_actions_bar.tsx"],"names":[],"mappings":"AAgBA,wBAAgB,0BAA0B,4CA+DzC"}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { c as _c } from "react/compiler-runtime";
|
|
2
2
|
import React, { useEffect, useState } from 'react';
|
|
3
|
-
import { StyleSheet } from 'react-native';
|
|
3
|
+
import { Pressable, StyleSheet } from 'react-native';
|
|
4
4
|
import Animated, { FadeIn, LayoutAnimationConfig, ReduceMotion } from 'react-native-reanimated';
|
|
5
5
|
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
6
6
|
import { useConversationsContext } from '../../contexts/conversations_context';
|
|
7
7
|
import { useReduceMotion, useTheme } from '../../hooks';
|
|
8
8
|
import { useBulkConversationActions } from '../../hooks/use_bulk_conversation_actions';
|
|
9
|
-
import { MAX_FONT_SIZE_MULTIPLIER_LANDMARK, isArchivedConversation } from '../../utils';
|
|
9
|
+
import { MAX_FONT_SIZE_MULTIPLIER_LANDMARK, isArchivedConversation, platformPressedOpacityStyle } from '../../utils';
|
|
10
10
|
import { dismissToast } from '../../utils/toast_store';
|
|
11
|
-
import {
|
|
11
|
+
import { Icon, Text } from '../display';
|
|
12
12
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
13
|
export function BulkConversationActionsBar() {
|
|
14
14
|
const styles = useStyles();
|
|
@@ -54,70 +54,162 @@ export function BulkConversationActionsBar() {
|
|
|
54
54
|
entering: FadeIn.duration(300).reduceMotion(reduceMotion),
|
|
55
55
|
style: styles.container,
|
|
56
56
|
testID: "bulk-conversation-actions-bar",
|
|
57
|
-
children: [/*#__PURE__*/_jsx(
|
|
58
|
-
variant: "outline",
|
|
59
|
-
size: "lg",
|
|
60
|
-
title: hiddenView ? 'Unhide' : 'Hide',
|
|
61
|
-
iconNameLeft: hiddenView ? 'general.showEye' : 'general.hideEye',
|
|
62
|
-
disabled: !canHide,
|
|
63
|
-
onPress: run(hiddenView ? unhide : hide),
|
|
64
|
-
style: styles.button,
|
|
65
|
-
maxFontSizeMultiplier: MAX_FONT_SIZE_MULTIPLIER_LANDMARK
|
|
66
|
-
}), /*#__PURE__*/_jsx(Button, {
|
|
67
|
-
variant: "outline",
|
|
68
|
-
size: "lg",
|
|
69
|
-
title: "Silence",
|
|
70
|
-
iconNameLeft: "general.bellMuted",
|
|
71
|
-
disabled: !canSilence,
|
|
72
|
-
onPress: run(silence),
|
|
73
|
-
style: styles.button,
|
|
74
|
-
maxFontSizeMultiplier: MAX_FONT_SIZE_MULTIPLIER_LANDMARK
|
|
75
|
-
}), /*#__PURE__*/_jsx(Button, {
|
|
76
|
-
variant: "outline",
|
|
77
|
-
size: "lg",
|
|
57
|
+
children: [/*#__PURE__*/_jsx(BulkAction, {
|
|
78
58
|
title: "Mark read",
|
|
79
|
-
|
|
59
|
+
iconName: "general.check",
|
|
80
60
|
disabled: disabled,
|
|
81
|
-
onPress: run(markRead)
|
|
82
|
-
|
|
83
|
-
|
|
61
|
+
onPress: run(markRead)
|
|
62
|
+
}), /*#__PURE__*/_jsx(BulkAction, {
|
|
63
|
+
title: "Silence",
|
|
64
|
+
iconName: "general.bellMuted",
|
|
65
|
+
disabled: !canSilence,
|
|
66
|
+
onPress: run(silence)
|
|
67
|
+
}), /*#__PURE__*/_jsx(BulkAction, {
|
|
68
|
+
title: hiddenView ? 'Unhide' : 'Hide',
|
|
69
|
+
iconName: hiddenView ? 'general.showEye' : 'general.hideEye',
|
|
70
|
+
disabled: !canHide,
|
|
71
|
+
onPress: run(hiddenView ? unhide : hide)
|
|
84
72
|
})]
|
|
85
73
|
})
|
|
86
74
|
});
|
|
87
75
|
}
|
|
88
|
-
|
|
89
|
-
const $ = _c(
|
|
76
|
+
function BulkAction(t0) {
|
|
77
|
+
const $ = _c(19);
|
|
78
|
+
const {
|
|
79
|
+
title,
|
|
80
|
+
iconName,
|
|
81
|
+
disabled,
|
|
82
|
+
onPress
|
|
83
|
+
} = t0;
|
|
84
|
+
let t1;
|
|
85
|
+
if ($[0] !== disabled) {
|
|
86
|
+
t1 = {
|
|
87
|
+
disabled
|
|
88
|
+
};
|
|
89
|
+
$[0] = disabled;
|
|
90
|
+
$[1] = t1;
|
|
91
|
+
} else {
|
|
92
|
+
t1 = $[1];
|
|
93
|
+
}
|
|
94
|
+
const styles = useStyles(t1);
|
|
95
|
+
let t2;
|
|
96
|
+
if ($[2] !== disabled) {
|
|
97
|
+
t2 = {
|
|
98
|
+
disabled
|
|
99
|
+
};
|
|
100
|
+
$[2] = disabled;
|
|
101
|
+
$[3] = t2;
|
|
102
|
+
} else {
|
|
103
|
+
t2 = $[3];
|
|
104
|
+
}
|
|
105
|
+
let t3;
|
|
106
|
+
if ($[4] !== styles.action) {
|
|
107
|
+
t3 = t4 => {
|
|
108
|
+
const {
|
|
109
|
+
pressed
|
|
110
|
+
} = t4;
|
|
111
|
+
return [styles.action, pressed && platformPressedOpacityStyle];
|
|
112
|
+
};
|
|
113
|
+
$[4] = styles.action;
|
|
114
|
+
$[5] = t3;
|
|
115
|
+
} else {
|
|
116
|
+
t3 = $[5];
|
|
117
|
+
}
|
|
118
|
+
let t4;
|
|
119
|
+
if ($[6] !== iconName || $[7] !== styles.actionIcon) {
|
|
120
|
+
t4 = /*#__PURE__*/_jsx(Icon, {
|
|
121
|
+
name: iconName,
|
|
122
|
+
size: 20,
|
|
123
|
+
style: styles.actionIcon,
|
|
124
|
+
accessibilityElementsHidden: true
|
|
125
|
+
});
|
|
126
|
+
$[6] = iconName;
|
|
127
|
+
$[7] = styles.actionIcon;
|
|
128
|
+
$[8] = t4;
|
|
129
|
+
} else {
|
|
130
|
+
t4 = $[8];
|
|
131
|
+
}
|
|
132
|
+
let t5;
|
|
133
|
+
if ($[9] !== styles.actionTitle || $[10] !== title) {
|
|
134
|
+
t5 = /*#__PURE__*/_jsx(Text, {
|
|
135
|
+
style: styles.actionTitle,
|
|
136
|
+
maxFontSizeMultiplier: MAX_FONT_SIZE_MULTIPLIER_LANDMARK,
|
|
137
|
+
children: title
|
|
138
|
+
});
|
|
139
|
+
$[9] = styles.actionTitle;
|
|
140
|
+
$[10] = title;
|
|
141
|
+
$[11] = t5;
|
|
142
|
+
} else {
|
|
143
|
+
t5 = $[11];
|
|
144
|
+
}
|
|
145
|
+
let t6;
|
|
146
|
+
if ($[12] !== disabled || $[13] !== onPress || $[14] !== t2 || $[15] !== t3 || $[16] !== t4 || $[17] !== t5) {
|
|
147
|
+
t6 = /*#__PURE__*/_jsxs(Pressable, {
|
|
148
|
+
onPress: onPress,
|
|
149
|
+
disabled: disabled,
|
|
150
|
+
accessibilityRole: "button",
|
|
151
|
+
accessibilityState: t2,
|
|
152
|
+
style: t3,
|
|
153
|
+
children: [t4, t5]
|
|
154
|
+
});
|
|
155
|
+
$[12] = disabled;
|
|
156
|
+
$[13] = onPress;
|
|
157
|
+
$[14] = t2;
|
|
158
|
+
$[15] = t3;
|
|
159
|
+
$[16] = t4;
|
|
160
|
+
$[17] = t5;
|
|
161
|
+
$[18] = t6;
|
|
162
|
+
} else {
|
|
163
|
+
t6 = $[18];
|
|
164
|
+
}
|
|
165
|
+
return t6;
|
|
166
|
+
}
|
|
167
|
+
const useStyles = t0 => {
|
|
168
|
+
const $ = _c(5);
|
|
169
|
+
const {
|
|
170
|
+
disabled: t1
|
|
171
|
+
} = t0 === undefined ? {} : t0;
|
|
172
|
+
const disabled = t1 === undefined ? false : t1;
|
|
90
173
|
const {
|
|
91
174
|
bottom
|
|
92
175
|
} = useSafeAreaInsets();
|
|
93
176
|
const {
|
|
94
177
|
colors
|
|
95
178
|
} = useTheme();
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
179
|
+
const actionColor = disabled ? colors.textColorDefaultDisabled : colors.textColorDefaultPrimary;
|
|
180
|
+
let t2;
|
|
181
|
+
if ($[0] !== actionColor || $[1] !== bottom || $[2] !== colors.borderColorDefaultDim || $[3] !== colors.surfaceColor090) {
|
|
182
|
+
t2 = StyleSheet.create({
|
|
99
183
|
container: {
|
|
100
184
|
flexDirection: "row",
|
|
101
|
-
flexWrap: "wrap",
|
|
102
|
-
gap: 8,
|
|
103
185
|
backgroundColor: colors.surfaceColor090,
|
|
104
186
|
paddingHorizontal: 16,
|
|
105
|
-
paddingTop:
|
|
106
|
-
paddingBottom: bottom +
|
|
187
|
+
paddingTop: 12,
|
|
188
|
+
paddingBottom: bottom + 12,
|
|
107
189
|
borderTopWidth: 1,
|
|
108
190
|
borderTopColor: colors.borderColorDefaultDim
|
|
109
191
|
},
|
|
110
|
-
|
|
111
|
-
|
|
192
|
+
action: {
|
|
193
|
+
flex: 1,
|
|
194
|
+
alignItems: "center",
|
|
195
|
+
gap: 4
|
|
196
|
+
},
|
|
197
|
+
actionIcon: {
|
|
198
|
+
color: actionColor
|
|
199
|
+
},
|
|
200
|
+
actionTitle: {
|
|
201
|
+
color: actionColor,
|
|
202
|
+
fontWeight: "600"
|
|
112
203
|
}
|
|
113
204
|
});
|
|
114
|
-
$[0] =
|
|
115
|
-
$[1] =
|
|
116
|
-
$[2] = colors.
|
|
117
|
-
$[3] =
|
|
205
|
+
$[0] = actionColor;
|
|
206
|
+
$[1] = bottom;
|
|
207
|
+
$[2] = colors.borderColorDefaultDim;
|
|
208
|
+
$[3] = colors.surfaceColor090;
|
|
209
|
+
$[4] = t2;
|
|
118
210
|
} else {
|
|
119
|
-
|
|
211
|
+
t2 = $[4];
|
|
120
212
|
}
|
|
121
|
-
return
|
|
213
|
+
return t2;
|
|
122
214
|
};
|
|
123
215
|
//# sourceMappingURL=bulk_conversation_actions_bar.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bulk_conversation_actions_bar.js","names":["React","useEffect","useState","StyleSheet","Animated","FadeIn","LayoutAnimationConfig","ReduceMotion","useSafeAreaInsets","useConversationsContext","useReduceMotion","useTheme","useBulkConversationActions","MAX_FONT_SIZE_MULTIPLIER_LANDMARK","isArchivedConversation","dismissToast","Button","jsx","_jsx","jsxs","_jsxs","BulkConversationActionsBar","styles","useStyles","reduceMotion","Always","Never","selectMode","selectedIds","conversations","hideable","clearSelection","args","show_hidden","hiddenView","hide","unhide","silence","markRead","pending","setPending","selected","filter","id","includes","disabled","length","canSilence","some","canHide","run","action","skipEntering","children","View","entering","duration","style","container","testID","variant","size","title","iconNameLeft","onPress","button","maxFontSizeMultiplier","$","_c","bottom","colors","t0","borderColorDefaultDim","surfaceColor090","create","flexDirection","flexWrap","gap","backgroundColor","paddingHorizontal","paddingTop","paddingBottom","borderTopWidth","borderTopColor","flexGrow"],"sources":["../../../src/components/conversations/bulk_conversation_actions_bar.tsx"],"sourcesContent":["import React, { useEffect, useState } from 'react'\nimport { StyleSheet } from 'react-native'\nimport Animated, { FadeIn, LayoutAnimationConfig, ReduceMotion } from 'react-native-reanimated'\nimport { useSafeAreaInsets } from 'react-native-safe-area-context'\nimport { useConversationsContext } from '../../contexts/conversations_context'\nimport { useReduceMotion, useTheme } from '../../hooks'\nimport { useBulkConversationActions } from '../../hooks/use_bulk_conversation_actions'\nimport { ConversationResource } from '../../types'\nimport { MAX_FONT_SIZE_MULTIPLIER_LANDMARK, isArchivedConversation } from '../../utils'\nimport { dismissToast } from '../../utils/toast_store'\nimport { Button } from '../display'\n\nexport function BulkConversationActionsBar() {\n const styles = useStyles()\n const reduceMotion = useReduceMotion() ? ReduceMotion.Always : ReduceMotion.Never\n const {\n selectMode,\n selectedIds,\n conversations,\n hideable,\n clearSelection,\n args: { show_hidden: hiddenView = false },\n } = useConversationsContext()\n const { hide, unhide, silence, markRead } = useBulkConversationActions()\n const [pending, setPending] = useState(false)\n\n const selected = conversations.filter(({ id }) => selectedIds.includes(id))\n const disabled = pending || selected.length === 0\n const canSilence = !disabled && !selected.some(isArchivedConversation)\n const canHide = canSilence && hideable\n\n const run = (action: (_conversations: ConversationResource[]) => Promise<void>) => async () => {\n setPending(true)\n try {\n await action(selected)\n } finally {\n setPending(false)\n clearSelection()\n }\n }\n\n useEffect(() => {\n if (selectMode) dismissToast()\n }, [selectMode])\n\n return (\n <LayoutAnimationConfig skipEntering>\n {selectMode && (\n <Animated.View\n entering={FadeIn.duration(300).reduceMotion(reduceMotion)}\n style={styles.container}\n testID=\"bulk-conversation-actions-bar\"\n >\n <Button\n variant=\"outline\"\n size=\"lg\"\n title={hiddenView ? 'Unhide' : 'Hide'}\n iconNameLeft={hiddenView ? 'general.showEye' : 'general.hideEye'}\n disabled={!canHide}\n onPress={run(hiddenView ? unhide : hide)}\n style={styles.button}\n maxFontSizeMultiplier={MAX_FONT_SIZE_MULTIPLIER_LANDMARK}\n />\n <Button\n variant=\"outline\"\n size=\"lg\"\n title=\"Silence\"\n iconNameLeft=\"general.bellMuted\"\n disabled={!canSilence}\n onPress={run(silence)}\n style={styles.button}\n maxFontSizeMultiplier={MAX_FONT_SIZE_MULTIPLIER_LANDMARK}\n />\n <Button\n variant=\"outline\"\n size=\"lg\"\n title=\"Mark read\"\n iconNameLeft=\"general.outlinedTextMessage\"\n disabled={disabled}\n onPress={run(markRead)}\n style={styles.button}\n maxFontSizeMultiplier={MAX_FONT_SIZE_MULTIPLIER_LANDMARK}\n />\n </Animated.View>\n )}\n </LayoutAnimationConfig>\n )\n}\n\nconst useStyles = () => {\n const { bottom } = useSafeAreaInsets()\n const { colors } = useTheme()\n const containerVerticalPadding = 16\n\n return StyleSheet.create({\n container: {\n flexDirection: 'row',\n flexWrap: 'wrap',\n gap: 8,\n backgroundColor: colors.surfaceColor090,\n paddingHorizontal: 16,\n paddingTop: containerVerticalPadding,\n paddingBottom: bottom + containerVerticalPadding,\n borderTopWidth: 1,\n borderTopColor: colors.borderColorDefaultDim,\n },\n button: {\n flexGrow: 1,\n },\n })\n}\n"],"mappings":";AAAA,OAAOA,KAAK,IAAIC,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AAClD,SAASC,UAAU,QAAQ,cAAc;AACzC,OAAOC,QAAQ,IAAIC,MAAM,EAAEC,qBAAqB,EAAEC,YAAY,QAAQ,yBAAyB;AAC/F,SAASC,iBAAiB,QAAQ,gCAAgC;AAClE,SAASC,uBAAuB,QAAQ,sCA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|
|
1
|
+
{"version":3,"file":"bulk_conversation_actions_bar.js","names":["React","useEffect","useState","Pressable","StyleSheet","Animated","FadeIn","LayoutAnimationConfig","ReduceMotion","useSafeAreaInsets","useConversationsContext","useReduceMotion","useTheme","useBulkConversationActions","MAX_FONT_SIZE_MULTIPLIER_LANDMARK","isArchivedConversation","platformPressedOpacityStyle","dismissToast","Icon","Text","jsx","_jsx","jsxs","_jsxs","BulkConversationActionsBar","styles","useStyles","reduceMotion","Always","Never","selectMode","selectedIds","conversations","hideable","clearSelection","args","show_hidden","hiddenView","hide","unhide","silence","markRead","pending","setPending","selected","filter","id","includes","disabled","length","canSilence","some","canHide","run","action","skipEntering","children","View","entering","duration","style","container","testID","BulkAction","title","iconName","onPress","t0","$","_c","t1","t2","t3","t4","pressed","actionIcon","size","accessibilityElementsHidden","t5","actionTitle","t6","accessibilityRole","accessibilityState","undefined","bottom","colors","actionColor","textColorDefaultDisabled","textColorDefaultPrimary","borderColorDefaultDim","surfaceColor090","create","flexDirection","backgroundColor","paddingHorizontal","paddingTop","paddingBottom","borderTopWidth","borderTopColor","flex","alignItems","gap","color","fontWeight"],"sources":["../../../src/components/conversations/bulk_conversation_actions_bar.tsx"],"sourcesContent":["import React, { useEffect, useState } from 'react'\nimport { Pressable, StyleSheet } from 'react-native'\nimport Animated, { FadeIn, LayoutAnimationConfig, ReduceMotion } from 'react-native-reanimated'\nimport { useSafeAreaInsets } from 'react-native-safe-area-context'\nimport { useConversationsContext } from '../../contexts/conversations_context'\nimport { useReduceMotion, useTheme } from '../../hooks'\nimport { useBulkConversationActions } from '../../hooks/use_bulk_conversation_actions'\nimport { ConversationResource } from '../../types'\nimport {\n MAX_FONT_SIZE_MULTIPLIER_LANDMARK,\n isArchivedConversation,\n platformPressedOpacityStyle,\n} from '../../utils'\nimport { dismissToast } from '../../utils/toast_store'\nimport { Icon, IconString, Text } from '../display'\n\nexport function BulkConversationActionsBar() {\n const styles = useStyles()\n const reduceMotion = useReduceMotion() ? ReduceMotion.Always : ReduceMotion.Never\n const {\n selectMode,\n selectedIds,\n conversations,\n hideable,\n clearSelection,\n args: { show_hidden: hiddenView = false },\n } = useConversationsContext()\n const { hide, unhide, silence, markRead } = useBulkConversationActions()\n const [pending, setPending] = useState(false)\n\n const selected = conversations.filter(({ id }) => selectedIds.includes(id))\n const disabled = pending || selected.length === 0\n const canSilence = !disabled && !selected.some(isArchivedConversation)\n const canHide = canSilence && hideable\n\n const run = (action: (_conversations: ConversationResource[]) => Promise<void>) => async () => {\n setPending(true)\n try {\n await action(selected)\n } finally {\n setPending(false)\n clearSelection()\n }\n }\n\n useEffect(() => {\n if (selectMode) dismissToast()\n }, [selectMode])\n\n return (\n <LayoutAnimationConfig skipEntering>\n {selectMode && (\n <Animated.View\n entering={FadeIn.duration(300).reduceMotion(reduceMotion)}\n style={styles.container}\n testID=\"bulk-conversation-actions-bar\"\n >\n <BulkAction\n title=\"Mark read\"\n iconName=\"general.check\"\n disabled={disabled}\n onPress={run(markRead)}\n />\n <BulkAction\n title=\"Silence\"\n iconName=\"general.bellMuted\"\n disabled={!canSilence}\n onPress={run(silence)}\n />\n <BulkAction\n title={hiddenView ? 'Unhide' : 'Hide'}\n iconName={hiddenView ? 'general.showEye' : 'general.hideEye'}\n disabled={!canHide}\n onPress={run(hiddenView ? unhide : hide)}\n />\n </Animated.View>\n )}\n </LayoutAnimationConfig>\n )\n}\n\nfunction BulkAction({\n title,\n iconName,\n disabled,\n onPress,\n}: {\n title: string\n iconName: IconString\n disabled: boolean\n onPress: () => void\n}) {\n const styles = useStyles({ disabled })\n\n return (\n <Pressable\n onPress={onPress}\n disabled={disabled}\n accessibilityRole=\"button\"\n accessibilityState={{ disabled }}\n style={({ pressed }) => [styles.action, pressed && platformPressedOpacityStyle]}\n >\n <Icon name={iconName} size={20} style={styles.actionIcon} accessibilityElementsHidden />\n <Text style={styles.actionTitle} maxFontSizeMultiplier={MAX_FONT_SIZE_MULTIPLIER_LANDMARK}>\n {title}\n </Text>\n </Pressable>\n )\n}\n\nconst useStyles = ({ disabled = false }: { disabled?: boolean } = {}) => {\n const { bottom } = useSafeAreaInsets()\n const { colors } = useTheme()\n const containerVerticalPadding = 12\n const actionColor = disabled ? colors.textColorDefaultDisabled : colors.textColorDefaultPrimary\n\n return StyleSheet.create({\n container: {\n flexDirection: 'row',\n backgroundColor: colors.surfaceColor090,\n paddingHorizontal: 16,\n paddingTop: containerVerticalPadding,\n paddingBottom: bottom + containerVerticalPadding,\n borderTopWidth: 1,\n borderTopColor: colors.borderColorDefaultDim,\n },\n action: {\n flex: 1,\n alignItems: 'center',\n gap: 4,\n },\n actionIcon: {\n color: actionColor,\n },\n actionTitle: {\n color: actionColor,\n fontWeight: '600',\n },\n })\n}\n"],"mappings":";AAAA,OAAOA,KAAK,IAAIC,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AAClD,SAASC,SAAS,EAAEC,UAAU,QAAQ,cAAc;AACpD,OAAOC,QAAQ,IAAIC,MAAM,EAAEC,qBAAqB,EAAEC,YAAY,QAAQ,yBAAyB;AAC/F,SAASC,iBAAiB,QAAQ,gCAAgC;AAClE,SAASC,uBAAuB,QAAQ,sCAAsC;AAC9E,SAASC,eAAe,EAAEC,QAAQ,QAAQ,aAAa;AACvD,SAASC,0BAA0B,QAAQ,2CAA2C;AAEtF,SACEC,iCAAiC,EACjCC,sBAAsB,EACtBC,2BAA2B,QACtB,aAAa;AACpB,SAASC,YAAY,QAAQ,yBAAyB;AACtD,SAASC,IAAI,EAAcC,IAAI,QAAQ,YAAY;AAAA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAEnD,OAAO,SAASC,0BAA0BA,CAAA,EAAG;EAC3C,MAAMC,MAAM,GAAGC,SAAS,CAAC,CAAC;EAC1B,MAAMC,YAAY,GAAGhB,eAAe,CAAC,CAAC,GAAGH,YAAY,CAACoB,MAAM,GAAGpB,YAAY,CAACqB,KAAK;EACjF,MAAM;IACJC,UAAU;IACVC,WAAW;IACX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,CAAAuF,MAAO,CAAC;MAAA9B,SAAA,EACZ;QAAA+B,aAAA,EACM,KAAK;QAAAC,eAAA,EACHR,MAAM,CAAAK,eAAgB;QAAAI,iBAAA,EACpB,EAAE;QAAAC,UAAA,EAPQ,EAAE;QAAAC,aAAA,EAShBZ,MAAM,GATQ,EASmB;QAAAa,cAAA,EAChC,CAAC;QAAAC,cAAA,EACDb,MAAM,CAAAI;MACxB,CAAC;MAAAnC,MAAA,EACO;QAAA6C,IAAA,EACA,CAAC;QAAAC,UAAA,EACK,QAAQ;QAAAC,GAAA,EACf;MACP,CAAC;MAAA1B,UAAA,EACW;QAAA2B,KAAA,EACHhB;MACT,CAAC;MAAAP,WAAA,EACY;QAAAuB,KAAA,EACJhB,WAAW;QAAAiB,UAAA,EACN;MACd;IACF,CAAC,CAAC;IAAAnC,CAAA,MAAAkB,WAAA;IAAAlB,CAAA,MAAAgB,MAAA;IAAAhB,CAAA,MAAAiB,MAAA,CAAAI,qBAAA;IAAArB,CAAA,MAAAiB,MAAA,CAAAK,eAAA;IAAAtB,CAAA,MAAAG,EAAA;EAAA;IAAAA,EAAA,GAAAH,CAAA;EAAA;EAAA,OAtBKG,EAsBL;AAAA,CACH","ignoreList":[]}
|
|
@@ -14,7 +14,7 @@ import { tokens } from '../../vendor/tapestry/tokens';
|
|
|
14
14
|
import { SwipeableToggleButton } from './swipeable_toggle_button';
|
|
15
15
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
16
16
|
export function ConversationActions(t0) {
|
|
17
|
-
const $ = _c(
|
|
17
|
+
const $ = _c(102);
|
|
18
18
|
const {
|
|
19
19
|
children,
|
|
20
20
|
conversation,
|
|
@@ -183,90 +183,94 @@ export function ConversationActions(t0) {
|
|
|
183
183
|
}
|
|
184
184
|
const handleHide = t12;
|
|
185
185
|
let t13;
|
|
186
|
-
if ($[28] !== conversation.id || $[29] !== disabled || $[30] !== navigation) {
|
|
186
|
+
if ($[28] !== conversation.id || $[29] !== disabled || $[30] !== muted || $[31] !== navigation || $[32] !== read) {
|
|
187
187
|
t13 = () => {
|
|
188
188
|
if (disabled) {
|
|
189
189
|
return;
|
|
190
190
|
}
|
|
191
191
|
Haptic.impactLight();
|
|
192
192
|
navigation.navigate("ConversationActions", {
|
|
193
|
-
conversation_id: conversation.id
|
|
193
|
+
conversation_id: conversation.id,
|
|
194
|
+
read,
|
|
195
|
+
muted
|
|
194
196
|
});
|
|
195
197
|
};
|
|
196
198
|
$[28] = conversation.id;
|
|
197
199
|
$[29] = disabled;
|
|
198
|
-
$[30] =
|
|
199
|
-
$[31] =
|
|
200
|
+
$[30] = muted;
|
|
201
|
+
$[31] = navigation;
|
|
202
|
+
$[32] = read;
|
|
203
|
+
$[33] = t13;
|
|
200
204
|
} else {
|
|
201
|
-
t13 = $[
|
|
205
|
+
t13 = $[33];
|
|
202
206
|
}
|
|
203
207
|
const handleLongPress = t13;
|
|
204
208
|
let t14;
|
|
205
|
-
if ($[
|
|
209
|
+
if ($[34] !== markRead || $[35] !== read) {
|
|
206
210
|
t14 = () => {
|
|
207
211
|
markRead(!read);
|
|
208
212
|
handleSwipeableClose();
|
|
209
213
|
};
|
|
210
|
-
$[
|
|
211
|
-
$[
|
|
212
|
-
$[
|
|
214
|
+
$[34] = markRead;
|
|
215
|
+
$[35] = read;
|
|
216
|
+
$[36] = t14;
|
|
213
217
|
} else {
|
|
214
|
-
t14 = $[
|
|
218
|
+
t14 = $[36];
|
|
215
219
|
}
|
|
216
220
|
const handleLatestMessageUnread = t14;
|
|
217
221
|
let t15;
|
|
218
|
-
if ($[
|
|
222
|
+
if ($[37] !== isConversationEmpty || $[38] !== read) {
|
|
219
223
|
t15 = !isConversationEmpty ? [{
|
|
220
224
|
name: read ? "markUnread" : "markRead",
|
|
221
225
|
label: read ? "Mark unread" : "Mark read"
|
|
222
226
|
}] : [];
|
|
223
|
-
$[
|
|
224
|
-
$[
|
|
225
|
-
$[
|
|
227
|
+
$[37] = isConversationEmpty;
|
|
228
|
+
$[38] = read;
|
|
229
|
+
$[39] = t15;
|
|
226
230
|
} else {
|
|
227
|
-
t15 = $[
|
|
231
|
+
t15 = $[39];
|
|
228
232
|
}
|
|
229
233
|
const readAccessibilityAction = t15;
|
|
230
234
|
let t16;
|
|
231
|
-
if ($[
|
|
235
|
+
if ($[40] !== canMute || $[41] !== muted) {
|
|
232
236
|
t16 = canMute ? [{
|
|
233
237
|
name: muted ? "unmute" : "mute",
|
|
234
238
|
label: muted ? "Enable" : "Silence"
|
|
235
239
|
}] : [];
|
|
236
|
-
$[
|
|
237
|
-
$[
|
|
238
|
-
$[
|
|
240
|
+
$[40] = canMute;
|
|
241
|
+
$[41] = muted;
|
|
242
|
+
$[42] = t16;
|
|
239
243
|
} else {
|
|
240
|
-
t16 = $[
|
|
244
|
+
t16 = $[42];
|
|
241
245
|
}
|
|
242
246
|
const muteAccessibilityAction = t16;
|
|
243
247
|
let t17;
|
|
244
|
-
if ($[
|
|
248
|
+
if ($[43] !== canHide || $[44] !== hidden) {
|
|
245
249
|
t17 = canHide ? [{
|
|
246
250
|
name: hidden ? "unhide" : "hide",
|
|
247
251
|
label: hidden ? "Unhide" : "Hide"
|
|
248
252
|
}] : [];
|
|
249
|
-
$[
|
|
250
|
-
$[
|
|
251
|
-
$[
|
|
253
|
+
$[43] = canHide;
|
|
254
|
+
$[44] = hidden;
|
|
255
|
+
$[45] = t17;
|
|
252
256
|
} else {
|
|
253
|
-
t17 = $[
|
|
257
|
+
t17 = $[45];
|
|
254
258
|
}
|
|
255
259
|
const hideAccessibilityAction = t17;
|
|
256
260
|
let t18;
|
|
257
|
-
if ($[
|
|
261
|
+
if ($[46] !== hideAccessibilityAction || $[47] !== muteAccessibilityAction || $[48] !== readAccessibilityAction || $[49] !== selectMode) {
|
|
258
262
|
t18 = selectMode ? [] : [...muteAccessibilityAction, ...hideAccessibilityAction, ...readAccessibilityAction];
|
|
259
|
-
$[
|
|
260
|
-
$[
|
|
261
|
-
$[
|
|
262
|
-
$[
|
|
263
|
-
$[
|
|
263
|
+
$[46] = hideAccessibilityAction;
|
|
264
|
+
$[47] = muteAccessibilityAction;
|
|
265
|
+
$[48] = readAccessibilityAction;
|
|
266
|
+
$[49] = selectMode;
|
|
267
|
+
$[50] = t18;
|
|
264
268
|
} else {
|
|
265
|
-
t18 = $[
|
|
269
|
+
t18 = $[50];
|
|
266
270
|
}
|
|
267
271
|
const accessibilityActions = t18;
|
|
268
272
|
let t19;
|
|
269
|
-
if ($[
|
|
273
|
+
if ($[51] !== handleHide || $[52] !== handleLatestMessageUnread || $[53] !== handleMute) {
|
|
270
274
|
t19 = event => {
|
|
271
275
|
bb86: switch (event.nativeEvent.actionName) {
|
|
272
276
|
case "markRead":
|
|
@@ -296,34 +300,34 @@ export function ConversationActions(t0) {
|
|
|
296
300
|
}
|
|
297
301
|
}
|
|
298
302
|
};
|
|
299
|
-
$[
|
|
300
|
-
$[
|
|
301
|
-
$[
|
|
302
|
-
$[
|
|
303
|
+
$[51] = handleHide;
|
|
304
|
+
$[52] = handleLatestMessageUnread;
|
|
305
|
+
$[53] = handleMute;
|
|
306
|
+
$[54] = t19;
|
|
303
307
|
} else {
|
|
304
|
-
t19 = $[
|
|
308
|
+
t19 = $[54];
|
|
305
309
|
}
|
|
306
310
|
const handleAccessibilityAction = t19;
|
|
307
311
|
let t20;
|
|
308
312
|
let t21;
|
|
309
|
-
if ($[
|
|
313
|
+
if ($[55] !== selectMode) {
|
|
310
314
|
t20 = () => {
|
|
311
315
|
if (selectMode) {
|
|
312
316
|
handleSwipeableClose();
|
|
313
317
|
}
|
|
314
318
|
};
|
|
315
319
|
t21 = [selectMode, handleSwipeableClose];
|
|
316
|
-
$[
|
|
317
|
-
$[
|
|
318
|
-
$[
|
|
320
|
+
$[55] = selectMode;
|
|
321
|
+
$[56] = t20;
|
|
322
|
+
$[57] = t21;
|
|
319
323
|
} else {
|
|
320
|
-
t20 = $[
|
|
321
|
-
t21 = $[
|
|
324
|
+
t20 = $[56];
|
|
325
|
+
t21 = $[57];
|
|
322
326
|
}
|
|
323
327
|
useEffect(t20, t21);
|
|
324
328
|
let t22;
|
|
325
329
|
let t23;
|
|
326
|
-
if ($[
|
|
330
|
+
if ($[58] !== activeConversationId || $[59] !== conversation.id) {
|
|
327
331
|
t22 = () => {
|
|
328
332
|
if (activeConversationId === conversation.id) {
|
|
329
333
|
return;
|
|
@@ -331,25 +335,25 @@ export function ConversationActions(t0) {
|
|
|
331
335
|
handleSwipeableClose();
|
|
332
336
|
};
|
|
333
337
|
t23 = [activeConversationId, conversation.id, handleSwipeableClose];
|
|
334
|
-
$[
|
|
335
|
-
$[
|
|
336
|
-
$[
|
|
337
|
-
$[
|
|
338
|
+
$[58] = activeConversationId;
|
|
339
|
+
$[59] = conversation.id;
|
|
340
|
+
$[60] = t22;
|
|
341
|
+
$[61] = t23;
|
|
338
342
|
} else {
|
|
339
|
-
t22 = $[
|
|
340
|
-
t23 = $[
|
|
343
|
+
t22 = $[60];
|
|
344
|
+
t23 = $[61];
|
|
341
345
|
}
|
|
342
346
|
useEffect(t22, t23);
|
|
343
347
|
const t24 = !selectMode;
|
|
344
348
|
let t25;
|
|
345
|
-
if ($[
|
|
349
|
+
if ($[62] === Symbol.for("react.memo_cache_sentinel")) {
|
|
346
350
|
t25 = () => setDisabled(false);
|
|
347
|
-
$[
|
|
351
|
+
$[62] = t25;
|
|
348
352
|
} else {
|
|
349
|
-
t25 = $[
|
|
353
|
+
t25 = $[62];
|
|
350
354
|
}
|
|
351
355
|
let t26;
|
|
352
|
-
if ($[
|
|
356
|
+
if ($[63] !== canHide || $[64] !== canMute || $[65] !== handleHide || $[66] !== handleLatestMessageUnread || $[67] !== handleMute || $[68] !== hidden || $[69] !== isConversationEmpty || $[70] !== isHiddenPending || $[71] !== isMarkReadPending || $[72] !== isMutedPending || $[73] !== muted || $[74] !== read) {
|
|
353
357
|
t26 = () => /*#__PURE__*/_jsx(LeftActions, {
|
|
354
358
|
isConversationEmpty: isConversationEmpty,
|
|
355
359
|
canMute: canMute,
|
|
@@ -364,63 +368,63 @@ export function ConversationActions(t0) {
|
|
|
364
368
|
isHiddenPending: isHiddenPending,
|
|
365
369
|
isMarkReadPending: isMarkReadPending
|
|
366
370
|
});
|
|
367
|
-
$[
|
|
368
|
-
$[
|
|
369
|
-
$[
|
|
370
|
-
$[
|
|
371
|
-
$[
|
|
372
|
-
$[
|
|
373
|
-
$[
|
|
374
|
-
$[
|
|
375
|
-
$[
|
|
376
|
-
$[
|
|
377
|
-
$[
|
|
378
|
-
$[
|
|
379
|
-
$[
|
|
380
|
-
} else {
|
|
381
|
-
t26 = $[
|
|
371
|
+
$[63] = canHide;
|
|
372
|
+
$[64] = canMute;
|
|
373
|
+
$[65] = handleHide;
|
|
374
|
+
$[66] = handleLatestMessageUnread;
|
|
375
|
+
$[67] = handleMute;
|
|
376
|
+
$[68] = hidden;
|
|
377
|
+
$[69] = isConversationEmpty;
|
|
378
|
+
$[70] = isHiddenPending;
|
|
379
|
+
$[71] = isMarkReadPending;
|
|
380
|
+
$[72] = isMutedPending;
|
|
381
|
+
$[73] = muted;
|
|
382
|
+
$[74] = read;
|
|
383
|
+
$[75] = t26;
|
|
384
|
+
} else {
|
|
385
|
+
t26 = $[75];
|
|
382
386
|
}
|
|
383
387
|
const t27 = `conversation-${conversation.id}`;
|
|
384
388
|
const t28 = canOpenActions ? handleLongPress : undefined;
|
|
385
389
|
let t29;
|
|
386
|
-
if ($[
|
|
390
|
+
if ($[76] !== style) {
|
|
387
391
|
t29 = t30 => {
|
|
388
392
|
const {
|
|
389
393
|
pressed
|
|
390
394
|
} = t30;
|
|
391
395
|
return [style, pressed && platformPressedOpacityStyle];
|
|
392
396
|
};
|
|
393
|
-
$[
|
|
394
|
-
$[
|
|
397
|
+
$[76] = style;
|
|
398
|
+
$[77] = t29;
|
|
395
399
|
} else {
|
|
396
|
-
t29 = $[
|
|
400
|
+
t29 = $[77];
|
|
397
401
|
}
|
|
398
402
|
let t30;
|
|
399
|
-
if ($[
|
|
403
|
+
if ($[78] !== androidRippleColor) {
|
|
400
404
|
t30 = {
|
|
401
405
|
color: androidRippleColor,
|
|
402
406
|
borderless: false,
|
|
403
407
|
foreground: true
|
|
404
408
|
};
|
|
405
|
-
$[
|
|
406
|
-
$[
|
|
409
|
+
$[78] = androidRippleColor;
|
|
410
|
+
$[79] = t30;
|
|
407
411
|
} else {
|
|
408
|
-
t30 = $[
|
|
412
|
+
t30 = $[79];
|
|
409
413
|
}
|
|
410
414
|
const t31 = selectMode ? "checkbox" : "button";
|
|
411
415
|
let t32;
|
|
412
|
-
if ($[
|
|
416
|
+
if ($[80] !== selectMode || $[81] !== selected) {
|
|
413
417
|
t32 = selectMode ? {
|
|
414
418
|
checked: selected
|
|
415
419
|
} : undefined;
|
|
416
|
-
$[
|
|
417
|
-
$[
|
|
418
|
-
$[
|
|
420
|
+
$[80] = selectMode;
|
|
421
|
+
$[81] = selected;
|
|
422
|
+
$[82] = t32;
|
|
419
423
|
} else {
|
|
420
|
-
t32 = $[
|
|
424
|
+
t32 = $[82];
|
|
421
425
|
}
|
|
422
426
|
let t33;
|
|
423
|
-
if ($[
|
|
427
|
+
if ($[83] !== accessibilityActions || $[84] !== accessibilityLabel || $[85] !== children || $[86] !== handleAccessibilityAction || $[87] !== handlePress || $[88] !== t27 || $[89] !== t28 || $[90] !== t29 || $[91] !== t30 || $[92] !== t31 || $[93] !== t32) {
|
|
424
428
|
t33 = /*#__PURE__*/_jsx(Pressable, {
|
|
425
429
|
testID: t27,
|
|
426
430
|
onPress: handlePress,
|
|
@@ -434,23 +438,23 @@ export function ConversationActions(t0) {
|
|
|
434
438
|
onAccessibilityAction: handleAccessibilityAction,
|
|
435
439
|
children: children
|
|
436
440
|
});
|
|
437
|
-
$[
|
|
438
|
-
$[
|
|
439
|
-
$[
|
|
440
|
-
$[
|
|
441
|
-
$[
|
|
442
|
-
$[
|
|
443
|
-
$[
|
|
444
|
-
$[
|
|
445
|
-
$[
|
|
446
|
-
$[
|
|
447
|
-
$[
|
|
448
|
-
$[
|
|
449
|
-
} else {
|
|
450
|
-
t33 = $[
|
|
441
|
+
$[83] = accessibilityActions;
|
|
442
|
+
$[84] = accessibilityLabel;
|
|
443
|
+
$[85] = children;
|
|
444
|
+
$[86] = handleAccessibilityAction;
|
|
445
|
+
$[87] = handlePress;
|
|
446
|
+
$[88] = t27;
|
|
447
|
+
$[89] = t28;
|
|
448
|
+
$[90] = t29;
|
|
449
|
+
$[91] = t30;
|
|
450
|
+
$[92] = t31;
|
|
451
|
+
$[93] = t32;
|
|
452
|
+
$[94] = t33;
|
|
453
|
+
} else {
|
|
454
|
+
t33 = $[94];
|
|
451
455
|
}
|
|
452
456
|
let t34;
|
|
453
|
-
if ($[
|
|
457
|
+
if ($[95] !== handleSwipeableOpen || $[96] !== styles.swipeableChildContainer || $[97] !== styles.swipeableContainer || $[98] !== t24 || $[99] !== t26 || $[100] !== t33) {
|
|
454
458
|
t34 = /*#__PURE__*/_jsx(ReanimatedSwipeable, {
|
|
455
459
|
ref: swipeableRef,
|
|
456
460
|
enabled: t24,
|
|
@@ -465,15 +469,15 @@ export function ConversationActions(t0) {
|
|
|
465
469
|
renderLeftActions: t26,
|
|
466
470
|
children: t33
|
|
467
471
|
});
|
|
468
|
-
$[
|
|
469
|
-
$[
|
|
470
|
-
$[
|
|
471
|
-
$[
|
|
472
|
-
$[
|
|
473
|
-
$[
|
|
474
|
-
$[
|
|
475
|
-
} else {
|
|
476
|
-
t34 = $[
|
|
472
|
+
$[95] = handleSwipeableOpen;
|
|
473
|
+
$[96] = styles.swipeableChildContainer;
|
|
474
|
+
$[97] = styles.swipeableContainer;
|
|
475
|
+
$[98] = t24;
|
|
476
|
+
$[99] = t26;
|
|
477
|
+
$[100] = t33;
|
|
478
|
+
$[101] = t34;
|
|
479
|
+
} else {
|
|
480
|
+
t34 = $[101];
|
|
477
481
|
}
|
|
478
482
|
return t34;
|
|
479
483
|
}
|