@elementor/editor-controls 4.3.0-beta2 → 4.3.0
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 +25 -2
- package/dist/index.d.ts +25 -2
- package/dist/index.js +2120 -928
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1964 -759
- package/dist/index.mjs.map +1 -1
- package/package.json +17 -16
- package/src/controls/icon-library/font-awesome-7-catalog.ts +113 -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-filter.tsx +166 -0
- package/src/controls/icon-library/icon-library-grid.tsx +344 -0
- package/src/controls/icon-library/icon-library-popover.tsx +305 -0
- package/src/controls/icon-library/icon-library-tooltip.ts +1 -0
- package/src/controls/icon-library/icon-library-view-toggle.tsx +104 -0
- package/src/controls/icon-library/use-font-awesome-7-catalog.ts +14 -0
- package/src/controls/link-control.tsx +18 -8
- package/src/controls/notice-control.tsx +105 -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/controls/toggle-control.tsx +13 -2
- package/src/index.ts +7 -0
package/dist/index.mjs
CHANGED
|
@@ -381,7 +381,7 @@ function ControlActions({ children }) {
|
|
|
381
381
|
if (items2.length === 0 || disabled) {
|
|
382
382
|
return children;
|
|
383
383
|
}
|
|
384
|
-
const menuItems = items2.map(({ MenuItem:
|
|
384
|
+
const menuItems = items2.map(({ MenuItem: MenuItem4, id }) => /* @__PURE__ */ React10.createElement(MenuItem4, { key: id }));
|
|
385
385
|
return /* @__PURE__ */ React10.createElement(FloatingActionsBar, { actions: menuItems }, children);
|
|
386
386
|
}
|
|
387
387
|
|
|
@@ -2879,7 +2879,8 @@ var ToggleControl = createControl(
|
|
|
2879
2879
|
size = "tiny",
|
|
2880
2880
|
exclusive = true,
|
|
2881
2881
|
maxItems,
|
|
2882
|
-
convertOptions = false
|
|
2882
|
+
convertOptions = false,
|
|
2883
|
+
allowEmpty = false
|
|
2883
2884
|
}) => {
|
|
2884
2885
|
const { value, setValue, placeholder, disabled } = useBoundProp(stringPropTypeUtil7);
|
|
2885
2886
|
const processedOptions = convertOptions ? convertToggleOptionsToAtomic(options) : options;
|
|
@@ -2897,12 +2898,19 @@ var ToggleControl = createControl(
|
|
|
2897
2898
|
size,
|
|
2898
2899
|
placeholder
|
|
2899
2900
|
};
|
|
2901
|
+
const handleExclusiveToggle = (selectedValue) => {
|
|
2902
|
+
if (allowEmpty && !selectedValue) {
|
|
2903
|
+
setValue("");
|
|
2904
|
+
return;
|
|
2905
|
+
}
|
|
2906
|
+
setValue(selectedValue);
|
|
2907
|
+
};
|
|
2900
2908
|
return exclusive ? /* @__PURE__ */ React56.createElement(
|
|
2901
2909
|
ControlToggleButtonGroup,
|
|
2902
2910
|
{
|
|
2903
2911
|
...toggleButtonGroupProps,
|
|
2904
|
-
value: value ?? null,
|
|
2905
|
-
onChange:
|
|
2912
|
+
value: allowEmpty ? value || null : value ?? null,
|
|
2913
|
+
onChange: handleExclusiveToggle,
|
|
2906
2914
|
disabled,
|
|
2907
2915
|
exclusive: true
|
|
2908
2916
|
}
|
|
@@ -4625,33 +4633,39 @@ var LinkControl = createControl((props) => {
|
|
|
4625
4633
|
getLinkInLinkRestriction(elementId, value ?? linkPlaceholder)
|
|
4626
4634
|
);
|
|
4627
4635
|
const shouldDisableAddingLink = !isActive && linkInLinkRestriction.shouldRestrict;
|
|
4628
|
-
const
|
|
4636
|
+
const syncLinkRestriction = (clearActiveLinkWhen = "restricted") => {
|
|
4629
4637
|
const newRestriction = getLinkInLinkRestriction(elementId, value ?? linkPlaceholder);
|
|
4630
|
-
|
|
4638
|
+
const becameRestricted = newRestriction.shouldRestrict && !linkInLinkRestriction.shouldRestrict;
|
|
4639
|
+
const shouldClearActiveLink = clearActiveLinkWhen === "newly-restricted" ? becameRestricted : newRestriction.shouldRestrict;
|
|
4640
|
+
if (shouldClearActiveLink && isActive && !linkPlaceholder) {
|
|
4631
4641
|
setIsActive(false);
|
|
4632
4642
|
if (value !== null) {
|
|
4633
4643
|
setValue(null);
|
|
4634
4644
|
}
|
|
4635
4645
|
}
|
|
4636
4646
|
setLinkInLinkRestriction((prev) => isSameRestriction(prev, newRestriction) ? prev : newRestriction);
|
|
4637
|
-
}
|
|
4647
|
+
};
|
|
4648
|
+
const debouncedSyncLinkRestriction = useDebouncedCallback(
|
|
4649
|
+
(clearActiveLinkWhen = "restricted") => syncLinkRestriction(clearActiveLinkWhen),
|
|
4650
|
+
300
|
|
4651
|
+
);
|
|
4638
4652
|
useListenTo(
|
|
4639
4653
|
commandEndEvent("document/elements/set-settings"),
|
|
4640
4654
|
() => {
|
|
4641
|
-
|
|
4655
|
+
debouncedSyncLinkRestriction("newly-restricted");
|
|
4642
4656
|
},
|
|
4643
|
-
[
|
|
4657
|
+
[debouncedSyncLinkRestriction]
|
|
4644
4658
|
);
|
|
4645
4659
|
useEffect14(() => {
|
|
4646
|
-
|
|
4660
|
+
debouncedSyncLinkRestriction();
|
|
4647
4661
|
const handleInlineLinkChanged = () => {
|
|
4648
|
-
|
|
4662
|
+
debouncedSyncLinkRestriction();
|
|
4649
4663
|
};
|
|
4650
4664
|
window.addEventListener("elementor:inline-link-changed", handleInlineLinkChanged);
|
|
4651
4665
|
return () => {
|
|
4652
4666
|
window.removeEventListener("elementor:inline-link-changed", handleInlineLinkChanged);
|
|
4653
4667
|
};
|
|
4654
|
-
}, [elementId,
|
|
4668
|
+
}, [elementId, debouncedSyncLinkRestriction]);
|
|
4655
4669
|
const onEnabledChange = () => {
|
|
4656
4670
|
setLinkInLinkRestriction(getLinkInLinkRestriction(elementId, value ?? linkPlaceholder));
|
|
4657
4671
|
if (linkInLinkRestriction.shouldRestrict && !isActive) {
|
|
@@ -5314,24 +5328,13 @@ var AspectRatioControl = createControl(({ label }) => {
|
|
|
5314
5328
|
});
|
|
5315
5329
|
|
|
5316
5330
|
// src/controls/svg-media-control.tsx
|
|
5317
|
-
import * as
|
|
5318
|
-
import { useEffect as useEffect16, useState as
|
|
5331
|
+
import * as React88 from "react";
|
|
5332
|
+
import { useEffect as useEffect16, useRef as useRef16, useState as useState18 } from "react";
|
|
5319
5333
|
import { useCurrentUserCapabilities } from "@elementor/editor-current-user";
|
|
5320
5334
|
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";
|
|
5335
|
+
import { Box as Box20, Card as Card2, CardOverlay as CardOverlay2, Popover as Popover6, Stack as Stack17, styled as styled11, usePopupState as usePopupState10 } from "@elementor/ui";
|
|
5333
5336
|
import { useWpMediaAttachment as useWpMediaAttachment2, useWpMediaFrame as useWpMediaFrame2 } from "@elementor/wp-media";
|
|
5334
|
-
import { __ as
|
|
5337
|
+
import { __ as __38 } from "@wordpress/i18n";
|
|
5335
5338
|
|
|
5336
5339
|
// src/components/enable-unfiltered-modal.tsx
|
|
5337
5340
|
import * as React80 from "react";
|
|
@@ -5393,37 +5396,1015 @@ var AdminDialog = ({ open, onClose, handleEnable, isPending, isError }) => /* @_
|
|
|
5393
5396
|
isPending ? /* @__PURE__ */ React80.createElement(CircularProgress2, { size: 24 }) : __31("Enable", "elementor")
|
|
5394
5397
|
)));
|
|
5395
5398
|
|
|
5396
|
-
// src/controls/
|
|
5397
|
-
|
|
5398
|
-
|
|
5399
|
-
|
|
5400
|
-
|
|
5399
|
+
// src/controls/icon-library/get-icon-library-anchor.ts
|
|
5400
|
+
function getIconLibraryAnchor(containerRect, buttonGroupRect) {
|
|
5401
|
+
if (!containerRect || containerRect.width <= 0) {
|
|
5402
|
+
return null;
|
|
5403
|
+
}
|
|
5404
|
+
return {
|
|
5405
|
+
top: buttonGroupRect?.top ?? containerRect.top,
|
|
5406
|
+
left: containerRect.left,
|
|
5407
|
+
width: containerRect.width
|
|
5408
|
+
};
|
|
5401
5409
|
}
|
|
5402
|
-
function
|
|
5403
|
-
|
|
5404
|
-
|
|
5405
|
-
|
|
5410
|
+
function measureIconLibraryAnchor(container, buttonGroup) {
|
|
5411
|
+
return getIconLibraryAnchor(container?.getBoundingClientRect(), buttonGroup?.getBoundingClientRect());
|
|
5412
|
+
}
|
|
5413
|
+
|
|
5414
|
+
// src/controls/icon-library/icon-library-popover.tsx
|
|
5415
|
+
import * as React85 from "react";
|
|
5416
|
+
import { useMemo as useMemo12, useState as useState17 } from "react";
|
|
5417
|
+
import {
|
|
5418
|
+
PopoverBody as PopoverBody2,
|
|
5419
|
+
PopoverHeader as PopoverHeader4,
|
|
5420
|
+
PopoverMenuList as PopoverMenuList2,
|
|
5421
|
+
SearchField as SearchField2,
|
|
5422
|
+
StyledMenuList
|
|
5423
|
+
} from "@elementor/editor-ui";
|
|
5424
|
+
import { ComponentsIcon } from "@elementor/icons";
|
|
5425
|
+
import { useSessionStorage as useSessionStorage2 } from "@elementor/session";
|
|
5426
|
+
import { Box as Box17, CircularProgress as CircularProgress3, Divider as Divider4, Link as Link3, Stack as Stack15, styled as styled9, Typography as Typography9 } from "@elementor/ui";
|
|
5427
|
+
import { useDebounceState } from "@elementor/utils";
|
|
5428
|
+
import { __ as __35 } from "@wordpress/i18n";
|
|
5429
|
+
|
|
5430
|
+
// src/controls/icon-library/font-awesome-7-data.ts
|
|
5431
|
+
var FONT_AWESOME_7_LIBRARIES = [
|
|
5432
|
+
{ file: "solid", library: "fa-solid" },
|
|
5433
|
+
{ file: "regular", library: "fa-regular" },
|
|
5434
|
+
{ file: "brands", library: "fa-brands" }
|
|
5435
|
+
];
|
|
5436
|
+
var FONT_AWESOME_JSON = {
|
|
5437
|
+
width: 0,
|
|
5438
|
+
height: 1,
|
|
5439
|
+
aliases: 2,
|
|
5440
|
+
unicode: 3,
|
|
5441
|
+
path: 4
|
|
5442
|
+
};
|
|
5443
|
+
var libraryCache = /* @__PURE__ */ new Map();
|
|
5444
|
+
function getFontAwesome7EditorConfig() {
|
|
5445
|
+
const config = window.elementorCommon?.config?.fontAwesome?.v7;
|
|
5446
|
+
if (!config || !Array.isArray(config.jsonFiles)) {
|
|
5447
|
+
return null;
|
|
5448
|
+
}
|
|
5449
|
+
const jsonBaseUrl = getAllowedJsonBaseUrl(config.jsonBaseUrl);
|
|
5450
|
+
if (!jsonBaseUrl) {
|
|
5451
|
+
return null;
|
|
5452
|
+
}
|
|
5453
|
+
return {
|
|
5454
|
+
jsonFiles: config.jsonFiles,
|
|
5455
|
+
jsonBaseUrl
|
|
5456
|
+
};
|
|
5457
|
+
}
|
|
5458
|
+
var FONT_AWESOME_ICON_NAME_PATTERN = /^fa\S*\s+fa-([^\s]+)/;
|
|
5459
|
+
function getFontAwesome7IconName(iconValue) {
|
|
5460
|
+
return iconValue.match(FONT_AWESOME_ICON_NAME_PATTERN)?.[1] ?? null;
|
|
5461
|
+
}
|
|
5462
|
+
function resetFontAwesome7IconsCache() {
|
|
5463
|
+
libraryCache.clear();
|
|
5464
|
+
}
|
|
5465
|
+
async function loadFontAwesome7Library(file, signal) {
|
|
5466
|
+
const cached = await getCachedLibrary(file, signal);
|
|
5467
|
+
return cached?.icons ?? [];
|
|
5468
|
+
}
|
|
5469
|
+
async function resolveFontAwesome7Icon(library, iconName, signal) {
|
|
5470
|
+
const file = getLibraryFileName(library);
|
|
5471
|
+
if (!file) {
|
|
5472
|
+
return null;
|
|
5473
|
+
}
|
|
5474
|
+
const cached = await getCachedLibrary(file, signal);
|
|
5475
|
+
return cached?.lookup[iconName] ?? null;
|
|
5476
|
+
}
|
|
5477
|
+
async function getCachedLibrary(file, signal) {
|
|
5478
|
+
const cached = libraryCache.get(file);
|
|
5479
|
+
if (cached) {
|
|
5480
|
+
return cached;
|
|
5481
|
+
}
|
|
5482
|
+
const loaded = await fetchLibrary(file, signal);
|
|
5483
|
+
if (loaded) {
|
|
5484
|
+
libraryCache.set(file, loaded);
|
|
5485
|
+
}
|
|
5486
|
+
return loaded;
|
|
5487
|
+
}
|
|
5488
|
+
function getLibraryFileName(library) {
|
|
5489
|
+
const config = getFontAwesome7EditorConfig();
|
|
5490
|
+
const match = FONT_AWESOME_7_LIBRARIES.find((item) => item.library === library);
|
|
5491
|
+
if (!config || !match || !config.jsonFiles.includes(match.file)) {
|
|
5492
|
+
return null;
|
|
5493
|
+
}
|
|
5494
|
+
return match.file;
|
|
5495
|
+
}
|
|
5496
|
+
async function fetchLibrary(file, signal) {
|
|
5497
|
+
const config = getFontAwesome7EditorConfig();
|
|
5498
|
+
if (!config?.jsonFiles.includes(file)) {
|
|
5499
|
+
return null;
|
|
5500
|
+
}
|
|
5501
|
+
const catalogUrl = getCatalogFileUrl(config.jsonBaseUrl, file);
|
|
5502
|
+
if (!catalogUrl) {
|
|
5503
|
+
return null;
|
|
5504
|
+
}
|
|
5505
|
+
try {
|
|
5506
|
+
const response = await fetch(catalogUrl, { signal });
|
|
5507
|
+
if (!response.ok) {
|
|
5508
|
+
return null;
|
|
5509
|
+
}
|
|
5510
|
+
const data = await response.json();
|
|
5511
|
+
const icons = data.icons;
|
|
5512
|
+
if (!icons || typeof icons !== "object") {
|
|
5513
|
+
return null;
|
|
5514
|
+
}
|
|
5515
|
+
return indexLibrary(icons);
|
|
5516
|
+
} catch {
|
|
5517
|
+
return null;
|
|
5518
|
+
}
|
|
5519
|
+
}
|
|
5520
|
+
function indexLibrary(icons) {
|
|
5521
|
+
const definitions = [];
|
|
5522
|
+
const lookup = /* @__PURE__ */ Object.create(null);
|
|
5523
|
+
for (const [name, iconData] of Object.entries(icons)) {
|
|
5524
|
+
const definition = toIconDefinition(name, iconData);
|
|
5525
|
+
if (!definition) {
|
|
5526
|
+
continue;
|
|
5527
|
+
}
|
|
5528
|
+
definitions.push(definition);
|
|
5529
|
+
lookup[name] = definition;
|
|
5530
|
+
for (const alias of definition.aliases) {
|
|
5531
|
+
if (!lookup[alias]) {
|
|
5532
|
+
lookup[alias] = definition;
|
|
5533
|
+
}
|
|
5534
|
+
}
|
|
5535
|
+
}
|
|
5536
|
+
return { icons: definitions, lookup };
|
|
5537
|
+
}
|
|
5538
|
+
function toIconDefinition(name, iconData) {
|
|
5539
|
+
if (!isValidIconTuple(iconData)) {
|
|
5540
|
+
return null;
|
|
5541
|
+
}
|
|
5542
|
+
const paths = normalizePaths(iconData[FONT_AWESOME_JSON.path]);
|
|
5543
|
+
if (paths.length === 0) {
|
|
5544
|
+
return null;
|
|
5545
|
+
}
|
|
5546
|
+
const aliases = iconData[FONT_AWESOME_JSON.aliases].filter(
|
|
5547
|
+
(alias) => typeof alias === "string" && alias !== ""
|
|
5548
|
+
);
|
|
5549
|
+
return {
|
|
5550
|
+
name,
|
|
5551
|
+
aliases,
|
|
5552
|
+
width: iconData[FONT_AWESOME_JSON.width],
|
|
5553
|
+
height: iconData[FONT_AWESOME_JSON.height],
|
|
5554
|
+
paths
|
|
5555
|
+
};
|
|
5556
|
+
}
|
|
5557
|
+
function isValidIconTuple(iconData) {
|
|
5558
|
+
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]);
|
|
5559
|
+
}
|
|
5560
|
+
function normalizePaths(pathData) {
|
|
5561
|
+
if (typeof pathData === "string" && isSafeSvgPath(pathData)) {
|
|
5562
|
+
return [pathData];
|
|
5563
|
+
}
|
|
5564
|
+
if (!Array.isArray(pathData)) {
|
|
5565
|
+
return [];
|
|
5566
|
+
}
|
|
5567
|
+
return pathData.filter((path) => typeof path === "string" && isSafeSvgPath(path));
|
|
5568
|
+
}
|
|
5569
|
+
function isSafeSvgPath(path) {
|
|
5570
|
+
return path !== "" && !/[<>"'`]/.test(path);
|
|
5571
|
+
}
|
|
5572
|
+
function getAllowedJsonBaseUrl(jsonBaseUrl) {
|
|
5573
|
+
if (typeof jsonBaseUrl !== "string" || jsonBaseUrl === "") {
|
|
5574
|
+
return null;
|
|
5406
5575
|
}
|
|
5407
|
-
|
|
5408
|
-
|
|
5409
|
-
|
|
5576
|
+
try {
|
|
5577
|
+
const url = new URL(jsonBaseUrl);
|
|
5578
|
+
if (url.protocol !== "http:" && url.protocol !== "https:") {
|
|
5579
|
+
return null;
|
|
5580
|
+
}
|
|
5581
|
+
return url.href;
|
|
5582
|
+
} catch {
|
|
5583
|
+
return null;
|
|
5584
|
+
}
|
|
5585
|
+
}
|
|
5586
|
+
function getCatalogFileUrl(jsonBaseUrl, file) {
|
|
5587
|
+
try {
|
|
5588
|
+
const baseUrl = new URL(jsonBaseUrl);
|
|
5589
|
+
const fileUrl = new URL(`${file}.json`, jsonBaseUrl);
|
|
5590
|
+
if (fileUrl.origin !== baseUrl.origin || !fileUrl.pathname.startsWith(baseUrl.pathname)) {
|
|
5591
|
+
return null;
|
|
5592
|
+
}
|
|
5593
|
+
if (fileUrl.protocol !== "http:" && fileUrl.protocol !== "https:") {
|
|
5594
|
+
return null;
|
|
5595
|
+
}
|
|
5596
|
+
return fileUrl.href;
|
|
5597
|
+
} catch {
|
|
5598
|
+
return null;
|
|
5599
|
+
}
|
|
5600
|
+
}
|
|
5601
|
+
|
|
5602
|
+
// src/controls/icon-library/font-awesome-7-catalog.ts
|
|
5603
|
+
async function loadFontAwesome7Catalog(signal) {
|
|
5604
|
+
const config = getFontAwesome7EditorConfig();
|
|
5605
|
+
if (!config) {
|
|
5606
|
+
return [];
|
|
5607
|
+
}
|
|
5608
|
+
const catalogs = await Promise.all(
|
|
5609
|
+
FONT_AWESOME_7_LIBRARIES.map(async ({ file, library }) => {
|
|
5610
|
+
if (!config.jsonFiles.includes(file)) {
|
|
5611
|
+
return [];
|
|
5612
|
+
}
|
|
5613
|
+
const icons = await loadFontAwesome7Library(file, signal);
|
|
5614
|
+
return icons.map((icon) => toCatalogIcon(icon, library));
|
|
5615
|
+
})
|
|
5616
|
+
);
|
|
5617
|
+
return catalogs.flat();
|
|
5618
|
+
}
|
|
5619
|
+
function filterFontAwesome7Icons(icons, searchValue, libraries = []) {
|
|
5620
|
+
const query = searchValue?.trim().toLowerCase() ?? "";
|
|
5621
|
+
const libraryIcons = libraries.length === 0 ? icons : icons.filter((icon) => libraries.includes(icon.library));
|
|
5622
|
+
if (query === "") {
|
|
5623
|
+
return libraryIcons;
|
|
5624
|
+
}
|
|
5625
|
+
return libraryIcons.filter((icon) => {
|
|
5626
|
+
if (icon.name.includes(query) || icon.label.toLowerCase().includes(query)) {
|
|
5627
|
+
return true;
|
|
5628
|
+
}
|
|
5629
|
+
return icon.aliases.some((alias) => alias.toLowerCase().includes(query));
|
|
5410
5630
|
});
|
|
5411
5631
|
}
|
|
5412
|
-
function
|
|
5413
|
-
|
|
5632
|
+
function createIconSelectionValue(library, name) {
|
|
5633
|
+
return `${library} fa-${name}`;
|
|
5414
5634
|
}
|
|
5415
|
-
function
|
|
5635
|
+
function getSelectedIconId(iconClass, library) {
|
|
5636
|
+
if (!iconClass || !library) {
|
|
5637
|
+
return void 0;
|
|
5638
|
+
}
|
|
5639
|
+
const name = getFontAwesome7IconName(iconClass);
|
|
5640
|
+
if (!name) {
|
|
5641
|
+
return void 0;
|
|
5642
|
+
}
|
|
5643
|
+
return `${library}:${name}`;
|
|
5644
|
+
}
|
|
5645
|
+
function findFontAwesome7Icon(icons, iconClass, library) {
|
|
5646
|
+
const selectedId = getSelectedIconId(iconClass, library);
|
|
5647
|
+
if (!selectedId || !library) {
|
|
5648
|
+
return void 0;
|
|
5649
|
+
}
|
|
5650
|
+
const selectedName = selectedId.slice(`${library}:`.length);
|
|
5651
|
+
return icons.find((icon) => {
|
|
5652
|
+
if (icon.library !== library) {
|
|
5653
|
+
return false;
|
|
5654
|
+
}
|
|
5655
|
+
return icon.id === selectedId || icon.name === selectedName || icon.aliases.includes(selectedName);
|
|
5656
|
+
});
|
|
5657
|
+
}
|
|
5658
|
+
function toCatalogIcon(icon, library) {
|
|
5416
5659
|
return {
|
|
5417
|
-
|
|
5418
|
-
|
|
5660
|
+
...icon,
|
|
5661
|
+
id: `${library}:${icon.name}`,
|
|
5662
|
+
label: icon.name.replace(/-/g, " "),
|
|
5663
|
+
library,
|
|
5664
|
+
value: createIconSelectionValue(library, icon.name)
|
|
5665
|
+
};
|
|
5666
|
+
}
|
|
5667
|
+
|
|
5668
|
+
// src/controls/icon-library/font-awesome-glyph.tsx
|
|
5669
|
+
import * as React81 from "react";
|
|
5670
|
+
var FontAwesomeGlyph = ({ icon, size, color, label }) => {
|
|
5671
|
+
return /* @__PURE__ */ React81.createElement(
|
|
5672
|
+
"svg",
|
|
5673
|
+
{
|
|
5674
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
5675
|
+
viewBox: `0 0 ${icon.width} ${icon.height}`,
|
|
5676
|
+
width: size,
|
|
5677
|
+
height: size,
|
|
5678
|
+
fill: color,
|
|
5679
|
+
overflow: "visible",
|
|
5680
|
+
"aria-hidden": label ? void 0 : true,
|
|
5681
|
+
"aria-label": label,
|
|
5682
|
+
role: label ? "img" : void 0
|
|
5683
|
+
},
|
|
5684
|
+
icon.paths.map((path, index) => /* @__PURE__ */ React81.createElement("path", { key: `${index}-${path}`, d: path }))
|
|
5685
|
+
);
|
|
5686
|
+
};
|
|
5687
|
+
|
|
5688
|
+
// src/controls/icon-library/icon-library-filter.tsx
|
|
5689
|
+
import * as React82 from "react";
|
|
5690
|
+
import { useId as useId4 } from "react";
|
|
5691
|
+
import { CheckIcon, FilterIcon as FilterIcon2, LibraryIcon, ListIcon, StarFilledIcon, StarIcon } from "@elementor/icons";
|
|
5692
|
+
import {
|
|
5693
|
+
bindMenu as bindMenu3,
|
|
5694
|
+
bindToggle as bindToggle2,
|
|
5695
|
+
Box as Box15,
|
|
5696
|
+
Menu as Menu4,
|
|
5697
|
+
MenuItem as MenuItem2,
|
|
5698
|
+
Stack as Stack13,
|
|
5699
|
+
ToggleButton as ToggleButton2,
|
|
5700
|
+
Tooltip as Tooltip8,
|
|
5701
|
+
Typography as Typography7,
|
|
5702
|
+
usePopupState as usePopupState8
|
|
5703
|
+
} from "@elementor/ui";
|
|
5704
|
+
import { __ as __32 } from "@wordpress/i18n";
|
|
5705
|
+
|
|
5706
|
+
// src/controls/icon-library/icon-library-tooltip.ts
|
|
5707
|
+
var ICON_LIBRARY_ACTION_TOOLTIP_ENTER_DELAY = 0;
|
|
5708
|
+
|
|
5709
|
+
// src/controls/icon-library/icon-library-filter.tsx
|
|
5710
|
+
var FILTER_MENU_WIDTH = 280;
|
|
5711
|
+
var FILTER_INDICATOR_SIZE = 6;
|
|
5712
|
+
var FILTER_INDICATOR_OFFSET = 4;
|
|
5713
|
+
var LIBRARY_FILTER_ORDER = {
|
|
5714
|
+
regular: 0,
|
|
5715
|
+
solid: 1,
|
|
5716
|
+
brands: 2
|
|
5717
|
+
};
|
|
5718
|
+
var LIBRARY_FILTER_CONFIG = {
|
|
5719
|
+
"fa-regular": {
|
|
5720
|
+
getLabel: () => __32("Font Awesome - Regular", "elementor"),
|
|
5721
|
+
Icon: StarIcon,
|
|
5722
|
+
order: LIBRARY_FILTER_ORDER.regular
|
|
5723
|
+
},
|
|
5724
|
+
"fa-solid": {
|
|
5725
|
+
getLabel: () => __32("Font Awesome - Solid", "elementor"),
|
|
5726
|
+
Icon: StarFilledIcon,
|
|
5727
|
+
order: LIBRARY_FILTER_ORDER.solid
|
|
5728
|
+
},
|
|
5729
|
+
"fa-brands": {
|
|
5730
|
+
getLabel: () => __32("Font Awesome - Brands", "elementor"),
|
|
5731
|
+
Icon: LibraryIcon,
|
|
5732
|
+
order: LIBRARY_FILTER_ORDER.brands
|
|
5733
|
+
}
|
|
5734
|
+
};
|
|
5735
|
+
var IconLibraryFilter = ({ value, onChange }) => {
|
|
5736
|
+
const popupId = useId4();
|
|
5737
|
+
const popupState = usePopupState8({
|
|
5738
|
+
variant: "popover",
|
|
5739
|
+
popupId
|
|
5740
|
+
});
|
|
5741
|
+
const options = FONT_AWESOME_7_LIBRARIES.map(({ library }) => ({
|
|
5742
|
+
value: library,
|
|
5743
|
+
label: LIBRARY_FILTER_CONFIG[library].getLabel(),
|
|
5744
|
+
Icon: LIBRARY_FILTER_CONFIG[library].Icon,
|
|
5745
|
+
order: LIBRARY_FILTER_CONFIG[library].order
|
|
5746
|
+
})).sort((firstOption, secondOption) => firstOption.order - secondOption.order);
|
|
5747
|
+
const isFiltered = value.length > 0;
|
|
5748
|
+
const filterButtonLabel = isFiltered ? __32("Filter by library, active", "elementor") : __32("Filter by library", "elementor");
|
|
5749
|
+
const handleAllIconsClick = () => {
|
|
5750
|
+
onChange([]);
|
|
5751
|
+
};
|
|
5752
|
+
const handleLibraryClick = (library) => {
|
|
5753
|
+
const nextValue = value.includes(library) ? value.filter((selectedLibrary) => selectedLibrary !== library) : [...value, library];
|
|
5754
|
+
onChange(nextValue.length === FONT_AWESOME_7_LIBRARIES.length ? [] : nextValue);
|
|
5755
|
+
};
|
|
5756
|
+
return /* @__PURE__ */ React82.createElement(React82.Fragment, null, /* @__PURE__ */ React82.createElement(
|
|
5757
|
+
Tooltip8,
|
|
5758
|
+
{
|
|
5759
|
+
title: __32("Filter by library", "elementor"),
|
|
5760
|
+
placement: "top",
|
|
5761
|
+
enterDelay: ICON_LIBRARY_ACTION_TOOLTIP_ENTER_DELAY,
|
|
5762
|
+
enterNextDelay: ICON_LIBRARY_ACTION_TOOLTIP_ENTER_DELAY,
|
|
5763
|
+
disableInteractive: true
|
|
5419
5764
|
},
|
|
5420
|
-
|
|
5421
|
-
|
|
5422
|
-
|
|
5765
|
+
/* @__PURE__ */ React82.createElement(
|
|
5766
|
+
ToggleButton2,
|
|
5767
|
+
{
|
|
5768
|
+
"aria-label": filterButtonLabel,
|
|
5769
|
+
value: "filter",
|
|
5770
|
+
size: "tiny",
|
|
5771
|
+
selected: popupState.isOpen,
|
|
5772
|
+
sx: { position: "relative", flexShrink: 0 },
|
|
5773
|
+
...bindToggle2(popupState),
|
|
5774
|
+
"aria-expanded": popupState.isOpen
|
|
5775
|
+
},
|
|
5776
|
+
/* @__PURE__ */ React82.createElement(FilterIcon2, { fontSize: "tiny" }),
|
|
5777
|
+
isFiltered ? /* @__PURE__ */ React82.createElement(
|
|
5778
|
+
Box15,
|
|
5779
|
+
{
|
|
5780
|
+
component: "span",
|
|
5781
|
+
"aria-hidden": "true",
|
|
5782
|
+
sx: {
|
|
5783
|
+
position: "absolute",
|
|
5784
|
+
insetBlockStart: FILTER_INDICATOR_OFFSET,
|
|
5785
|
+
insetInlineEnd: FILTER_INDICATOR_OFFSET,
|
|
5786
|
+
width: FILTER_INDICATOR_SIZE,
|
|
5787
|
+
height: FILTER_INDICATOR_SIZE,
|
|
5788
|
+
borderRadius: "50%",
|
|
5789
|
+
bgcolor: "secondary.main"
|
|
5790
|
+
}
|
|
5791
|
+
}
|
|
5792
|
+
) : null
|
|
5793
|
+
)
|
|
5794
|
+
), /* @__PURE__ */ React82.createElement(
|
|
5795
|
+
Menu4,
|
|
5796
|
+
{
|
|
5797
|
+
...bindMenu3(popupState),
|
|
5798
|
+
MenuListProps: {
|
|
5799
|
+
dense: true,
|
|
5800
|
+
autoFocusItem: true,
|
|
5801
|
+
"aria-label": __32("Filter by library", "elementor")
|
|
5802
|
+
},
|
|
5803
|
+
sx: { "& .MuiPaper-root": { minWidth: FILTER_MENU_WIDTH } }
|
|
5423
5804
|
},
|
|
5424
|
-
|
|
5805
|
+
/* @__PURE__ */ React82.createElement(
|
|
5806
|
+
MenuItem2,
|
|
5807
|
+
{
|
|
5808
|
+
role: "menuitemcheckbox",
|
|
5809
|
+
"aria-checked": !isFiltered,
|
|
5810
|
+
selected: !isFiltered,
|
|
5811
|
+
onClick: handleAllIconsClick
|
|
5812
|
+
},
|
|
5813
|
+
renderFilterMenuItemContent(__32("All icons", "elementor"), ListIcon, !isFiltered)
|
|
5814
|
+
),
|
|
5815
|
+
options.map(({ value: library, label, Icon }) => /* @__PURE__ */ React82.createElement(
|
|
5816
|
+
MenuItem2,
|
|
5817
|
+
{
|
|
5818
|
+
key: library,
|
|
5819
|
+
role: "menuitemcheckbox",
|
|
5820
|
+
"aria-checked": value.includes(library),
|
|
5821
|
+
selected: value.includes(library),
|
|
5822
|
+
onClick: () => handleLibraryClick(library)
|
|
5823
|
+
},
|
|
5824
|
+
renderFilterMenuItemContent(label, Icon, value.includes(library))
|
|
5825
|
+
))
|
|
5826
|
+
));
|
|
5827
|
+
};
|
|
5828
|
+
var renderFilterMenuItemContent = (label, Icon, selected) => /* @__PURE__ */ React82.createElement(Stack13, { direction: "row", alignItems: "center", gap: 1, width: "100%" }, /* @__PURE__ */ React82.createElement(Icon, { fontSize: "tiny" }), /* @__PURE__ */ React82.createElement(Typography7, { variant: "caption", sx: { flex: 1 } }, label), selected ? /* @__PURE__ */ React82.createElement(CheckIcon, { fontSize: "tiny", "aria-hidden": "true" }) : null);
|
|
5829
|
+
|
|
5830
|
+
// src/controls/icon-library/icon-library-grid.tsx
|
|
5831
|
+
import * as React83 from "react";
|
|
5832
|
+
import { useLayoutEffect as useLayoutEffect3, useRef as useRef15, useState as useState16 } from "react";
|
|
5833
|
+
import { Box as Box16, Tooltip as Tooltip9, useTheme as useTheme3 } from "@elementor/ui";
|
|
5834
|
+
import { useVirtualizer } from "@tanstack/react-virtual";
|
|
5835
|
+
import { __ as __33 } from "@wordpress/i18n";
|
|
5836
|
+
var ICON_LIBRARY_GRID_FALLBACK_COLUMN_COUNT = 4;
|
|
5837
|
+
var ICON_LIBRARY_GRID_MIN_CELL_SIZE = 52;
|
|
5838
|
+
var ICON_LIBRARY_GRID_TOOLTIP_ENTER_DELAY = 1e3;
|
|
5839
|
+
var ICON_GLYPH_SIZE = 20;
|
|
5840
|
+
var GRID_OVERSCAN = 6;
|
|
5841
|
+
var GRID_COLUMN_GAP = 1;
|
|
5842
|
+
var GRID_HORIZONTAL_PADDING = 1;
|
|
5843
|
+
var HOME_END_KEYS = /* @__PURE__ */ new Set(["Home", "End"]);
|
|
5844
|
+
var getGridMetrics = (containerWidth, columnGap, inlinePadding) => {
|
|
5845
|
+
const availableWidth = containerWidth - inlinePadding;
|
|
5846
|
+
if (availableWidth <= 0) {
|
|
5847
|
+
return {
|
|
5848
|
+
columnCount: ICON_LIBRARY_GRID_FALLBACK_COLUMN_COUNT,
|
|
5849
|
+
cellSize: ICON_LIBRARY_GRID_MIN_CELL_SIZE
|
|
5850
|
+
};
|
|
5851
|
+
}
|
|
5852
|
+
const columnCount = Math.max(
|
|
5853
|
+
1,
|
|
5854
|
+
Math.floor((availableWidth + columnGap) / (ICON_LIBRARY_GRID_MIN_CELL_SIZE + columnGap))
|
|
5855
|
+
);
|
|
5856
|
+
const cellSize = Math.floor((availableWidth - columnGap * (columnCount - 1)) / columnCount);
|
|
5857
|
+
return {
|
|
5858
|
+
columnCount,
|
|
5859
|
+
cellSize: Math.max(cellSize, 1)
|
|
5860
|
+
};
|
|
5861
|
+
};
|
|
5862
|
+
var IconLibraryGrid = ({
|
|
5863
|
+
items: items2,
|
|
5864
|
+
selectedValue,
|
|
5865
|
+
onSelect,
|
|
5866
|
+
onClose,
|
|
5867
|
+
noResultsComponent
|
|
5868
|
+
}) => {
|
|
5869
|
+
const theme = useTheme3();
|
|
5870
|
+
const containerRef = useRef15(null);
|
|
5871
|
+
const cellRefs = useRef15(/* @__PURE__ */ new Map());
|
|
5872
|
+
const shouldRestoreFocusRef = useRef15(false);
|
|
5873
|
+
const selectedIndex = items2.findIndex((item) => item.id === selectedValue);
|
|
5874
|
+
const [focusedIndex, setFocusedIndex] = useState16(selectedIndex >= 0 ? selectedIndex : 0);
|
|
5875
|
+
const [{ columnCount, cellSize }, setGridMetrics] = useState16(() => getGridMetrics(0, 0, 0));
|
|
5876
|
+
const rowCount = Math.ceil(items2.length / columnCount);
|
|
5877
|
+
const virtualizer = useVirtualizer({
|
|
5878
|
+
count: rowCount,
|
|
5879
|
+
getScrollElement: () => containerRef.current,
|
|
5880
|
+
estimateSize: () => cellSize,
|
|
5881
|
+
overscan: GRID_OVERSCAN
|
|
5882
|
+
});
|
|
5883
|
+
const focusedItem = items2[focusedIndex];
|
|
5884
|
+
const visibleRowIndexes = virtualizer.getVirtualIndexes().join(",");
|
|
5885
|
+
useLayoutEffect3(() => {
|
|
5886
|
+
setFocusedIndex((current) => {
|
|
5887
|
+
if (items2.length === 0) {
|
|
5888
|
+
return 0;
|
|
5889
|
+
}
|
|
5890
|
+
if (selectedIndex >= 0) {
|
|
5891
|
+
return selectedIndex;
|
|
5892
|
+
}
|
|
5893
|
+
return Math.min(current, items2.length - 1);
|
|
5894
|
+
});
|
|
5895
|
+
if (selectedIndex >= 0) {
|
|
5896
|
+
virtualizer.scrollToIndex(Math.floor(selectedIndex / columnCount));
|
|
5897
|
+
}
|
|
5898
|
+
}, [columnCount, items2, selectedIndex, selectedValue]);
|
|
5899
|
+
useLayoutEffect3(() => {
|
|
5900
|
+
if (!shouldRestoreFocusRef.current || !focusedItem) {
|
|
5901
|
+
return;
|
|
5902
|
+
}
|
|
5903
|
+
const cell = cellRefs.current.get(focusedItem.id);
|
|
5904
|
+
if (!cell) {
|
|
5905
|
+
return;
|
|
5906
|
+
}
|
|
5907
|
+
cell.focus();
|
|
5908
|
+
shouldRestoreFocusRef.current = false;
|
|
5909
|
+
}, [focusedItem, visibleRowIndexes]);
|
|
5910
|
+
useLayoutEffect3(() => {
|
|
5911
|
+
const container = containerRef.current;
|
|
5912
|
+
if (!container) {
|
|
5913
|
+
return;
|
|
5914
|
+
}
|
|
5915
|
+
const measureGrid = () => {
|
|
5916
|
+
const columnGap = Number.parseFloat(theme.spacing(GRID_COLUMN_GAP));
|
|
5917
|
+
const inlinePadding = Number.parseFloat(theme.spacing(GRID_HORIZONTAL_PADDING)) * 2;
|
|
5918
|
+
setGridMetrics(getGridMetrics(container.clientWidth, columnGap, inlinePadding));
|
|
5919
|
+
};
|
|
5920
|
+
measureGrid();
|
|
5921
|
+
const resizeObserver = new ResizeObserver(measureGrid);
|
|
5922
|
+
resizeObserver.observe(container);
|
|
5923
|
+
return () => {
|
|
5924
|
+
resizeObserver.disconnect();
|
|
5925
|
+
};
|
|
5926
|
+
}, [theme, items2.length]);
|
|
5927
|
+
useLayoutEffect3(() => {
|
|
5928
|
+
virtualizer.measure();
|
|
5929
|
+
}, [cellSize, columnCount]);
|
|
5930
|
+
const isRtl = theme.direction === "rtl" || document.documentElement.dir === "rtl";
|
|
5931
|
+
const horizontalOffset = isRtl ? -1 : 1;
|
|
5932
|
+
const moveFocus = (nextIndex) => {
|
|
5933
|
+
if (nextIndex < 0 || nextIndex >= items2.length) {
|
|
5934
|
+
return;
|
|
5935
|
+
}
|
|
5936
|
+
shouldRestoreFocusRef.current = true;
|
|
5937
|
+
setFocusedIndex(nextIndex);
|
|
5938
|
+
virtualizer.scrollToIndex(Math.floor(nextIndex / columnCount));
|
|
5425
5939
|
};
|
|
5940
|
+
const handleKeyDown = (event, index) => {
|
|
5941
|
+
if (event.key === "Enter" || event.key === " ") {
|
|
5942
|
+
event.preventDefault();
|
|
5943
|
+
onSelect(items2[index].id);
|
|
5944
|
+
onClose();
|
|
5945
|
+
return;
|
|
5946
|
+
}
|
|
5947
|
+
if (event.key === "ArrowRight") {
|
|
5948
|
+
event.preventDefault();
|
|
5949
|
+
moveFocus(index + horizontalOffset);
|
|
5950
|
+
return;
|
|
5951
|
+
}
|
|
5952
|
+
if (event.key === "ArrowLeft") {
|
|
5953
|
+
event.preventDefault();
|
|
5954
|
+
moveFocus(index - horizontalOffset);
|
|
5955
|
+
return;
|
|
5956
|
+
}
|
|
5957
|
+
if (event.key === "ArrowDown") {
|
|
5958
|
+
event.preventDefault();
|
|
5959
|
+
moveFocus(index + columnCount);
|
|
5960
|
+
return;
|
|
5961
|
+
}
|
|
5962
|
+
if (event.key === "ArrowUp") {
|
|
5963
|
+
event.preventDefault();
|
|
5964
|
+
moveFocus(index - columnCount);
|
|
5965
|
+
return;
|
|
5966
|
+
}
|
|
5967
|
+
if (HOME_END_KEYS.has(event.key)) {
|
|
5968
|
+
event.preventDefault();
|
|
5969
|
+
if (event.ctrlKey) {
|
|
5970
|
+
moveFocus(event.key === "Home" ? 0 : items2.length - 1);
|
|
5971
|
+
return;
|
|
5972
|
+
}
|
|
5973
|
+
const rowStart = Math.floor(index / columnCount) * columnCount;
|
|
5974
|
+
const rowEnd = Math.min(rowStart + columnCount - 1, items2.length - 1);
|
|
5975
|
+
moveFocus(event.key === "Home" ? rowStart : rowEnd);
|
|
5976
|
+
}
|
|
5977
|
+
};
|
|
5978
|
+
return /* @__PURE__ */ React83.createElement(
|
|
5979
|
+
Box16,
|
|
5980
|
+
{
|
|
5981
|
+
ref: containerRef,
|
|
5982
|
+
sx: {
|
|
5983
|
+
width: "100%",
|
|
5984
|
+
height: "100%",
|
|
5985
|
+
minWidth: 0,
|
|
5986
|
+
overflowX: "hidden",
|
|
5987
|
+
overflowY: "auto"
|
|
5988
|
+
}
|
|
5989
|
+
},
|
|
5990
|
+
items2.length === 0 && noResultsComponent ? noResultsComponent : /* @__PURE__ */ React83.createElement(
|
|
5991
|
+
Box16,
|
|
5992
|
+
{
|
|
5993
|
+
role: "grid",
|
|
5994
|
+
"aria-label": __33("Icons", "elementor"),
|
|
5995
|
+
"aria-rowcount": rowCount,
|
|
5996
|
+
"aria-colcount": columnCount,
|
|
5997
|
+
"data-testid": "icon-library-grid",
|
|
5998
|
+
sx: {
|
|
5999
|
+
width: "100%",
|
|
6000
|
+
minWidth: 0,
|
|
6001
|
+
height: virtualizer.getTotalSize(),
|
|
6002
|
+
position: "relative"
|
|
6003
|
+
}
|
|
6004
|
+
},
|
|
6005
|
+
virtualizer.getVirtualItems().map((virtualRow) => {
|
|
6006
|
+
const startIndex = virtualRow.index * columnCount;
|
|
6007
|
+
const rowItems = items2.slice(startIndex, startIndex + columnCount);
|
|
6008
|
+
return /* @__PURE__ */ React83.createElement(
|
|
6009
|
+
Box16,
|
|
6010
|
+
{
|
|
6011
|
+
key: virtualRow.key,
|
|
6012
|
+
role: "row",
|
|
6013
|
+
"aria-rowindex": virtualRow.index + 1,
|
|
6014
|
+
sx: {
|
|
6015
|
+
position: "absolute",
|
|
6016
|
+
top: 0,
|
|
6017
|
+
left: 0,
|
|
6018
|
+
width: "100%",
|
|
6019
|
+
height: virtualRow.size,
|
|
6020
|
+
transform: `translateY(${virtualRow.start}px)`,
|
|
6021
|
+
display: "grid",
|
|
6022
|
+
gridTemplateColumns: `repeat(${columnCount}, minmax(0, 1fr))`,
|
|
6023
|
+
gap: GRID_COLUMN_GAP,
|
|
6024
|
+
px: GRID_HORIZONTAL_PADDING,
|
|
6025
|
+
boxSizing: "border-box"
|
|
6026
|
+
}
|
|
6027
|
+
},
|
|
6028
|
+
rowItems.map((item, columnIndex) => {
|
|
6029
|
+
const index = startIndex + columnIndex;
|
|
6030
|
+
const isSelected = selectedValue === item.id;
|
|
6031
|
+
const tabIndex = focusedIndex === index ? 0 : -1;
|
|
6032
|
+
return /* @__PURE__ */ React83.createElement(
|
|
6033
|
+
Box16,
|
|
6034
|
+
{
|
|
6035
|
+
key: item.id,
|
|
6036
|
+
role: "presentation",
|
|
6037
|
+
sx: { minWidth: 0, minHeight: 0, width: "100%", height: "100%" }
|
|
6038
|
+
},
|
|
6039
|
+
/* @__PURE__ */ React83.createElement(
|
|
6040
|
+
Tooltip9,
|
|
6041
|
+
{
|
|
6042
|
+
title: item.label,
|
|
6043
|
+
placement: "top",
|
|
6044
|
+
enterDelay: ICON_LIBRARY_GRID_TOOLTIP_ENTER_DELAY,
|
|
6045
|
+
enterNextDelay: ICON_LIBRARY_GRID_TOOLTIP_ENTER_DELAY,
|
|
6046
|
+
disableInteractive: true,
|
|
6047
|
+
disableFocusListener: true
|
|
6048
|
+
},
|
|
6049
|
+
/* @__PURE__ */ React83.createElement(
|
|
6050
|
+
Box16,
|
|
6051
|
+
{
|
|
6052
|
+
component: "button",
|
|
6053
|
+
type: "button",
|
|
6054
|
+
role: "gridcell",
|
|
6055
|
+
"aria-colindex": columnIndex + 1,
|
|
6056
|
+
"aria-label": item.label,
|
|
6057
|
+
"aria-selected": isSelected,
|
|
6058
|
+
tabIndex,
|
|
6059
|
+
ref: (node) => {
|
|
6060
|
+
if (node) {
|
|
6061
|
+
cellRefs.current.set(item.id, node);
|
|
6062
|
+
} else {
|
|
6063
|
+
cellRefs.current.delete(item.id);
|
|
6064
|
+
}
|
|
6065
|
+
},
|
|
6066
|
+
onClick: () => {
|
|
6067
|
+
onSelect(item.id);
|
|
6068
|
+
onClose();
|
|
6069
|
+
},
|
|
6070
|
+
onFocus: () => setFocusedIndex(index),
|
|
6071
|
+
onKeyDown: (event) => handleKeyDown(event, index),
|
|
6072
|
+
sx: {
|
|
6073
|
+
boxSizing: "border-box",
|
|
6074
|
+
appearance: "none",
|
|
6075
|
+
m: 0,
|
|
6076
|
+
width: "100%",
|
|
6077
|
+
height: "100%",
|
|
6078
|
+
minWidth: 0,
|
|
6079
|
+
minHeight: 0,
|
|
6080
|
+
display: "flex",
|
|
6081
|
+
alignItems: "center",
|
|
6082
|
+
justifyContent: "center",
|
|
6083
|
+
border: "1px solid",
|
|
6084
|
+
borderColor: "divider",
|
|
6085
|
+
borderRadius: 1,
|
|
6086
|
+
color: "text.tertiary",
|
|
6087
|
+
bgcolor: "transparent",
|
|
6088
|
+
p: 0,
|
|
6089
|
+
cursor: "pointer",
|
|
6090
|
+
font: "inherit",
|
|
6091
|
+
lineHeight: 0,
|
|
6092
|
+
overflow: "hidden",
|
|
6093
|
+
"&:hover, &:focus": {
|
|
6094
|
+
bgcolor: "action.hover"
|
|
6095
|
+
},
|
|
6096
|
+
'&[aria-selected="true"]': {
|
|
6097
|
+
bgcolor: "action.selected"
|
|
6098
|
+
},
|
|
6099
|
+
'&[aria-selected="true"]:hover, &[aria-selected="true"]:focus': {
|
|
6100
|
+
bgcolor: "action.selected"
|
|
6101
|
+
}
|
|
6102
|
+
}
|
|
6103
|
+
},
|
|
6104
|
+
item.paths.length > 0 ? /* @__PURE__ */ React83.createElement(
|
|
6105
|
+
FontAwesomeGlyph,
|
|
6106
|
+
{
|
|
6107
|
+
icon: item,
|
|
6108
|
+
size: ICON_GLYPH_SIZE,
|
|
6109
|
+
color: "currentColor"
|
|
6110
|
+
}
|
|
6111
|
+
) : null
|
|
6112
|
+
)
|
|
6113
|
+
)
|
|
6114
|
+
);
|
|
6115
|
+
})
|
|
6116
|
+
);
|
|
6117
|
+
})
|
|
6118
|
+
)
|
|
6119
|
+
);
|
|
6120
|
+
};
|
|
6121
|
+
|
|
6122
|
+
// src/controls/icon-library/icon-library-view-toggle.tsx
|
|
6123
|
+
import * as React84 from "react";
|
|
6124
|
+
import { useId as useId5 } from "react";
|
|
6125
|
+
import { CheckIcon as CheckIcon2, ListIcon as ListIcon2, WidgetsIcon } from "@elementor/icons";
|
|
6126
|
+
import {
|
|
6127
|
+
bindMenu as bindMenu4,
|
|
6128
|
+
bindToggle as bindToggle3,
|
|
6129
|
+
Menu as Menu5,
|
|
6130
|
+
MenuItem as MenuItem3,
|
|
6131
|
+
Stack as Stack14,
|
|
6132
|
+
ToggleButton as ToggleButton3,
|
|
6133
|
+
Tooltip as Tooltip10,
|
|
6134
|
+
Typography as Typography8,
|
|
6135
|
+
usePopupState as usePopupState9
|
|
6136
|
+
} from "@elementor/ui";
|
|
6137
|
+
import { __ as __34 } from "@wordpress/i18n";
|
|
6138
|
+
var VIEW_MENU_WIDTH = 122;
|
|
6139
|
+
var IconLibraryViewToggle = ({ value, onChange }) => {
|
|
6140
|
+
const popupId = useId5();
|
|
6141
|
+
const popupState = usePopupState9({
|
|
6142
|
+
variant: "popover",
|
|
6143
|
+
popupId
|
|
6144
|
+
});
|
|
6145
|
+
const isGrid = value === "grid";
|
|
6146
|
+
const ViewIcon = isGrid ? WidgetsIcon : ListIcon2;
|
|
6147
|
+
const viewButtonLabel = isGrid ? __34("Grid view", "elementor") : __34("List view", "elementor");
|
|
6148
|
+
return /* @__PURE__ */ React84.createElement(React84.Fragment, null, /* @__PURE__ */ React84.createElement(
|
|
6149
|
+
Tooltip10,
|
|
6150
|
+
{
|
|
6151
|
+
title: viewButtonLabel,
|
|
6152
|
+
placement: "top",
|
|
6153
|
+
enterDelay: ICON_LIBRARY_ACTION_TOOLTIP_ENTER_DELAY,
|
|
6154
|
+
enterNextDelay: ICON_LIBRARY_ACTION_TOOLTIP_ENTER_DELAY,
|
|
6155
|
+
disableInteractive: true
|
|
6156
|
+
},
|
|
6157
|
+
/* @__PURE__ */ React84.createElement(
|
|
6158
|
+
ToggleButton3,
|
|
6159
|
+
{
|
|
6160
|
+
"aria-label": viewButtonLabel,
|
|
6161
|
+
value: "view",
|
|
6162
|
+
size: "tiny",
|
|
6163
|
+
selected: popupState.isOpen,
|
|
6164
|
+
sx: { flexShrink: 0 },
|
|
6165
|
+
...bindToggle3(popupState),
|
|
6166
|
+
"aria-expanded": popupState.isOpen
|
|
6167
|
+
},
|
|
6168
|
+
/* @__PURE__ */ React84.createElement(ViewIcon, { fontSize: "tiny" })
|
|
6169
|
+
)
|
|
6170
|
+
), /* @__PURE__ */ React84.createElement(
|
|
6171
|
+
Menu5,
|
|
6172
|
+
{
|
|
6173
|
+
...bindMenu4(popupState),
|
|
6174
|
+
MenuListProps: {
|
|
6175
|
+
dense: true,
|
|
6176
|
+
autoFocusItem: true,
|
|
6177
|
+
"aria-label": __34("View", "elementor")
|
|
6178
|
+
},
|
|
6179
|
+
sx: { "& .MuiPaper-root": { minWidth: VIEW_MENU_WIDTH } }
|
|
6180
|
+
},
|
|
6181
|
+
/* @__PURE__ */ React84.createElement(
|
|
6182
|
+
ViewMenuItem,
|
|
6183
|
+
{
|
|
6184
|
+
label: __34("List", "elementor"),
|
|
6185
|
+
selected: value === "list",
|
|
6186
|
+
onClick: () => {
|
|
6187
|
+
onChange("list");
|
|
6188
|
+
popupState.close();
|
|
6189
|
+
}
|
|
6190
|
+
}
|
|
6191
|
+
),
|
|
6192
|
+
/* @__PURE__ */ React84.createElement(
|
|
6193
|
+
ViewMenuItem,
|
|
6194
|
+
{
|
|
6195
|
+
label: __34("Grid", "elementor"),
|
|
6196
|
+
selected: value === "grid",
|
|
6197
|
+
onClick: () => {
|
|
6198
|
+
onChange("grid");
|
|
6199
|
+
popupState.close();
|
|
6200
|
+
}
|
|
6201
|
+
}
|
|
6202
|
+
)
|
|
6203
|
+
));
|
|
6204
|
+
};
|
|
6205
|
+
var ViewMenuItem = ({ label, selected, onClick }) => /* @__PURE__ */ React84.createElement(MenuItem3, { role: "menuitemradio", "aria-checked": selected, selected, onClick }, /* @__PURE__ */ React84.createElement(Stack14, { direction: "row", alignItems: "center", gap: 1, width: "100%" }, /* @__PURE__ */ React84.createElement(Typography8, { variant: "caption", sx: { flex: 1 } }, label), selected ? /* @__PURE__ */ React84.createElement(CheckIcon2, { fontSize: "tiny", "aria-hidden": "true" }) : null));
|
|
6206
|
+
|
|
6207
|
+
// src/controls/icon-library/use-font-awesome-7-catalog.ts
|
|
6208
|
+
import { useQuery as useQuery2 } from "@elementor/query";
|
|
6209
|
+
var FONT_AWESOME_7_CATALOG_QUERY_KEY = ["font-awesome-7-catalog"];
|
|
6210
|
+
function useFontAwesome7Catalog(enabled) {
|
|
6211
|
+
return useQuery2({
|
|
6212
|
+
queryKey: FONT_AWESOME_7_CATALOG_QUERY_KEY,
|
|
6213
|
+
queryFn: ({ signal }) => loadFontAwesome7Catalog(signal),
|
|
6214
|
+
enabled,
|
|
6215
|
+
staleTime: Infinity
|
|
6216
|
+
});
|
|
5426
6217
|
}
|
|
6218
|
+
|
|
6219
|
+
// src/controls/icon-library/icon-library-popover.tsx
|
|
6220
|
+
var ICON_LIBRARY_POPOVER_WIDTH = 300;
|
|
6221
|
+
var ICON_LIBRARY_ROW_HEIGHT = 48;
|
|
6222
|
+
var ICON_LIBRARY_SEARCH_DEBOUNCE_DELAY = 300;
|
|
6223
|
+
var ICON_LIBRARY_VIEW_STORAGE_KEY = "icon-library-view";
|
|
6224
|
+
var ICON_LIBRARY_VIEW_STORAGE_PREFIX = "editor-controls";
|
|
6225
|
+
var DEFAULT_ICON_LIBRARY_VIEW = "list";
|
|
6226
|
+
var isIconLibraryView = (value) => {
|
|
6227
|
+
return value === "grid" || value === "list";
|
|
6228
|
+
};
|
|
6229
|
+
var ICON_TILE_SIZE = 40;
|
|
6230
|
+
var ICON_GLYPH_SIZE2 = 20;
|
|
6231
|
+
var ICON_LIBRARY_INLINE_SPACING = 1;
|
|
6232
|
+
var CompactIconLibraryMenuList = styled9(StyledMenuList)(({ theme }) => ({
|
|
6233
|
+
'& > [role="option"]': {
|
|
6234
|
+
padding: theme.spacing(0.75, ICON_LIBRARY_INLINE_SPACING)
|
|
6235
|
+
}
|
|
6236
|
+
}));
|
|
6237
|
+
var IconLibraryPopover = ({
|
|
6238
|
+
open,
|
|
6239
|
+
selectedIconClass,
|
|
6240
|
+
selectedIconLibrary,
|
|
6241
|
+
onSelect,
|
|
6242
|
+
onClose,
|
|
6243
|
+
width = ICON_LIBRARY_POPOVER_WIDTH
|
|
6244
|
+
}) => {
|
|
6245
|
+
const {
|
|
6246
|
+
debouncedValue: searchValue,
|
|
6247
|
+
inputValue: searchInputValue,
|
|
6248
|
+
handleChange: handleSearchChange,
|
|
6249
|
+
setImmediateValue: setSearchValue
|
|
6250
|
+
} = useDebounceState({ delay: ICON_LIBRARY_SEARCH_DEBOUNCE_DELAY });
|
|
6251
|
+
const [activeLibraries, setActiveLibraries] = useState17([]);
|
|
6252
|
+
const [storedView, setStoredView] = useSessionStorage2(
|
|
6253
|
+
ICON_LIBRARY_VIEW_STORAGE_KEY,
|
|
6254
|
+
ICON_LIBRARY_VIEW_STORAGE_PREFIX
|
|
6255
|
+
);
|
|
6256
|
+
const view = isIconLibraryView(storedView) ? storedView : DEFAULT_ICON_LIBRARY_VIEW;
|
|
6257
|
+
const { data: icons = [], isLoading } = useFontAwesome7Catalog(open);
|
|
6258
|
+
const items2 = useMemo12(
|
|
6259
|
+
() => createIconLibraryItems(icons, searchValue, activeLibraries),
|
|
6260
|
+
[activeLibraries, icons, searchValue]
|
|
6261
|
+
);
|
|
6262
|
+
const selectedValue = useMemo12(
|
|
6263
|
+
() => findFontAwesome7Icon(icons, selectedIconClass, selectedIconLibrary)?.id,
|
|
6264
|
+
[icons, selectedIconClass, selectedIconLibrary]
|
|
6265
|
+
);
|
|
6266
|
+
const handleClose = () => {
|
|
6267
|
+
setSearchValue("");
|
|
6268
|
+
setActiveLibraries([]);
|
|
6269
|
+
onClose();
|
|
6270
|
+
};
|
|
6271
|
+
const handleSelect = (id) => {
|
|
6272
|
+
const icon = items2.find((item) => item.id === id);
|
|
6273
|
+
if (!icon) {
|
|
6274
|
+
return;
|
|
6275
|
+
}
|
|
6276
|
+
onSelect({
|
|
6277
|
+
value: createIconSelectionValue(icon.library, icon.name),
|
|
6278
|
+
library: icon.library
|
|
6279
|
+
});
|
|
6280
|
+
};
|
|
6281
|
+
const handleClearSearch = () => {
|
|
6282
|
+
setSearchValue("");
|
|
6283
|
+
};
|
|
6284
|
+
return /* @__PURE__ */ React85.createElement(PopoverBody2, { width, fillWidth: true, id: "icon-library" }, /* @__PURE__ */ React85.createElement(
|
|
6285
|
+
PopoverHeader4,
|
|
6286
|
+
{
|
|
6287
|
+
title: __35("Icon library", "elementor"),
|
|
6288
|
+
onClose: handleClose,
|
|
6289
|
+
icon: /* @__PURE__ */ React85.createElement(ComponentsIcon, { fontSize: "tiny" }),
|
|
6290
|
+
actions: [/* @__PURE__ */ React85.createElement(IconLibraryViewToggle, { key: "view", value: view, onChange: setStoredView })],
|
|
6291
|
+
sx: { pl: ICON_LIBRARY_INLINE_SPACING, pr: 0.5 }
|
|
6292
|
+
}
|
|
6293
|
+
), /* @__PURE__ */ React85.createElement(Stack15, { direction: "row", alignItems: "center", gap: 1, sx: { px: ICON_LIBRARY_INLINE_SPACING, pb: 1 } }, /* @__PURE__ */ React85.createElement(
|
|
6294
|
+
SearchField2,
|
|
6295
|
+
{
|
|
6296
|
+
value: searchInputValue,
|
|
6297
|
+
onSearch: handleSearchChange,
|
|
6298
|
+
placeholder: __35("Search", "elementor"),
|
|
6299
|
+
id: "icon-library-search",
|
|
6300
|
+
sx: { flex: 1, px: 0, pb: 0 }
|
|
6301
|
+
}
|
|
6302
|
+
), /* @__PURE__ */ React85.createElement(IconLibraryFilter, { value: activeLibraries, onChange: setActiveLibraries })), /* @__PURE__ */ React85.createElement(Divider4, null), /* @__PURE__ */ React85.createElement(Box17, { sx: { flex: 1, overflow: "hidden", minHeight: 0, minWidth: 0 } }, /* @__PURE__ */ React85.createElement(
|
|
6303
|
+
IconLibraryContent,
|
|
6304
|
+
{
|
|
6305
|
+
isLoading,
|
|
6306
|
+
items: items2,
|
|
6307
|
+
selectedValue,
|
|
6308
|
+
searchValue,
|
|
6309
|
+
isCatalogAvailable: icons.length > 0,
|
|
6310
|
+
view,
|
|
6311
|
+
onSelect: handleSelect,
|
|
6312
|
+
onClose: handleClose,
|
|
6313
|
+
onClearSearch: handleClearSearch
|
|
6314
|
+
}
|
|
6315
|
+
)));
|
|
6316
|
+
};
|
|
6317
|
+
var IconLibraryContent = ({
|
|
6318
|
+
isLoading,
|
|
6319
|
+
items: items2,
|
|
6320
|
+
selectedValue,
|
|
6321
|
+
searchValue,
|
|
6322
|
+
isCatalogAvailable,
|
|
6323
|
+
view,
|
|
6324
|
+
onSelect,
|
|
6325
|
+
onClose,
|
|
6326
|
+
onClearSearch
|
|
6327
|
+
}) => {
|
|
6328
|
+
if (isLoading) {
|
|
6329
|
+
return /* @__PURE__ */ React85.createElement(IconLibraryLoadingState, null);
|
|
6330
|
+
}
|
|
6331
|
+
const emptyState = /* @__PURE__ */ React85.createElement(
|
|
6332
|
+
IconLibraryEmptyState,
|
|
6333
|
+
{
|
|
6334
|
+
searchValue,
|
|
6335
|
+
isCatalogAvailable,
|
|
6336
|
+
onClear: onClearSearch
|
|
6337
|
+
}
|
|
6338
|
+
);
|
|
6339
|
+
if (view === "grid") {
|
|
6340
|
+
return /* @__PURE__ */ React85.createElement(Box17, { sx: { width: "100%", height: "100%", minWidth: 0, minHeight: 0 } }, /* @__PURE__ */ React85.createElement(
|
|
6341
|
+
IconLibraryGrid,
|
|
6342
|
+
{
|
|
6343
|
+
items: items2,
|
|
6344
|
+
selectedValue,
|
|
6345
|
+
onSelect,
|
|
6346
|
+
onClose,
|
|
6347
|
+
noResultsComponent: emptyState
|
|
6348
|
+
}
|
|
6349
|
+
));
|
|
6350
|
+
}
|
|
6351
|
+
return /* @__PURE__ */ React85.createElement(
|
|
6352
|
+
PopoverMenuList2,
|
|
6353
|
+
{
|
|
6354
|
+
items: items2,
|
|
6355
|
+
selectedValue,
|
|
6356
|
+
menuListTemplate: CompactIconLibraryMenuList,
|
|
6357
|
+
onSelect,
|
|
6358
|
+
onClose,
|
|
6359
|
+
itemHeight: ICON_LIBRARY_ROW_HEIGHT,
|
|
6360
|
+
menuItemContentTemplate: IconLibraryRow,
|
|
6361
|
+
noResultsComponent: emptyState,
|
|
6362
|
+
"data-testid": "icon-library-list"
|
|
6363
|
+
}
|
|
6364
|
+
);
|
|
6365
|
+
};
|
|
6366
|
+
var IconLibraryLoadingState = () => /* @__PURE__ */ React85.createElement(Stack15, { alignItems: "center", justifyContent: "center", height: "100%" }, /* @__PURE__ */ React85.createElement(CircularProgress3, { role: "progressbar", size: 24 }));
|
|
6367
|
+
var IconLibraryEmptyState = ({
|
|
6368
|
+
searchValue,
|
|
6369
|
+
isCatalogAvailable,
|
|
6370
|
+
onClear
|
|
6371
|
+
}) => {
|
|
6372
|
+
if (!isCatalogAvailable) {
|
|
6373
|
+
return /* @__PURE__ */ React85.createElement(CatalogUnavailable, null);
|
|
6374
|
+
}
|
|
6375
|
+
return /* @__PURE__ */ React85.createElement(NoResults, { searchValue, onClear });
|
|
6376
|
+
};
|
|
6377
|
+
var IconLibraryRow = (item) => {
|
|
6378
|
+
const icon = item;
|
|
6379
|
+
return /* @__PURE__ */ React85.createElement(Stack15, { direction: "row", alignItems: "center", gap: 1, sx: { width: "100%" } }, /* @__PURE__ */ React85.createElement(
|
|
6380
|
+
Box17,
|
|
6381
|
+
{
|
|
6382
|
+
sx: {
|
|
6383
|
+
width: ICON_TILE_SIZE,
|
|
6384
|
+
height: ICON_TILE_SIZE,
|
|
6385
|
+
display: "flex",
|
|
6386
|
+
alignItems: "center",
|
|
6387
|
+
justifyContent: "center",
|
|
6388
|
+
border: 1,
|
|
6389
|
+
borderColor: "divider",
|
|
6390
|
+
borderRadius: 1,
|
|
6391
|
+
color: "text.tertiary",
|
|
6392
|
+
flexShrink: 0
|
|
6393
|
+
}
|
|
6394
|
+
},
|
|
6395
|
+
icon.paths.length > 0 ? /* @__PURE__ */ React85.createElement(FontAwesomeGlyph, { icon, size: ICON_GLYPH_SIZE2, color: "currentColor" }) : null
|
|
6396
|
+
), /* @__PURE__ */ React85.createElement(Typography9, { variant: "caption", color: "text.primary", noWrap: true }, icon.label));
|
|
6397
|
+
};
|
|
6398
|
+
var CatalogUnavailable = () => /* @__PURE__ */ React85.createElement(Stack15, { alignItems: "center", justifyContent: "center", height: "100%", p: 2.5, gap: 1.5 }, /* @__PURE__ */ React85.createElement(ComponentsIcon, { fontSize: "large" }), /* @__PURE__ */ React85.createElement(Typography9, { align: "center", variant: "subtitle2", color: "text.secondary" }, __35("Icons couldn't be loaded.", "elementor")));
|
|
6399
|
+
var NoResults = ({ searchValue, onClear }) => /* @__PURE__ */ React85.createElement(Stack15, { alignItems: "center", justifyContent: "center", height: "100%", p: 2.5, gap: 1.5 }, /* @__PURE__ */ React85.createElement(ComponentsIcon, { fontSize: "large" }), /* @__PURE__ */ React85.createElement(Typography9, { align: "center", variant: "subtitle2", color: "text.secondary" }, __35("Sorry, nothing matched", "elementor")), searchValue ? /* @__PURE__ */ React85.createElement(React85.Fragment, null, /* @__PURE__ */ React85.createElement(Typography9, { align: "center", variant: "subtitle2", color: "text.secondary", noWrap: true, sx: { maxWidth: "80%" } }, "\u201C", searchValue, "\u201D."), /* @__PURE__ */ React85.createElement(Link3, { color: "secondary", variant: "caption", component: "button", type: "button", onClick: onClear }, __35("Clear & try again", "elementor"))) : null);
|
|
6400
|
+
var createIconLibraryItems = (icons, searchValue, libraries) => filterFontAwesome7Icons(icons, searchValue, libraries).map((icon) => ({
|
|
6401
|
+
...icon,
|
|
6402
|
+
type: "item",
|
|
6403
|
+
value: icon.id
|
|
6404
|
+
}));
|
|
6405
|
+
|
|
6406
|
+
// src/controls/open-icon-library.ts
|
|
6407
|
+
import { stringPropTypeUtil as stringPropTypeUtil14 } from "@elementor/editor-props";
|
|
5427
6408
|
function createIconPropValue(icon, library) {
|
|
5428
6409
|
return {
|
|
5429
6410
|
value: stringPropTypeUtil14.create(icon),
|
|
@@ -5431,13 +6412,170 @@ function createIconPropValue(icon, library) {
|
|
|
5431
6412
|
};
|
|
5432
6413
|
}
|
|
5433
6414
|
|
|
6415
|
+
// src/controls/svg-media-overlay.tsx
|
|
6416
|
+
import * as React86 from "react";
|
|
6417
|
+
import { LibraryIcon as LibraryIcon2, UploadIcon as UploadIcon2 } from "@elementor/icons";
|
|
6418
|
+
import { Box as Box18, Button as Button5, Stack as Stack16, styled as styled10, ThemeProvider, Typography as Typography10 } from "@elementor/ui";
|
|
6419
|
+
import { __ as __36 } from "@wordpress/i18n";
|
|
6420
|
+
var SVG_MEDIA_CONTROL_CONTAINER_TEST_ID = "svg-media-control-container";
|
|
6421
|
+
var SVG_MEDIA_ACTION_GROUP_TEST_ID = "svg-media-action-group";
|
|
6422
|
+
var MEDIA_ACTION_PADDING_Y = 0.75;
|
|
6423
|
+
var MEDIA_ACTION_PADDING_X = 2;
|
|
6424
|
+
var ICON_LIBRARY_PADDING = 0.625;
|
|
6425
|
+
var svgButtonSx = {
|
|
6426
|
+
px: MEDIA_ACTION_PADDING_X,
|
|
6427
|
+
py: MEDIA_ACTION_PADDING_Y
|
|
6428
|
+
};
|
|
6429
|
+
var MediaActionGroup = styled10(Stack16)(({ theme }) => ({
|
|
6430
|
+
display: "inline-flex",
|
|
6431
|
+
flexDirection: "row",
|
|
6432
|
+
alignItems: "stretch",
|
|
6433
|
+
border: "1px solid currentColor",
|
|
6434
|
+
borderRadius: theme.shape.borderRadius,
|
|
6435
|
+
overflow: "hidden",
|
|
6436
|
+
"& .MuiButton-root": {
|
|
6437
|
+
border: "none",
|
|
6438
|
+
borderRadius: 0,
|
|
6439
|
+
lineHeight: 1
|
|
6440
|
+
}
|
|
6441
|
+
}));
|
|
6442
|
+
var SvgMediaOverlay = ({
|
|
6443
|
+
isAdmin,
|
|
6444
|
+
showIconLibrary,
|
|
6445
|
+
buttonGroupRef,
|
|
6446
|
+
onSelectSvg,
|
|
6447
|
+
onUpload,
|
|
6448
|
+
onOpenIconLibrary,
|
|
6449
|
+
infotipTitle,
|
|
6450
|
+
infotipDescription
|
|
6451
|
+
}) => /* @__PURE__ */ React86.createElement(Stack16, { alignItems: "center", gap: 1 }, /* @__PURE__ */ React86.createElement(MediaActionGroup, { ref: buttonGroupRef, direction: "row", "data-testid": SVG_MEDIA_ACTION_GROUP_TEST_ID }, /* @__PURE__ */ React86.createElement(
|
|
6452
|
+
Button5,
|
|
6453
|
+
{
|
|
6454
|
+
size: "tiny",
|
|
6455
|
+
color: "inherit",
|
|
6456
|
+
variant: "text",
|
|
6457
|
+
onClick: onSelectSvg,
|
|
6458
|
+
"aria-label": __36("Select", "elementor"),
|
|
6459
|
+
sx: svgButtonSx
|
|
6460
|
+
},
|
|
6461
|
+
__36("Select", "elementor")
|
|
6462
|
+
), /* @__PURE__ */ React86.createElement(
|
|
6463
|
+
Box18,
|
|
6464
|
+
{
|
|
6465
|
+
sx: {
|
|
6466
|
+
width: "1px",
|
|
6467
|
+
alignSelf: "stretch",
|
|
6468
|
+
bgcolor: "currentColor",
|
|
6469
|
+
flexShrink: 0
|
|
6470
|
+
}
|
|
6471
|
+
}
|
|
6472
|
+
), /* @__PURE__ */ React86.createElement(
|
|
6473
|
+
ConditionalControlInfotip,
|
|
6474
|
+
{
|
|
6475
|
+
title: infotipTitle,
|
|
6476
|
+
description: infotipDescription,
|
|
6477
|
+
isEnabled: !isAdmin
|
|
6478
|
+
},
|
|
6479
|
+
/* @__PURE__ */ React86.createElement(Box18, { component: "span", sx: { display: "inline-flex" } }, /* @__PURE__ */ React86.createElement(UploadControl, { isAdmin, onUpload }))
|
|
6480
|
+
)), showIconLibrary ? /* @__PURE__ */ React86.createElement(
|
|
6481
|
+
Button5,
|
|
6482
|
+
{
|
|
6483
|
+
size: "tiny",
|
|
6484
|
+
color: "inherit",
|
|
6485
|
+
variant: "text",
|
|
6486
|
+
startIcon: /* @__PURE__ */ React86.createElement(LibraryIcon2, { sx: { height: "18px", width: "16px" } }),
|
|
6487
|
+
"aria-label": __36("Icon library", "elementor"),
|
|
6488
|
+
onClick: onOpenIconLibrary,
|
|
6489
|
+
sx: {
|
|
6490
|
+
height: "28px",
|
|
6491
|
+
p: ICON_LIBRARY_PADDING,
|
|
6492
|
+
".MuiButton-icon": { ml: 0 }
|
|
6493
|
+
}
|
|
6494
|
+
},
|
|
6495
|
+
/* @__PURE__ */ React86.createElement(Typography10, null, __36("Icon library", "elementor"))
|
|
6496
|
+
) : null);
|
|
6497
|
+
var UploadControl = ({ isAdmin, onUpload }) => {
|
|
6498
|
+
if (isAdmin) {
|
|
6499
|
+
return /* @__PURE__ */ React86.createElement(UploadButton, { sx: svgButtonSx, onClick: onUpload });
|
|
6500
|
+
}
|
|
6501
|
+
return /* @__PURE__ */ React86.createElement(ThemeProvider, { colorScheme: "dark" }, /* @__PURE__ */ React86.createElement(UploadButton, { disabled: true, sx: svgButtonSx }));
|
|
6502
|
+
};
|
|
6503
|
+
var UploadButton = ({
|
|
6504
|
+
disabled = false,
|
|
6505
|
+
sx,
|
|
6506
|
+
onClick
|
|
6507
|
+
}) => /* @__PURE__ */ React86.createElement(
|
|
6508
|
+
Button5,
|
|
6509
|
+
{
|
|
6510
|
+
sx,
|
|
6511
|
+
size: "tiny",
|
|
6512
|
+
color: "inherit",
|
|
6513
|
+
variant: "text",
|
|
6514
|
+
disabled,
|
|
6515
|
+
onClick,
|
|
6516
|
+
"aria-label": __36("Upload", "elementor")
|
|
6517
|
+
},
|
|
6518
|
+
/* @__PURE__ */ React86.createElement(UploadIcon2, null)
|
|
6519
|
+
);
|
|
6520
|
+
|
|
6521
|
+
// src/controls/svg-media-preview.tsx
|
|
6522
|
+
import * as React87 from "react";
|
|
6523
|
+
import { Box as Box19, CardMedia as CardMedia2, CircularProgress as CircularProgress4 } from "@elementor/ui";
|
|
6524
|
+
import { __ as __37 } from "@wordpress/i18n";
|
|
6525
|
+
var ICON_PREVIEW_SIZE = 50;
|
|
6526
|
+
var ICON_PREVIEW_COLOR = "#000000";
|
|
6527
|
+
var SvgMediaPreview = ({ isFetching, src, iconClassName, iconLibrary }) => {
|
|
6528
|
+
const shouldLoadIconCatalog = Boolean(iconClassName && iconLibrary);
|
|
6529
|
+
const { data: icons = [], isLoading } = useFontAwesome7Catalog(shouldLoadIconCatalog);
|
|
6530
|
+
const selectedIcon = findFontAwesome7Icon(icons, iconClassName, iconLibrary);
|
|
6531
|
+
if (isFetching || shouldLoadIconCatalog && isLoading) {
|
|
6532
|
+
return /* @__PURE__ */ React87.createElement(CircularProgress4, { role: "progressbar" });
|
|
6533
|
+
}
|
|
6534
|
+
if (selectedIcon) {
|
|
6535
|
+
return /* @__PURE__ */ React87.createElement(IconPreview, { icon: selectedIcon });
|
|
6536
|
+
}
|
|
6537
|
+
if (shouldLoadIconCatalog) {
|
|
6538
|
+
return /* @__PURE__ */ React87.createElement(IconPreviewPlaceholder, null);
|
|
6539
|
+
}
|
|
6540
|
+
return /* @__PURE__ */ React87.createElement(SvgPreview, { src });
|
|
6541
|
+
};
|
|
6542
|
+
var IconPreview = ({ icon }) => /* @__PURE__ */ React87.createElement(Box19, { sx: { color: ICON_PREVIEW_COLOR } }, /* @__PURE__ */ React87.createElement(
|
|
6543
|
+
FontAwesomeGlyph,
|
|
6544
|
+
{
|
|
6545
|
+
icon,
|
|
6546
|
+
size: ICON_PREVIEW_SIZE,
|
|
6547
|
+
color: ICON_PREVIEW_COLOR,
|
|
6548
|
+
label: __37("Preview icon", "elementor")
|
|
6549
|
+
}
|
|
6550
|
+
));
|
|
6551
|
+
var IconPreviewPlaceholder = () => /* @__PURE__ */ React87.createElement(
|
|
6552
|
+
Box19,
|
|
6553
|
+
{
|
|
6554
|
+
"aria-hidden": true,
|
|
6555
|
+
sx: {
|
|
6556
|
+
width: ICON_PREVIEW_SIZE,
|
|
6557
|
+
height: ICON_PREVIEW_SIZE,
|
|
6558
|
+
color: ICON_PREVIEW_COLOR
|
|
6559
|
+
}
|
|
6560
|
+
}
|
|
6561
|
+
);
|
|
6562
|
+
var SvgPreview = ({ src }) => /* @__PURE__ */ React87.createElement(
|
|
6563
|
+
CardMedia2,
|
|
6564
|
+
{
|
|
6565
|
+
component: "img",
|
|
6566
|
+
image: src,
|
|
6567
|
+
alt: __37("Preview SVG", "elementor"),
|
|
6568
|
+
sx: { maxHeight: "140px", width: `${ICON_PREVIEW_SIZE}px`, color: ICON_PREVIEW_COLOR }
|
|
6569
|
+
}
|
|
6570
|
+
);
|
|
6571
|
+
|
|
5434
6572
|
// src/controls/svg-media-control.tsx
|
|
5435
6573
|
var TILE_SIZE = 8;
|
|
5436
6574
|
var TILE_WHITE = "transparent";
|
|
5437
6575
|
var TILE_BLACK = "#c1c1c1";
|
|
5438
|
-
var ICON_PREVIEW_FONT_SIZE = 50;
|
|
5439
6576
|
var TILES_GRADIENT_FORMULA = `linear-gradient(45deg, ${TILE_BLACK} 25%, ${TILE_WHITE} 0, ${TILE_WHITE} 75%, ${TILE_BLACK} 0, ${TILE_BLACK})`;
|
|
5440
|
-
var StyledCard =
|
|
6577
|
+
var StyledCard = styled11(Card2)`
|
|
6578
|
+
position: relative;
|
|
5441
6579
|
background-color: white;
|
|
5442
6580
|
background-image: ${TILES_GRADIENT_FORMULA}, ${TILES_GRADIENT_FORMULA};
|
|
5443
6581
|
background-size: ${TILE_SIZE}px ${TILE_SIZE}px;
|
|
@@ -5446,7 +6584,8 @@ var StyledCard = styled9(Card2)`
|
|
|
5446
6584
|
${TILE_SIZE / 2}px ${TILE_SIZE / 2}px;
|
|
5447
6585
|
border: none;
|
|
5448
6586
|
`;
|
|
5449
|
-
var
|
|
6587
|
+
var PREVIEW_ICON_COLOR = "#000000";
|
|
6588
|
+
var StyledCardMediaContainer = styled11(Stack17)`
|
|
5450
6589
|
position: relative;
|
|
5451
6590
|
height: 140px;
|
|
5452
6591
|
object-fit: contain;
|
|
@@ -5454,6 +6593,7 @@ var StyledCardMediaContainer = styled9(Stack13)`
|
|
|
5454
6593
|
justify-content: center;
|
|
5455
6594
|
align-items: center;
|
|
5456
6595
|
background-color: rgba( 255, 255, 255, 0.37 );
|
|
6596
|
+
color: ${PREVIEW_ICON_COLOR};
|
|
5457
6597
|
`;
|
|
5458
6598
|
var MODE_BROWSE = { mode: "browse" };
|
|
5459
6599
|
var MODE_UPLOAD = { mode: "upload" };
|
|
@@ -5465,7 +6605,11 @@ var SvgMediaControl = createControl(({ showIconLibrary = false }) => {
|
|
|
5465
6605
|
const { data: attachment, isFetching } = useWpMediaAttachment2(id?.value || null);
|
|
5466
6606
|
const src = attachment?.url ?? url?.value ?? null;
|
|
5467
6607
|
const { data: allowSvgUpload } = useUnfilteredFilesUpload();
|
|
5468
|
-
const [unfilteredModalOpenState, setUnfilteredModalOpenState] =
|
|
6608
|
+
const [unfilteredModalOpenState, setUnfilteredModalOpenState] = useState18(false);
|
|
6609
|
+
const iconLibraryPopoverState = usePopupState10({ variant: "popover" });
|
|
6610
|
+
const controlContainerRef = useRef16(null);
|
|
6611
|
+
const buttonGroupRef = useRef16(null);
|
|
6612
|
+
const [iconLibraryAnchor, setIconLibraryAnchor] = useState18(null);
|
|
5469
6613
|
const { isAdmin } = useCurrentUserCapabilities();
|
|
5470
6614
|
const selectedIconClass = showIconLibrary && typeof iconValue?.value?.value === "string" ? iconValue.value.value : null;
|
|
5471
6615
|
const selectedIconLibrary = showIconLibrary && typeof iconValue?.library?.value === "string" ? iconValue.library.value : null;
|
|
@@ -5483,7 +6627,7 @@ var SvgMediaControl = createControl(({ showIconLibrary = false }) => {
|
|
|
5483
6627
|
});
|
|
5484
6628
|
}
|
|
5485
6629
|
});
|
|
5486
|
-
const
|
|
6630
|
+
const handleCloseUnfilteredModal = (enabled) => {
|
|
5487
6631
|
setUnfilteredModalOpenState(false);
|
|
5488
6632
|
if (enabled) {
|
|
5489
6633
|
open(MODE_UPLOAD);
|
|
@@ -5496,127 +6640,123 @@ var SvgMediaControl = createControl(({ showIconLibrary = false }) => {
|
|
|
5496
6640
|
open(openOptions);
|
|
5497
6641
|
}
|
|
5498
6642
|
};
|
|
6643
|
+
const handleSelectSvg = () => {
|
|
6644
|
+
handleClick(MODE_BROWSE);
|
|
6645
|
+
};
|
|
6646
|
+
const handleUpload = () => {
|
|
6647
|
+
handleClick(MODE_UPLOAD);
|
|
6648
|
+
};
|
|
6649
|
+
const handleCloseIconLibrary = () => {
|
|
6650
|
+
iconLibraryPopoverState.close();
|
|
6651
|
+
setIconLibraryAnchor(null);
|
|
6652
|
+
};
|
|
5499
6653
|
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
|
-
});
|
|
6654
|
+
setIconValue(createIconPropValue(icon.value, icon.library));
|
|
6655
|
+
};
|
|
6656
|
+
const handleOpenIconLibrary = (event) => {
|
|
6657
|
+
const anchor = measureIconLibraryAnchor(controlContainerRef.current, buttonGroupRef.current);
|
|
6658
|
+
if (!anchor) {
|
|
5511
6659
|
return;
|
|
5512
6660
|
}
|
|
5513
|
-
|
|
5514
|
-
|
|
5515
|
-
}
|
|
6661
|
+
setIconLibraryAnchor(anchor);
|
|
6662
|
+
iconLibraryPopoverState.open(event);
|
|
5516
6663
|
};
|
|
5517
|
-
|
|
5518
|
-
|
|
5519
|
-
|
|
5520
|
-
isEnabled: !isAdmin
|
|
5521
|
-
};
|
|
5522
|
-
return /* @__PURE__ */ React81.createElement(Stack13, { gap: 1, "aria-label": "SVG Control" }, /* @__PURE__ */ React81.createElement(EnableUnfilteredModal, { open: unfilteredModalOpenState, onClose: onCloseUnfilteredModal }), /* @__PURE__ */ React81.createElement(ControlActions, null, /* @__PURE__ */ React81.createElement(StyledCard, { variant: "outlined" }, /* @__PURE__ */ React81.createElement(StyledCardMediaContainer, null, /* @__PURE__ */ React81.createElement(
|
|
5523
|
-
SvgMediaPreview,
|
|
5524
|
-
{
|
|
5525
|
-
isFetching,
|
|
5526
|
-
src,
|
|
5527
|
-
iconClassName: selectedIconClass,
|
|
5528
|
-
iconLibrary: selectedIconLibrary
|
|
6664
|
+
useEffect16(() => {
|
|
6665
|
+
if (!iconLibraryPopoverState.isOpen) {
|
|
6666
|
+
return;
|
|
5529
6667
|
}
|
|
5530
|
-
|
|
5531
|
-
|
|
6668
|
+
const handleResize = () => {
|
|
6669
|
+
const nextAnchor = measureIconLibraryAnchor(controlContainerRef.current, buttonGroupRef.current);
|
|
6670
|
+
if (nextAnchor) {
|
|
6671
|
+
setIconLibraryAnchor(nextAnchor);
|
|
6672
|
+
}
|
|
6673
|
+
};
|
|
6674
|
+
window.addEventListener("resize", handleResize);
|
|
6675
|
+
return () => {
|
|
6676
|
+
window.removeEventListener("resize", handleResize);
|
|
6677
|
+
};
|
|
6678
|
+
}, [iconLibraryPopoverState.isOpen]);
|
|
6679
|
+
const iconLibraryWidth = iconLibraryAnchor?.width ?? ICON_LIBRARY_POPOVER_WIDTH;
|
|
6680
|
+
return /* @__PURE__ */ React88.createElement(Stack17, { gap: 1, "aria-label": __38("SVG control", "elementor") }, /* @__PURE__ */ React88.createElement(EnableUnfilteredModal, { open: unfilteredModalOpenState, onClose: handleCloseUnfilteredModal }), showIconLibrary && iconLibraryAnchor ? /* @__PURE__ */ React88.createElement(
|
|
6681
|
+
Popover6,
|
|
5532
6682
|
{
|
|
5533
|
-
|
|
5534
|
-
|
|
5535
|
-
|
|
6683
|
+
disableScrollLock: true,
|
|
6684
|
+
open: iconLibraryPopoverState.isOpen,
|
|
6685
|
+
onClose: handleCloseIconLibrary,
|
|
6686
|
+
anchorReference: "anchorPosition",
|
|
6687
|
+
anchorPosition: { top: iconLibraryAnchor.top, left: iconLibraryAnchor.left },
|
|
6688
|
+
anchorOrigin: { vertical: "top", horizontal: "left" },
|
|
6689
|
+
transformOrigin: { vertical: "top", horizontal: "left" },
|
|
6690
|
+
marginThreshold: 0,
|
|
6691
|
+
PaperProps: {
|
|
6692
|
+
sx: {
|
|
6693
|
+
width: iconLibraryWidth,
|
|
6694
|
+
minWidth: iconLibraryWidth,
|
|
6695
|
+
maxWidth: iconLibraryWidth,
|
|
6696
|
+
m: 0
|
|
5536
6697
|
}
|
|
5537
6698
|
}
|
|
5538
6699
|
},
|
|
5539
|
-
/* @__PURE__ */
|
|
5540
|
-
|
|
5541
|
-
{
|
|
5542
|
-
|
|
5543
|
-
|
|
5544
|
-
|
|
5545
|
-
|
|
5546
|
-
|
|
5547
|
-
|
|
5548
|
-
|
|
5549
|
-
)
|
|
5550
|
-
|
|
6700
|
+
/* @__PURE__ */ React88.createElement(
|
|
6701
|
+
IconLibraryPopover,
|
|
6702
|
+
{
|
|
6703
|
+
open: iconLibraryPopoverState.isOpen,
|
|
6704
|
+
selectedIconClass,
|
|
6705
|
+
selectedIconLibrary,
|
|
6706
|
+
onSelect: handleIconLibrarySelect,
|
|
6707
|
+
onClose: handleCloseIconLibrary,
|
|
6708
|
+
width: iconLibraryWidth
|
|
6709
|
+
}
|
|
6710
|
+
)
|
|
6711
|
+
) : null, /* @__PURE__ */ React88.createElement(
|
|
6712
|
+
Box20,
|
|
6713
|
+
{
|
|
6714
|
+
ref: controlContainerRef,
|
|
6715
|
+
"data-testid": SVG_MEDIA_CONTROL_CONTAINER_TEST_ID,
|
|
6716
|
+
sx: { width: "100%" }
|
|
6717
|
+
},
|
|
6718
|
+
/* @__PURE__ */ React88.createElement(ControlActions, null, /* @__PURE__ */ React88.createElement(StyledCard, { variant: "outlined" }, /* @__PURE__ */ React88.createElement(StyledCardMediaContainer, null, /* @__PURE__ */ React88.createElement(
|
|
6719
|
+
SvgMediaPreview,
|
|
5551
6720
|
{
|
|
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,
|
|
6721
|
+
isFetching,
|
|
6722
|
+
src,
|
|
6723
|
+
iconClassName: selectedIconClass,
|
|
6724
|
+
iconLibrary: selectedIconLibrary
|
|
6725
|
+
}
|
|
6726
|
+
)), /* @__PURE__ */ React88.createElement(
|
|
6727
|
+
CardOverlay2,
|
|
5564
6728
|
{
|
|
5565
|
-
|
|
5566
|
-
|
|
5567
|
-
|
|
5568
|
-
|
|
5569
|
-
|
|
5570
|
-
onClick: () => isAdmin && handleClick(MODE_UPLOAD),
|
|
5571
|
-
"aria-label": "Upload SVG"
|
|
6729
|
+
sx: {
|
|
6730
|
+
"&:hover": {
|
|
6731
|
+
backgroundColor: "rgba( 0, 0, 0, 0.75 )"
|
|
6732
|
+
}
|
|
6733
|
+
}
|
|
5572
6734
|
},
|
|
5573
|
-
|
|
5574
|
-
|
|
5575
|
-
|
|
6735
|
+
/* @__PURE__ */ React88.createElement(
|
|
6736
|
+
SvgMediaOverlay,
|
|
6737
|
+
{
|
|
6738
|
+
isAdmin,
|
|
6739
|
+
showIconLibrary,
|
|
6740
|
+
buttonGroupRef,
|
|
6741
|
+
onSelectSvg: handleSelectSvg,
|
|
6742
|
+
onUpload: handleUpload,
|
|
6743
|
+
onOpenIconLibrary: handleOpenIconLibrary,
|
|
6744
|
+
infotipTitle: __38("Sorry, you can't upload that file yet.", "elementor"),
|
|
6745
|
+
infotipDescription: /* @__PURE__ */ React88.createElement(UnfilteredUploadInfotipDescription, null)
|
|
6746
|
+
}
|
|
6747
|
+
)
|
|
6748
|
+
)))
|
|
6749
|
+
));
|
|
5576
6750
|
});
|
|
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
|
-
}
|
|
6751
|
+
var UnfilteredUploadInfotipDescription = () => /* @__PURE__ */ React88.createElement(React88.Fragment, null, __38("To upload them anyway, ask the site administrator to enable unfiltered", "elementor"), /* @__PURE__ */ React88.createElement("br", null), __38("file uploads.", "elementor"));
|
|
5612
6752
|
|
|
5613
6753
|
// src/controls/video-media-control.tsx
|
|
5614
|
-
import * as
|
|
6754
|
+
import * as React89 from "react";
|
|
5615
6755
|
import { urlPropTypeUtil as urlPropTypeUtil5, videoSrcPropTypeUtil } from "@elementor/editor-props";
|
|
5616
6756
|
import { UploadIcon as UploadIcon3 } from "@elementor/icons";
|
|
5617
|
-
import { Button as Button6, Card as Card3, CardMedia as CardMedia3, CardOverlay as CardOverlay3, CircularProgress as
|
|
6757
|
+
import { Button as Button6, Card as Card3, CardMedia as CardMedia3, CardOverlay as CardOverlay3, CircularProgress as CircularProgress5, Stack as Stack18 } from "@elementor/ui";
|
|
5618
6758
|
import { useWpMediaAttachment as useWpMediaAttachment3, useWpMediaFrame as useWpMediaFrame3 } from "@elementor/wp-media";
|
|
5619
|
-
import { __ as
|
|
6759
|
+
import { __ as __39 } from "@wordpress/i18n";
|
|
5620
6760
|
var PLACEHOLDER_IMAGE = window.elementorCommon?.config?.urls?.assets + "/shapes/play-triangle.svg";
|
|
5621
6761
|
var VideoMediaControl = createControl(() => {
|
|
5622
6762
|
const { value, setValue, propType } = useBoundProp(videoSrcPropTypeUtil);
|
|
@@ -5646,7 +6786,7 @@ var VideoMediaControl = createControl(() => {
|
|
|
5646
6786
|
});
|
|
5647
6787
|
}
|
|
5648
6788
|
});
|
|
5649
|
-
return /* @__PURE__ */
|
|
6789
|
+
return /* @__PURE__ */ React89.createElement(ControlActions, null, /* @__PURE__ */ React89.createElement(Card3, { variant: "outlined" }, /* @__PURE__ */ React89.createElement(
|
|
5650
6790
|
CardMedia3,
|
|
5651
6791
|
{
|
|
5652
6792
|
sx: {
|
|
@@ -5661,8 +6801,8 @@ var VideoMediaControl = createControl(() => {
|
|
|
5661
6801
|
alignItems: "center"
|
|
5662
6802
|
}
|
|
5663
6803
|
},
|
|
5664
|
-
/* @__PURE__ */
|
|
5665
|
-
), /* @__PURE__ */
|
|
6804
|
+
/* @__PURE__ */ React89.createElement(VideoPreview, { isFetching, videoUrl })
|
|
6805
|
+
), /* @__PURE__ */ React89.createElement(CardOverlay3, null, /* @__PURE__ */ React89.createElement(Stack18, { gap: 1 }, /* @__PURE__ */ React89.createElement(
|
|
5666
6806
|
Button6,
|
|
5667
6807
|
{
|
|
5668
6808
|
size: "tiny",
|
|
@@ -5670,18 +6810,18 @@ var VideoMediaControl = createControl(() => {
|
|
|
5670
6810
|
variant: "outlined",
|
|
5671
6811
|
onClick: () => open({ mode: "browse" })
|
|
5672
6812
|
},
|
|
5673
|
-
|
|
5674
|
-
), /* @__PURE__ */
|
|
6813
|
+
__39("Select video", "elementor")
|
|
6814
|
+
), /* @__PURE__ */ React89.createElement(
|
|
5675
6815
|
Button6,
|
|
5676
6816
|
{
|
|
5677
6817
|
size: "tiny",
|
|
5678
6818
|
variant: "text",
|
|
5679
6819
|
color: "inherit",
|
|
5680
|
-
startIcon: /* @__PURE__ */
|
|
6820
|
+
startIcon: /* @__PURE__ */ React89.createElement(UploadIcon3, null),
|
|
5681
6821
|
onClick: () => open({ mode: "upload" })
|
|
5682
6822
|
},
|
|
5683
|
-
|
|
5684
|
-
), /* @__PURE__ */
|
|
6823
|
+
__39("Upload", "elementor")
|
|
6824
|
+
), /* @__PURE__ */ React89.createElement(
|
|
5685
6825
|
Button6,
|
|
5686
6826
|
{
|
|
5687
6827
|
size: "tiny",
|
|
@@ -5689,18 +6829,18 @@ var VideoMediaControl = createControl(() => {
|
|
|
5689
6829
|
color: "inherit",
|
|
5690
6830
|
onClick: () => open({ mode: "url", currentUrl: currentUrlForModal })
|
|
5691
6831
|
},
|
|
5692
|
-
|
|
6832
|
+
__39("Insert from URL", "elementor")
|
|
5693
6833
|
)))));
|
|
5694
6834
|
});
|
|
5695
6835
|
var VideoPreview = ({ isFetching = false, videoUrl }) => {
|
|
5696
6836
|
if (isFetching) {
|
|
5697
|
-
return /* @__PURE__ */
|
|
6837
|
+
return /* @__PURE__ */ React89.createElement(CircularProgress5, null);
|
|
5698
6838
|
}
|
|
5699
6839
|
if (videoUrl) {
|
|
5700
|
-
return /* @__PURE__ */
|
|
6840
|
+
return /* @__PURE__ */ React89.createElement(
|
|
5701
6841
|
"video",
|
|
5702
6842
|
{
|
|
5703
|
-
"aria-label":
|
|
6843
|
+
"aria-label": __39("Video preview", "elementor"),
|
|
5704
6844
|
src: videoUrl,
|
|
5705
6845
|
muted: true,
|
|
5706
6846
|
preload: "metadata",
|
|
@@ -5713,33 +6853,33 @@ var VideoPreview = ({ isFetching = false, videoUrl }) => {
|
|
|
5713
6853
|
}
|
|
5714
6854
|
);
|
|
5715
6855
|
}
|
|
5716
|
-
return /* @__PURE__ */
|
|
6856
|
+
return /* @__PURE__ */ React89.createElement("img", { src: PLACEHOLDER_IMAGE, alt: "No video selected" });
|
|
5717
6857
|
};
|
|
5718
6858
|
|
|
5719
6859
|
// src/controls/background-control/background-control.tsx
|
|
5720
|
-
import * as
|
|
6860
|
+
import * as React96 from "react";
|
|
5721
6861
|
import { backgroundPropTypeUtil } from "@elementor/editor-props";
|
|
5722
6862
|
import { Grid as Grid18 } from "@elementor/ui";
|
|
5723
|
-
import { __ as
|
|
6863
|
+
import { __ as __45 } from "@wordpress/i18n";
|
|
5724
6864
|
|
|
5725
6865
|
// src/controls/background-control/background-overlay/background-overlay-repeater-control.tsx
|
|
5726
|
-
import * as
|
|
6866
|
+
import * as React95 from "react";
|
|
5727
6867
|
import {
|
|
5728
6868
|
backgroundColorOverlayPropTypeUtil as backgroundColorOverlayPropTypeUtil2,
|
|
5729
6869
|
backgroundImageOverlayPropTypeUtil as backgroundImageOverlayPropTypeUtil2,
|
|
5730
6870
|
backgroundOverlayPropTypeUtil,
|
|
5731
6871
|
colorPropTypeUtil as colorPropTypeUtil3
|
|
5732
6872
|
} from "@elementor/editor-props";
|
|
5733
|
-
import { Box as
|
|
6873
|
+
import { Box as Box21, CardMedia as CardMedia4, styled as styled12, Tab, TabPanel, Tabs, UnstableColorIndicator as UnstableColorIndicator3 } from "@elementor/ui";
|
|
5734
6874
|
import { useWpMediaAttachment as useWpMediaAttachment4 } from "@elementor/wp-media";
|
|
5735
|
-
import { __ as
|
|
6875
|
+
import { __ as __44 } from "@wordpress/i18n";
|
|
5736
6876
|
|
|
5737
6877
|
// src/env.ts
|
|
5738
6878
|
import { parseEnv } from "@elementor/env";
|
|
5739
6879
|
var { env } = parseEnv("@elementor/editor-controls");
|
|
5740
6880
|
|
|
5741
6881
|
// src/controls/background-control/background-gradient-color-control.tsx
|
|
5742
|
-
import * as
|
|
6882
|
+
import * as React90 from "react";
|
|
5743
6883
|
import {
|
|
5744
6884
|
backgroundGradientOverlayPropTypeUtil,
|
|
5745
6885
|
colorPropTypeUtil as colorPropTypeUtil2,
|
|
@@ -5786,7 +6926,7 @@ var BackgroundGradientColorControl = createControl(() => {
|
|
|
5786
6926
|
positions: positions?.value.split(" ")
|
|
5787
6927
|
};
|
|
5788
6928
|
};
|
|
5789
|
-
return /* @__PURE__ */
|
|
6929
|
+
return /* @__PURE__ */ React90.createElement(
|
|
5790
6930
|
UnstableGradientBox,
|
|
5791
6931
|
{
|
|
5792
6932
|
sx: { width: "auto", padding: 1.5 },
|
|
@@ -5811,53 +6951,53 @@ var initialBackgroundGradientOverlay = backgroundGradientOverlayPropTypeUtil.cre
|
|
|
5811
6951
|
});
|
|
5812
6952
|
|
|
5813
6953
|
// src/controls/background-control/background-overlay/background-image-overlay/background-image-overlay-attachment.tsx
|
|
5814
|
-
import * as
|
|
6954
|
+
import * as React91 from "react";
|
|
5815
6955
|
import { PinIcon, PinnedOffIcon } from "@elementor/icons";
|
|
5816
6956
|
import { Grid as Grid14 } from "@elementor/ui";
|
|
5817
|
-
import { __ as
|
|
6957
|
+
import { __ as __40 } from "@wordpress/i18n";
|
|
5818
6958
|
var attachmentControlOptions = [
|
|
5819
6959
|
{
|
|
5820
6960
|
value: "fixed",
|
|
5821
|
-
label:
|
|
5822
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
6961
|
+
label: __40("Fixed", "elementor"),
|
|
6962
|
+
renderContent: ({ size }) => /* @__PURE__ */ React91.createElement(PinIcon, { fontSize: size }),
|
|
5823
6963
|
showTooltip: true
|
|
5824
6964
|
},
|
|
5825
6965
|
{
|
|
5826
6966
|
value: "scroll",
|
|
5827
|
-
label:
|
|
5828
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
6967
|
+
label: __40("Scroll", "elementor"),
|
|
6968
|
+
renderContent: ({ size }) => /* @__PURE__ */ React91.createElement(PinnedOffIcon, { fontSize: size }),
|
|
5829
6969
|
showTooltip: true
|
|
5830
6970
|
}
|
|
5831
6971
|
];
|
|
5832
6972
|
var BackgroundImageOverlayAttachment = () => {
|
|
5833
|
-
return /* @__PURE__ */
|
|
6973
|
+
return /* @__PURE__ */ React91.createElement(PopoverGridContainer, null, /* @__PURE__ */ React91.createElement(Grid14, { item: true, xs: 6 }, /* @__PURE__ */ React91.createElement(ControlFormLabel, null, __40("Attachment", "elementor"))), /* @__PURE__ */ React91.createElement(Grid14, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end", overflow: "hidden" } }, /* @__PURE__ */ React91.createElement(ToggleControl, { options: attachmentControlOptions })));
|
|
5834
6974
|
};
|
|
5835
6975
|
|
|
5836
6976
|
// src/controls/background-control/background-overlay/background-image-overlay/background-image-overlay-position.tsx
|
|
5837
|
-
import * as
|
|
5838
|
-
import { useRef as
|
|
6977
|
+
import * as React92 from "react";
|
|
6978
|
+
import { useRef as useRef17 } from "react";
|
|
5839
6979
|
import { backgroundImagePositionOffsetPropTypeUtil, stringPropTypeUtil as stringPropTypeUtil16 } from "@elementor/editor-props";
|
|
5840
6980
|
import { MenuListItem as MenuListItem6 } from "@elementor/editor-ui";
|
|
5841
6981
|
import { LetterXIcon, LetterYIcon } from "@elementor/icons";
|
|
5842
6982
|
import { Grid as Grid15, Select as Select4 } from "@elementor/ui";
|
|
5843
|
-
import { __ as
|
|
6983
|
+
import { __ as __41 } from "@wordpress/i18n";
|
|
5844
6984
|
var backgroundPositionOptions = [
|
|
5845
|
-
{ label:
|
|
5846
|
-
{ label:
|
|
5847
|
-
{ label:
|
|
5848
|
-
{ label:
|
|
5849
|
-
{ label:
|
|
5850
|
-
{ label:
|
|
5851
|
-
{ label:
|
|
5852
|
-
{ label:
|
|
5853
|
-
{ label:
|
|
5854
|
-
{ label:
|
|
6985
|
+
{ label: __41("Center center", "elementor"), value: "center center" },
|
|
6986
|
+
{ label: __41("Center left", "elementor"), value: "center left" },
|
|
6987
|
+
{ label: __41("Center right", "elementor"), value: "center right" },
|
|
6988
|
+
{ label: __41("Top center", "elementor"), value: "top center" },
|
|
6989
|
+
{ label: __41("Top left", "elementor"), value: "top left" },
|
|
6990
|
+
{ label: __41("Top right", "elementor"), value: "top right" },
|
|
6991
|
+
{ label: __41("Bottom center", "elementor"), value: "bottom center" },
|
|
6992
|
+
{ label: __41("Bottom left", "elementor"), value: "bottom left" },
|
|
6993
|
+
{ label: __41("Bottom right", "elementor"), value: "bottom right" },
|
|
6994
|
+
{ label: __41("Custom", "elementor"), value: "custom" }
|
|
5855
6995
|
];
|
|
5856
6996
|
var BackgroundImageOverlayPosition = () => {
|
|
5857
6997
|
const backgroundImageOffsetContext = useBoundProp(backgroundImagePositionOffsetPropTypeUtil);
|
|
5858
6998
|
const stringPropContext = useBoundProp(stringPropTypeUtil16);
|
|
5859
6999
|
const isCustom = !!backgroundImageOffsetContext.value;
|
|
5860
|
-
const rowRef =
|
|
7000
|
+
const rowRef = useRef17(null);
|
|
5861
7001
|
const handlePositionChange = (event) => {
|
|
5862
7002
|
const value = event.target.value || null;
|
|
5863
7003
|
if (value === "custom") {
|
|
@@ -5866,7 +7006,7 @@ var BackgroundImageOverlayPosition = () => {
|
|
|
5866
7006
|
stringPropContext.setValue(value);
|
|
5867
7007
|
}
|
|
5868
7008
|
};
|
|
5869
|
-
return /* @__PURE__ */
|
|
7009
|
+
return /* @__PURE__ */ React92.createElement(Grid15, { container: true, spacing: 1.5 }, /* @__PURE__ */ React92.createElement(Grid15, { item: true, xs: 12 }, /* @__PURE__ */ React92.createElement(PopoverGridContainer, null, /* @__PURE__ */ React92.createElement(Grid15, { item: true, xs: 6 }, /* @__PURE__ */ React92.createElement(ControlFormLabel, null, __41("Position", "elementor"))), /* @__PURE__ */ React92.createElement(Grid15, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end", overflow: "hidden" } }, /* @__PURE__ */ React92.createElement(ControlActions, null, /* @__PURE__ */ React92.createElement(
|
|
5870
7010
|
Select4,
|
|
5871
7011
|
{
|
|
5872
7012
|
fullWidth: true,
|
|
@@ -5875,18 +7015,18 @@ var BackgroundImageOverlayPosition = () => {
|
|
|
5875
7015
|
disabled: stringPropContext.disabled,
|
|
5876
7016
|
value: (backgroundImageOffsetContext.value ? "custom" : stringPropContext.value) ?? ""
|
|
5877
7017
|
},
|
|
5878
|
-
backgroundPositionOptions.map(({ label, value }) => /* @__PURE__ */
|
|
5879
|
-
))))), isCustom ? /* @__PURE__ */
|
|
7018
|
+
backgroundPositionOptions.map(({ label, value }) => /* @__PURE__ */ React92.createElement(MenuListItem6, { key: value, value: value ?? "" }, label))
|
|
7019
|
+
))))), isCustom ? /* @__PURE__ */ React92.createElement(PropProvider, { ...backgroundImageOffsetContext }, /* @__PURE__ */ React92.createElement(Grid15, { item: true, xs: 12 }, /* @__PURE__ */ React92.createElement(Grid15, { container: true, spacing: 1.5, ref: rowRef }, /* @__PURE__ */ React92.createElement(Grid15, { item: true, xs: 6 }, /* @__PURE__ */ React92.createElement(PropKeyProvider, { bind: "x" }, /* @__PURE__ */ React92.createElement(
|
|
5880
7020
|
SizeControl,
|
|
5881
7021
|
{
|
|
5882
|
-
startIcon: /* @__PURE__ */
|
|
7022
|
+
startIcon: /* @__PURE__ */ React92.createElement(LetterXIcon, { fontSize: "tiny" }),
|
|
5883
7023
|
anchorRef: rowRef,
|
|
5884
7024
|
min: -Number.MAX_SAFE_INTEGER
|
|
5885
7025
|
}
|
|
5886
|
-
))), /* @__PURE__ */
|
|
7026
|
+
))), /* @__PURE__ */ React92.createElement(Grid15, { item: true, xs: 6 }, /* @__PURE__ */ React92.createElement(PropKeyProvider, { bind: "y" }, /* @__PURE__ */ React92.createElement(
|
|
5887
7027
|
SizeControl,
|
|
5888
7028
|
{
|
|
5889
|
-
startIcon: /* @__PURE__ */
|
|
7029
|
+
startIcon: /* @__PURE__ */ React92.createElement(LetterYIcon, { fontSize: "tiny" }),
|
|
5890
7030
|
anchorRef: rowRef,
|
|
5891
7031
|
min: -Number.MAX_SAFE_INTEGER
|
|
5892
7032
|
}
|
|
@@ -5894,43 +7034,43 @@ var BackgroundImageOverlayPosition = () => {
|
|
|
5894
7034
|
};
|
|
5895
7035
|
|
|
5896
7036
|
// src/controls/background-control/background-overlay/background-image-overlay/background-image-overlay-repeat.tsx
|
|
5897
|
-
import * as
|
|
7037
|
+
import * as React93 from "react";
|
|
5898
7038
|
import { DotsHorizontalIcon, DotsVerticalIcon, GridDotsIcon, XIcon as XIcon3 } from "@elementor/icons";
|
|
5899
7039
|
import { Grid as Grid16 } from "@elementor/ui";
|
|
5900
|
-
import { __ as
|
|
7040
|
+
import { __ as __42 } from "@wordpress/i18n";
|
|
5901
7041
|
var repeatControlOptions = [
|
|
5902
7042
|
{
|
|
5903
7043
|
value: "repeat",
|
|
5904
|
-
label:
|
|
5905
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
7044
|
+
label: __42("Repeat", "elementor"),
|
|
7045
|
+
renderContent: ({ size }) => /* @__PURE__ */ React93.createElement(GridDotsIcon, { fontSize: size }),
|
|
5906
7046
|
showTooltip: true
|
|
5907
7047
|
},
|
|
5908
7048
|
{
|
|
5909
7049
|
value: "repeat-x",
|
|
5910
|
-
label:
|
|
5911
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
7050
|
+
label: __42("Repeat-x", "elementor"),
|
|
7051
|
+
renderContent: ({ size }) => /* @__PURE__ */ React93.createElement(DotsHorizontalIcon, { fontSize: size }),
|
|
5912
7052
|
showTooltip: true
|
|
5913
7053
|
},
|
|
5914
7054
|
{
|
|
5915
7055
|
value: "repeat-y",
|
|
5916
|
-
label:
|
|
5917
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
7056
|
+
label: __42("Repeat-y", "elementor"),
|
|
7057
|
+
renderContent: ({ size }) => /* @__PURE__ */ React93.createElement(DotsVerticalIcon, { fontSize: size }),
|
|
5918
7058
|
showTooltip: true
|
|
5919
7059
|
},
|
|
5920
7060
|
{
|
|
5921
7061
|
value: "no-repeat",
|
|
5922
|
-
label:
|
|
5923
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
7062
|
+
label: __42("No-repeat", "elementor"),
|
|
7063
|
+
renderContent: ({ size }) => /* @__PURE__ */ React93.createElement(XIcon3, { fontSize: size }),
|
|
5924
7064
|
showTooltip: true
|
|
5925
7065
|
}
|
|
5926
7066
|
];
|
|
5927
7067
|
var BackgroundImageOverlayRepeat = () => {
|
|
5928
|
-
return /* @__PURE__ */
|
|
7068
|
+
return /* @__PURE__ */ React93.createElement(PopoverGridContainer, null, /* @__PURE__ */ React93.createElement(Grid16, { item: true, xs: 6 }, /* @__PURE__ */ React93.createElement(ControlFormLabel, null, __42("Repeat", "elementor"))), /* @__PURE__ */ React93.createElement(Grid16, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React93.createElement(ToggleControl, { options: repeatControlOptions })));
|
|
5929
7069
|
};
|
|
5930
7070
|
|
|
5931
7071
|
// src/controls/background-control/background-overlay/background-image-overlay/background-image-overlay-size.tsx
|
|
5932
|
-
import * as
|
|
5933
|
-
import { useRef as
|
|
7072
|
+
import * as React94 from "react";
|
|
7073
|
+
import { useRef as useRef18 } from "react";
|
|
5934
7074
|
import { backgroundImageSizeScalePropTypeUtil, stringPropTypeUtil as stringPropTypeUtil17 } from "@elementor/editor-props";
|
|
5935
7075
|
import {
|
|
5936
7076
|
ArrowBarBothIcon,
|
|
@@ -5941,30 +7081,30 @@ import {
|
|
|
5941
7081
|
PencilIcon
|
|
5942
7082
|
} from "@elementor/icons";
|
|
5943
7083
|
import { Grid as Grid17 } from "@elementor/ui";
|
|
5944
|
-
import { __ as
|
|
7084
|
+
import { __ as __43 } from "@wordpress/i18n";
|
|
5945
7085
|
var sizeControlOptions = [
|
|
5946
7086
|
{
|
|
5947
7087
|
value: "auto",
|
|
5948
|
-
label:
|
|
5949
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
7088
|
+
label: __43("Auto", "elementor"),
|
|
7089
|
+
renderContent: ({ size }) => /* @__PURE__ */ React94.createElement(LetterAIcon, { fontSize: size }),
|
|
5950
7090
|
showTooltip: true
|
|
5951
7091
|
},
|
|
5952
7092
|
{
|
|
5953
7093
|
value: "cover",
|
|
5954
|
-
label:
|
|
5955
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
7094
|
+
label: __43("Cover", "elementor"),
|
|
7095
|
+
renderContent: ({ size }) => /* @__PURE__ */ React94.createElement(ArrowsMaximizeIcon, { fontSize: size }),
|
|
5956
7096
|
showTooltip: true
|
|
5957
7097
|
},
|
|
5958
7098
|
{
|
|
5959
7099
|
value: "contain",
|
|
5960
|
-
label:
|
|
5961
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
7100
|
+
label: __43("Contain", "elementor"),
|
|
7101
|
+
renderContent: ({ size }) => /* @__PURE__ */ React94.createElement(ArrowBarBothIcon, { fontSize: size }),
|
|
5962
7102
|
showTooltip: true
|
|
5963
7103
|
},
|
|
5964
7104
|
{
|
|
5965
7105
|
value: "custom",
|
|
5966
|
-
label:
|
|
5967
|
-
renderContent: ({ size }) => /* @__PURE__ */
|
|
7106
|
+
label: __43("Custom", "elementor"),
|
|
7107
|
+
renderContent: ({ size }) => /* @__PURE__ */ React94.createElement(PencilIcon, { fontSize: size }),
|
|
5968
7108
|
showTooltip: true
|
|
5969
7109
|
}
|
|
5970
7110
|
];
|
|
@@ -5972,7 +7112,7 @@ var BackgroundImageOverlaySize = () => {
|
|
|
5972
7112
|
const backgroundImageScaleContext = useBoundProp(backgroundImageSizeScalePropTypeUtil);
|
|
5973
7113
|
const stringPropContext = useBoundProp(stringPropTypeUtil17);
|
|
5974
7114
|
const isCustom = !!backgroundImageScaleContext.value;
|
|
5975
|
-
const rowRef =
|
|
7115
|
+
const rowRef = useRef18(null);
|
|
5976
7116
|
const handleSizeChange = (size) => {
|
|
5977
7117
|
if (size === "custom") {
|
|
5978
7118
|
backgroundImageScaleContext.setValue({ width: null, height: null });
|
|
@@ -5980,7 +7120,7 @@ var BackgroundImageOverlaySize = () => {
|
|
|
5980
7120
|
stringPropContext.setValue(size);
|
|
5981
7121
|
}
|
|
5982
7122
|
};
|
|
5983
|
-
return /* @__PURE__ */
|
|
7123
|
+
return /* @__PURE__ */ React94.createElement(Grid17, { container: true, spacing: 1.5 }, /* @__PURE__ */ React94.createElement(Grid17, { item: true, xs: 12 }, /* @__PURE__ */ React94.createElement(PopoverGridContainer, null, /* @__PURE__ */ React94.createElement(Grid17, { item: true, xs: 6 }, /* @__PURE__ */ React94.createElement(ControlFormLabel, null, __43("Size", "elementor"))), /* @__PURE__ */ React94.createElement(Grid17, { item: true, xs: 6, sx: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React94.createElement(
|
|
5984
7124
|
ControlToggleButtonGroup,
|
|
5985
7125
|
{
|
|
5986
7126
|
exclusive: true,
|
|
@@ -5989,17 +7129,17 @@ var BackgroundImageOverlaySize = () => {
|
|
|
5989
7129
|
disabled: stringPropContext.disabled,
|
|
5990
7130
|
value: backgroundImageScaleContext.value ? "custom" : stringPropContext.value
|
|
5991
7131
|
}
|
|
5992
|
-
)))), isCustom ? /* @__PURE__ */
|
|
7132
|
+
)))), isCustom ? /* @__PURE__ */ React94.createElement(PropProvider, { ...backgroundImageScaleContext }, /* @__PURE__ */ React94.createElement(Grid17, { item: true, xs: 12, ref: rowRef }, /* @__PURE__ */ React94.createElement(PopoverGridContainer, null, /* @__PURE__ */ React94.createElement(Grid17, { item: true, xs: 6 }, /* @__PURE__ */ React94.createElement(PropKeyProvider, { bind: "width" }, /* @__PURE__ */ React94.createElement(
|
|
5993
7133
|
SizeControl,
|
|
5994
7134
|
{
|
|
5995
|
-
startIcon: /* @__PURE__ */
|
|
7135
|
+
startIcon: /* @__PURE__ */ React94.createElement(ArrowsMoveHorizontalIcon2, { fontSize: "tiny" }),
|
|
5996
7136
|
extendedOptions: ["auto"],
|
|
5997
7137
|
anchorRef: rowRef
|
|
5998
7138
|
}
|
|
5999
|
-
))), /* @__PURE__ */
|
|
7139
|
+
))), /* @__PURE__ */ React94.createElement(Grid17, { item: true, xs: 6 }, /* @__PURE__ */ React94.createElement(PropKeyProvider, { bind: "height" }, /* @__PURE__ */ React94.createElement(
|
|
6000
7140
|
SizeControl,
|
|
6001
7141
|
{
|
|
6002
|
-
startIcon: /* @__PURE__ */
|
|
7142
|
+
startIcon: /* @__PURE__ */ React94.createElement(ArrowsMoveVerticalIcon2, { fontSize: "tiny" }),
|
|
6003
7143
|
extendedOptions: ["auto"],
|
|
6004
7144
|
anchorRef: rowRef
|
|
6005
7145
|
}
|
|
@@ -6007,7 +7147,7 @@ var BackgroundImageOverlaySize = () => {
|
|
|
6007
7147
|
};
|
|
6008
7148
|
|
|
6009
7149
|
// src/controls/background-control/background-overlay/use-background-tabs-history.ts
|
|
6010
|
-
import { useRef as
|
|
7150
|
+
import { useRef as useRef19 } from "react";
|
|
6011
7151
|
import {
|
|
6012
7152
|
backgroundColorOverlayPropTypeUtil,
|
|
6013
7153
|
backgroundGradientOverlayPropTypeUtil as backgroundGradientOverlayPropTypeUtil2,
|
|
@@ -6032,7 +7172,7 @@ var useBackgroundTabsHistory = ({
|
|
|
6032
7172
|
return "image";
|
|
6033
7173
|
};
|
|
6034
7174
|
const { getTabsProps, getTabProps, getTabPanelProps } = useTabs(getCurrentOverlayType());
|
|
6035
|
-
const valuesHistory =
|
|
7175
|
+
const valuesHistory = useRef19({
|
|
6036
7176
|
image: initialBackgroundImageOverlay,
|
|
6037
7177
|
color: initialBackgroundColorOverlay2,
|
|
6038
7178
|
gradient: initialBackgroundGradientOverlay2
|
|
@@ -6100,29 +7240,29 @@ var getInitialBackgroundOverlay = () => ({
|
|
|
6100
7240
|
}
|
|
6101
7241
|
});
|
|
6102
7242
|
var backgroundResolutionOptions = [
|
|
6103
|
-
{ label:
|
|
6104
|
-
{ label:
|
|
6105
|
-
{ label:
|
|
6106
|
-
{ label:
|
|
7243
|
+
{ label: __44("Thumbnail - 150 x 150", "elementor"), value: "thumbnail" },
|
|
7244
|
+
{ label: __44("Medium - 300 x 300", "elementor"), value: "medium" },
|
|
7245
|
+
{ label: __44("Large 1024 x 1024", "elementor"), value: "large" },
|
|
7246
|
+
{ label: __44("Full", "elementor"), value: "full" }
|
|
6107
7247
|
];
|
|
6108
7248
|
var BackgroundOverlayRepeaterControl = createControl(() => {
|
|
6109
7249
|
const { propType, value: overlayValues, setValue } = useBoundProp(backgroundOverlayPropTypeUtil);
|
|
6110
|
-
return /* @__PURE__ */
|
|
7250
|
+
return /* @__PURE__ */ React95.createElement(PropProvider, { propType, value: overlayValues, setValue }, /* @__PURE__ */ React95.createElement(
|
|
6111
7251
|
ControlRepeater,
|
|
6112
7252
|
{
|
|
6113
7253
|
initial: getInitialBackgroundOverlay(),
|
|
6114
7254
|
propTypeUtil: backgroundOverlayPropTypeUtil
|
|
6115
7255
|
},
|
|
6116
|
-
/* @__PURE__ */
|
|
6117
|
-
/* @__PURE__ */
|
|
7256
|
+
/* @__PURE__ */ React95.createElement(RepeaterHeader, { label: __44("Overlay", "elementor") }, /* @__PURE__ */ React95.createElement(TooltipAddItemAction, { newItemIndex: 0 })),
|
|
7257
|
+
/* @__PURE__ */ React95.createElement(ItemsContainer, null, /* @__PURE__ */ React95.createElement(
|
|
6118
7258
|
Item,
|
|
6119
7259
|
{
|
|
6120
7260
|
Icon: ItemIcon2,
|
|
6121
7261
|
Label: ItemLabel3,
|
|
6122
|
-
actions: /* @__PURE__ */
|
|
7262
|
+
actions: /* @__PURE__ */ React95.createElement(React95.Fragment, null, /* @__PURE__ */ React95.createElement(DuplicateItemAction, null), /* @__PURE__ */ React95.createElement(DisableItemAction, null), /* @__PURE__ */ React95.createElement(RemoveItemAction, null))
|
|
6123
7263
|
}
|
|
6124
7264
|
)),
|
|
6125
|
-
/* @__PURE__ */
|
|
7265
|
+
/* @__PURE__ */ React95.createElement(EditItemPopover, null, /* @__PURE__ */ React95.createElement(ItemContent2, null))
|
|
6126
7266
|
));
|
|
6127
7267
|
});
|
|
6128
7268
|
var ItemContent2 = () => {
|
|
@@ -6132,27 +7272,27 @@ var ItemContent2 = () => {
|
|
|
6132
7272
|
gradient: initialBackgroundGradientOverlay.value
|
|
6133
7273
|
});
|
|
6134
7274
|
const { rowRef } = useRepeaterContext();
|
|
6135
|
-
return /* @__PURE__ */
|
|
7275
|
+
return /* @__PURE__ */ React95.createElement(Box21, { sx: { width: "100%" } }, /* @__PURE__ */ React95.createElement(Box21, { sx: { borderBottom: 1, borderColor: "divider" } }, /* @__PURE__ */ React95.createElement(
|
|
6136
7276
|
Tabs,
|
|
6137
7277
|
{
|
|
6138
7278
|
size: "small",
|
|
6139
7279
|
variant: "fullWidth",
|
|
6140
7280
|
...getTabsProps(),
|
|
6141
|
-
"aria-label":
|
|
7281
|
+
"aria-label": __44("Background Overlay", "elementor")
|
|
6142
7282
|
},
|
|
6143
|
-
/* @__PURE__ */
|
|
6144
|
-
/* @__PURE__ */
|
|
6145
|
-
/* @__PURE__ */
|
|
6146
|
-
)), /* @__PURE__ */
|
|
7283
|
+
/* @__PURE__ */ React95.createElement(Tab, { label: __44("Image", "elementor"), ...getTabProps("image") }),
|
|
7284
|
+
/* @__PURE__ */ React95.createElement(Tab, { label: __44("Gradient", "elementor"), ...getTabProps("gradient") }),
|
|
7285
|
+
/* @__PURE__ */ React95.createElement(Tab, { label: __44("Color", "elementor"), ...getTabProps("color") })
|
|
7286
|
+
)), /* @__PURE__ */ React95.createElement(TabPanel, { sx: { p: 1.5 }, ...getTabPanelProps("image") }, /* @__PURE__ */ React95.createElement(PopoverContent, null, /* @__PURE__ */ React95.createElement(ImageOverlayContent, null))), /* @__PURE__ */ React95.createElement(TabPanel, { sx: { p: 1.5 }, ...getTabPanelProps("gradient") }, /* @__PURE__ */ React95.createElement(BackgroundGradientColorControl, null)), /* @__PURE__ */ React95.createElement(TabPanel, { sx: { p: 1.5 }, ...getTabPanelProps("color") }, /* @__PURE__ */ React95.createElement(PopoverContent, null, /* @__PURE__ */ React95.createElement(ColorOverlayContent, { anchorEl: rowRef }))));
|
|
6147
7287
|
};
|
|
6148
7288
|
var ItemIcon2 = ({ value }) => {
|
|
6149
7289
|
switch (value.$$type) {
|
|
6150
7290
|
case "background-image-overlay":
|
|
6151
|
-
return /* @__PURE__ */
|
|
7291
|
+
return /* @__PURE__ */ React95.createElement(ItemIconImage, { value });
|
|
6152
7292
|
case "background-color-overlay":
|
|
6153
|
-
return /* @__PURE__ */
|
|
7293
|
+
return /* @__PURE__ */ React95.createElement(ItemIconColor, { value });
|
|
6154
7294
|
case "background-gradient-overlay":
|
|
6155
|
-
return /* @__PURE__ */
|
|
7295
|
+
return /* @__PURE__ */ React95.createElement(ItemIconGradient, { value });
|
|
6156
7296
|
default:
|
|
6157
7297
|
return null;
|
|
6158
7298
|
}
|
|
@@ -6165,11 +7305,11 @@ var extractColorFrom = (prop) => {
|
|
|
6165
7305
|
};
|
|
6166
7306
|
var ItemIconColor = ({ value: prop }) => {
|
|
6167
7307
|
const color = extractColorFrom(prop);
|
|
6168
|
-
return /* @__PURE__ */
|
|
7308
|
+
return /* @__PURE__ */ React95.createElement(StyledUnstableColorIndicator3, { size: "inherit", component: "span", value: color });
|
|
6169
7309
|
};
|
|
6170
7310
|
var ItemIconImage = ({ value }) => {
|
|
6171
7311
|
const { imageUrl } = useImage(value);
|
|
6172
|
-
return /* @__PURE__ */
|
|
7312
|
+
return /* @__PURE__ */ React95.createElement(
|
|
6173
7313
|
CardMedia4,
|
|
6174
7314
|
{
|
|
6175
7315
|
image: imageUrl,
|
|
@@ -6184,43 +7324,43 @@ var ItemIconImage = ({ value }) => {
|
|
|
6184
7324
|
};
|
|
6185
7325
|
var ItemIconGradient = ({ value }) => {
|
|
6186
7326
|
const gradient = getGradientValue(value);
|
|
6187
|
-
return /* @__PURE__ */
|
|
7327
|
+
return /* @__PURE__ */ React95.createElement(StyledUnstableColorIndicator3, { size: "inherit", component: "span", value: gradient });
|
|
6188
7328
|
};
|
|
6189
7329
|
var ItemLabel3 = ({ value }) => {
|
|
6190
7330
|
switch (value.$$type) {
|
|
6191
7331
|
case "background-image-overlay":
|
|
6192
|
-
return /* @__PURE__ */
|
|
7332
|
+
return /* @__PURE__ */ React95.createElement(ItemLabelImage, { value });
|
|
6193
7333
|
case "background-color-overlay":
|
|
6194
|
-
return /* @__PURE__ */
|
|
7334
|
+
return /* @__PURE__ */ React95.createElement(ItemLabelColor, { value });
|
|
6195
7335
|
case "background-gradient-overlay":
|
|
6196
|
-
return /* @__PURE__ */
|
|
7336
|
+
return /* @__PURE__ */ React95.createElement(ItemLabelGradient, { value });
|
|
6197
7337
|
default:
|
|
6198
7338
|
return null;
|
|
6199
7339
|
}
|
|
6200
7340
|
};
|
|
6201
7341
|
var ItemLabelColor = ({ value: prop }) => {
|
|
6202
7342
|
const color = extractColorFrom(prop);
|
|
6203
|
-
return /* @__PURE__ */
|
|
7343
|
+
return /* @__PURE__ */ React95.createElement("span", null, color);
|
|
6204
7344
|
};
|
|
6205
7345
|
var ItemLabelImage = ({ value }) => {
|
|
6206
7346
|
const { imageTitle } = useImage(value);
|
|
6207
|
-
return /* @__PURE__ */
|
|
7347
|
+
return /* @__PURE__ */ React95.createElement("span", null, imageTitle);
|
|
6208
7348
|
};
|
|
6209
7349
|
var ItemLabelGradient = ({ value }) => {
|
|
6210
7350
|
if (value.value.type.value === "linear") {
|
|
6211
|
-
return /* @__PURE__ */
|
|
7351
|
+
return /* @__PURE__ */ React95.createElement("span", null, __44("Linear Gradient", "elementor"));
|
|
6212
7352
|
}
|
|
6213
|
-
return /* @__PURE__ */
|
|
7353
|
+
return /* @__PURE__ */ React95.createElement("span", null, __44("Radial Gradient", "elementor"));
|
|
6214
7354
|
};
|
|
6215
7355
|
var ColorOverlayContent = ({ anchorEl }) => {
|
|
6216
7356
|
const propContext = useBoundProp(backgroundColorOverlayPropTypeUtil2);
|
|
6217
|
-
return /* @__PURE__ */
|
|
7357
|
+
return /* @__PURE__ */ React95.createElement(PropProvider, { ...propContext }, /* @__PURE__ */ React95.createElement(PropKeyProvider, { bind: "color" }, /* @__PURE__ */ React95.createElement(ColorControl, { anchorEl })));
|
|
6218
7358
|
};
|
|
6219
7359
|
var ImageOverlayContent = () => {
|
|
6220
7360
|
const propContext = useBoundProp(backgroundImageOverlayPropTypeUtil2);
|
|
6221
|
-
return /* @__PURE__ */
|
|
7361
|
+
return /* @__PURE__ */ React95.createElement(PropProvider, { ...propContext }, /* @__PURE__ */ React95.createElement(PropKeyProvider, { bind: "image" }, /* @__PURE__ */ React95.createElement(ImageControl, { sizes: backgroundResolutionOptions })), /* @__PURE__ */ React95.createElement(PropKeyProvider, { bind: "position" }, /* @__PURE__ */ React95.createElement(BackgroundImageOverlayPosition, null)), /* @__PURE__ */ React95.createElement(PropKeyProvider, { bind: "repeat" }, /* @__PURE__ */ React95.createElement(BackgroundImageOverlayRepeat, null)), /* @__PURE__ */ React95.createElement(PropKeyProvider, { bind: "size" }, /* @__PURE__ */ React95.createElement(BackgroundImageOverlaySize, null)), /* @__PURE__ */ React95.createElement(PropKeyProvider, { bind: "attachment" }, /* @__PURE__ */ React95.createElement(BackgroundImageOverlayAttachment, null)));
|
|
6222
7362
|
};
|
|
6223
|
-
var StyledUnstableColorIndicator3 =
|
|
7363
|
+
var StyledUnstableColorIndicator3 = styled12(UnstableColorIndicator3)(({ theme }) => ({
|
|
6224
7364
|
height: "1rem",
|
|
6225
7365
|
width: "1rem",
|
|
6226
7366
|
borderRadius: `${theme.shape.borderRadius / 2}px`
|
|
@@ -6259,29 +7399,29 @@ var getGradientValue = (value) => {
|
|
|
6259
7399
|
|
|
6260
7400
|
// src/controls/background-control/background-control.tsx
|
|
6261
7401
|
var clipOptions = [
|
|
6262
|
-
{ label:
|
|
6263
|
-
{ label:
|
|
6264
|
-
{ label:
|
|
6265
|
-
{ label:
|
|
7402
|
+
{ label: __45("Full element", "elementor"), value: "border-box" },
|
|
7403
|
+
{ label: __45("Padding edges", "elementor"), value: "padding-box" },
|
|
7404
|
+
{ label: __45("Content edges", "elementor"), value: "content-box" },
|
|
7405
|
+
{ label: __45("Text", "elementor"), value: "text" }
|
|
6266
7406
|
];
|
|
6267
|
-
var colorLabel =
|
|
6268
|
-
var clipLabel =
|
|
7407
|
+
var colorLabel = __45("Color", "elementor");
|
|
7408
|
+
var clipLabel = __45("Clipping", "elementor");
|
|
6269
7409
|
var BackgroundControl = createControl(() => {
|
|
6270
7410
|
const propContext = useBoundProp(backgroundPropTypeUtil);
|
|
6271
|
-
return /* @__PURE__ */
|
|
7411
|
+
return /* @__PURE__ */ React96.createElement(PropProvider, { ...propContext }, /* @__PURE__ */ React96.createElement(PropKeyProvider, { bind: "background-overlay" }, /* @__PURE__ */ React96.createElement(BackgroundOverlayRepeaterControl, null)), /* @__PURE__ */ React96.createElement(BackgroundColorField, null), /* @__PURE__ */ React96.createElement(BackgroundClipField, null));
|
|
6272
7412
|
});
|
|
6273
7413
|
var BackgroundColorField = () => {
|
|
6274
|
-
return /* @__PURE__ */
|
|
7414
|
+
return /* @__PURE__ */ React96.createElement(PropKeyProvider, { bind: "color" }, /* @__PURE__ */ React96.createElement(Grid18, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React96.createElement(Grid18, { item: true, xs: 6 }, /* @__PURE__ */ React96.createElement(ControlLabel, null, colorLabel)), /* @__PURE__ */ React96.createElement(Grid18, { item: true, xs: 6 }, /* @__PURE__ */ React96.createElement(ColorControl, null))));
|
|
6275
7415
|
};
|
|
6276
7416
|
var BackgroundClipField = () => {
|
|
6277
|
-
return /* @__PURE__ */
|
|
7417
|
+
return /* @__PURE__ */ React96.createElement(PropKeyProvider, { bind: "clip" }, /* @__PURE__ */ React96.createElement(Grid18, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React96.createElement(Grid18, { item: true, xs: 6 }, /* @__PURE__ */ React96.createElement(ControlLabel, null, clipLabel)), /* @__PURE__ */ React96.createElement(Grid18, { item: true, xs: 6 }, /* @__PURE__ */ React96.createElement(SelectControl, { options: clipOptions }))));
|
|
6278
7418
|
};
|
|
6279
7419
|
|
|
6280
7420
|
// src/controls/repeatable-control.tsx
|
|
6281
|
-
import * as
|
|
6282
|
-
import { useMemo as
|
|
7421
|
+
import * as React97 from "react";
|
|
7422
|
+
import { useMemo as useMemo13 } from "react";
|
|
6283
7423
|
import { createArrayPropUtils as createArrayPropUtils2 } from "@elementor/editor-props";
|
|
6284
|
-
import { Box as
|
|
7424
|
+
import { Box as Box22 } from "@elementor/ui";
|
|
6285
7425
|
var PLACEHOLDER_REGEX = /\$\{([^}]+)\}/g;
|
|
6286
7426
|
var RepeatableControl = createControl(
|
|
6287
7427
|
({
|
|
@@ -6300,11 +7440,11 @@ var RepeatableControl = createControl(
|
|
|
6300
7440
|
if (!childPropTypeUtil) {
|
|
6301
7441
|
return null;
|
|
6302
7442
|
}
|
|
6303
|
-
const childArrayPropTypeUtil2 =
|
|
7443
|
+
const childArrayPropTypeUtil2 = useMemo13(
|
|
6304
7444
|
() => createArrayPropUtils2(childPropTypeUtil.key, childPropTypeUtil.schema, propKey),
|
|
6305
7445
|
[childPropTypeUtil.key, childPropTypeUtil.schema, propKey]
|
|
6306
7446
|
);
|
|
6307
|
-
const contextValue =
|
|
7447
|
+
const contextValue = useMemo13(
|
|
6308
7448
|
() => ({
|
|
6309
7449
|
...childControlConfig,
|
|
6310
7450
|
placeholder: placeholder || "",
|
|
@@ -6314,14 +7454,14 @@ var RepeatableControl = createControl(
|
|
|
6314
7454
|
);
|
|
6315
7455
|
const { propType, value, setValue } = useBoundProp(childArrayPropTypeUtil2);
|
|
6316
7456
|
const newItemIndex = addItemTooltipProps?.newItemIndex === null ? void 0 : 0;
|
|
6317
|
-
return /* @__PURE__ */
|
|
7457
|
+
return /* @__PURE__ */ React97.createElement(PropProvider, { propType, value, setValue }, /* @__PURE__ */ React97.createElement(RepeatableControlContext.Provider, { value: contextValue }, /* @__PURE__ */ React97.createElement(
|
|
6318
7458
|
ControlRepeater,
|
|
6319
7459
|
{
|
|
6320
7460
|
initial: childPropTypeUtil.create(initialValues || null),
|
|
6321
7461
|
propTypeUtil: childArrayPropTypeUtil2,
|
|
6322
7462
|
isItemDisabled: isItemDisabled2
|
|
6323
7463
|
},
|
|
6324
|
-
/* @__PURE__ */
|
|
7464
|
+
/* @__PURE__ */ React97.createElement(RepeaterHeader, { label: repeaterLabel }, /* @__PURE__ */ React97.createElement(
|
|
6325
7465
|
TooltipAddItemAction,
|
|
6326
7466
|
{
|
|
6327
7467
|
...addItemTooltipProps,
|
|
@@ -6329,22 +7469,22 @@ var RepeatableControl = createControl(
|
|
|
6329
7469
|
ariaLabel: repeaterLabel
|
|
6330
7470
|
}
|
|
6331
7471
|
)),
|
|
6332
|
-
/* @__PURE__ */
|
|
7472
|
+
/* @__PURE__ */ React97.createElement(ItemsContainer, { isSortable }, /* @__PURE__ */ React97.createElement(
|
|
6333
7473
|
Item,
|
|
6334
7474
|
{
|
|
6335
7475
|
Icon: ItemIcon3,
|
|
6336
7476
|
Label: ItemLabel4,
|
|
6337
|
-
actions: /* @__PURE__ */
|
|
7477
|
+
actions: /* @__PURE__ */ React97.createElement(React97.Fragment, null, showDuplicate && /* @__PURE__ */ React97.createElement(DuplicateItemAction, null), showToggle && /* @__PURE__ */ React97.createElement(DisableItemAction, null), /* @__PURE__ */ React97.createElement(RemoveItemAction, null))
|
|
6338
7478
|
}
|
|
6339
7479
|
)),
|
|
6340
|
-
/* @__PURE__ */
|
|
7480
|
+
/* @__PURE__ */ React97.createElement(EditItemPopover, null, /* @__PURE__ */ React97.createElement(Content2, null))
|
|
6341
7481
|
)));
|
|
6342
7482
|
}
|
|
6343
7483
|
);
|
|
6344
|
-
var ItemIcon3 = () => /* @__PURE__ */
|
|
7484
|
+
var ItemIcon3 = () => /* @__PURE__ */ React97.createElement(React97.Fragment, null);
|
|
6345
7485
|
var Content2 = () => {
|
|
6346
7486
|
const { component: ChildControl, props = {} } = useRepeatableControlContext();
|
|
6347
|
-
return /* @__PURE__ */
|
|
7487
|
+
return /* @__PURE__ */ React97.createElement(PopoverContent, { p: 1.5 }, /* @__PURE__ */ React97.createElement(PopoverGridContainer, null, /* @__PURE__ */ React97.createElement(ChildControl, { ...props })));
|
|
6348
7488
|
};
|
|
6349
7489
|
var interpolate = (template, data) => {
|
|
6350
7490
|
if (!data) {
|
|
@@ -6427,7 +7567,7 @@ var ItemLabel4 = ({ value }) => {
|
|
|
6427
7567
|
const label = showPlaceholder ? placeholder : interpolate(patternLabel, value);
|
|
6428
7568
|
const isReadOnly = !!childProps?.readOnly;
|
|
6429
7569
|
const color = getTextColor(isReadOnly, showPlaceholder);
|
|
6430
|
-
return /* @__PURE__ */
|
|
7570
|
+
return /* @__PURE__ */ React97.createElement(Box22, { component: "span", color }, label);
|
|
6431
7571
|
};
|
|
6432
7572
|
var getAllProperties = (pattern) => {
|
|
6433
7573
|
const properties = pattern.match(PLACEHOLDER_REGEX)?.map((match) => match.slice(2, -1)) || [];
|
|
@@ -6435,15 +7575,15 @@ var getAllProperties = (pattern) => {
|
|
|
6435
7575
|
};
|
|
6436
7576
|
|
|
6437
7577
|
// src/controls/key-value-control.tsx
|
|
6438
|
-
import * as
|
|
6439
|
-
import { useMemo as
|
|
7578
|
+
import * as React98 from "react";
|
|
7579
|
+
import { useMemo as useMemo14, useState as useState19 } from "react";
|
|
6440
7580
|
import {
|
|
6441
7581
|
isTransformable,
|
|
6442
7582
|
keyValuePropTypeUtil,
|
|
6443
7583
|
stringPropTypeUtil as stringPropTypeUtil18
|
|
6444
7584
|
} from "@elementor/editor-props";
|
|
6445
7585
|
import { FormHelperText, FormLabel as FormLabel3, Grid as Grid19 } from "@elementor/ui";
|
|
6446
|
-
import { __ as
|
|
7586
|
+
import { __ as __46 } from "@wordpress/i18n";
|
|
6447
7587
|
|
|
6448
7588
|
// src/utils/escape-html-attr.ts
|
|
6449
7589
|
var escapeHtmlAttr = (value) => {
|
|
@@ -6467,23 +7607,23 @@ var getInitialFieldValue = (fieldValue) => {
|
|
|
6467
7607
|
};
|
|
6468
7608
|
var KeyValueControl = createControl((props = {}) => {
|
|
6469
7609
|
const { value, setValue, ...propContext } = useBoundProp(keyValuePropTypeUtil);
|
|
6470
|
-
const [keyError, setKeyError] =
|
|
6471
|
-
const [valueError, setValueError] =
|
|
6472
|
-
const [sessionState, setSessionState] =
|
|
7610
|
+
const [keyError, setKeyError] = useState19("");
|
|
7611
|
+
const [valueError, setValueError] = useState19("");
|
|
7612
|
+
const [sessionState, setSessionState] = useState19({
|
|
6473
7613
|
key: getInitialFieldValue(value?.key),
|
|
6474
7614
|
value: getInitialFieldValue(value?.value)
|
|
6475
7615
|
});
|
|
6476
|
-
const keyLabel = props.keyName ||
|
|
6477
|
-
const valueLabel = props.valueName ||
|
|
7616
|
+
const keyLabel = props.keyName || __46("Key", "elementor");
|
|
7617
|
+
const valueLabel = props.valueName || __46("Value", "elementor");
|
|
6478
7618
|
const { keyHelper, valueHelper } = props.getHelperText?.(sessionState.key, sessionState.value) || {
|
|
6479
7619
|
keyHelper: void 0,
|
|
6480
7620
|
valueHelper: void 0
|
|
6481
7621
|
};
|
|
6482
|
-
const [keyRegex, valueRegex, errMsg] =
|
|
7622
|
+
const [keyRegex, valueRegex, errMsg] = useMemo14(
|
|
6483
7623
|
() => [
|
|
6484
7624
|
props.regexKey ? new RegExp(props.regexKey) : void 0,
|
|
6485
7625
|
props.regexValue ? new RegExp(props.regexValue) : void 0,
|
|
6486
|
-
props.validationErrorMessage ||
|
|
7626
|
+
props.validationErrorMessage || __46("Invalid Format", "elementor")
|
|
6487
7627
|
],
|
|
6488
7628
|
[props.regexKey, props.regexValue, props.validationErrorMessage]
|
|
6489
7629
|
);
|
|
@@ -6532,14 +7672,14 @@ var KeyValueControl = createControl((props = {}) => {
|
|
|
6532
7672
|
});
|
|
6533
7673
|
}
|
|
6534
7674
|
};
|
|
6535
|
-
return /* @__PURE__ */
|
|
7675
|
+
return /* @__PURE__ */ React98.createElement(PropProvider, { ...propContext, value, setValue: handleChange }, /* @__PURE__ */ React98.createElement(Grid19, { container: true, gap: 1.5 }, /* @__PURE__ */ React98.createElement(Grid19, { item: true, xs: 12, display: "flex", flexDirection: "column" }, /* @__PURE__ */ React98.createElement(FormLabel3, { size: "tiny", sx: { pb: 1 } }, keyLabel), /* @__PURE__ */ React98.createElement(PropKeyProvider, { bind: "key" }, /* @__PURE__ */ React98.createElement(
|
|
6536
7676
|
TextControl,
|
|
6537
7677
|
{
|
|
6538
7678
|
inputValue: props.escapeHtml ? escapeHtmlAttr(sessionState.key) : sessionState.key,
|
|
6539
7679
|
error: !!keyError,
|
|
6540
7680
|
helperText: keyHelper
|
|
6541
7681
|
}
|
|
6542
|
-
)), !!keyError && /* @__PURE__ */
|
|
7682
|
+
)), !!keyError && /* @__PURE__ */ React98.createElement(FormHelperText, { error: true }, keyError)), /* @__PURE__ */ React98.createElement(Grid19, { item: true, xs: 12, display: "flex", flexDirection: "column" }, /* @__PURE__ */ React98.createElement(FormLabel3, { size: "tiny", sx: { pb: 1 } }, valueLabel), /* @__PURE__ */ React98.createElement(PropKeyProvider, { bind: "value" }, /* @__PURE__ */ React98.createElement(
|
|
6543
7683
|
TextControl,
|
|
6544
7684
|
{
|
|
6545
7685
|
inputValue: props.escapeHtml ? escapeHtmlAttr(sessionState.value) : sessionState.value,
|
|
@@ -6547,27 +7687,27 @@ var KeyValueControl = createControl((props = {}) => {
|
|
|
6547
7687
|
inputDisabled: !!keyError,
|
|
6548
7688
|
helperText: valueHelper
|
|
6549
7689
|
}
|
|
6550
|
-
)), !!valueError && /* @__PURE__ */
|
|
7690
|
+
)), !!valueError && /* @__PURE__ */ React98.createElement(FormHelperText, { error: true }, valueError))));
|
|
6551
7691
|
});
|
|
6552
7692
|
|
|
6553
7693
|
// src/controls/position-control.tsx
|
|
6554
|
-
import * as
|
|
7694
|
+
import * as React99 from "react";
|
|
6555
7695
|
import { positionPropTypeUtil, stringPropTypeUtil as stringPropTypeUtil19 } from "@elementor/editor-props";
|
|
6556
7696
|
import { MenuListItem as MenuListItem7 } from "@elementor/editor-ui";
|
|
6557
7697
|
import { LetterXIcon as LetterXIcon2, LetterYIcon as LetterYIcon2 } from "@elementor/icons";
|
|
6558
7698
|
import { Grid as Grid20, Select as Select5 } from "@elementor/ui";
|
|
6559
|
-
import { __ as
|
|
7699
|
+
import { __ as __47 } from "@wordpress/i18n";
|
|
6560
7700
|
var positionOptions = [
|
|
6561
|
-
{ label:
|
|
6562
|
-
{ label:
|
|
6563
|
-
{ label:
|
|
6564
|
-
{ label:
|
|
6565
|
-
{ label:
|
|
6566
|
-
{ label:
|
|
6567
|
-
{ label:
|
|
6568
|
-
{ label:
|
|
6569
|
-
{ label:
|
|
6570
|
-
{ label:
|
|
7701
|
+
{ label: __47("Center center", "elementor"), value: "center center" },
|
|
7702
|
+
{ label: __47("Center left", "elementor"), value: "center left" },
|
|
7703
|
+
{ label: __47("Center right", "elementor"), value: "center right" },
|
|
7704
|
+
{ label: __47("Top center", "elementor"), value: "top center" },
|
|
7705
|
+
{ label: __47("Top left", "elementor"), value: "top left" },
|
|
7706
|
+
{ label: __47("Top right", "elementor"), value: "top right" },
|
|
7707
|
+
{ label: __47("Bottom center", "elementor"), value: "bottom center" },
|
|
7708
|
+
{ label: __47("Bottom left", "elementor"), value: "bottom left" },
|
|
7709
|
+
{ label: __47("Bottom right", "elementor"), value: "bottom right" },
|
|
7710
|
+
{ label: __47("Custom", "elementor"), value: "custom" }
|
|
6571
7711
|
];
|
|
6572
7712
|
var PositionControl = () => {
|
|
6573
7713
|
const positionContext = useBoundProp(positionPropTypeUtil);
|
|
@@ -6582,7 +7722,7 @@ var PositionControl = () => {
|
|
|
6582
7722
|
stringPropContext.setValue(value);
|
|
6583
7723
|
}
|
|
6584
7724
|
};
|
|
6585
|
-
return /* @__PURE__ */
|
|
7725
|
+
return /* @__PURE__ */ React99.createElement(Grid20, { container: true, spacing: 1.5 }, /* @__PURE__ */ React99.createElement(Grid20, { item: true, xs: 12 }, /* @__PURE__ */ React99.createElement(Grid20, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React99.createElement(Grid20, { item: true, xs: 6 }, /* @__PURE__ */ React99.createElement(ControlFormLabel, null, __47("Object position", "elementor"))), /* @__PURE__ */ React99.createElement(Grid20, { item: true, xs: 6, sx: { overflow: "hidden" } }, /* @__PURE__ */ React99.createElement(
|
|
6586
7726
|
Select5,
|
|
6587
7727
|
{
|
|
6588
7728
|
size: "tiny",
|
|
@@ -6593,29 +7733,29 @@ var PositionControl = () => {
|
|
|
6593
7733
|
renderValue: (selectedValue) => getSelectRenderValue(positionOptions, placeholder, selectedValue),
|
|
6594
7734
|
fullWidth: true
|
|
6595
7735
|
},
|
|
6596
|
-
positionOptions.map(({ label, value }) => /* @__PURE__ */
|
|
6597
|
-
)))), isCustom && /* @__PURE__ */
|
|
7736
|
+
positionOptions.map(({ label, value }) => /* @__PURE__ */ React99.createElement(MenuListItem7, { key: value, value: value ?? "" }, label))
|
|
7737
|
+
)))), isCustom && /* @__PURE__ */ React99.createElement(PropProvider, { ...positionContext }, /* @__PURE__ */ React99.createElement(Grid20, { item: true, xs: 12 }, /* @__PURE__ */ React99.createElement(Grid20, { container: true, spacing: 1.5 }, /* @__PURE__ */ React99.createElement(Grid20, { item: true, xs: 6 }, /* @__PURE__ */ React99.createElement(PropKeyProvider, { bind: "x" }, /* @__PURE__ */ React99.createElement(
|
|
6598
7738
|
SizeControl,
|
|
6599
7739
|
{
|
|
6600
|
-
startIcon: /* @__PURE__ */
|
|
7740
|
+
startIcon: /* @__PURE__ */ React99.createElement(LetterXIcon2, { fontSize: "tiny" }),
|
|
6601
7741
|
min: -Number.MAX_SAFE_INTEGER
|
|
6602
7742
|
}
|
|
6603
|
-
))), /* @__PURE__ */
|
|
7743
|
+
))), /* @__PURE__ */ React99.createElement(Grid20, { item: true, xs: 6 }, /* @__PURE__ */ React99.createElement(PropKeyProvider, { bind: "y" }, /* @__PURE__ */ React99.createElement(
|
|
6604
7744
|
SizeControl,
|
|
6605
7745
|
{
|
|
6606
|
-
startIcon: /* @__PURE__ */
|
|
7746
|
+
startIcon: /* @__PURE__ */ React99.createElement(LetterYIcon2, { fontSize: "tiny" }),
|
|
6607
7747
|
min: -Number.MAX_SAFE_INTEGER
|
|
6608
7748
|
}
|
|
6609
7749
|
)))))));
|
|
6610
7750
|
};
|
|
6611
7751
|
|
|
6612
7752
|
// src/controls/transform-control/transform-repeater-control.tsx
|
|
6613
|
-
import * as
|
|
6614
|
-
import { useRef as
|
|
7753
|
+
import * as React112 from "react";
|
|
7754
|
+
import { useRef as useRef27 } from "react";
|
|
6615
7755
|
import { transformFunctionsPropTypeUtil, transformPropTypeUtil } from "@elementor/editor-props";
|
|
6616
7756
|
import { AdjustmentsIcon as AdjustmentsIcon2, InfoCircleFilledIcon as InfoCircleFilledIcon2 } from "@elementor/icons";
|
|
6617
|
-
import { bindTrigger as bindTrigger5, Box as
|
|
6618
|
-
import { __ as
|
|
7757
|
+
import { bindTrigger as bindTrigger5, Box as Box26, IconButton as IconButton8, Tooltip as Tooltip11, Typography as Typography11, usePopupState as usePopupState11 } from "@elementor/ui";
|
|
7758
|
+
import { __ as __57 } from "@wordpress/i18n";
|
|
6619
7759
|
|
|
6620
7760
|
// src/controls/transform-control/initial-values.ts
|
|
6621
7761
|
import {
|
|
@@ -6669,24 +7809,24 @@ var initialSkewValue = skewTransformPropTypeUtil.create({
|
|
|
6669
7809
|
});
|
|
6670
7810
|
|
|
6671
7811
|
// src/controls/transform-control/transform-content.tsx
|
|
6672
|
-
import * as
|
|
6673
|
-
import { Box as
|
|
6674
|
-
import { __ as
|
|
7812
|
+
import * as React106 from "react";
|
|
7813
|
+
import { Box as Box23, Tab as Tab2, TabPanel as TabPanel2, Tabs as Tabs2 } from "@elementor/ui";
|
|
7814
|
+
import { __ as __52 } from "@wordpress/i18n";
|
|
6675
7815
|
|
|
6676
7816
|
// src/controls/transform-control/functions/move.tsx
|
|
6677
|
-
import * as
|
|
6678
|
-
import { useRef as
|
|
7817
|
+
import * as React101 from "react";
|
|
7818
|
+
import { useRef as useRef20 } from "react";
|
|
6679
7819
|
import { moveTransformPropTypeUtil } from "@elementor/editor-props";
|
|
6680
7820
|
import { ArrowDownLeftIcon, ArrowDownSmallIcon, ArrowRightIcon } from "@elementor/icons";
|
|
6681
7821
|
import { Grid as Grid22 } from "@elementor/ui";
|
|
6682
|
-
import { __ as
|
|
7822
|
+
import { __ as __48 } from "@wordpress/i18n";
|
|
6683
7823
|
|
|
6684
7824
|
// src/controls/transform-control/functions/axis-row.tsx
|
|
6685
|
-
import * as
|
|
7825
|
+
import * as React100 from "react";
|
|
6686
7826
|
import { Grid as Grid21 } from "@elementor/ui";
|
|
6687
7827
|
var AxisRow = ({ label, bind, startIcon, anchorRef, units: units2, variant = "angle" }) => {
|
|
6688
7828
|
const safeId = label.replace(/\s+/g, "-").toLowerCase();
|
|
6689
|
-
return /* @__PURE__ */
|
|
7829
|
+
return /* @__PURE__ */ React100.createElement(Grid21, { item: true, xs: 12 }, /* @__PURE__ */ React100.createElement(PopoverGridContainer, { ref: anchorRef }, /* @__PURE__ */ React100.createElement(Grid21, { item: true, xs: 6 }, /* @__PURE__ */ React100.createElement(ControlLabel, { htmlFor: safeId }, label)), /* @__PURE__ */ React100.createElement(Grid21, { item: true, xs: 6 }, /* @__PURE__ */ React100.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React100.createElement(
|
|
6690
7830
|
SizeControl,
|
|
6691
7831
|
{
|
|
6692
7832
|
anchorRef,
|
|
@@ -6702,28 +7842,28 @@ var AxisRow = ({ label, bind, startIcon, anchorRef, units: units2, variant = "an
|
|
|
6702
7842
|
// src/controls/transform-control/functions/move.tsx
|
|
6703
7843
|
var moveAxisControls = [
|
|
6704
7844
|
{
|
|
6705
|
-
label:
|
|
7845
|
+
label: __48("Move X", "elementor"),
|
|
6706
7846
|
bind: "x",
|
|
6707
|
-
startIcon: /* @__PURE__ */
|
|
7847
|
+
startIcon: /* @__PURE__ */ React101.createElement(ArrowRightIcon, { fontSize: "tiny" }),
|
|
6708
7848
|
units: ["px", "%", "em", "rem", "vw"]
|
|
6709
7849
|
},
|
|
6710
7850
|
{
|
|
6711
|
-
label:
|
|
7851
|
+
label: __48("Move Y", "elementor"),
|
|
6712
7852
|
bind: "y",
|
|
6713
|
-
startIcon: /* @__PURE__ */
|
|
7853
|
+
startIcon: /* @__PURE__ */ React101.createElement(ArrowDownSmallIcon, { fontSize: "tiny" }),
|
|
6714
7854
|
units: ["px", "%", "em", "rem", "vh"]
|
|
6715
7855
|
},
|
|
6716
7856
|
{
|
|
6717
|
-
label:
|
|
7857
|
+
label: __48("Move Z", "elementor"),
|
|
6718
7858
|
bind: "z",
|
|
6719
|
-
startIcon: /* @__PURE__ */
|
|
7859
|
+
startIcon: /* @__PURE__ */ React101.createElement(ArrowDownLeftIcon, { fontSize: "tiny" }),
|
|
6720
7860
|
units: ["px", "%", "em", "rem", "vw", "vh"]
|
|
6721
7861
|
}
|
|
6722
7862
|
];
|
|
6723
7863
|
var Move = () => {
|
|
6724
7864
|
const context = useBoundProp(moveTransformPropTypeUtil);
|
|
6725
|
-
const rowRefs = [
|
|
6726
|
-
return /* @__PURE__ */
|
|
7865
|
+
const rowRefs = [useRef20(null), useRef20(null), useRef20(null)];
|
|
7866
|
+
return /* @__PURE__ */ React101.createElement(Grid22, { container: true, spacing: 1.5 }, /* @__PURE__ */ React101.createElement(PropProvider, { ...context }, /* @__PURE__ */ React101.createElement(PropKeyProvider, { bind: TransformFunctionKeys.move }, moveAxisControls.map((control, index) => /* @__PURE__ */ React101.createElement(
|
|
6727
7867
|
AxisRow,
|
|
6728
7868
|
{
|
|
6729
7869
|
key: control.bind,
|
|
@@ -6736,34 +7876,34 @@ var Move = () => {
|
|
|
6736
7876
|
};
|
|
6737
7877
|
|
|
6738
7878
|
// src/controls/transform-control/functions/rotate.tsx
|
|
6739
|
-
import * as
|
|
6740
|
-
import { useRef as
|
|
7879
|
+
import * as React102 from "react";
|
|
7880
|
+
import { useRef as useRef21 } from "react";
|
|
6741
7881
|
import { rotateTransformPropTypeUtil as rotateTransformPropTypeUtil2 } from "@elementor/editor-props";
|
|
6742
7882
|
import { Arrow360Icon, RotateClockwiseIcon } from "@elementor/icons";
|
|
6743
7883
|
import { Grid as Grid23 } from "@elementor/ui";
|
|
6744
|
-
import { __ as
|
|
7884
|
+
import { __ as __49 } from "@wordpress/i18n";
|
|
6745
7885
|
var rotateAxisControls = [
|
|
6746
7886
|
{
|
|
6747
|
-
label:
|
|
7887
|
+
label: __49("Rotate X", "elementor"),
|
|
6748
7888
|
bind: "x",
|
|
6749
|
-
startIcon: /* @__PURE__ */
|
|
7889
|
+
startIcon: /* @__PURE__ */ React102.createElement(Arrow360Icon, { fontSize: "tiny" })
|
|
6750
7890
|
},
|
|
6751
7891
|
{
|
|
6752
|
-
label:
|
|
7892
|
+
label: __49("Rotate Y", "elementor"),
|
|
6753
7893
|
bind: "y",
|
|
6754
|
-
startIcon: /* @__PURE__ */
|
|
7894
|
+
startIcon: /* @__PURE__ */ React102.createElement(Arrow360Icon, { fontSize: "tiny", style: { transform: "scaleX(-1) rotate(-90deg)" } })
|
|
6755
7895
|
},
|
|
6756
7896
|
{
|
|
6757
|
-
label:
|
|
7897
|
+
label: __49("Rotate Z", "elementor"),
|
|
6758
7898
|
bind: "z",
|
|
6759
|
-
startIcon: /* @__PURE__ */
|
|
7899
|
+
startIcon: /* @__PURE__ */ React102.createElement(RotateClockwiseIcon, { fontSize: "tiny" })
|
|
6760
7900
|
}
|
|
6761
7901
|
];
|
|
6762
7902
|
var rotateUnits = ["deg", "rad", "grad", "turn"];
|
|
6763
7903
|
var Rotate = () => {
|
|
6764
7904
|
const context = useBoundProp(rotateTransformPropTypeUtil2);
|
|
6765
|
-
const rowRefs = [
|
|
6766
|
-
return /* @__PURE__ */
|
|
7905
|
+
const rowRefs = [useRef21(null), useRef21(null), useRef21(null)];
|
|
7906
|
+
return /* @__PURE__ */ React102.createElement(Grid23, { container: true, spacing: 1.5 }, /* @__PURE__ */ React102.createElement(PropProvider, { ...context }, /* @__PURE__ */ React102.createElement(PropKeyProvider, { bind: TransformFunctionKeys.rotate }, rotateAxisControls.map((control, index) => /* @__PURE__ */ React102.createElement(
|
|
6767
7907
|
AxisRow,
|
|
6768
7908
|
{
|
|
6769
7909
|
key: control.bind,
|
|
@@ -6775,68 +7915,68 @@ var Rotate = () => {
|
|
|
6775
7915
|
};
|
|
6776
7916
|
|
|
6777
7917
|
// src/controls/transform-control/functions/scale.tsx
|
|
6778
|
-
import * as
|
|
6779
|
-
import { useRef as
|
|
7918
|
+
import * as React104 from "react";
|
|
7919
|
+
import { useRef as useRef22 } from "react";
|
|
6780
7920
|
import { scaleTransformPropTypeUtil as scaleTransformPropTypeUtil2 } from "@elementor/editor-props";
|
|
6781
7921
|
import { ArrowDownLeftIcon as ArrowDownLeftIcon2, ArrowDownSmallIcon as ArrowDownSmallIcon2, ArrowRightIcon as ArrowRightIcon2 } from "@elementor/icons";
|
|
6782
7922
|
import { Grid as Grid25 } from "@elementor/ui";
|
|
6783
|
-
import { __ as
|
|
7923
|
+
import { __ as __50 } from "@wordpress/i18n";
|
|
6784
7924
|
|
|
6785
7925
|
// src/controls/transform-control/functions/scale-axis-row.tsx
|
|
6786
|
-
import * as
|
|
7926
|
+
import * as React103 from "react";
|
|
6787
7927
|
import { Grid as Grid24 } from "@elementor/ui";
|
|
6788
7928
|
var ScaleAxisRow = ({ label, bind, startIcon, anchorRef }) => {
|
|
6789
|
-
return /* @__PURE__ */
|
|
7929
|
+
return /* @__PURE__ */ React103.createElement(Grid24, { item: true, xs: 12 }, /* @__PURE__ */ React103.createElement(PopoverGridContainer, { ref: anchorRef }, /* @__PURE__ */ React103.createElement(Grid24, { item: true, xs: 6 }, /* @__PURE__ */ React103.createElement(ControlLabel, null, label)), /* @__PURE__ */ React103.createElement(Grid24, { item: true, xs: 6 }, /* @__PURE__ */ React103.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React103.createElement(NumberControl, { step: 0.1, placeholder: "1", startIcon })))));
|
|
6790
7930
|
};
|
|
6791
7931
|
|
|
6792
7932
|
// src/controls/transform-control/functions/scale.tsx
|
|
6793
7933
|
var scaleAxisControls = [
|
|
6794
7934
|
{
|
|
6795
|
-
label:
|
|
7935
|
+
label: __50("Scale X", "elementor"),
|
|
6796
7936
|
bind: "x",
|
|
6797
|
-
startIcon: /* @__PURE__ */
|
|
7937
|
+
startIcon: /* @__PURE__ */ React104.createElement(ArrowRightIcon2, { fontSize: "tiny" })
|
|
6798
7938
|
},
|
|
6799
7939
|
{
|
|
6800
|
-
label:
|
|
7940
|
+
label: __50("Scale Y", "elementor"),
|
|
6801
7941
|
bind: "y",
|
|
6802
|
-
startIcon: /* @__PURE__ */
|
|
7942
|
+
startIcon: /* @__PURE__ */ React104.createElement(ArrowDownSmallIcon2, { fontSize: "tiny" })
|
|
6803
7943
|
},
|
|
6804
7944
|
{
|
|
6805
|
-
label:
|
|
7945
|
+
label: __50("Scale Z", "elementor"),
|
|
6806
7946
|
bind: "z",
|
|
6807
|
-
startIcon: /* @__PURE__ */
|
|
7947
|
+
startIcon: /* @__PURE__ */ React104.createElement(ArrowDownLeftIcon2, { fontSize: "tiny" })
|
|
6808
7948
|
}
|
|
6809
7949
|
];
|
|
6810
7950
|
var Scale = () => {
|
|
6811
7951
|
const context = useBoundProp(scaleTransformPropTypeUtil2);
|
|
6812
|
-
const rowRefs = [
|
|
6813
|
-
return /* @__PURE__ */
|
|
7952
|
+
const rowRefs = [useRef22(null), useRef22(null), useRef22(null)];
|
|
7953
|
+
return /* @__PURE__ */ React104.createElement(Grid25, { container: true, spacing: 1.5 }, /* @__PURE__ */ React104.createElement(PropProvider, { ...context }, /* @__PURE__ */ React104.createElement(PropKeyProvider, { bind: TransformFunctionKeys.scale }, scaleAxisControls.map((control, index) => /* @__PURE__ */ React104.createElement(ScaleAxisRow, { key: control.bind, ...control, anchorRef: rowRefs[index] })))));
|
|
6814
7954
|
};
|
|
6815
7955
|
|
|
6816
7956
|
// src/controls/transform-control/functions/skew.tsx
|
|
6817
|
-
import * as
|
|
6818
|
-
import { useRef as
|
|
7957
|
+
import * as React105 from "react";
|
|
7958
|
+
import { useRef as useRef23 } from "react";
|
|
6819
7959
|
import { skewTransformPropTypeUtil as skewTransformPropTypeUtil2 } from "@elementor/editor-props";
|
|
6820
7960
|
import { ArrowLeftIcon, ArrowRightIcon as ArrowRightIcon3 } from "@elementor/icons";
|
|
6821
7961
|
import { Grid as Grid26 } from "@elementor/ui";
|
|
6822
|
-
import { __ as
|
|
7962
|
+
import { __ as __51 } from "@wordpress/i18n";
|
|
6823
7963
|
var skewAxisControls = [
|
|
6824
7964
|
{
|
|
6825
|
-
label:
|
|
7965
|
+
label: __51("Skew X", "elementor"),
|
|
6826
7966
|
bind: "x",
|
|
6827
|
-
startIcon: /* @__PURE__ */
|
|
7967
|
+
startIcon: /* @__PURE__ */ React105.createElement(ArrowRightIcon3, { fontSize: "tiny" })
|
|
6828
7968
|
},
|
|
6829
7969
|
{
|
|
6830
|
-
label:
|
|
7970
|
+
label: __51("Skew Y", "elementor"),
|
|
6831
7971
|
bind: "y",
|
|
6832
|
-
startIcon: /* @__PURE__ */
|
|
7972
|
+
startIcon: /* @__PURE__ */ React105.createElement(ArrowLeftIcon, { fontSize: "tiny", style: { transform: "scaleX(-1) rotate(-90deg)" } })
|
|
6833
7973
|
}
|
|
6834
7974
|
];
|
|
6835
7975
|
var skewUnits = ["deg", "rad", "grad", "turn"];
|
|
6836
7976
|
var Skew = () => {
|
|
6837
7977
|
const context = useBoundProp(skewTransformPropTypeUtil2);
|
|
6838
|
-
const rowRefs = [
|
|
6839
|
-
return /* @__PURE__ */
|
|
7978
|
+
const rowRefs = [useRef23(null), useRef23(null), useRef23(null)];
|
|
7979
|
+
return /* @__PURE__ */ React105.createElement(Grid26, { container: true, spacing: 1.5 }, /* @__PURE__ */ React105.createElement(PropProvider, { ...context }, /* @__PURE__ */ React105.createElement(PropKeyProvider, { bind: TransformFunctionKeys.skew }, skewAxisControls.map((control, index) => /* @__PURE__ */ React105.createElement(
|
|
6840
7980
|
AxisRow,
|
|
6841
7981
|
{
|
|
6842
7982
|
key: control.bind,
|
|
@@ -6848,7 +7988,7 @@ var Skew = () => {
|
|
|
6848
7988
|
};
|
|
6849
7989
|
|
|
6850
7990
|
// src/controls/transform-control/use-transform-tabs-history.tsx
|
|
6851
|
-
import { useRef as
|
|
7991
|
+
import { useRef as useRef24 } from "react";
|
|
6852
7992
|
import {
|
|
6853
7993
|
moveTransformPropTypeUtil as moveTransformPropTypeUtil2,
|
|
6854
7994
|
rotateTransformPropTypeUtil as rotateTransformPropTypeUtil3,
|
|
@@ -6880,7 +8020,7 @@ var useTransformTabsHistory = ({
|
|
|
6880
8020
|
}
|
|
6881
8021
|
};
|
|
6882
8022
|
const { getTabsProps, getTabProps, getTabPanelProps } = useTabs2(getCurrentTransformType());
|
|
6883
|
-
const valuesHistory =
|
|
8023
|
+
const valuesHistory = useRef24({
|
|
6884
8024
|
move: initialMove,
|
|
6885
8025
|
scale: initialScale,
|
|
6886
8026
|
rotate: initialRotate,
|
|
@@ -6941,7 +8081,7 @@ var TransformContent = () => {
|
|
|
6941
8081
|
rotate: initialRotateValue.value,
|
|
6942
8082
|
skew: initialSkewValue.value
|
|
6943
8083
|
});
|
|
6944
|
-
return /* @__PURE__ */
|
|
8084
|
+
return /* @__PURE__ */ React106.createElement(PopoverContent, null, /* @__PURE__ */ React106.createElement(Box23, { sx: { width: "100%" } }, /* @__PURE__ */ React106.createElement(Box23, { sx: { borderBottom: 1, borderColor: "divider" } }, /* @__PURE__ */ React106.createElement(
|
|
6945
8085
|
Tabs2,
|
|
6946
8086
|
{
|
|
6947
8087
|
size: "small",
|
|
@@ -6952,37 +8092,37 @@ var TransformContent = () => {
|
|
|
6952
8092
|
}
|
|
6953
8093
|
},
|
|
6954
8094
|
...getTabsProps(),
|
|
6955
|
-
"aria-label":
|
|
8095
|
+
"aria-label": __52("Transform", "elementor")
|
|
6956
8096
|
},
|
|
6957
|
-
/* @__PURE__ */
|
|
6958
|
-
/* @__PURE__ */
|
|
6959
|
-
/* @__PURE__ */
|
|
6960
|
-
/* @__PURE__ */
|
|
6961
|
-
)), /* @__PURE__ */
|
|
8097
|
+
/* @__PURE__ */ React106.createElement(Tab2, { label: __52("Move", "elementor"), ...getTabProps(TransformFunctionKeys.move) }),
|
|
8098
|
+
/* @__PURE__ */ React106.createElement(Tab2, { label: __52("Scale", "elementor"), ...getTabProps(TransformFunctionKeys.scale) }),
|
|
8099
|
+
/* @__PURE__ */ React106.createElement(Tab2, { label: __52("Rotate", "elementor"), ...getTabProps(TransformFunctionKeys.rotate) }),
|
|
8100
|
+
/* @__PURE__ */ React106.createElement(Tab2, { label: __52("Skew", "elementor"), ...getTabProps(TransformFunctionKeys.skew) })
|
|
8101
|
+
)), /* @__PURE__ */ React106.createElement(TabPanel2, { sx: { p: 1.5 }, ...getTabPanelProps(TransformFunctionKeys.move) }, /* @__PURE__ */ React106.createElement(Move, null)), /* @__PURE__ */ React106.createElement(TabPanel2, { sx: { p: 1.5 }, ...getTabPanelProps(TransformFunctionKeys.scale) }, /* @__PURE__ */ React106.createElement(Scale, null)), /* @__PURE__ */ React106.createElement(TabPanel2, { sx: { p: 1.5 }, ...getTabPanelProps(TransformFunctionKeys.rotate) }, /* @__PURE__ */ React106.createElement(Rotate, null)), /* @__PURE__ */ React106.createElement(TabPanel2, { sx: { p: 1.5 }, ...getTabPanelProps(TransformFunctionKeys.skew) }, /* @__PURE__ */ React106.createElement(Skew, null))));
|
|
6962
8102
|
};
|
|
6963
8103
|
|
|
6964
8104
|
// src/controls/transform-control/transform-icon.tsx
|
|
6965
|
-
import * as
|
|
8105
|
+
import * as React107 from "react";
|
|
6966
8106
|
import { ArrowAutofitHeightIcon, ArrowsMaximizeIcon as ArrowsMaximizeIcon2, RotateClockwise2Icon, SkewXIcon } from "@elementor/icons";
|
|
6967
8107
|
var TransformIcon = ({ value }) => {
|
|
6968
8108
|
switch (value.$$type) {
|
|
6969
8109
|
case TransformFunctionKeys.move:
|
|
6970
|
-
return /* @__PURE__ */
|
|
8110
|
+
return /* @__PURE__ */ React107.createElement(ArrowsMaximizeIcon2, { fontSize: "tiny" });
|
|
6971
8111
|
case TransformFunctionKeys.scale:
|
|
6972
|
-
return /* @__PURE__ */
|
|
8112
|
+
return /* @__PURE__ */ React107.createElement(ArrowAutofitHeightIcon, { fontSize: "tiny" });
|
|
6973
8113
|
case TransformFunctionKeys.rotate:
|
|
6974
|
-
return /* @__PURE__ */
|
|
8114
|
+
return /* @__PURE__ */ React107.createElement(RotateClockwise2Icon, { fontSize: "tiny" });
|
|
6975
8115
|
case TransformFunctionKeys.skew:
|
|
6976
|
-
return /* @__PURE__ */
|
|
8116
|
+
return /* @__PURE__ */ React107.createElement(SkewXIcon, { fontSize: "tiny" });
|
|
6977
8117
|
default:
|
|
6978
8118
|
return null;
|
|
6979
8119
|
}
|
|
6980
8120
|
};
|
|
6981
8121
|
|
|
6982
8122
|
// src/controls/transform-control/transform-label.tsx
|
|
6983
|
-
import * as
|
|
6984
|
-
import { Box as
|
|
6985
|
-
import { __ as
|
|
8123
|
+
import * as React108 from "react";
|
|
8124
|
+
import { Box as Box24 } from "@elementor/ui";
|
|
8125
|
+
import { __ as __53 } from "@wordpress/i18n";
|
|
6986
8126
|
var orderedAxis = ["x", "y", "z"];
|
|
6987
8127
|
var formatLabel = (value, functionType) => {
|
|
6988
8128
|
return orderedAxis.map((axisKey) => {
|
|
@@ -7000,98 +8140,98 @@ var TransformLabel = (props) => {
|
|
|
7000
8140
|
const { $$type, value } = props.value;
|
|
7001
8141
|
switch ($$type) {
|
|
7002
8142
|
case TransformFunctionKeys.move:
|
|
7003
|
-
return /* @__PURE__ */
|
|
8143
|
+
return /* @__PURE__ */ React108.createElement(Label2, { label: __53("Move", "elementor"), value: formatLabel(value, "move") });
|
|
7004
8144
|
case TransformFunctionKeys.scale:
|
|
7005
|
-
return /* @__PURE__ */
|
|
8145
|
+
return /* @__PURE__ */ React108.createElement(Label2, { label: __53("Scale", "elementor"), value: formatLabel(value, "scale") });
|
|
7006
8146
|
case TransformFunctionKeys.rotate:
|
|
7007
|
-
return /* @__PURE__ */
|
|
8147
|
+
return /* @__PURE__ */ React108.createElement(Label2, { label: __53("Rotate", "elementor"), value: formatLabel(value, "rotate") });
|
|
7008
8148
|
case TransformFunctionKeys.skew:
|
|
7009
|
-
return /* @__PURE__ */
|
|
8149
|
+
return /* @__PURE__ */ React108.createElement(Label2, { label: __53("Skew", "elementor"), value: formatLabel(value, "skew") });
|
|
7010
8150
|
default:
|
|
7011
8151
|
return "";
|
|
7012
8152
|
}
|
|
7013
8153
|
};
|
|
7014
8154
|
var Label2 = ({ label, value }) => {
|
|
7015
|
-
return /* @__PURE__ */
|
|
8155
|
+
return /* @__PURE__ */ React108.createElement(Box24, { component: "span" }, label, ": ", value);
|
|
7016
8156
|
};
|
|
7017
8157
|
|
|
7018
8158
|
// src/controls/transform-control/transform-settings-control.tsx
|
|
7019
|
-
import * as
|
|
7020
|
-
import { PopoverHeader as
|
|
8159
|
+
import * as React111 from "react";
|
|
8160
|
+
import { PopoverHeader as PopoverHeader5 } from "@elementor/editor-ui";
|
|
7021
8161
|
import { AdjustmentsIcon } from "@elementor/icons";
|
|
7022
|
-
import { bindPopover as bindPopover6, Box as
|
|
7023
|
-
import { __ as
|
|
8162
|
+
import { bindPopover as bindPopover6, Box as Box25, Divider as Divider5, Popover as Popover7 } from "@elementor/ui";
|
|
8163
|
+
import { __ as __56 } from "@wordpress/i18n";
|
|
7024
8164
|
|
|
7025
8165
|
// src/controls/transform-control/transform-base-controls/children-perspective-control.tsx
|
|
7026
|
-
import * as
|
|
7027
|
-
import { useRef as
|
|
8166
|
+
import * as React109 from "react";
|
|
8167
|
+
import { useRef as useRef25 } from "react";
|
|
7028
8168
|
import { perspectiveOriginPropTypeUtil } from "@elementor/editor-props";
|
|
7029
|
-
import { Grid as Grid27, Stack as
|
|
7030
|
-
import { __ as
|
|
8169
|
+
import { Grid as Grid27, Stack as Stack19 } from "@elementor/ui";
|
|
8170
|
+
import { __ as __54 } from "@wordpress/i18n";
|
|
7031
8171
|
var ORIGIN_UNITS = ["px", "%", "em", "rem"];
|
|
7032
8172
|
var PERSPECTIVE_CONTROL_FIELD = {
|
|
7033
|
-
label:
|
|
8173
|
+
label: __54("Perspective", "elementor"),
|
|
7034
8174
|
bind: "perspective",
|
|
7035
8175
|
units: ["px", "em", "rem", "vw", "vh"]
|
|
7036
8176
|
};
|
|
7037
8177
|
var CHILDREN_PERSPECTIVE_FIELDS = [
|
|
7038
8178
|
{
|
|
7039
|
-
label:
|
|
8179
|
+
label: __54("Origin X", "elementor"),
|
|
7040
8180
|
bind: "x",
|
|
7041
8181
|
units: ORIGIN_UNITS
|
|
7042
8182
|
},
|
|
7043
8183
|
{
|
|
7044
|
-
label:
|
|
8184
|
+
label: __54("Origin Y", "elementor"),
|
|
7045
8185
|
bind: "y",
|
|
7046
8186
|
units: ORIGIN_UNITS
|
|
7047
8187
|
}
|
|
7048
8188
|
];
|
|
7049
8189
|
var ChildrenPerspectiveControl = () => {
|
|
7050
|
-
return /* @__PURE__ */
|
|
8190
|
+
return /* @__PURE__ */ React109.createElement(Stack19, { direction: "column", spacing: 1.5 }, /* @__PURE__ */ React109.createElement(ControlFormLabel, null, __54("Children perspective", "elementor")), /* @__PURE__ */ React109.createElement(PerspectiveControl, null), /* @__PURE__ */ React109.createElement(PerspectiveOriginControl, null));
|
|
7051
8191
|
};
|
|
7052
|
-
var PerspectiveControl = () => /* @__PURE__ */
|
|
7053
|
-
var PerspectiveOriginControl = () => /* @__PURE__ */
|
|
8192
|
+
var PerspectiveControl = () => /* @__PURE__ */ React109.createElement(PropKeyProvider, { bind: "perspective" }, /* @__PURE__ */ React109.createElement(ControlFields, { control: PERSPECTIVE_CONTROL_FIELD, key: PERSPECTIVE_CONTROL_FIELD.bind }));
|
|
8193
|
+
var PerspectiveOriginControl = () => /* @__PURE__ */ React109.createElement(PropKeyProvider, { bind: "perspective-origin" }, /* @__PURE__ */ React109.createElement(PerspectiveOriginControlProvider, null));
|
|
7054
8194
|
var PerspectiveOriginControlProvider = () => {
|
|
7055
8195
|
const context = useBoundProp(perspectiveOriginPropTypeUtil);
|
|
7056
|
-
return /* @__PURE__ */
|
|
8196
|
+
return /* @__PURE__ */ React109.createElement(PropProvider, { ...context }, CHILDREN_PERSPECTIVE_FIELDS.map((control) => /* @__PURE__ */ React109.createElement(PropKeyProvider, { bind: control.bind, key: control.bind }, /* @__PURE__ */ React109.createElement(ControlFields, { control }))));
|
|
7057
8197
|
};
|
|
7058
8198
|
var ControlFields = ({ control }) => {
|
|
7059
|
-
const rowRef =
|
|
7060
|
-
return /* @__PURE__ */
|
|
8199
|
+
const rowRef = useRef25(null);
|
|
8200
|
+
return /* @__PURE__ */ React109.createElement(PopoverGridContainer, { ref: rowRef }, /* @__PURE__ */ React109.createElement(Grid27, { item: true, xs: 6 }, /* @__PURE__ */ React109.createElement(ControlFormLabel, null, control.label)), /* @__PURE__ */ React109.createElement(Grid27, { item: true, xs: 6 }, /* @__PURE__ */ React109.createElement(SizeControl, { variant: "length", units: control.units, anchorRef: rowRef, disableCustom: true })));
|
|
7061
8201
|
};
|
|
7062
8202
|
|
|
7063
8203
|
// src/controls/transform-control/transform-base-controls/transform-origin-control.tsx
|
|
7064
|
-
import * as
|
|
7065
|
-
import { useRef as
|
|
8204
|
+
import * as React110 from "react";
|
|
8205
|
+
import { useRef as useRef26 } from "react";
|
|
7066
8206
|
import { transformOriginPropTypeUtil } from "@elementor/editor-props";
|
|
7067
|
-
import { Grid as Grid28, Stack as
|
|
7068
|
-
import { __ as
|
|
8207
|
+
import { Grid as Grid28, Stack as Stack20 } from "@elementor/ui";
|
|
8208
|
+
import { __ as __55 } from "@wordpress/i18n";
|
|
7069
8209
|
var TRANSFORM_ORIGIN_UNITS = ["px", "%", "em", "rem"];
|
|
7070
8210
|
var TRANSFORM_ORIGIN_UNITS_Z_AXIS = TRANSFORM_ORIGIN_UNITS.filter((unit) => unit !== "%");
|
|
7071
8211
|
var TRANSFORM_ORIGIN_FIELDS = [
|
|
7072
8212
|
{
|
|
7073
|
-
label:
|
|
8213
|
+
label: __55("Origin X", "elementor"),
|
|
7074
8214
|
bind: "x",
|
|
7075
8215
|
units: TRANSFORM_ORIGIN_UNITS
|
|
7076
8216
|
},
|
|
7077
8217
|
{
|
|
7078
|
-
label:
|
|
8218
|
+
label: __55("Origin Y", "elementor"),
|
|
7079
8219
|
bind: "y",
|
|
7080
8220
|
units: TRANSFORM_ORIGIN_UNITS
|
|
7081
8221
|
},
|
|
7082
8222
|
{
|
|
7083
|
-
label:
|
|
8223
|
+
label: __55("Origin Z", "elementor"),
|
|
7084
8224
|
bind: "z",
|
|
7085
8225
|
units: TRANSFORM_ORIGIN_UNITS_Z_AXIS
|
|
7086
8226
|
}
|
|
7087
8227
|
];
|
|
7088
8228
|
var TransformOriginControl = () => {
|
|
7089
|
-
return /* @__PURE__ */
|
|
8229
|
+
return /* @__PURE__ */ React110.createElement(Stack20, { direction: "column", spacing: 1.5 }, /* @__PURE__ */ React110.createElement(ControlFormLabel, null, __55("Transform", "elementor")), TRANSFORM_ORIGIN_FIELDS.map((control) => /* @__PURE__ */ React110.createElement(ControlFields2, { control, key: control.bind })));
|
|
7090
8230
|
};
|
|
7091
8231
|
var ControlFields2 = ({ control }) => {
|
|
7092
8232
|
const context = useBoundProp(transformOriginPropTypeUtil);
|
|
7093
|
-
const rowRef =
|
|
7094
|
-
return /* @__PURE__ */
|
|
8233
|
+
const rowRef = useRef26(null);
|
|
8234
|
+
return /* @__PURE__ */ React110.createElement(PropProvider, { ...context }, /* @__PURE__ */ React110.createElement(PropKeyProvider, { bind: control.bind }, /* @__PURE__ */ React110.createElement(PopoverGridContainer, { ref: rowRef }, /* @__PURE__ */ React110.createElement(Grid28, { item: true, xs: 6 }, /* @__PURE__ */ React110.createElement(ControlFormLabel, null, control.label)), /* @__PURE__ */ React110.createElement(Grid28, { item: true, xs: 6 }, /* @__PURE__ */ React110.createElement(SizeControl, { variant: "length", units: control.units, anchorRef: rowRef })))));
|
|
7095
8235
|
};
|
|
7096
8236
|
|
|
7097
8237
|
// src/controls/transform-control/transform-settings-control.tsx
|
|
@@ -7105,8 +8245,8 @@ var TransformSettingsControl = ({
|
|
|
7105
8245
|
...popupState,
|
|
7106
8246
|
anchorEl: anchorRef.current ?? void 0
|
|
7107
8247
|
});
|
|
7108
|
-
return /* @__PURE__ */
|
|
7109
|
-
|
|
8248
|
+
return /* @__PURE__ */ React111.createElement(
|
|
8249
|
+
Popover7,
|
|
7110
8250
|
{
|
|
7111
8251
|
disablePortal: true,
|
|
7112
8252
|
anchorOrigin: { vertical: "bottom", horizontal: "left" },
|
|
@@ -7120,16 +8260,16 @@ var TransformSettingsControl = ({
|
|
|
7120
8260
|
},
|
|
7121
8261
|
...popupProps
|
|
7122
8262
|
},
|
|
7123
|
-
/* @__PURE__ */
|
|
7124
|
-
|
|
8263
|
+
/* @__PURE__ */ React111.createElement(
|
|
8264
|
+
PopoverHeader5,
|
|
7125
8265
|
{
|
|
7126
|
-
title:
|
|
8266
|
+
title: __56("Transform settings", "elementor"),
|
|
7127
8267
|
onClose: popupState.close,
|
|
7128
|
-
icon: /* @__PURE__ */
|
|
8268
|
+
icon: /* @__PURE__ */ React111.createElement(AdjustmentsIcon, { fontSize: SIZE10 })
|
|
7129
8269
|
}
|
|
7130
8270
|
),
|
|
7131
|
-
/* @__PURE__ */
|
|
7132
|
-
/* @__PURE__ */
|
|
8271
|
+
/* @__PURE__ */ React111.createElement(Divider5, null),
|
|
8272
|
+
/* @__PURE__ */ React111.createElement(PopoverContent, { sx: { px: 2, py: 1.5 } }, /* @__PURE__ */ React111.createElement(PropKeyProvider, { bind: "transform-origin" }, /* @__PURE__ */ React111.createElement(TransformOriginControl, null)), showChildrenPerspective && /* @__PURE__ */ React111.createElement(React111.Fragment, null, /* @__PURE__ */ React111.createElement(Box25, { sx: { my: 0.5 } }, /* @__PURE__ */ React111.createElement(Divider5, null)), /* @__PURE__ */ React111.createElement(ChildrenPerspectiveControl, null)))
|
|
7133
8273
|
);
|
|
7134
8274
|
};
|
|
7135
8275
|
|
|
@@ -7138,27 +8278,27 @@ var SIZE11 = "tiny";
|
|
|
7138
8278
|
var TransformRepeaterControl = createControl(
|
|
7139
8279
|
({ showChildrenPerspective }) => {
|
|
7140
8280
|
const context = useBoundProp(transformPropTypeUtil);
|
|
7141
|
-
const headerRef =
|
|
7142
|
-
const popupState =
|
|
7143
|
-
return /* @__PURE__ */
|
|
8281
|
+
const headerRef = useRef27(null);
|
|
8282
|
+
const popupState = usePopupState11({ variant: "popover" });
|
|
8283
|
+
return /* @__PURE__ */ React112.createElement(PropProvider, { ...context }, /* @__PURE__ */ React112.createElement(
|
|
7144
8284
|
TransformSettingsControl,
|
|
7145
8285
|
{
|
|
7146
8286
|
popupState,
|
|
7147
8287
|
anchorRef: headerRef,
|
|
7148
8288
|
showChildrenPerspective
|
|
7149
8289
|
}
|
|
7150
|
-
), /* @__PURE__ */
|
|
8290
|
+
), /* @__PURE__ */ React112.createElement(PropKeyProvider, { bind: "transform-functions" }, /* @__PURE__ */ React112.createElement(Repeater2, { headerRef, propType: context.propType, popupState })));
|
|
7151
8291
|
}
|
|
7152
8292
|
);
|
|
7153
|
-
var ToolTip = /* @__PURE__ */
|
|
7154
|
-
|
|
8293
|
+
var ToolTip = /* @__PURE__ */ React112.createElement(
|
|
8294
|
+
Box26,
|
|
7155
8295
|
{
|
|
7156
8296
|
component: "span",
|
|
7157
8297
|
"aria-label": void 0,
|
|
7158
8298
|
sx: { display: "flex", gap: 0.5, p: 2, width: 320, borderRadius: 1 }
|
|
7159
8299
|
},
|
|
7160
|
-
/* @__PURE__ */
|
|
7161
|
-
/* @__PURE__ */
|
|
8300
|
+
/* @__PURE__ */ React112.createElement(InfoCircleFilledIcon2, { sx: { color: "secondary.main" } }),
|
|
8301
|
+
/* @__PURE__ */ React112.createElement(Typography11, { variant: "body2", color: "text.secondary", fontSize: "14px" }, __57("You can use each kind of transform only once per element.", "elementor"))
|
|
7162
8302
|
);
|
|
7163
8303
|
var Repeater2 = ({
|
|
7164
8304
|
headerRef,
|
|
@@ -7172,21 +8312,21 @@ var Repeater2 = ({
|
|
|
7172
8312
|
return availableValues.find((value) => !transformValues?.some((item) => item.$$type === value.$$type));
|
|
7173
8313
|
};
|
|
7174
8314
|
const shouldDisableAddItem = !getInitialValue2();
|
|
7175
|
-
return /* @__PURE__ */
|
|
8315
|
+
return /* @__PURE__ */ React112.createElement(PropProvider, { ...transformFunctionsContext }, /* @__PURE__ */ React112.createElement(
|
|
7176
8316
|
ControlRepeater,
|
|
7177
8317
|
{
|
|
7178
8318
|
initial: getInitialValue2() ?? initialTransformValue,
|
|
7179
8319
|
propTypeUtil: transformFunctionsPropTypeUtil
|
|
7180
8320
|
},
|
|
7181
|
-
/* @__PURE__ */
|
|
8321
|
+
/* @__PURE__ */ React112.createElement(
|
|
7182
8322
|
RepeaterHeader,
|
|
7183
8323
|
{
|
|
7184
|
-
label:
|
|
7185
|
-
adornment: () => /* @__PURE__ */
|
|
8324
|
+
label: __57("Transform", "elementor"),
|
|
8325
|
+
adornment: () => /* @__PURE__ */ React112.createElement(ControlAdornments, { customContext: { path: ["transform"], propType } }),
|
|
7186
8326
|
ref: headerRef
|
|
7187
8327
|
},
|
|
7188
|
-
/* @__PURE__ */
|
|
7189
|
-
/* @__PURE__ */
|
|
8328
|
+
/* @__PURE__ */ React112.createElement(TransformBasePopoverTrigger, { popupState, repeaterBindKey: bind }),
|
|
8329
|
+
/* @__PURE__ */ React112.createElement(
|
|
7190
8330
|
TooltipAddItemAction,
|
|
7191
8331
|
{
|
|
7192
8332
|
disabled: shouldDisableAddItem,
|
|
@@ -7196,15 +8336,15 @@ var Repeater2 = ({
|
|
|
7196
8336
|
}
|
|
7197
8337
|
)
|
|
7198
8338
|
),
|
|
7199
|
-
/* @__PURE__ */
|
|
8339
|
+
/* @__PURE__ */ React112.createElement(ItemsContainer, null, /* @__PURE__ */ React112.createElement(
|
|
7200
8340
|
Item,
|
|
7201
8341
|
{
|
|
7202
8342
|
Icon: TransformIcon,
|
|
7203
8343
|
Label: TransformLabel,
|
|
7204
|
-
actions: /* @__PURE__ */
|
|
8344
|
+
actions: /* @__PURE__ */ React112.createElement(React112.Fragment, null, /* @__PURE__ */ React112.createElement(DisableItemAction, null), /* @__PURE__ */ React112.createElement(RemoveItemAction, null))
|
|
7205
8345
|
}
|
|
7206
8346
|
)),
|
|
7207
|
-
/* @__PURE__ */
|
|
8347
|
+
/* @__PURE__ */ React112.createElement(EditItemPopover, null, /* @__PURE__ */ React112.createElement(TransformContent, null))
|
|
7208
8348
|
));
|
|
7209
8349
|
};
|
|
7210
8350
|
var TransformBasePopoverTrigger = ({
|
|
@@ -7212,33 +8352,33 @@ var TransformBasePopoverTrigger = ({
|
|
|
7212
8352
|
repeaterBindKey
|
|
7213
8353
|
}) => {
|
|
7214
8354
|
const { bind } = useBoundProp();
|
|
7215
|
-
const titleLabel =
|
|
7216
|
-
return bind !== repeaterBindKey ? null : /* @__PURE__ */
|
|
8355
|
+
const titleLabel = __57("Transform settings", "elementor");
|
|
8356
|
+
return bind !== repeaterBindKey ? null : /* @__PURE__ */ React112.createElement(Tooltip11, { title: titleLabel, placement: "top" }, /* @__PURE__ */ React112.createElement(IconButton8, { size: SIZE11, "aria-label": titleLabel, ...bindTrigger5(popupState) }, /* @__PURE__ */ React112.createElement(AdjustmentsIcon2, { fontSize: SIZE11 })));
|
|
7217
8357
|
};
|
|
7218
8358
|
|
|
7219
8359
|
// src/controls/transition-control/transition-repeater-control.tsx
|
|
7220
|
-
import * as
|
|
7221
|
-
import { useEffect as useEffect17, useMemo as
|
|
8360
|
+
import * as React115 from "react";
|
|
8361
|
+
import { useEffect as useEffect17, useMemo as useMemo17, useState as useState20 } from "react";
|
|
7222
8362
|
import {
|
|
7223
8363
|
createArrayPropUtils as createArrayPropUtils3,
|
|
7224
8364
|
selectionSizePropTypeUtil as selectionSizePropTypeUtil2
|
|
7225
8365
|
} from "@elementor/editor-props";
|
|
7226
8366
|
import { InfoCircleFilledIcon as InfoCircleFilledIcon3 } from "@elementor/icons";
|
|
7227
|
-
import { Alert as Alert2, AlertTitle as AlertTitle3, Box as
|
|
8367
|
+
import { Alert as Alert2, AlertTitle as AlertTitle3, Box as Box28, Typography as Typography12 } from "@elementor/ui";
|
|
7228
8368
|
import { hasProInstalled as hasProInstalled2 } from "@elementor/utils";
|
|
7229
|
-
import { __ as
|
|
8369
|
+
import { __ as __60 } from "@wordpress/i18n";
|
|
7230
8370
|
|
|
7231
8371
|
// src/controls/selection-size-control.tsx
|
|
7232
|
-
import * as
|
|
7233
|
-
import { useMemo as
|
|
8372
|
+
import * as React113 from "react";
|
|
8373
|
+
import { useMemo as useMemo15, useRef as useRef28 } from "react";
|
|
7234
8374
|
import { selectionSizePropTypeUtil } from "@elementor/editor-props";
|
|
7235
8375
|
import { Grid as Grid29 } from "@elementor/ui";
|
|
7236
8376
|
var SelectionSizeControl = createControl(
|
|
7237
8377
|
({ selectionLabel, sizeLabel, selectionConfig, sizeConfigMap }) => {
|
|
7238
8378
|
const { value, setValue, propType } = useBoundProp(selectionSizePropTypeUtil);
|
|
7239
|
-
const rowRef =
|
|
8379
|
+
const rowRef = useRef28(null);
|
|
7240
8380
|
const sizeFieldId = sizeLabel.replace(/\s+/g, "-").toLowerCase();
|
|
7241
|
-
const currentSizeConfig =
|
|
8381
|
+
const currentSizeConfig = useMemo15(() => {
|
|
7242
8382
|
switch (value.selection.$$type) {
|
|
7243
8383
|
case "key-value":
|
|
7244
8384
|
return sizeConfigMap[value?.selection?.value.value.value || ""];
|
|
@@ -7249,7 +8389,7 @@ var SelectionSizeControl = createControl(
|
|
|
7249
8389
|
}
|
|
7250
8390
|
}, [value, sizeConfigMap]);
|
|
7251
8391
|
const SelectionComponent = selectionConfig.component;
|
|
7252
|
-
return /* @__PURE__ */
|
|
8392
|
+
return /* @__PURE__ */ React113.createElement(PropProvider, { value, setValue, propType }, /* @__PURE__ */ React113.createElement(Grid29, { container: true, spacing: 1.5, ref: rowRef }, /* @__PURE__ */ React113.createElement(Grid29, { item: true, xs: 6, sx: { display: "flex", alignItems: "center" } }, /* @__PURE__ */ React113.createElement(ControlFormLabel, null, selectionLabel)), /* @__PURE__ */ React113.createElement(Grid29, { item: true, xs: 6 }, /* @__PURE__ */ React113.createElement(PropKeyProvider, { bind: "selection" }, /* @__PURE__ */ React113.createElement(SelectionComponent, { ...selectionConfig.props }))), currentSizeConfig && /* @__PURE__ */ React113.createElement(React113.Fragment, null, /* @__PURE__ */ React113.createElement(Grid29, { item: true, xs: 6, sx: { display: "flex", alignItems: "center" } }, /* @__PURE__ */ React113.createElement(ControlFormLabel, { htmlFor: sizeFieldId }, sizeLabel)), /* @__PURE__ */ React113.createElement(Grid29, { item: true, xs: 6 }, /* @__PURE__ */ React113.createElement(PropKeyProvider, { bind: "size" }, /* @__PURE__ */ React113.createElement(
|
|
7253
8393
|
SizeControl,
|
|
7254
8394
|
{
|
|
7255
8395
|
anchorRef: rowRef,
|
|
@@ -7264,12 +8404,12 @@ var SelectionSizeControl = createControl(
|
|
|
7264
8404
|
|
|
7265
8405
|
// src/controls/transition-control/data.ts
|
|
7266
8406
|
import { hasProInstalled, isVersionGreaterOrEqual } from "@elementor/utils";
|
|
7267
|
-
import { __ as
|
|
8407
|
+
import { __ as __58 } from "@wordpress/i18n";
|
|
7268
8408
|
var initialTransitionValue = {
|
|
7269
8409
|
selection: {
|
|
7270
8410
|
$$type: "key-value",
|
|
7271
8411
|
value: {
|
|
7272
|
-
key: { value:
|
|
8412
|
+
key: { value: __58("All properties", "elementor"), $$type: "string" },
|
|
7273
8413
|
value: { value: "all", $$type: "string" }
|
|
7274
8414
|
}
|
|
7275
8415
|
},
|
|
@@ -7293,128 +8433,128 @@ var createTransitionPropertiesList = () => {
|
|
|
7293
8433
|
const isSiteRtl = getIsSiteRtl();
|
|
7294
8434
|
const baseProperties = [
|
|
7295
8435
|
{
|
|
7296
|
-
label:
|
|
8436
|
+
label: __58("Default", "elementor"),
|
|
7297
8437
|
type: "category",
|
|
7298
|
-
properties: [{ label:
|
|
8438
|
+
properties: [{ label: __58("All properties", "elementor"), value: "all" }]
|
|
7299
8439
|
},
|
|
7300
8440
|
{
|
|
7301
|
-
label:
|
|
8441
|
+
label: __58("Margin", "elementor"),
|
|
7302
8442
|
type: "category",
|
|
7303
8443
|
properties: [
|
|
7304
|
-
{ label:
|
|
7305
|
-
{ label:
|
|
8444
|
+
{ label: __58("Margin (all)", "elementor"), value: "margin", isDisabled: true },
|
|
8445
|
+
{ label: __58("Margin bottom", "elementor"), value: "margin-block-end", isDisabled: true },
|
|
7306
8446
|
{
|
|
7307
|
-
label: isSiteRtl ?
|
|
8447
|
+
label: isSiteRtl ? __58("Margin right", "elementor") : __58("Margin left", "elementor"),
|
|
7308
8448
|
value: "margin-inline-start",
|
|
7309
8449
|
isDisabled: true
|
|
7310
8450
|
},
|
|
7311
8451
|
{
|
|
7312
|
-
label: isSiteRtl ?
|
|
8452
|
+
label: isSiteRtl ? __58("Margin left", "elementor") : __58("Margin right", "elementor"),
|
|
7313
8453
|
value: "margin-inline-end",
|
|
7314
8454
|
isDisabled: true
|
|
7315
8455
|
},
|
|
7316
|
-
{ label:
|
|
8456
|
+
{ label: __58("Margin top", "elementor"), value: "margin-block-start", isDisabled: true }
|
|
7317
8457
|
]
|
|
7318
8458
|
},
|
|
7319
8459
|
{
|
|
7320
|
-
label:
|
|
8460
|
+
label: __58("Padding", "elementor"),
|
|
7321
8461
|
type: "category",
|
|
7322
8462
|
properties: [
|
|
7323
|
-
{ label:
|
|
7324
|
-
{ label:
|
|
8463
|
+
{ label: __58("Padding (all)", "elementor"), value: "padding", isDisabled: true },
|
|
8464
|
+
{ label: __58("Padding bottom", "elementor"), value: "padding-block-end", isDisabled: true },
|
|
7325
8465
|
{
|
|
7326
|
-
label: isSiteRtl ?
|
|
8466
|
+
label: isSiteRtl ? __58("Padding right", "elementor") : __58("Padding left", "elementor"),
|
|
7327
8467
|
value: "padding-inline-start",
|
|
7328
8468
|
isDisabled: true
|
|
7329
8469
|
},
|
|
7330
8470
|
{
|
|
7331
|
-
label: isSiteRtl ?
|
|
8471
|
+
label: isSiteRtl ? __58("Padding left", "elementor") : __58("Padding right", "elementor"),
|
|
7332
8472
|
value: "padding-inline-end",
|
|
7333
8473
|
isDisabled: true
|
|
7334
8474
|
},
|
|
7335
|
-
{ label:
|
|
8475
|
+
{ label: __58("Padding top", "elementor"), value: "padding-block-start", isDisabled: true }
|
|
7336
8476
|
]
|
|
7337
8477
|
},
|
|
7338
8478
|
{
|
|
7339
|
-
label:
|
|
8479
|
+
label: __58("Flex", "elementor"),
|
|
7340
8480
|
type: "category",
|
|
7341
8481
|
properties: [
|
|
7342
|
-
{ label:
|
|
7343
|
-
{ label:
|
|
7344
|
-
{ label:
|
|
7345
|
-
{ label:
|
|
8482
|
+
{ label: __58("Flex (all)", "elementor"), value: "flex", isDisabled: true },
|
|
8483
|
+
{ label: __58("Flex grow", "elementor"), value: "flex-grow", isDisabled: true },
|
|
8484
|
+
{ label: __58("Flex shrink", "elementor"), value: "flex-shrink", isDisabled: true },
|
|
8485
|
+
{ label: __58("Flex basis", "elementor"), value: "flex-basis", isDisabled: true }
|
|
7346
8486
|
]
|
|
7347
8487
|
},
|
|
7348
8488
|
{
|
|
7349
|
-
label:
|
|
8489
|
+
label: __58("Size", "elementor"),
|
|
7350
8490
|
type: "category",
|
|
7351
8491
|
properties: [
|
|
7352
|
-
{ label:
|
|
7353
|
-
{ label:
|
|
7354
|
-
{ label:
|
|
7355
|
-
{ label:
|
|
7356
|
-
{ label:
|
|
7357
|
-
{ label:
|
|
8492
|
+
{ label: __58("Width", "elementor"), value: "width", isDisabled: true },
|
|
8493
|
+
{ label: __58("Height", "elementor"), value: "height", isDisabled: true },
|
|
8494
|
+
{ label: __58("Max height", "elementor"), value: "max-height", isDisabled: true },
|
|
8495
|
+
{ label: __58("Max width", "elementor"), value: "max-width", isDisabled: true },
|
|
8496
|
+
{ label: __58("Min height", "elementor"), value: "min-height", isDisabled: true },
|
|
8497
|
+
{ label: __58("Min width", "elementor"), value: "min-width", isDisabled: true }
|
|
7358
8498
|
]
|
|
7359
8499
|
},
|
|
7360
8500
|
{
|
|
7361
|
-
label:
|
|
8501
|
+
label: __58("Position", "elementor"),
|
|
7362
8502
|
type: "category",
|
|
7363
8503
|
properties: [
|
|
7364
|
-
{ label:
|
|
8504
|
+
{ label: __58("Top", "elementor"), value: "inset-block-start", isDisabled: true },
|
|
7365
8505
|
{
|
|
7366
|
-
label: isSiteRtl ?
|
|
8506
|
+
label: isSiteRtl ? __58("Right", "elementor") : __58("Left", "elementor"),
|
|
7367
8507
|
value: "inset-inline-start",
|
|
7368
8508
|
isDisabled: true
|
|
7369
8509
|
},
|
|
7370
8510
|
{
|
|
7371
|
-
label: isSiteRtl ?
|
|
8511
|
+
label: isSiteRtl ? __58("Left", "elementor") : __58("Right", "elementor"),
|
|
7372
8512
|
value: "inset-inline-end",
|
|
7373
8513
|
isDisabled: true
|
|
7374
8514
|
},
|
|
7375
|
-
{ label:
|
|
7376
|
-
{ label:
|
|
8515
|
+
{ label: __58("Bottom", "elementor"), value: "inset-block-end", isDisabled: true },
|
|
8516
|
+
{ label: __58("Z-index", "elementor"), value: "z-index", isDisabled: true }
|
|
7377
8517
|
]
|
|
7378
8518
|
},
|
|
7379
8519
|
{
|
|
7380
|
-
label:
|
|
8520
|
+
label: __58("Typography", "elementor"),
|
|
7381
8521
|
type: "category",
|
|
7382
8522
|
properties: [
|
|
7383
|
-
{ label:
|
|
7384
|
-
{ label:
|
|
7385
|
-
{ label:
|
|
7386
|
-
{ label:
|
|
7387
|
-
{ label:
|
|
7388
|
-
{ label:
|
|
7389
|
-
{ label:
|
|
8523
|
+
{ label: __58("Font color", "elementor"), value: "color", isDisabled: true },
|
|
8524
|
+
{ label: __58("Font size", "elementor"), value: "font-size", isDisabled: true },
|
|
8525
|
+
{ label: __58("Line height", "elementor"), value: "line-height", isDisabled: true },
|
|
8526
|
+
{ label: __58("Letter spacing", "elementor"), value: "letter-spacing", isDisabled: true },
|
|
8527
|
+
{ label: __58("Word spacing", "elementor"), value: "word-spacing", isDisabled: true },
|
|
8528
|
+
{ label: __58("Font variations", "elementor"), value: "font-variation-settings", isDisabled: true },
|
|
8529
|
+
{ label: __58("Text stroke color", "elementor"), value: "-webkit-text-stroke-color", isDisabled: true }
|
|
7390
8530
|
]
|
|
7391
8531
|
},
|
|
7392
8532
|
{
|
|
7393
|
-
label:
|
|
8533
|
+
label: __58("Background", "elementor"),
|
|
7394
8534
|
type: "category",
|
|
7395
8535
|
properties: [
|
|
7396
|
-
{ label:
|
|
7397
|
-
{ label:
|
|
7398
|
-
{ label:
|
|
8536
|
+
{ label: __58("Background color", "elementor"), value: "background-color", isDisabled: true },
|
|
8537
|
+
{ label: __58("Background position", "elementor"), value: "background-position", isDisabled: true },
|
|
8538
|
+
{ label: __58("Box shadow", "elementor"), value: "box-shadow", isDisabled: true }
|
|
7399
8539
|
]
|
|
7400
8540
|
},
|
|
7401
8541
|
{
|
|
7402
|
-
label:
|
|
8542
|
+
label: __58("Border", "elementor"),
|
|
7403
8543
|
type: "category",
|
|
7404
8544
|
properties: [
|
|
7405
|
-
{ label:
|
|
7406
|
-
{ label:
|
|
7407
|
-
{ label:
|
|
7408
|
-
{ label:
|
|
8545
|
+
{ label: __58("Border (all)", "elementor"), value: "border", isDisabled: true },
|
|
8546
|
+
{ label: __58("Border radius", "elementor"), value: "border-radius", isDisabled: true },
|
|
8547
|
+
{ label: __58("Border color", "elementor"), value: "border-color", isDisabled: true },
|
|
8548
|
+
{ label: __58("Border width", "elementor"), value: "border-width", isDisabled: true }
|
|
7409
8549
|
]
|
|
7410
8550
|
},
|
|
7411
8551
|
{
|
|
7412
|
-
label:
|
|
8552
|
+
label: __58("Effects", "elementor"),
|
|
7413
8553
|
type: "category",
|
|
7414
8554
|
properties: [
|
|
7415
|
-
{ label:
|
|
7416
|
-
{ label:
|
|
7417
|
-
{ label:
|
|
8555
|
+
{ label: __58("Opacity", "elementor"), value: "opacity", isDisabled: true },
|
|
8556
|
+
{ label: __58("Transform (all)", "elementor"), value: "transform", isDisabled: true },
|
|
8557
|
+
{ label: __58("Filter (all)", "elementor"), value: "filter", isDisabled: true }
|
|
7418
8558
|
]
|
|
7419
8559
|
}
|
|
7420
8560
|
];
|
|
@@ -7450,13 +8590,13 @@ function subscribeToTransitionEvent() {
|
|
|
7450
8590
|
}
|
|
7451
8591
|
|
|
7452
8592
|
// src/controls/transition-control/transition-selector.tsx
|
|
7453
|
-
import * as
|
|
7454
|
-
import { useMemo as
|
|
8593
|
+
import * as React114 from "react";
|
|
8594
|
+
import { useMemo as useMemo16, useRef as useRef29 } from "react";
|
|
7455
8595
|
import { keyValuePropTypeUtil as keyValuePropTypeUtil2 } from "@elementor/editor-props";
|
|
7456
8596
|
import { PromotionAlert, PromotionChip } from "@elementor/editor-ui";
|
|
7457
8597
|
import { ChevronDownIcon as ChevronDownIcon3, VariationsIcon } from "@elementor/icons";
|
|
7458
|
-
import { bindPopover as bindPopover7, bindTrigger as bindTrigger6, Box as
|
|
7459
|
-
import { __ as
|
|
8598
|
+
import { bindPopover as bindPopover7, bindTrigger as bindTrigger6, Box as Box27, Popover as Popover8, UnstableTag as UnstableTag3, usePopupState as usePopupState12 } from "@elementor/ui";
|
|
8599
|
+
import { __ as __59 } from "@wordpress/i18n";
|
|
7460
8600
|
|
|
7461
8601
|
// src/utils/tracking.ts
|
|
7462
8602
|
import { getSelectedElements as getSelectedElements2 } from "@elementor/editor-elements";
|
|
@@ -7537,9 +8677,9 @@ var TransitionSelector = ({
|
|
|
7537
8677
|
const {
|
|
7538
8678
|
key: { value: transitionLabel }
|
|
7539
8679
|
} = value;
|
|
7540
|
-
const defaultRef =
|
|
7541
|
-
const popoverState =
|
|
7542
|
-
const disabledCategories =
|
|
8680
|
+
const defaultRef = useRef29(null);
|
|
8681
|
+
const popoverState = usePopupState12({ variant: "popover" });
|
|
8682
|
+
const disabledCategories = useMemo16(() => {
|
|
7543
8683
|
return new Set(
|
|
7544
8684
|
transitionProperties.filter((cat) => cat.properties.some((prop) => prop.isDisabled)).map((cat) => cat.label)
|
|
7545
8685
|
);
|
|
@@ -7559,7 +8699,7 @@ var TransitionSelector = ({
|
|
|
7559
8699
|
return [
|
|
7560
8700
|
first,
|
|
7561
8701
|
{
|
|
7562
|
-
label:
|
|
8702
|
+
label: __59("Recently Used", "elementor"),
|
|
7563
8703
|
items: recentItems
|
|
7564
8704
|
},
|
|
7565
8705
|
...rest
|
|
@@ -7583,17 +8723,17 @@ var TransitionSelector = ({
|
|
|
7583
8723
|
left: rect.right + 36
|
|
7584
8724
|
};
|
|
7585
8725
|
};
|
|
7586
|
-
return /* @__PURE__ */
|
|
8726
|
+
return /* @__PURE__ */ React114.createElement(Box27, { ref: defaultRef }, /* @__PURE__ */ React114.createElement(ControlActions, null, /* @__PURE__ */ React114.createElement(
|
|
7587
8727
|
UnstableTag3,
|
|
7588
8728
|
{
|
|
7589
8729
|
variant: "outlined",
|
|
7590
8730
|
label: transitionLabel,
|
|
7591
|
-
endIcon: /* @__PURE__ */
|
|
8731
|
+
endIcon: /* @__PURE__ */ React114.createElement(ChevronDownIcon3, { fontSize: "tiny" }),
|
|
7592
8732
|
...bindTrigger6(popoverState),
|
|
7593
8733
|
fullWidth: true
|
|
7594
8734
|
}
|
|
7595
|
-
)), /* @__PURE__ */
|
|
7596
|
-
|
|
8735
|
+
)), /* @__PURE__ */ React114.createElement(
|
|
8736
|
+
Popover8,
|
|
7597
8737
|
{
|
|
7598
8738
|
disablePortal: true,
|
|
7599
8739
|
disableScrollLock: true,
|
|
@@ -7603,7 +8743,7 @@ var TransitionSelector = ({
|
|
|
7603
8743
|
anchorOrigin: { vertical: "top", horizontal: "right" },
|
|
7604
8744
|
transformOrigin: { vertical: "top", horizontal: "left" }
|
|
7605
8745
|
},
|
|
7606
|
-
/* @__PURE__ */
|
|
8746
|
+
/* @__PURE__ */ React114.createElement(
|
|
7607
8747
|
ItemSelector,
|
|
7608
8748
|
{
|
|
7609
8749
|
itemsList: getItemList(),
|
|
@@ -7611,11 +8751,11 @@ var TransitionSelector = ({
|
|
|
7611
8751
|
onItemChange: handleTransitionPropertyChange,
|
|
7612
8752
|
onClose: popoverState.close,
|
|
7613
8753
|
sectionWidth: 268,
|
|
7614
|
-
title:
|
|
8754
|
+
title: __59("Transition Property", "elementor"),
|
|
7615
8755
|
icon: VariationsIcon,
|
|
7616
8756
|
disabledItems: includeCurrentValueInOptions(value, disabledItems),
|
|
7617
|
-
categoryItemContentTemplate: (item) => /* @__PURE__ */
|
|
7618
|
-
|
|
8757
|
+
categoryItemContentTemplate: (item) => /* @__PURE__ */ React114.createElement(
|
|
8758
|
+
Box27,
|
|
7619
8759
|
{
|
|
7620
8760
|
sx: {
|
|
7621
8761
|
display: "flex",
|
|
@@ -7624,13 +8764,13 @@ var TransitionSelector = ({
|
|
|
7624
8764
|
width: "100%"
|
|
7625
8765
|
}
|
|
7626
8766
|
},
|
|
7627
|
-
/* @__PURE__ */
|
|
7628
|
-
showPromotion && disabledCategories.has(item.value) && /* @__PURE__ */
|
|
8767
|
+
/* @__PURE__ */ React114.createElement("span", null, item.value),
|
|
8768
|
+
showPromotion && disabledCategories.has(item.value) && /* @__PURE__ */ React114.createElement(PromotionChip, null)
|
|
7629
8769
|
),
|
|
7630
|
-
footer: showPromotion ? /* @__PURE__ */
|
|
8770
|
+
footer: showPromotion ? /* @__PURE__ */ React114.createElement(
|
|
7631
8771
|
PromotionAlert,
|
|
7632
8772
|
{
|
|
7633
|
-
message:
|
|
8773
|
+
message: __59(
|
|
7634
8774
|
"Upgrade to customize transition properties and control effects.",
|
|
7635
8775
|
"elementor"
|
|
7636
8776
|
),
|
|
@@ -7669,8 +8809,8 @@ var areAllPropertiesUsed = (value = []) => {
|
|
|
7669
8809
|
};
|
|
7670
8810
|
var getSelectionSizeProps = (recentlyUsedList, disabledItems, showPromotion) => {
|
|
7671
8811
|
return {
|
|
7672
|
-
selectionLabel:
|
|
7673
|
-
sizeLabel:
|
|
8812
|
+
selectionLabel: __60("Type", "elementor"),
|
|
8813
|
+
sizeLabel: __60("Duration", "elementor"),
|
|
7674
8814
|
selectionConfig: {
|
|
7675
8815
|
component: TransitionSelector,
|
|
7676
8816
|
props: {
|
|
@@ -7746,7 +8886,7 @@ var getInitialValue = (values = []) => {
|
|
|
7746
8886
|
}
|
|
7747
8887
|
return initialTransitionValue;
|
|
7748
8888
|
};
|
|
7749
|
-
var disableAddItemTooltipContent = /* @__PURE__ */
|
|
8889
|
+
var disableAddItemTooltipContent = /* @__PURE__ */ React115.createElement(
|
|
7750
8890
|
Alert2,
|
|
7751
8891
|
{
|
|
7752
8892
|
sx: {
|
|
@@ -7754,10 +8894,10 @@ var disableAddItemTooltipContent = /* @__PURE__ */ React108.createElement(
|
|
|
7754
8894
|
gap: 0.5
|
|
7755
8895
|
},
|
|
7756
8896
|
color: "secondary",
|
|
7757
|
-
icon: /* @__PURE__ */
|
|
8897
|
+
icon: /* @__PURE__ */ React115.createElement(InfoCircleFilledIcon3, null)
|
|
7758
8898
|
},
|
|
7759
|
-
/* @__PURE__ */
|
|
7760
|
-
/* @__PURE__ */
|
|
8899
|
+
/* @__PURE__ */ React115.createElement(AlertTitle3, null, __60("Transitions", "elementor")),
|
|
8900
|
+
/* @__PURE__ */ React115.createElement(Box28, { component: "span" }, /* @__PURE__ */ React115.createElement(Typography12, { variant: "body2" }, __60("Switch to 'Normal' state to add a transition.", "elementor")))
|
|
7761
8901
|
);
|
|
7762
8902
|
var TransitionRepeaterControl = createControl(
|
|
7763
8903
|
({
|
|
@@ -7765,14 +8905,14 @@ var TransitionRepeaterControl = createControl(
|
|
|
7765
8905
|
currentStyleState
|
|
7766
8906
|
}) => {
|
|
7767
8907
|
const currentStyleIsNormal = currentStyleState === null;
|
|
7768
|
-
const [recentlyUsedList, setRecentlyUsedList] =
|
|
8908
|
+
const [recentlyUsedList, setRecentlyUsedList] = useState20([]);
|
|
7769
8909
|
const proInstalled = hasProInstalled2();
|
|
7770
8910
|
const { value, setValue } = useBoundProp(childArrayPropTypeUtil);
|
|
7771
|
-
const { allDisabled: disabledItems, proDisabled: proDisabledItems } =
|
|
8911
|
+
const { allDisabled: disabledItems, proDisabled: proDisabledItems } = useMemo17(
|
|
7772
8912
|
() => getDisabledItemLabels(value),
|
|
7773
8913
|
[value]
|
|
7774
8914
|
);
|
|
7775
|
-
const allowedTransitionSet =
|
|
8915
|
+
const allowedTransitionSet = useMemo17(() => {
|
|
7776
8916
|
const set = /* @__PURE__ */ new Set();
|
|
7777
8917
|
transitionProperties.forEach((category) => {
|
|
7778
8918
|
category.properties.forEach((prop) => {
|
|
@@ -7798,15 +8938,15 @@ var TransitionRepeaterControl = createControl(
|
|
|
7798
8938
|
useEffect17(() => {
|
|
7799
8939
|
recentlyUsedListGetter().then(setRecentlyUsedList);
|
|
7800
8940
|
}, [recentlyUsedListGetter]);
|
|
7801
|
-
const allPropertiesUsed =
|
|
8941
|
+
const allPropertiesUsed = useMemo17(() => areAllPropertiesUsed(value), [value]);
|
|
7802
8942
|
const isAddItemDisabled = !currentStyleIsNormal || allPropertiesUsed;
|
|
7803
|
-
return /* @__PURE__ */
|
|
8943
|
+
return /* @__PURE__ */ React115.createElement(
|
|
7804
8944
|
RepeatableControl,
|
|
7805
8945
|
{
|
|
7806
|
-
label:
|
|
7807
|
-
repeaterLabel:
|
|
8946
|
+
label: __60("Transitions", "elementor"),
|
|
8947
|
+
repeaterLabel: __60("Transitions", "elementor"),
|
|
7808
8948
|
patternLabel: "${value.selection.value.key.value}: ${value.size.value.size}${value.size.value.unit}",
|
|
7809
|
-
placeholder:
|
|
8949
|
+
placeholder: __60("Empty Transition", "elementor"),
|
|
7810
8950
|
showDuplicate: false,
|
|
7811
8951
|
showToggle: true,
|
|
7812
8952
|
initialValues: getInitialValue(value),
|
|
@@ -7827,11 +8967,11 @@ var TransitionRepeaterControl = createControl(
|
|
|
7827
8967
|
);
|
|
7828
8968
|
|
|
7829
8969
|
// src/controls/date-time-control.tsx
|
|
7830
|
-
import * as
|
|
8970
|
+
import * as React116 from "react";
|
|
7831
8971
|
import * as dayjs from "dayjs";
|
|
7832
8972
|
import { isTransformable as isTransformable2, stringPropTypeUtil as stringPropTypeUtil20 } from "@elementor/editor-props";
|
|
7833
8973
|
import { DateTimePropTypeUtil } from "@elementor/editor-props";
|
|
7834
|
-
import { Box as
|
|
8974
|
+
import { Box as Box29, DatePicker, LocalizationProvider, TimePicker } from "@elementor/ui";
|
|
7835
8975
|
var DATE_FORMAT = "YYYY-MM-DD";
|
|
7836
8976
|
var TIME_FORMAT = "HH:mm";
|
|
7837
8977
|
var DateTimeControl = createControl(({ inputDisabled }) => {
|
|
@@ -7875,7 +9015,7 @@ var DateTimeControl = createControl(({ inputDisabled }) => {
|
|
|
7875
9015
|
const base = dayjs.default();
|
|
7876
9016
|
return base.hour(h).minute(m).second(0).millisecond(0);
|
|
7877
9017
|
};
|
|
7878
|
-
return /* @__PURE__ */
|
|
9018
|
+
return /* @__PURE__ */ React116.createElement(PropProvider, { ...propContext, value, setValue }, /* @__PURE__ */ React116.createElement(ControlActions, null, /* @__PURE__ */ React116.createElement(LocalizationProvider, null, /* @__PURE__ */ React116.createElement(Box29, { display: "flex", gap: 1, alignItems: "center" }, /* @__PURE__ */ React116.createElement(PropKeyProvider, { bind: "date" }, /* @__PURE__ */ React116.createElement(
|
|
7879
9019
|
DatePicker,
|
|
7880
9020
|
{
|
|
7881
9021
|
value: parseDateValue(stringPropTypeUtil20.extract(value?.date)),
|
|
@@ -7887,7 +9027,7 @@ var DateTimeControl = createControl(({ inputDisabled }) => {
|
|
|
7887
9027
|
openPickerIcon: { fontSize: "tiny" }
|
|
7888
9028
|
}
|
|
7889
9029
|
}
|
|
7890
|
-
)), /* @__PURE__ */
|
|
9030
|
+
)), /* @__PURE__ */ React116.createElement(PropKeyProvider, { bind: "time" }, /* @__PURE__ */ React116.createElement(
|
|
7891
9031
|
TimePicker,
|
|
7892
9032
|
{
|
|
7893
9033
|
value: parseTimeValue(stringPropTypeUtil20.extract(value?.time)),
|
|
@@ -7903,13 +9043,13 @@ var DateTimeControl = createControl(({ inputDisabled }) => {
|
|
|
7903
9043
|
});
|
|
7904
9044
|
|
|
7905
9045
|
// src/controls/date-range-control.tsx
|
|
7906
|
-
import * as
|
|
9046
|
+
import * as React118 from "react";
|
|
7907
9047
|
import { dateRangePropTypeUtil, dateStringPropTypeUtil as dateStringPropTypeUtil2 } from "@elementor/editor-props";
|
|
7908
|
-
import { FormHelperText as FormHelperText2, Grid as Grid30, Stack as
|
|
7909
|
-
import { __ as
|
|
9048
|
+
import { FormHelperText as FormHelperText2, Grid as Grid30, Stack as Stack21 } from "@elementor/ui";
|
|
9049
|
+
import { __ as __61 } from "@wordpress/i18n";
|
|
7910
9050
|
|
|
7911
9051
|
// src/controls/date-string-control.tsx
|
|
7912
|
-
import * as
|
|
9052
|
+
import * as React117 from "react";
|
|
7913
9053
|
import { dateStringPropTypeUtil } from "@elementor/editor-props";
|
|
7914
9054
|
import { DatePicker as DatePicker2, LocalizationProvider as LocalizationProvider2 } from "@elementor/ui";
|
|
7915
9055
|
|
|
@@ -7968,7 +9108,7 @@ var DateStringControl = createControl(
|
|
|
7968
9108
|
}
|
|
7969
9109
|
setValue(newValue.format(format));
|
|
7970
9110
|
};
|
|
7971
|
-
return /* @__PURE__ */
|
|
9111
|
+
return /* @__PURE__ */ React117.createElement(LocalizationProvider2, null, /* @__PURE__ */ React117.createElement(ControlActions, null, /* @__PURE__ */ React117.createElement(
|
|
7972
9112
|
DatePicker2,
|
|
7973
9113
|
{
|
|
7974
9114
|
value: parseDateString(value ?? ""),
|
|
@@ -7982,8 +9122,8 @@ var DateStringControl = createControl(
|
|
|
7982
9122
|
|
|
7983
9123
|
// src/controls/date-range-control.tsx
|
|
7984
9124
|
var RANGE_LABELS = {
|
|
7985
|
-
min:
|
|
7986
|
-
max:
|
|
9125
|
+
min: __61("Min date", "elementor"),
|
|
9126
|
+
max: __61("Max date", "elementor")
|
|
7987
9127
|
};
|
|
7988
9128
|
var isMaxBeforeMin = (minIso, maxIso) => {
|
|
7989
9129
|
if (!minIso || !maxIso) {
|
|
@@ -7991,38 +9131,38 @@ var isMaxBeforeMin = (minIso, maxIso) => {
|
|
|
7991
9131
|
}
|
|
7992
9132
|
return maxIso < minIso;
|
|
7993
9133
|
};
|
|
7994
|
-
var RANGE_ERROR_MESSAGE =
|
|
9134
|
+
var RANGE_ERROR_MESSAGE = __61("Max date must be on or after Min date", "elementor");
|
|
7995
9135
|
var DateRangeControl = createControl(() => {
|
|
7996
9136
|
const { value, setValue, ...propContext } = useBoundProp(dateRangePropTypeUtil);
|
|
7997
9137
|
const minString = dateStringPropTypeUtil2.extract(value?.min);
|
|
7998
9138
|
const maxString = dateStringPropTypeUtil2.extract(value?.max);
|
|
7999
9139
|
const hasInvalidRange = isMaxBeforeMin(minString, maxString);
|
|
8000
|
-
return /* @__PURE__ */
|
|
9140
|
+
return /* @__PURE__ */ React118.createElement(PropProvider, { ...propContext, value, setValue }, /* @__PURE__ */ React118.createElement(Stack21, { gap: 0.75 }, /* @__PURE__ */ React118.createElement(Stack21, { direction: "row", gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React118.createElement(Grid30, { container: true, gap: 0.75, alignItems: "center" }, /* @__PURE__ */ React118.createElement(Grid30, { item: true, xs: 12 }, /* @__PURE__ */ React118.createElement(ControlFormLabel, null, RANGE_LABELS.min)), /* @__PURE__ */ React118.createElement(Grid30, { item: true, xs: 12 }, /* @__PURE__ */ React118.createElement(
|
|
8001
9141
|
BoundDateStringControl,
|
|
8002
9142
|
{
|
|
8003
9143
|
bind: "min",
|
|
8004
9144
|
ariaLabel: RANGE_LABELS.min,
|
|
8005
9145
|
error: hasInvalidRange
|
|
8006
9146
|
}
|
|
8007
|
-
))), /* @__PURE__ */
|
|
9147
|
+
))), /* @__PURE__ */ React118.createElement(Grid30, { container: true, gap: 0.75, alignItems: "center" }, /* @__PURE__ */ React118.createElement(Grid30, { item: true, xs: 12 }, /* @__PURE__ */ React118.createElement(ControlFormLabel, null, RANGE_LABELS.max)), /* @__PURE__ */ React118.createElement(Grid30, { item: true, xs: 12 }, /* @__PURE__ */ React118.createElement(
|
|
8008
9148
|
BoundDateStringControl,
|
|
8009
9149
|
{
|
|
8010
9150
|
bind: "max",
|
|
8011
9151
|
ariaLabel: RANGE_LABELS.max,
|
|
8012
9152
|
error: hasInvalidRange
|
|
8013
9153
|
}
|
|
8014
|
-
)))), hasInvalidRange && /* @__PURE__ */
|
|
9154
|
+
)))), hasInvalidRange && /* @__PURE__ */ React118.createElement(FormHelperText2, { error: true }, RANGE_ERROR_MESSAGE)));
|
|
8015
9155
|
});
|
|
8016
9156
|
var BoundDateStringControl = ({
|
|
8017
9157
|
bind,
|
|
8018
9158
|
ariaLabel,
|
|
8019
9159
|
error
|
|
8020
9160
|
}) => {
|
|
8021
|
-
return /* @__PURE__ */
|
|
9161
|
+
return /* @__PURE__ */ React118.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React118.createElement(DateStringControl, { ariaLabel, error, coerceInvalidToNull: true }));
|
|
8022
9162
|
};
|
|
8023
9163
|
|
|
8024
9164
|
// src/controls/time-string-control.tsx
|
|
8025
|
-
import * as
|
|
9165
|
+
import * as React119 from "react";
|
|
8026
9166
|
import { timeStringPropTypeUtil } from "@elementor/editor-props";
|
|
8027
9167
|
import { LocalizationProvider as LocalizationProvider3, TimePicker as TimePicker2 } from "@elementor/ui";
|
|
8028
9168
|
var TimeStringControl = createControl(
|
|
@@ -8050,7 +9190,7 @@ var TimeStringControl = createControl(
|
|
|
8050
9190
|
}
|
|
8051
9191
|
setValue(newValue.format(format));
|
|
8052
9192
|
};
|
|
8053
|
-
return /* @__PURE__ */
|
|
9193
|
+
return /* @__PURE__ */ React119.createElement(LocalizationProvider3, null, /* @__PURE__ */ React119.createElement(ControlActions, null, /* @__PURE__ */ React119.createElement(
|
|
8054
9194
|
TimePicker2,
|
|
8055
9195
|
{
|
|
8056
9196
|
value: parseTimeString(value ?? ""),
|
|
@@ -8063,38 +9203,38 @@ var TimeStringControl = createControl(
|
|
|
8063
9203
|
);
|
|
8064
9204
|
|
|
8065
9205
|
// src/controls/time-range-control.tsx
|
|
8066
|
-
import * as
|
|
9206
|
+
import * as React120 from "react";
|
|
8067
9207
|
import { timeRangePropTypeUtil } from "@elementor/editor-props";
|
|
8068
|
-
import { Grid as Grid31, Stack as
|
|
8069
|
-
import { __ as
|
|
9208
|
+
import { Grid as Grid31, Stack as Stack22 } from "@elementor/ui";
|
|
9209
|
+
import { __ as __62 } from "@wordpress/i18n";
|
|
8070
9210
|
var RANGE_LABELS2 = {
|
|
8071
|
-
min:
|
|
8072
|
-
max:
|
|
9211
|
+
min: __62("Start time", "elementor"),
|
|
9212
|
+
max: __62("End time", "elementor")
|
|
8073
9213
|
};
|
|
8074
9214
|
var TimeRangeControl = createControl(() => {
|
|
8075
9215
|
const { value, setValue, ...propContext } = useBoundProp(timeRangePropTypeUtil);
|
|
8076
|
-
return /* @__PURE__ */
|
|
9216
|
+
return /* @__PURE__ */ React120.createElement(PropProvider, { ...propContext, value, setValue }, /* @__PURE__ */ React120.createElement(Stack22, { direction: "row", gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React120.createElement(Grid31, { container: true, gap: 0.75, alignItems: "center" }, /* @__PURE__ */ React120.createElement(Grid31, { item: true, xs: 12 }, /* @__PURE__ */ React120.createElement(ControlFormLabel, null, RANGE_LABELS2.min)), /* @__PURE__ */ React120.createElement(Grid31, { item: true, xs: 12 }, /* @__PURE__ */ React120.createElement(BoundTimeStringControl, { bind: "min", ariaLabel: RANGE_LABELS2.min }))), /* @__PURE__ */ React120.createElement(Grid31, { container: true, gap: 0.75, alignItems: "center" }, /* @__PURE__ */ React120.createElement(Grid31, { item: true, xs: 12 }, /* @__PURE__ */ React120.createElement(ControlFormLabel, null, RANGE_LABELS2.max)), /* @__PURE__ */ React120.createElement(Grid31, { item: true, xs: 12 }, /* @__PURE__ */ React120.createElement(BoundTimeStringControl, { bind: "max", ariaLabel: RANGE_LABELS2.max })))));
|
|
8077
9217
|
});
|
|
8078
9218
|
var BoundTimeStringControl = ({ bind, ariaLabel }) => {
|
|
8079
|
-
return /* @__PURE__ */
|
|
9219
|
+
return /* @__PURE__ */ React120.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React120.createElement(TimeStringControl, { ariaLabel, coerceInvalidToNull: true }));
|
|
8080
9220
|
};
|
|
8081
9221
|
|
|
8082
9222
|
// src/controls/inline-editing-control.tsx
|
|
8083
|
-
import * as
|
|
8084
|
-
import { useCallback as useCallback4, useState as
|
|
9223
|
+
import * as React124 from "react";
|
|
9224
|
+
import { useCallback as useCallback4, useState as useState22 } from "react";
|
|
8085
9225
|
import { escapedHtmlPropTypeUtil as escapedHtmlPropTypeUtil2 } from "@elementor/editor-props";
|
|
8086
|
-
import { Box as
|
|
9226
|
+
import { Box as Box32 } from "@elementor/ui";
|
|
8087
9227
|
|
|
8088
9228
|
// src/components/inline-editor.tsx
|
|
8089
|
-
import * as
|
|
8090
|
-
import { useEffect as useEffect18, useRef as
|
|
8091
|
-
import { Box as
|
|
9229
|
+
import * as React121 from "react";
|
|
9230
|
+
import { useEffect as useEffect18, useRef as useRef30 } from "react";
|
|
9231
|
+
import { Box as Box30 } from "@elementor/ui";
|
|
8092
9232
|
import Bold from "@tiptap/extension-bold";
|
|
8093
9233
|
import Document from "@tiptap/extension-document";
|
|
8094
9234
|
import HardBreak from "@tiptap/extension-hard-break";
|
|
8095
9235
|
import Heading from "@tiptap/extension-heading";
|
|
8096
9236
|
import Italic from "@tiptap/extension-italic";
|
|
8097
|
-
import
|
|
9237
|
+
import Link4 from "@tiptap/extension-link";
|
|
8098
9238
|
import Paragraph from "@tiptap/extension-paragraph";
|
|
8099
9239
|
import Strike from "@tiptap/extension-strike";
|
|
8100
9240
|
import Subscript from "@tiptap/extension-subscript";
|
|
@@ -8133,7 +9273,7 @@ function extractInlineHtmlContent(propValue) {
|
|
|
8133
9273
|
var ITALIC_KEYBOARD_SHORTCUT = "i";
|
|
8134
9274
|
var BOLD_KEYBOARD_SHORTCUT = "b";
|
|
8135
9275
|
var UNDERLINE_KEYBOARD_SHORTCUT = "u";
|
|
8136
|
-
var InlineEditor =
|
|
9276
|
+
var InlineEditor = React121.forwardRef((props, ref) => {
|
|
8137
9277
|
const {
|
|
8138
9278
|
value,
|
|
8139
9279
|
setValue,
|
|
@@ -8150,8 +9290,8 @@ var InlineEditor = React114.forwardRef((props, ref) => {
|
|
|
8150
9290
|
onSelectionEnd,
|
|
8151
9291
|
mountElement = null
|
|
8152
9292
|
} = props;
|
|
8153
|
-
const containerRef =
|
|
8154
|
-
const onBlurRef =
|
|
9293
|
+
const containerRef = useRef30(null);
|
|
9294
|
+
const onBlurRef = useRef30(onBlur);
|
|
8155
9295
|
onBlurRef.current = onBlur;
|
|
8156
9296
|
const documentContentSettings = !!expectedTag ? "block+" : "inline*";
|
|
8157
9297
|
const onUpdate = ({ editor: updatedEditor }) => {
|
|
@@ -8196,7 +9336,7 @@ var InlineEditor = React114.forwardRef((props, ref) => {
|
|
|
8196
9336
|
}).configure({
|
|
8197
9337
|
levels: [1, 2, 3, 4, 5, 6]
|
|
8198
9338
|
}),
|
|
8199
|
-
|
|
9339
|
+
Link4.configure({
|
|
8200
9340
|
openOnClick: false
|
|
8201
9341
|
}),
|
|
8202
9342
|
Text,
|
|
@@ -8246,10 +9386,10 @@ var InlineEditor = React114.forwardRef((props, ref) => {
|
|
|
8246
9386
|
if (mountElement) {
|
|
8247
9387
|
return null;
|
|
8248
9388
|
}
|
|
8249
|
-
return /* @__PURE__ */
|
|
9389
|
+
return /* @__PURE__ */ React121.createElement(Box30, { ref: containerRef, sx, className: wrapperClassName }, /* @__PURE__ */ React121.createElement(EditorContent, { ref, editor }));
|
|
8250
9390
|
});
|
|
8251
9391
|
var useOnUpdate = (callback, dependencies) => {
|
|
8252
|
-
const hasMounted =
|
|
9392
|
+
const hasMounted = useRef30(false);
|
|
8253
9393
|
useEffect18(() => {
|
|
8254
9394
|
if (hasMounted.current) {
|
|
8255
9395
|
callback();
|
|
@@ -8260,8 +9400,8 @@ var useOnUpdate = (callback, dependencies) => {
|
|
|
8260
9400
|
};
|
|
8261
9401
|
|
|
8262
9402
|
// src/components/inline-editor-toolbar.tsx
|
|
8263
|
-
import * as
|
|
8264
|
-
import { useEffect as useEffect20, useMemo as
|
|
9403
|
+
import * as React123 from "react";
|
|
9404
|
+
import { useEffect as useEffect20, useMemo as useMemo18, useRef as useRef32, useState as useState21 } from "react";
|
|
8265
9405
|
import { getContainer as getContainer2, getElementSetting } from "@elementor/editor-elements";
|
|
8266
9406
|
import {
|
|
8267
9407
|
BoldIcon,
|
|
@@ -8274,23 +9414,23 @@ import {
|
|
|
8274
9414
|
UnderlineIcon
|
|
8275
9415
|
} from "@elementor/icons";
|
|
8276
9416
|
import {
|
|
8277
|
-
Box as
|
|
9417
|
+
Box as Box31,
|
|
8278
9418
|
IconButton as IconButton9,
|
|
8279
|
-
ToggleButton as
|
|
9419
|
+
ToggleButton as ToggleButton5,
|
|
8280
9420
|
ToggleButtonGroup as ToggleButtonGroup2,
|
|
8281
9421
|
toggleButtonGroupClasses,
|
|
8282
|
-
Tooltip as
|
|
8283
|
-
usePopupState as
|
|
9422
|
+
Tooltip as Tooltip13,
|
|
9423
|
+
usePopupState as usePopupState13
|
|
8284
9424
|
} from "@elementor/ui";
|
|
8285
9425
|
import { useEditorState } from "@tiptap/react";
|
|
8286
|
-
import { __ as
|
|
9426
|
+
import { __ as __64 } from "@wordpress/i18n";
|
|
8287
9427
|
|
|
8288
9428
|
// src/components/url-popover.tsx
|
|
8289
|
-
import * as
|
|
8290
|
-
import { useEffect as useEffect19, useRef as
|
|
9429
|
+
import * as React122 from "react";
|
|
9430
|
+
import { useEffect as useEffect19, useRef as useRef31 } from "react";
|
|
8291
9431
|
import { ExternalLinkIcon } from "@elementor/icons";
|
|
8292
|
-
import { bindPopover as bindPopover8, Popover as
|
|
8293
|
-
import { __ as
|
|
9432
|
+
import { bindPopover as bindPopover8, Popover as Popover9, Stack as Stack23, TextField as TextField11, ToggleButton as ToggleButton4, Tooltip as Tooltip12 } from "@elementor/ui";
|
|
9433
|
+
import { __ as __63 } from "@wordpress/i18n";
|
|
8294
9434
|
var UrlPopover = ({
|
|
8295
9435
|
popupState,
|
|
8296
9436
|
restoreValue,
|
|
@@ -8300,7 +9440,7 @@ var UrlPopover = ({
|
|
|
8300
9440
|
openInNewTab,
|
|
8301
9441
|
onToggleNewTab
|
|
8302
9442
|
}) => {
|
|
8303
|
-
const inputRef =
|
|
9443
|
+
const inputRef = useRef31(null);
|
|
8304
9444
|
useEffect19(() => {
|
|
8305
9445
|
if (popupState.isOpen) {
|
|
8306
9446
|
requestAnimationFrame(() => inputRef.current?.focus());
|
|
@@ -8310,8 +9450,8 @@ var UrlPopover = ({
|
|
|
8310
9450
|
restoreValue();
|
|
8311
9451
|
popupState.close();
|
|
8312
9452
|
};
|
|
8313
|
-
return /* @__PURE__ */
|
|
8314
|
-
|
|
9453
|
+
return /* @__PURE__ */ React122.createElement(
|
|
9454
|
+
Popover9,
|
|
8315
9455
|
{
|
|
8316
9456
|
slotProps: {
|
|
8317
9457
|
paper: { sx: { borderRadius: "16px", width: anchorRef.current?.offsetWidth + "px", marginTop: -1 } }
|
|
@@ -8321,30 +9461,30 @@ var UrlPopover = ({
|
|
|
8321
9461
|
transformOrigin: { vertical: "top", horizontal: "left" },
|
|
8322
9462
|
onClose: handleClose
|
|
8323
9463
|
},
|
|
8324
|
-
/* @__PURE__ */
|
|
9464
|
+
/* @__PURE__ */ React122.createElement(Stack23, { direction: "row", alignItems: "center", gap: 1, sx: { p: 1.5 } }, /* @__PURE__ */ React122.createElement(
|
|
8325
9465
|
TextField11,
|
|
8326
9466
|
{
|
|
8327
9467
|
value,
|
|
8328
9468
|
onChange,
|
|
8329
9469
|
size: "tiny",
|
|
8330
9470
|
fullWidth: true,
|
|
8331
|
-
placeholder:
|
|
9471
|
+
placeholder: __63("Type a URL", "elementor"),
|
|
8332
9472
|
inputProps: { ref: inputRef },
|
|
8333
9473
|
color: "secondary",
|
|
8334
9474
|
InputProps: { sx: { borderRadius: "8px" } },
|
|
8335
9475
|
onKeyUp: (event) => event.key === "Enter" && handleClose()
|
|
8336
9476
|
}
|
|
8337
|
-
), /* @__PURE__ */
|
|
8338
|
-
|
|
9477
|
+
), /* @__PURE__ */ React122.createElement(Tooltip12, { title: __63("Open in a new tab", "elementor") }, /* @__PURE__ */ React122.createElement(
|
|
9478
|
+
ToggleButton4,
|
|
8339
9479
|
{
|
|
8340
9480
|
size: "tiny",
|
|
8341
9481
|
value: "newTab",
|
|
8342
9482
|
selected: openInNewTab,
|
|
8343
9483
|
onClick: onToggleNewTab,
|
|
8344
|
-
"aria-label":
|
|
9484
|
+
"aria-label": __63("Open in a new tab", "elementor"),
|
|
8345
9485
|
sx: { borderRadius: "8px" }
|
|
8346
9486
|
},
|
|
8347
|
-
/* @__PURE__ */
|
|
9487
|
+
/* @__PURE__ */ React122.createElement(ExternalLinkIcon, { fontSize: "tiny" })
|
|
8348
9488
|
)))
|
|
8349
9489
|
);
|
|
8350
9490
|
};
|
|
@@ -8356,16 +9496,16 @@ var InlineEditorToolbar = ({
|
|
|
8356
9496
|
sx = {},
|
|
8357
9497
|
inControlPanel = false
|
|
8358
9498
|
}) => {
|
|
8359
|
-
const [urlValue, setUrlValue] =
|
|
8360
|
-
const [openInNewTab, setOpenInNewTab] =
|
|
8361
|
-
const toolbarRef =
|
|
8362
|
-
const linkPopupState =
|
|
9499
|
+
const [urlValue, setUrlValue] = useState21("");
|
|
9500
|
+
const [openInNewTab, setOpenInNewTab] = useState21(false);
|
|
9501
|
+
const toolbarRef = useRef32(null);
|
|
9502
|
+
const linkPopupState = usePopupState13({ variant: "popover" });
|
|
8363
9503
|
const isElementClickable = elementId ? checkIfElementIsClickable(elementId) : false;
|
|
8364
9504
|
const editorState = useEditorState({
|
|
8365
9505
|
editor,
|
|
8366
9506
|
selector: (ctx) => possibleFormats.filter((format) => ctx.editor.isActive(format))
|
|
8367
9507
|
});
|
|
8368
|
-
const formatButtonsList =
|
|
9508
|
+
const formatButtonsList = useMemo18(() => {
|
|
8369
9509
|
const buttons = Object.values(formatButtons);
|
|
8370
9510
|
if (isElementClickable) {
|
|
8371
9511
|
return buttons.filter((button) => button.action !== "link");
|
|
@@ -8407,8 +9547,8 @@ var InlineEditorToolbar = ({
|
|
|
8407
9547
|
editor?.commands?.focus();
|
|
8408
9548
|
}
|
|
8409
9549
|
}, [editor, inControlPanel]);
|
|
8410
|
-
return /* @__PURE__ */
|
|
8411
|
-
|
|
9550
|
+
return /* @__PURE__ */ React123.createElement(
|
|
9551
|
+
Box31,
|
|
8412
9552
|
{
|
|
8413
9553
|
ref: toolbarRef,
|
|
8414
9554
|
sx: {
|
|
@@ -8441,8 +9581,8 @@ var InlineEditorToolbar = ({
|
|
|
8441
9581
|
}
|
|
8442
9582
|
}
|
|
8443
9583
|
},
|
|
8444
|
-
/* @__PURE__ */
|
|
8445
|
-
/* @__PURE__ */
|
|
9584
|
+
/* @__PURE__ */ React123.createElement(Tooltip13, { title: clearButton.label, placement: "top", sx: { borderRadius: "8px" } }, /* @__PURE__ */ React123.createElement(IconButton9, { "aria-label": clearButton.label, onClick: () => clearButton.method(editor), size: "tiny" }, clearButton.icon)),
|
|
9585
|
+
/* @__PURE__ */ React123.createElement(
|
|
8446
9586
|
ToggleButtonGroup2,
|
|
8447
9587
|
{
|
|
8448
9588
|
value: editorState,
|
|
@@ -8472,8 +9612,8 @@ var InlineEditorToolbar = ({
|
|
|
8472
9612
|
}
|
|
8473
9613
|
}
|
|
8474
9614
|
},
|
|
8475
|
-
formatButtonsList.map((button) => /* @__PURE__ */
|
|
8476
|
-
|
|
9615
|
+
formatButtonsList.map((button) => /* @__PURE__ */ React123.createElement(Tooltip13, { title: button.label, key: button.action, placement: "top" }, /* @__PURE__ */ React123.createElement(
|
|
9616
|
+
ToggleButton5,
|
|
8477
9617
|
{
|
|
8478
9618
|
value: button.action,
|
|
8479
9619
|
"aria-label": button.label,
|
|
@@ -8490,7 +9630,7 @@ var InlineEditorToolbar = ({
|
|
|
8490
9630
|
button.icon
|
|
8491
9631
|
)))
|
|
8492
9632
|
),
|
|
8493
|
-
/* @__PURE__ */
|
|
9633
|
+
/* @__PURE__ */ React123.createElement(
|
|
8494
9634
|
UrlPopover,
|
|
8495
9635
|
{
|
|
8496
9636
|
popupState: linkPopupState,
|
|
@@ -8513,64 +9653,64 @@ var checkIfElementIsClickable = (elementId) => {
|
|
|
8513
9653
|
};
|
|
8514
9654
|
var toolbarButtons = {
|
|
8515
9655
|
clear: {
|
|
8516
|
-
label:
|
|
8517
|
-
icon: /* @__PURE__ */
|
|
9656
|
+
label: __64("Clear", "elementor"),
|
|
9657
|
+
icon: /* @__PURE__ */ React123.createElement(MinusIcon2, { fontSize: "tiny" }),
|
|
8518
9658
|
action: "clear",
|
|
8519
9659
|
method: (editor) => {
|
|
8520
9660
|
editor.chain().focus().clearNodes().unsetAllMarks().run();
|
|
8521
9661
|
}
|
|
8522
9662
|
},
|
|
8523
9663
|
bold: {
|
|
8524
|
-
label:
|
|
8525
|
-
icon: /* @__PURE__ */
|
|
9664
|
+
label: __64("Bold", "elementor"),
|
|
9665
|
+
icon: /* @__PURE__ */ React123.createElement(BoldIcon, { fontSize: "tiny" }),
|
|
8526
9666
|
action: "bold",
|
|
8527
9667
|
method: (editor) => {
|
|
8528
9668
|
editor.chain().focus().toggleBold().run();
|
|
8529
9669
|
}
|
|
8530
9670
|
},
|
|
8531
9671
|
italic: {
|
|
8532
|
-
label:
|
|
8533
|
-
icon: /* @__PURE__ */
|
|
9672
|
+
label: __64("Italic", "elementor"),
|
|
9673
|
+
icon: /* @__PURE__ */ React123.createElement(ItalicIcon, { fontSize: "tiny" }),
|
|
8534
9674
|
action: "italic",
|
|
8535
9675
|
method: (editor) => {
|
|
8536
9676
|
editor.chain().focus().toggleItalic().run();
|
|
8537
9677
|
}
|
|
8538
9678
|
},
|
|
8539
9679
|
underline: {
|
|
8540
|
-
label:
|
|
8541
|
-
icon: /* @__PURE__ */
|
|
9680
|
+
label: __64("Underline", "elementor"),
|
|
9681
|
+
icon: /* @__PURE__ */ React123.createElement(UnderlineIcon, { fontSize: "tiny" }),
|
|
8542
9682
|
action: "underline",
|
|
8543
9683
|
method: (editor) => {
|
|
8544
9684
|
editor.chain().focus().toggleUnderline().run();
|
|
8545
9685
|
}
|
|
8546
9686
|
},
|
|
8547
9687
|
strike: {
|
|
8548
|
-
label:
|
|
8549
|
-
icon: /* @__PURE__ */
|
|
9688
|
+
label: __64("Strikethrough", "elementor"),
|
|
9689
|
+
icon: /* @__PURE__ */ React123.createElement(StrikethroughIcon, { fontSize: "tiny" }),
|
|
8550
9690
|
action: "strike",
|
|
8551
9691
|
method: (editor) => {
|
|
8552
9692
|
editor.chain().focus().toggleStrike().run();
|
|
8553
9693
|
}
|
|
8554
9694
|
},
|
|
8555
9695
|
superscript: {
|
|
8556
|
-
label:
|
|
8557
|
-
icon: /* @__PURE__ */
|
|
9696
|
+
label: __64("Superscript", "elementor"),
|
|
9697
|
+
icon: /* @__PURE__ */ React123.createElement(SuperscriptIcon, { fontSize: "tiny" }),
|
|
8558
9698
|
action: "superscript",
|
|
8559
9699
|
method: (editor) => {
|
|
8560
9700
|
editor.chain().focus().toggleSuperscript().run();
|
|
8561
9701
|
}
|
|
8562
9702
|
},
|
|
8563
9703
|
subscript: {
|
|
8564
|
-
label:
|
|
8565
|
-
icon: /* @__PURE__ */
|
|
9704
|
+
label: __64("Subscript", "elementor"),
|
|
9705
|
+
icon: /* @__PURE__ */ React123.createElement(SubscriptIcon, { fontSize: "tiny" }),
|
|
8566
9706
|
action: "subscript",
|
|
8567
9707
|
method: (editor) => {
|
|
8568
9708
|
editor.chain().focus().toggleSubscript().run();
|
|
8569
9709
|
}
|
|
8570
9710
|
},
|
|
8571
9711
|
link: {
|
|
8572
|
-
label:
|
|
8573
|
-
icon: /* @__PURE__ */
|
|
9712
|
+
label: __64("Link", "elementor"),
|
|
9713
|
+
icon: /* @__PURE__ */ React123.createElement(LinkIcon3, { fontSize: "tiny" }),
|
|
8574
9714
|
action: "link",
|
|
8575
9715
|
method: null
|
|
8576
9716
|
}
|
|
@@ -8583,7 +9723,7 @@ var InlineEditingControl = createControl(({ sx, attributes, props, context: { el
|
|
|
8583
9723
|
const { setValue, placeholder, value } = useBoundProp(escapedHtmlPropTypeUtil2);
|
|
8584
9724
|
const { value: rawValue } = usePropKeyContext();
|
|
8585
9725
|
const content = value ?? extractInlineHtmlContent(rawValue);
|
|
8586
|
-
const [editor, setEditor] =
|
|
9726
|
+
const [editor, setEditor] = useState22(null);
|
|
8587
9727
|
const handleChange = useCallback4(
|
|
8588
9728
|
(newValue) => {
|
|
8589
9729
|
const html = newValue ?? "";
|
|
@@ -8591,7 +9731,7 @@ var InlineEditingControl = createControl(({ sx, attributes, props, context: { el
|
|
|
8591
9731
|
},
|
|
8592
9732
|
[setValue]
|
|
8593
9733
|
);
|
|
8594
|
-
return /* @__PURE__ */
|
|
9734
|
+
return /* @__PURE__ */ React124.createElement(ControlActions, null, /* @__PURE__ */ React124.createElement(Box32, { sx: { position: "relative" } }, editor && editor.isEditable && /* @__PURE__ */ React124.createElement(
|
|
8595
9735
|
InlineEditorToolbar,
|
|
8596
9736
|
{
|
|
8597
9737
|
editor,
|
|
@@ -8604,8 +9744,8 @@ var InlineEditingControl = createControl(({ sx, attributes, props, context: { el
|
|
|
8604
9744
|
}),
|
|
8605
9745
|
inControlPanel: true
|
|
8606
9746
|
}
|
|
8607
|
-
), /* @__PURE__ */
|
|
8608
|
-
|
|
9747
|
+
), /* @__PURE__ */ React124.createElement(
|
|
9748
|
+
Box32,
|
|
8609
9749
|
{
|
|
8610
9750
|
sx: (theme) => ({
|
|
8611
9751
|
p: 0.8,
|
|
@@ -8649,7 +9789,7 @@ var InlineEditingControl = createControl(({ sx, attributes, props, context: { el
|
|
|
8649
9789
|
...attributes,
|
|
8650
9790
|
...props
|
|
8651
9791
|
},
|
|
8652
|
-
/* @__PURE__ */
|
|
9792
|
+
/* @__PURE__ */ React124.createElement(
|
|
8653
9793
|
InlineEditor,
|
|
8654
9794
|
{
|
|
8655
9795
|
value: content,
|
|
@@ -8666,17 +9806,17 @@ var InlineEditingControl = createControl(({ sx, attributes, props, context: { el
|
|
|
8666
9806
|
});
|
|
8667
9807
|
|
|
8668
9808
|
// src/controls/email-form-action-control/index.tsx
|
|
8669
|
-
import * as
|
|
9809
|
+
import * as React128 from "react";
|
|
8670
9810
|
import { emailsPropTypeUtil } from "@elementor/editor-props";
|
|
8671
9811
|
import { CollapsibleContent } from "@elementor/editor-ui";
|
|
8672
|
-
import { Box as
|
|
8673
|
-
import { __ as
|
|
9812
|
+
import { Box as Box33, Divider as Divider6, Stack as Stack25 } from "@elementor/ui";
|
|
9813
|
+
import { __ as __66 } from "@wordpress/i18n";
|
|
8674
9814
|
|
|
8675
9815
|
// src/controls/email-form-action-control/fields.tsx
|
|
8676
|
-
import * as
|
|
9816
|
+
import * as React127 from "react";
|
|
8677
9817
|
import { InfoAlert as InfoAlert2 } from "@elementor/editor-ui";
|
|
8678
|
-
import { Grid as Grid34, Stack as
|
|
8679
|
-
import { __ as
|
|
9818
|
+
import { Grid as Grid34, Stack as Stack24 } from "@elementor/ui";
|
|
9819
|
+
import { __ as __65 } from "@wordpress/i18n";
|
|
8680
9820
|
|
|
8681
9821
|
// src/hooks/use-form-field-suggestions.ts
|
|
8682
9822
|
import { getContainer as getContainer3, getSelectedElements as getSelectedElements3, getWidgetsCache } from "@elementor/editor-elements";
|
|
@@ -8765,8 +9905,8 @@ function useFormFieldSuggestions(options) {
|
|
|
8765
9905
|
}
|
|
8766
9906
|
|
|
8767
9907
|
// src/controls/email-form-action-control/email-chips-field.tsx
|
|
8768
|
-
import * as
|
|
8769
|
-
import { useMemo as
|
|
9908
|
+
import * as React125 from "react";
|
|
9909
|
+
import { useMemo as useMemo19, useState as useState23 } from "react";
|
|
8770
9910
|
import { stringArrayPropTypeUtil as stringArrayPropTypeUtil3, stringPropTypeUtil as stringPropTypeUtil23 } from "@elementor/editor-props";
|
|
8771
9911
|
import { Autocomplete as Autocomplete4, Grid as Grid32, TextField as TextField12 } from "@elementor/ui";
|
|
8772
9912
|
|
|
@@ -8804,10 +9944,10 @@ function resolveMention(raw, suggestions) {
|
|
|
8804
9944
|
}
|
|
8805
9945
|
var EmailChipsControl = createControl(({ placeholder, suggestions = [] }) => {
|
|
8806
9946
|
const { value, setValue, disabled } = useBoundProp(stringArrayPropTypeUtil3);
|
|
8807
|
-
const [inputValue, setInputValue] =
|
|
9947
|
+
const [inputValue, setInputValue] = useState23("");
|
|
8808
9948
|
const items2 = value || [];
|
|
8809
9949
|
const selectedValues = items2.map((item) => stringPropTypeUtil23.extract(item)).filter((val) => val !== null);
|
|
8810
|
-
const suggestionOptions =
|
|
9950
|
+
const suggestionOptions = useMemo19(
|
|
8811
9951
|
() => suggestions.map((suggestion) => `[${suggestion.value}]`),
|
|
8812
9952
|
[suggestions]
|
|
8813
9953
|
);
|
|
@@ -8842,7 +9982,7 @@ var EmailChipsControl = createControl(({ placeholder, suggestions = [] }) => {
|
|
|
8842
9982
|
tryAddChip(inputValue);
|
|
8843
9983
|
}
|
|
8844
9984
|
};
|
|
8845
|
-
return /* @__PURE__ */
|
|
9985
|
+
return /* @__PURE__ */ React125.createElement(ControlActions, null, /* @__PURE__ */ React125.createElement(
|
|
8846
9986
|
Autocomplete4,
|
|
8847
9987
|
{
|
|
8848
9988
|
fullWidth: true,
|
|
@@ -8867,99 +10007,99 @@ var EmailChipsControl = createControl(({ placeholder, suggestions = [] }) => {
|
|
|
8867
10007
|
onBlur: handleBlur,
|
|
8868
10008
|
getOptionLabel: (option) => option,
|
|
8869
10009
|
isOptionEqualToValue: (option, val) => option === val,
|
|
8870
|
-
renderInput: (params) => /* @__PURE__ */
|
|
8871
|
-
renderTags: (tagValues, getTagProps) => /* @__PURE__ */
|
|
10010
|
+
renderInput: (params) => /* @__PURE__ */ React125.createElement(TextField12, { ...params, placeholder, onKeyDown: handleKeyDown }),
|
|
10011
|
+
renderTags: (tagValues, getTagProps) => /* @__PURE__ */ React125.createElement(ChipsList, { getLabel: (option) => option, getTagProps, values: tagValues })
|
|
8872
10012
|
}
|
|
8873
10013
|
));
|
|
8874
10014
|
});
|
|
8875
|
-
var EmailChipsField = ({ fieldLabel, placeholder, suggestions }) => /* @__PURE__ */
|
|
10015
|
+
var EmailChipsField = ({ fieldLabel, placeholder, suggestions }) => /* @__PURE__ */ React125.createElement(Grid32, { container: true, direction: "column", gap: 0.5 }, /* @__PURE__ */ React125.createElement(Grid32, { item: true }, /* @__PURE__ */ React125.createElement(ControlFormLabel, null, fieldLabel)), /* @__PURE__ */ React125.createElement(Grid32, { item: true }, /* @__PURE__ */ React125.createElement(EmailChipsControl, { placeholder, suggestions })));
|
|
8876
10016
|
|
|
8877
10017
|
// src/controls/email-form-action-control/email-field.tsx
|
|
8878
|
-
import * as
|
|
10018
|
+
import * as React126 from "react";
|
|
8879
10019
|
import { Grid as Grid33 } from "@elementor/ui";
|
|
8880
|
-
var EmailField = ({ bind, label, placeholder }) => /* @__PURE__ */
|
|
10020
|
+
var EmailField = ({ bind, label, placeholder }) => /* @__PURE__ */ React126.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React126.createElement(Grid33, { container: true, direction: "column", gap: 0.5 }, /* @__PURE__ */ React126.createElement(Grid33, { item: true }, /* @__PURE__ */ React126.createElement(ControlFormLabel, null, label)), /* @__PURE__ */ React126.createElement(Grid33, { item: true }, /* @__PURE__ */ React126.createElement(TextControl, { placeholder }))));
|
|
8881
10021
|
|
|
8882
10022
|
// src/controls/email-form-action-control/fields.tsx
|
|
8883
10023
|
var SendToField = ({ placeholder }) => {
|
|
8884
10024
|
const suggestions = useFormFieldSuggestions({ inputType: "email" });
|
|
8885
|
-
return /* @__PURE__ */
|
|
10025
|
+
return /* @__PURE__ */ React127.createElement(PropKeyProvider, { bind: "to" }, /* @__PURE__ */ React127.createElement(Stack24, { gap: 0.5 }, /* @__PURE__ */ React127.createElement(
|
|
8886
10026
|
EmailChipsField,
|
|
8887
10027
|
{
|
|
8888
|
-
fieldLabel:
|
|
10028
|
+
fieldLabel: __65("Send to", "elementor"),
|
|
8889
10029
|
placeholder,
|
|
8890
10030
|
suggestions
|
|
8891
10031
|
}
|
|
8892
|
-
), shouldShowMentionsInfo() && /* @__PURE__ */
|
|
10032
|
+
), shouldShowMentionsInfo() && /* @__PURE__ */ React127.createElement(InfoAlert2, null, __65("Type @ or an email field name to insert its submitted value.", "elementor"))));
|
|
8893
10033
|
};
|
|
8894
|
-
var SubjectField = () => /* @__PURE__ */
|
|
10034
|
+
var SubjectField = () => /* @__PURE__ */ React127.createElement(
|
|
8895
10035
|
EmailField,
|
|
8896
10036
|
{
|
|
8897
10037
|
bind: "subject",
|
|
8898
|
-
label:
|
|
8899
|
-
placeholder:
|
|
10038
|
+
label: __65("Email subject", "elementor"),
|
|
10039
|
+
placeholder: __65("New form submission", "elementor")
|
|
8900
10040
|
}
|
|
8901
10041
|
);
|
|
8902
10042
|
var MessageField = () => {
|
|
8903
10043
|
const suggestions = useFormFieldSuggestions();
|
|
8904
|
-
return /* @__PURE__ */
|
|
10044
|
+
return /* @__PURE__ */ React127.createElement(PropKeyProvider, { bind: "message" }, /* @__PURE__ */ React127.createElement(Grid34, { container: true, direction: "column", gap: 0.5 }, /* @__PURE__ */ React127.createElement(Grid34, { item: true }, /* @__PURE__ */ React127.createElement(ControlFormLabel, null, __65("Message", "elementor"))), /* @__PURE__ */ React127.createElement(Grid34, { item: true }, /* @__PURE__ */ React127.createElement(MentionTextAreaControl, { suggestions })), /* @__PURE__ */ React127.createElement(Grid34, { item: true }, /* @__PURE__ */ React127.createElement(InfoAlert2, null, shouldShowMentionsInfo() ? __65(
|
|
8905
10045
|
"[all-fields] shortcode sends all fields. Type @ to insert specific fields and customize your message.",
|
|
8906
10046
|
"elementor"
|
|
8907
|
-
) :
|
|
10047
|
+
) : __65("[all-fields] shortcode sends all fields.", "elementor")))));
|
|
8908
10048
|
};
|
|
8909
|
-
var FromEmailField = () => /* @__PURE__ */
|
|
10049
|
+
var FromEmailField = () => /* @__PURE__ */ React127.createElement(
|
|
8910
10050
|
EmailField,
|
|
8911
10051
|
{
|
|
8912
10052
|
bind: "from",
|
|
8913
|
-
label:
|
|
8914
|
-
placeholder:
|
|
10053
|
+
label: __65("From email", "elementor"),
|
|
10054
|
+
placeholder: __65("What email should appear as the sender?", "elementor")
|
|
8915
10055
|
}
|
|
8916
10056
|
);
|
|
8917
|
-
var FromNameField = () => /* @__PURE__ */
|
|
10057
|
+
var FromNameField = () => /* @__PURE__ */ React127.createElement(
|
|
8918
10058
|
EmailField,
|
|
8919
10059
|
{
|
|
8920
10060
|
bind: "from-name",
|
|
8921
|
-
label:
|
|
8922
|
-
placeholder:
|
|
10061
|
+
label: __65("From name", "elementor"),
|
|
10062
|
+
placeholder: __65("What name should appear as the sender?", "elementor")
|
|
8923
10063
|
}
|
|
8924
10064
|
);
|
|
8925
10065
|
var ReplyToField = () => {
|
|
8926
10066
|
const emailSuggestions = useFormFieldSuggestions({ inputType: "email" });
|
|
8927
|
-
return /* @__PURE__ */
|
|
10067
|
+
return /* @__PURE__ */ React127.createElement(PropKeyProvider, { bind: "reply-to" }, /* @__PURE__ */ React127.createElement(Grid34, { container: true, direction: "column", gap: 0.5 }, /* @__PURE__ */ React127.createElement(Grid34, { item: true }, /* @__PURE__ */ React127.createElement(ControlFormLabel, null, __65("Reply-to", "elementor"))), /* @__PURE__ */ React127.createElement(Grid34, { item: true }, /* @__PURE__ */ React127.createElement(
|
|
8928
10068
|
MentionTextAreaControl,
|
|
8929
10069
|
{
|
|
8930
10070
|
suggestions: emailSuggestions,
|
|
8931
10071
|
rows: 1,
|
|
8932
10072
|
triggerPosition: "start",
|
|
8933
|
-
placeholder:
|
|
10073
|
+
placeholder: __65("You can type @ to insert an email field", "elementor")
|
|
8934
10074
|
}
|
|
8935
10075
|
))));
|
|
8936
10076
|
};
|
|
8937
10077
|
var CcField = () => {
|
|
8938
10078
|
const suggestions = useFormFieldSuggestions({ inputType: "email" });
|
|
8939
|
-
return /* @__PURE__ */
|
|
10079
|
+
return /* @__PURE__ */ React127.createElement(PropKeyProvider, { bind: "cc" }, /* @__PURE__ */ React127.createElement(EmailChipsField, { fieldLabel: __65("Cc", "elementor"), suggestions }));
|
|
8940
10080
|
};
|
|
8941
10081
|
var BccField = () => {
|
|
8942
10082
|
const suggestions = useFormFieldSuggestions({ inputType: "email" });
|
|
8943
|
-
return /* @__PURE__ */
|
|
10083
|
+
return /* @__PURE__ */ React127.createElement(PropKeyProvider, { bind: "bcc" }, /* @__PURE__ */ React127.createElement(EmailChipsField, { fieldLabel: __65("Bcc", "elementor"), suggestions }));
|
|
8944
10084
|
};
|
|
8945
|
-
var MetaDataField = () => /* @__PURE__ */
|
|
10085
|
+
var MetaDataField = () => /* @__PURE__ */ React127.createElement(PropKeyProvider, { bind: "meta-data" }, /* @__PURE__ */ React127.createElement(Stack24, { gap: 0.5 }, /* @__PURE__ */ React127.createElement(ControlFormLabel, null, __65("Metadata", "elementor")), /* @__PURE__ */ React127.createElement(
|
|
8946
10086
|
ChipsControl,
|
|
8947
10087
|
{
|
|
8948
10088
|
options: [
|
|
8949
|
-
{ label:
|
|
8950
|
-
{ label:
|
|
8951
|
-
{ label:
|
|
8952
|
-
{ label:
|
|
8953
|
-
{ label:
|
|
10089
|
+
{ label: __65("Date", "elementor"), value: "date" },
|
|
10090
|
+
{ label: __65("Time", "elementor"), value: "time" },
|
|
10091
|
+
{ label: __65("Page URL", "elementor"), value: "page-url" },
|
|
10092
|
+
{ label: __65("User agent", "elementor"), value: "user-agent" },
|
|
10093
|
+
{ label: __65("Credit", "elementor"), value: "credit" }
|
|
8954
10094
|
]
|
|
8955
10095
|
}
|
|
8956
10096
|
)));
|
|
8957
|
-
var SendAsField = () => /* @__PURE__ */
|
|
10097
|
+
var SendAsField = () => /* @__PURE__ */ React127.createElement(PropKeyProvider, { bind: "send-as" }, /* @__PURE__ */ React127.createElement(Grid34, { container: true, direction: "column", gap: 0.5 }, /* @__PURE__ */ React127.createElement(Grid34, { item: true }, /* @__PURE__ */ React127.createElement(ControlFormLabel, null, __65("Send as", "elementor"))), /* @__PURE__ */ React127.createElement(Grid34, { item: true }, /* @__PURE__ */ React127.createElement(
|
|
8958
10098
|
SelectControl,
|
|
8959
10099
|
{
|
|
8960
10100
|
options: [
|
|
8961
|
-
{ label:
|
|
8962
|
-
{ label:
|
|
10101
|
+
{ label: __65("HTML", "elementor"), value: "html" },
|
|
10102
|
+
{ label: __65("Plain Text", "elementor"), value: "plain" }
|
|
8963
10103
|
]
|
|
8964
10104
|
}
|
|
8965
10105
|
))));
|
|
@@ -8968,25 +10108,86 @@ var SendAsField = () => /* @__PURE__ */ React120.createElement(PropKeyProvider,
|
|
|
8968
10108
|
var EmailFormActionControl = createControl(
|
|
8969
10109
|
({ toPlaceholder, label }) => {
|
|
8970
10110
|
const { value, setValue, ...propContext } = useBoundProp(emailsPropTypeUtil);
|
|
8971
|
-
return /* @__PURE__ */
|
|
10111
|
+
return /* @__PURE__ */ React128.createElement(PropProvider, { ...propContext, value, setValue }, /* @__PURE__ */ React128.createElement(Stack25, { gap: 2 }, /* @__PURE__ */ React128.createElement(ControlLabel, null, label ? label + " " + __66("settings", "elementor") : __66("Email settings", "elementor")), /* @__PURE__ */ React128.createElement(SendToField, { placeholder: toPlaceholder }), /* @__PURE__ */ React128.createElement(SubjectField, null), /* @__PURE__ */ React128.createElement(MessageField, null), /* @__PURE__ */ React128.createElement(FromEmailField, null), /* @__PURE__ */ React128.createElement(AdvancedSettings, null)));
|
|
8972
10112
|
}
|
|
8973
10113
|
);
|
|
8974
|
-
var AdvancedSettings = () => /* @__PURE__ */
|
|
10114
|
+
var AdvancedSettings = () => /* @__PURE__ */ React128.createElement(CollapsibleContent, { defaultOpen: false }, /* @__PURE__ */ React128.createElement(Box33, { sx: { pt: 2 } }, /* @__PURE__ */ React128.createElement(Stack25, { gap: 2 }, /* @__PURE__ */ React128.createElement(FromNameField, null), /* @__PURE__ */ React128.createElement(ReplyToField, null), /* @__PURE__ */ React128.createElement(CcField, null), /* @__PURE__ */ React128.createElement(BccField, null), /* @__PURE__ */ React128.createElement(Divider6, null), /* @__PURE__ */ React128.createElement(MetaDataField, null), /* @__PURE__ */ React128.createElement(SendAsField, null))));
|
|
8975
10115
|
|
|
8976
10116
|
// src/controls/attachment-type-control.tsx
|
|
8977
|
-
import * as
|
|
10117
|
+
import * as React129 from "react";
|
|
8978
10118
|
import { InfoAlert as InfoAlert3 } from "@elementor/editor-ui";
|
|
8979
10119
|
import { Grid as Grid35 } from "@elementor/ui";
|
|
8980
|
-
import { __ as
|
|
10120
|
+
import { __ as __67 } from "@wordpress/i18n";
|
|
8981
10121
|
var AttachmentTypeControl = createControl(({ label, options }) => {
|
|
8982
|
-
return /* @__PURE__ */
|
|
10122
|
+
return /* @__PURE__ */ React129.createElement(Grid35, { container: true, direction: "column", gap: 1 }, label && /* @__PURE__ */ React129.createElement(Grid35, { item: true }, /* @__PURE__ */ React129.createElement(ControlFormLabel, null, label)), /* @__PURE__ */ React129.createElement(Grid35, { item: true }, /* @__PURE__ */ React129.createElement(SelectControl, { options })), /* @__PURE__ */ React129.createElement(Grid35, { item: true }, /* @__PURE__ */ React129.createElement(InfoAlert3, null, __67(
|
|
8983
10123
|
"Linked uploads are saved to the server. Direct attachments will not appear under Submissions.",
|
|
8984
10124
|
"elementor"
|
|
8985
10125
|
))));
|
|
8986
10126
|
});
|
|
8987
10127
|
|
|
10128
|
+
// src/controls/notice-control.tsx
|
|
10129
|
+
import * as React130 from "react";
|
|
10130
|
+
import { useState as useState24 } from "react";
|
|
10131
|
+
import { ajax } from "@elementor/editor-v1-adapters";
|
|
10132
|
+
import { BulbIcon } from "@elementor/icons";
|
|
10133
|
+
import { Alert as Alert3, AlertAction as AlertAction2, AlertTitle as AlertTitle4, styled as styled13, Typography as Typography13 } from "@elementor/ui";
|
|
10134
|
+
var NoticeTitle = styled13(AlertTitle4)({
|
|
10135
|
+
"&.MuiAlertTitle-root.MuiAlertTitle-root": {
|
|
10136
|
+
marginBottom: 4,
|
|
10137
|
+
fontStyle: "italic"
|
|
10138
|
+
}
|
|
10139
|
+
});
|
|
10140
|
+
var markNoticeAsDismissedInSession = (dismissId) => {
|
|
10141
|
+
const dismissedNotices = window.elementor?.config?.user?.dismissed_editor_notices;
|
|
10142
|
+
if (dismissedNotices && !dismissedNotices.includes(dismissId)) {
|
|
10143
|
+
dismissedNotices.push(dismissId);
|
|
10144
|
+
}
|
|
10145
|
+
};
|
|
10146
|
+
var NoticeControl = createControl(
|
|
10147
|
+
({ noticeType = "info", heading, content, dismissible, buttonText, buttonUrl }) => {
|
|
10148
|
+
const [isDismissed, setIsDismissed] = useState24(false);
|
|
10149
|
+
if (isDismissed || !content) {
|
|
10150
|
+
return null;
|
|
10151
|
+
}
|
|
10152
|
+
const severity = noticeType === "danger" ? "error" : noticeType;
|
|
10153
|
+
const icon = noticeType === "info" ? /* @__PURE__ */ React130.createElement(BulbIcon, { fontSize: "inherit" }) : void 0;
|
|
10154
|
+
const handleDismiss = () => {
|
|
10155
|
+
setIsDismissed(true);
|
|
10156
|
+
if (!dismissible) {
|
|
10157
|
+
return;
|
|
10158
|
+
}
|
|
10159
|
+
markNoticeAsDismissedInSession(dismissible);
|
|
10160
|
+
ajax.load({
|
|
10161
|
+
action: "dismissed_editor_notices",
|
|
10162
|
+
unique_id: `dismiss-editor-notice-${dismissible}`,
|
|
10163
|
+
data: { dismissId: dismissible }
|
|
10164
|
+
}).catch(() => {
|
|
10165
|
+
});
|
|
10166
|
+
};
|
|
10167
|
+
const handleActionClick = () => {
|
|
10168
|
+
setIsDismissed(true);
|
|
10169
|
+
if (dismissible) {
|
|
10170
|
+
markNoticeAsDismissedInSession(dismissible);
|
|
10171
|
+
}
|
|
10172
|
+
};
|
|
10173
|
+
return /* @__PURE__ */ React130.createElement(Alert3, { variant: "outlined", severity, icon, size: "small", onClose: handleDismiss }, heading && /* @__PURE__ */ React130.createElement(NoticeTitle, null, heading), /* @__PURE__ */ React130.createElement(Typography13, { variant: "caption", color: "textSecondary", sx: { fontStyle: "italic" } }, content), buttonText && buttonUrl && /* @__PURE__ */ React130.createElement(
|
|
10174
|
+
AlertAction2,
|
|
10175
|
+
{
|
|
10176
|
+
variant: "contained",
|
|
10177
|
+
color: severity,
|
|
10178
|
+
target: "_blank",
|
|
10179
|
+
rel: "noopener noreferrer",
|
|
10180
|
+
href: buttonUrl,
|
|
10181
|
+
onClick: handleActionClick,
|
|
10182
|
+
sx: { mt: 2 }
|
|
10183
|
+
},
|
|
10184
|
+
buttonText
|
|
10185
|
+
));
|
|
10186
|
+
}
|
|
10187
|
+
);
|
|
10188
|
+
|
|
8988
10189
|
// src/controls/grid-span-control.tsx
|
|
8989
|
-
import * as
|
|
10190
|
+
import * as React131 from "react";
|
|
8990
10191
|
import { spanPropTypeUtil } from "@elementor/editor-props";
|
|
8991
10192
|
import { TextField as TextField13 } from "@elementor/ui";
|
|
8992
10193
|
var GridSpanControl = createControl(
|
|
@@ -9005,7 +10206,7 @@ var GridSpanControl = createControl(
|
|
|
9005
10206
|
setValue(next === "" ? null : next);
|
|
9006
10207
|
};
|
|
9007
10208
|
const placeholder = propPlaceholder ?? boundPlaceholder ?? `e.g: 'span 2' or '1 / 3'`;
|
|
9008
|
-
return /* @__PURE__ */
|
|
10209
|
+
return /* @__PURE__ */ React131.createElement(ControlActions, null, /* @__PURE__ */ React131.createElement(
|
|
9009
10210
|
TextField13,
|
|
9010
10211
|
{
|
|
9011
10212
|
size: "tiny",
|
|
@@ -9026,23 +10227,23 @@ var GridSpanControl = createControl(
|
|
|
9026
10227
|
);
|
|
9027
10228
|
|
|
9028
10229
|
// src/components/promotions/display-conditions-control.tsx
|
|
9029
|
-
import * as
|
|
9030
|
-
import { useRef as
|
|
10230
|
+
import * as React133 from "react";
|
|
10231
|
+
import { useRef as useRef33 } from "react";
|
|
9031
10232
|
import { SitemapIcon } from "@elementor/icons";
|
|
9032
|
-
import { IconButton as IconButton10, Stack as
|
|
9033
|
-
import { __ as
|
|
10233
|
+
import { IconButton as IconButton10, Stack as Stack26, Tooltip as Tooltip14 } from "@elementor/ui";
|
|
10234
|
+
import { __ as __68 } from "@wordpress/i18n";
|
|
9034
10235
|
|
|
9035
10236
|
// src/components/promotions/promotion-trigger.tsx
|
|
9036
|
-
import * as
|
|
9037
|
-
import { forwardRef as forwardRef12, useCallback as useCallback5, useImperativeHandle, useState as
|
|
10237
|
+
import * as React132 from "react";
|
|
10238
|
+
import { forwardRef as forwardRef12, useCallback as useCallback5, useImperativeHandle, useState as useState25 } from "react";
|
|
9038
10239
|
import { PromotionChip as PromotionChip2, PromotionInfotip } from "@elementor/editor-ui";
|
|
9039
|
-
import { Box as
|
|
10240
|
+
import { Box as Box34 } from "@elementor/ui";
|
|
9040
10241
|
function getV4Promotion(key) {
|
|
9041
10242
|
return window.elementor?.config?.v4Promotions?.[key];
|
|
9042
10243
|
}
|
|
9043
10244
|
var PromotionTrigger = forwardRef12(
|
|
9044
10245
|
({ promotionKey, children, trackingData }, ref) => {
|
|
9045
|
-
const [isOpen, setIsOpen] =
|
|
10246
|
+
const [isOpen, setIsOpen] = useState25(false);
|
|
9046
10247
|
const promotion = getV4Promotion(promotionKey);
|
|
9047
10248
|
const toggle = useCallback5(() => {
|
|
9048
10249
|
setIsOpen((prev) => {
|
|
@@ -9053,7 +10254,7 @@ var PromotionTrigger = forwardRef12(
|
|
|
9053
10254
|
});
|
|
9054
10255
|
}, [trackingData]);
|
|
9055
10256
|
useImperativeHandle(ref, () => ({ toggle }), [toggle]);
|
|
9056
|
-
return /* @__PURE__ */
|
|
10257
|
+
return /* @__PURE__ */ React132.createElement(React132.Fragment, null, promotion && /* @__PURE__ */ React132.createElement(
|
|
9057
10258
|
PromotionInfotip,
|
|
9058
10259
|
{
|
|
9059
10260
|
title: promotion.title,
|
|
@@ -9067,8 +10268,8 @@ var PromotionTrigger = forwardRef12(
|
|
|
9067
10268
|
},
|
|
9068
10269
|
onCtaClick: () => trackUpgradePromotionClick(trackingData)
|
|
9069
10270
|
},
|
|
9070
|
-
/* @__PURE__ */
|
|
9071
|
-
|
|
10271
|
+
/* @__PURE__ */ React132.createElement(
|
|
10272
|
+
Box34,
|
|
9072
10273
|
{
|
|
9073
10274
|
onClick: (e) => {
|
|
9074
10275
|
e.stopPropagation();
|
|
@@ -9076,19 +10277,19 @@ var PromotionTrigger = forwardRef12(
|
|
|
9076
10277
|
},
|
|
9077
10278
|
sx: { cursor: "pointer", display: "inline-flex" }
|
|
9078
10279
|
},
|
|
9079
|
-
children ?? /* @__PURE__ */
|
|
10280
|
+
children ?? /* @__PURE__ */ React132.createElement(PromotionChip2, null)
|
|
9080
10281
|
)
|
|
9081
10282
|
));
|
|
9082
10283
|
}
|
|
9083
10284
|
);
|
|
9084
10285
|
|
|
9085
10286
|
// src/components/promotions/display-conditions-control.tsx
|
|
9086
|
-
var ARIA_LABEL =
|
|
10287
|
+
var ARIA_LABEL = __68("Display Conditions", "elementor");
|
|
9087
10288
|
var TRACKING_DATA = { target_name: "display_conditions", location_l2: "general" };
|
|
9088
10289
|
var DisplayConditionsControl = createControl(() => {
|
|
9089
|
-
const triggerRef =
|
|
9090
|
-
return /* @__PURE__ */
|
|
9091
|
-
|
|
10290
|
+
const triggerRef = useRef33(null);
|
|
10291
|
+
return /* @__PURE__ */ React133.createElement(
|
|
10292
|
+
Stack26,
|
|
9092
10293
|
{
|
|
9093
10294
|
direction: "row",
|
|
9094
10295
|
spacing: 2,
|
|
@@ -9097,8 +10298,8 @@ var DisplayConditionsControl = createControl(() => {
|
|
|
9097
10298
|
alignItems: "center"
|
|
9098
10299
|
}
|
|
9099
10300
|
},
|
|
9100
|
-
/* @__PURE__ */
|
|
9101
|
-
/* @__PURE__ */
|
|
10301
|
+
/* @__PURE__ */ React133.createElement(PromotionTrigger, { ref: triggerRef, promotionKey: "displayConditions", trackingData: TRACKING_DATA }),
|
|
10302
|
+
/* @__PURE__ */ React133.createElement(Tooltip14, { title: ARIA_LABEL, placement: "top" }, /* @__PURE__ */ React133.createElement(
|
|
9102
10303
|
IconButton10,
|
|
9103
10304
|
{
|
|
9104
10305
|
size: "tiny",
|
|
@@ -9111,23 +10312,23 @@ var DisplayConditionsControl = createControl(() => {
|
|
|
9111
10312
|
borderRadius: 1
|
|
9112
10313
|
}
|
|
9113
10314
|
},
|
|
9114
|
-
/* @__PURE__ */
|
|
10315
|
+
/* @__PURE__ */ React133.createElement(SitemapIcon, { fontSize: "tiny", color: "disabled" })
|
|
9115
10316
|
))
|
|
9116
10317
|
);
|
|
9117
10318
|
});
|
|
9118
10319
|
|
|
9119
10320
|
// src/components/promotions/attributes-control.tsx
|
|
9120
|
-
import * as
|
|
9121
|
-
import { useRef as
|
|
10321
|
+
import * as React134 from "react";
|
|
10322
|
+
import { useRef as useRef34 } from "react";
|
|
9122
10323
|
import { PlusIcon as PlusIcon4 } from "@elementor/icons";
|
|
9123
|
-
import { Stack as
|
|
9124
|
-
import { __ as
|
|
9125
|
-
var ARIA_LABEL2 =
|
|
10324
|
+
import { Stack as Stack27, Tooltip as Tooltip15 } from "@elementor/ui";
|
|
10325
|
+
import { __ as __69 } from "@wordpress/i18n";
|
|
10326
|
+
var ARIA_LABEL2 = __69("Attributes", "elementor");
|
|
9126
10327
|
var TRACKING_DATA2 = { target_name: "attributes", location_l2: "general" };
|
|
9127
10328
|
var AttributesControl = createControl(() => {
|
|
9128
|
-
const triggerRef =
|
|
9129
|
-
return /* @__PURE__ */
|
|
9130
|
-
|
|
10329
|
+
const triggerRef = useRef34(null);
|
|
10330
|
+
return /* @__PURE__ */ React134.createElement(
|
|
10331
|
+
Stack27,
|
|
9131
10332
|
{
|
|
9132
10333
|
direction: "row",
|
|
9133
10334
|
spacing: 2,
|
|
@@ -9136,8 +10337,8 @@ var AttributesControl = createControl(() => {
|
|
|
9136
10337
|
alignItems: "center"
|
|
9137
10338
|
}
|
|
9138
10339
|
},
|
|
9139
|
-
/* @__PURE__ */
|
|
9140
|
-
/* @__PURE__ */
|
|
10340
|
+
/* @__PURE__ */ React134.createElement(PromotionTrigger, { ref: triggerRef, promotionKey: "attributes", trackingData: TRACKING_DATA2 }),
|
|
10341
|
+
/* @__PURE__ */ React134.createElement(Tooltip15, { title: ARIA_LABEL2, placement: "top" }, /* @__PURE__ */ React134.createElement(
|
|
9141
10342
|
PlusIcon4,
|
|
9142
10343
|
{
|
|
9143
10344
|
"aria-label": ARIA_LABEL2,
|
|
@@ -9151,29 +10352,29 @@ var AttributesControl = createControl(() => {
|
|
|
9151
10352
|
});
|
|
9152
10353
|
|
|
9153
10354
|
// src/components/icon-buttons/clear-icon-button.tsx
|
|
9154
|
-
import * as
|
|
10355
|
+
import * as React135 from "react";
|
|
9155
10356
|
import { BrushBigIcon } from "@elementor/icons";
|
|
9156
|
-
import { IconButton as IconButton11, styled as
|
|
9157
|
-
var CustomIconButton =
|
|
10357
|
+
import { IconButton as IconButton11, styled as styled14, Tooltip as Tooltip16 } from "@elementor/ui";
|
|
10358
|
+
var CustomIconButton = styled14(IconButton11)(({ theme }) => ({
|
|
9158
10359
|
width: theme.spacing(2.5),
|
|
9159
10360
|
height: theme.spacing(2.5)
|
|
9160
10361
|
}));
|
|
9161
|
-
var ClearIconButton = ({ tooltipText, onClick, disabled, size = "tiny" }) => /* @__PURE__ */
|
|
10362
|
+
var ClearIconButton = ({ tooltipText, onClick, disabled, size = "tiny" }) => /* @__PURE__ */ React135.createElement(Tooltip16, { title: tooltipText, placement: "top", disableInteractive: true }, /* @__PURE__ */ React135.createElement(CustomIconButton, { "aria-label": tooltipText, size, onClick, disabled }, /* @__PURE__ */ React135.createElement(BrushBigIcon, { fontSize: size })));
|
|
9162
10363
|
|
|
9163
10364
|
// src/components/repeater/repeater.tsx
|
|
9164
|
-
import * as
|
|
9165
|
-
import { useEffect as useEffect21, useState as
|
|
10365
|
+
import * as React136 from "react";
|
|
10366
|
+
import { useEffect as useEffect21, useState as useState26 } from "react";
|
|
9166
10367
|
import { CopyIcon as CopyIcon2, EyeIcon as EyeIcon2, EyeOffIcon as EyeOffIcon2, PlusIcon as PlusIcon5, XIcon as XIcon4 } from "@elementor/icons";
|
|
9167
10368
|
import {
|
|
9168
10369
|
bindPopover as bindPopover9,
|
|
9169
10370
|
bindTrigger as bindTrigger7,
|
|
9170
|
-
Box as
|
|
10371
|
+
Box as Box35,
|
|
9171
10372
|
IconButton as IconButton12,
|
|
9172
10373
|
Infotip as Infotip4,
|
|
9173
|
-
Tooltip as
|
|
9174
|
-
usePopupState as
|
|
10374
|
+
Tooltip as Tooltip17,
|
|
10375
|
+
usePopupState as usePopupState14
|
|
9175
10376
|
} from "@elementor/ui";
|
|
9176
|
-
import { __ as
|
|
10377
|
+
import { __ as __70 } from "@wordpress/i18n";
|
|
9177
10378
|
var SIZE12 = "tiny";
|
|
9178
10379
|
var EMPTY_OPEN_ITEM2 = -1;
|
|
9179
10380
|
var Repeater3 = ({
|
|
@@ -9192,7 +10393,7 @@ var Repeater3 = ({
|
|
|
9192
10393
|
isSortable = true,
|
|
9193
10394
|
adornment = ControlAdornments
|
|
9194
10395
|
}) => {
|
|
9195
|
-
const [openItem, setOpenItem] =
|
|
10396
|
+
const [openItem, setOpenItem] = useState26(initialOpenItem);
|
|
9196
10397
|
const uniqueKeys = items2.map(
|
|
9197
10398
|
(item, index) => isSortable && "getId" in itemSettings ? itemSettings.getId({ item, index }) : String(index)
|
|
9198
10399
|
);
|
|
@@ -9255,7 +10456,7 @@ var Repeater3 = ({
|
|
|
9255
10456
|
};
|
|
9256
10457
|
const isButtonDisabled = disabled || disableAddItemButton;
|
|
9257
10458
|
const shouldShowInfotip = isButtonDisabled && addButtonInfotipContent;
|
|
9258
|
-
const addButton = /* @__PURE__ */
|
|
10459
|
+
const addButton = /* @__PURE__ */ React136.createElement(
|
|
9259
10460
|
IconButton12,
|
|
9260
10461
|
{
|
|
9261
10462
|
size: SIZE12,
|
|
@@ -9264,11 +10465,11 @@ var Repeater3 = ({
|
|
|
9264
10465
|
},
|
|
9265
10466
|
disabled: isButtonDisabled,
|
|
9266
10467
|
onClick: addRepeaterItem,
|
|
9267
|
-
"aria-label":
|
|
10468
|
+
"aria-label": __70("Add item", "elementor")
|
|
9268
10469
|
},
|
|
9269
|
-
/* @__PURE__ */
|
|
10470
|
+
/* @__PURE__ */ React136.createElement(PlusIcon5, { fontSize: SIZE12 })
|
|
9270
10471
|
);
|
|
9271
|
-
return /* @__PURE__ */
|
|
10472
|
+
return /* @__PURE__ */ React136.createElement(SectionContent, { gap: 2 }, /* @__PURE__ */ React136.createElement(RepeaterHeader, { label, adornment }, shouldShowInfotip ? /* @__PURE__ */ React136.createElement(
|
|
9272
10473
|
Infotip4,
|
|
9273
10474
|
{
|
|
9274
10475
|
placement: "right",
|
|
@@ -9276,20 +10477,20 @@ var Repeater3 = ({
|
|
|
9276
10477
|
color: "secondary",
|
|
9277
10478
|
slotProps: { popper: { sx: { width: 300 } } }
|
|
9278
10479
|
},
|
|
9279
|
-
/* @__PURE__ */
|
|
9280
|
-
) : addButton), 0 < uniqueKeys.length && /* @__PURE__ */
|
|
10480
|
+
/* @__PURE__ */ React136.createElement(Box35, { sx: { ...isButtonDisabled ? { cursor: "not-allowed" } : {} } }, addButton)
|
|
10481
|
+
) : addButton), 0 < uniqueKeys.length && /* @__PURE__ */ React136.createElement(SortableProvider, { value: uniqueKeys, onChange: onChangeOrder }, uniqueKeys.map((key) => {
|
|
9281
10482
|
const index = uniqueKeys.indexOf(key);
|
|
9282
10483
|
const value = items2[index];
|
|
9283
10484
|
if (!value) {
|
|
9284
10485
|
return null;
|
|
9285
10486
|
}
|
|
9286
|
-
return /* @__PURE__ */
|
|
10487
|
+
return /* @__PURE__ */ React136.createElement(SortableItem, { id: key, key: `sortable-${key}`, disabled: !isSortable }, /* @__PURE__ */ React136.createElement(
|
|
9287
10488
|
RepeaterItem,
|
|
9288
10489
|
{
|
|
9289
10490
|
disabled,
|
|
9290
10491
|
propDisabled: value?.disabled,
|
|
9291
|
-
label: /* @__PURE__ */
|
|
9292
|
-
startIcon: /* @__PURE__ */
|
|
10492
|
+
label: /* @__PURE__ */ React136.createElement(RepeaterItemLabelSlot, { value }, /* @__PURE__ */ React136.createElement(itemSettings.Label, { value, index })),
|
|
10493
|
+
startIcon: /* @__PURE__ */ React136.createElement(RepeaterItemIconSlot, { value }, /* @__PURE__ */ React136.createElement(itemSettings.Icon, { value })),
|
|
9293
10494
|
removeItem: () => removeRepeaterItem(index),
|
|
9294
10495
|
duplicateItem: () => duplicateRepeaterItem(index),
|
|
9295
10496
|
toggleDisableItem: () => toggleDisableRepeaterItem(index),
|
|
@@ -9303,7 +10504,7 @@ var Repeater3 = ({
|
|
|
9303
10504
|
actions: itemSettings.actions,
|
|
9304
10505
|
value
|
|
9305
10506
|
},
|
|
9306
|
-
(props) => /* @__PURE__ */
|
|
10507
|
+
(props) => /* @__PURE__ */ React136.createElement(
|
|
9307
10508
|
itemSettings.Content,
|
|
9308
10509
|
{
|
|
9309
10510
|
...props,
|
|
@@ -9345,16 +10546,16 @@ var RepeaterItem = ({
|
|
|
9345
10546
|
);
|
|
9346
10547
|
const triggerProps = bindTrigger7(popoverState);
|
|
9347
10548
|
usePopoverDismiss({ isOpen: popoverState.isOpen, onClose: popoverProps.onClose });
|
|
9348
|
-
const duplicateLabel =
|
|
9349
|
-
const toggleLabel = propDisabled ?
|
|
9350
|
-
const removeLabel =
|
|
9351
|
-
return /* @__PURE__ */
|
|
10549
|
+
const duplicateLabel = __70("Duplicate", "elementor");
|
|
10550
|
+
const toggleLabel = propDisabled ? __70("Show", "elementor") : __70("Hide", "elementor");
|
|
10551
|
+
const removeLabel = __70("Remove", "elementor");
|
|
10552
|
+
return /* @__PURE__ */ React136.createElement(Box35, { sx: { display: "contents" } }, /* @__PURE__ */ React136.createElement(
|
|
9352
10553
|
RepeaterTag,
|
|
9353
10554
|
{
|
|
9354
10555
|
disabled,
|
|
9355
10556
|
label,
|
|
9356
10557
|
ref: setRef,
|
|
9357
|
-
"aria-label":
|
|
10558
|
+
"aria-label": __70("Open item", "elementor"),
|
|
9358
10559
|
...triggerProps,
|
|
9359
10560
|
onClick: (e) => {
|
|
9360
10561
|
triggerProps.onClick(e);
|
|
@@ -9363,13 +10564,13 @@ var RepeaterItem = ({
|
|
|
9363
10564
|
}
|
|
9364
10565
|
},
|
|
9365
10566
|
startIcon,
|
|
9366
|
-
actions: /* @__PURE__ */
|
|
10567
|
+
actions: /* @__PURE__ */ React136.createElement(React136.Fragment, null, showDuplicate && /* @__PURE__ */ React136.createElement(Tooltip17, { title: duplicateLabel, placement: "top" }, /* @__PURE__ */ React136.createElement(IconButton12, { size: SIZE12, onClick: duplicateItem, "aria-label": duplicateLabel }, /* @__PURE__ */ React136.createElement(CopyIcon2, { fontSize: SIZE12 }))), showToggle && /* @__PURE__ */ React136.createElement(Tooltip17, { title: toggleLabel, placement: "top" }, /* @__PURE__ */ React136.createElement(IconButton12, { size: SIZE12, onClick: toggleDisableItem, "aria-label": toggleLabel }, propDisabled ? /* @__PURE__ */ React136.createElement(EyeOffIcon2, { fontSize: SIZE12 }) : /* @__PURE__ */ React136.createElement(EyeIcon2, { fontSize: SIZE12 }))), actions?.(value), showRemove && /* @__PURE__ */ React136.createElement(Tooltip17, { title: removeLabel, placement: "top" }, /* @__PURE__ */ React136.createElement(IconButton12, { size: SIZE12, onClick: removeItem, "aria-label": removeLabel }, /* @__PURE__ */ React136.createElement(XIcon4, { fontSize: SIZE12 }))))
|
|
9367
10568
|
}
|
|
9368
|
-
), /* @__PURE__ */
|
|
10569
|
+
), /* @__PURE__ */ React136.createElement(RepeaterPopover, { width: ref?.getBoundingClientRect().width, ...popoverProps, anchorEl: ref }, /* @__PURE__ */ React136.createElement(Box35, null, children({ anchorEl: ref }))));
|
|
9369
10570
|
};
|
|
9370
10571
|
var usePopover = (openOnMount, onOpen, onPopoverClose) => {
|
|
9371
|
-
const [ref, setRef] =
|
|
9372
|
-
const popoverState =
|
|
10572
|
+
const [ref, setRef] = useState26(null);
|
|
10573
|
+
const popoverState = usePopupState14({ variant: "popover" });
|
|
9373
10574
|
const popoverProps = bindPopover9(popoverState);
|
|
9374
10575
|
useEffect21(() => {
|
|
9375
10576
|
if (openOnMount && ref) {
|
|
@@ -9390,7 +10591,7 @@ var usePopover = (openOnMount, onOpen, onPopoverClose) => {
|
|
|
9390
10591
|
};
|
|
9391
10592
|
|
|
9392
10593
|
// src/components/size/unstable-size-field.tsx
|
|
9393
|
-
import * as
|
|
10594
|
+
import * as React139 from "react";
|
|
9394
10595
|
import { InputAdornment as InputAdornment6 } from "@elementor/ui";
|
|
9395
10596
|
|
|
9396
10597
|
// src/hooks/use-size-value.ts
|
|
@@ -9433,25 +10634,25 @@ var differsFromExternal = (newState, externalState) => {
|
|
|
9433
10634
|
};
|
|
9434
10635
|
|
|
9435
10636
|
// src/components/size/unit-select.tsx
|
|
9436
|
-
import * as
|
|
9437
|
-
import { useId as
|
|
10637
|
+
import * as React137 from "react";
|
|
10638
|
+
import { useId as useId6 } from "react";
|
|
9438
10639
|
import { MenuListItem as MenuListItem8 } from "@elementor/editor-ui";
|
|
9439
|
-
import { bindMenu as
|
|
10640
|
+
import { bindMenu as bindMenu5, bindTrigger as bindTrigger8, Button as Button7, Menu as Menu6, styled as styled15, usePopupState as usePopupState15 } from "@elementor/ui";
|
|
9440
10641
|
var menuItemContentStyles2 = {
|
|
9441
10642
|
display: "flex",
|
|
9442
10643
|
flexDirection: "column",
|
|
9443
10644
|
justifyContent: "center"
|
|
9444
10645
|
};
|
|
9445
10646
|
var UnitSelect = ({ value, showPrimaryColor, onClick, options }) => {
|
|
9446
|
-
const popupState =
|
|
10647
|
+
const popupState = usePopupState15({
|
|
9447
10648
|
variant: "popover",
|
|
9448
|
-
popupId:
|
|
10649
|
+
popupId: useId6()
|
|
9449
10650
|
});
|
|
9450
10651
|
const handleMenuItemClick = (index) => {
|
|
9451
10652
|
onClick(options[index]);
|
|
9452
10653
|
popupState.close();
|
|
9453
10654
|
};
|
|
9454
|
-
return /* @__PURE__ */
|
|
10655
|
+
return /* @__PURE__ */ React137.createElement(React137.Fragment, null, /* @__PURE__ */ React137.createElement(StyledButton3, { isPrimaryColor: showPrimaryColor, size: "small", ...bindTrigger8(popupState) }, value), /* @__PURE__ */ React137.createElement(Menu6, { MenuListProps: { dense: true }, ...bindMenu5(popupState) }, options.map((option, index) => /* @__PURE__ */ React137.createElement(
|
|
9455
10656
|
MenuListItem8,
|
|
9456
10657
|
{
|
|
9457
10658
|
key: option,
|
|
@@ -9470,7 +10671,7 @@ var UnitSelect = ({ value, showPrimaryColor, onClick, options }) => {
|
|
|
9470
10671
|
option.toUpperCase()
|
|
9471
10672
|
))));
|
|
9472
10673
|
};
|
|
9473
|
-
var StyledButton3 =
|
|
10674
|
+
var StyledButton3 = styled15(Button7, {
|
|
9474
10675
|
shouldForwardProp: (prop) => prop !== "isPrimaryColor"
|
|
9475
10676
|
})(({ isPrimaryColor, theme }) => ({
|
|
9476
10677
|
color: isPrimaryColor ? theme.palette.text.primary : theme.palette.text.tertiary,
|
|
@@ -9480,11 +10681,11 @@ var StyledButton3 = styled12(Button7, {
|
|
|
9480
10681
|
}));
|
|
9481
10682
|
|
|
9482
10683
|
// src/components/size/unstable-size-input.tsx
|
|
9483
|
-
import * as
|
|
10684
|
+
import * as React138 from "react";
|
|
9484
10685
|
import { forwardRef as forwardRef13 } from "react";
|
|
9485
10686
|
var UnstableSizeInput = forwardRef13(
|
|
9486
10687
|
({ type, value, onChange, onKeyDown, onKeyUp, InputProps, onBlur, focused, disabled }, ref) => {
|
|
9487
|
-
return /* @__PURE__ */
|
|
10688
|
+
return /* @__PURE__ */ React138.createElement(
|
|
9488
10689
|
NumberInput,
|
|
9489
10690
|
{
|
|
9490
10691
|
ref,
|
|
@@ -9522,7 +10723,7 @@ var UnstableSizeField = ({
|
|
|
9522
10723
|
const shouldHighlightUnit2 = () => {
|
|
9523
10724
|
return hasValue(size);
|
|
9524
10725
|
};
|
|
9525
|
-
return /* @__PURE__ */
|
|
10726
|
+
return /* @__PURE__ */ React139.createElement(
|
|
9526
10727
|
UnstableSizeInput,
|
|
9527
10728
|
{
|
|
9528
10729
|
type: "number",
|
|
@@ -9531,8 +10732,8 @@ var UnstableSizeField = ({
|
|
|
9531
10732
|
onChange: (event) => setSize(event.target.value),
|
|
9532
10733
|
InputProps: {
|
|
9533
10734
|
...InputProps,
|
|
9534
|
-
startAdornment: startIcon && /* @__PURE__ */
|
|
9535
|
-
endAdornment: /* @__PURE__ */
|
|
10735
|
+
startAdornment: startIcon && /* @__PURE__ */ React139.createElement(InputAdornment6, { position: "start" }, startIcon),
|
|
10736
|
+
endAdornment: /* @__PURE__ */ React139.createElement(InputAdornment6, { position: "end" }, /* @__PURE__ */ React139.createElement(
|
|
9536
10737
|
UnitSelect,
|
|
9537
10738
|
{
|
|
9538
10739
|
options: units2,
|
|
@@ -9550,7 +10751,7 @@ var hasValue = (value) => {
|
|
|
9550
10751
|
};
|
|
9551
10752
|
|
|
9552
10753
|
// src/hooks/use-font-families.ts
|
|
9553
|
-
import { useMemo as
|
|
10754
|
+
import { useMemo as useMemo20 } from "react";
|
|
9554
10755
|
import { getElementorConfig } from "@elementor/editor-v1-adapters";
|
|
9555
10756
|
var getFontControlConfig = () => {
|
|
9556
10757
|
const { controls } = getElementorConfig();
|
|
@@ -9558,7 +10759,7 @@ var getFontControlConfig = () => {
|
|
|
9558
10759
|
};
|
|
9559
10760
|
var useFontFamilies = () => {
|
|
9560
10761
|
const { groups, options } = getFontControlConfig();
|
|
9561
|
-
return
|
|
10762
|
+
return useMemo20(() => {
|
|
9562
10763
|
if (!groups || !options) {
|
|
9563
10764
|
return [];
|
|
9564
10765
|
}
|
|
@@ -9615,6 +10816,7 @@ export {
|
|
|
9615
10816
|
LinkControl,
|
|
9616
10817
|
LinkedDimensionsControl,
|
|
9617
10818
|
MentionTextAreaControl,
|
|
10819
|
+
NoticeControl,
|
|
9618
10820
|
NumberControl,
|
|
9619
10821
|
NumberInput,
|
|
9620
10822
|
PopoverContent,
|
|
@@ -9654,11 +10856,14 @@ export {
|
|
|
9654
10856
|
createControlReplacementsRegistry,
|
|
9655
10857
|
enqueueFont,
|
|
9656
10858
|
getControlReplacements,
|
|
10859
|
+
getFontAwesome7IconName,
|
|
9657
10860
|
injectIntoRepeaterItemActions,
|
|
9658
10861
|
injectIntoRepeaterItemIcon,
|
|
9659
10862
|
injectIntoRepeaterItemLabel,
|
|
9660
10863
|
isUnitExtendedOption,
|
|
9661
10864
|
registerControlReplacement,
|
|
10865
|
+
resetFontAwesome7IconsCache,
|
|
10866
|
+
resolveFontAwesome7Icon,
|
|
9662
10867
|
trackUpgradePromotionClick,
|
|
9663
10868
|
trackViewPromotion,
|
|
9664
10869
|
transitionProperties,
|