$ date --- stdout --- Fri Mar 24 21:27:24 UTC 2023 --- end --- $ git clone file:///srv/git/mediawiki-extensions-WikiLambda.git repo --depth=1 -b master --- stderr --- Cloning into 'repo'... --- stdout --- --- end --- $ git config user.name libraryupgrader --- stdout --- --- end --- $ git config user.email tools.libraryupgrader@tools.wmflabs.org --- stdout --- --- end --- $ git submodule update --init --- stderr --- Submodule 'function-schemata' (https://gerrit.wikimedia.org/r/mediawiki/services/function-schemata) registered for path 'function-schemata' Cloning into '/src/repo/function-schemata'... --- stdout --- Submodule path 'function-schemata': checked out 'dfdb8554f8c0c46023b478e317f75970b3255648' --- end --- $ grr init --- stdout --- Installed commit-msg hook. --- end --- $ git show-ref refs/heads/master --- stdout --- 5c9f297a4992972217de46d1da3fc2dd1b66ad54 refs/heads/master --- end --- $ /usr/bin/npm audit --json --legacy-peer-deps --- stdout --- { "auditReportVersion": 2, "vulnerabilities": { "jsdoc": { "name": "jsdoc", "severity": "high", "isDirect": true, "via": [ "taffydb" ], "effects": [], "range": "3.2.0-dev - 3.6.11", "nodes": [ "node_modules/jsdoc" ], "fixAvailable": { "name": "jsdoc", "version": "4.0.2", "isSemVerMajor": true } }, "jsdoc-wmf-theme": { "name": "jsdoc-wmf-theme", "severity": "high", "isDirect": true, "via": [ "taffydb" ], "effects": [], "range": "*", "nodes": [ "node_modules/jsdoc-wmf-theme" ], "fixAvailable": false }, "mwbot": { "name": "mwbot", "severity": "moderate", "isDirect": false, "via": [ "request" ], "effects": [ "wdio-mediawiki" ], "range": ">=0.1.6", "nodes": [ "node_modules/mwbot" ], "fixAvailable": false }, "request": { "name": "request", "severity": "moderate", "isDirect": false, "via": [ { "source": 1091459, "name": "request", "dependency": "request", "title": "Server-Side Request Forgery in Request", "url": "https://github.com/advisories/GHSA-p8p7-x288-28g6", "severity": "moderate", "cwe": [ "CWE-918" ], "cvss": { "score": 6.1, "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N" }, "range": "<=2.88.2" } ], "effects": [ "mwbot" ], "range": "*", "nodes": [ "node_modules/request" ], "fixAvailable": false }, "taffydb": { "name": "taffydb", "severity": "high", "isDirect": false, "via": [ { "source": 1089386, "name": "taffydb", "dependency": "taffydb", "title": "TaffyDB can allow access to any data items in the DB", "url": "https://github.com/advisories/GHSA-mxhp-79qh-mcx6", "severity": "high", "cwe": [ "CWE-20", "CWE-668" ], "cvss": { "score": 7.5, "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N" }, "range": "<=2.7.3" } ], "effects": [ "jsdoc", "jsdoc-wmf-theme" ], "range": "*", "nodes": [ "node_modules/taffydb" ], "fixAvailable": false }, "wdio-mediawiki": { "name": "wdio-mediawiki", "severity": "moderate", "isDirect": true, "via": [ "mwbot" ], "effects": [], "range": "*", "nodes": [ "node_modules/wdio-mediawiki" ], "fixAvailable": false } }, "metadata": { "vulnerabilities": { "info": 0, "low": 0, "moderate": 3, "high": 3, "critical": 0, "total": 6 }, "dependencies": { "prod": 1, "dev": 1359, "optional": 3, "peer": 13, "peerOptional": 0, "total": 1359 } } } --- end --- $ /usr/bin/composer install --- stderr --- No lock file found. Updating dependencies instead of installing from lock file. Use composer update over composer install if you do not have a lock file. Loading composer repositories with package information Info from https://repo.packagist.org: [37;44m#StandWith[30;43mUkraine[0m Updating dependencies Lock file operations: 38 installs, 0 updates, 0 removals - Locking composer/pcre (3.1.0) - Locking composer/semver (3.3.2) - Locking composer/spdx-licenses (1.5.7) - Locking composer/xdebug-handler (3.0.3) - Locking diff/diff (3.3.1) - Locking doctrine/deprecations (v1.0.0) - Locking felixfbecker/advanced-json-rpc (v3.2.1) - Locking mediawiki/mediawiki-codesniffer (v41.0.0) - Locking mediawiki/mediawiki-phan-config (0.12.0) - Locking mediawiki/minus-x (1.1.1) - Locking mediawiki/phan-taint-check-plugin (4.0.0) - Locking microsoft/tolerant-php-parser (v0.1.1) - Locking netresearch/jsonmapper (v4.1.0) - Locking opis/json-schema (1.1.0) - Locking phan/phan (5.4.1) - Locking php-parallel-lint/php-console-color (v1.0.1) - Locking php-parallel-lint/php-console-highlighter (v1.0.0) - Locking php-parallel-lint/php-parallel-lint (v1.3.2) - Locking phpdocumentor/reflection-common (2.2.0) - Locking phpdocumentor/reflection-docblock (5.3.0) - Locking phpdocumentor/type-resolver (1.7.0) - Locking phpstan/phpdoc-parser (1.16.1) - Locking psr/container (1.1.2) - Locking psr/log (1.1.4) - Locking sabre/event (5.1.4) - Locking squizlabs/php_codesniffer (3.7.2) - Locking symfony/console (v5.4.21) - Locking symfony/deprecation-contracts (v2.5.2) - Locking symfony/polyfill-ctype (v1.27.0) - Locking symfony/polyfill-intl-grapheme (v1.27.0) - Locking symfony/polyfill-intl-normalizer (v1.27.0) - Locking symfony/polyfill-mbstring (v1.27.0) - Locking symfony/polyfill-php73 (v1.27.0) - Locking symfony/polyfill-php80 (v1.27.0) - Locking symfony/service-contracts (v2.5.2) - Locking symfony/string (v5.4.21) - Locking tysonandre/var_representation_polyfill (0.1.3) - Locking webmozart/assert (1.11.0) Writing lock file Installing dependencies from lock file (including require-dev) Package operations: 38 installs, 0 updates, 0 removals - Downloading opis/json-schema (1.1.0) 0/1 [>---------------------------] 0% 1/1 [============================] 100% - Installing composer/pcre (3.1.0): Extracting archive - Installing diff/diff (3.3.1): Extracting archive - Installing symfony/polyfill-php80 (v1.27.0): Extracting archive - Installing squizlabs/php_codesniffer (3.7.2): Extracting archive - Installing symfony/polyfill-mbstring (v1.27.0): Extracting archive - Installing composer/spdx-licenses (1.5.7): Extracting archive - Installing composer/semver (3.3.2): Extracting archive - Installing mediawiki/mediawiki-codesniffer (v41.0.0): Extracting archive - Installing tysonandre/var_representation_polyfill (0.1.3): Extracting archive - Installing symfony/polyfill-intl-normalizer (v1.27.0): Extracting archive - Installing symfony/polyfill-intl-grapheme (v1.27.0): Extracting archive - Installing symfony/polyfill-ctype (v1.27.0): Extracting archive - Installing symfony/string (v5.4.21): Extracting archive - Installing symfony/deprecation-contracts (v2.5.2): Extracting archive - Installing psr/container (1.1.2): Extracting archive - Installing symfony/service-contracts (v2.5.2): Extracting archive - Installing symfony/polyfill-php73 (v1.27.0): Extracting archive - Installing symfony/console (v5.4.21): Extracting archive - Installing sabre/event (5.1.4): Extracting archive - Installing netresearch/jsonmapper (v4.1.0): Extracting archive - Installing microsoft/tolerant-php-parser (v0.1.1): Extracting archive - Installing webmozart/assert (1.11.0): Extracting archive - Installing phpstan/phpdoc-parser (1.16.1): Extracting archive - Installing phpdocumentor/reflection-common (2.2.0): Extracting archive - Installing doctrine/deprecations (v1.0.0): Extracting archive - Installing phpdocumentor/type-resolver (1.7.0): Extracting archive - Installing phpdocumentor/reflection-docblock (5.3.0): Extracting archive - Installing felixfbecker/advanced-json-rpc (v3.2.1): Extracting archive - Installing psr/log (1.1.4): Extracting archive - Installing composer/xdebug-handler (3.0.3): Extracting archive - Installing phan/phan (5.4.1): Extracting archive - Installing mediawiki/phan-taint-check-plugin (4.0.0): Extracting archive - Installing mediawiki/mediawiki-phan-config (0.12.0): Extracting archive - Installing mediawiki/minus-x (1.1.1): Extracting archive - Installing opis/json-schema (1.1.0): Extracting archive - Installing php-parallel-lint/php-console-color (v1.0.1): Extracting archive - Installing php-parallel-lint/php-console-highlighter (v1.0.0): Extracting archive - Installing php-parallel-lint/php-parallel-lint (v1.3.2): Extracting archive 0/29 [>---------------------------] 0% 10/29 [=========>------------------] 34% 20/29 [===================>--------] 68% 28/29 [===========================>] 96% 29/29 [============================] 100%5 package suggestions were added by new dependencies, use `composer suggest` to see details. Generating autoload files 14 packages you are using are looking for funding. Use the `composer fund` command to find out more! --- stdout --- --- end --- Upgrading n:eslint-config-wikimedia from 0.22.1 -> 0.24.0 Upgrading n:grunt from 1.5.3 -> 1.6.1 Upgrading n:stylelint-config-wikimedia from 0.13.1 -> 0.14.0 Upgrading n:@wikimedia/codex from 0.6.2 -> 0.7.0 $ /usr/bin/npm install --- stdout --- added 1339 packages, and audited 1340 packages in 30s 119 packages are looking for funding run `npm fund` for details 6 vulnerabilities (3 moderate, 3 high) To address all issues possible (including breaking changes), run: npm audit fix --force Some issues need review, and may require choosing a different dependency. Run `npm audit` for details. --- end --- $ package-lock-lint package-lock.json --- stdout --- Checking package-lock.json --- end --- $ /usr/bin/npm install grunt-eslint@24.0.0 --save-exact --- stdout --- up to date, audited 1340 packages in 2s 119 packages are looking for funding run `npm fund` for details 6 vulnerabilities (3 moderate, 3 high) To address all issues possible (including breaking changes), run: npm audit fix --force Some issues need review, and may require choosing a different dependency. Run `npm audit` for details. --- end --- $ package-lock-lint package-lock.json --- stdout --- Checking package-lock.json --- end --- $ ./node_modules/.bin/eslint . --fix --- stdout --- /src/repo/resources/ext.wikilambda.edit/components/ZObjectJson.vue 60:3 warning Prop 'zobjectRaw' requires default value to be set vue/require-default-prop /src/repo/resources/ext.wikilambda.edit/components/ZObjectKey.vue 34:5 warning The '<wl-z-object>' component has been used, but not defined vue/no-undef-components 76:4 warning The '<wl-z-object>' component has been used, but not defined vue/no-undef-components /src/repo/resources/ext.wikilambda.edit/components/ZObjectKeyList.vue 18:4 warning The '<wl-z-object-key>' component has been used, but not defined vue/no-undef-components /src/repo/resources/ext.wikilambda.edit/components/ZObjectSelector.vue 410:17 warning The "focus" event has been triggered but not declared on `emits` option vue/require-explicit-emits /src/repo/resources/ext.wikilambda.edit/components/base/Chip.vue 84:17 warning The "edit-chip" event has been triggered but not declared on `emits` option vue/require-explicit-emits 88:16 warning The "remove-chip" event has been triggered but not declared on `emits` option vue/require-explicit-emits /src/repo/resources/ext.wikilambda.edit/components/base/ChipContainer.vue 84:16 warning The "edit-chip" event has been triggered but not declared on `emits` option vue/require-explicit-emits 88:17 warning The "add-chip" event has been triggered but not declared on `emits` option vue/require-explicit-emits 93:16 warning The "remove-chip" event has been triggered but not declared on `emits` option vue/require-explicit-emits /src/repo/resources/ext.wikilambda.edit/components/base/ContextMenu.vue 84:16 warning The "context-action" event has been triggered but not declared on `emits` option vue/require-explicit-emits /src/repo/resources/ext.wikilambda.edit/components/base/Dialog.vue 21:21 warning The "exit-dialog" event has been triggered but not declared on `emits` option vue/require-explicit-emits 32:21 warning The "close-dialog" event has been triggered but not declared on `emits` option vue/require-explicit-emits 41:21 warning The "confirm-dialog" event has been triggered but not declared on `emits` option vue/require-explicit-emits 48:10 warning 'v-html' directive can lead to XSS attack vue/no-v-html 121:3 warning Prop 'buttonAction' requires default value to be set vue/require-default-prop 134:17 warning The "close-dialog" event has been triggered but not declared on `emits` option vue/require-explicit-emits /src/repo/resources/ext.wikilambda.edit/components/base/DialogContainer.vue 21:28 warning The "confirm-dialog" event has been triggered but not declared on `emits` option vue/require-explicit-emits 72:3 warning Prop 'size' requires default value to be set vue/require-default-prop 86:3 warning Prop 'buttonAction' requires default value to be set vue/require-default-prop 112:16 warning The "close-dialog" event has been triggered but not declared on `emits` option vue/require-explicit-emits 116:16 warning The "exit-dialog" event has been triggered but not declared on `emits` option vue/require-explicit-emits /src/repo/resources/ext.wikilambda.edit/components/base/ExpandedToggle.vue 13:26 warning The "toggle" event has been triggered but not declared on `emits` option vue/require-explicit-emits /src/repo/resources/ext.wikilambda.edit/components/base/LeaveEditorDialog.vue 51:16 warning The "close-dialog" event has been triggered but not declared on `emits` option vue/require-explicit-emits /src/repo/resources/ext.wikilambda.edit/components/base/Pagination.vue 83:16 warning The "update-page" event has been triggered but not declared on `emits` option vue/require-explicit-emits 91:18 warning The "update-page" event has been triggered but not declared on `emits` option vue/require-explicit-emits 93:18 warning The "update-page" event has been triggered but not declared on `emits` option vue/require-explicit-emits 95:18 warning The "update-page" event has been triggered but not declared on `emits` option vue/require-explicit-emits 100:16 warning The "reset-view" event has been triggered but not declared on `emits` option vue/require-explicit-emits /src/repo/resources/ext.wikilambda.edit/components/base/PublishDialog.vue 46:11 warning 'v-html' directive can lead to XSS attack vue/no-v-html 89:60 warning 'v-html' directive can lead to XSS attack vue/no-v-html 181:16 warning The "close-dialog" event has been triggered but not declared on `emits` option vue/require-explicit-emits /src/repo/resources/ext.wikilambda.edit/components/base/Select.vue 39:3 warning Prop 'id' requires default value to be set vue/require-default-prop 67:31 warning The "update:selected" event has been triggered but not declared on `emits` option vue/require-explicit-emits /src/repo/resources/ext.wikilambda.edit/components/base/TextInput.vue 45:3 warning Prop 'id' requires default value to be set vue/require-default-prop 57:3 warning Prop 'ariaLabel' requires default value to be set vue/require-default-prop 65:3 warning Prop 'chip' requires default value to be set vue/require-default-prop 81:31 warning The "update:modelValue" event has been triggered but not declared on `emits` option vue/require-explicit-emits /src/repo/resources/ext.wikilambda.edit/components/default-view-types/ZBoolean.vue 64:17 warning The "set-value" event has been triggered but not declared on `emits` option vue/require-explicit-emits /src/repo/resources/ext.wikilambda.edit/components/default-view-types/ZCode.vue 172:17 warning The "set-value" event has been triggered but not declared on `emits` option vue/require-explicit-emits 196:17 warning The "set-value" event has been triggered but not declared on `emits` option vue/require-explicit-emits 206:18 warning The "set-value" event has been triggered but not declared on `emits` option vue/require-explicit-emits /src/repo/resources/ext.wikilambda.edit/components/default-view-types/ZMonolingualString.vue 83:18 warning The "set-value" event has been triggered but not declared on `emits` option vue/require-explicit-emits /src/repo/resources/ext.wikilambda.edit/components/default-view-types/ZObjectKeyValue.vue 190:0 warning The type 'LabelData' is undefined jsdoc/no-undefined-types 529:18 warning The "set-type" event has been triggered but not declared on `emits` option vue/require-explicit-emits 536:18 warning The "set-value" event has been triggered but not declared on `emits` option vue/require-explicit-emits /src/repo/resources/ext.wikilambda.edit/components/default-view-types/ZObjectKeyValueSet.vue 14:3 warning The '<wl-z-object-key-value>' component has been used, but not defined vue/no-undef-components /src/repo/resources/ext.wikilambda.edit/components/default-view-types/ZObjectType.vue 184:17 warning The "set-value" event has been triggered but not declared on `emits` option vue/require-explicit-emits /src/repo/resources/ext.wikilambda.edit/components/default-view-types/ZReference.vue 132:16 warning The "set-value" event has been triggered but not declared on `emits` option vue/require-explicit-emits /src/repo/resources/ext.wikilambda.edit/components/default-view-types/ZString.vue 84:18 warning The "set-value" event has been triggered but not declared on `emits` option vue/require-explicit-emits /src/repo/resources/ext.wikilambda.edit/components/default-view-types/ZTypedList.vue 164:16 warning The "set-type" event has been triggered but not declared on `emits` option vue/require-explicit-emits /src/repo/resources/ext.wikilambda.edit/components/default-view-types/ZTypedListItem.vue 16:3 warning The '<wl-z-object-key-value>' component has been used, but not defined vue/no-undef-components /src/repo/resources/ext.wikilambda.edit/components/function/ZFunctionCallRunner.vue 10:3 warning The '<wl-z-reference>' component has been used, but not defined vue/no-undef-components 10:3 warning The "wl-z-reference" component has been used but not registered vue/no-unregistered-components 17:5 warning The '<wl-z-object-key>' component has been used, but not defined vue/no-undef-components 32:5 warning The '<wl-z-key-mode-selector>' component has been used, but not defined vue/no-undef-components 32:5 warning The "wl-z-key-mode-selector" component has been used but not registered vue/no-unregistered-components 39:6 warning The '<wl-z-object-json>' component has been used, but not defined vue/no-undef-components 44:6 warning The '<wl-z-object-key>' component has been used, but not defined vue/no-undef-components /src/repo/resources/ext.wikilambda.edit/components/function/ZImplementationListItem.vue 14:19 warning The "remove-item" event has been triggered but not declared on `emits` option vue/require-explicit-emits /src/repo/resources/ext.wikilambda.edit/components/function/ZInlineTesterCall.vue 16:4 warning The '<wl-z-object-key>' component has been used, but not defined vue/no-undef-components /src/repo/resources/ext.wikilambda.edit/components/function/ZInlineTesterValidation.vue 9:3 warning The '<wl-z-object-selector>' component has been used, but not defined vue/no-undef-components 25:4 warning The '<wl-z-reference>' component has been used, but not defined vue/no-undef-components 25:4 warning The "wl-z-reference" component has been used but not registered vue/no-unregistered-components 37:5 warning The '<wl-z-object-key>' component has been used, but not defined vue/no-undef-components /src/repo/resources/ext.wikilambda.edit/components/function/ZTesterImplResult.vue 91:16 warning The "set-keys" event has been triggered but not declared on `emits` option vue/require-explicit-emits /src/repo/resources/ext.wikilambda.edit/components/function/ZTesterListItem.vue 14:19 warning The "remove-item" event has been triggered but not declared on `emits` option vue/require-explicit-emits /src/repo/resources/ext.wikilambda.edit/components/function/editor/FunctionEditorAliases.vue 211:17 warning The "updated-alias" event has been triggered but not declared on `emits` option vue/require-explicit-emits 220:17 warning The "updated-alias" event has been triggered but not declared on `emits` option vue/require-explicit-emits 229:17 warning The "updated-alias" event has been triggered but not declared on `emits` option vue/require-explicit-emits /src/repo/resources/ext.wikilambda.edit/components/function/editor/FunctionEditorFooter.vue 67:17 warning The "cancel" event has been triggered but not declared on `emits` option vue/require-explicit-emits /src/repo/resources/ext.wikilambda.edit/components/function/editor/FunctionEditorInputs.vue 209:16 warning The "updated-argument-label" event has been triggered but not declared on `emits` option vue/require-explicit-emits /src/repo/resources/ext.wikilambda.edit/components/function/editor/FunctionEditorInputsItem.vue 277:18 warning The "update-argument-label" event has been triggered but not declared on `emits` option vue/require-explicit-emits 315:16 warning The "active-input" event has been triggered but not declared on `emits` option vue/require-explicit-emits /src/repo/resources/ext.wikilambda.edit/components/function/editor/FunctionEditorName.vue 107:17 warning The "updated-name" event has been triggered but not declared on `emits` option vue/require-explicit-emits /src/repo/resources/ext.wikilambda.edit/components/function/viewer/FunctionViewerDetails.vue 454:4 error ES2018 'Promise.prototype.finally' method is forbidden es-x/no-promise-prototype-finally 470:4 error ES2018 'Promise.prototype.finally' method is forbidden es-x/no-promise-prototype-finally 486:4 error ES2018 'Promise.prototype.finally' method is forbidden es-x/no-promise-prototype-finally 502:4 error ES2018 'Promise.prototype.finally' method is forbidden es-x/no-promise-prototype-finally /src/repo/resources/ext.wikilambda.edit/components/function/viewer/FunctionViewerSidebar.vue 84:16 warning The "changeShowLangs" event has been triggered but not declared on `emits` option vue/require-explicit-emits /src/repo/resources/ext.wikilambda.edit/components/function/viewer/details/FunctionViewerDetailsTable.vue 139:16 warning The "update-page" event has been triggered but not declared on `emits` option vue/require-explicit-emits 142:16 warning The "reset-view" event has been triggered but not declared on `emits` option vue/require-explicit-emits 145:16 warning The "approve" event has been triggered but not declared on `emits` option vue/require-explicit-emits 148:16 warning The "deactivate" event has been triggered but not declared on `emits` option vue/require-explicit-emits /src/repo/resources/ext.wikilambda.edit/components/function/viewer/details/ZMetadataDialog.vue 42:4 warning 'v-html' directive can lead to XSS attack vue/no-v-html 106:16 warning The "close-dialog" event has been triggered but not declared on `emits` option vue/require-explicit-emits /src/repo/resources/ext.wikilambda.edit/components/main-types/ZArgumentList.vue 11:4 warning The '<wl-z-list-item>' component has been used, but not defined vue/no-undef-components 11:4 warning The "wl-z-list-item" component has been used but not registered vue/no-unregistered-components /src/repo/resources/ext.wikilambda.edit/components/main-types/ZCode.vue 184:17 warning The "select-language" event has been triggered but not declared on `emits` option vue/require-explicit-emits 201:18 warning The "update-code" event has been triggered but not declared on `emits` option vue/require-explicit-emits /src/repo/resources/ext.wikilambda.edit/components/main-types/ZFunctionCallToType.vue 21:4 warning The '<wl-z-object>' component has been used, but not defined vue/no-undef-components /src/repo/resources/ext.wikilambda.edit/components/main-types/ZImplementation.vue 58:3 warning The '<wl-z-object>' component has been used, but not defined vue/no-undef-components /src/repo/resources/ext.wikilambda.edit/components/main-types/ZKey.vue 27:4 warning The '<wl-z-object-selector>' component has been used, but not defined vue/no-undef-components 37:3 warning The '<wl-z-object-key-list>' component has been used, but not defined vue/no-undef-components /src/repo/resources/ext.wikilambda.edit/components/main-types/ZListItem.vue 14:19 warning The "remove-item" event has been triggered but not declared on `emits` option vue/require-explicit-emits 26:3 warning The '<wl-z-object>' component has been used, but not defined vue/no-undef-components /src/repo/resources/ext.wikilambda.edit/components/main-types/ZMultilingualString.vue 107:17 warning The "change" event has been triggered but not declared on `emits` option vue/require-explicit-emits 142:17 warning The "delete-lang" event has been triggered but not declared on `emits` option vue/require-explicit-emits /src/repo/resources/ext.wikilambda.edit/components/main-types/ZResponseEnvelope.vue 66:10 warning 'v-html' directive can lead to XSS attack vue/no-v-html /src/repo/resources/ext.wikilambda.edit/components/main-types/ZType.vue 25:6 warning The '<wl-z-object>' component has been used, but not defined vue/no-undef-components 33:6 warning The '<wl-z-object>' component has been used, but not defined vue/no-undef-components /src/repo/resources/ext.wikilambda.edit/components/main-types/ZTypedPair.vue 32:5 warning The '<wl-z-object>' component has been used, but not defined vue/no-undef-components 40:5 warning The '<wl-z-object>' component has been used, but not defined vue/no-undef-components /src/repo/resources/ext.wikilambda.edit/mixins/portray.js 99:10 error ES2016 'Array.prototype.includes' method is forbidden es-x/no-array-prototype-includes 148:32 error Unexpected comparison to newly constructed object. These two values can never be equal no-constant-binary-expression /src/repo/resources/ext.wikilambda.edit/mixins/schemata.js 204:3 error Definition for rule 'es/no-object-entries' was not found es/no-object-entries 205:3 error ES2017 'Object.entries' method is forbidden es-x/no-object-entries 350:3 error Definition for rule 'es/no-object-entries' was not found es/no-object-entries 351:3 error ES2017 'Object.entries' method is forbidden es-x/no-object-entries /src/repo/resources/ext.wikilambda.edit/store/modules/zobject.js 1834:3 warning JSDoc @return declaration present but return expression not available in function jsdoc/require-returns-check /src/repo/resources/ext.wikilambda.edit/views/FunctionEditor.vue 27:15 warning The "mounted" event has been triggered but not declared on `emits` option vue/require-explicit-emits /src/repo/resources/ext.wikilambda.edit/views/FunctionViewer.vue 81:15 warning The "mounted" event has been triggered but not declared on `emits` option vue/require-explicit-emits /src/repo/resources/ext.wikilambda.edit/views/ZObjectEditor.vue 122:15 warning The "mounted" event has been triggered but not declared on `emits` option vue/require-explicit-emits /src/repo/resources/ext.wikilambda.edit/views/ZObjectViewer.vue 55:15 warning The "mounted" event has been triggered but not declared on `emits` option vue/require-explicit-emits /src/repo/tests/jest/components/App.test.js 63:120 error ES2017 async function declarations are forbidden es-x/no-async-functions 80:104 error ES2017 async function declarations are forbidden es-x/no-async-functions /src/repo/tests/jest/components/ZCode.test.js 115:40 error ES2017 async function declarations are forbidden es-x/no-async-functions /src/repo/tests/jest/components/ZFunctionCall.test.js 60:70 error ES2017 async function declarations are forbidden es-x/no-async-functions 76:103 error ES2017 async function declarations are forbidden es-x/no-async-functions /src/repo/tests/jest/components/ZObjectKey.test.js 47:66 error ES2017 async function declarations are forbidden es-x/no-async-functions /src/repo/tests/jest/components/ZObjectPublish.test.js 63:74 error ES2017 async function declarations are forbidden es-x/no-async-functions 74:83 error ES2017 async function declarations are forbidden es-x/no-async-functions 92:99 error ES2017 async function declarations are forbidden es-x/no-async-functions 112:81 error ES2017 async function declarations are forbidden es-x/no-async-functions 131:52 error ES2017 async function declarations are forbidden es-x/no-async-functions 162:45 error ES2017 async function declarations are forbidden es-x/no-async-functions 193:56 error ES2017 async function declarations are forbidden es-x/no-async-functions /src/repo/tests/jest/components/ZResponseEnvelope.test.js 79:73 error ES2017 async function declarations are forbidden es-x/no-async-functions /src/repo/tests/jest/components/default/ZBoolean.test.js 71:50 error ES2017 async function declarations are forbidden es-x/no-async-functions /src/repo/tests/jest/components/default/ZCode.test.js 79:41 error ES2017 async function declarations are forbidden es-x/no-async-functions /src/repo/tests/jest/components/default/ZMonolingualString.test.js 85:62 error ES2017 async function declarations are forbidden es-x/no-async-functions /src/repo/tests/jest/components/default/ZObjectKeyValue.test.js 291:73 error ES2017 async function declarations are forbidden es-x/no-async-functions 477:48 error ES2017 async function declarations are forbidden es-x/no-async-functions 508:47 error ES2017 async function declarations are forbidden es-x/no-async-functions 536:69 error ES2017 async function declarations are forbidden es-x/no-async-functions /src/repo/tests/jest/components/default/ZObjectType.test.js 84:108 error ES2017 async function declarations are forbidden es-x/no-async-functions 128:41 error ES2017 async function declarations are forbidden es-x/no-async-functions 147:56 error ES2017 async function declarations are forbidden es-x/no-async-functions 176:89 error ES2017 async function declarations are forbidden es-x/no-async-functions /src/repo/tests/jest/components/default/ZReference.test.js 84:122 error ES2017 async function declarations are forbidden es-x/no-async-functions 98:110 error ES2017 async function declarations are forbidden es-x/no-async-functions 122:47 error ES2017 async function declarations are forbidden es-x/no-async-functions /src/repo/tests/jest/components/default/ZString.test.js 38:48 error ES2017 async function declarations are forbidden es-x/no-async-functions 51:4 error ES2017 async function declarations are forbidden es-x/no-async-functions 63:105 error ES2017 async function declarations are forbidden es-x/no-async-functions /src/repo/tests/jest/components/default/ZTypedList.test.js 134:66 error ES2017 async function declarations are forbidden es-x/no-async-functions /src/repo/tests/jest/components/default/ZTypedListType.test.js 63:55 error ES2017 async function declarations are forbidden es-x/no-async-functions /src/repo/tests/jest/components/editor/LeaveEditorDialog.test.js 31:74 error ES2017 async function declarations are forbidden es-x/no-async-functions 50:78 error ES2017 async function declarations are forbidden es-x/no-async-functions /src/repo/tests/jest/components/function/ZFunctionCallRunner.test.js 74:96 error ES2017 async function declarations are forbidden es-x/no-async-functions /src/repo/tests/jest/components/function/ZFunctionTesterReport.test.js 105:111 error ES2017 async function declarations are forbidden es-x/no-async-functions 143:103 error ES2017 async function declarations are forbidden es-x/no-async-functions /src/repo/tests/jest/components/function/editor/FunctionEditorAliases.test.js 175:53 error ES2017 async function declarations are forbidden es-x/no-async-functions /src/repo/tests/jest/components/function/viewer/FunctionViewerAbout.test.js 44:71 error ES2017 async function declarations are forbidden es-x/no-async-functions 51:75 error ES2017 async function declarations are forbidden es-x/no-async-functions 87:51 error ES2017 async function declarations are forbidden es-x/no-async-functions 114:81 error ES2017 async function declarations are forbidden es-x/no-async-functions /src/repo/tests/jest/components/function/viewer/FunctionViewerAboutAliases.test.js 176:68 error ES2017 async function declarations are forbidden es-x/no-async-functions 183:103 error ES2017 async function declarations are forbidden es-x/no-async-functions /src/repo/tests/jest/components/function/viewer/FunctionViewerDetailsSidebar.test.js 116:97 error ES2017 async function declarations are forbidden es-x/no-async-functions /src/repo/tests/jest/integration/AttachFunctionImplementation.test.js 39:52 error ES2017 async function declarations are forbidden es-x/no-async-functions /src/repo/tests/jest/integration/AttachFunctionTester.test.js 37:44 error ES2017 async function declarations are forbidden es-x/no-async-functions /src/repo/tests/jest/integration/CancelEditExistingFunction.test.js 72:43 error ES2017 async function declarations are forbidden es-x/no-async-functions 83:41 error ES2017 async function declarations are forbidden es-x/no-async-functions /src/repo/tests/jest/integration/CancelEditNewFunction.test.js 52:43 error ES2017 async function declarations are forbidden es-x/no-async-functions 63:41 error ES2017 async function declarations are forbidden es-x/no-async-functions /src/repo/tests/jest/integration/CreateNewCodeImplementation.test.js 28:51 error ES2017 async function declarations are forbidden es-x/no-async-functions /src/repo/tests/jest/integration/CreateNewCompositionImplementation.test.js 29:58 error ES2017 async function declarations are forbidden es-x/no-async-functions /src/repo/tests/jest/integration/CreateNewFunction.test.js 60:79 error ES2017 async function declarations are forbidden es-x/no-async-functions 131:15 error ES2017 async function declarations are forbidden es-x/no-async-functions /src/repo/tests/jest/integration/CreateNewTester.test.js 88:38 error ES2017 async function declarations are forbidden es-x/no-async-functions /src/repo/tests/jest/integration/DetachFunctionImplementation.test.js 33:52 error ES2017 async function declarations are forbidden es-x/no-async-functions /src/repo/tests/jest/integration/DetachFunctionTester.test.js 34:44 error ES2017 async function declarations are forbidden es-x/no-async-functions /src/repo/tests/jest/integration/EditFunction.test.js 86:76 error ES2017 async function declarations are forbidden es-x/no-async-functions 146:15 error ES2017 async function declarations are forbidden es-x/no-async-functions /src/repo/tests/jest/integration/EvaluateFunctionCall.test.js 85:51 error ES2017 async function declarations are forbidden es-x/no-async-functions /src/repo/tests/jest/integration/FunctionEditorEdgeCases.test.js 71:102 error ES2017 async function declarations are forbidden es-x/no-async-functions /src/repo/tests/jest/integration/helpers/interactionHelpers.js 13:27 error ES2017 async function declarations are forbidden es-x/no-async-functions /src/repo/tests/jest/store/modules/zTesterResults.test.js 288:45 error ES2017 async function declarations are forbidden es-x/no-async-functions 314:40 error ES2017 async function declarations are forbidden es-x/no-async-functions /src/repo/tests/jest/store/modules/zobject.test.js 1966:27 error ES2017 async function declarations are forbidden es-x/no-async-functions 1988:35 error ES2017 async function declarations are forbidden es-x/no-async-functions /src/repo/tests/selenium/pageobjects/FunctionForm.page.js 55:9 error Unexpected browser.pause() not allowed wdio/no-pause ✖ 183 problems (79 errors, 104 warnings) --- end --- $ ./node_modules/.bin/eslint . -f json --- stdout --- [{"filePath":"/src/repo/.eslintrc.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/.stylelintrc.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/Gruntfile.js","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/authorization-rules.yml","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/composer.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/docker-compose.sample.yml","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/extension.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/ab.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/ace.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/acm.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/af.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/anp.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/api/bn.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/api/cu.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/api/cy.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/api/dag.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/api/de-formal.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/api/de.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/api/en.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/api/es.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/api/fr.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/api/he.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/api/hr.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/api/ia.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/api/id.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/api/io.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/api/it.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/api/ja.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/api/kcg.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/api/ko.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/api/lt.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/api/mg.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/api/mk.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/api/mrh.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/api/nb.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/api/nl.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/api/om.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/api/pt-br.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/api/pt.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/api/qqq.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/api/sd.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/api/sl.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/api/sms.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/api/sr-ec.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/api/sr-el.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/api/sv.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/api/tr.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/api/uk.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/api/zh-hans.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/api/zh-hant.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/ar.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/arn.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/ary.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/as.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/azb.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/be.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/bg.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/blk.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/bn.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/bnn.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/br.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/ca.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/ckb.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/crh-latn.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/cs.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/cu.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/cy.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/da.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/dag.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/de.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/dga.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/diq.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/el.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/en.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/eo.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/es.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/fa.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/fat.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/fi.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/fr.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/frc.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/gl.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/gld.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/gor.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/grc.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/gu.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/gur.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/guw.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/ha.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/haw.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/he.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/hi.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/hr.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/ht.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/hu.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/hy.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/hyw.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/ia.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/id.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/ig.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/igl.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/io.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/it.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/ja.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/ka.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/kaa.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/kck.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/kg.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/kn.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/ko.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/krc.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/ks-arab.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/ku-latn.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/kus.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/lb.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/lld.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/lmo.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/lt.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/lv.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/mak.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/mey.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/mk.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/mnw.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/mrh.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/ms-arab.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/ms.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/mt.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/my.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/nb.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/ne.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/nl.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/nn.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/nqo.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/nyn.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/om.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/pl.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/pnb.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/pt-br.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/pt.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/qqq.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/rki.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/rn.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/roa-tara.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/rsk.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/ru.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/scn.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/sd.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/sdc.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/se.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/sh.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/si.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/sje.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/skr-arab.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/sl.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/smn.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/sms.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/sr-ec.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/sr-el.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/sro.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/sv.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/sw.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/syl.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/ta.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/tcy.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/te.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/th.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/tk.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/tl.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/tn.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/tok.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/tr.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/tt-cyrl.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/tw.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/udm.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/uk.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/uz.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/vi.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/xmf.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/yi.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/yue.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/zgh.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/zh-hans.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/i18n/zh-hant.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/jest.config.js","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/jest.setup.js","messages":[],"suppressedMessages":[{"ruleId":"no-implicit-globals","severity":2,"message":"Unexpected function declaration in the global scope, wrap in an IIFE for a local variable, assign as global property for a global variable.","line":23,"column":1,"nodeType":"FunctionDeclaration","messageId":"globalNonLexicalBinding","endLine":23,"endColumn":18,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-undef","severity":2,"message":"'__dirname' is not defined.","line":41,"column":65,"nodeType":"Identifier","messageId":"undef","endLine":41,"endColumn":74,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-console","severity":2,"message":"Unexpected console statement.","line":96,"column":3,"nodeType":"MemberExpression","messageId":"unexpected","endLine":96,"endColumn":14,"suppressions":[{"kind":"directive","justification":""}]}],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/jsdoc.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/package-lock.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/package.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/resources/ext.wikilambda.edit/.eslintrc.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/resources/ext.wikilambda.edit/Constants.js","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/resources/ext.wikilambda.edit/components/App.vue","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/resources/ext.wikilambda.edit/components/ZKeyModeSelector.vue","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/resources/ext.wikilambda.edit/components/ZObject.vue","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/resources/ext.wikilambda.edit/components/ZObjectGeneric.vue","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/resources/ext.wikilambda.edit/components/ZObjectJson.vue","messages":[{"ruleId":"vue/require-default-prop","severity":1,"message":"Prop 'zobjectRaw' requires default value to be set.","line":60,"column":3,"nodeType":"Property","messageId":"missingDefault","endLine":62,"endColumn":4}],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"<template>\n\t<!--\n\t\tWikiLambda Vue component for the JSON rendering for ZObjects.\n\n\t\t@copyright 2020– Abstract Wikipedia team; see AUTHORS.txt\n\t\t@license MIT\n\t-->\n\t<div class=\"ext-wikilambda-json\">\n\t\t<wl-code-editor\n\t\t\tv-clickout=\"onClickoutHandler\"\n\t\t\tmode=\"json\"\n\t\t\t:value=\"initialJson\"\n\t\t\t:read-only=\"readonly || viewmode\"\n\t\t\t@change=\"codeChangeHandler\"\n\t\t></wl-code-editor>\n\t</div>\n</template>\n\n<script>\nvar mapGetters = require( 'vuex' ).mapGetters,\n\tmapActions = require( 'vuex' ).mapActions,\n\ttypeUtils = require( '../mixins/typeUtils.js' ),\n\tschemata = require( '../mixins/schemata.js' ),\n\tCodeEditor = require( './base/CodeEditor.vue' );\n\n// @vue/component\nmodule.exports = exports = {\n\tname: 'wl-z-object-json',\n\tcomponents: {\n\t\t'wl-code-editor': CodeEditor\n\t},\n\tdirectives: {\n\t\tclickout: {\n\t\t\tbeforeMount: function ( el, binding ) {\n\t\t\t\tel.clickout = {\n\t\t\t\t\tstop: function ( e ) {\n\t\t\t\t\t\te.stopPropagation();\n\t\t\t\t\t}\n\t\t\t\t};\n\n\t\t\t\tdocument.body.addEventListener( 'click', binding.value );\n\t\t\t\tel.addEventListener( 'click', el.clickout.stop );\n\t\t\t},\n\t\t\tunmounted: function ( el, binding ) {\n\t\t\t\tdocument.body.removeEventListener( 'click', binding.value );\n\t\t\t\tel.removeEventListener( 'click', el.clickout.stop );\n\t\t\t}\n\t\t}\n\t},\n\tmixins: [ typeUtils, schemata ],\n\tinject: {\n\t\tviewmode: { default: false }\n\t},\n\tprops: {\n\t\tzobjectId: {\n\t\t\ttype: Number,\n\t\t\trequired: false,\n\t\t\tdefault: 0\n\t\t},\n\t\tzobjectRaw: {\n\t\t\ttype: [ Object, String ]\n\t\t},\n\t\treadonly: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false\n\t\t}\n\t},\n\tdata: function () {\n\t\treturn {\n\t\t\tcodeEditorState: '',\n\t\t\tinitialJson: ''\n\t\t};\n\t},\n\tcomputed: $.extend( {},\n\t\tmapGetters( [ 'getZObjectAsJsonById', 'getZObjectById' ] ),\n\t\t{\n\t\t\tzobject: function () {\n\t\t\t\treturn this.getZObjectById( this.zobjectId );\n\t\t\t},\n\t\t\tzobjectJson: function () {\n\t\t\t\tif ( this.zobjectRaw !== undefined ) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\treturn typeof this.zobjectRaw === 'string' ?\n\t\t\t\t\t\t\tJSON.parse( this.zobjectRaw ) :\n\t\t\t\t\t\t\tthis.zobjectRaw;\n\t\t\t\t\t} catch ( err ) {\n\t\t\t\t\t\treturn this.zobjectRaw;\n\t\t\t\t\t}\n\t\t\t\t} else if ( this.zobject ) {\n\t\t\t\t\treturn this.getZObjectAsJsonById( this.zobjectId, this.zobject.value === 'array' );\n\t\t\t\t}\n\t\t\t\treturn '';\n\t\t\t},\n\t\t\tcanonicalJson: function () {\n\t\t\t\treturn JSON.stringify( this.canonicalizeZObject( this.zobjectJson ), null, 4 );\n\t\t\t}\n\t\t}\n\t),\n\tmethods: $.extend( {},\n\t\tmapActions( [\n\t\t\t'setIsZObjectDirty'\n\t\t] ),\n\t\t{\n\t\t\tcodeChangeHandler: function ( val ) {\n\t\t\t\tthis.codeEditorState = val;\n\t\t\t\t// this will ensure non-clickout events\n\t\t\t\t// (like clicking the submit button directly) still get processed the same way\n\t\t\t\t// however this will trigger a lot of false positives so there is probably a smarter way to do this\n\t\t\t\t// TODO (T301286): find a more performant solution\n\t\t\t\tthis.onClickoutHandler();\n\t\t\t},\n\t\t\tonClickoutHandler: function () {\n\t\t\t\tif ( this.readonly ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tvar json,\n\t\t\t\t\tself = this;\n\t\t\t\tif ( this.zobjectId !== undefined ) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tjson = JSON.parse( this.codeEditorState );\n\t\t\t\t\t} catch ( error ) {\n\t\t\t\t\t\t// JSON parse failed, do nothing\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tthis.$store.dispatch( 'injectZObject', {\n\t\t\t\t\t\tzobject: json,\n\t\t\t\t\t\tkey: this.zobject.key,\n\t\t\t\t\t\tid: this.zobjectId,\n\t\t\t\t\t\tparent: this.zobject.parent\n\t\t\t\t\t} ).then( function ( newType ) {\n\t\t\t\t\t\tif ( self.isValidZidFormat( newType ) ) {\n\t\t\t\t\t\t\tself.$emit( 'change-literal', newType );\n\t\t\t\t\t\t}\n\t\t\t\t\t} ).catch( function ( error ) {\n\t\t\t\t\t\tthrow error;\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t\tthis.setIsZObjectDirty( true );\n\t\t\t}\n\t\t}\n\t),\n\twatch: {\n\t\tzobjectRaw: function () {\n\t\t\tthis.codeEditorState = this.canonicalJson;\n\t\t\tthis.initialJson = this.canonicalJson;\n\t\t}\n\t},\n\tmounted: function () {\n\t\tthis.codeEditorState = this.canonicalJson;\n\t\tthis.initialJson = this.canonicalJson;\n\t}\n};\n</script>\n\n<style lang=\"less\">\n.ext-wikilambda-json {\n\twhite-space: pre-wrap;\n\tfont-family: 'Courier New', 'Courier', monospace;\n\twidth: 100%;\n}\n</style>\n","usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/resources/ext.wikilambda.edit/components/ZObjectKey.vue","messages":[{"ruleId":"vue/no-undef-components","severity":1,"message":"The '<wl-z-object>' component has been used, but not defined.","line":34,"column":5,"nodeType":"VStartTag","messageId":"undef","endLine":39,"endColumn":6},{"ruleId":"vue/no-undef-components","severity":1,"message":"The '<wl-z-object>' component has been used, but not defined.","line":76,"column":4,"nodeType":"VStartTag","messageId":"undef","endLine":82,"endColumn":5}],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":"<template>\n\t<!--\n\t\tWikiLambda Vue interface module for generic ZObject manipulation.\n\n\t\t@copyright 2020– Abstract Wikipedia team; see AUTHORS.txt\n\t\t@license MIT\n\t-->\n\t<div :class=\"classZObjectKey\">\n\t\t<!-- zKey label -->\n\t\t<label\n\t\t\tv-if=\"zKey\"\n\t\t\t:id=\"'ext-wikilambda-zobject-key-label-' + zKey\">\n\t\t\t{{ zKeyLabel }}\n\t\t</label>\n\n\t\t<!-- If type isn't selected, show type selector -->\n\t\t<wl-z-object-selector\n\t\t\tv-if=\"!zType\"\n\t\t\t:aria-labelledby=\"'ext-wikilambda-zobject-key-label-' + zKey\"\n\t\t\t:type=\"Constants.Z_TYPE\"\n\t\t\t:return-type=\"Constants.Z_TYPE\"\n\t\t\t:placeholder=\"$i18n( 'wikilambda-typeselector-label' ).text()\"\n\t\t\t@input=\"onTypeChange\"\n\t\t></wl-z-object-selector>\n\n\t\t<!-- If there's a type, we render the appropriate component -->\n\t\t<div\n\t\t\tv-else\n\t\t\tclass=\"ext-wikilambda-zobject-key-value\"\n\t\t\t:aria-labelledby=\"'ext-wikilambda-zobject-key-label-' + zKey\">\n\t\t\t<!-- Check if zobject is actually a list -->\n\t\t\t<span v-if=\"zType === Constants.Z_TYPED_LIST && zListType.key === '0'\">\n\t\t\t\t{{ zTypeLabel }} →\n\t\t\t\t<wl-z-object\n\t\t\t\t\t:zobject-id=\"zListType.id\"\n\t\t\t\t\t:persistent=\"false\"\n\t\t\t\t\t:readonly=\"readonly\"\n\t\t\t\t\t:reference-type=\"Constants.Z_TYPE\"\n\t\t\t\t></wl-z-object>\n\t\t\t</span>\n\t\t\t<span v-else>\n\t\t\t\t<a :href=\"zTypeLink\" :target=\"!viewmode ? '_self' : ''\">{{ zTypeLabel }}</a>\n\t\t\t</span>\n\n\t\t\t<wl-z-key-mode-selector\n\t\t\t\tv-if=\"!( viewmode || readonly ) &&\n\t\t\t\t\tselectedMode && !isIdentityKey &&\n\t\t\t\t\tzType !== Constants.Z_OBJECT &&\n\t\t\t\t\tzType !== Constants.Z_TYPED_LIST\"\n\t\t\t\t:mode=\"selectedMode\"\n\t\t\t\t:parent-type=\"parentType\"\n\t\t\t\t:literal-type=\"literalType\"\n\t\t\t\t@change=\"onModeChange\"\n\t\t\t></wl-z-key-mode-selector>\n\t\t\t<wl-z-object-generic\n\t\t\t\tv-if=\"selectedMode === Constants.Z_KEY_MODES.GENERIC_LITERAL\"\n\t\t\t\t:zobject-id=\"zobjectId\"\n\t\t\t\t:type=\"zType\"\n\t\t\t\t:persistent=\"false\"\n\t\t\t\t:readonly=\"readonly\"\n\t\t\t></wl-z-object-generic>\n\t\t\t<wl-z-reference\n\t\t\t\tv-else-if=\"selectedMode === Constants.Z_KEY_MODES.REFERENCE\"\n\t\t\t\t:zobject-id=\"zobjectId\"\n\t\t\t\t:readonly=\"readonly\"\n\t\t\t\t:search-type=\"literalType\"\n\t\t\t></wl-z-reference>\n\t\t\t<wl-z-object-json\n\t\t\t\tv-else-if=\"selectedMode === Constants.Z_KEY_MODES.JSON\"\n\t\t\t\t:zobject-id=\"zobjectId\"\n\t\t\t\t:readonly=\"readonly\"\n\t\t\t\t@change-literal=\"onliteralChange\"\n\t\t\t></wl-z-object-json>\n\t\t\t<!-- Constants.Z_KEY_MODES.FUNCTION_CALL -->\n\t\t\t<!-- Constants.Z_KEY_MODES.LITERAL -->\n\t\t\t<wl-z-object\n\t\t\t\tv-else\n\t\t\t\t:zobject-id=\"zobjectId\"\n\t\t\t\t:persistent=\"false\"\n\t\t\t\t:parent-type=\"parentType\"\n\t\t\t\t:readonly=\"readonly\"\n\t\t\t></wl-z-object>\n\t\t</div>\n\t</div>\n</template>\n\n<script>\nvar Constants = require( '../Constants.js' ),\n\tZObjectSelector = require( './ZObjectSelector.vue' ),\n\tZKeyModeSelector = require( './ZKeyModeSelector.vue' ),\n\tZReference = require( './main-types/ZReference.vue' ),\n\tZObjectJson = require( './ZObjectJson.vue' ),\n\tZObjectGeneric = require( './ZObjectGeneric.vue' ),\n\tmapState = require( 'vuex' ).mapState,\n\tmapActions = require( 'vuex' ).mapActions,\n\tmapGetters = require( 'vuex' ).mapGetters,\n\ttypeUtils = require( '../mixins/typeUtils.js' );\n\n// @vue/component\nmodule.exports = exports = {\n\tname: 'wl-z-object-key',\n\tcomponents: {\n\t\t'wl-z-object-selector': ZObjectSelector,\n\t\t'wl-z-reference': ZReference,\n\t\t'wl-z-key-mode-selector': ZKeyModeSelector,\n\t\t'wl-z-object-json': ZObjectJson,\n\t\t'wl-z-object-generic': ZObjectGeneric\n\t},\n\tmixins: [ typeUtils ],\n\tinject: {\n\t\tviewmode: { default: false }\n\t},\n\tprops: {\n\t\tzKey: {\n\t\t\ttype: String,\n\t\t\tdefault: ''\n\t\t},\n\t\tzobjectId: {\n\t\t\ttype: Number,\n\t\t\trequired: true\n\t\t},\n\t\tparentType: {\n\t\t\ttype: String,\n\t\t\trequired: true\n\t\t},\n\t\treadonly: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false\n\t\t}\n\t},\n\tdata: function () {\n\t\treturn {\n\t\t\tConstants: Constants,\n\t\t\tselectedMode: Constants.Z_KEY_MODES.LITERAL,\n\t\t\tliteralType: Constants.Z_KEY_MODES.LITERAL\n\t\t};\n\t},\n\tcomputed: $.extend( {},\n\t\tmapState( [\n\t\t\t'zKeys'\n\t\t] ),\n\t\tmapGetters( [\n\t\t\t'getZObjectTypeById',\n\t\t\t'getListTypeById',\n\t\t\t'getZkeyLiteralType',\n\t\t\t'getTypeByMode',\n\t\t\t'getZkeyLabels',\n\t\t\t'getModeByType',\n\t\t\t'getCurrentZObjectId',\n\t\t\t'getZObjectChildrenById'\n\t\t] ),\n\t\t{\n\t\t\tclassZObjectKey: function () {\n\t\t\t\treturn {\n\t\t\t\t\t'ext-wikilambda-zobject-key': true,\n\t\t\t\t\t'ext-wikilambda-zobject-key-inline': this.isInlineType\n\t\t\t\t};\n\t\t\t},\n\t\t\tisInlineType: function () {\n\t\t\t\treturn [\n\t\t\t\t\tConstants.Z_FUNCTION_CALL,\n\t\t\t\t\tConstants.Z_STRING,\n\t\t\t\t\tConstants.Z_REFERENCE,\n\t\t\t\t\tConstants.Z_BOOLEAN,\n\t\t\t\t\tConstants.Z_ARGUMENT_REFERENCE\n\t\t\t\t].indexOf( this.zType ) !== -1;\n\t\t\t},\n\t\t\tzType: function () {\n\t\t\t\treturn this.getZObjectTypeById( this.zobjectId );\n\t\t\t},\n\t\t\tzListType: function () {\n\t\t\t\tif ( this.zType === Constants.Z_TYPED_LIST ) {\n\t\t\t\t\treturn this.getListTypeById( this.zobjectId );\n\t\t\t\t}\n\t\t\t\treturn { id: Constants.NEW_ZID_PLACEHOLDER };\n\t\t\t},\n\t\t\tzKeyLabel: function () {\n\t\t\t\tvar label = this.getZkeyLabels[ this.zKey ];\n\t\t\t\tif ( label ) {\n\t\t\t\t\treturn label + ':';\n\t\t\t\t}\n\n\t\t\t\treturn;\n\t\t\t},\n\t\t\tzTypeLabel: function () {\n\t\t\t\treturn this.getZkeyLabels[ this.zType ];\n\t\t\t},\n\t\t\treferenceValue: function () {\n\t\t\t\treturn this.findKeyInArray(\n\t\t\t\t\tConstants.Z_REFERENCE_ID,\n\t\t\t\t\tthis.getZObjectChildrenById( this.zobjectId ) )\n\t\t\t\t\t.value;\n\t\t\t},\n\t\t\tisIdentityKey: function () {\n\t\t\t\treturn this.zType === Constants.Z_REFERENCE &&\n\t\t\t\t\tthis.referenceValue === this.getCurrentZObjectId;\n\t\t\t},\n\t\t\tzTypeLink: function () {\n\t\t\t\treturn new mw.Title( this.zType ).getUrl();\n\t\t\t}\n\t\t}\n\t),\n\tmethods: $.extend( {},\n\t\tmapActions( [ 'changeType', 'fetchZKeys' ] ),\n\t\t{\n\t\t\t/**\n\t\t\t * Sets the type of a ZObject key.\n\t\t\t *\n\t\t\t * @param {string} type\n\t\t\t */\n\t\t\tonTypeChange: function ( type ) {\n\t\t\t\tvar payload;\n\t\t\t\tif ( type ) {\n\t\t\t\t\tpayload = {\n\t\t\t\t\t\tid: this.zobjectId,\n\t\t\t\t\t\ttype: type\n\t\t\t\t\t};\n\t\t\t\t\tthis.literalType = type;\n\t\t\t\t\tthis.changeType( payload );\n\t\t\t\t}\n\t\t\t},\n\t\t\tonliteralChange: function ( type ) {\n\t\t\t\tthis.literalType = type;\n\t\t\t},\n\t\t\tonModeChange: function ( mode ) {\n\t\t\t\tvar selectedModeType = this.getTypeByMode( { selectedMode: mode, literalType: this.literalType } );\n\n\t\t\t\tif ( selectedModeType !== this.zType ) {\n\t\t\t\t\t// If the mode selector generates a zobject content change, call changeType\n\t\t\t\t\tthis.changeType( { id: this.zobjectId, type: selectedModeType } );\n\t\t\t\t} else {\n\t\t\t\t\t// Else, simply change the view without changing the content\n\t\t\t\t\tthis.selectedMode = mode;\n\t\t\t\t}\n\t\t\t}\n\t\t} ),\n\twatch: {\n\t\tzType: {\n\t\t\timmediate: true,\n\t\t\thandler: function () {\n\t\t\t\tthis.selectedMode = this.getModeByType( this.zType );\n\t\t\t}\n\t\t}\n\t},\n\tbeforeCreate: function () {\n\t\tthis.$options.components[ 'wl-z-object' ] = require( './ZObject.vue' );\n\t},\n\tmounted: function () {\n\t\tif ( this.getZkeyLiteralType( this.zKey ) ) {\n\t\t\tthis.literalType = this.getZkeyLiteralType( this.zKey );\n\t\t} else {\n\t\t\tthis.fetchZKeys( { zids: [ Constants.Z_KEY ] } ).then( () => {\n\t\t\t\tthis.literalType = this.getZkeyLiteralType( this.zKey );\n\t\t\t} );\n\t\t}\n\t}\n};\n</script>\n\n<style lang=\"less\">\n.ext-wikilambda-zobject-key {\n\tdisplay: inline-block;\n\tvertical-align: top;\n\twidth: 100%;\n}\n\n.ext-wikilambda-zobject-key > span {\n\tdisplay: inline-block;\n\tvertical-align: top;\n\tmargin-top: 5px;\n}\n\n.ext-wikilambda-zobject-key-inline {\n\tdisplay: inline;\n}\n\n.ext-wikilambda-zobject-key-value {\n\tdisplay: inline;\n}\n</style>\n","usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/resources/ext.wikilambda.edit/components/ZObjectKeyList.vue","messages":[{"ruleId":"vue/no-undef-components","severity":1,"message":"The '<wl-z-object-key>' component has been used, but not defined.","line":18,"column":4,"nodeType":"VStartTag","messageId":"undef","endLine":23,"endColumn":5}],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"<template>\n\t<!--\n\t\tWikiLambda Vue interface module for generic ZObject manipulation.\n\n\t\t@copyright 2020– Abstract Wikipedia team; see AUTHORS.txt\n\t\t@license MIT\n\t-->\n\t<ul class=\"ext-wikilambda-zobject-key-list\">\n\t\t<li v-for=\"( value, key ) in zObjectWithoutPersistent\" :key=\"key\">\n\t\t\t<cdx-button\n\t\t\t\tv-if=\"!( viewmode || readonly )\"\n\t\t\t\t:title=\"tooltipRemoveZObjectKey\"\n\t\t\t\taction=\"destructive\"\n\t\t\t\t@click=\"removeKey( value.id )\"\n\t\t\t>\n\t\t\t\t{{ $i18n( 'wikilambda-editor-removeitem' ).text() }}\n\t\t\t</cdx-button>\n\t\t\t<wl-z-object-key\n\t\t\t\t:z-key=\"value.key\"\n\t\t\t\t:zobject-id=\"value.id\"\n\t\t\t\t:parent-type=\"zObjectType\"\n\t\t\t\t:readonly=\"readonly\"\n\t\t\t>\n\t\t\t</wl-z-object-key>\n\t\t</li>\n\t</ul>\n</template>\n\n<script>\nvar Constants = require( '../Constants.js' ),\n\ttypeUtils = require( '../mixins/typeUtils.js' ),\n\tCdxButton = require( '@wikimedia/codex' ).CdxButton,\n\tmapMutations = require( 'vuex' ).mapMutations,\n\tmapActions = require( 'vuex' ).mapActions,\n\tmapGetters = require( 'vuex' ).mapGetters;\n\n// @vue/component\nmodule.exports = exports = {\n\tname: 'wl-z-object-key-list',\n\tcomponents: {\n\t\t'cdx-button': CdxButton\n\t},\n\tmixins: [ typeUtils ],\n\tinject: {\n\t\tviewmode: { default: false }\n\t},\n\tprops: {\n\t\tzobjectId: {\n\t\t\ttype: Number,\n\t\t\trequired: true\n\t\t},\n\t\treadonly: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false\n\t\t}\n\t},\n\tcomputed: $.extend( {},\n\t\tmapGetters( [\n\t\t\t'getZObjectChildrenById',\n\t\t\t'getZObjectTypeById'\n\t\t] ),\n\t\t{\n\t\t\ttooltipRemoveZObjectKey: function () {\n\t\t\t\treturn this.$i18n( 'wikilambda-editor-zobject-removekey-tooltip' ).text();\n\t\t\t},\n\t\t\tzObject: function () {\n\t\t\t\treturn this.getZObjectChildrenById( this.zobjectId );\n\t\t\t},\n\t\t\tzObjectWithoutPersistent: function () {\n\t\t\t\treturn this.zObject.filter( function ( item ) {\n\t\t\t\t\tvar isObjectType = item.key === Constants.Z_OBJECT_TYPE,\n\t\t\t\t\t\tisPersistentObjectId = item.key === Constants.Z_PERSISTENTOBJECT_ID;\n\n\t\t\t\t\treturn !isObjectType && !isPersistentObjectId;\n\t\t\t\t} );\n\t\t\t},\n\t\t\tzObjectType: function () {\n\t\t\t\treturn this.getZObjectTypeById( this.zobjectId );\n\t\t\t}\n\t\t}\n\t),\n\tmethods: $.extend( {},\n\t\tmapActions( [\n\t\t\t'addZObject',\n\t\t\t'removeZObjectChildren',\n\t\t\t'setIsZObjectDirty'\n\t\t] ),\n\t\tmapMutations( [ 'addAllZKeyLabels' ] ),\n\t\t{\n\t\t\t/**\n\t\t\t * Adds a new key field to the list.\n\t\t\t *\n\t\t\t * @param {string} key\n\t\t\t */\n\t\t\taddKey: function ( key ) {\n\t\t\t\tvar payload = {\n\t\t\t\t\t\tkey: key,\n\t\t\t\t\t\tparent: this.zobjectId\n\t\t\t\t\t},\n\t\t\t\t\tkeyExist = false;\n\n\t\t\t\t// Check if this key is already set in the zobject\n\t\t\t\tkeyExist = this.findKeyInArray( key, this.zObject ) !== false;\n\n\t\t\t\tif ( !keyExist ) {\n\t\t\t\t\tthis.addZObject( payload );\n\t\t\t\t}\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * Removes one key from the ZObject key list.\n\t\t\t * Fires the event `delete` so that ZObject can update\n\t\t\t * its data.\n\t\t\t *\n\t\t\t * @param {number} objectId\n\t\t\t */\n\t\t\tremoveKey: function ( objectId ) {\n\t\t\t\tthis.removeZObjectChildren( objectId );\n\t\t\t\tthis.setIsZObjectDirty( true );\n\t\t\t}\n\t\t}\n\t),\n\n\tbeforeCreate: function () {\n\t\t// Need to delay require of ZObjectKey to avoid loop\n\t\tthis.$options.components[ 'wl-z-object-key' ] = require( './ZObjectKey.vue' );\n\t}\n};\n</script>\n","usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/resources/ext.wikilambda.edit/components/ZObjectPublish.vue","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/resources/ext.wikilambda.edit/components/ZObjectSelector.vue","messages":[{"ruleId":"vue/require-explicit-emits","severity":1,"message":"The \"focus\" event has been triggered but not declared on `emits` option.","line":410,"column":17,"nodeType":"Literal","messageId":"missing","endLine":410,"endColumn":24,"suggestions":[{"messageId":"addOneOption","data":{"name":"focus","emitsKind":"`emits` option"},"fix":{"range":[2892,2892],"text":", 'focus'"},"desc":"Add the \"focus\" to `emits` option."}]}],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"<template>\n\t<!--\n\t\tWikiLambda Vue interface module for selecting any ZObject,\n\t\twith lookup on name.\n\t\tReceives an input parameter to filter the type of ZObjects that\n\t\tit will search and display (e.g. Z4 for selecting only types)\n\n\t\t@copyright 2020– Abstract Wikipedia team; see AUTHORS.txt\n\t\t@license MIT\n\t-->\n\t<span\n\t\tclass=\"ext-wikilambda-select-zobject\"\n\t\t:class=\"{ 'ext-wikilambda-select-zobject__fitted': fitWidth }\"\n\t\t:style=\"{ width: fieldWidth }\"\n\t>\n\t\t<div v-if=\"readonly || viewmode\" class=\"ext-wikilambda-select-zobject__link\">\n\t\t\t<a\n\t\t\t\t:href=\"typeUrl()\"\n\t\t\t\t:target=\"referenceLinkTarget\"\n\t\t\t>\n\t\t\t\t{{ selectedText }}\n\t\t\t</a>\n\t\t</div>\n\t\t<!-- eslint-disable vue/no-v-model-argument -->\n\t\t<!-- eslint-disable vue/no-unsupported-features -->\n\t\t<!-- TODO: add error state when implemented in codex -->\n\t\t<cdx-lookup\n\t\t\tv-else\n\t\t\t:key=\"lookupKey\"\n\t\t\tv-model:selected=\"selectedValue\"\n\t\t\t:class=\"{ 'ext-wikilambda-select-zobject__input-invalid': validatorIsInvalid }\"\n\t\t\t:placeholder=\"lookupPlaceholder\"\n\t\t\t:menu-items=\"lookupResults\"\n\t\t\t:end-icon=\"lookupIcon\"\n\t\t\t:initial-input-value=\"initialInputValue\"\n\t\t\t:status=\"errorInputStatus\"\n\t\t\t@input=\"onInput\"\n\t\t\t@focusout=\"onFocusOut\"\n\t\t\t@focus=\"onFocus\"\n\t\t>\n\t\t\t<template #no-results>\n\t\t\t\tNo results found.\n\t\t\t</template>\n\t\t</cdx-lookup>\n\t\t<cdx-message\n\t\t\tv-if=\"validatorIsInvalid\"\n\t\t\t:inline=\"true\"\n\t\t\ttype=\"error\"\n\t\t>\n\t\t\t{{ validatorErrorMessage }}\n\t\t</cdx-message>\n\t\t<cdx-message\n\t\t\tv-if=\"errorState\"\n\t\t\tclass=\"ext-wikilambda-select-zobject__error\"\n\t\t\t:type=\"errorType\"\n\t\t\tinline\n\t\t>\n\t\t\t{{ errorMessage }}\n\t\t</cdx-message>\n\t</span>\n</template>\n\n<script>\nvar Constants = require( '../Constants.js' ),\n\tCdxLookup = require( '@wikimedia/codex' ).CdxLookup,\n\tCdxMessage = require( '@wikimedia/codex' ).CdxMessage,\n\tvalidator = require( '../mixins/validator.js' ),\n\ttypeUtils = require( '../mixins/typeUtils.js' ),\n\tmapActions = require( 'vuex' ).mapActions,\n\tmapGetters = require( 'vuex' ).mapGetters,\n\tmapMutations = require( 'vuex' ).mapMutations,\n\ticons = require( '../../../lib/icons.json' );\n\n// @vue/component\nmodule.exports = exports = {\n\tname: 'wl-z-object-selector',\n\tcomponents: {\n\t\t'cdx-message': CdxMessage,\n\t\t'cdx-lookup': CdxLookup\n\t},\n\tmixins: [ validator, typeUtils ],\n\tinject: {\n\t\tviewmode: { default: false }\n\t},\n\tprops: {\n\t\tfitWidth: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false\n\t\t},\n\t\ttype: {\n\t\t\ttype: String,\n\t\t\tdefault: ''\n\t\t},\n\t\treturnType: {\n\t\t\ttype: String,\n\t\t\tdefault: ''\n\t\t},\n\t\tselectedId: {\n\t\t\ttype: String,\n\t\t\tdefault: ''\n\t\t},\n\t\tinitialSelectionLabel: {\n\t\t\ttype: String,\n\t\t\tdefault: ''\n\t\t},\n\t\tplaceholder: {\n\t\t\ttype: [ String, Object ],\n\t\t\tdefault: ''\n\t\t},\n\t\treadonly: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false\n\t\t},\n\t\tusedLanguages: {\n\t\t\ttype: Array,\n\t\t\tdefault: function () {\n\t\t\t\treturn [];\n\t\t\t},\n\t\t\trequired: false\n\t\t},\n\t\tzobjectId: {\n\t\t\ttype: Number,\n\t\t\tdefault: -1\n\t\t}\n\t},\n\temits: [ 'input', 'focus-out', 'input-removed' ],\n\tdata: function () {\n\t\treturn {\n\t\t\tactive: false,\n\t\t\tlookupResults: [],\n\t\t\tlookupDelayTimer: null,\n\t\t\tlookupDelayMs: 300,\n\t\t\tinputValue: '',\n\t\t\tvalueEmitted: false,\n\t\t\tlookupKey: 1,\n\t\t\tselectedValue: this.selectedId\n\t\t};\n\t},\n\tcomputed: $.extend( {},\n\t\tmapGetters( {\n\t\t\tzkeyLabels: 'getZkeyLabels',\n\t\t\tzKeys: 'getZkeys',\n\t\t\tgetErrors: 'getErrors'\n\t\t} ),\n\t\t{\n\t\t\tusedLanguageZids: function () {\n\t\t\t\treturn this.usedLanguages.map( function ( language ) {\n\t\t\t\t\treturn language.Z9K1;\n\t\t\t\t} );\n\t\t\t},\n\t\t\tlookupPlaceholder: function () {\n\t\t\t\tif ( this.placeholder ) {\n\t\t\t\t\treturn this.placeholder;\n\t\t\t\t}\n\t\t\t\tswitch ( this.type ) {\n\t\t\t\t\tcase Constants.Z_NATURAL_LANGUAGE:\n\t\t\t\t\t\treturn this.$i18n( 'wikilambda-editor-label-addlanguage-label' ).text();\n\t\t\t\t\tcase Constants.Z_TYPE:\n\t\t\t\t\t\treturn this.$i18n( 'wikilambda-typeselector-label' ).text();\n\t\t\t\t\tdefault:\n\t\t\t\t\t\treturn this.$i18n( 'wikilambda-zobjectselector-label' ).text();\n\t\t\t\t}\n\t\t\t},\n\t\t\tselectedLabel: function () {\n\t\t\t\treturn this.zkeyLabels[ this.selectedId ];\n\t\t\t},\n\t\t\tselectedText: function () {\n\t\t\t\tif ( this.selectedId ) {\n\t\t\t\t\treturn this.selectedLabel;\n\t\t\t\t} else {\n\t\t\t\t\treturn '';\n\t\t\t\t}\n\t\t\t},\n\t\t\tinitialInputValue: function () {\n\t\t\t\tthis.inputValue = this.initialSelectionLabel;\n\t\t\t\treturn this.initialSelectionLabel;\n\t\t\t},\n\t\t\treferenceLinkTarget: function () {\n\t\t\t\tif ( !( this.viewmode || this.readonly ) ) {\n\t\t\t\t\treturn '_blank';\n\t\t\t\t}\n\n\t\t\t\treturn;\n\t\t\t},\n\t\t\tlookupIcon: function () {\n\t\t\t\treturn icons.cdxIconExpand;\n\t\t\t},\n\t\t\tisError: function () {\n\t\t\t\t// the error is not guaranteed to exist\n\t\t\t\treturn this.getErrors[ this.zobjectId ];\n\t\t\t},\n\t\t\terrorType: function () {\n\t\t\t\treturn this.isError ? this.getErrors[ this.zobjectId ].type : null;\n\t\t\t},\n\t\t\terrorState: function () {\n\t\t\t\treturn this.isError ? this.getErrors[ this.zobjectId ].state : false;\n\t\t\t},\n\t\t\terrorInputStatus: function () {\n\t\t\t\treturn this.errorState ? 'error' : 'default';\n\t\t\t},\n\t\t\terrorMessage: function () {\n\t\t\t\tif ( this.isError ) {\n\t\t\t\t\tconst messageStr = this.getErrors[ this.zobjectId ].message;\n\t\t\t\t\treturn this.$i18n( messageStr ).text();\n\t\t\t\t}\n\t\t\t\treturn null;\n\t\t\t},\n\t\t\t/**\n\t\t\t * This computed property calculates the width of the field depending on its value\n\t\t\t *\n\t\t\t * TODO: Because this is a not a monospace font, the larger the word is, the\n\t\t\t * less space it occupies in ch, so probably we should remove a %:\n\t\t\t *\n\t\t\t * > 1ch is usually wider than the average character width, usually by around 20-30%\n\t\t\t *\n\t\t\t * Refs:\n\t\t\t * https://stackoverflow.com/questions/3392493/adjust-width-of-input-field-to-its-input\n\t\t\t * https://meyerweb.com/eric/thoughts/2018/06/28/what-is-the-css-ch-unit/\n\t\t\t *\n\t\t\t * @return {string}\n\t\t\t */\n\t\t\tfieldWidth: function () {\n\t\t\t\tif ( !this.fitWidth ) {\n\t\t\t\t\treturn 'auto';\n\t\t\t\t}\n\t\t\t\tif ( this.active ) {\n\t\t\t\t\treturn '100%';\n\t\t\t\t}\n\t\t\t\t// If no value or placeholder, default is 20 characters\n\t\t\t\tvar chars = 20;\n\t\t\t\tif ( this.selectedText && ( this.selectedText.length > 0 ) ) {\n\t\t\t\t\t// Two extra characters to account for inner padding\n\t\t\t\t\tchars = this.selectedText.length + 6;\n\t\t\t\t} else if ( this.lookupPlaceholder && ( this.lookupPlaceholder.length > 0 ) ) {\n\t\t\t\t\tchars = this.lookupPlaceholder.length + 6;\n\t\t\t\t}\n\t\t\t\t// Subtract 20%\n\t\t\t\tchars = Math.ceil( chars - chars * 0.1 );\n\t\t\t\treturn `${chars}ch`;\n\t\t\t}\n\t\t}\n\t),\n\tmethods: $.extend( {},\n\t\tmapActions( [\n\t\t\t'lookupZObject',\n\t\t\t'fetchZKeys',\n\t\t\t'setError'\n\t\t] ),\n\t\tmapMutations( [ 'addAllZKeyLabels' ] ),\n\t\t{\n\t\t\tisExcludedZType: function ( zid ) {\n\t\t\t\treturn (\n\t\t\t\t\t( this.type === Constants.Z_TYPE ) &&\n\t\t\t\t\t( Constants.EXCLUDED_Z_TYPES.indexOf( zid ) !== -1 )\n\t\t\t\t);\n\t\t\t},\n\t\t\thasValidType: function ( zid ) {\n\t\t\t\tvar zidType = this.zKeys[ zid ][ Constants.Z_PERSISTENTOBJECT_VALUE ][ Constants.Z_OBJECT_TYPE ];\n\t\t\t\treturn ( !this.type || // Either the selection isn't type restricted\n\t\t\t\t\t(\n\t\t\t\t\t\tthis.type === zidType && // Or the specified type matches de ZObject type\n\t\t\t\t\t\t!this.isExcludedZType( zid ) // and ZID is not part of the EXCLUDED_Z_TYPES\n\t\t\t\t\t) );\n\t\t\t},\n\t\t\tisUsedLanguage: function ( zid ) {\n\t\t\t\treturn this.usedLanguageZids.indexOf( zid ) !== -1;\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * Handle get zObject lookup.\n\t\t\t * update lookup results with label and update zKeyLabels in store.\n\t\t\t *\n\t\t\t * @param {string} input\n\t\t\t */\n\t\t\tgetLookupResults: function ( input ) {\n\t\t\t\tvar self = this,\n\t\t\t\t\tsearchedString = input;\n\t\t\t\tthis.lookupZObject( {\n\t\t\t\t\tinput: input,\n\t\t\t\t\ttype: this.type,\n\t\t\t\t\treturnType: this.returnType\n\t\t\t\t} ).then( function ( payload ) {\n\t\t\t\t\t// If the string searched has changed, do not show the search result\n\t\t\t\t\tif ( self.inputValue.indexOf( searchedString ) === -1 ) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tvar zKeys = [];\n\t\t\t\t\tself.lookupResults = [];\n\t\t\t\t\tif ( payload && payload.length > 0 ) {\n\t\t\t\t\t\tpayload.forEach(\n\t\t\t\t\t\t\tfunction ( result ) {\n\t\t\t\t\t\t\t\tvar zid = result.page_title,\n\t\t\t\t\t\t\t\t\tlang = result.page_lang,\n\t\t\t\t\t\t\t\t\tlabel = result.label;\n\n\t\t\t\t\t\t\t\t// TODO (T322757): Show aliases ( result.is_primary === 0 ) differently\n\n\t\t\t\t\t\t\t\t// Update lookupResults list\n\t\t\t\t\t\t\t\t// If we are searching for Types (this.type === Constants.Z_TYPE)\n\t\t\t\t\t\t\t\t// we should exclude Z1, Z2, Z7 and Z9 from the results\n\t\t\t\t\t\t\t\tif ( !self.isExcludedZType( zid ) ) {\n\t\t\t\t\t\t\t\t\tif ( self.usedLanguageZids ? !self.isUsedLanguage( zid ) : true ) {\n\t\t\t\t\t\t\t\t\t\tself.lookupResults.push(\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tvalue: zid,\n\t\t\t\t\t\t\t\t\t\t\t\tlabel\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t// Update zKeyLabels in the Vuex store\n\t\t\t\t\t\t\t\tif ( !( zid in self.zkeyLabels ) ) {\n\t\t\t\t\t\t\t\t\tself.addAllZKeyLabels( [ {\n\t\t\t\t\t\t\t\t\t\tzid,\n\t\t\t\t\t\t\t\t\t\tlabel,\n\t\t\t\t\t\t\t\t\t\tlang\n\t\t\t\t\t\t\t\t\t} ] );\n\n\t\t\t\t\t\t\t\t\tzKeys.push( zid );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t);\n\t\t\t\t\t\tself.fetchZKeys( { zids: zKeys } );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tself.validatorSetError( 'wikilambda-noresult' );\n\t\t\t\t\t}\n\t\t\t\t} );\n\n\t\t\t},\n\t\t\t/**\n\t\t\t * Allow the field to receive a Zid instead of a label and,\n\t\t\t * if valid and it exists, select and submit it.\n\t\t\t * If the selector restricts the type, check that the ZObject\n\t\t\t * type fits this restriction.\n\t\t\t */\n\t\t\tvalidateZidInput: function () {\n\t\t\t\tvar self = this,\n\t\t\t\t\tnormalizedSearchValue = self.inputValue.toUpperCase();\n\n\t\t\t\tif ( this.isUsedLanguage( normalizedSearchValue ) ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif ( self.isValidZidFormat( normalizedSearchValue ) ) {\n\t\t\t\t\tself.fetchZKeys( { zids: [ normalizedSearchValue ] } ).then( function () {\n\t\t\t\t\t\tvar label = '';\n\t\t\t\t\t\tself.lookupResults = [];\n\t\t\t\t\t\t// If data is returned, The value will show in the zKeys\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t( normalizedSearchValue in self.zKeys ) &&\n\t\t\t\t\t\t\t( self.hasValidType( normalizedSearchValue ) )\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\tlabel = self.zkeyLabels[ normalizedSearchValue ];\n\t\t\t\t\t\t\tself.lookupResults.push( {\n\t\t\t\t\t\t\t\tvalue: normalizedSearchValue,\n\t\t\t\t\t\t\t\tlabel: label + ' (' + normalizedSearchValue + ')'\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tself.validatorSetError( 'wikilambda-invalidzobject' );\n\t\t\t\t\t\t}\n\t\t\t\t\t} );\n\t\t\t\t} else {\n\t\t\t\t\tself.validatorSetError( 'wikilambda-invalidzobject' );\n\t\t\t\t}\n\t\t\t},\n\t\t\t// used by ZLabelsBlock, ZMultilingualString and FunctionEditorLanguage components to\n\t\t\t// automatically add and clear labels.\n\t\t\tclearResults: function () {\n\t\t\t\tthis.lookupResults = [];\n\t\t\t\tthis.inputValue = '';\n\t\t\t\tthis.lookupKey += 1;\n\t\t\t},\n\t\t\t/**\n\t\t\t * On lookup field input, set a timer so that the lookup is not done immediately.\n\t\t\t *\n\t\t\t * @param {string} input\n\t\t\t */\n\t\t\tonInput: function ( input ) {\n\t\t\t\tvar self = this;\n\t\t\t\tthis.valueEmitted = false;\n\t\t\t\tthis.inputValue = input;\n\n\t\t\t\tif ( !input ) {\n\t\t\t\t\tthis.lookupResults = [];\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tthis.validatorResetError();\n\n\t\t\t\t// Just search if more than one characters\n\t\t\t\tif ( input.length < 2 ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif ( self.isValidZidFormat( input.toUpperCase() ) ) {\n\t\t\t\t\tclearTimeout( this.lookupDelayTimer );\n\t\t\t\t\tthis.lookupDelayTimer = setTimeout( function () {\n\t\t\t\t\t\tself.validateZidInput();\n\t\t\t\t\t}, this.lookupDelayMs );\n\t\t\t\t} else {\n\t\t\t\t\tself.getLookupResults( input );\n\t\t\t\t}\n\t\t\t},\n\t\t\tonFocusOut: function () {\n\t\t\t\tthis.active = false;\n\t\t\t\tthis.$emit( 'focus-out' );\n\t\t\t},\n\t\t\tonFocus: function () {\n\t\t\t\tthis.active = true;\n\t\t\t\tthis.$emit( 'focus' );\n\t\t\t},\n\t\t\ttypeUrl: function () {\n\t\t\t\treturn new mw.Title( this.selectedId ).getUrl();\n\t\t\t}\n\t\t}\n\t),\n\twatch: {\n\t\tinitialSelectionLabel: {\n\t\t\thandler: function () {\n\t\t\t\t// Trigger a rerender when initial input value changes,\n\t\t\t\t// This might occur due to slow network request for a particular label\n\t\t\t\t// Also make sure not to trigger rerender if the user has typed an input\n\t\t\t\tif ( !this.inputValue ) {\n\t\t\t\t\tthis.lookupKey += 1;\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tselectedValue: {\n\t\t\thandler: function ( zId ) {\n\t\t\t\tif ( this.selectedValue === null ) {\n\t\t\t\t\tthis.$emit( 'input-removed' );\n\t\t\t\t}\n\t\t\t\tthis.$emit( 'input', zId );\n\n\t\t\t\tthis.setError( {\n\t\t\t\t\tinternalId: this.zobjectId,\n\t\t\t\t\terrorState: false\n\t\t\t\t} );\n\t\t\t}\n\t\t}\n\t},\n\tmounted: function () {\n\t\tthis.fetchZKeys( { zids: [\n\t\t\tConstants.Z_STRING,\n\t\t\tConstants.Z_REFERENCE,\n\t\t\tConstants.Z_BOOLEAN,\n\t\t\tConstants.Z_TYPED_LIST\n\t\t] } );\n\t}\n};\n</script>\n\n<style lang=\"less\">\n@import '../ext.wikilambda.edit.less';\n\n.ext-wikilambda-select-zobject {\n\t&__fitted {\n\t\ttransition: @wl-transition-field-expand;\n\t\tdisplay: inline-block;\n\n\t\t.cdx-text-input__input {\n\t\t\tmin-width: auto;\n\t\t}\n\t}\n\n\t.cdx-text-input__icon {\n\t\tsvg {\n\t\t\twidth: @size-75;\n\t\t\theight: @size-75;\n\t\t\tmin-width: @size-75;\n\t\t\tmin-height: @size-75;\n\t\t}\n\t}\n\n\t&__link {\n\t\tmin-height: 32px;\n\t\tdisplay: inline-flex;\n\t\talign-items: center;\n\t}\n\n\ta {\n\t\tdisplay: inline-flex;\n\t}\n\n\t&__input-invalid {\n\t\tbackground: #fee;\n\t\tborder: 2px #f00 solid;\n\t}\n\n\t&__error {\n\t\tpadding-top: 6px;\n\t}\n}\n</style>\n","usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/resources/ext.wikilambda.edit/components/base/.eslintrc.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/resources/ext.wikilambda.edit/components/base/Chip.vue","messages":[{"ruleId":"vue/require-explicit-emits","severity":1,"message":"The \"edit-chip\" event has been triggered but not declared on `emits` option.","line":84,"column":17,"nodeType":"Literal","messageId":"missing","endLine":84,"endColumn":28,"suggestions":[{"messageId":"addArrayEmitsOption","data":{"name":"edit-chip","emitsKind":"`emits` option"},"fix":{"range":[1411,1411],"text":"\nemits: ['edit-chip'],"},"desc":"Add the `emits` option with array syntax and define \"edit-chip\" event."},{"messageId":"addObjectEmitsOption","data":{"name":"edit-chip","emitsKind":"`emits` option"},"fix":{"range":[1411,1411],"text":"\nemits: {'edit-chip': null},"},"desc":"Add the `emits` option with object syntax and define \"edit-chip\" event."}]},{"ruleId":"vue/require-explicit-emits","severity":1,"message":"The \"remove-chip\" event has been triggered but not declared on `emits` option.","line":88,"column":16,"nodeType":"Literal","messageId":"missing","endLine":88,"endColumn":29,"suggestions":[{"messageId":"addArrayEmitsOption","data":{"name":"remove-chip","emitsKind":"`emits` option"},"fix":{"range":[1411,1411],"text":"\nemits: ['remove-chip'],"},"desc":"Add the `emits` option with array syntax and define \"remove-chip\" event."},{"messageId":"addObjectEmitsOption","data":{"name":"remove-chip","emitsKind":"`emits` option"},"fix":{"range":[1411,1411],"text":"\nemits: {'remove-chip': null},"},"desc":"Add the `emits` option with object syntax and define \"remove-chip\" event."}]}],"suppressedMessages":[{"ruleId":"vue/no-boolean-default","severity":2,"message":"Boolean prop should only be defaulted to false.","line":62,"column":13,"nodeType":"Literal","endLine":62,"endColumn":17,"suppressions":[{"kind":"directive","justification":""}]}],"errorCount":0,"fatalErrorCount":0,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":"<template>\n\t<!--\n\t\tWikiLambda Vue component for a \"Chip\" / input tag\n\n\t\t@copyright 2020– Abstract Wikipedia team; see AUTHORS.txt\n\t\t@license MIT\n\t-->\n\t<div\n\t\tclass=\"ext-wikilambda-chip\"\n\t\t:class=\"'ext-wikilambda-chip_' + intent\"\n\t\t@click.stop=\"\"\n\t>\n\t\t<div\n\t\t\tclass=\"ext-wikilambda-chip_text\"\n\t\t\t:class=\"hover\"\n\t\t\trole=\"textbox\"\n\t\t\t:contenteditable=\"!readonly\"\n\t\t\t@keydown.enter=\"handleEnter( $event )\"\n\t\t>\n\t\t\t{{ text }}\n\t\t</div>\n\t\t<div\n\t\t\tv-if=\"editableContainer\"\n\t\t\tclass=\"ext-wikilambda-chip_icon\"\n\t\t\t:aria-label=\"$i18n( 'wikilambda-chip-remove' ).text()\"\n\t\t\t@click=\"handleRemove\"\n\t\t>\n\t\t\t<cdx-icon\n\t\t\t\t:icon=\"icon\"\n\t\t\t></cdx-icon>\n\t\t</div>\n\t</div>\n</template>\n\n<script>\nvar CdxIcon = require( '@wikimedia/codex' ).CdxIcon,\n\ticons = require( '../../../lib/icons.json' );\n\n// @vue/component\nmodule.exports = exports = {\n\tname: 'wl-chip-item',\n\tcomponents: {\n\t\t'cdx-icon': CdxIcon\n\t},\n\tprops: {\n\t\ttext: {\n\t\t\ttype: String,\n\t\t\trequired: true\n\t\t},\n\t\tindex: {\n\t\t\ttype: Number,\n\t\t\trequired: true\n\t\t},\n\t\treadonly: { // if chip can be edited\n\t\t\ttype: Boolean,\n\t\t\trequired: false\n\t\t},\n\t\teditableContainer: {\n\t\t\ttype: Boolean,\n\t\t\trequired: false,\n\t\t\t// eslint-disable-next-line vue/no-boolean-default\n\t\t\tdefault: true\n\t\t},\n\t\tintent: {\n\t\t\tvalidator: function ( value ) {\n\t\t\t\treturn [ 'notice', 'warning', 'error', 'success' ].indexOf( value ) !== -1;\n\t\t\t},\n\t\t\ttype: String,\n\t\t\tdefault: 'notice',\n\t\t\trequired: false\n\t\t}\n\t},\n\tdata: function () {\n\t\treturn {\n\t\t\ticon: icons.cdxIconClose,\n\t\t\thover: 'ext-wikilambda-chip_input'\n\t\t};\n\t},\n\tmethods: {\n\t\thandleEnter: function ( event ) {\n\t\t\tevent.target.blur();\n\t\t\tvar newValue = event.target.innerText;\n\t\t\tif ( newValue !== this.text ) {\n\t\t\t\tthis.$emit( 'edit-chip', this.index, newValue );\n\t\t\t}\n\t\t},\n\t\thandleRemove: function () {\n\t\t\tthis.$emit( 'remove-chip', this.index );\n\t\t}\n\t}\n};\n\n</script>\n\n<style lang=\"less\">\n@import '../../ext.wikilambda.edit.less';\n\n.ext-wikilambda-chip {\n\tdisplay: inline-flex;\n\tbackground-color: @background-color-interactive;\n\tborder-width: 1.5px;\n\tborder-style: solid;\n\tborder-radius: @border-radius-pill;\n\tpadding: 0 8px;\n\tmargin-top: 2.5px;\n\tmargin-bottom: 2.5px;\n\tvertical-align: middle;\n\tmax-width: 100%;\n\tbox-sizing: @box-sizing-base;\n\n\t&_text {\n\t\theight: 100%;\n\t\twidth: max-content;\n\t\tmax-width: 100%;\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t}\n\n\t&_icon {\n\t\tmargin-left: 6px;\n\t\twidth: 20px;\n\t\theight: 100%;\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tjustify-content: center;\n\t\tflex: none;\n\n\t\t.cdx-icon {\n\t\t\twidth: 12.4px;\n\t\t\theight: 12.4px;\n\t\t}\n\t}\n\n\t&_notice {\n\t\tbackground-color: @background-color-interactive;\n\t\tborder-color: @border-color-base;\n\t}\n\n\t&_warning {\n\t\tbackground-color: @background-color-warning-subtle;\n\t\tborder-color: @border-color-warning;\n\t}\n\n\t&_error {\n\t\tbackground-color: @background-color-error-subtle;\n\t\tborder-color: @border-color-error;\n\t}\n\n\t&_success {\n\t\tbackground-color: @background-color-success-subtle;\n\t\tborder-color: @border-color-success;\n\t}\n}\n\n</style>\n","usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/resources/ext.wikilambda.edit/components/base/ChipContainer.vue","messages":[{"ruleId":"vue/require-explicit-emits","severity":1,"message":"The \"edit-chip\" event has been triggered but not declared on `emits` option.","line":84,"column":16,"nodeType":"Literal","messageId":"missing","endLine":84,"endColumn":27,"suggestions":[{"messageId":"addArrayEmitsOption","data":{"name":"edit-chip","emitsKind":"`emits` option"},"fix":{"range":[1464,1464],"text":"\nemits: ['edit-chip'],"},"desc":"Add the `emits` option with array syntax and define \"edit-chip\" event."},{"messageId":"addObjectEmitsOption","data":{"name":"edit-chip","emitsKind":"`emits` option"},"fix":{"range":[1464,1464],"text":"\nemits: {'edit-chip': null},"},"desc":"Add the `emits` option with object syntax and define \"edit-chip\" event."}]},{"ruleId":"vue/require-explicit-emits","severity":1,"message":"The \"add-chip\" event has been triggered but not declared on `emits` option.","line":88,"column":17,"nodeType":"Literal","messageId":"missing","endLine":88,"endColumn":27,"suggestions":[{"messageId":"addArrayEmitsOption","data":{"name":"add-chip","emitsKind":"`emits` option"},"fix":{"range":[1464,1464],"text":"\nemits: ['add-chip'],"},"desc":"Add the `emits` option with array syntax and define \"add-chip\" event."},{"messageId":"addObjectEmitsOption","data":{"name":"add-chip","emitsKind":"`emits` option"},"fix":{"range":[1464,1464],"text":"\nemits: {'add-chip': null},"},"desc":"Add the `emits` option with object syntax and define \"add-chip\" event."}]},{"ruleId":"vue/require-explicit-emits","severity":1,"message":"The \"remove-chip\" event has been triggered but not declared on `emits` option.","line":93,"column":16,"nodeType":"Literal","messageId":"missing","endLine":93,"endColumn":29,"suggestions":[{"messageId":"addArrayEmitsOption","data":{"name":"remove-chip","emitsKind":"`emits` option"},"fix":{"range":[1464,1464],"text":"\nemits: ['remove-chip'],"},"desc":"Add the `emits` option with array syntax and define \"remove-chip\" event."},{"messageId":"addObjectEmitsOption","data":{"name":"remove-chip","emitsKind":"`emits` option"},"fix":{"range":[1464,1464],"text":"\nemits: {'remove-chip': null},"},"desc":"Add the `emits` option with object syntax and define \"remove-chip\" event."}]}],"suppressedMessages":[{"ruleId":"vue/no-boolean-default","severity":2,"message":"Boolean prop should only be defaulted to false.","line":53,"column":13,"nodeType":"Literal","endLine":53,"endColumn":17,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"vue/no-boolean-default","severity":2,"message":"Boolean prop should only be defaulted to false.","line":59,"column":13,"nodeType":"Literal","endLine":59,"endColumn":17,"suppressions":[{"kind":"directive","justification":""}]}],"errorCount":0,"fatalErrorCount":0,"warningCount":3,"fixableErrorCount":0,"fixableWarningCount":0,"source":"<template>\n\t<!--\n\t\tWikiLambda Vue component for a container for \"Chips\" / input tags\n\n\t\t@copyright 2020– Abstract Wikipedia team; see AUTHORS.txt\n\t\t@license MIT\n\t-->\n\t<div class=\"ext-wikilambda-chip-container\" @click=\"focusInput\">\n\t\t<wl-chip\n\t\t\tv-for=\"chip in chips\"\n\t\t\t:key=\"chip.id\"\n\t\t\t:index=\"chip.id\"\n\t\t\t:text=\"chip.value\"\n\t\t\t:readonly=\"readonly\"\n\t\t\tclass=\"ext-wikilambda-chip-container__item\"\n\t\t\t@edit-chip=\"editChip\"\n\t\t\t@remove-chip=\"removeChip\"\n\t\t></wl-chip>\n\t\t<input\n\t\t\tv-if=\"canAdd\"\n\t\t\tref=\"chipInput\"\n\t\t\tv-model=\"newText\"\n\t\t\tclass=\"ext-wikilambda-chip-container__input\"\n\t\t\t:aria-label=\"inputAriaLabel\"\n\t\t\t:placeholder=\"!hasChips ? inputPlaceholder : ''\"\n\t\t\t@keydown.enter=\"addChip\"\n\t\t>\n\t</div>\n</template>\n\n<script>\nvar Chip = require( './Chip.vue' );\n\n// @vue/component\nmodule.exports = exports = {\n\tname: 'wl-chip-container',\n\tcomponents: {\n\t\t'wl-chip': Chip\n\t},\n\tprops: {\n\t\tchips: {\n\t\t\ttype: Array,\n\t\t\trequired: true,\n\n\t\t\tdefault: function () {\n\t\t\t\treturn [];\n\t\t\t}\n\t\t},\n\t\tcanAdd: {\n\t\t\ttype: Boolean, // can add a chip to the collection\n\t\t\trequired: false,\n\t\t\t// eslint-disable-next-line vue/no-boolean-default\n\t\t\tdefault: true\n\t\t},\n\t\treadonly: {\n\t\t\ttype: Boolean, // can edit an existing chip\n\t\t\trequired: false,\n\t\t\t// eslint-disable-next-line vue/no-boolean-default\n\t\t\tdefault: true\n\t\t},\n\t\tinputPlaceholder: {\n\t\t\ttype: String,\n\t\t\trequired: false,\n\t\t\tdefault: null\n\t\t},\n\t\tinputAriaLabel: {\n\t\t\ttype: Object,\n\t\t\trequired: false,\n\t\t\tdefault: null\n\t\t}\n\t},\n\tdata: function () {\n\t\treturn {\n\t\t\tnewText: ''\n\t\t};\n\t},\n\tcomputed: {\n\t\thasChips: function () {\n\t\t\treturn this.chips.length > 0;\n\t\t}\n\t},\n\tmethods: {\n\t\teditChip: function ( id, name ) {\n\t\t\tthis.$emit( 'edit-chip', id, name );\n\t\t},\n\t\taddChip: function () {\n\t\t\tif ( this.newText ) {\n\t\t\t\tthis.$emit( 'add-chip', this.newText );\n\t\t\t\tthis.newText = '';\n\t\t\t}\n\t\t},\n\t\tremoveChip: function ( id ) {\n\t\t\tthis.$emit( 'remove-chip', id );\n\t\t},\n\t\tfocusInput: function () {\n\t\t\tif ( this.canAdd ) {\n\t\t\t\tthis.$refs.chipInput.focus();\n\t\t\t}\n\t\t}\n\t}\n};\n</script>\n\n<style lang=\"less\">\n@import '../../ext.wikilambda.edit.less';\n\n.ext-wikilambda-chip-container {\n\tdisplay: flex;\n\tflex: 1 auto;\n\tflex-flow: wrap;\n\tborder-radius: @border-radius-base;\n\tpadding: 0 @spacing-50;\n\tborder-width: @border-width-base;\n\tborder-style: @border-style-base;\n\tborder-color: @border-color-base;\n\tbox-shadow: @box-shadow-inset-small transparent;\n\n\t&__item {\n\t\tmargin-right: 5px;\n\t\tmargin-top: 3px;\n\t\tmargin-bottom: 3px;\n\t}\n\n\t&__input {\n\t\tflex-grow: inherit;\n\t\theight: 26px;\n\t\tpadding: 2px 0;\n\t\tborder: 0;\n\t\toutline: 0;\n\t\tfont-family: inherit;\n\t\tfont-size: inherit;\n\t\tline-height: 1.43em;\n\t}\n}\n</style>\n","usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/resources/ext.wikilambda.edit/components/base/CodeEditor.vue","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/resources/ext.wikilambda.edit/components/base/ContextMenu.vue","messages":[{"ruleId":"vue/require-explicit-emits","severity":1,"message":"The \"context-action\" event has been triggered but not declared on `emits` option.","line":84,"column":16,"nodeType":"Literal","messageId":"missing","endLine":84,"endColumn":32,"suggestions":[{"messageId":"addArrayEmitsOption","data":{"name":"context-action","emitsKind":"`emits` option"},"fix":{"range":[1923,1923],"text":"\nemits: ['context-action'],"},"desc":"Add the `emits` option with array syntax and define \"context-action\" event."},{"messageId":"addObjectEmitsOption","data":{"name":"context-action","emitsKind":"`emits` option"},"fix":{"range":[1923,1923],"text":"\nemits: {'context-action': null},"},"desc":"Add the `emits` option with object syntax and define \"context-action\" event."}]}],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"<!-- eslint-disable vue/no-unsupported-features -->\n<!-- eslint-disable vue/no-v-model-argument -->\n<template>\n\t<!--\n\t\tWikiLambda Vue component for a context-menu\n\n\t\t@copyright 2020– Abstract Wikipedia team; see AUTHORS.txt\n\t\t@license MIT\n\t-->\n\t<div\n\t\tv-clickout=\"clickToClose\"\n\t\tclass=\"ext-wikilambda-context-menu\"\n\t>\n\t\t<cdx-button\n\t\t\tweight=\"quiet\"\n\t\t\t:aria-label=\"$i18n( 'wikilambda-context-menu' ).text()\"\n\t\t\t@click=\"showMenu = !showMenu\"\n\t\t>\n\t\t\t<cdx-icon :icon=\"icons.cdxIconEllipsis\"></cdx-icon>\n\t\t</cdx-button>\n\t\t<!--\n\t\t\tTODO: this type of usage of cdx-menu is generally discouraged in the docs -\n\t\t\tit's worth following up to see if a component like this could be added to core\n\t\t-->\n\t\t<cdx-menu\n\t\t\tv-model:expanded=\"showMenu\"\n\t\t\tv-model:selected=\"selected\"\n\t\t\tclass=\"ext-wikilambda-context-menu__items\"\n\t\t\t:menu-items=\"menuItems\"\n\t\t\t@update:selected=\"emitSelection\"\n\t\t>\n\t\t</cdx-menu>\n\t</div>\n</template>\n\n<script>\nvar CdxButton = require( '@wikimedia/codex' ).CdxButton,\n\tCdxIcon = require( '@wikimedia/codex' ).CdxIcon,\n\tCdxMenu = require( '@wikimedia/codex' ).CdxMenu,\n\ticons = require( '../../../lib/icons.json' );\n\n// @vue/component\nmodule.exports = exports = {\n\tname: 'wl-context-menu',\n\tcomponents: {\n\t\t'cdx-button': CdxButton,\n\t\t'cdx-icon': CdxIcon,\n\t\t'cdx-menu': CdxMenu\n\t},\n\tdirectives: {\n\t\t// detect clickout events to know when to close the menu\n\t\tclickout: {\n\t\t\tbeforeMount: function ( el, binding ) {\n\t\t\t\tel.clickout = {\n\t\t\t\t\tstop: function ( e ) {\n\t\t\t\t\t\te.stopPropagation();\n\t\t\t\t\t}\n\t\t\t\t};\n\n\t\t\t\tdocument.body.addEventListener( 'click', binding.value );\n\t\t\t\tel.addEventListener( 'click', el.clickout.stop );\n\t\t\t},\n\t\t\tunmounted: function ( el, binding ) {\n\t\t\t\tdocument.body.removeEventListener( 'click', binding.value );\n\t\t\t\tel.removeEventListener( 'click', el.clickout.stop );\n\t\t\t}\n\t\t}\n\t},\n\tprops: {\n\t\t// the list of items to display in the menu\n\t\tmenuItems: {\n\t\t\ttype: Array,\n\t\t\trequired: true\n\t\t}\n\t},\n\tdata: function () {\n\t\treturn {\n\t\t\tshowMenu: false,\n\t\t\ticons: icons\n\t\t};\n\t},\n\tmethods: {\n\t\temitSelection: function ( selection ) {\n\t\t\tthis.$emit( 'context-action', selection );\n\t\t},\n\t\tclickToClose: function () {\n\t\t\tthis.showMenu = false;\n\t\t}\n\t}\n};\n</script>\n\n<style lang=\"less\">\n.ext-wikilambda-context-menu {\n\t&__items {\n\t\twidth: fit-content;\n\t\tleft: unset;\n\t\tmargin-left: 1em;\n\t\tmargin-top: -1.5em;\n\t}\n}\n</style>\n","usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/resources/ext.wikilambda.edit/components/base/Dialog.vue","messages":[{"ruleId":"vue/require-explicit-emits","severity":1,"message":"The \"exit-dialog\" event has been triggered but not declared on `emits` option.","line":21,"column":21,"nodeType":"Literal","messageId":"missing","endLine":21,"endColumn":34,"suggestions":[{"messageId":"addArrayEmitsOption","data":{"name":"exit-dialog","emitsKind":"`emits` option"},"fix":{"range":[2802,2802],"text":"\nemits: ['exit-dialog'],"},"desc":"Add the `emits` option with array syntax and define \"exit-dialog\" event."},{"messageId":"addObjectEmitsOption","data":{"name":"exit-dialog","emitsKind":"`emits` option"},"fix":{"range":[2802,2802],"text":"\nemits: {'exit-dialog': null},"},"desc":"Add the `emits` option with object syntax and define \"exit-dialog\" event."}]},{"ruleId":"vue/require-explicit-emits","severity":1,"message":"The \"close-dialog\" event has been triggered but not declared on `emits` option.","line":32,"column":21,"nodeType":"Literal","messageId":"missing","endLine":32,"endColumn":35,"suggestions":[{"messageId":"addArrayEmitsOption","data":{"name":"close-dialog","emitsKind":"`emits` option"},"fix":{"range":[2802,2802],"text":"\nemits: ['close-dialog'],"},"desc":"Add the `emits` option with array syntax and define \"close-dialog\" event."},{"messageId":"addObjectEmitsOption","data":{"name":"close-dialog","emitsKind":"`emits` option"},"fix":{"range":[2802,2802],"text":"\nemits: {'close-dialog': null},"},"desc":"Add the `emits` option with object syntax and define \"close-dialog\" event."}]},{"ruleId":"vue/require-explicit-emits","severity":1,"message":"The \"confirm-dialog\" event has been triggered but not declared on `emits` option.","line":41,"column":21,"nodeType":"Literal","messageId":"missing","endLine":41,"endColumn":37,"suggestions":[{"messageId":"addArrayEmitsOption","data":{"name":"confirm-dialog","emitsKind":"`emits` option"},"fix":{"range":[2802,2802],"text":"\nemits: ['confirm-dialog'],"},"desc":"Add the `emits` option with array syntax and define \"confirm-dialog\" event."},{"messageId":"addObjectEmitsOption","data":{"name":"confirm-dialog","emitsKind":"`emits` option"},"fix":{"range":[2802,2802],"text":"\nemits: {'confirm-dialog': null},"},"desc":"Add the `emits` option with object syntax and define \"confirm-dialog\" event."}]},{"ruleId":"vue/no-v-html","severity":1,"message":"'v-html' directive can lead to XSS attack.","line":48,"column":10,"nodeType":"VAttribute","endLine":48,"endColumn":28},{"ruleId":"vue/require-default-prop","severity":1,"message":"Prop 'buttonAction' requires default value to be set.","line":121,"column":3,"nodeType":"Property","messageId":"missingDefault","endLine":124,"endColumn":4},{"ruleId":"vue/require-explicit-emits","severity":1,"message":"The \"close-dialog\" event has been triggered but not declared on `emits` option.","line":134,"column":17,"nodeType":"Literal","messageId":"missing","endLine":134,"endColumn":31,"suggestions":[{"messageId":"addArrayEmitsOption","data":{"name":"close-dialog","emitsKind":"`emits` option"},"fix":{"range":[2802,2802],"text":"\nemits: ['close-dialog'],"},"desc":"Add the `emits` option with array syntax and define \"close-dialog\" event."},{"messageId":"addObjectEmitsOption","data":{"name":"close-dialog","emitsKind":"`emits` option"},"fix":{"range":[2802,2802],"text":"\nemits: {'close-dialog': null},"},"desc":"Add the `emits` option with object syntax and define \"close-dialog\" event."}]}],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":6,"fixableErrorCount":0,"fixableWarningCount":0,"source":"<template>\n\t<!--\n\t\tWikiLambda Vue component for a Dialog\n\n\t\t@copyright 2020– Abstract Wikipedia team; see AUTHORS.txt\n\t\t@license MIT\n\t-->\n\t<div class=\"ext-wikilambda-dialog\">\n\t\t<div\n\t\t\tv-clickout=\"clickToClose\"\n\t\t\trole=\"dialog\"\n\t\t\tclass=\"ext-wikilambda-dialog__box\"\n\t\t\t:class=\"[ 'ext-wikilambda-dialog__box--size-' + size, customClass ]\">\n\t\t\t<div class=\"ext-wikilambda-dialog__header\">\n\t\t\t\t<div class=\"ext-wikilambda-dialog__header__title\">\n\t\t\t\t\t<slot name=\"dialog-title\"></slot>\n\t\t\t\t</div>\n\t\t\t\t<cdx-button\n\t\t\t\t\tweight=\"quiet\"\n\t\t\t\t\tclass=\"ext-wikilambda-dialog__header__close-button\"\n\t\t\t\t\t@click=\"$emit( 'exit-dialog' )\"\n\t\t\t\t>\n\t\t\t\t\t<cdx-icon :icon=\"dialogIcon()\"></cdx-icon>\n\t\t\t\t</cdx-button>\n\t\t\t</div>\n\t\t\t<div class=\"ext-wikilambda-dialog__body\">\n\t\t\t\t<slot></slot>\n\t\t\t</div>\n\t\t\t<div v-if=\"showActionButtons\" class=\"ext-wikilambda-dialog__action-buttons\">\n\t\t\t\t<cdx-button\n\t\t\t\t\tid=\"cancel-button\"\n\t\t\t\t\t@click=\"$emit( 'close-dialog' )\"\n\t\t\t\t>\n\t\t\t\t\t{{ cancelButtonText }}\n\t\t\t\t</cdx-button>\n\t\t\t\t<cdx-button\n\t\t\t\t\tid=\"primary-button\"\n\t\t\t\t\tweight=\"primary\"\n\t\t\t\t\t:action=\"primaryButtonStyle\"\n\t\t\t\t\t:disabled=\"primaryButtonDisabled\"\n\t\t\t\t\t@click=\"$emit( 'confirm-dialog' )\"\n\t\t\t\t>\n\t\t\t\t\t{{ confirmButtonText }}\n\t\t\t\t</cdx-button>\n\t\t\t</div>\n\t\t\t<div v-if=\"legalText\" class=\"ext-wikilambda-dialog__legal-text\">\n\t\t\t\t<hr class=\"ext-wikilambda-dialog__divider\">\n\t\t\t\t<div v-html=\"legalText\"></div>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</template>\n\n<script>\nvar CdxIcon = require( '@wikimedia/codex' ).CdxIcon;\nvar CdxButton = require( '@wikimedia/codex' ).CdxButton;\nvar icons = require( '../../../lib/icons.json' );\n\n// @vue/component\nmodule.exports = exports = {\n\tname: 'wl-base-dialog',\n\tcomponents: {\n\t\t'cdx-icon': CdxIcon,\n\t\t'cdx-button': CdxButton\n\t},\n\tdirectives: {\n\t\tclickout: {\n\t\t\tbeforeMount: function ( el, binding ) {\n\t\t\t\tel.clickout = {\n\t\t\t\t\tstop: function ( e ) {\n\t\t\t\t\t\te.stopPropagation();\n\t\t\t\t\t}\n\t\t\t\t};\n\n\t\t\t\tdocument.body.addEventListener( 'click', binding.value );\n\t\t\t\tel.addEventListener( 'click', el.clickout.stop );\n\t\t\t},\n\t\t\tunmounted: function ( el, binding ) {\n\t\t\t\tdocument.body.removeEventListener( 'click', binding.value );\n\t\t\t\tel.removeEventListener( 'click', el.clickout.stop );\n\t\t\t}\n\t\t}\n\t},\n\tprops: {\n\t\tcancelButtonText: {\n\t\t\ttype: String,\n\t\t\trequired: true\n\t\t},\n\t\tconfirmButtonText: {\n\t\t\ttype: String,\n\t\t\trequired: true\n\t\t},\n\t\tcanClickOutsideToClose: {\n\t\t\ttype: Boolean,\n\t\t\trequired: true\n\t\t},\n\t\tshowActionButtons: {\n\t\t\ttype: Boolean,\n\t\t\trequired: true\n\t\t},\n\t\tlegalText: {\n\t\t\ttype: String,\n\t\t\trequired: false,\n\t\t\tdefault: ''\n\t\t},\n\t\tcustomClass: {\n\t\t\ttype: String,\n\t\t\trequired: false,\n\t\t\tdefault: ''\n\t\t},\n\t\tsize: {\n\t\t\ttype: String,\n\t\t\tdefault: 'small'\n\t\t},\n\t\tprimaryButtonDisabled: {\n\t\t\ttype: Boolean,\n\n\t\t\tdefault: false,\n\t\t\trequired: false\n\t\t},\n\t\tbuttonAction: {\n\t\t\ttype: String,\n\t\t\trequired: false\n\t\t}\n\t},\n\tcomputed: {\n\t\tprimaryButtonStyle: function () {\n\t\t\treturn this.buttonAction || 'destructive';\n\t\t}\n\t},\n\tmethods: {\n\t\tclickToClose: function () {\n\t\t\tif ( this.canClickOutsideToClose ) {\n\t\t\t\tthis.$emit( 'close-dialog' );\n\t\t\t}\n\t\t},\n\t\tdialogIcon: function () {\n\t\t\treturn icons.cdxIconClose;\n\t\t}\n\t}\n};\n</script>\n\n<style lang=\"less\">\n@import '../../ext.wikilambda.edit.less';\n\n.ext-wikilambda-dialog {\n\tposition: fixed;\n\twidth: 100%;\n\theight: 100%;\n\tbackground: #ffffffbd;\n\tleft: 0;\n\tright: 0;\n\tbottom: 0;\n\tdisplay: flex;\n\tjustify-content: center;\n\talign-items: center;\n\tz-index: 999;\n\n\t&__box {\n\t\tbackground: @background-color-base;\n\t\tborder: solid 1px @border-color-base;\n\t\tborder-radius: @border-radius-base;\n\t\tbox-shadow: @box-shadow-drop-medium;\n\t\tmin-width: 300px;\n\t\tmax-width: 75%;\n\t\tmax-height: 75%;\n\t\toverflow-y: auto;\n\n\t\t&--size {\n\t\t\t&-auto {\n\t\t\t\twidth: auto;\n\t\t\t\toverflow-x: auto;\n\t\t\t}\n\n\t\t\t&-small {\n\t\t\t\twidth: 300px;\n\t\t\t}\n\t\t}\n\t}\n\n\t&_text {\n\t\tpadding: @spacing-100;\n\t\tdisplay: flex;\n\t}\n\n\t&__header {\n\t\talign-items: center;\n\t\tdisplay: flex;\n\t\tjustify-content: space-between;\n\t\tpadding: 8px 2px 6px 16px;\n\t\tposition: sticky;\n\t\ttop: 0;\n\t\tbackground: @background-color-base;\n\n\t\t&__title {\n\t\t\twidth: 100%;\n\t\t}\n\n\t\t&__close-button {\n\t\t\tdisplay: flex;\n\t\t\tcolor: @color-base;\n\t\t\tjustify-content: center;\n\t\t\talign-items: center;\n\t\t\theight: @size-200;\n\t\t\twidth: @size-200;\n\t\t\tbackground: none;\n\t\t\tborder: 0;\n\t\t}\n\t}\n\n\t&__body {\n\t\tpadding: 0 24px 0 24px;\n\t}\n\n\t&__action-buttons {\n\t\tbutton {\n\t\t\tdisplay: block;\n\t\t\twidth: 100%;\n\t\t\theight: 32px;\n\t\t}\n\t}\n\n\t&__legal-text {\n\t\tfont-size: @wl-font-size-base;\n\t\tline-height: @line-height-medium;\n\t\tpadding: @spacing-100 @spacing-150;\n\t\tcolor: @color-placeholder;\n\n\t\thr {\n\t\t\tcolor: @border-color-subtle;\n\t\t\tmargin-bottom: @spacing-50;\n\t\t}\n\t}\n\n\t&__divider {\n\t\tmargin-bottom: @spacing-75;\n\t\tmargin-top: 0;\n\t}\n}\n</style>\n","usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/resources/ext.wikilambda.edit/components/base/DialogContainer.vue","messages":[{"ruleId":"vue/require-explicit-emits","severity":1,"message":"The \"confirm-dialog\" event has been triggered but not declared on `emits` option.","line":21,"column":28,"nodeType":"Literal","messageId":"missing","endLine":21,"endColumn":44,"suggestions":[{"messageId":"addArrayEmitsOption","data":{"name":"confirm-dialog","emitsKind":"`emits` option"},"fix":{"range":[2104,2104],"text":"\nemits: ['confirm-dialog'],"},"desc":"Add the `emits` option with array syntax and define \"confirm-dialog\" event."},{"messageId":"addObjectEmitsOption","data":{"name":"confirm-dialog","emitsKind":"`emits` option"},"fix":{"range":[2104,2104],"text":"\nemits: {'confirm-dialog': null},"},"desc":"Add the `emits` option with object syntax and define \"confirm-dialog\" event."}]},{"ruleId":"vue/require-default-prop","severity":1,"message":"Prop 'size' requires default value to be set.","line":72,"column":3,"nodeType":"Property","messageId":"missingDefault","endLine":74,"endColumn":4},{"ruleId":"vue/require-default-prop","severity":1,"message":"Prop 'buttonAction' requires default value to be set.","line":86,"column":3,"nodeType":"Property","messageId":"missingDefault","endLine":89,"endColumn":4},{"ruleId":"vue/require-explicit-emits","severity":1,"message":"The \"close-dialog\" event has been triggered but not declared on `emits` option.","line":112,"column":16,"nodeType":"Literal","messageId":"missing","endLine":112,"endColumn":30,"suggestions":[{"messageId":"addArrayEmitsOption","data":{"name":"close-dialog","emitsKind":"`emits` option"},"fix":{"range":[2104,2104],"text":"\nemits: ['close-dialog'],"},"desc":"Add the `emits` option with array syntax and define \"close-dialog\" event."},{"messageId":"addObjectEmitsOption","data":{"name":"close-dialog","emitsKind":"`emits` option"},"fix":{"range":[2104,2104],"text":"\nemits: {'close-dialog': null},"},"desc":"Add the `emits` option with object syntax and define \"close-dialog\" event."}]},{"ruleId":"vue/require-explicit-emits","severity":1,"message":"The \"exit-dialog\" event has been triggered but not declared on `emits` option.","line":116,"column":16,"nodeType":"Literal","messageId":"missing","endLine":116,"endColumn":29,"suggestions":[{"messageId":"addArrayEmitsOption","data":{"name":"exit-dialog","emitsKind":"`emits` option"},"fix":{"range":[2104,2104],"text":"\nemits: ['exit-dialog'],"},"desc":"Add the `emits` option with array syntax and define \"exit-dialog\" event."},{"messageId":"addObjectEmitsOption","data":{"name":"exit-dialog","emitsKind":"`emits` option"},"fix":{"range":[2104,2104],"text":"\nemits: {'exit-dialog': null},"},"desc":"Add the `emits` option with object syntax and define \"exit-dialog\" event."}]}],"suppressedMessages":[{"ruleId":"vue/no-boolean-default","severity":2,"message":"Boolean prop should only be defaulted to false.","line":58,"column":13,"nodeType":"Literal","endLine":58,"endColumn":17,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"vue/no-boolean-default","severity":2,"message":"Boolean prop should only be defaulted to false.","line":64,"column":13,"nodeType":"Literal","endLine":64,"endColumn":17,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"vue/no-unused-properties","severity":2,"message":"'openDialog' of method found, but never used.","line":107,"column":3,"nodeType":"Identifier","messageId":"unused","endLine":107,"endColumn":13,"suppressions":[{"kind":"directive","justification":""}]}],"errorCount":0,"fatalErrorCount":0,"warningCount":5,"fixableErrorCount":0,"fixableWarningCount":0,"source":"<template>\n\t<!--\n\t\tWikiLambda Vue component for a container for a Dialog\n\n\t\t@copyright 2020– Abstract Wikipedia team; see AUTHORS.txt\n\t\t@license MIT\n\t-->\n\t<Teleport v-if=\"isVisible\" to=\"#ext-wikilambda-app\">\n\t\t<wl-base-dialog\n\t\t\t:custom-class=\"customClass\"\n\t\t\t:cancel-button-text=\"cancelButtonTextOrDefault\"\n\t\t\t:confirm-button-text=\"confirmButtonTextOrDefault\"\n\t\t\t:can-click-outside-to-close=\"canClickOutsideToClose\"\n\t\t\t:show-action-buttons=\"showActionButtons\"\n\t\t\t:size=\"size\"\n\t\t\t:legal-text=\"legalText\"\n\t\t\t:primary-button-disabled=\"primaryButtonDisabled\"\n\t\t\t:button-action=\"buttonAction\"\n\t\t\t@exit-dialog=\"exitDialog\"\n\t\t\t@close-dialog=\"closeDialog\"\n\t\t\t@confirm-dialog=\"$emit( 'confirm-dialog' )\"\n\t\t>\n\t\t\t<template #dialog-title>\n\t\t\t\t<slot name=\"dialog-container-title\"></slot>\n\t\t\t</template>\n\t\t\t<slot></slot>\n\t\t</wl-base-dialog>\n\t</Teleport>\n</template>\n\n<script>\nvar Dialog = require( './Dialog.vue' );\n\n// @vue/component\nmodule.exports = exports = {\n\tname: 'wl-base-dialog-container',\n\tcomponents: {\n\t\t'wl-base-dialog': Dialog\n\t},\n\tprops: {\n\t\tcancelButtonText: {\n\t\t\ttype: String,\n\t\t\trequired: false,\n\t\t\t// The default value is generated in cancelButtonTextOrDefault\n\t\t\t// Explicitly setting default=undefined here eliminates a grunt warning\n\t\t\tdefault: undefined\n\t\t},\n\t\tconfirmButtonText: {\n\t\t\ttype: String,\n\t\t\trequired: false,\n\t\t\t// The default value is generated in confirmButtonTextOrDefault\n\t\t\t// Explicitly setting default=undefined here eliminates a grunt warning\n\t\t\tdefault: undefined\n\t\t},\n\t\tcanClickOutsideToClose: {\n\t\t\ttype: Boolean,\n\t\t\t// eslint-disable-next-line vue/no-boolean-default\n\t\t\tdefault: true,\n\t\t\trequired: false\n\t\t},\n\t\tshowActionButtons: {\n\t\t\ttype: Boolean,\n\t\t\t// eslint-disable-next-line vue/no-boolean-default\n\t\t\tdefault: true,\n\t\t\trequired: false\n\t\t},\n\t\tcustomClass: {\n\t\t\ttype: String,\n\t\t\trequired: false,\n\t\t\tdefault: ''\n\t\t},\n\t\tsize: {\n\t\t\ttype: String\n\t\t},\n\t\tlegalText: {\n\t\t\ttype: String,\n\t\t\trequired: false,\n\t\t\tdefault: ''\n\t\t},\n\t\tprimaryButtonDisabled: {\n\t\t\ttype: Boolean,\n\n\t\t\tdefault: false,\n\t\t\trequired: false\n\t\t},\n\t\tbuttonAction: {\n\t\t\ttype: String,\n\t\t\trequired: false\n\t\t}\n\t},\n\tdata: function () {\n\t\treturn {\n\t\t\tisVisible: false\n\t\t};\n\t},\n\tcomputed: {\n\t\t// We can't call this.$i18n in the default value of a prop, so do it here\n\t\tcancelButtonTextOrDefault: function () {\n\t\t\treturn this.cancelButtonText || this.$i18n( 'wikilambda-cancel' ).text();\n\t\t},\n\t\tconfirmButtonTextOrDefault: function () {\n\t\t\treturn this.confirmButtonText || this.$i18n( 'wikilambda-confirm' ).text();\n\t\t}\n\t},\n\tmethods: {\n\t\t// eslint-disable-next-line vue/no-unused-properties\n\t\topenDialog: function () {\n\t\t\tthis.isVisible = true;\n\t\t},\n\t\tcloseDialog: function () {\n\t\t\tthis.isVisible = false;\n\t\t\tthis.$emit( 'close-dialog' );\n\t\t},\n\t\texitDialog: function () {\n\t\t\tthis.isVisible = false;\n\t\t\tthis.$emit( 'exit-dialog' );\n\t\t}\n\t}\n};\n</script>\n","usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/resources/ext.wikilambda.edit/components/base/ExpandedToggle.vue","messages":[{"ruleId":"vue/require-explicit-emits","severity":1,"message":"The \"toggle\" event has been triggered but not declared on `emits` option.","line":13,"column":26,"nodeType":"Literal","messageId":"missing","endLine":13,"endColumn":34,"suggestions":[{"messageId":"addArrayEmitsOption","data":{"name":"toggle","emitsKind":"`emits` option"},"fix":{"range":[730,730],"text":"\nemits: ['toggle'],"},"desc":"Add the `emits` option with array syntax and define \"toggle\" event."},{"messageId":"addObjectEmitsOption","data":{"name":"toggle","emitsKind":"`emits` option"},"fix":{"range":[730,730],"text":"\nemits: {'toggle': null},"},"desc":"Add the `emits` option with object syntax and define \"toggle\" event."}]}],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"<template>\n\t<!--\n\t\tWikiLambda Vue component that renders the expanded view toggle icon.\n\n\t\t@copyright 2020– Abstract Wikipedia team; see AUTHORS.txt\n\t\t@license MIT\n\t-->\n\t<cdx-icon\n\t\tclass=\"ext-wikilambda-expanded\"\n\t\t:class=\"expanded ? 'ext-wikilambda-expanded-toggle-on' : 'ext-wikilambda-expanded-toggle-off'\"\n\t\t:icon=\"icons.cdxIconExpand\"\n\t\ticon-label=\"Expand\"\n\t\t@click.prevent=\"$emit( 'toggle', $event )\">\n\t</cdx-icon>\n</template>\n\n<script>\nvar\n\tCdxIcon = require( '@wikimedia/codex' ).CdxIcon,\n\ticons = require( '../../../lib/icons.json' );\n\n// @vue/component\nmodule.exports = exports = {\n\tname: 'wl-expanded-toggle',\n\tcomponents: {\n\t\t'cdx-icon': CdxIcon\n\t},\n\tprops: {\n\t\texpanded: {\n\t\t\ttype: Boolean,\n\t\t\trequired: true\n\t\t}\n\t},\n\tdata: function () {\n\t\treturn {\n\t\t\ticons: icons\n\t\t};\n\t}\n};\n</script>\n\n<style lang=\"less\">\n@import '../../ext.wikilambda.edit.variables.less';\n\n.ext-wikilambda-expanded {\n\ttransition: transform @transition-duration-medium @transition-timing-function-system;\n\n\t@media ( prefers-reduced-motion ) {\n\t\ttransition: transform 0ms unset;\n\t}\n\n\t&.cdx-icon {\n\t\tcolor: @border-color-interactive;\n\t\twidth: @size-125;\n\t\theight: @size-125;\n\n\t\tsvg {\n\t\t\twidth: @size-75;\n\t\t\theight: @size-75;\n\t\t}\n\t}\n\n\t&.ext-wikilambda-expanded-toggle-off {\n\t\ttransform: rotate( -90deg );\n\t}\n}\n\n</style>\n","usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/resources/ext.wikilambda.edit/components/base/LeaveEditorDialog.vue","messages":[{"ruleId":"vue/require-explicit-emits","severity":1,"message":"The \"close-dialog\" event has been triggered but not declared on `emits` option.","line":51,"column":16,"nodeType":"Literal","messageId":"missing","endLine":51,"endColumn":30,"suggestions":[{"messageId":"addArrayEmitsOption","data":{"name":"close-dialog","emitsKind":"`emits` option"},"fix":{"range":[1165,1165],"text":"\nemits: ['close-dialog'],"},"desc":"Add the `emits` option with array syntax and define \"close-dialog\" event."},{"messageId":"addObjectEmitsOption","data":{"name":"close-dialog","emitsKind":"`emits` option"},"fix":{"range":[1165,1165],"text":"\nemits: {'close-dialog': null},"},"desc":"Add the `emits` option with object syntax and define \"close-dialog\" event."}]}],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"<template>\n\t<!--\n\t\tWikiLambda Vue component for the Leave Editor Dialog which is displayed when the user attempts to leave\n\t\tthe page before saving their changes.\n\n\t\t@copyright 2020– Abstract Wikipedia team; see AUTHORS.txt\n\t\t@license MIT\n\t-->\n\t<div class=\"ext-wikilambda-leaveeditordialog\">\n\t\t<!-- eslint-disable vue/no-v-model-argument -->\n\t\t<!-- eslint-disable vue/no-unsupported-features -->\n\t\t<cdx-dialog\n\t\t\t:open=\"showDialog\"\n\t\t\tclose-button-label=\"Close\"\n\t\t\t:title=\"$i18n( 'wikilambda-editor-leave-edit-mode-header' ).text()\"\n\t\t\t:primary-action=\"primaryActionText()\"\n\t\t\t:default-action=\"defaultActionText()\"\n\t\t\t@update:open=\"stayOnPage\"\n\t\t\t@primary=\"leavePage\"\n\t\t\t@default=\"stayOnPage\"\n\t\t>\n\t\t\t<div>\n\t\t\t\t{{ $i18n( 'wikilambda-publish-lose-changes-prompt' ).text() }}\n\t\t\t</div>\n\t\t</cdx-dialog>\n\t</div>\n</template>\n\n<script>\nvar CdxDialog = require( '@wikimedia/codex' ).CdxDialog;\n\n// @vue/components\nmodule.exports = exports = {\n\tname: 'wl-leave-editor-dialog',\n\tcomponents: {\n\t\t'cdx-dialog': CdxDialog\n\t},\n\tprops: {\n\t\tshowDialog: {\n\t\t\ttype: Boolean,\n\t\t\trequired: true,\n\t\t\tdefault: false\n\t\t},\n\t\tcontinueCallback: {\n\t\t\ttype: Function,\n\t\t\trequired: true\n\t\t}\n\t},\n\tmethods: {\n\t\tstayOnPage: function () {\n\t\t\tthis.$emit( 'close-dialog' );\n\t\t},\n\t\tleavePage: function () {\n\t\t\tthis.continueCallback();\n\t\t},\n\t\tprimaryActionText: function () {\n\t\t\treturn {\n\t\t\t\tlabel: this.$i18n( 'wikilambda-discard-edits' ).text(),\n\t\t\t\tactionType: 'destructive'\n\t\t\t};\n\t\t},\n\t\tdefaultActionText: function () {\n\t\t\treturn { label: this.$i18n( 'wikilambda-continue-editing' ).text() };\n\t\t}\n\t}\n};\n</script>\n","usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/resources/ext.wikilambda.edit/components/base/LocalizedLabel.vue","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/resources/ext.wikilambda.edit/components/base/Pagination.vue","messages":[{"ruleId":"vue/require-explicit-emits","severity":1,"message":"The \"update-page\" event has been triggered but not declared on `emits` option.","line":83,"column":16,"nodeType":"Literal","messageId":"missing","endLine":83,"endColumn":29,"suggestions":[{"messageId":"addArrayEmitsOption","data":{"name":"update-page","emitsKind":"`emits` option"},"fix":{"range":[1736,1736],"text":"\nemits: ['update-page'],"},"desc":"Add the `emits` option with array syntax and define \"update-page\" event."},{"messageId":"addObjectEmitsOption","data":{"name":"update-page","emitsKind":"`emits` option"},"fix":{"range":[1736,1736],"text":"\nemits: {'update-page': null},"},"desc":"Add the `emits` option with object syntax and define \"update-page\" event."}]},{"ruleId":"vue/require-explicit-emits","severity":1,"message":"The \"update-page\" event has been triggered but not declared on `emits` option.","line":91,"column":18,"nodeType":"Literal","messageId":"missing","endLine":91,"endColumn":31,"suggestions":[{"messageId":"addArrayEmitsOption","data":{"name":"update-page","emitsKind":"`emits` option"},"fix":{"range":[1736,1736],"text":"\nemits: ['update-page'],"},"desc":"Add the `emits` option with array syntax and define \"update-page\" event."},{"messageId":"addObjectEmitsOption","data":{"name":"update-page","emitsKind":"`emits` option"},"fix":{"range":[1736,1736],"text":"\nemits: {'update-page': null},"},"desc":"Add the `emits` option with object syntax and define \"update-page\" event."}]},{"ruleId":"vue/require-explicit-emits","severity":1,"message":"The \"update-page\" event has been triggered but not declared on `emits` option.","line":93,"column":18,"nodeType":"Literal","messageId":"missing","endLine":93,"endColumn":31,"suggestions":[{"messageId":"addArrayEmitsOption","data":{"name":"update-page","emitsKind":"`emits` option"},"fix":{"range":[1736,1736],"text":"\nemits: ['update-page'],"},"desc":"Add the `emits` option with array syntax and define \"update-page\" event."},{"messageId":"addObjectEmitsOption","data":{"name":"update-page","emitsKind":"`emits` option"},"fix":{"range":[1736,1736],"text":"\nemits: {'update-page': null},"},"desc":"Add the `emits` option with object syntax and define \"update-page\" event."}]},{"ruleId":"vue/require-explicit-emits","severity":1,"message":"The \"update-page\" event has been triggered but not declared on `emits` option.","line":95,"column":18,"nodeType":"Literal","messageId":"missing","endLine":95,"endColumn":31,"suggestions":[{"messageId":"addArrayEmitsOption","data":{"name":"update-page","emitsKind":"`emits` option"},"fix":{"range":[1736,1736],"text":"\nemits: ['update-page'],"},"desc":"Add the `emits` option with array syntax and define \"update-page\" event."},{"messageId":"addObjectEmitsOption","data":{"name":"update-page","emitsKind":"`emits` option"},"fix":{"range":[1736,1736],"text":"\nemits: {'update-page': null},"},"desc":"Add the `emits` option with object syntax and define \"update-page\" event."}]},{"ruleId":"vue/require-explicit-emits","severity":1,"message":"The \"reset-view\" event has been triggered but not declared on `emits` option.","line":100,"column":16,"nodeType":"Literal","messageId":"missing","endLine":100,"endColumn":28,"suggestions":[{"messageId":"addArrayEmitsOption","data":{"name":"reset-view","emitsKind":"`emits` option"},"fix":{"range":[1736,1736],"text":"\nemits: ['reset-view'],"},"desc":"Add the `emits` option with array syntax and define \"reset-view\" event."},{"messageId":"addObjectEmitsOption","data":{"name":"reset-view","emitsKind":"`emits` option"},"fix":{"range":[1736,1736],"text":"\nemits: {'reset-view': null},"},"desc":"Add the `emits` option with object syntax and define \"reset-view\" event."}]}],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":5,"fixableErrorCount":0,"fixableWarningCount":0,"source":"<template>\n\t<!--\n\t\tWikiLambda Vue component for viewing a function examples.\n\n\t\t@copyright 2020– Abstract Wikipedia team; see AUTHORS.txt\n\t\t@license MIT\n\t-->\n\t<div class=\"ext-wikilambda-pagination\">\n\t\t<cdx-button class=\"ext-wikilambda-pagination__view-all\" @click=\"resetView\">\n\t\t\t{{ getButtonText }}\n\t\t</cdx-button>\n\t\t<div class=\"ext-wikilambda-pagination__page-selector\">\n\t\t\t<div class=\"ext-wikilambda-pagination__page-selector__main\">\n\t\t\t\t<input\n\t\t\t\t\tref=\"pageInput\"\n\t\t\t\t\tclass=\"ext-wikilambda-pagination__page-selector__input\"\n\t\t\t\t\t:max=\"totalPages\"\n\t\t\t\t\t:value=\"currentPage\"\n\t\t\t\t\t@input=\"resetPage\"\n\t\t\t\t>\n\t\t\t\t<span class=\"ext-wikilambda-pagination__page-selector__total-pages\">/ {{ totalPages }} </span>\n\t\t\t</div>\n\t\t\t<cdx-button\n\t\t\t\tclass=\"ext-wikilambda-pagination__page-selector__action\"\n\t\t\t\t:disabled=\"currentPage === 1\"\n\t\t\t\t@click=\"updatePage( -1 )\"\n\t\t\t>\n\t\t\t\t<cdx-icon :icon=\"icons.cdxIconPrevious\" icon-label=\"Back\"></cdx-icon>\n\t\t\t</cdx-button>\n\t\t\t<cdx-button\n\t\t\t\tclass=\"ext-wikilambda-pagination__page-selector__action\"\n\t\t\t\t:disabled=\"currentPage === totalPages \"\n\t\t\t\t@click=\"updatePage( 1 )\"\n\t\t\t>\n\t\t\t\t<cdx-icon :icon=\"icons.cdxIconNext\" icon-label=\"Next\"></cdx-icon>\n\t\t\t</cdx-button>\n\t\t</div>\n\t</div>\n</template>\n\n<script>\nvar CdxButton = require( '@wikimedia/codex' ).CdxButton,\n\tCdxIcon = require( '@wikimedia/codex' ).CdxIcon,\n\ticons = require( '../../../lib/icons.json' );\n\n// @vue/component\nmodule.exports = exports = {\n\tname: 'wl-pagination-component',\n\tcomponents: {\n\t\t'cdx-button': CdxButton,\n\t\t'cdx-icon': CdxIcon\n\t},\n\tprops: {\n\t\ttotalPages: {\n\t\t\ttype: Number,\n\t\t\trequired: true\n\t\t},\n\t\tcurrentPage: {\n\t\t\ttype: Number,\n\t\t\trequired: false,\n\t\t\tdefault: 1\n\t\t},\n\t\tshowingAll: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false\n\t\t}\n\t},\n\tdata: function () {\n\t\treturn {\n\t\t\ticons: icons\n\t\t};\n\t},\n\tcomputed: {\n\t\tgetButtonText: function () {\n\t\t\tif ( !this.showingAll ) {\n\t\t\t\treturn this.$i18n( 'wikilambda-function-viewer-details-table-view-all' ).text();\n\t\t\t}\n\t\t\treturn this.$i18n( 'wikilambda-function-viewer-details-table-view-less' ).text();\n\t\t}\n\t},\n\tmethods: {\n\t\tupdatePage: function ( direction ) {\n\t\t\tthis.$emit( 'update-page', this.currentPage + direction );\n\t\t},\n\t\tresetPage: function () {\n\t\t\tconst inputValue = this.$refs.pageInput.value;\n\t\t\t// if there is value in the input box and it is a number\n\t\t\tif ( inputValue && !isNaN( inputValue ) ) {\n\t\t\t\t// if input number is too low set to 1 and if it is too high set to last page\n\t\t\t\tif ( inputValue < 1 ) {\n\t\t\t\t\tthis.$emit( 'update-page', 1 );\n\t\t\t\t} else if ( inputValue > this.totalPages ) {\n\t\t\t\t\tthis.$emit( 'update-page', this.totalPages );\n\t\t\t\t} else {\n\t\t\t\t\tthis.$emit( 'update-page', inputValue );\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tresetView: function () {\n\t\t\tthis.$emit( 'reset-view' );\n\t\t}\n\t}\n};\n</script>\n\n<style lang=\"less\">\n@import '../../ext.wikilambda.edit.less';\n\n.ext-wikilambda-pagination {\n\tpadding-top: @spacing-50;\n\tpadding-bottom: @spacing-100;\n\tdisplay: flex;\n\n\t&__view-all {\n\t\tflex: none;\n\t\theight: @size-200;\n\t}\n\n\t&__page-selector {\n\t\tdisplay: flex;\n\t\talign-content: center;\n\t\tmargin-left: auto;\n\n\t\t&__input {\n\t\t\twidth: @size-200;\n\t\t\theight: @size-200;\n\t\t\tmargin: 0;\n\t\t\ttext-align: center;\n\t\t\tborder: 1px solid @border-color-base;\n\t\t\tborder-radius: @border-radius-base;\n\t\t\tbox-sizing: @box-sizing-base;\n\t\t}\n\n\t\t&__total-pages {\n\t\t\theight: @size-200;\n\t\t\ttext-align: center;\n\t\t\tpadding: 0 6px;\n\t\t}\n\n\t\t&__action {\n\t\t\tpadding-left: 0;\n\t\t\tpadding-right: 0;\n\t\t\tmargin-left: @spacing-50;\n\t\t}\n\t}\n}\n</style>\n","usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/resources/ext.wikilambda.edit/components/base/PublishDialog.vue","messages":[{"ruleId":"vue/no-v-html","severity":1,"message":"'v-html' directive can lead to XSS attack.","line":46,"column":11,"nodeType":"VAttribute","endLine":46,"endColumn":35},{"ruleId":"vue/no-v-html","severity":1,"message":"'v-html' directive can lead to XSS attack.","line":89,"column":60,"nodeType":"VAttribute","endLine":89,"endColumn":78},{"ruleId":"vue/require-explicit-emits","severity":1,"message":"The \"close-dialog\" event has been triggered but not declared on `emits` option.","line":181,"column":16,"nodeType":"Literal","messageId":"missing","endLine":181,"endColumn":30,"suggestions":[{"messageId":"addArrayEmitsOption","data":{"name":"close-dialog","emitsKind":"`emits` option"},"fix":{"range":[3964,3964],"text":"\nemits: ['close-dialog'],"},"desc":"Add the `emits` option with array syntax and define \"close-dialog\" event."},{"messageId":"addObjectEmitsOption","data":{"name":"close-dialog","emitsKind":"`emits` option"},"fix":{"range":[3964,3964],"text":"\nemits: {'close-dialog': null},"},"desc":"Add the `emits` option with object syntax and define \"close-dialog\" event."}]}],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":3,"fixableErrorCount":0,"fixableWarningCount":0,"source":"<template>\n\t<!--\n\t\tWikiLambda Vue component for the Publish Dialog.\n\n\t\t@copyright 2020– Abstract Wikipedia team; see AUTHORS.txt\n\t\t@license MIT\n\t-->\n\t<div class=\"ext-wikilambda-publishdialog\">\n\t\t<!-- eslint-disable vue/no-v-model-argument -->\n\t\t<!-- eslint-disable vue/no-unsupported-features -->\n\t\t<cdx-dialog\n\t\t\tid=\"publish-dialog\"\n\t\t\ttitle=\"\"\n\t\t\t:open=\"showDialog\"\n\t\t\t@update:open=\"closeDialog\"\n\t\t>\n\t\t\t<div class=\"ext-wikilambda-publishdialog__header\">\n\t\t\t\t<span class=\"ext-wikilambda-publishdialog__header__title\">\n\t\t\t\t\t{{ $i18n( 'wikilambda-editor-publish-dialog-header' ).text() }}\n\t\t\t\t</span>\n\t\t\t\t<cdx-button\n\t\t\t\t\tweight=\"quiet\"\n\t\t\t\t\tclass=\"ext-wikilambda-publishdialog__header__close-button\"\n\t\t\t\t\t@click=\"closeDialog\"\n\t\t\t\t>\n\t\t\t\t\t<cdx-icon :icon=\"icons.cdxIconClose\"></cdx-icon>\n\t\t\t\t</cdx-button>\n\t\t\t</div>\n\t\t\t<div class=\"ext-wikilambda-publishdialog__summary\">\n\t\t\t\t<div v-if=\"hasErrors\" class=\"ext-wikilambda-publishdialog__errors\">\n\t\t\t\t\t<div v-for=\"error in errors\" :key=\"error.id\">\n\t\t\t\t\t\t<cdx-message\n\t\t\t\t\t\t\tclass=\"ext-wikilambda-publishdialog__errors__message\"\n\t\t\t\t\t\t\ttype=\"error\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{{ error.message }}\n\t\t\t\t\t\t</cdx-message>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div v-if=\"hasWarnings\" class=\"ext-wikilambda-publishdialog__warnings\">\n\t\t\t\t\t<div v-for=\"warning in warnings\" :key=\"warning.id\">\n\t\t\t\t\t\t<cdx-message\n\t\t\t\t\t\t\tclass=\"ext-wikilambda-publishdialog__warnings__message\"\n\t\t\t\t\t\t\ttype=\"warning\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<p v-html=\"warning.message\"></p>\n\t\t\t\t\t\t</cdx-message>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\n\t\t\t\t<div class=\"ext-wikilambda-publishdialog__summary\">\n\t\t\t\t\t<div class=\"ext-wikilambda-publishdialog__summary-label\">\n\t\t\t\t\t\t<label\n\t\t\t\t\t\t\tfor=\"ext-wikilambda-publishdialog__summary-input\"\n\t\t\t\t\t\t\tclass=\"ext-wikilambda-app__text-regular\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{{ $i18n( 'wikilambda-editor-publish-dialog-how-did-you-improve-label' )\n\t\t\t\t\t\t\t\t.text() }}\n\t\t\t\t\t\t</label>\n\t\t\t\t\t</div>\n\t\t\t\t\t<cdx-text-input\n\t\t\t\t\t\tid=\"ext-wikilambda-publishdialog__summary-input\"\n\t\t\t\t\t\tv-model=\"summary\"\n\t\t\t\t\t\tclass=\"ext-wikilambda-publishdialog__summary-input\"\n\t\t\t\t\t\t:aria-label=\"$i18n( 'wikilambda-editor-publish-dialog-summary-label' ).text()\"\n\t\t\t\t\t\t:placeholder=\"$i18n( 'wikilambda-editor-publish-dialog-summary-placeholder' ).text()\"\n\t\t\t\t\t></cdx-text-input>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"ext-wikilambda-publishdialog__actions\">\n\t\t\t\t\t<!-- TODO: (T325821) replace with codex footer slot when available -->\n\t\t\t\t\t<cdx-button\n\t\t\t\t\t\tclass=\"ext-wikilambda-publishdialog__actions__button-publish\"\n\t\t\t\t\t\taction=\"progressive\"\n\t\t\t\t\t\tweight=\"primary\"\n\t\t\t\t\t\t@click=\"publishZObject\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{{ $i18n( 'wikilambda-publishnew' ).text() }}\n\t\t\t\t\t</cdx-button>\n\n\t\t\t\t\t<cdx-button\n\t\t\t\t\t\tclass=\"ext-wikilambda-publishdialog__actions__button-cancel\"\n\t\t\t\t\t\t@click=\"closeDialog\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{{ $i18n( 'wikilambda-cancel' ).text() }}\n\t\t\t\t\t</cdx-button>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"ext-wikilambda-publishdialog__divider\">\n\t\t\t\t\t<hr>\n\t\t\t\t\t<div class=\"ext-wikilambda-publishdialog__legal-text\" v-html=\"legalText\"></div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</cdx-dialog>\n\t</div>\n</template>\n\n<script>\nconst Constants = require( '../../Constants.js' ),\n\tCdxTextInput = require( '@wikimedia/codex' ).CdxTextInput,\n\tCdxMessage = require( '@wikimedia/codex' ).CdxMessage,\n\tCdxDialog = require( '@wikimedia/codex' ).CdxDialog,\n\tCdxButton = require( '@wikimedia/codex' ).CdxButton,\n\tCdxIcon = require( '@wikimedia/codex' ).CdxIcon,\n\ticons = require( '../../../lib/icons.json' ),\n\tmapGetters = require( 'vuex' ).mapGetters,\n\tmapActions = require( 'vuex' ).mapActions;\n\n// @vue/component\nmodule.exports = exports = {\n\tname: 'wl-publish-dialog',\n\tcomponents: {\n\t\t'cdx-text-input': CdxTextInput,\n\t\t'cdx-message': CdxMessage,\n\t\t'cdx-dialog': CdxDialog,\n\t\t'cdx-button': CdxButton,\n\t\t'cdx-icon': CdxIcon\n\t},\n\tinject: {\n\t\tviewmode: { default: false }\n\t},\n\tprops: {\n\t\tshowDialog: {\n\t\t\ttype: Boolean,\n\t\t\trequired: true,\n\t\t\tdefault: false\n\t\t},\n\t\tshouldUnattachImplementationAndTester: {\n\t\t\ttype: Boolean,\n\t\t\trequired: false,\n\t\t\tdefault: false\n\t\t}\n\t},\n\tdata: function () {\n\t\treturn {\n\t\t\tsummary: '',\n\t\t\ticons: icons\n\t\t};\n\t},\n\tcomputed: $.extend( mapGetters( [\n\t\t'getCurrentZObjectId',\n\t\t'getCurrentZObjectType',\n\t\t'getErrors'\n\t] ), {\n\t\terrors: function () {\n\t\t\treturn Object.keys( this.getErrors )\n\t\t\t\t.map( ( key ) => this.getErrors[ key ] )\n\t\t\t\t.filter( ( error ) => error.type === Constants.errorTypes.ERROR );\n\t\t},\n\t\twarnings: function () {\n\t\t\treturn Object.keys( this.getErrors )\n\t\t\t\t.map( ( key ) => this.getErrors[ key ] )\n\t\t\t\t.filter( ( error ) => error.type === Constants.errorTypes.WARNING );\n\t\t},\n\t\thasErrors: function () {\n\t\t\treturn this.errors.length !== 0;\n\t\t},\n\t\thasWarnings: function () {\n\t\t\treturn this.warnings.length !== 0;\n\t\t},\n\t\tlegalText: function () {\n\t\t\t// Special message for implementations (Apache 2.0 licence for code).\n\t\t\tif ( this.getCurrentZObjectType === Constants.Z_IMPLEMENTATION ) {\n\t\t\t\treturn this.$i18n( 'wikifunctions-edit-copyrightwarning-implementation' );\n\t\t\t}\n\n\t\t\t// General message for all other kinds of ZObjects (CC0).\n\t\t\treturn this.$i18n( 'wikifunctions-edit-copyrightwarning-function' );\n\t\t}\n\t} ),\n\tmethods: $.extend( mapActions( [\n\t\t'submitZObject',\n\t\t'setError'\n\t] ),\n\t{\n\t\tcloseDialog: function () {\n\t\t\tif ( this.hasErrors ) {\n\t\t\t\tthis.setError( {\n\t\t\t\t\tinternalId: this.getCurrentZObjectId,\n\t\t\t\t\terrorState: false\n\t\t\t\t} );\n\t\t\t}\n\t\t\tthis.$emit( 'close-dialog' );\n\t\t},\n\t\tpublishZObject: function () {\n\t\t\tvar summary = this.summary;\n\t\t\tvar shouldUnattachImplementationAndTester = this.shouldUnattachImplementationAndTester;\n\t\t\tthis.submitZObject( { summary, shouldUnattachImplementationAndTester } ).then( function ( pageTitle ) {\n\t\t\t\tif ( pageTitle ) {\n\t\t\t\t\twindow.location.href = new mw.Title( pageTitle ).getUrl() + '?success=true';\n\t\t\t\t}\n\t\t\t} ).catch( function ( error ) {\n\t\t\t\tconst payload = {\n\t\t\t\t\tinternalId: this.getCurrentZObjectId,\n\t\t\t\t\terrorState: true,\n\t\t\t\t\terrorMessage: error.error.message,\n\t\t\t\t\terrorType: Constants.errorTypes.ERROR\n\t\t\t\t};\n\t\t\t\tthis.setError( payload );\n\t\t\t}.bind( this ) );\n\t\t}\n\t} )\n};\n</script>\n\n<style lang=\"less\">\n@import '../../ext.wikilambda.edit.less';\n\n/* stylelint-disable selector-max-id */\n#publish-dialog .cdx-dialog__header {\n\tdisplay: none;\n}\n\n#publish-dialog .cdx-dialog__body {\n\tmargin: 0 @spacing-50;\n}\n\nhr {\n\tcolor: @border-color-subtle;\n\tmargin-bottom: @spacing-100;\n}\n\n.ext-wikilambda-publishdialog {\n\t&__errors {\n\t\tpadding: @spacing-50 0;\n\t}\n\n\t&__warnings {\n\t\tpadding: @spacing-50 0;\n\n\t\tp:first-child {\n\t\t\tmargin-top: 0;\n\t\t\thyphens: none;\n\t\t}\n\t}\n\n\t&__summary {\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t\tpadding: @spacing-50 0;\n\t\tcolor: @color-placeholder;\n\t}\n\n\t&__summary-label {\n\t\tpadding-bottom: @spacing-25;\n\t}\n\n\t&__divider {\n\t\tmargin-top: @spacing-100;\n\t}\n\n\t&__actions {\n\t\tdisplay: flex;\n\t\tflex-direction: row-reverse;\n\n\t\t&__button-cancel {\n\t\t\tmargin-right: @spacing-50;\n\t\t}\n\t}\n\n\t&__legal-text {\n\t\tcolor: @color-placeholder;\n\t}\n\n\t&__body {\n\t\tpadding: 0 @spacing-100 @spacing-100;\n\t}\n\n\t&__header {\n\t\tdisplay: flex;\n\t\tjustify-content: space-between;\n\t\tpadding: @spacing-50 0;\n\t\tposition: sticky;\n\t\ttop: 0;\n\t\tbackground: @background-color-base;\n\n\t\t&__title {\n\t\t\twidth: 100%;\n\t\t\tfont-weight: bold;\n\t\t\tfont-size: 1.15em;\n\t\t\tmargin: auto;\n\t\t}\n\n\t\t&__close-button {\n\t\t\tdisplay: flex;\n\t\t\tcolor: @color-notice;\n\t\t\tjustify-content: center;\n\t\t\talign-items: center;\n\t\t\theight: @size-200;\n\t\t\twidth: @size-200;\n\t\t\tbackground: none;\n\t\t\tborder: 0;\n\t\t\tmargin: auto;\n\t\t}\n\t}\n}\n</style>\n","usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/resources/ext.wikilambda.edit/components/base/Select.vue","messages":[{"ruleId":"vue/require-default-prop","severity":1,"message":"Prop 'id' requires default value to be set.","line":39,"column":3,"nodeType":"Property","messageId":"missingDefault","endLine":42,"endColumn":4},{"ruleId":"vue/require-explicit-emits","severity":1,"message":"The \"update:selected\" event has been triggered but not declared on `emits` option.","line":67,"column":31,"nodeType":"Literal","messageId":"missing","endLine":67,"endColumn":48,"suggestions":[{"messageId":"addArrayEmitsOption","data":{"name":"update:selected","emitsKind":"`emits` option"},"fix":{"range":[1196,1196],"text":"\nemits: ['update:selected'],"},"desc":"Add the `emits` option with array syntax and define \"update:selected\" event."},{"messageId":"addObjectEmitsOption","data":{"name":"update:selected","emitsKind":"`emits` option"},"fix":{"range":[1196,1196],"text":"\nemits: {'update:selected': null},"},"desc":"Add the `emits` option with object syntax and define \"update:selected\" event."}]}],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":"<template>\n\t<!--\n\t\tWikiLambda Vue component wrapper for Codex Select component, to make it wrap it's content\n\t\tand animate into a full width on focus\n\n\t\t@copyright 2020– Abstract Wikipedia team; see AUTHORS.txt\n\t\t@license MIT\n\t-->\n\t<!-- eslint-disable vue/no-v-model-argument -->\n\t<!-- eslint-disable vue/no-unsupported-features -->\n\t<cdx-select\n\t\t:id=\"id\"\n\t\tv-model:selected=\"value\"\n\t\tclass=\"ext-wikilambda-edit-select\"\n\t\t:class=\"{ 'ext-wikilambda-edit-select__fitted': fitWidth }\"\n\t\t:style=\"{ width: fieldWidth }\"\n\t\t:menu-items=\"menuItems\"\n\t\t:disabled=\"disabled\"\n\t\t:default-label=\"defaultLabel\"\n\t\tv-bind=\"$attrs\"\n\t></cdx-select>\n</template>\n\n<script>\nvar CdxSelect = require( '@wikimedia/codex' ).CdxSelect;\n\n// @vue/component\nmodule.exports = exports = {\n\tname: 'wl-select',\n\tcomponents: {\n\t\t'cdx-select': CdxSelect\n\t},\n\tinheritAttrs: false,\n\tprops: {\n\t\tselected: {\n\t\t\ttype: String,\n\t\t\tdefault: ''\n\t\t},\n\t\tid: {\n\t\t\ttype: String,\n\t\t\trequired: false\n\t\t},\n\t\tdisabled: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false\n\t\t},\n\t\tfitWidth: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false\n\t\t},\n\t\tmenuItems: {\n\t\t\ttype: Array,\n\t\t\trequired: true\n\t\t},\n\t\tdefaultLabel: {\n\t\t\ttype: String,\n\t\t\trequired: false,\n\t\t\tdefault: ''\n\t\t}\n\t},\n\tcomputed: {\n\t\t/**\n\t\t * Computed wrapper for selected\n\t\t */\n\t\tvalue: {\n\t\t\tget() { return this.selected; },\n\t\t\tset( value ) { this.$emit( 'update:selected', value ); }\n\t\t},\n\t\t/**\n\t\t * Returns the width of the field depending on the fitWidth property.\n\t\t * Because the field has min-width:fit-width css property, we can return the\n\t\t * minimum width possible (0ch) and this will transition from fit-width to 100%\n\t\t *\n\t\t * @return {string}\n\t\t */\n\t\tfieldWidth: function () {\n\t\t\tif ( !this.fitWidth ) {\n\t\t\t\treturn 'auto';\n\t\t\t}\n\t\t\treturn '0ch';\n\t\t}\n\t}\n};\n</script>\n\n<style lang=\"less\">\n@import '../../ext.wikilambda.edit.less';\n\n.ext-wikilambda-edit-select {\n\t&__fitted {\n\t\t&.cdx-select-vue,\n\t\t&.cdx-select {\n\t\t\ttransition: @wl-transition-field-expand;\n\t\t\tmin-width: fit-content;\n\n\t\t\t.cdx-select__handle,\n\t\t\t.cdx-select-vue__handle {\n\t\t\t\tmin-width: auto;\n\t\t\t}\n\n\t\t\t&--expanded {\n\t\t\t\t/* stylelint-disable declaration-no-important */\n\t\t\t\twidth: 100% !important;\n\t\t\t}\n\t\t}\n\t}\n}\n</style>\n","usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/resources/ext.wikilambda.edit/components/base/Table.vue","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/resources/ext.wikilambda.edit/components/base/Text.vue","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/resources/ext.wikilambda.edit/components/base/TextInput.vue","messages":[{"ruleId":"vue/require-default-prop","severity":1,"message":"Prop 'id' requires default value to be set.","line":45,"column":3,"nodeType":"Property","messageId":"missingDefault","endLine":48,"endColumn":4},{"ruleId":"vue/require-default-prop","severity":1,"message":"Prop 'ariaLabel' requires default value to be set.","line":57,"column":3,"nodeType":"Property","messageId":"missingDefault","endLine":60,"endColumn":4},{"ruleId":"vue/require-default-prop","severity":1,"message":"Prop 'chip' requires default value to be set.","line":65,"column":3,"nodeType":"Property","messageId":"missingDefault","endLine":68,"endColumn":4},{"ruleId":"vue/require-explicit-emits","severity":1,"message":"The \"update:modelValue\" event has been triggered but not declared on `emits` option.","line":81,"column":31,"nodeType":"Literal","messageId":"missing","endLine":81,"endColumn":50,"suggestions":[{"messageId":"addArrayEmitsOption","data":{"name":"update:modelValue","emitsKind":"`emits` option"},"fix":{"range":[1318,1318],"text":"\nemits: ['update:modelValue'],"},"desc":"Add the `emits` option with array syntax and define \"update:modelValue\" event."},{"messageId":"addObjectEmitsOption","data":{"name":"update:modelValue","emitsKind":"`emits` option"},"fix":{"range":[1318,1318],"text":"\nemits: {'update:modelValue': null},"},"desc":"Add the `emits` option with object syntax and define \"update:modelValue\" event."}]}],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":4,"fixableErrorCount":0,"fixableWarningCount":0,"source":"<template>\n\t<!--\n\t\tWikiLambda Vue component wrapper for Codex Text Input component, to make it wrap it's content\n\t\tand animate into a full width on focus\n\n\t\t@copyright 2020– Abstract Wikipedia team; see AUTHORS.txt\n\t\t@license MIT\n\t-->\n\t<div class=\"ext-wikilambda-edit-text-input\">\n\t\t<span\n\t\t\tv-if=\"hasChip\"\n\t\t\tclass=\"ext-wikilambda-lang-chip\"\n\t\t>{{ chip }}</span>\n\t\t<cdx-text-input\n\t\t\t:id=\"id\"\n\t\t\tv-model=\"value\"\n\t\t\tclass=\"ext-wikilambda-edit-text-input__field\"\n\t\t\t:class=\"inputClasses\"\n\t\t\t:style=\"{ width: fieldWidth }\"\n\t\t\t:aria-label=\"ariaLabel\"\n\t\t\t:placeholder=\"placeholder\"\n\t\t\t:disabled=\"disabled\"\n\t\t\tv-bind=\"$attrs\"\n\t\t\t@focus=\"active = true\"\n\t\t\t@blur=\"active = false\"\n\t\t></cdx-text-input>\n\t</div>\n</template>\n\n<script>\nvar CdxTextInput = require( '@wikimedia/codex' ).CdxTextInput;\n\n// @vue/component\nmodule.exports = exports = {\n\tname: 'wl-text-input',\n\tcomponents: {\n\t\t'cdx-text-input': CdxTextInput\n\t},\n\tinheritAttrs: false,\n\tprops: {\n\t\tmodelValue: {\n\t\t\ttype: String,\n\t\t\tdefault: ''\n\t\t},\n\t\tid: {\n\t\t\ttype: String,\n\t\t\trequired: false\n\t\t},\n\t\tdisabled: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false\n\t\t},\n\t\tplaceholder: {\n\t\t\ttype: String,\n\t\t\tdefault: ''\n\t\t},\n\t\tariaLabel: {\n\t\t\ttype: String,\n\t\t\trequired: false\n\t\t},\n\t\tfitWidth: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false\n\t\t},\n\t\tchip: {\n\t\t\ttype: String,\n\t\t\trequired: false\n\t\t}\n\t},\n\tdata: function () {\n\t\treturn {\n\t\t\tactive: false\n\t\t};\n\t},\n\tcomputed: {\n\t\t/**\n\t\t * Computed wrapper for modelValue\n\t\t */\n\t\tvalue: {\n\t\t\tget() { return this.modelValue; },\n\t\t\tset( value ) { this.$emit( 'update:modelValue', value ); }\n\t\t},\n\t\t/**\n\t\t * This computed property calculates the width of the field depending on its value\n\t\t *\n\t\t * TODO: Because this is a not a monospace font, the larger the word is, the\n\t\t * less space it occupies in ch, so probably we should remove a %:\n\t\t *\n\t\t * > 1ch is usually wider than the average character width, usually by around 20-30%\n\t\t *\n\t\t * Refs:\n\t\t * https://stackoverflow.com/questions/3392493/adjust-width-of-input-field-to-its-input\n\t\t * https://meyerweb.com/eric/thoughts/2018/06/28/what-is-the-css-ch-unit/\n\t\t *\n\t\t * @return {string}\n\t\t */\n\t\tfieldWidth: function () {\n\t\t\tif ( !this.fitWidth ) {\n\t\t\t\treturn 'auto';\n\t\t\t}\n\t\t\tif ( this.active ) {\n\t\t\t\treturn '100%';\n\t\t\t}\n\t\t\t// If no value or placeholder, default is 20 characters\n\t\t\tvar chars = 20;\n\t\t\tif ( this.modelValue && ( this.modelValue.length > 0 ) ) {\n\t\t\t\t// Two extra characters to account for inner padding\n\t\t\t\tchars = this.modelValue.length + 3;\n\t\t\t} else if ( this.placeholder && ( this.placeholder.length > 0 ) ) {\n\t\t\t\tchars = this.placeholder.length;\n\t\t\t}\n\t\t\t// Subtract 10% to accomodate a fixed width font\n\t\t\tchars = Math.ceil( chars - chars * 0.1 );\n\t\t\t// Add 5 chars if it has language chip\n\t\t\tif ( this.hasChip ) {\n\t\t\t\tchars = chars + 5;\n\t\t\t}\n\t\t\treturn `${chars}ch`;\n\t\t},\n\t\t/**\n\t\t * Whether the text input has an embed language chip\n\t\t *\n\t\t * @return {boolean}\n\t\t */\n\t\thasChip: function () {\n\t\t\treturn ( this.chip !== undefined );\n\t\t},\n\t\tinputClasses: function () {\n\t\t\tconst classes = [];\n\t\t\tif ( this.fitWidth ) {\n\t\t\t\tclasses.push( 'ext-wikilambda-edit-text-input__fitted' );\n\t\t\t}\n\t\t\tif ( this.hasChip ) {\n\t\t\t\tclasses.push( 'ext-wikilambda-edit-text-input__chipped' );\n\t\t\t\tif ( this.chip.length > 2 ) {\n\t\t\t\t\tclasses.push( 'ext-wikilambda-edit-text-input__chipped__lg' );\n\t\t\t\t} else {\n\t\t\t\t\tclasses.push( 'ext-wikilambda-edit-text-input__chipped__sm' );\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn classes;\n\t\t}\n\t}\n};\n</script>\n\n<style lang=\"less\">\n@import '../../ext.wikilambda.edit.less';\n\n.ext-wikilambda-edit-text-input {\n\theight: inherit;\n\tdisplay: flex;\n\tflex-direction: row;\n\talign-items: center;\n\n\t&__fitted {\n\t\ttransition: @wl-transition-field-expand;\n\n\t\t.cdx-text-input__input {\n\t\t\tmin-width: auto;\n\t\t}\n\t}\n\n\t&__chipped {\n\t\tposition: absolute;\n\t\ttop: 0;\n\n\t\t&__lg {\n\t\t\t.cdx-text-input__input {\n\t\t\t\tpadding-left: calc( 8px + 40px + 8px );\n\t\t\t}\n\t\t}\n\n\t\t&__sm {\n\t\t\t.cdx-text-input__input {\n\t\t\t\tpadding-left: calc( 8px + 36px + 8px );\n\t\t\t}\n\t\t}\n\t}\n\n\tspan.ext-wikilambda-lang-chip {\n\t\tposition: relative;\n\t\tz-index: 3;\n\t\tleft: @spacing-50;\n\t}\n}\n</style>\n","usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/resources/ext.wikilambda.edit/components/base/Tooltip.vue","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/resources/ext.wikilambda.edit/components/default-view-types/ZBoolean.vue","messages":[{"ruleId":"vue/require-explicit-emits","severity":1,"message":"The \"set-value\" event has been triggered but not declared on `emits` option.","line":64,"column":17,"nodeType":"Literal","messageId":"missing","endLine":64,"endColumn":28,"suggestions":[{"messageId":"addArrayEmitsOption","data":{"name":"set-value","emitsKind":"`emits` option"},"fix":{"range":[1006,1006],"text":"\nemits: ['set-value'],"},"desc":"Add the `emits` option with array syntax and define \"set-value\" event."},{"messageId":"addObjectEmitsOption","data":{"name":"set-value","emitsKind":"`emits` option"},"fix":{"range":[1006,1006],"text":"\nemits: {'set-value': null},"},"desc":"Add the `emits` option with object syntax and define \"set-value\" event."}]}],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"<template>\n\t<!--\n\t\tWikiLambda Vue component for boolean values\n\n\t\t@copyright 2020– Abstract Wikipedia team; see AUTHORS.txt\n\t\t@license MIT\n\t-->\n\t<div class=\"ext-wikilambda-boolean\">\n\t\t<template v-if=\"!edit\">\n\t\t\t<a\n\t\t\t\tclass=\"ext-wikilambda-edit-link\"\n\t\t\t\t:href=\"valueUrl\"\n\t\t\t>\n\t\t\t\t{{ valueLabel }}\n\t\t\t</a>\n\t\t</template>\n\t\t<template v-else>\n\t\t\t<cdx-radio\n\t\t\t\tv-for=\"radio in radioChoices\"\n\t\t\t\t:key=\"'radio-' + radio.value\"\n\t\t\t\tv-model=\"value\"\n\t\t\t\t:input-value=\"radio.value\"\n\t\t\t\t:name=\"'boolean-radios-' + rowId\"\n\t\t\t\t:inline=\"true\"\n\t\t\t>\n\t\t\t\t{{ radio.label }}\n\t\t\t</cdx-radio>\n\t\t</template>\n\t</div>\n</template>\n\n<script>\nvar CdxRadio = require( '@wikimedia/codex' ).CdxRadio,\n\tConstants = require( '../../Constants.js' ),\n\tmapGetters = require( 'vuex' ).mapGetters;\n\n// @vue/component\nmodule.exports = exports = {\n\tname: 'wl-z-boolean',\n\tcomponents: {\n\t\t'cdx-radio': CdxRadio\n\t},\n\tprops: {\n\t\trowId: {\n\t\t\ttype: Number,\n\t\t\trequired: false,\n\t\t\tdefault: 0\n\t\t},\n\t\tedit: {\n\t\t\ttype: Boolean,\n\t\t\trequired: true\n\t\t}\n\t},\n\tcomputed: $.extend( mapGetters( [\n\t\t'getLabel',\n\t\t'getZBooleanValue'\n\t] ),\n\t{\n\t\tvalue: {\n\t\t\tget: function () {\n\t\t\t\treturn this.getZBooleanValue( this.rowId );\n\t\t\t},\n\t\t\tset: function ( value ) {\n\t\t\t\tthis.$emit( 'set-value', {\n\t\t\t\t\tkeyPath: [\n\t\t\t\t\t\tConstants.Z_BOOLEAN_IDENTITY,\n\t\t\t\t\t\tConstants.Z_REFERENCE_ID\n\t\t\t\t\t],\n\t\t\t\t\tvalue\n\t\t\t\t} );\n\t\t\t}\n\t\t},\n\t\tvalueLabel: function () {\n\t\t\treturn this.getLabel( this.value );\n\t\t},\n\t\tvalueUrl: function () {\n\t\t\treturn new mw.Title( this.value ).getUrl();\n\t\t},\n\t\tradioChoices: function () {\n\t\t\treturn [\n\t\t\t\t{\n\t\t\t\t\tlabel: this.getLabel( Constants.Z_BOOLEAN_TRUE ),\n\t\t\t\t\tvalue: Constants.Z_BOOLEAN_TRUE\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tlabel: this.getLabel( Constants.Z_BOOLEAN_FALSE ),\n\t\t\t\t\tvalue: Constants.Z_BOOLEAN_FALSE\n\t\t\t\t}\n\t\t\t];\n\t\t}\n\t} )\n};\n</script>\n","usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/resources/ext.wikilambda.edit/components/default-view-types/ZCode.vue","messages":[{"ruleId":"vue/require-explicit-emits","severity":1,"message":"The \"set-value\" event has been triggered but not declared on `emits` option.","line":172,"column":17,"nodeType":"Literal","messageId":"missing","endLine":172,"endColumn":28,"suggestions":[{"messageId":"addArrayEmitsOption","data":{"name":"set-value","emitsKind":"`emits` option"},"fix":{"range":[1437,1437],"text":"\nemits: ['set-value'],"},"desc":"Add the `emits` option with array syntax and define \"set-value\" event."},{"messageId":"addObjectEmitsOption","data":{"name":"set-value","emitsKind":"`emits` option"},"fix":{"range":[1437,1437],"text":"\nemits: {'set-value': null},"},"desc":"Add the `emits` option with object syntax and define \"set-value\" event."}]},{"ruleId":"vue/require-explicit-emits","severity":1,"message":"The \"set-value\" event has been triggered but not declared on `emits` option.","line":196,"column":17,"nodeType":"Literal","messageId":"missing","endLine":196,"endColumn":28,"suggestions":[{"messageId":"addArrayEmitsOption","data":{"name":"set-value","emitsKind":"`emits` option"},"fix":{"range":[1437,1437],"text":"\nemits: ['set-value'],"},"desc":"Add the `emits` option with array syntax and define \"set-value\" event."},{"messageId":"addObjectEmitsOption","data":{"name":"set-value","emitsKind":"`emits` option"},"fix":{"range":[1437,1437],"text":"\nemits: {'set-value': null},"},"desc":"Add the `emits` option with object syntax and define \"set-value\" event."}]},{"ruleId":"vue/require-explicit-emits","severity":1,"message":"The \"set-value\" event has been triggered but not declared on `emits` option.","line":206,"column":18,"nodeType":"Literal","messageId":"missing","endLine":206,"endColumn":29,"suggestions":[{"messageId":"addArrayEmitsOption","data":{"name":"set-value","emitsKind":"`emits` option"},"fix":{"range":[1437,1437],"text":"\nemits: ['set-value'],"},"desc":"Add the `emits` option with array syntax and define \"set-value\" event."},{"messageId":"addObjectEmitsOption","data":{"name":"set-value","emitsKind":"`emits` option"},"fix":{"range":[1437,1437],"text":"\nemits: {'set-value': null},"},"desc":"Add the `emits` option with object syntax and define \"set-value\" event."}]}],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":3,"fixableErrorCount":0,"fixableWarningCount":0,"source":"<template>\n\t<!--\n\t\tWikiLambda Vue component for Z6/String objects.\n\n\t\t@copyright 2020– Abstract Wikipedia team; see AUTHORS.txt\n\t\t@license MIT\n\t-->\n\t<div class=\"ext-wikilambda-code\">\n\t\t<span v-if=\"!edit\">{{ selectedLanguage }}</span>\n\t\t<!-- eslint-disable vue/no-v-model-argument -->\n\t\t<!-- eslint-disable vue/no-unsupported-features -->\n\t\t<wl-select\n\t\t\tv-else\n\t\t\tv-model:selected=\"selectedLanguage\"\n\t\t\tclass=\"ext-wikilambda-zcode__language-selector\"\n\t\t\t:menu-items=\"programmingLangsList\"\n\t\t\t:default-label=\"$i18n( 'wikilambda-editor-label-select-programming-language-label' ).text()\"\n\t\t\t:fit-width=\"true\"\n\t\t\t@update:selected=\"selectLanguage\"\n\t\t>\n\t\t</wl-select>\n\t\t<code-editor\n\t\t\tclass=\"ext-wikilambda-zcode__code-editor\"\n\t\t\t:mode=\"selectedLanguage\"\n\t\t\t:read-only=\"!edit\"\n\t\t\t:value=\"editorValue\"\n\t\t\t@change=\"updateCode\"\n\t\t></code-editor>\n\t</div>\n</template>\n\n<script>\nvar Constants = require( '../../Constants.js' ),\n\tCodeEditor = require( '../base/CodeEditor.vue' ),\n\tSelect = require( '../base/Select.vue' ),\n\tmapGetters = require( 'vuex' ).mapGetters,\n\tmapActions = require( 'vuex' ).mapActions;\n\n// @vue/component\nmodule.exports = exports = {\n\tname: 'wl-z-code',\n\tcomponents: {\n\t\t'code-editor': CodeEditor,\n\t\t'wl-select': Select\n\t},\n\tprops: {\n\t\trowId: {\n\t\t\ttype: Number,\n\t\t\trequired: false,\n\t\t\tdefault: 0\n\t\t},\n\t\tparentId: {\n\t\t\ttype: Number,\n\t\t\trequired: false,\n\t\t\tdefault: 0\n\t\t},\n\t\tedit: {\n\t\t\ttype: Boolean,\n\t\t\trequired: true\n\t\t}\n\t},\n\tdata: function () {\n\t\treturn {\n\t\t\teditorValue: '',\n\t\t\tallowSetEditorValue: true\n\t\t};\n\t},\n\tcomputed: $.extend(\n\t\tmapGetters( [\n\t\t\t'getAllProgrammingLangs',\n\t\t\t'getErrors',\n\t\t\t'getZCodeLanguage',\n\t\t\t'getZCode',\n\t\t\t'getZStringTerminalValue',\n\t\t\t'getZCodeFunction',\n\t\t\t'getZarguments'\n\t\t] ),\n\t\t{\n\t\t\tcodeItem: function () {\n\t\t\t\treturn this.getZCode( this.rowId );\n\t\t\t},\n\t\t\tcodeValue: function () {\n\t\t\t\treturn this.getZStringTerminalValue( this.codeItem.id );\n\t\t\t},\n\t\t\tzCodeProgrammingLanguage: function () {\n\t\t\t\treturn this.getZCodeLanguage( this.rowId );\n\t\t\t},\n\t\t\tzCodeProgrammingValue: function () {\n\t\t\t\treturn this.getZStringTerminalValue( this.zCodeProgrammingLanguage.id );\n\t\t\t},\n\t\t\tzFunction: function () {\n\t\t\t\treturn this.getZCodeFunction( this.parentId );\n\t\t\t},\n\t\t\tselectedFunctionArguments: function () {\n\t\t\t\treturn Object.keys( this.getZarguments ).map( function ( arg ) {\n\t\t\t\t\treturn this.getZarguments[ arg ];\n\t\t\t\t}.bind( this ) );\n\t\t\t},\n\t\t\tselectedLanguage: {\n\t\t\t\tget: function () {\n\t\t\t\t\treturn this.zCodeProgrammingValue || '';\n\t\t\t\t},\n\t\t\t\tset: function ( val ) {\n\t\t\t\t\tthis.selectLanguage( val );\n\t\t\t\t}\n\t\t\t},\n\t\t\tprogrammingLangsList: function () {\n\t\t\t\tvar programmingLangs = [];\n\t\t\t\tif ( this.getAllProgrammingLangs.length > 0 ) {\n\t\t\t\t\tfor ( var lang in this.getAllProgrammingLangs ) {\n\t\t\t\t\t\tprogrammingLangs.push(\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tlabel: this.getAllProgrammingLangs[\n\t\t\t\t\t\t\t\t\tlang\n\t\t\t\t\t\t\t\t][\n\t\t\t\t\t\t\t\t\tConstants.Z_PERSISTENTOBJECT_VALUE\n\t\t\t\t\t\t\t\t][\n\t\t\t\t\t\t\t\t\tConstants.Z_PROGRAMMING_LANGUAGE_CODE\n\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\tvalue: this.getAllProgrammingLangs[\n\t\t\t\t\t\t\t\t\tlang\n\t\t\t\t\t\t\t\t][\n\t\t\t\t\t\t\t\t\tConstants.Z_PERSISTENTOBJECT_VALUE\n\t\t\t\t\t\t\t\t][\n\t\t\t\t\t\t\t\t\tConstants.Z_PROGRAMMING_LANGUAGE_CODE\n\t\t\t\t\t\t\t\t]\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn programmingLangs;\n\t\t\t},\n\t\t\terrorState: function () {\n\t\t\t\t// the error is not guaranteed to exist\n\t\t\t\tif ( this.getErrors[ this.zobjectId ] ) {\n\t\t\t\t\treturn this.getErrors[ this.zobjectId ].state;\n\t\t\t\t}\n\n\t\t\t\treturn false;\n\t\t\t},\n\t\t\terrorMessage: function () {\n\t\t\t\tif ( this.getErrors[ this.zobjectId ] ) {\n\t\t\t\t\tconst messageStr = this.getErrors[ this.zobjectId ].message;\n\t\t\t\t\treturn this.$i18n( messageStr ).text();\n\t\t\t\t}\n\t\t\t\treturn null;\n\t\t\t},\n\t\t\terrorType: function () {\n\t\t\t\tif ( this.getErrors[ this.zobjectId ] ) {\n\t\t\t\t\treturn this.getErrors[ this.zobjectId ].type;\n\t\t\t\t}\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}\n\t),\n\tmethods: $.extend(\n\t\tmapActions( [\n\t\t\t'fetchAllZProgrammingLanguages',\n\t\t\t'setError'\n\t\t] ),\n\t\t{\n\t\t\t/**\n\t\t\t * Sets the value Z_PROGRAMMING_LANGUAGE_CODE.\n\t\t\t *\n\t\t\t * @param {string} value\n\t\t\t */\n\t\t\tselectLanguage: function ( value ) {\n\t\t\t\tthis.allowSetEditorValue = true;\n\n\t\t\t\t// update selected language\n\t\t\t\tthis.$emit( 'set-value', {\n\t\t\t\t\tkeyPath: [\n\t\t\t\t\t\tConstants.Z_CODE_LANGUAGE,\n\t\t\t\t\t\tConstants.Z_PROGRAMMING_LANGUAGE_CODE\n\t\t\t\t\t],\n\t\t\t\t\tvalue\n\t\t\t\t} );\n\n\t\t\t\t// update boiler plate code\n\t\t\t\tlet updatedBoilerPlateCode = '';\n\t\t\t\tswitch ( value ) {\n\t\t\t\t\tcase 'javascript':\n\t\t\t\t\t\tupdatedBoilerPlateCode = 'function ' + this.zFunction + '( ' + this.selectedFunctionArguments + ' ) {\\n\\n}';\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'python':\n\t\t\t\t\t\tupdatedBoilerPlateCode = 'def ' + this.zFunction + '(' + this.selectedFunctionArguments + '):\\n\\t';\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'lua':\n\t\t\t\t\t\tupdatedBoilerPlateCode = 'function ' + this.zFunction + '(' + this.selectedFunctionArguments + ')\\n\\t\\nend';\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tthis.$emit( 'set-value', {\n\t\t\t\t\tkeyPath: [ Constants.Z_CODE_CODE ],\n\t\t\t\t\tvalue: updatedBoilerPlateCode\n\t\t\t\t} );\n\t\t\t},\n\t\t\tupdateCode: function ( code ) {\n\t\t\t\t// there is an edge case where acejs will trigger an empty change that we process as an event object\n\t\t\t\t// we don't want to update our object with that bad data\n\t\t\t\t// TODO(T324605): this deserves a deeper investigation\n\t\t\t\tif ( typeof code !== 'object' ) {\n\t\t\t\t\tthis.$emit( 'set-value', {\n\t\t\t\t\t\tkeyPath: [ Constants.Z_CODE_CODE ],\n\t\t\t\t\t\tvalue: code\n\t\t\t\t\t} );\n\n\t\t\t\t\tthis.setError( {\n\t\t\t\t\t\tinternalId: this.zobjectId,\n\t\t\t\t\t\terrorState: false\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t}\n\t\t} ),\n\twatch: {\n\t\tcodeValue: {\n\t\t\timmediate: true,\n\t\t\thandler: function () {\n\t\t\t\t// Check allowSetEditorValue to ensure we only set value in the editor when its current value should be\n\t\t\t\t// overriden (e.g. when the editor is first loaded, or when the language changes). Ensuring this\n\t\t\t\t// prevents a bug that moves the cursor to the end of the editor on every keypress.\n\t\t\t\tif ( this.allowSetEditorValue ) {\n\t\t\t\t\tthis.editorValue = this.codeValue || '';\n\t\t\t\t\tthis.allowSetEditorValue = false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t},\n\tmounted: function () {\n\t\tif ( this.getAllProgrammingLangs.length <= 0 ) {\n\t\t\tthis.fetchAllZProgrammingLanguages();\n\t\t}\n\t}\n};\n</script>\n\n<style lang=\"less\">\n@import '../../ext.wikilambda.edit.variables.less';\n\n.ext-wikilambda-zcode {\n\tdisplay: block;\n\tpadding: 1em;\n\toutline: 1px dashed #888;\n\tmax-width: 600px;\n\n\t&__language-selector {\n\t\twidth: 200px;\n\t\tmargin-bottom: @spacing-50;\n\t}\n}\n\n@media only screen and ( min-width: 600px ) {\n\t.ext-wikilambda-zcode {\n\t\twidth: 600px;\n\t}\n}\n</style>\n","usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/resources/ext.wikilambda.edit/components/default-view-types/ZMonolingualString.vue","messages":[{"ruleId":"vue/require-explicit-emits","severity":1,"message":"The \"set-value\" event has been triggered but not declared on `emits` option.","line":83,"column":18,"nodeType":"Literal","messageId":"missing","endLine":83,"endColumn":29,"suggestions":[{"messageId":"addArrayEmitsOption","data":{"name":"set-value","emitsKind":"`emits` option"},"fix":{"range":[1018,1018],"text":"\nemits: ['set-value'],"},"desc":"Add the `emits` option with array syntax and define \"set-value\" event."},{"messageId":"addObjectEmitsOption","data":{"name":"set-value","emitsKind":"`emits` option"},"fix":{"range":[1018,1018],"text":"\nemits: {'set-value': null},"},"desc":"Add the `emits` option with object syntax and define \"set-value\" event."}]}],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"<template>\n\t<!--\n\t\tWikiLambda Vue component for Z11/Monolingual String objects.\n\n\t\t@copyright 2020– Abstract Wikipedia team; see AUTHORS.txt\n\t\t@license MIT\n\t-->\n\t<div class=\"ext-wikilambda-monolingual-string\">\n\t\t<div v-if=\"!edit\">\n\t\t\t<p><span class=\"ext-wikilambda-lang-chip\">{{ langIso }}</span> {{ text }}</p>\n\t\t</div>\n\t\t<div\n\t\t\tv-else\n\t\t\tclass=\"ext-wikilambda-monolingual-string__edit-mode\">\n\t\t\t<wl-text-input\n\t\t\t\tv-model=\"text\"\n\t\t\t\t:fit-width=\"true\"\n\t\t\t\t:chip=\"langIso\"\n\t\t\t\tplaceholder=\"Enter text\"\n\t\t\t\tclass=\"ext-wikilambda-monolingual-string__input\">\n\t\t\t</wl-text-input>\n\t\t</div>\n\t</div>\n</template>\n\n<script>\nvar TextInput = require( '../base/TextInput.vue' ),\n\tConstants = require( '../../Constants.js' ),\n\tmapGetters = require( 'vuex' ).mapGetters;\n\n// @vue/component\nmodule.exports = exports = {\n\tname: 'wl-z-monolingual-string',\n\tcomponents: {\n\t\t'wl-text-input': TextInput\n\t},\n\tprops: {\n\t\trowId: {\n\t\t\ttype: Number,\n\t\t\trequired: false,\n\t\t\tdefault: 0\n\t\t},\n\t\tedit: {\n\t\t\ttype: Boolean,\n\t\t\trequired: true\n\t\t}\n\t},\n\tcomputed: $.extend(\n\t\tmapGetters( [\n\t\t\t'getLabel',\n\t\t\t'getLanguageIsoCodeOfZLang',\n\t\t\t'getZMonolingualTextValue',\n\t\t\t'getZMonolingualLangValue'\n\t\t] ),\n\t\t{\n\t\t\t/**\n\t\t\t * Computed value:\n\t\t\t * 1. Getter gets the value from the state.\n\t\t\t * 2. Setter informs the ZObjectKeyValue of the change.\n\t\t\t * Only the ZObjectKeyValue responds to the 'setValue' emitted event\n\t\t\t * so only the ZObjectKeyValue is doing operations to transform\n\t\t\t * the state data. This is so that we don't duplicate state mutation\n\t\t\t * logic all over the components, and builtin components are just\n\t\t\t * visual representations and have zero logic.\n\t\t\t */\n\t\t\ttext: {\n\t\t\t\t/**\n\t\t\t\t * Returns the terminal value of the string represented\n\t\t\t\t * in this component.\n\t\t\t\t *\n\t\t\t\t * @return {string}\n\t\t\t\t */\n\t\t\t\tget: function () {\n\t\t\t\t\treturn this.getZMonolingualTextValue( this.rowId );\n\t\t\t\t},\n\t\t\t\t/**\n\t\t\t\t * Emits a setValue event with the new value for the string\n\t\t\t\t * and the key path information depending on the object key.\n\t\t\t\t *\n\t\t\t\t * @param {string} value\n\t\t\t\t */\n\t\t\t\tset: function ( value ) {\n\t\t\t\t\tthis.$emit( 'set-value', {\n\t\t\t\t\t\tkeyPath: [\n\t\t\t\t\t\t\tConstants.Z_MONOLINGUALSTRING_VALUE,\n\t\t\t\t\t\t\tConstants.Z_STRING_VALUE\n\t\t\t\t\t\t],\n\t\t\t\t\t\tvalue\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * Returns the language Zid of the Monolingual string\n\t\t\t * object represented in this component, or the language code\n\t\t\t * if lang is a literal.\n\t\t\t *\n\t\t\t * @return {string}\n\t\t\t */\n\t\t\tlang: function () {\n\t\t\t\treturn this.getZMonolingualLangValue( this.rowId );\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * Returns the object { label, lang, zid } with the linguistic\n\t\t\t * information of the language zid or undefined if the zid\n\t\t\t * doesn't exist or wasn't found.\n\t\t\t *\n\t\t\t * TODO (T329103): This is currently not used, but are we showing the\n\t\t\t * language name when we hover over the language ISO code chip? If so,\n\t\t\t * this is the string that should be shown\n\t\t\t *\n\t\t\t * @return {string}\n\t\t\t */\n\t\t\tlangLabel: function () {\n\t\t\t\treturn this.getLabel( this.lang );\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * Return the text that identifies the language in which\n\t\t\t * this Monolingual String is written.\n\t\t\t *\n\t\t\t * @return {string}\n\t\t\t */\n\t\t\tlangIso: function () {\n\t\t\t\treturn this.getLanguageIsoCodeOfZLang( this.lang );\n\t\t\t}\n\t\t}\n\t)\n};\n\n</script>\n\n<style lang=\"less\">\n@import '../../ext.wikilambda.edit.less';\n\n.ext-wikilambda-monolingual-string {\n\tp {\n\t\tmargin: 0;\n\t\tcolor: @color-base;\n\t\tdisplay: flex;\n\t\tflex-direction: row;\n\t\talign-items: center;\n\n\t\t.ext-wikilambda-lang-chip {\n\t\t\tmargin-right: @spacing-50;\n\t\t}\n\t}\n\n\t&__edit-mode {\n\t\tposition: relative;\n\t\theight: @size-200;\n\t}\n}\n\n</style>\n","usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/resources/ext.wikilambda.edit/components/default-view-types/ZObjectKeyValue.vue","messages":[{"ruleId":"jsdoc/no-undefined-types","severity":1,"message":"The type 'LabelData' is undefined.","line":190,"column":null,"nodeType":"Block","endLine":190,"endColumn":null},{"ruleId":"vue/require-explicit-emits","severity":1,"message":"The \"set-type\" event has been triggered but not declared on `emits` option.","line":529,"column":18,"nodeType":"Literal","messageId":"missing","endLine":529,"endColumn":28,"suggestions":[{"messageId":"addArrayEmitsOption","data":{"name":"set-type","emitsKind":"`emits` option"},"fix":{"range":[2953,2953],"text":"\nemits: ['set-type'],"},"desc":"Add the `emits` option with array syntax and define \"set-type\" event."},{"messageId":"addObjectEmitsOption","data":{"name":"set-type","emitsKind":"`emits` option"},"fix":{"range":[2953,2953],"text":"\nemits: {'set-type': null},"},"desc":"Add the `emits` option with object syntax and define \"set-type\" event."}]},{"ruleId":"vue/require-explicit-emits","severity":1,"message":"The \"set-value\" event has been triggered but not declared on `emits` option.","line":536,"column":18,"nodeType":"Literal","messageId":"missing","endLine":536,"endColumn":29,"suggestions":[{"messageId":"addArrayEmitsOption","data":{"name":"set-value","emitsKind":"`emits` option"},"fix":{"range":[2953,2953],"text":"\nemits: ['set-value'],"},"desc":"Add the `emits` option with array syntax and define \"set-value\" event."},{"messageId":"addObjectEmitsOption","data":{"name":"set-value","emitsKind":"`emits` option"},"fix":{"range":[2953,2953],"text":"\nemits: {'set-value': null},"},"desc":"Add the `emits` option with object syntax and define \"set-value\" event."}]}],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":3,"fixableErrorCount":0,"fixableWarningCount":0,"source":"<template>\n\t<!--\n\t\tWikiLambda Vue component for rendering a ZObjectKeyValue.\n\t\tThis component handles all the complex logic behind figuring out\n\t\twhat key-values can be editted, what are their bound types (if any)\n\t\tand what kind of view will be rendered, expanded or simple.\n\n\t\t@copyright 2020– Abstract Wikipedia team; see AUTHORS.txt\n\t\t@license MIT\n\t-->\n\t<div :class=\"rootClass\">\n\t\t<!-- Key -->\n\t\t<p\n\t\t\tv-if=\"renderKeyBlock\"\n\t\t\tclass=\"ext-wikilambda-key-block\"\n\t\t\t:class=\"[ expandedModeClass, nestingDepthClass, editModeClass ]\"\n\t\t>\n\t\t\t<wl-expanded-toggle\n\t\t\t\tv-if=\"hasExpandedMode\"\n\t\t\t\t:expanded=\"expanded\"\n\t\t\t\t@toggle=\"toggleExpanded\"\n\t\t\t></wl-expanded-toggle>\n\t\t\t<wl-localized-label\n\t\t\t\tv-if=\"keyLabel\"\n\t\t\t\t:class=\"expandedModeLabelClass\"\n\t\t\t\t:label-data=\"keyLabel\"\n\t\t\t></wl-localized-label>\n\t\t\t<!-- Optional context menu for displaying key/value actions -->\n\t\t\t<wl-context-menu\n\t\t\t\tv-if=\"showContextMenu\"\n\t\t\t\tclass=\"ext-wikilambda-key-block__context-menu\"\n\t\t\t\t:menu-items=\"contextMenuItems\"\n\t\t\t\t@context-action=\"contextMenuAction\"\n\t\t\t></wl-context-menu>\n\t\t</p>\n\t\t<!-- Value -->\n\t\t<p\n\t\t\tclass=\"ext-wikilambda-value-block\"\n\t\t\t:class=\"paddedClass\"\n\t\t>\n\t\t\t<component\n\t\t\t\t:is=\"zobjectComponent\"\n\t\t\t\t:class=\"shiftLeft\"\n\t\t\t\t:edit=\"edit\"\n\t\t\t\t:disabled=\"disableEdit\"\n\t\t\t\t:expanded=\"expanded\"\n\t\t\t\t:depth=\"depth\"\n\t\t\t\t:row-id=\"rowId\"\n\t\t\t\t:expected-type=\"expectedType\"\n\t\t\t\t:parent-id=\"parentRowId\"\n\t\t\t\t:list-type=\"listType\"\n\t\t\t\t@set-value=\"setValue\"\n\t\t\t\t@set-type=\"setType\"\n\t\t\t></component>\n\t\t</p>\n\t</div>\n</template>\n\n<script>\nvar\n\tConstants = require( '../../Constants.js' ),\n\tExpandedToggle = require( '../base/ExpandedToggle.vue' ),\n\tContextMenu = require( '../base/ContextMenu.vue' ),\n\tLocalizedLabel = require( '../base/LocalizedLabel.vue' ),\n\tZMonolingualString = require( './ZMonolingualString.vue' ),\n\tZObjectKeyValueSet = require( './ZObjectKeyValueSet.vue' ),\n\tZObjectType = require( './ZObjectType.vue' ),\n\tZString = require( './ZString.vue' ),\n\tZCode = require( './ZCode.vue' ),\n\tZReference = require( './ZReference.vue' ),\n\tZBoolean = require( './ZBoolean.vue' ),\n\tZTypedList = require( './ZTypedList.vue' ),\n\ttypeUtils = require( '../../mixins/typeUtils.js' ),\n\tmapActions = require( 'vuex' ).mapActions,\n\tmapGetters = require( 'vuex' ).mapGetters;\n\n// @vue/component\nmodule.exports = exports = {\n\tname: 'wl-z-object-key-value',\n\tcomponents: {\n\t\t'wl-expanded-toggle': ExpandedToggle,\n\t\t'wl-localized-label': LocalizedLabel,\n\t\t'wl-context-menu': ContextMenu,\n\t\t'wl-z-code': ZCode,\n\t\t'wl-z-monolingual-string': ZMonolingualString,\n\t\t'wl-z-object-key-value-set': ZObjectKeyValueSet,\n\t\t'wl-z-object-type': ZObjectType,\n\t\t'wl-z-string': ZString,\n\t\t'wl-z-reference': ZReference,\n\t\t'wl-z-boolean': ZBoolean,\n\t\t'wl-z-typed-list': ZTypedList\n\t},\n\tmixins: [ typeUtils ],\n\tprops: {\n\t\trowId: {\n\t\t\ttype: Number,\n\t\t\trequired: false,\n\t\t\tdefault: 0\n\t\t},\n\t\tedit: {\n\t\t\ttype: Boolean,\n\t\t\trequired: true\n\t\t},\n\t\tlistType: {\n\t\t\ttype: String,\n\t\t\tdefault: null\n\t\t}\n\t},\n\tdata: function () {\n\t\treturn {\n\t\t\t/**\n\t\t\t * Expanded is a property of the key-value and it\n\t\t\t * passes down only into its direct child. Every\n\t\t\t * ZObjectKeyValue component sets its data property\n\t\t\t * 'expanded' independently.\n\t\t\t */\n\t\t\texpanded: false\n\t\t};\n\t},\n\tcomputed: $.extend(\n\t\tmapGetters( [\n\t\t\t'getUserZlangZID',\n\t\t\t'getLabelData',\n\t\t\t'getExpectedTypeOfKey',\n\t\t\t'getDepthByRowId',\n\t\t\t'getParentRowId',\n\t\t\t'getZObjectKeyByRowId',\n\t\t\t'getZObjectValueByRowId',\n\t\t\t'getZObjectTypeByRowId',\n\t\t\t'getChildrenByParentRowId',\n\t\t\t'getZReferenceTerminalValue'\n\t\t] ),\n\t\t{\n\t\t\t/**\n\t\t\t * Returns whether we want to disable the edit mode for a given key-value.\n\t\t\t * Note that this is not the same thing as bounding the type, or disabling\n\t\t\t * expanded mode. This does not coerce the component to render in view mode,\n\t\t\t * just disables the selectability of the component.\n\t\t\t * FIXME: Validate the cases for doing this\n\t\t\t * FIXME: Do we have to show \"Type: Persistent object\" or should we remove it?\n\t\t\t *\n\t\t\t * @return {boolean}\n\t\t\t */\n\t\t\tdisableEdit: function () {\n\t\t\t\t// the root ZObject type (it will always be a Literal Persistent Object).\n\t\t\t\treturn ( this.key === Constants.Z_OBJECT_TYPE ) &&\n\t\t\t\t\t( this.parentExpectedType === Constants.Z_PERSISTENTOBJECT );\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * Returns the key of the key-value pair of this component.\n\t\t\t *\n\t\t\t * @return {string}\n\t\t\t */\n\t\t\tkey: function () {\n\t\t\t\treturn this.getZObjectKeyByRowId( this.rowId );\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * Returns the rowId of the parent of this key-value.\n\t\t\t *\n\t\t\t * @return {string}\n\t\t\t */\n\t\t\tparentRowId: function () {\n\t\t\t\treturn this.getParentRowId( this.rowId );\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * Returns the key of the parent of this key-value.\n\t\t\t *\n\t\t\t * @return {string}\n\t\t\t */\n\t\t\tparentKey: function () {\n\t\t\t\treturn this.getZObjectKeyByRowId( this.parentRowId );\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * Returns the value of the ZObject key-value pair represented\n\t\t\t * in this component.\n\t\t\t *\n\t\t\t * @return {string}\n\t\t\t */\n\t\t\tvalue: function () {\n\t\t\t\treturn this.getZObjectValueByRowId( this.rowId );\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * Returns the label data object of the given key.\n\t\t\t *\n\t\t\t * @return {LabelData}\n\t\t\t */\n\t\t\tkeyLabel: function () {\n\t\t\t\t// since the FE represents typed lists in canonical form, we need to hardcode typed list keys\n\t\t\t\tif ( this.isKeyTypedListItem( this.key ) &&\n\t\t\t\t\tthis.expanded &&\n\t\t\t\t\tthis.hasExpandedMode\n\t\t\t\t) {\n\t\t\t\t\treturn {\n\t\t\t\t\t\tzid: `${Constants.Z_TYPED_LIST}K${this.key}`,\n\t\t\t\t\t\tlabel: this.$i18n( 'wikilambda-list-item-label' ).text(),\n\t\t\t\t\t\tlang: this.getUserZlangZID\n\t\t\t\t\t};\n\t\t\t\t}\n\n\t\t\t\treturn this.getLabelData( this.key );\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * Returns the depth of this key value to dynamically calculate\n\t\t\t * the style of the nesting line. It returns 0 for the first level,\n\t\t\t * and the following levels looping from [1..n], where n is the\n\t\t\t * maximum number of levels (colors) set in our Constants.\n\t\t\t *\n\t\t\t * @return {number}\n\t\t\t */\n\t\t\tdepth: function () {\n\t\t\t\tconst depth = this.getDepthByRowId( this.rowId );\n\t\t\t\treturn ( ( depth - 1 ) % Constants.COLOR_NESTING_LEVELS ) + 1;\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * Returns the css class that identifies the nesting level\n\t\t\t *\n\t\t\t * @return {string}\n\t\t\t */\n\t\t\tnestingDepthClass: function () {\n\t\t\t\treturn `ext-wikilambda-key-level-${this.depth}`;\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * Returns the css class that identifies the expanded mode\n\t\t\t *\n\t\t\t * @return {string}\n\t\t\t */\n\t\t\texpandedModeClass: function () {\n\t\t\t\treturn ( this.expanded && this.hasExpandedMode ) ? 'ext-wikilambda-expanded-on' : 'ext-wikilambda-expanded-off';\n\t\t\t},\n\n\t\t\texpandedModeLabelClass: function () {\n\t\t\t\treturn ( this.hasExpandedMode ) ? 'ext-wikilambda-key-block__label' : '';\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * Returns the css class that identifies the edit or view mode\n\t\t\t *\n\t\t\t * @return {string}\n\t\t\t */\n\t\t\teditModeClass: function () {\n\t\t\t\treturn this.edit ? 'ext-wikilambda-edit-on' : 'ext-wikilambda-edit-off';\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * Finds the correct root class depending on if the item is part of a list or not\n\t\t\t *\n\t\t\t * @return {string}\n\t\t\t */\n\t\t\trootClass: function () {\n\t\t\t\tvar classList = [ 'ext-wikilambda-key-value' ];\n\t\t\t\t// this class is only required for non-terminal items in collapsed mode\n\t\t\t\tif ( this.listType && !this.expanded && this.hasExpandedMode ) {\n\t\t\t\t\tclassList.push( 'ext-wikilambda-key-value-inherit' );\n\t\t\t\t}\n\t\t\t\t// string list items require different treatment because\n\t\t\t\t// they have a <li> bullet point (but only in view mode)\n\t\t\t\tif ( this.listType && this.type === Constants.Z_STRING && !this.edit ) {\n\t\t\t\t\tclassList.push( 'ext-wikilambda-key-value-inline-table' );\n\t\t\t\t}\n\n\t\t\t\treturn classList;\n\t\t\t},\n\n\t\t\tpaddedClass: function () {\n\t\t\t\tvar classList = [];\n\t\t\t\t// typed lists will manage padding independently\n\n\t\t\t\tif ( this.type === Constants.Z_TYPED_LIST ) {\n\t\t\t\t\treturn classList;\n\t\t\t\t}\n\t\t\t\t// but do not push items within the list\n\t\t\t\tif ( this.listType ) {\n\t\t\t\t\tclassList.push( 'ext-wikilambda-value-block__list-item' );\n\t\t\t\t} else if ( this.hasExpandedMode && !this.expanded ) {\n\t\t\t\t\tclassList.push( 'ext-wikilambda-value-block__padded' );\n\t\t\t\t}\n\n\t\t\t\treturn classList;\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * Returns the type of the value of the the ZObject represented\n\t\t\t * in this component. When it's not set, it's undefined.\n\t\t\t *\n\t\t\t * @return {string}\n\t\t\t */\n\t\t\ttype: function () {\n\t\t\t\treturn this.getZObjectTypeByRowId( this.rowId );\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * Returns the expected type of the parent key\n\t\t\t *\n\t\t\t * @return {string}\n\t\t\t */\n\t\t\tparentExpectedType: function () {\n\t\t\t\treturn this.getExpectedTypeOfKey( this.parentKey );\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * Returns the expected (or bound) type for the value of\n\t\t\t * the key-value pair represented in this component.\n\t\t\t *\n\t\t\t * @return {string}\n\t\t\t */\n\t\t\texpectedType: function () {\n\t\t\t\t// list types and list items don't have real keys - their keys are just list indices\n\t\t\t\t// if the item is list item, the type of each item must be whatever the type of the list is\n\t\t\t\tif ( this.isKeyTypedListItem( this.parentKey ) && this.listType !== Constants.Z_OBJECT ) {\n\t\t\t\t\treturn this.listType;\n\t\t\t\t}\n\t\t\t\t// if the item is the type of the list, it is limited by the type the parent\n\t\t\t\tif ( this.isKeyTypedListType( this.parentKey ) ) {\n\t\t\t\t\treturn this.typedListStringToType( this.parentExpectedType );\n\t\t\t\t}\n\n\t\t\t\t// FIXME: expected type changes if this is a resolver type\n\t\t\t\tif ( this.key === Constants.Z_REFERENCE_ID ) {\n\t\t\t\t\treturn this.parentExpectedType;\n\t\t\t\t}\n\t\t\t\tif ( this.key === Constants.Z_OBJECT_TYPE ) {\n\t\t\t\t\treturn this.parentExpectedType;\n\t\t\t\t}\n\n\t\t\t\treturn this.getExpectedTypeOfKey( this.key );\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * Returns whether this key-value can be expanded into an expanded mode.\n\t\t\t * This contains the logic for detecting terminal key-values and\n\t\t\t * not enter infinite UX recursion.\n\t\t\t *\n\t\t\t * @return {boolean}\n\t\t\t */\n\t\t\thasExpandedMode: function () {\n\t\t\t\tif ( this.edit ) {\n\t\t\t\t\t// TERMINAL rules for edit:\n\t\t\t\t\t// If the key is terminal Z6K1 or Z9K1, no expanded mode\n\t\t\t\t\tif (\n\t\t\t\t\t\t( this.key === Constants.Z_STRING_VALUE ) ||\n\t\t\t\t\t\t( this.key === Constants.Z_REFERENCE_ID ) ||\n\t\t\t\t\t\t( this.key === Constants.Z_OBJECT_TYPE ) // this will be true for list items in list of type Z1\n\t\t\t\t\t) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// TERMINAL rules for view:\n\t\t\t\t\t// If the type is string or reference, no expanded mode\n\t\t\t\t\tif (\n\t\t\t\t\t\t( this.type === Constants.Z_STRING ) ||\n\t\t\t\t\t\t( this.type === Constants.Z_REFERENCE )\n\t\t\t\t\t) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// TERMINAL rules for both view and edit:\n\t\t\t\t// If the key is Z1K1:\n\t\t\t\tif ( this.key === Constants.Z_OBJECT_TYPE ) {\n\t\t\t\t\t// If the parent type is bound, no have expanded mode\n\t\t\t\t\tif ( this.parentExpectedType !== Constants.Z_OBJECT ) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\n\t\t\t\t\t// If the type is any but literal (resolvers like reference,\n\t\t\t\t\t// function call or argument reference) then no expanded mode\n\t\t\t\t\tif ( Constants.RESOLVER_TYPES.indexOf( this.value ) > -1 ) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// If the type doesn't have any builting component, it must\n\t\t\t\t// be always shown in its expanded-mode rerepsentation--the set\n\t\t\t\t// of key values, so we won't show the expanded mode toggle\n\t\t\t\tif ( Object.keys( Constants.BUILTIN_COMPONENTS ).indexOf( this.type ) < 0 ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * Selects the component to render in place of the dynamic component.\n\t\t\t * There are different strategies to choose the component. The first\n\t\t\t * one, by key. If the key of this key-value is Z1K1, we will render\n\t\t\t * the special ZObjectType component, which will handle type and mode\n\t\t\t * selection. Else, the second strategy is by the type of the value.\n\t\t\t * All custom built components should be listed here, in order from\n\t\t\t * more to less complex.\n\t\t\t *\n\t\t\t * @return {string}\n\t\t\t */\n\t\t\tzobjectComponent: function () {\n\t\t\t\t// BY KEY\n\t\t\t\t// Z1K1 has a special component to handle ZObjectType and mode:\n\t\t\t\tif ( ( this.key === Constants.Z_OBJECT_TYPE ) && !this.expanded ) {\n\t\t\t\t\treturn 'wl-z-object-type';\n\t\t\t\t}\n\n\t\t\t\t// BY TYPE\n\t\t\t\t// The typed list is a component that should not be shown\n\t\t\t\t// with ZObjectKeyValueSet, so it lacks expanded mode. The\n\t\t\t\t// ZTypedList component will then be in charge of handling\n\t\t\t\t// the type, binding it if necessary (E.g. if the parentType is\n\t\t\t\t// bound) or allowing for its edition.\n\t\t\t\tif ( this.type === Constants.Z_TYPED_LIST ) {\n\t\t\t\t\treturn 'wl-z-typed-list';\n\t\t\t\t}\n\n\t\t\t\tif ( ( this.type === Constants.Z_MONOLINGUALSTRING ) && !this.expanded ) {\n\t\t\t\t\treturn 'wl-z-monolingual-string';\n\t\t\t\t}\n\t\t\t\tif ( ( this.type === Constants.Z_REFERENCE ) && !this.expanded ) {\n\t\t\t\t\treturn 'wl-z-reference';\n\t\t\t\t}\n\t\t\t\tif ( ( this.type === Constants.Z_STRING ) && !this.expanded ) {\n\t\t\t\t\treturn 'wl-z-string';\n\t\t\t\t}\n\n\t\t\t\tif ( ( this.type === Constants.Z_BOOLEAN ) && !this.expanded ) {\n\t\t\t\t\treturn 'wl-z-boolean';\n\t\t\t\t}\n\t\t\t\tif ( ( this.type === Constants.Z_CODE ) && !this.expanded ) {\n\t\t\t\t\treturn 'wl-z-code';\n\t\t\t\t}\n\n\t\t\t\t// If there's no builtin component, always show expanded mode\n\t\t\t\treturn 'wl-z-object-key-value-set';\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * Logic for when to render the context menu. It can be used to display\n\t\t\t * actions for a key/value. Currently the only use cases involve typed lists.\n\t\t\t * TODO (T330189): create a case for adding an item to a typed list\n\t\t\t *\n\t\t\t * @return {boolean}\n\t\t\t */\n\t\t\tshowContextMenu: function () {\n\t\t\t\t// only allow actions in edit mode\n\t\t\t\tif ( !this.edit ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\t// CASE: delete items from a typed list\n\t\t\t\t// it is only rendered for a ZTypedListItem that IS expanded\n\t\t\t\tif ( this.isKeyTypedListItem( this.key ) && this.expanded ) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * The list of action items for the context menu to display.\n\t\t\t *\n\t\t\t * @return {Array}\n\t\t\t */\n\t\t\tcontextMenuItems: function () {\n\t\t\t\t// case 1: add items to a typed list\n\t\t\t\tif ( this.type === Constants.Z_TYPED_LIST && !this.expanded ) {\n\t\t\t\t\treturn [ {\n\t\t\t\t\t\tlabel: this.$i18n( 'wikilambda-add-list-item' ).text(),\n\t\t\t\t\t\tvalue: Constants.contextMenuItems.ADD_LIST_ITEM\n\t\t\t\t\t} ];\n\t\t\t\t}\n\n\t\t\t\t// case 2: delete items from a typed list\n\t\t\t\tif ( this.isKeyTypedListItem( this.key ) && this.expanded ) {\n\t\t\t\t\treturn [ {\n\t\t\t\t\t\tlabel: this.$i18n( 'wikilambda-delete-list-item' ).text(),\n\t\t\t\t\t\tvalue: Constants.contextMenuItems.DELETE_LIST_ITEM\n\t\t\t\t\t} ];\n\t\t\t\t}\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * Do not render the key block if none of the conditions exist.\n\t\t\t * The <p> tag has default padding that we do not want if no content is rendered.\n\t\t\t *\n\t\t\t * @return {boolean}\n\t\t\t */\n\t\t\trenderKeyBlock: function () {\n\t\t\t\treturn this.hasExpandedMode || this.keyLabel || this.showContextMenu;\n\t\t\t}\n\t\t} ),\n\tmethods: $.extend(\n\t\tmapActions( [ 'setValueByRowIdAndPath', 'changeType', 'removeItemFromTypedList' ] ),\n\t\t{\n\t\t\t/**\n\t\t\t * Handles the modification of the ZObject when the changed key-value\n\t\t\t * is a type. This needs to call the changeType action, which handles\n\t\t\t * the clearing of the old content and the initialization of a new\n\t\t\t * scaffolding object representing the new type.\n\t\t\t *\n\t\t\t * @param {Object} payload\n\t\t\t * @param {Object} payload.keyPath sequence of keys till the value to edit\n\t\t\t * @param {Object | Array | string} payload.value new value\n\t\t\t */\n\t\t\tsetType: function ( payload ) {\n\t\t\t\tthis.changeType( {\n\t\t\t\t\tid: this.rowId,\n\t\t\t\t\ttype: payload.value,\n\t\t\t\t\tappend: payload.append ? payload.append : false\n\t\t\t\t} );\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * Handles the modification of the state value for the key-value\n\t\t\t * represented in this component. Depending on the whether this\n\t\t\t * change involves further changes, it will emit the event further\n\t\t\t * up.\n\t\t\t *\n\t\t\t * @param {Object} payload\n\t\t\t * @param {Object} payload.keyPath sequence of keys till the value to edit\n\t\t\t * @param {Object | Array | string} payload.value new value\n\t\t\t */\n\t\t\tsetValue: function ( payload ) {\n\t\t\t\t// COMPLEX changes\n\t\t\t\t// They affect the rest of the ZObject, not only this key-value\n\n\t\t\t\t// 1. If the value of Z1K1 changes, tell parent key to change its type\n\t\t\t\tif ( this.key === Constants.Z_OBJECT_TYPE ) {\n\t\t\t\t\tthis.$emit( 'set-type', payload );\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// 2. If the value of Z1K1.Z9K1 changes, pass the set value responsability\n\t\t\t\tif ( ( this.key === Constants.Z_REFERENCE_ID ) &&\n\t\t\t\t\t( this.parentKey === Constants.Z_OBJECT_TYPE ) ) {\n\t\t\t\t\tthis.$emit( 'set-value', payload );\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// FIXME If the value of Z7K1 changes, we need to change all keys, which\n\t\t\t\t// probably means that we need to pass up the responsability the way we\n\t\t\t\t// have done it with Z1K1.\n\t\t\t\tif ( this.key === Constants.Z_FUNCTION_CALL_FUNCTION ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// SIMPLE changes\n\t\t\t\t// They don't affect the rest of the ZObject, only this key-value\n\t\t\t\tthis.setValueByRowIdAndPath( {\n\t\t\t\t\trowId: this.rowId,\n\t\t\t\t\tkeyPath: payload.keyPath ? payload.keyPath : [],\n\t\t\t\t\tvalue: payload.value\n\t\t\t\t} );\n\t\t\t},\n\t\t\t/**\n\t\t\t * Toggles on and off the expanded flag\n\t\t\t */\n\t\t\ttoggleExpanded: function () {\n\t\t\t\tthis.expanded = !this.expanded;\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * Process context menu actions\n\t\t\t *\n\t\t\t * @param {string} action\n\t\t\t */\n\t\t\tcontextMenuAction: function ( action ) {\n\t\t\t\tif ( action === Constants.contextMenuItems.DELETE_LIST_ITEM ) {\n\t\t\t\t\t// TODO(T324242): replace with new setter when it exists\n\t\t\t\t\t// TODO(T331132): can we create a 'revert delete' workflow?\n\t\t\t\t\tthis.removeItemFromTypedList( {\n\t\t\t\t\t\trowId: this.rowId\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t}\n\t\t} )\n};\n</script>\n\n<style lang=\"less\">\n@import '../../ext.wikilambda.edit.less';\n\n.ext-wikilambda-key-value {\n\t.ext-wikilambda-key-value-inherit {\n\t\tdisplay: inherit;\n\t}\n\n\t.ext-wikilambda-key-value-inline-table {\n\t\tdisplay: inline-table;\n\t}\n\n\t.ext-wikilambda-key-block {\n\t\tmargin: 0; // override vector default <p> behavior\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tcolor: @color-subtle;\n\n\t\t&__label {\n\t\t\tmargin-left: @spacing-50;\n\t\t}\n\n\t\t&__context-menu {\n\t\t\tmargin-left: @spacing-50;\n\t\t}\n\n\t\tlabel {\n\t\t\ttext-transform: capitalize;\n\t\t\tline-height: @size-125;\n\t\t}\n\n\t\t&.ext-wikilambda-expanded-off {\n\t\t\tcolor: @color-subtle;\n\t\t\tfont-weight: @font-weight-normal;\n\n\t\t\t&.ext-wikilambda-edit-on {\n\t\t\t\tmargin-bottom: @spacing-50;\n\t\t\t}\n\t\t}\n\n\t\t&.ext-wikilambda-expanded-on {\n\t\t\tfont-weight: @font-weight-normal;\n\n\t\t\t& > .cdx-icon {\n\t\t\t\tcolor: inherit;\n\t\t\t}\n\n\t\t\t&.ext-wikilambda-key-level-0 {\n\t\t\t\tcolor: @wl-key-value-color-0;\n\t\t\t}\n\n\t\t\t&.ext-wikilambda-key-level-1 {\n\t\t\t\tcolor: @wl-key-value-color-1;\n\t\t\t}\n\n\t\t\t&.ext-wikilambda-key-level-2 {\n\t\t\t\tcolor: @wl-key-value-color-2;\n\t\t\t}\n\n\t\t\t&.ext-wikilambda-key-level-3 {\n\t\t\t\tcolor: @wl-key-value-color-3;\n\t\t\t}\n\n\t\t\t&.ext-wikilambda-key-level-4 {\n\t\t\t\tcolor: @wl-key-value-color-4;\n\t\t\t}\n\n\t\t\t&.ext-wikilambda-key-level-5 {\n\t\t\t\tcolor: @wl-key-value-color-5;\n\t\t\t}\n\n\t\t\t&.ext-wikilambda-key-level-6 {\n\t\t\t\tcolor: @wl-key-value-color-6;\n\t\t\t}\n\t\t}\n\t}\n\t/* stylelint-disable declaration-block-no-redundant-longhand-properties */\n\t.ext-wikilambda-value-block {\n\t\tmargin-top: @wl-key-value-margin-top;\n\t\tmargin-right: @wl-key-value-margin-right;\n\t\tmargin-bottom: @wl-key-value-margin-bottom;\n\t\tmargin-left: @wl-key-value-margin-left;\n\n\t\t&__list-item {\n\t\t\tmargin-bottom: 0;\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tmargin-left: @spacing-25;\n\t\t}\n\n\t\t&__padded {\n\t\t\tmargin-left: @spacing-150;\n\t\t}\n\n\t\t.ext-wikilambda-key-value-set {\n\t\t\tpadding-top: @wl-key-value-set-margin-top;\n\t\t\tmargin-right: @wl-key-value-set-margin-right;\n\t\t\tmargin-bottom: @wl-key-value-set-margin-bottom;\n\t\t\tmargin-left: @wl-key-value-set-margin-left;\n\t\t}\n\t}\n}\n</style>\n","usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/resources/ext.wikilambda.edit/components/default-view-types/ZObjectKeyValueSet.vue","messages":[{"ruleId":"vue/no-undef-components","severity":1,"message":"The '<wl-z-object-key-value>' component has been used, but not defined.","line":14,"column":3,"nodeType":"VStartTag","messageId":"undef","endLine":22,"endColumn":4}],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"<template>\n\t<!--\n\t\tWikiLambda Vue component for rendering a set of ZObjectKeyValue\n\t\tcomponents, which is the fallback view for types that don't have\n\t\ta custom component and for ZObjects that are viewed in expanded mode.\n\n\t\t@copyright 2020– Abstract Wikipedia team; see AUTHORS.txt\n\t\t@license MIT\n\t-->\n\t<div\n\t\tclass=\"ext-wikilambda-key-value-set\"\n\t\t:class=\"nestingDepthClass\"\n\t>\n\t\t<wl-z-object-key-value\n\t\t\tv-for=\"rowIdItem in childRowIds\"\n\t\t\t:key=\"rowIdItem\"\n\t\t\t:row-id=\"rowIdItem\"\n\t\t\t:parent-expected-type=\"expectedType\"\n\t\t\t:parent-key=\"parentKey\"\n\t\t\t:edit=\"edit\"\n\t\t\tv-bind=\"$attrs\"\n\t\t></wl-z-object-key-value>\n\t</div>\n</template>\n\n<script>\nvar mapGetters = require( 'vuex' ).mapGetters;\n\n// @vue/component\nmodule.exports = exports = {\n\tname: 'wl-z-object-key-value-set',\n\tcomponents: {\n\t\t// Leave components as an empty object to add the ZObjectKeyValue later\n\t},\n\tinheritAttrs: false,\n\tprops: {\n\t\trowId: {\n\t\t\ttype: Number,\n\t\t\trequired: false,\n\t\t\tdefault: 0\n\t\t},\n\t\tedit: {\n\t\t\ttype: Boolean,\n\t\t\trequired: true\n\t\t},\n\t\tdepth: {\n\t\t\ttype: Number,\n\t\t\trequired: true\n\t\t},\n\t\texpectedType: {\n\t\t\ttype: String,\n\t\t\trequired: true\n\t\t}\n\t},\n\tcomputed: $.extend(\n\t\tmapGetters( [\n\t\t\t'getZObjectKeyByRowId',\n\t\t\t'getChildrenByParentRowId'\n\t\t] ),\n\t\t{\n\t\t\t/**\n\t\t\t * Returns the css class that identifies the nesting level\n\t\t\t *\n\t\t\t * @return {string}\n\t\t\t */\n\t\t\tnestingDepthClass: function () {\n\t\t\t\treturn `ext-wikilambda-key-level-${this.depth}`;\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * Returns the array of rowIds for the child key-values to\n\t\t\t * render them with a ZObjectKeyValue component each.\n\t\t\t *\n\t\t\t * @return {Array}\n\t\t\t */\n\t\t\tchildRowIds: function () {\n\t\t\t\treturn this.getChildrenByParentRowId( this.rowId )\n\t\t\t\t\t.map( function ( row ) { return row.id; } );\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * Returns the parent key of the set of key-values represented\n\t\t\t * in this component.\n\t\t\t *\n\t\t\t * @return {string}\n\t\t\t */\n\t\t\tparentKey: function () {\n\t\t\t\treturn this.getZObjectKeyByRowId( this.rowId );\n\t\t\t}\n\t\t} ),\n\tbeforeCreate: function () {\n\t\t// Need to delay require of ZObjectKeyValue to avoid loop\n\t\tthis.$options.components[ 'wl-z-object-key-value' ] = require( './ZObjectKeyValue.vue' );\n\t}\n};\n</script>\n\n<style lang=\"less\">\n@import '../../ext.wikilambda.edit.less';\n\n.ext-wikilambda-key-value-set {\n\tpadding-left: 14px;\n\n\t&.ext-wikilambda-key-level-1 {\n\t\tborder-color: @wl-key-value-color-1;\n\t}\n\n\t&.ext-wikilambda-key-level-2 {\n\t\tborder-color: @wl-key-value-color-2;\n\t}\n\n\t&.ext-wikilambda-key-level-3 {\n\t\tborder-color: @wl-key-value-color-3;\n\t}\n\n\t&.ext-wikilambda-key-level-4 {\n\t\tborder-color: @wl-key-value-color-4;\n\t}\n\n\t&.ext-wikilambda-key-level-5 {\n\t\tborder-color: @wl-key-value-color-5;\n\t}\n\n\t&.ext-wikilambda-key-level-6 {\n\t\tborder-color: @wl-key-value-color-6;\n\t}\n\tborder-top: @wl-key-value-border-top-width @wl-key-value-border-top-style;\n\tborder-bottom: @wl-key-value-border-bottom-width @wl-key-value-border-bottom-style;\n\tborder-right: @wl-key-value-border-right-width @wl-key-value-border-right-style;\n\tborder-left: @wl-key-value-border-left-width @wl-key-value-border-left-style;\n\n\t&.ext-wikilambda-key-level-0 {\n\t\tborder: 0;\n\t\tmargin: 0;\n\t\tpadding: 0;\n\t}\n}\n\n</style>\n","usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/resources/ext.wikilambda.edit/components/default-view-types/ZObjectType.vue","messages":[{"ruleId":"vue/require-explicit-emits","severity":1,"message":"The \"set-value\" event has been triggered but not declared on `emits` option.","line":184,"column":17,"nodeType":"Literal","messageId":"missing","endLine":184,"endColumn":28,"suggestions":[{"messageId":"addArrayEmitsOption","data":{"name":"set-value","emitsKind":"`emits` option"},"fix":{"range":[1702,1702],"text":"\nemits: ['set-value'],"},"desc":"Add the `emits` option with array syntax and define \"set-value\" event."},{"messageId":"addObjectEmitsOption","data":{"name":"set-value","emitsKind":"`emits` option"},"fix":{"range":[1702,1702],"text":"\nemits: {'set-value': null},"},"desc":"Add the `emits` option with object syntax and define \"set-value\" event."}]}],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"<template>\n\t<!--\n\t\tWikiLambda Vue component for viewing and modifying a ZObject type and mode.\n\n\t\t@copyright 2020– Abstract Wikipedia team; see AUTHORS.txt\n\t\t@license MIT\n\t-->\n\t<div class=\"ext-wikilambda-type-mode\">\n\t\t<template v-if=\"edit\">\n\t\t\t<!-- Zero state, select a literal type -->\n\t\t\t<wl-z-object-selector\n\t\t\t\tv-if=\"!value\"\n\t\t\t\tclass=\"ext-wikilambda-type-mode__selector\"\n\t\t\t\t:type=\"selectType\"\n\t\t\t\t:zobject-id=\"rowId\"\n\t\t\t\t:fit-width=\"true\"\n\t\t\t\t@input=\"setValue\"\n\t\t\t></wl-z-object-selector>\n\t\t\t<!-- Non-Zero state, select mode -->\n\t\t\t<!-- eslint-disable vue/no-v-model-argument -->\n\t\t\t<!-- eslint-disable vue/no-unsupported-features -->\n\t\t\t<div v-else class=\"ext-wikilambda-type-mode__select\">\n\t\t\t\t<wl-select\n\t\t\t\t\tv-model:selected=\"value\"\n\t\t\t\t\t:menu-items=\"typeOptions\"\n\t\t\t\t\t:fit-width=\"true\"\n\t\t\t\t\t:disabled=\"disabled\"\n\t\t\t\t\t@update:selected=\"setValue\"\n\t\t\t\t></wl-select>\n\t\t\t</div>\n\t\t</template>\n\t\t<template v-else>\n\t\t\t<a\n\t\t\t\tclass=\"ext-wikilambda-edit-link\"\n\t\t\t\t:href=\"valueUrl\"\n\t\t\t>\n\t\t\t\t{{ valueLabel }}\n\t\t\t</a>\n\t\t</template>\n\t</div>\n</template>\n\n<script>\nvar\n\tConstants = require( '../../Constants.js' ),\n\ticons = require( '../../../lib/icons.json' ),\n\tSelect = require( '../base/Select.vue' ),\n\tZObjectSelector = require( './../ZObjectSelector.vue' ),\n\tmapGetters = require( 'vuex' ).mapGetters;\n\n// @vue/component\nmodule.exports = exports = {\n\tname: 'wl-z-object-type',\n\tcomponents: {\n\t\t'wl-z-object-selector': ZObjectSelector,\n\t\t'wl-select': Select\n\t},\n\tprops: {\n\t\trowId: {\n\t\t\ttype: Number,\n\t\t\trequired: false,\n\t\t\tdefault: 0\n\t\t},\n\t\tedit: {\n\t\t\ttype: Boolean,\n\t\t\trequired: true\n\t\t},\n\t\texpectedType: {\n\t\t\ttype: String,\n\t\t\tdefault: ''\n\t\t},\n\t\tdisabled: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false\n\t\t}\n\t},\n\tdata: function () {\n\t\treturn {\n\t\t\tselectType: Constants.Z_TYPE\n\t\t};\n\t},\n\tcomputed: $.extend(\n\t\tmapGetters( [\n\t\t\t'getLabel',\n\t\t\t'getZReferenceTerminalValue',\n\t\t\t'isInsideComposition'\n\t\t] ),\n\t\t{\n\t\t\t/**\n\t\t\t * Returns the available options for the type mode selector.\n\t\t\t * The available options are all the available resolver types\n\t\t\t * (Z9/Reference, Z7/Function call and Z18/Argument reference\n\t\t\t * if we are inside an implementation composition) and the\n\t\t\t * literal type.\n\t\t\t * The literal type is specific if selected or bound by key,\n\t\t\t * else it will allow the selection for any literal type (Object)\n\t\t\t *\n\t\t\t * @return {Array} Array of codex MenuItemData objects\n\t\t\t */\n\t\t\ttypeOptions: function () {\n\t\t\t\t// Resolver types: reference and function always available\n\t\t\t\tconst options = [\n\t\t\t\t\t{\n\t\t\t\t\t\tlabel: this.getLabel( Constants.Z_REFERENCE ),\n\t\t\t\t\t\tvalue: Constants.Z_REFERENCE,\n\t\t\t\t\t\ticon: icons.cdxIconInstance\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tlabel: this.getLabel( Constants.Z_FUNCTION_CALL ),\n\t\t\t\t\t\tvalue: Constants.Z_FUNCTION_CALL,\n\t\t\t\t\t\ticon: icons.cdxIconFunction\n\t\t\t\t\t}\n\t\t\t\t];\n\t\t\t\t// Resolver types: argument reference only if we are inside a composition\n\t\t\t\tif ( this.isInsideComposition( this.rowId ) ) {\n\t\t\t\t\toptions.push( {\n\t\t\t\t\t\tlabel: this.getLabel( Constants.Z_ARGUMENT_REFERENCE ),\n\t\t\t\t\t\tvalue: Constants.Z_ARGUMENT_REFERENCE,\n\t\t\t\t\t\ticon: icons.cdxIconFunctionArgument\n\t\t\t\t\t} );\n\t\t\t\t}\n\n\t\t\t\t// Literal type:\n\t\t\t\tif ( Constants.RESOLVER_TYPES.indexOf( this.value ) < 0 ) {\n\t\t\t\t\t// If literal is selected, show its label\n\t\t\t\t\toptions.push( {\n\t\t\t\t\t\tlabel: this.valueLabel,\n\t\t\t\t\t\tvalue: this.value,\n\t\t\t\t\t\ticon: icons.cdxIconLiteral\n\t\t\t\t\t} );\n\t\t\t\t} else {\n\t\t\t\t\t// Else, show the bound type if any\n\t\t\t\t\toptions.push( {\n\t\t\t\t\t\tlabel: this.getLabel( this.expectedType ),\n\t\t\t\t\t\tvalue: this.expectedType,\n\t\t\t\t\t\ticon: icons.cdxIconLiteral\n\t\t\t\t\t} );\n\t\t\t\t}\n\n\t\t\t\treturn options;\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * Returns the value of the selected type\n\t\t\t *\n\t\t\t * @return {string}\n\t\t\t */\n\t\t\tvalue: function () {\n\t\t\t\treturn this.getZReferenceTerminalValue( this.rowId );\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * Returns the label object for the selected type or the value\n\t\t\t * if no label is found.\n\t\t\t *\n\t\t\t * @return {string}\n\t\t\t */\n\t\t\tvalueLabel: function () {\n\t\t\t\treturn this.value ? this.getLabel( this.value ) : undefined;\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * Returns the link to the page of the selected type.\n\t\t\t *\n\t\t\t * @return {string}\n\t\t\t */\n\t\t\tvalueUrl: function () {\n\t\t\t\tif ( this.value ) {\n\t\t\t\t\treturn new mw.Title( this.value ).getUrl();\n\t\t\t\t}\n\t\t\t}\n\t\t} ),\n\tmethods: {\n\t\t/**\n\t\t * Emits the event setValue so that ZObjectKey can update\n\t\t * the terminal value in the ZObject data table.\n\t\t *\n\t\t * @param {string} value\n\t\t */\n\t\tsetValue: function ( value ) {\n\t\t\t// Do not emit a value if there's no change to avoid\n\t\t\t// unnecessarily altering the rest of the ZObject\n\t\t\tif ( value !== this.value ) {\n\t\t\t\tthis.$emit( 'set-value', {\n\t\t\t\t\tkeyPath: [],\n\t\t\t\t\tvalue: value\n\t\t\t\t} );\n\t\t\t}\n\t\t}\n\t}\n};\n</script>\n\n<style lang=\"less\">\n@import '../../ext.wikilambda.edit.less';\n\n.ext-wikilambda-type-mode {\n\t&__select {\n\t\t.cdx-select.cdx-select--enabled.cdx-select--expanded {\n\t\t\twidth: 100%;\n\t\t\tdisplay: inline-block;\n\t\t}\n\n\t\t.cdx-select {\n\t\t\twidth: auto;\n\t\t\tdisplay: inline-block;\n\t\t}\n\n\t\t@media screen and ( min-width: @width-breakpoint-tablet ) {\n\t\t\t.cdx-select.cdx-select--enabled.cdx-select--expanded {\n\t\t\t\twidth: 50%;\n\t\t\t\tdisplay: inline-block;\n\t\t\t}\n\t\t}\n\t}\n\n\t&__selector {\n\t\t.cdx-lookup {\n\t\t\tdisplay: inline-block;\n\t\t}\n\t}\n\n\t&__selector-active {\n\t\t.cdx-lookup {\n\t\t\twidth: 100%;\n\t\t}\n\n\t\t@media screen and ( min-width: @width-breakpoint-tablet ) {\n\t\t\t.cdx-lookup {\n\t\t\t\twidth: 50%;\n\t\t\t}\n\t\t}\n\t}\n}\n</style>\n","usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/resources/ext.wikilambda.edit/components/default-view-types/ZReference.vue","messages":[{"ruleId":"vue/require-explicit-emits","severity":1,"message":"The \"set-value\" event has been triggered but not declared on `emits` option.","line":132,"column":16,"nodeType":"Literal","messageId":"missing","endLine":132,"endColumn":27,"suggestions":[{"messageId":"addArrayEmitsOption","data":{"name":"set-value","emitsKind":"`emits` option"},"fix":{"range":[1142,1142],"text":"\nemits: ['set-value'],"},"desc":"Add the `emits` option with array syntax and define \"set-value\" event."},{"messageId":"addObjectEmitsOption","data":{"name":"set-value","emitsKind":"`emits` option"},"fix":{"range":[1142,1142],"text":"\nemits: {'set-value': null},"},"desc":"Add the `emits` option with object syntax and define \"set-value\" event."}]}],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"<template>\n\t<!--\n\t\tWikiLambda Vue component for Z9/Reference objects.\n\n\t\t@copyright 2020– Abstract Wikipedia team; see AUTHORS.txt\n\t\t@license MIT\n\t-->\n\t<div class=\"ext-wikilambda-reference\">\n\t\t<template v-if=\"!edit\">\n\t\t\t<a\n\t\t\t\tclass=\"ext-wikilambda-edit-link\"\n\t\t\t\t:href=\"valueUrl\">{{ valueLabel }}</a>\n\t\t</template>\n\t\t<template v-else>\n\t\t\t<wl-z-object-selector\n\t\t\t\t:selected-id=\"value\"\n\t\t\t\t:initial-selection-label=\"valueLabel\"\n\t\t\t\t:type=\"selectType\"\n\t\t\t\t:zobject-id=\"rowId\"\n\t\t\t\t:readonly=\"disabled\"\n\t\t\t\t:fit-width=\"true\"\n\t\t\t\t@input=\"setValue\"\n\t\t\t></wl-z-object-selector>\n\t\t</template>\n\t</div>\n</template>\n\n<script>\nvar\n\tConstants = require( '../../Constants.js' ),\n\tZObjectSelector = require( './../ZObjectSelector.vue' ),\n\tmapGetters = require( 'vuex' ).mapGetters;\n\n// @vue/component\nmodule.exports = exports = {\n\tname: 'wl-z-reference',\n\tcomponents: {\n\t\t'wl-z-object-selector': ZObjectSelector\n\t},\n\tprops: {\n\t\trowId: {\n\t\t\ttype: Number,\n\t\t\trequired: false,\n\t\t\tdefault: 0\n\t\t},\n\t\tedit: {\n\t\t\ttype: Boolean,\n\t\t\trequired: true\n\t\t},\n\t\texpectedType: {\n\t\t\ttype: String,\n\t\t\tdefault: ''\n\t\t},\n\t\tdisabled: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false\n\t\t}\n\t},\n\tdata: function () {\n\t\treturn {\n\t\t};\n\t},\n\tcomputed: $.extend(\n\t\tmapGetters( [\n\t\t\t'getLabel',\n\t\t\t'getZObjectKeyByRowId',\n\t\t\t'getZReferenceTerminalValue'\n\t\t] ),\n\t\t{\n\t\t\t/**\n\t\t\t * Returns the value of the selected reference.\n\t\t\t *\n\t\t\t * @return {string}\n\t\t\t */\n\t\t\tvalue: function () {\n\t\t\t\treturn this.getZReferenceTerminalValue( this.rowId );\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * Returns the string value of the label for the selected reference.\n\t\t\t * If no label is found, returns undefined.\n\t\t\t *\n\t\t\t * @return {string|undefined}\n\t\t\t */\n\t\t\tvalueLabel: function () {\n\t\t\t\treturn this.value ? this.getLabel( this.value ) : undefined;\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * Returns the link to the page of the selected reference.\n\t\t\t *\n\t\t\t * @return {string}\n\t\t\t */\n\t\t\tvalueUrl: function () {\n\t\t\t\treturn new mw.Title( this.value ).getUrl();\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * Returns the bound type to configure the ZObjectSelector\n\t\t\t * if any, else returns an empty string.\n\t\t\t *\n\t\t\t * @return {string}\n\t\t\t */\n\t\t\tselectType: function () {\n\t\t\t\treturn this.expectedType === Constants.Z_OBJECT ?\n\t\t\t\t\t'' :\n\t\t\t\t\tthis.expectedType;\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * Returns the key that contains the reference value\n\t\t\t * represented in this component.\n\t\t\t *\n\t\t\t * @return {string}\n\t\t\t */\n\t\t\tkey: function () {\n\t\t\t\treturn this.getZObjectKeyByRowId( this.rowId );\n\t\t\t}\n\t\t}\n\t),\n\tmethods: {\n\t\t/**\n\t\t * Emits the event setValue so that ZObjectKey can update\n\t\t * the terminal value in the ZObject data table.\n\t\t *\n\t\t * @param {string} value\n\t\t */\n\t\tsetValue: function ( value ) {\n\t\t\tconst keyPath = ( this.key !== Constants.Z_REFERENCE_ID ) ?\n\t\t\t\t[ Constants.Z_REFERENCE_ID ] :\n\t\t\t\t[];\n\t\t\tthis.$emit( 'set-value', { keyPath, value } );\n\t\t}\n\t}\n};\n\n</script>\n","usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/resources/ext.wikilambda.edit/components/default-view-types/ZString.vue","messages":[{"ruleId":"vue/require-explicit-emits","severity":1,"message":"The \"set-value\" event has been triggered but not declared on `emits` option.","line":84,"column":18,"nodeType":"Literal","messageId":"missing","endLine":84,"endColumn":29,"suggestions":[{"messageId":"addArrayEmitsOption","data":{"name":"set-value","emitsKind":"`emits` option"},"fix":{"range":[768,768],"text":"\nemits: ['set-value'],"},"desc":"Add the `emits` option with array syntax and define \"set-value\" event."},{"messageId":"addObjectEmitsOption","data":{"name":"set-value","emitsKind":"`emits` option"},"fix":{"range":[768,768],"text":"\nemits: {'set-value': null},"},"desc":"Add the `emits` option with object syntax and define \"set-value\" event."}]}],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"<template>\n\t<!--\n\t\tWikiLambda Vue component for Z6/String objects.\n\n\t\t@copyright 2020– Abstract Wikipedia team; see AUTHORS.txt\n\t\t@license MIT\n\t-->\n\t<div class=\"ext-wikilambda-string\">\n\t\t<p v-if=\"!edit\">\n\t\t\t{{ value }}\n\t\t</p>\n\t\t<wl-text-input\n\t\t\tv-else\n\t\t\tv-model=\"value\"\n\t\t\t:fit-width=\"true\"\n\t\t\taria-label=\"\"\n\t\t\tplaceholder=\"\"\n\t\t></wl-text-input>\n\t</div>\n</template>\n\n<script>\nvar TextInput = require( '../base/TextInput.vue' ),\n\tConstants = require( '../../Constants.js' ),\n\tmapGetters = require( 'vuex' ).mapGetters;\n\n// @vue/component\nmodule.exports = exports = {\n\tname: 'wl-z-string',\n\tcomponents: {\n\t\t'wl-text-input': TextInput\n\t},\n\tprops: {\n\t\trowId: {\n\t\t\ttype: Number,\n\t\t\trequired: false,\n\t\t\tdefault: 0\n\t\t},\n\t\tedit: {\n\t\t\ttype: Boolean,\n\t\t\trequired: true\n\t\t}\n\t},\n\tdata: function () {\n\t\treturn {\n\t\t};\n\t},\n\tcomputed: $.extend(\n\t\tmapGetters( [\n\t\t\t'getZObjectKeyByRowId',\n\t\t\t'getZStringTerminalValue'\n\t\t] ),\n\t\t{\n\t\t\t/**\n\t\t\t * Computed value:\n\t\t\t * 1. Getter gets the value from the state.\n\t\t\t * 2. Setter informs the ZObjectKeyValue of the change.\n\t\t\t * Only the ZObjectKeyValue responds to the 'setValue' emitted event\n\t\t\t * so only the ZObjectKeyValue is doing operations to transform\n\t\t\t * the state data. This is so that we don't duplicate state mutation\n\t\t\t * logic all over the components, and builtin components are just\n\t\t\t * visual representations and have zero logic.\n\t\t\t */\n\t\t\tvalue: {\n\t\t\t\t/**\n\t\t\t\t * Returns the terminal value of the string represented\n\t\t\t\t * in this component.\n\t\t\t\t *\n\t\t\t\t * @return {string}\n\t\t\t\t */\n\t\t\t\tget: function () {\n\t\t\t\t\treturn this.getZStringTerminalValue( this.rowId );\n\t\t\t\t},\n\t\t\t\t/**\n\t\t\t\t * Emits a setValue event with the new value for the string\n\t\t\t\t * and the key path information depending on the object key.\n\t\t\t\t *\n\t\t\t\t * @param {string} value\n\t\t\t\t */\n\t\t\t\tset: function ( value ) {\n\t\t\t\t\tconst keyPath = ( this.key !== Constants.Z_STRING_VALUE ) ?\n\t\t\t\t\t\t[ Constants.Z_STRING_VALUE ] :\n\t\t\t\t\t\t[];\n\t\t\t\t\tthis.$emit( 'set-value', { keyPath, value } );\n\t\t\t\t}\n\t\t\t},\n\t\t\t/**\n\t\t\t * Returns the key that contains the string value\n\t\t\t * represented in this component.\n\t\t\t *\n\t\t\t * @return {string}\n\t\t\t */\n\t\t\tkey: function () {\n\t\t\t\treturn this.getZObjectKeyByRowId( this.rowId );\n\t\t\t}\n\t\t}\n\t)\n};\n\n</script>\n\n<style lang=\"less\">\n@import '../../ext.wikilambda.edit.less';\n\n.ext-wikilambda-string {\n\tp {\n\t\tmargin: 0;\n\t\tcolor: @color-base;\n\t}\n}\n</style>\n","usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/resources/ext.wikilambda.edit/components/default-view-types/ZTypedList.vue","messages":[{"ruleId":"vue/require-explicit-emits","severity":1,"message":"The \"set-type\" event has been triggered but not declared on `emits` option.","line":164,"column":16,"nodeType":"Literal","messageId":"missing","endLine":164,"endColumn":26,"suggestions":[{"messageId":"addArrayEmitsOption","data":{"name":"set-type","emitsKind":"`emits` option"},"fix":{"range":[1949,1949],"text":"\nemits: ['set-type'],"},"desc":"Add the `emits` option with array syntax and define \"set-type\" event."},{"messageId":"addObjectEmitsOption","data":{"name":"set-type","emitsKind":"`emits` option"},"fix":{"range":[1949,1949],"text":"\nemits: {'set-type': null},"},"desc":"Add the `emits` option with object syntax and define \"set-type\" event."}]}],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"<template>\n\t<!--\n\t\tWikiLambda Vue component for a Typed List.\n\n\t\t@copyright 2020– Abstract Wikipedia team; see AUTHORS.txt\n\t\t@license MIT\n\t-->\n\t<div\n\t\tclass=\"ext-wikilambda-ztyped-list\"\n\t\t:class=\"nestingDepthClass\"\n\t>\n\t\t<!-- Type of list -->\n\t\t<wl-z-typed-list-type\n\t\t\tv-if=\"expanded\"\n\t\t\t:row-id=\"typeRowId\"\n\t\t\t:edit=\"edit\"\n\t\t\t:list-type=\"type\"\n\t\t\t:parent-row-id=\"rowId\"\n\t\t></wl-z-typed-list-type>\n\t\t<!-- Label for list items -->\n\t\t<label\n\t\t\tv-if=\"expanded\"\n\t\t\tclass=\"ext-wikilambda-ztyped-list__label\"\n\t\t>\n\t\t\t{{ itemsLabel }}\n\t\t</label>\n\t\t<!-- List items -->\n\t\t<ul\n\t\t\t:id=\"indentation\"\n\t\t\tclass=\"ext-wikilambda-ztyped-list__wrapper\"\n\t\t>\n\t\t\t<li\n\t\t\t\tv-for=\"item in listItemsRowIds\"\n\t\t\t\t:key=\"item\"\n\t\t\t\tclass=\"ext-wikilambda-ztyped-list__wrapper-items\"\n\t\t\t>\n\t\t\t\t<wl-z-typed-list-item\n\t\t\t\t\tref=\"listItemElements\"\n\t\t\t\t\t:row-id=\"item\"\n\t\t\t\t\t:edit=\"edit\"\n\t\t\t\t\t:list-type=\"type\"\n\t\t\t\t\t:is-terminal-item=\"isTerminalItem( item )\"\n\t\t\t\t></wl-z-typed-list-item>\n\t\t\t</li>\n\t\t</ul>\n\t\t<!-- Button to add a new item -->\n\t\t<cdx-button\n\t\t\tv-if=\"edit\"\n\t\t\tclass=\"ext-wikilambda-ztyped-list__add-button\"\n\t\t\t@click=\"addListItem\"\n\t\t>\n\t\t\t{{ $i18n( 'wikilambda-add-list-item-button' ).text() }}\n\t\t</cdx-button>\n\t</div>\n</template>\n\n<script>\nvar ZTypedListItem = require( './ZTypedListItem.vue' ),\n\tZTypedListType = require( './ZTypedListType.vue' ),\n\tConstants = require( '../../Constants.js' ),\n\tCdxButton = require( '@wikimedia/codex' ).CdxButton,\n\tmapActions = require( 'vuex' ).mapActions,\n\tmapGetters = require( 'vuex' ).mapGetters;\n\n// @vue/component\nmodule.exports = exports = {\n\tname: 'wl-z-typed-list',\n\tcomponents: {\n\t\t'wl-z-typed-list-item': ZTypedListItem,\n\t\t'wl-z-typed-list-type': ZTypedListType,\n\t\t'cdx-button': CdxButton\n\t},\n\tprops: {\n\t\trowId: {\n\t\t\ttype: Number,\n\t\t\trequired: false,\n\t\t\tdefault: 0\n\t\t},\n\t\tedit: {\n\t\t\ttype: Boolean,\n\t\t\trequired: true\n\t\t},\n\t\texpanded: {\n\t\t\ttype: Boolean,\n\t\t\trequired: true\n\t\t},\n\t\tdepth: {\n\t\t\ttype: Number,\n\t\t\trequired: true\n\t\t}\n\t},\n\tcomputed: $.extend(\n\t\tmapGetters( [\n\t\t\t'getChildrenByParentRowId',\n\t\t\t'getZObjectTypeByRowId'\n\t\t] ),\n\t\t{\n\t\t\t/**\n\t\t\t * Gets the set of ids that compose this typed list, including the type itself\n\t\t\t *\n\t\t\t * @return {Array}\n\t\t\t */\n\t\t\tchildRowIds: function () {\n\t\t\t\treturn this.getChildrenByParentRowId( this.rowId )\n\t\t\t\t\t.map( function ( row ) { return row.id; } );\n\t\t\t},\n\t\t\t/**\n\t\t\t * Returns the list items without the type (the first item in the list)\n\t\t\t *\n\t\t\t * @return {Array} list\n\t\t\t */\n\t\t\tlistItemsRowIds: function () {\n\t\t\t\treturn this.childRowIds.slice( 1 );\n\t\t\t},\n\t\t\t/**\n\t\t\t * Returns the id for the first item on the list, which represents the type\n\t\t\t *\n\t\t\t * @return {string}\n\t\t\t */\n\t\t\ttypeRowId: function () {\n\t\t\t\treturn this.childRowIds[ 0 ];\n\t\t\t},\n\t\t\t/**\n\t\t\t * The ZID of the type of this list\n\t\t\t *\n\t\t\t * @return {string} type\n\t\t\t */\n\t\t\ttype: function () {\n\t\t\t\t// FIXME(T331149): figure out how to handle when the type is a function call\n\t\t\t\treturn this.getZObjectTypeByRowId( this.typeRowId );\n\t\t\t},\n\t\t\t/**\n\t\t\t * Returns the css class that identifies the nesting level\n\t\t\t *\n\t\t\t * @return {string}\n\t\t\t */\n\t\t\tnestingDepthClass: function () {\n\t\t\t\tif ( this.expanded ) {\n\t\t\t\t\treturn [\n\t\t\t\t\t\t'ext-wikilambda-default-key-depth',\n\t\t\t\t\t\t'ext-wikilambda-key-value-set',\n\t\t\t\t\t\t`ext-wikilambda-key-level-${this.depth}`\n\t\t\t\t\t];\n\t\t\t\t}\n\t\t\t},\n\n\t\t\tindentation: function () {\n\t\t\t\treturn this.expanded ? 'typed-list-expanded' : 'typed-list-collapsed';\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * Returns the key label for the list of items.\n\t\t\t * Since the FE represents typed lists as benjamin arrays, this must be hardcoded\n\t\t\t *\n\t\t\t * @return {string}\n\t\t\t */\n\t\t\titemsLabel: function () {\n\t\t\t\treturn this.$i18n( 'wikilambda-list-items-label' ).text();\n\t\t\t}\n\t\t}\n\t),\n\tmethods: $.extend( {}, mapActions( [ 'recalculateZListIndex' ] ), {\n\t\taddListItem: function () {\n\t\t\tthis.$emit( 'set-type', { value: this.type, append: true } );\n\t\t},\n\t\tisTerminalItem: function ( item ) {\n\t\t\t// we cannot assume an item is the same type as the list type\n\t\t\t// because in the case of a Z1 typed list, each element can be different\n\t\t\tconst itemType = this.getZObjectTypeByRowId( item );\n\n\t\t\t// although the logic is similar to `hasExpandedMode`,\n\t\t\t// that can't be passed down because it needs to check\n\t\t\t// different properties (and it has different rules for edit)\n\t\t\tconst isTerminalListItem = (\n\t\t\t\titemType === Constants.Z_OBJECT ||\n\t\t\t\titemType === Constants.Z_STRING ||\n\t\t\t\titemType === Constants.Z_REFERENCE\n\t\t\t);\n\n\t\t\treturn isTerminalListItem && !this.edit;\n\t\t}\n\t} ),\n\twatch: {\n\t\tchildRowIds: function ( list, prevList ) {\n\t\t\t// if an item was deleted from the list\n\t\t\tif ( list.length < prevList.length ) {\n\t\t\t\tthis.recalculateZListIndex( this.zobjectId );\n\t\t\t}\n\n\t\t\t// when a new item is added the list, toggle the expansion in the child component\n\t\t\tif ( list.length > prevList.length ) {\n\t\t\t\t// need to wait until the new item is rendered\n\t\t\t\tthis.$nextTick( function () {\n\t\t\t\t\tconst newItem = this.$refs.listItemElements[ this.$refs.listItemElements.length - 1 ];\n\t\t\t\t\tnewItem.setExpanded();\n\t\t\t\t} );\n\t\t\t}\n\t\t}\n\t}\n};\n</script>\n\n<style lang=\"less\">\n@import '../../ext.wikilambda.edit.less';\n\n.ext-wikilambda-ztyped-list {\n\t// we can't use a class because otherwise mediawiki ul styles will be applied\n\t// this overrides them\n\t/* stylelint-disable selector-max-id */\n\t#typed-list-expanded {\n\t\tmargin: @spacing-0;\n\t\tpadding: @spacing-0;\n\t}\n\n\t#typed-list-collapsed {\n\t\tmargin: @spacing-0 @spacing-0 @spacing-0 @spacing-150;\n\t\tpadding: @spacing-0;\n\t}\n\n\t&__label {\n\t\tdisplay: inline-block;\n\t\tmargin-bottom: @spacing-12;\n\t\tcolor: @color-subtle;\n\t\tfont-weight: @font-weight-normal;\n\t}\n\n\t&__add-button {\n\t\tmargin-left: @spacing-150;\n\t\tmargin-top: @spacing-50;\n\t}\n\n\t&__wrapper {\n\t\tlist-style: none;\n\n\t\t&-items:last-child {\n\t\t\tmargin-bottom: @spacing-0;\n\t\t}\n\t}\n\n\t&-no-bullet {\n\t\tdisplay: flex;\n\t}\n}\n\n</style>\n","usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/resources/ext.wikilambda.edit/components/default-view-types/ZTypedListItem.vue","messages":[{"ruleId":"vue/no-undef-components","severity":1,"message":"The '<wl-z-object-key-value>' component has been used, but not defined.","line":16,"column":3,"nodeType":"VStartTag","messageId":"undef","endLine":21,"endColumn":4}],"suppressedMessages":[{"ruleId":"vue/no-unused-properties","severity":2,"message":"'setExpanded' of method found, but never used.","line":61,"column":3,"nodeType":"Identifier","messageId":"unused","endLine":61,"endColumn":14,"suppressions":[{"kind":"directive","justification":""}]}],"errorCount":0,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"<template>\n\t<!--\n\t\tWikiLambda Vue component for items in a ZList.\n\n\t\t@copyright 2020– Abstract Wikipedia team; see AUTHORS.txt\n\t\t@license MIT\n\t-->\n\t<div\n\t\tclass=\"ext-wikilambda-ztyped-list-item\"\n\t\t:class=\"containerStyle\"\n\t>\n\t\t<div\n\t\t\tv-if=\"isTerminalItem\"\n\t\t\tclass=\"ext-wikilambda-ztyped-list-item-bullet\">\n\t\t</div>\n\t\t<wl-z-object-key-value\n\t\t\tref=\"listValue\"\n\t\t\t:row-id=\"rowId\"\n\t\t\t:edit=\"edit\"\n\t\t\t:list-type=\"listType\"\n\t\t></wl-z-object-key-value>\n\t</div>\n</template>\n\n<script>\n// @vue/component\nmodule.exports = exports = {\n\tname: 'wl-z-typed-list-item',\n\tcomponents: {\n\t\t// Leave components as an empty object to add the ZObjectKeyValue later\n\t},\n\tprops: {\n\t\trowId: {\n\t\t\ttype: Number,\n\t\t\trequired: false,\n\t\t\tdefault: 0\n\t\t},\n\t\tedit: {\n\t\t\ttype: Boolean,\n\t\t\trequired: true\n\t\t},\n\t\tlistType: {\n\t\t\ttype: String,\n\t\t\trequired: true\n\t\t},\n\t\tisTerminalItem: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false\n\t\t}\n\t},\n\tcomputed:\n\t{\n\t\tcontainerStyle: function () {\n\t\t\treturn this.isTerminalItem ? 'ext-wikilambda-ztyped-list-item' : 'ext-wikilambda-ztyped-list-item-flex';\n\t\t}\n\t},\n\tmethods: {\n\t\t// ZTypedList calls this property on a new item added to the list\n\t\t// in order to access the child component, ZObjectKeyValue\n\t\t// eslint-disable-next-line vue/no-unused-properties\n\t\tsetExpanded() {\n\t\t\tthis.$refs.listValue.toggleExpanded();\n\t\t}\n\t},\n\tbeforeCreate: function () {\n\t\tthis.$options.components[ 'wl-z-object-key-value' ] = require( './ZObjectKeyValue.vue' );\n\t}\n};\n</script>\n\n<style lang=\"less\">\n@import '../../ext.wikilambda.edit.less';\n\n.ext-wikilambda-ztyped-list-item {\n\twidth: 100%;\n\tmargin-bottom: @spacing-25;\n\n\t&-bullet {\n\t\theight: @size-25;\n\t\twidth: @size-25;\n\t\tmargin-left: @spacing-50;\n\t\tbackground-color: @border-color-base;\n\t\tborder-radius: 50%;\n\t\tdisplay: inline-flex;\n\t\tvertical-align: middle;\n\t}\n\n\t&-flex {\n\t\tdisplay: flex;\n\t}\n\n\t&__last-element {\n\t\tmargin-bottom: @spacing-0;\n\t}\n}\n</style>\n","usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/resources/ext.wikilambda.edit/components/default-view-types/ZTypedListType.vue","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/resources/ext.wikilambda.edit/components/function/ZFunctionCallRunner.vue","messages":[{"ruleId":"vue/no-undef-components","severity":1,"message":"The '<wl-z-reference>' component has been used, but not defined.","line":10,"column":3,"nodeType":"VStartTag","messageId":"undef","endLine":14,"endColumn":4},{"ruleId":"vue/no-unregistered-components","severity":1,"message":"The \"wl-z-reference\" component has been used but not registered.","line":10,"column":3,"nodeType":"VElement","endLine":14,"endColumn":21},{"ruleId":"vue/no-undef-components","severity":1,"message":"The '<wl-z-object-key>' component has been used, but not defined.","line":17,"column":5,"nodeType":"VStartTag","messageId":"undef","endLine":23,"endColumn":6},{"ruleId":"vue/no-undef-components","severity":1,"message":"The '<wl-z-key-mode-selector>' component has been used, but not defined.","line":32,"column":5,"nodeType":"VStartTag","messageId":"undef","endLine":37,"endColumn":6},{"ruleId":"vue/no-unregistered-components","severity":1,"message":"The \"wl-z-key-mode-selector\" component has been used but not registered.","line":32,"column":5,"nodeType":"VElement","endLine":37,"endColumn":31},{"ruleId":"vue/no-undef-components","severity":1,"message":"The '<wl-z-object-json>' component has been used, but not defined.","line":39,"column":6,"nodeType":"VStartTag","messageId":"undef","endLine":43,"endColumn":7},{"ruleId":"vue/no-undef-components","severity":1,"message":"The '<wl-z-object-key>' component has been used, but not defined.","line":44,"column":6,"nodeType":"VStartTag","messageId":"undef","endLine":49,"endColumn":7}],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":7,"fixableErrorCount":0,"fixableWarningCount":0,"source":"<template>\n\t<!--\n\t\tWikiLambda Vue component for ZFunctionCall objects.\n\n\t\t@copyright 2020– Abstract Wikipedia team; see AUTHORS.txt\n\t\t@license MIT\n\t-->\n\t<div v-if=\"selectedFunction\" class=\"ext-wikilambda-function-call-block ext-wikilambda-function-call-block__runner\">\n\t\t{{ zFunctionCallKeyLabels[ Constants.Z_FUNCTION_CALL_FUNCTION ] }}:\n\t\t<wl-z-reference\n\t\t\t:zobject-key=\"selectedFunctionPersistentValue\"\n\t\t\t:search-type=\"Constants.Z_FUNCTION\"\n\t\t\t:readonly=\"true\"\n\t\t></wl-z-reference>\n\t\t<ul>\n\t\t\t<li v-for=\"argument in zFunctionArguments\" :key=\"argument.key\">\n\t\t\t\t<wl-z-object-key\n\t\t\t\t\t:zobject-id=\"findArgumentId( argument.key )\"\n\t\t\t\t\t:persistent=\"false\"\n\t\t\t\t\t:parent-type=\"Constants.Z_FUNCTION_CALL\"\n\t\t\t\t\t:z-key=\"argument.key\"\n\t\t\t\t\t:readonly=\"hasNoImplementations()\"\n\t\t\t\t></wl-z-object-key>\n\t\t\t</li>\n\t\t</ul>\n\t\t<cdx-button :disabled=\"hasNoImplementations()\" @click=\"callFunctionHandler\">\n\t\t\t<label> {{ $i18n( 'wikilambda-call-function' ).text() }} </label>\n\t\t</cdx-button>\n\t\t<div v-if=\"resultZObject || orchestrating\" class=\"ext-wikilambda-orchestrated-result\">\n\t\t\t<template v-if=\"resultZObject\">\n\t\t\t\t<span>{{ $i18n( 'wikilambda-orchestrated' ).text() }}</span>\n\t\t\t\t<wl-z-key-mode-selector\n\t\t\t\t\t:mode=\"orchestratedMode\"\n\t\t\t\t\t:parent-type=\"Constants.Z_FUNCTION_CALL\"\n\t\t\t\t\t:available-modes=\"displayModes\"\n\t\t\t\t\t@change=\"orchestratedMode = $event\"\n\t\t\t\t></wl-z-key-mode-selector>\n\t\t\t\t<div>\n\t\t\t\t\t<wl-z-object-json\n\t\t\t\t\t\tv-if=\"orchestratedMode === Constants.Z_KEY_MODES.JSON\"\n\t\t\t\t\t\t:readonly=\"true\"\n\t\t\t\t\t\t:zobject-id=\"resultId\"\n\t\t\t\t\t></wl-z-object-json>\n\t\t\t\t\t<wl-z-object-key\n\t\t\t\t\t\tv-else\n\t\t\t\t\t\t:zobject-id=\"resultId\"\n\t\t\t\t\t\t:parent-type=\"Constants.Z_RESPONSEENVELOPE\"\n\t\t\t\t\t\t:readonly=\"true\"\n\t\t\t\t\t></wl-z-object-key>\n\t\t\t\t</div>\n\t\t\t</template>\n\t\t\t<template v-else-if=\"orchestrating\">\n\t\t\t\t<em>{{ $i18n( 'wikilambda-orchestrated-loading' ).text() }}</em>\n\t\t\t</template>\n\t\t</div>\n\t</div>\n</template>\n\n<script>\nvar Constants = require( '../../Constants.js' ),\n\tCdxButton = require( '@wikimedia/codex' ).CdxButton,\n\tZFunctionCall = require( '../main-types/ZFunctionCall.vue' ),\n\tmapGetters = require( 'vuex' ).mapGetters;\n\n// @vue/component\nmodule.exports = exports = {\n\tname: 'wl-z-function-call-runner',\n\tcomponents: {\n\t\t'cdx-button': CdxButton\n\t},\n\textends: ZFunctionCall,\n\tprovide: function () {\n\t\treturn {\n\t\t\tviewmode: false\n\t\t};\n\t},\n\tcomputed: mapGetters( {\n\t\tgetCurrentZObjectType: 'getCurrentZObjectType',\n\t\tgetZObjectAsJson: 'getZObjectAsJson'\n\t} ),\n\tmethods: {\n\t\tcallFunctionHandler: function () {\n\t\t\tvar self = this,\n\t\t\t\tzFunctionCallObject = this.getZObjectAsJsonById( this.zobjectId );\n\n\t\t\tif ( this.getCurrentZObjectType === Constants.Z_IMPLEMENTATION ) {\n\t\t\t\tvar zFunctionId = this.getZObjectAsJson[\n\t\t\t\t\tConstants.Z_PERSISTENTOBJECT_VALUE ][\n\t\t\t\t\tConstants.Z_IMPLEMENTATION_FUNCTION ][\n\t\t\t\t\tConstants.Z_REFERENCE_ID ];\n\t\t\t\tzFunctionCallObject[ Constants.Z_FUNCTION_CALL_FUNCTION ] =\n\t\t\t\t\tthis.getZkeys[ zFunctionId ][ Constants.Z_PERSISTENTOBJECT_VALUE ];\n\t\t\t\tzFunctionCallObject[ Constants.Z_FUNCTION_CALL_FUNCTION ][ Constants.Z_FUNCTION_IMPLEMENTATIONS ] =\n\t\t\t\t\t[ Constants.Z_IMPLEMENTATION, this.getZObjectAsJson[ Constants.Z_PERSISTENTOBJECT_VALUE ] ];\n\t\t\t}\n\n\t\t\tthis.orchestrating = true;\n\n\t\t\tthis.initializeResultId( this.resultId )\n\t\t\t\t.then( function ( resultId ) {\n\t\t\t\t\tself.resultId = resultId;\n\n\t\t\t\t\treturn self.callZFunction( { zobject: zFunctionCallObject, resultId: self.resultId } );\n\t\t\t\t} )\n\t\t\t\t.then( function () {\n\t\t\t\t\tself.orchestrating = false;\n\t\t\t\t} );\n\t\t},\n\t\thasNoImplementations: function () {\n\t\t\treturn this.zImplementations.length === 0;\n\t\t}\n\t}\n};\n</script>\n\n<style lang=\"less\">\n.ext-wikilambda-function-call-block__runner {\n\tmax-width: 40vw;\n\n\t@media ( max-width: 1200px ) {\n\t\tmax-width: 100%;\n\t}\n}\n</style>\n","usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/resources/ext.wikilambda.edit/components/function/ZFunctionEvaluator.vue","messages":[],"suppressedMessages":[{"ruleId":"max-len","severity":2,"message":"This line has a length of 153. Maximum allowed is 120.","line":68,"column":1,"nodeType":"Program","messageId":"max","endLine":68,"endColumn":136,"suppressions":[{"kind":"directive","justification":""}]}],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/resources/ext.wikilambda.edit/components/function/ZFunctionTesterReport.vue","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/resources/ext.wikilambda.edit/components/function/ZFunctionTesterTable.vue","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/resources/ext.wikilambda.edit/components/function/ZImplementationList.vue","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/resources/ext.wikilambda.edit/components/function/ZImplementationListItem.vue","messages":[{"ruleId":"vue/require-explicit-emits","severity":1,"message":"The \"remove-item\" event has been triggered but not declared on `emits` option.","line":14,"column":19,"nodeType":"Literal","messageId":"missing","endLine":14,"endColumn":32,"suggestions":[{"messageId":"addArrayEmitsOption","data":{"name":"remove-item","emitsKind":"`emits` option"},"fix":{"range":[1436,1436],"text":"\nemits: ['remove-item'],"},"desc":"Add the `emits` option with array syntax and define \"remove-item\" event."},{"messageId":"addObjectEmitsOption","data":{"name":"remove-item","emitsKind":"`emits` option"},"fix":{"range":[1436,1436],"text":"\nemits: {'remove-item': null},"},"desc":"Add the `emits` option with object syntax and define \"remove-item\" event."}]}],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"<template>\n\t<!--\n\t\tWikiLambda Vue component for ZObject references to ZImplementations in ZLists.\n\n\t\t@copyright 2020– Abstract Wikipedia team; see AUTHORS.txt\n\t\t@license MIT\n\t-->\n\t<li class=\"ext-wikilambda-ZImplementationListItem\">\n\t\t<cdx-button\n\t\t\tv-if=\"!( getViewMode || readonly )\"\n\t\t\tclass=\"z-list-item-remove\"\n\t\t\taction=\"destructive\"\n\t\t\t:title=\"tooltipRemoveListItem\"\n\t\t\t@click=\"$emit( 'remove-item', zobjectId )\"\n\t\t>\n\t\t\t{{ $i18n( 'wikilambda-editor-removeitem' ).text() }}\n\t\t</cdx-button>\n\t\t<select v-if=\"!hasReference\" @change=\"selectImplementation\">\n\t\t\t<option disabled selected>\n\t\t\t\t{{ $i18n( \"wikilambda-implementation-selector\" ).text() }}\n\t\t\t</option>\n\t\t\t<option\n\t\t\t\tv-for=\"zImplementationId in getUnattachedZImplementations\"\n\t\t\t\t:key=\"zImplementationId\"\n\t\t\t\t:value=\"zImplementationId\"\n\t\t\t>\n\t\t\t\t{{ getZkeyLabels[ zImplementationId ] }}\n\t\t\t</option>\n\t\t</select>\n\t\t<h4 class=\"ext-wikilambda-inline-list-item-title\">\n\t\t\t<a :href=\"zImplementationLink\">\n\t\t\t\t{{ zImplementationLabel }}\n\t\t\t</a>\n\t\t</h4>\n\t</li>\n</template>\n\n<script>\nvar Constants = require( '../../Constants.js' ),\n\tZListItem = require( '../main-types/ZListItem.vue' ),\n\tCdxButton = require( '@wikimedia/codex' ).CdxButton,\n\tmapGetters = require( 'vuex' ).mapGetters,\n\tmapActions = require( 'vuex' ).mapActions;\n\n// @vue/component\nmodule.exports = exports = {\n\tname: 'wl-z-implementation-list-item',\n\tcomponents: {\n\t\t'cdx-button': CdxButton\n\t},\n\textends: ZListItem,\n\tcomputed: $.extend( mapGetters( [\n\t\t'getZObjectById',\n\t\t'getUnattachedZImplementations',\n\t\t'getZkeyLabels',\n\t\t'getZkeys',\n\t\t'getViewMode'\n\t] ),\n\t{\n\t\tzImplementationId: function () {\n\t\t\treturn this.findKeyInArray( Constants.Z_REFERENCE_ID, this.zobject ).value;\n\t\t},\n\t\thasReference: function () {\n\t\t\treturn !!this.zImplementationId;\n\t\t},\n\t\tzImplementationLabel: function () {\n\t\t\treturn this.getZkeyLabels[ this.zImplementationId ];\n\t\t},\n\t\tzImplementation: function () {\n\t\t\treturn this.getZkeys[ this.zImplementationId ];\n\t\t},\n\t\tzImplementationLink: function () {\n\t\t\treturn new mw.Title( this.zImplementationId ).getUrl();\n\t\t}\n\t}\n\t),\n\tmethods: $.extend( mapActions( [ 'fetchZKeys', 'removeGenericTypeItem' ] ), {\n\t\tselectImplementation: function ( event ) {\n\t\t\tthis.$store.dispatch( 'injectZObject', {\n\t\t\t\tzobject: {\n\t\t\t\t\tZ1K1: Constants.Z_REFERENCE,\n\t\t\t\t\tZ9K1: event.target.value\n\t\t\t\t},\n\t\t\t\tkey: Constants.Z_IMPLEMENTATION_FUNCTION,\n\t\t\t\tid: this.zobjectId,\n\t\t\t\tparent: this.getZObjectById( this.zobjectId ).parent\n\t\t\t} );\n\t\t},\n\t\tfindMissingZids: function ( zobject ) {\n\t\t\tvar zids = [],\n\t\t\t\tzIdRegex = new RegExp( /Z[1-9]\\d*/ );\n\n\t\t\tfor ( var key in zobject ) {\n\t\t\t\tif ( zIdRegex.test( key ) ) {\n\t\t\t\t\tzids.push( key );\n\t\t\t\t}\n\n\t\t\t\tif ( Array.isArray( zobject[ key ] ) ) {\n\t\t\t\t\tzids = zids.concat( zobject[ key ].map( this.findMissingZids ) );\n\t\t\t\t} else if ( typeof zobject[ key ] === 'object' ) {\n\t\t\t\t\tzids = zids.concat( this.findMissingZids( zobject[ key ] ) );\n\t\t\t\t} else {\n\t\t\t\t\tif ( zIdRegex.test( zobject[ key ] ) ) {\n\t\t\t\t\t\tzids.push( zobject[ key ] );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn zids;\n\t\t},\n\t\tremoveItem: function () {\n\n\t\t\tvar item = this.getZObjectById( this.zobjectId );\n\t\t\tthis.removeGenericTypeItem( item );\n\n\t\t}\n\t} )\n};\n</script>\n\n<style lang=\"less\">\n.ext-wikilambda-ZImplementationListItem {\n\tmargin-top: 1em;\n\tmargin-bottom: 1em;\n\n\t.ext-wikilambda-inline-list-item-title {\n\t\tdisplay: inline;\n\t}\n}\n</style>\n","usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/resources/ext.wikilambda.edit/components/function/ZInlineTesterCall.vue","messages":[{"ruleId":"vue/no-undef-components","severity":1,"message":"The '<wl-z-object-key>' component has been used, but not defined.","line":16,"column":4,"nodeType":"VStartTag","messageId":"undef","endLine":21,"endColumn":5}],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"<template>\n\t<!--\n\t\tWikiLambda Vue component for inline callers for ZTester objects.\n\n\t\t@copyright 2020– Abstract Wikipedia team; see AUTHORS.txt\n\t\t@license MIT\n\t-->\n\t<div class=\"ext-wikilambda-inline-tester-call\">\n\t\t<span v-for=\"argument in zFunctionArguments\" :key=\"argument.key\">\n\t\t\t{{ argument.label }}:\n\t\t\t<!--\n\t\t\t\tZInlineTesterCall -> ZObjectKey -> ZObject -> ZFunction -> ZTesterList ->\n\t\t\t\tZTesterAdHoc -> ZInlinetesterCall\n\t\t\t-->\n\t\t\t<!-- eslint-disable-next-line vue/no-unregistered-components -->\n\t\t\t<wl-z-object-key\n\t\t\t\t:zobject-id=\"findArgumentId( argument.key )\"\n\t\t\t\t:persistent=\"false\"\n\t\t\t\t:parent-type=\"Constants.Z_FUNCTION_CALL\"\n\t\t\t\t:z-key=\"argument.key\"\n\t\t\t></wl-z-object-key>\n\t\t</span>\n\t</div>\n</template>\n\n<script>\nvar ZFunctionCall = require( '../main-types/ZFunctionCall.vue' ),\n\tmapGetters = require( 'vuex' ).mapGetters;\n\n// @vue/component\nmodule.exports = exports = {\n\tname: 'wl-z-inline-tester-call',\n\textends: ZFunctionCall,\n\tprovide: function () {\n\t\treturn {\n\t\t\tviewmode: this.getViewMode\n\t\t};\n\t},\n\tcomputed: mapGetters( [ 'getViewMode' ] )\n};\n</script>\n\n<style lang=\"less\">\n.ext-wikilambda-inline-tester-call {\n\tdisplay: inline;\n}\n</style>\n","usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/resources/ext.wikilambda.edit/components/function/ZInlineTesterValidation.vue","messages":[{"ruleId":"vue/no-undef-components","severity":1,"message":"The '<wl-z-object-selector>' component has been used, but not defined.","line":9,"column":3,"nodeType":"VStartTag","messageId":"undef","endLine":15,"endColumn":4},{"ruleId":"vue/no-undef-components","severity":1,"message":"The '<wl-z-reference>' component has been used, but not defined.","line":25,"column":4,"nodeType":"VStartTag","messageId":"undef","endLine":29,"endColumn":5},{"ruleId":"vue/no-unregistered-components","severity":1,"message":"The \"wl-z-reference\" component has been used but not registered.","line":25,"column":4,"nodeType":"VElement","endLine":29,"endColumn":22},{"ruleId":"vue/no-undef-components","severity":1,"message":"The '<wl-z-object-key>' component has been used, but not defined.","line":37,"column":5,"nodeType":"VStartTag","messageId":"undef","endLine":42,"endColumn":6}],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":4,"fixableErrorCount":0,"fixableWarningCount":0,"source":"<template>\n\t<!--\n\t\tWikiLambda Vue component for the inline validation response of ZTester objects.\n\n\t\t@copyright 2020– Abstract Wikipedia team; see AUTHORS.txt\n\t\t@license MIT\n\t-->\n\t<div class=\"ext-wikilambda-inline-tester-validator\">\n\t\t<wl-z-object-selector\n\t\t\tv-if=\"!selectedFunction\"\n\t\t\t:type=\"Constants.Z_FUNCTION\"\n\t\t\t:placeholder=\"$i18n( 'wikilambda-function-typeselector-label' )\"\n\t\t\t:selected-id=\"zFunctionId\"\n\t\t\t@input=\"typeHandler\"\n\t\t></wl-z-object-selector>\n\t\t<template v-else>\n\t\t\t<cdx-button\n\t\t\t\tv-if=\"!viewmode\"\n\t\t\t\t:title=\"$i18n( 'wikilambda-editor-zobject-removekey-tooltip' ).text()\"\n\t\t\t\taction=\"destructive\"\n\t\t\t\t@click=\"typeHandler\"\n\t\t\t>\n\t\t\t\t{{ $i18n( 'wikilambda-editor-removeitem' ).text() }}\n\t\t\t</cdx-button>\n\t\t\t<wl-z-reference\n\t\t\t\t:zobject-key=\"selectedFunctionPersistentValue\"\n\t\t\t\tsearch-type=\"Z8\"\n\t\t\t\t:readonly=\"true\"\n\t\t\t></wl-z-reference>\n\t\t</template>\n\t\t<div class=\"ext-wikilambda-inline-tester-validator\">\n\t\t\t<span v-for=\"argument in zFunctionArguments.slice( 1 )\" :key=\"argument.key\">\n\t\t\t\t{{ argument.label }}:\n\t\t\t\t<!-- ZInlineTesterValidation -> ZObjectKey -> ZObject -> ZFunction -> ZTesterList ->\n\t\t\t\t\tZTesterAdHoc -> ZInlineTesterValidation -->\n\t\t\t\t<!-- eslint-disable-next-line vue/no-unregistered-components -->\n\t\t\t\t<wl-z-object-key\n\t\t\t\t\t:zobject-id=\"findArgumentId( argument.key )\"\n\t\t\t\t\t:persistent=\"false\"\n\t\t\t\t\t:parent-type=\"Constants.Z_FUNCTION_CALL\"\n\t\t\t\t\t:z-key=\"argument.key\"\n\t\t\t\t></wl-z-object-key>\n\t\t\t</span>\n\t\t</div>\n\t</div>\n</template>\n\n<script>\nvar Constants = require( '../../Constants.js' ),\n\tZFunctionCall = require( '../main-types/ZFunctionCall.vue' ),\n\tCdxButton = require( '@wikimedia/codex' ).CdxButton,\n\tmapGetters = require( 'vuex' ).mapGetters;\n\n// @vue/component\nmodule.exports = exports = {\n\tname: 'wl-z-inline-tester-validation',\n\tcomponents: {\n\t\t'cdx-button': CdxButton\n\t},\n\textends: ZFunctionCall,\n\tprovide: function () {\n\t\treturn {\n\t\t\tviewmode: this.getViewMode\n\t\t};\n\t},\n\tcomputed: $.extend( mapGetters( [ 'getViewMode' ] ), {\n\t\tfirstArgument: function () {\n\t\t\tif ( this.zFunctionArguments.length > 1 ) {\n\t\t\t\treturn this.zFunctionArguments[ 0 ];\n\t\t\t}\n\n\t\t\treturn false;\n\t\t}\n\t} ),\n\twatch: {\n\t\tfirstArgument: function () {\n\t\t\tif ( !this.firstArgument ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar firstArgumentId = this.findArgumentId( this.firstArgument.key ),\n\t\t\t\tzObject = this.getZObjectAsJsonById( firstArgumentId );\n\n\t\t\tif ( !zObject || zObject[ Constants.Z_REFERENCE_ID ] === Constants.Z_TESTER_CALL ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis.injectZObject( {\n\t\t\t\tzobject: {\n\t\t\t\t\tZ1K1: Constants.Z_REFERENCE,\n\t\t\t\t\tZ9K1: Constants.Z_TESTER_CALL\n\t\t\t\t},\n\t\t\t\tkey: this.firstArgument.key,\n\t\t\t\tid: firstArgumentId,\n\t\t\t\tparent: this.zobjectId\n\t\t\t} );\n\t\t}\n\t}\n};\n</script>\n\n<style lang=\"less\">\n.ext-wikilambda-inline-tester-validator {\n\tdisplay: inline;\n}\n</style>\n","usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/resources/ext.wikilambda.edit/components/function/ZLabelBlockAliases.vue","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/resources/ext.wikilambda.edit/components/function/ZTesterAdHoc.vue","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/resources/ext.wikilambda.edit/components/function/ZTesterImplResult.vue","messages":[{"ruleId":"vue/require-explicit-emits","severity":1,"message":"The \"set-keys\" event has been triggered but not declared on `emits` option.","line":91,"column":16,"nodeType":"Literal","messageId":"missing","endLine":91,"endColumn":26,"suggestions":[{"messageId":"addArrayEmitsOption","data":{"name":"set-keys","emitsKind":"`emits` option"},"fix":{"range":[1047,1047],"text":"\nemits: ['set-keys'],"},"desc":"Add the `emits` option with array syntax and define \"set-keys\" event."},{"messageId":"addObjectEmitsOption","data":{"name":"set-keys","emitsKind":"`emits` option"},"fix":{"range":[1047,1047],"text":"\nemits: {'set-keys': null},"},"desc":"Add the `emits` option with object syntax and define \"set-keys\" event."}]}],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"<template>\n\t<!--\n\t\tWikiLambda Vue component for displaying and triggering the result of a tester against a given implementation.\n\n\t\t@copyright 2020– Abstract Wikipedia team; see AUTHORS.txt\n\t\t@license MIT\n\t-->\n\t<div class=\"ext-wikilambda-tester-result\">\n\t\t<cdx-icon\n\t\t\t:icon=\"statusIcon\"\n\t\t\t:class=\"statusIconClass\"\n\t\t></cdx-icon>\n\t\t{{ status }}\n\t\t<cdx-icon\n\t\t\tv-if=\"testerStatus !== undefined\"\n\t\t\t:icon=\"messageIcon\"\n\t\t\tclass=\"ext-wikilambda-tester-result-message-icon\"\n\t\t\t@click.stop=\"emitTesterKeys\"\n\t\t></cdx-icon>\n\t</div>\n</template>\n\n<script>\nvar mapGetters = require( 'vuex' ).mapGetters,\n\ttypeUtils = require( '../../mixins/typeUtils.js' ),\n\tCdxIcon = require( '@wikimedia/codex' ).CdxIcon,\n\ticons = require( '../../../../lib/icons.json' );\n// @vue/component\nmodule.exports = exports = {\n\tcomponents: {\n\t\t'cdx-icon': CdxIcon\n\t},\n\tmixins: [ typeUtils ],\n\tprops: {\n\t\tzFunctionId: {\n\t\t\ttype: String,\n\t\t\trequired: true\n\t\t},\n\t\tzImplementationId: {\n\t\t\ttype: String,\n\t\t\trequired: true\n\t\t},\n\t\tzTesterId: {\n\t\t\ttype: String,\n\t\t\trequired: true\n\t\t}\n\t},\n\tcomputed: $.extend( mapGetters( [\n\t\t'getZTesterResults'\n\t] ), {\n\t\ttesterStatus: function () {\n\t\t\treturn this.getZTesterResults( this.zFunctionId, this.zTesterId, this.zImplementationId );\n\t\t},\n\t\tstatus: function () {\n\t\t\tif ( !( this.zImplementationId ) || !( this.zTesterId ) ) {\n\t\t\t\treturn this.$i18n( 'wikilambda-tester-status-pending' ).text();\n\t\t\t}\n\t\t\tif ( this.testerStatus === true ) {\n\t\t\t\treturn this.$i18n( 'wikilambda-tester-status-passed' ).text();\n\t\t\t}\n\t\t\tif ( this.testerStatus === false ) {\n\t\t\t\treturn this.$i18n( 'wikilambda-tester-status-failed' ).text();\n\t\t\t}\n\t\t\treturn this.$i18n( 'wikilambda-tester-status-running' ).text();\n\t\t},\n\t\tstatusIcon: function () {\n\t\t\tif ( this.testerStatus === true ) {\n\t\t\t\treturn icons.cdxIconCheck;\n\t\t\t}\n\t\t\tif ( this.testerStatus === false ) {\n\t\t\t\treturn icons.cdxIconClose;\n\t\t\t}\n\t\t\t// This will be used both for pending and running statuses\n\t\t\treturn icons.cdxIconAlert;\n\t\t},\n\t\tstatusIconClass: function () {\n\t\t\tif ( this.testerStatus === true ) {\n\t\t\t\treturn 'ext-wikilambda-tester-result-status--PASS';\n\t\t\t}\n\t\t\tif ( this.testerStatus === false ) {\n\t\t\t\treturn 'ext-wikilambda-tester-result-status--FAIL';\n\t\t\t}\n\t\t\treturn 'ext-wikilambda-tester-result-status--RUNNING';\n\t\t},\n\t\tmessageIcon: function () {\n\t\t\treturn icons.cdxIconInfo;\n\t\t}\n\t} ),\n\tmethods: {\n\t\temitTesterKeys: function () {\n\t\t\tthis.$emit( 'set-keys', {\n\t\t\t\tzImplementationId: this.zImplementationId,\n\t\t\t\tzTesterId: this.zTesterId\n\t\t\t} );\n\t\t}\n\t}\n};\n</script>\n\n<style lang=\"less\">\n@import '../../ext.wikilambda.edit.less';\n\n.ext-wikilambda-tester-result {\n\t&-message-icon {\n\t\tcursor: pointer;\n\t}\n\n\t&-status {\n\t\t&--PASS {\n\t\t\tcolor: @color-success;\n\t\t}\n\n\t\t&--FAIL {\n\t\t\tcolor: @color-error;\n\t\t}\n\n\t\t&--RUNNING {\n\t\t\tcolor: @color-warning;\n\t\t}\n\t}\n}\n\n</style>\n","usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/resources/ext.wikilambda.edit/components/function/ZTesterList.vue","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/resources/ext.wikilambda.edit/components/function/ZTesterListItem.vue","messages":[{"ruleId":"vue/require-explicit-emits","severity":1,"message":"The \"remove-item\" event has been triggered but not declared on `emits` option.","line":14,"column":19,"nodeType":"Literal","messageId":"missing","endLine":14,"endColumn":32,"suggestions":[{"messageId":"addArrayEmitsOption","data":{"name":"remove-item","emitsKind":"`emits` option"},"fix":{"range":[1424,1424],"text":"\nemits: ['remove-item'],"},"desc":"Add the `emits` option with array syntax and define \"remove-item\" event."},{"messageId":"addObjectEmitsOption","data":{"name":"remove-item","emitsKind":"`emits` option"},"fix":{"range":[1424,1424],"text":"\nemits: {'remove-item': null},"},"desc":"Add the `emits` option with object syntax and define \"remove-item\" event."}]}],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"<template>\n\t<!--\n\t\tWikiLambda Vue component for ZObject references to ZTesters in ZLists.\n\n\t\t@copyright 2020– Abstract Wikipedia team; see AUTHORS.txt\n\t\t@license MIT\n\t-->\n\t<li class=\"ext-wikilambda-zlistItem\">\n\t\t<cdx-button\n\t\t\tv-if=\"!( getViewMode || readonly )\"\n\t\t\tclass=\"z-list-item-remove\"\n\t\t\taction=\"destructive\"\n\t\t\t:title=\"tooltipRemoveListItem\"\n\t\t\t@click=\"$emit( 'remove-item', zobjectId )\"\n\t\t>\n\t\t\t{{ $i18n( 'wikilambda-editor-removeitem' ).text() }}\n\t\t</cdx-button>\n\t\t<select v-if=\"!hasReference\" @change=\"selectTester\">\n\t\t\t<option disabled selected>\n\t\t\t\t{{ $i18n( \"wikilambda-tester-selector\" ).text() }}\n\t\t\t</option>\n\t\t\t<option\n\t\t\t\tv-for=\"zTesterId in getUnattachedZTesters\"\n\t\t\t\t:key=\"zTesterId\"\n\t\t\t\t:value=\"zTesterId\"\n\t\t\t>\n\t\t\t\t{{ getZkeyLabels[ zTesterId ] }}\n\t\t\t</option>\n\t\t</select>\n\t\t<wl-z-reference\n\t\t\tv-else\n\t\t\t:zobject-id=\"zobjectId\"\n\t\t\t:search-type=\"zType\"\n\t\t\t:readonly=\"true\"\n\t\t></wl-z-reference>\n\t</li>\n</template>\n\n<script>\nvar Constants = require( '../../Constants.js' ),\n\tZListItem = require( '../main-types/ZListItem.vue' ),\n\tZReference = require( '../main-types/ZReference.vue' ),\n\tCdxButton = require( '@wikimedia/codex' ).CdxButton,\n\tmapGetters = require( 'vuex' ).mapGetters,\n\tmapActions = require( 'vuex' ).mapActions;\n\n// @vue/component\nmodule.exports = exports = {\n\tname: 'wl-z-tester-list-item',\n\tcomponents: {\n\t\t'wl-z-reference': ZReference,\n\t\t'cdx-button': CdxButton\n\t},\n\textends: ZListItem,\n\tcomputed: $.extend( mapGetters( [\n\t\t'getZObjectById',\n\t\t'getUnattachedZTesters',\n\t\t'getZkeyLabels',\n\t\t'getZTesterResults',\n\t\t'getViewMode'\n\t] ),\n\t{\n\t\treferenceValue: function () {\n\t\t\treturn this.findKeyInArray( Constants.Z_REFERENCE_ID, this.zobject ).value;\n\t\t},\n\t\thasReference: function () {\n\t\t\treturn !!this.referenceValue;\n\t\t},\n\t\ttesterStatus: function () {\n\t\t\treturn this.getZTesterResults[ this.referenceValue ];\n\t\t}\n\t}\n\t),\n\tmethods: $.extend( mapActions( [ 'performTest', 'fetchZKeys' ] ), {\n\t\tselectTester: function ( event ) {\n\t\t\tthis.$store.dispatch( 'injectZObject', {\n\t\t\t\tzobject: {\n\t\t\t\t\tZ1K1: Constants.Z_REFERENCE,\n\t\t\t\t\tZ9K1: event.target.value\n\t\t\t\t},\n\t\t\t\tkey: Constants.Z_IMPLEMENTATION_FUNCTION,\n\t\t\t\tid: this.zobjectId,\n\t\t\t\tparent: this.getZObjectById( this.zobjectId ).parent\n\t\t\t} );\n\t\t}\n\t} )\n};\n</script>\n","usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/resources/ext.wikilambda.edit/components/function/editor/FunctionEditorAliases.vue","messages":[{"ruleId":"vue/require-explicit-emits","severity":1,"message":"The \"updated-alias\" event has been triggered but not declared on `emits` option.","line":211,"column":17,"nodeType":"Literal","messageId":"missing","endLine":211,"endColumn":32,"suggestions":[{"messageId":"addArrayEmitsOption","data":{"name":"updated-alias","emitsKind":"`emits` option"},"fix":{"range":[2114,2114],"text":"\nemits: ['updated-alias'],"},"desc":"Add the `emits` option with array syntax and define \"updated-alias\" event."},{"messageId":"addObjectEmitsOption","data":{"name":"updated-alias","emitsKind":"`emits` option"},"fix":{"range":[2114,2114],"text":"\nemits: {'updated-alias': null},"},"desc":"Add the `emits` option with object syntax and define \"updated-alias\" event."}]},{"ruleId":"vue/require-explicit-emits","severity":1,"message":"The \"updated-alias\" event has been triggered but not declared on `emits` option.","line":220,"column":17,"nodeType":"Literal","messageId":"missing","endLine":220,"endColumn":32,"suggestions":[{"messageId":"addArrayEmitsOption","data":{"name":"updated-alias","emitsKind":"`emits` option"},"fix":{"range":[2114,2114],"text":"\nemits: ['updated-alias'],"},"desc":"Add the `emits` option with array syntax and define \"updated-alias\" event."},{"messageId":"addObjectEmitsOption","data":{"name":"updated-alias","emitsKind":"`emits` option"},"fix":{"range":[2114,2114],"text":"\nemits: {'updated-alias': null},"},"desc":"Add the `emits` option with object syntax and define \"updated-alias\" event."}]},{"ruleId":"vue/require-explicit-emits","severity":1,"message":"The \"updated-alias\" event has been triggered but not declared on `emits` option.","line":229,"column":17,"nodeType":"Literal","messageId":"missing","endLine":229,"endColumn":32,"suggestions":[{"messageId":"addArrayEmitsOption","data":{"name":"updated-alias","emitsKind":"`emits` option"},"fix":{"range":[2114,2114],"text":"\nemits: ['updated-alias'],"},"desc":"Add the `emits` option with array syntax and define \"updated-alias\" event."},{"messageId":"addObjectEmitsOption","data":{"name":"updated-alias","emitsKind":"`emits` option"},"fix":{"range":[2114,2114],"text":"\nemits: {'updated-alias': null},"},"desc":"Add the `emits` option with object syntax and define \"updated-alias\" event."}]}],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":3,"fixableErrorCount":0,"fixableWarningCount":0,"source":"<template>\n\t<!--\n\t\tWikiLambda Vue component for setting the aliases of a ZFunction in the Function editor.\n\n\t\t@copyright 2020– Abstract Wikipedia team; see AUTHORS.txt\n\t\t@license MIT\n\t-->\n\t<div class=\"ext-wikilambda-function-definition-aliases\">\n\t\t<div class=\"ext-wikilambda-function-definition-aliases__label\">\n\t\t\t<label\n\t\t\t\tid=\"ext-wikilambda-function-definition-aliases__inputs-label\"\n\t\t\t\tclass=\"ext-wikilambda-app__text-regular\"\n\t\t\t>\n\t\t\t\t{{ $i18n( 'wikilambda-function-definition-alias-label' ).text() }}\n\t\t\t\t<span>({{ $i18n( 'wikilambda-optional' ).text() }})</span>\n\t\t\t</label>\n\t\t\t<span class=\"ext-wikilambda-function-definition-aliases__description\">\n\t\t\t\t{{ $i18n( 'wikilambda-function-definition-alias-description' ).text() }}\n\t\t\t</span>\n\t\t</div>\n\t\t<div\n\t\t\tclass=\"ext-wikilambda-function-definition-aliases__inputs\"\n\t\t\taria-labelledby=\"ext-wikilambda-function-definition-aliases__inputs-label\">\n\t\t\t<wl-chips-container\n\t\t\t\t:chips=\"getCurrentLanguageAliases\"\n\t\t\t\t:input-placeholder=\"functionDefinitionAliasPlaceholder\"\n\t\t\t\t:input-aria-label=\"$i18n( 'wikilambda-function-definition-alias-label-new' )\"\n\t\t\t\t@add-chip=\"addAliasForLanguage\"\n\t\t\t\t@edit-chip=\"updateAlias\"\n\t\t\t\t@remove-chip=\"removeAlias\"\n\t\t\t></wl-chips-container>\n\t\t\t<p\n\t\t\t\tv-if=\"repeatAlias\"\n\t\t\t\tclass=\"ext-wikilambda-function-definition-aliases__error\"\n\t\t\t>\n\t\t\t\t{{ $i18n( \"wikilambda-metadata-duplicate-alias-error\", repeatAlias ) }}\n\t\t\t</p>\n\t\t</div>\n\t</div>\n</template>\n\n<script>\nvar Constants = require( '../../../Constants.js' ),\n\tmapGetters = require( 'vuex' ).mapGetters,\n\ttypeUtils = require( '../../../mixins/typeUtils.js' ),\n\tmapActions = require( 'vuex' ).mapActions,\n\tChipContainer = require( '../../base/ChipContainer.vue' );\n\n// @vue/component\nmodule.exports = exports = {\n\tname: 'wl-function-definition-aliases',\n\tcomponents: {\n\t\t// TODO: replace with codex filter chip when available\n\t\t'wl-chips-container': ChipContainer\n\t},\n\tmixins: [ typeUtils ],\n\tprops: {\n\t\tzobjectId: {\n\t\t\ttype: Number,\n\t\t\tdefault: 0\n\t\t},\n\t\t/**\n\t\t * zID of item label language\n\t\t *\n\t\t * @example Z1014\n\t\t */\n\t\tzLang: {\n\t\t\ttype: String,\n\t\t\trequired: true\n\t\t}\n\t},\n\tdata: function () {\n\t\treturn {\n\t\t\trepeatAlias: null\n\t\t};\n\t},\n\tcomputed: $.extend(\n\t\tmapGetters( [\n\t\t\t'getAllItemsFromListById',\n\t\t\t'getZObjectChildrenById',\n\t\t\t'getNestedZObjectById',\n\t\t\t'getNextObjectId',\n\t\t\t'getCurrentZLanguage',\n\t\t\t'getZObjectById'\n\t\t] ),\n\t\t{\n\t\t\tzMultilingualStringsetValueId: function () {\n\t\t\t\treturn this.getNestedZObjectById( this.zobjectId, [\n\t\t\t\t\tConstants.Z_PERSISTENTOBJECT_ALIASES,\n\t\t\t\t\tConstants.Z_MULTILINGUALSTRINGSET_VALUE\n\t\t\t\t] ).id;\n\t\t\t},\n\t\t\tgetZObjectAliases: function () {\n\t\t\t\treturn this.getAllItemsFromListById( this.zMultilingualStringsetValueId );\n\t\t\t},\n\t\t\tgetZObjectAliasObject: function () {\n\t\t\t\treturn this.getZObjectAliases.map(\n\t\t\t\t\tfunction ( alias ) {\n\t\t\t\t\t\treturn this.getZObjectChildrenById( alias.id );\n\t\t\t\t\t}.bind( this )\n\t\t\t\t);\n\t\t\t},\n\t\t\tgetCurrentLanguageAliases: function () {\n\t\t\t\tvar lang = this.zLang;\n\t\t\t\tfor ( var index in this.getZObjectAliasObject ) {\n\t\t\t\t\tvar alias = this.getZObjectAliasObject[ index ],\n\t\t\t\t\t\tlanguage = this.getNestedZObjectById(\n\t\t\t\t\t\t\tthis.findKeyInArray( Constants.Z_MONOLINGUALSTRINGSET_LANGUAGE, alias ).id,\n\t\t\t\t\t\t\t[ Constants.Z_REFERENCE_ID ]\n\t\t\t\t\t\t);\n\n\t\t\t\t\tif ( language.value === lang ) {\n\t\t\t\t\t\treturn this.getAllItemsFromListById(\n\t\t\t\t\t\t\tthis.findKeyInArray( Constants.Z_MONOLINGUALSTRINGSET_VALUE, alias ).id\n\t\t\t\t\t\t).map( function ( aliasString ) {\n\t\t\t\t\t\t\treturn this.getNestedZObjectById( aliasString.id, [\n\t\t\t\t\t\t\t\tConstants.Z_STRING_VALUE\n\t\t\t\t\t\t\t] );\n\t\t\t\t\t\t}.bind( this ) );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn [];\n\t\t\t},\n\t\t\tfunctionDefinitionAliasPlaceholder: function () {\n\t\t\t\tif (\n\t\t\t\t\tthis.getCurrentLanguageAliases.length > 0 &&\n\t\t\t\t\t!this.getCurrentLanguageAliases[ 0 ] === false\n\t\t\t\t) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t\treturn this.$i18n( 'wikilambda-function-definition-alias-placeholder' ).text();\n\t\t\t}\n\t\t}\n\t),\n\tmethods: $.extend(\n\t\tmapActions( [\n\t\t\t'setZObjectValue',\n\t\t\t'addZObject',\n\t\t\t'addZString',\n\t\t\t'injectZObject',\n\t\t\t'removeZObjectChildren',\n\t\t\t'removeZObject',\n\t\t\t'recalculateZListIndex'\n\t\t] ),\n\t\t{\n\t\t\tgetLanguageAliasStringsetId: function ( language ) {\n\t\t\t\tconst aliasFound = this.getZObjectAliases.find( ( alias ) => {\n\t\t\t\t\tconst aliasLang = this.getNestedZObjectById( alias.id, [\n\t\t\t\t\t\tConstants.Z_MONOLINGUALSTRINGSET_LANGUAGE,\n\t\t\t\t\t\tConstants.Z_REFERENCE_ID\n\t\t\t\t\t] );\n\t\t\t\t\treturn aliasLang.value === language;\n\t\t\t\t} );\n\n\t\t\t\treturn aliasFound && ( this.getNestedZObjectById( aliasFound.id, [\n\t\t\t\t\tConstants.Z_MONOLINGUALSTRINGSET_VALUE\n\t\t\t\t] ).id );\n\t\t\t},\n\t\t\taddAliasForLanguage: function ( newAlias ) {\n\t\t\t\t// show an error message if a user enters a duplicate alias\n\t\t\t\t// TODO (T317990): should duplication be case sensitive?\n\t\t\t\tif ( this.getCurrentLanguageAliases.some( ( alias ) => alias.value === newAlias ) ) {\n\t\t\t\t\tthis.repeatAlias = newAlias;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t// clear the error message\n\t\t\t\tthis.clearAliasError();\n\n\t\t\t\tvar language = this.zLang;\n\n\t\t\t\tvar existingAliasId = this.getLanguageAliasStringsetId( language ),\n\t\t\t\t\tnextId = this.getNextObjectId,\n\t\t\t\t\tpayload;\n\n\t\t\t\tif ( existingAliasId ) {\n\t\t\t\t\tpayload = {\n\t\t\t\t\t\tkey: ( this.getAllItemsFromListById( existingAliasId ).length + 1 ).toString(),\n\t\t\t\t\t\tvalue: newAlias,\n\t\t\t\t\t\tparent: existingAliasId\n\t\t\t\t\t};\n\n\t\t\t\t\tthis.addZObject( payload );\n\t\t\t\t\tthis.addZString( {\n\t\t\t\t\t\tid: nextId,\n\t\t\t\t\t\tvalue: newAlias\n\t\t\t\t\t} );\n\t\t\t\t} else {\n\t\t\t\t\t// If the monolingualStringSet for the given language does not exist,\n\t\t\t\t\t// create a monolingualStringSet object with an empty array of strings\n\t\t\t\t\t// and add it to the list.\n\t\t\t\t\tconst nextIndexAliases = this.getZObjectAliases.length + 1;\n\n\t\t\t\t\tpayload = {\n\t\t\t\t\t\tkey: nextIndexAliases.toString(),\n\t\t\t\t\t\tvalue: 'object',\n\t\t\t\t\t\tparent: this.zMultilingualStringsetValueId\n\t\t\t\t\t};\n\n\t\t\t\t\tthis.addZObject( payload );\n\t\t\t\t\tthis.injectZObject( {\n\t\t\t\t\t\tzobject: {\n\t\t\t\t\t\t\tZ1K1: Constants.Z_MONOLINGUALSTRINGSET,\n\t\t\t\t\t\t\tZ31K1: language,\n\t\t\t\t\t\t\tZ31K2: [ Constants.Z_STRING, newAlias ]\n\t\t\t\t\t\t},\n\t\t\t\t\t\tkey: nextIndexAliases.toString(),\n\t\t\t\t\t\tid: nextId,\n\t\t\t\t\t\tparent: this.zMultilingualStringsetValueId\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t\tthis.$emit( 'updated-alias' );\n\t\t\t},\n\t\t\tupdateAlias: function ( aliasStringValueId, value ) {\n\t\t\t\tthis.clearAliasError();\n\t\t\t\tvar payload = {\n\t\t\t\t\tid: aliasStringValueId,\n\t\t\t\t\tvalue: value\n\t\t\t\t};\n\t\t\t\tthis.setZObjectValue( payload );\n\t\t\t\tthis.$emit( 'updated-alias' );\n\t\t\t},\n\t\t\tremoveAlias: function ( aliasStringValueId ) {\n\t\t\t\tthis.clearAliasError();\n\t\t\t\tconst aliasStringObject = this.getZObjectById( this.getZObjectById( aliasStringValueId ).parent );\n\t\t\t\tconst aliasStringSetId = aliasStringObject.parent;\n\t\t\t\tthis.removeZObjectChildren( aliasStringObject.id );\n\t\t\t\tthis.removeZObject( aliasStringObject.id );\n\t\t\t\tthis.recalculateZListIndex( aliasStringSetId );\n\t\t\t\tthis.$emit( 'updated-alias' );\n\t\t\t},\n\t\t\tclearAliasError: function () {\n\t\t\t\tthis.repeatAlias = null;\n\t\t\t}\n\t\t}\n\t)\n};\n</script>\n\n<style lang=\"less\">\n@import '../../../ext.wikilambda.edit.less';\n\n.ext-wikilambda-function-definition-aliases {\n\tdisplay: flex;\n\tmargin-bottom: @spacing-150;\n\n\t&__error {\n\t\tcolor: @color-error;\n\t}\n\n\t&__label {\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t\twidth: @wl-field-label-width;\n\t\tmargin-right: @spacing-150;\n\n\t\t& > label {\n\t\t\tline-height: @size-200;\n\t\t\tfont-weight: @font-weight-bold;\n\n\t\t\t& > span {\n\t\t\t\tfont-weight: @font-weight-normal;\n\t\t\t}\n\t\t}\n\t}\n\n\t&__description {\n\t\topacity: 0.8;\n\t\tcolor: @color-subtle;\n\t\tfont-size: @wl-font-size-description;\n\t\tline-height: @wl-line-height-description;\n\t\tdisplay: inline-block;\n\t}\n\n\t/* MOBILE styles */\n\t@media screen and ( max-width: @width-breakpoint-tablet ) {\n\t\t& {\n\t\t\tflex-direction: column;\n\n\t\t\t&__inputs {\n\t\t\t\twidth: 100%;\n\t\t\t}\n\n\t\t\t&__label {\n\t\t\t\twidth: auto;\n\n\t\t\t\t& > label {\n\t\t\t\t\tline-height: inherit;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t&__description {\n\t\t\t\tfont-size: @wl-font-size-description-mobile;\n\t\t\t\tline-height: @wl-line-height-description-mobile;\n\t\t\t\tletter-spacing: @wl-letter-spacing-description-mobile;\n\t\t\t\tmargin-bottom: @spacing-50;\n\t\t\t}\n\t\t}\n\t}\n}\n</style>\n","usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/resources/ext.wikilambda.edit/components/function/editor/FunctionEditorDefinition.vue","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/resources/ext.wikilambda.edit/components/function/editor/FunctionEditorFooter.vue","messages":[{"ruleId":"vue/require-explicit-emits","severity":1,"message":"The \"cancel\" event has been triggered but not declared on `emits` option.","line":67,"column":17,"nodeType":"Literal","messageId":"missing","endLine":67,"endColumn":25,"suggestions":[{"messageId":"addArrayEmitsOption","data":{"name":"cancel","emitsKind":"`emits` option"},"fix":{"range":[1775,1775],"text":"\nemits: ['cancel'],"},"desc":"Add the `emits` option with array syntax and define \"cancel\" event."},{"messageId":"addObjectEmitsOption","data":{"name":"cancel","emitsKind":"`emits` option"},"fix":{"range":[1775,1775],"text":"\nemits: {'cancel': null},"},"desc":"Add the `emits` option with object syntax and define \"cancel\" event."}]}],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"<template>\n\t<!--\n\t\tWikiLambda Vue component footer for the Function Editor, including publish, cancel and implement buttons.\n\n\t\t@copyright 2020– Abstract Wikipedia team; see AUTHORS.txt\n\t\t@license MIT\n\t-->\n\t<div class=\"ext-wikilambda-function-definition-footer\">\n\t\t<div class=\"ext-wikilambda-function-definition-footer__actions\">\n\t\t\t<wl-z-object-publish\n\t\t\t\t:should-unattach-implementation-and-tester=\"shouldUnattachImplementationAndTester\"\n\t\t\t\t:is-disabled=\"publishDisabled\"\n\t\t\t></wl-z-object-publish>\n\t\t\t<!-- TODO: The following is just a placeholder until it is possible to attach implementation / Testers -->\n\t\t\t<cdx-button\n\t\t\t\tv-if=\"isEditing\"\n\t\t\t\tclass=\"ext-wikilambda-function-definition-footer__actions-button\"\n\t\t\t\t@click=\"handleFallbackClick\"\n\t\t\t>\n\t\t\t\t{{ $i18n( 'wikilambda-fallback' ).text() }}\n\t\t\t</cdx-button>\n\t\t\t<cdx-button\n\t\t\t\tid=\"ext-wikilambda-function-definition-footer__actions__cancel\"\n\t\t\t\tclass=\"ext-wikilambda-function-definition-footer__actions-button\"\n\t\t\t\taction=\"destructive\"\n\t\t\t\tweight=\"primary\"\n\t\t\t\t@click.stop=\"handleCancel\"\n\t\t\t>\n\t\t\t\t{{ $i18n( 'wikilambda-cancel' ).text() }}\n\t\t\t</cdx-button>\n\t\t</div>\n\t</div>\n</template>\n\n<script>\nvar Constants = require( '../../../Constants.js' ),\n\tZObjectPublish = require( '../../ZObjectPublish.vue' ),\n\tCdxButton = require( '@wikimedia/codex' ).CdxButton,\n\tmapActions = require( 'vuex' ).mapActions;\n\n// @vue/component\nmodule.exports = exports = {\n\tname: 'wl-function-definition-footer',\n\tcomponents: {\n\t\t'cdx-button': CdxButton,\n\t\t'wl-z-object-publish': ZObjectPublish\n\t},\n\tprops: {\n\t\tisEditing: {\n\t\t\ttype: Boolean\n\t\t},\n\t\tshouldUnattachImplementationAndTester: {\n\t\t\ttype: Boolean,\n\t\t\trequired: false,\n\t\t\tdefault: false\n\t\t},\n\t\tpublishDisabled: {\n\t\t\ttype: Boolean,\n\t\t\trequired: false,\n\t\t\tdefault: false\n\t\t}\n\t},\n\tmethods: $.extend( {},\n\t\tmapActions( 'router', [ 'navigate' ] ),\n\t\t{\n\t\t\thandleCancel: function () {\n\t\t\t\tthis.$emit( 'cancel' );\n\t\t\t},\n\t\t\thandleFallbackClick: function () {\n\t\t\t\tvar payload = {\n\t\t\t\t\tto: Constants.VIEWS.Z_OBJECT_EDITOR\n\t\t\t\t};\n\t\t\t\tthis.navigate( payload );\n\t\t\t}\n\t\t}\n\t)\n};\n\n</script>\n\n<style lang=\"less\">\n@import '../../../ext.wikilambda.edit.less';\n\n.ext-wikilambda-function-definition-footer {\n\tdisplay: flex;\n\tflex-direction: column;\n\tbackground-color: @background-color-interactive-subtle;\n\tpadding: @spacing-100;\n\tmargin-top: @spacing-150;\n\n\t&__actions {\n\t\tdisplay: flex;\n\n\t\t&-button {\n\t\t\tmargin-right: @spacing-100;\n\t\t\tcursor: pointer;\n\t\t}\n\t}\n}\n</style>\n","usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/resources/ext.wikilambda.edit/components/function/editor/FunctionEditorInputs.vue","messages":[{"ruleId":"vue/require-explicit-emits","severity":1,"message":"The \"updated-argument-label\" event has been triggered but not declared on `emits` option.","line":209,"column":16,"nodeType":"Literal","messageId":"missing","endLine":209,"endColumn":40,"suggestions":[{"messageId":"addArrayEmitsOption","data":{"name":"updated-argument-label","emitsKind":"`emits` option"},"fix":{"range":[3773,3773],"text":"\nemits: ['updated-argument-label'],"},"desc":"Add the `emits` option with array syntax and define \"updated-argument-label\" event."},{"messageId":"addObjectEmitsOption","data":{"name":"updated-argument-label","emitsKind":"`emits` option"},"fix":{"range":[3773,3773],"text":"\nemits: {'updated-argument-label': null},"},"desc":"Add the `emits` option with object syntax and define \"updated-argument-label\" event."}]}],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"<template>\n\t<!--\n\t\tWikiLambda Vue component for setting the inputs of a ZFunction in the Function editor.\n\n\t\t@copyright 2020– Abstract Wikipedia team; see AUTHORS.txt\n\t\t@license MIT\n\t-->\n\t<div class=\"ext-wikilambda-function-definition-inputs\" role=\"inputs-container\">\n\t\t<div\n\t\t\tv-if=\"!isMobile\"\n\t\t\t:id=\"'ext-wikilambda-function-definition-inputs__label_' + zLang\"\n\t\t\tclass=\"ext-wikilambda-function-definition-inputs__label\">\n\t\t\t<div class=\"ext-wikilambda-function-definition-inputs__label-block\">\n\t\t\t\t<label\n\t\t\t\t\tclass=\"ext-wikilambda-app__text-regular\"\n\t\t\t\t\taria-labelledby=\"wikilambda-function-definition-inputs-label\"\n\t\t\t\t>\n\t\t\t\t\t{{ $i18n( 'wikilambda-function-definition-inputs-label' ).text() }}\n\t\t\t\t\t<span>({{ $i18n( 'wikilambda-optional' ).text() }})</span>\n\t\t\t\t</label>\n\t\t\t\t<wl-tooltip\n\t\t\t\t\tv-if=\"tooltipMessage && !canEdit\"\n\t\t\t\t\t:content=\"tooltipMessage\"\n\t\t\t\t>\n\t\t\t\t\t<cdx-icon\n\t\t\t\t\t\tv-if=\"tooltipIcon\"\n\t\t\t\t\t\tclass=\"ext-wikilambda-function-definition-inputs__tooltip-icon\"\n\t\t\t\t\t\t:icon=\"tooltipIcon\">\n\t\t\t\t\t</cdx-icon>\n\t\t\t\t</wl-tooltip>\n\t\t\t</div>\n\t\t\t<span class=\"ext-wikilambda-function-definition-inputs__description\">\n\t\t\t\t{{ $i18n( 'wikilambda-function-definition-inputs-description' ).text() }}\n\t\t\t\t<a :href=\"getTypeUrl()\"> {{ $i18n( 'wikilambda-function-definition-input-types' ).text() }} </a>\n\t\t\t</span>\n\t\t</div>\n\t\t<div\n\t\t\t:aria-labelledby=\"'ext-wikilambda-function-definition-inputs__label_' + zLang\"\n\t\t\tclass=\"ext-wikilambda-function-definition-inputs__inputs\"\n\t\t\t:class=\"{ 'ext-wikilambda-function-definition-inputs__padded': isMainLanguageBlock }\"\n\t\t>\n\t\t\t<wl-function-editor-inputs-item\n\t\t\t\tv-for=\"( argument, index ) in zArgumentList\"\n\t\t\t\t:key=\"argument.id\"\n\t\t\t\t:index=\"index\"\n\t\t\t\tclass=\"ext-wikilambda-function-definition-inputs__row\"\n\t\t\t\t:z-lang=\"zLang\"\n\t\t\t\t:zobject-id=\"argument.id\"\n\t\t\t\t:can-edit-type=\"canEditType\"\n\t\t\t\t:is-mobile=\"isMobile\"\n\t\t\t\t:is-active=\"activeInputIndex === index\"\n\t\t\t\t:is-main-language-block=\"isMainLanguageBlock\"\n\t\t\t\t:show-index=\"zArgumentList.length > 1\"\n\t\t\t\t@update-argument-label=\"updateArgumentLabel\"\n\t\t\t\t@active-input=\"setActiveInput\"\n\t\t\t></wl-function-editor-inputs-item>\n\t\t\t<cdx-button\n\t\t\t\tv-if=\"canEdit\"\n\t\t\t\t:class=\"addInputButtonClass\"\n\t\t\t\t@click=\"addNewItem\"\n\t\t\t>\n\t\t\t\t<cdx-icon :icon=\"icons.cdxIconAdd\"></cdx-icon>\n\t\t\t\t{{ addNewItemText }}\n\t\t\t</cdx-button>\n\t\t</div>\n\t</div>\n</template>\n\n<script>\nvar Constants = require( '../../../Constants.js' ),\n\tmapGetters = require( 'vuex' ).mapGetters,\n\tFunctionEditorInputsItem = require( './FunctionEditorInputsItem.vue' ),\n\ttypeUtils = require( '../../../mixins/typeUtils.js' ),\n\tTooltip = require( '../../base/Tooltip.vue' ),\n\tCdxButton = require( '@wikimedia/codex' ).CdxButton,\n\tCdxIcon = require( '@wikimedia/codex' ).CdxIcon,\n\ticons = require( './../../../../lib/icons.json' ),\n\tmapActions = require( 'vuex' ).mapActions;\n\n// @vue/component\nmodule.exports = exports = {\n\tname: 'wl-function-editor-inputs',\n\tcomponents: {\n\t\t'wl-function-editor-inputs-item': FunctionEditorInputsItem,\n\t\t'wl-tooltip': Tooltip,\n\t\t'cdx-button': CdxButton,\n\t\t'cdx-icon': CdxIcon\n\t},\n\tmixins: [ typeUtils ],\n\tprops: {\n\t\tzobjectId: {\n\t\t\ttype: Number,\n\t\t\tdefault: 0\n\t\t},\n\t\tisMainLanguageBlock: {\n\t\t\ttype: Boolean\n\t\t},\n\t\t/**\n\t\t * zID of item label language\n\t\t *\n\t\t * @example Z1014\n\t\t *\n\t\t */\n\t\tzLang: {\n\t\t\ttype: String,\n\t\t\tdefault: ''\n\t\t},\n\t\t/**\n\t\t * icon that will display a tooltip\n\t\t */\n\t\ttooltipIcon: {\n\t\t\ttype: [ String, Object ],\n\t\t\tdefault: null,\n\t\t\trequired: false\n\t\t},\n\t\t/**\n\t\t * if a user has permission to edit a function\n\t\t */\n\t\tcanEdit: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false\n\t\t},\n\t\t/**\n\t\t * message the tooltip displays\n\t\t */\n\t\ttooltipMessage: {\n\t\t\ttype: String,\n\t\t\tdefault: null\n\t\t},\n\t\t/**\n\t\t * device screensize is mobile\n\t\t */\n\t\tisMobile: {\n\t\t\ttype: Boolean,\n\t\t\trequired: true\n\t\t}\n\t},\n\tdata: function () {\n\t\treturn {\n\t\t\ticons: icons,\n\t\t\tactiveInputIndex: this.isMainLanguageBlock ? 0 : -1\n\t\t};\n\t},\n\tcomputed: $.extend( mapGetters( [\n\t\t'getZObject',\n\t\t'getNextObjectId',\n\t\t'getAllItemsFromListById',\n\t\t'getNestedZObjectById'\n\t] ), {\n\t\tzFunctionId: function () {\n\t\t\treturn this.getNestedZObjectById( this.zobjectId, [\n\t\t\t\tConstants.Z_PERSISTENTOBJECT_VALUE,\n\t\t\t\tConstants.Z_FUNCTION_IDENTITY,\n\t\t\t\tConstants.Z_REFERENCE_ID\n\t\t\t] ).value;\n\t\t},\n\t\tzArgumentId: function () {\n\t\t\treturn this.getNestedZObjectById( this.zobjectId, [\n\t\t\t\tConstants.Z_PERSISTENTOBJECT_VALUE,\n\t\t\t\tConstants.Z_FUNCTION_ARGUMENTS\n\t\t\t] ).id || Constants.NEW_ZID_PLACEHOLDER;\n\t\t},\n\t\tzArgumentList: function () {\n\t\t\treturn this.getAllItemsFromListById( this.zArgumentId );\n\t\t},\n\t\tcanEditType: function () {\n\t\t\treturn this.canEdit && this.isMainLanguageBlock;\n\t\t},\n\t\taddNewItemText: function () {\n\t\t\treturn this.zArgumentList.length === 0 ?\n\t\t\t\tthis.$i18n( 'wikilambda-function-definition-inputs-item-add-first-input-button' ).text() :\n\t\t\t\tthis.$i18n( 'wikilambda-function-definition-inputs-item-add-input-button' ).text();\n\t\t},\n\t\taddInputButtonClass: function () {\n\t\t\treturn this.zArgumentList.length === 0 ?\n\t\t\t\t'ext-wikilambda-function-definition-inputs__add-input-button' :\n\t\t\t\t'ext-wikilambda-function-definition-inputs__add-another-input-button';\n\t\t}\n\t} ),\n\tmethods: $.extend( mapActions( [\n\t\t'addZObject',\n\t\t'addZArgument',\n\t\t'setAvailableZArguments'\n\t] ), {\n\t\taddNewItem: function ( /* event */ ) {\n\t\t\tvar nextId = this.getNextObjectId,\n\t\t\t\tpayload = {\n\t\t\t\t\t// since first item is type, new key is argmentList + 1\n\t\t\t\t\tkey: `${this.zArgumentList.length + 1}`,\n\t\t\t\t\tvalue: 'object',\n\t\t\t\t\tparent: this.zArgumentId\n\t\t\t\t};\n\n\t\t\tthis.addZObject( payload );\n\n\t\t\tvar argumentPayload = {\n\t\t\t\tid: nextId,\n\t\t\t\tlang: this.zLang\n\t\t\t};\n\t\t\tthis.addZArgument( argumentPayload );\n\t\t\tthis.setActiveInput( this.zArgumentList.length - 1 );\n\t\t},\n\t\t// We need this function otherwise the build will fail\n\t\tshowAddNewInput: function ( isMainLanguageBlock, index ) {\n\t\t\treturn isMainLanguageBlock && index === this.zArgumentList.length - 1;\n\t\t},\n\t\tupdateArgumentLabel: function () {\n\t\t\tthis.setAvailableZArguments( this.zFunctionId );\n\t\t\tthis.$emit( 'updated-argument-label' );\n\t\t},\n\t\tsetActiveInput: function ( index ) {\n\t\t\tthis.activeInputIndex = index;\n\t\t},\n\t\tgetTypeUrl: function () {\n\t\t\treturn new mw.Title( Constants.PATHS.LIST_ZOBJECTS_BY_TYPE_TYPE ).getUrl();\n\t\t}\n\t} ),\n\twatch: {\n\t\tzArgumentList: function () {\n\t\t\tthis.setAvailableZArguments( this.zFunctionId );\n\t\t}\n\t},\n\tmounted: function () {\n\t\tthis.setAvailableZArguments( this.zFunctionId );\n\t}\n};\n</script>\n\n<style lang=\"less\">\n@import '../../../ext.wikilambda.edit.less';\n\n.ext-wikilambda-function-definition-inputs {\n\tdisplay: flex;\n\tmargin-bottom: @spacing-150;\n\n\t&__label-block {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\n\t\t& > label {\n\t\t\tline-height: @spacing-200;\n\t\t\tfont-weight: @font-weight-bold;\n\n\t\t\t& > span {\n\t\t\t\tfont-weight: @font-weight-normal;\n\t\t\t}\n\t\t}\n\t}\n\n\t&__label {\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t\twidth: @wl-field-label-width;\n\t\tmargin-right: @spacing-150;\n\t}\n\n\t& > div:first-of-type {\n\t\twidth: @wl-field-label-width;\n\t\tflex-direction: column;\n\t}\n\n\t&__tooltip-icon {\n\t\tmargin-left: @spacing-50;\n\t\twidth: @size-100;\n\t\theight: @size-100;\n\t}\n\n\t&__description {\n\t\topacity: 0.8;\n\t\tcolor: @color-subtle;\n\t\tfont-size: @wl-font-size-description;\n\t\tline-height: @wl-line-height-description;\n\t\tdisplay: inline-block;\n\t}\n\n\t&__row {\n\t\tdisplay: flex;\n\t\tgap: @spacing-50;\n\t}\n\n\t/* DESKTOP styles */\n\t@media screen and ( min-width: @width-breakpoint-tablet ) {\n\t\t&__row:last-of-type {\n\t\t\tmargin-bottom: @spacing-50;\n\t\t}\n\n\t\t&__row:first-of-type {\n\t\t\t.ext-wikilambda-editor-input-list-item__header__action-delete {\n\t\t\t\tmargin-top: @spacing-200;\n\t\t\t}\n\t\t}\n\t}\n\n\t/* MOBILE styles */\n\t@media screen and ( max-width: @width-breakpoint-tablet ) {\n\t\tdisplay: block;\n\n\t\t&__row {\n\t\t\tdisplay: block;\n\t\t}\n\n\t\t&__label {\n\t\t\t& > label {\n\t\t\t\tline-height: inherit;\n\t\t\t}\n\t\t}\n\n\t\t&__description {\n\t\t\tmargin-bottom: @spacing-50;\n\t\t}\n\n\t\t& > div:first-of-type {\n\t\t\twidth: auto;\n\t\t}\n\t}\n}\n</style>\n","usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/resources/ext.wikilambda.edit/components/function/editor/FunctionEditorInputsItem.vue","messages":[{"ruleId":"vue/require-explicit-emits","severity":1,"message":"The \"update-argument-label\" event has been triggered but not declared on `emits` option.","line":277,"column":18,"nodeType":"Literal","messageId":"missing","endLine":277,"endColumn":41,"suggestions":[{"messageId":"addArrayEmitsOption","data":{"name":"update-argument-label","emitsKind":"`emits` option"},"fix":{"range":[5810,5810],"text":"\nemits: ['update-argument-label'],"},"desc":"Add the `emits` option with array syntax and define \"update-argument-label\" event."},{"messageId":"addObjectEmitsOption","data":{"name":"update-argument-label","emitsKind":"`emits` option"},"fix":{"range":[5810,5810],"text":"\nemits: {'update-argument-label': null},"},"desc":"Add the `emits` option with object syntax and define \"update-argument-label\" event."}]},{"ruleId":"vue/require-explicit-emits","severity":1,"message":"The \"active-input\" event has been triggered but not declared on `emits` option.","line":315,"column":16,"nodeType":"Literal","messageId":"missing","endLine":315,"endColumn":30,"suggestions":[{"messageId":"addArrayEmitsOption","data":{"name":"active-input","emitsKind":"`emits` option"},"fix":{"range":[5810,5810],"text":"\nemits: ['active-input'],"},"desc":"Add the `emits` option with array syntax and define \"active-input\" event."},{"messageId":"addObjectEmitsOption","data":{"name":"active-input","emitsKind":"`emits` option"},"fix":{"range":[5810,5810],"text":"\nemits: {'active-input': null},"},"desc":"Add the `emits` option with object syntax and define \"active-input\" event."}]}],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":"<template>\n\t<!--\n\t\tWikiLambda Vue component for an individual input to be set for a ZFunction in the Function editor.\n\t\t@copyright 2020– Abstract Wikipedia team; see AUTHORS.txt\n\t\t@license MIT\n\t-->\n\t<div class=\"ext-wikilambda-editor-input-list-item\" role=\"inputs-item-container\">\n\t\t<div\n\t\t\tv-if=\"isMobile\"\n\t\t\tclass=\"ext-wikilambda-editor-input-list-item__header\"\n\t\t\t:class=\"{ 'ext-wikilambda-editor-input-list-item__header--active': isActive }\"\n\t\t>\n\t\t\t<cdx-button\n\t\t\t\tweight=\"quiet\"\n\t\t\t\tclass=\"ext-wikilambda-editor-input-list-item__header__action-expand\"\n\t\t\t\t@click=\"toggleActive\"\n\t\t\t>\n\t\t\t\t<cdx-icon :icon=\"icons.cdxIconExpand\"></cdx-icon>\n\t\t\t</cdx-button>\n\t\t\t<span class=\"ext-wikilambda-editor-input-list-item__header__text\">\n\t\t\t\t{{\n\t\t\t\t\t$i18n( 'wikilambda-function-viewer-details-input-number', inputNumber ).text() +\n\t\t\t\t\t\t( selectedLabel && !isActive ? ': ' + selectedLabel : '' )\n\t\t\t\t}}\n\t\t\t</span>\n\t\t\t<cdx-button\n\t\t\t\tv-if=\"canEditType\"\n\t\t\t\tweight=\"quiet\"\n\t\t\t\tclass=\"ext-wikilambda-editor-input-list-item__header__action-delete\"\n\t\t\t\t@click=\"removeInput\"\n\t\t\t>\n\t\t\t\t<cdx-icon :icon=\"icons.cdxIconTrash\"></cdx-icon>\n\t\t\t</cdx-button>\n\t\t</div>\n\t\t<div class=\"ext-wikilambda-editor-input-list-item__body\">\n\t\t\t<span\n\t\t\t\tv-if=\"isMobile\"\n\t\t\t\tclass=\"ext-wikilambda-editor-input-list-item__body__description\">\n\t\t\t\t{{ $i18n( 'wikilambda-function-definition-inputs-description' ).text() }}\n\t\t\t\t<a :href=\"getTypeUrl()\"> {{ $i18n( 'wikilambda-function-definition-input-types' ).text() }} </a>\n\t\t\t</span>\n\t\t\t<div\n\t\t\t\tv-if=\"isMainLanguageBlock\"\n\t\t\t\tclass=\"ext-wikilambda-editor-input-list-item__body__entry\"\n\t\t\t>\n\t\t\t\t<span\n\t\t\t\t\tv-if=\"index === 0 || isMobile\"\n\t\t\t\t\tclass=\"ext-wikilambda-editor-input-list-item__body__entry-text\"\n\t\t\t\t>\n\t\t\t\t\t{{ $i18n( 'wikilambda-function-definition-input-item-type' ).text() }}\n\t\t\t\t</span>\n\t\t\t\t<wl-z-object-selector\n\t\t\t\t\tv-if=\"( !canEditType && getTypeOfArgument ) || canEditType\"\n\t\t\t\t\tref=\"typeSelector\"\n\t\t\t\t\t:type=\"Constants.Z_TYPE\"\n\t\t\t\t\tclass=\"\n\t\t\t\t\t\text-wikilambda-editor-input-list-item__body__entry-field\n\t\t\t\t\t\text-wikilambda-editor-input-list-item__selector\"\n\t\t\t\t\t:placeholder=\"$i18n( 'wikilambda-function-definition-inputs-item-selector-placeholder' ).text()\"\n\t\t\t\t\t:selected-id=\"getTypeOfArgument\"\n\t\t\t\t\t:initial-selection-label=\"selectedLabel\"\n\t\t\t\t\t:readonly=\"!canEditType\"\n\t\t\t\t\t:zobject-id=\"getZArgumentType.id\"\n\t\t\t\t\t@input=\"setArgumentType( $event )\"\n\t\t\t\t\t@focus-out=\"clearIfUnset\"\n\t\t\t\t></wl-z-object-selector>\n\t\t\t\t<!--\n\t\t\t\t\tTODO: This is hardcoded for now as it is the first complex input,\n\t\t\t\t\tIn the future we should provide an UI that will allow user to define complex types\n\t\t\t\t\tautomatically (for example set a function call that require x argument to be set\n\t\t\t\t\tand show them automatically)\n\t\t\t\t-->\n\t\t\t\t<wl-z-object-selector\n\t\t\t\t\tv-if=\"getTypeOfArgument === Constants.Z_TYPED_LIST\"\n\t\t\t\t\tclass=\"\n\t\t\t\t\t\text-wikilambda-editor-input-list-item__body__entry-field\n\t\t\t\t\t\text-wikilambda-editor-input-list-item__selector\"\n\t\t\t\t\t:label=\"$i18n( 'wikilambda-function-definition-inputs-item-typed-list-placeholder' ).text()\"\n\t\t\t\t\t:placeholder=\"$i18n( 'wikilambda-function-definition-inputs-item-typed-list-placeholder' ).text()\"\n\t\t\t\t\t@input=\"setListTypedList\"\n\t\t\t\t\t@clear=\"setListTypedList\"\n\t\t\t\t></wl-z-object-selector>\n\t\t\t</div>\n\t\t\t<div class=\"ext-wikilambda-editor-input-list-item__body__entry\">\n\t\t\t\t<span\n\t\t\t\t\tv-if=\"index === 0 || isMobile\"\n\t\t\t\t\tclass=\"ext-wikilambda-editor-input-list-item__body__entry-text\"\n\t\t\t\t>\n\t\t\t\t\t{{ $i18n( 'wikilambda-function-definition-input-item-label' ).text() }}\n\t\t\t\t</span>\n\t\t\t\t<cdx-text-input\n\t\t\t\t\tv-model=\"getArgumentLabel\"\n\t\t\t\t\tclass=\"\n\t\t\t\t\t\text-wikilambda-editor-input-list-item__body__entry-field\n\t\t\t\t\t\text-wikilambda-editor-input-list-item__label\"\n\t\t\t\t\t:placeholder=\"$i18n( 'wikilambda-function-definition-inputs-item-input-placeholder' ).text()\"\n\t\t\t\t\t:aria-label=\"$i18n( 'wikilambda-function-definition-inputs-item-input-placeholder' ).text()\"\n\t\t\t\t\t@input=\"handleInputChange\"\n\t\t\t\t></cdx-text-input>\n\t\t\t</div>\n\t\t\t<cdx-button\n\t\t\t\tv-if=\"canEditType && !isMobile\"\n\t\t\t\tweight=\"quiet\"\n\t\t\t\tclass=\"ext-wikilambda-editor-input-list-item__header__action-delete\"\n\t\t\t\t:aria-label=\"$i18n( 'wikilambda-function-definition-inputs-item-remove' ).text()\"\n\t\t\t\t@click=\"removeInput\"\n\t\t\t>\n\t\t\t\t<cdx-icon :icon=\"icons.cdxIconTrash\"></cdx-icon>\n\t\t\t</cdx-button>\n\t\t</div>\n\t</div>\n</template>\n\n<script>\nvar Constants = require( '../../../Constants.js' ),\n\tZObjectSelector = require( '../../ZObjectSelector.vue' ),\n\tmapGetters = require( 'vuex' ).mapGetters,\n\tmapActions = require( 'vuex' ).mapActions,\n\tCdxIcon = require( '@wikimedia/codex' ).CdxIcon,\n\tCdxButton = require( '@wikimedia/codex' ).CdxButton,\n\tCdxTextInput = require( '@wikimedia/codex' ).CdxTextInput,\n\ticons = require( './../../../../lib/icons.json' ),\n\ttypeUtils = require( '../../../mixins/typeUtils.js' ),\n\tdebounceSetArgumentLabelTimeout = 300;\n// @vue/component\nmodule.exports = exports = {\n\tname: 'wl-function-definition-inputs-item',\n\tcomponents: {\n\t\t'wl-z-object-selector': ZObjectSelector,\n\t\t'cdx-icon': CdxIcon,\n\t\t'cdx-button': CdxButton,\n\t\t'cdx-text-input': CdxTextInput\n\t},\n\tmixins: [ typeUtils ],\n\tprops: {\n\t\tindex: {\n\t\t\ttype: Number,\n\t\t\trequired: true\n\t\t},\n\t\tzobjectId: {\n\t\t\ttype: Number,\n\t\t\trequired: true\n\t\t},\n\t\t/**\n\t\t * If this input is in the main language block\n\t\t */\n\t\tisMainLanguageBlock: {\n\t\t\ttype: Boolean,\n\t\t\trequired: true\n\t\t},\n\t\t/**\n\t\t * if user has permissions to edit the input type\n\t\t */\n\t\tcanEditType: {\n\t\t\ttype: Boolean,\n\t\t\trequired: true\n\t\t},\n\t\t/**\n\t\t * zID of item label language\n\t\t *\n\t\t * @example Z1014\n\t\t */\n\t\tzLang: {\n\t\t\ttype: String,\n\t\t\trequired: true\n\t\t},\n\t\t/**\n\t\t * device screensize is mobile\n\t\t */\n\t\tisMobile: {\n\t\t\ttype: Boolean,\n\t\t\trequired: true\n\t\t},\n\t\tisActive: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false\n\t\t},\n\t\tshowIndex: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false\n\t\t}\n\t},\n\tdata: function () {\n\t\treturn {\n\t\t\tdebounceSetArgumentLabel: null,\n\t\t\ticons: icons\n\t\t};\n\t},\n\tcomputed: $.extend( mapGetters( [\n\t\t'getNextObjectId',\n\t\t'getZObjectChildrenById',\n\t\t'getNestedZObjectById',\n\t\t'getCurrentZLanguage',\n\t\t'getZObjectTypeById',\n\t\t'getZkeyLabels',\n\t\t'currentZObjectLanguages'\n\t] ), {\n\t\tinputNumber: function () {\n\t\t\treturn this.showIndex ? this.index + 1 : '';\n\t\t},\n\t\tConstants: function () {\n\t\t\treturn Constants;\n\t\t},\n\t\tgetZArgumentType: function () {\n\t\t\treturn this.getNestedZObjectById( this.zobjectId, [\n\t\t\t\tConstants.Z_ARGUMENT_TYPE\n\t\t\t] );\n\t\t},\n\t\tgetTypeOfArgument: function () {\n\t\t\tvar zArgumentTypeId = this.getNestedZObjectById( this.zobjectId, [\n\t\t\t\tConstants.Z_ARGUMENT_TYPE\n\t\t\t] ).id;\n\t\t\tif ( this.getZObjectTypeById( zArgumentTypeId ) === Constants.Z_REFERENCE ) {\n\t\t\t\treturn this.getNestedZObjectById( zArgumentTypeId, [\n\t\t\t\t\tConstants.Z_REFERENCE_ID\n\t\t\t\t] ).value;\n\t\t\t} else if ( this.getZObjectTypeById( zArgumentTypeId ) === Constants.Z_TYPED_LIST ) {\n\t\t\t\treturn Constants.Z_TYPED_LIST;\n\t\t\t}\n\t\t},\n\t\tgetArgumentLabels: function () {\n\t\t\treturn this.getNestedZObjectById( this.zobjectId, [\n\t\t\t\tConstants.Z_ARGUMENT_LABEL,\n\t\t\t\tConstants.Z_MULTILINGUALSTRING_VALUE\n\t\t\t] );\n\t\t},\n\t\tgetArgumentLabel: function () {\n\t\t\tvar labels = this.getZObjectChildrenById( this.getArgumentLabels.id );\n\t\t\tfor ( var index in labels ) {\n\t\t\t\tvar lang = this.getNestedZObjectById( labels[ index ].id, [\n\t\t\t\t\t\tConstants.Z_MONOLINGUALSTRING_LANGUAGE,\n\t\t\t\t\t\tConstants.Z_REFERENCE_ID\n\t\t\t\t\t] ),\n\t\t\t\t\tvalue = this.getNestedZObjectById( labels[ index ].id, [\n\t\t\t\t\t\tConstants.Z_MONOLINGUALSTRING_VALUE,\n\t\t\t\t\t\tConstants.Z_STRING_VALUE\n\t\t\t\t\t] );\n\t\t\t\tif ( lang.value === this.zLang ) {\n\t\t\t\t\treturn value.value;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn null;\n\t\t},\n\t\tselectedLabel: function () {\n\t\t\treturn this.getTypeOfArgument ? this.getZkeyLabels[ this.getTypeOfArgument ] : '';\n\t\t}\n\t} ),\n\tmethods: $.extend( mapActions( [\n\t\t'setZObjectValue',\n\t\t'addZMonolingualString',\n\t\t'changeType',\n\t\t'setTypeOfTypedList',\n\t\t'removeZObject',\n\t\t'removeZObjectChildren'\n\t] ), {\n\t\tsetArgumentLabel: function ( input ) {\n\t\t\tif ( ( !this.getArgumentLabel && !this.getArgumentLabels.id ) || !this.zLang ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tvar lang = this.zLang;\n\t\t\tvar labels = this.getZObjectChildrenById( this.getArgumentLabels.id );\n\t\t\tfor ( var index in labels ) {\n\t\t\t\tvar labelLang = this.getNestedZObjectById( labels[ index ].id, [\n\t\t\t\t\t\tConstants.Z_MONOLINGUALSTRING_LANGUAGE,\n\t\t\t\t\t\tConstants.Z_REFERENCE_ID\n\t\t\t\t\t] ),\n\t\t\t\t\tvalue = this.getNestedZObjectById( labels[ index ].id, [\n\t\t\t\t\t\tConstants.Z_MONOLINGUALSTRING_VALUE,\n\t\t\t\t\t\tConstants.Z_STRING_VALUE\n\t\t\t\t\t] );\n\n\t\t\t\tif ( labelLang.value === lang ) {\n\t\t\t\t\tthis.setZObjectValue( {\n\t\t\t\t\t\tid: value.id,\n\t\t\t\t\t\tvalue: input\n\t\t\t\t\t} );\n\t\t\t\t\tthis.$emit( 'update-argument-label' );\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\thandleInputChange: function ( event ) {\n\t\t\tconst input = event.target.value;\n\t\t\tclearTimeout( this.debounceSetArgumentLabel );\n\t\t\tthis.debounceSetArgumentLabel = setTimeout( function () {\n\t\t\t\tthis.setArgumentLabel( input );\n\t\t\t}.bind( this ), debounceSetArgumentLabelTimeout );\n\t\t},\n\t\tsetArgumentType: function ( type ) {\n\t\t\tvar payload;\n\t\t\tif ( type === Constants.Z_TYPED_LIST ) {\n\t\t\t\tpayload = {\n\t\t\t\t\tid: this.getZArgumentType.id,\n\t\t\t\t\ttype: Constants.Z_TYPED_LIST,\n\t\t\t\t\tunwrapped: true\n\t\t\t\t};\n\t\t\t} else {\n\t\t\t\tpayload = {\n\t\t\t\t\tid: this.getZArgumentType.id,\n\t\t\t\t\ttype: Constants.Z_REFERENCE,\n\t\t\t\t\tvalue: type\n\t\t\t\t};\n\t\t\t}\n\t\t\tthis.changeType( payload );\n\t\t},\n\t\tsetListTypedList: function ( type ) {\n\t\t\tvar payload = {\n\t\t\t\tobjectId: this.getZArgumentType.id,\n\t\t\t\ttype: type\n\t\t\t};\n\t\t\tthis.setTypeOfTypedList( payload );\n\t\t},\n\t\ttoggleActive: function () {\n\t\t\tvar index = this.isActive ? -1 : this.index;\n\t\t\tthis.$emit( 'active-input', index );\n\t\t},\n\t\tclearIfUnset: function () {\n\t\t\tif ( !this.getTypeOfArgument ) {\n\t\t\t\tthis.$refs.typeSelector.clearResults();\n\t\t\t}\n\t\t},\n\t\tremoveInput: function () {\n\t\t\tconst zId = this.zobjectId;\n\t\t\tthis.removeZObjectChildren( zId );\n\t\t\tthis.removeZObject( zId );\n\t\t},\n\t\tgetTypeUrl: function () {\n\t\t\treturn new mw.Title( Constants.PATHS.LIST_ZOBJECTS_BY_TYPE_TYPE ).getUrl();\n\t\t}\n\t} ),\n\twatch: {\n\t\tzLang: {\n\t\t\timmediate: true,\n\t\t\thandler: function ( value ) {\n\t\t\t\tif ( value ) {\n\t\t\t\t\tconst labels = this.getZObjectChildrenById( this.getArgumentLabels.id );\n\t\t\t\t\tfor ( let index = 0; index < labels.length; index++ ) {\n\t\t\t\t\t\tconst labelLang = this.getNestedZObjectById( labels[ index ].id, [\n\t\t\t\t\t\t\tConstants.Z_MONOLINGUALSTRING_LANGUAGE,\n\t\t\t\t\t\t\tConstants.Z_REFERENCE_ID\n\t\t\t\t\t\t] );\n\t\t\t\t\t\tif ( labelLang.value === value ) {\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t// Add monoliguanl string to zobject if it does not already exist\n\t\t\t\t\tthis.addZMonolingualString( {\n\t\t\t\t\t\tlang: value,\n\t\t\t\t\t\tparentId: this.getArgumentLabels.id\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n};\n</script>\n\n<style lang=\"less\">\n@import '../../../ext.wikilambda.edit.less';\n\n.ext-wikilambda-editor-input-list-item {\n\tflex-direction: column;\n\tpadding-bottom: @spacing-50;\n\n\t&__label {\n\t\twidth: 100%;\n\t}\n\n\t&__body {\n\t\twidth: 100%;\n\t\tdisplay: none;\n\t\tflex-direction: column;\n\t\tmargin-bottom: 0;\n\n\t\t&__entry {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tgap: @spacing-100;\n\t\t\tmargin-bottom: @spacing-50;\n\n\t\t\t&-text {\n\t\t\t\tfont-weight: @font-weight-bold;\n\t\t\t}\n\n\t\t\t&-field {\n\t\t\t\tflex: 1;\n\t\t\t}\n\t\t}\n\n\t\t&__description {\n\t\t\topacity: 0.8;\n\t\t\tcolor: @color-subtle;\n\t\t\tfont-size: @wl-font-size-description-mobile;\n\t\t\tline-height: @wl-line-height-description-mobile;\n\t\t\tletter-spacing: @wl-letter-spacing-description-mobile;\n\t\t\tdisplay: inline-block;\n\t\t\tmargin-bottom: @spacing-50;\n\t\t}\n\t}\n\n\t&__action-delete {\n\t\t.cdx-icon {\n\t\t\twidth: @size-100;\n\t\t\theight: @size-100;\n\t\t}\n\t}\n\n\t&__header {\n\t\tdisplay: flex;\n\t\tjustify-content: space-between;\n\t\twidth: 100%;\n\n\t\t&__text {\n\t\t\tflex-grow: 1;\n\t\t\tfont-weight: @font-weight-bold;\n\t\t\tdisplay: inline-block;\n\t\t\tline-height: @size-200;\n\t\t\tmargin-left: @spacing-50;\n\t\t}\n\n\t\t&__action-expand {\n\t\t\tflex-grow: 0;\n\n\t\t\t.cdx-icon {\n\t\t\t\twidth: @size-100;\n\t\t\t\theight: @size-100;\n\t\t\t\ttransform: rotate( 180deg );\n\t\t\t}\n\t\t}\n\n\t\t&__action-delete {\n\t\t\tflex-grow: 0;\n\n\t\t\t.cdx-icon {\n\t\t\t\twidth: @size-100;\n\t\t\t\theight: @size-100;\n\t\t\t}\n\t\t}\n\n\t\t&--active {\n\t\t\t.ext-wikilambda-editor-input-list-item__header__action-expand {\n\t\t\t\t.cdx-icon {\n\t\t\t\t\ttransform: rotate( 0deg );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t+ .ext-wikilambda-editor-input-list-item__body {\n\t\t\t\tdisplay: flex;\n\t\t\t}\n\t\t}\n\t}\n\n\t/* DESKTOP styles */\n\t@media screen and ( min-width: @width-breakpoint-tablet ) {\n\t\tpadding: 0;\n\t\tflex-direction: row;\n\t\tborder-bottom: 0;\n\n\t\t&:first-child {\n\t\t\tmargin-top: 0;\n\t\t}\n\n\t\t&__row:first-of-type {\n\t\t\t.ext-wikilambda-editor-input-list-item__header__action-delete {\n\t\t\t\tmargin-top: @spacing-200;\n\t\t\t}\n\t\t}\n\n\t\t&__body {\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: row;\n\t\t\tmargin-bottom: @spacing-50;\n\n\t\t\t&__entry {\n\t\t\t\tmargin-top: 0;\n\t\t\t\tmargin-right: @spacing-50;\n\t\t\t\tdisplay: block;\n\t\t\t\tmargin-bottom: 0;\n\n\t\t\t\t&-text {\n\t\t\t\t\tdisplay: block;\n\t\t\t\t\tline-height: @spacing-200;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t&__selector {\n\t\t\twidth: auto;\n\t\t}\n\n\t\t&__input {\n\t\t\twidth: auto;\n\t\t}\n\t}\n}\n</style>\n","usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/resources/ext.wikilambda.edit/components/function/editor/FunctionEditorLanguage.vue","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/resources/ext.wikilambda.edit/components/function/editor/FunctionEditorName.vue","messages":[{"ruleId":"vue/require-explicit-emits","severity":1,"message":"The \"updated-name\" event has been triggered but not declared on `emits` option.","line":107,"column":17,"nodeType":"Literal","messageId":"missing","endLine":107,"endColumn":31,"suggestions":[{"messageId":"addArrayEmitsOption","data":{"name":"updated-name","emitsKind":"`emits` option"},"fix":{"range":[1759,1759],"text":"\nemits: ['updated-name'],"},"desc":"Add the `emits` option with array syntax and define \"updated-name\" event."},{"messageId":"addObjectEmitsOption","data":{"name":"updated-name","emitsKind":"`emits` option"},"fix":{"range":[1759,1759],"text":"\nemits: {'updated-name': null},"},"desc":"Add the `emits` option with object syntax and define \"updated-name\" event."}]}],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"<template>\n\t<!--\n\t\tWikiLambda Vue component for setting the name of a ZFunction in the Function editor.\n\n\t\t@copyright 2020– Abstract Wikipedia team; see AUTHORS.txt\n\t\t@license MIT\n\t-->\n\t<div class=\"ext-wikilambda-function-definition-name\">\n\t\t<div class=\"ext-wikilambda-function-definition-name__label\">\n\t\t\t<label\n\t\t\t\t:for=\"'ext-wikilambda-function-definition-name__input' + zLang\"\n\t\t\t\tclass=\"ext-wikilambda-app__text-regular\">\n\t\t\t\t{{ $i18n( 'wikilambda-function-definition-name-label' ).text() }}\n\t\t\t\t<span>({{ $i18n( 'wikilambda-optional' ).text() }})</span>\n\t\t\t</label>\n\t\t\t<span class=\"ext-wikilambda-function-definition-name__description\">\n\t\t\t\t{{ $i18n( 'wikilambda-function-definition-name-description' ).text() }}\n\t\t\t</span>\n\t\t</div>\n\n\t\t<cdx-text-input\n\t\t\t:id=\"'ext-wikilambda-function-definition-name__input' + zLang\"\n\t\t\t:model-value=\"zobjectLabel\"\n\t\t\tclass=\"ext-wikilambda-function-definition-name__input\"\n\t\t\t:aria-label=\"$i18n( 'wikilambda-function-definition-name-label' ).text()\"\n\t\t\t:placeholder=\"$i18n( 'wikilambda-function-definition-name-placeholder' ).text()\"\n\t\t\t@input=\"setZObjectLabel\"\n\t\t></cdx-text-input>\n\t</div>\n</template>\n\n<script>\nvar Constants = require( '../../../Constants.js' ),\n\tmapGetters = require( 'vuex' ).mapGetters,\n\tmapActions = require( 'vuex' ).mapActions,\n\tCdxTextInput = require( '@wikimedia/codex' ).CdxTextInput,\n\tdebounceSetZObjectLabelTimeout = 300;\n\n// @vue/component\nmodule.exports = exports = {\n\tname: 'wl-function-definition-name',\n\tcomponents: {\n\t\t'cdx-text-input': CdxTextInput\n\t},\n\tprops: {\n\t\tzobjectId: {\n\t\t\ttype: Number,\n\t\t\tdefault: 0\n\t\t},\n\t\tisMainZObject: {\n\t\t\ttype: Boolean\n\t\t},\n\t\t/**\n\t\t * zID of item label language\n\t\t *\n\t\t * @example Z1014\n\t\t *\n\t\t */\n\t\tzLang: {\n\t\t\ttype: String,\n\t\t\trequired: true\n\t\t}\n\t},\n\tdata: function () {\n\t\treturn {\n\t\t\tdebounceSetZObjectLabel: null\n\t\t};\n\t},\n\tcomputed: $.extend( mapGetters( [\n\t\t'getZObjectChildrenById',\n\t\t'getNestedZObjectById',\n\t\t'getZObjectLabel'\n\t] ), {\n\t\tzobject: function () {\n\t\t\treturn this.getZObjectChildrenById( this.zobjectId );\n\t\t},\n\t\tgetFunctionNameMultilingualId: function () {\n\t\t\treturn this.getNestedZObjectById( this.zobjectId, [\n\t\t\t\tConstants.Z_PERSISTENTOBJECT_LABEL,\n\t\t\t\tConstants.Z_MULTILINGUALSTRING_VALUE\n\t\t\t] ).id;\n\t\t},\n\t\tgetFunctionName: function () {\n\t\t\tif ( this.zLang === '' ) {\n\t\t\t\treturn '';\n\t\t\t}\n\t\t\treturn this.getZObjectLabel( this.zLang );\n\t\t},\n\t\tzobjectLabel: {\n\t\t\tget: function () {\n\t\t\t\treturn this.getFunctionName ? this.getFunctionName.value : '';\n\t\t\t},\n\t\t\tset: function ( value ) {\n\t\t\t\tvar id = this.getFunctionName.id;\n\t\t\t\tif ( !id ) {\n\t\t\t\t\tthis.addZMonolingualString( {\n\t\t\t\t\t\tparentId: this.getFunctionNameMultilingualId,\n\t\t\t\t\t\tlang: this.zLang\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t\tvar payload = {\n\t\t\t\t\tid: this.getFunctionName.id,\n\t\t\t\t\tvalue: value,\n\t\t\t\t\tisMainZObject: this.isMainZObject\n\t\t\t\t};\n\t\t\t\tthis.setPageZObjectValue( payload );\n\t\t\t\tthis.$emit( 'updated-name' );\n\t\t\t}\n\t\t}\n\t} ),\n\tmethods: $.extend( mapActions( [\n\t\t'setPageZObjectValue',\n\t\t'addZMonolingualString'\n\t] ), {\n\t\t/**\n\t\t * This method debounces the change in the model for performance\n\t\t *\n\t\t * @param {Event} event The input event\n\t\t */\n\t\tsetZObjectLabel( event ) {\n\t\t\tconst input = event.target.value;\n\t\t\tclearTimeout( this.debounceSetZObjectLabel );\n\t\t\tthis.debounceSetZObjectLabel = setTimeout( function () {\n\t\t\t\tthis.zobjectLabel = input;\n\t\t\t}.bind( this ), debounceSetZObjectLabelTimeout );\n\t\t}\n\t} ),\n\twatch: {\n\t\tzLang: function () {\n\t\t\tthis.zobjectLabel = null;\n\t\t}\n\t}\n};\n</script>\n\n<style lang=\"less\">\n@import '../../../ext.wikilambda.edit.less';\n\n.ext-wikilambda-function-definition-name {\n\tdisplay: flex;\n\tmargin-bottom: @spacing-150;\n\n\t&__label {\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t\twidth: @wl-field-label-width;\n\t\tmargin-right: @spacing-150;\n\n\t\t& > label {\n\t\t\tline-height: @size-200;\n\t\t\tfont-weight: @font-weight-bold;\n\n\t\t\t& > span {\n\t\t\t\tfont-weight: @font-weight-normal;\n\t\t\t}\n\t\t}\n\t}\n\n\t&__description {\n\t\topacity: 0.8;\n\t\tcolor: @color-subtle;\n\t\tfont-size: @wl-font-size-description;\n\t\tline-height: @wl-line-height-description;\n\t\tdisplay: inline-block;\n\t}\n\n\t/* MOBILE styles */\n\t@media screen and ( max-width: @width-breakpoint-tablet ) {\n\t\t& {\n\t\t\tflex-direction: column;\n\n\t\t\t&__input {\n\t\t\t\twidth: 100%;\n\t\t\t}\n\n\t\t\t&__label {\n\t\t\t\twidth: auto;\n\n\t\t\t\t& > label {\n\t\t\t\t\tline-height: inherit;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t&__description {\n\t\t\t\tfont-size: @wl-font-size-description-mobile;\n\t\t\t\tline-height: @wl-line-height-description-mobile;\n\t\t\t\tletter-spacing: @wl-letter-spacing-description-mobile;\n\t\t\t\tmargin-bottom: @spacing-50;\n\t\t\t}\n\t\t}\n\t}\n}\n</style>\n","usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/resources/ext.wikilambda.edit/components/function/editor/FunctionEditorOutput.vue","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/resources/ext.wikilambda.edit/components/function/viewer/FunctionViewerAbout.vue","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/resources/ext.wikilambda.edit/components/function/viewer/FunctionViewerDetails.vue","messages":[{"ruleId":"es-x/no-promise-prototype-finally","severity":2,"message":"ES2018 'Promise.prototype.finally' method is forbidden.","line":454,"column":4,"nodeType":"MemberExpression","messageId":"forbidden","endLine":461,"endColumn":15},{"ruleId":"es-x/no-promise-prototype-finally","severity":2,"message":"ES2018 'Promise.prototype.finally' method is forbidden.","line":470,"column":4,"nodeType":"MemberExpression","messageId":"forbidden","endLine":477,"endColumn":15},{"ruleId":"es-x/no-promise-prototype-finally","severity":2,"message":"ES2018 'Promise.prototype.finally' method is forbidden.","line":486,"column":4,"nodeType":"MemberExpression","messageId":"forbidden","endLine":493,"endColumn":15},{"ruleId":"es-x/no-promise-prototype-finally","severity":2,"message":"ES2018 'Promise.prototype.finally' method is forbidden.","line":502,"column":4,"nodeType":"MemberExpression","messageId":"forbidden","endLine":509,"endColumn":15}],"suppressedMessages":[],"errorCount":4,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":"<template>\n\t<!--\n\t\tWikiLambda Vue component for the details tab in the ZFunction Viewer.\n\n\t\t@copyright 2020– Abstract Wikipedia team; see AUTHORS.txt\n\t\t@license MIT\n\t-->\n\t<main class=\"ext-wikilambda-function-details\">\n\t\t<div class=\"ext-wikilambda-function-details__summary\">\n\t\t\t{{ $i18n( 'wikilambda-function-details-summary' ).text() }}\n\t\t\t<!-- TODO(T309199): link to process page once it exists -->\n\t\t\t<a href=\"https://www.mediawiki.org/wiki/Extension:WikiLambda/Approving_Implementations_and_Testers\" target=\"_blank\">\n\t\t\t\t{{ $i18n( 'wikilambda-function-details-summary-learn-more' ).text() }}\n\t\t\t</a>\n\t\t</div>\n\t\t<section class=\"ext-wikilambda-function-details__sidebar\">\n\t\t\t<wl-function-viewer-details-sidebar :zobject-id=\"zobjectId\"></wl-function-viewer-details-sidebar>\n\t\t</section>\n\t\t<section class=\"ext-wikilambda-function-details__tables\">\n\t\t\t<wl-function-viewer-details-table\n\t\t\t\tname=\"implementations\"\n\t\t\t\t:header=\"implementationsHeader\"\n\t\t\t\t:body=\"implementationBody\"\n\t\t\t\t:title=\"$i18n( 'wikilambda-function-implementation-table-header' ).text()\"\n\t\t\t\t:current-page=\"currentImplementationPage\"\n\t\t\t\t:total-pages=\"numberOfImplementationPages\"\n\t\t\t\t:showing-all=\"implementationShowAll\"\n\t\t\t\t:can-approve=\"areProposedImplementationsSelected\"\n\t\t\t\t:can-deactivate=\"areAvailableImplementationsSelected\"\n\t\t\t\t:empty-text=\"zImplementationsFetched ?\n\t\t\t\t\t$i18n( 'wikilambda-implementation-none-found' ) : $i18n( 'wikilambda-loading' )\"\n\t\t\t\t:is-loading=\"zImplementationsLoading\"\n\t\t\t\t@update-page=\"updateImplementationPage\"\n\t\t\t\t@reset-view=\"resetImplementationView\"\n\t\t\t\t@approve=\"approveImplementations\"\n\t\t\t\t@deactivate=\"deactivateImplementations\"\n\t\t\t></wl-function-viewer-details-table>\n\t\t\t<wl-function-viewer-details-table\n\t\t\t\tname=\"testers\"\n\t\t\t\t:header=\"testersHeader\"\n\t\t\t\t:body=\"testersBody\"\n\t\t\t\t:title=\"$i18n( 'wikilambda-function-test-cases-table-header' ).text()\"\n\t\t\t\t:current-page=\"currentTesterPage\"\n\t\t\t\t:total-pages=\"numberofTesterPages\"\n\t\t\t\t:showing-all=\"testerShowAll\"\n\t\t\t\t:can-approve=\"areProposedTestersSelected\"\n\t\t\t\t:can-deactivate=\"areAvailableTestersSelected\"\n\t\t\t\t:empty-text=\"zTestersFetched ?\n\t\t\t\t\t$i18n( 'wikilambda-tester-none-found' ) : $i18n( 'wikilambda-loading' )\"\n\t\t\t\t:is-loading=\"zTestersLoading\"\n\t\t\t\t@update-page=\"updateTestersPage\"\n\t\t\t\t@reset-view=\"resetTestersView\"\n\t\t\t\t@approve=\"approveTesters\"\n\t\t\t\t@deactivate=\"deactivateTesters\"\n\t\t\t></wl-function-viewer-details-table>\n\t\t</section>\n\t\t<cdx-message\n\t\t\tv-if=\"shouldShowToast\"\n\t\t\t:dismiss-button-label=\"$i18n( 'wikilambda-toast-close' ).text()\"\n\t\t\ttype=\"error\"\n\t\t\t@user-dismissed=\"closeToast\"\n\t\t>\n\t\t\t{{ currentToast }}\n\t\t</cdx-message>\n\t</main>\n</template>\n\n<script>\nvar FunctionViewerDetailsSidebar = require( './details/FunctionViewerDetailsSidebar.vue' ),\n\tFunctionViewerDetailsTable = require( './details/FunctionViewerDetailsTable.vue' ),\n\tConstants = require( '../../../Constants.js' ),\n\ttypeUtils = require( '../../../mixins/typeUtils.js' ),\n\tCdxMessage = require( '@wikimedia/codex' ).CdxMessage,\n\tmapGetters = require( 'vuex' ).mapGetters,\n\tmapActions = require( 'vuex' ).mapActions;\n\n// @vue/component\nmodule.exports = exports = {\n\tname: 'wl-function-viewer-details',\n\tcomponents: {\n\t\t'wl-function-viewer-details-sidebar': FunctionViewerDetailsSidebar,\n\t\t'wl-function-viewer-details-table': FunctionViewerDetailsTable,\n\t\t'cdx-message': CdxMessage\n\t},\n\tmixins: [ typeUtils ],\n\tprops: {\n\t\tzobjectId: {\n\t\t\ttype: Number,\n\t\t\trequired: false,\n\t\t\tdefault: 0\n\t\t}\n\t},\n\tdata: function () {\n\t\treturn {\n\t\t\tcurrentImplementationPage: 1,\n\t\t\timplementationShowAll: false,\n\t\t\tcurrentTesterPage: 1,\n\t\t\ttesterShowAll: false,\n\t\t\timplZidToState: {},\n\t\t\ttesterZidToState: {},\n\t\t\tcurrentToast: null,\n\t\t\tzImplementationsFetched: false,\n\t\t\tzImplementationsLoading: false,\n\t\t\tzTestersFetched: false,\n\t\t\tzTestersLoading: false\n\t\t};\n\t},\n\tcomputed: $.extend( {},\n\t\tmapGetters( [\n\t\t\t'getAttachedZTesters',\n\t\t\t'getZkeyLabels',\n\t\t\t'getPaginatedImplementations',\n\t\t\t'getZImplementations',\n\t\t\t'getAttachedZImplementations',\n\t\t\t'getPaginatedTesters',\n\t\t\t'getZTesters',\n\t\t\t'getZkeys',\n\t\t\t'getCurrentZObjectId'\n\t\t] ),\n\t\t{\n\t\t\timplementationsHeader: function () {\n\t\t\t\tif ( this.implementationBody.length === 0 ) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\n\t\t\t\tconst headers = {\n\t\t\t\t\tcheckbox: {\n\t\t\t\t\t\ttitle: '',\n\t\t\t\t\t\tcomponent: 'cdx-checkbox',\n\t\t\t\t\t\tprops: {\n\t\t\t\t\t\t\tmodelValue: Object.keys( this.implZidToState ).every( ( zid ) =>\n\t\t\t\t\t\t\t\tthis.implZidToState[ zid ].checked ),\n\t\t\t\t\t\t\t'onUpdate:modelValue': function ( newValue ) {\n\t\t\t\t\t\t\t\tfor ( const zid in this.implZidToState ) {\n\t\t\t\t\t\t\t\t\tthis.implZidToState[ zid ].checked = newValue;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}.bind( this )\n\t\t\t\t\t\t},\n\t\t\t\t\t\tclass: 'ext-wikilambda-function-details-table-text'\n\t\t\t\t\t},\n\t\t\t\t\tname: {\n\t\t\t\t\t\ttitle: this.$i18n( 'wikilambda-function-implementation-name-label' ),\n\t\t\t\t\t\tclass: 'ext-wikilambda-function-details-table-text'\n\t\t\t\t\t},\n\t\t\t\t\tlanguage: {\n\t\t\t\t\t\ttitle: this.$i18n( 'wikilambda-function-implementation-language-label' ),\n\t\t\t\t\t\tclass: 'ext-wikilambda-function-details-table-text'\n\t\t\t\t\t},\n\t\t\t\t\tstate: {\n\t\t\t\t\t\ttitle: this.$i18n( 'wikilambda-function-implementation-state-label' ),\n\t\t\t\t\t\tclass: 'ext-wikilambda-function-details-table-text'\n\t\t\t\t\t},\n\t\t\t\t\ttestsPassed: {\n\t\t\t\t\t\ttitle: this.$i18n( 'wikilambda-function-implementation-tests-passed-label' ),\n\t\t\t\t\t\tclass: 'ext-wikilambda-function-details-table-text'\n\t\t\t\t\t}\n\t\t\t\t};\n\n\t\t\t\treturn headers;\n\t\t\t},\n\t\t\tnumberOfImplementationPages: function () {\n\t\t\t\treturn Object.keys( this.getPaginatedImplementations ).length;\n\t\t\t},\n\t\t\tnumberofTesterPages: function () {\n\t\t\t\treturn Object.keys( this.getPaginatedTesters ).length;\n\t\t\t},\n\t\t\timplementationBody: function () {\n\t\t\t\tconst visibleImplementations = this.implementationShowAll ? this.getZImplementations :\n\t\t\t\t\tthis.getPaginatedImplementations[ this.currentImplementationPage ];\n\t\t\t\tconst tableData = [];\n\t\t\t\t// iterate over each implementation for this function\n\t\t\t\tfor ( const index in visibleImplementations ) {\n\t\t\t\t\tvar isAvailable = this.isFunctionItemAttached(\n\t\t\t\t\t\tvisibleImplementations[ index ],\n\t\t\t\t\t\tthis.getAttachedZImplementations( this.zobjectId )\n\t\t\t\t\t);\n\n\t\t\t\t\t// get the language of the implementation\n\t\t\t\t\tvar language = this.$i18n( 'wikilambda-implementation-selector-composition' );\n\t\t\t\t\tvar zImplementationObj = this.getZkeys[ visibleImplementations[ index ] ];\n\t\t\t\t\tif ( zImplementationObj && zImplementationObj[ Constants.Z_PERSISTENTOBJECT_VALUE ] &&\n\t\t\t\t\t\tzImplementationObj[\n\t\t\t\t\t\t\tConstants.Z_PERSISTENTOBJECT_VALUE\n\t\t\t\t\t\t][\n\t\t\t\t\t\t\tConstants.Z_IMPLEMENTATION_BUILT_IN\n\t\t\t\t\t\t]\n\t\t\t\t\t) {\n\t\t\t\t\t\tlanguage = this.$i18n( 'wikilambda-implementation-selector-built-in' );\n\t\t\t\t\t}\n\t\t\t\t\tif ( zImplementationObj && zImplementationObj[ Constants.Z_PERSISTENTOBJECT_VALUE ] &&\n\t\t\t\t\t\tzImplementationObj[\n\t\t\t\t\t\t\tConstants.Z_PERSISTENTOBJECT_VALUE\n\t\t\t\t\t\t][\n\t\t\t\t\t\t\tConstants.Z_IMPLEMENTATION_CODE\n\t\t\t\t\t\t]\n\t\t\t\t\t) {\n\t\t\t\t\t\tlanguage = zImplementationObj[\n\t\t\t\t\t\t\tConstants.Z_PERSISTENTOBJECT_VALUE\n\t\t\t\t\t\t][\n\t\t\t\t\t\t\tConstants.Z_IMPLEMENTATION_CODE\n\t\t\t\t\t\t][\n\t\t\t\t\t\t\tConstants.Z_CODE_LANGUAGE\n\t\t\t\t\t\t][\n\t\t\t\t\t\t\tConstants.Z_PROGRAMMING_LANGUAGE_CODE\n\t\t\t\t\t\t];\n\t\t\t\t\t}\n\n\t\t\t\t\t// for each implementation, store whether its checkbox is checked and whether it's available. We use\n\t\t\t\t\t// this to determine the state of the select-all checkbox, the columns of the test table, and\n\t\t\t\t\t// whether the approve and deactivate buttons should be enabled.\n\t\t\t\t\tif ( !this.implZidToState[ visibleImplementations[ index ] ] ) {\n\t\t\t\t\t\tthis.implZidToState[ visibleImplementations[ index ] ] = {\n\t\t\t\t\t\t\tavailable: isAvailable,\n\t\t\t\t\t\t\tchecked: false\n\t\t\t\t\t\t};\n\t\t\t\t\t}\n\n\t\t\t\t\tvar implementationLabel = this.getZkeyLabels[ visibleImplementations[ index ] ];\n\t\t\t\t\tif ( !implementationLabel ) {\n\t\t\t\t\t\timplementationLabel = visibleImplementations[ index ];\n\t\t\t\t\t}\n\n\t\t\t\t\t// create the table data for the implementations table\n\t\t\t\t\ttableData.push( {\n\t\t\t\t\t\tcheckbox: {\n\t\t\t\t\t\t\ttitle: '',\n\t\t\t\t\t\t\tcomponent: 'cdx-checkbox',\n\t\t\t\t\t\t\tprops: {\n\t\t\t\t\t\t\t\tmodelValue: this.implZidToState[ visibleImplementations[ index ] ].checked,\n\t\t\t\t\t\t\t\t'onUpdate:modelValue': function ( newValue ) {\n\t\t\t\t\t\t\t\t\tthis.implZidToState[ visibleImplementations[ index ] ].checked = newValue;\n\t\t\t\t\t\t\t\t}.bind( this )\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tclass: 'ext-wikilambda-function-details-table-item',\n\t\t\t\t\t\t\tid: this.getZkeyLabels[ visibleImplementations[ index ] ]\n\t\t\t\t\t\t},\n\t\t\t\t\t\tname: {\n\t\t\t\t\t\t\ttitle: implementationLabel,\n\t\t\t\t\t\t\tcomponent: 'a',\n\t\t\t\t\t\t\tprops: {\n\t\t\t\t\t\t\t\thref: new mw.Title( visibleImplementations[ index ] ).getUrl()\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tclass: 'ext-wikilambda-function-details-implementation-table-link ext-wikilambda-function-details-table-item'\n\t\t\t\t\t\t},\n\t\t\t\t\t\tlanguage: {\n\t\t\t\t\t\t\ttitle: language,\n\t\t\t\t\t\t\tclass: 'ext-wikilambda-function-details-table-item'\n\t\t\t\t\t\t},\n\t\t\t\t\t\tstate: {\n\t\t\t\t\t\t\tcomponent: 'cdx-info-chip',\n\t\t\t\t\t\t\ttitle: this.$i18n(\n\t\t\t\t\t\t\t\tisAvailable ?\n\t\t\t\t\t\t\t\t\t'wikilambda-function-implementation-state-approved' :\n\t\t\t\t\t\t\t\t\t'wikilambda-function-implementation-state-deactivated'\n\t\t\t\t\t\t\t).text(),\n\t\t\t\t\t\t\tprops: {\n\t\t\t\t\t\t\t\tstatus: isAvailable ? 'success' : 'warning'\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tclass: 'ext-wikilambda-function-details-table-item'\n\t\t\t\t\t\t},\n\t\t\t\t\t\t// TODO (T310003): fetch these from a cached table in mediawiki\n\t\t\t\t\t\ttestsPassed: {\n\t\t\t\t\t\t\ttitle: '-'\n\t\t\t\t\t\t},\n\t\t\t\t\t\tclass: this.implZidToState[ visibleImplementations[ index ] ].checked ? 'ext-wikilambda-function-details-table__row--active' : null\n\t\t\t\t\t} );\n\t\t\t\t}\n\n\t\t\t\treturn tableData;\n\t\t\t},\n\t\t\t// header columns for test table\n\t\t\ttestersHeader: function () {\n\t\t\t\tif ( this.testersBody.length === 0 ) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\n\t\t\t\tconst headers = {\n\t\t\t\t\tcheckbox: {\n\t\t\t\t\t\ttitle: '',\n\t\t\t\t\t\tcomponent: 'cdx-checkbox',\n\t\t\t\t\t\tprops: {\n\t\t\t\t\t\t\tmodelValue: Object.keys( this.testerZidToState ).every( ( zid ) =>\n\t\t\t\t\t\t\t\tthis.testerZidToState[ zid ].checked ),\n\t\t\t\t\t\t\t'onUpdate:modelValue': function ( newValue ) {\n\t\t\t\t\t\t\t\tfor ( const zid in this.testerZidToState ) {\n\t\t\t\t\t\t\t\t\tthis.testerZidToState[ zid ].checked = newValue;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}.bind( this )\n\t\t\t\t\t\t},\n\t\t\t\t\t\tclass: 'ext-wikilambda-function-details-table-text'\n\t\t\t\t\t},\n\t\t\t\t\tname: {\n\t\t\t\t\t\ttitle: this.$i18n( 'wikilambda-function-implementation-name-label' ),\n\t\t\t\t\t\tclass: 'ext-wikilambda-function-details-table-text'\n\t\t\t\t\t}\n\t\t\t\t};\n\n\t\t\t\t// create one column per implementation selected (or for all implementations if none are selected)\n\t\t\t\tfor ( const zid in this.implZidToState ) {\n\t\t\t\t\tvar implementationLabel = this.getZkeyLabels[ zid ];\n\t\t\t\t\tif ( !implementationLabel ) {\n\t\t\t\t\t\timplementationLabel = zid;\n\t\t\t\t\t}\n\t\t\t\t\tif ( this.implZidToState[ zid ].checked || !this.areAnyImplementationsChecked ) {\n\t\t\t\t\t\theaders[ zid ] = {\n\t\t\t\t\t\t\ttitle: implementationLabel,\n\t\t\t\t\t\t\tclass: 'ext-wikilambda-function-details-table-text'\n\t\t\t\t\t\t};\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\theaders.state = {\n\t\t\t\t\ttitle: this.$i18n( 'wikilambda-function-implementation-state-label' ),\n\t\t\t\t\tclass: 'ext-wikilambda-function-details-table-text'\n\t\t\t\t};\n\n\t\t\t\treturn headers;\n\t\t\t},\n\t\t\ttestersBody: function () {\n\t\t\t\tvar tableData = [];\n\t\t\t\tconst visibleTesters = this.testerShowAll ? this.getZTesters :\n\t\t\t\t\tthis.getPaginatedTesters[ this.currentTesterPage ];\n\t\t\t\tfor ( const index in visibleTesters ) {\n\t\t\t\t\tvar testerLabel = this.getZkeyLabels[ visibleTesters[ index ] ];\n\t\t\t\t\tif ( !testerLabel ) {\n\t\t\t\t\t\ttesterLabel = visibleTesters[ index ];\n\t\t\t\t\t}\n\t\t\t\t\tvar isAvailable = this.isFunctionItemAttached(\n\t\t\t\t\t\tvisibleTesters[ index ],\n\t\t\t\t\t\tthis.getAttachedZTesters( this.zobjectId )\n\t\t\t\t\t);\n\n\t\t\t\t\t// for each tester, store whether its checkbox is checked and whether it's available. We use this\n\t\t\t\t\t// to determine the state of the select-all checkbox, and whether the approve and deactivate\n\t\t\t\t\t// buttons should be enabled.\n\t\t\t\t\tif ( !this.testerZidToState[ visibleTesters[ index ] ] ) {\n\t\t\t\t\t\tthis.testerZidToState[ visibleTesters[ index ] ] = {\n\t\t\t\t\t\t\tavailable: isAvailable,\n\t\t\t\t\t\t\tchecked: false\n\t\t\t\t\t\t};\n\t\t\t\t\t}\n\n\t\t\t\t\ttableData[ index ] = {};\n\n\t\t\t\t\ttableData[ index ].checkbox = {\n\t\t\t\t\t\ttitle: '',\n\t\t\t\t\t\tcomponent: 'cdx-checkbox',\n\t\t\t\t\t\tprops: {\n\t\t\t\t\t\t\tmodelValue: this.testerZidToState[ visibleTesters[ index ] ].checked,\n\t\t\t\t\t\t\t'onUpdate:modelValue': function ( newValue ) {\n\t\t\t\t\t\t\t\tthis.testerZidToState[ visibleTesters[ index ] ].checked = newValue;\n\t\t\t\t\t\t\t}.bind( this )\n\t\t\t\t\t\t},\n\t\t\t\t\t\tclass: 'ext-wikilambda-function-details-table-item'\n\t\t\t\t\t};\n\n\t\t\t\t\ttableData[ index ].name = {\n\t\t\t\t\t\ttitle: testerLabel,\n\t\t\t\t\t\tcomponent: 'a',\n\t\t\t\t\t\tprops: {\n\t\t\t\t\t\t\thref: new mw.Title( visibleTesters[ index ] ).getUrl()\n\t\t\t\t\t\t},\n\t\t\t\t\t\tclass: 'ext-wikilambda-function-details-table-item'\n\t\t\t\t\t};\n\n\t\t\t\t\tfor ( const zid in this.implZidToState ) {\n\t\t\t\t\t\tif ( this.implZidToState[ zid ].checked || !this.areAnyImplementationsChecked ) {\n\t\t\t\t\t\t\ttableData[ index ][ zid ] = {\n\t\t\t\t\t\t\t\tcomponent: 'wl-z-function-tester-table',\n\t\t\t\t\t\t\t\tprops: {\n\t\t\t\t\t\t\t\t\tzFunctionId: this.getCurrentZObjectId,\n\t\t\t\t\t\t\t\t\tzImplementationId: zid,\n\t\t\t\t\t\t\t\t\tzTesterId: visibleTesters[ index ]\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tclass: 'ext-wikilambda-function-details-table-item'\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\ttableData[ index ].state = {\n\t\t\t\t\t\tcomponent: 'cdx-info-chip',\n\t\t\t\t\t\ttitle: this.$i18n(\n\t\t\t\t\t\t\tisAvailable ?\n\t\t\t\t\t\t\t\t'wikilambda-function-implementation-state-approved' :\n\t\t\t\t\t\t\t\t'wikilambda-function-implementation-state-deactivated'\n\t\t\t\t\t\t).text(),\n\t\t\t\t\t\tprops: {\n\t\t\t\t\t\t\tstatus: isAvailable ? 'success' : 'warning'\n\t\t\t\t\t\t},\n\t\t\t\t\t\tclass: 'ext-wikilambda-function-details-table-item'\n\t\t\t\t\t};\n\n\t\t\t\t\ttableData[ index ].class = this.testerZidToState[ visibleTesters[ index ] ].checked ? 'ext-wikilambda-function-details-table__row--active' : null;\n\t\t\t\t}\n\n\t\t\t\treturn tableData;\n\t\t\t},\n\t\t\tareAnyImplementationsChecked: function () {\n\t\t\t\treturn Object.keys( this.implZidToState ).some( ( zid ) => this.implZidToState[ zid ].checked );\n\t\t\t},\n\t\t\tareProposedImplementationsSelected: function () {\n\t\t\t\treturn Object.keys( this.implZidToState ).some( ( zid ) =>\n\t\t\t\t\tthis.implZidToState[ zid ].checked && !this.implZidToState[ zid ].available );\n\t\t\t},\n\t\t\tareAvailableImplementationsSelected: function () {\n\t\t\t\treturn Object.keys( this.implZidToState ).some( ( zid ) =>\n\t\t\t\t\tthis.implZidToState[ zid ].checked && this.implZidToState[ zid ].available );\n\t\t\t},\n\t\t\tareProposedTestersSelected: function () {\n\t\t\t\treturn Object.keys( this.testerZidToState ).some( ( zid ) =>\n\t\t\t\t\tthis.testerZidToState[ zid ].checked && !this.testerZidToState[ zid ].available );\n\t\t\t},\n\t\t\tareAvailableTestersSelected: function () {\n\t\t\t\treturn Object.keys( this.testerZidToState ).some( ( zid ) =>\n\t\t\t\t\tthis.testerZidToState[ zid ].checked && this.testerZidToState[ zid ].available );\n\t\t\t},\n\t\t\tshouldShowToast: function () {\n\t\t\t\treturn this.currentToast !== null;\n\t\t\t},\n\t\t\tfetchedZImplementationsAndZTesters: function () {\n\t\t\t\treturn this.zImplementationsFetched && this.zTestersFetched;\n\t\t\t}\n\t\t}\n\t),\n\tmethods: $.extend( mapActions( [\n\t\t'attachZImplementations',\n\t\t'detachZImplementations',\n\t\t'attachZTesters',\n\t\t'detachZTesters',\n\t\t'fetchZImplementations',\n\t\t'fetchZTesters',\n\t\t'getTestResults'\n\t] ), {\n\t\tupdateImplementationPage: function ( page ) {\n\t\t\tthis.currentImplementationPage = page;\n\t\t\tthis.implZidToState = {};\n\t\t},\n\t\tupdateTestersPage: function ( page ) {\n\t\t\tthis.currentTesterPage = page;\n\t\t\tthis.testerZidToState = {};\n\t\t},\n\t\tresetImplementationView: function () {\n\t\t\tthis.implementationShowAll = !this.implementationShowAll;\n\t\t},\n\t\tresetTestersView: function () {\n\t\t\tthis.testerShowAll = !this.testerShowAll;\n\t\t},\n\t\tapproveImplementations: function () {\n\t\t\t// TODO(T316566): ensure only those with the correct permissions can approve/deactivate\n\t\t\tthis.zImplementationsLoading = true;\n\t\t\tconst zidsToAttach = Object.keys( this.implZidToState ).filter( ( zid ) =>\n\t\t\t\tthis.implZidToState[ zid ].checked && !this.implZidToState[ zid ].available );\n\t\t\tconst context = this;\n\t\t\tthis.attachZImplementations( {\n\t\t\t\tfunctionId: this.zobjectId,\n\t\t\t\timplementationZIds: zidsToAttach\n\t\t\t} ).then( function () {\n\t\t\t\tcontext.implZidToState = {};\n\t\t\t} ).catch( function ( error ) {\n\t\t\t\tcontext.currentToast = error.error.message;\n\t\t\t} ).finally( function () {\n\t\t\t\tcontext.zImplementationsLoading = false;\n\t\t\t} );\n\t\t},\n\t\tdeactivateImplementations: function () {\n\t\t\tthis.zImplementationsLoading = true;\n\t\t\tconst zidsToDetach = Object.keys( this.implZidToState ).filter( ( zid ) =>\n\t\t\t\tthis.implZidToState[ zid ].checked && this.implZidToState[ zid ].available );\n\t\t\tconst context = this;\n\t\t\tthis.detachZImplementations( {\n\t\t\t\tfunctionId: this.zobjectId,\n\t\t\t\timplementationZIds: zidsToDetach\n\t\t\t} ).then( function () {\n\t\t\t\tcontext.implZidToState = {};\n\t\t\t} ).catch( function ( error ) {\n\t\t\t\tcontext.currentToast = error.error.message;\n\t\t\t} ).finally( function () {\n\t\t\t\tcontext.zImplementationsLoading = false;\n\t\t\t} );\n\t\t},\n\t\tapproveTesters: function () {\n\t\t\tthis.zTestersLoading = true;\n\t\t\tconst zidsToAttach = Object.keys( this.testerZidToState ).filter( ( zid ) =>\n\t\t\t\tthis.testerZidToState[ zid ].checked && !this.testerZidToState[ zid ].available );\n\t\t\tconst context = this;\n\t\t\tthis.attachZTesters( {\n\t\t\t\tfunctionId: this.zobjectId,\n\t\t\t\ttesterZIds: zidsToAttach\n\t\t\t} ).then( function () {\n\t\t\t\tcontext.testerZidToState = {};\n\t\t\t} ).catch( function ( error ) {\n\t\t\t\tcontext.currentToast = error.error.message;\n\t\t\t} ).finally( function () {\n\t\t\t\tcontext.zTestersLoading = false;\n\t\t\t} );\n\t\t},\n\t\tdeactivateTesters: function () {\n\t\t\tthis.zTestersLoading = true;\n\t\t\tconst zidsToDetach = Object.keys( this.testerZidToState ).filter( ( zid ) =>\n\t\t\t\tthis.testerZidToState[ zid ].checked && this.testerZidToState[ zid ].available );\n\t\t\tconst context = this;\n\t\t\tthis.detachZTesters( {\n\t\t\t\tfunctionId: this.zobjectId,\n\t\t\t\ttesterZIds: zidsToDetach\n\t\t\t} ).then( function () {\n\t\t\t\tcontext.testerZidToState = {};\n\t\t\t} ).catch( function ( error ) {\n\t\t\t\tcontext.currentToast = error.error.message;\n\t\t\t} ).finally( function () {\n\t\t\t\tcontext.zTestersLoading = false;\n\t\t\t} );\n\t\t},\n\t\tcloseToast: function () {\n\t\t\tthis.currentToast = null;\n\t\t},\n\t\trunTesters: function () {\n\t\t\tthis.getTestResults( {\n\t\t\t\tzFunctionId: this.getCurrentZObjectId,\n\t\t\t\tzImplementations: this.getZImplementations,\n\t\t\t\tzTesters: this.getZTesters,\n\t\t\t\tclearPreviousResults: true\n\t\t\t} );\n\t\t}\n\t} ),\n\twatch: {\n\t\tfetchedZImplementationsAndZTesters: function ( val ) {\n\t\t\tif ( val ) {\n\t\t\t\tthis.runTesters();\n\t\t\t}\n\t\t}\n\t},\n\tmounted: function () {\n\t\t// TODO(T314580): once the API supports it, this should be one call\n\t\tthis.fetchZImplementations( this.getCurrentZObjectId ).then( function () {\n\t\t\tthis.zImplementationsFetched = true;\n\t\t}.bind( this ) );\n\t\tthis.fetchZTesters( this.getCurrentZObjectId ).then( function () {\n\t\t\tthis.zTestersFetched = true;\n\t\t}.bind( this ) );\n\t}\n};\n</script>\n\n<style lang=\"less\">\n@import '../../../ext.wikilambda.edit.less';\n\n.ext-wikilambda-function-details {\n\tdisplay: flex;\n\t-webkit-flex-flow: row wrap;\n\tflex-flow: row wrap;\n\trow-gap: @spacing-100;\n\tcolumn-gap: @spacing-400;\n\n\t&__summary:extend(.ext-wikilambda-edit__text-regular) {\n\t\tcolor: @color-placeholder;\n\t\tmargin-bottom: @spacing-200;\n\t\twidth: @size-full;\n\t\tpadding-top: @spacing-100;\n\t}\n\n\t&__tables {\n\t\tflex: 1;\n\t\tflex-grow: 1;\n\t\twidth: calc( 100% - 400px );\n\t}\n\n\t@media screen and ( max-width: @width-breakpoint-tablet ) {\n\t\tflex-flow: column wrap;\n\n\t\t&__tables {\n\t\t\twidth: @size-full;\n\t\t}\n\n\t\t&__sidebar {\n\t\t\tflex: auto;\n\t\t}\n\t}\n}\n</style>\n","usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/resources/ext.wikilambda.edit/components/function/viewer/FunctionViewerSidebar.vue","messages":[{"ruleId":"vue/require-explicit-emits","severity":1,"message":"The \"changeShowLangs\" event has been triggered but not declared on `emits` option.","line":84,"column":16,"nodeType":"Literal","messageId":"missing","endLine":84,"endColumn":33,"suggestions":[{"messageId":"addArrayEmitsOption","data":{"name":"changeShowLangs","emitsKind":"`emits` option"},"fix":{"range":[1701,1701],"text":"\nemits: ['changeShowLangs'],"},"desc":"Add the `emits` option with array syntax and define \"changeShowLangs\" event."},{"messageId":"addObjectEmitsOption","data":{"name":"changeShowLangs","emitsKind":"`emits` option"},"fix":{"range":[1701,1701],"text":"\nemits: {'changeShowLangs': null},"},"desc":"Add the `emits` option with object syntax and define \"changeShowLangs\" event."}]}],"suppressedMessages":[{"ruleId":"vue/no-boolean-default","severity":2,"message":"Boolean prop should only be defaulted to false.","line":79,"column":13,"nodeType":"Literal","endLine":79,"endColumn":17,"suppressions":[{"kind":"directive","justification":""}]}],"errorCount":0,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"<template>\n\t<!--\n\t\tWikiLambda Vue component for the sidebar in the ZFunction Viewer.\n\n\t\t@copyright 2020– Abstract Wikipedia team; see AUTHORS.txt\n\t\t@license MIT\n\t-->\n\t<div\n\t\tclass=\"ext-wikilambda-function-viewer-sidebar\"\n\t>\n\t\t<ul\n\t\t\tv-for=\"( item, index ) in list\"\n\t\t\t:key=\"index\"\n\t\t\tclass=\"ext-wikilambda-function-viewer-sidebar__chip\"\n\t\t>\n\t\t\t<li>\n\t\t\t\t<div\n\t\t\t\t\tclass=\"ext-wikilambda-function-viewer-sidebar__chip-container\"\n\t\t\t\t>\n\t\t\t\t\t<cdx-info-chip\n\t\t\t\t\t\tclass=\"ext-wikilambda-function-viewer-sidebar__chip-item\"\n\t\t\t\t\t\t:title=\"item.languageLabel\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{{ item.isoCode.toUpperCase() }}\n\t\t\t\t\t</cdx-info-chip>\n\t\t\t\t\t{{ item.label }}\n\t\t\t\t</div>\n\t\t\t</li>\n\t\t</ul>\n\t\t<cdx-button\n\t\t\tv-if=\"shouldShowButton\"\n\t\t\tclass=\"ext-wikilambda-function-viewer-sidebar__button\"\n\t\t\t:weight=\"buttonWeight\"\n\t\t\t@click=\"changeShowLangs\"\n\t\t>\n\t\t\t<cdx-icon\n\t\t\t\tclass=\"ext-wikilambda-function-viewer-sidebar__button-icon\"\n\t\t\t\t:icon=\"buttonIcon\">\n\t\t\t</cdx-icon>\n\t\t\t{{ buttonText }}\n\t\t</cdx-button>\n\t</div>\n</template>\n\n<script>\nvar CdxInfoChip = require( '@wikimedia/codex' ).CdxInfoChip,\n\tCdxButton = require( '@wikimedia/codex' ).CdxButton,\n\tCdxIcon = require( '@wikimedia/codex' ).CdxIcon;\n\n// @vue/component\nmodule.exports = exports = {\n\tname: 'wl-function-viewer-sidebar',\n\tcomponents: {\n\t\t'cdx-info-chip': CdxInfoChip,\n\t\t'cdx-icon': CdxIcon,\n\t\t'cdx-button': CdxButton\n\t},\n\tprops: {\n\t\tlist: {\n\t\t\ttype: Array,\n\t\t\trequired: true\n\t\t},\n\t\tbuttonText: {\n\t\t\ttype: String,\n\t\t\trequired: true\n\t\t},\n\t\tbuttonWeight: {\n\t\t\ttype: String,\n\t\t\trequired: true\n\t\t},\n\t\tbuttonIcon: {\n\t\t\ttype: String,\n\t\t\trequired: true\n\t\t},\n\t\tshouldShowButton: {\n\t\t\ttype: Boolean,\n\t\t\trequired: false,\n\t\t\t// eslint-disable-next-line\n\t\t\tdefault: true\n\t\t}\n\t},\n\tmethods: {\n\t\tchangeShowLangs: function () {\n\t\t\tthis.$emit( 'changeShowLangs' );\n\t\t}\n\t}\n};\n\n</script>\n\n<style lang=\"less\">\n@import '../../../ext.wikilambda.edit.less';\n\n.ext-wikilambda-function-viewer-sidebar {\n\tul {\n\t\tlist-style: none;\n\t\tmargin-left: 0;\n\t}\n\n\t&__chip {\n\t\tmargin-bottom: @spacing-100;\n\n\t\t&-container {\n\t\t\tdisplay: inline-block;\n\t\t}\n\n\t\t&-item {\n\t\t\tmargin-right: @spacing-50;\n\t\t\tdisplay: inline-block;\n\t\t}\n\t}\n\n\t&__button {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tgap: 10px;\n\n\t\t&-icon {\n\t\t\twidth: 12px;\n\t\t\theight: 7px;\n\t\t}\n\t}\n}\n</style>\n","usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/resources/ext.wikilambda.edit/components/function/viewer/about/FunctionViewerAboutAliases.vue","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/resources/ext.wikilambda.edit/components/function/viewer/about/FunctionViewerAboutDetails.vue","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/resources/ext.wikilambda.edit/components/function/viewer/about/FunctionViewerAboutExamples.vue","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/resources/ext.wikilambda.edit/components/function/viewer/about/FunctionViewerAboutNames.vue","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/resources/ext.wikilambda.edit/components/function/viewer/details/FunctionViewerDetailsSidebar.vue","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/resources/ext.wikilambda.edit/components/function/viewer/details/FunctionViewerDetailsTable.vue","messages":[{"ruleId":"vue/require-explicit-emits","severity":1,"message":"The \"update-page\" event has been triggered but not declared on `emits` option.","line":139,"column":16,"nodeType":"Literal","messageId":"missing","endLine":139,"endColumn":29,"suggestions":[{"messageId":"addArrayEmitsOption","data":{"name":"update-page","emitsKind":"`emits` option"},"fix":{"range":[3182,3182],"text":"\nemits: ['update-page'],"},"desc":"Add the `emits` option with array syntax and define \"update-page\" event."},{"messageId":"addObjectEmitsOption","data":{"name":"update-page","emitsKind":"`emits` option"},"fix":{"range":[3182,3182],"text":"\nemits: {'update-page': null},"},"desc":"Add the `emits` option with object syntax and define \"update-page\" event."}]},{"ruleId":"vue/require-explicit-emits","severity":1,"message":"The \"reset-view\" event has been triggered but not declared on `emits` option.","line":142,"column":16,"nodeType":"Literal","messageId":"missing","endLine":142,"endColumn":28,"suggestions":[{"messageId":"addArrayEmitsOption","data":{"name":"reset-view","emitsKind":"`emits` option"},"fix":{"range":[3182,3182],"text":"\nemits: ['reset-view'],"},"desc":"Add the `emits` option with array syntax and define \"reset-view\" event."},{"messageId":"addObjectEmitsOption","data":{"name":"reset-view","emitsKind":"`emits` option"},"fix":{"range":[3182,3182],"text":"\nemits: {'reset-view': null},"},"desc":"Add the `emits` option with object syntax and define \"reset-view\" event."}]},{"ruleId":"vue/require-explicit-emits","severity":1,"message":"The \"approve\" event has been triggered but not declared on `emits` option.","line":145,"column":16,"nodeType":"Literal","messageId":"missing","endLine":145,"endColumn":25,"suggestions":[{"messageId":"addArrayEmitsOption","data":{"name":"approve","emitsKind":"`emits` option"},"fix":{"range":[3182,3182],"text":"\nemits: ['approve'],"},"desc":"Add the `emits` option with array syntax and define \"approve\" event."},{"messageId":"addObjectEmitsOption","data":{"name":"approve","emitsKind":"`emits` option"},"fix":{"range":[3182,3182],"text":"\nemits: {'approve': null},"},"desc":"Add the `emits` option with object syntax and define \"approve\" event."}]},{"ruleId":"vue/require-explicit-emits","severity":1,"message":"The \"deactivate\" event has been triggered but not declared on `emits` option.","line":148,"column":16,"nodeType":"Literal","messageId":"missing","endLine":148,"endColumn":28,"suggestions":[{"messageId":"addArrayEmitsOption","data":{"name":"deactivate","emitsKind":"`emits` option"},"fix":{"range":[3182,3182],"text":"\nemits: ['deactivate'],"},"desc":"Add the `emits` option with array syntax and define \"deactivate\" event."},{"messageId":"addObjectEmitsOption","data":{"name":"deactivate","emitsKind":"`emits` option"},"fix":{"range":[3182,3182],"text":"\nemits: {'deactivate': null},"},"desc":"Add the `emits` option with object syntax and define \"deactivate\" event."}]}],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":4,"fixableErrorCount":0,"fixableWarningCount":0,"source":"<template>\n\t<!--\n\t\tWikiLambda Vue component for the implementation table in the ZFunction Viewer Details tab.\n\n\t\t@copyright 2020– Abstract Wikipedia team; see AUTHORS.txt\n\t\t@license MIT\n\t-->\n\t<div class=\"ext-wikilambda-function-details-table\">\n\t\t<wl-table\n\t\t\t:header=\"header\"\n\t\t\t:body=\"body\"\n\t\t\t:is-loading=\"isLoading\"\n\t\t\t:aria-labelledby=\"'ext-wikilambda-function-details-table__title__text-' + name\"\n\t\t\tclass=\"ext-wikilambda-function-details-table__body\"\n\t\t>\n\t\t\t<template #table-title>\n\t\t\t\t<div class=\"ext-wikilambda-function-details-table__title\">\n\t\t\t\t\t<span\n\t\t\t\t\t\t:id=\"'ext-wikilambda-function-details-table__title__text-' + name\"\n\t\t\t\t\t\tclass=\"ext-wikilambda-function-details-table__title__text\">\n\t\t\t\t\t\t{{ title }}\n\t\t\t\t\t</span>\n\t\t\t\t\t<!-- TODO (T310164): replace with button group -->\n\t\t\t\t\t<div class=\"ext-wikilambda-function-details-table__title__buttons\">\n\t\t\t\t\t\t<cdx-button\n\t\t\t\t\t\t\tv-if=\"!( isMobile && !canApprove )\"\n\t\t\t\t\t\t\tclass=\"ext-wikilambda-function-details-table__title__buttons__approve-button\"\n\t\t\t\t\t\t\t:disabled=\"!canApprove\"\n\t\t\t\t\t\t\t@click=\"approve\">\n\t\t\t\t\t\t\t<label> {{ $i18n( 'wikilambda-function-details-table-approve' ).text() }} </label>\n\t\t\t\t\t\t</cdx-button>\n\t\t\t\t\t\t<cdx-button\n\t\t\t\t\t\t\tv-if=\"!( isMobile && !canDeactivate )\"\n\t\t\t\t\t\t\tclass=\"ext-wikilambda-function-details-table__title__buttons__deactivate-button\"\n\t\t\t\t\t\t\t:disabled=\"!canDeactivate\"\n\t\t\t\t\t\t\t@click=\"deactivate\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<label> {{ $i18n( 'wikilambda-function-details-table-deactivate' ).text() }} </label>\n\t\t\t\t\t\t</cdx-button>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</template>\n\t\t\t<template #table-empty-text>\n\t\t\t\t<div class=\"ext-wikilambda-function-details-table__empty\">\n\t\t\t\t\t<span>{{ emptyText }}</span>\n\t\t\t\t</div>\n\t\t\t</template>\n\t\t</wl-table>\n\t\t<wl-pagination\n\t\t\tv-if=\"totalPages > 1\"\n\t\t\t:total-pages=\"totalPages\"\n\t\t\t:current-page=\"currentPage\"\n\t\t\t:showing-all=\"showingAll\"\n\t\t\t@update-page=\"updateCurrentPage\"\n\t\t\t@reset-view=\"resetView\"\n\t\t></wl-pagination>\n\t</div>\n</template>\n\n<script>\nconst CdxButton = require( '@wikimedia/codex' ).CdxButton,\n\tTableContainer = require( '../../../base/Table.vue' ),\n\tPagination = require( '../../../base/Pagination.vue' ),\n\ttypeUtils = require( '../../../../mixins/typeUtils.js' ),\n\tConstants = require( '../../../../Constants.js' ),\n\tuseBreakpoints = require( '../../../../composables/useBreakpoints.js' );\n\n// @vue/component\nmodule.exports = exports = {\n\tname: 'wl-function-viewer-details-table',\n\tcomponents: {\n\t\t'cdx-button': CdxButton,\n\t\t'wl-table': TableContainer,\n\t\t'wl-pagination': Pagination\n\t},\n\tmixins: [ typeUtils ],\n\tprops: {\n\t\theader: {\n\t\t\ttype: Object,\n\t\t\trequired: true\n\t\t},\n\t\tbody: {\n\t\t\ttype: Array,\n\t\t\tdefault: function () {\n\t\t\t\treturn [];\n\t\t\t}\n\t\t},\n\t\ttitle: {\n\t\t\ttype: String,\n\t\t\trequired: false,\n\t\t\tdefault: ''\n\t\t},\n\t\temptyText: {\n\t\t\ttype: String,\n\t\t\tdefault: ''\n\t\t},\n\t\tcurrentPage: {\n\t\t\ttype: Number,\n\t\t\tdefault: 1\n\t\t},\n\t\ttotalPages: {\n\t\t\ttype: Number,\n\t\t\tdefault: 0\n\t\t},\n\t\tshowingAll: {\n\t\t\ttype: Boolean,\n\t\t\tdefualt: false\n\t\t},\n\t\tcanApprove: {\n\t\t\ttype: Boolean,\n\t\t\trequired: true\n\t\t},\n\t\tcanDeactivate: {\n\t\t\ttype: Boolean,\n\t\t\trequired: true\n\t\t},\n\t\tisLoading: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false\n\t\t},\n\t\tname: {\n\t\t\ttype: String,\n\t\t\trequired: true\n\t\t}\n\t},\n\tsetup: function () {\n\t\tvar breakpoint = useBreakpoints( Constants.breakpoints );\n\t\treturn {\n\t\t\tbreakpoint\n\t\t};\n\t},\n\tcomputed: {\n\t\tisMobile: function () {\n\t\t\treturn this.breakpoint.current.value === Constants.breakpointsTypes.MOBILE;\n\t\t}\n\t},\n\tmethods: {\n\t\tupdateCurrentPage: function ( newPage ) {\n\t\t\tthis.$emit( 'update-page', newPage );\n\t\t},\n\t\tresetView: function () {\n\t\t\tthis.$emit( 'reset-view' );\n\t\t},\n\t\tapprove: function () {\n\t\t\tthis.$emit( 'approve' );\n\t\t},\n\t\tdeactivate: function () {\n\t\t\tthis.$emit( 'deactivate' );\n\t\t}\n\t}\n};\n</script>\n\n<style lang=\"less\">\n@import '../../../../ext.wikilambda.edit.less';\n\n.ext-wikilambda-function-details-table {\n\tmargin-bottom: @spacing-250;\n\n\t&__body {\n\t\t&-link {\n\t\t\tcolor: @color-progressive;\n\t\t}\n\t}\n\n\t&__row--active {\n\t\tbackground: @background-color-progressive-subtle;\n\t}\n\n\t&__empty {\n\t\tpadding: 0 @spacing-100;\n\t\tfont-weight: @font-weight-normal;\n\t\tcolor: @color-placeholder;\n\t\twhite-space: pre-wrap;\n\t}\n\n\t&__title {\n\t\tfont-weight: @font-weight-bold;\n\t\tcolor: @color-base;\n\t\tword-break: break-all;\n\t\tbackground: @background-color-interactive;\n\t\tpadding: 0 @spacing-100;\n\t\theight: 50px;\n\t\tdisplay: flex;\n\t\talign-items: center;\n\n\t\t&__text {\n\t\t\tdisplay: block;\n\t\t\twidth: 100%;\n\t\t\tmargin-right: @spacing-50;\n\t\t\twhite-space: nowrap;\n\t\t\toverflow: hidden;\n\t\t\ttext-overflow: ellipsis;\n\t\t}\n\n\t\t&__buttons {\n\t\t\tmargin-left: auto;\n\t\t\tdisplay: flex;\n\t\t\tcolumn-gap: @spacing-75;\n\t\t}\n\t}\n\n\t&-text {\n\t\tpadding-right: @spacing-200;\n\t\tfont-weight: @font-weight-bold;\n\t\tcolor: @color-base;\n\t\tword-break: break-all;\n\n\t\t&:first-child {\n\t\t\twidth: @size-125;\n\t\t\tpadding-left: @spacing-100;\n\t\t\tpadding-right: @spacing-100;\n\t\t}\n\n\t\t.cdx-checkbox {\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: column;\n\t\t\tjustify-content: center;\n\t\t}\n\t}\n\n\t&-item {\n\t\tpadding-right: @spacing-100;\n\n\t\ta {\n\t\t\tdisplay: block; /* Fallback for non-webkit */\n\t\t\tdisplay: -webkit-box;\n\t\t\twidth: max-content;\n\t\t\tmax-width: 244px;\n\t\t\tmax-height: 44.78px; /* Fallback for non-webkit */\n\t\t\t-webkit-line-clamp: 2;\n\t\t\t-webkit-box-orient: vertical;\n\t\t\tword-break: break-all;\n\t\t\toverflow: hidden;\n\t\t\ttext-overflow: ellipsis;\n\t\t}\n\n\t\t.cdx-checkbox {\n\t\t\twidth: 22.85px;\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: column;\n\t\t\tjustify-content: center;\n\t\t}\n\n\t\t&:first-child {\n\t\t\tpadding-left: @spacing-100;\n\t\t}\n\t}\n\n\t@media screen and ( max-width: @width-breakpoint-tablet ) {\n\t\t&-item {\n\t\t\ta {\n\t\t\t\t-webkit-line-clamp: 1;\n\t\t\t\theight: 22.39px;\n\t\t\t}\n\t\t}\n\t}\n}\n</style>\n","usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/resources/ext.wikilambda.edit/components/function/viewer/details/ZMetadataDialog.vue","messages":[{"ruleId":"vue/no-v-html","severity":1,"message":"'v-html' directive can lead to XSS attack.","line":42,"column":4,"nodeType":"VAttribute","endLine":42,"endColumn":23},{"ruleId":"vue/require-explicit-emits","severity":1,"message":"The \"close-dialog\" event has been triggered but not declared on `emits` option.","line":106,"column":16,"nodeType":"Literal","messageId":"missing","endLine":106,"endColumn":30,"suggestions":[{"messageId":"addArrayEmitsOption","data":{"name":"close-dialog","emitsKind":"`emits` option"},"fix":{"range":[2284,2284],"text":"\nemits: ['close-dialog'],"},"desc":"Add the `emits` option with array syntax and define \"close-dialog\" event."},{"messageId":"addObjectEmitsOption","data":{"name":"close-dialog","emitsKind":"`emits` option"},"fix":{"range":[2284,2284],"text":"\nemits: {'close-dialog': null},"},"desc":"Add the `emits` option with object syntax and define \"close-dialog\" event."}]}],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":"<template>\n\t<!--\n\t\tWikiLambda Vue component for the Metadata Dialog.\n\n\t\t@copyright 2020– Abstract Wikipedia team; see AUTHORS.txt\n\t\t@license MIT\n\t-->\n\t<cdx-dialog\n\t\tid=\"metadata-dialog\"\n\t\tclass=\"ext-wikilambda-metadatadialog\"\n\t\t:open=\"showDialog\"\n\t\t@update:open=\"closeDialog\"\n\t>\n\t\t<div class=\"ext-wikilambda-metadatadialog__header\">\n\t\t\t<span class=\"ext-wikilambda-metadatadialog__header__title\">\n\t\t\t\t{{ $i18n( 'wikilambda-functioncall-metadata-dialog-header' ).text() }}\n\t\t\t</span>\n\t\t\t<!-- TODO (T320669): Construct this more nicely, perhaps with a Codex link component? -->\n\t\t\t<div class=\"ext-wikilambda-metadatadialog__header__helplink\">\n\t\t\t\t<cdx-icon :icon=\"icons.cdxIconHelpNotice\"></cdx-icon>\n\t\t\t\t<a\n\t\t\t\t\t:title=\"tooltipMetaDataHelpLink\"\n\t\t\t\t\tclass=\"ext-wikilambda-metadatadialog__header__helplink-text\"\n\t\t\t\t\t:href=\"parsedMetaDataHelpLink\"\n\t\t\t\t\ttarget=\"_blank\">\n\t\t\t\t\t{{ $i18n( 'wikilambda-helplink-button' ).text() }}\n\t\t\t\t</a>\n\t\t\t</div>\n\t\t\t<cdx-button\n\t\t\t\tweight=\"quiet\"\n\t\t\t\tclass=\"ext-wikilambda-metadatadialog__header__close-button\"\n\t\t\t\t@click=\"closeDialog\"\n\t\t\t>\n\t\t\t\t<cdx-icon :icon=\"icons.cdxIconClose\"></cdx-icon>\n\t\t\t</cdx-button>\n\t\t</div>\n\t\t<strong v-if=\"implementationLabel\">{{ implementationLabel }}</strong>\n\t\t<br>\n\t\t<strong v-if=\"testerLabel\">{{ testerLabel }}</strong>\n\t\t<span\n\t\t\tv-if=\"metadata\"\n\t\t\tv-html=\"dialogText\"\n\t\t>\n\t\t</span>\n\t</cdx-dialog>\n</template>\n\n<script>\nvar CdxDialog = require( '@wikimedia/codex' ).CdxDialog,\n\tCdxButton = require( '@wikimedia/codex' ).CdxButton,\n\tCdxIcon = require( '@wikimedia/codex' ).CdxIcon,\n\tmapGetters = require( 'vuex' ).mapGetters,\n\tmapActions = require( 'vuex' ).mapActions,\n\tschemata = require( '../../../../mixins/schemata.js' ),\n\tportray = require( '../../../../mixins/portray.js' ),\n\ticons = require( '../../../../../lib/icons.json' );\n\n// @vue/component\nmodule.exports = exports = {\n\tname: 'wl-z-metadata-dialog',\n\tcomponents: {\n\t\t'cdx-dialog': CdxDialog,\n\t\t'cdx-button': CdxButton,\n\t\t'cdx-icon': CdxIcon\n\t},\n\tmixins: [ portray, schemata ],\n\tprops: {\n\t\tshowDialog: {\n\t\t\ttype: Boolean,\n\t\t\trequired: true\n\t\t},\n\t\timplementationLabel: {\n\t\t\ttype: String,\n\t\t\trequired: false,\n\t\t\tdefault: ''\n\t\t},\n\t\ttesterLabel: {\n\t\t\ttype: String,\n\t\t\trequired: false,\n\t\t\tdefault: ''\n\t\t},\n\t\tmetadata: {\n\t\t\ttype: String,\n\t\t\trequired: true\n\t\t}\n\t},\n\tdata: function () {\n\t\treturn {\n\t\t\ticons: icons\n\t\t};\n\t},\n\tcomputed: $.extend( mapGetters( [ 'getZkeyLabels' ] ), {\n\t\tdialogText: function () {\n\t\t\t// Ensure ZIDs appearing in metadata have been fetched\n\t\t\tconst metadataZIDs = this.extractZIDs( this.metadata );\n\t\t\tthis.fetchZKeys( { zids: metadataZIDs } );\n\t\t\treturn this.portrayMetadataMap( this.metadata, this.getZkeyLabels );\n\t\t},\n\t\tparsedMetaDataHelpLink: function () {\n\t\t\tconst unformattedLink = this.$i18n( 'wikilambda-metadata-help-link' ).text();\n\t\t\treturn mw.internalWikiUrlencode( unformattedLink );\n\t\t}\n\t} ),\n\tmethods: $.extend( mapActions( [ 'fetchZKeys' ] ), {\n\t\tcloseDialog: function () {\n\t\t\tthis.$emit( 'close-dialog' );\n\t\t}\n\t} )\n};\n</script>\n\n<style lang=\"less\">\n@import '../../../../ext.wikilambda.edit.less';\n\n/* stylelint-disable selector-max-id */\n#metadata-dialog .cdx-dialog__header {\n\tdisplay: none;\n}\n\n.ext-wikilambda-metadatadialog {\n\t&__header {\n\t\tdisplay: flex;\n\t\tjustify-content: space-between;\n\t\tpadding: @spacing-50 0;\n\t\tposition: sticky;\n\t\ttop: 0;\n\t\tbackground: @background-color-base;\n\n\t\t&__title {\n\t\t\twidth: 100%;\n\t\t\tfont-weight: bold;\n\t\t\tfont-size: 1.15em;\n\t\t\tmargin: auto;\n\t\t\tdisplay: flex;\n\n\t\t\t&-link {\n\t\t\t\tmargin-left: @spacing-50;\n\t\t\t}\n\t\t}\n\n\t\t&__helplink {\n\t\t\tdisplay: flex;\n\t\t\tmargin: auto;\n\n\t\t\t&-text {\n\t\t\t\tmargin-left: @spacing-50;\n\t\t\t\tmargin-right: @spacing-100;\n\t\t\t}\n\t\t}\n\n\t\t&__close-button {\n\t\t\tdisplay: flex;\n\t\t\tcolor: @color-base;\n\t\t\tjustify-content: center;\n\t\t\talign-items: center;\n\t\t\theight: @size-200;\n\t\t\twidth: @size-200;\n\t\t\tbackground: none;\n\t\t\tborder: 0;\n\t\t\tmargin: auto;\n\t\t}\n\t}\n}\n</style>\n","usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/resources/ext.wikilambda.edit/components/main-types/ZArgument.vue","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/resources/ext.wikilambda.edit/components/main-types/ZArgumentList.vue","messages":[{"ruleId":"vue/no-undef-components","severity":1,"message":"The '<wl-z-list-item>' component has been used, but not defined.","line":11,"column":4,"nodeType":"VStartTag","messageId":"undef","endLine":17,"endColumn":5},{"ruleId":"vue/no-unregistered-components","severity":1,"message":"The \"wl-z-list-item\" component has been used but not registered.","line":11,"column":4,"nodeType":"VElement","endLine":17,"endColumn":22}],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":"<template>\n\t<!--\n\t\tWikiLambda Vue component for ZLists of ZArgument objects.\n\n\t\t@copyright 2020– Abstract Wikipedia team; see AUTHORS.txt\n\t\t@license MIT\n\t-->\n\t<div>\n\t\t<h3>{{ $i18n( 'wikilambda-editor-argument-list-label' ).text() }}</h3>\n\t\t<ul class=\"ext-wikilambda-zlist-no-bullets ext-wikilambda-zargumentlist\">\n\t\t\t<wl-z-list-item\n\t\t\t\tv-for=\"( item ) in ZlistItems\"\n\t\t\t\t:key=\"item.id\"\n\t\t\t\t:zobject-id=\"item.id\"\n\t\t\t\t:viewmode=\"viewmode\"\n\t\t\t\t@remove-item=\"removeItem\"\n\t\t\t></wl-z-list-item>\n\t\t\t<li v-if=\"!viewmode\">\n\t\t\t\t<cdx-button :title=\"tooltipAddListItem\" @click=\"addNewItem\">\n\t\t\t\t\t{{ $i18n( 'wikilambda-editor-additem' ).text() }}\n\t\t\t\t</cdx-button>\n\t\t\t</li>\n\t\t</ul>\n\t</div>\n</template>\n\n<script>\nvar mapActions = require( 'vuex' ).mapActions,\n\tmapGetters = require( 'vuex' ).mapGetters,\n\tCdxButton = require( '@wikimedia/codex' ).CdxButton,\n\tZTypedList = require( './ZTypedList.vue' );\n\n// @vue/component\nmodule.exports = exports = {\n\tname: 'wl-z-argument-list',\n\tcomponents: {\n\t\t'cdx-button': CdxButton\n\t},\n\textends: ZTypedList,\n\tcomputed: mapGetters( [ 'getNextObjectId' ] ),\n\tmethods: $.extend( mapActions(\n\t\t[ 'addZArgument', 'removeZObjectChildren', 'removeZObject', 'recalculateZArgumentList', 'setIsZObjectDirty' ] ), {\n\t\taddNewItem: function ( /* event */ ) {\n\t\t\tvar nextId = this.getNextObjectId,\n\t\t\t\tpayload = {\n\t\t\t\t\tkey: `${this.ZlistItemsLength + 1}`,\n\t\t\t\t\tvalue: 'object',\n\t\t\t\t\tparent: this.zobjectId\n\t\t\t\t};\n\t\t\tthis.addZObject( payload );\n\n\t\t\tthis.addZArgument( { id: nextId } );\n\t\t\tthis.setIsZObjectDirty( true );\n\t\t},\n\t\tremoveItem: function ( itemId ) {\n\t\t\tthis.removeZObjectChildren( itemId );\n\t\t\tthis.removeZObject( itemId );\n\t\t\tthis.recalculateZArgumentList( this.zobjectId );\n\t\t\tthis.setIsZObjectDirty( true );\n\t\t}\n\t} )\n};\n</script>\n","usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/resources/ext.wikilambda.edit/components/main-types/ZArgumentReference.vue","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/resources/ext.wikilambda.edit/components/main-types/ZBoolean.vue","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/resources/ext.wikilambda.edit/components/main-types/ZCharacter.vue","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/resources/ext.wikilambda.edit/components/main-types/ZCode.vue","messages":[{"ruleId":"vue/require-explicit-emits","severity":1,"message":"The \"select-language\" event has been triggered but not declared on `emits` option.","line":184,"column":17,"nodeType":"Literal","messageId":"missing","endLine":184,"endColumn":34,"suggestions":[{"messageId":"addArrayEmitsOption","data":{"name":"select-language","emitsKind":"`emits` option"},"fix":{"range":[1841,1841],"text":"\nemits: ['select-language'],"},"desc":"Add the `emits` option with array syntax and define \"select-language\" event."},{"messageId":"addObjectEmitsOption","data":{"name":"select-language","emitsKind":"`emits` option"},"fix":{"range":[1841,1841],"text":"\nemits: {'select-language': null},"},"desc":"Add the `emits` option with object syntax and define \"select-language\" event."}]},{"ruleId":"vue/require-explicit-emits","severity":1,"message":"The \"update-code\" event has been triggered but not declared on `emits` option.","line":201,"column":18,"nodeType":"Literal","messageId":"missing","endLine":201,"endColumn":31,"suggestions":[{"messageId":"addArrayEmitsOption","data":{"name":"update-code","emitsKind":"`emits` option"},"fix":{"range":[1841,1841],"text":"\nemits: ['update-code'],"},"desc":"Add the `emits` option with array syntax and define \"update-code\" event."},{"messageId":"addObjectEmitsOption","data":{"name":"update-code","emitsKind":"`emits` option"},"fix":{"range":[1841,1841],"text":"\nemits: {'update-code': null},"},"desc":"Add the `emits` option with object syntax and define \"update-code\" event."}]}],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":"<template>\n\t<!--\n\t\tWikiLambda Vue component for ZCode objects.\n\n\t\t@copyright 2020– Abstract Wikipedia team; see AUTHORS.txt\n\t\t@license MIT\n\t-->\n\t<div class=\"ext-wikilambda-zcode\">\n\t\t<span v-if=\"viewmode || readonly\">{{ selectedLanguage }}</span>\n\t\t<!-- eslint-disable vue/no-v-model-argument -->\n\t\t<!-- eslint-disable vue/no-unsupported-features -->\n\t\t<cdx-select\n\t\t\tv-else\n\t\t\tv-model:selected=\"selectedLanguage\"\n\t\t\tclass=\"ext-wikilambda-zcode__language-selector\"\n\t\t\t:menu-items=\"programmingLangsList\"\n\t\t\t:default-label=\"$i18n( 'wikilambda-editor-label-select-programming-language-label' ).text()\"\n\t\t\t@update:selected=\"selectLanguage\"\n\t\t></cdx-select>\n\t\t<wl-code-editor\n\t\t\tclass=\"ext-wikilambda-zcode__code-editor\"\n\t\t\t:aria-label=\"$i18n( 'wikilambda-code-editor-label' ).text()\"\n\t\t\t:mode=\"selectedLanguage\"\n\t\t\t:read-only=\"!selectedLanguage || viewmode || readonly\"\n\t\t\t:value=\"editorValue\"\n\t\t\t@change=\"updateCode\"\n\t\t></wl-code-editor>\n\t\t<cdx-message\n\t\t\tv-if=\"errorState\"\n\t\t\tclass=\"ext-wikilambda-select-zobject__error\"\n\t\t\t:type=\"errorType\"\n\t\t\tinline\n\t\t>\n\t\t\t{{ errorMessage }}\n\t\t</cdx-message>\n\t</div>\n</template>\n\n<script>\nvar Constants = require( '../../Constants.js' ),\n\ttypeUtils = require( './../../mixins/typeUtils.js' ),\n\tCodeEditor = require( '../base/CodeEditor.vue' ),\n\tCdxSelect = require( '@wikimedia/codex' ).CdxSelect,\n\tCdxMessage = require( '@wikimedia/codex' ).CdxMessage,\n\tmapActions = require( 'vuex' ).mapActions,\n\tmapGetters = require( 'vuex' ).mapGetters;\n\n// @vue/component\nmodule.exports = exports = {\n\tname: 'wl-z-code',\n\tcomponents: {\n\t\t'wl-code-editor': CodeEditor,\n\t\t'cdx-select': CdxSelect,\n\t\t'cdx-message': CdxMessage\n\t},\n\tmixins: [ typeUtils ],\n\tinject: {\n\t\tviewmode: { default: false }\n\t},\n\tprops: {\n\t\tzobjectId: {\n\t\t\ttype: Number,\n\t\t\trequired: true\n\t\t},\n\t\treadonly: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false\n\t\t}\n\t},\n\tdata: function () {\n\t\treturn {\n\t\t\teditorValue: '',\n\t\t\tallowSetEditorValue: true\n\t\t};\n\t},\n\tcomputed: $.extend(\n\t\tmapGetters( [\n\t\t\t'getAllProgrammingLangs',\n\t\t\t'getZObjectChildrenById',\n\t\t\t'getErrors'\n\t\t] ),\n\t\t{\n\t\t\tzobject: function () {\n\t\t\t\treturn this.getZObjectChildrenById( this.zobjectId );\n\t\t\t},\n\t\t\tzCodeLanguage: function () {\n\t\t\t\treturn this.findKeyInArray( Constants.Z_CODE_LANGUAGE, this.zobject );\n\t\t\t},\n\t\t\tzCodeProgrammingLanguage: function () {\n\t\t\t\treturn this.findKeyInArray(\n\t\t\t\t\tConstants.Z_STRING_VALUE,\n\t\t\t\t\tthis.getZObjectChildrenById(\n\t\t\t\t\t\tthis.findKeyInArray(\n\t\t\t\t\t\t\tConstants.Z_PROGRAMMING_LANGUAGE_CODE,\n\t\t\t\t\t\t\tthis.getZObjectChildrenById( this.zCodeLanguage.id )\n\t\t\t\t\t\t).id\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t},\n\t\t\tcodeValue: function () {\n\t\t\t\treturn this.findKeyInArray(\n\t\t\t\t\tConstants.Z_STRING_VALUE,\n\t\t\t\t\tthis.getZObjectChildrenById( this.codeItem.id )\n\t\t\t\t).value;\n\t\t\t},\n\t\t\tcodeItem: function () {\n\t\t\t\treturn this.findKeyInArray( Constants.Z_CODE_CODE, this.zobject );\n\t\t\t},\n\t\t\tselectedLanguage: {\n\t\t\t\tget: function () {\n\t\t\t\t\treturn this.zCodeProgrammingLanguage.value || '';\n\t\t\t\t},\n\t\t\t\tset: function ( val ) {\n\t\t\t\t\tthis.selectLanguage( val );\n\t\t\t\t}\n\t\t\t},\n\t\t\tprogrammingLangsList: function () {\n\t\t\t\tvar programmingLangs = [];\n\t\t\t\tif ( this.getAllProgrammingLangs.length > 0 ) {\n\t\t\t\t\tfor ( var lang in this.getAllProgrammingLangs ) {\n\t\t\t\t\t\tprogrammingLangs.push(\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tlabel: this.getAllProgrammingLangs[\n\t\t\t\t\t\t\t\t\tlang\n\t\t\t\t\t\t\t\t][\n\t\t\t\t\t\t\t\t\tConstants.Z_PERSISTENTOBJECT_VALUE\n\t\t\t\t\t\t\t\t][\n\t\t\t\t\t\t\t\t\tConstants.Z_PROGRAMMING_LANGUAGE_CODE\n\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\tvalue: this.getAllProgrammingLangs[\n\t\t\t\t\t\t\t\t\tlang\n\t\t\t\t\t\t\t\t][\n\t\t\t\t\t\t\t\t\tConstants.Z_PERSISTENTOBJECT_VALUE\n\t\t\t\t\t\t\t\t][\n\t\t\t\t\t\t\t\t\tConstants.Z_PROGRAMMING_LANGUAGE_CODE\n\t\t\t\t\t\t\t\t]\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn programmingLangs;\n\t\t\t},\n\t\t\terrorState: function () {\n\t\t\t\t// the error is not guaranteed to exist\n\t\t\t\tif ( this.getErrors[ this.zobjectId ] ) {\n\t\t\t\t\treturn this.getErrors[ this.zobjectId ].state;\n\t\t\t\t}\n\n\t\t\t\treturn false;\n\t\t\t},\n\t\t\terrorMessage: function () {\n\t\t\t\tif ( this.getErrors[ this.zobjectId ] ) {\n\t\t\t\t\tconst messageStr = this.getErrors[ this.zobjectId ].message;\n\t\t\t\t\treturn this.$i18n( messageStr ).text();\n\t\t\t\t}\n\t\t\t\treturn null;\n\t\t\t},\n\t\t\terrorType: function () {\n\t\t\t\tif ( this.getErrors[ this.zobjectId ] ) {\n\t\t\t\t\treturn this.getErrors[ this.zobjectId ].type;\n\t\t\t\t}\n\t\t\t\treturn null;\n\t\t\t}\n\t\t} ),\n\tmethods: $.extend(\n\t\tmapActions( [\n\t\t\t'fetchAllZProgrammingLanguages',\n\t\t\t'setError'\n\t\t] ),\n\t\t{\n\t\t\t/**\n\t\t\t * Sets the value Z_PROGRAMMING_LANGUAGE_CODE.\n\t\t\t *\n\t\t\t * @param {string} value\n\t\t\t */\n\t\t\tselectLanguage: function ( value ) {\n\t\t\t\tthis.allowSetEditorValue = true;\n\n\t\t\t\tvar payload = {\n\t\t\t\t\tzobject: this.zCodeLanguage,\n\t\t\t\t\tvalue: value\n\t\t\t\t};\n\t\t\t\tthis.$emit( 'select-language', payload );\n\t\t\t},\n\t\t\tupdateCode: function ( code ) {\n\t\t\t\t// there is an edge case where acejs will trigger an empty change that we process as an event object\n\t\t\t\t// we don't want to update our object with that bad data\n\t\t\t\t// TODO(T324605): this deserves a deeper investigation\n\t\t\t\tif ( typeof code !== 'object' ) {\n\t\t\t\t\tvar payload = {\n\t\t\t\t\t\tzobject: {\n\t\t\t\t\t\t\tZ1K1: Constants.Z_STRING,\n\t\t\t\t\t\t\tZ6K1: code\n\t\t\t\t\t\t},\n\t\t\t\t\t\tid: this.codeItem.id,\n\t\t\t\t\t\tkey: Constants.Z_CODE_CODE,\n\t\t\t\t\t\tparent: this.zobjectId\n\t\t\t\t\t};\n\n\t\t\t\t\tthis.$emit( 'update-code', payload );\n\n\t\t\t\t\tthis.setError( {\n\t\t\t\t\t\tinternalId: this.zobjectId,\n\t\t\t\t\t\terrorState: false\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t}\n\t\t} ),\n\twatch: {\n\t\tcodeValue: {\n\t\t\timmediate: true,\n\t\t\thandler: function () {\n\t\t\t\t// Check allowSetEditorValue to ensure we only set value in the editor when its current value should be\n\t\t\t\t// overriden (e.g. when the editor is first loaded, or when the language changes). Ensuring this\n\t\t\t\t// prevents a bug that moves the cursor to the end of the editor on every keypress.\n\t\t\t\tif ( this.allowSetEditorValue ) {\n\t\t\t\t\tthis.editorValue = this.codeValue || '';\n\t\t\t\t\tthis.allowSetEditorValue = false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t},\n\tmounted: function () {\n\t\tif ( this.getAllProgrammingLangs.length <= 0 ) {\n\t\t\tthis.fetchAllZProgrammingLanguages();\n\t\t}\n\t}\n};\n</script>\n\n<style lang=\"less\">\n.ext-wikilambda-zcode {\n\tdisplay: block;\n\tpadding: 1em;\n\toutline: 1px dashed #888;\n\tmax-width: 600px;\n\n\t&__language-selector {\n\t\twidth: 200px;\n\t}\n}\n\n@media only screen and ( min-width: 600px ) {\n\t.ext-wikilambda-zcode {\n\t\twidth: 600px;\n\t}\n}\n</style>\n","usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/resources/ext.wikilambda.edit/components/main-types/ZFunction.vue","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/resources/ext.wikilambda.edit/components/main-types/ZFunctionCall.vue","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/resources/ext.wikilambda.edit/components/main-types/ZFunctionCallToType.vue","messages":[{"ruleId":"vue/no-undef-components","severity":1,"message":"The '<wl-z-object>' component has been used, but not defined.","line":21,"column":4,"nodeType":"VStartTag","messageId":"undef","endLine":27,"endColumn":5}],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"<template>\n\t<!--\n\t\tWikiLambda Vue component for ZFunctionCallToType objects.\n\n\t\t@copyright 2020– Abstract Wikipedia team; see AUTHORS.txt\n\t\t@license MIT\n\t-->\n\t<div class=\"ext-wikilambda-function-call-to-type-block\">\n\t\t<template v-if=\"!allArgumentsTypeSet\">\n\t\t\t<div v-for=\"( argument, index ) in functionCallArguments\" :key=\"argument.id\">\n\t\t\t\t<wl-z-object-selector\n\t\t\t\t\t:type=\"Constants.zType\"\n\t\t\t\t\t:placeholder=\"$i18n( 'wikilambda-ztyped-map-placeholder' ).text()\"\n\t\t\t\t\t:readonly=\"readonly\"\n\t\t\t\t\t@input=\"onTypeChange( $event, argument.id, index )\"\n\t\t\t\t></wl-z-object-selector>\n\t\t\t</div>\n\t\t</template>\n\t\t<template v-else>\n\t\t\t<!-- eslint-disable-next-line vue/no-unregistered-components -->\n\t\t\t<wl-z-object\n\t\t\t\tv-for=\"key in objectKeys\"\n\t\t\t\t:key=\"key.id\"\n\t\t\t\t:zobject-id=\"key.id\"\n\t\t\t\t:readonly=\"readonly\"\n\t\t\t\t:persistent=\"false\"\n\t\t\t></wl-z-object>\n\t\t</template>\n\t</div>\n</template>\n\n<script>\nvar Constants = require( '../../Constants.js' ),\n\tZObjectSelector = require( '../ZObjectSelector.vue' ),\n\tmapActions = require( 'vuex' ).mapActions,\n\tmapGetters = require( 'vuex' ).mapGetters,\n\ttypeUtils = require( '../../mixins/typeUtils.js' );\n\n// @vue/component\nmodule.exports = exports = {\n\tname: 'wl-z-function-call-to-type',\n\tcomponents: {\n\t\t'wl-z-object-selector': ZObjectSelector\n\t},\n\tmixins: [ typeUtils ],\n\tinject: {\n\t\tviewmode: { default: false }\n\t},\n\tprops: {\n\t\tzobjectId: {\n\t\t\ttype: Number,\n\t\t\trequired: true\n\t\t}\n\t},\n\tdata: function () {\n\t\treturn {\n\t\t\tfunctionCallArgumentsType: []\n\t\t};\n\t},\n\tcomputed: $.extend( mapGetters( [\n\t\t'getZObjectChildrenByIdRecursively',\n\t\t'getNestedZObjectById'\n\t] ), {\n\t\tzobjectChildren: function () {\n\t\t\treturn this.getZObjectChildrenByIdRecursively( this.zobjectId );\n\t\t},\n\t\tConstants: function () {\n\t\t\treturn Constants;\n\t\t},\n\t\tzObjectType: function () {\n\t\t\t// We can receive a straigh reference, a function call, or a functioncall with a reference\n\t\t\tvar typeFromFunctionCallWithReference = this.getNestedZObjectById(\n\t\t\t\t\tthis.zobjectId,\n\t\t\t\t\t[ Constants.Z_OBJECT_TYPE, Constants.Z_FUNCTION_CALL_FUNCTION, Constants.Z_REFERENCE_ID ]\n\t\t\t\t) || {},\n\t\t\t\ttypeFromFunctionCall = this.getNestedZObjectById(\n\t\t\t\t\tthis.zobjectId,\n\t\t\t\t\t[ Constants.Z_OBJECT_TYPE, Constants.Z_FUNCTION_CALL_FUNCTION ]\n\t\t\t\t) || {},\n\t\t\t\ttypeFromReference = this.getNestedZObjectById(\n\t\t\t\t\tthis.zobjectId,\n\t\t\t\t\t[ Constants.Z_OBJECT_TYPE, Constants.Z_REFERENCE_ID ]\n\t\t\t\t) || {};\n\n\t\t\treturn typeFromFunctionCallWithReference.value || typeFromFunctionCall.value || typeFromReference.value;\n\t\t},\n\t\t// This are the argument needed for the function call to be performed\n\t\tfunctionCallArguments: function () {\n\t\t\tvar keys = this.zobjectChildren.filter( function ( child ) {\n\t\t\t\treturn child.key.indexOf( this.zObjectType ) !== -1;\n\t\t\t}.bind( this ) );\n\n\t\t\treturn keys;\n\t\t},\n\t\t// This are the individual keys from the type of the function call\n\t\tobjectKeys: function () {\n\t\t\t// we return all the immediate children that are not Z_OBJECT_TYPE (Z1K1)\n\t\t\treturn this.zobjectChildren.filter( function ( child ) {\n\t\t\t\treturn child.key !== Constants.Z_OBJECT_TYPE && child.parent === this.zobjectId;\n\t\t\t}.bind( this ) );\n\t\t},\n\t\tallArgumentsTypeSet: function () {\n\t\t\treturn this.functionCallArguments.every( ( argument ) => argument.value !== '' );\n\t\t},\n\t\tdynamicZKey: function () {\n\t\t\treturn this.zObjectType + '(' + this.functionCallArgumentsType.join( ',' ) + ')';\n\t\t}\n\t} ),\n\tmethods: $.extend( mapActions( [\n\t\t'changeType',\n\t\t'addZReference',\n\t\t'retriveTypeOfFunctionToType'\n\t] ), {\n\t\tonTypeChange: function ( type, argumentId, index ) {\n\t\t\tthis.addZReference( {\n\t\t\t\tvalue: type,\n\t\t\t\tid: argumentId\n\t\t\t} );\n\t\t\tthis.argumentsType[ index ] = type;\n\t\t}\n\t} ),\n\twatch: {\n\t\tallArgumentsTypeSet: function ( allValuesSet ) {\n\t\t\tif ( allValuesSet ) {\n\t\t\t\tthis.retriveTypeOfFunctionToType( { objectId: this.zobjectId, dynamicZKey: this.dynamicZKey } )\n\t\t\t\t\t.then( function () {\n\t\t\t\t\t\tthis.changeType( {\n\t\t\t\t\t\t\tid: this.zobjectId,\n\t\t\t\t\t\t\ttype: this.dynamicZKey\n\t\t\t\t\t\t} );\n\t\t\t\t\t}.bind( this ) );\n\t\t\t}\n\t\t}\n\t},\n\tbeforeCreate: function () {\n\t\tthis.$options.components[ 'wl-z-object' ] = require( '../ZObject.vue' );\n\t}\n};\n</script>\n\n<style lang=\"less\">\n.ext-wikilambda-function-call-to-type-block {\n\tbackground: rgba( 0, 0, 0, 0.03 );\n\toutline: 1px dotted #888;\n\tmargin: 5px;\n\tpadding: 5px;\n}\n\n.ext-wikilambda-orchestrated-result {\n\tdisplay: block;\n\tpadding: 1em;\n\tbackground: #eef;\n\toutline: 1px dashed #888;\n}\n\n.ext-wikilambda-orchestrated-result > span {\n\tdisplay: inline-block;\n\tvertical-align: top;\n\tmargin-top: 5px;\n}\n</style>\n","usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/resources/ext.wikilambda.edit/components/main-types/ZImplementation.vue","messages":[{"ruleId":"vue/no-undef-components","severity":1,"message":"The '<wl-z-object>' component has been used, but not defined.","line":58,"column":3,"nodeType":"VStartTag","messageId":"undef","endLine":62,"endColumn":4}],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"<template>\n\t<!--\n\t\tWikiLambda Vue component for ZImplementation objects.\n\n\t\t@copyright 2020– Abstract Wikipedia team; see AUTHORS.txt\n\t\t@license MIT\n\t-->\n\t<div class=\"ext-wikilambda-zimplementation\">\n\t\t<div>\n\t\t\t<label id=\"ext-wikilambda-zimplementation_function-label\">{{ functionLabel }}:</label>\n\t\t\t<wl-z-object-selector\n\t\t\t\tv-if=\"!viewmode && implMode\"\n\t\t\t\tclass=\"ext-wikilambda-zimplementation__function-selector\"\n\t\t\t\taria-labelledby=\"ext-wikilambda-zimplementation_function-label\"\n\t\t\t\t:type=\"Constants.Z_FUNCTION\"\n\t\t\t\t:placeholder=\"$i18n( 'wikilambda-function-typeselector-label' ).text()\"\n\t\t\t\t:selected-id=\"zFunction.value\"\n\t\t\t\t:initial-selection-label=\"selectedFunctionLabel\"\n\t\t\t\t:zobject-id=\"zFunction.id\"\n\t\t\t\t@input=\"updateZFunctionType\"\n\t\t\t></wl-z-object-selector>\n\t\t\t<template v-else>\n\t\t\t\t<wl-z-reference\n\t\t\t\t\tv-if=\"zFunction.value\"\n\t\t\t\t\t:zobject-key=\"zFunction.value\"\n\t\t\t\t\t:readonly=\"true\"\n\t\t\t\t></wl-z-reference>\n\t\t\t\t<span v-else>{{ $i18n( 'wikilambda-invalidzobject' ).text() }}</span>\n\t\t\t\t<span class=\"ext-wikilambda-zimplementation__-is-impl-associated\">\n\t\t\t\t\t<cdx-icon :icon=\"associatedIcon()\"></cdx-icon>\n\t\t\t\t\t({{ isImplementationAttached ?\n\t\t\t\t\t\t$i18n( 'wikilambda-function-is-approved' ).text() :\n\t\t\t\t\t\t$i18n( 'wikilambda-function-is-not-approved' ).text()\n\t\t\t\t\t}})\n\t\t\t\t</span>\n\t\t\t</template>\n\t\t</div>\n\t\t<div v-if=\"!viewmode && implMode\">\n\t\t\t<!-- eslint-disable vue/no-v-model-argument -->\n\t\t\t<!-- eslint-disable vue/no-unsupported-features -->\n\t\t\t<cdx-select\n\t\t\t\tv-model:selected=\"implMode\"\n\t\t\t\tclass=\"ext-wikilambda-zimplementation__mode-selector\"\n\t\t\t\t:menu-items=\"implementationModeItems\"\n\t\t\t\t@update:selected=\"changeImplMode\"\n\t\t\t>\n\t\t\t</cdx-select>\n\t\t</div>\n\t\t<div v-if=\"implMode === null\">\n\t\t\t<span>{{ $i18n( 'wikilambda-implementation-selector-none' ).text() }}</span>\n\t\t</div>\n\t\t<wl-z-code\n\t\t\tv-if=\"implMode === Constants.implementationModes.CODE\"\n\t\t\t:zobject-id=\"zCodeId\"\n\t\t\t@select-language=\"selectLanguage\"\n\t\t\t@update-code=\"updateCode\"\n\t\t></wl-z-code>\n\t\t<wl-z-object\n\t\t\tv-if=\"implMode === Constants.implementationModes.COMPOSITION\"\n\t\t\t:zobject-id=\"zCompositionId\"\n\t\t\t:persistent=\"false\"\n\t\t></wl-z-object>\n\t\t<wl-z-function-tester-report\n\t\t\t:z-function-id=\"zFunction.value || ''\"\n\t\t\t:z-implementation-id=\"zImplementationId\"\n\t\t></wl-z-function-tester-report>\n\t</div>\n</template>\n\n<script>\nvar Constants = require( '../../Constants.js' ),\n\tmapGetters = require( 'vuex' ).mapGetters,\n\tmapActions = require( 'vuex' ).mapActions,\n\tCdxSelect = require( '@wikimedia/codex' ).CdxSelect,\n\tCdxIcon = require( '@wikimedia/codex' ).CdxIcon,\n\ticons = require( '../../../lib/icons.json' ),\n\ttypeUtils = require( '../../mixins/typeUtils.js' ),\n\tZCode = require( './ZCode.vue' ),\n\tZObjectSelector = require( '../ZObjectSelector.vue' ),\n\tZReference = require( './ZReference.vue' ),\n\tZFunctionTesterReport = require( '../function/ZFunctionTesterReport.vue' );\n\n// @vue/component\nmodule.exports = exports = {\n\tcomponents: {\n\t\t'wl-z-code': ZCode,\n\t\t'wl-z-object-selector': ZObjectSelector,\n\t\t'wl-z-reference': ZReference,\n\t\t'wl-z-function-tester-report': ZFunctionTesterReport,\n\t\t'cdx-select': CdxSelect,\n\t\t'cdx-icon': CdxIcon\n\t},\n\tmixins: [ typeUtils ],\n\tprovide: {\n\t\tallowArgRefMode: true\n\t},\n\tinject: {\n\t\tviewmode: { default: false }\n\t},\n\tprops: {\n\t\tzobjectId: {\n\t\t\ttype: Number,\n\t\t\trequired: true\n\t\t}\n\t},\n\tdata: function () {\n\t\treturn {\n\t\t\timplMode: null\n\t\t};\n\t},\n\tcomputed: $.extend( {},\n\t\tmapGetters( [\n\t\t\t'getZObjectById',\n\t\t\t'getZObjectChildrenById',\n\t\t\t'getZkeyLabels',\n\t\t\t'getZkeys',\n\t\t\t'getNestedZObjectById',\n\t\t\t'getZarguments',\n\t\t\t'isNewZObject'\n\t\t] ),\n\t\t{\n\t\t\tConstants: function () {\n\t\t\t\treturn Constants;\n\t\t\t},\n\t\t\tzobject: function () {\n\t\t\t\treturn this.getZObjectChildrenById( this.zobjectId );\n\t\t\t},\n\t\t\tzImplementationId: function () {\n\t\t\t\treturn this.getNestedZObjectById( this.getZObjectById( this.zobjectId ).parent, [\n\t\t\t\t\tConstants.Z_PERSISTENTOBJECT_ID,\n\t\t\t\t\tConstants.Z_STRING_VALUE\n\t\t\t\t] ).value;\n\t\t\t},\n\t\t\tzFunction: function () {\n\t\t\t\treturn this.findKeyInArray(\n\t\t\t\t\t[ Constants.Z_REFERENCE_ID, Constants.Z_STRING_VALUE ],\n\t\t\t\t\tthis.getZObjectChildrenById(\n\t\t\t\t\t\tthis.findKeyInArray( Constants.Z_IMPLEMENTATION_FUNCTION, this.zobject ).id\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t},\n\t\t\tzCodeId: function () {\n\t\t\t\treturn this.findKeyInArray( Constants.Z_IMPLEMENTATION_CODE, this.zobject ).id;\n\t\t\t},\n\t\t\tzCompositionId: function () {\n\t\t\t\treturn this.findKeyInArray( Constants.Z_IMPLEMENTATION_COMPOSITION, this.zobject ).id;\n\t\t\t},\n\t\t\tzCodeLanguage: function () {\n\t\t\t\treturn this.getNestedZObjectById( this.zCodeId, [\n\t\t\t\t\tConstants.Z_CODE_LANGUAGE,\n\t\t\t\t\tConstants.Z_PROGRAMMING_LANGUAGE_CODE,\n\t\t\t\t\tConstants.Z_STRING_VALUE\n\t\t\t\t] ).value;\n\t\t\t},\n\t\t\tzCodeString: function () {\n\t\t\t\tthis.findKeyInArray(\n\t\t\t\t\tConstants.Z_STRING_VALUE,\n\t\t\t\t\tthis.getZObjectChildrenById(\n\t\t\t\t\t\tthis.findKeyInArray( Constants.Z_CODE_CODE, this.zCodeId ).id\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t},\n\t\t\tfunctionLabel: function () {\n\t\t\t\treturn this.getZkeyLabels[ Constants.Z_IMPLEMENTATION_FUNCTION ];\n\t\t\t},\n\t\t\tselectedFunctionLabel: function () {\n\t\t\t\treturn this.getZkeyLabels[ this.zFunction.value ];\n\t\t\t},\n\t\t\tselectedFunctionJson: function () {\n\t\t\t\treturn this.getZkeys[ this.zFunction.value ];\n\t\t\t},\n\t\t\tselectedFunctionReturnType: function () {\n\t\t\t\tif ( this.selectedFunctionJson ) {\n\t\t\t\t\treturn this.getZkeyLabels[ this.selectedFunctionJson[\n\t\t\t\t\t\tConstants.Z_PERSISTENTOBJECT_VALUE ][\n\t\t\t\t\t\tConstants.Z_FUNCTION_RETURN_TYPE ] ];\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\t},\n\t\t\tselectedFunctionArguments: function () {\n\t\t\t\treturn Object.keys( this.getZarguments ).map( function ( arg ) {\n\t\t\t\t\treturn this.getZarguments[ arg ];\n\t\t\t\t}.bind( this ) );\n\t\t\t},\n\t\t\tisImplementationAttached: function () {\n\t\t\t\treturn this.selectedFunctionJson && this.selectedFunctionJson.Z2K2.Z8K4.filter( function ( zid ) {\n\t\t\t\t\treturn zid === this.zImplementationId;\n\t\t\t\t}.bind( this ) ).length > 0;\n\t\t\t},\n\t\t\timplementationModeItems: function () {\n\t\t\t\treturn [\n\t\t\t\t\t{\n\t\t\t\t\t\tvalue: Constants.implementationModes.COMPOSITION,\n\t\t\t\t\t\tlabel: this.$i18n( 'wikilambda-implementation-selector-composition' ).text()\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tvalue: Constants.implementationModes.CODE,\n\t\t\t\t\t\tlabel: this.$i18n( 'wikilambda-implementation-selector-code' ).text()\n\t\t\t\t\t}\n\t\t\t\t];\n\t\t\t}\n\t\t}\n\t),\n\tmethods: $.extend( {},\n\t\tmapActions( [\n\t\t\t'fetchZKeys',\n\t\t\t'setZObjectValue',\n\t\t\t'initializeZCodeFunction',\n\t\t\t'setZImplementationType',\n\t\t\t'setAvailableZArguments',\n\t\t\t'setZCodeLanguage',\n\t\t\t'injectZObject',\n\t\t\t'setIsZObjectDirty'\n\t\t] ),\n\t\t{\n\t\t\tupdateZFunctionType: function ( val ) {\n\t\t\t\tthis.setZObjectValue( {\n\t\t\t\t\tid: this.zFunction.id,\n\t\t\t\t\tvalue: val\n\t\t\t\t} );\n\t\t\t\tthis.setIsZObjectDirty( true );\n\t\t\t},\n\t\t\tselectLanguage: function ( payload ) {\n\t\t\t\tthis.setZCodeLanguage( payload );\n\t\t\t\tthis.initializeZCodeFunction( {\n\t\t\t\t\tzCodeId: this.zCodeId,\n\t\t\t\t\tlanguage: this.zCodeLanguage,\n\t\t\t\t\tfunctionId: this.zFunction.value,\n\t\t\t\t\targumentList: this.selectedFunctionArguments\n\t\t\t\t} );\n\t\t\t},\n\t\t\tupdateCode: function ( payload ) {\n\t\t\t\tthis.injectZObject( payload );\n\t\t\t\tthis.setIsZObjectDirty( true );\n\t\t\t},\n\t\t\tchangeImplMode: function ( mode ) {\n\t\t\t\tthis.setZImplementationType( {\n\t\t\t\t\tzobjectId: this.zobjectId,\n\t\t\t\t\tmode: mode\n\t\t\t\t} );\n\t\t\t},\n\t\t\tassociatedIcon: function () {\n\t\t\t\treturn ( this.isImplementationAttached ) ? icons.cdxIconLink : icons.cdxIconUnLink;\n\t\t\t}\n\t\t}\n\t),\n\twatch: {\n\t\tzFunction: {\n\t\t\timmediate: true,\n\t\t\thandler: function ( val, prevVal ) {\n\t\t\t\tif ( val.value && ( !prevVal || val.value !== prevVal.value ) ) {\n\t\t\t\t\tthis.fetchZKeys( { zids: [ this.zFunction.value ] } );\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tselectedFunctionJson: {\n\t\t\timmediate: true,\n\t\t\thandler: function ( val, prevVal ) {\n\t\t\t\tif ( JSON.stringify( val ) === JSON.stringify( prevVal ) ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif ( this.selectedFunctionJson ) {\n\t\t\t\t\tvar zKeys = [];\n\n\t\t\t\t\tzKeys.push(\n\t\t\t\t\t\t...this.selectedFunctionJson[\n\t\t\t\t\t\t\tConstants.Z_PERSISTENTOBJECT_VALUE\n\t\t\t\t\t\t][\n\t\t\t\t\t\t\tConstants.Z_FUNCTION_ARGUMENTS\n\t\t\t\t\t\t].map(\n\t\t\t\t\t\t\t( argument ) => argument[ Constants.Z_ARGUMENT_TYPE ]\n\t\t\t\t\t\t)\n\t\t\t\t\t);\n\n\t\t\t\t\tzKeys.push( this.selectedFunctionJson[\n\t\t\t\t\t\tConstants.Z_PERSISTENTOBJECT_VALUE ][\n\t\t\t\t\t\tConstants.Z_FUNCTION_RETURN_TYPE ] );\n\n\t\t\t\t\tthis.fetchZKeys( { zids: zKeys } ).then( function () {\n\t\t\t\t\t\tthis.setAvailableZArguments( this.zFunction.value );\n\t\t\t\t\t}.bind( this ) );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t},\n\tbeforeCreate: function () {\n\t\tthis.$options.components[ 'wl-z-object' ] = require( '../ZObject.vue' );\n\t},\n\tmounted: function () {\n\t\tif ( this.zCodeId ) {\n\t\t\tthis.implMode = Constants.implementationModes.CODE;\n\t\t} else if ( this.zCompositionId ) {\n\t\t\tthis.implMode = Constants.implementationModes.COMPOSITION;\n\t\t}\n\t}\n};\n</script>\n\n<style lang=\"less\">\n.ext-wikilambda-zimplementation {\n\t&__is-impl-associated {\n\t\tfont-size: 0.8em;\n\t\tfont-style: italic;\n\t\tmargin-left: 0.2em;\n\t}\n}\n\n</style>\n","usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/resources/ext.wikilambda.edit/components/main-types/ZKey.vue","messages":[{"ruleId":"vue/no-undef-components","severity":1,"message":"The '<wl-z-object-selector>' component has been used, but not defined.","line":27,"column":4,"nodeType":"VStartTag","messageId":"undef","endLine":34,"endColumn":5},{"ruleId":"vue/no-undef-components","severity":1,"message":"The '<wl-z-object-key-list>' component has been used, but not defined.","line":37,"column":3,"nodeType":"VStartTag","messageId":"undef","endLine":40,"endColumn":4}],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":"<template>\n\t<!--\n\t\tWikiLambda Vue interface module for generic ZObject manipulation.\n\n\t\t@copyright 2020– Abstract Wikipedia team; see AUTHORS.txt\n\t\t@license MIT\n\t-->\n\t<div class=\"ext-wikilambda-zobject-generic\">\n\t\t<span>{{ z1k1label }}: </span>\n\n\t\t<span v-if=\"persistent\">\n\t\t\t<a\n\t\t\t\tv-if=\"type !== zobjectId && ( viewmode || readonly )\"\n\t\t\t\t:href=\"typeLink\"\n\t\t\t\t:target=\"!viewmode ? '_blank' : ''\"\n\t\t\t>\n\t\t\t\t<span>{{ typeLabel }}</span>\n\t\t\t</a>\n\t\t\t<span v-else>{{ typeLabel }}</span>\n\t\t\t<ul><li> {{ z2k1label }}: {{ z2K1Value }} </li></ul>\n\t\t</span>\n\n\t\t<span v-else>\n\t\t\t<span v-if=\"viewmode || readonly || type\">\n\t\t\t\t<a :href=\"typeLink\" :target=\"!viewmode ? '_blank' : ''\">{{ typeLabel }}</a>\n\t\t\t</span>\n\t\t\t<wl-z-object-selector\n\t\t\t\tv-else\n\t\t\t\t:type=\"Constants.Z_TYPE\"\n\t\t\t\t:return-type=\"Constants.Z_TYPE\"\n\t\t\t\t:placeholder=\"$i18n( 'wikilambda-typeselector-label' ).text()\"\n\t\t\t\t:selected-id=\"type\"\n\t\t\t\t@input=\"onTypeChange\"\n\t\t\t></wl-z-object-selector>\n\t\t</span>\n\n\t\t<wl-z-object-key-list\n\t\t\t:zobject-id=\"zobjectId\"\n\t\t\t:readonly=\"readonly\"\n\t\t></wl-z-object-key-list>\n\t</div>\n</template>\n\n<script>\nvar Constants = require( '../../Constants.js' ),\n\tZObjectGeneric = require( '../ZObjectGeneric.vue' ),\n\tmapActions = require( 'vuex' ).mapActions,\n\tmapGetters = require( 'vuex' ).mapGetters;\n\n// @vue/component\nmodule.exports = exports = {\n\tname: 'wl-z-key',\n\textends: ZObjectGeneric,\n\tcomputed: $.extend( {},\n\t\tmapGetters( [\n\t\t\t'getZObjectChildrenById',\n\t\t\t'getLatestObjectIndex',\n\t\t\t'getNestedZObjectById',\n\t\t\t'getCurrentZObjectId'\n\t\t] ),\n\t\t{\n\t\t\tzObject: function () {\n\t\t\t\treturn this.getZObjectChildrenById( this.zobjectId );\n\t\t\t},\n\t\t\tzKeyValue: function () {\n\t\t\t\treturn this.getCurrentZObjectId + 'K' + Number( this.zObjectParentIndex + 1 );\n\t\t\t},\n\t\t\tzObjectParentIndex: function () {\n\t\t\t\treturn this.getLatestObjectIndex( this.getCurrentZObjectId );\n\t\t\t},\n\t\t\tzObjectKey: function () {\n\t\t\t\treturn this.getNestedZObjectById( this.zobjectId, [ Constants.Z_KEY_ID ] );\n\t\t\t},\n\t\t\tzObjectKeyValue: function () {\n\t\t\t\tvar object = this.getNestedZObjectById( this.zobjectId,\n\t\t\t\t\t[ Constants.Z_KEY_ID, Constants.Z_STRING_VALUE ] );\n\n\t\t\t\treturn object ? object.value : '';\n\t\t\t}\n\t\t}\n\t),\n\tmethods: $.extend( {},\n\t\tmapActions( [ 'changeType' ] )\n\t)\n};\n</script>\n","usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/resources/ext.wikilambda.edit/components/main-types/ZLabelsBlock.vue","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/resources/ext.wikilambda.edit/components/main-types/ZListItem.vue","messages":[{"ruleId":"vue/require-explicit-emits","severity":1,"message":"The \"remove-item\" event has been triggered but not declared on `emits` option.","line":14,"column":19,"nodeType":"Literal","messageId":"missing","endLine":14,"endColumn":32,"suggestions":[{"messageId":"addArrayEmitsOption","data":{"name":"remove-item","emitsKind":"`emits` option"},"fix":{"range":[1485,1485],"text":"\nemits: ['remove-item'],"},"desc":"Add the `emits` option with array syntax and define \"remove-item\" event."},{"messageId":"addObjectEmitsOption","data":{"name":"remove-item","emitsKind":"`emits` option"},"fix":{"range":[1485,1485],"text":"\nemits: {'remove-item': null},"},"desc":"Add the `emits` option with object syntax and define \"remove-item\" event."}]},{"ruleId":"vue/no-undef-components","severity":1,"message":"The '<wl-z-object>' component has been used, but not defined.","line":26,"column":3,"nodeType":"VStartTag","messageId":"undef","endLine":31,"endColumn":4}],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":"<template>\n\t<!--\n\t\tWikiLambda Vue component for ZObject items in ZLists.\n\n\t\t@copyright 2020– Abstract Wikipedia team; see AUTHORS.txt\n\t\t@license MIT\n\t-->\n\t<li class=\"ext-wikilambda-zlistItem\">\n\t\t<cdx-button\n\t\t\tv-if=\"!( viewmode || readonly )\"\n\t\t\tclass=\"z-list-item-remove\"\n\t\t\taction=\"destructive\"\n\t\t\t:title=\"tooltipRemoveListItem\"\n\t\t\t@click=\"$emit( 'remove-item', zobjectId )\"\n\t\t>\n\t\t\t{{ $i18n( 'wikilambda-editor-removeitem' ).text() }}\n\t\t</cdx-button>\n\t\t<wl-z-object-selector\n\t\t\tv-if=\"isEmptyObject\"\n\t\t\t:type=\"zType\"\n\t\t\t:return-type=\"zType\"\n\t\t\t:placeholder=\"$i18n( 'wikilambda-typeselector-label' ).text()\"\n\t\t\t:readonly=\"readonly\"\n\t\t\t@input=\"onTypeChange\"\n\t\t></wl-z-object-selector>\n\t\t<wl-z-object\n\t\t\tv-else\n\t\t\t:zobject-id=\"zobjectId\"\n\t\t\t:persistent=\"false\"\n\t\t\t:readonly=\"readonly\"\n\t\t></wl-z-object>\n\t</li>\n</template>\n\n<script>\nvar typeUtils = require( '../../mixins/typeUtils.js' ),\n\tZObjectSelector = require( '../ZObjectSelector.vue' ),\n\tCdxButton = require( '@wikimedia/codex' ).CdxButton,\n\tmapActions = require( 'vuex' ).mapActions,\n\tmapGetters = require( 'vuex' ).mapGetters;\n\n// @vue/component\nmodule.exports = exports = {\n\tname: 'wl-z-list-item',\n\tcomponents: {\n\t\t'wl-z-object-selector': ZObjectSelector,\n\t\t'cdx-button': CdxButton\n\t},\n\tmixins: [ typeUtils ],\n\tinject: {\n\t\tviewmode: { default: false }\n\t},\n\tprops: {\n\t\tzobjectId: {\n\t\t\ttype: Number,\n\t\t\trequired: true\n\t\t},\n\t\treadonly: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false\n\t\t},\n\t\tzType: {\n\t\t\ttype: String,\n\t\t\tdefault: ''\n\t\t}\n\t},\n\tcomputed: $.extend( {},\n\t\tmapGetters( {\n\t\t\tgetZObjectChildrenById: 'getZObjectChildrenById',\n\t\t\tgetZObjectTypeById: 'getZObjectTypeById'\n\t\t} ),\n\t\t{\n\t\t\tzobject: function () {\n\t\t\t\treturn this.getZObjectChildrenById( this.zobjectId );\n\t\t\t},\n\t\t\tzobjectType: function () {\n\t\t\t\treturn this.getZObjectTypeById( this.zobjectId );\n\t\t\t},\n\t\t\tisEmptyObject: function () {\n\t\t\t\treturn !this.zobjectType;\n\t\t\t},\n\t\t\ttooltipRemoveListItem: function () {\n\t\t\t\treturn this.$i18n( 'wikilambda-editor-zlist-removeitem-tooltip' ).text();\n\t\t\t},\n\t\t\ttooltipAddListItem: function () {\n\t\t\t\tthis.$i18n( 'wikilambda-editor-zlist-additem-tooltip' ).text();\n\t\t\t}\n\t\t} ),\n\tmethods: $.extend( {},\n\t\tmapActions( [ 'changeType', 'setIsZObjectDirty' ] ),\n\t\t{\n\t\t\t/*\n\t\t\t* Sets the current list item type.\n\t\t\t*\n\t\t\t* @param {string} type\n\t\t\t*/\n\t\t\tonTypeChange: function ( type ) {\n\t\t\t\tvar payload = {\n\t\t\t\t\ttype: type,\n\t\t\t\t\tid: this.zobjectId\n\t\t\t\t};\n\t\t\t\tthis.changeType( payload );\n\t\t\t\tthis.setIsZObjectDirty( true );\n\t\t\t}\n\t\t} ),\n\tbeforeCreate: function () {\n\t\tthis.$options.components[ 'wl-z-object' ] = require( './../ZObject.vue' );\n\t}\n};\n</script>\n","usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/resources/ext.wikilambda.edit/components/main-types/ZMonolingualString.vue","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/resources/ext.wikilambda.edit/components/main-types/ZMultilingualString.vue","messages":[{"ruleId":"vue/require-explicit-emits","severity":1,"message":"The \"change\" event has been triggered but not declared on `emits` option.","line":107,"column":17,"nodeType":"Literal","messageId":"missing","endLine":107,"endColumn":25,"suggestions":[{"messageId":"addArrayEmitsOption","data":{"name":"change","emitsKind":"`emits` option"},"fix":{"range":[1371,1371],"text":"\nemits: ['change'],"},"desc":"Add the `emits` option with array syntax and define \"change\" event."},{"messageId":"addObjectEmitsOption","data":{"name":"change","emitsKind":"`emits` option"},"fix":{"range":[1371,1371],"text":"\nemits: {'change': null},"},"desc":"Add the `emits` option with object syntax and define \"change\" event."}]},{"ruleId":"vue/require-explicit-emits","severity":1,"message":"The \"delete-lang\" event has been triggered but not declared on `emits` option.","line":142,"column":17,"nodeType":"Literal","messageId":"missing","endLine":142,"endColumn":30,"suggestions":[{"messageId":"addArrayEmitsOption","data":{"name":"delete-lang","emitsKind":"`emits` option"},"fix":{"range":[1371,1371],"text":"\nemits: ['delete-lang'],"},"desc":"Add the `emits` option with array syntax and define \"delete-lang\" event."},{"messageId":"addObjectEmitsOption","data":{"name":"delete-lang","emitsKind":"`emits` option"},"fix":{"range":[1371,1371],"text":"\nemits: {'delete-lang': null},"},"desc":"Add the `emits` option with object syntax and define \"delete-lang\" event."}]}],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":"<template>\n\t<!--\n\t\tWikiLambda Vue component for multilingual text\n\n\t\t@copyright 2020– Abstract Wikipedia team; see AUTHORS.txt\n\t\t@license MIT\n\t-->\n\t<div class=\"ext-wikilambda-multilingual\">\n\t\t<wl-z-monolingual-string\n\t\t\tv-for=\"( z11Object ) in monolingualStrings\"\n\t\t\t:key=\"z11Object.id\"\n\t\t\t:zobject-id=\"z11Object.id\"\n\t\t\tclass=\"ext-wikilambda-monolingual\"\n\t\t\t:readonly=\"readonly || getViewMode\"\n\t\t></wl-z-monolingual-string>\n\t\t<div class=\"ext-wikilambda-monolingual\">\n\t\t\t<wl-z-object-selector\n\t\t\t\tv-if=\"!( readonly || getViewMode )\"\n\t\t\t\tref=\"langSelector\"\n\t\t\t\t:used-languages=\"usedLanguages\"\n\t\t\t\t:type=\"Constants.Z_NATURAL_LANGUAGE\"\n\t\t\t\t@input=\"addNewLang\"\n\t\t\t></wl-z-object-selector>\n\t\t</div>\n\t</div>\n</template>\n\n<script>\nvar Constants = require( '../../Constants.js' ),\n\ttypeUtils = require( './../../mixins/typeUtils.js' ),\n\tmapActions = require( 'vuex' ).mapActions,\n\tmapGetters = require( 'vuex' ).mapGetters,\n\tZMonolingualString = require( './ZMonolingualString.vue' ),\n\tZObjectSelector = require( '../ZObjectSelector.vue' );\n\n// @vue/component\nmodule.exports = exports = {\n\tname: 'wl-z-multilingual-string',\n\tcomponents: {\n\t\t'wl-z-monolingual-string': ZMonolingualString,\n\t\t'wl-z-object-selector': ZObjectSelector\n\t},\n\tmixins: [ typeUtils ],\n\tprops: {\n\t\tzobjectId: {\n\t\t\ttype: Number,\n\t\t\trequired: true\n\t\t},\n\t\treadonly: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false\n\t\t}\n\t},\n\tcomputed: $.extend( {},\n\t\tmapGetters( {\n\t\t\tgetZObjectChildrenById: 'getZObjectChildrenById',\n\t\t\tgetAllItemsFromListById: 'getAllItemsFromListById',\n\t\t\tgetZObjectAsJsonById: 'getZObjectAsJsonById',\n\t\t\tgetViewMode: 'getViewMode'\n\t\t} ),\n\t\t{\n\t\t\tConstants: function () {\n\t\t\t\treturn Constants;\n\t\t\t},\n\t\t\tzobject: function () {\n\t\t\t\treturn this.getZObjectChildrenById( this.zobjectId );\n\t\t\t},\n\t\t\tmonolingualStringsParentId: function () {\n\t\t\t\tvar monolingualStringItem = this.findKeyInArray( Constants.Z_MULTILINGUALSTRING_VALUE, this.zobject );\n\n\t\t\t\treturn monolingualStringItem.id;\n\t\t\t},\n\t\t\tmonolingualStrings: function () {\n\t\t\t\tif ( this.monolingualStringsParentId ) {\n\t\t\t\t\treturn this.getAllItemsFromListById( this.monolingualStringsParentId );\n\t\t\t\t}\n\t\t\t},\n\t\t\tusedLanguages: function () {\n\t\t\t\tvar languageJson = this.getZObjectAsJsonById( this.monolingualStringsParentId, true );\n\t\t\t\treturn languageJson.reduce( function ( result, language ) {\n\t\t\t\t\tconst languageString = language[ Constants.Z_MONOLINGUALSTRING_LANGUAGE ];\n\t\t\t\t\tif ( languageString ) {\n\t\t\t\t\t\tresult.push( languageString );\n\t\t\t\t\t}\n\t\t\t\t\treturn result;\n\t\t\t\t}, [] );\n\t\t\t},\n\t\t\ttooltipRemoveLang: function () {\n\t\t\t\treturn this.$i18n( 'wikilambda-editor-label-removelanguage-tooltip' ).text();\n\t\t\t},\n\t\t\tselectedLang: function () {\n\t\t\t\treturn 'None';\n\t\t\t}\n\t\t}\n\t),\n\tmethods: $.extend( {},\n\t\tmapActions( [ 'addZMonolingualString', 'setIsZObjectDirty' ] ),\n\t\t{\n\t\t\t/**\n\t\t\t * Fires a `change` event with the index of a Monolingual String\n\t\t\t * and its new string value.\n\t\t\t *\n\t\t\t * @param {Event} event\n\t\t\t * @param {number} index\n\t\t\t */\n\t\t\tupdateLangString: function ( event, index ) {\n\t\t\t\tthis.$emit( 'change', {\n\t\t\t\t\tindex: index,\n\t\t\t\t\tvalue: event.target.value\n\t\t\t\t} );\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * Triggers a `addZMonolingualString` action with the language code of the new\n\t\t\t * Monolingual String to add to the Multilingual String.\n\t\t\t *\n\t\t\t * @param {string} zId\n\t\t\t */\n\t\t\taddNewLang: function ( zId ) {\n\t\t\t\tif ( !zId ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tvar lang = zId,\n\t\t\t\t\tpayload = {\n\t\t\t\t\t\tlang: lang,\n\t\t\t\t\t\tparentId: this.monolingualStringsParentId\n\t\t\t\t\t};\n\t\t\t\tthis.addZMonolingualString( payload );\n\t\t\t\tthis.setIsZObjectDirty( true );\n\t\t\t\tthis.$refs.langSelector.clearResults();\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * Fires a `delete-lang` event with the index of the Monolingual String\n\t\t\t * to be removed.\n\t\t\t *\n\t\t\t * @param {number} index\n\t\t\t * @fires delete-lang\n\t\t\t */\n\t\t\tremoveLang: function ( index ) {\n\t\t\t\tthis.$emit( 'delete-lang', index );\n\t\t\t},\n\t\t\tisLangCodeAvailable: function ( langCode ) {\n\t\t\t\tvar usedLangIndex;\n\t\t\t\tfor ( usedLangIndex in this.usedLanguages ) {\n\t\t\t\t\tif ( this.usedLanguages[ usedLangIndex ][ Constants.Z_REFERENCE_ID ] === langCode ) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t)\n};\n</script>\n\n<style lang=\"less\">\n.ext-wikilambda-multilingual {\n\tdisplay: block;\n\tpadding: 1em;\n\tbackground: #efe;\n\toutline: 1px dashed #888;\n}\n\n.ext-wikilambda-monolingual {\n\tclear: both;\n}\n</style>\n","usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/resources/ext.wikilambda.edit/components/main-types/ZPersistentObject.vue","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/resources/ext.wikilambda.edit/components/main-types/ZReference.vue","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/resources/ext.wikilambda.edit/components/main-types/ZResponseEnvelope.vue","messages":[{"ruleId":"vue/no-v-html","severity":1,"message":"'v-html' directive can lead to XSS attack.","line":66,"column":10,"nodeType":"VAttribute","endLine":66,"endColumn":29}],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"<template>\n\t<!--\n\t\tWikiLambda Vue component for ZResponseEnvelope objects.\n\t\t@copyright 2020– Abstract Wikipedia team; see AUTHORS.txt\n\t\t@license MIT\n\t-->\n\t<div class=\"ext-wikilambda-zresponseenvelope\">\n\t\t<div>\n\t\t\t<wl-z-object-key\n\t\t\t\t:zobject-id=\"zValue.id\"\n\t\t\t\t:parent-type=\"Constants.Z_RESPONSEENVELOPE\"\n\t\t\t\t:readonly=\"readonly\"\n\t\t\t></wl-z-object-key>\n\t\t</div>\n\t\t<div v-if=\"containsError\" class=\"ext-wikilambda-zresponseenvelope__show-error\">\n\t\t\t<cdx-button\n\t\t\t\t@click.prevent=\"showError = !showError\"\n\t\t\t>\n\t\t\t\t{{ errorButtonText }}\n\t\t\t</cdx-button>\n\t\t</div>\n\t\t<div v-if=\"containsError && showError\" class=\"ext-wikilambda-zresponseenvelope__error\">\n\t\t\t<hr>\n\t\t\t<wl-z-object-key\n\t\t\t\t:zobject-id=\"zError.id\"\n\t\t\t\t:parent-type=\"Constants.Z_RESPONSEENVELOPE\"\n\t\t\t\t:readonly=\"readonly\"\n\t\t\t></wl-z-object-key>\n\t\t</div>\n\t\t<div class=\"ext-wikilambda-zresponseenvelope__show-metrics\">\n\t\t\t<cdx-button\n\t\t\t\t@click.stop=\"openMetrics\"\n\t\t\t>\n\t\t\t\t{{ metricsButtonText }}\n\t\t\t</cdx-button>\n\t\t</div>\n\t\t<!-- eslint-disable vue/no-v-model-argument -->\n\t\t<!-- eslint-disable vue/no-unsupported-features -->\n\t\t<cdx-dialog\n\t\t\tid=\"metadata-dialog\"\n\t\t\tv-model:open=\"showMetrics\"\n\t\t\ttitle=\"\"\n\t\t>\n\t\t\t<div class=\"ext-wikilambda-metadatadialog__header\">\n\t\t\t\t<span class=\"ext-wikilambda-metadatadialog__header__title\">\n\t\t\t\t\t{{ dialogTitle }}\n\t\t\t\t</span>\n\t\t\t\t<!-- TODO (T320669): Construct this more nicely, perhaps with a Codex link component? -->\n\t\t\t\t<div class=\"ext-wikilambda-metadatadialog__header__helplink\">\n\t\t\t\t\t<cdx-icon :icon=\"helpLinkIcon()\"></cdx-icon>\n\t\t\t\t\t<a\n\t\t\t\t\t\t:title=\"tooltipMetaDataHelpLink\"\n\t\t\t\t\t\t:href=\"parsedMetaDataHelpLink\"\n\t\t\t\t\t\ttarget=\"_blank\">\n\t\t\t\t\t\t{{ $i18n( 'wikilambda-helplink-button' ).text() }}\n\t\t\t\t\t</a>\n\t\t\t\t</div>\n\t\t\t\t<cdx-button\n\t\t\t\t\tweight=\"quiet\"\n\t\t\t\t\tclass=\"ext-wikilambda-metadatadialog__header__close-button\"\n\t\t\t\t\t@click=\"showMetrics = false\"\n\t\t\t\t>\n\t\t\t\t\t<cdx-icon :icon=\"icons.cdxIconClose\"></cdx-icon>\n\t\t\t\t</cdx-button>\n\t\t\t</div>\n\t\t\t<span v-html=\"dialogText\"></span>\n\t\t</cdx-dialog>\n\t</div>\n</template>\n\n<script>\nvar Constants = require( '../../Constants.js' ),\n\ttypeUtils = require( '../../mixins/typeUtils.js' ),\n\tZObjectKey = require( '../ZObjectKey.vue' ),\n\tCdxButton = require( '@wikimedia/codex' ).CdxButton,\n\tCdxIcon = require( '@wikimedia/codex' ).CdxIcon,\n\tCdxDialog = require( '@wikimedia/codex' ).CdxDialog,\n\ticons = require( '../../../lib/icons.json' ),\n\tportray = require( '../../mixins/portray.js' ),\n\tcanonicalize = require( '../../mixins/schemata.js' ).methods.canonicalizeZObject,\n\tschemata = require( '../../mixins/schemata.js' ),\n\tmapActions = require( 'vuex' ).mapActions,\n\tmapGetters = require( 'vuex' ).mapGetters;\n// @vue/component\nmodule.exports = exports = {\n\tname: 'wl-z-response-envelope',\n\tcomponents: {\n\t\t'wl-z-object-key': ZObjectKey,\n\t\t'cdx-button': CdxButton,\n\t\t'cdx-icon': CdxIcon,\n\t\t'cdx-dialog': CdxDialog\n\t},\n\tmixins: [ typeUtils, portray, schemata ],\n\tprops: {\n\t\tzobjectId: {\n\t\t\ttype: Number,\n\t\t\trequired: true\n\t\t},\n\t\treadonly: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false\n\t\t}\n\t},\n\tdata: function () {\n\t\treturn {\n\t\t\tshowError: true,\n\t\t\tshowMetrics: false,\n\t\t\ticons: icons\n\t\t};\n\t},\n\tcomputed: $.extend( mapGetters( [\n\t\t'getZObjectChildrenById',\n\t\t'getNestedZObjectById',\n\t\t'getZObjectAsJsonById',\n\t\t'getZkeyLabels'\n\t] ), {\n\t\tConstants: function () {\n\t\t\treturn Constants;\n\t\t},\n\t\tzobject: function () {\n\t\t\treturn this.getZObjectChildrenById( this.zobjectId );\n\t\t},\n\t\tzValue: function () {\n\t\t\treturn this.findKeyInArray( Constants.Z_RESPONSEENVELOPE_VALUE, this.zobject );\n\t\t},\n\t\tzMetaData: function () {\n\t\t\treturn this.findKeyInArray( Constants.Z_RESPONSEENVELOPE_METADATA, this.zobject );\n\t\t},\n\t\tzError: function () {\n\t\t\tconst metadata = this.zMetaData;\n\t\t\treturn this.getZMapValue( metadata.id, 'errors' );\n\t\t},\n\t\tcontainsError: function () {\n\t\t\treturn this.zError !== false;\n\t\t},\n\t\terrorButtonText: function () {\n\t\t\t// TODO(T312610): Depending on design choices, this button may go away\n\t\t\tif ( this.showError ) {\n\t\t\t\treturn this.$i18n( 'wikilambda-hide-error' ).text();\n\t\t\t} else {\n\t\t\t\treturn this.$i18n( 'wikilambda-show-error' ).text();\n\t\t\t}\n\t\t},\n\t\tmetricsButtonText: function () {\n\t\t\t// This button brings up the \"metadata dialog\" (internal name); we use the word \"metrics\" in the UI\n\t\t\t// TODO(T312610): Depending on design choices, these button labels could change\n\t\t\tif ( this.showMetrics ) {\n\t\t\t\treturn this.$i18n( 'wikilambda-hide-metrics' ).text();\n\t\t\t} else {\n\t\t\t\treturn this.$i18n( 'wikilambda-show-metrics' ).text();\n\t\t\t}\n\t\t},\n\t\tdialogText: function () {\n\t\t\treturn this.dialogContent( this.zMetaData.id );\n\t\t},\n\t\tdialogTitle: function () {\n\t\t\treturn this.$i18n( 'wikilambda-functioncall-metadata-dialog-header' ).text();\n\t\t},\n\t\ttooltipMetaDataHelpLink: function () {\n\t\t\treturn this.$i18n( 'wikilambda-helplink-tooltip' ).text();\n\t\t},\n\t\tparsedMetaDataHelpLink: function () {\n\t\t\tconst unformattedLink = this.$i18n( 'wikilambda-metadata-help-link' ).text();\n\t\t\treturn mw.internalWikiUrlencode( unformattedLink );\n\t\t}\n\t} ),\n\tmethods: $.extend( mapActions( [ 'fetchZKeys' ] ), {\n\t\topenMetrics: function () {\n\t\t\tthis.showMetrics = true;\n\t\t},\n\t\tgetZMapValue: function ( zMapId, key ) {\n\t\t\tconst listOfPairs = this.getNestedZObjectById( zMapId, [ Constants.Z_TYPED_OBJECT_ELEMENT_1 ] );\n\t\t\tconst elements = this.getZObjectChildrenById( listOfPairs.id );\n\t\t\tfor ( const pair of elements ) {\n\t\t\t\tif ( this.getNestedZObjectById( pair.id,\n\t\t\t\t\t[ Constants.Z_TYPED_OBJECT_ELEMENT_1, Constants.Z_STRING_VALUE ] ).value === key ) {\n\t\t\t\t\treturn this.getNestedZObjectById( pair.id, [ Constants.Z_TYPED_OBJECT_ELEMENT_2 ] );\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t},\n\t\tdialogContent: function ( zMapId ) {\n\t\t\tconst zMapJSON = canonicalize( this.getZObjectAsJsonById( zMapId ) );\n\t\t\t// Ensure ZIDs appearing in metadata map have been fetched\n\t\t\tconst metadataZIDs = this.extractZIDs( zMapJSON );\n\t\t\tthis.fetchZKeys( { zids: metadataZIDs } );\n\t\t\treturn this.portrayMetadataMap( zMapJSON, this.getZkeyLabels );\n\t\t},\n\t\thelpLinkIcon: function () {\n\t\t\treturn icons.cdxIconHelpNotice;\n\t\t}\n\t} )\n};\n</script>\n\n<style lang=\"less\">\n.ext-wikilambda-zresponseenvelope {\n\t&__show-error {\n\t\tpadding: 10px 0;\n\t}\n}\n\n.ext-wikilambda-metadatadialog-helplink {\n\tfloat: right;\n}\n</style>\n","usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/resources/ext.wikilambda.edit/components/main-types/ZString.vue","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/resources/ext.wikilambda.edit/components/main-types/ZTester.vue","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/resources/ext.wikilambda.edit/components/main-types/ZType.vue","messages":[{"ruleId":"vue/no-undef-components","severity":1,"message":"The '<wl-z-object>' component has been used, but not defined.","line":25,"column":6,"nodeType":"VStartTag","messageId":"undef","endLine":29,"endColumn":7},{"ruleId":"vue/no-undef-components","severity":1,"message":"The '<wl-z-object>' component has been used, but not defined.","line":33,"column":6,"nodeType":"VStartTag","messageId":"undef","endLine":37,"endColumn":7}],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":"<template>\n\t<!--\n\t\tWikiLambda Vue interface module for ZType manipulation.\n\n\t\t@copyright 2020– Abstract Wikipedia team; see AUTHORS.txt\n\t\t@license MIT\n\t-->\n\t<div :class=\"classZObjectKey\">\n\t\t<!-- VIEW MODE -->\n\t\t<wl-z-object-generic\n\t\t\tv-if=\"viewmode\"\n\t\t\t:zobject-id=\"zobjectId\"\n\t\t\t:type=\"type\"\n\t\t\t:persistent=\"persistent\"\n\t\t\t:readonly=\"readonly\"\n\t\t\t:parent-type=\"parentType\"\n\t\t></wl-z-object-generic>\n\t\t<!-- EDIT MODE -->\n\t\t<template v-else>\n\t\t\t<template\n\t\t\t\tv-if=\"isChildOfPersistentObject\"\n\t\t\t>\n\t\t\t\t<span>\n\t\t\t\t\t<label>{{ zTypeKeylabel }}</label>\n\t\t\t\t\t<wl-z-object\n\t\t\t\t\t\t:zobject-id=\"zObjectKeysId\"\n\t\t\t\t\t\t:readonly=\"readonly\"\n\t\t\t\t\t\t:persistent=\"false\"\n\t\t\t\t\t></wl-z-object>\n\t\t\t\t</span>\n\t\t\t\t<span>\n\t\t\t\t\t<label>{{ zTypeValidatorlabel }}</label>\n\t\t\t\t\t<wl-z-object\n\t\t\t\t\t\t:zobject-id=\"zTypeValidatorId\"\n\t\t\t\t\t\t:readonly=\"readonly\"\n\t\t\t\t\t\t:persistent=\"false\"\n\t\t\t\t\t></wl-z-object>\n\t\t\t\t</span>\n\t\t\t</template>\n\t\t\t<wl-z-object-selector\n\t\t\t\tv-else\n\t\t\t\t:type=\"Constants.Z_TYPE\"\n\t\t\t\t:placeholder=\"$i18n( 'wikilambda-typeselector-label' ).text()\"\n\t\t\t\t@input=\"onTypeChange\"\n\t\t\t></wl-z-object-selector>\n\t\t</template>\n\t</div>\n</template>\n\n<script>\nvar Constants = require( '../../Constants.js' ),\n\tZObjectSelector = require( '../ZObjectSelector.vue' ),\n\tZObjectGeneric = require( '../ZObjectGeneric.vue' ),\n\tmapActions = require( 'vuex' ).mapActions,\n\tmapGetters = require( 'vuex' ).mapGetters,\n\tmapState = require( 'vuex' ).mapState,\n\ttypeUtils = require( '../../mixins/typeUtils.js' );\n\n// @vue/component\nmodule.exports = exports = {\n\tname: 'wl-z-type',\n\tcomponents: {\n\t\t'wl-z-object-selector': ZObjectSelector,\n\t\t'wl-z-object-generic': ZObjectGeneric\n\t},\n\tmixins: [ typeUtils ],\n\tinject: {\n\t\tviewmode: { default: false }\n\t},\n\tprops: {\n\t\tzobjectId: {\n\t\t\ttype: Number,\n\t\t\trequired: true\n\t\t},\n\t\ttype: {\n\t\t\ttype: String,\n\t\t\trequired: true\n\t\t},\n\t\tpersistent: {\n\t\t\ttype: Boolean,\n\t\t\trequired: true\n\t\t},\n\t\treadonly: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false\n\t\t},\n\t\tparentType: {\n\t\t\ttype: String,\n\t\t\trequired: true\n\t\t}\n\t},\n\tdata: function () {\n\t\treturn {\n\t\t\tConstants: Constants\n\t\t};\n\t},\n\tcomputed: $.extend( {},\n\t\tmapState( [\n\t\t\t'fetchingZKeys'\n\t\t] ),\n\t\tmapGetters( [\n\t\t\t'getZObjectChildrenById',\n\t\t\t'getZkeyLabels'\n\t\t] ),\n\t\t{\n\t\t\tclassZObjectKey: function () {\n\t\t\t\treturn {\n\t\t\t\t\t'ext-wikilambda-ztype-main': true,\n\t\t\t\t\t'ext-wikilambda-ztype-main__no-border': this.readonly || !this.isChildOfPersistentObject\n\t\t\t\t};\n\t\t\t},\n\t\t\tzobject: function () {\n\t\t\t\treturn this.getZObjectChildrenById( this.zobjectId );\n\t\t\t},\n\t\t\tzTypeKeylabel: function () {\n\t\t\t\treturn this.getZkeyLabels[ Constants.Z_TYPE_KEYS ];\n\t\t\t},\n\t\t\tzObjectKeysId: function () {\n\t\t\t\treturn this.findKeyInArray( Constants.Z_TYPE_KEYS, this.zobject ).id;\n\t\t\t},\n\t\t\tzTypeValidatorlabel: function () {\n\t\t\t\treturn this.getZkeyLabels[ Constants.Z_TYPE_VALIDATOR ];\n\t\t\t},\n\t\t\tzTypeValidatorId: function () {\n\t\t\t\treturn this.findKeyInArray( Constants.Z_TYPE_VALIDATOR, this.zobject ).id;\n\t\t\t},\n\t\t\tisChildOfPersistentObject: function () {\n\t\t\t\treturn this.parentType === Constants.Z_PERSISTENTOBJECT;\n\t\t\t}\n\t\t}\n\t),\n\tmethods: $.extend( {},\n\t\tmapActions( [ 'fetchZKeys', 'addZReference', 'removeZObjectChildren' ] ),\n\t\t{\n\t\t\t/**\n\t\t\t * Sets the type of a ZObject key.\n\t\t\t *\n\t\t\t * @param {string} type\n\t\t\t * @param {number} id\n\t\t\t */\n\t\t\tonTypeChange: function ( type ) {\n\t\t\t\tvar payload = {\n\t\t\t\t\tid: this.zobjectId,\n\t\t\t\t\tvalue: type\n\t\t\t\t};\n\t\t\t\tthis.removeZObjectChildren( this.zobjectId );\n\t\t\t\tthis.addZReference( payload );\n\t\t\t}\n\t\t}\n\t),\n\tmounted: function () {\n\t\tif ( this.type !== 'root' ) {\n\t\t\tthis.fetchZKeys( { zids: [ this.type ] } );\n\t\t}\n\t},\n\tbeforeCreate: function () {\n\t\tthis.$options.components[ 'wl-z-object' ] = require( '../ZObject.vue' );\n\t}\n};\n\n</script>\n\n<style lang=\"less\">\n.ext-wikilambda-ztype-main {\n\tbackground: #fff;\n\toutline: 2px dashed #808080;\n\tpadding: 1em;\n}\n\n.ext-wikilambda-ztype-main__no-border {\n\toutline: 0;\n}\n</style>\n","usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/resources/ext.wikilambda.edit/components/main-types/ZTypedList.vue","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/resources/ext.wikilambda.edit/components/main-types/ZTypedMap.vue","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/resources/ext.wikilambda.edit/components/main-types/ZTypedPair.vue","messages":[{"ruleId":"vue/no-undef-components","severity":1,"message":"The '<wl-z-object>' component has been used, but not defined.","line":32,"column":5,"nodeType":"VStartTag","messageId":"undef","endLine":36,"endColumn":6},{"ruleId":"vue/no-undef-components","severity":1,"message":"The '<wl-z-object>' component has been used, but not defined.","line":40,"column":5,"nodeType":"VStartTag","messageId":"undef","endLine":44,"endColumn":6}],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":"<template>\n\t<!--\n\t\tWikiLambda Vue component for ZTypedPair objects.\n\n\t\t@copyright 2020– Abstract Wikipedia team; see AUTHORS.txt\n\t\t@license MIT\n\t-->\n\t<div class=\"ext-wikilambda-zTypedPair\">\n\t\t<template v-if=\"requiresTypeForList\">\n\t\t\t<div>\n\t\t\t\t<label>{{ $i18n( 'wikilambda-ztyped-pair-key-label' ).text() }}:</label>\n\t\t\t\t<wl-z-object-selector\n\t\t\t\t\t:type=\"Constants.zType\"\n\t\t\t\t\t:placeholder=\"$i18n( 'wikilambda-ztyped-pair-placeholder' ).text()\"\n\t\t\t\t\t:readonly=\"readonly\"\n\t\t\t\t\t@input=\"onPairTypeChange( $event, 0 )\"\n\t\t\t\t></wl-z-object-selector>\n\t\t\t</div>\n\t\t\t<div>\n\t\t\t\t<label>{{ $i18n( 'wikilambda-ztyped-pair-value-label' ).text() }}:</label>\n\t\t\t\t<wl-z-object-selector\n\t\t\t\t\t:type=\"Constants.zType\"\n\t\t\t\t\t:placeholder=\"$i18n( 'wikilambda-ztyped-pair-placeholder' ).text()\"\n\t\t\t\t\t:readonly=\"readonly\"\n\t\t\t\t\t@input=\"onPairTypeChange( $event, 1 )\"\n\t\t\t\t></wl-z-object-selector>\n\t\t\t</div>\n\t\t</template>\n\t\t<template v-else>\n\t\t\t<div>\n\t\t\t\t<label>{{ $i18n( 'wikilambda-ztyped-pair-key-label' ).text() }}: ( {{ Key1Label }} ):</label>\n\t\t\t\t<wl-z-object\n\t\t\t\t\t:zobject-id=\"zTypedPairKey1.id\"\n\t\t\t\t\t:persistent=\"false\"\n\t\t\t\t\t:readonly=\"readonly\"\n\t\t\t\t></wl-z-object>\n\t\t\t</div>\n\t\t\t<div>\n\t\t\t\t<label>{{ $i18n( 'wikilambda-ztyped-pair-value-label' ).text() }}: ( {{ Key2Label }} ):</label>\n\t\t\t\t<wl-z-object\n\t\t\t\t\t:zobject-id=\"zTypedPairKey2.id\"\n\t\t\t\t\t:persistent=\"false\"\n\t\t\t\t\t:readonly=\"readonly\"\n\t\t\t\t></wl-z-object>\n\t\t\t</div>\n\t\t</template>\n\t</div>\n</template>\n\n<script>\nvar Constants = require( '../../Constants.js' ),\n\tZObjectSelector = require( '../ZObjectSelector.vue' ),\n\tmapActions = require( 'vuex' ).mapActions,\n\tmapGetters = require( 'vuex' ).mapGetters,\n\ttypeUtils = require( '../../mixins/typeUtils.js' );\n\n// @vue/component\nmodule.exports = exports = {\n\tname: 'wl-z-typed-pair',\n\tcomponents: {\n\t\t'wl-z-object-selector': ZObjectSelector\n\t},\n\tmixins: [ typeUtils ],\n\tinject: {\n\t\tviewmode: { default: false }\n\t},\n\tprops: {\n\t\tzobjectId: {\n\t\t\ttype: Number,\n\t\t\trequired: true\n\t\t},\n\t\treadonly: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false\n\t\t}\n\t},\n\tdata: function () {\n\t\treturn {\n\t\t\tConstants: Constants\n\t\t};\n\t},\n\tcomputed: $.extend( {},\n\t\tmapGetters( {\n\t\t\tgetZObjectChildrenById: 'getZObjectChildrenById',\n\t\t\tgetZObjectChildrenByIdRecursively: 'getZObjectChildrenByIdRecursively',\n\t\t\tgetZkeyLabels: 'getZkeyLabels'\n\t\t} ),\n\t\t{\n\t\t\tzObjectChildren: function () {\n\t\t\t\treturn this.getZObjectChildrenByIdRecursively( this.zobjectId );\n\t\t\t},\n\t\t\tzTypedPairType1: function () {\n\t\t\t\tvar mapType = this.findKeyInArray(\n\t\t\t\t\tConstants.Z_TYPED_PAIR_TYPE1,\n\t\t\t\t\tthis.zObjectChildren\n\t\t\t\t);\n\t\t\t\tif ( mapType.value === 'object' ) {\n\t\t\t\t\tmapType = this.findKeyInArray(\n\t\t\t\t\t\tConstants.Z_REFERENCE_ID,\n\t\t\t\t\t\tthis.getZObjectChildrenById( mapType.id )\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\treturn mapType;\n\t\t\t},\n\t\t\tzTypedPairType2: function () {\n\t\t\t\tvar mapType = this.findKeyInArray(\n\t\t\t\t\tConstants.Z_TYPED_PAIR_TYPE2,\n\t\t\t\t\tthis.zObjectChildren\n\t\t\t\t);\n\t\t\t\tif ( mapType.value === 'object' ) {\n\t\t\t\t\tmapType = this.findKeyInArray(\n\t\t\t\t\t\tConstants.Z_REFERENCE_ID,\n\t\t\t\t\t\tthis.getZObjectChildrenById( mapType.id )\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\treturn mapType;\n\t\t\t},\n\t\t\tzTypedPairKey1: function () {\n\t\t\t\treturn this.findKeyInArray( Constants.Z_TYPED_OBJECT_ELEMENT_1, this.zObjectChildren );\n\t\t\t},\n\t\t\tzTypedPairKey2: function () {\n\t\t\t\treturn this.findKeyInArray( Constants.Z_TYPED_OBJECT_ELEMENT_2, this.zObjectChildren );\n\t\t\t},\n\t\t\ttooltipRemoveListItem: function () {\n\t\t\t\treturn this.$i18n( 'wikilambda-editor-zlist-removeitem-tooltip' ).text();\n\t\t\t},\n\t\t\ttooltipAddListItem: function () {\n\t\t\t\tthis.$i18n( 'wikilambda-editor-zlist-additem-tooltip' ).text();\n\t\t\t},\n\t\t\trequiresTypeForList: function () {\n\t\t\t\treturn !this.zTypedPairType1.value || !this.zTypedPairType2.value;\n\t\t\t},\n\t\t\tKey1Label: function () {\n\t\t\t\tif ( this.zTypedPairType1.value ) {\n\t\t\t\t\treturn this.getZkeyLabels[ this.zTypedPairType1.value ];\n\t\t\t\t} else {\n\t\t\t\t\treturn '';\n\t\t\t\t}\n\t\t\t},\n\t\t\tKey2Label: function () {\n\t\t\t\tif ( this.zTypedPairType2.value ) {\n\t\t\t\t\treturn this.getZkeyLabels[ this.zTypedPairType2.value ];\n\t\t\t\t} else {\n\t\t\t\t\treturn '';\n\t\t\t\t}\n\t\t\t}\n\t\t} ),\n\tmethods: $.extend( {},\n\t\tmapActions( [\n\t\t\t'setTypeOfTypedPair',\n\t\t\t'removeTypedListItem',\n\t\t\t'fetchZKeys'\n\t\t] ),\n\t\t{\n\t\t\tonPairTypeChange: function ( type, index ) {\n\t\t\t\t// first we create an array with the existing value\n\t\t\t\tvar types = [ this.zTypedPairType1.value, this.zTypedPairType2.value ];\n\t\t\t\t// then we update the one that triggered the event\n\t\t\t\ttypes[ index ] = type;\n\t\t\t\tthis.setTypeOfTypedPair( { types: types, objectId: this.zobjectId } );\n\t\t\t},\n\t\t\tremoveItem: function ( item ) {\n\t\t\t\tthis.removeTypedListItem( item );\n\t\t\t}\n\t\t}\n\t),\n\tmounted: function () {\n\t\tif ( this.zTypedPairType1 && this.zTypedPairType1.value ) {\n\t\t\tthis.fetchZKeys( { zids: [ this.zTypedPairType1.value, this.zTypedPairType2.value ] } );\n\t\t}\n\t},\n\tbeforeCreate: function () {\n\t\tthis.$options.components[ 'wl-z-object' ] = require( './../ZObject.vue' );\n\t}\n};\n</script>\n\n<style lang=\"less\">\n@import '../../ext.wikilambda.edit.less';\n\n.ext-wikilambda-zTypedPair {\n\tbackground: @background-color-interactive;\n\tborder: 1px solid @border-color-interactive;\n\tpadding: 1em;\n}\n\ninput.ext-wikilambda-zstring {\n\tbackground: @background-color-interactive;\n}\n\nul.ext-wikilambda-zTypedPair-no-bullets {\n\tlist-style-type: none;\n\tlist-style-image: none;\n}\n\n.ext-wikilambda-zTypedPair-items-heading {\n\tfont-weight: bold;\n\tmargin-top: 1em;\n}\n</style>\n","usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/resources/ext.wikilambda.edit/composables/useBreakpoints.js","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/resources/ext.wikilambda.edit/index.js","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/resources/ext.wikilambda.edit/mixins/api.js","messages":[],"suppressedMessages":[{"ruleId":"camelcase","severity":2,"message":"Identifier 'wikilambda_function_call_zobject' is not in camel case.","line":21,"column":5,"nodeType":"Identifier","messageId":"notCamelCase","endLine":21,"endColumn":37,"suppressions":[{"kind":"directive","justification":""}]}],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/resources/ext.wikilambda.edit/mixins/portray.js","messages":[{"ruleId":"es-x/no-array-prototype-includes","severity":2,"message":"ES2016 'Array.prototype.includes' method is forbidden.","line":99,"column":10,"nodeType":"MemberExpression","messageId":"forbidden","endLine":99,"endColumn":27},{"ruleId":"no-constant-binary-expression","severity":2,"message":"Unexpected comparison to newly constructed object. These two values can never be equal.","line":148,"column":32,"nodeType":"ArrayExpression","messageId":"alwaysNew","endLine":148,"endColumn":34}],"suppressedMessages":[],"errorCount":2,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":"/**\n * WikiLambda Vue editor: portray mixin\n * Mixin with functions to generate HTML that portrays ZObjects,\n * starting from JSON ZObject representation.\n * This HTML is (initially) motivated by the metadata dialog, and is\n * meant to give a compact and readable presentation.\n *\n * @copyright 2020– Abstract Wikipedia team; see AUTHORS.txt\n * @license MIT\n */\n'use strict';\n\nconst Constants = require( '../Constants.js' );\nconst getValueFromCanonicalZMap = require( './schemata.js' ).methods.getValueFromCanonicalZMap;\nconst extractErrorStructure = require( './schemata.js' ).methods.extractErrorStructure;\n\n/**\n * Map from internal key (which appears in the result envelopes returned from backend services)\n * to the internationalization identifier. We map to an object so as to allow for future\n * inclusion of other attributes.\n */\nconst knownKeys = new Map( [\n\t[ 'errors', { i18nId: 'wikilambda-functioncall-metadata-errors-summary' } ],\n\t[ 'validateErrors', { i18nId: 'wikilambda-functioncall-metadata-validator-errors-summary' } ],\n\t[ 'actualTestResult', { i18nId: 'wikilambda-functioncall-metadata-actual-result' } ],\n\t[ 'expectedTestResult', { i18nId: 'wikilambda-functioncall-metadata-expected-result' } ],\n\t[ 'implementationId', { i18nId: 'wikilambda-functioncall-metadata-implementation-id' } ],\n\t[ 'implementationType', { i18nId: 'wikilambda-functioncall-metadata-implementation-type' } ],\n\t[ 'orchestrationStartTime', { i18nId: 'wikilambda-functioncall-metadata-orchestration-start-time' } ],\n\t[ 'orchestrationEndTime', { i18nId: 'wikilambda-functioncall-metadata-orchestration-end-time' } ],\n\t[ 'orchestrationDuration', { i18nId: 'wikilambda-functioncall-metadata-orchestration-duration' } ],\n\t[ 'orchestrationCpuUsage', { i18nId: 'wikilambda-functioncall-metadata-orchestration-cpu-usage' } ],\n\t[ 'orchestrationMemoryUsage', { i18nId: 'wikilambda-functioncall-metadata-orchestration-memory-usage' } ],\n\t[ 'orchestrationHostname', { i18nId: 'wikilambda-functioncall-metadata-orchestration-hostname' } ],\n\t[ 'evaluationStartTime', { i18nId: 'wikilambda-functioncall-metadata-evaluation-start-time' } ],\n\t[ 'evaluationEndTime', { i18nId: 'wikilambda-functioncall-metadata-evaluation-end-time' } ],\n\t[ 'evaluationDuration', { i18nId: 'wikilambda-functioncall-metadata-evaluation-duration' } ],\n\t[ 'evaluationCpuUsage', { i18nId: 'wikilambda-functioncall-metadata-evaluation-cpu-usage' } ],\n\t[ 'evaluationMemoryUsage', { i18nId: 'wikilambda-functioncall-metadata-evaluation-memory-usage' } ],\n\t[ 'evaluationHostname', { i18nId: 'wikilambda-functioncall-metadata-evaluation-hostname' } ],\n\t[ 'executionCpuUsage', { i18nId: 'wikilambda-functioncall-metadata-execution-cpu-usage' } ],\n\t[ 'executionMemoryUsage', { i18nId: 'wikilambda-functioncall-metadata-execution-memory-usage' } ]\n] );\n\nmodule.exports = exports = {\n\tmethods: {\n\t\tmaybeStringify: function ( value ) {\n\t\t\treturn typeof value === 'string' ? value : JSON.stringify( value );\n\t\t},\n\t\t/**\n\t\t * Given a function-call metadata map (produced by WikiFunctions backend services),\n\t\t * produce a string that portrays the metadata map content in a compact,\n\t\t * readable style, using raw HTML markup\n\t\t *\n\t\t * @param {Object} zMap a Z883/Typed map, in canonical form\n\t\t * @param {Array} labels\n\t\t * @return {string}\n\t\t */\n\t\tportrayMetadataMap: function ( zMap, labels ) {\n\t\t\tvar keysUsed = [];\n\t\t\tlet html = '<span><ul>';\n\t\t\t// First, portray the known/expected metadata keys and their values\n\t\t\t// If there's no 'errors' value, keyAndZErrorSummary will display 'None'\n\t\t\thtml = html + this.keyAndZErrorSummary( zMap, 'errors', labels, keysUsed );\n\t\t\t// With 'validateErrors', we don't want to display 'None', so check here if there's a value\n\t\t\tif ( getValueFromCanonicalZMap( zMap, 'validateErrors' ) ) {\n\t\t\t\thtml = html + this.keyAndZErrorSummary( zMap, 'validateErrors', labels, keysUsed );\n\t\t\t}\n\t\t\thtml = html + this.keyAndArbitraryValue( zMap, 'expectedTestResult', keysUsed );\n\t\t\thtml = html + this.keyAndArbitraryValue( zMap, 'actualTestResult', keysUsed );\n\t\t\thtml = html + this.keyAndStringValue( zMap, 'implementationType', keysUsed );\n\t\t\thtml = html + this.keyAndStringValue( zMap, 'implementationId', keysUsed );\n\t\t\thtml = html + this.keyAndDatetimeValue( zMap, 'orchestrationStartTime', keysUsed );\n\t\t\thtml = html + this.keyAndDatetimeValue( zMap, 'orchestrationEndTime', keysUsed );\n\t\t\thtml = html + this.keyAndStringValue( zMap, 'orchestrationDuration', keysUsed );\n\t\t\thtml = html + this.keyAndStringValue( zMap, 'orchestrationCpuUsage', keysUsed );\n\t\t\thtml = html + this.keyAndStringValue( zMap, 'orchestrationMemoryUsage', keysUsed );\n\t\t\thtml = html + this.keyAndStringValue( zMap, 'orchestrationHostname', keysUsed );\n\t\t\thtml = html + this.keyAndDatetimeValue( zMap, 'evaluationStartTime', keysUsed );\n\t\t\thtml = html + this.keyAndDatetimeValue( zMap, 'evaluationEndTime', keysUsed );\n\t\t\thtml = html + this.keyAndStringValue( zMap, 'evaluationDuration', keysUsed );\n\t\t\thtml = html + this.keyAndStringValue( zMap, 'evaluationCpuUsage', keysUsed );\n\t\t\thtml = html + this.keyAndStringValue( zMap, 'evaluationMemoryUsage', keysUsed );\n\t\t\thtml = html + this.keyAndStringValue( zMap, 'evaluationHostname', keysUsed );\n\t\t\thtml = html + this.keyAndStringValue( zMap, 'executionCpuUsage', keysUsed );\n\t\t\thtml = html + this.keyAndStringValue( zMap, 'executionMemoryUsage', keysUsed );\n\n\t\t\t// Now portray any top-level zMap entries that weren't already used above\n\t\t\tconst k1Array = zMap[ Constants.Z_TYPED_OBJECT_ELEMENT_1 ];\n\t\t\t// Ignore first item in the canonical form array; this is a string representing the type\n\t\t\tfor ( let i = 1; i < k1Array.length; i++ ) {\n\t\t\t\tconst entry = k1Array[ i ];\n\t\t\t\tlet key = entry[ Constants.Z_TYPED_OBJECT_ELEMENT_1 ] || entry[ Constants.Z_TYPED_PAIR_TYPE1 ];\n\t\t\t\t// Allow for keys that correspond to references\n\t\t\t\tif ( typeof key === 'object' && key[ Constants.Z_OBJECT_TYPE ] === Constants.Z_STRING_VALUE ) {\n\t\t\t\t\tkey = key[ Constants.Z_STRING_VALUE ];\n\t\t\t\t}\n\n\t\t\t\tif ( keysUsed.includes( key ) ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tconst keyInfo = knownKeys.get( key );\n\t\t\t\tconst displayKey = keyInfo ? this.$i18n( keyInfo.i18nId ).text() : key;\n\t\t\t\tconst value = this.maybeStringify( entry[ Constants.Z_TYPED_OBJECT_ELEMENT_2 ] ||\n\t\t\t\t\tentry[ Constants.Z_TYPED_PAIR_TYPE2 ] );\n\t\t\t\thtml = html + '<li><b>' + displayKey + ':</b> ' + value + '</li>';\n\t\t\t}\n\n\t\t\treturn html + '</ul></span>';\n\t\t},\n\t\t/**\n\t\t * Portray the given key and its zMap value, which should be a Z5 / Error object. The\n\t\t * resulting string is a cursory, bulleted summary of the given Z5. Each bullet represents\n\t\t * a suberror (instance of Z50) found in the Z5. Bullets are indented to reflect the\n\t\t * nesting of the sub-errors.\n\t\t *\n\t\t * @param {Object} zMap a Z883/Typed map, in canonical form\n\t\t * @param {string} key\n\t\t * @param {Array} labels\n\t\t * @param {Array} keysUsed any keys used (or checked) here are added to this array\n\t\t * @return {string}\n\t\t */\n\t\tkeyAndZErrorSummary: function ( zMap, key, labels, keysUsed ) {\n\t\t\tkeysUsed.push( key );\n\t\t\tlet suberrors;\n\t\t\tconst error = getValueFromCanonicalZMap( zMap, key );\n\t\t\tif ( error === undefined ) {\n\t\t\t\tsuberrors = [];\n\t\t\t} else {\n\t\t\t\tsuberrors = extractErrorStructure( error );\n\t\t\t}\n\t\t\tif ( suberrors.length === 0 ) {\n\t\t\t\t// Display (for English reader): \"Errors: none\" or \"Validator errors: none\"\n\t\t\t\tconst i18nKeyForNoErrors = this.$i18n( 'wikilambda-functioncall-metadata-errors', 0 ).text();\n\t\t\t\treturn '<li><b>' + i18nKeyForNoErrors + ':</b> ' +\n\t\t\t\t\tthis.$i18n( 'wikilambda-functioncall-metadata-errors-none' ).text() + '</li>';\n\t\t\t}\n\t\t\t// The knownKeys keys display \"Error summary: ...\" or \"Validator error summary: ...\"\n\t\t\tconst i18nKey = this.$i18n( knownKeys.get( key ).i18nId ).text();\n\t\t\tlet html = '<li><b>' + i18nKey + ':</b><br>';\n\t\t\thtml = html + this.formatZErrorSummary( suberrors, labels );\n\t\t\treturn html + '</li>';\n\t\t},\n\t\tformatZErrorSummary: function ( suberrors, labels ) {\n\t\t\tlet html = '<ul>';\n\t\t\tfor ( const suberror of suberrors ) {\n\t\t\t\thtml = html + '<li>' + this.messageForSuberror( suberror, labels ) + '</li>';\n\t\t\t\tif ( suberror.children !== [] ) {\n\t\t\t\t\thtml = html + this.formatZErrorSummary( suberror.children, labels );\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn html + '</ul>';\n\t\t},\n\t\t/**\n\t\t * Construct a message characterizing the given suberror. The message returned\n\t\t * is plain text, no HTML markup. See schemata.js::extractErrorStructure for\n\t\t * more about the suberror objects.\n\t\t *\n\t\t * @param {Object} subError\n\t\t * @param {Array} labels\n\t\t * @return {string}\n\t\t */\n\t\tmessageForSuberror: function ( subError, labels ) {\n\t\t\tlet message;\n\t\t\tconst errorType = subError.errorType;\n\t\t\tconst errorLabel = labels[ errorType ];\n\t\t\tmessage = '[' + errorType + '/' + errorLabel + ']';\n\t\t\tif ( subError.explanation ) {\n\t\t\t\tmessage = message + ' ' + subError.explanation;\n\t\t\t}\n\t\t\treturn message;\n\t\t},\n\n\t\t/**\n\t\t * Portray the given key and its zMap value, which should be a string containing\n\t\t * a date+time in ISO 8601 format\n\t\t *\n\t\t * @param {Object} zMap a Z883/Typed map, in canonical form\n\t\t * @param {string} key\n\t\t * @param {Array} keysUsed any keys used (or checked) here are added to this array\n\t\t * @return {string}\n\t\t */\n\t\tkeyAndDatetimeValue: function ( zMap, key, keysUsed ) {\n\n\t\t\t/**\n\t\t\t * Attempt to render a relative timestamp given a datetime string in ISO 8601 format\n\t\t\t *\n\t\t\t * @param {string} dateTimeString\n\t\t\t * @return {string}\n\t\t\t */\n\t\t\tconst getDatetimeRelativeValue = function ( dateTimeString ) {\n\t\t\t\tif ( Intl.RelativeTimeFormat ) {\n\t\t\t\t\tconst target = Date.parse( dateTimeString );\n\t\t\t\t\tconst now = Date.now();\n\t\t\t\t\tconst offset = now - target;\n\n\t\t\t\t\tlet relativeTimeFormatter;\n\t\t\t\t\ttry {\n\t\t\t\t\t\trelativeTimeFormatter = new Intl.RelativeTimeFormat( mw.config.get( 'wgUserLanguage' ) );\n\t\t\t\t\t} catch ( error ) {\n\t\t\t\t\t\t// Fall back to English if the MW locale isn't supported\n\t\t\t\t\t\trelativeTimeFormatter = new Intl.RelativeTimeFormat( 'en' );\n\t\t\t\t\t}\n\n\t\t\t\t\tlet offsetThreshold = 1000;\n\n\t\t\t\t\t// If this was within the last minute, render in seconds.\n\t\t\t\t\tif ( offset < offsetThreshold * 60 ) {\n\t\t\t\t\t\treturn relativeTimeFormatter.format(\n\t\t\t\t\t\t\t-Math.floor( offset / offsetThreshold ),\n\t\t\t\t\t\t\t'second'\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\toffsetThreshold *= 60;\n\n\t\t\t\t\t// If this was within the last hour, render in minutes.\n\t\t\t\t\tif ( offset < offsetThreshold * 60 ) {\n\t\t\t\t\t\treturn relativeTimeFormatter.format(\n\t\t\t\t\t\t\t-Math.floor( offset / offsetThreshold ),\n\t\t\t\t\t\t\t'minute'\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\toffsetThreshold *= 60;\n\n\t\t\t\t\t// If this was within the last day, render in hours.\n\t\t\t\t\tif ( offset < offsetThreshold * 24 ) {\n\t\t\t\t\t\treturn relativeTimeFormatter.format(\n\t\t\t\t\t\t\t-Math.floor( offset / offsetThreshold ),\n\t\t\t\t\t\t\t'hour'\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\toffsetThreshold *= 24;\n\n\t\t\t\t\t// If this was within the last week, render in days.\n\t\t\t\t\tif ( offset < offsetThreshold * 7 ) {\n\t\t\t\t\t\treturn relativeTimeFormatter.format(\n\t\t\t\t\t\t\t-Math.floor( offset / offsetThreshold ),\n\t\t\t\t\t\t\t'hour'\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\toffsetThreshold *= 7;\n\n\t\t\t\t\t// If this was within the last four weeks, render in weeks.\n\t\t\t\t\tif ( offset < offsetThreshold * 4 ) {\n\t\t\t\t\t\treturn relativeTimeFormatter.format(\n\t\t\t\t\t\t\t-Math.floor( offset / offsetThreshold ),\n\t\t\t\t\t\t\t'hour'\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\toffsetThreshold *= 4;\n\t\t\t\t}\n\n\t\t\t\t// Fallback for browsers without Intl\n\t\t\t\treturn dateTimeString.replace( 'T', ' ' ).replace( 'Z', ' (UTC)' );\n\t\t\t};\n\n\t\t\tkeysUsed.push( key );\n\t\t\tconst value = getValueFromCanonicalZMap( zMap, key );\n\t\t\tif ( value === undefined ) {\n\t\t\t\treturn '';\n\t\t\t}\n\t\t\tconst i18nKey = this.$i18n( knownKeys.get( key ).i18nId ).text();\n\t\t\treturn '<li><b>' + i18nKey + ':</b> ' + getDatetimeRelativeValue( value ) + '</li>';\n\t\t},\n\n\t\t/**\n\t\t * Portray the given key and its zMap value, which should be a string\n\t\t * that's already suitable for presentation\n\t\t *\n\t\t * @param {Object} zMap a Z883/Typed map, in canonical form\n\t\t * @param {string} key\n\t\t * @param {Array} keysUsed any keys used (or checked) here are added to this array\n\t\t * @return {string}\n\t\t */\n\t\tkeyAndStringValue: function ( zMap, key, keysUsed ) {\n\t\t\tkeysUsed.push( key );\n\t\t\tlet value = getValueFromCanonicalZMap( zMap, key );\n\t\t\tif ( value === undefined ) {\n\t\t\t\treturn '';\n\t\t\t}\n\t\t\tif ( typeof value === 'object' && value[ Constants.Z_OBJECT_TYPE ] === Constants.Z_STRING &&\n\t\t\t\tvalue[ Constants.Z_STRING_VALUE ] ) {\n\t\t\t\t// In canonical form there are cases where the string remains inside a Z6 object;\n\t\t\t\t// extract it here\n\t\t\t\tvalue = value[ Constants.Z_STRING_VALUE ];\n\t\t\t}\n\t\t\tvalue = this.maybeStringify( value );\n\t\t\tconst i18nKey = this.$i18n( knownKeys.get( key ).i18nId ).text();\n\t\t\treturn '<li><b>' + i18nKey + ':</b> ' + value + '</li>';\n\t\t},\n\t\t/**\n\t\t * Portray the given key and its zMap value, which should be an arbitrary ZObject\n\t\t * not handled by any of the more specialized methods.\n\t\t *\n\t\t * @param {Object} zMap a Z883/Typed map, in canonical form\n\t\t * @param {string} key\n\t\t * @param {Array} keysUsed any keys used (or checked) here are added to this array\n\t\t * @return {string}\n\t\t */\n\t\tkeyAndArbitraryValue: function ( zMap, key, keysUsed ) {\n\t\t\tkeysUsed.push( key );\n\t\t\tlet value = getValueFromCanonicalZMap( zMap, key );\n\t\t\tif ( value === undefined ) {\n\t\t\t\treturn '';\n\t\t\t}\n\t\t\tvalue = this.maybeStringify( value );\n\t\t\tconst i18nKey = this.$i18n( knownKeys.get( key ).i18nId ).text();\n\t\t\treturn '<li><b>' + i18nKey + ':</b> ' + value + '</li>';\n\t\t}\n\t}\n};\n","usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/resources/ext.wikilambda.edit/mixins/schemata.js","messages":[{"ruleId":"es/no-object-entries","message":"Definition for rule 'es/no-object-entries' was not found.","line":204,"column":3,"endLine":204,"endColumn":51,"severity":2,"nodeType":null},{"ruleId":"es-x/no-object-entries","severity":2,"message":"ES2017 'Object.entries' method is forbidden.","line":205,"column":3,"nodeType":"MemberExpression","messageId":"forbidden","endLine":205,"endColumn":17},{"ruleId":"es/no-object-entries","message":"Definition for rule 'es/no-object-entries' was not found.","line":350,"column":3,"endLine":350,"endColumn":51,"severity":2,"nodeType":null},{"ruleId":"es-x/no-object-entries","severity":2,"message":"ES2017 'Object.entries' method is forbidden.","line":351,"column":3,"nodeType":"MemberExpression","messageId":"forbidden","endLine":351,"endColumn":17}],"suppressedMessages":[],"errorCount":4,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":"/**\n * WikiLambda Vue editor: schemata mixin\n * Mixin with functions to canonicalize and normalize ZObjects.\n * This is distinct from the function-schemata as the UI\n * relies of slightly different requirements for normalization.\n *\n * @copyright 2020– Abstract Wikipedia team; see AUTHORS.txt\n * @license MIT\n */\n'use strict';\n\nvar Constants = require( '../Constants.js' ),\n\ttypeUtils = require( './typeUtils.js' ).methods;\n\n// Note: This is intentionally \"wrong\" in that it allows for Z0.\n// It excludes letters so as not to apply to keys (containing a 'K').\nconst referenceRe = /^Z0*[1-9]*\\d*$/;\nconst errorTypeReferenceRe = /^Z5\\d{2}$/;\n\nfunction canonicalizeZ6OrZ9( zobject ) {\n\tvar objectType = zobject[ Constants.Z_OBJECT_TYPE ];\n\n\tif ( objectType === Constants.Z_STRING ) {\n\t\tvar Z6 = zobject[ Constants.Z_STRING_VALUE ];\n\t\tif ( Z6 && typeof Z6.match === 'function' && Z6.match( referenceRe ) ) {\n\t\t\treturn zobject;\n\t\t}\n\t\treturn Z6 || '';\n\t}\n\n\tvar Z9 = zobject[ Constants.Z_REFERENCE_ID ];\n\tif ( Z9 && typeof Z9.match === 'function' && Z9.match( referenceRe ) ) {\n\t\treturn Z9;\n\t}\n\n\treturn '';\n}\n\nfunction filterUndefinedLabels( allLabels ) {\n\treturn allLabels.filter( function ( label ) {\n\t\treturn label[ Constants.Z_OBJECT_TYPE ] !== Constants.Z_MONOLINGUALSTRING ||\n\t\t!!label[ Constants.Z_MONOLINGUALSTRING_VALUE ];\n\t} );\n}\n\nfunction canonicalize( zobject ) {\n\tfunction listifyArray( zlist, arr ) {\n\t\tvar head = zlist[ Constants.Z_TYPED_OBJECT_ELEMENT_1 ],\n\t\t\ttail = zlist[ Constants.Z_TYPED_OBJECT_ELEMENT_2 ];\n\n\t\tif ( typeof arr === 'undefined' ) {\n\t\t\tarr = [];\n\t\t}\n\n\t\tif ( head ) {\n\t\t\tarr.push( canonicalize( head ) );\n\t\t}\n\n\t\tif ( tail ) {\n\t\t\treturn listifyArray( tail, arr );\n\t\t} else {\n\t\t\treturn arr;\n\t\t}\n\t}\n\n\tvar canon = {};\n\n\tif ( typeof zobject === 'undefined' ) {\n\t\treturn undefined;\n\t} else if ( typeof zobject === 'string' ) {\n\t\tcanon = zobject;\n\t} else if ( Array.isArray( zobject ) ) {\n\t\tcanon = zobject.map( function ( element ) {\n\t\t\treturn canonicalize( element );\n\t\t} );\n\t} else if (\n\t\t[ Constants.Z_REFERENCE, Constants.Z_STRING ].indexOf( zobject[ Constants.Z_OBJECT_TYPE ] ) > -1\n\t) {\n\t\tcanon = canonicalizeZ6OrZ9( zobject );\n\t} else if ( zobject[ Constants.Z_OBJECT_TYPE ] &&\n\t\tzobject[ Constants.Z_OBJECT_TYPE ][ Constants.Z_REFERENCE_ID ] === Constants.Z_TYPED_LIST\n\t) {\n\t\tcanon = canonicalize( listifyArray( zobject ) );\n\t} else {\n\t\t// remove any 'undefined' labels\n\t\tif ( zobject[ Constants.Z_MULTILINGUALSTRING_VALUE ] ) {\n\t\t\tzobject[ Constants.Z_MULTILINGUALSTRING_VALUE ] = filterUndefinedLabels(\n\t\t\t\tzobject[ Constants.Z_MULTILINGUALSTRING_VALUE ]\n\t\t\t);\n\t\t}\n\n\t\tObject.keys( zobject ).forEach( function ( key ) {\n\t\t\tcanon[ key ] = canonicalize( zobject[ key ] );\n\t\t} );\n\t}\n\treturn canon;\n}\n\nfunction isString( s ) {\n\treturn typeof s === 'string' || s instanceof String;\n}\n\nfunction isZid( k ) {\n\treturn k.match( /^Z[1-9]\\d*$/ ) !== null;\n}\n\n/**\n * Return the ZObject in semi-normalized form. This means that the strings\n * and references will be normalized, but a canonical list will still be\n * left as a canonical list. This has also been referred to as Hybrid form\n *\n * @param {Object | Array | string} zobject\n * @return {Object|Array|undefined}\n */\nfunction normalize( zobject ) {\n\tvar normal = {},\n\t\tkeys;\n\n\tif ( typeof zobject === 'undefined' ) {\n\t\treturn undefined;\n\t} else if ( typeof zobject === 'string' ) {\n\t\tif ( typeUtils.getZObjectType( zobject ) === Constants.Z_REFERENCE ) {\n\t\t\tnormal = {\n\t\t\t\tZ1K1: Constants.Z_REFERENCE,\n\t\t\t\tZ9K1: zobject\n\t\t\t};\n\t\t} else {\n\t\t\tnormal = {\n\t\t\t\tZ1K1: Constants.Z_STRING,\n\t\t\t\tZ6K1: zobject\n\t\t\t};\n\t\t}\n\t} else if ( Array.isArray( zobject ) ) {\n\t\tnormal = zobject.map( function ( element ) {\n\t\t\treturn normalize( element );\n\t\t} );\n\t} else {\n\t\tkeys = Object.keys( zobject );\n\t\tfor ( var i = 0; i < keys.length; i++ ) {\n\t\t\tif ( keys[ i ] === Constants.Z_OBJECT_TYPE && (\n\t\t\t\tzobject.Z1K1 === Constants.Z_STRING || zobject.Z1K1 === Constants.Z_REFERENCE ) ) {\n\t\t\t\tnormal.Z1K1 = zobject.Z1K1;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif ( keys[ i ] === Constants.Z_PERSISTENTOBJECT_ID && isString( zobject.Z2K1 ) ) {\n\t\t\t\tnormal.Z2K1 = {\n\t\t\t\t\tZ1K1: Constants.Z_STRING,\n\t\t\t\t\tZ6K1: zobject.Z2K1\n\t\t\t\t};\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif ( keys[ i ] === Constants.Z_STRING_VALUE && isString( zobject.Z6K1 ) ) {\n\t\t\t\tnormal.Z6K1 = zobject.Z6K1;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif ( keys[ i ] === Constants.Z_REFERENCE_ID && isString( zobject.Z9K1 ) ) {\n\t\t\t\tnormal.Z9K1 = zobject.Z9K1;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tnormal[ keys[ i ] ] = normalize( zobject[ keys[ i ] ] );\n\t\t}\n\t}\n\treturn normal;\n}\n\n/**\n * Return the ZMap value corresponding to the given key, if present.\n * TODO (T302015) When ZMap keys are extended beyond Z6/Z39, update accordingly\n *\n * @param {Object} zMap a Z883/Typed map, in canonical form\n * @param {Object} key a Z6 or Z39 instance, in canonical form\n * @return {Object|undefined} a Z1/Object, the value of the map entry with the given key,\n * or undefined if there is no such entry\n */\nfunction getValueFromCanonicalZMap( zMap, key ) {\n\tconst K1Array = zMap[ Constants.Z_TYPED_OBJECT_ELEMENT_1 ];\n\t// Ignore first item in the canonical form array; this is a string representing the type\n\tfor ( let i = 1; i < K1Array.length; i++ ) {\n\t\tconst entry = K1Array[ i ];\n\t\t// To accommodate our current programming practices, we need to allow for either key here:\n\t\tconst currentKey = entry[ Constants.Z_TYPED_OBJECT_ELEMENT_1 ] || entry[ Constants.Z_TYPED_PAIR_TYPE1 ];\n\t\tif ( ( currentKey === key ) ||\n\t\t\t( currentKey[ Constants.Z_OBJECT_TYPE ] === Constants.Z_STRING &&\n\t\t\t\tkey[ Constants.Z_OBJECT_TYPE ] === Constants.Z_STRING &&\n\t\t\t\tcurrentKey[ Constants.Z_STRING_VALUE ] === key[ Constants.Z_STRING_VALUE ] ) ||\n\t\t\t( currentKey[ Constants.Z_OBJECT_TYPE ] === Constants.Z_KEY_REFERENCE &&\n\t\t\t\tkey[ Constants.Z_OBJECT_TYPE ] === Constants.Z_KEY_REFERENCE &&\n\t\t\t\tcurrentKey[ Constants.Z_KEY_REFERENCE_ID ] === key[ Constants.Z_KEY_REFERENCE_ID ] ) ) {\n\t\t\t// To accommodate our current programming practices, we need to allow for either key here:\n\t\t\treturn entry[ Constants.Z_TYPED_OBJECT_ELEMENT_2 ] || entry[ Constants.Z_TYPED_PAIR_TYPE2 ];\n\t\t}\n\t}\n}\n\n/**\n * Traverses a ZObject calling the provided callback function for every\n * <key, value> pair. This a depth-first procedure.\n *\n * @param {Object} zobject\n * @param {Function} callback\n */\nfunction traverse( zobject, callback ) {\n\tif ( zobject !== null && typeof zobject === 'object' ) {\n\t\t// eslint-disable-next-line es/no-object-entries\n\t\tObject.entries( zobject ).forEach( ( [ key, value ] ) => {\n\t\t\tcallback( key, value );\n\t\t\ttraverse( value, callback );\n\t\t} );\n\t}\n}\n\n/**\n * Finds all of the ZIDs appearing in an arbitrary ZObject.\n *\n * @param {Object|string} zobject a Z1/Object\n * @return {Set} Set of (string) ZIDs\n */\nfunction extractZIDs( zobject ) {\n\tconst found = new Set( [] );\n\t// Handle the case of a lone canonical reference\n\tif ( typeof zobject === 'string' && isZid( zobject ) ) {\n\t\tfound.add( zobject );\n\t}\n\n\ttraverse( zobject, ( _key, value ) => {\n\t\tif ( typeof value === 'string' && isZid( value ) ) {\n\t\t\tfound.add( value );\n\t\t}\n\t} );\n\n\treturn found;\n}\n\n/**\n * Checks if a given zobject is a suberror (a zobject whose type is an instance of Z50/'Error type').\n * If so, returns a JS object with keys errorType and (optionally) explanation. If not, returns null.\n *\n * The 'explanation' is an explanatory string for this suberror.\n * Such strings are expected for Z500, but are also generated in the orchestrator for\n * some other error types. In addition to explanatory strings, a few other useful keys\n * with string values will show up here, e.g. Z503K1/'feature name' and Z504K1/ZID.\n *\n * Allows for the more relaxed Z5/Error format from the orchestrator, in which the suberror's\n * type appears directly as the value of Z1K1/type, and also the stricter format, in which\n * it appears in a function call to Z885/'Errortype to type'. Z885K1 is the 'errortype' key of Z885.\n *\n * @param {Object} zobject\n * @return {Array} of objects\n */\nfunction checkIfSuberror( zobject ) {\n\tif ( typeof zobject === 'object' && zobject.Z1K1 && typeof zobject.Z1K1 === 'string' &&\n\t\tzobject.Z1K1.match( errorTypeReferenceRe ) ) {\n\t\t// Handle the relaxed Z5/Error format from the orchestrator\n\t\tconst suberror = {};\n\t\tsuberror.errorType = zobject.Z1K1;\n\t\tconst stringKey = suberror.errorType + 'K1';\n\t\tconst k1String = zobject[ stringKey ];\n\t\tif ( k1String && isString( k1String ) && !isZid( k1String ) ) {\n\t\t\tsuberror.explanation = k1String;\n\t\t}\n\t\treturn suberror;\n\t} else if ( typeof zobject === 'object' && zobject.Z1K1 && typeof zobject.Z1K1 === 'object' &&\n\t\tzobject.Z1K1.Z885K1 && typeof zobject.Z1K1.Z885K1 === 'string' &&\n\t\tzobject.Z1K1.Z885K1.match( errorTypeReferenceRe ) ) {\n\t\tconst suberror = {};\n\t\tsuberror.errorType = zobject.Z1K1.Z885K1;\n\t\tconst stringKey = 'K1';\n\t\tconst k1String = zobject[ stringKey ];\n\t\tif ( k1String && isString( k1String ) && !isZid( k1String ) ) {\n\t\t\tsuberror.explanation = k1String;\n\t\t}\n\t\treturn suberror;\n\t}\n}\n\n// These error types have no keys whose values contain nested error content. If a error type ZID\n// appears here, extractErrorStructure will not search through any children of a zobject of that type.\nconst errorTypesNotToTraverse = new Set( [ 'Z501', 'Z505', 'Z508', 'Z511', 'Z512', 'Z513', 'Z516',\n\t'Z531', 'Z532', 'Z533', 'Z534', 'Z535', 'Z536', 'Z537', 'Z542', 'Z547', 'Z548', 'Z551', 'Z553' ] );\n\n/**\n * Traverses a ZObject to find all the suberrors. (A suberror is a zobject\n * whose type is an instance of Z50/'Error type'). Example:\n * { Z1K1: 'Z500', Z500K1: 'Could not find argument Z811K1' }\n * For each suberror found, the result includes a JS object with properties\n * 'errorType', 'children', and (optionally) 'explanation'. Example:\n * { errorType: 'Z500', explanation: 'Could not find argument Z811K1', children: [] }\n *\n * The 'children', if any, are additional suberrors found within the nested ZObjects of\n * this suberror.\n *\n * zobject is normally a Z5 in the top level call, but doesn't have to be.\n *\n * @param {Object} zobject\n * @return {Array} of objects\n */\nfunction extractErrorStructure( zobject ) {\n\tconst subError = checkIfSuberror( zobject );\n\tif ( subError ) {\n\t\tif ( subError.explanation ) {\n\t\t\t// In this special case, there won't be any nested suberrors; look no further\n\t\t\tsubError.children = [];\n\t\t} else if ( errorTypesNotToTraverse.has( subError.errorType ) ) {\n\t\t\t// Also in this case, there won't be any nested suberrors; look no further\n\t\t\tsubError.children = [];\n\t\t} else {\n\t\t\tsubError.children = extractNestedSuberrors( zobject, subError.errorType );\n\t\t}\n\t\treturn [ subError ];\n\t}\n\treturn extractNestedSuberrors( zobject, null );\n}\n\n/**\n * For each suberror type, these are its keys whose values should be included\n * in the traversal conducted by extractNestedSuberrors(), because\n * they may contain nested error content. We include both local and global\n * forms of the keys, to make sure all currently generated errors are covered.\n *\n * If a suberror type isn't listed here, *all* of its keys' values will be traversed.\n * It is not necessary for each suberror type to appear here, but if one does,\n * it should *not* appear in errorTypesNotToTraverse.\n *\n * New error types will be handled without updating this map or errorTypesNotToTraverse\n * (albeit not necessarily optimally).\n */\nconst errorKeysToTraverse = new Map( [\n\t[ 'Z502', new Set( [ 'Z502K2', 'K2' ] ) ], // Not wellformed, [value]\n\t[ 'Z506', new Set( [ 'Z506K4', 'K4' ] ) ], // Argument type mismatch, [propagated error]\n\t[ 'Z507', new Set( [ 'Z507K2', 'K2' ] ) ], // Error in evaluation, [propagated error]\n\t[ 'Z517', new Set( [ 'Z517K4', 'K4' ] ) ], // Return type mismatch, [propagated error]\n\t[ 'Z518', new Set( [ 'Z518K3', 'K3' ] ) ] // Object type mismatch, [propagated error]\n] );\n\n/**\n * Finds all suberrors in the children objects of the given zobject, as described for\n * extractErrorStructure(). In that function we check whether the top-level\n * object is a suberror; here we look at the children objects.\n *\n * Special-purpose function; only meant to be called from extractErrorStructure().\n *\n * @param {Object} zobject\n * @param {string|null} errorType\n * @return {Array} of objects\n */\nfunction extractNestedSuberrors( zobject, errorType ) {\n\tvar nested = [];\n\tif ( zobject !== null && typeof zobject === 'object' ) {\n\t\tconst keysToTraverse = errorKeysToTraverse.get( errorType );\n\t\t// eslint-disable-next-line es/no-object-entries\n\t\tObject.entries( zobject ).forEach( ( [ key, value ] ) => {\n\t\t\t// We've already looked inside Z1K1/type; no need to look again\n\t\t\tif ( key !== Constants.Z_OBJECT_TYPE &&\n\t\t\t\t( keysToTraverse === undefined || keysToTraverse.has( key ) ) ) {\n\t\t\t\tnested.push( ...extractErrorStructure( value ) );\n\t\t\t}\n\t\t} );\n\t}\n\treturn nested;\n}\n\nmodule.exports = exports = {\n\tmethods: {\n\t\tcanonicalizeZObject: canonicalize,\n\t\tnormalizeZObject: normalize,\n\t\tgetValueFromCanonicalZMap: getValueFromCanonicalZMap,\n\t\textractErrorStructure: extractErrorStructure,\n\t\textractZIDs: extractZIDs\n\t}\n};\n","usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/resources/ext.wikilambda.edit/mixins/typeUtils.js","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/resources/ext.wikilambda.edit/mixins/urlUtils.js","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/resources/ext.wikilambda.edit/mixins/validator.js","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/resources/ext.wikilambda.edit/mixins/zobjectTreeUtils.js","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/resources/ext.wikilambda.edit/store/.eslintrc.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/resources/ext.wikilambda.edit/store/actions.js","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/resources/ext.wikilambda.edit/store/classes/LabelData.js","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/resources/ext.wikilambda.edit/store/classes/Row.js","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/resources/ext.wikilambda.edit/store/getters.js","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/resources/ext.wikilambda.edit/store/index.js","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/resources/ext.wikilambda.edit/store/modules/arguments.js","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/resources/ext.wikilambda.edit/store/modules/callZFunction.js","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/resources/ext.wikilambda.edit/store/modules/errors.js","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/resources/ext.wikilambda.edit/store/modules/languages.js","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/resources/ext.wikilambda.edit/store/modules/programmingLanguages.js","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/resources/ext.wikilambda.edit/store/modules/router.js","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/resources/ext.wikilambda.edit/store/modules/zImplementations.js","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/resources/ext.wikilambda.edit/store/modules/zKeys.js","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/resources/ext.wikilambda.edit/store/modules/zTesterResults.js","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/resources/ext.wikilambda.edit/store/modules/zTesters.js","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/resources/ext.wikilambda.edit/store/modules/zTypedList.js","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/resources/ext.wikilambda.edit/store/modules/zobject.js","messages":[{"ruleId":"jsdoc/require-returns-check","severity":1,"message":"JSDoc @return declaration present but return expression not available in function.","line":1834,"column":3,"nodeType":"Block","endLine":1844,"endColumn":6}],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"/*!\n * WikiLambda Vue editor: ZOBject Vuex module\n *\n * @copyright 2020– Abstract Wikipedia team; see AUTHORS.txt\n * @license MIT\n */\n\nvar Constants = require( '../../Constants.js' ),\n\ttypeUtils = require( '../../mixins/typeUtils.js' ).methods,\n\tzobjectTreeUtils = require( '../../mixins/zobjectTreeUtils.js' ).methods,\n\tcanonicalize = require( '../../mixins/schemata.js' ).methods.canonicalizeZObject,\n\tgetParameterByName = require( '../../mixins/urlUtils.js' ).methods.getParameterByName,\n\taddZObjects = require( './zobject/addZObjects.js' ),\n\tcurrentZObject = require( './zobject/currentZObject.js' ),\n\tRow = require( '../classes/Row.js' ),\n\tsaveZObject = require( '../../mixins/api.js' ).methods.saveZObject,\n\tdebounceZObjectLookup = null,\n\tDEBOUNCE_ZOBJECT_LOOKUP_TIMEOUT = 300;\n\n/**\n * Returns whether the object is a reference type from the parent object\n * E.g. \"Z1K1: {Z1K1: Z9}\"\n *\n * @param {Object} object row of the internal zobject table\n * @param {Object} parentObject row of the internal zobject table\n * @return {boolean}\n */\nfunction isObjectTypeDeclaration( object, parentObject ) {\n\tvar isReference = object.value === Constants.Z_REFERENCE;\n\tvar isObjectType = parentObject.key === Constants.Z_OBJECT_TYPE;\n\n\treturn isReference && isObjectType;\n}\n\n/**\n * Returns whether the value of the function call id (E.g. {Z7K1: Z881}) is\n * a known generic type with a custom component\n *\n * @param {Object} functionCallId object row where key is Z7K1\n * @return {boolean}\n */\nfunction isTypedObjectWithCustomComponent( functionCallId ) {\n\tvar istypedObject = Constants.Z_TYPED_OBJECTS_LIST.indexOf( functionCallId.value ) !== -1;\n\n\treturn istypedObject;\n}\n\n/**\n * Remove implementation and tester from a ZObject\n * The zObject has to be of type function\n *\n * @param {Object} zobject\n * @return {Object} zobject\n */\nfunction unattachImplementationsAndTesters( zobject ) {\n\tif ( zobject[ Constants.Z_PERSISTENTOBJECT_VALUE ][ Constants.Z_OBJECT_TYPE ] === Constants.Z_FUNCTION\n\t) {\n\t\tzobject[ Constants.Z_PERSISTENTOBJECT_VALUE ][ Constants.Z_FUNCTION_TESTERS ] = [ Constants.Z_TESTER ];\n\t\tzobject[ Constants.Z_PERSISTENTOBJECT_VALUE ][ Constants.Z_FUNCTION_IMPLEMENTATIONS ] =\n\t\t\t[ Constants.Z_IMPLEMENTATION ];\n\t}\n\n\treturn zobject;\n}\n\n/**\n * Returns whether a given persisted function returns a Type/Z4\n *\n * @param {Object} objectDeclaration persisted function zobject\n * @return {boolean}\n */\nfunction isFunctionToType( objectDeclaration ) {\n\tif ( objectDeclaration ) {\n\t\tvar isTypeFunction =\n\t\t\tobjectDeclaration[ Constants.Z_PERSISTENTOBJECT_VALUE ][ Constants.Z_OBJECT_TYPE ] === Constants.Z_FUNCTION;\n\t\tvar returnsAType =\n\t\t\tobjectDeclaration[ Constants.Z_PERSISTENTOBJECT_VALUE ][ Constants.Z_FUNCTION_RETURN_TYPE ] ===\n\t\t\t\tConstants.Z_TYPE;\n\n\t\treturn isTypeFunction && returnsAType;\n\t}\n}\n\nfunction getFunctionOutputId( getNestedZObjectById ) {\n\treturn getNestedZObjectById( 0, [\n\t\tConstants.Z_PERSISTENTOBJECT_VALUE,\n\t\tConstants.Z_FUNCTION_RETURN_TYPE,\n\t\tConstants.Z_REFERENCE_ID\n\t] ).id;\n}\n\nfunction getZImplementationFunctionId( findKeyInArray, context ) {\n\tconst persistentObjectId = findKeyInArray( Constants.Z_PERSISTENTOBJECT_VALUE, context.state.zobject ).id;\n\tconst persistentObject = context.getters.getZObjectChildrenById( persistentObjectId );\n\tconst zImplementationFunction = findKeyInArray(\n\t\t[ Constants.Z_REFERENCE_ID, Constants.Z_STRING_VALUE ],\n\t\tcontext.getters.getZObjectChildrenById(\n\t\t\tfindKeyInArray( Constants.Z_IMPLEMENTATION_FUNCTION, persistentObject ).id\n\t\t)\n\t);\n\treturn zImplementationFunction.id;\n}\n\nfunction getZTesterFunctionId( findKeyInArray, context ) {\n\tconst persistentObjectId = findKeyInArray( Constants.Z_PERSISTENTOBJECT_VALUE, context.state.zobject ).id;\n\tconst persistentObject = context.getters.getZObjectChildrenById( persistentObjectId );\n\tconst zTesterFunctionId = findKeyInArray( Constants.Z_TESTER_FUNCTION, persistentObject ).id;\n\tconst zReference = context.getters.getZObjectChildrenById( zTesterFunctionId );\n\treturn findKeyInArray( Constants.Z_REFERENCE_ID, zReference ).id;\n}\n\n/**\n * Runs actions on the global zobject to make it valid for submission.\n *\n * -Clears empty monolingual string labels.\n * -Canonicalizes the zobject.\n * -Unattaches implementations and testers, if relevant.\n *\n * @param {Object} context\n * @param {boolean} shouldUnattachImplementationAndTester\n * @return {Object} zobject\n */\nfunction transformZObjectForSubmission( context, shouldUnattachImplementationAndTester ) {\n\tremoveEmptyNameLabelValues( context );\n\tremoveEmptyAliasLabelValues( context );\n\n\tif ( context.getters.getNestedZObjectById( 0, [\n\t\tConstants.Z_PERSISTENTOBJECT_VALUE,\n\t\tConstants.Z_FUNCTION_ARGUMENTS ] ) ) {\n\t\tremoveEmptyArgumentLabelValues( context );\n\t}\n\n\tvar zobject = canonicalize( zobjectTreeUtils.convertZObjectTreetoJson( context.state.zobject ) );\n\n\tif ( shouldUnattachImplementationAndTester ) {\n\t\tzobject = unattachImplementationsAndTesters( zobject );\n\t}\n\n\treturn zobject;\n}\n\n/**\n * Removes the name label language objects with empty monolingual string values from the global zobject.\n *\n * @param {Object} context\n */\nfunction removeEmptyNameLabelValues( context ) {\n\tvar namesListId = context.getters.getNestedZObjectById( 0, [\n\t\tConstants.Z_PERSISTENTOBJECT_LABEL,\n\t\tConstants.Z_MULTILINGUALSTRING_VALUE\n\t] ).id;\n\tvar namesList = context.getters.getAllItemsFromListById( namesListId );\n\n\tnamesList.forEach( function ( nameListLabel ) {\n\t\tvar labelString = context.getters.getNestedZObjectById( nameListLabel.id, [\n\t\t\tConstants.Z_MONOLINGUALSTRING_VALUE,\n\t\t\tConstants.Z_STRING_VALUE\n\t\t] );\n\t\tif ( !labelString.value ) {\n\t\t\tcontext.dispatch( 'removeZObjectChildren', nameListLabel.id );\n\t\t\tcontext.dispatch( 'removeZObject', nameListLabel.id );\n\t\t}\n\t} );\n\tcontext.dispatch( 'recalculateZListIndex', namesListId );\n}\n\n/**\n * Removes the function argument label language objects with empty monolingual string values from the global zobject.\n *\n * @param {Object} context\n */\nfunction removeEmptyArgumentLabelValues( context ) {\n\tvar argumentsList = context.getters.getAllItemsFromListById(\n\t\tcontext.getters.getNestedZObjectById( 0, [\n\t\t\tConstants.Z_PERSISTENTOBJECT_VALUE,\n\t\t\tConstants.Z_FUNCTION_ARGUMENTS\n\t\t] ).id );\n\n\targumentsList.forEach( function ( argument ) {\n\t\tvar argumentLabelArrayId = context.getters.getNestedZObjectById( argument.id, [\n\t\t\tConstants.Z_ARGUMENT_LABEL,\n\t\t\tConstants.Z_MULTILINGUALSTRING_VALUE ] ).id;\n\t\tvar argumentLabelArray = context.getters.getAllItemsFromListById( argumentLabelArrayId );\n\n\t\targumentLabelArray.forEach( function ( argumentLabel ) {\n\t\t\tvar labelString = context.getters.getNestedZObjectById( argumentLabel.id, [\n\t\t\t\tConstants.Z_MONOLINGUALSTRING_VALUE,\n\t\t\t\tConstants.Z_STRING_VALUE\n\t\t\t] );\n\n\t\t\tif ( !labelString.value ) {\n\t\t\t\tcontext.dispatch( 'removeZObjectChildren', argumentLabel.id );\n\t\t\t\tcontext.dispatch( 'removeZObject', argumentLabel.id );\n\t\t\t}\n\t\t} );\n\n\t\tcontext.dispatch( 'recalculateZListIndex', argumentLabelArrayId );\n\t} );\n}\n\n/**\n * Removes the alias label language objects with empty monolingual string values from the global zobject.\n *\n * @param {Object} context\n */\nfunction removeEmptyAliasLabelValues( context ) {\n\tvar aliasListId = context.getters.getNestedZObjectById( 0, [\n\t\tConstants.Z_PERSISTENTOBJECT_ALIASES,\n\t\tConstants.Z_MULTILINGUALSTRINGSET_VALUE\n\t] ).id;\n\tvar aliasList = context.getters.getAllItemsFromListById( aliasListId );\n\n\taliasList.forEach( function ( alias ) {\n\t\tvar aliasLabelId = context.getters.getNestedZObjectById( alias.id, [\n\t\t\tConstants.Z_MONOLINGUALSTRINGSET_VALUE ] ).id;\n\t\tvar aliasLabelArray = context.getters.getAllItemsFromListById( aliasLabelId );\n\n\t\tif ( aliasLabelArray.length === 0 ) {\n\t\t\tcontext.dispatch( 'removeZObjectChildren', alias.id );\n\t\t\tcontext.dispatch( 'removeZObject', alias.id );\n\t\t} else {\n\t\t\tfor ( let index = 0; index < aliasLabelArray.length; index++ ) {\n\t\t\t\tconst aliasLabelItemId = aliasLabelArray[ index ];\n\t\t\t\tconst aliasLabelItemIdItems = context.getters.getZObjectChildrenById( aliasLabelItemId.id );\n\n\t\t\t\tif ( aliasLabelItemIdItems.length === 0 ||\n\t\t\t\t\t( aliasLabelItemIdItems.length > 1 && !aliasLabelItemIdItems[ 1 ].value )\n\t\t\t\t) {\n\t\t\t\t\tcontext.dispatch( 'removeZObjectChildren', aliasLabelItemId.id );\n\t\t\t\t\tcontext.dispatch( 'removeZObject', aliasLabelItemId.id );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tcontext.dispatch( 'recalculateZListIndex', aliasLabelId );\n\t\tcontext.dispatch( 'recalculateZListIndex', aliasListId );\n\t} );\n}\n\nfunction isNotObjectOrArrayRoot( object ) {\n\treturn [ 'array', 'object' ].indexOf( object.value ) === -1;\n}\n\n/**\n * @param {Function} getZObjectChildrenById state getter\n * @param {Array} object\n * @return {Object}\n */\nfunction retrieveFunctionCallFunctionZid( getZObjectChildrenById, object ) {\n\tvar functionCall = typeUtils.findKeyInArray( Constants.Z_FUNCTION_CALL_FUNCTION, object );\n\n\tif ( functionCall && functionCall.value === 'object' ) {\n\t\tvar functionCallObject = getZObjectChildrenById( functionCall.id );\n\t\tfunctionCall = typeUtils.findKeyInArray( Constants.Z_REFERENCE_ID, functionCallObject );\n\t}\n\n\treturn functionCall;\n}\n\nfunction generateZIDListFromObjectTree( objectTree ) {\n\tlet keysOrZids = new Set();\n\tobjectTree.forEach( function ( row ) {\n\t\tkeysOrZids.add( row.value );\n\t\tif ( row.key !== undefined ) {\n\t\t\t// We make sure that even integer keys are added as strings\n\t\t\t// otherwise the following pattern match will raise an error\n\t\t\tkeysOrZids.add( `${row.key}` );\n\t\t}\n\t} );\n\n\tkeysOrZids = [ ...keysOrZids ]\n\t\t.map( function ( str ) {\n\t\t\t// If it matches Zid or Zkey, return Zid part, else false\n\t\t\tconst matches = str.match( /^(Z[1-9]\\d*)(K[1-9]\\d*)?$/ );\n\t\t\treturn matches ? matches.slice( 1 )[ 0 ] : false;\n\t\t} )\n\t\t.filter( function ( value ) {\n\t\t\t// Filter false values\n\t\t\treturn value;\n\t\t} );\n\n\t// Return unique values\n\treturn [ ...new Set( keysOrZids ) ];\n}\n\nmodule.exports = exports = {\n\tmodules: {\n\t\taddZObjects: addZObjects,\n\t\tcurrentZObject: currentZObject\n\t},\n\tstate: {\n\t\tzobject: [],\n\t\tcreateNewPage: true,\n\t\tzobjectMessage: {\n\t\t\ttype: 'error',\n\t\t\ttext: null\n\t\t},\n\t\tisSavingZObject: false,\n\t\tZObjectInitialized: false,\n\t\tactiveLangSelection: '',\n\t\tisZObjectDirty: false\n\t},\n\tgetters: {\n\n\t\t/* NEW GETTERS */\n\n\t\t/***********************************************************************\n\t\t * INTERFACE METHODS\n\t\t *\n\t\t * These are the methods that will be commonly used from the components.\n\t\t * These methods should never return internal structure of the zobject\n\t\t * table. The only internal information they may return are row IDs so\n\t\t * that they can pass them onto their child components.\n\t\t ***********************************************************************/\n\n\t\t/**\n\t\t * Return a specific zObject key given its row ID or\n\t\t * undefined if the row ID doesn't exist\n\t\t *\n\t\t * @param {Object} state\n\t\t * @param {Object} getters\n\t\t * @return {Function}\n\t\t */\n\t\tgetZObjectKeyByRowId: function ( state, getters ) {\n\t\t\t/**\n\t\t\t * @param {number} rowId\n\t\t\t * @return {string | undefined}\n\t\t\t */\n\t\t\tfunction fetchZObjectKey( rowId ) {\n\t\t\t\tconst row = getters.getRowById( rowId );\n\t\t\t\treturn ( row !== undefined ) ?\n\t\t\t\t\trow.key :\n\t\t\t\t\tundefined;\n\t\t\t}\n\t\t\treturn fetchZObjectKey;\n\t\t},\n\n\t\t/**\n\t\t * Returns string with the value if the row exists and\n\t\t * is terminal, else returns undefined\n\t\t *\n\t\t * @param {Object} state\n\t\t * @param {Object} getters\n\t\t * @return {Function}\n\t\t */\n\t\tgetZObjectValueByRowId: function ( state, getters ) {\n\t\t\t/**\n\t\t\t * @param {number} rowId\n\t\t\t * @return {string | undefined} terminal value\n\t\t\t */\n\t\t\tfunction fetchZObjectValue( rowId ) {\n\t\t\t\tconst row = getters.getRowById( rowId );\n\t\t\t\treturn ( ( row !== undefined ) && row.isTerminal() ) ?\n\t\t\t\t\trow.value :\n\t\t\t\t\tundefined;\n\t\t\t}\n\t\t\treturn fetchZObjectValue;\n\t\t},\n\n\t\t/************************************************************\n\t\t * INTERFACE METHODS FOR TYPES\n\t\t ************************************************************/\n\n\t\t/**\n\t\t * Returns the terminal value of Z6K1/String value of a ZObject\n\t\t * assumed to be a string\n\t\t *\n\t\t * @param {Object} state\n\t\t * @param {Object} getters\n\t\t * @return {Function}\n\t\t */\n\t\tgetZStringTerminalValue: function ( state, getters ) {\n\t\t\t/**\n\t\t\t * @param {number} rowId\n\t\t\t * @return {string | undefined}\n\t\t\t */\n\t\t\tfunction findZStringTerminalValue( rowId ) {\n\t\t\t\treturn getters.getZObjectTerminalValue( rowId, Constants.Z_STRING_VALUE );\n\t\t\t}\n\n\t\t\treturn findZStringTerminalValue;\n\t\t},\n\n\t\t/**\n\t\t * Returns the terminal value of Z6K1/String value of a ZObject\n\t\t * assumed to be a string\n\t\t *\n\t\t * @param {Object} state\n\t\t * @param {Object} getters\n\t\t * @return {Function}\n\t\t */\n\t\tgetZReferenceTerminalValue: function ( state, getters ) {\n\t\t\t/**\n\t\t\t * @param {number} rowId\n\t\t\t * @return {string | undefined}\n\t\t\t */\n\t\t\tfunction findZReferenceTerminalValue( rowId ) {\n\t\t\t\treturn getters.getZObjectTerminalValue( rowId, Constants.Z_REFERENCE_ID );\n\t\t\t}\n\n\t\t\treturn findZReferenceTerminalValue;\n\t\t},\n\n\t\t/**\n\t\t * Returns the terminal value of Z11K2\n\t\t *\n\t\t * @param {Object} state\n\t\t * @param {Object} getters\n\t\t * @return {Function}\n\t\t */\n\t\tgetZMonolingualTextValue: function ( state, getters ) {\n\t\t\t/**\n\t\t\t * @param {number} rowId\n\t\t\t * @return {string | undefined}\n\t\t\t */\n\t\t\tfunction findZMonolingualTextValue( rowId ) {\n\t\t\t\tconst stringRow = getters.getRowByKeyPath( [ Constants.Z_MONOLINGUALSTRING_VALUE ], rowId );\n\t\t\t\treturn stringRow ?\n\t\t\t\t\tgetters.getZStringTerminalValue( stringRow.id ) :\n\t\t\t\t\tundefined;\n\t\t\t}\n\t\t\treturn findZMonolingualTextValue;\n\t\t},\n\n\t\t/**\n\t\t * Returns the terminal value of Z11K2\n\t\t *\n\t\t * @param {Object} state\n\t\t * @param {Object} getters\n\t\t * @return {Function}\n\t\t */\n\t\tgetZMonolingualLangValue: function ( state, getters ) {\n\t\t\t/**\n\t\t\t * @param {number} rowId\n\t\t\t * @return {string | undefined} rowId\n\t\t\t */\n\t\t\tfunction findZMonolingualLangValue( rowId ) {\n\t\t\t\tconst langRow = getters.getRowByKeyPath( [ Constants.Z_MONOLINGUALSTRING_LANGUAGE ], rowId );\n\n\t\t\t\tconst zObjectType = getters.getZObjectTypeByRowId( langRow.id );\n\n\t\t\t\t// If zobject language type is a natural language, return the\n\t\t\t\t// language code value\n\t\t\t\tif ( zObjectType === Constants.Z_NATURAL_LANGUAGE ) {\n\t\t\t\t\treturn getters.getRowByKeyPath( [\n\t\t\t\t\t\tConstants.Z_NATURAL_LANGUAGE_ISO_CODE,\n\t\t\t\t\t\tConstants.Z_STRING_VALUE\n\t\t\t\t\t], langRow.id ).value;\n\t\t\t\t}\n\n\t\t\t\treturn getters.getZReferenceTerminalValue( langRow.id );\n\t\t\t}\n\t\t\treturn findZMonolingualLangValue;\n\t\t},\n\n\t\tgetZCodeLanguage: function ( state, getters ) {\n\t\t\tfunction findZCodeValue( rowId ) {\n\t\t\t\treturn getters.getRowByKeyPath( [\n\t\t\t\t\tConstants.Z_CODE_LANGUAGE,\n\t\t\t\t\tConstants.Z_PROGRAMMING_LANGUAGE_CODE\n\t\t\t\t], rowId );\n\t\t\t}\n\t\t\treturn findZCodeValue;\n\t\t},\n\n\t\t/**\n\t\t * Returns the terminal value of Z16K1\n\t\t *\n\t\t * @param {Object} state\n\t\t * @param {Object} getters\n\t\t * @return {Function}\n\t\t */\n\t\tgetZCode: function ( state, getters ) {\n\t\t\t/**\n\t\t\t * @param {number} rowId\n\t\t\t * @return {string | undefined} rowId\n\t\t\t */\n\t\t\tfunction findZCode( rowId ) {\n\t\t\t\treturn getters.getRowByKeyPath( [ Constants.Z_CODE_CODE ], rowId );\n\t\t\t}\n\t\t\treturn findZCode;\n\t\t},\n\n\t\tgetZComposition: function ( state, getters ) {\n\t\t\t/**\n\t\t\t * @param {number} rowId\n\t\t\t * @return {string | undefined} rowId\n\t\t\t */\n\t\t\tfunction findZComposition( rowId ) {\n\t\t\t\treturn getters.getRowByKeyPath( [ Constants.Z_IMPLEMENTATION_COMPOSITION ], rowId );\n\t\t\t}\n\t\t\treturn findZComposition;\n\t\t},\n\n\t\tgetZCodeId: function ( state, getters ) {\n\t\t\t/**\n\t\t\t * @param {number} rowId\n\t\t\t * @return {string | undefined} rowId\n\t\t\t */\n\t\t\tfunction findZCode( rowId ) {\n\t\t\t\treturn getters.getRowByKeyPath( [ Constants.Z_IMPLEMENTATION_CODE ], rowId );\n\t\t\t}\n\t\t\treturn findZCode;\n\t\t},\n\n\t\tgetZCodeFunction: function ( state, getters ) {\n\t\t\tfunction findZFunction( rowId ) {\n\t\t\t\tconst functionRow = getters.getRowByKeyPath( [ Constants.Z_IMPLEMENTATION_FUNCTION ], rowId );\n\t\t\t\treturn getters.getZReferenceTerminalValue( functionRow.id );\n\t\t\t}\n\n\t\t\treturn findZFunction;\n\t\t},\n\n\t\t/**\n\t\t * Returns the terminal reference Value of Z40K1\n\t\t *\n\t\t * @param {Object} state\n\t\t * @param {Object} getters\n\t\t * @return {Function}\n\t\t */\n\t\tgetZBooleanValue: function ( state, getters ) {\n\t\t\t/**\n\t\t\t * @param {number} rowId\n\t\t\t * @return {string | undefined}\n\t\t\t */\n\t\t\tfunction findZBooleanValue( rowId ) {\n\t\t\t\tconst booleanRow = getters.getRowByKeyPath( [ Constants.Z_BOOLEAN_IDENTITY ], rowId );\n\t\t\t\treturn getters.getZReferenceTerminalValue( booleanRow.id );\n\t\t\t}\n\t\t\treturn findZBooleanValue;\n\t\t},\n\n\t\t/**\n\t\t * Returns the string representation for the type of the ZObject\n\t\t * represented by the value of the rowId passed as parameter\n\t\t *\n\t\t * @param {Object} state\n\t\t * @param {Object} getters\n\t\t * @return {Function}\n\t\t */\n\t\tgetZObjectTypeByRowId: function ( state, getters ) {\n\t\t\t/**\n\t\t\t * @param {number} id\n\t\t\t * @return {string | undefined} type\n\t\t\t */\n\t\t\tfunction findZObjectTypeById( id ) {\n\n\t\t\t\tconst row = getters.getRowById( id );\n\n\t\t\t\t// Three end conditions:\n\t\t\t\t// 1. If id (row Id) doesn't exist and returns undefined\n\t\t\t\tif ( !row || row.id === row.parent ) {\n\t\t\t\t\treturn undefined;\n\t\t\t\t}\n\n\t\t\t\t// 2. If the row is TERMINAL it's either a string or reference value\n\t\t\t\tif ( row.isTerminal() ) {\n\t\t\t\t\treturn ( row.key === Constants.Z_REFERENCE_ID ) ?\n\t\t\t\t\t\tConstants.Z_REFERENCE :\n\t\t\t\t\t\tConstants.Z_STRING;\n\t\t\t\t}\n\n\t\t\t\t// 3. If the row is an ARRAY, we return typed list\n\t\t\t\tif ( row.isArray() ) {\n\t\t\t\t\treturn Constants.Z_TYPED_LIST;\n\t\t\t\t}\n\n\t\t\t\t// If it's an object we get its Z1K1 and analyze it:\n\t\t\t\t// E.g. from { Z1K1: Z9 } the type is Z9\n\t\t\t\t// E.g. from { Z1K1: Z7, Z7K1: Z881 } the type is Z7\n\t\t\t\t// E.g. from { Z1K1: { Z1K1: Z9, Z9K1: Z7 } } the type is Z7\n\t\t\t\t// But\n\t\t\t\t// E.g. from { Z1K1: { Z1K1: Z9, Z9K1: Z2 } } the type is Z2\n\t\t\t\t// E.g. from { Z1K1: { Z1K1: Z7, Z7K1: Z881 ... } } the type is Z881\n\t\t\t\tconst typeRow = getters.getRowByKeyPath( [ Constants.Z_OBJECT_TYPE ], id );\n\t\t\t\tif ( !typeRow ) {\n\t\t\t\t\t// Return if undefined\n\t\t\t\t\treturn undefined;\n\t\t\t\t}\n\n\t\t\t\t// If typeRow is Terminal, return its value\n\t\t\t\t// E.g. { Z1K1: Z9 }, return Z9\n\t\t\t\t// E.g. { Z1K1: Z7, Z7K1: Z881 }, return Z7\n\t\t\t\tif ( typeRow.isTerminal() ) {\n\t\t\t\t\treturn typeRow.value;\n\t\t\t\t}\n\n\t\t\t\t// If typeRow is NOT Terminal, return the value of its type\n\t\t\t\t// E.g. from { Z1K1: { Z1K1: Z9, Z9K1: Z7 } } the type is Z7\n\t\t\t\t// A type can be expressed in different modes:\n\t\t\t\t// We need a method that, similarly to getReferenceValue, it gets ObjectTypeValue\n\t\t\t\t// This method will know where to look depending on the mode\n\t\t\t\t// * Literal: { Z1K1: Z4, Z4K1: Z10000 ... }\n\t\t\t\t// * Resolvers:\n\t\t\t\t// * Reference { Z1K1: Z9, Z9K1: Z10000 }\n\t\t\t\t// * Function call { Z1K1: Z7, Z7K1: Z881, ... }\n\t\t\t\t// * Argument reference { Z1K1: Z18, Z18K1: \"K1\" }\n\t\t\t\treturn getters.getZTypeStringRepresentation( typeRow.id );\n\t\t\t}\n\n\t\t\treturn findZObjectTypeById;\n\t\t},\n\n\t\t/**\n\t\t * Returns the depth (from 0 to n) of the zobject\n\t\t * represented by a given rowId\n\t\t *\n\t\t * @param {Object} state\n\t\t * @param {Object} getters\n\t\t * @return {Function}\n\t\t */\n\t\tgetDepthByRowId: function ( state, getters ) {\n\t\t\t/**\n\t\t\t * @param {number} rowId\n\t\t\t * @param {number} depth\n\t\t\t * @return {number}\n\t\t\t */\n\t\t\tfunction findDepth( rowId, depth = 0 ) {\n\t\t\t\tconst row = getters.getRowById( rowId );\n\t\t\t\treturn ( row.parent === undefined ) ?\n\t\t\t\t\tdepth :\n\t\t\t\t\tfindDepth( row.parent, depth + 1 );\n\t\t\t}\n\t\t\treturn findDepth;\n\t\t},\n\n\t\t/******************************************************************\n\t\t * INTERNAL METHODS\n\t\t *\n\t\t * Should not be called from components. If we observe the need\n\t\t * of calling these from a component probably needs we need another\n\t\t * interface method that wraps it.\n\t\t ******************************************************************/\n\n\t\t/**\n\t\t * Returns a row object given its row ID. Note that the row ID is its\n\t\t * parameter row.id and it is different than the indexx\n\t\t *\n\t\t * @param {Object} state\n\t\t * @param {Object} getters\n\t\t * @return {Function}\n\t\t */\n\t\tgetRowById: function ( state ) {\n\t\t\t/**\n\t\t\t * @param {number|undefined} rowId\n\t\t\t * @return {Row} row\n\t\t\t */\n\t\t\tfunction fetchRowId( rowId ) {\n\t\t\t\treturn ( rowId === undefined ) ?\n\t\t\t\t\tundefined :\n\t\t\t\t\tstate.zobject.find( function ( item ) {\n\t\t\t\t\t\treturn item.id === rowId;\n\t\t\t\t\t} );\n\t\t\t}\n\t\t\treturn fetchRowId;\n\t\t},\n\n\t\t/**\n\t\t * Returns all the children rows given a parent rowId, else\n\t\t * returns an empty list.\n\t\t *\n\t\t * @param {Object} state\n\t\t * @param {Object} getters\n\t\t * @return {Function}\n\t\t */\n\t\tgetChildrenByParentRowId: function ( state ) {\n\t\t\t/**\n\t\t\t * @param {number} rowId\n\t\t\t * @param {Array} rows\n\t\t\t * @return {Array}\n\t\t\t */\n\t\t\tfunction fetchChildrenRows( rowId ) {\n\t\t\t\treturn state.zobject.filter( function ( row ) {\n\t\t\t\t\treturn ( row.parent === rowId );\n\t\t\t\t} );\n\t\t\t}\n\t\t\treturn fetchChildrenRows;\n\t\t},\n\n\t\t/**\n\t\t * Return the next available array key or index given an\n\t\t * array parent Id\n\t\t *\n\t\t * @param {Object} state\n\t\t * @param {Object} getters\n\t\t * @return {Function}\n\t\t */\n\t\tgetNextArrayIndex: function ( state, getters ) {\n\t\t\t/**\n\t\t\t * @param {number} parentRowId\n\t\t\t * @return {number}\n\t\t\t */\n\t\t\tfunction fetchNextArrayIndexOfParentRowId( parentRowId ) {\n\t\t\t\tconst children = getters.getChildrenByParentRowId( parentRowId );\n\t\t\t\t// TODO: should we check that the sequence of children keys is\n\t\t\t\t// continuous and doesn't have any gaps?\n\t\t\t\treturn children.length;\n\t\t\t}\n\t\t\treturn fetchNextArrayIndexOfParentRowId;\n\t\t},\n\n\t\t/**\n\t\t * Return the parent rowId of a given rowId\n\t\t *\n\t\t * @param {Object} state\n\t\t * @param {Object} getters\n\t\t * @return {Function}\n\t\t */\n\t\tgetParentRowId: function ( state, getters ) {\n\t\t\t/**\n\t\t\t * @param {number} rowId\n\t\t\t * @param {number} parent rowId\n\t\t\t * @return {number}\n\t\t\t */\n\t\t\tfunction findParent( rowId ) {\n\t\t\t\tconst row = getters.getRowById( rowId );\n\t\t\t\treturn row.parent;\n\t\t\t}\n\t\t\treturn findParent;\n\t\t},\n\n\t\t/**\n\t\t * Given a starting rowId and an array of keys that form a path,\n\t\t * follow that path down and return the resulting row.\n\t\t *\n\t\t * @param {Object} state\n\t\t * @param {Object} getters\n\t\t * @return {Function}\n\t\t */\n\t\tgetRowByKeyPath: function ( state, getters ) {\n\t\t\t/**\n\t\t\t * @param {Array} path sequence of keys that specify a path to follow down the ZObject\n\t\t\t * @param {number} rowId starting row Id\n\t\t\t * @return {Row} resulting row\n\t\t\t */\n\t\t\tfunction followPath( path = [], rowId = 0 ) {\n\t\t\t\t// End condition, if the path is empty, return the row by rowId\n\t\t\t\tif ( path.length === 0 ) {\n\t\t\t\t\treturn getters.getRowById( rowId );\n\t\t\t\t}\n\n\t\t\t\t// Else, follow the sequence of keys by finding the child with\n\t\t\t\t// the head key and recourse\n\t\t\t\tconst head = path[ 0 ];\n\t\t\t\tconst tail = path.slice( 1 );\n\t\t\t\tconst children = getters.getChildrenByParentRowId( rowId );\n\t\t\t\tconst child = children.find( function ( row ) {\n\t\t\t\t\treturn ( row.key === head );\n\t\t\t\t} );\n\n\t\t\t\t// Follow the path of keys parting from the child\n\t\t\t\treturn ( child === undefined ) ?\n\t\t\t\t\tundefined :\n\t\t\t\t\tfollowPath( tail, child.id );\n\t\t\t}\n\n\t\t\treturn followPath;\n\t\t},\n\n\t\t/**\n\t\t * Returns the terminal value of a Z9/Reference or a Z6/String\n\t\t * nested under a sequence of their keys.\n\t\t *\n\t\t * E.g. getZObjectTerminalValue( rowId, Z9K1 ) would return the\n\t\t * terminal value in objects like { Z9K1: { Z9K1: \"value\" }},\n\t\t * { Z9K1: \"value\"} or \"value\"\n\t\t *\n\t\t * This is a generalized method to be called from the specific\n\t\t * methods getZStringTerminalValue or getZReferenceTerminalValue\n\t\t *\n\t\t * @param {Object} state\n\t\t * @param {Object} getters\n\t\t * @return {Function}\n\t\t */\n\t\tgetZObjectTerminalValue: function ( state, getters ) {\n\t\t\t/**\n\t\t\t * @param {number} rowId an integer representing an existing rowId\n\t\t\t * @param {string} terminalKey either string or reference terminal key\n\t\t\t * @return {string | undefined}\n\t\t\t */\n\t\t\tfunction findTerminalValue( rowId, terminalKey ) {\n\t\t\t\tconst row = getters.getRowById( rowId );\n\t\t\t\t// Row not found is undefined\n\t\t\t\tif ( row === undefined ) {\n\t\t\t\t\treturn undefined;\n\t\t\t\t}\n\t\t\t\tif ( row.isTerminal() ) {\n\t\t\t\t\treturn row.value ?\n\t\t\t\t\t\trow.value :\n\t\t\t\t\t\tundefined;\n\t\t\t\t} else {\n\t\t\t\t\tconst valueRow = getters.getRowByKeyPath( [ terminalKey ], row.id );\n\t\t\t\t\treturn valueRow ?\n\t\t\t\t\t\tfindTerminalValue( valueRow.id, terminalKey ) :\n\t\t\t\t\t\tundefined;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn findTerminalValue;\n\t\t},\n\n\t\t/**\n\t\t * Returns the next available rowId\n\t\t *\n\t\t * @param {Object} state\n\t\t * @return {number}\n\t\t */\n\t\tgetNextRowId: function ( state ) {\n\t\t\tlet highestObjectId = 0;\n\n\t\t\tif ( state.zobject.length === 0 ) {\n\t\t\t\treturn highestObjectId;\n\t\t\t}\n\n\t\t\tstate.zobject.forEach( function ( item ) {\n\t\t\t\tif ( item.id > highestObjectId ) {\n\t\t\t\t\thighestObjectId = item.id;\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\treturn highestObjectId + 1;\n\t\t},\n\n\t\t/**\n\t\t * Returns whether the rowId is inside an implementation\n\t\t * composition (Z14K2), which will determine whether\n\t\t * we can use argument references in its type selectors.\n\t\t *\n\t\t * TODO: add unit tests\n\t\t *\n\t\t * @param {Object} state\n\t\t * @param {Object} getters\n\t\t * @return {Function}\n\t\t */\n\t\tisInsideComposition: function ( state, getters ) {\n\t\t\t/**\n\t\t\t * @param {number} rowId\n\t\t\t * @return {boolean}\n\t\t\t */\n\t\t\tfunction findCompositionFromRowId( rowId ) {\n\t\t\t\tif ( rowId ) {\n\t\t\t\t\t// Zero or undefined, return false and end\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\tconst row = getters.getRowById( rowId );\n\t\t\t\treturn ( row.key === Constants.Z_IMPLEMENTATION_COMPOSITION ) ?\n\t\t\t\t\ttrue :\n\t\t\t\t\tfindCompositionFromRowId( row.parent );\n\t\t\t}\n\n\t\t\treturn findCompositionFromRowId;\n\t\t},\n\n\t\t/**\n\t\t * Returns the string representation of a type found\n\t\t * at the given rowID\n\t\t *\n\t\t * @param {Object} state\n\t\t * @param {Object} getters\n\t\t * @return {Function}\n\t\t */\n\t\tgetZTypeStringRepresentation: function ( state, getters ) {\n\n\t\t\t/**\n\t\t\t * @param {number} rowId\n\t\t\t * @return {string | undefined}\n\t\t\t */\n\t\t\tfunction findZTypeTerminalValue( rowId ) {\n\t\t\t\t// rowId points at a row where the key is Z1K1 and the\n\t\t\t\t// value is an object that must resolve to a type.\n\t\t\t\t//\n\t\t\t\t// This type object can have different shapes (modes).\n\t\t\t\t// We need a method that, similarly to getReferenceValue,\n\t\t\t\t// it returns a string value that identifies the type.\n\t\t\t\t// This method will know where to look depending on the mode:\n\t\t\t\t//\n\t\t\t\t// * Literal: { Z1K1: Z4, Z4K1: Z10000 ... }\n\t\t\t\t// * Literal: { Z1K1: {Z1K1: Z9, Z9K1: Z4}, Z4K1: {Z1K1: Z6, Z6K1: Z10000}... }\n\t\t\t\t// * Resolvers:\n\t\t\t\t// ** Reference { Z1K1: Z9, Z9K1: Z10000 }\n\t\t\t\t// ** Function call { Z1K1: Z7, Z7K1: Z881, ... }\n\t\t\t\t// ** Argument reference { Z1K1: Z18, Z18K1: \"K1\" }\n\n\t\t\t\tconst typeRow = getters.getRowByKeyPath( [ Constants.Z_OBJECT_TYPE ], rowId );\n\n\t\t\t\t// If it's terminal, it's a reference, return value of Z9K1\n\t\t\t\tif ( typeRow.isTerminal() ) {\n\t\t\t\t\treturn getters.getZReferenceTerminalValue( rowId );\n\t\t\t\t}\n\n\t\t\t\t// If it's not terminal, get the value of Z1K1.Z9K1 to find the mode\n\t\t\t\tlet type;\n\t\t\t\tconst mode = getters.getZReferenceTerminalValue( typeRow.id );\n\n\t\t\t\tswitch ( mode ) {\n\t\t\t\t\tcase Constants.Z_TYPE:\n\t\t\t\t\t\ttype = getters.getRowByKeyPath( [\n\t\t\t\t\t\t\tConstants.Z_TYPE_IDENTITY,\n\t\t\t\t\t\t\tConstants.Z_STRING_VALUE\n\t\t\t\t\t\t], rowId );\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase Constants.Z_FUNCTION_CALL:\n\t\t\t\t\t\t// FIXME account for a Z_FUNCTION_CALL key containing a literal\n\t\t\t\t\t\t// function or any other resolver, not only references.\n\t\t\t\t\t\ttype = getters.getRowByKeyPath( [\n\t\t\t\t\t\t\tConstants.Z_FUNCTION_CALL,\n\t\t\t\t\t\t\tConstants.Z_REFERENCE_ID\n\t\t\t\t\t\t], rowId );\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase Constants.Z_ARGUMENT_REFERENCE:\n\t\t\t\t\t\ttype = getters.getRowByKeyPath( [\n\t\t\t\t\t\t\tConstants.Z_ARGUMENT_REFERENCE,\n\t\t\t\t\t\t\tConstants.Z_STRING\n\t\t\t\t\t\t], rowId );\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tdefault:\n\t\t\t\t\t\ttype = undefined;\n\t\t\t\t}\n\n\t\t\t\treturn type ?\n\t\t\t\t\ttype.value :\n\t\t\t\t\tundefined;\n\t\t\t}\n\n\t\t\treturn findZTypeTerminalValue;\n\t\t},\n\n\t\t/* END NEW GETTERS */\n\n\t\tgetActiveLangSelection: function ( state ) {\n\t\t\treturn state.activeLangSelection;\n\t\t},\n\t\tgetZObjectLabels: function ( state, getters ) {\n\t\t\treturn getters.getZObjectChildrenById( getters.getNestedZObjectById( 0, [\n\t\t\t\tConstants.Z_PERSISTENTOBJECT_LABEL,\n\t\t\t\tConstants.Z_MULTILINGUALSTRING_VALUE\n\t\t\t] ).id );\n\t\t},\n\t\tgetZObjectLabel: function ( state, getters ) {\n\t\t\treturn function ( zLanguage ) {\n\t\t\t\tvar labelObject,\n\t\t\t\t\tlabel = false,\n\t\t\t\t\tlang = zLanguage || getters.getCurrentZLanguage;\n\n\t\t\t\tfor ( var index in getters.getZObjectLabels ) {\n\t\t\t\t\tvar maybeLabel = getters.getZObjectLabels[ index ],\n\t\t\t\t\t\tlanguage = getters.getNestedZObjectById( maybeLabel.id, [\n\t\t\t\t\t\t\tConstants.Z_MONOLINGUALSTRING_LANGUAGE,\n\t\t\t\t\t\t\tConstants.Z_REFERENCE_ID\n\t\t\t\t\t\t] );\n\n\t\t\t\t\tif ( language.value === lang ) {\n\t\t\t\t\t\tlabelObject = maybeLabel;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif ( labelObject ) {\n\t\t\t\t\tlabel = getters.getNestedZObjectById( labelObject.id, [\n\t\t\t\t\t\tConstants.Z_MONOLINGUALSTRING_VALUE,\n\t\t\t\t\t\tConstants.Z_STRING_VALUE\n\t\t\t\t\t] );\n\t\t\t\t}\n\n\t\t\t\treturn label;\n\t\t\t};\n\t\t},\n\t\tgetIsSavingObject: function ( state ) {\n\t\t\treturn state.isSavingZObject;\n\t\t},\n\t\tisCreateNewPage: function ( state ) {\n\t\t\treturn state.createNewPage;\n\t\t},\n\t\tgetZObjectMessage: function ( state ) {\n\t\t\treturn state.zobjectMessage;\n\t\t},\n\t\tgetZObjectById: function ( state ) {\n\t\t\t/**\n\t\t\t * Return a specific zObject given its ID.\n\t\t\t *\n\t\t\t * @param {number} id\n\t\t\t * @return {Row} zObjectItem\n\t\t\t */\n\t\t\treturn function ( id ) {\n\t\t\t\treturn state.zobject.filter( function ( item ) {\n\t\t\t\t\treturn item.id === id;\n\t\t\t\t} )[ 0 ];\n\t\t\t};\n\t\t},\n\t\tgetNestedZObjectById: function ( state, getters ) {\n\t\t\t/**\n\t\t\t * Return a specific zObject given a series of keys.\n\t\t\t *\n\t\t\t * @param {number} id\n\t\t\t * @param {Array} keys\n\t\t\t * @return {Object} zObjectItem\n\t\t\t */\n\t\t\treturn function ( id, keys ) {\n\t\t\t\tvar list = getters.getZObjectChildrenById( id ),\n\t\t\t\t\tres;\n\n\t\t\t\tfor ( var k = 0; k < keys.length; k++ ) {\n\t\t\t\t\tvar key = keys[ k ];\n\t\t\t\t\tres = typeUtils.findKeyInArray( key, list );\n\n\t\t\t\t\tif ( res && k !== keys.length ) {\n\t\t\t\t\t\tlist = getters.getZObjectChildrenById( res.id );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn res;\n\t\t\t};\n\t\t},\n\t\tgetZObjectIndexById: function ( state ) {\n\t\t\t/**\n\t\t\t * Return the index of a zObject by its ID. This is mainly used by actions.\n\t\t\t *\n\t\t\t * @param {number} id\n\t\t\t * @return {number} index\n\t\t\t */\n\t\t\treturn function ( id ) {\n\t\t\t\treturn state.zobject.findIndex( ( item ) => item.id === id );\n\t\t\t};\n\t\t},\n\t\tgetZObjectChildrenById: function ( state, getters ) {\n\t\t\t/**\n\t\t\t * Return the children of a specific zObject by its ID. The return is in zObjectTree array form.\n\t\t\t * This method is desinged to return just ONE level of Depth.\n\t\t\t * This will support development of small reusable components\n\t\t\t * If language is passed, the language zid and object will be returned as a property\n\t\t\t *\n\t\t\t * @param {number} parentId\n\t\t\t * @param {string} language\n\t\t\t * @param {string} parentType\n\t\t\t * @return {Array} zObjectTree\n\t\t\t */\n\t\t\treturn function ( parentId, language, parentType ) {\n\t\t\t\tif ( parentId === undefined ) {\n\t\t\t\t\treturn [];\n\t\t\t\t}\n\n\t\t\t\tvar childrenObjects = [];\n\n\t\t\t\tfor ( var zobject in state.zobject ) {\n\n\t\t\t\t\tvar objectProps = state.zobject[ zobject ];\n\t\t\t\t\t// if parentType is passed, ensure parentType matches the value of the zobject\n\t\t\t\t\tif ( parentType && objectProps.id === parentId && objectProps.value !== parentType ) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( objectProps.parent === parentId ) {\n\t\t\t\t\t\tconst childObject = new Row(\n\t\t\t\t\t\t\tobjectProps.id,\n\t\t\t\t\t\t\tobjectProps.key,\n\t\t\t\t\t\t\tobjectProps.value,\n\t\t\t\t\t\t\tobjectProps.parent\n\t\t\t\t\t\t);\n\t\t\t\t\t\t// FIXME: why are row.language and row.languageString necessary?\n\t\t\t\t\t\tif ( language ) {\n\t\t\t\t\t\t\tchildObject.language = language;\n\t\t\t\t\t\t\tchildObject.languageString = getters.getNestedZObjectById(\n\t\t\t\t\t\t\t\tobjectProps.id,\n\t\t\t\t\t\t\t\t[ Constants.Z_STRING_VALUE ]\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tchildrenObjects.push( childObject );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn childrenObjects;\n\t\t\t};\n\t\t},\n\t\tgetAllItemsFromListById: function ( state, getters ) {\n\t\t\t/**\n\t\t\t * Return the children of a specific zObject by its ID. The return is in zObjectTree array form.\n\t\t\t * This method is desinged to return just ONE level of Depth.\n\t\t\t * This will support development of small reusable components\n\t\t\t * If language is passed, the language zid and object will be returned as a property\n\t\t\t *\n\t\t\t * @param {number} parentId\n\t\t\t * @param {string} language\n\t\t\t * @return {Array} zObjectTree\n\t\t\t */\n\t\t\treturn function ( parentId, language ) {\n\t\t\t\tvar childrenObjects = getters.getZObjectChildrenById( parentId, language, 'array' );\n\t\t\t\t// Remove first item in array which denotes the type of the list\n\t\t\t\tif ( childrenObjects.length > 0 ) {\n\t\t\t\t\tchildrenObjects.shift();\n\t\t\t\t}\n\n\t\t\t\treturn childrenObjects;\n\t\t\t};\n\t\t},\n\t\tgetListTypeById: function ( state ) {\n\t\t\t/**\n\t\t\t * Return the type of children of a specific zObject(typedlist) by its ID\n\t\t\t *\n\t\t\t * @param {number} parentId\n\t\t\t * @return {Object}\n\t\t\t */\n\t\t\treturn function ( parentId ) {\n\t\t\t\tlet childrenType = {};\n\n\t\t\t\tif ( parentId ) {\n\t\t\t\t\tfor ( const zobject in state.zobject ) {\n\t\t\t\t\t\tconst objectProps = state.zobject[ zobject ];\n\n\t\t\t\t\t\tif ( objectProps.parent === parentId ) {\n\t\t\t\t\t\t\tchildrenType = objectProps;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn childrenType;\n\t\t\t};\n\t\t},\n\t\tgetZObjectChildrenByIdRecursively: function ( state ) {\n\t\t\t/**\n\t\t\t * Return the children of a specific zObject by its ID. The return is in zObjectTree array form.\n\t\t\t * This method is desinged to return just ONE level of Depth.\n\t\t\t * This will support development of small reusable components\n\t\t\t *\n\t\t\t * @param {number} parentId\n\t\t\t * @return {Array} zObjectTree\n\t\t\t */\n\t\t\treturn function ( parentId ) {\n\t\t\t\tif ( parentId === undefined ) {\n\t\t\t\t\treturn [];\n\t\t\t\t}\n\n\t\t\t\tfunction filterObjectByParentId( items, id ) {\n\t\t\t\t\tvar result = items.filter( function ( item ) {\n\t\t\t\t\t\treturn item.parent === id;\n\t\t\t\t\t} );\n\n\t\t\t\t\tresult.forEach( function ( child ) {\n\t\t\t\t\t\tif ( child.isTerminal() ) {\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tvar nestedResut = filterObjectByParentId( items, child.id );\n\t\t\t\t\t\tresult = result.concat( nestedResut );\n\t\t\t\t\t} );\n\n\t\t\t\t\treturn result;\n\t\t\t\t}\n\t\t\t\treturn filterObjectByParentId( state.zobject, parentId );\n\t\t\t};\n\t\t},\n\t\tgetZObjectTypeById: function ( state, getters ) {\n\t\t\t/**\n\t\t\t * Return the type of a specific zObject by its ID.\n\t\t\t * If the type cannot be found it will return undefined\n\t\t\t *\n\t\t\t * TODO: Deprecate in favor of getZObjectTypeByRowId\n\t\t\t *\n\t\t\t * @param {number} id\n\t\t\t * @return {string | undefined} type\n\t\t\t */\n\t\t\tfunction findZObjectTypeById( id ) {\n\t\t\t\tvar type,\n\t\t\t\t\tcurrentObject = getters.getZObjectById( id ),\n\t\t\t\t\tchildren = [];\n\n\t\t\t\t// If id (row Id) doesn't exist and returns undefined\n\t\t\t\t// FIXME: If the id is the same as the parent it returns undefined ????\n\t\t\t\tif ( !currentObject || currentObject.id === currentObject.parent ) {\n\t\t\t\t\treturn undefined;\n\t\t\t\t}\n\n\t\t\t\t// If the row is TERMINAL, we return the value if the key is Z1K1, else undefined\n\t\t\t\tif ( currentObject.isTerminal() ) {\n\t\t\t\t\treturn ( currentObject.key === Constants.Z_OBJECT_TYPE ) ?\n\t\t\t\t\t\tcurrentObject.value :\n\t\t\t\t\t\tundefined;\n\t\t\t\t}\n\n\t\t\t\t// Checks the value\n\t\t\t\tswitch ( currentObject.value ) {\n\n\t\t\t\t\t// If the value is NON TERMINAL and it's an array, returns typed list\n\t\t\t\t\tcase 'array':\n\t\t\t\t\t\ttype = Constants.Z_TYPED_LIST;\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t// If the value is NON TERMINA and it's an object...\n\t\t\t\t\tcase 'object':\n\t\t\t\t\t\tchildren = getters.getZObjectChildrenById( id );\n\t\t\t\t\t\tvar objectType = typeUtils.findKeyInArray( Constants.Z_OBJECT_TYPE, children ),\n\t\t\t\t\t\t\treferenceId = typeUtils.findKeyInArray( Constants.Z_REFERENCE_ID, children ),\n\t\t\t\t\t\t\tfunctionCallFunctionZid =\n\t\t\t\t\t\t\t\tretrieveFunctionCallFunctionZid( getters.getZObjectChildrenById, children ),\n\t\t\t\t\t\t\tobjectTypeFunctionCallFunctionZid =\n\t\t\t\t\t\t\t\tretrieveFunctionCallFunctionZid(\n\t\t\t\t\t\t\t\t\tgetters.getZObjectChildrenById, getters.getZObjectChildrenById( objectType.id ) );\n\t\t\t\t\t\tif ( isObjectTypeDeclaration( objectType, currentObject ) ) {\n\t\t\t\t\t\t\ttype = referenceId.value;\n\t\t\t\t\t\t} else if ( isTypedObjectWithCustomComponent( objectTypeFunctionCallFunctionZid ) ) {\n\t\t\t\t\t\t\ttype = objectTypeFunctionCallFunctionZid.value;\n\t\t\t\t\t\t} else if (\n\t\t\t\t\t\t\tfunctionCallFunctionZid &&\n\t\t\t\t\t\t\t\tisFunctionToType( getters.getZkeys[ functionCallFunctionZid.value ] ) ) {\n\t\t\t\t\t\t\ttype = Constants.Z_FUNCTION_CALL_TO_TYPE;\n\t\t\t\t\t\t} else if ( isNotObjectOrArrayRoot( objectType ) ) {\n\t\t\t\t\t\t\ttype = objectType.value;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ttype = findZObjectTypeById( objectType.id );\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t// FIXME If the value is TERMINAL, it returns undefined, unless it was an empty string ???\n\t\t\t\t\tdefault:\n\t\t\t\t\t\ttype = undefined;\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\treturn type;\n\t\t\t}\n\n\t\t\treturn findZObjectTypeById;\n\t\t},\n\t\tgetZObjectAsJsonById: function ( state ) {\n\t\t\t/**\n\t\t\t * Return the JSON representation of a specific zObject and its children\n\t\t\t * using the zObject id value within the zObject array\n\t\t\t *\n\t\t\t * @param {number} id\n\t\t\t * @param {boolean} isArray\n\t\t\t * @return {Array} zObjectJson\n\t\t\t */\n\t\t\treturn function ( id, isArray ) {\n\t\t\t\treturn zobjectTreeUtils.convertZObjectTreetoJson( state.zobject, id, isArray );\n\t\t\t};\n\t\t},\n\t\t/**\n\t\t * Return the next key of the root ZObject. So if the current object is a Z1008\n\t\t * and there are currently 2 keys, it will return Z1008K3\n\t\t *\n\t\t * @param {Object} state\n\t\t * @param {Object} getters\n\t\t * @return {string} nextKey\n\t\t */\n\t\tgetNextKey: function ( state, getters ) {\n\t\t\tvar zid = getters.getCurrentZObjectId,\n\t\t\t\tnextKey = zobjectTreeUtils.findLatestKey( state.zobject, zid ) + 1;\n\n\t\t\treturn zid + 'K' + nextKey;\n\t\t},\n\t\tgetLatestObjectIndex: function ( state ) {\n\t\t\t/**\n\t\t\t * Return the index of a given ZID.\n\t\t\t *\n\t\t\t * @param {string} zid\n\t\t\t * @return {number} number\n\t\t\t */\n\t\t\treturn function ( zid ) {\n\t\t\t\treturn zobjectTreeUtils.findLatestKey( state.zobject, zid );\n\t\t\t};\n\t\t},\n\t\t/**\n\t\t * Return the nextId within the Zobject tree. This is required when adding\n\t\t * complex (nested) object within the tree\n\t\t *\n\t\t * @param {Object} state\n\t\t * @return {string} nextId\n\t\t */\n\t\tgetNextObjectId: function ( state ) {\n\t\t\treturn zobjectTreeUtils.getNextObjectId( state.zobject );\n\t\t},\n\t\tgetZObjectInitialized: function ( state ) {\n\t\t\treturn state.ZObjectInitialized;\n\t\t},\n\t\tgetAttachedZTesters: function ( state, getters ) {\n\t\t\t/**\n\t\t\t * Returns ZIDs for testers attached to the function with the given local ID.\n\t\t\t * Note that this returns a raw array, not a canonical ZList.\n\t\t\t *\n\t\t\t * @param {string} functionId\n\t\t\t * @return {Array}\n\t\t\t */\n\t\t\t// TODO(T314928): This should be a simple lookup after data layer refactoring\n\t\t\t// ex: zObject.get( Constants.Z_FUNCTION_TESTERS );\n\t\t\treturn function ( functionId ) {\n\t\t\t\tvar attachedTesters = [];\n\n\t\t\t\tconst zTesterListId = getters.getNestedZObjectById(\n\t\t\t\t\tfunctionId, [\n\t\t\t\t\t\tConstants.Z_PERSISTENTOBJECT_VALUE,\n\t\t\t\t\t\tConstants.Z_FUNCTION_TESTERS\n\t\t\t\t\t] ).id;\n\t\t\t\tconst zTesterList = getters.getZObjectChildrenById( zTesterListId );\n\t\t\t\t// remove the list type (we want to return a raw array, not a canonical ZList)\n\t\t\t\tzTesterList.shift();\n\n\t\t\t\tfor ( var zid in zTesterList ) {\n\t\t\t\t\tconst testerZId = getters.getNestedZObjectById(\n\t\t\t\t\t\tzTesterList[ zid ].id, [\n\t\t\t\t\t\t\tConstants.Z_REFERENCE_ID\n\t\t\t\t\t\t] ).value;\n\t\t\t\t\tattachedTesters.push( testerZId );\n\t\t\t\t}\n\n\t\t\t\treturn attachedTesters;\n\t\t\t};\n\t\t},\n\t\tgetAttachedZImplementations: function ( state, getters ) {\n\t\t\t/**\n\t\t\t * Returns ZIDs for implementations attached to the function with the given local ID.\n\t\t\t * Note that this returns a raw array, not a canonical ZList.\n\t\t\t *\n\t\t\t * @param {string} functionId\n\t\t\t * @return {Array}\n\t\t\t */\n\t\t\t// TODO(T314928): This should be a simple lookup after data layer refactoring\n\t\t\t// ex: zObject.get( Constants.Z_FUNCTION_IMPLEMENTATIONS );\n\t\t\treturn function ( functionId ) {\n\t\t\t\tvar attachedImplementations = [];\n\n\t\t\t\tconst zImplementationListId = getters.getNestedZObjectById(\n\t\t\t\t\tfunctionId, [\n\t\t\t\t\t\tConstants.Z_PERSISTENTOBJECT_VALUE,\n\t\t\t\t\t\tConstants.Z_FUNCTION_IMPLEMENTATIONS\n\t\t\t\t\t] ).id;\n\t\t\t\tconst zImplementationList = getters.getZObjectChildrenById( zImplementationListId );\n\t\t\t\t// remove the list type (we want to return a raw array, not a canonical ZList)\n\t\t\t\tzImplementationList.shift();\n\n\t\t\t\tfor ( var zid in zImplementationList ) {\n\t\t\t\t\tconst implementationZId = getters.getNestedZObjectById(\n\t\t\t\t\t\tzImplementationList[ zid ].id, [\n\t\t\t\t\t\t\tConstants.Z_REFERENCE_ID\n\t\t\t\t\t\t] ).value;\n\t\t\t\t\tattachedImplementations.push( implementationZId );\n\t\t\t\t}\n\n\t\t\t\treturn attachedImplementations;\n\t\t\t};\n\t\t},\n\t\tgetIsZObjectDirty: function ( state ) {\n\t\t\treturn state.isZObjectDirty;\n\t\t}\n\t},\n\tmutations: {\n\n\t\t/* NEW MUTATIONS */\n\n\t\t/**\n\t\t * This is the most atomic setter. It sets the value\n\t\t * of a given row, given the rowIndex and the value.\n\t\t *\n\t\t * @param {Object} state\n\t\t * @param {Object} payload\n\t\t * @param {number} payload.rowIndex\n\t\t * @param {string|undefined} payload.value\n\t\t */\n\t\tsetValueByRowIndex: function ( state, payload ) {\n\t\t\tconst item = state.zobject[ payload.rowIndex ];\n\t\t\titem.value = payload.value;\n\t\t\t// Modification of an array item cannot be detected\n\t\t\t// so it's not reactive. That's why we must run splice\n\t\t\tstate.zobject.splice( payload.rowIndex, 1, item );\n\t\t},\n\n\t\t/**\n\t\t * Push a row into the zobject state. The row already\n\t\t * has the necessary IDs and details set, so it is not\n\t\t * necessary to recalculate anything nor look at the\n\t\t * table indices, simply push.\n\t\t *\n\t\t * @param {Object} state\n\t\t * @param {Row} row\n\t\t */\n\t\tpushRow: function ( state, row ) {\n\t\t\tstate.zobject.push( row );\n\t\t},\n\n\t\t/* END NEW MUTATIONS */\n\n\t\t/**\n\t\t * TODO: audit this function, we shouldn't be using this\n\t\t * except for the initial setup\n\t\t *\n\t\t * @param {Object} state\n\t\t * @param {Object} payload\n\t\t */\n\t\tsetZObject: function ( state, payload ) {\n\t\t\tstate.zobject = payload;\n\t\t},\n\t\tsetZObjectValue: function ( state, payload ) {\n\t\t\tvar item = state.zobject[ payload.index ];\n\t\t\titem.value = payload.value;\n\t\t\tstate.zobject.splice( payload.index, 1, item );\n\t\t},\n\t\tsetZObjectKey: function ( state, payload ) {\n\t\t\tvar item = state.zobject[ payload.index ];\n\t\t\titem.key = payload.key;\n\n\t\t\tstate.zobject.splice( payload.index, 1, item );\n\t\t},\n\t\tsetZObjectParent: function ( state, payload ) {\n\t\t\tvar item = state.zobject[ payload.index ];\n\t\t\titem.parent = payload.parent;\n\n\t\t\tstate.zobject.splice( payload.index, 1, item );\n\t\t},\n\t\tremoveZObject: function ( state, index ) {\n\t\t\tstate.zobject.splice( index, 1 );\n\t\t},\n\t\taddZObject: function ( state, payload ) {\n\t\t\tif ( payload instanceof Row ) {\n\t\t\t\tstate.zobject.push( payload );\n\t\t\t} else {\n\t\t\t\tstate.zobject.push( new Row( payload.id, payload.key, payload.value, payload.parent ) );\n\t\t\t}\n\t\t},\n\t\tsetCreateNewPage: function ( state, payload ) {\n\t\t\tstate.createNewPage = payload;\n\t\t},\n\t\tsetMessage: function ( state, payload ) {\n\t\t\tif ( !payload ) {\n\t\t\t\tpayload = {};\n\t\t\t}\n\n\t\t\tstate.zobjectMessage = {\n\t\t\t\ttype: payload.type || 'notice',\n\t\t\t\ttext: payload.text || null\n\t\t\t};\n\t\t},\n\t\tsetZObjectInitialized: function ( state, value ) {\n\t\t\tstate.ZObjectInitialized = value;\n\t\t},\n\t\tsetIsSavingZObject: function ( state, payload ) {\n\t\t\tstate.isSavingZObject = payload;\n\t\t},\n\t\tsetActiveLangSelection: function ( state, payload ) {\n\t\t\tstate.activeLangSelection = payload;\n\t\t},\n\t\tsetIsZObjectDirty: function ( state, value ) {\n\t\t\tstate.isZObjectDirty = value;\n\t\t}\n\t},\n\tactions: {\n\t\t/**\n\t\t * Handles the conversion and initization of a zObject.\n\t\t * The Object received by the server is in JSON format, so we convert it\n\t\t * to our Tree structure.\n\t\t *\n\t\t * @param {Object} context\n\t\t * @return {Promise}\n\t\t */\n\t\tinitializeZObject: function ( context ) {\n\t\t\tvar editingData = mw.config.get( 'wgWikiLambda' ),\n\t\t\t\tcreateNewPage = editingData.createNewPage,\n\t\t\t\tevaluateFunctionCall = editingData.evaluateFunctionCall,\n\t\t\t\tzId = editingData.zId,\n\t\t\t\trootObject;\n\n\t\t\tcontext.commit( 'setCreateNewPage', createNewPage );\n\n\t\t\t// If createNewPage is true, ignore evaluateFunctionCall and any specified ZID.\n\t\t\tif ( createNewPage ) {\n\t\t\t\tcontext.commit( 'setCurrentZid', Constants.NEW_ZID_PLACEHOLDER );\n\n\t\t\t\trootObject = { id: 0, key: undefined, parent: undefined, value: 'object' };\n\t\t\t\tcontext.commit( 'addZObject', rootObject );\n\n\t\t\t\treturn context.dispatch( 'changeType', {\n\t\t\t\t\tid: 0,\n\t\t\t\t\ttype: Constants.Z_PERSISTENTOBJECT\n\t\t\t\t} ).then( function () {\n\t\t\t\t\t// If `zid` url parameter is found, the new ZObject\n\t\t\t\t\t// will be of the given type.\n\t\t\t\t\tvar defaultType = getParameterByName( 'zid' ),\n\t\t\t\t\t\tdefaultKeys;\n\n\t\t\t\t\tcontext.commit( 'setZObjectInitialized', true );\n\n\t\t\t\t\t// No `zid` parameter, return.\n\t\t\t\t\tif ( !defaultType || !defaultType.match( /Z[1-9]\\d*$/ ) ) {\n\t\t\t\t\t\treturn Promise.resolve();\n\t\t\t\t\t}\n\n\t\t\t\t\t// Else, fetch `zid` and make sure it's a type\n\t\t\t\t\treturn context.dispatch( 'fetchZKeys', { zids: [ defaultType ] } )\n\t\t\t\t\t\t.then( function () {\n\t\t\t\t\t\t\tvar Z2K2 =\n\t\t\t\t\t\t\t\ttypeUtils.findKeyInArray( Constants.Z_PERSISTENTOBJECT_VALUE, context.state.zobject );\n\t\t\t\t\t\t\tdefaultKeys = context.rootGetters.getZkeys[ defaultType ];\n\n\t\t\t\t\t\t\t// If `zid` is not a type, return.\n\t\t\t\t\t\t\tif ( !defaultKeys ||\n\t\t\t\t\t\t\t\tdefaultKeys[ Constants.Z_PERSISTENTOBJECT_VALUE ][ Constants.Z_OBJECT_TYPE ] !==\n\t\t\t\t\t\t\t\tConstants.Z_TYPE\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\treturn Promise.resolve();\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// If `zid` is a type, dispatch `changeType` action\n\t\t\t\t\t\t\treturn context.dispatch( 'changeType', {\n\t\t\t\t\t\t\t\tid: Z2K2.id,\n\t\t\t\t\t\t\t\ttype: defaultType\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t} );\n\t\t\t\t} );\n\n\t\t\t// If evaluateFunctionCall is true, ignore any specified ZID. If no ZID specified, assume\n\t\t\t// evaluateFunctionCall is true.\n\t\t\t} else if ( evaluateFunctionCall || !zId ) {\n\t\t\t\tcontext.commit( 'setCurrentZid', Constants.NEW_ZID_PLACEHOLDER );\n\n\t\t\t\trootObject = { id: 0, key: undefined, parent: undefined, value: 'object' };\n\t\t\t\tcontext.commit( 'addZObject', rootObject );\n\n\t\t\t\tcontext.dispatch( 'changeType', {\n\t\t\t\t\tid: 0,\n\t\t\t\t\ttype: Constants.Z_FUNCTION_CALL\n\t\t\t\t} );\n\t\t\t\tcontext.commit( 'setZObjectInitialized', true );\n\n\t\t\t} else {\n\t\t\t\tcontext.commit( 'setCurrentZid', zId );\n\n\t\t\t\treturn context.dispatch( 'initializeRootZObject', zId );\n\t\t\t}\n\t\t},\n\t\t/**\n\t\t * Call to the wikilambdaload_zobjects API to fetch the root Zobject of the page\n\t\t * with all its unfiltered content (all language labels, etc). This call is done\n\t\t * only once and the method is separate from fetchZKeys because the logic to\n\t\t * treat the result is extremely different.\n\t\t *\n\t\t * @param {Object} context\n\t\t * @param {string} zId\n\t\t * @return {Promise}\n\t\t */\n\t\tinitializeRootZObject: function ( context, zId ) {\n\t\t\t// Calling the API without language parameter so that we get\n\t\t\t// the unfiltered multilingual object\n\t\t\tconst api = new mw.Api();\n\t\t\treturn api.get( {\n\t\t\t\taction: 'query',\n\t\t\t\tlist: 'wikilambdaload_zobjects',\n\t\t\t\tformat: 'json',\n\t\t\t\twikilambdaload_zids: zId,\n\t\t\t\twikilambdaload_canonical: 'true'\n\t\t\t} ).then( function ( response ) {\n\t\t\t\tconst zobject = response.query.wikilambdaload_zobjects[ zId ].data;\n\n\t\t\t\t// Initialize optional aliases key if absent\n\t\t\t\tif ( !zobject[ Constants.Z_PERSISTENTOBJECT_ALIASES ] ) {\n\t\t\t\t\tzobject[ Constants.Z_PERSISTENTOBJECT_ALIASES ] = {\n\t\t\t\t\t\tZ1K1: Constants.Z_MULTILINGUALSTRINGSET,\n\t\t\t\t\t\tZ32K1: [\n\t\t\t\t\t\t\tConstants.Z_MONOLINGUALSTRINGSET\n\t\t\t\t\t\t]\n\t\t\t\t\t};\n\t\t\t\t}\n\n\t\t\t\tconst zobjectRows = zobjectTreeUtils.convertZObjectToRows( zobject );\n\n\t\t\t\t// Get all zIds within the object.\n\t\t\t\t// We get main zId again because we previously did not add its labels\n\t\t\t\t// to the keyLabels object in the store. We will this way take\n\t\t\t\t// advantage of the backend making language fallback decisions\n\t\t\t\tlet listOfZIdWithinObject = generateZIDListFromObjectTree( zobjectRows );\n\t\t\t\tlistOfZIdWithinObject.push( zId );\n\t\t\t\tlistOfZIdWithinObject = [ ...new Set( listOfZIdWithinObject ) ];\n\n\t\t\t\tcontext.dispatch( 'fetchZKeys', { zids: listOfZIdWithinObject } );\n\t\t\t\tcontext.commit( 'setZObject', zobjectRows );\n\t\t\t\tcontext.commit( 'setZObjectInitialized', true );\n\t\t\t} );\n\t\t},\n\t\t/**\n\t\t *\n\t\t * @param {Object} context\n\t\t * @return {boolean}\n\t\t *\n\t\t * Return a boolean indicating if the current Z Object is valid based on type requirements\n\t\t *\n\t\t * Update error store with any errors found while validating\n\t\t */\n\t\tvalidateZObject: function ( context ) {\n\t\t\tconst zobjectType = context.getters.getCurrentZObjectType,\n\t\t\t\tzobject = context.getters.getZObjectAsJson;\n\n\t\t\tvar internalId,\n\t\t\t\tisValid = true;\n\n\t\t\tswitch ( zobjectType ) {\n\t\t\t\tcase Constants.Z_FUNCTION:\n\t\t\t\t\tif ( !context.getters.currentZFunctionHasOutput ) {\n\t\t\t\t\t\tinternalId = getFunctionOutputId( context.getters.getNestedZObjectById );\n\t\t\t\t\t\tcontext.dispatch( 'setError', {\n\t\t\t\t\t\t\tinternalId,\n\t\t\t\t\t\t\terrorState: true,\n\t\t\t\t\t\t\terrorMessage: 'wikilambda-missing-function-output-error-message',\n\t\t\t\t\t\t\terrorType: Constants.errorTypes.ERROR\n\t\t\t\t\t\t} );\n\t\t\t\t\t\tisValid = false;\n\t\t\t\t\t}\n\t\t\t\t\treturn isValid;\n\t\t\t\tcase Constants.Z_IMPLEMENTATION:\n\t\t\t\t\tinternalId = getZImplementationFunctionId(\n\t\t\t\t\t\ttypeUtils.findKeyInArray,\n\t\t\t\t\t\tcontext\n\t\t\t\t\t);\n\t\t\t\t\t// invalid if a function hasn't been defined\n\t\t\t\t\tif ( !zobject[ Constants.Z_PERSISTENTOBJECT_VALUE ][\n\t\t\t\t\t\tConstants.Z_IMPLEMENTATION_FUNCTION ][ Constants.Z_REFERENCE_ID ] ) {\n\t\t\t\t\t\tcontext.dispatch( 'setError', {\n\t\t\t\t\t\t\tinternalId,\n\t\t\t\t\t\t\terrorState: true,\n\t\t\t\t\t\t\terrorMessage: 'wikilambda-zobject-missing-attached-function',\n\t\t\t\t\t\t\terrorType: Constants.errorTypes.ERROR\n\t\t\t\t\t\t} );\n\t\t\t\t\t\tisValid = false;\n\t\t\t\t\t}\n\n\t\t\t\t\t// if implementation type is composition\n\t\t\t\t\tif ( zobject[ Constants.Z_PERSISTENTOBJECT_VALUE ][ Constants.Z_IMPLEMENTATION_COMPOSITION ] ) {\n\t\t\t\t\t\t// invalid if composition hasn't been defined\n\t\t\t\t\t\tif ( !zobject[\n\t\t\t\t\t\t\tConstants.Z_PERSISTENTOBJECT_VALUE\n\t\t\t\t\t\t][\n\t\t\t\t\t\t\tConstants.Z_IMPLEMENTATION_COMPOSITION\n\t\t\t\t\t\t][\n\t\t\t\t\t\t\tConstants.Z_FUNCTION_CALL_FUNCTION\n\t\t\t\t\t\t][\n\t\t\t\t\t\t\tConstants.Z_REFERENCE_ID\n\t\t\t\t\t\t] ) {\n\t\t\t\t\t\t\tinternalId = typeUtils.findKeyInArray(\n\t\t\t\t\t\t\t\tConstants.Z_IMPLEMENTATION_COMPOSITION,\n\t\t\t\t\t\t\t\tcontext.state.zobject\n\t\t\t\t\t\t\t).id;\n\t\t\t\t\t\t\tcontext.dispatch( 'setError', {\n\t\t\t\t\t\t\t\tinternalId,\n\t\t\t\t\t\t\t\terrorState: true,\n\t\t\t\t\t\t\t\terrorMessage: 'wikilambda-zimplememntation-composition-missing',\n\t\t\t\t\t\t\t\terrorType: Constants.errorTypes.ERROR\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\tisValid = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t// if implementation type is code\n\t\t\t\t\tif ( zobject[ Constants.Z_PERSISTENTOBJECT_VALUE ][ Constants.Z_IMPLEMENTATION_CODE ] ) {\n\t\t\t\t\t\t// invalid if no code is defined\n\t\t\t\t\t\tif ( !zobject[\n\t\t\t\t\t\t\tConstants.Z_PERSISTENTOBJECT_VALUE\n\t\t\t\t\t\t][\n\t\t\t\t\t\t\tConstants.Z_IMPLEMENTATION_CODE\n\t\t\t\t\t\t][\n\t\t\t\t\t\t\tConstants.Z_CODE_CODE\n\t\t\t\t\t\t][\n\t\t\t\t\t\t\tConstants.Z_STRING_VALUE\n\t\t\t\t\t\t] ) {\n\t\t\t\t\t\t\tinternalId = typeUtils.findKeyInArray(\n\t\t\t\t\t\t\t\tConstants.Z_IMPLEMENTATION_CODE,\n\t\t\t\t\t\t\t\tcontext.state.zobject\n\t\t\t\t\t\t\t).id;\n\t\t\t\t\t\t\tcontext.dispatch( 'setError', {\n\t\t\t\t\t\t\t\tinternalId,\n\t\t\t\t\t\t\t\terrorState: true,\n\t\t\t\t\t\t\t\terrorMessage: 'wikilambda-zimplementation-code-missing',\n\t\t\t\t\t\t\t\terrorType: Constants.errorTypes.ERROR\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\tisValid = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\treturn isValid;\n\t\t\t\tcase Constants.Z_TESTER:\n\t\t\t\t\t// invalid if no function is defined\n\t\t\t\t\tif ( !zobject[ Constants.Z_PERSISTENTOBJECT_VALUE ][\n\t\t\t\t\t\tConstants.Z_TESTER_FUNCTION ][ Constants.Z_REFERENCE_ID ] ) {\n\t\t\t\t\t\tinternalId = getZTesterFunctionId(\n\t\t\t\t\t\t\ttypeUtils.findKeyInArray,\n\t\t\t\t\t\t\tcontext\n\t\t\t\t\t\t);\n\t\t\t\t\t\tcontext.dispatch( 'setError', {\n\t\t\t\t\t\t\tinternalId,\n\t\t\t\t\t\t\terrorState: true,\n\t\t\t\t\t\t\terrorMessage: 'wikilambda-zobject-missing-attached-function',\n\t\t\t\t\t\t\terrorType: Constants.errorTypes.ERROR\n\t\t\t\t\t\t} );\n\t\t\t\t\t\tisValid = false;\n\t\t\t\t\t}\n\t\t\t\t\t// invalid if no function call is set\n\t\t\t\t\tif ( !zobject[\n\t\t\t\t\t\tConstants.Z_PERSISTENTOBJECT_VALUE\n\t\t\t\t\t][\n\t\t\t\t\t\tConstants.Z_TESTER_CALL\n\t\t\t\t\t][\n\t\t\t\t\t\tConstants.Z_FUNCTION_CALL_FUNCTION\n\t\t\t\t\t][\n\t\t\t\t\t\tConstants.Z_REFERENCE_ID\n\t\t\t\t\t] ) {\n\t\t\t\t\t\tinternalId = typeUtils.findKeyInArray( Constants.Z_TESTER_CALL, context.state.zobject ).id;\n\t\t\t\t\t\tcontext.dispatch( 'setError', {\n\t\t\t\t\t\t\tinternalId,\n\t\t\t\t\t\t\terrorState: true,\n\t\t\t\t\t\t\terrorMessage: 'wikilambda-zobject-missing-attached-function',\n\t\t\t\t\t\t\terrorType: Constants.errorTypes.ERROR\n\t\t\t\t\t\t} );\n\t\t\t\t\t\tisValid = false;\n\t\t\t\t\t}\n\t\t\t\t\t// invalid if no result validation is set\n\t\t\t\t\tif ( !zobject[\n\t\t\t\t\t\tConstants.Z_PERSISTENTOBJECT_VALUE\n\t\t\t\t\t][\n\t\t\t\t\t\tConstants.Z_TESTER_VALIDATION\n\t\t\t\t\t][\n\t\t\t\t\t\tConstants.Z_FUNCTION_CALL_FUNCTION\n\t\t\t\t\t][\n\t\t\t\t\t\tConstants.Z_REFERENCE_ID\n\t\t\t\t\t]\n\t\t\t\t\t) {\n\t\t\t\t\t\tinternalId = typeUtils.findKeyInArray(\n\t\t\t\t\t\t\tConstants.Z_TESTER_VALIDATION,\n\t\t\t\t\t\t\tcontext.state.zobject\n\t\t\t\t\t\t).id;\n\t\t\t\t\t\tcontext.dispatch( 'setError', {\n\t\t\t\t\t\t\tinternalId,\n\t\t\t\t\t\t\terrorState: true,\n\t\t\t\t\t\t\terrorMessage: 'wikilambda-zobject-missing-attached-function',\n\t\t\t\t\t\t\terrorType: Constants.errorTypes.ERROR\n\t\t\t\t\t\t} );\n\t\t\t\t\t\tisValid = false;\n\t\t\t\t\t}\n\t\t\t\t\treturn isValid;\n\t\t\t\tdefault:\n\t\t\t\t\treturn isValid;\n\t\t\t}\n\t\t},\n\t\t/**\n\t\t * Submit a zObject to the api.\n\t\t * The request is handled differently if new or existing object.\n\t\t * Empty labels are removed before submitting.\n\t\t *\n\t\t * @param {Object} context\n\t\t * @param {Object} param\n\t\t * @param {Object} param.summary\n\t\t * @param {boolean} param.shouldUnattachImplementationAndTester\n\t\t * @return {Promise}\n\t\t */\n\t\tsubmitZObject: function ( context, { summary, shouldUnattachImplementationAndTester } ) {\n\t\t\tcontext.commit( 'setIsSavingZObject', true );\n\n\t\t\tvar zobject = transformZObjectForSubmission( context, shouldUnattachImplementationAndTester );\n\n\t\t\treturn new Promise( function ( resolve, reject ) {\n\t\t\t\tsaveZObject(\n\t\t\t\t\tzobject,\n\t\t\t\t\tcontext.getters.isCreateNewPage ? undefined : context.getters.getCurrentZObjectId,\n\t\t\t\t\tsummary\n\t\t\t\t).then( function ( result ) {\n\t\t\t\t\tcontext.commit( 'setIsSavingZObject', false );\n\t\t\t\t\treturn resolve( result.page );\n\t\t\t\t} ).catch( function ( error ) {\n\t\t\t\t\tcontext.commit( 'setIsSavingZObject', false );\n\n\t\t\t\t\tcontext.commit( 'setMessage', {\n\t\t\t\t\t\ttype: 'error',\n\t\t\t\t\t\ttext: error && error.error ? error.error.info : ''\n\t\t\t\t\t} );\n\n\t\t\t\t\treturn reject( error );\n\t\t\t\t} );\n\t\t\t} );\n\t\t},\n\t\t/**\n\t\t * Set the value of the page zObject. This updates the title and set the ZObject value\n\t\t *\n\t\t * @param {Object} context\n\t\t * @param {Object} payload\n\t\t */\n\t\tsetPageZObjectValue: function ( context, payload ) {\n\n\t\t\tif ( payload.id === undefined || payload.value === undefined ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Update page title\n\t\t\tif ( payload.isMainZObject ) {\n\t\t\t\tconst pageTitleSelector = '#firstHeading .ext-wikilambda-editpage-header-title--function-name';\n\t\t\t\t$( pageTitleSelector ).first().text( payload.value );\n\t\t\t}\n\n\t\t\t// TODO(T309723): if renaming a function that had previously had no name,\n\t\t\t// we need to re-add the structure in the form of a typed list\n\n\t\t\t// Update ZObject value\n\t\t\tcontext.dispatch( 'setZObjectValue', {\n\t\t\t\tid: payload.id,\n\t\t\t\tvalue: payload.value\n\t\t\t} );\n\t\t},\n\t\t/**\n\t\t * Set the value of a specific Zobject. This method is called multiple times when adding a nested object.\n\t\t *\n\t\t * @param {Object} context\n\t\t * @param {Object} payload\n\t\t */\n\t\tsetZObjectValue: function ( context, payload ) {\n\t\t\tvar objectIndex;\n\n\t\t\tif ( payload.id === undefined || payload.value === undefined ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tobjectIndex = context.getters.getZObjectIndexById( payload.id );\n\t\t\tpayload.index = objectIndex;\n\t\t\tcontext.commit( 'setZObjectValue', payload );\n\t\t},\n\t\t/**\n\t\t * Set the parent of a specific Zobject.\n\t\t *\n\t\t * @param {Object} context\n\t\t * @param {Object} payload\n\t\t */\n\t\tsetZObjectParent: function ( context, payload ) {\n\t\t\tvar objectIndex;\n\t\t\tif ( payload.id === undefined || payload.parent === undefined ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tobjectIndex = context.getters.getZObjectIndexById( payload.id );\n\t\t\tpayload.index = objectIndex;\n\t\t\tcontext.commit( 'setZObjectParent', payload );\n\t\t},\n\t\t/**\n\t\t * Handles the conversion and initization of a zObject.\n\t\t * The Object received by the server is in JSON format, so we convert it\n\t\t * to our Tree structure.\n\t\t *\n\t\t * TODO: Deprecate in favor of injectZObjectFromRowId\n\t\t *\n\t\t * @param {Object} context\n\t\t * @param {Object} payload\n\t\t * @return {Promise} type\n\t\t */\n\t\tinjectZObject: function ( context, payload ) {\n\t\t\tcontext.dispatch( 'injectZObjectFromRowId', {\n\t\t\t\trowId: payload.id,\n\t\t\t\tvalue: payload.zobject\n\t\t\t} );\n\t\t},\n\t\t/**\n\t\t * Recalculate the internal keys of a ZList in its zobject table representation.\n\t\t * This should be used when an item is removed from a ZList.\n\t\t *\n\t\t * @param {Object} context\n\t\t * @param {number} zListId\n\t\t */\n\t\trecalculateZListIndex: function ( context, zListId ) {\n\t\t\tvar zList = context.getters.getZObjectChildrenById( zListId );\n\n\t\t\tzList.forEach( function ( zObject, index ) {\n\t\t\t\tcontext.commit( 'setZObjectKey', {\n\t\t\t\t\tindex: context.getters.getZObjectIndexById( zObject.id ),\n\t\t\t\t\tkey: `${index}`\n\t\t\t\t} );\n\t\t\t} );\n\t\t},\n\t\t/**\n\t\t * Recalculate the keys and key values of a ZArgument List.\n\t\t * This should be used when an item is removed from a ZArgument list.\n\t\t *\n\t\t * @param {Object} context\n\t\t * @param {number} zListId\n\t\t */\n\t\trecalculateZArgumentList: function ( context, zListId ) {\n\t\t\tvar zList = context.getters.getAllItemsFromListById( zListId );\n\n\t\t\tzList.forEach( function ( zObject, index ) {\n\t\t\t\tvar children = context.getters.getZObjectChildrenById( zObject.id );\n\t\t\t\tvar argumentKeyZObject = typeUtils.findKeyInArray( Constants.Z_ARGUMENT_KEY, children );\n\t\t\t\tvar argumentKeyChildren = context.getters.getZObjectChildrenById( argumentKeyZObject.id );\n\t\t\t\tcontext.commit( 'setZObjectValue', {\n\t\t\t\t\tindex: context.getters.getZObjectIndexById( argumentKeyChildren[ 1 ].id ),\n\t\t\t\t\tvalue: `${context.getters.getCurrentZObjectId}K${index + 1}`\n\t\t\t\t} );\n\t\t\t\tcontext.commit( 'setZObjectKey', {\n\t\t\t\t\tindex: context.getters.getZObjectIndexById( zObject.id ),\n\t\t\t\t\tkey: `${index}`\n\t\t\t\t} );\n\t\t\t} );\n\t\t},\n\t\t/**\n\t\t * Set the programing language for a specific zCode object.\n\t\t * The entry will result in a json representation equal to:\n\t\t * { Z1K1: Z61, Z61K1: payload.value }\n\t\t *\n\t\t * @param {Object} context\n\t\t * @param {Object} payload\n\t\t */\n\t\tsetZCodeLanguage: function ( context, payload ) {\n\t\t\tcontext.dispatch( 'injectZObject', {\n\t\t\t\tzobject: {\n\t\t\t\t\tZ1K1: Constants.Z_PROGRAMMING_LANGUAGE,\n\t\t\t\t\tZ61K1: payload.value\n\t\t\t\t},\n\t\t\t\tkey: Constants.Z_CODE_LANGUAGE,\n\t\t\t\tid: payload.zobject.id,\n\t\t\t\tparent: payload.zobject.parent\n\t\t\t} );\n\t\t},\n\t\t/**\n\t\t * Sets the ZCode's code string to a default based on provided values.\n\t\t *\n\t\t * @param {Object} context\n\t\t * @param {Object} payload\n\t\t * @return {Object}\n\t\t */\n\t\tinitializeZCodeFunction: function ( context, payload ) {\n\t\t\tvar zCode = context.getters.getZObjectChildrenById( payload.zCodeId ),\n\t\t\t\tzCodeString = typeUtils.findKeyInArray(\n\t\t\t\t\tConstants.Z_STRING_VALUE,\n\t\t\t\t\tcontext.getters.getZObjectChildrenById(\n\t\t\t\t\t\ttypeUtils.findKeyInArray( Constants.Z_CODE_CODE, zCode ).id\n\t\t\t\t\t)\n\t\t\t\t),\n\t\t\t\targs = Array.isArray( payload.argumentList ) ?\n\t\t\t\t\tpayload.argumentList.reduce(\n\t\t\t\t\t\tfunction ( str, argument, index ) {\n\t\t\t\t\t\t\tif ( index === 0 ) {\n\t\t\t\t\t\t\t\treturn argument.zid;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn str + ', ' + argument.zid;\n\t\t\t\t\t\t}, '' ) : '';\n\n\t\t\tswitch ( payload.language ) {\n\t\t\t\tcase 'javascript':\n\t\t\t\t\treturn context.commit( 'setZObjectValue', {\n\t\t\t\t\t\tindex: context.getters.getZObjectIndexById( zCodeString.id ),\n\t\t\t\t\t\tvalue: 'function ' + payload.functionId + '( ' + args + ' ) {\\n\\n}'\n\t\t\t\t\t} );\n\t\t\t\tcase 'python':\n\t\t\t\t\treturn context.commit( 'setZObjectValue', {\n\t\t\t\t\t\tindex: context.getters.getZObjectIndexById( zCodeString.id ),\n\t\t\t\t\t\tvalue: 'def ' + payload.functionId + '(' + args + '):\\n\\t'\n\t\t\t\t\t} );\n\t\t\t\tcase 'lua':\n\t\t\t\t\treturn context.commit( 'setZObjectValue', {\n\t\t\t\t\t\tindex: context.getters.getZObjectIndexById( zCodeString.id ),\n\t\t\t\t\t\tvalue: 'function ' + payload.functionId + '(' + args + ')\\n\\t\\nend'\n\t\t\t\t\t} );\n\t\t\t\tdefault:\n\t\t\t\t\treturn context.commit( 'setZObjectValue', {\n\t\t\t\t\t\tindex: context.getters.getZObjectIndexById( zCodeString.id ),\n\t\t\t\t\t\tvalue: ''\n\t\t\t\t\t} );\n\t\t\t}\n\t\t},\n\t\tsetZImplementationType: function ( context, payload ) {\n\t\t\tvar zobject = context.getters.getZObjectById( payload.zobjectId ),\n\t\t\t\tzobjectParent = context.getters.getZObjectById( zobject.parent ),\n\t\t\t\tjson = context.getters.getZObjectAsJsonById( payload.zobjectId );\n\n\t\t\tswitch ( payload.mode ) {\n\t\t\t\tcase 'code':\n\t\t\t\t\tjson[ Constants.Z_IMPLEMENTATION_CODE ] = {\n\t\t\t\t\t\tZ1K1: Constants.Z_CODE,\n\t\t\t\t\t\tZ16K1: {\n\t\t\t\t\t\t\tZ1K1: Constants.Z_PROGRAMMING_LANGUAGE,\n\t\t\t\t\t\t\tZ61K1: ''\n\t\t\t\t\t\t},\n\t\t\t\t\t\tZ16K2: ''\n\t\t\t\t\t};\n\t\t\t\t\tjson[ Constants.Z_IMPLEMENTATION_COMPOSITION ] = undefined;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'composition':\n\t\t\t\t\tjson[ Constants.Z_IMPLEMENTATION_CODE ] = undefined;\n\t\t\t\t\tjson[ Constants.Z_IMPLEMENTATION_COMPOSITION ] = {\n\t\t\t\t\t\tZ1K1: Constants.Z_FUNCTION_CALL,\n\t\t\t\t\t\tZ7K1: ''\n\t\t\t\t\t};\n\t\t\t}\n\n\t\t\tcontext.dispatch( 'injectZObject', {\n\t\t\t\tzobject: json,\n\t\t\t\tkey: zobjectParent.key,\n\t\t\t\tid: payload.zobjectId,\n\t\t\t\tparent: zobjectParent.id\n\t\t\t} );\n\t\t},\n\t\t/**\n\t\t * Remove a specific zobject. This method does NOT remove its children.\n\t\t *\n\t\t * @param {Object} context\n\t\t * @param {number} objectId\n\t\t */\n\t\tremoveZObject: function ( context, objectId ) {\n\t\t\tif ( objectId === null || objectId === undefined ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tvar objectIndex = context.getters.getZObjectIndexById( objectId );\n\t\t\tcontext.commit( 'removeZObject', objectIndex );\n\t\t},\n\t\t/**\n\t\t * Remove all the children of a specific zObject. Useful to clean up existing data.\n\t\t * FIXME: add tests, check that all descendants are removed in objects and arrays\n\t\t *\n\t\t * @param {Object} context\n\t\t * @param {number} rowId\n\t\t */\n\t\tremoveZObjectChildren: function ( context, rowId ) {\n\t\t\tif ( ( rowId === undefined ) || ( rowId === null ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst childRows = context.getters.getZObjectChildrenById( rowId );\n\t\t\tchildRows.forEach( function ( child ) {\n\t\t\t\t// If not terminal, recurse to remove all progenie\n\t\t\t\tif ( !child.isTerminal() ) {\n\t\t\t\t\tcontext.dispatch( 'removeZObjectChildren', child.id );\n\t\t\t\t}\n\t\t\t\t// Then remove child\n\t\t\t\tcontext.dispatch( 'removeZObject', child.id );\n\t\t\t} );\n\t\t},\n\n\t\t/**\n\t\t * Add a single entry in the zObject tree.\n\t\t *\n\t\t * @param {Object} context\n\t\t * @param {Object} payload\n\t\t * @return {number} newObjectId\n\t\t */\n\t\taddZObject: function ( context, payload ) {\n\t\t\tif ( payload.key === undefined || isNaN( payload.parent ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t// we add the value property if not passed in the payload\n\t\t\tif ( !payload.value ) {\n\t\t\t\tpayload.value = undefined;\n\t\t\t}\n\n\t\t\tpayload.id = zobjectTreeUtils.getNextObjectId( context.state.zobject );\n\t\t\tcontext.commit( 'addZObject', payload );\n\t\t\treturn payload.id;\n\t\t},\n\n\t\t/**\n\t\t * Add a multiple entry in the zObject tree.\n\t\t *\n\t\t * @param {Object} context\n\t\t * @param {Array} zObjectItems\n\t\t * @return {Array} newObjectIds\n\t\t */\n\t\taddZObjects: function ( context, zObjectItems ) {\n\t\t\tvar newObjectIds = [];\n\t\t\tzObjectItems.forEach( function ( item ) {\n\t\t\t\titem.id = zobjectTreeUtils.getNextObjectId( context.state.zobject );\n\t\t\t\tcontext.commit( 'addZObject', item );\n\t\t\t\tnewObjectIds.push( item.id );\n\t\t\t} );\n\n\t\t\treturn newObjectIds;\n\t\t},\n\n\t\t/**\n\t\t * Reset an object to its initial state\n\t\t *\n\t\t * @param {Object} context Vuex context object\n\t\t * @param {number} zObjectId ZObject ID\n\t\t * @return {Promise}\n\t\t */\n\t\tresetZObject: function ( context, zObjectId ) {\n\t\t\tvar objectReferenceId = context.getters.getZObjectChildrenById( zObjectId )\n\t\t\t\t\t.filter( function ( child ) {\n\t\t\t\t\t\treturn child.key === Constants.Z_REFERENCE_ID;\n\t\t\t\t\t} )[ 0 ],\n\t\t\t\tobjectType = typeUtils\n\t\t\t\t\t.findKeyInArray(\n\t\t\t\t\t\tConstants.Z_OBJECT_TYPE,\n\t\t\t\t\t\tcontext.getters.getZObjectChildrenById( zObjectId )\n\t\t\t\t\t);\n\t\t\treturn context.dispatch( 'changeType', {\n\t\t\t\tid: zObjectId,\n\t\t\t\ttype: ( objectReferenceId || objectType ).value\n\t\t\t} );\n\t\t},\n\t\t/**\n\t\t * Lookup a ZObject\n\t\t *\n\t\t * @param {Object} context Vuex context object\n\t\t * @param {number} payload Object containing input(string) and type\n\t\t * @return {Promise}\n\t\t */\n\t\tlookupZObject: function ( context, payload ) {\n\t\t\tvar api = new mw.Api(),\n\t\t\t\tqueryType = 'wikilambdasearch_labels';\n\t\t\treturn new Promise( function ( resolve ) {\n\t\t\t\tclearTimeout( debounceZObjectLookup );\n\t\t\t\tdebounceZObjectLookup = setTimeout( function () {\n\t\t\t\t\treturn api.get( {\n\t\t\t\t\t\taction: 'query',\n\t\t\t\t\t\tlist: queryType,\n\t\t\t\t\t\twikilambdasearch_search: payload.input,\n\t\t\t\t\t\twikilambdasearch_type: payload.type,\n\t\t\t\t\t\twikilambdasearch_return_type: payload.returnType,\n\t\t\t\t\t\twikilambdasearch_language: context.getters.getZLang\n\t\t\t\t\t} ).then( function ( data ) {\n\t\t\t\t\t\tvar lookupResults = [];\n\t\t\t\t\t\tif ( ( 'query' in data ) && ( queryType in data.query ) ) {\n\t\t\t\t\t\t\tlookupResults = data.query[ queryType ];\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn resolve( lookupResults );\n\t\t\t\t\t} );\n\t\t\t\t}, DEBOUNCE_ZOBJECT_LOOKUP_TIMEOUT );\n\t\t\t} );\n\t\t},\n\t\t/**\n\t\t * Adds the given testers to the given function's list of approved testers, and submits\n\t\t * the change to the API.\n\t\t *\n\t\t * @param {Object} context\n\t\t * @param {Object} payload\n\t\t * @param {string} payload.functionId - the local ID of the function\n\t\t * @param {Array} payload.testerZIds - the ZIDs of the testers to attach\n\t\t * @return {Promise}\n\t\t */\n\t\tattachZTesters: function ( context, payload ) {\n\t\t\t// Save a copy of the pre-submission ZObject in case the submission returns an error\n\t\t\tconst zObjectCopy = JSON.parse( JSON.stringify( context.state.zobject ) );\n\n\t\t\t// Get tester list (Z8K3) row following the appropriate keyPath Z2K2.Z8K3 from the root\n\t\t\tconst listRow = context.getters.getRowByKeyPath( [\n\t\t\t\tConstants.Z_PERSISTENTOBJECT_VALUE,\n\t\t\t\tConstants.Z_FUNCTION_TESTERS\n\t\t\t] );\n\n\t\t\treturn context\n\t\t\t\t.dispatch( 'injectZObjectFromRowId', { rowId: listRow.id, value: payload.testerZIds, append: true } )\n\t\t\t\t.then( () => {\n\t\t\t\t\treturn context.dispatch( 'submitZObject', '' ).catch( function ( e ) {\n\t\t\t\t\t\t// Reset old ZObject if something failed\n\t\t\t\t\t\tcontext.commit( 'setZObject', zObjectCopy );\n\t\t\t\t\t\tthrow e;\n\t\t\t\t\t} );\n\t\t\t\t} );\n\t\t},\n\t\t/**\n\t\t * Removes the given testers from the given function's list of approved testers, and submits the\n\t\t * change to the API.\n\t\t *\n\t\t * @param {Object} context\n\t\t * @param {Object} payload\n\t\t * @param {Object} payload.functionId - the local ID of the function\n\t\t * @param {Array} payload.testerZIds - the ZIDs of the testers to detach\n\t\t * @return {Promise}\n\t\t */\n\t\tdetachZTesters: function ( context, payload ) {\n\t\t\tconst zObjectCopy = JSON.parse( JSON.stringify( context.state.zobject ) );\n\t\t\tconst listId = context.getters.getNestedZObjectById(\n\t\t\t\tpayload.functionId, [\n\t\t\t\t\tConstants.Z_PERSISTENTOBJECT_VALUE,\n\t\t\t\t\tConstants.Z_FUNCTION_TESTERS\n\t\t\t\t] ).id;\n\t\t\tconst listItems = context.getters.getZObjectChildrenById( listId );\n\n\t\t\tfor ( const zid of payload.testerZIds ) {\n\t\t\t\tconst listItemId = listItems.find( ( listItem ) =>\n\t\t\t\t\tcontext.getters.getNestedZObjectById(\n\t\t\t\t\t\tlistItem.id,\n\t\t\t\t\t\t[ Constants.Z_REFERENCE_ID ]\n\t\t\t\t\t).value === zid\n\t\t\t\t).id;\n\t\t\t\tcontext.dispatch( 'removeZObjectChildren', listItemId );\n\t\t\t\tcontext.dispatch( 'removeZObject', listItemId );\n\t\t\t}\n\t\t\tcontext.dispatch( 'recalculateZListIndex', listId );\n\t\t\treturn context.dispatch( 'submitZObject', '' ).catch( function ( e ) {\n\t\t\t\tcontext.commit( 'setZObject', zObjectCopy );\n\t\t\t\tthrow e;\n\t\t\t} );\n\t\t},\n\t\t/**\n\t\t * Adds the given implementations to the given function's list of approved implementations, and submits\n\t\t * the change to the API.\n\t\t *\n\t\t * @param {Object} context\n\t\t * @param {Object} payload\n\t\t * @param {string} payload.functionId - the local ID of the function\n\t\t * @param {Array} payload.implementationZIds - the ZIDs of the implementations to attach\n\t\t * @return {Promise}\n\t\t */\n\t\tattachZImplementations: function ( context, payload ) {\n\t\t\t// Save a copy of the pre-submission ZObject in case the submission returns an error\n\t\t\tconst zObjectCopy = JSON.parse( JSON.stringify( context.state.zobject ) );\n\n\t\t\t// Get implementation list (Z8K4) row following the appropriate keyPath Z2K2.Z8K4 from the root\n\t\t\tconst listRow = context.getters.getRowByKeyPath( [\n\t\t\t\tConstants.Z_PERSISTENTOBJECT_VALUE,\n\t\t\t\tConstants.Z_FUNCTION_IMPLEMENTATIONS\n\t\t\t] );\n\n\t\t\treturn context\n\t\t\t\t.dispatch( 'injectZObjectFromRowId', { rowId: listRow.id, value: payload.implementationZIds, append: true } )\n\t\t\t\t.then( () => {\n\t\t\t\t\treturn context.dispatch( 'submitZObject', '' ).catch( function ( e ) {\n\t\t\t\t\t\t// Reset old ZObject if something failed\n\t\t\t\t\t\tcontext.commit( 'setZObject', zObjectCopy );\n\t\t\t\t\t\tthrow e;\n\t\t\t\t\t} );\n\t\t\t\t} );\n\t\t},\n\t\t/**\n\t\t * Removes the given implementations from the given function's list of approved implementations, and submits the\n\t\t * change to the API.\n\t\t *\n\t\t * @param {Object} context\n\t\t * @param {Object} payload\n\t\t * @param {Object} payload.functionId - the local ID of the function\n\t\t * @param {Array} payload.implementationZIds - the ZIDs of the implementations to detach\n\t\t * @return {Promise}\n\t\t */\n\t\tdetachZImplementations: function ( context, payload ) {\n\t\t\tconst zObjectCopy = JSON.parse( JSON.stringify( context.state.zobject ) );\n\t\t\tconst listId = context.getters.getNestedZObjectById(\n\t\t\t\tpayload.functionId, [\n\t\t\t\t\tConstants.Z_PERSISTENTOBJECT_VALUE,\n\t\t\t\t\tConstants.Z_FUNCTION_IMPLEMENTATIONS\n\t\t\t\t] ).id;\n\t\t\tconst listItems = context.getters.getZObjectChildrenById( listId );\n\n\t\t\tfor ( const zid of payload.implementationZIds ) {\n\t\t\t\tconst listItemId = listItems.find( ( listItem ) =>\n\t\t\t\t\tcontext.getters.getNestedZObjectById(\n\t\t\t\t\t\tlistItem.id,\n\t\t\t\t\t\t[ Constants.Z_REFERENCE_ID ]\n\t\t\t\t\t).value === zid\n\t\t\t\t).id;\n\t\t\t\tcontext.dispatch( 'removeZObjectChildren', listItemId );\n\t\t\t\tcontext.dispatch( 'removeZObject', listItemId );\n\t\t\t}\n\t\t\tcontext.dispatch( 'recalculateZListIndex', listId );\n\t\t\treturn context.dispatch( 'submitZObject', '' ).catch( function ( e ) {\n\t\t\t\tcontext.commit( 'setZObject', zObjectCopy );\n\t\t\t\tthrow e;\n\t\t\t} );\n\t\t},\n\t\tsetIsZObjectDirty: function ( context, value ) {\n\t\t\tcontext.commit( 'setIsZObjectDirty', value );\n\t\t},\n\n\t\t/* NEW ACTIONS */\n\n\t\t/**\n\t\t * Set the value of a key.\n\t\t * The value can be a terminal value (string) or it can be an array\n\t\t * or an object. Depending on the kind of value passed, this method will\n\t\t * handle all necessary changes:\n\t\t * 1. Walk down the path passed as payload.keyPath and find the rowId\n\t\t * from which the changes should be made.\n\t\t * 2. If the value is a terminal value (string), call the setValue action\n\t\t * 3. If the value is more complex, call the injectZObjectFromRowId action,\n\t\t * which will make sure that all the current children are deleted and\n\t\t * the necessary rows are inserted at non-colliding ids.\n\t\t *\n\t\t * TODO: Add massive amounts of tests for this\n\t\t *\n\t\t * TODO: All the ubercomplex setters should be replaced with this or\n\t\t * combinations of this.\n\t\t *\n\t\t * @param {Object} context\n\t\t * @param {Object} payload\n\t\t * @param {number} payload.rowId\n\t\t * @param {Array} payload.keyPath\n\t\t * @param {Object|Array|string} payload.value\n\t\t */\n\t\tsetValueByRowIdAndPath: function ( context, payload ) {\n\t\t\t// assume this isn't an append unless explicitly stated\n\t\t\tconst append = payload.append ? payload.append : false;\n\t\t\t// 1. Find the row that will be parent for the given payload.value\n\t\t\tconst row = context.getters.getRowByKeyPath( payload.keyPath, payload.rowId );\n\t\t\t// 2. Is the value a string? Call atomic action setValueByRowId\n\t\t\t// 3. Is the value an object or array? Call action inject\n\t\t\tif ( typeof payload.value === 'string' ) {\n\t\t\t\tcontext.dispatch( 'setValueByRowId', { rowId: row.id, value: payload.value } );\n\t\t\t} else {\n\t\t\t\tcontext.dispatch( 'injectZObjectFromRowId', { rowId: row.id, value: payload.value, append } );\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Most atomic action to edit the state. Perform the atomic mutation (index, value)\n\t\t *\n\t\t * @param {Object} context\n\t\t * @param {Object} payload\n\t\t * @param {number} payload.rowId\n\t\t * @param {Object|Array|string} payload.value\n\t\t */\n\t\tsetValueByRowId: function ( context, payload ) {\n\t\t\t// FIXME make sure that the getIndex getters is only used in here.\n\t\t\t// Because setValueByRowId is the most atomic of all actions, the\n\t\t\t// following method should not be called from anywhere else. All more\n\t\t\t// complex actions should instead use rowId so that the rowIndex remains\n\t\t\t// a concept only internal to this method. We can then move the\n\t\t\t// getRowIndexByRowId to be an internal function in here so that the\n\t\t\t// index concepts stops being accessible from other modules and components\n\t\t\tfunction getRowIndexByRowId( rowId ) {\n\t\t\t\tlet index;\n\t\t\t\tfor ( const i in context.state.zobject ) {\n\t\t\t\t\tif ( context.state.zobject[ i ].id === rowId ) {\n\t\t\t\t\t\tindex = i;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn index;\n\t\t\t}\n\n\t\t\tconst rowIndex = getRowIndexByRowId( payload.rowId );\n\t\t\tcontext.commit( 'setValueByRowIndex', { rowIndex, value: payload.value } );\n\t\t},\n\n\t\t/**\n\t\t * Flattens an input ZObject into a table structure and inserts the rows\n\t\t * into the global state. This action makes sure of a few things:\n\t\t * 1. If it's called with a parent row, all the current children will\n\t\t * be removed, and the new children will be added with non-colliding IDs.\n\t\t * If the parent row is a list, the flag append will permit adding the new\n\t\t * value into the existing list items.\n\t\t * 2. If it's called with no parent row, the ZObject will be inserted fully,\n\t\t * including a root row with parent and key set to undefined.\n\t\t *\n\t\t * @param {Object} context\n\t\t * @param {Object} payload\n\t\t * @param {number|undefined} payload.rowId parent rowId or undefined if root\n\t\t * @param {Object|Array|string} payload.value ZObject to inject\n\t\t * @param {boolean | undefined} payload.append Flag to append the new object and not remove\n\t\t * children\n\t\t */\n\t\tinjectZObjectFromRowId: function ( context, payload ) {\n\t\t\tlet rows;\n\t\t\tconst hasParent = payload.rowId !== undefined;\n\n\t\t\tif ( hasParent ) {\n\t\t\t\tlet parentRow = context.getters.getRowById( payload.rowId );\n\t\t\t\tconst nextRowId = context.getters.getNextRowId;\n\n\t\t\t\t// Convert input payload.value into table rows with parent\n\t\t\t\tif ( payload.append ) {\n\t\t\t\t\t// If we append to a list, calculate the index from which we need to enter the value\n\t\t\t\t\tconst index = context.getters.getNextArrayIndex( payload.rowId );\n\t\t\t\t\trows = zobjectTreeUtils.convertZObjectToRows( payload.value, parentRow, nextRowId, true, index );\n\t\t\t\t} else {\n\t\t\t\t\trows = zobjectTreeUtils.convertZObjectToRows( payload.value, parentRow, nextRowId );\n\t\t\t\t}\n\n\t\t\t\t// Reset the parent value in case it's changed\n\t\t\t\tparentRow = rows.shift();\n\t\t\t\tcontext.dispatch( 'setValueByRowId', { rowId: parentRow.id, value: parentRow.value } );\n\n\t\t\t\t// Remove all necessary children that are dangling from this parent, if append is not set\n\t\t\t\tif ( !payload.append ) {\n\t\t\t\t\tcontext.dispatch( 'removeZObjectChildren', parentRow.id );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// Convert input payload.value into table rows with no parent\n\t\t\t\trows = zobjectTreeUtils.convertZObjectToRows( payload.value );\n\t\t\t}\n\n\t\t\t// Push all the rows, they already have their required IDs\n\t\t\trows.forEach( function ( row ) {\n\t\t\t\tcontext.commit( 'pushRow', row );\n\t\t\t} );\n\t\t},\n\t\t/**\n\t\t *\n\t\t * Removes an item from a ZTypedList\n\t\t *\n\t\t * @param {Object} context\n\t\t * @param {Object} payload\n\t\t */\n\t\tremoveItemFromTypedList: function ( context, payload ) {\n\t\t\tcontext.dispatch( 'removeZObjectChildren', payload.rowId );\n\t\t\tcontext.dispatch( 'removeZObject', payload.rowId );\n\t\t}\n\t\t/* END NEW ACTIONS */\n\t}\n};\n","usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/resources/ext.wikilambda.edit/store/modules/zobject/addZObjects.js","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/resources/ext.wikilambda.edit/store/modules/zobject/currentZObject.js","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/resources/ext.wikilambda.edit/store/modules/zobjectModes.js","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/resources/ext.wikilambda.edit/store/mutations.js","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/resources/ext.wikilambda.edit/store/state.js","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/resources/ext.wikilambda.edit/views/DefaultView.vue","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/resources/ext.wikilambda.edit/views/FunctionEditor.vue","messages":[{"ruleId":"vue/require-explicit-emits","severity":1,"message":"The \"mounted\" event has been triggered but not declared on `emits` option.","line":27,"column":15,"nodeType":"Literal","messageId":"missing","endLine":27,"endColumn":24,"suggestions":[{"messageId":"addArrayEmitsOption","data":{"name":"mounted","emitsKind":"`emits` option"},"fix":{"range":[709,709],"text":"\nemits: ['mounted'],"},"desc":"Add the `emits` option with array syntax and define \"mounted\" event."},{"messageId":"addObjectEmitsOption","data":{"name":"mounted","emitsKind":"`emits` option"},"fix":{"range":[709,709],"text":"\nemits: {'mounted': null},"},"desc":"Add the `emits` option with object syntax and define \"mounted\" event."}]}],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"<template>\n\t<!--\n\t\tWikiLambda Vue component for the special view of a ZFunction object.\n\n\t\t@copyright 2020– Abstract Wikipedia team; see AUTHORS.txt\n\t\t@license MIT\n\t-->\n\t<div class=\"ext-wikilambda-function-editor\">\n\t\t<div class=\"ext-wikilambda-function-editor__main\">\n\t\t\t<main class=\"ext-wikilambda-function-editor__main__content\">\n\t\t\t\t<wl-function-editor-definition></wl-function-editor-definition>\n\t\t\t</main>\n\t\t</div>\n\t</div>\n</template>\n\n<script>\nvar FunctionEditorDefinition = require( '../components/function/editor/FunctionEditorDefinition.vue' );\n\n// @vue/component\nmodule.exports = exports = {\n\tname: 'wl-function-editor',\n\tcomponents: {\n\t\t'wl-function-editor-definition': FunctionEditorDefinition\n\t},\n\tmounted: function () {\n\t\tthis.$emit( 'mounted' );\n\t}\n};\n</script>\n\n<style lang=\"less\">\n\n.ext-wikilambda-function-editor {\n\t&__main {\n\t\t&__content {\n\t\t\twidth: 100%;\n\t\t}\n\t}\n}\n</style>\n","usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/resources/ext.wikilambda.edit/views/FunctionViewer.vue","messages":[{"ruleId":"vue/require-explicit-emits","severity":1,"message":"The \"mounted\" event has been triggered but not declared on `emits` option.","line":81,"column":15,"nodeType":"Literal","messageId":"missing","endLine":81,"endColumn":24,"suggestions":[{"messageId":"addArrayEmitsOption","data":{"name":"mounted","emitsKind":"`emits` option"},"fix":{"range":[1695,1695],"text":"\nemits: ['mounted'],"},"desc":"Add the `emits` option with array syntax and define \"mounted\" event."},{"messageId":"addObjectEmitsOption","data":{"name":"mounted","emitsKind":"`emits` option"},"fix":{"range":[1695,1695],"text":"\nemits: {'mounted': null},"},"desc":"Add the `emits` option with object syntax and define \"mounted\" event."}]}],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"<template>\n\t<!--\n\t\tWikiLambda Vue component for the special view of a ZFunction object.\n\n\t\t@copyright 2020– Abstract Wikipedia team; see AUTHORS.txt\n\t\t@license MIT\n\t-->\n\t<div class=\"ext-wikilambda-function-viewer\">\n\t\t<!-- eslint-disable vue/no-v-model-argument -->\n\t\t<!-- eslint-disable vue/no-unsupported-features -->\n\t\t<cdx-tabs v-model:active=\"currentTab\">\n\t\t\t<cdx-tab\n\t\t\t\tv-for=\"( tab, index ) in tabsData\"\n\t\t\t\t:key=\"index\"\n\t\t\t\t:name=\"tab.name\"\n\t\t\t\t:label=\"tab.label\"\n\t\t\t>\n\t\t\t\t<!-- Keep alive helps keeps the local state of the component so that it is not remounted -->\n\t\t\t\t<keep-alive>\n\t\t\t\t\t<component\n\t\t\t\t\t\t:is=\"tab.name\"\n\t\t\t\t\t\tv-if=\"tab.name === currentTab\"\n\t\t\t\t\t\t:name=\"tab.name\"\n\t\t\t\t\t></component>\n\t\t\t\t</keep-alive>\n\t\t\t</cdx-tab>\n\t\t</cdx-tabs>\n\t\t<div v-if=\"displaySuccessMessage\" class=\"ext-wikilambda-function-viewer__message\">\n\t\t\t<cdx-message\n\t\t\t\tclass=\"ext-wikilambda-function-viewer__message__success\"\n\t\t\t\t:auto-dismiss=\"true\"\n\t\t\t\ttype=\"success\"\n\t\t\t>\n\t\t\t\t{{ $i18n( 'wikilambda-publish-successful' ).text() }}\n\t\t\t</cdx-message>\n\t\t</div>\n\t</div>\n</template>\n\n<script>\nvar CdxTab = require( '@wikimedia/codex' ).CdxTab,\n\tCdxTabs = require( '@wikimedia/codex' ).CdxTabs,\n\tCdxMessage = require( '@wikimedia/codex' ).CdxMessage,\n\tFunctionViewerAbout = require( '../components/function/viewer/FunctionViewerAbout.vue' ),\n\tFunctionViewerDetails = require( '../components/function/viewer/FunctionViewerDetails.vue' );\n\n// @vue/component\nmodule.exports = exports = {\n\tname: 'wl-function-viewer',\n\tcomponents: {\n\t\t'wl-function-viewer-about': FunctionViewerAbout,\n\t\t'wl-function-viewer-details': FunctionViewerDetails,\n\t\t'cdx-tab': CdxTab,\n\t\t'cdx-tabs': CdxTabs,\n\t\t'cdx-message': CdxMessage\n\t},\n\tdata: function () {\n\t\treturn {\n\t\t\tcurrentTab: 'wl-function-viewer-about',\n\t\t\ttabsData: [\n\t\t\t\t{\n\t\t\t\t\tname: 'wl-function-viewer-about',\n\t\t\t\t\tlabel: this.$i18n( 'wikilambda-editor-fn-step-function-about' ).text()\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tname: 'wl-function-viewer-details',\n\t\t\t\t\tlabel: this.$i18n( 'wikilambda-editor-fn-step-function-details' ).text()\n\t\t\t\t}\n\t\t\t]\n\t\t};\n\t},\n\tcomputed: {\n\t\tdisplaySuccessMessage: function () {\n\t\t\tif ( mw.Uri().query ) {\n\t\t\t\treturn mw.Uri().query.success === 'true';\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\t},\n\tmounted: function () {\n\t\tthis.$emit( 'mounted' );\n\t}\n};\n</script>\n\n<style lang=\"less\">\n\n.ext-wikilambda-function-viewer {\n\t&__message {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tflex-direction: column;\n\t\tposition: fixed;\n\t\tleft: 0;\n\t\tright: 0;\n\t\tbottom: 0;\n\n\t\t&__success {\n\t\t\tmax-width: 100%;\n\t\t}\n\t}\n}\n\n</style>\n","usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/resources/ext.wikilambda.edit/views/ZObjectEditor.vue","messages":[{"ruleId":"vue/require-explicit-emits","severity":1,"message":"The \"mounted\" event has been triggered but not declared on `emits` option.","line":122,"column":15,"nodeType":"Literal","messageId":"missing","endLine":122,"endColumn":24,"suggestions":[{"messageId":"addArrayEmitsOption","data":{"name":"mounted","emitsKind":"`emits` option"},"fix":{"range":[1847,1847],"text":"\nemits: ['mounted'],"},"desc":"Add the `emits` option with array syntax and define \"mounted\" event."},{"messageId":"addObjectEmitsOption","data":{"name":"mounted","emitsKind":"`emits` option"},"fix":{"range":[1847,1847],"text":"\nemits: {'mounted': null},"},"desc":"Add the `emits` option with object syntax and define \"mounted\" event."}]}],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"<template>\n\t<!--\n\t\tWikiLambda Vue interface module for top-level editor encapsulation.\n\n\t\t@copyright 2020– Abstract Wikipedia team; see AUTHORS.txt\n\t\t@license MIT\n\t-->\n\t<!-- TODO (T300537): Add a loading indicator, once T300538 is done upstream. -->\n\t<div id=\"ext-wikilambda-editor\">\n\t\t<wl-z-object\n\t\t\t:persistent=\"true\"\n\t\t></wl-z-object>\n\t\t<template v-if=\"showEditCommand\">\n\t\t\t<wl-z-object-publish :is-disabled=\"!isDirty\"></wl-z-object-publish>\n\t\t\t<cdx-button\n\t\t\t\tclass=\"ext-wikilambda-expertModeToggle\"\n\t\t\t\t@click=\"$store.dispatch( 'toggleExpertMode' )\">\n\t\t\t\t<template v-if=\"$store.getters.isExpertMode\">\n\t\t\t\t\t{{ $i18n( 'wikilambda-disable-expert-mode' ).text() }}\n\t\t\t\t</template>\n\t\t\t\t<template v-else>\n\t\t\t\t\t{{ $i18n( 'wikilambda-enable-expert-mode' ).text() }}\n\t\t\t\t</template>\n\t\t\t</cdx-button>\n\t\t\t<cdx-message v-if=\"message.text\" :type=\"message.type\">\n\t\t\t\t{{ message }}\n\t\t\t</cdx-message>\n\t\t</template>\n\t\t<wl-leave-editor-dialog\n\t\t\t:show-dialog=\"showLeaveEditorDialog\"\n\t\t\t:continue-callback=\"leaveEditorCallback\"\n\t\t\t@close-dialog=\"closeLeaveEditorDialog\"\n\t\t></wl-leave-editor-dialog>\n\t</div>\n</template>\n\n<script>\nvar ZObject = require( '../components/ZObject.vue' ),\n\tZObjectPublish = require( '../components/ZObjectPublish.vue' ),\n\tLeaveEditorDialog = require( '../components/base/LeaveEditorDialog.vue' ),\n\tCdxButton = require( '@wikimedia/codex' ).CdxButton,\n\tCdxMessage = require( '@wikimedia/codex' ).CdxMessage,\n\tmapGetters = require( 'vuex' ).mapGetters,\n\tmapActions = require( 'vuex' ).mapActions,\n\ttypeUtils = require( '../mixins/typeUtils.js' );\n\n// @vue/component\nmodule.exports = exports = {\n\tname: 'wl-z-object-editor',\n\tcomponents: {\n\t\t'wl-z-object': ZObject,\n\t\t'wl-z-object-publish': ZObjectPublish,\n\t\t'wl-leave-editor-dialog': LeaveEditorDialog,\n\t\t'cdx-button': CdxButton,\n\t\t'cdx-message': CdxMessage\n\t},\n\tmixins: [ typeUtils ],\n\tdata: function () {\n\t\treturn {\n\t\t\tshowLeaveEditorDialog: false,\n\t\t\tleaveEditorCallback: ''\n\t\t};\n\t},\n\tcomputed: $.extend( mapGetters( {\n\t\tcreateNewPage: 'isCreateNewPage',\n\t\tmessage: 'getZObjectMessage',\n\t\tgetZObjectChildrenById: 'getZObjectChildrenById',\n\t\tgetIsZObjectDirty: 'getIsZObjectDirty'\n\t} ), {\n\t\tshowEditCommand: function () {\n\t\t\t// TODO: Move this into its own vuex store as things gets more complicated and more view settings are set\n\t\t\t// we currently hide the save command for evaluate function call.\n\t\t\treturn mw.config.get( 'wgCanonicalSpecialPageName' ) !== 'EvaluateFunctionCall';\n\t\t},\n\t\tisDirty: function () {\n\t\t\treturn this.getIsZObjectDirty;\n\t\t}\n\t} ),\n\tmethods: $.extend( {},\n\t\tmapActions( [ 'submitZObject', 'changeType', 'validateZObject' ] ),\n\t\tmapActions( 'router', [ 'navigate' ] ),\n\t\t{\n\t\t\tsubmit: function () {\n\t\t\t\tconst context = this;\n\t\t\t\tthis.validateZObject().then( function ( isValid ) {\n\t\t\t\t\tif ( isValid ) {\n\t\t\t\t\t\tcontext.submitZObject( { summary: context.summary } ).then( function ( pageTitle ) {\n\t\t\t\t\t\t\tif ( pageTitle ) {\n\t\t\t\t\t\t\t\twindow.location.href = new mw.Title( pageTitle ).getUrl();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} );\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t},\n\n\t\t\tcloseLeaveEditorDialog: function () {\n\t\t\t\tthis.showLeaveEditorDialog = false;\n\t\t\t},\n\n\t\t\thandleClickAway: function ( e ) {\n\t\t\t\tlet target = e.target;\n\n\t\t\t\t// Find if what was clicked was a link.\n\t\t\t\twhile ( target && target.tagName !== 'A' ) {\n\t\t\t\t\ttarget = target.parentNode;\n\t\t\t\t\tif ( !target ) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif ( target.href && this.isDirty ) {\n\t\t\t\t\tthis.showLeaveEditorDialog = true;\n\t\t\t\t\te.preventDefault();\n\t\t\t\t\tthis.leaveEditorCallback = function () {\n\t\t\t\t\t\twindow.removeEventListener( 'click', this.handleClickAway );\n\t\t\t\t\t\twindow.location.href = target.href;\n\t\t\t\t\t}.bind( this );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t),\n\tmounted: function () {\n\t\tthis.$emit( 'mounted' );\n\t\twindow.addEventListener( 'click', this.handleClickAway );\n\t},\n\tbeforeUnmount: function () {\n\t\twindow.removeEventListener( 'click', this.handleClickAway );\n\t}\n};\n</script>\n\n<style lang=\"less\">\n@import 'mediawiki.mixins';\n\n.ext-wikilambda-expertModeToggle {\n\tmargin: 1em 0 0 0;\n}\n\n.ext-wikilambda-editor-nojswarning {\n\tdisplay: none;\n}\n</style>\n","usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/resources/ext.wikilambda.edit/views/ZObjectViewer.vue","messages":[{"ruleId":"vue/require-explicit-emits","severity":1,"message":"The \"mounted\" event has been triggered but not declared on `emits` option.","line":55,"column":15,"nodeType":"Literal","messageId":"missing","endLine":55,"endColumn":24,"suggestions":[{"messageId":"addArrayEmitsOption","data":{"name":"mounted","emitsKind":"`emits` option"},"fix":{"range":[1280,1280],"text":"\nemits: ['mounted'],"},"desc":"Add the `emits` option with array syntax and define \"mounted\" event."},{"messageId":"addObjectEmitsOption","data":{"name":"mounted","emitsKind":"`emits` option"},"fix":{"range":[1280,1280],"text":"\nemits: {'mounted': null},"},"desc":"Add the `emits` option with object syntax and define \"mounted\" event."}]}],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"<template>\n\t<!--\n\t\tWikiLambda Vue interface module for top-level view encapsulation.\n\n\t\t@copyright 2020– Abstract Wikipedia team; see AUTHORS.txt\n\t\t@license MIT\n\t-->\n\t<!-- TODO (T300537): Add a loading indicator, once T300538 is done upstream. -->\n\t<div id=\"ext-wikilambda-view\">\n\t\t<wl-z-object\n\t\t\t:persistent=\"true\"\n\t\t></wl-z-object>\n\t\t<div v-if=\"displaySuccessMessage\" class=\"ext-wikilambda-view__message\">\n\t\t\t<cdx-message\n\t\t\t\tclass=\"ext-wikilambda-view__message__success\"\n\t\t\t\t:auto-dismiss=\"true\"\n\t\t\t\ttype=\"success\"\n\t\t\t>\n\t\t\t\t{{ $i18n( 'wikilambda-publish-successful' ).text() }}\n\t\t\t</cdx-message>\n\t\t</div>\n\t\t<cdx-button @click=\"$store.dispatch( 'toggleExpertMode' )\">\n\t\t\t<template v-if=\"$store.getters.isExpertMode\">\n\t\t\t\t{{ $i18n( 'wikilambda-disable-expert-mode' ).text() }}\n\t\t\t</template>\n\t\t\t<template v-else>\n\t\t\t\t{{ $i18n( 'wikilambda-enable-expert-mode' ).text() }}\n\t\t\t</template>\n\t\t</cdx-button>\n\t</div>\n</template>\n\n<script>\nvar ZObject = require( '../components/ZObject.vue' );\nvar CdxButton = require( '@wikimedia/codex' ).CdxButton;\nvar CdxMessage = require( '@wikimedia/codex' ).CdxMessage;\n\n// @vue/component\nmodule.exports = exports = {\n\tname: 'wl-z-object-viewer',\n\tcomponents: {\n\t\t'wl-z-object': ZObject,\n\t\t'cdx-button': CdxButton,\n\t\t'cdx-message': CdxMessage\n\t},\n\tcomputed: {\n\t\tdisplaySuccessMessage: function () {\n\t\t\tif ( mw.Uri().query ) {\n\t\t\t\treturn mw.Uri().query.success === 'true';\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\t},\n\tmounted: function () {\n\t\tthis.$emit( 'mounted' );\n\t}\n};\n</script>\n\n<style lang=\"less\">\n.ext-wikilambda-view-nojsfallback {\n\tdisplay: none;\n}\n\n.ext-wikilambda-view-nojswarning {\n\tfont-weight: bold;\n\tmargin-bottom: 1em;\n}\n\n.ext-wikilambda-view {\n\t&__message {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tflex-direction: column;\n\t\tposition: fixed;\n\t\tleft: 0;\n\t\tright: 0;\n\t\tbottom: 0;\n\n\t\t&__success {\n\t\t\tmax-width: 100%;\n\t\t}\n\t}\n}\n</style>\n","usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/sql/abstractSchemaChanges/patch-add-primary-label-field.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/sql/abstractSchemaChanges/patch-add-return-type-field.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/sql/table-zobject_function_join.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/sql/table-zobject_label_conflicts.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/sql/table-zobject_labels.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/sql/table-ztester_results.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/tests/.eslintrc.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/tests/jest/.eslintrc.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/tests/jest/components/App.test.js","messages":[{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":63,"column":120,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":78,"endColumn":3},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":80,"column":104,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":98,"endColumn":3}],"suppressedMessages":[],"errorCount":2,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":"/*!\n * WikiLambda unit test suite for the App component and related files.\n *\n * @copyright 2020– Abstract Wikipedia team; see AUTHORS.txt\n * @license MIT\n */\n'use strict';\n\nvar shallowMount = require( '@vue/test-utils' ).shallowMount,\n\tApp = require( '../../../resources/ext.wikilambda.edit/components/App.vue' ),\n\tgetters = require( '../../../resources/ext.wikilambda.edit/store/getters.js' );\n\ndescribe( 'App.vue', function () {\n\tvar actions,\n\t\tmockGetZObjectInitializedValue;\n\n\tbeforeAll( function () {\n\t\tactions = {\n\t\t\tinitializeZObject: jest.fn(),\n\t\t\tinitialize: jest.fn()\n\t\t};\n\n\t\tglobal.store.hotUpdate( {\n\t\t\tactions: actions,\n\t\t\tgetters: $.extend( getters, {\n\t\t\t\tgetZObjectInitialized: function () {\n\t\t\t\t\treturn mockGetZObjectInitializedValue;\n\t\t\t\t}\n\t\t\t} )\n\t\t} );\n\n\t\tglobal.store.registerModule( 'router', {\n\t\t\tnamespaced: true,\n\t\t\tgetters: {\n\t\t\t\tgetCurrentView: jest.fn().mockReturnValue( 'function-editor' ),\n\t\t\t\tgetQueryParams: jest.fn( function () {\n\t\t\t\t\treturn jest.fn();\n\t\t\t\t} )\n\t\t\t},\n\t\t\tactions: {\n\t\t\t\tevaluateUri: jest.fn()\n\t\t\t}\n\t\t} );\n\n\t} );\n\n\tit( 'Renders loading when getZObjectInitialized and `isAppSetup`(data property) is false', function () {\n\t\tvar wrapper;\n\n\t\tmockGetZObjectInitializedValue = false;\n\n\t\twrapper = shallowMount( App, {\n\t\t\tprovide: {\n\t\t\t\tviewmode: true\n\t\t\t}\n\t\t} );\n\n\t\texpect( wrapper.componentVM.isAppSetup ).toBe( false );\n\t\texpect( wrapper.findComponent( { name: 'wl-function-editor' } ).exists() ).toBe( false );\n\t\texpect( global.$i18n ).toHaveBeenCalledWith( 'wikilambda-loading' );\n\t} );\n\n\tit( 'Does not render the router view when getZObjectInitialized is true but initializeZObject has not yet completed', async () => {\n\t\tjest.clearAllMocks();\n\n\t\tvar wrapper;\n\n\t\tmockGetZObjectInitializedValue = true;\n\n\t\twrapper = shallowMount( App, {\n\t\t\tprovide: {\n\t\t\t\tviewmode: true\n\t\t\t}\n\t\t} );\n\n\t\texpect( wrapper.componentVM.isAppSetup ).toBe( false );\n\t\texpect( wrapper.findComponent( { name: 'wl-function-editor' } ).exists() ).toBe( false );\n\t} );\n\n\tit( 'Renders the router view when getZObjectInitialized is true and initializeZObject has completed', async () => {\n\t\tjest.clearAllMocks();\n\n\t\tvar wrapper;\n\n\t\tmockGetZObjectInitializedValue = true;\n\n\t\twrapper = shallowMount( App, {\n\t\t\tprovide: {\n\t\t\t\tviewmode: true\n\t\t\t}\n\t\t} );\n\n\t\tawait wrapper.vm.$nextTick();\n\t\tawait wrapper.vm.$nextTick();\n\n\t\texpect( wrapper.componentVM.isAppSetup ).toBe( true );\n\t\texpect( wrapper.findComponent( { name: 'wl-function-editor' } ).exists() ).toBe( true );\n\t} );\n\n\tit( 'Initializes the app on load', function () {\n\t\tjest.clearAllMocks();\n\n\t\tmockGetZObjectInitializedValue = true;\n\n\t\tshallowMount( App, {\n\t\t\tprovide: {\n\t\t\t\tviewmode: true\n\t\t\t}\n\t\t} );\n\n\t\texpect( actions.initializeZObject ).toHaveBeenCalled();\n\t} );\n} );\n","usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/tests/jest/components/ZArgumentReference.test.js","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/tests/jest/components/ZCode.test.js","messages":[{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":115,"column":40,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":120,"endColumn":3}],"suppressedMessages":[],"errorCount":1,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":"/*!\n * WikiLambda unit test suite for the ZCode component and related files.\n *\n * @copyright 2020– Abstract Wikipedia team; see AUTHORS.txt\n * @license MIT\n */\n'use strict';\n\nconst Constants = require( '../../../resources/ext.wikilambda.edit/Constants.js' );\n\nvar VueTestUtils = require( '@vue/test-utils' ),\n\tCodeEditor = require( '../../../resources/ext.wikilambda.edit/components/base/CodeEditor.vue' ),\n\tZCode = require( '../../../resources/ext.wikilambda.edit/components/main-types/ZCode.vue' );\n\nconst zobjectId = 1;\nconst codeItemId = 2;\nconst codeLanguageId = 3;\nconst languageCodeId = 4;\nconst initialCodeValue = 'initial';\n\ndescribe( 'ZCode', () => {\n\tbeforeEach( () => {\n\t\tglobal.store.hotUpdate( {\n\t\t\tmutations: {\n\t\t\t\tsetCodeValue( state, value ) {\n\t\t\t\t\tstate.codeValue = value;\n\t\t\t\t}\n\t\t\t},\n\t\t\tgetters: {\n\t\t\t\tgetZObjectChildrenById: ( state ) =>\n\t\t\t\t\t( id ) => {\n\t\t\t\t\t\tif ( id === zobjectId ) {\n\t\t\t\t\t\t\treturn [\n\t\t\t\t\t\t\t\t{ key: Constants.Z_CODE_CODE, id: codeItemId },\n\t\t\t\t\t\t\t\t{ key: Constants.Z_CODE_LANGUAGE, id: codeLanguageId }\n\t\t\t\t\t\t\t];\n\t\t\t\t\t\t} else if ( id === codeItemId ) {\n\t\t\t\t\t\t\treturn [ { key: Constants.Z_STRING_VALUE, value: state.codeValue } ];\n\t\t\t\t\t\t} else if ( id === codeLanguageId ) {\n\t\t\t\t\t\t\treturn [ { key: Constants.Z_PROGRAMMING_LANGUAGE_CODE, id: languageCodeId } ];\n\t\t\t\t\t\t} else if ( id === languageCodeId ) {\n\t\t\t\t\t\t\treturn [ { key: Constants.Z_STRING_VALUE, value: 'Python' } ];\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn [];\n\t\t\t\t\t},\n\t\t\t\tgetAllProgrammingLangs: jest.fn( () => {\n\t\t\t\t\treturn {};\n\t\t\t\t} ),\n\t\t\t\tgetErrors: jest.fn( function () {\n\t\t\t\t\treturn {};\n\t\t\t\t} )\n\t\t\t}\n\t\t} );\n\t\tglobal.store.commit( 'setCodeValue', initialCodeValue );\n\t} );\n\n\tit( 'renders without errors', () => {\n\t\tvar wrapper = VueTestUtils.shallowMount( ZCode );\n\n\t\texpect( wrapper.find( '.ext-wikilambda-zcode' ).exists() ).toBe( true );\n\t} );\n\n\tit( 'sets code value in editor on first load', () => {\n\t\tvar wrapper = VueTestUtils.shallowMount( ZCode, { props: { zobjectId: zobjectId } } );\n\n\t\texpect( wrapper.findComponent( { name: 'wl-code-editor' } ).props( 'value' ) ).toEqual( initialCodeValue );\n\t} );\n\n\tit( 'set code value in editor when it is updated in store following a language change', ( done ) => {\n\t\tvar wrapper = VueTestUtils.shallowMount( ZCode, { props: { zobjectId: zobjectId } } );\n\n\t\twrapper.findComponent( { name: 'cdx-select' } ).vm.$emit( 'update:selected' );\n\t\tglobal.store.commit( 'setCodeValue', 'new' );\n\n\t\twrapper.vm.$nextTick( () => {\n\t\t\texpect( wrapper.findComponent( { name: 'wl-code-editor' } ).props( 'value' ) ).toEqual( 'new' );\n\t\t\tdone();\n\t\t} );\n\t} );\n\n\tit( 'does not set code value in editor when it is updated in store, if that update does not follow a language change', ( done ) => {\n\t\tvar wrapper = VueTestUtils.shallowMount( ZCode, { props: { zobjectId: zobjectId } } );\n\n\t\tglobal.store.commit( 'setCodeValue', 'new' );\n\n\t\twrapper.vm.$nextTick( () => {\n\t\t\texpect( wrapper.findComponent( { name: 'wl-code-editor' } ).props( 'value' ) ).toEqual( initialCodeValue );\n\t\t\tdone();\n\t\t} );\n\t} );\n\n\tit( 'enables programming language selector and code editor when not in read-only or view mode', () => {\n\t\tvar wrapper = VueTestUtils.shallowMount( ZCode, { props: { zobjectId: zobjectId } } );\n\n\t\texpect( wrapper.findComponent( { name: 'cdx-select' } ).exists() ).toEqual( true );\n\t\texpect( wrapper.findComponent( { name: 'wl-code-editor' } ).props( 'readOnly' ) ).toEqual( false );\n\t} );\n\n\tit( 'disables programming language selector and code editor when in read-only mode', () => {\n\t\tvar wrapper = VueTestUtils.shallowMount( ZCode, { props: { zobjectId: zobjectId, readonly: true } } );\n\n\t\texpect( wrapper.findComponent( { name: 'cdx-select' } ).exists() ).toEqual( false );\n\t\texpect( wrapper.findComponent( { name: 'wl-code-editor' } ).props( 'readOnly' ) ).toEqual( true );\n\t} );\n\n\tit( 'disables programming language selector and code editor when in view mode', () => {\n\t\tvar wrapper = VueTestUtils.shallowMount( ZCode, {\n\t\t\tprops: { zobjectId: zobjectId },\n\t\t\tglobal: { provide: { viewmode: true } }\n\t\t} );\n\n\t\texpect( wrapper.findComponent( { name: 'cdx-select' } ).exists() ).toEqual( false );\n\t\texpect( wrapper.findComponent( { name: 'wl-code-editor' } ).props( 'readOnly' ) ).toEqual( true );\n\t} );\n\tit( 'updates code for valid strings', async () => {\n\t\tvar wrapper = VueTestUtils.shallowMount( ZCode );\n\t\twrapper.getComponent( CodeEditor ).vm.$emit( 'change', 'def() {}' );\n\t\tawait wrapper.vm.$nextTick();\n\t\texpect( wrapper.emitted( 'update-code' ) ).toBeTruthy();\n\t} );\n} );\n","usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/tests/jest/components/ZFunction.test.js","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/tests/jest/components/ZFunctionCall.test.js","messages":[{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":60,"column":70,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":74,"endColumn":3},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":76,"column":103,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":92,"endColumn":3}],"suppressedMessages":[],"errorCount":2,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":"/*!\n * WikiLambda unit test suite for the ZFunctionCall component and related files.\n *\n * @copyright 2020– Abstract Wikipedia team; see AUTHORS.txt\n * @license MIT\n */\n'use strict';\n\nvar VueTestUtils = require( '@vue/test-utils' ),\n\tZFunctionCall = require( '../../../resources/ext.wikilambda.edit/components/main-types/ZFunctionCall.vue' );\nconst { CdxButton } = require( '@wikimedia/codex' );\nconst Constants = require( '../../../resources/ext.wikilambda.edit/Constants.js' );\n\nconst zobjectId = 0;\nconst resultId = 1;\nconst functionZid = 'Z123';\n\ndescribe( 'ZFunctionCall', () => {\n\tbeforeEach( () => {\n\t\tglobal.store.hotUpdate( {\n\t\t\tgetters: {\n\t\t\t\tgetZObjectChildrenById: () => ( id ) => {\n\t\t\t\t\tif ( id === zobjectId ) {\n\t\t\t\t\t\treturn [ { key: Constants.Z_FUNCTION_CALL_FUNCTION, value: functionZid } ];\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tgetZObjectAsJsonById: () => ( id ) => {\n\t\t\t\t\tif ( id === resultId ) {\n\t\t\t\t\t\treturn 'json';\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tgetZkeys: () => {\n\t\t\t\t\treturn { [ functionZid ]: {\n\t\t\t\t\t\t[ Constants.Z_PERSISTENTOBJECT_VALUE ]: {\n\t\t\t\t\t\t\t[ Constants.Z_FUNCTION_ARGUMENTS ]: []\n\t\t\t\t\t\t},\n\t\t\t\t\t\t[ Constants.Z_PERSISTENTOBJECT_ID ]: {\n\t\t\t\t\t\t\t[ Constants.Z_STRING_VALUE ]: functionZid\n\t\t\t\t\t\t}\n\t\t\t\t\t} };\n\t\t\t\t}\n\t\t\t},\n\t\t\tactions: {\n\t\t\t\tfetchZKeys: jest.fn(),\n\t\t\t\tremoveZObject: jest.fn(),\n\t\t\t\tremoveZObjectChildren: jest.fn(),\n\t\t\t\tinitializeResultId: () => Promise.resolve( resultId ),\n\t\t\t\tcallZFunction: () => Promise.resolve(),\n\t\t\t\tinjectZObject: () => Promise.resolve()\n\t\t\t}\n\t\t} );\n\n\t} );\n\tit( 'renders successfully', () => {\n\t\tvar wrapper = VueTestUtils.shallowMount( ZFunctionCall, { props: { zobjectId: zobjectId } } );\n\n\t\texpect( wrapper.find( '.ext-wikilambda-function-call-block' ).exists() ).toBe( true );\n\t} );\n\n\tit( 'shows results section when \"Call function\" button is clicked', async () => {\n\t\tvar wrapper = VueTestUtils.shallowMount( ZFunctionCall, { props: { zobjectId: zobjectId } } );\n\n\t\twrapper.get( '.ext-wikilambda-function-call-button' ).getComponent( CdxButton ).vm.$emit( 'click' );\n\t\t// The component takes 6 ticks to settle after calling function.\n\t\tawait wrapper.vm.$nextTick();\n\t\tawait wrapper.vm.$nextTick();\n\t\tawait wrapper.vm.$nextTick();\n\t\tawait wrapper.vm.$nextTick();\n\t\tawait wrapper.vm.$nextTick();\n\t\tawait wrapper.vm.$nextTick();\n\n\t\texpect( wrapper.find( '.ext-wikilambda-function-call-block' ).exists() ).toBe( true );\n\t\texpect( wrapper.find( '.ext-wikilambda-orchestrated-result' ).exists() ).toBe( true );\n\t} );\n\n\tit( 'hides results section when function is cleared following \"Call function\" button being clicked', async () => {\n\t\tvar wrapper = VueTestUtils.shallowMount( ZFunctionCall, { props: { zobjectId: zobjectId } } );\n\t\twrapper.get( '.ext-wikilambda-function-call-button' ).getComponent( CdxButton ).vm.$emit( 'click' );\n\t\t// The component takes 6 ticks to settle after calling function.\n\t\tawait wrapper.vm.$nextTick();\n\t\tawait wrapper.vm.$nextTick();\n\t\tawait wrapper.vm.$nextTick();\n\t\tawait wrapper.vm.$nextTick();\n\t\tawait wrapper.vm.$nextTick();\n\t\tawait wrapper.vm.$nextTick();\n\n\t\twrapper.get( '.ext-wikilambda-function-call-clear-function-button' ).getComponent( CdxButton )\n\t\t\t.vm.$emit( 'click' );\n\t\tawait wrapper.vm.$nextTick();\n\n\t\texpect( wrapper.find( '.ext-wikilambda-orchestrated-result' ).exists() ).toBe( false );\n\t} );\n} );\n","usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/tests/jest/components/ZImplementation.test.js","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/tests/jest/components/ZKeyModeSelector.test.js","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/tests/jest/components/ZObject.test.js","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/tests/jest/components/ZObjectJson.test.js","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/tests/jest/components/ZObjectKey.test.js","messages":[{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":47,"column":66,"nodeType":"FunctionExpression","messageId":"forbidden","endLine":67,"endColumn":3}],"suppressedMessages":[],"errorCount":1,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":"/*!\n * WikiLambda unit test suite for the ZObjectKey component.\n *\n * @copyright 2020– Abstract Wikipedia team; see AUTHORS.txt\n * @license MIT\n */\n'use strict';\n\nconst Constants = require( '../../../resources/ext.wikilambda.edit/Constants.js' ),\n\tcreateGettersWithFunctionsMock = require( '../helpers/getterHelpers.js' ).createGettersWithFunctionsMock,\n\tshallowMount = require( '@vue/test-utils' ).shallowMount,\n\tZObjectKey = require( '../../../resources/ext.wikilambda.edit/components/ZObjectKey.vue' ),\n\tZKeyModeSelector = require( '../../../resources/ext.wikilambda.edit/components/ZKeyModeSelector.vue' );\n\ndescribe( 'ZObjectKey', function () {\n\tvar getters,\n\t\tactions;\n\n\tbeforeEach( function () {\n\t\tgetters = {\n\t\t\tgetZObjectTypeById: createGettersWithFunctionsMock( Constants.Z_TYPE ),\n\t\t\tgetModeByType: createGettersWithFunctionsMock( Constants.Z_KEY_MODES.REFERENCE ),\n\t\t\tgetZkeyLiteralType: createGettersWithFunctionsMock(),\n\t\t\tgetListTypeById: createGettersWithFunctionsMock(),\n\t\t\tgetTypeByMode: createGettersWithFunctionsMock(),\n\t\t\tgetZkeyLabels: createGettersWithFunctionsMock(),\n\t\t\tgetCurrentZObjectId: createGettersWithFunctionsMock(),\n\t\t\tgetZObjectChildrenById: createGettersWithFunctionsMock()\n\t\t};\n\t\tactions = {\n\t\t\tfetchZKeys: jest.fn( function () {\n\t\t\t\treturn true;\n\t\t\t} ),\n\t\t\tchangeType: jest.fn()\n\t\t};\n\n\t\tglobal.store.hotUpdate( {\n\t\t\tgetters: getters,\n\t\t\tactions: actions\n\t\t} );\n\t} );\n\tit( 'renders without errors', function () {\n\t\tvar wrapper = shallowMount( ZObjectKey );\n\t\texpect( wrapper.find( 'div' ).exists() ).toBe( true );\n\t} );\n\n\tit( 'on mount, sets the literalType of the zKey, if available', async function () {\n\t\tconst mockGetTypeByMode = jest.fn();\n\t\tgetters.getZkeyLiteralType = createGettersWithFunctionsMock( Constants.Z_TYPE );\n\t\tgetters.getTypeByMode = () => mockGetTypeByMode;\n\n\t\tglobal.store.hotUpdate( {\n\t\t\tgetters: getters\n\t\t} );\n\n\t\tvar wrapper = shallowMount( ZObjectKey, {\n\t\t\tprops: {\n\t\t\t\tzKey: Constants.Z_KEY_TYPE\n\t\t\t}\n\t\t} );\n\n\t\twrapper.getComponent( ZKeyModeSelector ).vm.$emit( 'change', Constants.Z_KEY_MODES.REFERENCE );\n\n\t\texpect( mockGetTypeByMode.mock.calls )\n\t\t\t.toContainEqual( [ { selectedMode: Constants.Z_KEY_MODES.REFERENCE, literalType: Constants.Z_TYPE } ] );\n\t\texpect( actions.fetchZKeys ).toBeCalledTimes( 0 );\n\t} );\n\n\tit( 'on mount, if the literal type is unavailable it fetches the zKeys', function () {\n\t\tgetters.getZkeyLiteralType = createGettersWithFunctionsMock( undefined );\n\n\t\tglobal.store.hotUpdate( {\n\t\t\tgetters: getters\n\t\t} );\n\n\t\tshallowMount( ZObjectKey, {\n\t\t\tprops: {\n\t\t\t\tzKey: Constants.Z_KEY_TYPE\n\t\t\t}\n\t\t} );\n\n\t\texpect( actions.fetchZKeys ).toHaveBeenCalledWith( expect.anything(), { zids: [ Constants.Z_KEY ] } );\n\t} );\n} );\n","usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/tests/jest/components/ZObjectPublish.test.js","messages":[{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":63,"column":74,"nodeType":"FunctionExpression","messageId":"forbidden","endLine":72,"endColumn":3},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":74,"column":83,"nodeType":"FunctionExpression","messageId":"forbidden","endLine":90,"endColumn":3},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":92,"column":99,"nodeType":"FunctionExpression","messageId":"forbidden","endLine":110,"endColumn":3},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":112,"column":81,"nodeType":"FunctionExpression","messageId":"forbidden","endLine":129,"endColumn":3},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":131,"column":52,"nodeType":"FunctionExpression","messageId":"forbidden","endLine":160,"endColumn":3},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":162,"column":45,"nodeType":"FunctionExpression","messageId":"forbidden","endLine":191,"endColumn":3},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":193,"column":56,"nodeType":"FunctionExpression","messageId":"forbidden","endLine":216,"endColumn":3}],"suppressedMessages":[],"errorCount":7,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":"/*!\n * WikiLambda unit test suite for the z object publish component.\n *\n * @copyright 2020– Abstract Wikipedia team; see AUTHORS.txt\n * @license MIT\n */\n\n'use strict';\n\nconst configureCompat = require( 'vue' ).configureCompat,\n\tmount = require( '@vue/test-utils' ).mount,\n\tshallowMount = require( '@vue/test-utils' ).shallowMount,\n\tConstants = require( '../../../resources/ext.wikilambda.edit/Constants.js' ),\n\tPublishDialog = require( '../../../resources/ext.wikilambda.edit/components/base/PublishDialog.vue' ),\n\tZObjectPublish = require( '../../../resources/ext.wikilambda.edit/components/ZObjectPublish.vue' ),\n\t{ CdxTextInput } = require( '@wikimedia/codex' );\n\nconfigureCompat( { MODE: 3 } );\n\ndescribe( 'ZObjectPublish', function () {\n\tvar getters,\n\t\tactions,\n\t\tsubmitZObjectMock = jest.fn();\n\tbeforeEach( function () {\n\t\t// Needed because of the Teleported component.\n\t\tconst el = document.createElement( 'div' );\n\t\tel.id = 'ext-wikilambda-app';\n\t\tdocument.body.appendChild( el );\n\n\t\tgetters = {\n\t\t\tgetErrors: jest.fn( function () {\n\t\t\t\treturn {};\n\t\t\t} ),\n\t\t\tgetCurrentZObjectId: jest.fn( function () {\n\t\t\t\treturn 0;\n\t\t\t} ),\n\t\t\tgetCurrentZObjectType: jest.fn( function () {\n\t\t\t\treturn Constants.Z_FUNCTION;\n\t\t\t} )\n\t\t};\n\n\t\tactions = {\n\t\t\tsubmitZObject: submitZObjectMock,\n\t\t\tvalidateZObject: jest.fn( function () {\n\t\t\t\treturn true;\n\t\t\t} ),\n\t\t\tsetError: jest.fn()\n\t\t};\n\n\t\tglobal.store.hotUpdate( { getters: getters, actions: actions } );\n\t} );\n\n\tafterEach( () => {\n\t\tdocument.body.outerHTML = '';\n\t} );\n\n\tit( 'renders without errors', function () {\n\t\tvar wrapper = shallowMount( ZObjectPublish );\n\n\t\texpect( wrapper.find( 'div' ).exists() ).toBe( true );\n\t} );\n\n\tit( 'opens the publish dialog if validateZObject returns isValid true', async function () {\n\t\tvar wrapper = mount( ZObjectPublish );\n\t\tawait wrapper.find( '.ext-wikilambda-publish-zobject__publish-button' ).trigger( 'click' );\n\n\t\tconst publishDialog = wrapper.findComponent( PublishDialog );\n\n\t\texpect( publishDialog.vm.showDialog ).toBe( true );\n\t\tconst publishButton = wrapper.findComponent( '.ext-wikilambda-publishdialog__actions__button-publish' );\n\t\texpect( publishButton.exists() ).toBeTruthy();\n\t} );\n\n\tit( 'does not open the publish dialog if validateZObject returns isValid false', async function () {\n\t\tactions.validateZObject = jest.fn( function () {\n\t\t\treturn false;\n\t\t} );\n\n\t\tglobal.store.hotUpdate( {\n\t\t\tactions: actions\n\t\t} );\n\n\t\tvar wrapper = mount( ZObjectPublish );\n\t\tawait wrapper.find( '.ext-wikilambda-publish-zobject__publish-button' ).trigger( 'click' );\n\n\t\tconst publishDialog = wrapper.findComponent( PublishDialog );\n\t\texpect( publishDialog.vm.showDialog ).toBe( false );\n\t\tconst publishButton = wrapper.findComponent( '.ext-wikilambda-publishdialog__actions__button-publish' );\n\t\texpect( publishButton.exists() ).toBeFalsy();\n\t} );\n\n\tit( 'publish dialog triggers the \"publish\" event on button click and submits the input summary', async function () {\n\t\tvar wrapper = mount( ZObjectPublish );\n\n\t\t// ACT: open dialog\n\t\tawait wrapper.find( '.ext-wikilambda-publish-zobject__publish-button' ).trigger( 'click' );\n\t\tawait wrapper.vm.$nextTick();\n\n\t\t// ACT: enter summary\n\t\twrapper.getComponent( CdxTextInput ).get( 'input' ).setValue( 'my changes summary' );\n\n\t\tconst publishButton = wrapper.findComponent( '.ext-wikilambda-publishdialog__actions__button-publish' );\n\t\texpect( publishButton.exists() ).toBeTruthy();\n\n\t\twrapper.vm.$nextTick( function () {\n\t\t\t// ACT: click publish button.\n\t\t\tpublishButton.trigger( 'click' );\n\t\t\texpect( submitZObjectMock ).toHaveBeenCalledWith( expect.anything(), { shouldUnattachImplementationAndTester: false, summary: 'my changes summary' } );\n\t\t} );\n\t} );\n\n\tit( 'publish dialog triggers the \"close dialog\" event on cancel button click', async function () {\n\t\tvar wrapper = mount( ZObjectPublish );\n\n\t\t// ACT: open dialog\n\t\tawait wrapper.find( '.ext-wikilambda-publish-zobject__publish-button' ).trigger( 'click' );\n\t\tawait wrapper.vm.$nextTick();\n\n\t\tconst cancelButton = wrapper.findComponent( '.ext-wikilambda-publishdialog__actions__button-cancel' );\n\t\texpect( cancelButton.exists() ).toBeTruthy();\n\n\t\twrapper.vm.$nextTick( function () {\n\t\t\t// ACT: click cancel button.\n\t\t\tcancelButton.trigger( 'click' );\n\n\t\t\tconst publishDialog = wrapper.findComponent( PublishDialog );\n\t\t\texpect( publishDialog.emitted() ).toHaveProperty( 'close-dialog' );\n\t\t} );\n\t} );\n\n\tit( 'displays received errors in the dialog box', async function () {\n\t\tgetters.getErrors = jest.fn( function () {\n\t\t\treturn { 0: {\n\t\t\t\tstate: true,\n\t\t\t\tmessage: 'error to be displayed',\n\t\t\t\ttype: Constants.errorTypes.ERROR\n\t\t\t} };\n\t\t} );\n\n\t\tglobal.store.hotUpdate( {\n\t\t\tgetters: getters\n\t\t} );\n\n\t\tvar wrapper = mount( ZObjectPublish );\n\n\t\t// ACT: open dialog\n\t\tawait wrapper.find( '.ext-wikilambda-publish-zobject__publish-button' ).trigger( 'click' );\n\t\tawait wrapper.vm.$nextTick();\n\n\t\tconst dialog = wrapper.findComponent( { name: 'cdx-dialog' } );\n\n\t\tconst errors = dialog.find( '.ext-wikilambda-publishdialog__errors' );\n\t\texpect( errors.exists() ).toBeTruthy();\n\n\t\tconst errorMessage = dialog.find( '.ext-wikilambda-publishdialog__errors__message' );\n\t\texpect( errorMessage.text() ).toBe( 'error to be displayed' );\n\n\t\tconst warnings = dialog.findComponent( '.ext-wikilambda-publishdialog__warnings' );\n\t\texpect( warnings.exists() ).toBeFalsy();\n\t} );\n\n\tit( 'displays warnings in the dialog box', async function () {\n\t\tgetters.getErrors = jest.fn( function () {\n\t\t\treturn { 0: {\n\t\t\t\tstate: true,\n\t\t\t\tmessage: 'warning to be displayed',\n\t\t\t\ttype: Constants.errorTypes.WARNING\n\t\t\t} };\n\t\t} );\n\n\t\tglobal.store.hotUpdate( {\n\t\t\tgetters: getters\n\t\t} );\n\n\t\tvar wrapper = mount( ZObjectPublish );\n\n\t\t// ACT: open dialog\n\t\tawait wrapper.find( '.ext-wikilambda-publish-zobject__publish-button' ).trigger( 'click' );\n\t\tawait wrapper.vm.$nextTick();\n\n\t\tconst dialog = wrapper.findComponent( { name: 'cdx-dialog' } );\n\n\t\tconst warnings = dialog.find( '.ext-wikilambda-publishdialog__warnings' );\n\t\texpect( warnings.exists() ).toBeTruthy();\n\n\t\tconst warningMessage = dialog.find( '.ext-wikilambda-publishdialog__warnings__message' );\n\t\texpect( warningMessage.text() ).toBe( 'warning to be displayed' );\n\n\t\tconst errors = dialog.find( '.ext-wikilambda-publishdialog__errors' );\n\t\texpect( errors.exists() ).toBeFalsy();\n\t} );\n\n\tit( 'sets errors returned from the API to the store', async function () {\n\t\tconst mockErrorFromApi = { error: { message: 'error message from the api' } };\n\t\tconst mockSetError = jest.fn();\n\t\tactions.setError = mockSetError;\n\t\tactions.submitZObject = jest.fn().mockRejectedValue( mockErrorFromApi );\n\n\t\tglobal.store.hotUpdate( {\n\t\t\tactions: actions\n\t\t} );\n\n\t\tvar wrapper = mount( ZObjectPublish );\n\n\t\t// ACT: open dialog\n\t\tawait wrapper.find( '.ext-wikilambda-publish-zobject__publish-button' ).trigger( 'click' );\n\t\tawait wrapper.vm.$nextTick();\n\n\t\tconst publishButton = wrapper.findComponent( '.ext-wikilambda-publishdialog__actions__button-publish' );\n\n\t\t// ACT: click publish button\n\t\tawait publishButton.trigger( 'click' );\n\t\tawait wrapper.vm.$nextTick();\n\n\t\texpect( mockSetError ).toHaveBeenCalledWith( expect.anything(), { errorMessage: 'error message from the api', errorState: true, errorType: Constants.errorTypes.ERROR, internalId: 0 } );\n\t} );\n} );\n","usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/tests/jest/components/ZObjectSelector.test.js","messages":[],"suppressedMessages":[{"ruleId":"no-unused-vars","severity":2,"message":"'context' is defined but never used.","line":48,"column":36,"nodeType":"Identifier","messageId":"unusedVar","endLine":48,"endColumn":43,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-vars","severity":2,"message":"'payload' is defined but never used.","line":48,"column":45,"nodeType":"Identifier","messageId":"unusedVar","endLine":48,"endColumn":52,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-vars","severity":2,"message":"'context' is defined but never used.","line":53,"column":34,"nodeType":"Identifier","messageId":"unusedVar","endLine":53,"endColumn":41,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-vars","severity":2,"message":"'payload' is defined but never used.","line":53,"column":43,"nodeType":"Identifier","messageId":"unusedVar","endLine":53,"endColumn":50,"suppressions":[{"kind":"directive","justification":""}]}],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/tests/jest/components/ZResponseEnvelope.test.js","messages":[{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":79,"column":73,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":88,"endColumn":4}],"suppressedMessages":[],"errorCount":1,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":"/*!\n * WikiLambda unit test suite for the ZResponseEnvelope component and related files.\n *\n * @copyright 2020– Abstract Wikipedia team; see AUTHORS.txt\n * @license MIT\n */\n'use strict';\n\nvar VueTestUtils = require( '@vue/test-utils' ),\n\tZResponseEnvelope = require( '../../../resources/ext.wikilambda.edit/components/main-types/ZResponseEnvelope.vue' ),\n\tZObjectKey = require( '../../../resources/ext.wikilambda.edit/components/ZObjectKey.vue' );\nconst { CdxButton } = require( '@wikimedia/codex' );\nconst Constants = require( '../../../resources/ext.wikilambda.edit/Constants.js' );\n\nconst zobjectId = 0;\nconst metadataId = 1;\nconst listOfPairsId = 2;\nconst pairId = 3;\nconst errorsId = 4;\n\ndescribe( 'ZResponseEnvelope', () => {\n\tvar containsError;\n\tbeforeEach( () => {\n\t\tglobal.store.hotUpdate( {\n\t\t\tgetters: {\n\t\t\t\tgetNestedZObjectById: () => ( id, keys ) => {\n\t\t\t\t\tif ( id === metadataId ) {\n\t\t\t\t\t\tif ( keys.length === 2 &&\n\t\t\t\t\t\t\tkeys[ 0 ] === Constants.Z_OBJECT_TYPE &&\n\t\t\t\t\t\t\tkeys[ 1 ] === Constants.Z_REFERENCE_ID ) {\n\t\t\t\t\t\t\treturn {};\n\t\t\t\t\t\t} else if ( keys.length === 1 && keys[ 0 ] === Constants.Z_TYPED_OBJECT_ELEMENT_1 ) {\n\t\t\t\t\t\t\treturn { id: listOfPairsId };\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if ( id === pairId ) {\n\t\t\t\t\t\tif ( keys.length === 2 &&\n\t\t\t\t\t\t\tkeys[ 0 ] === Constants.Z_TYPED_OBJECT_ELEMENT_1 &&\n\t\t\t\t\t\t\tkeys[ 1 ] === Constants.Z_STRING_VALUE ) {\n\t\t\t\t\t\t\treturn { value: containsError ? 'errors' : '' };\n\t\t\t\t\t\t} else if ( keys.length === 1 &&\n\t\t\t\t\t\t\t\t\tkeys[ 0 ] === Constants.Z_TYPED_OBJECT_ELEMENT_2 ) {\n\t\t\t\t\t\t\treturn { id: errorsId };\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tgetZObjectChildrenById: () => ( id ) => {\n\t\t\t\t\tif ( id === zobjectId ) {\n\t\t\t\t\t\treturn [ { key: Constants.Z_RESPONSEENVELOPE_METADATA, id: metadataId } ];\n\t\t\t\t\t} else if ( id === listOfPairsId ) {\n\t\t\t\t\t\treturn [ { id: pairId } ];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\n\t} );\n\tit( 'renders successfully', () => {\n\t\tvar wrapper = VueTestUtils.shallowMount( ZResponseEnvelope, { props: { zobjectId: zobjectId } } );\n\n\t\texpect( wrapper.find( '.ext-wikilambda-zresponseenvelope' ).exists() ).toBe( true );\n\t} );\n\tdescribe( 'error section', () => {\n\t\tit( 'does not show error or \"hide error\"/\"show error\" button when there is no error', () => {\n\t\t\tcontainsError = false;\n\t\t\tvar wrapper = VueTestUtils.shallowMount( ZResponseEnvelope, { props: { zobjectId: zobjectId } } );\n\n\t\t\texpect( wrapper.find( '.ext-wikilambda-zresponseenvelope__show-error' ).exists() ).toBe( false );\n\t\t\texpect( wrapper.find( '.ext-wikilambda-zresponseenvelope__error' ).exists() ).toBe( false );\n\t\t} );\n\t\tit( 'shows error and \"hide error\"/\"show error\" button when there is error', () => {\n\t\t\tcontainsError = true;\n\t\t\tvar wrapper = VueTestUtils.shallowMount( ZResponseEnvelope, { props: { zobjectId: zobjectId } } );\n\n\t\t\texpect( wrapper.find( '.ext-wikilambda-zresponseenvelope__show-error' ).exists() ).toBe( true );\n\t\t\texpect( wrapper.find( '.ext-wikilambda-zresponseenvelope__error' ).exists() ).toBe( true );\n\t\t\texpect( wrapper.get( '.ext-wikilambda-zresponseenvelope__error' ).getComponent( ZObjectKey )\n\t\t\t\t.props( 'zobjectId' ) ).toEqual( errorsId );\n\t\t} );\n\t\tit( 'hides error when there is an error and user has clicked button', async () => {\n\t\t\tcontainsError = true;\n\t\t\tvar wrapper = VueTestUtils.shallowMount( ZResponseEnvelope, { props: { zobjectId: zobjectId } } );\n\n\t\t\twrapper.get( '.ext-wikilambda-zresponseenvelope__show-error' ).getComponent( CdxButton )\n\t\t\t\t.vm.$emit( 'click', { preventDefault: () => {} } );\n\t\t\tawait wrapper.vm.$nextTick();\n\n\t\t\texpect( wrapper.find( '.ext-wikilambda-zresponseenvelope__error' ).exists() ).toBe( false );\n\t\t} );\n\t} );\n\n} );\n","usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/tests/jest/components/default/ZBoolean.test.js","messages":[{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":71,"column":50,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":82,"endColumn":4}],"suppressedMessages":[],"errorCount":1,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":"/*!\n * WikiLambda unit test suite for the default ZString component.\n *\n * @copyright 2020– Abstract Wikipedia team; see AUTHORS.txt\n * @license MIT\n */\n'use strict';\n\nconst { CdxRadio } = require( '@wikimedia/codex' );\nvar shallowMount = require( '@vue/test-utils' ).shallowMount,\n\tcreateGettersWithFunctionsMock = require( '../../helpers/getterHelpers.js' ).createGettersWithFunctionsMock,\n\tConstants = require( '../../../../resources/ext.wikilambda.edit/Constants.js' ),\n\tZBoolean = require( '../../../../resources/ext.wikilambda.edit/components/default-view-types/ZBoolean.vue' );\n\ndescribe( 'ZBoolean', () => {\n\tvar getters;\n\tbeforeEach( () => {\n\t\tgetters = {\n\t\t\tgetZBooleanValue: createGettersWithFunctionsMock( 14 ),\n\t\t\tgetLabel: createGettersWithFunctionsMock( 'false' ),\n\t\t\tgetZkeyLabels: createGettersWithFunctionsMock()\n\t\t};\n\t\tglobal.store.hotUpdate( {\n\t\t\tgetters: getters\n\t\t} );\n\t} );\n\tdescribe( 'in view mode', () => {\n\t\tit( 'renders without errors', () => {\n\t\t\tvar wrapper = shallowMount( ZBoolean, {\n\t\t\t\tprops: {\n\t\t\t\t\tedit: false\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\texpect( wrapper.find( 'div' ).exists() ).toBe( true );\n\t\t} );\n\n\t\tit( 'does not load the radio codex component', () => {\n\t\t\tvar wrapper = shallowMount( ZBoolean, {\n\t\t\t\tprops: {\n\t\t\t\t\tedit: false\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\texpect( wrapper.findComponent( { name: 'cdx-radio' } ).exists() ).toBe( false );\n\t\t} );\n\n\t\tit( 'displays the boolean value label', () => {\n\t\t\tvar wrapper = shallowMount( ZBoolean, {\n\t\t\t\tprops: {\n\t\t\t\t\tedit: false\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\texpect( wrapper.find( '.ext-wikilambda-edit-link' ).exists() ).toBe( true );\n\t\t\texpect( wrapper.find( '.ext-wikilambda-edit-link' ).text() ).toBe( 'false' );\n\t\t} );\n\t} );\n\n\tdescribe( 'in edit mode', () => {\n\t\tit( 'loads the radio codex component', () => {\n\t\t\tvar wrapper = shallowMount( ZBoolean, {\n\t\t\t\tprops: {\n\t\t\t\t\tedit: true\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\texpect( wrapper.findComponent( CdxRadio ).exists() ).toBe( true );\n\t\t} );\n\n\t\tit( 'changes the boolean value when selected', async () => {\n\t\t\tvar wrapper = shallowMount( ZBoolean, {\n\t\t\t\tprops: {\n\t\t\t\t\tedit: true\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\texpect( wrapper.getComponent( CdxRadio ).exists() ).toBeTruthy();\n\t\t\tawait wrapper.getComponent( CdxRadio ).vm.$emit( 'input', 'Z41' );\n\t\t\texpect( wrapper.emitted() ).toHaveProperty( 'set-value', [ [ { keyPath: [ Constants.Z_BOOLEAN_IDENTITY, Constants.Z_REFERENCE_ID ], value: 'Z41' } ] ] );\n\n\t\t} );\n\t} );\n} );\n","usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/tests/jest/components/default/ZCode.test.js","messages":[{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":79,"column":41,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":88,"endColumn":4}],"suppressedMessages":[{"ruleId":"no-unused-vars","severity":2,"message":"'context' is defined but never used.","line":29,"column":34,"nodeType":"Identifier","messageId":"unusedVar","endLine":29,"endColumn":41,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-vars","severity":2,"message":"'payload' is defined but never used.","line":29,"column":43,"nodeType":"Identifier","messageId":"unusedVar","endLine":29,"endColumn":50,"suppressions":[{"kind":"directive","justification":""}]}],"errorCount":1,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":"/*!\n * WikiLambda unit test suite for the default ZString component.\n *\n * @copyright 2020– Abstract Wikipedia team; see AUTHORS.txt\n * @license MIT\n */\n'use strict';\n\nvar shallowMount = require( '@vue/test-utils' ).shallowMount,\n\tcreateGettersWithFunctionsMock = require( '../../helpers/getterHelpers.js' ).createGettersWithFunctionsMock,\n\tZCode = require( '../../../../resources/ext.wikilambda.edit/components/default-view-types/ZCode.vue' ),\n\tCodeEditor = require( '../../../../resources/ext.wikilambda.edit/components/base/CodeEditor.vue' );\n\ndescribe( 'ZCode', () => {\n\tvar getters,\n\t\tactions;\n\tbeforeEach( () => {\n\t\tgetters = {\n\t\t\tgetAllProgrammingLangs: createGettersWithFunctionsMock(),\n\t\t\tgetZCodeLanguage: createGettersWithFunctionsMock( { id: 5 } ),\n\t\t\tgetZCode: createGettersWithFunctionsMock( { id: 10 } ),\n\t\t\tgetZStringTerminalValue: createGettersWithFunctionsMock(),\n\t\t\tgetZCodeFunction: createGettersWithFunctionsMock(),\n\t\t\tgetZarguments: createGettersWithFunctionsMock()\n\t\t};\n\t\tactions = {\n\t\t\tfetchAllZProgrammingLanguages: createGettersWithFunctionsMock(),\n\t\t\t// eslint-disable-next-line no-unused-vars\n\t\t\tsetError: jest.fn( function ( context, payload ) {\n\t\t\t\treturn true;\n\t\t\t} )\n\t\t};\n\t\tglobal.store.hotUpdate( {\n\t\t\tgetters: getters,\n\t\t\tactions: actions\n\t\t} );\n\t} );\n\tdescribe( 'in view mode', () => {\n\t\tit( 'renders without errors', () => {\n\t\t\tvar wrapper = shallowMount( ZCode, {\n\t\t\t\tprops: {\n\t\t\t\t\tedit: false\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\texpect( wrapper.find( 'div' ).exists() ).toBe( true );\n\t\t} );\n\n\t\tit( 'displays the ace editor', () => {\n\t\t\tvar wrapper = shallowMount( ZCode, {\n\t\t\t\tprops: {\n\t\t\t\t\tedit: false\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\texpect( wrapper.find( '.ext-wikilambda-zcode__code-editor' ).exists() ).toBe( true );\n\t\t} );\n\n\t\tit( 'editor is in read only mode', () => {\n\t\t\tvar wrapper = shallowMount( ZCode, {\n\t\t\t\tprops: {\n\t\t\t\t\tedit: false\n\t\t\t\t}\n\t\t\t} );\n\t\t\texpect( wrapper.findComponent( { name: 'code-editor' } ).props( 'readOnly' ) ).toBe( true );\n\t\t} );\n\t} );\n\tdescribe( 'in edit mode', () => {\n\t\tit( 'enables programming language selector and code editor when not in read-only or view mode', () => {\n\t\t\tvar wrapper = shallowMount( ZCode, {\n\t\t\t\tprops: {\n\t\t\t\t\tedit: true\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\texpect( wrapper.findComponent( '.ext-wikilambda-zcode__language-selector' ).exists() ).toBe( true );\n\t\t\texpect( wrapper.findComponent( { name: 'code-editor' } ).props( 'readOnly' ) ).toBe( false );\n\t\t} );\n\t\tit( 'updates code for valid strings', async () => {\n\t\t\tvar wrapper = shallowMount( ZCode, {\n\t\t\t\tprops: {\n\t\t\t\t\tedit: true\n\t\t\t\t}\n\t\t\t} );\n\t\t\twrapper.getComponent( CodeEditor ).vm.$emit( 'change', 'def() {}' );\n\t\t\tawait wrapper.vm.$nextTick();\n\t\t\texpect( wrapper.emitted( 'set-value' ) ).toBeTruthy();\n\t\t} );\n\t} );\n} );\n","usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/tests/jest/components/default/ZMonolingualString.test.js","messages":[{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":85,"column":62,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":96,"endColumn":4}],"suppressedMessages":[],"errorCount":1,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":"/*!\n * WikiLambda unit test suite for the default ZString component.\n *\n * @copyright 2020– Abstract Wikipedia team; see AUTHORS.txt\n * @license MIT\n */\n'use strict';\n\nvar shallowMount = require( '@vue/test-utils' ).shallowMount,\n\tmount = require( '@vue/test-utils' ).mount,\n\tcreateGettersWithFunctionsMock = require( '../../helpers/getterHelpers.js' ).createGettersWithFunctionsMock,\n\tZMonolingualString = require( '../../../../resources/ext.wikilambda.edit/components/default-view-types/ZMonolingualString.vue' ),\n\tTextInput = require( '../../../../resources/ext.wikilambda.edit/components/base/TextInput.vue' ),\n\tConstants = require( '../../../../resources/ext.wikilambda.edit/Constants.js' );\n\ndescribe( 'ZMonolingualString', () => {\n\tvar getters;\n\tbeforeEach( () => {\n\t\tgetters = {\n\t\t\tgetLabel: createGettersWithFunctionsMock( { label: 'English', lang: 'Z1002', zid: 'Z1002' } ),\n\t\t\tgetLanguageIsoCodeOfZLang: createGettersWithFunctionsMock( 'EN' ),\n\t\t\tgetZMonolingualTextValue: createGettersWithFunctionsMock( 'my label' ),\n\t\t\tgetZMonolingualLangValue: createGettersWithFunctionsMock( 'Z10002' )\n\t\t};\n\t\tglobal.store.hotUpdate( {\n\t\t\tgetters: getters\n\t\t} );\n\t} );\n\n\tdescribe( 'in view mode', () => {\n\t\tit( 'renders without errors', () => {\n\t\t\tvar wrapper = shallowMount( ZMonolingualString, {\n\t\t\t\tprops: {\n\t\t\t\t\tedit: false\n\t\t\t\t}\n\t\t\t} );\n\t\t\texpect( wrapper.find( 'div' ).exists() ).toBe( true );\n\t\t} );\n\n\t\tit( 'displays a language chip', () => {\n\t\t\tvar wrapper = shallowMount( ZMonolingualString, {\n\t\t\t\tprops: {\n\t\t\t\t\tedit: false\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\texpect( wrapper.find( '.ext-wikilambda-lang-chip' ).exists() ).toBeTruthy();\n\n\t\t\texpect( wrapper.find( '.ext-wikilambda-lang-chip' ).text() ).toBe( 'EN' );\n\t\t} );\n\n\t\tit( 'displays the label value for the language', () => {\n\t\t\tvar wrapper = shallowMount( ZMonolingualString, {\n\t\t\t\tprops: {\n\t\t\t\t\tedit: false\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\texpect( wrapper.find( 'p' ).text() ).toContain( 'my label' );\n\t\t} );\n\t} );\n\n\tdescribe( 'in edit mode', () => {\n\t\tit( 'renders without errors', () => {\n\t\t\tvar wrapper = shallowMount( ZMonolingualString, {\n\t\t\t\tprops: {\n\t\t\t\t\tedit: true\n\t\t\t\t}\n\t\t\t} );\n\t\t\texpect( wrapper.find( 'div' ).exists() ).toBe( true );\n\t\t} );\n\n\t\tit( 'displays a language chip', () => {\n\t\t\tvar wrapper = shallowMount( ZMonolingualString, {\n\t\t\t\tprops: {\n\t\t\t\t\tedit: false\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\texpect( wrapper.find( '.ext-wikilambda-lang-chip' ).exists() ).toBeTruthy();\n\n\t\t\texpect( wrapper.find( '.ext-wikilambda-lang-chip' ).text() ).toBe( 'EN' );\n\t\t} );\n\n\t\tit( 'its label value can be edited and the value emitted', async () => {\n\t\t\tvar wrapper = shallowMount( ZMonolingualString, {\n\t\t\t\tprops: {\n\t\t\t\t\tedit: true\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\tawait wrapper.getComponent( TextInput ).vm.$emit( 'input', 'my new label' );\n\n\t\t\texpect( wrapper.emitted() ).toHaveProperty( 'set-value', [ [ { keyPath: [ Constants.Z_MONOLINGUALSTRING_VALUE,\n\t\t\t\tConstants.Z_STRING_VALUE ], value: 'my new label' } ] ] );\n\t\t} );\n\n\t\tit( 'displays a two-character chip', () => {\n\t\t\tvar wrapper = mount( ZMonolingualString, {\n\t\t\t\tprops: {\n\t\t\t\t\tedit: true\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\texpect( wrapper.find( '.ext-wikilambda-edit-text-input__chipped' ).exists() ).toBe( true );\n\t\t\texpect( wrapper.find( '.ext-wikilambda-edit-text-input__chipped__sm' ).exists() ).toBe( true );\n\t\t\texpect( wrapper.find( '.ext-wikilambda-edit-text-input__chipped__lg' ).exists() ).toBe( false );\n\t\t} );\n\n\t\tit( 'displays a three-character chip', () => {\n\t\t\tgetters.getLanguageIsoCodeOfZLang = createGettersWithFunctionsMock( 'ABC' );\n\t\t\tglobal.store.hotUpdate( {\n\t\t\t\tgetters: getters\n\t\t\t} );\n\n\t\t\tvar wrapper = mount( ZMonolingualString, {\n\t\t\t\tprops: {\n\t\t\t\t\tedit: true\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\texpect( wrapper.find( '.ext-wikilambda-edit-text-input__chipped' ).exists() ).toBe( true );\n\t\t\texpect( wrapper.find( '.ext-wikilambda-edit-text-input__chipped__sm' ).exists() ).toBe( false );\n\t\t\texpect( wrapper.find( '.ext-wikilambda-edit-text-input__chipped__lg' ).exists() ).toBe( true );\n\t\t} );\n\t} );\n} );\n","usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/tests/jest/components/default/ZObjectKeyValue.test.js","messages":[{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":291,"column":73,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":307,"endColumn":4},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":477,"column":48,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":501,"endColumn":4},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":508,"column":47,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":534,"endColumn":4},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":536,"column":69,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":553,"endColumn":4}],"suppressedMessages":[],"errorCount":4,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":"/*!\n * WikiLambda unit test suite for the default ZObjectKeyValue component.\n *\n * @copyright 2020– Abstract Wikipedia team; see AUTHORS.txt\n * @license MIT\n */\n'use strict';\n\nvar shallowMount = require( '@vue/test-utils' ).shallowMount,\n\tmount = require( '@vue/test-utils' ).mount,\n\tcreateGettersWithFunctionsMock = require( '../../helpers/getterHelpers.js' ).createGettersWithFunctionsMock,\n\tConstants = require( '../../../../resources/ext.wikilambda.edit/Constants.js' ),\n\tExpandedToggle = require( '../../../../resources/ext.wikilambda.edit/components/base/ExpandedToggle.vue' ),\n\tTextInput = require( '../../../../resources/ext.wikilambda.edit/components/base/TextInput.vue' ),\n\tZObjectKeyValue = require( '../../../../resources/ext.wikilambda.edit/components/default-view-types/ZObjectKeyValue.vue' ),\n\tZMonolingualString = require( '../../../../resources/ext.wikilambda.edit/components/default-view-types/ZMonolingualString.vue' ),\n\tZString = require( '../../../../resources/ext.wikilambda.edit/components/default-view-types/ZString.vue' ),\n\tZReference = require( '../../../../resources/ext.wikilambda.edit/components/default-view-types/ZReference.vue' ),\n\tZObjectType = require( '../../../../resources/ext.wikilambda.edit/components/default-view-types/ZObjectType.vue' ),\n\tZObjectKeyValueSet = require( '../../../../resources/ext.wikilambda.edit/components/default-view-types/ZObjectKeyValueSet.vue' ),\n\tZCode = require( '../../../../resources/ext.wikilambda.edit/components/default-view-types/ZCode.vue' ),\n\tZBoolean = require( '../../../../resources/ext.wikilambda.edit/components/default-view-types/ZBoolean.vue' ),\n\tZTypedList = require( '../../../../resources/ext.wikilambda.edit/components/default-view-types/ZTypedList.vue' ),\n\tWlSelect = require( '../../../../resources/ext.wikilambda.edit/components/base/Select.vue' );\n\nconst parentRowId = 1;\nconst rowId = 2;\nconst keyId = 3;\n\nfunction createFunctionsMockForId( expectedId, value ) {\n\treturn () => ( id ) => {\n\t\tif ( id === expectedId ) {\n\t\t\treturn value;\n\t\t} else if ( id === parentRowId ) {\n\t\t\treturn Constants.Z_REFERENCE_ID;\n\t\t} else {\n\t\t\tthrow new Error( `Id ${id} not supported` );\n\t\t}\n\t};\n}\n\ndescribe( 'ZObjectKeyValue', () => {\n\tvar getters,\n\t\tactions;\n\tbeforeEach( () => {\n\t\tgetters = {\n\t\t\tgetLabelData: createGettersWithFunctionsMock( { zid: Constants.Z_PERSISTENTOBJECT_ID, label: 'id', lang: Constants.Z_NATURAL_LANGUAGE_ENGLISH } ),\n\t\t\tgetZReferenceTerminalValue: jest.fn(),\n\t\t\tgetZObjectKeyByRowId: createGettersWithFunctionsMock( keyId ),\n\t\t\tgetExpectedTypeOfKey: createGettersWithFunctionsMock(),\n\t\t\tgetDepthByRowId: () => ( id ) => {\n\t\t\t\tif ( id === rowId ) {\n\t\t\t\t\treturn 1;\n\t\t\t\t} else {\n\t\t\t\t\tthrow new Error( `rowId ${id} not supported` );\n\t\t\t\t}\n\t\t\t},\n\t\t\tgetParentRowId: () => ( id ) => {\n\t\t\t\tif ( id === rowId ) {\n\t\t\t\t\treturn parentRowId;\n\t\t\t\t} else {\n\t\t\t\t\tthrow new Error( `rowId ${id} not supported` );\n\t\t\t\t}\n\t\t\t},\n\t\t\tgetZObjectValueByRowId: createGettersWithFunctionsMock(),\n\t\t\tgetZObjectTypeByRowId: createGettersWithFunctionsMock( Constants.Z_STRING ),\n\t\t\tgetZStringTerminalValue: createGettersWithFunctionsMock( 'string terminal value' ),\n\t\t\tgetLabel: createGettersWithFunctionsMock( 'Function call' ),\n\t\t\tgetLanguageIsoCodeOfZLang: createGettersWithFunctionsMock( 'EN' ),\n\t\t\tgetUserZlangZID: createGettersWithFunctionsMock( 'Z1002' )\n\t\t};\n\t\tactions = {\n\t\t\tsetValueByRowIdAndPath: jest.fn(),\n\t\t\tchangeType: jest.fn()\n\t\t};\n\t\tglobal.store.hotUpdate( {\n\t\t\tactions: actions\n\t\t} );\n\n\t} );\n\n\tdescribe( 'it renders the correct component type for', () => {\n\t\tit( 'z monolingual string', () => {\n\t\t\tgetters.getZObjectTypeByRowId = createFunctionsMockForId( rowId, Constants.Z_MONOLINGUALSTRING );\n\n\t\t\tglobal.store.hotUpdate( {\n\t\t\t\tgetters: getters\n\t\t\t} );\n\n\t\t\tvar wrapper = shallowMount( ZObjectKeyValue, {\n\t\t\t\tprops: {\n\t\t\t\t\trowId: rowId\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\texpect( wrapper.findComponent( ZMonolingualString ).exists() ).toBe( true );\n\t\t} );\n\n\t\tit( 'z reference', () => {\n\t\t\tgetters.getZObjectTypeByRowId = createFunctionsMockForId( rowId, Constants.Z_REFERENCE );\n\n\t\t\tglobal.store.hotUpdate( {\n\t\t\t\tgetters: getters\n\t\t\t} );\n\n\t\t\tvar wrapper = shallowMount( ZObjectKeyValue, {\n\t\t\t\tprops: {\n\t\t\t\t\trowId: rowId\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\texpect( wrapper.findComponent( ZReference ).exists() ).toBe( true );\n\t\t} );\n\n\t\tit( 'z string', () => {\n\t\t\tgetters.getZObjectTypeByRowId = createFunctionsMockForId( rowId, Constants.Z_STRING );\n\n\t\t\tglobal.store.hotUpdate( {\n\t\t\t\tgetters: getters\n\t\t\t} );\n\n\t\t\tvar wrapper = shallowMount( ZObjectKeyValue, {\n\t\t\t\tprops: {\n\t\t\t\t\trowId: rowId\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\texpect( wrapper.findComponent( ZString ).exists() ).toBe( true );\n\t\t} );\n\n\t\tit( 'z code', () => {\n\t\t\tgetters.getZObjectTypeByRowId = createFunctionsMockForId( rowId, Constants.Z_CODE );\n\n\t\t\tglobal.store.hotUpdate( {\n\t\t\t\tgetters: getters\n\t\t\t} );\n\n\t\t\tvar wrapper = shallowMount( ZObjectKeyValue, {\n\t\t\t\tprops: {\n\t\t\t\t\trowId: rowId\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\texpect( wrapper.findComponent( ZCode ).exists() ).toBe( true );\n\t\t} );\n\n\t\tit( 'z boolean', () => {\n\t\t\tgetters.getZObjectTypeByRowId = createFunctionsMockForId( rowId, Constants.Z_BOOLEAN );\n\n\t\t\tglobal.store.hotUpdate( {\n\t\t\t\tgetters: getters\n\t\t\t} );\n\n\t\t\tvar wrapper = shallowMount( ZObjectKeyValue, {\n\t\t\t\tprops: {\n\t\t\t\t\trowId: rowId\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\texpect( wrapper.findComponent( ZBoolean ).exists() ).toBe( true );\n\t\t} );\n\n\t\tit( 'z typed list', () => {\n\t\t\tgetters.getZObjectTypeByRowId = createFunctionsMockForId( rowId, Constants.Z_TYPED_LIST );\n\n\t\t\tglobal.store.hotUpdate( {\n\t\t\t\tgetters: getters\n\t\t\t} );\n\n\t\t\tvar wrapper = shallowMount( ZObjectKeyValue, {\n\t\t\t\tprops: {\n\t\t\t\t\trowId: rowId\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\texpect( wrapper.findComponent( ZTypedList ).exists() ).toBe( true );\n\t\t} );\n\n\t\tit( 'z object type', () => {\n\t\t\tgetters.getZObjectKeyByRowId = createFunctionsMockForId( rowId, Constants.Z_OBJECT_TYPE );\n\n\t\t\tglobal.store.hotUpdate( {\n\t\t\t\tgetters: getters\n\t\t\t} );\n\n\t\t\tvar wrapper = shallowMount( ZObjectKeyValue, {\n\t\t\t\tprops: {\n\t\t\t\t\trowId: rowId\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\texpect( wrapper.findComponent( ZObjectType ).exists() ).toBe( true );\n\t\t} );\n\n\t\tit( 'fallback z-object-key-value-set', () => {\n\t\t\tgetters.getZObjectTypeByRowId = createFunctionsMockForId( rowId, null );\n\n\t\t\tglobal.store.hotUpdate( {\n\t\t\t\tgetters: getters\n\t\t\t} );\n\n\t\t\tvar wrapper = shallowMount( ZObjectKeyValue, {\n\t\t\t\tprops: {\n\t\t\t\t\trowId: rowId\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\texpect( wrapper.findComponent( ZObjectKeyValueSet ).exists() ).toBe( true );\n\t\t} );\n\t} );\n\n\tdescribe( 'in edit mode', () => {\n\t\tit( 'it renders without errors', () => {\n\t\t\tvar wrapper = shallowMount( ZObjectKeyValue, {\n\t\t\t\tprops: {\n\t\t\t\t\tedit: true,\n\t\t\t\t\trowId: rowId\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\texpect( wrapper.find( 'div' ).exists() ).toBe( true );\n\t\t} );\n\n\t\tit( 'it shows expansion toggle if it is not a special terminal case', () => {\n\t\t\tgetters.getZObjectKeyByRowId = createFunctionsMockForId( rowId, Constants.Z_KEY_TYPE );\n\t\t\tgetters.getExpectedTypeOfKey = createFunctionsMockForId( Constants.Z_KEY_TYPE, Constants.Z_TYPE );\n\n\t\t\tglobal.store.hotUpdate( {\n\t\t\t\tgetters: getters\n\t\t\t} );\n\n\t\t\tvar wrapper = shallowMount( ZObjectKeyValue, {\n\t\t\t\tprops: {\n\t\t\t\t\tedit: true,\n\t\t\t\t\trowId: rowId\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\texpect( wrapper.findComponent( ExpandedToggle ).exists() ).toBe( true );\n\t\t} );\n\n\t\tdescribe( 'does not show expansion toggle if the key is a terminal', () => {\n\t\t\tit( 'Z6K1, string value', () => {\n\t\t\t\tgetters.getZObjectKeyByRowId = createFunctionsMockForId( rowId, Constants.Z_STRING_VALUE );\n\n\t\t\t\tglobal.store.hotUpdate( {\n\t\t\t\t\tgetters: getters\n\t\t\t\t} );\n\n\t\t\t\tvar wrapper = shallowMount( ZObjectKeyValue, {\n\t\t\t\t\tprops: {\n\t\t\t\t\t\tedit: true,\n\t\t\t\t\t\trowId: rowId\n\t\t\t\t\t}\n\t\t\t\t} );\n\n\t\t\t\texpect( wrapper.findComponent( ExpandedToggle ).exists() ).toBe( false );\n\t\t\t} );\n\n\t\t\tit( 'Z9K1, reference', () => {\n\t\t\t\tgetters.getZObjectKeyByRowId = createFunctionsMockForId( rowId, Constants.Z_REFERENCE_ID );\n\n\t\t\t\tglobal.store.hotUpdate( {\n\t\t\t\t\tgetters: getters\n\t\t\t\t} );\n\n\t\t\t\tvar wrapper = shallowMount( ZObjectKeyValue, {\n\t\t\t\t\tprops: {\n\t\t\t\t\t\tedit: true,\n\t\t\t\t\t\trowId: rowId\n\t\t\t\t\t}\n\t\t\t\t} );\n\n\t\t\t\texpect( wrapper.findComponent( ExpandedToggle ).exists() ).toBe( false );\n\t\t\t} );\n\t\t} );\n\t} );\n\n\tdescribe( 'in view mode', () => {\n\t\tit( 'it renders without errors', () => {\n\t\t\tvar wrapper = shallowMount( ZObjectKeyValue, {\n\t\t\t\tprops: {\n\t\t\t\t\tedit: false,\n\t\t\t\t\trowId: rowId\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\texpect( wrapper.find( 'div' ).exists() ).toBe( true );\n\t\t} );\n\n\t\tit( 'it shows expansion toggle if it is not a special terminal case', async () => {\n\t\t\tgetters.getZObjectTypeByRowId = createFunctionsMockForId( rowId, Constants.Z_MONOLINGUALSTRING );\n\t\t\tgetters.getZObjectValueByRowId = createFunctionsMockForId( rowId, 0 );\n\t\t\tgetters.getExpectedTypeOfKey = createFunctionsMockForId( keyId, Constants.Z_OBJECT );\n\n\t\t\tglobal.store.hotUpdate( {\n\t\t\t\tgetters: getters\n\t\t\t} );\n\n\t\t\tvar wrapper = shallowMount( ZObjectKeyValue, {\n\t\t\t\tprops: {\n\t\t\t\t\tedit: false,\n\t\t\t\t\trowId: rowId\n\t\t\t\t}\n\t\t\t} );\n\t\t\texpect( wrapper.findComponent( ExpandedToggle ).exists() ).toBe( true );\n\t\t} );\n\n\t\tdescribe( 'does not show expansion toggle if the key is a terminal', () => {\n\t\t\tit( 'Z6, string type', () => {\n\t\t\t\tgetters.getZObjectTypeByRowId = createFunctionsMockForId( rowId, Constants.Z_STRING );\n\n\t\t\t\tglobal.store.hotUpdate( {\n\t\t\t\t\tgetters: getters\n\t\t\t\t} );\n\n\t\t\t\tvar wrapper = shallowMount( ZObjectKeyValue, {\n\t\t\t\t\tprops: {\n\t\t\t\t\t\tedit: false,\n\t\t\t\t\t\trowId: rowId\n\t\t\t\t\t}\n\t\t\t\t} );\n\n\t\t\t\texpect( wrapper.findComponent( ExpandedToggle ).exists() ).toBe( false );\n\t\t\t} );\n\n\t\t\tit( 'Z9, reference type', () => {\n\t\t\t\tgetters.getZObjectTypeByRowId = createFunctionsMockForId( rowId, Constants.Z_REFERENCE );\n\n\t\t\t\tglobal.store.hotUpdate( {\n\t\t\t\t\tgetters: getters\n\t\t\t\t} );\n\n\t\t\t\tvar wrapper = shallowMount( ZObjectKeyValue, {\n\t\t\t\t\tprops: {\n\t\t\t\t\t\tedit: false,\n\t\t\t\t\t\trowId: rowId\n\t\t\t\t\t}\n\t\t\t\t} );\n\n\t\t\t\texpect( wrapper.findComponent( ExpandedToggle ).exists() ).toBe( false );\n\t\t\t} );\n\t\t} );\n\t} );\n\n\tdescribe( 'in either view or edit mode', () => {\n\t\tdescribe( 'does not show expansion toggle if the key is a terminal', () => {\n\t\t\tit( 'Z1K1, with a bound parent type', () => {\n\t\t\t\tgetters.getZObjectKeyByRowId = () => ( id ) => {\n\t\t\t\t\tif ( id === parentRowId ) {\n\t\t\t\t\t\treturn Constants.Z_OBJECT_TYPE;\n\t\t\t\t\t} else if ( id === rowId ) {\n\t\t\t\t\t\treturn Constants.Z_REFERENCE;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthrow new Error( `rowId ${id} not supported` );\n\t\t\t\t\t}\n\t\t\t\t};\n\n\t\t\t\tgetters.getExpectedTypeOfKey =\n\t\t\t\t\tcreateFunctionsMockForId( Constants.Z_REFERENCE, Constants.Z_MULTILINGUALSTRING );\n\n\t\t\t\tglobal.store.hotUpdate( {\n\t\t\t\t\tgetters: getters\n\t\t\t\t} );\n\n\t\t\t\tvar wrapper = shallowMount( ZObjectKeyValue, {\n\t\t\t\t\tprops: {\n\t\t\t\t\t\trowId: rowId\n\t\t\t\t\t}\n\t\t\t\t} );\n\n\t\t\t\texpect( wrapper.findComponent( ExpandedToggle ).exists() ).toBe( false );\n\t\t\t} );\n\n\t\t\tit( 'resolver type value Z Reference', () => {\n\t\t\t\tgetters.getZObjectValueByRowId = createFunctionsMockForId( rowId, Constants.Z_REFERENCE );\n\t\t\t\tgetters.getZObjectKeyByRowId = createFunctionsMockForId( rowId, Constants.Z_OBJECT_TYPE );\n\n\t\t\t\tglobal.store.hotUpdate( {\n\t\t\t\t\tgetters: getters\n\t\t\t\t} );\n\n\t\t\t\tvar wrapper = shallowMount( ZObjectKeyValue, {\n\t\t\t\t\tprops: {\n\t\t\t\t\t\trowId: rowId\n\t\t\t\t\t}\n\t\t\t\t} );\n\n\t\t\t\texpect( wrapper.findComponent( ExpandedToggle ).exists() ).toBe( false );\n\t\t\t} );\n\n\t\t\tit( 'resolver type value Z Function Call', () => {\n\t\t\t\tgetters.getZObjectValueByRowId = createFunctionsMockForId( rowId, Constants.Z_FUNCTION_CALL );\n\t\t\t\tgetters.getZObjectKeyByRowId = createFunctionsMockForId( rowId, Constants.Z_OBJECT_TYPE );\n\n\t\t\t\tglobal.store.hotUpdate( {\n\t\t\t\t\tgetters: getters\n\t\t\t\t} );\n\n\t\t\t\tvar wrapper = shallowMount( ZObjectKeyValue, {\n\t\t\t\t\tprops: {\n\t\t\t\t\t\trowId: rowId\n\t\t\t\t\t}\n\t\t\t\t} );\n\n\t\t\t\texpect( wrapper.findComponent( ExpandedToggle ).exists() ).toBe( false );\n\t\t\t} );\n\n\t\t\tit( 'resolver type value Z Argument Reference', () => {\n\t\t\t\tgetters.getZObjectValueByRowId = createFunctionsMockForId( rowId, Constants.Z_ARGUMENT_REFERENCE );\n\t\t\t\tgetters.getZObjectKeyByRowId = createFunctionsMockForId( rowId, Constants.Z_OBJECT_TYPE );\n\n\t\t\t\tglobal.store.hotUpdate( {\n\t\t\t\t\tgetters: getters\n\t\t\t\t} );\n\n\t\t\t\tvar wrapper = shallowMount( ZObjectKeyValue, {\n\t\t\t\t\tprops: {\n\t\t\t\t\t\trowId: rowId\n\t\t\t\t\t}\n\t\t\t\t} );\n\n\t\t\t\texpect( wrapper.findComponent( ExpandedToggle ).exists() ).toBe( false );\n\t\t\t} );\n\n\t\t\tit( 'non built-in type', () => {\n\t\t\t\tgetters.getZObjectKeyByRowId = () => ( id ) => {\n\t\t\t\t\tif ( id === parentRowId ) {\n\t\t\t\t\t\treturn Constants.Z_OBJECT_TYPE;\n\t\t\t\t\t} else if ( id === rowId ) {\n\t\t\t\t\t\treturn Constants.Z_REFERENCE;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthrow new Error( `rowId ${id} not supported` );\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t\tgetters.getZObjectKeyByRowId( parentRowId, Constants.Z_OBJECT_TYPE );\n\t\t\t\tgetters.getExpectedTypeOfKey =\n\t\t\t\t\tcreateFunctionsMockForId( Constants.Z_REFERENCE, Constants.Z_MULTILINGUALSTRING );\n\n\t\t\t\tglobal.store.hotUpdate( {\n\t\t\t\t\tgetters: getters\n\t\t\t\t} );\n\n\t\t\t\tvar wrapper = shallowMount( ZObjectKeyValue, {\n\t\t\t\t\tprops: {\n\t\t\t\t\t\trowId: rowId\n\t\t\t\t\t}\n\t\t\t\t} );\n\n\t\t\t\texpect( wrapper.findComponent( ExpandedToggle ).exists() ).toBe( false );\n\t\t\t} );\n\t\t} );\n\t} );\n\n\tdescribe( 'handles the modification of the state for the key-value represented in the component', () => {\n\t\tit( 'if the value of Z1K1 changes', () => {\n\t\t\tgetters.getZObjectKeyByRowId = createFunctionsMockForId( rowId, Constants.Z_OBJECT_TYPE );\n\t\t\tgetters.getZReferenceTerminalValue = createFunctionsMockForId( rowId, Constants.Z_ARGUMENT );\n\t\t\tgetters.isInsideComposition = createGettersWithFunctionsMock( false );\n\n\t\t\tglobal.store.hotUpdate( {\n\t\t\t\tgetters: getters\n\t\t\t} );\n\n\t\t\tvar wrapper = mount( ZObjectKeyValue, {\n\t\t\t\tprops: {\n\t\t\t\t\tedit: true,\n\t\t\t\t\trowId: rowId\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\twrapper.findComponent( { name: 'cdx-select' } ).vm.$emit( 'update:selected', 'Function call' );\n\n\t\t\texpect( wrapper.emitted() ).toHaveProperty( 'set-type', [ [ { keyPath: [], value: 'Function call' } ] ] );\n\t\t} );\n\n\t\tit( 'if the value of the Z1K1.Z9K1 changes', async () => {\n\t\t\tgetters.getZObjectKeyByRowId = () => ( id ) => {\n\t\t\t\tif ( id === rowId ) {\n\t\t\t\t\treturn Constants.Z_REFERENCE_ID;\n\t\t\t\t} else if ( id === parentRowId ) {\n\t\t\t\t\treturn Constants.Z_OBJECT_TYPE;\n\t\t\t\t}\n\t\t\t};\n\t\t\tgetters.getParentRowId = createFunctionsMockForId( rowId, parentRowId );\n\n\t\t\tglobal.store.hotUpdate( {\n\t\t\t\tgetters: getters\n\t\t\t} );\n\n\t\t\tvar wrapper = mount( ZObjectKeyValue, {\n\t\t\t\tprops: {\n\t\t\t\t\tedit: true,\n\t\t\t\t\trowId: rowId\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\tawait wrapper.getComponent( TextInput ).vm.$emit( 'input', 'my string value' );\n\n\t\t\texpect( wrapper.emitted() ).toHaveProperty( 'set-value', [ [ { keyPath: [ Constants.Z_STRING_VALUE ], value: 'my string value' } ] ] );\n\t\t} );\n\n\t\t// TODO(T326007): Implement these tests.\n\t\tit( 'if the value of the Z7K1 changes', () => {\n\n\t\t} );\n\n\t\tit( 'when the changed key-value is a type', async () => {\n\t\t\tgetters.isInsideComposition = createGettersWithFunctionsMock( false );\n\t\t\tgetters.getLabel = createGettersWithFunctionsMock( { zid: 'Z17', label: 'Argument declaration', lang: 'Z1002' } );\n\t\t\tgetters.getZReferenceTerminalValue = createGettersWithFunctionsMock( 'Z17' );\n\t\t\tgetters.getZObjectKeyByRowId = createFunctionsMockForId( rowId, Constants.Z_OBJECT_TYPE );\n\n\t\t\tglobal.store.hotUpdate( {\n\t\t\t\tgetters: getters\n\t\t\t} );\n\n\t\t\tvar wrapper = mount( ZObjectKeyValue, {\n\t\t\t\tprops: {\n\t\t\t\t\tedit: true,\n\t\t\t\t\trowId: rowId\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\tconst ZObjectTypeComponent = wrapper.getComponent( ZObjectType );\n\t\t\texpect( ZObjectTypeComponent.exists() ).toBeTruthy();\n\n\t\t\tconst selectComponent = wrapper.getComponent( WlSelect );\n\t\t\texpect( selectComponent.exists() ).toBeTruthy();\n\n\t\t\tawait selectComponent.vm.$emit( 'update:selected', 'Reference' );\n\t\t\texpect( ZObjectTypeComponent.emitted() ).toHaveProperty( 'set-value', [ [ { keyPath: [], value: 'Reference' } ] ] );\n\t\t\texpect( wrapper.emitted() ).toHaveProperty( 'set-type', [ [ { keyPath: [], value: 'Reference' } ] ] );\n\t\t} );\n\n\t\tit( 'for a simple change that is isolated to the key-value pair', async () => {\n\t\t\tgetters.getZObjectTypeByRowId = createFunctionsMockForId( rowId, Constants.Z_STRING );\n\n\t\t\tglobal.store.hotUpdate( {\n\t\t\t\tgetters: getters\n\t\t\t} );\n\n\t\t\tvar wrapper = mount( ZObjectKeyValue, {\n\t\t\t\tprops: {\n\t\t\t\t\tedit: true,\n\t\t\t\t\trowId: rowId\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\tawait wrapper.getComponent( TextInput ).vm.$emit( 'input', 'my string value' );\n\n\t\t\texpect( actions.setValueByRowIdAndPath ).toHaveBeenCalledWith( expect.anything(), { keyPath: [ Constants.Z_STRING_VALUE ], rowId: 2, value: 'my string value' } );\n\t\t} );\n\t} );\n} );\n","usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/tests/jest/components/default/ZObjectType.test.js","messages":[{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":84,"column":108,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":103,"endColumn":4},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":128,"column":41,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":145,"endColumn":5},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":147,"column":56,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":174,"endColumn":5},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":176,"column":89,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":200,"endColumn":5}],"suppressedMessages":[],"errorCount":4,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":"/*!\n * WikiLambda unit test suite for the default ZObjectType component.\n *\n * @copyright 2020– Abstract Wikipedia team; see AUTHORS.txt\n * @license MIT\n */\n'use strict';\n\nvar shallowMount = require( '@vue/test-utils' ).shallowMount,\n\tcreateGettersWithFunctionsMock = require( '../../helpers/getterHelpers.js' ).createGettersWithFunctionsMock,\n\tConstants = require( '../../../../resources/ext.wikilambda.edit/Constants.js' ),\n\tZObjectType = require( '../../../../resources/ext.wikilambda.edit/components/default-view-types/ZObjectType.vue' ),\n\tZObjectSelector = require( '../../../../resources/ext.wikilambda.edit/components/ZObjectSelector.vue' );\n\ndescribe( 'ZReference', () => {\n\tvar getters;\n\tbeforeEach( () => {\n\t\tgetters = {\n\t\t\tisInsideComposition: createGettersWithFunctionsMock( false ),\n\t\t\tgetLabel: createGettersWithFunctionsMock( 'Argument declaration' ),\n\t\t\tgetLabelData: createGettersWithFunctionsMock( { zid: 'Z17', label: 'Argument declaration', lang: 'Z1002' } ),\n\t\t\tgetZReferenceTerminalValue: createGettersWithFunctionsMock( 'Z17' ),\n\t\t\tgetZObjectKeyByRowId: createGettersWithFunctionsMock( '0' )\n\t\t};\n\t\tglobal.store.hotUpdate( {\n\t\t\tgetters: getters\n\t\t} );\n\t} );\n\n\tdescribe( 'in view mode', () => {\n\t\tit( 'renders without errors', () => {\n\t\t\tvar wrapper = shallowMount( ZObjectType, {\n\t\t\t\tprops: {\n\t\t\t\t\tedit: false\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\texpect( wrapper.find( 'div' ).exists() ).toBe( true );\n\t\t} );\n\n\t\tit( 'displays the reference link with label if there is one', () => {\n\t\t\tvar wrapper = shallowMount( ZObjectType, {\n\t\t\t\tprops: {\n\t\t\t\t\tedit: false\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\tconst referenceLink = wrapper.get( 'a' );\n\t\t\texpect( referenceLink.attributes().href ).toBe( '/wiki/Z17' );\n\t\t\texpect( referenceLink.text() ).toBe( 'Argument declaration' );\n\t\t} );\n\n\t\tit( 'displays the reference link with its value if there is no label', () => {\n\t\t\t// If there's no label data stored, getLabel returns input key\n\t\t\tgetters.getLabel = createGettersWithFunctionsMock( 'Z17' );\n\n\t\t\tglobal.store.hotUpdate( {\n\t\t\t\tgetters: getters\n\t\t\t} );\n\n\t\t\tvar wrapper = shallowMount( ZObjectType, {\n\t\t\t\tprops: {\n\t\t\t\t\tedit: false\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\tconst referenceLink = wrapper.get( 'a' );\n\t\t\texpect( referenceLink.attributes().href ).toBe( '/wiki/Z17' );\n\t\t\texpect( referenceLink.text() ).toBe( 'Z17' );\n\t\t} );\n\t} );\n\n\tdescribe( 'in edit mode', () => {\n\t\tit( 'renders without errors', () => {\n\t\t\tvar wrapper = shallowMount( ZObjectType, {\n\t\t\t\tprops: {\n\t\t\t\t\tedit: true\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\texpect( wrapper.find( 'div' ).exists() ).toBe( true );\n\t\t} );\n\n\t\tit( 'displays a type selector if there is no initial value, and emits the selected type on type change', async () => {\n\t\t\tgetters.getZReferenceTerminalValue = createGettersWithFunctionsMock();\n\n\t\t\tglobal.store.hotUpdate( {\n\t\t\t\tgetters: getters\n\t\t\t} );\n\n\t\t\tvar wrapper = shallowMount( ZObjectType, {\n\t\t\t\tprops: {\n\t\t\t\t\tedit: true\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\texpect( wrapper.find( '.ext-wikilambda-type-mode__selector' ).exists() ).toBeTruthy();\n\t\t\texpect( wrapper.vm.selectType ).toBe( Constants.Z_TYPE );\n\n\t\t\tawait wrapper.getComponent( ZObjectSelector ).vm.$emit( 'input', 'String' );\n\n\t\t\texpect( wrapper.emitted() ).toHaveProperty( 'set-value', [ [ { keyPath: [], value: 'String' } ] ] );\n\t\t} );\n\n\t\tit( 'if there is an initial value, binds the value of the selected type to the selector', () => {\n\t\t\tvar wrapper = shallowMount( ZObjectType, {\n\t\t\t\tprops: {\n\t\t\t\t\tedit: true\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\texpect( wrapper.findComponent( { name: 'wl-select' } ).vm.selected ).toEqual( 'Z17' );\n\t\t} );\n\n\t\tit( 'emits a selector change value', () => {\n\t\t\tvar wrapper = shallowMount( ZObjectType, {\n\t\t\t\tprops: {\n\t\t\t\t\tedit: true\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\twrapper.findComponent( { name: 'wl-select' } ).vm.$emit( 'update:selected', 'String' );\n\n\t\t\texpect( wrapper.emitted() ).toHaveProperty( 'set-value', [ [ { keyPath: [], value: 'String' } ] ] );\n\t\t} );\n\n\t\tdescribe( 'it displays the correct options in the selector dropdown', () => {\n\t\t\tit( 'if a literal type is selected', async () => {\n\t\t\t\tvar wrapper = shallowMount( ZObjectType, {\n\t\t\t\t\tprops: {\n\t\t\t\t\t\tedit: true\n\t\t\t\t\t}\n\t\t\t\t} );\n\n\t\t\t\texpect( wrapper.findComponent( { name: 'wl-select' } ).vm.menuItems.length ).toBe( 3 );\n\n\t\t\t\t// Resolver type: Z-Reference\n\t\t\t\texpect( wrapper.findComponent( { name: 'wl-select' } ).vm.menuItems[ 0 ].value ).toBe( 'Z9' );\n\n\t\t\t\t// Resolver type: Z Function Call\n\t\t\t\texpect( wrapper.findComponent( { name: 'wl-select' } ).vm.menuItems[ 1 ].value ).toBe( 'Z7' );\n\n\t\t\t\t// Resolver type: Selected value type\n\t\t\t\texpect( wrapper.findComponent( { name: 'wl-select' } ).vm.menuItems[ 2 ].value ).toBe( 'Z17' );\n\t\t\t} );\n\n\t\t\tit( 'if the type selector is inside a composition', async () => {\n\t\t\t\tgetters.isInsideComposition = createGettersWithFunctionsMock( true );\n\n\t\t\t\tglobal.store.hotUpdate( {\n\t\t\t\t\tgetters: getters\n\t\t\t\t} );\n\n\t\t\t\tvar wrapper = shallowMount( ZObjectType, {\n\t\t\t\t\tprops: {\n\t\t\t\t\t\tedit: true,\n\t\t\t\t\t\texpectedType: Constants.Z_STRING\n\t\t\t\t\t}\n\t\t\t\t} );\n\n\t\t\t\texpect( wrapper.findComponent( { name: 'wl-select' } ).vm.menuItems.length ).toBe( 4 );\n\n\t\t\t\t// Resolver type: Z-Reference\n\t\t\t\texpect( wrapper.findComponent( { name: 'wl-select' } ).vm.menuItems[ 0 ].value ).toBe( 'Z9' );\n\n\t\t\t\t// Resolver type: Z Function Call\n\t\t\t\texpect( wrapper.findComponent( { name: 'wl-select' } ).vm.menuItems[ 1 ].value ).toBe( 'Z7' );\n\n\t\t\t\t// Resolver type: Z Argument Reference\n\t\t\t\texpect( wrapper.findComponent( { name: 'wl-select' } ).vm.menuItems[ 2 ].value ).toBe( 'Z18' );\n\n\t\t\t\t// Selected value type\n\t\t\t\texpect( wrapper.findComponent( { name: 'wl-select' } ).vm.menuItems[ 3 ].value ).toBe( 'Z17' );\n\t\t\t} );\n\n\t\t\tit( 'if the type selected is a resolver type, shows the bound type if there is one', async () => {\n\t\t\t\tgetters.getZReferenceTerminalValue = createGettersWithFunctionsMock( 'Z18' );\n\n\t\t\t\tglobal.store.hotUpdate( {\n\t\t\t\t\tgetters: getters\n\t\t\t\t} );\n\n\t\t\t\tvar wrapper = shallowMount( ZObjectType, {\n\t\t\t\t\tprops: {\n\t\t\t\t\t\tedit: true,\n\t\t\t\t\t\texpectedType: Constants.Z_STRING\n\t\t\t\t\t}\n\t\t\t\t} );\n\n\t\t\t\texpect( wrapper.findComponent( { name: 'wl-select' } ).vm.menuItems.length ).toBe( 3 );\n\n\t\t\t\t// Resolver type: Z-Reference\n\t\t\t\texpect( wrapper.findComponent( { name: 'wl-select' } ).vm.menuItems[ 0 ].value ).toBe( 'Z9' );\n\n\t\t\t\t// Resolver type: Z Function Call\n\t\t\t\texpect( wrapper.findComponent( { name: 'wl-select' } ).vm.menuItems[ 1 ].value ).toBe( 'Z7' );\n\n\t\t\t\t// Selected value type\n\t\t\t\texpect( wrapper.findComponent( { name: 'wl-select' } ).vm.menuItems[ 2 ].value ).toBe( 'Z6' );\n\t\t\t} );\n\t\t} );\n\t} );\n} );\n","usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/tests/jest/components/default/ZReference.test.js","messages":[{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":84,"column":122,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":96,"endColumn":4},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":98,"column":110,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":120,"endColumn":4},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":122,"column":47,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":131,"endColumn":4}],"suppressedMessages":[],"errorCount":3,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":"/*!\n * WikiLambda unit test suite for the default ZReference component.\n *\n * @copyright 2020– Abstract Wikipedia team; see AUTHORS.txt\n * @license MIT\n */\n'use strict';\n\nvar shallowMount = require( '@vue/test-utils' ).shallowMount,\n\tcreateGettersWithFunctionsMock = require( '../../helpers/getterHelpers.js' ).createGettersWithFunctionsMock,\n\tConstants = require( '../../../../resources/ext.wikilambda.edit/Constants.js' ),\n\tZReference = require( '../../../../resources/ext.wikilambda.edit/components/default-view-types/ZReference.vue' ),\n\tZObjectSelector = require( '../../../../resources/ext.wikilambda.edit/components/ZObjectSelector.vue' );\n\ndescribe( 'ZReference', () => {\n\tvar getters;\n\tbeforeEach( () => {\n\t\tgetters = {\n\t\t\tgetLabel: createGettersWithFunctionsMock( 'String' ),\n\t\t\tgetLabelData: createGettersWithFunctionsMock( { zid: 'Z6', label: 'String', lang: 'Z1002' } ),\n\t\t\tgetZReferenceTerminalValue: createGettersWithFunctionsMock( 'Z6' ),\n\t\t\tgetZObjectKeyByRowId: createGettersWithFunctionsMock( '0' )\n\t\t};\n\t\tglobal.store.hotUpdate( {\n\t\t\tgetters: getters\n\t\t} );\n\t} );\n\n\tdescribe( 'in view mode', () => {\n\t\tit( 'renders without errors', () => {\n\t\t\tvar wrapper = shallowMount( ZReference, {\n\t\t\t\tprops: {\n\t\t\t\t\tedit: false\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\texpect( wrapper.find( 'div' ).exists() ).toBe( true );\n\t\t} );\n\n\t\tit( 'displays the reference link with its label if there is one', () => {\n\t\t\tvar wrapper = shallowMount( ZReference, {\n\t\t\t\tprops: {\n\t\t\t\t\tedit: false\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\tconst referenceLink = wrapper.get( 'a' );\n\t\t\texpect( referenceLink.attributes().href ).toBe( '/wiki/Z6' );\n\t\t\texpect( referenceLink.text() ).toBe( 'String' );\n\t\t} );\n\n\t\tit( 'displays the reference link with its value if there is no label', () => {\n\t\t\t// If there's no label data stored, getLabel returns input key\n\t\t\tgetters.getLabel = createGettersWithFunctionsMock( 'Z6' );\n\t\t\tgetters.getLabelData = createGettersWithFunctionsMock();\n\n\t\t\tglobal.store.hotUpdate( {\n\t\t\t\tgetters: getters\n\t\t\t} );\n\n\t\t\tvar wrapper = shallowMount( ZReference, {\n\t\t\t\tprops: {\n\t\t\t\t\tedit: false\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\tconst referenceLink = wrapper.get( 'a' );\n\t\t\texpect( referenceLink.attributes().href ).toBe( '/wiki/Z6' );\n\t\t\texpect( referenceLink.text() ).toBe( 'Z6' );\n\t\t} );\n\t} );\n\n\tdescribe( 'in edit mode', () => {\n\t\tit( 'renders without errors', () => {\n\t\t\tvar wrapper = shallowMount( ZReference, {\n\t\t\t\tprops: {\n\t\t\t\t\tedit: true\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\texpect( wrapper.find( 'div' ).exists() ).toBe( true );\n\t\t} );\n\n\t\tit( 'displays a selector and emits the value with a Z_REFERENCE_ID (Z9K1) keyPath if its key is not a Z_REFERENCE_ID', async () => {\n\t\t\tvar wrapper = shallowMount( ZReference, {\n\t\t\t\tprops: {\n\t\t\t\t\tedit: true\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\texpect( wrapper.getComponent( ZObjectSelector ).exists() ).toBeTruthy();\n\n\t\t\tawait wrapper.getComponent( ZObjectSelector ).vm.$emit( 'input', 'String' );\n\n\t\t\texpect( wrapper.emitted() ).toHaveProperty( 'set-value', [ [ { keyPath: [ 'Z9K1' ], value: 'String' } ] ] );\n\t\t} );\n\n\t\tit( 'displays a selector and emits the value with an empty keyPath if its key is a Z_REFERENCE_ID (Z9K1)', async () => {\n\t\t\tgetters = {\n\t\t\t\tgetLabel: createGettersWithFunctionsMock( 'String' ),\n\t\t\t\tgetLabelData: createGettersWithFunctionsMock( { zid: 'Z6', label: 'String', lang: 'Z1002' } ),\n\t\t\t\tgetZReferenceTerminalValue: createGettersWithFunctionsMock( 'Z6' ),\n\t\t\t\tgetZObjectKeyByRowId: createGettersWithFunctionsMock( 'Z9K1' )\n\t\t\t};\n\t\t\tglobal.store.hotUpdate( {\n\t\t\t\tgetters: getters\n\t\t\t} );\n\n\t\t\tvar wrapper = shallowMount( ZReference, {\n\t\t\t\tprops: {\n\t\t\t\t\tedit: true\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\texpect( wrapper.getComponent( ZObjectSelector ).exists() ).toBeTruthy();\n\n\t\t\tawait wrapper.getComponent( ZObjectSelector ).vm.$emit( 'input', 'String' );\n\n\t\t\texpect( wrapper.emitted() ).toHaveProperty( 'set-value', [ [ { keyPath: [], value: 'String' } ] ] );\n\t\t} );\n\n\t\tit( 'binds the input type to the selector', async () => {\n\t\t\tvar wrapper = shallowMount( ZReference, {\n\t\t\t\tprops: {\n\t\t\t\t\tedit: true,\n\t\t\t\t\texpectedType: Constants.Z_ARGUMENT_KEY\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\texpect( wrapper.vm.selectType ).toBe( Constants.Z_ARGUMENT_KEY );\n\t\t} );\n\t} );\n} );\n","usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/tests/jest/components/default/ZString.test.js","messages":[{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":38,"column":48,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":46,"endColumn":4},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":51,"column":4,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":61,"endColumn":5},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":63,"column":105,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":82,"endColumn":4}],"suppressedMessages":[],"errorCount":3,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":"/*!\n * WikiLambda unit test suite for the default ZString component.\n *\n * @copyright 2020– Abstract Wikipedia team; see AUTHORS.txt\n * @license MIT\n */\n'use strict';\n\nvar shallowMount = require( '@vue/test-utils' ).shallowMount,\n\tcreateGettersWithFunctionsMock = require( '../../helpers/getterHelpers.js' ).createGettersWithFunctionsMock,\n\tTextInput = require( '../../../../resources/ext.wikilambda.edit/components/base/TextInput.vue' ),\n\tZString = require( '../../../../resources/ext.wikilambda.edit/components/default-view-types/ZString.vue' ),\n\tConstants = require( '../../../../resources/ext.wikilambda.edit/Constants.js' );\n\ndescribe( 'ZString', () => {\n\tvar getters;\n\tbeforeEach( () => {\n\t\tgetters = {\n\t\t\tgetZObjectKeyByRowId: createGettersWithFunctionsMock( Constants.Z_ARGUMENT_KEY ),\n\t\t\tgetZStringTerminalValue: createGettersWithFunctionsMock( 'my terminating string' )\n\t\t};\n\t\tglobal.store.hotUpdate( {\n\t\t\tgetters: getters\n\t\t} );\n\t} );\n\n\tdescribe( 'in view mode', () => {\n\t\tit( 'renders without errors', () => {\n\t\t\tvar wrapper = shallowMount( ZString, {\n\t\t\t\tprops: {\n\t\t\t\t\tedit: false\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\texpect( wrapper.find( 'div' ).exists() ).toBe( true );\n\t\t} );\n\n\t\tit( 'displays the terminating string value', async () => {\n\t\t\tvar wrapper = shallowMount( ZString, {\n\t\t\t\tprops: {\n\t\t\t\t\tedit: false\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\texpect( wrapper.find( 'p' ).text() ).toBe( 'my terminating string' );\n\t\t} );\n\t} );\n\n\tdescribe( 'in edit mode', () => {\n\t\tit( 'takes an input and emits the value with a Z_STRING_VALUE (Z6K1) keyPath if its key is not a Z_STRING_VALUE',\n\t\t\tasync () => {\n\t\t\t\tvar wrapper = shallowMount( ZString, {\n\t\t\t\t\tprops: {\n\t\t\t\t\t\tedit: true\n\t\t\t\t\t}\n\t\t\t\t} );\n\n\t\t\t\tawait wrapper.getComponent( TextInput ).vm.$emit( 'input', 'my string value' );\n\n\t\t\t\texpect( wrapper.emitted() ).toHaveProperty( 'set-value', [ [ { keyPath: [ 'Z6K1' ], value: 'my string value' } ] ] );\n\t\t\t} );\n\n\t\tit( 'takes an input and emits the value with an empty keyPath if its key is a Z_STRING_VALUE (Z6K1)', async () => {\n\t\t\tgetters = {\n\t\t\t\tgetZObjectKeyByRowId: createGettersWithFunctionsMock( Constants.Z_STRING_VALUE ),\n\t\t\t\tgetZStringTerminalValue: createGettersWithFunctionsMock( {} )\n\t\t\t};\n\n\t\t\tawait global.store.hotUpdate( {\n\t\t\t\tgetters: getters\n\t\t\t} );\n\n\t\t\tvar wrapper = shallowMount( ZString, {\n\t\t\t\tprops: {\n\t\t\t\t\tedit: true\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\tawait wrapper.getComponent( TextInput ).vm.$emit( 'input', 'my string value' );\n\n\t\t\texpect( wrapper.emitted() ).toHaveProperty( 'set-value', [ [ { keyPath: [], value: 'my string value' } ] ] );\n\t\t} );\n\t} );\n} );\n","usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/tests/jest/components/default/ZTypedList.test.js","messages":[{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":134,"column":66,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":146,"endColumn":4}],"suppressedMessages":[],"errorCount":1,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":"/*!\n * WikiLambda unit test suite for the default ZString component.\n *\n * @copyright 2020– Abstract Wikipedia team; see AUTHORS.txt\n * @license MIT\n */\n'use strict';\n\nconst { CdxButton } = require( '@wikimedia/codex' );\n\nvar shallowMount = require( '@vue/test-utils' ).shallowMount,\n\tcreateGettersWithFunctionsMock = require( '../../helpers/getterHelpers.js' ).createGettersWithFunctionsMock,\n\tZTypedList = require( '../../../../resources/ext.wikilambda.edit/components/default-view-types/ZTypedList.vue' ),\n\tZTypedListItem = require( '../../../../resources/ext.wikilambda.edit/components/default-view-types/ZTypedListItem.vue' ),\n\tZTypedListType = require( '../../../../resources/ext.wikilambda.edit/components/default-view-types/ZTypedListType.vue' );\n\ndescribe( 'ZTypedList', () => {\n\tvar getters;\n\n\tbeforeEach( () => {\n\t\tgetters = {\n\t\t\tgetChildrenByParentRowId: createGettersWithFunctionsMock( [\n\t\t\t\t{ id: 28, key: '0', parent: 27, value: 'object' },\n\t\t\t\t{ id: 39, key: '1', parent: 27, value: 'object' },\n\t\t\t\t{ id: 41, key: '2', parent: 27, value: 'object' }\n\t\t\t] ),\n\t\t\tgetZObjectTypeByRowId: createGettersWithFunctionsMock( 'Z6' ),\n\t\t\tgetLabelData: createGettersWithFunctionsMock(\n\t\t\t\t{ zid: 'Z881K1', label: 'type', lang: 'Z1002' }\n\t\t\t),\n\t\t\tgetExpectedTypeOfKey: createGettersWithFunctionsMock( 'Z1' ),\n\t\t\tgetZObjectKeyByRowId: createGettersWithFunctionsMock( 'Z2K2' )\n\t\t};\n\t\tglobal.store.hotUpdate( {\n\t\t\tgetters: getters\n\t\t} );\n\t} );\n\n\tdescribe( 'in view mode', () => {\n\t\tit( 'renders without errors', () => {\n\t\t\tvar wrapper = shallowMount( ZTypedList, {\n\t\t\t\tprops: {\n\t\t\t\t\tedit: false\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\texpect( wrapper.find( 'div' ).exists() ).toBe( true );\n\t\t} );\n\n\t\tit( 'does not render add list button', () => {\n\t\t\tvar wrapper = shallowMount( ZTypedList, {\n\t\t\t\tprops: {\n\t\t\t\t\tedit: false\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\texpect( wrapper.find( '.ext-wikilambda-ztyped-list__add-button' ).exists() ).toBe( false );\n\t\t} );\n\n\t\tit( 'does not render the list type when not expanded', () => {\n\t\t\tvar wrapper = shallowMount( ZTypedList, {\n\t\t\t\tprops: {\n\t\t\t\t\tedit: false,\n\t\t\t\t\texpanded: false\n\t\t\t\t}\n\t\t\t} );\n\t\t\texpect( wrapper.find( '.ext-wikilambda-ztyped-list__type' ).exists() ).toBe( false );\n\t\t} );\n\n\t\tit( 'does render the list type when expanded', () => {\n\t\t\tvar wrapper = shallowMount( ZTypedList, {\n\t\t\t\tprops: {\n\t\t\t\t\tedit: false,\n\t\t\t\t\texpanded: true\n\t\t\t\t}\n\t\t\t} );\n\t\t\texpect( wrapper.getComponent( ZTypedListType ).exists() ).toBe( true );\n\t\t} );\n\n\t\tit( 'renders all the list items but not the list type as a list item', () => {\n\t\t\tvar wrapper = shallowMount( ZTypedList, {\n\t\t\t\tprops: {\n\t\t\t\t\tedit: false\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\texpect( wrapper.vm.listItemsRowIds ).toEqual( [ 39, 41 ] );\n\t\t} );\n\n\t\tit( 'renders the list item component when there are one or more list items', () => {\n\t\t\tvar wrapper = shallowMount( ZTypedList, {\n\t\t\t\tprops: {\n\t\t\t\t\tedit: false\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\texpect( wrapper.findComponent( ZTypedListItem ).exists() ).toBe( true );\n\t\t} );\n\n\t\tit( 'shows the label when expanded', () => {\n\t\t\tvar wrapper = shallowMount( ZTypedList, {\n\t\t\t\tprops: {\n\t\t\t\t\tedit: false,\n\t\t\t\t\texpanded: true\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\texpect( wrapper.find( '.ext-wikilambda-ztyped-list__label' ).exists() ).toBe( true );\n\t\t} );\n\n\t\tit( 'does not show the label when not expanded', () => {\n\t\t\tvar wrapper = shallowMount( ZTypedList, {\n\t\t\t\tprops: {\n\t\t\t\t\tedit: false,\n\t\t\t\t\texpanded: false\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\texpect( wrapper.find( '.ext-wikilambda-ztyped-list__label' ).exists() ).toBe( false );\n\t\t} );\n\t} );\n\n\tdescribe( 'in edit mode', () => {\n\t\tit( 'renders the add list button', () => {\n\t\t\tvar wrapper = shallowMount( ZTypedList, {\n\t\t\t\tprops: {\n\t\t\t\t\tedit: true\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\texpect( wrapper.find( '.ext-wikilambda-ztyped-list__add-button' ).exists() ).toBe( true );\n\t\t} );\n\n\t\tit( 'emits set-type when the add list item button is clicked', async () => {\n\t\t\tvar wrapper = shallowMount( ZTypedList, {\n\t\t\t\tprops: {\n\t\t\t\t\tedit: true\n\t\t\t\t},\n\t\t\t\tglobal: {\n\t\t\t\t\tstubed: { CdxButton: false }\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\twrapper.get( '.ext-wikilambda-ztyped-list__add-button' ).getComponent( CdxButton ).vm.$emit( 'click' );\n\t\t\texpect( wrapper.emitted() ).toHaveProperty( 'set-type', [ [ { append: true, value: 'Z6' } ] ] );\n\t\t} );\n\t} );\n} );\n","usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/tests/jest/components/default/ZTypedListItem.test.js","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/tests/jest/components/default/ZTypedListType.test.js","messages":[{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":63,"column":55,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":82,"endColumn":3}],"suppressedMessages":[],"errorCount":1,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":"/*!\n * WikiLambda unit test suite for the default ZString component.\n *\n * @copyright 2020– Abstract Wikipedia team; see AUTHORS.txt\n * @license MIT\n */\n'use strict';\n\nvar shallowMount = require( '@vue/test-utils' ).shallowMount,\n\tmount = require( '@vue/test-utils' ).mount,\n\tcreateGettersWithFunctionsMock = require( '../../helpers/getterHelpers.js' ).createGettersWithFunctionsMock,\n\tZTypedListType = require( '../../../../resources/ext.wikilambda.edit/components/default-view-types/ZTypedListType.vue' ),\n\tWlSelect = require( '../../../../resources/ext.wikilambda.edit/components/base/Select.vue' );\n\ndescribe( 'ZTypedListType', () => {\n\tvar getters,\n\t\tactions;\n\n\tbeforeEach( () => {\n\t\tgetters = {\n\t\t\tgetLabelData: createGettersWithFunctionsMock(\n\t\t\t\t{ zid: 'Z881K1', label: 'String', lang: 'Z1002' }\n\t\t\t),\n\t\t\tgetExpectedTypeOfKey: createGettersWithFunctionsMock( 'Z1' ),\n\t\t\tgetZObjectKeyByRowId: createGettersWithFunctionsMock( '0' ),\n\t\t\tgetLabel: createGettersWithFunctionsMock( 'English' ),\n\t\t\tgetZReferenceTerminalValue: createGettersWithFunctionsMock( 'Z1' ),\n\t\t\tisInsideComposition: createGettersWithFunctionsMock( false ),\n\t\t\tgetLanguageIsoCodeOfZLang: createGettersWithFunctionsMock( 'en' ),\n\t\t\tgetUserZlangZID: createGettersWithFunctionsMock( true )\n\t\t};\n\n\t\tactions = {\n\t\t\tsetValueByRowIdAndPath: jest.fn()\n\t\t};\n\n\t\tglobal.store.hotUpdate( {\n\t\t\tgetters: getters,\n\t\t\tactions: actions\n\t\t} );\n\t} );\n\n\tit( 'renders without error in view mode', () => {\n\t\tvar wrapper = shallowMount( ZTypedListType, {\n\t\t\tprops: {\n\t\t\t\tedit: false\n\t\t\t}\n\t\t} );\n\n\t\texpect( wrapper.find( 'div' ).exists() ).toBe( true );\n\t} );\n\n\tit( 'renders without error in edit mode', () => {\n\t\tvar wrapper = shallowMount( ZTypedListType, {\n\t\t\tprops: {\n\t\t\t\tedit: true\n\t\t\t}\n\t\t} );\n\n\t\texpect( wrapper.find( 'div' ).exists() ).toBe( true );\n\t} );\n\n\tit( 'sets type when the child event emits a change', async () => {\n\t\tvar wrapper = mount( ZTypedListType, {\n\t\t\tprops: {\n\t\t\t\tedit: true\n\t\t\t}\n\t\t} );\n\n\t\tconst selectComponent = wrapper.getComponent( WlSelect );\n\t\texpect( selectComponent.exists() ).toBeTruthy();\n\n\t\tawait selectComponent.vm.$emit( 'update:selected', 'Reference' );\n\t\texpect( actions.setValueByRowIdAndPath ).toHaveBeenCalledWith(\n\t\t\texpect.anything(),\n\t\t\t{\n\t\t\t\tkeyPath: [],\n\t\t\t\trowId: 0,\n\t\t\t\tvalue: 'Reference'\n\t\t\t}\n\t\t);\n\t} );\n} );\n","usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/tests/jest/components/editor/LeaveEditorDialog.test.js","messages":[{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":31,"column":74,"nodeType":"FunctionExpression","messageId":"forbidden","endLine":48,"endColumn":3},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":50,"column":78,"nodeType":"FunctionExpression","messageId":"forbidden","endLine":67,"endColumn":3}],"suppressedMessages":[],"errorCount":2,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":"/*!\n * WikiLambda unit test suite for the leaver editor dialog component.\n *\n * @copyright 2020– Abstract Wikipedia team; see AUTHORS.txt\n * @license MIT\n */\n'use strict';\n\nvar mount = require( '@vue/test-utils' ).mount,\n\tshallowMount = require( '@vue/test-utils' ).shallowMount,\n\tLeaveEditorDialog = require( '../../../../resources/ext.wikilambda.edit/components/base/LeaveEditorDialog.vue' );\n\ndescribe( 'LeaveEditorDialog', function () {\n\tbeforeEach( function () {\n\t\t// Needed because of the Teleported component.\n\t\tconst el = document.createElement( 'div' );\n\t\tel.id = 'ext-wikilambda-app';\n\t\tdocument.body.appendChild( el );\n\t} );\n\n\tafterEach( () => {\n\t\tdocument.body.outerHTML = '';\n\t} );\n\n\tit( 'renders without errors', function () {\n\t\tvar wrapper = shallowMount( LeaveEditorDialog );\n\n\t\texpect( wrapper.find( 'div' ).exists() ).toBe( true );\n\t} );\n\n\tit( 'runs the given continue callback on \"discard edits\" button click', async function () {\n\t\tconst mockContinueCallback = jest.fn();\n\t\tvar wrapper = mount( LeaveEditorDialog, {\n\t\t\tprops: {\n\t\t\t\tcontinueCallback: mockContinueCallback,\n\t\t\t\tshowDialog: false\n\t\t\t}\n\t\t} );\n\t\tawait wrapper.setProps( { showDialog: true } );\n\t\tconst discardEditsButton = wrapper.findComponent( '.cdx-dialog__footer__primary-action' );\n\n\t\twrapper.vm.$nextTick( function () {\n\t\t\t// ACT: click discard edits and continue button.\n\t\t\tdiscardEditsButton.trigger( 'click' );\n\n\t\t\texpect( mockContinueCallback ).toHaveBeenCalled();\n\t\t} );\n\t} );\n\n\tit( 'triggers the \"close dialog\" event on \"continue editing\" button click', async function () {\n\t\tvar wrapper = mount( LeaveEditorDialog, {\n\t\t\tprops: {\n\t\t\t\tcontinueCallback: jest.fn(),\n\t\t\t\tshowDialog: false\n\t\t\t}\n\t\t} );\n\n\t\tawait wrapper.setProps( { showDialog: true } );\n\t\tconst continueEditingButton = wrapper.findComponent( '.cdx-dialog__footer__default-action' );\n\n\t\twrapper.vm.$nextTick( function () {\n\t\t\t// ACT: click continue editing button.\n\t\t\tcontinueEditingButton.trigger( 'click' );\n\n\t\t\texpect( wrapper.emitted() ).toHaveProperty( 'close-dialog' );\n\t\t} );\n\t} );\n} );\n","usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/tests/jest/components/function/ZFunctionCallRunner.test.js","messages":[{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":74,"column":96,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":112,"endColumn":3}],"suppressedMessages":[],"errorCount":1,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":"/*!\n * WikiLambda unit test suite for the ZFunctionCallRunner component.\n *\n * @copyright 2020– Abstract Wikipedia team; see AUTHORS.txt\n * @license MIT\n */\n'use strict';\n\nconst VueTestUtils = require( '@vue/test-utils' ),\n\tZFunctionCallRunner = require( '../../../../resources/ext.wikilambda.edit/components/function/ZFunctionCallRunner.vue' ),\n\tConstants = require( '../../../../resources/ext.wikilambda.edit/Constants.js' );\nconst { CdxButton } = require( '@wikimedia/codex' );\n\nconst zobjectId = 123;\nconst functionCallFunctionId = 456;\nconst resultId = 789;\nconst functionZid = 'Z123';\n\ndescribe( 'ZFunctionCallRunner', () => {\n\tlet currentZObjectType;\n\tlet currentZObject;\n\tlet callZFunctionMock;\n\tbeforeEach( function () {\n\t\tcurrentZObjectType = Constants.Z_FUNCTION;\n\t\tcallZFunctionMock = jest.fn();\n\t\tcurrentZObject = {};\n\t\tglobal.store.hotUpdate( {\n\t\t\tgetters: {\n\t\t\t\tgetZObjectChildrenById: () => ( parentId ) => {\n\t\t\t\t\tif ( parentId === zobjectId ) {\n\t\t\t\t\t\treturn [\n\t\t\t\t\t\t\t{ id: functionCallFunctionId, key: Constants.Z_FUNCTION_CALL_FUNCTION, value: 'object' }\n\t\t\t\t\t\t];\n\t\t\t\t\t} else if ( parentId === functionCallFunctionId ) {\n\t\t\t\t\t\treturn [\n\t\t\t\t\t\t\t{ key: Constants.Z_REFERENCE_ID, value: functionZid }\n\t\t\t\t\t\t];\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tgetZkeys: () => {\n\t\t\t\t\treturn {\n\t\t\t\t\t\t[ functionZid ]: {\n\t\t\t\t\t\t\t[ Constants.Z_PERSISTENTOBJECT_ID ]: {},\n\t\t\t\t\t\t\t[ Constants.Z_PERSISTENTOBJECT_VALUE ]: {\n\t\t\t\t\t\t\t\t[ Constants.Z_FUNCTION_ARGUMENTS ]: [ Constants.Z_ARGUMENT ],\n\t\t\t\t\t\t\t\t[ Constants.Z_FUNCTION_IMPLEMENTATIONS ]: [ Constants.Z_IMPLEMENTATION ]\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t},\n\t\t\t\tgetZObjectAsJsonById: () => ( id ) => {\n\t\t\t\t\tif ( id === zobjectId ) {\n\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t[ Constants.Z_OBJECT_TYPE ]: Constants.Z_FUNCTION_CALL\n\t\t\t\t\t\t};\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tgetCurrentZObjectType: () => currentZObjectType,\n\t\t\t\tgetZObjectAsJson: () => currentZObject\n\t\t\t},\n\t\t\tactions: {\n\t\t\t\tfetchZKeys: jest.fn(),\n\t\t\t\tinitializeResultId: () => resultId,\n\t\t\t\tcallZFunction: callZFunctionMock\n\t\t\t}\n\t\t} );\n\t} );\n\n\tit( 'renders without errors', () => {\n\t\tconst wrapper = VueTestUtils.shallowMount( ZFunctionCallRunner, { props: { zobjectId: zobjectId } } );\n\t\texpect( wrapper.find( '.ext-wikilambda-function-call-block__runner' ).exists() ).toBe( true );\n\t} );\n\n\tit( 'calls function correctly when object type is implementation and call button is pressed', async () => {\n\t\tcurrentZObjectType = Constants.Z_IMPLEMENTATION;\n\t\tcurrentZObject = {\n\t\t\t[ Constants.Z_PERSISTENTOBJECT_VALUE ]: {\n\t\t\t\t[ Constants.Z_IMPLEMENTATION_FUNCTION ]: {\n\t\t\t\t\t[ Constants.Z_REFERENCE_ID ]: functionZid\n\t\t\t\t},\n\t\t\t\t[ Constants.Z_IMPLEMENTATION_CODE ]: {\n\t\t\t\t\t[ Constants.Z_CODE_CODE ]: 'my lovely code'\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\tconst wrapper = VueTestUtils.shallowMount( ZFunctionCallRunner, { props: { zobjectId: zobjectId } } );\n\n\t\twrapper.getComponent( CdxButton ).vm.$emit( 'click' );\n\t\tawait wrapper.vm.$nextTick();\n\t\tawait wrapper.vm.$nextTick();\n\n\t\texpect( callZFunctionMock ).toHaveBeenCalledWith( expect.anything(), {\n\t\t\tresultId: resultId,\n\t\t\tzobject: {\n\t\t\t\t[ Constants.Z_OBJECT_TYPE ]: Constants.Z_FUNCTION_CALL,\n\t\t\t\t[ Constants.Z_FUNCTION_CALL_FUNCTION ]: {\n\t\t\t\t\t[ Constants.Z_FUNCTION_ARGUMENTS ]: [ Constants.Z_ARGUMENT ],\n\t\t\t\t\t[ Constants.Z_FUNCTION_IMPLEMENTATIONS ]: [\n\t\t\t\t\t\tConstants.Z_IMPLEMENTATION,\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t[ Constants.Z_IMPLEMENTATION_FUNCTION ]: {\n\t\t\t\t\t\t\t\t[ Constants.Z_REFERENCE_ID ]: functionZid\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t[ Constants.Z_IMPLEMENTATION_CODE ]: {\n\t\t\t\t\t\t\t\t[ Constants.Z_CODE_CODE ]: 'my lovely code'\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t]\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t} );\n} );\n","usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/tests/jest/components/function/ZFunctionTesterReport.test.js","messages":[{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":105,"column":111,"nodeType":"FunctionExpression","messageId":"forbidden","endLine":141,"endColumn":3},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":143,"column":103,"nodeType":"FunctionExpression","messageId":"forbidden","endLine":180,"endColumn":3}],"suppressedMessages":[],"errorCount":2,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":"/*!\n * WikiLambda unit test suite for the ZTesterImplResult component and related files.\n *\n * @copyright 2020– Abstract Wikipedia team; see AUTHORS.txt\n * @license MIT\n */\n'use strict';\nvar VueTestUtils = require( '@vue/test-utils' ),\n\tZFunctionTesterReport = require( '../../../../resources/ext.wikilambda.edit/components/function/ZFunctionTesterReport.vue' ),\n\tConstants = require( '../../../../resources/ext.wikilambda.edit/Constants.js' );\n\ndescribe( 'ZFunctionTesterReport', function () {\n\tvar fetchZKeysMock = jest.fn( function () {\n\t\t\treturn true;\n\t\t} ),\n\t\tgetTestResultsMock = jest.fn(),\n\t\tgetters;\n\n\tbeforeEach( function () {\n\t\tgetters = {\n\t\t\tgetZObjectChildrenById: jest.fn(),\n\t\t\tgetZkeyLabels: jest.fn( function () {\n\t\t\t\treturn {\n\t\t\t\t\tZ10000: 'FN',\n\t\t\t\t\tZ10001: 'IMPL',\n\t\t\t\t\tZ10002: 'TESTER',\n\t\t\t\t\tZ10004: 'IMPL2'\n\t\t\t\t};\n\t\t\t} ),\n\t\t\tgetZkeys: jest.fn( function () {\n\t\t\t\treturn {};\n\t\t\t} ),\n\t\t\tgetViewMode: jest.fn( function () {\n\t\t\t\treturn false;\n\t\t\t} ),\n\t\t\tgetNestedZObjectById: jest.fn(),\n\t\t\tgetZObjectAsJsonById: jest.fn(),\n\t\t\tgetZTesterPercentage: jest.fn( function () {\n\t\t\t\treturn function () {\n\t\t\t\t\treturn {\n\t\t\t\t\t\tpassing: 1,\n\t\t\t\t\t\ttotal: 1,\n\t\t\t\t\t\tpercentage: 100\n\t\t\t\t\t};\n\t\t\t\t};\n\t\t\t} ),\n\t\t\tgetCurrentZObjectId: jest.fn(),\n\t\t\tgetZTesters: jest.fn( function () {\n\t\t\t\treturn [ 'Z10002', 'Z10003' ];\n\t\t\t} ),\n\t\t\tgetZImplementations: jest.fn( function () {\n\t\t\t\treturn [ 'Z10001', 'Z10004', 'Z10005' ];\n\t\t\t} )\n\t\t};\n\t\tglobal.store.hotUpdate( {\n\t\t\tgetters: getters,\n\t\t\tactions: {\n\t\t\t\tfetchZKeys: fetchZKeysMock,\n\t\t\t\tgetTestResults: getTestResultsMock\n\t\t\t}\n\t\t} );\n\t} );\n\n\tit( 'renders without errors', function () {\n\t\tvar wrapper = VueTestUtils.shallowMount( ZFunctionTesterReport, {\n\t\t\tprops: {\n\t\t\t\tzFunctionId: ''\n\t\t\t}\n\t\t} );\n\t\texpect( wrapper.find( 'div' ).exists() ).toBeTruthy();\n\t} );\n\n\tit( 'triggers the tests on load', function () {\n\t\tVueTestUtils.shallowMount( ZFunctionTesterReport, {\n\t\t\tprops: {\n\t\t\t\tzFunctionId: ''\n\t\t\t}\n\t\t} );\n\n\t\treturn new Promise( function ( resolve ) {\n\t\t\tsetTimeout( function () {\n\t\t\t\texpect( getTestResultsMock ).toHaveBeenCalled();\n\t\t\t\texpect( getTestResultsMock ).toHaveBeenCalledWith( expect.anything(), {\n\t\t\t\t\tzFunctionId: '',\n\t\t\t\t\tzImplementations: [],\n\t\t\t\t\tzTesters: [],\n\t\t\t\t\tclearPreviousResults: true\n\t\t\t\t} );\n\n\t\t\t\tresolve();\n\t\t\t}, 1500 );\n\t\t} );\n\t} );\n\n\tit( 'displays no results when no implementations or testers found', function () {\n\t\tvar wrapper = VueTestUtils.shallowMount( ZFunctionTesterReport, {\n\t\t\tprops: {\n\t\t\t\tzFunctionId: ''\n\t\t\t}\n\t\t} );\n\t\texpect( wrapper.find( 'p' ).text() )\n\t\t\t.toBe( 'No test results found. Please add an implementation and a test to see results.' );\n\t} );\n\n\tit( 'displays \"current implementation\" and all available testers if a new zImplementation is being created', async function () {\n\t\tgetters.getCurrentZObjectId = jest.fn( function () {\n\t\t\treturn Constants.NEW_ZID_PLACEHOLDER;\n\t\t} );\n\n\t\tgetters.getZkeys = jest.fn( function () {\n\t\t\treturn {\n\t\t\t\tZ10001: {\n\t\t\t\t\t[ Constants.Z_PERSISTENTOBJECT_VALUE ]:\n\t\t\t\t\t\t{ [ Constants.Z_OBJECT_TYPE ]: Constants.Z_IMPLEMENTATION }\n\t\t\t\t},\n\t\t\t\tZ10000: {\n\t\t\t\t\t[ Constants.Z_PERSISTENTOBJECT_VALUE ]:\n\t\t\t\t\t\t{ [ Constants.Z_FUNCTION_TESTERS ]: [ Constants.Z_TESTER, 'Z10002', 'Z10003' ],\n\t\t\t\t\t\t\t[ Constants.Z_FUNCTION_IMPLEMENTATIONS ]: [ Constants.Z_IMPLEMENTATION, 'Z10001', 'Z10004', 'Z10005' ] }\n\t\t\t\t}\n\t\t\t};\n\t\t} );\n\n\t\tglobal.store.hotUpdate( {\n\t\t\tgetters: getters\n\t\t} );\n\n\t\tvar wrapper = VueTestUtils.shallowMount( ZFunctionTesterReport, {\n\t\t\tprops: {\n\t\t\t\tzFunctionId: 'Z10000',\n\t\t\t\tzImplementationId: Constants.NEW_ZID_PLACEHOLDER\n\t\t\t}\n\t\t} );\n\n\t\texpect( wrapper.findAll( '.ext-wikilambda-fn-tester-results__header-cell' ).length ).toBe( 1 );\n\t\texpect( wrapper.findAll( '.ext-wikilambda-fn-tester-results__header-cell' )[ 0 ].text() ).toBe( 'Current implementation' );\n\n\t\texpect( wrapper.findAll( '.ext-wikilambda-fn-tester-results__row' ).length ).toBe( 2 );\n\t\texpect( wrapper.findAll( '.ext-wikilambda-fn-tester-results__row' )[ 0 ].text() ).toBe( 'TESTER' );\n\t\texpect( wrapper.findAll( '.ext-wikilambda-fn-tester-results__row' )[ 1 ].text() ).toBe( 'Z10003' );\n\t} );\n\n\tit( 'displays \"current tester\" and all available implementations if a new zTester is being created', async function () {\n\t\tgetters.getCurrentZObjectId = jest.fn( function () {\n\t\t\treturn Constants.NEW_ZID_PLACEHOLDER;\n\t\t} );\n\n\t\tgetters.getZkeys = jest.fn( function () {\n\t\t\treturn {\n\t\t\t\tZ10001: {\n\t\t\t\t\t[ Constants.Z_PERSISTENTOBJECT_VALUE ]:\n\t\t\t\t\t\t{ [ Constants.Z_OBJECT_TYPE ]: Constants.Z_TESTER }\n\t\t\t\t},\n\t\t\t\tZ10000: {\n\t\t\t\t\t[ Constants.Z_PERSISTENTOBJECT_VALUE ]:\n\t\t\t\t\t\t{ [ Constants.Z_FUNCTION_TESTERS ]: [ Constants.Z_TESTER, 'Z10002', 'Z10003' ],\n\t\t\t\t\t\t\t[ Constants.Z_FUNCTION_IMPLEMENTATIONS ]: [ Constants.Z_IMPLEMENTATION, 'Z10001', 'Z10004', 'Z10005' ] }\n\t\t\t\t}\n\t\t\t};\n\t\t} );\n\n\t\tglobal.store.hotUpdate( {\n\t\t\tgetters: getters\n\t\t} );\n\n\t\tvar wrapper = VueTestUtils.shallowMount( ZFunctionTesterReport, {\n\t\t\tprops: {\n\t\t\t\tzFunctionId: 'Z10000',\n\t\t\t\tzTesterId: Constants.NEW_ZID_PLACEHOLDER\n\t\t\t}\n\t\t} );\n\n\t\texpect( wrapper.findAll( '.ext-wikilambda-fn-tester-results__row' ).length ).toBe( 1 );\n\t\texpect( wrapper.findAll( '.ext-wikilambda-fn-tester-results__row' )[ 0 ].text() ).toBe( 'Current test' );\n\n\t\texpect( wrapper.findAll( '.ext-wikilambda-fn-tester-results__header-cell' ).length ).toBe( 3 );\n\t\texpect( wrapper.findAll( '.ext-wikilambda-fn-tester-results__header-cell' )[ 0 ].text() ).toBe( 'IMPL' );\n\t\texpect( wrapper.findAll( '.ext-wikilambda-fn-tester-results__header-cell' )[ 1 ].text() ).toBe( 'IMPL2' );\n\t\texpect( wrapper.findAll( '.ext-wikilambda-fn-tester-results__header-cell' )[ 2 ].text() ).toBe( 'Z10005' );\n\t} );\n\n\tit( 'if displayed on a ZImplementation page, only shows that ZImplementation as current implementation', function () {\n\t\tgetters.getCurrentZObjectId = jest.fn( function () {\n\t\t\treturn 'Z10001';\n\t\t} );\n\n\t\tgetters.getZkeys = jest.fn( function () {\n\t\t\treturn {\n\t\t\t\tZ10001: {\n\t\t\t\t\t[ Constants.Z_PERSISTENTOBJECT_VALUE ]:\n\t\t\t\t\t\t{ [ Constants.Z_OBJECT_TYPE ]: Constants.Z_IMPLEMENTATION }\n\t\t\t\t},\n\t\t\t\tZ10000: {\n\t\t\t\t\t[ Constants.Z_PERSISTENTOBJECT_VALUE ]:\n\t\t\t\t\t\t{ [ Constants.Z_FUNCTION_TESTERS ]: [ Constants.Z_TESTER, 'Z10002', 'Z10003' ],\n\t\t\t\t\t\t\t[ Constants.Z_FUNCTION_IMPLEMENTATIONS ]: [ Constants.Z_IMPLEMENTATION, 'Z10001', 'Z10004', 'Z10005' ] }\n\t\t\t\t}\n\t\t\t};\n\t\t} );\n\n\t\tglobal.store.hotUpdate( {\n\t\t\tgetters: getters\n\t\t} );\n\n\t\tvar wrapper = VueTestUtils.shallowMount( ZFunctionTesterReport, {\n\t\t\tprops: {\n\t\t\t\tzFunctionId: 'Z10000',\n\t\t\t\tzImplementationId: 'Z10001'\n\t\t\t}\n\t\t} );\n\n\t\texpect( wrapper.findAll( '.ext-wikilambda-fn-tester-results__header-cell' ).length ).toBe( 1 );\n\t\texpect( wrapper.findAll( '.ext-wikilambda-fn-tester-results__header-cell' )[ 0 ].text() ).toBe( 'Current implementation' );\n\n\t\texpect( wrapper.findAll( '.ext-wikilambda-fn-tester-results__row' ).length ).toBe( 2 );\n\t\texpect( wrapper.findAll( '.ext-wikilambda-fn-tester-results__row' )[ 0 ].text() ).toBe( 'TESTER' );\n\t\texpect( wrapper.findAll( '.ext-wikilambda-fn-tester-results__row' )[ 1 ].text() ).toBe( 'Z10003' );\n\t} );\n\n\tit( 'if displayed on a ZTester page, only shows that ZTester as current test', function () {\n\t\tgetters.getCurrentZObjectId = jest.fn( function () {\n\t\t\treturn 'Z10002';\n\t\t} );\n\n\t\tgetters.getZkeys = jest.fn( function () {\n\t\t\treturn {\n\t\t\t\tZ10002: {\n\t\t\t\t\t[ Constants.Z_PERSISTENTOBJECT_VALUE ]:\n\t\t\t\t\t\t{ [ Constants.Z_OBJECT_TYPE ]: Constants.Z_TESTER }\n\t\t\t\t},\n\t\t\t\tZ10000: {\n\t\t\t\t\t[ Constants.Z_PERSISTENTOBJECT_VALUE ]:\n\t\t\t\t\t\t{ [ Constants.Z_FUNCTION_TESTERS ]: [ Constants.Z_TESTER, 'Z10002', 'Z10006' ],\n\t\t\t\t\t\t\t[ Constants.Z_FUNCTION_IMPLEMENTATIONS ]: [ Constants.Z_IMPLEMENTATION, 'Z10001', 'Z10004', 'Z10005' ] }\n\t\t\t\t}\n\t\t\t};\n\t\t} );\n\n\t\tglobal.store.hotUpdate( {\n\t\t\tgetters: getters\n\t\t} );\n\n\t\tvar wrapper = VueTestUtils.shallowMount( ZFunctionTesterReport, {\n\t\t\tprops: {\n\t\t\t\tzFunctionId: 'Z10000',\n\t\t\t\tzTesterId: 'Z10002'\n\t\t\t}\n\t\t} );\n\n\t\texpect( wrapper.findAll( '.ext-wikilambda-fn-tester-results__row' ).length ).toBe( 1 );\n\t\texpect( wrapper.findAll( '.ext-wikilambda-fn-tester-results__row' )[ 0 ].text() ).toBe( 'Current test' );\n\n\t\texpect( wrapper.findAll( '.ext-wikilambda-fn-tester-results__header-cell' ).length ).toBe( 3 );\n\t\texpect( wrapper.findAll( '.ext-wikilambda-fn-tester-results__header-cell' )[ 0 ].text() ).toBe( 'IMPL' );\n\t\texpect( wrapper.findAll( '.ext-wikilambda-fn-tester-results__header-cell' )[ 1 ].text() ).toBe( 'IMPL2' );\n\t\texpect( wrapper.findAll( '.ext-wikilambda-fn-tester-results__header-cell' )[ 2 ].text() ).toBe( 'Z10005' );\n\t} );\n\n\t// TODO (T303072): This test is skipped because overriding computed properties is no longer\n\t// supported by vue-test-utils\n\tit.skip( 'triggers the tests on button click', function () {\n\t\tvar expectedImplementationId = 'Z10001',\n\t\t\texpectedTesterId = 'Z10002',\n\t\t\twrapper = VueTestUtils.shallowMount( ZFunctionTesterReport, {\n\t\t\t\tprops: {\n\t\t\t\t\tzFunctionId: 'Z10000',\n\t\t\t\t\tzImplementationId: expectedImplementationId,\n\t\t\t\t\tzTesterId: expectedTesterId\n\t\t\t\t},\n\t\t\t\t// TODO (T303072): This is not supported any more\n\t\t\t\tcomputed: {\n\t\t\t\t\timplementations: jest.fn().mockReturnValue( [ expectedImplementationId ] ),\n\t\t\t\t\ttesters: jest.fn().mockReturnValue( [ expectedTesterId ] )\n\t\t\t\t}\n\t\t\t} );\n\n\t\treturn wrapper.find( 'button' ).trigger( 'click' ).then( function () {\n\t\t\texpect( getTestResultsMock ).toHaveBeenCalledWith( expect.anything(), {\n\t\t\t\tzFunctionId: 'Z10000',\n\t\t\t\tzImplementations: [ 'Z10001' ],\n\t\t\t\tzTesters: [ 'Z10002' ],\n\t\t\t\tclearPreviousResults: true\n\t\t\t} );\n\t\t} );\n\t} );\n} );\n","usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/tests/jest/components/function/ZTesterImplResult.test.js","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/tests/jest/components/function/editor/FunctionEditorAliases.test.js","messages":[{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":175,"column":53,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":187,"endColumn":4}],"suppressedMessages":[],"errorCount":1,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":"/*!\n * WikiLambda unit test suite for the function-definition-aliases component.\n *\n * @copyright 2020– Abstract Wikipedia team; see AUTHORS.txt\n * @license MIT\n */\n'use strict';\n\nvar VueTestUtils = require( '@vue/test-utils' ),\n\ttypeUtils = require( '../../../../../resources/ext.wikilambda.edit/mixins/typeUtils.js' ),\n\tConstants = require( '../../../../../resources/ext.wikilambda.edit/Constants.js' ),\n\tFunctionEditorAliases = require( '../../../../../resources/ext.wikilambda.edit/components/function/editor/FunctionEditorAliases.vue' ),\n\tChipContainer = require( '../../../../../resources/ext.wikilambda.edit/components/base/ChipContainer.vue' );\n\nconst multilingualStringsetValueId = 1;\nconst monolingualStringsetId = 2;\nconst monolingualStringsetLanguageId = 3;\nconst monolingualStringsetValueId = 4;\nconst stringId = 5;\nconst stringValueId = 6;\nconst nextId = 7;\n\nconst createWrapper = () => VueTestUtils.shallowMount( FunctionEditorAliases, {\n\tprops: {\n\t\tzLang: Constants.Z_NATURAL_LANGUAGE_ENGLISH\n\t},\n\tglobal: {\n\t\tmixins: [ typeUtils ]\n\t}\n} );\n\ndescribe( 'FunctionEditorAliases', () => {\n\tvar getters,\n\t\tactions,\n\t\tstrings;\n\n\tbeforeEach( () => {\n\t\tstrings = [];\n\t\tgetters = {\n\t\t\tgetZObjectChildrenById: () => ( parentId ) => {\n\t\t\t\tif ( parentId === monolingualStringsetId ) {\n\t\t\t\t\treturn [\n\t\t\t\t\t\t{ id: monolingualStringsetLanguageId, key: Constants.Z_MONOLINGUALSTRINGSET_LANGUAGE },\n\t\t\t\t\t\t{ id: monolingualStringsetValueId, key: Constants.Z_MONOLINGUALSTRINGSET_VALUE }\n\t\t\t\t\t];\n\t\t\t\t}\n\t\t\t},\n\t\t\tgetNestedZObjectById: () => ( id, keys ) => {\n\t\t\t\tif ( id === 0 && keys.length === 2 &&\n\t\t\t\t\tkeys[ 0 ] === Constants.Z_PERSISTENTOBJECT_ALIASES &&\n\t\t\t\t\tkeys[ 1 ] === Constants.Z_MULTILINGUALSTRINGSET_VALUE ) {\n\t\t\t\t\treturn { id: multilingualStringsetValueId };\n\t\t\t\t} else if ( id === monolingualStringsetId && keys.length === 1 &&\n\t\t\t\t\tkeys[ 0 ] === Constants.Z_MONOLINGUALSTRINGSET_VALUE ) {\n\t\t\t\t\treturn { id: monolingualStringsetValueId };\n\t\t\t\t} else if ( id === monolingualStringsetId && keys.length === 2 &&\n\t\t\t\t\tkeys[ 0 ] === Constants.Z_MONOLINGUALSTRINGSET_LANGUAGE &&\n\t\t\t\t\tkeys[ 1 ] === Constants.Z_REFERENCE_ID ) {\n\t\t\t\t\treturn { value: Constants.Z_NATURAL_LANGUAGE_ENGLISH };\n\t\t\t\t} else if ( id === monolingualStringsetLanguageId && keys.length === 1 &&\n\t\t\t\t\tkeys[ 0 ] === Constants.Z_REFERENCE_ID ) {\n\t\t\t\t\treturn { value: Constants.Z_NATURAL_LANGUAGE_ENGLISH };\n\t\t\t\t} else if ( id === stringId && keys.length === 1 &&\n\t\t\t\t\tkeys[ 0 ] === Constants.Z_STRING_VALUE ) {\n\t\t\t\t\treturn { id: stringValueId, value: 'existing alias' };\n\t\t\t\t}\n\t\t\t},\n\t\t\tgetAllItemsFromListById: () => ( parentId ) => {\n\t\t\t\tif ( parentId === multilingualStringsetValueId ) {\n\t\t\t\t\treturn [ { id: monolingualStringsetId } ];\n\t\t\t\t} else if ( parentId === monolingualStringsetValueId ) {\n\t\t\t\t\treturn strings;\n\t\t\t\t}\n\t\t\t},\n\t\t\tgetZObjectById: () => ( id ) => {\n\t\t\t\tif ( id === stringValueId ) {\n\t\t\t\t\treturn { parent: stringId };\n\t\t\t\t} else if ( id === stringId ) {\n\t\t\t\t\treturn { id: stringId, parent: monolingualStringsetValueId };\n\t\t\t\t}\n\t\t\t},\n\t\t\tgetNextObjectId: () => nextId\n\t\t};\n\n\t\tactions = {\n\t\t\tsetZObjectValue: jest.fn(),\n\t\t\taddZObject: jest.fn(),\n\t\t\taddZString: jest.fn(),\n\t\t\tinjectZObject: jest.fn(),\n\t\t\tremoveZObjectChildren: jest.fn(),\n\t\t\tremoveZObject: jest.fn(),\n\t\t\trecalculateZListIndex: jest.fn()\n\t\t};\n\n\t\tglobal.store.hotUpdate( {\n\t\t\tgetters: getters,\n\t\t\tactions: actions\n\t\t} );\n\n\t} );\n\n\tit( 'renders without errors', () => {\n\t\tvar wrapper = createWrapper();\n\n\t\texpect( wrapper.find( '.ext-wikilambda-function-definition-aliases' ).exists() ).toBe( true );\n\t} );\n\tit( 'does not pass any chips to chip container if there are no aliases', () => {\n\t\tvar wrapper = createWrapper();\n\n\t\texpect( wrapper.getComponent( ChipContainer ).props( 'chips' ) ).toHaveLength( 0 );\n\t} );\n\tit( 'passes chips to chip container if there are aliases', () => {\n\t\tstrings.push( { id: stringId, key: '1', value: 'object' } );\n\t\tvar wrapper = createWrapper();\n\n\t\tconst chipsProp = wrapper.getComponent( ChipContainer ).props( 'chips' );\n\t\texpect( chipsProp ).toHaveLength( 1 );\n\t\texpect( chipsProp[ 0 ] ).toEqual( { id: stringValueId, value: 'existing alias' } );\n\t} );\n\tit( 'removes alias when chip removed from chip container', () => {\n\t\tstrings.push( { id: stringId, key: '1', value: 'object' } );\n\t\tvar wrapper = createWrapper();\n\n\t\twrapper.getComponent( ChipContainer ).vm.$emit( 'remove-chip', stringValueId );\n\n\t\texpect( actions.removeZObjectChildren ).toHaveBeenCalledWith( expect.anything(), stringId );\n\t\texpect( actions.removeZObject ).toHaveBeenCalledWith( expect.anything(), stringId );\n\t\texpect( actions.recalculateZListIndex ).toHaveBeenCalledWith( expect.anything(), monolingualStringsetValueId );\n\t} );\n\tdescribe( 'When a new chip is added in chip container', () => {\n\t\tit( 'for an existing language, adds new alias', () => {\n\t\t\tvar wrapper = createWrapper();\n\n\t\t\twrapper.getComponent( ChipContainer ).vm.$emit( 'add-chip', 'new alias' );\n\n\t\t\texpect( actions.addZObject ).toHaveBeenCalledWith( expect.anything(), {\n\t\t\t\tkey: '1',\n\t\t\t\tvalue: 'new alias',\n\t\t\t\tparent: monolingualStringsetValueId\n\t\t\t} );\n\t\t\texpect( actions.addZString ).toHaveBeenCalledWith( expect.anything(), {\n\t\t\t\tid: nextId,\n\t\t\t\tvalue: 'new alias'\n\t\t\t} );\n\t\t} );\n\t\tit( 'for an new language, adds new alias', () => {\n\t\t\tvar wrapper = VueTestUtils.shallowMount( FunctionEditorAliases, {\n\t\t\t\tprops: {\n\t\t\t\t\tzLang: Constants.Z_NATURAL_LANGUAGE_CHINESE\n\t\t\t\t},\n\t\t\t\tglobal: {\n\t\t\t\t\tmixins: [ typeUtils ]\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\twrapper.getComponent( ChipContainer ).vm.$emit( 'add-chip', 'new alias' );\n\n\t\t\texpect( actions.addZObject ).toHaveBeenCalledWith( expect.anything(), {\n\t\t\t\tkey: '2',\n\t\t\t\tvalue: 'object',\n\t\t\t\tparent: multilingualStringsetValueId\n\t\t\t} );\n\t\t\texpect( actions.injectZObject ).toHaveBeenCalledWith( expect.anything(), {\n\t\t\t\tzobject: {\n\t\t\t\t\tZ1K1: Constants.Z_MONOLINGUALSTRINGSET,\n\t\t\t\t\tZ31K1: Constants.Z_NATURAL_LANGUAGE_CHINESE,\n\t\t\t\t\tZ31K2: [ Constants.Z_STRING, 'new alias' ]\n\t\t\t\t},\n\t\t\t\tkey: '2',\n\t\t\t\tid: nextId,\n\t\t\t\tparent: multilingualStringsetValueId\n\t\t\t} );\n\t\t} );\n\t\tit( 'with a value that matches an existing alias in the current language, ' +\n\t\t\t'error is displayed and new alias is not added', async () => {\n\t\t\tstrings.push( { id: stringId, key: '1', value: 'object' } );\n\t\t\tvar wrapper = createWrapper();\n\n\t\t\twrapper.getComponent( ChipContainer ).vm.$emit( 'add-chip', 'existing alias' );\n\n\t\t\tawait wrapper.vm.$nextTick();\n\n\t\t\texpect( wrapper.get( '.ext-wikilambda-function-definition-aliases__error' ).exists() ).toBe( true );\n\n\t\t\texpect( actions.addZObject ).not.toHaveBeenCalled();\n\t\t\texpect( actions.addZString ).not.toHaveBeenCalled();\n\t\t} );\n\t} );\n} );\n","usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/tests/jest/components/function/editor/FunctionEditorDefinition.test.js","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/tests/jest/components/function/editor/FunctionEditorFooter.test.js","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/tests/jest/components/function/editor/FunctionEditorInputs.test.js","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/tests/jest/components/function/editor/FunctionEditorInputsItem.test.js","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/tests/jest/components/function/editor/FunctionEditorName.test.js","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/tests/jest/components/function/editor/FunctionEditorOutput.test.js","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/tests/jest/components/function/viewer/FunctionViewerAbout.test.js","messages":[{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":44,"column":71,"nodeType":"FunctionExpression","messageId":"forbidden","endLine":49,"endColumn":3},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":51,"column":75,"nodeType":"FunctionExpression","messageId":"forbidden","endLine":85,"endColumn":3},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":87,"column":51,"nodeType":"FunctionExpression","messageId":"forbidden","endLine":111,"endColumn":3},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":114,"column":81,"nodeType":"FunctionExpression","messageId":"forbidden","endLine":138,"endColumn":3}],"suppressedMessages":[],"errorCount":4,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":"/*!\n * WikiLambda unit test suite for the FunctionViewerAbout component and related files.\n *\n * @copyright 2020– Abstract Wikipedia team; see AUTHORS.txt\n * @license MIT\n */\n'use strict';\n\nvar shallowMount = require( '@vue/test-utils' ).shallowMount,\n\tcreateGettersWithFunctionsMock = require( '../../../helpers/getterHelpers.js' ).createGettersWithFunctionsMock,\n\tConstants = require( '../../../../../resources/ext.wikilambda.edit/Constants.js' ),\n\tFunctionViewerAbout = require( '../../../../../resources/ext.wikilambda.edit/components/function/viewer/FunctionViewerAbout.vue' );\n\ndescribe( 'FunctionViewerAbout', function () {\n\tvar getters;\n\tvar actions;\n\n\tconst otherId = 1;\n\tconst multilingualStringValueId = 2;\n\tconst multiLingualStringsetId = 3;\n\tconst monolingualStringsetId = 4;\n\tconst zFunctionTestersId = 5;\n\tconst zFunctionTesterId = 6;\n\n\tbeforeEach( function () {\n\t\tgetters = {\n\t\t\tgetUserZlangZID: jest.fn().mockReturnValue( Constants.Z_NATURAL_LANGUAGE_ENGLISH ),\n\t\t\tgetNestedZObjectById: createGettersWithFunctionsMock( { id: otherId } ),\n\t\t\tgetAllItemsFromListById: createGettersWithFunctionsMock( [] )\n\t\t};\n\n\t\tglobal.store.hotUpdate( {\n\t\t\tgetters: getters,\n\t\t\tactions: actions\n\t\t} );\n\t} );\n\n\tit( 'renders without errors', function () {\n\t\tvar wrapper = shallowMount( FunctionViewerAbout );\n\n\t\texpect( wrapper.find( '.ext-wikilambda-function-about' ).exists() ).toBeTruthy();\n\t} );\n\n\tit( 'does not display the sidebar if there are no aliases or names', async function () {\n\t\tvar wrapper = shallowMount( FunctionViewerAbout );\n\n\t\tawait wrapper.vm.$nextTick();\n\t\texpect( wrapper.find( '.ext-wikilambda-function-about__sidebar' ).exists() ).toBeFalsy();\n\t} );\n\n\tit( 'displays the sidebar if there are names in an additional language', async function () {\n\t\tgetters.getNestedZObjectById = () => ( id, keys ) => {\n\t\t\tif ( id === 0 &&\n\t\t\t\tkeys[ 0 ] === Constants.Z_PERSISTENTOBJECT_LABEL &&\n\t\t\t\tkeys[ 1 ] === Constants.Z_MULTILINGUALSTRING_VALUE ) {\n\t\t\t\treturn { id: multilingualStringValueId };\n\t\t\t} else if ( id === monolingualStringsetId && keys.length === 2 &&\n\t\t\t\tkeys[ 0 ] === Constants.Z_MONOLINGUALSTRING_LANGUAGE &&\n\t\t\t\tkeys[ 1 ] === Constants.Z_REFERENCE_ID ) {\n\t\t\t\treturn { value: Constants.Z_NATURAL_LANGUAGE_AFRIKAANS };\n\t\t\t} else if ( id === monolingualStringsetId && keys.length === 2 &&\n\t\t\t\tkeys[ 0 ] === Constants.Z_MONOLINGUALSTRING_VALUE &&\n\t\t\t\tkeys[ 1 ] === Constants.Z_STRING_VALUE ) {\n\t\t\t\treturn { value: 'Afrikaans name' };\n\t\t\t} else {\n\t\t\t\treturn { id: otherId };\n\t\t\t}\n\t\t};\n\n\t\tgetters.getAllItemsFromListById = () => ( id ) => {\n\t\t\tif ( id === multilingualStringValueId ) {\n\t\t\t\treturn [ { id: monolingualStringsetId, key: '1', value: 'object' } ];\n\t\t\t} else {\n\t\t\t\treturn [];\n\t\t\t}\n\t\t};\n\n\t\tglobal.store.hotUpdate( {\n\t\t\tgetters: getters\n\t\t} );\n\n\t\tvar wrapper = shallowMount( FunctionViewerAbout );\n\n\t\texpect( wrapper.find( '.ext-wikilambda-function-about__sidebar' ).exists() ).toBeTruthy();\n\t} );\n\n\tit( 'displays the sidebar if there are aliases', async function () {\n\t\tgetters.getNestedZObjectById = () => ( id, keys ) => {\n\t\t\tif ( keys[ 0 ] === Constants.Z_PERSISTENTOBJECT_ALIASES &&\n\t\t\t\tkeys[ 1 ] === Constants.Z_MULTILINGUALSTRINGSET_VALUE ) {\n\t\t\t\treturn { id: multiLingualStringsetId };\n\t\t\t} else {\n\t\t\t\treturn { id: otherId };\n\t\t\t}\n\t\t};\n\t\tgetters.getAllItemsFromListById = () => ( id ) => {\n\t\t\tif ( id === multiLingualStringsetId ) {\n\t\t\t\treturn [ { id: monolingualStringsetId, key: '1', value: 'object', parent: otherId } ];\n\t\t\t} else {\n\t\t\t\treturn [];\n\t\t\t}\n\t\t};\n\n\t\tglobal.store.hotUpdate( {\n\t\t\tgetters: getters\n\t\t} );\n\n\t\tvar wrapper = shallowMount( FunctionViewerAbout );\n\n\t\texpect( wrapper.find( '.ext-wikilambda-function-about__sidebar' ).exists() ).toBeTruthy();\n\t} );\n\n\t// TODO(T320274): Update this test for showing the sidebar once tester examples table fixed and reimplemented.\n\tit( 'does not display the sidebar for tester examples as the table is hidden', async function () {\n\t\tgetters.getNestedZObjectById = () => ( id, keys ) => {\n\t\t\tif ( keys[ 0 ] === Constants.Z_PERSISTENTOBJECT_VALUE &&\n\t\t\t\tkeys[ 1 ] === Constants.Z_FUNCTION_TESTERS ) {\n\t\t\t\treturn { id: zFunctionTestersId };\n\t\t\t} else {\n\t\t\t\treturn { id: otherId };\n\t\t\t}\n\t\t};\n\t\tgetters.getAllItemsFromListById = () => ( id ) => {\n\t\t\tif ( id === zFunctionTestersId ) {\n\t\t\t\treturn [ { id: zFunctionTesterId, key: '1', value: 'object', parent: otherId } ];\n\t\t\t} else {\n\t\t\t\treturn [];\n\t\t\t}\n\t\t};\n\n\t\tglobal.store.hotUpdate( {\n\t\t\tgetters: getters\n\t\t} );\n\n\t\tvar wrapper = shallowMount( FunctionViewerAbout );\n\n\t\texpect( wrapper.find( '.ext-wikilambda-function-about__sidebar' ).exists() ).toBeFalsy();\n\t} );\n} );\n","usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/tests/jest/components/function/viewer/FunctionViewerAboutAliases.test.js","messages":[{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":176,"column":68,"nodeType":"FunctionExpression","messageId":"forbidden","endLine":181,"endColumn":3},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":183,"column":103,"nodeType":"FunctionExpression","messageId":"forbidden","endLine":191,"endColumn":3}],"suppressedMessages":[],"errorCount":2,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":"/*!\n * WikiLambda unit test suite for the function-viewer-aliases component and related files.\n *\n * @copyright 2020– Abstract Wikipedia team; see AUTHORS.txt\n * @license MIT\n */\n'use strict';\n\nvar VueTestUtils = require( '@vue/test-utils' ),\n\tConstants = require( '../../../../../resources/ext.wikilambda.edit/Constants.js' ),\n\tcreateGettersWithFunctionsMock = require( '../../../helpers/getterHelpers.js' ).createGettersWithFunctionsMock,\n\tFunctionViewerAliases = require( '../../../../../resources/ext.wikilambda.edit/components/function/viewer/about/FunctionViewerAboutAliases.vue' ),\n\tFunctionViewerSidebar = require( '../../../../../resources/ext.wikilambda.edit/components/function/viewer/FunctionViewerSidebar.vue' );\n\ndescribe( 'FunctionViewerAliases', function () {\n\tvar getters;\n\tconst multilingualStringsetValueId = 1;\n\tconst monolingualStringsetId = 2;\n\tconst englishMonolingualStringsetLanguageId = 3;\n\tconst afrikaansMonolingualStringsetLanguageId = 4;\n\tconst englishMonolingualStringsetValueId = 5;\n\tconst afrikaansMonolingualStringsetValueId = 6;\n\tconst multilingualStringValueId = 7;\n\tconst afrikaansStringId = 8;\n\tconst englishStringId = 9;\n\tconst stringId = 10;\n\tbeforeEach( function () {\n\t\tgetters = {\n\t\t\tgetUserZlangZID: jest.fn().mockReturnValue( Constants.Z_NATURAL_LANGUAGE_ENGLISH ),\n\t\t\tgetZkeys: jest.fn( function () {\n\t\t\t\treturn {\n\t\t\t\t\t[ Constants.Z_NATURAL_LANGUAGE_AFRIKAANS ]: {\n\t\t\t\t\t\t[ Constants.Z_PERSISTENTOBJECT_VALUE ]: {\n\t\t\t\t\t\t\t[ Constants.Z_NATURAL_LANGUAGE_ISO_CODE ]: Constants.Z_NATURAL_LANGUAGE_ISO_CODE\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\t[ Constants.Z_NATURAL_LANGUAGE_ENGLISH ]: {\n\t\t\t\t\t\t[ Constants.Z_PERSISTENTOBJECT_VALUE ]: {\n\t\t\t\t\t\t\t[ Constants.Z_NATURAL_LANGUAGE_ISO_CODE ]: Constants.Z_NATURAL_LANGUAGE_ISO_CODE\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t} ),\n\t\t\tgetZkeyLabels: () => {\n\t\t\t\treturn {\n\t\t\t\t\t[ Constants.Z_NATURAL_LANGUAGE_AFRIKAANS ]: 'AF',\n\t\t\t\t\t[ Constants.Z_NATURAL_LANGUAGE_ENGLISH ]: 'EN'\n\t\t\t\t};\n\t\t\t},\n\t\t\tgetAllItemsFromListById: () => ( parentId ) => {\n\t\t\t\tif ( parentId === multilingualStringsetValueId ) {\n\t\t\t\t\treturn [ { id: monolingualStringsetId } ];\n\t\t\t\t} else if ( parentId === multilingualStringValueId ) {\n\t\t\t\t\treturn [ { id: englishMonolingualStringsetLanguageId, key: '1', value: 'object' },\n\t\t\t\t\t\t{ id: afrikaansMonolingualStringsetLanguageId, key: '2', value: 'object' } ];\n\t\t\t\t} else if ( parentId === englishMonolingualStringsetValueId ) {\n\t\t\t\t\treturn [ { id: englishStringId, key: '1', value: 'object', language: Constants.Z_NATURAL_LANGUAGE_ENGLISH,\n\t\t\t\t\t\tlanguageString: { value: 'english alias' } } ];\n\t\t\t\t} else if ( parentId === afrikaansMonolingualStringsetValueId ) {\n\t\t\t\t\treturn [ { id: afrikaansStringId, key: '2', value: 'object', language: Constants.Z_NATURAL_LANGUAGE_AFRIKAANS,\n\t\t\t\t\t\tlanguageString: { value: 'afrikaans alias' } } ];\n\t\t\t\t} else if ( parentId === afrikaansMonolingualStringsetLanguageId ) {\n\t\t\t\t\treturn [ { id: stringId, key: '1', value: 'object' } ];\n\t\t\t\t} else if ( parentId === englishMonolingualStringsetLanguageId ) {\n\t\t\t\t\treturn [ { id: stringId, key: '1', value: 'object' } ];\n\t\t\t\t}\n\t\t\t},\n\t\t\tgetNestedZObjectById: () => ( id, keys ) => {\n\t\t\t\tif ( id === 0 && keys.length === 2 &&\n\t\t\t\t\tkeys[ 0 ] === Constants.Z_PERSISTENTOBJECT_ALIASES &&\n\t\t\t\t\tkeys[ 1 ] === Constants.Z_MULTILINGUALSTRINGSET_VALUE ) {\n\t\t\t\t\treturn { id: multilingualStringsetValueId };\n\t\t\t\t} else if ( id === 0 &&\n\t\t\t\t\tkeys[ 0 ] === Constants.Z_PERSISTENTOBJECT_LABEL &&\n\t\t\t\t\tkeys[ 1 ] === Constants.Z_MULTILINGUALSTRING_VALUE ) {\n\t\t\t\t\treturn { id: multilingualStringValueId };\n\t\t\t\t} else if ( id === englishMonolingualStringsetLanguageId && keys.length === 2 &&\n\t\t\t\t\tkeys[ 0 ] === Constants.Z_MONOLINGUALSTRINGSET_LANGUAGE &&\n\t\t\t\t\tkeys[ 1 ] === Constants.Z_REFERENCE_ID ) {\n\t\t\t\t\treturn { value: Constants.Z_NATURAL_LANGUAGE_ENGLISH };\n\t\t\t\t} else if ( id === afrikaansMonolingualStringsetLanguageId && keys.length === 2 &&\n\t\t\t\t\tkeys[ 0 ] === Constants.Z_MONOLINGUALSTRINGSET_LANGUAGE &&\n\t\t\t\t\tkeys[ 1 ] === Constants.Z_REFERENCE_ID ) {\n\t\t\t\t\treturn { value: Constants.Z_NATURAL_LANGUAGE_AFRIKAANS };\n\t\t\t\t} else if ( id === englishMonolingualStringsetLanguageId && keys.length === 1 &&\n\t\t\t\t\tkeys[ 0 ] === Constants.Z_MONOLINGUALSTRINGSET_VALUE ) {\n\t\t\t\t\treturn { id: englishMonolingualStringsetValueId };\n\t\t\t\t} else if ( id === afrikaansMonolingualStringsetLanguageId && keys.length === 1 &&\n\t\t\t\t\tkeys[ 0 ] === Constants.Z_MONOLINGUALSTRINGSET_VALUE ) {\n\t\t\t\t\treturn { id: afrikaansMonolingualStringsetValueId };\n\t\t\t\t}\n\t\t\t},\n\t\t\tgetZObjectChildrenById: () => ( parentId ) => {\n\t\t\t\tif ( parentId === multilingualStringsetValueId ) {\n\t\t\t\t\treturn [\n\t\t\t\t\t\t{ id: englishMonolingualStringsetLanguageId, key: Constants.Z_MONOLINGUALSTRINGSET_LANGUAGE },\n\t\t\t\t\t\t{ id: afrikaansMonolingualStringsetLanguageId, key: Constants.Z_MONOLINGUALSTRINGSET_LANGUAGE }\n\t\t\t\t\t];\n\t\t\t\t}\n\t\t\t},\n\t\t\tgetZObjectAsJsonById: createGettersWithFunctionsMock(\n\t\t\t\t{\n\t\t\t\t\t[ Constants.Z_OBJECT_TYPE ]: {\n\t\t\t\t\t\t[ Constants.Z_OBJECT_TYPE ]: Constants.Z_REFERENCE,\n\t\t\t\t\t\t[ Constants.Z_REFERENCE_ID ]: Constants.Z_MULTILINGUALSTRINGSET\n\t\t\t\t\t},\n\t\t\t\t\t[ Constants.Z_MULTILINGUALSTRINGSET_VALUE ]: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t[ Constants.Z_OBJECT_TYPE ]: Constants.Z_REFERENCE,\n\t\t\t\t\t\t\t[ Constants.Z_REFERENCE_ID ]: Constants.Z_MONOLINGUALSTRINGSET\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t[ Constants.Z_OBJECT_TYPE ]: {\n\t\t\t\t\t\t\t\t[ Constants.Z_OBJECT_TYPE ]: Constants.Z_REFERENCE,\n\t\t\t\t\t\t\t\t[ Constants.Z_REFERENCE_ID ]: Constants.Z_MONOLINGUALSTRINGSET\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t[ Constants.Z_MONOLINGUALSTRINGSET_LANGUAGE ]: {\n\t\t\t\t\t\t\t\t[ Constants.Z_OBJECT_TYPE ]: Constants.Z_REFERENCE,\n\t\t\t\t\t\t\t\t[ Constants.Z_REFERENCE_ID ]: Constants.Z_NATURAL_LANGUAGE_ENGLISH\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t[ Constants.Z_MONOLINGUALSTRINGSET_VALUE ]: [\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t[ Constants.Z_OBJECT_TYPE ]: Constants.Z_REFERENCE,\n\t\t\t\t\t\t\t\t\t[ Constants.Z_REFERENCE_ID ]: Constants.Z_STRING\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t[ Constants.Z_OBJECT_TYPE ]: Constants.Z_STRING,\n\t\t\t\t\t\t\t\t\t[ Constants.Z_STRING_VALUE ]: 'English alias'\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t]\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t[ Constants.Z_OBJECT_TYPE ]: {\n\t\t\t\t\t\t\t\t[ Constants.Z_OBJECT_TYPE ]: Constants.Z_REFERENCE,\n\t\t\t\t\t\t\t\t[ Constants.Z_REFERENCE_ID ]: Constants.Z_MONOLINGUALSTRINGSET\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t[ Constants.Z_MONOLINGUALSTRINGSET_LANGUAGE ]: {\n\t\t\t\t\t\t\t\t[ Constants.Z_OBJECT_TYPE ]: Constants.Z_REFERENCE,\n\t\t\t\t\t\t\t\t[ Constants.Z_REFERENCE_ID ]: Constants.Z_NATURAL_LANGUAGE_AFRIKAANS\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t[ Constants.Z_MONOLINGUALSTRINGSET_VALUE ]: [\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t[ Constants.Z_OBJECT_TYPE ]: Constants.Z_REFERENCE,\n\t\t\t\t\t\t\t\t\t[ Constants.Z_REFERENCE_ID ]: Constants.Z_STRING\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t[ Constants.Z_OBJECT_TYPE ]: Constants.Z_STRING,\n\t\t\t\t\t\t\t\t\t[ Constants.Z_STRING_VALUE ]: 'Afrikaans alias'\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t]\n\t\t\t\t\t\t}\n\t\t\t\t\t]\n\t\t\t\t}\n\t\t\t)\n\t\t};\n\t\tglobal.store.hotUpdate( {\n\t\t\tgetters: getters\n\t\t} );\n\t} );\n\n\tit( 'renders without errors the sidebar component', function () {\n\t\tvar wrapper = VueTestUtils.shallowMount( FunctionViewerAliases );\n\n\t\texpect( wrapper.find( '.ext-wikilambda-function-viewer-aliases' ).exists() ).toBeTruthy();\n\t\texpect( wrapper.findComponent( FunctionViewerSidebar ).exists() ).toBeTruthy();\n\t\texpect( wrapper.find( '.ext-wikilambda-function-viewer-aliases__header' ).text() ).toEqual( 'Also known as' );\n\t} );\n\n\tit( 'filters function aliases to current language when showAllLangs is false', function () {\n\t\tvar wrapper = VueTestUtils.shallowMount( FunctionViewerAliases );\n\t\tvar selectedFunctionAliases = wrapper.vm.getSelectedAliases( 'Z1002' );\n\n\t\texpect( selectedFunctionAliases ).toEqual( [ { isoCode: 'Z60K1', label: 'english alias', language: 'Z1002', languageLabel: 'EN' } ] );\n\t} );\n\n\tit( 'displays an alias chip for every alias in current language', async function () {\n\t\tvar wrapper = VueTestUtils.mount( FunctionViewerAliases );\n\n\t\texpect( wrapper.findAll( '.ext-wikilambda-function-viewer-sidebar__chip-item' ).length ).toBe( 1 );\n\t\texpect( wrapper.findAll( '.ext-wikilambda-function-viewer-sidebar__chip-container' )[ 0 ].text() ).toBe( 'Z60K1 english alias' );\n\t} );\n\n\tit( 'displays an alias chip for all languages when show more languages expansion button is clicked', async function () {\n\t\tvar wrapper = VueTestUtils.mount( FunctionViewerAliases );\n\n\t\tawait wrapper.findComponent( '.ext-wikilambda-function-viewer-sidebar__button' ).trigger( 'click' );\n\t\tawait wrapper.vm.$nextTick();\n\n\t\texpect( wrapper.findAll( '.ext-wikilambda-function-viewer-sidebar__chip-item' ).length ).toBe( 2 );\n\t\texpect( wrapper.findAll( '.ext-wikilambda-function-viewer-sidebar__chip-container' )[ 1 ].text() ).toBe( 'Z60K1 afrikaans alias' );\n\t} );\n} );\n","usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/tests/jest/components/function/viewer/FunctionViewerAboutExamples.test.js","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/tests/jest/components/function/viewer/FunctionViewerAboutNames.test.js","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/tests/jest/components/function/viewer/FunctionViewerDetails.test.js","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/tests/jest/components/function/viewer/FunctionViewerDetailsSidebar.test.js","messages":[{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":116,"column":97,"nodeType":"FunctionExpression","messageId":"forbidden","endLine":145,"endColumn":3}],"suppressedMessages":[],"errorCount":1,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":"/*!\n * WikiLambda unit test suite for the function-viewer-details-sidebar component and related files.\n *\n * @copyright 2020– Abstract Wikipedia team; see AUTHORS.txt\n * @license MIT\n */\n\n'use strict';\n\nvar VueTestUtils = require( '@vue/test-utils' ),\n\tConstants = require( '../../../../../resources/ext.wikilambda.edit/Constants.js' ),\n\tcreateGettersWithFunctionsMock = require( '../../../helpers/getterHelpers.js' ).createGettersWithFunctionsMock,\n\tFunctionViewerSidebar = require( '../../../../../resources/ext.wikilambda.edit/components/function/viewer/details/FunctionViewerDetailsSidebar.vue' );\n\ndescribe( 'FunctionViewerDetailsSidebar', function () {\n\tvar getters;\n\tconst idLangOne = 1;\n\tconst idLangTwo = 2;\n\tconst idLangThree = 3;\n\tconst idLangOneChild = 4;\n\tconst idZ17K3 = 5;\n\tconst idZ12K1 = 6;\n\tbeforeEach( function () {\n\t\tgetters = {\n\t\t\tgetCurrentZObjectId: jest.fn( function () {\n\t\t\t\treturn 'Z12345';\n\t\t\t} ),\n\t\t\tgetAllItemsFromListById: createGettersWithFunctionsMock( [\n\t\t\t\t{\n\t\t\t\t\tid: idLangOne,\n\t\t\t\t\tkey: '1',\n\t\t\t\t\tvalue: 'object',\n\t\t\t\t\tparent: 2\n\t\t\t\t}\n\t\t\t] ),\n\t\t\tgetZObjectChildrenById: jest.fn( function () {\n\t\t\t\treturn function ( id ) {\n\t\t\t\t\tswitch ( id ) {\n\t\t\t\t\t\tcase idLangOne:\n\t\t\t\t\t\t\treturn [\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tid: idLangOneChild,\n\t\t\t\t\t\t\t\t\tkey: '2',\n\t\t\t\t\t\t\t\t\tvalue: 'array',\n\t\t\t\t\t\t\t\t\tparent: 2\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t];\n\t\t\t\t\t\tcase idZ17K3:\n\t\t\t\t\t\t\treturn [\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tid: idZ12K1,\n\t\t\t\t\t\t\t\t\tkey: 'Z12K1',\n\t\t\t\t\t\t\t\t\tvalue: 'array',\n\t\t\t\t\t\t\t\t\tparent: 5\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t];\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\treturn [\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tid: idZ17K3,\n\t\t\t\t\t\t\t\t\tkey: 'Z17K3',\n\t\t\t\t\t\t\t\t\tvalue: 'object',\n\t\t\t\t\t\t\t\t\tparent: 6\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t];\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t} ),\n\t\t\tgetNestedZObjectById: createGettersWithFunctionsMock( { id: idLangOne, value: Constants.Z_STRING } ),\n\t\t\tgetZkeyLabels: jest.fn( function () {\n\t\t\t\treturn {};\n\t\t\t} ),\n\t\t\tgetCurrentZLanguage: jest.fn(),\n\t\t\tgetZObjectTypeById: createGettersWithFunctionsMock( Constants.Z_REFERENCE )\n\t\t};\n\n\t\tglobal.store.hotUpdate( {\n\t\t\tgetters: getters\n\t\t} );\n\t} );\n\n\tit( 'renders without errors', function () {\n\t\tvar wrapper = VueTestUtils.shallowMount( FunctionViewerSidebar );\n\n\t\texpect( wrapper.find( '.ext-wikilambda-function-viewer-details-sidebar' ).exists() ).toBeTruthy();\n\t} );\n\n\tit( 'returns the correct url for creating an implementation', function () {\n\t\tvar wrapper = VueTestUtils.shallowMount( FunctionViewerSidebar );\n\t\tvar link = wrapper.find( '#ext-wikilambda-function-viewer-details-sidebar__link--implementation' );\n\n\t\texpect( link.attributes( 'href' ) ).toBeTruthy();\n\t\texpect( link.attributes().href ).toContain( Constants.PATHS.CREATE_Z_OBJECT_TITLE );\n\t\texpect( link.attributes().href ).toContain( 'zid=' + Constants.Z_IMPLEMENTATION );\n\t\texpect( link.attributes().href ).toContain( Constants.Z_IMPLEMENTATION_FUNCTION + '=Z12345' );\n\n\t} );\n\n\tit( 'returns the correct url for creating a tester', function () {\n\t\tvar wrapper = VueTestUtils.shallowMount( FunctionViewerSidebar );\n\t\tvar link = wrapper.find( '#ext-wikilambda-function-viewer-details-sidebar__link--tester' );\n\n\t\texpect( link.attributes( 'href' ) ).toBeTruthy();\n\t\texpect( link.attributes().href ).toContain( Constants.PATHS.CREATE_Z_OBJECT_TITLE );\n\t\texpect( link.attributes().href ).toContain( 'zid=' + Constants.Z_TESTER );\n\t\texpect( link.attributes().href ).toContain( Constants.Z_TESTER_FUNCTION + '=Z12345' );\n\n\t} );\n\n\tit( 'does not render the show more languages button if there is only one language', function () {\n\t\tvar wrapper = VueTestUtils.shallowMount( FunctionViewerSidebar );\n\n\t\texpect( wrapper.find( '.ext-wikilambda-function-viewer-details-sidebar__button' ).exists() ).toBeFalsy();\n\t} );\n\n\tit( 'renders the show more languages button if there are multiple languages for any argument', async function () {\n\t\tvar wrapper = VueTestUtils.shallowMount( FunctionViewerSidebar );\n\t\tgetters.getAllItemsFromListById = createGettersWithFunctionsMock( [\n\t\t\t{\n\t\t\t\tid: idLangOne,\n\t\t\t\tkey: '1',\n\t\t\t\tvalue: 'object',\n\t\t\t\tparent: 2\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: idLangTwo,\n\t\t\t\tkey: '2',\n\t\t\t\tvalue: 'object',\n\t\t\t\tparent: 2\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: idLangThree,\n\t\t\t\tkey: '2',\n\t\t\t\tvalue: 'object',\n\t\t\t\tparent: 2\n\t\t\t}\n\t\t] );\n\n\t\tglobal.store.hotUpdate( {\n\t\t\tgetters: getters\n\t\t} );\n\n\t\tawait wrapper.vm.$nextTick();\n\t\texpect( wrapper.find( '.ext-wikilambda-function-viewer-details-sidebar__button' ).exists() ).toBeTruthy();\n\t} );\n} );\n","usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/tests/jest/components/function/viewer/FunctionViewerDetailsTable.test.js","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/tests/jest/components/function/viewer/FunctionViewerSidebar.test.js","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/tests/jest/components/function/viewer/ZMetadataDialog.test.js","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/tests/jest/composables/useBreakpoints.test.js","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/tests/jest/helpers/getterHelpers.js","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/tests/jest/helpers/loadComposable.js","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/tests/jest/helpers/zObjectTableHelpers.js","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/tests/jest/integration/AttachFunctionImplementation.test.js","messages":[{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":39,"column":52,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":72,"endColumn":3}],"suppressedMessages":[],"errorCount":1,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":"/*\n * WikiLambda integration test for attaching a function implementation.\n *\n * @copyright 2020– Abstract Wikipedia team; see AUTHORS.txt\n * @license MIT\n */\n'use strict';\n\nrequire( '@testing-library/jest-dom' );\n\nconst { fireEvent, waitFor } = require( '@testing-library/vue' ),\n\t{ within } = require( '@testing-library/dom' ),\n\t{ renderForFunctionViewer, runSetup, runTeardown } = require( './helpers/functionViewerDetailsTestHelpers.js' ),\n\tConstants = require( '../../../resources/ext.wikilambda.edit/Constants.js' ),\n\texistingFunctionFromApi = require( './objects/existingFunctionFromApi.js' ),\n\texistingImplementationInCodeFromApi = require( './objects/existingImplementationInCodeFromApi.js' ),\n\texistingImplementationByCompositionFromApi = require( './objects/existingImplementationByCompositionFromApi.js' ),\n\texistingTesterFromApi = require( './objects/existingTesterFromApi.js' ),\n\texpected = require( './objects/expectedZFunctionWithImplementationsAndTesters.js' );\n\nconst functionZid = existingFunctionFromApi[ Constants.Z_PERSISTENTOBJECT_ID ][ Constants.Z_STRING_VALUE ];\nconst implementationInCodeZid =\n\texistingImplementationInCodeFromApi[ Constants.Z_PERSISTENTOBJECT_ID ][ Constants.Z_STRING_VALUE ];\nconst implementationByCompositionZid =\n\texistingImplementationByCompositionFromApi[ Constants.Z_PERSISTENTOBJECT_ID ][ Constants.Z_STRING_VALUE ];\nconst existingFailedTesterZid = existingTesterFromApi.failedTesterZid;\n\ndescribe( 'WikiLambda frontend, function viewer details tab', () => {\n\tlet apiPostWithEditTokenMock;\n\tbeforeEach( () => {\n\t\tconst setupResult = runSetup();\n\t\tapiPostWithEditTokenMock = setupResult.apiPostWithEditTokenMock;\n\t} );\n\n\tafterEach( () => {\n\t\trunTeardown();\n\t} );\n\n\tit( 'allows attaching a function implementation', async () => {\n\t\tconst { findByLabelText, findByRole } = renderForFunctionViewer();\n\n\t\t// ACT: select the 'details' tab.\n\t\tawait fireEvent.click( await findByRole( 'tab', { name: 'Details' } ) );\n\n\t\t// ASSERT: The \"unattached\" implementation is shown in the table.\n\t\tconst implementationsTable = await findByLabelText( 'Implementations' );\n\t\tconst secondImplementationRow = within( implementationsTable ).getAllByRole( 'row' )[ 2 ];\n\t\tawait waitFor(\n\t\t\t() => expect( secondImplementationRow ).toHaveTextContent( 'Implementation in code, in English' ) );\n\n\t\t// ASSERT: The \"unattached\" implementation is shown as deactivated.\n\t\texpect( secondImplementationRow ).toHaveTextContent( 'Deactivated' );\n\n\t\t// ACT: Select the \"unattached\" implementation in the table.\n\t\tawait fireEvent.update( within( secondImplementationRow ).getByRole( 'checkbox' ), true );\n\n\t\t// ACT: Click approve button.\n\t\tawait fireEvent.click( within( implementationsTable ).getByText( 'Approve' ) );\n\n\t\t// ASSERT: Correct ZObject was posted to the API.\n\t\texpect( apiPostWithEditTokenMock ).toHaveBeenCalledWith( {\n\t\t\taction: 'wikilambda_edit',\n\t\t\tsummary: '',\n\t\t\tzid: functionZid,\n\t\t\tzobject:\n\t\t\t\tJSON.stringify(\n\t\t\t\t\texpected.zFunctionWithImplementationsAndTesters(\n\t\t\t\t\t\t[ implementationByCompositionZid, implementationInCodeZid ], [ existingFailedTesterZid ]\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t} );\n\t} );\n} );\n","usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/tests/jest/integration/AttachFunctionTester.test.js","messages":[{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":37,"column":44,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":72,"endColumn":3}],"suppressedMessages":[],"errorCount":1,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":"/*\n * WikiLambda integration test for attaching a function tester.\n *\n * @copyright 2020– Abstract Wikipedia team; see AUTHORS.txt\n * @license MIT\n */\n'use strict';\n\nrequire( '@testing-library/jest-dom' );\n\nconst { fireEvent, waitFor } = require( '@testing-library/vue' ),\n\t{ within } = require( '@testing-library/dom' ),\n\t{ renderForFunctionViewer, runSetup, runTeardown } = require( './helpers/functionViewerDetailsTestHelpers.js' ),\n\tConstants = require( '../../../resources/ext.wikilambda.edit/Constants.js' ),\n\texistingFunctionFromApi = require( './objects/existingFunctionFromApi.js' ),\n\texistingImplementationByCompositionFromApi = require( './objects/existingImplementationByCompositionFromApi.js' ),\n\texistingTesterFromApi = require( './objects/existingTesterFromApi.js' ),\n\texpected = require( './objects/expectedZFunctionWithImplementationsAndTesters.js' );\n\nconst functionZid = existingFunctionFromApi[ Constants.Z_PERSISTENTOBJECT_ID ][ Constants.Z_STRING_VALUE ];\nconst implementationByCompositionZid =\n\texistingImplementationByCompositionFromApi[ Constants.Z_PERSISTENTOBJECT_ID ][ Constants.Z_STRING_VALUE ];\nconst existingSuccessTesterZid = existingTesterFromApi.successTesterZid;\nconst existingFailedTesterZid = existingTesterFromApi.failedTesterZid;\n\ndescribe( 'WikiLambda frontend, function viewer details tab', () => {\n\tlet apiPostWithEditTokenMock;\n\tbeforeEach( () => {\n\t\tconst setupResult = runSetup();\n\t\tapiPostWithEditTokenMock = setupResult.apiPostWithEditTokenMock;\n\t} );\n\n\tafterEach( () => {\n\t\trunTeardown();\n\t} );\n\n\tit( 'allows attaching a function tester', async () => {\n\t\tconst { findByLabelText, findByRole } = renderForFunctionViewer();\n\n\t\t// ACT: select the 'details' tab.\n\t\tawait fireEvent.click( await findByRole( 'tab', { name: 'Details' } ) );\n\n\t\t// ASSERT: The \"unattached\" tester is shown in the table.\n\t\tconst testersTable = await findByLabelText( 'Test cases' );\n\t\tconst firstTesterRow = within( testersTable ).getAllByRole( 'row' )[ 1 ];\n\t\tawait waitFor( () => expect( firstTesterRow ).toHaveTextContent( 'Tester name, in English' ) );\n\n\t\t// ASSERT: The \"unattached\" tester is shown as deactivated.\n\t\texpect( firstTesterRow ).toHaveTextContent( 'Deactivated' );\n\n\t\t// ASSERT: The \"unattached\" tester shows as passing all implementation tests.\n\t\tawait waitFor( () => expect( within( firstTesterRow ).getAllByText( 'Pass' ) ).toHaveLength( 2 ) );\n\n\t\t// ACT: Select the \"unattached\" implementation in the table.\n\t\tawait fireEvent.update( within( firstTesterRow ).getByRole( 'checkbox' ), true );\n\n\t\t// ACT: Click approve button.\n\t\tawait fireEvent.click( within( testersTable ).getByText( 'Approve' ) );\n\n\t\t// ASSERT: Correct ZObject was posted to the API.\n\t\texpect( apiPostWithEditTokenMock ).toHaveBeenCalledWith( {\n\t\t\taction: 'wikilambda_edit',\n\t\t\tsummary: '',\n\t\t\tzid: functionZid,\n\t\t\tzobject:\n\t\t\t\tJSON.stringify(\n\t\t\t\t\texpected.zFunctionWithImplementationsAndTesters(\n\t\t\t\t\t\t[ implementationByCompositionZid ], [ existingFailedTesterZid, existingSuccessTesterZid ]\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t} );\n\t} );\n} );\n","usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/tests/jest/integration/CancelEditExistingFunction.test.js","messages":[{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":72,"column":43,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":81,"endColumn":3},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":83,"column":41,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":109,"endColumn":3}],"suppressedMessages":[],"errorCount":2,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":"/*!\n * WikiLambda integration test for cancelling out of the function editor on an existing zobject.\n *\n * @copyright 2020– Abstract Wikipedia team; see AUTHORS.txt\n * @license MIT\n */\n'use strict';\n\nrequire( '@testing-library/jest-dom' );\n\nconst { fireEvent, render, waitFor } = require( '@testing-library/vue' ),\n\t{ within } = require( '@testing-library/dom' ),\n\t{ clickLookupResult } = require( './helpers/interactionHelpers.js' ),\n\t{ runSetup, runTeardown } = require( './helpers/functionEditorTestHelpers.js' ),\n\tConstants = require( '../../../resources/ext.wikilambda.edit/Constants.js' ),\n\tstore = require( '../../../resources/ext.wikilambda.edit/store/index.js' ),\n\tApp = require( '../../../resources/ext.wikilambda.edit/components/App.vue' ),\n\tapiGetMock = require( './helpers/apiGetMock.js' ),\n\tApiMock = require( './helpers/apiMock.js' ),\n\texistingFunctionFromApi = require( './objects/existingFunctionFromApi.js' );\n\nconst functionZid = existingFunctionFromApi[ Constants.Z_PERSISTENTOBJECT_ID ][ Constants.Z_STRING_VALUE ];\n\nconst lookupZObjectLanguageLabels =\n\tnew ApiMock( apiGetMock.languageLabelsRequest, apiGetMock.labelsResponse, apiGetMock.labelsMatcher );\nconst initializeRootZObject =\n\tnew ApiMock( apiGetMock.loadZObjectsRequest, apiGetMock.loadZObjectsResponse, apiGetMock.loadZObjectsMatcher );\n\ndescribe( 'WikiLambda frontend, function-editor view, on a new function', () => {\n\tlet apiPostWithEditTokenMock;\n\tbeforeEach( () => {\n\t\tconst setupResult = runSetup();\n\t\tapiPostWithEditTokenMock = setupResult.apiPostWithEditTokenMock;\n\n\t\tmw.Api = jest.fn( () => {\n\t\t\treturn {\n\t\t\t\tpostWithEditToken: apiPostWithEditTokenMock,\n\t\t\t\tget: apiGetMock.createMockApi( [\n\t\t\t\t\tlookupZObjectLanguageLabels,\n\t\t\t\t\tinitializeRootZObject ] )\n\t\t\t};\n\t\t} );\n\n\t\twindow.mw.Uri.mockImplementation( () => {\n\t\t\treturn {\n\t\t\t\tquery: {\n\t\t\t\t\taction: Constants.ACTIONS.EDIT,\n\t\t\t\t\ttitle: functionZid\n\t\t\t\t},\n\t\t\t\tpath: new window.mw.Title( functionZid ).getUrl( {\n\t\t\t\t\ttitle: functionZid, action: Constants.ACTIONS.EDIT\n\t\t\t\t} )\n\t\t\t};\n\t\t} );\n\t\tglobal.mw.config.get = ( endpoint ) => {\n\t\t\tswitch ( endpoint ) {\n\t\t\t\tcase 'wgWikiLambda':\n\t\t\t\t\treturn {\n\t\t\t\t\t\tzlangZid: Constants.Z_NATURAL_LANGUAGE_ENGLISH,\n\t\t\t\t\t\tzId: functionZid\n\t\t\t\t\t};\n\t\t\t\tdefault:\n\t\t\t\t\treturn {};\n\t\t\t}\n\t\t};\n\t} );\n\n\tafterEach( () => {\n\t\trunTeardown();\n\t} );\n\n\tit( 'allows cancelling with no changes', async () => {\n\t\tconst { findByText } =\n\t\t\trender( App, { global: { plugins: [ store ] } } );\n\n\t\t// ACT: Click cancel button.\n\t\tawait fireEvent.click( await findByText( 'Cancel' ) );\n\n\t\t// ASSERT: Routed back to the ZObject page.\n\t\tawait waitFor( () => expect( window.location.href ).toEqual( '/wiki/Z12345' ) );\n\t} );\n\n\tit( 'allows cancelling after changes', async () => {\n\t\tconst { getByText, findByRole, findByText, getAllByLabelText } =\n\t\t\trender( App, { global: { plugins: [ store ] } } );\n\n\t\t// ACT: Click \"Add labels in another language\".\n\t\tawait fireEvent.click( await findByText( 'Add labels in another language' ) );\n\n\t\t// ACT: Select French as a third natural language.\n\t\tconst thirdLanguageSelector = getAllByLabelText( 'Language' )[ 2 ];\n\t\tawait fireEvent.update( within( thirdLanguageSelector ).getByRole( 'combobox' ), 'Fren' );\n\t\tawait clickLookupResult( thirdLanguageSelector, 'French' );\n\n\t\t// ACT: Click cancel button.\n\t\tawait fireEvent.click( getByText( 'Cancel' ) );\n\n\t\t// ACT: Click continue editing in the dialog.\n\t\tawait fireEvent.click( within( await findByRole( 'dialog' ) ).getByText( 'Continue editing' ) );\n\n\t\t// ACT: Click cancel button again.\n\t\tawait fireEvent.click( getByText( 'Cancel' ) );\n\n\t\t// ACT: Click discard edits in the dialog.\n\t\tawait fireEvent.click( within( await findByRole( 'dialog' ) ).getByText( 'Discard edits' ) );\n\n\t\t// ASSERT: Routed back to the ZObject page.\n\t\tawait waitFor( () => expect( window.location.href ).toEqual( '/wiki/Z12345' ) );\n\t} );\n} );\n","usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/tests/jest/integration/CancelEditNewFunction.test.js","messages":[{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":52,"column":43,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":61,"endColumn":3},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":63,"column":41,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":86,"endColumn":3}],"suppressedMessages":[],"errorCount":2,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":"/*!\n * WikiLambda integration test for cancelling out of the function editor on a new zobject.\n *\n * @copyright 2020– Abstract Wikipedia team; see AUTHORS.txt\n * @license MIT\n */\n'use strict';\n\nrequire( '@testing-library/jest-dom' );\n\nconst { fireEvent, render, waitFor } = require( '@testing-library/vue' ),\n\t{ within } = require( '@testing-library/dom' ),\n\t{ clickLookupResult } = require( './helpers/interactionHelpers.js' ),\n\t{ runSetup, runTeardown } = require( './helpers/functionEditorTestHelpers.js' ),\n\tConstants = require( '../../../resources/ext.wikilambda.edit/Constants.js' ),\n\tstore = require( '../../../resources/ext.wikilambda.edit/store/index.js' ),\n\tApp = require( '../../../resources/ext.wikilambda.edit/components/App.vue' ),\n\tApiMock = require( './helpers/apiMock.js' ),\n\tapiGetMock = require( './helpers/apiGetMock.js' );\n\nconst lookupZObjectLanguageLabels =\n\tnew ApiMock( apiGetMock.languageLabelsRequest, apiGetMock.labelsResponse, apiGetMock.labelsMatcher );\nconst initializeRootZObject =\n\tnew ApiMock( apiGetMock.loadZObjectsRequest, apiGetMock.loadZObjectsResponse, apiGetMock.loadZObjectsMatcher );\n\ndescribe( 'WikiLambda frontend, function-editor view, on a new function', () => {\n\tbeforeEach( () => {\n\t\trunSetup();\n\t\tmw.Api = jest.fn( () => {\n\t\t\treturn {\n\t\t\t\tget: apiGetMock.createMockApi( [\n\t\t\t\t\tlookupZObjectLanguageLabels,\n\t\t\t\t\tinitializeRootZObject\n\t\t\t\t] )\n\t\t\t};\n\t\t} );\n\t\tconst queryParams = {\n\t\t\tzid: Constants.Z_FUNCTION\n\t\t};\n\t\twindow.mw.Uri.mockImplementationOnce( function () {\n\t\t\treturn {\n\t\t\t\tquery: queryParams,\n\t\t\t\tpath: new window.mw.Title( Constants.PATHS.CREATE_Z_OBJECT_TITLE ).getUrl( queryParams )\n\t\t\t};\n\t\t} );\n\t} );\n\n\tafterEach( () => {\n\t\trunTeardown();\n\t} );\n\n\tit( 'allows cancelling with no changes', async () => {\n\t\tconst { findByText } =\n\t\t\trender( App, { global: { plugins: [ store ] } } );\n\n\t\t// ACT: Click cancel button.\n\t\tawait fireEvent.click( await findByText( 'Cancel' ) );\n\n\t\t// ASSERT: Routed back to the Wikifunctions main page.\n\t\tawait waitFor( () => expect( window.location.href ).toEqual( '/wiki/Wikifunctions:Main_Page' ) );\n\t} );\n\n\tit( 'allows cancelling after changes', async () => {\n\t\tconst { getByText, findByRole, findByLabelText } =\n\t\t\trender( App, { global: { plugins: [ store ] } } );\n\n\t\t// ACT: Select Chinese as the natural language.\n\t\tconst languageSelector = await findByLabelText( 'Language' );\n\t\tawait fireEvent.update( within( languageSelector ).getByRole( 'combobox' ), 'Chin' );\n\t\tawait clickLookupResult( languageSelector, 'Chinese' );\n\n\t\t// ACT: Click cancel button.\n\t\tawait fireEvent.click( getByText( 'Cancel' ) );\n\n\t\t// ACT: Click continue editing in the dialog.\n\t\tawait fireEvent.click( within( await findByRole( 'dialog' ) ).getByText( 'Continue editing' ) );\n\n\t\t// ACT: Click cancel button again.\n\t\tawait fireEvent.click( getByText( 'Cancel' ) );\n\n\t\t// ACT: Click discard edits in the dialog.\n\t\tawait fireEvent.click( within( await findByRole( 'dialog' ) ).getByText( 'Discard edits' ) );\n\n\t\t// ASSERT: Routed back to the Wikifunctions main page.\n\t\tawait waitFor( () => expect( window.location.href ).toEqual( '/wiki/Wikifunctions:Main_Page' ) );\n\t} );\n} );\n","usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/tests/jest/integration/CreateNewCodeImplementation.test.js","messages":[{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":28,"column":51,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":68,"endColumn":3}],"suppressedMessages":[],"errorCount":1,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":"/*!\n * WikiLambda integration test for creating new code implementation.\n *\n * @copyright 2020– Abstract Wikipedia team; see AUTHORS.txt\n * @license MIT\n */\n'use strict';\n\nrequire( '@testing-library/jest-dom' );\n\nconst { fireEvent, render, waitFor } = require( '@testing-library/vue' ),\n\t{ within } = require( '@testing-library/dom' ),\n\t{ runSetup, runTeardown } = require( './helpers/implementationEditorTestHelpers.js' ),\n\tstore = require( '../../../resources/ext.wikilambda.edit/store/index.js' ),\n\tApp = require( '../../../resources/ext.wikilambda.edit/components/App.vue' ),\n\texpectedNewCodeImplementationPostedToApi = require( './objects/expectedNewCodeImplementationPostedToApi.js' );\n\ndescribe( 'WikiLambda frontend, on zobject-editor view', () => {\n\tlet apiPostWithEditTokenMock;\n\tbeforeEach( () => {\n\t\tapiPostWithEditTokenMock = runSetup().apiPostWithEditTokenMock;\n\t} );\n\n\tafterEach( () => {\n\t\trunTeardown();\n\t} );\n\n\tit( 'allows creating a new code implementation', async () => {\n\t\tconst { findByLabelText, findByRole, getAllByLabelText, getByText } =\n\t\t\trender( App, { global: { plugins: [ store ] } } );\n\n\t\t// ACT: Enter a name for the implementation.\n\t\tawait fireEvent.update(\n\t\t\twithin( await findByLabelText( 'Labels' ) ).getByRole( 'textbox' ),\n\t\t\t'implementation name' );\n\n\t\t// ASSERT: The function specified in URL is pre-selected.\n\t\texpect( within( getAllByLabelText( 'function:' )[ 0 ] ).getByRole( 'combobox' ) )\n\t\t\t.toHaveDisplayValue( 'function name, in Chinese' );\n\n\t\t// ACT: Choose Code as implementation type.\n\t\tawait fireEvent.click( getByText( 'Code' ) );\n\n\t\t// ACT: Select JavaScript as programming language.\n\t\tawait fireEvent.click( getByText( 'javascript' ) );\n\n\t\t// ACT: Edit the code.\n\t\tawait fireEvent.update(\n\t\t\twithin( await findByLabelText( 'Code editor' ) ).getByRole( 'textbox' ),\n\t\t\t' // TODO: actually implement' );\n\n\t\t// ACT: Click publish button.\n\t\tawait fireEvent.click( getByText( 'Publish' ) );\n\n\t\t// ACT: Click publish button in dialog.\n\t\tawait fireEvent.click( within( await findByRole( 'dialog' ) ).getByText( 'Publish' ) );\n\n\t\t// ASSERT: Location is changed to page returned by API.\n\t\tawait waitFor( () => expect( window.location.href ).toEqual( '/wiki/newPage?success=true' ) );\n\n\t\t// ASSERT: Correct ZObject was posted to the API.\n\t\texpect( apiPostWithEditTokenMock ).toHaveBeenCalledWith( {\n\t\t\taction: 'wikilambda_edit',\n\t\t\tsummary: '',\n\t\t\tzid: undefined,\n\t\t\tzobject: JSON.stringify( expectedNewCodeImplementationPostedToApi )\n\t\t} );\n\t} );\n} );\n","usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/tests/jest/integration/CreateNewCompositionImplementation.test.js","messages":[{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":29,"column":58,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":92,"endColumn":3}],"suppressedMessages":[],"errorCount":1,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":"/*!\n * WikiLambda integration test for creating new composition implementation.\n *\n * @copyright 2020– Abstract Wikipedia team; see AUTHORS.txt\n * @license MIT\n */\n'use strict';\n\nrequire( '@testing-library/jest-dom' );\n\nconst { fireEvent, render, waitFor } = require( '@testing-library/vue' ),\n\t{ within } = require( '@testing-library/dom' ),\n\t{ runSetup, runTeardown } = require( './helpers/implementationEditorTestHelpers.js' ),\n\t{ clickLookupResult } = require( './helpers/interactionHelpers.js' ),\n\tstore = require( '../../../resources/ext.wikilambda.edit/store/index.js' ),\n\tApp = require( '../../../resources/ext.wikilambda.edit/components/App.vue' ),\n\texpectedNewCompositionImplementationPostedToApi = require( './objects/expectedNewCompositionImplementationPostedToApi.js' );\n\ndescribe( 'WikiLambda frontend, on zobject-editor view', () => {\n\tlet apiPostWithEditTokenMock;\n\tbeforeEach( () => {\n\t\tapiPostWithEditTokenMock = runSetup().apiPostWithEditTokenMock;\n\t} );\n\n\tafterEach( () => {\n\t\trunTeardown();\n\t} );\n\n\tit( 'allows creating a new composition implementation', async () => {\n\t\tconst {\n\t\t\tcontainer,\n\t\t\tfindByLabelText,\n\t\t\tfindByRole,\n\t\t\tgetAllByLabelText,\n\t\t\tgetAllByPlaceholderText,\n\t\t\tgetByLabelText,\n\t\t\tgetByRole,\n\t\t\tgetByText\n\t\t} = render( App, { global: { plugins: [ store ] } } );\n\n\t\t// ACT: Enter a name for the implementation.\n\t\tawait fireEvent.update(\n\t\t\twithin( await findByLabelText( 'Labels' ) ).getByRole( 'textbox' ),\n\t\t\t'implementation name' );\n\n\t\t// ASSERT: The function specified in URL is pre-selected.\n\t\texpect( within( getAllByLabelText( 'function:' )[ 0 ] ).getByRole( 'combobox' ) )\n\t\t\t.toHaveDisplayValue( 'function name, in Chinese' );\n\n\t\t// ASSERT: Composition is pre-selected as implementation type.\n\t\texpect( getByRole( 'combobox', { name: 'Composition' } ) ).toBeInTheDocument();\n\n\t\t// ACT: Choose function for composition.\n\t\tawait fireEvent.update( getAllByPlaceholderText( 'Select a Function' )[ 1 ], 'String eq' );\n\t\tawait clickLookupResult( container, 'String equality' );\n\n\t\t// ACT: Select Argument Reference for the composition function's first argument.\n\t\tawait fireEvent.update(\n\t\t\tawait waitFor( () => within( getByLabelText( 'first string:' ) )\n\t\t\t\t.getByRole( 'option', { name: 'Argument Reference' } ) ) );\n\n\t\t// ACT: Select the implemented function's first argument as the referenced argument.\n\t\tawait fireEvent.update(\n\t\t\tawait waitFor( () => within( getByLabelText( 'first string:' ) )\n\t\t\t\t.getByRole( 'option', { name: 'first argument label, in Afrikaans' } ) ) );\n\n\t\t// ACT: Select Argument Reference for the composition function's second argument.\n\t\tawait fireEvent.update(\n\t\t\twithin( getByLabelText( 'second string:' ) ).getByRole( 'option', { name: 'Argument Reference' } ) );\n\n\t\t// ACT: Select the implemented function's second argument as the referenced argument.\n\t\tawait fireEvent.update(\n\t\t\tawait waitFor( () => within( getByLabelText( 'second string:' ) )\n\t\t\t\t.getByRole( 'option', { name: 'second argument label, in Afrikaans' } ) ) );\n\n\t\t// ACT: Click publish button.\n\t\tawait fireEvent.click( getByText( 'Publish' ) );\n\n\t\t// ACT: Click publish button in dialog.\n\t\tawait fireEvent.click( within( await findByRole( 'dialog' ) ).getByText( 'Publish' ) );\n\n\t\t// ASSERT: Location is changed to page returned by API.\n\t\tawait waitFor( () => expect( window.location.href ).toEqual( '/wiki/newPage?success=true' ) );\n\n\t\t// ASSERT: Correct ZObject was posted to the API.\n\t\texpect( apiPostWithEditTokenMock ).toHaveBeenCalledWith( {\n\t\t\taction: 'wikilambda_edit',\n\t\t\tsummary: '',\n\t\t\tzid: undefined,\n\t\t\tzobject: JSON.stringify( expectedNewCompositionImplementationPostedToApi )\n\t\t} );\n\t} );\n} );\n","usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/tests/jest/integration/CreateNewFunction.test.js","messages":[{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":60,"column":79,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":149,"endColumn":3},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":131,"column":15,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":148,"endColumn":4}],"suppressedMessages":[],"errorCount":2,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":"/*!\n * WikiLambda integration test for creating new function.\n *\n * @copyright 2020– Abstract Wikipedia team; see AUTHORS.txt\n * @license MIT\n */\n'use strict';\n\nrequire( '@testing-library/jest-dom' );\n\nconst { fireEvent, render, waitFor } = require( '@testing-library/vue' ),\n\t{ within } = require( '@testing-library/dom' ),\n\t{ clickLookupResult } = require( './helpers/interactionHelpers.js' ),\n\t{ runSetup, runTeardown } = require( './helpers/functionEditorTestHelpers.js' ),\n\tConstants = require( '../../../resources/ext.wikilambda.edit/Constants.js' ),\n\tstore = require( '../../../resources/ext.wikilambda.edit/store/index.js' ),\n\tApp = require( '../../../resources/ext.wikilambda.edit/components/App.vue' ),\n\tApiMock = require( './helpers/apiMock.js' ),\n\tapiGetMock = require( './helpers/apiGetMock.js' ),\n\texpectedNewFunctionPostedToApi = require( './objects/expectedNewFunctionPostedToApi.js' );\n\nconst lookupZObjectTypeLabels =\n\tnew ApiMock( apiGetMock.typeLabelsRequest, apiGetMock.labelsResponse, apiGetMock.labelsMatcher );\nconst lookupZObjectLanguageLabels =\n\tnew ApiMock( apiGetMock.languageLabelsRequest, apiGetMock.labelsResponse, apiGetMock.labelsMatcher );\nconst initializeRootZObject =\n\tnew ApiMock( apiGetMock.loadZObjectsRequest, apiGetMock.loadZObjectsResponse, apiGetMock.loadZObjectsMatcher );\n\ndescribe( 'WikiLambda frontend, on function-editor view', () => {\n\tlet apiPostWithEditTokenMock;\n\n\tbeforeEach( () => {\n\t\tconst setupResult = runSetup();\n\t\tapiPostWithEditTokenMock = setupResult.apiPostWithEditTokenMock;\n\t\tmw.Api = jest.fn( () => {\n\t\t\treturn {\n\t\t\t\tpostWithEditToken: apiPostWithEditTokenMock,\n\t\t\t\tget: apiGetMock.createMockApi( [\n\t\t\t\t\tlookupZObjectLanguageLabels,\n\t\t\t\t\tlookupZObjectTypeLabels,\n\t\t\t\t\tinitializeRootZObject\n\t\t\t\t] )\n\t\t\t};\n\t\t} );\n\t\tconst queryParams = {\n\t\t\tzid: Constants.Z_FUNCTION\n\t\t};\n\t\twindow.mw.Uri.mockImplementationOnce( function () {\n\t\t\treturn {\n\t\t\t\tquery: queryParams,\n\t\t\t\tpath: new window.mw.Title( Constants.PATHS.CREATE_Z_OBJECT_TITLE ).getUrl( queryParams )\n\t\t\t};\n\t\t} );\n\t} );\n\n\tafterEach( () => {\n\t\trunTeardown();\n\t} );\n\n\tit( 'allows creating a new function, making use of most important features', async () => {\n\t\tconst { findByLabelText, findByRole, getAllByLabelText, getByLabelText, getByText, findAllByRole } =\n\t\t\trender( App, { global: { plugins: [ store ] } } );\n\n\t\t// ACT: Select Chinese as the natural language.\n\t\tconst languageSelector = await findByLabelText( 'Language' );\n\t\tawait fireEvent.update( within( languageSelector ).getByRole( 'combobox' ), 'Chin' );\n\t\tawait clickLookupResult( languageSelector, 'Chinese' );\n\n\t\t// ACT: Enter a name for the function in Chinese.\n\t\tawait fireEvent.update( getByLabelText( 'Name (optional)' ), 'function name, in Chinese' );\n\n\t\t// ACT: Enter an alias for the function in Chinese.\n\t\tconst aliasInput = within( getByLabelText( 'Alternative names (optional)' ) ).getByRole( 'textbox' );\n\t\tawait fireEvent.update( aliasInput, 'function alias, in Chinese' );\n\t\tawait fireEvent.keyDown( aliasInput, { key: 'enter' } );\n\n\t\t// ACT: Select a type for the first argument.\n\t\tconst argumentsArea = await findByRole( 'inputs-container' );\n\t\tawait fireEvent.update( within( argumentsArea ).getByPlaceholderText( 'Select a type' ), 'Str' );\n\t\tawait clickLookupResult( argumentsArea, 'String' );\n\n\t\t// ACT: Enter a label for the first argument in Chinese.\n\t\tawait fireEvent.update(\n\t\t\twithin( argumentsArea ).getAllByPlaceholderText( 'E.g. Celsius' )[ 0 ],\n\t\t\t'first argument label, in Chinese' );\n\n\t\t// ACT: Add another argument.\n\t\tawait fireEvent.click( getByText( 'Add another input' ) );\n\n\t\t// ACT: Select a type for the second argument.\n\t\tawait fireEvent.update( within( argumentsArea ).getAllByPlaceholderText( 'Select a type' )[ 1 ], 'Str' );\n\t\tawait clickLookupResult( within( argumentsArea ).getAllByRole( 'listbox', { hidden: true } )[ 1 ], 'String' );\n\n\t\t// ACT: Enter a label for the second argument in Chinese.\n\t\tawait fireEvent.update(\n\t\t\twithin( argumentsArea ).getAllByPlaceholderText( 'E.g. Celsius' )[ 1 ],\n\t\t\t'second argument label, in Chinese' );\n\n\t\t// ACT: Select a type for the output.\n\t\tconst outputArea = getByLabelText( 'Output' );\n\t\tawait fireEvent.update( within( outputArea ).getByRole( 'combobox' ), 'Str' );\n\t\tawait clickLookupResult( outputArea, 'String' );\n\n\t\t// ACT: Click \"Add labels in another language\".\n\t\tawait fireEvent.click( getByText( 'Add labels in another language' ) );\n\n\t\t// ACT: Select French as the second natural language.\n\t\tconst secondLanguageSelector = getAllByLabelText( 'Language' )[ 1 ];\n\t\tawait fireEvent.update( within( secondLanguageSelector ).getByRole( 'combobox' ), 'Fren' );\n\t\tawait clickLookupResult( secondLanguageSelector, 'French' );\n\n\t\t// ACT: Enter a name in French.\n\t\tawait fireEvent.update( getAllByLabelText( 'Name (optional)' )[ 1 ], 'function name, in French' );\n\n\t\t// ACT: Enter an alias in French\n\t\tconst frenchAliasInput = within( getAllByLabelText( 'Alternative names (optional)' )[ 1 ] ).getByRole( 'textbox' );\n\t\tawait fireEvent.update( frenchAliasInput, 'function alias, in French' );\n\t\tawait fireEvent.keyDown( frenchAliasInput, { key: 'enter' } );\n\n\t\t// ACT: Enter a label for the first argument, in French.\n\t\tconst frenchArgumentsArea = ( await findAllByRole( 'inputs-container' ) )[ 1 ];\n\t\tawait fireEvent.update(\n\t\t\twithin( frenchArgumentsArea ).getAllByPlaceholderText( 'E.g. Celsius' )[ 0 ],\n\t\t\t'first argument label, in French' );\n\n\t\t// ACT: Enter a label for the second argument, in French.\n\t\tawait fireEvent.update(\n\t\t\twithin( frenchArgumentsArea ).getAllByPlaceholderText( 'E.g. Celsius' )[ 1 ],\n\t\t\t'second argument label, in French' );\n\n\t\tsetTimeout( async () => {\n\t\t\t// ACT: Click publish button.\n\t\t\tawait fireEvent.click( getByText( 'Publish' ) );\n\n\t\t\t// ACT: Click publish button in dialog.\n\t\t\tawait fireEvent.click( within( await findByRole( 'dialog' ) ).getByText( 'Publish' ) );\n\n\t\t\t// ASSERT: Location is changed to page returned by API.\n\t\t\tawait waitFor( () => expect( window.location.href ).toEqual( '/wiki/newPage?success=true' ) );\n\n\t\t\t// ASSERT: Correct ZObject was posted to the API.\n\t\t\texpect( apiPostWithEditTokenMock ).toHaveBeenCalledWith( {\n\t\t\t\taction: 'wikilambda_edit',\n\t\t\t\tsummary: '',\n\t\t\t\tzid: undefined,\n\t\t\t\tzobject: JSON.stringify( expectedNewFunctionPostedToApi )\n\t\t\t} );\n\t\t}, 100 );\n\t} );\n} );\n","usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/tests/jest/integration/CreateNewTester.test.js","messages":[{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":88,"column":38,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":150,"endColumn":3}],"suppressedMessages":[],"errorCount":1,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":"/*!\n * WikiLambda integration test for creating new tester.\n *\n * @copyright 2020– Abstract Wikipedia team; see AUTHORS.txt\n * @license MIT\n */\n'use strict';\n\nrequire( '@testing-library/jest-dom' );\n\nconst { fireEvent, render, waitFor } = require( '@testing-library/vue' ),\n\t{ within } = require( '@testing-library/dom' ),\n\t{ clickLookupResult } = require( './helpers/interactionHelpers.js' ),\n\tstore = require( '../../../resources/ext.wikilambda.edit/store/index.js' ),\n\tApp = require( '../../../resources/ext.wikilambda.edit/components/App.vue' ),\n\tConstants = require( '../../../resources/ext.wikilambda.edit/Constants.js' ),\n\tApiMock = require( './helpers/apiMock.js' ),\n\tapiGetMock = require( './helpers/apiGetMock.js' ),\n\texistingFunctionFromApi = require( './objects/existingFunctionFromApi.js' ),\n\texpectedNewTesterPostedToApi = require( './objects/expectedNewTesterPostedToApi.js' );\n\nconst initializeRootZObject =\n\tnew ApiMock( apiGetMock.loadZObjectsRequest, apiGetMock.loadZObjectsResponse, apiGetMock.loadZObjectsMatcher );\nconst lookupZObjectTypeLabels =\n\tnew ApiMock( apiGetMock.functionLabelsRequest, apiGetMock.labelsResponse, apiGetMock.labelsMatcher );\nconst performTest =\n\tnew ApiMock( apiGetMock.performTestRequest, apiGetMock.performTestResponse, apiGetMock.actionMatcher );\nconst functionZid = existingFunctionFromApi[ Constants.Z_PERSISTENTOBJECT_ID ][ Constants.Z_STRING_VALUE ];\n\ndescribe( 'WikiLambda frontend, on zobject-editor view', () => {\n\tlet apiPostWithEditTokenMock;\n\tbeforeEach( () => {\n\t\tjest.useFakeTimers();\n\n\t\tObject.defineProperty( window, 'location', {\n\t\t\tvalue: {\n\t\t\t\thref: '/w/index.php?title=Special:CreateZObject&zid=Z20&Z20K1=' + functionZid\n\t\t\t}\n\t\t} );\n\t\tconst queryParams = {\n\t\t\ttitle: Constants.PATHS.CREATE_Z_OBJECT_TITLE,\n\t\t\tzid: Constants.Z_TESTER,\n\t\t\t[ Constants.Z_TESTER_FUNCTION ]: functionZid\n\t\t};\n\t\twindow.mw.Uri.mockImplementation( function () {\n\t\t\treturn {\n\t\t\t\tquery: queryParams,\n\t\t\t\tpath: new window.mw.Title( Constants.PATHS.CREATE_Z_OBJECT_TITLE ).getUrl( queryParams )\n\t\t\t};\n\t\t} );\n\t\tglobal.mw.config.get = ( endpoint ) => {\n\t\t\tswitch ( endpoint ) {\n\t\t\t\tcase 'wgWikiLambda':\n\t\t\t\t\treturn {\n\t\t\t\t\t\tzlangZid: Constants.Z_NATURAL_LANGUAGE_ENGLISH,\n\t\t\t\t\t\tcreateNewPage: true,\n\t\t\t\t\t\tzId: Constants.Z_TESTER\n\t\t\t\t\t};\n\t\t\t\tcase 'wgExtensionAssetsPath':\n\t\t\t\t\treturn '/w/extensions';\n\t\t\t\tdefault:\n\t\t\t\t\treturn {};\n\t\t\t}\n\t\t};\n\n\t\tapiPostWithEditTokenMock = jest.fn( () => Promise.resolve( {\n\t\t\twikilambda_edit: {\n\t\t\t\tpage: 'newPage'\n\t\t\t}\n\t\t} ) );\n\t\tmw.Api = jest.fn( () => {\n\t\t\treturn {\n\t\t\t\tpostWithEditToken: apiPostWithEditTokenMock,\n\t\t\t\tget: apiGetMock.createMockApi( [\n\t\t\t\t\tinitializeRootZObject,\n\t\t\t\t\tlookupZObjectTypeLabels,\n\t\t\t\t\tperformTest\n\t\t\t\t] )\n\t\t\t};\n\t\t} );\n\t} );\n\n\tafterEach( () => {\n\t\tjest.runOnlyPendingTimers();\n\t\tjest.useRealTimers();\n\t} );\n\n\tit( 'allows creating a new tester', async () => {\n\t\tconst {\n\t\t\tcontainer,\n\t\t\tfindByLabelText,\n\t\t\tfindByRole,\n\t\t\tgetAllByLabelText,\n\t\t\tgetByLabelText,\n\t\t\tgetByText\n\t\t} = render( App, { global: { plugins: [ store ] } } );\n\n\t\t// ACT: Enter a name for the tester.\n\t\tawait fireEvent.update(\n\t\t\twithin( await findByLabelText( 'Labels' ) ).getByRole( 'textbox' ),\n\t\t\t'tester name' );\n\n\t\t// ASSERT: The function specified in URL is pre-selected as the function under test.\n\t\texpect( within( getAllByLabelText( 'function:' )[ 0 ] ).getByRole( 'combobox' ) )\n\t\t\t.toHaveDisplayValue( 'function name, in Chinese' );\n\n\t\t// ACT: Select the function under test as the function call function.\n\t\tawait fireEvent.update(\n\t\t\twithin( getByLabelText( 'call:' ) ).getByPlaceholderText( 'Select a Function' ),\n\t\t\t'func' );\n\t\tawait clickLookupResult( container, 'function name, in Chinese' );\n\n\t\t// ACT: Enter value for first argument.\n\t\tawait fireEvent.update(\n\t\t\tawait waitFor( () => within( getByLabelText( 'first argument label, in Afrikaans:' ) ).getByRole( 'textbox' ) ),\n\t\t\t'first argument value' );\n\n\t\t// ACT: Enter value for second argument.\n\t\tawait fireEvent.update(\n\t\t\twithin( getByLabelText( 'second argument label, in Afrikaans:' ) ).getByRole( 'textbox' ),\n\t\t\t'second argument value' );\n\n\t\t// ACT: Select String Equality as the validation call function.\n\t\tawait fireEvent.update(\n\t\t\twithin( getByLabelText( 'result validation:' ) ).getByPlaceholderText( 'Select a Function' ),\n\t\t\t'String eq' );\n\t\tawait clickLookupResult( container, 'String equality' );\n\n\t\t// ACT: Enter expected value to which function call result should be compared.\n\t\tawait fireEvent.update(\n\t\t\tawait waitFor( () => within( getByLabelText( 'second string:' ) ).getByRole( 'textbox' ) ),\n\t\t\t'expected value' );\n\n\t\t// ACT: Click publish button.\n\t\tawait fireEvent.click( getByText( 'Publish' ) );\n\n\t\t// ACT: Click publish button in dialog.\n\t\tawait fireEvent.click( within( await findByRole( 'dialog' ) ).getByText( 'Publish' ) );\n\n\t\t// ASSERT: Location is changed to page returned by API.\n\t\tawait waitFor( () => expect( window.location.href ).toEqual( '/wiki/newPage?success=true' ) );\n\n\t\t// ASSERT: Correct ZObject was posted to the API.\n\t\texpect( apiPostWithEditTokenMock ).toHaveBeenCalledWith( {\n\t\t\taction: 'wikilambda_edit',\n\t\t\tsummary: '',\n\t\t\tzid: undefined,\n\t\t\tzobject: JSON.stringify( expectedNewTesterPostedToApi )\n\t\t} );\n\t} );\n} );\n","usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/tests/jest/integration/DetachFunctionImplementation.test.js","messages":[{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":33,"column":52,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":62,"endColumn":3}],"suppressedMessages":[],"errorCount":1,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":"/*\n * WikiLambda integration test for detaching a function implementation.\n *\n * @copyright 2020– Abstract Wikipedia team; see AUTHORS.txt\n * @license MIT\n */\n'use strict';\n\nrequire( '@testing-library/jest-dom' );\n\nconst { fireEvent, waitFor } = require( '@testing-library/vue' ),\n\t{ within } = require( '@testing-library/dom' ),\n\t{ renderForFunctionViewer, runSetup, runTeardown } = require( './helpers/functionViewerDetailsTestHelpers.js' ),\n\tConstants = require( '../../../resources/ext.wikilambda.edit/Constants.js' ),\n\texistingFunctionFromApi = require( './objects/existingFunctionFromApi.js' ),\n\texistingTesterFromApi = require( './objects/existingTesterFromApi.js' ),\n\texpected = require( './objects/expectedZFunctionWithImplementationsAndTesters.js' );\n\nconst functionZid = existingFunctionFromApi[ Constants.Z_PERSISTENTOBJECT_ID ][ Constants.Z_STRING_VALUE ];\nconst existingFailedTesterZid = existingTesterFromApi.failedTesterZid;\n\ndescribe( 'WikiLambda frontend, function viewer details tab', () => {\n\tlet apiPostWithEditTokenMock;\n\tbeforeEach( () => {\n\t\tconst setupResult = runSetup();\n\t\tapiPostWithEditTokenMock = setupResult.apiPostWithEditTokenMock;\n\t} );\n\n\tafterEach( () => {\n\t\trunTeardown();\n\t} );\n\n\tit( 'allows detaching a function implementation', async () => {\n\t\tconst { findByLabelText, findByRole } = renderForFunctionViewer();\n\n\t\t// ACT: select the 'details' tab.\n\t\tawait fireEvent.click( await findByRole( 'tab', { name: 'Details' } ) );\n\n\t\t// ASSERT: The \"attached\" implementation is shown in the table.\n\t\tconst implementationsTable = await findByLabelText( 'Implementations' );\n\t\tconst firstImplementationRow = within( implementationsTable ).getAllByRole( 'row' )[ 1 ];\n\t\tawait waitFor(\n\t\t\t() => expect( firstImplementationRow ).toHaveTextContent( 'Implementation by composition, in English' ) );\n\n\t\t// ASSERT: The \"attached\" implementation is shown as approved.\n\t\texpect( firstImplementationRow ).toHaveTextContent( 'Approved' );\n\n\t\t// ACT: Select the \"attached\" implementation in the table.\n\t\tawait fireEvent.update( within( firstImplementationRow ).getByRole( 'checkbox' ), true );\n\n\t\t// ACT: Click the deactivate button.\n\t\tawait fireEvent.click( within( implementationsTable ).getByText( 'Deactivate' ) );\n\n\t\t// ASSERT: Correct ZObject was posted to the API.\n\t\texpect( apiPostWithEditTokenMock ).toHaveBeenCalledWith( {\n\t\t\taction: 'wikilambda_edit',\n\t\t\tsummary: '',\n\t\t\tzid: functionZid,\n\t\t\tzobject:\n\t\t\t\tJSON.stringify( expected.zFunctionWithImplementationsAndTesters( [], [ existingFailedTesterZid ] ) )\n\t\t} );\n\t} );\n} );\n","usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/tests/jest/integration/DetachFunctionTester.test.js","messages":[{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":34,"column":44,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":69,"endColumn":3}],"suppressedMessages":[],"errorCount":1,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":"/*!\n * WikiLambda integration test for detaching a function tester.\n *\n * @copyright 2020– Abstract Wikipedia team; see AUTHORS.txt\n * @license MIT\n */\n'use strict';\n\nrequire( '@testing-library/jest-dom' );\n\nconst { fireEvent, waitFor } = require( '@testing-library/vue' ),\n\t{ within } = require( '@testing-library/dom' ),\n\t{ renderForFunctionViewer, runSetup, runTeardown } = require( './helpers/functionViewerDetailsTestHelpers.js' ),\n\tConstants = require( '../../../resources/ext.wikilambda.edit/Constants.js' ),\n\texistingFunctionFromApi = require( './objects/existingFunctionFromApi.js' ),\n\texistingImplementationByCompositionFromApi = require( './objects/existingImplementationByCompositionFromApi.js' ),\n\texpected = require( './objects/expectedZFunctionWithImplementationsAndTesters.js' );\n\nconst functionZid = existingFunctionFromApi[ Constants.Z_PERSISTENTOBJECT_ID ][ Constants.Z_STRING_VALUE ];\nconst implementationByCompositionZid =\n\texistingImplementationByCompositionFromApi[ Constants.Z_PERSISTENTOBJECT_ID ][ Constants.Z_STRING_VALUE ];\n\ndescribe( 'WikiLambda frontend, function viewer details tab', () => {\n\tlet apiPostWithEditTokenMock;\n\tbeforeEach( () => {\n\t\tconst setupResult = runSetup();\n\t\tapiPostWithEditTokenMock = setupResult.apiPostWithEditTokenMock;\n\t} );\n\n\tafterEach( () => {\n\t\trunTeardown();\n\t} );\n\n\tit( 'allows detaching a function tester', async () => {\n\t\tconst { findByLabelText, findByRole } = renderForFunctionViewer();\n\n\t\t// ACT: select the 'details' tab.\n\t\tawait fireEvent.click( await findByRole( 'tab', { name: 'Details' } ) );\n\n\t\t// ASSERT: The \"attached\" tester is shown in the table.\n\t\tconst testersTable = await findByLabelText( 'Test cases' );\n\t\tconst secondTesterRow = within( testersTable ).getAllByRole( 'row' )[ 2 ];\n\t\tawait waitFor( () => expect( secondTesterRow ).toHaveTextContent( 'Tester name, in English' ) );\n\n\t\t// ASSERT: The \"attached\" tester is shown as approved.\n\t\texpect( secondTesterRow ).toHaveTextContent( 'Approved' );\n\n\t\t// ASSERT: The \"attached\" tester shows as failing all implementation tests.\n\t\tawait waitFor( () => expect( within( secondTesterRow ).getAllByText( 'Fail' ) ).toHaveLength( 2 ) );\n\n\t\t// ACT: Select the \"attached\" implementation in the table.\n\t\tawait fireEvent.update( within( secondTesterRow ).getByRole( 'checkbox' ), true );\n\n\t\t// ACT: Click deactivate button.\n\t\tawait fireEvent.click( within( testersTable ).getByText( 'Deactivate' ) );\n\n\t\t// ASSERT: Correct ZObject was posted to the API.\n\t\texpect( apiPostWithEditTokenMock ).toHaveBeenCalledWith( {\n\t\t\taction: 'wikilambda_edit',\n\t\t\tsummary: '',\n\t\t\tzid: functionZid,\n\t\t\tzobject:\n\t\t\t\tJSON.stringify(\n\t\t\t\t\texpected.zFunctionWithImplementationsAndTesters(\n\t\t\t\t\t\t[ implementationByCompositionZid ], []\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t} );\n\t} );\n} );\n","usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/tests/jest/integration/EditFunction.test.js","messages":[{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":86,"column":76,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":170,"endColumn":3},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":146,"column":15,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":169,"endColumn":4}],"suppressedMessages":[],"errorCount":2,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":"/*!\n * WikiLambda integration test for editing a function.\n *\n * @copyright 2020– Abstract Wikipedia team; see AUTHORS.txt\n * @license MIT\n */\n'use strict';\n\nrequire( '@testing-library/jest-dom' );\n\nconst { fireEvent, render, waitFor } = require( '@testing-library/vue' ),\n\t{ within } = require( '@testing-library/dom' ),\n\t{ clickLookupResult } = require( './helpers/interactionHelpers.js' ),\n\t{ runSetup, runTeardown } = require( './helpers/functionEditorTestHelpers.js' ),\n\tConstants = require( '../../../resources/ext.wikilambda.edit/Constants.js' ),\n\tstore = require( '../../../resources/ext.wikilambda.edit/store/index.js' ),\n\tApp = require( '../../../resources/ext.wikilambda.edit/components/App.vue' ),\n\tapiGetMock = require( './helpers/apiGetMock.js' ),\n\tApiMock = require( './helpers/apiMock.js' ),\n\texistingFunctionFromApi = require( './objects/existingFunctionFromApi.js' ),\n\texpectedEditedFunctionPostedToApi = require( './objects/expectedEditedFunctionPostedToApi.js' );\n\nconst functionZid = existingFunctionFromApi[ Constants.Z_PERSISTENTOBJECT_ID ][ Constants.Z_STRING_VALUE ];\n\nconst lookupZObjectTypeLabels =\n\tnew ApiMock( apiGetMock.typeLabelsRequest, apiGetMock.labelsResponse, apiGetMock.labelsMatcher );\nconst lookupZObjectLanguageLabels =\n\tnew ApiMock( apiGetMock.languageLabelsRequest, apiGetMock.labelsResponse, apiGetMock.labelsMatcher );\nconst initializeRootZObject =\n\tnew ApiMock( apiGetMock.loadZObjectsRequest, apiGetMock.loadZObjectsResponse, apiGetMock.loadZObjectsMatcher );\nconst fetchZImplementations =\n\tnew ApiMock( apiGetMock.fetchZImplementationsRequest,\n\t\tapiGetMock.zObjectSearchResponse, apiGetMock.zObjectSearchMatcher );\nconst fetchZTesters =\n\tnew ApiMock( apiGetMock.fetchZTestersRequest, apiGetMock.zObjectSearchResponse, apiGetMock.zObjectSearchMatcher );\nconst performTest =\n\tnew ApiMock( apiGetMock.performTestRequest, apiGetMock.performTestResponse, apiGetMock.performTestMatcher );\n\ndescribe( 'WikiLambda frontend, editing an existing function, on function-editor view', () => {\n\tlet apiPostWithEditTokenMock;\n\tbeforeEach( () => {\n\t\tconst setupResult = runSetup();\n\t\tapiPostWithEditTokenMock = setupResult.apiPostWithEditTokenMock;\n\n\t\tmw.Api = jest.fn( () => {\n\t\t\treturn {\n\t\t\t\tpostWithEditToken: apiPostWithEditTokenMock,\n\t\t\t\tget: apiGetMock.createMockApi( [\n\t\t\t\t\tlookupZObjectLanguageLabels,\n\t\t\t\t\tlookupZObjectTypeLabels,\n\t\t\t\t\tinitializeRootZObject,\n\t\t\t\t\tfetchZImplementations,\n\t\t\t\t\tfetchZTesters,\n\t\t\t\t\tperformTest ] )\n\t\t\t};\n\t\t} );\n\n\t\twindow.mw.Uri.mockImplementation( () => {\n\t\t\treturn {\n\t\t\t\tquery: {\n\t\t\t\t\taction: Constants.ACTIONS.EDIT,\n\t\t\t\t\ttitle: functionZid\n\t\t\t\t},\n\t\t\t\tpath: new window.mw.Title( functionZid ).getUrl( {\n\t\t\t\t\ttitle: functionZid, action: Constants.ACTIONS.EDIT\n\t\t\t\t} )\n\t\t\t};\n\t\t} );\n\t\tglobal.mw.config.get = ( endpoint ) => {\n\t\t\tswitch ( endpoint ) {\n\t\t\t\tcase 'wgWikiLambda':\n\t\t\t\t\treturn {\n\t\t\t\t\t\tzlangZid: Constants.Z_NATURAL_LANGUAGE_ENGLISH,\n\t\t\t\t\t\tzId: functionZid\n\t\t\t\t\t};\n\t\t\t\tdefault:\n\t\t\t\t\treturn {};\n\t\t\t}\n\t\t};\n\t} );\n\n\tafterEach( () => {\n\t\trunTeardown();\n\t} );\n\n\tit( 'allows editing the function, making use of most important features', async () => {\n\t\tconst { findByRole, getAllByLabelText, getByText, findAllByRole } =\n\t\t\trender( App, { global: { plugins: [ store ] } } );\n\n\t\t// ACT: Change the first argument type.\n\t\tconst chineseArgumentsArea = ( await findAllByRole( 'inputs-container' ) )[ 0 ];\n\t\tconst firstArgumentTypeInput = within( chineseArgumentsArea ).getAllByDisplayValue( 'String' )[ 0 ];\n\t\tawait fireEvent.update( firstArgumentTypeInput, 'Str' );\n\t\tawait clickLookupResult( chineseArgumentsArea, 'Monolingual stringset' );\n\n\t\t// ACT: Click publish button.\n\t\tawait fireEvent.click( getByText( 'Publish' ) );\n\n\t\t// ASSERT: The warning message is shown in the dialog indicating the user has changed the argument type.\n\t\tlet publishDialog = await findByRole( 'dialog' );\n\t\texpect( publishDialog ).toHaveTextContent( 'You changed the input field of this function.' );\n\n\t\t// ACT: Close publish dialog.\n\t\tawait fireEvent.click( within( publishDialog ).getByText( 'Cancel' ) );\n\n\t\t// ACT: Change the first argument type back to the original type.\n\t\tawait fireEvent.update( firstArgumentTypeInput, 'Str' );\n\t\tawait clickLookupResult( chineseArgumentsArea, 'String' );\n\n\t\t// ACT: Edit the name of the function in Chinese (the first language).\n\t\tawait fireEvent.update( getAllByLabelText( 'Name (optional)' )[ 0 ], 'edited function name, in Chinese' );\n\n\t\t// ACT: Add a second alias for the function in Chinese.\n\t\tconst chineseAliasInput = getAllByLabelText( 'New alias' )[ 0 ];\n\t\tawait fireEvent.update( chineseAliasInput, 'second function alias, in Chinese' );\n\t\tawait fireEvent.keyDown( chineseAliasInput, { key: 'enter' } );\n\n\t\t// ACT: Add a label for the first argument in Chinese.\n\t\tawait fireEvent.update(\n\t\t\twithin( chineseArgumentsArea ).getAllByPlaceholderText( 'E.g. Celsius' )[ 0 ],\n\t\t\t'newly added first argument label, in Chinese' );\n\n\t\t// ACT: Edit the label for the first argument in Afrikaans (the second language).\n\t\tconst afrikaansArgumentsArea = ( await findAllByRole( 'inputs-container' ) )[ 1 ];\n\t\tawait fireEvent.update(\n\t\t\twithin( afrikaansArgumentsArea ).getAllByPlaceholderText( 'E.g. Celsius' )[ 0 ],\n\t\t\t'edited first argument label, in Afrikaans' );\n\n\t\t// ACT: Click \"Add labels in another language\".\n\t\tawait fireEvent.click( getByText( 'Add labels in another language' ) );\n\n\t\t// ACT: Select French as a third natural language.\n\t\tconst thirdLanguageSelector = getAllByLabelText( 'Language' )[ 2 ];\n\t\tawait fireEvent.update( within( thirdLanguageSelector ).getByRole( 'combobox' ), 'Fren' );\n\t\tawait clickLookupResult( thirdLanguageSelector, 'French' );\n\n\t\t// ACT: Enter a name in French.\n\t\tawait fireEvent.update( getAllByLabelText( 'Name (optional)' )[ 2 ], 'function name, in French' );\n\n\t\t// ACT: Enter an alias in French.\n\t\tconst frenchAliasInput = within( getAllByLabelText( 'Alternative names (optional)' )[ 2 ] ).getByRole( 'textbox' );\n\t\tawait fireEvent.update( frenchAliasInput, 'function alias, in French' );\n\t\tawait fireEvent.keyDown( frenchAliasInput, { key: 'enter' } );\n\n\t\t// TODO: Remove settimeout and use jest.useFakeTimers instead\n\t\tsetTimeout( async () => {\n\t\t\t// ACT: Click publish button.\n\t\t\tawait fireEvent.click( getByText( 'Publish' ) );\n\n\t\t\t// ACT: Add a summary of your changes.\n\t\t\tpublishDialog = await findByRole( 'dialog' );\n\t\t\tawait fireEvent.update(\n\t\t\t\twithin( publishDialog ).getByLabelText( 'How did you improve this page?' ),\n\t\t\t\t'my changes summary' );\n\n\t\t\t// ACT: Click publish button in dialog.\n\t\t\tawait fireEvent.click( within( publishDialog ).getByText( 'Publish' ) );\n\n\t\t\t// ASSERT: Location is changed to page returned by API.\n\t\t\tawait waitFor( () => expect( window.location.href ).toEqual( '/wiki/newPage?success=true' ) );\n\n\t\t\t// ASSERT: Correct ZID and ZObject were posted to the API.\n\t\t\texpect( apiPostWithEditTokenMock ).toHaveBeenCalledWith( {\n\t\t\t\taction: 'wikilambda_edit',\n\t\t\t\tsummary: 'my changes summary',\n\t\t\t\tzid: functionZid,\n\t\t\t\tzobject: JSON.stringify( expectedEditedFunctionPostedToApi )\n\t\t\t} );\n\t\t}, 100 );\n\t} );\n} );\n","usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/tests/jest/integration/EvaluateFunctionCall.test.js","messages":[{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":85,"column":51,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":148,"endColumn":3}],"suppressedMessages":[],"errorCount":1,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":"/*!\n * WikiLambda integration test for evaluating a function call on the Special: Evaluate Function Call page.\n *\n * @copyright 2020– Abstract Wikipedia team; see AUTHORS.txt\n * @license MIT\n */\n'use strict';\n\nrequire( '@testing-library/jest-dom' );\n\nconst { fireEvent, render, waitFor } = require( '@testing-library/vue' ),\n\t{ within } = require( '@testing-library/dom' ),\n\t{ clickLookupResult } = require( './helpers/interactionHelpers.js' ),\n\tConstants = require( '../../../resources/ext.wikilambda.edit/Constants.js' ),\n\tstore = require( '../../../resources/ext.wikilambda.edit/store/index.js' ),\n\tApp = require( '../../../resources/ext.wikilambda.edit/components/App.vue' ),\n\tapiGetMock = require( './helpers/apiGetMock.js' ),\n\tApiMock = require( './helpers/apiMock.js' ),\n\texpectedFunctionCallPostedToApi = require( './objects/expectedFunctionCallPostedToApi.js' ),\n\tfunctionCallResultFromApi = require( './objects/functionCallResultFromApi.js' );\n\nconst lookupZObjectTypeLabels =\n\tnew ApiMock( apiGetMock.functionLabelsRequest, apiGetMock.labelsResponse, apiGetMock.labelsMatcher );\nconst initializeRootZObject =\n\tnew ApiMock( apiGetMock.loadZObjectsRequest, apiGetMock.loadZObjectsResponse, apiGetMock.loadZObjectsMatcher );\n\ndescribe( 'Wikilambda frontend, running a function on evaluate function call view', () => {\n\tlet apiPostWithFunctionCallMock;\n\tbeforeEach( () => {\n\t\t// Needed because of the Teleported dialog component.\n\t\tconst el = document.createElement( 'div' );\n\t\tel.id = 'ext-wikilambda-app';\n\t\tdocument.body.appendChild( el );\n\n\t\tjest.useFakeTimers().setSystemTime( new Date( '2022-11-09T19:56:53Z' ) );\n\n\t\tapiPostWithFunctionCallMock = jest.fn( () => Promise.resolve(\n\t\t\t{\n\t\t\t\tquery: {\n\t\t\t\t\twikilambda_function_call: { success: '',\n\t\t\t\t\t\tdata: JSON.stringify( functionCallResultFromApi )\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t) );\n\n\t\tmw.Api = jest.fn( () => {\n\t\t\treturn {\n\t\t\t\tpost: apiPostWithFunctionCallMock,\n\t\t\t\tget: apiGetMock.createMockApi( [\n\t\t\t\t\tlookupZObjectTypeLabels,\n\t\t\t\t\tinitializeRootZObject ] )\n\t\t\t};\n\t\t} );\n\n\t\twindow.mw.Uri.mockImplementation( () => {\n\t\t\treturn {\n\t\t\t\tpath: new window.mw.Title( Constants.PATHS.EVALUATE_FUNCTION_CALL_TITLE ).getUrl(),\n\t\t\t\tquery: {}\n\t\t\t};\n\t\t} );\n\n\t\tglobal.mw.config.get = ( endpoint ) => {\n\t\t\tswitch ( endpoint ) {\n\t\t\t\tcase 'wgWikiLambda':\n\t\t\t\t\treturn {\n\t\t\t\t\t\tevaluateFunctionCall: true,\n\t\t\t\t\t\tviewmode: false\n\t\t\t\t\t};\n\t\t\t\tdefault:\n\t\t\t\t\treturn {};\n\t\t\t}\n\t\t};\n\n\t\tmw.internalWikiUrlencode = jest.fn( ( url ) => url );\n\t} );\n\n\tafterEach( () => {\n\t\t// Clear the element that was added for the Teleported dialog component.\n\t\tdocument.body.outerHTML = '';\n\t\tjest.runOnlyPendingTimers();\n\t\tjest.useRealTimers();\n\t} );\n\n\tit( 'allows choosing a function and calling it', async () => {\n\t\tconst { findByPlaceholderText, findByRole, findByText, getByLabelText, getByText, queryByText, container } =\n\t\t\trender( App, { global: { plugins: [ store ] } } );\n\n\t\t// ACT: Lookup function name and select it.\n\t\tawait fireEvent.update( await findByPlaceholderText( 'Select a Function' ), 'funct' );\n\t\tawait clickLookupResult( container, 'function name, in Chinese' );\n\n\t\t// ASSERT: Fetched function is displayed.\n\t\texpect( queryByText( 'function name, in Chinese' ) ).toBeInTheDocument();\n\n\t\t// ASSERT: First argument is displayed with correct label.\n\t\texpect( queryByText( 'first argument label, in Afrikaans:' ) ).toBeInTheDocument();\n\n\t\t// ASSERT: First argument is displayed with correct type.\n\t\texpect(\n\t\t\tawait waitFor(\n\t\t\t\t() => within( getByLabelText( 'first argument label, in Afrikaans:' ) ).getByText( 'String' ) ) )\n\t\t\t.toBeInTheDocument();\n\n\t\t// ACT: Enter a value for the first argument.\n\t\tawait fireEvent.input(\n\t\t\twithin( getByLabelText( 'first argument label, in Afrikaans:' ) ).getByRole( 'textbox' ),\n\t\t\t{ target: { value: 'first argument value' } } );\n\n\t\t// ASSERT: Second argument is displayed with correct label.\n\t\texpect( queryByText( 'second argument label, in Afrikaans:' ) ).toBeInTheDocument();\n\n\t\t// ASSERT: Second argument is displayed with correct type.\n\t\texpect( within( getByLabelText( 'second argument label, in Afrikaans:' ) ).getByText( 'String' ) )\n\t\t\t.toBeInTheDocument();\n\n\t\t// ACT: Enter a value for the second argument.\n\t\tawait fireEvent.input(\n\t\t\twithin( getByLabelText( 'second argument label, in Afrikaans:' ) ).getByRole( 'textbox' ),\n\t\t\t{ target: { value: 'second argument value' } } );\n\n\t\t// ACT: Click the Call Function button.\n\t\tawait fireEvent.click( getByText( 'Call Function' ) );\n\n\t\t// ASSERT: The correct function call is sent to the API with the newly input values.\n\t\texpect( apiPostWithFunctionCallMock ).toHaveBeenCalledWith( {\n\t\t\taction: 'wikilambda_function_call',\n\t\t\twikilambda_function_call_zobject: JSON.stringify( expectedFunctionCallPostedToApi )\n\t\t} );\n\n\t\t// ASSERT: The performing orchestration message is displayed.\n\t\texpect( queryByText( 'Performing orchestration, please wait' ) ).toBeInTheDocument();\n\n\t\t// ASSERT: Eventually the orchestration is displayed as completed.\n\t\texpect( await findByText( 'Orchestration result' ) ).toBeInTheDocument();\n\n\t\t// ASSERT: The result from the function call is displayed.\n\t\texpect( queryByText( 'the function call result' ) ).toBeInTheDocument();\n\n\t\t// ACT: Click the show metrics button.\n\t\tawait fireEvent.click( getByText( 'Show metrics' ) );\n\n\t\t// ASSERT: The metadata is displayed in the dialog.\n\t\tconst dialog = await findByRole( 'dialog' );\n\t\texpect( dialog ).toHaveTextContent( 'Orchestration start time: 10 seconds ago' );\n\t\texpect( dialog ).toHaveTextContent( 'Orchestration end time: 1 second ago' );\n\t\texpect( dialog ).toHaveTextContent( 'Orchestration duration: 146ms' );\n\t} );\n} );\n","usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/tests/jest/integration/FunctionEditorEdgeCases.test.js","messages":[{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":71,"column":102,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":147,"endColumn":3}],"suppressedMessages":[],"errorCount":1,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":"/*!\n * WikiLambda integration test for creating new function.\n *\n * @copyright 2020– Abstract Wikipedia team; see AUTHORS.txt\n * @license MIT\n */\n'use strict';\n\nrequire( '@testing-library/jest-dom' );\n\nconst { fireEvent, render, waitFor } = require( '@testing-library/vue' ),\n\t{ within } = require( '@testing-library/dom' ),\n\t{ clickLookupResult } = require( './helpers/interactionHelpers.js' ),\n\t{ runSetup, runTeardown } = require( './helpers/functionEditorTestHelpers.js' ),\n\tConstants = require( '../../../resources/ext.wikilambda.edit/Constants.js' ),\n\tstore = require( '../../../resources/ext.wikilambda.edit/store/index.js' ),\n\tApp = require( '../../../resources/ext.wikilambda.edit/components/App.vue' ),\n\tApiMock = require( './helpers/apiMock.js' ),\n\tapiGetMock = require( './helpers/apiGetMock.js' ),\n\texpectedNoLabelFunctionPostedToApi = require( './objects/expectedNoLabelFunctionPostedToApi.js' );\n\nconst lookupZObjectTypeLabels =\n\tnew ApiMock( apiGetMock.typeLabelsRequest, apiGetMock.labelsResponse, apiGetMock.labelsMatcher );\nconst lookupZObjectLanguageLabels =\n\tnew ApiMock( apiGetMock.languageLabelsRequest, apiGetMock.labelsResponse, apiGetMock.labelsMatcher );\nconst initializeRootZObject =\n\tnew ApiMock( apiGetMock.loadZObjectsRequest, apiGetMock.loadZObjectsResponse, apiGetMock.loadZObjectsMatcher );\n\ndescribe( 'WikiLambda frontend, on function-editor view', () => {\n\tlet apiPostWithEditTokenMock;\n\tbeforeEach( () => {\n\t\tconst setupResult = runSetup();\n\t\tapiPostWithEditTokenMock = setupResult.apiPostWithEditTokenMock;\n\n\t\tmw.Api = jest.fn( () => {\n\t\t\treturn {\n\t\t\t\tpostWithEditToken: apiPostWithEditTokenMock,\n\t\t\t\tget: apiGetMock.createMockApi( [\n\t\t\t\t\tlookupZObjectLanguageLabels,\n\t\t\t\t\tlookupZObjectTypeLabels,\n\t\t\t\t\tinitializeRootZObject\n\t\t\t\t] )\n\t\t\t};\n\t\t} );\n\n\t\twindow.mw.Uri.mockImplementation( () => {\n\t\t\treturn {\n\t\t\t\tquery: {\n\t\t\t\t\ttitle: Constants.PATHS.CREATE_Z_OBJECT_TITLE,\n\t\t\t\t\tzid: Constants.Z_FUNCTION\n\t\t\t\t},\n\t\t\t\tpath: new window.mw.Title( Constants.PATHS.CREATE_Z_OBJECT_TITLE ).getUrl( {\n\t\t\t\t\ttitle: Constants.PATHS.CREATE_Z_OBJECT_TITLE\n\t\t\t\t} )\n\t\t\t};\n\t\t} );\n\n\t\tmw.Title = jest.fn( function ( title ) {\n\t\t\treturn {\n\t\t\t\tgetUrl: jest.fn( function () {\n\t\t\t\t\treturn '/wiki/' + title;\n\t\t\t\t} )\n\t\t\t};\n\t\t} );\n\t} );\n\n\tafterEach( () => {\n\t\trunTeardown();\n\t} );\n\n\tit( 'handles edge cases during editing/creation, and saves a function with no labels successfully', async () => {\n\t\tconst { findByLabelText, findByRole, getAllByLabelText, getByLabelText, getByText, queryByRole } =\n\t\t\trender( App, { global: { plugins: [ store ] } } );\n\n\t\t// ACT: Select Chinese as the natural language.\n\t\tconst languageSelector = await findByLabelText( 'Language' );\n\t\tawait fireEvent.update( within( languageSelector ).getByRole( 'combobox' ), 'Chin' );\n\t\tawait clickLookupResult( languageSelector, 'Chinese' );\n\n\t\t// ACT: Select a type for the first argument.\n\t\tconst argumentsArea = await findByRole( 'inputs-container' );\n\t\tawait fireEvent.update( within( argumentsArea ).getByPlaceholderText( 'Select a type' ), 'Str' );\n\t\tawait clickLookupResult( argumentsArea, 'String' );\n\n\t\t// ACT: Delete the just-selected argument [ EDGE CASE ].\n\t\tawait fireEvent.click( within( argumentsArea ).getByLabelText( 'Remove input' ) );\n\n\t\t// ASSERT: No arguments show.\n\t\texpect( within( argumentsArea ).queryByPlaceholderText( 'Select a type' ) ).not.toBeInTheDocument();\n\t\texpect( within( argumentsArea ).queryByText( 'String' ) ).not.toBeInTheDocument();\n\n\t\t// ACT: Add an argument.\n\t\tawait fireEvent.click( getByText( 'Add an input' ) );\n\n\t\t// ACT: Select a type for the first argument again.\n\t\tawait fireEvent.update( within( argumentsArea ).getByPlaceholderText( 'Select a type' ), 'Str' );\n\t\tawait clickLookupResult( argumentsArea, 'String' );\n\n\t\t// ACT: Enter an alias in Chinese.\n\t\tconst chineseAliasesContainer = getAllByLabelText( 'Alternative names (optional)' )[ 0 ];\n\t\tconst chineseAliasInput = within( chineseAliasesContainer ).getByRole( 'textbox' );\n\t\tawait fireEvent.update( chineseAliasInput, 'first function alias, in Chinese' );\n\t\tawait fireEvent.keyDown( chineseAliasInput, { key: 'enter' } );\n\n\t\t// ACT: Delete the just-entered alias in Chinese [ EDGE CASE ].\n\t\tawait fireEvent.click( within( chineseAliasesContainer ).getByLabelText( 'Remove item' ) );\n\n\t\t// ACT: Attempt to click publish button, before output is set (invalid) [ EDGE CASE ].\n\t\tawait fireEvent.click( getByText( 'Publish' ) );\n\n\t\t// ASSERT: Publish Dialog does not open.\n\t\texpect( queryByRole( 'dialog' ) ).not.toBeInTheDocument();\n\n\t\t// ASSERT: The error warning exists on the zobject showing the user they have not set an output type.\n\t\tconst outputArea = getByLabelText( 'Output' );\n\t\texpect( outputArea ).toHaveTextContent( 'A function requires an output' );\n\n\t\t// ACT: Select a type for the output.\n\t\tawait fireEvent.update( within( outputArea ).getByRole( 'combobox' ), 'Str' );\n\t\tawait clickLookupResult( outputArea, 'String' );\n\n\t\t// ACT: Add another argument.\n\t\tawait fireEvent.click( getByText( 'Add another input' ) );\n\n\t\t// ACT: Select a type for the second argument.\n\t\tawait fireEvent.update( within( argumentsArea ).getAllByPlaceholderText( 'Select a type' )[ 1 ], 'Str' );\n\t\tawait clickLookupResult( within( argumentsArea ).getAllByRole( 'listbox', { hidden: true } )[ 1 ], 'String' );\n\n\t\t// [ACT: Don't enter a label for the second argument. [ EDGE CASE ]]\n\n\t\t// ACT: Click publish button.\n\t\tawait fireEvent.click( getByText( 'Publish' ) );\n\n\t\t// ACT: Click publish button in dialog.\n\t\tawait fireEvent.click( within( await findByRole( 'dialog' ) ).getByText( 'Publish' ) );\n\n\t\t// ASSERT: Location is changed to page returned by API.\n\t\tawait waitFor( () => expect( window.location.href ).toEqual( '/wiki/newPage?success=true' ) );\n\n\t\t// ASSERT: Correct ZObject was posted to the API.\n\t\texpect( apiPostWithEditTokenMock ).toHaveBeenCalledWith( {\n\t\t\taction: 'wikilambda_edit',\n\t\t\tsummary: '',\n\t\t\tzid: undefined,\n\t\t\tzobject: JSON.stringify( expectedNoLabelFunctionPostedToApi )\n\t\t} );\n\t} );\n} );\n","usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/tests/jest/integration/helpers/apiGetMock.js","messages":[],"suppressedMessages":[{"ruleId":"no-undef","severity":2,"message":"'__dirname' is not defined.","line":63,"column":5,"nodeType":"Identifier","messageId":"undef","endLine":63,"endColumn":14,"suppressions":[{"kind":"directive","justification":""}]}],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/tests/jest/integration/helpers/apiMock.js","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/tests/jest/integration/helpers/functionEditorTestHelpers.js","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/tests/jest/integration/helpers/functionViewerDetailsTestHelpers.js","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/tests/jest/integration/helpers/implementationEditorTestHelpers.js","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/tests/jest/integration/helpers/interactionHelpers.js","messages":[{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":13,"column":27,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":16,"endColumn":62}],"suppressedMessages":[],"errorCount":1,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":"/*!\n * WikiLambda unit test suite interaction helper.\n *\n * @copyright 2020– Abstract Wikipedia team; see AUTHORS.txt\n * @license MIT\n */\n\n'use strict';\n\nconst { fireEvent } = require( '@testing-library/vue' ),\n\t{ within } = require( '@testing-library/dom' );\n\nconst clickLookupResult = async ( parentWrapper, itemText ) =>\n\tawait fireEvent.click( await within( parentWrapper )\n\t\t// For some reason menu items in CdxLookup show up as hidden, despite actually being visible in the UI.\n\t\t.findByRole( 'option', { name: itemText, hidden: true } ) );\n\nmodule.exports = {\n\tclickLookupResult: clickLookupResult\n};\n","usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/tests/jest/integration/objects/existingFunctionFromApi.js","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/tests/jest/integration/objects/existingImplementationByCompositionFromApi.js","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/tests/jest/integration/objects/existingImplementationInCodeFromApi.js","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/tests/jest/integration/objects/existingTesterFromApi.js","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/tests/jest/integration/objects/expectedEditedFunctionPostedToApi.js","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/tests/jest/integration/objects/expectedFunctionCallPostedToApi.js","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/tests/jest/integration/objects/expectedNewCodeImplementationPostedToApi.js","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/tests/jest/integration/objects/expectedNewCompositionImplementationPostedToApi.js","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/tests/jest/integration/objects/expectedNewFunctionPostedToApi.js","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/tests/jest/integration/objects/expectedNewTesterPostedToApi.js","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/tests/jest/integration/objects/expectedNoLabelFunctionPostedToApi.js","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/tests/jest/integration/objects/expectedZFunctionWithImplementationsAndTesters.js","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/tests/jest/integration/objects/functionCallResultFromApi.js","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/tests/jest/mixins/schemata.test.js","messages":[],"suppressedMessages":[{"ruleId":"no-undef","severity":2,"message":"'__dirname' is not defined.","line":19,"column":69,"nodeType":"Identifier","messageId":"undef","endLine":19,"endColumn":78,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-undef","severity":2,"message":"'__dirname' is not defined.","line":20,"column":69,"nodeType":"Identifier","messageId":"undef","endLine":20,"endColumn":78,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-undef","severity":2,"message":"'__dirname' is not defined.","line":21,"column":61,"nodeType":"Identifier","messageId":"undef","endLine":21,"endColumn":70,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-undef","severity":2,"message":"'__dirname' is not defined.","line":22,"column":64,"nodeType":"Identifier","messageId":"undef","endLine":22,"endColumn":73,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-undef","severity":2,"message":"'__dirname' is not defined.","line":23,"column":57,"nodeType":"Identifier","messageId":"undef","endLine":23,"endColumn":66,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-undef","severity":2,"message":"'__dirname' is not defined.","line":24,"column":60,"nodeType":"Identifier","messageId":"undef","endLine":24,"endColumn":69,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-undef","severity":2,"message":"'__dirname' is not defined.","line":25,"column":76,"nodeType":"Identifier","messageId":"undef","endLine":25,"endColumn":85,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-undef","severity":2,"message":"'__dirname' is not defined.","line":26,"column":70,"nodeType":"Identifier","messageId":"undef","endLine":26,"endColumn":79,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-undef","severity":2,"message":"'__dirname' is not defined.","line":27,"column":79,"nodeType":"Identifier","messageId":"undef","endLine":27,"endColumn":88,"suppressions":[{"kind":"directive","justification":""}]}],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/tests/jest/mixins/schemata/canonicalInitialZObject.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/tests/jest/mixins/schemata/canonicalZFunction.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/tests/jest/mixins/schemata/canonicalZList.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/tests/jest/mixins/schemata/fairlyComplexErrorObject.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/tests/jest/mixins/schemata/fairlyComplexErrorObject_LocalKeys.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/tests/jest/mixins/schemata/normalInitialZObject.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/tests/jest/mixins/schemata/normalZFunction.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/tests/jest/mixins/schemata/normalZList.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/tests/jest/mixins/schemata/simpleErrorObject_RelaxedFormat.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/tests/jest/mixins/typeUtils.test.js","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/tests/jest/mixins/zObjectTableUtils.test.js","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/tests/jest/store/actions.test.js","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/tests/jest/store/getters.test.js","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/tests/jest/store/index.test.js","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/tests/jest/store/modules/arguments.test.js","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/tests/jest/store/modules/callzfunction.test.js","messages":[],"suppressedMessages":[{"ruleId":"no-unused-vars","severity":2,"message":"'mutationType' is defined but never used.","line":35,"column":32,"nodeType":"Identifier","messageId":"unusedVar","endLine":35,"endColumn":44,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-vars","severity":2,"message":"'payload' is defined but never used.","line":35,"column":46,"nodeType":"Identifier","messageId":"unusedVar","endLine":35,"endColumn":53,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-vars","severity":2,"message":"'payload' is defined but never used.","line":52,"column":35,"nodeType":"Identifier","messageId":"unusedVar","endLine":52,"endColumn":42,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-vars","severity":2,"message":"'payload' is defined but never used.","line":78,"column":35,"nodeType":"Identifier","messageId":"unusedVar","endLine":78,"endColumn":42,"suppressions":[{"kind":"directive","justification":""}]}],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/tests/jest/store/modules/errors.test.js","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/tests/jest/store/modules/languages.test.js","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/tests/jest/store/modules/programmingLanguages.test.js","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/tests/jest/store/modules/router.test.js","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/tests/jest/store/modules/zImplementations.test.js","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/tests/jest/store/modules/zKeys.test.js","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/tests/jest/store/modules/zTesterResults.test.js","messages":[{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":288,"column":45,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":311,"endColumn":5},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":314,"column":40,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":340,"endColumn":5}],"suppressedMessages":[],"errorCount":2,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":"/*!\n * WikiLambda unit test suite for the zobjectModes Vuex module\n *\n * @copyright 2020– Abstract Wikipedia team; see AUTHORS.txt\n * @license MIT\n */\n'use strict';\n\nvar zTesterResultsModule = require( '../../../../resources/ext.wikilambda.edit/store/modules/zTesterResults.js' ),\n\tConstants = require( '../../../../resources/ext.wikilambda.edit/Constants.js' );\n\ndescribe( 'zTesterResults Vuex module', function () {\n\tvar state,\n\t\tcontext;\n\n\tbeforeEach( function () {\n\t\tstate = JSON.parse( JSON.stringify( zTesterResultsModule.state ) );\n\t\tcontext = {\n\t\t\tstate: state,\n\t\t\tcommit: jest.fn( function ( mutationType, payload ) {\n\t\t\t\tzTesterResultsModule.mutations[ mutationType ]( context.state, payload );\n\t\t\t} ),\n\t\t\tdispatch: jest.fn( function ( actionType, payload ) {\n\t\t\t\tzTesterResultsModule.actions[ actionType ]( context, payload );\n\t\t\t} ),\n\t\t\tgetters: {}\n\t\t};\n\n\t\tmw.log = { error: function () {} };\n\t} );\n\n\tdescribe( 'Getters', function () {\n\t\tit( 'should get undefined when the key is not found', function () {\n\t\t\tvar result = zTesterResultsModule.getters.getZTesterResults( context.state )( 'Z10000', 'Z10001', 'Z10002' );\n\t\t\texpect( result ).toBe( undefined );\n\t\t} );\n\t\tit( 'should return the test result when it is found (true)', function () {\n\t\t\t// The code allows for either normal form, as here, or canonical, as below\n\t\t\tcontext.state.zTesterResults[ 'Z10000:Z10001:Z10002' ] = { Z1K1: 'Z40', Z40K1: 'Z41' };\n\t\t\tvar result = zTesterResultsModule.getters.getZTesterResults( context.state )( 'Z10000', 'Z10001', 'Z10002' );\n\t\t\texpect( result ).toBe( true );\n\t\t} );\n\t\tit( 'should return the test result when it is found (false)', function () {\n\t\t\tcontext.state.zTesterResults[ 'Z10000:Z10001:Z10002' ] = 'Z42';\n\t\t\tvar result = zTesterResultsModule.getters.getZTesterResults( context.state )( 'Z10000', 'Z10001', 'Z10002' );\n\t\t\texpect( result ).toBe( false );\n\t\t} );\n\t\tit( 'should return false when the state is in an error state', function () {\n\t\t\tcontext.state.errorState = true;\n\t\t\tvar result = zTesterResultsModule.getters.getZTesterResults( context.state )( 'Z10000', 'Z10001', 'Z10002' );\n\t\t\texpect( result ).toBe( false );\n\t\t} );\n\n\t\tit( 'should return an object with values for the percentage of passing tests by one given ZID', function () {\n\t\t\tcontext.state.zTesterResults[ 'Z10000:Z10001:Z10002' ] = 'Z41';\n\t\t\tcontext.state.zTesterResults[ 'Z10000:Z10001:Z10003' ] = 'Z41';\n\t\t\tcontext.state.zTesterResults[ 'Z10000:Z10001:Z10004' ] = 'Z41';\n\t\t\tcontext.state.zTesterResults[ 'Z10000:Z10001:Z10005' ] = 'Z42';\n\t\t\tcontext.state.zTesterResults[ 'Z10009:Z10010:Z10006' ] = 'Z42';\n\n\t\t\tvar result = zTesterResultsModule.getters.getZTesterPercentage( context.state )( 'Z10000' );\n\n\t\t\texpect( result ).toEqual( {\n\t\t\t\ttotal: 4,\n\t\t\t\tpassing: 3,\n\t\t\t\tpercentage: 75\n\t\t\t} );\n\t\t} );\n\t} );\n\n\tdescribe( 'Mutations', function () {\n\t\tit( 'should set the tester result', function () {\n\t\t\tzTesterResultsModule.mutations.setZTesterResult( context.state, { key: 'Z10000:Z10001:Z10002', result: 'Z41' } );\n\n\t\t\tvar result = zTesterResultsModule.getters.getZTesterResults( context.state )( 'Z10000', 'Z10001', 'Z10002' );\n\t\t\texpect( result ).toBe( true );\n\t\t} );\n\t\tit( 'should set the fetching status', function () {\n\t\t\tzTesterResultsModule.mutations.setFetchingTestResults( context.state, true );\n\n\t\t\texpect( context.state.fetchingTestResults ).toBe( true );\n\t\t} );\n\t\tit( 'should allow for clearing the test results', function () {\n\t\t\tzTesterResultsModule.mutations.setZTesterResult( context.state, { key: 'Z10000:Z10001:Z10002', result: { Z22K1: { Z40K1: 'Z41' } } } );\n\n\t\t\texpect( Object.keys( context.state.zTesterResults ).length ).toEqual( 1 );\n\n\t\t\tzTesterResultsModule.mutations.clearZTesterResults( context.state );\n\n\t\t\texpect( Object.keys( context.state.zTesterResults ).length ).toEqual( 0 );\n\t\t} );\n\t\tit( 'should allow for setting error state', function () {\n\t\t\tzTesterResultsModule.mutations.setErrorState( context.state, true );\n\n\t\t\texpect( context.state.errorState ).toBe( true );\n\t\t} );\n\t} );\n\n\tdescribe( 'Actions', function () {\n\t\tvar booleanReturn,\n\t\t\tgetMock;\n\n\t\tbeforeEach( function () {\n\t\t\tbooleanReturn = Constants.Z_BOOLEAN_TRUE;\n\t\t\tgetMock = jest.fn( function ( payload ) {\n\t\t\t\treturn new Promise( function ( resolve ) {\n\t\t\t\t\tvar data = [];\n\n\t\t\t\t\tpayload.wikilambda_perform_test_zimplementations.split( '|' ).forEach( function ( impl ) {\n\t\t\t\t\t\tpayload.wikilambda_perform_test_ztesters.split( '|' ).forEach( function ( tester ) {\n\t\t\t\t\t\t\tdata.push( {\n\t\t\t\t\t\t\t\tzFunctionId: payload.wikilambda_perform_test_zfunction,\n\t\t\t\t\t\t\t\tzImplementationId: impl,\n\t\t\t\t\t\t\t\tzTesterId: tester,\n\t\t\t\t\t\t\t\tvalidateStatus: JSON.stringify( {\n\t\t\t\t\t\t\t\t\tZ1K1: Constants.Z_BOOLEAN,\n\t\t\t\t\t\t\t\t\tZ40K1: booleanReturn\n\t\t\t\t\t\t\t\t} ),\n\t\t\t\t\t\t\t\t// This will normally be a ZMap of metadata, but we aren't testing that here\n\t\t\t\t\t\t\t\ttestMetadata: JSON.stringify( Constants.Z_VOID )\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t} );\n\t\t\t\t\t} );\n\n\t\t\t\t\tresolve( {\n\t\t\t\t\t\tquery: {\n\t\t\t\t\t\t\twikilambda_perform_test: data\n\t\t\t\t\t\t}\n\t\t\t\t\t} );\n\t\t\t\t} );\n\t\t\t} );\n\n\t\t\tcontext.getters.getCurrentZObjectId = 'Z0';\n\n\t\t\tmw.Api = jest.fn( function () {\n\t\t\t\treturn {\n\t\t\t\t\tget: getMock\n\t\t\t\t};\n\t\t\t} );\n\t\t} );\n\n\t\tdescribe( 'resetTestResult', () => {\n\t\t\tit( 'should allow for resetting a given test result', function () {\n\t\t\t\tzTesterResultsModule.mutations.setZTesterResult( context.state, { key: 'Z10000:Z10001:Z10002', result: 'Z41' } );\n\n\t\t\t\texpect( zTesterResultsModule.getters.getZTesterResults( context.state )( 'Z10000', 'Z10001', 'Z10002' ) ).toBe( true );\n\n\t\t\t\tzTesterResultsModule.actions.resetTestResult( context, {\n\t\t\t\t\tzFunctionId: 'Z10000',\n\t\t\t\t\tzTesterId: 'Z10001',\n\t\t\t\t\tzImplementationId: 'Z10002'\n\t\t\t\t} );\n\n\t\t\t\texpect( zTesterResultsModule.getters.getZTesterResults( context.state )( 'Z10000', 'Z10001', 'Z10002' ) ).toBe( undefined );\n\t\t\t} );\n\n\t\t} );\n\n\t\tdescribe( 'getTestResults', () => {\n\t\t\tit( 'should perform the provided tests (passing)', function () {\n\t\t\t\tvar zFunctionId = 'Z10000',\n\t\t\t\t\tzImplementations = [ 'Z10001', 'Z10002' ],\n\t\t\t\t\tzTesters = [ 'Z10003', 'Z10004' ];\n\n\t\t\t\treturn zTesterResultsModule.actions.getTestResults( context, {\n\t\t\t\t\tzFunctionId: zFunctionId,\n\t\t\t\t\tzImplementations: zImplementations,\n\t\t\t\t\tzTesters: zTesters\n\t\t\t\t} ).then( function () {\n\t\t\t\t\tvar result = zTesterResultsModule.getters.getZTesterPercentage( context.state )( 'Z10000' );\n\n\t\t\t\t\texpect( getMock ).toHaveBeenCalledWith( {\n\t\t\t\t\t\taction: 'wikilambda_perform_test',\n\t\t\t\t\t\twikilambda_perform_test_zfunction: zFunctionId,\n\t\t\t\t\t\twikilambda_perform_test_zimplementations: zImplementations.join( '|' ),\n\t\t\t\t\t\twikilambda_perform_test_ztesters: zTesters.join( '|' ),\n\t\t\t\t\t\twikilambda_perform_test_nocache: false\n\t\t\t\t\t} );\n\t\t\t\t\texpect( context.commit ).toHaveBeenCalledTimes( 7 );\n\t\t\t\t\texpect( Object.keys( context.state.zTesterResults ).length )\n\t\t\t\t\t\t.toEqual( zTesters.length * zImplementations.length );\n\n\t\t\t\t\texpect( result.passing ).toBe( zTesters.length * zImplementations.length );\n\t\t\t\t} );\n\t\t\t} );\n\n\t\t\tit( 'should perform the provided tests (failing)', function () {\n\t\t\t\tvar zFunctionId = 'Z10000',\n\t\t\t\t\tzImplementations = [ 'Z10001', 'Z10002' ],\n\t\t\t\t\tzTesters = [ 'Z10003', 'Z10004' ];\n\n\t\t\t\tbooleanReturn = Constants.Z_BOOLEAN_FALSE;\n\n\t\t\t\treturn zTesterResultsModule.actions.getTestResults( context, {\n\t\t\t\t\tzFunctionId: zFunctionId,\n\t\t\t\t\tzImplementations: zImplementations,\n\t\t\t\t\tzTesters: zTesters\n\t\t\t\t} ).then( function () {\n\t\t\t\t\tvar result = zTesterResultsModule.getters.getZTesterPercentage( context.state )( 'Z10000' );\n\n\t\t\t\t\texpect( getMock ).toHaveBeenCalledWith( {\n\t\t\t\t\t\taction: 'wikilambda_perform_test',\n\t\t\t\t\t\twikilambda_perform_test_zfunction: zFunctionId,\n\t\t\t\t\t\twikilambda_perform_test_zimplementations: zImplementations.join( '|' ),\n\t\t\t\t\t\twikilambda_perform_test_ztesters: zTesters.join( '|' ),\n\t\t\t\t\t\twikilambda_perform_test_nocache: false\n\t\t\t\t\t} );\n\t\t\t\t\texpect( context.commit ).toHaveBeenCalledTimes( 7 );\n\t\t\t\t\texpect( Object.keys( context.state.zTesterResults ).length )\n\t\t\t\t\t\t.toEqual( zTesters.length * zImplementations.length );\n\n\t\t\t\t\texpect( result.passing ).toBe( 0 );\n\t\t\t\t} );\n\t\t\t} );\n\n\t\t\tit( 'should not reset the tests when not to', function () {\n\t\t\t\tvar zFunctionId = 'Z10000',\n\t\t\t\t\tzImplementations = [ 'Z10001', 'Z10002' ],\n\t\t\t\t\tzTesters = [ 'Z10003', 'Z10004' ];\n\n\t\t\t\treturn zTesterResultsModule.actions.getTestResults( context, {\n\t\t\t\t\tzFunctionId: zFunctionId,\n\t\t\t\t\tzImplementations: zImplementations,\n\t\t\t\t\tzTesters: zTesters\n\t\t\t\t} ).then( function () {\n\t\t\t\t\texpect( context.commit ).not.toHaveBeenCalledWith( 'clearZTesterResults' );\n\t\t\t\t} );\n\t\t\t} );\n\n\t\t\tit( 'should reset the tests when directed to', function () {\n\t\t\t\tvar zFunctionId = 'Z10000',\n\t\t\t\t\tzImplementations = [ 'Z10001', 'Z10002' ],\n\t\t\t\t\tzTesters = [ 'Z10003', 'Z10004' ];\n\n\t\t\t\treturn zTesterResultsModule.actions.getTestResults( context, {\n\t\t\t\t\tzFunctionId: zFunctionId,\n\t\t\t\t\tzImplementations: zImplementations,\n\t\t\t\t\tzTesters: zTesters,\n\t\t\t\t\tclearPreviousResults: true\n\t\t\t\t} ).then( function () {\n\t\t\t\t\texpect( context.commit ).toHaveBeenCalledWith( 'clearZTesterResults' );\n\t\t\t\t} );\n\t\t\t} );\n\n\t\t\tit( 'should perform the provided tests (API error)', function () {\n\t\t\t\tvar zFunctionId = 'Z10000',\n\t\t\t\t\tzImplementations = [ 'Z10001', 'Z10002' ],\n\t\t\t\t\tzTesters = [ 'Z10003', 'Z10004' ];\n\n\t\t\t\tgetMock = jest.fn( function () {\n\t\t\t\t\treturn new Promise( function ( resolve, reject ) {\n\t\t\t\t\t\treject( 'API error' );\n\t\t\t\t\t} );\n\t\t\t\t} );\n\n\t\t\t\treturn zTesterResultsModule.actions.getTestResults( context, {\n\t\t\t\t\tzFunctionId: zFunctionId,\n\t\t\t\t\tzImplementations: zImplementations,\n\t\t\t\t\tzTesters: zTesters\n\t\t\t\t} ).then( function () {\n\t\t\t\t\tvar result = zTesterResultsModule.getters.getZTesterPercentage( context.state )( 'Z10000' );\n\n\t\t\t\t\texpect( getMock ).toHaveBeenCalledWith( {\n\t\t\t\t\t\taction: 'wikilambda_perform_test',\n\t\t\t\t\t\twikilambda_perform_test_zfunction: zFunctionId,\n\t\t\t\t\t\twikilambda_perform_test_zimplementations: zImplementations.join( '|' ),\n\t\t\t\t\t\twikilambda_perform_test_ztesters: zTesters.join( '|' ),\n\t\t\t\t\t\twikilambda_perform_test_nocache: false\n\t\t\t\t\t} );\n\t\t\t\t\texpect( context.commit ).toHaveBeenCalledTimes( 4 );\n\t\t\t\t\texpect( Object.keys( context.state.zTesterResults ).length )\n\t\t\t\t\t\t.toEqual( 0 );\n\n\t\t\t\t\texpect( result.passing ).toBe( 0 );\n\t\t\t\t\texpect( context.state.errorState ).toBe( true );\n\t\t\t\t} );\n\t\t\t} );\n\n\t\t\tit( 'should not perform the tests if already fetching', function () {\n\t\t\t\tcontext.state.fetchingTestResults = true;\n\n\t\t\t\tzTesterResultsModule.actions.getTestResults( context );\n\n\t\t\t\texpect( context.commit ).not.toHaveBeenCalled();\n\t\t\t} );\n\n\t\t\tit( 'should pass JSON for the current object to the API, if implementation ID matches current ' +\n\t\t\t\t'object and current object is not new', async () => {\n\t\t\t\tconst currentObject = {\n\t\t\t\t\t\tlovely: 'object'\n\t\t\t\t\t},\n\t\t\t\t\tzFunctionId = 'Z10000',\n\t\t\t\t\tzImplementations = [ 'Z10001', 'Z10002' ],\n\t\t\t\t\tzTesters = [ 'Z10003', 'Z10004' ];\n\t\t\t\tcontext.getters.getCurrentZObjectId = 'Z10001';\n\t\t\t\tcontext.getters.getZObjectAsJson = currentObject;\n\n\t\t\t\tawait zTesterResultsModule.actions.getTestResults( context, {\n\t\t\t\t\tzFunctionId: zFunctionId,\n\t\t\t\t\tzImplementations: zImplementations,\n\t\t\t\t\tzTesters: zTesters\n\t\t\t\t} );\n\n\t\t\t\texpect( getMock ).toHaveBeenCalledWith( {\n\t\t\t\t\taction: 'wikilambda_perform_test',\n\t\t\t\t\twikilambda_perform_test_zfunction: zFunctionId,\n\t\t\t\t\twikilambda_perform_test_zimplementations: [ JSON.stringify( currentObject ), 'Z10002' ].join( '|' ),\n\t\t\t\t\twikilambda_perform_test_ztesters: zTesters.join( '|' ),\n\t\t\t\t\twikilambda_perform_test_nocache: false\n\t\t\t\t} );\n\t\t\t} );\n\n\t\t\tit( 'should pass JSON for the current inner object to the API, if implementation ID matches current ' +\n\t\t\t'object and current object is new', async () => {\n\t\t\t\tconst currentObject = {\n\t\t\t\t\t\t[ Constants.Z_PERSISTENTOBJECT_VALUE ]: {\n\t\t\t\t\t\t\tlovely: 'object'\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\tzFunctionId = 'Z10000',\n\t\t\t\t\tzImplementations = [ 'Z0', 'Z10002' ],\n\t\t\t\t\tzTesters = [ 'Z10003', 'Z10004' ];\n\t\t\t\tcontext.getters.getCurrentZObjectId = 'Z0';\n\t\t\t\tcontext.getters.getZObjectAsJson = currentObject;\n\n\t\t\t\tawait zTesterResultsModule.actions.getTestResults( context, {\n\t\t\t\t\tzFunctionId: zFunctionId,\n\t\t\t\t\tzImplementations: zImplementations,\n\t\t\t\t\tzTesters: zTesters\n\t\t\t\t} );\n\n\t\t\t\texpect( getMock ).toHaveBeenCalledWith( {\n\t\t\t\t\taction: 'wikilambda_perform_test',\n\t\t\t\t\twikilambda_perform_test_zfunction: zFunctionId,\n\t\t\t\t\twikilambda_perform_test_zimplementations: [\n\t\t\t\t\t\tJSON.stringify( currentObject[ Constants.Z_PERSISTENTOBJECT_VALUE ] ), 'Z10002' ].join( '|' ),\n\t\t\t\t\twikilambda_perform_test_ztesters: zTesters.join( '|' ),\n\t\t\t\t\twikilambda_perform_test_nocache: false\n\t\t\t\t} );\n\t\t\t} );\n\t\t} );\n\t} );\n} );\n","usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/tests/jest/store/modules/zTesters.test.js","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/tests/jest/store/modules/zTypedList.test.js","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"vue/no-unregistered-components","replacedBy":["no-undef-components"]},{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/tests/jest/store/modules/zobject.test.js","messages":[{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":1966,"column":27,"nodeType":"FunctionExpression","messageId":"forbidden","endLine":1975,"endColumn":6},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":1988,"column":35,"nodeType":"FunctionExpression","messageId":"forbidden","endLine":1997,"endColumn":6}],"suppressedMessages":[{"ruleId":"no-unused-vars","severity":2,"message":"'payload' is defined but never used.","line":57,"column":34,"nodeType":"Identifier","messageId":"unusedVar","endLine":57,"endColumn":41,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-vars","severity":2,"message":"'responsePayload' is defined but never used.","line":60,"column":31,"nodeType":"Identifier","messageId":"unusedVar","endLine":60,"endColumn":46,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-vars","severity":2,"message":"'payload' is defined but never used.","line":68,"column":47,"nodeType":"Identifier","messageId":"unusedVar","endLine":68,"endColumn":54,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-vars","severity":2,"message":"'mutationType' is defined but never used.","line":84,"column":32,"nodeType":"Identifier","messageId":"unusedVar","endLine":84,"endColumn":44,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-vars","severity":2,"message":"'payload' is defined but never used.","line":84,"column":46,"nodeType":"Identifier","messageId":"unusedVar","endLine":84,"endColumn":53,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-vars","severity":2,"message":"'actionType' is defined but never used.","line":88,"column":34,"nodeType":"Identifier","messageId":"unusedVar","endLine":88,"endColumn":44,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-vars","severity":2,"message":"'payload' is defined but never used.","line":88,"column":46,"nodeType":"Identifier","messageId":"unusedVar","endLine":88,"endColumn":53,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-undef","severity":2,"message":"'__dirname' is not defined.","line":161,"column":64,"nodeType":"Identifier","messageId":"undef","endLine":161,"endColumn":73,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-undef","severity":2,"message":"'__dirname' is not defined.","line":309,"column":61,"nodeType":"Identifier","messageId":"undef","endLine":309,"endColumn":70,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-undef","severity":2,"message":"'__dirname' is not defined.","line":1352,"column":68,"nodeType":"Identifier","messageId":"undef","endLine":1352,"endColumn":77,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-undef","severity":2,"message":"'__dirname' is not defined.","line":1593,"column":56,"nodeType":"Identifier","messageId":"undef","endLine":1593,"endColumn":65,"suppressions":[{"kind":"directive","justification":""}]}],"errorCount":2,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":"/* eslint-disable no-undef */\n/*!\n * WikiLambda unit test suite for the zobject Vuex module\n *\n * @copyright 2020– Abstract Wikipedia team; see AUTHORS.txt\n * @license MIT\n */\n'use strict';\n\nvar fs = require( 'fs' ),\n\tpath = require( 'path' ),\n\ttableDataToRowObjects = require( '../../helpers/zObjectTableHelpers.js' ).tableDataToRowObjects,\n\tConstants = require( '../../../../resources/ext.wikilambda.edit/Constants.js' ),\n\tRow = require( '../../../../resources/ext.wikilambda.edit/store/classes/Row.js' ),\n\tzobjectModule = require( '../../../../resources/ext.wikilambda.edit/store/modules/zobject.js' ),\n\tzobject = {\n\t\tZ1K1: 'Z2',\n\t\tZ2K1: 'Z0',\n\t\tZ2K2: '',\n\t\tZ2K3: {\n\t\t\tZ1K1: 'Z12',\n\t\t\tZ12K1: [\n\t\t\t\t'Z11'\n\t\t\t]\n\t\t}\n\t},\n\tzobjectTree = tableDataToRowObjects( [\n\t\t{ id: 0, value: Constants.ROW_VALUE_OBJECT },\n\t\t{ key: 'Z1K1', value: 'Z2', parent: 0, id: 1 },\n\t\t{ key: 'Z2K1', value: Constants.ROW_VALUE_OBJECT, parent: 0, id: 2 },\n\t\t{ key: 'Z2K2', value: Constants.ROW_VALUE_OBJECT, parent: 0, id: 3 },\n\t\t{ key: 'Z1K1', value: 'Z9', parent: 2, id: 4 },\n\t\t{ key: 'Z9K1', value: 'Z0', parent: 2, id: 5 },\n\t\t{ key: 'Z2K3', value: Constants.ROW_VALUE_OBJECT, parent: 0, id: 6 },\n\t\t{ key: 'Z1K1', value: 'Z12', parent: 6, id: 7 },\n\t\t{ key: 'Z12K1', value: Constants.ROW_VALUE_ARRAY, parent: 6, id: 8 },\n\t\t{ key: '0', value: Constants.ROW_VALUE_OBJECT, parent: 8, id: 9 },\n\t\t{ key: 'Z1K1', value: 'Z9', parent: 9, id: 10 },\n\t\t{ key: 'Z9K1', value: 'Z11', parent: 9, id: 11 },\n\t\t{ key: '1', value: Constants.ROW_VALUE_OBJECT, parent: 8, id: 12 },\n\t\t{ key: 'Z1K1', value: 'Z11', parent: 12, id: 13 },\n\t\t{ key: 'Z11K1', value: 'Z1002', parent: 12, id: 14 },\n\t\t{ key: 'Z11K2', value: '', parent: 12, id: 15 },\n\t\t{ key: 'Z1K1', value: 'Z6', parent: 3, id: 16 },\n\t\t{ key: 'Z6K1', value: '', parent: 3, id: 17 }\n\t] ),\n\tstate,\n\tcontext,\n\tpostMock,\n\tpostWithEditTokenMock,\n\tgetMock,\n\tgetResolveMock;\n\ndescribe( 'zobject Vuex module', function () {\n\tbeforeEach( function () {\n\t\t// eslint-disable-next-line no-unused-vars\n\t\tpostMock = jest.fn( function ( payload ) {\n\t\t\treturn {\n\t\t\t\t// eslint-disable-next-line no-unused-vars\n\t\t\t\tthen: jest.fn( function ( responsePayload ) {\n\t\t\t\t\treturn {\n\t\t\t\t\t\tcatch: jest.fn()\n\t\t\t\t\t};\n\t\t\t\t} )\n\t\t\t};\n\t\t} );\n\t\t// eslint-disable-next-line no-unused-vars\n\t\tpostWithEditTokenMock = jest.fn( function ( payload ) {\n\t\t\treturn new Promise( function ( resolve ) {\n\t\t\t\tresolve( {\n\t\t\t\t\twikilambda_edit: {\n\t\t\t\t\t\tpage: 'sample'\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t} );\n\t\t} );\n\n\t\tstate = $.extend( {}, zobjectModule.state );\n\t\tgetResolveMock = jest.fn( function ( thenFunction ) {\n\t\t\treturn thenFunction();\n\t\t} );\n\t\tcontext = $.extend( {}, {\n\t\t\t// eslint-disable-next-line no-unused-vars\n\t\t\tcommit: jest.fn( function ( mutationType, payload ) {\n\t\t\t\treturn;\n\t\t\t} ),\n\t\t\t// eslint-disable-next-line no-unused-vars\n\t\t\tdispatch: jest.fn( function ( actionType, payload ) {\n\t\t\t\treturn {\n\t\t\t\t\tthen: getResolveMock\n\t\t\t\t};\n\t\t\t} ),\n\t\t\tgetters: {\n\t\t\t\tgetNestedZObjectById: jest.fn( function () {\n\t\t\t\t\treturn {\n\t\t\t\t\t\tid: 17\n\t\t\t\t\t};\n\t\t\t\t} ),\n\t\t\t\tgetZObjectChildrenById: jest.fn( function () {\n\t\t\t\t\treturn [];\n\t\t\t\t} ),\n\t\t\t\tgetAllItemsFromListById: jest.fn( function () {\n\t\t\t\t\treturn [];\n\t\t\t\t} )\n\t\t\t}\n\t\t} );\n\n\t\tmw.Api = jest.fn( function () {\n\t\t\treturn {\n\t\t\t\tpost: postMock,\n\t\t\t\tpostWithEditToken: postWithEditTokenMock\n\t\t\t};\n\t\t} );\n\t} );\n\n\tdescribe( 'Getters', function () {\n\t\tdescribe( 'getZObjectById', function () {\n\t\t\tit( 'Returns current zObject by its ID', function () {\n\t\t\t\tvar result = { id: 1, key: 'Z1K1', value: 'Z2', parent: 0 };\n\t\t\t\tstate.zobject = zobjectTree;\n\n\t\t\t\texpect( zobjectModule.getters.getZObjectById( state )( 1 ) ).toEqual( result );\n\t\t\t} );\n\t\t} );\n\n\t\tdescribe( 'getZObjectIndexById', function () {\n\t\t\tit( 'Returns current zObject by its index', function () {\n\t\t\t\tvar result = 10;\n\t\t\t\tstate.zobject = zobjectTree;\n\n\t\t\t\texpect( zobjectModule.getters.getZObjectIndexById( state )( 10 ) ).toEqual( result );\n\t\t\t} );\n\t\t} );\n\n\t\tdescribe( 'getZObjectChildrenById', function () {\n\t\t\tit( 'Returns empty array if zobject has no children when calling getZObjectChildrenById', function () {\n\t\t\t\tvar result = [];\n\t\t\t\tstate.zobject = zobjectTree;\n\n\t\t\t\texpect( zobjectModule.getters.getZObjectChildrenById( state )( 10 ) ).toEqual( result );\n\t\t\t} );\n\n\t\t\tit( 'Returns zobject children when calling getZObjectChildrenById', function () {\n\t\t\t\tvar result = [\n\t\t\t\t\t{ key: 'Z1K1', value: 'Z9', parent: 2, id: 4 },\n\t\t\t\t\t{ key: 'Z9K1', value: 'Z0', parent: 2, id: 5 }\n\t\t\t\t];\n\t\t\t\tstate.zobject = zobjectTree;\n\n\t\t\t\texpect( zobjectModule.getters.getZObjectChildrenById( state )( 2 ) ).toEqual( result );\n\t\t\t} );\n\t\t} );\n\n\t\tdescribe( 'currentZObjectLanguages', function () {\n\t\t\tit( 'Returns all languages found across name labels, argument labels and alias labels without any duplicates', function () {\n\t\t\t\tvar result = [ { [ Constants.Z_OBJECT_TYPE ]: Constants.Z_REFERENCE, [ Constants.Z_REFERENCE_ID ]: 'Z1002' },\n\t\t\t\t\t{ [ Constants.Z_OBJECT_TYPE ]: Constants.Z_REFERENCE, [ Constants.Z_REFERENCE_ID ]: 'Z1004' },\n\t\t\t\t\t{ [ Constants.Z_OBJECT_TYPE ]: Constants.Z_REFERENCE, [ Constants.Z_REFERENCE_ID ]: 'Z1005' } ];\n\n\t\t\t\tvar getters = {\n\t\t\t\t\tgetZObjectAsJson: JSON.parse( fs.readFileSync( path.join( __dirname, './zobject/zFunctionWithMultipleLanguages.json' ) ) ),\n\t\t\t\t\tgetZObjectAsJsonById: zobjectModule.getters.getZObjectAsJsonById( state )\n\t\t\t\t};\n\t\t\t\texpect( zobjectModule.modules.currentZObject.getters.currentZObjectLanguages( state, getters ) )\n\t\t\t\t\t.toEqual( result );\n\t\t\t} );\n\t\t} );\n\n\t\tdescribe( 'getAllItemsFromListById', function () {\n\n\t\t\tit( 'Returns all items in list when calling getAllItemsFromListById', function () {\n\t\t\t\tvar result = [\n\t\t\t\t\t{ id: 12, key: '1', value: 'object', parent: 8 }\n\t\t\t\t];\n\t\t\t\tstate.zobject = zobjectTree;\n\t\t\t\tvar getters = {\n\t\t\t\t\tgetZObjectChildrenById: zobjectModule.getters.getZObjectChildrenById( state )\n\t\t\t\t};\n\n\t\t\t\texpect( zobjectModule.getters.getAllItemsFromListById( state, getters )( 8 ) ).toEqual( result );\n\t\t\t} );\n\n\t\t\tit( 'Returns empty array if list contains single item(type) when calling getAllItemsFromListById', function () {\n\t\t\t\tvar result = [];\n\t\t\t\tstate.zobject = tableDataToRowObjects( [\n\t\t\t\t\t{ id: 0, value: 'object' },\n\t\t\t\t\t{ key: 'Z1K1', value: 'Z2', parent: 0, id: 1 },\n\t\t\t\t\t{ key: 'Z2K1', value: 'object', parent: 0, id: 2 },\n\t\t\t\t\t{ key: 'Z2K2', value: 'object', parent: 0, id: 3 },\n\t\t\t\t\t{ key: 'Z1K1', value: 'Z9', parent: 2, id: 4 },\n\t\t\t\t\t{ key: 'Z9K1', value: 'Z0', parent: 2, id: 5 },\n\t\t\t\t\t{ key: 'Z2K3', value: 'object', parent: 0, id: 6 },\n\t\t\t\t\t{ key: 'Z1K1', value: 'Z12', parent: 6, id: 7 },\n\t\t\t\t\t{ key: 'Z12K1', value: 'array', parent: 6, id: 8 },\n\t\t\t\t\t{ key: '0', value: 'object', parent: 8, id: 9 },\n\t\t\t\t\t{ key: 'Z1K1', value: 'Z9', parent: 9, id: 10 },\n\t\t\t\t\t{ key: 'Z9K1', value: 'Z11', parent: 9, id: 11 }\n\t\t\t\t] );\n\t\t\t\tvar getters = {\n\t\t\t\t\tgetZObjectChildrenById: zobjectModule.getters.getZObjectChildrenById( state )\n\t\t\t\t};\n\n\t\t\t\texpect( zobjectModule.getters.getAllItemsFromListById( state, getters )( 8 ) ).toEqual( result );\n\t\t\t} );\n\t\t} );\n\n\t\tdescribe( 'getListTypeById', function () {\n\n\t\t\tit( 'Returns list type when calling getListTypeById', function () {\n\t\t\t\tvar result = { key: '0', value: 'object', parent: 8, id: 9 };\n\t\t\t\tstate.zobject = zobjectTree;\n\n\t\t\t\texpect( zobjectModule.getters.getListTypeById( state )( 8 ) ).toEqual( result );\n\t\t\t} );\n\n\t\t} );\n\n\t\tdescribe( 'isCreateNewPage', function () {\n\t\t\tit( 'Returns whether the current state has `createNewPage`', function () {\n\t\t\t\texpect( zobjectModule.getters.isCreateNewPage( state ) ).toBe( true );\n\t\t\t} );\n\t\t} );\n\n\t\tdescribe( 'getZObjectMessage', function () {\n\t\t\tit( 'Returns the current zobjectMessage', function () {\n\t\t\t\texpect( zobjectModule.getters.getZObjectMessage( state ) ).toEqual( {\n\t\t\t\t\ttype: 'error',\n\t\t\t\t\ttext: null\n\t\t\t\t} );\n\n\t\t\t\tstate.zobjectMessage = {\n\t\t\t\t\ttype: 'notice',\n\t\t\t\t\ttext: 'Something noticeable'\n\t\t\t\t};\n\n\t\t\t\texpect( zobjectModule.getters.getZObjectMessage( state ) ).toEqual( {\n\t\t\t\t\ttype: 'notice',\n\t\t\t\t\ttext: 'Something noticeable'\n\t\t\t\t} );\n\t\t\t} );\n\t\t} );\n\n\t\tdescribe( 'getNextKey', function () {\n\t\t\tit( 'Returns next ID for a key or argument', function () {\n\t\t\t\tstate.zobject = zobjectTree;\n\n\t\t\t\texpect( zobjectModule.getters.getNextKey( state, { getCurrentZObjectId: 'Z0' } ) ).toEqual( 'Z0K1' );\n\t\t\t} );\n\t\t} );\n\n\t\tdescribe( 'getLatestObjectIndex', function () {\n\t\t\tit( 'Returns latest index for a key', function () {\n\t\t\t\tstate.zobject = zobjectTree.concat( [ new Row( 18, 'Z6K1', 'Z0K4', 0 ) ] );\n\n\t\t\t\texpect( zobjectModule.getters.getLatestObjectIndex( state )( 'Z0' ) ).toEqual( 4 );\n\t\t\t} );\n\n\t\t\tit( 'Returns 0 when no key is found for passed ZID', function () {\n\t\t\t\tstate.zobject = zobjectTree.concat( [ new Row( 18, 'Z6K1', 'Z42K4', 0 ) ] );\n\n\t\t\t\texpect( zobjectModule.getters.getLatestObjectIndex( state )( 'Z0' ) ).toEqual( 0 );\n\t\t\t} );\n\n\t\t\tit( 'Skip items with no value', function () {\n\t\t\t\tstate.zobject = [ new Row( 18, 'Z6K1', undefined, 0 ) ];\n\n\t\t\t\texpect( zobjectModule.getters.getLatestObjectIndex( state )( 'Z0' ) ).toEqual( 0 );\n\t\t\t} );\n\t\t} );\n\n\t\tdescribe( 'getNextObjectId', function () {\n\t\t\tit( 'Returns 0 if ZObject does not exist', function () {\n\t\t\t\tstate.zobject = null;\n\n\t\t\t\texpect( zobjectModule.getters.getNextObjectId( state ) ).toEqual( 0 );\n\t\t\t} );\n\n\t\t\tit( 'Returns 0 if ZObject is an empty array', function () {\n\t\t\t\tstate.zobject = [];\n\n\t\t\t\texpect( zobjectModule.getters.getNextObjectId( state ) ).toEqual( 0 );\n\t\t\t} );\n\n\t\t\tit( 'Returns the increment of the hightest object id', function () {\n\t\t\t\tstate.zobject = zobjectTree;\n\t\t\t\tconst zobjectHighestId = 17;\n\n\t\t\t\texpect( zobjectModule.getters.getNextObjectId( state ) ).toEqual( zobjectHighestId + 1 );\n\t\t\t} );\n\t\t} );\n\n\t\tdescribe( 'isNewZObject', function () {\n\t\t\tit( 'Returns true if the value of the current ZObject is Z0', function () {\n\t\t\t\tstate.zobject = zobjectTree;\n\n\t\t\t\texpect( zobjectModule.modules.currentZObject.getters.isNewZObject( state, { getCurrentZObjectId: 'Z0' } ) ).toEqual( true );\n\t\t\t} );\n\n\t\t\tit( 'Returns false if the value of the current ZObject is not Z0', function () {\n\t\t\t\tstate.zobject = zobjectTree;\n\n\t\t\t\texpect( zobjectModule.modules.currentZObject.getters.isNewZObject( state, { getCurrentZObjectId: 'Z4' } ) ).toEqual( false );\n\t\t\t} );\n\t\t} );\n\n\t\tdescribe( 'currentZFunctionHasValidInputs', () => {\n\t\t\tvar zObjectAsjson;\n\t\t\tbeforeEach( () => {\n\t\t\t\tzObjectAsjson = JSON.parse( fs.readFileSync( path.join( __dirname, './zobject/zFunction.json' ) ) );\n\t\t\t} );\n\n\t\t\tit( 'returns true if all requirements met', () => {\n\t\t\t\texpect( zobjectModule.modules.currentZObject.getters.currentZFunctionHasValidInputs( state, {\n\t\t\t\t\tgetCurrentZObjectType: Constants.Z_FUNCTION,\n\t\t\t\t\tgetZObjectAsJson: zObjectAsjson } ) ).toEqual( true );\n\t\t\t} );\n\n\t\t\tit( 'returns false if current object not a function', () => {\n\t\t\t\texpect( zobjectModule.modules.currentZObject.getters.currentZFunctionHasValidInputs( state, {\n\t\t\t\t\tgetCurrentZObjectType: Constants.Z_STRING,\n\t\t\t\t\tgetZObjectAsJson: zObjectAsjson } ) ).toEqual( false );\n\t\t\t} );\n\n\t\t\tit( ' returns false if an input has an empty type', () => {\n\t\t\t\tzObjectAsjson[ Constants.Z_PERSISTENTOBJECT_VALUE ][ Constants.Z_FUNCTION_ARGUMENTS ][ 1 ][\n\t\t\t\t\tConstants.Z_ARGUMENT_TYPE ][ Constants.Z_REFERENCE_ID ] = '';\n\n\t\t\t\texpect( zobjectModule.modules.currentZObject.getters.currentZFunctionHasValidInputs( state, {\n\t\t\t\t\tgetCurrentZObjectType: Constants.Z_FUNCTION,\n\t\t\t\t\tgetZObjectAsJson: zObjectAsjson } ) ).toEqual( false );\n\t\t\t} );\n\n\t\t\tit( ' returns false if an input has only an empty label', () => {\n\t\t\t\tzObjectAsjson[ Constants.Z_PERSISTENTOBJECT_VALUE ][ Constants.Z_FUNCTION_ARGUMENTS ][ 1 ][\n\t\t\t\t\tConstants.Z_ARGUMENT_LABEL ][ Constants.Z_MULTILINGUALSTRING_VALUE ][ 0 ][\n\t\t\t\t\tConstants.Z_MONOLINGUALSTRING_VALUE ][ Constants.Z_STRING_VALUE ] = '';\n\n\t\t\t\texpect( zobjectModule.modules.currentZObject.getters.currentZFunctionHasValidInputs( state, {\n\t\t\t\t\tgetCurrentZObjectType: Constants.Z_FUNCTION,\n\t\t\t\t\tgetZObjectAsJson: zObjectAsjson } ) ).toEqual( false );\n\t\t\t} );\n\n\t\t\tit( ' returns false if an input has no label', () => {\n\t\t\t\tzObjectAsjson[ Constants.Z_PERSISTENTOBJECT_VALUE ][ Constants.Z_FUNCTION_ARGUMENTS ][ 1 ][\n\t\t\t\t\tConstants.Z_ARGUMENT_LABEL ][ Constants.Z_MULTILINGUALSTRING_VALUE ] = [];\n\n\t\t\t\texpect( zobjectModule.modules.currentZObject.getters.currentZFunctionHasValidInputs( state, {\n\t\t\t\t\tgetCurrentZObjectType: Constants.Z_FUNCTION,\n\t\t\t\t\tgetZObjectAsJson: zObjectAsjson } ) ).toEqual( false );\n\t\t\t} );\n\n\t\t\tit( ' returns false if there are no inputs', () => {\n\t\t\t\tzObjectAsjson[ Constants.Z_PERSISTENTOBJECT_VALUE ][ Constants.Z_FUNCTION_ARGUMENTS ] =\n\t\t\t\t\t[ Constants.Z_ARGUMENT ];\n\n\t\t\t\texpect( zobjectModule.modules.currentZObject.getters.currentZFunctionHasValidInputs( state, {\n\t\t\t\t\tgetCurrentZObjectType: Constants.Z_FUNCTION,\n\t\t\t\t\tgetZObjectAsJson: zObjectAsjson } ) ).toEqual( false );\n\t\t\t} );\n\t\t} );\n\n\t\tdescribe( 'getAttachedZTesters and getAttachedZImplementations', function () {\n\t\t\tvar getters;\n\t\t\tbeforeEach( function () {\n\t\t\t\tstate.zobject = zobjectTree.concat( tableDataToRowObjects( [\n\t\t\t\t\t{ key: Constants.Z_FUNCTION_TESTERS, value: 'array', parent: 3, id: 18 },\n\t\t\t\t\t{ key: Constants.Z_FUNCTION_IMPLEMENTATIONS, value: 'array', parent: 3, id: 19 },\n\t\t\t\t\t{ key: '0', value: 'object', parent: 18, id: 20 },\n\t\t\t\t\t{ key: '1', value: 'object', parent: 18, id: 21 },\n\t\t\t\t\t{ key: '2', value: 'object', parent: 18, id: 22 },\n\t\t\t\t\t{ key: '0', value: 'object', parent: 19, id: 23 },\n\t\t\t\t\t{ key: '1', value: 'object', parent: 19, id: 24 },\n\t\t\t\t\t{ key: '2', value: 'object', parent: 19, id: 25 },\n\t\t\t\t\t{ key: Constants.Z_REFERENCE_ID, value: Constants.Z_TESTER, parent: 20, id: 26 },\n\t\t\t\t\t{ key: Constants.Z_REFERENCE_ID, value: 'Z111', parent: 21, id: 27 }, // tester 1\n\t\t\t\t\t{ key: Constants.Z_REFERENCE_ID, value: 'Z222', parent: 22, id: 28 }, // tester 2\n\t\t\t\t\t{ key: Constants.Z_REFERENCE_ID, value: Constants.Z_IMPLEMENTATION, parent: 23, id: 29 },\n\t\t\t\t\t{ key: Constants.Z_REFERENCE_ID, value: 'Z333', parent: 24, id: 30 }, // impl 1\n\t\t\t\t\t{ key: Constants.Z_REFERENCE_ID, value: 'Z444', parent: 25, id: 31 } // impl 2\n\t\t\t\t] ) );\n\t\t\t\tgetters = {};\n\t\t\t\tgetters.getZObjectChildrenById = zobjectModule.getters.getZObjectChildrenById( state, getters );\n\t\t\t\tgetters.getNestedZObjectById = zobjectModule.getters.getNestedZObjectById( state, getters );\n\t\t\t} );\n\t\t\tit( 'return attached ZTesters', function () {\n\t\t\t\texpect( zobjectModule.getters.getAttachedZTesters( state, getters )( 0 ) )\n\t\t\t\t\t.toEqual( [ 'Z111', 'Z222' ] );\n\t\t\t} );\n\t\t\tit( 'return attached ZImplementations', function () {\n\t\t\t\texpect( zobjectModule.getters.getAttachedZImplementations( state, getters )( 0 ) )\n\t\t\t\t\t.toEqual( [ 'Z333', 'Z444' ] );\n\t\t\t} );\n\t\t} );\n\n\t\tdescribe( 'getIsZObjectDirty', function () {\n\t\t\tit( 'returns the default isZObjectDirty false', function () {\n\t\t\t\texpect( zobjectModule.getters.getIsZObjectDirty( state ) )\n\t\t\t\t\t.toEqual( false );\n\t\t\t} );\n\n\t\t\tit( 'returns isZObjectDirty from the updated state', function () {\n\t\t\t\tstate.isZObjectDirty = true;\n\n\t\t\t\texpect( zobjectModule.getters.getIsZObjectDirty( state ) )\n\t\t\t\t\t.toEqual( true );\n\t\t\t} );\n\t\t} );\n\n\t\tdescribe( 'getZObjectTypeById', () => {\n\t\t\tvar getters;\n\t\t\tbeforeEach( function () {\n\t\t\t\tgetters = {};\n\t\t\t\tgetters.getZObjectChildrenById = zobjectModule.getters.getZObjectChildrenById( state, getters );\n\t\t\t\tgetters.getZObjectById = zobjectModule.getters.getZObjectById( state, getters );\n\t\t\t} );\n\t\t\tit( 'when object is a call to a function that does not return a type, returns Z_FUNCTION_CALL', () => {\n\t\t\t\tstate.zobject = tableDataToRowObjects( [\n\t\t\t\t\t{ value: Constants.ROW_VALUE_OBJECT, id: 0 },\n\t\t\t\t\t{ key: Constants.Z_OBJECT_TYPE, value: Constants.Z_FUNCTION_CALL, parent: 0, id: 1 },\n\t\t\t\t\t{ key: Constants.Z_FUNCTION_CALL_FUNCTION, value: 'Z12345', parent: 0, id: 2 }\n\t\t\t\t] );\n\t\t\t\tgetters.getZkeys = {\n\t\t\t\t\tZ12345: {\n\t\t\t\t\t\t[ Constants.Z_PERSISTENTOBJECT_VALUE ]: {\n\t\t\t\t\t\t\t[ Constants.Z_OBJECT_TYPE ]: Constants.Z_FUNCTION,\n\t\t\t\t\t\t\t[ Constants.Z_FUNCTION_RETURN_TYPE ]: Constants.Z_STRING\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t};\n\n\t\t\t\texpect( zobjectModule.getters.getZObjectTypeById( state, getters )( 0 ) )\n\t\t\t\t\t.toEqual( Constants.Z_FUNCTION_CALL );\n\t\t\t} );\n\t\t\tit( 'when object is a call to a function that returns a type, returns FUNCTION_CALL_TO_TYPE', () => {\n\t\t\t\tstate.zobject = tableDataToRowObjects( [\n\t\t\t\t\t{ value: Constants.ROW_VALUE_OBJECT, id: 0 },\n\t\t\t\t\t{ key: Constants.Z_OBJECT_TYPE, value: Constants.Z_FUNCTION_CALL, parent: 0, id: 1 },\n\t\t\t\t\t{ key: Constants.Z_FUNCTION_CALL_FUNCTION, value: Constants.Z_TYPED_PAIR, parent: 0, id: 2 }\n\t\t\t\t] );\n\t\t\t\tgetters.getZkeys = {\n\t\t\t\t\t[ Constants.Z_TYPED_PAIR ]: {\n\t\t\t\t\t\t[ Constants.Z_PERSISTENTOBJECT_VALUE ]: {\n\t\t\t\t\t\t\t[ Constants.Z_OBJECT_TYPE ]: Constants.Z_FUNCTION,\n\t\t\t\t\t\t\t[ Constants.Z_FUNCTION_RETURN_TYPE ]: Constants.Z_TYPE\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t};\n\n\t\t\t\texpect( zobjectModule.getters.getZObjectTypeById( state, getters )( 0 ) )\n\t\t\t\t\t.toEqual( Constants.Z_FUNCTION_CALL_TO_TYPE );\n\t\t\t} );\n\t\t\tit( `when object has as its type a call to a function that returns a type, and that returned type has a\n\t\t\t\tdedicated UI component, returns that type`, () => {\n\t\t\t\tstate.zobject = tableDataToRowObjects( [\n\t\t\t\t\t{ value: Constants.ROW_VALUE_OBJECT, id: 0 },\n\t\t\t\t\t{ key: Constants.Z_OBJECT_TYPE, value: Constants.ROW_VALUE_OBJECT, parent: 0, id: 1 },\n\t\t\t\t\t{ key: Constants.Z_OBJECT_TYPE, value: Constants.Z_FUNCTION_CALL, parent: 1, id: 2 },\n\t\t\t\t\t{ key: Constants.Z_FUNCTION_CALL_FUNCTION, value: Constants.Z_TYPED_PAIR, parent: 1, id: 3 }\n\t\t\t\t] );\n\n\t\t\t\texpect( zobjectModule.getters.getZObjectTypeById( state, getters )( 0 ) )\n\t\t\t\t\t.toEqual( Constants.Z_TYPED_PAIR );\n\t\t\t} );\n\t\t} );\n\n\t\t/**\n\t\t * NEW GETTERS\n\t\t * [x] getRowById\n\t\t * [x] getZObjectKeyByRowId\n\t\t * [x] getZObjectValueByRowId\n\t\t * [x] getChildrenByParentRowId\n\t\t * [x] getRowByKeyPath\n\t\t * [x] getZObjectTerminalValue\n\t\t * [ ] getZStringTerminalValue\n\t\t * [ ] getZReferenceTerminalValue\n\t\t * [ ] getZMonolingualTextValue\n\t\t * [ ] getZMonolingualLangValue\n\t\t * [ ] getZCodeLanguage\n\t\t * [ ] getZCode\n\t\t * [ ] getZComposition\n\t\t * [ ] getZCodeId\n\t\t * [ ] getZCodeFunction\n\t\t * [ ] getZBooleanValue\n\t\t * [ ] getZObjectTypeByRowId\n\t\t * [ ] getDepthByRowId\n\t\t * [ ] getParentRowId\n\t\t * [ ] getNextRowId\n\t\t * [ ] isInsideComposition\n\t\t * [ ] getZTypeStringRepresentation\n\t\t */\n\t\tdescribe( 'getRowById', () => {\n\t\t\tit( 'returns undefined where the input id is undefined', () => {\n\t\t\t\texpect( zobjectModule.getters.getRowById( state )( undefined ) ).toEqual( undefined );\n\t\t\t} );\n\n\t\t\tit( 'returns undefined where the row id is not found', () => {\n\t\t\t\tstate.zobject = tableDataToRowObjects( [\n\t\t\t\t\t{ id: 0, value: Constants.ROW_VALUE_OBJECT },\n\t\t\t\t\t{ id: 1, key: Constants.Z_OBJECT_TYPE, value: Constants.Z_STRING, parent: 0 },\n\t\t\t\t\t{ id: 2, key: Constants.Z_STRING_VALUE, value: 'stringiform', parent: 0 }\n\t\t\t\t] );\n\t\t\t\texpect( zobjectModule.getters.getRowById( state )( 3 ) ).toEqual( undefined );\n\t\t\t} );\n\n\t\t\tit( 'returns Row given its row id', () => {\n\t\t\t\tstate.zobject = tableDataToRowObjects( [\n\t\t\t\t\t{ id: 0, value: Constants.ROW_VALUE_OBJECT },\n\t\t\t\t\t{ id: 1, key: Constants.Z_OBJECT_TYPE, value: Constants.Z_STRING, parent: 0 },\n\t\t\t\t\t{ id: 2, key: Constants.Z_STRING_VALUE, value: 'stringiform', parent: 0 }\n\t\t\t\t] );\n\t\t\t\texpect( zobjectModule.getters.getRowById( state )( 2 ) )\n\t\t\t\t\t.toEqual( { id: 2, key: Constants.Z_STRING_VALUE, value: 'stringiform', parent: 0 } );\n\t\t\t} );\n\t\t} );\n\n\t\tdescribe( 'getZObjectKeyByRowId', () => {\n\t\t\tvar getters;\n\t\t\tbeforeEach( function () {\n\t\t\t\tgetters = {};\n\t\t\t\tgetters.getRowById = zobjectModule.getters.getRowById( state );\n\t\t\t} );\n\n\t\t\tit( 'returns undefined where the input id is undefined', () => {\n\t\t\t\texpect( zobjectModule.getters.getZObjectKeyByRowId( state, getters )( undefined ) )\n\t\t\t\t\t.toEqual( undefined );\n\t\t\t} );\n\n\t\t\tit( 'returns undefined where the row id is not found', () => {\n\t\t\t\tstate.zobject = tableDataToRowObjects( [\n\t\t\t\t\t{ id: 0, value: Constants.ROW_VALUE_OBJECT },\n\t\t\t\t\t{ id: 1, key: Constants.Z_OBJECT_TYPE, value: Constants.Z_STRING, parent: 0 },\n\t\t\t\t\t{ id: 2, key: Constants.Z_STRING_VALUE, value: 'stringiform', parent: 0 }\n\t\t\t\t] );\n\t\t\t\texpect( zobjectModule.getters.getZObjectKeyByRowId( state, getters )( 3 ) ).toEqual( undefined );\n\t\t\t} );\n\n\t\t\tit( 'returns row key given its row id', () => {\n\t\t\t\tstate.zobject = tableDataToRowObjects( [\n\t\t\t\t\t{ id: 0, value: Constants.ROW_VALUE_OBJECT },\n\t\t\t\t\t{ id: 1, key: Constants.Z_OBJECT_TYPE, value: Constants.Z_STRING, parent: 0 },\n\t\t\t\t\t{ id: 2, key: Constants.Z_STRING_VALUE, value: 'stringiform', parent: 0 }\n\t\t\t\t] );\n\t\t\t\texpect( zobjectModule.getters.getZObjectKeyByRowId( state, getters )( 2 ) )\n\t\t\t\t\t.toEqual( Constants.Z_STRING_VALUE );\n\t\t\t} );\n\t\t} );\n\n\t\tdescribe( 'getZObjectValueByRowId', () => {\n\t\t\tvar getters;\n\t\t\tbeforeEach( function () {\n\t\t\t\tgetters = {};\n\t\t\t\tgetters.getRowById = zobjectModule.getters.getRowById( state );\n\t\t\t} );\n\n\t\t\tit( 'returns undefined where the input id is undefined', () => {\n\t\t\t\texpect( zobjectModule.getters.getZObjectValueByRowId( state, getters )( undefined ) )\n\t\t\t\t\t.toEqual( undefined );\n\t\t\t} );\n\n\t\t\tit( 'returns undefined where the row id is not found', () => {\n\t\t\t\tstate.zobject = tableDataToRowObjects( [\n\t\t\t\t\t{ id: 0, value: Constants.ROW_VALUE_OBJECT },\n\t\t\t\t\t{ id: 1, key: Constants.Z_OBJECT_TYPE, value: Constants.Z_STRING, parent: 0 },\n\t\t\t\t\t{ id: 2, key: Constants.Z_STRING_VALUE, value: 'stringiform', parent: 0 }\n\t\t\t\t] );\n\t\t\t\texpect( zobjectModule.getters.getZObjectValueByRowId( state, getters )( 3 ) ).toEqual( undefined );\n\t\t\t} );\n\n\t\t\tit( 'returns row key given its row id', () => {\n\t\t\t\tstate.zobject = tableDataToRowObjects( [\n\t\t\t\t\t{ id: 0, value: Constants.ROW_VALUE_OBJECT },\n\t\t\t\t\t{ id: 1, key: Constants.Z_OBJECT_TYPE, value: Constants.Z_STRING, parent: 0 },\n\t\t\t\t\t{ id: 2, key: Constants.Z_STRING_VALUE, value: 'stringiform', parent: 0 }\n\t\t\t\t] );\n\t\t\t\texpect( zobjectModule.getters.getZObjectValueByRowId( state, getters )( 2 ) )\n\t\t\t\t\t.toEqual( 'stringiform' );\n\t\t\t} );\n\t\t} );\n\n\t\tdescribe( 'getChildrenByParentRowId', () => {\n\t\t\tvar getters;\n\t\t\tbeforeEach( function () {\n\t\t\t\tgetters = {};\n\t\t\t\tgetters.getRowById = zobjectModule.getters.getRowById( state );\n\t\t\t} );\n\n\t\t\tit( 'returns undefined when input is undefined', () => {\n\t\t\t\tstate.zobject = [];\n\t\t\t\texpect( zobjectModule.getters.getChildrenByParentRowId( state )( undefined ) ).toEqual( [] );\n\t\t\t} );\n\n\t\t\tit( 'returns undefined when state is empty', () => {\n\t\t\t\tstate.zobject = [];\n\t\t\t\texpect( zobjectModule.getters.getChildrenByParentRowId( state )( 0 ) ).toEqual( [] );\n\t\t\t} );\n\n\t\t\tit( 'returns undefined where the row id is not found', () => {\n\t\t\t\tstate.zobject = tableDataToRowObjects( [\n\t\t\t\t\t{ id: 0, value: Constants.ROW_VALUE_OBJECT },\n\t\t\t\t\t{ id: 1, key: Constants.Z_OBJECT_TYPE, value: Constants.Z_STRING, parent: 0 },\n\t\t\t\t\t{ id: 2, key: Constants.Z_STRING_VALUE, value: 'stringiform', parent: 0 }\n\t\t\t\t] );\n\t\t\t\texpect( zobjectModule.getters.getChildrenByParentRowId( state )( 3 ) ).toEqual( [] );\n\t\t\t} );\n\n\t\t\tit( 'returns array of child rows given the parent row id', () => {\n\t\t\t\tstate.zobject = tableDataToRowObjects( [\n\t\t\t\t\t{ id: 0, value: Constants.ROW_VALUE_OBJECT },\n\t\t\t\t\t{ id: 1, key: Constants.Z_OBJECT_TYPE, value: Constants.Z_STRING, parent: 0 },\n\t\t\t\t\t{ id: 2, key: Constants.Z_STRING_VALUE, value: 'stringiform', parent: 0 }\n\t\t\t\t] );\n\t\t\t\tconst children = zobjectModule.getters.getChildrenByParentRowId( state )( 0 );\n\t\t\t\texpect( children ).toHaveLength( 2 );\n\t\t\t\texpect( children[ 0 ] )\n\t\t\t\t\t.toEqual( { id: 1, key: Constants.Z_OBJECT_TYPE, value: Constants.Z_STRING, parent: 0 } );\n\t\t\t\texpect( children[ 1 ] )\n\t\t\t\t\t.toEqual( { id: 2, key: Constants.Z_STRING_VALUE, value: 'stringiform', parent: 0 } );\n\t\t\t} );\n\t\t} );\n\n\t\tdescribe( 'getRowByKeyPath', () => {\n\t\t\tvar getters;\n\t\t\tbeforeEach( function () {\n\t\t\t\tgetters = {};\n\t\t\t\tgetters.getRowById = zobjectModule.getters.getRowById( state );\n\t\t\t\tgetters.getChildrenByParentRowId = zobjectModule.getters.getChildrenByParentRowId( state );\n\t\t\t} );\n\n\t\t\tit( 'returns undefined when state is empty', () => {\n\t\t\t\tstate.zobject = [];\n\t\t\t\texpect( zobjectModule.getters.getRowByKeyPath( state, getters )() ).toEqual( undefined );\n\t\t\t} );\n\n\t\t\tit( 'returns undefined when rowId doesn not exist', () => {\n\t\t\t\tstate.zobject = tableDataToRowObjects( [\n\t\t\t\t\t{ id: 0, value: Constants.ROW_VALUE_OBJECT },\n\t\t\t\t\t{ id: 1, key: Constants.Z_OBJECT_TYPE, value: Constants.Z_STRING, parent: 0 },\n\t\t\t\t\t{ id: 2, key: Constants.Z_STRING_VALUE, value: 'stringiform', parent: 0 }\n\t\t\t\t] );\n\t\t\t\texpect( zobjectModule.getters.getRowByKeyPath( state, getters )( [], 3 ) ).toEqual( undefined );\n\t\t\t} );\n\n\t\t\tit( 'returns root row when called with default args', () => {\n\t\t\t\tstate.zobject = tableDataToRowObjects( [\n\t\t\t\t\t{ id: 0, value: Constants.ROW_VALUE_OBJECT },\n\t\t\t\t\t{ id: 1, key: Constants.Z_OBJECT_TYPE, value: Constants.Z_STRING, parent: 0 },\n\t\t\t\t\t{ id: 2, key: Constants.Z_STRING_VALUE, value: 'stringiform', parent: 0 }\n\t\t\t\t] );\n\t\t\t\texpect( zobjectModule.getters.getRowByKeyPath( state, getters )() )\n\t\t\t\t\t.toEqual( { id: 0, key: undefined, value: Constants.ROW_VALUE_OBJECT, parent: undefined } );\n\t\t\t} );\n\n\t\t\tit( 'returns row with no keyPath and non-root row id', () => {\n\t\t\t\tstate.zobject = tableDataToRowObjects( [\n\t\t\t\t\t{ id: 0, value: Constants.ROW_VALUE_OBJECT },\n