Skip to content

Commit a728ec9

Browse files
authored
Merge pull request #19 from Linkurious/develop
Release 1.0.5 [ci:run]
2 parents d3c7884 + ca66086 commit a728ec9

File tree

11 files changed

+40
-8
lines changed

11 files changed

+40
-8
lines changed

.bumpversion.cfg

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[bumpversion]
2-
current_version = 1.0.4
2+
current_version = 1.0.5
33
commit = False
44
tag = False
55
serialize =
@@ -8,3 +8,4 @@ serialize =
88
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(-(?P<build>[\w_-]+\.\d+))?
99

1010
[bumpversion:file:.version]
11+
[bumpversion:file:manifest.json]

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ lerna-debug.log*
99
**/.idea
1010
.idea
1111

12+
*.lke
13+
1214
# our own files
1315
**.lke
1416

@@ -31,6 +33,9 @@ coverage
3133
# nyc test coverage
3234
.nyc_output
3335

36+
reports
37+
.npmrc
38+
3439
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
3540
.grunt
3641

.version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.0.4
1+
1.0.5

Jenkinsfile.dependency-updater

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
@Library('linkurious-shared')_
2+
3+
lkeSubReleaseJob {
4+
// General
5+
projectName = "linkurious/lke-plugin-data-table"
6+
7+
releasing = false
8+
}

Jenkinsfile.release

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
@Library('linkurious-shared')_
2+
3+
lkeSubReleaseJob {
4+
// General
5+
projectName = "linkurious/lke-plugin-data-table"
6+
7+
}

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ Configuration keys supported only by the data-table plugin:
2121
| :-- | :-- | :-- | :-- |
2222
| `entityType` | "edge" \| "node" (**required**) | Whether to display nodes or edges in the table. | `"node"` |
2323
| `itemType` | string (**required**) | Name of the node category or edge type to display in the table. | `"Company"` |
24+
| `delimiter` | string (**optional**) | The delimiter used for csv files downloads. Only one character is allowed. By default "," is used | `";"` |
2425
| `properties` | string\[] (**optional**) | Property names to include in the table. Defaults to all the properties of `itemType`. | `["name", "address", "vat_number"]` |
2526

2627
Configuration example for 1 data-table instance accesible via `/plugins/table`:

backend/routeHandler.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,10 @@ module.exports = function configureRoutes(options) {
2626
* @param entityType
2727
* @param itemType
2828
* @param properties
29+
* @param delimiter
2930
* @returns {{message: string}|{message: string}|{message: string}|null|{message: string}}
3031
*/
31-
function checkPluginsConfiguration(schemaTypes, entityType, itemType, properties) {
32+
function checkPluginsConfiguration(schemaTypes, entityType, itemType, properties, delimiter) {
3233
if (entityType && entityType !== 'node' && entityType !== 'edge') {
3334
return {message: 'Invalid plugin configuration “entityType” (must be “node” or “edge”)'};
3435
}
@@ -40,6 +41,9 @@ module.exports = function configureRoutes(options) {
4041
if (properties && (!Array.isArray(properties) || properties.length === 0)) {
4142
return {message: 'Invalid plugin configuration “properties” (must be a non-empty array of property names)'};
4243
}
44+
if (delimiter && delimiter.length != 1) {
45+
return {message: 'Invalid plugin configuration “delimiter” (only one character is allowed)'};
46+
}
4347
return null;
4448
}
4549

@@ -48,7 +52,8 @@ module.exports = function configureRoutes(options) {
4852
const entityType = options.configuration.entityType;
4953
const itemType = options.configuration.itemType;
5054
const properties = options.configuration.properties;
51-
const error = checkPluginsConfiguration(schemaTypes, entityType, itemType, properties);
55+
const delimiter = options.configuration.delimiter;
56+
const error = checkPluginsConfiguration(schemaTypes, entityType, itemType, properties, delimiter);
5257
if (error) {
5358
res.status(412);
5459
res.send(JSON.stringify({status: 412, body: {error}}));

manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "data-table",
3-
"version": "1.0.3",
3+
"version": "1.0.5",
44
"pluginApiVersion": "1.0.0",
55
"publicRoute": "public",
66
"singlePageAppIndex": "index.html",

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@linkurious/lke-plugin-data-table",
3-
"version": "1.0.4",
3+
"version": "1.0.5",
44
"description": "Data-table plugin for Linkurious Enterprise",
55
"main": "index.js",
66
"homepage": "https://github.com/Linkurious/lke-plugin-data-table#readme",
@@ -17,6 +17,7 @@
1717
"lint:ci-deactivated": "eslint -f checkstyle -o reports/checkstyle.xml .",
1818
"build": "npm pack && gunzip -qf -c linkurious-lke-plugin-data-table-$(cat .version).tgz > lke-plugin-data-table.lke",
1919
"plugin:tar": "scripts/postpack.js",
20+
"upload": "gh release create \"v$(cat .version)\" lke-plugin-data-table.lke",
2021
"bump:patch": "bump2version patch && npm version --no-git-tag-version patch",
2122
"bump:minor": "bump2version minor && npm version --no-git-tag-version minor",
2223
"bump:major": "bump2version major && npm version --no-git-tag-version major"

0 commit comments

Comments
 (0)