bt-core-app 2.0.158 → 2.0.160
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 +20090 -19922
- package/dist/index.d.ts +55 -13
- 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,10 +884,10 @@ export declare interface ExternalConfig {
|
|
|
873
884
|
}
|
|
874
885
|
|
|
875
886
|
export declare interface ExternalParty {
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
localIDProp
|
|
879
|
-
party
|
|
887
|
+
additionalUrl: string;
|
|
888
|
+
canUnlink: boolean;
|
|
889
|
+
localIDProp: string;
|
|
890
|
+
party: string;
|
|
880
891
|
}
|
|
881
892
|
|
|
882
893
|
export declare const externalUses: string[];
|
|
@@ -1207,6 +1218,7 @@ export declare interface ListProps<T, TSave, TReturn> {
|
|
|
1207
1218
|
onSaveAsync?: (item: TSave | TReturn) => Promise<TReturn | undefined>;
|
|
1208
1219
|
onSaveSuccessAsync?: OnDoSuccessAsync<TReturn, TReturn>;
|
|
1209
1220
|
onSelectItem?: (item: TReturn) => void;
|
|
1221
|
+
onSyncAsync?: (opt: SyncOptions<T>) => Promise<BulkActionResult<T>[]>;
|
|
1210
1222
|
onUpdateAsyncItem?: (asyncItem: TReturn | TReturn[] | undefined, newVersionItem: T) => void;
|
|
1211
1223
|
paginate?: 'server' | 'local';
|
|
1212
1224
|
params?: any;
|
|
@@ -1662,6 +1674,23 @@ export declare interface SWEvent extends Event {
|
|
|
1662
1674
|
detail: any;
|
|
1663
1675
|
}
|
|
1664
1676
|
|
|
1677
|
+
declare interface SyncActionInstruction<T> extends SyncActionPOST {
|
|
1678
|
+
item?: T;
|
|
1679
|
+
}
|
|
1680
|
+
|
|
1681
|
+
declare interface SyncActionPOST {
|
|
1682
|
+
action: 'unlink' | 'link' | 'push';
|
|
1683
|
+
externalItemID?: string;
|
|
1684
|
+
localItemID: string;
|
|
1685
|
+
}
|
|
1686
|
+
|
|
1687
|
+
declare interface SyncOptions<T> extends StoreAction, StorePathOptions, DoActionOptions {
|
|
1688
|
+
actions?: SyncActionInstruction<T>[];
|
|
1689
|
+
localIDProp: string;
|
|
1690
|
+
onSyncAsync?: (opt: SyncOptions<T>) => Promise<BulkActionResult<T>[]>;
|
|
1691
|
+
partyID: string;
|
|
1692
|
+
}
|
|
1693
|
+
|
|
1665
1694
|
export declare interface TableColumn {
|
|
1666
1695
|
align?: 'start' | 'end' | 'center';
|
|
1667
1696
|
bool?: number;
|
|
@@ -2353,6 +2382,17 @@ export declare function useList<T, TSave, TReturn>(props: ListProps<T, TSave, TR
|
|
|
2353
2382
|
add: (variant: BladeVariant) => void;
|
|
2354
2383
|
applyFilters: () => Promise<void>;
|
|
2355
2384
|
asyncItems: Ref<TReturn | TReturn[] | undefined, TReturn | TReturn[] | undefined>;
|
|
2385
|
+
currentExternalParty: Ref< {
|
|
2386
|
+
additionalUrl: string;
|
|
2387
|
+
canUnlink: boolean;
|
|
2388
|
+
localIDProp: string;
|
|
2389
|
+
party: string;
|
|
2390
|
+
} | undefined, ExternalParty | {
|
|
2391
|
+
additionalUrl: string;
|
|
2392
|
+
canUnlink: boolean;
|
|
2393
|
+
localIDProp: string;
|
|
2394
|
+
party: string;
|
|
2395
|
+
} | undefined>;
|
|
2356
2396
|
currentPage: Ref<number, number>;
|
|
2357
2397
|
deleteItem: (item: TReturn) => Promise<void>;
|
|
2358
2398
|
displayHeaders: ComputedRef< {
|
|
@@ -2385,15 +2425,15 @@ export declare function useList<T, TSave, TReturn>(props: ListProps<T, TSave, TR
|
|
|
2385
2425
|
errorMsg: ComputedRef<string | undefined>;
|
|
2386
2426
|
exportToCSV: () => void;
|
|
2387
2427
|
externalParties: Ref< {
|
|
2388
|
-
|
|
2389
|
-
|
|
2390
|
-
localIDProp
|
|
2391
|
-
party
|
|
2428
|
+
additionalUrl: string;
|
|
2429
|
+
canUnlink: boolean;
|
|
2430
|
+
localIDProp: string;
|
|
2431
|
+
party: string;
|
|
2392
2432
|
}[], ExternalParty[] | {
|
|
2393
|
-
|
|
2394
|
-
|
|
2395
|
-
localIDProp
|
|
2396
|
-
party
|
|
2433
|
+
additionalUrl: string;
|
|
2434
|
+
canUnlink: boolean;
|
|
2435
|
+
localIDProp: string;
|
|
2436
|
+
party: string;
|
|
2397
2437
|
}[]>;
|
|
2398
2438
|
filteredItems: ShallowRef<TReturn[], TReturn[]>;
|
|
2399
2439
|
filters: ComputedRef<any[]>;
|
|
@@ -2461,11 +2501,12 @@ export declare function useList<T, TSave, TReturn>(props: ListProps<T, TSave, TR
|
|
|
2461
2501
|
loadingMsg: ComputedRef<string | undefined>;
|
|
2462
2502
|
mode: Ref<BladeMode, BladeMode>;
|
|
2463
2503
|
proxyID: ComputedRef<string | undefined>;
|
|
2504
|
+
pushToExternalParty: (dItem: any) => Promise<BulkActionResult<any>[] | undefined> | undefined;
|
|
2464
2505
|
refresh: (rOptions?: ListRefreshOptions) => Promise<void>;
|
|
2465
2506
|
restoreItem: (dItem: any) => Promise<TReturn | undefined>;
|
|
2466
2507
|
saveItem: (dItem: any) => Promise<TReturn | undefined>;
|
|
2467
2508
|
searchString: Ref<string | undefined, string | undefined>;
|
|
2468
|
-
|
|
2509
|
+
selectExternalParty: (party?: ExternalParty) => void;
|
|
2469
2510
|
selectedFilters: Ref<number[], number[]>;
|
|
2470
2511
|
selectItem: (rItem: any, variant: BladeVariant) => void;
|
|
2471
2512
|
showError: ShallowRef<boolean, boolean>;
|
|
@@ -2502,6 +2543,7 @@ export declare function useList<T, TSave, TReturn>(props: ListProps<T, TSave, TR
|
|
|
2502
2543
|
titleOptions: ComputedRef<GroupedHeaderOption[]>;
|
|
2503
2544
|
toggleSearch: () => void;
|
|
2504
2545
|
totalPages: Ref<number, number>;
|
|
2546
|
+
unlinkFromExternalParty: (dItem: any) => Promise<BulkActionResult<any>[] | undefined> | undefined;
|
|
2505
2547
|
};
|
|
2506
2548
|
|
|
2507
2549
|
declare interface UseListOptions {
|