@elementor/editor-controls 3.32.0-65 → 3.32.0-67

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
@@ -4482,6 +4482,10 @@ var KeyValueControl = createControl((props = {}) => {
4482
4482
  });
4483
4483
  const keyLabel = props.keyName || (0, import_i18n33.__)("Key", "elementor");
4484
4484
  const valueLabel = props.valueName || (0, import_i18n33.__)("Value", "elementor");
4485
+ const { keyHelper, valueHelper } = props.getHelperText?.(sessionState.key, sessionState.value) || {
4486
+ keyHelper: void 0,
4487
+ valueHelper: void 0
4488
+ };
4485
4489
  const [keyRegex, valueRegex, errMsg] = (0, import_react37.useMemo)(
4486
4490
  () => [
4487
4491
  props.regexKey ? new RegExp(props.regexKey) : void 0,
@@ -4535,20 +4539,13 @@ var KeyValueControl = createControl((props = {}) => {
4535
4539
  });
4536
4540
  }
4537
4541
  };
4538
- return /* @__PURE__ */ React70.createElement(PropProvider, { ...propContext, value, setValue: handleChange }, /* @__PURE__ */ React70.createElement(import_ui61.Grid, { container: true, gap: 1.5 }, /* @__PURE__ */ React70.createElement(import_ui61.Grid, { item: true, xs: 12, display: "flex", flexDirection: "column" }, /* @__PURE__ */ React70.createElement(import_ui61.FormLabel, { size: "tiny", sx: { pb: 1 } }, keyLabel), /* @__PURE__ */ React70.createElement(PropKeyProvider, { bind: "key" }, /* @__PURE__ */ React70.createElement(
4539
- TextControl,
4540
- {
4541
- inputValue: sessionState.key,
4542
- error: !!keyError,
4543
- helperText: props.getHelperText?.(sessionState.key, sessionState.value)?.keyHelper
4544
- }
4545
- )), !!keyError && /* @__PURE__ */ React70.createElement(import_ui61.FormHelperText, { error: true }, keyError)), /* @__PURE__ */ React70.createElement(import_ui61.Grid, { item: true, xs: 12, display: "flex", flexDirection: "column" }, /* @__PURE__ */ React70.createElement(import_ui61.FormLabel, { size: "tiny", sx: { pb: 1 } }, valueLabel), /* @__PURE__ */ React70.createElement(PropKeyProvider, { bind: "value" }, /* @__PURE__ */ React70.createElement(
4542
+ return /* @__PURE__ */ React70.createElement(PropProvider, { ...propContext, value, setValue: handleChange }, /* @__PURE__ */ React70.createElement(import_ui61.Grid, { container: true, gap: 1.5 }, /* @__PURE__ */ React70.createElement(import_ui61.Grid, { item: true, xs: 12, display: "flex", flexDirection: "column" }, /* @__PURE__ */ React70.createElement(import_ui61.FormLabel, { size: "tiny", sx: { pb: 1 } }, keyLabel), /* @__PURE__ */ React70.createElement(PropKeyProvider, { bind: "key" }, /* @__PURE__ */ React70.createElement(TextControl, { inputValue: sessionState.key, error: !!keyError, helperText: keyHelper })), !!keyError && /* @__PURE__ */ React70.createElement(import_ui61.FormHelperText, { error: true }, keyError)), /* @__PURE__ */ React70.createElement(import_ui61.Grid, { item: true, xs: 12, display: "flex", flexDirection: "column" }, /* @__PURE__ */ React70.createElement(import_ui61.FormLabel, { size: "tiny", sx: { pb: 1 } }, valueLabel), /* @__PURE__ */ React70.createElement(PropKeyProvider, { bind: "value" }, /* @__PURE__ */ React70.createElement(
4546
4543
  TextControl,
4547
4544
  {
4548
4545
  inputValue: sessionState.value,
4549
4546
  error: !!valueError,
4550
4547
  inputDisabled: !!keyError,
4551
- helperText: props.getHelperText?.(sessionState.key, sessionState.value)?.valueHelper
4548
+ helperText: valueHelper
4552
4549
  }
4553
4550
  )), !!valueError && /* @__PURE__ */ React70.createElement(import_ui61.FormHelperText, { error: true }, valueError))));
4554
4551
  });