Initial commit
This commit is contained in:
commit
af3b49f756
16065 files changed
+2938410
No files matched your search
+52
@@ -0,0 +1,52 @@
|
||||
/* Metro module 11443; source: modules/interaction_components/native/components/ChannelSelectComponentActionSheet.tsx; dependencies: [31, 1379, 1867, 33, 8362, 11440, 11438, 8364, 1305, 9122, 2] */
|
||||
function _fun87594(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#87594, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11629:6, offset: 0x01fc4bf2, size: 174 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
|
||||
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
|
||||
const env0_6 = (require(33) /* metro dependency 33 */).jsx;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/interaction_components/native/components/ChannelSelectComponentActionSheet.tsx');
|
||||
exports.default = _default_87595;
|
||||
}
|
||||
|
||||
function _default_87595({selectionActionComponent, labelComponent, channelId, guildId, containerId, onSubmit, allowEmpty}) { // fn#87595, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11629:149, offset: 0x01fc4ca0, size: 307 bytes, params: 2, frame: 25
|
||||
const value3 = (importDefault(11440) /* metro dependency 11440: useSearchableSelectComponent */)({selectActionComponent: selectionActionComponent,
|
||||
containerId: containerId, guildId: guildId, queryOptions: env0_3.useCallback(_fun87596, [channelId,
|
||||
selectionActionComponent.channelTypes]), onSubmit: onSubmit});
|
||||
const options = value3.options;
|
||||
const selectedOptions = value3.selectedOptions;
|
||||
const isSelected = value3.isSelected;
|
||||
const onPressOptionItem = value3.onPressOptionItem;
|
||||
var env0_3 = value3.submitSelection;
|
||||
return ((Component) => <Component onPressOptionItem={onPressOptionItem} renderIcon={renderIcon} selectionActionComponent={selectionActionComponent} labelComponent={labelComponent} options={options} selectedCount={selectedOptions.length} selectedOptions={selectedOptions} isSelected={isSelected} submitSelection={function() {
|
||||
return submitSelection();
|
||||
}} onQueryChange={value3.setQuery} itemAccessibilityLabel={itemAccessibilityLabel} channelId={channelId} allowEmpty={allowEmpty} />)(importDefault(11438) /* metro dependency 11438: SelectComponentActionSheet */);
|
||||
}
|
||||
|
||||
function _fun87596(a0) { // fn#87596, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11629:297, offset: 0x01fc4dd3, size: 54 bytes, params: 2, frame: 15
|
||||
let value = environment.__proto__;
|
||||
value = require(8362) /* metro dependency 8362: SearchableSelectActionComponentUtils */;
|
||||
return value.queryChannels(a0, channelId, channelTypes);
|
||||
}
|
||||
|
||||
function _default_87595RenderIcon(a0) { // fn#87597, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11629:575, owner: _default_87595.renderIcon, offset: 0x01fc4e09, size: 139 bytes, params: 2, frame: 17
|
||||
const value = environment.__proto__;
|
||||
const channel = ChannelStore.getChannel(a0.value);
|
||||
if (channel == null) {
|
||||
return null;
|
||||
}
|
||||
const getGuild = GuildStore.getGuild;
|
||||
const channelIconData = (require(8364) /* metro dependency 8364: NativeSearchableSelectActionComponentUtils */).getChannelIconData(channel,
|
||||
Reflect.apply(getGuild, GuildStore, [guildId]));
|
||||
return channelIconData != null && ((Icon) => <Icon source={channelIconData} />)((require(1305) /* metro dependency 1305: native */).Icon);
|
||||
}
|
||||
|
||||
function _default_87595ItemAccessibilityLabel({value}) { // fn#87599, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11629:899, owner: _default_87595.itemAccessibilityLabel, offset: 0x01fc4e94, size: 70 bytes, params: 2, frame: 12
|
||||
const channel = ChannelStore.getChannel(environment.__proto__);
|
||||
if (channel != null) {
|
||||
return (importDefault(9122) /* metro dependency 9122: getChannelA11yLabel */)({channel: channel});
|
||||
}
|
||||
}
|
||||
|
||||
+151
@@ -0,0 +1,151 @@
|
||||
/* Metro module 13237; source: modules/interaction_components/native/components/GuildSelectComponentActionSheet.tsx; dependencies: [57, 31, 27, 1867, 4896, 33, 4501, 4633, 1244, 4080, 11438, 6819, 4617, 1305, 4573, 6526, 2] */
|
||||
function _fun100949(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#100949, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13427:6, offset: 0x02201d0b, size: 291 bytes, params: 8, frame: 22
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(57) /* metro dependency 57 */;
|
||||
const env0_4 = importAll(31) /* metro dependency 31 */;
|
||||
const env0_5 = (require(27) /* metro dependency 27 */).View;
|
||||
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
|
||||
const sortedGuildStore = importDefault(4896) /* metro dependency 4896: SortedGuildStore */;
|
||||
const value = require(33) /* metro dependency 33 */;
|
||||
const env0_8 = value.jsx;
|
||||
const env0_9 = value.jsxs;
|
||||
const env0_10 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({guildIdentity: {'flexDirection': 'row',
|
||||
'alignItems': 'center'}, iconContainer: {marginRight: 16}, avatar: {marginRight: 4}});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/interaction_components/native/components/GuildSelectComponentActionSheet.tsx');
|
||||
exports.default = _default_100950;
|
||||
}
|
||||
|
||||
function _default_100950({selectedGuild, onSelectGuild, user}) { // fn#100950, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13427:327, offset: 0x02201e2e, size: 536 bytes, params: 2, frame: 25
|
||||
var object2;
|
||||
const styles = useStyles();
|
||||
let binding = env0_4;
|
||||
let useState = binding.useState;
|
||||
const value2 = Reflect.apply(useState, binding, ['']);
|
||||
const binding2 = env0_3;
|
||||
const value3 = binding2(value2, 2);
|
||||
const property = value3[0];
|
||||
const property2 = value3[1];
|
||||
const SelectOptionType = (require(4633) /* metro dependency 4633: InteractionComponentTypes */).SelectOptionType;
|
||||
const GUILD = SelectOptionType.GUILD;
|
||||
useState = binding.useState;
|
||||
const value4 = binding2(Reflect.apply(useState, binding, [{type: GUILD, value: selectedGuild.id,
|
||||
label: selectedGuild.name, guild: selectedGuild}]), 2);
|
||||
const property3 = value4[0];
|
||||
var env0_4 = property3;
|
||||
const env0_5 = value4[1];
|
||||
const r7 = property3 != null ? [property3] : [];
|
||||
object2 = {'maxValues': 1, 'minValues': 1};
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
object2.placeholder = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['ZImm/x']);
|
||||
binding = env0_4;
|
||||
return ((Component) => <Component onPressOptionItem={onPressOptionItem} onRemoveOptionItem={onRemoveOptionItem} renderIcon={renderIcon} renderHeaderIcon={renderHeaderIcon} iconContainerStyle={styles.iconContainer} renderDescription={renderDescription_100962} selectionActionComponent={object2} options={binding.useMemo(_fun100956,
|
||||
[property, binding.useCallback(function(a0) {
|
||||
return _fun100952(a0);
|
||||
},
|
||||
[])])} selectedCount={r7.length} selectedOptions={r7} isSelected={isSelected} submitSelection={submitSelection} onQueryChange={property2} itemAccessibilityLabel={function(a0) {
|
||||
return a0.label;
|
||||
}} allowEmpty={false} expanded />)(importDefault(11438) /* metro dependency 11438: SelectComponentActionSheet */);
|
||||
}
|
||||
|
||||
function _fun100951(a0) { // fn#100951, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13427:648, offset: 0x02202046, size: 21 bytes, params: 2, frame: 11
|
||||
return queryGuilds_100952(a0);
|
||||
}
|
||||
|
||||
function _default_100950SubmitSelection() { // fn#100957, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13427:1121, owner: _default_100950.submitSelection, offset: 0x0220218d, size: 37 bytes, params: 1, frame: 11
|
||||
const value = environment.__proto__;
|
||||
return (importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
|
||||
}
|
||||
|
||||
function _default_100950OnPressOptionItem(a0, a1) { // fn#100958, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13427:1188, owner: _default_100950.onPressOptionItem, offset: 0x022021b2, size: 41 bytes, params: 3, frame: 13
|
||||
onSelectGuild(a1.guild);
|
||||
env0_5(a1);
|
||||
submitSelection();
|
||||
}
|
||||
|
||||
function _default_100950RenderIcon(a0) { // fn#100960, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13427:1275, owner: _default_100950.renderIcon, offset: 0x022021db, size: 51 bytes, params: 2, frame: 14
|
||||
const value = environment.__proto__;
|
||||
return ((Component) => <Component guild={a0.guild} />)(importDefault(6819) /* metro dependency 6819: GuildIcon */);
|
||||
}
|
||||
|
||||
function _default_100950RenderHeaderIcon(a0) { // fn#100961, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13427:1323, owner: _default_100950.renderHeaderIcon, offset: 0x0220220e, size: 80 bytes, params: 2, frame: 16
|
||||
const GuildIcon = importDefault(6819) /* metro dependency 6819: GuildIcon */;
|
||||
const GuildIconSizes = (require(6819) /* metro dependency 6819: GuildIcon */).GuildIconSizes;
|
||||
const XSMALL = GuildIconSizes.XSMALL;
|
||||
return <GuildIcon size={XSMALL} guild={a0.guild} />;
|
||||
}
|
||||
|
||||
function _default_100950RenderDescription(a0) { // fn#100962, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13427:1443, owner: _default_100950.renderDescription, offset: 0x0220225e, size: 319 bytes, params: 2, frame: 25
|
||||
var items2;
|
||||
const userBinding = user;
|
||||
const hasAvatarForGuild2 = userBinding.hasAvatarForGuild(a0.guild.id);
|
||||
const nickname = (importDefault(4617) /* metro dependency 4617: NicknameUtils */).getNickname(a0.guild.id,
|
||||
undefined, userBinding);
|
||||
if (hasAvatarForGuild2) {
|
||||
var viewBindingProps = {style: styles.guildIdentity};
|
||||
items2 = [hasAvatarForGuild2 && ((Avatar) => <Avatar size={(require(1305) /* metro dependency 1305: native */).AvatarSizes.SIZE_16} style={styles.avatar} user={user} guildId={a0.guild.id} animate />)((require(1305) /* metro dependency 1305: native */).Avatar)];
|
||||
items2[1] = ((Text) => <Text variant="text-sm/medium" color="text-default">{nickname ?? user.username}</Text>)((require(4573) /* metro dependency 4573: Text */).Text);
|
||||
return (
|
||||
<View {...viewBindingProps}>
|
||||
{items2}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
if (nickname != null) {
|
||||
var viewBindingProps = {style: styles.guildIdentity};
|
||||
items2 = [hasAvatarForGuild2 && ((Avatar) => <Avatar size={(require(1305) /* metro dependency 1305: native */).AvatarSizes.SIZE_16} style={styles.avatar} user={user} guildId={a0.guild.id} animate />)((require(1305) /* metro dependency 1305: native */).Avatar)];
|
||||
items2[1] = ((Text) => <Text variant="text-sm/medium" color="text-default">{nickname ?? user.username}</Text>)((require(4573) /* metro dependency 4573: Text */).Text);
|
||||
return (
|
||||
<View {...viewBindingProps}>
|
||||
{items2}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
function _default_100950IsSelected({value}) { // fn#100963, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13427:1885, owner: _default_100950.isSelected, offset: 0x0220239d, size: 41 bytes, params: 2, frame: 4
|
||||
return value === env0_4?.value;
|
||||
}
|
||||
|
||||
function queryGuilds_100952(a0) { // fn#100952, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13427:651, offset: 0x0220205b, size: 155 bytes, params: 2, frame: 14
|
||||
var environment;
|
||||
var value;
|
||||
var reduce;
|
||||
var Array;
|
||||
var value2;
|
||||
var array;
|
||||
const queryGuilds_100952GuildRecordToGuildSearchableSelectOption = function(a0) {
|
||||
var object = {};
|
||||
object.type = require(dependencyMap[7]).SelectOptionType.GUILD;
|
||||
object.value = a0.id;
|
||||
object.label = a0.name;
|
||||
object.guild = a0;
|
||||
return object;
|
||||
};
|
||||
if (a0.length === 0) {
|
||||
value = environment.__proto__.__proto__;
|
||||
value = SortedGuildStore.getFlattenedGuildIds();
|
||||
reduce = value.reduce;
|
||||
Array = global.Array;
|
||||
value2 = Object.create(Array.prototype, {constructor: {value: Array}});
|
||||
array = new Array();
|
||||
return Reflect.apply(reduce, value, [_fun100954, array instanceof Object ? array : value2]);
|
||||
}
|
||||
value = environment.__proto__.__proto__;
|
||||
value = importDefault(6526) /* metro dependency 6526: AutocompleteUtils */;
|
||||
value = value.queryGuilds({query: a0});
|
||||
return value.map(function({record}) {
|
||||
return queryGuilds_100952GuildRecordToGuildSearchableSelectOption(record);
|
||||
});
|
||||
}
|
||||
|
||||
function _fun100954(a0, a1) { // fn#100954, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13427:851, offset: 0x0220213c, size: 56 bytes, params: 3, frame: 13
|
||||
let value = environment.__proto__.__proto__.__proto__;
|
||||
value = GuildStore.getGuild(a1);
|
||||
if (value != null) {
|
||||
a0.push(queryGuilds_100952GuildRecordToGuildSearchableSelectOption(value));
|
||||
}
|
||||
return a0;
|
||||
}
|
||||
|
||||
+209
@@ -0,0 +1,209 @@
|
||||
/* Metro module 11439; source: modules/interaction_components/native/components/MentionableSelectComponentActionSheet.tsx; dependencies: [31, 27, 1938, 1867, 4396, 1878, 661, 33, 4501, 697, 6736, 8362, 11440, 4633, 1305, 6794, 6795, 9097, 11438, 9210, 4573, 11441, 1244, 2] */
|
||||
function _fun87574(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#87574, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11625:6, offset: 0x01fc3e41, size: 430 bytes, params: 8, frame: 25
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
const env0_4 = (require(27) /* metro dependency 27 */).View;
|
||||
const guildRoleStore = importDefault(1938) /* metro dependency 1938: GuildRoleStore */;
|
||||
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
|
||||
const presenceStore = importDefault(4396) /* metro dependency 4396: PresenceStore */;
|
||||
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
||||
let value = require(661) /* metro dependency 661: Constants */;
|
||||
const Fonts = value.Fonts;
|
||||
const env0_9 = value.DEFAULT_ROLE_COLOR_HEX;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_10 = value.jsx;
|
||||
const env0_11 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object2 = {};
|
||||
const INTERACTIVE_TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_DEFAULT;
|
||||
let PRIMARY_MEDIUM = Fonts.PRIMARY_MEDIUM;
|
||||
object2.name = {color: INTERACTIVE_TEXT_DEFAULT, fontFamily: PRIMARY_MEDIUM, fontSize: 12, lineHeight: 16};
|
||||
const TEXT_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_MUTED;
|
||||
PRIMARY_MEDIUM = Fonts.PRIMARY_MEDIUM;
|
||||
object2.discriminator = {color: TEXT_MUTED, fontFamily: PRIMARY_MEDIUM, fontSize: 12};
|
||||
object2.roleCountContainer = {'display': 'flex', 'flexDirection': 'row', 'flexGrow': 1, 'alignItems': 'center',
|
||||
'justifyContent': 'flex-end', 'marginRight': 12};
|
||||
object2.roleCountText = {paddingRight: 4};
|
||||
const env0_12 = Reflect.apply(createStyles, value, [object2]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/interaction_components/native/components/MentionableSelectComponentActionSheet.tsx');
|
||||
exports.default = _default_87575;
|
||||
}
|
||||
|
||||
function _default_87575({selectionActionComponent, labelComponent, channelId, guildId, containerId, onSubmit, allowEmpty}) { // fn#87575, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11625:624, offset: 0x01fc3fef, size: 440 bytes, params: 2, frame: 29
|
||||
const env0_3 = useStyles();
|
||||
const guild = GuildStore.getGuild(guildId);
|
||||
const defaultImport = importDefault(6736) /* metro dependency 6736: useGuildRoleMemberCounts */;
|
||||
const id = guild?.id;
|
||||
const MIN_REREQUEST_TIME = (require(8362) /* metro dependency 8362: SearchableSelectActionComponentUtils */).MIN_REREQUEST_TIME;
|
||||
const env0_5 = defaultImport(id, MIN_REREQUEST_TIME);
|
||||
const binding = env0_3;
|
||||
const {options, selectedOptions, isSelected, onPressOptionItem, submitSelection,
|
||||
setQuery} = (importDefault(11440) /* metro dependency 11440: useSearchableSelectComponent */)({selectActionComponent: selectionActionComponent,
|
||||
containerId: containerId, guildId: guildId, queryOptions: binding.useCallback(_fun87576,
|
||||
[selectionActionComponent, channelId]), onSubmit: onSubmit});
|
||||
return ((Component) => <Component onPressOptionItem={onPressOptionItem} renderIcon={binding.useCallback(_fun87577,
|
||||
[guild,
|
||||
guildId])} renderDescription={renderDescription_87578} renderOptionSuffix={renderOptionSuffix} selectionActionComponent={selectionActionComponent} labelComponent={labelComponent} options={options} selectedCount={selectedOptions.length} selectedOptions={selectedOptions} isSelected={isSelected} submitSelection={submitSelection} onQueryChange={setQuery} itemAccessibilityLabel={itemAccessibilityLabel} channelId={channelId} allowEmpty={allowEmpty} />)(importDefault(11438) /* metro dependency 11438: SelectComponentActionSheet */);
|
||||
}
|
||||
|
||||
function _fun87576(a0) { // fn#87576, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11625:837, offset: 0x01fc41a7, size: 59 bytes, params: 2, frame: 15
|
||||
let value = environment.__proto__;
|
||||
value = require(8362) /* metro dependency 8362: SearchableSelectActionComponentUtils */;
|
||||
return value.queryMentionables(selectionActionComponent.type, a0, channelId);
|
||||
}
|
||||
|
||||
function _fun87577(a0) { // fn#87577, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11625:1094, offset: 0x01fc41e2, size: 595 bytes, params: 2, frame: 21
|
||||
var r7;
|
||||
var r2;
|
||||
var r9;
|
||||
var id;
|
||||
var moduleValue;
|
||||
var customIconSrc;
|
||||
var unicodeEmoji;
|
||||
const ShieldUserIcon = (require(9097) /* metro dependency 9097: ShieldUserIcon */).ShieldUserIcon;
|
||||
var value8;
|
||||
var isMobileOnline;
|
||||
var isMobileOnline2;
|
||||
var isVROnline;
|
||||
var isVROnline2;
|
||||
var getStatus;
|
||||
let type = a0.type;
|
||||
const value = environment.__proto__;
|
||||
const value2 = undefined;
|
||||
const SelectOptionType = (require(4633) /* metro dependency 4633: InteractionComponentTypes */).SelectOptionType;
|
||||
const USER = SelectOptionType.USER;
|
||||
if (type === USER) {
|
||||
value8 = UserStore.getUser(a0.value);
|
||||
if (value8 == null) {
|
||||
return null;
|
||||
}
|
||||
isMobileOnline = PresenceStore.isMobileOnline;
|
||||
id = value8.id;
|
||||
isMobileOnline2 = Reflect.apply(isMobileOnline, PresenceStore, [id]);
|
||||
isVROnline = PresenceStore.isVROnline;
|
||||
id = value8.id;
|
||||
isVROnline2 = Reflect.apply(isVROnline, PresenceStore, [id]);
|
||||
getStatus = PresenceStore.getStatus;
|
||||
id = value8.id;
|
||||
const Avatar = (require(1305) /* metro dependency 1305: native */).Avatar;
|
||||
return (
|
||||
<Avatar
|
||||
user={value8}
|
||||
isMobileOnline={isMobileOnline2}
|
||||
isVROnline={isVROnline2}
|
||||
status={Reflect.apply(getStatus, PresenceStore, [id])}
|
||||
guildId={guildId ?? value2}
|
||||
size={(require(1305) /* metro dependency 1305: native */).AvatarSizes.XSMALL}
|
||||
/>
|
||||
);
|
||||
}
|
||||
type = a0.type;
|
||||
const ROLE = SelectOptionType.ROLE;
|
||||
if (type === ROLE) {
|
||||
r7 = env0_4 != null ? GuildRoleStore.getRole(env0_4.id, a0.value) : value2;
|
||||
if (env0_4 == null) {
|
||||
return null;
|
||||
}
|
||||
if (r7 == null) {
|
||||
return null;
|
||||
}
|
||||
moduleValue = require(6794) /* metro dependency 6794: RoleIconUtils */;
|
||||
if (moduleValue.canGuildUseRoleIcons(env0_4, r7)) {
|
||||
r2 = (require(6794) /* metro dependency 6794: RoleIconUtils */).getRoleIconData(r7) ?? ({});
|
||||
customIconSrc = r2.customIconSrc;
|
||||
unicodeEmoji = r2.unicodeEmoji;
|
||||
r9 = customIconSrc != null ? {uri: customIconSrc} : value2;
|
||||
if (r9 != null) {
|
||||
return ((Component) => <Component source={r9} unicodeEmoji={unicodeEmoji} size={24} name={r7.name} />)(importDefault(6795) /* metro dependency 6795: RoleIcon */);
|
||||
}
|
||||
if (unicodeEmoji != null) {
|
||||
return ((Component) => <Component source={r9} unicodeEmoji={unicodeEmoji} size={24} name={r7.name} />)(importDefault(6795) /* metro dependency 6795: RoleIcon */);
|
||||
}
|
||||
return <ShieldUserIcon color={(r7 == null ? value2 : r7.colorString) ?? DEFAULT_ROLE_COLOR_HEX} />;
|
||||
}
|
||||
return <ShieldUserIcon color={(r7 == null ? value2 : r7.colorString) ?? DEFAULT_ROLE_COLOR_HEX} />;
|
||||
}
|
||||
return value2;
|
||||
}
|
||||
|
||||
function _default_87575RenderDescription(a0) { // fn#87578, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11625:1915, owner: _default_87575.renderDescription, offset: 0x01fc4435, size: 147 bytes, params: 2, frame: 15
|
||||
var value3;
|
||||
var object2;
|
||||
var stylesBinding;
|
||||
var name;
|
||||
const type = a0.type;
|
||||
let value = environment.__proto__;
|
||||
const SelectOptionType = (require(4633) /* metro dependency 4633: InteractionComponentTypes */).SelectOptionType;
|
||||
const USER = SelectOptionType.USER;
|
||||
if (type === USER) {
|
||||
value3 = UserStore.getUser(a0.value);
|
||||
value = importDefault(9210) /* metro dependency 9210: DiscordTag */;
|
||||
object2 = {user: value3};
|
||||
stylesBinding = styles;
|
||||
name = stylesBinding.name;
|
||||
object2.usernameStyle = name;
|
||||
object2.discriminatorStyle = stylesBinding.discriminator;
|
||||
name = stylesBinding.name;
|
||||
object2.nicknameStyle = name;
|
||||
return ((Component) => <Component {...object2} />)(value);
|
||||
}
|
||||
}
|
||||
|
||||
function renderOptionSuffix(a0) { // fn#87579, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11625:2114, owner: _default_87575.renderOptionSuffix, offset: 0x01fc44c8, size: 293 bytes, params: 2, frame: 20
|
||||
var r3;
|
||||
var r9;
|
||||
var value4;
|
||||
var stylesBinding;
|
||||
const type = a0.type;
|
||||
const value = environment.__proto__;
|
||||
const value2 = undefined;
|
||||
const SelectOptionType = (require(4633) /* metro dependency 4633: InteractionComponentTypes */).SelectOptionType;
|
||||
const ROLE = SelectOptionType.ROLE;
|
||||
if (type === ROLE) {
|
||||
value4 = null;
|
||||
r3 = value4 != env0_4 ? GuildRoleStore.getRole(env0_4.id, a0.value) : value2;
|
||||
r9 = value4 == r3 ? value4 : value4 == env0_5 ? value2 : env0_5[r3.id];
|
||||
if (value4 == r9) {
|
||||
return value2;
|
||||
}
|
||||
stylesBinding = styles;
|
||||
return (
|
||||
<View style={stylesBinding.roleCountContainer}>
|
||||
{((Text) => <Text style={stylesBinding.roleCountText} variant="text-sm/medium" color="interactive-text-default">{r9}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}
|
||||
{((UserIcon) => <UserIcon size="xs" />)((require(11441) /* metro dependency 11441: UserIcon */).UserIcon)}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
return value2;
|
||||
}
|
||||
|
||||
function _default_87575ItemAccessibilityLabel(a0) { // fn#87580, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11625:2625, owner: _default_87575.itemAccessibilityLabel, offset: 0x01fc45ed, size: 380 bytes, params: 2, frame: 20
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
var value4;
|
||||
let type = a0.type;
|
||||
const value = environment.__proto__;
|
||||
const value2 = undefined;
|
||||
const SelectOptionType = (require(4633) /* metro dependency 4633: InteractionComponentTypes */).SelectOptionType;
|
||||
const USER = SelectOptionType.USER;
|
||||
if (type === USER) {
|
||||
value4 = UserStore.getUser(a0.value);
|
||||
return value4 == null ? intl.formatToPlainString(t.AydQ7a, {username: a0.label,
|
||||
discriminator: value4 == null ? value2 : value4.discriminator}) : value4.bot ? intl.formatToPlainString(t['zogo/8'],
|
||||
|
||||
{username: a0.label,
|
||||
discriminator: value4 == null ? value2 : value4.discriminator}) : intl.formatToPlainString(t.AydQ7a,
|
||||
{username: a0.label, discriminator: value4 == null ? value2 : value4.discriminator});
|
||||
}
|
||||
type = a0.type;
|
||||
const ROLE = SelectOptionType.ROLE;
|
||||
if (type === ROLE) {
|
||||
return intl.formatToPlainString(t.F6ejkk, {roleName: a0.label});
|
||||
}
|
||||
return value2;
|
||||
}
|
||||
|
||||
+248
@@ -0,0 +1,248 @@
|
||||
/* Metro module 11438; source: modules/interaction_components/native/components/SelectComponentActionSheet.tsx; dependencies: [31, 27, 1379, 1934, 6276, 33, 4501, 697, 6758, 1244, 4578, 9100, 3874, 6238, 7974, 8707, 5463, 3869, 1585, 1478, 5314, 566, 4080, 6275, 6277, 2] */
|
||||
function _fun87558(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#87558, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11624:6, offset: 0x01fc3050, size: 549 bytes, params: 8, frame: 23
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
const env0_4 = (require(27) /* metro dependency 27 */).View;
|
||||
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
|
||||
const selectedChannelStore = importDefault(1934) /* metro dependency 1934: SelectedChannelStore */;
|
||||
const env0_7 = (require(6276) /* metro dependency 6276: ActionSheetConstants */).ACTION_SHEET_START_HEIGHT_RATIO;
|
||||
let value = require(33) /* metro dependency 33 */;
|
||||
const env0_8 = value.jsx;
|
||||
const env0_9 = value.Fragment;
|
||||
const env0_10 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object2 = {};
|
||||
const PX_32 = (importDefault(697) /* metro dependency 697: native */).space.PX_32;
|
||||
object2.selectionOptionItemIconWrapper = {width: PX_32, alignItems: 'center'};
|
||||
const object5 = {};
|
||||
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object5.width = PX_16;
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object5.height = PX_16;
|
||||
object2.tagListIconWrapper = object5;
|
||||
const object7 = {};
|
||||
object7.transform = [{scale: 0.75}];
|
||||
let PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
|
||||
object7.top = -PX_4;
|
||||
PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
|
||||
object7.left = -PX_4;
|
||||
object2.tagListIcon = object7;
|
||||
const object8 = {};
|
||||
PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
|
||||
object8.paddingHorizontal = PX_4;
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object8.marginTop = PX_16;
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object8.marginHorizontal = PX_16;
|
||||
object2.textInputWrapper = object8;
|
||||
const env0_11 = Reflect.apply(createStyles, value, [object2]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/interaction_components/native/components/SelectComponentActionSheet.tsx');
|
||||
exports.default = SelectComponentActionSheet;
|
||||
}
|
||||
|
||||
function SelectionHeader({renderIcon, selectionActionComponent, labelComponent, selectButtonDisabled, selectedOptions, submitSelection, onPressOptionItem, onRemoveOptionItem, onQueryChange}) { // fn#87559, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11624:612, offset: 0x01fc3275, size: 698 bytes, params: 2, frame: 32
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
var Button;
|
||||
const styles = useStyles();
|
||||
const value3 = selectionActionComponent.maxValues > 1;
|
||||
const env0_6 = onRemoveOptionItem.useRef(null);
|
||||
const value5 = onRemoveOptionItem.useMemo(_fun87560, [selectedOptions, styles, renderIcon]);
|
||||
const jsxRuntimeEnv0_9Binding = jsxRuntimeEnv0_9;
|
||||
const BottomSheetTitleHeader = (require(6758) /* metro dependency 6758: BottomSheetTitleHeaderNative */).BottomSheetTitleHeader;
|
||||
const object = {};
|
||||
let r14 = labelComponent?.label ?? selectionActionComponent.placeholder;
|
||||
r14 = r14 ?? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.Otr6W2);
|
||||
object.title = r14;
|
||||
object.subtitle = value3 && selectionActionComponent.minValues > 0 ? intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.Jmwzdx,
|
||||
{count: selectionActionComponent.minValues}) : undefined;
|
||||
if (value3) {
|
||||
Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
|
||||
r14 = <Button size="sm" variant={selectButtonDisabled ? 'secondary' : 'primary'} disabled={selectButtonDisabled} onPress={submitSelection} text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.XqMe3N)} />;
|
||||
} else {
|
||||
r14 = undefined;
|
||||
}
|
||||
object.trailing = r14;
|
||||
return (
|
||||
<>
|
||||
<BottomSheetTitleHeader {...object} />
|
||||
{onQueryChange != null && value5 != null ? ((Component) => <Component inActionSheet style={styles.textInputWrapper} icon={value3 ? value5.length === 0 ? undefined : <View /> : undefined} tags={value5} onRemove={function(a0) {
|
||||
var r2;
|
||||
var selectedOptionsBinding = selectedOptions;
|
||||
var value2 = undefined;
|
||||
r2 = selectedOptionsBinding == null ? value2 : selectedOptions[a0];
|
||||
if (r2 != null) {
|
||||
(onRemoveOptionItem ?? onPressOptionItem)(a0, r2);
|
||||
}
|
||||
return value2;
|
||||
}} onChangeText={onChangeText} />)(importDefault(9100) /* metro dependency 9100: TagListInputNative */) : null}
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
function SelectionOptionItem({item, onPressOptionItem, clearable, selected, disabled, index, start, end, iconContainerStyle, itemAccessibilityLabel, skipIcon, multi, renderDescription, renderIcon, renderOptionSuffix}) { // fn#87564, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11624:1745, offset: 0x01fc3644, size: 596 bytes, params: 2, frame: 33
|
||||
var r8;
|
||||
var FormCheckbox;
|
||||
const styles = useStyles();
|
||||
const value5 = (require(3874) /* metro dependency 3874: useA11yRolesNative */).useCheckboxA11yNative({checked: selected != null && selected,
|
||||
disabled: disabled});
|
||||
const useA11yRolesNativeModule = require(3874) /* metro dependency 3874: useA11yRolesNative */;
|
||||
const useRadioA11yNative = useA11yRolesNativeModule.useRadioA11yNative;
|
||||
const r19 = multi ? value5 : Reflect.apply(useRadioA11yNative, useA11yRolesNativeModule,
|
||||
[{selected: selected != null && selected, disabled: disabled}]);
|
||||
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
|
||||
const accessibilityRole = r19.accessibilityRole;
|
||||
const r20 = itemAccessibilityLabel?.(item);
|
||||
const accessibilityState = r19.accessibilityState;
|
||||
const r5 = skipIcon ? null : <View style={[styles.selectionOptionItemIconWrapper,
|
||||
iconContainerStyle]}>{renderIcon(item)}</View>;
|
||||
const label = item.label;
|
||||
const r6 = renderDescription?.(item);
|
||||
const r11 = renderOptionSuffix?.(item);
|
||||
if (clearable) {
|
||||
FormCheckbox = (require(7974) /* metro dependency 7974: FormCheckboxNative */).FormCheckbox;
|
||||
selected = !!selected && selected;
|
||||
r8 = <FormCheckbox checked={selected} />;
|
||||
} else if (selected !== true) {
|
||||
r8 = null;
|
||||
} else {
|
||||
const CheckmarkSmallBoldIcon = (require(8707) /* metro dependency 8707: CheckmarkSmallBoldIcon */).CheckmarkSmallBoldIcon;
|
||||
r8 = <CheckmarkSmallBoldIcon color="text-brand" />;
|
||||
}
|
||||
return (
|
||||
<TableRow
|
||||
accessibilityRole={accessibilityRole}
|
||||
accessibilityLabel={r20}
|
||||
accessibilityState={accessibilityState}
|
||||
start={start}
|
||||
end={end}
|
||||
disabled={disabled}
|
||||
icon={r5}
|
||||
label={label}
|
||||
labelLineClamp={1}
|
||||
subLabel={r6}
|
||||
subLabelLineClamp={1}
|
||||
onPress={function() {
|
||||
return onPressOptionItem(index, item);
|
||||
}}
|
||||
trailing={<View style={{flexDirection: 'row'}}>{r11}{r8}</View>}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function SelectComponentActionSheet({selectionActionComponent, labelComponent, onPressOptionItem, selectedOptions, selectedCount, renderIcon, renderHeaderIcon, iconContainerStyle, skipIcon, renderDescription, renderOptionSuffix, onQueryChange, options, itemStyle, isSelected, submitSelection, itemAccessibilityLabel, channelId, expanded, onRemoveOptionItem, allowEmpty}) { // fn#87566, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11624:2666, offset: 0x01fc3898, size: 852 bytes, params: 2, frame: 42
|
||||
const env0_3 = renderIcon;
|
||||
const insets = (importDefault(5463) /* metro dependency 5463: useSafeAreaInsetsKeyboardAwareNative */)({isKeyboardAwareOnAndroid: false}).insets;
|
||||
env0_3.useEffect(function() {
|
||||
var AccessibilityAnnouncer = require(dependencyMap[17]).AccessibilityAnnouncer;
|
||||
AccessibilityAnnouncer.announce(require(dependencyMap[9]).intl.string(require(dependencyMap[9]).t['7gxe9o']));
|
||||
}, []);
|
||||
const value2 = env0_3.useMemo(function() {
|
||||
return ACTION_SHEET_START_HEIGHT_RATIO * (require(dependencyMap[19]).getWindowDimensions().height - require(dependencyMap[20]).NAV_BAR_HEIGHT_MULTILINE - require(dependencyMap[18]).getSafeAreaInsets().top);
|
||||
}, []);
|
||||
env0_3.useEffect(_fun87570,
|
||||
[(require(566) /* metro dependency 566: flux */).useStateFromStores([SelectedChannelStore], function() {
|
||||
return SelectedChannelStore.getChannelId();
|
||||
}), channelId, ChannelStore.getChannel(channelId)]);
|
||||
const value4 = env0_3.useMemo(function() {
|
||||
return selectionActionComponent.maxValues > 1;
|
||||
}, [selectionActionComponent]);
|
||||
const value5 = env0_3.useCallback(_fun87572, [isSelected, value4, allowEmpty, selectionActionComponent.maxValues,
|
||||
itemStyle, selectedCount, options.length, onPressOptionItem, renderIcon, iconContainerStyle, skipIcon,
|
||||
renderDescription, renderOptionSuffix, itemAccessibilityLabel]);
|
||||
const value6 = env0_3.useRef(null);
|
||||
const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
|
||||
const bottomSheetProps = {scrollable: true, ref: value6, startHeight: value2, startExpanded: expanded,
|
||||
header: <SelectionHeader selectionActionComponent={selectionActionComponent} labelComponent={labelComponent} selectButtonDisabled={selectedCount > selectionActionComponent.maxValues || (selectedCount === 0 ? !allowEmpty : selectedCount < selectionActionComponent.minValues)} selectedOptions={selectedOptions} submitSelection={submitSelection} onQueryChange={onQueryChange} onPressOptionItem={onPressOptionItem} onRemoveOptionItem={onRemoveOptionItem} renderIcon={renderHeaderIcon ?? renderIcon} />};
|
||||
const BottomSheetFlatList = (require(6277) /* metro dependency 6277 */).BottomSheetFlatList;
|
||||
const object = {};
|
||||
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object.paddingHorizontal = PX_16;
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object.paddingBottom = PX_16 + insets.bottom;
|
||||
return (
|
||||
<BottomSheet {...bottomSheetProps}>
|
||||
<BottomSheetFlatList
|
||||
keyExtractor={function(a0, a1) {
|
||||
return '' + a1;
|
||||
}}
|
||||
data={options}
|
||||
renderItem={value5}
|
||||
contentContainerStyle={object}
|
||||
keyboardShouldPersistTaps="always"
|
||||
accessibilityRole={value4 ? 'none' : 'radiogroup'}
|
||||
/>
|
||||
</BottomSheet>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun87560() { // fn#87560, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11624:873, offset: 0x01fc352f, size: 51 bytes, params: 1, frame: 13
|
||||
let r0 = selectedOptions?.map(_fun87561);
|
||||
r0 = r0 ?? [];
|
||||
return r0;
|
||||
}
|
||||
|
||||
function SelectionHeaderOnChangeText(a0) { // fn#87563, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11624:1668, owner: SelectionHeader.onChangeText, offset: 0x01fc360d, size: 55 bytes, params: 2, frame: 12
|
||||
const current = env0_6.current;
|
||||
if (current != null) {
|
||||
current.scrollTo({'y': 0, 'animated': false});
|
||||
}
|
||||
onQueryChange(a0);
|
||||
}
|
||||
|
||||
function _fun87570() { // fn#87570, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11624:3462, offset: 0x01fc3cc3, size: 98 bytes, params: 1, frame: 13
|
||||
var value;
|
||||
let r0 = env0_15 != null && env0_15.isGuildVoice();
|
||||
r0 = !r0 ? channelId == null : r0;
|
||||
r0 = !r0 ? channelId === channelId : r0;
|
||||
if (!r0) {
|
||||
value = environment.__proto__;
|
||||
value = importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */;
|
||||
value.hideActionSheet();
|
||||
}
|
||||
}
|
||||
|
||||
function _fun87572({item, index}) { // fn#87572, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11624:3606, offset: 0x01fc3d25, size: 257 bytes, params: 2, frame: 18
|
||||
var r6;
|
||||
const isSelected2 = isSelected(item, index);
|
||||
let r5 = env0_16 && selectedCount >= selectionActionComponent.maxValues && !isSelected2;
|
||||
if (!r5) {
|
||||
r6 = !env0_16 && isSelected2;
|
||||
r6 = r6 && !allowEmpty;
|
||||
r5 = r6;
|
||||
}
|
||||
return (
|
||||
<SelectionOptionItem
|
||||
itemStyle={itemStyle}
|
||||
item={item}
|
||||
index={index}
|
||||
start={index === 0}
|
||||
end={index === options.length - 1}
|
||||
clearable={env0_16 || allowEmpty}
|
||||
selected={isSelected2}
|
||||
disabled={r5}
|
||||
onPressOptionItem={onPressOptionItem}
|
||||
iconContainerStyle={iconContainerStyle}
|
||||
skipIcon={skipIcon}
|
||||
renderDescription={renderDescription}
|
||||
renderIcon={renderIcon}
|
||||
renderOptionSuffix={renderOptionSuffix}
|
||||
itemAccessibilityLabel={itemAccessibilityLabel}
|
||||
multi={env0_16}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun87561(a0) { // fn#87561, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11624:922, offset: 0x01fc3562, size: 110 bytes, params: 2, frame: 19
|
||||
const object2 = {};
|
||||
object2.id = a0.value;
|
||||
object2.text = a0.label;
|
||||
value = environment.__proto__.__proto__;
|
||||
const stylesBinding = styles;
|
||||
object2.icon = <View style={stylesBinding.tagListIconWrapper}><View style={stylesBinding.tagListIcon}>{renderIcon(a0)}</View></View>;
|
||||
return object2;
|
||||
}
|
||||
|
||||
+151
@@ -0,0 +1,151 @@
|
||||
/* Metro module 11437; source: modules/interaction_components/native/components/StringSelectComponentActionSheet.tsx; dependencies: [57, 31, 33, 4501, 697, 8361, 1909, 4080, 11438, 6739, 4573, 1244, 2] */
|
||||
function _fun87543(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#87543, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11623:6, offset: 0x01fc29ed, size: 298 bytes, params: 8, frame: 22
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(57) /* metro dependency 57 */;
|
||||
const env0_4 = importAll(31) /* metro dependency 31 */;
|
||||
const env0_5 = (require(33) /* metro dependency 33 */).jsx;
|
||||
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = createStylesModule.createStyles;
|
||||
const object = {'flexShrink': 0, 'borderRadius': null, 'overflow': 'hidden'};
|
||||
object.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
|
||||
const env0_6 = Reflect.apply(createStyles, createStylesModule,
|
||||
[{selectionOptionItemWithDescription: {minHeight: 64}, selectionOptionItemDescription: {marginTop: 2},
|
||||
emojiWrapper: object, textEmoji: {'fontSize': 16, 'color': '#000000'}, fastImageEmoji: {'width': 24,
|
||||
'height': 24}}]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/interaction_components/native/components/StringSelectComponentActionSheet.tsx');
|
||||
exports.default = _default_87544;
|
||||
}
|
||||
|
||||
function _default_87544({selectionActionComponent, labelComponent, channelId, containerId, onSubmit, allowEmpty}) { // fn#87544, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11623:412, offset: 0x01fc2b17, size: 486 bytes, params: 2, frame: 25
|
||||
const styles = useStyles();
|
||||
const initialStringSelectOptions = (require(8361) /* metro dependency 8361: StringSelectActionComponentUtils */).getInitialStringSelectOptions(selectionActionComponent,
|
||||
containerId);
|
||||
const binding = env0_4;
|
||||
const useState = binding.useState;
|
||||
const Set = global.Set;
|
||||
const value3 = Object.create(Set.prototype, {constructor: {value: Set}});
|
||||
const set = new Set(initialStringSelectOptions);
|
||||
const value6 = env0_3(Reflect.apply(useState, binding, [set instanceof Object ? set : value3]), 2);
|
||||
const property = value6[0];
|
||||
var env0_4 = value6[1];
|
||||
return ((Component) => <Component onPressOptionItem={binding.useCallback(_fun87547, [property,
|
||||
binding.useMemo(function() {
|
||||
return selectionActionComponent.maxValues > 1;
|
||||
}, [selectionActionComponent]), selectionActionComponent, binding.useCallback(_fun87546,
|
||||
[onSubmit])])} renderIcon={renderIcon} skipIcon={!binding.useMemo(function() {
|
||||
return selectionActionComponent.options.some(_fun87552);
|
||||
},
|
||||
[selectionActionComponent])} renderDescription={renderDescription_87554} selectionActionComponent={selectionActionComponent} labelComponent={labelComponent} options={selectionActionComponent.options} itemStyle={[binding.useMemo(function() {
|
||||
return selectionActionComponent.options.some(_fun87550);
|
||||
},
|
||||
[selectionActionComponent]) && styles.selectionOptionItemWithDescription]} selectedCount={property.size} isSelected={isSelected} submitSelection={submitSelection} itemAccessibilityLabel={itemAccessibilityLabel} channelId={channelId} allowEmpty={allowEmpty} />)(importDefault(11438) /* metro dependency 11438: SelectComponentActionSheet */);
|
||||
}
|
||||
|
||||
function _fun87546(a0) { // fn#87546, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11623:669, offset: 0x01fc2d13, size: 90 bytes, params: 2, frame: 14
|
||||
const value = environment.__proto__;
|
||||
const ComponentType = (require(1909) /* metro dependency 1909: Server */).ComponentType;
|
||||
const STRING_SELECT = ComponentType.STRING_SELECT;
|
||||
onSubmit({type: STRING_SELECT, values: a0});
|
||||
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
|
||||
}
|
||||
|
||||
function _fun87547(a0, a1) { // fn#87547, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11623:786, offset: 0x01fc2d6d, size: 134 bytes, params: 3, frame: 15
|
||||
const env0_0 = a1;
|
||||
const binding = env0_3;
|
||||
const value3 = binding.has(a1.value);
|
||||
if (env0_5) {
|
||||
if (!(!value3 && env0_3.size >= selectionActionComponent.maxValues)) {
|
||||
env0_4(function(a0) {
|
||||
var Set = global.Set;
|
||||
var value2 = new Set(a0);
|
||||
if (result) {
|
||||
value2.add(require.value);
|
||||
} else {
|
||||
value2.delete(require.value);
|
||||
}
|
||||
return value2;
|
||||
});
|
||||
}
|
||||
} else {
|
||||
env0_6(value3 ? [] : [a1.value]);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun87549() { // fn#87549, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11623:957, offset: 0x01fc2e46, size: 34 bytes, params: 1, frame: 11
|
||||
return selectionActionComponent.options.some(function(a0) {
|
||||
return a0.description != null;
|
||||
});
|
||||
}
|
||||
|
||||
function _fun87551() { // fn#87551, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11623:1021, offset: 0x01fc2e78, size: 34 bytes, params: 1, frame: 11
|
||||
return selectionActionComponent.options.some(function(a0) {
|
||||
return a0.emoji != null;
|
||||
});
|
||||
}
|
||||
|
||||
function _default_87544RenderIcon(a0) { // fn#87553, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11623:1115, owner: _default_87544.renderIcon, offset: 0x01fc2eab, size: 128 bytes, params: 2, frame: 16
|
||||
var r0;
|
||||
var src;
|
||||
var name;
|
||||
var stylesBinding;
|
||||
let emoji = a0.emoji;
|
||||
let value = null;
|
||||
if (value != emoji) {
|
||||
value = environment.__proto__;
|
||||
value = importDefault(6739) /* metro dependency 6739: Emoji */;
|
||||
emoji = a0.emoji;
|
||||
src = emoji.src;
|
||||
emoji = a0.emoji;
|
||||
name = emoji.name;
|
||||
stylesBinding = styles;
|
||||
value = ((Component) => <Component src={src} name={name} style={stylesBinding.emojiWrapper} textEmojiStyle={stylesBinding.textEmoji} fastImageStyle={stylesBinding.fastImageEmoji} />)(value);
|
||||
r0 = value;
|
||||
} else {
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _default_87544RenderDescription(a0) { // fn#87554, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11623:1294, owner: _default_87544.renderDescription, offset: 0x01fc2f2b, size: 118 bytes, params: 2, frame: 16
|
||||
var r0;
|
||||
const description = a0.description;
|
||||
let value = null;
|
||||
if (value != description) {
|
||||
if (a0.description === '') {
|
||||
r0 = value;
|
||||
} else {
|
||||
value = environment.__proto__;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
value = <Text style={styles.selectionOptionItemDescription} variant="text-xs/medium" color="text-default">{a0.description}</Text>;
|
||||
r0 = value;
|
||||
}
|
||||
} else {
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _default_87544IsSelected({value}) { // fn#87555, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11623:1615, owner: _default_87544.isSelected, offset: 0x01fc2fa1, size: 27 bytes, params: 2, frame: 11
|
||||
return env0_3.has(value);
|
||||
}
|
||||
|
||||
function _default_87544SubmitSelection() { // fn#87556, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11623:1649, owner: _default_87544.submitSelection, offset: 0x01fc2fbc, size: 33 bytes, params: 1, frame: 14
|
||||
const binding = env0_6;
|
||||
const binding2 = env0_3;
|
||||
const items2 = [];
|
||||
arraySpread(items2, binding2, 0, undefined);
|
||||
return binding(items2);
|
||||
}
|
||||
|
||||
function _default_87544ItemAccessibilityLabel({emoji, label, description}) { // fn#87557, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11623:1686, owner: _default_87544.itemAccessibilityLabel, offset: 0x01fc2fdd, size: 115 bytes, params: 2, frame: 17
|
||||
let value = environment.__proto__;
|
||||
value = undefined;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const formatToPlainString = intl.formatToPlainString;
|
||||
const ZbrH2f = (require(1244) /* metro dependency 1244: indexNative */).t.ZbrH2f;
|
||||
return Reflect.apply(formatToPlainString, intl, [ZbrH2f, {emojiName: emoji == null ? value : emoji.name,
|
||||
optionName: label, optionDescription: description}]);
|
||||
}
|
||||
|
||||
+102
@@ -0,0 +1,102 @@
|
||||
/* Metro module 11440; source: modules/interaction_components/native/components/useSearchableSelectComponent.tsx; dependencies: [57, 31, 8362, 4080, 2] */
|
||||
function _fun87581(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#87581, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11626:6, offset: 0x01fc4769, size: 137 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(57) /* metro dependency 57 */;
|
||||
const env0_4 = importAll(31) /* metro dependency 31 */;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/interaction_components/native/components/useSearchableSelectComponent.tsx');
|
||||
exports.default = useSearchableSelectComponent;
|
||||
}
|
||||
|
||||
function useSearchableSelectComponent({selectActionComponent, containerId, guildId, queryOptions, onSubmit}) { // fn#87582, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11626:122, offset: 0x01fc47f2, size: 303 bytes, params: 2, frame: 25
|
||||
var object2;
|
||||
const binding = env0_4;
|
||||
let useState = binding.useState;
|
||||
const value2 = Reflect.apply(useState, binding, ['']);
|
||||
const binding2 = env0_3;
|
||||
const value3 = binding2(value2, 2);
|
||||
const property = value3[0];
|
||||
const property2 = value3[1];
|
||||
var env0_4 = (require(8362) /* metro dependency 8362: SearchableSelectActionComponentUtils */).getInitialSnowflakeSelectOptions(selectActionComponent,
|
||||
containerId, guildId);
|
||||
useState = binding.useState;
|
||||
value = binding2(Reflect.apply(useState, binding, [_fun87583]), 2);
|
||||
const property3 = value[0];
|
||||
const env0_6 = value[1];
|
||||
value = binding.useMemo(_fun87585, [property, queryOptions]);
|
||||
const result = selectActionComponent.maxValues > 1;
|
||||
object2 = {options: value};
|
||||
value = property3.values();
|
||||
const items2 = [];
|
||||
arraySpread(items2, value, 0, containerId);
|
||||
object2.selectedOptions = items2;
|
||||
object2.isSelected = isSelected;
|
||||
object2.onPressOptionItem = onPressOptionItem;
|
||||
object2.submitSelection = submitSelection;
|
||||
object2.setQuery = property2;
|
||||
return object2;
|
||||
}
|
||||
|
||||
function _fun87583() { // fn#87583, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11626:345, offset: 0x01fc4921, size: 56 bytes, params: 1, frame: 12
|
||||
const Map = global.Map;
|
||||
const binding = env0_4;
|
||||
let map = binding.map;
|
||||
const value = Reflect.apply(map, binding, [function(a0) {
|
||||
return [a0.value, a0];
|
||||
}]);
|
||||
const value2 = Object.create(Map.prototype, {constructor: {value: Map}});
|
||||
map = new Map();
|
||||
return map instanceof Object ? map : value2;
|
||||
}
|
||||
|
||||
function _fun87585() { // fn#87585, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11626:420, offset: 0x01fc496f, size: 20 bytes, params: 1, frame: 11
|
||||
return queryOptions(env0_3);
|
||||
}
|
||||
|
||||
function useSearchableSelectComponentSubmitSelection(a0) { // fn#87586, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11626:469, owner: useSearchableSelectComponent.submitSelection, offset: 0x01fc4983, size: 94 bytes, params: 2, frame: 15
|
||||
const object2 = {};
|
||||
object2.type = selectActionComponent.type;
|
||||
const value2 = a0.values();
|
||||
const items2 = [];
|
||||
arraySpread(items2, value2, 0, undefined);
|
||||
object2.selectedOptions = items2;
|
||||
onSubmit(object2);
|
||||
const value = environment.__proto__;
|
||||
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
|
||||
}
|
||||
|
||||
function useSearchableSelectComponentIsSelected({value}) { // fn#87587, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11626:617, owner: useSearchableSelectComponent.isSelected, offset: 0x01fc49e1, size: 27 bytes, params: 2, frame: 11
|
||||
return env0_5.has(value);
|
||||
}
|
||||
|
||||
function useSearchableSelectComponentOnPressOptionItem(a0, a1) { // fn#87588, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11626:653, owner: useSearchableSelectComponent.onPressOptionItem, offset: 0x01fc49fc, size: 190 bytes, params: 3, frame: 16
|
||||
var Map;
|
||||
const env0_0 = a1;
|
||||
const binding = env0_5;
|
||||
const value3 = binding.has(a1.value);
|
||||
if (result) {
|
||||
if (!(!value3 && env0_5.size >= selectActionComponent.maxValues)) {
|
||||
env0_6(_fun87589);
|
||||
}
|
||||
} else {
|
||||
Map = global.Map;
|
||||
useSearchableSelectComponentSubmitSelection(value3 ? new Map() : new Map());
|
||||
}
|
||||
}
|
||||
|
||||
function useSearchableSelectComponentSubmitSelection_87590() { // fn#87590, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11626:849, owner: useSearchableSelectComponent.submitSelection, offset: 0x01fc4b0e, size: 20 bytes, params: 1, frame: 11
|
||||
useSearchableSelectComponentSubmitSelection(env0_5);
|
||||
}
|
||||
|
||||
function _fun87589(a0) { // fn#87589, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11626:712, offset: 0x01fc4aba, size: 84 bytes, params: 2, frame: 14
|
||||
const Map = global.Map;
|
||||
const map = new Map(a0);
|
||||
if (env0_1) {
|
||||
map.delete(require.value);
|
||||
} else {
|
||||
map.set(require.value, require);
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user