@elementor/editor-editing-panel 4.2.0-848 → 4.2.0-850
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 +51 -39
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +23 -11
- package/dist/index.mjs.map +1 -1
- package/package.json +24 -24
- package/src/apply-unapply-actions.ts +17 -1
package/dist/index.js
CHANGED
|
@@ -227,7 +227,7 @@ 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
232
|
var import_icons2 = require("@elementor/icons");
|
|
233
233
|
var import_locations2 = require("@elementor/locations");
|
|
@@ -611,7 +611,7 @@ var StyledGroupItems = (0, import_ui2.styled)("ul")`
|
|
|
611
611
|
var React10 = __toESM(require("react"));
|
|
612
612
|
var import_react9 = require("react");
|
|
613
613
|
var import_editor_styles = require("@elementor/editor-styles");
|
|
614
|
-
var
|
|
614
|
+
var import_editor_styles_repository9 = require("@elementor/editor-styles-repository");
|
|
615
615
|
var import_editor_ui3 = require("@elementor/editor-ui");
|
|
616
616
|
var import_icons = require("@elementor/icons");
|
|
617
617
|
var import_session3 = require("@elementor/session");
|
|
@@ -635,7 +635,7 @@ function CssClassProvider({ children, ...contextValue }) {
|
|
|
635
635
|
|
|
636
636
|
// src/components/css-classes/css-class-menu.tsx
|
|
637
637
|
var React9 = __toESM(require("react"));
|
|
638
|
-
var
|
|
638
|
+
var import_editor_styles_repository8 = require("@elementor/editor-styles-repository");
|
|
639
639
|
var import_editor_ui2 = require("@elementor/editor-ui");
|
|
640
640
|
var import_ui5 = require("@elementor/ui");
|
|
641
641
|
var import_i18n4 = require("@wordpress/i18n");
|
|
@@ -659,7 +659,7 @@ var StyleIndicator = (0, import_ui3.styled)("div", {
|
|
|
659
659
|
|
|
660
660
|
// src/components/css-classes/duplicate-class-menu-item.tsx
|
|
661
661
|
var React7 = __toESM(require("react"));
|
|
662
|
-
var
|
|
662
|
+
var import_editor_styles_repository6 = require("@elementor/editor-styles-repository");
|
|
663
663
|
var import_editor_ui = require("@elementor/editor-ui");
|
|
664
664
|
var import_session2 = require("@elementor/session");
|
|
665
665
|
var import_i18n2 = require("@wordpress/i18n");
|
|
@@ -667,7 +667,7 @@ var import_i18n2 = require("@wordpress/i18n");
|
|
|
667
667
|
// src/components/css-classes/use-apply-and-unapply-class.ts
|
|
668
668
|
var import_react8 = require("react");
|
|
669
669
|
var import_editor_elements3 = require("@elementor/editor-elements");
|
|
670
|
-
var
|
|
670
|
+
var import_editor_styles_repository5 = require("@elementor/editor-styles-repository");
|
|
671
671
|
var import_editor_v1_adapters = require("@elementor/editor-v1-adapters");
|
|
672
672
|
var import_i18n = require("@wordpress/i18n");
|
|
673
673
|
|
|
@@ -675,6 +675,7 @@ var import_i18n = require("@wordpress/i18n");
|
|
|
675
675
|
var import_editor_documents = require("@elementor/editor-documents");
|
|
676
676
|
var import_editor_elements2 = require("@elementor/editor-elements");
|
|
677
677
|
var import_editor_props2 = require("@elementor/editor-props");
|
|
678
|
+
var import_editor_styles_repository4 = require("@elementor/editor-styles-repository");
|
|
678
679
|
function doGetAppliedClasses(elementId, classesPropType = "classes") {
|
|
679
680
|
return (0, import_editor_elements2.getElementSetting)(elementId, classesPropType)?.value || [];
|
|
680
681
|
}
|
|
@@ -685,6 +686,17 @@ function doApplyClasses(elementId, classIds, classesPropType = "classes") {
|
|
|
685
686
|
withHistory: false
|
|
686
687
|
});
|
|
687
688
|
(0, import_editor_documents.setDocumentModifiedStatus)(true);
|
|
689
|
+
ensureClassesAreLoaded(classIds);
|
|
690
|
+
}
|
|
691
|
+
function ensureClassesAreLoaded(classIds) {
|
|
692
|
+
const providers = import_editor_styles_repository4.stylesRepository.getProviders();
|
|
693
|
+
classIds.forEach((classId) => {
|
|
694
|
+
import_editor_styles_repository4.stylesRepository.getProviderByKey(classId)?.actions.get(classId);
|
|
695
|
+
const owningProvider = providers.find(
|
|
696
|
+
(provider) => provider.actions.all().some((style) => style.id === classId)
|
|
697
|
+
);
|
|
698
|
+
owningProvider?.actions.get(classId);
|
|
699
|
+
});
|
|
688
700
|
}
|
|
689
701
|
function doUnapplyClass(elementId, classId, classesPropType = "classes") {
|
|
690
702
|
const appliedClasses = (0, import_editor_elements2.getElementSetting)(elementId, classesPropType)?.value || [];
|
|
@@ -753,7 +765,7 @@ function useUnapplyClass() {
|
|
|
753
765
|
}
|
|
754
766
|
function useCreateAndApplyClass() {
|
|
755
767
|
const { id: activeId, setId: setActiveId } = useStyle();
|
|
756
|
-
const [provider, createAction] = (0,
|
|
768
|
+
const [provider, createAction] = (0, import_editor_styles_repository5.useGetStylesRepositoryCreateAction)() ?? [null, null];
|
|
757
769
|
const deleteAction = provider?.actions.delete;
|
|
758
770
|
const applyClass = useApply();
|
|
759
771
|
const unapplyClass = useUnapply();
|
|
@@ -859,13 +871,13 @@ function getUniqueDuplicateLabel(originalLabel, existingLabels) {
|
|
|
859
871
|
}
|
|
860
872
|
function DuplicateClassMenuItem({ closeMenu }) {
|
|
861
873
|
const { id: classId, provider } = useCssClass();
|
|
862
|
-
const { userCan } = (0,
|
|
874
|
+
const { userCan } = (0, import_editor_styles_repository6.useUserStylesCapability)();
|
|
863
875
|
const applyClass = useApplyClass();
|
|
864
876
|
const [, setPendingEditId] = (0, import_session2.useSessionStorage)(PENDING_CLASS_RENAME_SESSION_KEY, "app");
|
|
865
877
|
if (!provider || !classId) {
|
|
866
878
|
return null;
|
|
867
879
|
}
|
|
868
|
-
const providerInstance =
|
|
880
|
+
const providerInstance = import_editor_styles_repository6.stylesRepository.getProviderByKey(provider);
|
|
869
881
|
const createAction = providerInstance?.actions.create;
|
|
870
882
|
const getAction = providerInstance?.actions.get;
|
|
871
883
|
if (!createAction || !getAction) {
|
|
@@ -903,12 +915,12 @@ var import_ui4 = require("@elementor/ui");
|
|
|
903
915
|
var import_i18n3 = require("@wordpress/i18n");
|
|
904
916
|
|
|
905
917
|
// src/components/css-classes/use-can-convert-local-class-to-global.ts
|
|
906
|
-
var
|
|
918
|
+
var import_editor_styles_repository7 = require("@elementor/editor-styles-repository");
|
|
907
919
|
var useCanConvertLocalClassToGlobal = () => {
|
|
908
920
|
const { element } = useElement();
|
|
909
921
|
const { provider, id, meta } = useStyle();
|
|
910
922
|
const styleDef = provider?.actions.get(id, { elementId: element.id, ...meta });
|
|
911
|
-
const isLocalStylesProvider = provider && (0,
|
|
923
|
+
const isLocalStylesProvider = provider && (0, import_editor_styles_repository7.isElementsStylesProvider)(provider?.getKey());
|
|
912
924
|
const variants = styleDef?.variants || [];
|
|
913
925
|
const canConvert = !!(isLocalStylesProvider && variants.length);
|
|
914
926
|
return {
|
|
@@ -944,7 +956,7 @@ function usePseudoStates() {
|
|
|
944
956
|
}
|
|
945
957
|
function CssClassMenu({ popupState, anchorEl, fixed }) {
|
|
946
958
|
const { provider } = useCssClass();
|
|
947
|
-
const isLocalStyle2 = provider ? (0,
|
|
959
|
+
const isLocalStyle2 = provider ? (0, import_editor_styles_repository8.isElementsStylesProvider)(provider) : true;
|
|
948
960
|
const pseudoStates = usePseudoStates();
|
|
949
961
|
const handleKeyDown = (e) => {
|
|
950
962
|
e.stopPropagation();
|
|
@@ -1021,7 +1033,7 @@ function useElementStates() {
|
|
|
1021
1033
|
}
|
|
1022
1034
|
function useModifiedStates(styleId) {
|
|
1023
1035
|
const { meta } = useStyle();
|
|
1024
|
-
const styleDef =
|
|
1036
|
+
const styleDef = import_editor_styles_repository8.stylesRepository.all().find((style) => style.id === styleId);
|
|
1025
1037
|
return Object.fromEntries(
|
|
1026
1038
|
styleDef?.variants.filter((variant) => meta.breakpoint === variant.meta.breakpoint).map((variant) => [variant.meta.state ?? "normal", true]) ?? []
|
|
1027
1039
|
);
|
|
@@ -1034,7 +1046,7 @@ function getMenuItemsByProvider({
|
|
|
1034
1046
|
if (!provider) {
|
|
1035
1047
|
return [];
|
|
1036
1048
|
}
|
|
1037
|
-
const providerInstance =
|
|
1049
|
+
const providerInstance = import_editor_styles_repository8.stylesRepository.getProviderByKey(provider);
|
|
1038
1050
|
const providerActions = providerInstance?.actions;
|
|
1039
1051
|
const canUpdate = providerActions?.update;
|
|
1040
1052
|
const canDuplicate = providerActions?.create && providerActions?.get;
|
|
@@ -1063,7 +1075,7 @@ function StateMenuItem({ state, label, closeMenu, ...props }) {
|
|
|
1063
1075
|
const { id: styleId, provider } = useCssClass();
|
|
1064
1076
|
const { id: activeId, setId: setActiveId, setMetaState: setActiveMetaState, meta } = useStyle();
|
|
1065
1077
|
const { state: activeState } = meta;
|
|
1066
|
-
const { userCan } = (0,
|
|
1078
|
+
const { userCan } = (0, import_editor_styles_repository8.useUserStylesCapability)();
|
|
1067
1079
|
const modifiedStates = useModifiedStates(styleId);
|
|
1068
1080
|
const isUpdateAllowed = !state || userCan(provider ?? "").updateProps;
|
|
1069
1081
|
const isStyled = modifiedStates[state ?? "normal"] ?? false;
|
|
@@ -1128,7 +1140,7 @@ function UnapplyClassMenuItem({ closeMenu, ...props }) {
|
|
|
1128
1140
|
}
|
|
1129
1141
|
function RenameClassMenuItem({ closeMenu }) {
|
|
1130
1142
|
const { handleRename, provider } = useCssClass();
|
|
1131
|
-
const { userCan } = (0,
|
|
1143
|
+
const { userCan } = (0, import_editor_styles_repository8.useUserStylesCapability)();
|
|
1132
1144
|
if (!provider) {
|
|
1133
1145
|
return null;
|
|
1134
1146
|
}
|
|
@@ -1166,7 +1178,7 @@ function CssClassItem(props) {
|
|
|
1166
1178
|
const popupState = (0, import_ui6.usePopupState)({ variant: "popover" });
|
|
1167
1179
|
const [chipRef, setChipRef] = (0, import_react9.useState)(null);
|
|
1168
1180
|
const { onDelete, ...chipGroupProps } = chipProps;
|
|
1169
|
-
const { userCan } = (0,
|
|
1181
|
+
const { userCan } = (0, import_editor_styles_repository9.useUserStylesCapability)();
|
|
1170
1182
|
const [convertedFromLocalId, , clearConvertedFromLocalId] = (0, import_session3.useSessionStorage)(
|
|
1171
1183
|
PENDING_CLASS_RENAME_SESSION_KEY,
|
|
1172
1184
|
"app"
|
|
@@ -1184,7 +1196,7 @@ function CssClassItem(props) {
|
|
|
1184
1196
|
onError: setError
|
|
1185
1197
|
});
|
|
1186
1198
|
const color = error ? "error" : colorProp;
|
|
1187
|
-
const providerActions = provider ?
|
|
1199
|
+
const providerActions = provider ? import_editor_styles_repository9.stylesRepository.getProviderByKey(provider)?.actions : null;
|
|
1188
1200
|
const allowRename = Boolean(providerActions?.update) && userCan(provider ?? "")?.update;
|
|
1189
1201
|
const isShowingState = isActive && meta.state;
|
|
1190
1202
|
const stateLabel = (0, import_react9.useMemo)(() => {
|
|
@@ -1263,7 +1275,7 @@ function CssClassItem(props) {
|
|
|
1263
1275
|
), /* @__PURE__ */ React10.createElement(CssClassProvider, { ...classProps, handleRename: openEditMode }, /* @__PURE__ */ React10.createElement(CssClassMenu, { popupState, anchorEl: chipRef, fixed })));
|
|
1264
1276
|
}
|
|
1265
1277
|
var validateLabel = (newLabel) => {
|
|
1266
|
-
const result = (0,
|
|
1278
|
+
const result = (0, import_editor_styles_repository9.validateStyleLabel)(newLabel, "rename");
|
|
1267
1279
|
if (result.isValid) {
|
|
1268
1280
|
return null;
|
|
1269
1281
|
}
|
|
@@ -1292,7 +1304,7 @@ function CssClassSelector() {
|
|
|
1292
1304
|
const appliedOptions = useAppliedOptions(options13);
|
|
1293
1305
|
const active = appliedOptions.find((option) => option.value === activeId) ?? EMPTY_OPTION;
|
|
1294
1306
|
const showPlaceholder = appliedOptions.every(({ fixed }) => fixed);
|
|
1295
|
-
const { userCan } = (0,
|
|
1307
|
+
const { userCan } = (0, import_editor_styles_repository10.useUserStylesCapability)();
|
|
1296
1308
|
const canEdit = active.provider ? userCan(active.provider).updateProps : true;
|
|
1297
1309
|
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
1310
|
import_editor_ui4.WarningInfotip,
|
|
@@ -1374,7 +1386,7 @@ var updateClassByProvider = (provider, data) => {
|
|
|
1374
1386
|
if (!provider) {
|
|
1375
1387
|
return;
|
|
1376
1388
|
}
|
|
1377
|
-
const providerInstance =
|
|
1389
|
+
const providerInstance = import_editor_styles_repository10.stylesRepository.getProviderByKey(provider);
|
|
1378
1390
|
if (!providerInstance) {
|
|
1379
1391
|
return;
|
|
1380
1392
|
}
|
|
@@ -1383,8 +1395,8 @@ var updateClassByProvider = (provider, data) => {
|
|
|
1383
1395
|
function useOptions() {
|
|
1384
1396
|
const { element } = useElement();
|
|
1385
1397
|
const isProviderEditable = (provider) => !!provider.actions.updateProps;
|
|
1386
|
-
return (0,
|
|
1387
|
-
const isElements = (0,
|
|
1398
|
+
return (0, import_editor_styles_repository10.useProviders)().filter(isProviderEditable).flatMap((provider) => {
|
|
1399
|
+
const isElements = (0, import_editor_styles_repository10.isElementsStylesProvider)(provider.getKey());
|
|
1388
1400
|
const styleDefs = provider.actions.all({ elementId: element.id });
|
|
1389
1401
|
if (isElements && styleDefs.length === 0) {
|
|
1390
1402
|
return [EMPTY_OPTION];
|
|
@@ -1431,7 +1443,7 @@ function useCreateAction() {
|
|
|
1431
1443
|
).replace("%s", provider.limit.toString())
|
|
1432
1444
|
};
|
|
1433
1445
|
}
|
|
1434
|
-
return (0,
|
|
1446
|
+
return (0, import_editor_styles_repository10.validateStyleLabel)(newClassLabel, event);
|
|
1435
1447
|
};
|
|
1436
1448
|
const entityName = provider.labels.singular && provider.labels.plural ? provider.labels : void 0;
|
|
1437
1449
|
return { create, validate, entityName };
|
|
@@ -1444,7 +1456,7 @@ function useAppliedOptions(options13) {
|
|
|
1444
1456
|
const appliedIds = usePanelElementSetting(currentClassesProp)?.value ?? [];
|
|
1445
1457
|
const appliedOptions = options13.filter((option) => option.value && appliedIds.includes(option.value));
|
|
1446
1458
|
const hasElementsProviderStyleApplied = appliedOptions.some(
|
|
1447
|
-
(option) => option.provider && (0,
|
|
1459
|
+
(option) => option.provider && (0, import_editor_styles_repository10.isElementsStylesProvider)(option.provider)
|
|
1448
1460
|
);
|
|
1449
1461
|
if (!hasElementsProviderStyleApplied) {
|
|
1450
1462
|
appliedOptions.unshift(EMPTY_OPTION);
|
|
@@ -1488,7 +1500,7 @@ var import_react13 = require("react");
|
|
|
1488
1500
|
var import_editor_elements5 = require("@elementor/editor-elements");
|
|
1489
1501
|
var import_editor_props3 = require("@elementor/editor-props");
|
|
1490
1502
|
var import_editor_styles3 = require("@elementor/editor-styles");
|
|
1491
|
-
var
|
|
1503
|
+
var import_editor_styles_repository13 = require("@elementor/editor-styles-repository");
|
|
1492
1504
|
var import_editor_v1_adapters3 = require("@elementor/editor-v1-adapters");
|
|
1493
1505
|
var import_utils2 = require("@elementor/utils");
|
|
1494
1506
|
|
|
@@ -1496,8 +1508,8 @@ var import_utils2 = require("@elementor/utils");
|
|
|
1496
1508
|
var import_react12 = require("react");
|
|
1497
1509
|
var import_editor_elements4 = require("@elementor/editor-elements");
|
|
1498
1510
|
var import_editor_styles2 = require("@elementor/editor-styles");
|
|
1499
|
-
var import_editor_styles_repository10 = require("@elementor/editor-styles-repository");
|
|
1500
1511
|
var import_editor_styles_repository11 = require("@elementor/editor-styles-repository");
|
|
1512
|
+
var import_editor_styles_repository12 = require("@elementor/editor-styles-repository");
|
|
1501
1513
|
var import_editor_v1_adapters2 = require("@elementor/editor-v1-adapters");
|
|
1502
1514
|
var import_i18n7 = require("@wordpress/i18n");
|
|
1503
1515
|
|
|
@@ -1548,7 +1560,7 @@ function useUndoableActions({
|
|
|
1548
1560
|
const classesProp = useClassesProp();
|
|
1549
1561
|
return (0, import_react12.useMemo)(() => {
|
|
1550
1562
|
const meta = { breakpoint, state };
|
|
1551
|
-
const createStyleArgs = { elementId, classesProp, meta, label:
|
|
1563
|
+
const createStyleArgs = { elementId, classesProp, meta, label: import_editor_styles_repository12.ELEMENTS_STYLES_RESERVED_LABEL };
|
|
1552
1564
|
return (0, import_editor_v1_adapters2.undoable)(
|
|
1553
1565
|
{
|
|
1554
1566
|
do: (payload) => {
|
|
@@ -1632,7 +1644,7 @@ var localStyleHistoryTitles = {
|
|
|
1632
1644
|
function capitalize(str) {
|
|
1633
1645
|
return str.charAt(0).toUpperCase() + str.slice(1);
|
|
1634
1646
|
}
|
|
1635
|
-
var isLocalStyle = (provider, styleId) => !provider || !styleId || (0,
|
|
1647
|
+
var isLocalStyle = (provider, styleId) => !provider || !styleId || (0, import_editor_styles_repository11.isElementsStylesProvider)(provider.getKey());
|
|
1636
1648
|
var getTitle = ({ provider, styleId, elementId }) => {
|
|
1637
1649
|
const isLocal = isLocalStyle(provider, styleId);
|
|
1638
1650
|
if (isLocal) {
|
|
@@ -1687,7 +1699,7 @@ function useUndoableActions2({
|
|
|
1687
1699
|
const classesProp = useClassesProp();
|
|
1688
1700
|
return (0, import_react13.useMemo)(() => {
|
|
1689
1701
|
const meta = { breakpoint, state };
|
|
1690
|
-
const createStyleArgs = { elementId, classesProp, meta, label:
|
|
1702
|
+
const createStyleArgs = { elementId, classesProp, meta, label: import_editor_styles_repository13.ELEMENTS_STYLES_RESERVED_LABEL };
|
|
1691
1703
|
return (0, import_editor_v1_adapters3.undoable)(
|
|
1692
1704
|
{
|
|
1693
1705
|
do: (payload) => {
|
|
@@ -2558,7 +2570,7 @@ var import_editor_elements7 = require("@elementor/editor-elements");
|
|
|
2558
2570
|
var import_editor_props8 = require("@elementor/editor-props");
|
|
2559
2571
|
var import_editor_responsive2 = require("@elementor/editor-responsive");
|
|
2560
2572
|
var import_editor_styles5 = require("@elementor/editor-styles");
|
|
2561
|
-
var
|
|
2573
|
+
var import_editor_styles_repository14 = require("@elementor/editor-styles-repository");
|
|
2562
2574
|
|
|
2563
2575
|
// src/styles-inheritance/create-styles-inheritance.ts
|
|
2564
2576
|
var import_editor_props7 = require("@elementor/editor-props");
|
|
@@ -2832,7 +2844,7 @@ var useAppliedStyles = () => {
|
|
|
2832
2844
|
useStylesRerender();
|
|
2833
2845
|
const classesProp = usePanelElementSetting(currentClassesProp);
|
|
2834
2846
|
const appliedStyles = import_editor_props8.classesPropTypeUtil.extract(classesProp) ?? [];
|
|
2835
|
-
return
|
|
2847
|
+
return import_editor_styles_repository14.stylesRepository.all().filter((style) => [...baseStyles, ...appliedStyles].includes(style.id));
|
|
2836
2848
|
};
|
|
2837
2849
|
var useBaseStyles = () => {
|
|
2838
2850
|
const { elementType } = useElement();
|
|
@@ -4594,7 +4606,7 @@ var import_editor_ui6 = require("@elementor/editor-ui");
|
|
|
4594
4606
|
|
|
4595
4607
|
// src/styles-inheritance/components/styles-inheritance-section-indicators.tsx
|
|
4596
4608
|
var React61 = __toESM(require("react"));
|
|
4597
|
-
var
|
|
4609
|
+
var import_editor_styles_repository15 = require("@elementor/editor-styles-repository");
|
|
4598
4610
|
var import_ui36 = require("@elementor/ui");
|
|
4599
4611
|
var import_i18n39 = require("@wordpress/i18n");
|
|
4600
4612
|
var StylesInheritanceSectionIndicators = ({ fields }) => {
|
|
@@ -4616,7 +4628,7 @@ var StylesInheritanceSectionIndicators = ({ fields }) => {
|
|
|
4616
4628
|
StyleIndicator,
|
|
4617
4629
|
{
|
|
4618
4630
|
getColor: getStylesProviderThemeColor(provider.getKey()),
|
|
4619
|
-
"data-variant": (0,
|
|
4631
|
+
"data-variant": (0, import_editor_styles_repository15.isElementsStylesProvider)(provider.getKey()) ? "local" : "global",
|
|
4620
4632
|
role: "listitem",
|
|
4621
4633
|
"aria-label": hasValueLabel
|
|
4622
4634
|
}
|
|
@@ -6636,7 +6648,7 @@ function useResetStyleValueProps() {
|
|
|
6636
6648
|
var React101 = __toESM(require("react"));
|
|
6637
6649
|
var import_editor_controls67 = require("@elementor/editor-controls");
|
|
6638
6650
|
var import_editor_props22 = require("@elementor/editor-props");
|
|
6639
|
-
var
|
|
6651
|
+
var import_editor_styles_repository18 = require("@elementor/editor-styles-repository");
|
|
6640
6652
|
var import_i18n72 = require("@wordpress/i18n");
|
|
6641
6653
|
|
|
6642
6654
|
// src/styles-inheritance/components/styles-inheritance-infotip.tsx
|
|
@@ -6651,7 +6663,7 @@ var import_i18n71 = require("@wordpress/i18n");
|
|
|
6651
6663
|
var import_react46 = require("react");
|
|
6652
6664
|
var import_editor_canvas4 = require("@elementor/editor-canvas");
|
|
6653
6665
|
var import_editor_styles8 = require("@elementor/editor-styles");
|
|
6654
|
-
var
|
|
6666
|
+
var import_editor_styles_repository16 = require("@elementor/editor-styles-repository");
|
|
6655
6667
|
var import_i18n69 = require("@wordpress/i18n");
|
|
6656
6668
|
var MAXIMUM_ITEMS = 2;
|
|
6657
6669
|
var useNormalizedInheritanceChainItems = (inheritanceChain, bind, resolve) => {
|
|
@@ -6663,7 +6675,7 @@ var useNormalizedInheritanceChainItems = (inheritanceChain, bind, resolve) => {
|
|
|
6663
6675
|
);
|
|
6664
6676
|
const validItems = normalizedItems.map((item) => ({
|
|
6665
6677
|
...item,
|
|
6666
|
-
displayLabel:
|
|
6678
|
+
displayLabel: import_editor_styles_repository16.ELEMENTS_BASE_STYLES_PROVIDER_KEY !== item.provider ? item.displayLabel : (0, import_i18n69.__)("Base", "elementor")
|
|
6667
6679
|
})).filter((item) => !item.value || item.displayLabel !== "").slice(0, MAXIMUM_ITEMS);
|
|
6668
6680
|
setItems(validItems);
|
|
6669
6681
|
})();
|
|
@@ -6748,13 +6760,13 @@ var BreakpointIcon = ({ breakpoint }) => {
|
|
|
6748
6760
|
|
|
6749
6761
|
// src/styles-inheritance/components/infotip/label-chip.tsx
|
|
6750
6762
|
var React97 = __toESM(require("react"));
|
|
6751
|
-
var
|
|
6763
|
+
var import_editor_styles_repository17 = require("@elementor/editor-styles-repository");
|
|
6752
6764
|
var import_icons33 = require("@elementor/icons");
|
|
6753
6765
|
var import_ui47 = require("@elementor/ui");
|
|
6754
6766
|
var import_i18n70 = require("@wordpress/i18n");
|
|
6755
6767
|
var SIZE5 = "tiny";
|
|
6756
6768
|
var LabelChip = ({ displayLabel, provider }) => {
|
|
6757
|
-
const isBaseStyle = provider ===
|
|
6769
|
+
const isBaseStyle = provider === import_editor_styles_repository17.ELEMENTS_BASE_STYLES_PROVIDER_KEY;
|
|
6758
6770
|
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;
|
|
6759
6771
|
return /* @__PURE__ */ React97.createElement(
|
|
6760
6772
|
import_ui47.Chip,
|
|
@@ -6989,7 +7001,7 @@ var Indicator = ({ inheritanceChain, path, propType, isDisabled }) => {
|
|
|
6989
7001
|
const currentItem = currentStyleId ? getValueFromInheritanceChain(inheritanceChain, currentStyleId, currentStyleMeta) : null;
|
|
6990
7002
|
const hasValue = !(0, import_editor_props22.isEmpty)(currentItem?.value);
|
|
6991
7003
|
const [actualStyle] = inheritanceChain;
|
|
6992
|
-
if (actualStyle.provider ===
|
|
7004
|
+
if (actualStyle.provider === import_editor_styles_repository18.ELEMENTS_BASE_STYLES_PROVIDER_KEY) {
|
|
6993
7005
|
return null;
|
|
6994
7006
|
}
|
|
6995
7007
|
const isFinalValue = currentItem === actualStyle;
|