geonetwork-ui 2.3.0-dev.b46332e6 → 2.3.0-dev.c22cb78a

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.
Files changed (83) hide show
  1. package/esm2022/index.mjs +2 -1
  2. package/esm2022/libs/feature/editor/src/lib/+state/editor.facade.mjs +6 -2
  3. package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-rich/form-field-rich.component.mjs +3 -3
  4. package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.mjs +24 -10
  5. package/esm2022/libs/feature/editor/src/lib/components/record-form/record-form.component.mjs +3 -13
  6. package/esm2022/libs/feature/map/src/lib/add-layer-from-file/add-layer-from-file.component.mjs +3 -3
  7. package/esm2022/libs/feature/notifications/src/index.mjs +4 -0
  8. package/esm2022/libs/feature/notifications/src/lib/feature-notifications.module.mjs +18 -0
  9. package/esm2022/libs/feature/notifications/src/lib/notification.model.mjs +2 -0
  10. package/esm2022/libs/feature/notifications/src/lib/notifications-container/notifications-container.component.mjs +49 -0
  11. package/esm2022/libs/feature/notifications/src/lib/notifications.service.mjs +29 -0
  12. package/esm2022/libs/feature/search/src/lib/results-table/results-table.component.mjs +3 -3
  13. package/esm2022/libs/ui/catalog/src/lib/organisation-preview/organisation-preview.component.mjs +3 -3
  14. package/esm2022/libs/ui/elements/src/index.mjs +2 -1
  15. package/esm2022/libs/ui/elements/src/lib/image-overlay-preview/image-overlay-preview.component.mjs +3 -3
  16. package/esm2022/libs/ui/elements/src/lib/notification/notification.component.mjs +34 -0
  17. package/esm2022/libs/ui/elements/src/lib/record-api-form/record-api-form.component.mjs +3 -3
  18. package/esm2022/libs/ui/layout/src/lib/form-field-wrapper/form-field-wrapper.component.mjs +3 -3
  19. package/esm2022/translations/de.json +8 -0
  20. package/esm2022/translations/en.json +8 -0
  21. package/esm2022/translations/es.json +8 -0
  22. package/esm2022/translations/fr.json +8 -0
  23. package/esm2022/translations/it.json +8 -0
  24. package/esm2022/translations/nl.json +8 -0
  25. package/esm2022/translations/pt.json +8 -0
  26. package/fesm2022/geonetwork-ui.mjs +202 -33
  27. package/fesm2022/geonetwork-ui.mjs.map +1 -1
  28. package/index.d.ts +1 -0
  29. package/index.d.ts.map +1 -1
  30. package/index.ts +1 -0
  31. package/libs/feature/editor/src/lib/+state/editor.facade.d.ts +8 -5
  32. package/libs/feature/editor/src/lib/+state/editor.facade.d.ts.map +1 -1
  33. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.d.ts +4 -0
  34. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.d.ts.map +1 -1
  35. package/libs/feature/editor/src/lib/components/record-form/record-form.component.d.ts.map +1 -1
  36. package/libs/feature/notifications/src/index.d.ts +4 -0
  37. package/libs/feature/notifications/src/index.d.ts.map +1 -0
  38. package/libs/feature/notifications/src/lib/feature-notifications.module.d.ts +7 -0
  39. package/libs/feature/notifications/src/lib/feature-notifications.module.d.ts.map +1 -0
  40. package/libs/feature/notifications/src/lib/notification.model.d.ts +7 -0
  41. package/libs/feature/notifications/src/lib/notification.model.d.ts.map +1 -0
  42. package/libs/feature/notifications/src/lib/notifications-container/notifications-container.component.d.ts +12 -0
  43. package/libs/feature/notifications/src/lib/notifications-container/notifications-container.component.d.ts.map +1 -0
  44. package/libs/feature/notifications/src/lib/notifications.service.d.ts +15 -0
  45. package/libs/feature/notifications/src/lib/notifications.service.d.ts.map +1 -0
  46. package/libs/ui/elements/src/index.d.ts +1 -0
  47. package/libs/ui/elements/src/index.d.ts.map +1 -1
  48. package/libs/ui/elements/src/lib/notification/notification.component.d.ts +13 -0
  49. package/libs/ui/elements/src/lib/notification/notification.component.d.ts.map +1 -0
  50. package/package.json +1 -1
  51. package/src/libs/feature/editor/src/lib/+state/editor.facade.ts +8 -1
  52. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-rich/form-field-rich.component.css +0 -5
  53. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-rich/form-field-rich.component.html +1 -1
  54. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.html +24 -0
  55. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.ts +19 -4
  56. package/src/libs/feature/editor/src/lib/components/record-form/record-form.component.ts +2 -21
  57. package/src/libs/feature/map/src/lib/add-layer-from-file/add-layer-from-file.component.html +1 -1
  58. package/src/libs/feature/notifications/src/index.ts +3 -0
  59. package/src/libs/feature/notifications/src/lib/feature-notifications.module.ts +10 -0
  60. package/src/libs/feature/notifications/src/lib/notification.model.ts +6 -0
  61. package/src/libs/feature/notifications/src/lib/notifications-container/notifications-container.component.css +0 -0
  62. package/src/libs/feature/notifications/src/lib/notifications-container/notifications-container.component.html +17 -0
  63. package/src/libs/feature/notifications/src/lib/notifications-container/notifications-container.component.ts +44 -0
  64. package/src/libs/feature/notifications/src/lib/notifications.service.ts +27 -0
  65. package/src/libs/feature/search/src/lib/results-table/results-table.component.html +3 -3
  66. package/src/libs/ui/catalog/src/lib/organisation-preview/organisation-preview.component.html +5 -5
  67. package/src/libs/ui/elements/src/index.ts +1 -0
  68. package/src/libs/ui/elements/src/lib/image-overlay-preview/image-overlay-preview.component.html +1 -1
  69. package/src/libs/ui/elements/src/lib/notification/notification.component.css +0 -0
  70. package/src/libs/ui/elements/src/lib/notification/notification.component.html +52 -0
  71. package/src/libs/ui/elements/src/lib/notification/notification.component.ts +31 -0
  72. package/src/libs/ui/elements/src/lib/record-api-form/record-api-form.component.html +1 -1
  73. package/src/libs/ui/layout/src/lib/form-field-wrapper/form-field-wrapper.component.css +0 -5
  74. package/src/libs/ui/layout/src/lib/form-field-wrapper/form-field-wrapper.component.html +1 -1
  75. package/tailwind.base.css +36 -0
  76. package/translations/de.json +8 -0
  77. package/translations/en.json +8 -0
  78. package/translations/es.json +8 -0
  79. package/translations/fr.json +8 -0
  80. package/translations/it.json +8 -0
  81. package/translations/nl.json +8 -0
  82. package/translations/pt.json +8 -0
  83. package/translations/sk.json +8 -0
