@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.mjs
CHANGED
|
@@ -152,16 +152,18 @@ import * as React11 from "react";
|
|
|
152
152
|
import { useRef, useState as useState4 } from "react";
|
|
153
153
|
import {
|
|
154
154
|
isElementsStylesProvider as isElementsStylesProvider4,
|
|
155
|
-
stylesRepository as
|
|
155
|
+
stylesRepository as stylesRepository7,
|
|
156
156
|
useProviders,
|
|
157
157
|
useUserStylesCapability as useUserStylesCapability5,
|
|
158
158
|
validateStyleLabel as validateStyleLabel2
|
|
159
159
|
} from "@elementor/editor-styles-repository";
|
|
160
160
|
import { InfoAlert, WarningInfotip } from "@elementor/editor-ui";
|
|
161
|
+
import { isExperimentActive } from "@elementor/editor-v1-adapters";
|
|
161
162
|
import { ColorSwatchIcon, MapPinIcon } from "@elementor/icons";
|
|
162
163
|
import { createLocation as createLocation2 } from "@elementor/locations";
|
|
163
164
|
import {
|
|
164
165
|
Box as Box2,
|
|
166
|
+
Button,
|
|
165
167
|
Chip as Chip3,
|
|
166
168
|
FormLabel,
|
|
167
169
|
Link,
|
|
@@ -374,14 +376,20 @@ function useCreateOption(params) {
|
|
|
374
376
|
|
|
375
377
|
// src/components/creatable-autocomplete/use-filter-options.ts
|
|
376
378
|
import { createFilterOptions } from "@elementor/ui";
|
|
379
|
+
var STRIP_NON_CLASS_CHARS = /[^a-zA-Z0-9_-]/g;
|
|
380
|
+
function normalizeClassSearch(value) {
|
|
381
|
+
return value.replace(STRIP_NON_CLASS_CHARS, "").toLowerCase();
|
|
382
|
+
}
|
|
377
383
|
function useFilterOptions(parameters) {
|
|
378
384
|
const { options: options13, selected, onCreate, entityName } = parameters;
|
|
379
|
-
const filter = createFilterOptions(
|
|
385
|
+
const filter = createFilterOptions({
|
|
386
|
+
matchFrom: "any"
|
|
387
|
+
});
|
|
380
388
|
const filterOptions = (optionList, params) => {
|
|
381
389
|
const selectedValues = selected.map((option) => option.value);
|
|
382
390
|
const filteredOptions = filter(
|
|
383
391
|
optionList.filter((option) => !selectedValues.includes(option.value)),
|
|
384
|
-
params
|
|
392
|
+
{ ...params, inputValue: normalizeClassSearch(params.inputValue) }
|
|
385
393
|
);
|
|
386
394
|
const isExisting = options13.some((option) => params.inputValue === option.label);
|
|
387
395
|
const allowCreate = Boolean(onCreate) && params.inputValue !== "" && !selectedValues.includes(params.inputValue) && !isExisting;
|
|
@@ -554,7 +562,7 @@ var StyledGroupItems = styled("ul")`
|
|
|
554
562
|
import * as React10 from "react";
|
|
555
563
|
import { useEffect, useMemo as useMemo3, useState as useState3 } from "react";
|
|
556
564
|
import { isClassState } from "@elementor/editor-styles";
|
|
557
|
-
import { stylesRepository as
|
|
565
|
+
import { stylesRepository as stylesRepository6, useUserStylesCapability as useUserStylesCapability4, validateStyleLabel } from "@elementor/editor-styles-repository";
|
|
558
566
|
import { EditableField, EllipsisWithTooltip, useEditable } from "@elementor/editor-ui";
|
|
559
567
|
import { DotsVerticalIcon } from "@elementor/icons";
|
|
560
568
|
import { useSessionStorage as useSessionStorage3 } from "@elementor/session";
|
|
@@ -588,7 +596,7 @@ function CssClassProvider({ children, ...contextValue }) {
|
|
|
588
596
|
import * as React9 from "react";
|
|
589
597
|
import {
|
|
590
598
|
isElementsStylesProvider as isElementsStylesProvider3,
|
|
591
|
-
stylesRepository as
|
|
599
|
+
stylesRepository as stylesRepository5,
|
|
592
600
|
useUserStylesCapability as useUserStylesCapability3
|
|
593
601
|
} from "@elementor/editor-styles-repository";
|
|
594
602
|
import { MenuItemInfotip, MenuListItem as MenuListItem2 } from "@elementor/editor-ui";
|
|
@@ -614,7 +622,7 @@ var StyleIndicator = styled2("div", {
|
|
|
614
622
|
|
|
615
623
|
// src/components/css-classes/duplicate-class-menu-item.tsx
|
|
616
624
|
import * as React7 from "react";
|
|
617
|
-
import { stylesRepository as
|
|
625
|
+
import { stylesRepository as stylesRepository4, useUserStylesCapability as useUserStylesCapability2 } from "@elementor/editor-styles-repository";
|
|
618
626
|
import { MenuListItem } from "@elementor/editor-ui";
|
|
619
627
|
import { useSessionStorage as useSessionStorage2 } from "@elementor/session";
|
|
620
628
|
import { __ as __2 } from "@wordpress/i18n";
|
|
@@ -630,6 +638,7 @@ import { __ } from "@wordpress/i18n";
|
|
|
630
638
|
import { setDocumentModifiedStatus } from "@elementor/editor-documents";
|
|
631
639
|
import { getElementSetting as getElementSetting2, updateElementSettings as updateElementSettings2 } from "@elementor/editor-elements";
|
|
632
640
|
import { classesPropTypeUtil as classesPropTypeUtil2 } from "@elementor/editor-props";
|
|
641
|
+
import { stylesRepository as stylesRepository3 } from "@elementor/editor-styles-repository";
|
|
633
642
|
function doGetAppliedClasses(elementId, classesPropType = "classes") {
|
|
634
643
|
return getElementSetting2(elementId, classesPropType)?.value || [];
|
|
635
644
|
}
|
|
@@ -640,6 +649,17 @@ function doApplyClasses(elementId, classIds, classesPropType = "classes") {
|
|
|
640
649
|
withHistory: false
|
|
641
650
|
});
|
|
642
651
|
setDocumentModifiedStatus(true);
|
|
652
|
+
ensureClassesAreLoaded(classIds);
|
|
653
|
+
}
|
|
654
|
+
function ensureClassesAreLoaded(classIds) {
|
|
655
|
+
const providers = stylesRepository3.getProviders();
|
|
656
|
+
classIds.forEach((classId) => {
|
|
657
|
+
stylesRepository3.getProviderByKey(classId)?.actions.get(classId);
|
|
658
|
+
const owningProvider = providers.find(
|
|
659
|
+
(provider) => provider.actions.all().some((style) => style.id === classId)
|
|
660
|
+
);
|
|
661
|
+
owningProvider?.actions.get(classId);
|
|
662
|
+
});
|
|
643
663
|
}
|
|
644
664
|
function doUnapplyClass(elementId, classId, classesPropType = "classes") {
|
|
645
665
|
const appliedClasses = getElementSetting2(elementId, classesPropType)?.value || [];
|
|
@@ -820,7 +840,7 @@ function DuplicateClassMenuItem({ closeMenu }) {
|
|
|
820
840
|
if (!provider || !classId) {
|
|
821
841
|
return null;
|
|
822
842
|
}
|
|
823
|
-
const providerInstance =
|
|
843
|
+
const providerInstance = stylesRepository4.getProviderByKey(provider);
|
|
824
844
|
const createAction = providerInstance?.actions.create;
|
|
825
845
|
const getAction = providerInstance?.actions.get;
|
|
826
846
|
if (!createAction || !getAction) {
|
|
@@ -976,7 +996,7 @@ function useElementStates() {
|
|
|
976
996
|
}
|
|
977
997
|
function useModifiedStates(styleId) {
|
|
978
998
|
const { meta } = useStyle();
|
|
979
|
-
const styleDef =
|
|
999
|
+
const styleDef = stylesRepository5.all().find((style) => style.id === styleId);
|
|
980
1000
|
return Object.fromEntries(
|
|
981
1001
|
styleDef?.variants.filter((variant) => meta.breakpoint === variant.meta.breakpoint).map((variant) => [variant.meta.state ?? "normal", true]) ?? []
|
|
982
1002
|
);
|
|
@@ -989,7 +1009,7 @@ function getMenuItemsByProvider({
|
|
|
989
1009
|
if (!provider) {
|
|
990
1010
|
return [];
|
|
991
1011
|
}
|
|
992
|
-
const providerInstance =
|
|
1012
|
+
const providerInstance = stylesRepository5.getProviderByKey(provider);
|
|
993
1013
|
const providerActions = providerInstance?.actions;
|
|
994
1014
|
const canUpdate = providerActions?.update;
|
|
995
1015
|
const canDuplicate = providerActions?.create && providerActions?.get;
|
|
@@ -1139,7 +1159,7 @@ function CssClassItem(props) {
|
|
|
1139
1159
|
onError: setError
|
|
1140
1160
|
});
|
|
1141
1161
|
const color = error ? "error" : colorProp;
|
|
1142
|
-
const providerActions = provider ?
|
|
1162
|
+
const providerActions = provider ? stylesRepository6.getProviderByKey(provider)?.actions : null;
|
|
1143
1163
|
const allowRename = Boolean(providerActions?.update) && userCan(provider ?? "")?.update;
|
|
1144
1164
|
const isShowingState = isActive && meta.state;
|
|
1145
1165
|
const stateLabel = useMemo3(() => {
|
|
@@ -1228,6 +1248,19 @@ var validateLabel = (newLabel) => {
|
|
|
1228
1248
|
// src/components/css-classes/css-class-selector.tsx
|
|
1229
1249
|
var ID = "elementor-css-class-selector";
|
|
1230
1250
|
var TAGS_LIMIT = 50;
|
|
1251
|
+
var EVENT_OPEN_GLOBAL_CLASSES_MANAGER = "elementor/open-global-classes-manager";
|
|
1252
|
+
var EVENT_TOGGLE_DESIGN_SYSTEM = "elementor/toggle-design-system";
|
|
1253
|
+
function openClassManagerPanel() {
|
|
1254
|
+
if (isExperimentActive("e_editor_design_system_panel")) {
|
|
1255
|
+
window.dispatchEvent(
|
|
1256
|
+
new CustomEvent(EVENT_TOGGLE_DESIGN_SYSTEM, {
|
|
1257
|
+
detail: { tab: "classes" }
|
|
1258
|
+
})
|
|
1259
|
+
);
|
|
1260
|
+
return;
|
|
1261
|
+
}
|
|
1262
|
+
window.dispatchEvent(new CustomEvent(EVENT_OPEN_GLOBAL_CLASSES_MANAGER));
|
|
1263
|
+
}
|
|
1231
1264
|
var EMPTY_OPTION = {
|
|
1232
1265
|
label: __6("local", "elementor"),
|
|
1233
1266
|
value: null,
|
|
@@ -1243,7 +1276,7 @@ function CssClassSelector() {
|
|
|
1243
1276
|
const autocompleteRef = useRef(null);
|
|
1244
1277
|
const [renameError, setRenameError] = useState4(null);
|
|
1245
1278
|
const handleSelect = useHandleSelect();
|
|
1246
|
-
const { create, validate, entityName } = useCreateAction();
|
|
1279
|
+
const { create, validate, entityName, isAtLimit, limitCount } = useCreateAction();
|
|
1247
1280
|
const appliedOptions = useAppliedOptions(options13);
|
|
1248
1281
|
const active = appliedOptions.find((option) => option.value === activeId) ?? EMPTY_OPTION;
|
|
1249
1282
|
const showPlaceholder = appliedOptions.every(({ fixed }) => fixed);
|
|
@@ -1272,7 +1305,7 @@ function CssClassSelector() {
|
|
|
1272
1305
|
onCreate: create ?? void 0,
|
|
1273
1306
|
validate: validate ?? void 0,
|
|
1274
1307
|
limitTags: TAGS_LIMIT,
|
|
1275
|
-
renderEmptyState: EmptyState,
|
|
1308
|
+
renderEmptyState: isAtLimit && typeof limitCount === "number" ? (props) => /* @__PURE__ */ React11.createElement(LimitReachedEmptyState, { limitCount, onClear: props.onClear }) : EmptyState,
|
|
1276
1309
|
getLimitTagsText: (more) => /* @__PURE__ */ React11.createElement(Chip3, { size: "tiny", variant: "standard", label: `+${more}`, clickable: true }),
|
|
1277
1310
|
renderTags: (values, getTagProps) => values.map((value, index) => {
|
|
1278
1311
|
const chipProps = getTagProps({ index });
|
|
@@ -1311,7 +1344,7 @@ function CssClassSelector() {
|
|
|
1311
1344
|
)
|
|
1312
1345
|
), !canEdit && /* @__PURE__ */ React11.createElement(InfoAlert, { sx: { mt: 1 } }, __6("With your current role, you can use existing classes but can\u2019t modify them.", "elementor")));
|
|
1313
1346
|
}
|
|
1314
|
-
var
|
|
1347
|
+
var EmptyStateLayout = ({ searchValue, onClear, children }) => /* @__PURE__ */ React11.createElement(Box2, { sx: { py: 4 } }, /* @__PURE__ */ React11.createElement(
|
|
1315
1348
|
Stack3,
|
|
1316
1349
|
{
|
|
1317
1350
|
gap: 1,
|
|
@@ -1322,14 +1355,59 @@ var EmptyState = ({ searchValue, onClear }) => /* @__PURE__ */ React11.createEle
|
|
|
1322
1355
|
},
|
|
1323
1356
|
/* @__PURE__ */ React11.createElement(ColorSwatchIcon, { sx: { transform: "rotate(90deg)" }, fontSize: "large" }),
|
|
1324
1357
|
/* @__PURE__ */ React11.createElement(Typography3, { align: "center", variant: "subtitle2" }, __6("Sorry, nothing matched", "elementor"), /* @__PURE__ */ React11.createElement("br", null), "\u201C", searchValue, "\u201D."),
|
|
1325
|
-
|
|
1358
|
+
children,
|
|
1326
1359
|
/* @__PURE__ */ React11.createElement(Link, { color: "text.secondary", variant: "caption", component: "button", onClick: onClear }, __6("Clear & try again", "elementor"))
|
|
1327
1360
|
));
|
|
1361
|
+
var EmptyState = (props) => /* @__PURE__ */ React11.createElement(EmptyStateLayout, { ...props }, /* @__PURE__ */ React11.createElement(Typography3, { align: "center", variant: "caption", sx: { mb: 2 } }, __6("With your current role,", "elementor"), /* @__PURE__ */ React11.createElement("br", null), __6("you can only use existing classes.", "elementor")));
|
|
1362
|
+
var LimitReachedEmptyState = ({
|
|
1363
|
+
limitCount,
|
|
1364
|
+
onClear
|
|
1365
|
+
}) => /* @__PURE__ */ React11.createElement(Box2, { sx: { py: 4 } }, /* @__PURE__ */ React11.createElement(
|
|
1366
|
+
Stack3,
|
|
1367
|
+
{
|
|
1368
|
+
gap: 1,
|
|
1369
|
+
alignItems: "center",
|
|
1370
|
+
color: "text.secondary",
|
|
1371
|
+
justifyContent: "center",
|
|
1372
|
+
sx: { px: 1, m: "auto", maxWidth: "260px" }
|
|
1373
|
+
},
|
|
1374
|
+
/* @__PURE__ */ React11.createElement(ColorSwatchIcon, { sx: { transform: "rotate(90deg)" }, fontSize: "large" }),
|
|
1375
|
+
/* @__PURE__ */ React11.createElement(
|
|
1376
|
+
Typography3,
|
|
1377
|
+
{ align: "center", variant: "subtitle2" },
|
|
1378
|
+
/* translators: %s is the maximum number of classes */
|
|
1379
|
+
__6("Limit of %s classes reached", "elementor").replace("%s", String(limitCount))
|
|
1380
|
+
),
|
|
1381
|
+
/* @__PURE__ */ React11.createElement(Typography3, { align: "center", variant: "caption", component: "div" }, __6("Remove a class to create a new one.", "elementor"), " ", /* @__PURE__ */ React11.createElement(
|
|
1382
|
+
Link,
|
|
1383
|
+
{
|
|
1384
|
+
color: "inherit",
|
|
1385
|
+
variant: "caption",
|
|
1386
|
+
component: "button",
|
|
1387
|
+
onClick: onClear,
|
|
1388
|
+
sx: { verticalAlign: "baseline" }
|
|
1389
|
+
},
|
|
1390
|
+
__6("Clear", "elementor")
|
|
1391
|
+
)),
|
|
1392
|
+
/* @__PURE__ */ React11.createElement(
|
|
1393
|
+
Button,
|
|
1394
|
+
{
|
|
1395
|
+
variant: "outlined",
|
|
1396
|
+
color: "secondary",
|
|
1397
|
+
size: "small",
|
|
1398
|
+
onClick: () => {
|
|
1399
|
+
openClassManagerPanel();
|
|
1400
|
+
onClear();
|
|
1401
|
+
}
|
|
1402
|
+
},
|
|
1403
|
+
__6("Class Manager", "elementor")
|
|
1404
|
+
)
|
|
1405
|
+
));
|
|
1328
1406
|
var updateClassByProvider = (provider, data) => {
|
|
1329
1407
|
if (!provider) {
|
|
1330
1408
|
return;
|
|
1331
1409
|
}
|
|
1332
|
-
const providerInstance =
|
|
1410
|
+
const providerInstance = stylesRepository7.getProviderByKey(provider);
|
|
1333
1411
|
if (!providerInstance) {
|
|
1334
1412
|
return;
|
|
1335
1413
|
}
|
|
@@ -1367,6 +1445,11 @@ function useCreateAction() {
|
|
|
1367
1445
|
if (!provider || !createAction) {
|
|
1368
1446
|
return {};
|
|
1369
1447
|
}
|
|
1448
|
+
const entityName = provider.labels.singular && provider.labels.plural ? provider.labels : void 0;
|
|
1449
|
+
const validate = (newClassLabel, event) => validateStyleLabel2(newClassLabel, event);
|
|
1450
|
+
if (hasReachedLimit(provider)) {
|
|
1451
|
+
return { entityName, isAtLimit: true, limitCount: provider.limit, validate };
|
|
1452
|
+
}
|
|
1370
1453
|
const create = (classLabel) => {
|
|
1371
1454
|
const { createdId } = createAction({ classLabel });
|
|
1372
1455
|
trackStyles(provider.getKey() ?? "", "classCreated", {
|
|
@@ -1375,21 +1458,7 @@ function useCreateAction() {
|
|
|
1375
1458
|
classId: createdId
|
|
1376
1459
|
});
|
|
1377
1460
|
};
|
|
1378
|
-
|
|
1379
|
-
if (hasReachedLimit(provider)) {
|
|
1380
|
-
return {
|
|
1381
|
-
isValid: false,
|
|
1382
|
-
/* translators: %s is the maximum number of classes */
|
|
1383
|
-
errorMessage: __6(
|
|
1384
|
-
"You\u2019ve reached the limit of %s classes. Please remove an existing one to create a new class.",
|
|
1385
|
-
"elementor"
|
|
1386
|
-
).replace("%s", provider.limit.toString())
|
|
1387
|
-
};
|
|
1388
|
-
}
|
|
1389
|
-
return validateStyleLabel2(newClassLabel, event);
|
|
1390
|
-
};
|
|
1391
|
-
const entityName = provider.labels.singular && provider.labels.plural ? provider.labels : void 0;
|
|
1392
|
-
return { create, validate, entityName };
|
|
1461
|
+
return { create, validate, entityName, isAtLimit: false };
|
|
1393
1462
|
}
|
|
1394
1463
|
function hasReachedLimit(provider) {
|
|
1395
1464
|
return provider.actions.all().length >= provider.limit;
|
|
@@ -1820,7 +1889,7 @@ function EditorPanelErrorFallback() {
|
|
|
1820
1889
|
import { Fragment as Fragment9 } from "react";
|
|
1821
1890
|
import * as React86 from "react";
|
|
1822
1891
|
import { getWidgetsCache as getWidgetsCache2 } from "@elementor/editor-elements";
|
|
1823
|
-
import { isExperimentActive as
|
|
1892
|
+
import { isExperimentActive as isExperimentActive4 } from "@elementor/editor-v1-adapters";
|
|
1824
1893
|
import { Divider as Divider6, Stack as Stack13, Tab, TabPanel, Tabs, useTabs } from "@elementor/ui";
|
|
1825
1894
|
import { __ as __60 } from "@wordpress/i18n";
|
|
1826
1895
|
|
|
@@ -2570,7 +2639,7 @@ import { getWidgetsCache } from "@elementor/editor-elements";
|
|
|
2570
2639
|
import { classesPropTypeUtil as classesPropTypeUtil3 } from "@elementor/editor-props";
|
|
2571
2640
|
import { getBreakpointsTree as getBreakpointsTree2 } from "@elementor/editor-responsive";
|
|
2572
2641
|
import { getStylesSchema } from "@elementor/editor-styles";
|
|
2573
|
-
import { stylesRepository as
|
|
2642
|
+
import { stylesRepository as stylesRepository8 } from "@elementor/editor-styles-repository";
|
|
2574
2643
|
|
|
2575
2644
|
// src/styles-inheritance/create-styles-inheritance.ts
|
|
2576
2645
|
import {
|
|
@@ -2847,7 +2916,7 @@ var useAppliedStyles = () => {
|
|
|
2847
2916
|
useStylesRerender();
|
|
2848
2917
|
const classesProp = usePanelElementSetting(currentClassesProp);
|
|
2849
2918
|
const appliedStyles = classesPropTypeUtil3.extract(classesProp) ?? [];
|
|
2850
|
-
return
|
|
2919
|
+
return stylesRepository8.all().filter((style) => [...baseStyles, ...appliedStyles].includes(style.id));
|
|
2851
2920
|
};
|
|
2852
2921
|
var useBaseStyles = () => {
|
|
2853
2922
|
const { elementType } = useElement();
|
|
@@ -3382,7 +3451,7 @@ var EffectsSection = () => {
|
|
|
3382
3451
|
import * as React55 from "react";
|
|
3383
3452
|
import { ControlFormLabel as ControlFormLabel2 } from "@elementor/editor-controls";
|
|
3384
3453
|
import { useParentElement } from "@elementor/editor-elements";
|
|
3385
|
-
import { isExperimentActive as
|
|
3454
|
+
import { isExperimentActive as isExperimentActive3 } from "@elementor/editor-v1-adapters";
|
|
3386
3455
|
import { __ as __33 } from "@wordpress/i18n";
|
|
3387
3456
|
|
|
3388
3457
|
// src/hooks/use-computed-style.ts
|
|
@@ -3705,7 +3774,7 @@ var getOptions2 = (parentStyleDirection) => {
|
|
|
3705
3774
|
import * as React44 from "react";
|
|
3706
3775
|
import { useMemo as useMemo9 } from "react";
|
|
3707
3776
|
import { ToggleControl as ToggleControl6 } from "@elementor/editor-controls";
|
|
3708
|
-
import { isExperimentActive } from "@elementor/editor-v1-adapters";
|
|
3777
|
+
import { isExperimentActive as isExperimentActive2 } from "@elementor/editor-v1-adapters";
|
|
3709
3778
|
import { __ as __22 } from "@wordpress/i18n";
|
|
3710
3779
|
var DISPLAY_LABEL = __22("Display", "elementor");
|
|
3711
3780
|
var displayFieldItems = [
|
|
@@ -3748,7 +3817,7 @@ var displayFieldItems = [
|
|
|
3748
3817
|
];
|
|
3749
3818
|
var DisplayField = () => {
|
|
3750
3819
|
const placeholder = useDisplayPlaceholderValue();
|
|
3751
|
-
const isGridActive =
|
|
3820
|
+
const isGridActive = isExperimentActive2("e_css_grid");
|
|
3752
3821
|
const items3 = useMemo9(
|
|
3753
3822
|
() => isGridActive ? displayFieldItems : displayFieldItems.filter((item) => item.value !== "grid"),
|
|
3754
3823
|
[isGridActive]
|
|
@@ -4378,7 +4447,7 @@ var LayoutSection = () => {
|
|
|
4378
4447
|
history: { propDisplayName: DISPLAY_LABEL2 }
|
|
4379
4448
|
});
|
|
4380
4449
|
const displayPlaceholder = useDisplayPlaceholderValue();
|
|
4381
|
-
const isGridExperimentActive =
|
|
4450
|
+
const isGridExperimentActive = isExperimentActive3("e_css_grid");
|
|
4382
4451
|
const isDisplayFlex = shouldDisplayFlexFields(display, displayPlaceholder);
|
|
4383
4452
|
const isDisplayGrid = "grid" === (display?.value ?? displayPlaceholder?.value);
|
|
4384
4453
|
const { element } = useElement();
|
|
@@ -5370,7 +5439,7 @@ var PanelTabContent = () => {
|
|
|
5370
5439
|
const { element } = useElement();
|
|
5371
5440
|
const editorDefaults = useDefaultPanelSettings();
|
|
5372
5441
|
const defaultComponentTab = editorDefaults.defaultTab;
|
|
5373
|
-
const isInteractionsActive =
|
|
5442
|
+
const isInteractionsActive = isExperimentActive4("e_interactions");
|
|
5374
5443
|
const isPromotedElement = !!getWidgetsCache2()?.[element.type]?.meta?.is_pro_promotion;
|
|
5375
5444
|
const [storedTab, setCurrentTab] = useStateByElement("tab", defaultComponentTab);
|
|
5376
5445
|
const currentTab = isPromotedElement && storedTab === "settings" ? "style" : storedTab;
|