@dforge-core/metadata 0.0.43 → 0.0.45

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.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export { a as ActionDef, A as ActionExecutionMode, b as ActionsFile } from './actions-DvYTrCbP.js';
1
+ export { a as ActionDef, A as ActionExecutionMode, b as ActionParamSetDef, c as ActionsFile } from './actions-D-0G_mqf.js';
2
2
 
3
3
  /** A `{ cd, name }` pair for friendly pickers (view kinds, viz types, …). */
4
4
  interface NamedKind {
@@ -16,7 +16,7 @@ type BaseDatatypeCd = "binary" | "bool" | "culture" | "cuid" | "date" | "guid" |
16
16
  * isNullable:false at install). */
17
17
  type FlagCd = "V" | "I" | "E" | "M";
18
18
  /** Known field type codes from the field_type seed. */
19
- type FieldTypeCd = "text" | "email" | "phone" | "url" | "textarea" | "number" | "currency" | "percent" | "checkbox" | "date" | "datetime" | "time" | "dropdown" | "flags" | "json" | "hidden" | "color" | "image" | "file" | "markdown" | "richtext" | "avatar" | "lookup" | "user" | "grid" | "list" | "tags" | "entitylink" | "code";
19
+ type FieldTypeCd = "text" | "email" | "phone" | "url" | "textarea" | "number" | "currency" | "percent" | "filesize" | "checkbox" | "date" | "datetime" | "time" | "dropdown" | "flags" | "json" | "hidden" | "color" | "image" | "file" | "markdown" | "richtext" | "avatar" | "lookup" | "user" | "grid" | "list" | "tags" | "entitylink" | "code";
20
20
  /**
21
21
  * A UI field type from the `field_type` table. The author picks one of these;
22
22
  * the physical `dbDatatype` and `baseDatatypeCd` are derived from it.
@@ -248,6 +248,15 @@ declare const fieldTypes: readonly [{
248
248
  readonly maxLen: null;
249
249
  readonly precision: 2;
250
250
  readonly useStringInFilter: false;
251
+ }, {
252
+ readonly cd: "filesize";
253
+ readonly name: "File Size";
254
+ readonly columnType: "D";
255
+ readonly baseDatatypeCd: "number";
256
+ readonly supportedAgg: "SCAM";
257
+ readonly maxLen: null;
258
+ readonly precision: null;
259
+ readonly useStringInFilter: false;
251
260
  }, {
252
261
  readonly cd: "checkbox";
253
262
  readonly name: "Checkbox";
@@ -973,7 +982,11 @@ interface ReportQuery {
973
982
  }
974
983
  /** Per-column metadata override on a dataset. */
975
984
  interface ColumnDef {
985
+ /** A literal header: wins over the entity's or the procedure's translated one. */
976
986
  label?: string;
987
+ fieldTypeCd?: string;
988
+ format?: string;
989
+ /** Accepted, but read by nothing. */
977
990
  visible?: boolean;
978
991
  width?: number;
979
992
  }
package/dist/index.js CHANGED
@@ -20,6 +20,7 @@ var fieldTypes = [
20
20
  { cd: "number", name: "Number", columnType: "D", baseDatatypeCd: "number", supportedAgg: "SCAM", maxLen: null, precision: null, useStringInFilter: false },
21
21
  { cd: "currency", name: "Currency", columnType: "D", baseDatatypeCd: "number", supportedAgg: "SCAM", maxLen: null, precision: 2, useStringInFilter: false },
22
22
  { cd: "percent", name: "Percent", columnType: "D", baseDatatypeCd: "number", supportedAgg: "CAM", maxLen: null, precision: 2, useStringInFilter: false },
23
+ { cd: "filesize", name: "File Size", columnType: "D", baseDatatypeCd: "number", supportedAgg: "SCAM", maxLen: null, precision: null, useStringInFilter: false },
23
24
  { cd: "checkbox", name: "Checkbox", columnType: "D", baseDatatypeCd: "bool", supportedAgg: "C", maxLen: null, precision: null, useStringInFilter: false },
24
25
  { cd: "date", name: "Date", columnType: "D", baseDatatypeCd: "date", supportedAgg: "CM", maxLen: null, precision: null, useStringInFilter: false },
25
26
  { cd: "datetime", name: "Date & Time", columnType: "D", baseDatatypeCd: "timestamp", supportedAgg: "CM", maxLen: null, precision: null, useStringInFilter: false },
@@ -256,7 +257,8 @@ var NUMERIC_TOTAL = 18;
256
257
  var TEXT_BACKED = /* @__PURE__ */ new Set(["textarea", "markdown", "richtext", "code"]);
257
258
  var DB_DATATYPE_OVERRIDE = {
258
259
  file: "jsonb",
259
- image: "jsonb"
260
+ image: "jsonb",
261
+ filesize: "int8"
260
262
  };
261
263
  function deriveDbDatatype(fieldTypeCd, options = {}) {
262
264
  const ft = getFieldType(fieldTypeCd);