tsv2-library 1.1.1-dev-alpha.11 → 1.1.1-dev-alpha.13

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.
@@ -62692,10 +62692,10 @@ const _hoisted_1$R = {
62692
62692
  class: "flex items-start"
62693
62693
  };
62694
62694
  const _hoisted_2$C = {
62695
- class: "flex justify-between items-end",
62695
+ class: "flex text-xs text-nowrap gap-0.5",
62696
62696
  "data-ts-section": "description"
62697
62697
  };
62698
- const _hoisted_3$q = { class: "flex text-xs text-nowrap font-semibold gap-0.5" };
62698
+ const _hoisted_3$q = { class: "flex justify-between items-end" };
62699
62699
  const _hoisted_4$h = {
62700
62700
  class: "flex gap-1 w-full items-center justify-end",
62701
62701
  "data-ts-section": "button-group"
@@ -62711,7 +62711,7 @@ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
62711
62711
  __name: "DialogSelectAsset",
62712
62712
  props: /* @__PURE__ */ mergeModels({
62713
62713
  withButton: { type: Boolean, default: true },
62714
- withPrint: { type: Boolean },
62714
+ showColumns: {},
62715
62715
  visible: { type: Boolean },
62716
62716
  buttonLabel: {},
62717
62717
  currentAssetDetail: {},
@@ -62762,16 +62762,17 @@ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
62762
62762
  const filter4 = reactive({});
62763
62763
  const filterQueryParams = ref();
62764
62764
  const columns2 = computed(() => {
62765
+ var _a;
62765
62766
  const tagColumn = {
62766
62767
  field: "tagType",
62767
62768
  header: "TAG",
62768
62769
  sortable: true,
62769
62770
  bodyComponent: (data30) => {
62770
- var _a, _b;
62771
+ var _a2, _b;
62771
62772
  return {
62772
62773
  component: TSTagType,
62773
62774
  props: {
62774
- qr: (_a = data30.tagType) == null ? void 0 : _a.includes("QR"),
62775
+ qr: (_a2 = data30.tagType) == null ? void 0 : _a2.includes("QR"),
62775
62776
  rfid: (_b = data30.tagType) == null ? void 0 : _b.includes("RFID")
62776
62777
  }
62777
62778
  };
@@ -62793,8 +62794,8 @@ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
62793
62794
  sortable: true,
62794
62795
  fixed: false,
62795
62796
  bodyTemplate: (data30) => {
62796
- var _a;
62797
- return ((_a = data30.totalAssets) == null ? void 0 : _a.toString()) ?? "-";
62797
+ var _a2;
62798
+ return ((_a2 = data30.totalAssets) == null ? void 0 : _a2.toString()) ?? "-";
62798
62799
  }
62799
62800
  }
62800
62801
  ];
@@ -62824,7 +62825,10 @@ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
62824
62825
  ...defaultAssetColumns.value["group.name"],
62825
62826
  checkedByDefault: true
62826
62827
  },
62827
- defaultAssetColumns.value["category.name"],
62828
+ {
62829
+ ...defaultAssetColumns.value["category.name"],
62830
+ checkedByDefault: true
62831
+ },
62828
62832
  {
62829
62833
  ...defaultAssetColumns.value["brand.name"],
62830
62834
  checkedByDefault: true
@@ -62833,7 +62837,10 @@ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
62833
62837
  ...defaultAssetColumns.value["model.name"],
62834
62838
  checkedByDefault: true
62835
62839
  },
62836
- { ...defaultAssetColumns.value["labelStatus"], visible: props.withPrint },
62840
+ {
62841
+ ...defaultAssetColumns.value["labelStatus"],
62842
+ visible: !!((_a = props.showColumns) == null ? void 0 : _a.includes("labelStatus"))
62843
+ },
62837
62844
  { ...defaultAssetColumns.value["tagType"], checkedByDefault: true },
62838
62845
  defaultAssetColumns.value["measurement.name"],
62839
62846
  defaultAssetColumns.value["maintenanceStatus"],
@@ -62846,7 +62853,12 @@ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
62846
62853
  defaultAssetColumns.value["linkedAssetCount"],
62847
62854
  ...customFieldColumns.value
62848
62855
  ];
62849
- return assetColumn.filter((col) => col.visible !== false);
62856
+ return assetColumn.filter((col) => col.visible !== false).filter(
62857
+ (col) => {
62858
+ var _a2;
62859
+ return props.showColumns ? (_a2 = props.showColumns) == null ? void 0 : _a2.includes(col.field) : true;
62860
+ }
62861
+ );
62850
62862
  });
62851
62863
  const filterLists = computed(() => {
62852
62864
  const tagConfig = {
@@ -63145,6 +63157,8 @@ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
63145
63157
  const fields = Object.keys(filter4);
63146
63158
  const parsedFilter = {};
63147
63159
  fields.forEach((field2) => {
63160
+ if (filter4[field2] === null || Array.isArray(filter4[field2]) && filter4[field2].length === 0)
63161
+ return;
63148
63162
  parsedFilter[field2] = JSON.stringify(filter4[field2]);
63149
63163
  });
63150
63164
  filterQueryParams.value = parsedFilter;
@@ -63196,7 +63210,7 @@ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
63196
63210
  ])) : createCommentVNode("", true),
63197
63211
  createVNode(_sfc_main$1D, {
63198
63212
  visible: visible4.value,
63199
- "onUpdate:visible": _cache[12] || (_cache[12] = ($event) => visible4.value = $event),
63213
+ "onUpdate:visible": _cache[13] || (_cache[13] = ($event) => visible4.value = $event),
63200
63214
  header: header.value,
63201
63215
  pt: { root: { style: { width: dialogSize.value } } },
63202
63216
  onHide: resetState,
@@ -63211,7 +63225,7 @@ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
63211
63225
  ]),
63212
63226
  createElementVNode("div", _hoisted_7$a, [
63213
63227
  createVNode(_sfc_main$1Q, {
63214
- onClick: _cache[9] || (_cache[9] = ($event) => visible4.value = false),
63228
+ onClick: _cache[10] || (_cache[10] = ($event) => visible4.value = false),
63215
63229
  "data-ts-section": "button-cancel",
63216
63230
  label: "Cancel",
63217
63231
  severity: "secondary",
@@ -63228,7 +63242,7 @@ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
63228
63242
  props.type === "child" ? (openBlock(), createBlock(_sfc_main$1m, {
63229
63243
  key: 0,
63230
63244
  visible: showConfirmDialog.value,
63231
- "onUpdate:visible": _cache[10] || (_cache[10] = ($event) => showConfirmDialog.value = $event),
63245
+ "onUpdate:visible": _cache[11] || (_cache[11] = ($event) => showConfirmDialog.value = $event),
63232
63246
  lists: selectedData.value,
63233
63247
  onConfirm: closeDialog,
63234
63248
  body: "All selected asset(s) will be attached as child asset. Are you sure want to attach it?",
@@ -63241,7 +63255,7 @@ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
63241
63255
  props.type === "parent" ? (openBlock(), createBlock(_sfc_main$1m, {
63242
63256
  key: 1,
63243
63257
  visible: showConfirmDialog.value,
63244
- "onUpdate:visible": _cache[11] || (_cache[11] = ($event) => showConfirmDialog.value = $event),
63258
+ "onUpdate:visible": _cache[12] || (_cache[12] = ($event) => showConfirmDialog.value = $event),
63245
63259
  onConfirm: closeDialog,
63246
63260
  "confirm-label": "Attach",
63247
63261
  header: "Attach Asset",
@@ -63263,19 +63277,28 @@ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
63263
63277
  }, 8, ["visible"])) : createCommentVNode("", true)
63264
63278
  ]),
63265
63279
  default: withCtx(() => [
63266
- createElementVNode("div", _hoisted_2$C, [
63267
- createElementVNode("span", _hoisted_3$q, [
63268
- renderSlot(_ctx.$slots, "description", {}, () => [
63269
- createTextVNode(toDisplayString$1(getDescription()), 1)
63270
- ]),
63271
- tooltipInfo.value ? (openBlock(), createBlock(_sfc_main$1R, {
63272
- key: 0,
63273
- info: tooltipInfo.value,
63274
- "data-ts-section": "tooltipinfo",
63275
- icon: "info",
63276
- severity: "primary"
63277
- }, null, 8, ["info"])) : createCommentVNode("", true)
63280
+ createElementVNode("span", _hoisted_2$C, [
63281
+ renderSlot(_ctx.$slots, "description", {}, () => [
63282
+ createTextVNode(toDisplayString$1(getDescription()), 1)
63278
63283
  ]),
63284
+ tooltipInfo.value ? (openBlock(), createBlock(_sfc_main$1R, {
63285
+ key: 0,
63286
+ info: tooltipInfo.value,
63287
+ "data-ts-section": "tooltipinfo",
63288
+ icon: "info",
63289
+ severity: "primary"
63290
+ }, null, 8, ["info"])) : createCommentVNode("", true)
63291
+ ]),
63292
+ createElementVNode("div", _hoisted_3$q, [
63293
+ createVNode(_sfc_main$1z, {
63294
+ "selected-data": selectedData.value,
63295
+ "onUpdate:selectedData": _cache[1] || (_cache[1] = ($event) => selectedData.value = $event),
63296
+ options: [],
63297
+ "table-name": TABLE_NAME,
63298
+ "use-button": false,
63299
+ "data-ts": "bulk-action-button",
63300
+ naming: "Asset(s)"
63301
+ }, null, 8, ["selected-data"]),
63279
63302
  createElementVNode("div", _hoisted_4$h, [
63280
63303
  _ctx.useScanButton || _ctx.type === "asset" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
63281
63304
  _ctx.scanType === "search" || _ctx.type === "asset" ? (openBlock(), createBlock(_sfc_main$1i, {
@@ -63288,12 +63311,12 @@ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
63288
63311
  ], 64))
63289
63312
  ], 64)) : createCommentVNode("", true),
63290
63313
  createVNode(_sfc_main$1k, {
63291
- onSearch: _cache[1] || (_cache[1] = ($event) => searchModel.value = $event),
63314
+ onSearch: _cache[2] || (_cache[2] = ($event) => searchModel.value = $event),
63292
63315
  "data-ts-section": "button-search"
63293
63316
  }),
63294
63317
  createVNode(_sfc_main$1y, {
63295
63318
  "show-filter": showFilter.value,
63296
- "onUpdate:showFilter": _cache[2] || (_cache[2] = ($event) => showFilter.value = $event),
63319
+ "onUpdate:showFilter": _cache[3] || (_cache[3] = ($event) => showFilter.value = $event),
63297
63320
  "data-ts-section": "button-filter"
63298
63321
  }, null, 8, ["show-filter"])
63299
63322
  ])
@@ -63308,19 +63331,19 @@ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
63308
63331
  _ctx.type === "asset" ? (openBlock(), createBlock(_sfc_main$11, {
63309
63332
  key: 0,
63310
63333
  filter: filter4,
63311
- "onUpdate:filter": _cache[3] || (_cache[3] = ($event) => filter4 = $event),
63334
+ "onUpdate:filter": _cache[4] || (_cache[4] = ($event) => filter4 = $event),
63312
63335
  "visible-columns": visibleColumns.value,
63313
- "onUpdate:visibleColumns": _cache[4] || (_cache[4] = ($event) => visibleColumns.value = $event),
63336
+ "onUpdate:visibleColumns": _cache[5] || (_cache[5] = ($event) => visibleColumns.value = $event),
63314
63337
  "fetch-options": props.fetchOptionFunction ?? handleFetchOptions,
63315
63338
  "table-name": TABLE_NAME,
63316
63339
  "tag-type": typeof props.tagType !== "boolean" ? props.tagType : void 0,
63317
- onUpdateFields: _cache[5] || (_cache[5] = ($event) => containerKey.value++)
63340
+ onUpdateFields: _cache[6] || (_cache[6] = ($event) => containerKey.value++)
63318
63341
  }, null, 8, ["filter", "visible-columns", "fetch-options", "tag-type"])) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(filterLists.value, (field2) => {
63319
63342
  return openBlock(), createElementBlock(Fragment, null, [
63320
63343
  field2.fieldName === "group" ? (openBlock(), createBlock(_sfc_main$1d, {
63321
63344
  key: field2.label,
63322
63345
  keys: filter4.group,
63323
- "onUpdate:keys": _cache[6] || (_cache[6] = ($event) => filter4.group = $event),
63346
+ "onUpdate:keys": _cache[7] || (_cache[7] = ($event) => filter4.group = $event),
63324
63347
  "field-label": "Group",
63325
63348
  label: "Select Group",
63326
63349
  type: "Group"
@@ -63350,7 +63373,7 @@ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
63350
63373
  (openBlock(), createBlock(_sfc_main$18, {
63351
63374
  key: dataTableKey.value,
63352
63375
  "selected-data": selectedData.value,
63353
- "onUpdate:selectedData": _cache[7] || (_cache[7] = ($event) => selectedData.value = $event),
63376
+ "onUpdate:selectedData": _cache[8] || (_cache[8] = ($event) => selectedData.value = $event),
63354
63377
  columns: columns2.value,
63355
63378
  "fetch-function": props.fetchFunction ?? getTableData,
63356
63379
  filters: filterQueryParams.value,
@@ -63360,7 +63383,7 @@ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
63360
63383
  "selection-type": _ctx.type === "parent" ? "single" : void 0,
63361
63384
  "table-name": props.type + props.tagType,
63362
63385
  "use-option": false,
63363
- onRowSelect: _cache[8] || (_cache[8] = ($event) => showValidator.value = false),
63386
+ onRowSelect: _cache[9] || (_cache[9] = ($event) => showValidator.value = false),
63364
63387
  "data-key": "_id",
63365
63388
  "data-ts-section": "dialog-select-asset-table",
63366
63389
  lazy: "",
@@ -63387,6 +63410,8 @@ const _sfc_main$$ = /* @__PURE__ */ defineComponent({
63387
63410
  const fields = Object.keys(filter4);
63388
63411
  const filterQuery = {};
63389
63412
  fields.forEach((field2) => {
63413
+ if (filter4[field2] === null || Array.isArray(filter4[field2]) && filter4[field2].length === 0)
63414
+ return;
63390
63415
  filterQuery[field2] = JSON.stringify(filter4[field2]);
63391
63416
  });
63392
63417
  return filterQuery;
@@ -65082,6 +65107,8 @@ const _sfc_main$Q = /* @__PURE__ */ defineComponent({
65082
65107
  const fields = Object.keys(filter4);
65083
65108
  const filterQuery = {};
65084
65109
  fields.forEach((field2) => {
65110
+ if (filter4[field2] === null || Array.isArray(filter4[field2]) && filter4[field2].length === 0)
65111
+ return;
65085
65112
  filterQuery[field2] = JSON.stringify(filter4[field2]);
65086
65113
  });
65087
65114
  return filterQuery;
@@ -67314,6 +67341,8 @@ const _sfc_main$K = /* @__PURE__ */ defineComponent({
67314
67341
  const fields = Object.keys(filter4);
67315
67342
  const filterQuery = {};
67316
67343
  fields.forEach((field2) => {
67344
+ if (filter4[field2] === null || Array.isArray(filter4[field2]) && filter4[field2].length === 0)
67345
+ return;
67317
67346
  filterQuery[field2] = JSON.stringify(filter4[field2]);
67318
67347
  });
67319
67348
  return filterQuery;
@@ -67410,8 +67439,8 @@ const _sfc_main$K = /* @__PURE__ */ defineComponent({
67410
67439
  };
67411
67440
  }
67412
67441
  });
67413
- const AssetListFilter_vue_vue_type_style_index_0_scoped_76eba6a3_lang = "";
67414
- const AssetListFilter = /* @__PURE__ */ _export_sfc(_sfc_main$K, [["__scopeId", "data-v-76eba6a3"]]);
67442
+ const AssetListFilter_vue_vue_type_style_index_0_scoped_83dec72c_lang = "";
67443
+ const AssetListFilter = /* @__PURE__ */ _export_sfc(_sfc_main$K, [["__scopeId", "data-v-83dec72c"]]);
67415
67444
  const _withScopeId$1 = (n) => (pushScopeId("data-v-4beebd27"), n = n(), popScopeId(), n);
67416
67445
  const _hoisted_1$E = { class: "w-full flex-1 p-6 gap-3 overflow-auto" };
67417
67446
  const _hoisted_2$t = { class: "flex flex-col gap-3" };
@@ -72083,16 +72112,16 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
72083
72112
  var _a, _b, _c, _d, _e, _f;
72084
72113
  const largeLinesLength = [
72085
72114
  (((_a = props.label.assetName) == null ? void 0 : _a.length) ?? 0) > 16,
72086
- (((_b = props.label.code) == null ? void 0 : _b.length) ?? 0) > 16,
72087
- (((_c = props.label.category) == null ? void 0 : _c.length) ?? 0) > 14
72115
+ (((_b = props.label.code) == null ? void 0 : _b.length) ?? 0) > 17,
72116
+ (((_c = props.label.category) == null ? void 0 : _c.length) ?? 0) > 15
72088
72117
  ].filter(Boolean).length;
72089
72118
  const mediumLinesLength = [
72090
72119
  (((_d = props.label.assetName) == null ? void 0 : _d.length) ?? 0) > 18,
72091
- (((_e = props.label.code) == null ? void 0 : _e.length) ?? 0) > 19,
72092
- (((_f = props.label.category) == null ? void 0 : _f.length) ?? 0) > 15
72120
+ (((_e = props.label.code) == null ? void 0 : _e.length) ?? 0) > 22,
72121
+ (((_f = props.label.category) == null ? void 0 : _f.length) ?? 0) > 16
72093
72122
  ].filter(Boolean).length;
72094
- if (largeLinesLength > 0) {
72095
- if (mediumLinesLength > 1)
72123
+ if (largeLinesLength > 1) {
72124
+ if (mediumLinesLength > 2)
72096
72125
  return "small";
72097
72126
  return "medium";
72098
72127
  }
@@ -72204,7 +72233,8 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
72204
72233
  width: 190px;
72205
72234
  height: 95px;
72206
72235
  padding: 8px;
72207
- padding-left: calc(8px + 12.5px);
72236
+ padding-left: calc(12px + 12.5px);
72237
+ padding-right: 12px;
72208
72238
  }
72209
72239
 
72210
72240
  .label--large {
@@ -72228,7 +72258,7 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
72228
72258
  .label__logo--small {
72229
72259
  height: 13px;
72230
72260
  width: 60px;
72231
- left: 10.5px;
72261
+ left: 12.5px;
72232
72262
  transform: translateY(23.5px) rotate(-90deg);
72233
72263
  }
72234
72264
 
@@ -72270,8 +72300,8 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
72270
72300
  }
72271
72301
 
72272
72302
  .label__code--medium {
72273
- font-size: 12px;
72274
- line-height: 16px;
72303
+ font-size: 11px;
72304
+ line-height: 14px;
72275
72305
  }
72276
72306
 
72277
72307
  .label__code--large {
@@ -72292,8 +72322,8 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
72292
72322
  }
72293
72323
 
72294
72324
  .label__meta--medium {
72295
- font-size: 12px;
72296
- line-height: 16px;
72325
+ font-size: 11px;
72326
+ line-height: 14px;
72297
72327
  }
72298
72328
 
72299
72329
  .label__meta--large {
@@ -73283,6 +73313,8 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
73283
73313
  const fields = Object.keys(filter4);
73284
73314
  const parsedFilter = {};
73285
73315
  fields.forEach((field2) => {
73316
+ if (filter4[field2] === null || Array.isArray(filter4[field2]) && filter4[field2].length === 0)
73317
+ return;
73286
73318
  parsedFilter[field2] = JSON.stringify(filter4[field2]);
73287
73319
  });
73288
73320
  filterQueryParams.value = parsedFilter;