bt-core-app 2.0.157 → 2.0.159
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/bt-core-app.js +20009 -19832
- package/dist/index.d.ts +54 -7
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -158,6 +158,10 @@ export declare interface BaseCosmeticTheme extends Record<string, string> {
|
|
|
158
158
|
primary: string;
|
|
159
159
|
}
|
|
160
160
|
|
|
161
|
+
declare interface BaseIDModel {
|
|
162
|
+
id?: string;
|
|
163
|
+
}
|
|
164
|
+
|
|
161
165
|
export declare interface BaseInactiveModel {
|
|
162
166
|
inactive?: boolean;
|
|
163
167
|
}
|
|
@@ -208,6 +212,7 @@ export declare interface BTActions {
|
|
|
208
212
|
logError: (err?: string | Error) => void;
|
|
209
213
|
restoreItem: <T>(doOptions: RestoreOptions<T>) => Promise<T | undefined>;
|
|
210
214
|
saveItem: <T, TSave, TReturn>(doOptions: SaveOptions<T, TSave, TReturn>) => Promise<TReturn | undefined>;
|
|
215
|
+
syncItem: <T extends BaseIDModel>(syncOptions: SyncOptions<T>) => Promise<BulkActionResult<T>[] | undefined>;
|
|
211
216
|
}
|
|
212
217
|
|
|
213
218
|
export declare interface BTApi {
|
|
@@ -496,6 +501,12 @@ export declare interface BTUseDialog {
|
|
|
496
501
|
export declare interface BTUseDialogOption extends RegisterDialogOptions {
|
|
497
502
|
}
|
|
498
503
|
|
|
504
|
+
declare interface BulkActionResult<T> {
|
|
505
|
+
item?: T;
|
|
506
|
+
isSuccess?: boolean;
|
|
507
|
+
msg?: string;
|
|
508
|
+
}
|
|
509
|
+
|
|
499
510
|
export declare function capitalizeWords(val?: string): string | undefined;
|
|
500
511
|
|
|
501
512
|
export declare function checkImage(url: string, onGood: (this: GlobalEventHandlers, ev: Event) => void, onBad: OnErrorEventHandler): void;
|
|
@@ -873,9 +884,10 @@ export declare interface ExternalConfig {
|
|
|
873
884
|
}
|
|
874
885
|
|
|
875
886
|
export declare interface ExternalParty {
|
|
876
|
-
|
|
877
|
-
|
|
887
|
+
additionalUrl?: string;
|
|
888
|
+
canUnlink?: boolean;
|
|
878
889
|
localIDProp?: string;
|
|
890
|
+
nav?: string;
|
|
879
891
|
party?: string;
|
|
880
892
|
}
|
|
881
893
|
|
|
@@ -1207,6 +1219,7 @@ export declare interface ListProps<T, TSave, TReturn> {
|
|
|
1207
1219
|
onSaveAsync?: (item: TSave | TReturn) => Promise<TReturn | undefined>;
|
|
1208
1220
|
onSaveSuccessAsync?: OnDoSuccessAsync<TReturn, TReturn>;
|
|
1209
1221
|
onSelectItem?: (item: TReturn) => void;
|
|
1222
|
+
onSyncAsync?: (opt: SyncOptions<T>) => Promise<BulkActionResult<T>[]>;
|
|
1210
1223
|
onUpdateAsyncItem?: (asyncItem: TReturn | TReturn[] | undefined, newVersionItem: T) => void;
|
|
1211
1224
|
paginate?: 'server' | 'local';
|
|
1212
1225
|
params?: any;
|
|
@@ -1662,6 +1675,23 @@ export declare interface SWEvent extends Event {
|
|
|
1662
1675
|
detail: any;
|
|
1663
1676
|
}
|
|
1664
1677
|
|
|
1678
|
+
declare interface SyncActionInstruction<T> extends SyncActionPOST {
|
|
1679
|
+
item?: T;
|
|
1680
|
+
}
|
|
1681
|
+
|
|
1682
|
+
declare interface SyncActionPOST {
|
|
1683
|
+
action: 'unlink' | 'link' | 'push';
|
|
1684
|
+
externalItemID?: string;
|
|
1685
|
+
localItemID: string;
|
|
1686
|
+
}
|
|
1687
|
+
|
|
1688
|
+
declare interface SyncOptions<T> extends StoreAction, StorePathOptions, DoActionOptions {
|
|
1689
|
+
actions?: SyncActionInstruction<T>[];
|
|
1690
|
+
localIDProp: string;
|
|
1691
|
+
onSyncAsync?: (opt: SyncOptions<T>) => Promise<BulkActionResult<T>[]>;
|
|
1692
|
+
partyID: string;
|
|
1693
|
+
}
|
|
1694
|
+
|
|
1665
1695
|
export declare interface TableColumn {
|
|
1666
1696
|
align?: 'start' | 'end' | 'center';
|
|
1667
1697
|
bool?: number;
|
|
@@ -2353,6 +2383,19 @@ export declare function useList<T, TSave, TReturn>(props: ListProps<T, TSave, TR
|
|
|
2353
2383
|
add: (variant: BladeVariant) => void;
|
|
2354
2384
|
applyFilters: () => Promise<void>;
|
|
2355
2385
|
asyncItems: Ref<TReturn | TReturn[] | undefined, TReturn | TReturn[] | undefined>;
|
|
2386
|
+
currentExternalParty: Ref< {
|
|
2387
|
+
additionalUrl?: string | undefined;
|
|
2388
|
+
canUnlink?: boolean | undefined;
|
|
2389
|
+
localIDProp?: string | undefined;
|
|
2390
|
+
nav?: string | undefined;
|
|
2391
|
+
party?: string | undefined;
|
|
2392
|
+
} | undefined, ExternalParty | {
|
|
2393
|
+
additionalUrl?: string | undefined;
|
|
2394
|
+
canUnlink?: boolean | undefined;
|
|
2395
|
+
localIDProp?: string | undefined;
|
|
2396
|
+
nav?: string | undefined;
|
|
2397
|
+
party?: string | undefined;
|
|
2398
|
+
} | undefined>;
|
|
2356
2399
|
currentPage: Ref<number, number>;
|
|
2357
2400
|
deleteItem: (item: TReturn) => Promise<void>;
|
|
2358
2401
|
displayHeaders: ComputedRef< {
|
|
@@ -2385,14 +2428,16 @@ export declare function useList<T, TSave, TReturn>(props: ListProps<T, TSave, TR
|
|
|
2385
2428
|
errorMsg: ComputedRef<string | undefined>;
|
|
2386
2429
|
exportToCSV: () => void;
|
|
2387
2430
|
externalParties: Ref< {
|
|
2388
|
-
|
|
2389
|
-
|
|
2431
|
+
additionalUrl?: string | undefined;
|
|
2432
|
+
canUnlink?: boolean | undefined;
|
|
2390
2433
|
localIDProp?: string | undefined;
|
|
2434
|
+
nav?: string | undefined;
|
|
2391
2435
|
party?: string | undefined;
|
|
2392
2436
|
}[], ExternalParty[] | {
|
|
2393
|
-
|
|
2394
|
-
|
|
2437
|
+
additionalUrl?: string | undefined;
|
|
2438
|
+
canUnlink?: boolean | undefined;
|
|
2395
2439
|
localIDProp?: string | undefined;
|
|
2440
|
+
nav?: string | undefined;
|
|
2396
2441
|
party?: string | undefined;
|
|
2397
2442
|
}[]>;
|
|
2398
2443
|
filteredItems: ShallowRef<TReturn[], TReturn[]>;
|
|
@@ -2461,11 +2506,12 @@ export declare function useList<T, TSave, TReturn>(props: ListProps<T, TSave, TR
|
|
|
2461
2506
|
loadingMsg: ComputedRef<string | undefined>;
|
|
2462
2507
|
mode: Ref<BladeMode, BladeMode>;
|
|
2463
2508
|
proxyID: ComputedRef<string | undefined>;
|
|
2509
|
+
pushToExternalParty: (dItem: any) => Promise<BulkActionResult<any>[] | undefined> | undefined;
|
|
2464
2510
|
refresh: (rOptions?: ListRefreshOptions) => Promise<void>;
|
|
2465
2511
|
restoreItem: (dItem: any) => Promise<TReturn | undefined>;
|
|
2466
2512
|
saveItem: (dItem: any) => Promise<TReturn | undefined>;
|
|
2467
2513
|
searchString: Ref<string | undefined, string | undefined>;
|
|
2468
|
-
|
|
2514
|
+
selectExternalParty: (party?: ExternalParty) => void;
|
|
2469
2515
|
selectedFilters: Ref<number[], number[]>;
|
|
2470
2516
|
selectItem: (rItem: any, variant: BladeVariant) => void;
|
|
2471
2517
|
showError: ShallowRef<boolean, boolean>;
|
|
@@ -2502,6 +2548,7 @@ export declare function useList<T, TSave, TReturn>(props: ListProps<T, TSave, TR
|
|
|
2502
2548
|
titleOptions: ComputedRef<GroupedHeaderOption[]>;
|
|
2503
2549
|
toggleSearch: () => void;
|
|
2504
2550
|
totalPages: Ref<number, number>;
|
|
2551
|
+
unlinkFromExternalParty: (dItem: any) => Promise<BulkActionResult<any>[] | undefined> | undefined;
|
|
2505
2552
|
};
|
|
2506
2553
|
|
|
2507
2554
|
declare interface UseListOptions {
|