@juicemantics/veloiq-ui 0.2.0 → 0.2.1

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.mts CHANGED
@@ -103,11 +103,14 @@ interface FieldDef {
103
103
  readOnly?: boolean;
104
104
  unique?: boolean;
105
105
  nullable?: boolean;
106
+ showViewType?: string;
107
+ editViewType?: string;
106
108
  /** Roles allowed to read this field (absent = all roles). Emitted by veloiq_field(read_roles=…). */
107
109
  readRoles?: string[];
108
110
  /** Roles allowed to write this field (absent = all roles). Emitted by veloiq_field(write_roles=…). */
109
111
  writeRoles?: string[];
110
112
  }
113
+ type RelationViewType = "table" | "editable-table" | "editable-list" | "list" | "csv" | "read-and-edit-list" | "read-and-edit-csv" | "editable-csv" | "gallery" | "calendar" | "primary" | "totals-details" | "tree" | "tree-details";
111
114
  interface MillerLeafConfig {
112
115
  relationPath: string;
113
116
  targetKey: string;
@@ -128,8 +131,8 @@ interface RelationDef {
128
131
  isRecursive?: boolean;
129
132
  minItems?: number;
130
133
  maxItems?: number;
131
- showViewType?: "table" | "editable-table" | "editable-list" | "list" | "csv" | "gallery" | "calendar" | "primary" | "totals-details" | "tree" | "tree-details";
132
- editViewType?: "table" | "editable-table" | "editable-list" | "list" | "csv" | "gallery" | "calendar" | "primary" | "totals-details" | "tree" | "tree-details";
134
+ showViewType?: RelationViewType;
135
+ editViewType?: RelationViewType;
133
136
  showViewTypeFromCsv?: boolean;
134
137
  editViewTypeFromCsv?: boolean;
135
138
  showCustomPageName?: string;
@@ -155,6 +158,15 @@ interface ModelDef {
155
158
  description?: string;
156
159
  pkField?: string;
157
160
  listViewType?: "table" | "gallery" | "calendar" | "totals-details";
161
+ /** True when this ModelDef represents a NamedQuery rather than a plain model table. */
162
+ isNamedQuery?: boolean;
163
+ /** Resource name of the primary model (for show/edit navigation and write routing). */
164
+ primaryResource?: string;
165
+ /** Default sort applied on first load when no saved preference exists. */
166
+ defaultSort?: {
167
+ field: string;
168
+ order: "asc" | "desc";
169
+ };
158
170
  }
159
171
  type PrimaryShowRendererProps = {
160
172
  model: ModelDef;
@@ -163,7 +175,6 @@ type PrimaryShowRendererProps = {
163
175
  viewName?: string;
164
176
  };
165
177
  declare const PrimaryShowContext: React__default.Context<React__default.ComponentType<PrimaryShowRendererProps> | null>;
166
- type RelationViewType = "table" | "editable-table" | "editable-list" | "list" | "csv" | "gallery" | "calendar" | "primary" | "totals-details" | "tree" | "tree-details";
167
178
  interface BulkActionDef {
168
179
  key: string;
169
180
  label: string;
package/dist/index.d.ts CHANGED
@@ -103,11 +103,14 @@ interface FieldDef {
103
103
  readOnly?: boolean;
104
104
  unique?: boolean;
105
105
  nullable?: boolean;
106
+ showViewType?: string;
107
+ editViewType?: string;
106
108
  /** Roles allowed to read this field (absent = all roles). Emitted by veloiq_field(read_roles=…). */
107
109
  readRoles?: string[];
108
110
  /** Roles allowed to write this field (absent = all roles). Emitted by veloiq_field(write_roles=…). */
109
111
  writeRoles?: string[];
110
112
  }
113
+ type RelationViewType = "table" | "editable-table" | "editable-list" | "list" | "csv" | "read-and-edit-list" | "read-and-edit-csv" | "editable-csv" | "gallery" | "calendar" | "primary" | "totals-details" | "tree" | "tree-details";
111
114
  interface MillerLeafConfig {
112
115
  relationPath: string;
113
116
  targetKey: string;
@@ -128,8 +131,8 @@ interface RelationDef {
128
131
  isRecursive?: boolean;
129
132
  minItems?: number;
130
133
  maxItems?: number;
131
- showViewType?: "table" | "editable-table" | "editable-list" | "list" | "csv" | "gallery" | "calendar" | "primary" | "totals-details" | "tree" | "tree-details";
132
- editViewType?: "table" | "editable-table" | "editable-list" | "list" | "csv" | "gallery" | "calendar" | "primary" | "totals-details" | "tree" | "tree-details";
134
+ showViewType?: RelationViewType;
135
+ editViewType?: RelationViewType;
133
136
  showViewTypeFromCsv?: boolean;
134
137
  editViewTypeFromCsv?: boolean;
135
138
  showCustomPageName?: string;
@@ -155,6 +158,15 @@ interface ModelDef {
155
158
  description?: string;
156
159
  pkField?: string;
157
160
  listViewType?: "table" | "gallery" | "calendar" | "totals-details";
161
+ /** True when this ModelDef represents a NamedQuery rather than a plain model table. */
162
+ isNamedQuery?: boolean;
163
+ /** Resource name of the primary model (for show/edit navigation and write routing). */
164
+ primaryResource?: string;
165
+ /** Default sort applied on first load when no saved preference exists. */
166
+ defaultSort?: {
167
+ field: string;
168
+ order: "asc" | "desc";
169
+ };
158
170
  }
159
171
  type PrimaryShowRendererProps = {
160
172
  model: ModelDef;
@@ -163,7 +175,6 @@ type PrimaryShowRendererProps = {
163
175
  viewName?: string;
164
176
  };
165
177
  declare const PrimaryShowContext: React__default.Context<React__default.ComponentType<PrimaryShowRendererProps> | null>;
166
- type RelationViewType = "table" | "editable-table" | "editable-list" | "list" | "csv" | "gallery" | "calendar" | "primary" | "totals-details" | "tree" | "tree-details";
167
178
  interface BulkActionDef {
168
179
  key: string;
169
180
  label: string;