@elementor/editor-controls 4.1.0-798 → 4.1.0-800

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/dist/index.js CHANGED
@@ -511,6 +511,7 @@ var ImageMediaControl = createControl(({ mediaTypes = ["image"] }) => {
511
511
  mediaTypes,
512
512
  multiple: false,
513
513
  selected: id?.value || null,
514
+ allowUrlImport: true,
514
515
  onSelect: (selectedAttachment) => {
515
516
  setValue({
516
517
  id: {
@@ -519,6 +520,12 @@ var ImageMediaControl = createControl(({ mediaTypes = ["image"] }) => {
519
520
  },
520
521
  url: null
521
522
  });
523
+ },
524
+ onSelectUrl: (selectedUrl) => {
525
+ setValue({
526
+ id: null,
527
+ url: import_editor_props.urlPropTypeUtil.create(selectedUrl)
528
+ });
522
529
  }
523
530
  });
524
531
  return /* @__PURE__ */ React11.createElement(ControlActions, null, /* @__PURE__ */ React11.createElement(import_ui4.Card, { variant: "outlined" }, /* @__PURE__ */ React11.createElement(import_ui4.CardMedia, { image: src, sx: { height: propType.meta.isDynamic ? 134 : 150 } }, isFetching ? /* @__PURE__ */ React11.createElement(import_ui4.Stack, { justifyContent: "center", alignItems: "center", width: "100%", height: "100%" }, /* @__PURE__ */ React11.createElement(import_ui4.CircularProgress, null)) : /* @__PURE__ */ React11.createElement(React11.Fragment, null)), /* @__PURE__ */ React11.createElement(import_ui4.CardOverlay, null, /* @__PURE__ */ React11.createElement(import_ui4.Stack, { gap: 1 }, /* @__PURE__ */ React11.createElement(
@@ -540,7 +547,7 @@ var ImageMediaControl = createControl(({ mediaTypes = ["image"] }) => {
540
547
  onClick: () => open({ mode: "upload" })
541
548
  },
542
549
  (0, import_i18n.__)("Upload", "elementor")
543
- )))));
550
+ ), /* @__PURE__ */ React11.createElement(import_ui4.Button, { size: "tiny", variant: "text", color: "inherit", onClick: () => open({ mode: "url" }) }, (0, import_i18n.__)("Insert from URL", "elementor"))))));
544
551
  });
545
552
 
546
553
  // src/controls/select-control.tsx
@@ -6537,7 +6544,7 @@ var TransformOriginControl = () => {
6537
6544
  var ControlFields2 = ({ control }) => {
6538
6545
  const context = useBoundProp(import_editor_props49.transformOriginPropTypeUtil);
6539
6546
  const rowRef = (0, import_react58.useRef)(null);
6540
- return /* @__PURE__ */ React100.createElement(PropProvider, { ...context }, /* @__PURE__ */ React100.createElement(PropKeyProvider, { bind: control.bind }, /* @__PURE__ */ React100.createElement(PopoverGridContainer, { ref: rowRef }, /* @__PURE__ */ React100.createElement(import_ui84.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React100.createElement(ControlFormLabel, null, control.label)), /* @__PURE__ */ React100.createElement(import_ui84.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React100.createElement(SizeControl, { variant: "length", units: control.units, anchorRef: rowRef, disableCustom: true })))));
6547
+ return /* @__PURE__ */ React100.createElement(PropProvider, { ...context }, /* @__PURE__ */ React100.createElement(PropKeyProvider, { bind: control.bind }, /* @__PURE__ */ React100.createElement(PopoverGridContainer, { ref: rowRef }, /* @__PURE__ */ React100.createElement(import_ui84.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React100.createElement(ControlFormLabel, null, control.label)), /* @__PURE__ */ React100.createElement(import_ui84.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React100.createElement(SizeControl, { variant: "length", units: control.units, anchorRef: rowRef })))));
6541
6548
  };
6542
6549
 
6543
6550
  // src/controls/transform-control/transform-settings-control.tsx