@nouxwell/tabula-vue 0.4.0 → 0.5.0

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.
@@ -191,6 +191,14 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
191
191
  type: NumberConstructor;
192
192
  default: number;
193
193
  };
194
+ defaultFormats: {
195
+ type: PropType<import("@nouxwell/tabula-core").ColumnFormats>;
196
+ default: undefined;
197
+ };
198
+ newRow: {
199
+ type: BooleanConstructor;
200
+ default: boolean;
201
+ };
194
202
  sort: {
195
203
  type: PropType<import("@nouxwell/tabula-core").ColumnSort | null>;
196
204
  };
@@ -254,6 +262,7 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
254
262
  zoom: number;
255
263
  issues: import("@nouxwell/tabula-core").IssueSet;
256
264
  totals: boolean;
265
+ newRow: boolean;
257
266
  locale: GridLocale;
258
267
  valueSettings: ValueSettings;
259
268
  theme: GridTheme;
@@ -272,6 +281,7 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
272
281
  readonly current?: FoundCell | null;
273
282
  };
274
283
  fit: boolean;
284
+ defaultFormats: Readonly<Record<string, import("@nouxwell/tabula-core").ColumnFormat>>;
275
285
  }, true, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
276
286
  P: {};
277
287
  B: {};
@@ -371,6 +381,14 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
371
381
  type: NumberConstructor;
372
382
  default: number;
373
383
  };
384
+ defaultFormats: {
385
+ type: PropType<import("@nouxwell/tabula-core").ColumnFormats>;
386
+ default: undefined;
387
+ };
388
+ newRow: {
389
+ type: BooleanConstructor;
390
+ default: boolean;
391
+ };
374
392
  sort: {
375
393
  type: PropType<import("@nouxwell/tabula-core").ColumnSort | null>;
376
394
  };
@@ -427,6 +445,7 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
427
445
  zoom: number;
428
446
  issues: import("@nouxwell/tabula-core").IssueSet;
429
447
  totals: boolean;
448
+ newRow: boolean;
430
449
  locale: GridLocale;
431
450
  valueSettings: ValueSettings;
432
451
  theme: GridTheme;
@@ -445,6 +464,7 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
445
464
  readonly current?: FoundCell | null;
446
465
  };
447
466
  fit: boolean;
467
+ defaultFormats: Readonly<Record<string, import("@nouxwell/tabula-core").ColumnFormat>>;
448
468
  }> | null;
449
469
  locale: GridLocale;
450
470
  valueSettings: ValueSettings;
@@ -123,6 +123,14 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
123
123
  type: NumberConstructor;
124
124
  default: number;
125
125
  };
126
+ defaultFormats: {
127
+ type: PropType<import("@nouxwell/tabula-core").ColumnFormats>;
128
+ default: undefined;
129
+ };
130
+ newRow: {
131
+ type: BooleanConstructor;
132
+ default: boolean;
133
+ };
126
134
  sort: {
127
135
  type: PropType<import("@nouxwell/tabula-core").ColumnSort | null>;
128
136
  };
@@ -186,6 +194,7 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
186
194
  zoom: number;
187
195
  issues: import("@nouxwell/tabula-core").IssueSet;
188
196
  totals: boolean;
197
+ newRow: boolean;
189
198
  locale: GridLocale;
190
199
  valueSettings: import("@nouxwell/tabula-core").ValueSettings;
191
200
  theme: GridTheme;
@@ -204,6 +213,7 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
204
213
  readonly current?: import("@nouxwell/tabula-core").FoundCell | null;
205
214
  };
206
215
  fit: boolean;
216
+ defaultFormats: Readonly<Record<string, import("@nouxwell/tabula-core").ColumnFormat>>;
207
217
  }, true, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
208
218
  P: {};
209
219
  B: {};
@@ -303,6 +313,14 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
303
313
  type: NumberConstructor;
304
314
  default: number;
305
315
  };
316
+ defaultFormats: {
317
+ type: PropType<import("@nouxwell/tabula-core").ColumnFormats>;
318
+ default: undefined;
319
+ };
320
+ newRow: {
321
+ type: BooleanConstructor;
322
+ default: boolean;
323
+ };
306
324
  sort: {
307
325
  type: PropType<import("@nouxwell/tabula-core").ColumnSort | null>;
308
326
  };
@@ -359,6 +377,7 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
359
377
  zoom: number;
360
378
  issues: import("@nouxwell/tabula-core").IssueSet;
361
379
  totals: boolean;
380
+ newRow: boolean;
362
381
  locale: GridLocale;
363
382
  valueSettings: import("@nouxwell/tabula-core").ValueSettings;
364
383
  theme: GridTheme;
@@ -377,6 +396,7 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
377
396
  readonly current?: import("@nouxwell/tabula-core").FoundCell | null;
378
397
  };
379
398
  fit: boolean;
