/** * A message to display by the disclaimer service. * * @typedef {Object} Message * @property {number} [delay=7000] The delay in milliseconds the message is shown * @property {boolean} [popup=false] Whether the message should be displayed inside a popup window or not. * @property {string} msg The message text to display. * @property {string} [layerUid] The OpenLayers layer identifier. * @property {JQuery|Element|string} [target] The target element (or selector to get the element) in which * to display the message. If not defined, then the default target of the notification service is used. * @property {string} [type='info'] The type of message. */ /** * Provides methods to display any sort of messages, disclaimers, errors, * etc. Requires Bootstrap library (both CSS and JS) to display the alerts * properly. * * @hidden */ export class MessageDisclaimerService extends ngeoMessageMessage { /** * @param {angular.ISCEService} $sce Angular sce service. * @param {angular.gettext.gettextCatalog} gettextCatalog Gettext service. * @param {import('ngeo/message/Popup').PopupFactory} ngeoCreatePopup Popup service. */ constructor($sce: angular.ISCEService, gettextCatalog: angular.gettext.gettextCatalog, ngeoCreatePopup: import("ngeo/message/Popup").PopupFactory); /** * @private * @type {angular.ISCEService} */ private sce_; /** * @type {angular.gettext.gettextCatalog} * @private */ private gettextCatalog_; /** * @private * @type {import('ngeo/message/Popup').PopupFactory} */ private createPopup_; /** * @type {JQuery} * @private */ private container_; /** * Cache of messages. * * @type {Object} * @private */ private messages_; /** * Increments if the message is used or not. * @type {Object} * @private */ private messagesConsumerCount_; /** * The messages UID currently active and visible. * @type {Object} * @private */ private uids_; /** * The messages activated once. * @type{string} * @private */ private validMessages_; /** * The messages closed manually. * @type{string} * @private */ private closedMessages_; /** * Show disclaimer message string or object or list of disclaimer message * strings or objects. * * @param {string | Message | (string | Message)[]} object * A message or list of messages as text or configuration objects. */ alert(object: string | Message | (string | Message)[]): void; /** * Close disclaimer message string or object or list of disclaimer message * strings or objects. * * @param {string | Message | (string | Message)[]} object * A message or list of messages as text or configuration objects. */ close(object: string | Message | (string | Message)[]): void; /** * Show the message. * * @param {Message} message Message. * @protected * @override */ protected override showMessage(message: Message): void; /** * @param {Message} message Message. * @returns {string} The uid. * @private */ private getMessageUid_; /** * @param {Message} message Message. * @returns {string} The uid. * @private */ private getCompatibleMessageUid_; /** * @param {string} uid The disclaimer UID. * @returns {boolean} True if the uid is present. * @private */ private isClosedMessage_; /** * @param {string} uid The disclaimer UID. * @returns {boolean} True if the uid is present. * @private */ private isValidMessage_; /** * Close the message. * * @param {Message} message Message. * @param {boolean} force Force close the message. * @protected */ protected closeMessage_(message: Message, force?: boolean): void; } export namespace MessageDisclaimerService { let $inject: string[]; } export default myModule; /** * A message to display by the disclaimer service. */ export type Message = { /** * The delay in milliseconds the message is shown */ delay?: number; /** * Whether the message should be displayed inside a popup window or not. */ popup?: boolean; /** * The message text to display. */ msg: string; /** * The OpenLayers layer identifier. */ layerUid?: string; /** * The target element (or selector to get the element) in which * to display the message. If not defined, then the default target of the notification service is used. */ target?: JQuery | Element | string; /** * The type of message. */ type?: string; }; import ngeoMessageMessage from 'ngeo/message/Message_OLD'; import angular from 'angular'; /** * @type {angular.IModule} * @hidden */ declare const myModule: angular.IModule;