@openfin/web-notifications 2.12.0-alpha-4046 → 2.12.0-alpha-4052
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 +11 -4
- package/package.json +1 -1
package/dist/web/index.js
CHANGED
|
@@ -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.12.0-alpha-4046";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-4052";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.12.0-alpha-
|
|
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-4052"},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;
|
|
@@ -901,7 +901,7 @@
|
|
|
901
901
|
`},6766:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getInitialFormValues=void 0;const i=n(8912),o=n(4691),r=new Map;r.set(i.FieldType.date,(e=>(0,o.ensureCompleteDateFieldValue)(e.value))),r.set(i.FieldType.time,(e=>(0,o.ensureCompleteTimeFieldValue)(e.value))),t.getInitialFormValues=function(e){const t={};for(const n of e)if(r.has(n.type)){const e=r.get(n.type);t[n.key]=e&&e(n)}else t[n.key]=n.value;return t}},6812: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.TemplateCustomComponent=void 0;const o=i(n(5932)),r=n(2972),a=n(164),l=i(n(2230));t.TemplateCustomComponent=e=>{var t;const{notification:n,clickFragment:i,tabIndexOverride:l}=e,c=n.notification,u=null===(t=c.templateOptions.body.compositions[0])||void 0===t?void 0:t.layout,d=c.templateOptions.body.fallbackText;return u?o.default.createElement(o.default.Fragment,null,o.default.createElement(s,null,o.default.createElement(r.TemplateFragment,{fragment:u,templateData:c.templateData,fragmentIndex:0,notificationKey:`${n.id}${n.notification.date}`,clickFragment:i,tabIndexOverride:l})),n.notification.form&&o.default.createElement(a.NotificationForm,{templateContent:e.templateContent,notification:n,onSubmit:e.submitForm,isToast:e.isToast})):d?o.default.createElement(o.default.Fragment,null," ",d," "):o.default.createElement(o.default.Fragment,null)};const s=l.default.div`
|
|
902
902
|
padding-right: ${e=>e.theme.px.base};
|
|
903
903
|
padding-left: ${e=>e.theme.px.base};
|
|
904
|
-
`},6834: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.NotificationView=void 0;const l=r(n(5932)),s=n(9130),c=a(n(2230)),u=n(7250),d=n(4887),f=n(2191),p=n(3420),h=n(5228),m=n(6731),b=n(6460),g=n(524),v=n(8602),y=n(9136),_=n(7451),x=(0,c.default)(u.Box)`
|
|
904
|
+
`},6834: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.NotificationView=t.SrOnly=void 0;const l=r(n(5932)),s=n(9130),c=a(n(2230)),u=n(7250),d=n(4887),f=n(2191),p=n(3420),h=n(5228),m=n(6731),b=n(6460),g=n(524),v=n(8602),y=n(9136),_=n(7451),x=n(7451),O=(0,c.default)(u.Box)`
|
|
905
905
|
flex: 1;
|
|
906
906
|
user-select: none;
|
|
907
907
|
padding: ${({theme:e})=>e.px.large};
|
|
@@ -909,7 +909,14 @@
|
|
|
909
909
|
flex-direction: column;
|
|
910
910
|
overflow-x: hidden;
|
|
911
911
|
overflow-y: overlay;
|
|
912
|
-
`;t.NotificationView=(0,s.connect)((e=>({platform:e.platform.selected,selectedCategory:e.categories.selectedCategory,sortMethod:e.categories.sortType,sortDirection:e.categories.sortDirection})),(e=>({setFocusedNotification:t=>{e(new v.SetFocusedNotification(t))},raiseAnalyticsEvent:async(t,n)=>e(new _.RaiseAnalyticsEvent(t,n))})))((({notifications:e,reminders:t,searchMode:n,searchString:i,applications:o,streams:r,id:a,selectedCategory:s,platform:c,setFocusedNotification:u,sortMethod:v,sortDirection:_,raiseAnalyticsEvent:O})=>{const w=(0,l.useMemo)((()=>(0,f.generateGroups)({notifications:"reminders"===s?t:e,applications:o,streams:r,selectedCategory:s,sortType:v,sortDirection:_})),[e,t,o,r,s,v,_]),C=l.default.useContext(y.WindowContext),j=(0,f.isLayered)(w)?w.layers.length:w.sections.length,S=`${c}-${s}-${v}-${_}-${!!j}`,P=(0,l.useCallback)((e=>t=>n=>{var i,o;const r=e=>{null==O||O({type:"Center",action:"Keystroke",value:e,skipValueHashing:!0})},a=(0,f.isLayered)(w)?null===(o=w.layers.find((t=>t.key===e)))||void 0===o?void 0:o.sections.reduce(((e,t)=>[...e,...t.notifications]),[]):null===(i=w.sections.find((t=>t.key===e)))||void 0===i?void 0:i.notifications;if(a)if(t){const e=a.findIndex((e=>e.id===t));if("ArrowDown"===n.key)n.preventDefault(),e!==a.length-1&&(u(a[e+1].id),r("ArrowDown"));else if("ArrowUp"===n.key)n.preventDefault(),0!==e&&(u(a[e-1].id),r("ArrowUp"));else if("_Delete"===n.key){const e=e=>e.flatMap((e=>e.notifications)),n=(0,f.isLayered)(w)?e(w.layers.flatMap((e=>e.sections))):e(w.sections),i=n.findIndex((e=>e.id===t)),o=n.filter((e=>e.id!==t)),a=o.length>=i+1?o[i]:o[o.length-1];u(null==a?void 0:a.id),r("_Delete")}}else"ArrowDown"===n.key&&(n.preventDefault(),u(a[0].id),r("ArrowDown"))}),[w]);return(0,l.useEffect)((()=>{const e=e=>{var t,n,i,o;if("t"===e.key&&e.ctrlKey){const e=(0,f.isLayered)(w)?null===(o=null===(i=w.layers[0])||void 0===i?void 0:i.sections[0].notifications)||void 0===o?void 0:o[0]:null===(n=null===(t=w.sections[0])||void 0===t?void 0:t.notifications)||void 0===n?void 0:n[0];e&&(u(e.id),null==O||O({type:"Notification",action:"Keystroke",value:"ctrl + t",skipValueHashing:!0}))}};return C.document.addEventListener("keydown",e),()=>{C.document.removeEventListener("keydown",e)}}),[w]),l.default.createElement(x,{"data-scrollable-container":"true",className:"view",id:a,tabIndex:-1,role:"list","aria-label":"Notifications Groups"},n&&i.length>=d.minSearchStringLength&&l.default.createElement(p.SearchResults,null),i.length<d.minSearchStringLength&&l.default.createElement(g.SwitchTransition,{mode:"out-in"},l.default.createElement(b.FadeTransition,{key:S,timeout:100,mountOnEnter:!0,unmountOnExit:!0},j?l.default.createElement(m.Groups,{groupData:w,onKeyDown:P}):l.default.createElement(h.EmptyNotificationListCard,null))))}))},6858:function(e,t,n){"use strict";var i=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},o=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0}),t.WebStore=void 0;const r=n(4352),a=n(2903),l=n(8281);let s=class extends l.Store{constructor(){super(Object.assign(Object.assign({},a.initialState),{centerVisible:!0,mode:"web"}))}async init(){}};s=i([(0,r.injectable)(),o("design:paramtypes",[])],s),t.WebStore=s},6865:(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",n.ORANGE="orange",n.MAGENTA="magenta",n.TEAL="teal"},6906: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.CheckboxGroupWidgetComponent=void 0;const a=r(n(5932)),l=n(7250),s=n(258),c=n(7260),u=n(1971),d=n(5232),f=n(5484);t.CheckboxGroupWidgetComponent=e=>a.default.createElement(s.Field,{name:e.field.key,component:p,checkboxGroupField:e.field,formSettings:e.formSettings,raiseAnalytics:e.raiseAnalytics});const p=({checkboxGroupField:e,field:t,form:n,formSettings:i,raiseAnalytics:o})=>{const r=e.widget.group.map((e=>({value:e.value,clicked:!1}))),s=(0,a.useRef)(r);return(0,f.useRaiseFieldAnalytics)(e,o,void 0,s),a.default.createElement(c.InputContainer,{flexDirection:"column"},a.default.createElement(l.CheckboxGroup,{label:(0,d.getLabelText)(e,i),helperText:e.helperText,onChange:t=>{n.setFieldTouched(e.key,!0),n.setFieldValue(e.key,t.length>0?t:void 0)},values:t.value,key:`${t.name}-${t.value}`},e.widget.group.map((n=>{var i;return a.default.createElement(l.Checkbox,{name:`${e.key}_${n.value}`,key:`${e.key}_${n.value}`,checked:-1!==(null===(i=t.value)||void 0===i?void 0:i.indexOf(n.value)),label:n.label,value:n.value})}))),a.default.createElement(u.ErrorLabel,{name:t.name}))}},6975:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.unsubscribeScrollableContainers=t.subscribeScrollableContainers=void 0,t.subscribeScrollableContainers=(e,t)=>{let n=e.parentElement;for(;n;)"true"===n.getAttribute("data-scrollable-container")&&n.addEventListener("scroll",t),n=n.parentElement},t.unsubscribeScrollableContainers=(e,t)=>{let n=e.parentElement;for(;n;)"true"===n.getAttribute("data-scrollable-container")&&n.removeEventListener("scroll",t),n=n.parentElement}},6992:e=>{"use strict";e.exports=v},7007: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 o=Number.isNaN||function(e){return e!=e};function r(){r.init.call(this)}e.exports=r,e.exports.once=function(e,t){return new Promise((function(n,i){function o(n){e.removeListener(t,r),i(n)}function r(){"function"==typeof e.removeListener&&e.removeListener("error",o),n([].slice.call(arguments))}m(e,t,r,{once:!0}),"error"!==t&&function(e,t){"function"==typeof e.on&&m(e,"error",t,{once:!0})}(e,o)}))},r.EventEmitter=r,r.prototype._events=void 0,r.prototype._eventsCount=0,r.prototype._maxListeners=void 0;var a=10;function l(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function s(e){return void 0===e._maxListeners?r.defaultMaxListeners:e._maxListeners}function c(e,t,n,i){var o,r,a,c;if(l(n),void 0===(r=e._events)?(r=e._events=Object.create(null),e._eventsCount=0):(void 0!==r.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),r=e._events),a=r[t]),void 0===a)a=r[t]=n,++e._eventsCount;else if("function"==typeof a?a=r[t]=i?[n,a]:[a,n]:i?a.unshift(n):a.push(n),(o=s(e))>0&&a.length>o&&!a.warned){a.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=e,u.type=t,u.count=a.length,c=u,console&&console.warn&&console.warn(c)}return e}function u(){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 d(e,t,n){var i={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},o=u.bind(i);return o.listener=n,i.wrapFn=o,o}function f(e,t,n){var i=e._events;if(void 0===i)return[];var o=i[t];return void 0===o?[]:"function"==typeof o?n?[o.listener||o]:[o]: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}(o):h(o,o.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 h(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 o(r){i.once&&e.removeEventListener(t,o),n(r)}))}}Object.defineProperty(r,"defaultMaxListeners",{enumerable:!0,get:function(){return a},set:function(e){if("number"!=typeof e||e<0||o(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");a=e}}),r.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},r.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||o(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},r.prototype.getMaxListeners=function(){return s(this)},r.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var o="error"===e,r=this._events;if(void 0!==r)o=o&&void 0===r.error;else if(!o)return!1;if(o){var a;if(t.length>0&&(a=t[0]),a instanceof Error)throw a;var l=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw l.context=a,l}var s=r[e];if(void 0===s)return!1;if("function"==typeof s)i(s,this,t);else{var c=s.length,u=h(s,c);for(n=0;n<c;++n)i(u[n],this,t)}return!0},r.prototype.addListener=function(e,t){return c(this,e,t,!1)},r.prototype.on=r.prototype.addListener,r.prototype.prependListener=function(e,t){return c(this,e,t,!0)},r.prototype.once=function(e,t){return l(t),this.on(e,d(this,e,t)),this},r.prototype.prependOnceListener=function(e,t){return l(t),this.prependListener(e,d(this,e,t)),this},r.prototype.removeListener=function(e,t){var n,i,o,r,a;if(l(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(o=-1,r=n.length-1;r>=0;r--)if(n[r]===t||n[r].listener===t){a=n[r].listener,o=r;break}if(o<0)return this;0===o?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,o),1===n.length&&(i[e]=n[0]),void 0!==i.removeListener&&this.emit("removeListener",e,a||t)}return this},r.prototype.off=r.prototype.removeListener,r.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 o,r=Object.keys(n);for(i=0;i<r.length;++i)"removeListener"!==(o=r[i])&&this.removeAllListeners(o);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},r.prototype.listeners=function(e){return f(this,e,!0)},r.prototype.rawListeners=function(e){return f(this,e,!1)},r.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):p.call(e,t)},r.prototype.listenerCount=p,r.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},7010:function(e,t,n){"use strict";var i,o=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},r=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},a=this&&this.__param||function(e,t){return function(n,i){t(n,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.Scheduler=void 0;const l=n(4352),s=n(6566),c=n(8004),u=n(7451),d=n(8320),f=n(2645),p=2147483646;let h=class{constructor(e){this._active=!0,this._nextAction=null,this._store=e,this._store.onAction.add(this.onAction,this),f.InjectorBase.initialized.then((()=>{this.scheduleEarliestAction(Date.now())}))}scheduleEarliestAction(e){const t=this.generateNextClassifier();null!==t&&this.scheduleAction(t,e)}scheduleAction(e,t){this._active&&(e.timestamp<=t?this.executeAction(e,t):(this._nextAction&&window.clearTimeout(this._nextAction.timerHandle),this._nextAction=Object.assign(Object.assign({},e),{timerHandle:this.safeDelay((()=>{this.executeAction(e,e.timestamp)}),e.timestamp,t)})))}async executeAction(e,t){this._nextAction&&this._nextAction.target.id===e.target.id&&(this._nextAction=null),"Expiry"===e.type?await this._store.dispatch(new u.ExpireNotification(e.target)):await this._store.dispatch(new d.TimeoutReminder(e.target.id)),this.scheduleEarliestAction(t)}async onAction(e){e instanceof u.CreateNotification?this.onAddNotification(e.notification):e instanceof u.RemoveNotifications?this.onRemoveNotifications(e.notifications):e instanceof d.SetReminder?this.onSetReminder(e.reminder,e.reminder.modifiers.reminder):e instanceof d.CancelReminder?this.onCancelReminder(e.reminder):e instanceof u.Freeze?this.onFreeze():e instanceof u.Unfreeze?this.onUnfreeze():e instanceof u.ApplySnapshot&&this.scheduleEarliestAction(Date.now())}onSetReminder(e,t){var n;(!this._nextAction||t<this._nextAction.timestamp)&&this.scheduleAction({type:"Reminder",target:Object.assign(Object.assign({},e),{modifiers:Object.assign(Object.assign({},null!==(n=e.modifiers)&&void 0!==n?n:{}),{reminder:t})}),timestamp:t},Date.now())}onCancelReminder(e){this._nextAction&&"Reminder"==this._nextAction.type&&this._nextAction.target.id===e.id&&this.reschedule()}onAddNotification(e){m(e)&&(!this._nextAction||e.notification.expires<this._nextAction.timestamp)&&this.scheduleAction({type:"Expiry",target:e,timestamp:e.notification.expires},Date.now())}onRemoveNotifications(e){const t=e.filter(m);this._nextAction&&t.some((e=>{var t;return e.id===(null===(t=this._nextAction)||void 0===t?void 0:t.target.id)}))&&this.reschedule()}reschedule(){var e;window.clearTimeout(null===(e=this._nextAction)||void 0===e?void 0:e.timerHandle),this._nextAction=null,this.scheduleEarliestAction(Date.now())}onFreeze(){this._active=!1,this._nextAction&&(window.clearTimeout(this._nextAction.timerHandle),this._nextAction=null)}onUnfreeze(){this._active=!0,this.scheduleEarliestAction(Date.now())}safeDelay(e,t,n){return t-n>p?window.setTimeout((()=>{this.safeDelay(e,t,n+p)}),p):window.setTimeout((()=>{e()}),t-n)}generateNextClassifier(){return[...this._store.state.notifications.filter(m).map((e=>({type:"Expiry",target:e,timestamp:e.notification.expires}))),...this._store.state.reminders.map((e=>({type:"Reminder",target:e,timestamp:e.modifiers.reminder})))].reduce(((e,t)=>!e||t.timestamp<e.timestamp?t:e),null)}};function m(e){return null!==e.notification.expires}h=o([(0,l.injectable)(),a(0,(0,l.inject)(c.Inject.STORE)),r("design:paramtypes",["function"==typeof(i=void 0!==s.Store&&s.Store)?i:Object])],h),t.Scheduler=h},7031:(e,t)=>{"use strict";function n(e,t){var n,i,o;return"list"===t.template&&"list"===e.template?{list:null!==(n=t.list)&&void 0!==n?n:e.list}:"markdown"===t.template&&"markdown"===e.template?{body:null!==(i=t.body)&&void 0!==i?i:e.body}:"custom"===t.template&&"custom"===e.template?{templateData:null!==(o=t.templateData)&&void 0!==o?o:e.templateData}:{}}Object.defineProperty(t,"__esModule",{value:!0}),t.updateCollection=void 0,t.updateCollection=function(e,t){var i,o,r,a,l;const s=e.findIndex((e=>e.notification.id===t.id));if(-1===s)return null;const c=e[s],u=c.notification;return e[s]=Object.assign(Object.assign({},c),{bodyText:null!==(i=t.bodyText)&&void 0!==i?i:c.bodyText,notification:Object.assign(Object.assign(Object.assign({},u),{buttons:null!==(o=t.buttons)&&void 0!==o?o:u.buttons,customData:null!==(r=t.customData)&&void 0!==r?r:u.customData}),n(u,t)),modifiers:Object.assign(Object.assign({},c.modifiers),{revision:(null!==(l=null===(a=c.modifiers)||void 0===a?void 0:a.revision)&&void 0!==l?l:0)+1})}),e[s]}},7049:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.usePosition=void 0;const i=n(5932),o=n(8899),r=n(9136);t.usePosition=()=>{const e=(0,i.useContext)(r.WindowContext);return[(0,i.useCallback)((t=>{if(t){const n={left:e.screenX,top:e.screenY,width:e.outerWidth,height:e.outerHeight},i=t.getBoundingClientRect();return(0,o.alignModalToParent)(n,{left:i.left,top:i.top,width:i.right-i.left,height:i.bottom-i.top})}return null}),[e])]}},7202:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.Inject=void 0,function(e){e[e.STORE=0]="STORE",e[e.SCHEDULER=1]="SCHEDULER",e[e.API_HANDLER=2]="API_HANDLER",e[e.CLIENT_CONTOLLER=3]="CLIENT_CONTOLLER"}(n||(n={})),t.Inject=Object.keys(n).filter((e=>"string"==typeof e)).reduce(((e,t)=>(e[t]=t,e)),{})},7204:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},7207: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.Card=void 0;const o=n(9690),r=n(7250),a=i(n(2230));t.Card=(0,a.default)(r.Box)`
|
|
912
|
+
`;t.SrOnly=c.default.p`
|
|
913
|
+
position: absolute;
|
|
914
|
+
width: 1px;
|
|
915
|
+
height: 1px;
|
|
916
|
+
padding: 0;
|
|
917
|
+
margin: -1px;
|
|
918
|
+
overflow: hidden;
|
|
919
|
+
`,t.NotificationView=(0,s.connect)((e=>({platform:e.platform.selected,selectedCategory:e.categories.selectedCategory,sortMethod:e.categories.sortType,sortDirection:e.categories.sortDirection,searchResults:(0,x.selectPlatformSearchResults)(e),searching:e.search.searching})),(e=>({setFocusedNotification:t=>{e(new v.SetFocusedNotification(t))},raiseAnalyticsEvent:async(t,n)=>e(new _.RaiseAnalyticsEvent(t,n))})))((({notifications:e,reminders:n,searchMode:i,searchString:o,applications:r,streams:a,id:s,selectedCategory:c,platform:u,setFocusedNotification:v,sortMethod:_,sortDirection:x,raiseAnalyticsEvent:w,searchResults:C,searching:j})=>{const[S,P]=l.default.useState("");l.default.useEffect((()=>{i?j?P("Searching..."):o.length<d.minSearchStringLength?P(""):0===C.length&&o?P(`No results for ${o}`):C.length>0&&o&&P(`${C.length} result${C.length>1?"s":""} found for ${o}`):P("")}),[C,o,j,i]);const M=(0,l.useMemo)((()=>(0,f.generateGroups)({notifications:"reminders"===c?n:e,applications:r,streams:a,selectedCategory:c,sortType:_,sortDirection:x})),[e,n,r,a,c,_,x]),E=l.default.useContext(y.WindowContext),T=(0,f.isLayered)(M)?M.layers.length:M.sections.length,k=`${u}-${c}-${_}-${x}-${!!T}`,I=(0,l.useCallback)((e=>t=>n=>{var i,o;const r=e=>{null==w||w({type:"Center",action:"Keystroke",value:e,skipValueHashing:!0})},a=(0,f.isLayered)(M)?null===(o=M.layers.find((t=>t.key===e)))||void 0===o?void 0:o.sections.reduce(((e,t)=>[...e,...t.notifications]),[]):null===(i=M.sections.find((t=>t.key===e)))||void 0===i?void 0:i.notifications;if(a)if(t){const e=a.findIndex((e=>e.id===t));if("ArrowDown"===n.key)n.preventDefault(),e!==a.length-1&&(v(a[e+1].id),r("ArrowDown"));else if("ArrowUp"===n.key)n.preventDefault(),0!==e&&(v(a[e-1].id),r("ArrowUp"));else if("_Delete"===n.key){const e=e=>e.flatMap((e=>e.notifications)),n=(0,f.isLayered)(M)?e(M.layers.flatMap((e=>e.sections))):e(M.sections),i=n.findIndex((e=>e.id===t)),o=n.filter((e=>e.id!==t)),a=o.length>=i+1?o[i]:o[o.length-1];v(null==a?void 0:a.id),r("_Delete")}}else"ArrowDown"===n.key&&(n.preventDefault(),v(a[0].id),r("ArrowDown"))}),[M]);return(0,l.useEffect)((()=>{const e=e=>{var t,n,i,o;if("t"===e.key&&e.ctrlKey){const e=(0,f.isLayered)(M)?null===(o=null===(i=M.layers[0])||void 0===i?void 0:i.sections[0].notifications)||void 0===o?void 0:o[0]:null===(n=null===(t=M.sections[0])||void 0===t?void 0:t.notifications)||void 0===n?void 0:n[0];e&&(v(e.id),null==w||w({type:"Notification",action:"Keystroke",value:"ctrl + t",skipValueHashing:!0}))}};return E.document.addEventListener("keydown",e),()=>{E.document.removeEventListener("keydown",e)}}),[M]),l.default.createElement(O,{"data-scrollable-container":"true",className:"view",id:s,tabIndex:-1,role:"list","aria-label":"Notifications Groups"},l.default.createElement(t.SrOnly,{"aria-live":"polite",role:"status"},S),i&&o.length>=d.minSearchStringLength&&l.default.createElement(p.SearchResults,null),o.length<d.minSearchStringLength&&l.default.createElement(g.SwitchTransition,{mode:"out-in"},l.default.createElement(b.FadeTransition,{key:k,timeout:100,mountOnEnter:!0,unmountOnExit:!0},T?l.default.createElement(m.Groups,{groupData:M,onKeyDown:I}):l.default.createElement(h.EmptyNotificationListCard,null))))}))},6858:function(e,t,n){"use strict";var i=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},o=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0}),t.WebStore=void 0;const r=n(4352),a=n(2903),l=n(8281);let s=class extends l.Store{constructor(){super(Object.assign(Object.assign({},a.initialState),{centerVisible:!0,mode:"web"}))}async init(){}};s=i([(0,r.injectable)(),o("design:paramtypes",[])],s),t.WebStore=s},6865:(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",n.ORANGE="orange",n.MAGENTA="magenta",n.TEAL="teal"},6906: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.CheckboxGroupWidgetComponent=void 0;const a=r(n(5932)),l=n(7250),s=n(258),c=n(7260),u=n(1971),d=n(5232),f=n(5484);t.CheckboxGroupWidgetComponent=e=>a.default.createElement(s.Field,{name:e.field.key,component:p,checkboxGroupField:e.field,formSettings:e.formSettings,raiseAnalytics:e.raiseAnalytics});const p=({checkboxGroupField:e,field:t,form:n,formSettings:i,raiseAnalytics:o})=>{const r=e.widget.group.map((e=>({value:e.value,clicked:!1}))),s=(0,a.useRef)(r);return(0,f.useRaiseFieldAnalytics)(e,o,void 0,s),a.default.createElement(c.InputContainer,{flexDirection:"column"},a.default.createElement(l.CheckboxGroup,{label:(0,d.getLabelText)(e,i),helperText:e.helperText,onChange:t=>{n.setFieldTouched(e.key,!0),n.setFieldValue(e.key,t.length>0?t:void 0)},values:t.value,key:`${t.name}-${t.value}`},e.widget.group.map((n=>{var i;return a.default.createElement(l.Checkbox,{name:`${e.key}_${n.value}`,key:`${e.key}_${n.value}`,checked:-1!==(null===(i=t.value)||void 0===i?void 0:i.indexOf(n.value)),label:n.label,value:n.value})}))),a.default.createElement(u.ErrorLabel,{name:t.name}))}},6975:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.unsubscribeScrollableContainers=t.subscribeScrollableContainers=void 0,t.subscribeScrollableContainers=(e,t)=>{let n=e.parentElement;for(;n;)"true"===n.getAttribute("data-scrollable-container")&&n.addEventListener("scroll",t),n=n.parentElement},t.unsubscribeScrollableContainers=(e,t)=>{let n=e.parentElement;for(;n;)"true"===n.getAttribute("data-scrollable-container")&&n.removeEventListener("scroll",t),n=n.parentElement}},6992:e=>{"use strict";e.exports=v},7007: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 o=Number.isNaN||function(e){return e!=e};function r(){r.init.call(this)}e.exports=r,e.exports.once=function(e,t){return new Promise((function(n,i){function o(n){e.removeListener(t,r),i(n)}function r(){"function"==typeof e.removeListener&&e.removeListener("error",o),n([].slice.call(arguments))}m(e,t,r,{once:!0}),"error"!==t&&function(e,t){"function"==typeof e.on&&m(e,"error",t,{once:!0})}(e,o)}))},r.EventEmitter=r,r.prototype._events=void 0,r.prototype._eventsCount=0,r.prototype._maxListeners=void 0;var a=10;function l(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function s(e){return void 0===e._maxListeners?r.defaultMaxListeners:e._maxListeners}function c(e,t,n,i){var o,r,a,c;if(l(n),void 0===(r=e._events)?(r=e._events=Object.create(null),e._eventsCount=0):(void 0!==r.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),r=e._events),a=r[t]),void 0===a)a=r[t]=n,++e._eventsCount;else if("function"==typeof a?a=r[t]=i?[n,a]:[a,n]:i?a.unshift(n):a.push(n),(o=s(e))>0&&a.length>o&&!a.warned){a.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=e,u.type=t,u.count=a.length,c=u,console&&console.warn&&console.warn(c)}return e}function u(){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 d(e,t,n){var i={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},o=u.bind(i);return o.listener=n,i.wrapFn=o,o}function f(e,t,n){var i=e._events;if(void 0===i)return[];var o=i[t];return void 0===o?[]:"function"==typeof o?n?[o.listener||o]:[o]: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}(o):h(o,o.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 h(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 o(r){i.once&&e.removeEventListener(t,o),n(r)}))}}Object.defineProperty(r,"defaultMaxListeners",{enumerable:!0,get:function(){return a},set:function(e){if("number"!=typeof e||e<0||o(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");a=e}}),r.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},r.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||o(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},r.prototype.getMaxListeners=function(){return s(this)},r.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var o="error"===e,r=this._events;if(void 0!==r)o=o&&void 0===r.error;else if(!o)return!1;if(o){var a;if(t.length>0&&(a=t[0]),a instanceof Error)throw a;var l=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw l.context=a,l}var s=r[e];if(void 0===s)return!1;if("function"==typeof s)i(s,this,t);else{var c=s.length,u=h(s,c);for(n=0;n<c;++n)i(u[n],this,t)}return!0},r.prototype.addListener=function(e,t){return c(this,e,t,!1)},r.prototype.on=r.prototype.addListener,r.prototype.prependListener=function(e,t){return c(this,e,t,!0)},r.prototype.once=function(e,t){return l(t),this.on(e,d(this,e,t)),this},r.prototype.prependOnceListener=function(e,t){return l(t),this.prependListener(e,d(this,e,t)),this},r.prototype.removeListener=function(e,t){var n,i,o,r,a;if(l(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(o=-1,r=n.length-1;r>=0;r--)if(n[r]===t||n[r].listener===t){a=n[r].listener,o=r;break}if(o<0)return this;0===o?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,o),1===n.length&&(i[e]=n[0]),void 0!==i.removeListener&&this.emit("removeListener",e,a||t)}return this},r.prototype.off=r.prototype.removeListener,r.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 o,r=Object.keys(n);for(i=0;i<r.length;++i)"removeListener"!==(o=r[i])&&this.removeAllListeners(o);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},r.prototype.listeners=function(e){return f(this,e,!0)},r.prototype.rawListeners=function(e){return f(this,e,!1)},r.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):p.call(e,t)},r.prototype.listenerCount=p,r.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},7010:function(e,t,n){"use strict";var i,o=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},r=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},a=this&&this.__param||function(e,t){return function(n,i){t(n,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.Scheduler=void 0;const l=n(4352),s=n(6566),c=n(8004),u=n(7451),d=n(8320),f=n(2645),p=2147483646;let h=class{constructor(e){this._active=!0,this._nextAction=null,this._store=e,this._store.onAction.add(this.onAction,this),f.InjectorBase.initialized.then((()=>{this.scheduleEarliestAction(Date.now())}))}scheduleEarliestAction(e){const t=this.generateNextClassifier();null!==t&&this.scheduleAction(t,e)}scheduleAction(e,t){this._active&&(e.timestamp<=t?this.executeAction(e,t):(this._nextAction&&window.clearTimeout(this._nextAction.timerHandle),this._nextAction=Object.assign(Object.assign({},e),{timerHandle:this.safeDelay((()=>{this.executeAction(e,e.timestamp)}),e.timestamp,t)})))}async executeAction(e,t){this._nextAction&&this._nextAction.target.id===e.target.id&&(this._nextAction=null),"Expiry"===e.type?await this._store.dispatch(new u.ExpireNotification(e.target)):await this._store.dispatch(new d.TimeoutReminder(e.target.id)),this.scheduleEarliestAction(t)}async onAction(e){e instanceof u.CreateNotification?this.onAddNotification(e.notification):e instanceof u.RemoveNotifications?this.onRemoveNotifications(e.notifications):e instanceof d.SetReminder?this.onSetReminder(e.reminder,e.reminder.modifiers.reminder):e instanceof d.CancelReminder?this.onCancelReminder(e.reminder):e instanceof u.Freeze?this.onFreeze():e instanceof u.Unfreeze?this.onUnfreeze():e instanceof u.ApplySnapshot&&this.scheduleEarliestAction(Date.now())}onSetReminder(e,t){var n;(!this._nextAction||t<this._nextAction.timestamp)&&this.scheduleAction({type:"Reminder",target:Object.assign(Object.assign({},e),{modifiers:Object.assign(Object.assign({},null!==(n=e.modifiers)&&void 0!==n?n:{}),{reminder:t})}),timestamp:t},Date.now())}onCancelReminder(e){this._nextAction&&"Reminder"==this._nextAction.type&&this._nextAction.target.id===e.id&&this.reschedule()}onAddNotification(e){m(e)&&(!this._nextAction||e.notification.expires<this._nextAction.timestamp)&&this.scheduleAction({type:"Expiry",target:e,timestamp:e.notification.expires},Date.now())}onRemoveNotifications(e){const t=e.filter(m);this._nextAction&&t.some((e=>{var t;return e.id===(null===(t=this._nextAction)||void 0===t?void 0:t.target.id)}))&&this.reschedule()}reschedule(){var e;window.clearTimeout(null===(e=this._nextAction)||void 0===e?void 0:e.timerHandle),this._nextAction=null,this.scheduleEarliestAction(Date.now())}onFreeze(){this._active=!1,this._nextAction&&(window.clearTimeout(this._nextAction.timerHandle),this._nextAction=null)}onUnfreeze(){this._active=!0,this.scheduleEarliestAction(Date.now())}safeDelay(e,t,n){return t-n>p?window.setTimeout((()=>{this.safeDelay(e,t,n+p)}),p):window.setTimeout((()=>{e()}),t-n)}generateNextClassifier(){return[...this._store.state.notifications.filter(m).map((e=>({type:"Expiry",target:e,timestamp:e.notification.expires}))),...this._store.state.reminders.map((e=>({type:"Reminder",target:e,timestamp:e.modifiers.reminder})))].reduce(((e,t)=>!e||t.timestamp<e.timestamp?t:e),null)}};function m(e){return null!==e.notification.expires}h=o([(0,l.injectable)(),a(0,(0,l.inject)(c.Inject.STORE)),r("design:paramtypes",["function"==typeof(i=void 0!==s.Store&&s.Store)?i:Object])],h),t.Scheduler=h},7031:(e,t)=>{"use strict";function n(e,t){var n,i,o;return"list"===t.template&&"list"===e.template?{list:null!==(n=t.list)&&void 0!==n?n:e.list}:"markdown"===t.template&&"markdown"===e.template?{body:null!==(i=t.body)&&void 0!==i?i:e.body}:"custom"===t.template&&"custom"===e.template?{templateData:null!==(o=t.templateData)&&void 0!==o?o:e.templateData}:{}}Object.defineProperty(t,"__esModule",{value:!0}),t.updateCollection=void 0,t.updateCollection=function(e,t){var i,o,r,a,l;const s=e.findIndex((e=>e.notification.id===t.id));if(-1===s)return null;const c=e[s],u=c.notification;return e[s]=Object.assign(Object.assign({},c),{bodyText:null!==(i=t.bodyText)&&void 0!==i?i:c.bodyText,notification:Object.assign(Object.assign(Object.assign({},u),{buttons:null!==(o=t.buttons)&&void 0!==o?o:u.buttons,customData:null!==(r=t.customData)&&void 0!==r?r:u.customData}),n(u,t)),modifiers:Object.assign(Object.assign({},c.modifiers),{revision:(null!==(l=null===(a=c.modifiers)||void 0===a?void 0:a.revision)&&void 0!==l?l:0)+1})}),e[s]}},7049:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.usePosition=void 0;const i=n(5932),o=n(8899),r=n(9136);t.usePosition=()=>{const e=(0,i.useContext)(r.WindowContext);return[(0,i.useCallback)((t=>{if(t){const n={left:e.screenX,top:e.screenY,width:e.outerWidth,height:e.outerHeight},i=t.getBoundingClientRect();return(0,o.alignModalToParent)(n,{left:i.left,top:i.top,width:i.right-i.left,height:i.bottom-i.top})}return null}),[e])]}},7202:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.Inject=void 0,function(e){e[e.STORE=0]="STORE",e[e.SCHEDULER=1]="SCHEDULER",e[e.API_HANDLER=2]="API_HANDLER",e[e.CLIENT_CONTOLLER=3]="CLIENT_CONTOLLER"}(n||(n={})),t.Inject=Object.keys(n).filter((e=>"string"==typeof e)).reduce(((e,t)=>(e[t]=t,e)),{})},7204:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},7207: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.Card=void 0;const o=n(9690),r=n(7250),a=i(n(2230));t.Card=(0,a.default)(r.Box)`
|
|
913
920
|
flex-direction: column;
|
|
914
921
|
user-select: none;
|
|
915
922
|
width: 312px;
|