Commit 3eabe3fc authored by jrockowitz's avatar jrockowitz Committed by Jacob Rockowitz
Browse files

Issue #3266007 by kreynen, jrockowitz: Include licensing information in drupal-libraries

parent e6d251b2
......@@ -74,7 +74,8 @@
"dist": {
"url": "https://registry.npmjs.org/places.js/-/places.js-1.19.0.tgz",
"type": "tar"
}
},
"license": "MIT"
}
},
"choices": {
......@@ -89,7 +90,8 @@
"dist": {
"url": "https://github.com/jshjohnson/Choices/archive/refs/tags/v9.0.1.zip",
"type": "zip"
}
},
"license": "MIT"
}
},
"ckeditor.autogrow": {
......@@ -104,7 +106,8 @@
"dist": {
"url": "https://download.ckeditor.com/autogrow/releases/autogrow_4.18.0.zip",
"type": "zip"
}
},
"license": "GPL-2.0-or-later"
}
},
"ckeditor.codemirror": {
......@@ -119,7 +122,8 @@
"dist": {
"url": "https://github.com/w8tcha/CKEditor-CodeMirror-Plugin/releases/download/v1.18.3/CKEditor-CodeMirror-Plugin.zip",
"type": "zip"
}
},
"license": "MIT"
}
},
"ckeditor.fakeobjects": {
......@@ -134,7 +138,8 @@
"dist": {
"url": "https://download.ckeditor.com/fakeobjects/releases/fakeobjects_4.18.0.zip",
"type": "zip"
}
},
"license": "GPL-2.0-or-later"
}
},
"ckeditor.image": {
......@@ -149,7 +154,8 @@
"dist": {
"url": "https://download.ckeditor.com/image/releases/image_4.18.0.zip",
"type": "zip"
}
},
"license": "GPL-2.0-or-later"
}
},
"ckeditor.link": {
......@@ -164,7 +170,8 @@
"dist": {
"url": "https://download.ckeditor.com/link/releases/link_4.18.0.zip",
"type": "zip"
}
},
"license": "GPL-2.0-or-later"
}
},
"codemirror": {
......@@ -179,7 +186,8 @@
"dist": {
"url": "https://github.com/components/codemirror/archive/refs/tags/5.65.3.zip",
"type": "zip"
}
},
"license": "MIT"
}
},
"jquery.chosen": {
......@@ -194,7 +202,8 @@
"dist": {
"url": "https://github.com/harvesthq/chosen/releases/download/v1.8.7/chosen_v1.8.7.zip",
"type": "zip"
}
},
"license": "MIT"
}
},
"jquery.geocomplete": {
......@@ -209,7 +218,8 @@
"dist": {
"url": "https://github.com/ubilabs/geocomplete/archive/refs/tags/1.7.0.zip",
"type": "zip"
}
},
"license": "MIT"
}
},
"jquery.hotkeys": {
......@@ -224,7 +234,8 @@
"dist": {
"url": "https://github.com/jeresig/jquery.hotkeys/archive/refs/tags/0.2.0.zip",
"type": "zip"
}
},
"license": "N/A"
}
},
"jquery.icheck": {
......@@ -239,7 +250,8 @@
"dist": {
"url": "https://github.com/dargullin/icheck/archive/refs/tags/1.0.2.zip",
"type": "zip"
}
},
"license": "MIT"
}
},
"jquery.image-picker": {
......@@ -254,7 +266,8 @@
"dist": {
"url": "https://github.com/rvera/image-picker/archive/refs/tags/0.3.1.zip",
"type": "zip"
}
},
"license": "MIT"
}
},
"jquery.inputmask": {
......@@ -269,7 +282,8 @@
"dist": {
"url": "https://github.com/RobinHerbots/jquery.inputmask/archive/refs/tags/5.0.7.zip",
"type": "zip"
}
},
"license": "MIT"
}
},
"jquery.intl-tel-input": {
......@@ -284,7 +298,8 @@
"dist": {
"url": "https://github.com/jackocnr/intl-tel-input/archive/refs/tags/v17.0.16.zip",
"type": "zip"
}
},
"license": "MIT"
}
},
"jquery.rateit": {
......@@ -299,7 +314,8 @@
"dist": {
"url": "https://github.com/gjunge/rateit.js/archive/refs/tags/1.1.5.zip",
"type": "zip"
}
},
"license": "MIT"
}
},
"jquery.select2": {
......@@ -314,7 +330,8 @@
"dist": {
"url": "https://github.com/select2/select2/archive/refs/tags/4.0.13.zip",
"type": "zip"
}
},
"license": "MIT"
}
},
"jquery.textcounter": {
......@@ -329,7 +346,8 @@
"dist": {
"url": "https://github.com/ractoon/jQuery-Text-Counter/archive/refs/tags/0.9.0.zip",
"type": "zip"
}
},
"license": "MIT"
}
},
"jquery.timepicker": {
......@@ -344,7 +362,8 @@
"dist": {
"url": "https://github.com/jonthornton/jquery-timepicker/archive/refs/tags/1.13.18.zip",
"type": "zip"
}
},
"license": "MIT"
}
},
"jquery.toggles": {
......@@ -359,7 +378,8 @@
"dist": {
"url": "https://github.com/simontabor/jquery-toggles/archive/refs/tags/v4.0.0.zip",
"type": "zip"
}
},
"license": "MIT"
}
},
"progress-tracker": {
......@@ -374,7 +394,8 @@
"dist": {
"url": "https://github.com/NigelOToole/progress-tracker/archive/refs/tags/2.0.7.zip",
"type": "zip"
}
},
"license": "MIT"
}
},
"signature_pad": {
......@@ -389,7 +410,8 @@
"dist": {
"url": "https://github.com/szimek/signature_pad/archive/refs/tags/v2.3.0.zip",
"type": "zip"
}
},
"license": "MIT"
}
},
"svg-pan-zoom": {
......@@ -404,7 +426,8 @@
"dist": {
"url": "https://github.com/ariutta/svg-pan-zoom/archive/refs/tags/3.6.1.zip",
"type": "zip"
}
},
"license": "BSD-2-Clause"
}
},
"tabby": {
......@@ -419,7 +442,8 @@
"dist": {
"url": "https://github.com/cferdinandi/tabby/archive/refs/tags/v12.0.3.zip",
"type": "zip"
}
},
"license": "MIT"
}
},
"tippyjs/5.x": {
......@@ -434,7 +458,8 @@
"dist": {
"url": "https://unpkg.com/tippy.js@5.2.1/dist/tippy-bundle.iife.min.js",
"type": "file"
}
},
"license": "MIT"
}
},
"tippyjs/6.x": {
......@@ -449,7 +474,8 @@
"dist": {
"url": "https://unpkg.com/tippy.js@6.3.7/dist/tippy-bundle.umd.min.js",
"type": "file"
}
},
"license": "MIT"
}
}
}
......
......@@ -23,6 +23,7 @@ function webform_icheck_webform_libraries_info() {
'version' => '1.0.2 ',
'optional' => FALSE,
'deprecated' => t('The iCheck library is not being maintained. It has been <a href=":href">deprecated</a> and will be removed in Webform 7.0.', [':href' => 'https://www.drupal.org/project/webform/issues/2931154']),
'license' => 'MIT',
];
return $libraries;
}
......
......@@ -38,6 +38,7 @@ function webform_image_select_webform_libraries_info() {
'version' => '0.3.1',
'elements' => ['webform_image_select'],
'optional' => FALSE,
'license' => 'MIT',
];
return $libraries;
}
......
......@@ -24,6 +24,7 @@ function webform_location_geocomplete_webform_libraries_info() {
'elements' => ['webform_location_geocomplete'],
'optional' => FALSE,
'deprecated' => t('The jQuery: Geocoding and Places Autocomplete Plugin library is not being maintained. It has been <a href=":href">deprecated</a> and will be removed in Webform 7.0.', [':href' => 'https://www.drupal.org/node/2991275']),
'license' => 'MIT',
];
return $libraries;
}
......
......@@ -48,6 +48,7 @@ function webform_options_custom_webform_libraries_info() {
'download_url' => Url::fromUri('https://github.com/ariutta/svg-pan-zoom/archive/refs/tags/3.6.1.zip'),
'version' => '3.6.1',
'optional' => FALSE,
'license' => 'BSD-2-Clause',
];
return $libraries;
}
......@@ -22,6 +22,7 @@ function webform_toggles_webform_libraries_info() {
'elements' => ['webform_toggle', 'webform_toggles'],
'optional' => FALSE,
'deprecated' => t('The Toggles library is not being maintained and has major accessibility issues. It has been <a href=":href">deprecated</a>.', [':href' => 'https://www.drupal.org/project/webform/issues/2890861']),
'license' => 'MIT',
];
return $libraries;
}
......@@ -1240,6 +1240,7 @@ class WebformCliService implements WebformCliServiceInterface {
'url' => $dist_url,
'type' => $dist_type,
],
'license' => $library['license'] ?: 'N/A',
],
];
......
......@@ -88,6 +88,7 @@ class WebformAdminConfigLibrariesForm extends WebformAdminConfigBaseForm {
$libraries_header = [
'title' => ['data' => $this->t('Title')],
'version' => ['data' => $this->t('Version')],
'license' => ['data' => $this->t('License'), 'class' => [RESPONSIVE_PRIORITY_LOW]],
'description' => ['data' => $this->t('Description/Notes'), 'class' => [RESPONSIVE_PRIORITY_LOW]],
'elements' => ['data' => $this->t('Required elements'), 'class' => [RESPONSIVE_PRIORITY_LOW]],
'provider' => ['data' => $this->t('Provider'), 'class' => [RESPONSIVE_PRIORITY_LOW]],
......@@ -134,6 +135,7 @@ class WebformAdminConfigLibrariesForm extends WebformAdminConfigBaseForm {
$library_option = [
'title' => $library['title'],
'version' => $library['version'],
'license' => $library['license'],
'description' => [
'data' => [
'content' => ['#markup' => $library['description'], '#suffix' => '<br />'],
......
......@@ -334,6 +334,7 @@ class WebformLibrariesManager implements WebformLibrariesManagerInterface {
'plugin_path' => 'libraries/ckeditor.autogrow/',
'plugin_url' => "https://cdn.jsdelivr.net/gh/ckeditor/ckeditor-dev@$ckeditor_version/plugins/autogrow/",
'version' => $ckeditor_version,
'license' => 'GPL-2.0-or-later',
];
$libraries['ckeditor.fakeobjects'] = [
'title' => $this->t('CKEditor: Fake Objects'),
......@@ -344,6 +345,7 @@ class WebformLibrariesManager implements WebformLibrariesManagerInterface {
'plugin_path' => 'libraries/ckeditor.fakeobjects/',
'plugin_url' => "https://cdn.jsdelivr.net/gh/ckeditor/ckeditor-dev@$ckeditor_version/plugins/fakeobjects/",
'version' => $ckeditor_version,
'license' => 'GPL-2.0-or-later',
];
$libraries['ckeditor.image'] = [
'title' => $this->t('CKEditor: Image'),
......@@ -354,6 +356,7 @@ class WebformLibrariesManager implements WebformLibrariesManagerInterface {
'plugin_path' => 'libraries/ckeditor.image/',
'plugin_url' => "https://cdn.jsdelivr.net/gh/ckeditor/ckeditor-dev@$ckeditor_version/plugins/image/",
'version' => $ckeditor_version,
'license' => 'GPL-2.0-or-later',
];
$libraries['ckeditor.link'] = [
'title' => $this->t('CKEditor: Link'),
......@@ -364,6 +367,7 @@ class WebformLibrariesManager implements WebformLibrariesManagerInterface {
'plugin_path' => 'libraries/ckeditor.link/',
'plugin_url' => "https://cdn.jsdelivr.net/gh/ckeditor/ckeditor-dev@$ckeditor_version/plugins/link/",
'version' => $ckeditor_version,
'license' => 'GPL-2.0-or-later',
];
$libraries['ckeditor.codemirror'] = [
'title' => $this->t('CKEditor: CodeMirror'),
......@@ -374,6 +378,7 @@ class WebformLibrariesManager implements WebformLibrariesManagerInterface {
'plugin_path' => 'libraries/ckeditor.codemirror/codemirror/',
'plugin_url' => "https://cdn.jsdelivr.net/gh/w8tcha/CKEditor-CodeMirror-Plugin@v1.18.3/codemirror/",
'version' => 'v1.18.3',
'license' => 'MIT',
];
$libraries['codemirror'] = [
'title' => $this->t('Code Mirror'),
......@@ -384,6 +389,7 @@ class WebformLibrariesManager implements WebformLibrariesManagerInterface {
'download_url' => Url::fromUri('https://github.com/components/codemirror/archive/refs/tags/5.65.3.zip'),
'issues_url' => Url::fromUri('https://github.com/codemirror/codemirror/issues'),
'version' => '5.65.3',
'license' => 'MIT',
];
$libraries['algolia.places'] = [
'title' => $this->t('Algolia Places'),
......@@ -396,6 +402,7 @@ class WebformLibrariesManager implements WebformLibrariesManagerInterface {
// @see https://www.jsdelivr.com/package/npm/places.js
'download_url' => Url::fromUri('https://registry.npmjs.org/places.js/-/places.js-1.19.0.tgz'),
'version' => '1.19.0',
'license' => 'MIT',
'elements' => ['webform_location_places'],
];
$libraries['jquery.inputmask'] = [
......@@ -405,6 +412,7 @@ class WebformLibrariesManager implements WebformLibrariesManagerInterface {
'homepage_url' => Url::fromUri('https://robinherbots.github.io/Inputmask/'),
'download_url' => Url::fromUri('https://github.com/RobinHerbots/jquery.inputmask/archive/refs/tags/5.0.7.zip'),
'version' => '5.0.7',
'license' => 'MIT',
];
$libraries['jquery.intl-tel-input'] = [
'title' => $this->t('jQuery: International Telephone Input'),
......@@ -413,6 +421,7 @@ class WebformLibrariesManager implements WebformLibrariesManagerInterface {
'homepage_url' => Url::fromUri('https://github.com/jackocnr/intl-tel-input'),
'download_url' => Url::fromUri('https://github.com/jackocnr/intl-tel-input/archive/refs/tags/v17.0.16.zip'),
'version' => '17.0.16',
'license' => 'MIT',
];
$libraries['jquery.rateit'] = [
'title' => $this->t('jQuery: RateIt'),
......@@ -422,6 +431,7 @@ class WebformLibrariesManager implements WebformLibrariesManagerInterface {
'download_url' => Url::fromUri('https://github.com/gjunge/rateit.js/archive/refs/tags/1.1.5.zip'),
'version' => '1.1.5',
'elements' => ['webform_rating'],
'license' => 'MIT',
];
$libraries['jquery.textcounter'] = [
'title' => $this->t('jQuery: Text Counter'),
......@@ -430,6 +440,7 @@ class WebformLibrariesManager implements WebformLibrariesManagerInterface {
'homepage_url' => Url::fromUri('https://github.com/ractoon/jQuery-Text-Counter'),
'download_url' => Url::fromUri('https://github.com/ractoon/jQuery-Text-Counter/archive/refs/tags/0.9.0.zip'),
'version' => '0.9.0',
'license' => 'MIT',
];
$libraries['jquery.timepicker'] = [
'title' => $this->t('jQuery: Timepicker'),
......@@ -438,6 +449,7 @@ class WebformLibrariesManager implements WebformLibrariesManagerInterface {
'homepage_url' => Url::fromUri('https://github.com/jonthornton/jquery-timepicker'),
'download_url' => Url::fromUri('https://github.com/jonthornton/jquery-timepicker/archive/refs/tags/1.13.18.zip'),
'version' => '1.13.18',
'license' => 'MIT',
];
$libraries['progress-tracker'] = [
'title' => $this->t('Progress Tracker'),
......@@ -446,6 +458,7 @@ class WebformLibrariesManager implements WebformLibrariesManagerInterface {
'homepage_url' => Url::fromUri('http://nigelotoole.github.io/progress-tracker/'),
'download_url' => Url::fromUri('https://github.com/NigelOToole/progress-tracker/archive/refs/tags/2.0.7.zip'),
'version' => '2.0.7',
'license' => 'MIT',
];
$libraries['signature_pad'] = [
'title' => $this->t('Signature Pad'),
......@@ -455,6 +468,7 @@ class WebformLibrariesManager implements WebformLibrariesManagerInterface {
'download_url' => Url::fromUri('https://github.com/szimek/signature_pad/archive/refs/tags/v2.3.0.zip'),
'version' => '2.3.0',
'elements' => ['webform_signature'],
'license' => 'MIT',
];
$libraries['tabby'] = [
'title' => $this->t('Tabby'),
......@@ -463,6 +477,7 @@ class WebformLibrariesManager implements WebformLibrariesManagerInterface {
'homepage_url' => Url::fromUri('https://github.com/cferdinandi/tabby'),
'download_url' => Url::fromUri('https://github.com/cferdinandi/tabby/archive/refs/tags/v12.0.3.zip'),
'version' => '12.0.3',
'license' => 'MIT',
];
// Drupal 8 and 9 supports different version of PopperJS which is a
// dependency for TipperJS.
......@@ -474,6 +489,7 @@ class WebformLibrariesManager implements WebformLibrariesManagerInterface {
'homepage_url' => Url::fromUri('https://github.com/atomiks/tippyjs'),
'download_url' => Url::fromUri('https://unpkg.com/tippy.js@5.2.1/dist/tippy-bundle.iife.min.js'),
'version' => '5.2.1',
'license' => 'MIT',
'core' => 8,
];
$libraries['tippyjs/6.x'] = [
......@@ -484,6 +500,7 @@ class WebformLibrariesManager implements WebformLibrariesManagerInterface {
'download_url' => Url::fromUri('https://unpkg.com/tippy.js@6.3.7/dist/tippy-bundle.umd.min.js'),
'version' => '6.3.7',
'core' => 9,
'license' => 'MIT',
];
$libraries['jquery.select2'] = [
'title' => $this->t('jQuery: Select2'),
......@@ -493,6 +510,7 @@ class WebformLibrariesManager implements WebformLibrariesManagerInterface {
'download_url' => Url::fromUri('https://github.com/select2/select2/archive/refs/tags/4.0.13.zip'),
'version' => '4.0.13',
'module' => $this->moduleHandler->moduleExists('select2') ? 'select2' : '',
'license' => 'MIT',
];
$libraries['choices'] = [
'title' => $this->t('Choices'),
......@@ -501,6 +519,7 @@ class WebformLibrariesManager implements WebformLibrariesManagerInterface {
'homepage_url' => Url::fromUri('https://joshuajohnson.co.uk/Choices/'),
'download_url' => Url::fromUri('https://github.com/jshjohnson/Choices/archive/refs/tags/v9.0.1.zip'),
'version' => '9.0.1',
'license' => 'MIT',
];
$libraries['jquery.chosen'] = [
'title' => $this->t('jQuery: Chosen'),
......@@ -510,6 +529,7 @@ class WebformLibrariesManager implements WebformLibrariesManagerInterface {
'download_url' => Url::fromUri('https://github.com/harvesthq/chosen/releases/download/v1.8.7/chosen_v1.8.7.zip'),
'version' => '1.8.7',
'module' => $this->moduleHandler->moduleExists('chosen') ? 'chosen' : '',
'license' => 'MIT',
];
// Add webform as the provider to all libraries.
......@@ -517,6 +537,7 @@ class WebformLibrariesManager implements WebformLibrariesManagerInterface {
$libraries[$library_name] += [
'optional' => TRUE,
'provider' => 'webform',
'license' => $this->t('N/A'),
];
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment