@nouxwell/tabula-vue 0.0.0-stage → 0.4.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.
- package/LICENSE +21 -0
- package/README.md +59 -2
- package/dist/ScrollThumbs.vue.d.ts +14 -0
- package/dist/TabulaDraftMapping.vue.d.ts +65 -0
- package/dist/TabulaFind.vue.d.ts +454 -0
- package/dist/TabulaFormulaBar.vue.d.ts +385 -0
- package/dist/TabulaGrid.vue.d.ts +486 -0
- package/dist/TabulaIssues.vue.d.ts +171 -0
- package/dist/TabulaPreview.vue.d.ts +83 -0
- package/dist/TabulaSheetTabs.vue.d.ts +68 -0
- package/dist/TabulaStatusBar.vue.d.ts +399 -0
- package/dist/address.d.ts +13 -0
- package/dist/alignment.d.ts +4 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.js +4640 -0
- package/dist/index.js.map +1 -0
- package/dist/measure.d.ts +11 -0
- package/dist/messages.d.ts +48 -0
- package/dist/style.css +2 -0
- package/dist/types.d.ts +64 -0
- package/package.json +53 -3
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { type ProcessPlan, type SheetSession, type ValueSettings } from "@nouxwell/tabula-core";
|
|
2
|
+
import { type PropType } from "vue";
|
|
3
|
+
import { type GridLocale } from "./messages.js";
|
|
4
|
+
import type { GridTheme } from "./types.js";
|
|
5
|
+
declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
6
|
+
/** The session to be run. Its issues give each row's warnings. */
|
|
7
|
+
session: {
|
|
8
|
+
type: PropType<SheetSession>;
|
|
9
|
+
required: true;
|
|
10
|
+
};
|
|
11
|
+
/** What `session.plan()` gave as the preview opened. */
|
|
12
|
+
plan: {
|
|
13
|
+
type: PropType<ProcessPlan>;
|
|
14
|
+
required: true;
|
|
15
|
+
};
|
|
16
|
+
/** A field that names a row, such as its product, shown above the row's number. */
|
|
17
|
+
nameField: {
|
|
18
|
+
type: PropType<string | null>;
|
|
19
|
+
default: null;
|
|
20
|
+
};
|
|
21
|
+
locale: {
|
|
22
|
+
type: PropType<GridLocale>;
|
|
23
|
+
default: string;
|
|
24
|
+
};
|
|
25
|
+
valueSettings: {
|
|
26
|
+
type: PropType<ValueSettings>;
|
|
27
|
+
default: () => ValueSettings;
|
|
28
|
+
};
|
|
29
|
+
theme: {
|
|
30
|
+
type: PropType<GridTheme>;
|
|
31
|
+
default: string;
|
|
32
|
+
};
|
|
33
|
+
/** How many rows are drawn at first, and how many more each time more are asked for. */
|
|
34
|
+
limit: {
|
|
35
|
+
type: NumberConstructor;
|
|
36
|
+
default: number;
|
|
37
|
+
};
|
|
38
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
39
|
+
select: (rowId: string) => any;
|
|
40
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
41
|
+
/** The session to be run. Its issues give each row's warnings. */
|
|
42
|
+
session: {
|
|
43
|
+
type: PropType<SheetSession>;
|
|
44
|
+
required: true;
|
|
45
|
+
};
|
|
46
|
+
/** What `session.plan()` gave as the preview opened. */
|
|
47
|
+
plan: {
|
|
48
|
+
type: PropType<ProcessPlan>;
|
|
49
|
+
required: true;
|
|
50
|
+
};
|
|
51
|
+
/** A field that names a row, such as its product, shown above the row's number. */
|
|
52
|
+
nameField: {
|
|
53
|
+
type: PropType<string | null>;
|
|
54
|
+
default: null;
|
|
55
|
+
};
|
|
56
|
+
locale: {
|
|
57
|
+
type: PropType<GridLocale>;
|
|
58
|
+
default: string;
|
|
59
|
+
};
|
|
60
|
+
valueSettings: {
|
|
61
|
+
type: PropType<ValueSettings>;
|
|
62
|
+
default: () => ValueSettings;
|
|
63
|
+
};
|
|
64
|
+
theme: {
|
|
65
|
+
type: PropType<GridTheme>;
|
|
66
|
+
default: string;
|
|
67
|
+
};
|
|
68
|
+
/** How many rows are drawn at first, and how many more each time more are asked for. */
|
|
69
|
+
limit: {
|
|
70
|
+
type: NumberConstructor;
|
|
71
|
+
default: number;
|
|
72
|
+
};
|
|
73
|
+
}>> & Readonly<{
|
|
74
|
+
onSelect?: ((rowId: string) => any) | undefined;
|
|
75
|
+
}>, {
|
|
76
|
+
locale: GridLocale;
|
|
77
|
+
valueSettings: ValueSettings;
|
|
78
|
+
theme: GridTheme;
|
|
79
|
+
limit: number;
|
|
80
|
+
nameField: string | null;
|
|
81
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
82
|
+
declare const _default: typeof __VLS_export;
|
|
83
|
+
export default _default;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { type PropType } from "vue";
|
|
2
|
+
import { type GridLocale } from "./messages.js";
|
|
3
|
+
import type { GridTheme, SheetTab } from "./types.js";
|
|
4
|
+
declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
5
|
+
tabs: {
|
|
6
|
+
type: PropType<readonly SheetTab[]>;
|
|
7
|
+
required: true;
|
|
8
|
+
};
|
|
9
|
+
/** No tab is opened, added or changed meanwhile, such as while a run is under way. */
|
|
10
|
+
disabled: {
|
|
11
|
+
type: BooleanConstructor;
|
|
12
|
+
default: boolean;
|
|
13
|
+
};
|
|
14
|
+
locale: {
|
|
15
|
+
type: PropType<GridLocale>;
|
|
16
|
+
default: string;
|
|
17
|
+
};
|
|
18
|
+
theme: {
|
|
19
|
+
type: PropType<GridTheme>;
|
|
20
|
+
default: string;
|
|
21
|
+
};
|
|
22
|
+
active: {
|
|
23
|
+
type: PropType<string>;
|
|
24
|
+
required: true;
|
|
25
|
+
};
|
|
26
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
27
|
+
add: () => any;
|
|
28
|
+
move: (id: string, to: number) => any;
|
|
29
|
+
rename: (id: string, name: string) => any;
|
|
30
|
+
duplicate: (id: string) => any;
|
|
31
|
+
remove: (id: string) => any;
|
|
32
|
+
"update:active": (value: string) => any;
|
|
33
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
34
|
+
tabs: {
|
|
35
|
+
type: PropType<readonly SheetTab[]>;
|
|
36
|
+
required: true;
|
|
37
|
+
};
|
|
38
|
+
/** No tab is opened, added or changed meanwhile, such as while a run is under way. */
|
|
39
|
+
disabled: {
|
|
40
|
+
type: BooleanConstructor;
|
|
41
|
+
default: boolean;
|
|
42
|
+
};
|
|
43
|
+
locale: {
|
|
44
|
+
type: PropType<GridLocale>;
|
|
45
|
+
default: string;
|
|
46
|
+
};
|
|
47
|
+
theme: {
|
|
48
|
+
type: PropType<GridTheme>;
|
|
49
|
+
default: string;
|
|
50
|
+
};
|
|
51
|
+
active: {
|
|
52
|
+
type: PropType<string>;
|
|
53
|
+
required: true;
|
|
54
|
+
};
|
|
55
|
+
}>> & Readonly<{
|
|
56
|
+
onAdd?: (() => any) | undefined;
|
|
57
|
+
onMove?: ((id: string, to: number) => any) | undefined;
|
|
58
|
+
onRename?: ((id: string, name: string) => any) | undefined;
|
|
59
|
+
onDuplicate?: ((id: string) => any) | undefined;
|
|
60
|
+
onRemove?: ((id: string) => any) | undefined;
|
|
61
|
+
"onUpdate:active"?: ((value: string) => any) | undefined;
|
|
62
|
+
}>, {
|
|
63
|
+
disabled: boolean;
|
|
64
|
+
locale: GridLocale;
|
|
65
|
+
theme: GridTheme;
|
|
66
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
67
|
+
declare const _default: typeof __VLS_export;
|
|
68
|
+
export default _default;
|
|
@@ -0,0 +1,399 @@
|
|
|
1
|
+
import { type PropType } from "vue";
|
|
2
|
+
import { type GridLocale } from "./messages.js";
|
|
3
|
+
import type TabulaGrid from "./TabulaGrid.vue.js";
|
|
4
|
+
import type { GridTheme } from "./types.js";
|
|
5
|
+
declare const __VLS_template: () => {
|
|
6
|
+
__VLS_Slots: {
|
|
7
|
+
start?: (props: {}) => any;
|
|
8
|
+
} & {
|
|
9
|
+
end?: (props: {}) => any;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
|
|
13
|
+
declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
14
|
+
/** The grid it belongs to: its template ref. */
|
|
15
|
+
grid: {
|
|
16
|
+
type: PropType<InstanceType<typeof TabulaGrid> | null>;
|
|
17
|
+
default: null;
|
|
18
|
+
};
|
|
19
|
+
locale: {
|
|
20
|
+
type: PropType<GridLocale>;
|
|
21
|
+
default: string;
|
|
22
|
+
};
|
|
23
|
+
theme: {
|
|
24
|
+
type: PropType<GridTheme>;
|
|
25
|
+
default: string;
|
|
26
|
+
};
|
|
27
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
28
|
+
/** The grid it belongs to: its template ref. */
|
|
29
|
+
grid: {
|
|
30
|
+
type: PropType<InstanceType<typeof TabulaGrid> | null>;
|
|
31
|
+
default: null;
|
|
32
|
+
};
|
|
33
|
+
locale: {
|
|
34
|
+
type: PropType<GridLocale>;
|
|
35
|
+
default: string;
|
|
36
|
+
};
|
|
37
|
+
theme: {
|
|
38
|
+
type: PropType<GridTheme>;
|
|
39
|
+
default: string;
|
|
40
|
+
};
|
|
41
|
+
}>> & Readonly<{}>, {
|
|
42
|
+
grid: import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("vue").ExtractPropTypes<{
|
|
43
|
+
schema: {
|
|
44
|
+
type: PropType<import("@nouxwell/tabula-core").ModuleSchema>;
|
|
45
|
+
required: true;
|
|
46
|
+
};
|
|
47
|
+
store: {
|
|
48
|
+
type: PropType<import("@nouxwell/tabula-core").RowStore>;
|
|
49
|
+
required: true;
|
|
50
|
+
};
|
|
51
|
+
columnSizing: {
|
|
52
|
+
type: PropType<Partial<import("@nouxwell/tabula-core").ColumnSizing>>;
|
|
53
|
+
default: undefined;
|
|
54
|
+
};
|
|
55
|
+
columnOverrides: {
|
|
56
|
+
type: PropType<Readonly<Record<string, Partial<import("@nouxwell/tabula-core").ColumnSizing>>>>;
|
|
57
|
+
default: undefined;
|
|
58
|
+
};
|
|
59
|
+
readonly: {
|
|
60
|
+
type: BooleanConstructor;
|
|
61
|
+
default: boolean;
|
|
62
|
+
};
|
|
63
|
+
theme: {
|
|
64
|
+
type: PropType<GridTheme>;
|
|
65
|
+
default: string;
|
|
66
|
+
};
|
|
67
|
+
valueSettings: {
|
|
68
|
+
type: PropType<import("@nouxwell/tabula-core").ValueSettings>;
|
|
69
|
+
default: () => import("@nouxwell/tabula-core").ValueSettings;
|
|
70
|
+
};
|
|
71
|
+
rowHeight: {
|
|
72
|
+
type: NumberConstructor;
|
|
73
|
+
default: number;
|
|
74
|
+
};
|
|
75
|
+
issues: {
|
|
76
|
+
type: PropType<import("@nouxwell/tabula-core").IssueSet>;
|
|
77
|
+
default: undefined;
|
|
78
|
+
};
|
|
79
|
+
results: {
|
|
80
|
+
type: PropType<import("@nouxwell/tabula-core").RowResults>;
|
|
81
|
+
default: undefined;
|
|
82
|
+
};
|
|
83
|
+
view: {
|
|
84
|
+
type: PropType<import("@nouxwell/tabula-core").RowView>;
|
|
85
|
+
default: undefined;
|
|
86
|
+
};
|
|
87
|
+
lookups: {
|
|
88
|
+
type: PropType<import("@nouxwell/tabula-core").LookupSearch>;
|
|
89
|
+
default: undefined;
|
|
90
|
+
};
|
|
91
|
+
history: {
|
|
92
|
+
type: PropType<import("@nouxwell/tabula-core").UndoHistory>;
|
|
93
|
+
default: undefined;
|
|
94
|
+
};
|
|
95
|
+
changes: {
|
|
96
|
+
type: PropType<import("@nouxwell/tabula-core").SheetChanges>;
|
|
97
|
+
default: undefined;
|
|
98
|
+
};
|
|
99
|
+
columnLetters: {
|
|
100
|
+
type: BooleanConstructor;
|
|
101
|
+
default: boolean;
|
|
102
|
+
};
|
|
103
|
+
menuItems: {
|
|
104
|
+
type: PropType<readonly import("./types.js").GridMenuItem[]>;
|
|
105
|
+
default: () => never[];
|
|
106
|
+
};
|
|
107
|
+
locale: {
|
|
108
|
+
type: PropType<GridLocale>;
|
|
109
|
+
default: string;
|
|
110
|
+
};
|
|
111
|
+
marks: {
|
|
112
|
+
type: PropType<import("@nouxwell/tabula-core").CellMarks>;
|
|
113
|
+
default: undefined;
|
|
114
|
+
};
|
|
115
|
+
found: {
|
|
116
|
+
type: PropType<{
|
|
117
|
+
readonly cells: readonly import("@nouxwell/tabula-core").FoundCell[];
|
|
118
|
+
readonly current?: import("@nouxwell/tabula-core").FoundCell | null;
|
|
119
|
+
}>;
|
|
120
|
+
default: undefined;
|
|
121
|
+
};
|
|
122
|
+
fit: {
|
|
123
|
+
type: BooleanConstructor;
|
|
124
|
+
default: boolean;
|
|
125
|
+
};
|
|
126
|
+
totals: {
|
|
127
|
+
type: BooleanConstructor;
|
|
128
|
+
default: boolean;
|
|
129
|
+
};
|
|
130
|
+
zoom: {
|
|
131
|
+
type: NumberConstructor;
|
|
132
|
+
default: number;
|
|
133
|
+
};
|
|
134
|
+
sort: {
|
|
135
|
+
type: PropType<import("@nouxwell/tabula-core").ColumnSort | null>;
|
|
136
|
+
};
|
|
137
|
+
filters: {
|
|
138
|
+
type: PropType<Readonly<Record<string, import("@nouxwell/tabula-core").ColumnCondition>>>;
|
|
139
|
+
};
|
|
140
|
+
columnWidths: {
|
|
141
|
+
type: PropType<Readonly<Record<string, number>>>;
|
|
142
|
+
};
|
|
143
|
+
columns: {
|
|
144
|
+
type: PropType<import("@nouxwell/tabula-core").ColumnLayout>;
|
|
145
|
+
};
|
|
146
|
+
}>> & Readonly<{
|
|
147
|
+
onFind?: (() => any) | undefined;
|
|
148
|
+
onMenu?: ((key: string) => any) | undefined;
|
|
149
|
+
"onUpdate:columnWidths"?: ((value: Readonly<Record<string, number>>) => any) | undefined;
|
|
150
|
+
"onUpdate:columns"?: ((value: import("@nouxwell/tabula-core").ColumnLayout) => any) | undefined;
|
|
151
|
+
"onUpdate:filters"?: ((value: Readonly<Record<string, import("@nouxwell/tabula-core").ColumnCondition>>) => any) | undefined;
|
|
152
|
+
"onUpdate:sort"?: ((value: import("@nouxwell/tabula-core").ColumnSort | null) => any) | undefined;
|
|
153
|
+
}>, {
|
|
154
|
+
selection: import("@nouxwell/tabula-core").Selection;
|
|
155
|
+
cell: import("vue").ComputedRef<import("./types.js").ActiveCell | null>;
|
|
156
|
+
selected: import("vue").ComputedRef<import("./types.js").SelectedCells | null>;
|
|
157
|
+
rows: import("vue").ComputedRef<Readonly<{
|
|
158
|
+
shown: number;
|
|
159
|
+
total: number;
|
|
160
|
+
}>>;
|
|
161
|
+
issueSummary: import("vue").ComputedRef<import("@nouxwell/tabula-core").IssueSummary>;
|
|
162
|
+
formatValue: (field: import("@nouxwell/tabula-core").FieldSchema, value: import("@nouxwell/tabula-core").CellValue) => string;
|
|
163
|
+
goTo: (rowId: string, field?: string | null) => boolean;
|
|
164
|
+
goToAddress: (address: string) => boolean;
|
|
165
|
+
writeCell: (rowId: string, key: string, input: string) => boolean;
|
|
166
|
+
adjustSelection: (adjustment: import("@nouxwell/tabula-core").Adjustment) => number;
|
|
167
|
+
removeRows: () => number;
|
|
168
|
+
insertRows: (where: "above" | "below") => string[];
|
|
169
|
+
addressOf: (rowId: string, field: string) => string | null;
|
|
170
|
+
position: () => import("./types.js").GridPosition;
|
|
171
|
+
restorePosition: (at: import("./types.js").GridPosition) => void;
|
|
172
|
+
focus: () => void;
|
|
173
|
+
autoFit: (col: number) => void;
|
|
174
|
+
selectedCells: () => import("@nouxwell/tabula-core").MarkedCell[];
|
|
175
|
+
selectedFields: () => string[];
|
|
176
|
+
markSelection: (change: import("@nouxwell/tabula-core").CellMarkChange) => boolean;
|
|
177
|
+
toggleSelection: (style: "bold" | "italic") => boolean;
|
|
178
|
+
clearSelectionMarks: () => boolean;
|
|
179
|
+
canEdit: (rowId: string, key: string) => boolean;
|
|
180
|
+
showCell: (rowId: string, field?: string | null) => boolean;
|
|
181
|
+
shownFields: () => string[];
|
|
182
|
+
undo: () => boolean;
|
|
183
|
+
redo: () => boolean;
|
|
184
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
185
|
+
find: () => any;
|
|
186
|
+
menu: (key: string) => any;
|
|
187
|
+
"update:columnWidths": (value: Readonly<Record<string, number>>) => any;
|
|
188
|
+
"update:columns": (value: import("@nouxwell/tabula-core").ColumnLayout) => any;
|
|
189
|
+
"update:filters": (value: Readonly<Record<string, import("@nouxwell/tabula-core").ColumnCondition>>) => any;
|
|
190
|
+
"update:sort": (value: import("@nouxwell/tabula-core").ColumnSort | null) => any;
|
|
191
|
+
}, import("vue").PublicProps, {
|
|
192
|
+
view: import("@nouxwell/tabula-core").RowView;
|
|
193
|
+
results: import("@nouxwell/tabula-core").RowResults;
|
|
194
|
+
zoom: number;
|
|
195
|
+
issues: import("@nouxwell/tabula-core").IssueSet;
|
|
196
|
+
totals: boolean;
|
|
197
|
+
locale: GridLocale;
|
|
198
|
+
valueSettings: import("@nouxwell/tabula-core").ValueSettings;
|
|
199
|
+
theme: GridTheme;
|
|
200
|
+
columnSizing: Partial<import("@nouxwell/tabula-core").ColumnSizing>;
|
|
201
|
+
columnOverrides: Readonly<Record<string, Partial<import("@nouxwell/tabula-core").ColumnSizing>>>;
|
|
202
|
+
readonly: boolean;
|
|
203
|
+
rowHeight: number;
|
|
204
|
+
lookups: import("@nouxwell/tabula-core").LookupSearch;
|
|
205
|
+
history: import("@nouxwell/tabula-core").UndoHistory;
|
|
206
|
+
changes: import("@nouxwell/tabula-core").SheetChanges;
|
|
207
|
+
columnLetters: boolean;
|
|
208
|
+
menuItems: readonly import("./types.js").GridMenuItem[];
|
|
209
|
+
marks: import("@nouxwell/tabula-core").CellMarks;
|
|
210
|
+
found: {
|
|
211
|
+
readonly cells: readonly import("@nouxwell/tabula-core").FoundCell[];
|
|
212
|
+
readonly current?: import("@nouxwell/tabula-core").FoundCell | null;
|
|
213
|
+
};
|
|
214
|
+
fit: boolean;
|
|
215
|
+
}, true, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
|
|
216
|
+
P: {};
|
|
217
|
+
B: {};
|
|
218
|
+
D: {};
|
|
219
|
+
C: {};
|
|
220
|
+
M: {};
|
|
221
|
+
Defaults: {};
|
|
222
|
+
}, Readonly<import("vue").ExtractPropTypes<{
|
|
223
|
+
schema: {
|
|
224
|
+
type: PropType<import("@nouxwell/tabula-core").ModuleSchema>;
|
|
225
|
+
required: true;
|
|
226
|
+
};
|
|
227
|
+
store: {
|
|
228
|
+
type: PropType<import("@nouxwell/tabula-core").RowStore>;
|
|
229
|
+
required: true;
|
|
230
|
+
};
|
|
231
|
+
columnSizing: {
|
|
232
|
+
type: PropType<Partial<import("@nouxwell/tabula-core").ColumnSizing>>;
|
|
233
|
+
default: undefined;
|
|
234
|
+
};
|
|
235
|
+
columnOverrides: {
|
|
236
|
+
type: PropType<Readonly<Record<string, Partial<import("@nouxwell/tabula-core").ColumnSizing>>>>;
|
|
237
|
+
default: undefined;
|
|
238
|
+
};
|
|
239
|
+
readonly: {
|
|
240
|
+
type: BooleanConstructor;
|
|
241
|
+
default: boolean;
|
|
242
|
+
};
|
|
243
|
+
theme: {
|
|
244
|
+
type: PropType<GridTheme>;
|
|
245
|
+
default: string;
|
|
246
|
+
};
|
|
247
|
+
valueSettings: {
|
|
248
|
+
type: PropType<import("@nouxwell/tabula-core").ValueSettings>;
|
|
249
|
+
default: () => import("@nouxwell/tabula-core").ValueSettings;
|
|
250
|
+
};
|
|
251
|
+
rowHeight: {
|
|
252
|
+
type: NumberConstructor;
|
|
253
|
+
default: number;
|
|
254
|
+
};
|
|
255
|
+
issues: {
|
|
256
|
+
type: PropType<import("@nouxwell/tabula-core").IssueSet>;
|
|
257
|
+
default: undefined;
|
|
258
|
+
};
|
|
259
|
+
results: {
|
|
260
|
+
type: PropType<import("@nouxwell/tabula-core").RowResults>;
|
|
261
|
+
default: undefined;
|
|
262
|
+
};
|
|
263
|
+
view: {
|
|
264
|
+
type: PropType<import("@nouxwell/tabula-core").RowView>;
|
|
265
|
+
default: undefined;
|
|
266
|
+
};
|
|
267
|
+
lookups: {
|
|
268
|
+
type: PropType<import("@nouxwell/tabula-core").LookupSearch>;
|
|
269
|
+
default: undefined;
|
|
270
|
+
};
|
|
271
|
+
history: {
|
|
272
|
+
type: PropType<import("@nouxwell/tabula-core").UndoHistory>;
|
|
273
|
+
default: undefined;
|
|
274
|
+
};
|
|
275
|
+
changes: {
|
|
276
|
+
type: PropType<import("@nouxwell/tabula-core").SheetChanges>;
|
|
277
|
+
default: undefined;
|
|
278
|
+
};
|
|
279
|
+
columnLetters: {
|
|
280
|
+
type: BooleanConstructor;
|
|
281
|
+
default: boolean;
|
|
282
|
+
};
|
|
283
|
+
menuItems: {
|
|
284
|
+
type: PropType<readonly import("./types.js").GridMenuItem[]>;
|
|
285
|
+
default: () => never[];
|
|
286
|
+
};
|
|
287
|
+
locale: {
|
|
288
|
+
type: PropType<GridLocale>;
|
|
289
|
+
default: string;
|
|
290
|
+
};
|
|
291
|
+
marks: {
|
|
292
|
+
type: PropType<import("@nouxwell/tabula-core").CellMarks>;
|
|
293
|
+
default: undefined;
|
|
294
|
+
};
|
|
295
|
+
found: {
|
|
296
|
+
type: PropType<{
|
|
297
|
+
readonly cells: readonly import("@nouxwell/tabula-core").FoundCell[];
|
|
298
|
+
readonly current?: import("@nouxwell/tabula-core").FoundCell | null;
|
|
299
|
+
}>;
|
|
300
|
+
default: undefined;
|
|
301
|
+
};
|
|
302
|
+
fit: {
|
|
303
|
+
type: BooleanConstructor;
|
|
304
|
+
default: boolean;
|
|
305
|
+
};
|
|
306
|
+
totals: {
|
|
307
|
+
type: BooleanConstructor;
|
|
308
|
+
default: boolean;
|
|
309
|
+
};
|
|
310
|
+
zoom: {
|
|
311
|
+
type: NumberConstructor;
|
|
312
|
+
default: number;
|
|
313
|
+
};
|
|
314
|
+
sort: {
|
|
315
|
+
type: PropType<import("@nouxwell/tabula-core").ColumnSort | null>;
|
|
316
|
+
};
|
|
317
|
+
filters: {
|
|
318
|
+
type: PropType<Readonly<Record<string, import("@nouxwell/tabula-core").ColumnCondition>>>;
|
|
319
|
+
};
|
|
320
|
+
columnWidths: {
|
|
321
|
+
type: PropType<Readonly<Record<string, number>>>;
|
|
322
|
+
};
|
|
323
|
+
columns: {
|
|
324
|
+
type: PropType<import("@nouxwell/tabula-core").ColumnLayout>;
|
|
325
|
+
};
|
|
326
|
+
}>> & Readonly<{
|
|
327
|
+
onFind?: (() => any) | undefined;
|
|
328
|
+
onMenu?: ((key: string) => any) | undefined;
|
|
329
|
+
"onUpdate:columnWidths"?: ((value: Readonly<Record<string, number>>) => any) | undefined;
|
|
330
|
+
"onUpdate:columns"?: ((value: import("@nouxwell/tabula-core").ColumnLayout) => any) | undefined;
|
|
331
|
+
"onUpdate:filters"?: ((value: Readonly<Record<string, import("@nouxwell/tabula-core").ColumnCondition>>) => any) | undefined;
|
|
332
|
+
"onUpdate:sort"?: ((value: import("@nouxwell/tabula-core").ColumnSort | null) => any) | undefined;
|
|
333
|
+
}>, {
|
|
334
|
+
selection: import("@nouxwell/tabula-core").Selection;
|
|
335
|
+
cell: import("vue").ComputedRef<import("./types.js").ActiveCell | null>;
|
|
336
|
+
selected: import("vue").ComputedRef<import("./types.js").SelectedCells | null>;
|
|
337
|
+
rows: import("vue").ComputedRef<Readonly<{
|
|
338
|
+
shown: number;
|
|
339
|
+
total: number;
|
|
340
|
+
}>>;
|
|
341
|
+
issueSummary: import("vue").ComputedRef<import("@nouxwell/tabula-core").IssueSummary>;
|
|
342
|
+
formatValue: (field: import("@nouxwell/tabula-core").FieldSchema, value: import("@nouxwell/tabula-core").CellValue) => string;
|
|
343
|
+
goTo: (rowId: string, field?: string | null) => boolean;
|
|
344
|
+
goToAddress: (address: string) => boolean;
|
|
345
|
+
writeCell: (rowId: string, key: string, input: string) => boolean;
|
|
346
|
+
adjustSelection: (adjustment: import("@nouxwell/tabula-core").Adjustment) => number;
|
|
347
|
+
removeRows: () => number;
|
|
348
|
+
insertRows: (where: "above" | "below") => string[];
|
|
349
|
+
addressOf: (rowId: string, field: string) => string | null;
|
|
350
|
+
position: () => import("./types.js").GridPosition;
|
|
351
|
+
restorePosition: (at: import("./types.js").GridPosition) => void;
|
|
352
|
+
focus: () => void;
|
|
353
|
+
autoFit: (col: number) => void;
|
|
354
|
+
selectedCells: () => import("@nouxwell/tabula-core").MarkedCell[];
|
|
355
|
+
selectedFields: () => string[];
|
|
356
|
+
markSelection: (change: import("@nouxwell/tabula-core").CellMarkChange) => boolean;
|
|
357
|
+
toggleSelection: (style: "bold" | "italic") => boolean;
|
|
358
|
+
clearSelectionMarks: () => boolean;
|
|
359
|
+
canEdit: (rowId: string, key: string) => boolean;
|
|
360
|
+
showCell: (rowId: string, field?: string | null) => boolean;
|
|
361
|
+
shownFields: () => string[];
|
|
362
|
+
undo: () => boolean;
|
|
363
|
+
redo: () => boolean;
|
|
364
|
+
}, {}, {}, {}, {
|
|
365
|
+
view: import("@nouxwell/tabula-core").RowView;
|
|
366
|
+
results: import("@nouxwell/tabula-core").RowResults;
|
|
367
|
+
zoom: number;
|
|
368
|
+
issues: import("@nouxwell/tabula-core").IssueSet;
|
|
369
|
+
totals: boolean;
|
|
370
|
+
locale: GridLocale;
|
|
371
|
+
valueSettings: import("@nouxwell/tabula-core").ValueSettings;
|
|
372
|
+
theme: GridTheme;
|
|
373
|
+
columnSizing: Partial<import("@nouxwell/tabula-core").ColumnSizing>;
|
|
374
|
+
columnOverrides: Readonly<Record<string, Partial<import("@nouxwell/tabula-core").ColumnSizing>>>;
|
|
375
|
+
readonly: boolean;
|
|
376
|
+
rowHeight: number;
|
|
377
|
+
lookups: import("@nouxwell/tabula-core").LookupSearch;
|
|
378
|
+
history: import("@nouxwell/tabula-core").UndoHistory;
|
|
379
|
+
changes: import("@nouxwell/tabula-core").SheetChanges;
|
|
380
|
+
columnLetters: boolean;
|
|
381
|
+
menuItems: readonly import("./types.js").GridMenuItem[];
|
|
382
|
+
marks: import("@nouxwell/tabula-core").CellMarks;
|
|
383
|
+
found: {
|
|
384
|
+
readonly cells: readonly import("@nouxwell/tabula-core").FoundCell[];
|
|
385
|
+
readonly current?: import("@nouxwell/tabula-core").FoundCell | null;
|
|
386
|
+
};
|
|
387
|
+
fit: boolean;
|
|
388
|
+
}> | null;
|
|
389
|
+
locale: GridLocale;
|
|
390
|
+
theme: GridTheme;
|
|
391
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
392
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
393
|
+
declare const _default: typeof __VLS_export;
|
|
394
|
+
export default _default;
|
|
395
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
396
|
+
new (): {
|
|
397
|
+
$slots: S;
|
|
398
|
+
};
|
|
399
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Cell addresses as a spreadsheet writes them: a column's letters, then the row's number, "D9".
|
|
3
|
+
*
|
|
4
|
+
* The letters follow the columns as they are on screen, the pinned ones first, and the number is
|
|
5
|
+
* the row's number in the sheet, as the row headers show it.
|
|
6
|
+
*/
|
|
7
|
+
/** A column's letters for its place on screen, from 0: A … Z, AA … AZ, BA … */
|
|
8
|
+
export declare function columnName(index: number): string;
|
|
9
|
+
/** "D9" or "d 9" as a column's place on screen, from 0, and a row's number, from 1; null for anything else. */
|
|
10
|
+
export declare function parseAddress(text: string): {
|
|
11
|
+
readonly col: number;
|
|
12
|
+
readonly row: number;
|
|
13
|
+
} | null;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { FieldSchema } from "@nouxwell/tabula-core";
|
|
2
|
+
export type Alignment = "left" | "right" | "center";
|
|
3
|
+
/** Numbers right, yes/no and dates centred, the rest left: the alignment nouxwell/tabula uses in files. */
|
|
4
|
+
export declare function alignmentOf(field: FieldSchema): Alignment;
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export { default as TabulaGrid } from "./TabulaGrid.vue.js";
|
|
2
|
+
export { default as TabulaIssues } from "./TabulaIssues.vue.js";
|
|
3
|
+
export { default as TabulaFormulaBar } from "./TabulaFormulaBar.vue.js";
|
|
4
|
+
export { default as TabulaStatusBar } from "./TabulaStatusBar.vue.js";
|
|
5
|
+
export { default as TabulaPreview } from "./TabulaPreview.vue.js";
|
|
6
|
+
export { default as TabulaDraftMapping } from "./TabulaDraftMapping.vue.js";
|
|
7
|
+
export { default as TabulaSheetTabs } from "./TabulaSheetTabs.vue.js";
|
|
8
|
+
export { default as TabulaFind } from "./TabulaFind.vue.js";
|
|
9
|
+
export { columnName, parseAddress } from "./address.js";
|
|
10
|
+
export { BAR_TEXT, dateExample, describeCheck, DRAFT_TEXT, FIND_TEXT, functionHelp, GRID_TEXT, issueText, PANEL_TEXT, PREVIEW_TEXT, TABS_TEXT } from "./messages.js";
|
|
11
|
+
export type { FunctionHelp, GridLocale } from "./messages.js";
|
|
12
|
+
export type { ActiveCell, GridMenuItem, GridPosition, GridTheme, SelectedCells, SheetTab } from "./types.js";
|