@provoly/dashboard 0.18.5 → 0.18.7

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 (64) hide show
  1. package/dataset/style/_o-pry-dataset-card.scss +0 -1
  2. package/dataset/style/_o-pry-dataset-detail.scss +4 -0
  3. package/esm2022/admin/components/admin-dataset/shared/admin-form-dataset/admin-form-dataset.component.mjs +3 -3
  4. package/esm2022/dataset/components/dataset-card/dataset-card.component.mjs +3 -3
  5. package/esm2022/dataset/components/dataset.component.mjs +3 -3
  6. package/esm2022/dataset/style/css.component.mjs +2 -2
  7. package/esm2022/filters/date/date-filter.component.mjs +8 -4
  8. package/esm2022/filters/list/list-filter.component.mjs +4 -3
  9. package/esm2022/filters/number/number-filter.component.mjs +3 -3
  10. package/esm2022/filters/text/text-filter.component.mjs +3 -3
  11. package/esm2022/lib/core/i18n/en.translations.mjs +2 -1
  12. package/esm2022/lib/core/i18n/fr.translations.mjs +2 -1
  13. package/esm2022/lib/core/store/search/search.effects.mjs +2 -2
  14. package/esm2022/lib/core/toolbox/toolbox-manifest.service.mjs +12 -1
  15. package/esm2022/lib/core/toolbox/toolbox-menu.service.mjs +3 -2
  16. package/esm2022/lib/dashboard/filter/base-filter.component.mjs +4 -1
  17. package/esm2022/lib/dashboard/item-utils.mjs +1 -60
  18. package/esm2022/lib/dashboard/store/dashboard.effects.mjs +3 -4
  19. package/esm2022/presentation/components/presentation.component.mjs +1 -3
  20. package/esm2022/widgets/widget-map/component/widget-map-layer.service.mjs +39 -38
  21. package/esm2022/widgets/widget-map/component/widget-map.component.mjs +12 -12
  22. package/esm2022/widgets/widget-map/pipe/widget-map-geometry-fields-for.pipe.mjs +3 -3
  23. package/esm2022/widgets/widget-map/utils/widget-map.utils.mjs +262 -216
  24. package/esm2022/widgets/widget-template/component/widget-template.component.mjs +13 -4
  25. package/esm2022/widgets/widget-template/i18n/en.translations.mjs +11 -0
  26. package/esm2022/widgets/widget-template/i18n/fr.translations.mjs +11 -0
  27. package/esm2022/widgets/widget-template/widget-template.module.mjs +19 -7
  28. package/fesm2022/provoly-dashboard-admin.mjs +2 -2
  29. package/fesm2022/provoly-dashboard-admin.mjs.map +1 -1
  30. package/fesm2022/provoly-dashboard-dataset.mjs +6 -6
  31. package/fesm2022/provoly-dashboard-dataset.mjs.map +1 -1
  32. package/fesm2022/provoly-dashboard-filters-date.mjs +7 -3
  33. package/fesm2022/provoly-dashboard-filters-date.mjs.map +1 -1
  34. package/fesm2022/provoly-dashboard-filters-list.mjs +3 -2
  35. package/fesm2022/provoly-dashboard-filters-list.mjs.map +1 -1
  36. package/fesm2022/provoly-dashboard-filters-number.mjs +2 -2
  37. package/fesm2022/provoly-dashboard-filters-number.mjs.map +1 -1
  38. package/fesm2022/provoly-dashboard-filters-text.mjs +2 -2
  39. package/fesm2022/provoly-dashboard-filters-text.mjs.map +1 -1
  40. package/fesm2022/provoly-dashboard-presentation.mjs +0 -2
  41. package/fesm2022/provoly-dashboard-presentation.mjs.map +1 -1
  42. package/fesm2022/provoly-dashboard-widgets-widget-map.mjs +377 -331
  43. package/fesm2022/provoly-dashboard-widgets-widget-map.mjs.map +1 -1
  44. package/fesm2022/provoly-dashboard-widgets-widget-template.mjs +48 -8
  45. package/fesm2022/provoly-dashboard-widgets-widget-template.mjs.map +1 -1
  46. package/fesm2022/provoly-dashboard.mjs +49 -91
  47. package/fesm2022/provoly-dashboard.mjs.map +1 -1
  48. package/filters/date/date-filter.component.d.ts +1 -0
  49. package/lib/core/i18n/en.translations.d.ts +1 -0
  50. package/lib/core/i18n/fr.translations.d.ts +1 -0
  51. package/lib/dashboard/filter/base-filter.component.d.ts +4 -2
  52. package/lib/dashboard/item-utils.d.ts +0 -8
  53. package/lib/dashboard/store/dashboard.effects.d.ts +0 -3
  54. package/package.json +1 -1
  55. package/styles/components/_a-form-field.scss +0 -1
  56. package/styles/components/_a-table.scss +1 -1
  57. package/styles/components/_m-filter.scss +23 -23
  58. package/styles/components/_m-form-label-field.scss +6 -0
  59. package/styles-theme/components-theme/_m-filter.theme.scss +19 -4
  60. package/widgets/widget-map/utils/widget-map.utils.d.ts +23 -17
  61. package/widgets/widget-template/component/widget-template.component.d.ts +2 -0
  62. package/widgets/widget-template/i18n/en.translations.d.ts +10 -0
  63. package/widgets/widget-template/i18n/fr.translations.d.ts +10 -0
  64. package/widgets/widget-template/widget-template.module.d.ts +4 -2
