@elementor/editor-controls 4.0.0-680 → 4.0.0-682

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.mjs CHANGED
@@ -5972,6 +5972,47 @@ import { PromotionAlert, PromotionChip } from "@elementor/editor-ui";
5972
5972
  import { ChevronDownIcon as ChevronDownIcon3, VariationsIcon } from "@elementor/icons";
5973
5973
  import { bindPopover as bindPopover6, bindTrigger as bindTrigger5, Box as Box19, Popover as Popover6, UnstableTag as UnstableTag3, usePopupState as usePopupState7 } from "@elementor/ui";
5974
5974
  import { __ as __49 } from "@wordpress/i18n";
5975
+
5976
+ // src/utils/tracking.ts
5977
+ import { getSelectedElements as getSelectedElements2 } from "@elementor/editor-elements";
5978
+ import { getMixpanel } from "@elementor/events";
5979
+ var getBaseEventProperties = (data, config) => ({
5980
+ app_type: config?.appTypes?.editor ?? "editor",
5981
+ window_name: config?.appTypes?.editor ?? "editor",
5982
+ interaction_type: config?.triggers?.click ?? "Click",
5983
+ target_name: data.target_name,
5984
+ target_location: data.target_location ?? "widget_panel",
5985
+ location_l1: data.location_l1 ?? getSelectedElements2()[0]?.type ?? "",
5986
+ ...data.location_l2 && { location_l2: data.location_l2 }
5987
+ });
5988
+ var dispatchPromotionEvent = (data, resolveOptions) => {
5989
+ const { dispatchEvent, config } = getMixpanel();
5990
+ const { eventName, interactionResult, interactionDescription } = resolveOptions(config);
5991
+ if (!eventName) {
5992
+ return;
5993
+ }
5994
+ dispatchEvent?.(eventName, {
5995
+ ...getBaseEventProperties(data, config),
5996
+ interaction_result: interactionResult,
5997
+ interaction_description: interactionDescription
5998
+ });
5999
+ };
6000
+ var trackViewPromotion = (data) => {
6001
+ dispatchPromotionEvent(data, (config) => ({
6002
+ eventName: config?.names?.promotions?.viewPromotion,
6003
+ interactionResult: config?.interactionResults?.promotionViewed ?? "promotion_viewed",
6004
+ interactionDescription: "user_viewed_promotion"
6005
+ }));
6006
+ };
6007
+ var trackUpgradePromotionClick = (data) => {
6008
+ dispatchPromotionEvent(data, (config) => ({
6009
+ eventName: config?.names?.promotions?.upgradePromotionClick,
6010
+ interactionResult: config?.interactionResults?.upgradeNow ?? "upgrade_now",
6011
+ interactionDescription: "user_clicked_upgrade_now"
6012
+ }));
6013
+ };
6014
+
6015
+ // src/controls/transition-control/transition-selector.tsx
5975
6016
  var toTransitionSelectorValue = (label) => {
5976
6017
  for (const category of transitionProperties) {
5977
6018
  const property = category.properties.find((prop) => prop.label === label);
@@ -6109,7 +6150,11 @@ var TransitionSelector = ({
6109
6150
  "Upgrade to customize transition properties and control effects.",
6110
6151
  "elementor"
6111
6152
  ),
6112
- upgradeUrl: PRO_UPGRADE_URL
6153
+ upgradeUrl: PRO_UPGRADE_URL,
6154
+ onCtaClick: () => trackUpgradePromotionClick({
6155
+ target_name: "transition_property",
6156
+ location_l2: "style"
6157
+ })
6113
6158
  }
6114
6159
  ) : null
6115
6160
  }
@@ -6713,47 +6758,6 @@ import * as React103 from "react";
6713
6758
  import { forwardRef as forwardRef11, useCallback as useCallback4, useImperativeHandle, useState as useState17 } from "react";
6714
6759
  import { PromotionChip as PromotionChip2, PromotionInfotip } from "@elementor/editor-ui";
6715
6760
  import { Box as Box25 } from "@elementor/ui";
6716
-
6717
- // src/utils/tracking.ts
6718
- import { getSelectedElements as getSelectedElements2 } from "@elementor/editor-elements";
6719
- import { getMixpanel } from "@elementor/events";
6720
- var getBaseEventProperties = (data, config) => ({
6721
- app_type: config?.appTypes?.editor ?? "editor",
6722
- window_name: config?.appTypes?.editor ?? "editor",
6723
- interaction_type: config?.triggers?.click ?? "Click",
6724
- target_name: data.target_name,
6725
- target_location: data.target_location ?? "widget_panel",
6726
- location_l1: data.location_l1 ?? getSelectedElements2()[0]?.type ?? "",
6727
- ...data.location_l2 && { location_l2: data.location_l2 }
6728
- });
6729
- var dispatchPromotionEvent = (data, resolveOptions) => {
6730
- const { dispatchEvent, config } = getMixpanel();
6731
- const { eventName, interactionResult, interactionDescription } = resolveOptions(config);
6732
- if (!eventName) {
6733
- return;
6734
- }
6735
- dispatchEvent?.(eventName, {
6736
- ...getBaseEventProperties(data, config),
6737
- interaction_result: interactionResult,
6738
- interaction_description: interactionDescription
6739
- });
6740
- };
6741
- var trackViewPromotion = (data) => {
6742
- dispatchPromotionEvent(data, (config) => ({
6743
- eventName: config?.names?.promotions?.viewPromotion,
6744
- interactionResult: config?.interactionResults?.promotionViewed ?? "promotion_viewed",
6745
- interactionDescription: "user_viewed_promotion"
6746
- }));
6747
- };
6748
- var trackUpgradePromotionClick = (data) => {
6749
- dispatchPromotionEvent(data, (config) => ({
6750
- eventName: config?.names?.promotions?.upgradePromotionClick,
6751
- interactionResult: config?.interactionResults?.upgradeNow ?? "upgrade_now",
6752
- interactionDescription: "user_clicked_upgrade_now"
6753
- }));
6754
- };
6755
-
6756
- // src/components/promotions/promotion-trigger.tsx
6757
6761
  function getV4Promotion(key) {
6758
6762
  return window.elementor?.config?.v4Promotions?.[key];
6759
6763
  }