Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
"ionicons": "^6.0.3",
"mixpanel-browser": "^2.45.0",
"moment": "^2.30.1",
"ng5-slider": "^1.2.6",
"@angular-slider/ngx-slider": "^17.0.0",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "Project Angular core version range:"
jq -r '.dependencies["`@angular/core`"]' package.json

echo "Configured ngx-slider range:"
jq -r '.dependencies["`@angular-slider/ngx-slider`"]' package.json

echo "Peer dependencies for ngx-slider 17.0.0:"
curl -s https://registry.npmjs.org/@angular-slider/ngx-slider/17.0.0 | jq '.peerDependencies'

Repository: BAWES-Universe/studenthub-staff

Length of output: 293


🏁 Script executed:

#!/bin/bash

# Check if ngx-slider 15.0.0 exists and its peer dependencies
echo "Peer dependencies for ngx-slider 15.0.0:"
curl -s https://registry.npmjs.org/@angular-slider/ngx-slider/15.0.0 | jq '.peerDependencies'

# Also check available versions for ngx-slider
echo -e "\nAvailable ngx-slider versions (last 10):"
curl -s https://registry.npmjs.org/@angular-slider/ngx-slider | jq -r '.versions | keys | reverse | .[0:10]'

Repository: BAWES-Universe/studenthub-staff

Length of output: 372


Downgrade ngx-slider to major version 15.

Line 63 adds @angular-slider/ngx-slider@^17.0.0, but this project uses Angular 15 (see Lines 21-26). ngx-slider majors are aligned with Angular majors—version 17.0.0 requires @angular/core@^17.1.1, which will cause peer-dependency resolution failures. Downgrade to ^15.0.0:

Proposed fix
-    "`@angular-slider/ngx-slider`": "^17.0.0",
+    "`@angular-slider/ngx-slider`": "^15.0.0",
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"@angular-slider/ngx-slider": "^17.0.0",
"`@angular-slider/ngx-slider`": "^15.0.0",
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@package.json` at line 63, The package.json currently adds
"`@angular-slider/ngx-slider`" at "^17.0.0" which is incompatible with this
project's Angular 15; update the dependency declaration for
"`@angular-slider/ngx-slider`" to use the major-15 range (for example "^15.0.0")
so it matches Angular 15 peer requirements; modify the dependency entry in
package.json (the "`@angular-slider/ngx-slider`" line) and then run your package
manager install to refresh lockfile and verify no peer-dependency conflicts.

"rxjs": "~7.5.0",
"tslib": "^2.3.0",
"zone.js": "~0.11.4"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@
{{ value.upper | age }}
</ion-label>

<ng5-slider [(value)]="value.lower" [(highValue)]="value.upper"
<ngx-slider [(value)]="value.lower" [(highValue)]="value.upper"
(userChangeEnd)="handleChange()"
(userChange)="setLabel()" [options]="options"></ng5-slider>
(userChange)="setLabel()" [options]="options"></ngx-slider>
<!--
<ion-range debounce="500" dualKnobs="true" (ionChange)="handleChange($event)"
[value]="value"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { connectRange } from 'instantsearch.js/es/connectors';
import { RangeRenderState } from 'instantsearch.js/es/connectors/range/connectRange';
import { BaseWidget, NgAisIndex, NgAisInstantSearch } from 'angular-instantsearch';
import { parseNumberInput, noop } from 'angular-instantsearch/esm2015/utils';
import { Options } from 'ng5-slider';
import { Options } from '@angular-slider/ngx-slider';


@Component({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { Ng5SliderModule } from 'ng5-slider';
import { NgxSliderModule } from '@angular-slider/ngx-slider';
import { FormsModule } from '@angular/forms';
import { NgAisModule } from 'angular-instantsearch';
import { IonicModule } from '@ionic/angular';
Expand All @@ -18,7 +18,7 @@ import { AgeRefinementListComponent } from './age-refinement-list.component';
CommonModule,
FormsModule,
PipesModule,
Ng5SliderModule,
NgxSliderModule,
],
exports: [
AgeRefinementListComponent
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { BaseWidget, NgAisIndex, NgAisInstantSearch } from 'angular-instantsearc
import { parseNumberInput, noop } from 'angular-instantsearch/esm2015/utils';
import {CalendarModal, CalendarModalOptions, CalendarResult} from 'ion2-calendar';
import { ModalController } from '@ionic/angular';
import {Options} from "ng5-slider";
import {Options} from "@angular-slider/ngx-slider";

@Component({
selector: 'date-range-refinement-list',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@
{{ value.upper | age }}
</ion-label>

<ng5-slider [(value)]="value.lower" [(highValue)]="value.upper"
<ngx-slider [(value)]="value.lower" [(highValue)]="value.upper"
(userChangeEnd)="handleChange()"
(userChange)="setLabel()" [options]="options"></ng5-slider>
(userChange)="setLabel()" [options]="options"></ngx-slider>
<!--
<ion-range debounce="500" dualKnobs="true" (ionChange)="handleChange($event)"
[value]="value"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { FormsModule } from "@angular/forms";
import { RangeRefinementComponent } from './range-refinement-list';

import { NgAisModule } from 'angular-instantsearch';
import { Ng5SliderModule } from 'ng5-slider';
import { NgxSliderModule } from '@angular-slider/ngx-slider';

import { PipesModule } from '../../pipes/pipes.module';

Expand All @@ -21,7 +21,7 @@ import { PipesModule } from '../../pipes/pipes.module';
CommonModule,
FormsModule,
PipesModule,
Ng5SliderModule,
NgxSliderModule,
],
exports: [
RangeRefinementComponent
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { connectRange } from 'instantsearch.js/es/connectors';
import { RangeRenderState } from 'instantsearch.js/es/connectors/range/connectRange';
import { BaseWidget, NgAisIndex, NgAisInstantSearch } from 'angular-instantsearch';
import { parseNumberInput, noop } from 'angular-instantsearch/esm2015/utils';
import { Options } from 'ng5-slider';
import { Options } from '@angular-slider/ngx-slider';


@Component({
Expand Down
8 changes: 4 additions & 4 deletions src/global.scss
Original file line number Diff line number Diff line change
Expand Up @@ -432,13 +432,13 @@ ion-calendar-modal {
margin: 0 auto !important;
}

ng5-slider {
ngx-slider {
$handleSize: 12px;

background: var(--ion-color-custom-2) !important;
margin: 10px 0 15px !important;

.ng5-slider-pointer {
.ngx-slider-pointer {
width: 12px !important;
height: 12px !important;
top: -4px !important;
Expand All @@ -451,11 +451,11 @@ ng5-slider {
}
}

.ng5-slider-selection {
.ngx-slider-selection {
background: var(--ion-color-custom-3) !important;
}

.ng5-slider-bubble {
.ngx-slider-bubble {
display: none !important;
}
}
Expand Down