diff --git a/package-lock.json b/package-lock.json
index 0bd373c..2416a61 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "farmmaps-lib-app",
- "version": "4.12.1",
+ "version": "4.14.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "farmmaps-lib-app",
- "version": "4.12.1",
+ "version": "4.14.0",
"dependencies": {
"@angular-eslint/eslint-plugin": "^18.2.0",
"@angular/animations": "18.2.3",
@@ -90,14 +90,14 @@
},
"dist/common": {
"name": "@farmmaps/common",
- "version": "4.12.0-prerelease.2532",
+ "version": "4.14.0-prerelease.2544",
"dependencies": {
"tslib": "^2.3.0"
},
"peerDependencies": {
- "@angular/common": "^18.2.3",
- "@angular/core": "^18.2.3",
- "@angular/forms": "^18.2.3",
+ "@angular/common": "18.2.3",
+ "@angular/core": "18.2.3",
+ "@angular/forms": "18.2.3",
"@microsoft/signalr": "^3.1.16",
"@ng-bootstrap/ng-bootstrap": "^17.0.1",
"@ngrx/effects": "^18.0.2",
@@ -115,12 +115,12 @@
},
"dist/common-map": {
"name": "@farmmaps/common-map",
- "version": "4.12.0-prerelease.2532",
+ "version": "4.14.0-prerelease.2544",
"dependencies": {
"tslib": "^2.0.0"
},
"peerDependencies": {
- "@angular/core": "^18.2.3",
+ "@angular/core": "18.2.3",
"@ngrx/effects": "^18.0.2",
"@ngrx/router-store": "^18.0.2",
"@ngrx/store": "^18.0.2",
@@ -130,27 +130,27 @@
},
"dist/common-map3d": {
"name": "@farmmaps/common-map3d",
- "version": "4.12.0-prerelease.2532",
+ "version": "4.14.0-prerelease.2544",
"dependencies": {
"tslib": "^2.0.0"
},
"peerDependencies": {
- "@angular/common": "^18.2.3",
- "@angular/core": "^18.2.3",
+ "@angular/common": "18.2.3",
+ "@angular/core": "18.2.3",
"cesium": "^1.97.0",
"ol-cesium": ">=2.13.0"
}
},
"dist/ng-openlayers": {
"name": "@farmmaps/ng-openlayers",
- "version": "4.12.0-prerelease.2532",
+ "version": "4.14.0-prerelease.2544",
"license": "MPL-2.0",
"dependencies": {
"tslib": "^2.3.0"
},
"peerDependencies": {
- "@angular/common": "^18.2.3",
- "@angular/core": "^18.2.3",
+ "@angular/common": "18.2.3",
+ "@angular/core": "18.2.3",
"ol": "^8.2.0"
}
},
diff --git a/package.json b/package.json
index cd693fb..75ea77e 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "farmmaps-lib-app",
- "version": "4.12.1",
+ "version": "4.14.0",
"scripts": {
"ng": "ng",
"start": "ng serve",
diff --git a/projects/common-map/src/fm-map/components/selected-item-temporal/selected-item-temporal.component.html b/projects/common-map/src/fm-map/components/selected-item-temporal/selected-item-temporal.component.html
index 6aaa0c4..5076153 100644
--- a/projects/common-map/src/fm-map/components/selected-item-temporal/selected-item-temporal.component.html
+++ b/projects/common-map/src/fm-map/components/selected-item-temporal/selected-item-temporal.component.html
@@ -42,6 +42,7 @@
Remove overlay
Show chart
+ Download
diff --git a/projects/common-map/src/fm-map/components/selected-item-temporal/selected-item-temporal.component.ts b/projects/common-map/src/fm-map/components/selected-item-temporal/selected-item-temporal.component.ts
index 5814910..bc6af67 100644
--- a/projects/common-map/src/fm-map/components/selected-item-temporal/selected-item-temporal.component.ts
+++ b/projects/common-map/src/fm-map/components/selected-item-temporal/selected-item-temporal.component.ts
@@ -2,7 +2,7 @@ import { Component, Injectable } from '@angular/core';
import { Location } from '@angular/common';
import { Store } from '@ngrx/store';
import * as mapReducers from '../../reducers/map.reducer';
-import { commonReducers, ItemTypeService, IItem } from '@farmmaps/common';
+import { commonReducers, ItemTypeService, IItem, ItemService, IItemLinkType, IUrlType } from '@farmmaps/common';
import { Router } from '@angular/router';
import { ForItemType } from '../for-item/for-itemtype.decorator';
import { AbstractSelectedItemComponent } from '../selected-item/selected-item.component';
@@ -11,7 +11,6 @@ import * as mapActions from '../../actions/map.actions';
import { IItemLayer } from '../../models/item.layer';
import {TemporalService} from '../../services/temporal.service';
-
@ForItemType("vnd.farmmaps.itemtype.temporal")
@Injectable()
@Component({
@@ -21,7 +20,7 @@ import {TemporalService} from '../../services/temporal.service';
})
export class SelectedItemTemporalComponent extends AbstractSelectedItemComponent {
- constructor(store: Store, itemTypeService: ItemTypeService, location: Location, router: Router,public temporalService:TemporalService) {
+ constructor(store: Store, public itemService: ItemService, itemTypeService: ItemTypeService, location: Location, router: Router,public temporalService:TemporalService) {
super(store, itemTypeService,location,router);
}
@@ -61,4 +60,15 @@ export class SelectedItemTemporalComponent extends AbstractSelectedItemComponent
this.router.navigate(['/viewer', 'temporal', 'item', item.parentCode, new Date(Date.parse(item.dataDate)).getUTCFullYear()]);
return false;
}
+
+ download(item:IItem,event:MouseEvent) {
+ event.stopPropagation();
+ event.preventDefault();
+ const itemLink : IItemLinkType = {itemcode:item.code,pathsuffix:"download", validminutes:10}
+ console.log('download1', itemLink)
+ const foo = this.itemService.getItemLink(itemLink).subscribe((itemLinkUrl:IUrlType) => {
+ console.log('download2', itemLinkUrl)
+ window.location.href =itemLinkUrl.url
+ })
+ }
}
diff --git a/projects/common/src/fm/actions/app-common.actions.ts b/projects/common/src/fm/actions/app-common.actions.ts
index ca8ef37..7175cc4 100644
--- a/projects/common/src/fm/actions/app-common.actions.ts
+++ b/projects/common/src/fm/actions/app-common.actions.ts
@@ -83,6 +83,11 @@ export const SETPAGEMODE = '[AppCommon] SetPageMode';
export const SETUNREADNOTIFICATIONS = '[AppCommon] SetUnreadNotifications';
+export const SWITCHLANGUAGE = '[AppCommon] SwitchLanguage';
+
+export const SETSETTINGMENUBACKGROUNDCOLOR = '[AppCommon] SetSettingMenuBackgroundColor';
+
+
export class InitUser implements Action {
readonly type = INITUSER;
@@ -371,6 +376,17 @@ export class SetUnreadNotifications implements Action {
}
+export class SwitchLanguage implements Action {
+ readonly type = SWITCHLANGUAGE;
+
+ constructor(public locale:string) { }
+}
+
+export class SetSettingMenuBackgroundColor implements Action {
+ readonly type = SETSETTINGMENUBACKGROUNDCOLOR;
+
+ constructor(public color:string) { }
+}
export type Actions = OpenModal
| InitRoot
@@ -418,6 +434,8 @@ export type Actions = OpenModal
| ToggleHelpMenu
| ToggleSettingMenu
| NotificationEvent
- | SetUnreadNotifications;
+ | SetUnreadNotifications
+ | SwitchLanguage
+ | SetSettingMenuBackgroundColor;
diff --git a/projects/common/src/fm/components/app/app.component.html b/projects/common/src/fm/components/app/app.component.html
index 1f33cf6..b025e09 100644
--- a/projects/common/src/fm/components/app/app.component.html
+++ b/projects/common/src/fm/components/app/app.component.html
@@ -33,7 +33,7 @@
-
-