qauMaWeb/node_modules/.cache/babel-loader/04f6b98b09bc7884b79fd9ec137...

1 line
10 KiB
JSON

{"ast":null,"code":"'use strict';\n\nrequire(\"core-js/modules/es.regexp.exec.js\");\n\nrequire(\"core-js/modules/es.regexp.test.js\");\n\nrequire(\"core-js/modules/es.array.concat.js\");\n\nrequire(\"core-js/modules/es.object.to-string.js\");\n\nrequire(\"core-js/modules/web.dom-collections.iterator.js\");\n\nexports.__esModule = true;\nvar aria = aria || {};\naria.Utils = aria.Utils || {};\n/**\n * @desc Set focus on descendant nodes until the first focusable element is\n * found.\n * @param element\n * DOM node for which to find the first focusable descendant.\n * @returns\n * true if a focusable element is found and focus is set.\n */\n\naria.Utils.focusFirstDescendant = function (element) {\n for (var i = 0; i < element.childNodes.length; i++) {\n var child = element.childNodes[i];\n\n if (aria.Utils.attemptFocus(child) || aria.Utils.focusFirstDescendant(child)) {\n return true;\n }\n }\n\n return false;\n};\n/**\n * @desc Find the last descendant node that is focusable.\n * @param element\n * DOM node for which to find the last focusable descendant.\n * @returns\n * true if a focusable element is found and focus is set.\n */\n\n\naria.Utils.focusLastDescendant = function (element) {\n for (var i = element.childNodes.length - 1; i >= 0; i--) {\n var child = element.childNodes[i];\n\n if (aria.Utils.attemptFocus(child) || aria.Utils.focusLastDescendant(child)) {\n return true;\n }\n }\n\n return false;\n};\n/**\n * @desc Set Attempt to set focus on the current node.\n * @param element\n * The node to attempt to focus on.\n * @returns\n * true if element is focused.\n */\n\n\naria.Utils.attemptFocus = function (element) {\n if (!aria.Utils.isFocusable(element)) {\n return false;\n }\n\n aria.Utils.IgnoreUtilFocusChanges = true;\n\n try {\n element.focus();\n } catch (e) {}\n\n aria.Utils.IgnoreUtilFocusChanges = false;\n return document.activeElement === element;\n};\n\naria.Utils.isFocusable = function (element) {\n if (element.tabIndex > 0 || element.tabIndex === 0 && element.getAttribute('tabIndex') !== null) {\n return true;\n }\n\n if (element.disabled) {\n return false;\n }\n\n switch (element.nodeName) {\n case 'A':\n return !!element.href && element.rel !== 'ignore';\n\n case 'INPUT':\n return element.type !== 'hidden' && element.type !== 'file';\n\n case 'BUTTON':\n case 'SELECT':\n case 'TEXTAREA':\n return true;\n\n default:\n return false;\n }\n};\n/**\n * 触发一个事件\n * mouseenter, mouseleave, mouseover, keyup, change, click 等\n * @param {Element} elm\n * @param {String} name\n * @param {*} opts\n */\n\n\naria.Utils.triggerEvent = function (elm, name) {\n var eventName = void 0;\n\n if (/^mouse|click/.test(name)) {\n eventName = 'MouseEvents';\n } else if (/^key/.test(name)) {\n eventName = 'KeyboardEvent';\n } else {\n eventName = 'HTMLEvents';\n }\n\n var evt = document.createEvent(eventName);\n\n for (var _len = arguments.length, opts = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {\n opts[_key - 2] = arguments[_key];\n }\n\n evt.initEvent.apply(evt, [name].concat(opts));\n elm.dispatchEvent ? elm.dispatchEvent(evt) : elm.fireEvent('on' + name, evt);\n return elm;\n};\n\naria.Utils.keys = {\n tab: 9,\n enter: 13,\n space: 32,\n left: 37,\n up: 38,\n right: 39,\n down: 40,\n esc: 27\n};\nexports.default = aria.Utils;","map":{"version":3,"sources":["D:/Work/WorkSpace/GitWorkSpace/TenShop/resource/ElectronicMall/src/ElectronicMallVue/node_modules/element-ui/lib/utils/aria-utils.js"],"names":["exports","__esModule","aria","Utils","focusFirstDescendant","element","i","childNodes","length","child","attemptFocus","focusLastDescendant","isFocusable","IgnoreUtilFocusChanges","focus","e","document","activeElement","tabIndex","getAttribute","disabled","nodeName","href","rel","type","triggerEvent","elm","name","eventName","test","evt","createEvent","_len","arguments","opts","Array","_key","initEvent","apply","concat","dispatchEvent","fireEvent","keys","tab","enter","space","left","up","right","down","esc","default"],"mappings":"AAAA;;;;;;;;;;;;AAEAA,OAAO,CAACC,UAAR,GAAqB,IAArB;AACA,IAAIC,IAAI,GAAGA,IAAI,IAAI,EAAnB;AAEAA,IAAI,CAACC,KAAL,GAAaD,IAAI,CAACC,KAAL,IAAc,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Z;AACD,GAFM,MAEA;AACLA,IAAAA,SAAS,GAAG,YAAZ;AACD;;AACD,MAAIE,GAAG,GAAGd,QAAQ,CAACe,WAAT,CAAqBH,SAArB,CAAV;;AAEA,OAAK,IAAII,IAAI,GAAGC,SAAS,CAACzB,MAArB,EAA6B0B,IAAI,GAAGC,KAAK,CAACH,IAAI,GAAG,CAAP,GAAWA,IAAI,GAAG,CAAlB,GAAsB,CAAvB,CAAzC,EAAoEI,IAAI,GAAG,CAAhF,EAAmFA,IAAI,GAAGJ,IAA1F,EAAgGI,IAAI,EAApG,EAAwG;AACtGF,IAAAA,IAAI,CAACE,IAAI,GAAG,CAAR,CAAJ,GAAiBH,SAAS,CAACG,IAAD,CAA1B;AACD;;AAEDN,EAAAA,GAAG,CAACO,SAAJ,CAAcC,KAAd,CAAoBR,GAApB,EAAyB,CAACH,IAAD,EAAOY,MAAP,CAAcL,IAAd,CAAzB;AACAR,EAAAA,GAAG,CAACc,aAAJ,GAAoBd,GAAG,CAACc,aAAJ,CAAkBV,GAAlB,CAApB,GAA6CJ,GAAG,CAACe,SAAJ,CAAc,OAAOd,IAArB,EAA2BG,GAA3B,CAA7C;AAEA,SAAOJ,GAAP;AACD,CApBD;;AAsBAxB,IAAI,CAACC,KAAL,CAAWuC,IAAX,GAAkB;AAChBC,EAAAA,GAAG,EAAE,CADW;AAEhBC,EAAAA,KAAK,EAAE,EAFS;AAGhBC,EAAAA,KAAK,EAAE,EAHS;AAIhBC,EAAAA,IAAI,EAAE,EAJU;AAKhBC,EAAAA,EAAE,EAAE,EALY;AAMhBC,EAAAA,KAAK,EAAE,EANS;AAOhBC,EAAAA,IAAI,EAAE,EAPU;AAQhBC,EAAAA,GAAG,EAAE;AARW,CAAlB;AAWAlD,OAAO,CAACmD,OAAR,GAAkBjD,IAAI,CAACC,KAAvB","sourcesContent":["'use strict';\n\nexports.__esModule = true;\nvar aria = aria || {};\n\naria.Utils = aria.Utils || {};\n\n/**\n * @desc Set focus on descendant nodes until the first focusable element is\n * found.\n * @param element\n * DOM node for which to find the first focusable descendant.\n * @returns\n * true if a focusable element is found and focus is set.\n */\naria.Utils.focusFirstDescendant = function (element) {\n for (var i = 0; i < element.childNodes.length; i++) {\n var child = element.childNodes[i];\n if (aria.Utils.attemptFocus(child) || aria.Utils.focusFirstDescendant(child)) {\n return true;\n }\n }\n return false;\n};\n\n/**\n * @desc Find the last descendant node that is focusable.\n * @param element\n * DOM node for which to find the last focusable descendant.\n * @returns\n * true if a focusable element is found and focus is set.\n */\n\naria.Utils.focusLastDescendant = function (element) {\n for (var i = element.childNodes.length - 1; i >= 0; i--) {\n var child = element.childNodes[i];\n if (aria.Utils.attemptFocus(child) || aria.Utils.focusLastDescendant(child)) {\n return true;\n }\n }\n return false;\n};\n\n/**\n * @desc Set Attempt to set focus on the current node.\n * @param element\n * The node to attempt to focus on.\n * @returns\n * true if element is focused.\n */\naria.Utils.attemptFocus = function (element) {\n if (!aria.Utils.isFocusable(element)) {\n return false;\n }\n aria.Utils.IgnoreUtilFocusChanges = true;\n try {\n element.focus();\n } catch (e) {}\n aria.Utils.IgnoreUtilFocusChanges = false;\n return document.activeElement === element;\n};\n\naria.Utils.isFocusable = function (element) {\n if (element.tabIndex > 0 || element.tabIndex === 0 && element.getAttribute('tabIndex') !== null) {\n return true;\n }\n\n if (element.disabled) {\n return false;\n }\n\n switch (element.nodeName) {\n case 'A':\n return !!element.href && element.rel !== 'ignore';\n case 'INPUT':\n return element.type !== 'hidden' && element.type !== 'file';\n case 'BUTTON':\n case 'SELECT':\n case 'TEXTAREA':\n return true;\n default:\n return false;\n }\n};\n\n/**\n * 触发一个事件\n * mouseenter, mouseleave, mouseover, keyup, change, click 等\n * @param {Element} elm\n * @param {String} name\n * @param {*} opts\n */\naria.Utils.triggerEvent = function (elm, name) {\n var eventName = void 0;\n\n if (/^mouse|click/.test(name)) {\n eventName = 'MouseEvents';\n } else if (/^key/.test(name)) {\n eventName = 'KeyboardEvent';\n } else {\n eventName = 'HTMLEvents';\n }\n var evt = document.createEvent(eventName);\n\n for (var _len = arguments.length, opts = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {\n opts[_key - 2] = arguments[_key];\n }\n\n evt.initEvent.apply(evt, [name].concat(opts));\n elm.dispatchEvent ? elm.dispatchEvent(evt) : elm.fireEvent('on' + name, evt);\n\n return elm;\n};\n\naria.Utils.keys = {\n tab: 9,\n enter: 13,\n space: 32,\n left: 37,\n up: 38,\n right: 39,\n down: 40,\n esc: 27\n};\n\nexports.default = aria.Utils;"]},"metadata":{},"sourceType":"script"}