@vuu-ui/vuu-data-types 4.0.0-alpha.18 → 4.0.0-alpha.19

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 +44 -4
  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";
@@ -741,9 +775,15 @@ export interface DataSourceBase<
741
775
  * (or ExtendedFilter) object. The real advantage to using this is the additional set
742
776
  * of capabilities the ExtendedFilter offers.
743
777
  * Eventually, this will replace the existing filter setter
778
+ *
779
+ * Filter clauses on temporal columns are serialized according to the column
780
+ * type (see temporalFilterAsQuery), e.g a date '=' becomes a day range. Column
781
+ * types are taken from the tableSchema, where available. Pass columnsByName
782
+ * where columns are refined on the client (e.g a long column with type 'date/time'
783
+ * or 'time', or a column with a time zone).
744
784
  */
745
785
  clearFilter?: () => void;
746
- setFilter?: (filter: Filter) => void;
786
+ setFilter?: (filter: Filter, options?: SetFilterOptions) => void;
747
787
 
748
788
  /**
749
789
  * 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.18",
3
+ "version": "4.0.0-alpha.19",
4
4
  "author": "heswell",
5
5
  "license": "Apache-2.0",
6
6
  "devDependencies": {
7
- "@vuu-ui/vuu-filter-types": "4.0.0-alpha.18",
8
- "@vuu-ui/vuu-protocol-types": "4.0.0-alpha.18"
7
+ "@vuu-ui/vuu-filter-types": "4.0.0-alpha.19",
8
+ "@vuu-ui/vuu-protocol-types": "4.0.0-alpha.19"
9
9
  },
10
10
  "dependencies": {},
11
11
  "peerDependencies": {},