Commit 8480d41b authored by Jacob Rockowitz's avatar Jacob Rockowitz
Browse files

Issue #3252116 by jrockowitz: Use compiled progress tracker's css

parent bfc4647c
Loading
Loading
Loading
Loading
+2 −2
Changes for composer.libraries.json: 2 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -365,13 +365,13 @@
            "type": "package",
            "package": {
                "name": "progress-tracker/progress-tracker",
                "version": "2.0.6",
                "version": "2.0.7",
                "type": "drupal-library",
                "extra": {
                    "installer-name": "progress-tracker"
                },
                "dist": {
                    "url": "https://github.com/NigelOToole/progress-tracker/archive/2.0.6.zip",
                    "url": "https://github.com/NigelOToole/progress-tracker/archive/2.0.7.zip",
                    "type": "zip"
                }
            }
+13 −5
Changes for includes/webform.libraries.inc: 13 added lines, 5 removed lines.
Original line number Diff line number Diff line
@@ -56,10 +56,11 @@ function webform_library_info_alter(&$libraries, $extension) {
    return;
  }

  // Use Tippy.js 6.x which is compatible with Drupal 9.x.
  if (isset($libraries['libraries.tippyjs']) && floatval(\Drupal::VERSION) >= 9) {
  /** @var \Drupal\webform\WebformLibrariesManagerInterface $libraries_manager */
  $libraries_manager = \Drupal::service('webform.libraries_manager');

  // Use Tippy.js 6.x which is compatible with Drupal 9.x.
  if (isset($libraries['libraries.tippyjs']) && floatval(\Drupal::VERSION) >= 9) {
    $tippyjs_library = $libraries_manager->getLibrary('tippyjs/6.x');
    $libraries['libraries.tippyjs']['directory'] = 'tippyjs/6.x';
    $libraries['libraries.tippyjs']['version'] = $tippyjs_library['version'];
@@ -74,6 +75,16 @@ function webform_library_info_alter(&$libraries, $extension) {
    $libraries['webform.element.date']['dependencies'] = ['core/drupal.date', 'core/drupalSettings'];
  }

  // If old version of the progress tracker (< 2.0.7) is installed
  // use the progress-tracker.css in /docs instead of /src.
  if (isset($libraries['libraries.progress-tracker'])
    && $libraries_manager->exists('progress-tracker')
    && !file_exists($libraries_manager->find('progress-tracker') . '/src/styles/progress-tracker.css')) {
    $libraries['libraries.progress-tracker']['css']['component'] = [
      '/libraries/progress-tracker/docs/styles/progress-tracker.css' => [],
    ];
  }

  // If chosen_lib.module is installed, then update the dependency.
  if (\Drupal::moduleHandler()->moduleExists('chosen_lib')) {
    if (isset($libraries['webform.element.chosen'])) {
@@ -101,9 +112,6 @@ function webform_library_info_alter(&$libraries, $extension) {
    }
  }

  /** @var \Drupal\webform\WebformLibrariesManagerInterface $libraries_manager */
  $libraries_manager = \Drupal::service('webform.libraries_manager');

  // Map /library/* paths to CDN.
  // @see webform.libraries.yml.
  foreach ($libraries as $library_name => &$library) {
+2 −2
Changes for src/WebformLibrariesManager.php: 2 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -444,8 +444,8 @@ class WebformLibrariesManager implements WebformLibrariesManagerInterface {
      'description' => $this->t("A flexible SASS component to illustrate the steps in a multi-step process e.g. a multi-step form, a timeline or a quiz."),
      'notes' => $this->t('Progress Tracker is used by multi-step wizard forms.'),
      'homepage_url' => Url::fromUri('http://nigelotoole.github.io/progress-tracker/'),
      'download_url' => Url::fromUri('https://github.com/NigelOToole/progress-tracker/archive/2.0.6.zip'),
      'version' => '2.0.6',
      'download_url' => Url::fromUri('https://github.com/NigelOToole/progress-tracker/archive/2.0.7.zip'),
      'version' => '2.0.7',
    ];
    $libraries['signature_pad'] = [
      'title' => $this->t('Signature Pad'),
+3 −3
Changes for webform.libraries.yml: 3 added lines, 3 removed lines.
Original line number Diff line number Diff line
@@ -1276,17 +1276,17 @@ libraries.jquery.timepicker:

libraries.progress-tracker:
  remote: https://github.com/NigelOToole/progress-tracker
  version: '2.0.6'
  version: '2.0.7'
  license:
    name: MIT
    url: https://github.com/NigelOToole/progress-tracker/blob/master/LICENSE
    gpl-compatible: true
  directory: progress-tracker
  cdn:
    /libraries/progress-tracker/: https://cdn.jsdelivr.net/gh/NigelOToole/progress-tracker@v2.0.6/
    /libraries/progress-tracker/: https://cdn.jsdelivr.net/gh/NigelOToole/progress-tracker@v2.0.7/
  css:
    component:
      /libraries/progress-tracker/docs/styles/progress-tracker.css: {}
      /libraries/progress-tracker/src/styles/progress-tracker.css: {}

libraries.signature_pad:
  remote: https://github.com/szimek/signature_pad