pagepilot-visual-editor 1.0.29 → 1.0.30
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/CHANGELOG.md +96 -0
- package/README.md +42 -28
- package/dist/PagePilotEditor.d.ts +12 -9
- package/dist/api/ApiClientContext.d.ts +1 -0
- package/dist/api/PagepilotApiClient.d.ts +7 -0
- package/dist/assets/aiChatbotIcon.d.ts +1 -0
- package/dist/blocks-internal/block-container/src/index.d.ts +1 -1
- package/dist/blocks-internal/block-heading/src/index.d.ts +1 -1
- package/dist/blocks-internal/block-list/src/index.d.ts +11 -1
- package/dist/blocks-internal/block-mdx/src/index.d.ts +47 -0
- package/dist/blocks-internal/block-quill/src/index.d.ts +48 -0
- package/dist/editor/PagePreviewDialog.d.ts +14 -0
- package/dist/editor/Topbar.d.ts +3 -1
- package/dist/editor/pageUrls.d.ts +25 -0
- package/dist/editor/publish/PageLiveSuccessDialog.d.ts +9 -0
- package/dist/editor/publish/PagePublishDialog.d.ts +1 -0
- package/dist/editor/publish/PublishAccessibilityPanel.d.ts +8 -0
- package/dist/editor/publish/a11yLinter.d.ts +8 -0
- package/dist/editor/recordDirty.d.ts +16 -0
- package/dist/editor/renderSections.d.ts +2 -2
- package/dist/editor/savePipeline.d.ts +40 -0
- package/dist/editor/types.d.ts +35 -0
- package/dist/editor-sample/App/InspectorDrawer/BehaviourPanel.d.ts +22 -0
- package/dist/editor-sample/App/InspectorDrawer/BrandPanel/BrandColorPalette.d.ts +9 -0
- package/dist/editor-sample/App/InspectorDrawer/BrandPanel/BrandEmptyLink.d.ts +8 -0
- package/dist/editor-sample/App/InspectorDrawer/BrandPanel/BrandPanel.styled.d.ts +22 -0
- package/dist/editor-sample/App/InspectorDrawer/BrandPanel/BrandSection.d.ts +8 -0
- package/dist/editor-sample/App/InspectorDrawer/BrandPanel/EmptyText.d.ts +6 -0
- package/dist/editor-sample/App/InspectorDrawer/BrandPanel/FontDetailsList.d.ts +6 -0
- package/dist/editor-sample/App/InspectorDrawer/BrandPanel/index.d.ts +5 -0
- package/dist/editor-sample/App/InspectorDrawer/BrandPanel/useBrandApply.d.ts +9 -0
- package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/ResponsiveDeviceTabs.d.ts +0 -2
- package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/blockStyleClipboard.d.ts +2 -8
- package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/index.d.ts +1 -4
- package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/input-panels/EmailLayoutSidebarPanel.d.ts +2 -1
- package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/input-panels/FlexColumns/ColumnSection.d.ts +2 -0
- package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/input-panels/FormsPickerSidebarPanel.d.ts +2 -1
- package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/input-panels/MdxSidebarPanel.d.ts +7 -0
- package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/input-panels/MenuPickerSidebarPanel.d.ts +22 -0
- package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/input-panels/QuillSidebarPanel.d.ts +8 -0
- package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/input-panels/TextSidebarPanel.d.ts +2 -2
- package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/AnimationSection.d.ts +7 -5
- package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/HoverEffectSection.d.ts +1 -1
- package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/imageSizeUnit.d.ts +19 -0
- package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/ColorInput/Picker.d.ts +0 -2
- package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/VariableLinkHint.d.ts +8 -0
- package/dist/editor-sample/App/InspectorDrawer/EditorBehavior.d.ts +8 -2
- package/dist/editor-sample/App/InspectorDrawer/LayersPanelStyles.d.ts +1 -1
- package/dist/editor-sample/App/InspectorDrawer/LayoutPanel/AiSupportedBadge.d.ts +7 -0
- package/dist/editor-sample/App/InspectorDrawer/LayoutPanel/SectionsModal.d.ts +2 -10
- package/dist/editor-sample/App/InspectorDrawer/LayoutPanel/icons/index.d.ts +3 -5
- package/dist/editor-sample/App/InspectorDrawer/LayoutPanel/templateHelpers.d.ts +226 -0
- package/dist/editor-sample/App/InspectorDrawer/LayoutPanel/useDebouncedValue.d.ts +8 -0
- package/dist/editor-sample/App/InspectorDrawer/VariablesPanel/AiFillAllDialog.d.ts +21 -0
- package/dist/editor-sample/App/InspectorDrawer/VariablesPanel/AiGenerateButton.d.ts +14 -0
- package/dist/editor-sample/App/InspectorDrawer/VariablesPanel/ScalarFieldRow.d.ts +4 -1
- package/dist/editor-sample/App/InspectorDrawer/VariablesPanel/VariableGroupDialog.d.ts +19 -0
- package/dist/editor-sample/App/InspectorDrawer/VariablesPanel/VariableGroupList.d.ts +5 -0
- package/dist/editor-sample/App/InspectorDrawer/VariablesPanel/aiFill.d.ts +36 -0
- package/dist/editor-sample/App/InspectorDrawer/VariablesPanel/styles.d.ts +14 -11
- package/dist/editor-sample/App/InspectorDrawer/VariablesPanel/upgradeDialog.d.ts +8 -8
- package/dist/editor-sample/App/InspectorDrawer/behaviourFields.d.ts +30 -0
- package/dist/editor-sample/App/InspectorDrawer/index.d.ts +8 -1
- package/dist/editor-sample/App/InspectorDrawer/publish/BackgroundPanel.d.ts +6 -0
- package/dist/editor-sample/App/InspectorDrawer/renderBehaviourField.d.ts +7 -0
- package/dist/editor-sample/App/TemplatePanel/hooks/useMainBoxStyles.d.ts +2 -1
- package/dist/editor-sample/App/TemplatePanel/index.d.ts +2 -1
- package/dist/editor-sample/App/TemplatePanel/minimap/useMiniMapSync.d.ts +2 -2
- package/dist/editor-sample/App/hooks/page/saveMenuHrefEdits.d.ts +1 -1
- package/dist/editor-sample/App/hooks/page/useSaveHandler.d.ts +1 -0
- package/dist/editor-sample/App/hooks/useAutosave.d.ts +8 -3
- package/dist/editor-sample/App/hooks/useIsTemplateEditorRoute.d.ts +1 -0
- package/dist/editor-sample/App/hooks/useStretch.d.ts +9 -0
- package/dist/editor-sample/App/shared/UploadImage.d.ts +4 -0
- package/dist/editor-sample/App/shared/editor.styles.d.ts +11 -1
- package/dist/editor-sample/documents/blocks/Container/ContainerPropsSchema.d.ts +6 -4
- package/dist/editor-sample/documents/blocks/FormsPicker/FormsPropsSchema.d.ts +33 -2
- package/dist/editor-sample/documents/blocks/List/ListEditor.d.ts +8 -0
- package/dist/editor-sample/documents/blocks/Marquee/MarqueePropsSchema.d.ts +4 -0
- package/dist/editor-sample/documents/blocks/MenuPicker/MenuPropsSchema.d.ts +6 -0
- package/dist/editor-sample/documents/blocks/Table/TableCellEditor.d.ts +2 -1
- package/dist/editor-sample/documents/blocks/Table/TableImportDialog.styles.d.ts +11 -1
- package/dist/editor-sample/documents/blocks/Table/parseClipboardTable.d.ts +7 -0
- package/dist/editor-sample/documents/blocks/TabsBlock/TabsBlockPropsSchema.d.ts +6 -0
- package/dist/editor-sample/documents/blocks/Timer/TimerPropsSchema.d.ts +2 -0
- package/dist/editor-sample/documents/blocks/Timer/variants/CircularProgressView.d.ts +2 -1
- package/dist/editor-sample/documents/blocks/helpers/EditorChildrenIds/AddBlockMenu/blockMenuStyles.d.ts +1 -1
- package/dist/editor-sample/documents/blocks/helpers/EditorChildrenIds/AddBlockMenu/brandButtonDefaults.d.ts +1 -4
- package/dist/editor-sample/documents/blocks/helpers/EditorChildrenIds/AddBlockMenu/buttons.d.ts +0 -6
- package/dist/editor-sample/documents/blocks/helpers/InlineTextToolbar/dialogs/LinkDialog.d.ts +4 -1
- package/dist/editor-sample/documents/blocks/helpers/InlineTextToolbar/hooks/useToolbarCommands.d.ts +16 -4
- package/dist/editor-sample/documents/blocks/helpers/InlineTextToolbar/styles.d.ts +2 -2
- package/dist/editor-sample/documents/blocks/helpers/InlineTextToolbar/types.d.ts +2 -4
- package/dist/editor-sample/documents/blocks/helpers/block-wrappers/EditorBlockWrapper.d.ts +2 -3
- package/dist/editor-sample/documents/blocks/helpers/block-wrappers/TuneMenu.styles.d.ts +17 -0
- package/dist/editor-sample/documents/blocks/helpers/block-wrappers/saveAsTemplateUtils.d.ts +29 -1
- package/dist/editor-sample/documents/blocks/helpers/documentUtils.d.ts +33 -26
- package/dist/editor-sample/documents/blocks/helpers/variableBinding.d.ts +9 -0
- package/dist/editor-sample/documents/editor/EditorBlock.d.ts +2 -6
- package/dist/editor-sample/documents/editor/EditorContext.d.ts +77 -20
- package/dist/editor-sample/documents/editor/LazyEditorBlock.d.ts +1 -0
- package/dist/editor-sample/documents/editor/core.d.ts +492 -390
- package/dist/editor-sample/documents/editor/templateVariables.d.ts +151 -14
- package/dist/editor-sample/documents/editor/useRootFontFamily.d.ts +10 -0
- package/dist/editor-sample/utils/editorStorageKey.d.ts +2 -0
- package/dist/editor-sample/utils/localStoragePref.d.ts +2 -0
- package/dist/email-builder-core/blocks/Container/ContainerPropsSchema.d.ts +1 -1
- package/dist/email-builder-core/blocks/EmailLayout/EmailLayoutReader.d.ts +1 -1
- package/dist/email-builder-core/blocks/TabsBlock/TabsBlockPropsSchema.d.ts +6 -0
- package/dist/email-builder-core/index.d.ts +0 -2
- package/dist/email-builder-core/renderers/pageScripts.d.ts +0 -1
- package/dist/email-builder-core/renderers/themeTokens.d.ts +4 -138
- package/dist/host-stubs/history.d.ts +5 -0
- package/dist/host-stubs/hooks/useTenantFeatureCutoff.d.ts +8 -0
- package/dist/host-stubs/hooks/useTenantPlan.d.ts +18 -0
- package/dist/host-stubs/i18nAhdDefaults.d.ts +1 -0
- package/dist/host-stubs/modules/auth/authCurrentTenant.d.ts +6 -0
- package/dist/host-stubs/modules/forms/formsService.d.ts +3 -1
- package/dist/host-stubs/modules/forms/useFormsList.d.ts +4 -1
- package/dist/host-stubs/modules/menu/menuService.d.ts +4 -0
- package/dist/host-stubs/modules/page/pageService.d.ts +11 -0
- package/dist/host-stubs/modules/settings/settingsActions.d.ts +2 -0
- package/dist/host-stubs/modules/settings/settingsSelectors.d.ts +4 -0
- package/dist/host-stubs/modules/shared/axios/authAxios.d.ts +16 -0
- package/dist/host-stubs/modules/shared/constants.d.ts +14 -0
- package/dist/host-stubs/modules/store.d.ts +4 -0
- package/dist/host-stubs/modules/template/templateEnumerators.d.ts +19 -0
- package/dist/host-stubs/modules/tour/injectTourIntoPage.d.ts +20 -0
- package/dist/host-stubs/style/icons.d.ts +57 -0
- package/dist/host-stubs/utils/dateFormats.d.ts +1 -0
- package/dist/host-stubs/view/branding/brandDefaultFont.d.ts +3 -1
- package/dist/host-stubs/view/branding/styles/BrandIcons.d.ts +9 -0
- package/dist/host-stubs/view/branding/styles/types.d.ts +76 -0
- package/dist/host-stubs/view/configurations/ConfigurationIcons.d.ts +9 -0
- package/dist/host-stubs/view/demo/DemoIcons.d.ts +9 -0
- package/dist/host-stubs/view/images/Icons.d.ts +6 -0
- package/dist/host-stubs/view/media/MediaGalleryDialog/types.d.ts +47 -0
- package/dist/host-stubs/view/media/MediaGalleryDialog/utils/fileUtils.d.ts +3 -0
- package/dist/host-stubs/view/media/MediaGalleryDialog/utils/mediaTypes.d.ts +9 -0
- package/dist/host-stubs/view/media/MediaGalleryDialog.d.ts +12 -2
- package/dist/host-stubs/view/media/styles/MediaIcons.d.ts +13 -0
- package/dist/host-stubs/view/shared/Confetti.d.ts +5 -0
- package/dist/host-stubs/view/shared/PagePilotLoader.d.ts +2 -0
- package/dist/host-stubs/view/shared/UpgradeDialog/UpgradeDialogContext.d.ts +1 -0
- package/dist/host-stubs/view/shared/common/CopyToClipboard.d.ts +7 -0
- package/dist/host-stubs/view/shared/editors/MdxEditor.d.ts +8 -0
- package/dist/host-stubs/view/shared/editors/QuillEditor.d.ts +3 -0
- package/dist/host-stubs/view/shared/editors/sanitize.d.ts +4 -0
- package/dist/host-stubs/view/shared/editors/types.d.ts +7 -0
- package/dist/host-stubs/view/shared/media/TemplatePreviewMedia.d.ts +29 -0
- package/dist/host-stubs/view/shared/modals/ConfigureDialog.d.ts +7 -0
- package/dist/host-stubs/view/shared/modals/ManageTemplateModal.d.ts +5 -0
- package/dist/host-stubs/view/shared/speech/index.d.ts +17 -0
- package/dist/host-stubs/view/shared/styles/Table.styles.d.ts +3 -0
- package/dist/host-stubs/view/template/form/TemplateFormModal.d.ts +10 -0
- package/dist/host-stubs/view/template/form/fields/types.d.ts +7 -0
- package/dist/{index-DojXOBrb.js → index-B8pdGALF.js} +86282 -73896
- package/dist/{index-BRq3RgdO.cjs → index-C-KL2oQP.cjs} +1 -1
- package/dist/{index-BN1BduFG.js → index-CStZQ7E0.js} +1 -1
- package/dist/index-DVx38kGU.cjs +1553 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/render-core/combineSections.d.ts +33 -3
- package/dist/render-core/dateFormats.d.ts +14 -3
- package/dist/render-core/stubs/pickerEmptyState.d.ts +2 -0
- package/dist/render-core/stubs/styleIcons.d.ts +1 -0
- package/dist/render.cjs +262 -217
- package/dist/render.js +9255 -7732
- package/dist/style.css +1 -1
- package/dist/{xlsx-D2quXLTv.cjs → xlsx-DUs4Mvqq.cjs} +1 -1
- package/dist/{xlsx-0y4dyiCO.js → xlsx-bYU68TCR.js} +1 -1
- package/package.json +1 -1
- package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/ResponsiveEditingBanner.d.ts +0 -13
- package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/BoxShadowControls.d.ts +0 -19
- package/dist/editor-sample/documents/blocks/AppBannerPicker/appBanner.styled.d.ts +0 -2
- package/dist/email-builder-core/blocks/boxShadowSchema.d.ts +0 -23
- package/dist/index-DEBoxZlq.cjs +0 -1510
|
@@ -1,9 +1,140 @@
|
|
|
1
1
|
import { TEditorConfiguration } from './core';
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
import { DateFormatPreset, TimeFormatPreset } from '../../../host-stubs/utils/dateFormats';
|
|
3
|
+
/**
|
|
4
|
+
* The kinds of single-value template field. `array` is repeatable and handled
|
|
5
|
+
* separately. `text` / `textarea` substitute as plain strings, `number` as a
|
|
6
|
+
* numeric string, `image` as an image URL (used in Image/Avatar/Logo blocks),
|
|
7
|
+
* `date` an ISO date string rendered through a display format (see `dateFormat`).
|
|
8
|
+
* `time` an ISO date string rendered as just its time portion (see `timeFormat`).
|
|
9
|
+
* `datetime` one ISO string exposing TWO sub-tokens — `{{id.date}}` (formatted
|
|
10
|
+
* via `dateFormat`) and `{{id.time}}` (via `timeFormat`) — so a single value /
|
|
11
|
+
* API mapping can print its date and time in separate blocks.
|
|
12
|
+
*/
|
|
13
|
+
export type TemplateScalarType = 'text' | 'textarea' | 'number' | 'image' | 'date' | 'time' | 'datetime';
|
|
14
|
+
export type TemplateFormType = TemplateScalarType | 'array';
|
|
15
|
+
/** All scalar types — used by both top-level fields and array sub-fields. */
|
|
16
|
+
export declare const TEMPLATE_SCALAR_TYPES: TemplateScalarType[];
|
|
17
|
+
export type TemplateItemFieldDef = {
|
|
18
|
+
id: string;
|
|
19
|
+
name: string;
|
|
20
|
+
/** Sub-field input kind. Defaults to `text` when absent (legacy rows). */
|
|
21
|
+
type?: TemplateScalarType;
|
|
22
|
+
/** Author-set default value, used to prefill the row when a template is applied. */
|
|
23
|
+
defaultValue?: string;
|
|
24
|
+
/** `date` sub-fields only — see the same fields on TemplateFormField. */
|
|
25
|
+
dateFormat?: DateFormatPreset;
|
|
26
|
+
/** `time` sub-fields only — 24h / AM/PM. Timezone reuses `dateTz`. */
|
|
27
|
+
timeFormat?: TimeFormatPreset;
|
|
28
|
+
dateTz?: string;
|
|
29
|
+
};
|
|
30
|
+
export type TemplateArrayRow = Record<string, string>;
|
|
31
|
+
export type TemplateFormField = {
|
|
32
|
+
id: string;
|
|
33
|
+
name: string;
|
|
34
|
+
type: TemplateFormType;
|
|
35
|
+
value?: string | TemplateArrayRow[];
|
|
36
|
+
defaultValue?: string;
|
|
37
|
+
itemFields?: TemplateItemFieldDef[];
|
|
38
|
+
sourceBlockId?: string;
|
|
39
|
+
rowIds?: string[];
|
|
40
|
+
/**
|
|
41
|
+
* `date` fields only. How the ISO `value` is displayed:
|
|
42
|
+
* - `relative` (default) → "Today" / "Tomorrow" / "Mar 25", recomputed in the
|
|
43
|
+
* reader's browser at view time (emitted as a `data-ahd-date` marker span,
|
|
44
|
+
* NOT baked to a fixed string). Uses the reader's local timezone.
|
|
45
|
+
* - any absolute preset → a fixed string ("9th Sep 2026" …) resolved at bake
|
|
46
|
+
* time in `dateTz`.
|
|
47
|
+
* See src/utils/dateFormats.ts for the preset list.
|
|
48
|
+
*/
|
|
49
|
+
dateFormat?: DateFormatPreset;
|
|
50
|
+
/**
|
|
51
|
+
* `time` fields only. How the ISO `value`'s time portion is displayed:
|
|
52
|
+
* - `24h` (default) → "20:42"
|
|
53
|
+
* - `12h` → "8:42 PM"
|
|
54
|
+
* Always baked to a fixed string (no relative mode). Rendered in `dateTz`.
|
|
55
|
+
*/
|
|
56
|
+
timeFormat?: TimeFormatPreset;
|
|
57
|
+
/**
|
|
58
|
+
* `date` fields with an absolute `dateFormat`, and all `time` fields. IANA
|
|
59
|
+
* timezone the value is rendered in (e.g. "America/New_York"). Ignored by
|
|
60
|
+
* `date`'s `relative` preset.
|
|
61
|
+
*/
|
|
62
|
+
dateTz?: string;
|
|
63
|
+
/**
|
|
64
|
+
* Set on a container-repeat array field driven from the Variables tab's
|
|
65
|
+
* "Repeatable container" flow: the id of the Grid/FlexColumns/ColumnsContainer
|
|
66
|
+
* whose EMPTY slots get stamped with clones of `sourceBlockId`'s subtree.
|
|
67
|
+
* (`sourceBlockId` = the block sitting in the container's first filled slot;
|
|
68
|
+
* `rowIds` = the stamped clones' roots, one per filled empty slot.)
|
|
69
|
+
*/
|
|
70
|
+
containerId?: string;
|
|
71
|
+
/**
|
|
72
|
+
* Set on a direct items-array data-source field: the id of
|
|
73
|
+
* the block whose OWN `data.props.items` gets seeded straight from the Data
|
|
74
|
+
* Reference source. Unlike `sourceBlockId`, there's no cloned subtree —
|
|
75
|
+
* `itemsBlockId` points at the block itself, and rows write directly into
|
|
76
|
+
* its `items` array. Presence of `itemsBlockId` (instead of `sourceBlockId`)
|
|
77
|
+
* is what routes ArrayFieldEditor/DataReferencePanel down the items-array
|
|
78
|
+
* path instead of the container-repeat path.
|
|
79
|
+
*/
|
|
80
|
+
itemsBlockId?: string;
|
|
81
|
+
/**
|
|
82
|
+
* Author flag set from "Set template details" → Template Fields: marks this
|
|
83
|
+
* field's content as intended to be repeated once the template is applied
|
|
84
|
+
* (e.g. across grid cells / carousel slides). Pure metadata — carried through
|
|
85
|
+
* from the saved template record, doesn't drive any runtime behavior itself.
|
|
86
|
+
*/
|
|
87
|
+
repeatable?: boolean;
|
|
88
|
+
/**
|
|
89
|
+
* The id of the block template this repeatable field is bound to — captured
|
|
90
|
+
* when the field's block is saved via the Variables-panel "Save as New
|
|
91
|
+
* Template" shortcut. Gives a reference to WHICH template drives this grid so
|
|
92
|
+
* the "Change Template" flow can key-match form fields on replace, and the
|
|
93
|
+
* Data Reference tab knows the source template.
|
|
94
|
+
*/
|
|
95
|
+
templateId?: string;
|
|
96
|
+
/**
|
|
97
|
+
* "Data Reference" binding for a repeatable field: where the repetition data
|
|
98
|
+
* comes from. `custom` = the manual rows editor (default). `api`/`menu` pull
|
|
99
|
+
* an array of objects whose keys map to this field's sub-field ids; each
|
|
100
|
+
* object seeds one repeated copy. `customJson` holds the pasted JSON text for
|
|
101
|
+
* the `custom-json` source. Only meaningful when `repeatable` is set.
|
|
102
|
+
*/
|
|
103
|
+
dataSource?: {
|
|
104
|
+
/** `api` = fetch an array of objects from a REST endpoint. */
|
|
105
|
+
type: 'custom' | 'custom-json' | 'api' | 'menu';
|
|
106
|
+
/** Raw JSON text for `custom-json`. */
|
|
107
|
+
customJson?: string;
|
|
108
|
+
/** Endpoint URL for the `api` source. Persisted in config. */
|
|
109
|
+
apiUrl?: string;
|
|
110
|
+
/** HTTP method for the `api` source. Only GET works today; POST is planned. */
|
|
111
|
+
apiMethod?: 'GET' | 'POST';
|
|
112
|
+
/**
|
|
113
|
+
* Optional dot-path (e.g. "data.ALL.games") into the response body where
|
|
114
|
+
* the array of objects lives. When empty, the array is auto-detected from
|
|
115
|
+
* common wrapper keys (data / rows / results / items / records).
|
|
116
|
+
*/
|
|
117
|
+
apiResponsePath?: string;
|
|
118
|
+
/**
|
|
119
|
+
* REPEATABLE fields: optional dot-path applied to EACH array element before
|
|
120
|
+
* its keys are matched to sub-field ids. Use it when the fields you want are
|
|
121
|
+
* nested inside a wrapper on every row, e.g. `[{ "event": { "nextStart": … } }]`
|
|
122
|
+
* → set `apiItemPath: "event"` so `nextStart` maps directly.
|
|
123
|
+
* Works for the `api` and `custom-json` sources.
|
|
124
|
+
*/
|
|
125
|
+
apiItemPath?: string;
|
|
126
|
+
/** Selected menu id for `menu`. */
|
|
127
|
+
menuId?: string;
|
|
128
|
+
/**
|
|
129
|
+
* SCALAR fields only: dot-path into the fetched object for THIS field's
|
|
130
|
+
* value, overriding the default key lookup by field id. e.g. field `name`
|
|
131
|
+
* with `apiObjectPath: "user.fullName"` reads `body.user.fullName`.
|
|
132
|
+
* (`apiResponsePath` still points at the object itself within the response.)
|
|
133
|
+
*/
|
|
134
|
+
apiObjectPath?: string;
|
|
135
|
+
};
|
|
136
|
+
};
|
|
137
|
+
export declare function buildRepeatRowIndex(document: TEditorConfiguration | null | undefined, fields: TemplateFormField[] | null | undefined): Map<string, TemplateArrayRow>;
|
|
7
138
|
/**
|
|
8
139
|
* Apply `sourceHtml`'s formatting shell to `targetHtml`'s text. If the source
|
|
9
140
|
* has no formatting, returns the target unchanged (keeps the copy's text as-is).
|
|
@@ -15,15 +146,6 @@ export declare function applyRowFormatting(sourceHtml: string, targetHtml: strin
|
|
|
15
146
|
* each row's text). Returns a new `fields` array; unrelated fields pass through.
|
|
16
147
|
*/
|
|
17
148
|
export declare function syncRepeatRowFormatting(fields: TemplateFormField[], document: TEditorConfiguration | null | undefined, sourceRootId: string): TemplateFormField[];
|
|
18
|
-
/**
|
|
19
|
-
* Split the HTML around a `{{token}}` into the wrapper the block put around it
|
|
20
|
-
* (the opening tags/styles before the token) and the trailing wrapper (the
|
|
21
|
-
* closing tags after it). Used by the sidebar's mini-rich-text editor so a
|
|
22
|
-
* value edited inside the popover can be re-composed back into the wrapping
|
|
23
|
-
* `<font color=...><span style=...>…</span></font>` chain the inline editor
|
|
24
|
-
* committed the token with — otherwise the sidebar edit would strip that
|
|
25
|
-
* formatting on save. Returns empty prefix+suffix if no token is present.
|
|
26
|
-
*/
|
|
27
149
|
export declare function splitTokenWrapper(rawText: string): {
|
|
28
150
|
prefix: string;
|
|
29
151
|
suffix: string;
|
|
@@ -71,4 +193,19 @@ export declare function resolveEditableTokenField(rawText: string, blockId: stri
|
|
|
71
193
|
* Returns the SAME reference when nothing changed so callers can skip a write.
|
|
72
194
|
*/
|
|
73
195
|
export declare function pruneOrphanFormFields(document: TEditorConfiguration | null | undefined, fields: TemplateFormField[] | null | undefined): TemplateFormField[];
|
|
196
|
+
export declare function getTextFieldsForType(type: string | undefined): string[] | undefined;
|
|
197
|
+
export declare function getTemplateForms(document: TEditorConfiguration | null | undefined): TemplateFormField[];
|
|
198
|
+
export declare function applyVariables(input: string | null | undefined, fields: TemplateFormField[] | null | undefined, rowContext?: TemplateArrayRow | null): string;
|
|
199
|
+
export declare function substituteBlockText(block: any, fields: TemplateFormField[] | null | undefined, rowContext?: TemplateArrayRow | null, rowIndex?: Map<string, TemplateArrayRow> | null): any;
|
|
200
|
+
/**
|
|
201
|
+
* Permanently substitute every token into the document and drop `formFields`
|
|
202
|
+
* from `root.data`. Used on publish/save.
|
|
203
|
+
*
|
|
204
|
+
* One deliberate exception to "bake = final text": a `date` field whose
|
|
205
|
+
* `dateFormat` is `relative` bakes to a `<span data-ahd-date="<iso>" …>` marker
|
|
206
|
+
* (via `buildContext` → `markDateVar`), not to "Today". The saved-HTML runtime
|
|
207
|
+
* in `renderers/pageScripts.ts` formats it in the reader's browser so the label
|
|
208
|
+
* stays correct on any later view. Absolute date formats bake to a fixed string.
|
|
209
|
+
*/
|
|
210
|
+
export declare function bakeTemplateValues<T extends TEditorConfiguration>(document: T, fields: TemplateFormField[] | null | undefined): T;
|
|
74
211
|
export declare function withPersistedFormFields<T extends TEditorConfiguration>(document: T, fields: TemplateFormField[] | null | undefined): T;
|
|
@@ -1 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Font every block inherits when it has no explicit `fontFamily` of its own:
|
|
3
|
+
* the page root's font, else the workspace brand default.
|
|
4
|
+
*
|
|
5
|
+
* Deliberately NOT in EditorContext. That module is the editor's store and is
|
|
6
|
+
* imported by nearly every editor component; pulling the redux-backed brand
|
|
7
|
+
* lookup into it formed an import cycle that left EditorContext partially
|
|
8
|
+
* initialised at eval time (which is what broke the add-block "+" button).
|
|
9
|
+
* Keeping the resolution in its own leaf module breaks the cycle.
|
|
10
|
+
*/
|
|
1
11
|
export declare function useRootFontFamily(): string;
|
|
@@ -2,7 +2,7 @@ import { z } from 'zod';
|
|
|
2
2
|
export declare const ContainerPropsSchema: z.ZodObject<{
|
|
3
3
|
style: z.ZodNullable<z.ZodOptional<z.ZodObject<{
|
|
4
4
|
backgroundColor: z.ZodPreprocess<z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodString, z.ZodString, z.ZodLiteral<"transparent">]>>>>;
|
|
5
|
-
backgroundImage: z.ZodOptional<z.ZodNullable<z.ZodString
|
|
5
|
+
backgroundImage: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodString]>>>;
|
|
6
6
|
backgroundSize: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
7
7
|
backgroundRepeat: z.ZodNullable<z.ZodOptional<z.ZodEnum<{
|
|
8
8
|
repeat: "repeat";
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { EmailLayoutProps } from './EmailLayoutPropsSchema';
|
|
3
|
-
export default function EmailLayoutReader(props: EmailLayoutProps): string | number | bigint | boolean | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode
|
|
3
|
+
export default function EmailLayoutReader(props: EmailLayoutProps): string | number | bigint | boolean | import("react/jsx-runtime").JSX.Element | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode>>;
|
|
@@ -12,6 +12,12 @@ export declare const TabsBlockPropsSchema: z.ZodObject<{
|
|
|
12
12
|
style: z.ZodNullable<z.ZodOptional<z.ZodObject<{
|
|
13
13
|
backgroundColor: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
14
14
|
borderColor: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
15
|
+
borderWidth: z.ZodNullable<z.ZodOptional<z.ZodObject<{
|
|
16
|
+
top: z.ZodNumber;
|
|
17
|
+
right: z.ZodNumber;
|
|
18
|
+
bottom: z.ZodNumber;
|
|
19
|
+
left: z.ZodNumber;
|
|
20
|
+
}, z.core.$strip>>>;
|
|
15
21
|
borderRadius: z.ZodNullable<z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString, z.ZodObject<{
|
|
16
22
|
topLeft: z.ZodNumber;
|
|
17
23
|
topRight: z.ZodNumber;
|
|
@@ -1,5 +1,3 @@
|
|
|
1
1
|
export { default as renderToStaticMarkup } from './renderers/renderToStaticMarkup';
|
|
2
2
|
export type { TReaderBlock, TReaderDocument, TReaderBlockProps, TReaderProps, } from './Reader/core';
|
|
3
3
|
export { ReaderBlockSchema, ReaderDocumentSchema, ReaderBlock, default as Reader, } from './Reader/core';
|
|
4
|
-
export { buildGeneratedThemeMarkup } from './renderers/pageScripts';
|
|
5
|
-
export { GENERATED_THEME_ATTR, GENERATED_THEME_AUTO } from './renderers/themeTokens';
|
|
@@ -13,4 +13,3 @@ export declare const PAGINATION_SCRIPT_URL = "https://pagepilot.fabbuilder.com/s
|
|
|
13
13
|
export declare const DEMO_SCALE_SCRIPT_URL = "https://pagepilot.fabbuilder.com/scripts/pagePilotDemoScale.js";
|
|
14
14
|
export declare const TIMER_SCRIPT_URL = "https://pagepilot.fabbuilder.com/scripts/pagePilotTimer.js";
|
|
15
15
|
export declare const ANIMATION_SCRIPT_URL = "https://pagepilot.fabbuilder.com/scripts/pagePilotAnimation.js";
|
|
16
|
-
export declare const buildGeneratedThemeMarkup: () => string;
|
|
@@ -1,143 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* A published page is a BODY FRAGMENT injected into a host application we
|
|
7
|
-
* don't control (see ConfigureDialog's integration snippets — hosts do
|
|
8
|
-
* `container.insertAdjacentHTML(...)`). There is no `<head>` to put a
|
|
9
|
-
* stylesheet in and no guarantee any host CSS exists, so everything the page
|
|
10
|
-
* needs to render dark must ship inside the fragment itself.
|
|
11
|
-
*
|
|
12
|
-
* ## Why not `filter: invert()`
|
|
13
|
-
*
|
|
14
|
-
* The previous implementation inverted the whole subtree with
|
|
15
|
-
* `filter: invert(1) hue-rotate(180deg)`. That is not dark mode: it rotates
|
|
16
|
-
* every author-picked hue 180deg, so a brand blue publishes as orange. It also
|
|
17
|
-
* forced a fragile web of counter-inversions to keep photos from looking like
|
|
18
|
-
* negatives. This module replaces it with real per-color dark values.
|
|
19
|
-
*
|
|
20
|
-
* ## How it works
|
|
21
|
-
*
|
|
22
|
-
* Each distinct authored color is issued a token. The block renders
|
|
23
|
-
* `var(--ahd-c-N, <original>)` instead of the raw color, and the token is
|
|
24
|
-
* defined once in a `<style>` scoped to the fragment root:
|
|
25
|
-
*
|
|
26
|
-
* [data-ahd-theme] { --ahd-c-3: light-dark(#0a5fcc, #5aa2ff); }
|
|
27
|
-
*
|
|
28
|
-
* `light-dark()` resolves against the nearest `color-scheme`, which the
|
|
29
|
-
* fragment root sets from the author's Light/Dark/Auto choice. That means a
|
|
30
|
-
* host can flip an embedded page by changing one attribute — no re-fetch, no
|
|
31
|
-
* media-query re-evaluation.
|
|
32
|
-
*
|
|
33
|
-
* Two independent fallbacks keep an unsupported browser rendering exactly what
|
|
34
|
-
* it renders today:
|
|
35
|
-
* 1. The `var()` fallback carries the original color, so a browser that
|
|
36
|
-
* drops the custom property still paints the light value.
|
|
37
|
-
* 2. `emitTokenCss` writes a plain light-value declaration before the
|
|
38
|
-
* `light-dark()` one, so a browser that understands custom properties but
|
|
39
|
-
* not `light-dark()` uses the light value rather than an invalid
|
|
40
|
-
* declaration.
|
|
41
|
-
*/
|
|
42
|
-
export type GeneratedTheme = 'light' | 'dark' | 'auto';
|
|
43
|
-
export declare const GENERATED_THEME_ATTR = "data-ahd-theme";
|
|
44
|
-
/**
|
|
45
|
-
* Published pages always follow the visitor's device setting.
|
|
46
|
-
*
|
|
47
|
-
* This is the only mode the renderer emits: there is no author-facing
|
|
48
|
-
* light/dark switch, because a published page has no opinion about the
|
|
49
|
-
* visitor's environment - the visitor's browser does. `light` and `dark`
|
|
50
|
-
* remain in the type because a HOST APP can override a rendered fragment at
|
|
51
|
-
* runtime by setting this attribute (see the snippet in ConfigureDialog).
|
|
52
|
-
*/
|
|
53
|
-
export declare const GENERATED_THEME_AUTO: GeneratedTheme;
|
|
54
|
-
/**
|
|
55
|
-
* Derive a dark-mode counterpart for an authored light color.
|
|
56
|
-
*
|
|
57
|
-
* The rule is: PRESERVE HUE AND SATURATION, INVERT LIGHTNESS ONLY. That is the
|
|
58
|
-
* entire difference from the `hue-rotate` approach this replaces — a brand blue
|
|
59
|
-
* stays blue and simply becomes lighter so it reads against a dark surface.
|
|
60
|
-
*
|
|
61
|
-
* Two deliberate departures from a naive `l -> 1 - l`:
|
|
62
|
-
*
|
|
63
|
-
* - Near-neutral colors (very low saturation) are the page's surfaces and text.
|
|
64
|
-
* A straight flip sends #ffffff to #000000, which is harsher than good dark
|
|
65
|
-
* UI: pure black raises perceived contrast and causes halation against light
|
|
66
|
-
* text. They're mapped into a softer range instead (about #121212 to #ededed),
|
|
67
|
-
* matching the app's own dark palette (`src/theme/colors/dark.ts` uses
|
|
68
|
-
* #121212 for background).
|
|
69
|
-
*
|
|
70
|
-
* - Saturated colors get a compressed flip. A mid-lightness brand color
|
|
71
|
-
* (l ~ 0.5) should stay close to where it is rather than swing to the
|
|
72
|
-
* opposite extreme, so the result is pulled toward a legible band and floored
|
|
73
|
-
* so it never lands too dark to see on a dark surface.
|
|
74
|
-
*
|
|
75
|
-
* Alpha is carried through untouched.
|
|
76
|
-
*
|
|
77
|
-
* Returns `null` for anything that is not a single solid color — gradients,
|
|
78
|
-
* `transparent`, keywords, unparseable values. Those are left exactly as the
|
|
79
|
-
* author wrote them (see `token`).
|
|
80
|
-
*/
|
|
81
|
-
export declare function deriveDarkColor(value: string): string | null;
|
|
82
|
-
export type TokenRegistry = {
|
|
83
|
-
/**
|
|
84
|
-
* Issue (or reuse) a token for `raw` and return the value a block should
|
|
85
|
-
* render.
|
|
86
|
-
*
|
|
87
|
-
* Returns `raw` unchanged when there is nothing to theme — null/undefined,
|
|
88
|
-
* `transparent`, `currentColor`, a gradient, or anything unparseable. Callers
|
|
89
|
-
* can therefore pipe every color through this without pre-checking, EXCEPT
|
|
90
|
-
* that a caller which BRANCHES on whether a value is a gradient must do that
|
|
91
|
-
* classification on the raw value first (see `isGradientColor` in
|
|
92
|
-
* blocks/helpers/blockStyleHelpers).
|
|
93
|
-
*
|
|
94
|
-
* GRADIENTS ARE NEVER THEMED. An author-picked gradient renders identically
|
|
95
|
-
* in light and dark mode — it is returned byte-for-byte unchanged, so the
|
|
96
|
-
* published CSS carries the author's exact value in both themes.
|
|
97
|
-
*/
|
|
98
|
-
token(raw: string | null | undefined): string | undefined;
|
|
99
|
-
/** CSS defining every token issued so far. Empty when none, or theme light. */
|
|
100
|
-
css(theme: GeneratedTheme): string;
|
|
101
|
-
/** Number of distinct colors tokenized (for tests/diagnostics). */
|
|
102
|
-
size(): number;
|
|
103
|
-
};
|
|
104
|
-
export declare function createTokenRegistry(): TokenRegistry;
|
|
105
|
-
/**
|
|
106
|
-
* CSS for a fragment that issued no tokens (or chose light).
|
|
107
|
-
*
|
|
108
|
-
* Still worth emitting for `dark`/`auto`: `color-scheme` alone makes form
|
|
109
|
-
* controls, scrollbars and the canvas behind the fragment follow the theme.
|
|
110
|
-
*/
|
|
111
|
-
export declare function baseThemeCss(theme: GeneratedTheme): string;
|
|
112
|
-
export declare const ThemeTokenProvider: import('react').Provider<TokenRegistry>;
|
|
113
|
-
/**
|
|
114
|
-
* Theme a single color value.
|
|
115
|
-
*
|
|
116
|
-
* Safe to call unconditionally: outside a publish render it returns `raw`
|
|
117
|
-
* unchanged. See `TokenRegistry.token` for what is and isn't themed — notably,
|
|
118
|
-
* gradients pass through byte-for-byte.
|
|
119
|
-
*
|
|
120
|
-
* A caller that BRANCHES on whether a color is a gradient must classify the
|
|
121
|
-
* RAW value first (via `isGradientColor`) and only then tokenize, or the
|
|
122
|
-
* branch will misfire on the returned `var(...)` string.
|
|
2
|
+
* Author colors are rendered exactly as picked: there is no light/dark theming
|
|
3
|
+
* of published output. These helpers are identity pass-throughs, kept so block
|
|
4
|
+
* components can keep calling them without per-block churn.
|
|
123
5
|
*/
|
|
124
6
|
export declare function useColorToken(raw: string | null | undefined): string | undefined;
|
|
125
|
-
/**
|
|
126
|
-
* A themer for colors that live in a LIST.
|
|
127
|
-
*
|
|
128
|
-
* `useColorToken` is a hook, so it cannot be called from inside `.map()` or any
|
|
129
|
-
* other loop — blocks whose colors come from per-row data (breadcrumb items,
|
|
130
|
-
* menu entries, pagination buttons) have no fixed number of colors to theme and
|
|
131
|
-
* would break the rules of hooks. This returns a plain function instead: call
|
|
132
|
-
* the hook once at the top of the component, then apply the result per item.
|
|
133
|
-
*
|
|
134
|
-
* Outside a publish render it is the identity function, exactly like
|
|
135
|
-
* `useColorToken`.
|
|
136
|
-
*/
|
|
7
|
+
/** Plain-function form for colors that live in a list (no hook rules). */
|
|
137
8
|
export declare function useColorTokenizer(): (raw: string | null | undefined) => string | undefined;
|
|
138
|
-
export declare function themeAuthorHtml(html: string, registry: TokenRegistry | null): string;
|
|
139
|
-
/**
|
|
140
|
-
* Hook form of `themeAuthorHtml`, for blocks that render author HTML.
|
|
141
|
-
* Outside a publish render this returns the input unchanged.
|
|
142
|
-
*/
|
|
143
9
|
export declare function useThemedHtml(html: string): string;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const LEGACY_FEATURE_CUTOFFS: {
|
|
2
|
+
readonly legacyTextBlocks: Date;
|
|
3
|
+
};
|
|
4
|
+
export type LegacyFeatureKey = keyof typeof LEGACY_FEATURE_CUTOFFS;
|
|
5
|
+
/** True when the feature is hidden for this tenant (created on/after the cutoff). */
|
|
6
|
+
export declare const isLegacyFeatureHidden: (tenant: any, feature: LegacyFeatureKey) => boolean;
|
|
7
|
+
export declare const useIsLegacyFeatureHidden: (feature: LegacyFeatureKey) => boolean;
|
|
8
|
+
export default useIsLegacyFeatureHidden;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { isProOrAboveTenant } from '../../api/useTenantPlan';
|
|
2
|
+
export { isProOrAboveTenant };
|
|
3
|
+
export declare const useCurrentTenantPlan: () => {
|
|
4
|
+
currentTenant: {
|
|
5
|
+
[key: string]: any;
|
|
6
|
+
id?: string;
|
|
7
|
+
plan?: string;
|
|
8
|
+
};
|
|
9
|
+
isPlanProOrAbove: boolean;
|
|
10
|
+
};
|
|
11
|
+
export declare const isTemplateLockedForPlan: (supportedPlans: string[] | undefined | null, tenantPlan: string | undefined | null) => boolean;
|
|
12
|
+
export declare const useTemplatePlanLock: () => {
|
|
13
|
+
tenantPlan: string;
|
|
14
|
+
isTemplateLocked: (template: {
|
|
15
|
+
supportedPlans?: string[];
|
|
16
|
+
} | null | undefined) => boolean;
|
|
17
|
+
};
|
|
18
|
+
export default useCurrentTenantPlan;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const AHD_EN_DEFAULTS: Record<string, string>;
|
|
@@ -4,7 +4,9 @@ declare const FormsService: {
|
|
|
4
4
|
count: number;
|
|
5
5
|
}>;
|
|
6
6
|
find: () => Promise<any>;
|
|
7
|
-
getViewUrl: (_id: string, _tenantId?: string) => string;
|
|
8
7
|
getCreateUrl: () => string;
|
|
8
|
+
getEditUrl: (id: string, tenantId?: string) => string;
|
|
9
|
+
getViewUrl: (id: string, tenantId?: string) => string;
|
|
10
|
+
getStatsUrl: (id: string, tenantId?: string) => string;
|
|
9
11
|
};
|
|
10
12
|
export default FormsService;
|
|
@@ -3,10 +3,13 @@ export type FormRow = {
|
|
|
3
3
|
name?: string;
|
|
4
4
|
tenantId?: string;
|
|
5
5
|
};
|
|
6
|
-
export default function useFormsList(
|
|
6
|
+
export default function useFormsList(_options?: {
|
|
7
|
+
enabled?: boolean;
|
|
8
|
+
}): {
|
|
7
9
|
forms: FormRow[];
|
|
8
10
|
options: {
|
|
9
11
|
label: string;
|
|
10
12
|
value: string;
|
|
11
13
|
}[];
|
|
14
|
+
isLoading: boolean;
|
|
12
15
|
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export default class PageService {
|
|
2
|
+
static find(id: string): Promise<any>;
|
|
3
|
+
static upsert(data: Record<string, unknown>): Promise<any>;
|
|
4
|
+
static update(id: string, data: Record<string, unknown>): Promise<any>;
|
|
5
|
+
static create(data: Record<string, unknown>): Promise<any>;
|
|
6
|
+
/** Page listing isn't exposed by the pagepilot API client. */
|
|
7
|
+
static list(_filter?: Record<string, unknown>, _orderBy?: string | null, _limit?: number, _offset?: number): Promise<{
|
|
8
|
+
rows: any[];
|
|
9
|
+
count: number;
|
|
10
|
+
}>;
|
|
11
|
+
}
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
declare const settingsSelectors: {
|
|
2
|
+
selectRaw: (_state: unknown) => any;
|
|
2
3
|
selectSettings: (_state: unknown) => any;
|
|
3
4
|
selectBranding: (_state: unknown) => any;
|
|
5
|
+
selectInitLoading: (_state: unknown) => boolean;
|
|
6
|
+
selectSaveLoading: (_state: unknown) => boolean;
|
|
7
|
+
selectBrandingLoaded: (_state: unknown) => boolean;
|
|
4
8
|
};
|
|
5
9
|
export default settingsSelectors;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
type AxiosLikeConfig = {
|
|
2
|
+
headers?: Record<string, string>;
|
|
3
|
+
params?: Record<string, unknown>;
|
|
4
|
+
};
|
|
5
|
+
type AxiosLikeResponse<T = any> = {
|
|
6
|
+
data: T;
|
|
7
|
+
status: number;
|
|
8
|
+
};
|
|
9
|
+
declare const authAxios: {
|
|
10
|
+
get: <T = any>(url: string, config?: AxiosLikeConfig) => Promise<AxiosLikeResponse<T>>;
|
|
11
|
+
delete: <T = any>(url: string, config?: AxiosLikeConfig) => Promise<AxiosLikeResponse<T>>;
|
|
12
|
+
post: <T = any>(url: string, body?: unknown, config?: AxiosLikeConfig) => Promise<AxiosLikeResponse<T>>;
|
|
13
|
+
put: <T = any>(url: string, body?: unknown, config?: AxiosLikeConfig) => Promise<AxiosLikeResponse<T>>;
|
|
14
|
+
patch: <T = any>(url: string, body?: unknown, config?: AxiosLikeConfig) => Promise<AxiosLikeResponse<T>>;
|
|
15
|
+
};
|
|
16
|
+
export default authAxios;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare const CR_TENANT_ID: string | undefined;
|
|
2
|
+
export declare const STUDIO_TENANT_ID: string | undefined;
|
|
3
|
+
export declare const MIN_CHAR_LIMIT = 50;
|
|
4
|
+
export declare const MAX_CHAR_LIMIT = 200;
|
|
5
|
+
export declare const DEFAULT_CALENDLY_URL = "https://calendly.com/ishaan-fabbuilder/30min";
|
|
6
|
+
export declare const DOCS_BASE_URL = "https://fab-builder.github.io/pagepilot-vanilla-react-app";
|
|
7
|
+
export declare const DOCS_LINK_PAGE_TO_MENU = "https://fab-builder.github.io/pagepilot-vanilla-react-app/pages/link-page-to-menu";
|
|
8
|
+
export declare const DOCS_TEMPLATE_VARIABLES = "https://fab-builder.github.io/pagepilot-vanilla-react-app/pages/template-variables";
|
|
9
|
+
export declare const DOCS_WEBINAR_REGISTRATION = "https://fab-builder.github.io/pagepilot-vanilla-react-app/webinar#registration";
|
|
10
|
+
export declare const DOCS_WEBINAR_PAID = "https://fab-builder.github.io/pagepilot-vanilla-react-app/webinar#paid-webinar";
|
|
11
|
+
export declare const DOCS_PREVIEW_MODE = "https://fab-builder.github.io/pagepilot-vanilla-react-app/pages/fetch-pages#preview-mode";
|
|
12
|
+
export declare const PRODUCT_DOCS_BASE_URL = "https://pagepilot-docs.fabbuilder.com";
|
|
13
|
+
export declare const FORM_BUILDER_API_BASE = "https://cs.fabbuilder.com/cs-app/form-builder/api";
|
|
14
|
+
export declare const FORM_BUILDER_FE_BASE = "https://cs-app-form-builder-fe.web.app";
|
|
@@ -1,3 +1,7 @@
|
|
|
1
1
|
export type AppDispatch = (action: unknown) => void;
|
|
2
2
|
declare const getStore: () => any;
|
|
3
|
+
/** Host router history — none in the standalone build (navigation is a no-op). */
|
|
4
|
+
export declare const getHistory: () => {
|
|
5
|
+
push: (path: string) => void;
|
|
6
|
+
} | null;
|
|
3
7
|
export default getStore;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export declare enum TemplateVisibility {
|
|
2
|
+
Global = "global",
|
|
3
|
+
Private = "private"
|
|
4
|
+
}
|
|
5
|
+
declare const templateEnumerators: {
|
|
6
|
+
type: string[];
|
|
7
|
+
visibility: string[];
|
|
8
|
+
tags: string[];
|
|
9
|
+
pageCategory: string[];
|
|
10
|
+
tagsByType: {
|
|
11
|
+
page: string[];
|
|
12
|
+
tour: string[];
|
|
13
|
+
banner: string[];
|
|
14
|
+
tooltip: string[];
|
|
15
|
+
appbanner: string[];
|
|
16
|
+
'app-banner': string[];
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
export default templateEnumerators;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export declare const stripAhdIntegration: (html: string) => string;
|
|
2
|
+
/** Returns the exact AHD integration block from a chunk of HTML, or '' if absent. */
|
|
3
|
+
export declare const extractAhdIntegrationBlock: (html: string) => string;
|
|
4
|
+
export declare const buildAhdIntegrationSnippet: (tenantId: string, slug: string) => string;
|
|
5
|
+
export declare const injectAhdIntegration: (html: string, slug: string, tenantId?: string) => string;
|
|
6
|
+
type LinkedPageSources = {
|
|
7
|
+
tourData?: any;
|
|
8
|
+
record?: any;
|
|
9
|
+
searchParams?: URLSearchParams | null;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* Resolves the linked page's slug and id from tour data, record, and URL search params
|
|
13
|
+
* (in that order). When `mode === 'remove'`, strips the AHD integration block from the
|
|
14
|
+
* linked page's first section. Otherwise (re)injects it.
|
|
15
|
+
*/
|
|
16
|
+
export declare function injectPageGuideIntoLinkedPage(tourId: string | undefined, sources: LinkedPageSources, mode?: 'inject' | 'remove'): Promise<void>;
|
|
17
|
+
/** Strips the AHD integration block from every section of the linked page. */
|
|
18
|
+
export declare const removeTourFromPage: (pageSlug: string, pageId?: string) => Promise<void>;
|
|
19
|
+
export declare const injectTourIntoPage: (pageSlug: string, _tourId?: string, pageId?: string) => Promise<void>;
|
|
20
|
+
export {};
|