@elementor/editor-editing-panel 4.1.0-838 → 4.1.0-beta2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +155 -87
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +107 -38
- package/dist/index.mjs.map +1 -1
- package/package.json +21 -24
- package/src/apply-unapply-actions.ts +17 -1
- package/src/components/creatable-autocomplete/use-filter-options.ts +10 -2
- package/src/components/css-classes/css-class-selector.tsx +99 -28
- package/src/components/design-system-import/components/conflict-options.tsx +0 -67
- package/src/components/design-system-import/components/trigger-button.tsx +0 -33
- package/src/components/design-system-import/hooks/use-dialog-state.ts +0 -24
- package/src/components/design-system-import/hooks/use-import-request.ts +0 -38
- package/src/components/design-system-import/import-design-system-dialog.tsx +0 -89
- package/src/components/design-system-import/import-notifications.tsx +0 -57
- package/src/components/design-system-import/types.ts +0 -1
package/dist/index.js
CHANGED
|
@@ -227,8 +227,9 @@ var onConvert = (opts) => {
|
|
|
227
227
|
// src/components/css-classes/css-class-selector.tsx
|
|
228
228
|
var React11 = __toESM(require("react"));
|
|
229
229
|
var import_react10 = require("react");
|
|
230
|
-
var
|
|
230
|
+
var import_editor_styles_repository10 = require("@elementor/editor-styles-repository");
|
|
231
231
|
var import_editor_ui4 = require("@elementor/editor-ui");
|
|
232
|
+
var import_editor_v1_adapters2 = require("@elementor/editor-v1-adapters");
|
|
232
233
|
var import_icons2 = require("@elementor/icons");
|
|
233
234
|
var import_locations2 = require("@elementor/locations");
|
|
234
235
|
var import_ui7 = require("@elementor/ui");
|
|
@@ -431,14 +432,20 @@ function useCreateOption(params) {
|
|
|
431
432
|
|
|
432
433
|
// src/components/creatable-autocomplete/use-filter-options.ts
|
|
433
434
|
var import_ui = require("@elementor/ui");
|
|
435
|
+
var STRIP_NON_CLASS_CHARS = /[^a-zA-Z0-9_-]/g;
|
|
436
|
+
function normalizeClassSearch(value) {
|
|
437
|
+
return value.replace(STRIP_NON_CLASS_CHARS, "").toLowerCase();
|
|
438
|
+
}
|
|
434
439
|
function useFilterOptions(parameters) {
|
|
435
440
|
const { options: options13, selected, onCreate, entityName } = parameters;
|
|
436
|
-
const filter = (0, import_ui.createFilterOptions)(
|
|
441
|
+
const filter = (0, import_ui.createFilterOptions)({
|
|
442
|
+
matchFrom: "any"
|
|
443
|
+
});
|
|
437
444
|
const filterOptions = (optionList, params) => {
|
|
438
445
|
const selectedValues = selected.map((option) => option.value);
|
|
439
446
|
const filteredOptions = filter(
|
|
440
447
|
optionList.filter((option) => !selectedValues.includes(option.value)),
|
|
441
|
-
params
|
|
448
|
+
{ ...params, inputValue: normalizeClassSearch(params.inputValue) }
|
|
442
449
|
);
|
|
443
450
|
const isExisting = options13.some((option) => params.inputValue === option.label);
|
|
444
451
|
const allowCreate = Boolean(onCreate) && params.inputValue !== "" && !selectedValues.includes(params.inputValue) && !isExisting;
|
|
@@ -611,7 +618,7 @@ var StyledGroupItems = (0, import_ui2.styled)("ul")`
|
|
|
611
618
|
var React10 = __toESM(require("react"));
|
|
612
619
|
var import_react9 = require("react");
|
|
613
620
|
var import_editor_styles = require("@elementor/editor-styles");
|
|
614
|
-
var
|
|
621
|
+
var import_editor_styles_repository9 = require("@elementor/editor-styles-repository");
|
|
615
622
|
var import_editor_ui3 = require("@elementor/editor-ui");
|
|
616
623
|
var import_icons = require("@elementor/icons");
|
|
617
624
|
var import_session3 = require("@elementor/session");
|
|
@@ -635,7 +642,7 @@ function CssClassProvider({ children, ...contextValue }) {
|
|
|
635
642
|
|
|
636
643
|
// src/components/css-classes/css-class-menu.tsx
|
|
637
644
|
var React9 = __toESM(require("react"));
|
|
638
|
-
var
|
|
645
|
+
var import_editor_styles_repository8 = require("@elementor/editor-styles-repository");
|
|
639
646
|
var import_editor_ui2 = require("@elementor/editor-ui");
|
|
640
647
|
var import_ui5 = require("@elementor/ui");
|
|
641
648
|
var import_i18n4 = require("@wordpress/i18n");
|
|
@@ -659,7 +666,7 @@ var StyleIndicator = (0, import_ui3.styled)("div", {
|
|
|
659
666
|
|
|
660
667
|
// src/components/css-classes/duplicate-class-menu-item.tsx
|
|
661
668
|
var React7 = __toESM(require("react"));
|
|
662
|
-
var
|
|
669
|
+
var import_editor_styles_repository6 = require("@elementor/editor-styles-repository");
|
|
663
670
|
var import_editor_ui = require("@elementor/editor-ui");
|
|
664
671
|
var import_session2 = require("@elementor/session");
|
|
665
672
|
var import_i18n2 = require("@wordpress/i18n");
|
|
@@ -667,7 +674,7 @@ var import_i18n2 = require("@wordpress/i18n");
|
|
|
667
674
|
// src/components/css-classes/use-apply-and-unapply-class.ts
|
|
668
675
|
var import_react8 = require("react");
|
|
669
676
|
var import_editor_elements3 = require("@elementor/editor-elements");
|
|
670
|
-
var
|
|
677
|
+
var import_editor_styles_repository5 = require("@elementor/editor-styles-repository");
|
|
671
678
|
var import_editor_v1_adapters = require("@elementor/editor-v1-adapters");
|
|
672
679
|
var import_i18n = require("@wordpress/i18n");
|
|
673
680
|
|
|
@@ -675,6 +682,7 @@ var import_i18n = require("@wordpress/i18n");
|
|
|
675
682
|
var import_editor_documents = require("@elementor/editor-documents");
|
|
676
683
|
var import_editor_elements2 = require("@elementor/editor-elements");
|
|
677
684
|
var import_editor_props2 = require("@elementor/editor-props");
|
|
685
|
+
var import_editor_styles_repository4 = require("@elementor/editor-styles-repository");
|
|
678
686
|
function doGetAppliedClasses(elementId, classesPropType = "classes") {
|
|
679
687
|
return (0, import_editor_elements2.getElementSetting)(elementId, classesPropType)?.value || [];
|
|
680
688
|
}
|
|
@@ -685,6 +693,17 @@ function doApplyClasses(elementId, classIds, classesPropType = "classes") {
|
|
|
685
693
|
withHistory: false
|
|
686
694
|
});
|
|
687
695
|
(0, import_editor_documents.setDocumentModifiedStatus)(true);
|
|
696
|
+
ensureClassesAreLoaded(classIds);
|
|
697
|
+
}
|
|
698
|
+
function ensureClassesAreLoaded(classIds) {
|
|
699
|
+
const providers = import_editor_styles_repository4.stylesRepository.getProviders();
|
|
700
|
+
classIds.forEach((classId) => {
|
|
701
|
+
import_editor_styles_repository4.stylesRepository.getProviderByKey(classId)?.actions.get(classId);
|
|
702
|
+
const owningProvider = providers.find(
|
|
703
|
+
(provider) => provider.actions.all().some((style) => style.id === classId)
|
|
704
|
+
);
|
|
705
|
+
owningProvider?.actions.get(classId);
|
|
706
|
+
});
|
|
688
707
|
}
|
|
689
708
|
function doUnapplyClass(elementId, classId, classesPropType = "classes") {
|
|
690
709
|
const appliedClasses = (0, import_editor_elements2.getElementSetting)(elementId, classesPropType)?.value || [];
|
|
@@ -753,7 +772,7 @@ function useUnapplyClass() {
|
|
|
753
772
|
}
|
|
754
773
|
function useCreateAndApplyClass() {
|
|
755
774
|
const { id: activeId, setId: setActiveId } = useStyle();
|
|
756
|
-
const [provider, createAction] = (0,
|
|
775
|
+
const [provider, createAction] = (0, import_editor_styles_repository5.useGetStylesRepositoryCreateAction)() ?? [null, null];
|
|
757
776
|
const deleteAction = provider?.actions.delete;
|
|
758
777
|
const applyClass = useApply();
|
|
759
778
|
const unapplyClass = useUnapply();
|
|
@@ -859,13 +878,13 @@ function getUniqueDuplicateLabel(originalLabel, existingLabels) {
|
|
|
859
878
|
}
|
|
860
879
|
function DuplicateClassMenuItem({ closeMenu }) {
|
|
861
880
|
const { id: classId, provider } = useCssClass();
|
|
862
|
-
const { userCan } = (0,
|
|
881
|
+
const { userCan } = (0, import_editor_styles_repository6.useUserStylesCapability)();
|
|
863
882
|
const applyClass = useApplyClass();
|
|
864
883
|
const [, setPendingEditId] = (0, import_session2.useSessionStorage)(PENDING_CLASS_RENAME_SESSION_KEY, "app");
|
|
865
884
|
if (!provider || !classId) {
|
|
866
885
|
return null;
|
|
867
886
|
}
|
|
868
|
-
const providerInstance =
|
|
887
|
+
const providerInstance = import_editor_styles_repository6.stylesRepository.getProviderByKey(provider);
|
|
869
888
|
const createAction = providerInstance?.actions.create;
|
|
870
889
|
const getAction = providerInstance?.actions.get;
|
|
871
890
|
if (!createAction || !getAction) {
|
|
@@ -903,12 +922,12 @@ var import_ui4 = require("@elementor/ui");
|
|
|
903
922
|
var import_i18n3 = require("@wordpress/i18n");
|
|
904
923
|
|
|
905
924
|
// src/components/css-classes/use-can-convert-local-class-to-global.ts
|
|
906
|
-
var
|
|
925
|
+
var import_editor_styles_repository7 = require("@elementor/editor-styles-repository");
|
|
907
926
|
var useCanConvertLocalClassToGlobal = () => {
|
|
908
927
|
const { element } = useElement();
|
|
909
928
|
const { provider, id, meta } = useStyle();
|
|
910
929
|
const styleDef = provider?.actions.get(id, { elementId: element.id, ...meta });
|
|
911
|
-
const isLocalStylesProvider = provider && (0,
|
|
930
|
+
const isLocalStylesProvider = provider && (0, import_editor_styles_repository7.isElementsStylesProvider)(provider?.getKey());
|
|
912
931
|
const variants = styleDef?.variants || [];
|
|
913
932
|
const canConvert = !!(isLocalStylesProvider && variants.length);
|
|
914
933
|
return {
|
|
@@ -944,7 +963,7 @@ function usePseudoStates() {
|
|
|
944
963
|
}
|
|
945
964
|
function CssClassMenu({ popupState, anchorEl, fixed }) {
|
|
946
965
|
const { provider } = useCssClass();
|
|
947
|
-
const isLocalStyle2 = provider ? (0,
|
|
966
|
+
const isLocalStyle2 = provider ? (0, import_editor_styles_repository8.isElementsStylesProvider)(provider) : true;
|
|
948
967
|
const pseudoStates = usePseudoStates();
|
|
949
968
|
const handleKeyDown = (e) => {
|
|
950
969
|
e.stopPropagation();
|
|
@@ -1021,7 +1040,7 @@ function useElementStates() {
|
|
|
1021
1040
|
}
|
|
1022
1041
|
function useModifiedStates(styleId) {
|
|
1023
1042
|
const { meta } = useStyle();
|
|
1024
|
-
const styleDef =
|
|
1043
|
+
const styleDef = import_editor_styles_repository8.stylesRepository.all().find((style) => style.id === styleId);
|
|
1025
1044
|
return Object.fromEntries(
|
|
1026
1045
|
styleDef?.variants.filter((variant) => meta.breakpoint === variant.meta.breakpoint).map((variant) => [variant.meta.state ?? "normal", true]) ?? []
|
|
1027
1046
|
);
|
|
@@ -1034,7 +1053,7 @@ function getMenuItemsByProvider({
|
|
|
1034
1053
|
if (!provider) {
|
|
1035
1054
|
return [];
|
|
1036
1055
|
}
|
|
1037
|
-
const providerInstance =
|
|
1056
|
+
const providerInstance = import_editor_styles_repository8.stylesRepository.getProviderByKey(provider);
|
|
1038
1057
|
const providerActions = providerInstance?.actions;
|
|
1039
1058
|
const canUpdate = providerActions?.update;
|
|
1040
1059
|
const canDuplicate = providerActions?.create && providerActions?.get;
|
|
@@ -1063,7 +1082,7 @@ function StateMenuItem({ state, label, closeMenu, ...props }) {
|
|
|
1063
1082
|
const { id: styleId, provider } = useCssClass();
|
|
1064
1083
|
const { id: activeId, setId: setActiveId, setMetaState: setActiveMetaState, meta } = useStyle();
|
|
1065
1084
|
const { state: activeState } = meta;
|
|
1066
|
-
const { userCan } = (0,
|
|
1085
|
+
const { userCan } = (0, import_editor_styles_repository8.useUserStylesCapability)();
|
|
1067
1086
|
const modifiedStates = useModifiedStates(styleId);
|
|
1068
1087
|
const isUpdateAllowed = !state || userCan(provider ?? "").updateProps;
|
|
1069
1088
|
const isStyled = modifiedStates[state ?? "normal"] ?? false;
|
|
@@ -1128,7 +1147,7 @@ function UnapplyClassMenuItem({ closeMenu, ...props }) {
|
|
|
1128
1147
|
}
|
|
1129
1148
|
function RenameClassMenuItem({ closeMenu }) {
|
|
1130
1149
|
const { handleRename, provider } = useCssClass();
|
|
1131
|
-
const { userCan } = (0,
|
|
1150
|
+
const { userCan } = (0, import_editor_styles_repository8.useUserStylesCapability)();
|
|
1132
1151
|
if (!provider) {
|
|
1133
1152
|
return null;
|
|
1134
1153
|
}
|
|
@@ -1166,7 +1185,7 @@ function CssClassItem(props) {
|
|
|
1166
1185
|
const popupState = (0, import_ui6.usePopupState)({ variant: "popover" });
|
|
1167
1186
|
const [chipRef, setChipRef] = (0, import_react9.useState)(null);
|
|
1168
1187
|
const { onDelete, ...chipGroupProps } = chipProps;
|
|
1169
|
-
const { userCan } = (0,
|
|
1188
|
+
const { userCan } = (0, import_editor_styles_repository9.useUserStylesCapability)();
|
|
1170
1189
|
const [convertedFromLocalId, , clearConvertedFromLocalId] = (0, import_session3.useSessionStorage)(
|
|
1171
1190
|
PENDING_CLASS_RENAME_SESSION_KEY,
|
|
1172
1191
|
"app"
|
|
@@ -1184,7 +1203,7 @@ function CssClassItem(props) {
|
|
|
1184
1203
|
onError: setError
|
|
1185
1204
|
});
|
|
1186
1205
|
const color = error ? "error" : colorProp;
|
|
1187
|
-
const providerActions = provider ?
|
|
1206
|
+
const providerActions = provider ? import_editor_styles_repository9.stylesRepository.getProviderByKey(provider)?.actions : null;
|
|
1188
1207
|
const allowRename = Boolean(providerActions?.update) && userCan(provider ?? "")?.update;
|
|
1189
1208
|
const isShowingState = isActive && meta.state;
|
|
1190
1209
|
const stateLabel = (0, import_react9.useMemo)(() => {
|
|
@@ -1263,7 +1282,7 @@ function CssClassItem(props) {
|
|
|
1263
1282
|
), /* @__PURE__ */ React10.createElement(CssClassProvider, { ...classProps, handleRename: openEditMode }, /* @__PURE__ */ React10.createElement(CssClassMenu, { popupState, anchorEl: chipRef, fixed })));
|
|
1264
1283
|
}
|
|
1265
1284
|
var validateLabel = (newLabel) => {
|
|
1266
|
-
const result = (0,
|
|
1285
|
+
const result = (0, import_editor_styles_repository9.validateStyleLabel)(newLabel, "rename");
|
|
1267
1286
|
if (result.isValid) {
|
|
1268
1287
|
return null;
|
|
1269
1288
|
}
|
|
@@ -1273,6 +1292,19 @@ var validateLabel = (newLabel) => {
|
|
|
1273
1292
|
// src/components/css-classes/css-class-selector.tsx
|
|
1274
1293
|
var ID = "elementor-css-class-selector";
|
|
1275
1294
|
var TAGS_LIMIT = 50;
|
|
1295
|
+
var EVENT_OPEN_GLOBAL_CLASSES_MANAGER = "elementor/open-global-classes-manager";
|
|
1296
|
+
var EVENT_TOGGLE_DESIGN_SYSTEM = "elementor/toggle-design-system";
|
|
1297
|
+
function openClassManagerPanel() {
|
|
1298
|
+
if ((0, import_editor_v1_adapters2.isExperimentActive)("e_editor_design_system_panel")) {
|
|
1299
|
+
window.dispatchEvent(
|
|
1300
|
+
new CustomEvent(EVENT_TOGGLE_DESIGN_SYSTEM, {
|
|
1301
|
+
detail: { tab: "classes" }
|
|
1302
|
+
})
|
|
1303
|
+
);
|
|
1304
|
+
return;
|
|
1305
|
+
}
|
|
1306
|
+
window.dispatchEvent(new CustomEvent(EVENT_OPEN_GLOBAL_CLASSES_MANAGER));
|
|
1307
|
+
}
|
|
1276
1308
|
var EMPTY_OPTION = {
|
|
1277
1309
|
label: (0, import_i18n6.__)("local", "elementor"),
|
|
1278
1310
|
value: null,
|
|
@@ -1288,11 +1320,11 @@ function CssClassSelector() {
|
|
|
1288
1320
|
const autocompleteRef = (0, import_react10.useRef)(null);
|
|
1289
1321
|
const [renameError, setRenameError] = (0, import_react10.useState)(null);
|
|
1290
1322
|
const handleSelect = useHandleSelect();
|
|
1291
|
-
const { create, validate, entityName } = useCreateAction();
|
|
1323
|
+
const { create, validate, entityName, isAtLimit, limitCount } = useCreateAction();
|
|
1292
1324
|
const appliedOptions = useAppliedOptions(options13);
|
|
1293
1325
|
const active = appliedOptions.find((option) => option.value === activeId) ?? EMPTY_OPTION;
|
|
1294
1326
|
const showPlaceholder = appliedOptions.every(({ fixed }) => fixed);
|
|
1295
|
-
const { userCan } = (0,
|
|
1327
|
+
const { userCan } = (0, import_editor_styles_repository10.useUserStylesCapability)();
|
|
1296
1328
|
const canEdit = active.provider ? userCan(active.provider).updateProps : true;
|
|
1297
1329
|
return /* @__PURE__ */ React11.createElement(import_ui7.Stack, { p: 2 }, /* @__PURE__ */ React11.createElement(import_ui7.Stack, { direction: "row", gap: 1, alignItems: "center", justifyContent: "space-between" }, /* @__PURE__ */ React11.createElement(import_ui7.FormLabel, { htmlFor: ID, size: "small" }, (0, import_i18n6.__)("Classes", "elementor")), /* @__PURE__ */ React11.createElement(import_ui7.Stack, { direction: "row", gap: 1 }, /* @__PURE__ */ React11.createElement(ClassSelectorActionsSlot, null))), /* @__PURE__ */ React11.createElement(
|
|
1298
1330
|
import_editor_ui4.WarningInfotip,
|
|
@@ -1317,7 +1349,7 @@ function CssClassSelector() {
|
|
|
1317
1349
|
onCreate: create ?? void 0,
|
|
1318
1350
|
validate: validate ?? void 0,
|
|
1319
1351
|
limitTags: TAGS_LIMIT,
|
|
1320
|
-
renderEmptyState: EmptyState,
|
|
1352
|
+
renderEmptyState: isAtLimit && typeof limitCount === "number" ? (props) => /* @__PURE__ */ React11.createElement(LimitReachedEmptyState, { limitCount, onClear: props.onClear }) : EmptyState,
|
|
1321
1353
|
getLimitTagsText: (more) => /* @__PURE__ */ React11.createElement(import_ui7.Chip, { size: "tiny", variant: "standard", label: `+${more}`, clickable: true }),
|
|
1322
1354
|
renderTags: (values, getTagProps) => values.map((value, index) => {
|
|
1323
1355
|
const chipProps = getTagProps({ index });
|
|
@@ -1356,7 +1388,7 @@ function CssClassSelector() {
|
|
|
1356
1388
|
)
|
|
1357
1389
|
), !canEdit && /* @__PURE__ */ React11.createElement(import_editor_ui4.InfoAlert, { sx: { mt: 1 } }, (0, import_i18n6.__)("With your current role, you can use existing classes but can\u2019t modify them.", "elementor")));
|
|
1358
1390
|
}
|
|
1359
|
-
var
|
|
1391
|
+
var EmptyStateLayout = ({ searchValue, onClear, children }) => /* @__PURE__ */ React11.createElement(import_ui7.Box, { sx: { py: 4 } }, /* @__PURE__ */ React11.createElement(
|
|
1360
1392
|
import_ui7.Stack,
|
|
1361
1393
|
{
|
|
1362
1394
|
gap: 1,
|
|
@@ -1367,14 +1399,59 @@ var EmptyState = ({ searchValue, onClear }) => /* @__PURE__ */ React11.createEle
|
|
|
1367
1399
|
},
|
|
1368
1400
|
/* @__PURE__ */ React11.createElement(import_icons2.ColorSwatchIcon, { sx: { transform: "rotate(90deg)" }, fontSize: "large" }),
|
|
1369
1401
|
/* @__PURE__ */ React11.createElement(import_ui7.Typography, { align: "center", variant: "subtitle2" }, (0, import_i18n6.__)("Sorry, nothing matched", "elementor"), /* @__PURE__ */ React11.createElement("br", null), "\u201C", searchValue, "\u201D."),
|
|
1370
|
-
|
|
1402
|
+
children,
|
|
1371
1403
|
/* @__PURE__ */ React11.createElement(import_ui7.Link, { color: "text.secondary", variant: "caption", component: "button", onClick: onClear }, (0, import_i18n6.__)("Clear & try again", "elementor"))
|
|
1372
1404
|
));
|
|
1405
|
+
var EmptyState = (props) => /* @__PURE__ */ React11.createElement(EmptyStateLayout, { ...props }, /* @__PURE__ */ React11.createElement(import_ui7.Typography, { align: "center", variant: "caption", sx: { mb: 2 } }, (0, import_i18n6.__)("With your current role,", "elementor"), /* @__PURE__ */ React11.createElement("br", null), (0, import_i18n6.__)("you can only use existing classes.", "elementor")));
|
|
1406
|
+
var LimitReachedEmptyState = ({
|
|
1407
|
+
limitCount,
|
|
1408
|
+
onClear
|
|
1409
|
+
}) => /* @__PURE__ */ React11.createElement(import_ui7.Box, { sx: { py: 4 } }, /* @__PURE__ */ React11.createElement(
|
|
1410
|
+
import_ui7.Stack,
|
|
1411
|
+
{
|
|
1412
|
+
gap: 1,
|
|
1413
|
+
alignItems: "center",
|
|
1414
|
+
color: "text.secondary",
|
|
1415
|
+
justifyContent: "center",
|
|
1416
|
+
sx: { px: 1, m: "auto", maxWidth: "260px" }
|
|
1417
|
+
},
|
|
1418
|
+
/* @__PURE__ */ React11.createElement(import_icons2.ColorSwatchIcon, { sx: { transform: "rotate(90deg)" }, fontSize: "large" }),
|
|
1419
|
+
/* @__PURE__ */ React11.createElement(
|
|
1420
|
+
import_ui7.Typography,
|
|
1421
|
+
{ align: "center", variant: "subtitle2" },
|
|
1422
|
+
/* translators: %s is the maximum number of classes */
|
|
1423
|
+
(0, import_i18n6.__)("Limit of %s classes reached", "elementor").replace("%s", String(limitCount))
|
|
1424
|
+
),
|
|
1425
|
+
/* @__PURE__ */ React11.createElement(import_ui7.Typography, { align: "center", variant: "caption", component: "div" }, (0, import_i18n6.__)("Remove a class to create a new one.", "elementor"), " ", /* @__PURE__ */ React11.createElement(
|
|
1426
|
+
import_ui7.Link,
|
|
1427
|
+
{
|
|
1428
|
+
color: "inherit",
|
|
1429
|
+
variant: "caption",
|
|
1430
|
+
component: "button",
|
|
1431
|
+
onClick: onClear,
|
|
1432
|
+
sx: { verticalAlign: "baseline" }
|
|
1433
|
+
},
|
|
1434
|
+
(0, import_i18n6.__)("Clear", "elementor")
|
|
1435
|
+
)),
|
|
1436
|
+
/* @__PURE__ */ React11.createElement(
|
|
1437
|
+
import_ui7.Button,
|
|
1438
|
+
{
|
|
1439
|
+
variant: "outlined",
|
|
1440
|
+
color: "secondary",
|
|
1441
|
+
size: "small",
|
|
1442
|
+
onClick: () => {
|
|
1443
|
+
openClassManagerPanel();
|
|
1444
|
+
onClear();
|
|
1445
|
+
}
|
|
1446
|
+
},
|
|
1447
|
+
(0, import_i18n6.__)("Class Manager", "elementor")
|
|
1448
|
+
)
|
|
1449
|
+
));
|
|
1373
1450
|
var updateClassByProvider = (provider, data) => {
|
|
1374
1451
|
if (!provider) {
|
|
1375
1452
|
return;
|
|
1376
1453
|
}
|
|
1377
|
-
const providerInstance =
|
|
1454
|
+
const providerInstance = import_editor_styles_repository10.stylesRepository.getProviderByKey(provider);
|
|
1378
1455
|
if (!providerInstance) {
|
|
1379
1456
|
return;
|
|
1380
1457
|
}
|
|
@@ -1383,8 +1460,8 @@ var updateClassByProvider = (provider, data) => {
|
|
|
1383
1460
|
function useOptions() {
|
|
1384
1461
|
const { element } = useElement();
|
|
1385
1462
|
const isProviderEditable = (provider) => !!provider.actions.updateProps;
|
|
1386
|
-
return (0,
|
|
1387
|
-
const isElements = (0,
|
|
1463
|
+
return (0, import_editor_styles_repository10.useProviders)().filter(isProviderEditable).flatMap((provider) => {
|
|
1464
|
+
const isElements = (0, import_editor_styles_repository10.isElementsStylesProvider)(provider.getKey());
|
|
1388
1465
|
const styleDefs = provider.actions.all({ elementId: element.id });
|
|
1389
1466
|
if (isElements && styleDefs.length === 0) {
|
|
1390
1467
|
return [EMPTY_OPTION];
|
|
@@ -1412,6 +1489,11 @@ function useCreateAction() {
|
|
|
1412
1489
|
if (!provider || !createAction) {
|
|
1413
1490
|
return {};
|
|
1414
1491
|
}
|
|
1492
|
+
const entityName = provider.labels.singular && provider.labels.plural ? provider.labels : void 0;
|
|
1493
|
+
const validate = (newClassLabel, event) => (0, import_editor_styles_repository10.validateStyleLabel)(newClassLabel, event);
|
|
1494
|
+
if (hasReachedLimit(provider)) {
|
|
1495
|
+
return { entityName, isAtLimit: true, limitCount: provider.limit, validate };
|
|
1496
|
+
}
|
|
1415
1497
|
const create = (classLabel) => {
|
|
1416
1498
|
const { createdId } = createAction({ classLabel });
|
|
1417
1499
|
trackStyles(provider.getKey() ?? "", "classCreated", {
|
|
@@ -1420,21 +1502,7 @@ function useCreateAction() {
|
|
|
1420
1502
|
classId: createdId
|
|
1421
1503
|
});
|
|
1422
1504
|
};
|
|
1423
|
-
|
|
1424
|
-
if (hasReachedLimit(provider)) {
|
|
1425
|
-
return {
|
|
1426
|
-
isValid: false,
|
|
1427
|
-
/* translators: %s is the maximum number of classes */
|
|
1428
|
-
errorMessage: (0, import_i18n6.__)(
|
|
1429
|
-
"You\u2019ve reached the limit of %s classes. Please remove an existing one to create a new class.",
|
|
1430
|
-
"elementor"
|
|
1431
|
-
).replace("%s", provider.limit.toString())
|
|
1432
|
-
};
|
|
1433
|
-
}
|
|
1434
|
-
return (0, import_editor_styles_repository9.validateStyleLabel)(newClassLabel, event);
|
|
1435
|
-
};
|
|
1436
|
-
const entityName = provider.labels.singular && provider.labels.plural ? provider.labels : void 0;
|
|
1437
|
-
return { create, validate, entityName };
|
|
1505
|
+
return { create, validate, entityName, isAtLimit: false };
|
|
1438
1506
|
}
|
|
1439
1507
|
function hasReachedLimit(provider) {
|
|
1440
1508
|
return provider.actions.all().length >= provider.limit;
|
|
@@ -1444,7 +1512,7 @@ function useAppliedOptions(options13) {
|
|
|
1444
1512
|
const appliedIds = usePanelElementSetting(currentClassesProp)?.value ?? [];
|
|
1445
1513
|
const appliedOptions = options13.filter((option) => option.value && appliedIds.includes(option.value));
|
|
1446
1514
|
const hasElementsProviderStyleApplied = appliedOptions.some(
|
|
1447
|
-
(option) => option.provider && (0,
|
|
1515
|
+
(option) => option.provider && (0, import_editor_styles_repository10.isElementsStylesProvider)(option.provider)
|
|
1448
1516
|
);
|
|
1449
1517
|
if (!hasElementsProviderStyleApplied) {
|
|
1450
1518
|
appliedOptions.unshift(EMPTY_OPTION);
|
|
@@ -1488,17 +1556,17 @@ var import_react13 = require("react");
|
|
|
1488
1556
|
var import_editor_elements5 = require("@elementor/editor-elements");
|
|
1489
1557
|
var import_editor_props3 = require("@elementor/editor-props");
|
|
1490
1558
|
var import_editor_styles3 = require("@elementor/editor-styles");
|
|
1491
|
-
var
|
|
1492
|
-
var
|
|
1559
|
+
var import_editor_styles_repository13 = require("@elementor/editor-styles-repository");
|
|
1560
|
+
var import_editor_v1_adapters4 = require("@elementor/editor-v1-adapters");
|
|
1493
1561
|
var import_utils2 = require("@elementor/utils");
|
|
1494
1562
|
|
|
1495
1563
|
// src/hooks/use-styles-fields.ts
|
|
1496
1564
|
var import_react12 = require("react");
|
|
1497
1565
|
var import_editor_elements4 = require("@elementor/editor-elements");
|
|
1498
1566
|
var import_editor_styles2 = require("@elementor/editor-styles");
|
|
1499
|
-
var import_editor_styles_repository10 = require("@elementor/editor-styles-repository");
|
|
1500
1567
|
var import_editor_styles_repository11 = require("@elementor/editor-styles-repository");
|
|
1501
|
-
var
|
|
1568
|
+
var import_editor_styles_repository12 = require("@elementor/editor-styles-repository");
|
|
1569
|
+
var import_editor_v1_adapters3 = require("@elementor/editor-v1-adapters");
|
|
1502
1570
|
var import_i18n7 = require("@wordpress/i18n");
|
|
1503
1571
|
|
|
1504
1572
|
// src/hooks/use-styles-rerender.ts
|
|
@@ -1548,8 +1616,8 @@ function useUndoableActions({
|
|
|
1548
1616
|
const classesProp = useClassesProp();
|
|
1549
1617
|
return (0, import_react12.useMemo)(() => {
|
|
1550
1618
|
const meta = { breakpoint, state };
|
|
1551
|
-
const createStyleArgs = { elementId, classesProp, meta, label:
|
|
1552
|
-
return (0,
|
|
1619
|
+
const createStyleArgs = { elementId, classesProp, meta, label: import_editor_styles_repository12.ELEMENTS_STYLES_RESERVED_LABEL };
|
|
1620
|
+
return (0, import_editor_v1_adapters3.undoable)(
|
|
1553
1621
|
{
|
|
1554
1622
|
do: (payload) => {
|
|
1555
1623
|
if ((0, import_editor_elements4.shouldCreateNewLocalStyle)(payload)) {
|
|
@@ -1632,7 +1700,7 @@ var localStyleHistoryTitles = {
|
|
|
1632
1700
|
function capitalize(str) {
|
|
1633
1701
|
return str.charAt(0).toUpperCase() + str.slice(1);
|
|
1634
1702
|
}
|
|
1635
|
-
var isLocalStyle = (provider, styleId) => !provider || !styleId || (0,
|
|
1703
|
+
var isLocalStyle = (provider, styleId) => !provider || !styleId || (0, import_editor_styles_repository11.isElementsStylesProvider)(provider.getKey());
|
|
1636
1704
|
var getTitle = ({ provider, styleId, elementId }) => {
|
|
1637
1705
|
const isLocal = isLocalStyle(provider, styleId);
|
|
1638
1706
|
if (isLocal) {
|
|
@@ -1687,8 +1755,8 @@ function useUndoableActions2({
|
|
|
1687
1755
|
const classesProp = useClassesProp();
|
|
1688
1756
|
return (0, import_react13.useMemo)(() => {
|
|
1689
1757
|
const meta = { breakpoint, state };
|
|
1690
|
-
const createStyleArgs = { elementId, classesProp, meta, label:
|
|
1691
|
-
return (0,
|
|
1758
|
+
const createStyleArgs = { elementId, classesProp, meta, label: import_editor_styles_repository13.ELEMENTS_STYLES_RESERVED_LABEL };
|
|
1759
|
+
return (0, import_editor_v1_adapters4.undoable)(
|
|
1692
1760
|
{
|
|
1693
1761
|
do: (payload) => {
|
|
1694
1762
|
if ((0, import_editor_elements5.shouldCreateNewLocalStyle)(payload)) {
|
|
@@ -1850,7 +1918,7 @@ function EditorPanelErrorFallback() {
|
|
|
1850
1918
|
var import_react38 = require("react");
|
|
1851
1919
|
var React86 = __toESM(require("react"));
|
|
1852
1920
|
var import_editor_elements12 = require("@elementor/editor-elements");
|
|
1853
|
-
var
|
|
1921
|
+
var import_editor_v1_adapters10 = require("@elementor/editor-v1-adapters");
|
|
1854
1922
|
var import_ui41 = require("@elementor/ui");
|
|
1855
1923
|
var import_i18n60 = require("@wordpress/i18n");
|
|
1856
1924
|
|
|
@@ -2146,7 +2214,7 @@ var import_react19 = require("react");
|
|
|
2146
2214
|
var import_editor_controls2 = require("@elementor/editor-controls");
|
|
2147
2215
|
var import_editor_documents2 = require("@elementor/editor-documents");
|
|
2148
2216
|
var import_editor_elements6 = require("@elementor/editor-elements");
|
|
2149
|
-
var
|
|
2217
|
+
var import_editor_v1_adapters5 = require("@elementor/editor-v1-adapters");
|
|
2150
2218
|
var import_i18n8 = require("@wordpress/i18n");
|
|
2151
2219
|
|
|
2152
2220
|
// src/utils/prop-dependency-utils.ts
|
|
@@ -2404,7 +2472,7 @@ function useUndoableUpdateElementProp({
|
|
|
2404
2472
|
propDisplayName
|
|
2405
2473
|
}) {
|
|
2406
2474
|
return (0, import_react19.useMemo)(() => {
|
|
2407
|
-
return (0,
|
|
2475
|
+
return (0, import_editor_v1_adapters5.undoable)(
|
|
2408
2476
|
{
|
|
2409
2477
|
do: (newSettings) => {
|
|
2410
2478
|
const prevPropValue = (0, import_editor_elements6.getElementSettings)(elementId, Object.keys(newSettings));
|
|
@@ -2552,7 +2620,7 @@ var import_editor_elements7 = require("@elementor/editor-elements");
|
|
|
2552
2620
|
var import_editor_props8 = require("@elementor/editor-props");
|
|
2553
2621
|
var import_editor_responsive2 = require("@elementor/editor-responsive");
|
|
2554
2622
|
var import_editor_styles5 = require("@elementor/editor-styles");
|
|
2555
|
-
var
|
|
2623
|
+
var import_editor_styles_repository14 = require("@elementor/editor-styles-repository");
|
|
2556
2624
|
|
|
2557
2625
|
// src/styles-inheritance/create-styles-inheritance.ts
|
|
2558
2626
|
var import_editor_props7 = require("@elementor/editor-props");
|
|
@@ -2826,7 +2894,7 @@ var useAppliedStyles = () => {
|
|
|
2826
2894
|
useStylesRerender();
|
|
2827
2895
|
const classesProp = usePanelElementSetting(currentClassesProp);
|
|
2828
2896
|
const appliedStyles = import_editor_props8.classesPropTypeUtil.extract(classesProp) ?? [];
|
|
2829
|
-
return
|
|
2897
|
+
return import_editor_styles_repository14.stylesRepository.all().filter((style) => [...baseStyles, ...appliedStyles].includes(style.id));
|
|
2830
2898
|
};
|
|
2831
2899
|
var useBaseStyles = () => {
|
|
2832
2900
|
const { elementType } = useElement();
|
|
@@ -3100,11 +3168,11 @@ var import_ui19 = require("@elementor/ui");
|
|
|
3100
3168
|
var import_i18n11 = require("@wordpress/i18n");
|
|
3101
3169
|
|
|
3102
3170
|
// src/hooks/use-direction.ts
|
|
3103
|
-
var
|
|
3171
|
+
var import_editor_v1_adapters6 = require("@elementor/editor-v1-adapters");
|
|
3104
3172
|
var import_ui17 = require("@elementor/ui");
|
|
3105
3173
|
function useDirection() {
|
|
3106
3174
|
const theme = (0, import_ui17.useTheme)();
|
|
3107
|
-
const isUiRtl = "rtl" === theme.direction, isSiteRtl = !!(0,
|
|
3175
|
+
const isUiRtl = "rtl" === theme.direction, isSiteRtl = !!(0, import_editor_v1_adapters6.getElementorFrontendConfig)()?.is_rtl;
|
|
3108
3176
|
return { isSiteRtl, isUiRtl };
|
|
3109
3177
|
}
|
|
3110
3178
|
|
|
@@ -3350,18 +3418,18 @@ var EffectsSection = () => {
|
|
|
3350
3418
|
var React55 = __toESM(require("react"));
|
|
3351
3419
|
var import_editor_controls30 = require("@elementor/editor-controls");
|
|
3352
3420
|
var import_editor_elements11 = require("@elementor/editor-elements");
|
|
3353
|
-
var
|
|
3421
|
+
var import_editor_v1_adapters9 = require("@elementor/editor-v1-adapters");
|
|
3354
3422
|
var import_i18n33 = require("@wordpress/i18n");
|
|
3355
3423
|
|
|
3356
3424
|
// src/hooks/use-computed-style.ts
|
|
3357
|
-
var
|
|
3425
|
+
var import_editor_v1_adapters7 = require("@elementor/editor-v1-adapters");
|
|
3358
3426
|
function useComputedStyle(elementId) {
|
|
3359
|
-
return (0,
|
|
3427
|
+
return (0, import_editor_v1_adapters7.__privateUseListenTo)(
|
|
3360
3428
|
[
|
|
3361
|
-
(0,
|
|
3362
|
-
(0,
|
|
3363
|
-
(0,
|
|
3364
|
-
(0,
|
|
3429
|
+
(0, import_editor_v1_adapters7.windowEvent)("elementor/device-mode/change"),
|
|
3430
|
+
(0, import_editor_v1_adapters7.commandEndEvent)("document/elements/reset-style"),
|
|
3431
|
+
(0, import_editor_v1_adapters7.commandEndEvent)("document/elements/settings"),
|
|
3432
|
+
(0, import_editor_v1_adapters7.commandEndEvent)("document/elements/paste-style")
|
|
3365
3433
|
],
|
|
3366
3434
|
() => {
|
|
3367
3435
|
if (!elementId) {
|
|
@@ -3651,7 +3719,7 @@ var getOptions2 = (parentStyleDirection) => {
|
|
|
3651
3719
|
var React44 = __toESM(require("react"));
|
|
3652
3720
|
var import_react24 = require("react");
|
|
3653
3721
|
var import_editor_controls19 = require("@elementor/editor-controls");
|
|
3654
|
-
var
|
|
3722
|
+
var import_editor_v1_adapters8 = require("@elementor/editor-v1-adapters");
|
|
3655
3723
|
var import_i18n22 = require("@wordpress/i18n");
|
|
3656
3724
|
var DISPLAY_LABEL = (0, import_i18n22.__)("Display", "elementor");
|
|
3657
3725
|
var displayFieldItems = [
|
|
@@ -3694,7 +3762,7 @@ var displayFieldItems = [
|
|
|
3694
3762
|
];
|
|
3695
3763
|
var DisplayField = () => {
|
|
3696
3764
|
const placeholder = useDisplayPlaceholderValue();
|
|
3697
|
-
const isGridActive = (0,
|
|
3765
|
+
const isGridActive = (0, import_editor_v1_adapters8.isExperimentActive)("e_css_grid");
|
|
3698
3766
|
const items3 = (0, import_react24.useMemo)(
|
|
3699
3767
|
() => isGridActive ? displayFieldItems : displayFieldItems.filter((item) => item.value !== "grid"),
|
|
3700
3768
|
[isGridActive]
|
|
@@ -4301,7 +4369,7 @@ var LayoutSection = () => {
|
|
|
4301
4369
|
history: { propDisplayName: DISPLAY_LABEL2 }
|
|
4302
4370
|
});
|
|
4303
4371
|
const displayPlaceholder = useDisplayPlaceholderValue();
|
|
4304
|
-
const isGridExperimentActive = (0,
|
|
4372
|
+
const isGridExperimentActive = (0, import_editor_v1_adapters9.isExperimentActive)("e_css_grid");
|
|
4305
4373
|
const isDisplayFlex = shouldDisplayFlexFields(display, displayPlaceholder);
|
|
4306
4374
|
const isDisplayGrid = "grid" === (display?.value ?? displayPlaceholder?.value);
|
|
4307
4375
|
const { element } = useElement();
|
|
@@ -4536,7 +4604,7 @@ var import_editor_ui6 = require("@elementor/editor-ui");
|
|
|
4536
4604
|
|
|
4537
4605
|
// src/styles-inheritance/components/styles-inheritance-section-indicators.tsx
|
|
4538
4606
|
var React61 = __toESM(require("react"));
|
|
4539
|
-
var
|
|
4607
|
+
var import_editor_styles_repository15 = require("@elementor/editor-styles-repository");
|
|
4540
4608
|
var import_ui36 = require("@elementor/ui");
|
|
4541
4609
|
var import_i18n39 = require("@wordpress/i18n");
|
|
4542
4610
|
var StylesInheritanceSectionIndicators = ({ fields }) => {
|
|
@@ -4558,7 +4626,7 @@ var StylesInheritanceSectionIndicators = ({ fields }) => {
|
|
|
4558
4626
|
StyleIndicator,
|
|
4559
4627
|
{
|
|
4560
4628
|
getColor: getStylesProviderThemeColor(provider.getKey()),
|
|
4561
|
-
"data-variant": (0,
|
|
4629
|
+
"data-variant": (0, import_editor_styles_repository15.isElementsStylesProvider)(provider.getKey()) ? "local" : "global",
|
|
4562
4630
|
role: "listitem",
|
|
4563
4631
|
"aria-label": hasValueLabel
|
|
4564
4632
|
}
|
|
@@ -5293,7 +5361,7 @@ var PanelTabContent = () => {
|
|
|
5293
5361
|
const { element } = useElement();
|
|
5294
5362
|
const editorDefaults = useDefaultPanelSettings();
|
|
5295
5363
|
const defaultComponentTab = editorDefaults.defaultTab;
|
|
5296
|
-
const isInteractionsActive = (0,
|
|
5364
|
+
const isInteractionsActive = (0, import_editor_v1_adapters10.isExperimentActive)("e_interactions");
|
|
5297
5365
|
const isPromotedElement = !!(0, import_editor_elements12.getWidgetsCache)()?.[element.type]?.meta?.is_pro_promotion;
|
|
5298
5366
|
const [storedTab, setCurrentTab] = useStateByElement("tab", defaultComponentTab);
|
|
5299
5367
|
const currentTab = isPromotedElement && storedTab === "settings" ? "style" : storedTab;
|
|
@@ -5338,11 +5406,11 @@ var EditingPanel = () => {
|
|
|
5338
5406
|
// src/init.ts
|
|
5339
5407
|
var import_editor = require("@elementor/editor");
|
|
5340
5408
|
var import_editor_panels3 = require("@elementor/editor-panels");
|
|
5341
|
-
var
|
|
5409
|
+
var import_editor_v1_adapters14 = require("@elementor/editor-v1-adapters");
|
|
5342
5410
|
|
|
5343
5411
|
// src/hooks/use-open-editor-panel.ts
|
|
5344
5412
|
var import_react39 = require("react");
|
|
5345
|
-
var
|
|
5413
|
+
var import_editor_v1_adapters11 = require("@elementor/editor-v1-adapters");
|
|
5346
5414
|
|
|
5347
5415
|
// src/panel.ts
|
|
5348
5416
|
var import_editor_panels2 = require("@elementor/editor-panels");
|
|
@@ -5366,7 +5434,7 @@ var isAtomicWidgetSelected = () => {
|
|
|
5366
5434
|
var useOpenEditorPanel = () => {
|
|
5367
5435
|
const { open } = usePanelActions();
|
|
5368
5436
|
(0, import_react39.useEffect)(() => {
|
|
5369
|
-
return (0,
|
|
5437
|
+
return (0, import_editor_v1_adapters11.__privateListenTo)((0, import_editor_v1_adapters11.commandStartEvent)("panel/editor/open"), () => {
|
|
5370
5438
|
if (isAtomicWidgetSelected()) {
|
|
5371
5439
|
open();
|
|
5372
5440
|
}
|
|
@@ -5815,7 +5883,7 @@ var import_react42 = require("react");
|
|
|
5815
5883
|
var import_editor_controls59 = require("@elementor/editor-controls");
|
|
5816
5884
|
|
|
5817
5885
|
// src/dynamics/sync/get-atomic-dynamic-tags.ts
|
|
5818
|
-
var
|
|
5886
|
+
var import_editor_v1_adapters12 = require("@elementor/editor-v1-adapters");
|
|
5819
5887
|
|
|
5820
5888
|
// src/hooks/use-license-config.ts
|
|
5821
5889
|
var import_react41 = require("react");
|
|
@@ -5838,7 +5906,7 @@ function useLicenseConfig() {
|
|
|
5838
5906
|
|
|
5839
5907
|
// src/dynamics/sync/get-atomic-dynamic-tags.ts
|
|
5840
5908
|
var getAtomicDynamicTags = (shouldFilterByLicense = true) => {
|
|
5841
|
-
const { atomicDynamicTags } = (0,
|
|
5909
|
+
const { atomicDynamicTags } = (0, import_editor_v1_adapters12.getElementorConfig)();
|
|
5842
5910
|
if (!atomicDynamicTags) {
|
|
5843
5911
|
return null;
|
|
5844
5912
|
}
|
|
@@ -5861,7 +5929,7 @@ var filterByLicense = (tags) => {
|
|
|
5861
5929
|
|
|
5862
5930
|
// src/dynamics/utils.ts
|
|
5863
5931
|
var import_editor_props17 = require("@elementor/editor-props");
|
|
5864
|
-
var
|
|
5932
|
+
var import_editor_v1_adapters13 = require("@elementor/editor-v1-adapters");
|
|
5865
5933
|
var import_schema = require("@elementor/schema");
|
|
5866
5934
|
var DYNAMIC_PROP_TYPE_KEY = "dynamic";
|
|
5867
5935
|
var dynamicPropTypeUtil = (0, import_editor_props17.createPropUtils)(
|
|
@@ -5873,7 +5941,7 @@ var dynamicPropTypeUtil = (0, import_editor_props17.createPropUtils)(
|
|
|
5873
5941
|
})
|
|
5874
5942
|
);
|
|
5875
5943
|
var isDynamicTagSupported = (tagName) => {
|
|
5876
|
-
return !!(0,
|
|
5944
|
+
return !!(0, import_editor_v1_adapters13.getElementorConfig)()?.atomicDynamicTags?.tags?.[tagName];
|
|
5877
5945
|
};
|
|
5878
5946
|
var isDynamicPropType = (prop) => prop.key === DYNAMIC_PROP_TYPE_KEY;
|
|
5879
5947
|
var getDynamicPropType = (propType) => {
|
|
@@ -6578,7 +6646,7 @@ function useResetStyleValueProps() {
|
|
|
6578
6646
|
var React101 = __toESM(require("react"));
|
|
6579
6647
|
var import_editor_controls67 = require("@elementor/editor-controls");
|
|
6580
6648
|
var import_editor_props21 = require("@elementor/editor-props");
|
|
6581
|
-
var
|
|
6649
|
+
var import_editor_styles_repository18 = require("@elementor/editor-styles-repository");
|
|
6582
6650
|
var import_i18n72 = require("@wordpress/i18n");
|
|
6583
6651
|
|
|
6584
6652
|
// src/styles-inheritance/components/styles-inheritance-infotip.tsx
|
|
@@ -6593,7 +6661,7 @@ var import_i18n71 = require("@wordpress/i18n");
|
|
|
6593
6661
|
var import_react46 = require("react");
|
|
6594
6662
|
var import_editor_canvas4 = require("@elementor/editor-canvas");
|
|
6595
6663
|
var import_editor_styles8 = require("@elementor/editor-styles");
|
|
6596
|
-
var
|
|
6664
|
+
var import_editor_styles_repository16 = require("@elementor/editor-styles-repository");
|
|
6597
6665
|
var import_i18n69 = require("@wordpress/i18n");
|
|
6598
6666
|
var MAXIMUM_ITEMS = 2;
|
|
6599
6667
|
var useNormalizedInheritanceChainItems = (inheritanceChain, bind, resolve) => {
|
|
@@ -6605,7 +6673,7 @@ var useNormalizedInheritanceChainItems = (inheritanceChain, bind, resolve) => {
|
|
|
6605
6673
|
);
|
|
6606
6674
|
const validItems = normalizedItems.map((item) => ({
|
|
6607
6675
|
...item,
|
|
6608
|
-
displayLabel:
|
|
6676
|
+
displayLabel: import_editor_styles_repository16.ELEMENTS_BASE_STYLES_PROVIDER_KEY !== item.provider ? item.displayLabel : (0, import_i18n69.__)("Base", "elementor")
|
|
6609
6677
|
})).filter((item) => !item.value || item.displayLabel !== "").slice(0, MAXIMUM_ITEMS);
|
|
6610
6678
|
setItems(validItems);
|
|
6611
6679
|
})();
|
|
@@ -6690,13 +6758,13 @@ var BreakpointIcon = ({ breakpoint }) => {
|
|
|
6690
6758
|
|
|
6691
6759
|
// src/styles-inheritance/components/infotip/label-chip.tsx
|
|
6692
6760
|
var React97 = __toESM(require("react"));
|
|
6693
|
-
var
|
|
6761
|
+
var import_editor_styles_repository17 = require("@elementor/editor-styles-repository");
|
|
6694
6762
|
var import_icons33 = require("@elementor/icons");
|
|
6695
6763
|
var import_ui47 = require("@elementor/ui");
|
|
6696
6764
|
var import_i18n70 = require("@wordpress/i18n");
|
|
6697
6765
|
var SIZE5 = "tiny";
|
|
6698
6766
|
var LabelChip = ({ displayLabel, provider }) => {
|
|
6699
|
-
const isBaseStyle = provider ===
|
|
6767
|
+
const isBaseStyle = provider === import_editor_styles_repository17.ELEMENTS_BASE_STYLES_PROVIDER_KEY;
|
|
6700
6768
|
const chipIcon = isBaseStyle ? /* @__PURE__ */ React97.createElement(import_ui47.Tooltip, { title: (0, import_i18n70.__)("Inherited from base styles", "elementor"), placement: "top" }, /* @__PURE__ */ React97.createElement(import_icons33.InfoCircleIcon, { fontSize: SIZE5 })) : void 0;
|
|
6701
6769
|
return /* @__PURE__ */ React97.createElement(
|
|
6702
6770
|
import_ui47.Chip,
|
|
@@ -6931,7 +6999,7 @@ var Indicator = ({ inheritanceChain, path, propType, isDisabled }) => {
|
|
|
6931
6999
|
const currentItem = currentStyleId ? getValueFromInheritanceChain(inheritanceChain, currentStyleId, currentStyleMeta) : null;
|
|
6932
7000
|
const hasValue = !(0, import_editor_props21.isEmpty)(currentItem?.value);
|
|
6933
7001
|
const [actualStyle] = inheritanceChain;
|
|
6934
|
-
if (actualStyle.provider ===
|
|
7002
|
+
if (actualStyle.provider === import_editor_styles_repository18.ELEMENTS_BASE_STYLES_PROVIDER_KEY) {
|
|
6935
7003
|
return null;
|
|
6936
7004
|
}
|
|
6937
7005
|
const isFinalValue = currentItem === actualStyle;
|
|
@@ -7200,7 +7268,7 @@ function init4() {
|
|
|
7200
7268
|
init();
|
|
7201
7269
|
}
|
|
7202
7270
|
var blockV1Panel = () => {
|
|
7203
|
-
(0,
|
|
7271
|
+
(0, import_editor_v1_adapters14.blockCommand)({
|
|
7204
7272
|
command: "panel/editor/open",
|
|
7205
7273
|
condition: isAtomicWidgetSelected
|
|
7206
7274
|
});
|