diff --git a/.npmignore b/.npmignore index 669bc9f..841436d 100644 --- a/.npmignore +++ b/.npmignore @@ -5,6 +5,8 @@ coverage demos docs bundle/dist +bundle/*.dev.js +*.map src .travis.yml diff --git a/bundle/easydropdown.js.map b/bundle/easydropdown.js.map index fe60cd6..49b03be 100644 --- a/bundle/easydropdown.js.map +++ b/bundle/easydropdown.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack://easydropdown/webpack/universalModuleDefinition","webpack://easydropdown/webpack/bootstrap","webpack://easydropdown/./src/Shared/Util/dispatchOpen.ts","webpack://easydropdown/./node_modules/helpful-merge/dist/index.js","webpack://easydropdown/./src/Shared/Util/composeClassName.ts","webpack://easydropdown/./src/Shared/Util/killSelectReaction.ts","webpack://easydropdown/./node_modules/helpful-merge/dist/Constants/ArrayStrategy.js","webpack://easydropdown/./src/State/Option.ts","webpack://easydropdown/./src/State/Group.ts","webpack://easydropdown/./src/State/Constants/ScrollStatus.ts","webpack://easydropdown/./src/State/Constants/BodyStatus.ts","webpack://easydropdown/./src/Renderer/Constants/DomChangeType.ts","webpack://easydropdown/./src/Renderer/Constants/AttributeChangeType.ts","webpack://easydropdown/./src/Events/Handlers/handleWindowClick.ts","webpack://easydropdown/./src/Events/Constants/KeyCodes.ts","webpack://easydropdown/./src/Shared/Util/Constants/CollisionType.ts","webpack://easydropdown/./src/Events/Constants/Selectors.ts","webpack://easydropdown/./src/Shared/Util/closestParent.ts","webpack://easydropdown/./src/Config/Config.ts","webpack://easydropdown/./node_modules/helpful-merge/dist/Messages.js","webpack://easydropdown/./node_modules/helpful-merge/dist/merge.js","webpack://easydropdown/./src/Easydropdown/cache.ts","webpack://easydropdown/./src/Easydropdown/EasydropdownFacade.ts","webpack://easydropdown/./src/Easydropdown/Timers.ts","webpack://easydropdown/./src/State/State.ts","webpack://easydropdown/./src/Shared/Util/isMobilePlatform.ts","webpack://easydropdown/./src/State/StateMapper.ts","webpack://easydropdown/./src/State/resolveActions.ts","webpack://easydropdown/./src/State/StateManager.ts","webpack://easydropdown/./src/State/InjectedActions/scrollToView.ts","webpack://easydropdown/./src/State/InjectedActions/closeOthers.ts","webpack://easydropdown/./src/Shared/Util/pollForSelectMutation.ts","webpack://easydropdown/./src/Shared/Util/pollForSelectChange.ts","webpack://easydropdown/./src/Renderer/domPatch.ts","webpack://easydropdown/./src/Renderer/PatchCommand.ts","webpack://easydropdown/./src/Renderer/domDiff.ts","webpack://easydropdown/./src/Renderer/Dom.ts","webpack://easydropdown/./src/Shared/Util/createDomElementFromHtml.ts","webpack://easydropdown/./src/Components/value.ts","webpack://easydropdown/./src/Components/arrow.ts","webpack://easydropdown/./src/Components/head.ts","webpack://easydropdown/./src/Components/option.ts","webpack://easydropdown/./src/Components/group.ts","webpack://easydropdown/./src/Components/body.ts","webpack://easydropdown/./src/Components/root.ts","webpack://easydropdown/./src/Renderer/Renderer.ts","webpack://easydropdown/./src/Events/Handlers/handleSelectKeypress.ts","webpack://easydropdown/./src/Events/Handlers/handleSelectKeydownUp.ts","webpack://easydropdown/./src/Events/Handlers/handleSelectKeydownDown.ts","webpack://easydropdown/./src/Events/Handlers/handleSelectKeydown.ts","webpack://easydropdown/./src/Events/Handlers/handleSelectInvalid.ts","webpack://easydropdown/./src/Events/Handlers/handleSelectFocus.ts","webpack://easydropdown/./src/Events/Handlers/handleSelectBlur.ts","webpack://easydropdown/./src/Events/Handlers/handleItemsListScroll.ts","webpack://easydropdown/./src/Shared/Util/detectBodyCollision.ts","webpack://easydropdown/./src/Events/Handlers/handleHeadClick.ts","webpack://easydropdown/./src/Events/Handlers/handleBodyMouseover.ts","webpack://easydropdown/./src/Events/Handlers/handleBodyClick.ts","webpack://easydropdown/./src/Events/getEventsList.ts","webpack://easydropdown/./src/Events/EventBinding.ts","webpack://easydropdown/./src/Shared/Util/throttle.ts","webpack://easydropdown/./src/Events/bindEvents.ts","webpack://easydropdown/./src/Config/ClassNames.ts","webpack://easydropdown/./src/Config/Callbacks.ts","webpack://easydropdown/./src/Config/Behavior.ts","webpack://easydropdown/./node_modules/helpful-merge/dist/handleMergeError.js","webpack://easydropdown/./node_modules/helpful-merge/dist/FluentMerge.js","webpack://easydropdown/./node_modules/helpful-merge/dist/Config.js","webpack://easydropdown/./src/Easydropdown/Easydropdown.ts","webpack://easydropdown/./src/Easydropdown/factory.ts","webpack://easydropdown/./src/Shared/Polyfills/Element.matches.ts","webpack://easydropdown/./node_modules/custom-event-polyfill/custom-event-polyfill.js","webpack://easydropdown/./src/umd.ts"],"names":["root","factory","exports","module","define","amd","window","installedModules","__webpack_require__","moduleId","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","configurable","enumerable","get","r","value","n","__esModule","object","property","prototype","hasOwnProperty","p","s","detectBodyCollision_1","dispatchOpen","injectedDetectBodyCollision","actions","config","dom","collisionData","maxVisibleItems","maxVisibleItemsOverride","behavior","isScrollable","item","length","maxBodyHeight","sumItemsHeight","open","type","boundDispatchOpen","bind","default","merge_1","ArrayStrategy_1","ArrayStrategy","tokens","reduce","classNames","token","push","predicate","className","join","select","_a","timers","clearTimeout","keyingTimeoutId","keying","setTimeout","resetKeying","disabled","focus","Option","this","label","isDisabled","Group","options","ScrollStatus","BodyStatus","DomChangeType","AttributeChangeType","_","state","isOpen","close","blur","UP","DOWN","SPACE","ENTER","ESC","CollisionType","OPTION","el","selector","includeSelf","parent","parentNode","matches","document","body","Behavior_1","Callbacks_1","ClassNames_1","Config","callbacks","seal","MERGE_ERROR","offender","suggestion","TYPE_ERROR_TARGET","target","TYPE_ERROR_SOURCE","source","INVALID_ARRAY_STRATEGY","strategy","Config_1","FluentMerge_1","handleMergeError_1","Messages","merge","sourceKeys","deep","PUSH","REPLACE","indexOf","arrayStrategy","RangeError","TypeError","Array","isArray","apply","toString","getOwnPropertyNames","_i","sourceKeys_1","key","descriptor","getOwnPropertyDescriptor","set","includeReadOnly","includeNonEmurable","useReferenceIfArray","useReferenceIfTargetUnset","err","errorMessage","keys","forEach","method","args","arguments","createFluent","EasydropdownFacade","implementation","refresh","destroy","defineProperties","nextValue","Timers","clear","_this","clearInterval","helpful_merge_1","BodyStatus_1","ScrollStatus_1","Group_1","Option_1","State","stateRaw","groups","focusedIndex","selectedIndex","placeholder","scrollStatus","AT_TOP","bodyStatus","CLOSED","isRequired","isInvalid","isFocused","isUseNativeMode","isSearching","isKeying","map","groupRaw","group","optionRaw","total","totalOptions","getOptionFromIndex","selectedOption","hasValue","hasPlaceholder","showPlaceholderWhenOpen","Boolean","find","hasLabel","OPEN_ABOVE","OPEN_BELOW","AT_BOTTOM","index","groupStartIndex","Math","max","getOptionIndexFromValue","_b","_c","userAgent","isIos","test","isAndroid","isOperaMini","isWindowsPhone","isMobilePlatform_1","State_1","StateMapper","mapFromSelect","selectElement","isWithinGroup","required","useNativeUiOnMobile","navigator","child","children","getAttribute","HTMLOptionElement","mapGroup","lastGroup","mapOption","selected","HTMLOptGroupElement","tagName","j","groupChild","textContent","option","isParentGroupDisabled","CollisionType_1","invalidate","validate","topOut","bottomOut","scroll","SCROLLED","makeScrollable","makeUnscrollable","collisionType","closeOthers","NONE","TOP","BOTTOM","scrollToView","selectOption","optionAtIndex","focusOption","shouldScrollToView","scrollToMiddle","abs","search","resetSearch","useNative","resolveActions_1","StateManager","proxyActions","injectedActions","onAction","stateProxy","createStateProxy","getPropertyDescriptorsFromValue","proxy","getPrototypeOf","concat","localDescriptors","isAccessorProperty","readPropertyValue","updatePropertyValue","getScrollTop","currentScrollTop","optionOffsetTop","optionHeight","bodyHeight","scrollOffset","remainder","offset","offsetHeight","scrollTop","itemsList","offsetTop","thisInstance","cache","cache_1","instance","POLL_INTERVAL_DURATION","handleMutation","lastOuterHtml","outerHTML","setInterval","lastValue","AttributeChangeType_1","DomChangeType_1","patchAttributes","attributeChanges","raf","requestAnimationFrame","change","patchAttribute","ADD","EDIT","setAttribute","REMOVE","removeAttribute","domPatch","node","command","parentElement","replaceChild","newNode","INNER","Text","newTextContent","childCommands","childCommand","childNodes","innerHTML","newInnerHtml","OUTER","FULL","PatchCommand","PatchCommand_1","diffAttributeChanges","prev","next","totalAttributes","attributes","attributesMap","attr1","attr2","sort","attr","domDiff","totalChildNodes","HTMLSelectElement","HTMLElement","childNode","Dom","head","arrow","Infinity","totalHeight","html","temp","createElement","firstElementChild","isPlaceholderShown","humanReadableValue","arrow_1","value_1","composeClassName_1","optionState","isSelected","optionSelected","focusedOption","optionFocused","optionDisabled","option_1","groupState","groupDisabled","groupHasLabel","groupLabel","group_1","isAtTop","bodyAtTop","isAtBottom","bodyAtBottom","bodyScrollable","styleAttr","gradientTop","gradientBottom","body_1","head_1","rootDisabled","rootInvalid","rootOpen","rootFocused","rootHasValue","isOpenAbove","rootOpenAbove","isOpenBelow","rootOpenBelow","rootNative","root_1","createDomElementFromHtml_1","Dom_1","domDiff_1","domPatch_1","Renderer","render","rootElement","queryDomRefs","injectSelect","update","nextHtml","nextRoot","diffCommand","syncSelectWithValue","classList","remove","tempSelect","Error","event","CustomEvent","bubbles","dispatchEvent","localDom","ref","elements","querySelectorAll","element","KeyCodes","SEARCH_RESET_DURATION","searchResetDuration","keyCode","includes","searchTimeoutId","dispatchOpen_1","killSelectReaction_1","e","handlerParams","metaKey","iterations","incrementAmount","preventDefault","round","loop","isClosed","handleSelectKeydownDown_1","handleSelectKeydownUp_1","stopPropagation","openOnFocus","scrollHeight","CLEARSPACE","mapCollisionData","deltaTop","deltaBottom","maxHeight","itemHeight","largestDelta","floor","bbHead","getBoundingClientRect","wh","innerHeight","top","bottom","min","closestParent_1","Selectors","optionIndex","handleBodyClick_1","handleBodyMouseover_1","handleHeadClick_1","handleItemsListScroll_1","handleSelectBlur_1","handleSelectFocus_1","handleSelectInvalid_1","handleSelectKeydown_1","handleSelectKeypress_1","handleWindowClick_1","handleWindowClick_2","handler","documentElement","throttle","EventBinding","eventBindingRaw","debounce","boundHandler","passive","unbind","removeEventListener","delay","timerId","last","now","Date","later","difference","throttle_1","EventBinding_1","getEventsList_1","bindEvent","eventBinding","addEventListener","ClassNames","Callbacks","onOpen","onClose","onSelect","Behavior","closeOnSelect","clampMaxVisibleItems","liveUpdates","getTotalMatching","possibleKey","offendingKey","longer","shorter","leftPointer","leftInnerPointer","leftTotalMatching","lastCommonIndex","rightPointer","rightInnerPointer","rightTotalMatching","longerLastIndex","shorterLastIndex","message","isSealed","isExtensible","reducer","offendingKeyLower","currBestMatch","currKey","totalMatching","toLowerCase","delta","primer","bestMatch","FluentMerge","sources","to","from","with","exec","bindEvents_1","Renderer_1","pollForSelectChange_1","pollForSelectMutation_1","closeOthers_1","scrollToView_1","StateManager_1","StateMapper_1","Timers_1","Easydropdown","renderer","handleStateUpdate","eventBindings","pollChangeIntervalId","pollMutationIntervalId","binding","cacheIndex","splice","cb","Easydropdown_1","EasydropdownFacade_1","selectElementOrSelector","querySelector","multiple","cache_2","cachedInstance","factoryFn","decoratedFactory","all","selects","slice","Element","msMatchesSelector","ce","defaultPrevented","params","evt","origPrevent","cancelable","detail","undefined","createEvent","initCustomEvent","Event","factory_1"],"mappings":"CAAA,SAAAA,EAAAC,GACA,iBAAAC,SAAA,iBAAAC,OACAA,OAAAD,QAAAD,IACA,mBAAAG,eAAAC,IACAD,UAAAH,GACA,iBAAAC,QACAA,QAAA,aAAAD,IAEAD,EAAA,aAAAC,IARA,CASCK,OAAA,WACD,mBCTA,IAAAC,KAGA,SAAAC,EAAAC,GAGA,GAAAF,EAAAE,GACA,OAAAF,EAAAE,GAAAP,QAGA,IAAAC,EAAAI,EAAAE,IACAC,EAAAD,EACAE,GAAA,EACAT,YAUA,OANAU,EAAAH,GAAAI,KAAAV,EAAAD,QAAAC,IAAAD,QAAAM,GAGAL,EAAAQ,GAAA,EAGAR,EAAAD,QA2CA,OAtCAM,EAAAM,EAAAF,EAGAJ,EAAAO,EAAAR,EAGAC,EAAAQ,EAAA,SAAAd,EAAAe,EAAAC,GACAV,EAAAW,EAAAjB,EAAAe,IACAG,OAAAC,eAAAnB,EAAAe,GACAK,cAAA,EACAC,YAAA,EACAC,IAAAN,KAMA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AoD,QAAe+f,iBCjEVI,QAAQ1hB,UAAUwE,UACnBkd,QAAQ1hB,UAAUwE,QAAUkd,QAAQ1hB,UAAU2hB,kCCKlD,IACA,IAAAC,EAAA,IAAArjB,OAAAyZ,YAAA,QAEA,GADA4J,EAAAvI,kBACA,IAAAuI,EAAAC,iBAGA,UAAA/J,MAAA,6BAEC,MAAAkB,GACD,IAAAhB,EAAA,SAAAD,EAAA+J,GACA,IAAAC,EAAAC,EAsBA,OArBAF,MACA7J,SAAA,EACAgK,YAAA,EACAC,YAAAC,IAGAJ,EAAAtd,SAAA2d,YAAA,gBACAC,gBAAAtK,EAAA+J,EAAA7J,QAAA6J,EAAAG,WAAAH,EAAAI,QACAF,EAAAD,EAAA1I,eACA0I,EAAA1I,eAAA,WACA2I,EAAAljB,KAAAgE,MACA,IACAzD,OAAAC,eAAAwD,KAAA,oBACArD,IAAA,WACA,YAGO,MAAAuZ,GACPlW,KAAA+e,kBAAA,IAGAE,GAGA/J,EAAAhY,UAAAzB,OAAA+jB,MAAAtiB,UACAzB,OAAAyZ,8FC1CAvZ,EAAA,IAEAA,EAAA,IAEA,IAAA8jB,EAAA9jB,EAAA,IAEAL,EAAOD,QAAUokB,EAAAhhB","file":"easydropdown.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"easydropdown\"] = factory();\n\telse\n\t\troot[\"easydropdown\"] = factory();\n})(window, function() {\nreturn "," \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 \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\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.l = 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// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 70);\n","import Config from '../../Config/Config';\nimport Dom from '../../Renderer/Dom';\nimport IActions from '../../State/Interfaces/IActions';\n\nimport detectBodyCollision from './detectBodyCollision';\nimport IDispatchOpen from './Interfaces/IDispatchOpen';\n\nfunction dispatchOpen(\n injectedDetectBodyCollision,\n actions: IActions,\n config: Config,\n dom: Dom\n): void {\n const collisionData = injectedDetectBodyCollision(dom, config);\n\n const maxVisibleItems = collisionData.maxVisibleItemsOverride > -1 ?\n collisionData.maxVisibleItemsOverride : config.behavior.maxVisibleItems;\n\n const isScrollable = dom.item.length > maxVisibleItems;\n const maxBodyHeight = dom.sumItemsHeight(maxVisibleItems);\n\n actions.open(maxBodyHeight, collisionData.type, isScrollable);\n}\n\nconst boundDispatchOpen: IDispatchOpen = dispatchOpen.bind(null, detectBodyCollision);\n\nexport {\n boundDispatchOpen as default,\n dispatchOpen\n};","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar merge_1 = require(\"./merge\");\nvar ArrayStrategy_1 = require(\"./Constants/ArrayStrategy\");\nexports.ArrayStrategy = ArrayStrategy_1.default;\nexports.default = merge_1.default;\n//# sourceMappingURL=index.js.map","function composeClassName(tokens: Array): string {\n return tokens\n .reduce((classNames, token) => {\n if (typeof token === 'string') classNames.push(token);\n else {\n const [predicate, className] = token;\n\n if (predicate) classNames.push(className);\n }\n\n return classNames;\n }, [])\n .join(' ');\n}\n\nexport default composeClassName;","import IHandlerParams from '../../Events/Interfaces/IHandlerParams';\n\nconst killSelectReaction = (select: HTMLSelectElement, {actions, timers}: IHandlerParams): void => {\n const keyingResetDuration = 100;\n\n window.clearTimeout(timers.keyingTimeoutId);\n\n actions.keying();\n\n timers.keyingTimeoutId = window.setTimeout(() => actions.resetKeying(), keyingResetDuration);\n\n select.disabled = true;\n\n setTimeout(() => {\n select.disabled = false;\n select.focus();\n });\n};\n\nexport default killSelectReaction;","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar ArrayStrategy;\n(function (ArrayStrategy) {\n ArrayStrategy[\"PUSH\"] = \"PUSH\";\n ArrayStrategy[\"REPLACE\"] = \"REPLACE\";\n})(ArrayStrategy || (ArrayStrategy = {}));\nexports.default = ArrayStrategy;\n//# sourceMappingURL=ArrayStrategy.js.map","class Option {\n public label: string = '';\n public value: string = '';\n public isDisabled: boolean = false;\n}\n\nexport default Option;","import Option from './Option';\n\nclass Group {\n public label: string = '';\n public options: Option[] = [];\n public isDisabled: boolean = false;\n\n public get totalOptions(): number {\n return this.options.length;\n }\n\n public get hasLabel(): boolean {\n return this.label !== '';\n }\n}\n\nexport default Group;","enum ScrollStatus {\n AT_TOP = 'AT_TOP',\n SCROLLED = 'SCROLLED',\n AT_BOTTOM = 'AT_BOTTOM'\n}\n\nexport default ScrollStatus;","enum BodyStatus {\n CLOSED = 'CLOSED',\n OPEN_ABOVE = 'OPEN_ABOVE',\n OPEN_BELOW = 'OPEN_BELOW'\n}\n\nexport default BodyStatus;","export enum DomChangeType {\n NONE = 'NONE',\n FULL = 'FULL',\n REPLACE = 'REPLACE',\n INNER = 'INNER',\n OUTER = 'OUTER'\n}\n\nexport default DomChangeType;","enum AttributeChangeType {\n ADD = 'ADD',\n EDIT = 'EDIT',\n REMOVE = 'REMOVE'\n}\n\nexport default AttributeChangeType;","import IHandlerParams from '../Interfaces/IHandlerParams';\n\nfunction handleWindowClick(_, {state, actions, dom}: IHandlerParams): void {\n if (!state.isOpen) return;\n\n actions.close();\n\n dom.select.blur();\n}\n\nexport default handleWindowClick;","export const UP = 38;\nexport const DOWN = 40;\nexport const SPACE = 32;\nexport const ENTER = 13;\nexport const ESC = 27;","enum CollisionType {\n NONE = 'NONE',\n TOP = 'TOP',\n BOTTOM = 'BOTTOM'\n}\n\nexport default CollisionType;","export const OPTION = '[data-ref~=\"option\"]';","/**\n * Returns the closest parent of a given element matching the\n * provided selector, optionally including the element itself.\n */\n\nfunction closestParent(\n el: HTMLElement,\n selector: string,\n includeSelf: boolean = false\n): HTMLElement {\n let parent = el.parentNode as HTMLElement;\n\n if (includeSelf && el.matches(selector)) {\n return el;\n }\n\n while (parent && parent !== document.body) {\n if (parent.matches && parent.matches(selector)) {\n return parent;\n } else if (parent.parentNode) {\n parent = parent.parentNode as HTMLElement;\n } else {\n return null;\n }\n }\n\n return null;\n}\n\nexport default closestParent;","import Behavior from './Behavior';\nimport Callbacks from './Callbacks';\nimport ClassNames from './ClassNames';\nimport IConfig from './Interfaces/IConfig';\n\nclass Config implements IConfig {\n public callbacks = new Callbacks();\n public classNames = new ClassNames();\n public behavior = new Behavior();\n\n constructor() {\n Object.seal(this);\n }\n}\n\nexport default Config;","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.MERGE_ERROR = function (offender, suggestion) {\n if (suggestion === void 0) { suggestion = ''; }\n return \"Unknown property \\\"\" + offender + \"\\\"\" + (suggestion ? \". Did you mean \\\"\" + suggestion + \"\\\"?\" : '');\n};\nexports.TYPE_ERROR_TARGET = function (target) {\n return \"[Helpful Merge] Target \\\"\" + target + \"\\\" must be a valid object\";\n};\nexports.TYPE_ERROR_SOURCE = function (source) {\n return \"[Helpful Merge] Source \\\"\" + source + \"\\\" must be a valid object\";\n};\nexports.INVALID_ARRAY_STRATEGY = function (strategy) {\n return \"[Helpful Merge] Invalid array strategy \\\"\" + strategy + \"\\\"\";\n};\n//# sourceMappingURL=Messages.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Config_1 = require(\"./Config\");\nvar ArrayStrategy_1 = require(\"./Constants/ArrayStrategy\");\nvar FluentMerge_1 = require(\"./FluentMerge\");\nvar handleMergeError_1 = require(\"./handleMergeError\");\nvar Messages = require(\"./Messages\");\nfunction merge(target, source, options) {\n if (options === void 0) { options = null; }\n var sourceKeys = [];\n var config;\n if (options instanceof Config_1.default) {\n config = options;\n }\n else {\n config = new Config_1.default();\n }\n if (typeof options === 'boolean' && options === true) {\n config.deep = true;\n }\n else if (options && config !== options && typeof options === 'object') {\n merge(config, options);\n if ([ArrayStrategy_1.default.PUSH, ArrayStrategy_1.default.REPLACE].indexOf(config.arrayStrategy) < 0) {\n throw RangeError(Messages.INVALID_ARRAY_STRATEGY(config.arrayStrategy));\n }\n }\n if (!target || typeof target !== 'object') {\n throw new TypeError(Messages.TYPE_ERROR_TARGET(target));\n }\n if (!source || typeof source !== 'object') {\n throw new TypeError(Messages.TYPE_ERROR_SOURCE(source));\n }\n if (Array.isArray(source)) {\n if (config.arrayStrategy === ArrayStrategy_1.default.PUSH) {\n // Merge arrays via push()\n target.push.apply(target, source);\n return target;\n }\n for (var i = 0; i < source.length; i++) {\n sourceKeys.push(i.toString());\n }\n }\n else {\n sourceKeys = Object.getOwnPropertyNames(source);\n }\n for (var _i = 0, sourceKeys_1 = sourceKeys; _i < sourceKeys_1.length; _i++) {\n var key = sourceKeys_1[_i];\n var descriptor = Object.getOwnPropertyDescriptor(source, key);\n // Skip read-only properties\n if (typeof descriptor.get === 'function' && !descriptor.set && !config.includeReadOnly)\n continue;\n // Skip non-enumerable properties\n if (!descriptor.enumerable && !config.includeNonEmurable)\n continue;\n if (!config.deep ||\n typeof source[key] !== 'object' ||\n source[key] === null ||\n (Array.isArray(source[key]) && config.useReferenceIfArray) ||\n (!target[key] && config.useReferenceIfTargetUnset)) {\n // If:\n // - Shallow merge\n // - All non-object primatives\n // - Null pointers\n // - Arrays, if `useReferenceIfArray` set\n // - Target prop null or undefined and `useRererenceIfTargetUnset` set\n try {\n target[key] = source[key];\n }\n catch (err) {\n handleMergeError_1.default(err, target, key, config.errorMessage);\n }\n }\n else {\n // Deep merge objects/arrays\n if (!Object.prototype.hasOwnProperty.call(target, key) || target[key] === null) {\n // If property does not exist on target, instantiate an empty\n // object or array to merge into\n try {\n target[key] = Array.isArray(source[key]) ? [] : {};\n }\n catch (err) {\n handleMergeError_1.default(err, target, key, config.errorMessage);\n }\n }\n // Recursively deep copy objects or arrays\n merge(target[key], source[key], config);\n }\n }\n return target;\n}\nvar createFluent = function (method) { return function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return (_a = new FluentMerge_1.default())[method].apply(_a, args);\n var _a;\n}; };\nObject\n .keys(FluentMerge_1.default.prototype)\n .forEach(function (method) { return merge[method] = createFluent(method); });\nexports.default = merge;\n//# sourceMappingURL=merge.js.map","import Easydropdown from './Easydropdown';\n\nconst cache: Easydropdown[] = [];\n\nexport default cache;","import Easydropdown from './Easydropdown';\n\nclass EasydropdownFacade {\n /**\n * Programmatically opens the dropdown, closing any\n * other open instances.\n */\n\n public open: () => void;\n\n /**\n * Programmatically closes the dropdown.\n */\n\n public close: () => void;\n\n /**\n * Refreshes the instance and updates the DOM in\n * response to a change in the underlying `\\` element`\n );\n }\n }\n\n return Object.seal(state);\n }\n\n private static mapGroup(group: HTMLOptGroupElement = null): Group {\n return merge(new Group(), {\n label: group ? group.label : '',\n isDisabled: group ? group.disabled : false\n });\n }\n\n private static mapOption(option: HTMLOptionElement, group: HTMLOptGroupElement = null): Option {\n if (!(option instanceof HTMLOptionElement)) throw new TypeError('[EasyDropDown] Invalid markup structure');\n\n const isParentGroupDisabled = group !== null && group.disabled;\n\n return merge(new Option(), {\n label: option.textContent,\n value: option.value,\n isDisabled: option.disabled || isParentGroupDisabled\n });\n }\n}\n\nexport default StateMapper;","import CollisionType from '../Shared/Util/Constants/CollisionType';\n\nimport BodyStatus from './Constants/BodyStatus';\nimport ScrollStatus from './Constants/ScrollStatus';\nimport IActions from './Interfaces/IActions';\nimport State from './State';\n\nconst resolveActions = (state: State): IActions => ({\n focus(): void {\n state.isFocused = true;\n },\n\n blur(): void {\n state.isFocused = false;\n },\n\n invalidate(): void {\n state.isInvalid = true;\n },\n\n validate(): void {\n state.isInvalid = false;\n },\n\n topOut(): void {\n state.scrollStatus = ScrollStatus.AT_TOP;\n },\n\n bottomOut(): void {\n state.scrollStatus = ScrollStatus.AT_BOTTOM;\n },\n\n scroll(): void {\n state.scrollStatus = ScrollStatus.SCROLLED;\n },\n\n makeScrollable(): void {\n state.isScrollable = true;\n },\n\n makeUnscrollable(): void {\n state.isScrollable = false;\n },\n\n open(\n this: IActions,\n maxBodyHeight: number,\n collisionType: CollisionType,\n isScrollable: boolean\n ): void {\n if (state.isDisabled) return;\n\n this.closeOthers();\n\n switch (collisionType) {\n case CollisionType.NONE:\n case CollisionType.TOP:\n state.bodyStatus = BodyStatus.OPEN_BELOW;\n\n break;\n case CollisionType.BOTTOM:\n state.bodyStatus = BodyStatus.OPEN_ABOVE;\n\n break;\n }\n\n state.isScrollable = isScrollable;\n state.maxBodyHeight = maxBodyHeight;\n\n this.scrollToView(state, true);\n },\n\n close(): void {\n state.bodyStatus = BodyStatus.CLOSED;\n state.focusedIndex = -1;\n },\n\n selectOption(this: IActions, index: number): void {\n const optionAtIndex = state.getOptionFromIndex(index);\n\n if (index > -1 && (!optionAtIndex || optionAtIndex.isDisabled)) return;\n\n state.selectedIndex = index;\n\n if (state.isInvalid) {\n this.validate();\n }\n\n if (state.isSearching) {\n this.scrollToView(state);\n } else {\n this.close();\n }\n },\n\n focusOption(this: IActions, index: number, shouldScrollToView: boolean = false): void {\n const scrollToMiddle = Math.abs(index - state.focusedIndex) > 1;\n\n state.focusedIndex = index;\n\n if (shouldScrollToView) {\n this.scrollToView(state, scrollToMiddle);\n }\n },\n\n search(): void {\n state.isSearching = true;\n },\n\n resetSearch(): void {\n state.isSearching = false;\n },\n\n keying(): void {\n state.isKeying = true;\n },\n\n resetKeying(): void {\n state.isKeying = false;\n },\n\n useNative(): void {\n state.isUseNativeMode = true;\n }\n});\n\nexport default resolveActions;","import merge from 'helpful-merge';\n\nimport IActions from './Interfaces/IActions';\nimport IOnAction from './Interfaces/IOnAction';\nimport IPropertyDescriptor from './Interfaces/IPropertyDescriptor';\nimport resolveActions from './resolveActions';\nimport State from './State';\n\nclass StateManager {\n public static proxyActions(state: State, injectedActions: any, onAction: IOnAction): IActions {\n const stateProxy = StateManager.createStateProxy(state, onAction);\n const actions = resolveActions(stateProxy);\n\n merge(actions, injectedActions);\n\n return actions;\n }\n\n private static createStateProxy(state: State, onAction: IOnAction): State {\n return Object.seal(\n StateManager\n .getPropertyDescriptorsFromValue(state, onAction)\n .reduce((proxy, {key, get, set}) => Object.defineProperty(\n proxy,\n key,\n {\n enumerable: true,\n get,\n set\n }\n ), {})\n );\n }\n\n private static getPropertyDescriptorsFromValue(state: State, onAction: IOnAction): IPropertyDescriptor[] {\n const prototype = Object.getPrototypeOf(state);\n const allKeys = Object.keys(state).concat(Object.keys(prototype));\n\n return allKeys\n .reduce((localDescriptors, key) => {\n const propertyDescriptor =\n Object.getOwnPropertyDescriptor(state, key) ||\n Object.getOwnPropertyDescriptor(prototype, key);\n\n const isAccessorProperty = typeof propertyDescriptor.get === 'function';\n\n localDescriptors.push({\n get: StateManager.readPropertyValue.bind(null, state, key),\n set: isAccessorProperty ?\n void 0 : StateManager.updatePropertyValue.bind(null, state, key, onAction),\n key\n });\n\n return localDescriptors;\n }, []);\n }\n\n private static readPropertyValue(state: State, key: string): any {\n return state[key];\n }\n\n private static updatePropertyValue(state: State, key: string, onAction: IOnAction, value: any): void {\n if (state[key] === value) return;\n\n state[key] = value;\n\n onAction(state, key);\n }\n}\n\nexport default StateManager;","import Timers from '../../Easydropdown/Timers';\nimport Dom from '../../Renderer/Dom';\nimport State from '../../State/State';\n\nfunction getScrollTop(\n currentScrollTop: number,\n optionOffsetTop: number,\n optionHeight: number,\n bodyHeight: number,\n scrollOffset: number\n): number {\n const max = currentScrollTop + bodyHeight;\n\n let remainder: number;\n\n if (optionOffsetTop < currentScrollTop) {\n return optionOffsetTop - scrollOffset;\n } else if ((remainder = (optionOffsetTop + optionHeight) - max) > 0) {\n return currentScrollTop + remainder + scrollOffset;\n }\n\n return currentScrollTop;\n}\n\nfunction scrollToView(dom: Dom, timers: Timers, state: State, scrollToMiddle: boolean = false): void {\n const index = Math.max(0, state.focusedIndex > -1 ? state.focusedIndex : state.selectedIndex);\n const option = dom.option[index];\n\n if (!option) return;\n\n const offset = scrollToMiddle ? (state.maxBodyHeight / 2) - (option.offsetHeight / 2) : 0;\n\n const scrollTop = getScrollTop(\n dom.itemsList.scrollTop,\n option.offsetTop,\n option.offsetHeight,\n state.maxBodyHeight,\n offset\n );\n\n if (scrollTop === dom.itemsList.scrollTop) return;\n\n dom.itemsList.scrollTop = scrollTop;\n}\n\nexport {\n getScrollTop,\n scrollToView as default\n};","import Easydropdown from '../../Easydropdown/Easydropdown';\n\nfunction closeOthers(thisInstance: Easydropdown, cache: Easydropdown[]): void {\n for (const instance of cache) {\n if (instance !== thisInstance) instance.actions.close();\n }\n}\n\nexport default closeOthers;","import State from '../../State/State';\n\nconst POLL_INTERVAL_DURATION = 300;\n\nfunction pollForSelectMutation(selectElement: HTMLSelectElement, state: State, handleMutation: () => void): number {\n let lastOuterHtml: string = selectElement.outerHTML;\n\n const pollIntervalId = window.setInterval(() => {\n const {outerHTML} = selectElement;\n\n if (outerHTML !== lastOuterHtml && !state.isKeying) {\n handleMutation();\n }\n\n lastOuterHtml = outerHTML;\n }, POLL_INTERVAL_DURATION);\n\n return pollIntervalId;\n}\n\nexport default pollForSelectMutation;","import IActions from '../../State/Interfaces/IActions';\nimport State from '../../State/State';\n\nconst POLL_INTERVAL_DURATION = 100;\n\nfunction pollForSelectChange(selectElement: HTMLSelectElement, state: State, actions: IActions): number {\n let lastValue: string = selectElement.value;\n\n const pollIntervalId = window.setInterval(() => {\n if (selectElement.value !== lastValue) {\n const selectedIndex = state.getOptionIndexFromValue(selectElement.value);\n\n actions.selectOption(selectedIndex);\n actions.focusOption(selectedIndex, true);\n }\n\n lastValue = selectElement.value;\n }, POLL_INTERVAL_DURATION);\n\n return pollIntervalId;\n}\n\nexport default pollForSelectChange;","import AttributeChangeType from './Constants/AttributeChangeType';\nimport DomChangeType from './Constants/DomChangeType';\nimport IAttributeChange from './Interfaces/IAttributeChange';\nimport PatchCommand from './PatchCommand';\n\nfunction domPatch(node: Node, command: PatchCommand): Node {\n switch (command.type) {\n case DomChangeType.NONE:\n return node;\n case DomChangeType.REPLACE:\n node.parentElement.replaceChild(command.newNode, node);\n\n return command.newNode;\n case DomChangeType.INNER:\n if (node instanceof Text) {\n node.textContent = command.newTextContent;\n } else if (command.childCommands.length > 0) {\n command.childCommands.forEach((childCommand, i) => domPatch(node.childNodes[i], childCommand));\n } else {\n (node as HTMLElement).innerHTML = command.newInnerHtml;\n }\n\n return node;\n case DomChangeType.OUTER:\n patchAttributes(node as HTMLElement, command.attributeChanges);\n\n return node;\n case DomChangeType.FULL:\n if (command.childCommands.length > 0) {\n command.childCommands.forEach((childCommand, i) => domPatch(node.childNodes[i], childCommand));\n } else {\n (node as HTMLElement).innerHTML = command.newInnerHtml;\n }\n\n patchAttributes(node as HTMLElement, command.attributeChanges);\n\n return node;\n }\n}\n\nfunction patchAttributes(el: HTMLElement, attributeChanges: IAttributeChange[]): void {\n const raf = window.requestAnimationFrame;\n\n attributeChanges.forEach(change => {\n if (raf && ['class', 'style'].indexOf(change.name) > -1) {\n raf(() => patchAttribute(el, change));\n } else {\n patchAttribute(el, change);\n }\n });\n}\n\nfunction patchAttribute(el: HTMLElement, change: IAttributeChange): void {\n switch (change.type) {\n case AttributeChangeType.ADD:\n case AttributeChangeType.EDIT:\n el.setAttribute(change.name, change.value);\n\n break;\n case AttributeChangeType.REMOVE:\n el.removeAttribute(change.name);\n\n break;\n }\n}\n\nexport default domPatch;","import DomChangeType from './Constants/DomChangeType';\nimport IAttributeChange from './Interfaces/IAttributeChange';\n\nclass PatchCommand {\n public type: DomChangeType;\n public newNode: Node = null;\n public newInnerHtml: string = '';\n public newTextContent: string = '';\n public attributeChanges: IAttributeChange[] = [];\n public childCommands: PatchCommand[] = [];\n public index: number = null;\n}\n\nexport default PatchCommand;","import merge from 'helpful-merge';\n\nimport AttributeChangeType from './Constants/AttributeChangeType';\nimport DomChangeType from './Constants/DomChangeType';\nimport IAttributeChange from './Interfaces/IAttributeChange';\nimport IPatchCommand from './Interfaces/IPatchCommand';\nimport PatchCommand from './PatchCommand';\n\nfunction domDiff(prev: Node, next: Node): PatchCommand {\n let totalChildNodes = -1;\n\n const command = new PatchCommand();\n\n if (prev instanceof HTMLSelectElement) {\n command.type = DomChangeType.NONE;\n\n return command;\n }\n\n if (prev instanceof Text && next instanceof Text) {\n if (prev.textContent === next.textContent) {\n command.type = DomChangeType.NONE;\n } else {\n command.type = DomChangeType.INNER;\n command.newTextContent = next.textContent;\n }\n } else if (prev instanceof HTMLElement && next instanceof HTMLElement) {\n if (prev.tagName !== next.tagName) {\n command.type = DomChangeType.REPLACE;\n command.newNode = next;\n } else if (prev.outerHTML === next.outerHTML) {\n command.type = DomChangeType.NONE;\n } else if (prev.innerHTML === next.innerHTML) {\n merge(command, diffAttributeChanges(prev, next));\n } else {\n merge(command, diffAttributeChanges(prev, next));\n\n if (command.attributeChanges.length > 0) {\n command.type = DomChangeType.FULL;\n } else {\n command.type = DomChangeType.INNER;\n }\n\n if ((totalChildNodes = prev.childNodes.length) > 0 && totalChildNodes === next.childNodes.length) {\n for (let i = 0, childNode; (childNode = prev.childNodes[i]); i++) {\n command.childCommands.push(domDiff(childNode, next.childNodes[i]));\n }\n } else {\n command.newInnerHtml = next.innerHTML;\n }\n }\n } else {\n command.type = DomChangeType.REPLACE;\n command.newNode = next;\n }\n\n return command;\n}\n\nfunction diffAttributeChanges(prev: HTMLElement, next: HTMLElement): IPatchCommand {\n const totalAttributes = Math.max(prev.attributes.length, next.attributes.length);\n const attributesMap = {};\n const undef = void(0);\n const attributeChanges: IAttributeChange[] = [];\n\n for (let i = 0; i < totalAttributes; i++) {\n const attr1 = prev.attributes[i];\n const attr2 = next.attributes[i];\n\n if (attr1 && attributesMap[attr1.name] === undef) {\n attributesMap[attr1.name] = [];\n }\n\n if (attr2 && attributesMap[attr2.name] === undef) {\n attributesMap[attr2.name] = [];\n }\n\n if (attr1) attributesMap[attr1.name][0] = attr1.value;\n if (attr2) attributesMap[attr2.name][1] = attr2.value;\n }\n\n const keys = Object.keys(attributesMap);\n\n if (keys.length > 1) {\n keys.sort();\n }\n\n for (let i = 0, key; (key = keys[i]); i++) {\n const attr = attributesMap[key];\n\n const change: IAttributeChange = {\n type: null,\n name: key,\n value: null\n };\n\n if (attr[0] === attr[1]) continue;\n\n if (attr[0] === undef) {\n change.type = AttributeChangeType.ADD;\n change.value = attr[1];\n } else if (attr[1] === undef) {\n change.type = AttributeChangeType.REMOVE,\n change.value = '';\n } else {\n change.type = AttributeChangeType.EDIT,\n change.value = attr[1];\n }\n\n attributeChanges.push(change);\n }\n\n return {\n type: DomChangeType.OUTER,\n attributeChanges\n };\n}\n\nexport default domDiff;","class Dom {\n public select: HTMLSelectElement = null;\n public root: HTMLDivElement = null;\n public head: HTMLDivElement = null;\n public value: HTMLDivElement = null;\n public body: HTMLDivElement = null;\n public arrow: HTMLDivElement = null;\n public itemsList: HTMLDivElement = null;\n public item: HTMLDivElement[] = [];\n public group: HTMLDivElement[] = [];\n public option: HTMLDivElement[] = [];\n\n public sumItemsHeight(max: number = Infinity): number {\n let totalHeight = 0;\n\n for (let i = 0, item; (item = this.item[i]); i++) {\n if (i === max) break;\n\n totalHeight += item.offsetHeight;\n }\n\n return totalHeight;\n }\n}\n\nexport default Dom;","function createDomElementFromHtml(html: string): Element {\n const temp = document.createElement('div');\n\n temp.innerHTML = html;\n\n return temp.firstElementChild;\n}\n\nexport default createDomElementFromHtml;","import ClassNames from '../Config/ClassNames';\nimport State from '../State/State';\n\nconst value = (state: State, classNames: ClassNames) => {\n return (`\n \n ${state.humanReadableValue}\n \n `);\n};\n\nexport default value;","import ClassNames from '../Config/ClassNames';\n\nconst arrow = (_, classNames: ClassNames) => `
`;\n\nexport default arrow;","import ClassNames from '../Config/ClassNames';\nimport State from '../State/State';\n\nimport arrow from './arrow';\nimport value from './value';\n\nconst head = (state: State, classNames: ClassNames) => (`\n
\n ${value(state, classNames)}\n ${arrow(state, classNames)}\n \n
\n`);\n\nexport default head;","import ClassNames from '../Config/ClassNames';\nimport composeClassName from '../Shared/Util/composeClassName';\nimport Option from '../State/Option';\nimport State from '../State/State';\n\nfunction option(optionState: Option, state: State, classNames: ClassNames): string {\n const isSelected = state.selectedOption === optionState;\n\n const className = composeClassName([\n classNames.option,\n [isSelected, classNames.optionSelected],\n [optionState === state.focusedOption, classNames.optionFocused],\n [optionState.isDisabled, classNames.optionDisabled]\n ]);\n\n return (`\n \n ${optionState.label}\n \n `);\n}\n\nexport default option;","import ClassNames from '../Config/ClassNames';\nimport composeClassName from '../Shared/Util/composeClassName';\nimport Group from '../State/Group';\nimport State from '../State/State';\n\nimport option from './option';\n\nconst group = (groupState: Group, state: State, classNames: ClassNames) => {\n const className = composeClassName([\n classNames.group,\n [groupState.isDisabled, classNames.groupDisabled],\n [groupState.hasLabel, classNames.groupHasLabel]\n ]);\n\n return (`\n
\n ${groupState.hasLabel ?\n `
${groupState.label}
` : ''\n }\n ${groupState.options.map(optionState => option(optionState, state, classNames)).join('')}\n
\n `);\n};\n\nexport default group;","import ClassNames from '../Config/ClassNames';\nimport composeClassName from '../Shared/Util/composeClassName';\nimport State from '../State/State';\n\nimport group from './group';\n\nfunction body(state: State, classNames: ClassNames): string {\n const className = composeClassName([\n classNames.body,\n [state.isAtTop, classNames.bodyAtTop],\n [state.isAtBottom, classNames.bodyAtBottom],\n [state.isScrollable, classNames.bodyScrollable]\n ]);\n\n const styleAttr = state.isOpen ?\n `style=\"max-height: ${state.maxBodyHeight}px;\"` : '';\n\n return (`\n \n
\n ${state.groups.map(groupState => group(groupState, state, classNames)).join('')}\n
\n
\n
\n \n `);\n}\n\nexport default body;","import ClassNames from '../Config/ClassNames';\nimport composeClassName from '../Shared/Util/composeClassName';\nimport State from '../State/State';\n\nimport body from './body';\nimport head from './head';\n\nconst root = (state: State, classNames: ClassNames) => {\n const className = composeClassName([\n classNames.root,\n [state.isDisabled, classNames.rootDisabled],\n [state.isInvalid, classNames.rootInvalid],\n [state.isOpen, classNames.rootOpen],\n [state.isFocused, classNames.rootFocused],\n [state.hasValue, classNames.rootHasValue],\n [state.isOpenAbove, classNames.rootOpenAbove],\n [state.isOpenBelow, classNames.rootOpenBelow],\n [state.isUseNativeMode, classNames.rootNative]\n ]);\n\n return (`\n \n ${head(state, classNames)}\n ${state.isUseNativeMode ? '' : body(state, classNames)}\n \n `);\n};\n\nexport default root;","import root from '../Components/root';\nimport ClassNames from '../Config/ClassNames';\nimport createDomElementFromHtml from '../Shared/Util/createDomElementFromHtml';\nimport State from '../State/State';\n\nimport Dom from './Dom';\nimport domDiff from './domDiff';\nimport domPatch from './domPatch';\n\nclass Renderer {\n public classNames: ClassNames;\n public dom: Dom;\n\n constructor(classNames: ClassNames) {\n this.dom = new Dom();\n this.classNames = classNames;\n }\n\n public render(state: State, selectElement: HTMLSelectElement): Dom {\n const html = root(state, this.classNames);\n const rootElement = createDomElementFromHtml(html) as HTMLDivElement;\n\n this.dom = new Dom();\n this.dom.root = rootElement;\n\n this.dom.option.length = this.dom.group.length = 0;\n\n Renderer.queryDomRefs(this.dom);\n\n this.injectSelect(selectElement);\n\n return this.dom;\n }\n\n public update(state: State, key?: keyof State): void {\n const nextHtml = root(state, this.classNames);\n const nextRoot = createDomElementFromHtml(nextHtml) as HTMLDivElement;\n const diffCommand = domDiff(this.dom.root, nextRoot);\n\n domPatch(this.dom.root, diffCommand);\n\n if (key === 'selectedIndex') {\n this.syncSelectWithValue(state.value);\n }\n }\n\n public destroy(): void {\n this.dom.select.classList.remove(this.classNames.select);\n\n try {\n this.dom.root.parentElement.replaceChild(this.dom.select, this.dom.root);\n } catch (err) { /**/ }\n }\n\n private injectSelect(selectElement: HTMLSelectElement): void {\n const parent = selectElement.parentElement;\n const tempSelect = this.dom.select;\n\n if (!parent) throw new Error('[EasyDropDown] The provided ``\n * element (for example, adding or removing an option).\n */\n\n public refresh: () => void;\n\n /**\n * Destroys the instance by removing all EasyDropDown-generated\n * elements from the DOM, and unbinding all event handlers.\n * The underlying select is returned to the root position.\n */\n\n public destroy: () => void;\n\n /**\n * An accessor property allowing writing to and reading\n * from the dropdown's value.\n */\n\n public value: string;\n\n constructor(implementation: Easydropdown) {\n this.open = implementation.open.bind(implementation);\n this.close = implementation.close.bind(implementation);\n this.refresh = implementation.refresh.bind(implementation);\n this.destroy = implementation.destroy.bind(implementation);\n\n Object.defineProperties(this, {\n value: {\n get: () => implementation.value,\n set: (nextValue: string) => implementation.value = nextValue\n }\n });\n }\n}\n\nexport default EasydropdownFacade;","class Timers {\n public pollChangeIntervalId: number;\n public pollMutationIntervalId: number;\n public searchTimeoutId: number;\n public keyingTimeoutId: number;\n\n public clear(): void {\n Object.keys(this).forEach(key => window.clearInterval(this[key]));\n }\n}\n\nexport default Timers;","import merge from 'helpful-merge';\n\nimport Config from '../Config/Config';\n\nimport BodyStatus from './Constants/BodyStatus';\nimport ScrollStatus from './Constants/ScrollStatus';\nimport Group from './Group';\nimport Option from './Option';\n\nclass State {\n public groups: Group[] = [];\n public focusedIndex: number = -1;\n public selectedIndex: number = -1;\n public maxVisibleItemsOverride: number = -1;\n public maxBodyHeight: number = -1;\n public name: string = '';\n public placeholder: string = '';\n public scrollStatus: ScrollStatus = ScrollStatus.AT_TOP;\n public bodyStatus: BodyStatus = BodyStatus.CLOSED;\n public isDisabled: boolean = false;\n public isRequired: boolean = false;\n public isInvalid: boolean = false;\n public isFocused: boolean = false;\n public isUseNativeMode: boolean = false;\n public isScrollable: boolean = false;\n public isSearching: boolean = false;\n public isKeying: boolean = false;\n\n private config: Config;\n\n constructor(stateRaw: any = null, config = new Config()) {\n this.config = config;\n\n if (!stateRaw) return;\n\n merge(this, stateRaw);\n\n this.groups = this.groups.map((groupRaw) => {\n const group = merge(new Group(), groupRaw);\n\n group.options = group.options.map(optionRaw => merge(new Option(), optionRaw));\n\n return group;\n });\n }\n\n public get totalGroups(): number {\n return this.groups.length;\n }\n\n public get lastGroup(): Group {\n return this.groups[this.groups.length - 1];\n }\n\n public get totalOptions(): number {\n return this.groups.reduce((total: number, group: Group) => total + group.totalOptions, 0);\n }\n\n public get selectedOption(): Option {\n return this.getOptionFromIndex(this.selectedIndex);\n }\n\n public get focusedOption(): Option {\n return this.getOptionFromIndex(this.focusedIndex);\n }\n\n public get value(): string {\n return this.selectedOption ? this.selectedOption.value : '';\n }\n\n public get humanReadableValue(): string {\n if (\n (!this.hasValue && this.hasPlaceholder) ||\n (\n this.config.behavior.showPlaceholderWhenOpen &&\n this.hasPlaceholder &&\n this.isOpen\n )\n ) {\n return this.placeholder;\n }\n\n return this.label;\n }\n\n public get label(): string {\n return this.selectedOption ? this.selectedOption.label : '';\n }\n\n public get hasPlaceholder(): boolean {\n return this.placeholder !== '';\n }\n\n public get isPlaceholderShown(): boolean {\n return this.hasPlaceholder && !this.hasValue;\n }\n\n public get hasValue(): boolean {\n return this.value !== '';\n }\n\n public get isGrouped(): boolean {\n return Boolean(this.groups.find(group => group.hasLabel));\n }\n\n public get isOpen(): boolean {\n return this.bodyStatus !== BodyStatus.CLOSED;\n }\n\n public get isClosed(): boolean {\n return this.bodyStatus === BodyStatus.CLOSED;\n }\n\n public get isOpenAbove(): boolean {\n return this.bodyStatus === BodyStatus.OPEN_ABOVE;\n }\n\n public get isOpenBelow(): boolean {\n return this.bodyStatus === BodyStatus.OPEN_BELOW;\n }\n\n public get isAtTop(): boolean {\n return this.scrollStatus === ScrollStatus.AT_TOP;\n }\n\n public get isAtBottom(): boolean {\n return this.scrollStatus === ScrollStatus.AT_BOTTOM;\n }\n\n public getOptionFromIndex(index: number): Option {\n let groupStartIndex = 0;\n\n for (const group of this.groups) {\n if (index < 0 ) break;\n\n const groupEndIndex = Math.max(0, groupStartIndex + group.totalOptions - 1);\n\n if (index <= groupEndIndex) {\n const option = group.options[index - groupStartIndex];\n\n return option;\n }\n\n groupStartIndex += group.totalOptions;\n }\n\n return null;\n }\n\n public getOptionIndexFromValue(value: string): number {\n let index: number = -1;\n\n for (const group of this.groups) {\n for (const option of group.options) {\n index++;\n\n if (option.value === value) {\n return index;\n }\n }\n }\n\n return -1;\n }\n}\n\nexport default State;","function isMobilePlatform(userAgent: string): boolean {\n const isIos = /(ipad|iphone|ipod)/gi.test(userAgent);\n const isAndroid = /android/gi.test(userAgent);\n const isOperaMini = /opera mini/gi.test(userAgent);\n const isWindowsPhone = /windows phone/gi.test(userAgent);\n\n if (isIos || isAndroid || isOperaMini || isWindowsPhone) {\n return true;\n }\n\n return false;\n}\n\nexport default isMobilePlatform;","import merge from 'helpful-merge';\n\nimport Config from '../Config/Config';\nimport isMobilePlatform from '../Shared/Util/isMobilePlatform';\n\nimport Group from './Group';\nimport Option from './Option';\nimport State from './State';\n\nclass StateMapper {\n public static mapFromSelect(selectElement: HTMLSelectElement, config: Config): State {\n const state = new State(null, config);\n\n let isWithinGroup = false;\n\n state.name = selectElement.name;\n state.isDisabled = selectElement.disabled;\n state.isRequired = selectElement.required;\n\n state.isUseNativeMode = (\n config.behavior.useNativeUiOnMobile &&\n isMobilePlatform(window.navigator.userAgent)\n );\n\n for (let i = 0, child: Element; (child = selectElement.children[i]); i++) {\n if (i === 0 && child.getAttribute('data-placeholder') !== null) {\n state.placeholder = child.textContent;\n (child as HTMLOptionElement).value = '';\n\n continue;\n }\n\n if (child instanceof HTMLOptionElement) {\n if (isWithinGroup === false) {\n state.groups.push(StateMapper.mapGroup());\n\n isWithinGroup = true;\n }\n\n state.lastGroup.options.push(StateMapper.mapOption(child));\n\n if (child.selected) state.selectedIndex = state.totalOptions - 1;\n } else if (child instanceof HTMLOptGroupElement) {\n isWithinGroup = true;\n\n state.groups.push(StateMapper.mapGroup(child));\n\n for (let j = 0, groupChild: Element; (groupChild = child.children[j]); j++) {\n state.lastGroup.options.push(\n StateMapper.mapOption(\n groupChild as HTMLOptionElement,\n child as HTMLOptGroupElement\n )\n );\n\n if ((groupChild as HTMLOptionElement).selected) state.selectedIndex = state.totalOptions - 1;\n }\n\n isWithinGroup = false;\n } else {\n throw new TypeError(\n `[EasyDropDown] Invalid child tag \"${child.tagName}\" found in provided \\`\n \n`);\n\nexport default head;","import ClassNames from '../Config/ClassNames';\nimport composeClassName from '../Shared/Util/composeClassName';\nimport Option from '../State/Option';\nimport State from '../State/State';\n\nfunction option(optionState: Option, state: State, classNames: ClassNames): string {\n const isSelected = state.selectedOption === optionState;\n\n const className = composeClassName([\n classNames.option,\n [isSelected, classNames.optionSelected],\n [optionState === state.focusedOption, classNames.optionFocused],\n [optionState.isDisabled, classNames.optionDisabled]\n ]);\n\n return (`\n \n ${optionState.label}\n \n `);\n}\n\nexport default option;","import ClassNames from '../Config/ClassNames';\nimport composeClassName from '../Shared/Util/composeClassName';\nimport Group from '../State/Group';\nimport State from '../State/State';\n\nimport option from './option';\n\nconst group = (groupState: Group, state: State, classNames: ClassNames) => {\n const className = composeClassName([\n classNames.group,\n [groupState.isDisabled, classNames.groupDisabled],\n [groupState.hasLabel, classNames.groupHasLabel]\n ]);\n\n return (`\n
\n ${groupState.hasLabel ?\n `
${groupState.label}
` : ''\n }\n ${groupState.options.map(optionState => option(optionState, state, classNames)).join('')}\n
\n `);\n};\n\nexport default group;","import ClassNames from '../Config/ClassNames';\nimport composeClassName from '../Shared/Util/composeClassName';\nimport State from '../State/State';\n\nimport group from './group';\n\nfunction body(state: State, classNames: ClassNames): string {\n const className = composeClassName([\n classNames.body,\n [state.isAtTop, classNames.bodyAtTop],\n [state.isAtBottom, classNames.bodyAtBottom],\n [state.isScrollable, classNames.bodyScrollable]\n ]);\n\n const styleAttr = state.isOpen ?\n `style=\"max-height: ${state.maxBodyHeight}px;\"` : '';\n\n return (`\n \n
\n ${state.groups.map(groupState => group(groupState, state, classNames)).join('')}\n
\n
\n
\n \n `);\n}\n\nexport default body;","import ClassNames from '../Config/ClassNames';\nimport composeClassName from '../Shared/Util/composeClassName';\nimport State from '../State/State';\n\nimport body from './body';\nimport head from './head';\n\nconst root = (state: State, classNames: ClassNames) => {\n const className = composeClassName([\n classNames.root,\n [state.isDisabled, classNames.rootDisabled],\n [state.isInvalid, classNames.rootInvalid],\n [state.isOpen, classNames.rootOpen],\n [state.isFocused, classNames.rootFocused],\n [state.hasValue, classNames.rootHasValue],\n [state.isOpenAbove, classNames.rootOpenAbove],\n [state.isOpenBelow, classNames.rootOpenBelow],\n [state.isUseNativeMode, classNames.rootNative]\n ]);\n\n return (`\n \n ${head(state, classNames)}\n ${state.isUseNativeMode ? '' : body(state, classNames)}\n \n `);\n};\n\nexport default root;","import root from '../Components/root';\nimport ClassNames from '../Config/ClassNames';\nimport createDomElementFromHtml from '../Shared/Util/createDomElementFromHtml';\nimport State from '../State/State';\n\nimport Dom from './Dom';\nimport domDiff from './domDiff';\nimport domPatch from './domPatch';\n\nclass Renderer {\n public classNames: ClassNames;\n public dom: Dom;\n\n constructor(classNames: ClassNames) {\n this.dom = new Dom();\n this.classNames = classNames;\n }\n\n public render(state: State, selectElement: HTMLSelectElement): Dom {\n const html = root(state, this.classNames);\n const rootElement = createDomElementFromHtml(html) as HTMLDivElement;\n\n this.dom = new Dom();\n this.dom.root = rootElement;\n\n this.dom.option.length = this.dom.group.length = 0;\n\n Renderer.queryDomRefs(this.dom);\n\n this.injectSelect(selectElement);\n\n return this.dom;\n }\n\n public update(state: State, key?: keyof State): void {\n const nextHtml = root(state, this.classNames);\n const nextRoot = createDomElementFromHtml(nextHtml) as HTMLDivElement;\n const diffCommand = domDiff(this.dom.root, nextRoot);\n\n domPatch(this.dom.root, diffCommand);\n\n if (key === 'selectedIndex') {\n this.syncSelectWithValue(state.value);\n }\n }\n\n public destroy(): void {\n this.dom.select.classList.remove(this.classNames.select);\n\n try {\n this.dom.root.parentElement.replaceChild(this.dom.select, this.dom.root);\n } catch (err) { /**/ }\n }\n\n private injectSelect(selectElement: HTMLSelectElement): void {\n const parent = selectElement.parentElement;\n const tempSelect = this.dom.select;\n\n if (!parent) throw new Error('[EasyDropDown] The provided ``\n * element (for example, adding or removing an option).\n */\n\n public refresh: () => void;\n\n /**\n * Destroys the instance by removing all EasyDropDown-generated\n * elements from the DOM, and unbinding all event handlers.\n * The underlying select is returned to the root position.\n */\n\n public destroy: () => void;\n\n /**\n * An accessor property allowing writing to and reading\n * from the dropdown's value.\n */\n\n public value: string;\n\n constructor(implementation: Easydropdown) {\n this.open = implementation.open.bind(implementation);\n this.close = implementation.close.bind(implementation);\n this.refresh = implementation.refresh.bind(implementation);\n this.destroy = implementation.destroy.bind(implementation);\n\n Object.defineProperties(this, {\n value: {\n get: () => implementation.value,\n set: (nextValue: string) => implementation.value = nextValue\n }\n });\n }\n}\n\nexport default EasydropdownFacade;","class Timers {\n public pollChangeIntervalId: number;\n public pollMutationIntervalId: number;\n public searchTimeoutId: number;\n public keyingTimeoutId: number;\n\n public clear(): void {\n Object.keys(this).forEach(key => window.clearInterval(this[key]));\n }\n}\n\nexport default Timers;","import merge from 'helpful-merge';\n\nimport Config from '../Config/Config';\n\nimport BodyStatus from './Constants/BodyStatus';\nimport ScrollStatus from './Constants/ScrollStatus';\nimport Group from './Group';\nimport Option from './Option';\n\nclass State {\n public groups: Group[] = [];\n public focusedIndex: number = -1;\n public selectedIndex: number = -1;\n public maxVisibleItemsOverride: number = -1;\n public maxBodyHeight: number = -1;\n public name: string = '';\n public placeholder: string = '';\n public scrollStatus: ScrollStatus = ScrollStatus.AT_TOP;\n public bodyStatus: BodyStatus = BodyStatus.CLOSED;\n public isDisabled: boolean = false;\n public isRequired: boolean = false;\n public isInvalid: boolean = false;\n public isFocused: boolean = false;\n public isUseNativeMode: boolean = false;\n public isScrollable: boolean = false;\n public isSearching: boolean = false;\n public isKeying: boolean = false;\n\n private config: Config;\n\n constructor(stateRaw: any = null, config = new Config()) {\n this.config = config;\n\n if (!stateRaw) return;\n\n merge(this, stateRaw);\n\n this.groups = this.groups.map((groupRaw) => {\n const group = merge(new Group(), groupRaw);\n\n group.options = group.options.map(optionRaw => merge(new Option(), optionRaw));\n\n return group;\n });\n }\n\n public get totalGroups(): number {\n return this.groups.length;\n }\n\n public get lastGroup(): Group {\n return this.groups[this.groups.length - 1];\n }\n\n public get totalOptions(): number {\n return this.groups.reduce((total: number, group: Group) => total + group.totalOptions, 0);\n }\n\n public get selectedOption(): Option {\n return this.getOptionFromIndex(this.selectedIndex);\n }\n\n public get focusedOption(): Option {\n return this.getOptionFromIndex(this.focusedIndex);\n }\n\n public get value(): string {\n return this.selectedOption ? this.selectedOption.value : '';\n }\n\n public get humanReadableValue(): string {\n if (\n (!this.hasValue && this.hasPlaceholder) ||\n (\n this.config.behavior.showPlaceholderWhenOpen &&\n this.hasPlaceholder &&\n this.isOpen\n )\n ) {\n return this.placeholder;\n }\n\n return this.label;\n }\n\n public get label(): string {\n return this.selectedOption ? this.selectedOption.label : '';\n }\n\n public get hasPlaceholder(): boolean {\n return this.placeholder !== '';\n }\n\n public get isPlaceholderShown(): boolean {\n return this.hasPlaceholder && !this.hasValue;\n }\n\n public get hasValue(): boolean {\n return this.value !== '';\n }\n\n public get isGrouped(): boolean {\n return Boolean(this.groups.find(group => group.hasLabel));\n }\n\n public get isOpen(): boolean {\n return this.bodyStatus !== BodyStatus.CLOSED;\n }\n\n public get isClosed(): boolean {\n return this.bodyStatus === BodyStatus.CLOSED;\n }\n\n public get isOpenAbove(): boolean {\n return this.bodyStatus === BodyStatus.OPEN_ABOVE;\n }\n\n public get isOpenBelow(): boolean {\n return this.bodyStatus === BodyStatus.OPEN_BELOW;\n }\n\n public get isAtTop(): boolean {\n return this.scrollStatus === ScrollStatus.AT_TOP;\n }\n\n public get isAtBottom(): boolean {\n return this.scrollStatus === ScrollStatus.AT_BOTTOM;\n }\n\n public getOptionFromIndex(index: number): Option {\n let groupStartIndex = 0;\n\n for (const group of this.groups) {\n if (index < 0 ) break;\n\n const groupEndIndex = Math.max(0, groupStartIndex + group.totalOptions - 1);\n\n if (index <= groupEndIndex) {\n const option = group.options[index - groupStartIndex];\n\n return option;\n }\n\n groupStartIndex += group.totalOptions;\n }\n\n return null;\n }\n\n public getOptionIndexFromValue(value: string): number {\n let index: number = -1;\n\n for (const group of this.groups) {\n for (const option of group.options) {\n index++;\n\n if (option.value === value) {\n return index;\n }\n }\n }\n\n return -1;\n }\n}\n\nexport default State;","function isMobilePlatform(userAgent: string): boolean {\n const isIos = /(ipad|iphone|ipod)/gi.test(userAgent);\n const isAndroid = /android/gi.test(userAgent);\n const isOperaMini = /opera mini/gi.test(userAgent);\n const isWindowsPhone = /windows phone/gi.test(userAgent);\n\n if (isIos || isAndroid || isOperaMini || isWindowsPhone) {\n return true;\n }\n\n return false;\n}\n\nexport default isMobilePlatform;","import merge from 'helpful-merge';\n\nimport Config from '../Config/Config';\nimport isMobilePlatform from '../Shared/Util/isMobilePlatform';\n\nimport Group from './Group';\nimport Option from './Option';\nimport State from './State';\n\nclass StateMapper {\n public static mapFromSelect(selectElement: HTMLSelectElement, config: Config): State {\n const state = new State(null, config);\n\n let isWithinGroup = false;\n\n state.name = selectElement.name;\n state.isDisabled = selectElement.disabled;\n state.isRequired = selectElement.required;\n\n state.isUseNativeMode = (\n config.behavior.useNativeUiOnMobile &&\n isMobilePlatform(window.navigator.userAgent)\n );\n\n for (let i = 0, child: Element; (child = selectElement.children[i]); i++) {\n if (i === 0 && child.getAttribute('data-placeholder') !== null) {\n state.placeholder = child.textContent;\n (child as HTMLOptionElement).value = '';\n\n continue;\n }\n\n if (child instanceof HTMLOptionElement) {\n if (isWithinGroup === false) {\n state.groups.push(StateMapper.mapGroup());\n\n isWithinGroup = true;\n }\n\n state.lastGroup.options.push(StateMapper.mapOption(child));\n\n if (child.selected) state.selectedIndex = state.totalOptions - 1;\n } else if (child instanceof HTMLOptGroupElement) {\n isWithinGroup = true;\n\n state.groups.push(StateMapper.mapGroup(child));\n\n for (let j = 0, groupChild: Element; (groupChild = child.children[j]); j++) {\n state.lastGroup.options.push(\n StateMapper.mapOption(\n groupChild as HTMLOptionElement,\n child as HTMLOptGroupElement\n )\n );\n\n if ((groupChild as HTMLOptionElement).selected) state.selectedIndex = state.totalOptions - 1;\n }\n\n isWithinGroup = false;\n } else {\n throw new TypeError(\n `[EasyDropDown] Invalid child tag \"${child.tagName}\" found in provided \\`\n \n`);\n\nexport default head;","import ClassNames from '../Config/ClassNames';\nimport composeClassName from '../Shared/Util/composeClassName';\nimport Option from '../State/Option';\nimport State from '../State/State';\n\nfunction option(optionState: Option, state: State, classNames: ClassNames): string {\n const isSelected = state.selectedOption === optionState;\n\n const className = composeClassName([\n classNames.option,\n [isSelected, classNames.optionSelected],\n [optionState === state.focusedOption, classNames.optionFocused],\n [optionState.isDisabled, classNames.optionDisabled]\n ]);\n\n return (`\n \n ${optionState.label}\n \n `);\n}\n\nexport default option;","import ClassNames from '../Config/ClassNames';\nimport composeClassName from '../Shared/Util/composeClassName';\nimport Group from '../State/Group';\nimport State from '../State/State';\n\nimport option from './option';\n\nconst group = (groupState: Group, state: State, classNames: ClassNames) => {\n const className = composeClassName([\n classNames.group,\n [groupState.isDisabled, classNames.groupDisabled],\n [groupState.hasLabel, classNames.groupHasLabel]\n ]);\n\n return (`\n
\n ${groupState.hasLabel ?\n `
${groupState.label}
` : ''\n }\n ${groupState.options.map(optionState => option(optionState, state, classNames)).join('')}\n
\n `);\n};\n\nexport default group;","import ClassNames from '../Config/ClassNames';\nimport composeClassName from '../Shared/Util/composeClassName';\nimport State from '../State/State';\n\nimport group from './group';\n\nfunction body(state: State, classNames: ClassNames): string {\n const className = composeClassName([\n classNames.body,\n [state.isAtTop, classNames.bodyAtTop],\n [state.isAtBottom, classNames.bodyAtBottom],\n [state.isScrollable, classNames.bodyScrollable]\n ]);\n\n const styleAttr = state.isOpen ?\n `style=\"max-height: ${state.maxBodyHeight}px;\"` : '';\n\n return (`\n \n
\n ${state.groups.map(groupState => group(groupState, state, classNames)).join('')}\n
\n
\n
\n \n `);\n}\n\nexport default body;","import ClassNames from '../Config/ClassNames';\nimport composeClassName from '../Shared/Util/composeClassName';\nimport State from '../State/State';\n\nimport body from './body';\nimport head from './head';\n\nconst root = (state: State, classNames: ClassNames) => {\n const className = composeClassName([\n classNames.root,\n [state.isDisabled, classNames.rootDisabled],\n [state.isInvalid, classNames.rootInvalid],\n [state.isOpen, classNames.rootOpen],\n [state.isFocused, classNames.rootFocused],\n [state.hasValue, classNames.rootHasValue],\n [state.isOpenAbove, classNames.rootOpenAbove],\n [state.isOpenBelow, classNames.rootOpenBelow],\n [state.isUseNativeMode, classNames.rootNative]\n ]);\n\n return (`\n \n ${head(state, classNames)}\n ${state.isUseNativeMode ? '' : body(state, classNames)}\n \n `);\n};\n\nexport default root;","import root from '../Components/root';\nimport ClassNames from '../Config/ClassNames';\nimport createDomElementFromHtml from '../Shared/Util/createDomElementFromHtml';\nimport State from '../State/State';\n\nimport Dom from './Dom';\nimport domDiff from './domDiff';\nimport domPatch from './domPatch';\n\nclass Renderer {\n public classNames: ClassNames;\n public dom: Dom;\n\n constructor(classNames: ClassNames) {\n this.dom = new Dom();\n this.classNames = classNames;\n }\n\n public render(state: State, selectElement: HTMLSelectElement): Dom {\n const html = root(state, this.classNames);\n const rootElement = createDomElementFromHtml(html) as HTMLDivElement;\n\n this.dom = new Dom();\n this.dom.root = rootElement;\n\n this.dom.option.length = this.dom.group.length = 0;\n\n Renderer.queryDomRefs(this.dom);\n\n this.injectSelect(selectElement);\n\n return this.dom;\n }\n\n public update(state: State, key?: keyof State): void {\n const nextHtml = root(state, this.classNames);\n const nextRoot = createDomElementFromHtml(nextHtml) as HTMLDivElement;\n const diffCommand = domDiff(this.dom.root, nextRoot);\n\n domPatch(this.dom.root, diffCommand);\n\n if (key === 'selectedIndex') {\n this.syncSelectWithValue(state.value);\n }\n }\n\n public destroy(): void {\n this.dom.select.classList.remove(this.classNames.select);\n\n try {\n this.dom.root.parentElement.replaceChild(this.dom.select, this.dom.root);\n } catch (err) { /**/ }\n }\n\n private injectSelect(selectElement: HTMLSelectElement): void {\n const parent = selectElement.parentElement;\n const tempSelect = this.dom.select;\n\n if (!parent) throw new Error('[EasyDropDown] The provided ``\n * element (for example, adding or removing an option).\n */\n\n public refresh: () => void;\n\n /**\n * Destroys the instance by removing all EasyDropDown-generated\n * elements from the DOM, and unbinding all event handlers.\n * The underlying select is returned to the root position.\n */\n\n public destroy: () => void;\n\n /**\n * An accessor property allowing writing to and reading\n * from the dropdown's value.\n */\n\n public value: string;\n\n constructor(implementation: Easydropdown) {\n this.open = implementation.open.bind(implementation);\n this.close = implementation.close.bind(implementation);\n this.refresh = implementation.refresh.bind(implementation);\n this.destroy = implementation.destroy.bind(implementation);\n\n Object.defineProperties(this, {\n value: {\n get: () => implementation.value,\n set: (nextValue: string) => implementation.value = nextValue\n }\n });\n }\n}\n\nexport default EasydropdownFacade;","class Timers {\n public pollChangeIntervalId: number;\n public pollMutationIntervalId: number;\n public searchTimeoutId: number;\n public keyingTimeoutId: number;\n\n public clear(): void {\n Object.keys(this).forEach(key => window.clearInterval(this[key]));\n }\n}\n\nexport default Timers;","import merge from 'helpful-merge';\n\nimport Config from '../Config/Config';\n\nimport BodyStatus from './Constants/BodyStatus';\nimport ScrollStatus from './Constants/ScrollStatus';\nimport Group from './Group';\nimport Option from './Option';\n\nclass State {\n public groups: Group[] = [];\n public focusedIndex: number = -1;\n public selectedIndex: number = -1;\n public maxVisibleItemsOverride: number = -1;\n public maxBodyHeight: number = -1;\n public name: string = '';\n public placeholder: string = '';\n public scrollStatus: ScrollStatus = ScrollStatus.AT_TOP;\n public bodyStatus: BodyStatus = BodyStatus.CLOSED;\n public isDisabled: boolean = false;\n public isRequired: boolean = false;\n public isInvalid: boolean = false;\n public isFocused: boolean = false;\n public isUseNativeMode: boolean = false;\n public isScrollable: boolean = false;\n public isSearching: boolean = false;\n public isKeying: boolean = false;\n\n private config: Config;\n\n constructor(stateRaw: any = null, config = new Config()) {\n this.config = config;\n\n if (!stateRaw) return;\n\n merge(this, stateRaw);\n\n this.groups = this.groups.map((groupRaw) => {\n const group = merge(new Group(), groupRaw);\n\n group.options = group.options.map(optionRaw => merge(new Option(), optionRaw));\n\n return group;\n });\n }\n\n public get totalGroups(): number {\n return this.groups.length;\n }\n\n public get lastGroup(): Group {\n return this.groups[this.groups.length - 1];\n }\n\n public get totalOptions(): number {\n return this.groups.reduce((total: number, group: Group) => total + group.totalOptions, 0);\n }\n\n public get selectedOption(): Option {\n return this.getOptionFromIndex(this.selectedIndex);\n }\n\n public get focusedOption(): Option {\n return this.getOptionFromIndex(this.focusedIndex);\n }\n\n public get value(): string {\n return this.selectedOption ? this.selectedOption.value : '';\n }\n\n public get humanReadableValue(): string {\n if (\n (!this.hasValue && this.hasPlaceholder) ||\n (\n this.config.behavior.showPlaceholderWhenOpen &&\n this.hasPlaceholder &&\n this.isOpen\n )\n ) {\n return this.placeholder;\n }\n\n return this.label;\n }\n\n public get label(): string {\n return this.selectedOption ? this.selectedOption.label : '';\n }\n\n public get hasPlaceholder(): boolean {\n return this.placeholder !== '';\n }\n\n public get isPlaceholderShown(): boolean {\n return this.hasPlaceholder && !this.hasValue;\n }\n\n public get hasValue(): boolean {\n return this.value !== '';\n }\n\n public get isGrouped(): boolean {\n return Boolean(this.groups.find(group => group.hasLabel));\n }\n\n public get isOpen(): boolean {\n return this.bodyStatus !== BodyStatus.CLOSED;\n }\n\n public get isClosed(): boolean {\n return this.bodyStatus === BodyStatus.CLOSED;\n }\n\n public get isOpenAbove(): boolean {\n return this.bodyStatus === BodyStatus.OPEN_ABOVE;\n }\n\n public get isOpenBelow(): boolean {\n return this.bodyStatus === BodyStatus.OPEN_BELOW;\n }\n\n public get isAtTop(): boolean {\n return this.scrollStatus === ScrollStatus.AT_TOP;\n }\n\n public get isAtBottom(): boolean {\n return this.scrollStatus === ScrollStatus.AT_BOTTOM;\n }\n\n public getOptionFromIndex(index: number): Option {\n let groupStartIndex = 0;\n\n for (const group of this.groups) {\n if (index < 0 ) break;\n\n const groupEndIndex = Math.max(0, groupStartIndex + group.totalOptions - 1);\n\n if (index <= groupEndIndex) {\n const option = group.options[index - groupStartIndex];\n\n return option;\n }\n\n groupStartIndex += group.totalOptions;\n }\n\n return null;\n }\n\n public getOptionIndexFromValue(value: string): number {\n let index: number = -1;\n\n for (const group of this.groups) {\n for (const option of group.options) {\n index++;\n\n if (option.value === value) {\n return index;\n }\n }\n }\n\n return -1;\n }\n}\n\nexport default State;","function isMobilePlatform(userAgent: string): boolean {\n const isIos = /(ipad|iphone|ipod)/gi.test(userAgent);\n const isAndroid = /android/gi.test(userAgent);\n const isOperaMini = /opera mini/gi.test(userAgent);\n const isWindowsPhone = /windows phone/gi.test(userAgent);\n\n if (isIos || isAndroid || isOperaMini || isWindowsPhone) {\n return true;\n }\n\n return false;\n}\n\nexport default isMobilePlatform;","import merge from 'helpful-merge';\n\nimport Config from '../Config/Config';\nimport isMobilePlatform from '../Shared/Util/isMobilePlatform';\n\nimport Group from './Group';\nimport Option from './Option';\nimport State from './State';\n\nclass StateMapper {\n public static mapFromSelect(selectElement: HTMLSelectElement, config: Config): State {\n const state = new State(null, config);\n\n let isWithinGroup = false;\n\n state.name = selectElement.name;\n state.isDisabled = selectElement.disabled;\n state.isRequired = selectElement.required;\n\n state.isUseNativeMode = (\n config.behavior.useNativeUiOnMobile &&\n isMobilePlatform(window.navigator.userAgent)\n );\n\n for (let i = 0, child: Element; (child = selectElement.children[i]); i++) {\n if (i === 0 && child.getAttribute('data-placeholder') !== null) {\n state.placeholder = child.textContent;\n (child as HTMLOptionElement).value = '';\n\n continue;\n }\n\n if (child instanceof HTMLOptionElement) {\n if (isWithinGroup === false) {\n state.groups.push(StateMapper.mapGroup());\n\n isWithinGroup = true;\n }\n\n state.lastGroup.options.push(StateMapper.mapOption(child));\n\n if (child.selected) state.selectedIndex = state.totalOptions - 1;\n } else if (child instanceof HTMLOptGroupElement) {\n isWithinGroup = true;\n\n state.groups.push(StateMapper.mapGroup(child));\n\n for (let j = 0, groupChild: Element; (groupChild = child.children[j]); j++) {\n state.lastGroup.options.push(\n StateMapper.mapOption(\n groupChild as HTMLOptionElement,\n child as HTMLOptGroupElement\n )\n );\n\n if ((groupChild as HTMLOptionElement).selected) state.selectedIndex = state.totalOptions - 1;\n }\n\n isWithinGroup = false;\n } else {\n throw new TypeError(\n `[EasyDropDown] Invalid child tag \"${child.tagName}\" found in provided \\`\n \n`);\n\nexport default head;","import ClassNames from '../Config/ClassNames';\nimport composeClassName from '../Shared/Util/composeClassName';\nimport Option from '../State/Option';\nimport State from '../State/State';\n\nfunction option(optionState: Option, state: State, classNames: ClassNames): string {\n const isSelected = state.selectedOption === optionState;\n\n const className = composeClassName([\n classNames.option,\n [isSelected, classNames.optionSelected],\n [optionState === state.focusedOption, classNames.optionFocused],\n [optionState.isDisabled, classNames.optionDisabled]\n ]);\n\n return (`\n \n ${optionState.label}\n \n `);\n}\n\nexport default option;","import ClassNames from '../Config/ClassNames';\nimport composeClassName from '../Shared/Util/composeClassName';\nimport Group from '../State/Group';\nimport State from '../State/State';\n\nimport option from './option';\n\nconst group = (groupState: Group, state: State, classNames: ClassNames) => {\n const className = composeClassName([\n classNames.group,\n [groupState.isDisabled, classNames.groupDisabled],\n [groupState.hasLabel, classNames.groupHasLabel]\n ]);\n\n return (`\n
\n ${groupState.hasLabel ?\n `
${groupState.label}
` : ''\n }\n ${groupState.options.map(optionState => option(optionState, state, classNames)).join('')}\n
\n `);\n};\n\nexport default group;","import ClassNames from '../Config/ClassNames';\nimport composeClassName from '../Shared/Util/composeClassName';\nimport State from '../State/State';\n\nimport group from './group';\n\nfunction body(state: State, classNames: ClassNames): string {\n const className = composeClassName([\n classNames.body,\n [state.isAtTop, classNames.bodyAtTop],\n [state.isAtBottom, classNames.bodyAtBottom],\n [state.isScrollable, classNames.bodyScrollable]\n ]);\n\n const styleAttr = state.isOpen ?\n `style=\"max-height: ${state.maxBodyHeight}px;\"` : '';\n\n return (`\n \n
\n ${state.groups.map(groupState => group(groupState, state, classNames)).join('')}\n
\n
\n
\n \n `);\n}\n\nexport default body;","import ClassNames from '../Config/ClassNames';\nimport composeClassName from '../Shared/Util/composeClassName';\nimport State from '../State/State';\n\nimport body from './body';\nimport head from './head';\n\nconst root = (state: State, classNames: ClassNames) => {\n const className = composeClassName([\n classNames.root,\n [state.isDisabled, classNames.rootDisabled],\n [state.isInvalid, classNames.rootInvalid],\n [state.isOpen, classNames.rootOpen],\n [state.isFocused, classNames.rootFocused],\n [state.hasValue, classNames.rootHasValue],\n [state.isOpenAbove, classNames.rootOpenAbove],\n [state.isOpenBelow, classNames.rootOpenBelow],\n [state.isUseNativeMode, classNames.rootNative]\n ]);\n\n return (`\n \n ${head(state, classNames)}\n ${state.isUseNativeMode ? '' : body(state, classNames)}\n \n `);\n};\n\nexport default root;","import root from '../Components/root';\nimport ClassNames from '../Config/ClassNames';\nimport createDomElementFromHtml from '../Shared/Util/createDomElementFromHtml';\nimport State from '../State/State';\n\nimport Dom from './Dom';\nimport domDiff from './domDiff';\nimport domPatch from './domPatch';\n\nclass Renderer {\n public classNames: ClassNames;\n public dom: Dom;\n\n constructor(classNames: ClassNames) {\n this.dom = new Dom();\n this.classNames = classNames;\n }\n\n public render(state: State, selectElement: HTMLSelectElement): Dom {\n const html = root(state, this.classNames);\n const rootElement = createDomElementFromHtml(html) as HTMLDivElement;\n\n this.dom = new Dom();\n this.dom.root = rootElement;\n\n this.dom.option.length = this.dom.group.length = 0;\n\n Renderer.queryDomRefs(this.dom);\n\n this.injectSelect(selectElement);\n\n return this.dom;\n }\n\n public update(state: State, key?: keyof State): void {\n const nextHtml = root(state, this.classNames);\n const nextRoot = createDomElementFromHtml(nextHtml) as HTMLDivElement;\n const diffCommand = domDiff(this.dom.root, nextRoot);\n\n domPatch(this.dom.root, diffCommand);\n\n if (key === 'selectedIndex') {\n this.syncSelectWithValue(state.value);\n }\n }\n\n public destroy(): void {\n this.dom.select.classList.remove(this.classNames.select);\n\n try {\n this.dom.root.parentElement.replaceChild(this.dom.select, this.dom.root);\n } catch (err) { /**/ }\n }\n\n private injectSelect(selectElement: HTMLSelectElement): void {\n const parent = selectElement.parentElement;\n const tempSelect = this.dom.select;\n\n if (!parent) throw new Error('[EasyDropDown] The provided `