@provoly/dashboard 1.2.10 → 1.3.0

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 (55) hide show
  1. package/esm2022/lib/core/components/select/select-a11y.service.mjs +5 -4
  2. package/esm2022/lib/core/components/select/select.component.mjs +8 -5
  3. package/esm2022/lib/core/components/share/share.utils.mjs +4 -4
  4. package/esm2022/lib/core/i18n/en.translations.mjs +3 -3
  5. package/esm2022/lib/core/i18n/fr.translations.mjs +4 -4
  6. package/esm2022/lib/core/model/widget-table-manifest.interface.mjs +9 -2
  7. package/esm2022/lib/core/pipes/translate-item-to-symbol/translate-item-to-symbol.pipe.mjs +2 -4
  8. package/esm2022/lib/dashboard/components/dashboard.component.mjs +2 -2
  9. package/esm2022/lib/dashboard/components/widgets/widget-instanciator/widget-factory.service.mjs +2 -2
  10. package/esm2022/lib/dashboard/store/dashboard.effects.mjs +76 -5
  11. package/esm2022/lib/dashboard/store/dashboard.reducers.mjs +4 -46
  12. package/esm2022/lib/dashboard/store/dashboard.selectors.mjs +2 -2
  13. package/esm2022/lib/dashboard/store/manifest-utils.class.mjs +23 -2
  14. package/esm2022/mock/provoly-dashboard-mock.mjs +5 -0
  15. package/esm2022/mock/public-api.mjs +3 -0
  16. package/esm2022/mock/service/mock-i18n.service.mjs +13 -0
  17. package/esm2022/mock/service/mock-overlay.service.mjs +44 -0
  18. package/esm2022/presentation/components/add-edit-presentation/add-edit-presentation.component.mjs +3 -3
  19. package/esm2022/toolbox/components/refresh-datasets/refresh-datasets.component.mjs +2 -2
  20. package/esm2022/toolbox/components/save-view/save-view.component.mjs +2 -8
  21. package/esm2022/toolbox/shared/presentation-form/presentation-form.component.mjs +10 -4
  22. package/esm2022/widgets/widget-map/component/widget-map.component.mjs +2 -2
  23. package/esm2022/widgets/widget-table/component/widget-table.component.mjs +19 -4
  24. package/esm2022/widgets/widget-table/expand-value/expand-value.component.mjs +3 -3
  25. package/fesm2022/provoly-dashboard-mock.mjs +63 -0
  26. package/fesm2022/provoly-dashboard-mock.mjs.map +1 -0
  27. package/fesm2022/provoly-dashboard-presentation.mjs +2 -2
  28. package/fesm2022/provoly-dashboard-presentation.mjs.map +1 -1
  29. package/fesm2022/provoly-dashboard-toolbox.mjs +10 -10
  30. package/fesm2022/provoly-dashboard-toolbox.mjs.map +1 -1
  31. package/fesm2022/provoly-dashboard-widgets-widget-map.mjs +1 -1
  32. package/fesm2022/provoly-dashboard-widgets-widget-map.mjs.map +1 -1
  33. package/fesm2022/provoly-dashboard-widgets-widget-table.mjs +26 -11
  34. package/fesm2022/provoly-dashboard-widgets-widget-table.mjs.map +1 -1
  35. package/fesm2022/provoly-dashboard.mjs +130 -72
  36. package/fesm2022/provoly-dashboard.mjs.map +1 -1
  37. package/lib/core/components/select/select-a11y.service.d.ts +1 -1
  38. package/lib/core/components/select/select.component.d.ts +2 -1
  39. package/lib/core/i18n/en.translations.d.ts +2 -2
  40. package/lib/core/i18n/fr.translations.d.ts +2 -2
  41. package/lib/core/model/widget-table-manifest.interface.d.ts +14 -0
  42. package/lib/dashboard/store/dashboard.effects.d.ts +15 -0
  43. package/lib/dashboard/store/manifest-utils.class.d.ts +2 -0
  44. package/mock/index.d.ts +5 -0
  45. package/mock/public-api.d.ts +2 -0
  46. package/mock/service/mock-i18n.service.d.ts +9 -0
  47. package/mock/service/mock-overlay.service.d.ts +30 -0
  48. package/package.json +12 -6
  49. package/styles/base/_utils.scss +4 -0
  50. package/styles/components/_a-expandable-value.scss +0 -5
  51. package/styles/components/_a-table.scss +10 -3
  52. package/styles-theme/components-theme/_a-table.theme.scss +6 -0
  53. package/toolbox/components/save-view/save-view.component.d.ts +0 -1
  54. package/toolbox/shared/presentation-form/presentation-form.component.d.ts +2 -1
  55. package/widgets/widget-table/component/widget-table.component.d.ts +3 -1
