@provoly/dashboard 1.2.1 → 1.2.2

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 (38) hide show
  1. package/admin/components/admin-dataset/admin-select-dataset/admin-select-dataset.component.d.ts +3 -3
  2. package/esm2022/admin/components/admin-dataset/admin-select-dataset/admin-select-dataset.component.mjs +6 -6
  3. package/esm2022/lib/core/components/share/group-share/group-share.component.mjs +28 -21
  4. package/esm2022/lib/core/components/share/legacy-share/share.component.mjs +25 -37
  5. package/esm2022/lib/core/components/share/share.model.mjs +2 -7
  6. package/esm2022/lib/core/model/widget.interface.mjs +1 -1
  7. package/esm2022/lib/core/store/data-source/data-source.actions.mjs +1 -1
  8. package/esm2022/lib/core/store/data-source/data-source.model.mjs +7 -2
  9. package/esm2022/lib/core/toolbox/toolbox-menu.service.mjs +3 -6
  10. package/esm2022/restitution/components/restitution/restitution.component.mjs +8 -12
  11. package/esm2022/restitution/components/restitution-catalog/restitution-catalog.component.mjs +4 -5
  12. package/esm2022/restitution/components/restitution-list/restitution-list.component.mjs +2 -2
  13. package/esm2022/restitution/components/restitution-list-item/restitution-list-item.component.mjs +4 -5
  14. package/esm2022/search/components/save-query/save-query.component.mjs +2 -2
  15. package/esm2022/search/search-tools/search-tools.component.mjs +1 -1
  16. package/fesm2022/provoly-dashboard-admin.mjs +5 -5
  17. package/fesm2022/provoly-dashboard-admin.mjs.map +1 -1
  18. package/fesm2022/provoly-dashboard-restitution.mjs +11 -17
  19. package/fesm2022/provoly-dashboard-restitution.mjs.map +1 -1
  20. package/fesm2022/provoly-dashboard-search.mjs +2 -2
  21. package/fesm2022/provoly-dashboard-search.mjs.map +1 -1
  22. package/fesm2022/provoly-dashboard.mjs +101 -106
  23. package/fesm2022/provoly-dashboard.mjs.map +1 -1
  24. package/lib/core/components/share/group-share/group-share.component.d.ts +15 -10
  25. package/lib/core/components/share/legacy-share/share.component.d.ts +8 -14
  26. package/lib/core/components/share/share.model.d.ts +0 -9
  27. package/lib/core/model/widget.interface.d.ts +1 -2
  28. package/lib/core/store/data-source/data-source.actions.d.ts +9 -4
  29. package/lib/core/store/data-source/data-source.model.d.ts +9 -2
  30. package/lib/core/toolbox/toolbox-menu.service.d.ts +1 -3
  31. package/package.json +7 -7
  32. package/restitution/components/restitution/restitution.component.d.ts +2 -3
  33. package/restitution/components/restitution-catalog/restitution-catalog.component.d.ts +1 -2
  34. package/restitution/components/restitution-list-item/restitution-list-item.component.d.ts +1 -2
  35. package/search/components/save-query/save-query.component.d.ts +5 -2
  36. package/search/search-fulltext/store/search-fulltext.effects.d.ts +4 -1
  37. package/search/search-mono-class/store/search-mono-class.effects.d.ts +4 -1
  38. package/search/search-multi-class/store/search-multi-class.effects.d.ts +4 -1
@@ -1,46 +1,51 @@
1
1
  import { ChangeDetectorRef, EventEmitter } from '@angular/core';
2
2
  import { ControlValueAccessor } from '@angular/forms';
3
- import { Group, PryVisibilityType } from '../share.model';
3
+ import { Group } from '../share.model';
4
4
  import { BehaviorSubject, Observable } from 'rxjs';
5
5
  import { Store } from '@ngrx/store';
6
6
  import { SubscriptionnerDirective } from '../../../../dashboard/components/subscriptionner.directive';
7
7
  import * as i0 from "@angular/core";
