@elementor/editor-editing-panel 3.33.0-216 → 3.33.0-217
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 +492 -234
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +449 -178
- package/dist/index.mjs.map +1 -1
- package/package.json +19 -19
- package/src/components/interactions-sections/interactions-input.tsx +253 -0
- package/src/components/interactions-sections/interactions-section.tsx +15 -0
- package/src/components/interactions-tab.tsx +41 -2
- package/src/contexts/interaction-context.tsx +39 -0
package/dist/index.js
CHANGED
|
@@ -4775,22 +4775,22 @@ var import_editor_panels3 = require("@elementor/editor-panels");
|
|
|
4775
4775
|
var import_editor_v1_adapters8 = require("@elementor/editor-v1-adapters");
|
|
4776
4776
|
|
|
4777
4777
|
// src/hooks/use-open-editor-panel.ts
|
|
4778
|
-
var
|
|
4778
|
+
var import_react40 = require("react");
|
|
4779
4779
|
var import_editor_v1_adapters7 = require("@elementor/editor-v1-adapters");
|
|
4780
4780
|
|
|
4781
4781
|
// src/panel.ts
|
|
4782
4782
|
var import_editor_panels2 = require("@elementor/editor-panels");
|
|
4783
4783
|
|
|
4784
4784
|
// src/components/editing-panel.tsx
|
|
4785
|
-
var
|
|
4785
|
+
var React94 = __toESM(require("react"));
|
|
4786
4786
|
var import_editor_controls53 = require("@elementor/editor-controls");
|
|
4787
|
-
var
|
|
4787
|
+
var import_editor_elements15 = require("@elementor/editor-elements");
|
|
4788
4788
|
var import_editor_panels = require("@elementor/editor-panels");
|
|
4789
4789
|
var import_editor_ui6 = require("@elementor/editor-ui");
|
|
4790
|
-
var
|
|
4791
|
-
var
|
|
4792
|
-
var
|
|
4793
|
-
var
|
|
4790
|
+
var import_icons26 = require("@elementor/icons");
|
|
4791
|
+
var import_session9 = require("@elementor/session");
|
|
4792
|
+
var import_ui47 = require("@elementor/ui");
|
|
4793
|
+
var import_i18n64 = require("@wordpress/i18n");
|
|
4794
4794
|
|
|
4795
4795
|
// src/components/editing-panel-error-fallback.tsx
|
|
4796
4796
|
var React84 = __toESM(require("react"));
|
|
@@ -4800,20 +4800,260 @@ function EditorPanelErrorFallback() {
|
|
|
4800
4800
|
}
|
|
4801
4801
|
|
|
4802
4802
|
// src/components/editing-panel-tabs.tsx
|
|
4803
|
-
var
|
|
4804
|
-
var
|
|
4803
|
+
var import_react39 = require("react");
|
|
4804
|
+
var React93 = __toESM(require("react"));
|
|
4805
4805
|
var import_editor_v1_adapters6 = require("@elementor/editor-v1-adapters");
|
|
4806
|
-
var
|
|
4807
|
-
var
|
|
4806
|
+
var import_ui46 = require("@elementor/ui");
|
|
4807
|
+
var import_i18n63 = require("@wordpress/i18n");
|
|
4808
4808
|
|
|
4809
4809
|
// src/components/interactions-tab.tsx
|
|
4810
|
+
var React88 = __toESM(require("react"));
|
|
4811
|
+
var import_editor_elements13 = require("@elementor/editor-elements");
|
|
4812
|
+
var import_icons25 = require("@elementor/icons");
|
|
4813
|
+
var import_session6 = require("@elementor/session");
|
|
4814
|
+
var import_ui43 = require("@elementor/ui");
|
|
4815
|
+
var import_i18n61 = require("@wordpress/i18n");
|
|
4816
|
+
|
|
4817
|
+
// src/components/interactions-sections/interactions-section.tsx
|
|
4818
|
+
var React87 = __toESM(require("react"));
|
|
4819
|
+
|
|
4820
|
+
// src/contexts/interaction-context.tsx
|
|
4810
4821
|
var React85 = __toESM(require("react"));
|
|
4822
|
+
var import_react37 = require("react");
|
|
4823
|
+
var import_editor_elements12 = require("@elementor/editor-elements");
|
|
4824
|
+
var InteractionsContext = (0, import_react37.createContext)(null);
|
|
4825
|
+
var InteractionsProvider = ({ children }) => {
|
|
4826
|
+
const { element } = useElement();
|
|
4827
|
+
const interactions = (0, import_editor_elements12.useElementInteractions)(element.id);
|
|
4828
|
+
const setInteractions = (value) => {
|
|
4829
|
+
(0, import_editor_elements12.updateElementInteractions)({
|
|
4830
|
+
elementId: element.id,
|
|
4831
|
+
interactions: value
|
|
4832
|
+
});
|
|
4833
|
+
};
|
|
4834
|
+
const contextValue = {
|
|
4835
|
+
interactions: interactions || "",
|
|
4836
|
+
setInteractions
|
|
4837
|
+
};
|
|
4838
|
+
return /* @__PURE__ */ React85.createElement(InteractionsContext.Provider, { value: contextValue }, children);
|
|
4839
|
+
};
|
|
4840
|
+
var useInteractionsContext = () => {
|
|
4841
|
+
const context = (0, import_react37.useContext)(InteractionsContext);
|
|
4842
|
+
if (!context) {
|
|
4843
|
+
throw new Error("useInteractionsContext must be used within InteractionsProvider");
|
|
4844
|
+
}
|
|
4845
|
+
return context;
|
|
4846
|
+
};
|
|
4847
|
+
|
|
4848
|
+
// src/components/interactions-sections/interactions-input.tsx
|
|
4849
|
+
var React86 = __toESM(require("react"));
|
|
4811
4850
|
var import_icons24 = require("@elementor/icons");
|
|
4812
4851
|
var import_ui42 = require("@elementor/ui");
|
|
4813
4852
|
var import_i18n60 = require("@wordpress/i18n");
|
|
4814
|
-
var
|
|
4815
|
-
|
|
4816
|
-
|
|
4853
|
+
var ANIMATION_OPTIONS = [
|
|
4854
|
+
{ value: "", label: "Select animation..." },
|
|
4855
|
+
{ value: "pageload-fade-in-left-1000-1000", label: "Page Load - Fade In Left" },
|
|
4856
|
+
{ value: "scrollintoview-fade-in-left-1000-1000", label: "Scroll Into View - Fade In Left" },
|
|
4857
|
+
{ value: "scrolloutofview-fade-out-right-1000-1000", label: "Scroll Out of View - Fade Out Right" },
|
|
4858
|
+
{ value: "pageload-slide-in-up-1000-1000", label: "Page Load - Slide In Up" },
|
|
4859
|
+
{ value: "scrollintoview-slide-in-up-1000-1000", label: "Scroll Into View - Slide In Up" },
|
|
4860
|
+
{ value: "scrolloutofview-slide-out-down-1000-1000", label: "Scroll Out of View - Slide Out Down" },
|
|
4861
|
+
{ value: "pageload-scale-in-1000-1000", label: "Page Load - Scale In" },
|
|
4862
|
+
{ value: "scrollintoview-scale-in-1000-1000", label: "Scroll Into View - Scale In" },
|
|
4863
|
+
{ value: "scrolloutofview-scale-out-1000-1000", label: "Scroll Out of View - Scale Out" }
|
|
4864
|
+
];
|
|
4865
|
+
var InteractionsInput = () => {
|
|
4866
|
+
const { interactions, setInteractions } = useInteractionsContext();
|
|
4867
|
+
const currentAnimationIds = React86.useMemo(() => {
|
|
4868
|
+
try {
|
|
4869
|
+
const parsed = JSON.parse(interactions || "[]");
|
|
4870
|
+
if (Array.isArray(parsed)) {
|
|
4871
|
+
return parsed.map(
|
|
4872
|
+
(item) => typeof item === "string" ? item : item?.animation?.animation_id || ""
|
|
4873
|
+
);
|
|
4874
|
+
}
|
|
4875
|
+
return [];
|
|
4876
|
+
} catch {
|
|
4877
|
+
return [];
|
|
4878
|
+
}
|
|
4879
|
+
}, [interactions]);
|
|
4880
|
+
const handleAddInteraction = () => {
|
|
4881
|
+
const newAnimationIds = [...currentAnimationIds, ""];
|
|
4882
|
+
const newInteractions = newAnimationIds.map((animationId) => ({
|
|
4883
|
+
animation: {
|
|
4884
|
+
animation_type: "full-preset",
|
|
4885
|
+
animation_id: animationId
|
|
4886
|
+
}
|
|
4887
|
+
}));
|
|
4888
|
+
setInteractions(JSON.stringify(newInteractions));
|
|
4889
|
+
};
|
|
4890
|
+
const handleRemoveInteraction = (index) => {
|
|
4891
|
+
const newAnimationIds = currentAnimationIds.filter((_, i) => i !== index);
|
|
4892
|
+
const newInteractions = newAnimationIds.map((animationId) => ({
|
|
4893
|
+
animation: {
|
|
4894
|
+
animation_type: "full-preset",
|
|
4895
|
+
animation_id: animationId
|
|
4896
|
+
}
|
|
4897
|
+
}));
|
|
4898
|
+
setInteractions(JSON.stringify(newInteractions));
|
|
4899
|
+
};
|
|
4900
|
+
const handleChangeInteraction = (index, value) => {
|
|
4901
|
+
const newAnimationIds = [...currentAnimationIds];
|
|
4902
|
+
newAnimationIds[index] = value;
|
|
4903
|
+
const newInteractions = newAnimationIds.map((animationId) => ({
|
|
4904
|
+
animation: {
|
|
4905
|
+
animation_type: "full-preset",
|
|
4906
|
+
animation_id: animationId
|
|
4907
|
+
}
|
|
4908
|
+
}));
|
|
4909
|
+
setInteractions(JSON.stringify(newInteractions));
|
|
4910
|
+
};
|
|
4911
|
+
const handleDuplicateInteraction = (index) => {
|
|
4912
|
+
const animationId = currentAnimationIds[index];
|
|
4913
|
+
const newAnimationIds = [...currentAnimationIds];
|
|
4914
|
+
newAnimationIds.splice(index + 1, 0, animationId);
|
|
4915
|
+
const newInteractions = newAnimationIds.map((currentAnimationId) => ({
|
|
4916
|
+
animation: {
|
|
4917
|
+
animation_type: "full-preset",
|
|
4918
|
+
animation_id: currentAnimationId
|
|
4919
|
+
}
|
|
4920
|
+
}));
|
|
4921
|
+
setInteractions(JSON.stringify(newInteractions));
|
|
4922
|
+
};
|
|
4923
|
+
return /* @__PURE__ */ React86.createElement(import_ui42.Stack, { spacing: 1 }, /* @__PURE__ */ React86.createElement(import_ui42.Stack, { direction: "row", alignItems: "center", gap: 1, sx: { marginInlineEnd: -0.75, py: 0.25 } }, /* @__PURE__ */ React86.createElement(import_ui42.Box, { display: "flex", alignItems: "center", gap: 1, sx: { flexGrow: 1 } }, /* @__PURE__ */ React86.createElement(import_ui42.Typography, { component: "label", variant: "caption", color: "text.secondary", sx: { lineHeight: 1 } }, (0, import_i18n60.__)("Interactions", "elementor"))), /* @__PURE__ */ React86.createElement(import_ui42.Tooltip, { title: (0, import_i18n60.__)("Add interaction", "elementor"), placement: "top" }, /* @__PURE__ */ React86.createElement(
|
|
4924
|
+
import_ui42.IconButton,
|
|
4925
|
+
{
|
|
4926
|
+
size: "tiny",
|
|
4927
|
+
onClick: handleAddInteraction,
|
|
4928
|
+
"aria-label": (0, import_i18n60.__)("Add interaction", "elementor")
|
|
4929
|
+
},
|
|
4930
|
+
/* @__PURE__ */ React86.createElement(import_icons24.CirclePlusIcon, { fontSize: "tiny" })
|
|
4931
|
+
))), /* @__PURE__ */ React86.createElement(import_ui42.Stack, { spacing: 0.5 }, currentAnimationIds.map((animationId, index) => /* @__PURE__ */ React86.createElement(
|
|
4932
|
+
InteractionItem,
|
|
4933
|
+
{
|
|
4934
|
+
key: index,
|
|
4935
|
+
index,
|
|
4936
|
+
animationId,
|
|
4937
|
+
onChange: handleChangeInteraction,
|
|
4938
|
+
onRemove: handleRemoveInteraction,
|
|
4939
|
+
onDuplicate: handleDuplicateInteraction,
|
|
4940
|
+
canRemove: currentAnimationIds.length > 1
|
|
4941
|
+
}
|
|
4942
|
+
))));
|
|
4943
|
+
};
|
|
4944
|
+
var InteractionItem = ({
|
|
4945
|
+
index,
|
|
4946
|
+
animationId,
|
|
4947
|
+
onChange,
|
|
4948
|
+
onRemove,
|
|
4949
|
+
onDuplicate,
|
|
4950
|
+
canRemove
|
|
4951
|
+
}) => {
|
|
4952
|
+
const popoverState = (0, import_ui42.usePopupState)({ variant: "popover" });
|
|
4953
|
+
const selectedOption = ANIMATION_OPTIONS.find((option) => option.value === animationId);
|
|
4954
|
+
const displayLabel = selectedOption?.label || "Select animation...";
|
|
4955
|
+
const isShowingPlaceholder = !animationId;
|
|
4956
|
+
const handleSelect = (value) => {
|
|
4957
|
+
onChange(index, value);
|
|
4958
|
+
popoverState.close();
|
|
4959
|
+
};
|
|
4960
|
+
return /* @__PURE__ */ React86.createElement(React86.Fragment, null, /* @__PURE__ */ React86.createElement(
|
|
4961
|
+
import_ui42.UnstableTag,
|
|
4962
|
+
{
|
|
4963
|
+
variant: "outlined",
|
|
4964
|
+
label: displayLabel,
|
|
4965
|
+
endIcon: /* @__PURE__ */ React86.createElement(import_icons24.ChevronDownIcon, { fontSize: "tiny" }),
|
|
4966
|
+
...(0, import_ui42.bindTrigger)(popoverState),
|
|
4967
|
+
fullWidth: true,
|
|
4968
|
+
showActionsOnHover: true,
|
|
4969
|
+
sx: {
|
|
4970
|
+
minHeight: (theme) => theme.spacing(3.5),
|
|
4971
|
+
...isShowingPlaceholder && {
|
|
4972
|
+
"& .MuiTag-label": {
|
|
4973
|
+
color: (theme) => theme.palette.text.tertiary
|
|
4974
|
+
}
|
|
4975
|
+
}
|
|
4976
|
+
},
|
|
4977
|
+
actions: /* @__PURE__ */ React86.createElement(React86.Fragment, null, /* @__PURE__ */ React86.createElement(import_ui42.Tooltip, { title: (0, import_i18n60.__)("Duplicate", "elementor"), placement: "top" }, /* @__PURE__ */ React86.createElement(
|
|
4978
|
+
import_ui42.IconButton,
|
|
4979
|
+
{
|
|
4980
|
+
size: "tiny",
|
|
4981
|
+
onClick: (e) => {
|
|
4982
|
+
e.stopPropagation();
|
|
4983
|
+
onDuplicate(index);
|
|
4984
|
+
},
|
|
4985
|
+
"aria-label": (0, import_i18n60.__)("Duplicate", "elementor")
|
|
4986
|
+
},
|
|
4987
|
+
/* @__PURE__ */ React86.createElement(import_icons24.CopyIcon, { fontSize: "tiny" })
|
|
4988
|
+
)), canRemove && /* @__PURE__ */ React86.createElement(import_ui42.Tooltip, { title: (0, import_i18n60.__)("Remove", "elementor"), placement: "top" }, /* @__PURE__ */ React86.createElement(
|
|
4989
|
+
import_ui42.IconButton,
|
|
4990
|
+
{
|
|
4991
|
+
size: "tiny",
|
|
4992
|
+
onClick: (e) => {
|
|
4993
|
+
e.stopPropagation();
|
|
4994
|
+
onRemove(index);
|
|
4995
|
+
},
|
|
4996
|
+
"aria-label": (0, import_i18n60.__)("Remove", "elementor"),
|
|
4997
|
+
color: "error"
|
|
4998
|
+
},
|
|
4999
|
+
/* @__PURE__ */ React86.createElement(import_icons24.CircleXIcon, { fontSize: "tiny" })
|
|
5000
|
+
)))
|
|
5001
|
+
}
|
|
5002
|
+
), /* @__PURE__ */ React86.createElement(
|
|
5003
|
+
import_ui42.Popover,
|
|
5004
|
+
{
|
|
5005
|
+
disablePortal: true,
|
|
5006
|
+
slotProps: {
|
|
5007
|
+
paper: {
|
|
5008
|
+
sx: {
|
|
5009
|
+
mt: 0.5,
|
|
5010
|
+
minWidth: 200,
|
|
5011
|
+
maxHeight: 300,
|
|
5012
|
+
overflow: "auto"
|
|
5013
|
+
}
|
|
5014
|
+
}
|
|
5015
|
+
},
|
|
5016
|
+
anchorOrigin: { vertical: "bottom", horizontal: "left" },
|
|
5017
|
+
...(0, import_ui42.bindPopover)(popoverState)
|
|
5018
|
+
},
|
|
5019
|
+
/* @__PURE__ */ React86.createElement(import_ui42.Box, { sx: { p: 1 } }, ANIMATION_OPTIONS.map((option) => /* @__PURE__ */ React86.createElement(
|
|
5020
|
+
import_ui42.MenuItem,
|
|
5021
|
+
{
|
|
5022
|
+
key: option.value,
|
|
5023
|
+
value: option.value,
|
|
5024
|
+
onClick: () => handleSelect(option.value),
|
|
5025
|
+
selected: option.value === animationId,
|
|
5026
|
+
sx: {
|
|
5027
|
+
minHeight: 32,
|
|
5028
|
+
fontSize: "0.75rem",
|
|
5029
|
+
"&.Mui-selected": {
|
|
5030
|
+
backgroundColor: "action.selected"
|
|
5031
|
+
}
|
|
5032
|
+
}
|
|
5033
|
+
},
|
|
5034
|
+
/* @__PURE__ */ React86.createElement(
|
|
5035
|
+
import_ui42.ListItemText,
|
|
5036
|
+
{
|
|
5037
|
+
primary: option.label,
|
|
5038
|
+
primaryTypographyProps: {
|
|
5039
|
+
variant: "caption",
|
|
5040
|
+
color: option.value === animationId ? "primary" : "text.primary"
|
|
5041
|
+
}
|
|
5042
|
+
}
|
|
5043
|
+
)
|
|
5044
|
+
)))
|
|
5045
|
+
));
|
|
5046
|
+
};
|
|
5047
|
+
|
|
5048
|
+
// src/components/interactions-sections/interactions-section.tsx
|
|
5049
|
+
var InteractionsSection = () => {
|
|
5050
|
+
return /* @__PURE__ */ React87.createElement(SectionContent, null, /* @__PURE__ */ React87.createElement(InteractionsProvider, null, /* @__PURE__ */ React87.createElement(InteractionsInput, null)));
|
|
5051
|
+
};
|
|
5052
|
+
|
|
5053
|
+
// src/components/interactions-tab.tsx
|
|
5054
|
+
var EmptyState2 = ({ onCreateInteraction }) => {
|
|
5055
|
+
return /* @__PURE__ */ React88.createElement(
|
|
5056
|
+
import_ui43.Stack,
|
|
4817
5057
|
{
|
|
4818
5058
|
alignItems: "center",
|
|
4819
5059
|
justifyContent: "center",
|
|
@@ -4822,24 +5062,42 @@ var InteractionsTab = () => {
|
|
|
4822
5062
|
sx: { p: 2.5, pt: 8, pb: 5.5 },
|
|
4823
5063
|
gap: 1.5
|
|
4824
5064
|
},
|
|
4825
|
-
/* @__PURE__ */
|
|
4826
|
-
/* @__PURE__ */
|
|
4827
|
-
/* @__PURE__ */
|
|
5065
|
+
/* @__PURE__ */ React88.createElement(import_icons25.SwipeIcon, { fontSize: "large" }),
|
|
5066
|
+
/* @__PURE__ */ React88.createElement(import_ui43.Typography, { align: "center", variant: "subtitle2" }, (0, import_i18n61.__)("Animate elements with Interactions", "elementor")),
|
|
5067
|
+
/* @__PURE__ */ React88.createElement(import_ui43.Typography, { align: "center", variant: "caption", maxWidth: "170px" }, (0, import_i18n61.__)(
|
|
4828
5068
|
"Add entrance animations and effects triggered by user interactions such as click, hover, or scroll.",
|
|
4829
5069
|
"elementor"
|
|
4830
5070
|
)),
|
|
4831
|
-
/* @__PURE__ */
|
|
5071
|
+
/* @__PURE__ */ React88.createElement(import_ui43.Button, { variant: "outlined", color: "secondary", size: "small", sx: { mt: 1 }, onClick: onCreateInteraction }, (0, import_i18n61.__)("Create an interaction", "elementor"))
|
|
4832
5072
|
);
|
|
4833
5073
|
};
|
|
5074
|
+
var InteractionsTab = () => {
|
|
5075
|
+
const { element } = useElement();
|
|
5076
|
+
const interactions = (0, import_editor_elements13.useElementInteractions)(element.id);
|
|
5077
|
+
const [showInteractions, setShowInteractions] = React88.useState(false);
|
|
5078
|
+
const hasInteractions = (() => {
|
|
5079
|
+
if (!interactions || typeof interactions !== "string") {
|
|
5080
|
+
return false;
|
|
5081
|
+
}
|
|
5082
|
+
try {
|
|
5083
|
+
const parsed = JSON.parse(interactions);
|
|
5084
|
+
return Array.isArray(parsed) && parsed.length > 0;
|
|
5085
|
+
} catch {
|
|
5086
|
+
return false;
|
|
5087
|
+
}
|
|
5088
|
+
})();
|
|
5089
|
+
const shouldShowInteractions = hasInteractions || showInteractions;
|
|
5090
|
+
return /* @__PURE__ */ React88.createElement(import_session6.SessionStorageProvider, { prefix: element.id }, shouldShowInteractions ? /* @__PURE__ */ React88.createElement(SectionsList, null, /* @__PURE__ */ React88.createElement(InteractionsSection, null)) : /* @__PURE__ */ React88.createElement(EmptyState2, { onCreateInteraction: () => setShowInteractions(true) }));
|
|
5091
|
+
};
|
|
4834
5092
|
|
|
4835
5093
|
// src/components/settings-tab.tsx
|
|
4836
|
-
var
|
|
5094
|
+
var React92 = __toESM(require("react"));
|
|
4837
5095
|
var import_editor_controls52 = require("@elementor/editor-controls");
|
|
4838
|
-
var
|
|
4839
|
-
var
|
|
5096
|
+
var import_session8 = require("@elementor/session");
|
|
5097
|
+
var import_ui45 = require("@elementor/ui");
|
|
4840
5098
|
|
|
4841
5099
|
// src/controls-registry/control.tsx
|
|
4842
|
-
var
|
|
5100
|
+
var React89 = __toESM(require("react"));
|
|
4843
5101
|
var Control = ({ props, type }) => {
|
|
4844
5102
|
const ControlByType = controlsRegistry.get(type);
|
|
4845
5103
|
const { element } = useElement();
|
|
@@ -4848,19 +5106,19 @@ var Control = ({ props, type }) => {
|
|
|
4848
5106
|
context: { controlType: type }
|
|
4849
5107
|
});
|
|
4850
5108
|
}
|
|
4851
|
-
return /* @__PURE__ */
|
|
5109
|
+
return /* @__PURE__ */ React89.createElement(ControlByType, { ...props, context: { elementId: element.id } });
|
|
4852
5110
|
};
|
|
4853
5111
|
|
|
4854
5112
|
// src/controls-registry/control-type-container.tsx
|
|
4855
|
-
var
|
|
4856
|
-
var
|
|
5113
|
+
var React90 = __toESM(require("react"));
|
|
5114
|
+
var import_ui44 = require("@elementor/ui");
|
|
4857
5115
|
var ControlTypeContainer = ({ children, layout }) => {
|
|
4858
5116
|
if (layout === "custom") {
|
|
4859
5117
|
return children;
|
|
4860
5118
|
}
|
|
4861
|
-
return /* @__PURE__ */
|
|
5119
|
+
return /* @__PURE__ */ React90.createElement(StyledContainer, { layout }, children);
|
|
4862
5120
|
};
|
|
4863
|
-
var StyledContainer = (0,
|
|
5121
|
+
var StyledContainer = (0, import_ui44.styled)(import_ui44.Box, {
|
|
4864
5122
|
shouldForwardProp: (prop) => !["layout"].includes(prop)
|
|
4865
5123
|
})(({ layout, theme }) => ({
|
|
4866
5124
|
display: "grid",
|
|
@@ -4886,18 +5144,18 @@ var getStyleByLayout = (layout) => {
|
|
|
4886
5144
|
};
|
|
4887
5145
|
|
|
4888
5146
|
// src/controls-registry/settings-field.tsx
|
|
4889
|
-
var
|
|
4890
|
-
var
|
|
5147
|
+
var React91 = __toESM(require("react"));
|
|
5148
|
+
var import_react38 = require("react");
|
|
4891
5149
|
var import_editor_controls51 = require("@elementor/editor-controls");
|
|
4892
5150
|
var import_editor_documents2 = require("@elementor/editor-documents");
|
|
4893
|
-
var
|
|
5151
|
+
var import_editor_elements14 = require("@elementor/editor-elements");
|
|
4894
5152
|
var import_editor_props15 = require("@elementor/editor-props");
|
|
4895
5153
|
var import_editor_v1_adapters5 = require("@elementor/editor-v1-adapters");
|
|
4896
|
-
var
|
|
5154
|
+
var import_i18n62 = require("@wordpress/i18n");
|
|
4897
5155
|
|
|
4898
5156
|
// src/utils/prop-dependency-utils.ts
|
|
4899
5157
|
var import_editor_props14 = require("@elementor/editor-props");
|
|
4900
|
-
var
|
|
5158
|
+
var import_session7 = require("@elementor/session");
|
|
4901
5159
|
function extractOrderedDependencies(bind, propsSchema, elementValues, dependenciesPerTargetMapping) {
|
|
4902
5160
|
const prop = getPropType(propsSchema, elementValues, bind.split("."));
|
|
4903
5161
|
if (!prop) {
|
|
@@ -5043,17 +5301,17 @@ function savePreviousValueToStorage({ path, elementId, value }) {
|
|
|
5043
5301
|
return;
|
|
5044
5302
|
}
|
|
5045
5303
|
const key = `${prefix}:${path}`;
|
|
5046
|
-
(0,
|
|
5304
|
+
(0, import_session7.setSessionStorageItem)(key, value);
|
|
5047
5305
|
}
|
|
5048
5306
|
function retrievePreviousValueFromStorage({ path, elementId }) {
|
|
5049
5307
|
const prefix = `elementor/${elementId}`;
|
|
5050
5308
|
const key = `${prefix}:${path}`;
|
|
5051
|
-
return (0,
|
|
5309
|
+
return (0, import_session7.getSessionStorageItem)(key) ?? null;
|
|
5052
5310
|
}
|
|
5053
5311
|
function removePreviousValueFromStorage({ path, elementId }) {
|
|
5054
5312
|
const prefix = `elementor/${elementId}`;
|
|
5055
5313
|
const key = `${prefix}:${path}`;
|
|
5056
|
-
(0,
|
|
5314
|
+
(0, import_session7.removeSessionStorageItem)(key);
|
|
5057
5315
|
}
|
|
5058
5316
|
|
|
5059
5317
|
// src/controls-registry/settings-field.tsx
|
|
@@ -5063,7 +5321,7 @@ var SettingsField = ({ bind, children, propDisplayName }) => {
|
|
|
5063
5321
|
element: { id: elementId },
|
|
5064
5322
|
elementType: { propsSchema, dependenciesPerTargetMapping = {} }
|
|
5065
5323
|
} = useElement();
|
|
5066
|
-
const elementSettingValues = (0,
|
|
5324
|
+
const elementSettingValues = (0, import_editor_elements14.useElementSettings)(elementId, Object.keys(propsSchema));
|
|
5067
5325
|
const value = { [bind]: elementSettingValues?.[bind] ?? null };
|
|
5068
5326
|
const propType = createTopLevelObjectType({ schema: propsSchema });
|
|
5069
5327
|
const undoableUpdateElementProp = useUndoableUpdateElementProp({
|
|
@@ -5081,29 +5339,29 @@ var SettingsField = ({ bind, children, propDisplayName }) => {
|
|
|
5081
5339
|
undoableUpdateElementProp(settings);
|
|
5082
5340
|
};
|
|
5083
5341
|
const isDisabled = (prop) => !(0, import_editor_props15.isDependencyMet)(prop?.dependencies, elementSettingValues).isMet;
|
|
5084
|
-
return /* @__PURE__ */
|
|
5342
|
+
return /* @__PURE__ */ React91.createElement(import_editor_controls51.PropProvider, { propType, value, setValue, isDisabled }, /* @__PURE__ */ React91.createElement(import_editor_controls51.PropKeyProvider, { bind }, children));
|
|
5085
5343
|
};
|
|
5086
5344
|
function useUndoableUpdateElementProp({
|
|
5087
5345
|
elementId,
|
|
5088
5346
|
propDisplayName
|
|
5089
5347
|
}) {
|
|
5090
|
-
return (0,
|
|
5348
|
+
return (0, import_react38.useMemo)(() => {
|
|
5091
5349
|
return (0, import_editor_v1_adapters5.undoable)(
|
|
5092
5350
|
{
|
|
5093
5351
|
do: (newSettings) => {
|
|
5094
|
-
const prevPropValue = (0,
|
|
5095
|
-
(0,
|
|
5352
|
+
const prevPropValue = (0, import_editor_elements14.getElementSettings)(elementId, Object.keys(newSettings));
|
|
5353
|
+
(0, import_editor_elements14.updateElementSettings)({ id: elementId, props: newSettings, withHistory: false });
|
|
5096
5354
|
(0, import_editor_documents2.setDocumentModifiedStatus)(true);
|
|
5097
5355
|
return prevPropValue;
|
|
5098
5356
|
},
|
|
5099
5357
|
undo: ({}, prevProps) => {
|
|
5100
|
-
(0,
|
|
5358
|
+
(0, import_editor_elements14.updateElementSettings)({ id: elementId, props: prevProps, withHistory: false });
|
|
5101
5359
|
}
|
|
5102
5360
|
},
|
|
5103
5361
|
{
|
|
5104
|
-
title: (0,
|
|
5362
|
+
title: (0, import_editor_elements14.getElementLabel)(elementId),
|
|
5105
5363
|
// translators: %s is the name of the property that was edited.
|
|
5106
|
-
subtitle: (0,
|
|
5364
|
+
subtitle: (0, import_i18n62.__)("%s edited", "elementor").replace("%s", propDisplayName),
|
|
5107
5365
|
debounce: { wait: HISTORY_DEBOUNCE_WAIT2 }
|
|
5108
5366
|
}
|
|
5109
5367
|
);
|
|
@@ -5115,13 +5373,13 @@ var SettingsTab = () => {
|
|
|
5115
5373
|
const { elementType, element } = useElement();
|
|
5116
5374
|
const settingsDefault = useDefaultPanelSettings();
|
|
5117
5375
|
const isDefaultExpanded = (sectionId) => settingsDefault.defaultSectionsExpanded.settings?.includes(sectionId);
|
|
5118
|
-
return /* @__PURE__ */
|
|
5376
|
+
return /* @__PURE__ */ React92.createElement(import_session8.SessionStorageProvider, { prefix: element.id }, /* @__PURE__ */ React92.createElement(SectionsList, null, elementType.controls.map((control, index) => {
|
|
5119
5377
|
if (isControl(control)) {
|
|
5120
|
-
return /* @__PURE__ */
|
|
5378
|
+
return /* @__PURE__ */ React92.createElement(Control2, { key: getKey(control, element), control });
|
|
5121
5379
|
}
|
|
5122
5380
|
const { type, value } = control;
|
|
5123
5381
|
if (type === "section") {
|
|
5124
|
-
return /* @__PURE__ */
|
|
5382
|
+
return /* @__PURE__ */ React92.createElement(
|
|
5125
5383
|
Section,
|
|
5126
5384
|
{
|
|
5127
5385
|
title: value.label,
|
|
@@ -5130,7 +5388,7 @@ var SettingsTab = () => {
|
|
|
5130
5388
|
},
|
|
5131
5389
|
value.items?.map((item) => {
|
|
5132
5390
|
if (isControl(item)) {
|
|
5133
|
-
return /* @__PURE__ */
|
|
5391
|
+
return /* @__PURE__ */ React92.createElement(Control2, { key: getKey(item, element), control: item });
|
|
5134
5392
|
}
|
|
5135
5393
|
return null;
|
|
5136
5394
|
})
|
|
@@ -5149,16 +5407,16 @@ var Control2 = ({ control: { value, type } }) => {
|
|
|
5149
5407
|
controlProps.label = value.label;
|
|
5150
5408
|
}
|
|
5151
5409
|
if (type === "element-control") {
|
|
5152
|
-
return /* @__PURE__ */
|
|
5410
|
+
return /* @__PURE__ */ React92.createElement(ControlLayout, { control: value, layout, controlProps });
|
|
5153
5411
|
}
|
|
5154
|
-
return /* @__PURE__ */
|
|
5412
|
+
return /* @__PURE__ */ React92.createElement(SettingsField, { bind: value.bind, propDisplayName: value.label || value.bind }, /* @__PURE__ */ React92.createElement(ControlLayout, { control: value, layout, controlProps }));
|
|
5155
5413
|
};
|
|
5156
5414
|
var ControlLayout = ({
|
|
5157
5415
|
control,
|
|
5158
5416
|
layout,
|
|
5159
5417
|
controlProps
|
|
5160
5418
|
}) => {
|
|
5161
|
-
return /* @__PURE__ */
|
|
5419
|
+
return /* @__PURE__ */ React92.createElement(React92.Fragment, null, control.meta?.topDivider && /* @__PURE__ */ React92.createElement(import_ui45.Divider, null), /* @__PURE__ */ React92.createElement(ControlTypeContainer, { layout }, control.label && layout !== "custom" ? /* @__PURE__ */ React92.createElement(import_editor_controls52.ControlFormLabel, null, control.label) : null, /* @__PURE__ */ React92.createElement(Control, { type: control.type, props: controlProps })));
|
|
5162
5420
|
};
|
|
5163
5421
|
function populateChildControlProps(props) {
|
|
5164
5422
|
if (props.childControlType) {
|
|
@@ -5191,7 +5449,7 @@ var EditingPanelTabs = () => {
|
|
|
5191
5449
|
return (
|
|
5192
5450
|
// When switching between elements, the local states should be reset. We are using key to rerender the tabs.
|
|
5193
5451
|
// Reference: https://react.dev/learn/preserving-and-resetting-state#resetting-a-form-with-a-key
|
|
5194
|
-
/* @__PURE__ */
|
|
5452
|
+
/* @__PURE__ */ React93.createElement(import_react39.Fragment, { key: element.id }, /* @__PURE__ */ React93.createElement(PanelTabContent, null))
|
|
5195
5453
|
);
|
|
5196
5454
|
};
|
|
5197
5455
|
var PanelTabContent = () => {
|
|
@@ -5199,9 +5457,9 @@ var PanelTabContent = () => {
|
|
|
5199
5457
|
const defaultComponentTab = editorDefaults.defaultTab;
|
|
5200
5458
|
const isInteractionsActive = (0, import_editor_v1_adapters6.isExperimentActive)("e_interactions");
|
|
5201
5459
|
const [currentTab, setCurrentTab] = useStateByElement("tab", defaultComponentTab);
|
|
5202
|
-
const { getTabProps, getTabPanelProps, getTabsProps } = (0,
|
|
5203
|
-
return /* @__PURE__ */
|
|
5204
|
-
|
|
5460
|
+
const { getTabProps, getTabPanelProps, getTabsProps } = (0, import_ui46.useTabs)(currentTab);
|
|
5461
|
+
return /* @__PURE__ */ React93.createElement(ScrollProvider, null, /* @__PURE__ */ React93.createElement(import_ui46.Stack, { direction: "column", sx: { width: "100%" } }, /* @__PURE__ */ React93.createElement(import_ui46.Stack, { sx: { ...stickyHeaderStyles, top: 0 } }, /* @__PURE__ */ React93.createElement(
|
|
5462
|
+
import_ui46.Tabs,
|
|
5205
5463
|
{
|
|
5206
5464
|
variant: "fullWidth",
|
|
5207
5465
|
size: "small",
|
|
@@ -5212,23 +5470,23 @@ var PanelTabContent = () => {
|
|
|
5212
5470
|
setCurrentTab(newValue);
|
|
5213
5471
|
}
|
|
5214
5472
|
},
|
|
5215
|
-
/* @__PURE__ */
|
|
5216
|
-
/* @__PURE__ */
|
|
5217
|
-
isInteractionsActive && /* @__PURE__ */
|
|
5218
|
-
), /* @__PURE__ */
|
|
5473
|
+
/* @__PURE__ */ React93.createElement(import_ui46.Tab, { label: (0, import_i18n63.__)("General", "elementor"), ...getTabProps("settings") }),
|
|
5474
|
+
/* @__PURE__ */ React93.createElement(import_ui46.Tab, { label: (0, import_i18n63.__)("Style", "elementor"), ...getTabProps("style") }),
|
|
5475
|
+
isInteractionsActive && /* @__PURE__ */ React93.createElement(import_ui46.Tab, { label: (0, import_i18n63.__)("Interactions", "elementor"), ...getTabProps("interactions") })
|
|
5476
|
+
), /* @__PURE__ */ React93.createElement(import_ui46.Divider, null)), /* @__PURE__ */ React93.createElement(import_ui46.TabPanel, { ...getTabPanelProps("settings"), disablePadding: true }, /* @__PURE__ */ React93.createElement(SettingsTab, null)), /* @__PURE__ */ React93.createElement(import_ui46.TabPanel, { ...getTabPanelProps("style"), disablePadding: true }, /* @__PURE__ */ React93.createElement(StyleTab, null)), isInteractionsActive && /* @__PURE__ */ React93.createElement(import_ui46.TabPanel, { ...getTabPanelProps("interactions"), disablePadding: true }, /* @__PURE__ */ React93.createElement(InteractionsTab, null))));
|
|
5219
5477
|
};
|
|
5220
5478
|
|
|
5221
5479
|
// src/components/editing-panel.tsx
|
|
5222
5480
|
var { useMenuItems } = controlActionsMenu;
|
|
5223
5481
|
var EditingPanel = () => {
|
|
5224
|
-
const { element, elementType } = (0,
|
|
5482
|
+
const { element, elementType } = (0, import_editor_elements15.useSelectedElement)();
|
|
5225
5483
|
const controlReplacements = getControlReplacements();
|
|
5226
5484
|
const menuItems = useMenuItems().default;
|
|
5227
5485
|
if (!element || !elementType) {
|
|
5228
5486
|
return null;
|
|
5229
5487
|
}
|
|
5230
|
-
const panelTitle = (0,
|
|
5231
|
-
return /* @__PURE__ */
|
|
5488
|
+
const panelTitle = (0, import_i18n64.__)("Edit %s", "elementor").replace("%s", elementType.title);
|
|
5489
|
+
return /* @__PURE__ */ React94.createElement(import_ui47.ErrorBoundary, { fallback: /* @__PURE__ */ React94.createElement(EditorPanelErrorFallback, null) }, /* @__PURE__ */ React94.createElement(import_session9.SessionStorageProvider, { prefix: "elementor" }, /* @__PURE__ */ React94.createElement(import_editor_ui6.ThemeProvider, null, /* @__PURE__ */ React94.createElement(import_editor_panels.Panel, null, /* @__PURE__ */ React94.createElement(import_editor_panels.PanelHeader, null, /* @__PURE__ */ React94.createElement(import_editor_panels.PanelHeaderTitle, null, panelTitle), /* @__PURE__ */ React94.createElement(import_icons26.AtomIcon, { fontSize: "small", sx: { color: "text.tertiary" } })), /* @__PURE__ */ React94.createElement(import_editor_panels.PanelBody, null, /* @__PURE__ */ React94.createElement(import_editor_controls53.ControlActionsProvider, { items: menuItems }, /* @__PURE__ */ React94.createElement(import_editor_controls53.ControlReplacementsProvider, { replacements: controlReplacements }, /* @__PURE__ */ React94.createElement(ElementProvider, { element, elementType }, /* @__PURE__ */ React94.createElement(EditingPanelTabs, null)))))))));
|
|
5232
5490
|
};
|
|
5233
5491
|
|
|
5234
5492
|
// src/panel.ts
|
|
@@ -5238,10 +5496,10 @@ var { panel, usePanelActions, usePanelStatus } = (0, import_editor_panels2.__cre
|
|
|
5238
5496
|
});
|
|
5239
5497
|
|
|
5240
5498
|
// src/sync/is-atomic-widget-selected.ts
|
|
5241
|
-
var
|
|
5499
|
+
var import_editor_elements16 = require("@elementor/editor-elements");
|
|
5242
5500
|
var isAtomicWidgetSelected = () => {
|
|
5243
|
-
const selectedElements = (0,
|
|
5244
|
-
const widgetCache = (0,
|
|
5501
|
+
const selectedElements = (0, import_editor_elements16.getSelectedElements)();
|
|
5502
|
+
const widgetCache = (0, import_editor_elements16.getWidgetsCache)();
|
|
5245
5503
|
if (selectedElements.length !== 1) {
|
|
5246
5504
|
return false;
|
|
5247
5505
|
}
|
|
@@ -5251,7 +5509,7 @@ var isAtomicWidgetSelected = () => {
|
|
|
5251
5509
|
// src/hooks/use-open-editor-panel.ts
|
|
5252
5510
|
var useOpenEditorPanel = () => {
|
|
5253
5511
|
const { open } = usePanelActions();
|
|
5254
|
-
(0,
|
|
5512
|
+
(0, import_react40.useEffect)(() => {
|
|
5255
5513
|
return (0, import_editor_v1_adapters7.__privateListenTo)((0, import_editor_v1_adapters7.commandStartEvent)("panel/editor/open"), () => {
|
|
5256
5514
|
if (isAtomicWidgetSelected()) {
|
|
5257
5515
|
open();
|
|
@@ -5267,18 +5525,18 @@ var EditingPanelHooks = () => {
|
|
|
5267
5525
|
};
|
|
5268
5526
|
|
|
5269
5527
|
// src/controls-registry/element-controls/tabs-control/tabs-control.tsx
|
|
5270
|
-
var
|
|
5528
|
+
var React95 = __toESM(require("react"));
|
|
5271
5529
|
var import_editor_controls54 = require("@elementor/editor-controls");
|
|
5272
|
-
var
|
|
5530
|
+
var import_editor_elements19 = require("@elementor/editor-elements");
|
|
5273
5531
|
var import_editor_props17 = require("@elementor/editor-props");
|
|
5274
|
-
var
|
|
5275
|
-
var
|
|
5276
|
-
var
|
|
5532
|
+
var import_icons27 = require("@elementor/icons");
|
|
5533
|
+
var import_ui48 = require("@elementor/ui");
|
|
5534
|
+
var import_i18n66 = require("@wordpress/i18n");
|
|
5277
5535
|
|
|
5278
5536
|
// src/controls-registry/element-controls/get-element-by-type.ts
|
|
5279
|
-
var
|
|
5537
|
+
var import_editor_elements17 = require("@elementor/editor-elements");
|
|
5280
5538
|
var getElementByType = (elementId, type) => {
|
|
5281
|
-
const currentElement = (0,
|
|
5539
|
+
const currentElement = (0, import_editor_elements17.getContainer)(elementId);
|
|
5282
5540
|
if (!currentElement) {
|
|
5283
5541
|
throw new Error(`Current element not found, elementId: ${elementId}`);
|
|
5284
5542
|
}
|
|
@@ -5293,33 +5551,33 @@ var getElementByType = (elementId, type) => {
|
|
|
5293
5551
|
};
|
|
5294
5552
|
|
|
5295
5553
|
// src/controls-registry/element-controls/tabs-control/actions.ts
|
|
5296
|
-
var
|
|
5554
|
+
var import_editor_elements18 = require("@elementor/editor-elements");
|
|
5297
5555
|
var import_editor_props16 = require("@elementor/editor-props");
|
|
5298
|
-
var
|
|
5556
|
+
var import_i18n65 = require("@wordpress/i18n");
|
|
5299
5557
|
var TAB_ELEMENT_TYPE = "e-tab";
|
|
5300
5558
|
var TAB_CONTENT_ELEMENT_TYPE = "e-tab-content";
|
|
5301
5559
|
var duplicateItem = ({ items: items3 }) => {
|
|
5302
5560
|
items3.forEach(({ item }) => {
|
|
5303
5561
|
const tabId = item.id;
|
|
5304
|
-
const { value: tabContentId } = (0,
|
|
5562
|
+
const { value: tabContentId } = (0, import_editor_elements18.getElementSetting)(tabId, "tab-content-id") ?? {};
|
|
5305
5563
|
if (!tabContentId) {
|
|
5306
5564
|
throw new Error("Original content ID is required for duplication");
|
|
5307
5565
|
}
|
|
5308
|
-
(0,
|
|
5566
|
+
(0, import_editor_elements18.duplicateElements)({
|
|
5309
5567
|
elementIds: [tabId, tabContentId],
|
|
5310
|
-
title: (0,
|
|
5568
|
+
title: (0, import_i18n65.__)("Duplicate Tab", "elementor"),
|
|
5311
5569
|
onCreate: (duplicatedElements) => {
|
|
5312
5570
|
const tab = duplicatedElements.find((element) => element.originalElementId === tabId);
|
|
5313
5571
|
const tabContent = duplicatedElements.find((element) => element.originalElementId === tabContentId);
|
|
5314
5572
|
if (tabContent && tab) {
|
|
5315
|
-
(0,
|
|
5573
|
+
(0, import_editor_elements18.updateElementSettings)({
|
|
5316
5574
|
withHistory: false,
|
|
5317
5575
|
id: tab.id,
|
|
5318
5576
|
props: {
|
|
5319
5577
|
"tab-content-id": import_editor_props16.stringPropTypeUtil.create(tabContent.id)
|
|
5320
5578
|
}
|
|
5321
5579
|
});
|
|
5322
|
-
(0,
|
|
5580
|
+
(0, import_editor_elements18.updateElementSettings)({
|
|
5323
5581
|
withHistory: false,
|
|
5324
5582
|
id: tabContent.id,
|
|
5325
5583
|
props: {
|
|
@@ -5337,12 +5595,12 @@ var moveItem = ({
|
|
|
5337
5595
|
tabContentAreaId,
|
|
5338
5596
|
movedElementId
|
|
5339
5597
|
}) => {
|
|
5340
|
-
const { value: tabContentId } = (0,
|
|
5598
|
+
const { value: tabContentId } = (0, import_editor_elements18.getElementSetting)(movedElementId, "tab-content-id") ?? {};
|
|
5341
5599
|
if (!tabContentId) {
|
|
5342
5600
|
throw new Error("Required tab elements not found for reordering");
|
|
5343
5601
|
}
|
|
5344
|
-
(0,
|
|
5345
|
-
title: (0,
|
|
5602
|
+
(0, import_editor_elements18.moveElements)({
|
|
5603
|
+
title: (0, import_i18n65.__)("Reorder Tabs", "elementor"),
|
|
5346
5604
|
moves: [
|
|
5347
5605
|
{
|
|
5348
5606
|
elementId: movedElementId,
|
|
@@ -5358,11 +5616,11 @@ var moveItem = ({
|
|
|
5358
5616
|
});
|
|
5359
5617
|
};
|
|
5360
5618
|
var removeItem = ({ items: items3 }) => {
|
|
5361
|
-
(0,
|
|
5362
|
-
title: (0,
|
|
5619
|
+
(0, import_editor_elements18.removeElements)({
|
|
5620
|
+
title: (0, import_i18n65.__)("Tabs", "elementor"),
|
|
5363
5621
|
elementIds: items3.flatMap(({ item }) => {
|
|
5364
5622
|
const tabId = item.id;
|
|
5365
|
-
const { value: tabContentId } = (0,
|
|
5623
|
+
const { value: tabContentId } = (0, import_editor_elements18.getElementSetting)(tabId, "tab-content-id") ?? {};
|
|
5366
5624
|
if (!tabContentId) {
|
|
5367
5625
|
throw new Error("Content ID is required");
|
|
5368
5626
|
}
|
|
@@ -5376,10 +5634,10 @@ var addItem = ({
|
|
|
5376
5634
|
items: items3
|
|
5377
5635
|
}) => {
|
|
5378
5636
|
items3.forEach(({ item, index }) => {
|
|
5379
|
-
const newTabContentId = (0,
|
|
5380
|
-
const newTabId = (0,
|
|
5381
|
-
(0,
|
|
5382
|
-
title: (0,
|
|
5637
|
+
const newTabContentId = (0, import_editor_elements18.generateElementId)();
|
|
5638
|
+
const newTabId = (0, import_editor_elements18.generateElementId)();
|
|
5639
|
+
(0, import_editor_elements18.createElements)({
|
|
5640
|
+
title: (0, import_i18n65.__)("Tabs", "elementor"),
|
|
5383
5641
|
elements: [
|
|
5384
5642
|
{
|
|
5385
5643
|
containerId: tabContentAreaId,
|
|
@@ -5414,14 +5672,14 @@ var TAB_MENU_ELEMENT_TYPE = "e-tabs-menu";
|
|
|
5414
5672
|
var TAB_CONTENT_AREA_ELEMENT_TYPE = "e-tabs-content-area";
|
|
5415
5673
|
var TabsControl = ({ label }) => {
|
|
5416
5674
|
const { element } = useElement();
|
|
5417
|
-
const { [TAB_ELEMENT_TYPE]: tabLinks } = (0,
|
|
5675
|
+
const { [TAB_ELEMENT_TYPE]: tabLinks } = (0, import_editor_elements19.useElementChildren)(element.id, [
|
|
5418
5676
|
TAB_ELEMENT_TYPE,
|
|
5419
5677
|
TAB_CONTENT_ELEMENT_TYPE
|
|
5420
5678
|
]);
|
|
5421
5679
|
const tabList = getElementByType(element.id, TAB_MENU_ELEMENT_TYPE);
|
|
5422
5680
|
const tabContentArea = getElementByType(element.id, TAB_CONTENT_AREA_ELEMENT_TYPE);
|
|
5423
5681
|
const repeaterValues = tabLinks.map((tabLink) => {
|
|
5424
|
-
const { title: titleSetting } = (0,
|
|
5682
|
+
const { title: titleSetting } = (0, import_editor_elements19.getElementEditorSettings)(tabLink.id) ?? {};
|
|
5425
5683
|
return {
|
|
5426
5684
|
id: tabLink.id,
|
|
5427
5685
|
title: titleSetting
|
|
@@ -5450,7 +5708,7 @@ var TabsControl = ({ label }) => {
|
|
|
5450
5708
|
});
|
|
5451
5709
|
}
|
|
5452
5710
|
};
|
|
5453
|
-
return /* @__PURE__ */
|
|
5711
|
+
return /* @__PURE__ */ React95.createElement(
|
|
5454
5712
|
import_editor_controls54.Repeater,
|
|
5455
5713
|
{
|
|
5456
5714
|
addToBottom: true,
|
|
@@ -5470,9 +5728,9 @@ var TabsControl = ({ label }) => {
|
|
|
5470
5728
|
};
|
|
5471
5729
|
var ItemLabel = ({ value }) => {
|
|
5472
5730
|
const id = value.id ?? "";
|
|
5473
|
-
const editorSettings = (0,
|
|
5731
|
+
const editorSettings = (0, import_editor_elements19.useElementEditorSettings)(id);
|
|
5474
5732
|
const elementTitle = editorSettings?.title;
|
|
5475
|
-
return /* @__PURE__ */
|
|
5733
|
+
return /* @__PURE__ */ React95.createElement(import_ui48.Stack, { sx: { minHeight: 20 }, direction: "row", alignItems: "center", gap: 1.5 }, /* @__PURE__ */ React95.createElement("span", null, elementTitle), /* @__PURE__ */ React95.createElement(SettingsField, { bind: "default-active-tab", propDisplayName: (0, import_i18n66.__)("Tabs", "elementor") }, /* @__PURE__ */ React95.createElement(ItemDefaultTab, { value })));
|
|
5476
5734
|
};
|
|
5477
5735
|
var ItemDefaultTab = ({ value }) => {
|
|
5478
5736
|
const id = value.id ?? "";
|
|
@@ -5481,19 +5739,19 @@ var ItemDefaultTab = ({ value }) => {
|
|
|
5481
5739
|
if (!isDefault) {
|
|
5482
5740
|
return null;
|
|
5483
5741
|
}
|
|
5484
|
-
return /* @__PURE__ */
|
|
5742
|
+
return /* @__PURE__ */ React95.createElement(import_ui48.Chip, { size: "tiny", shape: "rounded", label: (0, import_i18n66.__)("Default", "elementor") });
|
|
5485
5743
|
};
|
|
5486
5744
|
var ItemContent = ({ value }) => {
|
|
5487
5745
|
if (!value.id) {
|
|
5488
5746
|
return null;
|
|
5489
5747
|
}
|
|
5490
|
-
return /* @__PURE__ */
|
|
5748
|
+
return /* @__PURE__ */ React95.createElement(import_ui48.Stack, { p: 2, gap: 1.5 }, /* @__PURE__ */ React95.createElement(TabLabelControl, { elementId: value.id }), /* @__PURE__ */ React95.createElement(SettingsField, { bind: "default-active-tab", propDisplayName: (0, import_i18n66.__)("Tabs", "elementor") }, /* @__PURE__ */ React95.createElement(DefaultTabControl, { elementId: value.id })));
|
|
5491
5749
|
};
|
|
5492
5750
|
var DefaultTabControl = ({ elementId }) => {
|
|
5493
5751
|
const { value, setValue } = (0, import_editor_controls54.useBoundProp)(import_editor_props17.stringPropTypeUtil);
|
|
5494
5752
|
const isDefault = value === elementId;
|
|
5495
|
-
return /* @__PURE__ */
|
|
5496
|
-
|
|
5753
|
+
return /* @__PURE__ */ React95.createElement(import_ui48.Stack, { direction: "row", alignItems: "center", justifyContent: "space-between", gap: 2 }, /* @__PURE__ */ React95.createElement(import_editor_controls54.ControlFormLabel, null, (0, import_i18n66.__)("Set as default tab", "elementor")), /* @__PURE__ */ React95.createElement(ConditionalTooltip, { showTooltip: isDefault, placement: "right" }, /* @__PURE__ */ React95.createElement(
|
|
5754
|
+
import_ui48.Switch,
|
|
5497
5755
|
{
|
|
5498
5756
|
size: "small",
|
|
5499
5757
|
checked: isDefault,
|
|
@@ -5508,15 +5766,15 @@ var DefaultTabControl = ({ elementId }) => {
|
|
|
5508
5766
|
)));
|
|
5509
5767
|
};
|
|
5510
5768
|
var TabLabelControl = ({ elementId }) => {
|
|
5511
|
-
const editorSettings = (0,
|
|
5769
|
+
const editorSettings = (0, import_editor_elements19.useElementEditorSettings)(elementId);
|
|
5512
5770
|
const label = editorSettings?.title ?? "";
|
|
5513
|
-
return /* @__PURE__ */
|
|
5514
|
-
|
|
5771
|
+
return /* @__PURE__ */ React95.createElement(import_ui48.Stack, { gap: 1 }, /* @__PURE__ */ React95.createElement(import_editor_controls54.ControlFormLabel, null, (0, import_i18n66.__)("Tab name", "elementor")), /* @__PURE__ */ React95.createElement(
|
|
5772
|
+
import_ui48.TextField,
|
|
5515
5773
|
{
|
|
5516
5774
|
size: "tiny",
|
|
5517
5775
|
value: label,
|
|
5518
5776
|
onChange: ({ target }) => {
|
|
5519
|
-
(0,
|
|
5777
|
+
(0, import_editor_elements19.updateElementEditorSettings)({
|
|
5520
5778
|
elementId,
|
|
5521
5779
|
settings: { title: target.value }
|
|
5522
5780
|
});
|
|
@@ -5531,22 +5789,22 @@ var ConditionalTooltip = ({
|
|
|
5531
5789
|
if (!showTooltip) {
|
|
5532
5790
|
return children;
|
|
5533
5791
|
}
|
|
5534
|
-
return /* @__PURE__ */
|
|
5535
|
-
|
|
5792
|
+
return /* @__PURE__ */ React95.createElement(
|
|
5793
|
+
import_ui48.Infotip,
|
|
5536
5794
|
{
|
|
5537
5795
|
arrow: false,
|
|
5538
|
-
content: /* @__PURE__ */
|
|
5539
|
-
|
|
5796
|
+
content: /* @__PURE__ */ React95.createElement(
|
|
5797
|
+
import_ui48.Alert,
|
|
5540
5798
|
{
|
|
5541
5799
|
color: "secondary",
|
|
5542
|
-
icon: /* @__PURE__ */
|
|
5800
|
+
icon: /* @__PURE__ */ React95.createElement(import_icons27.InfoCircleFilledIcon, { fontSize: "tiny" }),
|
|
5543
5801
|
size: "small",
|
|
5544
5802
|
sx: { width: 288 }
|
|
5545
5803
|
},
|
|
5546
|
-
/* @__PURE__ */
|
|
5804
|
+
/* @__PURE__ */ React95.createElement(import_ui48.Typography, { variant: "body2" }, (0, import_i18n66.__)("To change the default tab, simply set another tab as default.", "elementor"))
|
|
5547
5805
|
)
|
|
5548
5806
|
},
|
|
5549
|
-
/* @__PURE__ */
|
|
5807
|
+
/* @__PURE__ */ React95.createElement("span", null, children)
|
|
5550
5808
|
);
|
|
5551
5809
|
};
|
|
5552
5810
|
|
|
@@ -5567,16 +5825,16 @@ var import_editor_canvas5 = require("@elementor/editor-canvas");
|
|
|
5567
5825
|
var import_editor_controls61 = require("@elementor/editor-controls");
|
|
5568
5826
|
|
|
5569
5827
|
// src/dynamics/components/background-control-dynamic-tag.tsx
|
|
5570
|
-
var
|
|
5828
|
+
var React96 = __toESM(require("react"));
|
|
5571
5829
|
var import_editor_controls56 = require("@elementor/editor-controls");
|
|
5572
5830
|
var import_editor_props19 = require("@elementor/editor-props");
|
|
5573
|
-
var
|
|
5831
|
+
var import_icons28 = require("@elementor/icons");
|
|
5574
5832
|
|
|
5575
5833
|
// src/dynamics/hooks/use-dynamic-tag.ts
|
|
5576
|
-
var
|
|
5834
|
+
var import_react42 = require("react");
|
|
5577
5835
|
|
|
5578
5836
|
// src/dynamics/hooks/use-prop-dynamic-tags.ts
|
|
5579
|
-
var
|
|
5837
|
+
var import_react41 = require("react");
|
|
5580
5838
|
var import_editor_controls55 = require("@elementor/editor-controls");
|
|
5581
5839
|
|
|
5582
5840
|
// src/dynamics/sync/get-elementor-config.ts
|
|
@@ -5628,7 +5886,7 @@ var usePropDynamicTags = () => {
|
|
|
5628
5886
|
const propDynamicType = getDynamicPropType(propType);
|
|
5629
5887
|
categories = propDynamicType?.settings.categories || [];
|
|
5630
5888
|
}
|
|
5631
|
-
return (0,
|
|
5889
|
+
return (0, import_react41.useMemo)(() => getDynamicTagsByCategories(categories), [categories.join()]);
|
|
5632
5890
|
};
|
|
5633
5891
|
var getDynamicTagsByCategories = (categories) => {
|
|
5634
5892
|
const { tags, groups } = getAtomicDynamicTags() || {};
|
|
@@ -5658,48 +5916,48 @@ var getDynamicTagsByCategories = (categories) => {
|
|
|
5658
5916
|
// src/dynamics/hooks/use-dynamic-tag.ts
|
|
5659
5917
|
var useDynamicTag = (tagName) => {
|
|
5660
5918
|
const dynamicTags = usePropDynamicTags();
|
|
5661
|
-
return (0,
|
|
5919
|
+
return (0, import_react42.useMemo)(() => dynamicTags.find((tag) => tag.name === tagName) ?? null, [dynamicTags, tagName]);
|
|
5662
5920
|
};
|
|
5663
5921
|
|
|
5664
5922
|
// src/dynamics/components/background-control-dynamic-tag.tsx
|
|
5665
|
-
var BackgroundControlDynamicTagIcon = () => /* @__PURE__ */
|
|
5923
|
+
var BackgroundControlDynamicTagIcon = () => /* @__PURE__ */ React96.createElement(import_icons28.DatabaseIcon, { fontSize: "tiny" });
|
|
5666
5924
|
var BackgroundControlDynamicTagLabel = ({ value }) => {
|
|
5667
5925
|
const context = (0, import_editor_controls56.useBoundProp)(import_editor_props19.backgroundImageOverlayPropTypeUtil);
|
|
5668
|
-
return /* @__PURE__ */
|
|
5926
|
+
return /* @__PURE__ */ React96.createElement(import_editor_controls56.PropProvider, { ...context, value: value.value }, /* @__PURE__ */ React96.createElement(import_editor_controls56.PropKeyProvider, { bind: "image" }, /* @__PURE__ */ React96.createElement(Wrapper, { rawValue: value.value })));
|
|
5669
5927
|
};
|
|
5670
5928
|
var Wrapper = ({ rawValue }) => {
|
|
5671
5929
|
const { propType } = (0, import_editor_controls56.useBoundProp)();
|
|
5672
5930
|
const imageOverlayPropType = propType.prop_types["background-image-overlay"];
|
|
5673
|
-
return /* @__PURE__ */
|
|
5931
|
+
return /* @__PURE__ */ React96.createElement(import_editor_controls56.PropProvider, { propType: imageOverlayPropType.shape.image, value: rawValue, setValue: () => void 0 }, /* @__PURE__ */ React96.createElement(import_editor_controls56.PropKeyProvider, { bind: "src" }, /* @__PURE__ */ React96.createElement(Content, { rawValue: rawValue.image })));
|
|
5674
5932
|
};
|
|
5675
5933
|
var Content = ({ rawValue }) => {
|
|
5676
5934
|
const src = rawValue.value.src;
|
|
5677
5935
|
const dynamicTag = useDynamicTag(src.value.name || "");
|
|
5678
|
-
return /* @__PURE__ */
|
|
5936
|
+
return /* @__PURE__ */ React96.createElement(React96.Fragment, null, dynamicTag?.label);
|
|
5679
5937
|
};
|
|
5680
5938
|
|
|
5681
5939
|
// src/dynamics/components/dynamic-selection-control.tsx
|
|
5682
|
-
var
|
|
5940
|
+
var React100 = __toESM(require("react"));
|
|
5683
5941
|
var import_editor_controls59 = require("@elementor/editor-controls");
|
|
5684
5942
|
var import_editor_ui8 = require("@elementor/editor-ui");
|
|
5685
|
-
var
|
|
5686
|
-
var
|
|
5687
|
-
var
|
|
5943
|
+
var import_icons30 = require("@elementor/icons");
|
|
5944
|
+
var import_ui50 = require("@elementor/ui");
|
|
5945
|
+
var import_i18n68 = require("@wordpress/i18n");
|
|
5688
5946
|
|
|
5689
5947
|
// src/hooks/use-persist-dynamic-value.ts
|
|
5690
|
-
var
|
|
5948
|
+
var import_session10 = require("@elementor/session");
|
|
5691
5949
|
var usePersistDynamicValue = (propKey) => {
|
|
5692
5950
|
const { element } = useElement();
|
|
5693
5951
|
const prefixedKey = `dynamic/non-dynamic-values-history/${element.id}/${propKey}`;
|
|
5694
|
-
return (0,
|
|
5952
|
+
return (0, import_session10.useSessionStorage)(prefixedKey);
|
|
5695
5953
|
};
|
|
5696
5954
|
|
|
5697
5955
|
// src/dynamics/dynamic-control.tsx
|
|
5698
|
-
var
|
|
5956
|
+
var React98 = __toESM(require("react"));
|
|
5699
5957
|
var import_editor_controls57 = require("@elementor/editor-controls");
|
|
5700
5958
|
|
|
5701
5959
|
// src/dynamics/components/dynamic-conditional-control.tsx
|
|
5702
|
-
var
|
|
5960
|
+
var React97 = __toESM(require("react"));
|
|
5703
5961
|
var import_editor_props20 = require("@elementor/editor-props");
|
|
5704
5962
|
var DynamicConditionalControl = ({
|
|
5705
5963
|
children,
|
|
@@ -5707,7 +5965,7 @@ var DynamicConditionalControl = ({
|
|
|
5707
5965
|
propsSchema,
|
|
5708
5966
|
dynamicSettings
|
|
5709
5967
|
}) => {
|
|
5710
|
-
const defaults =
|
|
5968
|
+
const defaults = React97.useMemo(() => {
|
|
5711
5969
|
if (!propsSchema) {
|
|
5712
5970
|
return {};
|
|
5713
5971
|
}
|
|
@@ -5717,7 +5975,7 @@ var DynamicConditionalControl = ({
|
|
|
5717
5975
|
return result;
|
|
5718
5976
|
}, {});
|
|
5719
5977
|
}, [propsSchema]);
|
|
5720
|
-
const convertedSettings =
|
|
5978
|
+
const convertedSettings = React97.useMemo(() => {
|
|
5721
5979
|
if (!dynamicSettings) {
|
|
5722
5980
|
return {};
|
|
5723
5981
|
}
|
|
@@ -5736,14 +5994,14 @@ var DynamicConditionalControl = ({
|
|
|
5736
5994
|
{}
|
|
5737
5995
|
);
|
|
5738
5996
|
}, [dynamicSettings]);
|
|
5739
|
-
const effectiveSettings =
|
|
5997
|
+
const effectiveSettings = React97.useMemo(() => {
|
|
5740
5998
|
return { ...defaults, ...convertedSettings };
|
|
5741
5999
|
}, [defaults, convertedSettings]);
|
|
5742
6000
|
if (!propType?.dependencies?.terms.length) {
|
|
5743
|
-
return /* @__PURE__ */
|
|
6001
|
+
return /* @__PURE__ */ React97.createElement(React97.Fragment, null, children);
|
|
5744
6002
|
}
|
|
5745
6003
|
const isHidden = !(0, import_editor_props20.isDependencyMet)(propType?.dependencies, effectiveSettings).isMet;
|
|
5746
|
-
return isHidden ? null : /* @__PURE__ */
|
|
6004
|
+
return isHidden ? null : /* @__PURE__ */ React97.createElement(React97.Fragment, null, children);
|
|
5747
6005
|
};
|
|
5748
6006
|
|
|
5749
6007
|
// src/dynamics/dynamic-control.tsx
|
|
@@ -5767,7 +6025,7 @@ var DynamicControl = ({ bind, children }) => {
|
|
|
5767
6025
|
});
|
|
5768
6026
|
};
|
|
5769
6027
|
const propType = createTopLevelObjectType({ schema: dynamicTag.props_schema });
|
|
5770
|
-
return /* @__PURE__ */
|
|
6028
|
+
return /* @__PURE__ */ React98.createElement(import_editor_controls57.PropProvider, { propType, setValue: setDynamicValue, value: { [bind]: dynamicValue } }, /* @__PURE__ */ React98.createElement(import_editor_controls57.PropKeyProvider, { bind }, /* @__PURE__ */ React98.createElement(
|
|
5771
6029
|
DynamicConditionalControl,
|
|
5772
6030
|
{
|
|
5773
6031
|
propType: dynamicPropType,
|
|
@@ -5779,18 +6037,18 @@ var DynamicControl = ({ bind, children }) => {
|
|
|
5779
6037
|
};
|
|
5780
6038
|
|
|
5781
6039
|
// src/dynamics/components/dynamic-selection.tsx
|
|
5782
|
-
var
|
|
5783
|
-
var
|
|
6040
|
+
var import_react43 = require("react");
|
|
6041
|
+
var React99 = __toESM(require("react"));
|
|
5784
6042
|
var import_editor_controls58 = require("@elementor/editor-controls");
|
|
5785
6043
|
var import_editor_ui7 = require("@elementor/editor-ui");
|
|
5786
|
-
var
|
|
5787
|
-
var
|
|
5788
|
-
var
|
|
6044
|
+
var import_icons29 = require("@elementor/icons");
|
|
6045
|
+
var import_ui49 = require("@elementor/ui");
|
|
6046
|
+
var import_i18n67 = require("@wordpress/i18n");
|
|
5789
6047
|
var SIZE6 = "tiny";
|
|
5790
6048
|
var DynamicSelection = ({ close: closePopover }) => {
|
|
5791
|
-
const [searchValue, setSearchValue] = (0,
|
|
6049
|
+
const [searchValue, setSearchValue] = (0, import_react43.useState)("");
|
|
5792
6050
|
const { groups: dynamicGroups } = getAtomicDynamicTags() || {};
|
|
5793
|
-
const theme = (0,
|
|
6051
|
+
const theme = (0, import_ui49.useTheme)();
|
|
5794
6052
|
const { value: anyValue } = (0, import_editor_controls58.useBoundProp)();
|
|
5795
6053
|
const { bind, value: dynamicValue, setValue } = (0, import_editor_controls58.useBoundProp)(dynamicPropTypeUtil);
|
|
5796
6054
|
const [, updatePropValueHistory] = usePersistDynamicValue(bind);
|
|
@@ -5820,21 +6078,21 @@ var DynamicSelection = ({ close: closePopover }) => {
|
|
|
5820
6078
|
label: item.label
|
|
5821
6079
|
}))
|
|
5822
6080
|
]);
|
|
5823
|
-
return /* @__PURE__ */
|
|
6081
|
+
return /* @__PURE__ */ React99.createElement(PopoverBody, { "aria-label": (0, import_i18n67.__)("Dynamic tags", "elementor") }, /* @__PURE__ */ React99.createElement(
|
|
5824
6082
|
import_editor_ui7.PopoverHeader,
|
|
5825
6083
|
{
|
|
5826
|
-
title: (0,
|
|
6084
|
+
title: (0, import_i18n67.__)("Dynamic tags", "elementor"),
|
|
5827
6085
|
onClose: closePopover,
|
|
5828
|
-
icon: /* @__PURE__ */
|
|
6086
|
+
icon: /* @__PURE__ */ React99.createElement(import_icons29.DatabaseIcon, { fontSize: SIZE6 })
|
|
5829
6087
|
}
|
|
5830
|
-
), hasNoDynamicTags ? /* @__PURE__ */
|
|
6088
|
+
), hasNoDynamicTags ? /* @__PURE__ */ React99.createElement(NoDynamicTags, null) : /* @__PURE__ */ React99.createElement(import_react43.Fragment, null, /* @__PURE__ */ React99.createElement(
|
|
5831
6089
|
import_editor_ui7.SearchField,
|
|
5832
6090
|
{
|
|
5833
6091
|
value: searchValue,
|
|
5834
6092
|
onSearch: handleSearch,
|
|
5835
|
-
placeholder: (0,
|
|
6093
|
+
placeholder: (0, import_i18n67.__)("Search dynamic tags\u2026", "elementor")
|
|
5836
6094
|
}
|
|
5837
|
-
), /* @__PURE__ */
|
|
6095
|
+
), /* @__PURE__ */ React99.createElement(import_ui49.Divider, null), /* @__PURE__ */ React99.createElement(
|
|
5838
6096
|
import_editor_ui7.PopoverMenuList,
|
|
5839
6097
|
{
|
|
5840
6098
|
items: virtualizedItems,
|
|
@@ -5842,12 +6100,12 @@ var DynamicSelection = ({ close: closePopover }) => {
|
|
|
5842
6100
|
onClose: closePopover,
|
|
5843
6101
|
selectedValue: dynamicValue?.name,
|
|
5844
6102
|
itemStyle: (item) => item.type === "item" ? { paddingInlineStart: theme.spacing(3.5) } : {},
|
|
5845
|
-
noResultsComponent: /* @__PURE__ */
|
|
6103
|
+
noResultsComponent: /* @__PURE__ */ React99.createElement(NoResults, { searchValue, onClear: () => setSearchValue("") })
|
|
5846
6104
|
}
|
|
5847
6105
|
)));
|
|
5848
6106
|
};
|
|
5849
|
-
var NoResults = ({ searchValue, onClear }) => /* @__PURE__ */
|
|
5850
|
-
|
|
6107
|
+
var NoResults = ({ searchValue, onClear }) => /* @__PURE__ */ React99.createElement(
|
|
6108
|
+
import_ui49.Stack,
|
|
5851
6109
|
{
|
|
5852
6110
|
gap: 1,
|
|
5853
6111
|
alignItems: "center",
|
|
@@ -5857,12 +6115,12 @@ var NoResults = ({ searchValue, onClear }) => /* @__PURE__ */ React96.createElem
|
|
|
5857
6115
|
color: "text.secondary",
|
|
5858
6116
|
sx: { pb: 3.5 }
|
|
5859
6117
|
},
|
|
5860
|
-
/* @__PURE__ */
|
|
5861
|
-
/* @__PURE__ */
|
|
5862
|
-
/* @__PURE__ */
|
|
6118
|
+
/* @__PURE__ */ React99.createElement(import_icons29.DatabaseIcon, { fontSize: "large" }),
|
|
6119
|
+
/* @__PURE__ */ React99.createElement(import_ui49.Typography, { align: "center", variant: "subtitle2" }, (0, import_i18n67.__)("Sorry, nothing matched", "elementor"), /* @__PURE__ */ React99.createElement("br", null), "\u201C", searchValue, "\u201D."),
|
|
6120
|
+
/* @__PURE__ */ React99.createElement(import_ui49.Typography, { align: "center", variant: "caption", sx: { display: "flex", flexDirection: "column" } }, (0, import_i18n67.__)("Try something else.", "elementor"), /* @__PURE__ */ React99.createElement(import_ui49.Link, { color: "text.secondary", variant: "caption", component: "button", onClick: onClear }, (0, import_i18n67.__)("Clear & try again", "elementor")))
|
|
5863
6121
|
);
|
|
5864
|
-
var NoDynamicTags = () => /* @__PURE__ */
|
|
5865
|
-
|
|
6122
|
+
var NoDynamicTags = () => /* @__PURE__ */ React99.createElement(React99.Fragment, null, /* @__PURE__ */ React99.createElement(import_ui49.Divider, null), /* @__PURE__ */ React99.createElement(
|
|
6123
|
+
import_ui49.Stack,
|
|
5866
6124
|
{
|
|
5867
6125
|
gap: 1,
|
|
5868
6126
|
alignItems: "center",
|
|
@@ -5872,9 +6130,9 @@ var NoDynamicTags = () => /* @__PURE__ */ React96.createElement(React96.Fragment
|
|
|
5872
6130
|
color: "text.secondary",
|
|
5873
6131
|
sx: { pb: 3.5 }
|
|
5874
6132
|
},
|
|
5875
|
-
/* @__PURE__ */
|
|
5876
|
-
/* @__PURE__ */
|
|
5877
|
-
/* @__PURE__ */
|
|
6133
|
+
/* @__PURE__ */ React99.createElement(import_icons29.DatabaseIcon, { fontSize: "large" }),
|
|
6134
|
+
/* @__PURE__ */ React99.createElement(import_ui49.Typography, { align: "center", variant: "subtitle2" }, (0, import_i18n67.__)("Streamline your workflow with dynamic tags", "elementor")),
|
|
6135
|
+
/* @__PURE__ */ React99.createElement(import_ui49.Typography, { align: "center", variant: "caption" }, (0, import_i18n67.__)("You'll need Elementor Pro to use this feature.", "elementor"))
|
|
5878
6136
|
));
|
|
5879
6137
|
var useFilteredOptions = (searchValue) => {
|
|
5880
6138
|
const dynamicTags = usePropDynamicTags();
|
|
@@ -5899,7 +6157,7 @@ var DynamicSelectionControl = () => {
|
|
|
5899
6157
|
const { setValue: setAnyValue } = (0, import_editor_controls59.useBoundProp)();
|
|
5900
6158
|
const { bind, value } = (0, import_editor_controls59.useBoundProp)(dynamicPropTypeUtil);
|
|
5901
6159
|
const [propValueFromHistory] = usePersistDynamicValue(bind);
|
|
5902
|
-
const selectionPopoverState = (0,
|
|
6160
|
+
const selectionPopoverState = (0, import_ui50.usePopupState)({ variant: "popover" });
|
|
5903
6161
|
const { name: tagName = "" } = value;
|
|
5904
6162
|
const dynamicTag = useDynamicTag(tagName);
|
|
5905
6163
|
const removeDynamicTag = () => {
|
|
@@ -5908,26 +6166,26 @@ var DynamicSelectionControl = () => {
|
|
|
5908
6166
|
if (!dynamicTag) {
|
|
5909
6167
|
throw new Error(`Dynamic tag ${tagName} not found`);
|
|
5910
6168
|
}
|
|
5911
|
-
return /* @__PURE__ */
|
|
5912
|
-
|
|
6169
|
+
return /* @__PURE__ */ React100.createElement(import_ui50.Box, null, /* @__PURE__ */ React100.createElement(
|
|
6170
|
+
import_ui50.UnstableTag,
|
|
5913
6171
|
{
|
|
5914
6172
|
fullWidth: true,
|
|
5915
6173
|
showActionsOnHover: true,
|
|
5916
6174
|
label: dynamicTag.label,
|
|
5917
|
-
startIcon: /* @__PURE__ */
|
|
5918
|
-
...(0,
|
|
5919
|
-
actions: /* @__PURE__ */
|
|
5920
|
-
|
|
6175
|
+
startIcon: /* @__PURE__ */ React100.createElement(import_icons30.DatabaseIcon, { fontSize: SIZE7 }),
|
|
6176
|
+
...(0, import_ui50.bindTrigger)(selectionPopoverState),
|
|
6177
|
+
actions: /* @__PURE__ */ React100.createElement(React100.Fragment, null, /* @__PURE__ */ React100.createElement(DynamicSettingsPopover, { dynamicTag }), /* @__PURE__ */ React100.createElement(
|
|
6178
|
+
import_ui50.IconButton,
|
|
5921
6179
|
{
|
|
5922
6180
|
size: SIZE7,
|
|
5923
6181
|
onClick: removeDynamicTag,
|
|
5924
|
-
"aria-label": (0,
|
|
6182
|
+
"aria-label": (0, import_i18n68.__)("Remove dynamic value", "elementor")
|
|
5925
6183
|
},
|
|
5926
|
-
/* @__PURE__ */
|
|
6184
|
+
/* @__PURE__ */ React100.createElement(import_icons30.XIcon, { fontSize: SIZE7 })
|
|
5927
6185
|
))
|
|
5928
6186
|
}
|
|
5929
|
-
), /* @__PURE__ */
|
|
5930
|
-
|
|
6187
|
+
), /* @__PURE__ */ React100.createElement(
|
|
6188
|
+
import_ui50.Popover,
|
|
5931
6189
|
{
|
|
5932
6190
|
disablePortal: true,
|
|
5933
6191
|
disableScrollLock: true,
|
|
@@ -5936,27 +6194,27 @@ var DynamicSelectionControl = () => {
|
|
|
5936
6194
|
PaperProps: {
|
|
5937
6195
|
sx: { my: 1 }
|
|
5938
6196
|
},
|
|
5939
|
-
...(0,
|
|
6197
|
+
...(0, import_ui50.bindPopover)(selectionPopoverState)
|
|
5940
6198
|
},
|
|
5941
|
-
/* @__PURE__ */
|
|
6199
|
+
/* @__PURE__ */ React100.createElement(PopoverBody, { "aria-label": (0, import_i18n68.__)("Dynamic tags", "elementor") }, /* @__PURE__ */ React100.createElement(DynamicSelection, { close: selectionPopoverState.close }))
|
|
5942
6200
|
));
|
|
5943
6201
|
};
|
|
5944
6202
|
var DynamicSettingsPopover = ({ dynamicTag }) => {
|
|
5945
|
-
const popupState = (0,
|
|
6203
|
+
const popupState = (0, import_ui50.usePopupState)({ variant: "popover" });
|
|
5946
6204
|
const hasDynamicSettings = !!dynamicTag.atomic_controls.length;
|
|
5947
6205
|
if (!hasDynamicSettings) {
|
|
5948
6206
|
return null;
|
|
5949
6207
|
}
|
|
5950
|
-
return /* @__PURE__ */
|
|
5951
|
-
|
|
6208
|
+
return /* @__PURE__ */ React100.createElement(React100.Fragment, null, /* @__PURE__ */ React100.createElement(
|
|
6209
|
+
import_ui50.IconButton,
|
|
5952
6210
|
{
|
|
5953
6211
|
size: SIZE7,
|
|
5954
|
-
...(0,
|
|
5955
|
-
"aria-label": (0,
|
|
6212
|
+
...(0, import_ui50.bindTrigger)(popupState),
|
|
6213
|
+
"aria-label": (0, import_i18n68.__)("Dynamic settings", "elementor")
|
|
5956
6214
|
},
|
|
5957
|
-
/* @__PURE__ */
|
|
5958
|
-
), /* @__PURE__ */
|
|
5959
|
-
|
|
6215
|
+
/* @__PURE__ */ React100.createElement(import_icons30.SettingsIcon, { fontSize: SIZE7 })
|
|
6216
|
+
), /* @__PURE__ */ React100.createElement(
|
|
6217
|
+
import_ui50.Popover,
|
|
5960
6218
|
{
|
|
5961
6219
|
disablePortal: true,
|
|
5962
6220
|
disableScrollLock: true,
|
|
@@ -5965,45 +6223,45 @@ var DynamicSettingsPopover = ({ dynamicTag }) => {
|
|
|
5965
6223
|
PaperProps: {
|
|
5966
6224
|
sx: { my: 1 }
|
|
5967
6225
|
},
|
|
5968
|
-
...(0,
|
|
6226
|
+
...(0, import_ui50.bindPopover)(popupState)
|
|
5969
6227
|
},
|
|
5970
|
-
/* @__PURE__ */
|
|
6228
|
+
/* @__PURE__ */ React100.createElement(PopoverBody, { "aria-label": (0, import_i18n68.__)("Dynamic settings", "elementor") }, /* @__PURE__ */ React100.createElement(
|
|
5971
6229
|
import_editor_ui8.PopoverHeader,
|
|
5972
6230
|
{
|
|
5973
6231
|
title: dynamicTag.label,
|
|
5974
6232
|
onClose: popupState.close,
|
|
5975
|
-
icon: /* @__PURE__ */
|
|
6233
|
+
icon: /* @__PURE__ */ React100.createElement(import_icons30.DatabaseIcon, { fontSize: SIZE7 })
|
|
5976
6234
|
}
|
|
5977
|
-
), /* @__PURE__ */
|
|
6235
|
+
), /* @__PURE__ */ React100.createElement(DynamicSettings, { controls: dynamicTag.atomic_controls, tagName: dynamicTag.name }))
|
|
5978
6236
|
));
|
|
5979
6237
|
};
|
|
5980
6238
|
var DynamicSettings = ({ controls, tagName }) => {
|
|
5981
6239
|
const tabs = controls.filter(({ type }) => type === "section");
|
|
5982
|
-
const { getTabsProps, getTabProps, getTabPanelProps } = (0,
|
|
6240
|
+
const { getTabsProps, getTabProps, getTabPanelProps } = (0, import_ui50.useTabs)(0);
|
|
5983
6241
|
if (!tabs.length) {
|
|
5984
6242
|
return null;
|
|
5985
6243
|
}
|
|
5986
6244
|
if (tagsWithoutTabs.includes(tagName)) {
|
|
5987
6245
|
const singleTab = tabs[0];
|
|
5988
|
-
return /* @__PURE__ */
|
|
6246
|
+
return /* @__PURE__ */ React100.createElement(React100.Fragment, null, /* @__PURE__ */ React100.createElement(import_ui50.Divider, null), /* @__PURE__ */ React100.createElement(ControlsItemsStack, { items: singleTab.value.items }));
|
|
5989
6247
|
}
|
|
5990
|
-
return /* @__PURE__ */
|
|
5991
|
-
|
|
6248
|
+
return /* @__PURE__ */ React100.createElement(React100.Fragment, null, tabs.length > 1 && /* @__PURE__ */ React100.createElement(import_ui50.Tabs, { size: "small", variant: "fullWidth", ...getTabsProps() }, tabs.map(({ value }, index) => /* @__PURE__ */ React100.createElement(
|
|
6249
|
+
import_ui50.Tab,
|
|
5992
6250
|
{
|
|
5993
6251
|
key: index,
|
|
5994
6252
|
label: value.label,
|
|
5995
6253
|
sx: { px: 1, py: 0.5 },
|
|
5996
6254
|
...getTabProps(index)
|
|
5997
6255
|
}
|
|
5998
|
-
))), /* @__PURE__ */
|
|
5999
|
-
return /* @__PURE__ */
|
|
6000
|
-
|
|
6256
|
+
))), /* @__PURE__ */ React100.createElement(import_ui50.Divider, null), tabs.map(({ value }, index) => {
|
|
6257
|
+
return /* @__PURE__ */ React100.createElement(
|
|
6258
|
+
import_ui50.TabPanel,
|
|
6001
6259
|
{
|
|
6002
6260
|
key: index,
|
|
6003
6261
|
sx: { flexGrow: 1, py: 0, overflowY: "auto" },
|
|
6004
6262
|
...getTabPanelProps(index)
|
|
6005
6263
|
},
|
|
6006
|
-
/* @__PURE__ */
|
|
6264
|
+
/* @__PURE__ */ React100.createElement(ControlsItemsStack, { items: value.items })
|
|
6007
6265
|
);
|
|
6008
6266
|
}));
|
|
6009
6267
|
};
|
|
@@ -6045,11 +6303,11 @@ var Control3 = ({ control }) => {
|
|
|
6045
6303
|
display: "grid",
|
|
6046
6304
|
gridTemplateColumns: isSwitchControl ? "minmax(0, 1fr) max-content" : "1fr 1fr"
|
|
6047
6305
|
} : {};
|
|
6048
|
-
return /* @__PURE__ */
|
|
6306
|
+
return /* @__PURE__ */ React100.createElement(DynamicControl, { bind: control.bind }, /* @__PURE__ */ React100.createElement(import_ui50.Grid, { container: true, gap: 0.75, sx: layoutStyleProps }, control.label ? /* @__PURE__ */ React100.createElement(import_ui50.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React100.createElement(import_editor_controls59.ControlFormLabel, null, control.label)) : null, /* @__PURE__ */ React100.createElement(import_ui50.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React100.createElement(Control, { type: control.type, props: controlProps }))));
|
|
6049
6307
|
};
|
|
6050
6308
|
function ControlsItemsStack({ items: items3 }) {
|
|
6051
|
-
return /* @__PURE__ */
|
|
6052
|
-
(item) => item.type === "control" ? /* @__PURE__ */
|
|
6309
|
+
return /* @__PURE__ */ React100.createElement(import_ui50.Stack, { p: 2, gap: 2, sx: { overflowY: "auto" } }, items3.map(
|
|
6310
|
+
(item) => item.type === "control" ? /* @__PURE__ */ React100.createElement(Control3, { key: item.value.bind, control: item.value }) : null
|
|
6053
6311
|
));
|
|
6054
6312
|
}
|
|
6055
6313
|
|
|
@@ -6103,18 +6361,18 @@ function getDynamicValue(name, settings) {
|
|
|
6103
6361
|
}
|
|
6104
6362
|
|
|
6105
6363
|
// src/dynamics/hooks/use-prop-dynamic-action.tsx
|
|
6106
|
-
var
|
|
6364
|
+
var React101 = __toESM(require("react"));
|
|
6107
6365
|
var import_editor_controls60 = require("@elementor/editor-controls");
|
|
6108
|
-
var
|
|
6109
|
-
var
|
|
6366
|
+
var import_icons31 = require("@elementor/icons");
|
|
6367
|
+
var import_i18n69 = require("@wordpress/i18n");
|
|
6110
6368
|
var usePropDynamicAction = () => {
|
|
6111
6369
|
const { propType } = (0, import_editor_controls60.useBoundProp)();
|
|
6112
6370
|
const visible = !!propType && supportsDynamic(propType);
|
|
6113
6371
|
return {
|
|
6114
6372
|
visible,
|
|
6115
|
-
icon:
|
|
6116
|
-
title: (0,
|
|
6117
|
-
content: ({ close }) => /* @__PURE__ */
|
|
6373
|
+
icon: import_icons31.DatabaseIcon,
|
|
6374
|
+
title: (0, import_i18n69.__)("Dynamic tags", "elementor"),
|
|
6375
|
+
content: ({ close }) => /* @__PURE__ */ React101.createElement(DynamicSelection, { close })
|
|
6118
6376
|
};
|
|
6119
6377
|
};
|
|
6120
6378
|
|
|
@@ -6145,8 +6403,8 @@ var init = () => {
|
|
|
6145
6403
|
|
|
6146
6404
|
// src/reset-style-props.tsx
|
|
6147
6405
|
var import_editor_controls62 = require("@elementor/editor-controls");
|
|
6148
|
-
var
|
|
6149
|
-
var
|
|
6406
|
+
var import_icons32 = require("@elementor/icons");
|
|
6407
|
+
var import_i18n70 = require("@wordpress/i18n");
|
|
6150
6408
|
var { registerAction } = controlActionsMenu;
|
|
6151
6409
|
var REPEATERS_SUPPORTED_FOR_RESET = ["background"];
|
|
6152
6410
|
function initResetStyleProps() {
|
|
@@ -6164,8 +6422,8 @@ function useResetStyleValueProps() {
|
|
|
6164
6422
|
const shouldShowResetForRepeater = !isRequired && (!isInRepeater || isRepeaterTypeSupported);
|
|
6165
6423
|
return {
|
|
6166
6424
|
visible: isStyle && value !== null && value !== void 0 && shouldShowResetForRepeater,
|
|
6167
|
-
title: (0,
|
|
6168
|
-
icon:
|
|
6425
|
+
title: (0, import_i18n70.__)("Clear", "elementor"),
|
|
6426
|
+
icon: import_icons32.BrushBigIcon,
|
|
6169
6427
|
onClick: () => resetValue()
|
|
6170
6428
|
};
|
|
6171
6429
|
}
|
|
@@ -6188,25 +6446,25 @@ var excludePropTypeTransformers = /* @__PURE__ */ new Set([
|
|
|
6188
6446
|
]);
|
|
6189
6447
|
|
|
6190
6448
|
// src/styles-inheritance/transformers/array-transformer.tsx
|
|
6191
|
-
var
|
|
6449
|
+
var React102 = __toESM(require("react"));
|
|
6192
6450
|
var import_editor_canvas6 = require("@elementor/editor-canvas");
|
|
6193
|
-
var
|
|
6451
|
+
var import_ui51 = require("@elementor/ui");
|
|
6194
6452
|
var arrayTransformer = (0, import_editor_canvas6.createTransformer)((values) => {
|
|
6195
6453
|
if (!values || values.length === 0) {
|
|
6196
6454
|
return null;
|
|
6197
6455
|
}
|
|
6198
|
-
return /* @__PURE__ */
|
|
6456
|
+
return /* @__PURE__ */ React102.createElement(import_ui51.Stack, { direction: "column" }, values.map((item, index) => /* @__PURE__ */ React102.createElement(import_ui51.Stack, { key: index }, item)));
|
|
6199
6457
|
});
|
|
6200
6458
|
|
|
6201
6459
|
// src/styles-inheritance/transformers/background-color-overlay-transformer.tsx
|
|
6202
|
-
var
|
|
6460
|
+
var React103 = __toESM(require("react"));
|
|
6203
6461
|
var import_editor_canvas7 = require("@elementor/editor-canvas");
|
|
6204
|
-
var
|
|
6205
|
-
var backgroundColorOverlayTransformer = (0, import_editor_canvas7.createTransformer)((value) => /* @__PURE__ */
|
|
6462
|
+
var import_ui52 = require("@elementor/ui");
|
|
6463
|
+
var backgroundColorOverlayTransformer = (0, import_editor_canvas7.createTransformer)((value) => /* @__PURE__ */ React103.createElement(import_ui52.Stack, { direction: "row", gap: 1, alignItems: "center" }, /* @__PURE__ */ React103.createElement(ItemLabelColor, { value })));
|
|
6206
6464
|
var ItemLabelColor = ({ value: { color } }) => {
|
|
6207
|
-
return /* @__PURE__ */
|
|
6465
|
+
return /* @__PURE__ */ React103.createElement("span", null, color);
|
|
6208
6466
|
};
|
|
6209
|
-
var StyledUnstableColorIndicator = (0,
|
|
6467
|
+
var StyledUnstableColorIndicator = (0, import_ui52.styled)(import_ui52.UnstableColorIndicator)(({ theme }) => ({
|
|
6210
6468
|
width: "1em",
|
|
6211
6469
|
height: "1em",
|
|
6212
6470
|
borderRadius: `${theme.shape.borderRadius / 2}px`,
|
|
@@ -6215,20 +6473,20 @@ var StyledUnstableColorIndicator = (0, import_ui51.styled)(import_ui51.UnstableC
|
|
|
6215
6473
|
}));
|
|
6216
6474
|
|
|
6217
6475
|
// src/styles-inheritance/transformers/background-gradient-overlay-transformer.tsx
|
|
6218
|
-
var
|
|
6476
|
+
var React104 = __toESM(require("react"));
|
|
6219
6477
|
var import_editor_canvas8 = require("@elementor/editor-canvas");
|
|
6220
|
-
var
|
|
6221
|
-
var
|
|
6222
|
-
var backgroundGradientOverlayTransformer = (0, import_editor_canvas8.createTransformer)((value) => /* @__PURE__ */
|
|
6478
|
+
var import_ui53 = require("@elementor/ui");
|
|
6479
|
+
var import_i18n71 = require("@wordpress/i18n");
|
|
6480
|
+
var backgroundGradientOverlayTransformer = (0, import_editor_canvas8.createTransformer)((value) => /* @__PURE__ */ React104.createElement(import_ui53.Stack, { direction: "row", gap: 1, alignItems: "center" }, /* @__PURE__ */ React104.createElement(ItemIconGradient, { value }), /* @__PURE__ */ React104.createElement(ItemLabelGradient, { value })));
|
|
6223
6481
|
var ItemIconGradient = ({ value }) => {
|
|
6224
6482
|
const gradient = getGradientValue(value);
|
|
6225
|
-
return /* @__PURE__ */
|
|
6483
|
+
return /* @__PURE__ */ React104.createElement(StyledUnstableColorIndicator, { size: "inherit", component: "span", value: gradient });
|
|
6226
6484
|
};
|
|
6227
6485
|
var ItemLabelGradient = ({ value }) => {
|
|
6228
6486
|
if (value.type === "linear") {
|
|
6229
|
-
return /* @__PURE__ */
|
|
6487
|
+
return /* @__PURE__ */ React104.createElement("span", null, (0, import_i18n71.__)("Linear gradient", "elementor"));
|
|
6230
6488
|
}
|
|
6231
|
-
return /* @__PURE__ */
|
|
6489
|
+
return /* @__PURE__ */ React104.createElement("span", null, (0, import_i18n71.__)("Radial gradient", "elementor"));
|
|
6232
6490
|
};
|
|
6233
6491
|
var getGradientValue = (gradient) => {
|
|
6234
6492
|
const stops = gradient.stops?.map(({ color, offset }) => `${color} ${offset ?? 0}%`)?.join(",");
|
|
@@ -6239,16 +6497,16 @@ var getGradientValue = (gradient) => {
|
|
|
6239
6497
|
};
|
|
6240
6498
|
|
|
6241
6499
|
// src/styles-inheritance/transformers/background-image-overlay-transformer.tsx
|
|
6242
|
-
var
|
|
6500
|
+
var React105 = __toESM(require("react"));
|
|
6243
6501
|
var import_editor_canvas9 = require("@elementor/editor-canvas");
|
|
6244
6502
|
var import_editor_ui9 = require("@elementor/editor-ui");
|
|
6245
|
-
var
|
|
6503
|
+
var import_ui54 = require("@elementor/ui");
|
|
6246
6504
|
var import_wp_media = require("@elementor/wp-media");
|
|
6247
|
-
var backgroundImageOverlayTransformer = (0, import_editor_canvas9.createTransformer)((value) => /* @__PURE__ */
|
|
6505
|
+
var backgroundImageOverlayTransformer = (0, import_editor_canvas9.createTransformer)((value) => /* @__PURE__ */ React105.createElement(import_ui54.Stack, { direction: "row", gap: 1, alignItems: "center" }, /* @__PURE__ */ React105.createElement(ItemIconImage, { value }), /* @__PURE__ */ React105.createElement(ItemLabelImage, { value })));
|
|
6248
6506
|
var ItemIconImage = ({ value }) => {
|
|
6249
6507
|
const { imageUrl } = useImage(value);
|
|
6250
|
-
return /* @__PURE__ */
|
|
6251
|
-
|
|
6508
|
+
return /* @__PURE__ */ React105.createElement(
|
|
6509
|
+
import_ui54.CardMedia,
|
|
6252
6510
|
{
|
|
6253
6511
|
image: imageUrl,
|
|
6254
6512
|
sx: (theme) => ({
|
|
@@ -6263,7 +6521,7 @@ var ItemIconImage = ({ value }) => {
|
|
|
6263
6521
|
};
|
|
6264
6522
|
var ItemLabelImage = ({ value }) => {
|
|
6265
6523
|
const { imageTitle } = useImage(value);
|
|
6266
|
-
return /* @__PURE__ */
|
|
6524
|
+
return /* @__PURE__ */ React105.createElement(import_editor_ui9.EllipsisWithTooltip, { title: imageTitle }, /* @__PURE__ */ React105.createElement("span", null, imageTitle));
|
|
6267
6525
|
};
|
|
6268
6526
|
var useImage = (image) => {
|
|
6269
6527
|
let imageTitle, imageUrl = null;
|
|
@@ -6288,9 +6546,9 @@ var getFileExtensionFromFilename = (filename) => {
|
|
|
6288
6546
|
};
|
|
6289
6547
|
|
|
6290
6548
|
// src/styles-inheritance/transformers/box-shadow-transformer.tsx
|
|
6291
|
-
var
|
|
6549
|
+
var React106 = __toESM(require("react"));
|
|
6292
6550
|
var import_editor_canvas10 = require("@elementor/editor-canvas");
|
|
6293
|
-
var
|
|
6551
|
+
var import_ui55 = require("@elementor/ui");
|
|
6294
6552
|
var boxShadowTransformer = (0, import_editor_canvas10.createTransformer)((value) => {
|
|
6295
6553
|
if (!value) {
|
|
6296
6554
|
return null;
|
|
@@ -6299,20 +6557,20 @@ var boxShadowTransformer = (0, import_editor_canvas10.createTransformer)((value)
|
|
|
6299
6557
|
const colorValue = color || "#000000";
|
|
6300
6558
|
const sizes = [hOffset || "0px", vOffset || "0px", blur || "10px", spread || "0px"].join(" ");
|
|
6301
6559
|
const positionValue = position || "outset";
|
|
6302
|
-
return /* @__PURE__ */
|
|
6560
|
+
return /* @__PURE__ */ React106.createElement(import_ui55.Stack, { direction: "column", gap: 0.5, pb: 1 }, /* @__PURE__ */ React106.createElement("span", null, colorValue, " ", positionValue, ", ", sizes));
|
|
6303
6561
|
});
|
|
6304
6562
|
|
|
6305
6563
|
// src/styles-inheritance/transformers/color-transformer.tsx
|
|
6306
|
-
var
|
|
6564
|
+
var React107 = __toESM(require("react"));
|
|
6307
6565
|
var import_editor_canvas11 = require("@elementor/editor-canvas");
|
|
6308
|
-
var
|
|
6566
|
+
var import_ui56 = require("@elementor/ui");
|
|
6309
6567
|
function isValidCSSColor(value) {
|
|
6310
6568
|
if (!value.trim()) {
|
|
6311
6569
|
return false;
|
|
6312
6570
|
}
|
|
6313
6571
|
return CSS.supports("color", value.trim());
|
|
6314
6572
|
}
|
|
6315
|
-
var StyledColorIndicator = (0,
|
|
6573
|
+
var StyledColorIndicator = (0, import_ui56.styled)(import_ui56.UnstableColorIndicator)(({ theme }) => ({
|
|
6316
6574
|
width: "1em",
|
|
6317
6575
|
height: "1em",
|
|
6318
6576
|
borderRadius: `${theme.shape.borderRadius / 2}px`,
|
|
@@ -6323,13 +6581,13 @@ var colorTransformer = (0, import_editor_canvas11.createTransformer)((value) =>
|
|
|
6323
6581
|
if (!isValidCSSColor(value)) {
|
|
6324
6582
|
return value;
|
|
6325
6583
|
}
|
|
6326
|
-
return /* @__PURE__ */
|
|
6584
|
+
return /* @__PURE__ */ React107.createElement(import_ui56.Stack, { direction: "row", gap: 1, alignItems: "center" }, /* @__PURE__ */ React107.createElement(StyledColorIndicator, { size: "inherit", component: "span", value }), /* @__PURE__ */ React107.createElement("span", null, value));
|
|
6327
6585
|
});
|
|
6328
6586
|
|
|
6329
6587
|
// src/styles-inheritance/transformers/repeater-to-items-transformer.tsx
|
|
6330
|
-
var
|
|
6588
|
+
var React108 = __toESM(require("react"));
|
|
6331
6589
|
var import_editor_canvas12 = require("@elementor/editor-canvas");
|
|
6332
|
-
var
|
|
6590
|
+
var import_ui57 = require("@elementor/ui");
|
|
6333
6591
|
var createRepeaterToItemsTransformer = (originalTransformer, separator = " ") => {
|
|
6334
6592
|
return (0, import_editor_canvas12.createTransformer)((value, options12) => {
|
|
6335
6593
|
const stringResult = originalTransformer(value, options12);
|
|
@@ -6340,7 +6598,7 @@ var createRepeaterToItemsTransformer = (originalTransformer, separator = " ") =>
|
|
|
6340
6598
|
if (parts.length <= 1) {
|
|
6341
6599
|
return stringResult;
|
|
6342
6600
|
}
|
|
6343
|
-
return /* @__PURE__ */
|
|
6601
|
+
return /* @__PURE__ */ React108.createElement(import_ui57.Stack, { direction: "column", gap: 0.5 }, parts.map((part, index) => /* @__PURE__ */ React108.createElement(import_ui57.Stack, { key: index }, part.trim())));
|
|
6344
6602
|
});
|
|
6345
6603
|
};
|
|
6346
6604
|
|