@levo-so/studio 0.1.57 → 0.1.59
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/{Beams-CjOdmyD4.js → Beams-0Cg_3upg.js} +1 -1
- package/dist/{Dots-BlGBjcwD.js → Dots-turX9wMO.js} +1 -1
- package/dist/{Gradient-YhY9Pvdr.js → Gradient-Be4Kqh_1.js} +1 -1
- package/dist/{Grid-BO_h2CxQ.js → Grid-B0vqOT42.js} +1 -1
- package/dist/MessageCard-CCngWCHS.js +53 -0
- package/dist/{Waves-SaFLO-Gq.js → Waves-DL4kuojY.js} +1 -1
- package/dist/bridge/Highlighter.d.ts +9 -1
- package/dist/bridge/PreviewHighlighter.d.ts +8 -1
- package/dist/bridge/StudioPagePreview.d.ts +4 -0
- package/dist/bridge/constants.d.ts +2 -0
- package/dist/bridge/types.d.ts +27 -0
- package/dist/bridge/utils.d.ts +9 -1
- package/dist/components/LoginForm/AuthMethodRenderer.d.ts +12 -0
- package/dist/components/LoginForm/GoogleOAuth.d.ts +1 -0
- package/dist/components/LoginForm/MagicLinkAuthForm.d.ts +6 -0
- package/dist/components/LoginForm/OAuthSection.d.ts +11 -0
- package/dist/components/LoginForm/OtpAuthForm.d.ts +2 -0
- package/dist/components/LoginForm/WhatsAppAuthForm.d.ts +2 -0
- package/dist/components/LoginForm/index.d.ts +5 -0
- package/dist/components/accessCard/EntryCard/index.d.ts +2 -2
- package/dist/components/accessCard/LoginCard/index.d.ts +2 -0
- package/dist/components/accessCard/MessageCard.d.ts +10 -0
- package/dist/components/index.d.ts +2 -0
- package/dist/components/integrationFilters/FieldRenderer.d.ts +7 -0
- package/dist/components/integrationFilters/IntegrationFilters.d.ts +11 -0
- package/dist/components/integrationFilters/fields/DropdownField.d.ts +8 -0
- package/dist/components/integrationFilters/fields/TextField.d.ts +7 -0
- package/dist/components/shared/EmailInput/index.d.ts +1 -1
- package/dist/components/shared/MagicLinkSuccess/index.d.ts +7 -0
- package/dist/components/shared/PhoneInput/index.d.ts +10 -0
- package/dist/components/ui/Calendar.d.ts +5 -0
- package/dist/components/ui/FlippingText.d.ts +6 -0
- package/dist/components/ui/base/index.d.ts +2 -0
- package/dist/components/ui/base/input.d.ts +4 -0
- package/dist/components/ui/form/FormInput.d.ts +17 -0
- package/dist/components/ui/form/FormSelect.d.ts +17 -0
- package/dist/components/ui/form/utils/FieldError.d.ts +5 -0
- package/dist/components/ui/form/utils/FieldWrapper.d.ts +19 -0
- package/dist/components/ui/form/utils/FormHelperText.d.ts +7 -0
- package/dist/components/ui/form/utils/FormLabel.d.ts +8 -0
- package/dist/components/ui/index.d.ts +2 -0
- package/dist/constants/authentication.d.ts +41 -0
- package/dist/contentEngine/content.d.ts +21 -14
- package/dist/contentEngine/getPage.d.ts +2 -1
- package/dist/contentEngine/sourceFetcher.d.ts +4 -2
- package/dist/contentEngine/themeUtils.d.ts +57 -1
- package/dist/contentEngine/types.d.ts +3 -1
- package/dist/contentEngine/urlBuilder.d.ts +1 -1
- package/dist/core/AccessManager/index.d.ts +2 -0
- package/dist/core/LevoPage.d.ts +2 -0
- package/dist/elements/EditForm.d.ts +11 -0
- package/dist/elements/Form.d.ts +1 -0
- package/dist/elements/Section.d.ts +1 -0
- package/dist/elements/Tabs.d.ts +21 -0
- package/dist/elements/accordion/index.d.ts +4 -4
- package/dist/elements/index.d.ts +2 -0
- package/dist/hooks/useLogin.d.ts +18 -25
- package/dist/index-BdswdesP.js +36 -0
- package/dist/index-CPJI9a7D.js +13503 -0
- package/dist/index-CmNhuPZp.js +34 -0
- package/dist/index-kVKDoWCh.js +57 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +112 -92
- package/dist/interfaces/contentSchema.d.ts +5 -2
- package/dist/interfaces/form.d.ts +33 -0
- package/dist/interfaces/levoBlock.d.ts +18 -6
- package/dist/interfaces/site.d.ts +21 -5
- package/dist/interfaces/sites.d.ts +8 -2
- package/dist/pixel/constants/colorOptions.d.ts +5 -0
- package/dist/pixel/index.d.ts +2 -1
- package/dist/pixel/optionsMap.d.ts +0 -1
- package/dist/providers/AuthProvider.d.ts +5 -0
- package/dist/schemas/authSchemas.d.ts +46 -0
- package/dist/studio.css +1 -1
- package/dist/utils/colorUtils.d.ts +5 -0
- package/dist/utils/findFieldSchema.d.ts +6 -0
- package/dist/utils/index.d.ts +3 -0
- package/package.json +9 -4
- package/dist/components/accessCard/MessageCard/index.d.ts +0 -8
- package/dist/contentEngine/config.d.ts +0 -7
- package/dist/index-BFUEWnWU.js +0 -49
- package/dist/index-BP4Q9Ed6.js +0 -23
- package/dist/index-C5YVd5mP.js +0 -54
- package/dist/index-ChfbB6-A.js +0 -10565
- package/dist/index-DurprJto.js +0 -30
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs as s, jsx as e } from "react/jsx-runtime";
|
|
3
|
+
import { A as d } from "./index-DHHPZcEh.js";
|
|
4
|
+
import { M as n } from "./index-CmNhuPZp.js";
|
|
5
|
+
const x = ({
|
|
6
|
+
logo: a,
|
|
7
|
+
siteName: r,
|
|
8
|
+
options: t,
|
|
9
|
+
message: c
|
|
10
|
+
}) => {
|
|
11
|
+
var l;
|
|
12
|
+
return /* @__PURE__ */ s(d, { logo: a, siteName: r, maxWidth: "sm", children: [
|
|
13
|
+
/* @__PURE__ */ s("div", { className: "mb-6 px-8 sm:px-6", children: [
|
|
14
|
+
/* @__PURE__ */ e("div", { className: "mb-4 flex justify-center", children: /* @__PURE__ */ e(
|
|
15
|
+
"svg",
|
|
16
|
+
{
|
|
17
|
+
className: "h-12 w-12 text-black sm:h-10 sm:w-10",
|
|
18
|
+
fill: "none",
|
|
19
|
+
viewBox: "0 0 24 24",
|
|
20
|
+
strokeWidth: 1.5,
|
|
21
|
+
stroke: "currentColor",
|
|
22
|
+
children: /* @__PURE__ */ e(
|
|
23
|
+
"path",
|
|
24
|
+
{
|
|
25
|
+
strokeLinecap: "round",
|
|
26
|
+
strokeLinejoin: "round",
|
|
27
|
+
d: "M16.5 10.5V6.75a4.5 4.5 0 10-9 0v3.75m-.75 11.25h10.5a2.25 2.25 0 002.25-2.25v-6.75a2.25 2.25 0 00-2.25-2.25H6.75a2.25 2.25 0 00-2.25 2.25v6.75a2.25 2.25 0 002.25 2.25z"
|
|
28
|
+
}
|
|
29
|
+
)
|
|
30
|
+
}
|
|
31
|
+
) }),
|
|
32
|
+
/* @__PURE__ */ e("h1", { className: "text-text-1 m-0 mb-2 text-center text-2xl font-semibold sm:text-xl", children: "Access Restricted" }),
|
|
33
|
+
r && /* @__PURE__ */ s("p", { className: "m-0 text-center leading-6 text-[--color-text-2]", children: [
|
|
34
|
+
"Content on ",
|
|
35
|
+
/* @__PURE__ */ e("strong", { children: r }),
|
|
36
|
+
" is currently restricted"
|
|
37
|
+
] })
|
|
38
|
+
] }),
|
|
39
|
+
/* @__PURE__ */ e("div", { className: "mx-8 mb-8 rounded-lg border-l-4 border-red-300 bg-gray-50 p-4 sm:mx-6", children: /* @__PURE__ */ e(
|
|
40
|
+
"div",
|
|
41
|
+
{
|
|
42
|
+
className: "m-0 flex flex-col gap-3 leading-relaxed text-gray-700",
|
|
43
|
+
dangerouslySetInnerHTML: {
|
|
44
|
+
__html: ((l = t == null ? void 0 : t.content) == null ? void 0 : l.conditionNotFulfilled) ?? c ?? ""
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
) }),
|
|
48
|
+
/* @__PURE__ */ e(n, {})
|
|
49
|
+
] });
|
|
50
|
+
};
|
|
51
|
+
export {
|
|
52
|
+
x as default
|
|
53
|
+
};
|
|
@@ -1,7 +1,15 @@
|
|
|
1
|
-
import { SelectionState } from './types';
|
|
1
|
+
import { IUserHighlight, ISocketUser, SelectionState, IGenerationStatusOverlay, IBlockGenerationInfo } from './types';
|
|
2
2
|
interface HighlighterProps {
|
|
3
3
|
selections: SelectionState;
|
|
4
|
+
userHighlights: IUserHighlight[];
|
|
5
|
+
users: ISocketUser[];
|
|
4
6
|
isScrolling: boolean;
|
|
7
|
+
isPageGenerating?: boolean;
|
|
8
|
+
showPill?: boolean;
|
|
9
|
+
isGenerationCompleted?: boolean;
|
|
10
|
+
totalBlocksCount?: number;
|
|
11
|
+
blocksGenerationInfo?: IBlockGenerationInfo[];
|
|
12
|
+
generationStatusOverlays?: IGenerationStatusOverlay[];
|
|
5
13
|
}
|
|
6
14
|
export declare const Highlighter: React.FC<HighlighterProps>;
|
|
7
15
|
export {};
|
|
@@ -1,2 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
import { IBlockGenerationInfo } from './types';
|
|
2
|
+
interface PreviewHighlighterProps {
|
|
3
|
+
isPageGenerating?: boolean;
|
|
4
|
+
totalBlocksCount?: number;
|
|
5
|
+
blocksGenerationInfo?: IBlockGenerationInfo[];
|
|
6
|
+
}
|
|
7
|
+
export declare const PreviewHighlighter: React.FC<PreviewHighlighterProps>;
|
|
8
|
+
export {};
|
|
2
9
|
//# sourceMappingURL=PreviewHighlighter.d.ts.map
|
|
@@ -14,6 +14,10 @@ export declare const StudioPagePreview: React.FC<{
|
|
|
14
14
|
studioData: StudioPageData | undefined;
|
|
15
15
|
workspace: IWorkspace;
|
|
16
16
|
site: ISite;
|
|
17
|
+
authOverride?: {
|
|
18
|
+
enabled: boolean;
|
|
19
|
+
isLoggedIn: boolean;
|
|
20
|
+
} | null;
|
|
17
21
|
}>;
|
|
18
22
|
export {};
|
|
19
23
|
//# sourceMappingURL=StudioPagePreview.d.ts.map
|
|
@@ -11,9 +11,11 @@ export declare const MESSAGE_TYPES: {
|
|
|
11
11
|
readonly PREVIEW_MOUSE_LEAVE: "PREVIEW_MOUSE_LEAVE";
|
|
12
12
|
readonly STUDIO_SELECT: "STUDIO_SELECT";
|
|
13
13
|
readonly STUDIO_HOVER: "STUDIO_HOVER";
|
|
14
|
+
readonly STUDIO_AUTH_OVERRIDE: "STUDIO_AUTH_OVERRIDE";
|
|
14
15
|
readonly PREVIEW_TYPE: "PREVIEW_TYPE";
|
|
15
16
|
readonly LEVO_PAGE_DATA: "LEVO_PAGE_DATA";
|
|
16
17
|
readonly LEVO_BLOCK_DATA: "LEVO_BLOCK_DATA";
|
|
17
18
|
readonly FRAME_HEIGHT: "FRAME_HEIGHT";
|
|
19
|
+
readonly LEVO_USERS: "LEVO_USERS";
|
|
18
20
|
};
|
|
19
21
|
//# sourceMappingURL=constants.d.ts.map
|
package/dist/bridge/types.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { IMediaObject } from '@levo-so/core';
|
|
1
2
|
export type SelectableType = "block" | "element" | "repeatable" | "repeatableParent";
|
|
2
3
|
export interface HighlightRect {
|
|
3
4
|
top: number;
|
|
@@ -30,4 +31,30 @@ export interface StudioState {
|
|
|
30
31
|
setSelected: (params: ISelection) => void;
|
|
31
32
|
};
|
|
32
33
|
}
|
|
34
|
+
export interface IUserHighlight {
|
|
35
|
+
id: string;
|
|
36
|
+
blockId: string;
|
|
37
|
+
color: string;
|
|
38
|
+
rect: HighlightRect | null;
|
|
39
|
+
element: HTMLElement | null;
|
|
40
|
+
}
|
|
41
|
+
export interface ISocketUser {
|
|
42
|
+
id: string;
|
|
43
|
+
first_name: string;
|
|
44
|
+
display_email: string;
|
|
45
|
+
profile_picture: IMediaObject;
|
|
46
|
+
last_name: string;
|
|
47
|
+
color: string;
|
|
48
|
+
block_id?: string | null;
|
|
49
|
+
}
|
|
50
|
+
export interface IBlockGenerationInfo {
|
|
51
|
+
id: string;
|
|
52
|
+
status: "pending" | "current" | null;
|
|
53
|
+
}
|
|
54
|
+
export interface IGenerationStatusOverlay {
|
|
55
|
+
id: string;
|
|
56
|
+
rect: HighlightRect | null;
|
|
57
|
+
element: HTMLElement | null;
|
|
58
|
+
status: "pending" | "current";
|
|
59
|
+
}
|
|
33
60
|
//# sourceMappingURL=types.d.ts.map
|
package/dist/bridge/utils.d.ts
CHANGED
|
@@ -1,8 +1,16 @@
|
|
|
1
|
-
import { ISelection, HighlightRect, SelectionState } from './types';
|
|
1
|
+
import { ISelection, HighlightRect, IUserHighlight, ISocketUser, SelectionState, IGenerationStatusOverlay, IBlockGenerationInfo } from './types';
|
|
2
2
|
export declare function getElementCoordinates(element: HTMLElement): HighlightRect;
|
|
3
3
|
export declare function getSelectionFromElement(element: HTMLElement): ISelection | null;
|
|
4
4
|
export declare function findElementBySelection(selection: ISelection): HTMLElement | null;
|
|
5
5
|
export declare function createSelectionState(element: HTMLElement, type: "selected" | "hovered"): SelectionState;
|
|
6
6
|
export declare function findParentElement(currentSelections: SelectionState): HTMLElement | null;
|
|
7
7
|
export declare function updateSelectionRects(selections: SelectionState): SelectionState;
|
|
8
|
+
export declare function findBlockElementById(blockId: string): HTMLElement | null;
|
|
9
|
+
export declare function createUserHighlight(user: ISocketUser): IUserHighlight | null;
|
|
10
|
+
export declare function createUserHighlights(users: ISocketUser[]): IUserHighlight[];
|
|
11
|
+
export declare function updateUserHighlightRects(highlights: IUserHighlight[]): IUserHighlight[];
|
|
12
|
+
export declare function isElementWithinUserSelectedBlock(element: HTMLElement, userHighlights: IUserHighlight[]): boolean;
|
|
13
|
+
export declare function createGenerationStatusOverlay(blockInfo: IBlockGenerationInfo): IGenerationStatusOverlay | null;
|
|
14
|
+
export declare function createGenerationStatusOverlays(blocksInfo: IBlockGenerationInfo[]): IGenerationStatusOverlay[];
|
|
15
|
+
export declare function updateGenerationStatusOverlayRects(overlays: IGenerationStatusOverlay[]): IGenerationStatusOverlay[];
|
|
8
16
|
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { IMembershipAuthenticationMethods } from '../../interfaces/site';
|
|
2
|
+
/**
|
|
3
|
+
* Passwordless authentication methods supported by AuthMethodRenderer
|
|
4
|
+
*/
|
|
5
|
+
type PasswordlessMethod = Extract<(typeof IMembershipAuthenticationMethods)[number], "otp" | "whatsapp" | "magiclink">;
|
|
6
|
+
interface IAuthMethodRendererProps {
|
|
7
|
+
method: PasswordlessMethod;
|
|
8
|
+
onMagicLinkSent?: (sent: boolean) => void;
|
|
9
|
+
}
|
|
10
|
+
export declare const AuthMethodRenderer: React.FC<IAuthMethodRendererProps>;
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=AuthMethodRenderer.d.ts.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
interface IOAuthSectionProps {
|
|
2
|
+
oAuthMethods: string[];
|
|
3
|
+
oAuthTitle?: string;
|
|
4
|
+
showDivider: boolean;
|
|
5
|
+
dividerText: string;
|
|
6
|
+
onOAuthSuccess: () => void;
|
|
7
|
+
onOAuthError: (error?: any) => void;
|
|
8
|
+
}
|
|
9
|
+
export declare const OAuthSection: React.FC<IOAuthSectionProps>;
|
|
10
|
+
export {};
|
|
11
|
+
//# sourceMappingURL=OAuthSection.d.ts.map
|
|
@@ -1,6 +1,11 @@
|
|
|
1
|
+
import { ILevoPageData } from '../../contentEngine';
|
|
1
2
|
interface ILoginFormProps {
|
|
2
3
|
className?: string;
|
|
3
4
|
oAuthTitle?: string;
|
|
5
|
+
page?: ILevoPageData;
|
|
6
|
+
magicLinkSent?: boolean;
|
|
7
|
+
setMagicLinkSent?: React.Dispatch<React.SetStateAction<boolean>>;
|
|
8
|
+
oAuthMethods?: string[];
|
|
4
9
|
}
|
|
5
10
|
declare const LoginForm: React.FC<ILoginFormProps>;
|
|
6
11
|
export default LoginForm;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { IPageAccessGatingOptions
|
|
1
|
+
import { IPageAccessGatingOptions } from '../../../interfaces';
|
|
2
2
|
interface IEntryCardProps {
|
|
3
3
|
logo?: string;
|
|
4
4
|
siteName?: string;
|
|
5
5
|
workspaceId: string;
|
|
6
|
-
options: IPageAccessGatingOptions
|
|
6
|
+
options: IPageAccessGatingOptions;
|
|
7
7
|
onSuccess?: () => void;
|
|
8
8
|
}
|
|
9
9
|
declare const EntryCard: React.FC<IEntryCardProps>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { IPageAccessGatingOptions } from '../../interfaces';
|
|
2
|
+
interface IMessageCardProps {
|
|
3
|
+
logo?: string;
|
|
4
|
+
siteName?: string;
|
|
5
|
+
options: IPageAccessGatingOptions;
|
|
6
|
+
message?: string;
|
|
7
|
+
}
|
|
8
|
+
declare const MessageCard: React.FC<IMessageCardProps>;
|
|
9
|
+
export default MessageCard;
|
|
10
|
+
//# sourceMappingURL=MessageCard.d.ts.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { ILemaCollection } from '@levo-so/core';
|
|
3
|
+
declare const IntegrationFilters: React.FC<{
|
|
4
|
+
selectedFields: string[];
|
|
5
|
+
schema: ILemaCollection;
|
|
6
|
+
query: Record<string, any>;
|
|
7
|
+
setQuery: (val: Record<string, any>) => void;
|
|
8
|
+
enableSearch?: boolean;
|
|
9
|
+
}>;
|
|
10
|
+
export default IntegrationFilters;
|
|
11
|
+
//# sourceMappingURL=IntegrationFilters.d.ts.map
|
|
@@ -3,7 +3,7 @@ interface IEmailInputProps {
|
|
|
3
3
|
email: string;
|
|
4
4
|
setEmail: Dispatch<SetStateAction<string>>;
|
|
5
5
|
otpSent: boolean;
|
|
6
|
-
handleReset: (
|
|
6
|
+
handleReset: (skipFieldReset?: boolean) => void;
|
|
7
7
|
}
|
|
8
8
|
declare const EmailInput: React.FC<IEmailInputProps>;
|
|
9
9
|
export default EmailInput;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Dispatch, SetStateAction } from 'react';
|
|
2
|
+
interface IPhoneInputProps {
|
|
3
|
+
phone: string;
|
|
4
|
+
setPhone: Dispatch<SetStateAction<string>>;
|
|
5
|
+
otpSent: boolean;
|
|
6
|
+
handleReset: (skipFieldReset?: boolean) => void;
|
|
7
|
+
}
|
|
8
|
+
declare const PhoneInput: React.FC<IPhoneInputProps>;
|
|
9
|
+
export default PhoneInput;
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { DayPicker } from 'react-day-picker';
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
export type CalendarProps = React.ComponentProps<typeof DayPicker>;
|
|
4
|
+
export declare const Calendar: ({ className, classNames, showOutsideDays, captionLayout, formatters, components, ...props }: CalendarProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
//# sourceMappingURL=Calendar.d.ts.map
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { IBaseInputProps } from '../../../interfaces/form';
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
export interface IInputProps extends IBaseInputProps {
|
|
4
|
+
onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
5
|
+
onBlur?: (e: React.FocusEvent<HTMLInputElement>) => void;
|
|
6
|
+
inputStyles?: string;
|
|
7
|
+
type?: string;
|
|
8
|
+
inputProps?: React.InputHTMLAttributes<HTMLInputElement>;
|
|
9
|
+
leftIcon?: React.ReactNode;
|
|
10
|
+
rightIcon?: React.ReactNode;
|
|
11
|
+
leftIconBoxStyles?: string;
|
|
12
|
+
rightIconBoxStyles?: string;
|
|
13
|
+
inputContainerStyles?: string;
|
|
14
|
+
}
|
|
15
|
+
declare const FormInput: React.ForwardRefExoticComponent<IInputProps & React.RefAttributes<HTMLInputElement>>;
|
|
16
|
+
export { FormInput };
|
|
17
|
+
//# sourceMappingURL=FormInput.d.ts.map
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { Props, StylesConfig } from 'react-select';
|
|
3
|
+
import { IBaseInputProps, IFormSelectOptions } from '../../../interfaces/form';
|
|
4
|
+
export type IFormSelectStyles = StylesConfig;
|
|
5
|
+
export interface IFormSelectProps extends IBaseInputProps {
|
|
6
|
+
isSearchable?: boolean;
|
|
7
|
+
options: IFormSelectOptions[];
|
|
8
|
+
selectProps?: Props;
|
|
9
|
+
onChange?: (name: string, value: any) => void;
|
|
10
|
+
onBlur?: (name: string, value: boolean) => void;
|
|
11
|
+
isClearable?: boolean;
|
|
12
|
+
controlStyles?: string;
|
|
13
|
+
listStyles?: string;
|
|
14
|
+
children?: React.ReactNode;
|
|
15
|
+
}
|
|
16
|
+
export declare const FormSelect: React.FC<IFormSelectProps>;
|
|
17
|
+
//# sourceMappingURL=FormSelect.d.ts.map
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export interface IFieldWrapperProps {
|
|
2
|
+
name?: string;
|
|
3
|
+
label?: string;
|
|
4
|
+
error?: any;
|
|
5
|
+
touched?: any;
|
|
6
|
+
helperText?: string;
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
readOnly?: boolean;
|
|
9
|
+
isRequired?: boolean;
|
|
10
|
+
containerStyles?: string;
|
|
11
|
+
helperTextStyles?: string;
|
|
12
|
+
labelStyles?: string;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* @description This component is used to wrap the input components and display the error message and helper text.
|
|
16
|
+
*/
|
|
17
|
+
export declare const FieldWrapper: React.FC<IFieldWrapperProps>;
|
|
18
|
+
export default FieldWrapper;
|
|
19
|
+
//# sourceMappingURL=FieldWrapper.d.ts.map
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface IFormLabelProps extends React.LabelHTMLAttributes<HTMLLabelElement> {
|
|
3
|
+
isRequired?: boolean;
|
|
4
|
+
children?: React.ReactNode;
|
|
5
|
+
}
|
|
6
|
+
export declare const FormLabel: React.FC<IFormLabelProps>;
|
|
7
|
+
export default FormLabel;
|
|
8
|
+
//# sourceMappingURL=FormLabel.d.ts.map
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { IMembershipAuthenticationMethods } from '../interfaces/site';
|
|
2
|
+
type AuthenticationMethod = (typeof IMembershipAuthenticationMethods)[number];
|
|
3
|
+
/**
|
|
4
|
+
* Authentication method configuration object
|
|
5
|
+
*/
|
|
6
|
+
export interface IAuthenticationOption {
|
|
7
|
+
label: string;
|
|
8
|
+
value: AuthenticationMethod;
|
|
9
|
+
category: "primary" | "alternate";
|
|
10
|
+
[x: string]: unknown;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Primary authentication methods (passwordless: OTP, Magic Link, WhatsApp)
|
|
14
|
+
*/
|
|
15
|
+
export declare const PRIMARY_AUTH_METHODS: IAuthenticationOption[];
|
|
16
|
+
/**
|
|
17
|
+
* Alternate authentication methods (OAuth providers)
|
|
18
|
+
*/
|
|
19
|
+
export declare const ALTERNATIVE_AUTH_METHODS: IAuthenticationOption[];
|
|
20
|
+
/**
|
|
21
|
+
* All available authentication options
|
|
22
|
+
*/
|
|
23
|
+
export declare const AuthenticationOptions: IAuthenticationOption[];
|
|
24
|
+
/**
|
|
25
|
+
* Primary method values for quick checking
|
|
26
|
+
*/
|
|
27
|
+
export declare const PRIMARY_METHOD_VALUES: ("linkedin" | "google" | "oauth" | "microsoft" | "otp" | "whatsapp" | "magiclink" | "password")[];
|
|
28
|
+
/**
|
|
29
|
+
* Alternate method values for quick checking
|
|
30
|
+
*/
|
|
31
|
+
export declare const ALTERNATE_METHOD_VALUES: ("linkedin" | "google" | "oauth" | "microsoft" | "otp" | "whatsapp" | "magiclink" | "password")[];
|
|
32
|
+
/**
|
|
33
|
+
* Type guard to check if a method is primary (passwordless)
|
|
34
|
+
*/
|
|
35
|
+
export declare const isPrimaryMethod: (method: AuthenticationMethod) => method is "otp" | "magiclink" | "whatsapp";
|
|
36
|
+
/**
|
|
37
|
+
* Type guard to check if a method is alternate (OAuth)
|
|
38
|
+
*/
|
|
39
|
+
export declare const isAlternateMethod: (method: AuthenticationMethod) => method is "google" | "linkedin" | "microsoft";
|
|
40
|
+
export {};
|
|
41
|
+
//# sourceMappingURL=authentication.d.ts.map
|
|
@@ -1,40 +1,47 @@
|
|
|
1
1
|
import { ILevoClient, IResponseMultiple } from '@levo-so/core';
|
|
2
2
|
import { IBlockInstance, IPageExpanded, ISite, IStudioSource } from '../interfaces';
|
|
3
3
|
import { IPageContext, IPageDataContext } from './types';
|
|
4
|
-
export type ILevoPageData = Pick<IPageExpanded, "id" | "workspace_id" | "blocks" | "source" | "title" | "description" | "access">;
|
|
5
|
-
export declare const resolveVariables: ({ skeleton, blockFetchedContent,
|
|
4
|
+
export type ILevoPageData = Pick<IPageExpanded, "id" | "workspace_id" | "blocks" | "source" | "title" | "description" | "access" | "style_config" | "access">;
|
|
5
|
+
export declare const resolveVariables: ({ skeleton, blockFetchedContent, blockSources, pageContext, currentPath, }: {
|
|
6
6
|
skeleton: any;
|
|
7
|
-
blockFetchedContent
|
|
8
|
-
|
|
9
|
-
pageContext
|
|
7
|
+
blockFetchedContent: Record<string, any>;
|
|
8
|
+
blockSources: IStudioSource[];
|
|
9
|
+
pageContext: Record<string, any>;
|
|
10
|
+
currentPath?: string;
|
|
10
11
|
}) => any;
|
|
11
|
-
export declare const resolveStyles: ({ skeleton, blockFetchedContent,
|
|
12
|
+
export declare const resolveStyles: ({ skeleton, blockFetchedContent, blockSources, currentPath, }: {
|
|
12
13
|
skeleton: any;
|
|
13
|
-
blockFetchedContent
|
|
14
|
-
|
|
14
|
+
blockFetchedContent: Record<string, any>;
|
|
15
|
+
blockSources: IStudioSource[];
|
|
16
|
+
currentPath?: string;
|
|
15
17
|
}) => any;
|
|
16
|
-
export declare const getPageSource: ({ levoClient, pageData, slugs, }: {
|
|
18
|
+
export declare const getPageSource: ({ levoClient, pageData, slugs, cookies, draft, }: {
|
|
17
19
|
levoClient: ILevoClient;
|
|
18
20
|
pageData: IPageExpanded;
|
|
19
21
|
slugs: Record<string, string>;
|
|
22
|
+
cookies?: string;
|
|
23
|
+
draft?: boolean;
|
|
20
24
|
}) => Promise<{
|
|
21
25
|
pageContext: IPageContext;
|
|
22
26
|
pageNotFound: boolean;
|
|
23
27
|
}>;
|
|
24
|
-
export declare const parseVariablesFromResolvedSource: ({ levoClient, block,
|
|
28
|
+
export declare const parseVariablesFromResolvedSource: ({ levoClient, block, resolvedSources, pageContext, cookies, draft, }: {
|
|
25
29
|
levoClient: ILevoClient;
|
|
26
30
|
block: IBlockInstance;
|
|
27
|
-
|
|
28
|
-
resolvedSource?: IBlockInstance["source"][0];
|
|
31
|
+
resolvedSources: IBlockInstance["source"];
|
|
29
32
|
pageContext?: IPageContext;
|
|
30
|
-
|
|
31
|
-
|
|
33
|
+
cookies?: string;
|
|
34
|
+
draft?: boolean;
|
|
35
|
+
}) => Promise<[IBlockInstance, Record<string, IResponseMultiple<Record<string, unknown>>>]>;
|
|
36
|
+
export declare const getInitialPageContent: ({ levoClient, pageData, site, querySlugs, urlSlugs, minifyResponse, cookies, draft, }: {
|
|
32
37
|
levoClient: ILevoClient;
|
|
33
38
|
pageData: IPageExpanded;
|
|
34
39
|
site: ISite;
|
|
35
40
|
querySlugs: Record<string, string>;
|
|
36
41
|
urlSlugs: string[];
|
|
37
42
|
minifyResponse?: boolean;
|
|
43
|
+
cookies?: string;
|
|
44
|
+
draft?: boolean;
|
|
38
45
|
}) => Promise<{
|
|
39
46
|
parsedPageData: ILevoPageData;
|
|
40
47
|
transformedPageData: ILevoPageData;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { ILevoClient } from '@levo-so/core';
|
|
2
2
|
import { IPageFromPath } from '../interfaces';
|
|
3
|
-
export declare const getPageData: ({ levoClient, workspace, url, draft, visitorParams, }: {
|
|
3
|
+
export declare const getPageData: ({ levoClient, workspace, url, draft, visitorParams, cookies, }: {
|
|
4
4
|
levoClient: ILevoClient;
|
|
5
5
|
workspace: string;
|
|
6
6
|
url: string;
|
|
7
7
|
draft?: boolean;
|
|
8
8
|
visitorParams?: Record<string, unknown>;
|
|
9
|
+
cookies?: string;
|
|
9
10
|
}) => Promise<IPageFromPath | null>;
|
|
10
11
|
//# sourceMappingURL=getPage.d.ts.map
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { ILemaCollection, ILevoClient, IResponseMultiple, IResponseSingle } from '@levo-so/core';
|
|
2
2
|
import { SourceFetchOptions } from './types';
|
|
3
|
-
export declare const fetchSource: ({ levoClient, source, slugs, params, }: SourceFetchOptions) => Promise<IResponseMultiple | IResponseSingle | null>;
|
|
4
|
-
export declare const fetchCollectionSchema: ({ levoClient, source, }: {
|
|
3
|
+
export declare const fetchSource: ({ levoClient, source, slugs, params, cookies, draft, }: SourceFetchOptions) => Promise<IResponseMultiple | IResponseSingle | null>;
|
|
4
|
+
export declare const fetchCollectionSchema: ({ levoClient, source, cookies, draft, }: {
|
|
5
5
|
levoClient: ILevoClient;
|
|
6
6
|
source: {
|
|
7
7
|
workspace_id: string;
|
|
8
8
|
collection_id: string;
|
|
9
9
|
};
|
|
10
|
+
cookies?: string;
|
|
11
|
+
draft?: boolean;
|
|
10
12
|
}) => Promise<{
|
|
11
13
|
content: {
|
|
12
14
|
data: ILemaCollection | null;
|