Choices/assets/scripts/dist/choices.js.map

1 line
183 KiB
Plaintext
Raw Normal View History

2016-09-04 23:23:20 +02:00
{"version":3,"file":"choices.js","sources":["webpack:///webpack/bootstrap c8e7938a9f48db7aa8d7","webpack:///assets/scripts/src/choices.js","webpack:///","webpack:///./~/fuse.js/src/fuse.js","webpack:///assets/scripts/src/store/index.js","webpack:///./~/redux/lib/index.js","webpack:///./~/redux/lib/createStore.js","webpack:///./~/lodash/isPlainObject.js","webpack:///./~/lodash/_getPrototype.js","webpack:///./~/lodash/_overArg.js","webpack:///./~/lodash/_isHostObject.js","webpack:///./~/lodash/isObjectLike.js","webpack:///./~/symbol-observable/index.js","webpack:///./~/symbol-observable/ponyfill.js","webpack:///./~/redux/lib/combineReducers.js","webpack:///./~/redux/lib/utils/warning.js","webpack:///./~/redux/lib/bindActionCreators.js","webpack:///./~/redux/lib/applyMiddleware.js","webpack:///./~/redux/lib/compose.js","webpack:///assets/scripts/src/reducers/index.js","webpack:///assets/scripts/src/reducers/items.js","webpack:///assets/scripts/src/reducers/groups.js","webpack:///assets/scripts/src/reducers/choices.js","webpack:///assets/scripts/src/actions/index.js","webpack:///assets/scripts/src/lib/utils.js","webpack:///assets/scripts/src/lib/polyfills.js"],"sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/assets/scripts/dist/\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n/** WEBPACK FOOTER **\n ** webpack/bootstrap c8e7938a9f48db7aa8d7\n **/","import Fuse from 'fuse.js';\nimport Store from './store/index.js';\nimport {\n addItem,\n removeItem,\n highlightItem,\n addChoice,\n filterChoices,\n activateChoices,\n addGroup,\n clearAll,\n} from './actions/index';\nimport {\n isScrolledIntoView,\n getAdjacentEl,\n wrap,\n isType,\n isElement,\n strToEl,\n extend,\n getWidthOfInput,\n sortByAlpha,\n sortByScore,\n} from './lib/utils.js';\nimport './lib/polyfills.js';\n\n\n/**\n * Choices\n */\nexport default class Choices {\n constructor(element = '[data-choice]', userConfig = {}) {\n // If there are multiple elements, create a new instance\n // for each element besides the first one (as that already has an instance)\n if (isType('String', element)) {\n const elements = document.querySelectorAll(element);\n if (elements.length > 1) {\n for (let i = 1; i < elements.length; i++) {\n const el = elements[i];\n new Choices(el, userConfig);\n }\n }\n }\n\n const defaultConfig = {\n items: [],\n choices: [],\n maxItemCount: -1,\n addItems: true,\n removeItems: true,\n removeItemButton: false,\n editItems: false,\n duplicateItems: true,\n delimiter: ',',\n paste: true,\n search: true,\n flip: true,\n regexFilter: null,\n shouldSort: true,\n sortFilter: sortByAlpha,\n sortFields: ['label', 'value'],\n placeholder: true,\n placeholderValue: null,\n prependValue: null,\n appendValue: n