@elementor/editor-editing-panel 4.1.0-beta1 → 4.1.0-beta2
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
|
@@ -229,6 +229,7 @@ var React11 = __toESM(require("react"));
|
|
|
229
229
|
var import_react10 = require("react");
|
|
230
230
|
var import_editor_styles_repository10 = require("@elementor/editor-styles-repository");
|
|
231
231
|
var import_editor_ui4 = require("@elementor/editor-ui");
|
|
232
|
+
var import_editor_v1_adapters2 = require("@elementor/editor-v1-adapters");
|
|
232
233
|
var import_icons2 = require("@elementor/icons");
|
|
233
234
|
var import_locations2 = require("@elementor/locations");
|
|
234
235
|
var import_ui7 = require("@elementor/ui");
|
|
@@ -431,14 +432,20 @@ function useCreateOption(params) {
|
|
|
431
432
|
|
|
432
433
|
// src/components/creatable-autocomplete/use-filter-options.ts
|
|
433
434
|
var import_ui = require("@elementor/ui");
|
|
435
|
+
var STRIP_NON_CLASS_CHARS = /[^a-zA-Z0-9_-]/g;
|
|
436
|
+
function normalizeClassSearch(value) {
|
|
437
|
+
return value.replace(STRIP_NON_CLASS_CHARS, "").toLowerCase();
|
|
438
|
+
}
|
|
434
439
|
function useFilterOptions(parameters) {
|
|
435
440
|
const { options: options13, selected, onCreate, entityName } = parameters;
|
|
436
|
-
const filter = (0, import_ui.createFilterOptions)(
|
|
441
|
+
const filter = (0, import_ui.createFilterOptions)({
|
|
442
|
+
matchFrom: "any"
|
|
443
|
+
});
|
|
437
444
|
const filterOptions = (optionList, params) => {
|
|
438
445
|
const selectedValues = selected.map((option) => option.value);
|
|
439
446
|
const filteredOptions = filter(
|
|
440
447
|
optionList.filter((option) => !selectedValues.includes(option.value)),
|
|
441
|
-
params
|
|
448
|
+
{ ...params, inputValue: normalizeClassSearch(params.inputValue) }
|
|
442
449
|
);
|
|
443
450
|
const isExisting = options13.some((option) => params.inputValue === option.label);
|
|
444
451
|
const allowCreate = Boolean(onCreate) && params.inputValue !== "" && !selectedValues.includes(params.inputValue) && !isExisting;
|
|
@@ -1285,6 +1292,19 @@ var validateLabel = (newLabel) => {
|
|
|
1285
1292
|
// src/components/css-classes/css-class-selector.tsx
|
|
1286
1293
|
var ID = "elementor-css-class-selector";
|
|
1287
1294
|
var TAGS_LIMIT = 50;
|
|
1295
|
+
var EVENT_OPEN_GLOBAL_CLASSES_MANAGER = "elementor/open-global-classes-manager";
|
|
1296
|
+
var EVENT_TOGGLE_DESIGN_SYSTEM = "elementor/toggle-design-system";
|
|
1297
|
+
function openClassManagerPanel() {
|
|
1298
|
+
if ((0, import_editor_v1_adapters2.isExperimentActive)("e_editor_design_system_panel")) {
|
|
1299
|
+
window.dispatchEvent(
|
|
1300
|
+
new CustomEvent(EVENT_TOGGLE_DESIGN_SYSTEM, {
|
|
1301
|
+
detail: { tab: "classes" }
|
|
1302
|
+
})
|
|
1303
|
+
);
|
|
1304
|
+
return;
|
|
1305
|
+
}
|
|
1306
|
+
window.dispatchEvent(new CustomEvent(EVENT_OPEN_GLOBAL_CLASSES_MANAGER));
|
|
1307
|
+
}
|
|
1288
1308
|
var EMPTY_OPTION = {
|
|
1289
1309
|
label: (0, import_i18n6.__)("local", "elementor"),
|
|
1290
1310
|
value: null,
|
|
@@ -1300,7 +1320,7 @@ function CssClassSelector() {
|
|
|
1300
1320
|
const autocompleteRef = (0, import_react10.useRef)(null);
|
|
1301
1321
|
const [renameError, setRenameError] = (0, import_react10.useState)(null);
|
|
1302
1322
|
const handleSelect = useHandleSelect();
|
|
1303
|
-
const { create, validate, entityName } = useCreateAction();
|
|
1323
|
+
const { create, validate, entityName, isAtLimit, limitCount } = useCreateAction();
|
|
1304
1324
|
const appliedOptions = useAppliedOptions(options13);
|
|
1305
1325
|
const active = appliedOptions.find((option) => option.value === activeId) ?? EMPTY_OPTION;
|
|
1306
1326
|
const showPlaceholder = appliedOptions.every(({ fixed }) => fixed);
|
|
@@ -1329,7 +1349,7 @@ function CssClassSelector() {
|
|
|
1329
1349
|
onCreate: create ?? void 0,
|
|
1330
1350
|
validate: validate ?? void 0,
|
|
1331
1351
|
limitTags: TAGS_LIMIT,
|
|
1332
|
-
renderEmptyState: EmptyState,
|
|
1352
|
+
renderEmptyState: isAtLimit && typeof limitCount === "number" ? (props) => /* @__PURE__ */ React11.createElement(LimitReachedEmptyState, { limitCount, onClear: props.onClear }) : EmptyState,
|
|
1333
1353
|
getLimitTagsText: (more) => /* @__PURE__ */ React11.createElement(import_ui7.Chip, { size: "tiny", variant: "standard", label: `+${more}`, clickable: true }),
|
|
1334
1354
|
renderTags: (values, getTagProps) => values.map((value, index) => {
|
|
1335
1355
|
const chipProps = getTagProps({ index });
|
|
@@ -1368,7 +1388,7 @@ function CssClassSelector() {
|
|
|
1368
1388
|
)
|
|
1369
1389
|
), !canEdit && /* @__PURE__ */ React11.createElement(import_editor_ui4.InfoAlert, { sx: { mt: 1 } }, (0, import_i18n6.__)("With your current role, you can use existing classes but can\u2019t modify them.", "elementor")));
|
|
1370
1390
|
}
|
|
1371
|
-
var
|
|
1391
|
+
var EmptyStateLayout = ({ searchValue, onClear, children }) => /* @__PURE__ */ React11.createElement(import_ui7.Box, { sx: { py: 4 } }, /* @__PURE__ */ React11.createElement(
|
|
1372
1392
|
import_ui7.Stack,
|
|
1373
1393
|
{
|
|
1374
1394
|
gap: 1,
|
|
@@ -1379,9 +1399,54 @@ var EmptyState = ({ searchValue, onClear }) => /* @__PURE__ */ React11.createEle
|
|
|
1379
1399
|
},
|
|
1380
1400
|
/* @__PURE__ */ React11.createElement(import_icons2.ColorSwatchIcon, { sx: { transform: "rotate(90deg)" }, fontSize: "large" }),
|
|
1381
1401
|
/* @__PURE__ */ React11.createElement(import_ui7.Typography, { align: "center", variant: "subtitle2" }, (0, import_i18n6.__)("Sorry, nothing matched", "elementor"), /* @__PURE__ */ React11.createElement("br", null), "\u201C", searchValue, "\u201D."),
|
|
1382
|
-
|
|
1402
|
+
children,
|
|
1383
1403
|
/* @__PURE__ */ React11.createElement(import_ui7.Link, { color: "text.secondary", variant: "caption", component: "button", onClick: onClear }, (0, import_i18n6.__)("Clear & try again", "elementor"))
|
|
1384
1404
|
));
|
|
1405
|
+
var EmptyState = (props) => /* @__PURE__ */ React11.createElement(EmptyStateLayout, { ...props }, /* @__PURE__ */ React11.createElement(import_ui7.Typography, { align: "center", variant: "caption", sx: { mb: 2 } }, (0, import_i18n6.__)("With your current role,", "elementor"), /* @__PURE__ */ React11.createElement("br", null), (0, import_i18n6.__)("you can only use existing classes.", "elementor")));
|
|
1406
|
+
var LimitReachedEmptyState = ({
|
|
1407
|
+
limitCount,
|
|
1408
|
+
onClear
|
|
1409
|
+
}) => /* @__PURE__ */ React11.createElement(import_ui7.Box, { sx: { py: 4 } }, /* @__PURE__ */ React11.createElement(
|
|
1410
|
+
import_ui7.Stack,
|
|
1411
|
+
{
|
|
1412
|
+
gap: 1,
|
|
1413
|
+
alignItems: "center",
|
|
1414
|
+
color: "text.secondary",
|
|
1415
|
+
justifyContent: "center",
|
|
1416
|
+
sx: { px: 1, m: "auto", maxWidth: "260px" }
|
|
1417
|
+
},
|
|
1418
|
+
/* @__PURE__ */ React11.createElement(import_icons2.ColorSwatchIcon, { sx: { transform: "rotate(90deg)" }, fontSize: "large" }),
|
|
1419
|
+
/* @__PURE__ */ React11.createElement(
|
|
1420
|
+
import_ui7.Typography,
|
|
1421
|
+
{ align: "center", variant: "subtitle2" },
|
|
1422
|
+
/* translators: %s is the maximum number of classes */
|
|
1423
|
+
(0, import_i18n6.__)("Limit of %s classes reached", "elementor").replace("%s", String(limitCount))
|
|
1424
|
+
),
|
|
1425
|
+
/* @__PURE__ */ React11.createElement(import_ui7.Typography, { align: "center", variant: "caption", component: "div" }, (0, import_i18n6.__)("Remove a class to create a new one.", "elementor"), " ", /* @__PURE__ */ React11.createElement(
|
|
1426
|
+
import_ui7.Link,
|
|
1427
|
+
{
|
|
1428
|
+
color: "inherit",
|
|
1429
|
+
variant: "caption",
|
|
1430
|
+
component: "button",
|
|
1431
|
+
onClick: onClear,
|
|
1432
|
+
sx: { verticalAlign: "baseline" }
|
|
1433
|
+
},
|
|
1434
|
+
(0, import_i18n6.__)("Clear", "elementor")
|
|
1435
|
+
)),
|
|
1436
|
+
/* @__PURE__ */ React11.createElement(
|
|
1437
|
+
import_ui7.Button,
|
|
1438
|
+
{
|
|
1439
|
+
variant: "outlined",
|
|
1440
|
+
color: "secondary",
|
|
1441
|
+
size: "small",
|
|
1442
|
+
onClick: () => {
|
|
1443
|
+
openClassManagerPanel();
|
|
1444
|
+
onClear();
|
|
1445
|
+
}
|
|
1446
|
+
},
|
|
1447
|
+
(0, import_i18n6.__)("Class Manager", "elementor")
|
|
1448
|
+
)
|
|
1449
|
+
));
|
|
1385
1450
|
var updateClassByProvider = (provider, data) => {
|
|
1386
1451
|
if (!provider) {
|
|
1387
1452
|
return;
|
|
@@ -1424,6 +1489,11 @@ function useCreateAction() {
|
|
|
1424
1489
|
if (!provider || !createAction) {
|
|
1425
1490
|
return {};
|
|
1426
1491
|
}
|
|
1492
|
+
const entityName = provider.labels.singular && provider.labels.plural ? provider.labels : void 0;
|
|
1493
|
+
const validate = (newClassLabel, event) => (0, import_editor_styles_repository10.validateStyleLabel)(newClassLabel, event);
|
|
1494
|
+
if (hasReachedLimit(provider)) {
|
|
1495
|
+
return { entityName, isAtLimit: true, limitCount: provider.limit, validate };
|
|
1496
|
+
}
|
|
1427
1497
|
const create = (classLabel) => {
|
|
1428
1498
|
const { createdId } = createAction({ classLabel });
|
|
1429
1499
|
trackStyles(provider.getKey() ?? "", "classCreated", {
|
|
@@ -1432,21 +1502,7 @@ function useCreateAction() {
|
|
|
1432
1502
|
classId: createdId
|
|
1433
1503
|
});
|
|
1434
1504
|
};
|
|
1435
|
-
|
|
1436
|
-
if (hasReachedLimit(provider)) {
|
|
1437
|
-
return {
|
|
1438
|
-
isValid: false,
|
|
1439
|
-
/* translators: %s is the maximum number of classes */
|
|
1440
|
-
errorMessage: (0, import_i18n6.__)(
|
|
1441
|
-
"You\u2019ve reached the limit of %s classes. Please remove an existing one to create a new class.",
|
|
1442
|
-
"elementor"
|
|
1443
|
-
).replace("%s", provider.limit.toString())
|
|
1444
|
-
};
|
|
1445
|
-
}
|
|
1446
|
-
return (0, import_editor_styles_repository10.validateStyleLabel)(newClassLabel, event);
|
|
1447
|
-
};
|
|
1448
|
-
const entityName = provider.labels.singular && provider.labels.plural ? provider.labels : void 0;
|
|
1449
|
-
return { create, validate, entityName };
|
|
1505
|
+
return { create, validate, entityName, isAtLimit: false };
|
|
1450
1506
|
}
|
|
1451
1507
|
function hasReachedLimit(provider) {
|
|
1452
1508
|
return provider.actions.all().length >= provider.limit;
|
|
@@ -1501,7 +1557,7 @@ var import_editor_elements5 = require("@elementor/editor-elements");
|
|
|
1501
1557
|
var import_editor_props3 = require("@elementor/editor-props");
|
|
1502
1558
|
var import_editor_styles3 = require("@elementor/editor-styles");
|
|
1503
1559
|
var import_editor_styles_repository13 = require("@elementor/editor-styles-repository");
|
|
1504
|
-
var
|
|
1560
|
+
var import_editor_v1_adapters4 = require("@elementor/editor-v1-adapters");
|
|
1505
1561
|
var import_utils2 = require("@elementor/utils");
|
|
1506
1562
|
|
|
1507
1563
|
// src/hooks/use-styles-fields.ts
|
|
@@ -1510,7 +1566,7 @@ var import_editor_elements4 = require("@elementor/editor-elements");
|
|
|
1510
1566
|
var import_editor_styles2 = require("@elementor/editor-styles");
|
|
1511
1567
|
var import_editor_styles_repository11 = require("@elementor/editor-styles-repository");
|
|
1512
1568
|
var import_editor_styles_repository12 = require("@elementor/editor-styles-repository");
|
|
1513
|
-
var
|
|
1569
|
+
var import_editor_v1_adapters3 = require("@elementor/editor-v1-adapters");
|
|
1514
1570
|
var import_i18n7 = require("@wordpress/i18n");
|
|
1515
1571
|
|
|
1516
1572
|
// src/hooks/use-styles-rerender.ts
|
|
@@ -1561,7 +1617,7 @@ function useUndoableActions({
|
|
|
1561
1617
|
return (0, import_react12.useMemo)(() => {
|
|
1562
1618
|
const meta = { breakpoint, state };
|
|
1563
1619
|
const createStyleArgs = { elementId, classesProp, meta, label: import_editor_styles_repository12.ELEMENTS_STYLES_RESERVED_LABEL };
|
|
1564
|
-
return (0,
|
|
1620
|
+
return (0, import_editor_v1_adapters3.undoable)(
|
|
1565
1621
|
{
|
|
1566
1622
|
do: (payload) => {
|
|
1567
1623
|
if ((0, import_editor_elements4.shouldCreateNewLocalStyle)(payload)) {
|
|
@@ -1700,7 +1756,7 @@ function useUndoableActions2({
|
|
|
1700
1756
|
return (0, import_react13.useMemo)(() => {
|
|
1701
1757
|
const meta = { breakpoint, state };
|
|
1702
1758
|
const createStyleArgs = { elementId, classesProp, meta, label: import_editor_styles_repository13.ELEMENTS_STYLES_RESERVED_LABEL };
|
|
1703
|
-
return (0,
|
|
1759
|
+
return (0, import_editor_v1_adapters4.undoable)(
|
|
1704
1760
|
{
|
|
1705
1761
|
do: (payload) => {
|
|
1706
1762
|
if ((0, import_editor_elements5.shouldCreateNewLocalStyle)(payload)) {
|
|
@@ -1862,7 +1918,7 @@ function EditorPanelErrorFallback() {
|
|
|
1862
1918
|
var import_react38 = require("react");
|
|
1863
1919
|
var React86 = __toESM(require("react"));
|
|
1864
1920
|
var import_editor_elements12 = require("@elementor/editor-elements");
|
|
1865
|
-
var
|
|
1921
|
+
var import_editor_v1_adapters10 = require("@elementor/editor-v1-adapters");
|
|
1866
1922
|
var import_ui41 = require("@elementor/ui");
|
|
1867
1923
|
var import_i18n60 = require("@wordpress/i18n");
|
|
1868
1924
|
|
|
@@ -2158,7 +2214,7 @@ var import_react19 = require("react");
|
|
|
2158
2214
|
var import_editor_controls2 = require("@elementor/editor-controls");
|
|
2159
2215
|
var import_editor_documents2 = require("@elementor/editor-documents");
|
|
2160
2216
|
var import_editor_elements6 = require("@elementor/editor-elements");
|
|
2161
|
-
var
|
|
2217
|
+
var import_editor_v1_adapters5 = require("@elementor/editor-v1-adapters");
|
|
2162
2218
|
var import_i18n8 = require("@wordpress/i18n");
|
|
2163
2219
|
|
|
2164
2220
|
// src/utils/prop-dependency-utils.ts
|
|
@@ -2416,7 +2472,7 @@ function useUndoableUpdateElementProp({
|
|
|
2416
2472
|
propDisplayName
|
|
2417
2473
|
}) {
|
|
2418
2474
|
return (0, import_react19.useMemo)(() => {
|
|
2419
|
-
return (0,
|
|
2475
|
+
return (0, import_editor_v1_adapters5.undoable)(
|
|
2420
2476
|
{
|
|
2421
2477
|
do: (newSettings) => {
|
|
2422
2478
|
const prevPropValue = (0, import_editor_elements6.getElementSettings)(elementId, Object.keys(newSettings));
|
|
@@ -3112,11 +3168,11 @@ var import_ui19 = require("@elementor/ui");
|
|
|
3112
3168
|
var import_i18n11 = require("@wordpress/i18n");
|
|
3113
3169
|
|
|
3114
3170
|
// src/hooks/use-direction.ts
|
|
3115
|
-
var
|
|
3171
|
+
var import_editor_v1_adapters6 = require("@elementor/editor-v1-adapters");
|
|
3116
3172
|
var import_ui17 = require("@elementor/ui");
|
|
3117
3173
|
function useDirection() {
|
|
3118
3174
|
const theme = (0, import_ui17.useTheme)();
|
|
3119
|
-
const isUiRtl = "rtl" === theme.direction, isSiteRtl = !!(0,
|
|
3175
|
+
const isUiRtl = "rtl" === theme.direction, isSiteRtl = !!(0, import_editor_v1_adapters6.getElementorFrontendConfig)()?.is_rtl;
|
|
3120
3176
|
return { isSiteRtl, isUiRtl };
|
|
3121
3177
|
}
|
|
3122
3178
|
|
|
@@ -3362,18 +3418,18 @@ var EffectsSection = () => {
|
|
|
3362
3418
|
var React55 = __toESM(require("react"));
|
|
3363
3419
|
var import_editor_controls30 = require("@elementor/editor-controls");
|
|
3364
3420
|
var import_editor_elements11 = require("@elementor/editor-elements");
|
|
3365
|
-
var
|
|
3421
|
+
var import_editor_v1_adapters9 = require("@elementor/editor-v1-adapters");
|
|
3366
3422
|
var import_i18n33 = require("@wordpress/i18n");
|
|
3367
3423
|
|
|
3368
3424
|
// src/hooks/use-computed-style.ts
|
|
3369
|
-
var
|
|
3425
|
+
var import_editor_v1_adapters7 = require("@elementor/editor-v1-adapters");
|
|
3370
3426
|
function useComputedStyle(elementId) {
|
|
3371
|
-
return (0,
|
|
3427
|
+
return (0, import_editor_v1_adapters7.__privateUseListenTo)(
|
|
3372
3428
|
[
|
|
3373
|
-
(0,
|
|
3374
|
-
(0,
|
|
3375
|
-
(0,
|
|
3376
|
-
(0,
|
|
3429
|
+
(0, import_editor_v1_adapters7.windowEvent)("elementor/device-mode/change"),
|
|
3430
|
+
(0, import_editor_v1_adapters7.commandEndEvent)("document/elements/reset-style"),
|
|
3431
|
+
(0, import_editor_v1_adapters7.commandEndEvent)("document/elements/settings"),
|
|
3432
|
+
(0, import_editor_v1_adapters7.commandEndEvent)("document/elements/paste-style")
|
|
3377
3433
|
],
|
|
3378
3434
|
() => {
|
|
3379
3435
|
if (!elementId) {
|
|
@@ -3663,7 +3719,7 @@ var getOptions2 = (parentStyleDirection) => {
|
|
|
3663
3719
|
var React44 = __toESM(require("react"));
|
|
3664
3720
|
var import_react24 = require("react");
|
|
3665
3721
|
var import_editor_controls19 = require("@elementor/editor-controls");
|
|
3666
|
-
var
|
|
3722
|
+
var import_editor_v1_adapters8 = require("@elementor/editor-v1-adapters");
|
|
3667
3723
|
var import_i18n22 = require("@wordpress/i18n");
|
|
3668
3724
|
var DISPLAY_LABEL = (0, import_i18n22.__)("Display", "elementor");
|
|
3669
3725
|
var displayFieldItems = [
|
|
@@ -3706,7 +3762,7 @@ var displayFieldItems = [
|
|
|
3706
3762
|
];
|
|
3707
3763
|
var DisplayField = () => {
|
|
3708
3764
|
const placeholder = useDisplayPlaceholderValue();
|
|
3709
|
-
const isGridActive = (0,
|
|
3765
|
+
const isGridActive = (0, import_editor_v1_adapters8.isExperimentActive)("e_css_grid");
|
|
3710
3766
|
const items3 = (0, import_react24.useMemo)(
|
|
3711
3767
|
() => isGridActive ? displayFieldItems : displayFieldItems.filter((item) => item.value !== "grid"),
|
|
3712
3768
|
[isGridActive]
|
|
@@ -4313,7 +4369,7 @@ var LayoutSection = () => {
|
|
|
4313
4369
|
history: { propDisplayName: DISPLAY_LABEL2 }
|
|
4314
4370
|
});
|
|
4315
4371
|
const displayPlaceholder = useDisplayPlaceholderValue();
|
|
4316
|
-
const isGridExperimentActive = (0,
|
|
4372
|
+
const isGridExperimentActive = (0, import_editor_v1_adapters9.isExperimentActive)("e_css_grid");
|
|
4317
4373
|
const isDisplayFlex = shouldDisplayFlexFields(display, displayPlaceholder);
|
|
4318
4374
|
const isDisplayGrid = "grid" === (display?.value ?? displayPlaceholder?.value);
|
|
4319
4375
|
const { element } = useElement();
|
|
@@ -5305,7 +5361,7 @@ var PanelTabContent = () => {
|
|
|
5305
5361
|
const { element } = useElement();
|
|
5306
5362
|
const editorDefaults = useDefaultPanelSettings();
|
|
5307
5363
|
const defaultComponentTab = editorDefaults.defaultTab;
|
|
5308
|
-
const isInteractionsActive = (0,
|
|
5364
|
+
const isInteractionsActive = (0, import_editor_v1_adapters10.isExperimentActive)("e_interactions");
|
|
5309
5365
|
const isPromotedElement = !!(0, import_editor_elements12.getWidgetsCache)()?.[element.type]?.meta?.is_pro_promotion;
|
|
5310
5366
|
const [storedTab, setCurrentTab] = useStateByElement("tab", defaultComponentTab);
|
|
5311
5367
|
const currentTab = isPromotedElement && storedTab === "settings" ? "style" : storedTab;
|
|
@@ -5350,11 +5406,11 @@ var EditingPanel = () => {
|
|
|
5350
5406
|
// src/init.ts
|
|
5351
5407
|
var import_editor = require("@elementor/editor");
|
|
5352
5408
|
var import_editor_panels3 = require("@elementor/editor-panels");
|
|
5353
|
-
var
|
|
5409
|
+
var import_editor_v1_adapters14 = require("@elementor/editor-v1-adapters");
|
|
5354
5410
|
|
|
5355
5411
|
// src/hooks/use-open-editor-panel.ts
|
|
5356
5412
|
var import_react39 = require("react");
|
|
5357
|
-
var
|
|
5413
|
+
var import_editor_v1_adapters11 = require("@elementor/editor-v1-adapters");
|
|
5358
5414
|
|
|
5359
5415
|
// src/panel.ts
|
|
5360
5416
|
var import_editor_panels2 = require("@elementor/editor-panels");
|
|
@@ -5378,7 +5434,7 @@ var isAtomicWidgetSelected = () => {
|
|
|
5378
5434
|
var useOpenEditorPanel = () => {
|
|
5379
5435
|
const { open } = usePanelActions();
|
|
5380
5436
|
(0, import_react39.useEffect)(() => {
|
|
5381
|
-
return (0,
|
|
5437
|
+
return (0, import_editor_v1_adapters11.__privateListenTo)((0, import_editor_v1_adapters11.commandStartEvent)("panel/editor/open"), () => {
|
|
5382
5438
|
if (isAtomicWidgetSelected()) {
|
|
5383
5439
|
open();
|
|
5384
5440
|
}
|
|
@@ -5827,7 +5883,7 @@ var import_react42 = require("react");
|
|
|
5827
5883
|
var import_editor_controls59 = require("@elementor/editor-controls");
|
|
5828
5884
|
|
|
5829
5885
|
// src/dynamics/sync/get-atomic-dynamic-tags.ts
|
|
5830
|
-
var
|
|
5886
|
+
var import_editor_v1_adapters12 = require("@elementor/editor-v1-adapters");
|
|
5831
5887
|
|
|
5832
5888
|
// src/hooks/use-license-config.ts
|
|
5833
5889
|
var import_react41 = require("react");
|
|
@@ -5850,7 +5906,7 @@ function useLicenseConfig() {
|
|
|
5850
5906
|
|
|
5851
5907
|
// src/dynamics/sync/get-atomic-dynamic-tags.ts
|
|
5852
5908
|
var getAtomicDynamicTags = (shouldFilterByLicense = true) => {
|
|
5853
|
-
const { atomicDynamicTags } = (0,
|
|
5909
|
+
const { atomicDynamicTags } = (0, import_editor_v1_adapters12.getElementorConfig)();
|
|
5854
5910
|
if (!atomicDynamicTags) {
|
|
5855
5911
|
return null;
|
|
5856
5912
|
}
|
|
@@ -5873,7 +5929,7 @@ var filterByLicense = (tags) => {
|
|
|
5873
5929
|
|
|
5874
5930
|
// src/dynamics/utils.ts
|
|
5875
5931
|
var import_editor_props17 = require("@elementor/editor-props");
|
|
5876
|
-
var
|
|
5932
|
+
var import_editor_v1_adapters13 = require("@elementor/editor-v1-adapters");
|
|
5877
5933
|
var import_schema = require("@elementor/schema");
|
|
5878
5934
|
var DYNAMIC_PROP_TYPE_KEY = "dynamic";
|
|
5879
5935
|
var dynamicPropTypeUtil = (0, import_editor_props17.createPropUtils)(
|
|
@@ -5885,7 +5941,7 @@ var dynamicPropTypeUtil = (0, import_editor_props17.createPropUtils)(
|
|
|
5885
5941
|
})
|
|
5886
5942
|
);
|
|
5887
5943
|
var isDynamicTagSupported = (tagName) => {
|
|
5888
|
-
return !!(0,
|
|
5944
|
+
return !!(0, import_editor_v1_adapters13.getElementorConfig)()?.atomicDynamicTags?.tags?.[tagName];
|
|
5889
5945
|
};
|
|
5890
5946
|
var isDynamicPropType = (prop) => prop.key === DYNAMIC_PROP_TYPE_KEY;
|
|
5891
5947
|
var getDynamicPropType = (propType) => {
|
|
@@ -7212,7 +7268,7 @@ function init4() {
|
|
|
7212
7268
|
init();
|
|
7213
7269
|
}
|
|
7214
7270
|
var blockV1Panel = () => {
|
|
7215
|
-
(0,
|
|
7271
|
+
(0, import_editor_v1_adapters14.blockCommand)({
|
|
7216
7272
|
command: "panel/editor/open",
|
|
7217
7273
|
condition: isAtomicWidgetSelected
|
|
7218
7274
|
});
|