tsv2-library 1.0.61-alpha.2 → 1.0.61-alpha.21

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.
Files changed (35) hide show
  1. package/dist/loading-0-1a7cddc8.js +4 -0
  2. package/dist/loading-1-892eee7c.js +4 -0
  3. package/dist/loading-2-bf39c889.js +4 -0
  4. package/dist/loading-3-f1ea4b15.js +4 -0
  5. package/dist/src/build-entry.d.ts +1 -2827
  6. package/dist/src/components/v2/ButtonSelectTree/ButtonSelectTree.vue.d.ts +2 -2
  7. package/dist/src/components/v2/Calendar/Calendar.vue.d.ts +1 -1
  8. package/dist/src/components/v2/DialogReportMissing/DialogReportMissing.vue.d.ts +9 -0
  9. package/dist/src/components/v2/DialogSelectTree/DialogSelectTree.vue.d.ts +2 -2
  10. package/dist/src/components/v2/HardwareSync/HardwareSync.vue.d.ts +2 -2
  11. package/dist/src/components/v2/ImageCompressor/BackgroundImageCropper.vue.d.ts +1 -1
  12. package/dist/src/components/v2/Tree/Tree.vue.d.ts +7 -3
  13. package/dist/src/components/v2/Tree/helpers/filterNodeKeys.helper.d.ts +1 -1
  14. package/dist/src/dto/missing.dto.d.ts +2 -0
  15. package/dist/src/presets/button/index.js +7 -2
  16. package/dist/src/presets/toast/index.js +1 -1
  17. package/dist/src/types/assets.type.d.ts +2 -3
  18. package/dist/src/utils/getImageURL.util.d.ts +11 -2
  19. package/dist/src/utils/index.d.ts +1 -1
  20. package/dist/style.css +1 -1
  21. package/dist/tsv2-library.es.js +47757 -53269
  22. package/dist/tsv2-library.umd.js +47 -609
  23. package/package.json +3 -1
  24. package/src/components/v2/ButtonSelectTree/ButtonSelectTree.vue.d.ts +2 -2
  25. package/src/components/v2/Calendar/Calendar.vue.d.ts +1 -1
  26. package/src/components/v2/DialogSelectTree/DialogSelectTree.vue.d.ts +2 -2
  27. package/src/components/v2/Tree/Tree.vue.d.ts +7 -3
  28. package/src/presets/button/index.js +7 -2
  29. package/src/presets/toast/index.js +1 -1
  30. package/src/services/damage.service.ts +1 -1
  31. package/src/services/missing.service.ts +1 -1
  32. package/dist/loading-0-7762a473.js +0 -4
  33. package/dist/loading-1-55418796.js +0 -4
  34. package/dist/loading-2-b6abf641.js +0 -4
  35. package/dist/loading-3-705786b6.js +0 -4
@@ -4,7 +4,7 @@ import { TreeNode } from '../Tree/Tree.vue.d';
4
4
  import { TSVueIconSeverities } from '../Icon/Icon.vue.d';
5
5
  import { Severities } from '../../../utils/getSeverityByAssetStatus.util';
6
6
 
7
- export type KeysModelValue = number[] | undefined;
7
+ export type KeysModelValue = string[] | undefined;
8
8
 
