Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///external \"jQuery\"","webpack:///./src/js/bootstrapui-formelements.js","webpack:///./src/js/controls/datepicker/date-picker-initializer.ts","webpack:///./src/js/controls/numeric/numeric-initializer.ts","webpack:///./src/js/controls/select/select-initializer.ts","webpack:///./src/js/controls/autosuggest/autosuggest-initializer.ts","webpack:///./src/js/controls/support/initializers/autosize-initializer.ts","webpack:///./src/js/controls/support/initializers/line-breaks-initializer.ts","webpack:///./src/js/controls/support/initializers/tooltip-initializer.ts"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","jQuery","registerAutosuggestControl","BootstrapUiModule","registerInitializer","node","ControlAdapterFactory","initializeControlAdapters","$","fn","datetimepicker","Constructor","Default","extend","icons","time","date","up","down","previous","next","today","clear","close","each","_this","this","configuration","data","exportFormat","formatAndSetDate","currentDate","formattedValue","moment","format","attr","on","e","find","hide","initialDate","multiplied","multiplier","currentValue","val","isNaN","parseFloat","autoNumeric","AutoNumeric","length","substring","set","selectpicker","Controls","typeahead","selectedValue","translateUrl","url","replace","encodeURIComponent","datasets","_datasets","selected","ttDataSets","datasetsByName","templatesByDataSet","ix","templateKey","includes","keys","split","templateType","datasetName","innerHTML","engine","base","datumTokenizer","Bloodhound","tokenizers","whitespace","queryTokenizer","identify","remote","wildcard","options","prefetch","initialize","createBloodhoundEngine","bloodhound","display","template","source","ttAdapter","templates","Handlebars","compile","push","suggestion","AutoSuggest","autosize","css","which","preventDefault","tooltip"],"mappings":"aACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,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AAG,oBAAoB,SAAUC,EAAG4D,GAC1CnC,EAAWmC,EACX5F,EAAKiC,KAAK,uBAAuBM,IAAIqD,EAAe,OAExD3C,EAAUlB,GAAG,oBAAoB,SAAUC,EAAGO,GACrCkB,GAAYlB,IAAQkB,EAAgB,QACrCR,EAAUA,UAAU,MAAO,IAC3BjD,EAAKiC,KAAK,uBAAuBM,IAAI,UAhGzD,2DAgHe,UAPf,SAAgCvC,GAC5BG,EAAE,iCAAkCH,GAAMmB,MAAK,WAC3C,IAAIG,EAAgBnB,EAAEK,OAAO,GAAIL,EAAEkB,MAAME,KAAK,4BAC9CzB,kBAAkBkD,SAAS6C,YAAY3G,OAAOiB,EAAEkB,MAAOC,Q,8CC5G/D,mBAsBe,UAJf,SAA6BtB,GACzB8F,SAAS3F,EAAE,eAAgBH,IAC3BG,EAAE,uCAAuC4F,IAAI,SAAU,U,8CCpB3D,mBA0Be,UARf,SAA+B/F,GAC3BG,EAAE,0BAA2BH,GAAM+B,GAAG,kBAAkB,SAAUC,GAC9D,GAAgB,KAAZA,EAAEgE,OAA4B,KAAZhE,EAAEgE,MAEpB,OADAhE,EAAEiE,kBACK,O,8CCtBnB,mBAqBe,UAHf,SAA4BjG,GACxBG,EAAE,0BAA2BH,GAAMkG,Y","file":"js/bootstrapui-formelements.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \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, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\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 = 14);\n","module.exports = jQuery;","/*\n * Copyright 2019 the original author or authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport initializeDateTimePickerControls from \"./controls/datepicker/date-picker-initializer\";\nimport initializeNumericControls from \"./controls/numeric/numeric-initializer\";\nimport initializeSelectControls from \"./controls/select/select-initializer\";\nimport initializeAutoSuggestControls, {registerAutosuggestControl} from \"./controls/autosuggest/autosuggest-initializer\";\nimport initializeAutoSizeControls from \"./controls/support/initializers/autosize-initializer\";\nimport disableLineBreakSupport from \"./controls/support/initializers/line-breaks-initializer\";\nimport initializeTooltips from \"./controls/support/initializers/tooltip-initializer\";\n\n(function ( $ ) {\n registerAutosuggestControl();\n\n /**\n * Main initialization of BoostrapUiModule form elements.\n */\n BootstrapUiModule.registerInitializer( function ( node ) {\n initializeDateTimePickerControls( node );\n initializeNumericControls( node );\n initializeAutoSizeControls( node );\n disableLineBreakSupport( node );\n initializeSelectControls( node );\n initializeAutoSuggestControls( node );\n initializeTooltips( node );\n\n BootstrapUiModule.ControlAdapterFactory.initializeControlAdapters( node );\n } );\n }( jQuery )\n);\n\n\n\n","/*\n * Copyright 2019 the original author or authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Find and activate all date time pickers as Eonasdan Bootstrap datepicker elements.\n *\n * @author Steven Gentens\n * @since 2.2.0\n */\nfunction initializeDateTimePickers(node) {\n $.fn.datetimepicker.Constructor.Default = $.extend({}, $.fn.datetimepicker.Constructor.Default, {\n icons: {\n time: 'far fa-clock',\n date: 'far fa-calendar',\n up: 'fas fa-arrow-up',\n down: 'fas fa-arrow-down',\n previous: 'fas fa-chevron-left',\n next: 'fas fa-chevron-right',\n today: 'far fa-calendar-check',\n clear: 'fas fa-trash',\n close: 'fas fa-times',\n },\n });\n $('[data-bootstrapui-datetimepicker]', node).each(function () {\n var _this = this;\n var configuration = $.extend(true, {}, $(this).data('bootstrapui-datetimepicker'));\n var exportFormat = configuration.exportFormat;\n delete configuration.exportFormat;\n var formatAndSetDate = function (currentDate) {\n var formattedValue = currentDate ? moment(currentDate).format(exportFormat) : '';\n $('input[type=hidden]', $(_this)).attr('value', formattedValue);\n };\n $(this).datetimepicker(configuration);\n $(this).on('change.datetimepicker', function (e) { return formatAndSetDate(e.date); });\n $(this).find('input[type=\"text\"]').on('blur focusout hide.datetimepicker', function () {\n var datetimepicker = $(_this).data('datetimepicker');\n datetimepicker.hide();\n formatAndSetDate(datetimepicker.date());\n });\n var initialDate = $(this).data('datetimepicker').date();\n formatAndSetDate(initialDate);\n });\n}\nexport default initializeDateTimePickers;\n","/*\n * Copyright 2019 the original author or authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Find an activate all autoNumeric form elements.\n *\n * @author Steven Gentens\n * @since 2.2.0\n */\nfunction numericInitializer(node) {\n $('[data-bootstrapui-numeric]', node).each(function () {\n var configuration = $(this).data('bootstrapui-numeric');\n var name = $(this).attr('name');\n var multiplier = configuration.multiplier ? configuration.multiplier : 1;\n var multiplied;\n if (multiplier !== 1) {\n var currentValue = $(this).val();\n if (currentValue && !isNaN(currentValue)) {\n multiplied = parseFloat(currentValue) * multiplier;\n }\n }\n var autoNumeric = new AutoNumeric(this, configuration);\n $(this)\n .bind('autoNumeric:rawValueModified', function () {\n if (name && name.length > 1 && name[0] === '_') {\n var val = autoNumeric.get();\n if (multiplier !== 1) {\n val = val / multiplier;\n }\n $(\"input[type=hidden][name=\\\"\" + name.substring(1) + \"\\\"]\").val(val);\n }\n });\n $(this).data('autoNumeric', autoNumeric);\n if (multiplied) {\n autoNumeric.set(multiplied);\n }\n });\n}\nexport default numericInitializer;\n","/*\n * Copyright 2019 the original author or authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Find and activate all bootstrap-select elements.\n */\nfunction selectInitializer(node) {\n $('[data-bootstrapui-select]', node).each(function () {\n var configuration = $(this).data('bootstrapui-select');\n $(this).selectpicker(configuration);\n });\n}\nexport default selectInitializer;\n","/*\n * Copyright 2019 the original author or authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nfunction registerAutosuggestControl() {\n BootstrapUiModule.Controls['AutoSuggest'] = {\n /**\n * Create a Typeahead autosuggest instance from a node with a configuration object.\n */\n create: function (node, configuration) {\n var typeahead = node.find('.js-typeahead');\n var selectedValue = node.find('.js-typeahead-value');\n var translateUrl = function (url) {\n return url.replace('{{controlName}}', encodeURIComponent(selectedValue.attr('name')));\n };\n var createBloodhoundEngine = function (configuration) {\n var base = {\n datumTokenizer: Bloodhound.tokenizers.whitespace, queryTokenizer: Bloodhound.tokenizers.whitespace, identify: 'id', remote: {\n wildcard: '{{query}}',\n },\n };\n var options = $.extend(true, base, configuration);\n if (options.remote && options.remote.url) {\n options.remote.url = translateUrl(options.remote.url);\n }\n if (options.prefetch && options.prefetch.url) {\n options.prefetch.url = translateUrl(options.prefetch.url);\n }\n var engine = new Bloodhound(options);\n engine.initialize();\n return engine;\n };\n // Build datasets - bloodhound engine + typeahead config\n var datasets = configuration._datasets;\n delete configuration._datasets;\n var ttDataSets = [];\n var datasetsByName = {};\n var templatesByDataSet = {};\n // configure templates\n $(node).find('script[data-template]')\n .each(function (ix, value) {\n var asJqueryObject = $(value);\n var templateKey = asJqueryObject.data('template');\n if (templateKey && templateKey.includes('-')) {\n var keys = templateKey.split('-');\n var templateType = keys[0];\n var datasetName = keys[1];\n if (!templatesByDataSet[datasetName]) {\n templatesByDataSet[datasetName] = {};\n }\n // merge with configuration object and then handlebars compile each value\n templatesByDataSet[datasetName][templateType] = value.innerHTML;\n }\n });\n $.each(datasets, function (ix, value) {\n var engine = createBloodhoundEngine(value.bloodhound);\n delete value.bloodhound;\n var options = $.extend({ display: 'label' }, value);\n if (engine) {\n options.source = engine.ttAdapter();\n }\n // merge view element templates with configuration templates\n if (templatesByDataSet[options.name]) {\n options.templates = $.extend({}, templatesByDataSet[options.name], options.templates);\n }\n // handlebars compile each given template\n for (var template in options.templates) {\n if (options.templates.hasOwnProperty(template)) {\n options.templates[template] = Handlebars.compile(options.templates[template]);\n }\n }\n datasetsByName[value.name] = engine;\n ttDataSets.push(options);\n });\n node.data('datasets', datasetsByName);\n // Initialize the typeahead\n typeahead.typeahead(configuration, ttDataSets);\n var selected;\n typeahead.on('typeahead:select', function (e, suggestion) {\n selected = suggestion;\n node.find('.js-typeahead-value').val(suggestion['id']);\n });\n typeahead.on('typeahead:change', function (e, val) {\n if (!selected || val !== selected['label']) {\n typeahead.typeahead('val', '');\n node.find('.js-typeahead-value').val('');\n }\n });\n },\n };\n}\n/**\n * Find and activate all auto-suggest instances with Typeahead and bloodhound.\n */\nfunction autosuggestInitializer(node) {\n $('[data-bootstrapui-autosuggest]', node).each(function () {\n var configuration = $.extend({}, $(this).data('bootstrapui-autosuggest'));\n BootstrapUiModule.Controls.AutoSuggest.create($(this), configuration);\n });\n}\nexport { registerAutosuggestControl };\nexport default autosuggestInitializer;\n","/*\n * Copyright 2019 the original author or authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Finds and activates autogrow textarea elements and disables resizing on textareas that do not allow line breaks.\n */\nfunction autosizeInitializer(node) {\n autosize($('.js-autosize', node));\n $('.js-disable-line-breaks.js-autosize').css('resize', 'none');\n}\nexport default autosizeInitializer;\n","/*\n * Copyright 2019 the original author or authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Disable enter on all controls that should disable line breaks.\n */\nfunction lineBreaksInitializer(node) {\n $('.js-disable-line-breaks', node).on('keyup keypress', function (e) {\n if (e.which === 13 || e.which === 10) {\n e.preventDefault();\n return false;\n }\n });\n}\nexport default lineBreaksInitializer;\n","/*\n * Copyright 2019 the original author or authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Initialize tooltips.\n */\nfunction tooltipInitializer(node) {\n $('[data-toggle=\"tooltip\"]', node).tooltip();\n}\nexport default tooltipInitializer;\n"],"sourceRoot":""}