fix: ES6 modules dependencies

This commit is contained in:
jblemee 2019-01-07 16:37:08 +01:00
parent d17fc74fb6
commit 8e5371115f
6 changed files with 383 additions and 266 deletions

View File

@ -1,12 +1,3 @@
{ {
"presets": [
[
"@babel/preset-env",
{
"targets": {
"browsers": ["last 1 years"]
}
}
]
]
} }

392
package-lock.json generated
View File

@ -709,6 +709,166 @@
"semver": "^5.3.0" "semver": "^5.3.0"
} }
}, },
"@babel/preset-es2016": {
"version": "7.0.0-beta.53",
"resolved": "https://registry.npmjs.org/@babel/preset-es2016/-/preset-es2016-7.0.0-beta.53.tgz",
"integrity": "sha1-pHMhHG9jybkDoWFiFxiIq2g8iu0=",
"requires": {
"@babel/helper-plugin-utils": "7.0.0-beta.53",
"@babel/plugin-transform-exponentiation-operator": "7.0.0-beta.53"
},
"dependencies": {
"@babel/code-frame": {
"version": "7.0.0-beta.53",
"resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.0.0-beta.53.tgz",
"integrity": "sha1-mA0VYLhjV1v1o3eSUDfgEy71kh4=",
"requires": {
"@babel/highlight": "7.0.0-beta.53"
}
},
"@babel/generator": {
"version": "7.0.0-beta.53",
"resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.0.0-beta.53.tgz",
"integrity": "sha1-uMrXLFcr4yNK/94ivm2sxCUOA0s=",
"requires": {
"@babel/types": "7.0.0-beta.53",
"jsesc": "^2.5.1",
"lodash": "^4.17.5",
"source-map": "^0.5.0",
"trim-right": "^1.0.1"
}
},
"@babel/helper-builder-binary-assignment-operator-visitor": {
"version": "7.0.0-beta.53",
"resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.0.0-beta.53.tgz",
"integrity": "sha1-RFZwliPX2vqivulPglUD9MDs6Fs=",
"requires": {
"@babel/helper-explode-assignable-expression": "7.0.0-beta.53",
"@babel/types": "7.0.0-beta.53"
}
},
"@babel/helper-explode-assignable-expression": {
"version": "7.0.0-beta.53",
"resolved": "https://registry.npmjs.org/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.0.0-beta.53.tgz",
"integrity": "sha1-1bytK2tH9ATAruillk3/2TEkc6g=",
"requires": {
"@babel/traverse": "7.0.0-beta.53",
"@babel/types": "7.0.0-beta.53"
}
},
"@babel/helper-function-name": {
"version": "7.0.0-beta.53",
"resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.0.0-beta.53.tgz",
"integrity": "sha1-USgEro6cvOVDHr6hnkdijC7WU/I=",
"requires": {
"@babel/helper-get-function-arity": "7.0.0-beta.53",
"@babel/template": "7.0.0-beta.53",
"@babel/types": "7.0.0-beta.53"
}
},
"@babel/helper-get-function-arity": {
"version": "7.0.0-beta.53",
"resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.0.0-beta.53.tgz",
"integrity": "sha1-3tiKsp+bHbYch9G7jTijXdp3neY=",
"requires": {
"@babel/types": "7.0.0-beta.53"
}
},
"@babel/helper-plugin-utils": {
"version": "7.0.0-beta.53",
"resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.0.0-beta.53.tgz",
"integrity": "sha1-1kRYY2/8JYtCcUqd2Trrb4uM8+0="
},
"@babel/helper-split-export-declaration": {
"version": "7.0.0-beta.53",
"resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.0.0-beta.53.tgz",
"integrity": "sha1-rvVLix+ZYW6jfJhHhxajeAJjMls=",
"requires": {
"@babel/types": "7.0.0-beta.53"
}
},
"@babel/highlight": {
"version": "7.0.0-beta.53",
"resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.0.0-beta.53.tgz",
"integrity": "sha1-9OlS2tF4fSBeGI0+OEzc5JyjaPs=",
"requires": {
"chalk": "^2.0.0",
"esutils": "^2.0.2",
"js-tokens": "^3.0.0"
}
},
"@babel/parser": {
"version": "7.0.0-beta.53",
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.0.0-beta.53.tgz",
"integrity": "sha1-H0XrYXv5Rj1IKywE00nZ5O2/SJI="
},
"@babel/plugin-transform-exponentiation-operator": {
"version": "7.0.0-beta.53",
"resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.0.0-beta.53.tgz",
"integrity": "sha1-PiZxeSBMd1GdhBepsZnyUiIejZU=",
"requires": {
"@babel/helper-builder-binary-assignment-operator-visitor": "7.0.0-beta.53",
"@babel/helper-plugin-utils": "7.0.0-beta.53"
}
},
"@babel/template": {
"version": "7.0.0-beta.53",
"resolved": "https://registry.npmjs.org/@babel/template/-/template-7.0.0-beta.53.tgz",
"integrity": "sha1-MyIpCQDQsYewpxdDgeHzu3EFDS4=",
"requires": {
"@babel/code-frame": "7.0.0-beta.53",
"@babel/parser": "7.0.0-beta.53",
"@babel/types": "7.0.0-beta.53",
"lodash": "^4.17.5"
}
},
"@babel/traverse": {
"version": "7.0.0-beta.53",
"resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.0.0-beta.53.tgz",
"integrity": "sha1-ANMs2NC1j0wB0xFXvmIsZigm00Q=",
"requires": {
"@babel/code-frame": "7.0.0-beta.53",
"@babel/generator": "7.0.0-beta.53",
"@babel/helper-function-name": "7.0.0-beta.53",
"@babel/helper-split-export-declaration": "7.0.0-beta.53",
"@babel/parser": "7.0.0-beta.53",
"@babel/types": "7.0.0-beta.53",
"debug": "^3.1.0",
"globals": "^11.1.0",
"invariant": "^2.2.0",
"lodash": "^4.17.5"
}
},
"@babel/types": {
"version": "7.0.0-beta.53",
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.0.0-beta.53.tgz",
"integrity": "sha1-GaRhwNpRVZXftnQLS0Xce7Dms3U=",
"requires": {
"esutils": "^2.0.2",
"lodash": "^4.17.5",
"to-fast-properties": "^2.0.0"
}
},
"debug": {
"version": "3.2.6",
"resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz",
"integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==",
"requires": {
"ms": "^2.1.1"
}
},
"js-tokens": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz",
"integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls="
},
"ms": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz",
"integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg=="
}
}
},
"@babel/template": { "@babel/template": {
"version": "7.1.0", "version": "7.1.0",
"resolved": "https://registry.npmjs.org/@babel/template/-/template-7.1.0.tgz", "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.1.0.tgz",
@ -885,7 +1045,6 @@
"version": "3.2.1", "version": "3.2.1",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
"integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
"dev": true,
"requires": { "requires": {
"color-convert": "^1.9.0" "color-convert": "^1.9.0"
} }
@ -1616,7 +1775,6 @@
"version": "2.4.1", "version": "2.4.1",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz",
"integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==",
"dev": true,
"requires": { "requires": {
"ansi-styles": "^3.2.1", "ansi-styles": "^3.2.1",
"escape-string-regexp": "^1.0.5", "escape-string-regexp": "^1.0.5",
@ -1731,7 +1889,6 @@
"version": "1.9.3", "version": "1.9.3",
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
"integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",
"dev": true,
"requires": { "requires": {
"color-name": "1.1.3" "color-name": "1.1.3"
} }
@ -1739,8 +1896,7 @@
"color-name": { "color-name": {
"version": "1.1.3", "version": "1.1.3",
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
"integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU="
"dev": true
}, },
"combined-stream": { "combined-stream": {
"version": "1.0.7", "version": "1.0.7",
@ -2126,14 +2282,12 @@
"escape-string-regexp": { "escape-string-regexp": {
"version": "1.0.5", "version": "1.0.5",
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
"integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ="
"dev": true
}, },
"esutils": { "esutils": {
"version": "2.0.2", "version": "2.0.2",
"resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz",
"integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=", "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs="
"dev": true
}, },
"etag": { "etag": {
"version": "1.8.1", "version": "1.8.1",
@ -2597,8 +2751,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",
@ -2612,23 +2765,21 @@
"dev": true, "dev": true,
"optional": true, "optional": true,
"requires": { "requires": {
"delegates": "1.0.0", "delegates": "^1.0.0",
"readable-stream": "2.3.6" "readable-stream": "^2.0.6"
} }
}, },
"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"
} }
}, },
@ -2641,20 +2792,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",
@ -2695,7 +2843,7 @@
"dev": true, "dev": true,
"optional": true, "optional": true,
"requires": { "requires": {
"minipass": "2.2.4" "minipass": "^2.2.1"
} }
}, },
"fs.realpath": { "fs.realpath": {
@ -2710,14 +2858,14 @@
"dev": true, "dev": true,
"optional": true, "optional": true,
"requires": { "requires": {
"aproba": "1.2.0", "aproba": "^1.0.3",
"console-control-strings": "1.1.0", "console-control-strings": "^1.0.0",
"has-unicode": "2.0.1", "has-unicode": "^2.0.0",
"object-assign": "4.1.1", "object-assign": "^4.1.0",
"signal-exit": "3.0.2", "signal-exit": "^3.0.0",
"string-width": "1.0.2", "string-width": "^1.0.1",
"strip-ansi": "3.0.1", "strip-ansi": "^3.0.1",
"wide-align": "1.1.2" "wide-align": "^1.1.0"
} }
}, },
"glob": { "glob": {
@ -2726,12 +2874,12 @@
"dev": true, "dev": true,
"optional": true, "optional": true,
"requires": { "requires": {
"fs.realpath": "1.0.0", "fs.realpath": "^1.0.0",
"inflight": "1.0.6", "inflight": "^1.0.4",
"inherits": "2.0.3", "inherits": "2",
"minimatch": "3.0.4", "minimatch": "^3.0.4",
"once": "1.4.0", "once": "^1.3.0",
"path-is-absolute": "1.0.1" "path-is-absolute": "^1.0.0"
} }
}, },
"has-unicode": { "has-unicode": {
@ -2746,7 +2894,7 @@
"dev": true, "dev": true,
"optional": true, "optional": true,
"requires": { "requires": {
"safer-buffer": "2.1.2" "safer-buffer": "^2.1.0"
} }
}, },
"ignore-walk": { "ignore-walk": {
@ -2755,7 +2903,7 @@
"dev": true, "dev": true,
"optional": true, "optional": true,
"requires": { "requires": {
"minimatch": "3.0.4" "minimatch": "^3.0.4"
} }
}, },
"inflight": { "inflight": {
@ -2764,15 +2912,14 @@
"dev": true, "dev": true,
"optional": true, "optional": true,
"requires": { "requires": {
"once": "1.4.0", "once": "^1.3.0",
"wrappy": "1.0.2" "wrappy": "1"
} }
}, },
"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",
@ -2784,9 +2931,8 @@
"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.1" "number-is-nan": "^1.0.0"
} }
}, },
"isarray": { "isarray": {
@ -2799,25 +2945,22 @@
"version": "3.0.4", "version": "3.0.4",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"brace-expansion": "1.1.11" "brace-expansion": "^1.1.7"
} }
}, },
"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.2" "yallist": "^3.0.0"
} }
}, },
"minizlib": { "minizlib": {
@ -2826,14 +2969,13 @@
"dev": true, "dev": true,
"optional": true, "optional": true,
"requires": { "requires": {
"minipass": "2.2.4" "minipass": "^2.2.1"
} }
}, },
"mkdirp": { "mkdirp": {
"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"
} }
@ -2850,9 +2992,9 @@
"dev": true, "dev": true,
"optional": true, "optional": true,
"requires": { "requires": {
"debug": "2.6.9", "debug": "^2.1.2",
"iconv-lite": "0.4.21", "iconv-lite": "^0.4.4",
"sax": "1.2.4" "sax": "^1.2.4"
} }
}, },
"node-pre-gyp": { "node-pre-gyp": {
@ -2861,16 +3003,16 @@
"dev": true, "dev": true,
"optional": true, "optional": true,
"requires": { "requires": {
"detect-libc": "1.0.3", "detect-libc": "^1.0.2",
"mkdirp": "0.5.1", "mkdirp": "^0.5.1",
"needle": "2.2.0", "needle": "^2.2.0",
"nopt": "4.0.1", "nopt": "^4.0.1",
"npm-packlist": "1.1.10", "npm-packlist": "^1.1.6",
"npmlog": "4.1.2", "npmlog": "^4.0.2",
"rc": "1.2.7", "rc": "^1.1.7",
"rimraf": "2.6.2", "rimraf": "^2.6.1",
"semver": "5.5.0", "semver": "^5.3.0",
"tar": "4.4.1" "tar": "^4"
} }
}, },
"nopt": { "nopt": {
@ -2879,8 +3021,8 @@
"dev": true, "dev": true,
"optional": true, "optional": true,
"requires": { "requires": {
"abbrev": "1.1.1", "abbrev": "1",
"osenv": "0.1.5" "osenv": "^0.1.4"
} }
}, },
"npm-bundled": { "npm-bundled": {
@ -2895,8 +3037,8 @@
"dev": true, "dev": true,
"optional": true, "optional": true,
"requires": { "requires": {
"ignore-walk": "3.0.1", "ignore-walk": "^3.0.1",
"npm-bundled": "1.0.3" "npm-bundled": "^1.0.1"
} }
}, },
"npmlog": { "npmlog": {
@ -2905,17 +3047,16 @@
"dev": true, "dev": true,
"optional": true, "optional": true,
"requires": { "requires": {
"are-we-there-yet": "1.1.4", "are-we-there-yet": "~1.1.2",
"console-control-strings": "1.1.0", "console-control-strings": "~1.1.0",
"gauge": "2.7.4", "gauge": "~2.7.3",
"set-blocking": "2.0.0" "set-blocking": "~2.0.0"
} }
}, },
"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",
@ -2927,9 +3068,8 @@
"version": "1.4.0", "version": "1.4.0",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"wrappy": "1.0.2" "wrappy": "1"
} }
}, },
"os-homedir": { "os-homedir": {
@ -2950,8 +3090,8 @@
"dev": true, "dev": true,
"optional": true, "optional": true,
"requires": { "requires": {
"os-homedir": "1.0.2", "os-homedir": "^1.0.0",
"os-tmpdir": "1.0.2" "os-tmpdir": "^1.0.0"
} }
}, },
"path-is-absolute": { "path-is-absolute": {
@ -2972,10 +3112,10 @@
"dev": true, "dev": true,
"optional": true, "optional": true,
"requires": { "requires": {
"deep-extend": "0.5.1", "deep-extend": "^0.5.1",
"ini": "1.3.5", "ini": "~1.3.0",
"minimist": "1.2.0", "minimist": "^1.2.0",
"strip-json-comments": "2.0.1" "strip-json-comments": "~2.0.1"
}, },
"dependencies": { "dependencies": {
"minimist": { "minimist": {
@ -2992,13 +3132,13 @@
"dev": true, "dev": true,
"optional": true, "optional": true,
"requires": { "requires": {
"core-util-is": "1.0.2", "core-util-is": "~1.0.0",
"inherits": "2.0.3", "inherits": "~2.0.3",
"isarray": "1.0.0", "isarray": "~1.0.0",
"process-nextick-args": "2.0.0", "process-nextick-args": "~2.0.0",
"safe-buffer": "5.1.1", "safe-buffer": "~5.1.1",
"string_decoder": "1.1.1", "string_decoder": "~1.1.1",
"util-deprecate": "1.0.2" "util-deprecate": "~1.0.1"
} }
}, },
"rimraf": { "rimraf": {
@ -3007,14 +3147,13 @@
"dev": true, "dev": true,
"optional": true, "optional": true,
"requires": { "requires": {
"glob": "7.1.2" "glob": "^7.0.5"
} }
}, },
"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",
@ -3050,11 +3189,10 @@
"version": "1.0.2", "version": "1.0.2",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"code-point-at": "1.1.0", "code-point-at": "^1.0.0",
"is-fullwidth-code-point": "1.0.0", "is-fullwidth-code-point": "^1.0.0",
"strip-ansi": "3.0.1" "strip-ansi": "^3.0.0"
} }
}, },
"string_decoder": { "string_decoder": {
@ -3063,16 +3201,15 @@
"dev": true, "dev": true,
"optional": true, "optional": true,
"requires": { "requires": {
"safe-buffer": "5.1.1" "safe-buffer": "~5.1.0"
} }
}, },
"strip-ansi": { "strip-ansi": {
"version": "3.0.1", "version": "3.0.1",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"ansi-regex": "2.1.1" "ansi-regex": "^2.0.0"
} }
}, },
"strip-json-comments": { "strip-json-comments": {
@ -3087,13 +3224,13 @@
"dev": true, "dev": true,
"optional": true, "optional": true,
"requires": { "requires": {
"chownr": "1.0.1", "chownr": "^1.0.1",
"fs-minipass": "1.2.5", "fs-minipass": "^1.2.5",
"minipass": "2.2.4", "minipass": "^2.2.4",
"minizlib": "1.1.0", "minizlib": "^1.1.0",
"mkdirp": "0.5.1", "mkdirp": "^0.5.0",
"safe-buffer": "5.1.1", "safe-buffer": "^5.1.1",
"yallist": "3.0.2" "yallist": "^3.0.2"
} }
}, },
"util-deprecate": { "util-deprecate": {
@ -3108,20 +3245,18 @@
"dev": true, "dev": true,
"optional": true, "optional": true,
"requires": { "requires": {
"string-width": "1.0.2" "string-width": "^1.0.2"
} }
}, },
"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
} }
} }
}, },
@ -3271,8 +3406,7 @@
"globals": { "globals": {
"version": "11.7.0", "version": "11.7.0",
"resolved": "https://registry.npmjs.org/globals/-/globals-11.7.0.tgz", "resolved": "https://registry.npmjs.org/globals/-/globals-11.7.0.tgz",
"integrity": "sha512-K8BNSPySfeShBQXsahYB/AbbWruVOTyVpgoIDnl8odPpeSfP2J5QO2oLFFdl2j7GfDCtZj2bMKar2T49itTPCg==", "integrity": "sha512-K8BNSPySfeShBQXsahYB/AbbWruVOTyVpgoIDnl8odPpeSfP2J5QO2oLFFdl2j7GfDCtZj2bMKar2T49itTPCg=="
"dev": true
}, },
"globule": { "globule": {
"version": "1.2.1", "version": "1.2.1",
@ -3351,8 +3485,7 @@
"has-flag": { "has-flag": {
"version": "3.0.0", "version": "3.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
"integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0="
"dev": true
}, },
"has-unicode": { "has-unicode": {
"version": "2.0.1", "version": "2.0.1",
@ -3500,7 +3633,6 @@
"version": "2.2.4", "version": "2.2.4",
"resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz", "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz",
"integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==", "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==",
"dev": true,
"requires": { "requires": {
"loose-envify": "^1.0.0" "loose-envify": "^1.0.0"
} }
@ -3819,8 +3951,7 @@
"js-tokens": { "js-tokens": {
"version": "4.0.0", "version": "4.0.0",
"resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
"integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ=="
"dev": true
}, },
"jsbn": { "jsbn": {
"version": "0.1.1", "version": "0.1.1",
@ -3832,8 +3963,7 @@
"jsesc": { "jsesc": {
"version": "2.5.1", "version": "2.5.1",
"resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.1.tgz", "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.1.tgz",
"integrity": "sha1-5CGiqOINawgZ3yiQj3glJrlt0f4=", "integrity": "sha1-5CGiqOINawgZ3yiQj3glJrlt0f4="
"dev": true
}, },
"json-schema": { "json-schema": {
"version": "0.2.3", "version": "0.2.3",
@ -3982,8 +4112,7 @@
"lodash": { "lodash": {
"version": "4.17.11", "version": "4.17.11",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz",
"integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==", "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg=="
"dev": true
}, },
"lodash.assign": { "lodash.assign": {
"version": "4.2.0", "version": "4.2.0",
@ -4026,7 +4155,6 @@
"version": "1.4.0", "version": "1.4.0",
"resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz",
"integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==",
"dev": true,
"requires": { "requires": {
"js-tokens": "^3.0.0 || ^4.0.0" "js-tokens": "^3.0.0 || ^4.0.0"
} }
@ -5703,8 +5831,7 @@
"source-map": { "source-map": {
"version": "0.5.7", "version": "0.5.7",
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz",
"integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w="
"dev": true
}, },
"source-map-resolve": { "source-map-resolve": {
"version": "0.5.2", "version": "0.5.2",
@ -5880,7 +6007,6 @@
"version": "5.5.0", "version": "5.5.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
"integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
"dev": true,
"requires": { "requires": {
"has-flag": "^3.0.0" "has-flag": "^3.0.0"
} }
@ -5942,8 +6068,7 @@
"to-fast-properties": { "to-fast-properties": {
"version": "2.0.0", "version": "2.0.0",
"resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz",
"integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4="
"dev": true
}, },
"to-object-path": { "to-object-path": {
"version": "0.3.0", "version": "0.3.0",
@ -6011,8 +6136,7 @@
"trim-right": { "trim-right": {
"version": "1.0.1", "version": "1.0.1",
"resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz", "resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz",
"integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=", "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM="
"dev": true
}, },
"true-case-path": { "true-case-path": {
"version": "1.0.3", "version": "1.0.3",

View File

@ -4,7 +4,6 @@
"license": "ISC", "license": "ISC",
"devDependencies": { "devDependencies": {
"@babel/core": "^7.1.0", "@babel/core": "^7.1.0",
"@babel/preset-env": "^7.1.0",
"@babel/cli": "^7.1.0", "@babel/cli": "^7.1.0",
"node-sass": "^4.9.3", "node-sass": "^4.9.3",
"pug-cli": "^1.0.0-alpha6", "pug-cli": "^1.0.0-alpha6",

View File

@ -1,6 +1,6 @@
// Scripts // Scripts
//- script(src="https://unpkg.com/@webcomponents/webcomponentsjs@1.2.7/webcomponents-loader.js") //- script(src="https://unpkg.com/@webcomponents/webcomponentsjs@1.2.7/webcomponents-loader.js")
script(src="/lib/webcomponentsjs/webcomponents-loader.js") //script(src="/lib/webcomponentsjs/webcomponents-loader.js")
//- script(src="lib/html-imports.js") //- script(src="lib/html-imports.js")
script(src="/lib/oidc-client.js") script(src="/lib/oidc-client.js")
@ -15,7 +15,7 @@ script(
) )
script(src="/scripts/index.js") script(src="/scripts/index.js")
script(src="/scripts/hd-widgets.js") script(type="module" src="/scripts/hd-widgets.js")
// Stylesheets // Stylesheets
link(rel='stylesheet', href='/lib/normalize.css') link(rel='stylesheet', href='/lib/normalize.css')
@ -29,13 +29,13 @@ link(href="https://fonts.googleapis.com/css?family=Open+Sans:300,300i,400,400i,6
// Web components // Web components
//- local //- local
//<script type='module' src='/lib/sib-core/sib-display.js'></script> //script(type="module" src="/lib/sib-core/sib-display.js")
//<script type='module' src='/lib/sib-router/sib-router.js'></script> //script(type="module" src="/lib/sib-router/sib-router.js")
//<script type='module' src='/lib/sib-chat/sib-chat.js'></script> //script(type="module" src="/lib/sib-core/sib-form.js")
//<script type='module' src='/lib/sib-chat/sib-form.js'></script>
link(rel='import', href='/lib/sib-chat/sib-chat.html')
//- cdn //- cdn
<script type='module' src='https://cdn.happy-dev.fr/sib-core/sib-display.js'></script> script(type="module" src="https://cdn.happy-dev.fr/sib-core/sib-display.js")
<script type='module' src='https://cdn.happy-dev.fr/sib-router/sib-router.js'></script> script(type="module" src="https://cdn.happy-dev.fr/sib-router/sib-router.js")
<script type='module' src='https://cdn.happy-dev.fr/sib-chat/sib-chat.js'></script> script(type="module" src="https://cdn.happy-dev.fr/sib-core/sib-form.js")
<script type='module' src='https://cdn.happy-dev.fr/sib-chat/sib-form.js'></script>

View File

@ -1,138 +1,141 @@
document.addEventListener('WebComponentsReady', function(event) { import {SIBDisplayLookupList} from 'https://cdn.happy-dev.fr/sib-core/widgets/sib-display-widgets.js';
class HDAppUserInfo extends SIBDisplayLookupList { import {SIBWidget} from 'https://cdn.happy-dev.fr/sib-core/widgets/sib-base-widgets.js';
get parentElement() { import {store} from 'https://cdn.happy-dev.fr/sib-core/store.js';
return 'div';
}
getTemplate(value, index) {
var firstname, lastname, email;
if (typeof value == 'object') class HDAppUserInfo extends SIBDisplayLookupList {
if (Object.keys(value).length > 1) { get parentElement() {
firstname = value.first_name; return 'div';
lastname = value.last_name;
email = value.email;
} else {
store.get(value).then(resource => {
this.value.push(resource);
this.render();
});
if (Array.isArray(this.value))
this.value.splice(this.value.indexOf(value), 1);
else this.value = [];
return '';
}
return `<div>${firstname} ${lastname}</div>`;
// + `<div id="${email}">${email}</div>`;
}
} }
customElements.define('hdapp-userinfo', HDAppUserInfo); getTemplate(value, index) {
var firstname, lastname, email;
class HDAppMail extends SIBWidget { if (typeof value == 'object')
get template() { if (Object.keys(value).length > 1) {
return `<a href="mailto:${this.value}"><div class="icon-envelope"></div><div>SEND A MESSAGE</div></a>`; firstname = value.first_name;
} lastname = value.last_name;
email = value.email;
} else {
store.get(value).then(resource => {
this.value.push(resource);
this.render();
});
if (Array.isArray(this.value))
this.value.splice(this.value.indexOf(value), 1);
else this.value = [];
return '';
}
return `<div>${firstname} ${lastname}</div>`;
// + `<div id="${email}">${email}</div>`;
} }
customElements.define('hdapp-mail', HDAppMail); }
class HDAppMember extends SIBWidget { class HDAppMail extends SIBWidget {
get template() { get template() {
return ` return `<a href="mailto:${this.value}"><div class="icon-envelope"></div><div>SEND A MESSAGE</div></a>`;
}
}
class HDAppMember extends SIBWidget {
get template() {
return `
<div name="${this.name}"> <div name="${this.name}">
<img src="${this.value.avatar}"/> <img src="${this.value.avatar}"/>
</div> </div>
`; `;
}
render() {
store.get(this.value).then(value => {
this._value = value;
this.innerHTML = this.template;
});
}
} }
customElements.define('hdapp-member', HDAppMember);
class HDAppAuthor extends SIBDisplayLookupList { render() {
get parentElement() { store.get(this.value).then(value => {
return 'div'; this._value = value;
}
getTemplate(value, index) {
var firstname, lastname;
if (typeof value == 'object')
if (Object.keys(value).length > 1) {
firstname = value.user.first_name;
lastname = value.user.last_name;
} else {
store.get(value).then(resource => {
this.value.push(resource);
this.render();
});
if (Array.isArray(this.value))
this.value.splice(this.value.indexOf(value), 1);
else this.value = [];
return '';
}
return `${firstname} ${lastname}`;
}
}
customElements.define('hdapp-author', HDAppAuthor);
class HDAppClosingDate extends SIBWidget {
get template() {
return this.value
? `<strong>closed</strong> (${this.value})`
: '<strong>open</strong>';
}
render() {
this.innerHTML = this.template; this.innerHTML = this.template;
} });
}
}
class HDAppAuthor extends SIBDisplayLookupList {
get parentElement() {
return 'div';
}
getTemplate(value, index) {
var firstname, lastname;
if (typeof value == 'object')
if (Object.keys(value).length > 1) {
firstname = value.user.first_name;
lastname = value.user.last_name;
} else {
store.get(value).then(resource => {
this.value.push(resource);
this.render();
});
if (Array.isArray(this.value))
this.value.splice(this.value.indexOf(value), 1);
else this.value = [];
return '';
}
return `${firstname} ${lastname}`;
}
}
class HDAppClosingDate extends SIBWidget {
get template() {
return this.value
? `<strong>closed</strong> (${this.value})`
: '<strong>open</strong>';
} }
customElements.define('hdapp-closing-date', HDAppClosingDate); render() {
this.innerHTML = this.template;
}
}
class HDAppAvailable extends SIBWidget { class HDAppAvailable extends SIBWidget {
get template() { get template() {
return this.value return this.value
? '<strong>Available</strong>' ? '<strong>Available</strong>'
: '<strong>Not available</strong>'; : '<strong>Not available</strong>';
}
render() {
this.innerHTML = this.template;
}
} }
customElements.define('hdapp-available', HDAppAvailable); render() {
this.innerHTML = this.template;
}
}
class HDAppHyperlink extends SIBWidget { class HDAppHyperlink extends SIBWidget {
get template() { get template() {
const escaped = this.value const escaped = this.value
.replace(/&/g, '&amp;') .replace(/&/g, '&amp;')
.replace(/</g, '&lt;') .replace(/</g, '&lt;')
.replace(/>/g, '&gt;') .replace(/>/g, '&gt;')
.replace(/"/g, '&quot;') .replace(/"/g, '&quot;')
.replace(/'/g, '&#039;'); .replace(/'/g, '&#039;');
return `<a href="${escaped}">${escaped}</a>`; return `<a href="${escaped}">${escaped}</a>`;
}
render() {
this.innerHTML = this.template;
}
} }
customElements.define('hdapp-hyperlink', HDAppHyperlink); render() {
this.innerHTML = this.template;
}
}
class HDAppLinkMore extends SIBWidget { class HDAppLinkMore extends SIBWidget {
get template() { get template() {
const id = uniqID(); const id = uniqID();
console.warn('HDAppLinkMore', this); console.warn('HDAppLinkMore', this);
return ` return `
${this.label} ${this.label}
${this.name} ${this.name}
${this.escapedValue} ${this.escapedValue}
`; `;
}
} }
}
document.addEventListener('WebComponentsReady', function(event) {
customElements.define('hdapp-userinfo', HDAppUserInfo);
customElements.define('hdapp-mail', HDAppMail);
customElements.define('hdapp-member', HDAppMember);
customElements.define('hdapp-author', HDAppAuthor);
customElements.define('hdapp-closing-date', HDAppClosingDate);
customElements.define('hdapp-available', HDAppAvailable);
customElements.define('hdapp-hyperlink', HDAppHyperlink);
customElements.define('hdapp-link-more', HDAppLinkMore); customElements.define('hdapp-link-more', HDAppLinkMore);
}); });

@ -1 +1 @@
Subproject commit f417518b33ae6d9da33a4802c4c7ea75a6f76e61 Subproject commit cfd28e0779ffc15563dd3abe727cad3d6525ae0c