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A,GAFiC,E,SAAA,GAAgB,EAAQ,CAAC,CAAC,YAAY,oB","sources":["webpack://shipley-du-lib/./common/js/du/appEnum/AlertSeverity.ts","webpack://shipley-du-lib/./common/js/du/utility/dateTimeUtils.ts","webpack://shipley-du-lib/./common/js/du/interfaces/utility/IClickableAlertMessage.ts","webpack://shipley-du-lib/./common/js/du/components/utility/alert.vue?8475","webpack://shipley-du-lib/./common/js/du/components/utility/alert.vue?5e44","webpack://shipley-du-lib/./common/js/du/components/utility/alert.vue","webpack://shipley-du-lib/./common/js/du/components/utility/skeletonBox.vue?6d48","webpack://shipley-du-lib/./common/js/du/components/utility/skeletonBox.vue","webpack://shipley-du-lib/./common/js/du/components/utility/skeletonBox.vue?456c","webpack://shipley-du-lib/./common/js/du/masterTemplates/components/templates/notificationWidget.vue?3615","webpack://shipley-du-lib/./common/js/du/masterTemplates/components/templates/notificationWidget.vue","webpack://shipley-du-lib/./common/js/du/masterTemplates/components/templates/notificationWidget.vue?8193"],"sourcesContent":["export enum AlertSeverity {\r\n Info = \"alert-info\",\r\n Warning = \"alert-warning\",\r\n Error = \"alert-error\",\r\n Success = \"alert-success\",\r\n}\r\n","import { DateTime } from \"luxon\";\r\ntype dateTimeArgType = DateTime | string | String | number | Number | null | undefined;\r\nconst boxDate = (date: dateTimeArgType): DateTime | null => {\r\n if (date) {\r\n if (date instanceof DateTime) {\r\n return date;\r\n } else if (typeof date === \"number\" || date instanceof Number) {\r\n return DateTime.fromMillis(date as number);\r\n }\r\n return DateTime.fromISO(date as string);\r\n }\r\n\r\n return null;\r\n};\r\n\r\nconst boxDateToMillis = (dateValue: DateTime | null | string): number => boxDate(dateValue)?.toMillis() ?? 0;\r\n\r\nconst formatHoursToShortFormat = (decimalHours: number): string => {\r\n const hours: number = Math.floor(decimalHours);\r\n const minutes: number = Math.round((decimalHours - hours) * 60);\r\n\r\n let result: string[] = [];\r\n if (hours > 0) result.push(`${hours}h`);\r\n if (minutes > 0) result.push(`${minutes}m`);\r\n\r\n return result.join(\" \") || \"0h\";\r\n};\r\n\r\nconst formatDate = (date: string | DateTime, format: string = \"MM/dd/yyyy\") => {\r\n if (!date) {\r\n return \"--\";\r\n }\r\n if (typeof date === \"string\") {\r\n return DateTime.fromISO(date).toFormat(format);\r\n }\r\n return date.toFormat(format);\r\n};\r\n\r\nexport { boxDate, boxDateToMillis, dateTimeArgType, formatHoursToShortFormat, formatDate };\r\n","export default interface IClickableAlertMessage {\r\n text: string;\r\n clickCallback?: (string) => void;\r\n}\r\n\r\nexport const isIClickableAlertMessage = (\r\n msg?: string | IClickableAlertMessage | (string | IClickableAlertMessage)[]\r\n): msg is IClickableAlertMessage => msg !== undefined && msg !== null && msg.hasOwnProperty(\"text\");\r\n","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, createVNode as _createVNode, normalizeClass as _normalizeClass, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, createBlock as _createBlock, withModifiers as _withModifiers, renderList as _renderList, Fragment as _Fragment, createElementVNode as _createElementVNode, renderSlot as _renderSlot } from \"vue\"\n\nconst _hoisted_1 = [\"id\"]\nconst _hoisted_2 = [\"id\"]\nconst _hoisted_3 = { key: 2 }\nconst _hoisted_4 = [\"innerHTML\"]\nconst _hoisted_5 = [\"innerHTML\"]\nconst _hoisted_6 = { key: 3 }\nconst _hoisted_7 = [\"innerHTML\", \"onClick\"]\nconst _hoisted_8 = [\"innerHTML\"]\n\nimport { computed, ref, watch, useSlots } from \"vue\";\r\nimport Icon from \"./icon.vue\";\r\nimport { AlertSeverity } from \"@appEnum/AlertSeverity\";\r\nimport { scrollTop, scrollToLocation } from \"@utility/domUtils\";\r\nimport { boxBool, trueFalseString } from \"@utility/boolUtils\";\r\nimport { genComponentId } from \"@components/componentHelpers\";\r\nimport IClickableAlertMessage, { isIClickableAlertMessage } from \"@interfaces/utility/IClickableAlertMessage\";\r\nimport { isNullOrWhiteSpace } from \"@utility/stringUtils\";\r\n\r\ninterface Props {\r\n message?: string | IClickableAlertMessage | (string | IClickableAlertMessage)[];\r\n alertIcon?: string;\r\n alertSeverity?: AlertSeverity;\r\n dismissible?: trueFalseString;\r\n dismissAfter?: number;\r\n iconClass?: string;\r\n iconWrapperClass?: string;\r\n cssAlerting?: trueFalseString;\r\n AlertCss?: string | string[];\r\n scrollOnError?: trueFalseString;\r\n scrollLocation?: \"top\" | \"id\";\r\n dismissIcon?: string;\r\n}\r\n\r\n\nexport default /*@__PURE__*/_defineComponent({\n __name: 'alert',\n props: {\n message: { default: undefined },\n alertIcon: { default: \"fa-exclamation-triangle\" },\n alertSeverity: { default: AlertSeverity.Warning },\n dismissible: { type: [Boolean, String], default: false },\n dismissAfter: { default: 0 },\n iconClass: { default: \"\" },\n iconWrapperClass: { default: \"\" },\n cssAlerting: { type: [Boolean, String], default: false },\n AlertCss: {},\n scrollOnError: { type: [Boolean, String], default: false },\n scrollLocation: { default: \"top\" },\n dismissIcon: { default: \"fa-times\" }\n },\n setup(__props: any) {\n\r\nconst props = __props;\r\n\r\nconst $slots = useSlots();\r\n\r\nconst dismissed = ref<boolean>(false);\r\nconst dismissible = ref<boolean>(boxBool(props.dismissible));\r\nconst alertTarget: string = genComponentId(\"s1-alert\");\r\n\r\nconst isSingleMessage = computed<boolean>(\r\n () => props.message !== undefined && (!Array.isArray(props.message) || props.message.length === 1)\r\n);\r\nconst singleMessage = computed<string | IClickableAlertMessage | undefined>(() => {\r\n if (isSingleMessage.value && Array.isArray(props.message)) {\r\n return props.message[0];\r\n }\r\n return props.message as string | IClickableAlertMessage | undefined;\r\n});\r\n\r\nconst showAlert = computed<boolean>(\r\n () =>\r\n ($slots.message ? ($slots.message?.() ?? []).length > 0 : false) || //[Message] Slot has value or [Message] Props have value\r\n (!Array.isArray(props.message) && props.message !== undefined && typeof props.message === \"object\") ||\r\n (typeof props.message === \"string\" && !isNullOrWhiteSpace(props.message)) ||\r\n (Array.isArray(props.message) && props.message.length > 0 && !dismissed.value && !$slots.message)\r\n);\r\n\r\nif (props.dismissAfter > 0) {\r\n dismissible.value = true;\r\n setTimeout(() => {\r\n const alert = document.getElementById(\"alert-close\");\r\n alert?.click();\r\n }, props.dismissAfter);\r\n}\r\nconst scrollOnError = () => {\r\n switch (props.scrollLocation) {\r\n case \"top\":\r\n scrollTop();\r\n break;\r\n case \"id\":\r\n scrollToLocation(alertTarget);\r\n break;\r\n }\r\n};\r\n\r\nif (boxBool(props.scrollOnError)) {\r\n scrollOnError();\r\n}\r\n\r\nwatch(\r\n () => props.scrollOnError,\r\n (nv) => {\r\n if (boxBool(nv)) {\r\n scrollOnError();\r\n }\r\n }\r\n);\r\n\nreturn (_ctx: any,_cache: any) => {\n return (showAlert.value)\n ? (_openBlock(), _createElementBlock(\"div\", {\n key: 0,\n class: _normalizeClass([\"err-pnl error-wrapper alert flex align-items-center\", _ctx.alertSeverity]),\n id: _unref(alertTarget)\n }, [\n (dismissible.value)\n ? (_openBlock(), _createElementBlock(\"button\", {\n key: 0,\n \"aria-hidden\": \"true\",\n \"data-dismiss\": \"alert\",\n class: _normalizeClass([\"close\", () => (props.dismissAfter > 0 ? 'hidden' : '')]),\n id: `${_unref(alertTarget)}-alert-close`,\n type: \"button\",\n onClick: _cache[0] || (_cache[0] = ($event: any) => {\r\n _ctx.$emit('dismissed');\r\n dismissed.value = true;\r\n })\n }, [\n _createVNode(Icon, {\n icon: props.dismissIcon\n }, null, 8, [\"icon\"])\n ], 10, _hoisted_2))\n : _createCommentVNode(\"\", true),\n (_ctx.alertIcon)\n ? (_openBlock(), _createBlock(Icon, {\n key: 1,\n class: _normalizeClass([\"pr10 pl10 fs-xs-32\", _ctx.iconClass]),\n icon: _ctx.alertIcon,\n \"icon-wrapper-class\": _ctx.iconWrapperClass\n }, null, 8, [\"class\", \"icon\", \"icon-wrapper-class\"]))\n : _createCommentVNode(\"\", true),\n (isSingleMessage.value)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_3, [\n (!_unref(isIClickableAlertMessage)(singleMessage.value) || singleMessage.value.clickCallback === undefined)\n ? (_openBlock(), _createElementBlock(\"span\", {\n key: 0,\n innerHTML: \r\n singleMessage.value !== undefined && _unref(isIClickableAlertMessage)(singleMessage.value)\r\n ? singleMessage.value.text\r\n : singleMessage.value ?? ''\r\n \n }, null, 8, _hoisted_4))\n : (_unref(isIClickableAlertMessage)(singleMessage.value) && singleMessage.value.clickCallback)\n ? (_openBlock(), _createElementBlock(\"a\", {\n key: 1,\n href: \"#\",\n innerHTML: singleMessage.value.text,\n onClick: _cache[1] || (_cache[1] = _withModifiers(($event: any) => (singleMessage.value.clickCallback(singleMessage.value.text)), [\"prevent\"]))\n }, null, 8, _hoisted_5))\n : _createCommentVNode(\"\", true)\n ]))\n : (Array.isArray(_ctx.message) && _ctx.message.length > 1)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_6, [\n _createElementVNode(\"ul\", null, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.message, (m) => {\n return (_openBlock(), _createElementBlock(\"li\", {\n key: _unref(isIClickableAlertMessage)(m) ? m.text : m\n }, [\n (_unref(isIClickableAlertMessage)(m) && m.clickCallback)\n ? (_openBlock(), _createElementBlock(\"a\", {\n key: 0,\n href: \"#\",\n innerHTML: m.text,\n onClick: _withModifiers(($event: any) => (m.clickCallback(m.text)), [\"prevent\"])\n }, null, 8, _hoisted_7))\n : (_openBlock(), _createElementBlock(\"span\", {\n key: 1,\n innerHTML: _unref(isIClickableAlertMessage)(m) ? m.text : m\n }, null, 8, _hoisted_8))\n ]))\n }), 128))\n ])\n ]))\n : _createCommentVNode(\"\", true),\n _renderSlot(_ctx.$slots, \"message\")\n ], 10, _hoisted_1))\n : _createCommentVNode(\"\", true)\n}\n}\n\n})","import script from \"./alert.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./alert.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./alert.vue?vue&type=style&index=0&id=45150bfd&lang=less\"\n\nconst __exports__ = script;\n\nexport default __exports__","<template>\r\n <div\r\n v-if=\"showAlert\"\r\n class=\"err-pnl error-wrapper alert flex align-items-center\"\r\n :class=\"alertSeverity\"\r\n :id=\"alertTarget\"\r\n >\r\n <button\r\n v-if=\"dismissible\"\r\n aria-hidden=\"true\"\r\n data-dismiss=\"alert\"\r\n class=\"close\"\r\n :class=\"() => (props.dismissAfter > 0 ? 'hidden' : '')\"\r\n :id=\"`${alertTarget}-alert-close`\"\r\n type=\"button\"\r\n @click=\"\r\n $emit('dismissed');\r\n dismissed = true;\r\n \"\r\n >\r\n <Icon :icon=\"props.dismissIcon\" />\r\n </button>\r\n <Icon\r\n v-if=\"alertIcon\"\r\n class=\"pr10 pl10 fs-xs-32\"\r\n :class=\"iconClass\"\r\n :icon=\"alertIcon\"\r\n :icon-wrapper-class=\"iconWrapperClass\"\r\n />\r\n <div v-if=\"isSingleMessage\">\r\n <span\r\n v-if=\"!isIClickableAlertMessage(singleMessage) || singleMessage.clickCallback === undefined\"\r\n v-html=\"\r\n singleMessage !== undefined && isIClickableAlertMessage(singleMessage)\r\n ? singleMessage.text\r\n : singleMessage ?? ''\r\n \"\r\n />\r\n <a\r\n v-else-if=\"isIClickableAlertMessage(singleMessage) && singleMessage.clickCallback\"\r\n href=\"#\"\r\n v-html=\"singleMessage.text\"\r\n @click.prevent=\"singleMessage.clickCallback(singleMessage.text)\"\r\n />\r\n </div>\r\n <div v-else-if=\"Array.isArray(message) && message.length > 1\">\r\n <ul>\r\n <li\r\n v-for=\"m in message\"\r\n :key=\"isIClickableAlertMessage(m) ? m.text : m\"\r\n >\r\n <a\r\n v-if=\"isIClickableAlertMessage(m) && m.clickCallback\"\r\n href=\"#\"\r\n v-html=\"m.text\"\r\n @click.prevent=\"m.clickCallback(m.text)\"\r\n />\r\n <span\r\n v-else\r\n v-html=\"isIClickableAlertMessage(m) ? m.text : m\"\r\n />\r\n </li>\r\n </ul>\r\n </div>\r\n <slot name=\"message\"></slot>\r\n </div>\r\n</template>\r\n\r\n<script lang=\"ts\" setup>\r\nimport { computed, ref, watch, useSlots } from \"vue\";\r\nimport Icon from \"./icon.vue\";\r\nimport { AlertSeverity } from \"@appEnum/AlertSeverity\";\r\nimport { scrollTop, scrollToLocation } from \"@utility/domUtils\";\r\nimport { boxBool, trueFalseString } from \"@utility/boolUtils\";\r\nimport { genComponentId } from \"@components/componentHelpers\";\r\nimport IClickableAlertMessage, { isIClickableAlertMessage } from \"@interfaces/utility/IClickableAlertMessage\";\r\nimport { isNullOrWhiteSpace } from \"@utility/stringUtils\";\r\n\r\ninterface Props {\r\n message?: string | IClickableAlertMessage | (string | IClickableAlertMessage)[];\r\n alertIcon?: string;\r\n alertSeverity?: AlertSeverity;\r\n dismissible?: trueFalseString;\r\n dismissAfter?: number;\r\n iconClass?: string;\r\n iconWrapperClass?: string;\r\n cssAlerting?: trueFalseString;\r\n AlertCss?: string | string[];\r\n scrollOnError?: trueFalseString;\r\n scrollLocation?: \"top\" | \"id\";\r\n dismissIcon?: string;\r\n}\r\n\r\nconst props = withDefaults(defineProps<Props>(), {\r\n message: undefined,\r\n alertIcon: \"fa-exclamation-triangle\",\r\n alertSeverity: AlertSeverity.Warning,\r\n dismissible: false,\r\n dismissAfter: 0,\r\n iconClass: \"\",\r\n iconWrapperClass: \"\",\r\n cssAlerting: false,\r\n scrollOnError: false,\r\n scrollLocation: \"top\",\r\n dismissIcon: \"fa-times\",\r\n});\r\n\r\nconst $slots = useSlots();\r\n\r\nconst dismissed = ref<boolean>(false);\r\nconst dismissible = ref<boolean>(boxBool(props.dismissible));\r\nconst alertTarget: string = genComponentId(\"s1-alert\");\r\n\r\nconst isSingleMessage = computed<boolean>(\r\n () => props.message !== undefined && (!Array.isArray(props.message) || props.message.length === 1)\r\n);\r\nconst singleMessage = computed<string | IClickableAlertMessage | undefined>(() => {\r\n if (isSingleMessage.value && Array.isArray(props.message)) {\r\n return props.message[0];\r\n }\r\n return props.message as string | IClickableAlertMessage | undefined;\r\n});\r\n\r\nconst showAlert = computed<boolean>(\r\n () =>\r\n ($slots.message ? ($slots.message?.() ?? []).length > 0 : false) || //[Message] Slot has value or [Message] Props have value\r\n (!Array.isArray(props.message) && props.message !== undefined && typeof props.message === \"object\") ||\r\n (typeof props.message === \"string\" && !isNullOrWhiteSpace(props.message)) ||\r\n (Array.isArray(props.message) && props.message.length > 0 && !dismissed.value && !$slots.message)\r\n);\r\n\r\nif (props.dismissAfter > 0) {\r\n dismissible.value = true;\r\n setTimeout(() => {\r\n const alert = document.getElementById(\"alert-close\");\r\n alert?.click();\r\n }, props.dismissAfter);\r\n}\r\nconst scrollOnError = () => {\r\n switch (props.scrollLocation) {\r\n case \"top\":\r\n scrollTop();\r\n break;\r\n case \"id\":\r\n scrollToLocation(alertTarget);\r\n break;\r\n }\r\n};\r\n\r\nif (boxBool(props.scrollOnError)) {\r\n scrollOnError();\r\n}\r\n\r\nwatch(\r\n () => props.scrollOnError,\r\n (nv) => {\r\n if (boxBool(nv)) {\r\n scrollOnError();\r\n }\r\n }\r\n);\r\n</script>\r\n<style lang=\"less\">\r\n@import \"@css/utilityClasses/boxUtils.less\";\r\n@import \"@css/utilityClasses/fontUtils.less\";\r\n@import \"@css/utilityClasses/flexUtils.less\";\r\n</style>\r\n","import { defineComponent as _defineComponent } from 'vue'\nimport { renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, normalizeStyle as _normalizeStyle, createCommentVNode as _createCommentVNode, renderSlot as _renderSlot } from \"vue\"\n\nconst _hoisted_1 = {\n key: 0,\n class: \"skeleton-box-wrapper\"\n}\nconst _hoisted_2 = { key: 1 }\n\nimport { ref } from \"vue\";\r\ninterface Props {\r\n lines?: number | null | undefined;\r\n maxWidth?: number | null | undefined;\r\n minWidth?: number | null | undefined;\r\n height?: string | null | undefined;\r\n width?: string | null | undefined;\r\n loading?: boolean;\r\n}\r\n\r\n\nexport default /*@__PURE__*/_defineComponent({\n __name: 'skeletonBox',\n props: {\n lines: { default: 4 },\n maxWidth: { default: 100 },\n minWidth: { default: 80 },\n height: { default: \"1em\" },\n width: { default: null },\n loading: { type: Boolean, default: true }\n },\n setup(__props: any) {\n\r\nconst props = __props;\r\n\r\nconst getRandomLines = (min, max): number => {\r\n return Math.random() * (max - min) + min;\r\n};\r\n\r\nconst bigness = ref(typeof props.height === \"string\" && props.height.trim() !== \"\" ? props.height : \"1em\");\r\nconst lineCount = ref(\r\n typeof props.lines === \"number\" && props.lines > 0 ? props.lines : getRandomLines(4, 8)\r\n);\r\n\r\nconst computeWidth = (): string => {\r\n // Either use the given fixed width or\r\n // a random width between the given min\r\n // and max values.\r\n return props.width\r\n ? props.width\r\n : `${(\r\n Math.floor(Math.random() * Number(props.maxWidth ?? 100) - Number(props.minWidth ?? 80)) +\r\n Number(props.minWidth ?? 80)\r\n ).toString()}%`;\r\n};\r\n\nreturn (_ctx: any,_cache: any) => {\n return (props.loading)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(lineCount.value, (n) => {\n return (_openBlock(), _createElementBlock(\"span\", {\n key: n,\n class: \"skeleton-box\",\n style: _normalizeStyle({\r\n height: bigness.value,\r\n width: computeWidth(),\r\n })\n }, null, 4))\n }), 128))\n ]))\n : (_openBlock(), _createElementBlock(\"div\", _hoisted_2, [\n _renderSlot(_ctx.$slots, \"default\")\n ]))\n}\n}\n\n})","<template>\r\n <div\r\n v-if=\"props.loading\"\r\n class=\"skeleton-box-wrapper\"\r\n >\r\n <span\r\n v-for=\"n in lineCount\"\r\n :key=\"n\"\r\n class=\"skeleton-box\"\r\n :style=\"{\r\n height: bigness,\r\n width: computeWidth(),\r\n }\"\r\n >\r\n </span>\r\n </div>\r\n <div v-else>\r\n <slot></slot>\r\n </div>\r\n</template>\r\n\r\n<script lang=\"ts\" setup>\r\nimport { ref } from \"vue\";\r\ninterface Props {\r\n lines?: number | null | undefined;\r\n maxWidth?: number | null | undefined;\r\n minWidth?: number | null | undefined;\r\n height?: string | null | undefined;\r\n width?: string | null | undefined;\r\n loading?: boolean;\r\n}\r\n\r\nconst props = withDefaults(defineProps<Props>(), {\r\n lines: 4,\r\n maxWidth: 100,\r\n minWidth: 80,\r\n height: \"1em\",\r\n width: null,\r\n loading: true,\r\n});\r\n\r\nconst getRandomLines = (min, max): number => {\r\n return Math.random() * (max - min) + min;\r\n};\r\n\r\nconst bigness = ref(typeof props.height === \"string\" && props.height.trim() !== \"\" ? props.height : \"1em\");\r\nconst lineCount = ref(\r\n typeof props.lines === \"number\" && props.lines > 0 ? props.lines : getRandomLines(4, 8)\r\n);\r\n\r\nconst computeWidth = (): string => {\r\n // Either use the given fixed width or\r\n // a random width between the given min\r\n // and max values.\r\n return props.width\r\n ? props.width\r\n : `${(\r\n Math.floor(Math.random() * Number(props.maxWidth ?? 100) - Number(props.minWidth ?? 80)) +\r\n Number(props.minWidth ?? 80)\r\n ).toString()}%`;\r\n};\r\n</script>\r\n\r\n<style lang=\"less\" scoped>\r\n.skeleton-box {\r\n display: block;\r\n position: relative;\r\n overflow: hidden;\r\n background-color: #dddbdd;\r\n margin-bottom: 15px;\r\n border-radius: 3px;\r\n\r\n &::after {\r\n position: absolute;\r\n top: 0;\r\n right: 0;\r\n bottom: 0;\r\n left: 0;\r\n transform: translateX(-100%);\r\n background-image: linear-gradient(\r\n 90deg,\r\n rgba(#fff, 0) 0,\r\n rgba(#fff, 0.2) 20%,\r\n rgba(#fff, 0.5) 60%,\r\n rgba(#fff, 0)\r\n );\r\n animation: shimmer 5s infinite;\r\n content: \"\";\r\n }\r\n\r\n @keyframes shimmer {\r\n 100% {\r\n transform: translateX(100%);\r\n }\r\n }\r\n}\r\n</style>\r\n","import script from \"./skeletonBox.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./skeletonBox.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./skeletonBox.vue?vue&type=style&index=0&id=4fbe8fe8&lang=less&scoped=true\"\n\nimport exportComponent from \"../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-4fbe8fe8\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, normalizeClass as _normalizeClass, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, toDisplayString as _toDisplayString, createElementBlock as _createElementBlock, withModifiers as _withModifiers, createElementVNode as _createElementVNode, createVNode as _createVNode, renderList as _renderList, Fragment as _Fragment, createTextVNode as _createTextVNode, withCtx as _withCtx } from \"vue\"\n\nconst _hoisted_1 = { id: \"s1-notification-widget-target\" }\nconst _hoisted_2 = [\"title\"]\nconst _hoisted_3 = {\n key: 2,\n class: \"label label-primary\"\n}\nconst _hoisted_4 = {\n key: 3,\n class: \"is-cw-notification-badge\"\n}\nconst _hoisted_5 = {\n key: 4,\n class: \"label label-warning\"\n}\nconst _hoisted_6 = {\n key: 0,\n class: \"dropdown-menu dropdown-alerts\"\n}\nconst _hoisted_7 = {\n key: 0,\n class: \"text-center\"\n}\nconst _hoisted_8 = [\"onClick\"]\nconst _hoisted_9 = { key: 2 }\nconst _hoisted_10 = { class: \"p15\" }\nconst _hoisted_11 = {\n key: 3,\n class: \"divider\"\n}\nconst _hoisted_12 = { key: 4 }\nconst _hoisted_13 = { class: \"text-center link-block\" }\nconst _hoisted_14 = {\n key: 0,\n class: \"alert-notifications-wrapper\"\n}\nconst _hoisted_15 = { key: 0 }\nconst _hoisted_16 = { key: 0 }\nconst _hoisted_17 = { key: 1 }\nconst _hoisted_18 = [\"href\"]\nconst _hoisted_19 = { key: 1 }\nconst _hoisted_20 = [\"onClick\"]\nconst _hoisted_21 = { class: \"pull-right text-muted small mr10\" }\nconst _hoisted_22 = {\n key: 2,\n style: {\"overflow-x\":\"auto\"},\n class: \"clearfix\"\n}\nconst _hoisted_23 = { key: 1 }\nconst _hoisted_24 = { class: \"pl20\" }\n\nimport { ref, onMounted, onBeforeUnmount } from \"vue\";\r\nimport { DateTime } from \"luxon\";\r\nimport IAlertNotificationSummary from \"../../interfaces/IAlertNotificationSummary\";\r\nimport IAlertGrouping from \"../../interfaces/IAlertGrouping\";\r\nimport { isStorageAvailable, getObject } from \"@utility/storageHelpers\";\r\nimport { useAppStore } from \"@stores/appStore\";\r\nimport { fetchData } from \"@utility/webServices\";\r\nimport { isNumber } from \"@utility/numberUtils\";\r\nimport { boxDate } from \"@utility/dateTimeUtils\";\r\nimport ModalDialog from \"@compUtility/modal.vue\";\r\nimport Icon from \"@compUtility/icon.vue\";\r\nimport SkeletonBox from \"@compUtility/skeletonBox.vue\";\r\n\r\ninterface Props {\r\n userId?: number;\r\n s1AcctId?: number;\r\n}\r\n\r\nconst NOTIFICATION_COUNT_POLL_SECONDS = 180;\r\nconst STORAGE_KEY = \"s1MastTmpl\";\r\nconst MINI_NAVBAR_CSS_CLASS = \"mini-navbar\";\r\n\r\ninterface masterTmplConfig {\r\n miniNavBar: boolean;\r\n}\r\n\r\n\nexport default /*@__PURE__*/_defineComponent({\n __name: 'notificationWidget',\n props: {\n userId: { default: 0 },\n s1AcctId: { default: 0 }\n },\n setup(__props: any) {\n\r\nconst props = __props;\r\n\r\nconst hasStorage = isStorageAvailable();\r\nconst notificationCount = ref<number | null>(null);\r\nconst hasNotificationCountError = ref<boolean>(false);\r\nconst showNotificationSummary = ref<boolean>(false);\r\nconst notificationBellSummary = ref<string>(\"\");\r\nconst loadingNotificationSummary = ref<boolean>(false);\r\nconst notificationAlertSummary = ref<IAlertNotificationSummary | null>(null);\r\nconst showNotificationModal = ref<boolean>(false);\r\nconst isLoadingNotificationData = ref<boolean>(false);\r\nconst notificationsBeingDismissed = ref<number[]>([]);\r\nconst isCustomerWeb = useAppStore().isCustomerWeb();\r\n\r\nif (hasStorage) {\r\n const obj = getObject<masterTmplConfig>(STORAGE_KEY);\r\n if (obj && obj.miniNavBar) {\r\n const classes = document.body.className.split(\" \");\r\n if (classes.indexOf(MINI_NAVBAR_CSS_CLASS) <= -1) {\r\n classes.push(MINI_NAVBAR_CSS_CLASS);\r\n document.body.className = classes.join(\" \").trim();\r\n }\r\n }\r\n}\r\n\r\nconst getRelDate = (date: string | DateTime) => {\r\n var d = boxDate(date);\r\n if (d && d.isValid) {\r\n return d.toRelativeCalendar();\r\n }\r\n return \"?\";\r\n};\r\n\r\nconst dismissNotification = (notificationId: number) => {\r\n if (notificationsBeingDismissed.value.indexOf(notificationId) === -1) {\r\n notificationsBeingDismissed.value.push(notificationId);\r\n isLoadingNotificationData.value = true;\r\n if (!isCustomerWeb) {\r\n fetchData<boolean>(\"UserManagement/dismiss-notification\", notificationId).then((v) => {\r\n if (v) {\r\n fetchData<IAlertNotificationSummary>(\"S1AccountManager/get-notifications\", {\r\n UserId: props.userId,\r\n s1AcctId: props.s1AcctId,\r\n })\r\n .then((x) => {\r\n if (x) {\r\n notificationAlertSummary.value = x;\r\n const idx = notificationsBeingDismissed.value.indexOf(notificationId);\r\n if (idx >= 0) {\r\n notificationsBeingDismissed.value.splice(idx, 1);\r\n }\r\n }\r\n })\r\n .finally(() => {\r\n isLoadingNotificationData.value = false;\r\n });\r\n } else {\r\n isLoadingNotificationData.value = false;\r\n }\r\n });\r\n } else if (isCustomerWeb) {\r\n fetchData<boolean>(\r\n \"S1AccountManager/dismiss-notification/\" + props.s1AcctId,\r\n notificationsBeingDismissed.value\r\n ).then((v) => {\r\n if (v) {\r\n fetchData<IAlertNotificationSummary>(\"S1AccountManager/get-notifications\", {\r\n UserId: props.userId,\r\n s1AcctId: props.s1AcctId,\r\n })\r\n .then((x) => {\r\n if (x) {\r\n notificationAlertSummary.value = x;\r\n const idx = notificationsBeingDismissed.value.indexOf(notificationId);\r\n if (idx >= 0) {\r\n notificationsBeingDismissed.value.splice(idx, 1);\r\n }\r\n }\r\n })\r\n .finally(() => {\r\n isLoadingNotificationData.value = false;\r\n });\r\n } else {\r\n isLoadingNotificationData.value = false;\r\n }\r\n });\r\n }\r\n }\r\n};\r\n\r\nconst onSeeAllAlertsClick = () => {\r\n showNotificationModal.value = true;\r\n if (notificationAlertSummary.value != null) {\r\n isLoadingNotificationData.value = true;\r\n fetchData<IAlertNotificationSummary>(\"S1AccountManager/get-notifications\", {\r\n UserId: props.userId,\r\n s1AcctId: props.s1AcctId,\r\n })\r\n .then((x) => {\r\n if (x) {\r\n notificationAlertSummary.value = x;\r\n loadingNotificationSummary.value = false;\r\n }\r\n })\r\n .finally(() => {\r\n loadingNotificationSummary.value = false;\r\n isLoadingNotificationData.value = false;\r\n });\r\n }\r\n};\r\n\r\nconst onAlertGroupClick = (alertGrp?: IAlertGrouping | any) => {\r\n if (alertGrp) {\r\n if (alertGrp.AlertSummaryHref) {\r\n document.location = alertGrp.AlertSummaryHref;\r\n } else {\r\n onSeeAllAlertsClick();\r\n }\r\n }\r\n};\r\n\r\nconst onNotificationSummaryBellClick = () => {\r\n if (!showNotificationSummary.value) {\r\n showNotificationSummary.value = true;\r\n setTimeout(() => {\r\n document.addEventListener(\"click\", docNotificationMenuListener);\r\n }, 50);\r\n if ((notificationAlertSummary.value === null && (props.userId ?? 0) > 0) || (props.s1AcctId ?? 0) > 0) {\r\n loadingNotificationSummary.value = true;\r\n fetchData<IAlertNotificationSummary>(\"S1AccountManager/get-notifications\", {\r\n UserId: props.userId,\r\n s1AcctId: props.s1AcctId,\r\n })\r\n .then((x) => {\r\n if (x) {\r\n notificationAlertSummary.value = x;\r\n }\r\n })\r\n .finally(() => {\r\n loadingNotificationSummary.value = false;\r\n isLoadingNotificationData.value = false;\r\n });\r\n }\r\n } else {\r\n showNotificationSummary.value = false;\r\n document.removeEventListener(\"click\", docNotificationMenuListener);\r\n }\r\n};\r\n\r\nconst docNotificationMenuListener = (e: Event) => {\r\n if (showNotificationSummary.value) {\r\n showNotificationSummary.value = false;\r\n document.removeEventListener(\"click\", docNotificationMenuListener);\r\n }\r\n};\r\n\r\nconst setNotificationBellSummary = () => {\r\n if (hasNotificationCountError.value) {\r\n notificationBellSummary.value = \"Error communicating with server\";\r\n } else if (notificationCount.value !== null && notificationCount.value <= 0) {\r\n notificationBellSummary.value = \"No unread messages\";\r\n } else if (notificationCount.value !== null && notificationCount.value >= 0) {\r\n notificationBellSummary.value = `${notificationCount.value} unread message${\r\n notificationCount.value !== 1 ? \"s\" : \"\"\r\n }`;\r\n }\r\n};\r\n\r\nlet notificationCountTimer: NodeJS.Timeout | null = null;\r\n\r\nconst setNotificationPolling = (isFirstRun: boolean) => {\r\n const getNotifCount = () =>\r\n fetchData<number>(\"S1AccountManager/get-notification-count\", {\r\n UserId: props.userId,\r\n s1AcctId: props.s1AcctId,\r\n })\r\n .then((x) => {\r\n if (isNumber(x)) {\r\n if (\r\n (x as number) !== notificationCount.value &&\r\n !showNotificationSummary.value &&\r\n !showNotificationModal.value\r\n ) {\r\n //don't reset data when mangement menus are open\r\n notificationAlertSummary.value = null;\r\n }\r\n\r\n notificationCount.value = x as number;\r\n hasNotificationCountError.value = false;\r\n setNotificationBellSummary();\r\n }\r\n setNotificationPolling(false);\r\n })\r\n .catch(() => {\r\n hasNotificationCountError.value = true;\r\n setNotificationBellSummary();\r\n });\r\n\r\n if (isFirstRun) {\r\n //kick this off immediately\r\n getNotifCount();\r\n } else {\r\n notificationCountTimer = setTimeout(() => {\r\n getNotifCount();\r\n }, NOTIFICATION_COUNT_POLL_SECONDS * 1000);\r\n }\r\n};\r\n\r\nonMounted(() => {\r\n setNotificationPolling(true);\r\n});\r\n\r\nonBeforeUnmount(() => {\r\n if (notificationCountTimer) {\r\n clearTimeout(notificationCountTimer);\r\n }\r\n document.removeEventListener(\"click\", docNotificationMenuListener);\r\n});\r\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(_Fragment, null, [\n _createElementVNode(\"div\", _hoisted_1, [\n _createElementVNode(\"p\", {\n class: _normalizeClass({\r\n dropdown: true,\r\n open: showNotificationSummary.value,\r\n })\n }, [\n _createElementVNode(\"a\", {\n class: \"dropdown-toggle count-info\",\n onClick: _withModifiers(onNotificationSummaryBellClick, [\"prevent\"]),\n title: notificationBellSummary.value\n }, [\n (!_unref(isCustomerWeb))\n ? (_openBlock(), _createBlock(Icon, {\n key: 0,\n icon: \"fa-bell\",\n class: _normalizeClass({ 'text-muted': notificationCount.value ?? 0 >= 0 })\n }, null, 8, [\"class\"]))\n : _createCommentVNode(\"\", true),\n (_unref(isCustomerWeb))\n ? (_openBlock(), _createBlock(Icon, {\n key: 1,\n icon: \"fa-bell\",\n class: \"is-cw-bell\"\n }))\n : _createCommentVNode(\"\", true),\n (!_unref(isCustomerWeb) && !hasNotificationCountError.value && (notificationCount.value ?? 0) > 0)\n ? (_openBlock(), _createElementBlock(\"span\", _hoisted_3, _toDisplayString(notificationCount.value), 1))\n : _createCommentVNode(\"\", true),\n (_unref(isCustomerWeb) && !hasNotificationCountError.value && (notificationCount.value ?? 0) > 0)\n ? (_openBlock(), _createElementBlock(\"span\", _hoisted_4, _toDisplayString(notificationCount.value), 1))\n : _createCommentVNode(\"\", true),\n (hasNotificationCountError.value)\n ? (_openBlock(), _createElementBlock(\"span\", _hoisted_5, \"?\"))\n : _createCommentVNode(\"\", true)\n ], 8, _hoisted_2),\n (showNotificationSummary.value)\n ? (_openBlock(), _createElementBlock(\"ul\", _hoisted_6, [\n (loadingNotificationSummary.value)\n ? (_openBlock(), _createElementBlock(\"li\", _hoisted_7, [\n _createVNode(Icon, {\n class: \"fs-xs-30 pt15 pb15 text-muted inline-block\",\n icon: \"fa-spinner\",\n animate: true\n })\n ]))\n : ((notificationAlertSummary.value?.AlertGroups.length ?? 0) > 0)\n ? (_openBlock(true), _createElementBlock(_Fragment, { key: 1 }, _renderList(notificationAlertSummary.value?.AlertGroups ?? [], (ag) => {\n return (_openBlock(), _createElementBlock(\"li\", null, [\n _createElementVNode(\"a\", {\n onClick: _withModifiers(() => onAlertGroupClick(ag), [\"prevent\"])\n }, [\n _createElementVNode(\"div\", null, [\n _createVNode(Icon, { icon: \"fa-envelope\" }),\n _createTextVNode(\" \" + _toDisplayString(ag.AlertSummaryText), 1)\n ])\n ], 8, _hoisted_8)\n ]))\n }), 256))\n : (_openBlock(), _createElementBlock(\"li\", _hoisted_9, [\n _createElementVNode(\"div\", _hoisted_10, [\n _createVNode(Icon, { icon: \"fa-trophy\" }),\n _cache[1] || (_cache[1] = _createTextVNode(\" No notifications.\"))\n ])\n ])),\n ((notificationAlertSummary.value?.AlertGroups.length ?? -1) > 0)\n ? (_openBlock(), _createElementBlock(\"li\", _hoisted_11))\n : _createCommentVNode(\"\", true),\n ((notificationAlertSummary.value?.AlertGroups.length ?? -1) > 0)\n ? (_openBlock(), _createElementBlock(\"li\", _hoisted_12, [\n _createElementVNode(\"div\", _hoisted_13, [\n _createElementVNode(\"a\", {\n href: \"#\",\n onClick: _withModifiers(onSeeAllAlertsClick, [\"prevent\"])\n }, [\n _cache[2] || (_cache[2] = _createElementVNode(\"strong\", null, \"See All Alerts\", -1)),\n _createVNode(Icon, {\n class: \"pl5\",\n icon: \"fa-angle-right\"\n })\n ])\n ])\n ]))\n : _createCommentVNode(\"\", true)\n ]))\n : _createCommentVNode(\"\", true)\n ], 2)\n ]),\n (showNotificationModal.value)\n ? (_openBlock(), _createBlock(ModalDialog, {\n key: 0,\n title: \"Notifications\",\n \"header-icon\": \"fa-envelope\",\n \"modal-size\": \"modal-lg\",\n onModalClosed: _cache[0] || (_cache[0] = \r\n () => {\r\n showNotificationModal.value = false;\r\n }\r\n )\n }, {\n body: _withCtx(() => [\n (!isLoadingNotificationData.value)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_14, [\n ((notificationAlertSummary.value?.AlertGroups ?? []).length > 0)\n ? (_openBlock(), _createElementBlock(\"ul\", _hoisted_15, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(notificationAlertSummary.value?.AlertGroups ?? [], (alertGrp) => {\n return (_openBlock(), _createElementBlock(\"li\", {\n key: alertGrp.Alerts[0].UserNotificationId\n }, [\n (alertGrp.Alerts.length > 1)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_16, [\n _createVNode(Icon, { icon: \"fa-envelope\" }),\n _createTextVNode(\" \" + _toDisplayString(alertGrp.AlertSummaryText), 1)\n ]))\n : _createCommentVNode(\"\", true),\n (alertGrp.Alerts.length > 0)\n ? (_openBlock(), _createElementBlock(\"ul\", _hoisted_17, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(alertGrp.Alerts, (alert) => {\n return (_openBlock(), _createElementBlock(\"li\", {\n key: alert.NotificationId\n }, [\n _createVNode(Icon, { icon: \"fa-envelope\" }),\n (alert.Href)\n ? (_openBlock(), _createElementBlock(\"a\", {\n key: 0,\n href: alert.Href\n }, \" Â \" + _toDisplayString(alert.Title), 9, _hoisted_18))\n : (_openBlock(), _createElementBlock(\"span\", _hoisted_19, \"Â \" + _toDisplayString(alert.Title), 1)),\n _createElementVNode(\"a\", {\n class: \"pull-right text-muted small dismiss-notification\",\n title: \"Dimiss?\",\n onClick: _withModifiers(\r\n () => {\r\n dismissNotification(alert.NotificationId);\r\n }\r\n , [\"prevent\"])\n }, [\n (notificationsBeingDismissed.value.indexOf(alert.NotificationId) <= -1)\n ? (_openBlock(), _createBlock(Icon, {\n key: 0,\n icon: \"fa-trash\"\n }))\n : (_openBlock(), _createBlock(Icon, {\n key: 1,\n icon: \"spinner\",\n class: \"text-muted\",\n animate: true\n }))\n ], 8, _hoisted_20),\n _createElementVNode(\"span\", _hoisted_21, _toDisplayString(getRelDate(alert.DateSent)), 1),\n (alert.Body)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_22, _toDisplayString(alert.Body), 1))\n : _createCommentVNode(\"\", true)\n ]))\n }), 128))\n ]))\n : _createCommentVNode(\"\", true)\n ]))\n }), 128))\n ]))\n : (_openBlock(), _createElementBlock(\"ul\", _hoisted_23, [\n _createElementVNode(\"li\", null, [\n _createElementVNode(\"div\", null, [\n _createElementVNode(\"h2\", _hoisted_24, [\n _createVNode(Icon, { icon: \"fa-trophy\" }),\n _cache[3] || (_cache[3] = _createTextVNode(\" No Notifications.\"))\n ])\n ])\n ])\n ]))\n ]))\n : (_openBlock(), _createBlock(SkeletonBox, { key: 1 }))\n ]),\n _: 1\n }))\n : _createCommentVNode(\"\", true)\n ], 64))\n}\n}\n\n})","<template>\r\n <div id=\"s1-notification-widget-target\">\r\n <p\r\n :class=\"{\r\n dropdown: true,\r\n open: showNotificationSummary,\r\n }\"\r\n >\r\n <a\r\n class=\"dropdown-toggle count-info\"\r\n @click.prevent=\"onNotificationSummaryBellClick\"\r\n :title=\"notificationBellSummary\"\r\n >\r\n <Icon\r\n v-if=\"!isCustomerWeb\"\r\n icon=\"fa-bell\"\r\n :class=\"{ 'text-muted': notificationCount ?? 0 >= 0 }\"\r\n />\r\n <Icon\r\n v-if=\"isCustomerWeb\"\r\n icon=\"fa-bell\"\r\n class=\"is-cw-bell\"\r\n />\r\n <span\r\n v-if=\"!isCustomerWeb && !hasNotificationCountError && (notificationCount ?? 0) > 0\"\r\n class=\"label label-primary\"\r\n >{{ notificationCount }}</span\r\n >\r\n <span\r\n v-if=\"isCustomerWeb && !hasNotificationCountError && (notificationCount ?? 0) > 0\"\r\n class=\"is-cw-notification-badge\"\r\n >{{ notificationCount }}</span\r\n >\r\n <span\r\n v-if=\"hasNotificationCountError\"\r\n class=\"label label-warning\"\r\n >?</span\r\n >\r\n </a>\r\n\r\n <ul\r\n v-if=\"showNotificationSummary\"\r\n class=\"dropdown-menu dropdown-alerts\"\r\n >\r\n <li\r\n v-if=\"loadingNotificationSummary\"\r\n class=\"text-center\"\r\n >\r\n <Icon\r\n class=\"fs-xs-30 pt15 pb15 text-muted inline-block\"\r\n icon=\"fa-spinner\"\r\n :animate=\"true\"\r\n />\r\n </li>\r\n <li\r\n v-else-if=\"(notificationAlertSummary?.AlertGroups.length ?? 0) > 0\"\r\n v-for=\"ag in notificationAlertSummary?.AlertGroups ?? []\"\r\n >\r\n <a @click.prevent=\"() => onAlertGroupClick(ag)\">\r\n <div><Icon icon=\"fa-envelope\" /> {{ ag.AlertSummaryText }}</div>\r\n </a>\r\n </li>\r\n <li v-else>\r\n <div class=\"p15\"><Icon icon=\"fa-trophy\" /> No notifications.</div>\r\n </li>\r\n <li\r\n class=\"divider\"\r\n v-if=\"(notificationAlertSummary?.AlertGroups.length ?? -1) > 0\"\r\n />\r\n <li v-if=\"(notificationAlertSummary?.AlertGroups.length ?? -1) > 0\">\r\n <div class=\"text-center link-block\">\r\n <a\r\n href=\"#\"\r\n @click.prevent=\"onSeeAllAlertsClick\"\r\n >\r\n <strong>See All Alerts</strong>\r\n <Icon\r\n class=\"pl5\"\r\n icon=\"fa-angle-right\"\r\n ></Icon>\r\n </a>\r\n </div>\r\n </li>\r\n </ul>\r\n </p>\r\n</div>\r\n <ModalDialog\r\n v-if=\"showNotificationModal\"\r\n title=\"Notifications\"\r\n header-icon=\"fa-envelope\"\r\n modal-size=\"modal-lg\"\r\n @modal-closed=\"\r\n () => {\r\n showNotificationModal = false;\r\n }\r\n \"\r\n >\r\n <template #body>\r\n <div\r\n v-if=\"!isLoadingNotificationData\"\r\n class=\"alert-notifications-wrapper\"\r\n >\r\n <ul v-if=\"(notificationAlertSummary?.AlertGroups ?? []).length > 0\">\r\n <li\r\n v-for=\"alertGrp in notificationAlertSummary?.AlertGroups ?? []\"\r\n :key=\"alertGrp.Alerts[0].UserNotificationId\"\r\n >\r\n <div v-if=\"alertGrp.Alerts.length > 1\">\r\n <Icon icon=\"fa-envelope\" /> {{ alertGrp.AlertSummaryText }}\r\n </div>\r\n <ul v-if=\"alertGrp.Alerts.length > 0\">\r\n <li\r\n v-for=\"alert in alertGrp.Alerts\"\r\n :key=\"alert.NotificationId\"\r\n >\r\n <Icon icon=\"fa-envelope\" />\r\n <a\r\n v-if=\"alert.Href\"\r\n :href=\"alert.Href\"\r\n >\r\n  {{ alert.Title }}\r\n </a>\r\n <span v-else> {{ alert.Title }}</span>\r\n <a\r\n class=\"pull-right text-muted small dismiss-notification\"\r\n title=\"Dimiss?\"\r\n @click.prevent=\"\r\n () => {\r\n dismissNotification(alert.NotificationId);\r\n }\r\n \"\r\n >\r\n <Icon\r\n v-if=\"notificationsBeingDismissed.indexOf(alert.NotificationId) <= -1\"\r\n icon=\"fa-trash\"\r\n />\r\n <Icon\r\n v-else\r\n icon=\"spinner\"\r\n class=\"text-muted\"\r\n :animate=\"true\"\r\n />\r\n </a>\r\n <span class=\"pull-right text-muted small mr10\">{{ getRelDate(alert.DateSent) }}</span>\r\n <div\r\n v-if=\"alert.Body\"\r\n style=\"overflow-x: auto\"\r\n class=\"clearfix\"\r\n >\r\n {{ alert.Body }}\r\n </div>\r\n </li>\r\n </ul>\r\n </li>\r\n </ul>\r\n <ul v-else>\r\n <li>\r\n <div>\r\n <h2 class=\"pl20\"><Icon icon=\"fa-trophy\" /> No Notifications.</h2>\r\n </div>\r\n </li>\r\n </ul>\r\n </div>\r\n <SkeletonBox v-else=\"isLoadingNotificationData\" />\r\n </template>\r\n </ModalDialog>\r\n</template>\r\n\r\n<script setup lang=\"ts\">\r\nimport { ref, onMounted, onBeforeUnmount } from \"vue\";\r\nimport { DateTime } from \"luxon\";\r\nimport IAlertNotificationSummary from \"../../interfaces/IAlertNotificationSummary\";\r\nimport IAlertGrouping from \"../../interfaces/IAlertGrouping\";\r\nimport { isStorageAvailable, getObject } from \"@utility/storageHelpers\";\r\nimport { useAppStore } from \"@stores/appStore\";\r\nimport { fetchData } from \"@utility/webServices\";\r\nimport { isNumber } from \"@utility/numberUtils\";\r\nimport { boxDate } from \"@utility/dateTimeUtils\";\r\nimport ModalDialog from \"@compUtility/modal.vue\";\r\nimport Icon from \"@compUtility/icon.vue\";\r\nimport SkeletonBox from \"@compUtility/skeletonBox.vue\";\r\n\r\ninterface Props {\r\n userId?: number;\r\n s1AcctId?: number;\r\n}\r\n\r\nconst props = withDefaults(defineProps<Props>(), {\r\n userId: 0,\r\n s1AcctId: 0,\r\n});\r\n\r\nconst NOTIFICATION_COUNT_POLL_SECONDS = 180;\r\nconst STORAGE_KEY = \"s1MastTmpl\";\r\nconst MINI_NAVBAR_CSS_CLASS = \"mini-navbar\";\r\n\r\nconst hasStorage = isStorageAvailable();\r\nconst notificationCount = ref<number | null>(null);\r\nconst hasNotificationCountError = ref<boolean>(false);\r\nconst showNotificationSummary = ref<boolean>(false);\r\nconst notificationBellSummary = ref<string>(\"\");\r\nconst loadingNotificationSummary = ref<boolean>(false);\r\nconst notificationAlertSummary = ref<IAlertNotificationSummary | null>(null);\r\nconst showNotificationModal = ref<boolean>(false);\r\nconst isLoadingNotificationData = ref<boolean>(false);\r\nconst notificationsBeingDismissed = ref<number[]>([]);\r\nconst isCustomerWeb = useAppStore().isCustomerWeb();\r\n\r\ninterface masterTmplConfig {\r\n miniNavBar: boolean;\r\n}\r\n\r\nif (hasStorage) {\r\n const obj = getObject<masterTmplConfig>(STORAGE_KEY);\r\n if (obj && obj.miniNavBar) {\r\n const classes = document.body.className.split(\" \");\r\n if (classes.indexOf(MINI_NAVBAR_CSS_CLASS) <= -1) {\r\n classes.push(MINI_NAVBAR_CSS_CLASS);\r\n document.body.className = classes.join(\" \").trim();\r\n }\r\n }\r\n}\r\n\r\nconst getRelDate = (date: string | DateTime) => {\r\n var d = boxDate(date);\r\n if (d && d.isValid) {\r\n return d.toRelativeCalendar();\r\n }\r\n return \"?\";\r\n};\r\n\r\nconst dismissNotification = (notificationId: number) => {\r\n if (notificationsBeingDismissed.value.indexOf(notificationId) === -1) {\r\n notificationsBeingDismissed.value.push(notificationId);\r\n isLoadingNotificationData.value = true;\r\n if (!isCustomerWeb) {\r\n fetchData<boolean>(\"UserManagement/dismiss-notification\", notificationId).then((v) => {\r\n if (v) {\r\n fetchData<IAlertNotificationSummary>(\"S1AccountManager/get-notifications\", {\r\n UserId: props.userId,\r\n s1AcctId: props.s1AcctId,\r\n })\r\n .then((x) => {\r\n if (x) {\r\n notificationAlertSummary.value = x;\r\n const idx = notificationsBeingDismissed.value.indexOf(notificationId);\r\n if (idx >= 0) {\r\n notificationsBeingDismissed.value.splice(idx, 1);\r\n }\r\n }\r\n })\r\n .finally(() => {\r\n isLoadingNotificationData.value = false;\r\n });\r\n } else {\r\n isLoadingNotificationData.value = false;\r\n }\r\n });\r\n } else if (isCustomerWeb) {\r\n fetchData<boolean>(\r\n \"S1AccountManager/dismiss-notification/\" + props.s1AcctId,\r\n notificationsBeingDismissed.value\r\n ).then((v) => {\r\n if (v) {\r\n fetchData<IAlertNotificationSummary>(\"S1AccountManager/get-notifications\", {\r\n UserId: props.userId,\r\n s1AcctId: props.s1AcctId,\r\n })\r\n .then((x) => {\r\n if (x) {\r\n notificationAlertSummary.value = x;\r\n const idx = notificationsBeingDismissed.value.indexOf(notificationId);\r\n if (idx >= 0) {\r\n notificationsBeingDismissed.value.splice(idx, 1);\r\n }\r\n }\r\n })\r\n .finally(() => {\r\n isLoadingNotificationData.value = false;\r\n });\r\n } else {\r\n isLoadingNotificationData.value = false;\r\n }\r\n });\r\n }\r\n }\r\n};\r\n\r\nconst onSeeAllAlertsClick = () => {\r\n showNotificationModal.value = true;\r\n if (notificationAlertSummary.value != null) {\r\n isLoadingNotificationData.value = true;\r\n fetchData<IAlertNotificationSummary>(\"S1AccountManager/get-notifications\", {\r\n UserId: props.userId,\r\n s1AcctId: props.s1AcctId,\r\n })\r\n .then((x) => {\r\n if (x) {\r\n notificationAlertSummary.value = x;\r\n loadingNotificationSummary.value = false;\r\n }\r\n })\r\n .finally(() => {\r\n loadingNotificationSummary.value = false;\r\n isLoadingNotificationData.value = false;\r\n });\r\n }\r\n};\r\n\r\nconst onAlertGroupClick = (alertGrp?: IAlertGrouping | any) => {\r\n if (alertGrp) {\r\n if (alertGrp.AlertSummaryHref) {\r\n document.location = alertGrp.AlertSummaryHref;\r\n } else {\r\n onSeeAllAlertsClick();\r\n }\r\n }\r\n};\r\n\r\nconst onNotificationSummaryBellClick = () => {\r\n if (!showNotificationSummary.value) {\r\n showNotificationSummary.value = true;\r\n setTimeout(() => {\r\n document.addEventListener(\"click\", docNotificationMenuListener);\r\n }, 50);\r\n if ((notificationAlertSummary.value === null && (props.userId ?? 0) > 0) || (props.s1AcctId ?? 0) > 0) {\r\n loadingNotificationSummary.value = true;\r\n fetchData<IAlertNotificationSummary>(\"S1AccountManager/get-notifications\", {\r\n UserId: props.userId,\r\n s1AcctId: props.s1AcctId,\r\n })\r\n .then((x) => {\r\n if (x) {\r\n notificationAlertSummary.value = x;\r\n }\r\n })\r\n .finally(() => {\r\n loadingNotificationSummary.value = false;\r\n isLoadingNotificationData.value = false;\r\n });\r\n }\r\n } else {\r\n showNotificationSummary.value = false;\r\n document.removeEventListener(\"click\", docNotificationMenuListener);\r\n }\r\n};\r\n\r\nconst docNotificationMenuListener = (e: Event) => {\r\n if (showNotificationSummary.value) {\r\n showNotificationSummary.value = false;\r\n document.removeEventListener(\"click\", docNotificationMenuListener);\r\n }\r\n};\r\n\r\nconst setNotificationBellSummary = () => {\r\n if (hasNotificationCountError.value) {\r\n notificationBellSummary.value = \"Error communicating with server\";\r\n } else if (notificationCount.value !== null && notificationCount.value <= 0) {\r\n notificationBellSummary.value = \"No unread messages\";\r\n } else if (notificationCount.value !== null && notificationCount.value >= 0) {\r\n notificationBellSummary.value = `${notificationCount.value} unread message${\r\n notificationCount.value !== 1 ? \"s\" : \"\"\r\n }`;\r\n }\r\n};\r\n\r\nlet notificationCountTimer: NodeJS.Timeout | null = null;\r\n\r\nconst setNotificationPolling = (isFirstRun: boolean) => {\r\n const getNotifCount = () =>\r\n fetchData<number>(\"S1AccountManager/get-notification-count\", {\r\n UserId: props.userId,\r\n s1AcctId: props.s1AcctId,\r\n })\r\n .then((x) => {\r\n if (isNumber(x)) {\r\n if (\r\n (x as number) !== notificationCount.value &&\r\n !showNotificationSummary.value &&\r\n !showNotificationModal.value\r\n ) {\r\n //don't reset data when mangement menus are open\r\n notificationAlertSummary.value = null;\r\n }\r\n\r\n notificationCount.value = x as number;\r\n hasNotificationCountError.value = false;\r\n setNotificationBellSummary();\r\n }\r\n setNotificationPolling(false);\r\n })\r\n .catch(() => {\r\n hasNotificationCountError.value = true;\r\n setNotificationBellSummary();\r\n });\r\n\r\n if (isFirstRun) {\r\n //kick this off immediately\r\n getNotifCount();\r\n } else {\r\n notificationCountTimer = setTimeout(() => {\r\n getNotifCount();\r\n }, NOTIFICATION_COUNT_POLL_SECONDS * 1000);\r\n }\r\n};\r\n\r\nonMounted(() => {\r\n setNotificationPolling(true);\r\n});\r\n\r\nonBeforeUnmount(() => {\r\n if (notificationCountTimer) {\r\n clearTimeout(notificationCountTimer);\r\n }\r\n document.removeEventListener(\"click\", docNotificationMenuListener);\r\n});\r\n</script>\r\n<style scoped lang=\"less\">\r\n.is-cw-bell {\r\n color: #363636;\r\n}\r\n.is-cw-notification-badge {\r\n position: absolute;\r\n color: #fff;\r\n top: -14px;\r\n left: 8px;\r\n height: 20px;\r\n padding: 3px 6px 2px 5px;\r\n background: #0046ad;\r\n border-radius: 10px;\r\n -webkit-box-shadow: 1px 1px 1px rgb(255 255 255 / 32%);\r\n box-shadow: 1px 1px 1px rgb(255 255 255 / 32%);\r\n border: 1px solid #fff;\r\n font-size: 12px;\r\n line-height: 14px;\r\n}\r\n.dropdown-menu {\r\n left: auto;\r\n right: 0;\r\n}\r\n.alert-notifications-wrapper > ul {\r\n list-style-type: none;\r\n}\r\n.label-primary {\r\n top: -10px;\r\n}\r\n</style>\r\n","import script from \"./notificationWidget.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./notificationWidget.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./notificationWidget.vue?vue&type=style&index=0&id=8cf7a31a&scoped=true&lang=less\"\n\nimport exportComponent from \"../../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-8cf7a31a\"]])\n\nexport default __exports__"],"names":["AlertSeverity","boxDate","date","Number","fromMillis","fromISO","boxDateToMillis","dateValue","toMillis","formatHoursToShortFormat","decimalHours","hours","Math","floor","minutes","round","result","push","join","formatDate","format","toFormat","isIClickableAlertMessage","msg","hasOwnProperty","_hoisted_1","_hoisted_2","_hoisted_3","key","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","__name","props","message","default","undefined","alertIcon","alertSeverity","Warning","dismissible","type","Boolean","String","dismissAfter","iconClass","iconWrapperClass","cssAlerting","AlertCss","scrollOnError","scrollLocation","dismissIcon","setup","__props","$slots","dismissed","alertTarget","isSingleMessage","Array","isArray","length","singleMessage","value","showAlert","setTimeout","alert","document","getElementById","click","nv","_ctx","_cache","class","id","onClick","$event","$emit","icon","clickCallback","href","innerHTML","text","m","lines","maxWidth","minWidth","height","width","loading","bigness","trim","lineCount","random","n","style","toString","_hoisted_9","_hoisted_10","_hoisted_11","_hoisted_12","_hoisted_13","_hoisted_14","_hoisted_15","_hoisted_16","_hoisted_17","_hoisted_18","_hoisted_19","_hoisted_20","_hoisted_21","_hoisted_22","_hoisted_23","_hoisted_24","MINI_NAVBAR_CSS_CLASS","userId","s1AcctId","hasStorage","notificationCount","hasNotificationCountError","showNotificationSummary","notificationBellSummary","loadingNotificationSummary","notificationAlertSummary","showNotificationModal","isLoadingNotificationData","notificationsBeingDismissed","isCustomerWeb","obj","miniNavBar","classes","body","className","split","indexOf","onSeeAllAlertsClick","UserId","then","x","finally","onNotificationSummaryBellClick","removeEventListener","docNotificationMenuListener","addEventListener","e","setNotificationBellSummary","notificationCountTimer","setNotificationPolling","isFirstRun","getNotifCount","catch","NOTIFICATION_COUNT_POLL_SECONDS","clearTimeout","dropdown","open","title","animate","AlertGroups","ag","alertGrp","AlertSummaryHref","location","AlertSummaryText","onModalClosed","Alerts","UserNotificationId","NotificationId","Href","Title","notificationId","v","idx","splice","DateSent","d","isValid","toRelativeCalendar","Body","_"],"sourceRoot":""}