plugin updates
This commit is contained in:
@@ -1,35 +0,0 @@
|
||||
import { __ } from '@wordpress/i18n';
|
||||
|
||||
const REGISTRATION_FORM = 'REGISTRATION_FORM';
|
||||
const CONTACT_US_FORM = 'CONTACT_US_FORM';
|
||||
const NEWSLETTER_FORM = 'NEWSLETTER_FORM';
|
||||
const SUPPORT_FORM = 'SUPPORT_FORM';
|
||||
const EVENT_FORM = 'EVENT_FORM';
|
||||
|
||||
export type FormType =
|
||||
| typeof REGISTRATION_FORM
|
||||
| typeof CONTACT_US_FORM
|
||||
| typeof NEWSLETTER_FORM
|
||||
| typeof SUPPORT_FORM
|
||||
| typeof EVENT_FORM;
|
||||
|
||||
export const DEFAULT_OPTIONS = {
|
||||
label: __('Templates', 'leadin'),
|
||||
options: [
|
||||
{ label: __('Registration Form', 'leadin'), value: REGISTRATION_FORM },
|
||||
{ label: __('Contact us Form', 'leadin'), value: CONTACT_US_FORM },
|
||||
{ label: __('Newsletter sign-up Form', 'leadin'), value: NEWSLETTER_FORM },
|
||||
{ label: __('Support Form', 'leadin'), value: SUPPORT_FORM },
|
||||
{ label: __('Event Registration Form', 'leadin'), value: EVENT_FORM },
|
||||
],
|
||||
};
|
||||
|
||||
export function isDefaultForm(value: FormType) {
|
||||
return (
|
||||
value === REGISTRATION_FORM ||
|
||||
value === CONTACT_US_FORM ||
|
||||
value === NEWSLETTER_FORM ||
|
||||
value === SUPPORT_FORM ||
|
||||
value === EVENT_FORM
|
||||
);
|
||||
}
|
||||
@@ -1,138 +0,0 @@
|
||||
interface KeyStringObject {
|
||||
[key: string]: string;
|
||||
}
|
||||
|
||||
export type ContentEmbedDetails = {
|
||||
activated: boolean;
|
||||
installed: boolean;
|
||||
canActivate: boolean;
|
||||
canInstall: boolean;
|
||||
nonce: string;
|
||||
};
|
||||
|
||||
export interface LeadinConfig {
|
||||
accountName: string;
|
||||
adminUrl: string;
|
||||
activationTime: string;
|
||||
connectionStatus?: 'Connected' | 'NotConnected';
|
||||
deviceId: string;
|
||||
didDisconnect: '1' | '0';
|
||||
env: string;
|
||||
formsScript: string;
|
||||
meetingsScript: string;
|
||||
formsScriptPayload: string;
|
||||
hublet: string;
|
||||
hubspotBaseUrl: string;
|
||||
hubspotNonce: string;
|
||||
iframeUrl: string;
|
||||
impactLink?: string;
|
||||
lastAuthorizeTime: string;
|
||||
lastDeauthorizeTime: string;
|
||||
lastDisconnectTime: string;
|
||||
leadinPluginVersion: string;
|
||||
leadinQueryParams: KeyStringObject;
|
||||
loginUrl: string;
|
||||
locale: string;
|
||||
phpVersion: string;
|
||||
pluginPath: string;
|
||||
plugins: KeyStringObject;
|
||||
portalDomain: string;
|
||||
portalEmail: string;
|
||||
portalId: number;
|
||||
redirectNonce: string;
|
||||
restNonce: string;
|
||||
restUrl: string;
|
||||
reviewSkippedDate: string;
|
||||
refreshToken?: string;
|
||||
theme: string;
|
||||
trackConsent?: boolean | string;
|
||||
wpVersion: string;
|
||||
contentEmbed: ContentEmbedDetails;
|
||||
requiresContentEmbedScope?: boolean;
|
||||
refreshTokenError?: string;
|
||||
}
|
||||
|
||||
const {
|
||||
accountName,
|
||||
adminUrl,
|
||||
activationTime,
|
||||
connectionStatus,
|
||||
deviceId,
|
||||
didDisconnect,
|
||||
env,
|
||||
formsScript,
|
||||
meetingsScript,
|
||||
formsScriptPayload,
|
||||
hublet,
|
||||
hubspotBaseUrl,
|
||||
hubspotNonce,
|
||||
iframeUrl,
|
||||
impactLink,
|
||||
lastAuthorizeTime,
|
||||
lastDeauthorizeTime,
|
||||
lastDisconnectTime,
|
||||
leadinPluginVersion,
|
||||
leadinQueryParams,
|
||||
locale,
|
||||
loginUrl,
|
||||
phpVersion,
|
||||
pluginPath,
|
||||
plugins,
|
||||
portalDomain,
|
||||
portalEmail,
|
||||
portalId,
|
||||
redirectNonce,
|
||||
restNonce,
|
||||
restUrl,
|
||||
refreshToken,
|
||||
reviewSkippedDate,
|
||||
theme,
|
||||
trackConsent,
|
||||
wpVersion,
|
||||
contentEmbed,
|
||||
requiresContentEmbedScope,
|
||||
refreshTokenError,
|
||||
}: //@ts-expect-error global
|
||||
LeadinConfig = window.leadinConfig;
|
||||
|
||||
export {
|
||||
accountName,
|
||||
adminUrl,
|
||||
activationTime,
|
||||
connectionStatus,
|
||||
deviceId,
|
||||
didDisconnect,
|
||||
env,
|
||||
formsScript,
|
||||
meetingsScript,
|
||||
formsScriptPayload,
|
||||
hublet,
|
||||
hubspotBaseUrl,
|
||||
hubspotNonce,
|
||||
iframeUrl,
|
||||
impactLink,
|
||||
lastAuthorizeTime,
|
||||
lastDeauthorizeTime,
|
||||
lastDisconnectTime,
|
||||
leadinPluginVersion,
|
||||
leadinQueryParams,
|
||||
loginUrl,
|
||||
locale,
|
||||
phpVersion,
|
||||
pluginPath,
|
||||
plugins,
|
||||
portalDomain,
|
||||
portalEmail,
|
||||
portalId,
|
||||
redirectNonce,
|
||||
restNonce,
|
||||
restUrl,
|
||||
refreshToken,
|
||||
reviewSkippedDate,
|
||||
theme,
|
||||
trackConsent,
|
||||
wpVersion,
|
||||
contentEmbed,
|
||||
requiresContentEmbedScope,
|
||||
refreshTokenError,
|
||||
};
|
||||
@@ -1,19 +0,0 @@
|
||||
export const domElements = {
|
||||
iframe: '#leadin-iframe',
|
||||
subMenu: '.toplevel_page_leadin > ul',
|
||||
subMenuLinks: '.toplevel_page_leadin > ul a',
|
||||
subMenuButtons: '.toplevel_page_leadin > ul > li',
|
||||
deactivatePluginButton: '[data-slug="leadin"] .deactivate a',
|
||||
deactivateFeedbackForm: 'form.leadin-deactivate-form',
|
||||
deactivateFeedbackSubmit: 'button#leadin-feedback-submit',
|
||||
deactivateFeedbackSkip: 'button#leadin-feedback-skip',
|
||||
thickboxModalClose: '.leadin-modal-close',
|
||||
thickboxModalWindow: 'div#TB_window.thickbox-loading',
|
||||
thickboxModalContent: 'div#TB_ajaxContent.TB_modal',
|
||||
reviewBannerContainer: '#leadin-review-banner',
|
||||
reviewBannerLeaveReviewLink: 'a#leave-review-button',
|
||||
reviewBannerDismissButton: 'a#dismiss-review-banner-button',
|
||||
leadinIframeContainer: 'leadin-iframe-container',
|
||||
leadinIframe: 'leadin-iframe',
|
||||
leadinIframeFallbackContainer: 'leadin-iframe-fallback-container',
|
||||
};
|
||||
Reference in New Issue
Block a user