@elementor/editor-editing-panel 4.2.0-beta1 → 4.3.0-1000
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 +15 -15
- package/dist/index.d.ts +15 -15
- package/dist/index.js +297 -267
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +89 -59
- package/dist/index.mjs.map +1 -1
- package/package.json +24 -24
- package/src/components/css-classes/css-class-menu.tsx +3 -0
- package/src/components/style-sections/layout-section/grid-auto-flow-field.tsx +12 -5
- package/src/components/style-sections/layout-section/grid-outline-field.tsx +22 -7
- package/src/components/style-sections/position-section/position-section.tsx +8 -3
package/dist/index.mjs
CHANGED
|
@@ -992,6 +992,9 @@ function ClassStatesMenu({ closeMenu }) {
|
|
|
992
992
|
var CLASS_STATES_MAP = {
|
|
993
993
|
selected: {
|
|
994
994
|
label: __4("selected", "elementor")
|
|
995
|
+
},
|
|
996
|
+
disabled: {
|
|
997
|
+
label: __4("disabled", "elementor")
|
|
995
998
|
}
|
|
996
999
|
};
|
|
997
1000
|
function useElementStates() {
|
|
@@ -2722,7 +2725,7 @@ import { CLASSES_PROP_KEY } from "@elementor/editor-props";
|
|
|
2722
2725
|
import { useActiveBreakpoint } from "@elementor/editor-responsive";
|
|
2723
2726
|
import { createLocation as createLocation4 } from "@elementor/locations";
|
|
2724
2727
|
import { SessionStorageProvider as SessionStorageProvider2 } from "@elementor/session";
|
|
2725
|
-
import { Box as
|
|
2728
|
+
import { Box as Box7, Divider as Divider5, Stack as Stack13 } from "@elementor/ui";
|
|
2726
2729
|
import { __ as __62 } from "@wordpress/i18n";
|
|
2727
2730
|
|
|
2728
2731
|
// src/contexts/styles-inheritance-context.tsx
|
|
@@ -4301,7 +4304,7 @@ var GapControlField = () => {
|
|
|
4301
4304
|
|
|
4302
4305
|
// src/components/style-sections/layout-section/grid-auto-flow-field.tsx
|
|
4303
4306
|
import * as React53 from "react";
|
|
4304
|
-
import { ControlToggleButtonGroup as ControlToggleButtonGroup3 } from "@elementor/editor-controls";
|
|
4307
|
+
import { ControlToggleButtonGroup as ControlToggleButtonGroup3, useBoundProp as useBoundProp4 } from "@elementor/editor-controls";
|
|
4305
4308
|
import { ArrowDownSmallIcon as ArrowDownSmallIcon3, ArrowRightIcon as ArrowRightIcon2, LayoutDashboardIcon } from "@elementor/icons";
|
|
4306
4309
|
import { Grid as Grid3, ToggleButton, Tooltip as Tooltip3, withDirection as withDirection7 } from "@elementor/ui";
|
|
4307
4310
|
import { __ as __29 } from "@wordpress/i18n";
|
|
@@ -4324,7 +4327,7 @@ var directionOptions = [
|
|
|
4324
4327
|
];
|
|
4325
4328
|
var parseAutoFlow = (value) => {
|
|
4326
4329
|
if (!value) {
|
|
4327
|
-
return { direction:
|
|
4330
|
+
return { direction: null, dense: false };
|
|
4328
4331
|
}
|
|
4329
4332
|
const dense = value.includes("dense");
|
|
4330
4333
|
const direction = value.replace(/\s*dense\s*/, "").trim();
|
|
@@ -4334,27 +4337,33 @@ var composeAutoFlow = (direction, dense) => {
|
|
|
4334
4337
|
return dense ? `${direction} dense` : direction;
|
|
4335
4338
|
};
|
|
4336
4339
|
var GridAutoFlowFieldContent = () => {
|
|
4337
|
-
const { value, setValue } = useStylesField("grid-auto-flow", {
|
|
4340
|
+
const { value, setValue, canEdit } = useStylesField("grid-auto-flow", {
|
|
4338
4341
|
history: { propDisplayName: AUTO_FLOW_LABEL }
|
|
4339
4342
|
});
|
|
4343
|
+
const { placeholder } = useBoundProp4();
|
|
4340
4344
|
const { direction, dense } = parseAutoFlow(value?.value ?? null);
|
|
4345
|
+
const directionPlaceholder = parseAutoFlow(placeholder?.value ?? null).direction;
|
|
4341
4346
|
const handleDirectionChange = (newDirection) => {
|
|
4342
4347
|
if (!newDirection) {
|
|
4348
|
+
setValue(null);
|
|
4343
4349
|
return;
|
|
4344
4350
|
}
|
|
4345
4351
|
setValue({ $$type: "string", value: composeAutoFlow(newDirection, dense) });
|
|
4346
4352
|
};
|
|
4347
4353
|
const handleDenseToggle = () => {
|
|
4348
|
-
|
|
4354
|
+
const nextDirection = direction ?? "row";
|
|
4355
|
+
setValue({ $$type: "string", value: composeAutoFlow(nextDirection, !dense) });
|
|
4349
4356
|
};
|
|
4350
4357
|
return /* @__PURE__ */ React53.createElement(StylesFieldLayout, { label: AUTO_FLOW_LABEL }, /* @__PURE__ */ React53.createElement(Grid3, { container: true, gap: 1, flexWrap: "nowrap", alignItems: "center", justifyContent: "flex-end" }, /* @__PURE__ */ React53.createElement(Grid3, { item: true, sx: { width: 64, maxWidth: "100%" } }, /* @__PURE__ */ React53.createElement(
|
|
4351
4358
|
ControlToggleButtonGroup3,
|
|
4352
4359
|
{
|
|
4353
4360
|
items: directionOptions,
|
|
4354
4361
|
value: direction,
|
|
4362
|
+
placeholder: directionPlaceholder,
|
|
4355
4363
|
onChange: handleDirectionChange,
|
|
4356
4364
|
exclusive: true,
|
|
4357
|
-
fullWidth: true
|
|
4365
|
+
fullWidth: true,
|
|
4366
|
+
disabled: !canEdit
|
|
4358
4367
|
}
|
|
4359
4368
|
)), /* @__PURE__ */ React53.createElement(Grid3, { item: true }, /* @__PURE__ */ React53.createElement(Tooltip3, { title: DENSE_LABEL, placement: "top" }, /* @__PURE__ */ React53.createElement(
|
|
4360
4369
|
ToggleButton,
|
|
@@ -4363,7 +4372,8 @@ var GridAutoFlowFieldContent = () => {
|
|
|
4363
4372
|
selected: dense,
|
|
4364
4373
|
onChange: handleDenseToggle,
|
|
4365
4374
|
size: "tiny",
|
|
4366
|
-
"aria-label": DENSE_LABEL
|
|
4375
|
+
"aria-label": DENSE_LABEL,
|
|
4376
|
+
disabled: !canEdit
|
|
4367
4377
|
},
|
|
4368
4378
|
/* @__PURE__ */ React53.createElement(LayoutDashboardIcon, { fontSize: "tiny" })
|
|
4369
4379
|
)))));
|
|
@@ -4460,17 +4470,34 @@ var GridJustifyItemsField = () => /* @__PURE__ */ React55.createElement(StylesFi
|
|
|
4460
4470
|
|
|
4461
4471
|
// src/components/style-sections/layout-section/grid-outline-field.tsx
|
|
4462
4472
|
import * as React56 from "react";
|
|
4463
|
-
import {
|
|
4473
|
+
import { updateElementEditorSettings, useElementEditorSettings } from "@elementor/editor-elements";
|
|
4474
|
+
import { Box as Box5, Switch } from "@elementor/ui";
|
|
4464
4475
|
import { __ as __32 } from "@wordpress/i18n";
|
|
4465
4476
|
var GRID_OUTLINE_LABEL = __32("Show Grid Outline", "elementor");
|
|
4466
4477
|
var GridOutlineField = () => {
|
|
4467
|
-
|
|
4478
|
+
const { element } = useElement();
|
|
4479
|
+
const settings = useElementEditorSettings(element.id);
|
|
4480
|
+
const value = settings?.grid_outline ?? true;
|
|
4481
|
+
return /* @__PURE__ */ React56.createElement(StylesFieldLayout, { label: GRID_OUTLINE_LABEL }, /* @__PURE__ */ React56.createElement(Box5, { sx: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React56.createElement(
|
|
4482
|
+
Switch,
|
|
4483
|
+
{
|
|
4484
|
+
"aria-label": GRID_OUTLINE_LABEL,
|
|
4485
|
+
checked: value,
|
|
4486
|
+
onChange: (event) => {
|
|
4487
|
+
updateElementEditorSettings({
|
|
4488
|
+
elementId: element.id,
|
|
4489
|
+
settings: { grid_outline: event.target.checked }
|
|
4490
|
+
});
|
|
4491
|
+
},
|
|
4492
|
+
size: "small"
|
|
4493
|
+
}
|
|
4494
|
+
)));
|
|
4468
4495
|
};
|
|
4469
4496
|
|
|
4470
4497
|
// src/components/style-sections/layout-section/grid-size-field.tsx
|
|
4471
4498
|
import * as React57 from "react";
|
|
4472
4499
|
import { useRef as useRef9 } from "react";
|
|
4473
|
-
import { ControlActions, createControl, SizeComponent, useBoundProp as
|
|
4500
|
+
import { ControlActions, createControl, SizeComponent, useBoundProp as useBoundProp5 } from "@elementor/editor-controls";
|
|
4474
4501
|
import { Grid as Grid4 } from "@elementor/ui";
|
|
4475
4502
|
import { __ as __33 } from "@wordpress/i18n";
|
|
4476
4503
|
|
|
@@ -4589,7 +4616,7 @@ var GridTrackFieldContent = ({ cssProp, label }) => {
|
|
|
4589
4616
|
const { value, setValue } = useStylesField(cssProp, {
|
|
4590
4617
|
history: { propDisplayName: label }
|
|
4591
4618
|
});
|
|
4592
|
-
const { placeholder: inheritedPlaceholder } =
|
|
4619
|
+
const { placeholder: inheritedPlaceholder } = useBoundProp5();
|
|
4593
4620
|
const anchorRef = useRef9(null);
|
|
4594
4621
|
const local = parseValue(value);
|
|
4595
4622
|
const inherited = parseValue(inheritedPlaceholder);
|
|
@@ -4848,12 +4875,12 @@ var PositionField = () => {
|
|
|
4848
4875
|
import * as React65 from "react";
|
|
4849
4876
|
import { NumberControl as NumberControl4 } from "@elementor/editor-controls";
|
|
4850
4877
|
import { InfoCircleFilledIcon } from "@elementor/icons";
|
|
4851
|
-
import { Alert as Alert3, AlertTitle as AlertTitle2, Box as
|
|
4878
|
+
import { Alert as Alert3, AlertTitle as AlertTitle2, Box as Box6, Infotip } from "@elementor/ui";
|
|
4852
4879
|
import { __ as __41 } from "@wordpress/i18n";
|
|
4853
4880
|
var Z_INDEX_LABEL = __41("Z-index", "elementor");
|
|
4854
4881
|
var ZIndexField = ({ disabled }) => {
|
|
4855
4882
|
const StyleField = /* @__PURE__ */ React65.createElement(StylesField, { bind: "z-index", propDisplayName: Z_INDEX_LABEL }, /* @__PURE__ */ React65.createElement(StylesFieldLayout, { label: Z_INDEX_LABEL }, /* @__PURE__ */ React65.createElement(NumberControl4, { disabled })));
|
|
4856
|
-
const content = /* @__PURE__ */ React65.createElement(Alert3, { color: "secondary", icon: /* @__PURE__ */ React65.createElement(InfoCircleFilledIcon, null), size: "small" }, /* @__PURE__ */ React65.createElement(AlertTitle2, null, __41("Z-index", "elementor")), /* @__PURE__ */ React65.createElement(
|
|
4883
|
+
const content = /* @__PURE__ */ React65.createElement(Alert3, { color: "secondary", icon: /* @__PURE__ */ React65.createElement(InfoCircleFilledIcon, null), size: "small" }, /* @__PURE__ */ React65.createElement(AlertTitle2, null, __41("Z-index", "elementor")), /* @__PURE__ */ React65.createElement(Box6, { component: "span" }, __41(
|
|
4857
4884
|
"z-index only works on positioned elements. Change position to relative, absolute, or fixed to enable layering.",
|
|
4858
4885
|
"elementor"
|
|
4859
4886
|
)));
|
|
@@ -4865,7 +4892,7 @@ var ZIndexField = ({ disabled }) => {
|
|
|
4865
4892
|
color: "secondary",
|
|
4866
4893
|
slotProps: { popper: { sx: { width: 300 } } }
|
|
4867
4894
|
},
|
|
4868
|
-
/* @__PURE__ */ React65.createElement(
|
|
4895
|
+
/* @__PURE__ */ React65.createElement(Box6, null, StyleField)
|
|
4869
4896
|
) : /* @__PURE__ */ React65.createElement(React65.Fragment, null, StyleField);
|
|
4870
4897
|
};
|
|
4871
4898
|
|
|
@@ -4882,6 +4909,9 @@ var DEPENDENT_PROP_NAMES = [
|
|
|
4882
4909
|
];
|
|
4883
4910
|
var PositionSection = () => {
|
|
4884
4911
|
const { value: position } = useStylesField("position", withHistoryLabel(POSITION_LABEL2));
|
|
4912
|
+
const inheritedPosition = useInheritedValues(["position"]).position;
|
|
4913
|
+
const resolvedPosition = position ?? inheritedPosition ?? null;
|
|
4914
|
+
const isPositionUnsetOrStatic = !resolvedPosition || resolvedPosition.value === POSITION_STATIC;
|
|
4885
4915
|
const positionPrevRef = useRef12(position);
|
|
4886
4916
|
const { values: dependentValues, setValues: setDependentValues } = useStylesFields(DEPENDENT_PROP_NAMES);
|
|
4887
4917
|
const [savedDependentValues, saveToHistory, clearHistory] = usePersistDimensions();
|
|
@@ -4893,12 +4923,12 @@ var PositionSection = () => {
|
|
|
4893
4923
|
setDependentValues({ ...savedDependentValues }, withHistoryLabel(DIMENSIONS_LABEL));
|
|
4894
4924
|
clearHistory();
|
|
4895
4925
|
}
|
|
4896
|
-
if (
|
|
4926
|
+
if (isPositionUnsetOrStatic && dependentValues?.["z-index"]) {
|
|
4897
4927
|
setDependentValues({ "z-index": null }, withHistoryLabel(DIMENSIONS_LABEL));
|
|
4898
4928
|
}
|
|
4899
4929
|
positionPrevRef.current = position;
|
|
4900
|
-
}, [position?.value]);
|
|
4901
|
-
return /* @__PURE__ */ React66.createElement(StyledSectionContent, null, /* @__PURE__ */ React66.createElement(PositionField, null), /* @__PURE__ */ React66.createElement(DimensionsField, null), /* @__PURE__ */ React66.createElement(ZIndexField, { disabled:
|
|
4930
|
+
}, [position?.value, isPositionUnsetOrStatic]);
|
|
4931
|
+
return /* @__PURE__ */ React66.createElement(StyledSectionContent, null, /* @__PURE__ */ React66.createElement(PositionField, null), /* @__PURE__ */ React66.createElement(DimensionsField, null), /* @__PURE__ */ React66.createElement(ZIndexField, { disabled: isPositionUnsetOrStatic }), /* @__PURE__ */ React66.createElement(PanelDivider, null), /* @__PURE__ */ React66.createElement(OffsetField, null));
|
|
4902
4932
|
};
|
|
4903
4933
|
var usePersistDimensions = () => {
|
|
4904
4934
|
const { id: styleDefID, meta } = useStyle();
|
|
@@ -5607,7 +5637,7 @@ var StyleTab = () => {
|
|
|
5607
5637
|
"transition"
|
|
5608
5638
|
]
|
|
5609
5639
|
}
|
|
5610
|
-
), /* @__PURE__ */ React89.createElement(StyleTabSlot, null)), /* @__PURE__ */ React89.createElement(
|
|
5640
|
+
), /* @__PURE__ */ React89.createElement(StyleTabSlot, null)), /* @__PURE__ */ React89.createElement(Box7, { sx: { height: "150px" } })))
|
|
5611
5641
|
));
|
|
5612
5642
|
};
|
|
5613
5643
|
function ClassesHeader({ children }) {
|
|
@@ -5769,16 +5799,16 @@ import * as React93 from "react";
|
|
|
5769
5799
|
import {
|
|
5770
5800
|
ControlFormLabel as ControlFormLabel3,
|
|
5771
5801
|
Repeater,
|
|
5772
|
-
useBoundProp as
|
|
5802
|
+
useBoundProp as useBoundProp7
|
|
5773
5803
|
} from "@elementor/editor-controls";
|
|
5774
5804
|
import {
|
|
5775
|
-
updateElementEditorSettings,
|
|
5805
|
+
updateElementEditorSettings as updateElementEditorSettings2,
|
|
5776
5806
|
useElementChildren,
|
|
5777
|
-
useElementEditorSettings
|
|
5807
|
+
useElementEditorSettings as useElementEditorSettings2
|
|
5778
5808
|
} from "@elementor/editor-elements";
|
|
5779
5809
|
import { numberPropTypeUtil as numberPropTypeUtil4 } from "@elementor/editor-props";
|
|
5780
5810
|
import { InfoCircleFilledIcon as InfoCircleFilledIcon2 } from "@elementor/icons";
|
|
5781
|
-
import { Alert as Alert4, Chip as Chip4, Infotip as Infotip2, Stack as Stack15, Switch, TextField as TextField2, Typography as Typography5 } from "@elementor/ui";
|
|
5811
|
+
import { Alert as Alert4, Chip as Chip4, Infotip as Infotip2, Stack as Stack15, Switch as Switch2, TextField as TextField2, Typography as Typography5 } from "@elementor/ui";
|
|
5782
5812
|
import { __ as __67 } from "@wordpress/i18n";
|
|
5783
5813
|
|
|
5784
5814
|
// src/controls-registry/element-controls/get-element-by-type.ts
|
|
@@ -5795,7 +5825,7 @@ var getElementByType = (elementId, type) => {
|
|
|
5795
5825
|
};
|
|
5796
5826
|
|
|
5797
5827
|
// src/controls-registry/element-controls/tabs-control/use-actions.ts
|
|
5798
|
-
import { useBoundProp as
|
|
5828
|
+
import { useBoundProp as useBoundProp6 } from "@elementor/editor-controls";
|
|
5799
5829
|
import {
|
|
5800
5830
|
createElements,
|
|
5801
5831
|
duplicateElements,
|
|
@@ -5808,7 +5838,7 @@ import { __ as __66 } from "@wordpress/i18n";
|
|
|
5808
5838
|
var TAB_ELEMENT_TYPE = "e-tab";
|
|
5809
5839
|
var TAB_CONTENT_ELEMENT_TYPE = "e-tab-content";
|
|
5810
5840
|
var useActions = () => {
|
|
5811
|
-
const { value, setValue: setDefaultActiveTab } =
|
|
5841
|
+
const { value, setValue: setDefaultActiveTab } = useBoundProp6(numberPropTypeUtil3);
|
|
5812
5842
|
const defaultActiveTab = value ?? 0;
|
|
5813
5843
|
const duplicateItem = ({
|
|
5814
5844
|
items: items3,
|
|
@@ -6069,7 +6099,7 @@ var ItemLabel = ({ value, index }) => {
|
|
|
6069
6099
|
return /* @__PURE__ */ React93.createElement(Stack15, { sx: { minHeight: 20 }, direction: "row", alignItems: "center", gap: 1.5 }, /* @__PURE__ */ React93.createElement("span", null, elementTitle), /* @__PURE__ */ React93.createElement(ItemDefaultTab, { index }));
|
|
6070
6100
|
};
|
|
6071
6101
|
var ItemDefaultTab = ({ index }) => {
|
|
6072
|
-
const { value: defaultItem } =
|
|
6102
|
+
const { value: defaultItem } = useBoundProp7(numberPropTypeUtil4);
|
|
6073
6103
|
const isDefault = defaultItem === index;
|
|
6074
6104
|
if (!isDefault) {
|
|
6075
6105
|
return null;
|
|
@@ -6083,10 +6113,10 @@ var ItemContent = ({ value, index }) => {
|
|
|
6083
6113
|
return /* @__PURE__ */ React93.createElement(Stack15, { p: 2, gap: 1.5 }, /* @__PURE__ */ React93.createElement(TabLabelControl, { elementId: value.id }), /* @__PURE__ */ React93.createElement(SettingsField, { bind: "default-active-tab", propDisplayName: __67("Tabs", "elementor") }, /* @__PURE__ */ React93.createElement(DefaultTabControl, { tabIndex: index })));
|
|
6084
6114
|
};
|
|
6085
6115
|
var DefaultTabControl = ({ tabIndex }) => {
|
|
6086
|
-
const { value, setValue } =
|
|
6116
|
+
const { value, setValue } = useBoundProp7(numberPropTypeUtil4);
|
|
6087
6117
|
const isDefault = value === tabIndex;
|
|
6088
6118
|
return /* @__PURE__ */ React93.createElement(Stack15, { direction: "row", alignItems: "center", justifyContent: "space-between", gap: 2 }, /* @__PURE__ */ React93.createElement(ControlFormLabel3, null, __67("Set as default tab", "elementor")), /* @__PURE__ */ React93.createElement(ConditionalTooltip, { showTooltip: isDefault, placement: "right" }, /* @__PURE__ */ React93.createElement(
|
|
6089
|
-
|
|
6119
|
+
Switch2,
|
|
6090
6120
|
{
|
|
6091
6121
|
size: "small",
|
|
6092
6122
|
checked: isDefault,
|
|
@@ -6101,7 +6131,7 @@ var DefaultTabControl = ({ tabIndex }) => {
|
|
|
6101
6131
|
)));
|
|
6102
6132
|
};
|
|
6103
6133
|
var TabLabelControl = ({ elementId }) => {
|
|
6104
|
-
const editorSettings =
|
|
6134
|
+
const editorSettings = useElementEditorSettings2(elementId);
|
|
6105
6135
|
const label = editorSettings?.title ?? "";
|
|
6106
6136
|
return /* @__PURE__ */ React93.createElement(Stack15, { gap: 1 }, /* @__PURE__ */ React93.createElement(ControlFormLabel3, null, __67("Tab name", "elementor")), /* @__PURE__ */ React93.createElement(
|
|
6107
6137
|
TextField2,
|
|
@@ -6109,7 +6139,7 @@ var TabLabelControl = ({ elementId }) => {
|
|
|
6109
6139
|
size: "tiny",
|
|
6110
6140
|
value: label,
|
|
6111
6141
|
onChange: ({ target }) => {
|
|
6112
|
-
|
|
6142
|
+
updateElementEditorSettings2({
|
|
6113
6143
|
elementId,
|
|
6114
6144
|
settings: { title: target.value }
|
|
6115
6145
|
});
|
|
@@ -6166,7 +6196,7 @@ import { controlActionsMenu as controlActionsMenu2 } from "@elementor/menus";
|
|
|
6166
6196
|
|
|
6167
6197
|
// src/dynamics/components/background-control-dynamic-tag.tsx
|
|
6168
6198
|
import * as React94 from "react";
|
|
6169
|
-
import { PropKeyProvider as PropKeyProvider4, PropProvider as PropProvider4, useBoundProp as
|
|
6199
|
+
import { PropKeyProvider as PropKeyProvider4, PropProvider as PropProvider4, useBoundProp as useBoundProp9 } from "@elementor/editor-controls";
|
|
6170
6200
|
import {
|
|
6171
6201
|
backgroundImageOverlayPropTypeUtil
|
|
6172
6202
|
} from "@elementor/editor-props";
|
|
@@ -6177,7 +6207,7 @@ import { useMemo as useMemo12 } from "react";
|
|
|
6177
6207
|
|
|
6178
6208
|
// src/dynamics/hooks/use-prop-dynamic-tags.ts
|
|
6179
6209
|
import { useMemo as useMemo11 } from "react";
|
|
6180
|
-
import { useBoundProp as
|
|
6210
|
+
import { useBoundProp as useBoundProp8 } from "@elementor/editor-controls";
|
|
6181
6211
|
|
|
6182
6212
|
// src/dynamics/sync/get-atomic-dynamic-tags.ts
|
|
6183
6213
|
import { getElementorConfig } from "@elementor/editor-v1-adapters";
|
|
@@ -6264,7 +6294,7 @@ var useAllPropDynamicTags = () => {
|
|
|
6264
6294
|
};
|
|
6265
6295
|
var usePropDynamicTagsInternal = (filterByLicense2) => {
|
|
6266
6296
|
let categories = [];
|
|
6267
|
-
const { propType } =
|
|
6297
|
+
const { propType } = useBoundProp8();
|
|
6268
6298
|
if (propType) {
|
|
6269
6299
|
const propDynamicType = getDynamicPropType(propType);
|
|
6270
6300
|
categories = propDynamicType?.settings.categories || [];
|
|
@@ -6310,11 +6340,11 @@ var useDynamicTag = (tagName) => {
|
|
|
6310
6340
|
// src/dynamics/components/background-control-dynamic-tag.tsx
|
|
6311
6341
|
var BackgroundControlDynamicTagIcon = () => /* @__PURE__ */ React94.createElement(DatabaseIcon, { fontSize: "tiny" });
|
|
6312
6342
|
var BackgroundControlDynamicTagLabel = ({ value }) => {
|
|
6313
|
-
const context =
|
|
6343
|
+
const context = useBoundProp9(backgroundImageOverlayPropTypeUtil);
|
|
6314
6344
|
return /* @__PURE__ */ React94.createElement(PropProvider4, { ...context, value: value.value }, /* @__PURE__ */ React94.createElement(PropKeyProvider4, { bind: "image" }, /* @__PURE__ */ React94.createElement(Wrapper2, { rawValue: value.value })));
|
|
6315
6345
|
};
|
|
6316
6346
|
var Wrapper2 = ({ rawValue }) => {
|
|
6317
|
-
const { propType } =
|
|
6347
|
+
const { propType } = useBoundProp9();
|
|
6318
6348
|
const imageOverlayPropType = propType.prop_types["background-image-overlay"];
|
|
6319
6349
|
return /* @__PURE__ */ React94.createElement(PropProvider4, { propType: imageOverlayPropType.shape.image, value: rawValue, setValue: () => void 0 }, /* @__PURE__ */ React94.createElement(PropKeyProvider4, { bind: "src" }, /* @__PURE__ */ React94.createElement(Content, { rawValue: rawValue.image })));
|
|
6320
6350
|
};
|
|
@@ -6330,14 +6360,14 @@ import {
|
|
|
6330
6360
|
ControlFormLabel as ControlFormLabel4,
|
|
6331
6361
|
PropKeyProvider as PropKeyProvider6,
|
|
6332
6362
|
PropProvider as PropProvider6,
|
|
6333
|
-
useBoundProp as
|
|
6363
|
+
useBoundProp as useBoundProp12
|
|
6334
6364
|
} from "@elementor/editor-controls";
|
|
6335
6365
|
import { PopoverHeader as PopoverHeader2, SectionPopoverBody as SectionPopoverBody2 } from "@elementor/editor-ui";
|
|
6336
6366
|
import { DatabaseIcon as DatabaseIcon3, SettingsIcon, XIcon } from "@elementor/icons";
|
|
6337
6367
|
import {
|
|
6338
6368
|
bindPopover,
|
|
6339
6369
|
bindTrigger as bindTrigger2,
|
|
6340
|
-
Box as
|
|
6370
|
+
Box as Box8,
|
|
6341
6371
|
Divider as Divider8,
|
|
6342
6372
|
Grid as Grid8,
|
|
6343
6373
|
IconButton as IconButton2,
|
|
@@ -6362,7 +6392,7 @@ var usePersistDynamicValue = (propKey) => {
|
|
|
6362
6392
|
|
|
6363
6393
|
// src/dynamics/dynamic-control.tsx
|
|
6364
6394
|
import * as React96 from "react";
|
|
6365
|
-
import { PropKeyProvider as PropKeyProvider5, PropProvider as PropProvider5, useBoundProp as
|
|
6395
|
+
import { PropKeyProvider as PropKeyProvider5, PropProvider as PropProvider5, useBoundProp as useBoundProp10 } from "@elementor/editor-controls";
|
|
6366
6396
|
|
|
6367
6397
|
// src/dynamics/components/dynamic-conditional-control.tsx
|
|
6368
6398
|
import * as React95 from "react";
|
|
@@ -6415,7 +6445,7 @@ var DynamicConditionalControl = ({
|
|
|
6415
6445
|
|
|
6416
6446
|
// src/dynamics/dynamic-control.tsx
|
|
6417
6447
|
var DynamicControl = ({ bind, children }) => {
|
|
6418
|
-
const { value, setValue } =
|
|
6448
|
+
const { value, setValue } = useBoundProp10(dynamicPropTypeUtil);
|
|
6419
6449
|
const { name = "", group = "", settings } = value ?? {};
|
|
6420
6450
|
const dynamicTag = useDynamicTag(name);
|
|
6421
6451
|
if (!dynamicTag) {
|
|
@@ -6449,7 +6479,7 @@ var DynamicControl = ({ bind, children }) => {
|
|
|
6449
6479
|
// src/dynamics/components/dynamic-selection.tsx
|
|
6450
6480
|
import * as React97 from "react";
|
|
6451
6481
|
import { Fragment as Fragment14, useEffect as useEffect9, useState as useState10 } from "react";
|
|
6452
|
-
import { trackUpgradePromotionClick, trackViewPromotion, useBoundProp as
|
|
6482
|
+
import { trackUpgradePromotionClick, trackViewPromotion, useBoundProp as useBoundProp11 } from "@elementor/editor-controls";
|
|
6453
6483
|
import { CtaButton, PopoverHeader, PopoverMenuList, SearchField, SectionPopoverBody } from "@elementor/editor-ui";
|
|
6454
6484
|
import { DatabaseIcon as DatabaseIcon2 } from "@elementor/icons";
|
|
6455
6485
|
import { Divider as Divider7, Link as Link2, Stack as Stack16, Typography as Typography6, useTheme as useTheme3 } from "@elementor/ui";
|
|
@@ -6462,8 +6492,8 @@ var DynamicSelection = ({ close: closePopover, expired = false }) => {
|
|
|
6462
6492
|
const [searchValue, setSearchValue] = useState10("");
|
|
6463
6493
|
const { groups: dynamicGroups } = getAtomicDynamicTags() || {};
|
|
6464
6494
|
const theme = useTheme3();
|
|
6465
|
-
const { value: anyValue } =
|
|
6466
|
-
const { bind, value: dynamicValue, setValue } =
|
|
6495
|
+
const { value: anyValue } = useBoundProp11();
|
|
6496
|
+
const { bind, value: dynamicValue, setValue } = useBoundProp11(dynamicPropTypeUtil);
|
|
6467
6497
|
const [, updatePropValueHistory] = usePersistDynamicValue(bind);
|
|
6468
6498
|
const isCurrentValueDynamic = !!dynamicValue;
|
|
6469
6499
|
const options13 = useFilteredOptions(searchValue);
|
|
@@ -6615,8 +6645,8 @@ var useFilteredOptions = (searchValue) => {
|
|
|
6615
6645
|
var SIZE3 = "tiny";
|
|
6616
6646
|
var tagsWithoutTabs = ["popup"];
|
|
6617
6647
|
var DynamicSelectionControl = ({ OriginalControl, ...props }) => {
|
|
6618
|
-
const { setValue: setAnyValue, propType } =
|
|
6619
|
-
const { bind, value } =
|
|
6648
|
+
const { setValue: setAnyValue, propType } = useBoundProp12();
|
|
6649
|
+
const { bind, value } = useBoundProp12(dynamicPropTypeUtil);
|
|
6620
6650
|
const { expired: readonly } = useLicenseConfig();
|
|
6621
6651
|
const originalPropType = createTopLevelObjectType({
|
|
6622
6652
|
schema: {
|
|
@@ -6636,7 +6666,7 @@ var DynamicSelectionControl = ({ OriginalControl, ...props }) => {
|
|
|
6636
6666
|
if (!dynamicTag) {
|
|
6637
6667
|
throw new Error(`Dynamic tag ${tagName} not found`);
|
|
6638
6668
|
}
|
|
6639
|
-
return /* @__PURE__ */ React98.createElement(
|
|
6669
|
+
return /* @__PURE__ */ React98.createElement(Box8, null, /* @__PURE__ */ React98.createElement(
|
|
6640
6670
|
Tag,
|
|
6641
6671
|
{
|
|
6642
6672
|
fullWidth: true,
|
|
@@ -6839,11 +6869,11 @@ function getDynamicValue(name, settings, renderPostId) {
|
|
|
6839
6869
|
|
|
6840
6870
|
// src/dynamics/hooks/use-prop-dynamic-action.tsx
|
|
6841
6871
|
import * as React99 from "react";
|
|
6842
|
-
import { useBoundProp as
|
|
6872
|
+
import { useBoundProp as useBoundProp13 } from "@elementor/editor-controls";
|
|
6843
6873
|
import { DatabaseIcon as DatabaseIcon4 } from "@elementor/icons";
|
|
6844
6874
|
import { __ as __70 } from "@wordpress/i18n";
|
|
6845
6875
|
var usePropDynamicAction = () => {
|
|
6846
|
-
const { propType } =
|
|
6876
|
+
const { propType } = useBoundProp13();
|
|
6847
6877
|
const visible = !!propType && supportsDynamic(propType);
|
|
6848
6878
|
return {
|
|
6849
6879
|
visible,
|
|
@@ -6880,7 +6910,7 @@ var init2 = () => {
|
|
|
6880
6910
|
};
|
|
6881
6911
|
|
|
6882
6912
|
// src/reset-style-props.tsx
|
|
6883
|
-
import { useBoundProp as
|
|
6913
|
+
import { useBoundProp as useBoundProp14 } from "@elementor/editor-controls";
|
|
6884
6914
|
import { hasVariable as hasVariable2 } from "@elementor/editor-variables";
|
|
6885
6915
|
import { BrushBigIcon } from "@elementor/icons";
|
|
6886
6916
|
import { controlActionsMenu as controlActionsMenu3 } from "@elementor/menus";
|
|
@@ -6940,7 +6970,7 @@ function initResetStyleProps() {
|
|
|
6940
6970
|
}
|
|
6941
6971
|
function useResetStyleValueProps() {
|
|
6942
6972
|
const isStyle = useIsStyle();
|
|
6943
|
-
const { value, resetValue, propType } =
|
|
6973
|
+
const { value, resetValue, propType } = useBoundProp14();
|
|
6944
6974
|
const hasValue = value !== null && value !== void 0;
|
|
6945
6975
|
const hasInitial = propType.initial_value !== void 0 && propType.initial_value !== null;
|
|
6946
6976
|
const isRequired = !!propType.settings?.required;
|
|
@@ -6968,7 +6998,7 @@ function useResetStyleValueProps() {
|
|
|
6968
6998
|
|
|
6969
6999
|
// src/styles-inheritance/components/styles-inheritance-indicator.tsx
|
|
6970
7000
|
import * as React105 from "react";
|
|
6971
|
-
import { useBoundProp as
|
|
7001
|
+
import { useBoundProp as useBoundProp15 } from "@elementor/editor-controls";
|
|
6972
7002
|
import { isEmpty as isEmpty3 } from "@elementor/editor-props";
|
|
6973
7003
|
import { ELEMENTS_BASE_STYLES_PROVIDER_KEY as ELEMENTS_BASE_STYLES_PROVIDER_KEY4 } from "@elementor/editor-styles-repository";
|
|
6974
7004
|
import { __ as __75 } from "@wordpress/i18n";
|
|
@@ -6983,7 +7013,7 @@ import {
|
|
|
6983
7013
|
import { PopoverHeader as PopoverHeader3, useSectionWidth as useSectionWidth2 } from "@elementor/editor-ui";
|
|
6984
7014
|
import {
|
|
6985
7015
|
Backdrop,
|
|
6986
|
-
Box as
|
|
7016
|
+
Box as Box10,
|
|
6987
7017
|
Card,
|
|
6988
7018
|
CardContent,
|
|
6989
7019
|
ClickAwayListener,
|
|
@@ -7166,8 +7196,8 @@ var ValueComponent = ({ index, value }) => {
|
|
|
7166
7196
|
|
|
7167
7197
|
// src/styles-inheritance/components/infotip/action-icons.tsx
|
|
7168
7198
|
import * as React103 from "react";
|
|
7169
|
-
import { Box as
|
|
7170
|
-
var ActionIcons = () => /* @__PURE__ */ React103.createElement(
|
|
7199
|
+
import { Box as Box9 } from "@elementor/ui";
|
|
7200
|
+
var ActionIcons = () => /* @__PURE__ */ React103.createElement(Box9, { display: "flex", gap: 0.5, alignItems: "center" });
|
|
7171
7201
|
|
|
7172
7202
|
// src/styles-inheritance/components/styles-inheritance-infotip.tsx
|
|
7173
7203
|
var SECTION_PADDING_INLINE = 32;
|
|
@@ -7217,7 +7247,7 @@ var StylesInheritanceInfotip = ({
|
|
|
7217
7247
|
}
|
|
7218
7248
|
},
|
|
7219
7249
|
/* @__PURE__ */ React104.createElement(
|
|
7220
|
-
|
|
7250
|
+
Box10,
|
|
7221
7251
|
{
|
|
7222
7252
|
sx: {
|
|
7223
7253
|
position: "sticky",
|
|
@@ -7244,7 +7274,7 @@ var StylesInheritanceInfotip = ({
|
|
|
7244
7274
|
},
|
|
7245
7275
|
/* @__PURE__ */ React104.createElement(Stack18, { gap: 1.5, sx: { pl: 2, pr: 1, pt: 1.5, pb: 1.5 }, role: "list" }, items3.map((item, index) => {
|
|
7246
7276
|
return /* @__PURE__ */ React104.createElement(
|
|
7247
|
-
|
|
7277
|
+
Box10,
|
|
7248
7278
|
{
|
|
7249
7279
|
key: item.id,
|
|
7250
7280
|
display: "flex",
|
|
@@ -7256,7 +7286,7 @@ var StylesInheritanceInfotip = ({
|
|
|
7256
7286
|
)
|
|
7257
7287
|
},
|
|
7258
7288
|
/* @__PURE__ */ React104.createElement(
|
|
7259
|
-
|
|
7289
|
+
Box10,
|
|
7260
7290
|
{
|
|
7261
7291
|
display: "flex",
|
|
7262
7292
|
gap: 0.5,
|
|
@@ -7272,9 +7302,9 @@ var StylesInheritanceInfotip = ({
|
|
|
7272
7302
|
)
|
|
7273
7303
|
));
|
|
7274
7304
|
if (isDisabled) {
|
|
7275
|
-
return /* @__PURE__ */ React104.createElement(
|
|
7305
|
+
return /* @__PURE__ */ React104.createElement(Box10, { sx: { display: "inline-flex" } }, children);
|
|
7276
7306
|
}
|
|
7277
|
-
return /* @__PURE__ */ React104.createElement(
|
|
7307
|
+
return /* @__PURE__ */ React104.createElement(Box10, { ref: triggerRef, sx: { display: "inline-flex" } }, /* @__PURE__ */ React104.createElement(
|
|
7278
7308
|
TooltipOrInfotip,
|
|
7279
7309
|
{
|
|
7280
7310
|
showInfotip,
|
|
@@ -7302,7 +7332,7 @@ function TooltipOrInfotip({
|
|
|
7302
7332
|
isDisabled
|
|
7303
7333
|
}) {
|
|
7304
7334
|
if (isDisabled) {
|
|
7305
|
-
return /* @__PURE__ */ React104.createElement(
|
|
7335
|
+
return /* @__PURE__ */ React104.createElement(Box10, { sx: { display: "inline-flex" } }, children);
|
|
7306
7336
|
}
|
|
7307
7337
|
if (showInfotip) {
|
|
7308
7338
|
return /* @__PURE__ */ React104.createElement(React104.Fragment, null, /* @__PURE__ */ React104.createElement(
|
|
@@ -7334,7 +7364,7 @@ function TooltipOrInfotip({
|
|
|
7334
7364
|
var StylesInheritanceIndicator = ({
|
|
7335
7365
|
customContext
|
|
7336
7366
|
}) => {
|
|
7337
|
-
const context =
|
|
7367
|
+
const context = useBoundProp15();
|
|
7338
7368
|
const { path, propType } = customContext || context;
|
|
7339
7369
|
const inheritanceChain = useStylesInheritanceChain(path);
|
|
7340
7370
|
if (!path || !inheritanceChain.length) {
|