@vuu-ui/vuu-data-types 5.0.0-alpha.2 → 5.0.0-alpha.3

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.
Files changed (2) hide show
  1. package/index.d.ts +35 -0
  2. package/package.json +3 -3
package/index.d.ts CHANGED
@@ -42,7 +42,10 @@ import type {
42
42
  } from "@vuu-ui/vuu-utils";
43
43
  import type {
44
44
  ColumnDescriptor,
45
+ ColumnTypeRendering,
45
46
  DataValueTypeDescriptor,
47
+ LookupRenderer,
48
+ ValueListRenderer,
46
49
  } from "@vuu-ui/vuu-table-types";
47
50
  import type { PostMessageToClientCallback } from "@vuu-ui/vuu-data-remote";
48
51
 
@@ -171,8 +174,40 @@ export declare type DataEditable =
171
174
  update: boolean;
172
175
  };
173
176
 
177
+ /**
178
+ * Requests a typeahead editor, which suggests values already present in the
179
+ * table. Suits codes (currency, exchange), not free text.
180
+ */
181
+ export interface TypeaheadEditor {
182
+ name: "typeahead";
183
+ /**
184
+ * 0 shows suggestions on focus, like a dropdown. Use 1 or more for columns
185
+ * with many distinct values, so the user must type first.
186
+ * @default 1
187
+ */
188
+ minCharacterCountToTriggerSuggestions?: 0 | 1 | 2 | 3;
189
+ }
190
+
191
+ /**
192
+ * How a value is edited, in a table cell or a form field. Names a registered
193
+ * cell editor (e.g. "input-cell", "checkbox-cell", "dropdown-cell") with any
194
+ * options it needs, or requests a typeahead.
195
+ */
196
+ export declare type DataValueEditor =
197
+ | ColumnTypeRendering
198
+ | LookupRenderer
199
+ | ValueListRenderer
200
+ | TypeaheadEditor;
201
+
174
202
  export interface DataValueDescriptor {
203
+ /**
204
+ * Whether the value can be edited. On a server schema column, what the
205
+ * server allows. On a client descriptor (e.g. a table column) it can only
206
+ * narrow what the server allows.
207
+ */
175
208
  editable?: DataEditable;
209
+ /** How the value is edited, in a table cell or a form field. */
210
+ editor?: DataValueEditor;
176
211
  /**
177
212
  There are three values for editableBulk.
178
213
  - false user will not see these values when applying a bulk edit.
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@vuu-ui/vuu-data-types",
3
- "version": "5.0.0-alpha.2",
3
+ "version": "5.0.0-alpha.3",
4
4
  "author": "heswell",
5
5
  "license": "Apache-2.0",
6
6
  "devDependencies": {
7
- "@vuu-ui/vuu-filter-types": "5.0.0-alpha.2",
8
- "@vuu-ui/vuu-protocol-types": "5.0.0-alpha.2"
7
+ "@vuu-ui/vuu-filter-types": "5.0.0-alpha.3",
8
+ "@vuu-ui/vuu-protocol-types": "5.0.0-alpha.3"
9
9
  },
10
10
  "dependencies": {},
11
11
  "peerDependencies": {},