@blocklet/ui-react 3.0.7 → 3.0.9
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/lib/@types/index.d.ts +204 -3
- package/lib/BlockletStudio/index.d.ts +27 -26
- package/lib/ComponentInstaller/index.d.ts +15 -15
- package/lib/ComponentInstaller/installer-item.d.ts +10 -10
- package/lib/ComponentInstaller/locales.d.ts +2 -2
- package/lib/ComponentInstaller/use-component-installed.d.ts +2 -2
- package/lib/ComponentManager/components/add-component.d.ts +16 -13
- package/lib/ComponentManager/components/check-component.d.ts +2 -2
- package/lib/ComponentManager/components/publish-component.d.ts +10 -7
- package/lib/ComponentManager/components/resource-dialog.d.ts +13 -11
- package/lib/ComponentManager/index.d.ts +3 -4
- package/lib/ComponentManager/libs/locales.d.ts +14 -19
- package/lib/Dashboard/index.d.ts +16 -13
- package/lib/Footer/brand.d.ts +8 -8
- package/lib/Footer/copyright.d.ts +7 -7
- package/lib/Footer/index.d.ts +2 -2
- package/lib/Footer/internal-footer.d.ts +25 -22
- package/lib/Footer/layout/plain.d.ts +15 -12
- package/lib/Footer/layout/row.d.ts +7 -7
- package/lib/Footer/layout/standard.d.ts +16 -13
- package/lib/Footer/links.d.ts +15 -12
- package/lib/Footer/social-media.d.ts +8 -8
- package/lib/Header/index.d.ts +23 -13
- package/lib/Icon/index.d.ts +9 -7
- package/lib/Notifications/Snackbar.d.ts +16 -8
- package/lib/Notifications/hooks/use-title.d.ts +48 -9
- package/lib/Notifications/hooks/use-width.d.ts +2 -2
- package/lib/Notifications/utils.d.ts +69 -9
- package/lib/UserCenter/components/config-inviter.d.ts +4 -4
- package/lib/UserCenter/components/config-profile.d.ts +5 -5
- package/lib/UserCenter/components/danger-zone.d.ts +1 -2
- package/lib/UserCenter/components/editable-field.d.ts +34 -30
- package/lib/UserCenter/components/nft.d.ts +4 -4
- package/lib/UserCenter/components/notification.d.ts +5 -5
- package/lib/UserCenter/components/passport.d.ts +5 -5
- package/lib/UserCenter/components/privacy.d.ts +11 -5
- package/lib/UserCenter/components/settings.d.ts +10 -8
- package/lib/UserCenter/components/status-dialog/date-picker.d.ts +10 -9
- package/lib/UserCenter/components/status-dialog/index.d.ts +12 -9
- package/lib/UserCenter/components/status-selector/duration-menu.d.ts +7 -7
- package/lib/UserCenter/components/status-selector/index.d.ts +9 -8
- package/lib/UserCenter/components/status-selector/menu-item.d.ts +24 -9
- package/lib/UserCenter/components/storage/action.d.ts +9 -7
- package/lib/UserCenter/components/storage/connected.d.ts +5 -4
- package/lib/UserCenter/components/storage/delete.d.ts +6 -5
- package/lib/UserCenter/components/storage/disconnect.d.ts +2 -2
- package/lib/UserCenter/components/storage/index.d.ts +2 -2
- package/lib/UserCenter/components/storage/preview-nft.d.ts +5 -5
- package/lib/UserCenter/components/third-party-login/index.d.ts +4 -4
- package/lib/UserCenter/components/third-party-login/third-party-item.d.ts +13 -4
- package/lib/UserCenter/components/user-center.d.ts +16 -15
- package/lib/UserCenter/components/user-info/address.d.ts +16 -7
- package/lib/UserCenter/components/user-info/index.d.ts +4 -5
- package/lib/UserCenter/components/user-info/link-preview-input.d.ts +5 -6
- package/lib/UserCenter/components/user-info/metadata.d.ts +10 -7
- package/lib/UserCenter/components/user-info/switch-role.d.ts +7 -6
- package/lib/UserCenter/components/user-info/timezone-select.d.ts +8 -7
- package/lib/UserCenter/components/user-info/user-basic-info.d.ts +13 -12
- package/lib/UserCenter/components/user-info/user-info-item.d.ts +11 -6
- package/lib/UserCenter/components/user-info/user-info.d.ts +6 -6
- package/lib/UserCenter/components/user-info/user-status.d.ts +9 -9
- package/lib/UserCenter/components/user-info/utils.d.ts +33 -15
- package/lib/UserCenter/components/webhook-item.d.ts +2 -10
- package/lib/UserCenter/index.d.ts +1 -2
- package/lib/UserCenter/libs/locales.d.ts +345 -513
- package/lib/UserCenter/libs/utils.d.ts +4 -3
- package/lib/UserSessions/components/user-session-info.d.ts +5 -5
- package/lib/UserSessions/components/user-sessions.d.ts +20 -8
- package/lib/UserSessions/index.d.ts +1 -2
- package/lib/UserSessions/libs/locales.d.ts +60 -88
- package/lib/UserSessions/libs/utils.d.ts +2 -3
- package/lib/blocklets.d.ts +9 -10
- package/lib/common/domain-warning.d.ts +7 -7
- package/lib/common/header-addons.d.ts +9 -9
- package/lib/common/link-blocker.d.ts +6 -3
- package/lib/common/notification-addon.d.ts +6 -6
- package/lib/common/overridable-theme-provider.d.ts +10 -7
- package/lib/common/wallet-hidden-topbar.d.ts +1 -2
- package/lib/common/ws.d.ts +3 -4
- package/lib/contexts/config-user-space.d.ts +27 -7
- package/lib/hooks/use-mobile.d.ts +3 -3
- package/lib/index.d.ts +10 -12
- package/lib/libs/client.d.ts +2 -3
- package/lib/libs/constant.d.ts +1 -2
- package/lib/libs/spaces.d.ts +2 -3
- package/lib/libs/with-hide-when-embed.d.ts +2 -3
- package/lib/types.d.ts +31 -32
- package/lib/utils.d.ts +10 -11
- package/package.json +9 -9
- package/lib/UserCenter/components/storage/icons/empty-spaces-nft.svg.d.ts +0 -3
package/lib/@types/index.d.ts
CHANGED
|
@@ -1,3 +1,204 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { Axios } from 'axios';
|
|
2
|
+
import { UserPublicInfo } from '@blocklet/js-sdk';
|
|
3
|
+
import { OAUTH_PROVIDER } from '@arcblock/ux/lib/Util/constant';
|
|
4
|
+
import { CloseConnect, OpenConnect } from '@arcblock/did-connect/lib/types';
|
|
5
|
+
export type SessionContext = {
|
|
6
|
+
session: Session;
|
|
7
|
+
api: Axios;
|
|
8
|
+
connectApi: {
|
|
9
|
+
open: OpenConnect;
|
|
10
|
+
close: CloseConnect;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
export type OAuthAccount = {
|
|
14
|
+
provider: keyof typeof OAUTH_PROVIDER;
|
|
15
|
+
id: string;
|
|
16
|
+
did: string;
|
|
17
|
+
pk: string;
|
|
18
|
+
lastLoginAt: string;
|
|
19
|
+
firstLoginAt: string;
|
|
20
|
+
order?: number;
|
|
21
|
+
userInfo?: {
|
|
22
|
+
email: string;
|
|
23
|
+
emailVerified: boolean;
|
|
24
|
+
name: string;
|
|
25
|
+
picture: string;
|
|
26
|
+
sub: string;
|
|
27
|
+
extraData: Object;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
export type WalletAccount = {
|
|
31
|
+
provider: 'wallet';
|
|
32
|
+
did: string;
|
|
33
|
+
pk: string;
|
|
34
|
+
lastLoginAt: string;
|
|
35
|
+
firstLoginAt: string;
|
|
36
|
+
};
|
|
37
|
+
export type NFTAccount = {
|
|
38
|
+
provider: 'nft';
|
|
39
|
+
did: string;
|
|
40
|
+
pk: string;
|
|
41
|
+
owner: string;
|
|
42
|
+
lastLoginAt: string;
|
|
43
|
+
firstLoginAt: string;
|
|
44
|
+
};
|
|
45
|
+
export type ConnectedAccount = OAuthAccount | WalletAccount | NFTAccount;
|
|
46
|
+
export type UserMetadataLink = {
|
|
47
|
+
url: string;
|
|
48
|
+
favicon?: string;
|
|
49
|
+
};
|
|
50
|
+
export declare enum DurationEnum {
|
|
51
|
+
NoClear = "no_clear",
|
|
52
|
+
ThirtyMinutes = "30_minutes",
|
|
53
|
+
OneHour = "1_hour",
|
|
54
|
+
FourHours = "4_hours",
|
|
55
|
+
Today = "today",
|
|
56
|
+
ThisWeek = "this_week",
|
|
57
|
+
Custom = "custom"
|
|
58
|
+
}
|
|
59
|
+
export declare enum StatusEnum {
|
|
60
|
+
Meeting = "meeting",
|
|
61
|
+
Community = "community",
|
|
62
|
+
Holiday = "holiday",
|
|
63
|
+
OffSick = "off_sick",
|
|
64
|
+
WorkingRemotely = "working_remotely"
|
|
65
|
+
}
|
|
66
|
+
export type UserPhoneProps = {
|
|
67
|
+
country: string;
|
|
68
|
+
phoneNumber?: string;
|
|
69
|
+
};
|
|
70
|
+
export type UserMetadata = {
|
|
71
|
+
bio?: string;
|
|
72
|
+
location?: string;
|
|
73
|
+
timezone?: string;
|
|
74
|
+
joinedAt?: string;
|
|
75
|
+
status?: {
|
|
76
|
+
value: string;
|
|
77
|
+
duration?: DurationEnum;
|
|
78
|
+
dateRange?: Date[];
|
|
79
|
+
};
|
|
80
|
+
links?: UserMetadataLink[];
|
|
81
|
+
cover?: string;
|
|
82
|
+
email?: string;
|
|
83
|
+
phone?: UserPhoneProps;
|
|
84
|
+
};
|
|
85
|
+
export type UserAddress = {
|
|
86
|
+
country?: string;
|
|
87
|
+
province?: string;
|
|
88
|
+
city?: string;
|
|
89
|
+
line1?: string;
|
|
90
|
+
line2?: string;
|
|
91
|
+
postalCode?: string;
|
|
92
|
+
};
|
|
93
|
+
export type User = UserPublicInfo & {
|
|
94
|
+
role: string;
|
|
95
|
+
email?: string;
|
|
96
|
+
phone?: string;
|
|
97
|
+
sourceProvider?: string;
|
|
98
|
+
sourceAppPid?: string;
|
|
99
|
+
lastLoginAt?: string;
|
|
100
|
+
lastLoginIp?: string;
|
|
101
|
+
createdAt?: string;
|
|
102
|
+
passports?: any[];
|
|
103
|
+
didSpace?: Record<string, any>;
|
|
104
|
+
connectedAccounts?: any[];
|
|
105
|
+
locale?: string;
|
|
106
|
+
url: string;
|
|
107
|
+
inviter?: string;
|
|
108
|
+
emailVerified?: boolean;
|
|
109
|
+
phoneVerified?: boolean;
|
|
110
|
+
metadata?: UserMetadata;
|
|
111
|
+
address?: UserAddress;
|
|
112
|
+
};
|
|
113
|
+
export type UserCenterTab = {
|
|
114
|
+
value: string;
|
|
115
|
+
label: string;
|
|
116
|
+
url: string;
|
|
117
|
+
protected: boolean;
|
|
118
|
+
icon?: string;
|
|
119
|
+
isPrivate?: boolean;
|
|
120
|
+
};
|
|
121
|
+
export type Session = {
|
|
122
|
+
loading: boolean;
|
|
123
|
+
initialized: boolean;
|
|
124
|
+
user?: User;
|
|
125
|
+
login: any;
|
|
126
|
+
logout: any;
|
|
127
|
+
switch: any;
|
|
128
|
+
switchDid: any;
|
|
129
|
+
refreshProfile: () => Promise<void>;
|
|
130
|
+
switchProfile: any;
|
|
131
|
+
switchPassport: any;
|
|
132
|
+
refresh: Function;
|
|
133
|
+
useOAuth: Function;
|
|
134
|
+
usePasskey: Function;
|
|
135
|
+
};
|
|
136
|
+
export type WebhookType = 'slack' | 'api';
|
|
137
|
+
export type WebhookItemData = {
|
|
138
|
+
type: WebhookType;
|
|
139
|
+
url: string;
|
|
140
|
+
};
|
|
141
|
+
export type WebhookItemProps = {
|
|
142
|
+
onTest: (params: WebhookItemData) => void;
|
|
143
|
+
onSave: (params: WebhookItemData) => void;
|
|
144
|
+
onDelete?: (params: WebhookItemData) => void;
|
|
145
|
+
onCancel?: () => void;
|
|
146
|
+
edit: boolean;
|
|
147
|
+
type?: WebhookType;
|
|
148
|
+
url?: string;
|
|
149
|
+
};
|
|
150
|
+
export type CreatePassportProps = {
|
|
151
|
+
issuer: string;
|
|
152
|
+
title: string;
|
|
153
|
+
issuerDid: string;
|
|
154
|
+
issuerAvatarUrl: string;
|
|
155
|
+
ownerDid: string;
|
|
156
|
+
ownerName?: string;
|
|
157
|
+
ownerAvatarUrl: string;
|
|
158
|
+
preferredColor?: string;
|
|
159
|
+
revoked?: boolean;
|
|
160
|
+
isDataUrl?: boolean;
|
|
161
|
+
width?: string;
|
|
162
|
+
height?: string;
|
|
163
|
+
scope?: string;
|
|
164
|
+
role?: string;
|
|
165
|
+
display?: {
|
|
166
|
+
type: string;
|
|
167
|
+
content: string;
|
|
168
|
+
};
|
|
169
|
+
};
|
|
170
|
+
export type BlockletMetaProps = {
|
|
171
|
+
appLogo?: React.ReactNode;
|
|
172
|
+
appName?: string;
|
|
173
|
+
theme?: {
|
|
174
|
+
background?: string;
|
|
175
|
+
};
|
|
176
|
+
enableConnect?: boolean;
|
|
177
|
+
enableLocale?: boolean;
|
|
178
|
+
navigation?: Array<{
|
|
179
|
+
title?: string | object;
|
|
180
|
+
link?: string | object;
|
|
181
|
+
icon?: string;
|
|
182
|
+
items?: Array<{
|
|
183
|
+
title?: string | object;
|
|
184
|
+
link?: string | object;
|
|
185
|
+
}>;
|
|
186
|
+
}>;
|
|
187
|
+
};
|
|
188
|
+
export type SessionManagerProps = {
|
|
189
|
+
showText?: boolean;
|
|
190
|
+
showRole?: boolean;
|
|
191
|
+
switchDid?: boolean;
|
|
192
|
+
switchProfile?: boolean;
|
|
193
|
+
switchPassport?: boolean;
|
|
194
|
+
disableLogout?: boolean;
|
|
195
|
+
onLogin?: () => void;
|
|
196
|
+
onLogout?: () => void;
|
|
197
|
+
onSwitchDid?: () => void;
|
|
198
|
+
onSwitchProfile?: () => void;
|
|
199
|
+
onSwitchPassport?: () => void;
|
|
200
|
+
menu?: any[];
|
|
201
|
+
menuRender?: () => void;
|
|
202
|
+
dark?: boolean;
|
|
203
|
+
size?: number;
|
|
204
|
+
};
|
|
@@ -1,26 +1,27 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
1
|
+
interface BlockletStudioProps {
|
|
2
|
+
open: boolean;
|
|
3
|
+
setOpen: (open: boolean) => void;
|
|
4
|
+
onOpened?: () => void;
|
|
5
|
+
componentDid: string;
|
|
6
|
+
tenantScope?: string;
|
|
7
|
+
resourcesParams?: Record<string, any>;
|
|
8
|
+
mode?: string;
|
|
9
|
+
title?: string;
|
|
10
|
+
logo?: string;
|
|
11
|
+
description?: string;
|
|
12
|
+
introduction?: string;
|
|
13
|
+
note?: string;
|
|
14
|
+
onUploaded?: (data: unknown) => void;
|
|
15
|
+
onReleased?: (data: unknown) => void;
|
|
16
|
+
onConnected?: (data: unknown) => void;
|
|
17
|
+
components?: Record<string, unknown>[];
|
|
18
|
+
resources?: Record<string, unknown>;
|
|
19
|
+
componentsTitle?: string;
|
|
20
|
+
resourcesTitle?: string;
|
|
21
|
+
style?: React.CSSProperties;
|
|
22
|
+
zIndex?: number;
|
|
23
|
+
dependentComponentsMode?: 'auto' | 'readonly';
|
|
24
|
+
[key: string]: any;
|
|
25
|
+
}
|
|
26
|
+
declare function BlockletStudio({ open, setOpen, onOpened, componentDid, tenantScope, resourcesParams, mode, title, logo, description, introduction, note, componentsTitle, resourcesTitle, onUploaded, onReleased, onConnected, components, resources, style, zIndex, dependentComponentsMode, ...rest }: BlockletStudioProps): import("react/jsx-runtime").JSX.Element | null;
|
|
27
|
+
export default BlockletStudio;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { default as
|
|
2
|
-
|
|
3
|
-
declare
|
|
4
|
-
declare namespace G {
|
|
1
|
+
import { default as PropTypes } from 'prop-types';
|
|
2
|
+
declare function WrapComponentInstaller(props: any): any;
|
|
3
|
+
declare namespace WrapComponentInstaller {
|
|
5
4
|
namespace propTypes {
|
|
6
|
-
let children:
|
|
7
|
-
let disabled:
|
|
8
|
-
let warnIcon:
|
|
9
|
-
let did:
|
|
10
|
-
let noPermissionMute:
|
|
11
|
-
let onInstalled:
|
|
12
|
-
let onError:
|
|
13
|
-
let closeByOutSize:
|
|
14
|
-
let onClose:
|
|
15
|
-
let fallback:
|
|
16
|
-
let roles:
|
|
5
|
+
let children: PropTypes.Validator<any>;
|
|
6
|
+
let disabled: PropTypes.Requireable<boolean>;
|
|
7
|
+
let warnIcon: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
8
|
+
let did: PropTypes.Validator<NonNullable<NonNullable<string | (string | null | undefined)[] | null | undefined>>>;
|
|
9
|
+
let noPermissionMute: PropTypes.Requireable<boolean>;
|
|
10
|
+
let onInstalled: PropTypes.Requireable<(...args: any[]) => any>;
|
|
11
|
+
let onError: PropTypes.Requireable<(...args: any[]) => any>;
|
|
12
|
+
let closeByOutSize: PropTypes.Requireable<boolean>;
|
|
13
|
+
let onClose: PropTypes.Requireable<(...args: any[]) => any>;
|
|
14
|
+
let fallback: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
15
|
+
let roles: PropTypes.Requireable<any[]>;
|
|
17
16
|
}
|
|
18
17
|
}
|
|
18
|
+
export default WrapComponentInstaller;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { default as
|
|
2
|
-
|
|
3
|
-
declare function I({ optionalComponent: e, index: h, installStatus: l, hasPermission: f, t: c }: {
|
|
1
|
+
import { default as PropTypes } from 'prop-types';
|
|
2
|
+
declare function InstallerItem({ optionalComponent, index, installStatus, hasPermission, t }: {
|
|
4
3
|
optionalComponent: any;
|
|
5
4
|
index: any;
|
|
6
5
|
installStatus?: string | undefined;
|
|
7
6
|
hasPermission: any;
|
|
8
7
|
t: any;
|
|
9
|
-
}): import(
|
|
10
|
-
declare namespace
|
|
8
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
declare namespace InstallerItem {
|
|
11
10
|
namespace propTypes {
|
|
12
|
-
let t:
|
|
13
|
-
let optionalComponent:
|
|
14
|
-
let index:
|
|
15
|
-
let installStatus:
|
|
16
|
-
let hasPermission:
|
|
11
|
+
let t: PropTypes.Validator<(...args: any[]) => any>;
|
|
12
|
+
let optionalComponent: PropTypes.Validator<object>;
|
|
13
|
+
let index: PropTypes.Validator<number>;
|
|
14
|
+
let installStatus: PropTypes.Requireable<string>;
|
|
15
|
+
let hasPermission: PropTypes.Validator<boolean>;
|
|
17
16
|
}
|
|
18
17
|
}
|
|
18
|
+
export default InstallerItem;
|
|
@@ -1,13 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
componentDid:
|
|
4
|
-
resourceType?:
|
|
5
|
-
resourceDid?:
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
onComplete:
|
|
11
|
-
onClose:
|
|
12
|
-
render?:
|
|
13
|
-
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
export default function AddComponent({ componentDid, resourceType, resourceDid, grantedRoles, autoClose, selectedMeta, storeUrl, onComplete, onClose, render, }: {
|
|
3
|
+
componentDid: string;
|
|
4
|
+
resourceType?: string;
|
|
5
|
+
resourceDid?: string;
|
|
6
|
+
autoClose?: boolean;
|
|
7
|
+
selectedMeta?: any;
|
|
8
|
+
storeUrl?: string;
|
|
9
|
+
grantedRoles?: string[];
|
|
10
|
+
onComplete: () => void;
|
|
11
|
+
onClose: () => void;
|
|
12
|
+
render?: ({ onClick, loading }: {
|
|
13
|
+
onClick: () => void;
|
|
14
|
+
loading: boolean;
|
|
15
|
+
}) => ReactElement<any>;
|
|
16
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { default as
|
|
2
|
-
export
|
|
1
|
+
import { default as CheckComponent } from '../../ComponentInstaller';
|
|
2
|
+
export default CheckComponent;
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
componentDid:
|
|
4
|
-
grantedRoles?:
|
|
5
|
-
onClose:
|
|
6
|
-
render?:
|
|
7
|
-
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
export default function PublishComponent({ componentDid, grantedRoles, onClose, render, }: {
|
|
3
|
+
componentDid: string;
|
|
4
|
+
grantedRoles?: string[];
|
|
5
|
+
onClose: () => void;
|
|
6
|
+
render?: ({ onClick, loading }: {
|
|
7
|
+
onClick: () => void;
|
|
8
|
+
loading: boolean;
|
|
9
|
+
}) => ReactElement<any>;
|
|
10
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
open?: boolean
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
onClose?: (
|
|
9
|
-
onComplete?: (
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
declare const _default: import('react').ForwardRefExoticComponent<{
|
|
2
|
+
src: string;
|
|
3
|
+
componentDid: string;
|
|
4
|
+
open?: boolean;
|
|
5
|
+
loading?: boolean;
|
|
6
|
+
storeUrl?: string;
|
|
7
|
+
onLoad?: () => void;
|
|
8
|
+
onClose?: () => void;
|
|
9
|
+
onComplete?: () => void;
|
|
10
|
+
} & import('react').RefAttributes<{
|
|
11
|
+
selectBlocklet: (blockletMeta: any) => void;
|
|
12
|
+
}>>;
|
|
13
|
+
export default _default;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export { f as AddComponent, n as CheckComponent, t as PublishComponent };
|
|
1
|
+
export { default as PublishComponent } from './components/publish-component';
|
|
2
|
+
export { default as AddComponent } from './components/add-component';
|
|
3
|
+
export { default as CheckComponent } from './components/check-component';
|
|
@@ -1,19 +1,14 @@
|
|
|
1
|
-
export
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
export { noPermission_1 as noPermission };
|
|
16
|
-
let needLogin_1: string;
|
|
17
|
-
export { needLogin_1 as needLogin };
|
|
18
|
-
}
|
|
19
|
-
}
|
|
1
|
+
export declare const translations: {
|
|
2
|
+
zh: {
|
|
3
|
+
importResource: string;
|
|
4
|
+
exportResource: string;
|
|
5
|
+
noPermission: string;
|
|
6
|
+
needLogin: string;
|
|
7
|
+
};
|
|
8
|
+
en: {
|
|
9
|
+
importResource: string;
|
|
10
|
+
exportResource: string;
|
|
11
|
+
noPermission: string;
|
|
12
|
+
needLogin: string;
|
|
13
|
+
};
|
|
14
|
+
};
|
package/lib/Dashboard/index.d.ts
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
import { BlockletMetaProps
|
|
2
|
-
import { default as
|
|
3
|
-
export
|
|
4
|
-
|
|
1
|
+
import { BlockletMetaProps, SessionManagerProps } from '../types';
|
|
2
|
+
import { default as PropTypes } from 'prop-types';
|
|
3
|
+
export default Dashboard;
|
|
4
|
+
/**
|
|
5
|
+
* 专门用于 (composable) blocklet 的 Dashboard 组件, 解析 blocklet meta 中 section 为 dashboard 的 navigation 数据, 渲染一个 UX Dashboard
|
|
6
|
+
*/
|
|
7
|
+
declare function Dashboard({ meta, fallbackUrl, invalidPathFallback, headerAddons, sessionManagerProps, links, showDomainWarningDialog, ...rest }: {
|
|
5
8
|
[x: string]: any;
|
|
6
9
|
meta?: {} | undefined;
|
|
7
10
|
fallbackUrl?: any;
|
|
@@ -13,15 +16,15 @@ declare function K({ meta: l, fallbackUrl: c, invalidPathFallback: d, headerAddo
|
|
|
13
16
|
} | undefined;
|
|
14
17
|
links?: any[] | undefined;
|
|
15
18
|
showDomainWarningDialog?: boolean | undefined;
|
|
16
|
-
}): import(
|
|
17
|
-
declare namespace
|
|
19
|
+
}): import("react/jsx-runtime").JSX.Element | null;
|
|
20
|
+
declare namespace Dashboard {
|
|
18
21
|
namespace propTypes {
|
|
19
|
-
export {
|
|
20
|
-
export let fallbackUrl:
|
|
21
|
-
export let invalidPathFallback:
|
|
22
|
-
export let headerAddons:
|
|
23
|
-
export {
|
|
24
|
-
export let links:
|
|
25
|
-
export let showDomainWarningDialog:
|
|
22
|
+
export { BlockletMetaProps as meta };
|
|
23
|
+
export let fallbackUrl: PropTypes.Requireable<string>;
|
|
24
|
+
export let invalidPathFallback: PropTypes.Requireable<(...args: any[]) => any>;
|
|
25
|
+
export let headerAddons: PropTypes.Requireable<NonNullable<PropTypes.ReactNodeLike | ((...args: any[]) => any)>>;
|
|
26
|
+
export { SessionManagerProps as sessionManagerProps };
|
|
27
|
+
export let links: PropTypes.Requireable<NonNullable<any[] | ((...args: any[]) => any) | null | undefined>>;
|
|
28
|
+
export let showDomainWarningDialog: PropTypes.Requireable<boolean>;
|
|
26
29
|
}
|
|
27
30
|
}
|
package/lib/Footer/brand.d.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { default as
|
|
2
|
-
|
|
3
|
-
declare function p({ name: e, logo: t, description: r, ...a }: {
|
|
1
|
+
import { default as PropTypes } from 'prop-types';
|
|
2
|
+
declare function Brand({ name, logo, description, ...rest }: {
|
|
4
3
|
[x: string]: any;
|
|
5
4
|
name?: string | undefined;
|
|
6
5
|
logo?: string | undefined;
|
|
7
6
|
description?: string | undefined;
|
|
8
|
-
}): import(
|
|
9
|
-
declare namespace
|
|
7
|
+
}): import("react/jsx-runtime").JSX.Element | null;
|
|
8
|
+
declare namespace Brand {
|
|
10
9
|
namespace propTypes {
|
|
11
|
-
let name:
|
|
12
|
-
let logo:
|
|
13
|
-
let description:
|
|
10
|
+
let name: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
11
|
+
let logo: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
12
|
+
let description: PropTypes.Requireable<string>;
|
|
14
13
|
}
|
|
15
14
|
}
|
|
15
|
+
export default Brand;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { default as
|
|
2
|
-
|
|
3
|
-
declare function n({ owner: t, year: e, ...o }: {
|
|
1
|
+
import { default as PropTypes } from 'prop-types';
|
|
2
|
+
declare function Copyright({ owner, year, ...rest }: {
|
|
4
3
|
[x: string]: any;
|
|
5
4
|
owner?: string | undefined;
|
|
6
5
|
year?: string | undefined;
|
|
7
|
-
}): import(
|
|
8
|
-
declare namespace
|
|
6
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
declare namespace Copyright {
|
|
9
8
|
namespace propTypes {
|
|
10
|
-
let owner:
|
|
11
|
-
let year:
|
|
9
|
+
let owner: PropTypes.Requireable<string>;
|
|
10
|
+
let year: PropTypes.Requireable<string>;
|
|
12
11
|
}
|
|
13
12
|
}
|
|
13
|
+
export default Copyright;
|
package/lib/Footer/index.d.ts
CHANGED
|
@@ -1,31 +1,34 @@
|
|
|
1
|
-
import { default as
|
|
2
|
-
export
|
|
3
|
-
|
|
1
|
+
import { default as PropTypes } from 'prop-types';
|
|
2
|
+
export default InternalFooter;
|
|
3
|
+
/**
|
|
4
|
+
* 通用的内部 footer 组件, 定义并渲染常见的几种 footer 元素: brand/navigation/social medial 等
|
|
5
|
+
*/
|
|
6
|
+
declare function InternalFooter({ ...props }: {
|
|
4
7
|
[x: string]: any;
|
|
5
|
-
}): import(
|
|
6
|
-
declare namespace
|
|
8
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
declare namespace InternalFooter {
|
|
7
10
|
namespace propTypes {
|
|
8
|
-
let brand:
|
|
9
|
-
name:
|
|
10
|
-
description:
|
|
11
|
-
logo:
|
|
11
|
+
let brand: PropTypes.Requireable<PropTypes.InferProps<{
|
|
12
|
+
name: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
13
|
+
description: PropTypes.Requireable<string>;
|
|
14
|
+
logo: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
12
15
|
}>>;
|
|
13
|
-
let navigation:
|
|
14
|
-
label:
|
|
15
|
-
link:
|
|
16
|
+
let navigation: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
17
|
+
label: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
18
|
+
link: PropTypes.Requireable<string>;
|
|
16
19
|
}> | null | undefined)[]>;
|
|
17
|
-
let socialMedia:
|
|
18
|
-
icon:
|
|
19
|
-
link:
|
|
20
|
+
let socialMedia: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
21
|
+
icon: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
22
|
+
link: PropTypes.Requireable<string>;
|
|
20
23
|
}> | null | undefined)[]>;
|
|
21
|
-
let copyright:
|
|
22
|
-
owner:
|
|
23
|
-
year:
|
|
24
|
+
let copyright: PropTypes.Requireable<PropTypes.InferProps<{
|
|
25
|
+
owner: PropTypes.Requireable<string>;
|
|
26
|
+
year: PropTypes.Requireable<NonNullable<string | number | null | undefined>>;
|
|
24
27
|
}>>;
|
|
25
|
-
let links:
|
|
26
|
-
label:
|
|
27
|
-
link:
|
|
28
|
+
let links: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
29
|
+
label: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
30
|
+
link: PropTypes.Requireable<string>;
|
|
28
31
|
}> | null | undefined)[]>;
|
|
29
|
-
let layout:
|
|
32
|
+
let layout: PropTypes.Requireable<string>;
|
|
30
33
|
}
|
|
31
34
|
}
|