@openfin/web-notifications 2.12.0-alpha-4023 → 2.12.0-alpha-4035
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 +25 -11
- 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-4023";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-4035";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};
|
|
@@ -363,7 +363,7 @@
|
|
|
363
363
|
display: block;
|
|
364
364
|
overflow: hidden;
|
|
365
365
|
height: ${({theme:e})=>e.unit.base+1}px;
|
|
366
|
-
`,c=(0,r.default)(a.Icon).attrs({icon:"CheckIcon",size:"base"})``,u=(0,r.default)(a.Loader).attrs({size:"base"})``},2207:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getZonedDate=t.localTimeString=t.localDateString=t.formatLines=t.getDate=t.getDateTitle=void 0;const i=n(5738),o=n(5904);function r(e,t){const n=new Date(e),o=new Date,r=Math.abs((0,i.differenceInMinutes)(n,o));return r<1?"now":r<60||!t&&n>o?function(e,t){const n=(0,i.formatDistanceStrict)(e,t,{addSuffix:!0}).replace(/ minutes| minute/g,"m");return"60m ago"===n?(0,i.format)(e,"p"):"in 60m"===n?"in 1 hour":n}(n,o):function(e,t,n){const o=(0,i.differenceInHours)(t,e),r=(0,i.differenceInCalendarDays)(t,e);return Math.abs((0,i.differenceInMinutes)(t,e))>=60&&0===r?`${n?"at ":""}${(0,i.format)(e,"p")}`:1===r||o>24&&r<=6?`${n?"at ":""}${(0,i.format)(e,n?"p, EEE":"EEE, p")}`:`${n?"at ":""}${(0,i.format)(e,n?"p, MMM d":"MMM d, p")}`}(n,o,t)}function a(e){return(0,o.toZonedTime)(null!=e?e:Date.now(),Intl.DateTimeFormat().resolvedOptions().timeZone)}t.getDateTitle=function(e){const t=new Date(e),n=new Date,o=(0,i.differenceInCalendarDays)(n,t);return 0===o?"Today":1===o?"Yesterday":-1===o?"Tomorrow":o>0&&o<=6?`Last ${(0,i.format)(t,"EEEE")}`:o<0&&o>=-6?(0,i.format)(t,"EEEE"):(0,i.format)(t,"MMMM d, yyyy")},t.getDate=r,t.formatLines=function(e,t){if(t){if(t>=Date.now()){const e=r(t,!0);return"at"===e.substring(0,2)?["Reminding at",e.substring(3)]:[`Reminding ${e}`,null]}return[`Reminded ${r(t,!0)}`,`Sent ${r(e,!0)}`]}return[r(e),null]},t.localDateString=function(e){const t=null!=e?e:Date.now();return(0,i.formatISO)(a(t)).substring(0,10)},t.localTimeString=function(e){const t=null!=e?e:Date.now();return(0,i.formatISO)(a(t)).substring(11,16)},t.getZonedDate=a},2230:e=>{"use strict";e.exports=c},2362:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hydrateUpdateNotification=void 0;const i=n(2867),o=n(5996),r=n(611);t.hydrateUpdateNotification=function(e,t){const n=(0,r.getTemplateSchema)(e).validateSync(e,t),a=(0,o.isTemplate)(n,"markdown")?(0,i.getMarkdownTextContent)(n.body):"";return Object.assign(Object.assign({},n),{bodyText:a,body:n.body})}},2373:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Timer=void 0,t.Timer=class{constructor(e){this._duration=e}start(e){this.clear(),this._timeoutHandle=window.setTimeout((()=>{this._timeoutHandle=void 0,null==e||e()}),this._duration)}clear(){void 0!==this._timeoutHandle&&window.clearTimeout(this._timeoutHandle),this._timeoutHandle=void 0}get running(){return void 0!==this._timeoutHandle}}},2391: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.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||i(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(6630),t),o(n(2874),t)},2425:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.makePresetTimeSpanOptions=t.isPresetTimeSpan=void 0;const i=n(5738);t.isPresetTimeSpan=function(e){return e&&"object"==typeof e&&"timeSpan"in e&&"event"in e},t.makePresetTimeSpanOptions=function(e){return[[{title:"5 min",value:{event:"5 min",timeSpan:(0,i.minutesToMilliseconds)(5)}},{title:"15 min",value:{event:"15 min",timeSpan:(0,i.minutesToMilliseconds)(15)}},{title:"30 min",value:{event:"30 min",timeSpan:(0,i.minutesToMilliseconds)(30)}},{title:"1 hour",value:{event:"1 hour",timeSpan:(0,i.minutesToMilliseconds)(60)}},{title:"Custom",value:"custom"}],...e?[[{title:"Cancel Reminder",value:"cancel"}]]:[]]}},2471: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.SetSearchMode=t.SetSearching=t.ClearSearch=t.SearchNotifications=t.searchKeys=t.initialSearchState=void 0;const o=n(6566),r=i(n(7342)),a=n(2191);t.initialSearchState={searchMode:!1,searching:!1,query:"",ready:!1,results:[]},t.searchKeys=["notification.title","bodyText","title","notification.indicator.text"],"undefined"!=typeof window&&(window.search={minLength:1,useQueryLength:!0,queryLengthMinus:0,threshold:.4,distance:500,useExtendedSearch:!1,logging:!1});class l extends o.Action{constructor(e){super(),this.text=e}async call(e,n){const{notifications:i}=e.state,o=i.map((e=>{var t,n,i;let o=e;return o.notification.indicator&&(o=Object.assign(Object.assign({},o),{notification:Object.assign(Object.assign({},o.notification),{indicator:Object.assign(Object.assign({},null===(t=e.notification)||void 0===t?void 0:t.indicator),{text:(null===(n=e.notification.indicator)||void 0===n?void 0:n.text)||(null===(i=e.notification.indicator)||void 0===i?void 0:i.type)})})})),o})),l=new r.default(o,{keys:t.searchKeys,includeMatches:!0,includeScore:!0,useExtendedSearch:window.search.useExtendedSearch,minMatchCharLength:window.search.useQueryLength?this.text.length-window.search.queryLengthMinus:window.search.minLength,threshold:window.search.threshold,distance:window.search.distance,sortFn:(e,t)=>e.score===t.score?(0,a.getSortDate)(o[t.idx])-(0,a.getSortDate)(o[e.idx]):e.score-t.score});await e.dispatch(new c),new Promise((()=>{this.result=l.search(this.text.trim(),{limit:300}),window.search.logging&&console.log(this.result),n()}))}reduce(e){return Object.assign(Object.assign({},e),{search:Object.assign(Object.assign({},e.search),{searching:!1,query:this.text,ready:!0,results:this.result})})}}t.SearchNotifications=l;class s extends o.Action{reduce(e){return Object.assign(Object.assign({},e),{search:Object.assign(Object.assign({},e.search),{query:"",searching:!1,ready:!1,results:[]})})}}t.ClearSearch=s;class c extends o.Action{constructor(){super()}reduce(e){return Object.assign(Object.assign({},e),{search:Object.assign(Object.assign({},e.search),{searching:!0})})}}t.SetSearching=c;class u extends o.Action{constructor(e){super(),this.mode=e}async call(e,t){await e.dispatch(new s),await t()}reduce(e){return Object.assign(Object.assign({},e),{search:Object.assign(Object.assign({},e.search),{searchMode:this.mode})})}}t.SetSearchMode=u},2551: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.NotificationCardComponent=void 0;const a=r(n(5932)),l=n(6455),s=n(1413),c=n(6012),u=n(2124),d=n(3873),f=n(9690),p=n(7207),h=n(7250),m=r(n(2230)),b=n(4858),g=n(5996),v=n(2773),y=n(2425),_=n(4990),x=n(3565),O=n(9136),w=n(6415);t.NotificationCardComponent=e=>{var t,n,i,o,r,h,m;const{style:E,senderTitle:T,isFormExpanded:k,isToast:I=!1,clickAction:D,remove:$,minimize:N,submitForm:A,clickButtonAction:F,showReminderModal:R,setReminder:B,cancelReminder:L,raiseAnalyticsEvent:z,clickFragment:H,revisionNumber:V,onKeyDown:W,focusedNotification:U}=e,{setIsMenuModalOpen:G,setMenuConfig:q,setIsCustomReminderModalOpen:K,setCustomReminderConfig:Z,setModalType:Y}=(0,a.useContext)(w.WebModalContext),[X,Q]=(0,a.useState)(-1),[J,ee]=(0,a.useState)(!1),[te,ne]=(0,v.useIsStateUpdate)(V,((e,t)=>J&&e!==t)),ie=(0,c.isStoredNotification)(e.notification)?e.notification:e.notification.item,oe=ie.notification,re=null===(t=ie.modifiers)||void 0===t?void 0:t.reminder,ae=T||ie.title,le=(0,g.isTemplate)(oe,"custom")?null===(n=oe.templateOptions.buttons)||void 0===n?void 0:n.align:void 0,se=(0,g.isTemplate)(oe,"custom")&&(null===(i=oe.templateOptions.indicator)||void 0===i?void 0:i.align)||"center",ce=(e=>{var t,n,i;return e.indicator?(0,g.isTemplate)(e,"custom")?Object.assign(Object.assign({},e.indicator),{color:null!==(n=null===(t=e.indicator)||void 0===t?void 0:t.color)&&void 0!==n?n:null===(i=e.templateOptions.indicator)||void 0===i?void 0:i.color}):e.indicator:null})(oe),ue=!!re&&re>Date.now(),de=ie.notification.allowReminder,{raiseAnalyticsEventDelayed:fe,cancelAnalyticsEventTimer:pe}=(0,_.useAnalyticsDebounce)(1e3,z),he=(0,a.useRef)(null),me=a.default.useContext(O.WindowContext),be=a.default.useRef(null);(0,a.useEffect)((()=>{var e;ie.id===(null==U?void 0:U.notificationId)&&(null===(e=be.current)||void 0===e||e.focus())}),[U,ie.id,be.current]);const ge=(e,t)=>{null==B||B(Object.assign(Object.assign({},ie),{modifiers:Object.assign(Object.assign({},ie),{reminder:null!=t?t:Date.now()+e})}))},ve=s.TemplateComponentMap[ie.notification.template];if(!ve)return console.error(`Unable to render ${ie.id}. Unknown template ${ie.notification.template}.`,ie),null;const ye=()=>ne(),_e=[{title:"OK",cta:!0,index:0,iconUrl:"",submit:!1,type:"button",onClick:ye,formOptions:null}],xe=te&&oe.buttons.length>0?_e:oe.buttons,Oe=a.default.createElement(a.default.Fragment,null,a.default.createElement(f.CardHeader,{sender:ae,icon:oe.icon,uuid:null!==(r=null===(o=oe.stream)||void 0===o?void 0:o.id)&&void 0!==r?r:JSON.stringify(ie.source),creationDate:oe.date,reminderDate:re,isToast:I,"data-testid":"header",showReminderButton:de,onDismiss:e=>{e.stopPropagation(),e.preventDefault(),te||(I?(console.log(`Toast dismiss button clicked. (Nfn ID:${ie.id})`),null==N||N(ie)):(null==W||W(new KeyboardEvent("keydown",{key:"_Delete"})),console.log(`Notification remove button clicked. (Nfn ID:${ie.id})`),null==$||$(ie)))},onShowReminderModal:t=>{const n={x:t.screenX,y:t.screenY},i={identity:{id:"custom-reminder-select-menu-modal"},type:"CustomReminderModal",position:n,notification:ie,isToast:I,onDismiss:t=>{"web"===e.mode&&K(!1),"number"==typeof t&&(ge(0,t),null==z||z({type:I?"Toast":"Notification",action:"Set Custom Reminder",value:`${t+Date.now()}`,data:ie.id,skipValueHashing:!0}))}},o={type:"Menu",position:n,width:140,header:"Remind me in...",options:(0,y.makePresetTimeSpanOptions)(ue),onDismiss:t=>{(0,y.isPresetTimeSpan)(t)?(ge(t.timeSpan),G(!1),null==z||z({type:I?"Toast":"Notification",action:"Select preset Reminder",value:`${t.timeSpan+Date.now()}`,data:ie.id,skipValueHashing:!0})):"string"==typeof t&&("cancel"===t?(null==L||L(ie),"web"===e.mode&&G(!1),null==z||z({type:"Notification",action:"Cancel Reminder",data:ie.id,skipValueHashing:!0})):"custom"===t&&("web"===e.mode?(G(!1),K(!0),Y("reminder"),Z(i)):null==R||R(i)))}};if("desktop"===e.mode)null==R||R(o);else if("web"===e.mode)return G(!0),q(o),void Y("reminder");null==z||z({type:I?"Toast":"Notification",action:"Select Reminder Button",data:{id:ie.id},skipValueHashing:!0})},raiseAnalyticsEvent:z,tabIndex:X,notificationID:ie.id,mode:e.mode}),oe.title&&a.default.createElement(M,null,a.default.createElement(b.SingleLine,{weight:"bold","data-testid":"notification-title"},oe.title)),a.default.createElement(P,{ref:he,"data-scrollable-container":"true",flexDirection:"column","data-testid":"template-content"},a.default.createElement(ve,{notification:ie,submitForm:A,clickButtonAction:F,clickFragment:async(e,t)=>{t.onClick&&(e.stopPropagation(),e.preventDefault(),await(null==H?void 0:H(ie,t,I)))},templateContent:he,tabIndexOverride:X,isToast:I}))),we=I?"Click to dismiss":"Click to clear",Ce=(null===(h=ie.notification.onSelect)||void 0===h?void 0:h.BODY_CLICK)===l.ActionBodyClickType.DISMISS_EVENT&&!(null===(m=ie.notification.buttons)||void 0===m?void 0:m.length),je=xe.reduce(((e,t)=>(t.cta?e.primary++:e.secondary++,e)),{primary:0,secondary:0});return a.default.createElement(a.default.Fragment,null,a.default.createElement(p.Card,{title:Ce?we:"",onClick:async e=>{(0,g.isTemplate)(oe,"markdown")&&oe.form||(e.stopPropagation(),e.preventDefault(),te||await(null==D?void 0:D(ie)))},"data-testid":"notification-card","data-id":ie.id,style:E,hasButtons:xe.length>0,isTall:je.primary>3||je.secondary>3,tabIndex:X,onMouseEnter:()=>{ee(!0),fe({type:I?"Toast":"Notification",action:"Hover",skipValueHashing:!0})},onMouseLeave:()=>{ee(!1),ne(),pe()},isToast:I,isFormExpanded:k,onFocus:()=>Q(0),onBlur:e=>{const t=e.currentTarget;requestAnimationFrame((()=>{t.contains(me.document.activeElement)||Q(-1)}))},onKeyDown:e=>null==W?void 0:W(e.nativeEvent),ref:be,role:"listitem",mode:e.mode},a.default.createElement(x.FormikProxyProvider,null,ce&&a.default.createElement(C,{alignment:se},te?a.default.createElement(u.InfoBanner,{text:"Notification Updated"}):a.default.createElement(u.IndicatorBanner,{indicator:ce,alignment:se})),a.default.createElement(S,{flexDirection:"column",gap:"xsmall"},te?a.default.createElement(j,{"data-testid":"update-overlay",gap:"xsmall"},Oe):Oe,xe.length>0&&a.default.createElement(d.ButtonsContainer,{alignment:le,buttonData:xe,onClick:te?ye:async(e,t)=>{if(!t.submit){e.stopPropagation(),e.preventDefault();const n=t.index||0;await(null==F?void 0:F(ie,n))}},tabIndexOverride:X,notificationId:ie.id,isToast:I,raiseAnalyticsEvent:z})))))};const C=(0,m.default)(h.Box)`
|
|
366
|
+
`,c=(0,r.default)(a.Icon).attrs({icon:"CheckIcon",size:"base"})``,u=(0,r.default)(a.Loader).attrs({size:"base"})``},2207:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getZonedDate=t.localTimeString=t.localDateString=t.formatLines=t.getDate=t.getDateTitle=void 0;const i=n(5738),o=n(5904);function r(e,t){const n=new Date(e),o=new Date,r=Math.abs((0,i.differenceInMinutes)(n,o));return r<1?"now":r<60||!t&&n>o?function(e,t){const n=(0,i.formatDistanceStrict)(e,t,{addSuffix:!0}).replace(/ minutes| minute/g,"m");return"60m ago"===n?(0,i.format)(e,"p"):"in 60m"===n?"in 1 hour":n}(n,o):function(e,t,n){const o=(0,i.differenceInHours)(t,e),r=(0,i.differenceInCalendarDays)(t,e);return Math.abs((0,i.differenceInMinutes)(t,e))>=60&&0===r?`${n?"at ":""}${(0,i.format)(e,"p")}`:1===r||o>24&&r<=6?`${n?"at ":""}${(0,i.format)(e,n?"p, EEE":"EEE, p")}`:`${n?"at ":""}${(0,i.format)(e,n?"p, MMM d":"MMM d, p")}`}(n,o,t)}function a(e){return(0,o.toZonedTime)(null!=e?e:Date.now(),Intl.DateTimeFormat().resolvedOptions().timeZone)}t.getDateTitle=function(e){const t=new Date(e),n=new Date,o=(0,i.differenceInCalendarDays)(n,t);return 0===o?"Today":1===o?"Yesterday":-1===o?"Tomorrow":o>0&&o<=6?`Last ${(0,i.format)(t,"EEEE")}`:o<0&&o>=-6?(0,i.format)(t,"EEEE"):(0,i.format)(t,"MMMM d, yyyy")},t.getDate=r,t.formatLines=function(e,t){if(t){if(t>=Date.now()){const e=r(t,!0);return"at"===e.substring(0,2)?["Reminding at",e.substring(3)]:[`Reminding ${e}`,null]}return[`Reminded ${r(t,!0)}`,`Sent ${r(e,!0)}`]}return[r(e),null]},t.localDateString=function(e){const t=null!=e?e:Date.now();return(0,i.formatISO)(a(t)).substring(0,10)},t.localTimeString=function(e){const t=null!=e?e:Date.now();return(0,i.formatISO)(a(t)).substring(11,16)},t.getZonedDate=a},2230:e=>{"use strict";e.exports=c},2362:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hydrateUpdateNotification=void 0;const i=n(2867),o=n(5996),r=n(611);t.hydrateUpdateNotification=function(e,t){const n=(0,r.getTemplateSchema)(e).validateSync(e,t),a=(0,o.isTemplate)(n,"markdown")?(0,i.getMarkdownTextContent)(n.body):"";return Object.assign(Object.assign({},n),{bodyText:a,body:n.body})}},2373:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Timer=void 0,t.Timer=class{constructor(e){this._duration=e}start(e){this.clear(),this._timeoutHandle=window.setTimeout((()=>{this._timeoutHandle=void 0,null==e||e()}),this._duration)}clear(){void 0!==this._timeoutHandle&&window.clearTimeout(this._timeoutHandle),this._timeoutHandle=void 0}get running(){return void 0!==this._timeoutHandle}}},2391: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.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||i(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(6630),t),o(n(2874),t)},2425:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.makePresetTimeSpanOptions=t.isPresetTimeSpan=void 0;const i=n(5738);t.isPresetTimeSpan=function(e){return e&&"object"==typeof e&&"timeSpan"in e&&"event"in e},t.makePresetTimeSpanOptions=function(e){return[[{title:"5 min",value:{event:"5 min",timeSpan:(0,i.minutesToMilliseconds)(5)}},{title:"15 min",value:{event:"15 min",timeSpan:(0,i.minutesToMilliseconds)(15)}},{title:"30 min",value:{event:"30 min",timeSpan:(0,i.minutesToMilliseconds)(30)}},{title:"1 hour",value:{event:"1 hour",timeSpan:(0,i.minutesToMilliseconds)(60)}},{title:"Custom",value:"custom"}],...e?[[{title:"Cancel Reminder",value:"cancel"}]]:[]]}},2471: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.SetSearchMode=t.SetSearching=t.ClearSearch=t.SearchNotifications=t.searchKeys=t.initialSearchState=void 0;const o=n(6566),r=i(n(7342)),a=n(2191);t.initialSearchState={searchMode:!1,searching:!1,query:"",ready:!1,results:[]},t.searchKeys=["notification.title","bodyText","title","notification.indicator.text"],"undefined"!=typeof window&&(window.search={minLength:1,useQueryLength:!0,queryLengthMinus:0,threshold:.4,distance:500,useExtendedSearch:!1,logging:!1});class l extends o.Action{constructor(e){super(),this.text=e}async call(e,n){const{notifications:i}=e.state,o=i.map((e=>{var t,n,i;let o=e;return o.notification.indicator&&(o=Object.assign(Object.assign({},o),{notification:Object.assign(Object.assign({},o.notification),{indicator:Object.assign(Object.assign({},null===(t=e.notification)||void 0===t?void 0:t.indicator),{text:(null===(n=e.notification.indicator)||void 0===n?void 0:n.text)||(null===(i=e.notification.indicator)||void 0===i?void 0:i.type)})})})),o})),l=new r.default(o,{keys:t.searchKeys,includeMatches:!0,includeScore:!0,useExtendedSearch:window.search.useExtendedSearch,minMatchCharLength:window.search.useQueryLength?this.text.length-window.search.queryLengthMinus:window.search.minLength,threshold:window.search.threshold,distance:window.search.distance,sortFn:(e,t)=>e.score===t.score?(0,a.getSortDate)(o[t.idx])-(0,a.getSortDate)(o[e.idx]):e.score-t.score});await e.dispatch(new c),new Promise((()=>{this.result=l.search(this.text.trim(),{limit:300}),window.search.logging&&console.log(this.result),n()}))}reduce(e){return Object.assign(Object.assign({},e),{search:Object.assign(Object.assign({},e.search),{searching:!1,query:this.text,ready:!0,results:this.result})})}}t.SearchNotifications=l;class s extends o.Action{reduce(e){return Object.assign(Object.assign({},e),{search:Object.assign(Object.assign({},e.search),{query:"",searching:!1,ready:!1,results:[]})})}}t.ClearSearch=s;class c extends o.Action{constructor(){super()}reduce(e){return Object.assign(Object.assign({},e),{search:Object.assign(Object.assign({},e.search),{searching:!0})})}}t.SetSearching=c;class u extends o.Action{constructor(e){super(),this.mode=e}async call(e,t){await e.dispatch(new s),await t()}reduce(e){return Object.assign(Object.assign({},e),{search:Object.assign(Object.assign({},e.search),{searchMode:this.mode})})}}t.SetSearchMode=u},2551: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.NotificationCardComponent=void 0;const a=r(n(5932)),l=n(6455),s=n(1413),c=n(6012),u=n(2124),d=n(3873),f=n(9690),p=n(7207),h=n(7250),m=r(n(2230)),b=n(4858),g=n(5996),v=n(2773),y=n(2425),_=n(4990),x=n(3565),O=n(9136),w=n(6415);t.NotificationCardComponent=e=>{var t,n,i,o,r,h,m;const{style:E,senderTitle:T,isFormExpanded:k,isToast:I=!1,clickAction:D,remove:$,minimize:A,submitForm:N,clickButtonAction:F,showReminderModal:R,setReminder:B,cancelReminder:L,raiseAnalyticsEvent:z,clickFragment:H,revisionNumber:V,onKeyDown:W,focusedNotification:U}=e,{setIsMenuModalOpen:G,setMenuConfig:q,setIsCustomReminderModalOpen:K,setCustomReminderConfig:Z,setModalType:Y}=(0,a.useContext)(w.WebModalContext),[X,Q]=(0,a.useState)(-1),[J,ee]=(0,a.useState)(!1),[te,ne]=(0,v.useIsStateUpdate)(V,((e,t)=>J&&e!==t)),ie=(0,c.isStoredNotification)(e.notification)?e.notification:e.notification.item,oe=ie.notification,re=null===(t=ie.modifiers)||void 0===t?void 0:t.reminder,ae=T||ie.title,le=(0,g.isTemplate)(oe,"custom")?null===(n=oe.templateOptions.buttons)||void 0===n?void 0:n.align:void 0,se=(0,g.isTemplate)(oe,"custom")&&(null===(i=oe.templateOptions.indicator)||void 0===i?void 0:i.align)||"center",ce=(e=>{var t,n,i;return e.indicator?(0,g.isTemplate)(e,"custom")?Object.assign(Object.assign({},e.indicator),{color:null!==(n=null===(t=e.indicator)||void 0===t?void 0:t.color)&&void 0!==n?n:null===(i=e.templateOptions.indicator)||void 0===i?void 0:i.color}):e.indicator:null})(oe),ue=!!re&&re>Date.now(),de=ie.notification.allowReminder,{raiseAnalyticsEventDelayed:fe,cancelAnalyticsEventTimer:pe}=(0,_.useAnalyticsDebounce)(1e3,z),he=(0,a.useRef)(null),me=a.default.useContext(O.WindowContext),be=a.default.useRef(null);(0,a.useEffect)((()=>{var e;ie.id===(null==U?void 0:U.notificationId)&&(null===(e=be.current)||void 0===e||e.focus())}),[U,ie.id,be.current]);const ge=(e,t)=>{null==B||B(Object.assign(Object.assign({},ie),{modifiers:Object.assign(Object.assign({},ie),{reminder:null!=t?t:Date.now()+e})}))},ve=s.TemplateComponentMap[ie.notification.template];if(!ve)return console.error(`Unable to render ${ie.id}. Unknown template ${ie.notification.template}.`,ie),null;const ye=()=>ne(),_e=[{title:"OK",cta:!0,index:0,iconUrl:"",submit:!1,type:"button",onClick:ye,formOptions:null}],xe=te&&oe.buttons.length>0?_e:oe.buttons,Oe=a.default.createElement(a.default.Fragment,null,a.default.createElement(f.CardHeader,{sender:ae,icon:oe.icon,uuid:null!==(r=null===(o=oe.stream)||void 0===o?void 0:o.id)&&void 0!==r?r:JSON.stringify(ie.source),creationDate:oe.date,reminderDate:re,isToast:I,"data-testid":"header",showReminderButton:de,onDismiss:e=>{e.stopPropagation(),e.preventDefault(),te||(I?(console.log(`Toast dismiss button clicked. (Nfn ID:${ie.id})`),null==A||A(ie)):(null==W||W(new KeyboardEvent("keydown",{key:"_Delete"})),console.log(`Notification remove button clicked. (Nfn ID:${ie.id})`),null==$||$(ie)))},onShowReminderModal:t=>{const n={x:t.screenX,y:t.screenY},i={identity:{id:"custom-reminder-select-menu-modal"},type:"CustomReminderModal",position:n,notification:ie,isToast:I,onDismiss:t=>{"web"===e.mode&&K(!1),"number"==typeof t&&(ge(0,t),null==z||z({type:I?"Toast":"Notification",action:"Set Custom Reminder",value:`${t+Date.now()}`,data:ie.id,skipValueHashing:!0}))}},o={type:"Menu",position:n,width:140,header:"Remind me in...",options:(0,y.makePresetTimeSpanOptions)(ue),onDismiss:t=>{(0,y.isPresetTimeSpan)(t)?(ge(t.timeSpan),G(!1),null==z||z({type:I?"Toast":"Notification",action:"Select preset Reminder",value:`${t.timeSpan+Date.now()}`,data:ie.id,skipValueHashing:!0})):"string"==typeof t&&("cancel"===t?(null==L||L(ie),"web"===e.mode&&G(!1),null==z||z({type:"Notification",action:"Cancel Reminder",data:ie.id,skipValueHashing:!0})):"custom"===t&&("web"===e.mode?(G(!1),K(!0),Y("reminder"),Z(i)):null==R||R(i)))}};if("desktop"===e.mode)null==R||R(o);else if("web"===e.mode)return G(!0),q(o),void Y("reminder");null==z||z({type:I?"Toast":"Notification",action:"Select Reminder Button",data:{id:ie.id},skipValueHashing:!0})},raiseAnalyticsEvent:z,tabIndex:X,notificationID:ie.id,mode:e.mode}),oe.title&&a.default.createElement(M,null,a.default.createElement(b.SingleLine,{weight:"bold","data-testid":"notification-title"},oe.title)),a.default.createElement(P,{ref:he,"data-scrollable-container":"true",flexDirection:"column","data-testid":"template-content"},a.default.createElement(ve,{notification:ie,submitForm:N,clickButtonAction:F,clickFragment:async(e,t)=>{t.onClick&&(e.stopPropagation(),e.preventDefault(),await(null==H?void 0:H(ie,t,I)))},templateContent:he,tabIndexOverride:X,isToast:I}))),we=I?"Click to dismiss":"Click to clear",Ce=(null===(h=ie.notification.onSelect)||void 0===h?void 0:h.BODY_CLICK)===l.ActionBodyClickType.DISMISS_EVENT&&!(null===(m=ie.notification.buttons)||void 0===m?void 0:m.length),je=xe.reduce(((e,t)=>(t.cta?e.primary++:e.secondary++,e)),{primary:0,secondary:0});return a.default.createElement(a.default.Fragment,null,a.default.createElement(p.Card,{title:Ce?we:"",onClick:async e=>{(0,g.isTemplate)(oe,"markdown")&&oe.form||(e.stopPropagation(),e.preventDefault(),te||await(null==D?void 0:D(ie)))},"data-testid":"notification-card","data-id":ie.id,style:E,hasButtons:xe.length>0,isTall:je.primary>3||je.secondary>3,tabIndex:X,onMouseEnter:()=>{ee(!0),fe({type:I?"Toast":"Notification",action:"Hover",skipValueHashing:!0})},onMouseLeave:()=>{ee(!1),ne(),pe()},isToast:I,isFormExpanded:k,onFocus:()=>Q(0),onBlur:e=>{const t=e.currentTarget;requestAnimationFrame((()=>{t.contains(me.document.activeElement)||Q(-1)}))},onKeyDown:e=>null==W?void 0:W(e.nativeEvent),ref:be,role:"listitem",mode:e.mode},a.default.createElement(x.FormikProxyProvider,null,ce&&a.default.createElement(C,{alignment:se},te?a.default.createElement(u.InfoBanner,{text:"Notification Updated"}):a.default.createElement(u.IndicatorBanner,{indicator:ce,alignment:se})),a.default.createElement(S,{flexDirection:"column",gap:"xsmall"},te?a.default.createElement(j,{"data-testid":"update-overlay",gap:"xsmall"},Oe):Oe,xe.length>0&&a.default.createElement(d.ButtonsContainer,{alignment:le,buttonData:xe,onClick:te?ye:async(e,t)=>{if(!t.submit){e.stopPropagation(),e.preventDefault();const n=t.index||0;await(null==F?void 0:F(ie,n))}},tabIndexOverride:X,notificationId:ie.id,isToast:I,raiseAnalyticsEvent:z})))))};const C=(0,m.default)(h.Box)`
|
|
367
367
|
position: absolute;
|
|
368
368
|
${e=>{switch(e.alignment){case"center":return m.css`
|
|
369
369
|
top: 0;
|
|
@@ -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-4035"},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;
|
|
@@ -791,7 +791,7 @@
|
|
|
791
791
|
/* Min size so it doesn't change size on smaller numbers */
|
|
792
792
|
min-width: 100px;
|
|
793
793
|
}
|
|
794
|
-
`;t.SettingsView=(0,c.connect)((e=>{const t=Array.from(e.applications.values()).map((e=>({application:e,streams:[]})));return e.streams.forEach((e=>{var n;const i=t.find((t=>t.application.id===e.appId));i&&(null===(n=i.streams)||void 0===n||n.push(e))})),{appManagers:t,centerLocked:e.centerLocked,centerMuted:e.centerMuted,centerPosition:e.settings.centerPosition,mode:e.mode,notificationSoundEnabled:e.settings.notificationSoundEnabled,toastPosition:(0,b.selectActiveDisplayToastPosition)(e),toastDuration:e.settings.toastDuration}}),(e=>({toggleCenterLocked:()=>e(new h.ToggleCenterLocked),toggleCenterMuted:()=>e(new h.ToggleCenterMuted),toggleNotificationSound:()=>e(new b.ToggleNotificationSound),setCenterPosition:t=>e(new b.SetCenterPosition(t)),setToastPosition:t=>e(new _.RequestSetToastLocation(t)),updateAppMuteState:(t,n)=>e(new h.UpdateAppMuteState(t,n)),updateStreamMuteState:(t,n)=>e(new h.UpdateStreamMuteState(t,n)),setToastDuration:t=>e(new b.SetToastDuration(t)),raiseAnalyticsEvent:async(t,n)=>e(new h.RaiseAnalyticsEvent(t,n))})))((({appManagers:e,centerLocked:t,centerMuted:n,centerPosition:i,mode:o,notificationSoundEnabled:r,toastPosition:a,setToastPosition:s,setCenterPosition:c,toggleCenterLocked:h,toggleCenterMuted:b,toggleNotificationSound:_,updateAppMuteState:T,updateStreamMuteState:k,toastDuration:I,setToastDuration:D,raiseAnalyticsEvent:$})=>{const[N,A]=l.useState(!1),F=l.useContext(x.HistoryContext),R=e.length>g.settingsApplicationsCollapsedSize&&!N?g.settingsApplicationsCollapsedSize:e.length,B=e.slice(0,R),{raiseAnalyticsEventDelayed:L}=(0,m.useAnalyticsDebounce)(1e3,$);return l.createElement(C,{flexDirection:"column"},l.createElement(j,null,l.createElement(S,null,"Notification Center"),"desktop"===o&&l.createElement(l.Fragment,null,l.createElement(d.SettingsToggle,{title:"Auto-hide Center",state:!t,onChange:()=>{h(),null==$||$({type:"Settings",action:"Toggle Autohide",value:`${t}`,skipValueHashing:!0})},toggleId:"lock-link"}),l.createElement(d.SettingsToggle,{title:"Do Not Disturb",state:n,onChange:()=>{b(),null==$||$({type:"Settings",action:"Toggle Do Not Disturb",value:`${!n}`,skipValueHashing:!0})},toggleId:"mute-link"})),l.createElement(d.SettingsToggle,{title:"Play Sound For Notifications",state:!n&&r,onChange:()=>{_(),null==$||$({type:"Settings",action:"Toggle Play Sound",value:`${!r}`,skipValueHashing:!0})},toggleId:"notification-sound",disabled:n})),"desktop"===o&&l.createElement(l.Fragment,null,l.createElement(j,null,l.createElement(w.SettingsNavigationTitle,{title:"Advanced Settings",onClick:()=>{F.push(O.ROUTES.ADVANCED_SETTINGS)}})),l.createElement(j,null,l.createElement(y.DisplaySelector,{title:"Default Display",description:"This is the display where Notification Center will launch and all new notifications will appear.",raiseAnalyticsEvent:$})),l.createElement(j,null,l.createElement(f.CenterPositionSelector,{title:"Notification Center Position",id:"center-position",value:i,onChange:e=>{c(e),null==$||$({type:"Settings",action:"Change Notification Center Position",value:`${e}`,skipValueHashing:!0})}})),l.createElement(j,null,l.createElement(S,null,"Notification Toasts"),l.createElement(E,{flexDirection:"row"},l.createElement(u.Text,{id:"spinner-label",size:"large","aria-hidden":"true"},"Duration Time"),l.createElement(v.NumberSpinner,{className:"spinner",value:I/1e3|0,suffix:"sec",min:4,max:16,onChange:e=>{D(1e3*e),null==L||L({type:"Settings",action:"Change Toast Duration",value:`${e}`,skipValueHashing:!0})}})),l.createElement(p.ToastPositionSelector,{value:a,onChange:e=>{s(e),"custom"!==e.position&&(null==$||$({type:"Settings",action:"Change Toast Position",value:`${e.position}`,skipValueHashing:!0}))}})),l.createElement(j,null,l.createElement(S,null,"Manage Applications "),e.length>0&&B.map((({application:e,streams:t=[]},n)=>l.createElement("div",{key:`SettingsToggle-${n}`},l.createElement(d.SettingsToggle,{key:`SettingsToggle-Application-${n}`,iconUrl:e.iconUrl,state:!e.muted,title:e.title,onChange:n=>{!function(e,t=[]){const n=!e.muted;T(e,n),t.length>0&&t.forEach((e=>k(e,n)))}(e,t),null==$||$({type:"Settings",action:n.target.checked?"Unmute Application":"Mute Application",value:`${e.title}`})},toggleId:`mute-app-toggle-${e.id}`,showLogo:!0}),t.length>0&&l.createElement(M,null,null==t?void 0:t.map(((e,t)=>l.createElement(d.SettingsToggle,{key:`SettingsToggle-Stream-${t}`,state:!e.muted,title:e.displayName,onChange:()=>function(e){k(e,!e.muted)}(e),toggleId:`mute-stream-toggle-${e.id}`,subToggle:!0}))))))),e.length>g.settingsApplicationsCollapsedSize&&l.createElement(P,{id:"show-less-more-button",onClick:()=>A(!N)},N?"Show Fewer":"Show More"))))}))},5904:e=>{"use strict";e.exports=h},5915:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},5932:e=>{"use strict";e.exports=m},5996:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isTemplate=void 0,t.isTemplate=(e,t)=>e.template===t},6012: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.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||i(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.getAllStoredNotifications=t.isSticky=t.isStoredNotification=t.normalizeCmdOrCtrl=t.checkTolerance=t.clamp=void 0,t.clamp=function(e,t,n){return e<=t?t:e>=n?n:e},t.checkTolerance=function(e,t,n){return t<n+e&&t>n-e},t.normalizeCmdOrCtrl=function(e){return e.replace(/CmdOrCtrl/g,(e=>e.includes("Cmd")?"Cmd":"Ctrl")).replace(/(Cmd|Ctrl)/g,"CmdOrCtrl")},t.isStoredNotification=function(e){return!!e.notification},t.isSticky=function(e){return e.toast?"sticky"===e.toast:"sticky"===e.sticky},t.getAllStoredNotifications=function(e){return[...e.notifications,...e.reminders]},o(n(5172),t)},6075:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useDispatchRequestCustomValidationDebounced=void 0;const i=n(5932),o=n(9130);t.useDispatchRequestCustomValidationDebounced=()=>{const e=(0,o.useDispatch)(),t=(0,i.useRef)(null);return(0,i.useCallback)((n=>{t.current&&window.clearTimeout(t.current),t.current=window.setTimeout((()=>{e(n)}),500)}),[e])}},6099:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.encodeId=t.hydrateNotification=void 0;const i=n(2867),o=n(512),r=n(5996),a=n(790),l=n(6188);function s(e,t){return`${t.uuid}:${e}`}t.hydrateNotification=function(e,t,n){var c,u;null!==(c=e.template)&&void 0!==c||(e.template="markdown");const d=l.TemplateSchemaMap[e.template];if(!d)throw new Error(`Unrecognized notification template name, must be one of: ${Object.values(o.TemplateNames).join(",")}`);const f=d.validateSync(e),p=null!=n?n:"desktop"===t.type?s(f.id,t.identity):f.id,h=(0,r.isTemplate)(f,"markdown")?(0,i.getMarkdownTextContent)(f.body):"";return(0,r.isTemplate)(f,"custom")&&(0,a.validateTemplateData)(f,!(null===(u=e.indicator)||void 0===u?void 0:u.color)),{id:p,notification:f,source:t,bodyText:h,title:""}},t.encodeId=s},6188: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.generateId=t.TemplateSchemaMap=t.CustomTemplateDataSchema=t.ButtonsSchema=t.ButtonOptionsSchema=t.IndicatorSchema=t.StreamSchema=void 0;const a=r(n(4298)),l=n(6865),s=n(3694),c=n(4415),u=n(2984),d=n(3413);t.StreamSchema=a.object({displayName:a.string().required(),id:a.string().required(),appId:a.string().required()}).label("Stream");const f=a.mixed().oneOf(Object.values(l.IndicatorType)).optional(),p=a.mixed().optional().when("type",((e,t)=>t.default(e))),h=a.mixed().oneOf(Object.values(l.IndicatorColor)).optional().when("type",((e,t)=>{switch(e){case l.IndicatorType.FAILURE:return t.default(l.IndicatorColor.RED);case l.IndicatorType.WARNING:return t.default(l.IndicatorColor.YELLOW);case l.IndicatorType.SUCCESS:return t.default(l.IndicatorColor.GREEN)}})).default(l.IndicatorColor.RED),m=a.string().required().default(l.IndicatorColor.RED),b=a.mixed().oneOf(Object.values(l.IndicatorColor)).required(),g=a.object({type:f,text:p,color:h}),v=a.object({type:f,text:p,color:m,fallback:b});t.IndicatorSchema=a.mixed().when({is:e=>{return(null==e?void 0:e.color)&&(t=null==e?void 0:e.color)&&!Object.values(l.IndicatorColor).includes(t);var t},then:v.optional().default(null).nullable(),otherwise:g.optional().default(null).nullable()}).label("Indicator"),t.ButtonOptionsSchema=a.object({type:a.mixed().default("button"),title:a.string().required(),cta:a.boolean().default(!1),iconUrl:a.string().default(""),index:a.number(),onClick:a.mixed().nullable(),submit:a.boolean().default(!1),formOptions:a.object({submittingTitle:a.string().nullable(),errorTitle:a.string().nullable(),successTitle:a.string().nullable()}).nullable()}).label("ButtonOptions"),t.ButtonsSchema=a.array().of(t.ButtonOptionsSchema).transform(((e=[])=>e.map(((e,t)=>Object.assign(Object.assign({},e),{type:"button",index:t}))))).test("Max 8 buttons","Max 8 buttons allowed",((e=[])=>e.length<=8)).test("Max 4 CTA buttons","Max 4 CTA buttons allowed",((e=[])=>(null==e?void 0:e.filter((e=>e.cta)).length)<=4)).test("Max 4 non-CTA buttons","Max 4 non-CTA buttons allowed",((e=[])=>(null==e?void 0:e.filter((e=>!e.cta)).length)<=4)).default([]);const y=a.object({id:a.string().default((()=>w())),template:a.mixed().oneOf(Object.values(c.TemplateNames)).optional().default("markdown"),title:a.string().defined(),category:a.string().optional().default("default"),allowReminder:a.boolean().default(!0),indicator:t.IndicatorSchema,icon:a.string().default(""),priority:a.number().min(1).max(4).default(1),customData:a.object().optional().default({}),sticky:a.mixed(),toast:a.mixed(),date:a.number().default((()=>Date.now())),expires:a.number().nullable().default(null),stream:t.StreamSchema.nullable().optional().default(null),platform:a.string().nullable().optional(),onSelect:a.object().nullable().default(null),onClose:a.object().nullable().default(null),onExpire:a.object().nullable().default(null),buttons:t.ButtonsSchema.clone(),soundOptions:a.object({mode:a.mixed().required().default("default")}).default({mode:"default"})}).transform((e=>(e.sticky||e.toast||(e.toast="transient"),e))).required(),_=y.clone().omit(["form"]).shape({template:a.mixed().required(),body:a.string().defined(),form:s.templateMarkDownFormSchema}).label("Notification (Markdown)"),x=y.clone().omit(["template"]).shape({template:a.mixed().required(),list:a.mixed().required().test({name:"List object",message:"Invalid list object",test:e=>{if("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("Notification (List)"),O=y.clone().omit(["template","form"]).shape({template:a.mixed().required(),form:s.templateCustomFormSchema,templateOptions:a.object().shape({body:a.object().shape({fallbackText:a.string().optional(),compositions:a.array().required().min(1).of(a.object().shape({minTemplateAPIVersion:a.string().required().test({name:"Template API Version",message:"Minimum Template API version must be a positive integer",test:e=>/^[0-9]+$/.test(e||"")&&"0"!==e}),layout:a.mixed().required()}))}).required(),indicator:a.object({align:a.mixed().oneOf(["center","left","right"]).optional(),color:a.mixed().oneOf(Object.values(l.IndicatorColor)).optional()}).optional(),buttons:a.object({align:a.mixed().oneOf(["center","left","right"]).optional()}).optional()}).required(),templateData:a.object().required()}).label("Notification (Custom)");function w(){return(0,d.randomUUID)()}t.CustomTemplateDataSchema=a.mixed().test({name:"Custom Template Data",message:"Custom Template Data Validation Error",test:function(e){var t,n;const i=null===(n=null===(t=this.options)||void 0===t?void 0:t.context)||void 0===n?void 0:n.fragments,o=null!=e?e:{},r=Object.values(c.TemplateFragmentNames).filter((e=>"container"!=e)),a=e=>{if(e.style){if(e.style.constructor!==Object)throw new Error('"style" property must be an object type.');for(const t in e.style){const n=e.style[t];if("string"!=typeof n&&"number"!=typeof n)throw new Error('"style" object\'s values must be a string or a number type.');if("string"==typeof n&&"position"===t.trim()&&"fixed"===n.trim())throw new Error(`"${t}: ${n}" style is not allowed in fragments.`)}}};return i.containerFragments.forEach((e=>{if(e.children&&!Array.isArray(e.children))throw new Error('container fragment\'s "children" property must be an array type.');a(e)})),i.presentationFragments.forEach((e=>{if(!r.includes(e.type))throw new Error(`Unsupported fragment type (${e.type}) in composition. (Template API Version: ${(0,u.getTemplateAPIVersion)()})`);if(!e.dataKey||"string"!=typeof e.dataKey)throw new Error('"dataKey" property must be a string type and is required field for all presentation fragment types.');if(e.optional&&"boolean"!=typeof e.optional)throw new Error('"optional" property must be a boolean type.');const t=o[e.dataKey];if(!e.optional&&!t)throw new Error(`templateData["${e.dataKey}"] is not optional and must exist in template data.`);if(t){if(("text"===e.type||"image"===e.type)&&"string"!=typeof t)throw new Error(`templateData["${e.dataKey}"] is referred by a ${e.type} fragment and must be a string type.`);if("list"===e.type&&(!Array.isArray(t)||t.some((e=>2!==e.length||"string"!=typeof e[0]||"string"!=typeof e[1]))))throw new Error(`templateData["${e.dataKey}"] is referred by a list fragment and must be a ListPairs (Array of [string, string]) type.`)}a(e)})),!0}}).label("Custom Template Data"),t.TemplateSchemaMap={[c.TemplateNames.markdown]:_,[c.TemplateNames.list]:x,[c.TemplateNames.custom]:O},t.generateId=w},6318: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.TimeWidgetComponent=t.TimeWidgetComponentConnected=void 0;const o=i(n(5932)),r=n(9130),a=n(7451),l=n(258),s=n(7250),c=n(1656),u=n(6464),d=n(4691),f=n(7260),p=n(1971),h=n(5232),m=n(5484),b=n(9816),g=n(6415),v=Array.from(Array(24).keys()).map((e=>({title:`${e%12||12}:00 ${e>=12?"PM":"AM"}`,value:`${e.toString().padStart(2,"0")}:00`})));t.TimeWidgetComponentConnected=e=>o.default.createElement(l.Field,{name:e.field.key,component:y,timeField:e.field,showModal:e.showModal,hideModal:e.hideModal,formSettings:e.formSettings,raiseAnalytics:e.raiseAnalytics,mode:e.mode});const y=({field:e,showModal:t,hideModal:n,timeField:i,form:r,formSettings:a,raiseAnalytics:l,mode:y})=>{const _=e.value?(0,d.convertTo24HourFormat)(e.value):void 0;(0,m.useRaiseFieldAnalytics)(i,l,(e=>(0,d.convertTo24HourFormat)(e.value)));const[x,O,w,C]=(0,c.useMenuModalDialog)((e=>{r.setFieldTouched(i.key,!0),r.setFieldValue(i.key,(0,d.convertFrom24HourFormat)(e))}),t,n,v,(e=>{var t;return{width:null===(t=null==e?void 0:e.current)||void 0===t?void 0:t.clientWidth,height:u.dropdownModalHeight}}),(()=>r.setFieldTouched(i.key,!0)),v.find((t=>e.value&&t.value==_)),y,"time"),{modalType:j,isTimePickerModalOpen:S}=o.default.useContext(g.WebModalContext),P=r.errors[e.name]&&r.touched[e.name]?"critical":void 0;return o.default.createElement(f.InputContainer,{flexDirection:"column"},o.default.createElement(s.DateInput,{label:(0,h.getLabelText)(i,a),key:`${i.key}-${C}`,value:_,type:"time",ref:w,helperText:i.helperText,onExpand:()=>O(!x),expanded:x,status:P,onChange:e=>r.setFieldValue(i.key,(0,d.convertFrom24HourFormat)(e.target.value))}),"web"===y&&"widget"===j&&S&&o.default.createElement(b.WebModalComponent,{mode:y}),o.default.createElement(p.ErrorLabel,{name:e.name}))};t.TimeWidgetComponent=(0,r.connect)((e=>({mode:e.mode})),(e=>({showModal:t=>e(new a.ShowModal(t)),hideModal:t=>e(new a.HideModal(t))})))(t.TimeWidgetComponentConnected)},6345: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.NotificationsPanel=void 0;const l=n(7250),s=r(n(5932)),c=n(9130),u=a(n(2230)),d=n(4800),f=n(7451),p=n(2471),h=n(4896),m=n(6764),b=n(6834),g=n(8318),v=n(8904),y=n(3264),_=n(660),x=n(9136),O=n(7586),w=n(925),C=(0,u.default)(l.Box)`
|
|
794
|
+
`;t.SettingsView=(0,c.connect)((e=>{const t=Array.from(e.applications.values()).map((e=>({application:e,streams:[]})));return e.streams.forEach((e=>{var n;const i=t.find((t=>t.application.id===e.appId));i&&(null===(n=i.streams)||void 0===n||n.push(e))})),{appManagers:t,centerLocked:e.centerLocked,centerMuted:e.centerMuted,centerPosition:e.settings.centerPosition,mode:e.mode,notificationSoundEnabled:e.settings.notificationSoundEnabled,toastPosition:(0,b.selectActiveDisplayToastPosition)(e),toastDuration:e.settings.toastDuration}}),(e=>({toggleCenterLocked:()=>e(new h.ToggleCenterLocked),toggleCenterMuted:()=>e(new h.ToggleCenterMuted),toggleNotificationSound:()=>e(new b.ToggleNotificationSound),setCenterPosition:t=>e(new b.SetCenterPosition(t)),setToastPosition:t=>e(new _.RequestSetToastLocation(t)),updateAppMuteState:(t,n)=>e(new h.UpdateAppMuteState(t,n)),updateStreamMuteState:(t,n)=>e(new h.UpdateStreamMuteState(t,n)),setToastDuration:t=>e(new b.SetToastDuration(t)),raiseAnalyticsEvent:async(t,n)=>e(new h.RaiseAnalyticsEvent(t,n))})))((({appManagers:e,centerLocked:t,centerMuted:n,centerPosition:i,mode:o,notificationSoundEnabled:r,toastPosition:a,setToastPosition:s,setCenterPosition:c,toggleCenterLocked:h,toggleCenterMuted:b,toggleNotificationSound:_,updateAppMuteState:T,updateStreamMuteState:k,toastDuration:I,setToastDuration:D,raiseAnalyticsEvent:$})=>{const[A,N]=l.useState(!1),F=l.useContext(x.HistoryContext),R=e.length>g.settingsApplicationsCollapsedSize&&!A?g.settingsApplicationsCollapsedSize:e.length,B=e.slice(0,R),{raiseAnalyticsEventDelayed:L}=(0,m.useAnalyticsDebounce)(1e3,$);return l.createElement(C,{flexDirection:"column"},l.createElement(j,null,l.createElement(S,null,"Notification Center"),"desktop"===o&&l.createElement(l.Fragment,null,l.createElement(d.SettingsToggle,{title:"Auto-hide Center",state:!t,onChange:()=>{h(),null==$||$({type:"Settings",action:"Toggle Autohide",value:`${t}`,skipValueHashing:!0})},toggleId:"lock-link"}),l.createElement(d.SettingsToggle,{title:"Do Not Disturb",state:n,onChange:()=>{b(),null==$||$({type:"Settings",action:"Toggle Do Not Disturb",value:`${!n}`,skipValueHashing:!0})},toggleId:"mute-link"})),l.createElement(d.SettingsToggle,{title:"Play Sound For Notifications",state:!n&&r,onChange:()=>{_(),null==$||$({type:"Settings",action:"Toggle Play Sound",value:`${!r}`,skipValueHashing:!0})},toggleId:"notification-sound",disabled:n})),"desktop"===o&&l.createElement(l.Fragment,null,l.createElement(j,null,l.createElement(w.SettingsNavigationTitle,{title:"Advanced Settings",onClick:()=>{F.push(O.ROUTES.ADVANCED_SETTINGS)}})),l.createElement(j,null,l.createElement(y.DisplaySelector,{title:"Default Display",description:"This is the display where Notification Center will launch and all new notifications will appear.",raiseAnalyticsEvent:$})),l.createElement(j,null,l.createElement(f.CenterPositionSelector,{title:"Notification Center Position",id:"center-position",value:i,onChange:e=>{c(e),null==$||$({type:"Settings",action:"Change Notification Center Position",value:`${e}`,skipValueHashing:!0})}})),l.createElement(j,null,l.createElement(S,null,"Notification Toasts"),l.createElement(E,{flexDirection:"row"},l.createElement(u.Text,{id:"spinner-label",size:"large","aria-hidden":"true"},"Duration Time"),l.createElement(v.NumberSpinner,{className:"spinner",value:I/1e3|0,suffix:"sec",min:4,max:16,onChange:e=>{D(1e3*e),null==L||L({type:"Settings",action:"Change Toast Duration",value:`${e}`,skipValueHashing:!0})}})),l.createElement(p.ToastPositionSelector,{value:a,onChange:e=>{s(e),"custom"!==e.position&&(null==$||$({type:"Settings",action:"Change Toast Position",value:`${e.position}`,skipValueHashing:!0}))}})),l.createElement(j,null,l.createElement(S,null,"Manage Applications "),e.length>0&&B.map((({application:e,streams:t=[]},n)=>l.createElement("div",{key:`SettingsToggle-${n}`},l.createElement(d.SettingsToggle,{key:`SettingsToggle-Application-${n}`,iconUrl:e.iconUrl,state:!e.muted,title:e.title,onChange:n=>{!function(e,t=[]){const n=!e.muted;T(e,n),t.length>0&&t.forEach((e=>k(e,n)))}(e,t),null==$||$({type:"Settings",action:n.target.checked?"Unmute Application":"Mute Application",value:`${e.title}`})},toggleId:`mute-app-toggle-${e.id}`,showLogo:!0}),t.length>0&&l.createElement(M,null,null==t?void 0:t.map(((e,t)=>l.createElement(d.SettingsToggle,{key:`SettingsToggle-Stream-${t}`,state:!e.muted,title:e.displayName,onChange:()=>function(e){k(e,!e.muted)}(e),toggleId:`mute-stream-toggle-${e.id}`,subToggle:!0}))))))),e.length>g.settingsApplicationsCollapsedSize&&l.createElement(P,{id:"show-less-more-button",onClick:()=>N(!A)},A?"Show Fewer":"Show More"))))}))},5904:e=>{"use strict";e.exports=h},5915:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},5932:e=>{"use strict";e.exports=m},5996:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isTemplate=void 0,t.isTemplate=(e,t)=>e.template===t},6012: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.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||i(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.getAllStoredNotifications=t.isSticky=t.isStoredNotification=t.normalizeCmdOrCtrl=t.checkTolerance=t.clamp=void 0,t.clamp=function(e,t,n){return e<=t?t:e>=n?n:e},t.checkTolerance=function(e,t,n){return t<n+e&&t>n-e},t.normalizeCmdOrCtrl=function(e){return e.replace(/CmdOrCtrl/g,(e=>e.includes("Cmd")?"Cmd":"Ctrl")).replace(/(Cmd|Ctrl)/g,"CmdOrCtrl")},t.isStoredNotification=function(e){return!!e.notification},t.isSticky=function(e){return e.toast?"sticky"===e.toast:"sticky"===e.sticky},t.getAllStoredNotifications=function(e){return[...e.notifications,...e.reminders]},o(n(5172),t)},6075:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useDispatchRequestCustomValidationDebounced=void 0;const i=n(5932),o=n(9130);t.useDispatchRequestCustomValidationDebounced=()=>{const e=(0,o.useDispatch)(),t=(0,i.useRef)(null);return(0,i.useCallback)((n=>{t.current&&window.clearTimeout(t.current),t.current=window.setTimeout((()=>{e(n)}),500)}),[e])}},6099:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.encodeId=t.hydrateNotification=void 0;const i=n(2867),o=n(512),r=n(5996),a=n(790),l=n(6188);function s(e,t){return`${t.uuid}:${e}`}t.hydrateNotification=function(e,t,n){var c,u;null!==(c=e.template)&&void 0!==c||(e.template="markdown");const d=l.TemplateSchemaMap[e.template];if(!d)throw new Error(`Unrecognized notification template name, must be one of: ${Object.values(o.TemplateNames).join(",")}`);const f=d.validateSync(e),p=null!=n?n:"desktop"===t.type?s(f.id,t.identity):f.id,h=(0,r.isTemplate)(f,"markdown")?(0,i.getMarkdownTextContent)(f.body):"";return(0,r.isTemplate)(f,"custom")&&(0,a.validateTemplateData)(f,!(null===(u=e.indicator)||void 0===u?void 0:u.color)),{id:p,notification:f,source:t,bodyText:h,title:""}},t.encodeId=s},6188: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.generateId=t.TemplateSchemaMap=t.CustomTemplateDataSchema=t.ButtonsSchema=t.ButtonOptionsSchema=t.IndicatorSchema=t.StreamSchema=void 0;const a=r(n(4298)),l=n(6865),s=n(3694),c=n(4415),u=n(2984),d=n(3413);t.StreamSchema=a.object({displayName:a.string().required(),id:a.string().required(),appId:a.string().required()}).label("Stream");const f=a.mixed().oneOf(Object.values(l.IndicatorType)).optional(),p=a.mixed().optional().when("type",((e,t)=>t.default(e))),h=a.mixed().oneOf(Object.values(l.IndicatorColor)).optional().when("type",((e,t)=>{switch(e){case l.IndicatorType.FAILURE:return t.default(l.IndicatorColor.RED);case l.IndicatorType.WARNING:return t.default(l.IndicatorColor.YELLOW);case l.IndicatorType.SUCCESS:return t.default(l.IndicatorColor.GREEN)}})).default(l.IndicatorColor.RED),m=a.string().required().default(l.IndicatorColor.RED),b=a.mixed().oneOf(Object.values(l.IndicatorColor)).required(),g=a.object({type:f,text:p,color:h}),v=a.object({type:f,text:p,color:m,fallback:b});t.IndicatorSchema=a.mixed().when({is:e=>{return(null==e?void 0:e.color)&&(t=null==e?void 0:e.color)&&!Object.values(l.IndicatorColor).includes(t);var t},then:v.optional().default(null).nullable(),otherwise:g.optional().default(null).nullable()}).label("Indicator"),t.ButtonOptionsSchema=a.object({type:a.mixed().default("button"),title:a.string().required(),cta:a.boolean().default(!1),iconUrl:a.string().default(""),index:a.number(),onClick:a.mixed().nullable(),submit:a.boolean().default(!1),formOptions:a.object({submittingTitle:a.string().nullable(),errorTitle:a.string().nullable(),successTitle:a.string().nullable()}).nullable()}).label("ButtonOptions"),t.ButtonsSchema=a.array().of(t.ButtonOptionsSchema).transform(((e=[])=>e.map(((e,t)=>Object.assign(Object.assign({},e),{type:"button",index:t}))))).test("Max 8 buttons","Max 8 buttons allowed",((e=[])=>e.length<=8)).test("Max 4 CTA buttons","Max 4 CTA buttons allowed",((e=[])=>(null==e?void 0:e.filter((e=>e.cta)).length)<=4)).test("Max 4 non-CTA buttons","Max 4 non-CTA buttons allowed",((e=[])=>(null==e?void 0:e.filter((e=>!e.cta)).length)<=4)).default([]);const y=a.object({id:a.string().default((()=>w())),template:a.mixed().oneOf(Object.values(c.TemplateNames)).optional().default("markdown"),title:a.string().defined(),category:a.string().optional().default("default"),allowReminder:a.boolean().default(!0),indicator:t.IndicatorSchema,icon:a.string().default(""),priority:a.number().min(1).max(4).default(1),customData:a.object().optional().default({}),sticky:a.mixed(),toast:a.mixed(),date:a.number().default((()=>Date.now())),expires:a.number().nullable().default(null),stream:t.StreamSchema.nullable().optional().default(null),platform:a.string().nullable().optional(),onSelect:a.object().nullable().default(null),onClose:a.object().nullable().default(null),onExpire:a.object().nullable().default(null),buttons:t.ButtonsSchema.clone(),soundOptions:a.object({mode:a.mixed().required().default("default")}).default({mode:"default"})}).transform((e=>(e.sticky||e.toast||(e.toast="transient"),e))).required(),_=y.clone().omit(["form"]).shape({template:a.mixed().required(),body:a.string().defined(),form:s.templateMarkDownFormSchema}).label("Notification (Markdown)"),x=y.clone().omit(["template"]).shape({template:a.mixed().required(),list:a.mixed().required().test({name:"List object",message:"Invalid list object",test:e=>{if("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("Notification (List)"),O=y.clone().omit(["template","form"]).shape({template:a.mixed().required(),form:s.templateCustomFormSchema,templateOptions:a.object().shape({body:a.object().shape({fallbackText:a.string().optional(),compositions:a.array().required().min(1).of(a.object().shape({minTemplateAPIVersion:a.string().required().test({name:"Template API Version",message:"Minimum Template API version must be a positive integer",test:e=>/^[0-9]+$/.test(e||"")&&"0"!==e}),layout:a.mixed().required()}))}).required(),indicator:a.object({align:a.mixed().oneOf(["center","left","right"]).optional(),color:a.mixed().oneOf(Object.values(l.IndicatorColor)).optional()}).optional(),buttons:a.object({align:a.mixed().oneOf(["center","left","right"]).optional()}).optional()}).required(),templateData:a.object().required()}).label("Notification (Custom)");function w(){return(0,d.randomUUID)()}t.CustomTemplateDataSchema=a.mixed().test({name:"Custom Template Data",message:"Custom Template Data Validation Error",test:function(e){var t,n;const i=null===(n=null===(t=this.options)||void 0===t?void 0:t.context)||void 0===n?void 0:n.fragments,o=null!=e?e:{},r=Object.values(c.TemplateFragmentNames).filter((e=>"container"!=e)),a=e=>{if(e.style){if(e.style.constructor!==Object)throw new Error('"style" property must be an object type.');for(const t in e.style){const n=e.style[t];if("string"!=typeof n&&"number"!=typeof n)throw new Error('"style" object\'s values must be a string or a number type.');if("string"==typeof n&&"position"===t.trim()&&"fixed"===n.trim())throw new Error(`"${t}: ${n}" style is not allowed in fragments.`)}}};return i.containerFragments.forEach((e=>{if(e.children&&!Array.isArray(e.children))throw new Error('container fragment\'s "children" property must be an array type.');a(e)})),i.presentationFragments.forEach((e=>{if(!r.includes(e.type))throw new Error(`Unsupported fragment type (${e.type}) in composition. (Template API Version: ${(0,u.getTemplateAPIVersion)()})`);if(!e.dataKey||"string"!=typeof e.dataKey)throw new Error('"dataKey" property must be a string type and is required field for all presentation fragment types.');if(e.optional&&"boolean"!=typeof e.optional)throw new Error('"optional" property must be a boolean type.');const t=o[e.dataKey];if(!e.optional&&!t)throw new Error(`templateData["${e.dataKey}"] is not optional and must exist in template data.`);if(t){if(("text"===e.type||"image"===e.type)&&"string"!=typeof t)throw new Error(`templateData["${e.dataKey}"] is referred by a ${e.type} fragment and must be a string type.`);if("list"===e.type&&(!Array.isArray(t)||t.some((e=>2!==e.length||"string"!=typeof e[0]||"string"!=typeof e[1]))))throw new Error(`templateData["${e.dataKey}"] is referred by a list fragment and must be a ListPairs (Array of [string, string]) type.`)}a(e)})),!0}}).label("Custom Template Data"),t.TemplateSchemaMap={[c.TemplateNames.markdown]:_,[c.TemplateNames.list]:x,[c.TemplateNames.custom]:O},t.generateId=w},6318: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.TimeWidgetComponent=t.TimeWidgetComponentConnected=void 0;const o=i(n(5932)),r=n(9130),a=n(7451),l=n(258),s=n(7250),c=n(1656),u=n(6464),d=n(4691),f=n(7260),p=n(1971),h=n(5232),m=n(5484),b=n(9816),g=n(6415),v=Array.from(Array(24).keys()).map((e=>({title:`${e%12||12}:00 ${e>=12?"PM":"AM"}`,value:`${e.toString().padStart(2,"0")}:00`})));t.TimeWidgetComponentConnected=e=>o.default.createElement(l.Field,{name:e.field.key,component:y,timeField:e.field,showModal:e.showModal,hideModal:e.hideModal,formSettings:e.formSettings,raiseAnalytics:e.raiseAnalytics,mode:e.mode});const y=({field:e,showModal:t,hideModal:n,timeField:i,form:r,formSettings:a,raiseAnalytics:l,mode:y})=>{const _=e.value?(0,d.convertTo24HourFormat)(e.value):void 0;(0,m.useRaiseFieldAnalytics)(i,l,(e=>(0,d.convertTo24HourFormat)(e.value)));const[x,O,w,C]=(0,c.useMenuModalDialog)((e=>{r.setFieldTouched(i.key,!0),r.setFieldValue(i.key,(0,d.convertFrom24HourFormat)(e))}),t,n,v,(e=>{var t;return{width:null===(t=null==e?void 0:e.current)||void 0===t?void 0:t.clientWidth,height:u.dropdownModalHeight}}),(()=>r.setFieldTouched(i.key,!0)),v.find((t=>e.value&&t.value==_)),y,"time"),{modalType:j,isTimePickerModalOpen:S}=o.default.useContext(g.WebModalContext),P=r.errors[e.name]&&r.touched[e.name]?"critical":void 0;return o.default.createElement(f.InputContainer,{flexDirection:"column"},o.default.createElement(s.DateInput,{label:(0,h.getLabelText)(i,a),key:`${i.key}-${C}`,value:_,type:"time",ref:w,helperText:i.helperText,onExpand:()=>O(!x),expanded:x,status:P,onChange:e=>r.setFieldValue(i.key,(0,d.convertFrom24HourFormat)(e.target.value))}),"web"===y&&"widget"===j&&S&&o.default.createElement(b.WebModalComponent,{mode:y}),o.default.createElement(p.ErrorLabel,{name:e.name}))};t.TimeWidgetComponent=(0,r.connect)((e=>({mode:e.mode})),(e=>({showModal:t=>e(new a.ShowModal(t)),hideModal:t=>e(new a.HideModal(t))})))(t.TimeWidgetComponentConnected)},6345: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.NotificationsPanel=void 0;const l=n(7250),s=r(n(5932)),c=n(9130),u=a(n(2230)),d=n(4800),f=n(7451),p=n(2471),h=n(4896),m=n(6764),b=n(6834),g=n(8318),v=n(8904),y=n(3264),_=n(660),x=n(9136),O=n(7586),w=n(925),C=(0,u.default)(l.Box)`
|
|
795
795
|
background: ${({theme:e})=>e.palette.background2};
|
|
796
796
|
border: 1px solid ${({theme:e})=>e.palette.background4};
|
|
797
797
|
height: 100%;
|
|
@@ -808,7 +808,7 @@
|
|
|
808
808
|
}
|
|
809
809
|
`,j=u.default.div`
|
|
810
810
|
margin: ${({theme:e})=>e.px.large} auto;
|
|
811
|
-
`;t.NotificationsPanel=(0,c.connect)((e=>({notifications:(0,f.selectPlatformNotifications)(e),reminders:(0,f.selectPlatformReminders)(e),applications:e.applications,streams:e.streams,platforms:e.platform.list,centerLocked:e.centerLocked,searchResults:(0,f.selectPlatformSearchResults)(e),searchQuery:e.search.query,searchMode:e.search.searchMode,visible:e.centerVisible,errors:(0,f.selectVisibleErrors)(e),category:e.categories.selectedCategory})),(e=>({setSearchMode:t=>e(new p.SetSearchMode(t)),searchNotifications:t=>e(new p.SearchNotifications(t)),clearSearch:()=>e(new p.ClearSearch),removeNotifications:t=>e(new f.RemoveNotifications(t,"ClearAll")),closeCenter:()=>e(new f.ToggleCenterVisibility(f.ToggleCenterVisibilitySource.BUTTON,!1)),dismissError:t=>e(new f.DismissError(t)),raiseAnalyticsEvent:async(t,n)=>e(new f.RaiseAnalyticsEvent(t,n))})))((({notifications:e,reminders:t,applications:n,streams:i,platforms:o,searchMode:r,searchQuery:a,visible:c,errors:u,category:f,clearSearch:p,removeNotifications:S,setSearchMode:P,searchNotifications:M,closeCenter:E,dismissError:T,raiseAnalyticsEvent:k})=>{const I=s.useContext(_.HistoryContext),D=s.useContext(x.WindowContext);s.useEffect((()=>{D.document.title="Center"}),[]);const $=s.useCallback((()=>{S("reminders"===f?t:e),null==k||k({type:"Center",action:"Clear All",skipValueHashing:!0})}),[e,t,S,f]),
|
|
811
|
+
`;t.NotificationsPanel=(0,c.connect)((e=>({notifications:(0,f.selectPlatformNotifications)(e),reminders:(0,f.selectPlatformReminders)(e),applications:e.applications,streams:e.streams,platforms:e.platform.list,centerLocked:e.centerLocked,searchResults:(0,f.selectPlatformSearchResults)(e),searchQuery:e.search.query,searchMode:e.search.searchMode,visible:e.centerVisible,errors:(0,f.selectVisibleErrors)(e),category:e.categories.selectedCategory})),(e=>({setSearchMode:t=>e(new p.SetSearchMode(t)),searchNotifications:t=>e(new p.SearchNotifications(t)),clearSearch:()=>e(new p.ClearSearch),removeNotifications:t=>e(new f.RemoveNotifications(t,"ClearAll")),closeCenter:()=>e(new f.ToggleCenterVisibility(f.ToggleCenterVisibilitySource.BUTTON,!1)),dismissError:t=>e(new f.DismissError(t)),raiseAnalyticsEvent:async(t,n)=>e(new f.RaiseAnalyticsEvent(t,n))})))((({notifications:e,reminders:t,applications:n,streams:i,platforms:o,searchMode:r,searchQuery:a,visible:c,errors:u,category:f,clearSearch:p,removeNotifications:S,setSearchMode:P,searchNotifications:M,closeCenter:E,dismissError:T,raiseAnalyticsEvent:k})=>{const I=s.useContext(_.HistoryContext),D=s.useContext(x.WindowContext);s.useEffect((()=>{D.document.title="Center"}),[]);const $=s.useCallback((()=>{S("reminders"===f?t:e),null==k||k({type:"Center",action:"Clear All",skipValueHashing:!0})}),[e,t,S,f]),A=r?()=>P(!1):void 0;return s.createElement(C,{flexDirection:"column",flexGrow:1,"data-testid":"notifications-panel-container"},s.createElement(w.GlobalProviderStyles,null),s.createElement(m.Header,{title:"Notifications",onBack:A,onClose:E,badgeCount:e.length},s.createElement(d.HeaderButton,{"aria-label":"Search",onClick:()=>{P(!r),null==k||k({type:"Center",action:"Select Search",skipValueHashing:!0})}},s.createElement(l.Icon,{icon:"MagnifyingGlassIcon",size:"base"})),s.createElement(d.HeaderButton,{"aria-label":"Settings",onClick:()=>{r&&P(!1),I.push(O.ROUTES.SETTINGS)}},s.createElement(l.Icon,{icon:"GearIcon",size:"base"}))),s.createElement(h.ErrorPanel,{errors:u,onDismiss:e=>{T(e)}}),s.createElement(g.PlatformsPanel,null),r?s.createElement(j,null,s.createElement(y.TextInput,{onChange:e=>{e.value.length>0?M(e.value.trim()):p()},clearControl:!0,focusOnMount:!0,icon:"MagnifyingGlassIcon",placeholder:"Search within your Notifications"})):s.createElement(v.CategoriesPanel,{onClearAll:$}),c?s.createElement(b.NotificationView,{id:"notification-panel-view",reminders:t,notifications:e,searchMode:r,searchString:a,applications:n,streams:i,platforms:o}):s.createElement(s.Fragment,null))}))},6370:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useFormContainerExpander=void 0;const i=n(9130),o=n(5932),r=n(7953),a=n(7216),l=n(1827);t.useFormContainerExpander=e=>{const t=(0,i.useSelector)((e=>e.activeForms)),n=t&&t.focusedFormNotificationId==e,s=(0,i.useDispatch)(),c=(0,o.useContext)(r.ResizeContext);return(0,o.useEffect)((()=>{"emitResize"in c&&setTimeout((()=>c.emitResize()),200)}),[c,n]),(0,o.useEffect)((()=>()=>{n&&s(new a.NotificationFormEditComplete)}),[]),[!!n,()=>s(n?new a.NotificationFormEditComplete:new l.NotificationFormEditStart(e))]}},6406: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.AdvancedSettingsView=void 0;const l=r(n(5932)),s=a(n(2230)),c=n(9130),u=n(7250),d=n(7234),f=n(7451),p=(0,s.default)(u.Box)`
|
|
812
812
|
background-color: ${({theme:e})=>e.palette.background6};
|
|
813
813
|
padding-left: ${({theme:e})=>e.px.small};
|
|
814
814
|
padding-right: ${({theme:e})=>e.px.small};
|
|
@@ -1185,7 +1185,7 @@
|
|
|
1185
1185
|
opacity: unset;
|
|
1186
1186
|
}
|
|
1187
1187
|
}
|
|
1188
|
-
`},5825:function(e,t,n){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.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||i(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(4947),t),o(n(6588),t)},6368:function(e,t,n){var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ContentMenu=t.findPathToItemWithId=void 0;const o=n(4848),r=n(2015),a=n(1255),l=i(n(2770)),s=n(2094),c=n(467),u=i(n(5823));t.findPathToItemWithId=(e,n,i)=>{if(e.id===i)return n;if(e.children)for(let o=0;o<e.children.length;++o){const r=e.children[o];n.push(r.id);const a=(0,t.findPathToItemWithId)(r,n,i);if(a)return a;n.pop()}},t.ContentMenu=({structure:e,handleClickItem:n,handleBookmarkItem:i,targetId:l})=>{const[
|
|
1188
|
+
`},5825:function(e,t,n){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.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||i(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(4947),t),o(n(6588),t)},6368:function(e,t,n){var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ContentMenu=t.findPathToItemWithId=void 0;const o=n(4848),r=n(2015),a=n(1255),l=i(n(2770)),s=n(2094),c=n(467),u=i(n(5823));t.findPathToItemWithId=(e,n,i)=>{if(e.id===i)return n;if(e.children)for(let o=0;o<e.children.length;++o){const r=e.children[o];n.push(r.id);const a=(0,t.findPathToItemWithId)(r,n,i);if(a)return a;n.pop()}},t.ContentMenu=({structure:e,handleClickItem:n,handleBookmarkItem:i,targetId:l,disableBookmarking:s})=>{const[f,p]=(0,r.useState)([]),[h,m]=(0,r.useState)(),b=(0,r.useRef)(null),[g,v]=(0,r.useState)({}),y=(0,r.useCallback)((()=>{b.current&&b.current.scrollTo({left:b.current.scrollWidth,behavior:"smooth"})}),[]),_=(0,r.useCallback)(((e,t)=>{v(e&&t?{label:e,element:t}:{})}),[]);(0,r.useEffect)((()=>{if(l){const n=(0,t.findPathToItemWithId)({id:"",children:e},[],l);if(n)return p(n),void m(`content-menu-item-${l}`)}m(void 0)}),[l]),(0,r.useEffect)((()=>{y()}),[f]);const[x,O]=(0,r.useState)(null);return(0,r.useEffect)((()=>{var t,n;O(null!==(n=null===(t=null==e?void 0:e[0])||void 0===t?void 0:t.id)&&void 0!==n?n:null)}),e),(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(u.default,{label:g.label,element:g.element}),(0,o.jsx)(d,{ref:b,role:"tree",onScroll:()=>_(),children:(0,o.jsx)(c.ContentMenuContext.Provider,{value:{focusedContentItemId:x,setFocusedContentItemId:e=>O(e)},children:(0,o.jsx)(a.ContentMenuColumn,{entries:e,depth:0,path:f,targetItemId:h,setCurrentlySelectedPath:p,handleClickItem:n,handleBookmarkItem:i,parentEntry:null,toggleTooltip:_,disableBookmarking:s})})})]})};const d=(0,l.default)(s.Box)`
|
|
1189
1189
|
height: 100%;
|
|
1190
1190
|
width: 100%;
|
|
1191
1191
|
|
|
@@ -1194,7 +1194,7 @@
|
|
|
1194
1194
|
|
|
1195
1195
|
overflow-x: auto;
|
|
1196
1196
|
overflow-y: hidden;
|
|
1197
|
-
`},1255:function(e,t,n){var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ContentMenuColumn=void 0;const o=n(4848),r=i(n(2770)),a=n(6418),l=n(2015),s=n(8307),c=n(467);t.ContentMenuColumn=({entries:e,depth:n,path:i,targetItemId:r,setCurrentlySelectedPath:a,handleClickItem:f,handleBookmarkItem:p,parentEntry:h,toggleTooltip:m})=>{const
|
|
1197
|
+
`},1255:function(e,t,n){var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ContentMenuColumn=void 0;const o=n(4848),r=i(n(2770)),a=n(6418),l=n(2015),s=n(8307),c=n(467);t.ContentMenuColumn=({entries:e,depth:n,path:i,targetItemId:r,setCurrentlySelectedPath:a,handleClickItem:f,handleBookmarkItem:p,parentEntry:h,toggleTooltip:m,disableBookmarking:b})=>{const g=(0,l.useRef)(null),v=i[n],y=v?e.find((e=>e.id===v)):void 0,{setFocusedContentItemId:_}=(0,l.useContext)(c.ContentMenuContext);(0,l.useEffect)((()=>{if(r&&y){const e=document.getElementById(`content-menu-item-${y.id}`);if(e&&g.current){const t=e.getBoundingClientRect().top-g.current.children[0].getBoundingClientRect().top;g.current.scrollTo({top:t,behavior:"smooth"})}}}),[r]);const x=(0,l.useCallback)((e=>{a((t=>e.id?(t[n]=e.id,t.slice(0,n+1)):t.slice(0,n))),e.children.length&&_(e.children[0].id)}),[]);return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(u,{ref:g,role:"group",children:e.length>0?(0,o.jsx)("div",{children:e.map((t=>(0,o.jsx)(s.ContentMenuItem,{entry:t,role:"treeitem","aria-level":n+1,active:"folder"===t.type&&t.id===v,"aria-expanded":"folder"===t.type?!(!y||y.id!==t.id):void 0,handleClick:(e,t)=>{"folder"===e.type?x(e):f(e,t)},handleBookmark:p,onKeyDown:n=>((t,n)=>{const i=e.indexOf(n);switch(t.key){case"ArrowUp":{t.preventDefault();const n=e[i-1];n&&_(n.id);break}case"ArrowDown":{t.preventDefault();const n=e[i+1];n&&_(n.id);break}case"ArrowLeft":h&&(t.preventDefault(),_(h.id));break;case"Enter":case" ":case"ArrowRight":if(t.currentTarget!==t.target)return;if(t.preventDefault(),"folder"===n.type)x(n),n.children.length&&_(n.children[0].id);else if("ArrowRight"!==t.key){const e={ctrlKey:t.ctrlKey,metaKey:t.metaKey,shiftKey:t.shiftKey};f(n,e)}}})(n,t),toggleTooltip:m,disableBookmarking:b},t.id)))}):(0,o.jsx)(d,{children:"No content available."})}),y&&"folder"===y.type&&(0,o.jsx)(t.ContentMenuColumn,{entries:y.children,depth:n+1,path:i,targetItemId:r,setCurrentlySelectedPath:a,handleClickItem:f,handleBookmarkItem:p,parentEntry:y,toggleTooltip:m,disableBookmarking:b})]})};const u=(0,r.default)(a.MenuFrame).attrs({className:"content-menu-column-frame"})`
|
|
1198
1198
|
height: 100%;
|
|
1199
1199
|
width: 241px;
|
|
1200
1200
|
padding: ${({theme:e})=>e.px.xsmall};
|
|
@@ -1213,7 +1213,7 @@
|
|
|
1213
1213
|
align-items: center;
|
|
1214
1214
|
|
|
1215
1215
|
user-select: none;
|
|
1216
|
-
`},467:function(e,t,n){var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ContentMenuContext=void 0;const o=i(n(2015));t.ContentMenuContext=o.default.createContext({focusedContentItemId:null,setFocusedContentItemId:()=>{}})},8307:function(e,t,n){var i,o=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]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||(i=function(e){return i=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},i(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=i(e),a=0;a<n.length;a++)"default"!==n[a]&&o(t,e,n[a]);return r(t,e),t}),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.ContentMenuItemContainer=t.ContentMenuItem=void 0;const s=n(4848),c=a(n(2770)),u=n(6418),d=n(5917),f=n(2015),p=n(5699),h=n(467),m=n(2094);t.ContentMenuItem=e=>{var n,{entry:i,active:o,handleClick:r,handleBookmark:a,toggleTooltip:c}=e,
|
|
1216
|
+
`},467:function(e,t,n){var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ContentMenuContext=void 0;const o=i(n(2015));t.ContentMenuContext=o.default.createContext({focusedContentItemId:null,setFocusedContentItemId:()=>{}})},8307:function(e,t,n){var i,o=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]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||(i=function(e){return i=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},i(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=i(e),a=0;a<n.length;a++)"default"!==n[a]&&o(t,e,n[a]);return r(t,e),t}),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.ContentMenuItemContainer=t.ContentMenuItem=void 0;const s=n(4848),c=a(n(2770)),u=n(6418),d=n(5917),f=n(2015),p=n(5699),h=n(467),m=n(2094);t.ContentMenuItem=e=>{var n,{entry:i,active:o,handleClick:r,handleBookmark:a,toggleTooltip:c,disableBookmarking:m}=e,y=l(e,["entry","active","handleClick","handleBookmark","toggleTooltip","disableBookmarking"]);const{label:_,type:x}=i,O=(0,f.useRef)(null),{focusedContentItemId:w}=(0,f.useContext)(h.ContentMenuContext),C=(0,f.useCallback)((()=>{"item"===i.type&&"desktop"===i.itemData.appType&&O.current&&c("Launch Desktop App",O.current)}),[i]);return(0,f.useEffect)((()=>{var e;i.id===w&&(null===(e=O.current)||void 0===e||e.focus())}),[w]),(0,s.jsxs)(t.ContentMenuItemContainer,Object.assign({id:`content-menu-item-${i.id}`,onClick:e=>r(i,e),onMouseEnter:C,onMouseLeave:()=>c(),active:o,tabIndex:w===i.id?0:-1,ref:O,"aria-label":i.label},y,{children:["item"===x&&(0,s.jsx)(p.IconWithFallback,{iconUrl:i.icon}),(0,s.jsx)(b,{size:"base",weight:"normal",children:_}),(0,s.jsxs)(g,{children:[!m&&(0,s.jsx)(v,{bookmarked:i.bookmarked,role:"button",onKeyDown:e=>{"Enter"!==e.key&&"Space"!==e.key||(null==e||e.stopPropagation(),a&&a(i))},onClick:e=>{var t;null==e||e.stopPropagation(),a&&a(i),null===(t=O.current)||void 0===t||t.focus()},"data-testid":`content-menu-item-${i.id}-bookmark-icon`,tabIndex:w===i.id?0:-1,"aria-label":i.bookmarked?`Remove ${i.label} from favorites`:`Add ${i.label} to favorites`,children:i.bookmarked?(0,s.jsx)(d.Icon,{icon:"StarFilledIcon"}):(0,s.jsx)(d.Icon,{icon:"StarIcon"})}),"item"===i.type&&"desktop"===(null===(n=i.itemData)||void 0===n?void 0:n.appType)&&(0,s.jsx)(u.MenuItemRightIcon,{icon:"ArrowTopRightIcon"}),"folder"===x&&(0,s.jsx)(u.MenuItemRightIcon,{icon:"ChevronRightIcon","data-testid":`content-menu-item-${i.id}-chevron-icon`})]})]}))};const b=(0,c.default)(u.MenuItemText)`
|
|
1217
1217
|
padding-right: ${({theme:e})=>e.px.large};
|
|
1218
1218
|
`,g=(0,c.default)(m.Box)`
|
|
1219
1219
|
margin-left: auto;
|
|
@@ -1231,8 +1231,18 @@
|
|
|
1231
1231
|
margin-left: unset;
|
|
1232
1232
|
}
|
|
1233
1233
|
`:c.css`
|
|
1234
|
-
|
|
1234
|
+
opacity: 0;
|
|
1235
1235
|
`};
|
|
1236
|
+
|
|
1237
|
+
&:focus {
|
|
1238
|
+
outline: none;
|
|
1239
|
+
}
|
|
1240
|
+
|
|
1241
|
+
&:focus-visible {
|
|
1242
|
+
opacity: 1;
|
|
1243
|
+
outline: solid 1px ${({theme:e})=>e.palette.statusActive};
|
|
1244
|
+
border-radius: ${({theme:e})=>e.radius.small};
|
|
1245
|
+
}
|
|
1236
1246
|
`;t.ContentMenuItemContainer=(0,c.default)(u.MenuItemInnerContainer).attrs((({active:e})=>({className:["content-menu-item-container",e?"content-menu-item-container-active":""].filter(Boolean).join(" ")})))`
|
|
1237
1247
|
&:focus {
|
|
1238
1248
|
outline: none;
|
|
@@ -1241,6 +1251,10 @@
|
|
|
1241
1251
|
&:focus-visible {
|
|
1242
1252
|
outline: solid 1px ${({theme:e})=>e.palette.statusActive};
|
|
1243
1253
|
border-radius: ${({theme:e})=>e.radius.small};
|
|
1254
|
+
|
|
1255
|
+
${v} {
|
|
1256
|
+
opacity: 1;
|
|
1257
|
+
}
|
|
1244
1258
|
}
|
|
1245
1259
|
|
|
1246
1260
|
${({theme:e,active:t})=>t&&c.css`
|
|
@@ -1326,7 +1340,7 @@
|
|
|
1326
1340
|
border-top-color: ${({theme:e})=>e.palette.background1};
|
|
1327
1341
|
`}
|
|
1328
1342
|
}
|
|
1329
|
-
`},4810:function(e,t,n){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.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||i(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(6368),t)},244:function(e,t,n){var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.CustomContextMenu=t.CONTEXT_MENU_ANIMATION_DURATION=t.PRIOR_CONTEXT_MENU_CLASS=t.BASE_CONTEXT_MENU=t.ACTIVE_CONTEXT_MENU_CLASS=t.CONTEXT_MENU_FRAME_ID=void 0;const o=n(4848),r=n(2015),a=i(n(2770)),l=n(9005),s=n(68),c=n(6972),u=n(8666),d=n(3247),f=n(8429),p=n(6418);t.CONTEXT_MENU_FRAME_ID="context_menu_frame",t.ACTIVE_CONTEXT_MENU_CLASS="active_context_menu",t.BASE_CONTEXT_MENU="base_context_menu",t.PRIOR_CONTEXT_MENU_CLASS="previous_context_menu",t.CONTEXT_MENU_ANIMATION_DURATION=200,t.CustomContextMenu=({menuTemplate:e,onClick:n,icon:i,onMenuResize:a,onContextMenuReady:p,isWindows:b=!0})=>{var g;const v=(0,r.useRef)(null),[y,_]=(0,r.useState)(!1),[x,O]=(0,r.useState)({width:160,height:160}),[w,C]=(0,r.useState)(0),[j,S]=(0,r.useState)([]),[P,M]=(0,r.useState)(),[E,T]=(0,r.useState)([]),[k,I]=(0,r.useState)(e.map((e=>e.label||""))),[D,$]=(0,r.useState)(-1);(0,r.useEffect)((()=>{I(e.map((e=>e.label||""))),$(k.findIndex((e=>e===P)))}),[e]);const{width:
|
|
1343
|
+
`},4810:function(e,t,n){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.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||i(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(6368),t)},244:function(e,t,n){var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.CustomContextMenu=t.CONTEXT_MENU_ANIMATION_DURATION=t.PRIOR_CONTEXT_MENU_CLASS=t.BASE_CONTEXT_MENU=t.ACTIVE_CONTEXT_MENU_CLASS=t.CONTEXT_MENU_FRAME_ID=void 0;const o=n(4848),r=n(2015),a=i(n(2770)),l=n(9005),s=n(68),c=n(6972),u=n(8666),d=n(3247),f=n(8429),p=n(6418);t.CONTEXT_MENU_FRAME_ID="context_menu_frame",t.ACTIVE_CONTEXT_MENU_CLASS="active_context_menu",t.BASE_CONTEXT_MENU="base_context_menu",t.PRIOR_CONTEXT_MENU_CLASS="previous_context_menu",t.CONTEXT_MENU_ANIMATION_DURATION=200,t.CustomContextMenu=({menuTemplate:e,onClick:n,icon:i,onMenuResize:a,onContextMenuReady:p,isWindows:b=!0})=>{var g;const v=(0,r.useRef)(null),[y,_]=(0,r.useState)(!1),[x,O]=(0,r.useState)({width:160,height:160}),[w,C]=(0,r.useState)(0),[j,S]=(0,r.useState)([]),[P,M]=(0,r.useState)(),[E,T]=(0,r.useState)([]),[k,I]=(0,r.useState)(e.map((e=>e.label||""))),[D,$]=(0,r.useState)(-1);(0,r.useEffect)((()=>{I(e.map((e=>e.label||""))),$(k.findIndex((e=>e===P)))}),[e]);const{width:A,height:N}=(0,s.useResizeContextMenu)(P),{handleNavigateToSubmenu:F,handleNavigateBackToParent:R,handleNavigateToBase:B}=(0,u.useContextMenuNavigation)(w,C,E,T,P,M,O,$,j,a);return(0,r.useEffect)((()=>{S((0,c.getMenuNavigationOrder)(e)),M(t.BASE_CONTEXT_MENU),T([]),O({width:A,height:N})}),[e]),(0,d.useContextMenuKeyboardNavigation)(null===(g=j.find((e=>e.parentLabel===P)))||void 0===g?void 0:g.menuTemplate,E,P,D,$,n,F,R,B),(0,r.useEffect)((()=>{v.current&&(y||(p&&p(),_(!0)))}),[v.current]),(0,o.jsx)(h,{id:t.CONTEXT_MENU_FRAME_ID,transitionSpeed:w,isWindows:b,children:j.map((({parentLabel:e,menuTemplate:r})=>(0,o.jsx)("div",{ref:e===P?v:void 0,children:(0,o.jsxs)(m,{className:(0,c.getClassName)(e,P,E),activeMenuWidth:x.width,transitionSpeed:w,id:e,children:[e!==t.BASE_CONTEXT_MENU?(0,o.jsx)(l.CustomContextMenuItem,{type:"submenuHeader",label:e,onBack:()=>R(e,"click"),onClose:B,showShouldHomeButton:E.slice(2).includes(e)||E.length>=2&&P===e,selected:-1===D},`${e}-submenu-header`):i&&(0,o.jsx)(f.RootMenuHeader,{icon:i}),r.map(((t,i)=>(0,o.jsx)(l.CustomContextMenuItem,Object.assign({onClick:e=>{t.hasSubMenu?F(t.label||""):n(e),$(-2)}},t,{selected:D===i}),`${e}-${t.label}-${i}`)))]})},e)))})};const h=a.default.div`
|
|
1330
1344
|
position: relative;
|
|
1331
1345
|
min-width: fit-content;
|
|
1332
1346
|
min-height: fit-content;
|
|
@@ -2489,7 +2503,7 @@
|
|
|
2489
2503
|
margin-bottom: ${({theme:e})=>e.px.small};
|
|
2490
2504
|
display: flex;
|
|
2491
2505
|
gap: ${({theme:e})=>e.px.xsmall};
|
|
2492
|
-
`},7380:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ToggleFilter=void 0;const i=n(7451),o=n(2373);t.ToggleFilter=class{constructor(){this._toggleBlockTimer=new o.Timer(750),this._blurBlockTimer=new o.Timer(750)}recordBlur(){return this._blurBlockTimer.running?(this._blurBlockTimer.clear(),!1):(this._toggleBlockTimer.start(),!0)}recordToggle(e){if(e===i.ToggleCenterVisibilitySource.API||e===i.ToggleCenterVisibilitySource.TRAY){const e=this._toggleBlockTimer.running;return this._toggleBlockTimer.clear(),!e&&(this._blurBlockTimer.start(),!0)}return!0}}},7383:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.initialSecuritySettingsState=void 0,t.initialSecuritySettingsState={notificationSecurityRules:{}}},7446:e=>{"use strict";e.exports=x},7451: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.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||i(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.ApplySnapshot=t.UsingCustomManifest=t.RaiseAnalyticsEvent=t.HideModal=t.ShowModal=t.selectVisibleErrors=t.selectErrors=t.Unfreeze=t.Freeze=t.UpdateAppToastPersistState=t.SetSelectedPlatform=t.UpdateStreamMuteState=t.UpdateAppMuteState=t.ExpireNotification=t.DismissError=t.PushError=t.RegisterStream=t.RegisterApplication=t.ToggleCenterMuted=t.ToggleCenterLocked=t.BlurCenter=t.HideCenter=t.ShowCenter=t.ToggleCenterVisibility=t.ClickFragment=t.ClickButton=t.ClickNotification=t.RemoveNotifications=t.InitiateRemoveAllNotifications=t.UpdateNotification=t.CreateNotification=t.ToggleCenterVisibilitySource=void 0;const r=n(6566),a=n(6455),l=n(7380),s=n(3363),c=n(0),u=n(4887),d=n(6012),f=n(5425),p=n(8136),h=n(7676),m=n(2471),b=n(8320),g=n(7031),v=n(7261),y=n(8001);var _;o(n(7540),t),function(e){e[e.API=0]="API",e[e.TRAY=1]="TRAY",e[e.BUTTON=2]="BUTTON",e[e.INTERNAL=3]="INTERNAL",e[e.HOTKEY=4]="HOTKEY"}(_=t.ToggleCenterVisibilitySource||(t.ToggleCenterVisibilitySource={}));class x extends r.Action{get notification(){return this._notification}constructor(e){super(),this._notification=e}async handleStreamStatus(e,t){const n=e.notification.stream;if(n){const i=t.state.streams.get(n.id);if(!i||i.displayName!==n.displayName){const i=e.source.identity.uuid;await t.dispatch(new N(n,i))}}}async call(e,t){var n;const i=this.notification;this._notification=Object.assign(Object.assign({},this.notification),{title:(0,s.getStreamTitle)(e.state.streams,null===(n=i.notification.stream)||void 0===n?void 0:n.id)||(0,s.getSourceTitle)(this.notification.source,e.state.applications)});const o=e.state.reminders.find((e=>e.id===i.id));o&&await e.dispatch(new b.CancelReminder(o));const r=e.state.notifications.filter((e=>e.id===i.id));r.length&&await e.dispatch(new C(r)),await this.handleStreamStatus(i,e),await t()}reduce(e){const{notification:t}=this,n=e.notifications.slice(),i=e.notifications.findIndex((e=>e.id===t.id));i>=0?(console.warn(`Attempted to add a notification with duplicate id '${t.id}'. Will replace existing notification.`),n[i]=t):n.push(t);const o=e.stickyNotifications.slice();if((0,d.isSticky)(t.notification)){const e=o.findIndex((e=>e.id===t.id));e>=0?o[e]=t:o.push(t)}const r=(0,p.insertNotificationIntoSortedMaps)(e.sortedNotifications,t),a=new Map(e.platform.counts),l=t.notification.platform;if(l){const e=a.get(l);a.set(l,e?e+1:1)}return Object.assign(Object.assign({},e),{notifications:n,stickyNotifications:o,sortedNotifications:r,platform:Object.assign(Object.assign({},e.platform),{counts:a})})}}t.CreateNotification=x;class O extends r.Action{constructor(e){super(),this.updatePayload=e,this._updatedNotification=null}get updatedNotification(){return this._updatedNotification}async call(e,t){e.state.reminders.find((e=>e.notification.id===this.updatePayload.id))&&await e.dispatch(new b.UpdateReminder(this.updatePayload)),await t()}reduce(e){const t=[...e.notifications];return this._updatedNotification=(0,g.updateCollection)(t,this.updatePayload),this._updatedNotification?Object.assign(Object.assign(Object.assign({},e),{notifications:t}),{stickyNotifications:(n=this._updatedNotification)&&(0,d.isSticky)(n.notification)?e.stickyNotifications.map((e=>e.id===n.id?n:e)):e.stickyNotifications,sortedNotifications:(0,p.insertNotificationIntoSortedMaps)(e.sortedNotifications,n)}):Object.assign({},e);var n}}t.UpdateNotification=O;class w extends r.Action{constructor(e){super(),this.notifications=e}}t.InitiateRemoveAllNotifications=w;class C extends r.Action{constructor(e,t){super(),this.notifications=e,this.action=t}async call(e,t){const{notifications:n}=this,i=n.map((e=>e.id)),o=e.state.reminders.filter((e=>i.includes(e.id)));for(const t of o)await e.dispatch(new b.CancelReminder(t));for(const e of n)await v.removeNotification.emit(e);await t();const r=(0,f.getDefaultPlatform)(e);r&&await e.dispatch(new z(r))}reduce(e){const{notifications:t}=this,n=t.map((e=>e.id));let i=e.stickyNotifications.slice();t.forEach((e=>{(0,d.isSticky)(e.notification)&&(i=i.filter((t=>t.id!==e.id)))}));let o=Object.assign({},e.sortedNotifications);const r=new Map(e.platform.counts);for(const e of t){o=(0,p.removeNotificationFromSortedMaps)(o,e);const t=e.notification.platform;if(t){const e=r.get(t);r.set(t,e?e-1:1)}}return Object.assign(Object.assign({},e),{notifications:e.notifications.filter((e=>-1===n.indexOf(e.id))),stickyNotifications:i,search:Object.assign(Object.assign({},e.search),{results:e.search.results.filter((({item:e})=>-1===n.indexOf(e.id)))}),sortedNotifications:o,platform:Object.assign(Object.assign({},e.platform),{counts:r})})}}t.RemoveNotifications=C;class j extends r.Action{constructor(e){super(),this.notification=e}async call(e,t){var n,i;(null===(n=this.notification.notification.onSelect)||void 0===n?void 0:n.__NOOP__)===a.ActionNoopType.EVENT_DISMISS&&console.warn("[DEPRECATED]: __NOOP__ has been deprecated, Notifications now will not trigger the dismiss action when the body is clicked by default."),(null===(i=this.notification.notification.onSelect)||void 0===i?void 0:i.BODY_CLICK)===a.ActionBodyClickType.DISMISS_EVENT&&(e.state.centerVisible?await e.dispatch(new C([this.notification])):await e.dispatch(new h.MinimizeToast(this.notification))),await(0,f.getTargetOrError)(e,this.notification.notification)&&await t()}}t.ClickNotification=j;class S extends r.Action{constructor(e,t){super(),this.notification=e,this.buttonIndex=t}async call(e,t){await(0,f.getTargetOrError)(e,this.notification.notification)&&await Promise.all([t(),e.dispatch(new C([this.notification]))])}}t.ClickButton=S;class P extends r.Action{constructor(e,t,n){super(),this.notification=e,this.fragment=t,this.isToast=n}}t.ClickFragment=P;class M extends r.Action{constructor(e,t){super(),this.source=e,this.visible=t}async call(e,t){(this.source===_.INTERNAL||U.recordToggle(this.source))&&await t();const n=void 0!==this.visible?this.visible:e.state.centerVisible;e.state.settings.clearFiltersOnCenterShow&&this.source!==_.HOTKEY&&n&&(0,y.clearAllFilterSettings)(e),await e.dispatch(new m.SetSearchMode(!1))}reduce(e){const t=void 0!==this.visible?this.visible:!e.centerVisible;return Object.assign(Object.assign({},e),{centerVisible:t})}}t.ToggleCenterVisibility=M;class E extends r.Action{constructor(e){super(),this.navigateToAll=e}async call(e,t){U.recordToggle(_.API),this.navigateToAll&&await e.dispatch(new z(void 0)),await t()}reduce(e){return Object.assign(Object.assign({},e),{centerVisible:!0})}}t.ShowCenter=E;class T extends r.Action{constructor(){super()}reduce(e){return Object.assign(Object.assign({},e),{centerVisible:!1})}}t.HideCenter=T;class k extends r.Action{async call(e,t){U.recordBlur()&&await t()}reduce(e){return Object.assign(Object.assign({},e),{centerVisible:!1})}}t.BlurCenter=k;class I extends r.Action{reduce(e){return Object.assign(Object.assign({},e),{centerLocked:!e.centerLocked})}}t.ToggleCenterLocked=I;class D extends r.Action{reduce(e){return Object.assign(Object.assign({},e),{centerMuted:!e.centerMuted})}}t.ToggleCenterMuted=D;class $ extends r.Action{constructor(e){super(),this.application=e}reduce(e){const t=e.applications.get(this.application.id);let n=e.notifications,i=e.reminders;if(t&&t.title!==this.application.title){const t=this.application.title;n=e.notifications.map((e=>Object.assign(Object.assign({},e),{title:t}))),i=e.reminders.map((e=>Object.assign(Object.assign({},e),{title:t})))}const o=Object.assign(Object.assign({},this.application),{muted:t?t.muted:this.application.muted,persistToasts:t?t.persistToasts:this.application.persistToasts}),r=new Map(e.applications);return r.set(o.id,o),Object.assign(Object.assign({},e),{applications:r,notifications:n,reminders:i})}}t.RegisterApplication=$;class N extends r.Action{constructor(e,t){super(),this.stream=e,this._appId=t}reduce(e){const t=e.streams.get(this.stream.id),n=new Map(e.streams);return n.set(this.stream.id,Object.assign(Object.assign({},this.stream),{muted:!!t&&t.muted,appId:this._appId})),Object.assign(Object.assign({},e),{streams:n})}}t.RegisterStream=N;class A extends r.Action{constructor(e,t){super(),this.id=e,this.message=t}reduce(e){const t=new Map(e.errors);return t.delete(this.id),t.set(this.id,{id:this.id,message:this.message}),Object.assign(Object.assign({},e),{errors:t})}}t.PushError=A;class F extends r.Action{constructor(e){super(),this.id=e}reduce(e){const t=new Map(e.errors);return t.delete(this.id),Object.assign(Object.assign({},e),{errors:t})}}t.DismissError=F;class R extends r.Action{constructor(e){super(),this.notification=e}async call(e,t){await Promise.all([t(),e.dispatch(new C([this.notification]))])}}t.ExpireNotification=R;class B extends r.Action{constructor(e,t){super(),this.application=e,this.muted=t}reduce(e){const t=this.application,n=new Map(e.applications);return n.set(t.id,Object.assign(Object.assign({},t),{muted:this.muted})),Object.assign(Object.assign({},e),{applications:n})}}t.UpdateAppMuteState=B;class L extends r.Action{constructor(e,t){super(),this.stream=e,this.muted=t}reduce(e){const t=this.stream,n=new Map(e.streams);return n.set(t.id,Object.assign(Object.assign({},t),{muted:this.muted})),Object.assign(Object.assign({},e),{streams:n})}}t.UpdateStreamMuteState=L;class z extends r.Action{constructor(e){super(),this.id=e}reduce(e){return Object.assign(Object.assign({},e),{platform:Object.assign(Object.assign({},e.platform),{selected:this.id})})}}t.SetSelectedPlatform=z;class H extends r.Action{constructor(e,t){super(),this.application=e,this.persistToasts=t}reduce(e){const t=this.application,n=new Map(e.applications);return n.set(t.id,Object.assign(Object.assign({},t),{persistToasts:this.persistToasts})),Object.assign(Object.assign({},e),{applications:n})}}t.UpdateAppToastPersistState=H;class V extends r.KeyedAction{constructor(){super("frozen")}reduce(){return!0}}t.Freeze=V;class W extends r.KeyedAction{constructor(){super("frozen")}reduce(){return!1}}t.Unfreeze=W;const U=new l.ToggleFilter;t.selectErrors=e=>e.errors,t.selectVisibleErrors=(0,c.createSelector)(t.selectErrors,(e=>Array.from(e.values()).slice(-u.maxVisibleUserFacingErrors).reverse()));class G extends r.Action{constructor(e){super(),this.config=e}}t.ShowModal=G;class q extends r.Action{constructor(e){super(),this.id=e}}t.HideModal=q;class K extends r.Action{constructor(e,t){super(),this.event=e,this.platformId=t}}t.RaiseAnalyticsEvent=K;class Z extends r.Action{reduce(e){return Object.assign(Object.assign({},e),{customManifest:!0})}}t.UsingCustomManifest=Z;class Y extends r.Action{constructor(e){super(),this.snapshot=e}reduce(e){const t=new Map(this.snapshot.applications.map((e=>[e.id,e]))),n=new Map(this.snapshot.streams.map((e=>[e.id,e])));let i=h.initialSortedNotificationsState;return this.snapshot.notifications.forEach((e=>{i=(0,p.insertNotificationIntoSortedMaps)(i,e)})),Object.assign(Object.assign({},e),{applications:t,streams:n,notifications:this.snapshot.notifications,reminders:this.snapshot.reminders,sortedNotifications:i})}}t.ApplySnapshot=Y},7527:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SetSelectedCategorySorting=t.SetSelectedCategory=t.CategorySortTypesNamesMap=t.CategoryNamesMap=t.initialCategoryState=void 0;const i=n(6566);t.initialCategoryState={selectedCategory:"all",sortType:"date",sortDirection:"descending"},t.CategoryNamesMap={all:"All","needs-attention":"Needs Attention",sender:"Group by Sender",reminders:"Reminders"},t.CategorySortTypesNamesMap={"date-ascending":"Oldest","date-descending":"Newest","priority-ascending":"Lowest Priority","priority-descending":"Highest Priority"};class o extends i.Action{constructor(e){super(),this.category=e}reduce(e){return Object.assign(Object.assign({},e),{categories:Object.assign(Object.assign({},e.categories),{selectedCategory:this.category})})}}t.SetSelectedCategory=o;class r extends i.Action{constructor(e,t){super(),this.sortType=e,this.sortDirection=t}reduce(e){return Object.assign(Object.assign({},e),{categories:Object.assign(Object.assign({},e.categories),{sortType:this.sortType||e.categories.sortType,sortDirection:this.sortDirection||e.categories.sortDirection})})}}t.SetSelectedCategorySorting=r},7530:e=>{"use strict";e.exports=O},7540:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.selectPlatformNotificationCounts=t.selectPlatformSearchResults=t.selectPlatformReminders=t.selectPlatformNotifications=t.selectActivePlatforms=t.selectCurrentPlatform=t.selectPlatformScheme=t.selectPlatformTheme=t.selectCounts=t.selectPlatforms=t.DeregisterPlatform=t.UpdatePlatformScheme=t.RegisterPlatform=t.initialPlatformState=void 0;const i=n(6566),o=n(0);t.initialPlatformState={list:new Map,counts:new Map};class r extends i.Action{constructor(e){super(),this.platform=e}reduce(e){const t=new Map(e.platform.list);t.set(this.platform.id,Object.assign(Object.assign({},this.platform),{active:!0}));const n=new Map(e.platform.counts);return n.set(this.platform.id,e.notifications.filter((e=>e.notification.platform===this.platform.id)).length),Object.assign(Object.assign({},e),{platform:Object.assign(Object.assign({},e.platform),{list:t,counts:n})})}}t.RegisterPlatform=r;class a extends i.Action{constructor(e,t){super(),this.scheme=e,this.identity=t}reduce(e){let t=e.theme;const n=new Map(e.platform.list);return n.forEach((i=>{i.platformIdentity.uuid===this.identity.uuid&&(n.set(i.id,Object.assign(Object.assign({},i),{scheme:this.scheme})),i.id===e.platform.selected&&(t={themes:i.theme,scheme:this.scheme}))})),Object.assign(Object.assign({},e),{platform:Object.assign(Object.assign({},e.platform),{list:n}),theme:t})}}t.UpdatePlatformScheme=a;class l extends i.KeyedAction{constructor(e){super("platform"),this.id=e}reduce(e){const t=new Map(e.list),n=t.get(this.id);return n?t.set(this.id,Object.assign(Object.assign({},n),{active:!1})):console.warn(`Platform to deregister (id: ${this.id}) could not be found.`),Object.assign(Object.assign({},e),{list:t})}}t.DeregisterPlatform=l,t.selectPlatforms=e=>e.platform.list,t.selectCounts=e=>e.platform.counts,t.selectPlatformTheme=(0,o.createSelector)([t.selectPlatforms,(e,t)=>t],((e,t)=>{var n;return null===(n=e.get(t))||void 0===n?void 0:n.theme})),t.selectPlatformScheme=(0,o.createSelector)([t.selectPlatforms,(e,t)=>t],((e,t)=>{var n;return null===(n=e.get(t))||void 0===n?void 0:n.scheme})),t.selectCurrentPlatform=e=>e.platform.selected,t.selectActivePlatforms=(0,o.createSelector)(t.selectPlatforms,(e=>Array.from(e.values()).filter((e=>e.active)))),t.selectPlatformNotifications=(0,o.createSelector)((e=>e.notifications),t.selectCurrentPlatform,((e,t)=>t?e.filter((e=>e.notification.platform===t)):e)),t.selectPlatformReminders=(0,o.createSelector)((e=>e.reminders),t.selectCurrentPlatform,((e,t)=>t?e.filter((e=>e.notification.platform===t)):e)),t.selectPlatformSearchResults=(0,o.createSelector)((e=>e.search.results),t.selectCurrentPlatform,((e,t)=>t?e.filter((e=>e.item.notification.platform===t)):e)),t.selectPlatformNotificationCounts=(0,o.createSelector)([t.selectCounts,(e,t)=>t],((e,t)=>e.get(t)||0))},7581:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useModalDialog=void 0;const i=n(5932),o=n(7049),r=n(6975),a=n(3413),l=n(6415);t.useModalDialog=(e,t,n,s,c,u,d)=>{const f=(0,i.useRef)(null),[p,h]=(0,i.useState)(!1),[m]=(0,o.usePosition)(),[b,g]=(0,i.useState)(0),{setTimePickerConfig:v,setDatePickerConfig:y,setMenuConfig:_,setIsTimePickerModalOpen:x,setIsDatePickerModalOpen:O,setIsMenuModalOpen:w,setModalType:C}=(0,i.useContext)(l.WebModalContext);return(0,i.useEffect)((()=>{if(p){const i=f.current,o=i?m(i):null;if(o&&i){const l={id:(0,a.randomUUID)()},p=Object.assign(Object.assign({},s(n(f),i,o)),{onDismiss:e=>{g(b+1),h(!1),c(e),"web"===u&&("time"===d?x(!1):"date"===d?O(!1):"menu"===d&&w(!1))},identity:l}),m=()=>t(l.id);return"desktop"===u?(e(p),(0,r.subscribeScrollableContainers)(i,m)):"web"===u&&(console.log("setting modal config",d),C("widget"),"time"===d?(v(Object.assign({},p)),x(!0)):"date"===d?(y(Object.assign({},p)),O(!0)):"menu"===d&&(_(Object.assign({},p)),w(!0))),()=>{i&&"desktop"===u&&(0,r.unsubscribeScrollableContainers)(i,m)}}}}),[p,f.current]),[p,h,f,b]}},7586:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ROUTES=void 0,t.ROUTES={NOTIFICATIONS:"/center/notifications",SETTINGS:"/center/settings",ADVANCED_SETTINGS:"/center/settings/advanced"}},7603: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.MultiFieldFormContainer=void 0;const o=n(7250),r=i(n(5932)),a=i(n(2230)),l=n(6370),s=n(388),c=n(1270),u=n(4116),d=n(7379),f=n(4515),p=n(3081);t.MultiFieldFormContainer=({notificationId:e,templateContent:t,fields:n,children:i})=>{const a=r.default.useRef(null),[m,b]=(0,l.useFormContainerExpander)(e),g=(0,u.useFormError)(e);return(0,s.useCollapsibleCardHeaderEdgeCaseBehavior)(a,t,m,b),(0,c.useCollapsibleCardHeaderScroll)(a,t,m),(0,p.useScrollToFirstElementOnExpand)(a,m),r.default.createElement(h,null,r.default.createElement(o.CollapsibleCardStateless,{ref:a,onExpand:b,title:r.default.createElement(f.CollapsibleCardTitle,{expanded:m,fieldTitles:n.map((e=>{var t;return null!==(t=e.label)&&void 0!==t?t:"Unlabeled Field"}))}),headerSettings:{fixedHeader:!0,zIndex:1e3},expanded:m||!1},g?r.default.createElement(d.FormError,{error:g}):null,i))};const h=(0,a.default)(o.Box)`
|
|
2506
|
+
`},7380:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ToggleFilter=void 0;const i=n(7451),o=n(2373);t.ToggleFilter=class{constructor(){this._toggleBlockTimer=new o.Timer(750),this._blurBlockTimer=new o.Timer(750)}recordBlur(){return this._blurBlockTimer.running?(this._blurBlockTimer.clear(),!1):(this._toggleBlockTimer.start(),!0)}recordToggle(e){if(e===i.ToggleCenterVisibilitySource.API||e===i.ToggleCenterVisibilitySource.TRAY){const e=this._toggleBlockTimer.running;return this._toggleBlockTimer.clear(),!e&&(this._blurBlockTimer.start(),!0)}return!0}}},7383:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.initialSecuritySettingsState=void 0,t.initialSecuritySettingsState={notificationSecurityRules:{}}},7446:e=>{"use strict";e.exports=x},7451: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.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||i(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.ApplySnapshot=t.UsingCustomManifest=t.RaiseAnalyticsEvent=t.HideModal=t.ShowModal=t.selectVisibleErrors=t.selectErrors=t.Unfreeze=t.Freeze=t.UpdateAppToastPersistState=t.SetSelectedPlatform=t.UpdateStreamMuteState=t.UpdateAppMuteState=t.ExpireNotification=t.DismissError=t.PushError=t.RegisterStream=t.RegisterApplication=t.ToggleCenterMuted=t.ToggleCenterLocked=t.BlurCenter=t.HideCenter=t.ShowCenter=t.ToggleCenterVisibility=t.ClickFragment=t.ClickButton=t.ClickNotification=t.RemoveNotifications=t.InitiateRemoveAllNotifications=t.UpdateNotification=t.CreateNotification=t.ToggleCenterVisibilitySource=void 0;const r=n(6566),a=n(6455),l=n(7380),s=n(3363),c=n(0),u=n(4887),d=n(6012),f=n(5425),p=n(8136),h=n(7676),m=n(2471),b=n(8320),g=n(7031),v=n(7261),y=n(8001);var _;o(n(7540),t),function(e){e[e.API=0]="API",e[e.TRAY=1]="TRAY",e[e.BUTTON=2]="BUTTON",e[e.INTERNAL=3]="INTERNAL",e[e.HOTKEY=4]="HOTKEY"}(_=t.ToggleCenterVisibilitySource||(t.ToggleCenterVisibilitySource={}));class x extends r.Action{get notification(){return this._notification}constructor(e){super(),this._notification=e}async handleStreamStatus(e,t){const n=e.notification.stream;if(n){const i=t.state.streams.get(n.id);if(!i||i.displayName!==n.displayName){const i=e.source.identity.uuid;await t.dispatch(new A(n,i))}}}async call(e,t){var n;const i=this.notification;this._notification=Object.assign(Object.assign({},this.notification),{title:(0,s.getStreamTitle)(e.state.streams,null===(n=i.notification.stream)||void 0===n?void 0:n.id)||(0,s.getSourceTitle)(this.notification.source,e.state.applications)});const o=e.state.reminders.find((e=>e.id===i.id));o&&await e.dispatch(new b.CancelReminder(o));const r=e.state.notifications.filter((e=>e.id===i.id));r.length&&await e.dispatch(new C(r)),await this.handleStreamStatus(i,e),await t()}reduce(e){const{notification:t}=this,n=e.notifications.slice(),i=e.notifications.findIndex((e=>e.id===t.id));i>=0?(console.warn(`Attempted to add a notification with duplicate id '${t.id}'. Will replace existing notification.`),n[i]=t):n.push(t);const o=e.stickyNotifications.slice();if((0,d.isSticky)(t.notification)){const e=o.findIndex((e=>e.id===t.id));e>=0?o[e]=t:o.push(t)}const r=(0,p.insertNotificationIntoSortedMaps)(e.sortedNotifications,t),a=new Map(e.platform.counts),l=t.notification.platform;if(l){const e=a.get(l);a.set(l,e?e+1:1)}return Object.assign(Object.assign({},e),{notifications:n,stickyNotifications:o,sortedNotifications:r,platform:Object.assign(Object.assign({},e.platform),{counts:a})})}}t.CreateNotification=x;class O extends r.Action{constructor(e){super(),this.updatePayload=e,this._updatedNotification=null}get updatedNotification(){return this._updatedNotification}async call(e,t){e.state.reminders.find((e=>e.notification.id===this.updatePayload.id))&&await e.dispatch(new b.UpdateReminder(this.updatePayload)),await t()}reduce(e){const t=[...e.notifications];return this._updatedNotification=(0,g.updateCollection)(t,this.updatePayload),this._updatedNotification?Object.assign(Object.assign(Object.assign({},e),{notifications:t}),{stickyNotifications:(n=this._updatedNotification)&&(0,d.isSticky)(n.notification)?e.stickyNotifications.map((e=>e.id===n.id?n:e)):e.stickyNotifications,sortedNotifications:(0,p.insertNotificationIntoSortedMaps)(e.sortedNotifications,n)}):Object.assign({},e);var n}}t.UpdateNotification=O;class w extends r.Action{constructor(e){super(),this.notifications=e}}t.InitiateRemoveAllNotifications=w;class C extends r.Action{constructor(e,t){super(),this.notifications=e,this.action=t}async call(e,t){const{notifications:n}=this,i=n.map((e=>e.id)),o=e.state.reminders.filter((e=>i.includes(e.id)));for(const t of o)await e.dispatch(new b.CancelReminder(t));for(const e of n)await v.removeNotification.emit(e);await t();const r=(0,f.getDefaultPlatform)(e);r&&await e.dispatch(new z(r))}reduce(e){const{notifications:t}=this,n=t.map((e=>e.id));let i=e.stickyNotifications.slice();t.forEach((e=>{(0,d.isSticky)(e.notification)&&(i=i.filter((t=>t.id!==e.id)))}));let o=Object.assign({},e.sortedNotifications);const r=new Map(e.platform.counts);for(const e of t){o=(0,p.removeNotificationFromSortedMaps)(o,e);const t=e.notification.platform;if(t){const e=r.get(t);r.set(t,e?e-1:1)}}return Object.assign(Object.assign({},e),{notifications:e.notifications.filter((e=>-1===n.indexOf(e.id))),stickyNotifications:i,search:Object.assign(Object.assign({},e.search),{results:e.search.results.filter((({item:e})=>-1===n.indexOf(e.id)))}),sortedNotifications:o,platform:Object.assign(Object.assign({},e.platform),{counts:r})})}}t.RemoveNotifications=C;class j extends r.Action{constructor(e){super(),this.notification=e}async call(e,t){var n,i;(null===(n=this.notification.notification.onSelect)||void 0===n?void 0:n.__NOOP__)===a.ActionNoopType.EVENT_DISMISS&&console.warn("[DEPRECATED]: __NOOP__ has been deprecated, Notifications now will not trigger the dismiss action when the body is clicked by default."),(null===(i=this.notification.notification.onSelect)||void 0===i?void 0:i.BODY_CLICK)===a.ActionBodyClickType.DISMISS_EVENT&&(e.state.centerVisible?await e.dispatch(new C([this.notification])):await e.dispatch(new h.MinimizeToast(this.notification))),await(0,f.getTargetOrError)(e,this.notification.notification)&&await t()}}t.ClickNotification=j;class S extends r.Action{constructor(e,t){super(),this.notification=e,this.buttonIndex=t}async call(e,t){await(0,f.getTargetOrError)(e,this.notification.notification)&&await Promise.all([t(),e.dispatch(new C([this.notification]))])}}t.ClickButton=S;class P extends r.Action{constructor(e,t,n){super(),this.notification=e,this.fragment=t,this.isToast=n}}t.ClickFragment=P;class M extends r.Action{constructor(e,t){super(),this.source=e,this.visible=t}async call(e,t){(this.source===_.INTERNAL||U.recordToggle(this.source))&&await t();const n=void 0!==this.visible?this.visible:e.state.centerVisible;e.state.settings.clearFiltersOnCenterShow&&this.source!==_.HOTKEY&&n&&(0,y.clearAllFilterSettings)(e),await e.dispatch(new m.SetSearchMode(!1))}reduce(e){const t=void 0!==this.visible?this.visible:!e.centerVisible;return Object.assign(Object.assign({},e),{centerVisible:t})}}t.ToggleCenterVisibility=M;class E extends r.Action{constructor(e){super(),this.navigateToAll=e}async call(e,t){U.recordToggle(_.API),this.navigateToAll&&await e.dispatch(new z(void 0)),await t()}reduce(e){return Object.assign(Object.assign({},e),{centerVisible:!0})}}t.ShowCenter=E;class T extends r.Action{constructor(){super()}reduce(e){return Object.assign(Object.assign({},e),{centerVisible:!1})}}t.HideCenter=T;class k extends r.Action{async call(e,t){U.recordBlur()&&await t()}reduce(e){return Object.assign(Object.assign({},e),{centerVisible:!1})}}t.BlurCenter=k;class I extends r.Action{reduce(e){return Object.assign(Object.assign({},e),{centerLocked:!e.centerLocked})}}t.ToggleCenterLocked=I;class D extends r.Action{reduce(e){return Object.assign(Object.assign({},e),{centerMuted:!e.centerMuted})}}t.ToggleCenterMuted=D;class $ extends r.Action{constructor(e){super(),this.application=e}reduce(e){const t=e.applications.get(this.application.id);let n=e.notifications,i=e.reminders;if(t&&t.title!==this.application.title){const t=this.application.title;n=e.notifications.map((e=>Object.assign(Object.assign({},e),{title:t}))),i=e.reminders.map((e=>Object.assign(Object.assign({},e),{title:t})))}const o=Object.assign(Object.assign({},this.application),{muted:t?t.muted:this.application.muted,persistToasts:t?t.persistToasts:this.application.persistToasts}),r=new Map(e.applications);return r.set(o.id,o),Object.assign(Object.assign({},e),{applications:r,notifications:n,reminders:i})}}t.RegisterApplication=$;class A extends r.Action{constructor(e,t){super(),this.stream=e,this._appId=t}reduce(e){const t=e.streams.get(this.stream.id),n=new Map(e.streams);return n.set(this.stream.id,Object.assign(Object.assign({},this.stream),{muted:!!t&&t.muted,appId:this._appId})),Object.assign(Object.assign({},e),{streams:n})}}t.RegisterStream=A;class N extends r.Action{constructor(e,t){super(),this.id=e,this.message=t}reduce(e){const t=new Map(e.errors);return t.delete(this.id),t.set(this.id,{id:this.id,message:this.message}),Object.assign(Object.assign({},e),{errors:t})}}t.PushError=N;class F extends r.Action{constructor(e){super(),this.id=e}reduce(e){const t=new Map(e.errors);return t.delete(this.id),Object.assign(Object.assign({},e),{errors:t})}}t.DismissError=F;class R extends r.Action{constructor(e){super(),this.notification=e}async call(e,t){await Promise.all([t(),e.dispatch(new C([this.notification]))])}}t.ExpireNotification=R;class B extends r.Action{constructor(e,t){super(),this.application=e,this.muted=t}reduce(e){const t=this.application,n=new Map(e.applications);return n.set(t.id,Object.assign(Object.assign({},t),{muted:this.muted})),Object.assign(Object.assign({},e),{applications:n})}}t.UpdateAppMuteState=B;class L extends r.Action{constructor(e,t){super(),this.stream=e,this.muted=t}reduce(e){const t=this.stream,n=new Map(e.streams);return n.set(t.id,Object.assign(Object.assign({},t),{muted:this.muted})),Object.assign(Object.assign({},e),{streams:n})}}t.UpdateStreamMuteState=L;class z extends r.Action{constructor(e){super(),this.id=e}reduce(e){return Object.assign(Object.assign({},e),{platform:Object.assign(Object.assign({},e.platform),{selected:this.id})})}}t.SetSelectedPlatform=z;class H extends r.Action{constructor(e,t){super(),this.application=e,this.persistToasts=t}reduce(e){const t=this.application,n=new Map(e.applications);return n.set(t.id,Object.assign(Object.assign({},t),{persistToasts:this.persistToasts})),Object.assign(Object.assign({},e),{applications:n})}}t.UpdateAppToastPersistState=H;class V extends r.KeyedAction{constructor(){super("frozen")}reduce(){return!0}}t.Freeze=V;class W extends r.KeyedAction{constructor(){super("frozen")}reduce(){return!1}}t.Unfreeze=W;const U=new l.ToggleFilter;t.selectErrors=e=>e.errors,t.selectVisibleErrors=(0,c.createSelector)(t.selectErrors,(e=>Array.from(e.values()).slice(-u.maxVisibleUserFacingErrors).reverse()));class G extends r.Action{constructor(e){super(),this.config=e}}t.ShowModal=G;class q extends r.Action{constructor(e){super(),this.id=e}}t.HideModal=q;class K extends r.Action{constructor(e,t){super(),this.event=e,this.platformId=t}}t.RaiseAnalyticsEvent=K;class Z extends r.Action{reduce(e){return Object.assign(Object.assign({},e),{customManifest:!0})}}t.UsingCustomManifest=Z;class Y extends r.Action{constructor(e){super(),this.snapshot=e}reduce(e){const t=new Map(this.snapshot.applications.map((e=>[e.id,e]))),n=new Map(this.snapshot.streams.map((e=>[e.id,e])));let i=h.initialSortedNotificationsState;return this.snapshot.notifications.forEach((e=>{i=(0,p.insertNotificationIntoSortedMaps)(i,e)})),Object.assign(Object.assign({},e),{applications:t,streams:n,notifications:this.snapshot.notifications,reminders:this.snapshot.reminders,sortedNotifications:i})}}t.ApplySnapshot=Y},7527:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SetSelectedCategorySorting=t.SetSelectedCategory=t.CategorySortTypesNamesMap=t.CategoryNamesMap=t.initialCategoryState=void 0;const i=n(6566);t.initialCategoryState={selectedCategory:"all",sortType:"date",sortDirection:"descending"},t.CategoryNamesMap={all:"All","needs-attention":"Needs Attention",sender:"Group by Sender",reminders:"Reminders"},t.CategorySortTypesNamesMap={"date-ascending":"Oldest","date-descending":"Newest","priority-ascending":"Lowest Priority","priority-descending":"Highest Priority"};class o extends i.Action{constructor(e){super(),this.category=e}reduce(e){return Object.assign(Object.assign({},e),{categories:Object.assign(Object.assign({},e.categories),{selectedCategory:this.category})})}}t.SetSelectedCategory=o;class r extends i.Action{constructor(e,t){super(),this.sortType=e,this.sortDirection=t}reduce(e){return Object.assign(Object.assign({},e),{categories:Object.assign(Object.assign({},e.categories),{sortType:this.sortType||e.categories.sortType,sortDirection:this.sortDirection||e.categories.sortDirection})})}}t.SetSelectedCategorySorting=r},7530:e=>{"use strict";e.exports=O},7540:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.selectPlatformNotificationCounts=t.selectPlatformSearchResults=t.selectPlatformReminders=t.selectPlatformNotifications=t.selectActivePlatforms=t.selectCurrentPlatform=t.selectPlatformScheme=t.selectPlatformTheme=t.selectCounts=t.selectPlatforms=t.DeregisterPlatform=t.UpdatePlatformScheme=t.RegisterPlatform=t.initialPlatformState=void 0;const i=n(6566),o=n(0);t.initialPlatformState={list:new Map,counts:new Map};class r extends i.Action{constructor(e){super(),this.platform=e}reduce(e){const t=new Map(e.platform.list);t.set(this.platform.id,Object.assign(Object.assign({},this.platform),{active:!0}));const n=new Map(e.platform.counts);return n.set(this.platform.id,e.notifications.filter((e=>e.notification.platform===this.platform.id)).length),Object.assign(Object.assign({},e),{platform:Object.assign(Object.assign({},e.platform),{list:t,counts:n})})}}t.RegisterPlatform=r;class a extends i.Action{constructor(e,t){super(),this.scheme=e,this.identity=t}reduce(e){let t=e.theme;const n=new Map(e.platform.list);return n.forEach((i=>{i.platformIdentity.uuid===this.identity.uuid&&(n.set(i.id,Object.assign(Object.assign({},i),{scheme:this.scheme})),i.id===e.platform.selected&&(t={themes:i.theme,scheme:this.scheme}))})),Object.assign(Object.assign({},e),{platform:Object.assign(Object.assign({},e.platform),{list:n}),theme:t})}}t.UpdatePlatformScheme=a;class l extends i.KeyedAction{constructor(e){super("platform"),this.id=e}reduce(e){const t=new Map(e.list),n=t.get(this.id);return n?t.set(this.id,Object.assign(Object.assign({},n),{active:!1})):console.warn(`Platform to deregister (id: ${this.id}) could not be found.`),Object.assign(Object.assign({},e),{list:t})}}t.DeregisterPlatform=l,t.selectPlatforms=e=>e.platform.list,t.selectCounts=e=>e.platform.counts,t.selectPlatformTheme=(0,o.createSelector)([t.selectPlatforms,(e,t)=>t],((e,t)=>{var n;return null===(n=e.get(t))||void 0===n?void 0:n.theme})),t.selectPlatformScheme=(0,o.createSelector)([t.selectPlatforms,(e,t)=>t],((e,t)=>{var n;return null===(n=e.get(t))||void 0===n?void 0:n.scheme})),t.selectCurrentPlatform=e=>e.platform.selected,t.selectActivePlatforms=(0,o.createSelector)(t.selectPlatforms,(e=>Array.from(e.values()).filter((e=>e.active)))),t.selectPlatformNotifications=(0,o.createSelector)((e=>e.notifications),t.selectCurrentPlatform,((e,t)=>t?e.filter((e=>e.notification.platform===t)):e)),t.selectPlatformReminders=(0,o.createSelector)((e=>e.reminders),t.selectCurrentPlatform,((e,t)=>t?e.filter((e=>e.notification.platform===t)):e)),t.selectPlatformSearchResults=(0,o.createSelector)((e=>e.search.results),t.selectCurrentPlatform,((e,t)=>t?e.filter((e=>e.item.notification.platform===t)):e)),t.selectPlatformNotificationCounts=(0,o.createSelector)([t.selectCounts,(e,t)=>t],((e,t)=>e.get(t)||0))},7581:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useModalDialog=void 0;const i=n(5932),o=n(7049),r=n(6975),a=n(3413),l=n(6415);t.useModalDialog=(e,t,n,s,c,u,d)=>{const f=(0,i.useRef)(null),[p,h]=(0,i.useState)(!1),[m]=(0,o.usePosition)(),[b,g]=(0,i.useState)(0),{setTimePickerConfig:v,setDatePickerConfig:y,setMenuConfig:_,setIsTimePickerModalOpen:x,setIsDatePickerModalOpen:O,setIsMenuModalOpen:w,setModalType:C}=(0,i.useContext)(l.WebModalContext);return(0,i.useEffect)((()=>{if(p){const i=f.current,o=i?m(i):null;if(o&&i){const l={id:(0,a.randomUUID)()},p=Object.assign(Object.assign({},s(n(f),i,o)),{onDismiss:e=>{g(b+1),h(!1),c(e),"web"===u&&("time"===d?x(!1):"date"===d?O(!1):"menu"===d&&w(!1))},identity:l}),m=()=>t(l.id);return"desktop"===u?(e(p),(0,r.subscribeScrollableContainers)(i,m)):"web"===u&&(console.log("setting modal config",d),C("widget"),"time"===d?(v(Object.assign({},p)),x(!0)):"date"===d?(y(Object.assign({},p)),O(!0)):"menu"===d&&(_(Object.assign({},p)),w(!0))),()=>{i&&"desktop"===u&&(0,r.unsubscribeScrollableContainers)(i,m)}}}}),[p,f.current]),[p,h,f,b]}},7586:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ROUTES=void 0,t.ROUTES={NOTIFICATIONS:"/center/notifications",SETTINGS:"/center/settings",ADVANCED_SETTINGS:"/center/settings/advanced"}},7603: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.MultiFieldFormContainer=void 0;const o=n(7250),r=i(n(5932)),a=i(n(2230)),l=n(6370),s=n(388),c=n(1270),u=n(4116),d=n(7379),f=n(4515),p=n(3081);t.MultiFieldFormContainer=({notificationId:e,templateContent:t,fields:n,children:i})=>{const a=r.default.useRef(null),[m,b]=(0,l.useFormContainerExpander)(e),g=(0,u.useFormError)(e);return(0,s.useCollapsibleCardHeaderEdgeCaseBehavior)(a,t,m,b),(0,c.useCollapsibleCardHeaderScroll)(a,t,m),(0,p.useScrollToFirstElementOnExpand)(a,m),r.default.createElement(h,null,r.default.createElement(o.CollapsibleCardStateless,{ref:a,onExpand:b,title:r.default.createElement(f.CollapsibleCardTitle,{expanded:m,fieldTitles:n.map((e=>{var t;return null!==(t=e.label)&&void 0!==t?t:"Unlabeled Field"}))}),headerSettings:{fixedHeader:!0,zIndex:1e3},expanded:m||!1},g?r.default.createElement(d.FormError,{error:g}):null,i))};const h=(0,a.default)(o.Box)`
|
|
2493
2507
|
width: 100%;
|
|
2494
2508
|
padding-top: ${e=>e.theme.px.small};
|
|
2495
2509
|
form {
|