/** * This file is part of the NocoBase (R) project. * Copyright (c) 2020-2024 NocoBase Co., Ltd. * Authors: NocoBase Team. * * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License. * For more information, please refer to: https://www.nocobase.com/agreement. */ import _ from 'lodash'; export declare const CALENDAR_POPUP_ACTION_KEYS: readonly ["quickCreateAction", "eventViewAction"]; export type CalendarPopupActionKey = (typeof CALENDAR_POPUP_ACTION_KEYS)[number]; export declare const CALENDAR_POPUP_PROP_KEYS: readonly ["quickCreatePopupSettings", "eventPopupSettings"]; export type HiddenPopupOpenViewNormalizer = (actionName: string, value: any, options: { transaction?: any; popupTemplateHostUid?: string; popupActionContext?: { hasCurrentRecord?: boolean; }; }) => Promise | undefined> | Record | undefined; export type HiddenPopupTemplateOpenViewBuilder = (input: { actionName: string; actionUid: string; openView: Record; popupSettings?: Record; existingHost?: any; transaction?: any; hasCurrentRecord?: boolean; normalizePopupSettings: (popupSettings?: Record) => Record; mergeDisplaySettings: (openView: Record, popupSettings?: Record, fallbackOpenView?: Record | null) => Record; }) => Promise> | Record; export type HiddenPopupHostDefaultContentEnsurer = (input: { actionName: string; actionUid: string; popupSettings?: Record; transaction?: any; hasCurrentRecord?: boolean; mergeDisplaySettings: (openView: Record, popupSettings?: Record, fallbackOpenView?: Record | null) => Record; }) => Promise | boolean; export type HiddenPopupHostRuntime = { repository: { findModelById: (uid: string, options?: any) => Promise; patch: (payload: Record, options?: any) => Promise; upsertModel: (payload: Record, options?: any) => Promise; }; applyPopupHostLocalContent?: (input: { actionName: string; actionUid: string; popupSettings?: Record; transaction?: any; hasCurrentRecord?: boolean; }) => Promise | any; buildPopupOpenViewWithTemplate: HiddenPopupTemplateOpenViewBuilder; clearFlowTemplateUsagesForNodeTree: (uid: string, transaction?: any) => Promise; ensurePopupHostDefaultContent: HiddenPopupHostDefaultContentEnsurer; reconcilePopupOpenViewTransition: (uid: string, currentOpenView: Record | null | undefined, nextOpenView: Record, transaction?: any) => Promise; removeNodeTreeWithBindings: (uid: string, transaction?: any) => Promise; syncFlowTemplateUsagesForNodeTree: (uid: string, transaction?: any) => Promise; }; export declare function normalizeCalendarPopupSettings(actionKey: CalendarPopupActionKey, popupSettings?: Record): Record; export declare function getCalendarPopupActionUse(actionKey: CalendarPopupActionKey): "CalendarQuickCreateActionModel" | "CalendarEventViewActionModel"; export declare function getCalendarPopupPropKey(actionKey: CalendarPopupActionKey): "quickCreatePopupSettings" | "eventPopupSettings"; export declare function getCalendarPopupActionUid(calendarUid: string, actionKey: CalendarPopupActionKey): string; export declare function getCalendarBlockResourceInit(blockNode: any): any; export declare function getCalendarPopupStoredSettings(blockNode: any, actionKey: CalendarPopupActionKey): Record; export declare function replaceCalendarStoredPopupSettings(runtime: Pick, blockNode: any, actionKey: CalendarPopupActionKey, popupSettings: Record, transaction?: any): Promise; export declare function buildCalendarInitialStepParams(input: { stepParams?: Record; props?: Record; settings?: Record; }): Record; export declare function buildCalendarPopupOpenView(input: { blockNode: any; actionKey: CalendarPopupActionKey; resourceInit?: Record; popupSettings?: Record; }): _.Dictionary; export declare function mergeCalendarPopupSettings(actionKey: CalendarPopupActionKey, current: any, value: any): Record; export declare function stripCalendarPopupTargetSettingsForResourceChange(actionKey: CalendarPopupActionKey, popupSettings?: Record): Record; export declare function normalizeCalendarPopupConfigureValue(input: { actionName: string; blockUid: string; actionKey: CalendarPopupActionKey; value: any; transaction?: any; normalizeOpenView: HiddenPopupOpenViewNormalizer; }): Promise>; export declare function normalizeCalendarInlineSettingsForConfigure(settings?: Record): Record; export declare function resolveCalendarInitialPopupOverride(settings: Record | undefined, primaryKey: 'quickCreatePopup' | 'eventPopup', legacyKey: 'quickCreatePopupSettings' | 'eventPopupSettings'): any; export declare function ensureCalendarBlockPopupHosts(runtime: HiddenPopupHostRuntime, blockNode: any, transaction?: any, popupSettingsOverrides?: Partial | undefined>>, options?: { displayFallbackOpenViews?: Partial | undefined>>; }): Promise; export declare function projectCalendarBlockPopupHosts(node: T): T; export declare function projectCalendarBlockPopupHostsInTree(node: T): T;