@provoly/dashboard 1.1.1 → 1.1.3

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 (89) hide show
  1. package/dataset/components/dataset-detail/dataset-detail.component.d.ts +1 -0
  2. package/esm2022/dataset/components/dataset-detail/dataset-detail.component.mjs +4 -3
  3. package/esm2022/lib/core/components/share/access-rights-share/access-rights-share.component.mjs +127 -0
  4. package/esm2022/lib/core/components/share/group-share/group-share.component.mjs +1 -1
  5. package/esm2022/lib/core/components/share/legacy-share/share.component.mjs +83 -0
  6. package/esm2022/lib/core/components/share/share.module.mjs +9 -7
  7. package/esm2022/lib/core/components/share/share.utils.mjs +46 -1
  8. package/esm2022/lib/core/i18n/en.translations.mjs +15 -7
  9. package/esm2022/lib/core/i18n/fr.translations.mjs +16 -7
  10. package/esm2022/lib/core/model/manifest.interface.mjs +1 -1
  11. package/esm2022/lib/core/model/widget-aggregated-chart-manifest.interface.mjs +1 -1
  12. package/esm2022/lib/core/public-api.mjs +3 -2
  13. package/esm2022/lib/core/store/aggregation/backend-aggregation.service.mjs +8 -12
  14. package/esm2022/lib/core/store/aggregation/frontend-aggregation/aggregation-utils.class.mjs +5 -11
  15. package/esm2022/lib/core/store/aggregation/frontend-aggregation/frontend-aggregation.service.mjs +6 -6
  16. package/esm2022/lib/dashboard/components/widgets/header/widget-header.component.mjs +4 -2
  17. package/esm2022/lib/dashboard/store/dashboard.actions.mjs +1 -1
  18. package/esm2022/lib/dashboard/store/dashboard.effects.mjs +2 -2
  19. package/esm2022/lib/dashboard/store/manifest.service.mjs +3 -3
  20. package/esm2022/presentation/components/presentation.component.mjs +13 -25
  21. package/esm2022/toolbox/components/save-view/save-view.component.mjs +8 -8
  22. package/esm2022/toolbox/components/share/share.component.mjs +9 -15
  23. package/esm2022/widgets/widget-aggregated-chart/component/widget-aggregated-chart.component.mjs +42 -87
  24. package/esm2022/widgets/widget-aggregated-chart/i18n/en.translations.mjs +2 -1
  25. package/esm2022/widgets/widget-aggregated-chart/i18n/fr.translations.mjs +3 -5
  26. package/esm2022/widgets/widget-analytic/component/widget-analytic.component.mjs +2 -2
  27. package/esm2022/widgets/widget-chart/component/widget-chart.component.mjs +2 -2
  28. package/esm2022/widgets/widget-graph/component/widget-graph.component.mjs +2 -2
  29. package/esm2022/widgets/widget-iframe/component/widget-iframe.component.mjs +2 -2
  30. package/esm2022/widgets/widget-map/component/widget-map.component.mjs +5 -5
  31. package/esm2022/widgets/widget-map/interaction/tooltip-manager.class.mjs +2 -2
  32. package/esm2022/widgets/widget-map/style/css.component.mjs +2 -2
  33. package/esm2022/widgets/widget-table/component/widget-table.component.mjs +2 -2
  34. package/esm2022/widgets/widget-vega/component/widget-vega.component.mjs +2 -2
  35. package/fesm2022/provoly-dashboard-dataset.mjs +3 -2
  36. package/fesm2022/provoly-dashboard-dataset.mjs.map +1 -1
  37. package/fesm2022/provoly-dashboard-presentation.mjs +12 -24
  38. package/fesm2022/provoly-dashboard-presentation.mjs.map +1 -1
  39. package/fesm2022/provoly-dashboard-toolbox.mjs +15 -21
  40. package/fesm2022/provoly-dashboard-toolbox.mjs.map +1 -1
  41. package/fesm2022/provoly-dashboard-widgets-widget-aggregated-chart.mjs +45 -91
  42. package/fesm2022/provoly-dashboard-widgets-widget-aggregated-chart.mjs.map +1 -1
  43. package/fesm2022/provoly-dashboard-widgets-widget-analytic.mjs +1 -1
  44. package/fesm2022/provoly-dashboard-widgets-widget-analytic.mjs.map +1 -1
  45. package/fesm2022/provoly-dashboard-widgets-widget-chart.mjs +1 -1
  46. package/fesm2022/provoly-dashboard-widgets-widget-chart.mjs.map +1 -1
  47. package/fesm2022/provoly-dashboard-widgets-widget-graph.mjs +1 -1
  48. package/fesm2022/provoly-dashboard-widgets-widget-graph.mjs.map +1 -1
  49. package/fesm2022/provoly-dashboard-widgets-widget-iframe.mjs +1 -1
  50. package/fesm2022/provoly-dashboard-widgets-widget-iframe.mjs.map +1 -1
  51. package/fesm2022/provoly-dashboard-widgets-widget-map.mjs +7 -7
  52. package/fesm2022/provoly-dashboard-widgets-widget-map.mjs.map +1 -1
  53. package/fesm2022/provoly-dashboard-widgets-widget-table.mjs +1 -1
  54. package/fesm2022/provoly-dashboard-widgets-widget-table.mjs.map +1 -1
  55. package/fesm2022/provoly-dashboard-widgets-widget-vega.mjs +1 -1
  56. package/fesm2022/provoly-dashboard-widgets-widget-vega.mjs.map +1 -1
  57. package/fesm2022/provoly-dashboard.mjs +214 -48
  58. package/fesm2022/provoly-dashboard.mjs.map +1 -1
  59. package/lib/core/components/share/access-rights-share/access-rights-share.component.d.ts +47 -0
  60. package/lib/core/components/share/{share.component.d.ts → legacy-share/share.component.d.ts} +1 -1
  61. package/lib/core/components/share/share.module.d.ts +10 -8
  62. package/lib/core/components/share/share.utils.d.ts +18 -0
  63. package/lib/core/i18n/en.translations.d.ts +12 -4
  64. package/lib/core/i18n/fr.translations.d.ts +13 -4
  65. package/lib/core/model/manifest.interface.d.ts +3 -1
  66. package/lib/core/model/widget-aggregated-chart-manifest.interface.d.ts +3 -12
  67. package/lib/core/public-api.d.ts +2 -1
  68. package/lib/core/store/aggregation/frontend-aggregation/aggregation-utils.class.d.ts +4 -4
  69. package/lib/core/store/aggregation/frontend-aggregation/frontend-aggregation.service.d.ts +2 -2
  70. package/lib/dashboard/components/widgets/header/widget-header.component.d.ts +3 -1
  71. package/lib/dashboard/store/dashboard.actions.d.ts +6 -2
  72. package/lib/dashboard/store/manifest.service.d.ts +3 -1
  73. package/package.json +31 -31
  74. package/presentation/components/presentation.component.d.ts +7 -7
  75. package/styles/components/_o-access-rights-share.scss +73 -0
  76. package/styles/components/_o-pry-admin-classes-customize.scss +4 -4
  77. package/styles/main.scss +1 -0
  78. package/styles-theme/components-theme/_o-widget.theme.scss +0 -14
  79. package/toolbox/components/save-view/save-view.component.d.ts +6 -2
  80. package/toolbox/components/share/share.component.d.ts +6 -4
  81. package/widgets/widget-aggregated-chart/component/widget-aggregated-chart.component.d.ts +9 -7
  82. package/widgets/widget-aggregated-chart/i18n/en.translations.d.ts +1 -0
  83. package/widgets/widget-aggregated-chart/i18n/fr.translations.d.ts +2 -4
  84. package/widgets/widget-iframe/component/widget-iframe.component.d.ts +3 -1
  85. package/widgets/widget-map/component/widget-map.component.d.ts +3 -1
  86. package/widgets/widget-map/style/_m-layer-legend.scss +1 -4
  87. package/widgets/widget-table/component/widget-table.component.d.ts +3 -1
  88. package/widgets/widget-tile/component/widget-tile.component.d.ts +3 -1
  89. package/esm2022/lib/core/components/share/share.component.mjs +0 -83