399
+ defaultFormats: Readonly<Record<string, import("@nouxwell/tabula-core").ColumnFormat>>;
380
400
  }> | null;
381
401
  locale: GridLocale;
382
402
  theme: GridTheme;
@@ -1,4 +1,4 @@
1
- import { RowView, Selection, UndoHistory, type Adjustment, type CellMarkChange, type CellMarks, type FoundCell, type MarkedCell, type ColumnSizing, type ColumnSort, type CellValue, type ColumnLayout, type FieldSchema, type IssueSet, type LookupSearch, type ModuleSchema, type RowResults, type RowStore, type SheetChanges, type ValueSettings } from "@nouxwell/tabula-core";
1
+ import { RowView, Selection, UndoHistory, type Adjustment, type CellMarkChange, type CellMarks, type FoundCell, type MarkedCell, type ColumnSizing, type ColumnSort, type CellValue, type ColumnFormats, type ColumnLayout, type FieldSchema, type IssueSet, type LookupSearch, type ModuleSchema, type RowResults, type RowStore, type SheetChanges, type ValueSettings } from "@nouxwell/tabula-core";
2
2
  import { type PropType } from "vue";
3
3
  import { type GridLocale } from "./messages.js";
4
4
  import type { ActiveCell, GridMenuItem, GridPosition, GridTheme, SelectedCells } from "./types.js";
@@ -223,6 +223,23 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
223
223
  type: NumberConstructor;
224
224
  default: number;
225
225
  };
226
+ /**
227
+ * How each column is drawn until the user says otherwise, by field key: a template's formats, such
228
+ * as its view's `columns.formats`. The user's own, in `columns`, go over them property by property,
229
+ * and taking theirs off brings these back. Left out, each column is drawn its field's way.
230
+ */
231
+ defaultFormats: {
232
+ type: PropType<ColumnFormats>;
233
+ default: undefined;
234
+ };
235
+ /**
236
+ * A faint row after the last: a click there adds a row with the schema's defaults and selects its
237
+ * cell, to type or paste into. Not shown where the sheet cannot be typed into.
238
+ */
239
+ newRow: {
240
+ type: BooleanConstructor;
241
+ default: boolean;
242
+ };
226
243
  sort: {
227
244
  type: PropType<ColumnSort | null>;
228
245
  };
@@ -438,6 +455,23 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
438
455
  type: NumberConstructor;
439
456
  default: number;
440
457
  };
458
+ /**
459
+ * How each column is drawn until the user says otherwise, by field key: a template's formats, such
460
+ * as its view's `columns.formats`. The user's own, in `columns`, go over them property by property,
461
+ * and taking theirs off brings these back. Left out, each column is drawn its field's way.
462
+ */
463
+ defaultFormats: {
464
+ type: PropType<ColumnFormats>;
465
+ default: undefined;
466
+ };
467
+ /**
468
+ * A faint row after the last: a click there adds a row with the schema's defaults and selects its
469
+ * cell, to type or paste into. Not shown where the sheet cannot be typed into.
470
+ */
471
+ newRow: {
472
+ type: BooleanConstructor;
473
+ default: boolean;
474
+ };
441
475
  sort: {
442
476
  type: PropType<ColumnSort | null>;
443
477
  };
@@ -463,6 +497,7 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
463
497
  zoom: number;
464
498
  issues: IssueSet;
465
499
  totals: boolean;
500
+ newRow: boolean;
466
501
  locale: GridLocale;
467
502
  valueSettings: ValueSettings;
468
503
  theme: GridTheme;
@@ -481,6 +516,7 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
481
516
  readonly current?: FoundCell | null;
482
517
  };
483
518
  fit: boolean;
519
+ defaultFormats: Readonly<Record<string, import("@nouxwell/tabula-core").ColumnFormat>>;
484
520
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
485
521
  declare const _default: typeof __VLS_export;
486
522
  export default _default;
@@ -1,6 +1,6 @@
1
1
  import { type PropType } from "vue";
2
2
  import { type GridLocale } from "./messages.js";
3
- import type { GridTheme, SheetTab } from "./types.js";
3
+ import type { GridTheme, SheetAddOption, SheetTab } from "./types.js";
4
4
  declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
5
5
  tabs: {
6
6
  type: PropType<readonly SheetTab[]>;
@@ -19,12 +19,20 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
19
19
  type: PropType<GridTheme>;
20
20
  default: string;
21
21
  };
22
+ /**
23
+ * Ways to add a sheet, such as from the server's rows or empty: + then opens a menu of them, and
24
+ * `add` is emitted with the key chosen. Left empty, + emits `add` at once.
25
+ */
26
+ addOptions: {
27
+ type: PropType<readonly SheetAddOption[]>;
28
+ default: () => never[];
29
+ };
22
30
  active: {
23
31
  type: PropType<string>;
24
32
  required: true;
25
33
  };
26
34
  }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
