@freelog/tools-lib 0.1.163 → 0.1.165
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/i18n/I18nNext.d.ts +1 -0
- package/dist/service-API/index.d.ts +2 -0
- package/dist/service-API/nodes.d.ts +5 -0
- package/dist/service-API/presentables.d.ts +9 -0
- package/dist/service-API/resourceType.d.ts +10 -0
- package/dist/service-API/resources.d.ts +196 -1
- package/dist/service-API/storages.d.ts +6 -0
- package/dist/tools-lib.cjs.development.js +1172 -1245
- package/dist/tools-lib.cjs.development.js.map +1 -1
- package/dist/tools-lib.cjs.production.min.js +1 -1
- package/dist/tools-lib.cjs.production.min.js.map +1 -1
- package/dist/tools-lib.esm.js +1172 -1245
- package/dist/tools-lib.esm.js.map +1 -1
- package/dist/utils/linkTo.d.ts +14 -1
- package/package.json +1 -1
- package/src/service-API/index.ts +2 -0
- package/src/service-API/nodes.ts +113 -99
- package/src/service-API/presentables.ts +343 -322
- package/src/service-API/resourceType.ts +29 -0
- package/src/service-API/resources.ts +1187 -771
- package/src/service-API/storages.ts +418 -403
- package/src/utils/linkTo.ts +46 -3
package/src/utils/linkTo.ts
CHANGED
|
@@ -70,6 +70,16 @@ export function resourceDetails({resourceID, ...params}: ResourceDetailsParamsTy
|
|
|
70
70
|
return `/resource/details/${resourceID}${handleQuery(params)}`;
|
|
71
71
|
}
|
|
72
72
|
|
|
73
|
+
// 集合详情
|
|
74
|
+
interface CollectionDetailsParamsType {
|
|
75
|
+
collectionID: string;
|
|
76
|
+
// version?: string;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export function collectionDetails({collectionID}: CollectionDetailsParamsType): TReturnType {
|
|
80
|
+
return `/resource/collectionDetails/${collectionID}`;
|
|
81
|
+
}
|
|
82
|
+
|
|
73
83
|
// 资源创建入口
|
|
74
84
|
interface ResourceCreatorParamsType {
|
|
75
85
|
}
|
|
@@ -250,10 +260,13 @@ export function nodeManagement({nodeID, showPage = 'exhibit', ...params}: NodeMa
|
|
|
250
260
|
interface ExhibitManagementParamsType {
|
|
251
261
|
exhibitID: string;
|
|
252
262
|
openAuthDrawer?: boolean
|
|
263
|
+
showMoreSetting?: boolean;
|
|
253
264
|
}
|
|
254
265
|
|
|
255
|
-
export function exhibitManagement({exhibitID,
|
|
256
|
-
return `/node/exhibit/formal/${exhibitID}${handleQuery({
|
|
266
|
+
export function exhibitManagement({exhibitID, ...params}: ExhibitManagementParamsType): TReturnType {
|
|
267
|
+
return `/node/exhibit/formal/${exhibitID}${handleQuery({
|
|
268
|
+
...params
|
|
269
|
+
})}`;
|
|
257
270
|
}
|
|
258
271
|
|
|
259
272
|
// 集合展品管理
|
|
@@ -262,7 +275,10 @@ interface CollectionExhibitManagementParamsType {
|
|
|
262
275
|
openAuthDrawer?: boolean
|
|
263
276
|
}
|
|
264
277
|
|
|
265
|
-
export function collectionExhibitManagement({
|
|
278
|
+
export function collectionExhibitManagement({
|
|
279
|
+
exhibitID,
|
|
280
|
+
openAuthDrawer
|
|
281
|
+
}: CollectionExhibitManagementParamsType): TReturnType {
|
|
266
282
|
return `/node/collectionExhibit/formal/${exhibitID}${handleQuery({openAuthDrawer})}`;
|
|
267
283
|
}
|
|
268
284
|
|
|
@@ -309,6 +325,15 @@ export function objectDetails({...params}: ObjectDetailsParamsType): TReturnType
|
|
|
309
325
|
return `/storage${handleQuery(params)}`;
|
|
310
326
|
}
|
|
311
327
|
|
|
328
|
+
// 集合创建成功
|
|
329
|
+
interface CollectionCreateSuccessParamsType {
|
|
330
|
+
collectionID: string;
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
export function collectionCreateSuccess({collectionID}: CollectionCreateSuccessParamsType) {
|
|
334
|
+
return `/result/collection/create/success/${collectionID}`;
|
|
335
|
+
}
|
|
336
|
+
|
|
312
337
|
// 资源创建成功
|
|
313
338
|
interface ResourceCreateSuccessParamsType {
|
|
314
339
|
resourceID: string;
|
|
@@ -379,6 +404,24 @@ export function exception403({...params}: Exception403ParamsType = {}) {
|
|
|
379
404
|
})}`;
|
|
380
405
|
}
|
|
381
406
|
|
|
407
|
+
// unableToAccess
|
|
408
|
+
interface ExceptionUnableToAccessParamsType {
|
|
409
|
+
from?: string;
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
export function exceptionUnableToAccess({...params}: ExceptionUnableToAccessParamsType = {}) {
|
|
413
|
+
|
|
414
|
+
let fromUrl: string = params.from || '';
|
|
415
|
+
if (!fromUrl) {
|
|
416
|
+
const {href, origin} = window.location;
|
|
417
|
+
fromUrl = href.replace(origin, '');
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
return `/exception/unableToAccess${handleQuery({
|
|
421
|
+
from: fromUrl
|
|
422
|
+
})}`;
|
|
423
|
+
}
|
|
424
|
+
|
|
382
425
|
// 节点封禁
|
|
383
426
|
interface NodeFreezeParamsType {
|
|
384
427
|
nodeID: number;
|