@bfrs/agentic-components 0.7.1 → 0.7.3
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/components/data-display/DataTable/DataTable.types.d.ts +6 -0
- package/dist/components/data-display/DataTable/TableViewSelector.d.ts +7 -1
- package/dist/components/data-display/DataTable/saveViewApi.d.ts +6 -2
- package/dist/components/data-display/DataTable/useSavedViews.d.ts +8 -0
- package/dist/custom-elements.js +6576 -6513
- package/dist/custom-elements.js.map +1 -1
- package/dist/index.js +4974 -4894
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -199,6 +199,12 @@ export type SavedView = {
|
|
|
199
199
|
is_system_defined: boolean;
|
|
200
200
|
};
|
|
201
201
|
export type SaveViewPayload = {
|
|
202
|
+
/**
|
|
203
|
+
* Existing view identifier. Sent on updates (rename) so the backend can target
|
|
204
|
+
* the exact view — screen (`view_type`) + `tab` alone don't identify one view.
|
|
205
|
+
* Omitted on create, where the backend assigns the id.
|
|
206
|
+
*/
|
|
207
|
+
view_id?: string;
|
|
202
208
|
view_type: ViewType;
|
|
203
209
|
tab?: string;
|
|
204
210
|
name: string;
|
|
@@ -36,6 +36,12 @@ export type TableViewSelectorProps = {
|
|
|
36
36
|
renameInputLabel?: ReactNode;
|
|
37
37
|
renameCancelLabel?: ReactNode;
|
|
38
38
|
renameSaveLabel?: ReactNode;
|
|
39
|
+
/** Title of the delete-confirmation dialog. Defaults to "Delete view". */
|
|
40
|
+
deleteTitle?: ReactNode;
|
|
41
|
+
/** Body text of the delete-confirmation dialog. Defaults to a message naming the view. */
|
|
42
|
+
deleteDescription?: ReactNode;
|
|
43
|
+
deleteCancelLabel?: ReactNode;
|
|
44
|
+
deleteConfirmLabel?: ReactNode;
|
|
39
45
|
/** Trigger size. Matches select-family sizing: sm = 28px, md = 36px. */
|
|
40
46
|
size?: "sm" | "md";
|
|
41
47
|
disabled?: boolean;
|
|
@@ -44,4 +50,4 @@ export type TableViewSelectorProps = {
|
|
|
44
50
|
contentClassName?: string;
|
|
45
51
|
actionMenuClassName?: string;
|
|
46
52
|
};
|
|
47
|
-
export declare function TableViewSelector({ screenName, store, saveApi, value, defaultValue, selectPrimaryByDefault, onValueChange, onViewSelect, onPrimaryViewChange, onRenameView, onDeleteView, onResetSavedFilters, onError, triggerLabel, placeholder, viewsLabel, emptyLabel, loadingLabel, resetLabel, setPrimaryLabel, renameLabel, deleteLabel, renameTitle, renameDescription, renameInputLabel, renameCancelLabel, renameSaveLabel, size, disabled, className, triggerClassName, contentClassName, actionMenuClassName }: TableViewSelectorProps): import("react/jsx-runtime").JSX.Element | null;
|
|
53
|
+
export declare function TableViewSelector({ screenName, store, saveApi, value, defaultValue, selectPrimaryByDefault, onValueChange, onViewSelect, onPrimaryViewChange, onRenameView, onDeleteView, onResetSavedFilters, onError, triggerLabel, placeholder, viewsLabel, emptyLabel, loadingLabel, resetLabel, setPrimaryLabel, renameLabel, deleteLabel, renameTitle, renameDescription, renameInputLabel, renameCancelLabel, renameSaveLabel, deleteTitle, deleteDescription, deleteCancelLabel, deleteConfirmLabel, size, disabled, className, triggerClassName, contentClassName, actionMenuClassName }: TableViewSelectorProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -42,11 +42,15 @@ export type SaveViewOptions = SaveViewApiConfig & {
|
|
|
42
42
|
*/
|
|
43
43
|
export declare function saveView({ baseUrl, endpoint, saveEndpoint, viewType, tab, token, headers, credentials, fetcher, payload, }: SaveViewOptions): Promise<SaveViewResult>;
|
|
44
44
|
export declare function listViews(config: SaveViewApiConfig): Promise<SavedView[]>;
|
|
45
|
-
export declare function getView(config: SaveViewApiConfig
|
|
45
|
+
export declare function getView(config: SaveViewApiConfig & {
|
|
46
|
+
viewId?: string;
|
|
47
|
+
}): Promise<SavedView | null>;
|
|
46
48
|
export declare function updateView(config: SaveViewApiConfig & {
|
|
47
49
|
payload: SaveViewPayload;
|
|
48
50
|
}): Promise<SavedView | null>;
|
|
49
|
-
export declare function deleteView(config: SaveViewApiConfig
|
|
51
|
+
export declare function deleteView(config: SaveViewApiConfig & {
|
|
52
|
+
viewId?: string;
|
|
53
|
+
}): Promise<void>;
|
|
50
54
|
/**
|
|
51
55
|
* Creates a pre-configured save function bound to a base URL and token.
|
|
52
56
|
* The returned function matches the `TableSaveView.onSave` signature directly.
|
|
@@ -1,8 +1,16 @@
|
|
|
1
1
|
import { SavedView } from './DataTable.types';
|
|
2
2
|
import { ViewStore } from './viewStore';
|
|
3
|
+
import { SaveViewApiConfig } from './saveViewApi';
|
|
3
4
|
export type UseSavedViewsOptions = {
|
|
4
5
|
/** Optional read adapter. Defaults to the localStorage-backed store for `screenName`. */
|
|
5
6
|
store?: ViewStore;
|
|
7
|
+
/**
|
|
8
|
+
* Saved-view API config. When supplied, the primary view is hydrated with its
|
|
9
|
+
* full columns/filters via the API — the local mirror only holds the list
|
|
10
|
+
* summary — so a default view's columns/filters can be applied on load.
|
|
11
|
+
* Memoize this object so the hook doesn't re-fetch every render.
|
|
12
|
+
*/
|
|
13
|
+
saveApi?: SaveViewApiConfig;
|
|
6
14
|
/** Set false to keep the hook idle while a screen key is still resolving. */
|
|
7
15
|
enabled?: boolean;
|
|
8
16
|
};
|