@@ -3,7 +3,7 @@ import { FocusOrigin } from '@angular/cdk/a11y';
3
3
  export declare class SelectA11yService {
4
4
  protected toggle: (...args: any[]) => void;
5
5
  setToggle(toggleCallback: (...args: any[]) => void): void;
6
- onFocusChange(origin: FocusOrigin, autocomplete: boolean, toggleFocus: () => void, focusSelect: () => void): void;
6
+ onFocusChange(origin: FocusOrigin, autocomplete: boolean, toggleFocus: () => void, focusInput: () => void): void;
7
7
  onKeydownSelect(event: KeyboardEvent, autocomplete: boolean): void;
8
8
  onKeydownAutocompleteInput(event: KeyboardEvent, open: boolean, searchValue: string, optionsModalRef?: EmbeddedViewRef<any>): void;
9
9
  onKeydownOption(event: KeyboardEvent, optionDivRef: HTMLDivElement, first: boolean, last: boolean, autocomplete: boolean, selectElement: HTMLDivElement, select: () => void): void;
@@ -73,7 +73,8 @@ export declare class PrySelectComponent extends SubscriptionnerDirective impleme
73
73
  private inhibition;
74
74
  handleClick(): void;
75
75
  toggleFocus(): void;
76
- focusSelect(): void;
76
+ returnFocus(): void;
77
+ focusInput(): void;
77
78
  private getOverlayConfig;
78
79
  get _elementRef(): HTMLDivElement;
79
80
  onFocusChange: (origin: FocusOrigin) => void;
@@ -301,11 +301,11 @@ export declare const enTranslations: {
301
301
  share: {
302
302
  private: string;
303
303
  public: string;
304
- restricted: string;
304
+ groups: string;
305
305
  type: string;
306
306
  users: string;
307
307
  noGroups: string;
308
- groups: {
308
+ groupLabels: {
309
309
  ALL: string;
310
310
  AUTHENTICATED: string;
311
311
  };
@@ -303,10 +303,10 @@ export declare const frTranslations: {
303
303
  share: {
304
304
  private: string;
305
305
  public: string;
306
- restricted: string;
306
+ groups: string;
307
307
  type: string;
308
308
  users: string;
309
- groups: {
309
+ groupLabels: {
310
310
  ALL: string;
311
311
  AUTHENTICATED: string;
312
312
  };
@@ -1,5 +1,6 @@
1
1
  export interface TableWidgetOptions {
2
2
  columns?: ColumnDefinition[];
3
+ style?: TableWidgetStyle | any;
3
4
  }
4
5
  export interface ColumnDefinition {
5
6
  label: string;
@@ -7,3 +8,16 @@ export interface ColumnDefinition {
7
8
  property: string;
8
9
  attributeId?: string;
9
10
  }
11
+ export interface TableWidgetStyle {
12
+ headerTextAlign?: string;
13
+ cellTextAlign?: string;
14
+ showVerticalSeparator?: boolean;
15
+ }
16
+ export declare const DEFAULT_TABLE_WIDGET_STYLE: {
17
+ value: {
18
+ headerTextAlign: string;
19
+ cellTextAlign: string;
20
+ showVerticalSeparator: boolean;
21
+ };
22
+ };
23
+ export declare const ALIGNMENT_OPTIONS: string[];
@@ -154,6 +154,13 @@ export declare class DashboardEffects {
154
154
  layerGroups?: import("../../core/model/widget-map-manifest.interface").LayerGroup[] | undefined;
155
155
  }]> & import("@ngrx/effects").CreateEffectMetadata;
156
156
  saveManifest$: import("rxjs").Observable<import("@ngrx/store/src/models").TypedAction<"[Dashboard] (bus) fetching available manifests"> | ({
157
+ tenants?: string[] | undefined;
158
+ manifest: GlobalManifest;
159
+ resultSets?: import("@provoly/dashboard").ResultSets | undefined;
160
+ joining?: boolean | undefined;
161
+ manifestId?: string | undefined;
162
+ selectedIds: string[];
163
+ } & import("@ngrx/store/src/models").TypedAction<"[Dashboard] (bus) updating manifest">) | ({
157
164
  initial?: GlobalManifest | undefined;
158
165
  } & import("@ngrx/store/src/models").TypedAction<"[Dashboard] (bus) set initial presentation">)> & import("@ngrx/effects").CreateEffectMetadata;
159
166
  listManifests$: import("rxjs").Observable<{
@@ -199,6 +206,14 @@ export declare class DashboardEffects {
199
206
  manifestId?: string | undefined;
200
207
  selectedIds: string[];
201
208
  } & import("@ngrx/store/src/models").TypedAction<"[Dashboard] (bus) updating manifest">> & import("@ngrx/effects").CreateEffectMetadata;
209
+ moveWidget$: import("rxjs").Observable<{
210
+ tenants?: string[] | undefined;
211
+ manifest: GlobalManifest;
212
+ resultSets?: import("@provoly/dashboard").ResultSets | undefined;
213
+ joining?: boolean | undefined;
214
+ manifestId?: string | undefined;
215
+ selectedIds: string[];
216
+ } & import("@ngrx/store/src/models").TypedAction<"[Dashboard] (bus) updating manifest">> & import("@ngrx/effects").CreateEffectMetadata;
202
217
  multiSnackBar$: import("rxjs").Observable<{
203
218
  message: import("@provoly/dashboard").PrySnackMessage;
204
219
  } & import("@ngrx/store/src/models").TypedAction<"[Dashboard] (bus) display snack message">> & import("@ngrx/effects").CreateEffectMetadata;
@@ -4,4 +4,6 @@ export declare class ManifestUtils {
4
4
  datasetId: string;
5
5
  excludeGeo: boolean;
6
6
  }[];
7
+ static cleanupManifest(manifest: GlobalManifest): GlobalManifest;
8
+ private static cleanupDashboardManifest;
7
9
  }
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ /// <amd-module name="@provoly/dashboard/mock" />
5
+ export * from './public-api';
@@ -0,0 +1,2 @@
1
+ export * from './service/mock-overlay.service';
2
+ export * from './service/mock-i18n.service';
@@ -0,0 +1,9 @@
1
+ export declare class MockPryI18nService {
2
+ updateTranslations: () => void;
3
+ use: () => void;
4
+ addCoreTranslations: () => void;
5
+ addLangObject: () => void;
6
+ instantObject: () => {};
7
+ instant: () => string;
8
+ get: () => import("rxjs").Observable<string>;
9
+ }
@@ -0,0 +1,30 @@
1
+ import { Subject } from 'rxjs';
2
+ declare class MockOverlayGlobalPosition {
3
+ centerHorizontally: () => this;
4
+ centerVertically: () => this;
5
+ }
6
+ declare class MockOverlayPosition {
7
+ globalPosition: MockOverlayGlobalPosition;
8
+ global(): any;
9
+ flexibleConnectedTo: () => this;
10
+ withPush: () => this;
11
+ withPositions: () => this;
12
+ }
13
+ declare class MockScrollStrategyOptions {
14
+ reposition: () => this;
15
+ }
16
+ export declare const mockOverlayRef: {
17
+ backdropClick: () => Subject<any>;
18
+ attach: () => {
19
+ instance: {};
20
+ destroy: () => undefined;
21
+ };
22
+ dispose: () => undefined;
23
+ };
24
+ export declare class MockOverlay {
25
+ overlayPosition: MockOverlayPosition;
26
+ scrollStrategies: MockScrollStrategyOptions;
27
+ create(...args: any[]): any;
28
+ position(): any;
29
+ }
30
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@provoly/dashboard",
3
- "version": "1.2.10",
3
+ "version": "1.3.0",
4
4
  "type": "commonjs",
5
5
  "peerDependencies": {
6
6
  "@angular/cdk": "16.x || 17.x",
@@ -84,17 +84,23 @@
84
84
  "esm": "./esm2022/admin/provoly-dashboard-admin.mjs",
85
85
  "default": "./fesm2022/provoly-dashboard-admin.mjs"
86
86
  },
87
+ "./dataset": {
88
+ "types": "./dataset/index.d.ts",
89
+ "esm2022": "./esm2022/dataset/provoly-dashboard-dataset.mjs",
90
+ "esm": "./esm2022/dataset/provoly-dashboard-dataset.mjs",
91
+ "default": "./fesm2022/provoly-dashboard-dataset.mjs"
92
+ },
87
93
  "./import": {
88
94
  "types": "./import/index.d.ts",
89
95
  "esm2022": "./esm2022/import/provoly-dashboard-import.mjs",
90
96
  "esm": "./esm2022/import/provoly-dashboard-import.mjs",
91
97
  "default": "./fesm2022/provoly-dashboard-import.mjs"
92
98
  },
93
- "./dataset": {
94
- "types": "./dataset/index.d.ts",
95
- "esm2022": "./esm2022/dataset/provoly-dashboard-dataset.mjs",
96
- "esm": "./esm2022/dataset/provoly-dashboard-dataset.mjs",
97
- "default": "./fesm2022/provoly-dashboard-dataset.mjs"
99
+ "./mock": {
100
+ "types": "./mock/index.d.ts",
101
+ "esm2022": "./esm2022/mock/provoly-dashboard-mock.mjs",
102
+ "esm": "./esm2022/mock/provoly-dashboard-mock.mjs",
103
+ "default": "./fesm2022/provoly-dashboard-mock.mjs"
98
104
  },
99
105
  "./notification": {
100
106
  "types": "./notification/index.d.ts",
@@ -44,6 +44,10 @@
44
44
  text-align: center;
45
45
  }
46
46
 
47
+ .u-txt-right {
48
+ text-align: right;
49
+ }
50
+
47
51
  .u-display-flex {
48
52
  display: flex;
49
53
  gap: toRem(5);
@@ -11,10 +11,6 @@
11
11
  z-index: 0;
12
12
  }
13
13
 
14
- &.-right {
15
- text-align: right;
16
- }
17
-
18
14
  &__expanded {
19
15
  display: block;
20
16
  position: absolute;
@@ -27,7 +23,6 @@
27
23
  opacity: 0;
28
24
  border-radius: toRem(4);
29
25
  box-shadow: 1px 1px 5px 1px rgb(0, 0, 0, 0.2);
30
- text-align: center;
31
26
  pointer-events: none;
32
27
  transition: opacity 70ms linear;
33
28
 
@@ -38,12 +38,14 @@
38
38
  th {
39
39
  height: toRem(60);
40
40
  font-weight: 700;
41
- text-align: left;
42
41
  cursor: pointer;
43
42
 
44
43
  .content {
45
44
  display: flex;
46
45
  flex-direction: row;
46
+ & > span {
47
+ width: 100%;
48
+ }
47
49
  }
48
50
  }
49
51
  }
@@ -99,7 +101,6 @@
99
101
  th {
100
102
  padding-top: toRem(12);
101
103
  padding-bottom: toRem(12);
102
- text-align: left;
103
104
  }
104
105
  }
105
106
 
@@ -116,7 +117,7 @@
116
117
  display: flex;
117
118
  flex-direction: column;
118
119
  align-items: center;
119
- position: fixed;
120
+ position: absolute;
120
121
 
121
122
  &__spacing {
122
123
  display: flex;
@@ -129,6 +130,12 @@
129
130
  }
130
131
  }
131
132
  }
133
+
134
+ &.-show-vertical-separator {
135
+ td + td {
136
+ border-left: 1px solid;
137
+ }
138
+ }
132
139
  }
133
140
 
134
141
  .a-table-loading {
@@ -46,4 +46,10 @@
46
46
  }
47
47
  }
48
48
  }
49
+
50
+ &.-show-vertical-separator {
51
+ td + td {
52
+ border-left-color: themed($theme-map, 'color', 'primary', 300);
53
+ }
54
+ }
49
55
  }
@@ -10,7 +10,6 @@ export declare class SaveViewComponent extends ToolboxActionComponent {
10
10
  private overlay;
11
11
  private viewContainerRef;
12
12
  mode: 'saveAs' | 'directSave';
13
- input: ElementRef;
14
13
  saveAs: ElementRef<HTMLButtonElement>;
15
14
  directiveSave: ElementRef<HTMLButtonElement>;
16
15
  firstFocusdirective: ElementRef<HTMLButtonElement>;
@@ -1,6 +1,6 @@
1
1
  import { AbstractControl, FormControl, FormGroup } from '@angular/forms';
2
2
  import { LibraryTypes, ManifestDescription, SubscriptionnerDirective } from '@provoly/dashboard';
3
- import { AfterViewInit, OnInit } from '@angular/core';
3
+ import { AfterViewInit, ElementRef, OnInit } from '@angular/core';
4
4
  import { BehaviorSubject } from 'rxjs';
5
5
  import { Store } from '@ngrx/store';
6
6
  import * as i0 from "@angular/core";
@@ -25,6 +25,7 @@ export declare class PresentationFormComponent extends SubscriptionnerDirective
25
25
  possibleThemes: string[];
26
26
  mode: 'theme' | 'meta';
27
27
  themePrefix: string | null;
28
+ input: ElementRef;
28
29
  selectedPresentation$: BehaviorSubject<ManifestDescription | undefined>;
29
30
  set selectedPresentation(presentation: ManifestDescription | undefined);
30
31
  formValue: BehaviorSubject<Partial<PresentationFormValue> | undefined>;
@@ -1,6 +1,6 @@
1
1
  import { ChangeDetectorRef, ElementRef } from '@angular/core';
2
2
  import { Store } from '@ngrx/store';
3
- import { ColumnDefinition, DataWidgetComponent, Field, Item, ResultOrder, TableWidgetOptions } from '@provoly/dashboard';
3
+ import { ColumnDefinition, DataWidgetComponent, Field, Item, ResultOrder, TableWidgetOptions, TableWidgetStyle } from '@provoly/dashboard';
4
4
  import { BehaviorSubject, Observable } from 'rxjs';
5
5
  import * as i0 from "@angular/core";
6
6
  export interface Pagination {
@@ -52,9 +52,11 @@ export declare class WidgetTableComponent extends DataWidgetComponent {
52
52
  invertLayers(idx: number, idxWith: number): void;
53
53
  selectAll($event: any): void;
54
54
  setOrder(column: ColumnDefinition): void;
55
+ updateStyle($event: string | boolean, prop: keyof TableWidgetStyle): void;
55
56
  private nextOrder;
56
57
  trackObjects(index: number, item: Item): string;
57
58
  goToPage(number: number): void;
59
+ protected readonly ALIGNMENT_OPTIONS: string[];
58
60
  static ɵfac: i0.ɵɵFactoryDeclaration<WidgetTableComponent, never>;
59
61
  static ɵcmp: i0.ɵɵComponentDeclaration<WidgetTableComponent, "pry-widget-table", never, {}, {}, never, never, false, never>;
60
62
  }