package/index.d.ts CHANGED
@@ -2,6 +2,7 @@ export * from './libs/api/metadata-converter/src';
2
2
  export * from './libs/api/repository/src';
3
3
  export * from './libs/feature/auth/src';
4
4
  export * from './libs/feature/map/src';
5
+ export * from './libs/feature/notifications/src';
5
6
  export * from './libs/feature/search/src';
6
7
  export * from './libs/feature/record/src';
7
8
  export * from './libs/feature/dataviz/src';
package/index.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AACA,cAAc,mCAAmC,CAAA;AACjD,cAAc,2BAA2B,CAAA;AACzC,cAAc,yBAAyB,CAAA;AACvC,cAAc,wBAAwB,CAAA;AACtC,cAAc,2BAA2B,CAAA;AACzC,cAAc,2BAA2B,CAAA;AACzC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,4BAA4B,CAAA;AAC1C,cAAc,2BAA2B,CAAA;AACzC,cAAc,2BAA2B,CAAA;AACzC,cAAc,mBAAmB,CAAA;AACjC,cAAc,uBAAuB,CAAA;AACrC,cAAc,uBAAuB,CAAA;AACrC,cAAc,sBAAsB,CAAA;AACpC,cAAc,uBAAuB,CAAA;AACrC,cAAc,sBAAsB,CAAA;AACpC,cAAc,wBAAwB,CAAA;AACtC,cAAc,sBAAsB,CAAA;AACpC,cAAc,wBAAwB,CAAA;AACtC,cAAc,sBAAsB,CAAA;AACpC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,8BAA8B,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AACA,cAAc,mCAAmC,CAAA;AACjD,cAAc,2BAA2B,CAAA;AACzC,cAAc,yBAAyB,CAAA;AACvC,cAAc,wBAAwB,CAAA;AACtC,cAAc,kCAAkC,CAAA;AAChD,cAAc,2BAA2B,CAAA;AACzC,cAAc,2BAA2B,CAAA;AACzC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,4BAA4B,CAAA;AAC1C,cAAc,2BAA2B,CAAA;AACzC,cAAc,2BAA2B,CAAA;AACzC,cAAc,mBAAmB,CAAA;AACjC,cAAc,uBAAuB,CAAA;AACrC,cAAc,uBAAuB,CAAA;AACrC,cAAc,sBAAsB,CAAA;AACpC,cAAc,uBAAuB,CAAA;AACrC,cAAc,sBAAsB,CAAA;AACpC,cAAc,wBAAwB,CAAA;AACtC,cAAc,sBAAsB,CAAA;AACpC,cAAc,wBAAwB,CAAA;AACtC,cAAc,sBAAsB,CAAA;AACpC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,8BAA8B,CAAA"}
package/index.ts CHANGED
@@ -3,6 +3,7 @@ export * from './libs/api/metadata-converter/src'
3
3
  export * from './libs/api/repository/src'
