@vuu-ui/vuu-data-types 0.8.21 → 0.8.22-debug
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.
- package/index.d.ts +748 -0
- package/package.json +4 -3
- package/LICENSE +0 -201
package/index.d.ts
ADDED
|
@@ -0,0 +1,748 @@
|
|
|
1
|
+
import type { Filter } from "@vuu-ui/vuu-filter-types";
|
|
2
|
+
import type { MenuActionClosePopup } from "@vuu-ui/vuu-popups";
|
|
3
|
+
import type {
|
|
4
|
+
ClientToServerEditRpc,
|
|
5
|
+
ClientToServerMenuRPC,
|
|
6
|
+
ClientToServerViewportRpcCall,
|
|
7
|
+
VuuAggregation,
|
|
8
|
+
VuuColumnDataType,
|
|
9
|
+
VuuColumns,
|
|
10
|
+
VuuDataRowDto,
|
|
11
|
+
VuuFilter,
|
|
12
|
+
VuuGroupBy,
|
|
13
|
+
VuuLinkDescriptor,
|
|
14
|
+
VuuMenu,
|
|
15
|
+
VuuRowDataItemType,
|
|
16
|
+
VuuSort,
|
|
17
|
+
VuuTable,
|
|
18
|
+
} from "@vuu-ui/vuu-protocol-types";
|
|
19
|
+
import type { IEventEmitter } from "@vuu-ui/vuu-utils";
|
|
20
|
+
import type {
|
|
21
|
+
DataSourceFilter,
|
|
22
|
+
MenuRpcResponse,
|
|
23
|
+
Selection,
|
|
24
|
+
TableSchema,
|
|
25
|
+
} from "@vuu-ui/vuu-data-types";
|
|
26
|
+
import type {
|
|
27
|
+
ClientToServerTableList,
|
|
28
|
+
ClientToServerTableMeta,
|
|
29
|
+
LinkDescriptorWithLabel,
|
|
30
|
+
ServerToClientViewportRpcResponse,
|
|
31
|
+
TypeAheadMethod,
|
|
32
|
+
VuuRange,
|
|
33
|
+
} from "@vuu-ui/vuu-protocol-types";
|
|
34
|
+
|
|
35
|
+
export interface DataSourceFilter extends VuuFilter {
|
|
36
|
+
filterStruct?: Filter;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export interface NamedDataSourceFilter extends DataSourceFilter {
|
|
40
|
+
id?: string;
|
|
41
|
+
name?: string;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
type RowIndex = number;
|
|
45
|
+
type RenderKey = number;
|
|
46
|
+
type IsLeaf = boolean;
|
|
47
|
+
type IsExpanded = boolean;
|
|
48
|
+
type Depth = number;
|
|
49
|
+
type ChildCount = number;
|
|
50
|
+
type RowKey = string;
|
|
51
|
+
export type IsSelected = number;
|
|
52
|
+
|
|
53
|
+
export type DataSourceRow = [
|
|
54
|
+
RowIndex,
|
|
55
|
+
RenderKey,
|
|
56
|
+
IsLeaf,
|
|
57
|
+
IsExpanded,
|
|
58
|
+
Depth,
|
|
59
|
+
ChildCount,
|
|
60
|
+
RowKey,
|
|
61
|
+
IsSelected,
|
|
62
|
+
...VuuRowDataItemType[]
|
|
63
|
+
];
|
|
64
|
+
|
|
65
|
+
export type DataSourceRowPredicate = (row: DataSourceRow) => boolean;
|
|
66
|
+
|
|
67
|
+
export interface ContextMenuItemBase {
|
|
68
|
+
className?: string;
|
|
69
|
+
icon?: string;
|
|
70
|
+
label: string;
|
|
71
|
+
location?: string;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export interface ContextMenuLeafItemDescriptor extends ContextMenuItemBase {
|
|
75
|
+
action: string;
|
|
76
|
+
options?: unknown;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export type ContextMenuItemDescriptor =
|
|
80
|
+
| ContextMenuLeafItemDescriptor
|
|
81
|
+
| ContextMenuGroupItemDescriptor;
|
|
82
|
+
|
|
83
|
+
export interface ContextMenuGroupItemDescriptor extends ContextMenuItemBase {
|
|
84
|
+
children: ContextMenuItemDescriptor[];
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export interface MessageWithClientViewportId {
|
|
88
|
+
clientViewportId: string;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export interface DataSourceAggregateMessage
|
|
92
|
+
extends MessageWithClientViewportId {
|
|
93
|
+
aggregations: VuuAggregation[];
|
|
94
|
+
type: "aggregate";
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
export type DataUpdateMode = "batch" | "update" | "size-only";
|
|
98
|
+
|
|
99
|
+
export interface DataSourceDataMessage extends MessageWithClientViewportId {
|
|
100
|
+
mode: DataUpdateMode;
|
|
101
|
+
rows?: DataSourceRow[];
|
|
102
|
+
size?: number;
|
|
103
|
+
type: "viewport-update";
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
export interface DataSourceDataSizeMessage extends MessageWithClientViewportId {
|
|
107
|
+
mode: "size-only";
|
|
108
|
+
size: number;
|
|
109
|
+
type: "viewport-update";
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
export interface DataSourceDisabledMessage extends MessageWithClientViewportId {
|
|
113
|
+
type: "disabled";
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
export interface DataSourceEnabledMessage extends MessageWithClientViewportId {
|
|
117
|
+
type: "enabled";
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
export interface DataSourceColumnsMessage extends MessageWithClientViewportId {
|
|
121
|
+
type: "columns";
|
|
122
|
+
columns: VuuColumns;
|
|
123
|
+
}
|
|
124
|
+
export interface DataSourceFilterMessage extends MessageWithClientViewportId {
|
|
125
|
+
type: "filter";
|
|
126
|
+
filter: DataSourceFilter;
|
|
127
|
+
}
|
|
128
|
+
export interface DataSourceGroupByMessage extends MessageWithClientViewportId {
|
|
129
|
+
type: "groupBy";
|
|
130
|
+
groupBy: VuuGroupBy | undefined;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
export interface DataSourceSetConfigMessage
|
|
134
|
+
extends MessageWithClientViewportId {
|
|
135
|
+
type: "config";
|
|
136
|
+
config: WithFullConfig;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
export interface DataSourceDebounceRequest extends MessageWithClientViewportId {
|
|
140
|
+
type: "debounce-begin";
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
export interface DataSourceMenusMessage extends MessageWithClientViewportId {
|
|
144
|
+
type: "vuu-menu";
|
|
145
|
+
menu: VuuMenu;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
export interface DataSourceSortMessage extends MessageWithClientViewportId {
|
|
149
|
+
type: "sort";
|
|
150
|
+
sort: VuuSort;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
export interface DataSourceSubscribedMessage
|
|
154
|
+
extends MessageWithClientViewportId {
|
|
155
|
+
aggregations: VuuAggregation[];
|
|
156
|
+
columns: VuuColumns;
|
|
157
|
+
filter: DataSourceFilter;
|
|
158
|
+
groupBy: VuuGroupBy;
|
|
159
|
+
range: VuuRange;
|
|
160
|
+
sort: VuuSort;
|
|
161
|
+
tableSchema: Readonly<TableSchema>;
|
|
162
|
+
type: "subscribed";
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
export interface DataSourceVisualLinkCreatedMessage
|
|
166
|
+
extends MessageWithClientViewportId {
|
|
167
|
+
colName: string;
|
|
168
|
+
parentViewportId: string;
|
|
169
|
+
parentColName: string;
|
|
170
|
+
type: "vuu-link-created";
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
export interface DataSourceVisualLinkRemovedMessage
|
|
174
|
+
extends MessageWithClientViewportId {
|
|
175
|
+
type: "vuu-link-removed";
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
export interface DataSourceVisualLinksMessage
|
|
179
|
+
extends MessageWithClientViewportId {
|
|
180
|
+
type: "vuu-links";
|
|
181
|
+
links: VuuLinkDescriptor[];
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
export type VuuFeatureInvocationMessage =
|
|
185
|
+
| DataSourceVisualLinkCreatedMessage
|
|
186
|
+
| DataSourceVisualLinkRemovedMessage;
|
|
187
|
+
|
|
188
|
+
export type VuuFeatureMessage =
|
|
189
|
+
| DataSourceMenusMessage
|
|
190
|
+
| DataSourceVisualLinksMessage;
|
|
191
|
+
|
|
192
|
+
export type DataSourceConfigMessage =
|
|
193
|
+
| DataSourceAggregateMessage
|
|
194
|
+
| DataSourceColumnsMessage
|
|
195
|
+
| DataSourceFilterMessage
|
|
196
|
+
| DataSourceGroupByMessage
|
|
197
|
+
| DataSourceSortMessage
|
|
198
|
+
| DataSourceSetConfigMessage;
|
|
199
|
+
|
|
200
|
+
export type DataSourceCallbackMessage =
|
|
201
|
+
| DataSourceConfigMessage
|
|
202
|
+
| DataSourceColumnsMessage
|
|
203
|
+
| DataSourceDataMessage
|
|
204
|
+
| DataSourceDebounceRequest
|
|
205
|
+
| DataSourceDisabledMessage
|
|
206
|
+
| DataSourceEnabledMessage
|
|
207
|
+
| DataSourceMenusMessage
|
|
208
|
+
| DataSourceSubscribedMessage
|
|
209
|
+
| DataSourceVisualLinkCreatedMessage
|
|
210
|
+
| DataSourceVisualLinkRemovedMessage
|
|
211
|
+
| DataSourceVisualLinksMessage;
|
|
212
|
+
|
|
213
|
+
export type ConfigChangeColumnsMessage = {
|
|
214
|
+
type: "columns";
|
|
215
|
+
columns?: ColumnDescriptor[];
|
|
216
|
+
};
|
|
217
|
+
|
|
218
|
+
export type ConfigChangeMessage =
|
|
219
|
+
| ConfigChangeColumnsMessage
|
|
220
|
+
| DataSourceAggregateMessage
|
|
221
|
+
| DataSourceFilterMessage
|
|
222
|
+
| DataSourceGroupByMessage
|
|
223
|
+
| DataSourceSortMessage
|
|
224
|
+
| DataSourceVisualLinkCreatedMessage
|
|
225
|
+
| DataSourceVisualLinkRemovedMessage;
|
|
226
|
+
|
|
227
|
+
export type ConfigChangeHandler = (msg: ConfigChangeMessage) => void;
|
|
228
|
+
|
|
229
|
+
/**
|
|
230
|
+
* MenuBuilder describes a factory function that creates
|
|
231
|
+
* Menu Item Descriptors appropriate to the supplied
|
|
232
|
+
* location. Location can be any string identifier, it
|
|
233
|
+
* can be used to determine which Menu Items to include
|
|
234
|
+
* in the menu. Most often used for ContextMenus.
|
|
235
|
+
*/
|
|
236
|
+
export type MenuBuilder<L = string, O = unknown> = (
|
|
237
|
+
location: L,
|
|
238
|
+
options: O
|
|
239
|
+
) => ContextMenuItemDescriptor[];
|
|
240
|
+
|
|
241
|
+
/**
|
|
242
|
+
* MenuActionHandler describes a function that provides an implementation of
|
|
243
|
+
* one or more MenuItem actions. It will receive the type from the MenuItem
|
|
244
|
+
* clicked, plus any options object associated with that MenuItem.
|
|
245
|
+
*
|
|
246
|
+
* It should return true if it handled this MenuItem. This allows multiple Menu-
|
|
247
|
+
* ActionHandlers to be chained.
|
|
248
|
+
*/
|
|
249
|
+
export type MenuActionHandler = (
|
|
250
|
+
reason: MenuActionClosePopup
|
|
251
|
+
) => boolean | undefined;
|
|
252
|
+
|
|
253
|
+
export interface ContextMenuContextType {
|
|
254
|
+
menuBuilders: MenuBuilder[];
|
|
255
|
+
menuActionHandler: MenuActionHandler;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
export type SchemaColumn = {
|
|
259
|
+
name: string;
|
|
260
|
+
serverDataType: VuuColumnDataType;
|
|
261
|
+
};
|
|
262
|
+
|
|
263
|
+
export type TableSchema = {
|
|
264
|
+
columns: SchemaColumn[];
|
|
265
|
+
key: string;
|
|
266
|
+
table: VuuTable;
|
|
267
|
+
};
|
|
268
|
+
|
|
269
|
+
/**
|
|
270
|
+
* Described the configuration values that should typically be
|
|
271
|
+
* persisted across sessions.
|
|
272
|
+
*/
|
|
273
|
+
export interface WithFullConfig {
|
|
274
|
+
readonly aggregations: VuuAggregation[];
|
|
275
|
+
readonly columns: string[];
|
|
276
|
+
readonly filter: DataSourceFilter;
|
|
277
|
+
readonly groupBy: VuuGroupBy;
|
|
278
|
+
readonly sort: VuuSort;
|
|
279
|
+
readonly visualLink?: LinkDescriptorWithLabel;
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
export interface DataSourceConfig extends Partial<WithFullConfig> {
|
|
283
|
+
visualLink?: LinkDescriptorWithLabel;
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
export interface WithGroupBy extends DataSourceConfig {
|
|
287
|
+
groupBy: VuuGroupBy;
|
|
288
|
+
}
|
|
289
|
+
export interface WithFilter extends DataSourceConfig {
|
|
290
|
+
filter: DataSourceFilter;
|
|
291
|
+
}
|
|
292
|
+
export interface WithSort extends DataSourceConfig {
|
|
293
|
+
sort: VuuSort;
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
export interface DataSourceConstructorProps extends DataSourceConfig {
|
|
297
|
+
bufferSize?: number;
|
|
298
|
+
table: VuuTable;
|
|
299
|
+
title?: string;
|
|
300
|
+
viewport?: string;
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
export interface SubscribeProps {
|
|
304
|
+
viewport?: string;
|
|
305
|
+
columns?: string[];
|
|
306
|
+
aggregations?: VuuAggregation[];
|
|
307
|
+
range?: VuuRange;
|
|
308
|
+
sort?: VuuSort;
|
|
309
|
+
groupBy?: VuuGroupBy;
|
|
310
|
+
filter?: DataSourceFilter;
|
|
311
|
+
title?: string;
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
export type SubscribeCallback = (message: DataSourceCallbackMessage) => void;
|
|
315
|
+
export type OptimizeStrategy = "none" | "throttle" | "debounce";
|
|
316
|
+
|
|
317
|
+
export type DataSourceEvents = {
|
|
318
|
+
config: (config: DataSourceConfig | undefined, confirmed?: boolean) => void;
|
|
319
|
+
optimize: (optimize: OptimizeStrategy) => void;
|
|
320
|
+
range: (range: VuuRange) => void;
|
|
321
|
+
resize: (size: number) => void;
|
|
322
|
+
};
|
|
323
|
+
|
|
324
|
+
/**
|
|
325
|
+
* return Promise<true> indicates success
|
|
326
|
+
* return Promise<errorMessage> indicates failure
|
|
327
|
+
*/
|
|
328
|
+
export type DataSourceEditHandler = (
|
|
329
|
+
row: DataSourceRow,
|
|
330
|
+
columnName: string,
|
|
331
|
+
value: VuuRowDataItemType
|
|
332
|
+
) => Promise<true | string>;
|
|
333
|
+
|
|
334
|
+
export type DataSourceDeleteHandler = (key: string) => Promise<true | string>;
|
|
335
|
+
export type DataSourceInsertHandler = (
|
|
336
|
+
key: string,
|
|
337
|
+
data: VuuDataRowDto
|
|
338
|
+
) => Promise<true | string>;
|
|
339
|
+
|
|
340
|
+
export type RpcResponse =
|
|
341
|
+
| MenuRpcResponse
|
|
342
|
+
| VuuUIMessageInRPCEditReject
|
|
343
|
+
| VuuUIMessageInRPCEditResponse
|
|
344
|
+
| ViewportRpcResponse;
|
|
345
|
+
|
|
346
|
+
export type RpcResponseHandler = (response: RpcResponse) => boolean;
|
|
347
|
+
|
|
348
|
+
export type RowSearchPredicate = (row: DataSourceRow) => boolean;
|
|
349
|
+
|
|
350
|
+
export type DataSourceStatus =
|
|
351
|
+
| "disabled"
|
|
352
|
+
| "disabling"
|
|
353
|
+
| "enabled"
|
|
354
|
+
| "enabling"
|
|
355
|
+
| "initialising"
|
|
356
|
+
| "subscribing"
|
|
357
|
+
| "subscribed"
|
|
358
|
+
| "suspended"
|
|
359
|
+
| "unsubscribed";
|
|
360
|
+
|
|
361
|
+
export interface TypeaheadSuggestionProvider {
|
|
362
|
+
getTypeaheadSuggestions: (
|
|
363
|
+
columnName: string,
|
|
364
|
+
pattern?: string
|
|
365
|
+
) => Promise<string[]>;
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
export type RangeTuple = [from: number, to: number];
|
|
369
|
+
export type SelectionItem = number | RangeTuple;
|
|
370
|
+
export type Selection = SelectionItem[];
|
|
371
|
+
export type SelectionChangeHandler = (selection: Selection) => void;
|
|
372
|
+
|
|
373
|
+
export interface DataSource
|
|
374
|
+
extends IEventEmitter<DataSourceEvents>,
|
|
375
|
+
Partial<TypeaheadSuggestionProvider> {
|
|
376
|
+
aggregations: VuuAggregation[];
|
|
377
|
+
applyEdit: DataSourceEditHandler;
|
|
378
|
+
/**
|
|
379
|
+
* set config without triggering config event. Use this method when initialising
|
|
380
|
+
* a dataSource that has been restored from session state. The dataSource will
|
|
381
|
+
* not yet be subscribed. Triggering the config event is unnecessary and might
|
|
382
|
+
* cause a React exception if the event were to cause a render.
|
|
383
|
+
* @param config DataSourceConfig
|
|
384
|
+
* @returns true if config has been applied (will not be if existig config is same)
|
|
385
|
+
*/
|
|
386
|
+
applyConfig: (config: DataSourceConfig) => true | undefined;
|
|
387
|
+
closeTreeNode: (key: string, cascade?: boolean) => void;
|
|
388
|
+
columns: string[];
|
|
389
|
+
config: DataSourceConfig;
|
|
390
|
+
status: DataSourceStatus;
|
|
391
|
+
/**
|
|
392
|
+
*
|
|
393
|
+
* Similar to disable but intended for pauses of very short duration (default is 3 seconds). Although
|
|
394
|
+
* the dataSource will stop sending messages until resumed, it will not disconnect from a remote server.
|
|
395
|
+
* It will preserve subscription to the remote server and continue to apply updates to cached data. It
|
|
396
|
+
* just won't send updates through to the UI thread (until resumed). Useful in edge cases such as where a
|
|
397
|
+
* component is dragged to a new location. When dropped, the component will be unmounted and very quickly
|
|
398
|
+
* remounted by React. For the duration of this operation, we suspend updates . Updating an unmounted
|
|
399
|
+
* React component would cause a React error.
|
|
400
|
+
* If an suspend is requested and not resumed within 3 seconds, it will automatically be promoted to a disable.,
|
|
401
|
+
*/
|
|
402
|
+
suspend?: () => void;
|
|
403
|
+
resume?: () => void;
|
|
404
|
+
|
|
405
|
+
deleteRow?: DataSourceDeleteHandler;
|
|
406
|
+
|
|
407
|
+
/**
|
|
408
|
+
* For a dataSource that has been previously disabled and is currently in disabled state , this will restore
|
|
409
|
+
* the subscription to active status. Fresh data will be dispatched to client. The enable call optionally
|
|
410
|
+
* accepts the same subscribe callback as subscribe. This allows a completely new instance of a component to
|
|
411
|
+
* assume ownership of a subscription and receive all messages.
|
|
412
|
+
*/
|
|
413
|
+
enable?: (callback?: SubscribeCallback) => void;
|
|
414
|
+
/**
|
|
415
|
+
* Disables this subscription. A datasource will send no further messages until re-enabled. Example usage
|
|
416
|
+
* might be for a component displayed within a set of Tabs. If user switches to another tab, the dataSource
|
|
417
|
+
* of the component that is no longer visible can be disabled until it is made visible again.
|
|
418
|
+
*/
|
|
419
|
+
disable?: () => void;
|
|
420
|
+
filter: DataSourceFilter;
|
|
421
|
+
|
|
422
|
+
/**
|
|
423
|
+
* Only implemented on JSON DataSource
|
|
424
|
+
* @param depth
|
|
425
|
+
* @param visibleOnly
|
|
426
|
+
* @returns
|
|
427
|
+
*/
|
|
428
|
+
getChildRows?: (rowKey: string) => DataSourceRow[];
|
|
429
|
+
/**
|
|
430
|
+
* Only implemented on JSON DataSource
|
|
431
|
+
* @param depth
|
|
432
|
+
* @param visibleOnly
|
|
433
|
+
* @returns
|
|
434
|
+
*/
|
|
435
|
+
getRowsAtDepth?: (depth: number, visibleOnly?: boolean) => DataSourceRow[];
|
|
436
|
+
groupBy: VuuGroupBy;
|
|
437
|
+
insertRow?: DataSourceInsertHandler;
|
|
438
|
+
links?: LinkDescriptorWithLabel[];
|
|
439
|
+
menu?: VuuMenu;
|
|
440
|
+
menuRpcCall: (
|
|
441
|
+
rpcRequest: Omit<ClientToServerMenuRPC, "vpId"> | ClientToServerEditRpc
|
|
442
|
+
) => Promise<RpcResponse | undefined>;
|
|
443
|
+
rpcCall?: <T extends RpcResponse = RpcResponse>(
|
|
444
|
+
message: Omit<ClientToServerViewportRpcCall, "vpId">
|
|
445
|
+
) => Promise<T | undefined>;
|
|
446
|
+
openTreeNode: (key: string) => void;
|
|
447
|
+
range: VuuRange;
|
|
448
|
+
select: SelectionChangeHandler;
|
|
449
|
+
readonly selectedRowsCount: number;
|
|
450
|
+
readonly size: number;
|
|
451
|
+
sort: VuuSort;
|
|
452
|
+
subscribe: (
|
|
453
|
+
props: SubscribeProps,
|
|
454
|
+
callback: SubscribeCallback
|
|
455
|
+
) => Promise<void>;
|
|
456
|
+
table?: VuuTable;
|
|
457
|
+
readonly tableSchema?: TableSchema;
|
|
458
|
+
title?: string;
|
|
459
|
+
unsubscribe: () => void;
|
|
460
|
+
viewport?: string;
|
|
461
|
+
visualLink?: LinkDescriptorWithLabel;
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
export interface MenuRpcResponse {
|
|
465
|
+
action: MenuRpcAction;
|
|
466
|
+
error?: string;
|
|
467
|
+
requestId: string;
|
|
468
|
+
rpcName?: string;
|
|
469
|
+
tableAlreadyOpen?: boolean;
|
|
470
|
+
type: "VIEW_PORT_MENU_RESP";
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
export interface OpenDialogAction {
|
|
474
|
+
type: "OPEN_DIALOG_ACTION";
|
|
475
|
+
tableSchema?: TableSchema;
|
|
476
|
+
table?: VuuTable;
|
|
477
|
+
}
|
|
478
|
+
export interface NoAction {
|
|
479
|
+
type: "NO_ACTION";
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
export declare type MenuRpcAction = OpenDialogAction | NoAction;
|
|
483
|
+
|
|
484
|
+
export type ConnectionStatus =
|
|
485
|
+
| "connecting"
|
|
486
|
+
| "connection-open-awaiting-session"
|
|
487
|
+
| "connected"
|
|
488
|
+
| "disconnected"
|
|
489
|
+
| "reconnected";
|
|
490
|
+
|
|
491
|
+
export interface ConnectionStatusMessage {
|
|
492
|
+
type: "connection-status";
|
|
493
|
+
reason?: string;
|
|
494
|
+
retry?: boolean;
|
|
495
|
+
status: ConnectionStatus;
|
|
496
|
+
}
|
|
497
|
+
|
|
498
|
+
export interface ConnectionQualityMetrics {
|
|
499
|
+
type: "connection-metrics";
|
|
500
|
+
messagesLength: number;
|
|
501
|
+
}
|
|
502
|
+
|
|
503
|
+
export interface ServerProxySubscribeMessage {
|
|
504
|
+
aggregations: VuuAggregation[];
|
|
505
|
+
bufferSize?: number;
|
|
506
|
+
columns: VuuColumns;
|
|
507
|
+
filter: DataSourceFilter;
|
|
508
|
+
groupBy: VuuGroupBy;
|
|
509
|
+
range: VuuRange;
|
|
510
|
+
sort: VuuSort;
|
|
511
|
+
table: VuuTable;
|
|
512
|
+
title?: string;
|
|
513
|
+
viewport: string;
|
|
514
|
+
visualLink?: LinkDescriptorWithLabel;
|
|
515
|
+
}
|
|
516
|
+
|
|
517
|
+
// export type VuuUIMessageInConnectionStatus = {
|
|
518
|
+
// type: 'connection-status';
|
|
519
|
+
// };
|
|
520
|
+
|
|
521
|
+
export type VuuUIMessageInConnected = {
|
|
522
|
+
type: "connected";
|
|
523
|
+
};
|
|
524
|
+
|
|
525
|
+
export type VuuUIMessageInWorkerReady = {
|
|
526
|
+
type: "ready";
|
|
527
|
+
};
|
|
528
|
+
|
|
529
|
+
export interface ViewportMessageIn {
|
|
530
|
+
clientViewportId: string;
|
|
531
|
+
}
|
|
532
|
+
|
|
533
|
+
// TODO use generic to type result
|
|
534
|
+
export interface VuuUIMessageInRPC {
|
|
535
|
+
method: string;
|
|
536
|
+
result: unknown;
|
|
537
|
+
requestId: string;
|
|
538
|
+
type: "RPC_RESP";
|
|
539
|
+
}
|
|
540
|
+
|
|
541
|
+
export interface VuuUIMessageInRPCEditReject {
|
|
542
|
+
error: string;
|
|
543
|
+
requestId?: string;
|
|
544
|
+
type: "VP_EDIT_RPC_REJECT";
|
|
545
|
+
}
|
|
546
|
+
|
|
547
|
+
export interface VuuUIMessageInRPCEditResponse {
|
|
548
|
+
action: unknown;
|
|
549
|
+
requestId: string;
|
|
550
|
+
rpcName: string;
|
|
551
|
+
type: "VP_EDIT_RPC_RESPONSE";
|
|
552
|
+
}
|
|
553
|
+
|
|
554
|
+
export interface VuuUIMessageInTableList {
|
|
555
|
+
requestId: string;
|
|
556
|
+
type: "TABLE_LIST_RESP";
|
|
557
|
+
tables: VuuTable[];
|
|
558
|
+
}
|
|
559
|
+
export interface VuuUIMessageInTableMeta {
|
|
560
|
+
requestId: string;
|
|
561
|
+
tableSchema: TableSchema;
|
|
562
|
+
type: "TABLE_META_RESP";
|
|
563
|
+
}
|
|
564
|
+
export interface ViewportRpcResponse {
|
|
565
|
+
action: ServerToClientViewportRpcResponse["action"];
|
|
566
|
+
requestId: string;
|
|
567
|
+
rpcName?: string;
|
|
568
|
+
type: "VIEW_PORT_RPC_RESPONSE";
|
|
569
|
+
}
|
|
570
|
+
export interface MenuRpcReject extends ViewportMessageIn {
|
|
571
|
+
error?: string;
|
|
572
|
+
requestId: string;
|
|
573
|
+
rpcName?: string;
|
|
574
|
+
type: "VIEW_PORT_MENU_REJ";
|
|
575
|
+
}
|
|
576
|
+
|
|
577
|
+
export interface VuuUIMessageInMenuRej {
|
|
578
|
+
error: string;
|
|
579
|
+
requestId: string;
|
|
580
|
+
rpcName: string;
|
|
581
|
+
type: "VIEW_PORT_MENU_REJ";
|
|
582
|
+
}
|
|
583
|
+
|
|
584
|
+
export type VuuUIMessageIn =
|
|
585
|
+
| VuuUIMessageInConnected
|
|
586
|
+
| VuuUIMessageInWorkerReady
|
|
587
|
+
| VuuUIMessageInRPC
|
|
588
|
+
| ViewportRpcResponse
|
|
589
|
+
| MenuRpcResponse
|
|
590
|
+
| MenuRpcReject
|
|
591
|
+
| VuuUIMessageInTableList
|
|
592
|
+
| VuuUIMessageInTableMeta
|
|
593
|
+
| VuuUIMessageInRPCEditReject
|
|
594
|
+
| VuuUIMessageInRPCEditResponse;
|
|
595
|
+
|
|
596
|
+
export type WebSocketProtocol = string | string[] | undefined;
|
|
597
|
+
|
|
598
|
+
export interface VuuUIMessageOutConnect {
|
|
599
|
+
protocol: WebSocketProtocol;
|
|
600
|
+
type: "connect";
|
|
601
|
+
token: string;
|
|
602
|
+
url: string;
|
|
603
|
+
username?: string;
|
|
604
|
+
retryLimitDisconnect?: number;
|
|
605
|
+
retryLimitStartup?: number;
|
|
606
|
+
}
|
|
607
|
+
|
|
608
|
+
export interface VuuUIMessageOutSubscribe extends ServerProxySubscribeMessage {
|
|
609
|
+
type: "subscribe";
|
|
610
|
+
}
|
|
611
|
+
|
|
612
|
+
export interface VuuUIMessageOutUnsubscribe {
|
|
613
|
+
type: "unsubscribe";
|
|
614
|
+
viewport: string;
|
|
615
|
+
}
|
|
616
|
+
export interface VuuUIMessageOutSuspend {
|
|
617
|
+
type: "suspend";
|
|
618
|
+
viewport: string;
|
|
619
|
+
}
|
|
620
|
+
export interface VuuUIMessageOutResume {
|
|
621
|
+
type: "resume";
|
|
622
|
+
viewport: string;
|
|
623
|
+
}
|
|
624
|
+
|
|
625
|
+
export interface ViewportMessageOut {
|
|
626
|
+
viewport: string;
|
|
627
|
+
}
|
|
628
|
+
|
|
629
|
+
export interface RequestMessage {
|
|
630
|
+
requestId: string;
|
|
631
|
+
}
|
|
632
|
+
|
|
633
|
+
export interface VuuUIMessageOutColumns extends ViewportMessageOut {
|
|
634
|
+
type: "setColumns";
|
|
635
|
+
columns: string[];
|
|
636
|
+
}
|
|
637
|
+
export interface VuuUIMessageOutViewRange extends ViewportMessageOut {
|
|
638
|
+
type: "setViewRange";
|
|
639
|
+
range: {
|
|
640
|
+
from: number;
|
|
641
|
+
to: number;
|
|
642
|
+
};
|
|
643
|
+
}
|
|
644
|
+
export interface VuuUIMessageOutAggregate extends ViewportMessageOut {
|
|
645
|
+
aggregations: VuuAggregation[];
|
|
646
|
+
type: "aggregate";
|
|
647
|
+
}
|
|
648
|
+
export interface VuuUIMessageOutCloseTreeNode extends ViewportMessageOut {
|
|
649
|
+
key: string;
|
|
650
|
+
type: "closeTreeNode";
|
|
651
|
+
}
|
|
652
|
+
export interface VuuUIMessageOutCreateLink extends ViewportMessageOut {
|
|
653
|
+
childColumnName: string;
|
|
654
|
+
parentColumnName: string;
|
|
655
|
+
parentClientVpId: string;
|
|
656
|
+
type: "createLink";
|
|
657
|
+
}
|
|
658
|
+
export interface VuuUIMessageOutRemoveLink extends ViewportMessageOut {
|
|
659
|
+
type: "removeLink";
|
|
660
|
+
}
|
|
661
|
+
export interface VuuUIMessageOutSetTitle extends ViewportMessageOut {
|
|
662
|
+
title: string;
|
|
663
|
+
type: "setTitle";
|
|
664
|
+
}
|
|
665
|
+
|
|
666
|
+
export interface VuuUIMessageOutDisable extends ViewportMessageOut {
|
|
667
|
+
type: "disable";
|
|
668
|
+
}
|
|
669
|
+
export interface VuuUIMessageOutEnable extends ViewportMessageOut {
|
|
670
|
+
type: "enable";
|
|
671
|
+
}
|
|
672
|
+
export interface VuuUIMessageOutOpenTreeNode extends ViewportMessageOut {
|
|
673
|
+
key: string;
|
|
674
|
+
type: "openTreeNode";
|
|
675
|
+
}
|
|
676
|
+
export interface VuuUIMessageOutResume extends ViewportMessageOut {
|
|
677
|
+
type: "resume";
|
|
678
|
+
}
|
|
679
|
+
|
|
680
|
+
export interface VuuUIMessageOutSelect extends ViewportMessageOut {
|
|
681
|
+
selected: Selection;
|
|
682
|
+
type: "select";
|
|
683
|
+
}
|
|
684
|
+
export interface VuuUIMessageOutSelectAll extends ViewportMessageOut {
|
|
685
|
+
type: "selectAll";
|
|
686
|
+
}
|
|
687
|
+
export interface VuuUIMessageOutSelectNone extends ViewportMessageOut {
|
|
688
|
+
type: "selectNone";
|
|
689
|
+
}
|
|
690
|
+
|
|
691
|
+
export interface VuuUIMessageOutSort extends ViewportMessageOut {
|
|
692
|
+
sort: VuuSort;
|
|
693
|
+
type: "sort";
|
|
694
|
+
}
|
|
695
|
+
export interface VuuUIMessageOutSuspend extends ViewportMessageOut {
|
|
696
|
+
type: "suspend";
|
|
697
|
+
}
|
|
698
|
+
|
|
699
|
+
export interface VuuUIMessageOutFilter extends ViewportMessageOut {
|
|
700
|
+
filter: DataSourceFilter;
|
|
701
|
+
type: "filter";
|
|
702
|
+
}
|
|
703
|
+
export interface VuuUIMessageOutGroupby extends ViewportMessageOut {
|
|
704
|
+
groupBy: VuuGroupBy;
|
|
705
|
+
type: "groupBy";
|
|
706
|
+
}
|
|
707
|
+
|
|
708
|
+
export interface VuuUIMessageOutConfig extends ViewportMessageOut {
|
|
709
|
+
config: WithFullConfig;
|
|
710
|
+
type: "config";
|
|
711
|
+
}
|
|
712
|
+
|
|
713
|
+
export type VuuUIMessageOutViewport =
|
|
714
|
+
| VuuUIMessageOutAggregate
|
|
715
|
+
| VuuUIMessageOutCloseTreeNode
|
|
716
|
+
| VuuUIMessageOutColumns
|
|
717
|
+
| VuuUIMessageOutConfig
|
|
718
|
+
| VuuUIMessageOutCreateLink
|
|
719
|
+
| VuuUIMessageOutFilter
|
|
720
|
+
| VuuUIMessageOutDisable
|
|
721
|
+
| VuuUIMessageOutEnable
|
|
722
|
+
| VuuUIMessageOutGroupby
|
|
723
|
+
| VuuUIMessageOutOpenTreeNode
|
|
724
|
+
| VuuUIMessageOutRemoveLink
|
|
725
|
+
| VuuUIMessageOutResume
|
|
726
|
+
| VuuUIMessageOutSelect
|
|
727
|
+
| VuuUIMessageOutSelectAll
|
|
728
|
+
| VuuUIMessageOutSelectNone
|
|
729
|
+
| VuuUIMessageOutSetTitle
|
|
730
|
+
| VuuUIMessageOutSuspend
|
|
731
|
+
| VuuUIMessageOutSort
|
|
732
|
+
| VuuUIMessageOutViewRange;
|
|
733
|
+
|
|
734
|
+
export interface TypeAheadRpcRequest {
|
|
735
|
+
method: TypeAheadMethod;
|
|
736
|
+
params: [VuuTable, ...string[]];
|
|
737
|
+
type: "RPC_CALL";
|
|
738
|
+
}
|
|
739
|
+
|
|
740
|
+
export type WithRequestId<T> = T & { requestId: string };
|
|
741
|
+
|
|
742
|
+
export type VuuUIMessageOut =
|
|
743
|
+
| VuuUIMessageOutConnect
|
|
744
|
+
| VuuUIMessageOutSubscribe
|
|
745
|
+
| VuuUIMessageOutUnsubscribe
|
|
746
|
+
| VuuUIMessageOutViewport
|
|
747
|
+
| WithRequestId<ClientToServerTableList>
|
|
748
|
+
| WithRequestId<ClientToServerTableMeta>;
|
package/package.json
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vuu-ui/vuu-data-types",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.22-debug",
|
|
4
4
|
"author": "heswell",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"devDependencies": {
|
|
7
|
-
"@vuu-ui/vuu-filter-types": "0.8.
|
|
8
|
-
"@vuu-ui/vuu-protocol-types": "0.8.
|
|
7
|
+
"@vuu-ui/vuu-filter-types": "0.8.22-debug",
|
|
8
|
+
"@vuu-ui/vuu-protocol-types": "0.8.22-debug"
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {},
|
|
11
11
|
"peerDependencies": {},
|
|
12
12
|
"files": [
|
|
13
|
+
"index.d.ts",
|
|
13
14
|
"index.d.ts"
|
|
14
15
|
],
|
|
15
16
|
"types": "index.d.ts"
|
package/LICENSE
DELETED
|
@@ -1,201 +0,0 @@
|
|
|
1
|
-
Apache License
|
|
2
|
-
Version 2.0, January 2004
|
|
3
|
-
http://www.apache.org/licenses/
|
|
4
|
-
|
|
5
|
-
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
-
|
|
7
|
-
1. Definitions.
|
|
8
|
-
|
|
9
|
-
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
-
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
-
|
|
12
|
-
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
-
the copyright owner that is granting the License.
|
|
14
|
-
|
|
15
|
-
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
-
other entities that control, are controlled by, or are under common
|
|
17
|
-
control with that entity. For the purposes of this definition,
|
|
18
|
-
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
-
direction or management of such entity, whether by contract or
|
|
20
|
-
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
-
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
-
|
|
23
|
-
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
-
exercising permissions granted by this License.
|
|
25
|
-
|
|
26
|
-
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
-
including but not limited to software source code, documentation
|
|
28
|
-
source, and configuration files.
|
|
29
|
-
|
|
30
|
-
"Object" form shall mean any form resulting from mechanical
|
|
31
|
-
transformation or translation of a Source form, including but
|
|
32
|
-
not limited to compiled object code, generated documentation,
|
|
33
|
-
and conversions to other media types.
|
|
34
|
-
|
|
35
|
-
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
-
Object form, made available under the License, as indicated by a
|
|
37
|
-
copyright notice that is included in or attached to the work
|
|
38
|
-
(an example is provided in the Appendix below).
|
|
39
|
-
|
|
40
|
-
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
-
form, that is based on (or derived from) the Work and for which the
|
|
42
|
-
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
-
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
-
of this License, Derivative Works shall not include works that remain
|
|
45
|
-
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
-
the Work and Derivative Works thereof.
|
|
47
|
-
|
|
48
|
-
"Contribution" shall mean any work of authorship, including
|
|
49
|
-
the original version of the Work and any modifications or additions
|
|
50
|
-
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
-
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
-
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
-
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
-
means any form of electronic, verbal, or written communication sent
|
|
55
|
-
to the Licensor or its representatives, including but not limited to
|
|
56
|
-
communication on electronic mailing lists, source code control systems,
|
|
57
|
-
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
-
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
-
excluding communication that is conspicuously marked or otherwise
|
|
60
|
-
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
-
|
|
62
|
-
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
-
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
-
subsequently incorporated within the Work.
|
|
65
|
-
|
|
66
|
-
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
-
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
-
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
-
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
-
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
-
Work and such Derivative Works in Source or Object form.
|
|
72
|
-
|
|
73
|
-
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
-
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
-
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
-
(except as stated in this section) patent license to make, have made,
|
|
77
|
-
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
-
where such license applies only to those patent claims licensable
|
|
79
|
-
by such Contributor that are necessarily infringed by their
|
|
80
|
-
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
-
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
-
institute patent litigation against any entity (including a
|
|
83
|
-
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
-
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
-
or contributory patent infringement, then any patent licenses
|
|
86
|
-
granted to You under this License for that Work shall terminate
|
|
87
|
-
as of the date such litigation is filed.
|
|
88
|
-
|
|
89
|
-
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
-
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
-
modifications, and in Source or Object form, provided that You
|
|
92
|
-
meet the following conditions:
|
|
93
|
-
|
|
94
|
-
(a) You must give any other recipients of the Work or
|
|
95
|
-
Derivative Works a copy of this License; and
|
|
96
|
-
|
|
97
|
-
(b) You must cause any modified files to carry prominent notices
|
|
98
|
-
stating that You changed the files; and
|
|
99
|
-
|
|
100
|
-
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
-
that You distribute, all copyright, patent, trademark, and
|
|
102
|
-
attribution notices from the Source form of the Work,
|
|
103
|
-
excluding those notices that do not pertain to any part of
|
|
104
|
-
the Derivative Works; and
|
|
105
|
-
|
|
106
|
-
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
-
distribution, then any Derivative Works that You distribute must
|
|
108
|
-
include a readable copy of the attribution notices contained
|
|
109
|
-
within such NOTICE file, excluding those notices that do not
|
|
110
|
-
pertain to any part of the Derivative Works, in at least one
|
|
111
|
-
of the following places: within a NOTICE text file distributed
|
|
112
|
-
as part of the Derivative Works; within the Source form or
|
|
113
|
-
documentation, if provided along with the Derivative Works; or,
|
|
114
|
-
within a display generated by the Derivative Works, if and
|
|
115
|
-
wherever such third-party notices normally appear. The contents
|
|
116
|
-
of the NOTICE file are for informational purposes only and
|
|
117
|
-
do not modify the License. You may add Your own attribution
|
|
118
|
-
notices within Derivative Works that You distribute, alongside
|
|
119
|
-
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
-
that such additional attribution notices cannot be construed
|
|
121
|
-
as modifying the License.
|
|
122
|
-
|
|
123
|
-
You may add Your own copyright statement to Your modifications and
|
|
124
|
-
may provide additional or different license terms and conditions
|
|
125
|
-
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
-
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
-
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
-
the conditions stated in this License.
|
|
129
|
-
|
|
130
|
-
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
-
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
-
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
-
this License, without any additional terms or conditions.
|
|
134
|
-
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
-
the terms of any separate license agreement you may have executed
|
|
136
|
-
with Licensor regarding such Contributions.
|
|
137
|
-
|
|
138
|
-
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
-
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
-
except as required for reasonable and customary use in describing the
|
|
141
|
-
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
-
|
|
143
|
-
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
-
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
-
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
-
implied, including, without limitation, any warranties or conditions
|
|
148
|
-
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
-
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
-
appropriateness of using or redistributing the Work and assume any
|
|
151
|
-
risks associated with Your exercise of permissions under this License.
|
|
152
|
-
|
|
153
|
-
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
-
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
-
unless required by applicable law (such as deliberate and grossly
|
|
156
|
-
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
-
liable to You for damages, including any direct, indirect, special,
|
|
158
|
-
incidental, or consequential damages of any character arising as a
|
|
159
|
-
result of this License or out of the use or inability to use the
|
|
160
|
-
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
-
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
-
other commercial damages or losses), even if such Contributor
|
|
163
|
-
has been advised of the possibility of such damages.
|
|
164
|
-
|
|
165
|
-
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
-
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
-
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
-
or other liability obligations and/or rights consistent with this
|
|
169
|
-
License. However, in accepting such obligations, You may act only
|
|
170
|
-
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
-
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
-
defend, and hold each Contributor harmless for any liability
|
|
173
|
-
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
-
of your accepting any such warranty or additional liability.
|
|
175
|
-
|
|
176
|
-
END OF TERMS AND CONDITIONS
|
|
177
|
-
|
|
178
|
-
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
-
|
|
180
|
-
To apply the Apache License to your work, attach the following
|
|
181
|
-
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
-
replaced with your own identifying information. (Don't include
|
|
183
|
-
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
-
comment syntax for the file format. We also recommend that a
|
|
185
|
-
file or class name and description of purpose be included on the
|
|
186
|
-
same "printed page" as the copyright notice for easier
|
|
187
|
-
identification within third-party archives.
|
|
188
|
-
|
|
189
|
-
Copyright 2015 UBS
|
|
190
|
-
|
|
191
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
-
you may not use this file except in compliance with the License.
|
|
193
|
-
You may obtain a copy of the License at
|
|
194
|
-
|
|
195
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
-
|
|
197
|
-
Unless required by applicable law or agreed to in writing, software
|
|
198
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
-
See the License for the specific language governing permissions and
|
|
201
|
-
limitations under the License.
|