1+ /******/ ( function ( modules ) { // webpackBootstrap
2+ /******/ // The module cache
3+ /******/ var installedModules = { } ;
4+ /******/
5+ /******/ // The require function
6+ /******/ function __webpack_require__ ( moduleId ) {
7+ /******/
8+ /******/ // Check if module is in cache
9+ /******/ if ( installedModules [ moduleId ] ) {
10+ /******/ return installedModules [ moduleId ] . exports ;
11+ /******/ }
12+ /******/ // Create a new module (and put it into the cache)
13+ /******/ var module = installedModules [ moduleId ] = {
14+ /******/ i : moduleId ,
15+ /******/ l : false ,
16+ /******/ exports : { }
17+ /******/ } ;
18+ /******/
19+ /******/ // Execute the module function
20+ /******/ modules [ moduleId ] . call ( module . exports , module , module . exports , __webpack_require__ ) ;
21+ /******/
22+ /******/ // Flag the module as loaded
23+ /******/ module . l = true ;
24+ /******/
25+ /******/ // Return the exports of the module
26+ /******/ return module . exports ;
27+ /******/ }
28+ /******/
29+ /******/
30+ /******/ // expose the modules object (__webpack_modules__)
31+ /******/ __webpack_require__ . m = modules ;
32+ /******/
33+ /******/ // expose the module cache
34+ /******/ __webpack_require__ . c = installedModules ;
35+ /******/
36+ /******/ // define getter function for harmony exports
37+ /******/ __webpack_require__ . d = function ( exports , name , getter ) {
38+ /******/ if ( ! __webpack_require__ . o ( exports , name ) ) {
39+ /******/ Object . defineProperty ( exports , name , {
40+ /******/ configurable : false ,
41+ /******/ enumerable : true ,
42+ /******/ get : getter
43+ /******/ } ) ;
44+ /******/ }
45+ /******/ } ;
46+ /******/
47+ /******/ // define __esModule on exports
48+ /******/ __webpack_require__ . r = function ( exports ) {
49+ /******/ Object . defineProperty ( exports , '__esModule' , { value : true } ) ;
50+ /******/ } ;
51+ /******/
52+ /******/ // getDefaultExport function for compatibility with non-harmony modules
53+ /******/ __webpack_require__ . n = function ( module ) {
54+ /******/ var getter = module && module . __esModule ?
55+ /******/ function getDefault ( ) { return module [ 'default' ] ; } :
56+ /******/ function getModuleExports ( ) { return module ; } ;
57+ /******/ __webpack_require__ . d ( getter , 'a' , getter ) ;
58+ /******/ return getter ;
59+ /******/ } ;
60+ /******/
61+ /******/ // Object.prototype.hasOwnProperty.call
62+ /******/ __webpack_require__ . o = function ( object , property ) { return Object . prototype . hasOwnProperty . call ( object , property ) ; } ;
63+ /******/
64+ /******/ // __webpack_public_path__
65+ /******/ __webpack_require__ . p = "" ;
66+ /******/
67+ /******/
68+ /******/ // Load entry module and return exports
69+ /******/ return __webpack_require__ ( __webpack_require__ . s = "./src/input-tags.component.js" ) ;
70+ /******/ } )
71+ /************************************************************************/
72+ /******/ ( {
73+
74+ /***/ "./src/app.module.js" :
75+ /*!***************************!*\
76+ !*** ./src/app.module.js ***!
77+ \***************************/
78+ /*! no static exports found */
79+ /***/ ( function ( module , exports , __webpack_require__ ) {
80+
81+ "use strict" ;
82+ eval ( "\n\nvar _angular = _interopRequireDefault(__webpack_require__(/*! angular */ \"angular\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nmodule.exports = _angular.default.module('angularjs-input-tags', []);\n\n//# sourceURL=webpack:///./src/app.module.js?" ) ;
83+
84+ /***/ } ) ,
85+
86+ /***/ "./src/input-tags.component.js" :
87+ /*!*************************************!*\
88+ !*** ./src/input-tags.component.js ***!
89+ \*************************************/
90+ /*! no static exports found */
91+ /***/ ( function ( module , exports , __webpack_require__ ) {
92+
93+ "use strict" ;
94+ eval ( "\n\nvar _app = _interopRequireDefault(__webpack_require__(/*! ./app.module */ \"./src/app.module.js\"));\n\nvar _inputTags = __webpack_require__(/*! ./input-tags.constants */ \"./src/input-tags.constants.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\n/**\n * @ngdoc component\n * @name inputTags\n * @module angularjs-input-tags\n *\n * @description\n * Renders an input box with tag editing support.\n */\nvar InputTags =\n/*#__PURE__*/\nfunction () {\n InputTags.$inject = [\"$element\"];\n\n function InputTags($element) {\n _classCallCheck(this, InputTags);\n\n this.$element = $element;\n }\n\n _createClass(InputTags, [{\n key: \"$onInit\",\n value: function $onInit() {\n this.autocompleteVisible = false;\n this.element = this.$element[0];\n this.tags = this.tags || [];\n this.suggestions = this.suggestions || {};\n this.displayProperty = this.displayProperty || 'text';\n this.keyProperty = this.keyProperty || '';\n this.placeholder = this.placeholder || 'Add a tag';\n this.spellcheck = this.spellcheck || true;\n this.maxLength = this.maxLength || _inputTags.MAX_SAFE_INTEGER;\n this.inputDebounce = this.inputDebounce || 125;\n this.reset();\n }\n }, {\n key: \"track\",\n value: function track(tag) {\n return tag[this.keyProperty || this.displayProperty];\n }\n }, {\n key: \"getTagText\",\n value: function getTagText(tag) {\n return tag[this.displayProperty];\n }\n }, {\n key: \"isTagValid\",\n value: function isTagValid(tag) {\n var tagText = this.getTagText(tag);\n var key = this.keyProperty || this.displayProperty;\n return tagText && this.tags.length <= this.maxLength && !this.tags.some(function (element) {\n return element[key] === tag[key];\n });\n }\n }, {\n key: \"addTag\",\n value: function addTag(tag) {\n var valid = this.isTagValid(tag);\n this.emit('onTagAdding', tag);\n\n if (valid) {\n this.tags.push(tag);\n this.emit('onTagAdded', tag);\n } else {\n this.emit('onTagAddFailed', tag);\n }\n\n return tag;\n }\n }, {\n key: \"removeTag\",\n value: function removeTag(tag) {\n this.emit('onTagRemoving', tag);\n\n for (var i = this.tags.length - 1; i >= 0; i--) {\n if (this.tags[i].code === tag.code) {\n this.tags.splice(i, 1);\n }\n }\n\n this.emit('onTagRemoved', tag);\n return tag;\n }\n }, {\n key: \"inputChange\",\n value: function inputChange() {\n this.emit('inputChanged', this.inputSearch);\n }\n }, {\n key: \"triggerFocus\",\n value: function triggerFocus() {\n this.autocompleteVisible = true;\n }\n }, {\n key: \"triggerBlur\",\n value: function triggerBlur(e) {\n if (e && this.element.contains(e.explicitOriginalTarget.parentNode)) {\n this.$element.find('input')[0].focus();\n } else {\n this.autocompleteVisible = false;\n this.reset();\n }\n }\n }, {\n key: \"reset\",\n value: function reset() {\n this.currentItem = this.suggestions;\n this.path = [];\n }\n }, {\n key: \"next\",\n value: function next(item) {\n this.currentItem = item;\n this.path.push(item);\n }\n }, {\n key: \"previous\",\n value: function previous() {\n this.path.pop();\n this.currentItem = this.path.length > 0 ? this.path[this.path.length - 1] : this.suggestions;\n }\n }, {\n key: \"emit\",\n value: function emit(action) {\n if (this[action] && typeof this[action] === 'function') {\n for (var _len = arguments.length, params = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n params[_key - 1] = arguments[_key];\n }\n\n this[action].apply(this, params);\n }\n }\n }]);\n\n return InputTags;\n}();\n\nvar InputTagsComponent = {\n template: __webpack_require__(/*! ./input-tags.template.html */ \"./src/input-tags.template.html\"),\n controller: InputTags,\n bindings: {\n displayProperty: '@',\n keyProperty: '@',\n placeholder: '@',\n tabindex: '@',\n spellcheck: '@',\n maxLength: '@',\n inputDebounce: '@',\n tags: '<',\n suggestions: '<',\n disabled: '<',\n inputChanged: '<',\n onTagAdding: '<',\n onTagAdded: '<',\n onTagAddFailed: '<',\n onTagRemoving: '<',\n onTagRemoved: '<',\n onTagClicked: '<'\n }\n};\n\n_app.default.component('inputTags', InputTagsComponent);\n\n//# sourceURL=webpack:///./src/input-tags.component.js?" ) ;
95+
96+ /***/ } ) ,
97+
98+ /***/ "./src/input-tags.constants.js" :
99+ /*!*************************************!*\
100+ !*** ./src/input-tags.constants.js ***!
101+ \*************************************/
102+ /*! no static exports found */
103+ /***/ ( function ( module , exports , __webpack_require__ ) {
104+
105+ "use strict" ;
106+ eval ( "\n\nmodule.exports = {\n MAX_SAFE_INTEGER: 9007199254740991\n};\n\n//# sourceURL=webpack:///./src/input-tags.constants.js?" ) ;
107+
108+ /***/ } ) ,
109+
110+ /***/ "./src/input-tags.template.html" :
111+ /*!**************************************!*\
112+ !*** ./src/input-tags.template.html ***!
113+ \**************************************/
114+ /*! no static exports found */
115+ /***/ ( function ( module , exports ) {
116+
117+ eval ( "module.exports = \"<label class=\\\"ait-label\\\">\\n <ul class=\\\"ait-dropdown\\\"\\n ng-if=\\\"$ctrl.maxLength > $ctrl.tags.length\\\"\\n ng-show=\\\"$ctrl.autocompleteVisible\\\">\\n <li class=\\\"ait-dropdown-item ait-dropdown-title\\\"\\n ng-if=\\\"$ctrl.path.length > 0\\\"\\n ng-click=\\\"$ctrl.previous()\\\">\\n <span class=\\\"ait-dropdown-itemBack\\\"></span>\\n <span class=\\\"ait-dropdown-itemContent\\\"\\n ng-bind=\\\"$ctrl.currentItem[$ctrl.displayProperty]\\\"></span>\\n </li>\\n <li class=\\\"ait-dropdown-item\\\"\\n ng-class=\\\"{\\n 'ait-dropdown-item--checked': item.checked,\\n 'ait-dropdown-item--last': !item.data || item.data.length === 0\\n }\\\"\\n ng-repeat=\\\"item in $ctrl.currentItem.data track by item.code\\\"\\n ng-click=\\\"item.data && item.data.length > 0 ? $ctrl.next(item) : $ctrl.addTag(item)\\\">\\n <span class=\\\"ait-dropdown-itemContent\\\"\\n ng-bind=\\\"item[$ctrl.displayProperty]\\\"></span>\\n <span class=\\\"ait-dropdown-itemNext\\\"\\n ng-if=\\\"item.data && item.data.length > 0\\\"></span>\\n <span class=\\\"ait-dropdown-itemCheck\\\"></span>\\n </li>\\n </ul>\\n\\n <div class=\\\"ait-tag\\\"\\n ng-repeat=\\\"tag in $ctrl.tags track by $ctrl.track(tag)\\\">\\n <span class=\\\"ait-tag-text\\\"\\n ng-bind=\\\"::$ctrl.getTagText(tag)\\\"></span>\\n <span class=\\\"ait-tag-close\\\"\\n style=\\\"cursor: pointer\\\"\\n ng-click=\\\"$ctrl.removeTag(tag)\\\">\\n </span>\\n </div>\\n\\n <input class=\\\"ait-input\\\"\\n type=\\\"text\\\"\\n autocomplete=\\\"off\\\"\\n ng-trim=\\\"false\\\"\\n tabindex=\\\"{{$ctrl.tabindex}}\\\"\\n placeholder=\\\"{{$ctrl.placeholder}}\\\"\\n spellcheck=\\\"{{$ctrl.spellcheck}}\\\"\\n tabindex=\\\"-1\\\"\\n ng-focus=\\\"$ctrl.triggerFocus($event)\\\"\\n ng-blur=\\\"$ctrl.triggerBlur($event)\\\"\\n ng-if=\\\"$ctrl.maxLength > $ctrl.tags.length\\\"\\n ng-model=\\\"$ctrl.inputSearch\\\"\\n ng-model-options=\\\"{ debounce: $ctrl.inputDebounce }\\\"\\n ng-change=\\\"$ctrl.inputChange()\\\"\\n ng-disabled=\\\"$ctrl.disabled\\\" />\\n</label>\\n\";\n\n//# sourceURL=webpack:///./src/input-tags.template.html?" ) ;
118+
119+ /***/ } ) ,
120+
121+ /***/ "angular" :
122+ /*!**************************!*\
123+ !*** external "angular" ***!
124+ \**************************/
125+ /*! no static exports found */
126+ /***/ ( function ( module , exports ) {
127+
128+ eval ( "module.exports = angular;\n\n//# sourceURL=webpack:///external_%22angular%22?" ) ;
129+
130+ /***/ } )
131+
132+ /******/ } ) ;
0 commit comments