@elementor/editor-controls 4.4.0-1077 → 4.4.0-1079
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.d.mts +12 -1
- package/dist/index.d.ts +12 -1
- package/dist/index.js +1416 -846
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1289 -726
- package/dist/index.mjs.map +1 -1
- package/package.json +16 -16
- package/src/controls/icon-library/font-awesome-7-catalog.ts +104 -0
- package/src/controls/icon-library/font-awesome-7-data.ts +260 -0
- package/src/controls/icon-library/font-awesome-glyph.tsx +30 -0
- package/src/controls/icon-library/get-icon-library-anchor.ts +29 -0
- package/src/controls/icon-library/icon-library-popover.tsx +235 -0
- package/src/controls/icon-library/use-font-awesome-7-catalog.ts +14 -0
- package/src/controls/svg-media-control.tsx +132 -159
- package/src/controls/svg-media-overlay.tsx +137 -0
- package/src/controls/svg-media-preview.tsx +68 -0
- package/src/index.ts +6 -0
package/dist/index.mjs
CHANGED
|
@@ -5314,24 +5314,13 @@ var AspectRatioControl = createControl(({ label }) => {
|
|
|
5314
5314
|
});
|
|
5315
5315
|
|
|
5316
5316
|
// src/controls/svg-media-control.tsx
|
|
5317
|
-
import * as
|
|
5318
|
-
import { useEffect as useEffect16, useState as useState16 } from "react";
|
|
5317
|
+
import * as React85 from "react";
|
|
5318
|
+
import { useEffect as useEffect16, useRef as useRef15, useState as useState16 } from "react";
|
|
5319
5319
|
import { useCurrentUserCapabilities } from "@elementor/editor-current-user";
|
|
5320
5320
|
import { iconPropTypeUtil, svgSrcPropTypeUtil, urlPropTypeUtil as urlPropTypeUtil4 } from "@elementor/editor-props";
|
|
5321
|
-
import {
|
|
5322
|
-
import {
|
|
5323
|
-
Box as Box15,
|
|
5324
|
-
Button as Button5,
|
|
5325
|
-
Card as Card2,
|
|
5326
|
-
CardMedia as CardMedia2,
|
|
5327
|
-
CardOverlay as CardOverlay2,
|
|
5328
|
-
CircularProgress as CircularProgress3,
|
|
5329
|
-
Stack as Stack13,
|
|
5330
|
-
styled as styled9,
|
|
5331
|
-
ThemeProvider
|
|
5332
|
-
} from "@elementor/ui";
|
|
5321
|
+
import { Box as Box18, Card as Card2, CardOverlay as CardOverlay2, Popover as Popover6, Stack as Stack15, styled as styled11, usePopupState as usePopupState8 } from "@elementor/ui";
|
|
5333
5322
|
import { useWpMediaAttachment as useWpMediaAttachment2, useWpMediaFrame as useWpMediaFrame2 } from "@elementor/wp-media";
|
|
5334
|
-
import { __ as
|
|
5323
|
+
import { __ as __35 } from "@wordpress/i18n";
|
|
5335
5324
|
|
|
5336
5325
|
// src/components/enable-unfiltered-modal.tsx
|
|
5337
5326
|
import * as React80 from "react";
|
|
@@ -5393,37 +5382,449 @@ var AdminDialog = ({ open, onClose, handleEnable, isPending, isError }) => /* @_
|
|
|
5393
5382
|
isPending ? /* @__PURE__ */ React80.createElement(CircularProgress2, { size: 24 }) : __31("Enable", "elementor")
|
|
5394
5383
|
)));
|
|
5395
5384
|
|
|
5396
|
-
// src/controls/
|
|
5397
|
-
|
|
5398
|
-
|
|
5399
|
-
|
|
5400
|
-
|
|
5385
|
+
// src/controls/icon-library/get-icon-library-anchor.ts
|
|
5386
|
+
function getIconLibraryAnchor(containerRect, buttonGroupRect) {
|
|
5387
|
+
if (!containerRect || containerRect.width <= 0) {
|
|
5388
|
+
return null;
|
|
5389
|
+
}
|
|
5390
|
+
return {
|
|
5391
|
+
top: buttonGroupRect?.top ?? containerRect.top,
|
|
5392
|
+
left: containerRect.left,
|
|
5393
|
+
width: containerRect.width
|
|
5394
|
+
};
|
|
5401
5395
|
}
|
|
5402
|
-
function
|
|
5403
|
-
|
|
5404
|
-
|
|
5405
|
-
|
|
5396
|
+
function measureIconLibraryAnchor(container, buttonGroup) {
|
|
5397
|
+
return getIconLibraryAnchor(container?.getBoundingClientRect(), buttonGroup?.getBoundingClientRect());
|
|
5398
|
+
}
|
|
5399
|
+
|
|
5400
|
+
// src/controls/icon-library/icon-library-popover.tsx
|
|
5401
|
+
import * as React82 from "react";
|
|
5402
|
+
import { useMemo as useMemo12 } from "react";
|
|
5403
|
+
import {
|
|
5404
|
+
PopoverBody as PopoverBody2,
|
|
5405
|
+
PopoverHeader as PopoverHeader4,
|
|
5406
|
+
PopoverMenuList as PopoverMenuList2,
|
|
5407
|
+
SearchField as SearchField2,
|
|
5408
|
+
StyledMenuList
|
|
5409
|
+
} from "@elementor/editor-ui";
|
|
5410
|
+
import { ComponentsIcon } from "@elementor/icons";
|
|
5411
|
+
import { Box as Box15, CircularProgress as CircularProgress3, Divider as Divider4, Link as Link3, Stack as Stack13, styled as styled9, Typography as Typography7 } from "@elementor/ui";
|
|
5412
|
+
import { useDebounceState } from "@elementor/utils";
|
|
5413
|
+
import { __ as __32 } from "@wordpress/i18n";
|
|
5414
|
+
|
|
5415
|
+
// src/controls/icon-library/font-awesome-7-data.ts
|
|
5416
|
+
var FONT_AWESOME_7_LIBRARIES = [
|
|
5417
|
+
{ file: "solid", library: "fa-solid" },
|
|
5418
|
+
{ file: "regular", library: "fa-regular" },
|
|
5419
|
+
{ file: "brands", library: "fa-brands" }
|
|
5420
|
+
];
|
|
5421
|
+
var FONT_AWESOME_JSON = {
|
|
5422
|
+
width: 0,
|
|
5423
|
+
height: 1,
|
|
5424
|
+
aliases: 2,
|
|
5425
|
+
unicode: 3,
|
|
5426
|
+
path: 4
|
|
5427
|
+
};
|
|
5428
|
+
var libraryCache = /* @__PURE__ */ new Map();
|
|
5429
|
+
function getFontAwesome7EditorConfig() {
|
|
5430
|
+
const config = window.elementorCommon?.config?.fontAwesome?.v7;
|
|
5431
|
+
if (!config || !Array.isArray(config.jsonFiles)) {
|
|
5432
|
+
return null;
|
|
5433
|
+
}
|
|
5434
|
+
const jsonBaseUrl = getAllowedJsonBaseUrl(config.jsonBaseUrl);
|
|
5435
|
+
if (!jsonBaseUrl) {
|
|
5436
|
+
return null;
|
|
5406
5437
|
}
|
|
5407
|
-
|
|
5408
|
-
|
|
5409
|
-
|
|
5438
|
+
return {
|
|
5439
|
+
jsonFiles: config.jsonFiles,
|
|
5440
|
+
jsonBaseUrl
|
|
5441
|
+
};
|
|
5442
|
+
}
|
|
5443
|
+
var FONT_AWESOME_ICON_NAME_PATTERN = /^fa\S*\s+fa-([^\s]+)/;
|
|
5444
|
+
function getFontAwesome7IconName(iconValue) {
|
|
5445
|
+
return iconValue.match(FONT_AWESOME_ICON_NAME_PATTERN)?.[1] ?? null;
|
|
5446
|
+
}
|
|
5447
|
+
function resetFontAwesome7IconsCache() {
|
|
5448
|
+
libraryCache.clear();
|
|
5449
|
+
}
|
|
5450
|
+
async function loadFontAwesome7Library(file, signal) {
|
|
5451
|
+
const cached = await getCachedLibrary(file, signal);
|
|
5452
|
+
return cached?.icons ?? [];
|
|
5453
|
+
}
|
|
5454
|
+
async function resolveFontAwesome7Icon(library, iconName, signal) {
|
|
5455
|
+
const file = getLibraryFileName(library);
|
|
5456
|
+
if (!file) {
|
|
5457
|
+
return null;
|
|
5458
|
+
}
|
|
5459
|
+
const cached = await getCachedLibrary(file, signal);
|
|
5460
|
+
return cached?.lookup[iconName] ?? null;
|
|
5461
|
+
}
|
|
5462
|
+
async function getCachedLibrary(file, signal) {
|
|
5463
|
+
const cached = libraryCache.get(file);
|
|
5464
|
+
if (cached) {
|
|
5465
|
+
return cached;
|
|
5466
|
+
}
|
|
5467
|
+
const loaded = await fetchLibrary(file, signal);
|
|
5468
|
+
if (loaded) {
|
|
5469
|
+
libraryCache.set(file, loaded);
|
|
5470
|
+
}
|
|
5471
|
+
return loaded;
|
|
5472
|
+
}
|
|
5473
|
+
function getLibraryFileName(library) {
|
|
5474
|
+
const config = getFontAwesome7EditorConfig();
|
|
5475
|
+
const match = FONT_AWESOME_7_LIBRARIES.find((item) => item.library === library);
|
|
5476
|
+
if (!config || !match || !config.jsonFiles.includes(match.file)) {
|
|
5477
|
+
return null;
|
|
5478
|
+
}
|
|
5479
|
+
return match.file;
|
|
5480
|
+
}
|
|
5481
|
+
async function fetchLibrary(file, signal) {
|
|
5482
|
+
const config = getFontAwesome7EditorConfig();
|
|
5483
|
+
if (!config?.jsonFiles.includes(file)) {
|
|
5484
|
+
return null;
|
|
5485
|
+
}
|
|
5486
|
+
const catalogUrl = getCatalogFileUrl(config.jsonBaseUrl, file);
|
|
5487
|
+
if (!catalogUrl) {
|
|
5488
|
+
return null;
|
|
5489
|
+
}
|
|
5490
|
+
try {
|
|
5491
|
+
const response = await fetch(catalogUrl, { signal });
|
|
5492
|
+
if (!response.ok) {
|
|
5493
|
+
return null;
|
|
5494
|
+
}
|
|
5495
|
+
const data = await response.json();
|
|
5496
|
+
const icons = data.icons;
|
|
5497
|
+
if (!icons || typeof icons !== "object") {
|
|
5498
|
+
return null;
|
|
5499
|
+
}
|
|
5500
|
+
return indexLibrary(icons);
|
|
5501
|
+
} catch {
|
|
5502
|
+
return null;
|
|
5503
|
+
}
|
|
5504
|
+
}
|
|
5505
|
+
function indexLibrary(icons) {
|
|
5506
|
+
const definitions = [];
|
|
5507
|
+
const lookup = /* @__PURE__ */ Object.create(null);
|
|
5508
|
+
for (const [name, iconData] of Object.entries(icons)) {
|
|
5509
|
+
const definition = toIconDefinition(name, iconData);
|
|
5510
|
+
if (!definition) {
|
|
5511
|
+
continue;
|
|
5512
|
+
}
|
|
5513
|
+
definitions.push(definition);
|
|
5514
|
+
lookup[name] = definition;
|
|
5515
|
+
for (const alias of definition.aliases) {
|
|
5516
|
+
if (!lookup[alias]) {
|
|
5517
|
+
lookup[alias] = definition;
|
|
5518
|
+
}
|
|
5519
|
+
}
|
|
5520
|
+
}
|
|
5521
|
+
return { icons: definitions, lookup };
|
|
5522
|
+
}
|
|
5523
|
+
function toIconDefinition(name, iconData) {
|
|
5524
|
+
if (!isValidIconTuple(iconData)) {
|
|
5525
|
+
return null;
|
|
5526
|
+
}
|
|
5527
|
+
const paths = normalizePaths(iconData[FONT_AWESOME_JSON.path]);
|
|
5528
|
+
if (paths.length === 0) {
|
|
5529
|
+
return null;
|
|
5530
|
+
}
|
|
5531
|
+
const aliases = iconData[FONT_AWESOME_JSON.aliases].filter(
|
|
5532
|
+
(alias) => typeof alias === "string" && alias !== ""
|
|
5533
|
+
);
|
|
5534
|
+
return {
|
|
5535
|
+
name,
|
|
5536
|
+
aliases,
|
|
5537
|
+
width: iconData[FONT_AWESOME_JSON.width],
|
|
5538
|
+
height: iconData[FONT_AWESOME_JSON.height],
|
|
5539
|
+
paths
|
|
5540
|
+
};
|
|
5541
|
+
}
|
|
5542
|
+
function isValidIconTuple(iconData) {
|
|
5543
|
+
return Array.isArray(iconData) && iconData.length > FONT_AWESOME_JSON.path && typeof iconData[FONT_AWESOME_JSON.width] === "number" && typeof iconData[FONT_AWESOME_JSON.height] === "number" && Array.isArray(iconData[FONT_AWESOME_JSON.aliases]);
|
|
5544
|
+
}
|
|
5545
|
+
function normalizePaths(pathData) {
|
|
5546
|
+
if (typeof pathData === "string" && isSafeSvgPath(pathData)) {
|
|
5547
|
+
return [pathData];
|
|
5548
|
+
}
|
|
5549
|
+
if (!Array.isArray(pathData)) {
|
|
5550
|
+
return [];
|
|
5551
|
+
}
|
|
5552
|
+
return pathData.filter((path) => typeof path === "string" && isSafeSvgPath(path));
|
|
5553
|
+
}
|
|
5554
|
+
function isSafeSvgPath(path) {
|
|
5555
|
+
return path !== "" && !/[<>"'`]/.test(path);
|
|
5556
|
+
}
|
|
5557
|
+
function getAllowedJsonBaseUrl(jsonBaseUrl) {
|
|
5558
|
+
if (typeof jsonBaseUrl !== "string" || jsonBaseUrl === "") {
|
|
5559
|
+
return null;
|
|
5560
|
+
}
|
|
5561
|
+
try {
|
|
5562
|
+
const url = new URL(jsonBaseUrl);
|
|
5563
|
+
if (url.protocol !== "http:" && url.protocol !== "https:") {
|
|
5564
|
+
return null;
|
|
5565
|
+
}
|
|
5566
|
+
return url.href;
|
|
5567
|
+
} catch {
|
|
5568
|
+
return null;
|
|
5569
|
+
}
|
|
5570
|
+
}
|
|
5571
|
+
function getCatalogFileUrl(jsonBaseUrl, file) {
|
|
5572
|
+
try {
|
|
5573
|
+
const baseUrl = new URL(jsonBaseUrl);
|
|
5574
|
+
const fileUrl = new URL(`${file}.json`, jsonBaseUrl);
|
|
5575
|
+
if (fileUrl.origin !== baseUrl.origin || !fileUrl.pathname.startsWith(baseUrl.pathname)) {
|
|
5576
|
+
return null;
|
|
5577
|
+
}
|
|
5578
|
+
if (fileUrl.protocol !== "http:" && fileUrl.protocol !== "https:") {
|
|
5579
|
+
return null;
|
|
5580
|
+
}
|
|
5581
|
+
return fileUrl.href;
|
|
5582
|
+
} catch {
|
|
5583
|
+
return null;
|
|
5584
|
+
}
|
|
5585
|
+
}
|
|
5586
|
+
|
|
5587
|
+
// src/controls/icon-library/font-awesome-7-catalog.ts
|
|
5588
|
+
async function loadFontAwesome7Catalog(signal) {
|
|
5589
|
+
const config = getFontAwesome7EditorConfig();
|
|
5590
|
+
if (!config) {
|
|
5591
|
+
return [];
|
|
5592
|
+
}
|
|
5593
|
+
const catalogs = await Promise.all(
|
|
5594
|
+
FONT_AWESOME_7_LIBRARIES.map(async ({ file, library }) => {
|
|
5595
|
+
if (!config.jsonFiles.includes(file)) {
|
|
5596
|
+
return [];
|
|
5597
|
+
}
|
|
5598
|
+
const icons = await loadFontAwesome7Library(file, signal);
|
|
5599
|
+
return icons.map((icon) => toCatalogIcon(icon, library));
|
|
5600
|
+
})
|
|
5601
|
+
);
|
|
5602
|
+
return catalogs.flat();
|
|
5603
|
+
}
|
|
5604
|
+
function filterFontAwesome7Icons(icons, searchValue) {
|
|
5605
|
+
const query = searchValue?.trim().toLowerCase() ?? "";
|
|
5606
|
+
if (query === "") {
|
|
5607
|
+
return icons;
|
|
5608
|
+
}
|
|
5609
|
+
return icons.filter((icon) => {
|
|
5610
|
+
if (icon.name.includes(query) || icon.label.toLowerCase().includes(query)) {
|
|
5611
|
+
return true;
|
|
5612
|
+
}
|
|
5613
|
+
return icon.aliases.some((alias) => alias.toLowerCase().includes(query));
|
|
5410
5614
|
});
|
|
5411
5615
|
}
|
|
5412
|
-
function
|
|
5413
|
-
|
|
5616
|
+
function createIconSelectionValue(library, name) {
|
|
5617
|
+
return `${library} fa-${name}`;
|
|
5618
|
+
}
|
|
5619
|
+
function getSelectedIconId(iconClass, library) {
|
|
5620
|
+
if (!iconClass || !library) {
|
|
5621
|
+
return void 0;
|
|
5622
|
+
}
|
|
5623
|
+
const name = getFontAwesome7IconName(iconClass);
|
|
5624
|
+
if (!name) {
|
|
5625
|
+
return void 0;
|
|
5626
|
+
}
|
|
5627
|
+
return `${library}:${name}`;
|
|
5628
|
+
}
|
|
5629
|
+
function findFontAwesome7Icon(icons, iconClass, library) {
|
|
5630
|
+
const selectedId = getSelectedIconId(iconClass, library);
|
|
5631
|
+
if (!selectedId || !library) {
|
|
5632
|
+
return void 0;
|
|
5633
|
+
}
|
|
5634
|
+
const selectedName = selectedId.slice(`${library}:`.length);
|
|
5635
|
+
return icons.find((icon) => {
|
|
5636
|
+
if (icon.library !== library) {
|
|
5637
|
+
return false;
|
|
5638
|
+
}
|
|
5639
|
+
return icon.id === selectedId || icon.name === selectedName || icon.aliases.includes(selectedName);
|
|
5640
|
+
});
|
|
5414
5641
|
}
|
|
5415
|
-
function
|
|
5642
|
+
function toCatalogIcon(icon, library) {
|
|
5416
5643
|
return {
|
|
5417
|
-
|
|
5418
|
-
|
|
5419
|
-
|
|
5420
|
-
|
|
5421
|
-
|
|
5422
|
-
onSelect?.(icon);
|
|
5423
|
-
},
|
|
5424
|
-
applySavedValue: () => void 0
|
|
5644
|
+
...icon,
|
|
5645
|
+
id: `${library}:${icon.name}`,
|
|
5646
|
+
label: icon.name.replace(/-/g, " "),
|
|
5647
|
+
library,
|
|
5648
|
+
value: createIconSelectionValue(library, icon.name)
|
|
5425
5649
|
};
|
|
5426
5650
|
}
|
|
5651
|
+
|
|
5652
|
+
// src/controls/icon-library/font-awesome-glyph.tsx
|
|
5653
|
+
import * as React81 from "react";
|
|
5654
|
+
var FontAwesomeGlyph = ({ icon, size, color, label }) => {
|
|
5655
|
+
return /* @__PURE__ */ React81.createElement(
|
|
5656
|
+
"svg",
|
|
5657
|
+
{
|
|
5658
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
5659
|
+
viewBox: `0 0 ${icon.width} ${icon.height}`,
|
|
5660
|
+
width: size,
|
|
5661
|
+
height: size,
|
|
5662
|
+
fill: color,
|
|
5663
|
+
overflow: "visible",
|
|
5664
|
+
"aria-hidden": label ? void 0 : true,
|
|
5665
|
+
"aria-label": label,
|
|
5666
|
+
role: label ? "img" : void 0
|
|
5667
|
+
},
|
|
5668
|
+
icon.paths.map((path, index) => /* @__PURE__ */ React81.createElement("path", { key: `${index}-${path}`, d: path }))
|
|
5669
|
+
);
|
|
5670
|
+
};
|
|
5671
|
+
|
|
5672
|
+
// src/controls/icon-library/use-font-awesome-7-catalog.ts
|
|
5673
|
+
import { useQuery as useQuery2 } from "@elementor/query";
|
|
5674
|
+
var FONT_AWESOME_7_CATALOG_QUERY_KEY = ["font-awesome-7-catalog"];
|
|
5675
|
+
function useFontAwesome7Catalog(enabled) {
|
|
5676
|
+
return useQuery2({
|
|
5677
|
+
queryKey: FONT_AWESOME_7_CATALOG_QUERY_KEY,
|
|
5678
|
+
queryFn: ({ signal }) => loadFontAwesome7Catalog(signal),
|
|
5679
|
+
enabled,
|
|
5680
|
+
staleTime: Infinity
|
|
5681
|
+
});
|
|
5682
|
+
}
|
|
5683
|
+
|
|
5684
|
+
// src/controls/icon-library/icon-library-popover.tsx
|
|
5685
|
+
var ICON_LIBRARY_POPOVER_WIDTH = 300;
|
|
5686
|
+
var ICON_LIBRARY_ROW_HEIGHT = 48;
|
|
5687
|
+
var ICON_LIBRARY_SEARCH_DEBOUNCE_DELAY = 300;
|
|
5688
|
+
var ICON_TILE_SIZE = 40;
|
|
5689
|
+
var ICON_GLYPH_SIZE = 20;
|
|
5690
|
+
var ICON_LIBRARY_INLINE_SPACING = 1;
|
|
5691
|
+
var CompactIconLibraryMenuList = styled9(StyledMenuList)(({ theme }) => ({
|
|
5692
|
+
'& > [role="option"]': {
|
|
5693
|
+
padding: theme.spacing(0.75, ICON_LIBRARY_INLINE_SPACING)
|
|
5694
|
+
}
|
|
5695
|
+
}));
|
|
5696
|
+
var IconLibraryPopover = ({
|
|
5697
|
+
open,
|
|
5698
|
+
selectedIconClass,
|
|
5699
|
+
selectedIconLibrary,
|
|
5700
|
+
onSelect,
|
|
5701
|
+
onClose,
|
|
5702
|
+
width = ICON_LIBRARY_POPOVER_WIDTH
|
|
5703
|
+
}) => {
|
|
5704
|
+
const {
|
|
5705
|
+
debouncedValue: searchValue,
|
|
5706
|
+
inputValue: searchInputValue,
|
|
5707
|
+
handleChange: handleSearchChange,
|
|
5708
|
+
setImmediateValue: setSearchValue
|
|
5709
|
+
} = useDebounceState({ delay: ICON_LIBRARY_SEARCH_DEBOUNCE_DELAY });
|
|
5710
|
+
const { data: icons = [], isLoading } = useFontAwesome7Catalog(open);
|
|
5711
|
+
const items2 = useMemo12(() => createIconLibraryItems(icons, searchValue), [icons, searchValue]);
|
|
5712
|
+
const selectedValue = useMemo12(
|
|
5713
|
+
() => findFontAwesome7Icon(icons, selectedIconClass, selectedIconLibrary)?.id,
|
|
5714
|
+
[icons, selectedIconClass, selectedIconLibrary]
|
|
5715
|
+
);
|
|
5716
|
+
const handleClose = () => {
|
|
5717
|
+
setSearchValue("");
|
|
5718
|
+
onClose();
|
|
5719
|
+
};
|
|
5720
|
+
const handleSelect = (id) => {
|
|
5721
|
+
const icon = items2.find((item) => item.id === id);
|
|
5722
|
+
if (!icon) {
|
|
5723
|
+
return;
|
|
5724
|
+
}
|
|
5725
|
+
onSelect({
|
|
5726
|
+
value: createIconSelectionValue(icon.library, icon.name),
|
|
5727
|
+
library: icon.library
|
|
5728
|
+
});
|
|
5729
|
+
};
|
|
5730
|
+
const handleClearSearch = () => {
|
|
5731
|
+
setSearchValue("");
|
|
5732
|
+
};
|
|
5733
|
+
return /* @__PURE__ */ React82.createElement(PopoverBody2, { width, fillWidth: true, id: "icon-library" }, /* @__PURE__ */ React82.createElement(
|
|
5734
|
+
PopoverHeader4,
|
|
5735
|
+
{
|
|
5736
|
+
title: __32("Icon library", "elementor"),
|
|
5737
|
+
onClose: handleClose,
|
|
5738
|
+
icon: /* @__PURE__ */ React82.createElement(ComponentsIcon, { fontSize: "tiny" }),
|
|
5739
|
+
sx: { pl: ICON_LIBRARY_INLINE_SPACING, pr: 0.5 }
|
|
5740
|
+
}
|
|
5741
|
+
), /* @__PURE__ */ React82.createElement(
|
|
5742
|
+
SearchField2,
|
|
5743
|
+
{
|
|
5744
|
+
value: searchInputValue,
|
|
5745
|
+
onSearch: handleSearchChange,
|
|
5746
|
+
placeholder: __32("Search", "elementor"),
|
|
5747
|
+
id: "icon-library-search",
|
|
5748
|
+
sx: { px: ICON_LIBRARY_INLINE_SPACING, pb: 1 }
|
|
5749
|
+
}
|
|
5750
|
+
), /* @__PURE__ */ React82.createElement(Divider4, null), /* @__PURE__ */ React82.createElement(Box15, { sx: { flex: 1, overflow: "auto", minHeight: 0 } }, /* @__PURE__ */ React82.createElement(
|
|
5751
|
+
IconLibraryContent,
|
|
5752
|
+
{
|
|
5753
|
+
isLoading,
|
|
5754
|
+
items: items2,
|
|
5755
|
+
selectedValue,
|
|
5756
|
+
searchValue,
|
|
5757
|
+
onSelect: handleSelect,
|
|
5758
|
+
onClose: handleClose,
|
|
5759
|
+
onClearSearch: handleClearSearch
|
|
5760
|
+
}
|
|
5761
|
+
)));
|
|
5762
|
+
};
|
|
5763
|
+
var IconLibraryContent = ({
|
|
5764
|
+
isLoading,
|
|
5765
|
+
items: items2,
|
|
5766
|
+
selectedValue,
|
|
5767
|
+
searchValue,
|
|
5768
|
+
onSelect,
|
|
5769
|
+
onClose,
|
|
5770
|
+
onClearSearch
|
|
5771
|
+
}) => {
|
|
5772
|
+
if (isLoading) {
|
|
5773
|
+
return /* @__PURE__ */ React82.createElement(IconLibraryLoadingState, null);
|
|
5774
|
+
}
|
|
5775
|
+
return /* @__PURE__ */ React82.createElement(
|
|
5776
|
+
PopoverMenuList2,
|
|
5777
|
+
{
|
|
5778
|
+
items: items2,
|
|
5779
|
+
selectedValue,
|
|
5780
|
+
menuListTemplate: CompactIconLibraryMenuList,
|
|
5781
|
+
onSelect,
|
|
5782
|
+
onClose,
|
|
5783
|
+
itemHeight: ICON_LIBRARY_ROW_HEIGHT,
|
|
5784
|
+
menuItemContentTemplate: IconLibraryRow,
|
|
5785
|
+
noResultsComponent: /* @__PURE__ */ React82.createElement(IconLibraryEmptyState, { searchValue, onClear: onClearSearch }),
|
|
5786
|
+
"data-testid": "icon-library-list"
|
|
5787
|
+
}
|
|
5788
|
+
);
|
|
5789
|
+
};
|
|
5790
|
+
var IconLibraryLoadingState = () => /* @__PURE__ */ React82.createElement(Stack13, { alignItems: "center", justifyContent: "center", height: "100%" }, /* @__PURE__ */ React82.createElement(CircularProgress3, { role: "progressbar", size: 24 }));
|
|
5791
|
+
var IconLibraryEmptyState = ({ searchValue, onClear }) => {
|
|
5792
|
+
if (searchValue.trim() === "") {
|
|
5793
|
+
return /* @__PURE__ */ React82.createElement(CatalogUnavailable, null);
|
|
5794
|
+
}
|
|
5795
|
+
return /* @__PURE__ */ React82.createElement(NoResults, { searchValue, onClear });
|
|
5796
|
+
};
|
|
5797
|
+
var IconLibraryRow = (item) => {
|
|
5798
|
+
const icon = item;
|
|
5799
|
+
return /* @__PURE__ */ React82.createElement(Stack13, { direction: "row", alignItems: "center", gap: 1, sx: { width: "100%" } }, /* @__PURE__ */ React82.createElement(
|
|
5800
|
+
Box15,
|
|
5801
|
+
{
|
|
5802
|
+
sx: {
|
|
5803
|
+
width: ICON_TILE_SIZE,
|
|
5804
|
+
height: ICON_TILE_SIZE,
|
|
5805
|
+
display: "flex",
|
|
5806
|
+
alignItems: "center",
|
|
5807
|
+
justifyContent: "center",
|
|
5808
|
+
border: 1,
|
|
5809
|
+
borderColor: "divider",
|
|
5810
|
+
borderRadius: 1,
|
|
5811
|
+
color: "text.tertiary",
|
|
5812
|
+
flexShrink: 0
|
|
5813
|
+
}
|
|
5814
|
+
},
|
|
5815
|
+
icon.paths.length > 0 ? /* @__PURE__ */ React82.createElement(FontAwesomeGlyph, { icon, size: ICON_GLYPH_SIZE, color: "currentColor" }) : null
|
|
5816
|
+
), /* @__PURE__ */ React82.createElement(Typography7, { variant: "caption", color: "text.primary", noWrap: true }, icon.label));
|
|
5817
|
+
};
|
|
5818
|
+
var CatalogUnavailable = () => /* @__PURE__ */ React82.createElement(Stack13, { alignItems: "center", justifyContent: "center", height: "100%", p: 2.5, gap: 1.5 }, /* @__PURE__ */ React82.createElement(ComponentsIcon, { fontSize: "large" }), /* @__PURE__ */ React82.createElement(Typography7, { align: "center", variant: "subtitle2", color: "text.secondary" }, __32("Icons couldn't be loaded.", "elementor")));
|
|
5819
|
+
var NoResults = ({ searchValue, onClear }) => /* @__PURE__ */ React82.createElement(Stack13, { alignItems: "center", justifyContent: "center", height: "100%", p: 2.5, gap: 1.5 }, /* @__PURE__ */ React82.createElement(ComponentsIcon, { fontSize: "large" }), /* @__PURE__ */ React82.createElement(Typography7, { align: "center", variant: "subtitle2", color: "text.secondary" }, __32("Sorry, nothing matched", "elementor")), /* @__PURE__ */ React82.createElement(Typography7, { align: "center", variant: "subtitle2", color: "text.secondary", noWrap: true, sx: { maxWidth: "80%" } }, "\u201C", searchValue, "\u201D."), /* @__PURE__ */ React82.createElement(Link3, { color: "secondary", variant: "caption", component: "button", type: "button", onClick: onClear }, __32("Clear & try again", "elementor")));
|
|
5820
|
+
var createIconLibraryItems = (icons, searchValue) => filterFontAwesome7Icons(icons, searchValue).map((icon) => ({
|
|
5821
|
+
...icon,
|
|
5822
|
+
type: "item",
|
|
5823
|
+
value: icon.id
|
|
5824
|
+
}));
|
|
5825
|
+
|
|
5826
|
+
// src/controls/open-icon-library.ts
|
|
5827
|
+
import { stringPropTypeUtil as stringPropTypeUtil14 } from "@elementor/editor-props";
|
|
5427
5828
|
function createIconPropValue(icon, library) {
|
|
5428
5829
|
return {
|
|
5429
5830
|
value: stringPropTypeUtil14.create(icon),
|
|
@@ -5431,13 +5832,170 @@ function createIconPropValue(icon, library) {
|
|
|
5431
5832
|
};
|
|
5432
5833
|
}
|
|
5433
5834
|
|
|
5835
|
+
// src/controls/svg-media-overlay.tsx
|
|
5836
|
+
import * as React83 from "react";
|
|
5837
|
+
import { LibraryIcon, UploadIcon as UploadIcon2 } from "@elementor/icons";
|
|
5838
|
+
import { Box as Box16, Button as Button5, Stack as Stack14, styled as styled10, ThemeProvider, Typography as Typography8 } from "@elementor/ui";
|
|
5839
|
+
import { __ as __33 } from "@wordpress/i18n";
|
|
5840
|
+
var SVG_MEDIA_CONTROL_CONTAINER_TEST_ID = "svg-media-control-container";
|
|
5841
|
+
var SVG_MEDIA_ACTION_GROUP_TEST_ID = "svg-media-action-group";
|
|
5842
|
+
var MEDIA_ACTION_PADDING_Y = 0.75;
|
|
5843
|
+
var MEDIA_ACTION_PADDING_X = 2;
|
|
5844
|
+
var ICON_LIBRARY_PADDING = 0.625;
|
|
5845
|
+
var svgButtonSx = {
|
|
5846
|
+
px: MEDIA_ACTION_PADDING_X,
|
|
5847
|
+
py: MEDIA_ACTION_PADDING_Y
|
|
5848
|
+
};
|
|
5849
|
+
var MediaActionGroup = styled10(Stack14)(({ theme }) => ({
|
|
5850
|
+
display: "inline-flex",
|
|
5851
|
+
flexDirection: "row",
|
|
5852
|
+
alignItems: "stretch",
|
|
5853
|
+
border: "1px solid currentColor",
|
|
5854
|
+
borderRadius: theme.shape.borderRadius,
|
|
5855
|
+
overflow: "hidden",
|
|
5856
|
+
"& .MuiButton-root": {
|
|
5857
|
+
border: "none",
|
|
5858
|
+
borderRadius: 0,
|
|
5859
|
+
lineHeight: 1
|
|
5860
|
+
}
|
|
5861
|
+
}));
|
|
5862
|
+
var SvgMediaOverlay = ({
|
|
5863
|
+
isAdmin,
|
|
5864
|
+
showIconLibrary,
|
|
5865
|
+
buttonGroupRef,
|
|
5866
|
+
onSelectSvg,
|
|
5867
|
+
onUpload,
|
|
5868
|
+
onOpenIconLibrary,
|
|
5869
|
+
infotipTitle,
|
|
5870
|
+
infotipDescription
|
|
5871
|
+
}) => /* @__PURE__ */ React83.createElement(Stack14, { alignItems: "center", gap: 1 }, /* @__PURE__ */ React83.createElement(MediaActionGroup, { ref: buttonGroupRef, direction: "row", "data-testid": SVG_MEDIA_ACTION_GROUP_TEST_ID }, /* @__PURE__ */ React83.createElement(
|
|
5872
|
+
Button5,
|
|
5873
|
+
{
|
|
5874
|
+
size: "tiny",
|
|
5875
|
+
color: "inherit",
|
|
5876
|
+
variant: "text",
|
|
5877
|
+
onClick: onSelectSvg,
|
|
5878
|
+
"aria-label": __33("Select", "elementor"),
|
|
5879
|
+
sx: svgButtonSx
|
|
5880
|
+
},
|
|
5881
|
+
__33("Select", "elementor")
|
|
5882
|
+
), /* @__PURE__ */ React83.createElement(
|
|
5883
|
+
Box16,
|
|
5884
|
+
{
|
|
5885
|
+
sx: {
|
|
5886
|
+
width: "1px",
|
|
5887
|
+
alignSelf: "stretch",
|
|
5888
|
+
bgcolor: "currentColor",
|
|
5889
|
+
flexShrink: 0
|
|
5890
|
+
}
|
|
5891
|
+
}
|
|
5892
|
+
), /* @__PURE__ */ React83.createElement(
|
|
5893
|
+
ConditionalControlInfotip,
|
|
5894
|
+
{
|
|
5895
|
+
title: infotipTitle,
|
|
5896
|
+
description: infotipDescription,
|
|
5897
|
+
isEnabled: !isAdmin
|
|
5898
|
+
},
|
|
5899
|
+
/* @__PURE__ */ React83.createElement(Box16, { component: "span", sx: { display: "inline-flex" } }, /* @__PURE__ */ React83.createElement(UploadControl, { isAdmin, onUpload }))
|
|
5900
|
+
)), showIconLibrary ? /* @__PURE__ */ React83.createElement(
|
|
5901
|
+
Button5,
|
|
5902
|
+
{
|
|
5903
|
+
size: "tiny",
|
|
5904
|
+
color: "inherit",
|
|
5905
|
+
variant: "text",
|
|
5906
|
+
startIcon: /* @__PURE__ */ React83.createElement(LibraryIcon, { sx: { height: "18px", width: "16px" } }),
|
|
5907
|
+
"aria-label": __33("Icon library", "elementor"),
|
|
5908
|
+
onClick: onOpenIconLibrary,
|
|
5909
|
+
sx: {
|
|
5910
|
+
height: "28px",
|
|
5911
|
+
p: ICON_LIBRARY_PADDING,
|
|
5912
|
+
".MuiButton-icon": { ml: 0 }
|
|
5913
|
+
}
|
|
5914
|
+
},
|
|
5915
|
+
/* @__PURE__ */ React83.createElement(Typography8, null, __33("Icon library", "elementor"))
|
|
5916
|
+
) : null);
|
|
5917
|
+
var UploadControl = ({ isAdmin, onUpload }) => {
|
|
5918
|
+
if (isAdmin) {
|
|
5919
|
+
return /* @__PURE__ */ React83.createElement(UploadButton, { sx: svgButtonSx, onClick: onUpload });
|
|
5920
|
+
}
|
|
5921
|
+
return /* @__PURE__ */ React83.createElement(ThemeProvider, { colorScheme: "dark" }, /* @__PURE__ */ React83.createElement(UploadButton, { disabled: true, sx: svgButtonSx }));
|
|
5922
|
+
};
|
|
5923
|
+
var UploadButton = ({
|
|
5924
|
+
disabled = false,
|
|
5925
|
+
sx,
|
|
5926
|
+
onClick
|
|
5927
|
+
}) => /* @__PURE__ */ React83.createElement(
|
|
5928
|
+
Button5,
|
|
5929
|
+
{
|
|
5930
|
+
sx,
|
|
5931
|
+
size: "tiny",
|
|
5932
|
+
color: "inherit",
|
|
5933
|
+
variant: "text",
|
|
5934
|
+
disabled,
|
|
5935
|
+
onClick,
|
|
5936
|
+
"aria-label": __33("Upload", "elementor")
|
|
5937
|
+
},
|
|
5938
|
+
/* @__PURE__ */ React83.createElement(UploadIcon2, null)
|
|
5939
|
+
);
|
|
5940
|
+
|
|
5941
|
+
// src/controls/svg-media-preview.tsx
|
|
5942
|
+
import * as React84 from "react";
|
|
5943
|
+
import { Box as Box17, CardMedia as CardMedia2, CircularProgress as CircularProgress4 } from "@elementor/ui";
|
|
5944
|
+
import { __ as __34 } from "@wordpress/i18n";
|
|
5945
|
+
var ICON_PREVIEW_SIZE = 50;
|
|
5946
|
+
var ICON_PREVIEW_COLOR = "#000000";
|
|
5947
|
+
var SvgMediaPreview = ({ isFetching, src, iconClassName, iconLibrary }) => {
|
|
5948
|
+
const shouldLoadIconCatalog = Boolean(iconClassName && iconLibrary);
|
|
5949
|
+
const { data: icons = [], isLoading } = useFontAwesome7Catalog(shouldLoadIconCatalog);
|
|
5950
|
+
const selectedIcon = findFontAwesome7Icon(icons, iconClassName, iconLibrary);
|
|
5951
|
+
if (isFetching || shouldLoadIconCatalog && isLoading) {
|
|
5952
|
+
return /* @__PURE__ */ React84.createElement(CircularProgress4, { role: "progressbar" });
|
|
5953
|
+
}
|
|
5954
|
+
if (selectedIcon) {
|
|
5955
|
+
return /* @__PURE__ */ React84.createElement(IconPreview, { icon: selectedIcon });
|
|
5956
|
+
}
|
|
5957
|
+
if (shouldLoadIconCatalog) {
|
|
5958
|
+
return /* @__PURE__ */ React84.createElement(IconPreviewPlaceholder, null);
|
|
5959
|
+
}
|
|
5960
|
+
return /* @__PURE__ */ React84.createElement(SvgPreview, { src });
|
|
5961
|
+
};
|
|
5962
|
+
var IconPreview = ({ icon }) => /* @__PURE__ */ React84.createElement(Box17, { sx: { color: ICON_PREVIEW_COLOR } }, /* @__PURE__ */ React84.createElement(
|
|
5963
|
+
FontAwesomeGlyph,
|
|
5964
|
+
{
|
|
5965
|
+
icon,
|
|
5966
|
+
size: ICON_PREVIEW_SIZE,
|
|
5967
|
+
color: ICON_PREVIEW_COLOR,
|
|
5968
|
+
label: __34("Preview icon", "elementor")
|
|
5969
|
+
}
|
|
5970
|
+
));
|
|
5971
|
+
var IconPreviewPlaceholder = () => /* @__PURE__ */ React84.createElement(
|
|
5972
|
+
Box17,
|
|
5973
|
+
{
|
|
5974
|
+
"aria-hidden": true,
|
|
5975
|
+
sx: {
|
|
5976
|
+
width: ICON_PREVIEW_SIZE,
|
|
5977
|
+
height: ICON_PREVIEW_SIZE,
|
|
5978
|
+
color: ICON_PREVIEW_COLOR
|
|
5979
|
+
}
|
|
5980
|
+
}
|
|
5981
|
+
);
|
|
5982
|
+
var SvgPreview = ({ src }) => /* @__PURE__ */ React84.createElement(
|
|
5983
|
+
CardMedia2,
|
|
5984
|
+
{
|
|
5985
|
+
component: "img",
|
|
5986
|
+
image: src,
|
|
5987
|
+
alt: __34("Preview SVG", "elementor"),
|
|
5988
|
+
sx: { maxHeight: "140px", width: `${ICON_PREVIEW_SIZE}px`, color: ICON_PREVIEW_COLOR }
|
|
5989
|
+
}
|
|
5990
|
+
);
|
|
5991
|
+
|
|
5434
5992
|
// src/controls/svg-media-control.tsx
|
|
5435
5993
|
var TILE_SIZE = 8;
|
|
5436
5994
|
var TILE_WHITE = "transparent";
|
|
5437
5995
|
var TILE_BLACK = "#c1c1c1";
|
|
5438
|
-
var ICON_PREVIEW_FONT_SIZE = 50;
|
|
5439
5996
|
var TILES_GRADIENT_FORMULA = `linear-gradient(45deg, ${TILE_BLACK} 25%, ${TILE_WHITE} 0, ${TILE_WHITE} 75%, ${TILE_BLACK} 0, ${TILE_BLACK})`;
|
|
5440
|
-
var StyledCard =
|
|
5997
|
+
var StyledCard = styled11(Card2)`
|
|
5998
|
+
position: relative;
|
|
5441
5999
|
background-color: white;
|
|
5442
6000
|
background-image: ${TILES_GRADIENT_FORMULA}, ${TILES_GRADIENT_FORMULA};
|
|
5443
6001
|
background-size: ${TILE_SIZE}px ${TILE_SIZE}px;
|
|
@@ -5446,7 +6004,8 @@ var StyledCard = styled9(Card2)`
|
|
|
5446
6004
|
${TILE_SIZE / 2}px ${TILE_SIZE / 2}px;
|
|
5447
6005
|
border: none;
|
|
5448
6006
|
`;
|
|
5449
|
-
var
|
|
6007
|
+
var PREVIEW_ICON_COLOR = "#000000";
|
|
6008
|
+
var StyledCardMediaContainer = styled11(Stack15)`
|
|
5450
6009
|
position: relative;
|
|
5451
6010
|
height: 140px;
|
|
5452
6011
|
object-fit: contain;
|
|
@@ -5454,6 +6013,7 @@ var StyledCardMediaContainer = styled9(Stack13)`
|
|
|
5454
6013
|
justify-content: center;
|
|
5455
6014
|
align-items: center;
|
|
5456
6015
|
background-color: rgba( 255, 255, 255, 0.37 );
|
|
6016
|
+
color: ${PREVIEW_ICON_COLOR};
|
|
5457
6017
|
`;
|
|
5458
6018
|
var MODE_BROWSE = { mode: "browse" };
|
|
5459
6019
|
var MODE_UPLOAD = { mode: "upload" };
|
|
@@ -5466,6 +6026,10 @@ var SvgMediaControl = createControl(({ showIconLibrary = false }) => {
|
|
|
5466
6026
|
const src = attachment?.url ?? url?.value ?? null;
|
|
5467
6027
|
const { data: allowSvgUpload } = useUnfilteredFilesUpload();
|
|
5468
6028
|
const [unfilteredModalOpenState, setUnfilteredModalOpenState] = useState16(false);
|
|
6029
|
+
const iconLibraryPopoverState = usePopupState8({ variant: "popover" });
|
|
6030
|
+
const controlContainerRef = useRef15(null);
|
|
6031
|
+
const buttonGroupRef = useRef15(null);
|
|
6032
|
+
const [iconLibraryAnchor, setIconLibraryAnchor] = useState16(null);
|
|
5469
6033
|
const { isAdmin } = useCurrentUserCapabilities();
|
|
5470
6034
|
const selectedIconClass = showIconLibrary && typeof iconValue?.value?.value === "string" ? iconValue.value.value : null;
|
|
5471
6035
|
const selectedIconLibrary = showIconLibrary && typeof iconValue?.library?.value === "string" ? iconValue.library.value : null;
|
|
@@ -5483,7 +6047,7 @@ var SvgMediaControl = createControl(({ showIconLibrary = false }) => {
|
|
|
5483
6047
|
});
|
|
5484
6048
|
}
|
|
5485
6049
|
});
|
|
5486
|
-
const
|
|
6050
|
+
const handleCloseUnfilteredModal = (enabled) => {
|
|
5487
6051
|
setUnfilteredModalOpenState(false);
|
|
5488
6052
|
if (enabled) {
|
|
5489
6053
|
open(MODE_UPLOAD);
|
|
@@ -5496,127 +6060,123 @@ var SvgMediaControl = createControl(({ showIconLibrary = false }) => {
|
|
|
5496
6060
|
open(openOptions);
|
|
5497
6061
|
}
|
|
5498
6062
|
};
|
|
6063
|
+
const handleSelectSvg = () => {
|
|
6064
|
+
handleClick(MODE_BROWSE);
|
|
6065
|
+
};
|
|
6066
|
+
const handleUpload = () => {
|
|
6067
|
+
handleClick(MODE_UPLOAD);
|
|
6068
|
+
};
|
|
6069
|
+
const handleCloseIconLibrary = () => {
|
|
6070
|
+
iconLibraryPopoverState.close();
|
|
6071
|
+
setIconLibraryAnchor(null);
|
|
6072
|
+
};
|
|
5499
6073
|
const handleIconLibrarySelect = (icon) => {
|
|
5500
|
-
|
|
5501
|
-
|
|
5502
|
-
|
|
5503
|
-
|
|
5504
|
-
|
|
5505
|
-
id: icon.value.id ? {
|
|
5506
|
-
$$type: "image-attachment-id",
|
|
5507
|
-
value: icon.value.id
|
|
5508
|
-
} : null,
|
|
5509
|
-
url: icon.value.url ? urlPropTypeUtil4.create(icon.value.url) : null
|
|
5510
|
-
});
|
|
6074
|
+
setIconValue(createIconPropValue(icon.value, icon.library));
|
|
6075
|
+
};
|
|
6076
|
+
const handleOpenIconLibrary = (event) => {
|
|
6077
|
+
const anchor = measureIconLibraryAnchor(controlContainerRef.current, buttonGroupRef.current);
|
|
6078
|
+
if (!anchor) {
|
|
5511
6079
|
return;
|
|
5512
6080
|
}
|
|
5513
|
-
|
|
5514
|
-
|
|
5515
|
-
}
|
|
5516
|
-
};
|
|
5517
|
-
const infotipProps = {
|
|
5518
|
-
title: __32("Sorry, you can't upload that file yet.", "elementor"),
|
|
5519
|
-
description: /* @__PURE__ */ React81.createElement(React81.Fragment, null, __32("To upload them anyway, ask the site administrator to enable unfiltered", "elementor"), /* @__PURE__ */ React81.createElement("br", null), __32("file uploads.", "elementor")),
|
|
5520
|
-
isEnabled: !isAdmin
|
|
6081
|
+
setIconLibraryAnchor(anchor);
|
|
6082
|
+
iconLibraryPopoverState.open(event);
|
|
5521
6083
|
};
|
|
5522
|
-
|
|
5523
|
-
|
|
5524
|
-
|
|
5525
|
-
isFetching,
|
|
5526
|
-
src,
|
|
5527
|
-
iconClassName: selectedIconClass,
|
|
5528
|
-
iconLibrary: selectedIconLibrary
|
|
6084
|
+
useEffect16(() => {
|
|
6085
|
+
if (!iconLibraryPopoverState.isOpen) {
|
|
6086
|
+
return;
|
|
5529
6087
|
}
|
|
5530
|
-
|
|
5531
|
-
|
|
6088
|
+
const handleResize = () => {
|
|
6089
|
+
const nextAnchor = measureIconLibraryAnchor(controlContainerRef.current, buttonGroupRef.current);
|
|
6090
|
+
if (nextAnchor) {
|
|
6091
|
+
setIconLibraryAnchor(nextAnchor);
|
|
6092
|
+
}
|
|
6093
|
+
};
|
|
6094
|
+
window.addEventListener("resize", handleResize);
|
|
6095
|
+
return () => {
|
|
6096
|
+
window.removeEventListener("resize", handleResize);
|
|
6097
|
+
};
|
|
6098
|
+
}, [iconLibraryPopoverState.isOpen]);
|
|
6099
|
+
const iconLibraryWidth = iconLibraryAnchor?.width ?? ICON_LIBRARY_POPOVER_WIDTH;
|
|
6100
|
+
return /* @__PURE__ */ React85.createElement(Stack15, { gap: 1, "aria-label": __35("SVG control", "elementor") }, /* @__PURE__ */ React85.createElement(EnableUnfilteredModal, { open: unfilteredModalOpenState, onClose: handleCloseUnfilteredModal }), showIconLibrary && iconLibraryAnchor ? /* @__PURE__ */ React85.createElement(
|
|
6101
|
+
Popover6,
|
|
5532
6102
|
{
|
|
5533
|
-
|
|
5534
|
-
|
|
5535
|
-
|
|
6103
|
+
disableScrollLock: true,
|
|
6104
|
+
open: iconLibraryPopoverState.isOpen,
|
|
6105
|
+
onClose: handleCloseIconLibrary,
|
|
6106
|
+
anchorReference: "anchorPosition",
|
|
6107
|
+
anchorPosition: { top: iconLibraryAnchor.top, left: iconLibraryAnchor.left },
|
|
6108
|
+
anchorOrigin: { vertical: "top", horizontal: "left" },
|
|
6109
|
+
transformOrigin: { vertical: "top", horizontal: "left" },
|
|
6110
|
+
marginThreshold: 0,
|
|
6111
|
+
PaperProps: {
|
|
6112
|
+
sx: {
|
|
6113
|
+
width: iconLibraryWidth,
|
|
6114
|
+
minWidth: iconLibraryWidth,
|
|
6115
|
+
maxWidth: iconLibraryWidth,
|
|
6116
|
+
m: 0
|
|
5536
6117
|
}
|
|
5537
6118
|
}
|
|
5538
6119
|
},
|
|
5539
|
-
/* @__PURE__ */
|
|
5540
|
-
|
|
6120
|
+
/* @__PURE__ */ React85.createElement(
|
|
6121
|
+
IconLibraryPopover,
|
|
5541
6122
|
{
|
|
5542
|
-
|
|
5543
|
-
|
|
5544
|
-
|
|
5545
|
-
|
|
5546
|
-
|
|
5547
|
-
|
|
5548
|
-
|
|
5549
|
-
)
|
|
5550
|
-
|
|
6123
|
+
open: iconLibraryPopoverState.isOpen,
|
|
6124
|
+
selectedIconClass,
|
|
6125
|
+
selectedIconLibrary,
|
|
6126
|
+
onSelect: handleIconLibrarySelect,
|
|
6127
|
+
onClose: handleCloseIconLibrary,
|
|
6128
|
+
width: iconLibraryWidth
|
|
6129
|
+
}
|
|
6130
|
+
)
|
|
6131
|
+
) : null, /* @__PURE__ */ React85.createElement(
|
|
6132
|
+
Box18,
|
|
6133
|
+
{
|
|
6134
|
+
ref: controlContainerRef,
|
|
6135
|
+
"data-testid": SVG_MEDIA_CONTROL_CONTAINER_TEST_ID,
|
|
6136
|
+
sx: { width: "100%" }
|
|
6137
|
+
},
|
|
6138
|
+
/* @__PURE__ */ React85.createElement(ControlActions, null, /* @__PURE__ */ React85.createElement(StyledCard, { variant: "outlined" }, /* @__PURE__ */ React85.createElement(StyledCardMediaContainer, null, /* @__PURE__ */ React85.createElement(
|
|
6139
|
+
SvgMediaPreview,
|
|
5551
6140
|
{
|
|
5552
|
-
|
|
5553
|
-
|
|
5554
|
-
|
|
5555
|
-
|
|
5556
|
-
|
|
5557
|
-
|
|
5558
|
-
|
|
5559
|
-
"aria-label": __32("Icon library", "elementor")
|
|
5560
|
-
},
|
|
5561
|
-
__32("Icon library", "elementor")
|
|
5562
|
-
) : null, /* @__PURE__ */ React81.createElement(ConditionalControlInfotip, { ...infotipProps }, /* @__PURE__ */ React81.createElement("span", null, /* @__PURE__ */ React81.createElement(ThemeProvider, { colorScheme: isAdmin ? "light" : "dark" }, /* @__PURE__ */ React81.createElement(
|
|
5563
|
-
Button5,
|
|
6141
|
+
isFetching,
|
|
6142
|
+
src,
|
|
6143
|
+
iconClassName: selectedIconClass,
|
|
6144
|
+
iconLibrary: selectedIconLibrary
|
|
6145
|
+
}
|
|
6146
|
+
)), /* @__PURE__ */ React85.createElement(
|
|
6147
|
+
CardOverlay2,
|
|
5564
6148
|
{
|
|
5565
|
-
|
|
5566
|
-
|
|
5567
|
-
|
|
5568
|
-
|
|
5569
|
-
|
|
5570
|
-
onClick: () => isAdmin && handleClick(MODE_UPLOAD),
|
|
5571
|
-
"aria-label": "Upload SVG"
|
|
6149
|
+
sx: {
|
|
6150
|
+
"&:hover": {
|
|
6151
|
+
backgroundColor: "rgba( 0, 0, 0, 0.75 )"
|
|
6152
|
+
}
|
|
6153
|
+
}
|
|
5572
6154
|
},
|
|
5573
|
-
|
|
5574
|
-
|
|
5575
|
-
|
|
6155
|
+
/* @__PURE__ */ React85.createElement(
|
|
6156
|
+
SvgMediaOverlay,
|
|
6157
|
+
{
|
|
6158
|
+
isAdmin,
|
|
6159
|
+
showIconLibrary,
|
|
6160
|
+
buttonGroupRef,
|
|
6161
|
+
onSelectSvg: handleSelectSvg,
|
|
6162
|
+
onUpload: handleUpload,
|
|
6163
|
+
onOpenIconLibrary: handleOpenIconLibrary,
|
|
6164
|
+
infotipTitle: __35("Sorry, you can't upload that file yet.", "elementor"),
|
|
6165
|
+
infotipDescription: /* @__PURE__ */ React85.createElement(UnfilteredUploadInfotipDescription, null)
|
|
6166
|
+
}
|
|
6167
|
+
)
|
|
6168
|
+
)))
|
|
6169
|
+
));
|
|
5576
6170
|
});
|
|
5577
|
-
|
|
5578
|
-
isFetching,
|
|
5579
|
-
src,
|
|
5580
|
-
iconClassName,
|
|
5581
|
-
iconLibrary
|
|
5582
|
-
}) {
|
|
5583
|
-
useEffect16(() => {
|
|
5584
|
-
if (iconLibrary) {
|
|
5585
|
-
enqueueIconFonts(iconLibrary);
|
|
5586
|
-
}
|
|
5587
|
-
}, [iconLibrary]);
|
|
5588
|
-
if (isFetching) {
|
|
5589
|
-
return /* @__PURE__ */ React81.createElement(CircularProgress3, { role: "progressbar" });
|
|
5590
|
-
}
|
|
5591
|
-
if (iconClassName) {
|
|
5592
|
-
return /* @__PURE__ */ React81.createElement(
|
|
5593
|
-
Box15,
|
|
5594
|
-
{
|
|
5595
|
-
component: "i",
|
|
5596
|
-
className: iconClassName,
|
|
5597
|
-
"aria-label": __32("Preview icon", "elementor"),
|
|
5598
|
-
sx: { fontSize: ICON_PREVIEW_FONT_SIZE }
|
|
5599
|
-
}
|
|
5600
|
-
);
|
|
5601
|
-
}
|
|
5602
|
-
return /* @__PURE__ */ React81.createElement(
|
|
5603
|
-
CardMedia2,
|
|
5604
|
-
{
|
|
5605
|
-
component: "img",
|
|
5606
|
-
image: src,
|
|
5607
|
-
alt: __32("Preview SVG", "elementor"),
|
|
5608
|
-
sx: { maxHeight: "140px", width: `${ICON_PREVIEW_FONT_SIZE}px` }
|
|
5609
|
-
}
|
|
5610
|
-
);
|
|
5611
|
-
}
|
|
6171
|
+
var UnfilteredUploadInfotipDescription = () => /* @__PURE__ */ React85.createElement(React85.Fragment, null, __35("To upload them anyway, ask the site administrator to enable unfiltered", "elementor"), /* @__PURE__ */ React85.createElement("br", null), __35("file uploads.", "elementor"));
|
|
5612
6172
|
|
|
5613
6173
|
// src/controls/video-media-control.tsx
|
|
5614
|
-
import * as
|
|
6174
|
+
import * as React86 from "react";
|
|
5615
6175
|
import { urlPropTypeUtil as urlPropTypeUtil5, videoSrcPropTypeUtil } from "@elementor/editor-props";
|
|
5616
6176
|
import { UploadIcon as UploadIcon3 } from "@elementor/icons";
|
|
5617
|
-
import { Button as Button6, Card as Card3, CardMedia as CardMedia3, CardOverlay as CardOverlay3, CircularProgress as
|
|
6177
|
+
import { Button as Button6, Card as Card3, CardMedia as CardMedia3, CardOverlay as CardOverlay3, CircularProgress as CircularProgress5, Stack as Stack16 } from "@elementor/ui";
|
|
5618
6178
|
import { useWpMediaAttachment as useWpMediaAttachment3, useWpMediaFrame as useWpMediaFrame3 } from "@elementor/wp-media";
|
|
5619
|
-
import { __ as
|
|
6179
|
+
import { __ as __36 } from "@wordpress/i18n";
|
|
5620
6180
|
var PLACEHOLDER_IMAGE = window.elementorCommon?.config?.urls?.assets + "/shapes/play-triangle.svg";
|
|
5621
6181
|
var VideoMediaControl = createControl(() => {
|
|
5622
6182
|
const { value, setValue, propType } = useBoundProp(videoSrcPropTypeUtil);
|
|
@@ -5646,7 +6206,7 @@ var VideoMediaControl = createControl(() => {
|
|
|
5646
6206
|
});
|
|
5647
6207
|
}
|
|
5648
6208
|
});
|
|
5649
|
-
return /* @__PURE__ */
|
|
6209
|
+
return /* @__PURE__ */ React86.createElement(ControlActions, null, /* @__PURE__ */ React86.createElement(Card3, { variant: "outlined" }, /* @__PURE__ */ React86.createElement(
|
|
5650
6210
|
CardMedia3,
|
|
5651
6211
|
{
|
|
5652
6212
|
sx: {
|
|
@@ -5661,8 +6221,8 @@ var VideoMediaControl = createControl(() => {
|
|
|
5661
6221
|
alignItems: "center"
|
|
5662
6222
|
}
|
|
5663
6223
|
},
|
|
5664
|
-
/* @__PURE__ */
|
|
5665
|
-
), /* @__PURE__ */
|
|
6224
|
+
/* @__PURE__ */ React86.createElement(VideoPreview, { isFetching, videoUrl })
|
|
6225
|
+
), /* @__PURE__ */ React86.createElement(CardOverlay3, null, /* @__PURE__ */ React86.createElement(Stack16, { gap: 1 }, /* @__PURE__ */ React86.createElement(
|
|
5666
6226
|
Button6,
|
|
5667
6227
|
{
|
|
5668
6228
|
size: "tiny",
|
|
@@ -5670,18 +6230,18 @@ var VideoMediaControl = createControl(() => {
|
|
|
5670
6230
|
variant: "outlined",
|
|
5671
6231
|
onClick: () => open({ mode: "browse" })
|
|
5672
6232
|
},
|
|
5673
|
-
|
|
5674
|
-
), /* @__PURE__ */
|
|
6233
|
+
__36("Select video", "elementor")
|
|
6234
|
+
), /* @__PURE__ */ React86.createElement(
|
|
5675
6235
|
Button6,
|
|
5676
6236
|
{
|
|
5677
6237
|
size: "tiny",
|
|
5678
6238
|
variant: "text",
|
|
5679
6239
|
color: "inherit",
|
|
5680
|
-
startIcon: /* @__PURE__ */
|
|
6240
|
+
startIcon: /* @__PURE__ */ React86.createElement(UploadIcon3, null),
|
|
5681
6241
|
onClick: () => open({ mode: "upload" })
|
|
5682
6242
|
},
|
|
5683
|
-
|
|
5684
|
-
), /* @__PURE__ */
|
|
6243
|
+
__36("Upload", "elementor")
|
|
6244
|
+
), /* @__PURE__ */ React86.createElement(
|
|
5685
6245
|
Button6,
|
|
5686
6246
|
{
|
|
5687
6247
|
size: "tiny",
|
|
@@ -5689,18 +6249,18 @@ var VideoMediaControl = createControl(() => {
|
|
|
5689
6249
|
color: "inherit",
|
|
5690
6250
|
onClick: () => open({ mode: "url", currentUrl: currentUrlForModal })
|
|
5691
6251
|
},
|
|
5692
|
-
|
|
6252
|
+
__36("Insert from URL", "elementor")
|
|
5693
6253
|
)))));
|
|
5694
6254
|
});
|
|
5695
6255
|
var VideoPreview = ({ isFetching = false, videoUrl }) => {
|
|
5696
6256
|
if (isFetching) {
|
|
5697
|
-
return /* @__PURE__ */
|
|
6257
|
+
return /* @__PURE__ */ React86.createElement(CircularProgress5, null);
|
|
5698
6258
|
}
|
|
5699
6259
|
if (videoUrl) {
|
|
5700
|
-
return /* @__PURE__ */
|
|
6260
|
+
return /* @__PURE__ */ React86.createElement(
|
|
5701
6261
|
"video",
|
|
5702
6262
|
{
|
|
5703
|
-
"aria-label":
|
|
6263
|
+
"aria-label": __36("Video preview", "elementor"),
|
|
5704
6264
|
src: videoUrl,
|
|
5705
6265
|
muted: true,
|
|
5706
6266
|
preload: "metadata",
|
|
@@ -5713,33 +6273,33 @@ var VideoPreview = ({ isFetching = false, videoUrl }) => {
|
|
|
5713
6273
|
}
|
|
5714
6274
|
);
|
|
5715
6275
|
}
|
|
5716
|
-
return /* @__PURE__ */
|
|
6276
|
+
return /* @__PURE__ */ React86.createElement("img", { src: PLACEHOLDER_IMAGE, alt: "No video selected" });
|
|
5717
6277
|
};
|
|
5718
6278
|
|
|
5719
6279
|
// src/controls/background-control/background-control.tsx
|
|
5720
|
-
import * as
|
|
6280
|
+
import * as React93 from "react";
|
|
5721
6281
|
import { backgroundPropTypeUtil } from "@elementor/editor-props";
|
|
5722
6282
|
import { Grid as Grid18 } from "@elementor/ui";
|
|
5723
|
-
import { __ as
|
|
6283
|
+
import { __ as __42 } from "@wordpress/i18n";
|
|
5724
6284
|
|
|
5725
6285
|
// src/controls/background-control/background-overlay/background-overlay-repeater-control.tsx
|
|
5726
|
-
import * as
|
|
6286
|
+
import * as React92 from "react";
|
|
5727
6287
|
import {
|
|
5728
6288
|
backgroundColorOverlayPropTypeUtil as backgroundColorOverlayPropTypeUtil2,
|
|
5729
6289
|
backgroundImageOverlayPropTypeUtil as backgroundImageOverlayPropTypeUtil2,
|
|
5730
6290
|
backgroundOverlayPropTypeUtil,
|
|
5731
6291
|
colorPropTypeUtil as colorPropTypeUtil3
|
|
5732
6292
|
} from "@elementor/editor-props";
|
|
5733
|
-
import { Box as
|
|
6293
|
+
import { Box as Box19, CardMedia as CardMedia4, styled as styled12, Tab, TabPanel, Tabs, UnstableColorIndicator as UnstableColorIndicator3 } from "@elementor/ui";
|
|
5734
6294
|
import { useWpMediaAttachment as useWpMediaAttachment4 } from "@elementor/wp-media";
|
|
5735
|
-
import { __ as
|
|
6295
|
+
import { __ as __41 } from "@wordpress/i18n";
|
|
5736
6296
|
|
|
5737
6297
|
// src/env.ts
|
|
5738
6298
|
import { parseEnv } from "@elementor/env";
|
|
5739
6299
|
var { env } = parseEnv("@elementor/editor-controls");
|
|
5740
6300
|
|
|
5741
6301
|
// src/controls/background-control/background-gradient-color-control.tsx
|
|
5742
|
-
import * as
|
|
6302
|
+
import * as React87 from "react";
|
|
5743
6303
|
import {
|
|
5744
6304
|
backgroundGradientOverlayPropTypeUtil,
|
|
5745
6305
|
colorPropTypeUtil as colorPropTypeUtil2,
|
|
@@ -5786,7 +6346,7 @@ var BackgroundGradientColorControl = createControl(() => {
|
|
|
5786
6346
|
positions: positions?.value.split(" ")
|
|
5787
6347
|
};
|
|
5788
6348
|
};
|
|
5789
|
-
return /* @__PURE__ */
|
|
6349
|
+
return /* @__PURE__ */ React87.createElement(
|
|
5790
6350
|
UnstableGradientBox,
|
|
5791
6351
|
{
|
|
5792
6352
|
sx: { width: "auto", padding: 1.5 },
|
|
@@ -5811,53 +6371,53 @@ var initialBackgroundGradientOverlay = backgroundGradientOverlayPropTypeUtil.cre
|
|
|
5811
6371
|
});
|
|
5812
6372
|
|
|
5813
6373
|
// src/controls/background-control/background-overlay/background-image-overlay/background-image-overlay-attachment.tsx
|
|
5814
|
-
import * as
|
|
6374
|
+
import * as React88 from "react";
|
|
5815
6375
|
import { PinIcon, PinnedOffIcon } from "@elementor/icons";
|
|
5816
6376
|
import { Grid as Grid14 } from "@elementor/ui";
|
|
5817
|
-
import { __ as
|
|
6377
|
+
import { __ as __37 } from "@wordpress/i18n";
|
|
5818
6378
|
var attachmentControlOptions = [
|
|
5819
6379
|
{
|
|
5820
6380
|
value: "fixed",
|
|
5821
|
-
label:
|
|
5822
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
6381
|
+
label: __37("Fixed", "elementor"),
|
|
6382
|
+
renderContent: ({ size }) => /* @__PURE__ */ React88.createElement(PinIcon, { fontSize: size }),
|
|
5823
6383
|
showTooltip: true
|
|
5824
6384
|
},
|
|
5825
6385
|
{
|
|
5826
6386
|
value: "scroll",
|
|
5827
|
-
label:
|
|
5828
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
6387
|
+
label: __37("Scroll", "elementor"),
|
|
6388
|
+
renderContent: ({ size }) => /* @__PURE__ */ React88.createElement(PinnedOffIcon, { fontSize: size }),
|
|
5829
6389
|
showTooltip: true
|
|
5830
6390
|
}
|
|
5831
6391
|
];
|
|
5832
6392
|
var BackgroundImageOverlayAttachment = () => {
|
|
5833
|
-
return /* @__PURE__ */
|
|
6393
|
+
return /* @__PURE__ */ React88.createElement(PopoverGridContainer, null, /* @__PURE__ */ React88.createElement(Grid14, { item: true, xs: 6 }, /* @__PURE__ */ React88.createElement(ControlFormLabel, null, __37("Attachment", "elementor"))), /* @__PURE__ */ React88.createElement(Grid14, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end", overflow: "hidden" } }, /* @__PURE__ */ React88.createElement(ToggleControl, { options: attachmentControlOptions })));
|
|
5834
6394
|
};
|
|
5835
6395
|
|
|
5836
6396
|
// src/controls/background-control/background-overlay/background-image-overlay/background-image-overlay-position.tsx
|
|
5837
|
-
import * as
|
|
5838
|
-
import { useRef as
|
|
6397
|
+
import * as React89 from "react";
|
|
6398
|
+
import { useRef as useRef16 } from "react";
|
|
5839
6399
|
import { backgroundImagePositionOffsetPropTypeUtil, stringPropTypeUtil as stringPropTypeUtil16 } from "@elementor/editor-props";
|
|
5840
6400
|
import { MenuListItem as MenuListItem6 } from "@elementor/editor-ui";
|
|
5841
6401
|
import { LetterXIcon, LetterYIcon } from "@elementor/icons";
|
|
5842
6402
|
import { Grid as Grid15, Select as Select4 } from "@elementor/ui";
|
|
5843
|
-
import { __ as
|
|
6403
|
+
import { __ as __38 } from "@wordpress/i18n";
|
|
5844
6404
|
var backgroundPositionOptions = [
|
|
5845
|
-
{ label:
|
|
5846
|
-
{ label:
|
|
5847
|
-
{ label:
|
|
5848
|
-
{ label:
|
|
5849
|
-
{ label:
|
|
5850
|
-
{ label:
|
|
5851
|
-
{ label:
|
|
5852
|
-
{ label:
|
|
5853
|
-
{ label:
|
|
5854
|
-
{ label:
|
|
6405
|
+
{ label: __38("Center center", "elementor"), value: "center center" },
|
|
6406
|
+
{ label: __38("Center left", "elementor"), value: "center left" },
|
|
6407
|
+
{ label: __38("Center right", "elementor"), value: "center right" },
|
|
6408
|
+
{ label: __38("Top center", "elementor"), value: "top center" },
|
|
6409
|
+
{ label: __38("Top left", "elementor"), value: "top left" },
|
|
6410
|
+
{ label: __38("Top right", "elementor"), value: "top right" },
|
|
6411
|
+
{ label: __38("Bottom center", "elementor"), value: "bottom center" },
|
|
6412
|
+
{ label: __38("Bottom left", "elementor"), value: "bottom left" },
|
|
6413
|
+
{ label: __38("Bottom right", "elementor"), value: "bottom right" },
|
|
6414
|
+
{ label: __38("Custom", "elementor"), value: "custom" }
|
|
5855
6415
|
];
|
|
5856
6416
|
var BackgroundImageOverlayPosition = () => {
|
|
5857
6417
|
const backgroundImageOffsetContext = useBoundProp(backgroundImagePositionOffsetPropTypeUtil);
|
|
5858
6418
|
const stringPropContext = useBoundProp(stringPropTypeUtil16);
|
|
5859
6419
|
const isCustom = !!backgroundImageOffsetContext.value;
|
|
5860
|
-
const rowRef =
|
|
6420
|
+
const rowRef = useRef16(null);
|
|
5861
6421
|
const handlePositionChange = (event) => {
|
|
5862
6422
|
const value = event.target.value || null;
|
|
5863
6423
|
if (value === "custom") {
|
|
@@ -5866,7 +6426,7 @@ var BackgroundImageOverlayPosition = () => {
|
|
|
5866
6426
|
stringPropContext.setValue(value);
|
|
5867
6427
|
}
|
|
5868
6428
|
};
|
|
5869
|
-
return /* @__PURE__ */
|
|
6429
|
+
return /* @__PURE__ */ React89.createElement(Grid15, { container: true, spacing: 1.5 }, /* @__PURE__ */ React89.createElement(Grid15, { item: true, xs: 12 }, /* @__PURE__ */ React89.createElement(PopoverGridContainer, null, /* @__PURE__ */ React89.createElement(Grid15, { item: true, xs: 6 }, /* @__PURE__ */ React89.createElement(ControlFormLabel, null, __38("Position", "elementor"))), /* @__PURE__ */ React89.createElement(Grid15, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end", overflow: "hidden" } }, /* @__PURE__ */ React89.createElement(ControlActions, null, /* @__PURE__ */ React89.createElement(
|
|
5870
6430
|
Select4,
|
|
5871
6431
|
{
|
|
5872
6432
|
fullWidth: true,
|
|
@@ -5875,18 +6435,18 @@ var BackgroundImageOverlayPosition = () => {
|
|
|
5875
6435
|
disabled: stringPropContext.disabled,
|
|
5876
6436
|
value: (backgroundImageOffsetContext.value ? "custom" : stringPropContext.value) ?? ""
|
|
5877
6437
|
},
|
|
5878
|
-
backgroundPositionOptions.map(({ label, value }) => /* @__PURE__ */
|
|
5879
|
-
))))), isCustom ? /* @__PURE__ */
|
|
6438
|
+
backgroundPositionOptions.map(({ label, value }) => /* @__PURE__ */ React89.createElement(MenuListItem6, { key: value, value: value ?? "" }, label))
|
|
6439
|
+
))))), isCustom ? /* @__PURE__ */ React89.createElement(PropProvider, { ...backgroundImageOffsetContext }, /* @__PURE__ */ React89.createElement(Grid15, { item: true, xs: 12 }, /* @__PURE__ */ React89.createElement(Grid15, { container: true, spacing: 1.5, ref: rowRef }, /* @__PURE__ */ React89.createElement(Grid15, { item: true, xs: 6 }, /* @__PURE__ */ React89.createElement(PropKeyProvider, { bind: "x" }, /* @__PURE__ */ React89.createElement(
|
|
5880
6440
|
SizeControl,
|
|
5881
6441
|
{
|
|
5882
|
-
startIcon: /* @__PURE__ */
|
|
6442
|
+
startIcon: /* @__PURE__ */ React89.createElement(LetterXIcon, { fontSize: "tiny" }),
|
|
5883
6443
|
anchorRef: rowRef,
|
|
5884
6444
|
min: -Number.MAX_SAFE_INTEGER
|
|
5885
6445
|
}
|
|
5886
|
-
))), /* @__PURE__ */
|
|
6446
|
+
))), /* @__PURE__ */ React89.createElement(Grid15, { item: true, xs: 6 }, /* @__PURE__ */ React89.createElement(PropKeyProvider, { bind: "y" }, /* @__PURE__ */ React89.createElement(
|
|
5887
6447
|
SizeControl,
|
|
5888
6448
|
{
|
|
5889
|
-
startIcon: /* @__PURE__ */
|
|
6449
|
+
startIcon: /* @__PURE__ */ React89.createElement(LetterYIcon, { fontSize: "tiny" }),
|
|
5890
6450
|
anchorRef: rowRef,
|
|
5891
6451
|
min: -Number.MAX_SAFE_INTEGER
|
|
5892
6452
|
}
|
|
@@ -5894,43 +6454,43 @@ var BackgroundImageOverlayPosition = () => {
|
|
|
5894
6454
|
};
|
|
5895
6455
|
|
|
5896
6456
|
// src/controls/background-control/background-overlay/background-image-overlay/background-image-overlay-repeat.tsx
|
|
5897
|
-
import * as
|
|
6457
|
+
import * as React90 from "react";
|
|
5898
6458
|
import { DotsHorizontalIcon, DotsVerticalIcon, GridDotsIcon, XIcon as XIcon3 } from "@elementor/icons";
|
|
5899
6459
|
import { Grid as Grid16 } from "@elementor/ui";
|
|
5900
|
-
import { __ as
|
|
6460
|
+
import { __ as __39 } from "@wordpress/i18n";
|
|
5901
6461
|
var repeatControlOptions = [
|
|
5902
6462
|
{
|
|
5903
6463
|
value: "repeat",
|
|
5904
|
-
label:
|
|
5905
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
6464
|
+
label: __39("Repeat", "elementor"),
|
|
6465
|
+
renderContent: ({ size }) => /* @__PURE__ */ React90.createElement(GridDotsIcon, { fontSize: size }),
|
|
5906
6466
|
showTooltip: true
|
|
5907
6467
|
},
|
|
5908
6468
|
{
|
|
5909
6469
|
value: "repeat-x",
|
|
5910
|
-
label:
|
|
5911
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
6470
|
+
label: __39("Repeat-x", "elementor"),
|
|
6471
|
+
renderContent: ({ size }) => /* @__PURE__ */ React90.createElement(DotsHorizontalIcon, { fontSize: size }),
|
|
5912
6472
|
showTooltip: true
|
|
5913
6473
|
},
|
|
5914
6474
|
{
|
|
5915
6475
|
value: "repeat-y",
|
|
5916
|
-
label:
|
|
5917
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
6476
|
+
label: __39("Repeat-y", "elementor"),
|
|
6477
|
+
renderContent: ({ size }) => /* @__PURE__ */ React90.createElement(DotsVerticalIcon, { fontSize: size }),
|
|
5918
6478
|
showTooltip: true
|
|
5919
6479
|
},
|
|
5920
6480
|
{
|
|
5921
6481
|
value: "no-repeat",
|
|
5922
|
-
label:
|
|
5923
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
6482
|
+
label: __39("No-repeat", "elementor"),
|
|
6483
|
+
renderContent: ({ size }) => /* @__PURE__ */ React90.createElement(XIcon3, { fontSize: size }),
|
|
5924
6484
|
showTooltip: true
|
|
5925
6485
|
}
|
|
5926
6486
|
];
|
|
5927
6487
|
var BackgroundImageOverlayRepeat = () => {
|
|
5928
|
-
return /* @__PURE__ */
|
|
6488
|
+
return /* @__PURE__ */ React90.createElement(PopoverGridContainer, null, /* @__PURE__ */ React90.createElement(Grid16, { item: true, xs: 6 }, /* @__PURE__ */ React90.createElement(ControlFormLabel, null, __39("Repeat", "elementor"))), /* @__PURE__ */ React90.createElement(Grid16, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React90.createElement(ToggleControl, { options: repeatControlOptions })));
|
|
5929
6489
|
};
|
|
5930
6490
|
|
|
5931
6491
|
// src/controls/background-control/background-overlay/background-image-overlay/background-image-overlay-size.tsx
|
|
5932
|
-
import * as
|
|
5933
|
-
import { useRef as
|
|
6492
|
+
import * as React91 from "react";
|
|
6493
|
+
import { useRef as useRef17 } from "react";
|
|
5934
6494
|
import { backgroundImageSizeScalePropTypeUtil, stringPropTypeUtil as stringPropTypeUtil17 } from "@elementor/editor-props";
|
|
5935
6495
|
import {
|
|
5936
6496
|
ArrowBarBothIcon,
|
|
@@ -5941,30 +6501,30 @@ import {
|
|
|
5941
6501
|
PencilIcon
|
|
5942
6502
|
} from "@elementor/icons";
|
|
5943
6503
|
import { Grid as Grid17 } from "@elementor/ui";
|
|
5944
|
-
import { __ as
|
|
6504
|
+
import { __ as __40 } from "@wordpress/i18n";
|
|
5945
6505
|
var sizeControlOptions = [
|
|
5946
6506
|
{
|
|
5947
6507
|
value: "auto",
|
|
5948
|
-
label:
|
|
5949
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
6508
|
+
label: __40("Auto", "elementor"),
|
|
6509
|
+
renderContent: ({ size }) => /* @__PURE__ */ React91.createElement(LetterAIcon, { fontSize: size }),
|
|
5950
6510
|
showTooltip: true
|
|
5951
6511
|
},
|
|
5952
6512
|
{
|
|
5953
6513
|
value: "cover",
|
|
5954
|
-
label:
|
|
5955
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
6514
|
+
label: __40("Cover", "elementor"),
|
|
6515
|
+
renderContent: ({ size }) => /* @__PURE__ */ React91.createElement(ArrowsMaximizeIcon, { fontSize: size }),
|
|
5956
6516
|
showTooltip: true
|
|
5957
6517
|
},
|
|
5958
6518
|
{
|
|
5959
6519
|
value: "contain",
|
|
5960
|
-
label:
|
|
5961
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
6520
|
+
label: __40("Contain", "elementor"),
|
|
6521
|
+
renderContent: ({ size }) => /* @__PURE__ */ React91.createElement(ArrowBarBothIcon, { fontSize: size }),
|
|
5962
6522
|
showTooltip: true
|
|
5963
6523
|
},
|
|
5964
6524
|
{
|
|
5965
6525
|
value: "custom",
|
|
5966
|
-
label:
|
|
5967
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
6526
|
+
label: __40("Custom", "elementor"),
|
|
6527
|
+
renderContent: ({ size }) => /* @__PURE__ */ React91.createElement(PencilIcon, { fontSize: size }),
|
|
5968
6528
|
showTooltip: true
|
|
5969
6529
|
}
|
|
5970
6530
|
];
|
|
@@ -5972,7 +6532,7 @@ var BackgroundImageOverlaySize = () => {
|
|
|
5972
6532
|
const backgroundImageScaleContext = useBoundProp(backgroundImageSizeScalePropTypeUtil);
|
|
5973
6533
|
const stringPropContext = useBoundProp(stringPropTypeUtil17);
|
|
5974
6534
|
const isCustom = !!backgroundImageScaleContext.value;
|
|
5975
|
-
const rowRef =
|
|
6535
|
+
const rowRef = useRef17(null);
|
|
5976
6536
|
const handleSizeChange = (size) => {
|
|
5977
6537
|
if (size === "custom") {
|
|
5978
6538
|
backgroundImageScaleContext.setValue({ width: null, height: null });
|
|
@@ -5980,7 +6540,7 @@ var BackgroundImageOverlaySize = () => {
|
|
|
5980
6540
|
stringPropContext.setValue(size);
|
|
5981
6541
|
}
|
|
5982
6542
|
};
|
|
5983
|
-
return /* @__PURE__ */
|
|
6543
|
+
return /* @__PURE__ */ React91.createElement(Grid17, { container: true, spacing: 1.5 }, /* @__PURE__ */ React91.createElement(Grid17, { item: true, xs: 12 }, /* @__PURE__ */ React91.createElement(PopoverGridContainer, null, /* @__PURE__ */ React91.createElement(Grid17, { item: true, xs: 6 }, /* @__PURE__ */ React91.createElement(ControlFormLabel, null, __40("Size", "elementor"))), /* @__PURE__ */ React91.createElement(Grid17, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React91.createElement(
|
|
5984
6544
|
ControlToggleButtonGroup,
|
|
5985
6545
|
{
|
|
5986
6546
|
exclusive: true,
|
|
@@ -5989,17 +6549,17 @@ var BackgroundImageOverlaySize = () => {
|
|
|
5989
6549
|
disabled: stringPropContext.disabled,
|
|
5990
6550
|
value: backgroundImageScaleContext.value ? "custom" : stringPropContext.value
|
|
5991
6551
|
}
|
|
5992
|
-
)))), isCustom ? /* @__PURE__ */
|
|
6552
|
+
)))), isCustom ? /* @__PURE__ */ React91.createElement(PropProvider, { ...backgroundImageScaleContext }, /* @__PURE__ */ React91.createElement(Grid17, { item: true, xs: 12, ref: rowRef }, /* @__PURE__ */ React91.createElement(PopoverGridContainer, null, /* @__PURE__ */ React91.createElement(Grid17, { item: true, xs: 6 }, /* @__PURE__ */ React91.createElement(PropKeyProvider, { bind: "width" }, /* @__PURE__ */ React91.createElement(
|
|
5993
6553
|
SizeControl,
|
|
5994
6554
|
{
|
|
5995
|
-
startIcon: /* @__PURE__ */
|
|
6555
|
+
startIcon: /* @__PURE__ */ React91.createElement(ArrowsMoveHorizontalIcon2, { fontSize: "tiny" }),
|
|
5996
6556
|
extendedOptions: ["auto"],
|
|
5997
6557
|
anchorRef: rowRef
|
|
5998
6558
|
}
|
|
5999
|
-
))), /* @__PURE__ */
|
|
6559
|
+
))), /* @__PURE__ */ React91.createElement(Grid17, { item: true, xs: 6 }, /* @__PURE__ */ React91.createElement(PropKeyProvider, { bind: "height" }, /* @__PURE__ */ React91.createElement(
|
|
6000
6560
|
SizeControl,
|
|
6001
6561
|
{
|
|
6002
|
-
startIcon: /* @__PURE__ */
|
|
6562
|
+
startIcon: /* @__PURE__ */ React91.createElement(ArrowsMoveVerticalIcon2, { fontSize: "tiny" }),
|
|
6003
6563
|
extendedOptions: ["auto"],
|
|
6004
6564
|
anchorRef: rowRef
|
|
6005
6565
|
}
|
|
@@ -6007,7 +6567,7 @@ var BackgroundImageOverlaySize = () => {
|
|
|
6007
6567
|
};
|
|
6008
6568
|
|
|
6009
6569
|
// src/controls/background-control/background-overlay/use-background-tabs-history.ts
|
|
6010
|
-
import { useRef as
|
|
6570
|
+
import { useRef as useRef18 } from "react";
|
|
6011
6571
|
import {
|
|
6012
6572
|
backgroundColorOverlayPropTypeUtil,
|
|
6013
6573
|
backgroundGradientOverlayPropTypeUtil as backgroundGradientOverlayPropTypeUtil2,
|
|
@@ -6032,7 +6592,7 @@ var useBackgroundTabsHistory = ({
|
|
|
6032
6592
|
return "image";
|
|
6033
6593
|
};
|
|
6034
6594
|
const { getTabsProps, getTabProps, getTabPanelProps } = useTabs(getCurrentOverlayType());
|
|
6035
|
-
const valuesHistory =
|
|
6595
|
+
const valuesHistory = useRef18({
|
|
6036
6596
|
image: initialBackgroundImageOverlay,
|
|
6037
6597
|
color: initialBackgroundColorOverlay2,
|
|
6038
6598
|
gradient: initialBackgroundGradientOverlay2
|
|
@@ -6100,29 +6660,29 @@ var getInitialBackgroundOverlay = () => ({
|
|
|
6100
6660
|
}
|
|
6101
6661
|
});
|
|
6102
6662
|
var backgroundResolutionOptions = [
|
|
6103
|
-
{ label:
|
|
6104
|
-
{ label:
|
|
6105
|
-
{ label:
|
|
6106
|
-
{ label:
|
|
6663
|
+
{ label: __41("Thumbnail - 150 x 150", "elementor"), value: "thumbnail" },
|
|
6664
|
+
{ label: __41("Medium - 300 x 300", "elementor"), value: "medium" },
|
|
6665
|
+
{ label: __41("Large 1024 x 1024", "elementor"), value: "large" },
|
|
6666
|
+
{ label: __41("Full", "elementor"), value: "full" }
|
|
6107
6667
|
];
|
|
6108
6668
|
var BackgroundOverlayRepeaterControl = createControl(() => {
|
|
6109
6669
|
const { propType, value: overlayValues, setValue } = useBoundProp(backgroundOverlayPropTypeUtil);
|
|
6110
|
-
return /* @__PURE__ */
|
|
6670
|
+
return /* @__PURE__ */ React92.createElement(PropProvider, { propType, value: overlayValues, setValue }, /* @__PURE__ */ React92.createElement(
|
|
6111
6671
|
ControlRepeater,
|
|
6112
6672
|
{
|
|
6113
6673
|
initial: getInitialBackgroundOverlay(),
|
|
6114
6674
|
propTypeUtil: backgroundOverlayPropTypeUtil
|
|
6115
6675
|
},
|
|
6116
|
-
/* @__PURE__ */
|
|
6117
|
-
/* @__PURE__ */
|
|
6676
|
+
/* @__PURE__ */ React92.createElement(RepeaterHeader, { label: __41("Overlay", "elementor") }, /* @__PURE__ */ React92.createElement(TooltipAddItemAction, { newItemIndex: 0 })),
|
|
6677
|
+
/* @__PURE__ */ React92.createElement(ItemsContainer, null, /* @__PURE__ */ React92.createElement(
|
|
6118
6678
|
Item,
|
|
6119
6679
|
{
|
|
6120
6680
|
Icon: ItemIcon2,
|
|
6121
6681
|
Label: ItemLabel3,
|
|
6122
|
-
actions: /* @__PURE__ */
|
|
6682
|
+
actions: /* @__PURE__ */ React92.createElement(React92.Fragment, null, /* @__PURE__ */ React92.createElement(DuplicateItemAction, null), /* @__PURE__ */ React92.createElement(DisableItemAction, null), /* @__PURE__ */ React92.createElement(RemoveItemAction, null))
|
|
6123
6683
|
}
|
|
6124
6684
|
)),
|
|
6125
|
-
/* @__PURE__ */
|
|
6685
|
+
/* @__PURE__ */ React92.createElement(EditItemPopover, null, /* @__PURE__ */ React92.createElement(ItemContent2, null))
|
|
6126
6686
|
));
|
|
6127
6687
|
});
|
|
6128
6688
|
var ItemContent2 = () => {
|
|
@@ -6132,27 +6692,27 @@ var ItemContent2 = () => {
|
|
|
6132
6692
|
gradient: initialBackgroundGradientOverlay.value
|
|
6133
6693
|
});
|
|
6134
6694
|
const { rowRef } = useRepeaterContext();
|
|
6135
|
-
return /* @__PURE__ */
|
|
6695
|
+
return /* @__PURE__ */ React92.createElement(Box19, { sx: { width: "100%" } }, /* @__PURE__ */ React92.createElement(Box19, { sx: { borderBottom: 1, borderColor: "divider" } }, /* @__PURE__ */ React92.createElement(
|
|
6136
6696
|
Tabs,
|
|
6137
6697
|
{
|
|
6138
6698
|
size: "small",
|
|
6139
6699
|
variant: "fullWidth",
|
|
6140
6700
|
...getTabsProps(),
|
|
6141
|
-
"aria-label":
|
|
6701
|
+
"aria-label": __41("Background Overlay", "elementor")
|
|
6142
6702
|
},
|
|
6143
|
-
/* @__PURE__ */
|
|
6144
|
-
/* @__PURE__ */
|
|
6145
|
-
/* @__PURE__ */
|
|
6146
|
-
)), /* @__PURE__ */
|
|
6703
|
+
/* @__PURE__ */ React92.createElement(Tab, { label: __41("Image", "elementor"), ...getTabProps("image") }),
|
|
6704
|
+
/* @__PURE__ */ React92.createElement(Tab, { label: __41("Gradient", "elementor"), ...getTabProps("gradient") }),
|
|
6705
|
+
/* @__PURE__ */ React92.createElement(Tab, { label: __41("Color", "elementor"), ...getTabProps("color") })
|
|
6706
|
+
)), /* @__PURE__ */ React92.createElement(TabPanel, { sx: { p: 1.5 }, ...getTabPanelProps("image") }, /* @__PURE__ */ React92.createElement(PopoverContent, null, /* @__PURE__ */ React92.createElement(ImageOverlayContent, null))), /* @__PURE__ */ React92.createElement(TabPanel, { sx: { p: 1.5 }, ...getTabPanelProps("gradient") }, /* @__PURE__ */ React92.createElement(BackgroundGradientColorControl, null)), /* @__PURE__ */ React92.createElement(TabPanel, { sx: { p: 1.5 }, ...getTabPanelProps("color") }, /* @__PURE__ */ React92.createElement(PopoverContent, null, /* @__PURE__ */ React92.createElement(ColorOverlayContent, { anchorEl: rowRef }))));
|
|
6147
6707
|
};
|
|
6148
6708
|
var ItemIcon2 = ({ value }) => {
|
|
6149
6709
|
switch (value.$$type) {
|
|
6150
6710
|
case "background-image-overlay":
|
|
6151
|
-
return /* @__PURE__ */
|
|
6711
|
+
return /* @__PURE__ */ React92.createElement(ItemIconImage, { value });
|
|
6152
6712
|
case "background-color-overlay":
|
|
6153
|
-
return /* @__PURE__ */
|
|
6713
|
+
return /* @__PURE__ */ React92.createElement(ItemIconColor, { value });
|
|
6154
6714
|
case "background-gradient-overlay":
|
|
6155
|
-
return /* @__PURE__ */
|
|
6715
|
+
return /* @__PURE__ */ React92.createElement(ItemIconGradient, { value });
|
|
6156
6716
|
default:
|
|
6157
6717
|
return null;
|
|
6158
6718
|
}
|
|
@@ -6165,11 +6725,11 @@ var extractColorFrom = (prop) => {
|
|
|
6165
6725
|
};
|
|
6166
6726
|
var ItemIconColor = ({ value: prop }) => {
|
|
6167
6727
|
const color = extractColorFrom(prop);
|
|
6168
|
-
return /* @__PURE__ */
|
|
6728
|
+
return /* @__PURE__ */ React92.createElement(StyledUnstableColorIndicator3, { size: "inherit", component: "span", value: color });
|
|
6169
6729
|
};
|
|
6170
6730
|
var ItemIconImage = ({ value }) => {
|
|
6171
6731
|
const { imageUrl } = useImage(value);
|
|
6172
|
-
return /* @__PURE__ */
|
|
6732
|
+
return /* @__PURE__ */ React92.createElement(
|
|
6173
6733
|
CardMedia4,
|
|
6174
6734
|
{
|
|
6175
6735
|
image: imageUrl,
|
|
@@ -6184,43 +6744,43 @@ var ItemIconImage = ({ value }) => {
|
|
|
6184
6744
|
};
|
|
6185
6745
|
var ItemIconGradient = ({ value }) => {
|
|
6186
6746
|
const gradient = getGradientValue(value);
|
|
6187
|
-
return /* @__PURE__ */
|
|
6747
|
+
return /* @__PURE__ */ React92.createElement(StyledUnstableColorIndicator3, { size: "inherit", component: "span", value: gradient });
|
|
6188
6748
|
};
|
|
6189
6749
|
var ItemLabel3 = ({ value }) => {
|
|
6190
6750
|
switch (value.$$type) {
|
|
6191
6751
|
case "background-image-overlay":
|
|
6192
|
-
return /* @__PURE__ */
|
|
6752
|
+
return /* @__PURE__ */ React92.createElement(ItemLabelImage, { value });
|
|
6193
6753
|
case "background-color-overlay":
|
|
6194
|
-
return /* @__PURE__ */
|
|
6754
|
+
return /* @__PURE__ */ React92.createElement(ItemLabelColor, { value });
|
|
6195
6755
|
case "background-gradient-overlay":
|
|
6196
|
-
return /* @__PURE__ */
|
|
6756
|
+
return /* @__PURE__ */ React92.createElement(ItemLabelGradient, { value });
|
|
6197
6757
|
default:
|
|
6198
6758
|
return null;
|
|
6199
6759
|
}
|
|
6200
6760
|
};
|
|
6201
6761
|
var ItemLabelColor = ({ value: prop }) => {
|
|
6202
6762
|
const color = extractColorFrom(prop);
|
|
6203
|
-
return /* @__PURE__ */
|
|
6763
|
+
return /* @__PURE__ */ React92.createElement("span", null, color);
|
|
6204
6764
|
};
|
|
6205
6765
|
var ItemLabelImage = ({ value }) => {
|
|
6206
6766
|
const { imageTitle } = useImage(value);
|
|
6207
|
-
return /* @__PURE__ */
|
|
6767
|
+
return /* @__PURE__ */ React92.createElement("span", null, imageTitle);
|
|
6208
6768
|
};
|
|
6209
6769
|
var ItemLabelGradient = ({ value }) => {
|
|
6210
6770
|
if (value.value.type.value === "linear") {
|
|
6211
|
-
return /* @__PURE__ */
|
|
6771
|
+
return /* @__PURE__ */ React92.createElement("span", null, __41("Linear Gradient", "elementor"));
|
|
6212
6772
|
}
|
|
6213
|
-
return /* @__PURE__ */
|
|
6773
|
+
return /* @__PURE__ */ React92.createElement("span", null, __41("Radial Gradient", "elementor"));
|
|
6214
6774
|
};
|
|
6215
6775
|
var ColorOverlayContent = ({ anchorEl }) => {
|
|
6216
6776
|
const propContext = useBoundProp(backgroundColorOverlayPropTypeUtil2);
|
|
6217
|
-
return /* @__PURE__ */
|
|
6777
|
+
return /* @__PURE__ */ React92.createElement(PropProvider, { ...propContext }, /* @__PURE__ */ React92.createElement(PropKeyProvider, { bind: "color" }, /* @__PURE__ */ React92.createElement(ColorControl, { anchorEl })));
|
|
6218
6778
|
};
|
|
6219
6779
|
var ImageOverlayContent = () => {
|
|
6220
6780
|
const propContext = useBoundProp(backgroundImageOverlayPropTypeUtil2);
|
|
6221
|
-
return /* @__PURE__ */
|
|
6781
|
+
return /* @__PURE__ */ React92.createElement(PropProvider, { ...propContext }, /* @__PURE__ */ React92.createElement(PropKeyProvider, { bind: "image" }, /* @__PURE__ */ React92.createElement(ImageControl, { sizes: backgroundResolutionOptions })), /* @__PURE__ */ React92.createElement(PropKeyProvider, { bind: "position" }, /* @__PURE__ */ React92.createElement(BackgroundImageOverlayPosition, null)), /* @__PURE__ */ React92.createElement(PropKeyProvider, { bind: "repeat" }, /* @__PURE__ */ React92.createElement(BackgroundImageOverlayRepeat, null)), /* @__PURE__ */ React92.createElement(PropKeyProvider, { bind: "size" }, /* @__PURE__ */ React92.createElement(BackgroundImageOverlaySize, null)), /* @__PURE__ */ React92.createElement(PropKeyProvider, { bind: "attachment" }, /* @__PURE__ */ React92.createElement(BackgroundImageOverlayAttachment, null)));
|
|
6222
6782
|
};
|
|
6223
|
-
var StyledUnstableColorIndicator3 =
|
|
6783
|
+
var StyledUnstableColorIndicator3 = styled12(UnstableColorIndicator3)(({ theme }) => ({
|
|
6224
6784
|
height: "1rem",
|
|
6225
6785
|
width: "1rem",
|
|
6226
6786
|
borderRadius: `${theme.shape.borderRadius / 2}px`
|
|
@@ -6259,29 +6819,29 @@ var getGradientValue = (value) => {
|
|
|
6259
6819
|
|
|
6260
6820
|
// src/controls/background-control/background-control.tsx
|
|
6261
6821
|
var clipOptions = [
|
|
6262
|
-
{ label:
|
|
6263
|
-
{ label:
|
|
6264
|
-
{ label:
|
|
6265
|
-
{ label:
|
|
6822
|
+
{ label: __42("Full element", "elementor"), value: "border-box" },
|
|
6823
|
+
{ label: __42("Padding edges", "elementor"), value: "padding-box" },
|
|
6824
|
+
{ label: __42("Content edges", "elementor"), value: "content-box" },
|
|
6825
|
+
{ label: __42("Text", "elementor"), value: "text" }
|
|
6266
6826
|
];
|
|
6267
|
-
var colorLabel =
|
|
6268
|
-
var clipLabel =
|
|
6827
|
+
var colorLabel = __42("Color", "elementor");
|
|
6828
|
+
var clipLabel = __42("Clipping", "elementor");
|
|
6269
6829
|
var BackgroundControl = createControl(() => {
|
|
6270
6830
|
const propContext = useBoundProp(backgroundPropTypeUtil);
|
|
6271
|
-
return /* @__PURE__ */
|
|
6831
|
+
return /* @__PURE__ */ React93.createElement(PropProvider, { ...propContext }, /* @__PURE__ */ React93.createElement(PropKeyProvider, { bind: "background-overlay" }, /* @__PURE__ */ React93.createElement(BackgroundOverlayRepeaterControl, null)), /* @__PURE__ */ React93.createElement(BackgroundColorField, null), /* @__PURE__ */ React93.createElement(BackgroundClipField, null));
|
|
6272
6832
|
});
|
|
6273
6833
|
var BackgroundColorField = () => {
|
|
6274
|
-
return /* @__PURE__ */
|
|
6834
|
+
return /* @__PURE__ */ React93.createElement(PropKeyProvider, { bind: "color" }, /* @__PURE__ */ React93.createElement(Grid18, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React93.createElement(Grid18, { item: true, xs: 6 }, /* @__PURE__ */ React93.createElement(ControlLabel, null, colorLabel)), /* @__PURE__ */ React93.createElement(Grid18, { item: true, xs: 6 }, /* @__PURE__ */ React93.createElement(ColorControl, null))));
|
|
6275
6835
|
};
|
|
6276
6836
|
var BackgroundClipField = () => {
|
|
6277
|
-
return /* @__PURE__ */
|
|
6837
|
+
return /* @__PURE__ */ React93.createElement(PropKeyProvider, { bind: "clip" }, /* @__PURE__ */ React93.createElement(Grid18, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React93.createElement(Grid18, { item: true, xs: 6 }, /* @__PURE__ */ React93.createElement(ControlLabel, null, clipLabel)), /* @__PURE__ */ React93.createElement(Grid18, { item: true, xs: 6 }, /* @__PURE__ */ React93.createElement(SelectControl, { options: clipOptions }))));
|
|
6278
6838
|
};
|
|
6279
6839
|
|
|
6280
6840
|
// src/controls/repeatable-control.tsx
|
|
6281
|
-
import * as
|
|
6282
|
-
import { useMemo as
|
|
6841
|
+
import * as React94 from "react";
|
|
6842
|
+
import { useMemo as useMemo13 } from "react";
|
|
6283
6843
|
import { createArrayPropUtils as createArrayPropUtils2 } from "@elementor/editor-props";
|
|
6284
|
-
import { Box as
|
|
6844
|
+
import { Box as Box20 } from "@elementor/ui";
|
|
6285
6845
|
var PLACEHOLDER_REGEX = /\$\{([^}]+)\}/g;
|
|
6286
6846
|
var RepeatableControl = createControl(
|
|
6287
6847
|
({
|
|
@@ -6300,11 +6860,11 @@ var RepeatableControl = createControl(
|
|
|
6300
6860
|
if (!childPropTypeUtil) {
|
|
6301
6861
|
return null;
|
|
6302
6862
|
}
|
|
6303
|
-
const childArrayPropTypeUtil2 =
|
|
6863
|
+
const childArrayPropTypeUtil2 = useMemo13(
|
|
6304
6864
|
() => createArrayPropUtils2(childPropTypeUtil.key, childPropTypeUtil.schema, propKey),
|
|
6305
6865
|
[childPropTypeUtil.key, childPropTypeUtil.schema, propKey]
|
|
6306
6866
|
);
|
|
6307
|
-
const contextValue =
|
|
6867
|
+
const contextValue = useMemo13(
|
|
6308
6868
|
() => ({
|
|
6309
6869
|
...childControlConfig,
|
|
6310
6870
|
placeholder: placeholder || "",
|
|
@@ -6314,14 +6874,14 @@ var RepeatableControl = createControl(
|
|
|
6314
6874
|
);
|
|
6315
6875
|
const { propType, value, setValue } = useBoundProp(childArrayPropTypeUtil2);
|
|
6316
6876
|
const newItemIndex = addItemTooltipProps?.newItemIndex === null ? void 0 : 0;
|
|
6317
|
-
return /* @__PURE__ */
|
|
6877
|
+
return /* @__PURE__ */ React94.createElement(PropProvider, { propType, value, setValue }, /* @__PURE__ */ React94.createElement(RepeatableControlContext.Provider, { value: contextValue }, /* @__PURE__ */ React94.createElement(
|
|
6318
6878
|
ControlRepeater,
|
|
6319
6879
|
{
|
|
6320
6880
|
initial: childPropTypeUtil.create(initialValues || null),
|
|
6321
6881
|
propTypeUtil: childArrayPropTypeUtil2,
|
|
6322
6882
|
isItemDisabled: isItemDisabled2
|
|
6323
6883
|
},
|
|
6324
|
-
/* @__PURE__ */
|
|
6884
|
+
/* @__PURE__ */ React94.createElement(RepeaterHeader, { label: repeaterLabel }, /* @__PURE__ */ React94.createElement(
|
|
6325
6885
|
TooltipAddItemAction,
|
|
6326
6886
|
{
|
|
6327
6887
|
...addItemTooltipProps,
|
|
@@ -6329,22 +6889,22 @@ var RepeatableControl = createControl(
|
|
|
6329
6889
|
ariaLabel: repeaterLabel
|
|
6330
6890
|
}
|
|
6331
6891
|
)),
|
|
6332
|
-
/* @__PURE__ */
|
|
6892
|
+
/* @__PURE__ */ React94.createElement(ItemsContainer, { isSortable }, /* @__PURE__ */ React94.createElement(
|
|
6333
6893
|
Item,
|
|
6334
6894
|
{
|
|
6335
6895
|
Icon: ItemIcon3,
|
|
6336
6896
|
Label: ItemLabel4,
|
|
6337
|
-
actions: /* @__PURE__ */
|
|
6897
|
+
actions: /* @__PURE__ */ React94.createElement(React94.Fragment, null, showDuplicate && /* @__PURE__ */ React94.createElement(DuplicateItemAction, null), showToggle && /* @__PURE__ */ React94.createElement(DisableItemAction, null), /* @__PURE__ */ React94.createElement(RemoveItemAction, null))
|
|
6338
6898
|
}
|
|
6339
6899
|
)),
|
|
6340
|
-
/* @__PURE__ */
|
|
6900
|
+
/* @__PURE__ */ React94.createElement(EditItemPopover, null, /* @__PURE__ */ React94.createElement(Content2, null))
|
|
6341
6901
|
)));
|
|
6342
6902
|
}
|
|
6343
6903
|
);
|
|
6344
|
-
var ItemIcon3 = () => /* @__PURE__ */
|
|
6904
|
+
var ItemIcon3 = () => /* @__PURE__ */ React94.createElement(React94.Fragment, null);
|
|
6345
6905
|
var Content2 = () => {
|
|
6346
6906
|
const { component: ChildControl, props = {} } = useRepeatableControlContext();
|
|
6347
|
-
return /* @__PURE__ */
|
|
6907
|
+
return /* @__PURE__ */ React94.createElement(PopoverContent, { p: 1.5 }, /* @__PURE__ */ React94.createElement(PopoverGridContainer, null, /* @__PURE__ */ React94.createElement(ChildControl, { ...props })));
|
|
6348
6908
|
};
|
|
6349
6909
|
var interpolate = (template, data) => {
|
|
6350
6910
|
if (!data) {
|
|
@@ -6427,7 +6987,7 @@ var ItemLabel4 = ({ value }) => {
|
|
|
6427
6987
|
const label = showPlaceholder ? placeholder : interpolate(patternLabel, value);
|
|
6428
6988
|
const isReadOnly = !!childProps?.readOnly;
|
|
6429
6989
|
const color = getTextColor(isReadOnly, showPlaceholder);
|
|
6430
|
-
return /* @__PURE__ */
|
|
6990
|
+
return /* @__PURE__ */ React94.createElement(Box20, { component: "span", color }, label);
|
|
6431
6991
|
};
|
|
6432
6992
|
var getAllProperties = (pattern) => {
|
|
6433
6993
|
const properties = pattern.match(PLACEHOLDER_REGEX)?.map((match) => match.slice(2, -1)) || [];
|
|
@@ -6435,15 +6995,15 @@ var getAllProperties = (pattern) => {
|
|
|
6435
6995
|
};
|
|
6436
6996
|
|
|
6437
6997
|
// src/controls/key-value-control.tsx
|
|
6438
|
-
import * as
|
|
6439
|
-
import { useMemo as
|
|
6998
|
+
import * as React95 from "react";
|
|
6999
|
+
import { useMemo as useMemo14, useState as useState17 } from "react";
|
|
6440
7000
|
import {
|
|
6441
7001
|
isTransformable,
|
|
6442
7002
|
keyValuePropTypeUtil,
|
|
6443
7003
|
stringPropTypeUtil as stringPropTypeUtil18
|
|
6444
7004
|
} from "@elementor/editor-props";
|
|
6445
7005
|
import { FormHelperText, FormLabel as FormLabel3, Grid as Grid19 } from "@elementor/ui";
|
|
6446
|
-
import { __ as
|
|
7006
|
+
import { __ as __43 } from "@wordpress/i18n";
|
|
6447
7007
|
|
|
6448
7008
|
// src/utils/escape-html-attr.ts
|
|
6449
7009
|
var escapeHtmlAttr = (value) => {
|
|
@@ -6473,17 +7033,17 @@ var KeyValueControl = createControl((props = {}) => {
|
|
|
6473
7033
|
key: getInitialFieldValue(value?.key),
|
|
6474
7034
|
value: getInitialFieldValue(value?.value)
|
|
6475
7035
|
});
|
|
6476
|
-
const keyLabel = props.keyName ||
|
|
6477
|
-
const valueLabel = props.valueName ||
|
|
7036
|
+
const keyLabel = props.keyName || __43("Key", "elementor");
|
|
7037
|
+
const valueLabel = props.valueName || __43("Value", "elementor");
|
|
6478
7038
|
const { keyHelper, valueHelper } = props.getHelperText?.(sessionState.key, sessionState.value) || {
|
|
6479
7039
|
keyHelper: void 0,
|
|
6480
7040
|
valueHelper: void 0
|
|
6481
7041
|
};
|
|
6482
|
-
const [keyRegex, valueRegex, errMsg] =
|
|
7042
|
+
const [keyRegex, valueRegex, errMsg] = useMemo14(
|
|
6483
7043
|
() => [
|
|
6484
7044
|
props.regexKey ? new RegExp(props.regexKey) : void 0,
|
|
6485
7045
|
props.regexValue ? new RegExp(props.regexValue) : void 0,
|
|
6486
|
-
props.validationErrorMessage ||
|
|
7046
|
+
props.validationErrorMessage || __43("Invalid Format", "elementor")
|
|
6487
7047
|
],
|
|
6488
7048
|
[props.regexKey, props.regexValue, props.validationErrorMessage]
|
|
6489
7049
|
);
|
|
@@ -6532,14 +7092,14 @@ var KeyValueControl = createControl((props = {}) => {
|
|
|
6532
7092
|
});
|
|
6533
7093
|
}
|
|
6534
7094
|
};
|
|
6535
|
-
return /* @__PURE__ */
|
|
7095
|
+
return /* @__PURE__ */ React95.createElement(PropProvider, { ...propContext, value, setValue: handleChange }, /* @__PURE__ */ React95.createElement(Grid19, { container: true, gap: 1.5 }, /* @__PURE__ */ React95.createElement(Grid19, { item: true, xs: 12, display: "flex", flexDirection: "column" }, /* @__PURE__ */ React95.createElement(FormLabel3, { size: "tiny", sx: { pb: 1 } }, keyLabel), /* @__PURE__ */ React95.createElement(PropKeyProvider, { bind: "key" }, /* @__PURE__ */ React95.createElement(
|
|
6536
7096
|
TextControl,
|
|
6537
7097
|
{
|
|
6538
7098
|
inputValue: props.escapeHtml ? escapeHtmlAttr(sessionState.key) : sessionState.key,
|
|
6539
7099
|
error: !!keyError,
|
|
6540
7100
|
helperText: keyHelper
|
|
6541
7101
|
}
|
|
6542
|
-
)), !!keyError && /* @__PURE__ */
|
|
7102
|
+
)), !!keyError && /* @__PURE__ */ React95.createElement(FormHelperText, { error: true }, keyError)), /* @__PURE__ */ React95.createElement(Grid19, { item: true, xs: 12, display: "flex", flexDirection: "column" }, /* @__PURE__ */ React95.createElement(FormLabel3, { size: "tiny", sx: { pb: 1 } }, valueLabel), /* @__PURE__ */ React95.createElement(PropKeyProvider, { bind: "value" }, /* @__PURE__ */ React95.createElement(
|
|
6543
7103
|
TextControl,
|
|
6544
7104
|
{
|
|
6545
7105
|
inputValue: props.escapeHtml ? escapeHtmlAttr(sessionState.value) : sessionState.value,
|
|
@@ -6547,27 +7107,27 @@ var KeyValueControl = createControl((props = {}) => {
|
|
|
6547
7107
|
inputDisabled: !!keyError,
|
|
6548
7108
|
helperText: valueHelper
|
|
6549
7109
|
}
|
|
6550
|
-
)), !!valueError && /* @__PURE__ */
|
|
7110
|
+
)), !!valueError && /* @__PURE__ */ React95.createElement(FormHelperText, { error: true }, valueError))));
|
|
6551
7111
|
});
|
|
6552
7112
|
|
|
6553
7113
|
// src/controls/position-control.tsx
|
|
6554
|
-
import * as
|
|
7114
|
+
import * as React96 from "react";
|
|
6555
7115
|
import { positionPropTypeUtil, stringPropTypeUtil as stringPropTypeUtil19 } from "@elementor/editor-props";
|
|
6556
7116
|
import { MenuListItem as MenuListItem7 } from "@elementor/editor-ui";
|
|
6557
7117
|
import { LetterXIcon as LetterXIcon2, LetterYIcon as LetterYIcon2 } from "@elementor/icons";
|
|
6558
7118
|
import { Grid as Grid20, Select as Select5 } from "@elementor/ui";
|
|
6559
|
-
import { __ as
|
|
7119
|
+
import { __ as __44 } from "@wordpress/i18n";
|
|
6560
7120
|
var positionOptions = [
|
|
6561
|
-
{ label:
|
|
6562
|
-
{ label:
|
|
6563
|
-
{ label:
|
|
6564
|
-
{ label:
|
|
6565
|
-
{ label:
|
|
6566
|
-
{ label:
|
|
6567
|
-
{ label:
|
|
6568
|
-
{ label:
|
|
6569
|
-
{ label:
|
|
6570
|
-
{ label:
|
|
7121
|
+
{ label: __44("Center center", "elementor"), value: "center center" },
|
|
7122
|
+
{ label: __44("Center left", "elementor"), value: "center left" },
|
|
7123
|
+
{ label: __44("Center right", "elementor"), value: "center right" },
|
|
7124
|
+
{ label: __44("Top center", "elementor"), value: "top center" },
|
|
7125
|
+
{ label: __44("Top left", "elementor"), value: "top left" },
|
|
7126
|
+
{ label: __44("Top right", "elementor"), value: "top right" },
|
|
7127
|
+
{ label: __44("Bottom center", "elementor"), value: "bottom center" },
|
|
7128
|
+
{ label: __44("Bottom left", "elementor"), value: "bottom left" },
|
|
7129
|
+
{ label: __44("Bottom right", "elementor"), value: "bottom right" },
|
|
7130
|
+
{ label: __44("Custom", "elementor"), value: "custom" }
|
|
6571
7131
|
];
|
|
6572
7132
|
var PositionControl = () => {
|
|
6573
7133
|
const positionContext = useBoundProp(positionPropTypeUtil);
|
|
@@ -6582,7 +7142,7 @@ var PositionControl = () => {
|
|
|
6582
7142
|
stringPropContext.setValue(value);
|
|
6583
7143
|
}
|
|
6584
7144
|
};
|
|
6585
|
-
return /* @__PURE__ */
|
|
7145
|
+
return /* @__PURE__ */ React96.createElement(Grid20, { container: true, spacing: 1.5 }, /* @__PURE__ */ React96.createElement(Grid20, { item: true, xs: 12 }, /* @__PURE__ */ React96.createElement(Grid20, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React96.createElement(Grid20, { item: true, xs: 6 }, /* @__PURE__ */ React96.createElement(ControlFormLabel, null, __44("Object position", "elementor"))), /* @__PURE__ */ React96.createElement(Grid20, { item: true, xs: 6, sx: { overflow: "hidden" } }, /* @__PURE__ */ React96.createElement(
|
|
6586
7146
|
Select5,
|
|
6587
7147
|
{
|
|
6588
7148
|
size: "tiny",
|
|
@@ -6593,29 +7153,29 @@ var PositionControl = () => {
|
|
|
6593
7153
|
renderValue: (selectedValue) => getSelectRenderValue(positionOptions, placeholder, selectedValue),
|
|
6594
7154
|
fullWidth: true
|
|
6595
7155
|
},
|
|
6596
|
-
positionOptions.map(({ label, value }) => /* @__PURE__ */
|
|
6597
|
-
)))), isCustom && /* @__PURE__ */
|
|
7156
|
+
positionOptions.map(({ label, value }) => /* @__PURE__ */ React96.createElement(MenuListItem7, { key: value, value: value ?? "" }, label))
|
|
7157
|
+
)))), isCustom && /* @__PURE__ */ React96.createElement(PropProvider, { ...positionContext }, /* @__PURE__ */ React96.createElement(Grid20, { item: true, xs: 12 }, /* @__PURE__ */ React96.createElement(Grid20, { container: true, spacing: 1.5 }, /* @__PURE__ */ React96.createElement(Grid20, { item: true, xs: 6 }, /* @__PURE__ */ React96.createElement(PropKeyProvider, { bind: "x" }, /* @__PURE__ */ React96.createElement(
|
|
6598
7158
|
SizeControl,
|
|
6599
7159
|
{
|
|
6600
|
-
startIcon: /* @__PURE__ */
|
|
7160
|
+
startIcon: /* @__PURE__ */ React96.createElement(LetterXIcon2, { fontSize: "tiny" }),
|
|
6601
7161
|
min: -Number.MAX_SAFE_INTEGER
|
|
6602
7162
|
}
|
|
6603
|
-
))), /* @__PURE__ */
|
|
7163
|
+
))), /* @__PURE__ */ React96.createElement(Grid20, { item: true, xs: 6 }, /* @__PURE__ */ React96.createElement(PropKeyProvider, { bind: "y" }, /* @__PURE__ */ React96.createElement(
|
|
6604
7164
|
SizeControl,
|
|
6605
7165
|
{
|
|
6606
|
-
startIcon: /* @__PURE__ */
|
|
7166
|
+
startIcon: /* @__PURE__ */ React96.createElement(LetterYIcon2, { fontSize: "tiny" }),
|
|
6607
7167
|
min: -Number.MAX_SAFE_INTEGER
|
|
6608
7168
|
}
|
|
6609
7169
|
)))))));
|
|
6610
7170
|
};
|
|
6611
7171
|
|
|
6612
7172
|
// src/controls/transform-control/transform-repeater-control.tsx
|
|
6613
|
-
import * as
|
|
6614
|
-
import { useRef as
|
|
7173
|
+
import * as React109 from "react";
|
|
7174
|
+
import { useRef as useRef26 } from "react";
|
|
6615
7175
|
import { transformFunctionsPropTypeUtil, transformPropTypeUtil } from "@elementor/editor-props";
|
|
6616
7176
|
import { AdjustmentsIcon as AdjustmentsIcon2, InfoCircleFilledIcon as InfoCircleFilledIcon2 } from "@elementor/icons";
|
|
6617
|
-
import { bindTrigger as bindTrigger5, Box as
|
|
6618
|
-
import { __ as
|
|
7177
|
+
import { bindTrigger as bindTrigger5, Box as Box24, IconButton as IconButton8, Tooltip as Tooltip8, Typography as Typography9, usePopupState as usePopupState9 } from "@elementor/ui";
|
|
7178
|
+
import { __ as __54 } from "@wordpress/i18n";
|
|
6619
7179
|
|
|
6620
7180
|
// src/controls/transform-control/initial-values.ts
|
|
6621
7181
|
import {
|
|
@@ -6669,24 +7229,24 @@ var initialSkewValue = skewTransformPropTypeUtil.create({
|
|
|
6669
7229
|
});
|
|
6670
7230
|
|
|
6671
7231
|
// src/controls/transform-control/transform-content.tsx
|
|
6672
|
-
import * as
|
|
6673
|
-
import { Box as
|
|
6674
|
-
import { __ as
|
|
7232
|
+
import * as React103 from "react";
|
|
7233
|
+
import { Box as Box21, Tab as Tab2, TabPanel as TabPanel2, Tabs as Tabs2 } from "@elementor/ui";
|
|
7234
|
+
import { __ as __49 } from "@wordpress/i18n";
|
|
6675
7235
|
|
|
6676
7236
|
// src/controls/transform-control/functions/move.tsx
|
|
6677
|
-
import * as
|
|
6678
|
-
import { useRef as
|
|
7237
|
+
import * as React98 from "react";
|
|
7238
|
+
import { useRef as useRef19 } from "react";
|
|
6679
7239
|
import { moveTransformPropTypeUtil } from "@elementor/editor-props";
|
|
6680
7240
|
import { ArrowDownLeftIcon, ArrowDownSmallIcon, ArrowRightIcon } from "@elementor/icons";
|
|
6681
7241
|
import { Grid as Grid22 } from "@elementor/ui";
|
|
6682
|
-
import { __ as
|
|
7242
|
+
import { __ as __45 } from "@wordpress/i18n";
|
|
6683
7243
|
|
|
6684
7244
|
// src/controls/transform-control/functions/axis-row.tsx
|
|
6685
|
-
import * as
|
|
7245
|
+
import * as React97 from "react";
|
|
6686
7246
|
import { Grid as Grid21 } from "@elementor/ui";
|
|
6687
7247
|
var AxisRow = ({ label, bind, startIcon, anchorRef, units: units2, variant = "angle" }) => {
|
|
6688
7248
|
const safeId = label.replace(/\s+/g, "-").toLowerCase();
|
|
6689
|
-
return /* @__PURE__ */
|
|
7249
|
+
return /* @__PURE__ */ React97.createElement(Grid21, { item: true, xs: 12 }, /* @__PURE__ */ React97.createElement(PopoverGridContainer, { ref: anchorRef }, /* @__PURE__ */ React97.createElement(Grid21, { item: true, xs: 6 }, /* @__PURE__ */ React97.createElement(ControlLabel, { htmlFor: safeId }, label)), /* @__PURE__ */ React97.createElement(Grid21, { item: true, xs: 6 }, /* @__PURE__ */ React97.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React97.createElement(
|
|
6690
7250
|
SizeControl,
|
|
6691
7251
|
{
|
|
6692
7252
|
anchorRef,
|
|
@@ -6702,28 +7262,28 @@ var AxisRow = ({ label, bind, startIcon, anchorRef, units: units2, variant = "an
|
|
|
6702
7262
|
// src/controls/transform-control/functions/move.tsx
|
|
6703
7263
|
var moveAxisControls = [
|
|
6704
7264
|
{
|
|
6705
|
-
label:
|
|
7265
|
+
label: __45("Move X", "elementor"),
|
|
6706
7266
|
bind: "x",
|
|
6707
|
-
startIcon: /* @__PURE__ */
|
|
7267
|
+
startIcon: /* @__PURE__ */ React98.createElement(ArrowRightIcon, { fontSize: "tiny" }),
|
|
6708
7268
|
units: ["px", "%", "em", "rem", "vw"]
|
|
6709
7269
|
},
|
|
6710
7270
|
{
|
|
6711
|
-
label:
|
|
7271
|
+
label: __45("Move Y", "elementor"),
|
|
6712
7272
|
bind: "y",
|
|
6713
|
-
startIcon: /* @__PURE__ */
|
|
7273
|
+
startIcon: /* @__PURE__ */ React98.createElement(ArrowDownSmallIcon, { fontSize: "tiny" }),
|
|
6714
7274
|
units: ["px", "%", "em", "rem", "vh"]
|
|
6715
7275
|
},
|
|
6716
7276
|
{
|
|
6717
|
-
label:
|
|
7277
|
+
label: __45("Move Z", "elementor"),
|
|
6718
7278
|
bind: "z",
|
|
6719
|
-
startIcon: /* @__PURE__ */
|
|
7279
|
+
startIcon: /* @__PURE__ */ React98.createElement(ArrowDownLeftIcon, { fontSize: "tiny" }),
|
|
6720
7280
|
units: ["px", "%", "em", "rem", "vw", "vh"]
|
|
6721
7281
|
}
|
|
6722
7282
|
];
|
|
6723
7283
|
var Move = () => {
|
|
6724
7284
|
const context = useBoundProp(moveTransformPropTypeUtil);
|
|
6725
|
-
const rowRefs = [
|
|
6726
|
-
return /* @__PURE__ */
|
|
7285
|
+
const rowRefs = [useRef19(null), useRef19(null), useRef19(null)];
|
|
7286
|
+
return /* @__PURE__ */ React98.createElement(Grid22, { container: true, spacing: 1.5 }, /* @__PURE__ */ React98.createElement(PropProvider, { ...context }, /* @__PURE__ */ React98.createElement(PropKeyProvider, { bind: TransformFunctionKeys.move }, moveAxisControls.map((control, index) => /* @__PURE__ */ React98.createElement(
|
|
6727
7287
|
AxisRow,
|
|
6728
7288
|
{
|
|
6729
7289
|
key: control.bind,
|
|
@@ -6736,34 +7296,34 @@ var Move = () => {
|
|
|
6736
7296
|
};
|
|
6737
7297
|
|
|
6738
7298
|
// src/controls/transform-control/functions/rotate.tsx
|
|
6739
|
-
import * as
|
|
6740
|
-
import { useRef as
|
|
7299
|
+
import * as React99 from "react";
|
|
7300
|
+
import { useRef as useRef20 } from "react";
|
|
6741
7301
|
import { rotateTransformPropTypeUtil as rotateTransformPropTypeUtil2 } from "@elementor/editor-props";
|
|
6742
7302
|
import { Arrow360Icon, RotateClockwiseIcon } from "@elementor/icons";
|
|
6743
7303
|
import { Grid as Grid23 } from "@elementor/ui";
|
|
6744
|
-
import { __ as
|
|
7304
|
+
import { __ as __46 } from "@wordpress/i18n";
|
|
6745
7305
|
var rotateAxisControls = [
|
|
6746
7306
|
{
|
|
6747
|
-
label:
|
|
7307
|
+
label: __46("Rotate X", "elementor"),
|
|
6748
7308
|
bind: "x",
|
|
6749
|
-
startIcon: /* @__PURE__ */
|
|
7309
|
+
startIcon: /* @__PURE__ */ React99.createElement(Arrow360Icon, { fontSize: "tiny" })
|
|
6750
7310
|
},
|
|
6751
7311
|
{
|
|
6752
|
-
label:
|
|
7312
|
+
label: __46("Rotate Y", "elementor"),
|
|
6753
7313
|
bind: "y",
|
|
6754
|
-
startIcon: /* @__PURE__ */
|
|
7314
|
+
startIcon: /* @__PURE__ */ React99.createElement(Arrow360Icon, { fontSize: "tiny", style: { transform: "scaleX(-1) rotate(-90deg)" } })
|
|
6755
7315
|
},
|
|
6756
7316
|
{
|
|
6757
|
-
label:
|
|
7317
|
+
label: __46("Rotate Z", "elementor"),
|
|
6758
7318
|
bind: "z",
|
|
6759
|
-
startIcon: /* @__PURE__ */
|
|
7319
|
+
startIcon: /* @__PURE__ */ React99.createElement(RotateClockwiseIcon, { fontSize: "tiny" })
|
|
6760
7320
|
}
|
|
6761
7321
|
];
|
|
6762
7322
|
var rotateUnits = ["deg", "rad", "grad", "turn"];
|
|
6763
7323
|
var Rotate = () => {
|
|
6764
7324
|
const context = useBoundProp(rotateTransformPropTypeUtil2);
|
|
6765
|
-
const rowRefs = [
|
|
6766
|
-
return /* @__PURE__ */
|
|
7325
|
+
const rowRefs = [useRef20(null), useRef20(null), useRef20(null)];
|
|
7326
|
+
return /* @__PURE__ */ React99.createElement(Grid23, { container: true, spacing: 1.5 }, /* @__PURE__ */ React99.createElement(PropProvider, { ...context }, /* @__PURE__ */ React99.createElement(PropKeyProvider, { bind: TransformFunctionKeys.rotate }, rotateAxisControls.map((control, index) => /* @__PURE__ */ React99.createElement(
|
|
6767
7327
|
AxisRow,
|
|
6768
7328
|
{
|
|
6769
7329
|
key: control.bind,
|
|
@@ -6775,68 +7335,68 @@ var Rotate = () => {
|
|
|
6775
7335
|
};
|
|
6776
7336
|
|
|
6777
7337
|
// src/controls/transform-control/functions/scale.tsx
|
|
6778
|
-
import * as
|
|
6779
|
-
import { useRef as
|
|
7338
|
+
import * as React101 from "react";
|
|
7339
|
+
import { useRef as useRef21 } from "react";
|
|
6780
7340
|
import { scaleTransformPropTypeUtil as scaleTransformPropTypeUtil2 } from "@elementor/editor-props";
|
|
6781
7341
|
import { ArrowDownLeftIcon as ArrowDownLeftIcon2, ArrowDownSmallIcon as ArrowDownSmallIcon2, ArrowRightIcon as ArrowRightIcon2 } from "@elementor/icons";
|
|
6782
7342
|
import { Grid as Grid25 } from "@elementor/ui";
|
|
6783
|
-
import { __ as
|
|
7343
|
+
import { __ as __47 } from "@wordpress/i18n";
|
|
6784
7344
|
|
|
6785
7345
|
// src/controls/transform-control/functions/scale-axis-row.tsx
|
|
6786
|
-
import * as
|
|
7346
|
+
import * as React100 from "react";
|
|
6787
7347
|
import { Grid as Grid24 } from "@elementor/ui";
|
|
6788
7348
|
var ScaleAxisRow = ({ label, bind, startIcon, anchorRef }) => {
|
|
6789
|
-
return /* @__PURE__ */
|
|
7349
|
+
return /* @__PURE__ */ React100.createElement(Grid24, { item: true, xs: 12 }, /* @__PURE__ */ React100.createElement(PopoverGridContainer, { ref: anchorRef }, /* @__PURE__ */ React100.createElement(Grid24, { item: true, xs: 6 }, /* @__PURE__ */ React100.createElement(ControlLabel, null, label)), /* @__PURE__ */ React100.createElement(Grid24, { item: true, xs: 6 }, /* @__PURE__ */ React100.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React100.createElement(NumberControl, { step: 0.1, placeholder: "1", startIcon })))));
|
|
6790
7350
|
};
|
|
6791
7351
|
|
|
6792
7352
|
// src/controls/transform-control/functions/scale.tsx
|
|
6793
7353
|
var scaleAxisControls = [
|
|
6794
7354
|
{
|
|
6795
|
-
label:
|
|
7355
|
+
label: __47("Scale X", "elementor"),
|
|
6796
7356
|
bind: "x",
|
|
6797
|
-
startIcon: /* @__PURE__ */
|
|
7357
|
+
startIcon: /* @__PURE__ */ React101.createElement(ArrowRightIcon2, { fontSize: "tiny" })
|
|
6798
7358
|
},
|
|
6799
7359
|
{
|
|
6800
|
-
label:
|
|
7360
|
+
label: __47("Scale Y", "elementor"),
|
|
6801
7361
|
bind: "y",
|
|
6802
|
-
startIcon: /* @__PURE__ */
|
|
7362
|
+
startIcon: /* @__PURE__ */ React101.createElement(ArrowDownSmallIcon2, { fontSize: "tiny" })
|
|
6803
7363
|
},
|
|
6804
7364
|
{
|
|
6805
|
-
label:
|
|
7365
|
+
label: __47("Scale Z", "elementor"),
|
|
6806
7366
|
bind: "z",
|
|
6807
|
-
startIcon: /* @__PURE__ */
|
|
7367
|
+
startIcon: /* @__PURE__ */ React101.createElement(ArrowDownLeftIcon2, { fontSize: "tiny" })
|
|
6808
7368
|
}
|
|
6809
7369
|
];
|
|
6810
7370
|
var Scale = () => {
|
|
6811
7371
|
const context = useBoundProp(scaleTransformPropTypeUtil2);
|
|
6812
|
-
const rowRefs = [
|
|
6813
|
-
return /* @__PURE__ */
|
|
7372
|
+
const rowRefs = [useRef21(null), useRef21(null), useRef21(null)];
|
|
7373
|
+
return /* @__PURE__ */ React101.createElement(Grid25, { container: true, spacing: 1.5 }, /* @__PURE__ */ React101.createElement(PropProvider, { ...context }, /* @__PURE__ */ React101.createElement(PropKeyProvider, { bind: TransformFunctionKeys.scale }, scaleAxisControls.map((control, index) => /* @__PURE__ */ React101.createElement(ScaleAxisRow, { key: control.bind, ...control, anchorRef: rowRefs[index] })))));
|
|
6814
7374
|
};
|
|
6815
7375
|
|
|
6816
7376
|
// src/controls/transform-control/functions/skew.tsx
|
|
6817
|
-
import * as
|
|
6818
|
-
import { useRef as
|
|
7377
|
+
import * as React102 from "react";
|
|
7378
|
+
import { useRef as useRef22 } from "react";
|
|
6819
7379
|
import { skewTransformPropTypeUtil as skewTransformPropTypeUtil2 } from "@elementor/editor-props";
|
|
6820
7380
|
import { ArrowLeftIcon, ArrowRightIcon as ArrowRightIcon3 } from "@elementor/icons";
|
|
6821
7381
|
import { Grid as Grid26 } from "@elementor/ui";
|
|
6822
|
-
import { __ as
|
|
7382
|
+
import { __ as __48 } from "@wordpress/i18n";
|
|
6823
7383
|
var skewAxisControls = [
|
|
6824
7384
|
{
|
|
6825
|
-
label:
|
|
7385
|
+
label: __48("Skew X", "elementor"),
|
|
6826
7386
|
bind: "x",
|
|
6827
|
-
startIcon: /* @__PURE__ */
|
|
7387
|
+
startIcon: /* @__PURE__ */ React102.createElement(ArrowRightIcon3, { fontSize: "tiny" })
|
|
6828
7388
|
},
|
|
6829
7389
|
{
|
|
6830
|
-
label:
|
|
7390
|
+
label: __48("Skew Y", "elementor"),
|
|
6831
7391
|
bind: "y",
|
|
6832
|
-
startIcon: /* @__PURE__ */
|
|
7392
|
+
startIcon: /* @__PURE__ */ React102.createElement(ArrowLeftIcon, { fontSize: "tiny", style: { transform: "scaleX(-1) rotate(-90deg)" } })
|
|
6833
7393
|
}
|
|
6834
7394
|
];
|
|
6835
7395
|
var skewUnits = ["deg", "rad", "grad", "turn"];
|
|
6836
7396
|
var Skew = () => {
|
|
6837
7397
|
const context = useBoundProp(skewTransformPropTypeUtil2);
|
|
6838
|
-
const rowRefs = [
|
|
6839
|
-
return /* @__PURE__ */
|
|
7398
|
+
const rowRefs = [useRef22(null), useRef22(null), useRef22(null)];
|
|
7399
|
+
return /* @__PURE__ */ React102.createElement(Grid26, { container: true, spacing: 1.5 }, /* @__PURE__ */ React102.createElement(PropProvider, { ...context }, /* @__PURE__ */ React102.createElement(PropKeyProvider, { bind: TransformFunctionKeys.skew }, skewAxisControls.map((control, index) => /* @__PURE__ */ React102.createElement(
|
|
6840
7400
|
AxisRow,
|
|
6841
7401
|
{
|
|
6842
7402
|
key: control.bind,
|
|
@@ -6848,7 +7408,7 @@ var Skew = () => {
|
|
|
6848
7408
|
};
|
|
6849
7409
|
|
|
6850
7410
|
// src/controls/transform-control/use-transform-tabs-history.tsx
|
|
6851
|
-
import { useRef as
|
|
7411
|
+
import { useRef as useRef23 } from "react";
|
|
6852
7412
|
import {
|
|
6853
7413
|
moveTransformPropTypeUtil as moveTransformPropTypeUtil2,
|
|
6854
7414
|
rotateTransformPropTypeUtil as rotateTransformPropTypeUtil3,
|
|
@@ -6880,7 +7440,7 @@ var useTransformTabsHistory = ({
|
|
|
6880
7440
|
}
|
|
6881
7441
|
};
|
|
6882
7442
|
const { getTabsProps, getTabProps, getTabPanelProps } = useTabs2(getCurrentTransformType());
|
|
6883
|
-
const valuesHistory =
|
|
7443
|
+
const valuesHistory = useRef23({
|
|
6884
7444
|
move: initialMove,
|
|
6885
7445
|
scale: initialScale,
|
|
6886
7446
|
rotate: initialRotate,
|
|
@@ -6941,7 +7501,7 @@ var TransformContent = () => {
|
|
|
6941
7501
|
rotate: initialRotateValue.value,
|
|
6942
7502
|
skew: initialSkewValue.value
|
|
6943
7503
|
});
|
|
6944
|
-
return /* @__PURE__ */
|
|
7504
|
+
return /* @__PURE__ */ React103.createElement(PopoverContent, null, /* @__PURE__ */ React103.createElement(Box21, { sx: { width: "100%" } }, /* @__PURE__ */ React103.createElement(Box21, { sx: { borderBottom: 1, borderColor: "divider" } }, /* @__PURE__ */ React103.createElement(
|
|
6945
7505
|
Tabs2,
|
|
6946
7506
|
{
|
|
6947
7507
|
size: "small",
|
|
@@ -6952,37 +7512,37 @@ var TransformContent = () => {
|
|
|
6952
7512
|
}
|
|
6953
7513
|
},
|
|
6954
7514
|
...getTabsProps(),
|
|
6955
|
-
"aria-label":
|
|
7515
|
+
"aria-label": __49("Transform", "elementor")
|
|
6956
7516
|
},
|
|
6957
|
-
/* @__PURE__ */
|
|
6958
|
-
/* @__PURE__ */
|
|
6959
|
-
/* @__PURE__ */
|
|
6960
|
-
/* @__PURE__ */
|
|
6961
|
-
)), /* @__PURE__ */
|
|
7517
|
+
/* @__PURE__ */ React103.createElement(Tab2, { label: __49("Move", "elementor"), ...getTabProps(TransformFunctionKeys.move) }),
|
|
7518
|
+
/* @__PURE__ */ React103.createElement(Tab2, { label: __49("Scale", "elementor"), ...getTabProps(TransformFunctionKeys.scale) }),
|
|
7519
|
+
/* @__PURE__ */ React103.createElement(Tab2, { label: __49("Rotate", "elementor"), ...getTabProps(TransformFunctionKeys.rotate) }),
|
|
7520
|
+
/* @__PURE__ */ React103.createElement(Tab2, { label: __49("Skew", "elementor"), ...getTabProps(TransformFunctionKeys.skew) })
|
|
7521
|
+
)), /* @__PURE__ */ React103.createElement(TabPanel2, { sx: { p: 1.5 }, ...getTabPanelProps(TransformFunctionKeys.move) }, /* @__PURE__ */ React103.createElement(Move, null)), /* @__PURE__ */ React103.createElement(TabPanel2, { sx: { p: 1.5 }, ...getTabPanelProps(TransformFunctionKeys.scale) }, /* @__PURE__ */ React103.createElement(Scale, null)), /* @__PURE__ */ React103.createElement(TabPanel2, { sx: { p: 1.5 }, ...getTabPanelProps(TransformFunctionKeys.rotate) }, /* @__PURE__ */ React103.createElement(Rotate, null)), /* @__PURE__ */ React103.createElement(TabPanel2, { sx: { p: 1.5 }, ...getTabPanelProps(TransformFunctionKeys.skew) }, /* @__PURE__ */ React103.createElement(Skew, null))));
|
|
6962
7522
|
};
|
|
6963
7523
|
|
|
6964
7524
|
// src/controls/transform-control/transform-icon.tsx
|
|
6965
|
-
import * as
|
|
7525
|
+
import * as React104 from "react";
|
|
6966
7526
|
import { ArrowAutofitHeightIcon, ArrowsMaximizeIcon as ArrowsMaximizeIcon2, RotateClockwise2Icon, SkewXIcon } from "@elementor/icons";
|
|
6967
7527
|
var TransformIcon = ({ value }) => {
|
|
6968
7528
|
switch (value.$$type) {
|
|
6969
7529
|
case TransformFunctionKeys.move:
|
|
6970
|
-
return /* @__PURE__ */
|
|
7530
|
+
return /* @__PURE__ */ React104.createElement(ArrowsMaximizeIcon2, { fontSize: "tiny" });
|
|
6971
7531
|
case TransformFunctionKeys.scale:
|
|
6972
|
-
return /* @__PURE__ */
|
|
7532
|
+
return /* @__PURE__ */ React104.createElement(ArrowAutofitHeightIcon, { fontSize: "tiny" });
|
|
6973
7533
|
case TransformFunctionKeys.rotate:
|
|
6974
|
-
return /* @__PURE__ */
|
|
7534
|
+
return /* @__PURE__ */ React104.createElement(RotateClockwise2Icon, { fontSize: "tiny" });
|
|
6975
7535
|
case TransformFunctionKeys.skew:
|
|
6976
|
-
return /* @__PURE__ */
|
|
7536
|
+
return /* @__PURE__ */ React104.createElement(SkewXIcon, { fontSize: "tiny" });
|
|
6977
7537
|
default:
|
|
6978
7538
|
return null;
|
|
6979
7539
|
}
|
|
6980
7540
|
};
|
|
6981
7541
|
|
|
6982
7542
|
// src/controls/transform-control/transform-label.tsx
|
|
6983
|
-
import * as
|
|
6984
|
-
import { Box as
|
|
6985
|
-
import { __ as
|
|
7543
|
+
import * as React105 from "react";
|
|
7544
|
+
import { Box as Box22 } from "@elementor/ui";
|
|
7545
|
+
import { __ as __50 } from "@wordpress/i18n";
|
|
6986
7546
|
var orderedAxis = ["x", "y", "z"];
|
|
6987
7547
|
var formatLabel = (value, functionType) => {
|
|
6988
7548
|
return orderedAxis.map((axisKey) => {
|
|
@@ -7000,98 +7560,98 @@ var TransformLabel = (props) => {
|
|
|
7000
7560
|
const { $$type, value } = props.value;
|
|
7001
7561
|
switch ($$type) {
|
|
7002
7562
|
case TransformFunctionKeys.move:
|
|
7003
|
-
return /* @__PURE__ */
|
|
7563
|
+
return /* @__PURE__ */ React105.createElement(Label2, { label: __50("Move", "elementor"), value: formatLabel(value, "move") });
|
|
7004
7564
|
case TransformFunctionKeys.scale:
|
|
7005
|
-
return /* @__PURE__ */
|
|
7565
|
+
return /* @__PURE__ */ React105.createElement(Label2, { label: __50("Scale", "elementor"), value: formatLabel(value, "scale") });
|
|
7006
7566
|
case TransformFunctionKeys.rotate:
|
|
7007
|
-
return /* @__PURE__ */
|
|
7567
|
+
return /* @__PURE__ */ React105.createElement(Label2, { label: __50("Rotate", "elementor"), value: formatLabel(value, "rotate") });
|
|
7008
7568
|
case TransformFunctionKeys.skew:
|
|
7009
|
-
return /* @__PURE__ */
|
|
7569
|
+
return /* @__PURE__ */ React105.createElement(Label2, { label: __50("Skew", "elementor"), value: formatLabel(value, "skew") });
|
|
7010
7570
|
default:
|
|
7011
7571
|
return "";
|
|
7012
7572
|
}
|
|
7013
7573
|
};
|
|
7014
7574
|
var Label2 = ({ label, value }) => {
|
|
7015
|
-
return /* @__PURE__ */
|
|
7575
|
+
return /* @__PURE__ */ React105.createElement(Box22, { component: "span" }, label, ": ", value);
|
|
7016
7576
|
};
|
|
7017
7577
|
|
|
7018
7578
|
// src/controls/transform-control/transform-settings-control.tsx
|
|
7019
|
-
import * as
|
|
7020
|
-
import { PopoverHeader as
|
|
7579
|
+
import * as React108 from "react";
|
|
7580
|
+
import { PopoverHeader as PopoverHeader5 } from "@elementor/editor-ui";
|
|
7021
7581
|
import { AdjustmentsIcon } from "@elementor/icons";
|
|
7022
|
-
import { bindPopover as bindPopover6, Box as
|
|
7023
|
-
import { __ as
|
|
7582
|
+
import { bindPopover as bindPopover6, Box as Box23, Divider as Divider5, Popover as Popover7 } from "@elementor/ui";
|
|
7583
|
+
import { __ as __53 } from "@wordpress/i18n";
|
|
7024
7584
|
|
|
7025
7585
|
// src/controls/transform-control/transform-base-controls/children-perspective-control.tsx
|
|
7026
|
-
import * as
|
|
7027
|
-
import { useRef as
|
|
7586
|
+
import * as React106 from "react";
|
|
7587
|
+
import { useRef as useRef24 } from "react";
|
|
7028
7588
|
import { perspectiveOriginPropTypeUtil } from "@elementor/editor-props";
|
|
7029
|
-
import { Grid as Grid27, Stack as
|
|
7030
|
-
import { __ as
|
|
7589
|
+
import { Grid as Grid27, Stack as Stack17 } from "@elementor/ui";
|
|
7590
|
+
import { __ as __51 } from "@wordpress/i18n";
|
|
7031
7591
|
var ORIGIN_UNITS = ["px", "%", "em", "rem"];
|
|
7032
7592
|
var PERSPECTIVE_CONTROL_FIELD = {
|
|
7033
|
-
label:
|
|
7593
|
+
label: __51("Perspective", "elementor"),
|
|
7034
7594
|
bind: "perspective",
|
|
7035
7595
|
units: ["px", "em", "rem", "vw", "vh"]
|
|
7036
7596
|
};
|
|
7037
7597
|
var CHILDREN_PERSPECTIVE_FIELDS = [
|
|
7038
7598
|
{
|
|
7039
|
-
label:
|
|
7599
|
+
label: __51("Origin X", "elementor"),
|
|
7040
7600
|
bind: "x",
|
|
7041
7601
|
units: ORIGIN_UNITS
|
|
7042
7602
|
},
|
|
7043
7603
|
{
|
|
7044
|
-
label:
|
|
7604
|
+
label: __51("Origin Y", "elementor"),
|
|
7045
7605
|
bind: "y",
|
|
7046
7606
|
units: ORIGIN_UNITS
|
|
7047
7607
|
}
|
|
7048
7608
|
];
|
|
7049
7609
|
var ChildrenPerspectiveControl = () => {
|
|
7050
|
-
return /* @__PURE__ */
|
|
7610
|
+
return /* @__PURE__ */ React106.createElement(Stack17, { direction: "column", spacing: 1.5 }, /* @__PURE__ */ React106.createElement(ControlFormLabel, null, __51("Children perspective", "elementor")), /* @__PURE__ */ React106.createElement(PerspectiveControl, null), /* @__PURE__ */ React106.createElement(PerspectiveOriginControl, null));
|
|
7051
7611
|
};
|
|
7052
|
-
var PerspectiveControl = () => /* @__PURE__ */
|
|
7053
|
-
var PerspectiveOriginControl = () => /* @__PURE__ */
|
|
7612
|
+
var PerspectiveControl = () => /* @__PURE__ */ React106.createElement(PropKeyProvider, { bind: "perspective" }, /* @__PURE__ */ React106.createElement(ControlFields, { control: PERSPECTIVE_CONTROL_FIELD, key: PERSPECTIVE_CONTROL_FIELD.bind }));
|
|
7613
|
+
var PerspectiveOriginControl = () => /* @__PURE__ */ React106.createElement(PropKeyProvider, { bind: "perspective-origin" }, /* @__PURE__ */ React106.createElement(PerspectiveOriginControlProvider, null));
|
|
7054
7614
|
var PerspectiveOriginControlProvider = () => {
|
|
7055
7615
|
const context = useBoundProp(perspectiveOriginPropTypeUtil);
|
|
7056
|
-
return /* @__PURE__ */
|
|
7616
|
+
return /* @__PURE__ */ React106.createElement(PropProvider, { ...context }, CHILDREN_PERSPECTIVE_FIELDS.map((control) => /* @__PURE__ */ React106.createElement(PropKeyProvider, { bind: control.bind, key: control.bind }, /* @__PURE__ */ React106.createElement(ControlFields, { control }))));
|
|
7057
7617
|
};
|
|
7058
7618
|
var ControlFields = ({ control }) => {
|
|
7059
|
-
const rowRef =
|
|
7060
|
-
return /* @__PURE__ */
|
|
7619
|
+
const rowRef = useRef24(null);
|
|
7620
|
+
return /* @__PURE__ */ React106.createElement(PopoverGridContainer, { ref: rowRef }, /* @__PURE__ */ React106.createElement(Grid27, { item: true, xs: 6 }, /* @__PURE__ */ React106.createElement(ControlFormLabel, null, control.label)), /* @__PURE__ */ React106.createElement(Grid27, { item: true, xs: 6 }, /* @__PURE__ */ React106.createElement(SizeControl, { variant: "length", units: control.units, anchorRef: rowRef, disableCustom: true })));
|
|
7061
7621
|
};
|
|
7062
7622
|
|
|
7063
7623
|
// src/controls/transform-control/transform-base-controls/transform-origin-control.tsx
|
|
7064
|
-
import * as
|
|
7065
|
-
import { useRef as
|
|
7624
|
+
import * as React107 from "react";
|
|
7625
|
+
import { useRef as useRef25 } from "react";
|
|
7066
7626
|
import { transformOriginPropTypeUtil } from "@elementor/editor-props";
|
|
7067
|
-
import { Grid as Grid28, Stack as
|
|
7068
|
-
import { __ as
|
|
7627
|
+
import { Grid as Grid28, Stack as Stack18 } from "@elementor/ui";
|
|
7628
|
+
import { __ as __52 } from "@wordpress/i18n";
|
|
7069
7629
|
var TRANSFORM_ORIGIN_UNITS = ["px", "%", "em", "rem"];
|
|
7070
7630
|
var TRANSFORM_ORIGIN_UNITS_Z_AXIS = TRANSFORM_ORIGIN_UNITS.filter((unit) => unit !== "%");
|
|
7071
7631
|
var TRANSFORM_ORIGIN_FIELDS = [
|
|
7072
7632
|
{
|
|
7073
|
-
label:
|
|
7633
|
+
label: __52("Origin X", "elementor"),
|
|
7074
7634
|
bind: "x",
|
|
7075
7635
|
units: TRANSFORM_ORIGIN_UNITS
|
|
7076
7636
|
},
|
|
7077
7637
|
{
|
|
7078
|
-
label:
|
|
7638
|
+
label: __52("Origin Y", "elementor"),
|
|
7079
7639
|
bind: "y",
|
|
7080
7640
|
units: TRANSFORM_ORIGIN_UNITS
|
|
7081
7641
|
},
|
|
7082
7642
|
{
|
|
7083
|
-
label:
|
|
7643
|
+
label: __52("Origin Z", "elementor"),
|
|
7084
7644
|
bind: "z",
|
|
7085
7645
|
units: TRANSFORM_ORIGIN_UNITS_Z_AXIS
|
|
7086
7646
|
}
|
|
7087
7647
|
];
|
|
7088
7648
|
var TransformOriginControl = () => {
|
|
7089
|
-
return /* @__PURE__ */
|
|
7649
|
+
return /* @__PURE__ */ React107.createElement(Stack18, { direction: "column", spacing: 1.5 }, /* @__PURE__ */ React107.createElement(ControlFormLabel, null, __52("Transform", "elementor")), TRANSFORM_ORIGIN_FIELDS.map((control) => /* @__PURE__ */ React107.createElement(ControlFields2, { control, key: control.bind })));
|
|
7090
7650
|
};
|
|
7091
7651
|
var ControlFields2 = ({ control }) => {
|
|
7092
7652
|
const context = useBoundProp(transformOriginPropTypeUtil);
|
|
7093
|
-
const rowRef =
|
|
7094
|
-
return /* @__PURE__ */
|
|
7653
|
+
const rowRef = useRef25(null);
|
|
7654
|
+
return /* @__PURE__ */ React107.createElement(PropProvider, { ...context }, /* @__PURE__ */ React107.createElement(PropKeyProvider, { bind: control.bind }, /* @__PURE__ */ React107.createElement(PopoverGridContainer, { ref: rowRef }, /* @__PURE__ */ React107.createElement(Grid28, { item: true, xs: 6 }, /* @__PURE__ */ React107.createElement(ControlFormLabel, null, control.label)), /* @__PURE__ */ React107.createElement(Grid28, { item: true, xs: 6 }, /* @__PURE__ */ React107.createElement(SizeControl, { variant: "length", units: control.units, anchorRef: rowRef })))));
|
|
7095
7655
|
};
|
|
7096
7656
|
|
|
7097
7657
|
// src/controls/transform-control/transform-settings-control.tsx
|
|
@@ -7105,8 +7665,8 @@ var TransformSettingsControl = ({
|
|
|
7105
7665
|
...popupState,
|
|
7106
7666
|
anchorEl: anchorRef.current ?? void 0
|
|
7107
7667
|
});
|
|
7108
|
-
return /* @__PURE__ */
|
|
7109
|
-
|
|
7668
|
+
return /* @__PURE__ */ React108.createElement(
|
|
7669
|
+
Popover7,
|
|
7110
7670
|
{
|
|
7111
7671
|
disablePortal: true,
|
|
7112
7672
|
anchorOrigin: { vertical: "bottom", horizontal: "left" },
|
|
@@ -7120,16 +7680,16 @@ var TransformSettingsControl = ({
|
|
|
7120
7680
|
},
|
|
7121
7681
|
...popupProps
|
|
7122
7682
|
},
|
|
7123
|
-
/* @__PURE__ */
|
|
7124
|
-
|
|
7683
|
+
/* @__PURE__ */ React108.createElement(
|
|
7684
|
+
PopoverHeader5,
|
|
7125
7685
|
{
|
|
7126
|
-
title:
|
|
7686
|
+
title: __53("Transform settings", "elementor"),
|
|
7127
7687
|
onClose: popupState.close,
|
|
7128
|
-
icon: /* @__PURE__ */
|
|
7688
|
+
icon: /* @__PURE__ */ React108.createElement(AdjustmentsIcon, { fontSize: SIZE10 })
|
|
7129
7689
|
}
|
|
7130
7690
|
),
|
|
7131
|
-
/* @__PURE__ */
|
|
7132
|
-
/* @__PURE__ */
|
|
7691
|
+
/* @__PURE__ */ React108.createElement(Divider5, null),
|
|
7692
|
+
/* @__PURE__ */ React108.createElement(PopoverContent, { sx: { px: 2, py: 1.5 } }, /* @__PURE__ */ React108.createElement(PropKeyProvider, { bind: "transform-origin" }, /* @__PURE__ */ React108.createElement(TransformOriginControl, null)), showChildrenPerspective && /* @__PURE__ */ React108.createElement(React108.Fragment, null, /* @__PURE__ */ React108.createElement(Box23, { sx: { my: 0.5 } }, /* @__PURE__ */ React108.createElement(Divider5, null)), /* @__PURE__ */ React108.createElement(ChildrenPerspectiveControl, null)))
|
|
7133
7693
|
);
|
|
7134
7694
|
};
|
|
7135
7695
|
|
|
@@ -7138,27 +7698,27 @@ var SIZE11 = "tiny";
|
|
|
7138
7698
|
var TransformRepeaterControl = createControl(
|
|
7139
7699
|
({ showChildrenPerspective }) => {
|
|
7140
7700
|
const context = useBoundProp(transformPropTypeUtil);
|
|
7141
|
-
const headerRef =
|
|
7142
|
-
const popupState =
|
|
7143
|
-
return /* @__PURE__ */
|
|
7701
|
+
const headerRef = useRef26(null);
|
|
7702
|
+
const popupState = usePopupState9({ variant: "popover" });
|
|
7703
|
+
return /* @__PURE__ */ React109.createElement(PropProvider, { ...context }, /* @__PURE__ */ React109.createElement(
|
|
7144
7704
|
TransformSettingsControl,
|
|
7145
7705
|
{
|
|
7146
7706
|
popupState,
|
|
7147
7707
|
anchorRef: headerRef,
|
|
7148
7708
|
showChildrenPerspective
|
|
7149
7709
|
}
|
|
7150
|
-
), /* @__PURE__ */
|
|
7710
|
+
), /* @__PURE__ */ React109.createElement(PropKeyProvider, { bind: "transform-functions" }, /* @__PURE__ */ React109.createElement(Repeater2, { headerRef, propType: context.propType, popupState })));
|
|
7151
7711
|
}
|
|
7152
7712
|
);
|
|
7153
|
-
var ToolTip = /* @__PURE__ */
|
|
7154
|
-
|
|
7713
|
+
var ToolTip = /* @__PURE__ */ React109.createElement(
|
|
7714
|
+
Box24,
|
|
7155
7715
|
{
|
|
7156
7716
|
component: "span",
|
|
7157
7717
|
"aria-label": void 0,
|
|
7158
7718
|
sx: { display: "flex", gap: 0.5, p: 2, width: 320, borderRadius: 1 }
|
|
7159
7719
|
},
|
|
7160
|
-
/* @__PURE__ */
|
|
7161
|
-
/* @__PURE__ */
|
|
7720
|
+
/* @__PURE__ */ React109.createElement(InfoCircleFilledIcon2, { sx: { color: "secondary.main" } }),
|
|
7721
|
+
/* @__PURE__ */ React109.createElement(Typography9, { variant: "body2", color: "text.secondary", fontSize: "14px" }, __54("You can use each kind of transform only once per element.", "elementor"))
|
|
7162
7722
|
);
|
|
7163
7723
|
var Repeater2 = ({
|
|
7164
7724
|
headerRef,
|
|
@@ -7172,21 +7732,21 @@ var Repeater2 = ({
|
|
|
7172
7732
|
return availableValues.find((value) => !transformValues?.some((item) => item.$$type === value.$$type));
|
|
7173
7733
|
};
|
|
7174
7734
|
const shouldDisableAddItem = !getInitialValue2();
|
|
7175
|
-
return /* @__PURE__ */
|
|
7735
|
+
return /* @__PURE__ */ React109.createElement(PropProvider, { ...transformFunctionsContext }, /* @__PURE__ */ React109.createElement(
|
|
7176
7736
|
ControlRepeater,
|
|
7177
7737
|
{
|
|
7178
7738
|
initial: getInitialValue2() ?? initialTransformValue,
|
|
7179
7739
|
propTypeUtil: transformFunctionsPropTypeUtil
|
|
7180
7740
|
},
|
|
7181
|
-
/* @__PURE__ */
|
|
7741
|
+
/* @__PURE__ */ React109.createElement(
|
|
7182
7742
|
RepeaterHeader,
|
|
7183
7743
|
{
|
|
7184
|
-
label:
|
|
7185
|
-
adornment: () => /* @__PURE__ */
|
|
7744
|
+
label: __54("Transform", "elementor"),
|
|
7745
|
+
adornment: () => /* @__PURE__ */ React109.createElement(ControlAdornments, { customContext: { path: ["transform"], propType } }),
|
|
7186
7746
|
ref: headerRef
|
|
7187
7747
|
},
|
|
7188
|
-
/* @__PURE__ */
|
|
7189
|
-
/* @__PURE__ */
|
|
7748
|
+
/* @__PURE__ */ React109.createElement(TransformBasePopoverTrigger, { popupState, repeaterBindKey: bind }),
|
|
7749
|
+
/* @__PURE__ */ React109.createElement(
|
|
7190
7750
|
TooltipAddItemAction,
|
|
7191
7751
|
{
|
|
7192
7752
|
disabled: shouldDisableAddItem,
|
|
@@ -7196,15 +7756,15 @@ var Repeater2 = ({
|
|
|
7196
7756
|
}
|
|
7197
7757
|
)
|
|
7198
7758
|
),
|
|
7199
|
-
/* @__PURE__ */
|
|
7759
|
+
/* @__PURE__ */ React109.createElement(ItemsContainer, null, /* @__PURE__ */ React109.createElement(
|
|
7200
7760
|
Item,
|
|
7201
7761
|
{
|
|
7202
7762
|
Icon: TransformIcon,
|
|
7203
7763
|
Label: TransformLabel,
|
|
7204
|
-
actions: /* @__PURE__ */
|
|
7764
|
+
actions: /* @__PURE__ */ React109.createElement(React109.Fragment, null, /* @__PURE__ */ React109.createElement(DisableItemAction, null), /* @__PURE__ */ React109.createElement(RemoveItemAction, null))
|
|
7205
7765
|
}
|
|
7206
7766
|
)),
|
|
7207
|
-
/* @__PURE__ */
|
|
7767
|
+
/* @__PURE__ */ React109.createElement(EditItemPopover, null, /* @__PURE__ */ React109.createElement(TransformContent, null))
|
|
7208
7768
|
));
|
|
7209
7769
|
};
|
|
7210
7770
|
var TransformBasePopoverTrigger = ({
|
|
@@ -7212,33 +7772,33 @@ var TransformBasePopoverTrigger = ({
|
|
|
7212
7772
|
repeaterBindKey
|
|
7213
7773
|
}) => {
|
|
7214
7774
|
const { bind } = useBoundProp();
|
|
7215
|
-
const titleLabel =
|
|
7216
|
-
return bind !== repeaterBindKey ? null : /* @__PURE__ */
|
|
7775
|
+
const titleLabel = __54("Transform settings", "elementor");
|
|
7776
|
+
return bind !== repeaterBindKey ? null : /* @__PURE__ */ React109.createElement(Tooltip8, { title: titleLabel, placement: "top" }, /* @__PURE__ */ React109.createElement(IconButton8, { size: SIZE11, "aria-label": titleLabel, ...bindTrigger5(popupState) }, /* @__PURE__ */ React109.createElement(AdjustmentsIcon2, { fontSize: SIZE11 })));
|
|
7217
7777
|
};
|
|
7218
7778
|
|
|
7219
7779
|
// src/controls/transition-control/transition-repeater-control.tsx
|
|
7220
|
-
import * as
|
|
7221
|
-
import { useEffect as useEffect17, useMemo as
|
|
7780
|
+
import * as React112 from "react";
|
|
7781
|
+
import { useEffect as useEffect17, useMemo as useMemo17, useState as useState18 } from "react";
|
|
7222
7782
|
import {
|
|
7223
7783
|
createArrayPropUtils as createArrayPropUtils3,
|
|
7224
7784
|
selectionSizePropTypeUtil as selectionSizePropTypeUtil2
|
|
7225
7785
|
} from "@elementor/editor-props";
|
|
7226
7786
|
import { InfoCircleFilledIcon as InfoCircleFilledIcon3 } from "@elementor/icons";
|
|
7227
|
-
import { Alert as Alert2, AlertTitle as AlertTitle3, Box as
|
|
7787
|
+
import { Alert as Alert2, AlertTitle as AlertTitle3, Box as Box26, Typography as Typography10 } from "@elementor/ui";
|
|
7228
7788
|
import { hasProInstalled as hasProInstalled2 } from "@elementor/utils";
|
|
7229
|
-
import { __ as
|
|
7789
|
+
import { __ as __57 } from "@wordpress/i18n";
|
|
7230
7790
|
|
|
7231
7791
|
// src/controls/selection-size-control.tsx
|
|
7232
|
-
import * as
|
|
7233
|
-
import { useMemo as
|
|
7792
|
+
import * as React110 from "react";
|
|
7793
|
+
import { useMemo as useMemo15, useRef as useRef27 } from "react";
|
|
7234
7794
|
import { selectionSizePropTypeUtil } from "@elementor/editor-props";
|
|
7235
7795
|
import { Grid as Grid29 } from "@elementor/ui";
|
|
7236
7796
|
var SelectionSizeControl = createControl(
|
|
7237
7797
|
({ selectionLabel, sizeLabel, selectionConfig, sizeConfigMap }) => {
|
|
7238
7798
|
const { value, setValue, propType } = useBoundProp(selectionSizePropTypeUtil);
|
|
7239
|
-
const rowRef =
|
|
7799
|
+
const rowRef = useRef27(null);
|
|
7240
7800
|
const sizeFieldId = sizeLabel.replace(/\s+/g, "-").toLowerCase();
|
|
7241
|
-
const currentSizeConfig =
|
|
7801
|
+
const currentSizeConfig = useMemo15(() => {
|
|
7242
7802
|
switch (value.selection.$$type) {
|
|
7243
7803
|
case "key-value":
|
|
7244
7804
|
return sizeConfigMap[value?.selection?.value.value.value || ""];
|
|
@@ -7249,7 +7809,7 @@ var SelectionSizeControl = createControl(
|
|
|
7249
7809
|
}
|
|
7250
7810
|
}, [value, sizeConfigMap]);
|
|
7251
7811
|
const SelectionComponent = selectionConfig.component;
|
|
7252
|
-
return /* @__PURE__ */
|
|
7812
|
+
return /* @__PURE__ */ React110.createElement(PropProvider, { value, setValue, propType }, /* @__PURE__ */ React110.createElement(Grid29, { container: true, spacing: 1.5, ref: rowRef }, /* @__PURE__ */ React110.createElement(Grid29, { item: true, xs: 6, sx: { display: "flex", alignItems: "center" } }, /* @__PURE__ */ React110.createElement(ControlFormLabel, null, selectionLabel)), /* @__PURE__ */ React110.createElement(Grid29, { item: true, xs: 6 }, /* @__PURE__ */ React110.createElement(PropKeyProvider, { bind: "selection" }, /* @__PURE__ */ React110.createElement(SelectionComponent, { ...selectionConfig.props }))), currentSizeConfig && /* @__PURE__ */ React110.createElement(React110.Fragment, null, /* @__PURE__ */ React110.createElement(Grid29, { item: true, xs: 6, sx: { display: "flex", alignItems: "center" } }, /* @__PURE__ */ React110.createElement(ControlFormLabel, { htmlFor: sizeFieldId }, sizeLabel)), /* @__PURE__ */ React110.createElement(Grid29, { item: true, xs: 6 }, /* @__PURE__ */ React110.createElement(PropKeyProvider, { bind: "size" }, /* @__PURE__ */ React110.createElement(
|
|
7253
7813
|
SizeControl,
|
|
7254
7814
|
{
|
|
7255
7815
|
anchorRef: rowRef,
|
|
@@ -7264,12 +7824,12 @@ var SelectionSizeControl = createControl(
|
|
|
7264
7824
|
|
|
7265
7825
|
// src/controls/transition-control/data.ts
|
|
7266
7826
|
import { hasProInstalled, isVersionGreaterOrEqual } from "@elementor/utils";
|
|
7267
|
-
import { __ as
|
|
7827
|
+
import { __ as __55 } from "@wordpress/i18n";
|
|
7268
7828
|
var initialTransitionValue = {
|
|
7269
7829
|
selection: {
|
|
7270
7830
|
$$type: "key-value",
|
|
7271
7831
|
value: {
|
|
7272
|
-
key: { value:
|
|
7832
|
+
key: { value: __55("All properties", "elementor"), $$type: "string" },
|
|
7273
7833
|
value: { value: "all", $$type: "string" }
|
|
7274
7834
|
}
|
|
7275
7835
|
},
|
|
@@ -7293,128 +7853,128 @@ var createTransitionPropertiesList = () => {
|
|
|
7293
7853
|
const isSiteRtl = getIsSiteRtl();
|
|
7294
7854
|
const baseProperties = [
|
|
7295
7855
|
{
|
|
7296
|
-
label:
|
|
7856
|
+
label: __55("Default", "elementor"),
|
|
7297
7857
|
type: "category",
|
|
7298
|
-
properties: [{ label:
|
|
7858
|
+
properties: [{ label: __55("All properties", "elementor"), value: "all" }]
|
|
7299
7859
|
},
|
|
7300
7860
|
{
|
|
7301
|
-
label:
|
|
7861
|
+
label: __55("Margin", "elementor"),
|
|
7302
7862
|
type: "category",
|
|
7303
7863
|
properties: [
|
|
7304
|
-
{ label:
|
|
7305
|
-
{ label:
|
|
7864
|
+
{ label: __55("Margin (all)", "elementor"), value: "margin", isDisabled: true },
|
|
7865
|
+
{ label: __55("Margin bottom", "elementor"), value: "margin-block-end", isDisabled: true },
|
|
7306
7866
|
{
|
|
7307
|
-
label: isSiteRtl ?
|
|
7867
|
+
label: isSiteRtl ? __55("Margin right", "elementor") : __55("Margin left", "elementor"),
|
|
7308
7868
|
value: "margin-inline-start",
|
|
7309
7869
|
isDisabled: true
|
|
7310
7870
|
},
|
|
7311
7871
|
{
|
|
7312
|
-
label: isSiteRtl ?
|
|
7872
|
+
label: isSiteRtl ? __55("Margin left", "elementor") : __55("Margin right", "elementor"),
|
|
7313
7873
|
value: "margin-inline-end",
|
|
7314
7874
|
isDisabled: true
|
|
7315
7875
|
},
|
|
7316
|
-
{ label:
|
|
7876
|
+
{ label: __55("Margin top", "elementor"), value: "margin-block-start", isDisabled: true }
|
|
7317
7877
|
]
|
|
7318
7878
|
},
|
|
7319
7879
|
{
|
|
7320
|
-
label:
|
|
7880
|
+
label: __55("Padding", "elementor"),
|
|
7321
7881
|
type: "category",
|
|
7322
7882
|
properties: [
|
|
7323
|
-
{ label:
|
|
7324
|
-
{ label:
|
|
7883
|
+
{ label: __55("Padding (all)", "elementor"), value: "padding", isDisabled: true },
|
|
7884
|
+
{ label: __55("Padding bottom", "elementor"), value: "padding-block-end", isDisabled: true },
|
|
7325
7885
|
{
|
|
7326
|
-
label: isSiteRtl ?
|
|
7886
|
+
label: isSiteRtl ? __55("Padding right", "elementor") : __55("Padding left", "elementor"),
|
|
7327
7887
|
value: "padding-inline-start",
|
|
7328
7888
|
isDisabled: true
|
|
7329
7889
|
},
|
|
7330
7890
|
{
|
|
7331
|
-
label: isSiteRtl ?
|
|
7891
|
+
label: isSiteRtl ? __55("Padding left", "elementor") : __55("Padding right", "elementor"),
|
|
7332
7892
|
value: "padding-inline-end",
|
|
7333
7893
|
isDisabled: true
|
|
7334
7894
|
},
|
|
7335
|
-
{ label:
|
|
7895
|
+
{ label: __55("Padding top", "elementor"), value: "padding-block-start", isDisabled: true }
|
|
7336
7896
|
]
|
|
7337
7897
|
},
|
|
7338
7898
|
{
|
|
7339
|
-
label:
|
|
7899
|
+
label: __55("Flex", "elementor"),
|
|
7340
7900
|
type: "category",
|
|
7341
7901
|
properties: [
|
|
7342
|
-
{ label:
|
|
7343
|
-
{ label:
|
|
7344
|
-
{ label:
|
|
7345
|
-
{ label:
|
|
7902
|
+
{ label: __55("Flex (all)", "elementor"), value: "flex", isDisabled: true },
|
|
7903
|
+
{ label: __55("Flex grow", "elementor"), value: "flex-grow", isDisabled: true },
|
|
7904
|
+
{ label: __55("Flex shrink", "elementor"), value: "flex-shrink", isDisabled: true },
|
|
7905
|
+
{ label: __55("Flex basis", "elementor"), value: "flex-basis", isDisabled: true }
|
|
7346
7906
|
]
|
|
7347
7907
|
},
|
|
7348
7908
|
{
|
|
7349
|
-
label:
|
|
7909
|
+
label: __55("Size", "elementor"),
|
|
7350
7910
|
type: "category",
|
|
7351
7911
|
properties: [
|
|
7352
|
-
{ label:
|
|
7353
|
-
{ label:
|
|
7354
|
-
{ label:
|
|
7355
|
-
{ label:
|
|
7356
|
-
{ label:
|
|
7357
|
-
{ label:
|
|
7912
|
+
{ label: __55("Width", "elementor"), value: "width", isDisabled: true },
|
|
7913
|
+
{ label: __55("Height", "elementor"), value: "height", isDisabled: true },
|
|
7914
|
+
{ label: __55("Max height", "elementor"), value: "max-height", isDisabled: true },
|
|
7915
|
+
{ label: __55("Max width", "elementor"), value: "max-width", isDisabled: true },
|
|
7916
|
+
{ label: __55("Min height", "elementor"), value: "min-height", isDisabled: true },
|
|
7917
|
+
{ label: __55("Min width", "elementor"), value: "min-width", isDisabled: true }
|
|
7358
7918
|
]
|
|
7359
7919
|
},
|
|
7360
7920
|
{
|
|
7361
|
-
label:
|
|
7921
|
+
label: __55("Position", "elementor"),
|
|
7362
7922
|
type: "category",
|
|
7363
7923
|
properties: [
|
|
7364
|
-
{ label:
|
|
7924
|
+
{ label: __55("Top", "elementor"), value: "inset-block-start", isDisabled: true },
|
|
7365
7925
|
{
|
|
7366
|
-
label: isSiteRtl ?
|
|
7926
|
+
label: isSiteRtl ? __55("Right", "elementor") : __55("Left", "elementor"),
|
|
7367
7927
|
value: "inset-inline-start",
|
|
7368
7928
|
isDisabled: true
|
|
7369
7929
|
},
|
|
7370
7930
|
{
|
|
7371
|
-
label: isSiteRtl ?
|
|
7931
|
+
label: isSiteRtl ? __55("Left", "elementor") : __55("Right", "elementor"),
|
|
7372
7932
|
value: "inset-inline-end",
|
|
7373
7933
|
isDisabled: true
|
|
7374
7934
|
},
|
|
7375
|
-
{ label:
|
|
7376
|
-
{ label:
|
|
7935
|
+
{ label: __55("Bottom", "elementor"), value: "inset-block-end", isDisabled: true },
|
|
7936
|
+
{ label: __55("Z-index", "elementor"), value: "z-index", isDisabled: true }
|
|
7377
7937
|
]
|
|
7378
7938
|
},
|
|
7379
7939
|
{
|
|
7380
|
-
label:
|
|
7940
|
+
label: __55("Typography", "elementor"),
|
|
7381
7941
|
type: "category",
|
|
7382
7942
|
properties: [
|
|
7383
|
-
{ label:
|
|
7384
|
-
{ label:
|
|
7385
|
-
{ label:
|
|
7386
|
-
{ label:
|
|
7387
|
-
{ label:
|
|
7388
|
-
{ label:
|
|
7389
|
-
{ label:
|
|
7943
|
+
{ label: __55("Font color", "elementor"), value: "color", isDisabled: true },
|
|
7944
|
+
{ label: __55("Font size", "elementor"), value: "font-size", isDisabled: true },
|
|
7945
|
+
{ label: __55("Line height", "elementor"), value: "line-height", isDisabled: true },
|
|
7946
|
+
{ label: __55("Letter spacing", "elementor"), value: "letter-spacing", isDisabled: true },
|
|
7947
|
+
{ label: __55("Word spacing", "elementor"), value: "word-spacing", isDisabled: true },
|
|
7948
|
+
{ label: __55("Font variations", "elementor"), value: "font-variation-settings", isDisabled: true },
|
|
7949
|
+
{ label: __55("Text stroke color", "elementor"), value: "-webkit-text-stroke-color", isDisabled: true }
|
|
7390
7950
|
]
|
|
7391
7951
|
},
|
|
7392
7952
|
{
|
|
7393
|
-
label:
|
|
7953
|
+
label: __55("Background", "elementor"),
|
|
7394
7954
|
type: "category",
|
|
7395
7955
|
properties: [
|
|
7396
|
-
{ label:
|
|
7397
|
-
{ label:
|
|
7398
|
-
{ label:
|
|
7956
|
+
{ label: __55("Background color", "elementor"), value: "background-color", isDisabled: true },
|
|
7957
|
+
{ label: __55("Background position", "elementor"), value: "background-position", isDisabled: true },
|
|
7958
|
+
{ label: __55("Box shadow", "elementor"), value: "box-shadow", isDisabled: true }
|
|
7399
7959
|
]
|
|
7400
7960
|
},
|
|
7401
7961
|
{
|
|
7402
|
-
label:
|
|
7962
|
+
label: __55("Border", "elementor"),
|
|
7403
7963
|
type: "category",
|
|
7404
7964
|
properties: [
|
|
7405
|
-
{ label:
|
|
7406
|
-
{ label:
|
|
7407
|
-
{ label:
|
|
7408
|
-
{ label:
|
|
7965
|
+
{ label: __55("Border (all)", "elementor"), value: "border", isDisabled: true },
|
|
7966
|
+
{ label: __55("Border radius", "elementor"), value: "border-radius", isDisabled: true },
|
|
7967
|
+
{ label: __55("Border color", "elementor"), value: "border-color", isDisabled: true },
|
|
7968
|
+
{ label: __55("Border width", "elementor"), value: "border-width", isDisabled: true }
|
|
7409
7969
|
]
|
|
7410
7970
|
},
|
|
7411
7971
|
{
|
|
7412
|
-
label:
|
|
7972
|
+
label: __55("Effects", "elementor"),
|
|
7413
7973
|
type: "category",
|
|
7414
7974
|
properties: [
|
|
7415
|
-
{ label:
|
|
7416
|
-
{ label:
|
|
7417
|
-
{ label:
|
|
7975
|
+
{ label: __55("Opacity", "elementor"), value: "opacity", isDisabled: true },
|
|
7976
|
+
{ label: __55("Transform (all)", "elementor"), value: "transform", isDisabled: true },
|
|
7977
|
+
{ label: __55("Filter (all)", "elementor"), value: "filter", isDisabled: true }
|
|
7418
7978
|
]
|
|
7419
7979
|
}
|
|
7420
7980
|
];
|
|
@@ -7450,13 +8010,13 @@ function subscribeToTransitionEvent() {
|
|
|
7450
8010
|
}
|
|
7451
8011
|
|
|
7452
8012
|
// src/controls/transition-control/transition-selector.tsx
|
|
7453
|
-
import * as
|
|
7454
|
-
import { useMemo as
|
|
8013
|
+
import * as React111 from "react";
|
|
8014
|
+
import { useMemo as useMemo16, useRef as useRef28 } from "react";
|
|
7455
8015
|
import { keyValuePropTypeUtil as keyValuePropTypeUtil2 } from "@elementor/editor-props";
|
|
7456
8016
|
import { PromotionAlert, PromotionChip } from "@elementor/editor-ui";
|
|
7457
8017
|
import { ChevronDownIcon as ChevronDownIcon3, VariationsIcon } from "@elementor/icons";
|
|
7458
|
-
import { bindPopover as bindPopover7, bindTrigger as bindTrigger6, Box as
|
|
7459
|
-
import { __ as
|
|
8018
|
+
import { bindPopover as bindPopover7, bindTrigger as bindTrigger6, Box as Box25, Popover as Popover8, UnstableTag as UnstableTag3, usePopupState as usePopupState10 } from "@elementor/ui";
|
|
8019
|
+
import { __ as __56 } from "@wordpress/i18n";
|
|
7460
8020
|
|
|
7461
8021
|
// src/utils/tracking.ts
|
|
7462
8022
|
import { getSelectedElements as getSelectedElements2 } from "@elementor/editor-elements";
|
|
@@ -7537,9 +8097,9 @@ var TransitionSelector = ({
|
|
|
7537
8097
|
const {
|
|
7538
8098
|
key: { value: transitionLabel }
|
|
7539
8099
|
} = value;
|
|
7540
|
-
const defaultRef =
|
|
7541
|
-
const popoverState =
|
|
7542
|
-
const disabledCategories =
|
|
8100
|
+
const defaultRef = useRef28(null);
|
|
8101
|
+
const popoverState = usePopupState10({ variant: "popover" });
|
|
8102
|
+
const disabledCategories = useMemo16(() => {
|
|
7543
8103
|
return new Set(
|
|
7544
8104
|
transitionProperties.filter((cat) => cat.properties.some((prop) => prop.isDisabled)).map((cat) => cat.label)
|
|
7545
8105
|
);
|
|
@@ -7559,7 +8119,7 @@ var TransitionSelector = ({
|
|
|
7559
8119
|
return [
|
|
7560
8120
|
first,
|
|
7561
8121
|
{
|
|
7562
|
-
label:
|
|
8122
|
+
label: __56("Recently Used", "elementor"),
|
|
7563
8123
|
items: recentItems
|
|
7564
8124
|
},
|
|
7565
8125
|
...rest
|
|
@@ -7583,17 +8143,17 @@ var TransitionSelector = ({
|
|
|
7583
8143
|
left: rect.right + 36
|
|
7584
8144
|
};
|
|
7585
8145
|
};
|
|
7586
|
-
return /* @__PURE__ */
|
|
8146
|
+
return /* @__PURE__ */ React111.createElement(Box25, { ref: defaultRef }, /* @__PURE__ */ React111.createElement(ControlActions, null, /* @__PURE__ */ React111.createElement(
|
|
7587
8147
|
UnstableTag3,
|
|
7588
8148
|
{
|
|
7589
8149
|
variant: "outlined",
|
|
7590
8150
|
label: transitionLabel,
|
|
7591
|
-
endIcon: /* @__PURE__ */
|
|
8151
|
+
endIcon: /* @__PURE__ */ React111.createElement(ChevronDownIcon3, { fontSize: "tiny" }),
|
|
7592
8152
|
...bindTrigger6(popoverState),
|
|
7593
8153
|
fullWidth: true
|
|
7594
8154
|
}
|
|
7595
|
-
)), /* @__PURE__ */
|
|
7596
|
-
|
|
8155
|
+
)), /* @__PURE__ */ React111.createElement(
|
|
8156
|
+
Popover8,
|
|
7597
8157
|
{
|
|
7598
8158
|
disablePortal: true,
|
|
7599
8159
|
disableScrollLock: true,
|
|
@@ -7603,7 +8163,7 @@ var TransitionSelector = ({
|
|
|
7603
8163
|
anchorOrigin: { vertical: "top", horizontal: "right" },
|
|
7604
8164
|
transformOrigin: { vertical: "top", horizontal: "left" }
|
|
7605
8165
|
},
|
|
7606
|
-
/* @__PURE__ */
|
|
8166
|
+
/* @__PURE__ */ React111.createElement(
|
|
7607
8167
|
ItemSelector,
|
|
7608
8168
|
{
|
|
7609
8169
|
itemsList: getItemList(),
|
|
@@ -7611,11 +8171,11 @@ var TransitionSelector = ({
|
|
|
7611
8171
|
onItemChange: handleTransitionPropertyChange,
|
|
7612
8172
|
onClose: popoverState.close,
|
|
7613
8173
|
sectionWidth: 268,
|
|
7614
|
-
title:
|
|
8174
|
+
title: __56("Transition Property", "elementor"),
|
|
7615
8175
|
icon: VariationsIcon,
|
|
7616
8176
|
disabledItems: includeCurrentValueInOptions(value, disabledItems),
|
|
7617
|
-
categoryItemContentTemplate: (item) => /* @__PURE__ */
|
|
7618
|
-
|
|
8177
|
+
categoryItemContentTemplate: (item) => /* @__PURE__ */ React111.createElement(
|
|
8178
|
+
Box25,
|
|
7619
8179
|
{
|
|
7620
8180
|
sx: {
|
|
7621
8181
|
display: "flex",
|
|
@@ -7624,13 +8184,13 @@ var TransitionSelector = ({
|
|
|
7624
8184
|
width: "100%"
|
|
7625
8185
|
}
|
|
7626
8186
|
},
|
|
7627
|
-
/* @__PURE__ */
|
|
7628
|
-
showPromotion && disabledCategories.has(item.value) && /* @__PURE__ */
|
|
8187
|
+
/* @__PURE__ */ React111.createElement("span", null, item.value),
|
|
8188
|
+
showPromotion && disabledCategories.has(item.value) && /* @__PURE__ */ React111.createElement(PromotionChip, null)
|
|
7629
8189
|
),
|
|
7630
|
-
footer: showPromotion ? /* @__PURE__ */
|
|
8190
|
+
footer: showPromotion ? /* @__PURE__ */ React111.createElement(
|
|
7631
8191
|
PromotionAlert,
|
|
7632
8192
|
{
|
|
7633
|
-
message:
|
|
8193
|
+
message: __56(
|
|
7634
8194
|
"Upgrade to customize transition properties and control effects.",
|
|
7635
8195
|
"elementor"
|
|
7636
8196
|
),
|
|
@@ -7669,8 +8229,8 @@ var areAllPropertiesUsed = (value = []) => {
|
|
|
7669
8229
|
};
|
|
7670
8230
|
var getSelectionSizeProps = (recentlyUsedList, disabledItems, showPromotion) => {
|
|
7671
8231
|
return {
|
|
7672
|
-
selectionLabel:
|
|
7673
|
-
sizeLabel:
|
|
8232
|
+
selectionLabel: __57("Type", "elementor"),
|
|
8233
|
+
sizeLabel: __57("Duration", "elementor"),
|
|
7674
8234
|
selectionConfig: {
|
|
7675
8235
|
component: TransitionSelector,
|
|
7676
8236
|
props: {
|
|
@@ -7746,7 +8306,7 @@ var getInitialValue = (values = []) => {
|
|
|
7746
8306
|
}
|
|
7747
8307
|
return initialTransitionValue;
|
|
7748
8308
|
};
|
|
7749
|
-
var disableAddItemTooltipContent = /* @__PURE__ */
|
|
8309
|
+
var disableAddItemTooltipContent = /* @__PURE__ */ React112.createElement(
|
|
7750
8310
|
Alert2,
|
|
7751
8311
|
{
|
|
7752
8312
|
sx: {
|
|
@@ -7754,10 +8314,10 @@ var disableAddItemTooltipContent = /* @__PURE__ */ React108.createElement(
|
|
|
7754
8314
|
gap: 0.5
|
|
7755
8315
|
},
|
|
7756
8316
|
color: "secondary",
|
|
7757
|
-
icon: /* @__PURE__ */
|
|
8317
|
+
icon: /* @__PURE__ */ React112.createElement(InfoCircleFilledIcon3, null)
|
|
7758
8318
|
},
|
|
7759
|
-
/* @__PURE__ */
|
|
7760
|
-
/* @__PURE__ */
|
|
8319
|
+
/* @__PURE__ */ React112.createElement(AlertTitle3, null, __57("Transitions", "elementor")),
|
|
8320
|
+
/* @__PURE__ */ React112.createElement(Box26, { component: "span" }, /* @__PURE__ */ React112.createElement(Typography10, { variant: "body2" }, __57("Switch to 'Normal' state to add a transition.", "elementor")))
|
|
7761
8321
|
);
|
|
7762
8322
|
var TransitionRepeaterControl = createControl(
|
|
7763
8323
|
({
|
|
@@ -7768,11 +8328,11 @@ var TransitionRepeaterControl = createControl(
|
|
|
7768
8328
|
const [recentlyUsedList, setRecentlyUsedList] = useState18([]);
|
|
7769
8329
|
const proInstalled = hasProInstalled2();
|
|
7770
8330
|
const { value, setValue } = useBoundProp(childArrayPropTypeUtil);
|
|
7771
|
-
const { allDisabled: disabledItems, proDisabled: proDisabledItems } =
|
|
8331
|
+
const { allDisabled: disabledItems, proDisabled: proDisabledItems } = useMemo17(
|
|
7772
8332
|
() => getDisabledItemLabels(value),
|
|
7773
8333
|
[value]
|
|
7774
8334
|
);
|
|
7775
|
-
const allowedTransitionSet =
|
|
8335
|
+
const allowedTransitionSet = useMemo17(() => {
|
|
7776
8336
|
const set = /* @__PURE__ */ new Set();
|
|
7777
8337
|
transitionProperties.forEach((category) => {
|
|
7778
8338
|
category.properties.forEach((prop) => {
|
|
@@ -7798,15 +8358,15 @@ var TransitionRepeaterControl = createControl(
|
|
|
7798
8358
|
useEffect17(() => {
|
|
7799
8359
|
recentlyUsedListGetter().then(setRecentlyUsedList);
|
|
7800
8360
|
}, [recentlyUsedListGetter]);
|
|
7801
|
-
const allPropertiesUsed =
|
|
8361
|
+
const allPropertiesUsed = useMemo17(() => areAllPropertiesUsed(value), [value]);
|
|
7802
8362
|
const isAddItemDisabled = !currentStyleIsNormal || allPropertiesUsed;
|
|
7803
|
-
return /* @__PURE__ */
|
|
8363
|
+
return /* @__PURE__ */ React112.createElement(
|
|
7804
8364
|
RepeatableControl,
|
|
7805
8365
|
{
|
|
7806
|
-
label:
|
|
7807
|
-
repeaterLabel:
|
|
8366
|
+
label: __57("Transitions", "elementor"),
|
|
8367
|
+
repeaterLabel: __57("Transitions", "elementor"),
|
|
7808
8368
|
patternLabel: "${value.selection.value.key.value}: ${value.size.value.size}${value.size.value.unit}",
|
|
7809
|
-
placeholder:
|
|
8369
|
+
placeholder: __57("Empty Transition", "elementor"),
|
|
7810
8370
|
showDuplicate: false,
|
|
7811
8371
|
showToggle: true,
|
|
7812
8372
|
initialValues: getInitialValue(value),
|
|
@@ -7827,11 +8387,11 @@ var TransitionRepeaterControl = createControl(
|
|
|
7827
8387
|
);
|
|
7828
8388
|
|
|
7829
8389
|
// src/controls/date-time-control.tsx
|
|
7830
|
-
import * as
|
|
8390
|
+
import * as React113 from "react";
|
|
7831
8391
|
import * as dayjs from "dayjs";
|
|
7832
8392
|
import { isTransformable as isTransformable2, stringPropTypeUtil as stringPropTypeUtil20 } from "@elementor/editor-props";
|
|
7833
8393
|
import { DateTimePropTypeUtil } from "@elementor/editor-props";
|
|
7834
|
-
import { Box as
|
|
8394
|
+
import { Box as Box27, DatePicker, LocalizationProvider, TimePicker } from "@elementor/ui";
|
|
7835
8395
|
var DATE_FORMAT = "YYYY-MM-DD";
|
|
7836
8396
|
var TIME_FORMAT = "HH:mm";
|
|
7837
8397
|
var DateTimeControl = createControl(({ inputDisabled }) => {
|
|
@@ -7875,7 +8435,7 @@ var DateTimeControl = createControl(({ inputDisabled }) => {
|
|
|
7875
8435
|
const base = dayjs.default();
|
|
7876
8436
|
return base.hour(h).minute(m).second(0).millisecond(0);
|
|
7877
8437
|
};
|
|
7878
|
-
return /* @__PURE__ */
|
|
8438
|
+
return /* @__PURE__ */ React113.createElement(PropProvider, { ...propContext, value, setValue }, /* @__PURE__ */ React113.createElement(ControlActions, null, /* @__PURE__ */ React113.createElement(LocalizationProvider, null, /* @__PURE__ */ React113.createElement(Box27, { display: "flex", gap: 1, alignItems: "center" }, /* @__PURE__ */ React113.createElement(PropKeyProvider, { bind: "date" }, /* @__PURE__ */ React113.createElement(
|
|
7879
8439
|
DatePicker,
|
|
7880
8440
|
{
|
|
7881
8441
|
value: parseDateValue(stringPropTypeUtil20.extract(value?.date)),
|
|
@@ -7887,7 +8447,7 @@ var DateTimeControl = createControl(({ inputDisabled }) => {
|
|
|
7887
8447
|
openPickerIcon: { fontSize: "tiny" }
|
|
7888
8448
|
}
|
|
7889
8449
|
}
|
|
7890
|
-
)), /* @__PURE__ */
|
|
8450
|
+
)), /* @__PURE__ */ React113.createElement(PropKeyProvider, { bind: "time" }, /* @__PURE__ */ React113.createElement(
|
|
7891
8451
|
TimePicker,
|
|
7892
8452
|
{
|
|
7893
8453
|
value: parseTimeValue(stringPropTypeUtil20.extract(value?.time)),
|
|
@@ -7903,13 +8463,13 @@ var DateTimeControl = createControl(({ inputDisabled }) => {
|
|
|
7903
8463
|
});
|
|
7904
8464
|
|
|
7905
8465
|
// src/controls/date-range-control.tsx
|
|
7906
|
-
import * as
|
|
8466
|
+
import * as React115 from "react";
|
|
7907
8467
|
import { dateRangePropTypeUtil, dateStringPropTypeUtil as dateStringPropTypeUtil2 } from "@elementor/editor-props";
|
|
7908
|
-
import { FormHelperText as FormHelperText2, Grid as Grid30, Stack as
|
|
7909
|
-
import { __ as
|
|
8468
|
+
import { FormHelperText as FormHelperText2, Grid as Grid30, Stack as Stack19 } from "@elementor/ui";
|
|
8469
|
+
import { __ as __58 } from "@wordpress/i18n";
|
|
7910
8470
|
|
|
7911
8471
|
// src/controls/date-string-control.tsx
|
|
7912
|
-
import * as
|
|
8472
|
+
import * as React114 from "react";
|
|
7913
8473
|
import { dateStringPropTypeUtil } from "@elementor/editor-props";
|
|
7914
8474
|
import { DatePicker as DatePicker2, LocalizationProvider as LocalizationProvider2 } from "@elementor/ui";
|
|
7915
8475
|
|
|
@@ -7968,7 +8528,7 @@ var DateStringControl = createControl(
|
|
|
7968
8528
|
}
|
|
7969
8529
|
setValue(newValue.format(format));
|
|
7970
8530
|
};
|
|
7971
|
-
return /* @__PURE__ */
|
|
8531
|
+
return /* @__PURE__ */ React114.createElement(LocalizationProvider2, null, /* @__PURE__ */ React114.createElement(ControlActions, null, /* @__PURE__ */ React114.createElement(
|
|
7972
8532
|
DatePicker2,
|
|
7973
8533
|
{
|
|
7974
8534
|
value: parseDateString(value ?? ""),
|
|
@@ -7982,8 +8542,8 @@ var DateStringControl = createControl(
|
|
|
7982
8542
|
|
|
7983
8543
|
// src/controls/date-range-control.tsx
|
|
7984
8544
|
var RANGE_LABELS = {
|
|
7985
|
-
min:
|
|
7986
|
-
max:
|
|
8545
|
+
min: __58("Min date", "elementor"),
|
|
8546
|
+
max: __58("Max date", "elementor")
|
|
7987
8547
|
};
|
|
7988
8548
|
var isMaxBeforeMin = (minIso, maxIso) => {
|
|
7989
8549
|
if (!minIso || !maxIso) {
|
|
@@ -7991,38 +8551,38 @@ var isMaxBeforeMin = (minIso, maxIso) => {
|
|
|
7991
8551
|
}
|
|
7992
8552
|
return maxIso < minIso;
|
|
7993
8553
|
};
|
|
7994
|
-
var RANGE_ERROR_MESSAGE =
|
|
8554
|
+
var RANGE_ERROR_MESSAGE = __58("Max date must be on or after Min date", "elementor");
|
|
7995
8555
|
var DateRangeControl = createControl(() => {
|
|
7996
8556
|
const { value, setValue, ...propContext } = useBoundProp(dateRangePropTypeUtil);
|
|
7997
8557
|
const minString = dateStringPropTypeUtil2.extract(value?.min);
|
|
7998
8558
|
const maxString = dateStringPropTypeUtil2.extract(value?.max);
|
|
7999
8559
|
const hasInvalidRange = isMaxBeforeMin(minString, maxString);
|
|
8000
|
-
return /* @__PURE__ */
|
|
8560
|
+
return /* @__PURE__ */ React115.createElement(PropProvider, { ...propContext, value, setValue }, /* @__PURE__ */ React115.createElement(Stack19, { gap: 0.75 }, /* @__PURE__ */ React115.createElement(Stack19, { direction: "row", gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React115.createElement(Grid30, { container: true, gap: 0.75, alignItems: "center" }, /* @__PURE__ */ React115.createElement(Grid30, { item: true, xs: 12 }, /* @__PURE__ */ React115.createElement(ControlFormLabel, null, RANGE_LABELS.min)), /* @__PURE__ */ React115.createElement(Grid30, { item: true, xs: 12 }, /* @__PURE__ */ React115.createElement(
|
|
8001
8561
|
BoundDateStringControl,
|
|
8002
8562
|
{
|
|
8003
8563
|
bind: "min",
|
|
8004
8564
|
ariaLabel: RANGE_LABELS.min,
|
|
8005
8565
|
error: hasInvalidRange
|
|
8006
8566
|
}
|
|
8007
|
-
))), /* @__PURE__ */
|
|
8567
|
+
))), /* @__PURE__ */ React115.createElement(Grid30, { container: true, gap: 0.75, alignItems: "center" }, /* @__PURE__ */ React115.createElement(Grid30, { item: true, xs: 12 }, /* @__PURE__ */ React115.createElement(ControlFormLabel, null, RANGE_LABELS.max)), /* @__PURE__ */ React115.createElement(Grid30, { item: true, xs: 12 }, /* @__PURE__ */ React115.createElement(
|
|
8008
8568
|
BoundDateStringControl,
|
|
8009
8569
|
{
|
|
8010
8570
|
bind: "max",
|
|
8011
8571
|
ariaLabel: RANGE_LABELS.max,
|
|
8012
8572
|
error: hasInvalidRange
|
|
8013
8573
|
}
|
|
8014
|
-
)))), hasInvalidRange && /* @__PURE__ */
|
|
8574
|
+
)))), hasInvalidRange && /* @__PURE__ */ React115.createElement(FormHelperText2, { error: true }, RANGE_ERROR_MESSAGE)));
|
|
8015
8575
|
});
|
|
8016
8576
|
var BoundDateStringControl = ({
|
|
8017
8577
|
bind,
|
|
8018
8578
|
ariaLabel,
|
|
8019
8579
|
error
|
|
8020
8580
|
}) => {
|
|
8021
|
-
return /* @__PURE__ */
|
|
8581
|
+
return /* @__PURE__ */ React115.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React115.createElement(DateStringControl, { ariaLabel, error, coerceInvalidToNull: true }));
|
|
8022
8582
|
};
|
|
8023
8583
|
|
|
8024
8584
|
// src/controls/time-string-control.tsx
|
|
8025
|
-
import * as
|
|
8585
|
+
import * as React116 from "react";
|
|
8026
8586
|
import { timeStringPropTypeUtil } from "@elementor/editor-props";
|
|
8027
8587
|
import { LocalizationProvider as LocalizationProvider3, TimePicker as TimePicker2 } from "@elementor/ui";
|
|
8028
8588
|
var TimeStringControl = createControl(
|
|
@@ -8050,7 +8610,7 @@ var TimeStringControl = createControl(
|
|
|
8050
8610
|
}
|
|
8051
8611
|
setValue(newValue.format(format));
|
|
8052
8612
|
};
|
|
8053
|
-
return /* @__PURE__ */
|
|
8613
|
+
return /* @__PURE__ */ React116.createElement(LocalizationProvider3, null, /* @__PURE__ */ React116.createElement(ControlActions, null, /* @__PURE__ */ React116.createElement(
|
|
8054
8614
|
TimePicker2,
|
|
8055
8615
|
{
|
|
8056
8616
|
value: parseTimeString(value ?? ""),
|
|
@@ -8063,38 +8623,38 @@ var TimeStringControl = createControl(
|
|
|
8063
8623
|
);
|
|
8064
8624
|
|
|
8065
8625
|
// src/controls/time-range-control.tsx
|
|
8066
|
-
import * as
|
|
8626
|
+
import * as React117 from "react";
|
|
8067
8627
|
import { timeRangePropTypeUtil } from "@elementor/editor-props";
|
|
8068
|
-
import { Grid as Grid31, Stack as
|
|
8069
|
-
import { __ as
|
|
8628
|
+
import { Grid as Grid31, Stack as Stack20 } from "@elementor/ui";
|
|
8629
|
+
import { __ as __59 } from "@wordpress/i18n";
|
|
8070
8630
|
var RANGE_LABELS2 = {
|
|
8071
|
-
min:
|
|
8072
|
-
max:
|
|
8631
|
+
min: __59("Start time", "elementor"),
|
|
8632
|
+
max: __59("End time", "elementor")
|
|
8073
8633
|
};
|
|
8074
8634
|
var TimeRangeControl = createControl(() => {
|
|
8075
8635
|
const { value, setValue, ...propContext } = useBoundProp(timeRangePropTypeUtil);
|
|
8076
|
-
return /* @__PURE__ */
|
|
8636
|
+
return /* @__PURE__ */ React117.createElement(PropProvider, { ...propContext, value, setValue }, /* @__PURE__ */ React117.createElement(Stack20, { direction: "row", gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React117.createElement(Grid31, { container: true, gap: 0.75, alignItems: "center" }, /* @__PURE__ */ React117.createElement(Grid31, { item: true, xs: 12 }, /* @__PURE__ */ React117.createElement(ControlFormLabel, null, RANGE_LABELS2.min)), /* @__PURE__ */ React117.createElement(Grid31, { item: true, xs: 12 }, /* @__PURE__ */ React117.createElement(BoundTimeStringControl, { bind: "min", ariaLabel: RANGE_LABELS2.min }))), /* @__PURE__ */ React117.createElement(Grid31, { container: true, gap: 0.75, alignItems: "center" }, /* @__PURE__ */ React117.createElement(Grid31, { item: true, xs: 12 }, /* @__PURE__ */ React117.createElement(ControlFormLabel, null, RANGE_LABELS2.max)), /* @__PURE__ */ React117.createElement(Grid31, { item: true, xs: 12 }, /* @__PURE__ */ React117.createElement(BoundTimeStringControl, { bind: "max", ariaLabel: RANGE_LABELS2.max })))));
|
|
8077
8637
|
});
|
|
8078
8638
|
var BoundTimeStringControl = ({ bind, ariaLabel }) => {
|
|
8079
|
-
return /* @__PURE__ */
|
|
8639
|
+
return /* @__PURE__ */ React117.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React117.createElement(TimeStringControl, { ariaLabel, coerceInvalidToNull: true }));
|
|
8080
8640
|
};
|
|
8081
8641
|
|
|
8082
8642
|
// src/controls/inline-editing-control.tsx
|
|
8083
|
-
import * as
|
|
8643
|
+
import * as React121 from "react";
|
|
8084
8644
|
import { useCallback as useCallback4, useState as useState20 } from "react";
|
|
8085
8645
|
import { escapedHtmlPropTypeUtil as escapedHtmlPropTypeUtil2 } from "@elementor/editor-props";
|
|
8086
|
-
import { Box as
|
|
8646
|
+
import { Box as Box30 } from "@elementor/ui";
|
|
8087
8647
|
|
|
8088
8648
|
// src/components/inline-editor.tsx
|
|
8089
|
-
import * as
|
|
8090
|
-
import { useEffect as useEffect18, useRef as
|
|
8091
|
-
import { Box as
|
|
8649
|
+
import * as React118 from "react";
|
|
8650
|
+
import { useEffect as useEffect18, useRef as useRef29 } from "react";
|
|
8651
|
+
import { Box as Box28 } from "@elementor/ui";
|
|
8092
8652
|
import Bold from "@tiptap/extension-bold";
|
|
8093
8653
|
import Document from "@tiptap/extension-document";
|
|
8094
8654
|
import HardBreak from "@tiptap/extension-hard-break";
|
|
8095
8655
|
import Heading from "@tiptap/extension-heading";
|
|
8096
8656
|
import Italic from "@tiptap/extension-italic";
|
|
8097
|
-
import
|
|
8657
|
+
import Link4 from "@tiptap/extension-link";
|
|
8098
8658
|
import Paragraph from "@tiptap/extension-paragraph";
|
|
8099
8659
|
import Strike from "@tiptap/extension-strike";
|
|
8100
8660
|
import Subscript from "@tiptap/extension-subscript";
|
|
@@ -8133,7 +8693,7 @@ function extractInlineHtmlContent(propValue) {
|
|
|
8133
8693
|
var ITALIC_KEYBOARD_SHORTCUT = "i";
|
|
8134
8694
|
var BOLD_KEYBOARD_SHORTCUT = "b";
|
|
8135
8695
|
var UNDERLINE_KEYBOARD_SHORTCUT = "u";
|
|
8136
|
-
var InlineEditor =
|
|
8696
|
+
var InlineEditor = React118.forwardRef((props, ref) => {
|
|
8137
8697
|
const {
|
|
8138
8698
|
value,
|
|
8139
8699
|
setValue,
|
|
@@ -8150,8 +8710,8 @@ var InlineEditor = React114.forwardRef((props, ref) => {
|
|
|
8150
8710
|
onSelectionEnd,
|
|
8151
8711
|
mountElement = null
|
|
8152
8712
|
} = props;
|
|
8153
|
-
const containerRef =
|
|
8154
|
-
const onBlurRef =
|
|
8713
|
+
const containerRef = useRef29(null);
|
|
8714
|
+
const onBlurRef = useRef29(onBlur);
|
|
8155
8715
|
onBlurRef.current = onBlur;
|
|
8156
8716
|
const documentContentSettings = !!expectedTag ? "block+" : "inline*";
|
|
8157
8717
|
const onUpdate = ({ editor: updatedEditor }) => {
|
|
@@ -8196,7 +8756,7 @@ var InlineEditor = React114.forwardRef((props, ref) => {
|
|
|
8196
8756
|
}).configure({
|
|
8197
8757
|
levels: [1, 2, 3, 4, 5, 6]
|
|
8198
8758
|
}),
|
|
8199
|
-
|
|
8759
|
+
Link4.configure({
|
|
8200
8760
|
openOnClick: false
|
|
8201
8761
|
}),
|
|
8202
8762
|
Text,
|
|
@@ -8246,10 +8806,10 @@ var InlineEditor = React114.forwardRef((props, ref) => {
|
|
|
8246
8806
|
if (mountElement) {
|
|
8247
8807
|
return null;
|
|
8248
8808
|
}
|
|
8249
|
-
return /* @__PURE__ */
|
|
8809
|
+
return /* @__PURE__ */ React118.createElement(Box28, { ref: containerRef, sx, className: wrapperClassName }, /* @__PURE__ */ React118.createElement(EditorContent, { ref, editor }));
|
|
8250
8810
|
});
|
|
8251
8811
|
var useOnUpdate = (callback, dependencies) => {
|
|
8252
|
-
const hasMounted =
|
|
8812
|
+
const hasMounted = useRef29(false);
|
|
8253
8813
|
useEffect18(() => {
|
|
8254
8814
|
if (hasMounted.current) {
|
|
8255
8815
|
callback();
|
|
@@ -8260,8 +8820,8 @@ var useOnUpdate = (callback, dependencies) => {
|
|
|
8260
8820
|
};
|
|
8261
8821
|
|
|
8262
8822
|
// src/components/inline-editor-toolbar.tsx
|
|
8263
|
-
import * as
|
|
8264
|
-
import { useEffect as useEffect20, useMemo as
|
|
8823
|
+
import * as React120 from "react";
|
|
8824
|
+
import { useEffect as useEffect20, useMemo as useMemo18, useRef as useRef31, useState as useState19 } from "react";
|
|
8265
8825
|
import { getContainer as getContainer2, getElementSetting } from "@elementor/editor-elements";
|
|
8266
8826
|
import {
|
|
8267
8827
|
BoldIcon,
|
|
@@ -8274,23 +8834,23 @@ import {
|
|
|
8274
8834
|
UnderlineIcon
|
|
8275
8835
|
} from "@elementor/icons";
|
|
8276
8836
|
import {
|
|
8277
|
-
Box as
|
|
8837
|
+
Box as Box29,
|
|
8278
8838
|
IconButton as IconButton9,
|
|
8279
8839
|
ToggleButton as ToggleButton3,
|
|
8280
8840
|
ToggleButtonGroup as ToggleButtonGroup2,
|
|
8281
8841
|
toggleButtonGroupClasses,
|
|
8282
8842
|
Tooltip as Tooltip10,
|
|
8283
|
-
usePopupState as
|
|
8843
|
+
usePopupState as usePopupState11
|
|
8284
8844
|
} from "@elementor/ui";
|
|
8285
8845
|
import { useEditorState } from "@tiptap/react";
|
|
8286
|
-
import { __ as
|
|
8846
|
+
import { __ as __61 } from "@wordpress/i18n";
|
|
8287
8847
|
|
|
8288
8848
|
// src/components/url-popover.tsx
|
|
8289
|
-
import * as
|
|
8290
|
-
import { useEffect as useEffect19, useRef as
|
|
8849
|
+
import * as React119 from "react";
|
|
8850
|
+
import { useEffect as useEffect19, useRef as useRef30 } from "react";
|
|
8291
8851
|
import { ExternalLinkIcon } from "@elementor/icons";
|
|
8292
|
-
import { bindPopover as bindPopover8, Popover as
|
|
8293
|
-
import { __ as
|
|
8852
|
+
import { bindPopover as bindPopover8, Popover as Popover9, Stack as Stack21, TextField as TextField11, ToggleButton as ToggleButton2, Tooltip as Tooltip9 } from "@elementor/ui";
|
|
8853
|
+
import { __ as __60 } from "@wordpress/i18n";
|
|
8294
8854
|
var UrlPopover = ({
|
|
8295
8855
|
popupState,
|
|
8296
8856
|
restoreValue,
|
|
@@ -8300,7 +8860,7 @@ var UrlPopover = ({
|
|
|
8300
8860
|
openInNewTab,
|
|
8301
8861
|
onToggleNewTab
|
|
8302
8862
|
}) => {
|
|
8303
|
-
const inputRef =
|
|
8863
|
+
const inputRef = useRef30(null);
|
|
8304
8864
|
useEffect19(() => {
|
|
8305
8865
|
if (popupState.isOpen) {
|
|
8306
8866
|
requestAnimationFrame(() => inputRef.current?.focus());
|
|
@@ -8310,8 +8870,8 @@ var UrlPopover = ({
|
|
|
8310
8870
|
restoreValue();
|
|
8311
8871
|
popupState.close();
|
|
8312
8872
|
};
|
|
8313
|
-
return /* @__PURE__ */
|
|
8314
|
-
|
|
8873
|
+
return /* @__PURE__ */ React119.createElement(
|
|
8874
|
+
Popover9,
|
|
8315
8875
|
{
|
|
8316
8876
|
slotProps: {
|
|
8317
8877
|
paper: { sx: { borderRadius: "16px", width: anchorRef.current?.offsetWidth + "px", marginTop: -1 } }
|
|
@@ -8321,30 +8881,30 @@ var UrlPopover = ({
|
|
|
8321
8881
|
transformOrigin: { vertical: "top", horizontal: "left" },
|
|
8322
8882
|
onClose: handleClose
|
|
8323
8883
|
},
|
|
8324
|
-
/* @__PURE__ */
|
|
8884
|
+
/* @__PURE__ */ React119.createElement(Stack21, { direction: "row", alignItems: "center", gap: 1, sx: { p: 1.5 } }, /* @__PURE__ */ React119.createElement(
|
|
8325
8885
|
TextField11,
|
|
8326
8886
|
{
|
|
8327
8887
|
value,
|
|
8328
8888
|
onChange,
|
|
8329
8889
|
size: "tiny",
|
|
8330
8890
|
fullWidth: true,
|
|
8331
|
-
placeholder:
|
|
8891
|
+
placeholder: __60("Type a URL", "elementor"),
|
|
8332
8892
|
inputProps: { ref: inputRef },
|
|
8333
8893
|
color: "secondary",
|
|
8334
8894
|
InputProps: { sx: { borderRadius: "8px" } },
|
|
8335
8895
|
onKeyUp: (event) => event.key === "Enter" && handleClose()
|
|
8336
8896
|
}
|
|
8337
|
-
), /* @__PURE__ */
|
|
8897
|
+
), /* @__PURE__ */ React119.createElement(Tooltip9, { title: __60("Open in a new tab", "elementor") }, /* @__PURE__ */ React119.createElement(
|
|
8338
8898
|
ToggleButton2,
|
|
8339
8899
|
{
|
|
8340
8900
|
size: "tiny",
|
|
8341
8901
|
value: "newTab",
|
|
8342
8902
|
selected: openInNewTab,
|
|
8343
8903
|
onClick: onToggleNewTab,
|
|
8344
|
-
"aria-label":
|
|
8904
|
+
"aria-label": __60("Open in a new tab", "elementor"),
|
|
8345
8905
|
sx: { borderRadius: "8px" }
|
|
8346
8906
|
},
|
|
8347
|
-
/* @__PURE__ */
|
|
8907
|
+
/* @__PURE__ */ React119.createElement(ExternalLinkIcon, { fontSize: "tiny" })
|
|
8348
8908
|
)))
|
|
8349
8909
|
);
|
|
8350
8910
|
};
|
|
@@ -8358,14 +8918,14 @@ var InlineEditorToolbar = ({
|
|
|
8358
8918
|
}) => {
|
|
8359
8919
|
const [urlValue, setUrlValue] = useState19("");
|
|
8360
8920
|
const [openInNewTab, setOpenInNewTab] = useState19(false);
|
|
8361
|
-
const toolbarRef =
|
|
8362
|
-
const linkPopupState =
|
|
8921
|
+
const toolbarRef = useRef31(null);
|
|
8922
|
+
const linkPopupState = usePopupState11({ variant: "popover" });
|
|
8363
8923
|
const isElementClickable = elementId ? checkIfElementIsClickable(elementId) : false;
|
|
8364
8924
|
const editorState = useEditorState({
|
|
8365
8925
|
editor,
|
|
8366
8926
|
selector: (ctx) => possibleFormats.filter((format) => ctx.editor.isActive(format))
|
|
8367
8927
|
});
|
|
8368
|
-
const formatButtonsList =
|
|
8928
|
+
const formatButtonsList = useMemo18(() => {
|
|
8369
8929
|
const buttons = Object.values(formatButtons);
|
|
8370
8930
|
if (isElementClickable) {
|
|
8371
8931
|
return buttons.filter((button) => button.action !== "link");
|
|
@@ -8407,8 +8967,8 @@ var InlineEditorToolbar = ({
|
|
|
8407
8967
|
editor?.commands?.focus();
|
|
8408
8968
|
}
|
|
8409
8969
|
}, [editor, inControlPanel]);
|
|
8410
|
-
return /* @__PURE__ */
|
|
8411
|
-
|
|
8970
|
+
return /* @__PURE__ */ React120.createElement(
|
|
8971
|
+
Box29,
|
|
8412
8972
|
{
|
|
8413
8973
|
ref: toolbarRef,
|
|
8414
8974
|
sx: {
|
|
@@ -8441,8 +9001,8 @@ var InlineEditorToolbar = ({
|
|
|
8441
9001
|
}
|
|
8442
9002
|
}
|
|
8443
9003
|
},
|
|
8444
|
-
/* @__PURE__ */
|
|
8445
|
-
/* @__PURE__ */
|
|
9004
|
+
/* @__PURE__ */ React120.createElement(Tooltip10, { title: clearButton.label, placement: "top", sx: { borderRadius: "8px" } }, /* @__PURE__ */ React120.createElement(IconButton9, { "aria-label": clearButton.label, onClick: () => clearButton.method(editor), size: "tiny" }, clearButton.icon)),
|
|
9005
|
+
/* @__PURE__ */ React120.createElement(
|
|
8446
9006
|
ToggleButtonGroup2,
|
|
8447
9007
|
{
|
|
8448
9008
|
value: editorState,
|
|
@@ -8472,7 +9032,7 @@ var InlineEditorToolbar = ({
|
|
|
8472
9032
|
}
|
|
8473
9033
|
}
|
|
8474
9034
|
},
|
|
8475
|
-
formatButtonsList.map((button) => /* @__PURE__ */
|
|
9035
|
+
formatButtonsList.map((button) => /* @__PURE__ */ React120.createElement(Tooltip10, { title: button.label, key: button.action, placement: "top" }, /* @__PURE__ */ React120.createElement(
|
|
8476
9036
|
ToggleButton3,
|
|
8477
9037
|
{
|
|
8478
9038
|
value: button.action,
|
|
@@ -8490,7 +9050,7 @@ var InlineEditorToolbar = ({
|
|
|
8490
9050
|
button.icon
|
|
8491
9051
|
)))
|
|
8492
9052
|
),
|
|
8493
|
-
/* @__PURE__ */
|
|
9053
|
+
/* @__PURE__ */ React120.createElement(
|
|
8494
9054
|
UrlPopover,
|
|
8495
9055
|
{
|
|
8496
9056
|
popupState: linkPopupState,
|
|
@@ -8513,64 +9073,64 @@ var checkIfElementIsClickable = (elementId) => {
|
|
|
8513
9073
|
};
|
|
8514
9074
|
var toolbarButtons = {
|
|
8515
9075
|
clear: {
|
|
8516
|
-
label:
|
|
8517
|
-
icon: /* @__PURE__ */
|
|
9076
|
+
label: __61("Clear", "elementor"),
|
|
9077
|
+
icon: /* @__PURE__ */ React120.createElement(MinusIcon2, { fontSize: "tiny" }),
|
|
8518
9078
|
action: "clear",
|
|
8519
9079
|
method: (editor) => {
|
|
8520
9080
|
editor.chain().focus().clearNodes().unsetAllMarks().run();
|
|
8521
9081
|
}
|
|
8522
9082
|
},
|
|
8523
9083
|
bold: {
|
|
8524
|
-
label:
|
|
8525
|
-
icon: /* @__PURE__ */
|
|
9084
|
+
label: __61("Bold", "elementor"),
|
|
9085
|
+
icon: /* @__PURE__ */ React120.createElement(BoldIcon, { fontSize: "tiny" }),
|
|
8526
9086
|
action: "bold",
|
|
8527
9087
|
method: (editor) => {
|
|
8528
9088
|
editor.chain().focus().toggleBold().run();
|
|
8529
9089
|
}
|
|
8530
9090
|
},
|
|
8531
9091
|
italic: {
|
|
8532
|
-
label:
|
|
8533
|
-
icon: /* @__PURE__ */
|
|
9092
|
+
label: __61("Italic", "elementor"),
|
|
9093
|
+
icon: /* @__PURE__ */ React120.createElement(ItalicIcon, { fontSize: "tiny" }),
|
|
8534
9094
|
action: "italic",
|
|
8535
9095
|
method: (editor) => {
|
|
8536
9096
|
editor.chain().focus().toggleItalic().run();
|
|
8537
9097
|
}
|
|
8538
9098
|
},
|
|
8539
9099
|
underline: {
|
|
8540
|
-
label:
|
|
8541
|
-
icon: /* @__PURE__ */
|
|
9100
|
+
label: __61("Underline", "elementor"),
|
|
9101
|
+
icon: /* @__PURE__ */ React120.createElement(UnderlineIcon, { fontSize: "tiny" }),
|
|
8542
9102
|
action: "underline",
|
|
8543
9103
|
method: (editor) => {
|
|
8544
9104
|
editor.chain().focus().toggleUnderline().run();
|
|
8545
9105
|
}
|
|
8546
9106
|
},
|
|
8547
9107
|
strike: {
|
|
8548
|
-
label:
|
|
8549
|
-
icon: /* @__PURE__ */
|
|
9108
|
+
label: __61("Strikethrough", "elementor"),
|
|
9109
|
+
icon: /* @__PURE__ */ React120.createElement(StrikethroughIcon, { fontSize: "tiny" }),
|
|
8550
9110
|
action: "strike",
|
|
8551
9111
|
method: (editor) => {
|
|
8552
9112
|
editor.chain().focus().toggleStrike().run();
|
|
8553
9113
|
}
|
|
8554
9114
|
},
|
|
8555
9115
|
superscript: {
|
|
8556
|
-
label:
|
|
8557
|
-
icon: /* @__PURE__ */
|
|
9116
|
+
label: __61("Superscript", "elementor"),
|
|
9117
|
+
icon: /* @__PURE__ */ React120.createElement(SuperscriptIcon, { fontSize: "tiny" }),
|
|
8558
9118
|
action: "superscript",
|
|
8559
9119
|
method: (editor) => {
|
|
8560
9120
|
editor.chain().focus().toggleSuperscript().run();
|
|
8561
9121
|
}
|
|
8562
9122
|
},
|
|
8563
9123
|
subscript: {
|
|
8564
|
-
label:
|
|
8565
|
-
icon: /* @__PURE__ */
|
|
9124
|
+
label: __61("Subscript", "elementor"),
|
|
9125
|
+
icon: /* @__PURE__ */ React120.createElement(SubscriptIcon, { fontSize: "tiny" }),
|
|
8566
9126
|
action: "subscript",
|
|
8567
9127
|
method: (editor) => {
|
|
8568
9128
|
editor.chain().focus().toggleSubscript().run();
|
|
8569
9129
|
}
|
|
8570
9130
|
},
|
|
8571
9131
|
link: {
|
|
8572
|
-
label:
|
|
8573
|
-
icon: /* @__PURE__ */
|
|
9132
|
+
label: __61("Link", "elementor"),
|
|
9133
|
+
icon: /* @__PURE__ */ React120.createElement(LinkIcon3, { fontSize: "tiny" }),
|
|
8574
9134
|
action: "link",
|
|
8575
9135
|
method: null
|
|
8576
9136
|
}
|
|
@@ -8591,7 +9151,7 @@ var InlineEditingControl = createControl(({ sx, attributes, props, context: { el
|
|
|
8591
9151
|
},
|
|
8592
9152
|
[setValue]
|
|
8593
9153
|
);
|
|
8594
|
-
return /* @__PURE__ */
|
|
9154
|
+
return /* @__PURE__ */ React121.createElement(ControlActions, null, /* @__PURE__ */ React121.createElement(Box30, { sx: { position: "relative" } }, editor && editor.isEditable && /* @__PURE__ */ React121.createElement(
|
|
8595
9155
|
InlineEditorToolbar,
|
|
8596
9156
|
{
|
|
8597
9157
|
editor,
|
|
@@ -8604,8 +9164,8 @@ var InlineEditingControl = createControl(({ sx, attributes, props, context: { el
|
|
|
8604
9164
|
}),
|
|
8605
9165
|
inControlPanel: true
|
|
8606
9166
|
}
|
|
8607
|
-
), /* @__PURE__ */
|
|
8608
|
-
|
|
9167
|
+
), /* @__PURE__ */ React121.createElement(
|
|
9168
|
+
Box30,
|
|
8609
9169
|
{
|
|
8610
9170
|
sx: (theme) => ({
|
|
8611
9171
|
p: 0.8,
|
|
@@ -8649,7 +9209,7 @@ var InlineEditingControl = createControl(({ sx, attributes, props, context: { el
|
|
|
8649
9209
|
...attributes,
|
|
8650
9210
|
...props
|
|
8651
9211
|
},
|
|
8652
|
-
/* @__PURE__ */
|
|
9212
|
+
/* @__PURE__ */ React121.createElement(
|
|
8653
9213
|
InlineEditor,
|
|
8654
9214
|
{
|
|
8655
9215
|
value: content,
|
|
@@ -8666,17 +9226,17 @@ var InlineEditingControl = createControl(({ sx, attributes, props, context: { el
|
|
|
8666
9226
|
});
|
|
8667
9227
|
|
|
8668
9228
|
// src/controls/email-form-action-control/index.tsx
|
|
8669
|
-
import * as
|
|
9229
|
+
import * as React125 from "react";
|
|
8670
9230
|
import { emailsPropTypeUtil } from "@elementor/editor-props";
|
|
8671
9231
|
import { CollapsibleContent } from "@elementor/editor-ui";
|
|
8672
|
-
import { Box as
|
|
8673
|
-
import { __ as
|
|
9232
|
+
import { Box as Box31, Divider as Divider6, Stack as Stack23 } from "@elementor/ui";
|
|
9233
|
+
import { __ as __63 } from "@wordpress/i18n";
|
|
8674
9234
|
|
|
8675
9235
|
// src/controls/email-form-action-control/fields.tsx
|
|
8676
|
-
import * as
|
|
9236
|
+
import * as React124 from "react";
|
|
8677
9237
|
import { InfoAlert as InfoAlert2 } from "@elementor/editor-ui";
|
|
8678
|
-
import { Grid as Grid34, Stack as
|
|
8679
|
-
import { __ as
|
|
9238
|
+
import { Grid as Grid34, Stack as Stack22 } from "@elementor/ui";
|
|
9239
|
+
import { __ as __62 } from "@wordpress/i18n";
|
|
8680
9240
|
|
|
8681
9241
|
// src/hooks/use-form-field-suggestions.ts
|
|
8682
9242
|
import { getContainer as getContainer3, getSelectedElements as getSelectedElements3, getWidgetsCache } from "@elementor/editor-elements";
|
|
@@ -8765,8 +9325,8 @@ function useFormFieldSuggestions(options) {
|
|
|
8765
9325
|
}
|
|
8766
9326
|
|
|
8767
9327
|
// src/controls/email-form-action-control/email-chips-field.tsx
|
|
8768
|
-
import * as
|
|
8769
|
-
import { useMemo as
|
|
9328
|
+
import * as React122 from "react";
|
|
9329
|
+
import { useMemo as useMemo19, useState as useState21 } from "react";
|
|
8770
9330
|
import { stringArrayPropTypeUtil as stringArrayPropTypeUtil3, stringPropTypeUtil as stringPropTypeUtil23 } from "@elementor/editor-props";
|
|
8771
9331
|
import { Autocomplete as Autocomplete4, Grid as Grid32, TextField as TextField12 } from "@elementor/ui";
|
|
8772
9332
|
|
|
@@ -8807,7 +9367,7 @@ var EmailChipsControl = createControl(({ placeholder, suggestions = [] }) => {
|
|
|
8807
9367
|
const [inputValue, setInputValue] = useState21("");
|
|
8808
9368
|
const items2 = value || [];
|
|
8809
9369
|
const selectedValues = items2.map((item) => stringPropTypeUtil23.extract(item)).filter((val) => val !== null);
|
|
8810
|
-
const suggestionOptions =
|
|
9370
|
+
const suggestionOptions = useMemo19(
|
|
8811
9371
|
() => suggestions.map((suggestion) => `[${suggestion.value}]`),
|
|
8812
9372
|
[suggestions]
|
|
8813
9373
|
);
|
|
@@ -8842,7 +9402,7 @@ var EmailChipsControl = createControl(({ placeholder, suggestions = [] }) => {
|
|
|
8842
9402
|
tryAddChip(inputValue);
|
|
8843
9403
|
}
|
|
8844
9404
|
};
|
|
8845
|
-
return /* @__PURE__ */
|
|
9405
|
+
return /* @__PURE__ */ React122.createElement(ControlActions, null, /* @__PURE__ */ React122.createElement(
|
|
8846
9406
|
Autocomplete4,
|
|
8847
9407
|
{
|
|
8848
9408
|
fullWidth: true,
|
|
@@ -8867,99 +9427,99 @@ var EmailChipsControl = createControl(({ placeholder, suggestions = [] }) => {
|
|
|
8867
9427
|
onBlur: handleBlur,
|
|
8868
9428
|
getOptionLabel: (option) => option,
|
|
8869
9429
|
isOptionEqualToValue: (option, val) => option === val,
|
|
8870
|
-
renderInput: (params) => /* @__PURE__ */
|
|
8871
|
-
renderTags: (tagValues, getTagProps) => /* @__PURE__ */
|
|
9430
|
+
renderInput: (params) => /* @__PURE__ */ React122.createElement(TextField12, { ...params, placeholder, onKeyDown: handleKeyDown }),
|
|
9431
|
+
renderTags: (tagValues, getTagProps) => /* @__PURE__ */ React122.createElement(ChipsList, { getLabel: (option) => option, getTagProps, values: tagValues })
|
|
8872
9432
|
}
|
|
8873
9433
|
));
|
|
8874
9434
|
});
|
|
8875
|
-
var EmailChipsField = ({ fieldLabel, placeholder, suggestions }) => /* @__PURE__ */
|
|
9435
|
+
var EmailChipsField = ({ fieldLabel, placeholder, suggestions }) => /* @__PURE__ */ React122.createElement(Grid32, { container: true, direction: "column", gap: 0.5 }, /* @__PURE__ */ React122.createElement(Grid32, { item: true }, /* @__PURE__ */ React122.createElement(ControlFormLabel, null, fieldLabel)), /* @__PURE__ */ React122.createElement(Grid32, { item: true }, /* @__PURE__ */ React122.createElement(EmailChipsControl, { placeholder, suggestions })));
|
|
8876
9436
|
|
|
8877
9437
|
// src/controls/email-form-action-control/email-field.tsx
|
|
8878
|
-
import * as
|
|
9438
|
+
import * as React123 from "react";
|
|
8879
9439
|
import { Grid as Grid33 } from "@elementor/ui";
|
|
8880
|
-
var EmailField = ({ bind, label, placeholder }) => /* @__PURE__ */
|
|
9440
|
+
var EmailField = ({ bind, label, placeholder }) => /* @__PURE__ */ React123.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React123.createElement(Grid33, { container: true, direction: "column", gap: 0.5 }, /* @__PURE__ */ React123.createElement(Grid33, { item: true }, /* @__PURE__ */ React123.createElement(ControlFormLabel, null, label)), /* @__PURE__ */ React123.createElement(Grid33, { item: true }, /* @__PURE__ */ React123.createElement(TextControl, { placeholder }))));
|
|
8881
9441
|
|
|
8882
9442
|
// src/controls/email-form-action-control/fields.tsx
|
|
8883
9443
|
var SendToField = ({ placeholder }) => {
|
|
8884
9444
|
const suggestions = useFormFieldSuggestions({ inputType: "email" });
|
|
8885
|
-
return /* @__PURE__ */
|
|
9445
|
+
return /* @__PURE__ */ React124.createElement(PropKeyProvider, { bind: "to" }, /* @__PURE__ */ React124.createElement(Stack22, { gap: 0.5 }, /* @__PURE__ */ React124.createElement(
|
|
8886
9446
|
EmailChipsField,
|
|
8887
9447
|
{
|
|
8888
|
-
fieldLabel:
|
|
9448
|
+
fieldLabel: __62("Send to", "elementor"),
|
|
8889
9449
|
placeholder,
|
|
8890
9450
|
suggestions
|
|
8891
9451
|
}
|
|
8892
|
-
), shouldShowMentionsInfo() && /* @__PURE__ */
|
|
9452
|
+
), shouldShowMentionsInfo() && /* @__PURE__ */ React124.createElement(InfoAlert2, null, __62("Type @ or an email field name to insert its submitted value.", "elementor"))));
|
|
8893
9453
|
};
|
|
8894
|
-
var SubjectField = () => /* @__PURE__ */
|
|
9454
|
+
var SubjectField = () => /* @__PURE__ */ React124.createElement(
|
|
8895
9455
|
EmailField,
|
|
8896
9456
|
{
|
|
8897
9457
|
bind: "subject",
|
|
8898
|
-
label:
|
|
8899
|
-
placeholder:
|
|
9458
|
+
label: __62("Email subject", "elementor"),
|
|
9459
|
+
placeholder: __62("New form submission", "elementor")
|
|
8900
9460
|
}
|
|
8901
9461
|
);
|
|
8902
9462
|
var MessageField = () => {
|
|
8903
9463
|
const suggestions = useFormFieldSuggestions();
|
|
8904
|
-
return /* @__PURE__ */
|
|
9464
|
+
return /* @__PURE__ */ React124.createElement(PropKeyProvider, { bind: "message" }, /* @__PURE__ */ React124.createElement(Grid34, { container: true, direction: "column", gap: 0.5 }, /* @__PURE__ */ React124.createElement(Grid34, { item: true }, /* @__PURE__ */ React124.createElement(ControlFormLabel, null, __62("Message", "elementor"))), /* @__PURE__ */ React124.createElement(Grid34, { item: true }, /* @__PURE__ */ React124.createElement(MentionTextAreaControl, { suggestions })), /* @__PURE__ */ React124.createElement(Grid34, { item: true }, /* @__PURE__ */ React124.createElement(InfoAlert2, null, shouldShowMentionsInfo() ? __62(
|
|
8905
9465
|
"[all-fields] shortcode sends all fields. Type @ to insert specific fields and customize your message.",
|
|
8906
9466
|
"elementor"
|
|
8907
|
-
) :
|
|
9467
|
+
) : __62("[all-fields] shortcode sends all fields.", "elementor")))));
|
|
8908
9468
|
};
|
|
8909
|
-
var FromEmailField = () => /* @__PURE__ */
|
|
9469
|
+
var FromEmailField = () => /* @__PURE__ */ React124.createElement(
|
|
8910
9470
|
EmailField,
|
|
8911
9471
|
{
|
|
8912
9472
|
bind: "from",
|
|
8913
|
-
label:
|
|
8914
|
-
placeholder:
|
|
9473
|
+
label: __62("From email", "elementor"),
|
|
9474
|
+
placeholder: __62("What email should appear as the sender?", "elementor")
|
|
8915
9475
|
}
|
|
8916
9476
|
);
|
|
8917
|
-
var FromNameField = () => /* @__PURE__ */
|
|
9477
|
+
var FromNameField = () => /* @__PURE__ */ React124.createElement(
|
|
8918
9478
|
EmailField,
|
|
8919
9479
|
{
|
|
8920
9480
|
bind: "from-name",
|
|
8921
|
-
label:
|
|
8922
|
-
placeholder:
|
|
9481
|
+
label: __62("From name", "elementor"),
|
|
9482
|
+
placeholder: __62("What name should appear as the sender?", "elementor")
|
|
8923
9483
|
}
|
|
8924
9484
|
);
|
|
8925
9485
|
var ReplyToField = () => {
|
|
8926
9486
|
const emailSuggestions = useFormFieldSuggestions({ inputType: "email" });
|
|
8927
|
-
return /* @__PURE__ */
|
|
9487
|
+
return /* @__PURE__ */ React124.createElement(PropKeyProvider, { bind: "reply-to" }, /* @__PURE__ */ React124.createElement(Grid34, { container: true, direction: "column", gap: 0.5 }, /* @__PURE__ */ React124.createElement(Grid34, { item: true }, /* @__PURE__ */ React124.createElement(ControlFormLabel, null, __62("Reply-to", "elementor"))), /* @__PURE__ */ React124.createElement(Grid34, { item: true }, /* @__PURE__ */ React124.createElement(
|
|
8928
9488
|
MentionTextAreaControl,
|
|
8929
9489
|
{
|
|
8930
9490
|
suggestions: emailSuggestions,
|
|
8931
9491
|
rows: 1,
|
|
8932
9492
|
triggerPosition: "start",
|
|
8933
|
-
placeholder:
|
|
9493
|
+
placeholder: __62("You can type @ to insert an email field", "elementor")
|
|
8934
9494
|
}
|
|
8935
9495
|
))));
|
|
8936
9496
|
};
|
|
8937
9497
|
var CcField = () => {
|
|
8938
9498
|
const suggestions = useFormFieldSuggestions({ inputType: "email" });
|
|
8939
|
-
return /* @__PURE__ */
|
|
9499
|
+
return /* @__PURE__ */ React124.createElement(PropKeyProvider, { bind: "cc" }, /* @__PURE__ */ React124.createElement(EmailChipsField, { fieldLabel: __62("Cc", "elementor"), suggestions }));
|
|
8940
9500
|
};
|
|
8941
9501
|
var BccField = () => {
|
|
8942
9502
|
const suggestions = useFormFieldSuggestions({ inputType: "email" });
|
|
8943
|
-
return /* @__PURE__ */
|
|
9503
|
+
return /* @__PURE__ */ React124.createElement(PropKeyProvider, { bind: "bcc" }, /* @__PURE__ */ React124.createElement(EmailChipsField, { fieldLabel: __62("Bcc", "elementor"), suggestions }));
|
|
8944
9504
|
};
|
|
8945
|
-
var MetaDataField = () => /* @__PURE__ */
|
|
9505
|
+
var MetaDataField = () => /* @__PURE__ */ React124.createElement(PropKeyProvider, { bind: "meta-data" }, /* @__PURE__ */ React124.createElement(Stack22, { gap: 0.5 }, /* @__PURE__ */ React124.createElement(ControlFormLabel, null, __62("Metadata", "elementor")), /* @__PURE__ */ React124.createElement(
|
|
8946
9506
|
ChipsControl,
|
|
8947
9507
|
{
|
|
8948
9508
|
options: [
|
|
8949
|
-
{ label:
|
|
8950
|
-
{ label:
|
|
8951
|
-
{ label:
|
|
8952
|
-
{ label:
|
|
8953
|
-
{ label:
|
|
9509
|
+
{ label: __62("Date", "elementor"), value: "date" },
|
|
9510
|
+
{ label: __62("Time", "elementor"), value: "time" },
|
|
9511
|
+
{ label: __62("Page URL", "elementor"), value: "page-url" },
|
|
9512
|
+
{ label: __62("User agent", "elementor"), value: "user-agent" },
|
|
9513
|
+
{ label: __62("Credit", "elementor"), value: "credit" }
|
|
8954
9514
|
]
|
|
8955
9515
|
}
|
|
8956
9516
|
)));
|
|
8957
|
-
var SendAsField = () => /* @__PURE__ */
|
|
9517
|
+
var SendAsField = () => /* @__PURE__ */ React124.createElement(PropKeyProvider, { bind: "send-as" }, /* @__PURE__ */ React124.createElement(Grid34, { container: true, direction: "column", gap: 0.5 }, /* @__PURE__ */ React124.createElement(Grid34, { item: true }, /* @__PURE__ */ React124.createElement(ControlFormLabel, null, __62("Send as", "elementor"))), /* @__PURE__ */ React124.createElement(Grid34, { item: true }, /* @__PURE__ */ React124.createElement(
|
|
8958
9518
|
SelectControl,
|
|
8959
9519
|
{
|
|
8960
9520
|
options: [
|
|
8961
|
-
{ label:
|
|
8962
|
-
{ label:
|
|
9521
|
+
{ label: __62("HTML", "elementor"), value: "html" },
|
|
9522
|
+
{ label: __62("Plain Text", "elementor"), value: "plain" }
|
|
8963
9523
|
]
|
|
8964
9524
|
}
|
|
8965
9525
|
))));
|
|
@@ -8968,25 +9528,25 @@ var SendAsField = () => /* @__PURE__ */ React120.createElement(PropKeyProvider,
|
|
|
8968
9528
|
var EmailFormActionControl = createControl(
|
|
8969
9529
|
({ toPlaceholder, label }) => {
|
|
8970
9530
|
const { value, setValue, ...propContext } = useBoundProp(emailsPropTypeUtil);
|
|
8971
|
-
return /* @__PURE__ */
|
|
9531
|
+
return /* @__PURE__ */ React125.createElement(PropProvider, { ...propContext, value, setValue }, /* @__PURE__ */ React125.createElement(Stack23, { gap: 2 }, /* @__PURE__ */ React125.createElement(ControlLabel, null, label ? label + " " + __63("settings", "elementor") : __63("Email settings", "elementor")), /* @__PURE__ */ React125.createElement(SendToField, { placeholder: toPlaceholder }), /* @__PURE__ */ React125.createElement(SubjectField, null), /* @__PURE__ */ React125.createElement(MessageField, null), /* @__PURE__ */ React125.createElement(FromEmailField, null), /* @__PURE__ */ React125.createElement(AdvancedSettings, null)));
|
|
8972
9532
|
}
|
|
8973
9533
|
);
|
|
8974
|
-
var AdvancedSettings = () => /* @__PURE__ */
|
|
9534
|
+
var AdvancedSettings = () => /* @__PURE__ */ React125.createElement(CollapsibleContent, { defaultOpen: false }, /* @__PURE__ */ React125.createElement(Box31, { sx: { pt: 2 } }, /* @__PURE__ */ React125.createElement(Stack23, { gap: 2 }, /* @__PURE__ */ React125.createElement(FromNameField, null), /* @__PURE__ */ React125.createElement(ReplyToField, null), /* @__PURE__ */ React125.createElement(CcField, null), /* @__PURE__ */ React125.createElement(BccField, null), /* @__PURE__ */ React125.createElement(Divider6, null), /* @__PURE__ */ React125.createElement(MetaDataField, null), /* @__PURE__ */ React125.createElement(SendAsField, null))));
|
|
8975
9535
|
|
|
8976
9536
|
// src/controls/attachment-type-control.tsx
|
|
8977
|
-
import * as
|
|
9537
|
+
import * as React126 from "react";
|
|
8978
9538
|
import { InfoAlert as InfoAlert3 } from "@elementor/editor-ui";
|
|
8979
9539
|
import { Grid as Grid35 } from "@elementor/ui";
|
|
8980
|
-
import { __ as
|
|
9540
|
+
import { __ as __64 } from "@wordpress/i18n";
|
|
8981
9541
|
var AttachmentTypeControl = createControl(({ label, options }) => {
|
|
8982
|
-
return /* @__PURE__ */
|
|
9542
|
+
return /* @__PURE__ */ React126.createElement(Grid35, { container: true, direction: "column", gap: 1 }, label && /* @__PURE__ */ React126.createElement(Grid35, { item: true }, /* @__PURE__ */ React126.createElement(ControlFormLabel, null, label)), /* @__PURE__ */ React126.createElement(Grid35, { item: true }, /* @__PURE__ */ React126.createElement(SelectControl, { options })), /* @__PURE__ */ React126.createElement(Grid35, { item: true }, /* @__PURE__ */ React126.createElement(InfoAlert3, null, __64(
|
|
8983
9543
|
"Linked uploads are saved to the server. Direct attachments will not appear under Submissions.",
|
|
8984
9544
|
"elementor"
|
|
8985
9545
|
))));
|
|
8986
9546
|
});
|
|
8987
9547
|
|
|
8988
9548
|
// src/controls/grid-span-control.tsx
|
|
8989
|
-
import * as
|
|
9549
|
+
import * as React127 from "react";
|
|
8990
9550
|
import { spanPropTypeUtil } from "@elementor/editor-props";
|
|
8991
9551
|
import { TextField as TextField13 } from "@elementor/ui";
|
|
8992
9552
|
var GridSpanControl = createControl(
|
|
@@ -9005,7 +9565,7 @@ var GridSpanControl = createControl(
|
|
|
9005
9565
|
setValue(next === "" ? null : next);
|
|
9006
9566
|
};
|
|
9007
9567
|
const placeholder = propPlaceholder ?? boundPlaceholder ?? `e.g: 'span 2' or '1 / 3'`;
|
|
9008
|
-
return /* @__PURE__ */
|
|
9568
|
+
return /* @__PURE__ */ React127.createElement(ControlActions, null, /* @__PURE__ */ React127.createElement(
|
|
9009
9569
|
TextField13,
|
|
9010
9570
|
{
|
|
9011
9571
|
size: "tiny",
|
|
@@ -9026,17 +9586,17 @@ var GridSpanControl = createControl(
|
|
|
9026
9586
|
);
|
|
9027
9587
|
|
|
9028
9588
|
// src/components/promotions/display-conditions-control.tsx
|
|
9029
|
-
import * as
|
|
9030
|
-
import { useRef as
|
|
9589
|
+
import * as React129 from "react";
|
|
9590
|
+
import { useRef as useRef32 } from "react";
|
|
9031
9591
|
import { SitemapIcon } from "@elementor/icons";
|
|
9032
|
-
import { IconButton as IconButton10, Stack as
|
|
9033
|
-
import { __ as
|
|
9592
|
+
import { IconButton as IconButton10, Stack as Stack24, Tooltip as Tooltip11 } from "@elementor/ui";
|
|
9593
|
+
import { __ as __65 } from "@wordpress/i18n";
|
|
9034
9594
|
|
|
9035
9595
|
// src/components/promotions/promotion-trigger.tsx
|
|
9036
|
-
import * as
|
|
9596
|
+
import * as React128 from "react";
|
|
9037
9597
|
import { forwardRef as forwardRef12, useCallback as useCallback5, useImperativeHandle, useState as useState22 } from "react";
|
|
9038
9598
|
import { PromotionChip as PromotionChip2, PromotionInfotip } from "@elementor/editor-ui";
|
|
9039
|
-
import { Box as
|
|
9599
|
+
import { Box as Box32 } from "@elementor/ui";
|
|
9040
9600
|
function getV4Promotion(key) {
|
|
9041
9601
|
return window.elementor?.config?.v4Promotions?.[key];
|
|
9042
9602
|
}
|
|
@@ -9053,7 +9613,7 @@ var PromotionTrigger = forwardRef12(
|
|
|
9053
9613
|
});
|
|
9054
9614
|
}, [trackingData]);
|
|
9055
9615
|
useImperativeHandle(ref, () => ({ toggle }), [toggle]);
|
|
9056
|
-
return /* @__PURE__ */
|
|
9616
|
+
return /* @__PURE__ */ React128.createElement(React128.Fragment, null, promotion && /* @__PURE__ */ React128.createElement(
|
|
9057
9617
|
PromotionInfotip,
|
|
9058
9618
|
{
|
|
9059
9619
|
title: promotion.title,
|
|
@@ -9067,8 +9627,8 @@ var PromotionTrigger = forwardRef12(
|
|
|
9067
9627
|
},
|
|
9068
9628
|
onCtaClick: () => trackUpgradePromotionClick(trackingData)
|
|
9069
9629
|
},
|
|
9070
|
-
/* @__PURE__ */
|
|
9071
|
-
|
|
9630
|
+
/* @__PURE__ */ React128.createElement(
|
|
9631
|
+
Box32,
|
|
9072
9632
|
{
|
|
9073
9633
|
onClick: (e) => {
|
|
9074
9634
|
e.stopPropagation();
|
|
@@ -9076,19 +9636,19 @@ var PromotionTrigger = forwardRef12(
|
|
|
9076
9636
|
},
|
|
9077
9637
|
sx: { cursor: "pointer", display: "inline-flex" }
|
|
9078
9638
|
},
|
|
9079
|
-
children ?? /* @__PURE__ */
|
|
9639
|
+
children ?? /* @__PURE__ */ React128.createElement(PromotionChip2, null)
|
|
9080
9640
|
)
|
|
9081
9641
|
));
|
|
9082
9642
|
}
|
|
9083
9643
|
);
|
|
9084
9644
|
|
|
9085
9645
|
// src/components/promotions/display-conditions-control.tsx
|
|
9086
|
-
var ARIA_LABEL =
|
|
9646
|
+
var ARIA_LABEL = __65("Display Conditions", "elementor");
|
|
9087
9647
|
var TRACKING_DATA = { target_name: "display_conditions", location_l2: "general" };
|
|
9088
9648
|
var DisplayConditionsControl = createControl(() => {
|
|
9089
|
-
const triggerRef =
|
|
9090
|
-
return /* @__PURE__ */
|
|
9091
|
-
|
|
9649
|
+
const triggerRef = useRef32(null);
|
|
9650
|
+
return /* @__PURE__ */ React129.createElement(
|
|
9651
|
+
Stack24,
|
|
9092
9652
|
{
|
|
9093
9653
|
direction: "row",
|
|
9094
9654
|
spacing: 2,
|
|
@@ -9097,8 +9657,8 @@ var DisplayConditionsControl = createControl(() => {
|
|
|
9097
9657
|
alignItems: "center"
|
|
9098
9658
|
}
|
|
9099
9659
|
},
|
|
9100
|
-
/* @__PURE__ */
|
|
9101
|
-
/* @__PURE__ */
|
|
9660
|
+
/* @__PURE__ */ React129.createElement(PromotionTrigger, { ref: triggerRef, promotionKey: "displayConditions", trackingData: TRACKING_DATA }),
|
|
9661
|
+
/* @__PURE__ */ React129.createElement(Tooltip11, { title: ARIA_LABEL, placement: "top" }, /* @__PURE__ */ React129.createElement(
|
|
9102
9662
|
IconButton10,
|
|
9103
9663
|
{
|
|
9104
9664
|
size: "tiny",
|
|
@@ -9111,23 +9671,23 @@ var DisplayConditionsControl = createControl(() => {
|
|
|
9111
9671
|
borderRadius: 1
|
|
9112
9672
|
}
|
|
9113
9673
|
},
|
|
9114
|
-
/* @__PURE__ */
|
|
9674
|
+
/* @__PURE__ */ React129.createElement(SitemapIcon, { fontSize: "tiny", color: "disabled" })
|
|
9115
9675
|
))
|
|
9116
9676
|
);
|
|
9117
9677
|
});
|
|
9118
9678
|
|
|
9119
9679
|
// src/components/promotions/attributes-control.tsx
|
|
9120
|
-
import * as
|
|
9121
|
-
import { useRef as
|
|
9680
|
+
import * as React130 from "react";
|
|
9681
|
+
import { useRef as useRef33 } from "react";
|
|
9122
9682
|
import { PlusIcon as PlusIcon4 } from "@elementor/icons";
|
|
9123
|
-
import { Stack as
|
|
9124
|
-
import { __ as
|
|
9125
|
-
var ARIA_LABEL2 =
|
|
9683
|
+
import { Stack as Stack25, Tooltip as Tooltip12 } from "@elementor/ui";
|
|
9684
|
+
import { __ as __66 } from "@wordpress/i18n";
|
|
9685
|
+
var ARIA_LABEL2 = __66("Attributes", "elementor");
|
|
9126
9686
|
var TRACKING_DATA2 = { target_name: "attributes", location_l2: "general" };
|
|
9127
9687
|
var AttributesControl = createControl(() => {
|
|
9128
|
-
const triggerRef =
|
|
9129
|
-
return /* @__PURE__ */
|
|
9130
|
-
|
|
9688
|
+
const triggerRef = useRef33(null);
|
|
9689
|
+
return /* @__PURE__ */ React130.createElement(
|
|
9690
|
+
Stack25,
|
|
9131
9691
|
{
|
|
9132
9692
|
direction: "row",
|
|
9133
9693
|
spacing: 2,
|
|
@@ -9136,8 +9696,8 @@ var AttributesControl = createControl(() => {
|
|
|
9136
9696
|
alignItems: "center"
|
|
9137
9697
|
}
|
|
9138
9698
|
},
|
|
9139
|
-
/* @__PURE__ */
|
|
9140
|
-
/* @__PURE__ */
|
|
9699
|
+
/* @__PURE__ */ React130.createElement(PromotionTrigger, { ref: triggerRef, promotionKey: "attributes", trackingData: TRACKING_DATA2 }),
|
|
9700
|
+
/* @__PURE__ */ React130.createElement(Tooltip12, { title: ARIA_LABEL2, placement: "top" }, /* @__PURE__ */ React130.createElement(
|
|
9141
9701
|
PlusIcon4,
|
|
9142
9702
|
{
|
|
9143
9703
|
"aria-label": ARIA_LABEL2,
|
|
@@ -9151,29 +9711,29 @@ var AttributesControl = createControl(() => {
|
|
|
9151
9711
|
});
|
|
9152
9712
|
|
|
9153
9713
|
// src/components/icon-buttons/clear-icon-button.tsx
|
|
9154
|
-
import * as
|
|
9714
|
+
import * as React131 from "react";
|
|
9155
9715
|
import { BrushBigIcon } from "@elementor/icons";
|
|
9156
|
-
import { IconButton as IconButton11, styled as
|
|
9157
|
-
var CustomIconButton =
|
|
9716
|
+
import { IconButton as IconButton11, styled as styled13, Tooltip as Tooltip13 } from "@elementor/ui";
|
|
9717
|
+
var CustomIconButton = styled13(IconButton11)(({ theme }) => ({
|
|
9158
9718
|
width: theme.spacing(2.5),
|
|
9159
9719
|
height: theme.spacing(2.5)
|
|
9160
9720
|
}));
|
|
9161
|
-
var ClearIconButton = ({ tooltipText, onClick, disabled, size = "tiny" }) => /* @__PURE__ */
|
|
9721
|
+
var ClearIconButton = ({ tooltipText, onClick, disabled, size = "tiny" }) => /* @__PURE__ */ React131.createElement(Tooltip13, { title: tooltipText, placement: "top", disableInteractive: true }, /* @__PURE__ */ React131.createElement(CustomIconButton, { "aria-label": tooltipText, size, onClick, disabled }, /* @__PURE__ */ React131.createElement(BrushBigIcon, { fontSize: size })));
|
|
9162
9722
|
|
|
9163
9723
|
// src/components/repeater/repeater.tsx
|
|
9164
|
-
import * as
|
|
9724
|
+
import * as React132 from "react";
|
|
9165
9725
|
import { useEffect as useEffect21, useState as useState23 } from "react";
|
|
9166
9726
|
import { CopyIcon as CopyIcon2, EyeIcon as EyeIcon2, EyeOffIcon as EyeOffIcon2, PlusIcon as PlusIcon5, XIcon as XIcon4 } from "@elementor/icons";
|
|
9167
9727
|
import {
|
|
9168
9728
|
bindPopover as bindPopover9,
|
|
9169
9729
|
bindTrigger as bindTrigger7,
|
|
9170
|
-
Box as
|
|
9730
|
+
Box as Box33,
|
|
9171
9731
|
IconButton as IconButton12,
|
|
9172
9732
|
Infotip as Infotip4,
|
|
9173
9733
|
Tooltip as Tooltip14,
|
|
9174
|
-
usePopupState as
|
|
9734
|
+
usePopupState as usePopupState12
|
|
9175
9735
|
} from "@elementor/ui";
|
|
9176
|
-
import { __ as
|
|
9736
|
+
import { __ as __67 } from "@wordpress/i18n";
|
|
9177
9737
|
var SIZE12 = "tiny";
|
|
9178
9738
|
var EMPTY_OPEN_ITEM2 = -1;
|
|
9179
9739
|
var Repeater3 = ({
|
|
@@ -9255,7 +9815,7 @@ var Repeater3 = ({
|
|
|
9255
9815
|
};
|
|
9256
9816
|
const isButtonDisabled = disabled || disableAddItemButton;
|
|
9257
9817
|
const shouldShowInfotip = isButtonDisabled && addButtonInfotipContent;
|
|
9258
|
-
const addButton = /* @__PURE__ */
|
|
9818
|
+
const addButton = /* @__PURE__ */ React132.createElement(
|
|
9259
9819
|
IconButton12,
|
|
9260
9820
|
{
|
|
9261
9821
|
size: SIZE12,
|
|
@@ -9264,11 +9824,11 @@ var Repeater3 = ({
|
|
|
9264
9824
|
},
|
|
9265
9825
|
disabled: isButtonDisabled,
|
|
9266
9826
|
onClick: addRepeaterItem,
|
|
9267
|
-
"aria-label":
|
|
9827
|
+
"aria-label": __67("Add item", "elementor")
|
|
9268
9828
|
},
|
|
9269
|
-
/* @__PURE__ */
|
|
9829
|
+
/* @__PURE__ */ React132.createElement(PlusIcon5, { fontSize: SIZE12 })
|
|
9270
9830
|
);
|
|
9271
|
-
return /* @__PURE__ */
|
|
9831
|
+
return /* @__PURE__ */ React132.createElement(SectionContent, { gap: 2 }, /* @__PURE__ */ React132.createElement(RepeaterHeader, { label, adornment }, shouldShowInfotip ? /* @__PURE__ */ React132.createElement(
|
|
9272
9832
|
Infotip4,
|
|
9273
9833
|
{
|
|
9274
9834
|
placement: "right",
|
|
@@ -9276,20 +9836,20 @@ var Repeater3 = ({
|
|
|
9276
9836
|
color: "secondary",
|
|
9277
9837
|
slotProps: { popper: { sx: { width: 300 } } }
|
|
9278
9838
|
},
|
|
9279
|
-
/* @__PURE__ */
|
|
9280
|
-
) : addButton), 0 < uniqueKeys.length && /* @__PURE__ */
|
|
9839
|
+
/* @__PURE__ */ React132.createElement(Box33, { sx: { ...isButtonDisabled ? { cursor: "not-allowed" } : {} } }, addButton)
|
|
9840
|
+
) : addButton), 0 < uniqueKeys.length && /* @__PURE__ */ React132.createElement(SortableProvider, { value: uniqueKeys, onChange: onChangeOrder }, uniqueKeys.map((key) => {
|
|
9281
9841
|
const index = uniqueKeys.indexOf(key);
|
|
9282
9842
|
const value = items2[index];
|
|
9283
9843
|
if (!value) {
|
|
9284
9844
|
return null;
|
|
9285
9845
|
}
|
|
9286
|
-
return /* @__PURE__ */
|
|
9846
|
+
return /* @__PURE__ */ React132.createElement(SortableItem, { id: key, key: `sortable-${key}`, disabled: !isSortable }, /* @__PURE__ */ React132.createElement(
|
|
9287
9847
|
RepeaterItem,
|
|
9288
9848
|
{
|
|
9289
9849
|
disabled,
|
|
9290
9850
|
propDisabled: value?.disabled,
|
|
9291
|
-
label: /* @__PURE__ */
|
|
9292
|
-
startIcon: /* @__PURE__ */
|
|
9851
|
+
label: /* @__PURE__ */ React132.createElement(RepeaterItemLabelSlot, { value }, /* @__PURE__ */ React132.createElement(itemSettings.Label, { value, index })),
|
|
9852
|
+
startIcon: /* @__PURE__ */ React132.createElement(RepeaterItemIconSlot, { value }, /* @__PURE__ */ React132.createElement(itemSettings.Icon, { value })),
|
|
9293
9853
|
removeItem: () => removeRepeaterItem(index),
|
|
9294
9854
|
duplicateItem: () => duplicateRepeaterItem(index),
|
|
9295
9855
|
toggleDisableItem: () => toggleDisableRepeaterItem(index),
|
|
@@ -9303,7 +9863,7 @@ var Repeater3 = ({
|
|
|
9303
9863
|
actions: itemSettings.actions,
|
|
9304
9864
|
value
|
|
9305
9865
|
},
|
|
9306
|
-
(props) => /* @__PURE__ */
|
|
9866
|
+
(props) => /* @__PURE__ */ React132.createElement(
|
|
9307
9867
|
itemSettings.Content,
|
|
9308
9868
|
{
|
|
9309
9869
|
...props,
|
|
@@ -9345,16 +9905,16 @@ var RepeaterItem = ({
|
|
|
9345
9905
|
);
|
|
9346
9906
|
const triggerProps = bindTrigger7(popoverState);
|
|
9347
9907
|
usePopoverDismiss({ isOpen: popoverState.isOpen, onClose: popoverProps.onClose });
|
|
9348
|
-
const duplicateLabel =
|
|
9349
|
-
const toggleLabel = propDisabled ?
|
|
9350
|
-
const removeLabel =
|
|
9351
|
-
return /* @__PURE__ */
|
|
9908
|
+
const duplicateLabel = __67("Duplicate", "elementor");
|
|
9909
|
+
const toggleLabel = propDisabled ? __67("Show", "elementor") : __67("Hide", "elementor");
|
|
9910
|
+
const removeLabel = __67("Remove", "elementor");
|
|
9911
|
+
return /* @__PURE__ */ React132.createElement(Box33, { sx: { display: "contents" } }, /* @__PURE__ */ React132.createElement(
|
|
9352
9912
|
RepeaterTag,
|
|
9353
9913
|
{
|
|
9354
9914
|
disabled,
|
|
9355
9915
|
label,
|
|
9356
9916
|
ref: setRef,
|
|
9357
|
-
"aria-label":
|
|
9917
|
+
"aria-label": __67("Open item", "elementor"),
|
|
9358
9918
|
...triggerProps,
|
|
9359
9919
|
onClick: (e) => {
|
|
9360
9920
|
triggerProps.onClick(e);
|
|
@@ -9363,13 +9923,13 @@ var RepeaterItem = ({
|
|
|
9363
9923
|
}
|
|
9364
9924
|
},
|
|
9365
9925
|
startIcon,
|
|
9366
|
-
actions: /* @__PURE__ */
|
|
9926
|
+
actions: /* @__PURE__ */ React132.createElement(React132.Fragment, null, showDuplicate && /* @__PURE__ */ React132.createElement(Tooltip14, { title: duplicateLabel, placement: "top" }, /* @__PURE__ */ React132.createElement(IconButton12, { size: SIZE12, onClick: duplicateItem, "aria-label": duplicateLabel }, /* @__PURE__ */ React132.createElement(CopyIcon2, { fontSize: SIZE12 }))), showToggle && /* @__PURE__ */ React132.createElement(Tooltip14, { title: toggleLabel, placement: "top" }, /* @__PURE__ */ React132.createElement(IconButton12, { size: SIZE12, onClick: toggleDisableItem, "aria-label": toggleLabel }, propDisabled ? /* @__PURE__ */ React132.createElement(EyeOffIcon2, { fontSize: SIZE12 }) : /* @__PURE__ */ React132.createElement(EyeIcon2, { fontSize: SIZE12 }))), actions?.(value), showRemove && /* @__PURE__ */ React132.createElement(Tooltip14, { title: removeLabel, placement: "top" }, /* @__PURE__ */ React132.createElement(IconButton12, { size: SIZE12, onClick: removeItem, "aria-label": removeLabel }, /* @__PURE__ */ React132.createElement(XIcon4, { fontSize: SIZE12 }))))
|
|
9367
9927
|
}
|
|
9368
|
-
), /* @__PURE__ */
|
|
9928
|
+
), /* @__PURE__ */ React132.createElement(RepeaterPopover, { width: ref?.getBoundingClientRect().width, ...popoverProps, anchorEl: ref }, /* @__PURE__ */ React132.createElement(Box33, null, children({ anchorEl: ref }))));
|
|
9369
9929
|
};
|
|
9370
9930
|
var usePopover = (openOnMount, onOpen, onPopoverClose) => {
|
|
9371
9931
|
const [ref, setRef] = useState23(null);
|
|
9372
|
-
const popoverState =
|
|
9932
|
+
const popoverState = usePopupState12({ variant: "popover" });
|
|
9373
9933
|
const popoverProps = bindPopover9(popoverState);
|
|
9374
9934
|
useEffect21(() => {
|
|
9375
9935
|
if (openOnMount && ref) {
|
|
@@ -9390,7 +9950,7 @@ var usePopover = (openOnMount, onOpen, onPopoverClose) => {
|
|
|
9390
9950
|
};
|
|
9391
9951
|
|
|
9392
9952
|
// src/components/size/unstable-size-field.tsx
|
|
9393
|
-
import * as
|
|
9953
|
+
import * as React135 from "react";
|
|
9394
9954
|
import { InputAdornment as InputAdornment6 } from "@elementor/ui";
|
|
9395
9955
|
|
|
9396
9956
|
// src/hooks/use-size-value.ts
|
|
@@ -9433,17 +9993,17 @@ var differsFromExternal = (newState, externalState) => {
|
|
|
9433
9993
|
};
|
|
9434
9994
|
|
|
9435
9995
|
// src/components/size/unit-select.tsx
|
|
9436
|
-
import * as
|
|
9996
|
+
import * as React133 from "react";
|
|
9437
9997
|
import { useId as useId4 } from "react";
|
|
9438
9998
|
import { MenuListItem as MenuListItem8 } from "@elementor/editor-ui";
|
|
9439
|
-
import { bindMenu as bindMenu3, bindTrigger as bindTrigger8, Button as Button7, Menu as Menu4, styled as
|
|
9999
|
+
import { bindMenu as bindMenu3, bindTrigger as bindTrigger8, Button as Button7, Menu as Menu4, styled as styled14, usePopupState as usePopupState13 } from "@elementor/ui";
|
|
9440
10000
|
var menuItemContentStyles2 = {
|
|
9441
10001
|
display: "flex",
|
|
9442
10002
|
flexDirection: "column",
|
|
9443
10003
|
justifyContent: "center"
|
|
9444
10004
|
};
|
|
9445
10005
|
var UnitSelect = ({ value, showPrimaryColor, onClick, options }) => {
|
|
9446
|
-
const popupState =
|
|
10006
|
+
const popupState = usePopupState13({
|
|
9447
10007
|
variant: "popover",
|
|
9448
10008
|
popupId: useId4()
|
|
9449
10009
|
});
|
|
@@ -9451,7 +10011,7 @@ var UnitSelect = ({ value, showPrimaryColor, onClick, options }) => {
|
|
|
9451
10011
|
onClick(options[index]);
|
|
9452
10012
|
popupState.close();
|
|
9453
10013
|
};
|
|
9454
|
-
return /* @__PURE__ */
|
|
10014
|
+
return /* @__PURE__ */ React133.createElement(React133.Fragment, null, /* @__PURE__ */ React133.createElement(StyledButton3, { isPrimaryColor: showPrimaryColor, size: "small", ...bindTrigger8(popupState) }, value), /* @__PURE__ */ React133.createElement(Menu4, { MenuListProps: { dense: true }, ...bindMenu3(popupState) }, options.map((option, index) => /* @__PURE__ */ React133.createElement(
|
|
9455
10015
|
MenuListItem8,
|
|
9456
10016
|
{
|
|
9457
10017
|
key: option,
|
|
@@ -9470,7 +10030,7 @@ var UnitSelect = ({ value, showPrimaryColor, onClick, options }) => {
|
|
|
9470
10030
|
option.toUpperCase()
|
|
9471
10031
|
))));
|
|
9472
10032
|
};
|
|
9473
|
-
var StyledButton3 =
|
|
10033
|
+
var StyledButton3 = styled14(Button7, {
|
|
9474
10034
|
shouldForwardProp: (prop) => prop !== "isPrimaryColor"
|
|
9475
10035
|
})(({ isPrimaryColor, theme }) => ({
|
|
9476
10036
|
color: isPrimaryColor ? theme.palette.text.primary : theme.palette.text.tertiary,
|
|
@@ -9480,11 +10040,11 @@ var StyledButton3 = styled12(Button7, {
|
|
|
9480
10040
|
}));
|
|
9481
10041
|
|
|
9482
10042
|
// src/components/size/unstable-size-input.tsx
|
|
9483
|
-
import * as
|
|
10043
|
+
import * as React134 from "react";
|
|
9484
10044
|
import { forwardRef as forwardRef13 } from "react";
|
|
9485
10045
|
var UnstableSizeInput = forwardRef13(
|
|
9486
10046
|
({ type, value, onChange, onKeyDown, onKeyUp, InputProps, onBlur, focused, disabled }, ref) => {
|
|
9487
|
-
return /* @__PURE__ */
|
|
10047
|
+
return /* @__PURE__ */ React134.createElement(
|
|
9488
10048
|
NumberInput,
|
|
9489
10049
|
{
|
|
9490
10050
|
ref,
|
|
@@ -9522,7 +10082,7 @@ var UnstableSizeField = ({
|
|
|
9522
10082
|
const shouldHighlightUnit2 = () => {
|
|
9523
10083
|
return hasValue(size);
|
|
9524
10084
|
};
|
|
9525
|
-
return /* @__PURE__ */
|
|
10085
|
+
return /* @__PURE__ */ React135.createElement(
|
|
9526
10086
|
UnstableSizeInput,
|
|
9527
10087
|
{
|
|
9528
10088
|
type: "number",
|
|
@@ -9531,8 +10091,8 @@ var UnstableSizeField = ({
|
|
|
9531
10091
|
onChange: (event) => setSize(event.target.value),
|
|
9532
10092
|
InputProps: {
|
|
9533
10093
|
...InputProps,
|
|
9534
|
-
startAdornment: startIcon && /* @__PURE__ */
|
|
9535
|
-
endAdornment: /* @__PURE__ */
|
|
10094
|
+
startAdornment: startIcon && /* @__PURE__ */ React135.createElement(InputAdornment6, { position: "start" }, startIcon),
|
|
10095
|
+
endAdornment: /* @__PURE__ */ React135.createElement(InputAdornment6, { position: "end" }, /* @__PURE__ */ React135.createElement(
|
|
9536
10096
|
UnitSelect,
|
|
9537
10097
|
{
|
|
9538
10098
|
options: units2,
|
|
@@ -9550,7 +10110,7 @@ var hasValue = (value) => {
|
|
|
9550
10110
|
};
|
|
9551
10111
|
|
|
9552
10112
|
// src/hooks/use-font-families.ts
|
|
9553
|
-
import { useMemo as
|
|
10113
|
+
import { useMemo as useMemo20 } from "react";
|
|
9554
10114
|
import { getElementorConfig } from "@elementor/editor-v1-adapters";
|
|
9555
10115
|
var getFontControlConfig = () => {
|
|
9556
10116
|
const { controls } = getElementorConfig();
|
|
@@ -9558,7 +10118,7 @@ var getFontControlConfig = () => {
|
|
|
9558
10118
|
};
|
|
9559
10119
|
var useFontFamilies = () => {
|
|
9560
10120
|
const { groups, options } = getFontControlConfig();
|
|
9561
|
-
return
|
|
10121
|
+
return useMemo20(() => {
|
|
9562
10122
|
if (!groups || !options) {
|
|
9563
10123
|
return [];
|
|
9564
10124
|
}
|
|
@@ -9654,11 +10214,14 @@ export {
|
|
|
9654
10214
|
createControlReplacementsRegistry,
|
|
9655
10215
|
enqueueFont,
|
|
9656
10216
|
getControlReplacements,
|
|
10217
|
+
getFontAwesome7IconName,
|
|
9657
10218
|
injectIntoRepeaterItemActions,
|
|
9658
10219
|
injectIntoRepeaterItemIcon,
|
|
9659
10220
|
injectIntoRepeaterItemLabel,
|
|
9660
10221
|
isUnitExtendedOption,
|
|
9661
10222
|
registerControlReplacement,
|
|
10223
|
+
resetFontAwesome7IconsCache,
|
|
10224
|
+
resolveFontAwesome7Icon,
|
|
9662
10225
|
trackUpgradePromotionClick,
|
|
9663
10226
|
trackViewPromotion,
|
|
9664
10227
|
transitionProperties,
|