@elementor/editor-editing-panel 4.2.0-871 → 4.2.0-872
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
|
|
|
@@ -2169,7 +2225,7 @@ var import_react19 = require("react");
|
|
|
2169
2225
|
var import_editor_controls2 = require("@elementor/editor-controls");
|
|
2170
2226
|
var import_editor_documents2 = require("@elementor/editor-documents");
|
|
2171
2227
|
var import_editor_elements6 = require("@elementor/editor-elements");
|
|
2172
|
-
var
|
|
2228
|
+
var import_editor_v1_adapters5 = require("@elementor/editor-v1-adapters");
|
|
2173
2229
|
var import_i18n8 = require("@wordpress/i18n");
|
|
2174
2230
|
|
|
2175
2231
|
// src/utils/prop-dependency-utils.ts
|
|
@@ -2427,7 +2483,7 @@ function useUndoableUpdateElementProp({
|
|
|
2427
2483
|
propDisplayName
|
|
2428
2484
|
}) {
|
|
2429
2485
|
return (0, import_react19.useMemo)(() => {
|
|
2430
|
-
return (0,
|
|
2486
|
+
return (0, import_editor_v1_adapters5.undoable)(
|
|
2431
2487
|
{
|
|
2432
2488
|
do: (newSettings) => {
|
|
2433
2489
|
const prevPropValue = (0, import_editor_elements6.getElementSettings)(elementId, Object.keys(newSettings));
|
|
@@ -3123,11 +3179,11 @@ var import_ui19 = require("@elementor/ui");
|
|
|
3123
3179
|
var import_i18n11 = require("@wordpress/i18n");
|
|
3124
3180
|
|
|
3125
3181
|
// src/hooks/use-direction.ts
|
|
3126
|
-
var
|
|
3182
|
+
var import_editor_v1_adapters6 = require("@elementor/editor-v1-adapters");
|
|
3127
3183
|
var import_ui17 = require("@elementor/ui");
|
|
3128
3184
|
function useDirection() {
|
|
3129
3185
|
const theme = (0, import_ui17.useTheme)();
|
|
3130
|
-
const isUiRtl = "rtl" === theme.direction, isSiteRtl = !!(0,
|
|
3186
|
+
const isUiRtl = "rtl" === theme.direction, isSiteRtl = !!(0, import_editor_v1_adapters6.getElementorFrontendConfig)()?.is_rtl;
|
|
3131
3187
|
return { isSiteRtl, isUiRtl };
|
|
3132
3188
|
}
|
|
3133
3189
|
|
|
@@ -3373,18 +3429,18 @@ var EffectsSection = () => {
|
|
|
3373
3429
|
var React55 = __toESM(require("react"));
|
|
3374
3430
|
var import_editor_controls30 = require("@elementor/editor-controls");
|
|
3375
3431
|
var import_editor_elements11 = require("@elementor/editor-elements");
|
|
3376
|
-
var
|
|
3432
|
+
var import_editor_v1_adapters9 = require("@elementor/editor-v1-adapters");
|
|
3377
3433
|
var import_i18n33 = require("@wordpress/i18n");
|
|
3378
3434
|
|
|
3379
3435
|
// src/hooks/use-computed-style.ts
|
|
3380
|
-
var
|
|
3436
|
+
var import_editor_v1_adapters7 = require("@elementor/editor-v1-adapters");
|
|
3381
3437
|
function useComputedStyle(elementId) {
|
|
3382
|
-
return (0,
|
|
3438
|
+
return (0, import_editor_v1_adapters7.__privateUseListenTo)(
|
|
3383
3439
|
[
|
|
3384
|
-
(0,
|
|
3385
|
-
(0,
|
|
3386
|
-
(0,
|
|
3387
|
-
(0,
|
|
3440
|
+
(0, import_editor_v1_adapters7.windowEvent)("elementor/device-mode/change"),
|
|
3441
|
+
(0, import_editor_v1_adapters7.commandEndEvent)("document/elements/reset-style"),
|
|
3442
|
+
(0, import_editor_v1_adapters7.commandEndEvent)("document/elements/settings"),
|
|
3443
|
+
(0, import_editor_v1_adapters7.commandEndEvent)("document/elements/paste-style")
|
|
3388
3444
|
],
|
|
3389
3445
|
() => {
|
|
3390
3446
|
if (!elementId) {
|
|
@@ -3674,7 +3730,7 @@ var getOptions2 = (parentStyleDirection) => {
|
|
|
3674
3730
|
var React44 = __toESM(require("react"));
|
|
3675
3731
|
var import_react24 = require("react");
|
|
3676
3732
|
var import_editor_controls19 = require("@elementor/editor-controls");
|
|
3677
|
-
var
|
|
3733
|
+
var import_editor_v1_adapters8 = require("@elementor/editor-v1-adapters");
|
|
3678
3734
|
var import_i18n22 = require("@wordpress/i18n");
|
|
3679
3735
|
var DISPLAY_LABEL = (0, import_i18n22.__)("Display", "elementor");
|
|
3680
3736
|
var displayFieldItems = [
|
|
@@ -3717,7 +3773,7 @@ var displayFieldItems = [
|
|
|
3717
3773
|
];
|
|
3718
3774
|
var DisplayField = () => {
|
|
3719
3775
|
const placeholder = useDisplayPlaceholderValue();
|
|
3720
|
-
const isGridActive = (0,
|
|
3776
|
+
const isGridActive = (0, import_editor_v1_adapters8.isExperimentActive)("e_css_grid");
|
|
3721
3777
|
const items3 = (0, import_react24.useMemo)(
|
|
3722
3778
|
() => isGridActive ? displayFieldItems : displayFieldItems.filter((item) => item.value !== "grid"),
|
|
3723
3779
|
[isGridActive]
|
|
@@ -4347,7 +4403,7 @@ var LayoutSection = () => {
|
|
|
4347
4403
|
history: { propDisplayName: DISPLAY_LABEL2 }
|
|
4348
4404
|
});
|
|
4349
4405
|
const displayPlaceholder = useDisplayPlaceholderValue();
|
|
4350
|
-
const isGridExperimentActive = (0,
|
|
4406
|
+
const isGridExperimentActive = (0, import_editor_v1_adapters9.isExperimentActive)("e_css_grid");
|
|
4351
4407
|
const isDisplayFlex = shouldDisplayFlexFields(display, displayPlaceholder);
|
|
4352
4408
|
const isDisplayGrid = "grid" === (display?.value ?? displayPlaceholder?.value);
|
|
4353
4409
|
const { element } = useElement();
|
|
@@ -5339,7 +5395,7 @@ var PanelTabContent = () => {
|
|
|
5339
5395
|
const { element } = useElement();
|
|
5340
5396
|
const editorDefaults = useDefaultPanelSettings();
|
|
5341
5397
|
const defaultComponentTab = editorDefaults.defaultTab;
|
|
5342
|
-
const isInteractionsActive = (0,
|
|
5398
|
+
const isInteractionsActive = (0, import_editor_v1_adapters10.isExperimentActive)("e_interactions");
|
|
5343
5399
|
const isPromotedElement = !!(0, import_editor_elements12.getWidgetsCache)()?.[element.type]?.meta?.is_pro_promotion;
|
|
5344
5400
|
const [storedTab, setCurrentTab] = useStateByElement("tab", defaultComponentTab);
|
|
5345
5401
|
const currentTab = isPromotedElement && storedTab === "settings" ? "style" : storedTab;
|
|
@@ -5384,11 +5440,11 @@ var EditingPanel = () => {
|
|
|
5384
5440
|
// src/init.ts
|
|
5385
5441
|
var import_editor = require("@elementor/editor");
|
|
5386
5442
|
var import_editor_panels3 = require("@elementor/editor-panels");
|
|
5387
|
-
var
|
|
5443
|
+
var import_editor_v1_adapters14 = require("@elementor/editor-v1-adapters");
|
|
5388
5444
|
|
|
5389
5445
|
// src/hooks/use-open-editor-panel.ts
|
|
5390
5446
|
var import_react39 = require("react");
|
|
5391
|
-
var
|
|
5447
|
+
var import_editor_v1_adapters11 = require("@elementor/editor-v1-adapters");
|
|
5392
5448
|
|
|
5393
5449
|
// src/panel.ts
|
|
5394
5450
|
var import_editor_panels2 = require("@elementor/editor-panels");
|
|
@@ -5412,7 +5468,7 @@ var isAtomicWidgetSelected = () => {
|
|
|
5412
5468
|
var useOpenEditorPanel = () => {
|
|
5413
5469
|
const { open } = usePanelActions();
|
|
5414
5470
|
(0, import_react39.useEffect)(() => {
|
|
5415
|
-
return (0,
|
|
5471
|
+
return (0, import_editor_v1_adapters11.__privateListenTo)((0, import_editor_v1_adapters11.commandStartEvent)("panel/editor/open"), () => {
|
|
5416
5472
|
if (isAtomicWidgetSelected()) {
|
|
5417
5473
|
open();
|
|
5418
5474
|
}
|
|
@@ -5861,7 +5917,7 @@ var import_react42 = require("react");
|
|
|
5861
5917
|
var import_editor_controls59 = require("@elementor/editor-controls");
|
|
5862
5918
|
|
|
5863
5919
|
// src/dynamics/sync/get-atomic-dynamic-tags.ts
|
|
5864
|
-
var
|
|
5920
|
+
var import_editor_v1_adapters12 = require("@elementor/editor-v1-adapters");
|
|
5865
5921
|
|
|
5866
5922
|
// src/hooks/use-license-config.ts
|
|
5867
5923
|
var import_react41 = require("react");
|
|
@@ -5884,7 +5940,7 @@ function useLicenseConfig() {
|
|
|
5884
5940
|
|
|
5885
5941
|
// src/dynamics/sync/get-atomic-dynamic-tags.ts
|
|
5886
5942
|
var getAtomicDynamicTags = (shouldFilterByLicense = true) => {
|
|
5887
|
-
const { atomicDynamicTags } = (0,
|
|
5943
|
+
const { atomicDynamicTags } = (0, import_editor_v1_adapters12.getElementorConfig)();
|
|
5888
5944
|
if (!atomicDynamicTags) {
|
|
5889
5945
|
return null;
|
|
5890
5946
|
}
|
|
@@ -5907,7 +5963,7 @@ var filterByLicense = (tags) => {
|
|
|
5907
5963
|
|
|
5908
5964
|
// src/dynamics/utils.ts
|
|
5909
5965
|
var import_editor_props18 = require("@elementor/editor-props");
|
|
5910
|
-
var
|
|
5966
|
+
var import_editor_v1_adapters13 = require("@elementor/editor-v1-adapters");
|
|
5911
5967
|
var import_schema = require("@elementor/schema");
|
|
5912
5968
|
var DYNAMIC_PROP_TYPE_KEY = "dynamic";
|
|
5913
5969
|
var dynamicPropTypeUtil = (0, import_editor_props18.createPropUtils)(
|
|
@@ -5919,7 +5975,7 @@ var dynamicPropTypeUtil = (0, import_editor_props18.createPropUtils)(
|
|
|
5919
5975
|
})
|
|
5920
5976
|
);
|
|
5921
5977
|
var isDynamicTagSupported = (tagName) => {
|
|
5922
|
-
return !!(0,
|
|
5978
|
+
return !!(0, import_editor_v1_adapters13.getElementorConfig)()?.atomicDynamicTags?.tags?.[tagName];
|
|
5923
5979
|
};
|
|
5924
5980
|
var isDynamicPropType = (prop) => prop.key === DYNAMIC_PROP_TYPE_KEY;
|
|
5925
5981
|
var getDynamicPropType = (propType) => {
|
|
@@ -7246,7 +7302,7 @@ function init4() {
|
|
|
7246
7302
|
init();
|
|
7247
7303
|
}
|
|
7248
7304
|
var blockV1Panel = () => {
|
|
7249
|
-
(0,
|
|
7305
|
+
(0, import_editor_v1_adapters14.blockCommand)({
|
|
7250
7306
|
command: "panel/editor/open",
|
|
7251
7307
|
condition: isAtomicWidgetSelected
|
|
7252
7308
|
});
|