@pushwoosh/smart-components-kit 1.0.29 → 1.0.31
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/OpenActions/helpers.js
CHANGED
|
@@ -10,5 +10,5 @@ export const getSafariUrl = (application, safariUrlArguments) => {
|
|
|
10
10
|
}
|
|
11
11
|
const isSafariConfigured = !!((_application$platform = application.platforms) !== null && _application$platform !== void 0 && (_application$platform = _application$platform[AllPlatforms.Safari]) !== null && _application$platform !== void 0 && _application$platform.isConfigured);
|
|
12
12
|
const safariUrlTemplate = ((_application$properti = application.properties) === null || _application$properti === void 0 ? void 0 : _application$properti.safari_url_template) || '';
|
|
13
|
-
return isSafariConfigured ?
|
|
13
|
+
return isSafariConfigured ? safariUrlTemplate.replace('%@%@', safariUrlArguments) : '';
|
|
14
14
|
};
|
|
@@ -26,7 +26,7 @@ export const usePresetOpenActions = pushPreset => {
|
|
|
26
26
|
}
|
|
27
27
|
}, [openToast, rpcGateway]);
|
|
28
28
|
const getOpenActionsByPreset = useCallback(async () => {
|
|
29
|
-
var _pushPreset$localized, _pushPreset$openActio;
|
|
29
|
+
var _pushPreset$localized, _pushPreset$openActio, _pushPreset$openActio2;
|
|
30
30
|
if (!pushPreset) {
|
|
31
31
|
return;
|
|
32
32
|
}
|
|
@@ -42,6 +42,10 @@ export const usePresetOpenActions = pushPreset => {
|
|
|
42
42
|
const deeplinkCommonInfo = pushPreset.openAction.kind.data;
|
|
43
43
|
defaultDeeplinkUrl = await getDeeplinkUrl(deeplinkCommonInfo);
|
|
44
44
|
}
|
|
45
|
+
if (((_pushPreset$openActio2 = pushPreset.openAction) === null || _pushPreset$openActio2 === void 0 || (_pushPreset$openActio2 = _pushPreset$openActio2.kind) === null || _pushPreset$openActio2 === void 0 ? void 0 : _pushPreset$openActio2.type) === 'link') {
|
|
46
|
+
const deeplinkManual = pushPreset.openAction.kind.data;
|
|
47
|
+
defaultDeeplinkUrl = deeplinkManual.url;
|
|
48
|
+
}
|
|
45
49
|
// setTimeout нужен, чтобы не получать ошибку 'ResizeObserver loop completed with undelivered notifications.'
|
|
46
50
|
setTimeout(() => {
|
|
47
51
|
setOpenActions({
|
package/package.json
CHANGED