@onecx/angular-accelerator 9.0.0-rc.8 → 9.0.0-rc.9
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.
|
@@ -5594,7 +5594,9 @@ class PortalDialogService {
|
|
|
5594
5594
|
}
|
|
5595
5595
|
openDialog(title, componentOrMessage, primaryButtonTranslationKeyOrDetails, secondaryButtonTranslationKeyOrDetails, extrasOrShowXButton = {}) {
|
|
5596
5596
|
const isObject = typeof extrasOrShowXButton === 'object';
|
|
5597
|
-
const dialogOptions = isObject
|
|
5597
|
+
const dialogOptions = isObject
|
|
5598
|
+
? extrasOrShowXButton
|
|
5599
|
+
: { showXButton: extrasOrShowXButton || false };
|
|
5598
5600
|
const translateParams = this.prepareTitleForTranslation(title);
|
|
5599
5601
|
const componentToRender = this.getComponentToRender(componentOrMessage);
|
|
5600
5602
|
const dynamicDialogDataConfig = {
|
|
@@ -5605,7 +5607,7 @@ class PortalDialogService {
|
|
|
5605
5607
|
secondaryButtonDetails: this.buttonDetailsOrTranslationKey(secondaryButtonTranslationKeyOrDetails),
|
|
5606
5608
|
customButtons: dialogOptions.customButtons?.map((button) => this.buttonDetailsOrTranslationKey(button)),
|
|
5607
5609
|
autoFocusButton: dialogOptions.autoFocusButton,
|
|
5608
|
-
autoFocusButtonCustomId: dialogOptions.autoFocusButtonCustomId
|
|
5610
|
+
autoFocusButtonCustomId: dialogOptions.autoFocusButtonCustomId,
|
|
5609
5611
|
},
|
|
5610
5612
|
componentData: componentToRender.inputs,
|
|
5611
5613
|
};
|
|
@@ -5754,8 +5756,11 @@ class PortalDialogService {
|
|
|
5754
5756
|
return obj instanceof Type;
|
|
5755
5757
|
}
|
|
5756
5758
|
setFocusOnInitiator(dialogOptions) {
|
|
5759
|
+
const hasOnCloseFocus = Object.hasOwn(dialogOptions, 'onCloseFocus') && dialogOptions.onCloseFocus !== 'initiator';
|
|
5760
|
+
if (hasOnCloseFocus)
|
|
5761
|
+
return;
|
|
5757
5762
|
const initiator = dialogOptions.initiatorRef;
|
|
5758
|
-
if (!initiator || typeof document === 'undefined' || !document.contains(initiator))
|
|
5763
|
+
if (!initiator || typeof document === 'undefined' || !document.contains(initiator) || dialogOptions.onCloseFocus !== 'initiator')
|
|
5759
5764
|
return;
|
|
5760
5765
|
else {
|
|
5761
5766
|
initiator.focus();
|
|
@@ -6169,7 +6174,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
|
|
|
6169
6174
|
}] });
|
|
6170
6175
|
|
|
6171
6176
|
const LIB_NAME = '@onecx/angular-accelerator';
|
|
6172
|
-
const LIB_VERSION = '9.0.0-rc.
|
|
6177
|
+
const LIB_VERSION = '9.0.0-rc.9';
|
|
6173
6178
|
|
|
6174
6179
|
class AngularAcceleratorMissingTranslationHandler extends MultiLanguageMissingTranslationHandler {
|
|
6175
6180
|
}
|