4
4
  export * from './libs/feature/auth/src'
5
5
  export * from './libs/feature/map/src'
6
+ export * from './libs/feature/notifications/src'
6
7
  export * from './libs/feature/search/src'
7
8
  export * from './libs/feature/record/src'
8
9
  export * from './libs/feature/dataviz/src'
@@ -1,12 +1,15 @@
1
1
  import { CatalogRecord } from '../../../../../../libs/common/domain/src/lib/model/record';
2
+ import { Observable } from 'rxjs';
2
3
  import * as i0 from "@angular/core";
3
4
  export declare class EditorFacade {
4
5
  private readonly store;
5
- record$: import("rxjs").Observable<CatalogRecord>;
6
- saving$: import("rxjs").Observable<boolean>;
7
- saveError$: import("rxjs").Observable<string>;
8
- changedSinceSave$: import("rxjs").Observable<boolean>;
9
- recordFields$: import("rxjs").Observable<{
6
+ private actions$;
7
+ record$: Observable<CatalogRecord>;
8
+ saving$: Observable<boolean>;
9
+ saveError$: Observable<string>;
10
+ saveSuccess$: Observable<import("@ngrx/store/src/models").TypedAction<"[Editor] Save record success">>;
11
+ changedSinceSave$: Observable<boolean>;
12
+ recordFields$: Observable<{
10
13
  config: import("../models/fields.model").EditorFieldConfig;
11
14
  value: any;
12
15
  }[]>;
@@ -1 +1 @@
1
- {"version":3,"file":"editor.facade.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/feature/editor/src/lib/+state/editor.facade.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,2DAA2D,CAAA;;AAEzF,qBACa,YAAY;IACvB,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAgB;IAEtC,OAAO,2CAAwD;IAC/D,OAAO,qCAA8D;IACrE,UAAU,oCAAiE;IAC3E,iBAAiB,qCAEhB;IACD,aAAa;;;SAA8D;IAE3E,UAAU,CAAC,MAAM,EAAE,aAAa;IAIhC,UAAU;IAIV,iBAAiB,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO;yCAnBpC,YAAY;6CAAZ,YAAY;CAsBxB"}
1
+ {"version":3,"file":"editor.facade.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/feature/editor/src/lib/+state/editor.facade.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,2DAA2D,CAAA;AACzF,OAAO,EAAU,UAAU,EAAE,MAAM,MAAM,CAAA;;AAGzC,qBACa,YAAY;IACvB,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAgB;IACtC,OAAO,CAAC,QAAQ,CAAkB;IAElC,OAAO,4BAAwD;IAC/D,OAAO,sBAA8D;IACrE,UAAU,qBAGT;IACD,YAAY,2FAA8D;IAC1E,iBAAiB,sBAEhB;IACD,aAAa;;;SAA8D;IAE3E,UAAU,CAAC,MAAM,EAAE,aAAa;IAIhC,UAAU;IAIV,iBAAiB,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO;yCAxBpC,YAAY;6CAAZ,YAAY;CA2BxB"}
@@ -1,3 +1,4 @@
1
+ import { ElementRef } from '@angular/core';
1
2
  import { FormControl } from '@angular/forms';
2
3
  import { Observable } from 'rxjs';
3
4
  import { FormFieldConfig } from './form-field.model';
@@ -7,8 +8,10 @@ export declare class FormFieldComponent {
7
8
  config: FormFieldConfig;
8
9
  set value(v: unknown);
9
10
  valueChange: Observable<unknown>;
11
+ titleInput: ElementRef;
10
12
  formControl: FormControl<any>;
11
13
  constructor();
14
+ focusTitleInput(): void;
12
15
  get simpleType(): "number" | "text" | "url" | "toggle" | "date" | "list";
13
16
  get isSimpleField(): boolean;
14
17
  get isFileField(): boolean;
@@ -19,6 +22,7 @@ export declare class FormFieldComponent {
19
22
  get isFieldOk(): boolean;
20
23
  get isFieldLocked(): boolean;
21
24
  get isFieldInvalid(): boolean;
25
+ get isTitle(): boolean;
22
26
  get isAbstract(): boolean;
23
27
  static ɵfac: i0.ɵɵFactoryDeclaration<FormFieldComponent, never>;
24
28
  static ɵcmp: i0.ɵɵComponentDeclaration<FormFieldComponent, "gn-ui-form-field", never, { "model": { "alias": "model"; "required": false; }; "config": { "alias": "config"; "required": false; }; "value": { "alias": "value"; "required": false; }; }, { "valueChange": "valueChange"; }, never, never, true, never>;
@@ -1 +1 @@
1
- {"version":3,"file":"form-field.component.d.ts","sourceRoot":"","sources":["../../../../../../../../src/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,WAAW,EAAuB,MAAM,gBAAgB,CAAA;AAGjE,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAA;AAQjC,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAA;;AAGpD,qBAoBa,kBAAkB;IACpB,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,eAAe,CAAA;IAChC,IAAa,KAAK,CAAC,CAAC,EAAE,OAAO,EAI5B;IACS,WAAW,EAAE,UAAU,CAAC,OAAO,CAAC,CAAA;IAE1C,WAAW,mBAAoB;;IAM/B,IAAI,UAAU,2DAQb;IAED,IAAI,aAAa,YAShB;IACD,IAAI,WAAW,YAEd;IACD,IAAI,oBAAoB,YAEvB;IACD,IAAI,qBAAqB,YAExB;IACD,IAAI,YAAY,YAEf;IACD,IAAI,aAAa,YAEhB;IAED,IAAI,SAAS,YAEZ;IACD,IAAI,aAAa,YAEhB;IACD,IAAI,cAAc,YAEjB;IAED,IAAI,UAAU,YAEb;yCAhEU,kBAAkB;2CAAlB,kBAAkB;CAiE9B"}
1
+ {"version":3,"file":"form-field.component.d.ts","sourceRoot":"","sources":["../../../../../../../../src/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,UAAU,EAIX,MAAM,eAAe,CAAA;AACtB,OAAO,EAAE,WAAW,EAAuB,MAAM,gBAAgB,CAAA;AAKjE,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAA;AAQjC,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAA;;AAEpD,qBAsBa,kBAAkB;IACpB,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,eAAe,CAAA;IAChC,IAAa,KAAK,CAAC,CAAC,EAAE,OAAO,EAI5B;IACS,WAAW,EAAE,UAAU,CAAC,OAAO,CAAC,CAAA;IAEjB,UAAU,EAAE,UAAU,CAAA;IAE/C,WAAW,mBAAoB;;IAM/B,eAAe;IAIf,IAAI,UAAU,2DAQb;IAED,IAAI,aAAa,YAShB;IACD,IAAI,WAAW,YAEd;IACD,IAAI,oBAAoB,YAEvB;IACD,IAAI,qBAAqB,YAExB;IACD,IAAI,YAAY,YAEf;IACD,IAAI,aAAa,YAEhB;IAED,IAAI,SAAS,YAEZ;IACD,IAAI,aAAa,YAEhB;IACD,IAAI,cAAc,YAEjB;IAED,IAAI,OAAO,YAEV;IACD,IAAI,UAAU,YAEb;yCAzEU,kBAAkB;2CAAlB,kBAAkB;CA0E9B"}
@@ -1 +1 @@
1
- {"version":3,"file":"record-form.component.d.ts","sourceRoot":"","sources":["../../../../../../../src/libs/feature/editor/src/lib/components/record-form/record-form.component.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAA;AACzD,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAA;;AAY9E,qBAkBa,mBAAmB;IAGX,MAAM,EAAE,YAAY;IAFvC,OAAO;;;SAA4B;gBAEhB,MAAM,EAAE,YAAY;IAEvC,sBAAsB,CAAC,KAAK,EAAE,gBAAgB,EAAE,QAAQ,EAAE,gBAAgB;IAO1E,YAAY,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,gBAAgB;yCAZxC,mBAAmB;2CAAnB,mBAAmB;CAe/B"}
1
+ {"version":3,"file":"record-form.component.d.ts","sourceRoot":"","sources":["../../../../../../../src/libs/feature/editor/src/lib/components/record-form/record-form.component.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAA;AACzD,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAA;;AAG9E,qBAQa,mBAAmB;IAGX,MAAM,EAAE,YAAY;IAFvC,OAAO;;;SAA4B;gBAEhB,MAAM,EAAE,YAAY;IAEvC,sBAAsB,CAAC,KAAK,EAAE,gBAAgB,EAAE,QAAQ,EAAE,gBAAgB;IAO1E,YAAY,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,gBAAgB;yCAZxC,mBAAmB;2CAAnB,mBAAmB;CAe/B"}
@@ -0,0 +1,4 @@
1
+ export * from './lib/feature-notifications.module';
2
+ export * from './lib/notifications.service';
3
+ export * from './lib/notifications-container/notifications-container.component';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/libs/feature/notifications/src/index.ts"],"names":[],"mappings":"AAAA,cAAc,oCAAoC,CAAA;AAClD,cAAc,6BAA6B,CAAA;AAC3C,cAAc,iEAAiE,CAAA"}
@@ -0,0 +1,7 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class FeatureNotificationsModule {
3
+ static ɵfac: i0.ɵɵFactoryDeclaration<FeatureNotificationsModule, never>;
4
+ static ɵmod: i0.ɵɵNgModuleDeclaration<FeatureNotificationsModule, never, never, never>;
5
+ static ɵinj: i0.ɵɵInjectorDeclaration<FeatureNotificationsModule>;
6
+ }
7
+ //# sourceMappingURL=feature-notifications.module.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"feature-notifications.module.d.ts","sourceRoot":"","sources":["../../../../../src/libs/feature/notifications/src/lib/feature-notifications.module.ts"],"names":[],"mappings":";AAGA,qBAMa,0BAA0B;yCAA1B,0BAA0B;0CAA1B,0BAA0B;0CAA1B,0BAA0B;CAAG"}
@@ -0,0 +1,7 @@
1
+ export interface NotificationContent {
2
+ type: 'info' | 'warning' | 'error' | 'success';
3
+ title: string;
4
+ text: string;
5
+ closeMessage?: string;
6
+ }
7
+ //# sourceMappingURL=notification.model.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"notification.model.d.ts","sourceRoot":"","sources":["../../../../../src/libs/feature/notifications/src/lib/notification.model.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,CAAA;IAC9C,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;IACZ,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB"}
@@ -0,0 +1,12 @@
1
+ import { NotificationsService } from '../notifications.service';
2
+ import * as i0 from "@angular/core";
3
+ export declare class NotificationsContainerComponent {
4
+ protected notificationsService: NotificationsService;
5
+ constructor(notificationsService: NotificationsService);
6
+ trackById(index: number, notification: {
7
+ id: number;
8
+ }): number;
9
+ static ɵfac: i0.ɵɵFactoryDeclaration<NotificationsContainerComponent, never>;
10
+ static ɵcmp: i0.ɵɵComponentDeclaration<NotificationsContainerComponent, "gn-ui-notifications-container", never, {}, {}, never, never, true, never>;
11
+ }
12
+ //# sourceMappingURL=notifications-container.component.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"notifications-container.component.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/feature/notifications/src/lib/notifications-container/notifications-container.component.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAA;;AAU/D,qBAyBa,+BAA+B;IAC9B,SAAS,CAAC,oBAAoB,EAAE,oBAAoB;gBAA1C,oBAAoB,EAAE,oBAAoB;IAEhE,SAAS,CAAC,KAAK,EAAE,MAAM,EAAE,YAAY,EAAE;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE;yCAH1C,+BAA+B;2CAA/B,+BAA+B;CAM3C"}
@@ -0,0 +1,15 @@
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
@@ -0,0 +1 @@
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"}
@@ -21,4 +21,5 @@ export * from './lib/search-results-error/search-results-error.component';
21
21
  export * from './lib/thumbnail/thumbnail.component';
22
22
  export * from './lib/ui-elements.module';
23
23
  export * from './lib/user-preview/user-preview.component';
24
+ export * from './lib/notification/notification.component';
24
25
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/libs/ui/elements/src/index.ts"],"names":[],"mappings":"AAAA,cAAc,mCAAmC,CAAA;AACjD,cAAc,+BAA+B,CAAA;AAC7C,cAAc,6CAA6C,CAAA;AAC3D,cAAc,6CAA6C,CAAA;AAC3D,cAAc,+CAA+C,CAAA;AAC7D,cAAc,6DAA6D,CAAA;AAC3E,cAAc,qCAAqC,CAAA;AACnD,cAAc,iDAAiD,CAAA;AAC/D,cAAc,iDAAiD,CAAA;AAC/D,cAAc,qCAAqC,CAAA;AACnD,cAAc,mDAAmD,CAAA;AACjE,cAAc,mDAAmD,CAAA;AACjE,cAAc,6CAA6C,CAAA;AAC3D,cAAc,6DAA6D,CAAA;AAC3E,cAAc,mDAAmD,CAAA;AACjE,cAAc,uDAAuD,CAAA;AACrE,cAAc,uCAAuC,CAAA;AACrD,cAAc,iDAAiD,CAAA;AAC/D,cAAc,yDAAyD,CAAA;AACvE,cAAc,2DAA2D,CAAA;AACzE,cAAc,qCAAqC,CAAA;AACnD,cAAc,0BAA0B,CAAA;AACxC,cAAc,2CAA2C,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/libs/ui/elements/src/index.ts"],"names":[],"mappings":"AAAA,cAAc,mCAAmC,CAAA;AACjD,cAAc,+BAA+B,CAAA;AAC7C,cAAc,6CAA6C,CAAA;AAC3D,cAAc,6CAA6C,CAAA;AAC3D,cAAc,+CAA+C,CAAA;AAC7D,cAAc,6DAA6D,CAAA;AAC3E,cAAc,qCAAqC,CAAA;AACnD,cAAc,iDAAiD,CAAA;AAC/D,cAAc,iDAAiD,CAAA;AAC/D,cAAc,qCAAqC,CAAA;AACnD,cAAc,mDAAmD,CAAA;AACjE,cAAc,mDAAmD,CAAA;AACjE,cAAc,6CAA6C,CAAA;AAC3D,cAAc,6DAA6D,CAAA;AAC3E,cAAc,mDAAmD,CAAA;AACjE,cAAc,uDAAuD,CAAA;AACrE,cAAc,uCAAuC,CAAA;AACrD,cAAc,iDAAiD,CAAA;AAC/D,cAAc,yDAAyD,CAAA;AACvE,cAAc,2DAA2D,CAAA;AACzE,cAAc,qCAAqC,CAAA;AACnD,cAAc,0BAA0B,CAAA;AACxC,cAAc,2CAA2C,CAAA;AACzD,cAAc,2CAA2C,CAAA"}
@@ -0,0 +1,13 @@
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
@@ -0,0 +1 @@
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"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "geonetwork-ui",
3
- "version": "2.3.0-dev.b46332e6",
3
+ "version": "2.3.0-dev.c22cb78a",
4
4
  "engines": {
5
5
  "node": ">=14.17.0"
6
6
  },
@@ -3,14 +3,21 @@ import { select, Store } from '@ngrx/store'
3
3
  import * as EditorActions from './editor.actions'
4
4
  import * as EditorSelectors from './editor.selectors'
5
5
  import { CatalogRecord } from '../../../../../../libs/common/domain/src/lib/model/record'
6
+ import { filter, Observable } from 'rxjs'
7
+ import { Actions, ofType } from '@ngrx/effects'
6
8
 
7
9
  @Injectable()
8
10
  export class EditorFacade {
9
11
  private readonly store = inject(Store)
12
+ private actions$ = inject(Actions)
10
13
 
11
14
  record$ = this.store.pipe(select(EditorSelectors.selectRecord))
12
15
  saving$ = this.store.pipe(select(EditorSelectors.selectRecordSaving))
13
- saveError$ = this.store.pipe(select(EditorSelectors.selectRecordSaveError))
16
+ saveError$ = this.store.pipe(
17
+ select(EditorSelectors.selectRecordSaveError),
18
+ filter((error) => !!error)
19
+ )
20
+ saveSuccess$ = this.actions$.pipe(ofType(EditorActions.saveRecordSuccess))
14
21
  changedSinceSave$ = this.store.pipe(
15
22
  select(EditorSelectors.selectRecordChangedSinceSave)
16
23
  )
@@ -1,5 +0,0 @@
1
- .icon-small {
2
- font-size: 16px;
3
- height: 16px;
4
- width: 16px;
5
- }
@@ -4,7 +4,7 @@
4
4
  [extraClass]="getButtonExtraClass()"
5
5
  (buttonClick)="togglePreview()"
6
6
  >
7
- <span class="material-symbols-outlined mr-1 icon-small">{{
7
+ <span class="material-symbols-outlined mr-1 gn-ui-icon-small">{{
8
8
  preview ? 'visibility' : 'visibility_off'
9
9
  }}</span>
10
10
  {{ preview ? 'WYSIWYG' : 'Markdown' }}
@@ -24,6 +24,30 @@
24
24
  >cancel</mat-icon
25
25
  >
26
26
  </div>
27
+ <ng-container *ngIf="isTitle">
28
+ <div class="flex justify-between items-center gap-3">
29
+ <h2
30
+ #titleInput
31
+ class="grow text-3xl font-normal"
32
+ [gnUiEditableLabel]="true"
33
+ (editableLabelChanged)="formControl.setValue($event)"
34
+ >
35
+ {{ formControl.value }}
36
+ </h2>
37
+ <span
38
+ class="material-symbols-outlined gn-ui-icon-small m-2 cursor-pointer"
39
+ (click)="focusTitleInput()"
40
+ >edit</span
41
+ >
42
+ <span
43
+ class="material-symbols-outlined gn-ui-icon-small m-2"
44
+ [matTooltip]="config.hintKey | translate"
45
+ matTooltipPosition="above"
46
+ >
47
+ help
48
+ </span>
49
+ </div>
50
+ </ng-container>
27
51
  <ng-container *ngIf="isSimpleField">
28
52
  <gn-ui-form-field-simple
29
53
  [type]="simpleType"
@@ -1,11 +1,16 @@
1
+ import { CommonModule } from '@angular/common'
1
2
  import {
2
3
  ChangeDetectionStrategy,
3
4
  Component,
5
+ ElementRef,
4
6
  Input,
5
7
  Output,
8
+ ViewChild,
6
9
  } from '@angular/core'
7
10
  import { FormControl, ReactiveFormsModule } from '@angular/forms'
8
11
  import { MatIconModule } from '@angular/material/icon'
12
+ import { MatTooltipModule } from '@angular/material/tooltip'
13
+ import { EditableLabelDirective } from '../../../../../../../../libs/ui/inputs/src'
9
14
  import { TranslateModule } from '@ngx-translate/core'
10
15
  import { Observable } from 'rxjs'
11
16
  import { FormFieldArrayComponent } from './form-field-array/form-field-array.component'
@@ -16,7 +21,6 @@ import { FormFieldSimpleComponent } from './form-field-simple/form-field-simple.
16
21
  import { FormFieldSpatialExtentComponent } from './form-field-spatial-extent/form-field-spatial-extent.component'
17
22
  import { FormFieldTemporalExtentComponent } from './form-field-temporal-extent/form-field-temporal-extent.component'
18
23
  import { FormFieldConfig } from './form-field.model'
19
- import { CommonModule } from '@angular/common'
20
24
 
21
25
  @Component({
22
26
  selector: 'gn-ui-form-field',
@@ -25,6 +29,11 @@ import { CommonModule } from '@angular/common'
25
29
  changeDetection: ChangeDetectionStrategy.OnPush,
26
30
  standalone: true,
27
31
  imports: [
32
+ CommonModule,
33
+ ReactiveFormsModule,
34
+ EditableLabelDirective,
35
+ MatIconModule,
36
+ MatTooltipModule,
28
37
  FormFieldSimpleComponent,
29
38
  FormFieldRichComponent,
30
39
  FormFieldObjectComponent,
@@ -32,10 +41,7 @@ import { CommonModule } from '@angular/common'
32
41
  FormFieldTemporalExtentComponent,
33
42
  FormFieldFileComponent,
34
43
  FormFieldArrayComponent,
35
- CommonModule,
36
- ReactiveFormsModule,
37
44
  TranslateModule,
38
- MatIconModule,
39
45
  ],
40
46
  })
41
47
  export class FormFieldComponent {
@@ -48,12 +54,18 @@ export class FormFieldComponent {
48
54
  }
49
55
  @Output() valueChange: Observable<unknown>
50
56
 
57
+ @ViewChild('titleInput') titleInput: ElementRef
58
+
51
59
  formControl = new FormControl()
52
60
 
53
61
  constructor() {
54
62
  this.valueChange = this.formControl.valueChanges
55
63
  }
56
64
 
65
+ focusTitleInput() {
66
+ this.titleInput.nativeElement.children[0].focus()
67
+ }
68
+
57
69
  get simpleType() {
58
70
  return this.config.type as
59
71
  | 'date'
@@ -100,6 +112,9 @@ export class FormFieldComponent {
100
112
  return !this.config.locked && this.config.invalid
101
113
  }
102
114
 
115
+ get isTitle() {
116
+ return this.model === 'title'
117
+ }
103
118
  get isAbstract() {
104
119
  return this.model === 'abstract'
105
120
  }
@@ -2,16 +2,7 @@ import { CommonModule } from '@angular/common'
2
2
  import { ChangeDetectionStrategy, Component } from '@angular/core'
3
3
  import { EditorFacade } from '../../+state/editor.facade'
4
4
  import { EditorFieldState, EditorFieldValue } from '../../models/fields.model'
5
- import {
6
- FormFieldArrayComponent,
7
- FormFieldComponent,
8
- FormFieldFileComponent,
9
- FormFieldObjectComponent,
10
- FormFieldRichComponent,
11
- FormFieldSimpleComponent,
12
- FormFieldSpatialExtentComponent,
13
- FormFieldTemporalExtentComponent,
14
- } from './form-field'
5
+ import { FormFieldComponent } from './form-field'
15
6
 
16
7
  @Component({
17
8
  selector: 'gn-ui-record-form',
@@ -19,17 +10,7 @@ import {
19
10
  styleUrls: ['./record-form.component.css'],
20
11
  changeDetection: ChangeDetectionStrategy.OnPush,
21
12
  standalone: true,
22
- imports: [
23
- CommonModule,
24
- FormFieldComponent,
25
- FormFieldArrayComponent,
26
- FormFieldFileComponent,
27
- FormFieldObjectComponent,
28
- FormFieldRichComponent,
29
- FormFieldSimpleComponent,
30
- FormFieldSpatialExtentComponent,
31
- FormFieldTemporalExtentComponent,
32
- ],
13
+ imports: [CommonModule, FormFieldComponent],
33
14
  })
34
15
  export class RecordFormComponent {
35
16
  fields$ = this.facade.recordFields$
@@ -1,6 +1,6 @@
1
1
  <div class="flex flex-col gap-2 my-2">
2
2
  <div class="flex items-center gap-4">
3
- <div class="flex-grow rounded-md border-2 border-gray-200">
3
+ <div class="grow rounded-md border-2 border-gray-200">
4
4
  <gn-ui-drag-and-drop-file-input
5
5
  (fileChange)="handleFileChange($event)"
6
6
  [accept]="acceptedMimeType.join(',')"
@@ -0,0 +1,3 @@
1
+ export * from './lib/feature-notifications.module'
2
+ export * from './lib/notifications.service'
3
+ export * from './lib/notifications-container/notifications-container.component'
@@ -0,0 +1,10 @@
1
+ import { NotificationsService } from './notifications.service'
2
+ import { NgModule } from '@angular/core'
3
+
4
+ @NgModule({
5
+ declarations: [],
6
+ exports: [],
7
+ imports: [],
8
+ providers: [NotificationsService],
9
+ })
10
+ export class FeatureNotificationsModule {}
@@ -0,0 +1,6 @@
1
+ export interface NotificationContent {
2
+ type: 'info' | 'warning' | 'error' | 'success'
3
+ title: string
4
+ text: string
5
+ closeMessage?: string
6
+ }
@@ -0,0 +1,17 @@
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>
@@ -0,0 +1,44 @@
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
+ }
@@ -0,0 +1,27 @@
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
+ }
@@ -50,20 +50,20 @@
50
50
  [title]="formats.join(', ')"
51
51
  >
52
52
  <span
53
- class="badge-btn min-w-[45px] text-sm text-white px-2 flex-shrink-0"
53
+ class="badge-btn min-w-[45px] text-sm text-white px-2 shrink-0"
54
54
  [style.background-color]="getBadgeColor(formats[0])"
55
55
  *ngIf="formats[0]"
56
56
  >
57
57
  {{ formats[0] }}
58
58
  </span>
59
59
  <span
60
- class="badge-btn min-w-[45px] text-sm text-white px-2 flex-shrink-0"
60
+ class="badge-btn min-w-[45px] text-sm text-white px-2 shrink-0"
61
61
  [style.background-color]="getBadgeColor(formats[1])"
62
62
  *ngIf="formats[1]"
63
63
  >
64
64
  {{ formats[1] }}
65
65
  </span>
66
- <div class="flex-shrink-0" *ngIf="formats.slice(2).length > 0">
66
+ <div class="shrink-0" *ngIf="formats.slice(2).length > 0">
67
67
  <span>+{{ formats.slice(2).length }}</span>
68
68
  </div>
69
69
  </div>
@@ -4,7 +4,7 @@
4
4
  [title]="organisation.name"
5
5
  >
6
6
  <div
7
- class="flex-shrink-0 bg-gray-100 rounded-lg overflow-hidden w-full border border-gray-300 h-36"
7
+ class="shrink-0 bg-gray-100 rounded-lg overflow-hidden w-full border border-gray-300 h-36"
8
8
  >
9
9
  <gn-ui-thumbnail
10
10
  class="relative h-full w-full"
@@ -13,20 +13,20 @@
13
13
  >
14
14
  </gn-ui-thumbnail>
15
15
  </div>
16
- <div class="px-3 pb-2 capitalize flex flex-col flex-grow overflow-hidden">
16
+ <div class="px-3 pb-2 capitalize flex flex-col grow overflow-hidden">
17
17
  <span
18
- class="flex-shrink-0 mb-3 mt-5 font-title text-21 text-title group-hover:text-primary line-clamp-2 sm:mt-2 transition-colors"
18
+ class="shrink-0 mb-3 mt-5 font-title text-21 text-title group-hover:text-primary line-clamp-2 sm:mt-2 transition-colors"
19
19
  data-cy="organizationName"
20
20
  >
21
21
  {{ organisation.name }}</span
22
22
  >
23
23
  <p
24
- class="abstract mt-4 mb-5 sm:mb-2 sm:mt-0 flex-grow flex-shrink-1 overflow-hidden"
24
+ class="abstract mt-4 mb-5 sm:mb-2 sm:mt-0 grow shrink-1 overflow-hidden"
25
25
  data-cy="organizationDesc"
26
26
  >
27
27
  {{ organisation.description }}
28
28
  </p>
29
- <div class="flex-shrink-0 text-primary opacity-50 flex leading-6">
29
+ <div class="shrink-0 text-primary opacity-50 flex leading-6">
30
30
  <mat-icon class="material-symbols-outlined text-primary opacity-50 mr-1"
31
31
  >folder_open
32
32
  </mat-icon>
@@ -21,3 +21,4 @@ export * from './lib/search-results-error/search-results-error.component'
21
21
  export * from './lib/thumbnail/thumbnail.component'
22
22
  export * from './lib/ui-elements.module'
23
23
  export * from './lib/user-preview/user-preview.component'
24
+ export * from './lib/notification/notification.component'
@@ -6,7 +6,7 @@
6
6
  *ngIf="imageUrl"
7
7
  [showContent]="imageUrl !== undefined"
8
8
  data-cy="record-thumbnail"
9
- class="flex-shrink-0 bg-gray-100 rounded-lg overflow-hidden w-full border border-gray-300 group-hover:shadow-xl group-hover:border-0 h-48 mb-3"
9
+ class="shrink-0 bg-gray-100 rounded-lg overflow-hidden w-full border border-gray-300 group-hover:shadow-xl group-hover:border-0 h-48 mb-3"
10
10
  >
11
11
  <gn-ui-thumbnail
12
12
  class="relative h-full w-full"