geonetwork-ui 2.3.0-dev.6083baae → 2.3.0-dev.b46332e6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2022/index.mjs +1 -2
- package/esm2022/libs/feature/editor/src/lib/+state/editor.facade.mjs +2 -6
- package/esm2022/libs/feature/map/src/lib/add-layer-from-file/add-layer-from-file.component.mjs +3 -3
- package/esm2022/libs/feature/search/src/lib/results-table/results-table.component.mjs +3 -3
- package/esm2022/libs/ui/catalog/src/lib/organisation-preview/organisation-preview.component.mjs +3 -3
- package/esm2022/libs/ui/elements/src/index.mjs +1 -2
- package/esm2022/libs/ui/elements/src/lib/image-overlay-preview/image-overlay-preview.component.mjs +3 -3
- package/esm2022/libs/ui/elements/src/lib/record-api-form/record-api-form.component.mjs +3 -3
- package/esm2022/translations/de.json +0 -8
- package/esm2022/translations/en.json +0 -8
- package/esm2022/translations/es.json +0 -8
- package/esm2022/translations/fr.json +0 -8
- package/esm2022/translations/it.json +0 -8
- package/esm2022/translations/nl.json +0 -8
- package/esm2022/translations/pt.json +0 -8
- package/fesm2022/geonetwork-ui.mjs +13 -181
- package/fesm2022/geonetwork-ui.mjs.map +1 -1
- package/index.d.ts +0 -1
- package/index.d.ts.map +1 -1
- package/index.ts +0 -1
- package/libs/feature/editor/src/lib/+state/editor.facade.d.ts +5 -8
- package/libs/feature/editor/src/lib/+state/editor.facade.d.ts.map +1 -1
- package/libs/ui/elements/src/index.d.ts +0 -1
- package/libs/ui/elements/src/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/libs/feature/editor/src/lib/+state/editor.facade.ts +1 -8
- package/src/libs/feature/map/src/lib/add-layer-from-file/add-layer-from-file.component.html +1 -1
- package/src/libs/feature/search/src/lib/results-table/results-table.component.html +3 -3
- package/src/libs/ui/catalog/src/lib/organisation-preview/organisation-preview.component.html +5 -5
- package/src/libs/ui/elements/src/index.ts +0 -1
- package/src/libs/ui/elements/src/lib/image-overlay-preview/image-overlay-preview.component.html +1 -1
- package/src/libs/ui/elements/src/lib/record-api-form/record-api-form.component.html +1 -1
- package/tailwind.base.css +0 -29
- package/translations/de.json +0 -8
- package/translations/en.json +0 -8
- package/translations/es.json +0 -8
- package/translations/fr.json +0 -8
- package/translations/it.json +0 -8
- package/translations/nl.json +0 -8
- package/translations/pt.json +0 -8
- package/translations/sk.json +0 -8
- package/esm2022/libs/feature/notifications/src/index.mjs +0 -4
- package/esm2022/libs/feature/notifications/src/lib/feature-notifications.module.mjs +0 -18
- package/esm2022/libs/feature/notifications/src/lib/notification.model.mjs +0 -2
- package/esm2022/libs/feature/notifications/src/lib/notifications-container/notifications-container.component.mjs +0 -49
- package/esm2022/libs/feature/notifications/src/lib/notifications.service.mjs +0 -29
- package/esm2022/libs/ui/elements/src/lib/notification/notification.component.mjs +0 -34
- package/libs/feature/notifications/src/index.d.ts +0 -4
- package/libs/feature/notifications/src/index.d.ts.map +0 -1
- package/libs/feature/notifications/src/lib/feature-notifications.module.d.ts +0 -7
- package/libs/feature/notifications/src/lib/feature-notifications.module.d.ts.map +0 -1
- package/libs/feature/notifications/src/lib/notification.model.d.ts +0 -7
- package/libs/feature/notifications/src/lib/notification.model.d.ts.map +0 -1
- package/libs/feature/notifications/src/lib/notifications-container/notifications-container.component.d.ts +0 -12
- package/libs/feature/notifications/src/lib/notifications-container/notifications-container.component.d.ts.map +0 -1
- package/libs/feature/notifications/src/lib/notifications.service.d.ts +0 -15
- package/libs/feature/notifications/src/lib/notifications.service.d.ts.map +0 -1
- package/libs/ui/elements/src/lib/notification/notification.component.d.ts +0 -13
- package/libs/ui/elements/src/lib/notification/notification.component.d.ts.map +0 -1
- package/src/libs/feature/notifications/src/index.ts +0 -3
- package/src/libs/feature/notifications/src/lib/feature-notifications.module.ts +0 -10
- package/src/libs/feature/notifications/src/lib/notification.model.ts +0 -6
- package/src/libs/feature/notifications/src/lib/notifications-container/notifications-container.component.css +0 -0
- package/src/libs/feature/notifications/src/lib/notifications-container/notifications-container.component.html +0 -17
- package/src/libs/feature/notifications/src/lib/notifications-container/notifications-container.component.ts +0 -44
- package/src/libs/feature/notifications/src/lib/notifications.service.ts +0 -27
- package/src/libs/ui/elements/src/lib/notification/notification.component.css +0 -0
- package/src/libs/ui/elements/src/lib/notification/notification.component.html +0 -52
- package/src/libs/ui/elements/src/lib/notification/notification.component.ts +0 -31
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { NotificationContent } from './notification.model';
|
|
2
|
-
import { BehaviorSubject } from 'rxjs';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
type NotificationWithIdentity = NotificationContent & {
|
|
5
|
-
id: number;
|
|
6
|
-
};
|
|
7
|
-
export declare class NotificationsService {
|
|
8
|
-
notifications$: BehaviorSubject<NotificationWithIdentity[]>;
|
|
9
|
-
showNotification(content: NotificationContent, timeoutMs?: number): void;
|
|
10
|
-
removeNotificationById(id: number): void;
|
|
11
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<NotificationsService, never>;
|
|
12
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<NotificationsService>;
|
|
13
|
-
}
|
|
14
|
-
export {};
|
|
15
|
-
//# sourceMappingURL=notifications.service.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"notifications.service.d.ts","sourceRoot":"","sources":["../../../../../src/libs/feature/notifications/src/lib/notifications.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAA;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,MAAM,CAAA;;AAEtC,KAAK,wBAAwB,GAAG,mBAAmB,GAAG;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE,CAAA;AAEpE,qBAGa,oBAAoB;IAC/B,cAAc,8CAAsD;IAEpE,gBAAgB,CAAC,OAAO,EAAE,mBAAmB,EAAE,SAAS,CAAC,EAAE,MAAM;IASjE,sBAAsB,CAAC,EAAE,EAAE,MAAM;yCAZtB,oBAAoB;6CAApB,oBAAoB;CAiBhC"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { EventEmitter } from '@angular/core';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
export declare class NotificationComponent {
|
|
4
|
-
type: 'info' | 'warning' | 'error' | 'success';
|
|
5
|
-
title: string;
|
|
6
|
-
text: string;
|
|
7
|
-
closeMessage?: string;
|
|
8
|
-
notificationClose: EventEmitter<void>;
|
|
9
|
-
handleClose(event?: Event): void;
|
|
10
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<NotificationComponent, never>;
|
|
11
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<NotificationComponent, "gn-ui-notification", never, { "type": { "alias": "type"; "required": false; }; "title": { "alias": "title"; "required": false; }; "text": { "alias": "text"; "required": false; }; "closeMessage": { "alias": "closeMessage"; "required": false; }; }, { "notificationClose": "notificationClose"; }, never, never, true, never>;
|
|
12
|
-
}
|
|
13
|
-
//# sourceMappingURL=notification.component.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"notification.component.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/ui/elements/src/lib/notification/notification.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,YAAY,EAGb,MAAM,eAAe,CAAA;;AAKtB,qBAQa,qBAAqB;IACvB,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,CAAS;IACvD,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;IACZ,YAAY,CAAC,EAAE,MAAM,CAAA;IACpB,iBAAiB,qBAA2B;IAEtD,WAAW,CAAC,KAAK,CAAC,EAAE,KAAK;yCAPd,qBAAqB;2CAArB,qBAAqB;CAWjC"}
|
|
File without changes
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
<div class="flex flex-col gap-6 p-6 items-start pointer-events-none">
|
|
2
|
-
<gn-ui-notification
|
|
3
|
-
*ngFor="
|
|
4
|
-
let notification of notificationsService.notifications$ | async;
|
|
5
|
-
trackBy: trackById
|
|
6
|
-
"
|
|
7
|
-
class="max-w-full pointer-events-auto"
|
|
8
|
-
[text]="notification.text"
|
|
9
|
-
[type]="notification.type"
|
|
10
|
-
[title]="notification.title"
|
|
11
|
-
[closeMessage]="notification.closeMessage"
|
|
12
|
-
(notificationClose)="
|
|
13
|
-
notificationsService.removeNotificationById(notification.id)
|
|
14
|
-
"
|
|
15
|
-
[@enterExit]
|
|
16
|
-
></gn-ui-notification>
|
|
17
|
-
</div>
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { ChangeDetectionStrategy, Component } from '@angular/core'
|
|
2
|
-
import { CommonModule } from '@angular/common'
|
|
3
|
-
import { NotificationsService } from '../notifications.service'
|
|
4
|
-
import { NotificationComponent } from '../../../../../../libs/ui/elements/src'
|
|
5
|
-
import {
|
|
6
|
-
animate,
|
|
7
|
-
keyframes,
|
|
8
|
-
style,
|
|
9
|
-
transition,
|
|
10
|
-
trigger,
|
|
11
|
-
} from '@angular/animations'
|
|
12
|
-
|
|
13
|
-
@Component({
|
|
14
|
-
selector: 'gn-ui-notifications-container',
|
|
15
|
-
standalone: true,
|
|
16
|
-
imports: [CommonModule, NotificationComponent],
|
|
17
|
-
templateUrl: './notifications-container.component.html',
|
|
18
|
-
styleUrls: ['./notifications-container.component.css'],
|
|
19
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
20
|
-
animations: [
|
|
21
|
-
trigger('enterExit', [
|
|
22
|
-
transition(':enter', [
|
|
23
|
-
animate(
|
|
24
|
-
'150ms',
|
|
25
|
-
keyframes([
|
|
26
|
-
style({ transform: 'scale(1)', opacity: 0 }),
|
|
27
|
-
style({ transform: 'scale(1.03)', opacity: 0.5 }),
|
|
28
|
-
style({ transform: 'scale(1)', opacity: 1 }),
|
|
29
|
-
])
|
|
30
|
-
),
|
|
31
|
-
]),
|
|
32
|
-
transition(':leave', [
|
|
33
|
-
animate('200ms', style({ transform: 'translateX(50px)', opacity: 0 })),
|
|
34
|
-
]),
|
|
35
|
-
]),
|
|
36
|
-
],
|
|
37
|
-
})
|
|
38
|
-
export class NotificationsContainerComponent {
|
|
39
|
-
constructor(protected notificationsService: NotificationsService) {}
|
|
40
|
-
|
|
41
|
-
trackById(index: number, notification: { id: number }) {
|
|
42
|
-
return notification.id
|
|
43
|
-
}
|
|
44
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { Injectable } from '@angular/core'
|
|
2
|
-
import { NotificationContent } from './notification.model'
|
|
3
|
-
import { BehaviorSubject } from 'rxjs'
|
|
4
|
-
|
|
5
|
-
type NotificationWithIdentity = NotificationContent & { id: number }
|
|
6
|
-
|
|
7
|
-
@Injectable({
|
|
8
|
-
providedIn: 'root',
|
|
9
|
-
})
|
|
10
|
-
export class NotificationsService {
|
|
11
|
-
notifications$ = new BehaviorSubject<NotificationWithIdentity[]>([])
|
|
12
|
-
|
|
13
|
-
showNotification(content: NotificationContent, timeoutMs?: number) {
|
|
14
|
-
const id = Math.floor(Math.random() * 1000000)
|
|
15
|
-
this.notifications$.next([...this.notifications$.value, { ...content, id }])
|
|
16
|
-
if (typeof timeoutMs === 'undefined') return
|
|
17
|
-
setTimeout(() => {
|
|
18
|
-
this.removeNotificationById(id)
|
|
19
|
-
}, timeoutMs)
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
removeNotificationById(id: number) {
|
|
23
|
-
this.notifications$.next(
|
|
24
|
-
this.notifications$.value.filter((n) => n.id !== id)
|
|
25
|
-
)
|
|
26
|
-
}
|
|
27
|
-
}
|
|
File without changes
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
<div
|
|
2
|
-
class="p-[16px] flex flex-row gap-[16px] items-start border border-gray-200 shadow-md rounded bg-background"
|
|
3
|
-
>
|
|
4
|
-
<div
|
|
5
|
-
role="alert"
|
|
6
|
-
class="rounded-full text-white p-[6px] w-[32px] h-[32px] flex shrink-0"
|
|
7
|
-
[ngClass]="{
|
|
8
|
-
'bg-red-500': type === 'error',
|
|
9
|
-
'bg-yellow-500': type === 'warning',
|
|
10
|
-
'bg-green-500': type === 'success',
|
|
11
|
-
'bg-blue-500': type === 'info'
|
|
12
|
-
}"
|
|
13
|
-
[ngSwitch]="type"
|
|
14
|
-
>
|
|
15
|
-
<mat-icon class="material-symbols-outlined !w-[18px] !h-[18px] text-[20px]">
|
|
16
|
-
<ng-container *ngSwitchCase="'success'">check_circle</ng-container>
|
|
17
|
-
<ng-container *ngSwitchCase="'info'">info</ng-container>
|
|
18
|
-
<ng-container *ngSwitchCase="'warning'">warning</ng-container>
|
|
19
|
-
<ng-container *ngSwitchCase="'error'">error</ng-container>
|
|
20
|
-
</mat-icon>
|
|
21
|
-
</div>
|
|
22
|
-
<div
|
|
23
|
-
class="flex flex-col items-start gap-[4px] pt-[3px] grow shrink overflow-hidden"
|
|
24
|
-
>
|
|
25
|
-
<div class="font-bold text-[16px] text-gray-900">
|
|
26
|
-
{{ title }}
|
|
27
|
-
</div>
|
|
28
|
-
<div class="text-[14px] text-gray-800">
|
|
29
|
-
{{ text }}
|
|
30
|
-
</div>
|
|
31
|
-
<a
|
|
32
|
-
href
|
|
33
|
-
*ngIf="closeMessage"
|
|
34
|
-
class="text-[14px] gn-ui-link"
|
|
35
|
-
(click)="handleClose($event)"
|
|
36
|
-
>
|
|
37
|
-
{{ closeMessage }}
|
|
38
|
-
</a>
|
|
39
|
-
</div>
|
|
40
|
-
<gn-ui-button
|
|
41
|
-
type="light"
|
|
42
|
-
class="shrink-0"
|
|
43
|
-
(buttonClick)="handleClose()"
|
|
44
|
-
[style.--gn-ui-button-padding]="0"
|
|
45
|
-
[style.--gn-ui-button-width]="'21px'"
|
|
46
|
-
[style.--gn-ui-button-height]="'21px'"
|
|
47
|
-
>
|
|
48
|
-
<mat-icon class="material-symbols-outlined text-[22px] !w-[21px] !h-[21px]"
|
|
49
|
-
>close</mat-icon
|
|
50
|
-
>
|
|
51
|
-
</gn-ui-button>
|
|
52
|
-
</div>
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
ChangeDetectionStrategy,
|
|
3
|
-
Component,
|
|
4
|
-
EventEmitter,
|
|
5
|
-
Input,
|
|
6
|
-
Output,
|
|
7
|
-
} from '@angular/core'
|
|
8
|
-
import { CommonModule } from '@angular/common'
|
|
9
|
-
import { MatIconModule } from '@angular/material/icon'
|
|
10
|
-
import { ButtonComponent } from '../../../../../../libs/ui/inputs/src'
|
|
11
|
-
|
|
12
|
-
@Component({
|
|
13
|
-
selector: 'gn-ui-notification',
|
|
14
|
-
standalone: true,
|
|
15
|
-
imports: [CommonModule, MatIconModule, ButtonComponent],
|
|
16
|
-
templateUrl: './notification.component.html',
|
|
17
|
-
styleUrls: ['./notification.component.css'],
|
|
18
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
19
|
-
})
|
|
20
|
-
export class NotificationComponent {
|
|
21
|
-
@Input() type: 'info' | 'warning' | 'error' | 'success' = 'info'
|
|
22
|
-
@Input() title: string
|
|
23
|
-
@Input() text: string
|
|
24
|
-
@Input() closeMessage?: string
|
|
25
|
-
@Output() notificationClose = new EventEmitter<void>()
|
|
26
|
-
|
|
27
|
-
handleClose(event?: Event) {
|
|
28
|
-
event?.preventDefault()
|
|
29
|
-
this.notificationClose.emit()
|
|
30
|
-
}
|
|
31
|
-
}
|