@vuu-ui/vuu-data-types 4.0.0-alpha.9 → 4.0.0-beta.2

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 +47 -7
  2. package/package.json +3 -3
package/index.d.ts CHANGED
@@ -1,4 +1,11 @@
1
- import type { Filter } from "@vuu-ui/vuu-filter-types";
1
+ import type {
2
+ ColumnDescriptorsByName,
3
+ Filter,
4
+ } from "@vuu-ui/vuu-filter-types";
5
+
6
+ export interface SetFilterOptions {
7
+ columnsByName?: ColumnDescriptorsByName;
8
+ }
2
9
  import type {
3
10
  LinkDescriptorWithLabel,
4
11
  NoAction,
@@ -109,6 +116,7 @@ export declare type DataValueTypeSimple =
109
116
  | "boolean"
110
117
  | "json"
111
118
  | DateTimeDataValueTypeSimple
119
+ | DateDataValueTypeSimple
112
120
  | TimeDataValueTypeSimple
113
121
  | DecimalValueTypeSimple
114
122
  | "checkbox";
@@ -117,14 +125,40 @@ export declare type DataValueType =
117
125
  | DataValueTypeSimple
118
126
  | DataValueTypeDescriptor;
119
127
 
128
+ /** Time of day only, date component (if any) is not displayed */
120
129
  export declare type TimeDataValueTypeSimple = "time";
130
+ /** Date and time of day */
121
131
  export declare type DateTimeDataValueTypeSimple = "date/time";
132
+ /** Calendar date only, time of day (if any) is not displayed */
133
+ export declare type DateDataValueTypeSimple = "date";
134
+ /**
135
+ * The DataValueTypeSimple values that identify a value as temporal. Can be used to
136
+ * refine a numeric serverDataType (legacy) or the 'kind' of an epochtimestamp or
137
+ * epochtimestampnano value.
138
+ */
139
+ export declare type TemporalDataValueTypeSimple =
140
+ | DateTimeDataValueTypeSimple
141
+ | DateDataValueTypeSimple
142
+ | TimeDataValueTypeSimple;
122
143
  export declare type DecimalValueTypeSimple = "decimal" | "scaleddecimal";
123
144
 
124
145
  export declare type DateTimeDataValueType =
125
- | DateTimeColumnTypeSimple
146
+ | DateTimeDataValueTypeSimple
147
+ | DateDataValueTypeSimple
126
148
  | (Omit<DataValueTypeDescriptor, "name"> & {
127
- name: DateTimeColumnTypeSimple;
149
+ name: DateTimeDataValueTypeSimple | DateDataValueTypeSimple;
150
+ });
151
+
152
+ export declare type TimeDataValueType =
153
+ | TimeDataValueTypeSimple
154
+ | (Omit<DataValueTypeDescriptor, "name"> & {
155
+ name: TimeDataValueTypeSimple;
156
+ });
157
+
158
+ export declare type TemporalDataValueType =
159
+ | TemporalDataValueTypeSimple
160
+ | (Omit<DataValueTypeDescriptor, "name"> & {
161
+ name: TemporalDataValueTypeSimple;
128
162
  });
129
163
 
130
164
  export declare type BulkEdit = "bulk" | false | "read-only";
@@ -394,8 +428,9 @@ export declare type ConfigChangeMessage =
394
428
  export declare type ConfigChangeHandler = (msg: ConfigChangeMessage) => void;
395
429
 
396
430
  export declare type SchemaColumn = {
397
- editable?: boolean;
431
+ editable?: DataEditable;
398
432
  name: string;
433
+ required?: boolean;
399
434
  serverDataType: VuuColumnDataType;
400
435
  };
401
436
 
@@ -458,7 +493,6 @@ export interface DataSourceConstructorProps
458
493
  */
459
494
  autosubscribeColumns?: string[];
460
495
  bufferSize?: number;
461
- connectionId?: string;
462
496
  /**
463
497
  * For datasources that support edit sessions, some services support an additional
464
498
  * column on session tables that will be used to return status information for a row
@@ -740,9 +774,15 @@ export interface DataSourceBase<
740
774
  * (or ExtendedFilter) object. The real advantage to using this is the additional set
741
775
  * of capabilities the ExtendedFilter offers.
742
776
  * Eventually, this will replace the existing filter setter
777
+ *
778
+ * Filter clauses on temporal columns are serialized according to the column
779
+ * type (see temporalFilterAsQuery), e.g a date '=' becomes a day range. Column
780
+ * types are taken from the tableSchema, where available. Pass columnsByName
781
+ * where columns are refined on the client (e.g a long column with type 'date/time'
782
+ * or 'time', or a column with a time zone).
743
783
  */
744
784
  clearFilter?: () => void;
745
- setFilter?: (filter: Filter) => void;
785
+ setFilter?: (filter: Filter, options?: SetFilterOptions) => void;
746
786
 
747
787
  /**
748
788
  * Only implemented on JSON DataSource
@@ -838,7 +878,7 @@ export interface ServerProxySubscribeMessage extends WithFullConfig {
838
878
  // };
839
879
 
840
880
  export declare type VuuUIMessageInConnected = {
841
- loginResponse: VuuLoginSuccessResponse & { sessionId: string };
881
+ sessionId: string;
842
882
  type: "connected";
843
883
  };
844
884
 
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@vuu-ui/vuu-data-types",
3
- "version": "4.0.0-alpha.9",
3
+ "version": "4.0.0-beta.2",
4
4
  "author": "heswell",
5
5
  "license": "Apache-2.0",
6
6
  "devDependencies": {
7
- "@vuu-ui/vuu-filter-types": "4.0.0-alpha.9",
8
- "@vuu-ui/vuu-protocol-types": "4.0.0-alpha.9"
7
+ "@vuu-ui/vuu-filter-types": "4.0.0-beta.2",
8
+ "@vuu-ui/vuu-protocol-types": "4.0.0-beta.2"
9
9
  },
10
10
  "dependencies": {},
11
11
  "peerDependencies": {},