feat: migrate to esm

This commit is contained in:
2023-03-16 01:58:13 +01:00
parent fd740b3091
commit 4df19e8c20
512 changed files with 3016 additions and 2222 deletions

View File

@@ -13,7 +13,7 @@
* this program. If not, see <https://www.gnu.org/licenses/>.
*/
import {chunk} from './chunk';
import {chunk} from './chunk.js';
describe('chunk', function () {
it('should chunk items in the correct sizes', function () {

View File

@@ -13,7 +13,7 @@
* this program. If not, see <https://www.gnu.org/licenses/>.
*/
import {differenceBy} from './difference';
import {differenceBy} from './difference.js';
describe('differenceBy', function () {
it('should return the difference of two arrays', function () {

View File

@@ -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 {get} from './get';
import {get} from './get.js';
describe('get', function () {
it('should get a simple path', function () {

View File

@@ -13,7 +13,7 @@
* this program. If not, see <https://www.gnu.org/licenses/>.
*/
import {groupBy, groupByStable, groupByProperty} from './group-by';
import {groupBy, groupByStable, groupByProperty} from './group-by.js';
describe('groupBy', () => {
it('should group an array by a key', () => {

View File

@@ -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 {keyBy} from './key-by';
import {keyBy} from './key-by.js';
describe('keyBy', function () {
it('should key objects', function () {

View File

@@ -13,7 +13,7 @@
* this program. If not, see <https://www.gnu.org/licenses/>.
*/
import {mapValues} from './map-values';
import {mapValues} from './map-values.js';
describe('map-values', () => {
it('should map values', () => {

View File

@@ -13,7 +13,7 @@
* this program. If not, see <https://www.gnu.org/licenses/>.
*/
import {minBy} from './min';
import {minBy} from './min.js';
describe('minBy', function () {
it('should pick the minimum value based on transform', function () {

View File

@@ -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 {omit} from './omit';
import {omit} from './omit.js';
describe('omit', function () {
it('should omit keys', function () {

View File

@@ -13,7 +13,7 @@
* this program. If not, see <https://www.gnu.org/licenses/>.
*/
import {partition} from './partition';
import {partition} from './partition.js';
describe('partition', function () {
it('should partition an array', function () {

View File

@@ -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 {pick} from './pick';
import {pick} from './pick.js';
describe('pick', function () {
it('should pick properties', function () {

View File

@@ -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 {shuffle} from './shuffle';
import {shuffle} from './shuffle.js';
describe('shuffle', function () {
it('should shuffle an array', function () {

View File

@@ -13,7 +13,7 @@
* this program. If not, see <https://www.gnu.org/licenses/>.
*/
import {stringSort, stringSortBy} from './string-sort';
import {stringSort, stringSortBy} from './string-sort.js';
describe('stringSort', () => {
it('should sort an array of strings', () => {

View File

@@ -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 {sum, sumBy} from './sum';
import {sum, sumBy} from './sum.js';
describe('sum', () => {
it('should return the sum of all elements in the collection', () => {

View File

@@ -13,7 +13,7 @@
* this program. If not, see <https://www.gnu.org/licenses/>.
*/
import {Tree, treeGroupBy} from './tree-group';
import {Tree, treeGroupBy} from './tree-group.js';
interface TestItem {
id: number;

View File

@@ -13,7 +13,7 @@
* this program. If not, see <https://www.gnu.org/licenses/>.
*/
import {uniqBy} from './uniq';
import {uniqBy} from './uniq.js';
describe('uniq', function () {
it('should return an array with unique values', function () {

View File

@@ -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 {zip} from './zip';
import {zip} from './zip.js';
describe('zip', function () {
it('should zip arrays together', function () {

View File

@@ -14,7 +14,7 @@
*/
import {SCSearchBooleanFilter, SCSearchFilter, SCSearchValueFilter, SCThing} from '@openstapps/core';
import {logger} from '../ts-logger';
import {logger} from '../ts-logger.js';
/**
* Checks if any filter applies to an SCThing

View File

@@ -34,8 +34,8 @@ import {
SCToDoPriority,
} from '@openstapps/core';
import {Observable, of} from 'rxjs';
import {checkFilter} from './filters';
import {sampleResources} from './resources/test-resources';
import {checkFilter} from './filters.js';
import {sampleResources} from './resources/test-resources.js';
/* eslint-disable */
const sampleMessages: SCMessage[] = [

View File

@@ -13,7 +13,7 @@
* this program. If not, see <https://www.gnu.org/licenses/>.
*/
import {SHARED_AXIS_DIRECTIONS} from './material-motion';
import {SHARED_AXIS_DIRECTIONS} from './material-motion.js';
/**
* /**

View File

@@ -29,7 +29,7 @@ import {SettingsProvider} from './modules/settings/settings.provider';
import {NGXLogger} from 'ngx-logger';
import {RouterTestingModule} from '@angular/router/testing';
import {ScheduleSyncService} from './modules/background/schedule/schedule-sync.service';
import {sampleAuthConfiguration} from './_helpers/data/sample-configuration';
import {sampleAuthConfiguration} from './_helpers/data/sample-configuration.js';
import {StorageProvider} from './modules/storage/storage.provider';
import {SimpleBrowser} from './util/browser.factory';

View File

@@ -18,7 +18,7 @@ import {App, URLOpenListenerEvent} from '@capacitor/app';
import {Platform, ToastController} from '@ionic/angular';
import {SettingsProvider} from './modules/settings/settings.provider';
import {AuthHelperService} from './modules/auth/auth-helper.service';
import {environment} from '../environments/environment';
import {environment} from '../environments/environment.js';
import {StatusBar, Style} from '@capacitor/status-bar';
import {Capacitor} from '@capacitor/core';
import {ScheduleSyncService} from './modules/background/schedule/schedule-sync.service';

View File

@@ -26,7 +26,7 @@ import 'moment/min/locales';
import {LoggerModule, NGXLogger, NgxLoggerLevel} from 'ngx-logger';
import SwiperCore, {FreeMode, Navigation} from 'swiper';
import {environment} from '../environments/environment';
import {environment} from '../environments/environment.js';
import {AppRoutingModule} from './app-routing.module';
import {AppComponent} from './app.component';
import {CatalogModule} from './modules/catalog/catalog.module';
@@ -44,7 +44,7 @@ import {SettingsProvider} from './modules/settings/settings.provider';
import {StorageModule} from './modules/storage/storage.module';
import {ThingTranslateModule} from './translation/thing-translate.module';
import {UtilModule} from './util/util.module';
import {initLogger} from './_helpers/ts-logger';
import {initLogger} from './_helpers/ts-logger.js';
import {BrowserAnimationsModule} from '@angular/platform-browser/animations';
import {AboutModule} from './modules/about/about.module';
import {FavoritesModule} from './modules/favorites/favorites.module';

View File

@@ -14,18 +14,18 @@
-->
<div [ngSwitch]="content.type">
<markdown [data]="'value' | translateSimple: content" *ngSwitchCase="'markdown'"></markdown>
<markdown [data]="'value' | translateSimple : content" *ngSwitchCase="'markdown'"></markdown>
<div *ngSwitchCase="'section'">
<ion-card *ngIf="content.card; else noCard">
<ion-card-header>
<ion-card-title>{{ 'title' | translateSimple: content }}</ion-card-title>
<ion-card-title>{{ 'title' | translateSimple : content }}</ion-card-title>
</ion-card-header>
<ion-card-content>
<about-page-content [content]="content.content"></about-page-content>
</ion-card-content>
</ion-card>
<ng-template #noCard>
<h2>{{ 'title' | translateSimple: content }}</h2>
<h2>{{ 'title' | translateSimple : content }}</h2>
<about-page-content [content]="content.content"></about-page-content>
</ng-template>
</div>
@@ -38,6 +38,6 @@
</ion-grid>
<ion-item *ngSwitchCase="'router link'" [routerLink]="content.link" fill="clear">
<ion-icon *ngIf="content.icon" [name]="content.icon" slot="start"></ion-icon>
<ion-label>{{ 'title' | translateSimple: content }}</ion-label>
<ion-label>{{ 'title' | translateSimple : content }}</ion-label>
</ion-item>
</div>

View File

@@ -18,7 +18,7 @@
<ion-buttons slot="start">
<ion-back-button></ion-back-button>
</ion-buttons>
<ion-title *ngIf="content; else titleLoading">{{ 'title' | translateSimple: content }}</ion-title>
<ion-title *ngIf="content; else titleLoading">{{ 'title' | translateSimple : content }}</ion-title>
<ng-template #titleLoading>
<ion-title><ion-skeleton-text animated="true"></ion-skeleton-text></ion-title>
</ng-template>

View File

@@ -18,8 +18,8 @@ import {ConfigProvider} from '../config/config.provider';
import {SCAssessment, SCUuid} from '@openstapps/core';
import {DefaultAuthService} from '../auth/default-auth.service';
import {HttpClient} from '@angular/common/http';
import {uniqBy} from '../../_helpers/collections/uniq';
import {keyBy} from '../../_helpers/collections/key-by';
import {uniqBy} from '../../_helpers/collections/uniq.js';
import {keyBy} from '../../_helpers/collections/key-by.js';
/**
*

View File

@@ -19,12 +19,12 @@ import {SCAssessment, SCCourseOfStudy} from '@openstapps/core';
import {ActivatedRoute, Router} from '@angular/router';
import {Subscription} from 'rxjs';
import {NGXLogger} from 'ngx-logger';
import {materialSharedAxisX} from '../../../animation/material-motion';
import {SharedAxisChoreographer} from '../../../animation/animation-choreographer';
import {materialSharedAxisX} from '../../../animation/material-motion.js';
import {SharedAxisChoreographer} from '../../../animation/animation-choreographer.js';
import {DataProvider, DataScope} from '../../data/data.provider';
import {DataRoutingService} from '../../data/data-routing.service';
import {groupBy} from '../../../_helpers/collections/group-by';
import {mapValues} from '../../../_helpers/collections/map-values';
import {groupBy} from '../../../_helpers/collections/group-by.js';
import {mapValues} from '../../../_helpers/collections/map-values.js';
@Component({
selector: 'app-assessments-page',

View File

@@ -36,7 +36,7 @@
class="ion-text-wrap"
*ngIf="assessments[key].courseOfStudy | async as course; else defaultLabel"
>
{{ 'name' | thingTranslate: course }} ({{ 'academicDegree' | thingTranslate: course }})
{{ 'name' | thingTranslate : course }} ({{ 'academicDegree' | thingTranslate : course }})
</ion-label>
</div>
<ng-template #defaultLabel>

View File

@@ -16,14 +16,14 @@
<ion-label [color]="passed ? undefined : 'danger'"
>{{
(_item.grade | isNumeric)
? (_item.grade | numberLocalized: 'minimumFractionDigits:1,maximumFractionDigits:1')
? (_item.grade | numberLocalized : 'minimumFractionDigits:1,maximumFractionDigits:1')
: ''
}}
{{ 'status' | thingTranslate: _item | titlecase }},
{{ 'attempt' | propertyNameTranslate: _item }}
{{ 'status' | thingTranslate : _item | titlecase }},
{{ 'attempt' | propertyNameTranslate : _item }}
{{ _item.attempt }}
</ion-label>
<ion-note>
{{ _item.ects }}
{{ 'ects' | propertyNameTranslate: _item }}</ion-note
{{ 'ects' | propertyNameTranslate : _item }}</ion-note
>

View File

@@ -16,9 +16,9 @@
<ion-card>
<ion-card-content>
<ion-note *ngIf="item.courseOfStudy as courseOfStudy">
{{ $any('courseOfStudy' | propertyNameTranslate: item) | titlecase }}:
{{ 'name' | thingTranslate: $any(courseOfStudy) }}
({{ 'academicDegree' | thingTranslate: $any(courseOfStudy) }})
{{ $any('courseOfStudy' | propertyNameTranslate : item) | titlecase }}:
{{ 'name' | thingTranslate : $any(courseOfStudy) }}
({{ 'academicDegree' | thingTranslate : $any(courseOfStudy) }})
</ion-note>
</ion-card-content>
</ion-card>

View File

@@ -15,7 +15,7 @@
<div class="container">
<h2 class="name">
{{ 'name' | thingTranslate: item }}
{{ 'name' | thingTranslate : item }}
{{ item.date ? (item.date | amDateFormat) : '' }}
</h2>
<assessment-base-info [item]="item"></assessment-base-info>

View File

@@ -14,7 +14,7 @@
*/
import {Injectable} from '@angular/core';
import {IPAIAAuthAction} from './paia/paia-auth-action';
import {IPAIAAuthAction} from './paia/paia-auth-action.js';
import {AuthActions, IAuthAction} from 'ionic-appauth';
import {TranslateService} from '@ngx-translate/core';
import {JSONPath} from 'jsonpath-plus';

View File

@@ -15,7 +15,7 @@
import {RouterModule, Routes} from '@angular/router';
import {NgModule} from '@angular/core';
import {authPaths} from './auth-paths';
import {authPaths} from './auth-paths.js';
import {AuthCallbackPageComponent} from './auth-callback/page/auth-callback-page.component';
import {PAIAAuthCallbackPageComponent} from './paia/auth-callback/page/paiaauth-callback-page.component';

View File

@@ -2,7 +2,7 @@ import {NgModule} from '@angular/core';
import {CommonModule} from '@angular/common';
import {Platform} from '@ionic/angular';
import {Requestor, StorageBackend} from '@openid/appauth';
import {storageFactory} from './factories';
import {storageFactory} from './factories.js';
import {Browser} from 'ionic-appauth';
import {CapacitorBrowser} from 'ionic-appauth/lib/capacitor';
import {httpFactory} from './factories/http.factory';

View File

@@ -17,8 +17,8 @@ import {AuthorizationServiceConfigurationJson} from '@openid/appauth';
import {IAuthConfig} from 'ionic-appauth';
import {SCAuthorizationProvider, SCAuthorizationProviderType} from '@openstapps/core';
import {Capacitor} from '@capacitor/core';
import {authPaths} from './auth-paths';
import {environment} from '../../../environments/environment';
import {authPaths} from './auth-paths.js';
import {environment} from '../../../environments/environment.js';
/**
* Get configuration of an OAuth2 client

View File

@@ -15,7 +15,7 @@
import {HttpClient} from '@angular/common/http';
import {Platform} from '@ionic/angular';
import {CapacitorRequestor} from '../capacitor-requestor';
import {CapacitorRequestor} from '../capacitor-requestor.js';
import {NgHttpService} from '../ng-http.service';
export const httpFactory = (platform: Platform, httpClient: HttpClient) => {

View File

@@ -15,7 +15,7 @@
import {Platform} from '@ionic/angular';
import {IonicStorage} from 'ionic-appauth/lib';
import {SafeCapacitorSecureStorage} from '../../storage/capacitor-secure-storage';
import {SafeCapacitorSecureStorage} from '../../storage/capacitor-secure-storage.js';
export const storageFactory = (platform: Platform) => {
return platform.is('capacitor') ? new SafeCapacitorSecureStorage() : new IonicStorage();

View File

@@ -25,9 +25,9 @@ import {
BUILT_IN_PARAMETERS,
} from '@openid/appauth';
import {Browser} from 'ionic-appauth';
import {PAIAAuthorizationNotifier} from './paia-authorization-notifier';
import {PAIAAuthorizationRequestResponse} from './authorization-request-response';
import {PAIAAuthorizationResponse, PAIAAuthorizationResponseJson} from './paia-authorization-response';
import {PAIAAuthorizationNotifier} from './paia-authorization-notifier.js';
import {PAIAAuthorizationRequestResponse} from './authorization-request-response.js';
import {PAIAAuthorizationResponse, PAIAAuthorizationResponseJson} from './paia-authorization-response.js';
/** key for authorization request. */
const authorizationRequestKey = (handle: string) => {

View File

@@ -14,7 +14,7 @@
*/
import {AuthorizationError, AuthorizationRequest} from '@openid/appauth';
import {PAIAAuthorizationResponse} from './paia-authorization-response';
import {PAIAAuthorizationResponse} from './paia-authorization-response.js';
/**
* Represents a structural type holding both authorization request and response.

View File

@@ -13,7 +13,7 @@
* this program. If not, see <https://www.gnu.org/licenses/>.
*/
import {PAIATokenResponse} from './paia-token-response';
import {PAIATokenResponse} from './paia-token-response.js';
import {AuthActionBuilder, IAuthAction} from 'ionic-appauth';
export interface IPAIAAuthAction extends IAuthAction {

View File

@@ -40,13 +40,13 @@ import {
UserInfoHandler,
} from 'ionic-appauth';
import {BehaviorSubject, Observable} from 'rxjs';
import {PAIATokenRequestHandler} from './token-request-handler';
import {PAIAAuthorizationRequestHandler} from './authorization-request-handler';
import {PAIATokenRequest, PAIATokenRequestJson} from './paia-token-request';
import {PAIAAuthorizationResponse} from './paia-authorization-response';
import {PAIAAuthorizationNotifier} from './paia-authorization-notifier';
import {PAIATokenResponse} from './paia-token-response';
import {IPAIAAuthAction, PAIAAuthActionBuilder} from './paia-auth-action';
import {PAIATokenRequestHandler} from './token-request-handler.js';
import {PAIAAuthorizationRequestHandler} from './authorization-request-handler.js';
import {PAIATokenRequest, PAIATokenRequestJson} from './paia-token-request.js';
import {PAIAAuthorizationResponse} from './paia-authorization-response.js';
import {PAIAAuthorizationNotifier} from './paia-authorization-notifier.js';
import {PAIATokenResponse} from './paia-token-response.js';
import {IPAIAAuthAction, PAIAAuthActionBuilder} from './paia-auth-action.js';
import {SCAuthorizationProvider} from '@openstapps/core';
import {ConfigProvider} from '../../config/config.provider';
import {getClientConfig, getEndpointsConfig} from '../auth.provider.methods';

View File

@@ -14,7 +14,7 @@
*/
import {AuthorizationError, AuthorizationRequest} from '@openid/appauth';
import {PAIAAuthorizationResponse} from './paia-authorization-response';
import {PAIAAuthorizationResponse} from './paia-authorization-response.js';
export type PAIAAuthorizationListener = (
request: AuthorizationRequest,

View File

@@ -12,9 +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 {PAIAAuthorizationListener} from './paia-authorization-listener';
import {PAIAAuthorizationListener} from './paia-authorization-listener.js';
import {AuthorizationError, AuthorizationRequest} from '@openid/appauth';
import {PAIAAuthorizationResponse} from './paia-authorization-response';
import {PAIAAuthorizationResponse} from './paia-authorization-response.js';
export class PAIAAuthorizationNotifier {
// eslint-disable-next-line unicorn/no-null

View File

@@ -13,7 +13,7 @@
* this program. If not, see <https://www.gnu.org/licenses/>.
*/
import {AuthorizationServiceConfiguration, Requestor} from '@openid/appauth';
import {PAIATokenResponse} from './paia-token-response';
import {PAIATokenResponse} from './paia-token-response.js';
export interface UserInfoHandler {
performUserInfoRequest(

View File

@@ -23,8 +23,8 @@ import {
AppAuthError,
TokenError,
} from '@openid/appauth';
import {PAIATokenRequest} from './paia-token-request';
import {PAIATokenResponse, PAIATokenResponseJson} from './paia-token-response';
import {PAIATokenRequest} from './paia-token-request.js';
import {PAIATokenResponse, PAIATokenResponseJson} from './paia-token-response.js';
export class PAIATokenRequestHandler {
constructor(

View File

@@ -27,15 +27,15 @@ import {DateFormatPipe, DurationPipe} from 'ngx-moment';
import {BackgroundFetch} from '@transistorsoft/capacitor-background-fetch';
import {StorageProvider} from '../../storage/storage.provider';
import {CalendarService} from '../../calendar/calendar.service';
import {toICal} from '../../calendar/ical/ical';
import {toICal} from '../../calendar/ical/ical.js';
import {Subscription} from 'rxjs';
import {ChangesOf} from './changes';
import {hashStringToInt} from './hash';
import {ChangesOf} from './changes.js';
import {hashStringToInt} from './hash.js';
import {
CALENDAR_NOTIFICATIONS_ENABLED_KEY,
CALENDAR_SYNC_ENABLED_KEY,
getCalendarSetting,
} from '../../settings/page/calendar-sync-settings-keys';
} from '../../settings/page/calendar-sync-settings-keys.js';
import {filter} from 'rxjs/operators';
import {Capacitor} from '@capacitor/core';

View File

@@ -20,7 +20,7 @@ import {
serializeICal,
toICal,
toICalUpdates,
} from './ical/ical';
} from './ical/ical.js';
import moment from 'moment';
import {Share} from '@capacitor/share';
import {Directory, Encoding, Filesystem} from '@capacitor/filesystem';
@@ -30,7 +30,7 @@ import {Dialog} from '@capacitor/dialog';
import {SCDateSeries} from '@openstapps/core';
import {ThingTranslateService} from '../../translation/thing-translate.service';
import {TranslateService} from '@ngx-translate/core';
import {NewShareData, NewShareNavigator} from './new-share';
import {NewShareData, NewShareNavigator} from './new-share.js';
interface ICalInfo {
title: string;

View File

@@ -35,7 +35,7 @@
><ng-container [ngTemplateOutlet]="date"></ng-container>
</s>
<ng-template #date>
{{ moment(iCalEvent.start) | amDateFormat: 'll, HH:mm' }}
{{ moment(iCalEvent.start) | amDateFormat : 'll, HH:mm' }}
</ng-template>
</ion-label>
<ion-note *ngIf="iCalEvent.rrule">

View File

@@ -15,10 +15,10 @@
import {Calendar} from '@awesome-cordova-plugins/calendar/ngx';
import {Injectable} from '@angular/core';
import {ICalEvent} from './ical/ical';
import {ICalEvent} from './ical/ical.js';
import moment, {duration, Moment, unitOfTime} from 'moment';
import {Dialog} from '@capacitor/dialog';
import {CalendarInfo} from './calendar-info';
import {CalendarInfo} from './calendar-info.js';
import {Subject} from 'rxjs';
import {ConfigProvider} from '../config/config.provider';

View File

@@ -13,10 +13,10 @@
* this program. If not, see <https://www.gnu.org/licenses/>.
*/
import {findRRules, RRule} from './ical';
import {findRRules, RRule} from './ical.js';
import moment, {unitOfTime} from 'moment';
import {SCISO8601Date} from '@openstapps/core';
import {shuffle} from '../../../_helpers/collections/shuffle';
import {shuffle} from '../../../_helpers/collections/shuffle.js';
/**
*

View File

@@ -21,8 +21,8 @@ import {
SCUuid,
} from '@openstapps/core';
import moment, {unitOfTime} from 'moment';
import {minBy} from '../../../_helpers/collections/min';
import {mapValues} from '../../../_helpers/collections/map-values';
import {minBy} from '../../../_helpers/collections/min.js';
import {mapValues} from '../../../_helpers/collections/map-values.js';
export interface ICalEvent {
name?: string;

View File

@@ -28,7 +28,7 @@ import {BehaviorSubject, Observable, Subscription} from 'rxjs';
import {DataProvider} from '../data/data.provider';
import {map} from 'rxjs/operators';
import {DateFormatPipe, DurationPipe} from 'ngx-moment';
import {pick} from '../../_helpers/collections/pick';
import {pick} from '../../_helpers/collections/pick.js';
/**
*

View File

@@ -21,9 +21,9 @@ import {
ConfigInitError,
SavedConfigNotAvailable,
WrongConfigVersionInStorage,
} from './errors';
} from './errors.js';
import {NGXLogger} from 'ngx-logger';
import {sampleIndexResponse} from '../../_helpers/data/sample-configuration';
import {sampleIndexResponse} from '../../_helpers/data/sample-configuration.js';
describe('ConfigProvider', () => {
let configProvider: ConfigProvider;

View File

@@ -17,7 +17,7 @@ import {Client} from '@openstapps/api/lib/client';
import {SCAppConfiguration, SCIndexResponse} from '@openstapps/core';
import {NGXLogger} from 'ngx-logger';
import packageJson from '../../../../package.json';
import {environment} from '../../../environments/environment';
import {environment} from '../../../environments/environment.js';
import {StAppsWebHttpClient} from '../data/stapps-web-http-client.provider';
import {StorageProvider} from '../storage/storage.provider';
import {
@@ -26,7 +26,7 @@ import {
ConfigValueNotAvailable,
SavedConfigNotAvailable,
WrongConfigVersionInStorage,
} from './errors';
} from './errors.js';
/**
* Key to store config in storage module

View File

@@ -13,7 +13,7 @@
* this program. If not, see <https://www.gnu.org/licenses/>.
*/
import {AppError} from '../../_helpers/errors';
import {AppError} from '../../_helpers/errors.js';
/**
* Error that is thrown when fetching from backend fails

View File

@@ -32,7 +32,7 @@
<ion-label>
{{
nextEvent?.event
? (nextEvent!.dates | nextDateInList | amDateFormat: 'll, HH:mm')
? (nextEvent!.dates | nextDateInList | amDateFormat : 'll, HH:mm')
: ('dashboard.schedule.noEvent' | translate)
}}
</ion-label>

View File

@@ -23,7 +23,7 @@ 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 {DashboardCollapse} from './dashboard-collapse';
import {DashboardCollapse} from './dashboard-collapse.js';
import {BreakpointObserver} from '@angular/cdk/layout';
// const scrollTimeline = new ScrollTimeline();

View File

@@ -16,7 +16,7 @@
<ng-container *ngIf="items | async as items">
<ng-container *ngIf="items.length !== 0; else nothingSelected">
<ng-container *ngFor="let item of items">
<stapps-section @fade [item]="item" [title]="'name' | thingTranslate: item">
<stapps-section @fade [item]="item" [title]="'name' | thingTranslate : item">
<ion-button slot="button-end" fill="clear" color="medium" (click)="favoritesService.delete(item)">
<ion-icon slot="icon-only" name="delete" size="24"></ion-icon>
</ion-button>

View File

@@ -23,7 +23,7 @@ import {CoordinatedSearchProvider} from '../../coordinated-search.provider';
import {
chipSkeletonTransition,
chipTransition,
} from '../../../../animation/skeleton-transitions/chip-loading-transition';
} from '../../../../animation/skeleton-transitions/chip-loading-transition.js';
import {AddEventStates, AddEventStatesMap} from './add-event-action-chip.config';
import {EditEventSelectionComponent} from '../edit-event-selection.component';
import {AddEventReviewModalComponent} from '../../../calendar/add-event-review-modal.component';

View File

@@ -13,7 +13,7 @@
* this program. If not, see <https://www.gnu.org/licenses/>.
*/
import {SCIcon} from '../../../../util/ion-icon/icon';
import {SCIcon} from '../../../../util/ion-icon/icon.js';
export enum AddEventStates {
ADDED_ALL,

View File

@@ -22,12 +22,12 @@ import {
} from '../../calendar/schedule.provider';
import {CalendarService} from '../../calendar/calendar.service';
import {ThingTranslatePipe} from '../../../translation/thing-translate.pipe';
import {groupBy, groupByProperty} from '../../../_helpers/collections/group-by';
import {mapValues} from '../../../_helpers/collections/map-values';
import {stringSortBy} from '../../../_helpers/collections/string-sort';
import {uniqBy} from '../../../_helpers/collections/uniq';
import {differenceBy} from '../../../_helpers/collections/difference';
import {SelectionValue, TreeNode} from './tree-node';
import {groupBy, groupByProperty} from '../../../_helpers/collections/group-by.js';
import {mapValues} from '../../../_helpers/collections/map-values.js';
import {stringSortBy} from '../../../_helpers/collections/string-sort.js';
import {uniqBy} from '../../../_helpers/collections/uniq.js';
import {differenceBy} from '../../../_helpers/collections/difference.js';
import {SelectionValue, TreeNode} from './tree-node.js';
/**
* Shows a horizontal list of action chips

View File

@@ -14,8 +14,8 @@
*/
import {TestBed} from '@angular/core/testing';
import {SCFacet, SCThing, SCFacetBucket} from '@openstapps/core';
import {sampleAggregations} from '../../_helpers/data/sample-configuration';
import {sampleThingsMap} from '../../_helpers/data/sample-things';
import {sampleAggregations} from '../../_helpers/data/sample-configuration.js';
import {sampleThingsMap} from '../../_helpers/data/sample-things.js';
import {DataFacetsProvider} from './data-facets.provider';
import {DataModule} from './data.module';
import {DataProvider} from './data.provider';

View File

@@ -14,7 +14,7 @@
*/
import {SCThingType} from '@openstapps/core';
import {SCIcon} from '../../util/ion-icon/icon';
import {SCIcon} from '../../util/ion-icon/icon.js';
export const DataIcons: Record<SCThingType, string> = {
'academic event': SCIcon`school`,

View File

@@ -26,7 +26,7 @@ import {
SCThingOriginType,
SCThingType,
} from '@openstapps/core';
import {sampleThingsMap} from '../../_helpers/data/sample-things';
import {sampleThingsMap} from '../../_helpers/data/sample-things.js';
import {StorageProvider} from '../storage/storage.provider';
import {DataModule} from './data.module';
import {DataProvider, DataScope} from './data.provider';

View File

@@ -32,10 +32,10 @@ import {
SCFeedbackResponse,
SCUuid,
} from '@openstapps/core';
import {environment} from '../../../environments/environment';
import {environment} from '../../../environments/environment.js';
import {StorageProvider} from '../storage/storage.provider';
import {StAppsWebHttpClient} from './stapps-web-http-client.provider';
import {chunk} from '../../_helpers/collections/chunk';
import {chunk} from '../../_helpers/collections/chunk.js';
export enum DataScope {
Local = 'local',
@@ -132,8 +132,7 @@ export class DataProvider {
const facet: SCFacet = {buckets: [], field: field};
for (const item of items) {
const value =
bucketMap.get(item.type) === undefined ? 1 : (bucketMap.get(item.type) as number) + 1;
const value = bucketMap.get(item.type) === undefined ? 1 : (bucketMap.get(item.type) as number) + 1;
bucketMap.set(item.type, value);
}

View File

@@ -15,7 +15,7 @@
<ion-header *ngIf="showModalHeader" translucent>
<ion-toolbar color="primary" mode="ios">
<ion-title>{{ 'name' | thingTranslate: item }}</ion-title>
<ion-title>{{ 'name' | thingTranslate : item }}</ion-title>
<ion-buttons slot="end">
<ion-button (click)="modalController.dismiss()">{{ 'app.ui.CLOSE' | translate }}</ion-button>
</ion-buttons>
@@ -93,8 +93,8 @@
</ion-item>
<stapps-simple-card
*ngIf="item.description"
[title]="$any('description' | propertyNameTranslate: item) | titlecase"
[content]="'description' | thingTranslate: item"
[title]="$any('description' | propertyNameTranslate : item) | titlecase"
[content]="'description' | thingTranslate : item"
></stapps-simple-card>
</ng-container>
</div>

View File

@@ -19,7 +19,7 @@ import {ComponentFixture, TestBed} from '@angular/core/testing';
import {ActivatedRoute, RouterModule} from '@angular/router';
import {IonTitle} from '@ionic/angular';
import {TranslateLoader, TranslateModule, TranslateService} from '@ngx-translate/core';
import {sampleThingsMap} from '../../../_helpers/data/sample-things';
import {sampleThingsMap} from '../../../_helpers/data/sample-things.js';
import {DataRoutingModule} from '../data-routing.module';
import {DataModule} from '../data.module';
import {DataProvider} from '../data.provider';

View File

@@ -129,10 +129,10 @@ export class DataDetailComponent implements ViewWillEnter {
this.item = item
? // eslint-disable-next-line unicorn/no-null
DataDetailComponent.isSCSavableThing(item)
? item.data
: item
// eslint-disable-next-line unicorn/no-null
: null;
? item.data
: item
: // eslint-disable-next-line unicorn/no-null
null;
} catch {
// eslint-disable-next-line unicorn/no-null
this.item = null;

View File

@@ -34,7 +34,7 @@
: 'calc(100vw - 120px)'
"
class="crumb-label"
>{{ 'name' | thingTranslate: $any(fragment) }}</ion-label
>{{ 'name' | thingTranslate : $any(fragment) }}</ion-label
>
</ion-breadcrumb>
</ion-breadcrumbs>

View File

@@ -14,14 +14,14 @@
-->
<span class="ion-hide-sm-up">
{{ text | slice: 0:size }}
{{ text | slice : 0 : size }}
<span *ngIf="text.length > size" class="ion-hide-sm-up"></span>
</span>
<span class="ion-hide-sm-down ion-hide-md-up">
{{ text | slice: 0:size * 2 }}
{{ text | slice : 0 : size * 2 }}
<span *ngIf="text.length > size * 2" class="ion-hide-sm-down ion-hide-md-up"></span>
</span>
<span class="ion-hide-md-down">
{{ text | slice: 0:size * 3 }}
{{ text | slice : 0 : size * 3 }}
<span *ngIf="text.length > size * 3" class="ion-hide-md-down"></span>
</span>

View File

@@ -22,7 +22,7 @@
<ion-col>
<ion-icon name="pin_drop"></ion-icon>
<a [routerLink]="['/data-detail', offer.inPlace.uid]">
{{ 'name' | thingTranslate: offer.inPlace }}
{{ 'name' | thingTranslate : offer.inPlace }}
</a>
</ion-col>
<ion-col>
@@ -31,7 +31,7 @@
>
{{
(offer.availabilityRange.gt ? offer.availabilityRange.gt : offer.availabilityRange.gte)
| amDateFormat: 'll'
| amDateFormat : 'll'
}}
</span>
</ion-col>
@@ -42,7 +42,7 @@
<ion-col *ngIf="group !== 'default'">{{ 'data.detail.offers.' + group | translate }} </ion-col>
<ion-col *ngIf="group !== 'default'" width-20 text-right>
<p>
{{ offer.prices[group] | currency: 'EUR':'symbol':undefined:'de' }}
{{ offer.prices[group] | currency : 'EUR' : 'symbol' : undefined : 'de' }}
</p>
</ion-col>
</ion-row>

View File

@@ -16,7 +16,7 @@
<div>
<ion-text *ngIf="price && !soldOut" style="white-space: nowrap">
<h2>
{{ price | currency: 'EUR':'symbol':undefined:'de' }}
{{ price | currency : 'EUR' : 'symbol' : undefined : 'de' }}
</h2>
</ion-text>
<ion-text *ngIf="soldOut" color="danger" class="sold-out" style="white-space: nowrap">

View File

@@ -21,15 +21,15 @@
<ion-card-content>
<p>
{{ 'data.types.origin.detail.CREATED' | translate | titlecase }}:
{{ origin.created | amDateFormat: 'll' }}
{{ origin.created | amDateFormat : 'll' }}
</p>
<p *ngIf="origin.updated">
{{ 'data.types.origin.detail.UPDATED' | translate | titlecase }}:
{{ origin.updated | amDateFormat: 'll' }}
{{ origin.updated | amDateFormat : 'll' }}
</p>
<p *ngIf="origin.modified">
{{ 'data.types.origin.detail.MODIFIED' | translate | titlecase }}:
{{ origin.modified | amDateFormat: 'll' }}
{{ origin.modified | amDateFormat : 'll' }}
</p>
<p *ngIf="origin.name">{{ 'data.types.origin.detail.MAINTAINER' | translate }}: {{ origin.name }}</p>
<p *ngIf="origin.maintainer">
@@ -47,11 +47,11 @@
<ion-card-content>
<p>
{{ 'data.types.origin.detail.INDEXED' | translate | titlecase }}:
{{ origin.indexed | amDateFormat: 'll' }}
{{ origin.indexed | amDateFormat : 'll' }}
</p>
<p *ngIf="origin.modified">
{{ 'data.types.origin.detail.MODIFIED' | translate | titlecase }}:
{{ origin.modified | amDateFormat: 'll' }}
{{ origin.modified | amDateFormat : 'll' }}
</p>
<p *ngIf="origin.name">{{ 'data.types.origin.detail.MAINTAINER' | translate }}: {{ origin.name }}</p>
<p *ngIf="origin.maintainer">

View File

@@ -29,7 +29,7 @@
<ng-container *ngIf="isThing(content[0]); then thingList; else textList"> </ng-container>
<ng-template #thingList>
<a [routerLink]="['/data-detail', thing.uid]" *ngFor="let thing of content">
<p>{{ 'name' | thingTranslate: thing }}</p>
<p>{{ 'name' | thingTranslate : thing }}</p>
</a>
</ng-template>
<ng-template #textList>

View File

@@ -17,11 +17,11 @@
<ion-card-title>
<h1>
<ng-container *ngIf="$any(item).honorificPrefix">{{
'honorificPrefix' | thingTranslate: item
'honorificPrefix' | thingTranslate : item
}}</ng-container>
{{ 'name' | thingTranslate: item }}
{{ 'name' | thingTranslate : item }}
<ng-container *ngIf="$any(item).honorificSuffix">{{
'honorificSuffix' | thingTranslate: item
'honorificSuffix' | thingTranslate : item
}}</ng-container>
</h1>
</ion-card-title>
@@ -32,7 +32,7 @@
</div>
<div *ngIf="item.description" class="description">
<div class="text-accordion" [style.-webkit-line-clamp]="descriptionLinesToDisplay" #accordionTextArea>
{{ 'description' | thingTranslate: item }}
{{ 'description' | thingTranslate : item }}
</div>
</div>
<ion-button

View File

@@ -15,7 +15,7 @@
import {Component, ElementRef, HostListener, Input, OnChanges, OnInit, ViewChild} from '@angular/core';
import {SCThings} from '@openstapps/core';
import {SCIcon} from '../../../util/ion-icon/icon';
import {SCIcon} from '../../../util/ion-icon/icon.js';
const AccordionButtonState = {
collapsed: SCIcon`expand_more`,

View File

@@ -14,11 +14,11 @@
-->
<h2>
{{ 'name' | thingTranslate: item }}
{{ 'name' | thingTranslate : item }}
</h2>
<p *ngIf="item.description">
<stapps-long-inline-text
[text]="'description' | thingTranslate: item"
[text]="'description' | thingTranslate : item"
[size]="80"
></stapps-long-inline-text>
</p>

View File

@@ -15,7 +15,7 @@
import {Directive, forwardRef, Input, Output, ViewChild} from '@angular/core';
import {CdkVirtualForOf, VIRTUAL_SCROLL_STRATEGY} from '@angular/cdk/scrolling';
import {ScThingListItemVirtualScrollStrategy} from './sc-thing-list-item-virtual-scroll-strategy';
import {ScThingListItemVirtualScrollStrategy} from './sc-thing-list-item-virtual-scroll-strategy.js';
/**
*

View File

@@ -34,7 +34,7 @@ import {DataRoutingService} from '../data-routing.service';
import {DataProvider} from '../data.provider';
import {PositionService} from '../../map/position.service';
import {ConfigProvider} from '../../config/config.provider';
import {searchPageSwitchAnimation} from './search-page-switch-animation';
import {searchPageSwitchAnimation} from './search-page-switch-animation.js';
/**
* SearchPageComponent queries things and shows list of things as search results and filter as context menu

View File

@@ -14,7 +14,7 @@
*/
import {Component, Input, TemplateRef} from '@angular/core';
import {SCThings, SCThingWithoutReferences, SCUuid} from '@openstapps/core';
import {Tree} from '../../../_helpers/collections/tree-group';
import {Tree} from '../../../_helpers/collections/tree-group.js';
import {DataListContext} from './data-list.component';
@Component({

View File

@@ -15,7 +15,7 @@
import {Component, ContentChild, Input, TemplateRef} from '@angular/core';
import {DataListContext} from './data-list.component';
import {SCThings, SCThingWithoutReferences, SCUuid} from '@openstapps/core';
import {Tree, treeGroupBy} from '../../../_helpers/collections/tree-group';
import {Tree, treeGroupBy} from '../../../_helpers/collections/tree-group.js';
@Component({
selector: 'tree-list',

View File

@@ -16,14 +16,14 @@
<ion-card *ngIf="item.sameAs">
<ion-card-header>{{ 'hebisSearch.detail.title' | translate | sentencecase }}</ion-card-header>
<ion-card-content>
<stapps-external-link [text]="'name' | thingTranslate: item" [link]="item.sameAs"></stapps-external-link>
<stapps-external-link [text]="'name' | thingTranslate : item" [link]="item.sameAs"></stapps-external-link>
</ion-card-content>
</ion-card>
<stapps-simple-card
*ngIf="!item.sameAs"
[title]="'name' | propertyNameTranslate: item | sentencecase"
[content]="'name' | thingTranslate: item"
[title]="'name' | propertyNameTranslate : item | sentencecase"
[content]="'name' | thingTranslate : item"
>
</stapps-simple-card>
@@ -35,14 +35,14 @@
<stapps-simple-card
*ngIf="item.sourceOrganization"
[title]="'sourceOrganization' | propertyNameTranslate: item | sentencecase"
[title]="'sourceOrganization' | propertyNameTranslate : item | sentencecase"
[content]="item.sourceOrganization"
></stapps-simple-card>
<ion-card *ngIf="item.authors && item.authors.length > 0">
<ion-card-header>{{ 'authors' | propertyNameTranslate: item | sentencecase }}</ion-card-header>
<ion-card-header>{{ 'authors' | propertyNameTranslate : item | sentencecase }}</ion-card-header>
<ion-card-content>
<ion-label *ngFor="let author of item.authors">{{ 'name' | thingTranslate: author }}</ion-label>
<ion-label *ngFor="let author of item.authors">{{ 'name' | thingTranslate : author }}</ion-label>
</ion-card-content>
</ion-card>
@@ -56,15 +56,15 @@
<stapps-simple-card
*ngIf="item.firstPublished && item.lastPublished"
[title]="'hebisSearch.detail.firstPublished' | translate | sentencecase"
[content]="[item.firstPublished, item.lastPublished] | join: ' - '"
[content]="[item.firstPublished, item.lastPublished] | join : ' - '"
>
</stapps-simple-card>
<ion-card *ngIf="item.publications">
<ion-card-header>{{ 'publications' | propertyNameTranslate: item | sentencecase }}</ion-card-header>
<ion-card-header>{{ 'publications' | propertyNameTranslate : item | sentencecase }}</ion-card-header>
<ion-card-content>
<p *ngFor="let publication of item.publications">
{{ publication.locations | join: ', ' }}
{{ publication.locations | join : ', ' }}
{{ publication.locations && publication.publisher ? ':' : '' }}
{{ publication.publisher }}
</p>
@@ -73,21 +73,21 @@
<stapps-simple-card
*ngIf="item.reference"
[title]="'reference' | propertyNameTranslate: item | sentencecase"
[title]="'reference' | propertyNameTranslate : item | sentencecase"
[content]="item.reference"
></stapps-simple-card>
<stapps-simple-card
*ngIf="item.isPartOf"
[title]="'isPartOf' | propertyNameTranslate: item | sentencecase"
[title]="'isPartOf' | propertyNameTranslate : item | sentencecase"
[content]="item.isPartOf.name"
></stapps-simple-card>
<ion-card *ngIf="item.categories">
<ion-card-header>{{ 'categories' | propertyNameTranslate: item | sentencecase }}</ion-card-header>
<ion-card-header>{{ 'categories' | propertyNameTranslate : item | sentencecase }}</ion-card-header>
<ion-card-content>
<ion-chip [color]="'primary'">
<ion-icon [name]="item.type | dataIcon"></ion-icon>
<ion-label>{{ 'categories' | thingTranslate: item }}</ion-label>
<ion-label>{{ 'categories' | thingTranslate : item }}</ion-label>
</ion-chip>
</ion-card-content>
</ion-card>

View File

@@ -17,22 +17,23 @@
<ion-row>
<ion-col>
<h2 class="name">
{{ 'name' | thingTranslate: item }}
{{ 'name' | thingTranslate : item }}
</h2>
<p>
<ng-container *ngFor="let author of item.authors"> {{ 'name' | thingTranslate: author }}</ng-container
<ng-container *ngFor="let author of item.authors">
{{ 'name' | thingTranslate : author }}</ng-container
><ng-container *ngIf="item.authors && item.authors && item.firstPublished">,&nbsp;</ng-container>
<ng-container *ngIf="item.firstPublished && !item.lastPublished; else dateRange">{{
item.firstPublished
}}</ng-container
><ng-template #dateRange
><ng-container *ngIf="item.firstPublished && item.lastPublished">{{
[item.firstPublished, item.lastPublished] | join: ' - '
[item.firstPublished, item.lastPublished] | join : ' - '
}}</ng-container></ng-template
>
</p>
<ion-note>
{{ 'categories' | thingTranslate: item }}
{{ 'categories' | thingTranslate : item }}
</ion-note>
</ion-col>
</ion-row>

View File

@@ -16,21 +16,21 @@
<ion-card *ngIf="item.sameAs">
<ion-card-header>{{ 'hebisSearch.detail.title' | translate | sentencecase }}</ion-card-header>
<ion-card-content>
<stapps-external-link [text]="'name' | thingTranslate: item" [link]="item.sameAs"></stapps-external-link>
<stapps-external-link [text]="'name' | thingTranslate : item" [link]="item.sameAs"></stapps-external-link>
</ion-card-content>
</ion-card>
<stapps-simple-card
*ngIf="!item.sameAs"
[title]="'name' | propertyNameTranslate: item | sentencecase"
[content]="'name' | thingTranslate: item"
[title]="'name' | propertyNameTranslate : item | sentencecase"
[content]="'name' | thingTranslate : item"
>
</stapps-simple-card>
<stapps-simple-card
*ngIf="item.edition"
[title]="'edition' | propertyNameTranslate: item | sentencecase"
[content]="'edition' | thingTranslate: item"
[title]="'edition' | propertyNameTranslate : item | sentencecase"
[content]="'edition' | thingTranslate : item"
>
</stapps-simple-card>
@@ -42,20 +42,20 @@
<stapps-simple-card
*ngIf="item.sourceOrganization"
[title]="'sourceOrganization' | propertyNameTranslate: item | sentencecase"
[title]="'sourceOrganization' | propertyNameTranslate : item | sentencecase"
[content]="item.sourceOrganization"
></stapps-simple-card>
<ion-card *ngIf="item.authors && item.authors.length > 0">
<ion-card-header>{{ 'authors' | propertyNameTranslate: item | sentencecase }}</ion-card-header>
<ion-card-header>{{ 'authors' | propertyNameTranslate : item | sentencecase }}</ion-card-header>
<ion-card-content>
<ion-label *ngFor="let author of item.authors">{{ 'name' | thingTranslate: author }}</ion-label>
<ion-label *ngFor="let author of item.authors">{{ 'name' | thingTranslate : author }}</ion-label>
</ion-card-content>
</ion-card>
<stapps-simple-card
*ngIf="item.ISBNs"
[title]="'ISBNs' | propertyNameTranslate: item | sentencecase"
[title]="'ISBNs' | propertyNameTranslate : item | sentencecase"
[content]="item.ISBNs"
>
</stapps-simple-card>
@@ -68,25 +68,25 @@
<stapps-simple-card
*ngIf="item.firstPublished && item.lastPublished"
[title]="'hebisSearch.detail.firstPublished' | translate | sentencecase"
[content]="[item.firstPublished, item.lastPublished] | join: ' - '"
[content]="[item.firstPublished, item.lastPublished] | join : ' - '"
>
</stapps-simple-card>
<ion-card *ngIf="item.publications">
<ion-card-header>{{ 'publications' | propertyNameTranslate: item | sentencecase }}</ion-card-header>
<ion-card-header>{{ 'publications' | propertyNameTranslate : item | sentencecase }}</ion-card-header>
<ion-card-content>
<p *ngFor="let publication of item.publications">
{{ publication.locations | join: ', ' }}
{{ publication.locations | join : ', ' }}
{{ publication.locations && publication.publisher ? ':' : '' }}
{{ publication.publisher }}
</p>
</ion-card-content>
</ion-card>
<ion-card *ngIf="item.categories">
<ion-card-header>{{ 'categories' | propertyNameTranslate: item | sentencecase }}</ion-card-header>
<ion-card-header>{{ 'categories' | propertyNameTranslate : item | sentencecase }}</ion-card-header>
<ion-card-content>
<ion-chip [color]="'primary'">
<ion-icon [name]="item.type | dataIcon"></ion-icon>
<ion-label>{{ 'categories' | thingTranslate: item }}</ion-label>
<ion-label>{{ 'categories' | thingTranslate : item }}</ion-label>
</ion-chip>
</ion-card-content>
</ion-card>

View File

@@ -17,22 +17,23 @@
<ion-row>
<ion-col>
<h2 class="name">
{{ 'name' | thingTranslate: item }}
{{ 'name' | thingTranslate : item }}
</h2>
<p>
<ng-container *ngFor="let author of item.authors"> {{ 'name' | thingTranslate: author }}</ng-container
<ng-container *ngFor="let author of item.authors">
{{ 'name' | thingTranslate : author }}</ng-container
><ng-container *ngIf="item.authors && item.authors && item.firstPublished">,&nbsp;</ng-container>
<ng-container *ngIf="item.firstPublished && !item.lastPublished; else dateRange">{{
item.firstPublished
}}</ng-container
><ng-template #dateRange
><ng-container *ngIf="item.firstPublished && item.lastPublished">{{
[item.firstPublished, item.lastPublished] | join: ' - '
[item.firstPublished, item.lastPublished] | join : ' - '
}}</ng-container></ng-template
>
</p>
<ion-note>
{{ 'categories' | thingTranslate: item }}
{{ 'categories' | thingTranslate : item }}
</ion-note>
</ion-col>
</ion-row>

View File

@@ -17,6 +17,6 @@
id="simple-data-list"
[items]="items"
[singleType]="true"
[listHeader]="'type' | thingTranslate: item | titlecase"
[listHeader]="'type' | thingTranslate : item | titlecase"
[emptyListMessage]="'catalog.detail.EMPTY_CATALOG' | translate"
></stapps-simple-data-list>

View File

@@ -3,7 +3,7 @@
<ion-col>
<div class="ion-text-wrap">
<ion-label class="title">
{{ 'name' | thingTranslate: item }}
{{ 'name' | thingTranslate : item }}
</ion-label>
<p *ngIf="item.academicTerm" class="title-sub">
{{ item.academicTerm.name }}

View File

@@ -14,19 +14,19 @@
-->
<ion-card>
<ion-card-header>
{{ 'event' | propertyNameTranslate: item | titlecase }}
{{ 'event' | propertyNameTranslate : item | titlecase }}
</ion-card-header>
<ion-card-content>
<a [routerLink]="['/data-detail', item.event.uid]">{{ 'name' | thingTranslate: item.event }}</a>
<a [routerLink]="['/data-detail', item.event.uid]">{{ 'name' | thingTranslate : item.event }}</a>
</ion-card-content>
</ion-card>
<ion-card *ngIf="item.inPlace">
<ion-card-header>
{{ 'inPlace' | propertyNameTranslate: item | titlecase }}
{{ 'inPlace' | propertyNameTranslate : item | titlecase }}
</ion-card-header>
<ion-card-content>
<ion-icon name="pin_drop"> </ion-icon>
<a [routerLink]="['/data-detail', item.inPlace.uid]">{{ 'name' | thingTranslate: item.inPlace }}</a>
<a [routerLink]="['/data-detail', item.inPlace.uid]">{{ 'name' | thingTranslate : item.inPlace }}</a>
<stapps-address-detail
*ngIf="item.inPlace.address"
[address]="item.inPlace.address"
@@ -34,29 +34,29 @@
</ion-card-content>
</ion-card>
<stapps-simple-card
title="{{ 'duration' | propertyNameTranslate: item | titlecase }}"
[content]="[item.duration | amDuration: 'minutes']"
title="{{ 'duration' | propertyNameTranslate : item | titlecase }}"
[content]="[item.duration | amDuration : 'minutes']"
></stapps-simple-card>
<stapps-simple-card
*ngIf="item.dates.length > 1; else single_event"
title="{{ 'dates' | propertyNameTranslate: item | titlecase }}"
title="{{ 'dates' | propertyNameTranslate : item | titlecase }}"
content="{{ 'data.chips.add_events.popover.AT' | translate | titlecase }} {{
item.dates[0] | amDateFormat: 'HH:mm ddd'
item.dates[0] | amDateFormat : 'HH:mm ddd'
}} {{ 'data.chips.add_events.popover.UNTIL' | translate }} {{
item.dates[item.dates.length - 1] | amDateFormat: 'll'
item.dates[item.dates.length - 1] | amDateFormat : 'll'
}}"
></stapps-simple-card>
<ng-template #single_event>
<stapps-simple-card
title="{{ 'dates' | propertyNameTranslate: item | titlecase }}"
title="{{ 'dates' | propertyNameTranslate : item | titlecase }}"
content="{{ 'data.chips.add_events.popover.AT' | translate | titlecase }} {{
item.dates[item.dates.length - 1] | amDateFormat: 'll, HH:mm'
item.dates[item.dates.length - 1] | amDateFormat : 'll, HH:mm'
}}"
></stapps-simple-card>
</ng-template>
<stapps-simple-card
*ngIf="item.performers"
[title]="'performers' | propertyNameTranslate: item.performers | titlecase"
[title]="'performers' | propertyNameTranslate : item.performers | titlecase"
[content]="item.performers"
></stapps-simple-card>
<stapps-offers-detail *ngIf="item.offers" [offers]="item.offers"></stapps-offers-detail>

View File

@@ -17,13 +17,13 @@
<ion-row>
<ion-col>
<div class="ion-text-wrap">
<ion-label class="title">{{ 'name' | thingTranslate: item }}</ion-label>
<ion-label class="title">{{ 'name' | thingTranslate : item }}</ion-label>
<p>
<ion-icon name="calendar_today"></ion-icon>
<span *ngIf="item.dates[0] && item.dates[item.dates.length - 1]">
<span *ngIf="item.repeatFrequency">
{{ item.repeatFrequency | durationLocalized: true | sentencecase }},
{{ item.dates[0] | dateFormat: 'weekday:long' }}
{{ item.repeatFrequency | durationLocalized : true | sentencecase }},
{{ item.dates[0] | dateFormat : 'weekday:long' }}
</span>
<span>
({{ item.dates[0] | dateFormat }} - {{ item.dates[item.dates.length - 1] | dateFormat }})
@@ -31,7 +31,7 @@
</span>
</p>
<ion-note *ngIf="item.event.type === 'academic event'">{{
'categories' | thingTranslate: item.event | join: ', '
'categories' | thingTranslate : item.event | join : ', '
}}</ion-note>
</div>
</ion-col>

View File

@@ -15,8 +15,8 @@
<stapps-simple-card
*ngIf="item.type === 'academic event' && item.categories"
[title]="'categories' | propertyNameTranslate: item | titlecase"
[content]="'categories' | thingTranslate: item"
[title]="'categories' | propertyNameTranslate : item | titlecase"
[content]="'categories' | thingTranslate : item"
>
</stapps-simple-card>
@@ -25,22 +25,22 @@
<stapps-simple-card
*ngIf="item.performers"
[title]="'performers' | propertyNameTranslate: item | titlecase"
[title]="'performers' | propertyNameTranslate : item | titlecase"
[content]="item.performers"
></stapps-simple-card>
<stapps-simple-card
*ngIf="item.organizers"
[title]="'organizers' | propertyNameTranslate: item | titlecase"
[title]="'organizers' | propertyNameTranslate : item | titlecase"
[content]="item.organizers"
></stapps-simple-card>
<stapps-simple-card
*ngIf="item.type === 'academic event' && item.majors | titlecase"
[title]="'majors' | propertyNameTranslate: item"
[title]="'majors' | propertyNameTranslate : item"
[content]="item.majors"
></stapps-simple-card>
<ion-card *ngIf="item.catalogs">
<ion-card-header>{{
$any('superCatalogs' | propertyNameTranslate: 'catalog') | titlecase
$any('superCatalogs' | propertyNameTranslate : 'catalog') | titlecase
}}</ion-card-header>
<ion-card-content>
<event-route-path
@@ -49,7 +49,7 @@
[itemsAfterCollapse]="1"
[itemsBeforeCollapse]="0"
[items]="[undefined, item]"
[more]="item.uid | lazyThing: 'superCatalogs'"
[more]="item.uid | lazyThing : 'superCatalogs'"
>
</event-route-path>
</ion-card-content>

View File

@@ -21,7 +21,7 @@
>
<ion-breadcrumb *ngFor="let item of items">
<ion-label class="crumb-label" *ngIf="item" [routerLink]="['/data-detail', item.uid]">{{
'name' | thingTranslate: $any(item)
'name' | thingTranslate : $any(item)
}}</ion-label>
</ion-breadcrumb>
</ion-breadcrumbs>
@@ -55,6 +55,6 @@
<ng-template #popoverItem let-item="item">
<ion-item *ngIf="item" [routerLink]="['/data-detail', item.uid]" (click)="popover.dismiss()">
{{ 'name' | thingTranslate: $any(item) }}
{{ 'name' | thingTranslate : $any(item) }}
</ion-item>
</ng-template>

View File

@@ -18,16 +18,16 @@
<ion-col>
<div class="ion-text-wrap">
<ion-label class="title">
{{ 'name' | thingTranslate: item }}:
{{ 'name' | thingTranslate: item.data }}
{{ 'name' | thingTranslate : item }}:
{{ 'name' | thingTranslate : item.data }}
</ion-label>
<p *ngIf="item.data.description" class="title-sub">
<stapps-long-inline-text
[text]="'description' | thingTranslate: item.data"
[text]="'description' | thingTranslate : item.data"
[size]="80"
></stapps-long-inline-text>
</p>
<ion-note>{{ 'type' | thingTranslate: item }} ({{ 'type' | thingTranslate: item.data }})</ion-note>
<ion-note>{{ 'type' | thingTranslate : item }} ({{ 'type' | thingTranslate : item.data }})</ion-note>
</div>
</ion-col>
<ion-col width-20 text-right>

View File

@@ -15,26 +15,26 @@
<div *ngIf="!item.categories.includes('news'); else news">
<stapps-simple-card
[title]="'messageBody' | propertyNameTranslate: item | titlecase"
[content]="'messageBody' | thingTranslate: item"
[title]="'messageBody' | propertyNameTranslate : item | titlecase"
[content]="'messageBody' | thingTranslate : item"
></stapps-simple-card>
<stapps-simple-card
[title]="'audiences' | propertyNameTranslate: item | titlecase"
[content]="'audiences' | thingTranslate: item"
[title]="'audiences' | propertyNameTranslate : item | titlecase"
[content]="'audiences' | thingTranslate : item"
></stapps-simple-card>
<stapps-simple-card
*ngIf="item.datePublished"
[title]="'datePublished' | propertyNameTranslate: item | titlecase"
[content]="item.datePublished | amDateFormat: 'll'"
[title]="'datePublished' | propertyNameTranslate : item | titlecase"
[content]="item.datePublished | amDateFormat : 'll'"
></stapps-simple-card>
<stapps-simple-card
*ngIf="item.authors"
[title]="'authors' | propertyNameTranslate: item | titlecase"
[title]="'authors' | propertyNameTranslate : item | titlecase"
[content]="item.authors"
></stapps-simple-card>
<stapps-simple-card
*ngIf="item.publishers"
[title]="'publishers' | propertyNameTranslate: item | titlecase"
[title]="'publishers' | propertyNameTranslate : item | titlecase"
[content]="item.publishers"
></stapps-simple-card>
</div>
@@ -55,7 +55,7 @@
<stapps-simple-card content="{{ item.messageBody }}"></stapps-simple-card>
<ion-card *ngIf="item.sameAs">
<ion-card-header>
{{ 'sameAs' | propertyNameTranslate: item | titlecase }}
{{ 'sameAs' | propertyNameTranslate : item | titlecase }}
</ion-card-header>
<ion-card-content>
<stapps-external-link [link]="item.sameAs" [text]="item.name"></stapps-external-link>

View File

@@ -17,11 +17,11 @@
<ion-row>
<ion-col>
<div class="ion-text-wrap">
<ion-label class="title">{{ 'name' | thingTranslate: item }}</ion-label>
<ion-label class="title">{{ 'name' | thingTranslate : item }}</ion-label>
<p *ngIf="item.messageBody">
<stapps-long-inline-text [text]="item.messageBody" [size]="80"></stapps-long-inline-text>
</p>
<ion-note>{{ 'type' | thingTranslate: item }}</ion-note>
<ion-note>{{ 'type' | thingTranslate : item }}</ion-note>
</div>
</ion-col>
</ion-row>

View File

@@ -15,11 +15,11 @@
<ion-card *ngIf="item.inPlace">
<ion-card-header>
{{ 'inPlace' | propertyNameTranslate: item | titlecase }}
{{ 'inPlace' | propertyNameTranslate : item | titlecase }}
</ion-card-header>
<ion-card-content>
<ion-icon name="pin_drop"></ion-icon>
<a [routerLink]="['/data-detail', item.inPlace.uid]">{{ 'name' | thingTranslate: item.inPlace }}</a>
<a [routerLink]="['/data-detail', item.inPlace.uid]">{{ 'name' | thingTranslate : item.inPlace }}</a>
<stapps-address-detail
*ngIf="item.inPlace.address"
[address]="item.inPlace.address"

View File

@@ -17,17 +17,17 @@
<ion-row>
<ion-col>
<div class="ion-text-wrap">
<ion-label class="title">{{ 'name' | thingTranslate: item }}</ion-label>
<ion-label class="title">{{ 'name' | thingTranslate : item }}</ion-label>
<p *ngIf="item.description" class="title-sub">
{{ 'description' | thingTranslate: item }}
{{ 'description' | thingTranslate : item }}
</p>
<ion-note>{{ 'type' | thingTranslate: item }}</ion-note>
<ion-note>{{ 'type' | thingTranslate : item }}</ion-note>
</div>
</ion-col>
<ion-col width-20 text-right *ngIf="item.inPlace">
<span *ngIf="item.inPlace">
<ion-icon name="pin_drop"></ion-icon>
{{ 'name' | thingTranslate: item.inPlace }}
{{ 'name' | thingTranslate : item.inPlace }}
</span>
</ion-col>
</ion-row>

View File

@@ -16,14 +16,14 @@
<ion-card *ngIf="item.sameAs">
<ion-card-header>{{ 'hebisSearch.detail.title' | translate | sentencecase }}</ion-card-header>
<ion-card-content>
<stapps-external-link [text]="'name' | thingTranslate: item" [link]="item.sameAs"></stapps-external-link>
<stapps-external-link [text]="'name' | thingTranslate : item" [link]="item.sameAs"></stapps-external-link>
</ion-card-content>
</ion-card>
<stapps-simple-card
*ngIf="!item.sameAs"
[title]="'name' | propertyNameTranslate: item | sentencecase"
[content]="'name' | thingTranslate: item"
[title]="'name' | propertyNameTranslate : item | sentencecase"
[content]="'name' | thingTranslate : item"
>
</stapps-simple-card>
@@ -35,14 +35,14 @@
<stapps-simple-card
*ngIf="item.sourceOrganization"
[title]="'sourceOrganization' | propertyNameTranslate: item | sentencecase"
[title]="'sourceOrganization' | propertyNameTranslate : item | sentencecase"
[content]="item.sourceOrganization"
></stapps-simple-card>
<ion-card *ngIf="item.authors && item.authors.length > 0">
<ion-card-header>{{ 'authors' | propertyNameTranslate: item | sentencecase }}</ion-card-header>
<ion-card-header>{{ 'authors' | propertyNameTranslate : item | sentencecase }}</ion-card-header>
<ion-card-content>
<ion-label *ngFor="let author of item.authors">{{ 'name' | thingTranslate: author }}</ion-label>
<ion-label *ngFor="let author of item.authors">{{ 'name' | thingTranslate : author }}</ion-label>
</ion-card-content>
</ion-card>
@@ -55,31 +55,31 @@
<stapps-simple-card
*ngIf="item.firstPublished && item.lastPublished"
[title]="'hebisSearch.detail.firstPublished' | translate | sentencecase"
[content]="[item.firstPublished, item.lastPublished] | join: ' - '"
[content]="[item.firstPublished, item.lastPublished] | join : ' - '"
>
</stapps-simple-card>
<ion-card *ngIf="item.publications">
<ion-card-header>{{ 'publications' | propertyNameTranslate: item | sentencecase }}</ion-card-header>
<ion-card-header>{{ 'publications' | propertyNameTranslate : item | sentencecase }}</ion-card-header>
<ion-card-content>
<p *ngFor="let publication of item.publications">
{{ publication.locations | join: ', ' }}
{{ publication.locations | join : ', ' }}
{{ publication.locations && publication.publisher ? ':' : '' }}
{{ publication.publisher }}
</p>
</ion-card-content>
</ion-card>
<ion-card *ngIf="item.categories">
<ion-card-header>{{ 'categories' | propertyNameTranslate: item | sentencecase }}</ion-card-header>
<ion-card-header>{{ 'categories' | propertyNameTranslate : item | sentencecase }}</ion-card-header>
<ion-card-content>
<ion-chip [color]="'primary'">
<ion-icon [name]="item.type | dataIcon"></ion-icon>
<ion-label>{{ 'categories' | thingTranslate: item }}</ion-label>
<ion-label>{{ 'categories' | thingTranslate : item }}</ion-label>
</ion-chip>
</ion-card-content>
</ion-card>
<stapps-simple-card
*ngIf="item.ISSNs"
[title]="'ISSNs' | propertyNameTranslate: item | sentencecase"
[content]="item.ISSNs | join: ', '"
[title]="'ISSNs' | propertyNameTranslate : item | sentencecase"
[content]="item.ISSNs | join : ', '"
>
</stapps-simple-card>

View File

@@ -17,22 +17,23 @@
<ion-row>
<ion-col>
<h2 class="name">
{{ 'name' | thingTranslate: item }}
{{ 'name' | thingTranslate : item }}
</h2>
<p>
<ng-container *ngFor="let author of item.authors"> {{ 'name' | thingTranslate: author }}</ng-container
<ng-container *ngFor="let author of item.authors">
{{ 'name' | thingTranslate : author }}</ng-container
><ng-container *ngIf="item.authors && item.authors && item.firstPublished">,&nbsp;</ng-container>
<ng-container *ngIf="item.firstPublished && !item.lastPublished; else dateRange">{{
item.firstPublished
}}</ng-container
><ng-template #dateRange
><ng-container *ngIf="item.firstPublished && item.lastPublished">{{
[item.firstPublished, item.lastPublished] | join: ' - '
[item.firstPublished, item.lastPublished] | join : ' - '
}}</ng-container></ng-template
>
</p>
<ion-note>
{{ 'categories' | thingTranslate: item }}
{{ 'categories' | thingTranslate : item }}
</ion-note>
</ion-col>
</ion-row>

View File

@@ -17,31 +17,31 @@
<ion-card *ngFor="let contactPoint of contactPoints; let i = index">
<ion-card-header>
<ng-container *ngIf="contactPoints.length > 1">{{ i + 1 }}.</ng-container>
{{ 'type' | thingTranslate: contactPoint | titlecase }}
{{ 'type' | thingTranslate : contactPoint | titlecase }}
</ion-card-header>
<ion-card-content>
<p *ngIf="contactPoint.telephone">
{{ 'telephone' | propertyNameTranslate: contactPoint | titlecase }}:
{{ 'telephone' | propertyNameTranslate : contactPoint | titlecase }}:
<a [href]="'tel:' + contactPoint.telephone">{{ contactPoint.telephone }}</a>
</p>
<p *ngIf="contactPoint.email">
{{ 'email' | propertyNameTranslate: contactPoint | titlecase }}:
{{ 'email' | propertyNameTranslate : contactPoint | titlecase }}:
<a [href]="'mailto:' + contactPoint.email">{{ contactPoint.email }}</a>
</p>
<p *ngIf="contactPoint.faxNumber">
{{ 'faxNumber' | propertyNameTranslate: contactPoint | titlecase }}:
{{ 'faxNumber' | propertyNameTranslate : contactPoint | titlecase }}:
{{ contactPoint.faxNumber }}
</p>
<p *ngIf="contactPoint.officeHours">
{{ 'officeHours' | propertyNameTranslate: contactPoint | titlecase }}:
{{ 'officeHours' | propertyNameTranslate : contactPoint | titlecase }}:
{{ contactPoint.officeHours }}
</p>
<p *ngIf="contactPoint.url">
{{ 'url' | propertyNameTranslate: contactPoint | titlecase }}:
{{ 'url' | propertyNameTranslate : contactPoint | titlecase }}:
<a [href]="contactPoint.url">{{ contactPoint.url }}</a>
</p>
<p *ngIf="contactPoint.areaServed">
{{ 'areaServed' | propertyNameTranslate: contactPoint | titlecase }}:
{{ 'areaServed' | propertyNameTranslate : contactPoint | titlecase }}:
<a [routerLink]="['/data-detail', contactPoint.areaServed.uid]">{{ contactPoint.areaServed.name }}</a>
</p>
</ion-card-content>
@@ -49,6 +49,6 @@
</ng-container>
<stapps-simple-card
*ngIf="item.jobTitles?.length > 0"
[title]="'jobTitles' | propertyNameTranslate: item | titlecase"
[title]="'jobTitles' | propertyNameTranslate : item | titlecase"
[content]="item.jobTitles"
></stapps-simple-card>

View File

@@ -18,7 +18,7 @@
<ion-col>
<div class="ion-text-wrap">
<ion-label class="title">
{{ 'name' | thingTranslate: item }}
{{ 'name' | thingTranslate : item }}
<span *ngIf="item.honorificPrefix">, {{ item.honorificPrefix }}</span>
</ion-label>
<p *ngIf="item.telephone || item.email">

View File

@@ -17,7 +17,7 @@ import moment, {Moment} from 'moment';
import {AfterViewInit, Component, Input, OnDestroy} from '@angular/core';
import {SCDish, SCISO8601Date, SCPlace} from '@openstapps/core';
import {PlaceMensaService} from './place-mensa-service';
import {PlaceMensaService} from './place-mensa-service.js';
import {Router} from '@angular/router';
import {Subscription} from 'rxjs';
import {IonRouterOutlet} from '@ionic/angular';

Some files were not shown because too many files have changed in this diff Show More