decord/source/lib/ModalRegistry.tsx

54 lines
1.8 KiB
TypeScript
Raw Normal View History

// Module ID: 17126
// Function ID: 17127
// Name: ModalRegistry
2026-07-29 08:29:29 +00:00
// Dependencies: [2]
2026-07-22 07:54:56 +00:00
// Module 17126 (ModalRegistry)
import size from "module_2" /* 2 */;
2026-08-24 06:08:38 +00:00
2026-07-29 08:29:29 +00:00
class ModalRegistry {
constructor(arg0) {
obj = Object.create(new.target.prototype);
obj.modals = global;
obj.stores = (function calculateStores(modals) {
const set = new Set();
const iter = modals[Symbol.iterator]();
while (iter !== undefined) {
let stores = iter.next().stores;
for (const item10016 of stores) {
let addResult = set.add(item10016);
continue;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
continue;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
return Array.from(set);
})(global);
return obj;
2026-07-20 16:05:17 +00:00
}
}
2026-07-29 08:29:29 +00:00
const prototype = ModalRegistry.prototype;
prototype["getStores"] = function getStores() {
return this.stores;
};
prototype["getOpenModal"] = function getOpenModal() {
const modals = this.modals;
const findIndexResult = modals.findIndex((isOpen) => isOpen.isOpen());
if (-1 === findIndexResult) {
return null;
} else {
const getProps = obj3.getProps;
let props;
if (getProps != null) {
props = getProps();
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
if (props == null) {
props = {};
2026-07-20 16:05:17 +00:00
}
const obj = { key: findIndexResult, component: this.modals[findIndexResult].getComponent(), props, closable: null == this.modals[findIndexResult].closable || this.modals[findIndexResult].closable, backdropInstant: null != this.modals[findIndexResult].backdropInstant && this.modals[findIndexResult].backdropInstant, backdropStyle: this.modals[findIndexResult].backdropStyle, disableAnimation: null != this.modals[findIndexResult].disableAnimation && this.modals[findIndexResult].disableAnimation };
2026-07-29 08:29:29 +00:00
return obj;
}
};
const result = size.fileFinishedImporting("lib/ModalRegistry.tsx");
2026-07-23 10:11:24 +00:00
2026-07-29 08:29:29 +00:00
export default ModalRegistry;