@decky/ui 4.10.2 → 4.10.4
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/dist/components/Modal.d.ts +1 -1
- package/dist/components/Modal.js +11 -10
- package/package.json +1 -1
- package/src/components/Modal.ts +16 -12
|
@@ -42,7 +42,7 @@ export interface ConfirmModalProps extends ModalRootProps {
|
|
|
42
42
|
bMiddleDisabled?: boolean;
|
|
43
43
|
}
|
|
44
44
|
export declare const ConfirmModal: FC<ConfirmModalProps>;
|
|
45
|
-
export declare const ModalRoot:
|
|
45
|
+
export declare const ModalRoot: any;
|
|
46
46
|
interface SimpleModalProps {
|
|
47
47
|
active?: boolean;
|
|
48
48
|
children: ReactNode;
|
package/dist/components/Modal.js
CHANGED
|
@@ -9,17 +9,18 @@ export const showModal = (modal, parent, props = {
|
|
|
9
9
|
bHideActions: props.bHideActionIcons,
|
|
10
10
|
});
|
|
11
11
|
};
|
|
12
|
-
export const ConfirmModal = findModuleExport((e) =>
|
|
13
|
-
export const ModalRoot =
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
12
|
+
export const ConfirmModal = findModuleExport((e) => e?.toString()?.includes('bUpdateDisabled') && e?.toString()?.includes('closeModal') && e?.toString()?.includes('onGamepadCancel'));
|
|
13
|
+
export const ModalRoot = findModuleExport((e) => typeof e === 'function' && e.toString().includes('Either closeModal or onCancel should be passed to GenericDialog. Classes: ')) ||
|
|
14
|
+
Object.values(findModule((m) => {
|
|
15
|
+
if (typeof m !== 'object')
|
|
16
|
+
return false;
|
|
17
|
+
for (let prop in m) {
|
|
18
|
+
if (m[prop]?.m_mapModalManager && Object.values(m)?.find((x) => x?.type)) {
|
|
19
|
+
return true;
|
|
20
|
+
}
|
|
19
21
|
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}) || {})?.find((x) => x?.type?.toString?.()?.includes('((function(){'));
|
|
22
|
+
return false;
|
|
23
|
+
}) || {})?.find((x) => x?.type?.toString?.()?.includes('((function(){'));
|
|
23
24
|
const [ModalModule, _ModalPosition] = findModuleDetailsByExport((e) => e?.toString().includes('.ModalPosition'), 5);
|
|
24
25
|
const ModalModuleProps = ModalModule ? Object.values(ModalModule) : [];
|
|
25
26
|
export const SimpleModal = ModalModuleProps.find((prop) => {
|
package/package.json
CHANGED
package/src/components/Modal.ts
CHANGED
|
@@ -83,22 +83,26 @@ export interface ConfirmModalProps extends ModalRootProps {
|
|
|
83
83
|
}
|
|
84
84
|
|
|
85
85
|
export const ConfirmModal = findModuleExport(
|
|
86
|
-
(e: Export) =>
|
|
86
|
+
(e: Export) => e?.toString()?.includes('bUpdateDisabled') && e?.toString()?.includes('closeModal') && e?.toString()?.includes('onGamepadCancel'),
|
|
87
87
|
) as FC<ConfirmModalProps>;
|
|
88
88
|
|
|
89
|
-
export const ModalRoot =
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
89
|
+
export const ModalRoot =
|
|
90
|
+
// new
|
|
91
|
+
findModuleExport((e: Export) => typeof e === 'function' && e.toString().includes('Either closeModal or onCancel should be passed to GenericDialog. Classes: ')) ||
|
|
92
|
+
// old
|
|
93
|
+
Object.values(
|
|
94
|
+
findModule((m: any) => {
|
|
95
|
+
if (typeof m !== 'object') return false;
|
|
96
|
+
|
|
97
|
+
for (let prop in m) {
|
|
98
|
+
if (m[prop]?.m_mapModalManager && Object.values(m)?.find((x: any) => x?.type)) {
|
|
99
|
+
return true;
|
|
100
|
+
}
|
|
96
101
|
}
|
|
97
|
-
}
|
|
98
102
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
)?.find((x: any) => x?.type?.toString?.()?.includes('((function(){')) as FC<ModalRootProps>;
|
|
103
|
+
return false;
|
|
104
|
+
}) || {},
|
|
105
|
+
)?.find((x: any) => x?.type?.toString?.()?.includes('((function(){')) as FC<ModalRootProps>;
|
|
102
106
|
|
|
103
107
|
interface SimpleModalProps {
|
|
104
108
|
active?: boolean;
|