This commit is contained in:
2024-12-20 06:04:35 +03:00
parent 0f779b7ebf
commit d630370039
267 changed files with 34950 additions and 11 deletions
+29 -4
View File
@@ -668,7 +668,10 @@ kit.config = kit.config || {};
};
var __proto = PluginManager.prototype;
/**
* @typedef PluginManager.registerPlugins
*
* @param plugins
* @return {PluginManager}
*/
@@ -681,6 +684,11 @@ kit.config = kit.config || {};
return this;
};
/**
* @typedef PluginManager.register
* @param pluginId
* @param config
*/
PluginManager.prototype.register = function (pluginId, config = {}) {
if(typeof pluginId !== 'string' || pluginId === ''){
console.warn(`Invalid pluginId!`, pluginId);
@@ -804,7 +812,13 @@ kit.config = kit.config || {};
}
};
__proto.exec2 = function (deps, callback) {
/**
* @typedef PluginManager.define
* @see https://requirejs.org/
* @param deps
* @param callback
*/
__proto.define = function (deps, callback) {
var self = this;
var context = this;
@@ -962,15 +976,26 @@ kit.config = kit.config || {};
* @memberOf kit
*/
global.require = manager.require.bind(manager);
/**
* @type {PluginManager}
* @memberOf kit
*/
var pm;
/**
* @type {PluginManager.define}
* @memberOf kit
*/
global.define = manager.define.bind(manager);
global.PluginManager = PluginManager;
manager.register('pluginManager', {
alias: 'pm',
alias: ['pm'],
type: MD_TYPE.HMD,
handler: function(require, exports, module, global) {
global.PluginManagerClass = PluginManager;
if(typeof window === 'object'){
window.__PluginManager__ = manager;
/**
* @var __pmGlobal__
* @type {kit}
* @global
*/
window.__pmGlobal__ = global;
}
+1 -1
View File
File diff suppressed because one or more lines are too long
+147 -5
View File
@@ -331,10 +331,39 @@ var __PluginManagerConfigHandler__ = function() {
type: 'HMD',
deps: ['support', 'Collection', 'lib']
},
fancybox: {
path: root + '/fancybox',
css: '/fancybox.css',
js: '/fancybox.umd.js',
fancybox2: {
path: root + '/fancybox/v2',
module: '',
js: ['/jquery.fancybox.pack.js'],
css: ['/jquery.fancybox.css'],
type: 'default',
alias: ['jQuery.Fancybox2'],
deps: ['jQuery'],
},
fancybox3: {
path: root + '/fancybox/v3',
module: '',
js: ['/jquery.fancybox.min.js'],
css: ['/jquery.fancybox.min.css'],
type: 'default',
alias: ['jQuery.Fancybox3'],
deps: ['jQuery'],
},
fancybox4: {
path: root + '/fancybox/v4',
module: '/fancybox.umd.js',
js: [],
css: ['/fancybox.css'],
type: 'UMD',
alias: [],
},
fancybox5: {
path: root + '/fancybox/v5',
module: '/fancybox.umd.js',
js: [],
css: ['/fancybox.css'],
type: 'UMD',
alias: ['fancybox'],
},
lightGallery: {
path: root + '/lightGallery',
@@ -459,7 +488,120 @@ var __PluginManagerConfigHandler__ = function() {
css: [
'/flexslider.css',
],
alias: ['FlexSlider', 'flexslider'],
alias: ['jquery.flexslider', 'FlexSlider', 'flexslider'],
type: 'default',
deps: ['jQuery'],
},
/**
* Получите фактическую ширину / высоту невидимых элементов DOM с помощью jQuery.
* @see https://github.com/dreamerslab/jquery.actual
*/
'jQuery.Actual': {
path: root + '/jquery/actual',
module: '',
js: [
'/jquery.actual.js',
],
css: [],
alias: ['jquery.actual'],
type: 'default',
deps: ['jQuery'],
},
'jQuery.jqModal': {
path: root + '/jquery/jqModal',
module: '/jqModal.js',
js: [],
css: [],
alias: ['jqmodal', 'jqModal'],
type: 'UMD',
deps: ['jQuery'],
},
'jQuery.History': {
path: root + '/jquery/history',
module: '',
js: ['/jquery.history.min.js'],
css: [],
alias: ['jquery.history'],
type: 'default',
deps: ['jQuery'],
},
'jQuery.Validation': {
path: root + '/jquery/validation',
module: '/jquery.validate.min.js',
js: [
'/localization/messages_ru.js'
],
css: [],
loadJsAfterModule: true,
alias: ['jquery-validation', 'jquery.validation', 'jquery.validate'],
type: 'UMD',
deps: ['jQuery'],
},
'jQuery.Inputmask': {
path: root + '/jquery/inputmask',
module: '/min/jquery.inputmask.bundle.min.js',
js: [],
css: [],
alias: ['jquery.inputmask'],
type: 'default',
deps: ['jQuery'],
},
'jQuery.Easing': {
path: root + '/jquery/easing',
module: '/jquery.easing.min.js',
js: [],
css: [],
alias: ['jquery.easing'],
type: 'default',
deps: ['jQuery'],
},
'jQuery.Sly': {
path: root + '/jquery/sly',
module: '/sly.min.js',
js: [],
css: [],
alias: ['jquery.sly', 'sly'],
type: 'default',
deps: ['jQuery'],
},
/**
* выравнивает высоту элементов с классом equalize в группах или на всей странице
* @see https://github.com/eustasy-archive/jQuery.equalize
* @deprecated
*/
'jQuery.Equalize': {
path: root + '/jquery/equalize.js',
module: '/js/equalize.min.js',
js: [],
css: [],
alias: ['equalize', 'equalize.js', 'jquery.equalize'],
type: 'default',
deps: ['jQuery'],
},
'jQuery.Alphanumeric': {
path: root + '/jquery/alphanumeric',
module: '/jquery.alphanumeric.pack.js',
js: [],
css: [],
alias: ['jquery.alphanumeric'],
type: 'default',
deps: ['jQuery'],
},
'jQuery.Cookie': {
path: root + '/jquery/cookie',
module: '/src/jquery.cookie.js',
js: [],
css: [],
alias: ['jquery.cookie'],
type: 'UMD',
deps: ['jQuery'],
},
'jQuery.Plugin': {
path: root + '/jquery/plugin',
module: '/jquery.plugin.min.js',
js: [],
css: [],
alias: ['jquery.plugin', 'kbw-plugin'],
type: 'default',
deps: ['jQuery'],
},
File diff suppressed because one or more lines are too long