8
+ export declare enum PryShareMode {
9
+ PRIVATE = "PRIVATE",
10
+ PUBLIC = "PUBLIC",
11
+ GROUPS = "GROUPS"
12
+ }
8
13
  export declare class PryGroupShareComponent extends SubscriptionnerDirective implements ControlValueAccessor {
9
14
  private store;
10
15
  private _cd;
11
16
  private _onChange;
12
17
  private _onTouched;
13
18
  assignedGroupNames$: BehaviorSubject<string[]>;
14
- radioValue: PryVisibilityType;
19
+ radioValue: PryShareMode;
15
20
  assignedGroups$: Observable<Group[]>;
16
21
  groups$: Observable<Group[]>;
17
- PryVisibilityType: typeof PryVisibilityType;
18
- visibilityTypes: {
22
+ PryShareMode: typeof PryShareMode;
23
+ shareModes: {
19
24
  label: string;
20
- value: PryVisibilityType;
25
+ value: PryShareMode;
21
26
  }[];
22
27
  templateData$: Observable<{
23
28
  groups: Group[];
24
29
  assignedGroups: Group[];
25
30
  disableRadios: {
26
- [key in PryVisibilityType]: boolean;
31
+ [key in PryShareMode]: boolean;
27
32
  };
28
33
  }>;
29
34
  _disableRadios$: BehaviorSubject<{
30
- [key in PryVisibilityType]: boolean;
35
+ [key in PryShareMode]: boolean;
31
36
  }>;
32
37
  set disableRadios(value: {
33
- [key in PryVisibilityType]: boolean;
38
+ [key in PryShareMode]: boolean;
34
39
  } | null);
35
40
  _allowedGroups$: BehaviorSubject<string[] | undefined>;
36
41
  set allowedGroups(value: string[] | null);
37
- radioValueChange: EventEmitter<PryVisibilityType>;
42
+ radioValueChange: EventEmitter<PryShareMode>;
38
43
  constructor(store: Store, _cd: ChangeDetectorRef);
39
44
  writeValue(value: string[] | undefined): void;
40
45
  registerOnChange(fn: any): void;
41
46
  registerOnTouched(fn: any): void;
42
47
  updateRadioValue(groups: string[]): void;
43
- changeGroupsBasedOnRadioValue(type: PryVisibilityType): void;
48
+ changeGroupsBasedOnRadioValue(type: PryShareMode): void;
44
49
  changeGroups(groups: (Group | string)[] | null): void;
45
50
  static ɵfac: i0.ɵɵFactoryDeclaration<PryGroupShareComponent, never>;
46
51
  static ɵcmp: i0.ɵɵComponentDeclaration<PryGroupShareComponent, "pry-group-share", never, { "disableRadios": { "alias": "disableRadios"; "required": false; }; "allowedGroups": { "alias": "allowedGroups"; "required": false; }; }, { "radioValueChange": "radioValueChange"; }, never, never, false, never>;
@@ -1,31 +1,25 @@
1
- import { ChangeDetectorRef, OnInit } from '@angular/core';
1
+ import { ChangeDetectorRef } from '@angular/core';
2
2
  import { ControlValueAccessor } from '@angular/forms';
3
- import { Observable } from 'rxjs';
4
- import { PryVisibility, PryVisibilityType } from '../share.model';
5
3
  import * as i0 from "@angular/core";
6
- export declare class PryShareComponent implements ControlValueAccessor, OnInit {
4
+ export declare class PryShareComponent implements ControlValueAccessor {
7
5
  private _cd;
8
6
  private _onChange;
9
7
  private _onTouched;
10
8
  _disabled: boolean;
11
- PryVisibilityType: typeof PryVisibilityType;
12
- value?: PryVisibility;
9
+ value: string[];
10
+ stringValue: 'private' | 'public';
13
11
  labelProperty: string;
14
12
  valueProperty: string;
15
- users$: Observable<any[]> | null;
16
13
  visibilityTypes: {
17
- label: string;
18
- value: string;
14
+ name: string;
19
15
  icon: string;
20
16
  }[];
21
17
  constructor(_cd: ChangeDetectorRef);
22
- ngOnInit(): void;
23
18
  registerOnChange(fn: any): void;
24
19
  registerOnTouched(fn: any): void;
25
20
  setDisabledState(isDisabled: boolean): void;
26
- writeValueUsers(obj: any[]): void;
27
- writeValueType(type: PryVisibilityType): void;
28
- writeValue(obj: any): void;
21
+ writeValue(value: string[]): void;
22
+ onChange($event: string): void;
29
23
  static ɵfac: i0.ɵɵFactoryDeclaration<PryShareComponent, never>;
30
- static ɵcmp: i0.ɵɵComponentDeclaration<PryShareComponent, "pry-share", never, { "value": { "alias": "value"; "required": false; }; "labelProperty": { "alias": "labelProperty"; "required": false; }; "valueProperty": { "alias": "valueProperty"; "required": false; }; "users$": { "alias": "users$"; "required": false; }; }, {}, never, never, false, never>;
24
+ static ɵcmp: i0.ɵɵComponentDeclaration<PryShareComponent, "pry-share", never, { "labelProperty": { "alias": "labelProperty"; "required": false; }; "valueProperty": { "alias": "valueProperty"; "required": false; }; }, {}, never, never, false, never>;
31
25
  }
@@ -1,8 +1,3 @@
1
- export declare enum PryVisibilityType {
2
- PRIVATE = "PRIVATE",
3
- PUBLIC = "PUBLIC",
4
- RESTRICTED = "RESTRICTED"
5
- }
6
1
  export interface Group {
7
2
  id: string;
8
3
  name: string;
@@ -14,7 +9,3 @@ export interface MissingGroupsByEntity {
14
9
  export interface ShareConflict {
15
10
  missingGroupsByEntity: MissingGroupsByEntity;
16
11
  }
17
- export interface PryVisibility {
18
- type: PryVisibilityType;
19
- users?: any[];
20
- }
@@ -1,11 +1,10 @@
1
- import { PryVisibility } from '../components/share/share.model';
2
1
  export interface Widget {
3
2
  id: string;
4
3
  name: string;
5
4
  description: string;
6
5
  image: string;
7
6
  content: string;
8
- visibility?: PryVisibility;
7
+ groups?: string[];
9
8
  datasource: string[];
10
9
  owner?: boolean;
11
10
  modificationDate: string;
@@ -1,8 +1,7 @@
1
- import { PryVisibility } from '../../components/share/share.model';
2
1
  import { DatasetPreview } from '../../model/dataset.interface';
3
2
  import { MonoClassSearchPayload } from '../../model/search-mono-class.model';
4
3
  import { FullTextSearchPayload, MultiClassSearchPayload } from '../../model/search-multi-class.model';
5
- import { Dataset, DatasetVersion, NamedQuery } from './data-source.model';
4
+ import { Dataset, DatasetVersion, NamedQuery, PryVisibilityType } from './data-source.model';
6
5
  export declare const DataSourceActions: {
7
6
  load: import("@ngrx/store").ActionCreator<"[Datasource] load", () => import("@ngrx/store/src/models").TypedAction<"[Datasource] load">>;
8
7
  namedQuery: {
@@ -21,7 +20,10 @@ export declare const DataSourceActions: {
21
20
  name: string;
22
21
  id?: string | undefined;
23
22
  description?: string | undefined;
24
- visibility?: PryVisibility | undefined;
23
+ visibility?: {
24
+ type: PryVisibilityType;
25
+ users?: any[] | undefined;
26
+ } | undefined;
25
27
  payload: MonoClassSearchPayload | MultiClassSearchPayload | FullTextSearchPayload;
26
28
  color?: string | undefined;
27
29
  favorite: boolean;
@@ -30,7 +32,10 @@ export declare const DataSourceActions: {
30
32
  name: string;
31
33
  id?: string | undefined;
32
34
  description?: string | undefined;
33
- visibility?: PryVisibility | undefined;
35
+ visibility?: {
36
+ type: PryVisibilityType;
37
+ users?: any[] | undefined;
38
+ } | undefined;
34
39
  payload: MonoClassSearchPayload | MultiClassSearchPayload | FullTextSearchPayload;
35
40
  color?: string | undefined;
36
41
  favorite: boolean;
@@ -1,4 +1,3 @@
1
- import { PryVisibility } from '../../components/share/share.model';
2
1
  import { MetadataValue } from '../../model/admin-api.model';
3
2
  import { PryDatasetType } from '../../model/dataset.interface';
4
3
  import { MonoClassSearchPayload } from '../../model/search-mono-class.model';
@@ -16,9 +15,17 @@ export interface NamedQuery extends DescriptionQuery {
16
15
  export interface DescriptionQuery {
17
16
  name: string;
18
17
  description?: string;
19
- visibility?: PryVisibility;
18
+ visibility?: {
19
+ type: PryVisibilityType;
20
+ users?: any[];
21
+ };
20
22
  metadata?: MetadataValue[];
21
23
  }
24
+ export declare enum PryVisibilityType {
25
+ PRIVATE = "PRIVATE",
26
+ PUBLIC = "PUBLIC",
27
+ RESTRICTED = "RESTRICTED"
28
+ }
22
29
  export interface Dataset extends DescriptionQuery {
23
30
  sourceType: 'dataset';
24
31
  id: string;
@@ -1,7 +1,6 @@
1
1
  import { Store } from '@ngrx/store';
2
2
  import { BehaviorSubject, Observable } from 'rxjs';
3
3
  import { WidgetFactoryService } from '../../dashboard/components/widgets/widget-instanciator/widget-factory.service';
4
- import { PryVisibility } from '../components/share/share.model';
5
4
  import { Widget } from '../model/widget.interface';
6
5
  import { ToolboxManifestService } from './toolbox-manifest.service';
7
6
  import { WidgetManifest } from '../model/manifest.interface';
@@ -19,7 +18,7 @@ export type CatalogEntry = WidgetDescriptionBase & {
19
18
  type: string;
20
19
  description?: string;
21
20
  isCustom?: boolean;
22
- visibility?: PryVisibility;
21
+ groups?: string[];
23
22
  cover?: boolean;
24
23
  };
25
24
  export declare const defaultMenuStructure: WidgetDescriptionMenu[];
@@ -39,7 +38,6 @@ export declare class ToolboxMenuService {
39
38
  constructor(widgetFactoryService: WidgetFactoryService, toolboxManifestService: ToolboxManifestService, store: Store);
40
39
  addMenu(icon: string, label: string): void;
41
40
  addWidget(menuLabel: string, icon: string, label: string, type: string): void;
42
- setMenuStructure(structure: WidgetDescriptionMenu[]): void;
43
41
  addToCatalog(widget: Widget, index: number): void;
44
42
  isValidForCatalog(name: string): false;
45
43
  static ɵfac: i0.ɵɵFactoryDeclaration<ToolboxMenuService, never>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@provoly/dashboard",
3
- "version": "1.2.1",
3
+ "version": "1.2.2",
4
4
  "type": "commonjs",
5
5
  "peerDependencies": {
6
6
  "@angular/cdk": "16.x || 17.x",
@@ -330,17 +330,17 @@
330
330
  "esm": "./esm2022/widgets/widget-template/provoly-dashboard-widgets-widget-template.mjs",
331
331
  "default": "./fesm2022/provoly-dashboard-widgets-widget-template.mjs"
332
332
  },
333
- "./widgets/widget-tile": {
334
- "types": "./widgets/widget-tile/index.d.ts",
335
- "esm2022": "./esm2022/widgets/widget-tile/provoly-dashboard-widgets-widget-tile.mjs",
336
- "esm": "./esm2022/widgets/widget-tile/provoly-dashboard-widgets-widget-tile.mjs",
337
- "default": "./fesm2022/provoly-dashboard-widgets-widget-tile.mjs"
338
- },
339
333
  "./widgets/widget-vega": {
340
334
  "types": "./widgets/widget-vega/index.d.ts",
341
335
  "esm2022": "./esm2022/widgets/widget-vega/provoly-dashboard-widgets-widget-vega.mjs",
342
336
  "esm": "./esm2022/widgets/widget-vega/provoly-dashboard-widgets-widget-vega.mjs",
343
337
  "default": "./fesm2022/provoly-dashboard-widgets-widget-vega.mjs"
338
+ },
339
+ "./widgets/widget-tile": {
340
+ "types": "./widgets/widget-tile/index.d.ts",
341
+ "esm2022": "./esm2022/widgets/widget-tile/provoly-dashboard-widgets-widget-tile.mjs",
342
+ "esm": "./esm2022/widgets/widget-tile/provoly-dashboard-widgets-widget-tile.mjs",
343
+ "default": "./fesm2022/provoly-dashboard-widgets-widget-tile.mjs"
344
344
  }
345
345
  },
346
346
  "schematics": "./schematics/collection.json",
@@ -1,6 +1,6 @@
1
1
  import { EventEmitter, OnInit } from '@angular/core';
2
2
  import { Store } from '@ngrx/store';
3
- import { CatalogEntry, Class, DataSource, LibraryTypes, PryVisibility, SubscriptionnerDirective, ToolboxManifestService, ToolboxMenuService, Widget, WidgetManifest } from '@provoly/dashboard';
3
+ import { CatalogEntry, Class, DataSource, LibraryTypes, SubscriptionnerDirective, ToolboxManifestService, ToolboxMenuService, Widget, WidgetManifest } from '@provoly/dashboard';
4
4
  import { PryStepperComponent } from '@provoly/dashboard/components/stepper';
5
5
  import { Observable, Subject } from 'rxjs';
6
6
  import { RestitutionForm } from '../../model/restitution.model';
@@ -18,9 +18,8 @@ export declare class PryRestitutionComponent extends SubscriptionnerDirective im
18
18
  classes$: Observable<Class[]>;
19
19
  customManifest: WidgetManifest;
20
20
  form: RestitutionForm;
21
- visibility: PryVisibility;
21
+ groups: string[];
22
22
  openSettings$: Subject<void>;
23
- users$: Observable<any[]> | null;
24
23
  consultMode: boolean;
25
24
  selectedRestitution: Widget | null;
26
25
  edit: boolean;
@@ -1,7 +1,7 @@
1
1
  import { Overlay, OverlayRef } from '@angular/cdk/overlay';
2
2
  import { TemplateRef, ViewContainerRef } from '@angular/core';
3
3
  import { Store } from '@ngrx/store';
4
- import { PryVisibilityType, ViewMode, Widget } from '@provoly/dashboard';
4
+ import { ViewMode, Widget } from '@provoly/dashboard';
5
5
  import { BehaviorSubject, Observable } from 'rxjs';
6
6
  import * as i0 from "@angular/core";
7
7
  export declare class PryRestitutionCatalogComponent {
@@ -15,7 +15,6 @@ export declare class PryRestitutionCatalogComponent {
15
15
  selectedMode: ViewMode;
16
16
  selectedRestitution: Widget | null;
17
17
  restitution?: Widget;
18
- PryVisibilityType: typeof PryVisibilityType;
19
18
  overlayRef?: OverlayRef;
20
19
  templateActions: TemplateRef<any>;
21
20
  constructor(store: Store, overlay: Overlay, viewContainerRef: ViewContainerRef);
@@ -1,5 +1,5 @@
1
1
  import { Store } from '@ngrx/store';
2
- import { CatalogEntry, PryVisibilityType, SubscriptionnerDirective, ToolboxManifestService, Widget } from '@provoly/dashboard';
2
+ import { CatalogEntry, SubscriptionnerDirective, ToolboxManifestService, Widget } from '@provoly/dashboard';
3
3
  import { Observable } from 'rxjs';
4
4
  import * as i0 from "@angular/core";
5
5
  export declare class PryRestitutionListItemComponent extends SubscriptionnerDirective {
@@ -10,7 +10,6 @@ export declare class PryRestitutionListItemComponent extends SubscriptionnerDire
10
10
  catalog: Widget[] | undefined;
11
11
  automaticGridMode$: Observable<boolean>;
12
12
  automaticGridMode: boolean;
13
- PryVisibilityType: typeof PryVisibilityType;
14
13
  constructor(store: Store, toolboxManifestService: ToolboxManifestService);
15
14
  dragStart($event: DragEvent, type: string): void;
16
15
  viewInDashboard(widget: CatalogEntry): void;
@@ -1,6 +1,6 @@
1
1
  import { ElementRef, OnInit } from '@angular/core';
2
2
  import { Store } from '@ngrx/store';
3
- import { NamedQuery, NamedQueryTypes, PryDialogRef, PryVisibility } from '@provoly/dashboard';
3
+ import { NamedQuery, NamedQueryTypes, PryDialogRef, PryVisibilityType } from '@provoly/dashboard';
4
4
  import { Observable } from 'rxjs';
5
5
  import { SearchFulltextChange } from '../../search-fulltext/search-fulltext/search-fulltext.component';
6
6
  import * as i0 from "@angular/core";
@@ -15,7 +15,10 @@ export declare class PrySaveQueryComponent implements OnInit {
15
15
  id?: string;
16
16
  name: string;
17
17
  description: string;
18
- visibility: PryVisibility;
18
+ visibility: {
19
+ type: PryVisibilityType;
20
+ users: never[];
21
+ };
19
22
  savedNameQuery?: NamedQuery;
20
23
  get modalSave(): boolean;
21
24
  get saveDisabled(): boolean;
@@ -10,7 +10,10 @@ export declare class SearchFulltextEffects {
10
10
  name: string;
11
11
  id?: string | undefined;
12
12
  description?: string | undefined;
13
- visibility?: import("@provoly/dashboard").PryVisibility | undefined;
13
+ visibility?: {
14
+ type: import("@provoly/dashboard").PryVisibilityType;
15
+ users?: any[] | undefined;
16
+ } | undefined;
14
17
  payload: import("@provoly/dashboard").FullTextSearchPayload | import("@provoly/dashboard").MonoClassSearchPayload | import("@provoly/dashboard").MultiClassSearchPayload;
15
18
  color?: string | undefined;
16
19
  favorite: boolean;
@@ -32,7 +32,10 @@ export declare class SearchMonoClassEffects {
32
32
  name: string;
33
33
  id?: string | undefined;
34
34
  description?: string | undefined;
35
- visibility?: import("@provoly/dashboard").PryVisibility | undefined;
35
+ visibility?: {
36
+ type: import("@provoly/dashboard").PryVisibilityType;
37
+ users?: any[] | undefined;
38
+ } | undefined;
36
39
  payload: import("@provoly/dashboard").FullTextSearchPayload | MonoClassSearchPayload | MultiClassSearchPayload;
37
40
  color?: string | undefined;
38
41
  favorite: boolean;
@@ -20,7 +20,10 @@ export declare class SearchMultiClassEffects {
20
20
  name: string;
21
21
  id?: string | undefined;
22
22
  description?: string | undefined;
23
- visibility?: import("@provoly/dashboard").PryVisibility | undefined;
23
+ visibility?: {
24
+ type: import("@provoly/dashboard").PryVisibilityType;
25
+ users?: any[] | undefined;
26
+ } | undefined;
24
27
  payload: import("@provoly/dashboard").FullTextSearchPayload | import("@provoly/dashboard").MonoClassSearchPayload | import("@provoly/dashboard").MultiClassSearchPayload;
25
28
  color?: string | undefined;
26
29
  favorite: boolean;