@@ -12,6 +12,7 @@ export declare class DateFilterComponent extends BaseFilterComponent implements
12
12
  constructor(store: Store);
13
13
  ngOnInit(): void;
14
14
  setFilter(value: string): void;
15
+ changeValue($event: string): void;
15
16
  clearDate(index: number): void;
16
17
  static ɵfac: i0.ɵɵFactoryDeclaration<DateFilterComponent, never>;
17
18
  static ɵcmp: i0.ɵɵComponentDeclaration<DateFilterComponent, "pry-date-filter", never, {}, {}, never, never, false, never>;
@@ -136,6 +136,7 @@ export declare const enTranslations: {
136
136
  other: string;
137
137
  };
138
138
  tile: string;
139
+ template: string;
139
140
  now: string;
140
141
  since_day: string;
141
142
  layout: {
@@ -136,6 +136,7 @@ export declare const frTranslations: {
136
136
  other: string;
137
137
  };
138
138
  tile: string;
139
+ template: string;
139
140
  now: string;
140
141
  since_day: string;
141
142
  layout: {
@@ -1,13 +1,15 @@
1
+ import { OnInit } from '@angular/core';
1
2
  import { Store } from '@ngrx/store';
2
3
  import { Filter } from '../../core/model/filter.interface';
3
4
  import { SubscriptionnerDirective } from '../components/subscriptionner.directive';
4
5
  import * as i0 from "@angular/core";
5
- export declare class BaseFilterComponent extends SubscriptionnerDirective {
6
+ export declare class BaseFilterComponent extends SubscriptionnerDirective implements OnInit {
6
7
  protected store: Store;
7
8
  filter?: Filter;
8
9
  type: string;
9
- private _value;
10
+ protected _value: any;
10
11
  constructor(store: Store);
12
+ ngOnInit(): void;
11
13
  updateFilter(value: any): void;
12
14
  validateFilters(): void;
13
15
  static ɵfac: i0.ɵɵFactoryDeclaration<BaseFilterComponent, never>;
@@ -1,4 +1,3 @@
1
- import Geometry from 'ol/geom/Geometry';
2
1
  import { AttributeSimpleValue, Item, ValueType } from '../core/model/item.interface';
3
2
  import { ResultSet } from '../core/model/result-set.interface';
4
3
  import { Attribute, Class } from '../core/store/class/class.interface';
@@ -7,13 +6,6 @@ export interface OlFeature {
7
6
  get(key: string): any;
8
7
  }
9
8
  export declare class ItemUtils {
10
- static readGeometry<T extends 'point' | 'line' | 'multi-line' | 'polygon' | 'multi-polygon'>(item: Item, type: T, attribute: Attribute | undefined): Geometry;
11
- static projectGeometry(geometry: {
12
- type: string;
13
- coordinates: [number, number] | [number, number][] | [number, number][][] | [number, number][][][];
14
- }): any;
15
- static readLocations<T extends 'point' | 'line' | 'polygon'>(item: Item, type: T): T extends 'point' ? [number, number][] : [number, number][][];
16
- private static extractGeometries;
17
9
  static getAttributeValue(item: Item | OlFeature, attribute: Attribute | string | undefined): AttributeSimpleValue | AttributeSimpleValue[];
18
10
  static getAttributeCalculatedValue(item: Item, attribute: Attribute | string | undefined): ValueType | ValueType[];
19
11
  static sortAttributes(a: AttributeSimpleValue, b: AttributeSimpleValue): number;
@@ -218,9 +218,6 @@ export declare class DashboardEffects {
218
218
  toggleEditionModeIfNotManual$: import("rxjs").Observable<{
219
219
  force?: boolean | undefined;
220
220
  } & import("@ngrx/store/src/models").TypedAction<"[Dashboard] toggle edition mode">> & import("@ngrx/effects").CreateEffectMetadata;
221
- updateViewAfterFilterValueUpdate$: import("rxjs").Observable<{
222
- id: string;
223
- } & import("@ngrx/store/src/models").TypedAction<"[Search] (bus) search named">> & import("@ngrx/effects").CreateEffectMetadata;
224
221
  dispatchFilters$: import("rxjs").Observable<{
225
222
  id: string;
226
223
  } & import("@ngrx/store/src/models").TypedAction<"[Search] (bus) search named">> & import("@ngrx/effects").CreateEffectMetadata;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@provoly/dashboard",
3
- "version": "0.18.5",
3
+ "version": "0.18.7",
4
4
  "type": "commonjs",
5
5
  "peerDependencies": {
6
6
  "@angular/cdk": "14.x || 15.x || 16.x",
@@ -6,7 +6,6 @@
6
6
  align-items: center;
7
7
  justify-content: flex-start;
8
8
  flex-grow: 1;
9
- overflow: hidden;
10
9
  width: 100%;
11
10
  min-height: toRem(36);
12
11
  padding: toRem(4) toRem(12);
@@ -24,7 +24,7 @@
24
24
  thead {
25
25
  td,
26
26
  th {
27
- height: toRem(24);
27
+ height: toRem(30);
28
28
  margin: toRem(8);
29
29
  padding: toRem(8);
30
30
  }
@@ -15,14 +15,32 @@
15
15
  }
16
16
  }
17
17
 
18
+ &__label {
19
+ cursor: none;
20
+ margin: 0;
21
+ align-self: center;
22
+ white-space: nowrap;
23
+ }
24
+
25
+ &__input {
26
+ outline: none;
27
+ min-height: toRem(20);
28
+ line-height: toRem(12);
29
+ padding: 0 toRem(2) toRem(1) toRem(1);
30
+ }
31
+
32
+ &__date-input-separator {
33
+ margin: 0 toRem(5);
34
+ }
35
+
18
36
  &__input-wrapper {
19
37
  display: flex;
20
38
  border-radius: toRem(5);
21
- padding: toRem(2) toRem(10);
39
+ padding: toRem(4) toRem(10);
22
40
  align-items: center;
23
41
 
24
- &:has(.pry-select) {
25
- padding: toRem(1) toRem(10);
42
+ &--dropdown {
43
+ padding: toRem(3) toRem(10);
26
44
  }
27
45
 
28
46
  .ng-select-container {
@@ -36,7 +54,7 @@
36
54
  }
37
55
 
38
56
  .ng-dropdown-panel.ng-select-bottom {
39
- margin-top: 2px;
57
+ margin-top: 3px;
40
58
  }
41
59
 
42
60
  .ng-select.ng-select-focused:not(.ng-select-opened) > .ng-select-container{
@@ -45,27 +63,9 @@
45
63
  }
46
64
  }
47
65
 
48
- &__label {
49
- cursor: none;
50
- margin: 0;
51
- align-self: center;
52
- white-space: nowrap;
53
- }
54
-
55
- &__input {
56
- outline: none;
57
- min-height: toRem(20);
58
- line-height: toRem(12);
59
- padding: 0 toRem(2) toRem(1) toRem(1);
60
- }
61
-
62
- &__date-input-separator {
63
- margin: 0 toRem(5);
64
- }
65
-
66
66
  &__clear-wrapper {
67
67
  position: absolute;
68
- bottom: toRem(4);
68
+ bottom: 0.4rem;
69
69
  cursor: pointer;
70
70
  -webkit-user-select: none;
71
71
  user-select: none;
@@ -53,3 +53,9 @@
53
53
  width: 100%;
54
54
  }
55
55
  }
56
+
57
+ pry-admin-form-dataset {
58
+ textarea {
59
+ resize: both;
60
+ }
61
+ }
@@ -1,23 +1,38 @@
1
- /* Theme - Atom a-icon */
1
+ @use '../../styles/abstracts' as *;
2
+ @use '../abstracts-theme/variables.theme' as *;
3
+
4
+ /* Theme - Molecule m-filter */
2
5
 
3
6
  .m-filter {
4
7
  display: flex;
5
8
  align-items: center;
6
9
 
7
10
  &__input-wrapper {
8
- border: 1px #BCCAD8 solid;
9
- background: #ffffff;
11
+ border: 1px solid themed($theme-map, 'color', 'primary', 400);
12
+ color: themed($theme-map, 'color', 'primary', 700);
13
+ background-color: themed($theme-map, 'color', 'primary', 'contrast', 700);
10
14
 
11
15
  .pry-select {
12
16
  font-size: 12px;
13
17
  }
18
+
19
+ &:has(input:focus) {
20
+ outline: 2px solid themed($theme-map, 'color', 'accent', 600);
21
+ outline-offset: toRem(2);
22
+ border-color: themed($theme-map, 'color', 'accent', 600);
23
+ }
24
+
25
+ &:has(input:not(focus)) {
26
+ outline:none;
27
+ border-color: themed($theme-map, 'color', 'primary', 400);
28
+ }
14
29
  }
15
30
 
16
31
  &__label {
17
32
  background: transparent;
18
33
  font-size: 12px;
19
34
  font-weight: bold;
20
- color: #424B5A;
35
+ color: #424B5A; // color for label taken from figma
21
36
  }
22
37
 
23
38
  &__input {
@@ -1,20 +1,26 @@
1
- import { Attribute, Class, Field, Item, MapWidgetLayerOptions, Relation, ResultSet } from '@provoly/dashboard';
1
+ import { Attribute, AttributeSimpleValue, Class, Field, Item, MapWidgetLayerOptions, Relation, ResultSet } from '@provoly/dashboard';
2
2
  import { Feature, Map } from 'ol';
3
3
  import { Circle, LineString, Point } from 'ol/geom';
4
4
  import { Style } from 'ol/style';
5
- export declare const populateLocationAttribute: (layer: MapWidgetLayerOptions, resultSet: ResultSet, classesNotFiltered: Class[], fields: Field[]) => void;
6
- export declare const populateIntensityAttribute: (layer: MapWidgetLayerOptions, resultSet: ResultSet, classesNotFiltered: Class[], fields: Field[]) => void;
7
- export declare const getFeatureFromItem: (item: Item, type: string, locationAttribute: Attribute, iconStyle?: Style, selectedIconStyle?: Style) => Feature<import("ol/geom/Geometry").default>;
8
- export declare const getCircleFeatureFromItem: (item: Item, locationAttribute: Attribute, radius: number, iconStyle: Style, selectedIconStyle: Style) => Feature<Circle>;
9
- export declare const getLinkFeature: (relation: Relation, featureSource: Feature<Point>, featureDestination: Feature<Point>) => Feature<LineString>;
10
- export declare const getMapAsPng: (map: Map) => Promise<string>;
11
- export declare const exportMapAsImage: (map: Map, filename: string) => void;
12
- export declare const geometryForLayer: (layer: MapWidgetLayerOptions) => string;
13
- export declare const assignLayersOrder: (_layers: MapWidgetLayerOptions[]) => MapWidgetLayerOptions[];
14
- export declare const DEFAULT_HEATMAP_RADIUS = 25;
15
- export declare const DEFAULT_RADIUS_INTENSITY_FACTOR = 10000;
16
- export declare const DEFAULT_ZOOM_MIN = 3;
17
- export declare const DEFAULT_ZOOM_START = 10;
18
- export declare const DEFAULT_ZOOM_MAX = 18;
19
- export declare const DEFAULT_MAP_CENTER: number[];
20
- export declare const BACKGROUND_ORDER = 9999;
5
+ import { ProjectionLike } from 'ol/proj';
6
+ import Geometry from 'ol/geom/Geometry';
7
+ export declare class WidgetMapUtils {
8
+ static populateLocationAttribute(layer: MapWidgetLayerOptions, resultSet: ResultSet, classesNotFiltered: Class[], fields: Field[]): void;
9
+ static populateIntensityAttribute(layer: MapWidgetLayerOptions, resultSet: ResultSet, classesNotFiltered: Class[], fields: Field[]): void;
10
+ static getFeatureFromItem(projection: ProjectionLike, item: Item, type: string, locationAttribute: Attribute, iconStyle?: Style, selectedIconStyle?: Style): Feature<Geometry>;
11
+ static getCircleFeatureFromItem(projection: ProjectionLike, item: Item, locationAttribute: Attribute, radius: number, iconStyle: Style, selectedIconStyle: Style): Feature<Circle>;
12
+ static getLinkFeature(relation: Relation, featureSource: Feature<Point>, featureDestination: Feature<Point>): Feature<LineString>;
13
+ static getMapAsPng(map: Map): Promise<string>;
14
+ static exportMapAsImage(map: Map, filename: string): void;
15
+ static geometryForLayer(layer: MapWidgetLayerOptions): string;
16
+ static assignLayersOrder(_layers: MapWidgetLayerOptions[]): MapWidgetLayerOptions[];
17
+ static readGeometry<T extends 'point' | 'line' | 'multi-line' | 'polygon' | 'multi-polygon'>(projection: ProjectionLike, item: Item, type: T, attribute: Attribute | undefined): Geometry | null | undefined;
18
+ static extractGeometries(value: AttributeSimpleValue, points: any[], type: 'point' | 'line' | 'polygon'): void;
19
+ static DEFAULT_HEATMAP_RADIUS: number;
20
+ static DEFAULT_RADIUS_INTENSITY_FACTOR: number;
21
+ static DEFAULT_ZOOM_MIN: number;
22
+ static DEFAULT_ZOOM_START: number;
23
+ static DEFAULT_ZOOM_MAX: number;
24
+ static DEFAULT_MAP_CENTER: number[];
25
+ static BACKGROUND_ORDER: number;
26
+ }
@@ -16,6 +16,8 @@ export declare class WidgetTemplateComponent extends DataWidgetComponent {
16
16
  emitManifest(): void;
17
17
  evaluate(template: string, rs: any): SafeHtml;
18
18
  private limitScope;
19
+ changeHtml($event: Event): void;
20
+ changeCss($event: Event): void;
19
21
  static ɵfac: i0.ɵɵFactoryDeclaration<WidgetTemplateComponent, never>;
20
22
  static ɵcmp: i0.ɵɵComponentDeclaration<WidgetTemplateComponent, "pry-widget-table", never, {}, {}, never, never, false, never>;
21
23
  }
@@ -0,0 +1,10 @@
1
+ export declare const enTranslations: {
2
+ '@pry': {
3
+ widget: {
4
+ template: {
5
+ html: string;
6
+ css: string;
7
+ };
8
+ };
9
+ };
10
+ };
@@ -0,0 +1,10 @@
1
+ export declare const frTranslations: {
2
+ '@pry': {
3
+ widget: {
4
+ template: {
5
+ html: string;
6
+ css: string;
7
+ };
8
+ };
9
+ };
10
+ };
@@ -1,5 +1,5 @@
1
1
  import { Type } from '@angular/core';
2
- import { BaseWidgetComponent, BaseWidgetModule } from '@provoly/dashboard';
2
+ import { BaseWidgetComponent, BaseWidgetModule, PryI18nService } from '@provoly/dashboard';
3
3
  import * as i0 from "@angular/core";
4
4
  import * as i1 from "./component/widget-template.component";
5
5
  import * as i2 from "./style/css.component";
@@ -9,8 +9,10 @@ import * as i5 from "@angular/cdk/overlay";
9
9
  import * as i6 from "@provoly/dashboard";
10
10
  import * as i7 from "@provoly/dashboard/components/checkbox";
11
11
  export declare class WidgetTemplateModule extends BaseWidgetModule {
12
+ private pryTranslateService;
13
+ constructor(pryTranslateService: PryI18nService);
12
14
  getComponent(): Type<BaseWidgetComponent>;
13
15
  static ɵfac: i0.ɵɵFactoryDeclaration<WidgetTemplateModule, never>;
14
- static ɵmod: i0.ɵɵNgModuleDeclaration<WidgetTemplateModule, [typeof i1.WidgetTemplateComponent, typeof i2.PryWidgetTemplateCssComponent], [typeof i3.CommonModule, typeof i4.FormsModule, typeof i5.OverlayModule, typeof i6.PryCoreModule, typeof i6.PryDashboardModule, typeof i6.PrySelectModule, typeof i6.PryIconModule, typeof i7.PryCheckboxModule, typeof i6.PryToggleModule], [typeof i1.WidgetTemplateComponent]>;
16
+ static ɵmod: i0.ɵɵNgModuleDeclaration<WidgetTemplateModule, [typeof i1.WidgetTemplateComponent, typeof i2.PryWidgetTemplateCssComponent], [typeof i3.CommonModule, typeof i4.FormsModule, typeof i5.OverlayModule, typeof i6.PryCoreModule, typeof i6.PryDashboardModule, typeof i6.PrySelectModule, typeof i6.PryIconModule, typeof i7.PryCheckboxModule, typeof i6.PryToggleModule, typeof i6.PryI18nModule], [typeof i1.WidgetTemplateComponent]>;
15
17
  static ɵinj: i0.ɵɵInjectorDeclaration<WidgetTemplateModule>;
16
18
  }