diff --git a/.babelrc b/.babelrc index beb64354..c9bc940f 100644 --- a/.babelrc +++ b/.babelrc @@ -5,10 +5,15 @@ { "targets": { "browsers": [ - "last 2 versions" + [ + "last 2 versions", + "ie >= 11" + ] ] }, - "modules":false + "useBuiltIns": "usage", + "corejs": 3, + "modules": false } ] ], diff --git a/hwe/css/inheritPoint.css b/hwe/css/inheritPoint.css index 25d69429..58ad3c5d 100644 --- a/hwe/css/inheritPoint.css +++ b/hwe/css/inheritPoint.css @@ -1,23 +1,3 @@ -#inheritance_list{ - display: flex; - flex-wrap: wrap; -} +#inheritance_list{display:flex;flex-wrap:wrap}.inherit_padding{width:33%;padding:10px 2px}.inherit_item{width:33%;padding:10px 2px}.col-form-label{text-align:right;padding-right:2ch}.inherit_value{text-align:right} -.inherit_padding{ - width: 33%; - padding: 10px 2px; -} - -.inherit_item{ - width: 33%; - padding: 10px 2px; -} - -.col-form-label{ - text-align:right; - padding-right:2ch; -} - -.inherit_value{ - text-align: right; -} \ No newline at end of file +/*# sourceMappingURL=inheritPoint.css.map*/ \ No newline at end of file diff --git a/hwe/css/inheritPoint.css.map b/hwe/css/inheritPoint.css.map new file mode 100644 index 00000000..52cb62cb --- /dev/null +++ b/hwe/css/inheritPoint.css.map @@ -0,0 +1 @@ +{"version":3,"file":"../css/inheritPoint.css","mappings":"AAAA,kBACI,aACA,eAGJ,iBACI,UACA,iBAGJ,cACI,UACA,iBAGJ,gBACI,iBACA,kBAGJ,eACI,iB","sources":["webpack://hidche_lib/./hwe/scss/inheritPoint.scss"],"sourcesContent":["#inheritance_list{\n display: flex;\n flex-wrap: wrap;\n}\n\n.inherit_padding{\n width: 33%;\n padding: 10px 2px;\n}\n\n.inherit_item{\n width: 33%;\n padding: 10px 2px;\n}\n\n.col-form-label{\n text-align:right;\n padding-right:2ch;\n}\n\n.inherit_value{\n text-align: right;\n}"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/hwe/js/inheritPoint.js.map b/hwe/js/inheritPoint.js.map index b5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AAtBC,EAAsB,uDAAJ,GAAI,qBACrC,cAAMA,IAD+B,OAD3B,gBAC2B,EAAtBA,QAAAA,EAAsB,EAF7C,O,EAAA,G,EAAA,uBAKI,WACI,OAAIC,KAAKD,QACEC,KAAKC,KAAO,KAAOD,KAAKD,QAGxBC,KAAKC,U,iBAVxB,KAAkCC,SAmB3B,SAASC,EAAUnC,GACtB,GAAIA,MAAAA,EACA,MAAM,IAAI8B,EAEd,OAAO9B,E,87BCWXoC,OAAOC,UAzBP,WAEI,IAAMC,EAAOH,EAAOI,SAASC,cAAc,uBACrCC,EAAON,EAAOI,SAASC,cAAc,4BACrCE,EAAOP,EAAOI,SAASC,cAAc,uBAErCG,EAAWC,KAAKC,MAAM,IAAIxB,OAAOyB,OAAOV,OAAOW,SAC/CC,EAAWJ,KAAKC,MAAMT,OAAOW,MAAP,UACtBE,EAAcN,EAAWK,EAE/BV,EAAKjC,MAAQsC,EAASO,iBACtBT,EAAKpC,MAAQ2C,EAASE,iBACtBR,EAAKrC,MAAQ4C,EAAYC,iBAEzB,cAAwB7B,OAAO8B,QAAQf,OAAOW,OAA9C,eAAqD,CAAjD,gBAAO5B,EAAP,KAAYiC,EAAZ,KACcjB,EAAOI,SAASC,cAAT,mBAAmCrB,EAAnC,YACfd,MAAQuC,KAAKC,MAAMO,GAAKF,iBAGlC,cAAyB7B,OAAO8B,QAAQf,OAAOiB,UAA/C,eAAyD,CAArD,gBAAOlC,EAAP,KAAYmC,EAAZ,KACcnB,EAAOI,SAASC,cAAT,mBAAmCrB,EAAnC,sBACfoC,UAAYD,K","sources":["webpack://hidche_lib/./node_modules/lodash/_baseSum.js","webpack://hidche_lib/./node_modules/lodash/identity.js","webpack://hidche_lib/./node_modules/lodash/sum.js","webpack://hidche_lib/webpack/bootstrap","webpack://hidche_lib/webpack/runtime/compat get default export","webpack://hidche_lib/webpack/runtime/define property getters","webpack://hidche_lib/webpack/runtime/hasOwnProperty shorthand","webpack://hidche_lib/./hwe/ts/util.ts","webpack://hidche_lib/./hwe/ts/inheritPoint.ts"],"sourcesContent":["/**\n * The base implementation of `_.sum` and `_.sumBy` without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {number} Returns the sum.\n */\nfunction baseSum(array, iteratee) {\n var result,\n index = -1,\n length = array.length;\n\n while (++index < length) {\n var current = iteratee(array[index]);\n if (current !== undefined) {\n result = result === undefined ? current : (result + current);\n }\n }\n return result;\n}\n\nmodule.exports = baseSum;\n","/**\n * This method returns the first argument it receives.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {*} value Any value.\n * @returns {*} Returns `value`.\n * @example\n *\n * var object = { 'a': 1 };\n *\n * console.log(_.identity(object) === object);\n * // => true\n */\nfunction identity(value) {\n return value;\n}\n\nmodule.exports = identity;\n","var baseSum = require('./_baseSum'),\n identity = require('./identity');\n\n/**\n * Computes the sum of the values in `array`.\n *\n * @static\n * @memberOf _\n * @since 3.4.0\n * @category Math\n * @param {Array} array The array to iterate over.\n * @returns {number} Returns the sum.\n * @example\n *\n * _.sum([4, 2, 8, 6]);\n * // => 20\n */\nfunction sum(array) {\n return (array && array.length)\n ? baseSum(array, identity)\n : 0;\n}\n\nmodule.exports = sum;\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","type ErrType = { new(msg?: string): T }\ntype Nullable = T | null | undefined\n\nexport class RuntimeError extends Error {\n public name = 'RuntimeError';\n constructor(public message: string = '') {\n super(message);\n }\n toString(): string {\n if (this.message) {\n return this.name + ': ' + this.message;\n }\n else {\n return this.name;\n }\n }\n}\n\nexport class NotNullExpected extends RuntimeError {\n public name = 'NotNullExpected';\n}\n\nexport function unwrap(result: Nullable): T {\n if (result === null || result === undefined) {\n throw new NotNullExpected();\n }\n return result;\n}\n\nexport function unwrap_err(result: Nullable, errType: ErrType, errMsg?: string): T {\n if (result === null || result === undefined) {\n throw new errType(errMsg);\n }\n return result;\n}","import { sum } from \"lodash\";\nimport { unwrap } from \"./util\";\ndeclare global {\n interface Window { \n formStart: ()=>void;\n items: {[name: string]:number};\n helpText: {[name: string]:string};\n }\n}\n\nexport {}\n\nfunction formStart() {\n\n const dSum = unwrap(document.querySelector('#inherit_sum_value')) as HTMLInputElement ;\n const dOld = unwrap(document.querySelector('#inherit_previous_value')) as HTMLInputElement;\n const dNew = unwrap(document.querySelector('#inherit_new_value')) as HTMLInputElement;\n\n const sumPoint = Math.floor(sum(Object.values(window.items)));\n const oldPoint = Math.floor(window.items['previous']);\n const sumNewPoint = sumPoint - oldPoint;\n\n dSum.value = sumPoint.toLocaleString();\n dOld.value = oldPoint.toLocaleString();\n dNew.value = sumNewPoint.toLocaleString();\n\n for(const [key, val] of Object.entries(window.items)){\n const dItem = unwrap(document.querySelector(`#inherit_${key}_value`)) as HTMLInputElement ;\n dItem.value = Math.floor(val).toLocaleString();\n }\n\n for(const [key, text] of Object.entries(window.helpText)){\n const dText = unwrap(document.querySelector(`#inherit_${key} small.form-text`)) as HTMLElement;\n dText.innerHTML = text;\n }\n}\n\nwindow.formStart = formStart;"],"names":["module","exports","array","iteratee","result","index","length","current","undefined","value","baseSum","identity","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","n","getter","__esModule","d","a","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","NotNullExpected","message","this","name","Error","unwrap","window","formStart","dSum","document","querySelector","dOld","dNew","sumPoint","Math","floor","values","items","oldPoint","sumNewPoint","toLocaleString","entries","val","helpText","text","innerHTML"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"inheritPoint.js","mappings":"qBAuBAA,EAAOC,QAdP,SAAiBC,EAAOC,GAKtB,IAJA,IAAIC,EACAC,GAAS,EACTC,EAASJ,EAAMI,SAEVD,EAAQC,GAAQ,CACvB,IAAIC,EAAUJ,EAASD,EAAMG,SACbG,IAAZD,IACFH,OAAoBI,IAAXJ,EAAuBG,EAAWH,EAASG,GAGxD,OAAOH,I,QCATJ,EAAOC,QAJP,SAAkBQ,GAChB,OAAOA,I,cCjBT,IAAIC,EAAU,EAAQ,KAClBC,EAAW,EAAQ,KAsBvBX,EAAOC,QANP,SAAaC,GACX,OAAQA,GAASA,EAAMI,OACnBI,EAAQR,EAAOS,GACf,KCnBFC,EAA2B,GAG/B,SAASC,EAAoBC,GAE5B,IAAIC,EAAeH,EAAyBE,GAC5C,QAAqBN,IAAjBO,EACH,OAAOA,EAAad,QAGrB,IAAID,EAASY,EAAyBE,GAAY,CAGjDb,QAAS,IAOV,OAHAe,EAAoBF,GAAUd,EAAQA,EAAOC,QAASY,GAG/Cb,EAAOC,QCpBfY,EAAoBI,EAAKjB,IACxB,IAAIkB,EAASlB,GAAUA,EAAOmB,WAC7B,IAAOnB,EAAiB,QACxB,IAAM,EAEP,OADAa,EAAoBO,EAAEF,EAAQ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/C,eAAyD,CAArD,gBAAOlC,EAAP,KAAYmC,EAAZ,KACcnB,EAAOI,SAASC,cAAT,mBAAmCrB,EAAnC,sBACfoC,UAAYD,K","sources":["webpack://hidche_lib/./node_modules/lodash/_baseSum.js","webpack://hidche_lib/./node_modules/lodash/identity.js","webpack://hidche_lib/./node_modules/lodash/sum.js","webpack://hidche_lib/webpack/bootstrap","webpack://hidche_lib/webpack/runtime/compat get default export","webpack://hidche_lib/webpack/runtime/define property getters","webpack://hidche_lib/webpack/runtime/hasOwnProperty shorthand","webpack://hidche_lib/./hwe/ts/util.ts","webpack://hidche_lib/./hwe/ts/inheritPoint.ts"],"sourcesContent":["/**\n * The base implementation of `_.sum` and `_.sumBy` without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {number} Returns the sum.\n */\nfunction baseSum(array, iteratee) {\n var result,\n index = -1,\n length = array.length;\n\n while (++index < length) {\n var current = iteratee(array[index]);\n if (current !== undefined) {\n result = result === undefined ? current : (result + current);\n }\n }\n return result;\n}\n\nmodule.exports = baseSum;\n","/**\n * This method returns the first argument it receives.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {*} value Any value.\n * @returns {*} Returns `value`.\n * @example\n *\n * var object = { 'a': 1 };\n *\n * console.log(_.identity(object) === object);\n * // => true\n */\nfunction identity(value) {\n return value;\n}\n\nmodule.exports = identity;\n","var baseSum = require('./_baseSum'),\n identity = require('./identity');\n\n/**\n * Computes the sum of the values in `array`.\n *\n * @static\n * @memberOf _\n * @since 3.4.0\n * @category Math\n * @param {Array} array The array to iterate over.\n * @returns {number} Returns the sum.\n * @example\n *\n * _.sum([4, 2, 8, 6]);\n * // => 20\n */\nfunction sum(array) {\n return (array && array.length)\n ? baseSum(array, identity)\n : 0;\n}\n\nmodule.exports = sum;\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","type ErrType = { new(msg?: string): T }\ntype Nullable = T | null | undefined\n\nexport class RuntimeError extends Error {\n public name = 'RuntimeError';\n constructor(public message: string = '') {\n super(message);\n }\n toString(): string {\n if (this.message) {\n return this.name + ': ' + this.message;\n }\n else {\n return this.name;\n }\n }\n}\n\nexport class NotNullExpected extends RuntimeError {\n public name = 'NotNullExpected';\n}\n\nexport function unwrap(result: Nullable): T {\n if (result === null || result === undefined) {\n throw new NotNullExpected();\n }\n return result;\n}\n\nexport function unwrap_err(result: Nullable, errType: ErrType, errMsg?: string): T {\n if (result === null || result === undefined) {\n throw new errType(errMsg);\n }\n return result;\n}","import \"../scss/inheritPoint.scss\";\n\nimport { sum } from \"lodash\";\nimport { unwrap } from \"./util\";\ndeclare global {\n interface Window { \n formStart: ()=>void;\n items: {[name: string]:number};\n helpText: {[name: string]:string};\n }\n}\n\nexport {}\n\nfunction formStart() {\n\n const dSum = unwrap(document.querySelector('#inherit_sum_value')) as HTMLInputElement ;\n const dOld = unwrap(document.querySelector('#inherit_previous_value')) as HTMLInputElement;\n const dNew = unwrap(document.querySelector('#inherit_new_value')) as HTMLInputElement;\n\n const sumPoint = Math.floor(sum(Object.values(window.items)));\n const oldPoint = Math.floor(window.items['previous']);\n const sumNewPoint = sumPoint - oldPoint;\n\n dSum.value = sumPoint.toLocaleString();\n dOld.value = oldPoint.toLocaleString();\n dNew.value = sumNewPoint.toLocaleString();\n\n for(const [key, val] of Object.entries(window.items)){\n const dItem = unwrap(document.querySelector(`#inherit_${key}_value`)) as HTMLInputElement ;\n dItem.value = Math.floor(val).toLocaleString();\n }\n\n for(const [key, text] of Object.entries(window.helpText)){\n const dText = unwrap(document.querySelector(`#inherit_${key} small.form-text`)) as HTMLElement;\n dText.innerHTML = text;\n }\n}\n\nwindow.formStart = formStart;"],"names":["module","exports","array","iteratee","result","index","length","current","undefined","value","baseSum","identity","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","n","getter","__esModule","d","a","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","NotNullExpected","message","this","name","Error","unwrap","window","formStart","dSum","document","querySelector","dOld","dNew","sumPoint","Math","floor","values","items","oldPoint","sumNewPoint","toLocaleString","entries","val","helpText","text","innerHTML"],"sourceRoot":""} \ No newline at end of file diff --git a/hwe/scss/inheritPoint.scss b/hwe/scss/inheritPoint.scss new file mode 100644 index 00000000..25d69429 --- /dev/null +++ b/hwe/scss/inheritPoint.scss @@ -0,0 +1,23 @@ +#inheritance_list{ + display: flex; + flex-wrap: wrap; +} + +.inherit_padding{ + width: 33%; + padding: 10px 2px; +} + +.inherit_item{ + width: 33%; + padding: 10px 2px; +} + +.col-form-label{ + text-align:right; + padding-right:2ch; +} + +.inherit_value{ + text-align: right; +} \ No newline at end of file diff --git a/hwe/ts/inheritPoint.ts b/hwe/ts/inheritPoint.ts index 07f01e30..cbfb3f66 100644 --- a/hwe/ts/inheritPoint.ts +++ b/hwe/ts/inheritPoint.ts @@ -1,3 +1,5 @@ +import "../scss/inheritPoint.scss"; + import { sum } from "lodash"; import { unwrap } from "./util"; declare global { diff --git a/package.json b/package.json index 698f6880..12badff5 100644 --- a/package.json +++ b/package.json @@ -15,21 +15,31 @@ "author": "Hide_D", "license": "MIT", "dependencies": { - "@types/lodash": "^4.14.172", - "lodash": "^4.17.21" + "core-js": "^3.16.1", + "lodash": "^4.17.21", + "vue": "^3.2.2" }, "devDependencies": { "@babel/cli": "^7.14.8", "@babel/core": "^7.15.0", "@babel/preset-env": "^7.15.0", "@babel/preset-typescript": "^7.15.0", + "@types/lodash": "^4.14.172", "@typescript-eslint/eslint-plugin": "^4.29.1", "@typescript-eslint/parser": "^4.29.1", + "@vue/compiler-sfc": "^3.2.2", "babel-loader": "^8.2.2", "babel-plugin-lodash": "^3.3.4", + "css-loader": "^6.2.0", "eslint": "^7.32.0", + "mini-css-extract-plugin": "^2.2.0", "pre-commit": "^1.2.2", + "sass": "^1.37.5", + "sass-loader": "^12.1.0", + "style-loader": "^3.2.1", "typescript": "^4.3.5", + "vue-loader": "^15.9.8", + "vue-style-loader": "^4.1.3", "webpack": "^5.49.0", "webpack-cli": "^4.7.2" }, diff --git a/webpack.config.js b/webpack.config.js index f8e4e6ba..2ebf3f26 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -1,4 +1,6 @@ const path = require('path'); +const { VueLoaderPlugin } = require('vue-loader'); +const MiniCssExtractPlugin = require('mini-css-extract-plugin') module.exports = [ { @@ -17,7 +19,7 @@ module.exports = [ devtool: 'source-map', module: { rules: [{ - test: /\.(ts|tsx)$/, + test: /\.(ts|tsx)$/i, exclude: /(node_modules)/, use: { loader: 'babel-loader', @@ -28,8 +30,33 @@ module.exports = [ ] } } + }, { + test: /\.vue$/i, + exclude: /(node_modules)/, + use: [ + 'vue-loader' + ] + }, { + test: /\.css$/i, + use: [ + MiniCssExtractPlugin.loader, + "css-loader", + ], + }, { + test: /\.s[ac]ss$/i, + use: [ + MiniCssExtractPlugin.loader, + "css-loader", + "sass-loader", + ], }] }, + plugins: [ + new VueLoaderPlugin(), + new MiniCssExtractPlugin({ + filename: '../css/[name].css' + }) + ] }, { name: 'gateway', @@ -43,11 +70,11 @@ module.exports = [ filename: '[name].js', path: path.resolve(__dirname, 'js'), }, - mode: 'none', + mode: 'production', devtool: 'source-map', module: { rules: [{ - test: /\.(ts|tsx)$/, + test: /\.(ts|tsx)$/i, exclude: /(node_modules)/, use: { loader: 'babel-loader', @@ -58,7 +85,33 @@ module.exports = [ ] } } + }, + { + test: /\.vue$/i, + exclude: /(node_modules)/, + use: [ + { loader: 'vue-loader' } + ] + }, { + test: /\.css$/i, + use: [ + MiniCssExtractPlugin.loader, + "css-loader", + ], + }, { + test: /\.s[ac]ss$/i, + use: [ + MiniCssExtractPlugin.loader, + "css-loader", + "sass-loader", + ], }] }, + plugins: [ + new VueLoaderPlugin(), + new MiniCssExtractPlugin({ + filename: '../css/[name].css' + }), + ] }, ]