@elementor/editor-editing-panel 4.0.0-502 → 4.0.0-504
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 +30 -2
- package/dist/index.d.ts +30 -2
- package/dist/index.js +75 -60
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +58 -43
- package/dist/index.mjs.map +1 -1
- package/package.json +20 -20
- package/src/components/style-sections/typography-section/hooks/use-font-families.ts +5 -6
- package/src/dynamics/dynamic-transformer.ts +1 -4
- package/src/dynamics/hooks/use-dynamic-tag.ts +2 -2
- package/src/dynamics/hooks/use-prop-dynamic-tags.ts +17 -4
- package/src/dynamics/sync/get-atomic-dynamic-tags.ts +20 -3
- package/src/dynamics/types.ts +4 -0
- package/src/dynamics/utils.ts +1 -1
- package/src/hooks/use-direction.ts +1 -2
- package/src/hooks/use-license-config.ts +2 -2
- package/src/index.ts +1 -0
- package/src/sync/get-elementor-globals.ts +0 -13
- package/src/sync/types.ts +0 -51
package/dist/index.d.mts
CHANGED
|
@@ -2,7 +2,7 @@ import * as _elementor_locations from '@elementor/locations';
|
|
|
2
2
|
import { StyleDefinition, StyleDefinitionVariant, StyleDefinitionState, StyleDefinitionID } from '@elementor/editor-styles';
|
|
3
3
|
import * as react from 'react';
|
|
4
4
|
import { FC, PropsWithChildren, ReactNode, Dispatch, ElementType as ElementType$1, ComponentProps, ComponentType } from 'react';
|
|
5
|
-
import { Control as Control$1, ElementControl, Element, ElementType, ControlLayout } from '@elementor/editor-elements';
|
|
5
|
+
import { Control as Control$1, ElementControl, Element, ElementType, ControlLayout, ControlItem } from '@elementor/editor-elements';
|
|
6
6
|
import * as _elementor_editor_props from '@elementor/editor-props';
|
|
7
7
|
import { PropKey, PropTypeUtil, PropsSchema, ObjectPropType } from '@elementor/editor-props';
|
|
8
8
|
import * as _emotion_styled from '@emotion/styled';
|
|
@@ -1357,4 +1357,32 @@ type LicenseConfig = {
|
|
|
1357
1357
|
};
|
|
1358
1358
|
declare function setLicenseConfig(newConfig: Partial<LicenseConfig>): void;
|
|
1359
1359
|
|
|
1360
|
-
|
|
1360
|
+
type DynamicTags = Record<DynamicTag['name'], DynamicTag>;
|
|
1361
|
+
type DynamicTag = {
|
|
1362
|
+
name: string;
|
|
1363
|
+
label: string;
|
|
1364
|
+
group: string;
|
|
1365
|
+
categories: string[];
|
|
1366
|
+
atomic_controls: ControlItem[];
|
|
1367
|
+
props_schema: PropsSchema;
|
|
1368
|
+
meta?: {
|
|
1369
|
+
origin: string;
|
|
1370
|
+
required_license: string;
|
|
1371
|
+
};
|
|
1372
|
+
};
|
|
1373
|
+
type DynamicTagsManager = {
|
|
1374
|
+
createTag: (id: string, name: string, settings: Record<string, unknown>) => TagInstance;
|
|
1375
|
+
loadTagDataFromCache: (tag: TagInstance) => unknown;
|
|
1376
|
+
refreshCacheFromServer: (callback: () => void) => void;
|
|
1377
|
+
};
|
|
1378
|
+
type TagInstance = {
|
|
1379
|
+
options: {
|
|
1380
|
+
id: string;
|
|
1381
|
+
name: string;
|
|
1382
|
+
};
|
|
1383
|
+
model: {
|
|
1384
|
+
toJSON: () => Record<string, unknown>;
|
|
1385
|
+
};
|
|
1386
|
+
};
|
|
1387
|
+
|
|
1388
|
+
export { Control as BaseControl, type ControlType, CustomCssIndicator, type DynamicTag, type DynamicTags, type DynamicTagsManager, ElementProvider, FIELD_TYPE, HISTORY_DEBOUNCE_WAIT, SectionContent, SettingsControl, SettingsField, StyleIndicator, StyleTabSection, StylesProviderCannotUpdatePropsError, type ValidationEvent, type ValidationResult, controlActionsMenu, controlsRegistry, createTopLevelObjectType, doApplyClasses, doGetAppliedClasses, doUnapplyClass, getControlReplacements, getFieldIndicators, getSubtitle, getTitle, init, injectIntoClassSelectorActions, injectIntoCssClassConvert, injectIntoPanelHeaderTop, injectIntoStyleTab, registerControlReplacement, registerEditingPanelReplacement, registerFieldIndicator, registerStyleProviderToColors, setLicenseConfig, stylesInheritanceTransformersRegistry, useClassesProp, useCustomCss, useElement, useFontFamilies, usePanelActions, usePanelStatus, useStateByElement, useStyle, useStylesRerender };
|
package/dist/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import * as _elementor_locations from '@elementor/locations';
|
|
|
2
2
|
import { StyleDefinition, StyleDefinitionVariant, StyleDefinitionState, StyleDefinitionID } from '@elementor/editor-styles';
|
|
3
3
|
import * as react from 'react';
|
|
4
4
|
import { FC, PropsWithChildren, ReactNode, Dispatch, ElementType as ElementType$1, ComponentProps, ComponentType } from 'react';
|
|
5
|
-
import { Control as Control$1, ElementControl, Element, ElementType, ControlLayout } from '@elementor/editor-elements';
|
|
5
|
+
import { Control as Control$1, ElementControl, Element, ElementType, ControlLayout, ControlItem } from '@elementor/editor-elements';
|
|
6
6
|
import * as _elementor_editor_props from '@elementor/editor-props';
|
|
7
7
|
import { PropKey, PropTypeUtil, PropsSchema, ObjectPropType } from '@elementor/editor-props';
|
|
8
8
|
import * as _emotion_styled from '@emotion/styled';
|
|
@@ -1357,4 +1357,32 @@ type LicenseConfig = {
|
|
|
1357
1357
|
};
|
|
1358
1358
|
declare function setLicenseConfig(newConfig: Partial<LicenseConfig>): void;
|
|
1359
1359
|
|
|
1360
|
-
|
|
1360
|
+
type DynamicTags = Record<DynamicTag['name'], DynamicTag>;
|
|
1361
|
+
type DynamicTag = {
|
|
1362
|
+
name: string;
|
|
1363
|
+
label: string;
|
|
1364
|
+
group: string;
|
|
1365
|
+
categories: string[];
|
|
1366
|
+
atomic_controls: ControlItem[];
|
|
1367
|
+
props_schema: PropsSchema;
|
|
1368
|
+
meta?: {
|
|
1369
|
+
origin: string;
|
|
1370
|
+
required_license: string;
|
|
1371
|
+
};
|
|
1372
|
+
};
|
|
1373
|
+
type DynamicTagsManager = {
|
|
1374
|
+
createTag: (id: string, name: string, settings: Record<string, unknown>) => TagInstance;
|
|
1375
|
+
loadTagDataFromCache: (tag: TagInstance) => unknown;
|
|
1376
|
+
refreshCacheFromServer: (callback: () => void) => void;
|
|
1377
|
+
};
|
|
1378
|
+
type TagInstance = {
|
|
1379
|
+
options: {
|
|
1380
|
+
id: string;
|
|
1381
|
+
name: string;
|
|
1382
|
+
};
|
|
1383
|
+
model: {
|
|
1384
|
+
toJSON: () => Record<string, unknown>;
|
|
1385
|
+
};
|
|
1386
|
+
};
|
|
1387
|
+
|
|
1388
|
+
export { Control as BaseControl, type ControlType, CustomCssIndicator, type DynamicTag, type DynamicTags, type DynamicTagsManager, ElementProvider, FIELD_TYPE, HISTORY_DEBOUNCE_WAIT, SectionContent, SettingsControl, SettingsField, StyleIndicator, StyleTabSection, StylesProviderCannotUpdatePropsError, type ValidationEvent, type ValidationResult, controlActionsMenu, controlsRegistry, createTopLevelObjectType, doApplyClasses, doGetAppliedClasses, doUnapplyClass, getControlReplacements, getFieldIndicators, getSubtitle, getTitle, init, injectIntoClassSelectorActions, injectIntoCssClassConvert, injectIntoPanelHeaderTop, injectIntoStyleTab, registerControlReplacement, registerEditingPanelReplacement, registerFieldIndicator, registerStyleProviderToColors, setLicenseConfig, stylesInheritanceTransformersRegistry, useClassesProp, useCustomCss, useElement, useFontFamilies, usePanelActions, usePanelStatus, useStateByElement, useStyle, useStylesRerender };
|
package/dist/index.js
CHANGED
|
@@ -1788,7 +1788,7 @@ function EditorPanelErrorFallback() {
|
|
|
1788
1788
|
// src/components/editing-panel-tabs.tsx
|
|
1789
1789
|
var import_react35 = require("react");
|
|
1790
1790
|
var React82 = __toESM(require("react"));
|
|
1791
|
-
var
|
|
1791
|
+
var import_editor_v1_adapters8 = require("@elementor/editor-v1-adapters");
|
|
1792
1792
|
var import_ui37 = require("@elementor/ui");
|
|
1793
1793
|
var import_i18n56 = require("@wordpress/i18n");
|
|
1794
1794
|
|
|
@@ -2876,22 +2876,11 @@ var import_ui21 = require("@elementor/ui");
|
|
|
2876
2876
|
var import_i18n11 = require("@wordpress/i18n");
|
|
2877
2877
|
|
|
2878
2878
|
// src/hooks/use-direction.ts
|
|
2879
|
+
var import_editor_v1_adapters5 = require("@elementor/editor-v1-adapters");
|
|
2879
2880
|
var import_ui19 = require("@elementor/ui");
|
|
2880
|
-
|
|
2881
|
-
// src/sync/get-elementor-globals.ts
|
|
2882
|
-
var getElementorConfig = () => {
|
|
2883
|
-
const extendedWindow2 = window;
|
|
2884
|
-
return extendedWindow2.elementor?.config ?? {};
|
|
2885
|
-
};
|
|
2886
|
-
var getElementorFrontendConfig = () => {
|
|
2887
|
-
const extendedWindow2 = window;
|
|
2888
|
-
return extendedWindow2.elementorFrontend?.config ?? {};
|
|
2889
|
-
};
|
|
2890
|
-
|
|
2891
|
-
// src/hooks/use-direction.ts
|
|
2892
2881
|
function useDirection() {
|
|
2893
2882
|
const theme = (0, import_ui19.useTheme)();
|
|
2894
|
-
const isUiRtl = "rtl" === theme.direction, isSiteRtl = !!getElementorFrontendConfig()?.is_rtl;
|
|
2883
|
+
const isUiRtl = "rtl" === theme.direction, isSiteRtl = !!(0, import_editor_v1_adapters5.getElementorFrontendConfig)()?.is_rtl;
|
|
2895
2884
|
return { isSiteRtl, isUiRtl };
|
|
2896
2885
|
}
|
|
2897
2886
|
|
|
@@ -3130,14 +3119,14 @@ var import_editor_elements12 = require("@elementor/editor-elements");
|
|
|
3130
3119
|
var import_i18n28 = require("@wordpress/i18n");
|
|
3131
3120
|
|
|
3132
3121
|
// src/hooks/use-computed-style.ts
|
|
3133
|
-
var
|
|
3122
|
+
var import_editor_v1_adapters6 = require("@elementor/editor-v1-adapters");
|
|
3134
3123
|
function useComputedStyle(elementId) {
|
|
3135
|
-
return (0,
|
|
3124
|
+
return (0, import_editor_v1_adapters6.__privateUseListenTo)(
|
|
3136
3125
|
[
|
|
3137
|
-
(0,
|
|
3138
|
-
(0,
|
|
3139
|
-
(0,
|
|
3140
|
-
(0,
|
|
3126
|
+
(0, import_editor_v1_adapters6.windowEvent)("elementor/device-mode/change"),
|
|
3127
|
+
(0, import_editor_v1_adapters6.commandEndEvent)("document/elements/reset-style"),
|
|
3128
|
+
(0, import_editor_v1_adapters6.commandEndEvent)("document/elements/settings"),
|
|
3129
|
+
(0, import_editor_v1_adapters6.commandEndEvent)("document/elements/paste-style")
|
|
3141
3130
|
],
|
|
3142
3131
|
() => {
|
|
3143
3132
|
if (!elementId) {
|
|
@@ -4198,6 +4187,7 @@ var import_i18n42 = require("@wordpress/i18n");
|
|
|
4198
4187
|
|
|
4199
4188
|
// src/components/style-sections/typography-section/hooks/use-font-families.ts
|
|
4200
4189
|
var import_react29 = require("react");
|
|
4190
|
+
var import_editor_v1_adapters7 = require("@elementor/editor-v1-adapters");
|
|
4201
4191
|
var import_i18n41 = require("@wordpress/i18n");
|
|
4202
4192
|
var supportedCategories = {
|
|
4203
4193
|
system: (0, import_i18n41.__)("System", "elementor"),
|
|
@@ -4205,7 +4195,7 @@ var supportedCategories = {
|
|
|
4205
4195
|
googlefonts: (0, import_i18n41.__)("Google Fonts", "elementor")
|
|
4206
4196
|
};
|
|
4207
4197
|
var getFontFamilies = () => {
|
|
4208
|
-
const { controls } = getElementorConfig();
|
|
4198
|
+
const { controls } = (0, import_editor_v1_adapters7.getElementorConfig)();
|
|
4209
4199
|
const options12 = controls?.font?.options;
|
|
4210
4200
|
if (!options12) {
|
|
4211
4201
|
return null;
|
|
@@ -4778,7 +4768,7 @@ var EditingPanelTabs = () => {
|
|
|
4778
4768
|
var PanelTabContent = () => {
|
|
4779
4769
|
const editorDefaults = useDefaultPanelSettings();
|
|
4780
4770
|
const defaultComponentTab = editorDefaults.defaultTab;
|
|
4781
|
-
const isInteractionsActive = (0,
|
|
4771
|
+
const isInteractionsActive = (0, import_editor_v1_adapters8.isExperimentActive)("e_interactions");
|
|
4782
4772
|
const [currentTab, setCurrentTab] = useStateByElement("tab", defaultComponentTab);
|
|
4783
4773
|
const { getTabProps, getTabPanelProps, getTabsProps } = (0, import_ui37.useTabs)(currentTab);
|
|
4784
4774
|
return /* @__PURE__ */ React82.createElement(ScrollProvider, null, /* @__PURE__ */ React82.createElement(import_ui37.Stack, { direction: "column", sx: { width: "100%" } }, /* @__PURE__ */ React82.createElement(import_ui37.Stack, { sx: { ...stickyHeaderStyles, top: 0 } }, /* @__PURE__ */ React82.createElement(
|
|
@@ -4821,11 +4811,11 @@ var EditingPanel = () => {
|
|
|
4821
4811
|
// src/init.ts
|
|
4822
4812
|
var import_editor = require("@elementor/editor");
|
|
4823
4813
|
var import_editor_panels3 = require("@elementor/editor-panels");
|
|
4824
|
-
var
|
|
4814
|
+
var import_editor_v1_adapters12 = require("@elementor/editor-v1-adapters");
|
|
4825
4815
|
|
|
4826
4816
|
// src/hooks/use-open-editor-panel.ts
|
|
4827
4817
|
var import_react36 = require("react");
|
|
4828
|
-
var
|
|
4818
|
+
var import_editor_v1_adapters9 = require("@elementor/editor-v1-adapters");
|
|
4829
4819
|
|
|
4830
4820
|
// src/panel.ts
|
|
4831
4821
|
var import_editor_panels2 = require("@elementor/editor-panels");
|
|
@@ -4849,7 +4839,7 @@ var isAtomicWidgetSelected = () => {
|
|
|
4849
4839
|
var useOpenEditorPanel = () => {
|
|
4850
4840
|
const { open } = usePanelActions();
|
|
4851
4841
|
(0, import_react36.useEffect)(() => {
|
|
4852
|
-
return (0,
|
|
4842
|
+
return (0, import_editor_v1_adapters9.__privateListenTo)((0, import_editor_v1_adapters9.commandStartEvent)("panel/editor/open"), () => {
|
|
4853
4843
|
if (isAtomicWidgetSelected()) {
|
|
4854
4844
|
open();
|
|
4855
4845
|
}
|
|
@@ -4869,8 +4859,8 @@ var import_react37 = require("react");
|
|
|
4869
4859
|
var import_editor_ui9 = require("@elementor/editor-ui");
|
|
4870
4860
|
var import_i18n58 = require("@wordpress/i18n");
|
|
4871
4861
|
function getCustomCssPromotion() {
|
|
4872
|
-
const
|
|
4873
|
-
return
|
|
4862
|
+
const extendedWindow = window;
|
|
4863
|
+
return extendedWindow.elementor?.config?.v4Promotions?.customCss;
|
|
4874
4864
|
}
|
|
4875
4865
|
var CustomCssSection = () => {
|
|
4876
4866
|
const [showInfoTip, setShowInfoTip] = (0, import_react37.useState)(false);
|
|
@@ -5303,26 +5293,60 @@ var import_editor_props18 = require("@elementor/editor-props");
|
|
|
5303
5293
|
var import_icons23 = require("@elementor/icons");
|
|
5304
5294
|
|
|
5305
5295
|
// src/dynamics/hooks/use-dynamic-tag.ts
|
|
5306
|
-
var
|
|
5296
|
+
var import_react40 = require("react");
|
|
5307
5297
|
|
|
5308
5298
|
// src/dynamics/hooks/use-prop-dynamic-tags.ts
|
|
5309
|
-
var
|
|
5299
|
+
var import_react39 = require("react");
|
|
5310
5300
|
var import_editor_controls53 = require("@elementor/editor-controls");
|
|
5311
5301
|
|
|
5312
5302
|
// src/dynamics/sync/get-atomic-dynamic-tags.ts
|
|
5313
|
-
var
|
|
5314
|
-
|
|
5303
|
+
var import_editor_v1_adapters10 = require("@elementor/editor-v1-adapters");
|
|
5304
|
+
|
|
5305
|
+
// src/hooks/use-license-config.ts
|
|
5306
|
+
var import_react38 = require("react");
|
|
5307
|
+
var config = { expired: false };
|
|
5308
|
+
var listeners = /* @__PURE__ */ new Set();
|
|
5309
|
+
function setLicenseConfig(newConfig) {
|
|
5310
|
+
config = { ...config, ...newConfig };
|
|
5311
|
+
listeners.forEach((listener) => listener());
|
|
5312
|
+
}
|
|
5313
|
+
function getLicenseConfig() {
|
|
5314
|
+
return config;
|
|
5315
|
+
}
|
|
5316
|
+
function subscribe(listener) {
|
|
5317
|
+
listeners.add(listener);
|
|
5318
|
+
return () => listeners.delete(listener);
|
|
5319
|
+
}
|
|
5320
|
+
function useLicenseConfig() {
|
|
5321
|
+
return (0, import_react38.useSyncExternalStore)(subscribe, getLicenseConfig, getLicenseConfig);
|
|
5322
|
+
}
|
|
5323
|
+
|
|
5324
|
+
// src/dynamics/sync/get-atomic-dynamic-tags.ts
|
|
5325
|
+
var getAtomicDynamicTags = (shouldFilterByLicense = true) => {
|
|
5326
|
+
const { atomicDynamicTags } = (0, import_editor_v1_adapters10.getElementorConfig)();
|
|
5315
5327
|
if (!atomicDynamicTags) {
|
|
5316
5328
|
return null;
|
|
5317
5329
|
}
|
|
5318
5330
|
return {
|
|
5319
|
-
tags: atomicDynamicTags.tags,
|
|
5331
|
+
tags: shouldFilterByLicense ? filterByLicense(atomicDynamicTags.tags) : atomicDynamicTags.tags,
|
|
5320
5332
|
groups: atomicDynamicTags.groups
|
|
5321
5333
|
};
|
|
5322
5334
|
};
|
|
5335
|
+
var filterByLicense = (tags) => {
|
|
5336
|
+
const { expired } = getLicenseConfig();
|
|
5337
|
+
if (expired) {
|
|
5338
|
+
return Object.fromEntries(
|
|
5339
|
+
Object.entries(tags).filter(
|
|
5340
|
+
([, tag]) => !(tag?.meta?.origin === "elementor" && tag?.meta?.required_license)
|
|
5341
|
+
)
|
|
5342
|
+
);
|
|
5343
|
+
}
|
|
5344
|
+
return tags;
|
|
5345
|
+
};
|
|
5323
5346
|
|
|
5324
5347
|
// src/dynamics/utils.ts
|
|
5325
5348
|
var import_editor_props17 = require("@elementor/editor-props");
|
|
5349
|
+
var import_editor_v1_adapters11 = require("@elementor/editor-v1-adapters");
|
|
5326
5350
|
var import_schema = require("@elementor/schema");
|
|
5327
5351
|
var DYNAMIC_PROP_TYPE_KEY = "dynamic";
|
|
5328
5352
|
var dynamicPropTypeUtil = (0, import_editor_props17.createPropUtils)(
|
|
@@ -5334,7 +5358,7 @@ var dynamicPropTypeUtil = (0, import_editor_props17.createPropUtils)(
|
|
|
5334
5358
|
})
|
|
5335
5359
|
);
|
|
5336
5360
|
var isDynamicTagSupported = (tagName) => {
|
|
5337
|
-
return !!getElementorConfig()?.atomicDynamicTags?.tags?.[tagName];
|
|
5361
|
+
return !!(0, import_editor_v1_adapters11.getElementorConfig)()?.atomicDynamicTags?.tags?.[tagName];
|
|
5338
5362
|
};
|
|
5339
5363
|
var isDynamicPropType = (prop) => prop.key === DYNAMIC_PROP_TYPE_KEY;
|
|
5340
5364
|
var getDynamicPropType = (propType) => {
|
|
@@ -5350,16 +5374,27 @@ var supportsDynamic = (propType) => {
|
|
|
5350
5374
|
|
|
5351
5375
|
// src/dynamics/hooks/use-prop-dynamic-tags.ts
|
|
5352
5376
|
var usePropDynamicTags = () => {
|
|
5377
|
+
return usePropDynamicTagsInternal(true);
|
|
5378
|
+
};
|
|
5379
|
+
var useAllPropDynamicTags = () => {
|
|
5380
|
+
return usePropDynamicTagsInternal(false);
|
|
5381
|
+
};
|
|
5382
|
+
var usePropDynamicTagsInternal = (filterByLicense2) => {
|
|
5353
5383
|
let categories = [];
|
|
5354
5384
|
const { propType } = (0, import_editor_controls53.useBoundProp)();
|
|
5355
5385
|
if (propType) {
|
|
5356
5386
|
const propDynamicType = getDynamicPropType(propType);
|
|
5357
5387
|
categories = propDynamicType?.settings.categories || [];
|
|
5358
5388
|
}
|
|
5359
|
-
|
|
5389
|
+
const categoriesKey = categories.join();
|
|
5390
|
+
return (0, import_react39.useMemo)(
|
|
5391
|
+
() => getDynamicTagsByCategories(categories, filterByLicense2),
|
|
5392
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
5393
|
+
[categoriesKey, filterByLicense2]
|
|
5394
|
+
);
|
|
5360
5395
|
};
|
|
5361
|
-
var getDynamicTagsByCategories = (categories) => {
|
|
5362
|
-
const { tags, groups } = getAtomicDynamicTags() || {};
|
|
5396
|
+
var getDynamicTagsByCategories = (categories, filterByLicense2) => {
|
|
5397
|
+
const { tags, groups } = getAtomicDynamicTags(filterByLicense2) || {};
|
|
5363
5398
|
if (!categories.length || !tags || !groups) {
|
|
5364
5399
|
return [];
|
|
5365
5400
|
}
|
|
@@ -5385,8 +5420,8 @@ var getDynamicTagsByCategories = (categories) => {
|
|
|
5385
5420
|
|
|
5386
5421
|
// src/dynamics/hooks/use-dynamic-tag.ts
|
|
5387
5422
|
var useDynamicTag = (tagName) => {
|
|
5388
|
-
const dynamicTags =
|
|
5389
|
-
return (0,
|
|
5423
|
+
const dynamicTags = useAllPropDynamicTags();
|
|
5424
|
+
return (0, import_react40.useMemo)(() => dynamicTags.find((tag) => tag.name === tagName) ?? null, [dynamicTags, tagName]);
|
|
5390
5425
|
};
|
|
5391
5426
|
|
|
5392
5427
|
// src/dynamics/components/background-control-dynamic-tag.tsx
|
|
@@ -5414,25 +5449,6 @@ var import_icons25 = require("@elementor/icons");
|
|
|
5414
5449
|
var import_ui41 = require("@elementor/ui");
|
|
5415
5450
|
var import_i18n62 = require("@wordpress/i18n");
|
|
5416
5451
|
|
|
5417
|
-
// src/hooks/use-license-config.ts
|
|
5418
|
-
var import_react40 = require("react");
|
|
5419
|
-
var config = { expired: false };
|
|
5420
|
-
var listeners = /* @__PURE__ */ new Set();
|
|
5421
|
-
function setLicenseConfig(newConfig) {
|
|
5422
|
-
config = { ...config, ...newConfig };
|
|
5423
|
-
listeners.forEach((listener) => listener());
|
|
5424
|
-
}
|
|
5425
|
-
function getConfig() {
|
|
5426
|
-
return config;
|
|
5427
|
-
}
|
|
5428
|
-
function subscribe(listener) {
|
|
5429
|
-
listeners.add(listener);
|
|
5430
|
-
return () => listeners.delete(listener);
|
|
5431
|
-
}
|
|
5432
|
-
function useLicenseConfig() {
|
|
5433
|
-
return (0, import_react40.useSyncExternalStore)(subscribe, getConfig, getConfig);
|
|
5434
|
-
}
|
|
5435
|
-
|
|
5436
5452
|
// src/hooks/use-persist-dynamic-value.ts
|
|
5437
5453
|
var import_session9 = require("@elementor/session");
|
|
5438
5454
|
var usePersistDynamicValue = (propKey) => {
|
|
@@ -5855,7 +5871,6 @@ var DynamicTagsManagerNotFoundError = (0, import_utils9.createError)({
|
|
|
5855
5871
|
});
|
|
5856
5872
|
|
|
5857
5873
|
// src/dynamics/dynamic-transformer.ts
|
|
5858
|
-
var extendedWindow = window;
|
|
5859
5874
|
var dynamicTransformer = (0, import_editor_canvas2.createTransformer)((value, { propType }) => {
|
|
5860
5875
|
if (!value?.name || !isDynamicTagSupported(value.name)) {
|
|
5861
5876
|
return propType?.default ?? null;
|
|
@@ -5870,7 +5885,7 @@ function simpleTransform(props) {
|
|
|
5870
5885
|
return Object.fromEntries(transformed);
|
|
5871
5886
|
}
|
|
5872
5887
|
function getDynamicValue(name, settings) {
|
|
5873
|
-
const { dynamicTags } =
|
|
5888
|
+
const { dynamicTags } = window.elementor ?? {};
|
|
5874
5889
|
if (!dynamicTags) {
|
|
5875
5890
|
throw new DynamicTagsManagerNotFoundError();
|
|
5876
5891
|
}
|
|
@@ -6678,7 +6693,7 @@ function init4() {
|
|
|
6678
6693
|
init();
|
|
6679
6694
|
}
|
|
6680
6695
|
var blockV1Panel = () => {
|
|
6681
|
-
(0,
|
|
6696
|
+
(0, import_editor_v1_adapters12.blockCommand)({
|
|
6682
6697
|
command: "panel/editor/open",
|
|
6683
6698
|
condition: isAtomicWidgetSelected
|
|
6684
6699
|
});
|