decord/stable/source/actions/ModalActionCreators.tsx
github-actions 57c2214117 chore: update source for stable 347.12
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4973.js (118.4 MB)
2026-09-29 21:26:22 +00:00

93 lines
3.6 KiB
TypeScript

// Module ID: 4991
// Function ID: 4992
// Name: ModalActionCreators
// Dependencies: [1074, 4992, 4645, 4993, 4653, 573, 4646, 4994, 2]
// Module 4991 (ModalActionCreators)
import DispatcherDefault from "Dispatcher" /* 573 */;
import Constants from "Constants" /* 1074 */;
import NavigationRouteUtils from "NavigationRouteUtils" /* 4645 */;
import Types from "Types" /* 4653 */;
import uniqueIdDefault from "uniqueId" /* 4992 */;
import getDeprecatedModalDataDefault from "getDeprecatedModalData" /* 4993 */;
import size from "module_2" /* 2 */;
const require = globalThis.__r;
const AppContext = Constants.AppContext;
const result = size.fileFinishedImporting("actions/ModalActionCreators.tsx");
export default {
push(modal, props) {
let tmp = arg2;
if (arg2 === undefined) {
tmp = uniqueIdDefault("modal");
}
let APP = arg4;
if (arg4 === undefined) {
APP = AppContext.APP;
}
const obj = NavigationRouteUtils;
const merged = Object.assign(arg3);
obj.pushModal({ modal: getDeprecatedModalDataDefault(modal, {}, props, tmp), trigger: Types.ModalOpenTrigger.AUTOMATIC });
const obj2 = { modal: getDeprecatedModalDataDefault(modal, {}, props, tmp), trigger: Types.ModalOpenTrigger.AUTOMATIC };
const element = { type: "MODAL_PUSH", modal, props, key: tmp, appContext: APP };
DispatcherDefault.dispatch(element);
return tmp;
},
pushLazy(promise, merged, c3, navigationParams) {
const self = this;
importDefault = promise;
dependencyMap = merged;
let tmp = c3;
if (c3 === undefined) {
tmp = uniqueIdDefault("modal");
}
closure_3 = tmp;
_require = navigationParams;
const rootNavigationRef = require("RootNavigationRef").getRootNavigationRef();
if (null != rootNavigationRef) {
if (rootNavigationRef.isReady()) {
if (promise instanceof Promise) {
let nextPromise = promise.then((result) => result.default);
} else {
nextPromise = promise();
}
nextPromise.then((result) => self.push(result, closure_2, closure_3, closure_0));
}
}
const obj = require("RootNavigationRef");
return new Promise((arg0) => {
closure_0 = arg0;
return promise(merged[7]).enqueue(() => closure_0(self.pushLazy(closure_1, closure_2, closure_3, closure_0)));
});
},
updateAnimation(key, SLIDE_IN_OUT) {
const element = { type: "MODAL_UPDATE", key, props: {}, partial: true, animation: SLIDE_IN_OUT };
DispatcherDefault.dispatch(element);
},
pop() {
NavigationRouteUtils.popModal();
DispatcherDefault.dispatch({ type: "MODAL_POP" });
},
popWithKey(c3, onExited) {
NavigationRouteUtils.popModal(c3, onExited);
DispatcherDefault.dispatch({ type: "MODAL_POP", key: c3, onExited });
},
popAboveKey(voiceChannelKey) {
return NavigationRouteUtils.popModalsAboveKey(voiceChannelKey);
},
popAll() {
NavigationRouteUtils.popAllModals();
DispatcherDefault.dispatch({ type: "MODAL_POP_ALL" });
DispatcherDefault.dispatch({ type: "EMAIL_VERIFICATION_MODAL_CLOSE" });
DispatcherDefault.dispatch({ type: "GUILD_SETTINGS_CLOSE" });
DispatcherDefault.dispatch({ type: "HIDE_ACTION_SHEET" });
DispatcherDefault.dispatch({ type: "DISPLAYED_INVITE_CLEAR" });
DispatcherDefault.dispatch({ type: "NOTIFICATION_SETTINGS_MODAL_CLOSE" });
DispatcherDefault.dispatch({ type: "QUICKSWITCHER_HIDE" });
DispatcherDefault.dispatch({ type: "USER_SETTINGS_MODAL_CLOSE" });
DispatcherDefault.dispatch({ type: "CONNECTIONS_GRID_MODAL_HIDE" });
DispatcherDefault.dispatch({ type: "USER_PROFILE_MODAL_CLOSE" });
}
};