@knime/kds-components 1.1.4 → 1.1.5
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/CHANGELOG.md +8 -0
- package/dist/index.css +147 -26
- package/dist/index.js +1368 -711
- package/dist/index.js.map +1 -1
- package/dist/src/accessories/Icon/KdsDataType.vue.d.ts.map +1 -1
- package/dist/src/accessories/Icon/KdsIcon.vue.d.ts.map +1 -1
- package/dist/src/accessories/Icon/aliases.d.ts +18 -0
- package/dist/src/accessories/Icon/aliases.d.ts.map +1 -0
- package/dist/src/accessories/Icon/useIcon.d.ts +5 -0
- package/dist/src/accessories/Icon/useIcon.d.ts.map +1 -1
- package/dist/src/buttons/ActionButton/ActionButton.vue.d.ts +8 -4
- package/dist/src/buttons/ActionButton/ActionButton.vue.d.ts.map +1 -1
- package/dist/src/containers/FileExplorer/KdsFileExplorer.vue.d.ts.map +1 -1
- package/dist/src/layouts/Tree/BaseTree/BaseTree.vue.d.ts +33 -0
- package/dist/src/layouts/Tree/BaseTree/BaseTree.vue.d.ts.map +1 -0
- package/dist/src/layouts/Tree/BaseTree/TreeNode.vue.d.ts +17 -0
- package/dist/src/layouts/Tree/BaseTree/TreeNode.vue.d.ts.map +1 -0
- package/dist/src/layouts/Tree/BaseTree/context.d.ts +4 -0
- package/dist/src/layouts/Tree/BaseTree/context.d.ts.map +1 -0
- package/dist/src/layouts/Tree/BaseTree/renderNode.d.ts +35 -0
- package/dist/src/layouts/Tree/BaseTree/renderNode.d.ts.map +1 -0
- package/dist/src/layouts/Tree/BaseTree/useTreeData.d.ts +11 -0
- package/dist/src/layouts/Tree/BaseTree/useTreeData.d.ts.map +1 -0
- package/dist/src/layouts/Tree/KdsTree.vue.d.ts +159 -0
- package/dist/src/layouts/Tree/KdsTree.vue.d.ts.map +1 -0
- package/dist/src/layouts/Tree/index.d.ts +3 -0
- package/dist/src/layouts/Tree/index.d.ts.map +1 -0
- package/dist/src/layouts/Tree/types.d.ts +100 -0
- package/dist/src/layouts/Tree/types.d.ts.map +1 -0
- package/dist/src/layouts/index.d.ts +2 -0
- package/dist/src/layouts/index.d.ts.map +1 -1
- package/dist/src/{containers/FileExplorer/useKeyPressedUntilMouseClick/index.d.ts → util/useKeyPressedUntilMouseClick.d.ts} +1 -1
- package/dist/src/util/useKeyPressedUntilMouseClick.d.ts.map +1 -0
- package/package.json +2 -2
- package/dist/src/containers/FileExplorer/useKeyPressedUntilMouseClick/index.d.ts.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"KdsDataType.vue.d.ts","sourceRoot":"","sources":["../../../../src/accessories/Icon/KdsDataType.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"KdsDataType.vue.d.ts","sourceRoot":"","sources":["../../../../src/accessories/Icon/KdsDataType.vue"],"names":[],"mappings":"AAuIA,OAAO,KAAK,EACV,gBAAgB,EAIjB,MAAM,SAAS,CAAC;;;;AAwHjB,wBAQG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"KdsIcon.vue.d.ts","sourceRoot":"","sources":["../../../../src/accessories/Icon/KdsIcon.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"KdsIcon.vue.d.ts","sourceRoot":"","sources":["../../../../src/accessories/Icon/KdsIcon.vue"],"names":[],"mappings":"AAmEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;;;;AAyF5C,wBAOG"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { KdsIconName } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Semantic alias mapping for icons. Each icon name maps to a list of additional
|
|
4
|
+
* search terms / concepts so an icon can be found by intent rather than by its
|
|
5
|
+
* exact file name.
|
|
6
|
+
*
|
|
7
|
+
* This map is the single source of truth for icon aliases. It powers:
|
|
8
|
+
* - the icon search in the Icon Catalog on the KdsIcon Storybook docs page, and
|
|
9
|
+
* - the AI skill reference (`KdsIcon.md`), which lists every available icon
|
|
10
|
+
* together with these aliases (see `scripts/build-skill-references.js`).
|
|
11
|
+
*
|
|
12
|
+
* MAINTENANCE: The `Record<KdsIconName, …>` type makes this map exhaustive —
|
|
13
|
+
* adding a new icon SVG to `packages/styles/src/img/icons/` (which extends
|
|
14
|
+
* `KdsIconName`) will surface a type error here until an entry is added. Keep
|
|
15
|
+
* the aliases focused on real synonyms / concepts a consumer might search for.
|
|
16
|
+
*/
|
|
17
|
+
export declare const iconAliases: Record<KdsIconName, readonly string[]>;
|
|
18
|
+
//# sourceMappingURL=aliases.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"aliases.d.ts","sourceRoot":"","sources":["../../../../src/accessories/Icon/aliases.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE3C;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,WAAW,EAAE,MAAM,CAAC,WAAW,EAAE,SAAS,MAAM,EAAE,CAoR9D,CAAC"}
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import { DefineComponent, Ref, ShallowRef } from 'vue';
|
|
2
2
|
import { KdsIconStatus } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* Test-only helper to reset the module-scoped icon caches between tests.
|
|
5
|
+
* Not part of the public API.
|
|
6
|
+
*/
|
|
7
|
+
export declare function __resetIconCacheForTesting(): void;
|
|
3
8
|
declare function useIcon({ name, folder, }: {
|
|
4
9
|
name: Ref<string>;
|
|
5
10
|
folder: "icons" | "type-icons";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useIcon.d.ts","sourceRoot":"","sources":["../../../../src/accessories/Icon/useIcon.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,eAAe,EACpB,KAAK,GAAG,EACR,KAAK,UAAU,EAKhB,MAAM,KAAK,CAAC;AAEb,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"useIcon.d.ts","sourceRoot":"","sources":["../../../../src/accessories/Icon/useIcon.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,eAAe,EACpB,KAAK,GAAG,EACR,KAAK,UAAU,EAKhB,MAAM,KAAK,CAAC;AAEb,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAM7C;;;GAGG;AACH,wBAAgB,0BAA0B,SAGzC;AAED,iBAAS,OAAO,CAAC,EACf,IAAI,EACJ,MAAM,GACP,EAAE;IACD,IAAI,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAClB,MAAM,EAAE,OAAO,GAAG,YAAY,CAAC;CAChC,GAAG;IACF,aAAa,EAAE,QAAQ,CAAC,UAAU,CAAC,eAAe,GAAG,IAAI,CAAC,CAAC,CAAC;IAC5D,MAAM,EAAE,QAAQ,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC,CAAC;CAC7C,CAoFA;AAED,eAAe,OAAO,CAAC"}
|
|
@@ -6,14 +6,16 @@ declare const _default: import('vue').DefineComponent<({
|
|
|
6
6
|
};
|
|
7
7
|
onClick: (event: MouseEvent) => void;
|
|
8
8
|
} & {
|
|
9
|
-
size
|
|
9
|
+
size?: KdsButtonSize;
|
|
10
|
+
onClick?: (event: MouseEvent) => void;
|
|
10
11
|
}) | ({
|
|
11
12
|
type: "linkButton";
|
|
12
13
|
props: import('../index.ts').KdsLinkButtonProps & {
|
|
13
14
|
size?: never;
|
|
14
15
|
};
|
|
15
16
|
} & {
|
|
16
|
-
size
|
|
17
|
+
size?: KdsButtonSize;
|
|
18
|
+
onClick?: (event: MouseEvent) => void;
|
|
17
19
|
}), {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<({
|
|
18
20
|
type: "button";
|
|
19
21
|
props: import('../index.ts').KdsButtonProps & {
|
|
@@ -21,14 +23,16 @@ declare const _default: import('vue').DefineComponent<({
|
|
|
21
23
|
};
|
|
22
24
|
onClick: (event: MouseEvent) => void;
|
|
23
25
|
} & {
|
|
24
|
-
size
|
|
26
|
+
size?: KdsButtonSize;
|
|
27
|
+
onClick?: (event: MouseEvent) => void;
|
|
25
28
|
}) | ({
|
|
26
29
|
type: "linkButton";
|
|
27
30
|
props: import('../index.ts').KdsLinkButtonProps & {
|
|
28
31
|
size?: never;
|
|
29
32
|
};
|
|
30
33
|
} & {
|
|
31
|
-
size
|
|
34
|
+
size?: KdsButtonSize;
|
|
35
|
+
onClick?: (event: MouseEvent) => void;
|
|
32
36
|
})> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
33
37
|
export default _default;
|
|
34
38
|
//# sourceMappingURL=ActionButton.vue.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActionButton.vue.d.ts","sourceRoot":"","sources":["../../../../src/buttons/ActionButton/ActionButton.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ActionButton.vue.d.ts","sourceRoot":"","sources":["../../../../src/buttons/ActionButton/ActionButton.vue"],"names":[],"mappings":"AAiCA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;;;;YAFjD,CAjBM;;;;WAyBK,aAAa;cACV,CAAC,KAAK,EAAE,UAAU,KAAK,IAAI;;;;YATzC,CAVsC;;;WAkB3B,aAAa;cACV,CAAC,KAAK,EAAE,UAAU,KAAK,IAAI;;;;YATzC,CAjBM;;;;WAyBK,aAAa;cACV,CAAC,KAAK,EAAE,UAAU,KAAK,IAAI;;;;YATzC,CAVsC;;;WAkB3B,aAAa;cACV,CAAC,KAAK,EAAE,UAAU,KAAK,IAAI;;AA6EzC,wBAMG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"KdsFileExplorer.vue.d.ts","sourceRoot":"","sources":["../../../../src/containers/FileExplorer/KdsFileExplorer.vue"],"names":[],"mappings":"AAqtBA,OAAO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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gDAH1B,GAAA,8CAA8C,GAAG,yBAC/C,GAAE,6DAEmB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+BA3S5B,CArnBY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oCA65BV,GAAA,8CAA8C,GAAG,yBAC/C,GAAE,6DAEmB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oCAH1B,GAAA,8CAA8C,GAAG,yBAC/C,GAAE,6DAEmB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAguB1B,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAapG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { BaseTreeNode, EventParams, FocusEventParams, KeydownEvent, LoadDataFunc, NodeKey, RenderNodeFunc, SelectEventParams, TreeNodeOptions } from '../types';
|
|
2
|
+
type Props = {
|
|
3
|
+
source?: TreeNodeOptions[];
|
|
4
|
+
defaultSelectedKey?: string | number;
|
|
5
|
+
defaultExpandedKeys?: NodeKey[];
|
|
6
|
+
selectable?: boolean;
|
|
7
|
+
virtual?: boolean;
|
|
8
|
+
idPrefix?: string;
|
|
9
|
+
loadData?: LoadDataFunc;
|
|
10
|
+
renderNode?: RenderNodeFunc;
|
|
11
|
+
};
|
|
12
|
+
declare const _default: import('vue').DefineComponent<Props, {
|
|
13
|
+
renderNode: RenderNodeFunc | undefined;
|
|
14
|
+
slots: {};
|
|
15
|
+
expandedKeys: Set<NodeKey> & Omit<Set<NodeKey>, keyof Set<any>>;
|
|
16
|
+
getExpandedKeys: () => NodeKey[];
|
|
17
|
+
getSelectedNode: () => BaseTreeNode;
|
|
18
|
+
toggleExpand: (nodeKey: NodeKey, state?: boolean) => void;
|
|
19
|
+
loadChildren: (nodeKey: NodeKey) => void;
|
|
20
|
+
clearChildren: (nodeKey: NodeKey) => void;
|
|
21
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
22
|
+
keydown: (value: KeydownEvent) => any;
|
|
23
|
+
selectChange: (value: SelectEventParams) => any;
|
|
24
|
+
expandChange: (value: EventParams) => any;
|
|
25
|
+
focusChange: (value: FocusEventParams) => any;
|
|
26
|
+
}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
|
|
27
|
+
onKeydown?: ((value: KeydownEvent) => any) | undefined;
|
|
28
|
+
onSelectChange?: ((value: SelectEventParams) => any) | undefined;
|
|
29
|
+
onExpandChange?: ((value: EventParams) => any) | undefined;
|
|
30
|
+
onFocusChange?: ((value: FocusEventParams) => any) | undefined;
|
|
31
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
32
|
+
export default _default;
|
|
33
|
+
//# sourceMappingURL=BaseTree.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BaseTree.vue.d.ts","sourceRoot":"","sources":["../../../../../src/layouts/Tree/BaseTree/BaseTree.vue"],"names":[],"mappings":"AACA;AA4XA,OAAO,KAAK,EACV,YAAY,EACZ,WAAW,EACX,gBAAgB,EAEhB,YAAY,EACZ,YAAY,EACZ,OAAO,EACP,cAAc,EACd,iBAAiB,EACjB,eAAe,EAChB,MAAM,UAAU,CAAC;AAclB,KAAK,KAAK,GAAG;IACX,MAAM,CAAC,EAAE,eAAe,EAAE,CAAC;IAC3B,kBAAkB,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACrC,mBAAmB,CAAC,EAAE,OAAO,EAAE,CAAC;IAChC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB,QAAQ,CAAC,EAAE,YAAY,CAAC;IACxB,UAAU,CAAC,EAAE,cAAc,CAAC;CAC7B,CAAC;;;;;;;4BAsRwB,OAAO,UAAU,OAAO;4BAMxB,OAAO;6BACN,OAAO;;;;;;;;;;;;AAkJlC,wBASG"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { BaseTreeNode, EventParams, NodeKey } from '../types';
|
|
2
|
+
type Props = {
|
|
3
|
+
node: BaseTreeNode;
|
|
4
|
+
selectedKeys: Set<NodeKey>;
|
|
5
|
+
expandedKeys: Set<NodeKey>;
|
|
6
|
+
focusKey?: NodeKey;
|
|
7
|
+
idPrefix?: string;
|
|
8
|
+
};
|
|
9
|
+
declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
10
|
+
toggleExpand: (value: EventParams) => any;
|
|
11
|
+
selectChange: (value: BaseTreeNode) => any;
|
|
12
|
+
}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
|
|
13
|
+
onToggleExpand?: ((value: EventParams) => any) | undefined;
|
|
14
|
+
onSelectChange?: ((value: BaseTreeNode) => any) | undefined;
|
|
15
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
16
|
+
export default _default;
|
|
17
|
+
//# sourceMappingURL=TreeNode.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TreeNode.vue.d.ts","sourceRoot":"","sources":["../../../../../src/layouts/Tree/BaseTree/TreeNode.vue"],"names":[],"mappings":"AACA;AAqIA,OAAO,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAKnE,KAAK,KAAK,GAAG;IACX,IAAI,EAAE,YAAY,CAAC;IACnB,YAAY,EAAE,GAAG,CAAC,OAAO,CAAC,CAAC;IAC3B,YAAY,EAAE,GAAG,CAAC,OAAO,CAAC,CAAC;IAC3B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;;;;;;;;AA6LF,wBAQG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../../../src/layouts/Tree/BaseTree/context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,KAAK,CAAC;AAExC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAE5C,eAAO,MAAM,gBAAgB,EAAE,YAAY,CAAC,WAAW,CAC3B,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
|
+
import { BaseTreeNode, TreeContext } from '../types';
|
|
3
|
+
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
4
|
+
titleClasses: {
|
|
5
|
+
type: StringConstructor;
|
|
6
|
+
default: string;
|
|
7
|
+
};
|
|
8
|
+
node: {
|
|
9
|
+
type: PropType<BaseTreeNode>;
|
|
10
|
+
required: true;
|
|
11
|
+
};
|
|
12
|
+
context: {
|
|
13
|
+
type: PropType<TreeContext>;
|
|
14
|
+
required: true;
|
|
15
|
+
};
|
|
16
|
+
}>, () => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
|
17
|
+
[key: string]: any;
|
|
18
|
+
}>, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
19
|
+
titleClasses: {
|
|
20
|
+
type: StringConstructor;
|
|
21
|
+
default: string;
|
|
22
|
+
};
|
|
23
|
+
node: {
|
|
24
|
+
type: PropType<BaseTreeNode>;
|
|
25
|
+
required: true;
|
|
26
|
+
};
|
|
27
|
+
context: {
|
|
28
|
+
type: PropType<TreeContext>;
|
|
29
|
+
required: true;
|
|
30
|
+
};
|
|
31
|
+
}>> & Readonly<{}>, {
|
|
32
|
+
titleClasses: string;
|
|
33
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
34
|
+
export default _default;
|
|
35
|
+
//# sourceMappingURL=renderNode.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"renderNode.d.ts","sourceRoot":"","sources":["../../../../../src/layouts/Tree/BaseTree/renderNode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,QAAQ,EAA0C,MAAM,KAAK,CAAC;AAE5E,OAAO,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;;;;;;;cAUpC,QAAQ,CAAC,YAAY,CAAC;;;;cAItB,QAAQ,CAAC,WAAW,CAAC;;;;;;;;;;;cAJrB,QAAQ,CAAC,YAAY,CAAC;;;;cAItB,QAAQ,CAAC,WAAW,CAAC;;;;;;AAZ3C,wBA4BG"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { BaseTreeNode, KeyNodeMap, TreeNodeOptions } from '../types';
|
|
2
|
+
declare function coerceTreeNodes(source: TreeNodeOptions[], parent?: BaseTreeNode): BaseTreeNode[];
|
|
3
|
+
declare function getFlattenTreeData(tree: BaseTreeNode[]): BaseTreeNode[];
|
|
4
|
+
declare function getKey2TreeNode(flattenTreeData: BaseTreeNode[]): KeyNodeMap;
|
|
5
|
+
declare function useTreeData(source: TreeNodeOptions[]): {
|
|
6
|
+
treeData: BaseTreeNode[];
|
|
7
|
+
flattenTreeData: BaseTreeNode[];
|
|
8
|
+
key2TreeNode: KeyNodeMap;
|
|
9
|
+
};
|
|
10
|
+
export { useTreeData, coerceTreeNodes, getFlattenTreeData, getKey2TreeNode };
|
|
11
|
+
//# sourceMappingURL=useTreeData.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useTreeData.d.ts","sourceRoot":"","sources":["../../../../../src/layouts/Tree/BaseTree/useTreeData.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,KAAK,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,UAAU,CAAC;AAE/E,iBAAS,eAAe,CACtB,MAAM,EAAE,eAAe,EAAE,EACzB,MAAM,CAAC,EAAE,YAAY,GACpB,YAAY,EAAE,CAkBhB;AAED,iBAAS,kBAAkB,CAAC,IAAI,EAAE,YAAY,EAAE,GAAG,YAAY,EAAE,CAUhE;AAED,iBAAS,eAAe,CAAC,eAAe,EAAE,YAAY,EAAE,cAMvD;AAED,iBAAS,WAAW,CAAC,MAAM,EAAE,eAAe,EAAE;;;;EAK7C;AAED,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,kBAAkB,EAAE,eAAe,EAAE,CAAC"}
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
import { BaseTreeNode, KdsTreeProps, KeydownEvent, NodeKey, SelectEventParams } from './types';
|
|
2
|
+
declare function __VLS_template(): {
|
|
3
|
+
attrs: Partial<{}>;
|
|
4
|
+
slots: Partial<Record<string, (_: {
|
|
5
|
+
treeNode: BaseTreeNode;
|
|
6
|
+
}) => any>> & Partial<Record<string, (_: {
|
|
7
|
+
treeNode: BaseTreeNode;
|
|
8
|
+
}) => any>>;
|
|
9
|
+
refs: {
|
|
10
|
+
baseTree: import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{
|
|
11
|
+
source?: import('./types').TreeNodeOptions[];
|
|
12
|
+
defaultSelectedKey?: string | number;
|
|
13
|
+
defaultExpandedKeys?: NodeKey[];
|
|
14
|
+
selectable?: boolean;
|
|
15
|
+
virtual?: boolean;
|
|
16
|
+
idPrefix?: string;
|
|
17
|
+
loadData?: import('./types').LoadDataFunc;
|
|
18
|
+
renderNode?: import('./types').RenderNodeFunc;
|
|
19
|
+
}> & Readonly<{
|
|
20
|
+
onKeydown?: ((value: KeydownEvent) => any) | undefined;
|
|
21
|
+
onSelectChange?: ((value: SelectEventParams) => any) | undefined;
|
|
22
|
+
onExpandChange?: ((value: import('./types').EventParams) => any) | undefined;
|
|
23
|
+
onFocusChange?: ((value: import('./types').FocusEventParams) => any) | undefined;
|
|
24
|
+
}>, {
|
|
25
|
+
renderNode: import('./types').RenderNodeFunc | undefined;
|
|
26
|
+
slots: {};
|
|
27
|
+
expandedKeys: Set<NodeKey> & Omit<Set<NodeKey>, keyof Set<any>>;
|
|
28
|
+
getExpandedKeys: () => NodeKey[];
|
|
29
|
+
getSelectedNode: () => BaseTreeNode;
|
|
30
|
+
toggleExpand: (nodeKey: NodeKey, state?: boolean) => void;
|
|
31
|
+
loadChildren: (nodeKey: NodeKey) => void;
|
|
32
|
+
clearChildren: (nodeKey: NodeKey) => void;
|
|
33
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
34
|
+
keydown: (value: KeydownEvent) => any;
|
|
35
|
+
selectChange: (value: SelectEventParams) => any;
|
|
36
|
+
expandChange: (value: import('./types').EventParams) => any;
|
|
37
|
+
focusChange: (value: import('./types').FocusEventParams) => any;
|
|
38
|
+
}, import('vue').PublicProps, {}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, HTMLDivElement, import('vue').ComponentProvideOptions, {
|
|
39
|
+
P: {};
|
|
40
|
+
B: {};
|
|
41
|
+
D: {};
|
|
42
|
+
C: {};
|
|
43
|
+
M: {};
|
|
44
|
+
Defaults: {};
|
|
45
|
+
}, Readonly<{
|
|
46
|
+
source?: import('./types').TreeNodeOptions[];
|
|
47
|
+
defaultSelectedKey?: string | number;
|
|
48
|
+
defaultExpandedKeys?: NodeKey[];
|
|
49
|
+
selectable?: boolean;
|
|
50
|
+
virtual?: boolean;
|
|
51
|
+
idPrefix?: string;
|
|
52
|
+
loadData?: import('./types').LoadDataFunc;
|
|
53
|
+
renderNode?: import('./types').RenderNodeFunc;
|
|
54
|
+
}> & Readonly<{
|
|
55
|
+
onKeydown?: ((value: KeydownEvent) => any) | undefined;
|
|
56
|
+
onSelectChange?: ((value: SelectEventParams) => any) | undefined;
|
|
57
|
+
onExpandChange?: ((value: import('./types').EventParams) => any) | undefined;
|
|
58
|
+
onFocusChange?: ((value: import('./types').FocusEventParams) => any) | undefined;
|
|
59
|
+
}>, {
|
|
60
|
+
renderNode: import('./types').RenderNodeFunc | undefined;
|
|
61
|
+
slots: {};
|
|
62
|
+
expandedKeys: Set<NodeKey> & Omit<Set<NodeKey>, keyof Set<any>>;
|
|
63
|
+
getExpandedKeys: () => NodeKey[];
|
|
64
|
+
getSelectedNode: () => BaseTreeNode;
|
|
65
|
+
toggleExpand: (nodeKey: NodeKey, state?: boolean) => void;
|
|
66
|
+
loadChildren: (nodeKey: NodeKey) => void;
|
|
67
|
+
clearChildren: (nodeKey: NodeKey) => void;
|
|
68
|
+
}, {}, {}, {}, {}> | null;
|
|
69
|
+
};
|
|
70
|
+
rootEl: HTMLDivElement;
|
|
71
|
+
};
|
|
72
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
73
|
+
declare const __VLS_component: import('vue').DefineComponent<KdsTreeProps, {
|
|
74
|
+
getExpandedKeys: () => NodeKey[] | undefined;
|
|
75
|
+
toggleExpand: (nodeKey: NodeKey, state
|
|
76
|
+
/**
|
|
77
|
+
* Thin wrapper around the tree library with added KNIME styles and UX.
|
|
78
|
+
*/
|
|
79
|
+
?: boolean) => void;
|
|
80
|
+
getSelectedTreeNode: () => BaseTreeNode | undefined;
|
|
81
|
+
loadChildren: (nodeKey: NodeKey) => void;
|
|
82
|
+
clearChildren: (nodeKey: NodeKey) => void;
|
|
83
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
84
|
+
keydown: (value: KeydownEvent) => any;
|
|
85
|
+
selectChange: (value: SelectEventParams) => any;
|
|
86
|
+
expandChange: (value: import('./types').EventParams) => any;
|
|
87
|
+
}, string, import('vue').PublicProps, Readonly<KdsTreeProps> & Readonly<{
|
|
88
|
+
onKeydown?: ((value: KeydownEvent) => any) | undefined;
|
|
89
|
+
onSelectChange?: ((value: SelectEventParams) => any) | undefined;
|
|
90
|
+
onExpandChange?: ((value: import('./types').EventParams) => any) | undefined;
|
|
91
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
92
|
+
baseTree: import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{
|
|
93
|
+
source?: import('./types').TreeNodeOptions[];
|
|
94
|
+
defaultSelectedKey?: string | number;
|
|
95
|
+
defaultExpandedKeys?: NodeKey[];
|
|
96
|
+
selectable?: boolean;
|
|
97
|
+
virtual?: boolean;
|
|
98
|
+
idPrefix?: string;
|
|
99
|
+
loadData?: import('./types').LoadDataFunc;
|
|
100
|
+
renderNode?: import('./types').RenderNodeFunc;
|
|
101
|
+
}> & Readonly<{
|
|
102
|
+
onKeydown?: ((value: KeydownEvent) => any) | undefined;
|
|
103
|
+
onSelectChange?: ((value: SelectEventParams) => any) | undefined;
|
|
104
|
+
onExpandChange?: ((value: import('./types').EventParams) => any) | undefined;
|
|
105
|
+
onFocusChange?: ((value: import('./types').FocusEventParams) => any) | undefined;
|
|
106
|
+
}>, {
|
|
107
|
+
renderNode: import('./types').RenderNodeFunc | undefined;
|
|
108
|
+
slots: {};
|
|
109
|
+
expandedKeys: Set<NodeKey> & Omit<Set<NodeKey>, keyof Set<any>>;
|
|
110
|
+
getExpandedKeys: () => NodeKey[];
|
|
111
|
+
getSelectedNode: () => BaseTreeNode;
|
|
112
|
+
toggleExpand: (nodeKey: NodeKey, state?: boolean) => void;
|
|
113
|
+
loadChildren: (nodeKey: NodeKey) => void;
|
|
114
|
+
clearChildren: (nodeKey: NodeKey) => void;
|
|
115
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
116
|
+
keydown: (value: KeydownEvent) => any;
|
|
117
|
+
selectChange: (value: SelectEventParams) => any;
|
|
118
|
+
expandChange: (value: import('./types').EventParams) => any;
|
|
119
|
+
focusChange: (value: import('./types').FocusEventParams) => any;
|
|
120
|
+
}, import('vue').PublicProps, {}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, HTMLDivElement, import('vue').ComponentProvideOptions, {
|
|
121
|
+
P: {};
|
|
122
|
+
B: {};
|
|
123
|
+
D: {};
|
|
124
|
+
C: {};
|
|
125
|
+
M: {};
|
|
126
|
+
Defaults: {};
|
|
127
|
+
}, Readonly<{
|
|
128
|
+
source?: import('./types').TreeNodeOptions[];
|
|
129
|
+
defaultSelectedKey?: string | number;
|
|
130
|
+
defaultExpandedKeys?: NodeKey[];
|
|
131
|
+
selectable?: boolean;
|
|
132
|
+
virtual?: boolean;
|
|
133
|
+
idPrefix?: string;
|
|
134
|
+
loadData?: import('./types').LoadDataFunc;
|
|
135
|
+
renderNode?: import('./types').RenderNodeFunc;
|
|
136
|
+
}> & Readonly<{
|
|
137
|
+
onKeydown?: ((value: KeydownEvent) => any) | undefined;
|
|
138
|
+
onSelectChange?: ((value: SelectEventParams) => any) | undefined;
|
|
139
|
+
onExpandChange?: ((value: import('./types').EventParams) => any) | undefined;
|
|
140
|
+
onFocusChange?: ((value: import('./types').FocusEventParams) => any) | undefined;
|
|
141
|
+
}>, {
|
|
142
|
+
renderNode: import('./types').RenderNodeFunc | undefined;
|
|
143
|
+
slots: {};
|
|
144
|
+
expandedKeys: Set<NodeKey> & Omit<Set<NodeKey>, keyof Set<any>>;
|
|
145
|
+
getExpandedKeys: () => NodeKey[];
|
|
146
|
+
getSelectedNode: () => BaseTreeNode;
|
|
147
|
+
toggleExpand: (nodeKey: NodeKey, state?: boolean) => void;
|
|
148
|
+
loadChildren: (nodeKey: NodeKey) => void;
|
|
149
|
+
clearChildren: (nodeKey: NodeKey) => void;
|
|
150
|
+
}, {}, {}, {}, {}> | null;
|
|
151
|
+
}, HTMLDivElement>;
|
|
152
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
153
|
+
export default _default;
|
|
154
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
155
|
+
new (): {
|
|
156
|
+
$slots: S;
|
|
157
|
+
};
|
|
158
|
+
};
|
|
159
|
+
//# sourceMappingURL=KdsTree.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"KdsTree.vue.d.ts","sourceRoot":"","sources":["../../../../src/layouts/Tree/KdsTree.vue"],"names":[],"mappings":"AAkUA,OAAO,KAAK,EACV,YAAY,EAGZ,YAAY,EACZ,YAAY,EACZ,OAAO,EACP,iBAAiB,EAClB,MAAM,SAAS,CAAC;AAkGjB,iBAAS,cAAc;WAkJT,OAAO,IAA6B;;;UAbqC,GAAG;;UACrB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiBvE;AAuBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;IApSrB;;OAEG;IACH,CAzKI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAodF,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAQpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/layouts/Tree/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,eAAe,CAAC;AAEnD,mBAAmB,SAAS,CAAC"}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { Slots, VNode } from 'vue';
|
|
2
|
+
import { KdsDataTypeAccessory, KdsIconAccessory } from '../../containers/ListItem/ListItemAccessory/types';
|
|
3
|
+
type TypeWithUndefined<T> = T | undefined;
|
|
4
|
+
type TypeWithNull<T> = T | null;
|
|
5
|
+
type KdsTreeAccessory = KdsIconAccessory | KdsDataTypeAccessory;
|
|
6
|
+
declare class BaseTreeNode {
|
|
7
|
+
readonly key: NodeKey;
|
|
8
|
+
readonly name: string;
|
|
9
|
+
readonly level: number;
|
|
10
|
+
readonly accessory?: KdsTreeAccessory;
|
|
11
|
+
readonly customSlot?: string;
|
|
12
|
+
readonly disabled: boolean;
|
|
13
|
+
loading: boolean;
|
|
14
|
+
hasChildren: boolean;
|
|
15
|
+
children: BaseTreeNode[];
|
|
16
|
+
parentKey: TypeWithUndefined<NodeKey>;
|
|
17
|
+
parentKeys: NodeKey[];
|
|
18
|
+
origin: TreeNodeOptions;
|
|
19
|
+
constructor(options: TreeNodeOptions, parent?: BaseTreeNode);
|
|
20
|
+
}
|
|
21
|
+
type NodeKey = string | number;
|
|
22
|
+
/** source tree data, requires name and key */
|
|
23
|
+
type TreeNodeOptions = {
|
|
24
|
+
nodeKey: NodeKey;
|
|
25
|
+
name: string;
|
|
26
|
+
hasChildren?: boolean;
|
|
27
|
+
customSlot?: string;
|
|
28
|
+
accessory?: KdsTreeAccessory;
|
|
29
|
+
disabled?: boolean;
|
|
30
|
+
children?: TreeNodeOptions[];
|
|
31
|
+
[key: string]: unknown;
|
|
32
|
+
};
|
|
33
|
+
type TreeNodeInstance = {
|
|
34
|
+
rawNode: TreeNodeOptions;
|
|
35
|
+
};
|
|
36
|
+
type KeyNodeMap = Record<NodeKey, BaseTreeNode>;
|
|
37
|
+
type EventParams = {
|
|
38
|
+
state: boolean;
|
|
39
|
+
node: BaseTreeNode;
|
|
40
|
+
source?: "api" | "click" | "key";
|
|
41
|
+
};
|
|
42
|
+
type SelectEventParams = {
|
|
43
|
+
preSelectedNode: TypeWithUndefined<BaseTreeNode>;
|
|
44
|
+
node: TypeWithUndefined<BaseTreeNode>;
|
|
45
|
+
};
|
|
46
|
+
type FocusEventParams = {
|
|
47
|
+
node: TypeWithNull<BaseTreeNode>;
|
|
48
|
+
};
|
|
49
|
+
type KeydownEvent = {
|
|
50
|
+
event: KeyboardEvent;
|
|
51
|
+
node: BaseTreeNode;
|
|
52
|
+
};
|
|
53
|
+
type RenderNodeFunc = (node: BaseTreeNode) => VNode;
|
|
54
|
+
type LoadDataFunc = (node: BaseTreeNode, callback: (children: TreeNodeOptions[]) => void) => void;
|
|
55
|
+
type TreeContext = Readonly<{
|
|
56
|
+
renderNode: TypeWithUndefined<RenderNodeFunc>;
|
|
57
|
+
slots: Slots;
|
|
58
|
+
expandedKeys: Set<NodeKey>;
|
|
59
|
+
getSelectedNode: () => TypeWithUndefined<BaseTreeNode>;
|
|
60
|
+
getExpandedKeys: () => NodeKey[];
|
|
61
|
+
toggleExpand: (nodeKey: NodeKey, state?: boolean) => void;
|
|
62
|
+
loadChildren: (nodeKey: NodeKey) => void;
|
|
63
|
+
clearChildren: (nodeKey: NodeKey) => void;
|
|
64
|
+
}>;
|
|
65
|
+
type KdsTreeProps = {
|
|
66
|
+
/** Hierarchical tree data. Each node requires a `nodeKey` and `name`; children may be nested directly or loaded lazily via `loadData`. */
|
|
67
|
+
source: TreeNodeOptions[];
|
|
68
|
+
/** Async loader invoked when an expandable node has `hasChildren: true` but no `children` yet. While pending the chevron is replaced by a loading spinner. */
|
|
69
|
+
loadData?: LoadDataFunc;
|
|
70
|
+
/** When `false`, clicks and keyboard navigation still focus nodes but no selection state is tracked and `selectChange` is not emitted. Defaults to `true`. */
|
|
71
|
+
selectable?: boolean;
|
|
72
|
+
/** Keys of branches that should be expanded on mount. Subsequent expand/collapse is managed internally. Defaults to `[]`. */
|
|
73
|
+
expandedKeys?: string[];
|
|
74
|
+
/** Prefix used to build the DOM id of each rendered node (`${idPrefix}_${nodeKey}`). Set this to keep ids unique when multiple trees are on the same page. Defaults to `"tree"`. */
|
|
75
|
+
idPrefix?: string;
|
|
76
|
+
/** When `true`, only the visible rows are rendered. The tree must be wrapped in a fixed-height, scrollable container. Defaults to `false`. */
|
|
77
|
+
virtual?: boolean;
|
|
78
|
+
};
|
|
79
|
+
type KdsTreeEmits = {
|
|
80
|
+
/** Emitted on every keydown over a focused tree node, after the tree's own keyboard handling has run. */
|
|
81
|
+
keydown: [value: KeydownEvent];
|
|
82
|
+
/** Emitted when the selected node changes. Not emitted when `selectable` is `false`. */
|
|
83
|
+
selectChange: [value: SelectEventParams];
|
|
84
|
+
/** Emitted when a node is expanded or collapsed. `source` indicates whether the change came from `"click"`, `"key"`, or `"api"`. */
|
|
85
|
+
expandChange: [value: EventParams];
|
|
86
|
+
};
|
|
87
|
+
type KdsTreeExpose = {
|
|
88
|
+
/** Returns the keys of all currently expanded nodes. */
|
|
89
|
+
getExpandedKeys: () => NodeKey[] | undefined;
|
|
90
|
+
/** Expand or collapse a node. When `state` is omitted, the current state is toggled. */
|
|
91
|
+
toggleExpand: (nodeKey: NodeKey, state?: boolean) => void;
|
|
92
|
+
/** Returns the currently selected node, or `undefined` if nothing is selected or the tree is not `selectable`. */
|
|
93
|
+
getSelectedTreeNode: () => BaseTreeNode | undefined;
|
|
94
|
+
/** Trigger the `loadData` prop to load the children of the given nodeKey. Does not remove current children. */
|
|
95
|
+
loadChildren: (nodeKey: NodeKey) => void;
|
|
96
|
+
/** Remove all children of a given nodeKey. */
|
|
97
|
+
clearChildren: (nodeKey: NodeKey) => void;
|
|
98
|
+
};
|
|
99
|
+
export { BaseTreeNode, type TreeNodeOptions, type NodeKey, type TreeNodeInstance, type KeyNodeMap, type EventParams, type FocusEventParams, type SelectEventParams, type RenderNodeFunc, type LoadDataFunc, type KeydownEvent, type TreeContext, type KdsTreeProps, type KdsTreeEmits, type KdsTreeExpose, type KdsTreeAccessory, };
|
|
100
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/layouts/Tree/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,KAAK,EAAE,KAAK,KAAK,EAAS,MAAM,KAAK,CAAC;AAEpD,OAAO,KAAK,EACV,oBAAoB,EACpB,gBAAgB,EACjB,MAAM,mDAAmD,CAAC;AAE3D,KAAK,iBAAiB,CAAC,CAAC,IAAI,CAAC,GAAG,SAAS,CAAC;AAC1C,KAAK,YAAY,CAAC,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;AAEhC,KAAK,gBAAgB,GAAG,gBAAgB,GAAG,oBAAoB,CAAC;AAEhE,cAAM,YAAY;IAChB,QAAQ,CAAC,GAAG,EAAE,OAAO,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,SAAS,CAAC,EAAE,gBAAgB,CAAC;IACtC,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAC3B,OAAO,UAAS;IAChB,WAAW,UAAS;IAEpB,QAAQ,EAAE,YAAY,EAA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,mBAAmB,cAAc,CAAC;AAElC,cAAc,cAAc,CAAC;AAC7B,mBAAmB,cAAc,CAAC;AAElC,cAAc,iBAAiB,CAAC;AAChC,mBAAmB,iBAAiB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/layouts/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,mBAAmB,cAAc,CAAC;AAElC,cAAc,aAAa,CAAC;AAC5B,mBAAmB,aAAa,CAAC;AAEjC,cAAc,QAAQ,CAAC;AACvB,mBAAmB,QAAQ,CAAC;AAE5B,cAAc,SAAS,CAAC;AACxB,mBAAmB,SAAS,CAAC;AAE7B,cAAc,UAAU,CAAC;AACzB,mBAAmB,UAAU,CAAC;AAE9B,cAAc,mBAAmB,CAAC;AAClC,mBAAmB,mBAAmB,CAAC;AAEvC,cAAc,cAAc,CAAC;AAC7B,mBAAmB,cAAc,CAAC;AAElC,cAAc,cAAc,CAAC;AAC7B,mBAAmB,cAAc,CAAC;AAElC,cAAc,iBAAiB,CAAC;AAChC,mBAAmB,iBAAiB,CAAC;AAErC,cAAc,QAAQ,CAAC;AACvB,mBAAmB,QAAQ,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export declare const useKeyPressedUntilMouseClick: (keys?: Array<string>) => import('vue').Ref<boolean, boolean>;
|
|
2
|
-
//# sourceMappingURL=
|
|
2
|
+
//# sourceMappingURL=useKeyPressedUntilMouseClick.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useKeyPressedUntilMouseClick.d.ts","sourceRoot":"","sources":["../../../src/util/useKeyPressedUntilMouseClick.ts"],"names":[],"mappings":"AAoBA,eAAO,MAAM,4BAA4B,GACvC,OAAM,KAAK,CAAC,MAAM,CAAe,wCAgClC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@knime/kds-components",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.5",
|
|
4
4
|
"description": "Package containing basic Vue components of the KNIME Design System",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"motion": "^12.40.0",
|
|
41
41
|
"pretty-bytes": "^7.1.0",
|
|
42
42
|
"temporal-polyfill": "^0.3.2",
|
|
43
|
-
"@knime/kds-styles": "^1.1.
|
|
43
|
+
"@knime/kds-styles": "^1.1.5"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@storybook/vue3-vite": "^10.4.6",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/containers/FileExplorer/useKeyPressedUntilMouseClick/index.ts"],"names":[],"mappings":"AAoBA,eAAO,MAAM,4BAA4B,GACvC,OAAM,KAAK,CAAC,MAAM,CAAe,wCAgClC,CAAC"}
|