@@ -0,0 +1,47 @@
1
+ import { ControlValueAccessor } from '@angular/forms';
2
+ import { Store } from '@ngrx/store';
3
+ import { SubscriptionnerDirective } from '../../../../dashboard/components/subscriptionner.directive';
4
+ import { Group } from '../share.model';
5
+ import { ManifestDescription } from '../../../model/manifest.interface';
6
+ import { PryI18nService } from '../../../i18n/i18n.service';
7
+ import { BehaviorSubject, Observable } from 'rxjs';
8
+ import * as i0 from "@angular/core";
9
+ export declare class PryAccessRightsShareComponent extends SubscriptionnerDirective implements ControlValueAccessor {
10
+ private store;
11
+ protected i18n: PryI18nService;
12
+ value: {
13
+ [key: string]: string;
14
+ };
15
+ private _onChange;
16
+ private _onTouched;
17
+ manifestDescription?: ManifestDescription;
18
+ _allowedGroups$: BehaviorSubject<string[] | undefined>;
19
+ set allowedGroups(value: string[] | null);
20
+ groups$: Observable<(Group & {
21
+ label: string;
22
+ })[]>;
23
+ accessRights: {
24
+ label: string;
25
+ value: string;
26
+ }[];
27
+ selectedGroups?: Group[];
28
+ selectedAccessRight: string;
29
+ assignedGroups$: BehaviorSubject<string[]>;
30
+ constructor(store: Store, i18n: PryI18nService);
31
+ writeValue(value: {
32
+ [key: string]: string[];
33
+ } | undefined): void;
34
+ registerOnChange(fn: any): void;
35
+ registerOnTouched(fn: any): void;
36
+ onChange(): void;
37
+ addAccess(): void;
38
+ modifyGroupAccess(group: string, access: string): void;
39
+ removeGroupAccess(group: string): void;
40
+ resetSelection(): void;
41
+ isAddingDisabled(): boolean;
42
+ emitAlreadyAssignedGroups(): void;
43
+ protected readonly getGroupLabel: (group: Group, i18n: PryI18nService) => string;
44
+ protected readonly getGroupLabelByName: (groupName: string, i18n: PryI18nService) => string;
45
+ static ɵfac: i0.ɵɵFactoryDeclaration<PryAccessRightsShareComponent, never>;
46
+ static ɵcmp: i0.ɵɵComponentDeclaration<PryAccessRightsShareComponent, "pry-access-rights-share", never, { "manifestDescription": { "alias": "manifestDescription"; "required": true; }; "allowedGroups": { "alias": "allowedGroups"; "required": false; }; }, {}, never, never, false, never>;
47
+ }
@@ -1,7 +1,7 @@
1
1
  import { ChangeDetectorRef, OnInit } from '@angular/core';
