Compare commits

..

1 Commits

Author SHA1 Message Date
Snigdha Snigdha
fa4107ebbf fix: comsole error 2020-01-09 13:37:22 +05:30
19 changed files with 8129 additions and 446 deletions

View File

@@ -3,7 +3,7 @@ version: 2
defaults: &defaults defaults: &defaults
working_directory: ~/qlik-smart-pivot working_directory: ~/qlik-smart-pivot
docker: docker:
- image: circleci/node:16.13.0 - image: circleci/node:stretch
environment: environment:
GITHUB_ORG: "qlik-oss" GITHUB_ORG: "qlik-oss"
GITHUB_REPO: "PLSmartPivot" GITHUB_REPO: "PLSmartPivot"
@@ -12,12 +12,20 @@ defaults: &defaults
jobs: jobs:
test: test:
docker: docker:
- image: circleci/node:16.13.0-browsers - image: circleci/node:stretch-browsers
steps: steps:
- checkout - checkout
- run: - run:
name: Install dependencies name: Install dependencies
command: npm install command: npm install
- run:
name: BlackDuck scan
command: curl -s https://detect.synopsys.com/detect.sh | bash -s -- \
--blackduck.url="https://qliktech.blackducksoftware.com" \
--blackduck.trust.cert=true \
--blackduck.username="svc-blackduck" \
--blackduck.password=${svc_blackduck} \
--detect.project.name="viz-bundle-qlik-smart-pivot"
bump-version: bump-version:
<<: *defaults <<: *defaults
@@ -35,10 +43,6 @@ jobs:
<<: *defaults <<: *defaults
steps: steps:
- checkout - checkout
- run:
name: Setup environment
command: |
sudo chmod +x ./.circleci/upgrade-node.sh
- attach_workspace: - attach_workspace:
at: ~/qlik-smart-pivot at: ~/qlik-smart-pivot
- run: - run:

View File

@@ -1,17 +0,0 @@
#!/bin/bash
set -eo pipefail
NVM_DIR="/opt/circleci/.nvm"
NODE_VERSION="v16"
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
echo "Installing Node $NODE_VERSION"
nvm install $NODE_VERSION
nvm alias default $NODE_VERSION
# Each step uses the same `$BASH_ENV`, so need to modify it
echo 'export NVM_DIR="/opt/circleci/.nvm"' >> $BASH_ENV
echo "[ -s \"$NVM_DIR/nvm.sh\" ] && . \"$NVM_DIR/nvm.sh\"" >> $BASH_ENV

View File

