| @@ -1721,16 +1721,14 @@ | ||
| 1721 | 1721 | var cacheKey = this.getCacheKey(request); |
| 1722 | 1722 | if (_.has(this.cache, cacheKey)) { |
| 1723 | 1723 | deferred = jQuery.Deferred().done(request.success).resolve(this.cache[cacheKey]); |
| 1724 | 1724 | } else { |
| 1725 | - var _request$error; | |
| 1726 | 1725 | deferred = this.addRequest(request.action, { |
| 1727 | 1726 | data: request.data, |
| 1728 | 1727 | unique_id: request.unique_id, |
| 1729 | 1728 | success: function success(data) { |
| 1730 | 1729 | return _this3.cache[cacheKey] = data; |
| 1731 | - }, | |
| 1732 | - error: (_request$error = request.error) !== null && _request$error !== void 0 ? _request$error : function () {} | |
| 1730 | + } | |
| 1733 | 1731 | }, immediately).done(request.success); |
| 1734 | 1732 | } |
| 1735 | 1733 | return deferred; |
| 1736 | 1734 | } |
| @@ -2356,10 +2354,9 @@ | ||
| 2356 | 2354 | connect: 'connect_variable', |
| 2357 | 2355 | save: 'save_new_variable', |
| 2358 | 2356 | openManager: 'open_variables_manager', |
| 2359 | 2357 | saveChanges: 'save_variables_changes', |
| 2360 | - delete: 'delete_variable', | |
| 2361 | - variableSyncToV3: 'variable_sync_to_v3' | |
| 2358 | + delete: 'delete_variable' | |
| 2362 | 2359 | }, |
| 2363 | 2360 | components: { |
| 2364 | 2361 | createClicked: 'component_create_clicked', |
| 2365 | 2362 | createCancelled: 'component_creation_cancelled', |
| @@ -2389,12 +2386,9 @@ | ||
| 2389 | 2386 | classUsageHovered: 'class_usage_hovered', |
| 2390 | 2387 | classStyled: 'class_styled', |
| 2391 | 2388 | classStateClicked: 'class_state_clicked', |
| 2392 | 2389 | classUsageClicked: 'class_usage_clicked', |
| 2393 | - classDuplicate: 'class_duplicate', | |
| 2394 | - classSyncToV3PopupShown: 'class_sync_to_v3_popup_shown', | |
| 2395 | - classSyncToV3: 'class_sync_to_v3', | |
| 2396 | - classSyncToV3PopupClick: 'class_sync_to_v3_popup_click' | |
| 2390 | + classDuplicate: 'class_duplicate' | |
| 2397 | 2391 | }, |
| 2398 | 2392 | editorOne: { |
| 2399 | 2393 | topBarPublishDropdown: 'top_bar_publish_dropdown', |
| 2400 | 2394 | topBarPageList: 'top_bar_page_list', |
| @@ -2458,9 +2452,8 @@ | ||
| 2458 | 2452 | args[_key] = arguments[_key]; |
| 2459 | 2453 | } |
| 2460 | 2454 | _this = _callSuper(this, _default, [].concat(args)); |
| 2461 | 2455 | (0, _defineProperty2.default)(_this, "trackingEnabled", false); |
| 2462 | - (0, _defineProperty2.default)(_this, "availableExperiments", []); | |
| 2463 | 2456 | return _this; |
| 2464 | 2457 | } |
| 2465 | 2458 | (0, _inherits2.default)(_default, _elementorModules$Mod); |
| 2466 | 2459 | return (0, _createClass2.default)(_default, [{ |
| @@ -2482,9 +2475,11 @@ | ||
| 2482 | 2475 | _mixpanelBrowser.default.init((_elementorCommon$conf = elementorCommon.config.editor_events) === null || _elementorCommon$conf === void 0 ? void 0 : _elementorCommon$conf.token, { |
| 2483 | 2476 | persistence: 'localStorage', |
| 2484 | 2477 | autocapture: false, |
| 2485 | 2478 | flags: true, |
| 2486 | - api_host: 'https://api-eu.mixpanel.com', | |
| 2479 | + api_hosts: { | |
| 2480 | + flags: 'https://api-eu.mixpanel.com' | |
| 2481 | + }, | |
| 2487 | 2482 | loaded: onLoaded |
| 2488 | 2483 | }); |
| 2489 | 2484 | } |
| 2490 | 2485 | }, { |
| @@ -2493,9 +2488,9 @@ | ||
| 2493 | 2488 | var _elementorCommon$conf2; |
| 2494 | 2489 | if (!this.isMixpanelReady()) { |
| 2495 | 2490 | return; |
| 2496 | 2491 | } |
| 2497 | - var userId = (_elementorCommon$conf2 = elementorCommon.config.editor_events) === null || _elementorCommon$conf2 === void 0 ? void 0 : _elementorCommon$conf2.user_id; | |
| 2492 | + var userId = (_elementorCommon$conf2 = elementorCommon.config.library_connect) === null || _elementorCommon$conf2 === void 0 ? void 0 : _elementorCommon$conf2.user_id; | |
| 2498 | 2493 | if (userId) { |
| 2499 | 2494 | var _elementorCommon$conf3; |
| 2500 | 2495 | _mixpanelBrowser.default.identify(userId); |
| 2501 | 2496 | _mixpanelBrowser.default.register({ |
| @@ -2507,9 +2502,8 @@ | ||
| 2507 | 2502 | $plan_type: ((_elementorCommon$conf3 = elementorCommon.config.library_connect) === null || _elementorCommon$conf3 === void 0 ? void 0 : _elementorCommon$conf3.plan_type) || _tiers.TIERS.free |
| 2508 | 2503 | }); |
| 2509 | 2504 | } |
| 2510 | 2505 | this.trackingEnabled = true; |
| 2511 | - this.availableExperiments = Object.keys(elementorCommon.config.experimentalFeatures || {}); | |
| 2512 | 2506 | } |
| 2513 | 2507 | }, { |
| 2514 | 2508 | key: "dispatchEvent", |
| 2515 | 2509 | value: function dispatchEvent(name, data) { |
| @@ -2521,9 +2515,9 @@ | ||
| 2521 | 2515 | if (!this.trackingEnabled) { |
| 2522 | 2516 | this.enableTracking(); |
| 2523 | 2517 | } |
| 2524 | 2518 | var eventData = _objectSpread({ |
| 2525 | - user_id: ((_elementorCommon$conf4 = elementorCommon.config.editor_events) === null || _elementorCommon$conf4 === void 0 ? void 0 : _elementorCommon$conf4.user_id) || null, | |
| 2519 | + user_id: ((_elementorCommon$conf4 = elementorCommon.config.library_connect) === null || _elementorCommon$conf4 === void 0 ? void 0 : _elementorCommon$conf4.user_id) || null, | |
| 2526 | 2520 | user_roles: ((_elementorCommon$conf5 = elementorCommon.config.library_connect) === null || _elementorCommon$conf5 === void 0 ? void 0 : _elementorCommon$conf5.user_roles) || [], |
| 2527 | 2521 | subscription_id: ((_elementorCommon$conf6 = elementorCommon.config.editor_events) === null || _elementorCommon$conf6 === void 0 ? void 0 : _elementorCommon$conf6.subscription_id) || null, |
| 2528 | 2522 | user_tier: ((_elementorCommon$conf7 = elementorCommon.config.library_connect) === null || _elementorCommon$conf7 === void 0 ? void 0 : _elementorCommon$conf7.current_access_tier) || null, |
| 2529 | 2523 | url: (_elementorCommon$conf8 = elementorCommon.config.editor_events) === null || _elementorCommon$conf8 === void 0 ? void 0 : _elementorCommon$conf8.site_url, |
| @@ -2529,10 +2523,9 @@ | ||
| 2529 | 2523 | url: (_elementorCommon$conf8 = elementorCommon.config.editor_events) === null || _elementorCommon$conf8 === void 0 ? void 0 : _elementorCommon$conf8.site_url, |
| 2530 | 2524 | wp_version: (_elementorCommon$conf9 = elementorCommon.config.editor_events) === null || _elementorCommon$conf9 === void 0 ? void 0 : _elementorCommon$conf9.wp_version, |
| 2531 | 2525 | client_id: (_elementorCommon$conf0 = elementorCommon.config.editor_events) === null || _elementorCommon$conf0 === void 0 ? void 0 : _elementorCommon$conf0.site_key, |
| 2532 | 2526 | app_version: (_elementorCommon$conf1 = elementorCommon.config.editor_events) === null || _elementorCommon$conf1 === void 0 ? void 0 : _elementorCommon$conf1.elementor_version, |
| 2533 | - site_language: (_elementorCommon$conf10 = elementorCommon.config.editor_events) === null || _elementorCommon$conf10 === void 0 ? void 0 : _elementorCommon$conf10.site_language, | |
| 2534 | - experiments: this.availableExperiments | |
| 2527 | + site_language: (_elementorCommon$conf10 = elementorCommon.config.editor_events) === null || _elementorCommon$conf10 === void 0 ? void 0 : _elementorCommon$conf10.site_language | |
| 2535 | 2528 | }, data); |
| 2536 | 2529 | _mixpanelBrowser.default.track(name, eventData, options); |
| 2537 | 2530 | } |
| 2538 | 2531 | }, { |