2
2
  import { ControlValueAccessor } from '@angular/forms';
3
3
  import { Observable } from 'rxjs';
4
- import { PryVisibility, PryVisibilityType } from './share.model';
4
+ import { PryVisibility, PryVisibilityType } from '../share.model';
5
5
  import * as i0 from "@angular/core";
6
6
  export declare class PryShareComponent implements ControlValueAccessor, OnInit {
7
7
  private _cd;
@@ -1,14 +1,16 @@
1
1
  import * as i0 from "@angular/core";
2
- import * as i1 from "./share.component";
2
+ import * as i1 from "./legacy-share/share.component";
3
3
  import * as i2 from "./group-share/group-share.component";
4
- import * as i3 from "@angular/common";
5
- import * as i4 from "@angular/forms";
6
- import * as i5 from "../select/select.module";
7
- import * as i6 from "../../i18n/i18n.module";
8
- import * as i7 from "../../core.module";
9
- import * as i8 from "../../../dashboard/dashboard.module";
4
+ import * as i3 from "./access-rights-share/access-rights-share.component";
5
+ import * as i4 from "@angular/common";
6
+ import * as i5 from "@angular/forms";
7
+ import * as i6 from "../select/select.module";
8
+ import * as i7 from "../../i18n/i18n.module";
9
+ import * as i8 from "../../core.module";
10
+ import * as i9 from "../../../dashboard/dashboard.module";
11
+ import * as i10 from "../icon/icon.module";
10
12
  export declare class PryShareModule {
11
13
  static ɵfac: i0.ɵɵFactoryDeclaration<PryShareModule, never>;
12
- static ɵmod: i0.ɵɵNgModuleDeclaration<PryShareModule, [typeof i1.PryShareComponent, typeof i2.PryGroupShareComponent], [typeof i3.CommonModule, typeof i4.FormsModule, typeof i5.PrySelectModule, typeof i6.PryI18nModule, typeof i7.PryCoreModule, typeof i8.PryDashboardModule], [typeof i1.PryShareComponent, typeof i2.PryGroupShareComponent]>;
14
+ static ɵmod: i0.ɵɵNgModuleDeclaration<PryShareModule, [typeof i1.PryShareComponent, typeof i2.PryGroupShareComponent, typeof i3.PryAccessRightsShareComponent], [typeof i4.CommonModule, typeof i5.FormsModule, typeof i6.PrySelectModule, typeof i7.PryI18nModule, typeof i8.PryCoreModule, typeof i9.PryDashboardModule, typeof i10.PryIconModule], [typeof i1.PryShareComponent, typeof i2.PryGroupShareComponent, typeof i3.PryAccessRightsShareComponent]>;
13
15
  static ɵinj: i0.ɵɵInjectorDeclaration<PryShareModule>;
14
16
  }
@@ -1,4 +1,22 @@
1
1
  import { ManifestDescription } from '../../model/manifest.interface';
2
2
  import { Dataset } from '../../store/data-source/data-source.model';
3
+ import { Group } from './share.model';
4
+ import { PryI18nService } from '../../i18n/i18n.service';
5
+ export declare const READ_ACCESS = "READ";
6
+ export declare const WRITE_ACCESS = "WRITE";
7
+ export declare const getGroupLabel: (group: Group, i18n: PryI18nService) => string;
8
+ export declare const getGroupLabelByName: (groupName: string, i18n: PryI18nService) => string;
3
9
  export declare const canManifestBeMadePublic: (manifest: ManifestDescription, datasets: Dataset[]) => boolean;
4
10
  export declare const getCommonDatasourceGroupsForManifest: (manifest: ManifestDescription, datasets: Dataset[]) => string[];
11
+ export declare const getAccessRightsArrayByGroup: (accessByGroup: {
12
+ [key: string]: string;
13
+ }) => {
14
+ [key: string]: string[];
15
+ };
16
+ export declare const getAccessArray: (access: string) => string[];
17
+ export declare const getAccessRightsStringByGroup: (accessByGroup: {
18
+ [key: string]: string[];
19
+ }) => {
20
+ [key: string]: string;
21
+ };
22
+ export declare const getAccessString: (accessArray: string[]) => string;
@@ -163,6 +163,7 @@ export declare const enTranslations: {
163
163
  switchEdit: string;
164
164
  switchEditContent: string;
165
165
  share: string;
166
+ shareAccessRights: string;
166
167
  delete: string;
167
168
  notInDsAttr: string;
168
169
  };
@@ -300,11 +301,22 @@ export declare const enTranslations: {
300
301
  type: string;
301
302
  users: string;
302
303
  noGroups: string;
304
+ groups: {
305
+ ALL: string;
306
+ AUTHENTICATED: string;
307
+ };
303
308
  conflict: {
304
309
  title: string;
305
310
  main: string;
306
311
  unavailable: string;
307
312
  };
313
+ dashboardAccess: string;
314
+ placeholder: string;
315
+ read: string;
316
+ write: string;
317
+ accessDescription: string;
318
+ me: string;
319
+ owner: string;
308
320
  };
309
321
  homepage: {
310
322
  menu: {
@@ -331,10 +343,6 @@ export declare const enTranslations: {
331
343
  selectItem: string;
332
344
  unselectItem: string;
333
345
  noItemSelected: string;
334
- groups: {
335
- ALL: string;
336
- AUTHENTICATED: string;
337
- };
338
346
  };
339
347
  };
340
348
  };
@@ -163,6 +163,7 @@ export declare const frTranslations: {
163
163
  switchEdit: string;
164
164
  switchEditContent: string;
165
165
  share: string;
166
+ shareAccessRights: string;
166
167
  delete: string;
167
168
  notInDsAttr: string;
168
169
  };
@@ -219,6 +220,7 @@ export declare const frTranslations: {
219
220
  };
220
221
  };
