@elementor/editor-editing-panel 3.33.0-227 → 3.33.0-228
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 +157 -236
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +117 -196
- package/dist/index.mjs.map +1 -1
- package/package.json +20 -20
- package/src/components/editing-panel-tabs.tsx +1 -4
- package/src/components/interactions-tab.tsx +3 -65
- package/src/contexts/interaction-context.tsx +0 -39
package/dist/index.js
CHANGED
|
@@ -4797,20 +4797,20 @@ var import_editor_panels3 = require("@elementor/editor-panels");
|
|
|
4797
4797
|
var import_editor_v1_adapters8 = require("@elementor/editor-v1-adapters");
|
|
4798
4798
|
|
|
4799
4799
|
// src/hooks/use-open-editor-panel.ts
|
|
4800
|
-
var
|
|
4800
|
+
var import_react39 = require("react");
|
|
4801
4801
|
var import_editor_v1_adapters7 = require("@elementor/editor-v1-adapters");
|
|
4802
4802
|
|
|
4803
4803
|
// src/panel.ts
|
|
4804
4804
|
var import_editor_panels2 = require("@elementor/editor-panels");
|
|
4805
4805
|
|
|
4806
4806
|
// src/components/editing-panel.tsx
|
|
4807
|
-
var
|
|
4807
|
+
var React90 = __toESM(require("react"));
|
|
4808
4808
|
var import_editor_controls52 = require("@elementor/editor-controls");
|
|
4809
|
-
var
|
|
4809
|
+
var import_editor_elements13 = require("@elementor/editor-elements");
|
|
4810
4810
|
var import_editor_panels = require("@elementor/editor-panels");
|
|
4811
4811
|
var import_editor_ui6 = require("@elementor/editor-ui");
|
|
4812
4812
|
var import_icons24 = require("@elementor/icons");
|
|
4813
|
-
var
|
|
4813
|
+
var import_session8 = require("@elementor/session");
|
|
4814
4814
|
var import_ui45 = require("@elementor/ui");
|
|
4815
4815
|
var import_i18n61 = require("@wordpress/i18n");
|
|
4816
4816
|
|
|
@@ -4822,107 +4822,28 @@ function EditorPanelErrorFallback() {
|
|
|
4822
4822
|
}
|
|
4823
4823
|
|
|
4824
4824
|
// src/components/editing-panel-tabs.tsx
|
|
4825
|
-
var
|
|
4826
|
-
var
|
|
4827
|
-
var import_editor_interactions2 = require("@elementor/editor-interactions");
|
|
4825
|
+
var import_react38 = require("react");
|
|
4826
|
+
var React89 = __toESM(require("react"));
|
|
4828
4827
|
var import_editor_v1_adapters6 = require("@elementor/editor-v1-adapters");
|
|
4829
4828
|
var import_ui44 = require("@elementor/ui");
|
|
4830
4829
|
var import_i18n60 = require("@wordpress/i18n");
|
|
4831
4830
|
|
|
4832
4831
|
// src/components/interactions-tab.tsx
|
|
4833
|
-
var React85 = __toESM(require("react"));
|
|
4834
|
-
var import_react38 = require("react");
|
|
4835
|
-
var import_editor_elements13 = require("@elementor/editor-elements");
|
|
4836
|
-
var import_editor_interactions = require("@elementor/editor-interactions");
|
|
4837
|
-
var import_session6 = require("@elementor/session");
|
|
4838
|
-
|
|
4839
|
-
// src/contexts/interaction-context.tsx
|
|
4840
4832
|
var React84 = __toESM(require("react"));
|
|
4841
|
-
var
|
|
4842
|
-
var import_editor_elements12 = require("@elementor/editor-elements");
|
|
4843
|
-
var InteractionsContext = (0, import_react37.createContext)(null);
|
|
4844
|
-
var InteractionsProvider = ({ children }) => {
|
|
4845
|
-
const { element } = useElement();
|
|
4846
|
-
const interactions = (0, import_editor_elements12.useElementInteractions)(element.id);
|
|
4847
|
-
const setInteractions = (value) => {
|
|
4848
|
-
(0, import_editor_elements12.updateElementInteractions)({
|
|
4849
|
-
elementId: element.id,
|
|
4850
|
-
interactions: value
|
|
4851
|
-
});
|
|
4852
|
-
};
|
|
4853
|
-
const contextValue = {
|
|
4854
|
-
interactions: interactions || "",
|
|
4855
|
-
setInteractions
|
|
4856
|
-
};
|
|
4857
|
-
return /* @__PURE__ */ React84.createElement(InteractionsContext.Provider, { value: contextValue }, children);
|
|
4858
|
-
};
|
|
4859
|
-
var useInteractionsContext = () => {
|
|
4860
|
-
const context = (0, import_react37.useContext)(InteractionsContext);
|
|
4861
|
-
if (!context) {
|
|
4862
|
-
throw new Error("useInteractionsContext must be used within InteractionsProvider");
|
|
4863
|
-
}
|
|
4864
|
-
return context;
|
|
4865
|
-
};
|
|
4866
|
-
|
|
4867
|
-
// src/components/interactions-tab.tsx
|
|
4833
|
+
var import_editor_interactions = require("@elementor/editor-interactions");
|
|
4868
4834
|
var InteractionsTab = () => {
|
|
4869
4835
|
const { element } = useElement();
|
|
4870
|
-
|
|
4871
|
-
const { triggerDefaultOpen } = (0, import_editor_interactions.usePopupStateContext)();
|
|
4872
|
-
const [showInteractions, setShowInteractions] = (0, import_react38.useState)(() => {
|
|
4873
|
-
return !!JSON.parse(existingInteractions || "[]").length;
|
|
4874
|
-
});
|
|
4875
|
-
return /* @__PURE__ */ React85.createElement(import_session6.SessionStorageProvider, { prefix: element.id }, showInteractions ? /* @__PURE__ */ React85.createElement(SectionsList, null, /* @__PURE__ */ React85.createElement(InteractionsProvider, null, /* @__PURE__ */ React85.createElement(InteractionsContent, null))) : /* @__PURE__ */ React85.createElement(
|
|
4876
|
-
import_editor_interactions.EmptyState,
|
|
4877
|
-
{
|
|
4878
|
-
onCreateInteraction: () => {
|
|
4879
|
-
setShowInteractions(true);
|
|
4880
|
-
triggerDefaultOpen();
|
|
4881
|
-
}
|
|
4882
|
-
}
|
|
4883
|
-
));
|
|
4836
|
+
return /* @__PURE__ */ React84.createElement(SectionsList, null, /* @__PURE__ */ React84.createElement(import_editor_interactions.InteractionsTab, { elementId: element.id }));
|
|
4884
4837
|
};
|
|
4885
|
-
function InteractionsContent() {
|
|
4886
|
-
const { interactions, setInteractions } = useInteractionsContext();
|
|
4887
|
-
const applyInteraction = (0, import_react38.useCallback)(
|
|
4888
|
-
(interaction) => {
|
|
4889
|
-
const newInteractions = [
|
|
4890
|
-
{
|
|
4891
|
-
animation: {
|
|
4892
|
-
animation_type: "full-preset",
|
|
4893
|
-
animation_id: interaction
|
|
4894
|
-
}
|
|
4895
|
-
}
|
|
4896
|
-
];
|
|
4897
|
-
setInteractions(JSON.stringify(newInteractions));
|
|
4898
|
-
},
|
|
4899
|
-
[setInteractions]
|
|
4900
|
-
);
|
|
4901
|
-
const selectedInteraction = (0, import_react38.useMemo)(() => {
|
|
4902
|
-
try {
|
|
4903
|
-
const parsed = JSON.parse(interactions || "[]");
|
|
4904
|
-
return parsed[0]?.animation?.animation_id || "";
|
|
4905
|
-
} catch {
|
|
4906
|
-
return "";
|
|
4907
|
-
}
|
|
4908
|
-
}, [interactions]);
|
|
4909
|
-
return /* @__PURE__ */ React85.createElement(SectionsList, null, /* @__PURE__ */ React85.createElement(
|
|
4910
|
-
import_editor_interactions.PredefinedInteractionsList,
|
|
4911
|
-
{
|
|
4912
|
-
selectedInteraction,
|
|
4913
|
-
onSelectInteraction: applyInteraction
|
|
4914
|
-
}
|
|
4915
|
-
));
|
|
4916
|
-
}
|
|
4917
4838
|
|
|
4918
4839
|
// src/components/settings-tab.tsx
|
|
4919
|
-
var
|
|
4840
|
+
var React88 = __toESM(require("react"));
|
|
4920
4841
|
var import_editor_controls51 = require("@elementor/editor-controls");
|
|
4921
|
-
var
|
|
4842
|
+
var import_session7 = require("@elementor/session");
|
|
4922
4843
|
var import_ui43 = require("@elementor/ui");
|
|
4923
4844
|
|
|
4924
4845
|
// src/controls-registry/control.tsx
|
|
4925
|
-
var
|
|
4846
|
+
var React85 = __toESM(require("react"));
|
|
4926
4847
|
var Control = ({ props, type }) => {
|
|
4927
4848
|
const ControlByType = controlsRegistry.get(type);
|
|
4928
4849
|
const { element } = useElement();
|
|
@@ -4931,17 +4852,17 @@ var Control = ({ props, type }) => {
|
|
|
4931
4852
|
context: { controlType: type }
|
|
4932
4853
|
});
|
|
4933
4854
|
}
|
|
4934
|
-
return /* @__PURE__ */
|
|
4855
|
+
return /* @__PURE__ */ React85.createElement(ControlByType, { ...props, context: { elementId: element.id } });
|
|
4935
4856
|
};
|
|
4936
4857
|
|
|
4937
4858
|
// src/controls-registry/control-type-container.tsx
|
|
4938
|
-
var
|
|
4859
|
+
var React86 = __toESM(require("react"));
|
|
4939
4860
|
var import_ui42 = require("@elementor/ui");
|
|
4940
4861
|
var ControlTypeContainer = ({ children, layout }) => {
|
|
4941
4862
|
if (layout === "custom") {
|
|
4942
4863
|
return children;
|
|
4943
4864
|
}
|
|
4944
|
-
return /* @__PURE__ */
|
|
4865
|
+
return /* @__PURE__ */ React86.createElement(StyledContainer, { layout }, children);
|
|
4945
4866
|
};
|
|
4946
4867
|
var StyledContainer = (0, import_ui42.styled)(import_ui42.Box, {
|
|
4947
4868
|
shouldForwardProp: (prop) => !["layout"].includes(prop)
|
|
@@ -4969,18 +4890,18 @@ var getStyleByLayout = (layout) => {
|
|
|
4969
4890
|
};
|
|
4970
4891
|
|
|
4971
4892
|
// src/controls-registry/settings-field.tsx
|
|
4972
|
-
var
|
|
4973
|
-
var
|
|
4893
|
+
var React87 = __toESM(require("react"));
|
|
4894
|
+
var import_react37 = require("react");
|
|
4974
4895
|
var import_editor_controls50 = require("@elementor/editor-controls");
|
|
4975
4896
|
var import_editor_documents2 = require("@elementor/editor-documents");
|
|
4976
|
-
var
|
|
4897
|
+
var import_editor_elements12 = require("@elementor/editor-elements");
|
|
4977
4898
|
var import_editor_props15 = require("@elementor/editor-props");
|
|
4978
4899
|
var import_editor_v1_adapters5 = require("@elementor/editor-v1-adapters");
|
|
4979
4900
|
var import_i18n59 = require("@wordpress/i18n");
|
|
4980
4901
|
|
|
4981
4902
|
// src/utils/prop-dependency-utils.ts
|
|
4982
4903
|
var import_editor_props14 = require("@elementor/editor-props");
|
|
4983
|
-
var
|
|
4904
|
+
var import_session6 = require("@elementor/session");
|
|
4984
4905
|
function extractOrderedDependencies(bind, propsSchema, elementValues, dependenciesPerTargetMapping) {
|
|
4985
4906
|
const prop = getPropType(propsSchema, elementValues, bind.split("."));
|
|
4986
4907
|
if (!prop) {
|
|
@@ -5126,17 +5047,17 @@ function savePreviousValueToStorage({ path, elementId, value }) {
|
|
|
5126
5047
|
return;
|
|
5127
5048
|
}
|
|
5128
5049
|
const key = `${prefix}:${path}`;
|
|
5129
|
-
(0,
|
|
5050
|
+
(0, import_session6.setSessionStorageItem)(key, value);
|
|
5130
5051
|
}
|
|
5131
5052
|
function retrievePreviousValueFromStorage({ path, elementId }) {
|
|
5132
5053
|
const prefix = `elementor/${elementId}`;
|
|
5133
5054
|
const key = `${prefix}:${path}`;
|
|
5134
|
-
return (0,
|
|
5055
|
+
return (0, import_session6.getSessionStorageItem)(key) ?? null;
|
|
5135
5056
|
}
|
|
5136
5057
|
function removePreviousValueFromStorage({ path, elementId }) {
|
|
5137
5058
|
const prefix = `elementor/${elementId}`;
|
|
5138
5059
|
const key = `${prefix}:${path}`;
|
|
5139
|
-
(0,
|
|
5060
|
+
(0, import_session6.removeSessionStorageItem)(key);
|
|
5140
5061
|
}
|
|
5141
5062
|
|
|
5142
5063
|
// src/controls-registry/settings-field.tsx
|
|
@@ -5146,7 +5067,7 @@ var SettingsField = ({ bind, children, propDisplayName }) => {
|
|
|
5146
5067
|
element: { id: elementId },
|
|
5147
5068
|
elementType: { propsSchema, dependenciesPerTargetMapping = {} }
|
|
5148
5069
|
} = useElement();
|
|
5149
|
-
const elementSettingValues = (0,
|
|
5070
|
+
const elementSettingValues = (0, import_editor_elements12.useElementSettings)(elementId, Object.keys(propsSchema));
|
|
5150
5071
|
const value = { [bind]: elementSettingValues?.[bind] ?? null };
|
|
5151
5072
|
const propType = createTopLevelObjectType({ schema: propsSchema });
|
|
5152
5073
|
const undoableUpdateElementProp = useUndoableUpdateElementProp({
|
|
@@ -5164,27 +5085,27 @@ var SettingsField = ({ bind, children, propDisplayName }) => {
|
|
|
5164
5085
|
undoableUpdateElementProp(settings);
|
|
5165
5086
|
};
|
|
5166
5087
|
const isDisabled = (prop) => !(0, import_editor_props15.isDependencyMet)(prop?.dependencies, elementSettingValues).isMet;
|
|
5167
|
-
return /* @__PURE__ */
|
|
5088
|
+
return /* @__PURE__ */ React87.createElement(import_editor_controls50.PropProvider, { propType, value, setValue, isDisabled }, /* @__PURE__ */ React87.createElement(import_editor_controls50.PropKeyProvider, { bind }, children));
|
|
5168
5089
|
};
|
|
5169
5090
|
function useUndoableUpdateElementProp({
|
|
5170
5091
|
elementId,
|
|
5171
5092
|
propDisplayName
|
|
5172
5093
|
}) {
|
|
5173
|
-
return (0,
|
|
5094
|
+
return (0, import_react37.useMemo)(() => {
|
|
5174
5095
|
return (0, import_editor_v1_adapters5.undoable)(
|
|
5175
5096
|
{
|
|
5176
5097
|
do: (newSettings) => {
|
|
5177
|
-
const prevPropValue = (0,
|
|
5178
|
-
(0,
|
|
5098
|
+
const prevPropValue = (0, import_editor_elements12.getElementSettings)(elementId, Object.keys(newSettings));
|
|
5099
|
+
(0, import_editor_elements12.updateElementSettings)({ id: elementId, props: newSettings, withHistory: false });
|
|
5179
5100
|
(0, import_editor_documents2.setDocumentModifiedStatus)(true);
|
|
5180
5101
|
return prevPropValue;
|
|
5181
5102
|
},
|
|
5182
5103
|
undo: ({}, prevProps) => {
|
|
5183
|
-
(0,
|
|
5104
|
+
(0, import_editor_elements12.updateElementSettings)({ id: elementId, props: prevProps, withHistory: false });
|
|
5184
5105
|
}
|
|
5185
5106
|
},
|
|
5186
5107
|
{
|
|
5187
|
-
title: (0,
|
|
5108
|
+
title: (0, import_editor_elements12.getElementLabel)(elementId),
|
|
5188
5109
|
// translators: %s is the name of the property that was edited.
|
|
5189
5110
|
subtitle: (0, import_i18n59.__)("%s edited", "elementor").replace("%s", propDisplayName),
|
|
5190
5111
|
debounce: { wait: HISTORY_DEBOUNCE_WAIT2 }
|
|
@@ -5198,13 +5119,13 @@ var SettingsTab = () => {
|
|
|
5198
5119
|
const { elementType, element } = useElement();
|
|
5199
5120
|
const settingsDefault = useDefaultPanelSettings();
|
|
5200
5121
|
const isDefaultExpanded = (sectionId) => settingsDefault.defaultSectionsExpanded.settings?.includes(sectionId);
|
|
5201
|
-
return /* @__PURE__ */
|
|
5122
|
+
return /* @__PURE__ */ React88.createElement(import_session7.SessionStorageProvider, { prefix: element.id }, /* @__PURE__ */ React88.createElement(SectionsList, null, elementType.controls.map((control, index) => {
|
|
5202
5123
|
if (isControl(control)) {
|
|
5203
|
-
return /* @__PURE__ */
|
|
5124
|
+
return /* @__PURE__ */ React88.createElement(Control2, { key: getKey(control, element), control });
|
|
5204
5125
|
}
|
|
5205
5126
|
const { type, value } = control;
|
|
5206
5127
|
if (type === "section") {
|
|
5207
|
-
return /* @__PURE__ */
|
|
5128
|
+
return /* @__PURE__ */ React88.createElement(
|
|
5208
5129
|
Section,
|
|
5209
5130
|
{
|
|
5210
5131
|
title: value.label,
|
|
@@ -5213,7 +5134,7 @@ var SettingsTab = () => {
|
|
|
5213
5134
|
},
|
|
5214
5135
|
value.items?.map((item) => {
|
|
5215
5136
|
if (isControl(item)) {
|
|
5216
|
-
return /* @__PURE__ */
|
|
5137
|
+
return /* @__PURE__ */ React88.createElement(Control2, { key: getKey(item, element), control: item });
|
|
5217
5138
|
}
|
|
5218
5139
|
return null;
|
|
5219
5140
|
})
|
|
@@ -5232,16 +5153,16 @@ var Control2 = ({ control: { value, type } }) => {
|
|
|
5232
5153
|
controlProps.label = value.label;
|
|
5233
5154
|
}
|
|
5234
5155
|
if (type === "element-control") {
|
|
5235
|
-
return /* @__PURE__ */
|
|
5156
|
+
return /* @__PURE__ */ React88.createElement(ControlLayout, { control: value, layout, controlProps });
|
|
5236
5157
|
}
|
|
5237
|
-
return /* @__PURE__ */
|
|
5158
|
+
return /* @__PURE__ */ React88.createElement(SettingsField, { bind: value.bind, propDisplayName: value.label || value.bind }, /* @__PURE__ */ React88.createElement(ControlLayout, { control: value, layout, controlProps }));
|
|
5238
5159
|
};
|
|
5239
5160
|
var ControlLayout = ({
|
|
5240
5161
|
control,
|
|
5241
5162
|
layout,
|
|
5242
5163
|
controlProps
|
|
5243
5164
|
}) => {
|
|
5244
|
-
return /* @__PURE__ */
|
|
5165
|
+
return /* @__PURE__ */ React88.createElement(React88.Fragment, null, control.meta?.topDivider && /* @__PURE__ */ React88.createElement(import_ui43.Divider, null), /* @__PURE__ */ React88.createElement(ControlTypeContainer, { layout }, control.label && layout !== "custom" ? /* @__PURE__ */ React88.createElement(import_editor_controls51.ControlFormLabel, null, control.label) : null, /* @__PURE__ */ React88.createElement(Control, { type: control.type, props: controlProps })));
|
|
5245
5166
|
};
|
|
5246
5167
|
function populateChildControlProps(props) {
|
|
5247
5168
|
if (props.childControlType) {
|
|
@@ -5274,7 +5195,7 @@ var EditingPanelTabs = () => {
|
|
|
5274
5195
|
return (
|
|
5275
5196
|
// When switching between elements, the local states should be reset. We are using key to rerender the tabs.
|
|
5276
5197
|
// Reference: https://react.dev/learn/preserving-and-resetting-state#resetting-a-form-with-a-key
|
|
5277
|
-
/* @__PURE__ */
|
|
5198
|
+
/* @__PURE__ */ React89.createElement(import_react38.Fragment, { key: element.id }, /* @__PURE__ */ React89.createElement(PanelTabContent, null))
|
|
5278
5199
|
);
|
|
5279
5200
|
};
|
|
5280
5201
|
var PanelTabContent = () => {
|
|
@@ -5283,7 +5204,7 @@ var PanelTabContent = () => {
|
|
|
5283
5204
|
const isInteractionsActive = (0, import_editor_v1_adapters6.isExperimentActive)("e_interactions");
|
|
5284
5205
|
const [currentTab, setCurrentTab] = useStateByElement("tab", defaultComponentTab);
|
|
5285
5206
|
const { getTabProps, getTabPanelProps, getTabsProps } = (0, import_ui44.useTabs)(currentTab);
|
|
5286
|
-
return /* @__PURE__ */
|
|
5207
|
+
return /* @__PURE__ */ React89.createElement(ScrollProvider, null, /* @__PURE__ */ React89.createElement(import_ui44.Stack, { direction: "column", sx: { width: "100%" } }, /* @__PURE__ */ React89.createElement(import_ui44.Stack, { sx: { ...stickyHeaderStyles, top: 0 } }, /* @__PURE__ */ React89.createElement(
|
|
5287
5208
|
import_ui44.Tabs,
|
|
5288
5209
|
{
|
|
5289
5210
|
variant: "fullWidth",
|
|
@@ -5295,23 +5216,23 @@ var PanelTabContent = () => {
|
|
|
5295
5216
|
setCurrentTab(newValue);
|
|
5296
5217
|
}
|
|
5297
5218
|
},
|
|
5298
|
-
/* @__PURE__ */
|
|
5299
|
-
/* @__PURE__ */
|
|
5300
|
-
isInteractionsActive && /* @__PURE__ */
|
|
5301
|
-
), /* @__PURE__ */
|
|
5219
|
+
/* @__PURE__ */ React89.createElement(import_ui44.Tab, { label: (0, import_i18n60.__)("General", "elementor"), ...getTabProps("settings") }),
|
|
5220
|
+
/* @__PURE__ */ React89.createElement(import_ui44.Tab, { label: (0, import_i18n60.__)("Style", "elementor"), ...getTabProps("style") }),
|
|
5221
|
+
isInteractionsActive && /* @__PURE__ */ React89.createElement(import_ui44.Tab, { label: (0, import_i18n60.__)("Interactions", "elementor"), ...getTabProps("interactions") })
|
|
5222
|
+
), /* @__PURE__ */ React89.createElement(import_ui44.Divider, null)), /* @__PURE__ */ React89.createElement(import_ui44.TabPanel, { ...getTabPanelProps("settings"), disablePadding: true }, /* @__PURE__ */ React89.createElement(SettingsTab, null)), /* @__PURE__ */ React89.createElement(import_ui44.TabPanel, { ...getTabPanelProps("style"), disablePadding: true }, /* @__PURE__ */ React89.createElement(StyleTab, null)), isInteractionsActive && /* @__PURE__ */ React89.createElement(import_ui44.TabPanel, { ...getTabPanelProps("interactions"), disablePadding: true }, /* @__PURE__ */ React89.createElement(InteractionsTab, null))));
|
|
5302
5223
|
};
|
|
5303
5224
|
|
|
5304
5225
|
// src/components/editing-panel.tsx
|
|
5305
5226
|
var { useMenuItems } = controlActionsMenu;
|
|
5306
5227
|
var EditingPanel = () => {
|
|
5307
|
-
const { element, elementType } = (0,
|
|
5228
|
+
const { element, elementType } = (0, import_editor_elements13.useSelectedElement)();
|
|
5308
5229
|
const controlReplacements = getControlReplacements();
|
|
5309
5230
|
const menuItems = useMenuItems().default;
|
|
5310
5231
|
if (!element || !elementType) {
|
|
5311
5232
|
return null;
|
|
5312
5233
|
}
|
|
5313
5234
|
const panelTitle = (0, import_i18n61.__)("Edit %s", "elementor").replace("%s", elementType.title);
|
|
5314
|
-
return /* @__PURE__ */
|
|
5235
|
+
return /* @__PURE__ */ React90.createElement(import_ui45.ErrorBoundary, { fallback: /* @__PURE__ */ React90.createElement(EditorPanelErrorFallback, null) }, /* @__PURE__ */ React90.createElement(import_session8.SessionStorageProvider, { prefix: "elementor" }, /* @__PURE__ */ React90.createElement(import_editor_ui6.ThemeProvider, null, /* @__PURE__ */ React90.createElement(import_editor_panels.Panel, null, /* @__PURE__ */ React90.createElement(import_editor_panels.PanelHeader, null, /* @__PURE__ */ React90.createElement(import_editor_panels.PanelHeaderTitle, null, panelTitle), /* @__PURE__ */ React90.createElement(import_icons24.AtomIcon, { fontSize: "small", sx: { color: "text.tertiary" } })), /* @__PURE__ */ React90.createElement(import_editor_panels.PanelBody, null, /* @__PURE__ */ React90.createElement(import_editor_controls52.ControlActionsProvider, { items: menuItems }, /* @__PURE__ */ React90.createElement(import_editor_controls52.ControlReplacementsProvider, { replacements: controlReplacements }, /* @__PURE__ */ React90.createElement(ElementProvider, { element, elementType }, /* @__PURE__ */ React90.createElement(EditingPanelTabs, null)))))))));
|
|
5315
5236
|
};
|
|
5316
5237
|
|
|
5317
5238
|
// src/panel.ts
|
|
@@ -5321,10 +5242,10 @@ var { panel, usePanelActions, usePanelStatus } = (0, import_editor_panels2.__cre
|
|
|
5321
5242
|
});
|
|
5322
5243
|
|
|
5323
5244
|
// src/sync/is-atomic-widget-selected.ts
|
|
5324
|
-
var
|
|
5245
|
+
var import_editor_elements14 = require("@elementor/editor-elements");
|
|
5325
5246
|
var isAtomicWidgetSelected = () => {
|
|
5326
|
-
const selectedElements = (0,
|
|
5327
|
-
const widgetCache = (0,
|
|
5247
|
+
const selectedElements = (0, import_editor_elements14.getSelectedElements)();
|
|
5248
|
+
const widgetCache = (0, import_editor_elements14.getWidgetsCache)();
|
|
5328
5249
|
if (selectedElements.length !== 1) {
|
|
5329
5250
|
return false;
|
|
5330
5251
|
}
|
|
@@ -5334,7 +5255,7 @@ var isAtomicWidgetSelected = () => {
|
|
|
5334
5255
|
// src/hooks/use-open-editor-panel.ts
|
|
5335
5256
|
var useOpenEditorPanel = () => {
|
|
5336
5257
|
const { open } = usePanelActions();
|
|
5337
|
-
(0,
|
|
5258
|
+
(0, import_react39.useEffect)(() => {
|
|
5338
5259
|
return (0, import_editor_v1_adapters7.__privateListenTo)((0, import_editor_v1_adapters7.commandStartEvent)("panel/editor/open"), () => {
|
|
5339
5260
|
if (isAtomicWidgetSelected()) {
|
|
5340
5261
|
open();
|
|
@@ -5350,18 +5271,18 @@ var EditingPanelHooks = () => {
|
|
|
5350
5271
|
};
|
|
5351
5272
|
|
|
5352
5273
|
// src/controls-registry/element-controls/tabs-control/tabs-control.tsx
|
|
5353
|
-
var
|
|
5274
|
+
var React91 = __toESM(require("react"));
|
|
5354
5275
|
var import_editor_controls53 = require("@elementor/editor-controls");
|
|
5355
|
-
var
|
|
5276
|
+
var import_editor_elements17 = require("@elementor/editor-elements");
|
|
5356
5277
|
var import_editor_props17 = require("@elementor/editor-props");
|
|
5357
5278
|
var import_icons25 = require("@elementor/icons");
|
|
5358
5279
|
var import_ui46 = require("@elementor/ui");
|
|
5359
5280
|
var import_i18n63 = require("@wordpress/i18n");
|
|
5360
5281
|
|
|
5361
5282
|
// src/controls-registry/element-controls/get-element-by-type.ts
|
|
5362
|
-
var
|
|
5283
|
+
var import_editor_elements15 = require("@elementor/editor-elements");
|
|
5363
5284
|
var getElementByType = (elementId, type) => {
|
|
5364
|
-
const currentElement = (0,
|
|
5285
|
+
const currentElement = (0, import_editor_elements15.getContainer)(elementId);
|
|
5365
5286
|
if (!currentElement) {
|
|
5366
5287
|
throw new Error(`Current element not found, elementId: ${elementId}`);
|
|
5367
5288
|
}
|
|
@@ -5376,7 +5297,7 @@ var getElementByType = (elementId, type) => {
|
|
|
5376
5297
|
};
|
|
5377
5298
|
|
|
5378
5299
|
// src/controls-registry/element-controls/tabs-control/actions.ts
|
|
5379
|
-
var
|
|
5300
|
+
var import_editor_elements16 = require("@elementor/editor-elements");
|
|
5380
5301
|
var import_editor_props16 = require("@elementor/editor-props");
|
|
5381
5302
|
var import_i18n62 = require("@wordpress/i18n");
|
|
5382
5303
|
var TAB_ELEMENT_TYPE = "e-tab";
|
|
@@ -5384,25 +5305,25 @@ var TAB_CONTENT_ELEMENT_TYPE = "e-tab-content";
|
|
|
5384
5305
|
var duplicateItem = ({ items: items3 }) => {
|
|
5385
5306
|
items3.forEach(({ item }) => {
|
|
5386
5307
|
const tabId = item.id;
|
|
5387
|
-
const { value: tabContentId } = (0,
|
|
5308
|
+
const { value: tabContentId } = (0, import_editor_elements16.getElementSetting)(tabId, "tab-content-id") ?? {};
|
|
5388
5309
|
if (!tabContentId) {
|
|
5389
5310
|
throw new Error("Original content ID is required for duplication");
|
|
5390
5311
|
}
|
|
5391
|
-
(0,
|
|
5312
|
+
(0, import_editor_elements16.duplicateElements)({
|
|
5392
5313
|
elementIds: [tabId, tabContentId],
|
|
5393
5314
|
title: (0, import_i18n62.__)("Duplicate Tab", "elementor"),
|
|
5394
5315
|
onCreate: (duplicatedElements) => {
|
|
5395
5316
|
const tab = duplicatedElements.find((element) => element.originalElementId === tabId);
|
|
5396
5317
|
const tabContent = duplicatedElements.find((element) => element.originalElementId === tabContentId);
|
|
5397
5318
|
if (tabContent && tab) {
|
|
5398
|
-
(0,
|
|
5319
|
+
(0, import_editor_elements16.updateElementSettings)({
|
|
5399
5320
|
withHistory: false,
|
|
5400
5321
|
id: tab.id,
|
|
5401
5322
|
props: {
|
|
5402
5323
|
"tab-content-id": import_editor_props16.stringPropTypeUtil.create(tabContent.id)
|
|
5403
5324
|
}
|
|
5404
5325
|
});
|
|
5405
|
-
(0,
|
|
5326
|
+
(0, import_editor_elements16.updateElementSettings)({
|
|
5406
5327
|
withHistory: false,
|
|
5407
5328
|
id: tabContent.id,
|
|
5408
5329
|
props: {
|
|
@@ -5420,11 +5341,11 @@ var moveItem = ({
|
|
|
5420
5341
|
tabContentAreaId,
|
|
5421
5342
|
movedElementId
|
|
5422
5343
|
}) => {
|
|
5423
|
-
const { value: tabContentId } = (0,
|
|
5344
|
+
const { value: tabContentId } = (0, import_editor_elements16.getElementSetting)(movedElementId, "tab-content-id") ?? {};
|
|
5424
5345
|
if (!tabContentId) {
|
|
5425
5346
|
throw new Error("Required tab elements not found for reordering");
|
|
5426
5347
|
}
|
|
5427
|
-
(0,
|
|
5348
|
+
(0, import_editor_elements16.moveElements)({
|
|
5428
5349
|
title: (0, import_i18n62.__)("Reorder Tabs", "elementor"),
|
|
5429
5350
|
moves: [
|
|
5430
5351
|
{
|
|
@@ -5441,11 +5362,11 @@ var moveItem = ({
|
|
|
5441
5362
|
});
|
|
5442
5363
|
};
|
|
5443
5364
|
var removeItem = ({ items: items3 }) => {
|
|
5444
|
-
(0,
|
|
5365
|
+
(0, import_editor_elements16.removeElements)({
|
|
5445
5366
|
title: (0, import_i18n62.__)("Tabs", "elementor"),
|
|
5446
5367
|
elementIds: items3.flatMap(({ item }) => {
|
|
5447
5368
|
const tabId = item.id;
|
|
5448
|
-
const { value: tabContentId } = (0,
|
|
5369
|
+
const { value: tabContentId } = (0, import_editor_elements16.getElementSetting)(tabId, "tab-content-id") ?? {};
|
|
5449
5370
|
if (!tabContentId) {
|
|
5450
5371
|
throw new Error("Content ID is required");
|
|
5451
5372
|
}
|
|
@@ -5459,9 +5380,9 @@ var addItem = ({
|
|
|
5459
5380
|
items: items3
|
|
5460
5381
|
}) => {
|
|
5461
5382
|
items3.forEach(({ item, index }) => {
|
|
5462
|
-
const newTabContentId = (0,
|
|
5463
|
-
const newTabId = (0,
|
|
5464
|
-
(0,
|
|
5383
|
+
const newTabContentId = (0, import_editor_elements16.generateElementId)();
|
|
5384
|
+
const newTabId = (0, import_editor_elements16.generateElementId)();
|
|
5385
|
+
(0, import_editor_elements16.createElements)({
|
|
5465
5386
|
title: (0, import_i18n62.__)("Tabs", "elementor"),
|
|
5466
5387
|
elements: [
|
|
5467
5388
|
{
|
|
@@ -5497,14 +5418,14 @@ var TAB_MENU_ELEMENT_TYPE = "e-tabs-menu";
|
|
|
5497
5418
|
var TAB_CONTENT_AREA_ELEMENT_TYPE = "e-tabs-content-area";
|
|
5498
5419
|
var TabsControl = ({ label }) => {
|
|
5499
5420
|
const { element } = useElement();
|
|
5500
|
-
const { [TAB_ELEMENT_TYPE]: tabLinks } = (0,
|
|
5421
|
+
const { [TAB_ELEMENT_TYPE]: tabLinks } = (0, import_editor_elements17.useElementChildren)(element.id, [
|
|
5501
5422
|
TAB_ELEMENT_TYPE,
|
|
5502
5423
|
TAB_CONTENT_ELEMENT_TYPE
|
|
5503
5424
|
]);
|
|
5504
5425
|
const tabList = getElementByType(element.id, TAB_MENU_ELEMENT_TYPE);
|
|
5505
5426
|
const tabContentArea = getElementByType(element.id, TAB_CONTENT_AREA_ELEMENT_TYPE);
|
|
5506
5427
|
const repeaterValues = tabLinks.map((tabLink) => {
|
|
5507
|
-
const { title: titleSetting } = (0,
|
|
5428
|
+
const { title: titleSetting } = (0, import_editor_elements17.getElementEditorSettings)(tabLink.id) ?? {};
|
|
5508
5429
|
return {
|
|
5509
5430
|
id: tabLink.id,
|
|
5510
5431
|
title: titleSetting
|
|
@@ -5533,7 +5454,7 @@ var TabsControl = ({ label }) => {
|
|
|
5533
5454
|
});
|
|
5534
5455
|
}
|
|
5535
5456
|
};
|
|
5536
|
-
return /* @__PURE__ */
|
|
5457
|
+
return /* @__PURE__ */ React91.createElement(
|
|
5537
5458
|
import_editor_controls53.Repeater,
|
|
5538
5459
|
{
|
|
5539
5460
|
addToBottom: true,
|
|
@@ -5553,9 +5474,9 @@ var TabsControl = ({ label }) => {
|
|
|
5553
5474
|
};
|
|
5554
5475
|
var ItemLabel = ({ value }) => {
|
|
5555
5476
|
const id = value.id ?? "";
|
|
5556
|
-
const editorSettings = (0,
|
|
5477
|
+
const editorSettings = (0, import_editor_elements17.useElementEditorSettings)(id);
|
|
5557
5478
|
const elementTitle = editorSettings?.title;
|
|
5558
|
-
return /* @__PURE__ */
|
|
5479
|
+
return /* @__PURE__ */ React91.createElement(import_ui46.Stack, { sx: { minHeight: 20 }, direction: "row", alignItems: "center", gap: 1.5 }, /* @__PURE__ */ React91.createElement("span", null, elementTitle), /* @__PURE__ */ React91.createElement(SettingsField, { bind: "default-active-tab", propDisplayName: (0, import_i18n63.__)("Tabs", "elementor") }, /* @__PURE__ */ React91.createElement(ItemDefaultTab, { value })));
|
|
5559
5480
|
};
|
|
5560
5481
|
var ItemDefaultTab = ({ value }) => {
|
|
5561
5482
|
const id = value.id ?? "";
|
|
@@ -5564,18 +5485,18 @@ var ItemDefaultTab = ({ value }) => {
|
|
|
5564
5485
|
if (!isDefault) {
|
|
5565
5486
|
return null;
|
|
5566
5487
|
}
|
|
5567
|
-
return /* @__PURE__ */
|
|
5488
|
+
return /* @__PURE__ */ React91.createElement(import_ui46.Chip, { size: "tiny", shape: "rounded", label: (0, import_i18n63.__)("Default", "elementor") });
|
|
5568
5489
|
};
|
|
5569
5490
|
var ItemContent = ({ value }) => {
|
|
5570
5491
|
if (!value.id) {
|
|
5571
5492
|
return null;
|
|
5572
5493
|
}
|
|
5573
|
-
return /* @__PURE__ */
|
|
5494
|
+
return /* @__PURE__ */ React91.createElement(import_ui46.Stack, { p: 2, gap: 1.5 }, /* @__PURE__ */ React91.createElement(TabLabelControl, { elementId: value.id }), /* @__PURE__ */ React91.createElement(SettingsField, { bind: "default-active-tab", propDisplayName: (0, import_i18n63.__)("Tabs", "elementor") }, /* @__PURE__ */ React91.createElement(DefaultTabControl, { elementId: value.id })));
|
|
5574
5495
|
};
|
|
5575
5496
|
var DefaultTabControl = ({ elementId }) => {
|
|
5576
5497
|
const { value, setValue } = (0, import_editor_controls53.useBoundProp)(import_editor_props17.stringPropTypeUtil);
|
|
5577
5498
|
const isDefault = value === elementId;
|
|
5578
|
-
return /* @__PURE__ */
|
|
5499
|
+
return /* @__PURE__ */ React91.createElement(import_ui46.Stack, { direction: "row", alignItems: "center", justifyContent: "space-between", gap: 2 }, /* @__PURE__ */ React91.createElement(import_editor_controls53.ControlFormLabel, null, (0, import_i18n63.__)("Set as default tab", "elementor")), /* @__PURE__ */ React91.createElement(ConditionalTooltip, { showTooltip: isDefault, placement: "right" }, /* @__PURE__ */ React91.createElement(
|
|
5579
5500
|
import_ui46.Switch,
|
|
5580
5501
|
{
|
|
5581
5502
|
size: "small",
|
|
@@ -5591,15 +5512,15 @@ var DefaultTabControl = ({ elementId }) => {
|
|
|
5591
5512
|
)));
|
|
5592
5513
|
};
|
|
5593
5514
|
var TabLabelControl = ({ elementId }) => {
|
|
5594
|
-
const editorSettings = (0,
|
|
5515
|
+
const editorSettings = (0, import_editor_elements17.useElementEditorSettings)(elementId);
|
|
5595
5516
|
const label = editorSettings?.title ?? "";
|
|
5596
|
-
return /* @__PURE__ */
|
|
5517
|
+
return /* @__PURE__ */ React91.createElement(import_ui46.Stack, { gap: 1 }, /* @__PURE__ */ React91.createElement(import_editor_controls53.ControlFormLabel, null, (0, import_i18n63.__)("Tab name", "elementor")), /* @__PURE__ */ React91.createElement(
|
|
5597
5518
|
import_ui46.TextField,
|
|
5598
5519
|
{
|
|
5599
5520
|
size: "tiny",
|
|
5600
5521
|
value: label,
|
|
5601
5522
|
onChange: ({ target }) => {
|
|
5602
|
-
(0,
|
|
5523
|
+
(0, import_editor_elements17.updateElementEditorSettings)({
|
|
5603
5524
|
elementId,
|
|
5604
5525
|
settings: { title: target.value }
|
|
5605
5526
|
});
|
|
@@ -5614,22 +5535,22 @@ var ConditionalTooltip = ({
|
|
|
5614
5535
|
if (!showTooltip) {
|
|
5615
5536
|
return children;
|
|
5616
5537
|
}
|
|
5617
|
-
return /* @__PURE__ */
|
|
5538
|
+
return /* @__PURE__ */ React91.createElement(
|
|
5618
5539
|
import_ui46.Infotip,
|
|
5619
5540
|
{
|
|
5620
5541
|
arrow: false,
|
|
5621
|
-
content: /* @__PURE__ */
|
|
5542
|
+
content: /* @__PURE__ */ React91.createElement(
|
|
5622
5543
|
import_ui46.Alert,
|
|
5623
5544
|
{
|
|
5624
5545
|
color: "secondary",
|
|
5625
|
-
icon: /* @__PURE__ */
|
|
5546
|
+
icon: /* @__PURE__ */ React91.createElement(import_icons25.InfoCircleFilledIcon, { fontSize: "tiny" }),
|
|
5626
5547
|
size: "small",
|
|
5627
5548
|
sx: { width: 288 }
|
|
5628
5549
|
},
|
|
5629
|
-
/* @__PURE__ */
|
|
5550
|
+
/* @__PURE__ */ React91.createElement(import_ui46.Typography, { variant: "body2" }, (0, import_i18n63.__)("To change the default tab, simply set another tab as default.", "elementor"))
|
|
5630
5551
|
)
|
|
5631
5552
|
},
|
|
5632
|
-
/* @__PURE__ */
|
|
5553
|
+
/* @__PURE__ */ React91.createElement("span", null, children)
|
|
5633
5554
|
);
|
|
5634
5555
|
};
|
|
5635
5556
|
|
|
@@ -5650,16 +5571,16 @@ var import_editor_canvas5 = require("@elementor/editor-canvas");
|
|
|
5650
5571
|
var import_editor_controls60 = require("@elementor/editor-controls");
|
|
5651
5572
|
|
|
5652
5573
|
// src/dynamics/components/background-control-dynamic-tag.tsx
|
|
5653
|
-
var
|
|
5574
|
+
var React92 = __toESM(require("react"));
|
|
5654
5575
|
var import_editor_controls55 = require("@elementor/editor-controls");
|
|
5655
5576
|
var import_editor_props19 = require("@elementor/editor-props");
|
|
5656
5577
|
var import_icons26 = require("@elementor/icons");
|
|
5657
5578
|
|
|
5658
5579
|
// src/dynamics/hooks/use-dynamic-tag.ts
|
|
5659
|
-
var
|
|
5580
|
+
var import_react41 = require("react");
|
|
5660
5581
|
|
|
5661
5582
|
// src/dynamics/hooks/use-prop-dynamic-tags.ts
|
|
5662
|
-
var
|
|
5583
|
+
var import_react40 = require("react");
|
|
5663
5584
|
var import_editor_controls54 = require("@elementor/editor-controls");
|
|
5664
5585
|
|
|
5665
5586
|
// src/dynamics/sync/get-elementor-config.ts
|
|
@@ -5711,7 +5632,7 @@ var usePropDynamicTags = () => {
|
|
|
5711
5632
|
const propDynamicType = getDynamicPropType(propType);
|
|
5712
5633
|
categories = propDynamicType?.settings.categories || [];
|
|
5713
5634
|
}
|
|
5714
|
-
return (0,
|
|
5635
|
+
return (0, import_react40.useMemo)(() => getDynamicTagsByCategories(categories), [categories.join()]);
|
|
5715
5636
|
};
|
|
5716
5637
|
var getDynamicTagsByCategories = (categories) => {
|
|
5717
5638
|
const { tags, groups } = getAtomicDynamicTags() || {};
|
|
@@ -5741,28 +5662,28 @@ var getDynamicTagsByCategories = (categories) => {
|
|
|
5741
5662
|
// src/dynamics/hooks/use-dynamic-tag.ts
|
|
5742
5663
|
var useDynamicTag = (tagName) => {
|
|
5743
5664
|
const dynamicTags = usePropDynamicTags();
|
|
5744
|
-
return (0,
|
|
5665
|
+
return (0, import_react41.useMemo)(() => dynamicTags.find((tag) => tag.name === tagName) ?? null, [dynamicTags, tagName]);
|
|
5745
5666
|
};
|
|
5746
5667
|
|
|
5747
5668
|
// src/dynamics/components/background-control-dynamic-tag.tsx
|
|
5748
|
-
var BackgroundControlDynamicTagIcon = () => /* @__PURE__ */
|
|
5669
|
+
var BackgroundControlDynamicTagIcon = () => /* @__PURE__ */ React92.createElement(import_icons26.DatabaseIcon, { fontSize: "tiny" });
|
|
5749
5670
|
var BackgroundControlDynamicTagLabel = ({ value }) => {
|
|
5750
5671
|
const context = (0, import_editor_controls55.useBoundProp)(import_editor_props19.backgroundImageOverlayPropTypeUtil);
|
|
5751
|
-
return /* @__PURE__ */
|
|
5672
|
+
return /* @__PURE__ */ React92.createElement(import_editor_controls55.PropProvider, { ...context, value: value.value }, /* @__PURE__ */ React92.createElement(import_editor_controls55.PropKeyProvider, { bind: "image" }, /* @__PURE__ */ React92.createElement(Wrapper, { rawValue: value.value })));
|
|
5752
5673
|
};
|
|
5753
5674
|
var Wrapper = ({ rawValue }) => {
|
|
5754
5675
|
const { propType } = (0, import_editor_controls55.useBoundProp)();
|
|
5755
5676
|
const imageOverlayPropType = propType.prop_types["background-image-overlay"];
|
|
5756
|
-
return /* @__PURE__ */
|
|
5677
|
+
return /* @__PURE__ */ React92.createElement(import_editor_controls55.PropProvider, { propType: imageOverlayPropType.shape.image, value: rawValue, setValue: () => void 0 }, /* @__PURE__ */ React92.createElement(import_editor_controls55.PropKeyProvider, { bind: "src" }, /* @__PURE__ */ React92.createElement(Content, { rawValue: rawValue.image })));
|
|
5757
5678
|
};
|
|
5758
5679
|
var Content = ({ rawValue }) => {
|
|
5759
5680
|
const src = rawValue.value.src;
|
|
5760
5681
|
const dynamicTag = useDynamicTag(src.value.name || "");
|
|
5761
|
-
return /* @__PURE__ */
|
|
5682
|
+
return /* @__PURE__ */ React92.createElement(React92.Fragment, null, dynamicTag?.label);
|
|
5762
5683
|
};
|
|
5763
5684
|
|
|
5764
5685
|
// src/dynamics/components/dynamic-selection-control.tsx
|
|
5765
|
-
var
|
|
5686
|
+
var React96 = __toESM(require("react"));
|
|
5766
5687
|
var import_editor_controls58 = require("@elementor/editor-controls");
|
|
5767
5688
|
var import_editor_ui8 = require("@elementor/editor-ui");
|
|
5768
5689
|
var import_icons28 = require("@elementor/icons");
|
|
@@ -5770,19 +5691,19 @@ var import_ui48 = require("@elementor/ui");
|
|
|
5770
5691
|
var import_i18n65 = require("@wordpress/i18n");
|
|
5771
5692
|
|
|
5772
5693
|
// src/hooks/use-persist-dynamic-value.ts
|
|
5773
|
-
var
|
|
5694
|
+
var import_session9 = require("@elementor/session");
|
|
5774
5695
|
var usePersistDynamicValue = (propKey) => {
|
|
5775
5696
|
const { element } = useElement();
|
|
5776
5697
|
const prefixedKey = `dynamic/non-dynamic-values-history/${element.id}/${propKey}`;
|
|
5777
|
-
return (0,
|
|
5698
|
+
return (0, import_session9.useSessionStorage)(prefixedKey);
|
|
5778
5699
|
};
|
|
5779
5700
|
|
|
5780
5701
|
// src/dynamics/dynamic-control.tsx
|
|
5781
|
-
var
|
|
5702
|
+
var React94 = __toESM(require("react"));
|
|
5782
5703
|
var import_editor_controls56 = require("@elementor/editor-controls");
|
|
5783
5704
|
|
|
5784
5705
|
// src/dynamics/components/dynamic-conditional-control.tsx
|
|
5785
|
-
var
|
|
5706
|
+
var React93 = __toESM(require("react"));
|
|
5786
5707
|
var import_editor_props20 = require("@elementor/editor-props");
|
|
5787
5708
|
var DynamicConditionalControl = ({
|
|
5788
5709
|
children,
|
|
@@ -5790,7 +5711,7 @@ var DynamicConditionalControl = ({
|
|
|
5790
5711
|
propsSchema,
|
|
5791
5712
|
dynamicSettings
|
|
5792
5713
|
}) => {
|
|
5793
|
-
const defaults =
|
|
5714
|
+
const defaults = React93.useMemo(() => {
|
|
5794
5715
|
if (!propsSchema) {
|
|
5795
5716
|
return {};
|
|
5796
5717
|
}
|
|
@@ -5800,7 +5721,7 @@ var DynamicConditionalControl = ({
|
|
|
5800
5721
|
return result;
|
|
5801
5722
|
}, {});
|
|
5802
5723
|
}, [propsSchema]);
|
|
5803
|
-
const convertedSettings =
|
|
5724
|
+
const convertedSettings = React93.useMemo(() => {
|
|
5804
5725
|
if (!dynamicSettings) {
|
|
5805
5726
|
return {};
|
|
5806
5727
|
}
|
|
@@ -5819,14 +5740,14 @@ var DynamicConditionalControl = ({
|
|
|
5819
5740
|
{}
|
|
5820
5741
|
);
|
|
5821
5742
|
}, [dynamicSettings]);
|
|
5822
|
-
const effectiveSettings =
|
|
5743
|
+
const effectiveSettings = React93.useMemo(() => {
|
|
5823
5744
|
return { ...defaults, ...convertedSettings };
|
|
5824
5745
|
}, [defaults, convertedSettings]);
|
|
5825
5746
|
if (!propType?.dependencies?.terms.length) {
|
|
5826
|
-
return /* @__PURE__ */
|
|
5747
|
+
return /* @__PURE__ */ React93.createElement(React93.Fragment, null, children);
|
|
5827
5748
|
}
|
|
5828
5749
|
const isHidden = !(0, import_editor_props20.isDependencyMet)(propType?.dependencies, effectiveSettings).isMet;
|
|
5829
|
-
return isHidden ? null : /* @__PURE__ */
|
|
5750
|
+
return isHidden ? null : /* @__PURE__ */ React93.createElement(React93.Fragment, null, children);
|
|
5830
5751
|
};
|
|
5831
5752
|
|
|
5832
5753
|
// src/dynamics/dynamic-control.tsx
|
|
@@ -5850,7 +5771,7 @@ var DynamicControl = ({ bind, children }) => {
|
|
|
5850
5771
|
});
|
|
5851
5772
|
};
|
|
5852
5773
|
const propType = createTopLevelObjectType({ schema: dynamicTag.props_schema });
|
|
5853
|
-
return /* @__PURE__ */
|
|
5774
|
+
return /* @__PURE__ */ React94.createElement(import_editor_controls56.PropProvider, { propType, setValue: setDynamicValue, value: { [bind]: dynamicValue } }, /* @__PURE__ */ React94.createElement(import_editor_controls56.PropKeyProvider, { bind }, /* @__PURE__ */ React94.createElement(
|
|
5854
5775
|
DynamicConditionalControl,
|
|
5855
5776
|
{
|
|
5856
5777
|
propType: dynamicPropType,
|
|
@@ -5862,8 +5783,8 @@ var DynamicControl = ({ bind, children }) => {
|
|
|
5862
5783
|
};
|
|
5863
5784
|
|
|
5864
5785
|
// src/dynamics/components/dynamic-selection.tsx
|
|
5865
|
-
var
|
|
5866
|
-
var
|
|
5786
|
+
var import_react42 = require("react");
|
|
5787
|
+
var React95 = __toESM(require("react"));
|
|
5867
5788
|
var import_editor_controls57 = require("@elementor/editor-controls");
|
|
5868
5789
|
var import_editor_ui7 = require("@elementor/editor-ui");
|
|
5869
5790
|
var import_icons27 = require("@elementor/icons");
|
|
@@ -5871,7 +5792,7 @@ var import_ui47 = require("@elementor/ui");
|
|
|
5871
5792
|
var import_i18n64 = require("@wordpress/i18n");
|
|
5872
5793
|
var SIZE6 = "tiny";
|
|
5873
5794
|
var DynamicSelection = ({ close: closePopover }) => {
|
|
5874
|
-
const [searchValue, setSearchValue] = (0,
|
|
5795
|
+
const [searchValue, setSearchValue] = (0, import_react42.useState)("");
|
|
5875
5796
|
const { groups: dynamicGroups } = getAtomicDynamicTags() || {};
|
|
5876
5797
|
const theme = (0, import_ui47.useTheme)();
|
|
5877
5798
|
const { value: anyValue } = (0, import_editor_controls57.useBoundProp)();
|
|
@@ -5903,21 +5824,21 @@ var DynamicSelection = ({ close: closePopover }) => {
|
|
|
5903
5824
|
label: item.label
|
|
5904
5825
|
}))
|
|
5905
5826
|
]);
|
|
5906
|
-
return /* @__PURE__ */
|
|
5827
|
+
return /* @__PURE__ */ React95.createElement(PopoverBody, { "aria-label": (0, import_i18n64.__)("Dynamic tags", "elementor") }, /* @__PURE__ */ React95.createElement(
|
|
5907
5828
|
import_editor_ui7.PopoverHeader,
|
|
5908
5829
|
{
|
|
5909
5830
|
title: (0, import_i18n64.__)("Dynamic tags", "elementor"),
|
|
5910
5831
|
onClose: closePopover,
|
|
5911
|
-
icon: /* @__PURE__ */
|
|
5832
|
+
icon: /* @__PURE__ */ React95.createElement(import_icons27.DatabaseIcon, { fontSize: SIZE6 })
|
|
5912
5833
|
}
|
|
5913
|
-
), hasNoDynamicTags ? /* @__PURE__ */
|
|
5834
|
+
), hasNoDynamicTags ? /* @__PURE__ */ React95.createElement(NoDynamicTags, null) : /* @__PURE__ */ React95.createElement(import_react42.Fragment, null, /* @__PURE__ */ React95.createElement(
|
|
5914
5835
|
import_editor_ui7.SearchField,
|
|
5915
5836
|
{
|
|
5916
5837
|
value: searchValue,
|
|
5917
5838
|
onSearch: handleSearch,
|
|
5918
5839
|
placeholder: (0, import_i18n64.__)("Search dynamic tags\u2026", "elementor")
|
|
5919
5840
|
}
|
|
5920
|
-
), /* @__PURE__ */
|
|
5841
|
+
), /* @__PURE__ */ React95.createElement(import_ui47.Divider, null), /* @__PURE__ */ React95.createElement(
|
|
5921
5842
|
import_editor_ui7.PopoverMenuList,
|
|
5922
5843
|
{
|
|
5923
5844
|
items: virtualizedItems,
|
|
@@ -5925,11 +5846,11 @@ var DynamicSelection = ({ close: closePopover }) => {
|
|
|
5925
5846
|
onClose: closePopover,
|
|
5926
5847
|
selectedValue: dynamicValue?.name,
|
|
5927
5848
|
itemStyle: (item) => item.type === "item" ? { paddingInlineStart: theme.spacing(3.5) } : {},
|
|
5928
|
-
noResultsComponent: /* @__PURE__ */
|
|
5849
|
+
noResultsComponent: /* @__PURE__ */ React95.createElement(NoResults, { searchValue, onClear: () => setSearchValue("") })
|
|
5929
5850
|
}
|
|
5930
5851
|
)));
|
|
5931
5852
|
};
|
|
5932
|
-
var NoResults = ({ searchValue, onClear }) => /* @__PURE__ */
|
|
5853
|
+
var NoResults = ({ searchValue, onClear }) => /* @__PURE__ */ React95.createElement(
|
|
5933
5854
|
import_ui47.Stack,
|
|
5934
5855
|
{
|
|
5935
5856
|
gap: 1,
|
|
@@ -5940,11 +5861,11 @@ var NoResults = ({ searchValue, onClear }) => /* @__PURE__ */ React96.createElem
|
|
|
5940
5861
|
color: "text.secondary",
|
|
5941
5862
|
sx: { pb: 3.5 }
|
|
5942
5863
|
},
|
|
5943
|
-
/* @__PURE__ */
|
|
5944
|
-
/* @__PURE__ */
|
|
5945
|
-
/* @__PURE__ */
|
|
5864
|
+
/* @__PURE__ */ React95.createElement(import_icons27.DatabaseIcon, { fontSize: "large" }),
|
|
5865
|
+
/* @__PURE__ */ React95.createElement(import_ui47.Typography, { align: "center", variant: "subtitle2" }, (0, import_i18n64.__)("Sorry, nothing matched", "elementor"), /* @__PURE__ */ React95.createElement("br", null), "\u201C", searchValue, "\u201D."),
|
|
5866
|
+
/* @__PURE__ */ React95.createElement(import_ui47.Typography, { align: "center", variant: "caption", sx: { display: "flex", flexDirection: "column" } }, (0, import_i18n64.__)("Try something else.", "elementor"), /* @__PURE__ */ React95.createElement(import_ui47.Link, { color: "text.secondary", variant: "caption", component: "button", onClick: onClear }, (0, import_i18n64.__)("Clear & try again", "elementor")))
|
|
5946
5867
|
);
|
|
5947
|
-
var NoDynamicTags = () => /* @__PURE__ */
|
|
5868
|
+
var NoDynamicTags = () => /* @__PURE__ */ React95.createElement(React95.Fragment, null, /* @__PURE__ */ React95.createElement(import_ui47.Divider, null), /* @__PURE__ */ React95.createElement(
|
|
5948
5869
|
import_ui47.Stack,
|
|
5949
5870
|
{
|
|
5950
5871
|
gap: 1,
|
|
@@ -5955,9 +5876,9 @@ var NoDynamicTags = () => /* @__PURE__ */ React96.createElement(React96.Fragment
|
|
|
5955
5876
|
color: "text.secondary",
|
|
5956
5877
|
sx: { pb: 3.5 }
|
|
5957
5878
|
},
|
|
5958
|
-
/* @__PURE__ */
|
|
5959
|
-
/* @__PURE__ */
|
|
5960
|
-
/* @__PURE__ */
|
|
5879
|
+
/* @__PURE__ */ React95.createElement(import_icons27.DatabaseIcon, { fontSize: "large" }),
|
|
5880
|
+
/* @__PURE__ */ React95.createElement(import_ui47.Typography, { align: "center", variant: "subtitle2" }, (0, import_i18n64.__)("Streamline your workflow with dynamic tags", "elementor")),
|
|
5881
|
+
/* @__PURE__ */ React95.createElement(import_ui47.Typography, { align: "center", variant: "caption" }, (0, import_i18n64.__)("You'll need Elementor Pro to use this feature.", "elementor"))
|
|
5961
5882
|
));
|
|
5962
5883
|
var useFilteredOptions = (searchValue) => {
|
|
5963
5884
|
const dynamicTags = usePropDynamicTags();
|
|
@@ -5991,25 +5912,25 @@ var DynamicSelectionControl = () => {
|
|
|
5991
5912
|
if (!dynamicTag) {
|
|
5992
5913
|
throw new Error(`Dynamic tag ${tagName} not found`);
|
|
5993
5914
|
}
|
|
5994
|
-
return /* @__PURE__ */
|
|
5915
|
+
return /* @__PURE__ */ React96.createElement(import_ui48.Box, null, /* @__PURE__ */ React96.createElement(
|
|
5995
5916
|
import_ui48.UnstableTag,
|
|
5996
5917
|
{
|
|
5997
5918
|
fullWidth: true,
|
|
5998
5919
|
showActionsOnHover: true,
|
|
5999
5920
|
label: dynamicTag.label,
|
|
6000
|
-
startIcon: /* @__PURE__ */
|
|
5921
|
+
startIcon: /* @__PURE__ */ React96.createElement(import_icons28.DatabaseIcon, { fontSize: SIZE7 }),
|
|
6001
5922
|
...(0, import_ui48.bindTrigger)(selectionPopoverState),
|
|
6002
|
-
actions: /* @__PURE__ */
|
|
5923
|
+
actions: /* @__PURE__ */ React96.createElement(React96.Fragment, null, /* @__PURE__ */ React96.createElement(DynamicSettingsPopover, { dynamicTag }), /* @__PURE__ */ React96.createElement(
|
|
6003
5924
|
import_ui48.IconButton,
|
|
6004
5925
|
{
|
|
6005
5926
|
size: SIZE7,
|
|
6006
5927
|
onClick: removeDynamicTag,
|
|
6007
5928
|
"aria-label": (0, import_i18n65.__)("Remove dynamic value", "elementor")
|
|
6008
5929
|
},
|
|
6009
|
-
/* @__PURE__ */
|
|
5930
|
+
/* @__PURE__ */ React96.createElement(import_icons28.XIcon, { fontSize: SIZE7 })
|
|
6010
5931
|
))
|
|
6011
5932
|
}
|
|
6012
|
-
), /* @__PURE__ */
|
|
5933
|
+
), /* @__PURE__ */ React96.createElement(
|
|
6013
5934
|
import_ui48.Popover,
|
|
6014
5935
|
{
|
|
6015
5936
|
disablePortal: true,
|
|
@@ -6021,7 +5942,7 @@ var DynamicSelectionControl = () => {
|
|
|
6021
5942
|
},
|
|
6022
5943
|
...(0, import_ui48.bindPopover)(selectionPopoverState)
|
|
6023
5944
|
},
|
|
6024
|
-
/* @__PURE__ */
|
|
5945
|
+
/* @__PURE__ */ React96.createElement(PopoverBody, { "aria-label": (0, import_i18n65.__)("Dynamic tags", "elementor") }, /* @__PURE__ */ React96.createElement(DynamicSelection, { close: selectionPopoverState.close }))
|
|
6025
5946
|
));
|
|
6026
5947
|
};
|
|
6027
5948
|
var DynamicSettingsPopover = ({ dynamicTag }) => {
|
|
@@ -6030,15 +5951,15 @@ var DynamicSettingsPopover = ({ dynamicTag }) => {
|
|
|
6030
5951
|
if (!hasDynamicSettings) {
|
|
6031
5952
|
return null;
|
|
6032
5953
|
}
|
|
6033
|
-
return /* @__PURE__ */
|
|
5954
|
+
return /* @__PURE__ */ React96.createElement(React96.Fragment, null, /* @__PURE__ */ React96.createElement(
|
|
6034
5955
|
import_ui48.IconButton,
|
|
6035
5956
|
{
|
|
6036
5957
|
size: SIZE7,
|
|
6037
5958
|
...(0, import_ui48.bindTrigger)(popupState),
|
|
6038
5959
|
"aria-label": (0, import_i18n65.__)("Dynamic settings", "elementor")
|
|
6039
5960
|
},
|
|
6040
|
-
/* @__PURE__ */
|
|
6041
|
-
), /* @__PURE__ */
|
|
5961
|
+
/* @__PURE__ */ React96.createElement(import_icons28.SettingsIcon, { fontSize: SIZE7 })
|
|
5962
|
+
), /* @__PURE__ */ React96.createElement(
|
|
6042
5963
|
import_ui48.Popover,
|
|
6043
5964
|
{
|
|
6044
5965
|
disablePortal: true,
|
|
@@ -6050,14 +5971,14 @@ var DynamicSettingsPopover = ({ dynamicTag }) => {
|
|
|
6050
5971
|
},
|
|
6051
5972
|
...(0, import_ui48.bindPopover)(popupState)
|
|
6052
5973
|
},
|
|
6053
|
-
/* @__PURE__ */
|
|
5974
|
+
/* @__PURE__ */ React96.createElement(PopoverBody, { "aria-label": (0, import_i18n65.__)("Dynamic settings", "elementor") }, /* @__PURE__ */ React96.createElement(
|
|
6054
5975
|
import_editor_ui8.PopoverHeader,
|
|
6055
5976
|
{
|
|
6056
5977
|
title: dynamicTag.label,
|
|
6057
5978
|
onClose: popupState.close,
|
|
6058
|
-
icon: /* @__PURE__ */
|
|
5979
|
+
icon: /* @__PURE__ */ React96.createElement(import_icons28.DatabaseIcon, { fontSize: SIZE7 })
|
|
6059
5980
|
}
|
|
6060
|
-
), /* @__PURE__ */
|
|
5981
|
+
), /* @__PURE__ */ React96.createElement(DynamicSettings, { controls: dynamicTag.atomic_controls, tagName: dynamicTag.name }))
|
|
6061
5982
|
));
|
|
6062
5983
|
};
|
|
6063
5984
|
var DynamicSettings = ({ controls, tagName }) => {
|
|
@@ -6068,9 +5989,9 @@ var DynamicSettings = ({ controls, tagName }) => {
|
|
|
6068
5989
|
}
|
|
6069
5990
|
if (tagsWithoutTabs.includes(tagName)) {
|
|
6070
5991
|
const singleTab = tabs[0];
|
|
6071
|
-
return /* @__PURE__ */
|
|
5992
|
+
return /* @__PURE__ */ React96.createElement(React96.Fragment, null, /* @__PURE__ */ React96.createElement(import_ui48.Divider, null), /* @__PURE__ */ React96.createElement(ControlsItemsStack, { items: singleTab.value.items }));
|
|
6072
5993
|
}
|
|
6073
|
-
return /* @__PURE__ */
|
|
5994
|
+
return /* @__PURE__ */ React96.createElement(React96.Fragment, null, tabs.length > 1 && /* @__PURE__ */ React96.createElement(import_ui48.Tabs, { size: "small", variant: "fullWidth", ...getTabsProps() }, tabs.map(({ value }, index) => /* @__PURE__ */ React96.createElement(
|
|
6074
5995
|
import_ui48.Tab,
|
|
6075
5996
|
{
|
|
6076
5997
|
key: index,
|
|
@@ -6078,15 +5999,15 @@ var DynamicSettings = ({ controls, tagName }) => {
|
|
|
6078
5999
|
sx: { px: 1, py: 0.5 },
|
|
6079
6000
|
...getTabProps(index)
|
|
6080
6001
|
}
|
|
6081
|
-
))), /* @__PURE__ */
|
|
6082
|
-
return /* @__PURE__ */
|
|
6002
|
+
))), /* @__PURE__ */ React96.createElement(import_ui48.Divider, null), tabs.map(({ value }, index) => {
|
|
6003
|
+
return /* @__PURE__ */ React96.createElement(
|
|
6083
6004
|
import_ui48.TabPanel,
|
|
6084
6005
|
{
|
|
6085
6006
|
key: index,
|
|
6086
6007
|
sx: { flexGrow: 1, py: 0, overflowY: "auto" },
|
|
6087
6008
|
...getTabPanelProps(index)
|
|
6088
6009
|
},
|
|
6089
|
-
/* @__PURE__ */
|
|
6010
|
+
/* @__PURE__ */ React96.createElement(ControlsItemsStack, { items: value.items })
|
|
6090
6011
|
);
|
|
6091
6012
|
}));
|
|
6092
6013
|
};
|
|
@@ -6128,11 +6049,11 @@ var Control3 = ({ control }) => {
|
|
|
6128
6049
|
display: "grid",
|
|
6129
6050
|
gridTemplateColumns: isSwitchControl ? "minmax(0, 1fr) max-content" : "1fr 1fr"
|
|
6130
6051
|
} : {};
|
|
6131
|
-
return /* @__PURE__ */
|
|
6052
|
+
return /* @__PURE__ */ React96.createElement(DynamicControl, { bind: control.bind }, /* @__PURE__ */ React96.createElement(import_ui48.Grid, { container: true, gap: 0.75, sx: layoutStyleProps }, control.label ? /* @__PURE__ */ React96.createElement(import_ui48.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React96.createElement(import_editor_controls58.ControlFormLabel, null, control.label)) : null, /* @__PURE__ */ React96.createElement(import_ui48.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React96.createElement(Control, { type: control.type, props: controlProps }))));
|
|
6132
6053
|
};
|
|
6133
6054
|
function ControlsItemsStack({ items: items3 }) {
|
|
6134
|
-
return /* @__PURE__ */
|
|
6135
|
-
(item) => item.type === "control" ? /* @__PURE__ */
|
|
6055
|
+
return /* @__PURE__ */ React96.createElement(import_ui48.Stack, { p: 2, gap: 2, sx: { overflowY: "auto" } }, items3.map(
|
|
6056
|
+
(item) => item.type === "control" ? /* @__PURE__ */ React96.createElement(Control3, { key: item.value.bind, control: item.value }) : null
|
|
6136
6057
|
));
|
|
6137
6058
|
}
|
|
6138
6059
|
|
|
@@ -6186,7 +6107,7 @@ function getDynamicValue(name, settings) {
|
|
|
6186
6107
|
}
|
|
6187
6108
|
|
|
6188
6109
|
// src/dynamics/hooks/use-prop-dynamic-action.tsx
|
|
6189
|
-
var
|
|
6110
|
+
var React97 = __toESM(require("react"));
|
|
6190
6111
|
var import_editor_controls59 = require("@elementor/editor-controls");
|
|
6191
6112
|
var import_icons29 = require("@elementor/icons");
|
|
6192
6113
|
var import_i18n66 = require("@wordpress/i18n");
|
|
@@ -6197,7 +6118,7 @@ var usePropDynamicAction = () => {
|
|
|
6197
6118
|
visible,
|
|
6198
6119
|
icon: import_icons29.DatabaseIcon,
|
|
6199
6120
|
title: (0, import_i18n66.__)("Dynamic tags", "elementor"),
|
|
6200
|
-
content: ({ close }) => /* @__PURE__ */
|
|
6121
|
+
content: ({ close }) => /* @__PURE__ */ React97.createElement(DynamicSelection, { close })
|
|
6201
6122
|
};
|
|
6202
6123
|
};
|
|
6203
6124
|
|
|
@@ -6271,23 +6192,23 @@ var excludePropTypeTransformers = /* @__PURE__ */ new Set([
|
|
|
6271
6192
|
]);
|
|
6272
6193
|
|
|
6273
6194
|
// src/styles-inheritance/transformers/array-transformer.tsx
|
|
6274
|
-
var
|
|
6195
|
+
var React98 = __toESM(require("react"));
|
|
6275
6196
|
var import_editor_canvas6 = require("@elementor/editor-canvas");
|
|
6276
6197
|
var import_ui49 = require("@elementor/ui");
|
|
6277
6198
|
var arrayTransformer = (0, import_editor_canvas6.createTransformer)((values) => {
|
|
6278
6199
|
if (!values || values.length === 0) {
|
|
6279
6200
|
return null;
|
|
6280
6201
|
}
|
|
6281
|
-
return /* @__PURE__ */
|
|
6202
|
+
return /* @__PURE__ */ React98.createElement(import_ui49.Stack, { direction: "column" }, values.map((item, index) => /* @__PURE__ */ React98.createElement(import_ui49.Stack, { key: index }, item)));
|
|
6282
6203
|
});
|
|
6283
6204
|
|
|
6284
6205
|
// src/styles-inheritance/transformers/background-color-overlay-transformer.tsx
|
|
6285
|
-
var
|
|
6206
|
+
var React99 = __toESM(require("react"));
|
|
6286
6207
|
var import_editor_canvas7 = require("@elementor/editor-canvas");
|
|
6287
6208
|
var import_ui50 = require("@elementor/ui");
|
|
6288
|
-
var backgroundColorOverlayTransformer = (0, import_editor_canvas7.createTransformer)((value) => /* @__PURE__ */
|
|
6209
|
+
var backgroundColorOverlayTransformer = (0, import_editor_canvas7.createTransformer)((value) => /* @__PURE__ */ React99.createElement(import_ui50.Stack, { direction: "row", gap: 1, alignItems: "center" }, /* @__PURE__ */ React99.createElement(ItemLabelColor, { value })));
|
|
6289
6210
|
var ItemLabelColor = ({ value: { color } }) => {
|
|
6290
|
-
return /* @__PURE__ */
|
|
6211
|
+
return /* @__PURE__ */ React99.createElement("span", null, color);
|
|
6291
6212
|
};
|
|
6292
6213
|
var StyledUnstableColorIndicator = (0, import_ui50.styled)(import_ui50.UnstableColorIndicator)(({ theme }) => ({
|
|
6293
6214
|
width: "1em",
|
|
@@ -6298,20 +6219,20 @@ var StyledUnstableColorIndicator = (0, import_ui50.styled)(import_ui50.UnstableC
|
|
|
6298
6219
|
}));
|
|
6299
6220
|
|
|
6300
6221
|
// src/styles-inheritance/transformers/background-gradient-overlay-transformer.tsx
|
|
6301
|
-
var
|
|
6222
|
+
var React100 = __toESM(require("react"));
|
|
6302
6223
|
var import_editor_canvas8 = require("@elementor/editor-canvas");
|
|
6303
6224
|
var import_ui51 = require("@elementor/ui");
|
|
6304
6225
|
var import_i18n68 = require("@wordpress/i18n");
|
|
6305
|
-
var backgroundGradientOverlayTransformer = (0, import_editor_canvas8.createTransformer)((value) => /* @__PURE__ */
|
|
6226
|
+
var backgroundGradientOverlayTransformer = (0, import_editor_canvas8.createTransformer)((value) => /* @__PURE__ */ React100.createElement(import_ui51.Stack, { direction: "row", gap: 1, alignItems: "center" }, /* @__PURE__ */ React100.createElement(ItemIconGradient, { value }), /* @__PURE__ */ React100.createElement(ItemLabelGradient, { value })));
|
|
6306
6227
|
var ItemIconGradient = ({ value }) => {
|
|
6307
6228
|
const gradient = getGradientValue(value);
|
|
6308
|
-
return /* @__PURE__ */
|
|
6229
|
+
return /* @__PURE__ */ React100.createElement(StyledUnstableColorIndicator, { size: "inherit", component: "span", value: gradient });
|
|
6309
6230
|
};
|
|
6310
6231
|
var ItemLabelGradient = ({ value }) => {
|
|
6311
6232
|
if (value.type === "linear") {
|
|
6312
|
-
return /* @__PURE__ */
|
|
6233
|
+
return /* @__PURE__ */ React100.createElement("span", null, (0, import_i18n68.__)("Linear gradient", "elementor"));
|
|
6313
6234
|
}
|
|
6314
|
-
return /* @__PURE__ */
|
|
6235
|
+
return /* @__PURE__ */ React100.createElement("span", null, (0, import_i18n68.__)("Radial gradient", "elementor"));
|
|
6315
6236
|
};
|
|
6316
6237
|
var getGradientValue = (gradient) => {
|
|
6317
6238
|
const stops = gradient.stops?.map(({ color, offset }) => `${color} ${offset ?? 0}%`)?.join(",");
|
|
@@ -6322,15 +6243,15 @@ var getGradientValue = (gradient) => {
|
|
|
6322
6243
|
};
|
|
6323
6244
|
|
|
6324
6245
|
// src/styles-inheritance/transformers/background-image-overlay-transformer.tsx
|
|
6325
|
-
var
|
|
6246
|
+
var React101 = __toESM(require("react"));
|
|
6326
6247
|
var import_editor_canvas9 = require("@elementor/editor-canvas");
|
|
6327
6248
|
var import_editor_ui9 = require("@elementor/editor-ui");
|
|
6328
6249
|
var import_ui52 = require("@elementor/ui");
|
|
6329
6250
|
var import_wp_media = require("@elementor/wp-media");
|
|
6330
|
-
var backgroundImageOverlayTransformer = (0, import_editor_canvas9.createTransformer)((value) => /* @__PURE__ */
|
|
6251
|
+
var backgroundImageOverlayTransformer = (0, import_editor_canvas9.createTransformer)((value) => /* @__PURE__ */ React101.createElement(import_ui52.Stack, { direction: "row", gap: 1, alignItems: "center" }, /* @__PURE__ */ React101.createElement(ItemIconImage, { value }), /* @__PURE__ */ React101.createElement(ItemLabelImage, { value })));
|
|
6331
6252
|
var ItemIconImage = ({ value }) => {
|
|
6332
6253
|
const { imageUrl } = useImage(value);
|
|
6333
|
-
return /* @__PURE__ */
|
|
6254
|
+
return /* @__PURE__ */ React101.createElement(
|
|
6334
6255
|
import_ui52.CardMedia,
|
|
6335
6256
|
{
|
|
6336
6257
|
image: imageUrl,
|
|
@@ -6346,7 +6267,7 @@ var ItemIconImage = ({ value }) => {
|
|
|
6346
6267
|
};
|
|
6347
6268
|
var ItemLabelImage = ({ value }) => {
|
|
6348
6269
|
const { imageTitle } = useImage(value);
|
|
6349
|
-
return /* @__PURE__ */
|
|
6270
|
+
return /* @__PURE__ */ React101.createElement(import_editor_ui9.EllipsisWithTooltip, { title: imageTitle }, /* @__PURE__ */ React101.createElement("span", null, imageTitle));
|
|
6350
6271
|
};
|
|
6351
6272
|
var useImage = (image) => {
|
|
6352
6273
|
let imageTitle, imageUrl = null;
|
|
@@ -6371,7 +6292,7 @@ var getFileExtensionFromFilename = (filename) => {
|
|
|
6371
6292
|
};
|
|
6372
6293
|
|
|
6373
6294
|
// src/styles-inheritance/transformers/box-shadow-transformer.tsx
|
|
6374
|
-
var
|
|
6295
|
+
var React102 = __toESM(require("react"));
|
|
6375
6296
|
var import_editor_canvas10 = require("@elementor/editor-canvas");
|
|
6376
6297
|
var import_ui53 = require("@elementor/ui");
|
|
6377
6298
|
var boxShadowTransformer = (0, import_editor_canvas10.createTransformer)((value) => {
|
|
@@ -6382,11 +6303,11 @@ var boxShadowTransformer = (0, import_editor_canvas10.createTransformer)((value)
|
|
|
6382
6303
|
const colorValue = color || "#000000";
|
|
6383
6304
|
const sizes = [hOffset || "0px", vOffset || "0px", blur || "10px", spread || "0px"].join(" ");
|
|
6384
6305
|
const positionValue = position || "outset";
|
|
6385
|
-
return /* @__PURE__ */
|
|
6306
|
+
return /* @__PURE__ */ React102.createElement(import_ui53.Stack, { direction: "column", gap: 0.5, pb: 1 }, /* @__PURE__ */ React102.createElement("span", null, colorValue, " ", positionValue, ", ", sizes));
|
|
6386
6307
|
});
|
|
6387
6308
|
|
|
6388
6309
|
// src/styles-inheritance/transformers/color-transformer.tsx
|
|
6389
|
-
var
|
|
6310
|
+
var React103 = __toESM(require("react"));
|
|
6390
6311
|
var import_editor_canvas11 = require("@elementor/editor-canvas");
|
|
6391
6312
|
var import_ui54 = require("@elementor/ui");
|
|
6392
6313
|
function isValidCSSColor(value) {
|
|
@@ -6406,11 +6327,11 @@ var colorTransformer = (0, import_editor_canvas11.createTransformer)((value) =>
|
|
|
6406
6327
|
if (!isValidCSSColor(value)) {
|
|
6407
6328
|
return value;
|
|
6408
6329
|
}
|
|
6409
|
-
return /* @__PURE__ */
|
|
6330
|
+
return /* @__PURE__ */ React103.createElement(import_ui54.Stack, { direction: "row", gap: 1, alignItems: "center" }, /* @__PURE__ */ React103.createElement(StyledColorIndicator, { size: "inherit", component: "span", value }), /* @__PURE__ */ React103.createElement("span", null, value));
|
|
6410
6331
|
});
|
|
6411
6332
|
|
|
6412
6333
|
// src/styles-inheritance/transformers/repeater-to-items-transformer.tsx
|
|
6413
|
-
var
|
|
6334
|
+
var React104 = __toESM(require("react"));
|
|
6414
6335
|
var import_editor_canvas12 = require("@elementor/editor-canvas");
|
|
6415
6336
|
var import_ui55 = require("@elementor/ui");
|
|
6416
6337
|
var createRepeaterToItemsTransformer = (originalTransformer, separator = " ") => {
|
|
@@ -6423,7 +6344,7 @@ var createRepeaterToItemsTransformer = (originalTransformer, separator = " ") =>
|
|
|
6423
6344
|
if (parts.length <= 1) {
|
|
6424
6345
|
return stringResult;
|
|
6425
6346
|
}
|
|
6426
|
-
return /* @__PURE__ */
|
|
6347
|
+
return /* @__PURE__ */ React104.createElement(import_ui55.Stack, { direction: "column", gap: 0.5 }, parts.map((part, index) => /* @__PURE__ */ React104.createElement(import_ui55.Stack, { key: index }, part.trim())));
|
|
6427
6348
|
});
|
|
6428
6349
|
};
|
|
6429
6350
|
|