@atscript/ui 0.1.138 → 0.1.140

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
@@ -2291,6 +2291,7 @@ function createTableDef(meta, preDeserializedType) {
2291
2291
  selectWith: getFieldMeta(prop, UI_TABLE_SELECT_WITH),
2292
2292
  sortable: fieldMeta?.sortable ?? false,
2293
2293
  filterable: fieldMeta?.filterable ?? false,
2294
+ ...fieldMeta?.filterOps && { filterOps: [...fieldMeta.filterOps] },
2294
2295
  nullable: prop.optional === true,
2295
2296
  width: getFieldMeta(prop, UI_TABLE_WIDTH),
2296
2297
  maxLen: maxLengthMeta?.length,
package/dist/index.d.cts CHANGED
@@ -1020,7 +1020,14 @@ interface RelationInfo {
1020
1020
  /** Per-field capability flags. */
1021
1021
  interface FieldMeta {
1022
1022
  sortable: boolean;
1023
+ /** Whether the field accepts value comparisons (`=`, `>`, `$regex`, …). */
1023
1024
  filterable: boolean;
1025
+ /**
1026
+ * Present only when `filterable` is `false` but narrower predicates still
1027
+ * pass the server's gate — e.g. `["$exists"]` on a JSON-stored column.
1028
+ * Needs `@atscript/moost-db` 0.1.132+. Since 0.1.139.
1029
+ */
1030
+ filterOps?: string[];
1024
1031
  }
1025
1032
  /** Meta response from moost-db `/meta` endpoint. */
1026
1033
  interface MetaResponse {
@@ -1114,8 +1121,16 @@ interface ColumnDef {
1114
1121
  selectWith?: string[];
1115
1122
  /** Whether this column supports sorting. */
1116
1123
  sortable: boolean;
1117
- /** Whether this column supports filtering. */
1124
+ /** Whether this column supports value filtering (the server's `filterable`). */
1118
1125
  filterable: boolean;
1126
+ /**
1127
+ * Narrower filter operators the server accepts on a column that is not
1128
+ * value-filterable — `["$exists"]` on a JSON-stored column, whose value
1129
+ * cannot be compared but whose presence can. Copied from
1130
+ * `meta.fields[path].filterOps`; omitted when absent. Filter UIs read it
1131
+ * through `columnFilterConditions()` from `@atscript/ui-table`. Since 0.1.139.
1132
+ */
1133
+ filterOps?: string[];
1119
1134
  /**
1120
1135
  * Whether the column accepts `null` values (atscript prop is `optional`).
1121
1136
  * Drives operator-picker availability — `null` / `notNull` are dropped
package/dist/index.d.mts CHANGED
@@ -1020,7 +1020,14 @@ interface RelationInfo {
1020
1020
  /** Per-field capability flags. */
1021
1021
  interface FieldMeta {
1022
1022
  sortable: boolean;
1023
+ /** Whether the field accepts value comparisons (`=`, `>`, `$regex`, …). */
1023
1024
  filterable: boolean;
1025
+ /**
1026
+ * Present only when `filterable` is `false` but narrower predicates still
1027
+ * pass the server's gate — e.g. `["$exists"]` on a JSON-stored column.
1028
+ * Needs `@atscript/moost-db` 0.1.132+. Since 0.1.139.
1029
+ */
1030
+ filterOps?: string[];
1024
1031
  }
1025
1032
  /** Meta response from moost-db `/meta` endpoint. */
1026
1033
  interface MetaResponse {
@@ -1114,8 +1121,16 @@ interface ColumnDef {
1114
1121
  selectWith?: string[];
1115
1122
  /** Whether this column supports sorting. */
1116
1123
  sortable: boolean;
1117
- /** Whether this column supports filtering. */
1124
+ /** Whether this column supports value filtering (the server's `filterable`). */
1118
1125
  filterable: boolean;
1126
+ /**
1127
+ * Narrower filter operators the server accepts on a column that is not
1128
+ * value-filterable — `["$exists"]` on a JSON-stored column, whose value
1129
+ * cannot be compared but whose presence can. Copied from
1130
+ * `meta.fields[path].filterOps`; omitted when absent. Filter UIs read it
1131
+ * through `columnFilterConditions()` from `@atscript/ui-table`. Since 0.1.139.
1132
+ */
1133
+ filterOps?: string[];
1119
1134
  /**
1120
1135
  * Whether the column accepts `null` values (atscript prop is `optional`).
1121
1136
  * Drives operator-picker availability — `null` / `notNull` are dropped
package/dist/index.mjs CHANGED
@@ -2290,6 +2290,7 @@ function createTableDef(meta, preDeserializedType) {
2290
2290
  selectWith: getFieldMeta(prop, UI_TABLE_SELECT_WITH),
2291
2291
  sortable: fieldMeta?.sortable ?? false,
2292
2292
  filterable: fieldMeta?.filterable ?? false,
2293
+ ...fieldMeta?.filterOps && { filterOps: [...fieldMeta.filterOps] },
2293
2294
  nullable: prop.optional === true,
2294
2295
  width: getFieldMeta(prop, UI_TABLE_WIDTH),
2295
2296
  maxLen: maxLengthMeta?.length,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atscript/ui",
3
- "version": "0.1.138",
3
+ "version": "0.1.140",
4
4
  "description": "Framework-agnostic runtime for form and table definitions from atscript annotated types",
5
5
  "keywords": [
6
6
  "annotations",
@@ -47,11 +47,11 @@
47
47
  "access": "public"
48
48
  },
49
49
  "dependencies": {
50
- "@atscript/db-client": "^0.1.131"
50
+ "@atscript/db-client": "^0.1.133"
51
51
  },
52
52
  "devDependencies": {
53
53
  "@atscript/core": "^0.1.93",
54
- "@atscript/db": "^0.1.131",
54
+ "@atscript/db": "^0.1.133",
55
55
  "@atscript/typescript": "^0.1.93",
56
56
  "unplugin-atscript": "^0.1.93",
57
57
  "vitest": "npm:@voidzero-dev/vite-plus-test@0.1.14"