diff --git a/THIRD_PARTY.txt b/THIRD_PARTY.txt index c98cb66b..625e8f11 100644 --- a/THIRD_PARTY.txt +++ b/THIRD_PARTY.txt @@ -46,6 +46,7 @@ https://cdn.embed.ly/player-0.1.0.min.js https://cdnjs.cloudflare.com/ajax/libs/ajax-bootstrap-select/1.4.5/js/ajax-bootstrap-select.min.js https://cdnjs.cloudflare.com/ajax/libs/algoliasearch/3.35.1/algoliasearch.min.js https://cdnjs.cloudflare.com/ajax/libs/algoliasearch/4.9.1/algoliasearch.umd.min.js +https://cdnjs.cloudflare.com/ajax/libs/alpinejs/2.8.2/alpine.js https://cdnjs.cloudflare.com/ajax/libs/angucomplete-alt/3.0.0/angucomplete-alt.min.js https://cdnjs.cloudflare.com/ajax/libs/angular-animate/1.8.2/angular-animate.min.js https://cdnjs.cloudflare.com/ajax/libs/angular-aria/1.8.2/angular-aria.min.js diff --git a/core/mappings.js b/core/mappings.js index 28867eba..0af57fb5 100644 --- a/core/mappings.js +++ b/core/mappings.js @@ -92,6 +92,7 @@ mappings.cdn = { 'ajax-bootstrap-select/{version}/js/ajax-bootstrap-select.': resources.ajaxBootstrapSelect, 'algoliasearch/{version}/algoliasearch.angular.': resources.algoliaSearch, 'algoliasearch/{version}/algoliasearch.': resources.algoliaSearch, + 'alpinejs/{version}/alpine.js': resources.alpinejs, 'anchor-js/{version}/anchor.': resources.anchorJS, 'angucomplete-alt/{version}/angucomplete-alt.': resources.anguComplete, 'angular-bootstrap-colorpicker/{version}/css/colorpicker.': resources.angularBootstrapColorpickerCSS, @@ -598,6 +599,7 @@ mappings.cdn = { 'dojo/{version}/dojo.': resources.dojo, 'emberjs/{version}/ember.': resources.ember, 'fontawesome/{version}/css/font-awesome.min.css': resources.fontawesome, + 'gh/alpinejs/alpine@v{version}/dist/alpine.': resources.alpinejs, 'gh/fancyapps/fancybox@{version}/dist/jquery.fancybox.js': resources.fancyBoxJS, 'gh/fancyapps/fancybox@{version}/dist/jquery.fancybox.min.js': resources.fancyBoxJS, 'gh/fancyapps/fancybox@{version}/dist/jquery.fancybox.css': resources.fancyBoxCSS, diff --git a/core/resources.js b/core/resources.js index 63dc6eeb..a3b5d623 100644 --- a/core/resources.js +++ b/core/resources.js @@ -33,6 +33,10 @@ var resources = { 'algoliaSearch': { 'path': 'resources/algoliasearch/{version}/algoliasearch.min.jsm' }, + // alpinejs + 'alpinejs': { + 'path': 'resources/alpinejs/{version}/alpine.jsm' + }, // AnchorJS 'anchorJS': { 'path': 'resources/anchor-js/{version}/anchor.min.jsm' diff --git a/modules/internal/targets.js b/modules/internal/targets.js index a0547bfa..ff65151d 100644 --- a/modules/internal/targets.js +++ b/modules/internal/targets.js @@ -77,6 +77,8 @@ targets.setLastVersion = function (type, version) { return '3.35.1'; } else if (type.startsWith('/algoliasearch/4.')) { return '4.9.1'; + } else if (type.startsWith('/alpinejs/2.')) { + return '2.8.2'; } else if (type.startsWith('/anchor-js/3.')) { return '3.2.2'; } else if (type.startsWith('/anchor-js/4.')) { @@ -627,6 +629,7 @@ targets.determineResourceName = function (filename) { }; const ListOfFiles = { + 'alpine.jsm': 'alpinejs', 'ba-tiny-pubsub.min.jsm': 'jQuery Tiny Pub/Sub', 'fastclick.min.jsm': 'FastClick', 'bodymovin.min.jsm': 'bodymovin/lottie', diff --git a/pages/updates/updates.html b/pages/updates/updates.html index c62c9f28..488747de 100644 --- a/pages/updates/updates.html +++ b/pages/updates/updates.html @@ -46,6 +46,7 @@
  • Updated: ember.js v3.27.3 -> v3.27.4 (#507)
  • Updated: webrtc-adapter v8.0.0 (#451)
  • Fixed: Framework counter in options page
  • +
  • Added: alpinejs v2.8.2 (#508)
  • diff --git a/resources/alpinejs/2.8.2/alpine.jsm b/resources/alpinejs/2.8.2/alpine.jsm new file mode 100644 index 00000000..80f693fa --- /dev/null +++ b/resources/alpinejs/2.8.2/alpine.jsm @@ -0,0 +1,1949 @@ +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : + typeof define === 'function' && define.amd ? define(factory) : + (global = global || self, global.Alpine = factory()); +}(this, (function () { 'use strict'; + + function _defineProperty(obj, key, value) { + if (key in obj) { + Object.defineProperty(obj, key, { + value: value, + enumerable: true, + configurable: true, + writable: true + }); + } else { + obj[key] = value; + } + + return obj; + } + + function ownKeys(object, enumerableOnly) { + var keys = Object.keys(object); + + if (Object.getOwnPropertySymbols) { + var symbols = Object.getOwnPropertySymbols(object); + if (enumerableOnly) symbols = symbols.filter(function (sym) { + return Object.getOwnPropertyDescriptor(object, sym).enumerable; + }); + keys.push.apply(keys, symbols); + } + + return keys; + } + + function _objectSpread2(target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i] != null ? arguments[i] : {}; + + if (i % 2) { + ownKeys(Object(source), true).forEach(function (key) { + _defineProperty(target, key, source[key]); + }); + } else if (Object.getOwnPropertyDescriptors) { + Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); + } else { + ownKeys(Object(source)).forEach(function (key) { + Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); + }); + } + } + + return target; + } + + // Thanks @stimulus: + // https://github.com/stimulusjs/stimulus/blob/master/packages/%40stimulus/core/src/application.ts + function domReady() { + return new Promise(resolve => { + if (document.readyState == "loading") { + document.addEventListener("DOMContentLoaded", resolve); + } else { + resolve(); + } + }); + } + function arrayUnique(array) { + return Array.from(new Set(array)); + } + function isTesting() { + return navigator.userAgent.includes("Node.js") || navigator.userAgent.includes("jsdom"); + } + function checkedAttrLooseCompare(valueA, valueB) { + return valueA == valueB; + } + function warnIfMalformedTemplate(el, directive) { + if (el.tagName.toLowerCase() !== 'template') { + console.warn(`Alpine: [${directive}] directive should only be added to