27
- add: () => any;
35
+ add: (key?: string | undefined) => any;
28
36
  move: (id: string, to: number) => any;
29
37
  rename: (id: string, name: string) => any;
30
38
  duplicate: (id: string) => any;
@@ -48,12 +56,20 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
48
56
  type: PropType<GridTheme>;
49
57
  default: string;
50
58
  };
59
+ /**
60
+ * Ways to add a sheet, such as from the server's rows or empty: + then opens a menu of them, and
61
+ * `add` is emitted with the key chosen. Left empty, + emits `add` at once.
62
+ */
63
+ addOptions: {
64
+ type: PropType<readonly SheetAddOption[]>;
65
+ default: () => never[];
66
+ };
51
67
  active: {
52
68
  type: PropType<string>;
53
69
  required: true;
54
70
  };
55
71
  }>> & Readonly<{
56
- onAdd?: (() => any) | undefined;
72
+ onAdd?: ((key?: string | undefined) => any) | undefined;
57
73
  onMove?: ((id: string, to: number) => any) | undefined;
58
74
  onRename?: ((id: string, name: string) => any) | undefined;
59
75
  onDuplicate?: ((id: string) => any) | undefined;
@@ -63,6 +79,7 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
63
79
  disabled: boolean;
64
80
  locale: GridLocale;
65
81
  theme: GridTheme;
82
+ addOptions: readonly SheetAddOption[];
66
83
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
67
84
  declare const _default: typeof __VLS_export;
68
85
  export default _default;
@@ -131,6 +131,14 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
131
131
  type: NumberConstructor;
132
132
  default: number;
133
133
  };
134
+ defaultFormats: {
135
+ type: PropType<import("@nouxwell/tabula-core").ColumnFormats>;
136
+ default: undefined;
137
+ };
138
+ newRow: {
139
+ type: BooleanConstructor;
140
+ default: boolean;
141
+ };
134
142
  sort: {
135
143
  type: PropType<import("@nouxwell/tabula-core").ColumnSort | null>;
136
144
  };
@@ -194,6 +202,7 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
194
202
  zoom: number;
195
203
  issues: import("@nouxwell/tabula-core").IssueSet;
196
204
  totals: boolean;
205
+ newRow: boolean;
197
206
  locale: GridLocale;
198
207
  valueSettings: import("@nouxwell/tabula-core").ValueSettings;
199
208
  theme: GridTheme;
@@ -212,6 +221,7 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
212
221
  readonly current?: import("@nouxwell/tabula-core").FoundCell | null;
213
222
  };
214
223
  fit: boolean;
224
+ defaultFormats: Readonly<Record<string, import("@nouxwell/tabula-core").ColumnFormat>>;
215
225
  }, true, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
216
226
  P: {};
217
227
  B: {};
@@ -311,6 +321,14 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
311
321
  type: NumberConstructor;
312
322
  default: number;
313
323
  };
324
+ defaultFormats: {
325
+ type: PropType<import("@nouxwell/tabula-core").ColumnFormats>;
326
+ default: undefined;
327
+ };
328
+ newRow: {
329
+ type: BooleanConstructor;
330
+ default: boolean;
331
+ };
314
332
  sort: {
315
333
  type: PropType<import("@nouxwell/tabula-core").ColumnSort | null>;
316
334
  };
@@ -367,6 +385,7 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
367
385
  zoom: number;
368
386
  issues: import("@nouxwell/tabula-core").IssueSet;
369
387
  totals: boolean;
388
+ newRow: boolean;
370
389
  locale: GridLocale;
371
390
  valueSettings: import("@nouxwell/tabula-core").ValueSettings;
372
391
  theme: GridTheme;
@@ -385,6 +404,7 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
385
404
  readonly current?: import("@nouxwell/tabula-core").FoundCell | null;
386
405
  };
387
406
  fit: boolean;
407
+ defaultFormats: Readonly<Record<string, import("@nouxwell/tabula-core").ColumnFormat>>;
388
408
  }> | null;
389
409
  locale: GridLocale;
390
410
  theme: GridTheme;
package/dist/index.d.ts CHANGED
@@ -9,4 +9,4 @@ export { default as TabulaFind } from "./TabulaFind.vue.js";
9
9
  export { columnName, parseAddress } from "./address.js";
10
10
  export { BAR_TEXT, dateExample, describeCheck, DRAFT_TEXT, FIND_TEXT, functionHelp, GRID_TEXT, issueText, PANEL_TEXT, PREVIEW_TEXT, TABS_TEXT } from "./messages.js";
11
11
  export type { FunctionHelp, GridLocale } from "./messages.js";
12
- export type { ActiveCell, GridMenuItem, GridPosition, GridTheme, SelectedCells, SheetTab } from "./types.js";
12
+ export type { ActiveCell, GridMenuItem, GridPosition, GridTheme, SelectedCells, SheetAddOption, SheetTab } from "./types.js";