UNPKG

@omnia/fx-models

Version:
36 lines (35 loc) 1.69 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.MediaPickerCentralImageLocationProvider = void 0; const ManifestIds_1 = require("../../ManifestIds"); const Enums_1 = require("../../Enums"); const Icon_1 = require("../../Icon"); // TODO: Rename to MediaPickerCentralMediaLocationProvider (7.0) class MediaPickerCentralImageLocationProvider { constructor(imageLocationSettings, providerName) { this.hasEditorForMedia = (media) => { const centralMedia = media; let result = false; if (media && (centralMedia.libraryId && centralMedia.graphDriveId && centralMedia.graphDriveItemId || centralMedia.videoUrl)) { result = centralMedia.libraryId == this.imageLocationSettings.libraryId; } return result; }; this.id = imageLocationSettings.libraryId; this.category = "image"; this.name = providerName; this.icon = new Icon_1.FontAwesomeIcon("fas fa-images"); //this.providerElementName = "omfx-media-picker-central-image-location-provider"; this.providerComponentId = ManifestIds_1.OmniaWebComponentManifests.FxUxCentralImageLocationProvider; this.sortOrder = 20; /** * Added support videos type (since 6.11) */ this.selectableMediaTypes = [Enums_1.MediaPickerEnums.OmniaMediaTypes.Image, Enums_1.MediaPickerEnums.OmniaMediaTypes.Video]; this.imageLocationSettings = imageLocationSettings; this.supportGalleryFeature = true; } } exports.MediaPickerCentralImageLocationProvider = MediaPickerCentralImageLocationProvider;