| 
									
										
										
										
											2020-07-31 01:45:54 +02:00
										 |  |  | import { | 
					
						
							|  |  |  |     Dependencies, | 
					
						
							|  |  |  |     TagDependantUIElement, | 
					
						
							|  |  |  |     TagDependantUIElementConstructor | 
					
						
							|  |  |  | } from "../../Customizations/UIElementConstructor"; | 
					
						
							| 
									
										
										
										
											2020-07-14 20:18:44 +02:00
										 |  |  | import {ImageCarousel} from "./ImageCarousel"; | 
					
						
							|  |  |  | import {ImageUploadFlow} from "../ImageUploadFlow"; | 
					
						
							| 
									
										
										
										
											2020-07-30 00:59:08 +02:00
										 |  |  | import {OsmImageUploadHandler} from "../../Logic/Osm/OsmImageUploadHandler"; | 
					
						
							| 
									
										
										
										
											2020-07-31 01:45:54 +02:00
										 |  |  | import {State} from "../../State"; | 
					
						
							| 
									
										
										
										
											2020-08-30 01:13:18 +02:00
										 |  |  | import Translation from "../i18n/Translation"; | 
					
						
							| 
									
										
										
										
											2020-07-14 20:18:44 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-09-10 19:33:06 +02:00
										 |  |  | export default class ImageCarouselWithUploadConstructor implements TagDependantUIElementConstructor{ | 
					
						
							|  |  |  |      | 
					
						
							| 
									
										
										
										
											2020-07-14 20:18:44 +02:00
										 |  |  |     IsKnown(properties: any): boolean { | 
					
						
							|  |  |  |         return true; | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     IsQuestioning(properties: any): boolean { | 
					
						
							|  |  |  |         return false; | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-07-17 17:21:07 +02:00
										 |  |  |     construct(dependencies): TagDependantUIElement { | 
					
						
							|  |  |  |         return new ImageCarouselWithUpload(dependencies); | 
					
						
							| 
									
										
										
										
											2020-07-14 20:18:44 +02:00
										 |  |  |     } | 
					
						
							| 
									
										
										
										
											2020-08-22 02:12:46 +02:00
										 |  |  |      | 
					
						
							| 
									
										
										
										
											2020-08-30 01:13:18 +02:00
										 |  |  |     GetContent(tags: any): Translation { | 
					
						
							|  |  |  |         return new Translation({"en":"Image carousel with uploader"}); | 
					
						
							| 
									
										
										
										
											2020-08-22 02:12:46 +02:00
										 |  |  |     } | 
					
						
							| 
									
										
										
										
											2020-07-14 20:18:44 +02:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | class ImageCarouselWithUpload extends TagDependantUIElement { | 
					
						
							|  |  |  |     private _imageElement: ImageCarousel; | 
					
						
							|  |  |  |     private _pictureUploader: ImageUploadFlow; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-07-31 01:45:54 +02:00
										 |  |  |     constructor(dependencies: Dependencies) { | 
					
						
							| 
									
										
										
										
											2020-07-17 14:24:31 +02:00
										 |  |  |         super(dependencies.tags); | 
					
						
							|  |  |  |         const tags = dependencies.tags; | 
					
						
							| 
									
										
										
										
											2020-07-31 01:45:54 +02:00
										 |  |  |         this._imageElement = new ImageCarousel(tags); | 
					
						
							|  |  |  |         const license = State.state.osmConnection.GetPreference( "pictures-license"); | 
					
						
							|  |  |  |         this._pictureUploader = new OsmImageUploadHandler(tags, license, this._imageElement.slideshow).getUI(); | 
					
						
							| 
									
										
										
										
											2020-07-14 20:18:44 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-07-21 00:07:04 +02:00
										 |  |  |     InnerRender(): string { | 
					
						
							| 
									
										
										
										
											2020-07-14 20:18:44 +02:00
										 |  |  |         return this._imageElement.Render() + | 
					
						
							|  |  |  |             this._pictureUploader.Render(); | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     IsKnown(): boolean { | 
					
						
							|  |  |  |         return true; | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     IsQuestioning(): boolean { | 
					
						
							|  |  |  |         return false; | 
					
						
							|  |  |  |     } | 
					
						
							| 
									
										
										
										
											2020-07-25 01:07:02 +02:00
										 |  |  |      | 
					
						
							|  |  |  |     IsSkipped(): boolean { | 
					
						
							|  |  |  |         return false; | 
					
						
							|  |  |  |     } | 
					
						
							| 
									
										
										
										
											2020-07-14 20:18:44 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  | } |