@openfin/web-notifications 2.11.1 → 2.12.0-alpha-4014

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.
package/dist/web/index.js CHANGED
@@ -9,7 +9,7 @@
9
9
  display: flex;
10
10
  flex-direction: column;
11
11
  gap: ${({theme:e})=>e.px.base};
12
- `,t.Section=(0,r.connect)(void 0,(e=>({remove:t=>e(new a.RemoveNotifications(t,"Clear")),raiseAnalyticsEvent:async(t,n)=>e(new a.RaiseAnalyticsEvent(t,n))})))((({hasControls:e,section:n,remove:i,raiseAnalyticsEvent:r,onKeyDown:a})=>{const{notifications:c,title:u}=n,[p,h]=o.default.useState(!1),m=c.slice(0,Math.min(s.groupMinimizedStackSize,c.length));return o.default.createElement(o.default.Fragment,null,o.default.createElement(l.Header,{hasControls:e,title:u,itemCount:c.length,onClearAll:()=>{i(c),r({type:"Center",action:"Clear",value:`${u}`,skipValueHashing:!0})},isExpandable:c.length>s.groupMinimizedStackSize,isExpanded:p,onToggleExpanded:()=>{h(!p),r({type:"Center",action:p?"Select Show Fewer":"Select Show All",value:`${u}`})},onKeyDown:null==a?void 0:a(null)}),o.default.createElement(t.Transitions,{"data-testid":"group-section",role:e?"list":void 0},(e&&!p?m:c).map((e=>o.default.createElement(d.FadeTransition,{key:`${e.id}${e.notification.date}`,timeout:200},o.default.createElement(f.NotificationCard,{notification:e,onKeyDown:null==a?void 0:a(e.id)}))))))}))},258:e=>{"use strict";e.exports=i},260:e=>{"use strict";e.exports=o},295:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},343:function(e,t,n){"use strict";var i,o,r,a,l,s=this&&this.__decorate||function(e,t,n,i){var o,r=arguments.length,a=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var l=e.length-1;l>=0;l--)(o=e[l])&&(a=(r<3?o(a):r>3?o(t,n,a):o(t,n))||a);return r>3&&a&&Object.defineProperty(t,n,a),a},c=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},u=this&&this.__param||function(e,t){return function(n,i){t(n,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.Main=void 0;const d=n(4352),f=n(9603),p=n(7010),h=n(4854),m=n(6858),b=n(7202),g=n(2882),v=n(2716),y=n(9897),_=n(7451),x=n(2750),O=n(7250),w=n(8883),C=n(2984);let j=i=class extends v.APIExecutionDeferrer{constructor(e,t,n,i){super(e,t),this._apiHandler=n,this._clientController=i,this._webStore=e}async register(e){var t,n;await g.Injector.init();const i=null!==(t=e.customSoundUrl)&&void 0!==t?t:`https://cdn.openfin.co/release/system-apps/notification-center/${(0,C.getVersion)()}/ui/notification.wav`;try{this._notificationSound=new Audio(i),this._notificationSound.volume=.3}catch(e){console.error(`Unable to load notification sound from the url ${i}: ${e}`)}this._apiHandler.registerListeners({[f.APITopic.CREATE_NOTIFICATION]:this.defer(this.createNotification.bind(this),!0),[f.APITopic.UPDATE_NOTIFICATION]:this.defer(this.updateNotification.bind(this)),[f.APITopic.CLEAR_NOTIFICATION]:this.defer(this.clearNotification.bind(this)),[f.APITopic.CLEAR_APP_NOTIFICATIONS]:this.defer(this.clearAppNotifications.bind(this)),[f.APITopic.TOGGLE_NOTIFICATION_CENTER]:this.defer(this.toggleNotificationCenter.bind(this)),[f.APITopic.SHOW_NOTIFICATION_CENTER]:this.defer(this.showNotificationCenter.bind(this)),[f.APITopic.HIDE_NOTIFICATION_CENTER]:this.defer(this.hideNotificationCenter.bind(this)),[f.APITopic.GET_NOTIFICATIONS_COUNT]:this.getNotificationsCount.bind(this),[f.APITopic.GET_APP_NOTIFICATIONS]:this.fetchAppNotifications.bind(this),[f.APITopic.GET_PROVIDER_STATUS]:this.getStatus.bind(this),[f.APITopic.SET_FORM_STATUS_OPTIONS]:this.setFormStatus.bind(this),[f.APITopic.SET_FORM_VALIDATION_ERRORS]:this.setFormValidationErrors.bind(this),[f.APITopic.GET_USER_SETTINGS_STATUS]:this.getNotificationCenterSettings.bind(this),[f.APITopic.SET_DEFAULT_PLATFORM_SHORTCUT]:this.setDefaultPlatformShortcut.bind(this),[f.APITopic.ADD_EVENT_LISTENER]:this._clientController.onAddEventListener.bind(this._clientController),[f.APITopic.REMOVE_EVENT_LISTENER]:this._clientController.onRemoveEventListener.bind(this._clientController),[f.APITopic.REGISTER_PLATFORM]:()=>{this.notImplemented(f.APITopic.REGISTER_PLATFORM)},[f.APITopic.DEREGISTER_PLATFORM]:()=>{this.notImplemented(f.APITopic.DEREGISTER_PLATFORM)},[f.APITopic.SET_NOTIFICATION_SECURITY_RULE]:()=>{this.notImplemented(f.APITopic.SET_NOTIFICATION_SECURITY_RULE)}},e.finContext,e.serviceId),e.snapshot&&this._webStore.dispatch(new _.ApplySnapshot(e.snapshot));const o=document.createElement("notification-center");o.setProps({store:this._store}),e.container.appendChild(o),this._store.onAction.add(this.onStoreAction.bind(this)),(null===(n=e.theme)||void 0===n?void 0:n.palette)&&this.setTheme(e.theme),console.log("Notification Center Initialized.")}async onStoreAction(e){var t;e instanceof _.InitiateRemoveAllNotifications?await this._store.dispatch(new _.RemoveNotifications(e.notifications)):e instanceof _.CreateNotification?(i._countChangeSignal.emit(this._webStore.state.notifications.length),!this._store.state.centerMuted&&this._store.state.settings.notificationSoundEnabled&&"silent"!==(null===(t=e.notification.notification.soundOptions)||void 0===t?void 0:t.mode)&&this._notificationSound.play()):e instanceof _.RemoveNotifications?i._countChangeSignal.emit(this._webStore.state.notifications.length):(e instanceof _.ShowCenter||e instanceof _.HideCenter||e instanceof _.ToggleCenterVisibility)&&i._visibilityChangeSignal.emit(this._webStore.state.centerVisible)}async getOrigin(){return"web"}isAllowed(){return!0}translateIdentity(e){return this._clientController.translateClientIdentityToProviderIdentity(e)}notImplemented(e){throw new Error(`${e} API is not supported by this version of the OpenFin Web Notification Center.`)}async setTheme(e){const t=(0,O.createTheme)(e.palette);await this._webStore.dispatch(new x.SetTheme({themes:{light:t,dark:t}}))}getSnapshot(){const e=this._webStore.getState();return{applications:Array.from(e.applications.values()),streams:Array.from(e.streams.values()),notifications:e.notifications,reminders:e.reminders}}async applySnapshot(e){await this._webStore.dispatch(new _.ApplySnapshot(e)),i._countChangeSignal.emit(this._webStore.state.notifications.length)}async show(){await this._webStore.dispatch(new _.ShowCenter)}async hide(){await this._webStore.dispatch(new _.HideCenter)}};j._countChangeSignal=new w.Signal,j._visibilityChangeSignal=new w.Signal,j=i=s([(0,d.injectable)(),u(0,(0,d.inject)(b.Inject.STORE)),u(1,(0,d.inject)(b.Inject.SCHEDULER)),u(2,(0,d.inject)(b.Inject.API_HANDLER)),u(3,(0,d.inject)(b.Inject.CLIENT_CONTOLLER)),c("design:paramtypes",["function"==typeof(o=void 0!==m.WebStore&&m.WebStore)?o:Object,"function"==typeof(r=void 0!==p.Scheduler&&p.Scheduler)?r:Object,"function"==typeof(a=void 0!==h.APIHandler&&h.APIHandler)?a:Object,"function"==typeof(l=void 0!==y.ClientController&&y.ClientController)?l:Object])],j),t.Main=j},388:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useCollapsibleCardHeaderEdgeCaseBehavior=void 0;const i=n(5932),o=n(1230);t.useCollapsibleCardHeaderEdgeCaseBehavior=(e,t,n,r)=>{const a=(0,o.useCollapsibleCardHeaderOffScreen)(e,t);(0,i.useEffect)((()=>{var n,i,o,l,s;let c;if(null===(o=null===(i=null===(n=null==t?void 0:t.current)||void 0===n?void 0:n.parentElement)||void 0===i?void 0:i.querySelector("[data-cloned-header]"))||void 0===o||o.remove(),(null==t?void 0:t.current)&&(t.current.style.maxHeight="400px"),a&&(null==e?void 0:e.current)&&(null==t?void 0:t.current)){c=e.current.cloneNode(!0),c.setAttribute("data-cloned-header","true");const n=null===(l=t.current.parentElement)||void 0===l?void 0:l.querySelector('[data-role="buttons-container"]');null===(s=t.current.parentElement)||void 0===s||s.insertBefore(c,n),t.current.style.maxHeight="360px",c.style.marginTop="-4px",c.style.marginBottom="-4px",c.style.cursor="pointer";const i=c.querySelector("#icon-container");i&&(i.style.marginRight="4px"),r&&c.addEventListener("click",r)}return()=>{var e,n,i;r&&c&&(c.removeEventListener("click",r),null===(i=null===(n=null===(e=null==t?void 0:t.current)||void 0===e?void 0:e.parentElement)||void 0===n?void 0:n.querySelector("[data-cloned-header]"))||void 0===i||i.remove())}}),[a,e,t,n])}},392:e=>{"use strict";e.exports=r},394:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},428:function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,o)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=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 o(t,e),t},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.NumberSpinner=void 0;const l=r(n(5932)),s=n(7250),c=a(n(2230)),u=a(n(7446));t.NumberSpinner=({onChange:e,value:t=0,min:n=Number.MIN_SAFE_INTEGER,max:i=Number.MAX_SAFE_INTEGER,suffix:o="",className:r=""})=>{const a={inputValue:t,displayValue:t.toString(),showSuffix:!0},[s,c]=(0,l.useState)(a),b=(0,l.useRef)(null),g=t=>{c((e=>({inputValue:t,displayValue:t.toString(),showSuffix:e.showSuffix}))),e&&e(t)};(0,l.useEffect)((()=>{const e=(0,u.default)(t,n,i);g(e)}),[t]);const v=e=>{const t=(0,u.default)(s.inputValue+(e?1:-1),n,i);t!==s.inputValue&&g(t)},y=()=>{const e=Number(s.displayValue);if(isNaN(e))c((e=>Object.assign(Object.assign({},e),{displayValue:""})));else{const t=(0,u.default)(e,n,i);g(t)}},_=(e,t)=>{" "!==e.key&&"Enter"!==e.key||(e.preventDefault(),v(t))};return l.default.createElement(d,{ref:b,role:"group","aria-labelledby":"spinner-label spinner-hidden",alignItems:"center",justifyContent:"space-between",className:r,tabIndex:0,onKeyUp:e=>{const{inputValue:t}=s;let o;switch(e.key){case"PageUp":e.preventDefault(),e.stopPropagation(),o=t+5>i?i:t+5;break;case"PageDown":e.preventDefault(),e.stopPropagation(),o=t-5<n?n:t-5;break;case"Home":e.preventDefault(),e.stopPropagation(),o=n;break;case"End":e.preventDefault(),e.stopPropagation(),o=i;break;case"ArrowDown":case"ArrowLeft":e.preventDefault(),e.stopPropagation(),o=t-1<n?n:t-1;break;case"ArrowUp":case"ArrowRight":e.preventDefault(),e.stopPropagation(),o=t+1>i?i:t+1;break;default:return}o!==t&&g(o)},"aria-live":"assertive"},l.default.createElement(f,{id:"spinner-hidden"},"How long a notification will display before disappearing, Duration Time in seconds."),l.default.createElement(p,{role:"button",icon:"MinusIcon","aria-label":"decrement",onClick:()=>v(!1),onKeyDown:e=>_(e,!1),title:"Decrease Duration Time",tabIndex:0}),l.default.createElement(m,{onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),e.stopPropagation(),y(),b.current&&b.current.focus())},"aria-label":`Duration Time: ${s.inputValue} ${o}`,role:"spinbutton","aria-valuemin":n,"aria-valuemax":i,"aria-valuenow":t,"aria-valuetext":s.displayValue,value:`${s.displayValue}${s.showSuffix?" "+o:""}`,onChange:e=>{const t=e.target.value.trim();""===t?c((e=>Object.assign(Object.assign({},e),{displayValue:""}))):/^\d+$/.test(t)&&c((e=>Object.assign(Object.assign({},e),{displayValue:t})))},onFocus:()=>{c((e=>Object.assign(Object.assign({},e),{showSuffix:!1})))},onBlur:()=>{c((e=>Object.assign(Object.assign({},e),{showSuffix:!0}))),y()},title:"Duration Time"}),l.default.createElement(h,{onKeyDown:e=>_(e,!0),role:"button",icon:"PlusIcon","aria-label":"increment",onClick:()=>v(!0),title:"Increase Duration Time",tabIndex:0}))};const d=(0,c.default)(s.Box)`
12
+ `,t.Section=(0,r.connect)(void 0,(e=>({remove:t=>e(new a.RemoveNotifications(t,"Clear")),raiseAnalyticsEvent:async(t,n)=>e(new a.RaiseAnalyticsEvent(t,n))})))((({hasControls:e,section:n,remove:i,raiseAnalyticsEvent:r,onKeyDown:a})=>{const{notifications:c,title:u}=n,[p,h]=o.default.useState(!1),m=c.slice(0,Math.min(s.groupMinimizedStackSize,c.length));return o.default.createElement(o.default.Fragment,null,o.default.createElement(l.Header,{hasControls:e,title:u,itemCount:c.length,onClearAll:()=>{i(c),r({type:"Center",action:"Clear",value:`${u}`,skipValueHashing:!0})},isExpandable:c.length>s.groupMinimizedStackSize,isExpanded:p,onToggleExpanded:()=>{h(!p),r({type:"Center",action:p?"Select Show Fewer":"Select Show All",value:`${u}`})},onKeyDown:null==a?void 0:a(null)}),o.default.createElement(t.Transitions,{"data-testid":"group-section",role:e?"list":void 0},(e&&!p?m:c).map((e=>o.default.createElement(d.FadeTransition,{key:`${e.id}${e.notification.date}`,timeout:200},o.default.createElement(f.NotificationCard,{notification:e,onKeyDown:null==a?void 0:a(e.id)}))))))}))},258:e=>{"use strict";e.exports=i},260:e=>{"use strict";e.exports=o},295:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},343:function(e,t,n){"use strict";var i,o,r,a,l,s=this&&this.__decorate||function(e,t,n,i){var o,r=arguments.length,a=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var l=e.length-1;l>=0;l--)(o=e[l])&&(a=(r<3?o(a):r>3?o(t,n,a):o(t,n))||a);return r>3&&a&&Object.defineProperty(t,n,a),a},c=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},u=this&&this.__param||function(e,t){return function(n,i){t(n,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.Main=void 0;const d=n(4352),f=n(9603),p=n(7010),h=n(4854),m=n(6858),b=n(7202),g=n(2882),v=n(2716),y=n(9897),_=n(7451),x=n(2750),O=n(7250),w=n(8883),C=n(2984);let j=i=class extends v.APIExecutionDeferrer{constructor(e,t,n,i){super(e,t),this._apiHandler=n,this._clientController=i,this._webStore=e}async register(e){var t,n;await g.Injector.init();const i=null!==(t=e.customSoundUrl)&&void 0!==t?t:`https://cdn.openfin.co/release/system-apps/notification-center/${(0,C.getVersion)()}/ui/notification.wav`;try{this._notificationSound=new Audio(i),this._notificationSound.volume=.3}catch(e){console.error(`Unable to load notification sound from the url ${i}: ${e}`)}this._apiHandler.registerListeners({[f.APITopic.CREATE_NOTIFICATION]:this.defer(this.createNotification.bind(this),!0),[f.APITopic.UPDATE_NOTIFICATION]:this.defer(this.updateNotification.bind(this)),[f.APITopic.CLEAR_NOTIFICATION]:this.defer(this.clearNotification.bind(this)),[f.APITopic.CLEAR_APP_NOTIFICATIONS]:this.defer(this.clearAppNotifications.bind(this)),[f.APITopic.TOGGLE_NOTIFICATION_CENTER]:this.defer(this.toggleNotificationCenter.bind(this)),[f.APITopic.SHOW_NOTIFICATION_CENTER]:this.defer(this.showNotificationCenter.bind(this)),[f.APITopic.HIDE_NOTIFICATION_CENTER]:this.defer(this.hideNotificationCenter.bind(this)),[f.APITopic.GET_NOTIFICATIONS_COUNT]:this.getNotificationsCount.bind(this),[f.APITopic.GET_APP_NOTIFICATIONS]:this.fetchAppNotifications.bind(this),[f.APITopic.GET_PROVIDER_STATUS]:this.getStatus.bind(this),[f.APITopic.SET_FORM_STATUS_OPTIONS]:this.setFormStatus.bind(this),[f.APITopic.SET_FORM_VALIDATION_ERRORS]:this.setFormValidationErrors.bind(this),[f.APITopic.GET_USER_SETTINGS_STATUS]:this.getNotificationCenterSettings.bind(this),[f.APITopic.SET_DEFAULT_PLATFORM_SHORTCUT]:this.setDefaultPlatformShortcut.bind(this),[f.APITopic.ADD_EVENT_LISTENER]:this._clientController.onAddEventListener.bind(this._clientController),[f.APITopic.REMOVE_EVENT_LISTENER]:this._clientController.onRemoveEventListener.bind(this._clientController),[f.APITopic.REGISTER_PLATFORM]:()=>{this.notImplemented(f.APITopic.REGISTER_PLATFORM)},[f.APITopic.DEREGISTER_PLATFORM]:()=>{this.notImplemented(f.APITopic.DEREGISTER_PLATFORM)},[f.APITopic.SET_NOTIFICATION_SECURITY_RULE]:()=>{this.notImplemented(f.APITopic.SET_NOTIFICATION_SECURITY_RULE)}},e.finContext,e.serviceId),e.snapshot&&this._webStore.dispatch(new _.ApplySnapshot(e.snapshot));const o=document.createElement("notification-center");o.setProps({store:this._store}),e.container.appendChild(o),this._store.onAction.add(this.onStoreAction.bind(this)),(null===(n=e.theme)||void 0===n?void 0:n.palette)&&this.setTheme(e.theme),console.log("Notification Center Initialized.")}async onStoreAction(e){var t;e instanceof _.InitiateRemoveAllNotifications?await this._store.dispatch(new _.RemoveNotifications(e.notifications)):e instanceof _.CreateNotification?(i._countChangeSignal.emit(this._webStore.state.notifications.length),!this._store.state.centerMuted&&this._store.state.settings.notificationSoundEnabled&&"silent"!==(null===(t=e.notification.notification.soundOptions)||void 0===t?void 0:t.mode)&&this._notificationSound.play()):e instanceof _.RemoveNotifications?i._countChangeSignal.emit(this._webStore.state.notifications.length):(e instanceof _.ShowCenter||e instanceof _.HideCenter||e instanceof _.ToggleCenterVisibility)&&i._visibilityChangeSignal.emit(this._webStore.state.centerVisible)}async getOrigin(){return"web"}isAllowed(){return!0}translateIdentity(e){return this._clientController.translateClientIdentityToProviderIdentity(e)}notImplemented(e){throw new Error(`${e} API is not supported by this version of the OpenFin Web Notification Center.`)}async setTheme(e){const t=(0,O.createTheme)(e.palette);await this._webStore.dispatch(new x.SetTheme({themes:{light:t,dark:t}}))}getSnapshot(){const e=this._webStore.getState();return{applications:Array.from(e.applications.values()),streams:Array.from(e.streams.values()),notifications:e.notifications,reminders:e.reminders}}async applySnapshot(e){await this._webStore.dispatch(new _.ApplySnapshot(e)),i._countChangeSignal.emit(this._webStore.state.notifications.length)}async show(){await this._webStore.dispatch(new _.ShowCenter)}async hide(){await this._webStore.dispatch(new _.HideCenter)}};j._countChangeSignal=new w.Signal,j._visibilityChangeSignal=new w.Signal,j=i=s([(0,d.injectable)(),u(0,(0,d.inject)(b.Inject.STORE)),u(1,(0,d.inject)(b.Inject.SCHEDULER)),u(2,(0,d.inject)(b.Inject.API_HANDLER)),u(3,(0,d.inject)(b.Inject.CLIENT_CONTOLLER)),c("design:paramtypes",["function"==typeof(o=void 0!==m.WebStore&&m.WebStore)?o:Object,"function"==typeof(r=void 0!==p.Scheduler&&p.Scheduler)?r:Object,"function"==typeof(a=void 0!==h.APIHandler&&h.APIHandler)?a:Object,"function"==typeof(l=void 0!==y.ClientController&&y.ClientController)?l:Object])],j),t.Main=j},388:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useCollapsibleCardHeaderEdgeCaseBehavior=void 0;const i=n(5932),o=n(1230);t.useCollapsibleCardHeaderEdgeCaseBehavior=(e,t,n,r)=>{const a=(0,o.useCollapsibleCardHeaderOffScreen)(e,t);(0,i.useEffect)((()=>{var n,i,o,l,s;let c;if(null===(o=null===(i=null===(n=null==t?void 0:t.current)||void 0===n?void 0:n.parentElement)||void 0===i?void 0:i.querySelector("[data-cloned-header]"))||void 0===o||o.remove(),(null==t?void 0:t.current)&&(t.current.style.maxHeight="400px"),a&&(null==e?void 0:e.current)&&(null==t?void 0:t.current)){c=e.current.cloneNode(!0),c.setAttribute("data-cloned-header","true");const n=null===(l=t.current.parentElement)||void 0===l?void 0:l.querySelector('[data-role="buttons-container"]');null===(s=t.current.parentElement)||void 0===s||s.insertBefore(c,n),t.current.style.maxHeight="360px",c.style.marginTop="-4px",c.style.marginBottom="-4px",c.style.cursor="pointer";const i=c.querySelector("#icon-container");i&&(i.style.marginRight="4px"),r&&c.addEventListener("click",r)}return()=>{var e,n,i;r&&c&&(c.removeEventListener("click",r),null===(i=null===(n=null===(e=null==t?void 0:t.current)||void 0===e?void 0:e.parentElement)||void 0===n?void 0:n.querySelector("[data-cloned-header]"))||void 0===i||i.remove())}}),[a,e,t,n])}},392:e=>{"use strict";e.exports=r},394:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},428:function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,o)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=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 o(t,e),t},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.NumberSpinner=void 0;const l=r(n(5932)),s=n(7250),c=a(n(2230)),u=a(n(7446));t.NumberSpinner=({onChange:e,value:t=0,min:n=Number.MIN_SAFE_INTEGER,max:i=Number.MAX_SAFE_INTEGER,suffix:o="",className:r=""})=>{const a={inputValue:t,displayValue:t.toString(),showSuffix:!0},[s,c]=(0,l.useState)(a),b=(0,l.useRef)(null),g=t=>{c((e=>({inputValue:t,displayValue:t.toString(),showSuffix:e.showSuffix}))),e&&e(t)};(0,l.useEffect)((()=>{const e=(0,u.default)(t,n,i);g(e)}),[t]);const v=e=>{const t=(0,u.default)(s.inputValue+(e?1:-1),n,i);t!==s.inputValue&&g(t)},y=()=>{const e=Number(s.displayValue);if(isNaN(e))c((e=>Object.assign(Object.assign({},e),{displayValue:""})));else{const t=(0,u.default)(e,n,i);g(t)}},_=(e,t)=>{" "!==e.key&&"Enter"!==e.key||(e.preventDefault(),v(t))};return l.default.createElement(d,{ref:b,role:"group","aria-labelledby":"spinner-label spinner-hidden",alignItems:"center",justifyContent:"space-between",className:r,tabIndex:0,onKeyUp:e=>{const{inputValue:t}=s;let o;switch(e.key){case"PageUp":e.preventDefault(),e.stopPropagation(),o=t+5>i?i:t+5;break;case"PageDown":e.preventDefault(),e.stopPropagation(),o=t-5<n?n:t-5;break;case"Home":e.preventDefault(),e.stopPropagation(),o=n;break;case"End":e.preventDefault(),e.stopPropagation(),o=i;break;case"ArrowDown":case"ArrowLeft":e.preventDefault(),e.stopPropagation(),o=t-1<n?n:t-1;break;case"ArrowUp":case"ArrowRight":e.preventDefault(),e.stopPropagation(),o=t+1>i?i:t+1;break;default:return}o!==t&&g(o)},"aria-live":"assertive"},l.default.createElement(f,{id:"spinner-hidden"},"How long a notification will display before disappearing, Duration Time in seconds."),l.default.createElement(p,{role:"button",icon:"MinusIcon","aria-label":"decrement",onClick:()=>v(!1),onKeyDown:e=>_(e,!1),title:"Decrease Duration Time",tabIndex:0}),l.default.createElement(m,{onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),e.stopPropagation(),y(),b.current&&b.current.focus())},"aria-label":`Duration Time: ${s.inputValue} ${o}`,role:"spinbutton","aria-live":"polite","aria-valuemin":n,"aria-valuemax":i,"aria-valuenow":t,"aria-valuetext":s.displayValue,value:`${s.displayValue}${s.showSuffix?" "+o:""}`,onChange:e=>{const t=e.target.value.trim();""===t?c((e=>Object.assign(Object.assign({},e),{displayValue:""}))):/^\d+$/.test(t)&&c((e=>Object.assign(Object.assign({},e),{displayValue:t})))},onFocus:()=>{c((e=>Object.assign(Object.assign({},e),{showSuffix:!1})))},onBlur:()=>{c((e=>Object.assign(Object.assign({},e),{showSuffix:!0}))),y()},title:"Duration Time"}),l.default.createElement(h,{onKeyDown:e=>_(e,!0),role:"button",icon:"PlusIcon","aria-label":"increment",onClick:()=>v(!0),title:"Increase Duration Time",tabIndex:0}))};const d=(0,c.default)(s.Box)`
13
13
  position: relative;
