tsv2-library 1.1.0-dev-alpha.33 → 1.1.0-dev-alpha.35
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/ButtonSelectTree/ButtonSelectTree.vue.d.ts +10 -1
- package/dist/src/components/v2/DialogSelectTree/DialogSelectTree.vue.d.ts +10 -1
- package/dist/src/components/v2/Tree/Tree.vue.d.ts +10 -1
- package/dist/tsv2-library.es.js +14 -13
- package/dist/tsv2-library.umd.js +1 -1
- package/package.json +1 -1
- package/src/components/v2/ButtonSelectTree/ButtonSelectTree.vue.d.ts +10 -1
- package/src/components/v2/DialogSelectTree/DialogSelectTree.vue.d.ts +10 -1
- package/src/components/v2/Tree/Tree.vue.d.ts +10 -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<"
|
|
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
|
}>>;
|
|
@@ -3,7 +3,11 @@ import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
|
|
|
3
3
|
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
|
-
import {
|
|
6
|
+
import {
|
|
7
|
+
SystemRole,
|
|
8
|
+
SystemRoleAttribute,
|
|
9
|
+
TransactionType,
|
|
10
|
+
} from '@/utils/role.util';
|
|
7
11
|
|
|
8
12
|
export type KeysModelValue = string[] | undefined;
|
|
9
13
|
|
|
@@ -164,6 +168,11 @@ export interface ButtonSelectTreeProps {
|
|
|
164
168
|
* If the node's `manager[transaction]` value is false, the node will be rendered in a disabled state.
|
|
165
169
|
*/
|
|
166
170
|
requiredManagerPermission?: TransactionType;
|
|
171
|
+
/**
|
|
172
|
+
* Specifies the required system role permission to make a node selectable.
|
|
173
|
+
* If the node's `SystemRoleAttribute[SystemRole]` value is false, the node will be rendered in a disabled state.
|
|
174
|
+
*/
|
|
175
|
+
requiredSystemRole?: [SystemRoleAttribute, keyof SystemRole];
|
|
167
176
|
}
|
|
168
177
|
|
|
169
178
|
export type ButtonSelectTreeEmits = {
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
SystemRole,
|
|
3
|
+
SystemRoleAttribute,
|
|
4
|
+
TransactionType,
|
|
5
|
+
} from '@/utils/role.util';
|
|
2
6
|
import { TreeSelectionKeys } from '../../../../node_modules/primevue/tree';
|
|
3
7
|
|
|
4
8
|
export interface SelectTreeDialogProps {
|
|
@@ -76,6 +80,11 @@ export interface SelectTreeDialogProps {
|
|
|
76
80
|
* If the node's `manager[transaction]` value is false, the node will be rendered in a disabled state.
|
|
77
81
|
*/
|
|
78
82
|
requiredManagerPermission?: TransactionType;
|
|
83
|
+
/**
|
|
84
|
+
* Specifies the required system role permission to make a node selectable.
|
|
85
|
+
* If the node's `SystemRoleAttribute[SystemRole]` value is false, the node will be rendered in a disabled state.
|
|
86
|
+
*/
|
|
87
|
+
requiredSystemRole?: [SystemRoleAttribute, keyof SystemRole];
|
|
79
88
|
}
|
|
80
89
|
|
|
81
90
|
type TreeSelectPayload = {
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
SystemRole,
|
|
3
|
+
SystemRoleAttribute,
|
|
4
|
+
TransactionType,
|
|
5
|
+
} from '@/utils/role.util';
|
|
2
6
|
import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
|
|
3
7
|
import { TreeSelectionKeys } from '../../../../node_modules/primevue/tree';
|
|
4
8
|
import { MenuItem } from '../Menu/MenuItem';
|
|
@@ -134,6 +138,11 @@ export interface TreeProps {
|
|
|
134
138
|
* If the node's `manager[transaction]` value is false, the node will be rendered in a disabled state.
|
|
135
139
|
*/
|
|
136
140
|
requiredManagerPermission?: TransactionType;
|
|
141
|
+
/**
|
|
142
|
+
* Specifies the required system role permission to make a node selectable.
|
|
143
|
+
* If the node's `SystemRoleAttribute[SystemRole]` value is false, the node will be rendered in a disabled state.
|
|
144
|
+
*/
|
|
145
|
+
requiredSystemRole?: [SystemRoleAttribute, keyof SystemRole];
|
|
137
146
|
}
|
|
138
147
|
|
|
139
148
|
export type TreeEmits = {
|
package/dist/tsv2-library.es.js
CHANGED
|
@@ -42013,7 +42013,8 @@ const _sfc_main$1c = /* @__PURE__ */ defineComponent({
|
|
|
42013
42013
|
flattenDisposableNode: { type: Boolean },
|
|
42014
42014
|
groupParams: {},
|
|
42015
42015
|
excludedKeys: {},
|
|
42016
|
-
requiredManagerPermission: {}
|
|
42016
|
+
requiredManagerPermission: {},
|
|
42017
|
+
requiredSystemRole: {}
|
|
42017
42018
|
},
|
|
42018
42019
|
emits: ["update:selectedKeys", "update:selectedTreeNodes", "nodeSelect", "nodeUnselect", "toggleMenu"],
|
|
42019
42020
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
@@ -42175,10 +42176,6 @@ const _sfc_main$1c = /* @__PURE__ */ defineComponent({
|
|
|
42175
42176
|
const getParamsByPath = () => {
|
|
42176
42177
|
const pathName = window.location.pathname;
|
|
42177
42178
|
switch (true) {
|
|
42178
|
-
case pathName.includes("assets/all"):
|
|
42179
|
-
case pathName.includes("assets/available"):
|
|
42180
|
-
case pathName.includes("assets/registration"):
|
|
42181
|
-
return { showAll: true };
|
|
42182
42179
|
case pathName.includes("group"):
|
|
42183
42180
|
return {
|
|
42184
42181
|
systemRole: ["group"]
|
|
@@ -42458,13 +42455,13 @@ const _sfc_main$1c = /* @__PURE__ */ defineComponent({
|
|
|
42458
42455
|
}, null, 8, ["disabled", "model-value"])
|
|
42459
42456
|
]),
|
|
42460
42457
|
default: withCtx(({ node: node2 }) => {
|
|
42461
|
-
var _a, _b, _c, _d, _e, _f;
|
|
42458
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i;
|
|
42462
42459
|
return [
|
|
42463
42460
|
createElementVNode("span", {
|
|
42464
|
-
"data-exact-node-disabled": props.selectDisposableOnly && !node2.isDisposable || ((_a = props.excludedKeys) == null ? void 0 : _a.includes(node2.key)) || ((_b = props.exactDisableKey) == null ? void 0 : _b.toString()) === node2.key.toString() || props.disableSubChildren && node2.level >= 2 || props.
|
|
42461
|
+
"data-exact-node-disabled": props.selectDisposableOnly && !node2.isDisposable || ((_a = props.excludedKeys) == null ? void 0 : _a.includes(node2.key)) || ((_b = props.exactDisableKey) == null ? void 0 : _b.toString()) === node2.key.toString() || props.disableSubChildren && node2.level >= 2 || ((_c = props.requiredSystemRole) == null ? void 0 : _c.length) && !((_e = (_d = node2 == null ? void 0 : node2.hasSystemRoles) == null ? void 0 : _d[props.requiredSystemRole[0]]) == null ? void 0 : _e[props.requiredSystemRole[1]]) || props.requiredManagerPermission && !((_g = (_f = node2 == null ? void 0 : node2.hasTransactionRoles) == null ? void 0 : _f.manager) == null ? void 0 : _g[props.requiredManagerPermission]),
|
|
42465
42462
|
"data-node-all-is-disabled": (_ctx.disableNodeAll || (_ctx.selectDisposableOnly || _ctx.flattenDisposableNode) && _ctx.selectionMode === "single") && node2.key == "0",
|
|
42466
|
-
"data-node-disabled": node2.key && ((
|
|
42467
|
-
"data-node-has-children": !!((
|
|
42463
|
+
"data-node-disabled": node2.key && ((_h = props.disableKeys) == null ? void 0 : _h.includes(+node2.key)),
|
|
42464
|
+
"data-node-has-children": !!((_i = node2.children) == null ? void 0 : _i.length),
|
|
42468
42465
|
"data-node-key": node2.key,
|
|
42469
42466
|
"data-node-selected": isNodeChecked(node2.key),
|
|
42470
42467
|
class: "flex flex-col grow text-body-medium break-all"
|
|
@@ -42563,7 +42560,8 @@ const _sfc_main$1b = /* @__PURE__ */ defineComponent({
|
|
|
42563
42560
|
excludedKeys: {},
|
|
42564
42561
|
hidden: { type: Boolean },
|
|
42565
42562
|
disableSubChildren: { type: Boolean },
|
|
42566
|
-
requiredManagerPermission: {}
|
|
42563
|
+
requiredManagerPermission: {},
|
|
42564
|
+
requiredSystemRole: {}
|
|
42567
42565
|
},
|
|
42568
42566
|
emits: ["update:visible", "select", "hide"],
|
|
42569
42567
|
setup(__props, { emit: __emit }) {
|
|
@@ -42736,11 +42734,12 @@ const _sfc_main$1b = /* @__PURE__ */ defineComponent({
|
|
|
42736
42734
|
"group-params": _ctx.groupParams,
|
|
42737
42735
|
readonly: props.readonly,
|
|
42738
42736
|
"required-manager-permission": props.requiredManagerPermission,
|
|
42737
|
+
"required-system-role": props.requiredSystemRole,
|
|
42739
42738
|
"select-disposable-only": selectDisposableOnly.value,
|
|
42740
42739
|
"selection-mode": _ctx.selectionMode,
|
|
42741
42740
|
type: props.type,
|
|
42742
42741
|
onNodeSelect: _cache[3] || (_cache[3] = ($event) => temporarySelectedNode.value = $event)
|
|
42743
|
-
}, null, 8, ["selected-keys", "selected-tree-nodes", "auto-select-all", "disable-keys", "disable-node-all", "disable-sub-children", "exact-disable-key", "excluded-keys", "filter", "flatten-disposable-node", "group-params", "readonly", "required-manager-permission", "select-disposable-only", "selection-mode", "type"])
|
|
42742
|
+
}, null, 8, ["selected-keys", "selected-tree-nodes", "auto-select-all", "disable-keys", "disable-node-all", "disable-sub-children", "exact-disable-key", "excluded-keys", "filter", "flatten-disposable-node", "group-params", "readonly", "required-manager-permission", "required-system-role", "select-disposable-only", "selection-mode", "type"])
|
|
42744
42743
|
]),
|
|
42745
42744
|
_: 2
|
|
42746
42745
|
}, [
|
|
@@ -42820,7 +42819,8 @@ const _sfc_main$1a = /* @__PURE__ */ defineComponent({
|
|
|
42820
42819
|
singleResetable: { type: Boolean },
|
|
42821
42820
|
fetchTreeOnButtonRender: { type: Boolean, default: false },
|
|
42822
42821
|
disableSubChildren: { type: Boolean },
|
|
42823
|
-
requiredManagerPermission: {}
|
|
42822
|
+
requiredManagerPermission: {},
|
|
42823
|
+
requiredSystemRole: {}
|
|
42824
42824
|
},
|
|
42825
42825
|
emits: ["update:keys", "update:selectedNode", "update:selectedNodes", "dialogShown", "dialogHidden", "reset"],
|
|
42826
42826
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
@@ -43010,13 +43010,14 @@ const _sfc_main$1a = /* @__PURE__ */ defineComponent({
|
|
|
43010
43010
|
keys: treeKeys.value,
|
|
43011
43011
|
readonly: props.readonly,
|
|
43012
43012
|
"required-manager-permission": props.requiredManagerPermission,
|
|
43013
|
+
"required-system-role": props.requiredSystemRole,
|
|
43013
43014
|
"selection-mode": props.selectionMode,
|
|
43014
43015
|
"show-disposable-groups": props.showDisposableGroups,
|
|
43015
43016
|
type: props.type,
|
|
43016
43017
|
"validate-quota": props.validateQuota,
|
|
43017
43018
|
onHide: _cache[1] || (_cache[1] = ($event) => _ctx.$emit("dialogHidden")),
|
|
43018
43019
|
onSelect: setTreeSelection
|
|
43019
|
-
}, null, 8, ["visible", "allow-empty-selection", "auto-select-all", "disable-keys", "disable-node-all", "disable-sub-children", "exact-disable-key", "excluded-keys", "flatten-disposable-node", "group-params", "header", "hidden", "keys", "readonly", "required-manager-permission", "selection-mode", "show-disposable-groups", "type", "validate-quota"]))
|
|
43020
|
+
}, null, 8, ["visible", "allow-empty-selection", "auto-select-all", "disable-keys", "disable-node-all", "disable-sub-children", "exact-disable-key", "excluded-keys", "flatten-disposable-node", "group-params", "header", "hidden", "keys", "readonly", "required-manager-permission", "required-system-role", "selection-mode", "show-disposable-groups", "type", "validate-quota"]))
|
|
43020
43021
|
], 64);
|
|
43021
43022
|
};
|
|
43022
43023
|
}
|