ublo-lib 1.22.0 → 1.22.1

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.
@@ -18,10 +18,10 @@ export default function EditorDialog({ lang, options, urls, target, updatePreset
18
18
  const anchorHasHref = target
19
19
  ?.querySelector(":scope > a")
20
20
  ?.hasAttribute("href");
21
- if (!anchorHasHref && preset?.url) {
21
+ if (!anchorHasHref && preset?.url && !preset?.openPage) {
22
22
  delete preset.url;
23
23
  }
24
24
  updatePreset(preset);
25
- }, [preset, updatePreset]);
25
+ }, [preset, updatePreset, target]);
26
26
  return (_jsxs(Dialog, { className: css.dialog, isOpened: !!target, container: null, close: closeEditor, closeOnBackdropClick: false, showAsModal: false, children: [_jsx("div", { className: css.title, children: "Choisissez un widget" }), _jsx("div", { className: css.subtitle, children: "Ce dernier s'ouvrira au clic sur la section selectionn\u00E9e." }), _jsx(MseMPresetEditor, { lang: lang, options: options, urls: urls, selectedPreset: selectedPreset, onChange: setPreset, noLodgingPage: noLodgingPage, children: children }), _jsxs("div", { className: css.buttons, children: [hasObsoletePreset && (_jsxs(Button, { variant: "danger", className: css.removeObsolete, onClick: removeObsoletePreset, children: [_jsx(Icons.CleaningServices, {}), "Nettoyer le preset obsol\u00E8te"] })), _jsx(Button, { variant: "secondary", onClick: closeEditor, children: "Annuler" }), _jsx(Button, { variant: "primary", onClick: updateNewPreset, children: "Valider" })] })] }));
27
27
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ublo-lib",
3
- "version": "1.22.0",
3
+ "version": "1.22.1",
4
4
  "peerDependencies": {
5
5
  "dt-design-system": "^3.1.5",
6
6
  "leaflet": "^1.9.1",