14
14
  background-color: ${({theme:e})=>e.palette.background6};
15
15
  box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);
@@ -91,7 +91,7 @@
91
91
  user-select: none;
92
92
  `,p=(0,s.default)(c.Icon)`
93
93
  cursor: pointer;
94
- `},597:function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,o)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=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 o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.parseFormData=t.buildFormSchema=t.buildFieldSchema=t.FieldValidationFunctions=void 0;const a=r(n(4298)),l=n(3955),s=e=>null==e;t.FieldValidationFunctions={[l.FieldType.radioGroup]:Object.assign({},{required:(e,t)=>t.arg?e.required(t.invalidMessage):e}),[l.FieldType.checkboxGroup]:Object.assign({},{required:(e,t)=>t.arg?e.required(t.invalidMessage):e}),[l.FieldType.date]:Object.assign({},{required:(e,t)=>t.arg?e.required(t.invalidMessage):e}),[l.FieldType.time]:Object.assign({},{required:(e,t)=>t.arg?e.required(t.invalidMessage):e}),[l.FieldType.string]:Object.assign(Object.assign({min:(e,t)=>{var n;return e.min(null!==(n=t.arg)&&void 0!==n?n:0,t.invalidMessage)},max:(e,t)=>{var n;return e.max(null!==(n=t.arg)&&void 0!==n?n:0,t.invalidMessage)},length:(e,t)=>{var n;return e.length(null!==(n=t.arg)&&void 0!==n?n:0,t.invalidMessage)}},{required:(e,t)=>t.arg?e.required(t.invalidMessage):e}),{match:(e,t)=>{if(!t.arg)return e;const n=new RegExp(t.arg);return e.matches(n,{message:t.invalidMessage,excludeEmptyString:!0})}}),[l.FieldType.number]:{max:(e,t)=>s(t.arg)?e:e.max(t.arg,t.invalidMessage),min:(e,t)=>s(t.arg)?e:e.min(t.arg,t.invalidMessage),lessThan:(e,t)=>s(t.arg)?e:e.lessThan(t.arg,t.invalidMessage),moreThan:(e,t)=>s(t.arg)?e:e.moreThan(t.arg,t.invalidMessage),positive:(e,t)=>e.positive(t.invalidMessage),negative:(e,t)=>e.negative(t.invalidMessage),required:(e,t)=>e.required(t.invalidMessage)},[l.FieldType.boolean]:{}};const c={[l.FieldType.string]:a.StringSchema,[l.FieldType.number]:a.NumberSchema,[l.FieldType.boolean]:a.BooleanSchema,[l.FieldType.date]:a.ObjectSchema,[l.FieldType.checkboxGroup]:a.ArraySchema,[l.FieldType.radioGroup]:a.StringSchema,[l.FieldType.time]:a.ObjectSchema};function u(e){const n=t.FieldValidationFunctions[e.type];if(!n)throw new Error("Invalid field");let i=function(e){const{type:t}=e;return new(0,c[t])}(e);if(!e.validation)return i;const o=Object.entries(e.validation);for(const[t,r]of o){const o=n[t];if(o){let n=null;try{n=o(i,r)}catch(n){console.error(`Error parsing field ${t}`,r,e)}i=null!=n?n:i}}return e.label&&(i.spec.label=e.label),i}t.buildFieldSchema=u,t.buildFormSchema=function(e){const t={};for(const n of e)t[n.key]=u(n);return a.object().shape(t)},t.parseFormData=function(e){return e.map((e=>({initialValue:e.value,fieldData:e,widget:e.widget,schema:u(e)}))),[]}},611:function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,o)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=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 o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.getTemplateSchema=void 0;const a=r(n(4298)),l=n(512),s=n(3694),c=n(6188),u=a.object({id:a.string().required(),buttons:c.ButtonsSchema.clone(),customData:a.object().optional().default({})}),d=u.clone().shape({template:a.mixed().required(),body:a.string().optional().default(null),form:s.templateMarkDownFormSchema}).label("Notification Update (Markdown)"),f=u.clone().shape({template:a.mixed().required(),list:a.mixed().optional().test({name:"List object",message:"Invalid list object",test:e=>{if(!e)return!0;if(e&&"object"!=typeof e)throw new Error("Not an object");return Object.entries(null!=e?e:{}).every((([e,t])=>"string"==typeof e&&"string"==typeof t))}})}).label("Update Notification (List)"),p=u.clone().shape({template:a.mixed().required(),form:s.templateCustomFormSchema,templateData:a.mixed().optional().test({name:"Temp object",message:"Invalid list object",test:function(e){var t,n;return!e||((null===(n=null===(t=this.options)||void 0===t?void 0:t.context)||void 0===n?void 0:n.fragments).presentationFragments.forEach((t=>{const n=e[t.dataKey];if(!t.optional&&!n)throw new Error(`templateData["${t.dataKey}"] is not optional and must exist in template data.`);if(n){if(("text"===t.type||"image"===t.type)&&"string"!=typeof n)throw new Error(`templateData["${t.dataKey}"] is referred by a ${t.type} fragment and must be a string type.`);if("list"===t.type&&(!Array.isArray(n)||n.some((e=>2!==e.length||"string"!=typeof e[0]||"string"!=typeof e[1]))))throw new Error(`templateData["${t.dataKey}"] is referred by a list fragment and must be a ListPairs (Array of [string, string]) type.`)}})),!0)}})}).label("Update Notification (Custom)"),h={[l.TemplateNames.markdown]:d,[l.TemplateNames.list]:f,[l.TemplateNames.custom]:p};t.getTemplateSchema=e=>{if(!e.template)throw new Error("Template type cannot be null");const t=h[null==e?void 0:e.template];if(!t)throw new Error(`Cannot find template type: ${e.template}`);return t}},660:function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,o)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=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 o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.HistoryContext=void 0;const a=r(n(5932));t.HistoryContext=a.createContext({})},697:function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,o)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=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 o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.ToastPositionSelector=void 0;const a=r(n(5932)),l=n(7250),s=n(79),c=n(785);t.ToastPositionSelector=e=>a.createElement(a.Fragment,null,a.createElement(d,Object.assign({},e,{title:"Position",id:"toast-position"})),a.createElement(s.CustomLocation,{state:e.value,onChange:t=>{var n,i;null===(n=e.onChange)||void 0===n||n.call(e,{position:t?"custom":"bottom-right",customPosition:null===(i=e.value)||void 0===i?void 0:i.customPosition})}}));const u=["top-left","top-right","bottom-left","bottom-right"],d=({value:e,title:t,id:n="",onChange:i=()=>{}})=>{const o=t=>{i(Object.assign(Object.assign({},e||{}),{position:t}))};return a.createElement("div",{role:"radiogroup"},a.createElement(c.TitleElement,{htmlFor:n,size:l.Size.large},t),a.createElement(c.StyledSelectors,{tabIndex:0,onKeyUp:t=>{const n=u.findIndex((t=>t===(null==e?void 0:e.position)));switch(t.key){case"ArrowUp":case"ArrowLeft":t.preventDefault(),t.stopPropagation(),i(0===n?Object.assign(Object.assign({},e),{position:"bottom-right"}):Object.assign(Object.assign({},e),{position:u[n-1]}));break;case"ArrowDown":case"ArrowRight":t.preventDefault(),t.stopPropagation(),n===u.length-1?i(Object.assign(Object.assign({},e),{position:"top-left"})):i(Object.assign(Object.assign({},e),{position:u[n+1]}))}},id:n},u.map((t=>a.createElement(c.Selector,{key:t,position:t,onClick:o,active:(null==e?void 0:e.position)===t})))))}},707:function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,o)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=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 o(t,e),t},a=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||i(t,e,n)},l=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 o=0;for(i=Object.getOwnPropertySymbols(e);o<i.length;o++)t.indexOf(i[o])<0&&Object.prototype.propertyIsEnumerable.call(e,i[o])&&(n[i[o]]=e[i[o]])}return n};Object.defineProperty(t,"__esModule",{value:!0}),t.setAllowedOrigins=t.getUserSettingStatus=t.UserSettings=t.getNotificationsCount=t.hide=t.show=t.setDefaultPlatformShortcut=t.toggleNotificationCenter=t.clearAll=t.getAll=t.clear=t.update=t.create=t.removeEventListener=t.addEventListener=t.VERSION=t.NotificationIndicatorType=t.IndicatorColor=t.NotificationIndicatorWithCustomColor=t.NotificationIndicator=t.NotificationOptions=t.provider=t.actions=void 0;const s=n(6455),c=n(3816),u=n(9603),d=n(3657),f=r(n(6451));t.provider=f;const p=n(8173),h=n(6865);Object.defineProperty(t,"NotificationIndicator",{enumerable:!0,get:function(){return h.NotificationIndicator}}),Object.defineProperty(t,"NotificationIndicatorWithCustomColor",{enumerable:!0,get:function(){return h.NotificationIndicatorWithCustomColor}}),Object.defineProperty(t,"NotificationIndicatorType",{enumerable:!0,get:function(){return h.IndicatorType}}),Object.defineProperty(t,"IndicatorColor",{enumerable:!0,get:function(){return h.IndicatorColor}});const m=n(4415);Object.defineProperty(t,"NotificationOptions",{enumerable:!0,get:function(){return m.NotificationOptions}});const b=r(n(6455));t.actions=b,a(n(6455),t),a(n(7204),t),a(n(295),t),a(n(8912),t),a(n(3154),t),a(n(5050),t),a(n(512),t),t.VERSION="2.11.1";const g=(0,d.getEventRouter)();function v(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})})}g.registerDeserializer("notification-created",(e=>v(e))),g.registerDeserializer("notification-toast-dismissed",(e=>v(e))),g.registerDeserializer("notification-closed",(e=>v(e))),g.registerDeserializer("notification-action",(e=>{var t;const n=v(e),{controlSource:i,controlIndex:o}=n,r=l(n,["controlSource","controlIndex"]);return e.trigger===s.ActionTrigger.CONTROL?Object.assign(Object.assign({},r),{control:null===(t=e.notification[i])||void 0===t?void 0:t[o]}):r})),g.registerDeserializer("notifications-count-changed",(e=>e)),g.registerDeserializer("notification-reminder-created",(e=>{const t=v(e),{reminderDate:n}=t,i=l(t,["reminderDate"]);return Object.assign(Object.assign({},i),{reminderDate:new Date(n)})})),g.registerDeserializer("notification-reminder-removed",(e=>v(e))),g.registerDeserializer("notification-sound-toggled",(e=>e)),t.addEventListener=async function(e,t){(0,p.validateEnvironment)(),e=(0,p.sanitizeEventType)(e),t=(0,p.sanitizeFunction)(t);const n=d.eventEmitter.listenerCount(e);"notification-form-submitted"===e&&(t=function(e){return t=>{const n=t.notification.id;t.setFormStatus=e=>(0,c.tryServiceDispatch)(u.APITopic.SET_FORM_STATUS_OPTIONS,Object.assign(Object.assign({},e),{_notificationId:n})),e(t)}}(t)),"notification-form-values-changed"===e&&(t=function(e){return t=>{t.setErrors=e=>(0,c.tryServiceDispatch)(u.APITopic.SET_FORM_VALIDATION_ERRORS,{errors:e,notificationId:t.notification.id}),e(t)}}(t)),d.eventEmitter.addListener(e,t),0===n&&1===d.eventEmitter.listenerCount(e)&&await(0,c.tryServiceDispatch)(u.APITopic.ADD_EVENT_LISTENER,e)},t.removeEventListener=async function(e,t){(0,p.validateEnvironment)(),e=(0,p.sanitizeEventType)(e),t=(0,p.sanitizeFunction)(t),1===d.eventEmitter.listenerCount(e)&&d.eventEmitter.listeners(e)[0]===t&&await(0,c.tryServiceDispatch)(u.APITopic.REMOVE_EVENT_LISTENER,e),d.eventEmitter.removeListener(e,t)},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,c.tryServiceDispatch)(u.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,c.tryServiceDispatch)(u.APITopic.UPDATE_NOTIFICATION,Object.assign({},e));return Object.assign({},t)},t.clear=async function(e){return(0,c.tryServiceDispatch)(u.APITopic.CLEAR_NOTIFICATION,{id:e})},t.getAll=async function(){return(await(0,c.tryServiceDispatch)(u.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,c.tryServiceDispatch)(u.APITopic.CLEAR_APP_NOTIFICATIONS,void 0)},t.toggleNotificationCenter=async function(){return(0,c.tryServiceDispatch)(u.APITopic.TOGGLE_NOTIFICATION_CENTER,void 0)},t.setDefaultPlatformShortcut=function(e){return(0,c.tryServiceDispatch)(u.APITopic.SET_DEFAULT_PLATFORM_SHORTCUT,e)},t.show=async function(e){return(0,c.tryServiceDispatch)(u.APITopic.SHOW_NOTIFICATION_CENTER,e)},t.hide=async function(){return(0,c.tryServiceDispatch)(u.APITopic.HIDE_NOTIFICATION_CENTER,void 0)},t.getNotificationsCount=async function(){return(0,c.tryServiceDispatch)(u.APITopic.GET_NOTIFICATIONS_COUNT,void 0)},(t.UserSettings||(t.UserSettings={})).SOUND_ENABLED="soundEnabled",t.getUserSettingStatus=async function(e){return(0,c.tryServiceDispatch)(u.APITopic.GET_USER_SETTINGS_STATUS,e)},t.setAllowedOrigins=async e=>(0,c.tryServiceDispatch)(u.APITopic.SET_NOTIFICATION_SECURITY_RULE,{allowedOrigins:e})},714: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.RadioGroupWidgetComponent=void 0;const o=i(n(5932)),r=n(7250),a=n(258),l=n(7260),s=n(1971),c=n(5232),u=n(5484);t.RadioGroupWidgetComponent=e=>o.default.createElement(a.Field,{name:e.field.key,component:d,radioGroupField:e.field,formSettings:e.formSettings,raiseAnalytics:e.raiseAnalytics});const d=({raiseAnalytics:e,radioGroupField:t,field:n,form:i,formSettings:a})=>((0,u.useRaiseFieldAnalytics)(t,e),o.default.createElement(l.InputContainer,{flexDirection:"column"},o.default.createElement(r.RadioGroup,{onChange:e=>{i.setFieldTouched(t.key,!0),i.setFieldValue(t.key,e.target.value)},label:(0,c.getLabelText)(t,a),helperText:t.helperText,name:t.key,value:n.value,key:`${t.key}_${n.value}`},t.widget.group.map((e=>o.default.createElement(r.RadioInput,{key:`${t.key}_${e.value}`,label:e.label,value:e.value})))),o.default.createElement(s.ErrorLabel,{name:n.name})))},723:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useNotificationFormAnalytics=void 0;const i=n(5932),o=n(9130),r=n(7451);t.useNotificationFormAnalytics=(e,t)=>{const n=(0,o.useDispatch)();return(0,i.useCallback)(((i,o,a)=>{n(new r.RaiseAnalyticsEvent({type:t?"Toast":"Notification",action:o,value:a,data:{fieldLabel:i,notificationId:e}}))}),[e,n,t])}},746:function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,o)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=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 o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.PlatformIcon=void 0;const a=r(n(5932)),l=r(n(2230)),s=n(7250),c=n(8833);t.PlatformIcon=({id:e,icon:t,title:n,selected:i,count:o,onPlatformSelect:r})=>{var l,s;const h=(0,c.useLoaded)(t),m=!e,b=m?"All":null!==(l=null==n?void 0:n[0])&&void 0!==l?l:null==e?void 0:e[0];return a.createElement(f,{"data-testid":"platform-icon",onClick:()=>{r(e)},allIcon:m,title:`${m?"All":null!==(s=null!=n?n:e)&&void 0!==s?s:"Platform"} Notifications`},o>0&&a.createElement(u,{count:o,max:99}),a.createElement(d,{src:t},(h===c.LoadState.ERROR||h===c.LoadState.LOADING)&&b),i&&a.createElement(p,null))};const u=(0,l.default)(s.Badge)`
94
+ `},597:function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,o)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=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 o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.parseFormData=t.buildFormSchema=t.buildFieldSchema=t.FieldValidationFunctions=void 0;const a=r(n(4298)),l=n(3955),s=e=>null==e;t.FieldValidationFunctions={[l.FieldType.radioGroup]:Object.assign({},{required:(e,t)=>t.arg?e.required(t.invalidMessage):e}),[l.FieldType.checkboxGroup]:Object.assign({},{required:(e,t)=>t.arg?e.required(t.invalidMessage):e}),[l.FieldType.date]:Object.assign({},{required:(e,t)=>t.arg?e.required(t.invalidMessage):e}),[l.FieldType.time]:Object.assign({},{required:(e,t)=>t.arg?e.required(t.invalidMessage):e}),[l.FieldType.string]:Object.assign(Object.assign({min:(e,t)=>{var n;return e.min(null!==(n=t.arg)&&void 0!==n?n:0,t.invalidMessage)},max:(e,t)=>{var n;return e.max(null!==(n=t.arg)&&void 0!==n?n:0,t.invalidMessage)},length:(e,t)=>{var n;return e.length(null!==(n=t.arg)&&void 0!==n?n:0,t.invalidMessage)}},{required:(e,t)=>t.arg?e.required(t.invalidMessage):e}),{match:(e,t)=>{if(!t.arg)return e;const n=new RegExp(t.arg);return e.matches(n,{message:t.invalidMessage,excludeEmptyString:!0})}}),[l.FieldType.number]:{max:(e,t)=>s(t.arg)?e:e.max(t.arg,t.invalidMessage),min:(e,t)=>s(t.arg)?e:e.min(t.arg,t.invalidMessage),lessThan:(e,t)=>s(t.arg)?e:e.lessThan(t.arg,t.invalidMessage),moreThan:(e,t)=>s(t.arg)?e:e.moreThan(t.arg,t.invalidMessage),positive:(e,t)=>e.positive(t.invalidMessage),negative:(e,t)=>e.negative(t.invalidMessage),required:(e,t)=>e.required(t.invalidMessage)},[l.FieldType.boolean]:{}};const c={[l.FieldType.string]:a.StringSchema,[l.FieldType.number]:a.NumberSchema,[l.FieldType.boolean]:a.BooleanSchema,[l.FieldType.date]:a.ObjectSchema,[l.FieldType.checkboxGroup]:a.ArraySchema,[l.FieldType.radioGroup]:a.StringSchema,[l.FieldType.time]:a.ObjectSchema};function u(e){const n=t.FieldValidationFunctions[e.type];if(!n)throw new Error("Invalid field");let i=function(e){const{type:t}=e;return new(0,c[t])}(e);if(!e.validation)return i;const o=Object.entries(e.validation);for(const[t,r]of o){const o=n[t];if(o){let n=null;try{n=o(i,r)}catch(n){console.error(`Error parsing field ${t}`,r,e)}i=null!=n?n:i}}return e.label&&(i.spec.label=e.label),i}t.buildFieldSchema=u,t.buildFormSchema=function(e){const t={};for(const n of e)t[n.key]=u(n);return a.object().shape(t)},t.parseFormData=function(e){return e.map((e=>({initialValue:e.value,fieldData:e,widget:e.widget,schema:u(e)}))),[]}},611:function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,o)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=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 o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.getTemplateSchema=void 0;const a=r(n(4298)),l=n(512),s=n(3694),c=n(6188),u=a.object({id:a.string().required(),buttons:c.ButtonsSchema.clone(),customData:a.object().optional().default({})}),d=u.clone().shape({template:a.mixed().required(),body:a.string().optional().default(null),form:s.templateMarkDownFormSchema}).label("Notification Update (Markdown)"),f=u.clone().shape({template:a.mixed().required(),list:a.mixed().optional().test({name:"List object",message:"Invalid list object",test:e=>{if(!e)return!0;if(e&&"object"!=typeof e)throw new Error("Not an object");return Object.entries(null!=e?e:{}).every((([e,t])=>"string"==typeof e&&"string"==typeof t))}})}).label("Update Notification (List)"),p=u.clone().shape({template:a.mixed().required(),form:s.templateCustomFormSchema,templateData:a.mixed().optional().test({name:"Temp object",message:"Invalid list object",test:function(e){var t,n;return!e||((null===(n=null===(t=this.options)||void 0===t?void 0:t.context)||void 0===n?void 0:n.fragments).presentationFragments.forEach((t=>{const n=e[t.dataKey];if(!t.optional&&!n)throw new Error(`templateData["${t.dataKey}"] is not optional and must exist in template data.`);if(n){if(("text"===t.type||"image"===t.type)&&"string"!=typeof n)throw new Error(`templateData["${t.dataKey}"] is referred by a ${t.type} fragment and must be a string type.`);if("list"===t.type&&(!Array.isArray(n)||n.some((e=>2!==e.length||"string"!=typeof e[0]||"string"!=typeof e[1]))))throw new Error(`templateData["${t.dataKey}"] is referred by a list fragment and must be a ListPairs (Array of [string, string]) type.`)}})),!0)}})}).label("Update Notification (Custom)"),h={[l.TemplateNames.markdown]:d,[l.TemplateNames.list]:f,[l.TemplateNames.custom]:p};t.getTemplateSchema=e=>{if(!e.template)throw new Error("Template type cannot be null");const t=h[null==e?void 0:e.template];if(!t)throw new Error(`Cannot find template type: ${e.template}`);return t}},660:function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,o)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=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 o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.HistoryContext=void 0;const a=r(n(5932));t.HistoryContext=a.createContext({})},697:function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,o)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=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 o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.ToastPositionSelector=void 0;const a=r(n(5932)),l=n(7250),s=n(79),c=n(785);t.ToastPositionSelector=e=>a.createElement(a.Fragment,null,a.createElement(d,Object.assign({},e,{title:"Position",id:"toast-position"})),a.createElement(s.CustomLocation,{state:e.value,onChange:t=>{var n,i;null===(n=e.onChange)||void 0===n||n.call(e,{position:t?"custom":"bottom-right",customPosition:null===(i=e.value)||void 0===i?void 0:i.customPosition})}}));const u=["top-left","top-right","bottom-left","bottom-right"],d=({value:e,title:t,id:n="",onChange:i=()=>{}})=>{const o=t=>{i(Object.assign(Object.assign({},e||{}),{position:t}))};return a.createElement("div",{role:"radiogroup"},a.createElement(c.TitleElement,{htmlFor:n,size:l.Size.large},t),a.createElement(c.StyledSelectors,{tabIndex:0,onKeyUp:t=>{const n=u.findIndex((t=>t===(null==e?void 0:e.position)));switch(t.key){case"ArrowUp":case"ArrowLeft":t.preventDefault(),t.stopPropagation(),i(0===n?Object.assign(Object.assign({},e),{position:"bottom-right"}):Object.assign(Object.assign({},e),{position:u[n-1]}));break;case"ArrowDown":case"ArrowRight":t.preventDefault(),t.stopPropagation(),n===u.length-1?i(Object.assign(Object.assign({},e),{position:"top-left"})):i(Object.assign(Object.assign({},e),{position:u[n+1]}))}},id:n},u.map((t=>a.createElement(c.Selector,{key:t,position:t,onClick:o,active:(null==e?void 0:e.position)===t})))))}},707:function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,o)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=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 o(t,e),t},a=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||i(t,e,n)},l=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 o=0;for(i=Object.getOwnPropertySymbols(e);o<i.length;o++)t.indexOf(i[o])<0&&Object.prototype.propertyIsEnumerable.call(e,i[o])&&(n[i[o]]=e[i[o]])}return n};Object.defineProperty(t,"__esModule",{value:!0}),t.setAllowedOrigins=t.getUserSettingStatus=t.UserSettings=t.getNotificationsCount=t.hide=t.show=t.setDefaultPlatformShortcut=t.toggleNotificationCenter=t.clearAll=t.getAll=t.clear=t.update=t.create=t.removeEventListener=t.addEventListener=t.VERSION=t.NotificationIndicatorType=t.IndicatorColor=t.NotificationIndicatorWithCustomColor=t.NotificationIndicator=t.NotificationOptions=t.provider=t.actions=void 0;const s=n(6455),c=n(3816),u=n(9603),d=n(3657),f=r(n(6451));t.provider=f;const p=n(8173),h=n(6865);Object.defineProperty(t,"NotificationIndicator",{enumerable:!0,get:function(){return h.NotificationIndicator}}),Object.defineProperty(t,"NotificationIndicatorWithCustomColor",{enumerable:!0,get:function(){return h.NotificationIndicatorWithCustomColor}}),Object.defineProperty(t,"NotificationIndicatorType",{enumerable:!0,get:function(){return h.IndicatorType}}),Object.defineProperty(t,"IndicatorColor",{enumerable:!0,get:function(){return h.IndicatorColor}});const m=n(4415);Object.defineProperty(t,"NotificationOptions",{enumerable:!0,get:function(){return m.NotificationOptions}});const b=r(n(6455));t.actions=b,a(n(6455),t),a(n(7204),t),a(n(295),t),a(n(8912),t),a(n(3154),t),a(n(5050),t),a(n(512),t),t.VERSION="2.12.0-alpha-4014";const g=(0,d.getEventRouter)();function v(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})})}g.registerDeserializer("notification-created",(e=>v(e))),g.registerDeserializer("notification-toast-dismissed",(e=>v(e))),g.registerDeserializer("notification-closed",(e=>v(e))),g.registerDeserializer("notification-action",(e=>{var t;const n=v(e),{controlSource:i,controlIndex:o}=n,r=l(n,["controlSource","controlIndex"]);return e.trigger===s.ActionTrigger.CONTROL?Object.assign(Object.assign({},r),{control:null===(t=e.notification[i])||void 0===t?void 0:t[o]}):r})),g.registerDeserializer("notifications-count-changed",(e=>e)),g.registerDeserializer("notification-reminder-created",(e=>{const t=v(e),{reminderDate:n}=t,i=l(t,["reminderDate"]);return Object.assign(Object.assign({},i),{reminderDate:new Date(n)})})),g.registerDeserializer("notification-reminder-removed",(e=>v(e))),g.registerDeserializer("notification-sound-toggled",(e=>e)),t.addEventListener=async function(e,t){(0,p.validateEnvironment)(),e=(0,p.sanitizeEventType)(e),t=(0,p.sanitizeFunction)(t);const n=d.eventEmitter.listenerCount(e);"notification-form-submitted"===e&&(t=function(e){return t=>{const n=t.notification.id;t.setFormStatus=e=>(0,c.tryServiceDispatch)(u.APITopic.SET_FORM_STATUS_OPTIONS,Object.assign(Object.assign({},e),{_notificationId:n})),e(t)}}(t)),"notification-form-values-changed"===e&&(t=function(e){return t=>{t.setErrors=e=>(0,c.tryServiceDispatch)(u.APITopic.SET_FORM_VALIDATION_ERRORS,{errors:e,notificationId:t.notification.id}),e(t)}}(t)),d.eventEmitter.addListener(e,t),0===n&&1===d.eventEmitter.listenerCount(e)&&await(0,c.tryServiceDispatch)(u.APITopic.ADD_EVENT_LISTENER,e)},t.removeEventListener=async function(e,t){(0,p.validateEnvironment)(),e=(0,p.sanitizeEventType)(e),t=(0,p.sanitizeFunction)(t),1===d.eventEmitter.listenerCount(e)&&d.eventEmitter.listeners(e)[0]===t&&await(0,c.tryServiceDispatch)(u.APITopic.REMOVE_EVENT_LISTENER,e),d.eventEmitter.removeListener(e,t)},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,c.tryServiceDispatch)(u.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,c.tryServiceDispatch)(u.APITopic.UPDATE_NOTIFICATION,Object.assign({},e));return Object.assign({},t)},t.clear=async function(e){return(0,c.tryServiceDispatch)(u.APITopic.CLEAR_NOTIFICATION,{id:e})},t.getAll=async function(){return(await(0,c.tryServiceDispatch)(u.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,c.tryServiceDispatch)(u.APITopic.CLEAR_APP_NOTIFICATIONS,void 0)},t.toggleNotificationCenter=async function(){return(0,c.tryServiceDispatch)(u.APITopic.TOGGLE_NOTIFICATION_CENTER,void 0)},t.setDefaultPlatformShortcut=function(e){return(0,c.tryServiceDispatch)(u.APITopic.SET_DEFAULT_PLATFORM_SHORTCUT,e)},t.show=async function(e){return(0,c.tryServiceDispatch)(u.APITopic.SHOW_NOTIFICATION_CENTER,e)},t.hide=async function(){return(0,c.tryServiceDispatch)(u.APITopic.HIDE_NOTIFICATION_CENTER,void 0)},t.getNotificationsCount=async function(){return(0,c.tryServiceDispatch)(u.APITopic.GET_NOTIFICATIONS_COUNT,void 0)},(t.UserSettings||(t.UserSettings={})).SOUND_ENABLED="soundEnabled",t.getUserSettingStatus=async function(e){return(0,c.tryServiceDispatch)(u.APITopic.GET_USER_SETTINGS_STATUS,e)},t.setAllowedOrigins=async e=>(0,c.tryServiceDispatch)(u.APITopic.SET_NOTIFICATION_SECURITY_RULE,{allowedOrigins:e})},714: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.RadioGroupWidgetComponent=void 0;const o=i(n(5932)),r=n(7250),a=n(258),l=n(7260),s=n(1971),c=n(5232),u=n(5484);t.RadioGroupWidgetComponent=e=>o.default.createElement(a.Field,{name:e.field.key,component:d,radioGroupField:e.field,formSettings:e.formSettings,raiseAnalytics:e.raiseAnalytics});const d=({raiseAnalytics:e,radioGroupField:t,field:n,form:i,formSettings:a})=>((0,u.useRaiseFieldAnalytics)(t,e),o.default.createElement(l.InputContainer,{flexDirection:"column"},o.default.createElement(r.RadioGroup,{onChange:e=>{i.setFieldTouched(t.key,!0),i.setFieldValue(t.key,e.target.value)},label:(0,c.getLabelText)(t,a),helperText:t.helperText,name:t.key,value:n.value,key:`${t.key}_${n.value}`},t.widget.group.map((e=>o.default.createElement(r.RadioInput,{key:`${t.key}_${e.value}`,label:e.label,value:e.value})))),o.default.createElement(s.ErrorLabel,{name:n.name})))},723:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useNotificationFormAnalytics=void 0;const i=n(5932),o=n(9130),r=n(7451);t.useNotificationFormAnalytics=(e,t)=>{const n=(0,o.useDispatch)();return(0,i.useCallback)(((i,o,a)=>{n(new r.RaiseAnalyticsEvent({type:t?"Toast":"Notification",action:o,value:a,data:{fieldLabel:i,notificationId:e}}))}),[e,n,t])}},746:function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,o)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=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 o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.PlatformIcon=void 0;const a=r(n(5932)),l=r(n(2230)),s=n(7250),c=n(8833);t.PlatformIcon=({id:e,icon:t,title:n,selected:i,count:o,onPlatformSelect:r})=>{var l,s;const h=(0,c.useLoaded)(t),m=!e,b=m?"All":null!==(l=null==n?void 0:n[0])&&void 0!==l?l:null==e?void 0:e[0];return a.createElement(f,{"data-testid":"platform-icon",onClick:()=>{r(e)},allIcon:m,title:`${m?"All":null!==(s=null!=n?n:e)&&void 0!==s?s:"Platform"} Notifications`},o>0&&a.createElement(u,{count:o,max:99}),a.createElement(d,{src:t},(h===c.LoadState.ERROR||h===c.LoadState.LOADING)&&b),i&&a.createElement(p,null))};const u=(0,l.default)(s.Badge)`
95
95
  position: absolute;
