@elementor/editor-components 4.0.0-541 → 4.0.0-543

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.mjs CHANGED
@@ -445,7 +445,7 @@ function useNavigateBack() {
445
445
  }
446
446
 
447
447
  // src/utils/tracking.ts
448
- import { getMixpanel } from "@elementor/mixpanel";
448
+ import { getMixpanel } from "@elementor/events";
449
449
  import { __getState as getState2 } from "@elementor/store";
450
450
  var FEATURE_NAME = "Components";
451
451
  var trackComponentEvent = ({ action, source, ...data }) => {
@@ -3001,7 +3001,7 @@ import * as React19 from "react";
3001
3001
  import { useEffect as useEffect2, useMemo as useMemo3, useRef as useRef5, useState as useState8 } from "react";
3002
3002
  import { getElementLabel } from "@elementor/editor-elements";
3003
3003
  import { notify as notify3 } from "@elementor/editor-notifications";
3004
- import { Form as FormElement, ThemeProvider as ThemeProvider3 } from "@elementor/editor-ui";
3004
+ import { Form as FormElement, ThemeProvider as ThemeProvider3, useTextFieldAutoSelect } from "@elementor/editor-ui";
3005
3005
  import { ComponentsIcon as ComponentsIcon3 } from "@elementor/icons";
3006
3006
  import { __getState as getState15 } from "@elementor/store";
3007
3007
  import { Button as Button3, FormLabel as FormLabel2, Grid as Grid2, Popover as Popover3, Stack as Stack10, TextField as TextField3, Typography as Typography10 } from "@elementor/ui";
@@ -3398,6 +3398,7 @@ var Form2 = ({
3398
3398
  closePopup
3399
3399
  }) => {
3400
3400
  const { values, errors, isValid, handleChange, validateForm: validateForm2 } = useForm(initialValues);
3401
+ const nameInputRef = useTextFieldAutoSelect();
3401
3402
  const { components } = useComponents();
3402
3403
  const existingComponentNames = useMemo3(() => {
3403
3404
  return components?.map((component) => component.name) ?? [];
@@ -3444,7 +3445,8 @@ var Form2 = ({
3444
3445
  onChange: (e) => handleChange(e, "componentName", changeValidationSchema),
3445
3446
  inputProps: { style: { color: "text.primary", fontWeight: "600" } },
3446
3447
  error: Boolean(errors.componentName),
3447
- helperText: errors.componentName
3448
+ helperText: errors.componentName,
3449
+ inputRef: nameInputRef
3448
3450
  }
3449
3451
  ))), /* @__PURE__ */ React19.createElement(Stack10, { direction: "row", justifyContent: "flex-end", alignSelf: "end", py: 1, px: 1.5 }, /* @__PURE__ */ React19.createElement(Button3, { onClick: closePopup, color: "secondary", variant: "text", size: "small" }, texts.cancel), /* @__PURE__ */ React19.createElement(Button3, { type: "submit", disabled: !isValid, variant: "contained", color: "primary", size: "small" }, texts.create))));
3450
3452
  };