@atscript/ui-table 0.1.90 → 0.1.92

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/index.cjs CHANGED
@@ -1176,7 +1176,8 @@ function buildTableQuery(opts) {
1176
1176
  const $sort = {};
1177
1177
  for (const s of sorters) $sort[s.field] = s.direction === "asc" ? 1 : -1;
1178
1178
  const controls = {};
1179
- if (opts.visibleColumnPaths.length > 0) controls.$select = opts.visibleColumnPaths;
1179
+ const sel = opts.extraSelect?.length ? [...new Set([...opts.visibleColumnPaths, ...opts.extraSelect])] : opts.visibleColumnPaths;
1180
+ if (sel.length > 0) controls.$select = sel;
1180
1181
  if (sorters.length > 0) controls.$sort = $sort;
1181
1182
  if (opts.search) {
1182
1183
  const searchKey = opts.searchIndex ? `$search:${opts.searchIndex}` : "$search";
package/dist/index.d.cts CHANGED
@@ -579,6 +579,8 @@ declare class AppPrefsClient {
579
579
  interface BuildTableQueryOptions {
580
580
  /** Paths of visible columns — used for `$select` projection. */
581
581
  visibleColumnPaths: string[];
582
+ /** Extra leaf paths unioned (deduped) into `$select` beyond the visible columns. Never rendered as columns. */
583
+ extraSelect?: string[];
582
584
  /** User-configured sorters. */
583
585
  sorters: SortControl[];
584
586
  /** Always-applied sorters (prepended before user sorters). */
package/dist/index.d.mts CHANGED
@@ -579,6 +579,8 @@ declare class AppPrefsClient {
579
579
  interface BuildTableQueryOptions {
580
580
  /** Paths of visible columns — used for `$select` projection. */
581
581
  visibleColumnPaths: string[];
582
+ /** Extra leaf paths unioned (deduped) into `$select` beyond the visible columns. Never rendered as columns. */
583
+ extraSelect?: string[];
582
584
  /** User-configured sorters. */
583
585
  sorters: SortControl[];
584
586
  /** Always-applied sorters (prepended before user sorters). */
package/dist/index.mjs CHANGED
@@ -1175,7 +1175,8 @@ function buildTableQuery(opts) {
1175
1175
  const $sort = {};
1176
1176
  for (const s of sorters) $sort[s.field] = s.direction === "asc" ? 1 : -1;
1177
1177
  const controls = {};
1178
- if (opts.visibleColumnPaths.length > 0) controls.$select = opts.visibleColumnPaths;
1178
+ const sel = opts.extraSelect?.length ? [...new Set([...opts.visibleColumnPaths, ...opts.extraSelect])] : opts.visibleColumnPaths;
1179
+ if (sel.length > 0) controls.$select = sel;
1179
1180
  if (sorters.length > 0) controls.$sort = $sort;
1180
1181
  if (opts.search) {
1181
1182
  const searchKey = opts.searchIndex ? `$search:${opts.searchIndex}` : "$search";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atscript/ui-table",
3
- "version": "0.1.90",
3
+ "version": "0.1.92",
4
4
  "description": "Framework-agnostic filter model, filter-to-Uniquery conversion, and preset serialization for atscript tables",
5
5
  "keywords": [
6
6
  "atscript",
@@ -41,16 +41,16 @@
41
41
  "access": "public"
42
42
  },
43
43
  "dependencies": {
44
- "@atscript/ui": "0.1.90"
44
+ "@atscript/ui": "0.1.92"
45
45
  },
46
46
  "devDependencies": {
47
- "@atscript/db-client": "^0.1.97",
47
+ "@atscript/db-client": "^0.1.98",
48
48
  "@uniqu/core": "^0.1.6",
49
49
  "@uniqu/url": "^0.1.6",
50
50
  "vitest": "npm:@voidzero-dev/vite-plus-test@0.1.14"
51
51
  },
52
52
  "peerDependencies": {
53
- "@atscript/db-client": "^0.1.97",
53
+ "@atscript/db-client": "^0.1.98",
54
54
  "@uniqu/core": "^0.1.6",
55
55
  "@uniqu/url": "^0.1.6"
56
56
  },