221
222
  action: {
223
+ add: string;
222
224
  close: string;
223
225
  closePanel: string;
224
226
  delete: string;
@@ -300,12 +302,23 @@ export declare const frTranslations: {
300
302
  restricted: string;
301
303
  type: string;
302
304
  users: string;
305
+ groups: {
306
+ ALL: string;
307
+ AUTHENTICATED: string;
308
+ };
303
309
  noGroups: string;
304
310
  conflict: {
305
311
  title: string;
306
312
  main: string;
307
313
  unavailable: string;
308
314
  };
315
+ dashboardAccess: string;
316
+ placeholder: string;
317
+ read: string;
318
+ write: string;
319
+ accessDescription: string;
320
+ me: string;
321
+ owner: string;
309
322
  };
310
323
  homepage: {
311
324
  menu: {
@@ -332,10 +345,6 @@ export declare const frTranslations: {
332
345
  selectItem: string;
333
346
  unselectItem: string;
334
347
  noItemSelected: string;
335
- groups: {
336
- ALL: string;
337
- AUTHENTICATED: string;
338
- };
339
348
  };
340
349
  };
341
350
  };
@@ -19,7 +19,9 @@ export interface ManifestDescription {
19
19
  image: string;
20
20
  creationDate: string;
21
21
  modificationDate: string;
22
- groups: string[];
22
+ accessRightsByGroup: {
23
+ [key: string]: string[];
24
+ };
23
25
  owner: boolean;
24
26
  datasource: string[];
25
27
  metadata?: MetadataValue[];
@@ -22,16 +22,7 @@ export declare enum GraphType {
22
22
  HISTOGRAM = "bar-histogram",
23
23
  POINTS = "point-default"
24
24
  }
25
- export interface AtLimit {
26
- at: number;
27
- others: boolean;
28
- order: 'asc' | 'desc';
29
- isTimeLimit: false;
30
- }
31
- export interface TimeLimit {
32
- interval: 'second' | 'minute' | 'hour' | 'day' | 'week' | 'quarter' | 'year';
33
- isTimeLimit: true;
34
- }
25
+ export type TimeInterval = 'second' | 'minute' | 'hour' | 'day' | 'week' | 'quarter' | 'year';
35
26
  export interface Sort {
36
27
  value: 'key' | 'value';
37
28
  direction: 'asc' | 'desc';
@@ -41,7 +32,8 @@ export interface ChartAggregatedWidgetOptions {
41
32
  label: string;
42
33
  attribute: string;
43
34
  keep0: boolean;
44
- limit?: AtLimit | TimeLimit;
35
+ limit?: number | null;
36
+ interval?: number | TimeInterval;
45
37
  };
46
38
  ordinate: {
47
39
  operation: Operation;
@@ -61,7 +53,6 @@ export interface ChartAggregatedWidgetOptions {
61
53
  stacked?: boolean;
62
54
  legend?: boolean;
63
55
  sort?: Sort;
64
- limitItems?: number | null;
65
56
  };
66
57
  additionalSpec?: any;
67
58
  circleColorScheme?: string;
@@ -90,8 +90,9 @@ export * from './components/select/select.component';
90
90
  export * from './components/select/select.module';
91
91
  export * from './components/range/range.component';
92
92
  export * from './components/range/range.module';
93
- export * from './components/share/share.component';
93
+ export * from './components/share/legacy-share/share.component';
94
94
  export * from './components/share/group-share/group-share.component';
95
+ export * from './components/share/access-rights-share/access-rights-share.component';
95
96
  export * from './components/share/share.model';
96
97
  export * from './components/share/share.utils';
97
98
  export * from './components/share/share.module';
@@ -1,4 +1,4 @@
1
- import { AtLimit, ChartAggregatedWidgetOptions, Operation, TimeLimit } from '../../../model/widget-aggregated-chart-manifest.interface';
1
+ import { ChartAggregatedWidgetOptions, Operation, TimeInterval } from '../../../model/widget-aggregated-chart-manifest.interface';
2
2
  import { Class } from '../../class/class.interface';
3
3
  import { Item, ValueType } from '../../../model/item.interface';
4
4
  import { ResultSets } from '../../../model/result-set.interface';
@@ -15,19 +15,19 @@ export declare class AggregationUtils {
15
15
  static formatByLimit(data: {
16
16
  key: ValueType;
17
17
  value: ValueType;
18
- }[], limit: AtLimit | TimeLimit, operation: Operation): {
18
+ }[], interval: number | TimeInterval, operation: Operation): {
19
19
  key: ValueType;
20
20
  value: ValueType;
21
21
  }[];
22
22
  static formatDataByTimeLimit(data: {
23
23
  key: ValueType;
24
24
  value: ValueType;
25
- }[], limit: TimeLimit, operation: Operation): {
25
+ }[], interval: TimeInterval, operation: Operation): {
26
26
  value: ValueType;
27
27
  key: ValueType;
28
28
  values: ValueType[];
29
29
  }[];
30
- static getKeyValueForTimeInterval(key: ValueType, interval: 'second' | 'minute' | 'hour' | 'day' | 'week' | 'quarter' | 'year'): string;
30
+ static getKeyValueForTimeInterval(key: ValueType, interval: TimeInterval): string;
31
31
  static filterItems(items: Item[], filters: Filter[]): Item[];
32
32
  static doesItemValuePassFilter(item: Item, attribute: string, operator: string | undefined, filterValue: string | number | undefined): boolean;
33
33
  }
@@ -1,7 +1,7 @@
1
1
  import { Store } from '@ngrx/store';
2
2
  import { Observable } from 'rxjs';
3
3
  import { Item, ValueType } from '../../../model/item.interface';
4
- import { AtLimit, ChartAggregatedWidgetOptions, Operation, TimeLimit } from '../../../model/widget-aggregated-chart-manifest.interface';
4
+ import { ChartAggregatedWidgetOptions, Operation, TimeInterval } from '../../../model/widget-aggregated-chart-manifest.interface';
5
5
  import { AggregationResult, PryAggregationService } from '../base-aggregation.service';
6
6
  import { Class } from '../../class/class.interface';
7
7
  import * as i0 from "@angular/core";
@@ -13,7 +13,7 @@ export declare class PryFrontendAggregationService extends PryAggregationService
13
13
  getItemsGroupedByAttributeValue(items: Item[], attribute: string): {
14
14
  [key: string | number]: Item[];
15
15
  };
16
- getChartDataBasedOnOperation(items: Item[], operation: Operation, abscissa: string, ordinate: string, limit?: AtLimit | TimeLimit): {
16
+ getChartDataBasedOnOperation(items: Item[], operation: Operation, abscissa: string, ordinate: string, interval?: number | TimeInterval): {
17
17
  key: ValueType;
18
18
  value: ValueType;
19
19
  }[];
@@ -10,7 +10,9 @@ import { ToolboxMenuService } from '../../../../core/toolbox/toolbox-menu.servic
10
10
  import { SubscriptionnerDirective } from '../../subscriptionner.directive';
11
11
  import { WidgetContextMenuDisplayOptions } from '../../../../core/model/display-options.interface';
12
12
  import * as i0 from "@angular/core";
13
- export declare const WIDGET_HEADER_HEIGHT = 32;
13
+ export declare const WIDGET_HEADER_HEIGHT: {
14
+ value: number;
15
+ };
14
16
  export type HeaderAction = {
15
17
  icon: string;
16
18
  action: (that: PryWidgetHeaderComponent) => void;
@@ -247,7 +247,9 @@ export declare const DashboardActions: {
247
247
  metadataDefId: string;
248
248
  value: string;
249
249
  }[] | undefined;
250
- groups?: string[] | undefined;
250
+ accessRightsByGroup?: {
251
+ [key: string]: string[];
252
+ } | undefined;
251
253
  additionalInformation?: string | undefined;
252
254
  }) => {
253
255
  name: string;
@@ -259,7 +261,9 @@ export declare const DashboardActions: {
259
261
  metadataDefId: string;
260
262
  value: string;
261
263
  }[] | undefined;
262
- groups?: string[] | undefined;
264
+ accessRightsByGroup?: {
265
+ [key: string]: string[];
266
+ } | undefined;
263
267
  additionalInformation?: string | undefined;
264
268
  } & import("@ngrx/store/src/models").TypedAction<"[Dashboard] save manifest">>;
265
269
  solveCollisions: import("@ngrx/store").ActionCreator<"[Dashboard] solving collisions", () => import("@ngrx/store/src/models").TypedAction<"[Dashboard] solving collisions">>;
@@ -17,7 +17,9 @@ export declare class ManifestService {
17
17
  save(name: string, manifest: GlobalManifest, id: string, description?: string, image?: string, metadata?: {
18
18
  metadataDefId: string;
19
19
  value: string;
20
- }[], groups?: string[], additionalInformation?: string): Observable<ShareConflict>;
20
+ }[], accesRightsByGroup?: {
21
+ [key: string]: string[];
22
+ }, additionalInformation?: string): Observable<ShareConflict>;
21
23
  delete(id: string): Observable<void>;
22
24
  default(id: string): Observable<boolean>;
23
25
  addMetadata(presentationId: string, metadataId: string, value: string): Observable<void>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@provoly/dashboard",
3
- "version": "1.1.1",
3
+ "version": "1.1.3",
4
4
  "type": "commonjs",
5
5
  "peerDependencies": {
6
6
  "@angular/cdk": "16.x || 17.x",
@@ -132,36 +132,6 @@
132
132
  "esm": "./esm2022/toolbox/provoly-dashboard-toolbox.mjs",
133
133
  "default": "./fesm2022/provoly-dashboard-toolbox.mjs"
134
134
  },
135
- "./filters/autocomplete": {
136
- "types": "./filters/autocomplete/index.d.ts",
137
- "esm2022": "./esm2022/filters/autocomplete/provoly-dashboard-filters-autocomplete.mjs",
138
- "esm": "./esm2022/filters/autocomplete/provoly-dashboard-filters-autocomplete.mjs",
139
- "default": "./fesm2022/provoly-dashboard-filters-autocomplete.mjs"
140
- },
141
- "./filters/date": {
142
- "types": "./filters/date/index.d.ts",
143
- "esm2022": "./esm2022/filters/date/provoly-dashboard-filters-date.mjs",
144
- "esm": "./esm2022/filters/date/provoly-dashboard-filters-date.mjs",
145
- "default": "./fesm2022/provoly-dashboard-filters-date.mjs"
146
- },
147
- "./filters/list": {
148
- "types": "./filters/list/index.d.ts",
149
- "esm2022": "./esm2022/filters/list/provoly-dashboard-filters-list.mjs",
150
- "esm": "./esm2022/filters/list/provoly-dashboard-filters-list.mjs",
151
- "default": "./fesm2022/provoly-dashboard-filters-list.mjs"
152
- },
153
- "./filters/number": {
154
- "types": "./filters/number/index.d.ts",
155
- "esm2022": "./esm2022/filters/number/provoly-dashboard-filters-number.mjs",
156
- "esm": "./esm2022/filters/number/provoly-dashboard-filters-number.mjs",
157
- "default": "./fesm2022/provoly-dashboard-filters-number.mjs"
158
- },
159
- "./filters/text": {
160
- "types": "./filters/text/index.d.ts",
161
- "esm2022": "./esm2022/filters/text/provoly-dashboard-filters-text.mjs",
162
- "esm": "./esm2022/filters/text/provoly-dashboard-filters-text.mjs",
163
- "default": "./fesm2022/provoly-dashboard-filters-text.mjs"
164
- },
165
135
  "./components/card": {
166
136
  "types": "./components/card/index.d.ts",
167
137
  "esm2022": "./esm2022/components/card/provoly-dashboard-components-card.mjs",
@@ -228,6 +198,36 @@
228
198
  "esm": "./esm2022/components/text-editor/provoly-dashboard-components-text-editor.mjs",
229
199
  "default": "./fesm2022/provoly-dashboard-components-text-editor.mjs"
230
200
  },
201
+ "./filters/autocomplete": {
202
+ "types": "./filters/autocomplete/index.d.ts",
203
+ "esm2022": "./esm2022/filters/autocomplete/provoly-dashboard-filters-autocomplete.mjs",
204
+ "esm": "./esm2022/filters/autocomplete/provoly-dashboard-filters-autocomplete.mjs",
205
+ "default": "./fesm2022/provoly-dashboard-filters-autocomplete.mjs"
206
+ },
207
+ "./filters/date": {
208
+ "types": "./filters/date/index.d.ts",
209
+ "esm2022": "./esm2022/filters/date/provoly-dashboard-filters-date.mjs",
210
+ "esm": "./esm2022/filters/date/provoly-dashboard-filters-date.mjs",
211
+ "default": "./fesm2022/provoly-dashboard-filters-date.mjs"
212
+ },
213
+ "./filters/list": {
214
+ "types": "./filters/list/index.d.ts",
215
+ "esm2022": "./esm2022/filters/list/provoly-dashboard-filters-list.mjs",
216
+ "esm": "./esm2022/filters/list/provoly-dashboard-filters-list.mjs",
217
+ "default": "./fesm2022/provoly-dashboard-filters-list.mjs"
218
+ },
219
+ "./filters/number": {
220
+ "types": "./filters/number/index.d.ts",
221
+ "esm2022": "./esm2022/filters/number/provoly-dashboard-filters-number.mjs",
222
+ "esm": "./esm2022/filters/number/provoly-dashboard-filters-number.mjs",
223
+ "default": "./fesm2022/provoly-dashboard-filters-number.mjs"
224
+ },
225
+ "./filters/text": {
226
+ "types": "./filters/text/index.d.ts",
227
+ "esm2022": "./esm2022/filters/text/provoly-dashboard-filters-text.mjs",
228
+ "esm": "./esm2022/filters/text/provoly-dashboard-filters-text.mjs",
229
+ "default": "./fesm2022/provoly-dashboard-filters-text.mjs"
230
+ },
231
231
  "./pipeline-components/filter": {
232
232
  "types": "./pipeline-components/filter/index.d.ts",
233
233
  "esm2022": "./esm2022/pipeline-components/filter/provoly-dashboard-pipeline-components-filter.mjs",
@@ -16,7 +16,6 @@ export declare class PryPresentationComponent extends SubscriptionnerDirective {
16
16
  private access;
17
17
  manifests$: Observable<ManifestDescription[]>;
18
18
  selectedPresentation$: BehaviorSubject<ManifestDescription | null>;
19
- presentation?: ManifestDescription;
20
19
  staticManifest$?: Observable<DashboardManifest>;
21
20
  selectedMode: ViewMode;
22
21
  modalOpened: boolean;
@@ -29,7 +28,9 @@ export declare class PryPresentationComponent extends SubscriptionnerDirective {
29
28
  crossVisibility: ElementRef<HTMLButtonElement>;
30
29
  visibilityModal: ElementRef;
31
30
  overlayRef?: OverlayRef;
32
- accessGroups: string[];
31
+ accessRightsByGroup: {
32
+ [key: string]: string[];
33
+ };
33
34
  editionStartUrl: string;
34
35
  consultStartUrl: string;
35
36
  meAsOwner?: string;
@@ -37,11 +38,7 @@ export declare class PryPresentationComponent extends SubscriptionnerDirective {
37
38
  search$: BehaviorSubject<string>;
38
39
  filteredPresentations$: Observable<ManifestDescription[]>;
39
40
  listOfManifests$: BehaviorSubject<ManifestDescription[] | null>;
40
- disableShareRadios$: Observable<{
41
- [key in PryVisibilityType]: boolean;
42
- }>;
43
41
  allowedShareGroups$: Observable<string[]>;
44
- shareRadioValue$: BehaviorSubject<PryVisibilityType | undefined>;
45
42
  disableShareButton$: BehaviorSubject<boolean>;
46
43
  mode: 'theme' | 'meta';
47
44
  set listOfManifests(manifests: ManifestDescription[] | null);
@@ -60,9 +57,12 @@ export declare class PryPresentationComponent extends SubscriptionnerDirective {
60
57
  focusCrossElement(): void;
61
58
  focusValidation(): void;
62
59
  editContent(selectedPresentation: ManifestDescription): void;
63
- updateAccessGroups($event: string[]): void;
60
+ updateAccessRights($event: {
61
+ [key: string]: string[];
62
+ }): void;
64
63
  updateVisibility($event: PryVisibilityType): void;
65
64
  updateDisableButtonValue(): void;
65
+ isPrivate(presentation: ManifestDescription): boolean;
66
66
  canModify$(presentation: ManifestDescription): Observable<boolean>;
67
67
  static ɵfac: i0.ɵɵFactoryDeclaration<PryPresentationComponent, [null, null, null, null, null, null, null, { optional: true; }]>;
68
68
  static ɵcmp: i0.ɵɵComponentDeclaration<PryPresentationComponent, "pry-presentation", never, { "editionStartUrl": { "alias": "editionStartUrl"; "required": false; }; "consultStartUrl": { "alias": "consultStartUrl"; "required": false; }; "meAsOwner": { "alias": "meAsOwner"; "required": false; }; "mode": { "alias": "mode"; "required": false; }; "listOfManifests": { "alias": "listOfManifests"; "required": false; }; "hideToolbox": { "alias": "hideToolbox"; "required": false; }; "search": { "alias": "search"; "required": false; }; }, {}, never, never, false, never>;
@@ -0,0 +1,73 @@
1
+ @use '../abstracts' as *;
2
+ @use '../../styles-theme/abstracts-theme/variables.theme' as *;
3
+
4
+ body:has(pry-access-rights-share) {
5
+ .o-modal-wrapper {
6
+ padding: toRem(35) toRem(50);
7
+ min-width: toRem(790);
8
+
9
+ .a-h2 {
10
+ text-align: center;
11
+ }
12
+ }
13
+ }
14
+
15
+ .o-access-rights-share {
16
+ form {
17
+ gap: toRem(20);
18
+ }
19
+
20
+ .m-grouped-select {
21
+ border-radius: toRem(5);
22
+ border: 1px solid themed($theme-map, 'color', 'primary', 600);
23
+ flex: 2;
24
+
25
+ > :first-child {
26
+ border-right: 1px solid themed($theme-map, 'color', 'primary', 600);
27
+ }
28
+ }
29
+
30
+ .a-pry-select {
31
+ border: none;
32
+ max-width: toRem(450);
33
+ align-items: center;
34
+
35
+ &__content {
36
+ flex-wrap: wrap;
37
+ }
38
+ }
39
+
40
+ &__group-select {
41
+ flex: 2;
42
+ }
43
+
44
+ &__access-rights-select {
45
+ white-space: nowrap;
46
+ }
47
+
48
+ .a-label {
49
+ color: themed($theme-map, 'color', 'primary', 500);
50
+ font-size: toRem(12);
51
+ margin: toRem(10) 0 0 toRem(10);
52
+ }
53
+
54
+ &__groups {
55
+ margin: toRem(30) toRem(150) 0 toRem(15);
56
+ }
57
+
58
+ &__group {
59
+ .a-pry-select {
60
+ padding-right: 0;
61
+ }
62
+ }
63
+
64
+ &__group-name {
65
+ padding: 0;
66
+ margin: auto 0;
67
+ }
68
+
69
+ &__owner {
70
+ font-style: italic;
71
+ font-size: toRem(12);
72
+ }
73
+ }
@@ -73,6 +73,10 @@
73
73
  .m-tooltip {
74
74
  margin-top: toRem(20);
75
75
  }
76
+
77
+ pry-select {
78
+ flex: 1;
79
+ }
76
80
  }
77
81
 
78
82
  .container {
@@ -105,10 +109,6 @@
105
109
  cursor: move;
106
110
  }
107
111
 
108
- pry-select {
109
- flex: 1;
110
- }
111
-
112
112
  .cdk-drag-preview {
113
113
  border-radius: toRem(4);
114
114
  box-shadow:
package/styles/main.scss CHANGED
@@ -50,6 +50,7 @@
50
50
 
51
51
  /* Organisms */
52
52
  @use 'components/o-about' as *;
53
+ @use 'components/o-access-rights-share' as *;
53
54
  @use 'components/o-accordion' as *;
54
55
  @use 'components/o-card' as *;
55
56
  @use 'components/o-cards-list' as *;
@@ -43,20 +43,6 @@
43
43
  border-color: themed($theme-map, 'color', 'primary', 400);
44
44
  box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.10);
45
45
 
46
- &.-map-export {
47
- &:hover {
48
- @include changeBgColor(
49
- $targetBgColor: themed($theme-map, 'color', 'primary', 600),
50
- $targetTextColor: themed($theme-map, 'color', 'primary', 'contrast', 50),
51
- $targetBorderColor: themed($theme-map, 'color', 'primary', 600)
52
- );
53
-
54
- button {
55
- color: themed($theme-map, 'color', 'primary', 50);
56
- }
57
- }
58
- }
59
-
60
46
  .a-btn {
61
47
  color: themed($theme-map, 'color', 'primary', 600);
62
48
  background-color: transparent;
@@ -21,7 +21,9 @@ export declare class SaveViewComponent extends ToolboxActionComponent {
21
21
  templateSaveAs: TemplateRef<any>;
22
22
  overlayRefDirectSaveType?: OverlayRef;
23
23
  templateDirectSaveType: TemplateRef<any>;
24
- accessGroups: string[];
24
+ accessRightsByGroup: {
25
+ [key: string]: string[];
26
+ };
25
27
  type: LibraryTypes;
26
28
  saveTypeOpened: boolean;
27
29
  currentManifest?: ManifestDescription;
@@ -35,7 +37,9 @@ export declare class SaveViewComponent extends ToolboxActionComponent {
35
37
  toggleSaveAs(): void;
36
38
  save(): void;
37
39
  closeModals(): void;
38
- changeAccessGroups($event: string[]): void;
40
+ changeAccessRights($event: {
41
+ [key: string]: string[];
42
+ }): void;
39
43
  changeValue($event: string): void;
40
44
  changeDescr($event: string): void;
41
45
  openSaveAs(): void;