@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.js
CHANGED
|
@@ -469,11 +469,11 @@ function useNavigateBack() {
|
|
|
469
469
|
}
|
|
470
470
|
|
|
471
471
|
// src/utils/tracking.ts
|
|
472
|
-
var
|
|
472
|
+
var import_events = require("@elementor/events");
|
|
473
473
|
var import_store7 = require("@elementor/store");
|
|
474
474
|
var FEATURE_NAME = "Components";
|
|
475
475
|
var trackComponentEvent = ({ action, source, ...data }) => {
|
|
476
|
-
const { dispatchEvent, config } = (0,
|
|
476
|
+
const { dispatchEvent, config } = (0, import_events.getMixpanel)();
|
|
477
477
|
if (!config?.names?.components?.[action]) {
|
|
478
478
|
return;
|
|
479
479
|
}
|
|
@@ -3383,6 +3383,7 @@ var Form2 = ({
|
|
|
3383
3383
|
closePopup
|
|
3384
3384
|
}) => {
|
|
3385
3385
|
const { values, errors, isValid, handleChange, validateForm: validateForm2 } = useForm(initialValues);
|
|
3386
|
+
const nameInputRef = (0, import_editor_ui11.useTextFieldAutoSelect)();
|
|
3386
3387
|
const { components } = useComponents();
|
|
3387
3388
|
const existingComponentNames = (0, import_react10.useMemo)(() => {
|
|
3388
3389
|
return components?.map((component) => component.name) ?? [];
|
|
@@ -3429,7 +3430,8 @@ var Form2 = ({
|
|
|
3429
3430
|
onChange: (e) => handleChange(e, "componentName", changeValidationSchema),
|
|
3430
3431
|
inputProps: { style: { color: "text.primary", fontWeight: "600" } },
|
|
3431
3432
|
error: Boolean(errors.componentName),
|
|
3432
|
-
helperText: errors.componentName
|
|
3433
|
+
helperText: errors.componentName,
|
|
3434
|
+
inputRef: nameInputRef
|
|
3433
3435
|
}
|
|
3434
3436
|
))), /* @__PURE__ */ React19.createElement(import_ui16.Stack, { direction: "row", justifyContent: "flex-end", alignSelf: "end", py: 1, px: 1.5 }, /* @__PURE__ */ React19.createElement(import_ui16.Button, { onClick: closePopup, color: "secondary", variant: "text", size: "small" }, texts.cancel), /* @__PURE__ */ React19.createElement(import_ui16.Button, { type: "submit", disabled: !isValid, variant: "contained", color: "primary", size: "small" }, texts.create))));
|
|
3435
3437
|
};
|