@neovici/cosmoz-treenode-navigator 5.5.0 → 5.7.0
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/cosmoz-treenode-navigator.js +60 -57
- package/package.json +6 -1
- package/.codeclimate.yml +0 -28
- package/.editorconfig +0 -16
- package/.eslintignore +0 -1
- package/.eslintrc +0 -7
- package/.github/karma-problem-matcher.json +0 -30
- package/.github/workflows/workflow.yml +0 -13
- package/.husky/commit-msg +0 -4
- package/.prettierrc +0 -1
- package/CHANGELOG.md +0 -151
- package/analysis.json +0 -2724
- package/demo/data/adminFiles.json +0 -121
- package/demo/data/johnFiles.json +0 -54
- package/demo/data/multiRootTree.json +0 -10409
- package/demo/data/tree.json +0 -10410
- package/demo/index.html +0 -87
- package/demo/rtl.html +0 -56
- package/web-dev-server.config.mjs +0 -10
- package/web-test-runner.config.mjs +0 -1
package/demo/index.html
DELETED
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
<!doctype html>
|
|
2
|
-
<html>
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="utf-8">
|
|
5
|
-
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1, user-scalable=yes">
|
|
6
|
-
<title>cosmoz-treenode-navigator demo</title>
|
|
7
|
-
<script src="/node_modules/@webcomponents/webcomponentsjs/webcomponents-bundle.js"></script>
|
|
8
|
-
<script type="module">
|
|
9
|
-
import "@polymer/iron-demo-helpers/demo-pages-shared-styles.js";
|
|
10
|
-
import "@polymer/iron-demo-helpers/demo-snippet.js";
|
|
11
|
-
import "@polymer/iron-ajax/iron-ajax.js";
|
|
12
|
-
import "../cosmoz-treenode-navigator.js";
|
|
13
|
-
import "../cosmoz-treenode-button-view.js";
|
|
14
|
-
|
|
15
|
-
const $documentContainer = document.createElement('template');
|
|
16
|
-
$documentContainer.innerHTML = `
|
|
17
|
-
<custom-style>
|
|
18
|
-
<style is="custom-style" include="demo-pages-shared-styles"></style>
|
|
19
|
-
</custom-style>`;
|
|
20
|
-
document.head.appendChild($documentContainer.content);
|
|
21
|
-
</script>
|
|
22
|
-
</head>
|
|
23
|
-
|
|
24
|
-
<body>
|
|
25
|
-
<h1>Cosmoz-treenode-navigator</h1>
|
|
26
|
-
|
|
27
|
-
<div class="vertical-section-container">
|
|
28
|
-
<h3>Navigator with multiple root tree data structure</h3>
|
|
29
|
-
<p>
|
|
30
|
-
The tree data structure simulate a windows file system, with 2 drives C: and D:
|
|
31
|
-
</p>
|
|
32
|
-
<demo-snippet>
|
|
33
|
-
<template>
|
|
34
|
-
<dom-bind id="demo1">
|
|
35
|
-
<template is="dom-bind">
|
|
36
|
-
<iron-ajax url="data/adminFiles.json" handle-as="json" last-response="{{ treeData1 }}" auto="[[ doRequest ]]">
|
|
37
|
-
</iron-ajax>
|
|
38
|
-
<cosmoz-treenode-button-view id="navigator" button-text-placeholder="Click to select a node"
|
|
39
|
-
node-path="{{ path1 }}" selected-node="{{ selectedNode1 }}" tree="[[ getTree(treeData1) ]]"
|
|
40
|
-
></cosmoz-treenode-button-view>
|
|
41
|
-
</template>
|
|
42
|
-
</dom-bind>
|
|
43
|
-
</template>
|
|
44
|
-
</demo-snippet>
|
|
45
|
-
</div>
|
|
46
|
-
|
|
47
|
-
<div class="vertical-section-container">
|
|
48
|
-
<h3>Navigator with multiple root tree data structure and missing ancestor nodes</h3>
|
|
49
|
-
<p>
|
|
50
|
-
The tree data structure is based on the one in the demo above, but showing only files accessible to a specific user.
|
|
51
|
-
</p>
|
|
52
|
-
<demo-snippet>
|
|
53
|
-
<template>
|
|
54
|
-
<dom-bind id="demo2">
|
|
55
|
-
<template is="dom-bind">
|
|
56
|
-
<iron-ajax url="data/johnFiles.json" handle-as="json" last-response="{{ treeData2 }}" auto="[[ doRequest ]]">
|
|
57
|
-
</iron-ajax>
|
|
58
|
-
<cosmoz-treenode-button-view id="navigator" button-text-placeholder="Click to select a node" node-path="{{ path2 }}" selected-node="{{ selectedNode2 }}"
|
|
59
|
-
tree="[[ getTree(treeData2) ]]" multi-selection
|
|
60
|
-
></cosmoz-treenode-button-view>
|
|
61
|
-
</template>
|
|
62
|
-
</dom-bind>
|
|
63
|
-
</template>
|
|
64
|
-
</demo-snippet>
|
|
65
|
-
</div>
|
|
66
|
-
|
|
67
|
-
<script type="module">
|
|
68
|
-
import { DefaultTree } from '@neovici/cosmoz-tree/cosmoz-default-tree';
|
|
69
|
-
|
|
70
|
-
const getTree = data => {
|
|
71
|
-
if (data) {
|
|
72
|
-
return new DefaultTree(data);
|
|
73
|
-
}
|
|
74
|
-
},
|
|
75
|
-
initTemplate = id => {
|
|
76
|
-
let tpl = document.getElementById(id);
|
|
77
|
-
tpl = !tpl.set ? tpl.firstElementChild : tpl;
|
|
78
|
-
tpl.getTree = getTree;
|
|
79
|
-
tpl.set('doRequest', true);
|
|
80
|
-
};
|
|
81
|
-
|
|
82
|
-
setTimeout(() => {
|
|
83
|
-
initTemplate('demo1');
|
|
84
|
-
initTemplate('demo2');
|
|
85
|
-
});
|
|
86
|
-
</script>
|
|
87
|
-
</body></html>
|
package/demo/rtl.html
DELETED
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
<!doctype html>
|
|
2
|
-
<html>
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="utf-8">
|
|
5
|
-
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1, user-scalable=yes">
|
|
6
|
-
<title>cosmoz-treenode-navigator demo</title>
|
|
7
|
-
<script src="/node_modules/@webcomponents/webcomponentsjs/webcomponents-bundle.js"></script>
|
|
8
|
-
<script type="module">
|
|
9
|
-
import "@polymer/iron-demo-helpers/demo-pages-shared-styles.js";
|
|
10
|
-
import "@polymer/iron-demo-helpers/demo-snippet.js";
|
|
11
|
-
import "../cosmoz-treenode-navigator.js";
|
|
12
|
-
import "../cosmoz-treenode-button-view.js";
|
|
13
|
-
|
|
14
|
-
const $documentContainer = document.createElement('template');
|
|
15
|
-
$documentContainer.innerHTML = `
|
|
16
|
-
<custom-style>
|
|
17
|
-
<style is="custom-style" include="demo-pages-shared-styles"></style>
|
|
18
|
-
</custom-style>`;
|
|
19
|
-
document.head.appendChild($documentContainer.content);
|
|
20
|
-
</script>
|
|
21
|
-
</head>
|
|
22
|
-
|
|
23
|
-
<body>
|
|
24
|
-
<h1>Cosmoz-treenode-button-view rtl test</h1>
|
|
25
|
-
|
|
26
|
-
<div class="vertical-section-container">
|
|
27
|
-
<h3>Demonstrate issue caused by using direction: rtl to render the button label</h3>
|
|
28
|
-
<p>Select node 1/2/3, and watch the button label</p>
|
|
29
|
-
<demo-snippet>
|
|
30
|
-
<template>
|
|
31
|
-
<dom-bind id="demo1">
|
|
32
|
-
<template is="dom-bind">
|
|
33
|
-
<cosmoz-treenode-button-view id="navigator" button-text-placeholder="Click to select a node" node-path="{{ path1 }}" selected-node="{{ selectedNode1 }}" tree="[[ getTree(treeData1) ]]">
|
|
34
|
-
</cosmoz-treenode-button-view>
|
|
35
|
-
</template>
|
|
36
|
-
</dom-bind>
|
|
37
|
-
</template>
|
|
38
|
-
</demo-snippet>
|
|
39
|
-
</div>
|
|
40
|
-
<script type="module">
|
|
41
|
-
import { DefaultTree } from '@neovici/cosmoz-tree/cosmoz-default-tree';
|
|
42
|
-
import treeData1 from '../test/data/rtlTest';
|
|
43
|
-
const getTree = data => {
|
|
44
|
-
if (data) {
|
|
45
|
-
return new DefaultTree(data);
|
|
46
|
-
}
|
|
47
|
-
},
|
|
48
|
-
initTemplate = id => {
|
|
49
|
-
let tpl = document.getElementById(id);
|
|
50
|
-
tpl = !tpl.set ? tpl.firstElementChild : tpl;
|
|
51
|
-
tpl.getTree = getTree;
|
|
52
|
-
tpl.treeData1 = treeData1;
|
|
53
|
-
};
|
|
54
|
-
initTemplate('demo1');
|
|
55
|
-
</script>
|
|
56
|
-
</body></html>
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/* eslint-env node */
|
|
2
|
-
export default {
|
|
3
|
-
appIndex: 'demo/index.html',
|
|
4
|
-
open: true,
|
|
5
|
-
preserveSymlinks: true,
|
|
6
|
-
nodeResolve: {
|
|
7
|
-
mainFields: ['browser', 'jsnext', 'jsnext:main', 'module', 'main'],
|
|
8
|
-
dedupe: pkg => ['@neovici', '@polymer', 'lit', 'haunted'].find(prefix => pkg.startsWith(prefix))
|
|
9
|
-
}
|
|
10
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from '@neovici/cfg/web/test-runner.mjs';
|