@pushwoosh/smart-components-kit 1.0.28 → 1.0.30

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.
@@ -21,7 +21,7 @@ export const LanguagesSelectForm = ({
21
21
  return languageItems.filter(lang => {
22
22
  return lang.name.toLowerCase().includes(search.toLowerCase());
23
23
  });
24
- }, [allLanguageItems, search, showAllLanguages]);
24
+ }, [allLanguageItems, search, showAllLanguages, langs]);
25
25
  return React.createElement(Vertical, {
26
26
  "$gap": 8
27
27
  }, React.createElement(SearchInput, {
@@ -77,13 +77,8 @@ export const OpenActionsSummary = ({
77
77
  };
78
78
  return React.createElement(Vertical, {
79
79
  "$gap": 8
80
- }, React.createElement(Text, {
81
- "$variant": "h4",
82
- "$uppercase": true
83
- }, "On click actions"), React.createElement(Vertical, {
84
- "$gap": 8
85
- }, !openActions ? React.createElement(Spinner, {
80
+ }, openActions ? React.createElement(React.Fragment, null, hasCustomPlatformsDeeplink && renderInfoBlock('mobile', 'follow the Deep link'), Object.entries(platformsDeeplinkUrls).map(([platformKey, url]) => renderPlatformDeepLink(+platformKey, url)), allPlatformsDeeplinkUrl && hasCustomPlatformsDeeplink && renderPlatformDeepLink('Other platforms', allPlatformsDeeplinkUrl), allPlatformsDeeplinkUrl && !hasCustomPlatformsDeeplink && renderInfoBlock('mobile', 'follow the Deep link', allPlatformsDeeplinkUrl), !allPlatformsDeeplinkUrl && !hasCustomPlatformsDeeplink && renderInfoBlock('mobile', 'open home page in application'), webPageUrl && renderInfoBlock('web', 'open URL in browser', webPageUrl), webPageUrl && safariUrl && renderInfoBlock('Safari', 'open URL in Safari browser', safariUrl), !webPageUrl && renderInfoBlock('web', 'open home page in browser'), showRichmedia && renderRichmedia(showRichmedia)) : React.createElement(Spinner, {
86
81
  color: Color.MAIN,
87
82
  size: "medium"
88
- }) : React.createElement(React.Fragment, null, hasCustomPlatformsDeeplink && renderInfoBlock('mobile', 'follow the Deep link'), Object.entries(platformsDeeplinkUrls).map(([platformKey, url]) => renderPlatformDeepLink(+platformKey, url)), allPlatformsDeeplinkUrl && hasCustomPlatformsDeeplink && renderPlatformDeepLink('Other platforms', allPlatformsDeeplinkUrl), allPlatformsDeeplinkUrl && !hasCustomPlatformsDeeplink && renderInfoBlock('mobile', 'follow the Deep link', allPlatformsDeeplinkUrl), !allPlatformsDeeplinkUrl && !hasCustomPlatformsDeeplink && renderInfoBlock('mobile', 'open home page in application'), webPageUrl && renderInfoBlock('web', 'open URL in browser', webPageUrl), webPageUrl && safariUrl && renderInfoBlock('Safari', 'open URL in Safari browser', safariUrl), !webPageUrl && renderInfoBlock('web', 'open home page in browser'), showRichmedia && renderRichmedia(showRichmedia))));
83
+ }));
89
84
  };
@@ -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
@@ -51,5 +51,5 @@
51
51
  "engines": {
52
52
  "node": ">= 18"
53
53
  },
54
- "version": "1.0.28"
54
+ "version": "1.0.30"
55
55
  }