openfin-notifications 1.22.0 → 1.23.0-alpha-2266
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.
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
* @hidden
|
|
15
15
|
*/
|
|
16
16
|
import { ActionDeclaration } from './actions';
|
|
17
|
+
import { ActionableTextTemplateFragment, ImageTemplateFragment, ContainerTemplateFragment } from '@client/templates/templates';
|
|
17
18
|
/**
|
|
18
19
|
* Helper to make the `type` field required on any type that defines it as being optional.
|
|
19
20
|
*/
|
|
@@ -32,7 +33,7 @@ export declare type PrimaryControlOptions = never;
|
|
|
32
33
|
* Union of options objects of all components that can be added to a notification, includes both buttons and primary
|
|
33
34
|
* controls.
|
|
34
35
|
*/
|
|
35
|
-
export declare type ControlOptions = PrimaryControlOptions | WithExplicitType<ButtonOptions>;
|
|
36
|
+
export declare type ControlOptions = Required<PrimaryControlOptions | WithExplicitType<ButtonOptions>> | WithExplicitType<ActionableTextTemplateFragment> | WithExplicitType<ImageTemplateFragment> | WithExplicitType<ContainerTemplateFragment>;
|
|
36
37
|
/**
|
|
37
38
|
* Configuration options for constructing a button within a notification.
|
|
38
39
|
*/
|
package/dist/client/index.d.ts
CHANGED
|
@@ -15,6 +15,7 @@ import { NotificationSource } from './source';
|
|
|
15
15
|
import { NotificationIndicator, IndicatorType, IndicatorColor } from './indicator';
|
|
16
16
|
import { NotificationOptions } from './templates/templates';
|
|
17
17
|
import { UpdatableNotificationOptions } from './templates/update';
|
|
18
|
+
import * as actions from './actions';
|
|
18
19
|
export * from './actions';
|
|
19
20
|
export * from './controls';
|
|
20
21
|
export * from './source';
|
|
@@ -22,7 +23,7 @@ export * from './forms';
|
|
|
22
23
|
export * from './stream';
|
|
23
24
|
export * from './templates';
|
|
24
25
|
export * from './platform';
|
|
25
|
-
export { provider, NotificationOptions };
|
|
26
|
+
export { actions, provider, NotificationOptions };
|
|
26
27
|
export { NotificationIndicator, IndicatorColor, IndicatorType as NotificationIndicatorType };
|
|
27
28
|
/**
|
|
28
29
|
* The Notification Client library's version in semver format.
|
|
@@ -52,7 +53,7 @@ export declare type UpdatableNotification<T extends UpdatableNotificationOptions
|
|
|
52
53
|
/**
|
|
53
54
|
* Event fired when an action is raised for a notification due to a specified trigger. It is important to note that
|
|
54
55
|
* applications will only receive these events if they indicate to the service that they want to receive these events.
|
|
55
|
-
* See {@link
|
|
56
|
+
* See {@link actions} for a full example of how actions are defined, and how an application can listen to and handle
|
|
56
57
|
* them.
|
|
57
58
|
*
|
|
58
59
|
* This can be fired due to interaction with notification buttons or the notification itself, the notification being
|
|
@@ -114,7 +115,7 @@ export interface NotificationActionEvent<T = CustomData> {
|
|
|
114
115
|
* }
|
|
115
116
|
* ```
|
|
116
117
|
*/
|
|
117
|
-
control?: Readonly<
|
|
118
|
+
control?: Readonly<ControlOptions>;
|
|
118
119
|
/**
|
|
119
120
|
* Application-defined metadata that this event is passing back to the application.
|
|
120
121
|
*
|
|
@@ -11,7 +11,7 @@ import type OpenFin from '@openfin/core';
|
|
|
11
11
|
import { NotificationActionResult, ActionTrigger } from './actions';
|
|
12
12
|
import { ProviderStatus } from './provider';
|
|
13
13
|
import { NotificationSource } from './source';
|
|
14
|
-
import { NotificationOptions, Notification, NotificationActionEvent, NotificationClosedEvent, NotificationCreatedEvent, NotificationsCountChanged, NotificationFormSubmittedEvent, UpdatableNotification, NotificationPlatform, UpdatableNotificationOptions, NotificationToastDismissedEvent, ShowOptions, NotificationReminderCreatedEvent, NotificationReminderRemovedEvent, RegistrationMetaInfo } from './index';
|
|
14
|
+
import { NotificationOptions, Notification, NotificationActionEvent, NotificationClosedEvent, NotificationCreatedEvent, NotificationsCountChanged, NotificationFormSubmittedEvent, UpdatableNotification, NotificationPlatform, UpdatableNotificationOptions, NotificationToastDismissedEvent, ShowOptions, NotificationReminderCreatedEvent, NotificationReminderRemovedEvent, RegistrationMetaInfo, ImageTemplateFragment, ContainerTemplateFragment, ActionableTextTemplateFragment } from './index';
|
|
15
15
|
/**
|
|
16
16
|
* The identity of the main application window of the service provider
|
|
17
17
|
*/
|
|
@@ -70,6 +70,7 @@ export declare type UpdatePayload<T extends UpdatableNotificationOptions = Updat
|
|
|
70
70
|
export declare type NotificationInternal<T extends NotificationOptions = NotificationOptions> = DistributiveOmit<Notification<T>, 'date' | 'expires'> & {
|
|
71
71
|
date: number;
|
|
72
72
|
expires: number | null;
|
|
73
|
+
_fragments?: (ActionableTextTemplateFragment | ImageTemplateFragment | ContainerTemplateFragment)[];
|
|
73
74
|
};
|
|
74
75
|
export interface NotificationPlatformInternal extends NotificationPlatform {
|
|
75
76
|
platformIdentity: OpenFin.ApplicationIdentity;
|
|
@@ -93,7 +94,7 @@ export interface NotificationActionEventTransport {
|
|
|
93
94
|
source: NotificationSource;
|
|
94
95
|
result: NotificationActionResult;
|
|
95
96
|
trigger: ActionTrigger;
|
|
96
|
-
controlSource?: 'buttons';
|
|
97
|
+
controlSource?: 'buttons' | '_fragments';
|
|
97
98
|
controlIndex?: number;
|
|
98
99
|
}
|
|
99
100
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.notifications=t():e.notifications=t()}(self,(()=>{return e={17187:e=>{"use strict";var t,n="object"==typeof Reflect?Reflect:null,i=n&&"function"==typeof n.apply?n.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};t=n&&"function"==typeof n.ownKeys?n.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var r=Number.isNaN||function(e){return e!=e};function o(){o.init.call(this)}e.exports=o,e.exports.once=function(e,t){return new Promise((function(n,i){function r(n){e.removeListener(t,o),i(n)}function o(){"function"==typeof e.removeListener&&e.removeListener("error",r),n([].slice.call(arguments))}m(e,t,o,{once:!0}),"error"!==t&&function(e,t,n){"function"==typeof e.on&&m(e,"error",t,{once:!0})}(e,r)}))},o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var s=10;function a(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function c(e){return void 0===e._maxListeners?o.defaultMaxListeners:e._maxListeners}function u(e,t,n,i){var r,o,s,u;if(a(n),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),o=e._events),s=o[t]),void 0===s)s=o[t]=n,++e._eventsCount;else if("function"==typeof s?s=o[t]=i?[n,s]:[s,n]:i?s.unshift(n):s.push(n),(r=c(e))>0&&s.length>r&&!s.warned){s.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=e,l.type=t,l.count=s.length,u=l,console&&console.warn&&console.warn(u)}return e}function l(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function f(e,t,n){var i={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},r=l.bind(i);return r.listener=n,i.wrapFn=r,r}function d(e,t,n){var i=e._events;if(void 0===i)return[];var r=i[t];return void 0===r?[]:"function"==typeof r?n?[r.listener||r]:[r]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(r):v(r,r.length)}function p(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function v(e,t){for(var n=new Array(t),i=0;i<t;++i)n[i]=e[i];return n}function m(e,t,n,i){if("function"==typeof e.on)i.once?e.once(t,n):e.on(t,n);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function r(o){i.once&&e.removeEventListener(t,r),n(o)}))}}Object.defineProperty(o,"defaultMaxListeners",{enumerable:!0,get:function(){return s},set:function(e){if("number"!=typeof e||e<0||r(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");s=e}}),o.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},o.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||r(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},o.prototype.getMaxListeners=function(){return c(this)},o.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var r="error"===e,o=this._events;if(void 0!==o)r=r&&void 0===o.error;else if(!r)return!1;if(r){var s;if(t.length>0&&(s=t[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var c=o[e];if(void 0===c)return!1;if("function"==typeof c)i(c,this,t);else{var u=c.length,l=v(c,u);for(n=0;n<u;++n)i(l[n],this,t)}return!0},o.prototype.addListener=function(e,t){return u(this,e,t,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(e,t){return u(this,e,t,!0)},o.prototype.once=function(e,t){return a(t),this.on(e,f(this,e,t)),this},o.prototype.prependOnceListener=function(e,t){return a(t),this.prependListener(e,f(this,e,t)),this},o.prototype.removeListener=function(e,t){var n,i,r,o,s;if(a(t),void 0===(i=this._events))return this;if(void 0===(n=i[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete i[e],i.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(r=-1,o=n.length-1;o>=0;o--)if(n[o]===t||n[o].listener===t){s=n[o].listener,r=o;break}if(r<0)return this;0===r?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,r),1===n.length&&(i[e]=n[0]),void 0!==i.removeListener&&this.emit("removeListener",e,s||t)}return this},o.prototype.off=o.prototype.removeListener,o.prototype.removeAllListeners=function(e){var t,n,i;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var r,o=Object.keys(n);for(i=0;i<o.length;++i)"removeListener"!==(r=o[i])&&this.removeAllListeners(r);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(i=t.length-1;i>=0;i--)this.removeListener(e,t[i]);return this},o.prototype.listeners=function(e){return d(this,e,!0)},o.prototype.rawListeners=function(e){return d(this,e,!1)},o.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):p.call(e,t)},o.prototype.listenerCount=p,o.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},54456:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DeferredPromise=class{constructor(){const e=new Promise(((e,t)=>{this._resolve=e,this._reject=t}));this._promise=e}get promise(){return this._promise}get resolve(){return this._resolve}get reject(){return this._reject}}},16272:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(54456);async function r(e,t){let n=0;for(const i of e)await t(i,n,e),n++}async function o(e,t){await Promise.all(e.map(t))}function s(e,t,n){const r=new i.DeferredPromise,o=e.add(((...e)=>{t(...e)&&(o.remove(),r.resolve())}));return n&&n.catch((e=>{o.remove(),r.reject(e)})),a(r.promise)}function a(e){return e.catch((()=>{})),e}t.serialForEach=r,t.serialMap=async function(e,t){const n=[];return await r(e,(async(e,i,r)=>{n.push(await t(e,i,r))})),n},t.serialFilter=async function(e,t){const n=[];return await r(e,(async(e,i,r)=>{await t(e,i,r)&&n.push(e)})),n},t.parallelForEach=o,t.parallelMap=async function(e,t){const n=[];return await o(e,(async(e,i,r)=>{n[i]=await t(e,i,r)})),n},t.parallelFilter=async function(e,t){const n=[];return await o(e,(async(e,i,r)=>{n[i]=await t(e,i,r)})),e.filter(((e,t)=>n[t]))},t.withStrictTimeout=function(e,t,n){const i=new Promise(((t,i)=>setTimeout((()=>i(new Error(n))),e)));return a(Promise.race([i,t]))},t.withTimeout=function(e,t){const n=new Promise((t=>setTimeout((()=>t([!0,void 0])),e))),i=t.then((e=>[!1,e]));return Promise.race([n,i])},t.untilTrue=function(e,t,n){return t()?Promise.resolve():s(e,t,n)},t.untilSignal=s,t.allowReject=a},95881:(e,t,n)=>{"use strict";function i(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0}),i(n(16272)),i(n(54456))},29140:e=>{e.exports=function(e,t){for(var n=e.split("."),i=t.split("."),r=0;r<3;r++){var o=Number(n[r]),s=Number(i[r]);if(o>s)return 1;if(s>o)return-1;if(!isNaN(o)&&isNaN(s))return 1;if(isNaN(o)&&!isNaN(s))return-1}return 0}},17385:function(e,t){"use strict";var n=this&&this.__rest||function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(n[i[r]]=e[i[r]])}return n};Object.defineProperty(t,"__esModule",{value:!0}),t.EventRouter=void 0,t.EventRouter=class{constructor(e){this._emitterProviders={},this._deserializers={},this._defaultEmitter=e}registerEmitterProvider(e,t){this._emitterProviders[e]=t}registerDeserializer(e,t){this._deserializers[e]=t}dispatchEvent(e){const{type:t,target:i}=e,r=n(e,["type","target"]);let o;if(!i)throw new Error("Invalid event, no target specified");if("default"===i)o=this._defaultEmitter;else{if(!this._emitterProviders[i.type])throw new Error(`Invalid target, no provider registered for '${i.type}'`);o=this._emitterProviders[i.type](i.id)}const s=Object.assign({type:t},r),a=this._deserializers[t];a?o.emit(t,a(s)):o.emit(t,s)}}},19659:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.ActionBodyClickType=t.ActionNoopType=t.ActionTrigger=void 0,(n=t.ActionTrigger||(t.ActionTrigger={})).CONTROL="control",n.SELECT="select",n.CLOSE="close",n.EXPIRE="expire",n.PROGRAMMATIC="programmatic",(t.ActionNoopType||(t.ActionNoopType={})).EVENT_DISMISS="event_dismiss",(t.ActionBodyClickType||(t.ActionBodyClickType={})).DISMISS_EVENT="dismiss_event"},12052:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getEventRouter=t.tryServiceDispatch=t.getServicePromise=t.eventEmitter=void 0;const i=n(17187),r=n(95881),o=n(76598),s=n(17385);let a;t.eventEmitter=new i.EventEmitter;const c=new r.DeferredPromise;let u,l=!1;async function f(){if(window.navigator.appVersion.includes("Windows"))try{const e=await fin.System.getRvmInfo();parseInt(e.version.split(".")[0])>=6&&(fin.System.launchManifest?fin.System.launchManifest("fins://system-apps/notification-center",{noUi:!0}).catch((e=>{console.error("Unable to launch the Notification Center as a system app",e)})):fin.System.openUrlWithBrowser("fins://system-apps/notification-center").catch((()=>{})))}catch(e){}else fin.System.openUrlWithBrowser("fins://system-apps/notification-center")}async function d(){var e;if(await c.promise,!a){if("undefined"==typeof fin){const e="fin is not defined. The openfin-notifications module is only intended for use in an OpenFin application.";return a=Promise.reject(new Error(e)),a}fin.System.getVersion().then((e=>{const t=parseInt(e.split(".")[2]);t<53&&console.warn(`API version ${t} of OpenFin version ${e} is less than 53. Please upgrade the runtime version.`)}));const{name:t,uuid:n}=null!==(e=fin.me.identity)&&void 0!==e?e:fin.Window.me;if(n===o.SERVICE_IDENTITY.uuid&&t===o.SERVICE_IDENTITY.name)a=Promise.reject(new Error("Trying to connect to provider from provider"));else{const e=window.setTimeout((()=>{console.warn("Taking a long time to connect to Notifications service. Is the Notifications service running?")}),5e3);a=fin.InterApplicationBus.Channel.connect(o.SERVICE_CHANNEL,{wait:!0,payload:{version:"1.22.0"}}).then((t=>{window.clearTimeout(e);const n=p();return t.register("WARN",(e=>console.warn(e))),t.register("event",(e=>{n.dispatchEvent(e)})),t.setDefaultAction((()=>!1)),t.onDisconnection((()=>{console.warn("Disconnected from Notifications service"),l=!0,a=null,f(),setTimeout((()=>{console.log("Attempting to reconnect to Notifications service"),d()}),300)})),l?console.log("Reconnected to Notifications service"):console.log("Connected to Notifications service"),t}))}}return a}function p(){return u||(u=new s.EventRouter(t.eventEmitter)),u}"undefined"!=typeof fin&&"undefined"!=typeof window&&(f(),d(),"loading"!==document.readyState?c.resolve():(window.addEventListener("DOMContentLoaded",(()=>{c.resolve()})),document.addEventListener("DOMContentLoaded",(()=>{c.resolve()})))),t.getServicePromise=d,t.tryServiceDispatch=async function(e,t){return(await d()).dispatch(e,t)},t.getEventRouter=p},490:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},97490:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FieldType=void 0,t.FieldType={string:"string",number:"number",boolean:"boolean"}},8910:function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||i(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),r(n(97490),t),r(n(7713),t)},7713:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WidgetType=t.BooleanWidgetType=t.NumberWidgetType=t.StringWidgetType=void 0,t.StringWidgetType={Text:"Text"},t.NumberWidgetType={Number:"Number"},t.BooleanWidgetType={Toggle:"Toggle",Checkbox:"Checkbox"},t.WidgetType=Object.assign(Object.assign(Object.assign({},t.StringWidgetType),t.NumberWidgetType),t.BooleanWidgetType)},61995:function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&i(t,e,n);return r(t,e),t},s=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||i(t,e,n)},a=this&&this.__rest||function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(n[i[r]]=e[i[r]])}return n};Object.defineProperty(t,"__esModule",{value:!0}),t.getNotificationsCount=t.hide=t.show=t.toggleNotificationCenter=t.clearAll=t.getAll=t.clear=t.update=t.create=t.removeEventListener=t.addEventListener=t.VERSION=t.NotificationIndicatorType=t.IndicatorColor=t.NotificationIndicator=t.NotificationOptions=t.provider=void 0;const c=n(19659),u=n(12052),l=n(76598),f=o(n(30207));t.provider=f;const d=n(72475),p=n(5221);Object.defineProperty(t,"NotificationIndicator",{enumerable:!0,get:function(){return p.NotificationIndicator}}),Object.defineProperty(t,"NotificationIndicatorType",{enumerable:!0,get:function(){return p.IndicatorType}}),Object.defineProperty(t,"IndicatorColor",{enumerable:!0,get:function(){return p.IndicatorColor}});const v=n(12908);Object.defineProperty(t,"NotificationOptions",{enumerable:!0,get:function(){return v.NotificationOptions}}),s(n(19659),t),s(n(490),t),s(n(55063),t),s(n(8910),t),s(n(87221),t),s(n(49757),t),s(n(7005),t),t.VERSION="1.22.0";const m=(0,u.getEventRouter)();function y(e){const{notification:t}=e;return Object.assign(Object.assign({},e),{notification:Object.assign(Object.assign({},t),{date:new Date(t.date),expires:null!==t.expires?new Date(t.expires):null})})}m.registerDeserializer("notification-created",(e=>y(e))),m.registerDeserializer("notification-toast-dismissed",(e=>y(e))),m.registerDeserializer("notification-closed",(e=>y(e))),m.registerDeserializer("notification-action",(e=>{const t=y(e),{controlSource:n,controlIndex:i}=t,r=a(t,["controlSource","controlIndex"]);if(e.trigger===c.ActionTrigger.CONTROL){const t=e.notification[n][i];return Object.assign(Object.assign({},r),{control:t})}return r})),m.registerDeserializer("notifications-count-changed",(e=>e)),m.registerDeserializer("notification-reminder-created",(e=>{const t=y(e),{reminderDate:n}=t,i=a(t,["reminderDate"]);return Object.assign(Object.assign({},i),{reminderDate:new Date(n)})})),m.registerDeserializer("notification-reminder-removed",(e=>y(e))),t.addEventListener=function(e,t){(0,d.validateEnvironment)(),e=(0,d.sanitizeEventType)(e),t=(0,d.sanitizeFunction)(t);const n=u.eventEmitter.listenerCount(e);u.eventEmitter.addListener(e,t),0===n&&1===u.eventEmitter.listenerCount(e)&&(0,u.tryServiceDispatch)(l.APITopic.ADD_EVENT_LISTENER,e)},t.removeEventListener=function(e,t){(0,d.validateEnvironment)(),e=(0,d.sanitizeEventType)(e),t=(0,d.sanitizeFunction)(t);const n=u.eventEmitter.listenerCount(e);u.eventEmitter.removeListener(e,t),1===n&&0===u.eventEmitter.listenerCount(e)&&(0,u.tryServiceDispatch)(l.APITopic.REMOVE_EVENT_LISTENER,e)},t.create=async function(e,t){if("object"!=typeof e||null===e)throw new Error("Invalid argument passed to create: argument must be an object and must not be null");if(void 0!==e.date&&!(e.date instanceof Date))throw new Error('Invalid argument passed to create: "date" must be a valid Date object');if(void 0!==e.expires&&null!==e.expires&&!(e.expires instanceof Date))throw new Error('Invalid argument passed to create: "expires" must be null or a valid Date object');if(t&&t.reminderDate){if(!1===e.allowReminder)throw new Error('You must not specify a reminder date for a notification with "allowReminder" option set to false.');if(!(t.reminderDate instanceof Date))throw new Error('Invalid argument passed to reminder Options: "date" must a valid Date object');if(e.expires&&e.expires.getTime()<t.reminderDate.getTime())throw new Error("Expiration date must not be earlier than reminder date.")}void 0!==e.category&&null!==e.category||(e.category="default");const n=await(0,u.tryServiceDispatch)(l.APITopic.CREATE_NOTIFICATION,Object.assign(Object.assign({},e),{date:e.date&&e.date.valueOf(),expires:e.expires&&e.expires.valueOf(),reminder:(null==t?void 0:t.reminderDate)&&t.reminderDate.valueOf()}));return Object.assign(Object.assign({},n),{date:new Date(n.date),expires:null!==n.expires?new Date(n.expires):null})},t.update=async function(e){if("object"!=typeof e||null===e)throw new Error("Invalid argument passed to create: argument must be an object and must not be null");if(!e.id)throw new Error('Invalid argument passed to create: "id" must be Id of previously created Notification');const t=await(0,u.tryServiceDispatch)(l.APITopic.UPDATE_NOTIFICATION,Object.assign({},e));return Object.assign({},t)},t.clear=async function(e){return(0,u.tryServiceDispatch)(l.APITopic.CLEAR_NOTIFICATION,{id:e})},t.getAll=async function(){return(await(0,u.tryServiceDispatch)(l.APITopic.GET_APP_NOTIFICATIONS,void 0)).map((e=>Object.assign(Object.assign({},e),{indicator:e.indicator||null,date:new Date(e.date),expires:null!==e.expires?new Date(e.expires):null})))},t.clearAll=async function(){return(0,u.tryServiceDispatch)(l.APITopic.CLEAR_APP_NOTIFICATIONS,void 0)},t.toggleNotificationCenter=async function(){return(0,u.tryServiceDispatch)(l.APITopic.TOGGLE_NOTIFICATION_CENTER,void 0)},t.show=async function(e){return(0,u.tryServiceDispatch)(l.APITopic.SHOW_NOTIFICATION_CENTER,e)},t.hide=async function(){return(0,u.tryServiceDispatch)(l.APITopic.HIDE_NOTIFICATION_CENTER,void 0)},t.getNotificationsCount=async function(){return(0,u.tryServiceDispatch)(l.APITopic.GET_NOTIFICATIONS_COUNT,void 0)}},5221:(e,t)=>{"use strict";var n,i;Object.defineProperty(t,"__esModule",{value:!0}),t.IndicatorColor=t.IndicatorType=void 0,(i=t.IndicatorType||(t.IndicatorType={})).FAILURE="failure",i.WARNING="warning",i.SUCCESS="success",(n=t.IndicatorColor||(t.IndicatorColor={})).RED="red",n.GREEN="green",n.YELLOW="yellow",n.BLUE="blue",n.PURPLE="purple",n.GRAY="gray"},76598:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.APITopic=t.SERVICE_CHANNEL=t.SERVICE_IDENTITY=void 0,t.SERVICE_IDENTITY={uuid:"notifications-service",name:"notifications-service"},t.SERVICE_CHANNEL="of-notifications-service-v1",(n=t.APITopic||(t.APITopic={})).CREATE_NOTIFICATION="create-notification",n.UPDATE_NOTIFICATION="update-notification",n.CLEAR_NOTIFICATION="clear-notification",n.GET_APP_NOTIFICATIONS="fetch-app-notifications",n.CLEAR_APP_NOTIFICATIONS="clear-app-notifications",n.TOGGLE_NOTIFICATION_CENTER="toggle-notification-center",n.ADD_EVENT_LISTENER="add-event-listener",n.REMOVE_EVENT_LISTENER="remove-event-listener",n.GET_PROVIDER_STATUS="get-provider-status",n.GET_NOTIFICATIONS_COUNT="get-notifications-count",n.REGISTER_PLATFORM="register-notifications-platform",n.DEREGISTER_PLATFORM="deregister-notifications-platform",n.SHOW_NOTIFICATION_CENTER="show-notification-center",n.HIDE_NOTIFICATION_CENTER="hide-notification-center"},7005:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.deregisterPlatform=t.registerPlatform=void 0;const i=n(12052),r=n(76598);t.registerPlatform=async function(e){if("object"!=typeof e||null===e)throw new Error("Invalid argument passed to registerPlatform: argument must be an object and must not be null");if(!e.id)throw new Error('Invalid argument passed to registerPlatform: "id" must be a non-empty string in platform info.');const t=await(0,i.tryServiceDispatch)(r.APITopic.REGISTER_PLATFORM,Object.assign({},e));return{notificationsVersion:t?t.notificationsVersion:"unknown",clientAPIVersion:"1.22.0"}},t.deregisterPlatform=async function(e){if(!e)throw new Error('Invalid argument passed to deregisterPlatform: "id" must be a non-empty string.');return(0,i.tryServiceDispatch)(r.APITopic.DEREGISTER_PLATFORM,{id:e})}},30207:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.isConnectedToAtLeast=t.getStatus=void 0;const r=i(n(29140)),o=n(95881),s=n(12052),a=n(76598);function c(){return(0,o.withStrictTimeout)(500,(0,s.tryServiceDispatch)(a.APITopic.GET_PROVIDER_STATUS,void 0),"").catch((()=>({connected:!1,version:null,templateAPIVersion:null})))}t.getStatus=c,t.isConnectedToAtLeast=async function(e){const t=await c();if(t.connected&&null!==t.version){const n=(0,r.default)(t.version,e);if(0===n||1===n)return!0}return!1}},55063:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},87221:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},30600:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},23371:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},49757:function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||i(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),r(n(30600),t),r(n(23371),t),r(n(12908),t),r(n(48877),t)},12908:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TemplateFragmentNames=t.PresentationTemplateFragmentNames=t.ContainerTemplateFragmentNames=t.TemplateNames=void 0,t.TemplateNames={markdown:"markdown",list:"list",custom:"custom"},t.ContainerTemplateFragmentNames={container:"container"},t.PresentationTemplateFragmentNames={text:"text",image:"image",list:"list"},t.TemplateFragmentNames=Object.assign(Object.assign({},t.ContainerTemplateFragmentNames),t.PresentationTemplateFragmentNames)},48877:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},72475:(e,t)=>{"use strict";function n(e,t){let n;try{n=JSON.stringify(e)}catch(e){n=t}return n}Object.defineProperty(t,"__esModule",{value:!0}),t.safeStringify=t.validateEnvironment=t.sanitizeEventType=t.sanitizeFunction=void 0,t.sanitizeFunction=function(e){if("function"!=typeof e)throw new Error(`Invalid argument passed: ${n(e,"The provided value")} is not a valid function`);return e},t.sanitizeEventType=function(e){if("notification-action"===e||"notification-created"===e||"notification-toast-dismissed"===e||"notification-closed"===e||"notifications-count-changed"===e||"notification-form-submitted"===e||"notification-reminder-created"===e||"notification-reminder-removed"===e)return e;throw new Error(`Invalid argument passed: ${n(e,"The provided event type")} is not a valid Notifications event type`)},t.validateEnvironment=function(){if("undefined"==typeof fin)throw new Error("fin is not defined. The openfin-notifications module is only intended for use in an OpenFin application.")},t.safeStringify=n}},t={},function n(i){var r=t[i];if(void 0!==r)return r.exports;var o=t[i]={exports:{}};return e[i].call(o.exports,o,o.exports,n),o.exports}(61995);var e,t}));
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.notifications=t():e.notifications=t()}(self,(()=>{return e={17187:e=>{"use strict";var t,n="object"==typeof Reflect?Reflect:null,i=n&&"function"==typeof n.apply?n.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};t=n&&"function"==typeof n.ownKeys?n.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var r=Number.isNaN||function(e){return e!=e};function o(){o.init.call(this)}e.exports=o,e.exports.once=function(e,t){return new Promise((function(n,i){function r(n){e.removeListener(t,o),i(n)}function o(){"function"==typeof e.removeListener&&e.removeListener("error",r),n([].slice.call(arguments))}m(e,t,o,{once:!0}),"error"!==t&&function(e,t,n){"function"==typeof e.on&&m(e,"error",t,{once:!0})}(e,r)}))},o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var s=10;function a(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function c(e){return void 0===e._maxListeners?o.defaultMaxListeners:e._maxListeners}function u(e,t,n,i){var r,o,s,u;if(a(n),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),o=e._events),s=o[t]),void 0===s)s=o[t]=n,++e._eventsCount;else if("function"==typeof s?s=o[t]=i?[n,s]:[s,n]:i?s.unshift(n):s.push(n),(r=c(e))>0&&s.length>r&&!s.warned){s.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=e,l.type=t,l.count=s.length,u=l,console&&console.warn&&console.warn(u)}return e}function l(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function f(e,t,n){var i={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},r=l.bind(i);return r.listener=n,i.wrapFn=r,r}function d(e,t,n){var i=e._events;if(void 0===i)return[];var r=i[t];return void 0===r?[]:"function"==typeof r?n?[r.listener||r]:[r]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(r):v(r,r.length)}function p(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function v(e,t){for(var n=new Array(t),i=0;i<t;++i)n[i]=e[i];return n}function m(e,t,n,i){if("function"==typeof e.on)i.once?e.once(t,n):e.on(t,n);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function r(o){i.once&&e.removeEventListener(t,r),n(o)}))}}Object.defineProperty(o,"defaultMaxListeners",{enumerable:!0,get:function(){return s},set:function(e){if("number"!=typeof e||e<0||r(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");s=e}}),o.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},o.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||r(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},o.prototype.getMaxListeners=function(){return c(this)},o.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var r="error"===e,o=this._events;if(void 0!==o)r=r&&void 0===o.error;else if(!r)return!1;if(r){var s;if(t.length>0&&(s=t[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var c=o[e];if(void 0===c)return!1;if("function"==typeof c)i(c,this,t);else{var u=c.length,l=v(c,u);for(n=0;n<u;++n)i(l[n],this,t)}return!0},o.prototype.addListener=function(e,t){return u(this,e,t,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(e,t){return u(this,e,t,!0)},o.prototype.once=function(e,t){return a(t),this.on(e,f(this,e,t)),this},o.prototype.prependOnceListener=function(e,t){return a(t),this.prependListener(e,f(this,e,t)),this},o.prototype.removeListener=function(e,t){var n,i,r,o,s;if(a(t),void 0===(i=this._events))return this;if(void 0===(n=i[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete i[e],i.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(r=-1,o=n.length-1;o>=0;o--)if(n[o]===t||n[o].listener===t){s=n[o].listener,r=o;break}if(r<0)return this;0===r?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,r),1===n.length&&(i[e]=n[0]),void 0!==i.removeListener&&this.emit("removeListener",e,s||t)}return this},o.prototype.off=o.prototype.removeListener,o.prototype.removeAllListeners=function(e){var t,n,i;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var r,o=Object.keys(n);for(i=0;i<o.length;++i)"removeListener"!==(r=o[i])&&this.removeAllListeners(r);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(i=t.length-1;i>=0;i--)this.removeListener(e,t[i]);return this},o.prototype.listeners=function(e){return d(this,e,!0)},o.prototype.rawListeners=function(e){return d(this,e,!1)},o.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):p.call(e,t)},o.prototype.listenerCount=p,o.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},54456:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DeferredPromise=class{constructor(){const e=new Promise(((e,t)=>{this._resolve=e,this._reject=t}));this._promise=e}get promise(){return this._promise}get resolve(){return this._resolve}get reject(){return this._reject}}},16272:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(54456);async function r(e,t){let n=0;for(const i of e)await t(i,n,e),n++}async function o(e,t){await Promise.all(e.map(t))}function s(e,t,n){const r=new i.DeferredPromise,o=e.add(((...e)=>{t(...e)&&(o.remove(),r.resolve())}));return n&&n.catch((e=>{o.remove(),r.reject(e)})),a(r.promise)}function a(e){return e.catch((()=>{})),e}t.serialForEach=r,t.serialMap=async function(e,t){const n=[];return await r(e,(async(e,i,r)=>{n.push(await t(e,i,r))})),n},t.serialFilter=async function(e,t){const n=[];return await r(e,(async(e,i,r)=>{await t(e,i,r)&&n.push(e)})),n},t.parallelForEach=o,t.parallelMap=async function(e,t){const n=[];return await o(e,(async(e,i,r)=>{n[i]=await t(e,i,r)})),n},t.parallelFilter=async function(e,t){const n=[];return await o(e,(async(e,i,r)=>{n[i]=await t(e,i,r)})),e.filter(((e,t)=>n[t]))},t.withStrictTimeout=function(e,t,n){const i=new Promise(((t,i)=>setTimeout((()=>i(new Error(n))),e)));return a(Promise.race([i,t]))},t.withTimeout=function(e,t){const n=new Promise((t=>setTimeout((()=>t([!0,void 0])),e))),i=t.then((e=>[!1,e]));return Promise.race([n,i])},t.untilTrue=function(e,t,n){return t()?Promise.resolve():s(e,t,n)},t.untilSignal=s,t.allowReject=a},95881:(e,t,n)=>{"use strict";function i(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0}),i(n(16272)),i(n(54456))},29140:e=>{e.exports=function(e,t){for(var n=e.split("."),i=t.split("."),r=0;r<3;r++){var o=Number(n[r]),s=Number(i[r]);if(o>s)return 1;if(s>o)return-1;if(!isNaN(o)&&isNaN(s))return 1;if(isNaN(o)&&!isNaN(s))return-1}return 0}},17385:function(e,t){"use strict";var n=this&&this.__rest||function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(n[i[r]]=e[i[r]])}return n};Object.defineProperty(t,"__esModule",{value:!0}),t.EventRouter=void 0,t.EventRouter=class{constructor(e){this._emitterProviders={},this._deserializers={},this._defaultEmitter=e}registerEmitterProvider(e,t){this._emitterProviders[e]=t}registerDeserializer(e,t){this._deserializers[e]=t}dispatchEvent(e){const{type:t,target:i}=e,r=n(e,["type","target"]);let o;if(!i)throw new Error("Invalid event, no target specified");if("default"===i)o=this._defaultEmitter;else{if(!this._emitterProviders[i.type])throw new Error(`Invalid target, no provider registered for '${i.type}'`);o=this._emitterProviders[i.type](i.id)}const s=Object.assign({type:t},r),a=this._deserializers[t];a?o.emit(t,a(s)):o.emit(t,s)}}},19659:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.ActionBodyClickType=t.ActionNoopType=t.ActionTrigger=void 0,(n=t.ActionTrigger||(t.ActionTrigger={})).CONTROL="control",n.SELECT="select",n.CLOSE="close",n.EXPIRE="expire",n.PROGRAMMATIC="programmatic",(t.ActionNoopType||(t.ActionNoopType={})).EVENT_DISMISS="event_dismiss",(t.ActionBodyClickType||(t.ActionBodyClickType={})).DISMISS_EVENT="dismiss_event"},12052:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getEventRouter=t.tryServiceDispatch=t.getServicePromise=t.eventEmitter=void 0;const i=n(17187),r=n(95881),o=n(76598),s=n(17385);let a;t.eventEmitter=new i.EventEmitter;const c=new r.DeferredPromise;let u,l=!1;async function f(){if(window.navigator.appVersion.includes("Windows"))try{const e=await fin.System.getRvmInfo();parseInt(e.version.split(".")[0])>=6&&(fin.System.launchManifest?fin.System.launchManifest("fins://system-apps/notification-center",{noUi:!0}).catch((e=>{console.error("Unable to launch the Notification Center as a system app",e)})):fin.System.openUrlWithBrowser("fins://system-apps/notification-center").catch((()=>{})))}catch(e){}else fin.System.openUrlWithBrowser("fins://system-apps/notification-center")}async function d(){var e;if(await c.promise,!a){if("undefined"==typeof fin){const e="fin is not defined. The openfin-notifications module is only intended for use in an OpenFin application.";return a=Promise.reject(new Error(e)),a}fin.System.getVersion().then((e=>{const t=parseInt(e.split(".")[2]);t<53&&console.warn(`API version ${t} of OpenFin version ${e} is less than 53. Please upgrade the runtime version.`)}));const{name:t,uuid:n}=null!==(e=fin.me.identity)&&void 0!==e?e:fin.Window.me;if(n===o.SERVICE_IDENTITY.uuid&&t===o.SERVICE_IDENTITY.name)a=Promise.reject(new Error("Trying to connect to provider from provider"));else{const e=window.setTimeout((()=>{console.warn("Taking a long time to connect to Notifications service. Is the Notifications service running?")}),5e3);a=fin.InterApplicationBus.Channel.connect(o.SERVICE_CHANNEL,{wait:!0,payload:{version:"1.23.0-alpha-2266"}}).then((t=>{window.clearTimeout(e);const n=p();return t.register("WARN",(e=>console.warn(e))),t.register("event",(e=>{n.dispatchEvent(e)})),t.setDefaultAction((()=>!1)),t.onDisconnection((()=>{console.warn("Disconnected from Notifications service"),l=!0,a=null,f(),setTimeout((()=>{console.log("Attempting to reconnect to Notifications service"),d()}),300)})),l?console.log("Reconnected to Notifications service"):console.log("Connected to Notifications service"),t}))}}return a}function p(){return u||(u=new s.EventRouter(t.eventEmitter)),u}"undefined"!=typeof fin&&"undefined"!=typeof window&&(f(),d(),"loading"!==document.readyState?c.resolve():(window.addEventListener("DOMContentLoaded",(()=>{c.resolve()})),document.addEventListener("DOMContentLoaded",(()=>{c.resolve()})))),t.getServicePromise=d,t.tryServiceDispatch=async function(e,t){return(await d()).dispatch(e,t)},t.getEventRouter=p},490:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},97490:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FieldType=void 0,t.FieldType={string:"string",number:"number",boolean:"boolean"}},8910:function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||i(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),r(n(97490),t),r(n(7713),t)},7713:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WidgetType=t.BooleanWidgetType=t.NumberWidgetType=t.StringWidgetType=void 0,t.StringWidgetType={Text:"Text"},t.NumberWidgetType={Number:"Number"},t.BooleanWidgetType={Toggle:"Toggle",Checkbox:"Checkbox"},t.WidgetType=Object.assign(Object.assign(Object.assign({},t.StringWidgetType),t.NumberWidgetType),t.BooleanWidgetType)},61995:function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&i(t,e,n);return r(t,e),t},s=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||i(t,e,n)},a=this&&this.__rest||function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(n[i[r]]=e[i[r]])}return n};Object.defineProperty(t,"__esModule",{value:!0}),t.getNotificationsCount=t.hide=t.show=t.toggleNotificationCenter=t.clearAll=t.getAll=t.clear=t.update=t.create=t.removeEventListener=t.addEventListener=t.VERSION=t.NotificationIndicatorType=t.IndicatorColor=t.NotificationIndicator=t.NotificationOptions=t.provider=t.actions=void 0;const c=n(19659),u=n(12052),l=n(76598),f=o(n(30207));t.provider=f;const d=n(72475),p=n(5221);Object.defineProperty(t,"NotificationIndicator",{enumerable:!0,get:function(){return p.NotificationIndicator}}),Object.defineProperty(t,"NotificationIndicatorType",{enumerable:!0,get:function(){return p.IndicatorType}}),Object.defineProperty(t,"IndicatorColor",{enumerable:!0,get:function(){return p.IndicatorColor}});const v=n(12908);Object.defineProperty(t,"NotificationOptions",{enumerable:!0,get:function(){return v.NotificationOptions}});const m=o(n(19659));t.actions=m,s(n(19659),t),s(n(490),t),s(n(55063),t),s(n(8910),t),s(n(87221),t),s(n(49757),t),s(n(7005),t),t.VERSION="1.23.0-alpha-2266";const y=(0,u.getEventRouter)();function h(e){const{notification:t}=e;return Object.assign(Object.assign({},e),{notification:Object.assign(Object.assign({},t),{date:new Date(t.date),expires:null!==t.expires?new Date(t.expires):null})})}y.registerDeserializer("notification-created",(e=>h(e))),y.registerDeserializer("notification-toast-dismissed",(e=>h(e))),y.registerDeserializer("notification-closed",(e=>h(e))),y.registerDeserializer("notification-action",(e=>{var t;const n=h(e),{controlSource:i,controlIndex:r}=n,o=a(n,["controlSource","controlIndex"]);return e.trigger===c.ActionTrigger.CONTROL?Object.assign(Object.assign({},o),{control:null===(t=e.notification[i])||void 0===t?void 0:t[r]}):o})),y.registerDeserializer("notifications-count-changed",(e=>e)),y.registerDeserializer("notification-reminder-created",(e=>{const t=h(e),{reminderDate:n}=t,i=a(t,["reminderDate"]);return Object.assign(Object.assign({},i),{reminderDate:new Date(n)})})),y.registerDeserializer("notification-reminder-removed",(e=>h(e))),t.addEventListener=function(e,t){(0,d.validateEnvironment)(),e=(0,d.sanitizeEventType)(e),t=(0,d.sanitizeFunction)(t);const n=u.eventEmitter.listenerCount(e);u.eventEmitter.addListener(e,t),0===n&&1===u.eventEmitter.listenerCount(e)&&(0,u.tryServiceDispatch)(l.APITopic.ADD_EVENT_LISTENER,e)},t.removeEventListener=function(e,t){(0,d.validateEnvironment)(),e=(0,d.sanitizeEventType)(e),t=(0,d.sanitizeFunction)(t);const n=u.eventEmitter.listenerCount(e);u.eventEmitter.removeListener(e,t),1===n&&0===u.eventEmitter.listenerCount(e)&&(0,u.tryServiceDispatch)(l.APITopic.REMOVE_EVENT_LISTENER,e)},t.create=async function(e,t){if("object"!=typeof e||null===e)throw new Error("Invalid argument passed to create: argument must be an object and must not be null");if(void 0!==e.date&&!(e.date instanceof Date))throw new Error('Invalid argument passed to create: "date" must be a valid Date object');if(void 0!==e.expires&&null!==e.expires&&!(e.expires instanceof Date))throw new Error('Invalid argument passed to create: "expires" must be null or a valid Date object');if(t&&t.reminderDate){if(!1===e.allowReminder)throw new Error('You must not specify a reminder date for a notification with "allowReminder" option set to false.');if(!(t.reminderDate instanceof Date))throw new Error('Invalid argument passed to reminder Options: "date" must a valid Date object');if(e.expires&&e.expires.getTime()<t.reminderDate.getTime())throw new Error("Expiration date must not be earlier than reminder date.")}void 0!==e.category&&null!==e.category||(e.category="default");const n=await(0,u.tryServiceDispatch)(l.APITopic.CREATE_NOTIFICATION,Object.assign(Object.assign({},e),{date:e.date&&e.date.valueOf(),expires:e.expires&&e.expires.valueOf(),reminder:(null==t?void 0:t.reminderDate)&&t.reminderDate.valueOf()}));return Object.assign(Object.assign({},n),{date:new Date(n.date),expires:null!==n.expires?new Date(n.expires):null})},t.update=async function(e){if("object"!=typeof e||null===e)throw new Error("Invalid argument passed to create: argument must be an object and must not be null");if(!e.id)throw new Error('Invalid argument passed to create: "id" must be Id of previously created Notification');const t=await(0,u.tryServiceDispatch)(l.APITopic.UPDATE_NOTIFICATION,Object.assign({},e));return Object.assign({},t)},t.clear=async function(e){return(0,u.tryServiceDispatch)(l.APITopic.CLEAR_NOTIFICATION,{id:e})},t.getAll=async function(){return(await(0,u.tryServiceDispatch)(l.APITopic.GET_APP_NOTIFICATIONS,void 0)).map((e=>Object.assign(Object.assign({},e),{indicator:e.indicator||null,date:new Date(e.date),expires:null!==e.expires?new Date(e.expires):null})))},t.clearAll=async function(){return(0,u.tryServiceDispatch)(l.APITopic.CLEAR_APP_NOTIFICATIONS,void 0)},t.toggleNotificationCenter=async function(){return(0,u.tryServiceDispatch)(l.APITopic.TOGGLE_NOTIFICATION_CENTER,void 0)},t.show=async function(e){return(0,u.tryServiceDispatch)(l.APITopic.SHOW_NOTIFICATION_CENTER,e)},t.hide=async function(){return(0,u.tryServiceDispatch)(l.APITopic.HIDE_NOTIFICATION_CENTER,void 0)},t.getNotificationsCount=async function(){return(0,u.tryServiceDispatch)(l.APITopic.GET_NOTIFICATIONS_COUNT,void 0)}},5221:(e,t)=>{"use strict";var n,i;Object.defineProperty(t,"__esModule",{value:!0}),t.IndicatorColor=t.IndicatorType=void 0,(i=t.IndicatorType||(t.IndicatorType={})).FAILURE="failure",i.WARNING="warning",i.SUCCESS="success",(n=t.IndicatorColor||(t.IndicatorColor={})).RED="red",n.GREEN="green",n.YELLOW="yellow",n.BLUE="blue",n.PURPLE="purple",n.GRAY="gray"},76598:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.APITopic=t.SERVICE_CHANNEL=t.SERVICE_IDENTITY=void 0,t.SERVICE_IDENTITY={uuid:"notifications-service",name:"notifications-service"},t.SERVICE_CHANNEL="of-notifications-service-v1",(n=t.APITopic||(t.APITopic={})).CREATE_NOTIFICATION="create-notification",n.UPDATE_NOTIFICATION="update-notification",n.CLEAR_NOTIFICATION="clear-notification",n.GET_APP_NOTIFICATIONS="fetch-app-notifications",n.CLEAR_APP_NOTIFICATIONS="clear-app-notifications",n.TOGGLE_NOTIFICATION_CENTER="toggle-notification-center",n.ADD_EVENT_LISTENER="add-event-listener",n.REMOVE_EVENT_LISTENER="remove-event-listener",n.GET_PROVIDER_STATUS="get-provider-status",n.GET_NOTIFICATIONS_COUNT="get-notifications-count",n.REGISTER_PLATFORM="register-notifications-platform",n.DEREGISTER_PLATFORM="deregister-notifications-platform",n.SHOW_NOTIFICATION_CENTER="show-notification-center",n.HIDE_NOTIFICATION_CENTER="hide-notification-center"},7005:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.deregisterPlatform=t.registerPlatform=void 0;const i=n(12052),r=n(76598);t.registerPlatform=async function(e){if("object"!=typeof e||null===e)throw new Error("Invalid argument passed to registerPlatform: argument must be an object and must not be null");if(!e.id)throw new Error('Invalid argument passed to registerPlatform: "id" must be a non-empty string in platform info.');const t=await(0,i.tryServiceDispatch)(r.APITopic.REGISTER_PLATFORM,Object.assign({},e));return{notificationsVersion:t?t.notificationsVersion:"unknown",clientAPIVersion:"1.23.0-alpha-2266"}},t.deregisterPlatform=async function(e){if(!e)throw new Error('Invalid argument passed to deregisterPlatform: "id" must be a non-empty string.');return(0,i.tryServiceDispatch)(r.APITopic.DEREGISTER_PLATFORM,{id:e})}},30207:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.isConnectedToAtLeast=t.getStatus=void 0;const r=i(n(29140)),o=n(95881),s=n(12052),a=n(76598);function c(){return(0,o.withStrictTimeout)(500,(0,s.tryServiceDispatch)(a.APITopic.GET_PROVIDER_STATUS,void 0),"").catch((()=>({connected:!1,version:null,templateAPIVersion:null})))}t.getStatus=c,t.isConnectedToAtLeast=async function(e){const t=await c();if(t.connected&&null!==t.version){const n=(0,r.default)(t.version,e);if(0===n||1===n)return!0}return!1}},55063:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},87221:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},30600:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},23371:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},49757:function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||i(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),r(n(30600),t),r(n(23371),t),r(n(12908),t),r(n(48877),t)},12908:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TemplateFragmentNames=t.PresentationTemplateFragmentNames=t.ContainerTemplateFragmentNames=t.TemplateNames=void 0,t.TemplateNames={markdown:"markdown",list:"list",custom:"custom"},t.ContainerTemplateFragmentNames={container:"container"},t.PresentationTemplateFragmentNames={text:"text",image:"image",list:"list",actionableText:"actionableText"},t.TemplateFragmentNames=Object.assign(Object.assign({},t.ContainerTemplateFragmentNames),t.PresentationTemplateFragmentNames)},48877:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},72475:(e,t)=>{"use strict";function n(e,t){let n;try{n=JSON.stringify(e)}catch(e){n=t}return n}Object.defineProperty(t,"__esModule",{value:!0}),t.safeStringify=t.validateEnvironment=t.sanitizeEventType=t.sanitizeFunction=void 0,t.sanitizeFunction=function(e){if("function"!=typeof e)throw new Error(`Invalid argument passed: ${n(e,"The provided value")} is not a valid function`);return e},t.sanitizeEventType=function(e){if("notification-action"===e||"notification-created"===e||"notification-toast-dismissed"===e||"notification-closed"===e||"notifications-count-changed"===e||"notification-form-submitted"===e||"notification-reminder-created"===e||"notification-reminder-removed"===e)return e;throw new Error(`Invalid argument passed: ${n(e,"The provided event type")} is not a valid Notifications event type`)},t.validateEnvironment=function(){if("undefined"==typeof fin)throw new Error("fin is not defined. The openfin-notifications module is only intended for use in an OpenFin application.")},t.safeStringify=n}},t={},function n(i){var r=t[i];if(void 0!==r)return r.exports;var o=t[i]={exports:{}};return e[i].call(o.exports,o,o.exports,n),o.exports}(61995);var e,t}));
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
import { IndicatorColor } from '@client/indicator';
|
|
10
10
|
import { NotificationFormData } from '@client/forms/fields';
|
|
11
11
|
import { BaseNotificationOptions } from './BaseNotificationOptions';
|
|
12
|
+
import { ActionDeclaration } from '..';
|
|
12
13
|
export declare type SectionAlignment = 'left' | 'center' | 'right';
|
|
13
14
|
export declare type ListPairs = [string, string][];
|
|
14
15
|
export declare type CustomTemplateData = Record<string, string | ListPairs>;
|
|
@@ -19,7 +20,7 @@ export declare type NotificationOptions = TemplateMarkdown | TemplateList | Temp
|
|
|
19
20
|
/**
|
|
20
21
|
* The options to build your custom template composition layout.
|
|
21
22
|
*/
|
|
22
|
-
export declare type TemplateFragment = ContainerTemplateFragment | TextTemplateFragment | ListTemplateFragment | ImageTemplateFragment;
|
|
23
|
+
export declare type TemplateFragment = ContainerTemplateFragment | TextTemplateFragment | ListTemplateFragment | ImageTemplateFragment | ActionableTextTemplateFragment;
|
|
23
24
|
export declare const TemplateNames: {
|
|
24
25
|
readonly markdown: "markdown";
|
|
25
26
|
readonly list: "list";
|
|
@@ -32,11 +33,13 @@ export declare const PresentationTemplateFragmentNames: {
|
|
|
32
33
|
readonly text: "text";
|
|
33
34
|
readonly image: "image";
|
|
34
35
|
readonly list: "list";
|
|
36
|
+
readonly actionableText: "actionableText";
|
|
35
37
|
};
|
|
36
38
|
export declare const TemplateFragmentNames: {
|
|
37
39
|
readonly text: "text";
|
|
38
40
|
readonly image: "image";
|
|
39
41
|
readonly list: "list";
|
|
42
|
+
readonly actionableText: "actionableText";
|
|
40
43
|
readonly container: "container";
|
|
41
44
|
};
|
|
42
45
|
export interface TemplateComposition {
|
|
@@ -123,7 +126,7 @@ export interface BaseTemplateFragment<T extends keyof typeof TemplateFragmentNam
|
|
|
123
126
|
*/
|
|
124
127
|
style?: Record<string, string | number>;
|
|
125
128
|
}
|
|
126
|
-
export interface ContainerTemplateFragment extends BaseTemplateFragment<'container'
|
|
129
|
+
export interface ContainerTemplateFragment extends BaseTemplateFragment<'container'>, ActionableFragment {
|
|
127
130
|
/**
|
|
128
131
|
* Sub-fragments of the container.
|
|
129
132
|
*
|
|
@@ -162,7 +165,7 @@ export interface PresentationTemplateFragment<T extends keyof typeof Presentatio
|
|
|
162
165
|
* const notificationOption: TemplateCustom = {
|
|
163
166
|
* //...
|
|
164
167
|
* templateOptions: myTemplate,
|
|
165
|
-
*
|
|
168
|
+
* templateData: {
|
|
166
169
|
* message: 'My Custom Notification Message',
|
|
167
170
|
* }
|
|
168
171
|
* };
|
|
@@ -171,9 +174,76 @@ export interface PresentationTemplateFragment<T extends keyof typeof Presentatio
|
|
|
171
174
|
*/
|
|
172
175
|
dataKey: string;
|
|
173
176
|
}
|
|
177
|
+
export interface ActionableFragment {
|
|
178
|
+
/**
|
|
179
|
+
* onClick object that is user defined.
|
|
180
|
+
*
|
|
181
|
+
* If provided, notification-action event will be raised when clicking on the fragment.
|
|
182
|
+
*
|
|
183
|
+
*
|
|
184
|
+
* Example:
|
|
185
|
+
* ```ts
|
|
186
|
+
* {
|
|
187
|
+
* "type": "actionableText",
|
|
188
|
+
* "dataKey": "titlexyz",
|
|
189
|
+
* "tooltipKey": "some_key",
|
|
190
|
+
* "onClick": { // contents are user-defined
|
|
191
|
+
* "task": "schedule-reminder",
|
|
192
|
+
* "eventId": 142341,
|
|
193
|
+
* "intervalMs": 5000
|
|
194
|
+
* }
|
|
195
|
+
* }
|
|
196
|
+
*
|
|
197
|
+
* import { addEventListener, clear } from 'openfin-notifications';
|
|
198
|
+
*
|
|
199
|
+
* addEventListener('notification-action', (event: NotificationActionEvent<MyAction>)) => {
|
|
200
|
+
* if (event.result.task === 'schedule-reminder') {
|
|
201
|
+
* scheduleReminder(event.result.eventId, Date.now() + event.result.intervalMs);
|
|
202
|
+
* }
|
|
203
|
+
* clear(event.notification.id);
|
|
204
|
+
* });
|
|
205
|
+
* ```
|
|
206
|
+
*
|
|
207
|
+
*/
|
|
208
|
+
onClick?: ActionDeclaration<never, never> | null;
|
|
209
|
+
/**
|
|
210
|
+
* Tooltip key of the template fragment.
|
|
211
|
+
*
|
|
212
|
+
* The string tooltip associated with this fragment will be looked up in templateData map with this key.
|
|
213
|
+
*
|
|
214
|
+
*
|
|
215
|
+
* Example:
|
|
216
|
+
* ```ts
|
|
217
|
+
* const myTemplate = {
|
|
218
|
+
* body: {
|
|
219
|
+
* compositions: [{
|
|
220
|
+
* minTemplateAPIVersion: '1',
|
|
221
|
+
* layout: {
|
|
222
|
+
* type: "actionableText",
|
|
223
|
+
* dataKey: 'message',
|
|
224
|
+
* tooltipKey: 'tooltipxyz',
|
|
225
|
+
* },
|
|
226
|
+
* }],
|
|
227
|
+
* },
|
|
228
|
+
* }
|
|
229
|
+
*
|
|
230
|
+
* const notificationOption: TemplateCustom = {
|
|
231
|
+
* //...
|
|
232
|
+
* templateOptions: myTemplate,
|
|
233
|
+
* templateData: {
|
|
234
|
+
* message: 'view stock tracker',
|
|
235
|
+
* tooltipxyz: 'My Custom Tooltip',
|
|
236
|
+
* }
|
|
237
|
+
* };
|
|
238
|
+
* ```
|
|
239
|
+
*
|
|
240
|
+
*/
|
|
241
|
+
tooltipKey?: string;
|
|
242
|
+
}
|
|
174
243
|
export declare type TextTemplateFragment = PresentationTemplateFragment<'text'>;
|
|
175
|
-
export declare type ImageTemplateFragment = PresentationTemplateFragment<'image'
|
|
244
|
+
export declare type ImageTemplateFragment = PresentationTemplateFragment<'image'> & ActionableFragment;
|
|
176
245
|
export declare type ListTemplateFragment = PresentationTemplateFragment<'list'>;
|
|
246
|
+
export declare type ActionableTextTemplateFragment = PresentationTemplateFragment<'actionableText'> & ActionableFragment;
|
|
177
247
|
/**
|
|
178
248
|
* Configuration options for the custom notification template.
|
|
179
249
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "openfin-notifications",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.23.0-alpha-2266",
|
|
4
4
|
"description": "Client library for the Openfin Notifications Center",
|
|
5
5
|
"main": "dist/client/openfin-notifications.js",
|
|
6
6
|
"types": "dist/client/index.d.ts",
|
|
@@ -29,8 +29,10 @@
|
|
|
29
29
|
"author": "Openfin",
|
|
30
30
|
"license": "SEE LICENSE IN LICENSE.MD",
|
|
31
31
|
"homepage": "https://developers.openfin.co/docs/notifications-api",
|
|
32
|
+
"peerDependencies": {
|
|
33
|
+
"@openfin/core": "31.75.4"
|
|
34
|
+
},
|
|
32
35
|
"dependencies": {
|
|
33
|
-
"@openfin/core": "^30.74.13",
|
|
34
36
|
"@openfin/predux": "^1.0.0-alpha.1",
|
|
35
37
|
"acorn": "^8.8.1",
|
|
36
38
|
"ajv": "^8.11.0",
|
|
@@ -61,7 +63,7 @@
|
|
|
61
63
|
},
|
|
62
64
|
"devDependencies": {
|
|
63
65
|
"@actions/core": "^1.10.0",
|
|
64
|
-
"@openfin/ui-library": "^0.
|
|
66
|
+
"@openfin/ui-library": "^0.15.3",
|
|
65
67
|
"@testing-library/jest-dom": "^5.11.5",
|
|
66
68
|
"@testing-library/react": "^11.1.0",
|
|
67
69
|
"@types/jest": "^27.4.1",
|