@@ -3,15 +3,15 @@ module.exports = {
ecmaVersion: 6, ecmaVersion: 6,
ecmaFeatures: { ecmaFeatures: {
jsx: true, jsx: true,
modules: true, modules: true
}, },
sourceType: "module", sourceType: "module"
}, },
parser: "babel-eslint", parser: "babel-eslint",
env: { env: {
browser: true, browser: true,
es6: true, es6: true,
node: true, node: true
}, },
globals: { globals: {
angular: false, angular: false,
@@ -21,63 +21,49 @@ module.exports = {
document: false, document: false,
expect: false, expect: false,
it: false, it: false,
require: false, require: false
}, },
rules: { rules: {
indent: ["warn", 2, { SwitchCase: 1 }], "indent": ["error", 2, { "SwitchCase": 1 }],
"linebreak-style": ["error", "unix"], "linebreak-style": ["error", "unix"],
"object-curly-spacing": ["error", "always"], "object-curly-spacing": ["error", "always"],
"max-lines": ["warn", 300], "max-lines": ["warn", 300],
"max-len": [ "max-len": ["warn", { "code": 120, "ignoreComments": true, "ignoreTrailingComments": false }],
"warn",
{ code: 120, ignoreComments: true, ignoreTrailingComments: false },
],
"no-console": ["warn"], "no-console": ["warn"],
"no-mixed-operators": [ "no-mixed-operators": ["warn", {
"warn", "groups": [
{ ["==", "!=", "===", "!==", ">", ">=", "<", "<="],
groups: [ ["&&", "||"],
["==", "!=", "===", "!==", ">", ">=", "<", "<="], ["in", "instanceof"]
["&&", "||"], ],
["in", "instanceof"], "allowSamePrecedence": true
], }],
allowSamePrecedence: true,
},
],
"comma-dangle": ["off"],
"space-before-function-paren": ["off"],
"no-multi-spaces": ["error"], "no-multi-spaces": ["error"],
"no-cond-assign": ["warn"], "no-cond-assign": ["warn"],
"no-fallthrough": ["warn"], "no-fallthrough": ["warn"],
"no-undef": ["error"], "no-undef": ["error"],
"no-unused-vars": ["error"], "no-unused-vars": ["error"],
"no-use-before-define": [ "no-use-before-define": ["error", { "functions": false, "classes": false, "variables": false }],
"error",
{ functions: false, classes: false, variables: false },
],
"no-useless-escape": ["warn"], "no-useless-escape": ["warn"],
"no-useless-return": ["warn"], "no-useless-return": ["warn"],
"no-underscore-dangle": ["warn", { allow: ["_id"] }], "no-underscore-dangle": ["warn", { "allow": ["_id"] }],
"no-redeclare": ["error"], "no-redeclare": ["error"],
"no-restricted-syntax": ["warn"], "no-restricted-syntax": ["warn"],
"operator-linebreak": ["warn", "before"], "operator-linebreak": ["warn", "before"],
"prefer-promise-reject-errors": ["warn"], "prefer-promise-reject-errors": ["warn"],
"padded-blocks": [ "padded-blocks": ["warn", { "blocks": "never", "switches": "never", "classes": "never" }],
"warn", "semi": ["error", "always"],
{ blocks: "never", switches: "never", classes: "never" },
],
semi: ["error", "always"],
"valid-typeof": ["warn"], "valid-typeof": ["warn"],
"no-eval": ["error"], "no-eval": ["error"],
"no-implied-eval": ["error"], "no-implied-eval": ["error"],
"no-debugger": ["warn"], "no-debugger": ["warn"],
"no-unreachable": ["warn"], "no-unreachable": ["warn"],
quotes: ["warn", "single", { avoidEscape: true }], "quotes": ["warn", "single", { "avoidEscape": true }],
"sort-imports": ["off"], "sort-imports": ["off"],
"max-lines-per-function": ["off"], // marks the entire functions, a bit too noisy "max-lines-per-function": ["off"], // marks the entire functions, a bit too noisy
complexity: ["warn"], "complexity": ["warn"],
camelcase: ["warn"], "camelcase": ["warn"],
"max-statements": ["off"], // marks the entire functions, a bit too noisy "max-statements": ["off"], // marks the entire functions, a bit too noisy
"sort-vars": ["off"], // not much value for the work "sort-vars": ["off"], // not much value for the work
"init-declarations": ["off"], "init-declarations": ["off"],
"capitalized-comments": ["off"], "capitalized-comments": ["off"],
@@ -113,13 +99,13 @@ module.exports = {
"array-bracket-newline": ["warn"], "array-bracket-newline": ["warn"],
"array-element-newline": ["warn"], "array-element-newline": ["warn"],
"object-shorthand": ["warn"], "object-shorthand": ["warn"],
eqeqeq: ["warn"], "eqeqeq": ["warn"],
"no-empty-function": ["off"], "no-empty-function": ["off"],
"function-paren-newline": ["warn"], "function-paren-newline": ["warn"],
"no-invalid-this": ["warn"], "no-invalid-this": ["warn"],
"newline-per-chained-call": ["warn"], "newline-per-chained-call": ["warn"],
"no-unused-expressions": ["warn"], "no-unused-expressions": ["warn"],
strict: ["warn"], "strict": ["warn"],
"no-ternary": ["off"], "no-ternary": ["off"],
"multiline-ternary": ["off"], "multiline-ternary": ["off"],
"no-param-reassign": ["error"], "no-param-reassign": ["error"],
@@ -129,9 +115,9 @@ module.exports = {
"default-case": ["warn"], "default-case": ["warn"],
"no-alert": ["warn"], "no-alert": ["warn"],
"max-params": ["warn"], "max-params": ["warn"],
"brace-style": ["warn", "1tbs", { allowSingleLine: true }], "brace-style": ["warn", "1tbs", { "allowSingleLine": true }],
"prefer-const": ["warn"], "prefer-const": ["warn"],
"class-methods-use-this": ["warn"], "class-methods-use-this":["warn"],
// plugin:react // plugin:react
"react/jsx-indent": ["warn", 2], "react/jsx-indent": ["warn", 2],
"react/jsx-indent-props": ["warn", 2], "react/jsx-indent-props": ["warn", 2],
@@ -145,7 +131,10 @@ module.exports = {
"react/jsx-max-depth": ["off"], // rule throws exception in single-dimension-measure "react/jsx-max-depth": ["off"], // rule throws exception in single-dimension-measure
"react/jsx-filename-extension": ["warn"], "react/jsx-filename-extension": ["warn"],
"react/prefer-stateless-function": ["warn"], "react/prefer-stateless-function": ["warn"],
"react/no-set-state": ["warn"], "react/no-set-state": ["warn"]
}, },
extends: ["eslint:all", "plugin:react/all"], extends: [
}; "eslint:all",
"plugin:react/all"
]
}

View File

@@ -1,3 +0,0 @@
{
"json.format.enable": false
}

View File

@@ -9,52 +9,48 @@ var pkg = require('./package.json');
var DIST = './dist'; var DIST = './dist';
var VERSION = process.env.VERSION || 'local-dev'; var VERSION = process.env.VERSION || 'local-dev';
gulp.task("qext", function () { gulp.task('qext', function () {
var qext = { var qext = {
name: "P&L pivot", name: 'P&L pivot',
type: "visualization", type: 'visualization',
description: pkg.description + "\nVersion: " + VERSION, description: pkg.description + '\nVersion: ' + VERSION,
version: VERSION, version: VERSION,
icon: "pivot-table", icon: 'pivot-table',
preview: "qlik-smart-pivot.png", preview: 'qlik-smart-pivot.png',
keywords: "qlik-sense, visualization", keywords: 'qlik-sense, visualization',
author: pkg.author, author: pkg.author,
homepage: pkg.homepage, homepage: pkg.homepage,
license: pkg.license, license: pkg.license,
repository: pkg.repository, repository: pkg.repository,
dependencies: { dependencies: {
"qlik-sense": ">=5.5.x", 'qlik-sense': '>=5.5.x'
}, }
__next: true, };
}; if (pkg.contributors) {
if (pkg.contributors) { qext.contributors = pkg.contributors;
qext.contributors = pkg.contributors; }
} var src = require('stream').Readable({
var src = require("stream").Readable({ objectMode: true
objectMode: true, });
}); src._read = function () {
src._read = function () { this.push(new gutil.File({
this.push( cwd: '',
new gutil.File({ base: '',
cwd: "", path: pkg.name + '.qext',
base: "", contents: Buffer.from(JSON.stringify(qext, null, 4))
path: "qlik-smart-pivot.qext", }));
contents: Buffer.from(JSON.stringify(qext, null, 4)), this.push(null);
}) };
); return src.pipe(gulp.dest(DIST));
this.push(null);
};
return src.pipe(gulp.dest(DIST));
}); });
gulp.task("clean", function () { gulp.task('clean', function(){
return del([DIST], { force: true }); return del([DIST], { force: true });
}); });
gulp.task("zip-build", function () { gulp.task('zip-build', function(){
return gulp return gulp.src(DIST + '/**/*')
.src(DIST + "/**/*") .pipe(zip(`${pkg.name}_${VERSION}.zip`))
.pipe(zip(`qlik-smart-pivot_${VERSION}.zip`))
.pipe(gulp.dest(DIST)); .pipe(gulp.dest(DIST));
}); });

510
package-lock.json generated
View File

@@ -1417,6 +1417,23 @@
"integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=", "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=",
"dev": true "dev": true
}, },
"asap": {
"version": "2.0.6",
"resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz",
"integrity": "sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY=",
"dev": true,
"optional": true
},
"asn1": {
"version": "0.2.4",
"resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz",
"integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==",
"dev": true,
"optional": true,
"requires": {
"safer-buffer": "~2.1.0"
}
},
"asn1.js": { "asn1.js": {
"version": "4.10.1", "version": "4.10.1",
"resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-4.10.1.tgz", "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-4.10.1.tgz",
@@ -1445,7 +1462,7 @@
}, },
"util": { "util": {
"version": "0.10.3", "version": "0.10.3",
"resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz", "resolved": "http://registry.npmjs.org/util/-/util-0.10.3.tgz",
"integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=", "integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=",
"dev": true, "dev": true,
"requires": { "requires": {
@@ -1454,6 +1471,12 @@
} }
} }
}, },
"assert-plus": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz",
"integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=",
"dev": true
},
"assign-symbols": { "assign-symbols": {
"version": "1.0.0", "version": "1.0.0",
"resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz",
@@ -1501,6 +1524,13 @@
"async-done": "^1.2.2" "async-done": "^1.2.2"
} }
}, },
"asynckit": {
"version": "0.4.0",
"resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
"integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=",
"dev": true,
"optional": true
},
"atob": { "atob": {
"version": "2.1.2", "version": "2.1.2",
"resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz",
@@ -1533,6 +1563,20 @@
} }
} }
}, },
"aws-sign2": {
"version": "0.7.0",
"resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz",
"integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=",
"dev": true,
"optional": true
},
"aws4": {
"version": "1.8.0",
"resolved": "https://registry.npmjs.org/aws4/-/aws4-1.8.0.tgz",
"integrity": "sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ==",
"dev": true,
"optional": true
},
"babel-code-frame": { "babel-code-frame": {
"version": "6.26.0", "version": "6.26.0",
"resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz", "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz",
@@ -1552,7 +1596,7 @@
}, },
"chalk": { "chalk": {
"version": "1.1.3", "version": "1.1.3",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", "resolved": "http://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",
"integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=",
"dev": true, "dev": true,
"requires": { "requires": {
@@ -1693,6 +1737,16 @@
"integrity": "sha512-ccav/yGvoa80BQDljCxsmmQ3Xvx60/UpBIij5QN21W3wBi/hhIC9OoO+KLpu9IJTS9j4DRVJ3aDDF9cMSoa2lw==", "integrity": "sha512-ccav/yGvoa80BQDljCxsmmQ3Xvx60/UpBIij5QN21W3wBi/hhIC9OoO+KLpu9IJTS9j4DRVJ3aDDF9cMSoa2lw==",
"dev": true "dev": true
}, },
"bcrypt-pbkdf": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz",
"integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=",
"dev": true,
"optional": true,
"requires": {
"tweetnacl": "^0.14.3"
}
},
"beeper": { "beeper": {
"version": "1.1.1", "version": "1.1.1",
"resolved": "https://registry.npmjs.org/beeper/-/beeper-1.1.1.tgz", "resolved": "https://registry.npmjs.org/beeper/-/beeper-1.1.1.tgz",
@@ -1987,6 +2041,13 @@
"integrity": "sha512-D6J9jloPm2MPkg0PXcODLMQAJKkeixKO9xhqTUMvtd44MtTYMyyDXPQ2Lk9IgBq5FH0frwiPa/N/w8ncQf7kIQ==", "integrity": "sha512-D6J9jloPm2MPkg0PXcODLMQAJKkeixKO9xhqTUMvtd44MtTYMyyDXPQ2Lk9IgBq5FH0frwiPa/N/w8ncQf7kIQ==",
"dev": true "dev": true
}, },
"caseless": {
"version": "0.12.0",
"resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz",
"integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=",
"dev": true,
"optional": true
},
"ccount": { "ccount": {
"version": "1.0.3", "version": "1.0.3",
"resolved": "https://registry.npmjs.org/ccount/-/ccount-1.0.3.tgz", "resolved": "https://registry.npmjs.org/ccount/-/ccount-1.0.3.tgz",
@@ -2264,6 +2325,15 @@
"integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==", "integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==",
"dev": true "dev": true
}, },
"combined-stream": {
"version": "1.0.7",
"resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.7.tgz",
"integrity": "sha512-brWl9y6vOB1xYPZcpZde3N9zDByXTosAeMDo4p1wzo6UMOX4vumB+TP1RZ76sfE6Md68Q0NJSrE/gbezd4Ul+w==",
"dev": true,
"requires": {
"delayed-stream": "~1.0.0"
}
},
"commander": { "commander": {
"version": "2.19.0", "version": "2.19.0",
"resolved": "https://registry.npmjs.org/commander/-/commander-2.19.0.tgz", "resolved": "https://registry.npmjs.org/commander/-/commander-2.19.0.tgz",
@@ -2324,15 +2394,6 @@
"safe-buffer": "~5.1.1" "safe-buffer": "~5.1.1"
} }
}, },
"copy-anything": {
"version": "2.0.6",
"resolved": "https://registry.npmjs.org/copy-anything/-/copy-anything-2.0.6.tgz",
"integrity": "sha512-1j20GZTsvKNkc4BY3NpMOM8tt///wY3FpIzozTOFO2ffuZcV61nojHXVKIy3WM+7ADCy5FVhdZYHYDdgTU0yJw==",
"dev": true,
"requires": {
"is-what": "^3.14.1"
}
},
"copy-concurrently": { "copy-concurrently": {
"version": "1.0.5", "version": "1.0.5",
"resolved": "https://registry.npmjs.org/copy-concurrently/-/copy-concurrently-1.0.5.tgz", "resolved": "https://registry.npmjs.org/copy-concurrently/-/copy-concurrently-1.0.5.tgz",
@@ -2524,13 +2585,13 @@
"dependencies": { "dependencies": {
"jsesc": { "jsesc": {
"version": "0.5.0", "version": "0.5.0",
"resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", "resolved": "http://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz",
"integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=", "integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=",
"dev": true "dev": true
}, },
"regexpu-core": { "regexpu-core": {
"version": "1.0.0", "version": "1.0.0",
"resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-1.0.0.tgz", "resolved": "http://registry.npmjs.org/regexpu-core/-/regexpu-core-1.0.0.tgz",
"integrity": "sha1-hqdj9Y7k18L2sQLkdkBQ3n7ZDGs=", "integrity": "sha1-hqdj9Y7k18L2sQLkdkBQ3n7ZDGs=",
"dev": true, "dev": true,
"requires": { "requires": {
@@ -2541,13 +2602,13 @@
}, },
"regjsgen": { "regjsgen": {
"version": "0.2.0", "version": "0.2.0",
"resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.2.0.tgz", "resolved": "http://registry.npmjs.org/regjsgen/-/regjsgen-0.2.0.tgz",
"integrity": "sha1-bAFq3qxVT3WCP+N6wFuS1aTtsfc=", "integrity": "sha1-bAFq3qxVT3WCP+N6wFuS1aTtsfc=",
"dev": true "dev": true
}, },
"regjsparser": { "regjsparser": {
"version": "0.1.5", "version": "0.1.5",
"resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.1.5.tgz", "resolved": "http://registry.npmjs.org/regjsparser/-/regjsparser-0.1.5.tgz",
"integrity": "sha1-fuj4Tcb6eS0/0K4ijSS9lJ6tIFw=", "integrity": "sha1-fuj4Tcb6eS0/0K4ijSS9lJ6tIFw=",
"dev": true, "dev": true,
"requires": { "requires": {
@@ -2592,6 +2653,16 @@
"es5-ext": "^0.10.9" "es5-ext": "^0.10.9"
} }
}, },
"dashdash": {
"version": "1.14.1",
"resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz",
"integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=",
"dev": true,
"optional": true,
"requires": {
"assert-plus": "^1.0.0"
}
},
"date-now": { "date-now": {
"version": "0.1.4", "version": "0.1.4",
"resolved": "https://registry.npmjs.org/date-now/-/date-now-0.1.4.tgz", "resolved": "https://registry.npmjs.org/date-now/-/date-now-0.1.4.tgz",
@@ -2752,7 +2823,7 @@
}, },
"globby": { "globby": {
"version": "3.0.1", "version": "3.0.1",
"resolved": "https://registry.npmjs.org/globby/-/globby-3.0.1.tgz", "resolved": "http://registry.npmjs.org/globby/-/globby-3.0.1.tgz",
"integrity": "sha1-IJSvhCHhkVIVDViT62QWsxLZoi8=", "integrity": "sha1-IJSvhCHhkVIVDViT62QWsxLZoi8=",
"dev": true, "dev": true,
"requires": { "requires": {
@@ -2766,12 +2837,18 @@
}, },
"pify": { "pify": {
"version": "2.3.0", "version": "2.3.0",
"resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", "resolved": "http://registry.npmjs.org/pify/-/pify-2.3.0.tgz",
"integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=",
"dev": true "dev": true
} }
} }
}, },
"delayed-stream": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
"integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=",
"dev": true
},
"des.js": { "des.js": {
"version": "1.0.0", "version": "1.0.0",
"resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.0.tgz", "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.0.tgz",
@@ -2836,7 +2913,7 @@
"dependencies": { "dependencies": {
"domelementtype": { "domelementtype": {
"version": "1.1.3", "version": "1.1.3",
"resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.1.3.tgz", "resolved": "http://registry.npmjs.org/domelementtype/-/domelementtype-1.1.3.tgz",
"integrity": "sha1-vSh3PiZCiBrsUVRJJCmcXNgiGFs=", "integrity": "sha1-vSh3PiZCiBrsUVRJJCmcXNgiGFs=",
"dev": true "dev": true
} }
@@ -2899,7 +2976,7 @@
}, },
"readable-stream": { "readable-stream": {
"version": "1.1.14", "version": "1.1.14",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz",
"integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=",
"dev": true, "dev": true,
"requires": { "requires": {
@@ -2939,6 +3016,17 @@
"object.defaults": "^1.1.0" "object.defaults": "^1.1.0"
} }
}, },
"ecc-jsbn": {
"version": "0.1.2",
"resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz",
"integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=",
"dev": true,
"optional": true,
"requires": {
"jsbn": "~0.1.0",
"safer-buffer": "^2.1.0"
}
},
"electron-to-chromium": { "electron-to-chromium": {
"version": "1.3.88", "version": "1.3.88",
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.88.tgz", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.88.tgz",
@@ -3517,6 +3605,12 @@
} }
} }
}, },
"extsprintf": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz",
"integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=",
"dev": true
},
"fancy-log": { "fancy-log": {
"version": "1.3.3", "version": "1.3.3",
"resolved": "https://registry.npmjs.org/fancy-log/-/fancy-log-1.3.3.tgz", "resolved": "https://registry.npmjs.org/fancy-log/-/fancy-log-1.3.3.tgz",
@@ -3700,6 +3794,25 @@
"for-in": "^1.0.1" "for-in": "^1.0.1"
} }
}, },
"forever-agent": {
"version": "0.6.1",
"resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz",
"integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=",
"dev": true,
"optional": true
},
"form-data": {
"version": "2.3.3",
"resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz",
"integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==",
"dev": true,
"optional": true,
"requires": {
"asynckit": "^0.4.0",
"combined-stream": "^1.0.6",
"mime-types": "^2.1.12"
}
},
"fragment-cache": { "fragment-cache": {
"version": "0.2.1", "version": "0.2.1",
"resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz",
@@ -3767,8 +3880,7 @@
"ansi-regex": { "ansi-regex": {
"version": "2.1.1", "version": "2.1.1",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"aproba": { "aproba": {
"version": "1.2.0", "version": "1.2.0",
@@ -3789,14 +3901,12 @@
"balanced-match": { "balanced-match": {
"version": "1.0.0", "version": "1.0.0",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"brace-expansion": { "brace-expansion": {
"version": "1.1.11", "version": "1.1.11",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"balanced-match": "^1.0.0", "balanced-match": "^1.0.0",
"concat-map": "0.0.1" "concat-map": "0.0.1"
@@ -3811,20 +3921,17 @@
"code-point-at": { "code-point-at": {
"version": "1.1.0", "version": "1.1.0",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"concat-map": { "concat-map": {
"version": "0.0.1", "version": "0.0.1",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"console-control-strings": { "console-control-strings": {
"version": "1.1.0", "version": "1.1.0",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"core-util-is": { "core-util-is": {
"version": "1.0.2", "version": "1.0.2",
@@ -3941,8 +4048,7 @@
"inherits": { "inherits": {
"version": "2.0.3", "version": "2.0.3",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"ini": { "ini": {
"version": "1.3.5", "version": "1.3.5",
@@ -3954,7 +4060,6 @@
"version": "1.0.0", "version": "1.0.0",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"number-is-nan": "^1.0.0" "number-is-nan": "^1.0.0"
} }
@@ -3969,7 +4074,6 @@
"version": "3.0.4", "version": "3.0.4",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"brace-expansion": "^1.1.7" "brace-expansion": "^1.1.7"
} }
@@ -3977,14 +4081,12 @@
"minimist": { "minimist": {
"version": "0.0.8", "version": "0.0.8",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"minipass": { "minipass": {
"version": "2.2.4", "version": "2.2.4",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"safe-buffer": "^5.1.1", "safe-buffer": "^5.1.1",
"yallist": "^3.0.0" "yallist": "^3.0.0"
@@ -4003,7 +4105,6 @@
"version": "0.5.1", "version": "0.5.1",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"minimist": "0.0.8" "minimist": "0.0.8"
} }
@@ -4084,8 +4185,7 @@
"number-is-nan": { "number-is-nan": {
"version": "1.0.1", "version": "1.0.1",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"object-assign": { "object-assign": {
"version": "4.1.1", "version": "4.1.1",
@@ -4097,7 +4197,6 @@
"version": "1.4.0", "version": "1.4.0",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"wrappy": "1" "wrappy": "1"
} }
@@ -4183,8 +4282,7 @@
"safe-buffer": { "safe-buffer": {
"version": "5.1.1", "version": "5.1.1",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"safer-buffer": { "safer-buffer": {
"version": "2.1.2", "version": "2.1.2",
@@ -4220,7 +4318,6 @@
"version": "1.0.2", "version": "1.0.2",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"code-point-at": "^1.0.0", "code-point-at": "^1.0.0",
"is-fullwidth-code-point": "^1.0.0", "is-fullwidth-code-point": "^1.0.0",
@@ -4240,7 +4337,6 @@
"version": "3.0.1", "version": "3.0.1",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"ansi-regex": "^2.0.0" "ansi-regex": "^2.0.0"
} }
@@ -4284,14 +4380,12 @@
"wrappy": { "wrappy": {
"version": "1.0.2", "version": "1.0.2",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
}, },
"yallist": { "yallist": {
"version": "3.0.2", "version": "3.0.2",
"bundled": true, "bundled": true,
"dev": true, "dev": true
"optional": true
} }
} }
}, },
@@ -4336,6 +4430,16 @@
"integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=", "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=",
"dev": true "dev": true
}, },
"getpass": {
"version": "0.1.7",
"resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz",
"integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=",
"dev": true,
"optional": true,
"requires": {
"assert-plus": "^1.0.0"
}
},
"glob": { "glob": {
"version": "7.1.3", "version": "7.1.3",
"resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz",
@@ -4595,7 +4699,7 @@
}, },
"chalk": { "chalk": {
"version": "1.1.3", "version": "1.1.3",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", "resolved": "http://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",
"integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=",
"dev": true, "dev": true,
"requires": { "requires": {
@@ -4676,7 +4780,7 @@
}, },
"chalk": { "chalk": {
"version": "1.1.3", "version": "1.1.3",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", "resolved": "http://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",
"integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=",
"dev": true, "dev": true,
"requires": { "requires": {
@@ -4695,7 +4799,7 @@
}, },
"readable-stream": { "readable-stream": {
"version": "1.0.34", "version": "1.0.34",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz",
"integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=",
"dev": true, "dev": true,
"requires": { "requires": {
@@ -4719,7 +4823,7 @@
}, },
"through2": { "through2": {
"version": "0.6.5", "version": "0.6.5",
"resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz", "resolved": "http://registry.npmjs.org/through2/-/through2-0.6.5.tgz",
"integrity": "sha1-QaucZ7KdVyCQcUEOHXp6lozTrUg=", "integrity": "sha1-QaucZ7KdVyCQcUEOHXp6lozTrUg=",
"dev": true, "dev": true,
"requires": { "requires": {
@@ -4738,6 +4842,24 @@
"glogg": "^1.0.0" "glogg": "^1.0.0"
} }
}, },
"har-schema": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz",
"integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=",
"dev": true,
"optional": true
},
"har-validator": {
"version": "5.1.3",
"resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.3.tgz",
"integrity": "sha512-sNvOCzEQNr/qrvJgc3UG/kD4QtlHycrzwS+6mfTrrSq97BvaYcPZZI1ZSqGSPR73Cxn4LKTD4PttRwfU7jWq5g==",
"dev": true,
"optional": true,
"requires": {
"ajv": "^6.5.5",
"har-schema": "^2.0.0"
}
},
"has": { "has": {
"version": "1.0.3", "version": "1.0.3",
"resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz",
@@ -4888,6 +5010,18 @@
} }
} }
}, },
"http-signature": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz",
"integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=",
"dev": true,
"optional": true,
"requires": {
"assert-plus": "^1.0.0",
"jsprim": "^1.2.2",
"sshpk": "^1.7.0"
}
},
"https-browserify": { "https-browserify": {
"version": "1.0.0", "version": "1.0.0",
"resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-1.0.0.tgz", "resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-1.0.0.tgz",
@@ -4939,7 +5073,7 @@
"image-size": { "image-size": {
"version": "0.5.5", "version": "0.5.5",
"resolved": "https://registry.npmjs.org/image-size/-/image-size-0.5.5.tgz", "resolved": "https://registry.npmjs.org/image-size/-/image-size-0.5.5.tgz",
"integrity": "sha512-6TDAlDPZxUFCv+fuOkIoXT/V/f3Qbq8e37p+YOiYrUv3v9cc3/6x78VdfPgFVaB9dZYeLUfKgHRebpkm/oP2VQ==", "integrity": "sha1-Cd/Uq50g4p6xw+gLiZA3jfnjy5w=",
"dev": true, "dev": true,
"optional": true "optional": true
}, },
@@ -5399,6 +5533,13 @@
"has-symbols": "^1.0.0" "has-symbols": "^1.0.0"
} }
}, },
"is-typedarray": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz",
"integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=",
"dev": true,
"optional": true
},
"is-unc-path": { "is-unc-path": {
"version": "1.0.0", "version": "1.0.0",
"resolved": "https://registry.npmjs.org/is-unc-path/-/is-unc-path-1.0.0.tgz", "resolved": "https://registry.npmjs.org/is-unc-path/-/is-unc-path-1.0.0.tgz",
@@ -5420,12 +5561,6 @@
"integrity": "sha1-Kb8+/3Ab4tTTFdusw5vDn+j2Aao=", "integrity": "sha1-Kb8+/3Ab4tTTFdusw5vDn+j2Aao=",
"dev": true "dev": true
}, },
"is-what": {
"version": "3.14.1",
"resolved": "https://registry.npmjs.org/is-what/-/is-what-3.14.1.tgz",
"integrity": "sha512-sNxgpk9793nzSs7bA6JQJGeIuRBQhAaNGG77kzYQgMkrID+lS6SlK07K5LaptscDlSaIgH+GPFzf+d75FVxozA==",
"dev": true
},
"is-whitespace-character": { "is-whitespace-character": {
"version": "1.0.2", "version": "1.0.2",
"resolved": "https://registry.npmjs.org/is-whitespace-character/-/is-whitespace-character-1.0.2.tgz", "resolved": "https://registry.npmjs.org/is-whitespace-character/-/is-whitespace-character-1.0.2.tgz",
@@ -5462,6 +5597,13 @@
"integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=",
"dev": true "dev": true
}, },
"isstream": {
"version": "0.1.2",
"resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz",
"integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=",
"dev": true,
"optional": true
},
"js-base64": { "js-base64": {
"version": "2.4.9", "version": "2.4.9",
"resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.4.9.tgz", "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.4.9.tgz",
@@ -5489,6 +5631,12 @@
"esprima": "^4.0.0" "esprima": "^4.0.0"
} }
}, },
"jsbn": {
"version": "0.1.1",
"resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz",
"integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=",
"dev": true
},
"jsesc": { "jsesc": {
"version": "2.5.2", "version": "2.5.2",
"resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz",
@@ -5501,6 +5649,13 @@
"integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==",
"dev": true "dev": true
}, },
"json-schema": {
"version": "0.2.3",
"resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz",
"integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=",
"dev": true,
"optional": true
},
"json-schema-traverse": { "json-schema-traverse": {
"version": "0.4.1", "version": "0.4.1",
"resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",
@@ -5522,6 +5677,13 @@
"integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=",
"dev": true "dev": true
}, },
"json-stringify-safe": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz",
"integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=",
"dev": true,
"optional": true
},
"json5": { "json5": {
"version": "0.5.1", "version": "0.5.1",
"resolved": "http://registry.npmjs.org/json5/-/json5-0.5.1.tgz", "resolved": "http://registry.npmjs.org/json5/-/json5-0.5.1.tgz",
@@ -5534,6 +5696,19 @@
"integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=", "integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=",
"dev": true "dev": true
}, },
"jsprim": {
"version": "1.4.1",
"resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz",
"integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=",
"dev": true,
"optional": true,
"requires": {
"assert-plus": "1.0.0",
"extsprintf": "1.3.0",
"json-schema": "0.2.3",
"verror": "1.10.0"
}
},
"jsx-ast-utils": { "jsx-ast-utils": {
"version": "2.0.1", "version": "2.0.1",
"resolved": "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-2.0.1.tgz", "resolved": "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-2.0.1.tgz",
@@ -5599,37 +5774,26 @@
} }
}, },
"less": { "less": {
"version": "3.13.1", "version": "3.8.1",
"resolved": "https://registry.npmjs.org/less/-/less-3.13.1.tgz", "resolved": "https://registry.npmjs.org/less/-/less-3.8.1.tgz",
"integrity": "sha512-SwA1aQXGUvp+P5XdZslUOhhLnClSLIjWvJhmd+Vgib5BFIr9lMNlQwmwUNOjXThF/A0x+MCYYPeWEfeWiLRnTw==", "integrity": "sha512-8HFGuWmL3FhQR0aH89escFNBQH/nEiYPP2ltDFdQw2chE28Yx2E3lhAIq9Y2saYwLSwa699s4dBVEfCY8Drf7Q==",
"dev": true, "dev": true,
"requires": { "requires": {
"copy-anything": "^2.0.1", "clone": "^2.1.2",
"errno": "^0.1.1", "errno": "^0.1.1",
"graceful-fs": "^4.1.2", "graceful-fs": "^4.1.2",
"image-size": "~0.5.0", "image-size": "~0.5.0",
"make-dir": "^2.1.0",
"mime": "^1.4.1", "mime": "^1.4.1",
"native-request": "^1.0.5", "mkdirp": "^0.5.0",
"source-map": "~0.6.0", "promise": "^7.1.1",
"tslib": "^1.10.0" "request": "^2.83.0",
"source-map": "~0.6.0"
}, },
"dependencies": { "dependencies": {
"make-dir": { "mime": {
"version": "2.1.0", "version": "1.6.0",
"resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz",
"integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==",
"dev": true,
"optional": true,
"requires": {
"pify": "^4.0.1",
"semver": "^5.6.0"
}
},
"pify": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz",
"integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==",
"dev": true, "dev": true,
"optional": true "optional": true
}, },
@@ -5639,12 +5803,6 @@
"integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
"dev": true, "dev": true,
"optional": true "optional": true
},
"tslib": {
"version": "1.14.1",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz",
"integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==",
"dev": true
} }
} }
}, },
@@ -5687,7 +5845,7 @@
}, },
"load-json-file": { "load-json-file": {
"version": "1.1.0", "version": "1.1.0",
"resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", "resolved": "http://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz",
"integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=",
"dev": true, "dev": true,
"requires": { "requires": {
@@ -5700,7 +5858,7 @@
"dependencies": { "dependencies": {
"pify": { "pify": {
"version": "2.3.0", "version": "2.3.0",
"resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", "resolved": "http://registry.npmjs.org/pify/-/pify-2.3.0.tgz",
"integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=",
"dev": true "dev": true
}, },
@@ -6222,12 +6380,20 @@
"brorand": "^1.0.1" "brorand": "^1.0.1"
} }
}, },
"mime": { "mime-db": {
"version": "1.6.0", "version": "1.37.0",
"resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.37.0.tgz",
"integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", "integrity": "sha512-R3C4db6bgQhlIhPU48fUtdVmKnflq+hRdad7IyKhtFj06VPNVdk2RhiYL3UjQIlso8L+YxAtFkobT0VK+S/ybg==",
"dev": true
},
"mime-types": {
"version": "2.1.21",
"resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.21.tgz",
"integrity": "sha512-3iL6DbwpyLzjR3xHSFNFeb9Nz/M8WDkX33t1GFQnFOllWk8pOrh/LSrB5OXlnlW5P9LH73X6loW/eogc+F5lJg==",
"dev": true, "dev": true,
"optional": true "requires": {
"mime-db": "~1.37.0"
}
}, },
"mimic-fn": { "mimic-fn": {
"version": "1.2.0", "version": "1.2.0",
@@ -6393,13 +6559,6 @@
"to-regex": "^3.0.1" "to-regex": "^3.0.1"
} }
}, },
"native-request": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/native-request/-/native-request-1.1.0.tgz",
"integrity": "sha512-uZ5rQaeRn15XmpgE0xoPL8YWqcX90VtCFglYwAgkvKM5e8fog+vePLAhHxuuv/gRkrQxIeh5U3q9sMNUrENqWw==",
"dev": true,
"optional": true
},
"natural-compare": { "natural-compare": {
"version": "1.4.0", "version": "1.4.0",
"resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz",
@@ -6548,6 +6707,13 @@
"integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=",
"dev": true "dev": true
}, },
"oauth-sign": {
"version": "0.9.0",
"resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz",
"integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==",
"dev": true,
"optional": true
},
"object-assign": { "object-assign": {
"version": "4.1.1", "version": "4.1.1",
"resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
@@ -7117,7 +7283,7 @@
}, },
"chalk": { "chalk": {
"version": "1.1.3", "version": "1.1.3",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", "resolved": "http://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",
"integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=",
"dev": true, "dev": true,
"requires": { "requires": {
@@ -7315,6 +7481,16 @@
"integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==",
"dev": true "dev": true
}, },
"promise": {
"version": "7.3.1",
"resolved": "https://registry.npmjs.org/promise/-/promise-7.3.1.tgz",
"integrity": "sha512-nolQXZ/4L+bP/UGlkfaIujX9BKxGwmQ9OT4mOt5yvy8iK1h3wqTEJCijzGANTCCl9nWjY41juyAn2K3Q1hLLTg==",
"dev": true,
"optional": true,
"requires": {
"asap": "~2.0.3"
}
},
"promise-inflight": { "promise-inflight": {
"version": "1.0.1", "version": "1.0.1",
"resolved": "https://registry.npmjs.org/promise-inflight/-/promise-inflight-1.0.1.tgz", "resolved": "https://registry.npmjs.org/promise-inflight/-/promise-inflight-1.0.1.tgz",
@@ -7342,6 +7518,13 @@
"integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=", "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=",
"dev": true "dev": true
}, },
"psl": {
"version": "1.1.29",
"resolved": "https://registry.npmjs.org/psl/-/psl-1.1.29.tgz",
"integrity": "sha512-AeUmQ0oLN02flVHXWh9sSJF7mcdFq0ppid/JkErufc3hGIV/AMa8Fo9VgDo/cT2jFdOWoFvHp90qqBH54W+gjQ==",
"dev": true,
"optional": true
},
"public-encrypt": { "public-encrypt": {
"version": "4.0.3", "version": "4.0.3",
"resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.3.tgz", "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.3.tgz",
@@ -7383,6 +7566,13 @@
"integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==",
"dev": true "dev": true
}, },
"qs": {
"version": "6.5.2",
"resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz",
"integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==",
"dev": true,
"optional": true
},
"querystring": { "querystring": {
"version": "0.2.0", "version": "0.2.0",
"resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz",
@@ -7546,7 +7736,7 @@
}, },
"pify": { "pify": {
"version": "2.3.0", "version": "2.3.0",
"resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", "resolved": "http://registry.npmjs.org/pify/-/pify-2.3.0.tgz",
"integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=",
"dev": true "dev": true
}, },
@@ -7615,7 +7805,7 @@
}, },
"readable-stream": { "readable-stream": {
"version": "2.3.6", "version": "2.3.6",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz",
"integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==",
"dev": true, "dev": true,
"requires": { "requires": {
@@ -7744,7 +7934,7 @@
"dependencies": { "dependencies": {
"jsesc": { "jsesc": {
"version": "0.5.0", "version": "0.5.0",
"resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", "resolved": "http://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz",
"integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=", "integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=",
"dev": true "dev": true
} }
@@ -7862,6 +8052,35 @@
"remove-trailing-separator": "^1.1.0" "remove-trailing-separator": "^1.1.0"
} }
}, },
"request": {
"version": "2.88.0",
"resolved": "https://registry.npmjs.org/request/-/request-2.88.0.tgz",
"integrity": "sha512-NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg==",
"dev": true,
"optional": true,
"requires": {
"aws-sign2": "~0.7.0",
"aws4": "^1.8.0",
"caseless": "~0.12.0",
"combined-stream": "~1.0.6",
"extend": "~3.0.2",
"forever-agent": "~0.6.1",
"form-data": "~2.3.2",
"har-validator": "~5.1.0",
"http-signature": "~1.2.0",
"is-typedarray": "~1.0.0",
"isstream": "~0.1.2",
"json-stringify-safe": "~5.0.1",
"mime-types": "~2.1.19",
"oauth-sign": "~0.9.0",
"performance-now": "^2.1.0",
"qs": "~6.5.2",
"safe-buffer": "^5.1.2",
"tough-cookie": "~2.4.3",
"tunnel-agent": "^0.6.0",
"uuid": "^3.3.2"
}
},
"require-directory": { "require-directory": {
"version": "2.1.1", "version": "2.1.1",
"resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz",
@@ -8359,6 +8578,24 @@
"integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=",
"dev": true "dev": true
}, },
"sshpk": {
"version": "1.15.2",
"resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.15.2.tgz",
"integrity": "sha512-Ra/OXQtuh0/enyl4ETZAfTaeksa6BXks5ZcjpSUNrjBr0DvrJKX+1fsKDPpT9TBXgHAFsa4510aNVgI8g/+SzA==",
"dev": true,
"optional": true,
"requires": {
"asn1": "~0.2.3",
"assert-plus": "^1.0.0",
"bcrypt-pbkdf": "^1.0.0",
"dashdash": "^1.12.0",
"ecc-jsbn": "~0.1.1",
"getpass": "^0.1.1",
"jsbn": "~0.1.0",
"safer-buffer": "^2.0.2",
"tweetnacl": "~0.14.0"
}
},
"ssri": { "ssri": {
"version": "5.3.0", "version": "5.3.0",
"resolved": "https://registry.npmjs.org/ssri/-/ssri-5.3.0.tgz", "resolved": "https://registry.npmjs.org/ssri/-/ssri-5.3.0.tgz",
@@ -8507,7 +8744,7 @@
}, },
"strip-ansi": { "strip-ansi": {
"version": "3.0.1", "version": "3.0.1",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", "resolved": "http://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
"integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
"dev": true, "dev": true,
"requires": { "requires": {
@@ -8744,7 +8981,7 @@
}, },
"table": { "table": {
"version": "4.0.3", "version": "4.0.3",
"resolved": "https://registry.npmjs.org/table/-/table-4.0.3.tgz", "resolved": "http://registry.npmjs.org/table/-/table-4.0.3.tgz",
"integrity": "sha512-S7rnFITmBH1EnyKcvxBh1LjYeQMmnZtCXSEbHcH6S0NoKit24ZuFO/T1vDcLdYsLQkM188PVVhQmzKIuThNkKg==", "integrity": "sha512-S7rnFITmBH1EnyKcvxBh1LjYeQMmnZtCXSEbHcH6S0NoKit24ZuFO/T1vDcLdYsLQkM188PVVhQmzKIuThNkKg==",
"dev": true, "dev": true,
"requires": { "requires": {
@@ -8957,6 +9194,26 @@
"through2": "^2.0.3" "through2": "^2.0.3"
} }
}, },
"tough-cookie": {
"version": "2.4.3",
"resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.4.3.tgz",
"integrity": "sha512-Q5srk/4vDM54WJsJio3XNn6K2sCG+CQ8G5Wz6bZhRZoAe/+TxjWB/GlFAnYEbkYVlON9FMk/fE3h2RLpPXo4lQ==",
"dev": true,
"optional": true,
"requires": {
"psl": "^1.1.24",
"punycode": "^1.4.1"
},
"dependencies": {
"punycode": {
"version": "1.4.1",
"resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz",
"integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=",
"dev": true,
"optional": true
}
}
},
"trim": { "trim": {
"version": "0.0.1", "version": "0.0.1",
"resolved": "https://registry.npmjs.org/trim/-/trim-0.0.1.tgz", "resolved": "https://registry.npmjs.org/trim/-/trim-0.0.1.tgz",
@@ -8999,6 +9256,22 @@
"integrity": "sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY=", "integrity": "sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY=",
"dev": true "dev": true
}, },
"tunnel-agent": {
"version": "0.6.0",
"resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz",
"integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=",
"dev": true,
"optional": true,
"requires": {
"safe-buffer": "^5.0.1"
}
},
"tweetnacl": {
"version": "0.14.5",
"resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz",
"integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=",
"dev": true
},
"type-check": { "type-check": {
"version": "0.3.2", "version": "0.3.2",
"resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz",
@@ -9380,6 +9653,13 @@
"object.getownpropertydescriptors": "^2.0.3" "object.getownpropertydescriptors": "^2.0.3"
} }
}, },
"uuid": {
"version": "3.3.2",
"resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz",
"integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==",
"dev": true,
"optional": true
},
"v8flags": { "v8flags": {
"version": "3.1.1", "version": "3.1.1",
"resolved": "https://registry.npmjs.org/v8flags/-/v8flags-3.1.1.tgz", "resolved": "https://registry.npmjs.org/v8flags/-/v8flags-3.1.1.tgz",
@@ -9405,6 +9685,18 @@
"integrity": "sha1-HCQ6ULWVwb5Up1S/7OhWO5/42BM=", "integrity": "sha1-HCQ6ULWVwb5Up1S/7OhWO5/42BM=",
"dev": true "dev": true
}, },
"verror": {
"version": "1.10.0",
"resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz",
"integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=",
"dev": true,
"optional": true,
"requires": {
"assert-plus": "^1.0.0",
"core-util-is": "1.0.2",
"extsprintf": "^1.2.0"
}
},
"vfile": { "vfile": {
"version": "2.3.0", "version": "2.3.0",
"resolved": "https://registry.npmjs.org/vfile/-/vfile-2.3.0.tgz", "resolved": "https://registry.npmjs.org/vfile/-/vfile-2.3.0.tgz",

View File

@@ -1,5 +1,5 @@
{ {
"name": "@qlik/qlik-smart-pivot", "name": "qlik-smart-pivot",
"version": "0.0.1", "version": "0.0.1",
"description": "Profit & Loss reporting with color and font customizations.", "description": "Profit & Loss reporting with color and font customizations.",
"homepage": "", "homepage": "",
@@ -31,7 +31,7 @@
"gulp": "4.0.0", "gulp": "4.0.0",
"gulp-util": "^3.0.7", "gulp-util": "^3.0.7",
"gulp-zip": "3.0.2", "gulp-zip": "3.0.2",
"less": "3.13.1", "less": "3.8.1",
"less-loader": "4.1.0", "less-loader": "4.1.0",
"lodash.merge": "4.6.1", "lodash.merge": "4.6.1",
"style-loader": "0.23.1", "style-loader": "0.23.1",

View File

@@ -6,8 +6,15 @@ set -o errexit
echo "Verifying built file count" echo "Verifying built file count"
while read line; do
if [[ $line =~ ^\"name\": ]]; then
name=${line#*: \"}
name=${name%\"*}
fi
done < package.json
expected_file_count=$(($(find dist -type f | wc -l)-1)) expected_file_count=$(($(find dist -type f | wc -l)-1))
zip_file_count=$(zipinfo dist/qlik-smart-pivot_${VERSION}.zip | grep ^- | wc -l) zip_file_count=$(zipinfo dist/${name}_${VERSION}.zip | grep ^- | wc -l)
if [ "${expected_file_count}" -ne "${zip_file_count}" ]; then if [ "${expected_file_count}" -ne "${zip_file_count}" ]; then
# File count is incorrect # File count is incorrect

View File

@@ -1,16 +1,14 @@
/* eslint-disable react/sort-prop-types */
/* eslint-disable space-before-function-paren */
import React from 'react'; import React from 'react';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import Tooltip from '../tooltip/index.jsx'; import Tooltip from '../tooltip/index.jsx';
class DataCell extends React.PureComponent { class DataCell extends React.PureComponent {
constructor(props) { constructor (props) {
super(props); super(props);
this.handleSelect = this.handleSelect.bind(this); this.handleSelect = this.handleSelect.bind(this);
} }
handleSelect() { handleSelect () {
const { const {
data: { data: {
meta: { meta: {
@@ -28,14 +26,14 @@ class DataCell extends React.PureComponent {
if (!allowFilteringByClick) { if (!allowFilteringByClick) {
return; return;
} }
// fixes the console error on selection made from data cells
component.selectValues(0, [measurement.parents.dimension1.elementNumber], false); component.selectValues(0, [measurement.parents.dimension1.elementNumber], false);
if (hasSecondDimension) { if (hasSecondDimension) {
component.selectValues(1, [measurement.parents.dimension2.elementNumber], false); component.selectValues(1, [measurement.parents.dimension2.elementNumber], false);
} }
} }
render() { render () {
const { const {
cellWidth, cellWidth,
measurement, measurement,
@@ -43,9 +41,9 @@ class DataCell extends React.PureComponent {
styling styling
} = this.props; } = this.props;
const textAlignment = styling.options.textAlignment || 'Right'; let textAlignment = styling.options.textAlignment || 'Right';
const cellStyle = { let cellStyle = {
fontFamily: styling.options.fontFamily, fontFamily: styling.options.fontFamily,
...styleBuilder.getStyle(), ...styleBuilder.getStyle(),
paddingLeft: '5px', paddingLeft: '5px',
@@ -66,10 +64,10 @@ class DataCell extends React.PureComponent {
const { conditionalColoring } = styling; const { conditionalColoring } = styling;
if (conditionalColoring.enabled) { if (conditionalColoring.enabled) {
const isValidConditionalColoringValue = !styleBuilder.hasComments() && !isNaN(measurement.value); const isValidConditionalColoringValue = !styleBuilder.hasComments() && !isNaN(measurement.value);
const isSpecifiedRow const isSpecifiedRow =
= conditionalColoring.rows.indexOf(measurement.parents.dimension1.header) !== -1; conditionalColoring.rows.indexOf(measurement.parents.dimension1.header) !== -1;
const isSpecifiedMeasure const isSpecifiedMeasure =
= conditionalColoring.measures.indexOf(measurement.parents.measurement.index) !== -1; conditionalColoring.measures.indexOf(measurement.parents.measurement.index) !== -1;
const shouldHaveConditionalColoring = (conditionalColoring.colorAllRows || isSpecifiedRow) const shouldHaveConditionalColoring = (conditionalColoring.colorAllRows || isSpecifiedRow)
&& (conditionalColoring.colorAllMeasures || isSpecifiedMeasure); && (conditionalColoring.colorAllMeasures || isSpecifiedMeasure);
if (isValidConditionalColoringValue && shouldHaveConditionalColoring) { if (isValidConditionalColoringValue && shouldHaveConditionalColoring) {
@@ -114,7 +112,7 @@ DataCell.propTypes = {
}).isRequired, }).isRequired,
component: PropTypes.shape({ component: PropTypes.shape({
backendApi: PropTypes.shape({ backendApi: PropTypes.shape({
selectValues (props, propName) { selectValues: function (props, propName) {
if (props.isSnapshot || typeof props[propName] === 'function') { if (props.isSnapshot || typeof props[propName] === 'function') {
return null; return null;
} }
@@ -132,7 +130,7 @@ DataCell.propTypes = {
export default DataCell; export default DataCell;
function formatMeasurementValue(measurement, styling) { function formatMeasurementValue (measurement, styling) {
if (isNaN(measurement.value)) { if (isNaN(measurement.value)) {
return styling.symbolForNulls; return styling.symbolForNulls;
} }
@@ -140,7 +138,7 @@ function formatMeasurementValue(measurement, styling) {
return measurement.displayValue; return measurement.displayValue;
} }
function getConditionalColor(measurement, conditionalColoring) { function getConditionalColor (measurement, conditionalColoring) {
if (measurement.value < conditionalColoring.threshold.poor) { if (measurement.value < conditionalColoring.threshold.poor) {
return conditionalColoring.colors.poor; return conditionalColoring.colors.poor;
} }

View File

@@ -33,34 +33,27 @@ class DataTable extends React.PureComponent {
}; };
const renderMeasurementData = (dimIndex, atEvery) => { const renderMeasurementData = (dimIndex, atEvery) => {
const injectSeparatorsArray = injectSeparators(
matrix[dimIndex],
columnSeparatorWidth,
atEvery
);
if (dimension2.length <= 0) { if (dimension2.length <= 0) {
return injectSeparators( return injectSeparatorsArray;
matrix[dimIndex],
columnSeparatorWidth,
atEvery
);
} }
const measurementDataRow = []; const measurementDataRow = [];
let index = 0, let index = 0,
match; match;
dimension2.forEach(dim2 => { dimension2.forEach((dim2) => {
measurements.forEach((measure, mesInd) => { measurements.forEach((measure, mesInd) => {
for (index = 0; index < matrix[dimIndex].length; index++) { for (index = 0; index < injectSeparatorsArray.length; index++) {
match = false; match = false;
if ( if (injectSeparatorsArray[index].parents && dimension1[dimIndex].displayValue === injectSeparatorsArray[index].parents.dimension1.header) {
matrix[dimIndex][index].parents && if (dim2.displayValue === injectSeparatorsArray[index].parents.dimension2.header) {
dimension1[dimIndex].displayValue === if (measure.name === injectSeparatorsArray[index].parents.measurement.header) {
matrix[dimIndex][index].parents.dimension1.header measurementDataRow.push(injectSeparatorsArray[index]);
) {
if (
dim2.displayValue ===
matrix[dimIndex][index].parents.dimension2.header
) {
if (
measure.name ===
matrix[dimIndex][index].parents.measurement.header
) {
measurementDataRow.push(matrix[dimIndex][index]);
match = true; match = true;
break; break;
} }
@@ -69,7 +62,7 @@ class DataTable extends React.PureComponent {
} }
if (!match) { if (!match) {
measurementDataRow.push({ measurementDataRow.push({
displayValue: "", displayValue: '',
parents: { parents: {
dimension1: { dimension1: {
elementNumber: dimension1[dimIndex].elementNumber, elementNumber: dimension1[dimIndex].elementNumber,
@@ -88,14 +81,9 @@ class DataTable extends React.PureComponent {
} }
}); });
}); });
return injectSeparators( return measurementDataRow;
measurementDataRow,
columnSeparatorWidth,
atEvery
);
}; };
return ( return (
<div className="row-wrapper"> <div className="row-wrapper">
<table> <table>
@@ -121,7 +109,7 @@ class DataTable extends React.PureComponent {
}; };
return ( return (
<tr key={`${dimensionEntry.displayValue}-${dimensionIndex}-separator`}> <tr key={dimensionEntry.displayValue}>
{!renderData ? {!renderData ?
<RowHeader <RowHeader
component={component} component={component}
@@ -143,13 +131,15 @@ class DataTable extends React.PureComponent {
} }
// eslint-disable-next-line no-shadow // eslint-disable-next-line no-shadow
const { dimension1: dimension1Info, dimension2, measurement } = measurementData.parents;
const id = `${dimension1Info.elementNumber}-${dimension2 && dimension2.elementNumber}-${measurement.header}-${measurement.index}`;
return ( return (
<DataCell <DataCell
cellWidth={cellWidth} cellWidth={cellWidth}
component={component} component={component}
data={data} data={data}
general={general} general={general}
key={`${Math.random()}-${new Date().getTime()}`} key={`${dimensionEntry.displayValue}-${id}`}
measurement={measurementData} measurement={measurementData}
styleBuilder={styleBuilder} styleBuilder={styleBuilder}
styling={styling} styling={styling}

View File

@@ -10,7 +10,6 @@ class RowHeader extends React.PureComponent {
this.handleSelect = this.handleSelect.bind(this); this.handleSelect = this.handleSelect.bind(this);
} }
// fixes the console error on row selected values
handleSelect () { handleSelect () {
const { component, entry } = this.props; const { component, entry } = this.props;
component.selectValues(0, [entry.elementNumber], false); component.selectValues(0, [entry.elementNumber], false);
@@ -43,9 +42,13 @@ class RowHeader extends React.PureComponent {
} }
RowHeader.propTypes = { RowHeader.propTypes = {
entry: PropTypes.shape({
displayValue: PropTypes.string.isRequired,
elementNumber: PropTypes.number.isRequired
}).isRequired,
component: PropTypes.shape({ component: PropTypes.shape({
backendApi: PropTypes.shape({ backendApi: PropTypes.shape({
selectValues (props, propName) { selectValues: function (props, propName) {
if (props.isSnapshot || typeof props[propName] === 'function') { if (props.isSnapshot || typeof props[propName] === 'function') {
return null; return null;
} }
@@ -53,10 +56,6 @@ RowHeader.propTypes = {
} }
}).isRequired }).isRequired
}).isRequired, }).isRequired,
entry: PropTypes.shape({
displayValue: PropTypes.string.isRequired,
elementNumber: PropTypes.number.isRequired
}).isRequired,
rowStyle: PropTypes.shape({}).isRequired, rowStyle: PropTypes.shape({}).isRequired,
styleBuilder: PropTypes.shape({}).isRequired, styleBuilder: PropTypes.shape({}).isRequired,
styling: PropTypes.shape({}).isRequired styling: PropTypes.shape({}).isRequired

View File

@@ -86,6 +86,6 @@ export function initializeDesignList (component, layout) {
resolve(data); resolve(data);
}; };
stylingField.OnData.bind(listener); stylingField.OnData.bind(listener);
stylingField.getData({ rows: 5000 }); stylingField.getData();
}); });
} }

View File

@@ -1,23 +1,20 @@
/* eslint-disable object-shorthand */
/* eslint-disable space-before-function-paren */
import React from 'react'; import React from 'react';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import { HEADER_FONT_SIZE } from '../initialize-transformed'; import { HEADER_FONT_SIZE } from '../initialize-transformed';
import Tooltip from '../tooltip/index.jsx'; import Tooltip from '../tooltip/index.jsx';
class ColumnHeader extends React.PureComponent { class ColumnHeader extends React.PureComponent {
constructor(props) { constructor (props) {
super(props); super(props);
this.handleSelect = this.handleSelect.bind(this); this.handleSelect = this.handleSelect.bind(this);
} }
// fixes console error for column selected values handleSelect () {
handleSelect() {
const { component, entry } = this.props; const { component, entry } = this.props;
component.selectValues(1, [entry.elementNumber], false); component.selectValues(1, [entry.elementNumber], false);
} }
render() { render () {
const { baseCSS, cellWidth, colSpan, component, entry, styling } = this.props; const { baseCSS, cellWidth, colSpan, component, entry, styling } = this.props;
const inEditState = component.inEditState(); const inEditState = component.inEditState();
const isMediumFontSize = styling.headerOptions.fontSizeAdjustment === HEADER_FONT_SIZE.MEDIUM; const isMediumFontSize = styling.headerOptions.fontSizeAdjustment === HEADER_FONT_SIZE.MEDIUM;

View File

@@ -77,7 +77,7 @@ class HeadersTable extends React.PureComponent {
colSpan={measurements.length} colSpan={measurements.length}
component={component} component={component}
entry={entry} entry={entry}
key={`${entry.displayValue}-${index}-separator`} key={entry.displayValue}
styling={styling} styling={styling}
/> />
); );

View File

@@ -2,6 +2,7 @@ import definition from "./definition";
import { exportXLS } from "./excel-export"; import { exportXLS } from "./excel-export";
import { initializeDataCube, initializeDesignList } from "./dataset"; import { initializeDataCube, initializeDesignList } from "./dataset";
import initializeStore from "./store"; import initializeStore from "./store";
import qlik from "qlik";
import React from "react"; import React from "react";
import ReactDOM from "react-dom"; import ReactDOM from "react-dom";
import Root from "./root.jsx"; import Root from "./root.jsx";
@@ -12,7 +13,7 @@ if (!window._babelPolyfill) {
require("@babel/polyfill"); // eslint-disable-line global-require require("@babel/polyfill"); // eslint-disable-line global-require
} }
export default ({ flags }) => ({ export default {
design: { design: {
dimensions: { dimensions: {
max: 1, max: 1,
@@ -105,36 +106,29 @@ export default ({ flags }) => ({
return snapshotLayout; return snapshotLayout;
}, },
async getContextMenu (obj, menu) { async getContextMenu (obj, menu) {
if (!this.$scope.layout.allowexportxls) { const app = qlik.currApp(this);
const isPersonalResult = await app.global.isPersonalMode();
if (
!this.$scope.layout.allowexportxls ||
(isPersonalResult && isPersonalResult.qReturn)
) {
return menu; return menu;
} }
const app = this.backendApi.model.app; menu.addItem({
const isPersonalResult = await app.global.isPersonalMode(); translation: 'Export as XLS',
tid: 'export-excel',
// Export as XLS option is removed from desktop because the desktop wrapper blocks downloads. icon: 'export',
// Enabled for windows and QCS select: () => {
// isPersonalMode returns true for both desktop and QCS exportXLS(
// By checking both if has download dialog and if is QCS can enable Export as XLS option on QCS this.$element,
if ( this.$scope.layout.title,
(this.backendApi.model.layout.qMeta.privileges.includes('exportdata') && !isPersonalResult) || this.$scope.layout.subtitle,
(flags.isEnabled('DOWNLOAD_USE_REPORTING') && isPersonalResult) this.$scope.layout.footnote
) { );
menu.addItem({ }
translation: 'Export as XLS', });
tid: 'export-excel',
icon: 'export',
select: () => {
exportXLS(
this.$element,
this.$scope.layout.title,
this.$scope.layout.subtitle,
this.$scope.layout.footnote
);
}
});
}
return menu; return menu;
}, },
version: 1.0 version: 1.0
}); };

View File

@@ -1,55 +1,50 @@
import { distinctArray } from "./utilities"; import { distinctArray } from './utilities';
export const HEADER_FONT_SIZE = { export const HEADER_FONT_SIZE = {
SMALL: -1, SMALL: -1,
MEDIUM: 1, MEDIUM: 1
}; };
function getAlignment(option) { function getAlignment (option) {
const alignmentOptions = { const alignmentOptions = {
1: "left", 1: 'left',
2: "center", 2: 'center',
3: "right", 3: 'right'
}; };
return alignmentOptions[option] || "left"; return alignmentOptions[option] || 'left';
} }
function getFontSizeAdjustment(option) { function getFontSizeAdjustment (option) {
const fontSizeAdjustmentOptions = { const fontSizeAdjustmentOptions = {
1: HEADER_FONT_SIZE.SMALL, 1: HEADER_FONT_SIZE.SMALL,
2: HEADER_FONT_SIZE.MEDIUM, 2: HEADER_FONT_SIZE.MEDIUM
}; };
return fontSizeAdjustmentOptions[option] || 0; return fontSizeAdjustmentOptions[option] || 0;
} }
function generateMeasurements(information) { function generateMeasurements (information) {
return information.map((measurement) => { return information.map(measurement => {
const transformedMeasurement = { const transformedMeasurement = {
format: measurement.qNumFormat.qFmt || "#.##0", format: measurement.qNumFormat.qFmt || '#.##0',
name: measurement.qFallbackTitle, name: measurement.qFallbackTitle
}; };
return transformedMeasurement; return transformedMeasurement;
}); });
} }
function generateDimensionEntry(information, data) { function generateDimensionEntry (information, data) {
return { return {
displayValue: data.qText || data.qNum, displayValue: data.qText || data.qNum,
elementNumber: data.qElemNumber, elementNumber: data.qElemNumber,
name: information.qFallbackTitle, name: information.qFallbackTitle,
value: data.qNum, value: data.qNum
}; };
} }
function generateMatrixCell({ function generateMatrixCell ({ cell, dimension1Information, dimension2Information, measurementInformation }) {
cell,
dimension1Information,
dimension2Information,
measurementInformation,
}) {
const matrixCell = { const matrixCell = {
displayValue: cell.qText, displayValue: cell.qText,
format: measurementInformation.format, format: measurementInformation.format,
@@ -57,32 +52,28 @@ function generateMatrixCell({
parents: { parents: {
dimension1: { dimension1: {
elementNumber: dimension1Information.qElemNumber, elementNumber: dimension1Information.qElemNumber,
header: dimension1Information.qText, header: dimension1Information.qText
}, },
measurement: { measurement: {
header: measurementInformation.name, header: measurementInformation.name,
index: measurementInformation.index, index: measurementInformation.index
}, }
}, },
value: cell.qNum, value: cell.qNum
}; };
if (dimension2Information) { if (dimension2Information) {
matrixCell.parents.dimension2 = { matrixCell.parents.dimension2 = {
elementNumber: dimension2Information.qElemNumber, elementNumber: dimension2Information.qElemNumber,
header: dimension2Information.qText, header: dimension2Information.qText
}; };
} }
return matrixCell; return matrixCell;
} }
function generateDataSet(
component, function generateDataSet (component, dimensionsInformation, measurementsInformation, dataCube) {
dimensionsInformation,
measurementsInformation,
dataCube
) {
const measurements = generateMeasurements(measurementsInformation); const measurements = generateMeasurements(measurementsInformation);
let dimension1 = []; let dimension1 = [];
let dimension2 = []; let dimension2 = [];
@@ -92,19 +83,13 @@ function generateDataSet(
// eslint-disable-next-line no-undefined // eslint-disable-next-line no-undefined
for (let index = 0; dataCube[index] !== undefined; index++) { for (let index = 0; dataCube[index] !== undefined; index++) {
// eslint-disable-next-line no-loop-func // eslint-disable-next-line no-loop-func
dataCube[index].forEach((row) => { dataCube[index].forEach(row => {
const dimension1Entry = generateDimensionEntry( const dimension1Entry = generateDimensionEntry(dimensionsInformation[0], row[0]);
dimensionsInformation[0],
row[0]
);
dimension1.push(dimension1Entry); dimension1.push(dimension1Entry);
let dimension2Entry; let dimension2Entry;
let firstDataCell = 1; let firstDataCell = 1;
if (hasSecondDimension) { if (hasSecondDimension) {
dimension2Entry = generateDimensionEntry( dimension2Entry = generateDimensionEntry(dimensionsInformation[1], row[1]);
dimensionsInformation[1],
row[1]
);
dimension2.push(dimension2Entry); dimension2.push(dimension2Entry);
firstDataCell = 2; firstDataCell = 2;
} }
@@ -119,19 +104,16 @@ function generateDataSet(
cell, cell,
dimension1Information, dimension1Information,
dimension2Information, dimension2Information,
measurementInformation, measurementInformation
}); });
return generatedCell; return generatedCell;
}); });
let appendToRowIndex = matrix.length; let appendToRowIndex = matrix.length;
if (hasSecondDimension) { if (hasSecondDimension) {
// See if there already is a row for the current dim1 // See if there already is a row for the current dim1
for (let i = 0; i < matrix.length; i++) { for (let i = 0; i < matrix.length; i++) {
if ( if (matrix[i][0].parents.dimension1.header === matrixRow[0].parents.dimension1.header) {
matrix[i][0].parents.dimension1.header ===
matrixRow[0].parents.dimension1.header
) {
appendToRowIndex = i; appendToRowIndex = i;
matrixRow = matrix[i].concat(matrixRow); matrixRow = matrix[i].concat(matrixRow);
} }
@@ -149,44 +131,34 @@ function generateDataSet(
dimension1: dimension1, dimension1: dimension1,
dimension2: dimension2, dimension2: dimension2,
matrix, matrix,
measurements, measurements
}; };
} }
function initializeTransformed({ function initializeTransformed ({ component, dataCube, designList, layout }) {
$element,
component,
dataCube,
designList,
layout,
}) {
const dimensionsInformation = component.backendApi.getDimensionInfos(); const dimensionsInformation = component.backendApi.getDimensionInfos();
const measurementsInformation = component.backendApi.getMeasureInfos(); const measurementsInformation = component.backendApi.getMeasureInfos();
const dimensionCount = layout.qHyperCube.qDimensionInfo.length; const dimensionCount = layout.qHyperCube.qDimensionInfo.length;
const { dimension1, dimension2, measurements, matrix } = generateDataSet( const {
component, dimension1,
dimensionsInformation, dimension2,
measurementsInformation, measurements,
dataCube matrix
); } = generateDataSet(component, dimensionsInformation, measurementsInformation, dataCube);
const customSchemaBasic = []; const customSchemaBasic = [];
const customSchemaFull = []; const customSchemaFull = [];
let customHeadersCount = 0; let customHeadersCount = 0;
if (designList && designList.length > 0) { if (designList && designList.length > 0) {
const headers = designList[0].split(";"); const headers = designList[0].split(';');
customHeadersCount = headers.length; customHeadersCount = headers.length;
for (let lineNumber = 0; lineNumber < designList.length; lineNumber += 1) { for (let lineNumber = 0; lineNumber < designList.length; lineNumber += 1) {
customSchemaFull[lineNumber] = new Array(headers.length); customSchemaFull[lineNumber] = new Array(headers.length);
const data = designList[lineNumber].split(";"); const data = designList[lineNumber].split(';');
if (data.length === headers.length) { if (data.length === headers.length) {
for ( for (let headerIndex = 0; headerIndex < headers.length; headerIndex += 1) {
let headerIndex = 0;
headerIndex < headers.length;
headerIndex += 1
) {
[customSchemaBasic[lineNumber]] = data; [customSchemaBasic[lineNumber]] = data;
customSchemaFull[lineNumber][headerIndex] = data[headerIndex]; customSchemaFull[lineNumber][headerIndex] = data[headerIndex];
} }
@@ -200,28 +172,25 @@ function initializeTransformed({
// the widths as percentages of the available width. However, this often results in random // the widths as percentages of the available width. However, this often results in random
// columns getting 1px wider than the others because of rounding necessary to fill the width. // columns getting 1px wider than the others because of rounding necessary to fill the width.
// This 1px causes missalignment between the data- and header tables. // This 1px causes missalignment between the data- and header tables.
cellWidth = ""; cellWidth = '';
} else { } else {
// If using the previous solution just set 60px // If using the previous solution just set 60px
cellWidth = `${ cellWidth = `${layout.columnwidthslider > 10 ? layout.columnwidthslider : 60}px`;
layout.columnwidthslider > 10 ? layout.columnwidthslider : 60
}px`;
} }
// top level properties could be reducers and then components connect to grab what they want, // top level properties could be reducers and then components connect to grab what they want,
// possibly with reselect for some presentational transforms (moving some of the presentational logic like formatting and such) // possibly with reselect for some presentational transforms (moving some of the presentational logic like formatting and such)
const transformedProperties = { const transformedProperties = {
element: $element[0],
data: { data: {
headers: { headers: {
dimension1, // column headers dimension1, // column headers
dimension2, // parent row headers if exists dimension2, // parent row headers if exists
measurements, // row headers, looped for each dimension2 if exists measurements // row headers, looped for each dimension2 if exists
}, },
matrix, // 2d array of all rows/cells to render in body of datatable matrix, // 2d array of all rows/cells to render in body of datatable
meta: { meta: {
dimensionCount: dimensionsInformation.length, dimensionCount: dimensionsInformation.length
}, }
}, },
general: { general: {
allowExcelExport: layout.allowexportxls, allowExcelExport: layout.allowexportxls,
@@ -231,25 +200,23 @@ function initializeTransformed({
footnote: layout.footnote, footnote: layout.footnote,
subtitle: layout.subtitle, subtitle: layout.subtitle,
title: layout.title, title: layout.title,
useColumnSeparator: layout.separatorcols && dimensionCount > 1, useColumnSeparator: layout.separatorcols && dimensionCount > 1
}, },
selection: { selection: {
dimensionSelectionCounts: dimensionsInformation.map( dimensionSelectionCounts: dimensionsInformation.map(dimensionInfo => dimensionInfo.qStateCounts.qSelected)
(dimensionInfo) => dimensionInfo.qStateCounts.qSelected
),
}, },
styling: { styling: {
customCSV: { customCSV: {
basic: customSchemaBasic, basic: customSchemaBasic,
count: customHeadersCount, count: customHeadersCount,
full: customSchemaFull, full: customSchemaFull
}, },
hasCustomFileStyle: Boolean(designList), hasCustomFileStyle: Boolean(designList),
headerOptions: { headerOptions: {
alignment: getAlignment(layout.HeaderAlign), alignment: getAlignment(layout.HeaderAlign),
colorSchema: layout.HeaderColorSchema.color, colorSchema: layout.HeaderColorSchema.color,
fontSizeAdjustment: getFontSizeAdjustment(layout.lettersizeheader), fontSizeAdjustment: getFontSizeAdjustment(layout.lettersizeheader),
textColor: layout.HeaderTextColorSchema.color, textColor: layout.HeaderTextColorSchema.color
}, },
options: { options: {
backgroundColor: layout.rowEvenBGColor, backgroundColor: layout.rowEvenBGColor,
@@ -257,42 +224,38 @@ function initializeTransformed({
color: layout.BodyTextColorSchema, color: layout.BodyTextColorSchema,
fontFamily: layout.FontFamily, fontFamily: layout.FontFamily,
fontSizeAdjustment: getFontSizeAdjustment(layout.lettersize), fontSizeAdjustment: getFontSizeAdjustment(layout.lettersize),
textAlignment: layout.cellTextAlignment, textAlignment: layout.cellTextAlignment
}, },
conditionalColoring: { conditionalColoring: {
enabled: layout.conditionalcoloring.enabled, enabled: layout.conditionalcoloring.enabled,
colorAllRows: layout.conditionalcoloring.colorall, colorAllRows: layout.conditionalcoloring.colorall,
rows: layout.conditionalcoloring.rows.map((row) => row.rowname), rows: layout.conditionalcoloring.rows.map(row => row.rowname),
colorAllMeasures: colorAllMeasures: typeof layout.conditionalcoloring.colorallmeasures === 'undefined'
typeof layout.conditionalcoloring.colorallmeasures === "undefined" || || layout.conditionalcoloring.colorallmeasures,
layout.conditionalcoloring.colorallmeasures,
measures: !layout.conditionalcoloring.measures measures: !layout.conditionalcoloring.measures
? [] ? [] : layout.conditionalcoloring.measures.split(',').map(index => Number(index)),
: layout.conditionalcoloring.measures
.split(",")
.map((index) => Number(index)),
threshold: { threshold: {
poor: layout.conditionalcoloring.threshold_poor, poor: layout.conditionalcoloring.threshold_poor,
fair: layout.conditionalcoloring.threshold_fair, fair: layout.conditionalcoloring.threshold_fair
}, },
colors: { colors: {
poor: { poor: {
color: layout.conditionalcoloring.color_poor, color: layout.conditionalcoloring.color_poor,
textColor: layout.conditionalcoloring.textcolor_poor, textColor: layout.conditionalcoloring.textcolor_poor
}, },
fair: { fair: {
color: layout.conditionalcoloring.color_fair, color: layout.conditionalcoloring.color_fair,
textColor: layout.conditionalcoloring.textcolor_fair, textColor: layout.conditionalcoloring.textcolor_fair
}, },
good: { good: {
color: layout.conditionalcoloring.color_good, color: layout.conditionalcoloring.color_good,
textColor: layout.conditionalcoloring.textcolor_good, textColor: layout.conditionalcoloring.textcolor_good
}, }
}, }
}, },
symbolForNulls: layout.symbolfornulls, symbolForNulls: layout.symbolfornulls,
usePadding: layout.indentbool, usePadding: layout.indentbool
}, }
}; };
return transformedProperties; return transformedProperties;

View File

@@ -5,15 +5,37 @@ import DataTable from "./data-table/index.jsx";
import { LinkedScrollWrapper, LinkedScrollSection } from "./linked-scroll"; import { LinkedScrollWrapper, LinkedScrollSection } from "./linked-scroll";
class Root extends React.PureComponent { class Root extends React.PureComponent {
constructor (props) {
super(props);
this.onDataTableRefSet = this.onDataTableRefSet.bind(this);
this.renderedTableWidth = 0;
}
componentDidUpdate () {
let tableWidth;
if (this.dataTableRef) {
tableWidth = this.dataTableRef.getBoundingClientRect().width;
if (this.renderedTableWidth !== tableWidth) {
this.forceUpdate();
}
}
}
onDataTableRefSet (element) {
this.dataTableRef = element;
this.forceUpdate();
}
render () { render () {
const { editmodeClass, component, state } = this.props; const { editmodeClass, component, state } = this.props;
const { data, general, styling, error, element } = state; const { data, general, styling, error } = state;
// Determine cell- and column separator width // Determine cell- and column separator width
let cellWidth = '0px'; let cellWidth = '0px';
let columnSeparatorWidth = ''; let columnSeparatorWidth = '';
if (!error && element) { if (this.dataTableRef) {
const tableWidth = element.getBoundingClientRect().width; const tableWidth = this.dataTableRef.getBoundingClientRect().width;
this.renderedTableWidth = tableWidth;
if (general.cellWidth) { if (general.cellWidth) {
cellWidth = general.cellWidth; cellWidth = general.cellWidth;
@@ -21,8 +43,7 @@ class Root extends React.PureComponent {
columnSeparatorWidth = '8px'; columnSeparatorWidth = '8px';
} }
} else { } else {
// 230 is the left "header", rest is magic margins const headerMarginRight = 8;
const headerMarginRight = 8 + 230 + 20;
const borderWidth = 1; const borderWidth = 1;
const rowCellCount = data.matrix[0].length; const rowCellCount = data.matrix[0].length;
@@ -78,6 +99,7 @@ class Root extends React.PureComponent {
<div <div
className={`data-table ${editmodeClass}`} className={`data-table ${editmodeClass}`}
style={{ width: general.cellWidth ? 'auto' : '100%' }} style={{ width: general.cellWidth ? 'auto' : '100%' }}
ref={this.onDataTableRefSet}
> >
<LinkedScrollSection linkHorizontal> <LinkedScrollSection linkHorizontal>
<HeadersTable <HeadersTable

View File

@@ -3,72 +3,76 @@ const packageJSON = require('./package.json');
const path = require('path'); const path = require('path');
const DIST = path.resolve("./dist"); const DIST = path.resolve("./dist");
// eslint-disable-next-line no-process-env
const MODE = process.env.NODE_ENV || 'development'; const MODE = process.env.NODE_ENV || 'development';
const SOURCE_MAP = 'source-map';
const DEVTOOL = MODE === 'development' ? SOURCE_MAP : false;
console.log('Webpack mode:', MODE); // eslint-disable-line no-console console.log('Webpack mode:', MODE); // eslint-disable-line no-console
const config = { const config = {
devtool: DEVTOOL, devtool: 'source-map',
entry: ["./src/index.js"], entry: ['./src/index.js'],
externals: { externals: {
jquery: { jquery: {
amd: "jquery", amd: 'jquery',
commonjs: "jquery", commonjs: 'jquery',
commonjs2: "jquery", commonjs2: 'jquery',
root: "_", root: '_'
}, },
qlik: { qlik: {
amd: "qlik", amd: 'qlik',
commonjs: "qlik", commonjs: 'qlik',
commonjs2: "qlik", commonjs2: 'qlik',
root: "_", root: '_'
}, }
}, },
mode: MODE, mode: MODE,
module: { module: {
rules: [ rules: [
{ {
enforce: "pre", enforce: 'pre',
exclude: /(node_modules|Library)/, exclude: /(node_modules|Library)/,
loader: "eslint-loader", loader: 'eslint-loader',
options: { options: {
failOnError: true, failOnError: true
}, },
test: /\.(js|jsx)$/, test: /\.(js|jsx)$/
}, },
{ {
exclude: /node_modules/, exclude: /node_modules/,
test: /\.(js|jsx)$/, test: /\.(js|jsx)$/,
use: { use: {
loader: "babel-loader", loader: 'babel-loader',
options: { options: {
plugins: [ plugins: [
"@babel/plugin-transform-async-to-generator", '@babel/plugin-transform-async-to-generator',
"@babel/plugin-proposal-class-properties", '@babel/plugin-proposal-class-properties'
], ],
presets: ["@babel/preset-env", "@babel/preset-react"], presets: [
}, '@babel/preset-env',
}, '@babel/preset-react'
]
}
}
}, },
{ {
test: /.less$/, test: /.less$/,
use: ["style-loader", "css-loader", "less-loader"], use: [
}, 'style-loader',
], 'css-loader',
'less-loader'
]
}
]
}, },
output: { output: {
filename: "qlik-smart-pivot.js", filename: `${packageJSON.name}.js`,
libraryTarget: "amd", libraryTarget: 'amd',
path: DIST, path: DIST
}, },
plugins: [ plugins: [
new StyleLintPlugin({ new StyleLintPlugin({
files: "**/*.less", files: '**/*.less'
}), })
], ]
}; };
module.exports = config; module.exports = config;

7448
yarn.lock Normal file

File diff suppressed because it is too large Load Diff