tsv2-library 1.0.61-alpha.100 → 1.0.61-alpha.102
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/dist/src/components/v2/DataTable/DataTable.vue.d.ts +4 -0
- package/dist/src/components/v2/DisposalReport/DisposalReportTable.vue.d.ts +8 -0
- package/dist/src/utils/exportToExcel.util.d.ts +1 -0
- package/dist/tsv2-library.es.js +18 -7
- package/dist/tsv2-library.umd.js +3 -3
- package/package.json +1 -1
- package/src/components/v2/DataTable/DataTable.vue.d.ts +4 -0
|
@@ -468,6 +468,10 @@ export interface TSDataTableProps {
|
|
|
468
468
|
* The return value is added to the row's :classes array (see Vue.js class bindings).
|
|
469
469
|
*/
|
|
470
470
|
rowClass?: (data: any) => string | object | undefined;
|
|
471
|
+
/**
|
|
472
|
+
* An array of arrays to display in the exported excel file before the main data.
|
|
473
|
+
*/
|
|
474
|
+
preContentData?: (string | number)[][];
|
|
471
475
|
}
|
|
472
476
|
|
|
473
477
|
export type TSDataTableEmits = {
|
|
@@ -147,6 +147,10 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
147
147
|
type: FunctionConstructor;
|
|
148
148
|
required: false;
|
|
149
149
|
};
|
|
150
|
+
preContentData: {
|
|
151
|
+
type: ArrayConstructor;
|
|
152
|
+
required: false;
|
|
153
|
+
};
|
|
150
154
|
router: {
|
|
151
155
|
type: ObjectConstructor;
|
|
152
156
|
required: true;
|
|
@@ -304,6 +308,10 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
304
308
|
type: FunctionConstructor;
|
|
305
309
|
required: false;
|
|
306
310
|
};
|
|
311
|
+
preContentData: {
|
|
312
|
+
type: ArrayConstructor;
|
|
313
|
+
required: false;
|
|
314
|
+
};
|
|
307
315
|
router: {
|
|
308
316
|
type: ObjectConstructor;
|
|
309
317
|
required: true;
|
package/dist/tsv2-library.es.js
CHANGED
|
@@ -6468,8 +6468,14 @@ function generateXlsxFile(data30, _ref2) {
|
|
|
6468
6468
|
compression: "deflate"
|
|
6469
6469
|
});
|
|
6470
6470
|
}
|
|
6471
|
-
const prepareRows = (headers, data30) => {
|
|
6471
|
+
const prepareRows = (headers, data30, preContentData) => {
|
|
6472
6472
|
const rows3 = [];
|
|
6473
|
+
if (preContentData && preContentData.length > 0) {
|
|
6474
|
+
preContentData.forEach((preContentDataRow) => {
|
|
6475
|
+
rows3.push(preContentDataRow.map((cell) => ({ value: cell })));
|
|
6476
|
+
});
|
|
6477
|
+
rows3.push([{ value: "" }]);
|
|
6478
|
+
}
|
|
6473
6479
|
if (headers) {
|
|
6474
6480
|
rows3.push(headers.map((h2) => ({ value: h2 })));
|
|
6475
6481
|
}
|
|
@@ -6499,8 +6505,8 @@ const prepareRows = (headers, data30) => {
|
|
|
6499
6505
|
return rows3;
|
|
6500
6506
|
};
|
|
6501
6507
|
const exportToExcel = async (options3) => {
|
|
6502
|
-
const { headers, data: data30, fileName } = options3;
|
|
6503
|
-
const rows3 = prepareRows(headers, data30);
|
|
6508
|
+
const { headers, data: data30, fileName, preContentData } = options3;
|
|
6509
|
+
const rows3 = prepareRows(headers, data30, preContentData);
|
|
6504
6510
|
const timestamps = (/* @__PURE__ */ new Date()).toLocaleDateString("en-gb", {
|
|
6505
6511
|
day: "2-digit",
|
|
6506
6512
|
month: "2-digit",
|
|
@@ -51972,7 +51978,8 @@ const _sfc_main$V = /* @__PURE__ */ defineComponent({
|
|
|
51972
51978
|
virtualScrollerOptions: {},
|
|
51973
51979
|
globalFilterFields: {},
|
|
51974
51980
|
totalDisabledRows: {},
|
|
51975
|
-
rowClass: { type: Function, default: void 0 }
|
|
51981
|
+
rowClass: { type: Function, default: void 0 },
|
|
51982
|
+
preContentData: {}
|
|
51976
51983
|
},
|
|
51977
51984
|
emits: ["toggleOption", "toggleChildrenOption", "selectData", "rowSelect", "page", "sort", "update:selectedData"],
|
|
51978
51985
|
setup(__props, { emit: __emit }) {
|
|
@@ -52318,7 +52325,8 @@ const _sfc_main$V = /* @__PURE__ */ defineComponent({
|
|
|
52318
52325
|
exportToExcel({
|
|
52319
52326
|
headers,
|
|
52320
52327
|
data: excelBody,
|
|
52321
|
-
fileName: formatFileName()
|
|
52328
|
+
fileName: formatFileName(),
|
|
52329
|
+
preContentData: props.preContentData
|
|
52322
52330
|
});
|
|
52323
52331
|
} catch (error) {
|
|
52324
52332
|
console.error(error);
|
|
@@ -66720,6 +66728,7 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
|
66720
66728
|
globalFilterFields: {},
|
|
66721
66729
|
totalDisabledRows: {},
|
|
66722
66730
|
rowClass: { type: Function },
|
|
66731
|
+
preContentData: {},
|
|
66723
66732
|
router: {},
|
|
66724
66733
|
reason: {}
|
|
66725
66734
|
},
|
|
@@ -73736,7 +73745,8 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
73736
73745
|
});
|
|
73737
73746
|
const _hoisted_1 = {
|
|
73738
73747
|
class: "flex gap-1 items-center text-placeholder",
|
|
73739
|
-
"data-section-name": "transaction-role-lists"
|
|
73748
|
+
"data-section-name": "transaction-role-lists",
|
|
73749
|
+
style: { "pointer-events": "all !important" }
|
|
73740
73750
|
};
|
|
73741
73751
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
73742
73752
|
__name: "TransactionRoles",
|
|
@@ -73983,7 +73993,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
73983
73993
|
"data-role-name": role.label,
|
|
73984
73994
|
icon: role.icon,
|
|
73985
73995
|
info: role.info,
|
|
73986
|
-
severity: role.severity
|
|
73996
|
+
severity: role.severity,
|
|
73997
|
+
style: { "pointer-events": "all !important" }
|
|
73987
73998
|
}, null, 8, ["class", "data-role-name", "icon", "info", "severity"]);
|
|
73988
73999
|
}), 128))
|
|
73989
74000
|
]);
|