@vuu-ui/vuu-data-types 4.0.0-alpha.3 → 4.0.0-alpha.31

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 -5
  2. package/package.json +3 -3
package/index.d.ts CHANGED
@@ -1,4 +1,8 @@
1
- import type { Filter } from "@vuu-ui/vuu-filter-types";
1
+ import type { ColumnDescriptorsByName, Filter } from "@vuu-ui/vuu-filter-types";
2
+
3
+ export interface SetFilterOptions {
4
+ columnsByName?: ColumnDescriptorsByName;
5
+ }
2
6
  import type {
3
7
  LinkDescriptorWithLabel,
4
8
  NoAction,
@@ -109,6 +113,7 @@ export declare type DataValueTypeSimple =
109
113
  | "boolean"
110
114
  | "json"
111
115
  | DateTimeDataValueTypeSimple
116
+ | DateDataValueTypeSimple
112
117
  | TimeDataValueTypeSimple
113
118
  | DecimalValueTypeSimple
114
119
  | "checkbox";
@@ -117,14 +122,40 @@ export declare type DataValueType =
117
122
  | DataValueTypeSimple
118
123
  | DataValueTypeDescriptor;
119
124
 
125
+ /** Time of day only, date component (if any) is not displayed */
120
126
  export declare type TimeDataValueTypeSimple = "time";
127
+ /** Date and time of day */
121
128
  export declare type DateTimeDataValueTypeSimple = "date/time";
129
+ /** Calendar date only, time of day (if any) is not displayed */
130
+ export declare type DateDataValueTypeSimple = "date";
131
+ /**
132
+ * The DataValueTypeSimple values that identify a value as temporal. Can be used to
133
+ * refine a numeric serverDataType (legacy) or the 'kind' of an epochtimestamp or
134
+ * epochtimestampnano value.
135
+ */
136
+ export declare type TemporalDataValueTypeSimple =
137
+ | DateTimeDataValueTypeSimple
138
+ | DateDataValueTypeSimple
139
+ | TimeDataValueTypeSimple;
122
140
  export declare type DecimalValueTypeSimple = "decimal" | "scaleddecimal";
123
141
 
124
142
  export declare type DateTimeDataValueType =
125
- | DateTimeColumnTypeSimple
143
+ | DateTimeDataValueTypeSimple
144
+ | DateDataValueTypeSimple
145
+ | (Omit<DataValueTypeDescriptor, "name"> & {
146
+ name: DateTimeDataValueTypeSimple | DateDataValueTypeSimple;
147
+ });
148
+
149
+ export declare type TimeDataValueType =
150
+ | TimeDataValueTypeSimple
126
151
  | (Omit<DataValueTypeDescriptor, "name"> & {
127
- name: DateTimeColumnTypeSimple;
152
+ name: TimeDataValueTypeSimple;
153
+ });
154
+
155
+ export declare type TemporalDataValueType =
156
+ | TemporalDataValueTypeSimple
157
+ | (Omit<DataValueTypeDescriptor, "name"> & {
158
+ name: TemporalDataValueTypeSimple;
128
159
  });
129
160
 
130
161
  export declare type BulkEdit = "bulk" | false | "read-only";
@@ -394,8 +425,9 @@ export declare type ConfigChangeMessage =
394
425
  export declare type ConfigChangeHandler = (msg: ConfigChangeMessage) => void;
395
426
 
396
427
  export declare type SchemaColumn = {
397
- editable?: boolean;
428
+ editable?: DataEditable;
398
429
  name: string;
430
+ required?: boolean;
399
431
  serverDataType: VuuColumnDataType;
400
432
  };
401
433
 
@@ -478,6 +510,10 @@ export interface DataSourceConstructorProps
478
510
  viewport?: string;
479
511
  }
480
512
 
513
+ /**
514
+ * The Vuu server a remote module connects to. Published by the remote in its
515
+ * `config.json`, not by the module registry.
516
+ */
481
517
  export interface RemoteModuleConnection {
482
518
  connectionId: string;
483
519
  restUrl?: string;
@@ -740,9 +776,15 @@ export interface DataSourceBase<
740
776
  * (or ExtendedFilter) object. The real advantage to using this is the additional set
741
777
  * of capabilities the ExtendedFilter offers.
742
778
  * Eventually, this will replace the existing filter setter
779
+ *
780
+ * Filter clauses on temporal columns are serialized according to the column
781
+ * type (see temporalFilterAsQuery), e.g a date '=' becomes a day range. Column
782
+ * types are taken from the tableSchema, where available. Pass columnsByName
783
+ * where columns are refined on the client (e.g a long column with type 'date/time'
784
+ * or 'time', or a column with a time zone).
743
785
  */
744
786
  clearFilter?: () => void;
745
- setFilter?: (filter: Filter) => void;
787
+ setFilter?: (filter: Filter, options?: SetFilterOptions) => void;
746
788
 
747
789
  /**
748
790
  * Only implemented on JSON DataSource
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@vuu-ui/vuu-data-types",
3
- "version": "4.0.0-alpha.3",
3
+ "version": "4.0.0-alpha.31",
4
4
  "author": "heswell",
5
5
  "license": "Apache-2.0",
6
6
  "devDependencies": {
7
- "@vuu-ui/vuu-filter-types": "4.0.0-alpha.3",
8
- "@vuu-ui/vuu-protocol-types": "4.0.0-alpha.3"
7
+ "@vuu-ui/vuu-filter-types": "4.0.0-alpha.31",
8
+ "@vuu-ui/vuu-protocol-types": "4.0.0-alpha.31"
9
9
  },
10
10
  "dependencies": {},
11
11
  "peerDependencies": {},