96
96
  right: 0;
97
97
  top: -${({theme:e})=>e.px.small};
@@ -420,7 +420,7 @@
420
420
  &:hover {
421
421
  color: ${({theme:e})=>e.palette.linkHover};
422
422
  }
423
- `},2984:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getTemplateAPIVersion=t.getVersion=void 0,t.getVersion=function(){return"2.11.1"},t.getTemplateAPIVersion=function(){return"2"}},3051:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useFormCustomValidationErrors=void 0;const i=n(5932),o=n(9130);t.useFormCustomValidationErrors=(e,t)=>{const n=(0,o.useSelector)((e=>{var n,i;return null===(i=null===(n=e.activeForms)||void 0===n?void 0:n.forms.find((e=>e.notificationId===t)))||void 0===i?void 0:i.errors})),{setFieldError:r}=e;(0,i.useEffect)((()=>{for(const e in n)r(e,n[e])}),[n,r])}},3081:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useScrollToFirstElementOnExpand=void 0;const i=n(5932);t.useScrollToFirstElementOnExpand=(e,t)=>{(0,i.useEffect)((()=>{t&&e.current&&setTimeout((()=>{var t,n;const i=null===(n=null===(t=e.current)||void 0===t?void 0:t.parentElement)||void 0===n?void 0:n.querySelector("input, textarea, button");i&&i.focus()}),500)}),[e,t])}},3082:function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,o)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=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 o(t,e),t},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.NotificationCenterWebComponent=void 0;const l=a(n(5932)),s=n(5338),c=n(9130),u=n(5056),d=n(3764),f=r(n(2230)),p=n(9136),h=n(660),m=n(3083),b=n(6452),g=n(436),v=n(7586);class y extends HTMLElement{constructor(){super(),this.reactRoot=null,this.root=this.attachShadow({mode:"open"}),this.styleTarget=document.createElement("style"),this.styleTarget.setAttribute("type","text/css"),this.styleTarget.textContent="",this.root.appendChild(this.styleTarget)}setProps(e){this.props=e,this.render()}connectedCallback(){setTimeout((()=>{this.render()}),0)}render(){this.props&&this.props.store&&(this.props.store.subscribe((()=>{!1===this.props.store.getState().centerVisible?this.style.display="none":this.style.display="block"})),this.styleTarget.sheet?(this.reactRoot||(this.reactRoot=(0,s.createRoot)(this.root)),u.centerHistory.push(v.ROUTES.NOTIFICATIONS),this.reactRoot.render(l.default.createElement(c.Provider,{store:this.props.store},l.default.createElement(f.StyleSheetManager,{target:this.styleTarget},l.default.createElement(h.HistoryContext.Provider,{value:u.centerHistory},l.default.createElement(p.WindowProvider,{value:window},l.default.createElement(m.RootThemeProvider,null,l.default.createElement(d.GlobalWebStyles,null),l.default.createElement(_,{id:"here-notifications-panel"},l.default.createElement(b.Router,{routes:g.CenterRoutes,history:u.centerHistory}))))))))):setTimeout((()=>this.render()),0))}}t.NotificationCenterWebComponent=y;const _=f.default.div`
423
+ `},2984:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getTemplateAPIVersion=t.getVersion=void 0,t.getVersion=function(){return"2.12.0-alpha-4014"},t.getTemplateAPIVersion=function(){return"2"}},3051:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useFormCustomValidationErrors=void 0;const i=n(5932),o=n(9130);t.useFormCustomValidationErrors=(e,t)=>{const n=(0,o.useSelector)((e=>{var n,i;return null===(i=null===(n=e.activeForms)||void 0===n?void 0:n.forms.find((e=>e.notificationId===t)))||void 0===i?void 0:i.errors})),{setFieldError:r}=e;(0,i.useEffect)((()=>{for(const e in n)r(e,n[e])}),[n,r])}},3081:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useScrollToFirstElementOnExpand=void 0;const i=n(5932);t.useScrollToFirstElementOnExpand=(e,t)=>{(0,i.useEffect)((()=>{t&&e.current&&setTimeout((()=>{var t,n;const i=null===(n=null===(t=e.current)||void 0===t?void 0:t.parentElement)||void 0===n?void 0:n.querySelector("input, textarea, button");i&&i.focus()}),500)}),[e,t])}},3082:function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,o)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=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 o(t,e),t},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.NotificationCenterWebComponent=void 0;const l=a(n(5932)),s=n(5338),c=n(9130),u=n(5056),d=n(3764),f=r(n(2230)),p=n(9136),h=n(660),m=n(3083),b=n(6452),g=n(436),v=n(7586);class y extends HTMLElement{constructor(){super(),this.reactRoot=null,this.root=this.attachShadow({mode:"open"}),this.styleTarget=document.createElement("style"),this.styleTarget.setAttribute("type","text/css"),this.styleTarget.textContent="",this.root.appendChild(this.styleTarget)}setProps(e){this.props=e,this.render()}connectedCallback(){setTimeout((()=>{this.render()}),0)}render(){this.props&&this.props.store&&(this.props.store.subscribe((()=>{!1===this.props.store.getState().centerVisible?this.style.display="none":this.style.display="block"})),this.styleTarget.sheet?(this.reactRoot||(this.reactRoot=(0,s.createRoot)(this.root)),u.centerHistory.push(v.ROUTES.NOTIFICATIONS),this.reactRoot.render(l.default.createElement(c.Provider,{store:this.props.store},l.default.createElement(f.StyleSheetManager,{target:this.styleTarget},l.default.createElement(h.HistoryContext.Provider,{value:u.centerHistory},l.default.createElement(p.WindowProvider,{value:window},l.default.createElement(m.RootThemeProvider,null,l.default.createElement(d.GlobalWebStyles,null),l.default.createElement(_,{id:"here-notifications-panel"},l.default.createElement(b.Router,{routes:g.CenterRoutes,history:u.centerHistory}))))))))):setTimeout((()=>this.render()),0))}}t.NotificationCenterWebComponent=y;const _=f.default.div`
424
424
  position: absolute;
