tsv2-library 1.1.1-dev-alpha.7 → 1.1.1-dev-alpha.9
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/AssetTable/columns/assetColumns.d.ts +1 -1
- package/dist/src/components/v2/DialogForm/DialogForm.vue.d.ts +13 -2
- package/dist/src/components/v2/DialogPrintLabel/DialogPrintLabel.vue.d.ts +1 -1
- package/dist/tsv2-library.es.js +14 -31
- package/dist/tsv2-library.umd.js +1 -1
- package/package.json +1 -1
- package/src/components/v2/DialogForm/DialogForm.vue.d.ts +13 -2
- package/src/components/v2/DialogPrintLabel/DialogPrintLabel.vue.d.ts +1 -1
|
@@ -2,6 +2,6 @@ import { TableColumn } from '../../DataTable/DataTable.vue.d';
|
|
|
2
2
|
export declare const ASSET_COL_FIELDS: readonly ["assetImage", "name.nameWithSequence", "aliasName", "assetId", "group.name", "category.name", "brand.name", "model.name", "tagType", "measurement.name", "maintenanceStatus", "auditStatus", "transactions", "coordinates", "address", "warrantyStatus", "lastScannedAt", "linkedAssetCount"];
|
|
3
3
|
export type AssetColField = (typeof ASSET_COL_FIELDS)[number];
|
|
4
4
|
export declare const assetValueColumns: import("vue").Ref<TableColumn[], TableColumn[]>, assetValueColumnsWithDefault: import("vue").Ref<TableColumn[], TableColumn[]>, customFieldColumns: import("vue").Ref<TableColumn[], TableColumn[]>;
|
|
5
|
-
export declare const defaultAssetColumns: import("vue").ComputedRef<Record<"tagType" | "
|
|
5
|
+
export declare const defaultAssetColumns: import("vue").ComputedRef<Record<"tagType" | "transactions" | "assetImage" | "name.nameWithSequence" | "aliasName" | "assetId" | "group.name" | "category.name" | "brand.name" | "model.name" | "measurement.name" | "maintenanceStatus" | "auditStatus" | "coordinates" | "address" | "warrantyStatus" | "lastScannedAt" | "linkedAssetCount", TableColumn & {
|
|
6
6
|
field: AssetColField;
|
|
7
7
|
}>>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Slot } from 'vue';
|
|
2
|
-
import { FormPayload, FormProps } from '../Form/Form.vue.d';
|
|
2
|
+
import FormInstance, { FormPayload, FormProps } from '../Form/Form.vue.d';
|
|
3
3
|
import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
|
|
4
4
|
import { GenericObject } from 'vee-validate';
|
|
5
5
|
import { TSVueIcons } from '../Icon/Icon.vue.d';
|
|
@@ -216,7 +216,18 @@ declare class DialogForm extends ClassComponent<
|
|
|
216
216
|
DialogFormProps,
|
|
217
217
|
DialogFormSlots,
|
|
218
218
|
DialogFormEmits
|
|
219
|
-
> {
|
|
219
|
+
> {
|
|
220
|
+
/**
|
|
221
|
+
* The form instance.
|
|
222
|
+
*/
|
|
223
|
+
form: FormInstance;
|
|
224
|
+
/**
|
|
225
|
+
* Callback function for clear button click.
|
|
226
|
+
*
|
|
227
|
+
* @returns {void}
|
|
228
|
+
*/
|
|
229
|
+
clearField(): void;
|
|
230
|
+
}
|
|
220
231
|
|
|
221
232
|
declare module '@vue/runtime-core' {
|
|
222
233
|
interface GlobalComponents {
|
|
@@ -13,7 +13,7 @@ export type Label = {
|
|
|
13
13
|
*/
|
|
14
14
|
export interface DialogPrintLabelProps {
|
|
15
15
|
selectedData: Partial<
|
|
16
|
-
Pick<AssetTableData, 'name' | '
|
|
16
|
+
Pick<AssetTableData, 'name' | 'category' | 'purchaseDate'>
|
|
17
17
|
>[];
|
|
18
18
|
visible: boolean;
|
|
19
19
|
}
|
package/dist/tsv2-library.es.js
CHANGED
|
@@ -72017,25 +72017,8 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
72017
72017
|
addBorder: { type: Boolean }
|
|
72018
72018
|
},
|
|
72019
72019
|
setup(__props) {
|
|
72020
|
-
const props = __props;
|
|
72021
72020
|
const textSize = computed(() => {
|
|
72022
|
-
|
|
72023
|
-
const largeLinesLength = [
|
|
72024
|
-
(((_a = props.label.assetName) == null ? void 0 : _a.length) ?? 0) > 10,
|
|
72025
|
-
(((_b = props.label.code) == null ? void 0 : _b.length) ?? 0) > 14,
|
|
72026
|
-
(((_c = props.label.category) == null ? void 0 : _c.length) ?? 0) > 10
|
|
72027
|
-
].filter(Boolean).length;
|
|
72028
|
-
const mediumLinesLength = [
|
|
72029
|
-
(((_d = props.label.assetName) == null ? void 0 : _d.length) ?? 0) > 14,
|
|
72030
|
-
(((_e = props.label.code) == null ? void 0 : _e.length) ?? 0) > 16,
|
|
72031
|
-
(((_f = props.label.category) == null ? void 0 : _f.length) ?? 0) > 11
|
|
72032
|
-
].filter(Boolean).length;
|
|
72033
|
-
if (largeLinesLength > 0) {
|
|
72034
|
-
if (mediumLinesLength > 2)
|
|
72035
|
-
return "small";
|
|
72036
|
-
return "medium";
|
|
72037
|
-
}
|
|
72038
|
-
return "large";
|
|
72021
|
+
return "small";
|
|
72039
72022
|
});
|
|
72040
72023
|
return (_ctx, _cache) => {
|
|
72041
72024
|
return openBlock(), createElementBlock("div", {
|
|
@@ -72117,19 +72100,19 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
|
72117
72100
|
const props = __props;
|
|
72118
72101
|
const emit = __emit;
|
|
72119
72102
|
const paperStylesheet2 = computed(() => {
|
|
72120
|
-
const pageSize = labelSize.value === "small" ? "
|
|
72103
|
+
const pageSize = labelSize.value === "small" ? "105mm 17mm" : "70mm 30mm";
|
|
72121
72104
|
return `@page {
|
|
72122
72105
|
size: ${pageSize};
|
|
72123
72106
|
}`;
|
|
72124
72107
|
});
|
|
72125
72108
|
const printLabelLayoutStylesheet = computed(() => {
|
|
72126
72109
|
const isSmall = labelSize.value === "small";
|
|
72127
|
-
const boxWidth = isSmall ? "
|
|
72128
|
-
const boxHeight = isSmall ? "
|
|
72129
|
-
const gridColumns = isSmall ? "repeat(2,
|
|
72110
|
+
const boxWidth = isSmall ? "51mm" : "70mm";
|
|
72111
|
+
const boxHeight = isSmall ? "17mm" : "30mm";
|
|
72112
|
+
const gridColumns = isSmall ? "repeat(2, 51mm)" : "repeat(1, 70mm)";
|
|
72130
72113
|
const columnGap = isSmall ? "3mm" : "0";
|
|
72131
|
-
const gridWidth = isSmall ? "
|
|
72132
|
-
const labelScale = isSmall ? "1.
|
|
72114
|
+
const gridWidth = isSmall ? "105mm" : "70mm";
|
|
72115
|
+
const labelScale = isSmall ? "1.147" : "1.575";
|
|
72133
72116
|
return `
|
|
72134
72117
|
.label {
|
|
72135
72118
|
position: relative;
|
|
@@ -72140,8 +72123,8 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
|
72140
72123
|
}
|
|
72141
72124
|
|
|
72142
72125
|
.label--small {
|
|
72143
|
-
width:
|
|
72144
|
-
height:
|
|
72126
|
+
width: 168px;
|
|
72127
|
+
height: 56px;
|
|
72145
72128
|
padding: 8px;
|
|
72146
72129
|
padding-left: calc(6px + 12.5px);
|
|
72147
72130
|
}
|
|
@@ -72189,8 +72172,8 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
|
72189
72172
|
}
|
|
72190
72173
|
|
|
72191
72174
|
.label__asset--small {
|
|
72192
|
-
font-size:
|
|
72193
|
-
line-height:
|
|
72175
|
+
font-size: 9px;
|
|
72176
|
+
line-height: 12px;
|
|
72194
72177
|
}
|
|
72195
72178
|
|
|
72196
72179
|
.label__asset--medium {
|
|
@@ -72280,11 +72263,11 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
|
72280
72263
|
const labelSize = shallowRef("small");
|
|
72281
72264
|
const labels = computed(
|
|
72282
72265
|
() => props.selectedData.map((d) => {
|
|
72283
|
-
var _a, _b;
|
|
72266
|
+
var _a, _b, _c;
|
|
72284
72267
|
return {
|
|
72285
72268
|
assetName: (_a = d.name) == null ? void 0 : _a.nameWithSequence,
|
|
72286
|
-
code: d.
|
|
72287
|
-
category: (
|
|
72269
|
+
code: (_b = d.name) == null ? void 0 : _b.aliasCode,
|
|
72270
|
+
category: (_c = d.category) == null ? void 0 : _c.name,
|
|
72288
72271
|
purchaseDate: d.purchaseDate ? new Date(d.purchaseDate).getFullYear() : void 0
|
|
72289
72272
|
};
|
|
72290
72273
|
})
|