@yimingliao/cms 0.0.123 → 0.0.125
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-PGSXI4GD.js → chunk-PXWRSEQ7.js} +38 -30
- package/dist/client/index.js +1 -1
- package/dist/index.d.ts +73 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -111,35 +111,6 @@ var KEYS = {
|
|
|
111
111
|
email: EMAIL_KEYS
|
|
112
112
|
};
|
|
113
113
|
|
|
114
|
-
// src/constants/cache-keys.ts
|
|
115
|
-
var CACHE_KEYS = {
|
|
116
|
-
// ----------------------------------------------------------------
|
|
117
|
-
// shared
|
|
118
|
-
// ----------------------------------------------------------------
|
|
119
|
-
findFull: "find-full",
|
|
120
|
-
findWithSeoMetadata: "find-with-seo-metadata",
|
|
121
|
-
// Only use in Post
|
|
122
|
-
findMany: (key) => `${key}|find-many`,
|
|
123
|
-
findListCards: (key) => `${key}|find-list-cards`,
|
|
124
|
-
findBySlug: (key) => `${key}|find-by-slug`,
|
|
125
|
-
// ----------------------------------------------------------------
|
|
126
|
-
// auth
|
|
127
|
-
// ----------------------------------------------------------------
|
|
128
|
-
auth: { verify: "auth|verify" },
|
|
129
|
-
// Don't clear this ! (also use in useCommand)
|
|
130
|
-
// ----------------------------------------------------------------
|
|
131
|
-
// folder
|
|
132
|
-
// ----------------------------------------------------------------
|
|
133
|
-
folder: {
|
|
134
|
-
findByKey: "folder|find-by-key"
|
|
135
|
-
// use in File Manager
|
|
136
|
-
}
|
|
137
|
-
};
|
|
138
|
-
|
|
139
|
-
// src/constants/anchor.ts
|
|
140
|
-
var NEW_TAB_TARGET = "_blank";
|
|
141
|
-
var NEW_TAB_REL = "noopener noreferrer";
|
|
142
|
-
|
|
143
114
|
// src/constants/paths/cms-path.ts
|
|
144
115
|
var CMS_PATH = "/cms";
|
|
145
116
|
|
|
@@ -222,4 +193,41 @@ var PATHS = {
|
|
|
222
193
|
resources: RESOURCES_PATHS
|
|
223
194
|
};
|
|
224
195
|
|
|
225
|
-
|
|
196
|
+
// src/constants/cache-keys.ts
|
|
197
|
+
var CACHE_KEYS = {
|
|
198
|
+
// ----------------------------------------------------------------
|
|
199
|
+
// shared
|
|
200
|
+
// ----------------------------------------------------------------
|
|
201
|
+
findFull: "find-full",
|
|
202
|
+
findWithSeoMetadata: "find-with-seo-metadata",
|
|
203
|
+
// Only use in Post
|
|
204
|
+
findMany: (key) => `${key}|find-many`,
|
|
205
|
+
findListCards: (key) => `${key}|find-list-cards`,
|
|
206
|
+
findBySlug: (key) => `${key}|find-by-slug`,
|
|
207
|
+
// ----------------------------------------------------------------
|
|
208
|
+
// auth
|
|
209
|
+
// ----------------------------------------------------------------
|
|
210
|
+
auth: { verify: "auth|verify" },
|
|
211
|
+
// Don't clear this ! (also use in useCommand)
|
|
212
|
+
// ----------------------------------------------------------------
|
|
213
|
+
// folder
|
|
214
|
+
// ----------------------------------------------------------------
|
|
215
|
+
folder: {
|
|
216
|
+
findByKey: "folder|find-by-key"
|
|
217
|
+
// use in File Manager
|
|
218
|
+
}
|
|
219
|
+
};
|
|
220
|
+
|
|
221
|
+
// src/constants/anchor.ts
|
|
222
|
+
var NEW_TAB_TARGET = "_blank";
|
|
223
|
+
var NEW_TAB_REL = "noopener noreferrer";
|
|
224
|
+
|
|
225
|
+
// src/constants/redirect-paths.ts
|
|
226
|
+
var PROTECTED_PATHS = [PATHS.main.dashboard.path];
|
|
227
|
+
var LOGGED_IN_SKIP_PATHS = [
|
|
228
|
+
PATHS.auth.signIn.path,
|
|
229
|
+
PATHS.auth.forgotPassword.path,
|
|
230
|
+
PATHS.auth.resetPassword.path
|
|
231
|
+
];
|
|
232
|
+
|
|
233
|
+
export { CACHE_KEYS, KEYS, LOGGED_IN_SKIP_PATHS, NEW_TAB_REL, NEW_TAB_TARGET, PATHS, PROTECTED_PATHS };
|
package/dist/client/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PATHS } from '../chunk-
|
|
1
|
+
import { PATHS } from '../chunk-PXWRSEQ7.js';
|
|
2
2
|
import { cn, useSidebar, Sidebar, Skeleton, SidebarInset, SIDEBAR_WIDTH, SidebarGroup, SidebarMenu, Collapsible, SidebarMenuItem, SidebarMenuButton, Separator, CollapsibleTrigger, SidebarMenuAction, CollapsibleContent, SidebarMenuSub, SidebarMenuSubItem, SidebarMenuSubButton, Button, Spinner, useParentPathname, DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuItem, PAGE_HEADER_HEIGHT, InputGroup, InputGroupAddon, Textarea, InputGroupInput, InputGroupButton, Select, SelectTrigger, SelectValue, SelectContent, SelectGroup, SelectLabel, SelectItem, Label, FORM_MIDDLE_GAP_WIDTH, FORM_SIDE_FIELDS_WIDTH, Card, useDeviceInfo, CardHeader, CardTitle, CardContent, useCountdown, CardDescription, NAVBAR_HEIGHT, isConfirm, Avatar, AvatarImage, AvatarFallback, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuGroup, Pagination, PaginationContent, PaginationItem, PaginationPrevious, PaginationLink, PaginationEllipsis, PaginationNext } from '../chunk-YLFBYJTE.js';
|
|
3
3
|
export { NAVBAR_HEIGHT, PAGE_HEADER_HEIGHT, SIDEBAR_WIDTH, Sidebar, SidebarContent, SidebarInset, SidebarProvider, cn, getControlMeta, isConfirm, useDeviceInfo, usePickItems, useSidebar } from '../chunk-YLFBYJTE.js';
|
|
4
4
|
import { ensureArray, findTranslation, joinUrl } from '../chunk-YYDELEHA.js';
|
package/dist/index.d.ts
CHANGED
|
@@ -240,6 +240,75 @@ declare const KEYS: {
|
|
|
240
240
|
};
|
|
241
241
|
};
|
|
242
242
|
|
|
243
|
+
declare const PATHS: {
|
|
244
|
+
readonly main: {
|
|
245
|
+
readonly dashboard: {
|
|
246
|
+
readonly path: "/cms/dashboard";
|
|
247
|
+
};
|
|
248
|
+
readonly cmsSettings: {
|
|
249
|
+
readonly path: "/cms/dashboard/cms-settings";
|
|
250
|
+
};
|
|
251
|
+
readonly websitePages: {
|
|
252
|
+
readonly path: "/cms/dashboard/website-pages";
|
|
253
|
+
};
|
|
254
|
+
readonly storage: {
|
|
255
|
+
readonly path: "/cms/dashboard/storage";
|
|
256
|
+
};
|
|
257
|
+
readonly postManagement: {
|
|
258
|
+
readonly path: "/cms/dashboard/post-management";
|
|
259
|
+
};
|
|
260
|
+
readonly fileManager: {
|
|
261
|
+
readonly path: "/cms/dashboard/storage/file-manager";
|
|
262
|
+
};
|
|
263
|
+
readonly trash: {
|
|
264
|
+
readonly path: "/cms/dashboard/storage/trash";
|
|
265
|
+
};
|
|
266
|
+
};
|
|
267
|
+
readonly auth: {
|
|
268
|
+
readonly signIn: {
|
|
269
|
+
readonly path: "/cms/sign-in";
|
|
270
|
+
};
|
|
271
|
+
readonly forgotPassword: {
|
|
272
|
+
readonly path: "/cms/forgot-password";
|
|
273
|
+
};
|
|
274
|
+
readonly resetPassword: {
|
|
275
|
+
readonly path: "/cms/reset-password";
|
|
276
|
+
};
|
|
277
|
+
readonly verifyEmail: {
|
|
278
|
+
readonly path: "/cms/verify-email";
|
|
279
|
+
};
|
|
280
|
+
readonly emailUnverified: {
|
|
281
|
+
readonly path: "/cms/email-unverified";
|
|
282
|
+
};
|
|
283
|
+
readonly changePassword: {
|
|
284
|
+
readonly path: "/cms/dashboard/change-password";
|
|
285
|
+
};
|
|
286
|
+
};
|
|
287
|
+
readonly resources: {
|
|
288
|
+
readonly admin: {
|
|
289
|
+
readonly path: "/cms/dashboard/cms-settings/admin";
|
|
290
|
+
};
|
|
291
|
+
readonly folder: {
|
|
292
|
+
readonly path: "/cms/dashboard/storage/folder";
|
|
293
|
+
};
|
|
294
|
+
readonly file: {
|
|
295
|
+
readonly path: "/cms/dashboard/storage/file";
|
|
296
|
+
};
|
|
297
|
+
readonly post: {
|
|
298
|
+
readonly path: (topicSlug?: string) => string;
|
|
299
|
+
};
|
|
300
|
+
readonly topic: {
|
|
301
|
+
readonly path: "/cms/dashboard/post-management/topic";
|
|
302
|
+
};
|
|
303
|
+
readonly category: {
|
|
304
|
+
readonly path: (topicSlug?: string) => string;
|
|
305
|
+
};
|
|
306
|
+
readonly tag: {
|
|
307
|
+
readonly path: "/cms/dashboard/post-management/tag";
|
|
308
|
+
};
|
|
309
|
+
};
|
|
310
|
+
};
|
|
311
|
+
|
|
243
312
|
declare const CACHE_KEYS: {
|
|
244
313
|
findFull: string;
|
|
245
314
|
findWithSeoMetadata: string;
|
|
@@ -257,6 +326,9 @@ declare const CACHE_KEYS: {
|
|
|
257
326
|
declare const NEW_TAB_TARGET = "_blank";
|
|
258
327
|
declare const NEW_TAB_REL = "noopener noreferrer";
|
|
259
328
|
|
|
329
|
+
declare const PROTECTED_PATHS: "/cms/dashboard"[];
|
|
330
|
+
declare const LOGGED_IN_SKIP_PATHS: ("/cms/sign-in" | "/cms/forgot-password" | "/cms/reset-password")[];
|
|
331
|
+
|
|
260
332
|
declare const mimeToExtension: (mimeType?: string) => string;
|
|
261
333
|
|
|
262
334
|
declare const classifyFileType: (mimeType?: string, extension?: string) => "IMAGE" | "AUDIO" | "VIDEO" | "DOCUMENT" | "ARCHIVE" | "OTHER";
|
|
@@ -353,4 +425,4 @@ declare const SIZE: {
|
|
|
353
425
|
};
|
|
354
426
|
type SizeUnit = keyof typeof SIZE;
|
|
355
427
|
|
|
356
|
-
export { ADMIN_ROLE_ARRAY, ADMIN_ROLE_I18N_MAP, BaseTranslation, CACHE_KEYS, ErrorDetail, ErrorResult, type ErrorResultParams, FileCard, FileFull, Folder, FolderFull, KEYS, NEW_TAB_REL, NEW_TAB_TARGET, OG_TYPE_ARRAY, type OgType, PostFull, ROOT_FOLDER, ROOT_FOLDER_ID, ROOT_FOLDER_NAME, SIMPLE_UPLOAD_FOLDER_KEY, SIMPLE_UPLOAD_FOLDER_NAME, SIZE, type SizeUnit, SuccessResult, type SuccessResultParams, TWITTER_CARD_ARRAY, type TwitterCard, classifyFileType, createBuildArticleMetadata, createBuildTranslations, createBuildWebsiteMetadata, datetimeToDb, datetimeToUi, ensureArray, fileManagerDoubleClick, findTranslation, formatDateTime, formatFileSize, getMediaInfo, isFileLocked, isFolderLocked, joinUrl, jsonArrayToDb, jsonArrayToUi, mimeToExtension, normalizeFolderKey, result, serializeJsonLd };
|
|
428
|
+
export { ADMIN_ROLE_ARRAY, ADMIN_ROLE_I18N_MAP, BaseTranslation, CACHE_KEYS, ErrorDetail, ErrorResult, type ErrorResultParams, FileCard, FileFull, Folder, FolderFull, KEYS, LOGGED_IN_SKIP_PATHS, NEW_TAB_REL, NEW_TAB_TARGET, OG_TYPE_ARRAY, type OgType, PATHS, PROTECTED_PATHS, PostFull, ROOT_FOLDER, ROOT_FOLDER_ID, ROOT_FOLDER_NAME, SIMPLE_UPLOAD_FOLDER_KEY, SIMPLE_UPLOAD_FOLDER_NAME, SIZE, type SizeUnit, SuccessResult, type SuccessResultParams, TWITTER_CARD_ARRAY, type TwitterCard, classifyFileType, createBuildArticleMetadata, createBuildTranslations, createBuildWebsiteMetadata, datetimeToDb, datetimeToUi, ensureArray, fileManagerDoubleClick, findTranslation, formatDateTime, formatFileSize, getMediaInfo, isFileLocked, isFolderLocked, joinUrl, jsonArrayToDb, jsonArrayToUi, mimeToExtension, normalizeFolderKey, result, serializeJsonLd };
|
package/dist/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { CACHE_KEYS, KEYS, NEW_TAB_REL, NEW_TAB_TARGET } from './chunk-
|
|
1
|
+
export { CACHE_KEYS, KEYS, LOGGED_IN_SKIP_PATHS, NEW_TAB_REL, NEW_TAB_TARGET, PATHS, PROTECTED_PATHS } from './chunk-PXWRSEQ7.js';
|
|
2
2
|
export { ADMIN_ROLES, ADMIN_ROLE_ARRAY, ADMIN_ROLE_I18N_MAP, POST_TYPES, ROOT_FOLDER, ROOT_FOLDER_ID, ROOT_FOLDER_NAME, SIMPLE_UPLOAD_FOLDER_KEY, SIMPLE_UPLOAD_FOLDER_NAME, fileManagerDoubleClick, isFileLocked, isFolderLocked, normalizeFolderKey } from './chunk-5LKI7KHR.js';
|
|
3
3
|
export { FILE_TYPES, OG_TYPE_ARRAY, SIZE, TWITTER_CARD_ARRAY, classifyFileType, createBuildArticleMetadata, createBuildTranslations, createBuildWebsiteMetadata, datetimeToDb, datetimeToUi, ensureArray, findTranslation, formatDateTime, formatFileSize, getMediaInfo, joinUrl, jsonArrayToDb, jsonArrayToUi, mimeToExtension, result, serializeJsonLd } from './chunk-YYDELEHA.js';
|