chore: recovery 2 (#5014) merge to 3.11 (#5175)

Co-authored-by: Alireza <ar.sedghi@gmail.com>
Co-authored-by: Dan Rukas <dan.rukas@gmail.com>
Co-authored-by: Tang Cheng <45505657+tctco@users.noreply.github.com>
This commit is contained in:
authored and GitHub committed 2025-07-03 14:08:46 -04:00
1 parent 17ed63eb1d
commit 24e0263fb9
44 files changed
+516 -258

No files matched your search

@@ -14,6 +14,8 @@ const serviceImplementation = {
console.warn('isEmpty() NOT IMPLEMENTED');
return true;
},
_updatePosition: (id: string, position: { x: number; y: number }) =>
console.warn('updatePosition() NOT IMPLEMENTED'),
_customComponent: null,
};
@@ -63,6 +65,16 @@ class UIDialogService {
return serviceImplementation._isEmpty();
}
/**
* Update the position of a specific dialog by id
*
* @param {string} id - The dialog id to update
* @param {{ x: number; y: number }} position - The new position
*/
updatePosition(id: string, position: { x: number; y: number }): void {
return serviceImplementation._updatePosition(id, position);
}
/**
* This provides flexibility in customizing the Modal's default component
*
@@ -75,7 +87,14 @@ class UIDialogService {
/**
* Set the service implementation
*/
setServiceImplementation({ show, hide, hideAll, isEmpty, customComponent }: any): void {
setServiceImplementation({
show,
hide,
hideAll,
isEmpty,
updatePosition,
customComponent,
}: any): void {
if (show) {
serviceImplementation._show = show;
}
@@ -88,6 +107,9 @@ class UIDialogService {
if (isEmpty) {
serviceImplementation._isEmpty = isEmpty;
}
if (updatePosition) {
serviceImplementation._updatePosition = updatePosition;
}
if (customComponent) {
serviceImplementation._customComponent = customComponent;
}