mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-23 10:02:51 +00:00
refactor: rework components
This commit is contained in:
@@ -53,15 +53,16 @@
|
||||
"test:integration": "sh integration-test.sh"
|
||||
},
|
||||
"dependencies": {
|
||||
"@angular/animations": "17.0.0",
|
||||
"@angular/cdk": "16.1.4",
|
||||
"@angular/common": "17.0.0",
|
||||
"@angular/core": "17.0.0",
|
||||
"@angular/forms": "17.0.0",
|
||||
"@angular/platform-browser": "17.0.0",
|
||||
"@angular/router": "17.0.0",
|
||||
"@asymmetrik/ngx-leaflet": "16.0.1",
|
||||
"@asymmetrik/ngx-leaflet-markercluster": "16.0.0",
|
||||
"@angular/animations": "17.0.2",
|
||||
"@angular/cdk": "17.0.0",
|
||||
"@angular/common": "17.0.2",
|
||||
"@angular/core": "17.0.2",
|
||||
"@angular/elements": "17.0.2",
|
||||
"@angular/forms": "17.0.2",
|
||||
"@angular/platform-browser": "17.0.2",
|
||||
"@angular/router": "17.0.2",
|
||||
"@asymmetrik/ngx-leaflet": "17.0.0",
|
||||
"@asymmetrik/ngx-leaflet-markercluster": "17.0.0",
|
||||
"@awesome-cordova-plugins/calendar": "5.45.0",
|
||||
"@awesome-cordova-plugins/core": "5.45.0",
|
||||
"@capacitor/app": "4.1.1",
|
||||
@@ -82,7 +83,7 @@
|
||||
"@capacitor/status-bar": "4.1.1",
|
||||
"@hugotomazi/capacitor-navigation-bar": "2.0.0",
|
||||
"@ionic-native/core": "5.36.0",
|
||||
"@ionic/angular": "7.1.3",
|
||||
"@ionic/angular": "7.5.5",
|
||||
"@ionic/storage-angular": "4.0.0",
|
||||
"@ngx-translate/core": "15.0.0",
|
||||
"@ngx-translate/http-loader": "8.0.0",
|
||||
@@ -98,7 +99,7 @@
|
||||
"deepmerge": "4.3.1",
|
||||
"form-data": "4.0.0",
|
||||
"geojson": "0.5.0",
|
||||
"ionic-appauth": "0.9.0",
|
||||
"ionic-appauth": "2.0.0",
|
||||
"jsonpath-plus": "6.0.1",
|
||||
"leaflet": "1.9.3",
|
||||
"leaflet.markercluster": "1.5.3",
|
||||
@@ -106,7 +107,7 @@
|
||||
"moment": "2.29.4",
|
||||
"ngx-date-fns": "10.0.1",
|
||||
"ngx-logger": "5.0.12",
|
||||
"ngx-markdown": "16.0.0",
|
||||
"ngx-markdown": "17.1.0",
|
||||
"ngx-moment": "6.0.2",
|
||||
"opening_hours": "3.8.0",
|
||||
"rxjs": "7.8.1",
|
||||
@@ -119,16 +120,16 @@
|
||||
"@angular-devkit/build-angular": "17.0.0",
|
||||
"@angular-devkit/core": "17.0.0",
|
||||
"@angular-devkit/schematics": "17.0.0",
|
||||
"@angular-eslint/builder": "16.1.0",
|
||||
"@angular-eslint/eslint-plugin": "16.1.0",
|
||||
"@angular-eslint/eslint-plugin-template": "16.1.0",
|
||||
"@angular-eslint/schematics": "16.1.0",
|
||||
"@angular-eslint/template-parser": "16.1.0",
|
||||
"@angular-eslint/builder": "17.0.1",
|
||||
"@angular-eslint/eslint-plugin": "17.0.1",
|
||||
"@angular-eslint/eslint-plugin-template": "17.0.1",
|
||||
"@angular-eslint/schematics": "17.0.1",
|
||||
"@angular-eslint/template-parser": "17.0.1",
|
||||
"@angular/cli": "17.0.0",
|
||||
"@angular/compiler": "17.0.0",
|
||||
"@angular/compiler-cli": "17.0.0",
|
||||
"@angular/language-service": "17.0.0",
|
||||
"@angular/platform-browser-dynamic": "17.0.0",
|
||||
"@angular/compiler": "17.0.2",
|
||||
"@angular/compiler-cli": "17.0.2",
|
||||
"@angular/language-service": "17.0.2",
|
||||
"@angular/platform-browser-dynamic": "17.0.2",
|
||||
"@capacitor/android": "4.6.1",
|
||||
"@capacitor/cli": "4.6.1",
|
||||
"@capacitor/ios": "4.6.1",
|
||||
|
||||
@@ -12,9 +12,8 @@
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import {AnimationBuilder, AnimationController} from '@ionic/angular';
|
||||
import {AnimationOptions} from '@ionic/angular/providers/nav-controller';
|
||||
import {AnimationBuilder, AnimationController} from '@ionic/angular/standalone';
|
||||
import {AnimationOptions} from '@ionic/angular/common/providers/nav-controller';
|
||||
import {iosDuration, iosEasing, mdDuration, mdEasing} from './easings';
|
||||
|
||||
/**
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
import {CUSTOM_ELEMENTS_SCHEMA} from '@angular/core';
|
||||
import {TestBed} from '@angular/core/testing';
|
||||
|
||||
import {Platform} from '@ionic/angular';
|
||||
import {Platform} from '@ionic/angular/standalone';
|
||||
|
||||
import {TranslateService} from '@ngx-translate/core';
|
||||
import {ThingTranslateService} from './translation/thing-translate.service';
|
||||
|
||||
@@ -12,10 +12,10 @@
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import {AfterContentInit, Component, NgZone} from '@angular/core';
|
||||
import {AfterContentInit, Component, inject, Injector, NgZone} from '@angular/core';
|
||||
import {Router} from '@angular/router';
|
||||
import {App, URLOpenListenerEvent} from '@capacitor/app';
|
||||
import {Platform, ToastController} from '@ionic/angular';
|
||||
import {Platform, ToastController} from '@ionic/angular/standalone';
|
||||
import {SettingsProvider} from './modules/settings/settings.provider';
|
||||
import {AuthHelperService} from './modules/auth/auth-helper.service';
|
||||
import {environment} from '../environments/environment';
|
||||
@@ -24,6 +24,8 @@ import {Capacitor} from '@capacitor/core';
|
||||
import {ScheduleSyncService} from './modules/background/schedule/schedule-sync.service';
|
||||
import {NavigationBar} from '@hugotomazi/capacitor-navigation-bar';
|
||||
import {Keyboard, KeyboardResize} from '@capacitor/keyboard';
|
||||
import {createCustomElement} from '@angular/elements';
|
||||
import {IonIconComponent} from './util/ion-icon/ion-icon.component';
|
||||
|
||||
/**
|
||||
* TODO
|
||||
@@ -70,6 +72,9 @@ export class AppComponent implements AfterContentInit {
|
||||
private readonly toastController: ToastController,
|
||||
private readonly scheduleSyncService: ScheduleSyncService,
|
||||
) {
|
||||
const IonIconElement = createCustomElement(IonIconComponent, {injector: inject(Injector)});
|
||||
customElements.define('ion-icon', IonIconElement);
|
||||
|
||||
void this.initializeApp();
|
||||
}
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ import localeDe from '@angular/common/locales/de';
|
||||
import {APP_INITIALIZER, NgModule} from '@angular/core';
|
||||
import {BrowserModule} from '@angular/platform-browser';
|
||||
import {RouteReuseStrategy} from '@angular/router';
|
||||
import {IonicModule, IonicRouteStrategy, Platform} from '@ionic/angular';
|
||||
import {IonApp, IonicRouteStrategy, Platform} from '@ionic/angular/standalone';
|
||||
import {TranslateLoader, TranslateModule, TranslateService} from '@ngx-translate/core';
|
||||
import {TranslateHttpLoader} from '@ngx-translate/http-loader';
|
||||
import moment from 'moment';
|
||||
@@ -68,6 +68,7 @@ import {browserFactory, SimpleBrowser} from './util/browser.factory';
|
||||
import {getDateFnsLocale} from './translation/dfns-locale';
|
||||
import {setDefaultOptions} from 'date-fns';
|
||||
import {DateFnsConfigurationService} from 'ngx-date-fns';
|
||||
import {provideIonicAngular} from '@ionic/angular/standalone';
|
||||
|
||||
registerLocaleData(localeDe);
|
||||
|
||||
@@ -133,6 +134,7 @@ export function createTranslateLoader(http: HttpClient) {
|
||||
bootstrap: [AppComponent],
|
||||
declarations: [AppComponent],
|
||||
imports: [
|
||||
IonApp,
|
||||
AboutModule,
|
||||
AppRoutingModule,
|
||||
AuthModule,
|
||||
@@ -146,7 +148,6 @@ export function createTranslateLoader(http: HttpClient) {
|
||||
DashboardModule,
|
||||
DataModule,
|
||||
HebisModule,
|
||||
IonicModule.forRoot(),
|
||||
IonIconModule,
|
||||
JobModule,
|
||||
FavoritesModule,
|
||||
@@ -177,6 +178,7 @@ export function createTranslateLoader(http: HttpClient) {
|
||||
}),
|
||||
],
|
||||
providers: [
|
||||
provideIonicAngular(),
|
||||
{
|
||||
provide: RouteReuseStrategy,
|
||||
useClass: IonicRouteStrategy,
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import {Component, OnInit} from '@angular/core';
|
||||
import {ModalController} from '@ionic/angular';
|
||||
import {ModalController} from '@ionic/angular/standalone';
|
||||
import {AboutLicenseModalComponent} from './about-license-modal.component';
|
||||
import licensesFile from 'src/assets/about/licenses.json';
|
||||
|
||||
|
||||
@@ -16,7 +16,6 @@ import {RouterModule, Routes} from '@angular/router';
|
||||
import {NgModule} from '@angular/core';
|
||||
import {CommonModule} from '@angular/common';
|
||||
import {FormsModule} from '@angular/forms';
|
||||
import {IonicModule} from '@ionic/angular';
|
||||
import {TranslateModule} from '@ngx-translate/core';
|
||||
import {ThingTranslateModule} from '../../translation/thing-translate.module';
|
||||
import {ConfigProvider} from '../config/config.provider';
|
||||
@@ -55,7 +54,6 @@ const settingsRoutes: Routes = [
|
||||
CommonModule,
|
||||
IonIconModule,
|
||||
FormsModule,
|
||||
IonicModule.forRoot(),
|
||||
TranslateModule.forChild(),
|
||||
ThingTranslateModule.forChild(),
|
||||
RouterModule.forChild(settingsRoutes),
|
||||
|
||||
@@ -19,7 +19,6 @@ import {AssessmentBaseInfoComponent} from './types/assessment/assessment-base-in
|
||||
import {AssessmentDetailComponent} from './types/assessment/assessment-detail.component';
|
||||
import {CommonModule} from '@angular/common';
|
||||
import {FormsModule} from '@angular/forms';
|
||||
import {IonicModule} from '@ionic/angular';
|
||||
import {TranslateModule} from '@ngx-translate/core';
|
||||
import {DataModule} from '../data/data.module';
|
||||
import {ThingTranslateModule} from '../../translation/thing-translate.module';
|
||||
@@ -70,7 +69,6 @@ const routes: ProtectedRoutes = [
|
||||
CommonModule,
|
||||
FormsModule,
|
||||
IonIconModule,
|
||||
IonicModule,
|
||||
RouterModule.forChild(routes),
|
||||
TranslateModule,
|
||||
DataModule,
|
||||
|
||||
@@ -17,7 +17,7 @@ import {Component, DestroyRef, inject, Input, OnInit, ViewChild} from '@angular/
|
||||
import {ActivatedRoute} from '@angular/router';
|
||||
import {AssessmentsProvider} from '../assessments.provider';
|
||||
import {DataDetailComponent, ExternalDataLoadEvent} from '../../data/detail/data-detail.component';
|
||||
import {NavController} from '@ionic/angular';
|
||||
import {NavController} from '@ionic/angular/standalone';
|
||||
import {DataRoutingService} from '../../data/data-routing.service';
|
||||
import {SCAssessment} from '@openstapps/core';
|
||||
import {takeUntilDestroyed} from '@angular/core/rxjs-interop';
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import {Component} from '@angular/core';
|
||||
import {NavController} from '@ionic/angular';
|
||||
import {NavController} from '@ionic/angular/standalone';
|
||||
import {Router} from '@angular/router';
|
||||
import {AuthActions, IAuthAction} from 'ionic-appauth';
|
||||
import {AuthHelperService} from '../../auth-helper.service';
|
||||
|
||||
@@ -29,7 +29,7 @@ import {StorageProvider} from '../storage/storage.provider';
|
||||
import {DefaultAuthService} from './default-auth.service';
|
||||
import {PAIAAuthService} from './paia/paia-auth.service';
|
||||
import {SimpleBrowser} from '../../util/browser.factory';
|
||||
import {AlertController} from '@ionic/angular';
|
||||
import {AlertController} from '@ionic/angular/standalone';
|
||||
|
||||
const AUTH_ORIGIN_PATH = 'stapps.auth.origin_path';
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import {NgModule} from '@angular/core';
|
||||
import {CommonModule} from '@angular/common';
|
||||
import {Platform} from '@ionic/angular';
|
||||
import {Platform} from '@ionic/angular/standalone';
|
||||
import {Requestor, StorageBackend} from '@openid/appauth';
|
||||
import {storageFactory} from './factories';
|
||||
import {Browser} from 'ionic-appauth';
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
*/
|
||||
|
||||
import {HttpClient} from '@angular/common/http';
|
||||
import {Platform} from '@ionic/angular';
|
||||
import {Platform} from '@ionic/angular/standalone';
|
||||
import {CapacitorRequestor} from '../capacitor-requestor';
|
||||
import {NgHttpService} from '../ng-http.service';
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import {Platform} from '@ionic/angular';
|
||||
import {Platform} from '@ionic/angular/standalone';
|
||||
import {IonicStorage} from 'ionic-appauth/lib';
|
||||
import {SafeCapacitorSecureStorage} from '../../storage/capacitor-secure-storage';
|
||||
|
||||
|
||||
@@ -18,7 +18,6 @@ import {AddEventReviewModalComponent} from './add-event-review-modal.component';
|
||||
import {Calendar} from '@awesome-cordova-plugins/calendar/ngx';
|
||||
import {CalendarService} from './calendar.service';
|
||||
import {ScheduleProvider} from './schedule.provider';
|
||||
import {IonicModule} from '@ionic/angular';
|
||||
import {TranslateModule} from '@ngx-translate/core';
|
||||
import {ThingTranslateModule} from '../../translation/thing-translate.module';
|
||||
import {FormsModule} from '@angular/forms';
|
||||
@@ -30,7 +29,6 @@ import {IonIconModule} from '../../util/ion-icon/ion-icon.module';
|
||||
@NgModule({
|
||||
declarations: [AddEventReviewModalComponent],
|
||||
imports: [
|
||||
IonicModule.forRoot(),
|
||||
TranslateModule.forChild(),
|
||||
ThingTranslateModule.forChild(),
|
||||
IonIconModule,
|
||||
|
||||
@@ -16,7 +16,6 @@ import {CommonModule} from '@angular/common';
|
||||
import {NgModule} from '@angular/core';
|
||||
import {FormsModule} from '@angular/forms';
|
||||
import {RouterModule, Routes} from '@angular/router';
|
||||
import {IonicModule} from '@ionic/angular';
|
||||
import {TranslateModule} from '@ngx-translate/core';
|
||||
import {MomentModule} from 'ngx-moment';
|
||||
import {DataModule} from '../data/data.module';
|
||||
@@ -36,7 +35,6 @@ const catalogRoutes: Routes = [
|
||||
@NgModule({
|
||||
declarations: [CatalogComponent],
|
||||
imports: [
|
||||
IonicModule.forRoot(),
|
||||
FormsModule,
|
||||
TranslateModule.forChild(),
|
||||
RouterModule.forChild(catalogRoutes),
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import {Animation, AnimationController} from '@ionic/angular';
|
||||
import {Animation, AnimationController} from '@ionic/angular/standalone';
|
||||
import {NgZone} from '@angular/core';
|
||||
|
||||
export class DashboardCollapse {
|
||||
|
||||
@@ -20,7 +20,7 @@ import {SCDateSeries, SCUuid} from '@openstapps/core';
|
||||
import {SplashScreen} from '@capacitor/splash-screen';
|
||||
import {DataRoutingService} from '../data/data-routing.service';
|
||||
import {ScheduleProvider} from '../calendar/schedule.provider';
|
||||
import {AnimationController, IonContent} from '@ionic/angular';
|
||||
import {AnimationController, IonContent} from '@ionic/angular/standalone';
|
||||
import {DashboardCollapse} from './dashboard-collapse';
|
||||
import {BreakpointObserver} from '@angular/cdk/layout';
|
||||
import {takeUntilDestroyed} from '@angular/core/rxjs-interop';
|
||||
|
||||
@@ -16,7 +16,6 @@ import {CommonModule} from '@angular/common';
|
||||
import {NgModule} from '@angular/core';
|
||||
import {FormsModule} from '@angular/forms';
|
||||
import {RouterModule, Routes} from '@angular/router';
|
||||
import {IonicModule} from '@ionic/angular';
|
||||
import {SwiperModule} from 'swiper/angular';
|
||||
import {TranslateModule, TranslatePipe} from '@ngx-translate/core';
|
||||
import {MomentModule} from 'ngx-moment';
|
||||
@@ -56,7 +55,6 @@ const catalogRoutes: Routes = [
|
||||
JobSectionComponent,
|
||||
],
|
||||
imports: [
|
||||
IonicModule.forRoot(),
|
||||
IonIconModule,
|
||||
FormsModule,
|
||||
TranslateModule.forChild(),
|
||||
|
||||
@@ -12,9 +12,8 @@
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import {AnimationController} from '@ionic/angular';
|
||||
import {AnimationOptions} from '@ionic/angular/providers/nav-controller';
|
||||
import {AnimationController} from '@ionic/angular/standalone';
|
||||
import {AnimationOptions} from '@ionic/angular/common/providers/nav-controller';
|
||||
|
||||
/**
|
||||
*
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import {Component} from '@angular/core';
|
||||
import {AnimationController} from '@ionic/angular';
|
||||
import {AnimationController} from '@ionic/angular/standalone';
|
||||
import {homePageSearchTransition} from './search-route-transition';
|
||||
|
||||
/**
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import {Component, DestroyRef, inject, Input, ViewChild} from '@angular/core';
|
||||
import {IonRouterOutlet, ModalController} from '@ionic/angular';
|
||||
import {IonRouterOutlet, ModalController} from '@ionic/angular/standalone';
|
||||
import {SCDateSeries, SCThing, SCThingType, SCUuid} from '@openstapps/core';
|
||||
import {Subscription} from 'rxjs';
|
||||
import {ScheduleProvider} from '../../../calendar/schedule.provider';
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import {ChangeDetectorRef, Component, EventEmitter, Input, OnInit, Output} from '@angular/core';
|
||||
import {ModalController} from '@ionic/angular';
|
||||
import {ModalController} from '@ionic/angular/standalone';
|
||||
import {SCDateSeries} from '@openstapps/core';
|
||||
import {
|
||||
DateSeriesRelevantData,
|
||||
|
||||
@@ -14,6 +14,8 @@
|
||||
-->
|
||||
|
||||
<ion-chip [class.active]="active" (click)="emitToggle(value)">
|
||||
<ion-icon class="ion-color" name="check_circle" fill="true" *ngIf="active"></ion-icon>
|
||||
@if (active) {
|
||||
<ion-icon class="ion-color" name="check_circle" fill="true"></ion-icon>
|
||||
}
|
||||
<ion-label>{{ displayValue }}</ion-label>
|
||||
</ion-chip>
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import {Component, EventEmitter, Input, Output} from '@angular/core';
|
||||
import {IonChip, IonLabel} from '@ionic/angular/standalone';
|
||||
/**
|
||||
* Shows a chip filter
|
||||
*/
|
||||
@@ -20,6 +21,8 @@ import {Component, EventEmitter, Input, Output} from '@angular/core';
|
||||
selector: 'stapps-chip-filter',
|
||||
templateUrl: './chip-filter.component.html',
|
||||
styleUrls: ['./chip-filter.component.scss'],
|
||||
standalone: true,
|
||||
imports: [IonChip, IonLabel],
|
||||
})
|
||||
export class ChipFilterComponent {
|
||||
/**
|
||||
|
||||
@@ -18,7 +18,7 @@ import {HttpClientModule} from '@angular/common/http';
|
||||
import {NgModule} from '@angular/core';
|
||||
import {FormsModule} from '@angular/forms';
|
||||
import {LeafletModule} from '@asymmetrik/ngx-leaflet';
|
||||
import {IonicModule, Platform} from '@ionic/angular';
|
||||
import {Platform} from '@ionic/angular/standalone';
|
||||
import {TranslateModule} from '@ngx-translate/core';
|
||||
import {MarkdownModule} from 'ngx-markdown';
|
||||
import {MomentModule} from 'ngx-moment';
|
||||
@@ -30,8 +30,6 @@ import {UtilModule} from '../../util/util.module';
|
||||
import {CalendarService} from '../calendar/calendar.service';
|
||||
import {ScheduleProvider} from '../calendar/schedule.provider';
|
||||
import {GeoNavigationDirective} from '../map/geo-navigation.directive';
|
||||
import {MapWidgetComponent} from '../map/widget/map-widget.component';
|
||||
import {MenuModule} from '../menu/menu.module';
|
||||
import {SettingsProvider} from '../settings/settings.provider';
|
||||
import {StorageModule} from '../storage/storage.module';
|
||||
import {ActionChipListComponent} from './chips/action-chip-list.component';
|
||||
@@ -141,7 +139,6 @@ import {VideoListItemComponent} from './types/video/video-list-item.component';
|
||||
FoodDataListComponent,
|
||||
LocateActionChipComponent,
|
||||
LongInlineTextComponent,
|
||||
MapWidgetComponent,
|
||||
MessageDetailContentComponent,
|
||||
MessageListItemComponent,
|
||||
JobPostingDetailContentComponent,
|
||||
@@ -186,16 +183,10 @@ import {VideoListItemComponent} from './types/video/video-list-item.component';
|
||||
DataRoutingModule,
|
||||
FormsModule,
|
||||
HttpClientModule,
|
||||
IonicModule.forRoot(),
|
||||
LeafletModule,
|
||||
MarkdownModule.forRoot(),
|
||||
MenuModule,
|
||||
MarkdownModule,
|
||||
IonIconModule,
|
||||
MomentModule.forRoot({
|
||||
relativeTimeThresholdOptions: {
|
||||
m: 59,
|
||||
},
|
||||
}),
|
||||
MomentModule,
|
||||
ScrollingModule,
|
||||
StorageModule,
|
||||
TranslateModule.forChild(),
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
*/
|
||||
import {Injectable} from '@angular/core';
|
||||
import {SCFeedbackRequestMetaData} from '@openstapps/core';
|
||||
import {Platform} from '@ionic/angular';
|
||||
import {Platform} from '@ionic/angular/standalone';
|
||||
import {DataProvider} from './data.provider';
|
||||
import {NavigationEnd, Router} from '@angular/router';
|
||||
import {SettingsProvider} from '../settings/settings.provider';
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
import {Component, Input, TemplateRef} from '@angular/core';
|
||||
import {SCThings} from '@openstapps/core';
|
||||
import {DataListContext} from '../list/data-list.component';
|
||||
import {ModalController} from '@ionic/angular';
|
||||
import {ModalController} from '@ionic/angular/standalone';
|
||||
|
||||
/**
|
||||
* TODO
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
import {CUSTOM_ELEMENTS_SCHEMA, DebugElement} from '@angular/core';
|
||||
import {ComponentFixture, TestBed} from '@angular/core/testing';
|
||||
import {ActivatedRoute, RouterModule} from '@angular/router';
|
||||
import {IonTitle} from '@ionic/angular';
|
||||
import {IonTitle} from '@ionic/angular/standalone';
|
||||
import {TranslateLoader, TranslateModule, TranslateService} from '@ngx-translate/core';
|
||||
import {sampleThingsMap} from '../../../_helpers/data/sample-things';
|
||||
import {DataRoutingModule} from '../data-routing.module';
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
*/
|
||||
import {Component, ContentChild, EventEmitter, Input, OnInit, Output, TemplateRef} from '@angular/core';
|
||||
import {ActivatedRoute, Router} from '@angular/router';
|
||||
import {ModalController} from '@ionic/angular';
|
||||
import {ModalController} from '@ionic/angular/standalone';
|
||||
import {LangChangeEvent, TranslateService} from '@ngx-translate/core';
|
||||
import {SCLanguageCode, SCSaveableThing, SCThings, SCUuid} from '@openstapps/core';
|
||||
import {DataProvider, DataScope} from '../data.provider';
|
||||
|
||||
@@ -19,7 +19,7 @@ import {DataProvider, DataScope} from '../data.provider';
|
||||
import {fromEvent, Observable} from 'rxjs';
|
||||
import {map, startWith} from 'rxjs/operators';
|
||||
import {DataRoutingService} from '../data-routing.service';
|
||||
import {NavController} from '@ionic/angular';
|
||||
import {NavController} from '@ionic/angular/standalone';
|
||||
import {takeUntilDestroyed} from '@angular/core/rxjs-interop';
|
||||
|
||||
@Component({
|
||||
|
||||
@@ -29,7 +29,7 @@ import {
|
||||
} from '@angular/core';
|
||||
import {SCThings} from '@openstapps/core';
|
||||
import {BehaviorSubject, Observable} from 'rxjs';
|
||||
import {IonInfiniteScroll} from '@ionic/angular';
|
||||
import {IonInfiniteScroll} from '@ionic/angular/standalone';
|
||||
import {takeUntilDestroyed} from '@angular/core/rxjs-interop';
|
||||
|
||||
export interface DataListContext<T> {
|
||||
|
||||
@@ -12,10 +12,9 @@
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import type {AnimationBuilder} from '@ionic/angular';
|
||||
import {AnimationController} from '@ionic/angular';
|
||||
import type {AnimationOptions} from '@ionic/angular/providers/nav-controller';
|
||||
import type {AnimationBuilder} from '@ionic/angular/standalone';
|
||||
import {AnimationController} from '@ionic/angular/standalone';
|
||||
import type {AnimationOptions} from '@ionic/angular/common/providers/nav-controller';
|
||||
|
||||
/**
|
||||
*
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
import {Component, DestroyRef, inject, Input, OnInit} from '@angular/core';
|
||||
import {ActivatedRoute, Router} from '@angular/router';
|
||||
import {Keyboard} from '@capacitor/keyboard';
|
||||
import {AlertController, AnimationBuilder, AnimationController} from '@ionic/angular';
|
||||
import {AlertController, AnimationBuilder, AnimationController} from '@ionic/angular/standalone';
|
||||
import {Capacitor} from '@capacitor/core';
|
||||
import {
|
||||
SCFacet,
|
||||
|
||||
@@ -17,7 +17,7 @@ import {AfterViewInit, Component, DestroyRef, inject, Input} from '@angular/core
|
||||
import {SCDish, SCISO8601Date, SCPlace} from '@openstapps/core';
|
||||
import {PlaceMensaService} from './place-mensa-service';
|
||||
import {Router} from '@angular/router';
|
||||
import {IonRouterOutlet} from '@ionic/angular';
|
||||
import {IonRouterOutlet} from '@ionic/angular/standalone';
|
||||
import {DataRoutingService} from '../../../../data-routing.service';
|
||||
import {groupBy} from '@openstapps/collection-utils';
|
||||
import {takeUntilDestroyed} from '@angular/core/rxjs-interop';
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import {Component, OnInit} from '@angular/core';
|
||||
import {AlertController, AnimationController} from '@ionic/angular';
|
||||
import {AlertController, AnimationController} from '@ionic/angular/standalone';
|
||||
import {ActivatedRoute, Router} from '@angular/router';
|
||||
import {NGXLogger} from 'ngx-logger';
|
||||
import {debounceTime, distinctUntilChanged, startWith, take} from 'rxjs/operators';
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
import {NgModule} from '@angular/core';
|
||||
import {CommonModule} from '@angular/common';
|
||||
import {FormsModule} from '@angular/forms';
|
||||
import {IonicModule} from '@ionic/angular';
|
||||
import {FavoritesPageComponent} from './favorites-page.component';
|
||||
import {RouterModule, Routes} from '@angular/router';
|
||||
import {MenuModule} from '../menu/menu.module';
|
||||
@@ -35,7 +34,6 @@ const favoritesRoutes: Routes = [
|
||||
imports: [
|
||||
CommonModule,
|
||||
FormsModule,
|
||||
IonicModule,
|
||||
RouterModule.forChild(favoritesRoutes),
|
||||
MenuModule,
|
||||
TranslateModule,
|
||||
|
||||
@@ -23,7 +23,7 @@ import {
|
||||
} from '@openstapps/core';
|
||||
import {DataProvider} from '../data/data.provider';
|
||||
import {DebugDataCollectorService} from '../data/debug-data-collector.service';
|
||||
import {AlertController, ToastController} from '@ionic/angular';
|
||||
import {AlertController, ToastController} from '@ionic/angular/standalone';
|
||||
import {TranslateService} from '@ngx-translate/core';
|
||||
|
||||
@Component({
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
import {NgModule} from '@angular/core';
|
||||
import {CommonModule} from '@angular/common';
|
||||
import {FormsModule} from '@angular/forms';
|
||||
import {IonicModule} from '@ionic/angular';
|
||||
import {FeedbackPageComponent} from './feedback-page.component';
|
||||
import {RouterModule, Routes} from '@angular/router';
|
||||
import {TranslateModule} from '@ngx-translate/core';
|
||||
@@ -34,7 +33,6 @@ const feedbackRoutes: Routes = [
|
||||
imports: [
|
||||
CommonModule,
|
||||
FormsModule,
|
||||
IonicModule,
|
||||
IonIconModule,
|
||||
RouterModule.forChild(feedbackRoutes),
|
||||
TranslateModule,
|
||||
|
||||
@@ -26,7 +26,6 @@ import {HebisDataProvider} from '../hebis-data.provider';
|
||||
import {HebisDetailComponent} from './hebis-detail.component';
|
||||
import {Observable, of} from 'rxjs';
|
||||
import {StorageProvider} from '../../storage/storage.provider';
|
||||
import {IonicModule} from '@ionic/angular';
|
||||
import {IonIconModule} from '../../../util/ion-icon/ion-icon.module';
|
||||
import {LoggerModule, NgxLoggerLevel} from 'ngx-logger';
|
||||
|
||||
@@ -68,7 +67,6 @@ describe('HebisDetailComponent', () => {
|
||||
RouterModule.forRoot([]),
|
||||
HebisRoutingModule,
|
||||
HebisModule,
|
||||
IonicModule,
|
||||
IonIconModule,
|
||||
TranslateModule.forRoot({
|
||||
loader: {provide: TranslateLoader, useClass: TranslateFakeLoader},
|
||||
|
||||
@@ -17,7 +17,6 @@ import {CommonModule} from '@angular/common';
|
||||
import {HttpClientModule} from '@angular/common/http';
|
||||
import {NgModule} from '@angular/core';
|
||||
import {FormsModule} from '@angular/forms';
|
||||
import {IonicModule} from '@ionic/angular';
|
||||
import {TranslateModule} from '@ngx-translate/core';
|
||||
import {MarkdownModule} from 'ngx-markdown';
|
||||
import {MomentModule} from 'ngx-moment';
|
||||
@@ -55,14 +54,9 @@ import {DaiaHoldingComponent} from './daia-availability/daia-holding.component';
|
||||
HebisRoutingModule,
|
||||
IonIconModule,
|
||||
HttpClientModule,
|
||||
IonicModule.forRoot(),
|
||||
MarkdownModule.forRoot(),
|
||||
MarkdownModule,
|
||||
MenuModule,
|
||||
MomentModule.forRoot({
|
||||
relativeTimeThresholdOptions: {
|
||||
m: 59,
|
||||
},
|
||||
}),
|
||||
MomentModule,
|
||||
ScrollingModule,
|
||||
StorageModule,
|
||||
TranslateModule.forChild(),
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import {NgModule} from '@angular/core';
|
||||
import {CommonModule} from '@angular/common';
|
||||
import {IonicModule} from '@ionic/angular';
|
||||
import {TranslateModule} from '@ngx-translate/core';
|
||||
import {MomentModule} from 'ngx-moment';
|
||||
import {DataModule} from '../data/data.module';
|
||||
@@ -16,7 +15,6 @@ const jobsRoutes: Routes = [{path: 'jobs', component: JobsPageComponent}];
|
||||
@NgModule({
|
||||
declarations: [JobsPageComponent],
|
||||
imports: [
|
||||
IonicModule.forRoot(),
|
||||
ThingTranslateModule.forChild(),
|
||||
TranslateModule.forChild(),
|
||||
RouterModule.forChild(jobsRoutes),
|
||||
|
||||
@@ -26,7 +26,7 @@ import {PAIATokenResponse} from '../../auth/paia/paia-token-response';
|
||||
import {AuthHelperService} from '../../auth/auth-helper.service';
|
||||
import {ConfigProvider} from '../../config/config.provider';
|
||||
import {TranslateService} from '@ngx-translate/core';
|
||||
import {AlertController, ToastController} from '@ionic/angular';
|
||||
import {AlertController, ToastController} from '@ionic/angular/standalone';
|
||||
import {HebisSearchResponse} from '../../hebis/protocol/response';
|
||||
|
||||
@Injectable({
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
import {NgModule} from '@angular/core';
|
||||
import {CommonModule} from '@angular/common';
|
||||
import {FormsModule} from '@angular/forms';
|
||||
import {IonicModule} from '@ionic/angular';
|
||||
import {RouterModule, Routes} from '@angular/router';
|
||||
import {TranslateModule} from '@ngx-translate/core';
|
||||
import {LibraryAccountPageComponent} from './account/account.page';
|
||||
@@ -71,7 +70,6 @@ const routes: ProtectedRoutes | Routes = [
|
||||
imports: [
|
||||
CommonModule,
|
||||
FormsModule,
|
||||
IonicModule,
|
||||
IonIconModule,
|
||||
RouterModule.forChild(routes),
|
||||
TranslateModule,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import {Directive, HostListener, Input} from '@angular/core';
|
||||
import {SCPlaceWithoutReferences, SCThings, SCThingWithoutReferences} from '@openstapps/core';
|
||||
import {Device} from '@capacitor/device';
|
||||
import {ActionSheetController, ActionSheetOptions, ToastController} from '@ionic/angular';
|
||||
import {ActionSheetController, ActionSheetOptions, ToastController} from '@ionic/angular/standalone';
|
||||
import {TranslateService} from '@ngx-translate/core';
|
||||
import {ThingTranslateService} from '../../translation/thing-translate.service';
|
||||
import {Clipboard} from '@capacitor/clipboard';
|
||||
|
||||
@@ -12,28 +12,12 @@
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import {CommonModule} from '@angular/common';
|
||||
import {FormsModule} from '@angular/forms';
|
||||
import {RouterModule, Routes} from '@angular/router';
|
||||
import {LeafletModule} from '@asymmetrik/ngx-leaflet';
|
||||
import {LeafletMarkerClusterModule} from '@asymmetrik/ngx-leaflet-markercluster';
|
||||
import {IonicModule} from '@ionic/angular';
|
||||
import {TranslateModule} from '@ngx-translate/core';
|
||||
import {RouterModule} from '@angular/router';
|
||||
import {Polygon} from 'geojson';
|
||||
import {ThingTranslateModule} from '../../translation/thing-translate.module';
|
||||
import {ConfigProvider} from '../config/config.provider';
|
||||
import {DataFacetsProvider} from '../data/data-facets.provider';
|
||||
import {DataModule} from '../data/data.module';
|
||||
import {DataProvider} from '../data/data.provider';
|
||||
import {StAppsWebHttpClient} from '../data/stapps-web-http-client.provider';
|
||||
import {MenuModule} from '../menu/menu.module';
|
||||
import {MapProvider} from './map.provider';
|
||||
import {MapPageComponent} from './page/map-page.component';
|
||||
import {MapListModalComponent} from './page/map-list-modal.component';
|
||||
import {NgModule} from '@angular/core';
|
||||
import {UtilModule} from '../../util/util.module';
|
||||
import {IonIconModule} from '../../util/ion-icon/ion-icon.module';
|
||||
import {GeoNavigationDirective} from './geo-navigation.directive';
|
||||
|
||||
/**
|
||||
* Initializes the default area to show in advance (before components are initialized)
|
||||
@@ -46,33 +30,15 @@ export function initMapConfigFactory(configProvider: ConfigProvider, mapProvider
|
||||
};
|
||||
}
|
||||
|
||||
const mapRoutes: Routes = [
|
||||
{path: 'map', component: MapPageComponent},
|
||||
{path: 'map/:uid', component: MapPageComponent},
|
||||
];
|
||||
|
||||
/**
|
||||
* Module containing map related stuff
|
||||
*/
|
||||
@NgModule({
|
||||
declarations: [MapPageComponent, MapListModalComponent],
|
||||
exports: [],
|
||||
imports: [
|
||||
CommonModule,
|
||||
IonicModule.forRoot(),
|
||||
LeafletModule,
|
||||
IonIconModule,
|
||||
LeafletMarkerClusterModule,
|
||||
RouterModule.forChild(mapRoutes),
|
||||
TranslateModule.forChild(),
|
||||
MenuModule,
|
||||
DataModule,
|
||||
FormsModule,
|
||||
ThingTranslateModule,
|
||||
UtilModule,
|
||||
GeoNavigationDirective,
|
||||
GeoNavigationDirective,
|
||||
RouterModule.forChild([
|
||||
{path: 'map', component: MapPageComponent},
|
||||
{path: 'map/:uid', component: MapPageComponent},
|
||||
]),
|
||||
],
|
||||
providers: [Geolocation, MapProvider, DataProvider, DataFacetsProvider, StAppsWebHttpClient],
|
||||
})
|
||||
export class MapModule {}
|
||||
|
||||
@@ -15,8 +15,18 @@
|
||||
import {Component, Input, OnInit} from '@angular/core';
|
||||
import {SCSearchBooleanFilter, SCPlace, SCSearchFilter} from '@openstapps/core';
|
||||
import {MapProvider} from '../map.provider';
|
||||
import {ModalController} from '@ionic/angular';
|
||||
import {
|
||||
IonButton,
|
||||
IonButtons,
|
||||
IonContent,
|
||||
IonHeader,
|
||||
IonTitle,
|
||||
IonToolbar,
|
||||
ModalController,
|
||||
} from '@ionic/angular/standalone';
|
||||
import {LatLngBounds} from 'leaflet';
|
||||
import {DataModule} from '../../data/data.module';
|
||||
import {TranslateModule} from '@ngx-translate/core';
|
||||
|
||||
/**
|
||||
* Modal showing a provided list of places
|
||||
@@ -24,7 +34,9 @@ import {LatLngBounds} from 'leaflet';
|
||||
@Component({
|
||||
selector: 'map-list-modal',
|
||||
templateUrl: 'map-list-modal.html',
|
||||
styleUrls: ['map-list-modal.scss'],
|
||||
styleUrl: 'map-list-modal.scss',
|
||||
standalone: true,
|
||||
imports: [IonHeader, IonToolbar, IonTitle, IonButtons, IonButton, IonContent, DataModule, TranslateModule],
|
||||
})
|
||||
export class MapListModalComponent implements OnInit {
|
||||
/**
|
||||
@@ -47,7 +59,10 @@ export class MapListModalComponent implements OnInit {
|
||||
*/
|
||||
@Input() queryText?: string;
|
||||
|
||||
constructor(private mapProvider: MapProvider, readonly modalController: ModalController) {}
|
||||
constructor(
|
||||
private mapProvider: MapProvider,
|
||||
readonly modalController: ModalController,
|
||||
) {}
|
||||
|
||||
/**
|
||||
* Populate the list with the results from the search
|
||||
|
||||
@@ -13,16 +13,14 @@
|
||||
~ this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<div class="container">
|
||||
<ion-header translucent>
|
||||
<ion-toolbar color="primary" mode="ios">
|
||||
<ion-title>{{ 'map.modals.list.TITLE' | translate }}</ion-title>
|
||||
<ion-buttons slot="end">
|
||||
<ion-button (click)="modalController.dismiss()">{{ 'app.ui.CLOSE' | translate }}</ion-button>
|
||||
</ion-buttons>
|
||||
</ion-toolbar>
|
||||
</ion-header>
|
||||
<ion-content fullscreen>
|
||||
<stapps-data-list [loading]="!items" [items]="$any(items)"></stapps-data-list>
|
||||
</ion-content>
|
||||
</div>
|
||||
<ion-header translucent>
|
||||
<ion-toolbar color="primary" mode="ios">
|
||||
<ion-title>{{ 'map.modals.list.TITLE' | translate }}</ion-title>
|
||||
<ion-buttons slot="end">
|
||||
<ion-button (click)="modalController.dismiss()">{{ 'app.ui.CLOSE' | translate }}</ion-button>
|
||||
</ion-buttons>
|
||||
</ion-toolbar>
|
||||
</ion-header>
|
||||
<ion-content fullscreen>
|
||||
<stapps-data-list [loading]="!items" [items]="$any(items)"></stapps-data-list>
|
||||
</ion-content>
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
.container {
|
||||
:host {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 100%;
|
||||
|
||||
@@ -12,12 +12,28 @@
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import {Location} from '@angular/common';
|
||||
import {Location, NgIf} from '@angular/common';
|
||||
import {ChangeDetectorRef, Component, DestroyRef, ElementRef, inject, OnInit, ViewChild} from '@angular/core';
|
||||
import {ActivatedRoute, Router} from '@angular/router';
|
||||
import {Keyboard} from '@capacitor/keyboard';
|
||||
import {AlertController, IonRouterOutlet, ModalController} from '@ionic/angular';
|
||||
import {TranslateService} from '@ngx-translate/core';
|
||||
import {
|
||||
AlertController,
|
||||
IonBackButton,
|
||||
IonButton,
|
||||
IonButtons,
|
||||
IonCard,
|
||||
IonContent,
|
||||
IonHeader,
|
||||
IonIcon,
|
||||
IonMenuButton,
|
||||
IonModal,
|
||||
IonRouterOutlet,
|
||||
IonSearchbar,
|
||||
IonTitle,
|
||||
IonToolbar,
|
||||
ModalController,
|
||||
} from '@ionic/angular/standalone';
|
||||
import {TranslateModule, TranslateService} from '@ngx-translate/core';
|
||||
import {SCBuilding, SCPlace, SCRoom, SCSearchFilter, SCUuid} from '@openstapps/core';
|
||||
import {featureGroup, geoJSON, LatLng, Layer, Map, MapOptions, Marker, tileLayer} from 'leaflet';
|
||||
import {BehaviorSubject} from 'rxjs';
|
||||
@@ -30,14 +46,41 @@ import {Capacitor} from '@capacitor/core';
|
||||
import {pauseWhen} from '../../../util/rxjs/pause-when';
|
||||
import {takeUntilDestroyed} from '@angular/core/rxjs-interop';
|
||||
import {startViewTransition} from '../../../util/view-transition';
|
||||
import {ContextMenuComponent} from '../../menu/context/context-menu.component';
|
||||
import {FormsModule} from '@angular/forms';
|
||||
import {LeafletModule} from '@asymmetrik/ngx-leaflet';
|
||||
import {LeafletMarkerClusterModule} from '@asymmetrik/ngx-leaflet-markercluster';
|
||||
import {MapListModalComponent} from './map-list-modal.component';
|
||||
|
||||
/**
|
||||
* The main page of the map
|
||||
*/
|
||||
@Component({
|
||||
styleUrls: ['./map-page.scss'],
|
||||
templateUrl: './map-page.html',
|
||||
providers: [ContextMenuService],
|
||||
selector: 'stapps-map-page',
|
||||
templateUrl: 'map-page.html',
|
||||
styleUrl: 'map-page.scss',
|
||||
standalone: true,
|
||||
imports: [
|
||||
ContextMenuComponent,
|
||||
IonHeader,
|
||||
IonToolbar,
|
||||
IonButtons,
|
||||
IonBackButton,
|
||||
IonTitle,
|
||||
TranslateModule,
|
||||
IonSearchbar,
|
||||
FormsModule,
|
||||
IonMenuButton,
|
||||
IonContent,
|
||||
LeafletModule,
|
||||
LeafletMarkerClusterModule,
|
||||
IonButton,
|
||||
MapListModalComponent,
|
||||
IonModal,
|
||||
IonIcon,
|
||||
NgIf,
|
||||
IonCard,
|
||||
],
|
||||
})
|
||||
export class MapPageComponent implements OnInit {
|
||||
/**
|
||||
|
||||
@@ -13,18 +13,24 @@
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import {Component, ElementRef, HostBinding, Input, OnInit, ViewChild} from '@angular/core';
|
||||
import {Router} from '@angular/router';
|
||||
import {Router, RouterLink} from '@angular/router';
|
||||
import {SCPlaceWithoutReferences, SCThingWithoutReferences} from '@openstapps/core';
|
||||
import {geoJSON, Map, MapOptions, tileLayer} from 'leaflet';
|
||||
import {MapProvider} from '../map.provider';
|
||||
import {LeafletModule} from '@asymmetrik/ngx-leaflet';
|
||||
import {IonButton, IonIcon} from '@ionic/angular/standalone';
|
||||
import {GeoNavigationDirective} from '../geo-navigation.directive';
|
||||
import {TranslateModule} from '@ngx-translate/core';
|
||||
|
||||
/**
|
||||
* The map widget (needs a container with explicit size)
|
||||
*/
|
||||
@Component({
|
||||
selector: 'stapps-map-widget',
|
||||
styleUrls: ['./map-widget.scss'],
|
||||
templateUrl: './map-widget.html',
|
||||
styleUrl: 'map-widget.scss',
|
||||
templateUrl: 'map-widget.html',
|
||||
standalone: true,
|
||||
imports: [LeafletModule, IonButton, GeoNavigationDirective, RouterLink, TranslateModule, IonIcon],
|
||||
})
|
||||
export class MapWidgetComponent implements OnInit {
|
||||
@HostBinding('class.expand-when-space') expandWhenSpace = true;
|
||||
|
||||
@@ -20,7 +20,8 @@
|
||||
#mapContainer
|
||||
[leafletOptions]="options"
|
||||
></div>
|
||||
<div class="map-buttons" *ngIf="showExpandButton">
|
||||
@if (showExpandButton) {
|
||||
<div class="map-buttons">
|
||||
<ion-button color="primary" shape="round" size="small" [geoNavigation]="place">
|
||||
<ion-icon name="directions" slot="start"></ion-icon>
|
||||
{{'map.directions.TITLE' | translate}}
|
||||
@@ -29,3 +30,4 @@
|
||||
<ion-icon name="zoom_out_map"></ion-icon>
|
||||
</ion-button>
|
||||
</div>
|
||||
}
|
||||
|
||||
@@ -17,7 +17,6 @@ import {APP_BASE_HREF, CommonModule, Location, LocationStrategy, PathLocationStr
|
||||
import {ComponentFixture, TestBed} from '@angular/core/testing';
|
||||
import {FormsModule} from '@angular/forms';
|
||||
import {ChildrenOutletContexts, RouterModule, UrlSerializer} from '@angular/router';
|
||||
import {IonicModule} from '@ionic/angular';
|
||||
import {TranslateModule} from '@ngx-translate/core';
|
||||
import {SCFacet, SCThingType} from '@openstapps/core';
|
||||
import {ContextMenuComponent} from './context-menu.component';
|
||||
@@ -50,14 +49,7 @@ describe('ContextMenuComponent', async () => {
|
||||
{provide: LocationStrategy, useClass: PathLocationStrategy},
|
||||
{provide: APP_BASE_HREF, useValue: '/'},
|
||||
],
|
||||
imports: [
|
||||
FormsModule,
|
||||
IonicModule.forRoot(),
|
||||
TranslateModule.forRoot(),
|
||||
CommonModule,
|
||||
SettingsModule,
|
||||
RouterModule.forRoot([]),
|
||||
],
|
||||
imports: [FormsModule, TranslateModule, CommonModule, SettingsModule, RouterModule],
|
||||
}).compileComponents();
|
||||
|
||||
fixture = TestBed.createComponent(ContextMenuContainerComponent);
|
||||
|
||||
@@ -13,11 +13,27 @@
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import {Component, Input} from '@angular/core';
|
||||
import {LangChangeEvent, TranslateService} from '@ngx-translate/core';
|
||||
import {LangChangeEvent, TranslateModule, TranslateService} from '@ngx-translate/core';
|
||||
import {SCLanguage, SCThingTranslator, SCThingType, SCTranslations} from '@openstapps/core';
|
||||
import {ContextMenuService} from './context-menu.service';
|
||||
import {FilterContext, FilterFacet, SortContext, SortContextOption} from './context-type.js';
|
||||
import {takeUntilDestroyed} from '@angular/core/rxjs-interop';
|
||||
import {
|
||||
IonButton,
|
||||
IonCheckbox,
|
||||
IonContent,
|
||||
IonItem,
|
||||
IonLabel,
|
||||
IonList,
|
||||
IonListHeader,
|
||||
IonMenu,
|
||||
IonRadio,
|
||||
IonRadioGroup,
|
||||
IonTitle,
|
||||
IonToolbar,
|
||||
} from '@ionic/angular/standalone';
|
||||
import {NgForOf, NgIf, TitleCasePipe} from '@angular/common';
|
||||
import {FormsModule} from '@angular/forms';
|
||||
|
||||
/**
|
||||
* The context menu
|
||||
@@ -31,6 +47,26 @@ import {takeUntilDestroyed} from '@angular/core/rxjs-interop';
|
||||
@Component({
|
||||
selector: 'stapps-context',
|
||||
templateUrl: 'context-menu.html',
|
||||
standalone: true,
|
||||
imports: [
|
||||
IonMenu,
|
||||
IonToolbar,
|
||||
IonLabel,
|
||||
IonContent,
|
||||
IonList,
|
||||
IonRadioGroup,
|
||||
IonListHeader,
|
||||
IonTitle,
|
||||
TranslateModule,
|
||||
TitleCasePipe,
|
||||
IonItem,
|
||||
IonRadio,
|
||||
IonButton,
|
||||
IonCheckbox,
|
||||
FormsModule,
|
||||
NgIf,
|
||||
NgForOf,
|
||||
],
|
||||
})
|
||||
export class ContextMenuComponent {
|
||||
/**
|
||||
|
||||
@@ -30,7 +30,9 @@ import {transformFacets} from './facet-filter';
|
||||
/**
|
||||
* ContextMenuService provides bidirectional communication of context menu options and search queries
|
||||
*/
|
||||
@Injectable()
|
||||
@Injectable({
|
||||
providedIn: 'root',
|
||||
})
|
||||
export class ContextMenuService {
|
||||
/**
|
||||
* Local filter context object
|
||||
|
||||
@@ -1,45 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2022 StApps
|
||||
* This program is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, version 3.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import {CommonModule} from '@angular/common';
|
||||
import {NgModule} from '@angular/core';
|
||||
import {FormsModule} from '@angular/forms';
|
||||
import {RouterModule} from '@angular/router';
|
||||
import {LayoutModule} from '@angular/cdk/layout';
|
||||
import {IonicModule} from '@ionic/angular';
|
||||
import {TranslateModule} from '@ngx-translate/core';
|
||||
import {SettingsModule} from '../settings/settings.module';
|
||||
import {ContextMenuComponent} from './context/context-menu.component';
|
||||
import {ContextMenuService} from './context/context-menu.service';
|
||||
import {IonIconModule} from '../../util/ion-icon/ion-icon.module';
|
||||
|
||||
/**
|
||||
* Menu module
|
||||
*/
|
||||
@NgModule({
|
||||
declarations: [ContextMenuComponent],
|
||||
exports: [ContextMenuComponent],
|
||||
imports: [
|
||||
CommonModule,
|
||||
IonIconModule,
|
||||
FormsModule,
|
||||
IonicModule.forRoot(),
|
||||
RouterModule,
|
||||
SettingsModule,
|
||||
TranslateModule.forChild(),
|
||||
LayoutModule,
|
||||
],
|
||||
providers: [ContextMenuService],
|
||||
})
|
||||
export class MenuModule {}
|
||||
@@ -24,6 +24,24 @@ import {NavigationService} from './navigation.service';
|
||||
import config from 'capacitor.config';
|
||||
import {SettingsProvider} from '../../settings/settings.provider';
|
||||
import {BreakpointObserver} from '@angular/cdk/layout';
|
||||
import {OfflineNoticeComponent} from './offline-notice.component';
|
||||
import {
|
||||
IonButtons,
|
||||
IonContent,
|
||||
IonHeader,
|
||||
IonImg,
|
||||
IonItem,
|
||||
IonLabel,
|
||||
IonList,
|
||||
IonMenu,
|
||||
IonRouterOutlet,
|
||||
IonSplitPane,
|
||||
IonTitle,
|
||||
IonToolbar,
|
||||
} from '@ionic/angular/standalone';
|
||||
import {RootLinkDirective} from './root-link.directive';
|
||||
import {TabsComponent} from './tabs.component';
|
||||
import {TitleCasePipe} from '@angular/common';
|
||||
|
||||
/**
|
||||
* Generated class for the MenuPage page.
|
||||
@@ -33,8 +51,27 @@ import {BreakpointObserver} from '@angular/cdk/layout';
|
||||
*/
|
||||
@Component({
|
||||
selector: 'stapps-navigation',
|
||||
styleUrls: ['navigation.scss'],
|
||||
templateUrl: 'navigation.html',
|
||||
styleUrl: 'navigation.scss',
|
||||
standalone: true,
|
||||
imports: [
|
||||
OfflineNoticeComponent,
|
||||
IonSplitPane,
|
||||
IonMenu,
|
||||
IonHeader,
|
||||
IonToolbar,
|
||||
IonButtons,
|
||||
IonTitle,
|
||||
IonImg,
|
||||
IonContent,
|
||||
IonList,
|
||||
IonItem,
|
||||
RootLinkDirective,
|
||||
IonLabel,
|
||||
IonRouterOutlet,
|
||||
TabsComponent,
|
||||
TitleCasePipe,
|
||||
],
|
||||
})
|
||||
export class NavigationComponent implements OnInit {
|
||||
showTabbar = true;
|
||||
|
||||
@@ -24,10 +24,12 @@
|
||||
</ion-title>
|
||||
</ion-toolbar>
|
||||
</ion-header>
|
||||
<ion-content *ngIf="menu">
|
||||
<ion-list *ngFor="let category of menu; first as isFirst">
|
||||
@if (menu) {
|
||||
<ion-content>
|
||||
@for (category of menu; track category; let isFirst = first) {
|
||||
<ion-list>
|
||||
@if (category.title !== '') {
|
||||
<ion-item
|
||||
*ngIf="category.title !== ''"
|
||||
[rootLink]="category.route"
|
||||
[redirectedFrom]="isFirst ? '/' : category.route"
|
||||
lines="none"
|
||||
@@ -36,12 +38,16 @@
|
||||
<ion-icon slot="end" [name]="category.icon"></ion-icon>
|
||||
<ion-label> {{ category.translations[language].title | titlecase }} </ion-label>
|
||||
</ion-item>
|
||||
<ion-item *ngFor="let item of category.items" [rootLink]="item.route" [redirectedFrom]="item.route">
|
||||
} @for (item of category.items; track item) {
|
||||
<ion-item [rootLink]="item.route" [redirectedFrom]="item.route">
|
||||
<ion-icon slot="end" [name]="item.icon"></ion-icon>
|
||||
<ion-label> {{ item.translations[language].title | titlecase }} </ion-label>
|
||||
</ion-item>
|
||||
}
|
||||
</ion-list>
|
||||
}
|
||||
</ion-content>
|
||||
}
|
||||
</ion-menu>
|
||||
<ion-router-outlet id="main"></ion-router-outlet>
|
||||
</ion-split-pane>
|
||||
|
||||
@@ -1,31 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2023 StApps
|
||||
* This program is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, version 3.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import {NgModule} from '@angular/core';
|
||||
import {RootLinkDirective} from './root-link.directive';
|
||||
import {NavigationComponent} from './navigation.component';
|
||||
import {TabsComponent} from './tabs.component';
|
||||
import {CommonModule} from '@angular/common';
|
||||
import {IonicModule} from '@ionic/angular';
|
||||
import {IonIconModule} from '../../../util/ion-icon/ion-icon.module';
|
||||
import {TranslateModule} from '@ngx-translate/core';
|
||||
import {RouterModule} from '@angular/router';
|
||||
import {OfflineNoticeComponent} from './offline-notice.component';
|
||||
|
||||
@NgModule({
|
||||
declarations: [RootLinkDirective, NavigationComponent, TabsComponent, OfflineNoticeComponent],
|
||||
imports: [CommonModule, IonicModule, IonIconModule, TranslateModule, RouterModule],
|
||||
exports: [TabsComponent, RootLinkDirective, NavigationComponent],
|
||||
})
|
||||
export class NavigationModule {}
|
||||
@@ -17,11 +17,15 @@ import {InternetConnectionService} from '../../../util/internet-connection.servi
|
||||
import {Router} from '@angular/router';
|
||||
import {NGXLogger} from 'ngx-logger';
|
||||
import {takeUntilDestroyed} from '@angular/core/rxjs-interop';
|
||||
import {TranslateModule} from '@ngx-translate/core';
|
||||
import {IonButton, IonLabel} from '@ionic/angular/standalone';
|
||||
|
||||
@Component({
|
||||
selector: 'stapps-offline-notice',
|
||||
templateUrl: 'offline-notice.html',
|
||||
styleUrls: ['offline-notice.scss'],
|
||||
styleUrl: 'offline-notice.scss',
|
||||
standalone: true,
|
||||
imports: [TranslateModule, IonButton, IonLabel],
|
||||
})
|
||||
export class OfflineNoticeComponent {
|
||||
@HostBinding('class.is-offline') isOffline = false;
|
||||
|
||||
@@ -13,13 +13,14 @@
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import {DestroyRef, Directive, ElementRef, inject, Input, OnInit, Renderer2} from '@angular/core';
|
||||
import {AnimationController, NavController} from '@ionic/angular';
|
||||
import {AnimationController, NavController} from '@ionic/angular/standalone';
|
||||
import {Router, RouterEvent} from '@angular/router';
|
||||
import {tabsTransition} from './tabs-transition';
|
||||
import {takeUntilDestroyed} from '@angular/core/rxjs-interop';
|
||||
|
||||
@Directive({
|
||||
selector: '[rootLink]',
|
||||
standalone: true,
|
||||
})
|
||||
export class RootLinkDirective implements OnInit {
|
||||
@Input() rootLink: string;
|
||||
|
||||
@@ -14,18 +14,18 @@
|
||||
*/
|
||||
|
||||
import {NgModule} from '@angular/core';
|
||||
import {RouterModule, Routes} from '@angular/router';
|
||||
|
||||
const routes: Routes = [
|
||||
{
|
||||
path: '',
|
||||
redirectTo: '/overview',
|
||||
pathMatch: 'full',
|
||||
},
|
||||
];
|
||||
import {RouterModule} from '@angular/router';
|
||||
|
||||
@NgModule({
|
||||
imports: [RouterModule.forChild(routes)],
|
||||
imports: [
|
||||
RouterModule.forChild([
|
||||
{
|
||||
path: '',
|
||||
redirectTo: '/overview',
|
||||
pathMatch: 'full',
|
||||
},
|
||||
]),
|
||||
],
|
||||
exports: [RouterModule],
|
||||
})
|
||||
export class TabsRoutingModule {}
|
||||
|
||||
@@ -12,10 +12,9 @@
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import type {AnimationBuilder} from '@ionic/angular';
|
||||
import {AnimationController} from '@ionic/angular';
|
||||
import type {AnimationOptions} from '@ionic/angular/providers/nav-controller';
|
||||
import type {AnimationBuilder} from '@ionic/angular/standalone';
|
||||
import {AnimationController} from '@ionic/angular/standalone';
|
||||
import type {AnimationOptions} from '@ionic/angular/common/providers/nav-controller';
|
||||
|
||||
/**
|
||||
*
|
||||
|
||||
@@ -24,11 +24,16 @@ import {
|
||||
import {ConfigProvider} from '../../config/config.provider';
|
||||
import {LangChangeEvent, TranslateService} from '@ngx-translate/core';
|
||||
import {NGXLogger} from 'ngx-logger';
|
||||
import {IonLabel, IonMenuToggle, IonTabBar, IonTabButton} from '@ionic/angular/standalone';
|
||||
import {TitleCasePipe} from '@angular/common';
|
||||
import {RootLinkDirective} from './root-link.directive';
|
||||
|
||||
@Component({
|
||||
selector: 'stapps-navigation-tabs',
|
||||
templateUrl: 'tabs.template.html',
|
||||
styleUrls: ['./tabs.component.scss'],
|
||||
templateUrl: 'tabs.html',
|
||||
styleUrl: 'tabs.scss',
|
||||
standalone: true,
|
||||
imports: [IonTabBar, IonMenuToggle, IonTabButton, IonLabel, TitleCasePipe, RootLinkDirective],
|
||||
})
|
||||
export class TabsComponent {
|
||||
/**
|
||||
|
||||
@@ -12,26 +12,6 @@
|
||||
~ You should have received a copy of the GNU General Public License along with
|
||||
~ this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
-->
|
||||
<!--
|
||||
<ion-tab-bar slot="bottom">
|
||||
<ion-tab-button rootLink="/overview" redirectedFrom="/" tab="overview">
|
||||
<ion-icon name="home"></ion-icon>
|
||||
<ion-label>{{ 'tabs.home' | translate }}</ion-label>
|
||||
</ion-tab-button>
|
||||
<ion-tab-button rootLink="/canteen">
|
||||
<ion-icon name="local_cafe"></ion-icon>
|
||||
<ion-label>{{ 'tabs.canteens' | translate }}</ion-label>
|
||||
</ion-tab-button>
|
||||
<ion-tab-button rootLink="/profile">
|
||||
<ion-icon name="school"></ion-icon>
|
||||
<ion-label>{{ 'tabs.schedule' | translate }}</ion-label>
|
||||
</ion-tab-button>
|
||||
<ion-tab-button rootLink="/map">
|
||||
<ion-icon name="map"></ion-icon>
|
||||
<ion-label>{{ 'tabs.map' | translate }}</ion-label>
|
||||
</ion-tab-button>
|
||||
</ion-tab-bar>
|
||||
-->
|
||||
|
||||
<ion-tab-bar slot="bottom" [selectedTab]="selectedTab">
|
||||
<ion-menu-toggle>
|
||||
@@ -39,13 +19,10 @@
|
||||
<ion-icon name="menu"></ion-icon>
|
||||
</ion-tab-button>
|
||||
</ion-menu-toggle>
|
||||
<ion-tab-button
|
||||
*ngFor="let category of menu; first as isFirst"
|
||||
[rootLink]="category.route"
|
||||
[redirectedFrom]="category.route"
|
||||
[tab]="category.title"
|
||||
>
|
||||
@for (category of menu; track category) {
|
||||
<ion-tab-button [rootLink]="category.route" [redirectedFrom]="category.route" [tab]="category.title">
|
||||
<ion-icon [name]="category.icon"></ion-icon>
|
||||
<ion-label>{{ category.translations[language].title | titlecase }}</ion-label>
|
||||
</ion-tab-button>
|
||||
}
|
||||
</ion-tab-bar>
|
||||
@@ -23,7 +23,7 @@ import {ConfigProvider} from '../../config/config.provider';
|
||||
import {sampleAuthConfiguration} from '../../../_helpers/data/sample-configuration';
|
||||
import {TranslateModule, TranslateService} from '@ngx-translate/core';
|
||||
import {NGXLogger} from 'ngx-logger';
|
||||
import {Platform} from '@ionic/angular';
|
||||
import {Platform} from '@ionic/angular/standalone';
|
||||
import {ThingTranslateService} from '../../../translation/thing-translate.service';
|
||||
import {SettingsProvider} from '../../settings/settings.provider';
|
||||
import {ScheduleSyncService} from '../../background/schedule/schedule-sync.service';
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<ng-container *ngFor="let setting of settings">
|
||||
<stapps-chip-filter
|
||||
[displayValue]="setting | settingValueTranslate | titlecase"
|
||||
[value]="setting"
|
||||
[active]="!!filtersMap.get($any(setting.name))"
|
||||
(toggle)="stateChanged($any($event))"
|
||||
>
|
||||
</stapps-chip-filter>
|
||||
</ng-container>
|
||||
@for (setting of settings; track setting) {
|
||||
<stapps-chip-filter
|
||||
[displayValue]="setting | settingValueTranslate | titlecase"
|
||||
[value]="setting"
|
||||
[active]="!!filtersMap.get($any(setting.name))"
|
||||
(toggle)="stateChanged($any($event))"
|
||||
>
|
||||
</stapps-chip-filter>
|
||||
}
|
||||
|
||||
@@ -16,11 +16,16 @@ import {Component, EventEmitter, Input, OnInit, Output} from '@angular/core';
|
||||
import {newsFilterSettingsFieldsMapping, NewsFilterSettingsNames} from '../../news-filter-settings';
|
||||
import {SCSearchValueFilter, SCSetting} from '@openstapps/core';
|
||||
import {DataProvider} from '../../../data/data.provider';
|
||||
import {SettingsModule} from '../../../settings/settings.module';
|
||||
import {TitleCasePipe} from '@angular/common';
|
||||
import {ChipFilterComponent} from '../../../data/chips/filter/chip-filter.component';
|
||||
|
||||
@Component({
|
||||
selector: 'stapps-news-settings-filter',
|
||||
templateUrl: './news-settings-filter.component.html',
|
||||
styleUrls: ['./news-settings-filter.component.scss'],
|
||||
styleUrl: './news-settings-filter.component.scss',
|
||||
standalone: true,
|
||||
imports: [SettingsModule, TitleCasePipe, ChipFilterComponent],
|
||||
})
|
||||
export class NewsSettingsFilterComponent implements OnInit {
|
||||
/**
|
||||
|
||||
@@ -12,8 +12,11 @@
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import {Component, Input} from '@angular/core';
|
||||
import {ChangeDetectionStrategy, Component, Input} from '@angular/core';
|
||||
import {SCMessage} from '@openstapps/core';
|
||||
import {IonCard, IonCardHeader, IonCardSubtitle, IonCardTitle} from '@ionic/angular/standalone';
|
||||
import {RouterLink} from '@angular/router';
|
||||
import {FormatPipeModule, ParseIsoPipeModule} from 'ngx-date-fns';
|
||||
|
||||
/**
|
||||
* News page component
|
||||
@@ -21,7 +24,18 @@ import {SCMessage} from '@openstapps/core';
|
||||
@Component({
|
||||
selector: 'stapps-news-item',
|
||||
templateUrl: 'news-item.html',
|
||||
styleUrls: ['news-item.scss'],
|
||||
styleUrl: 'news-item.scss',
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
standalone: true,
|
||||
imports: [
|
||||
IonCard,
|
||||
RouterLink,
|
||||
IonCardHeader,
|
||||
IonCardTitle,
|
||||
IonCardSubtitle,
|
||||
ParseIsoPipeModule,
|
||||
FormatPipeModule,
|
||||
],
|
||||
})
|
||||
export class NewsItemComponent {
|
||||
/**
|
||||
|
||||
@@ -20,9 +20,9 @@
|
||||
[style.--background]="item.image ? 'url(' + item.image + ')' : undefined"
|
||||
>
|
||||
<ion-card-header>
|
||||
<ion-card-subtitle *ngIf="item.datePublished"
|
||||
>{{ item.datePublished | amCalendar | sentencecase }}</ion-card-subtitle
|
||||
>
|
||||
@if (item.datePublished) {
|
||||
<ion-card-subtitle>{{ item.datePublished | dfnsParseIso | dfnsFormat: 'PP' }}</ion-card-subtitle>
|
||||
}
|
||||
<ion-card-title> {{ item.name }} </ion-card-title>
|
||||
</ion-card-header>
|
||||
</ion-card>
|
||||
|
||||
@@ -12,7 +12,15 @@
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import {Component} from '@angular/core';
|
||||
import {ChangeDetectionStrategy, Component} from '@angular/core';
|
||||
import {
|
||||
IonCard,
|
||||
IonCardContent,
|
||||
IonCardHeader,
|
||||
IonCardSubtitle,
|
||||
IonCardTitle,
|
||||
IonSkeletonText,
|
||||
} from '@ionic/angular/standalone';
|
||||
|
||||
/**
|
||||
* A placeholder to show when a news item is being loaded
|
||||
@@ -20,5 +28,8 @@ import {Component} from '@angular/core';
|
||||
@Component({
|
||||
selector: 'stapps-skeleton-news-item',
|
||||
templateUrl: 'skeleton-news-item.html',
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
standalone: true,
|
||||
imports: [IonCard, IonCardHeader, IonCardSubtitle, IonCardTitle, IonSkeletonText, IonCardContent],
|
||||
})
|
||||
export class SkeletonNewsItemComponent {}
|
||||
|
||||
@@ -12,51 +12,11 @@
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import {CommonModule} from '@angular/common';
|
||||
import {NgModule} from '@angular/core';
|
||||
import {RouterModule, Routes} from '@angular/router';
|
||||
import {IonicModule} from '@ionic/angular';
|
||||
import {TranslateModule} from '@ngx-translate/core';
|
||||
import {MomentModule} from 'ngx-moment';
|
||||
import {ThingTranslateModule} from '../../translation/thing-translate.module';
|
||||
import {DataModule} from '../data/data.module';
|
||||
import {SettingsProvider} from '../settings/settings.provider';
|
||||
import {NewsItemComponent} from './item/news-item.component';
|
||||
import {RouterModule} from '@angular/router';
|
||||
import {NewsPageComponent} from './page/news-page.component';
|
||||
import {SkeletonNewsItemComponent} from './item/skeleton-news-item.component';
|
||||
import {ChipFilterComponent} from '../data/chips/filter/chip-filter.component';
|
||||
import {SettingsModule} from '../settings/settings.module';
|
||||
import {NewsSettingsFilterComponent} from './elements/news-filter-settings/news-settings-filter.component';
|
||||
import {UtilModule} from '../../util/util.module';
|
||||
import {IonIconModule} from '../../util/ion-icon/ion-icon.module';
|
||||
|
||||
const newsRoutes: Routes = [{path: 'news', component: NewsPageComponent}];
|
||||
|
||||
/**
|
||||
* News Module
|
||||
*/
|
||||
@NgModule({
|
||||
declarations: [
|
||||
NewsPageComponent,
|
||||
SkeletonNewsItemComponent,
|
||||
NewsItemComponent,
|
||||
ChipFilterComponent,
|
||||
NewsSettingsFilterComponent,
|
||||
],
|
||||
imports: [
|
||||
IonicModule.forRoot(),
|
||||
ThingTranslateModule.forChild(),
|
||||
TranslateModule.forChild(),
|
||||
RouterModule.forChild(newsRoutes),
|
||||
IonIconModule,
|
||||
CommonModule,
|
||||
MomentModule,
|
||||
DataModule,
|
||||
ThingTranslateModule,
|
||||
SettingsModule,
|
||||
UtilModule,
|
||||
],
|
||||
providers: [SettingsProvider],
|
||||
exports: [NewsItemComponent],
|
||||
imports: [NewsPageComponent, RouterModule.forChild([{path: 'news', component: NewsPageComponent}])],
|
||||
})
|
||||
export class NewsModule {}
|
||||
|
||||
@@ -13,10 +13,31 @@
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import {Component, OnInit} from '@angular/core';
|
||||
import {IonRefresher} from '@ionic/angular';
|
||||
import {
|
||||
IonBackButton,
|
||||
IonButtons,
|
||||
IonCol,
|
||||
IonContent,
|
||||
IonGrid,
|
||||
IonHeader,
|
||||
IonInfiniteScroll,
|
||||
IonInfiniteScrollContent,
|
||||
IonLabel,
|
||||
IonRefresher,
|
||||
IonRefresherContent,
|
||||
IonRow,
|
||||
IonTitle,
|
||||
IonToolbar,
|
||||
} from '@ionic/angular/standalone';
|
||||
import {SCMessage, SCSearchFilter, SCSearchValueFilter, SCSetting} from '@openstapps/core';
|
||||
import {NewsProvider} from '../news.provider';
|
||||
import {SplashScreen} from '@capacitor/splash-screen';
|
||||
import {TranslateModule} from '@ngx-translate/core';
|
||||
import {UtilModule} from '../../../util/util.module';
|
||||
import {NewsSettingsFilterComponent} from '../elements/news-filter-settings/news-settings-filter.component';
|
||||
import {SkeletonNewsItemComponent} from '../item/skeleton-news-item.component';
|
||||
import {NewsItemComponent} from '../item/news-item.component';
|
||||
import {TitleCasePipe} from '@angular/common';
|
||||
|
||||
/**
|
||||
* News page component
|
||||
@@ -25,6 +46,29 @@ import {SplashScreen} from '@capacitor/splash-screen';
|
||||
selector: 'stapps-news-page',
|
||||
templateUrl: 'news-page.html',
|
||||
styleUrls: ['news-page.scss'],
|
||||
standalone: true,
|
||||
imports: [
|
||||
IonHeader,
|
||||
IonToolbar,
|
||||
IonButtons,
|
||||
IonBackButton,
|
||||
IonTitle,
|
||||
TranslateModule,
|
||||
IonContent,
|
||||
UtilModule,
|
||||
IonRefresher,
|
||||
IonRefresherContent,
|
||||
IonGrid,
|
||||
IonRow,
|
||||
IonCol,
|
||||
NewsSettingsFilterComponent,
|
||||
SkeletonNewsItemComponent,
|
||||
NewsItemComponent,
|
||||
TitleCasePipe,
|
||||
IonLabel,
|
||||
IonInfiniteScroll,
|
||||
IonInfiniteScrollContent,
|
||||
],
|
||||
})
|
||||
export class NewsPageComponent implements OnInit {
|
||||
/**
|
||||
|
||||
@@ -35,25 +35,27 @@
|
||||
<ion-grid>
|
||||
<ion-row>
|
||||
<ion-col size="12">
|
||||
@if (settings) {
|
||||
<stapps-news-settings-filter
|
||||
*ngIf="settings"
|
||||
[settings]="settings"
|
||||
(filtersChanged)="toggleFilter($event)"
|
||||
></stapps-news-settings-filter>
|
||||
}
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
</ion-grid>
|
||||
<div class="news-grid">
|
||||
<ng-container *ngIf="!news">
|
||||
<stapps-skeleton-news-item *ngFor="let skeleton of [1, 2, 3, 4, 5]"></stapps-skeleton-news-item>
|
||||
</ng-container>
|
||||
<ng-container *ngIf="news.length > 0">
|
||||
<stapps-news-item *ngFor="let item of news" [item]="item"></stapps-news-item>
|
||||
</ng-container>
|
||||
@if (!news) { @for (skeleton of [1, 2, 3, 4, 5]; track skeleton) {
|
||||
<stapps-skeleton-news-item></stapps-skeleton-news-item>
|
||||
} } @if (news.length > 0) { @for (item of news; track item) {
|
||||
<stapps-news-item [item]="item"></stapps-news-item>
|
||||
} }
|
||||
</div>
|
||||
<ion-label *ngIf="news.length === 0" class="centered-message-container">
|
||||
@if (news.length === 0) {
|
||||
<ion-label class="centered-message-container">
|
||||
{{ 'search.nothing_found' | translate | titlecase }}
|
||||
</ion-label>
|
||||
}
|
||||
<ion-infinite-scroll id="infinite-scroll" threshold="20%" (ionInfinite)="loadMore($event.target)">
|
||||
<ion-infinite-scroll-content loading-spinner="crescent"> </ion-infinite-scroll-content>
|
||||
</ion-infinite-scroll>
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
import {ChangeDetectionStrategy, Component} from '@angular/core';
|
||||
import {IdCardsProvider} from './id-cards.provider';
|
||||
import {SCIdCard} from '@openstapps/core';
|
||||
import {IonicModule} from '@ionic/angular';
|
||||
import {AsyncPipe, NgForOf, NgIf, TitleCasePipe} from '@angular/common';
|
||||
import {ThingTranslateModule} from '../../translation/thing-translate.module';
|
||||
import {UtilModule} from '../../util/util.module';
|
||||
@@ -23,6 +22,7 @@ import {FullScreenImageDirective} from '../../util/full-screen-image.directive';
|
||||
import {IdCardComponent} from './id-card.component';
|
||||
import {TranslateModule} from '@ngx-translate/core';
|
||||
import {Observable} from 'rxjs';
|
||||
import {SectionComponent} from '../../util/section.component';
|
||||
|
||||
@Component({
|
||||
selector: 'stapps-id-cards',
|
||||
@@ -32,7 +32,6 @@ import {Observable} from 'rxjs';
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
standalone: true,
|
||||
imports: [
|
||||
IonicModule,
|
||||
NgForOf,
|
||||
NgIf,
|
||||
AsyncPipe,
|
||||
@@ -42,6 +41,7 @@ import {Observable} from 'rxjs';
|
||||
IdCardComponent,
|
||||
TranslateModule,
|
||||
TitleCasePipe,
|
||||
SectionComponent,
|
||||
],
|
||||
})
|
||||
export class IdCardsComponent {
|
||||
|
||||
@@ -16,18 +16,30 @@ import {NgModule} from '@angular/core';
|
||||
import {CommonModule} from '@angular/common';
|
||||
import {FormsModule} from '@angular/forms';
|
||||
import {RouterModule, Routes} from '@angular/router';
|
||||
import {IonicModule} from '@ionic/angular';
|
||||
import {ProfilePageComponent} from './page/profile-page.component';
|
||||
import {TranslateModule} from '@ngx-translate/core';
|
||||
import {SwiperModule} from 'swiper/angular';
|
||||
import {UtilModule} from '../../util/util.module';
|
||||
import {IonIconModule} from '../../util/ion-icon/ion-icon.module';
|
||||
import {ProfilePageSectionComponent} from './page/profile-page-section.component';
|
||||
import {ThingTranslateModule} from '../../translation/thing-translate.module';
|
||||
import {DataModule} from '../data/data.module';
|
||||
import {MyCoursesComponent} from './page/my-courses.component';
|
||||
import {MomentModule} from 'ngx-moment';
|
||||
import {IdCardsComponent} from './id-cards.component';
|
||||
import {SectionComponent} from '../../util/section.component';
|
||||
import {
|
||||
IonAccordionGroup,
|
||||
IonHeader,
|
||||
IonAccordion,
|
||||
IonToolbar,
|
||||
IonButtons,
|
||||
IonItem,
|
||||
IonLabel,
|
||||
IonItemGroup,
|
||||
IonItemDivider,
|
||||
IonTitle,
|
||||
IonButton,
|
||||
} from '@ionic/angular/standalone';
|
||||
|
||||
const routes: Routes = [
|
||||
{
|
||||
@@ -41,8 +53,6 @@ const routes: Routes = [
|
||||
imports: [
|
||||
CommonModule,
|
||||
FormsModule,
|
||||
IonIconModule,
|
||||
IonicModule,
|
||||
RouterModule.forChild(routes),
|
||||
TranslateModule,
|
||||
SwiperModule,
|
||||
@@ -51,6 +61,18 @@ const routes: Routes = [
|
||||
DataModule,
|
||||
MomentModule,
|
||||
IdCardsComponent,
|
||||
SectionComponent,
|
||||
IonHeader,
|
||||
IonAccordion,
|
||||
IonAccordionGroup,
|
||||
IonToolbar,
|
||||
IonButtons,
|
||||
IonItem,
|
||||
IonLabel,
|
||||
IonItemGroup,
|
||||
IonItemDivider,
|
||||
IonTitle,
|
||||
IonButton,
|
||||
],
|
||||
})
|
||||
export class ProfilePageModule {}
|
||||
|
||||
@@ -21,7 +21,7 @@ import {ScheduleProvider} from '../../calendar/schedule.provider';
|
||||
import {CalendarComponent} from './components/calendar.component';
|
||||
import {CalendarService} from '../../calendar/calendar.service';
|
||||
import {InfiniteSwiperComponent} from './grid/infinite-swiper.component';
|
||||
import {IonContent} from '@ionic/angular';
|
||||
import {IonContent} from '@ionic/angular/standalone';
|
||||
import {takeUntilDestroyed} from '@angular/core/rxjs-interop';
|
||||
|
||||
/**
|
||||
|
||||
@@ -21,7 +21,7 @@ import {ScheduleProvider} from '../../../calendar/schedule.provider';
|
||||
import {ScheduleEvent, ScheduleResponsiveBreakpoint} from '../schema/schema';
|
||||
import {SwiperComponent} from 'swiper/angular';
|
||||
import {InfiniteSwiperComponent} from '../grid/infinite-swiper.component';
|
||||
import {IonContent, IonDatetime} from '@ionic/angular';
|
||||
import {IonContent, IonDatetime} from '@ionic/angular/standalone';
|
||||
import {CalendarService} from '../../../calendar/calendar.service';
|
||||
import {getScheduleCursorOffset} from '../grid/schedule-cursor-offset';
|
||||
import {takeUntilDestroyed} from '@angular/core/rxjs-interop';
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
import {AfterViewInit, Component, HostListener, Input, OnInit, ViewChild} from '@angular/core';
|
||||
import {Location} from '@angular/common';
|
||||
import {ActivatedRoute, Router} from '@angular/router';
|
||||
import {AnimationController, IonRouterOutlet} from '@ionic/angular';
|
||||
import {AnimationController, IonRouterOutlet} from '@ionic/angular/standalone';
|
||||
import {SharedAxisChoreographer} from '../../../animation/animation-choreographer';
|
||||
import {materialSharedAxisX} from '../../../animation/material-motion';
|
||||
import {ScheduleResponsiveBreakpoint} from './schema/schema';
|
||||
|
||||
@@ -21,7 +21,7 @@ import {SCISO8601Date, SCUuid} from '@openstapps/core';
|
||||
import {ScheduleEvent, ScheduleResponsiveBreakpoint} from './schema/schema';
|
||||
import {CalendarService} from '../../calendar/calendar.service';
|
||||
import {CalendarComponent} from './components/calendar.component';
|
||||
import {IonContent, IonDatetime} from '@ionic/angular';
|
||||
import {IonContent, IonDatetime} from '@ionic/angular/standalone';
|
||||
import {SwiperComponent} from 'swiper/angular';
|
||||
import {takeUntilDestroyed} from '@angular/core/rxjs-interop';
|
||||
|
||||
@@ -133,10 +133,13 @@ export class ScheduleViewComponent extends CalendarComponent implements OnInit,
|
||||
|
||||
for (const series of dateSeries.dates) {
|
||||
const weekDays = Object.keys(
|
||||
series.dates.reduce((accumulator, date) => {
|
||||
accumulator[moment(date).weekday()] = true;
|
||||
return accumulator;
|
||||
}, {} as Record<number, true>),
|
||||
series.dates.reduce(
|
||||
(accumulator, date) => {
|
||||
accumulator[moment(date).weekday()] = true;
|
||||
return accumulator;
|
||||
},
|
||||
{} as Record<number, true>,
|
||||
),
|
||||
);
|
||||
|
||||
for (const day of weekDays) {
|
||||
|
||||
@@ -16,7 +16,6 @@ import {CommonModule} from '@angular/common';
|
||||
import {NgModule} from '@angular/core';
|
||||
import {FormsModule} from '@angular/forms';
|
||||
import {RouterModule, Routes} from '@angular/router';
|
||||
import {IonicModule} from '@ionic/angular';
|
||||
import {TranslateModule} from '@ngx-translate/core';
|
||||
import {ScheduleCardComponent} from './page/grid/schedule-card.component';
|
||||
|
||||
@@ -37,6 +36,31 @@ import {InfiniteSwiperComponent} from './page/grid/infinite-swiper.component';
|
||||
import {CalendarComponent} from './page/components/calendar.component';
|
||||
import {IonIconModule} from '../../util/ion-icon/ion-icon.module';
|
||||
import {ChooseEventsPageComponent} from './page/choose-events-page.component';
|
||||
import {
|
||||
IonButton,
|
||||
IonContent,
|
||||
IonDatetime,
|
||||
IonPopover,
|
||||
IonList,
|
||||
IonItemGroup,
|
||||
IonItem,
|
||||
IonLabel,
|
||||
IonText,
|
||||
IonHeader,
|
||||
IonToolbar,
|
||||
IonButtons,
|
||||
IonTitle,
|
||||
IonSegment,
|
||||
IonSegmentButton,
|
||||
IonFab,
|
||||
IonRouterLink,
|
||||
IonFabButton,
|
||||
IonCard,
|
||||
IonCardHeader,
|
||||
IonCardContent,
|
||||
IonCardTitle,
|
||||
IonNote,
|
||||
} from '@ionic/angular/standalone';
|
||||
|
||||
const settingsRoutes: Routes = [
|
||||
{path: 'schedule', redirectTo: 'schedule/calendar/now'},
|
||||
@@ -69,7 +93,6 @@ const settingsRoutes: Routes = [
|
||||
CommonModule,
|
||||
DataModule,
|
||||
FormsModule,
|
||||
IonicModule.forRoot(),
|
||||
IonIconModule,
|
||||
MomentModule,
|
||||
RouterModule.forChild(settingsRoutes),
|
||||
@@ -77,6 +100,29 @@ const settingsRoutes: Routes = [
|
||||
TranslateModule.forChild(),
|
||||
UtilModule,
|
||||
ThingTranslateModule,
|
||||
IonButton,
|
||||
IonPopover,
|
||||
IonDatetime,
|
||||
IonContent,
|
||||
IonList,
|
||||
IonItemGroup,
|
||||
IonItem,
|
||||
IonLabel,
|
||||
IonText,
|
||||
IonHeader,
|
||||
IonToolbar,
|
||||
IonButtons,
|
||||
IonTitle,
|
||||
IonSegment,
|
||||
IonSegmentButton,
|
||||
IonFab,
|
||||
IonRouterLink,
|
||||
IonFabButton,
|
||||
IonCard,
|
||||
IonCardHeader,
|
||||
IonCardContent,
|
||||
IonCardTitle,
|
||||
IonNote,
|
||||
],
|
||||
providers: [ScheduleProvider, DataProvider, DateFormatPipe],
|
||||
})
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import {Component, Input} from '@angular/core';
|
||||
import {AlertController} from '@ionic/angular';
|
||||
import {AlertController} from '@ionic/angular/standalone';
|
||||
import {LangChangeEvent, TranslateService} from '@ngx-translate/core';
|
||||
import {SCLanguageCode, SCSetting, SCSettingValue, SCSettingValues} from '@openstapps/core';
|
||||
import {SettingsProvider} from '../settings.provider';
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
import {Component, OnInit} from '@angular/core';
|
||||
import {AddEventReviewModalComponent} from '../../calendar/add-event-review-modal.component';
|
||||
import {ModalController} from '@ionic/angular';
|
||||
import {ModalController} from '@ionic/angular/standalone';
|
||||
import {ScheduleProvider} from '../../calendar/schedule.provider';
|
||||
import {Directory, Encoding, Filesystem} from '@capacitor/filesystem';
|
||||
import {Share} from '@capacitor/share';
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import {ChangeDetectorRef, Component, OnInit} from '@angular/core';
|
||||
import {AlertController, ToastController} from '@ionic/angular';
|
||||
import {AlertController, ToastController} from '@ionic/angular/standalone';
|
||||
import {TranslateService} from '@ngx-translate/core';
|
||||
import {SCSettingMeta} from '@openstapps/core';
|
||||
import {SettingsCache, SettingsProvider} from '../settings.provider';
|
||||
|
||||
@@ -16,7 +16,6 @@ import {CommonModule} from '@angular/common';
|
||||
import {NgModule} from '@angular/core';
|
||||
import {FormsModule} from '@angular/forms';
|
||||
import {RouterModule, Routes} from '@angular/router';
|
||||
import {IonicModule} from '@ionic/angular';
|
||||
import {TranslateModule} from '@ngx-translate/core';
|
||||
|
||||
import {ThingTranslateModule} from '../../translation/thing-translate.module';
|
||||
@@ -34,6 +33,23 @@ import {CalendarModule} from '../calendar/calendar.module';
|
||||
import {BackgroundModule} from '../background/background.module';
|
||||
import {UtilModule} from '../../util/util.module';
|
||||
import {IonIconModule} from '../../util/ion-icon/ion-icon.module';
|
||||
import {
|
||||
IonButton,
|
||||
IonButtons,
|
||||
IonCard,
|
||||
IonCardContent,
|
||||
IonCardHeader,
|
||||
IonCardSubtitle,
|
||||
IonHeader,
|
||||
IonItem,
|
||||
IonItemDivider,
|
||||
IonItemGroup,
|
||||
IonLabel,
|
||||
IonList,
|
||||
IonTitle,
|
||||
IonToggle,
|
||||
IonToolbar,
|
||||
} from '@ionic/angular/standalone';
|
||||
|
||||
const settingsRoutes: Routes = [{path: 'settings', component: SettingsPageComponent}];
|
||||
|
||||
@@ -54,11 +70,25 @@ const settingsRoutes: Routes = [{path: 'settings', component: SettingsPageCompon
|
||||
CalendarModule,
|
||||
IonIconModule,
|
||||
BackgroundModule,
|
||||
IonicModule.forRoot(),
|
||||
TranslateModule.forChild(),
|
||||
ThingTranslateModule.forChild(),
|
||||
RouterModule.forChild(settingsRoutes),
|
||||
UtilModule,
|
||||
IonHeader,
|
||||
IonToolbar,
|
||||
IonButtons,
|
||||
IonTitle,
|
||||
IonList,
|
||||
IonButton,
|
||||
IonCard,
|
||||
IonCardHeader,
|
||||
IonCardSubtitle,
|
||||
IonCardContent,
|
||||
IonItemGroup,
|
||||
IonItemDivider,
|
||||
IonLabel,
|
||||
IonItem,
|
||||
IonToggle,
|
||||
],
|
||||
providers: [
|
||||
ScheduleSyncService,
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import {Platform} from '@ionic/angular';
|
||||
import {Platform} from '@ionic/angular/standalone';
|
||||
import {Browser as BrowserPlugin} from '@capacitor/browser';
|
||||
|
||||
export abstract class SimpleBrowser {
|
||||
|
||||
@@ -21,7 +21,7 @@ import {
|
||||
IonModal,
|
||||
IonRouterOutlet,
|
||||
ModalController,
|
||||
} from '@ionic/angular';
|
||||
} from '@ionic/angular/standalone';
|
||||
import {pendingChangesActionSheet, PendingChangesRole} from './pending-changes-action-sheet';
|
||||
import {TranslatePipe} from '@ngx-translate/core';
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ import {
|
||||
import {SCIcon} from './icon';
|
||||
import {IconReplacer} from './replace-util';
|
||||
import {TranslateService} from '@ngx-translate/core';
|
||||
import {IonBackButton} from '@ionic/angular';
|
||||
import {IonBackButton} from '@ionic/angular/standalone';
|
||||
import {TitleCasePipe} from '@angular/common';
|
||||
import {takeUntilDestroyed} from '@angular/core/rxjs-interop';
|
||||
|
||||
|
||||
8
frontend/app/src/app/util/ion-icon/ion-icon.component.ts
Normal file
8
frontend/app/src/app/util/ion-icon/ion-icon.component.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
import {Component} from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'ion-icon',
|
||||
standalone: true,
|
||||
template: `<span>TODO!</span>`,
|
||||
})
|
||||
export class IonIconComponent {}
|
||||
@@ -27,7 +27,7 @@ import {
|
||||
ViewContainerRef,
|
||||
} from '@angular/core';
|
||||
import {IconComponent} from './icon.component';
|
||||
import {IonIcon} from '@ionic/angular';
|
||||
import {IonIcon} from '@ionic/angular/standalone';
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
||||
const noop = () => {};
|
||||
@@ -84,6 +84,7 @@ export class IonIconDirective implements OnInit, OnDestroy, OnChanges {
|
||||
|
||||
inner.insertBefore(document.createElement('slot'), inner.firstChild);
|
||||
});
|
||||
console.log(this.element);
|
||||
this.mutationObserver.observe(this.element.nativeElement.shadowRoot, {
|
||||
childList: true,
|
||||
});
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
*/
|
||||
|
||||
import {ComponentRef, Directive, ElementRef, OnDestroy, OnInit, ViewContainerRef} from '@angular/core';
|
||||
import {IonIcon} from '@ionic/angular';
|
||||
import {IonIcon} from '@ionic/angular/standalone';
|
||||
import {IonIconDirective} from './ion-icon.directive';
|
||||
import {waitForElement} from './shadow-attacher';
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
*/
|
||||
|
||||
import {TranslatePipe} from '@ngx-translate/core';
|
||||
import {ActionSheetOptions, AlertOptions} from '@ionic/angular';
|
||||
import {ActionSheetOptions, AlertOptions} from '@ionic/angular/standalone';
|
||||
|
||||
export enum PendingChangesRole {
|
||||
SAVE = 'save',
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
*/
|
||||
|
||||
import {AfterViewInit, Directive, ElementRef, Input} from '@angular/core';
|
||||
import {IonSearchbar} from '@ionic/angular';
|
||||
import {IonSearchbar} from '@ionic/angular/standalone';
|
||||
|
||||
@Directive({
|
||||
selector: 'ion-searchbar[autofocus]',
|
||||
|
||||
@@ -18,6 +18,9 @@ import {fromMutationObserver} from './rxjs/mutation-observer';
|
||||
import {combineLatestWith, mergeMap, OperatorFunction, ReplaySubject, takeLast} from 'rxjs';
|
||||
import {distinctUntilChanged, filter, map, startWith} from 'rxjs/operators';
|
||||
import {fromIntersectionObserver} from './rxjs/from-intersection-observer';
|
||||
import {IonCol, IonRow, IonGrid, IonLabel, IonButton} from '@ionic/angular/standalone';
|
||||
import {AsyncPipe, NgIf, NgTemplateOutlet} from '@angular/common';
|
||||
import {RouterLink} from '@angular/router';
|
||||
|
||||
/**
|
||||
* Operator function that checks if a slide is visible
|
||||
@@ -41,7 +44,9 @@ function isSlideVisible(
|
||||
selector: 'stapps-section',
|
||||
templateUrl: 'section.html',
|
||||
styleUrls: ['section.scss'],
|
||||
standalone: true,
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
imports: [IonCol, IonRow, IonGrid, IonLabel, NgIf, RouterLink, NgTemplateOutlet, IonButton, AsyncPipe],
|
||||
})
|
||||
export class SectionComponent implements AfterContentInit {
|
||||
@Input() title = '';
|
||||
|
||||
@@ -22,27 +22,31 @@ import {LazyPipe} from './lazy.pipe';
|
||||
import {NextDateInListPipe} from './next-date-in-list.pipe';
|
||||
import {EditModalComponent} from './edit-modal.component';
|
||||
import {BrowserModule} from '@angular/platform-browser';
|
||||
import {IonicModule} from '@ionic/angular';
|
||||
import {TranslateModule} from '@ngx-translate/core';
|
||||
import {ElementSizeChangeDirective} from './element-size-change.directive';
|
||||
import {OpeningHoursComponent} from './opening-hours.component';
|
||||
import {ThingTranslateModule} from '../translation/thing-translate.module';
|
||||
import {SimpleSwiperComponent} from './simple-swiper.component';
|
||||
import {SearchbarAutofocusDirective} from './searchbar-autofocus.directive';
|
||||
import {SectionComponent} from './section.component';
|
||||
import {RouterModule} from '@angular/router';
|
||||
import {IonContentParallaxDirective} from './ion-content-parallax.directive';
|
||||
import {FormatDistanceToNowStrictPipeModule, FormatRelativeToNowPipeModule} from 'ngx-date-fns';
|
||||
import {IonButton, IonButtons, IonHeader, IonModal, IonTitle, IonToolbar} from '@ionic/angular/standalone';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
BrowserModule,
|
||||
IonicModule,
|
||||
TranslateModule,
|
||||
ThingTranslateModule.forChild(),
|
||||
RouterModule,
|
||||
FormatRelativeToNowPipeModule,
|
||||
FormatDistanceToNowStrictPipeModule,
|
||||
IonModal,
|
||||
IonHeader,
|
||||
IonToolbar,
|
||||
IonTitle,
|
||||
IonButtons,
|
||||
IonButton,
|
||||
],
|
||||
declarations: [
|
||||
IonContentParallaxDirective,
|
||||
@@ -51,7 +55,6 @@ import {FormatDistanceToNowStrictPipeModule, FormatRelativeToNowPipeModule} from
|
||||
DateIsThisPipe,
|
||||
NullishCoalescingPipe,
|
||||
LazyPipe,
|
||||
SectionComponent,
|
||||
DateFromIndexPipe,
|
||||
DaytimeKeyPipe,
|
||||
NextDateInListPipe,
|
||||
@@ -69,7 +72,6 @@ import {FormatDistanceToNowStrictPipeModule, FormatRelativeToNowPipeModule} from
|
||||
LazyPipe,
|
||||
DateFromIndexPipe,
|
||||
DaytimeKeyPipe,
|
||||
SectionComponent,
|
||||
NextDateInListPipe,
|
||||
EditModalComponent,
|
||||
OpeningHoursComponent,
|
||||
|
||||
1468
pnpm-lock.yaml
generated
1468
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user