425
425
  top: 0;
426
426
  left: 0;
@@ -830,7 +830,7 @@
830
830
  `,v=(0,s.default)(u.Box)`
831
831
  padding: ${({theme:e})=>`${e.px.large} ${e.px.large} 0 ${e.px.large}`};
832
832
  flex-direction: column;
833
- `;t.AdvancedSettingsView=(0,c.connect)((e=>({clearFiltersOnCenterShow:e.settings.clearFiltersOnCenterShow,clearFiltersOnShortcutCenterShow:e.settings.clearFiltersOnShortcutCenterShow,userDefaultShortcut:e.settings.userDefaultShortcut,platformDefaultShortcut:e.settings.platformDefaultShortcut,keyboardShortcutToOpenEnabled:e.settings.keyboardShortcutToOpenEnabled})),(e=>({toggleClearFiltersOnCenterShow:t=>e(new d.ToggleClearFiltersOnCenterShow(t)),toggleClearFiltersOnShortcutCenterShow:t=>e(new d.ToggleClearFiltersOnShortcutCenterShow(t)),toggleKeyboardShortcutToOpenEnabled:t=>e(new d.ToggleKeyboardShortcutToOpenEnabled(t)),setUserDefaultShortcut:(t,n)=>e(new d.SetUserDefaultShortcut(t,n)),raiseAnalyticsEvent:async t=>e(new f.RaiseAnalyticsEvent(t))})))((({clearFiltersOnCenterShow:e,toggleClearFiltersOnCenterShow:t,raiseAnalyticsEvent:n,toggleClearFiltersOnShortcutCenterShow:i,toggleKeyboardShortcutToOpenEnabled:o,userDefaultShortcut:r,setUserDefaultShortcut:a,platformDefaultShortcut:s,keyboardShortcutToOpenEnabled:c,clearFiltersOnShortcutCenterShow:f})=>{const[y,_]=l.useState(!1),[x,O]=l.useState(new Set),w=l.useRef(null),C=e=>window.navigator.userAgent.toLowerCase().includes("windows")?e.replace("CmdOrCtrl","Ctrl"):e.replace("CmdOrCtrl","Cmd"),j=C(s||d.openFinDefaultShortcut),S=C(r||j),[P,M]=l.useState(C(S));return l.useEffect((()=>{y&&w.current&&(w.current.focus(),O(new Set))}),[y]),l.createElement(b,null,l.createElement(v,null,l.createElement(g,null,"Notification Center Behavior when opened"),l.createElement(u.RadioGroup,{direction:"column",name:"clear-filters-on-open",value:e?"reset":"remember",onChange:e=>{var i;t("reset"===e.target.value),i="reset"!==e.target.value,null==n||n({type:"Settings",action:"Keep Filters",value:i?"True":"False",skipValueHashing:!0})}},l.createElement(u.RadioInput,{label:"Remember previous state",value:"remember"}),l.createElement(u.RadioInput,{label:"Reset to default",value:"reset"}))),l.createElement(v,null,l.createElement(m,null,l.createElement(g,null,"Enable keyboard shortcut to open Notification Center"),l.createElement(u.Toggle,{checked:c,onChange:()=>o(!c)})),c&&l.createElement(l.Fragment,null,l.createElement(m,null,l.createElement(p,null,P),l.createElement(u.Box,{display:"flex"},l.createElement(u.Button,{kind:"secondary",onClick:()=>{y?(_(!1),""!==P?a(P,r):M(S),_(!y)):_(!y)}},y?"Save Shortcut":l.createElement(l.Fragment,null,l.createElement(u.Icon,{size:"small",icon:"Pencil1Icon"})," Edit")))),y&&l.createElement(u.TextInput,{onKeyDown:e=>{if(x.size<4){e.preventDefault();const t=1===e.key.length?e.key.toUpperCase():e.key,n=new Set(x).add(t);O(n),(e=>{const t={Control:"Ctrl",Command:"Cmd"," ":"Space",ArrowUp:"Up",ArrowDown:"Down",ArrowLeft:"Left",ArrowRight:"Right"},n=Array.from(e).map((e=>t[e]||e)).join(" + ");M(n)})(n)}},onKeyUp:e=>{x.delete(1===e.key.length?e.key.toUpperCase():e.key),O(new Set(x))},ref:w,style:{marginTop:"5px"},value:P}))),c&&l.createElement(v,null,l.createElement(g,null,"Notification Center behavior when opened with a keyboard shortcut"),l.createElement(u.RadioGroup,{direction:"column",name:"clear-filters-on-shortcut-open",value:f?"reset":"remember",onChange:e=>i("reset"===e.target.value)},l.createElement(u.RadioInput,{label:"Remember previous state",value:"remember"}),l.createElement(u.RadioInput,{label:"Reset to default",value:"reset"}))),l.createElement(h,null,l.createElement(u.Button,{kind:"secondary",onClick:()=>{t(!1),i(!0),o(!0),a("",P),M(j)}},"Restore Default Preferences")))}))},6415:function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,o)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=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 o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.WebModalContextProvider=t.WebModalContext=void 0;const a=r(n(5932));t.WebModalContext=(0,a.createContext)({isMenuModalOpen:!1,setIsMenuModalOpen:()=>{},menuConfig:null,setMenuConfig:()=>{},isCustomReminderModalOpen:!1,setIsCustomReminderModalOpen:()=>{},customReminderConfig:null,setCustomReminderConfig:()=>{},isDatePickerModalOpen:!1,setIsDatePickerModalOpen:()=>{},datePickerConfig:null,setDatePickerConfig:()=>{},isTimePickerModalOpen:!1,setIsTimePickerModalOpen:()=>{},timePickerConfig:null,setTimePickerConfig:()=>{},modalType:null,setModalType:()=>{}}),t.WebModalContextProvider=({children:e})=>{const[n,i]=(0,a.useState)(!1),[o,r]=(0,a.useState)(null),[l,s]=(0,a.useState)(!1),[c,u]=(0,a.useState)(null),[d,f]=(0,a.useState)(!1),[p,h]=(0,a.useState)(null),[m,b]=(0,a.useState)(!1),[g,v]=(0,a.useState)(null),[y,_]=(0,a.useState)(null);return a.default.createElement(t.WebModalContext.Provider,{value:{isMenuModalOpen:n,menuConfig:o,setIsMenuModalOpen:i,setMenuConfig:r,isCustomReminderModalOpen:l,customReminderConfig:c,setIsCustomReminderModalOpen:s,setCustomReminderConfig:u,isDatePickerModalOpen:d,datePickerConfig:p,setIsDatePickerModalOpen:f,setDatePickerConfig:h,isTimePickerModalOpen:m,timePickerConfig:g,setIsTimePickerModalOpen:b,setTimePickerConfig:v,modalType:y,setModalType:_}},e)}},6430:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getFormikErrorCount=void 0,t.getFormikErrorCount=e=>{const{errors:t,touched:n}=e;return Object.entries(t).map((([e])=>n[e])).filter((e=>e)).length}},6451: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 o=i(n(7530)),r=n(5785),a=n(3816),l=n(9603);function s(){return(0,r.withStrictTimeout)(500,(0,a.tryServiceDispatch)(l.APITopic.GET_PROVIDER_STATUS,void 0),"").catch((()=>({connected:!1,version:null,templateAPIVersion:null})))}t.getStatus=s,t.isConnectedToAtLeast=async function(e){const t=await s();if(t.connected&&null!==t.version){const n=(0,o.default)(t.version,e);if(0===n||1===n)return!0}return!1}},6452:function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,o)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=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 o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Router=void 0;const a=r(n(5932)),l=n(260),s=n(978);t.Router=({history:e,routes:t=[]})=>a.createElement(s.Router,{history:e},a.createElement(l.Switch,null,t.map(c)));const c=e=>{const{path:t,exact:n,Component:i}=e;return a.createElement(l.Route,{key:t,component:i,exact:n,path:t})}},6455:(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"},6460:function(e,t,n){"use strict";var i=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 o=0;for(i=Object.getOwnPropertySymbols(e);o<i.length;o++)t.indexOf(i[o])<0&&Object.prototype.propertyIsEnumerable.call(e,i[o])&&(n[i[o]]=e[i[o]])}return n},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.FadeTransition=void 0;const r=o(n(5932)),a=o(n(2230)),l=n(524);t.FadeTransition=e=>{var{children:t}=e,n=i(e,["children"]);const o=r.default.useRef(null);return r.default.createElement(l.Transition,Object.assign({},n,{nodeRef:o}),(e=>r.default.createElement(s,{ref:o,state:e},t)))};const s=a.default.div`
833
+ `;t.AdvancedSettingsView=(0,c.connect)((e=>({clearFiltersOnCenterShow:e.settings.clearFiltersOnCenterShow,clearFiltersOnShortcutCenterShow:e.settings.clearFiltersOnShortcutCenterShow,userDefaultShortcut:e.settings.userDefaultShortcut,platformDefaultShortcut:e.settings.platformDefaultShortcut,keyboardShortcutToOpenEnabled:e.settings.keyboardShortcutToOpenEnabled})),(e=>({toggleClearFiltersOnCenterShow:t=>e(new d.ToggleClearFiltersOnCenterShow(t)),toggleClearFiltersOnShortcutCenterShow:t=>e(new d.ToggleClearFiltersOnShortcutCenterShow(t)),toggleKeyboardShortcutToOpenEnabled:t=>e(new d.ToggleKeyboardShortcutToOpenEnabled(t)),setUserDefaultShortcut:(t,n)=>e(new d.SetUserDefaultShortcut(t,n)),raiseAnalyticsEvent:async t=>e(new f.RaiseAnalyticsEvent(t))})))((({clearFiltersOnCenterShow:e,toggleClearFiltersOnCenterShow:t,raiseAnalyticsEvent:n,toggleClearFiltersOnShortcutCenterShow:i,toggleKeyboardShortcutToOpenEnabled:o,userDefaultShortcut:r,setUserDefaultShortcut:a,platformDefaultShortcut:s,keyboardShortcutToOpenEnabled:c,clearFiltersOnShortcutCenterShow:f})=>{const[y,_]=l.useState(!1),[x,O]=l.useState(new Set),w=l.useRef(null),C=e=>window.navigator.userAgent.toLowerCase().includes("windows")?e.replace("CmdOrCtrl","Ctrl"):e.replace("CmdOrCtrl","Cmd"),j=C(s||d.openFinDefaultShortcut),S=C(r||j),[P,M]=l.useState(C(S));return l.useEffect((()=>{y&&w.current&&(w.current.focus(),O(new Set))}),[y]),l.createElement(b,null,l.createElement(v,null,l.createElement(g,null,"Notification Center Behavior when opened"),l.createElement(u.RadioGroup,{direction:"column",name:"clear-filters-on-open",value:e?"reset":"remember",onChange:e=>{var i;t("reset"===e.target.value),i="reset"!==e.target.value,null==n||n({type:"Settings",action:"Keep Filters",value:i?"True":"False",skipValueHashing:!0})}},l.createElement(u.RadioInput,{label:"Remember previous state",value:"remember"}),l.createElement(u.RadioInput,{label:"Reset to default",value:"reset"}))),l.createElement(v,null,l.createElement(m,null,l.createElement(g,null,"Enable keyboard shortcut to open Notification Center"),l.createElement(u.Toggle,{checked:c,onChange:()=>o(!c)})),c&&l.createElement(l.Fragment,null,l.createElement(m,null,l.createElement(p,null,P),l.createElement(u.Box,{display:"flex"},l.createElement(u.Button,{kind:"secondary","aria-label":y?"Save Shortcut":"Edit keyboard shortcut to open Notification Center",onClick:()=>{y?(_(!1),""!==P?a(P,r):M(S),_(!y)):_(!y)}},y?"Save Keyboard Shortcut":l.createElement(l.Fragment,null,l.createElement(u.Icon,{size:"small",icon:"Pencil1Icon"}),"Edit Keyboard Shortcut")))),y&&l.createElement(u.TextInput,{onKeyDown:e=>{if(x.size<4){e.preventDefault();const t=1===e.key.length?e.key.toUpperCase():e.key,n=new Set(x).add(t);O(n),(e=>{const t={Control:"Ctrl",Command:"Cmd"," ":"Space",ArrowUp:"Up",ArrowDown:"Down",ArrowLeft:"Left",ArrowRight:"Right"},n=Array.from(e).map((e=>t[e]||e)).join(" + ");M(n)})(n)}},onKeyUp:e=>{x.delete(1===e.key.length?e.key.toUpperCase():e.key),O(new Set(x))},ref:w,style:{marginTop:"5px"},value:P}))),c&&l.createElement(v,null,l.createElement(g,null,"Notification Center behavior when opened with a keyboard shortcut"),l.createElement(u.RadioGroup,{direction:"column",name:"clear-filters-on-shortcut-open",value:f?"reset":"remember",onChange:e=>i("reset"===e.target.value)},l.createElement(u.RadioInput,{label:"Remember previous state",value:"remember"}),l.createElement(u.RadioInput,{label:"Reset to default",value:"reset"}))),l.createElement(h,null,l.createElement(u.Button,{kind:"secondary",onClick:()=>{t(!1),i(!0),o(!0),a("",P),M(j)}},"Restore Default Preferences")))}))},6415:function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,o)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=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 o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.WebModalContextProvider=t.WebModalContext=void 0;const a=r(n(5932));t.WebModalContext=(0,a.createContext)({isMenuModalOpen:!1,setIsMenuModalOpen:()=>{},menuConfig:null,setMenuConfig:()=>{},isCustomReminderModalOpen:!1,setIsCustomReminderModalOpen:()=>{},customReminderConfig:null,setCustomReminderConfig:()=>{},isDatePickerModalOpen:!1,setIsDatePickerModalOpen:()=>{},datePickerConfig:null,setDatePickerConfig:()=>{},isTimePickerModalOpen:!1,setIsTimePickerModalOpen:()=>{},timePickerConfig:null,setTimePickerConfig:()=>{},modalType:null,setModalType:()=>{}}),t.WebModalContextProvider=({children:e})=>{const[n,i]=(0,a.useState)(!1),[o,r]=(0,a.useState)(null),[l,s]=(0,a.useState)(!1),[c,u]=(0,a.useState)(null),[d,f]=(0,a.useState)(!1),[p,h]=(0,a.useState)(null),[m,b]=(0,a.useState)(!1),[g,v]=(0,a.useState)(null),[y,_]=(0,a.useState)(null);return a.default.createElement(t.WebModalContext.Provider,{value:{isMenuModalOpen:n,menuConfig:o,setIsMenuModalOpen:i,setMenuConfig:r,isCustomReminderModalOpen:l,customReminderConfig:c,setIsCustomReminderModalOpen:s,setCustomReminderConfig:u,isDatePickerModalOpen:d,datePickerConfig:p,setIsDatePickerModalOpen:f,setDatePickerConfig:h,isTimePickerModalOpen:m,timePickerConfig:g,setIsTimePickerModalOpen:b,setTimePickerConfig:v,modalType:y,setModalType:_}},e)}},6430:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getFormikErrorCount=void 0,t.getFormikErrorCount=e=>{const{errors:t,touched:n}=e;return Object.entries(t).map((([e])=>n[e])).filter((e=>e)).length}},6451: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 o=i(n(7530)),r=n(5785),a=n(3816),l=n(9603);function s(){return(0,r.withStrictTimeout)(500,(0,a.tryServiceDispatch)(l.APITopic.GET_PROVIDER_STATUS,void 0),"").catch((()=>({connected:!1,version:null,templateAPIVersion:null})))}t.getStatus=s,t.isConnectedToAtLeast=async function(e){const t=await s();if(t.connected&&null!==t.version){const n=(0,o.default)(t.version,e);if(0===n||1===n)return!0}return!1}},6452:function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,o)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=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 o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Router=void 0;const a=r(n(5932)),l=n(260),s=n(978);t.Router=({history:e,routes:t=[]})=>a.createElement(s.Router,{history:e},a.createElement(l.Switch,null,t.map(c)));const c=e=>{const{path:t,exact:n,Component:i}=e;return a.createElement(l.Route,{key:t,component:i,exact:n,path:t})}},6455:(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"},6460:function(e,t,n){"use strict";var i=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 o=0;for(i=Object.getOwnPropertySymbols(e);o<i.length;o++)t.indexOf(i[o])<0&&Object.prototype.propertyIsEnumerable.call(e,i[o])&&(n[i[o]]=e[i[o]])}return n},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.FadeTransition=void 0;const r=o(n(5932)),a=o(n(2230)),l=n(524);t.FadeTransition=e=>{var{children:t}=e,n=i(e,["children"]);const o=r.default.useRef(null);return r.default.createElement(l.Transition,Object.assign({},n,{nodeRef:o}),(e=>r.default.createElement(s,{ref:o,state:e},t)))};const s=a.default.div`
834
834
  transition: 200ms;
835
835
  opacity: ${({state:e})=>"entered"===e?1:0};
836
836
  display: ${({state:e})=>"exited"===e?"none":"block"};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openfin/web-notifications",
3
- "version": "2.11.1",
3
+ "version": "2.12.0-alpha-4014",
4
4
  "description": "Here™ Web Notification Center",
5
5
  "main": "./dist/web/index.js",
6
6
  "types": "./dist/web/index.d.ts",
@@ -44,6 +44,6 @@
44
44
  "semver-compare": ">=1.0.0 <2.0.0",
45
45
  "styled-components": ">=5.3.11 <6.0.0",
46
46
  "yup": ">=0.32.9 <1.0.0",
47
- "@openfin/core": "41.102.4"
47
+ "@openfin/core": "41.102.2"
48
48
  }
49
49
  }