@acvl/frontend-components 0.0.62 → 0.0.64

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.
@@ -21,7 +21,7 @@ export interface DrawerGridDrawerConfig {
21
21
  pageType?: PageType;
22
22
  successMessage?: string | ((response: any) => string);
23
23
  };
24
- /** Record-mode API (opened by a row when `rowAction` is `"drawer"`). */
24
+ /** Record-mode API (opened by a row click). */
25
25
  record: {
26
26
  /** Single-record query hook, called with `{ id, ...args(id) }`. */
27
27
  query: any;
@@ -48,27 +48,19 @@ export interface DrawerGridDrawerConfig {
48
48
  export interface DrawerGridProps {
49
49
  /** Full v1 `Base` grid configuration (pathname, api, dataGridProps, slotProps, ref). */
50
50
  grid: BaseGridProps;
51
- /**
52
- * How a single row click behaves. `"navigate"` (default) keeps the full-page route;
53
- * `"drawer"` opens the record drawer instead. Ctrl/Cmd+click always opens the full page
54
- * in a new tab, and the drawer carries an "open full page" button — so the route stays
55
- * reachable either way.
56
- */
57
- rowAction?: "navigate" | "drawer";
58
51
  drawer: DrawerGridDrawerConfig;
59
52
  }
60
53
  /**
61
- * A v1 `Base` grid whose rows and create button can open a `DetailFormDrawer_v2` instead of
62
- * navigating to a full page — without giving up the full-page routes. `rowAction` is a
63
- * per-grid mode switch: in `"drawer"` mode both a row click and the create menu's "Manual"
64
- * option open the drawer; in `"navigate"` mode (default) the grid keeps its full-page routes.
65
- * Ctrl/Cmd+click always opens the full page in a new tab, and the record drawer carries an
66
- * "open full page" button — so the routes stay reachable either way.
54
+ * A v1 `Base` grid whose rows and create button open a `DetailFormDrawer_v2` instead of
55
+ * navigating to a full page — without giving up the full-page routes. A row click and the
56
+ * create menu's "Manual" option both open the drawer; Ctrl/Cmd+click still opens the full
57
+ * page in a new tab, and the record drawer carries an "open full page" button — so the
58
+ * routes stay reachable either way.
67
59
  *
68
60
  * The full `Base` grid config goes under `grid` (`{ pathname, api, dataGridProps, slotProps }`),
69
- * alongside `rowAction` and `drawer`.
61
+ * alongside `drawer`.
70
62
  *
71
63
  * Composition only: the v1 grid stays drawer-agnostic (its `onRowClick` and `onManualCreate`
72
64
  * are generic passthroughs), so the v1→v2 layering is never inverted.
73
65
  */
74
- export default function DrawerGrid({ grid, rowAction, drawer }: DrawerGridProps): import("react/jsx-runtime").JSX.Element;
66
+ export default function DrawerGrid({ grid, drawer }: DrawerGridProps): import("react/jsx-runtime").JSX.Element;
@@ -32,7 +32,7 @@ export interface DetailFormConfig {
32
32
  [k: string]: any;
33
33
  };
34
34
  };
35
- sections: (form: any) => SectionProps[];
35
+ sections: (form: any, pageType: PageType) => SectionProps[];
36
36
  pageType: PageType;
37
37
  /** dot-path prefix where `obj_permissions` live inside the fetched record. */
38
38
  permissionsPath?: string;
@@ -68,7 +68,7 @@ export interface DetailFormController {
68
68
  /** Node emitted by a successful mutation's `post_action`, or `null`. */
69
69
  postActionNode: ReactNode;
70
70
  /** Passthroughs consumed by `<DetailForm/>`. */
71
- sections: (form: any) => SectionProps[];
71
+ sections: (form: any, pageType: PageType) => SectionProps[];
72
72
  pageType: PageType;
73
73
  }
74
74
  /**
package/dist/index.d.ts CHANGED
@@ -1258,7 +1258,7 @@ interface DetailFormConfig {
1258
1258
  [k: string]: any;
1259
1259
  };
1260
1260
  };
1261
- sections: (form: any) => SectionProps[];
1261
+ sections: (form: any, pageType: PageType) => SectionProps[];
1262
1262
  pageType: PageType;
1263
1263
  /** dot-path prefix where `obj_permissions` live inside the fetched record. */
1264
1264
  permissionsPath?: string;
@@ -1294,7 +1294,7 @@ interface DetailFormController {
1294
1294
  /** Node emitted by a successful mutation's `post_action`, or `null`. */
1295
1295
  postActionNode: ReactNode;
1296
1296
  /** Passthroughs consumed by `<DetailForm/>`. */
1297
- sections: (form: any) => SectionProps[];
1297
+ sections: (form: any, pageType: PageType) => SectionProps[];
1298
1298
  pageType: PageType;
1299
1299
  }
1300
1300
  /**
@@ -1324,7 +1324,7 @@ interface DrawerGridDrawerConfig {
1324
1324
  pageType?: PageType;
1325
1325
  successMessage?: string | ((response: any) => string);
1326
1326
  };
1327
- /** Record-mode API (opened by a row when `rowAction` is `"drawer"`). */
1327
+ /** Record-mode API (opened by a row click). */
1328
1328
  record: {
1329
1329
  /** Single-record query hook, called with `{ id, ...args(id) }`. */
1330
1330
  query: any;
@@ -1351,30 +1351,22 @@ interface DrawerGridDrawerConfig {
1351
1351
  interface DrawerGridProps {
1352
1352
  /** Full v1 `Base` grid configuration (pathname, api, dataGridProps, slotProps, ref). */
1353
1353
  grid: BaseGridProps;
1354
- /**
1355
- * How a single row click behaves. `"navigate"` (default) keeps the full-page route;
1356
- * `"drawer"` opens the record drawer instead. Ctrl/Cmd+click always opens the full page
1357
- * in a new tab, and the drawer carries an "open full page" button — so the route stays
1358
- * reachable either way.
1359
- */
1360
- rowAction?: "navigate" | "drawer";
1361
1354
  drawer: DrawerGridDrawerConfig;
1362
1355
  }
1363
1356
  /**
1364
- * A v1 `Base` grid whose rows and create button can open a `DetailFormDrawer_v2` instead of
1365
- * navigating to a full page — without giving up the full-page routes. `rowAction` is a
1366
- * per-grid mode switch: in `"drawer"` mode both a row click and the create menu's "Manual"
1367
- * option open the drawer; in `"navigate"` mode (default) the grid keeps its full-page routes.
1368
- * Ctrl/Cmd+click always opens the full page in a new tab, and the record drawer carries an
1369
- * "open full page" button — so the routes stay reachable either way.
1357
+ * A v1 `Base` grid whose rows and create button open a `DetailFormDrawer_v2` instead of
1358
+ * navigating to a full page — without giving up the full-page routes. A row click and the
1359
+ * create menu's "Manual" option both open the drawer; Ctrl/Cmd+click still opens the full
1360
+ * page in a new tab, and the record drawer carries an "open full page" button — so the
1361
+ * routes stay reachable either way.
1370
1362
  *
1371
1363
  * The full `Base` grid config goes under `grid` (`{ pathname, api, dataGridProps, slotProps }`),
1372
- * alongside `rowAction` and `drawer`.
1364
+ * alongside `drawer`.
1373
1365
  *
1374
1366
  * Composition only: the v1 grid stays drawer-agnostic (its `onRowClick` and `onManualCreate`
1375
1367
  * are generic passthroughs), so the v1→v2 layering is never inverted.
1376
1368
  */
1377
- declare function DrawerGrid({ grid, rowAction, drawer }: DrawerGridProps): react_jsx_runtime.JSX.Element;
1369
+ declare function DrawerGrid({ grid, drawer }: DrawerGridProps): react_jsx_runtime.JSX.Element;
1378
1370
 
1379
1371
  interface ConfirmDialogProps {
1380
1372
  open: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@acvl/frontend-components",
3
- "version": "0.0.62",
3
+ "version": "0.0.64",
4
4
  "description": "Component library for ACV frontend projects.",
5
5
  "homepage": "https://github.com/ACV-Logistics/acv-frontend-components#readme",
6
6
  "access": "public",