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