9
9
  export interface ButtonSelectTreeProps {
10
10
  /**
@@ -133,7 +133,7 @@ export interface ButtonSelectTreeProps {
133
133
  /**
134
134
  * Defines the group tree to disable excluded keys
135
135
  */
136
- excludedKeys?: number[];
136
+ excludedKeys?: string[];
137
137
  /**
138
138
  * Define wether single selection can be edited or readonly
139
139
  * @default true
@@ -27,7 +27,7 @@ export interface TSCalendarProps {
27
27
  *
28
28
  * @example [DD,MM,YYY, 00.00.00, DD,MM,YYY, 23.59.59]
29
29
  *
30
- * @default false returns [DD,MM,YYY, 00.00.00, DD,MM,YYY, 00.00.00]
30
+ * @default true returns [DD,MM,YYY, 00.00.00, DD,MM,YYY, 00.00.00]
31
31
  */
32
32
  setEndDateHours?: boolean;
33
33
  /**
@@ -1,9 +1,14 @@
1
1
  import type { PropType as __PropType } from 'vue';
2
+ import { ReportSourceType } from '../../../dto/missing.dto';
2
3
  declare const _sfc_main: import("vue").DefineComponent<{
3
4
  id: {
4
5
  type: __PropType<string>;
5
6
  required: true;
6
7
  };
8
+ reportSource: {
9
+ type: __PropType<ReportSourceType>;
10
+ required: true;
11
+ };
7
12
  trackingId: {
8
13
  type: __PropType<string | undefined>;
9
14
  required: false;
@@ -38,6 +43,10 @@ declare const _sfc_main: import("vue").DefineComponent<{
38
43
  type: __PropType<string>;
39
44
  required: true;
40
45
  };
46
+ reportSource: {
47
+ type: __PropType<ReportSourceType>;
48
+ required: true;
49
+ };
41
50
  trackingId: {
42
51
  type: __PropType<string | undefined>;
43
52
  required: false;
@@ -26,7 +26,7 @@ export interface SelectTreeDialogProps {
26
26
  /**
27
27
  * The previously selected tree key to be displayed again.
28
28
  */
29
- keys?: number[];
29
+ keys?: string[];
30
30
  /**
31
31
  * The lists to be displayed in the dialog.
32
32
  */
@@ -57,7 +57,7 @@ export interface SelectTreeDialogProps {
57
57
  /**
58
58
  * Defines the group tree to disable excluded keys
59
59
  */
60
- excludedKeys?: number[];
60
+ excludedKeys?: string[];
61
61
  /**
62
62
  * Render hidden dialog to trigger fetch tree
63
63
  */
@@ -10,7 +10,7 @@ declare const _sfc_main: import("vue").DefineComponent<{
10
10
  required: false;
11
11
  };
12
12
  searchBy: {
13
- type: __PropType<"QR" | "RFID" | undefined>;
13
+ type: __PropType<"RFID" | "QR" | undefined>;
14
14
  required: false;
15
15
  };
16
16
  bulk: {
@@ -35,7 +35,7 @@ declare const _sfc_main: import("vue").DefineComponent<{
35
35
  required: false;
36
36
  };
37
37
  searchBy: {
38
- type: __PropType<"QR" | "RFID" | undefined>;
38
+ type: __PropType<"RFID" | "QR" | undefined>;
39
39
  required: false;
40
40
  };
41
41
  bulk: {
@@ -34,7 +34,7 @@ declare const _sfc_main: import("vue").DefineComponent<{
34
34
  required: false;
35
35
  };
36
36
  }>> & {
37
- onMove?: ((...args: any[]) => any) | undefined;
38
37
  onResize?: ((...args: any[]) => any) | undefined;
38
+ onMove?: ((...args: any[]) => any) | undefined;
39
39
  }, {}, {}>;
40
40
  export default _sfc_main;
@@ -11,7 +11,7 @@ export interface TreeNode {
11
11
  /**
12
12
  * Mandatory unique key of the node.
13
13
  */
14
- key?: string | number;
14
+ key?: string;
15
15
  /**
16
16
  * Label of the node.
17
17
  */
@@ -71,7 +71,7 @@ export interface TreeNode {
71
71
 
72
72
  export interface TreeProps {
73
73
  type: 'Group' | 'Category';
74
- selectedKeys?: TreeSelectionKeys | number[] | undefined;
74
+ selectedKeys?: TreeSelectionKeys | string[] | undefined;
75
75
  selectedTreeNodes?: TreeNode[] | undefined;
76
76
  selectionMode?: 'single' | 'checkbox' | undefined;
77
77
  /**
@@ -95,6 +95,10 @@ export interface TreeProps {
95
95
  * Disable node 'All' selection
96
96
  */
97
97
  disableNodeAll?: boolean;
98
+ /**
99
+ * Disable level 2 (All > Level 1 > Level 2)
100
+ */
101
+ disableSubChildren?: boolean;
98
102
  /**
99
103
  * Include node All key (-1) on Checkbox Selection
100
104
  *
@@ -124,7 +128,7 @@ export interface TreeProps {
124
128
  /**
125
129
  * Defines the group tree to disable excluded keys
126
130
  */
127
- excludedKeys?: number[];
131
+ excludedKeys?: string[];
128
132
  }
129
133
 
130
134
  export type TreeEmits = {
@@ -5,7 +5,7 @@ import { TreeSelectionKeys } from '../../../../../node_modules/primevue/tree';
5
5
  * @param nodeKeys - A collection of selected node keys.
6
6
  * @param includeNodeAllKey - Whether to include the "-1" key (representing "All").
7
7
  */
8
- export declare const parseNodeKeys: (nodeKeys: TreeSelectionKeys, includeNodeAllKey?: boolean) => number[];
8
+ export declare const parseNodeKeys: (nodeKeys: TreeSelectionKeys, includeNodeAllKey?: boolean) => string[];
9
9
  /**
10
10
  * Filters a collection of selected node keys based on specific criteria.
11
11
  *
@@ -1,3 +1,5 @@
1
1
  export type ReportMissingBody = {
2
2
  notes: string;
3
+ reportSource: ReportSourceType;
3
4
  };
5
+ export type ReportSourceType = 'Available Asset' | 'Audit Asset' | 'Borrowed Asset' | 'Assigned Asset' | 'Tracking Asset' | 'Maintenance Asset';
@@ -449,7 +449,7 @@ export default {
449
449
 
450
450
  // Disabled
451
451
  {
452
- '!text-general-200 !pointer-events-none !cursor-default':
452
+ '!pointer-events-none !cursor-default':
453
453
  context.disabled || props.disabled,
454
454
  },
455
455
 
@@ -463,9 +463,14 @@ export default {
463
463
  },
464
464
  // Outlined Disabled
465
465
  {
466
- '!ring-1 !ring-offset-0 !ring-general-200':
466
+ '!text-general-200 !ring-1 !ring-offset-0 !ring-general-200':
467
467
  (props.disabled || context.disabled) && props.outlined,
468
468
  },
469
+ // Text Disabled
470
+ {
471
+ '!text-general-200':
472
+ (props.disabled || context.disabled) && props.text,
473
+ },
469
474
 
470
475
  // Transitions
471
476
  'transition duration-200 ease-in-out',
@@ -14,7 +14,7 @@ export default {
14
14
  }),
15
15
  container: ({ props }) => ({
16
16
  class: [
17
- 'border-0 border-l-4 mt-6',
17
+ 'border-l-4 mt-6',
18
18
  'rounded-[7px] w-full',
19
19
  'shadow-lg',
20
20
  // Colors
@@ -62,14 +62,13 @@ export type Asset = {
62
62
  updatedAt?: string;
63
63
  rfid?: string;
64
64
  qr?: string;
65
- firstImageSmall?: string;
66
- firstImageMedium?: string;
67
- firstImageBig?: string;
65
+ firstImage?: string;
68
66
  secondImageSmall?: string;
69
67
  secondImageMedium?: string;
70
68
  secondImageBig?: string;
71
69
  assetImageSmall?: string;
72
70
  assetImageMedium?: string;
73
71
  assetImageBig?: string;
72
+ assetImage?: string;
74
73
  setDefault?: 'firstImage' | 'secondImage';
75
74
  };
@@ -1,2 +1,11 @@
1
- declare const getImageURL: (name?: string | null) => string | undefined;
2
- export default getImageURL;
1
+ export declare const buildFileURL: (name?: string, width?: number, height?: number) => string;
2
+ export declare const fetchBlobFile: (url: string, token: string) => Promise<Blob>;
3
+ /**
4
+ *
5
+ * @param fileUrl The full URL
6
+ * @param fileName Custom File name
7
+ * @param immediateRevoke Immediately revoke the object URL after download - default to true
8
+ * @returns
9
+ */
10
+ export declare const downloadFile: (fileUrl: string, fileName: string, immediateRevoke?: boolean) => Promise<string>;
11
+ export declare const getImageURL: (name?: string | null, width?: number, height?: number, returnURLOnly?: boolean) => Promise<string | undefined>;
@@ -3,7 +3,7 @@ import handleTokenExpiration from './handleTokenExpiration.util';
3
3
  import exportToExcel from './exportToExcel.util';
4
4
  import { formatGoDate, formatDate, formatDateReadable, getUserLocale } from './date.util';
5
5
  import useToast from './toast.util';
6
- import getImageURL from './getImageURL.util';
6
+ import { getImageURL } from './getImageURL.util';
7
7
  import { getTransactionRole, getSystemRole, hasSystemRole, hasTransactionRole, checkRouteAccess, hasApprovalRole, hasManagerRole, hasAnyManagerRole, hasAnyMonitoringReportRole, hasMonitoringReportRole, hasStaffRole } from './role.util';
8
8
  import { getCurrency, formatCurrency } from './currency.util';
9
9
  import { unListenSidebarChanges, listenSidebarChanges } from './listenSidebarChanges.util';