kirbyuse
Version:
Collection of Vue Composition utilities for Kirby CMS
949 lines (936 loc) • 29.6 kB
TypeScript
import * as Vue from 'vue';
import { ComponentPublicInstance, VueConstructor } from 'vue';
import * as vue_types_vue from 'vue/types/vue';
import * as vue_types_v3_component_public_instance from 'vue/types/v3-component-public-instance';
interface Panel {
create: (arg1?: any) => any;
context: string;
debug: boolean;
deprecated: (arg1?: any) => any;
direction: string;
error: (arg1?: any, arg2?: any) => any;
get: (arg1?: any, arg2?: any) => Promise<any>;
open: (arg1?: any, arg2?: any) => Promise<any>;
overlays: (...args: any[]) => any;
post: (arg1?: any, arg2?: any, arg3?: any) => Promise<any>;
request: (arg1?: any, arg2?: any) => Promise<any>;
search: (arg1?: any, arg2?: any, arg3?: any) => Promise<any>;
set: (arg1?: any) => any;
state: (...args: any[]) => any;
title: string;
url: (arg1?: any, arg2?: any, arg3?: any) => any;
isLoading: boolean;
isOffline: boolean;
activation: PanelActivation;
drag: PanelDrag;
events: PanelEvents;
searcher: PanelSearcher;
theme: PanelTheme;
upload: PanelUpload;
language: PanelLanguage;
menu: PanelMenu;
notification: PanelNotification;
system: PanelSystem;
translation: PanelTranslation;
user: PanelUser;
dropdown: PanelDropdown;
view: PanelView;
content: PanelContent;
drawer: PanelDrawer;
dialog: PanelDialog;
redirect: (arg1?: any) => any;
reload: (...args: any[]) => Promise<any>;
t: (...args: any[]) => any;
plugins: PanelPlugins;
config: PanelConfig;
languages: {
code: string;
default: boolean;
direction: string;
name: string;
rules: Record<string, string>;
}[];
license: string;
multilang: boolean;
permissions: PanelPermissions;
searches: PanelSearches;
urls: PanelUrls;
api: PanelApi;
app: InstanceType<VueConstructor>;
plugin: (...args: any[]) => any;
}
interface PanelActivation {
isOpen: boolean;
key: (...args: any[]) => any;
defaults: (...args: any[]) => any;
reset: (...args: any[]) => any;
set: (arg1?: any) => any;
state: (...args: any[]) => any;
validateState: (arg1?: any) => any;
close: (...args: any[]) => any;
open: (...args: any[]) => any;
}
interface PanelDrag {
type: any;
data: PanelDragData;
key: (...args: any[]) => any;
defaults: (...args: any[]) => any;
reset: (...args: any[]) => any;
set: (arg1?: any) => any;
state: (...args: any[]) => any;
validateState: (arg1?: any) => any;
isDragging: boolean;
start: (arg1?: any, arg2?: any) => any;
stop: (...args: any[]) => any;
}
type PanelDragData = Record<string, any>;
interface PanelEvents {
beforeunload: (arg1?: any) => any;
blur: (arg1?: any) => any;
click: (arg1?: any) => any;
copy: (arg1?: any) => any;
dragenter: (arg1?: any) => any;
dragexit: (arg1?: any) => any;
dragleave: (arg1?: any) => any;
dragover: (arg1?: any) => any;
drop: (arg1?: any) => any;
emit: (arg1?: any, arg2?: any) => any;
entered: any;
focus: (arg1?: any) => any;
keychain: (arg1?: any, arg2?: any) => any;
keydown: (arg1?: any) => any;
keyup: (arg1?: any) => any;
off: (arg1?: any, arg2?: any) => any;
offline: (arg1?: any) => any;
on: (arg1?: any, arg2?: any) => any;
online: (arg1?: any) => any;
paste: (arg1?: any) => any;
popstate: (arg1?: any) => any;
prevent: (arg1?: any) => any;
subscribe: (...args: any[]) => any;
unsubscribe: (...args: any[]) => any;
}
interface PanelSearcher {
controller: any;
requests: number;
isLoading: boolean;
open: (arg1?: any) => any;
query: (arg1?: any, arg2?: any, arg3?: any) => Promise<any>;
}
interface PanelTheme {
setting: string;
system: string;
key: (...args: any[]) => any;
defaults: (...args: any[]) => any;
reset: (...args: any[]) => any;
set: (arg1?: any) => any;
state: (...args: any[]) => any;
validateState: (arg1?: any) => any;
current: string;
}
interface PanelUpload {
abort: any;
accept: string;
attributes: PanelUploadAttributes;
files: any[];
max: any;
multiple: boolean;
preview: PanelUploadPreview;
replacing: any;
url: any;
key: (...args: any[]) => any;
defaults: (...args: any[]) => any;
reset: (...args: any[]) => any;
set: (arg1?: any) => any;
state: (...args: any[]) => any;
validateState: (arg1?: any) => any;
addEventListener: (arg1?: any, arg2?: any) => any;
addEventListeners: (arg1?: any) => any;
emit: (arg1?: any, arg2?: any) => any;
hasEventListener: (arg1?: any) => any;
listeners: (...args: any[]) => any;
on: PanelUploadOn;
input: any;
cancel: (...args: any[]) => Promise<any>;
completed: any[];
done: (...args: any[]) => Promise<any>;
findDuplicate: (arg1?: any) => any;
hasUniqueName: (arg1?: any) => any;
file: (arg1?: any) => any;
open: (arg1?: any, arg2?: any) => any;
pick: (arg1?: any) => any;
remove: (arg1?: any) => any;
replace: (arg1?: any, arg2?: any) => any;
select: (arg1?: any, arg2?: any) => any;
submit: (...args: any[]) => Promise<any>;
upload: (arg1?: any, arg2?: any) => Promise<any>;
}
type PanelUploadAttributes = Record<string, any>;
type PanelUploadPreview = Record<string, any>;
type PanelUploadOn = Record<string, any>;
interface PanelLanguage {
code: string;
default: boolean;
direction: string;
name: string;
rules: Record<string, string>;
key: (...args: any[]) => any;
defaults: (...args: any[]) => any;
reset: (...args: any[]) => any;
set: (arg1?: any) => any;
state: (...args: any[]) => any;
validateState: (arg1?: any) => any;
isDefault: boolean;
}
interface PanelMenu {
entries: ({
current: boolean;
icon: string;
link: string;
text: string;
title: string;
} | string)[];
hover: boolean;
isOpen: boolean;
key: (...args: any[]) => any;
defaults: (...args: any[]) => any;
reset: (...args: any[]) => any;
set: (arg1?: any) => any;
state: (...args: any[]) => any;
validateState: (arg1?: any) => any;
blur: (arg1?: any) => any;
close: (...args: any[]) => any;
escape: (...args: any[]) => any;
open: (...args: any[]) => any;
resize: (...args: any[]) => any;
toggle: (...args: any[]) => any;
}
interface PanelNotification {
context: any;
details: any;
icon: any;
isOpen: boolean;
message: any;
theme: any;
timeout: any;
type: any;
key: (...args: any[]) => any;
defaults: (...args: any[]) => any;
reset: (...args: any[]) => any;
set: (arg1?: any) => any;
state: (...args: any[]) => any;
validateState: (arg1?: any) => any;
close: (...args: any[]) => any;
deprecated: (arg1?: any) => any;
error: (arg1?: any) => any;
info: (arg1?: any) => any;
isFatal: boolean;
fatal: (arg1?: any) => any;
open: (arg1?: any) => any;
success: (arg1?: any) => any;
timer: PanelNotificationTimer;
}
interface PanelNotificationTimer {
interval: any;
start: (arg1?: any, arg2?: any) => any;
stop: (...args: any[]) => any;
}
interface PanelSystem {
ascii: Record<string, string>;
csrf: string;
isLocal: boolean;
locales: Record<string, string>;
slugs: Record<string, string>;
title: string;
key: (...args: any[]) => any;
defaults: (...args: any[]) => any;
reset: (...args: any[]) => any;
set: (arg1?: any) => any;
state: (...args: any[]) => any;
validateState: (arg1?: any) => any;
}
interface PanelTranslation {
code: string;
data: Record<string, string>;
direction: string;
name: string;
weekday: number;
key: (...args: any[]) => any;
defaults: (...args: any[]) => any;
reset: (...args: any[]) => any;
set: (arg1?: any) => any;
state: (...args: any[]) => any;
validateState: (arg1?: any) => any;
translate: (arg1?: any, arg2?: any, arg3?: any) => any;
}
interface PanelUser {
email: string;
id: string;
language: string;
role: string;
username: string;
key: (...args: any[]) => any;
defaults: (...args: any[]) => any;
reset: (...args: any[]) => any;
set: (arg1?: any) => any;
state: (...args: any[]) => any;
validateState: (arg1?: any) => any;
}
interface PanelDropdown {
component: any;
isLoading: boolean;
on: PanelDropdownOn;
path: any;
props: PanelDropdownProps;
query: PanelDropdownQuery;
referrer: any;
timestamp: any;
key: (...args: any[]) => any;
defaults: (...args: any[]) => any;
reset: (...args: any[]) => any;
set: (arg1?: any) => any;
state: (...args: any[]) => any;
validateState: (arg1?: any) => any;
addEventListener: (arg1?: any, arg2?: any) => any;
addEventListeners: (arg1?: any) => any;
emit: (arg1?: any, arg2?: any) => any;
hasEventListener: (arg1?: any) => any;
listeners: (...args: any[]) => any;
load: (arg1?: any, arg2?: any) => Promise<any>;
open: (arg1?: any, arg2?: any) => any;
post: (arg1?: any, arg2?: any) => Promise<any>;
refresh: (arg1?: any) => Promise<any>;
reload: (arg1?: any) => Promise<any>;
url: (...args: any[]) => any;
close: (...args: any[]) => any;
openAsync: (arg1?: any, arg2?: any) => any;
options: (...args: any[]) => any;
}
type PanelDropdownOn = Record<string, any>;
type PanelDropdownProps = Record<string, any>;
type PanelDropdownQuery = Record<string, any>;
interface PanelView {
component: string;
isLoading: boolean;
on: PanelViewOn;
path: string;
props: PanelViewProps;
query: any[];
referrer: string;
timestamp: number;
breadcrumb: {
label: string;
link: string;
}[];
breadcrumbLabel: string;
icon: string;
id: string;
link: string;
search: string;
title: string;
key: (...args: any[]) => any;
defaults: (...args: any[]) => any;
reset: (...args: any[]) => any;
set: (arg1?: any) => any;
state: (...args: any[]) => any;
validateState: (arg1?: any) => any;
addEventListener: (arg1?: any, arg2?: any) => any;
addEventListeners: (arg1?: any) => any;
emit: (arg1?: any, arg2?: any) => any;
hasEventListener: (arg1?: any) => any;
listeners: (...args: any[]) => any;
load: (arg1?: any, arg2?: any) => Promise<any>;
open: (arg1?: any, arg2?: any) => Promise<any>;
post: (arg1?: any, arg2?: any) => Promise<any>;
refresh: (arg1?: any) => Promise<any>;
reload: (arg1?: any) => Promise<any>;
url: (...args: any[]) => any;
submit: (...args: any[]) => Promise<any>;
}
type PanelViewOn = Record<string, any>;
interface PanelViewProps {
api: string;
buttons: {
component: string;
key: string;
props: {
class: string;
icon: string;
link: string;
responsive: boolean;
size: string;
target: string;
title: string;
type: string;
variant: string;
};
}[];
id: string;
link: string;
lock: PanelViewPropsLock;
permissions: PanelViewPropsPermissions;
tabs: Record<string, any>[];
uuid: string;
versions: PanelViewPropsVersions;
tab: PanelViewPropsTab;
next: PanelViewPropsNext;
prev: PanelViewPropsPrev;
blueprint: string;
model: PanelViewPropsModel;
title: string;
}
interface PanelViewPropsLock {
isLegacy: boolean;
isLocked: boolean;
modified: any;
user: PanelViewPropsLockUser;
}
interface PanelViewPropsLockUser {
id: string;
email: string;
}
interface PanelViewPropsPermissions {
access: boolean;
changeSlug: boolean;
changeStatus: boolean;
changeTemplate: boolean;
changeTitle: boolean;
create: boolean;
delete: boolean;
duplicate: boolean;
list: boolean;
move: boolean;
preview: boolean;
read: boolean;
sort: boolean;
update: boolean;
}
interface PanelViewPropsVersions {
latest: Record<string, any>;
changes: Record<string, any>;
}
interface PanelViewPropsTab {
label: string;
icon: string;
columns: Record<string, any>[];
link: string;
name: string;
}
interface PanelViewPropsNext {
link: string;
title: string;
}
interface PanelViewPropsPrev {
link: string;
title: string;
}
interface PanelViewPropsModel {
id: string;
link: string;
parent: string;
previewUrl: string;
status: string;
title: string;
uuid: string;
}
interface PanelContent {
cancelSaving: (...args: any[]) => any;
dialog: any;
diff: (arg1?: any) => any;
discard: (arg1?: any) => Promise<any>;
emit: (arg1?: any, arg2?: any, arg3?: any) => any;
env: (arg1?: any) => any;
hasDiff: (arg1?: any) => any;
isCurrent: (arg1?: any) => any;
isLocked: (arg1?: any) => any;
isProcessing: boolean;
lock: (arg1?: any) => any;
lockDialog: (arg1?: any) => any;
merge: (arg1?: any, arg2?: any) => any;
publish: (arg1?: any, arg2?: any) => Promise<any>;
request: (arg1?: any, arg2?: any, arg3?: any) => Promise<any>;
save: (arg1?: any, arg2?: any) => Promise<any>;
saveAbortController: any;
update: (arg1?: any, arg2?: any) => Promise<any>;
updateLazy: (arg1?: any, arg2?: any) => any;
version: (arg1?: any) => any;
versions: (...args: any[]) => any;
saveLazy: (arg1?: any) => any;
}
interface PanelDrawer {
component: any;
isLoading: boolean;
on: PanelDrawerOn;
path: any;
props: PanelDrawerProps;
query: PanelDrawerQuery;
referrer: any;
timestamp: any;
id: any;
key: (...args: any[]) => any;
defaults: (...args: any[]) => any;
reset: (...args: any[]) => any;
set: (arg1?: any) => any;
state: (...args: any[]) => any;
validateState: (arg1?: any) => any;
addEventListener: (arg1?: any, arg2?: any) => any;
addEventListeners: (arg1?: any) => any;
emit: (arg1?: any, arg2?: any) => any;
hasEventListener: (arg1?: any) => any;
listeners: (...args: any[]) => any;
load: (arg1?: any, arg2?: any) => Promise<any>;
open: (arg1?: any, arg2?: any) => Promise<any>;
post: (arg1?: any, arg2?: any) => Promise<any>;
refresh: (arg1?: any) => Promise<any>;
reload: (arg1?: any) => Promise<any>;
url: (...args: any[]) => any;
cancel: (...args: any[]) => Promise<any>;
close: (arg1?: any) => Promise<any>;
focus: (arg1?: any) => any;
input: (arg1?: any) => any;
isOpen: boolean;
submit: (arg1?: any, arg2?: any) => Promise<any>;
success: (arg1?: any) => any;
successEvents: (arg1?: any) => any;
successNotification: (arg1?: any) => any;
successRedirect: (arg1?: any) => any;
value?: any;
breadcrumb: any[];
goTo: (arg1?: any) => any;
history: PanelDrawerHistory;
icon: string;
tab: (arg1?: any) => any;
}
type PanelDrawerOn = Record<string, any>;
type PanelDrawerProps = Record<string, any>;
type PanelDrawerQuery = Record<string, any>;
interface PanelDrawerHistory {
add: (arg1?: any) => any;
at: (arg1?: any) => any;
clear: (...args: any[]) => any;
get: (arg1?: any) => any;
goto: (arg1?: any) => any;
has: (arg1?: any) => any;
index: (arg1?: any) => any;
isEmpty: (...args: any[]) => any;
last: (...args: any[]) => any;
milestones: any[];
remove: (arg1?: any) => any;
removeLast: (...args: any[]) => any;
replace: (arg1?: any, arg2?: any) => any;
}
interface PanelDialog {
component: any;
isLoading: boolean;
on: PanelDialogOn;
path: any;
props: PanelDialogProps;
query: PanelDialogQuery;
referrer: any;
timestamp: any;
legacy: boolean;
ref: any;
key: (...args: any[]) => any;
defaults: (...args: any[]) => any;
reset: (...args: any[]) => any;
set: (arg1?: any) => any;
state: (...args: any[]) => any;
validateState: (arg1?: any) => any;
addEventListener: (arg1?: any, arg2?: any) => any;
addEventListeners: (arg1?: any) => any;
emit: (arg1?: any, arg2?: any) => any;
hasEventListener: (arg1?: any) => any;
listeners: (...args: any[]) => any;
load: (arg1?: any, arg2?: any) => Promise<any>;
open: (arg1?: any, arg2?: any) => Promise<any>;
post: (arg1?: any, arg2?: any) => Promise<any>;
refresh: (arg1?: any) => Promise<any>;
reload: (arg1?: any) => Promise<any>;
url: (...args: any[]) => any;
cancel: (...args: any[]) => Promise<any>;
close: (...args: any[]) => Promise<any>;
focus: (arg1?: any) => any;
input: (arg1?: any) => any;
isOpen: boolean;
submit: (arg1?: any, arg2?: any) => Promise<any>;
success: (arg1?: any) => any;
successEvents: (arg1?: any) => any;
successNotification: (arg1?: any) => any;
successRedirect: (arg1?: any) => any;
value?: any;
openComponent: (arg1?: any) => Promise<any>;
}
type PanelDialogOn = Record<string, any>;
type PanelDialogProps = Record<string, any>;
type PanelDialogQuery = Record<string, any>;
interface PanelPlugins {
resolveComponentExtension: (arg1?: any, arg2?: any, arg3?: any) => any;
resolveComponentMixins: (arg1?: any) => any;
resolveComponentRender: (arg1?: any) => any;
components: Record<string, ComponentPublicInstance>;
created: any[];
icons: Record<string, string>;
login: any;
textareaButtons: Record<string, any>;
thirdParty: PanelPluginsThirdParty;
use: (arg1?: any) => any[];
viewButtons: PanelPluginsViewButtons;
writerMarks: Record<string, any>;
writerNodes: PanelPluginsWriterNodes;
routes: any[];
views: PanelPluginsViews;
}
type PanelPluginsThirdParty = Record<string, any>;
type PanelPluginsViewButtons = Record<string, any>;
type PanelPluginsWriterNodes = Record<string, any>;
type PanelPluginsViews = Record<string, any>;
interface PanelConfig {
api: PanelConfigApi;
debug: boolean;
kirbytext: boolean;
translation: string;
upload: number;
}
interface PanelConfigApi {
methodOverride: boolean;
}
interface PanelPermissions {
access: PanelPermissionsAccess;
files: PanelPermissionsFiles;
languages: PanelPermissionsLanguages;
pages: PanelPermissionsPages;
site: PanelPermissionsSite;
users: PanelPermissionsUsers;
user: PanelPermissionsUser;
}
interface PanelPermissionsAccess {
account: boolean;
languages: boolean;
panel: boolean;
site: boolean;
system: boolean;
users: boolean;
}
interface PanelPermissionsFiles {
access: boolean;
changeName: boolean;
changeTemplate: boolean;
create: boolean;
delete: boolean;
list: boolean;
read: boolean;
replace: boolean;
sort: boolean;
update: boolean;
}
interface PanelPermissionsLanguages {
create: boolean;
delete: boolean;
update: boolean;
}
interface PanelPermissionsPages {
access: boolean;
changeSlug: boolean;
changeStatus: boolean;
changeTemplate: boolean;
changeTitle: boolean;
create: boolean;
delete: boolean;
duplicate: boolean;
list: boolean;
move: boolean;
preview: boolean;
read: boolean;
sort: boolean;
update: boolean;
}
interface PanelPermissionsSite {
changeTitle: boolean;
update: boolean;
}
interface PanelPermissionsUsers {
changeEmail: boolean;
changeLanguage: boolean;
changeName: boolean;
changePassword: boolean;
changeRole: boolean;
create: boolean;
delete: boolean;
update: boolean;
}
interface PanelPermissionsUser {
changeEmail: boolean;
changeLanguage: boolean;
changeName: boolean;
changePassword: boolean;
changeRole: boolean;
delete: boolean;
update: boolean;
}
interface PanelSearches {
pages: PanelSearchesPages;
files: PanelSearchesFiles;
users: PanelSearchesUsers;
}
interface PanelSearchesPages {
icon: string;
label: string;
id: string;
}
interface PanelSearchesFiles {
icon: string;
label: string;
id: string;
}
interface PanelSearchesUsers {
icon: string;
label: string;
id: string;
}
interface PanelUrls {
api: string;
site: string;
}
interface PanelApi {
csrf: string;
endpoint: string;
methodOverride: boolean;
ping: number;
requests: any[];
running: number;
request: (arg1?: any, arg2?: any, arg3?: any) => Promise<any>;
auth: PanelApiAuth;
delete: (arg1?: any, arg2?: any, arg3?: any, arg4?: any) => Promise<any>;
files: PanelApiFiles;
get: (arg1?: any, arg2?: any, arg3?: any, arg4?: any) => Promise<any>;
languages: PanelApiLanguages;
pages: PanelApiPages;
patch: (arg1?: any, arg2?: any, arg3?: any, arg4?: any) => Promise<any>;
post: (arg1?: any, arg2?: any, arg3?: any, arg4?: any, arg5?: any) => Promise<any>;
roles: PanelApiRoles;
system: PanelApiSystem;
site: PanelApiSite;
translations: PanelApiTranslations;
users: PanelApiUsers;
language: string;
}
interface PanelApiAuth {
login: (arg1?: any) => Promise<any>;
logout: (...args: any[]) => Promise<any>;
ping: (...args: any[]) => Promise<any>;
user: (arg1?: any, arg2?: any) => Promise<any>;
verifyCode: (arg1?: any, arg2?: any) => Promise<any>;
}
interface PanelApiFiles {
changeName: (arg1?: any, arg2?: any, arg3?: any) => Promise<any>;
delete: (arg1?: any, arg2?: any) => Promise<any>;
get: (arg1?: any, arg2?: any, arg3?: any) => Promise<any>;
id: (arg1?: any) => any;
link: (arg1?: any, arg2?: any, arg3?: any) => any;
update: (arg1?: any, arg2?: any, arg3?: any) => Promise<any>;
url: (arg1?: any, arg2?: any, arg3?: any) => any;
}
interface PanelApiLanguages {
create: (arg1?: any, arg2?: any) => Promise<any>;
delete: (arg1?: any) => Promise<any>;
get: (arg1?: any) => Promise<any>;
list: (...args: any[]) => Promise<any>;
update: (arg1?: any, arg2?: any) => Promise<any>;
}
interface PanelApiPages {
blueprint: (arg1?: any) => Promise<any>;
blueprints: (arg1?: any, arg2?: any) => Promise<any>;
changeSlug: (arg1?: any, arg2?: any) => Promise<any>;
changeStatus: (arg1?: any, arg2?: any, arg3?: any) => Promise<any>;
changeTemplate: (arg1?: any, arg2?: any) => Promise<any>;
changeTitle: (arg1?: any, arg2?: any) => Promise<any>;
children: (arg1?: any, arg2?: any) => Promise<any>;
create: (arg1?: any, arg2?: any) => Promise<any>;
delete: (arg1?: any, arg2?: any) => Promise<any>;
duplicate: (arg1?: any, arg2?: any, arg3?: any) => Promise<any>;
get: (arg1?: any, arg2?: any) => Promise<any>;
id: (arg1?: any) => any;
files: (arg1?: any, arg2?: any) => Promise<any>;
link: (arg1?: any) => any;
preview: (arg1?: any) => Promise<any>;
search: (arg1?: any, arg2?: any) => Promise<any>;
update: (arg1?: any, arg2?: any) => Promise<any>;
url: (arg1?: any, arg2?: any) => any;
}
interface PanelApiRoles {
list: (arg1?: any, arg2?: any) => Promise<any>;
get: (arg1?: any) => Promise<any>;
}
interface PanelApiSystem {
get: (arg1?: any) => Promise<any>;
install: (arg1?: any, arg2?: any) => Promise<any>;
register: (arg1?: any, arg2?: any) => Promise<any>;
}
interface PanelApiSite {
blueprint: (...args: any[]) => Promise<any>;
blueprints: (...args: any[]) => Promise<any>;
changeTitle: (arg1?: any, arg2?: any) => Promise<any>;
children: (arg1?: any, arg2?: any) => Promise<any>;
get: (arg1?: any) => Promise<any>;
update: (arg1?: any, arg2?: any) => Promise<any>;
}
interface PanelApiTranslations {
list: (...args: any[]) => Promise<any>;
get: (arg1?: any) => Promise<any>;
}
interface PanelApiUsers {
blueprint: (arg1?: any) => Promise<any>;
blueprints: (arg1?: any, arg2?: any) => Promise<any>;
changeEmail: (arg1?: any, arg2?: any) => Promise<any>;
changeLanguage: (arg1?: any, arg2?: any) => Promise<any>;
changeName: (arg1?: any, arg2?: any) => Promise<any>;
changePassword: (arg1?: any, arg2?: any, arg3?: any) => Promise<any>;
changeRole: (arg1?: any, arg2?: any) => Promise<any>;
create: (arg1?: any, arg2?: any) => Promise<any>;
delete: (arg1?: any) => Promise<any>;
deleteAvatar: (arg1?: any) => Promise<any>;
link: (arg1?: any, arg2?: any) => any;
list: (arg1?: any) => Promise<any>;
get: (arg1?: any, arg2?: any) => Promise<any>;
roles: (arg1?: any) => Promise<any>;
search: (arg1?: any, arg2?: any) => Promise<any>;
update: (arg1?: any, arg2?: any) => Promise<any>;
url: (arg1?: any, arg2?: any) => any;
}
/**
* Returns Kirby's Panel API for making HTTP requests to the backend.
*
* @remarks
* This composable is a simple shortcut to `window.panel.api`.
*/
declare function useApi(): PanelApi;
/**
* Returns the main Panel Vue instance.
*
* @remarks
* This composable is a simple shortcut to `window.panel.app`.
*/
declare function useApp(): vue_types_vue.CombinedVueInstance<Vue.default<Record<string, any>, Record<string, any>, never, never, (event: string, ...args: any[]) => Vue.default>, object, object, object, Record<never, any>, {}, Vue.ComponentOptionsMixin, Vue.ComponentOptionsMixin, vue_types_v3_component_public_instance.OptionTypesType<{}, {}, {}, {}, {}, {}>>;
/**
* Provides block methods exposed by the default block component (Options API), which all custom blocks are extending.
* Since Options API methods are not avaiable in Composition API, we need to extract them into a composable.
*
* @see https://github.com/getkirby/kirby/blob/f9f00b16a22fe9dbbbddc2bfd4719ca3437cbee9/panel/src/components/Forms/Blocks/Types/Default.vue#L37
*
* @example
* ```vue
* <script setup>
* import { computed, ref, useApi, usePanel, watch } from "kirbyuse";
*
* // Will inherit props from extended default block
* const props = defineProps({});
* const emit = defineEmits([]);
*
* const { field, open, update } = useBlock(props, emit);
* ```
*/
declare function useBlock(props: Record<string, any>, emit?: (...args: any[]) => void): {
field: (name: string, fallback?: null) => any;
open: () => void;
update: (content: Record<string, any>) => void;
};
declare const isKirby5: () => boolean;
declare const isKirby4: () => boolean;
/**
* Reactive getters and methods to work with content of the current view.
*
* @remarks
* This composable follows the Kirby 5 content API while staying compatible with Kirby 4 (falling back to the Vuex store of Kirby 4).
*/
declare function useContent(): {
content: PanelContent;
currentContent: Vue.ComputedRef<Record<string, any>>;
contentChanges: Vue.ComputedRef<Record<string, any>>;
hasChanges: Vue.ComputedRef<boolean>;
update: (values?: Record<string, any>, save?: boolean) => Promise<void>;
};
/**
* Provides methods to open different types of dialogs.
*/
declare function useDialog(): {
openTextDialog: (text: string) => Promise<boolean>;
openFieldsDialog: (props: {
/** @default "medium" */
size?: string;
submitButton?: string | Record<string, any>;
text?: string;
/**
* Empty state message if no fields are defined
*/
empty?: string;
/**
* An array or object with all available fields
*/
fields?: Record<string, any> | Record<string, any>[];
/**
* An object with all values for the fields
*/
value?: Record<string, any>;
}) => Promise<any>;
};
/**
* Returns translation utility functions.
*
* @remarks
* In most cases, use `window.panel.t` for Kirby's built-in translation function. This composable is useful for custom translation objects, such as those returned by a section's `label` property.
*
* @example
* ```ts
* const { t } = useI18n()
*
* // Simple string
* t("Hello") // -> "Hello"
*
* // Translation object
* t({ en: "Hello", de: "Hallo" }) // -> Returns value based on current Panel language
* ```
*/
declare function useI18n(): {
t: (value?: string | Record<string, string>) => string | undefined;
};
/**
* Returns the reactive Kirby Panel object.
*
* @remarks
* This composable is a simple shortcut to `window.panel`.
*/
declare function usePanel(): Panel;
/**
* Provides section methods for loading section data.
*/
declare function useSection(): {
load: ({ parent, name }: {
parent: string;
name: string;
}) => Promise<any>;
};
type PanelAppStoreState = Record<string, any>;
interface PanelAppStoreGetters {
"content/exists": (arg1?: any, arg2?: any) => any;
"content/hasChanges": (arg1?: any) => any;
"content/isCurrent": () => any;
"content/id": (arg1?: any) => any;
"content/model": (arg1?: any) => any;
"content/originals": (arg1?: any) => any;
"content/values": (arg1?: any) => any;
"content/changes": (arg1?: any) => any;
}
interface PanelAppStore {
state: PanelAppStoreState;
getters: PanelAppStoreGetters;
commit: (arg1: any, arg2: any, arg3: any) => any;
dispatch: (arg1: any, arg2: any) => any;
}
/**
* Returns the Vuex store of the Panel app.
*
* @deprecated The Vuex store is removed in Kirby 5. Use the `useContent` composable instead.
*/
declare function useStore(): Readonly<PanelAppStore>;
export { useApp as a, useBlock as b, isKirby4 as c, useContent as d, useDialog as e, useI18n as f, usePanel as g, useSection as h, isKirby5 as i, useStore as j, useApi as u };
export type { Panel as P };