Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4745.js (118.4 MB)
92 lines
3.4 KiB
TypeScript
92 lines
3.4 KiB
TypeScript
// Module ID: 4763
|
|
// Function ID: 4764
|
|
// Name: ModalActionCreators
|
|
// Dependencies: [1074, 4764, 4417, 4765, 573, 4418, 4766, 2]
|
|
|
|
// Module 4763 (ModalActionCreators)
|
|
import DispatcherDefault from "Dispatcher" /* 573 */;
|
|
import Constants from "Constants" /* 1074 */;
|
|
import NavigationRouteUtils from "NavigationRouteUtils" /* 4417 */;
|
|
import uniqueIdDefault from "uniqueId" /* 4764 */;
|
|
import getDeprecatedModalDataDefault from "getDeprecatedModalData" /* 4765 */;
|
|
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) });
|
|
const obj2 = { modal: getDeprecatedModalDataDefault(modal, {}, props, tmp) };
|
|
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[6]).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" });
|
|
}
|
|
};
|