@elementor/editor-editing-panel 4.0.0-573 → 4.0.0-597
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.d.mts +86 -34
- package/dist/index.d.ts +86 -34
- package/dist/index.js +16 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +17 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +21 -21
- package/src/components/css-classes/css-class-menu.tsx +16 -2
- package/src/controls-registry/controls-registry.tsx +2 -2
- package/src/dynamics/init.ts +1 -0
- package/src/reset-style-props.tsx +1 -0
package/dist/index.d.mts
CHANGED
|
@@ -1257,65 +1257,117 @@ declare const controlTypes: {
|
|
|
1257
1257
|
readonly layout: "full";
|
|
1258
1258
|
readonly propTypeUtil: {
|
|
1259
1259
|
extract: (prop: unknown) => {
|
|
1260
|
-
content:
|
|
1261
|
-
|
|
1260
|
+
content: {
|
|
1261
|
+
$$type: "string";
|
|
1262
|
+
value: string | null;
|
|
1263
|
+
disabled?: boolean | undefined;
|
|
1264
|
+
} | null;
|
|
1265
|
+
children: unknown[];
|
|
1262
1266
|
} | null;
|
|
1263
|
-
isValid: (prop: unknown) => prop is _elementor_editor_props.TransformablePropValue<"html-
|
|
1264
|
-
content:
|
|
1265
|
-
|
|
1267
|
+
isValid: (prop: unknown) => prop is _elementor_editor_props.TransformablePropValue<"html-v3", {
|
|
1268
|
+
content: {
|
|
1269
|
+
$$type: "string";
|
|
1270
|
+
value: string | null;
|
|
1271
|
+
disabled?: boolean | undefined;
|
|
1272
|
+
} | null;
|
|
1273
|
+
children: unknown[];
|
|
1266
1274
|
}>;
|
|
1267
1275
|
create: {
|
|
1268
1276
|
(value: {
|
|
1269
|
-
content:
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1277
|
+
content: {
|
|
1278
|
+
$$type: "string";
|
|
1279
|
+
value: string | null;
|
|
1280
|
+
disabled?: boolean | undefined;
|
|
1281
|
+
} | null;
|
|
1282
|
+
children: unknown[];
|
|
1283
|
+
}): _elementor_editor_props.TransformablePropValue<"html-v3", {
|
|
1284
|
+
content: {
|
|
1285
|
+
$$type: "string";
|
|
1286
|
+
value: string | null;
|
|
1287
|
+
disabled?: boolean | undefined;
|
|
1288
|
+
} | null;
|
|
1289
|
+
children: unknown[];
|
|
1274
1290
|
}>;
|
|
1275
1291
|
(value: {
|
|
1276
|
-
content:
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1292
|
+
content: {
|
|
1293
|
+
$$type: "string";
|
|
1294
|
+
value: string | null;
|
|
1295
|
+
disabled?: boolean | undefined;
|
|
1296
|
+
} | null;
|
|
1297
|
+
children: unknown[];
|
|
1298
|
+
}, createOptions?: _elementor_editor_props.CreateOptions): _elementor_editor_props.TransformablePropValue<"html-v3", {
|
|
1299
|
+
content: {
|
|
1300
|
+
$$type: "string";
|
|
1301
|
+
value: string | null;
|
|
1302
|
+
disabled?: boolean | undefined;
|
|
1303
|
+
} | null;
|
|
1304
|
+
children: unknown[];
|
|
1281
1305
|
}>;
|
|
1282
1306
|
(value: (prev?: {
|
|
1283
|
-
content:
|
|
1284
|
-
|
|
1307
|
+
content: {
|
|
1308
|
+
$$type: "string";
|
|
1309
|
+
value: string | null;
|
|
1310
|
+
disabled?: boolean | undefined;
|
|
1311
|
+
} | null;
|
|
1312
|
+
children: unknown[];
|
|
1285
1313
|
} | undefined) => {
|
|
1286
|
-
content:
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1314
|
+
content: {
|
|
1315
|
+
$$type: "string";
|
|
1316
|
+
value: string | null;
|
|
1317
|
+
disabled?: boolean | undefined;
|
|
1318
|
+
} | null;
|
|
1319
|
+
children: unknown[];
|
|
1320
|
+
}, createOptions: _elementor_editor_props.CreateOptions): _elementor_editor_props.TransformablePropValue<"html-v3", {
|
|
1321
|
+
content: {
|
|
1322
|
+
$$type: "string";
|
|
1323
|
+
value: string | null;
|
|
1324
|
+
disabled?: boolean | undefined;
|
|
1325
|
+
} | null;
|
|
1326
|
+
children: unknown[];
|
|
1291
1327
|
}>;
|
|
1292
1328
|
};
|
|
1293
1329
|
schema: zod.ZodObject<{
|
|
1294
|
-
$$type: zod.ZodLiteral<"html-
|
|
1330
|
+
$$type: zod.ZodLiteral<"html-v3">;
|
|
1295
1331
|
value: zod.ZodType<{
|
|
1296
|
-
content:
|
|
1297
|
-
|
|
1332
|
+
content: {
|
|
1333
|
+
$$type: "string";
|
|
1334
|
+
value: string | null;
|
|
1335
|
+
disabled?: boolean | undefined;
|
|
1336
|
+
} | null;
|
|
1337
|
+
children: unknown[];
|
|
1298
1338
|
}, zod.ZodTypeDef, {
|
|
1299
|
-
content:
|
|
1300
|
-
|
|
1339
|
+
content: {
|
|
1340
|
+
$$type: "string";
|
|
1341
|
+
value: string | null;
|
|
1342
|
+
disabled?: boolean | undefined;
|
|
1343
|
+
} | null;
|
|
1344
|
+
children: unknown[];
|
|
1301
1345
|
}>;
|
|
1302
1346
|
disabled: zod.ZodOptional<zod.ZodBoolean>;
|
|
1303
1347
|
}, "strict", zod.ZodTypeAny, {
|
|
1304
|
-
$$type: "html-
|
|
1348
|
+
$$type: "html-v3";
|
|
1305
1349
|
value: {
|
|
1306
|
-
content:
|
|
1307
|
-
|
|
1350
|
+
content: {
|
|
1351
|
+
$$type: "string";
|
|
1352
|
+
value: string | null;
|
|
1353
|
+
disabled?: boolean | undefined;
|
|
1354
|
+
} | null;
|
|
1355
|
+
children: unknown[];
|
|
1308
1356
|
};
|
|
1309
1357
|
disabled?: boolean | undefined;
|
|
1310
1358
|
}, {
|
|
1311
|
-
$$type: "html-
|
|
1359
|
+
$$type: "html-v3";
|
|
1312
1360
|
value: {
|
|
1313
|
-
content:
|
|
1314
|
-
|
|
1361
|
+
content: {
|
|
1362
|
+
$$type: "string";
|
|
1363
|
+
value: string | null;
|
|
1364
|
+
disabled?: boolean | undefined;
|
|
1365
|
+
} | null;
|
|
1366
|
+
children: unknown[];
|
|
1315
1367
|
};
|
|
1316
1368
|
disabled?: boolean | undefined;
|
|
1317
1369
|
}>;
|
|
1318
|
-
key: "html-
|
|
1370
|
+
key: "html-v3";
|
|
1319
1371
|
};
|
|
1320
1372
|
};
|
|
1321
1373
|
readonly email: {
|
package/dist/index.d.ts
CHANGED
|
@@ -1257,65 +1257,117 @@ declare const controlTypes: {
|
|
|
1257
1257
|
readonly layout: "full";
|
|
1258
1258
|
readonly propTypeUtil: {
|
|
1259
1259
|
extract: (prop: unknown) => {
|
|
1260
|
-
content:
|
|
1261
|
-
|
|
1260
|
+
content: {
|
|
1261
|
+
$$type: "string";
|
|
1262
|
+
value: string | null;
|
|
1263
|
+
disabled?: boolean | undefined;
|
|
1264
|
+
} | null;
|
|
1265
|
+
children: unknown[];
|
|
1262
1266
|
} | null;
|
|
1263
|
-
isValid: (prop: unknown) => prop is _elementor_editor_props.TransformablePropValue<"html-
|
|
1264
|
-
content:
|
|
1265
|
-
|
|
1267
|
+
isValid: (prop: unknown) => prop is _elementor_editor_props.TransformablePropValue<"html-v3", {
|
|
1268
|
+
content: {
|
|
1269
|
+
$$type: "string";
|
|
1270
|
+
value: string | null;
|
|
1271
|
+
disabled?: boolean | undefined;
|
|
1272
|
+
} | null;
|
|
1273
|
+
children: unknown[];
|
|
1266
1274
|
}>;
|
|
1267
1275
|
create: {
|
|
1268
1276
|
(value: {
|
|
1269
|
-
content:
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1277
|
+
content: {
|
|
1278
|
+
$$type: "string";
|
|
1279
|
+
value: string | null;
|
|
1280
|
+
disabled?: boolean | undefined;
|
|
1281
|
+
} | null;
|
|
1282
|
+
children: unknown[];
|
|
1283
|
+
}): _elementor_editor_props.TransformablePropValue<"html-v3", {
|
|
1284
|
+
content: {
|
|
1285
|
+
$$type: "string";
|
|
1286
|
+
value: string | null;
|
|
1287
|
+
disabled?: boolean | undefined;
|
|
1288
|
+
} | null;
|
|
1289
|
+
children: unknown[];
|
|
1274
1290
|
}>;
|
|
1275
1291
|
(value: {
|
|
1276
|
-
content:
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1292
|
+
content: {
|
|
1293
|
+
$$type: "string";
|
|
1294
|
+
value: string | null;
|
|
1295
|
+
disabled?: boolean | undefined;
|
|
1296
|
+
} | null;
|
|
1297
|
+
children: unknown[];
|
|
1298
|
+
}, createOptions?: _elementor_editor_props.CreateOptions): _elementor_editor_props.TransformablePropValue<"html-v3", {
|
|
1299
|
+
content: {
|
|
1300
|
+
$$type: "string";
|
|
1301
|
+
value: string | null;
|
|
1302
|
+
disabled?: boolean | undefined;
|
|
1303
|
+
} | null;
|
|
1304
|
+
children: unknown[];
|
|
1281
1305
|
}>;
|
|
1282
1306
|
(value: (prev?: {
|
|
1283
|
-
content:
|
|
1284
|
-
|
|
1307
|
+
content: {
|
|
1308
|
+
$$type: "string";
|
|
1309
|
+
value: string | null;
|
|
1310
|
+
disabled?: boolean | undefined;
|
|
1311
|
+
} | null;
|
|
1312
|
+
children: unknown[];
|
|
1285
1313
|
} | undefined) => {
|
|
1286
|
-
content:
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1314
|
+
content: {
|
|
1315
|
+
$$type: "string";
|
|
1316
|
+
value: string | null;
|
|
1317
|
+
disabled?: boolean | undefined;
|
|
1318
|
+
} | null;
|
|
1319
|
+
children: unknown[];
|
|
1320
|
+
}, createOptions: _elementor_editor_props.CreateOptions): _elementor_editor_props.TransformablePropValue<"html-v3", {
|
|
1321
|
+
content: {
|
|
1322
|
+
$$type: "string";
|
|
1323
|
+
value: string | null;
|
|
1324
|
+
disabled?: boolean | undefined;
|
|
1325
|
+
} | null;
|
|
1326
|
+
children: unknown[];
|
|
1291
1327
|
}>;
|
|
1292
1328
|
};
|
|
1293
1329
|
schema: zod.ZodObject<{
|
|
1294
|
-
$$type: zod.ZodLiteral<"html-
|
|
1330
|
+
$$type: zod.ZodLiteral<"html-v3">;
|
|
1295
1331
|
value: zod.ZodType<{
|
|
1296
|
-
content:
|
|
1297
|
-
|
|
1332
|
+
content: {
|
|
1333
|
+
$$type: "string";
|
|
1334
|
+
value: string | null;
|
|
1335
|
+
disabled?: boolean | undefined;
|
|
1336
|
+
} | null;
|
|
1337
|
+
children: unknown[];
|
|
1298
1338
|
}, zod.ZodTypeDef, {
|
|
1299
|
-
content:
|
|
1300
|
-
|
|
1339
|
+
content: {
|
|
1340
|
+
$$type: "string";
|
|
1341
|
+
value: string | null;
|
|
1342
|
+
disabled?: boolean | undefined;
|
|
1343
|
+
} | null;
|
|
1344
|
+
children: unknown[];
|
|
1301
1345
|
}>;
|
|
1302
1346
|
disabled: zod.ZodOptional<zod.ZodBoolean>;
|
|
1303
1347
|
}, "strict", zod.ZodTypeAny, {
|
|
1304
|
-
$$type: "html-
|
|
1348
|
+
$$type: "html-v3";
|
|
1305
1349
|
value: {
|
|
1306
|
-
content:
|
|
1307
|
-
|
|
1350
|
+
content: {
|
|
1351
|
+
$$type: "string";
|
|
1352
|
+
value: string | null;
|
|
1353
|
+
disabled?: boolean | undefined;
|
|
1354
|
+
} | null;
|
|
1355
|
+
children: unknown[];
|
|
1308
1356
|
};
|
|
1309
1357
|
disabled?: boolean | undefined;
|
|
1310
1358
|
}, {
|
|
1311
|
-
$$type: "html-
|
|
1359
|
+
$$type: "html-v3";
|
|
1312
1360
|
value: {
|
|
1313
|
-
content:
|
|
1314
|
-
|
|
1361
|
+
content: {
|
|
1362
|
+
$$type: "string";
|
|
1363
|
+
value: string | null;
|
|
1364
|
+
disabled?: boolean | undefined;
|
|
1365
|
+
} | null;
|
|
1366
|
+
children: unknown[];
|
|
1315
1367
|
};
|
|
1316
1368
|
disabled?: boolean | undefined;
|
|
1317
1369
|
}>;
|
|
1318
|
-
key: "html-
|
|
1370
|
+
key: "html-v3";
|
|
1319
1371
|
};
|
|
1320
1372
|
};
|
|
1321
1373
|
readonly email: {
|
package/dist/index.js
CHANGED
|
@@ -848,15 +848,26 @@ function useClasses() {
|
|
|
848
848
|
}
|
|
849
849
|
|
|
850
850
|
// src/components/css-classes/css-class-menu.tsx
|
|
851
|
-
var
|
|
851
|
+
var DEFAULT_PSEUDO_STATES = [
|
|
852
852
|
{ key: "normal", value: null, label: (0, import_i18n3.__)("normal", "elementor") },
|
|
853
853
|
{ key: "hover", value: "hover", label: (0, import_i18n3.__)("hover", "elementor") },
|
|
854
854
|
{ key: "focus", value: "focus", label: (0, import_i18n3.__)("focus", "elementor") },
|
|
855
855
|
{ key: "active", value: "active", label: (0, import_i18n3.__)("active", "elementor") }
|
|
856
856
|
];
|
|
857
|
+
function usePseudoStates() {
|
|
858
|
+
const { elementType } = useElement();
|
|
859
|
+
const { pseudoStates = [] } = elementType;
|
|
860
|
+
const additionalStates = pseudoStates.map(({ name, value }) => ({
|
|
861
|
+
key: value,
|
|
862
|
+
value,
|
|
863
|
+
label: name
|
|
864
|
+
}));
|
|
865
|
+
return [...DEFAULT_PSEUDO_STATES, ...additionalStates];
|
|
866
|
+
}
|
|
857
867
|
function CssClassMenu({ popupState, anchorEl, fixed }) {
|
|
858
868
|
const { provider } = useCssClass();
|
|
859
869
|
const isLocalStyle2 = provider ? (0, import_editor_styles_repository6.isElementsStylesProvider)(provider) : true;
|
|
870
|
+
const pseudoStates = usePseudoStates();
|
|
860
871
|
const handleKeyDown = (e) => {
|
|
861
872
|
e.stopPropagation();
|
|
862
873
|
};
|
|
@@ -880,7 +891,7 @@ function CssClassMenu({ popupState, anchorEl, fixed }) {
|
|
|
880
891
|
isLocalStyle2 && /* @__PURE__ */ React8.createElement(LocalClassSubMenu, { popupState }),
|
|
881
892
|
getMenuItemsByProvider({ provider, closeMenu: popupState.close, fixed }),
|
|
882
893
|
/* @__PURE__ */ React8.createElement(import_ui5.MenuSubheader, { sx: { typography: "caption", color: "text.secondary", pb: 0.5, pt: 1 } }, (0, import_i18n3.__)("States", "elementor")),
|
|
883
|
-
|
|
894
|
+
pseudoStates.map((state) => {
|
|
884
895
|
return /* @__PURE__ */ React8.createElement(
|
|
885
896
|
StateMenuItem,
|
|
886
897
|
{
|
|
@@ -1955,7 +1966,7 @@ var controlTypes = {
|
|
|
1955
1966
|
"html-tag": { component: import_editor_controls.HtmlTagControl, layout: "two-columns", propTypeUtil: import_editor_props4.stringPropTypeUtil },
|
|
1956
1967
|
toggle: { component: import_editor_controls.ToggleControl, layout: "full", propTypeUtil: import_editor_props4.stringPropTypeUtil },
|
|
1957
1968
|
"date-time": { component: import_editor_controls.DateTimeControl, layout: "full", propTypeUtil: import_editor_props4.DateTimePropTypeUtil },
|
|
1958
|
-
"inline-editing": { component: import_editor_controls.InlineEditingControl, layout: "full", propTypeUtil: import_editor_props4.
|
|
1969
|
+
"inline-editing": { component: import_editor_controls.InlineEditingControl, layout: "full", propTypeUtil: import_editor_props4.htmlV3PropTypeUtil },
|
|
1959
1970
|
email: { component: import_editor_controls.EmailFormActionControl, layout: "custom", propTypeUtil: import_editor_props4.emailPropTypeUtil }
|
|
1960
1971
|
};
|
|
1961
1972
|
var ControlsRegistry = class {
|
|
@@ -5828,6 +5839,7 @@ var init2 = () => {
|
|
|
5828
5839
|
});
|
|
5829
5840
|
registerPopoverAction({
|
|
5830
5841
|
id: "dynamic-tags",
|
|
5842
|
+
priority: 20,
|
|
5831
5843
|
useProps: usePropDynamicAction
|
|
5832
5844
|
});
|
|
5833
5845
|
import_editor_canvas3.styleTransformersRegistry.register("dynamic", dynamicTransformer);
|
|
@@ -5889,6 +5901,7 @@ var { registerAction } = import_menus3.controlActionsMenu;
|
|
|
5889
5901
|
function initResetStyleProps() {
|
|
5890
5902
|
registerAction({
|
|
5891
5903
|
id: "reset-style-value",
|
|
5904
|
+
priority: 10,
|
|
5892
5905
|
useProps: useResetStyleValueProps
|
|
5893
5906
|
});
|
|
5894
5907
|
}
|