@openfin/workspace 45.1.0 → 45.1.2
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/client-api-platform/src/api/app-directory.d.ts +1 -1
- package/client-api-platform/src/shapes.d.ts +8 -0
- package/common/src/utils/color-linking.d.ts +38 -1
- package/common/src/utils/context-menu.d.ts +1 -0
- package/common/src/utils/env.d.ts +1 -1
- package/common/src/utils/layout.d.ts +7 -1
- package/externals.report.json +5 -5
- package/home.js +1 -1
- package/home.js.map +1 -1
- package/index.js +1 -1
- package/index.js.map +1 -1
- package/notifications.js +1 -1
- package/package.json +3 -3
- package/store.js +1 -1
- package/store.js.map +1 -1
package/notifications.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
(()=>{"use strict";var e={78(e,t,n){n.d(t,{XI:()=>c,kz:()=>d});var a=n(438),o=n(232),r=(n(102),n(822)),i=n(70);const s=(0,r.h)("common.protocol.notifications"),c="of-workspace-notifications-sync";var l;async function d(){const e=await async function(){try{const e=await(0,a.S8)(),t=e?.notifications?.customManifest?.manifestUuid;return t||i.ct.uuid}catch(e){return s.warn("getNotificationCenterUuid","Could not get manifest options for notifications, using default",{error:(0,o.b_)(e)}),i.ct.uuid}}();return e!==i.ct.uuid?`${e}-${c}`:c}!function(e){e.UpdatePlatformThemeScheme="update-platform-theme-scheme"}(l||(l={}))},79(e,t,n){n.d(t,{N:()=>c,OF:()=>r});var a=n(232);const o=(0,n(822).h)("common.protocol.workspacePlatform");var r;!function(e){e.LaunchApp="launchApp",e.SavePage="savePage",e.GetSavedPage="getSavedPage",e.CreateSavedPage="createSavedPage",e.UpdateSavedPage="updateSavedPage",e.DeleteSavedPage="deleteSavedPage",e.GetSavedPages="getSavedPages",e.CreateSavedPageInternal="createSavedPageInternal",e.UpdateSavedPageInternal="updateSavedPageInternal",e.DeleteSavedPageInternal="deleteSavedPageInternal",e.UpdatePageForWindow="updatePageForWindow",e.AttachPagesToWindow="attachPagesToWindow",e.DetachPagesFromWindow="detachPagesFromWindow",e.ReorderPagesForWindow="reorderPagesForWindow",e.SetActivePage="setActivePage",e.AddPage="addPage",e.AddDefaultPage="addDefaultPage",e.GetAllAttachedPages="getAllAttachedPages",e.GetActivePageIdForWindow="getActivePageIdForWindow",e.GetPagesForWindow="getPagesForWindow",e.GetPageForWindow="getPageForWindow",e.GetSavedPageMetadata="getSavedPageMetadata",e.GetUniquePageTitle="getUniquePageTitle",e.GetLastFocusedBrowserWindow="getLastFocusedBrowserWindow",e.GetPageByViewIdentity="getPageByViewIdentity",e.GetThemes="getThemes",e.GetGeneratedPalettes="getGeneratedPalettes",e.GetThemePaletteSheet="getThemePaletteSheet",e.GetSelectedScheme="getSelectedScheme",e.SetSelectedScheme="setSelectedScheme",e.OpenGlobalContextMenuInternal="openGlobalContextMenuInternal",e.OpenViewTabContextMenuInternal="openViewTabContextMenuInternal",e.OpenPageTabContextMenuInternal="openPageTabContextMenuInternal",e.OpenSaveButtonContextMenuInternal="openSaveButtonContextMenuInternal",e.InvokeCustomActionInternal="invokeCustomActionInternal",e.RequestQuitPlatformDialogInternal="requestQuitPlatformDialogInternal",e.GetSavedWorkspace="getSavedWorkspace",e.CreateSavedWorkspace="createSavedWorkspace",e.UpdateSavedWorkspace="updateSavedWorkspace",e.DeleteSavedWorkspace="deleteSavedWorkspace",e.GetSavedWorkspaces="getSavedWorkspaces",e.GetSavedWorkspacesMetadata="getSavedWorkspacesMetadata",e.SaveWorkspace="saveWorkspace",e.GetCurrentWorkspace="getCurrentWorkspace",e.ApplyWorkspace="applyWorkspace",e.RestoreLastSavedWorkspaceInternal="restoreLastSavedWorkspaceInternal",e.SetActiveWorkspace="setActiveWorkspace",e.IsBrowserInitialized="isBrowserInitialized",e.Analytics="analyticsInternal",e.GetLanguage="getLanguage",e.GetLanguageResourcesInternal="getLanguageResourcesInternal",e.SetLanguage="setLanguage",e.GetDockProviderConfig="getDockProviderConfig",e.SaveDockProviderConfig="saveDockProviderConfig",e.HandleSaveModalOnPageClose="handleSaveModalOnPageClose",e.ShouldPageClose="shouldPageClose",e.ShouldWindowClose="shouldWindowClose",e.CopyPage="copyPage",e.HandlePageChanges="handlePageChanges",e.MarkUnsavedPagesAsSavedInternal="markUnsavedPagesAsSavedInternal",e.TrackRemovedTabInternal="trackRemovedTabInternal",e.RestoreRemovedTabInternal="restoreRemovedTabInternal",e.TrackVisitedSiteInternal="trackVisitedSiteInternal",e.GetRecentlyVisitedSitesInternal="getRecentlyVisitedSitesInternal",e.GetFrequentlyVisitedSitesInternal="getFrequentlyVisitedSitesInternal",e.SearchSitesInternal="searchSitesInternal",e.GetSearchProvidersInternal="getSearchProvidersInternal",e.GetCuratedContentInternal="getCuratedContentInternal",e.HandleRequestNavigationInternal="handleRequestNavigationInternal",e.RefreshBookmarksInternal="refreshBookmarksInternal",e.LaunchBookmarkInternal="launchBookmarkInternal",e.GetNotificationsConfig="getNotificationsConfig",e.UpdateDockFavoritesInternal="updateDockFavoritesInternal",e.UpdateContentMenuInternal="updateContentMenuInternal",e.LaunchDockEntryInternal="launchDockEntryInternal",e.SetDockFavoritesOrderInternal="setDockFavoritesOrderInternal",e.NavigateContentMenuInternal="navigateContentMenuInternal",e.SetDefaultDockButtonsOrderInternal="setDefaultDockButtonsOrderInternal",e.GetDockWorkspacesContextMenuInternal="getDockWorkspacesContextMenuInternal",e.HandleDockWorkspacesMenuResponseInternal="handleDockWorkspacesMenuResponseInternal",e.RefreshDockCollectionMenuInternal="refreshDockCollectionMenuInternal",e.LaunchCollectionInternal="launchCollectionInternal",e.RemoveDockFavoriteInternal="removeDockFavoriteInternal",e.AddDockFavoriteInternal="addDockFavoriteInternal",e.FocusAndExpandSearchInternal="focusAndExpandSearchInternal",e.SendUpdateVersionModalResponseInternal="sendUpdateVersionModalResponseInternal",e.ShowUpdateVersionModalInternal="showUpdateVersionModalInternal",e.ShowApplyAndPublishModalInternal="showApplyAndPublishModalInternal",e.GetNotificationIndicatorColorsInternal="getNotificationIndicatorColorsInternal",e.GetIsLegacySinglePaletteTheme="getIsLegacySinglePaletteTheme",e.GetLegacyNotificationsThemeInternal="getLegacyNotificationsThemeInternal"}(r||(r={}));const i=async e=>fin.Platform.wrapSync(e).getClient(),s=async e=>{const t=await i(e),n="Target is not a Workspace Platform. Target must call WorkspacePlatform.init";let r;try{r=await t.dispatch("isWorkspacePlatform")}catch(e){throw new a.Wk(n,{cause:e})}if("boolean"==typeof r&&r)return o.warn("internalGetWorkspacePlatformChannelClient","You are using an older version of the workspace platform. Please update your workspace platform."),r;if("object"==typeof r&&r.isWorkspacePlatform)return r;throw new a.Wk(n)},c=async e=>(await s(e),i(e))},232(e,t,n){n.d(t,{Wk:()=>s,b_:()=>l});const a=new Set(["name","message","stack","cause"]),o=(e,t)=>{const n={};for(const o of Object.getOwnPropertyNames(e)){if(a.has(o))continue;const i=e[o];"errors"===o&&Array.isArray(i)?n.errors=i.map(e=>r(e,t)):n[o]=i}return n},r=(e,t=new WeakSet)=>{if(null!=e)return"object"==typeof e&&t.has(e)?{name:"CircularReference",message:"[circular]",context:{},timestamp:(new Date).toISOString()}:("object"==typeof e&&t.add(e),e instanceof i?{name:e.name,message:e.message,context:e.context,stack:e.stack,cause:r(e.cause,t),timestamp:e.timestamp.toISOString()}:e instanceof Error?{name:e.name,message:e.message,context:o(e,t),stack:e.stack,cause:r(e.cause,t),timestamp:(new Date).toISOString()}:{name:"NonError",message:String(e),context:{value:e},timestamp:(new Date).toISOString()})};class i extends Error{constructor(e,t){super(e,{cause:t?.cause}),this.name=this.constructor.name,this.context=t?.context??{},this.timestamp=new Date,Object.setPrototypeOf(this,new.target.prototype)}serialize(){const e=new WeakSet;return e.add(this),{name:this.name,message:this.message,context:this.context,stack:this.stack,cause:r(this.cause,e),timestamp:this.timestamp.toISOString()}}toJSON(){return this.serialize()}}class s extends i{}class c extends i{}const l=(e,t="An unexpected error occurred")=>e instanceof i?e:e instanceof Error?new c(e.message||t,{cause:e}):"string"==typeof e&&e.length>0?new c(e):new c(t,{context:{original:e}})},438(e,t,n){n.d(t,{MW:()=>a,S8:()=>s});n(232);var a,o,r=n(723);!function(e){e.Workspace="openfin-workspace",e.OldWorkspace="openfin-browser"}(a||(a={})),function(e){e.FinProtocol="fin-protocol"}(o||(o={}));r.$h,a.Workspace;let i=null;const s=async()=>(i||(i=fin.Application.getCurrentSync().getManifest()),i)},102(e,t,n){n(232);var a=n(723);(0,n(822).h)("common.channels"),a.YY&&"complete"!==document.readyState&&new Promise(e=>document.addEventListener("readystatechange",()=>{"complete"===document.readyState&&e()}))},723(e,t,n){var a;n.d(t,{$h:()=>s,YY:()=>r,et:()=>d,vL:()=>c}),function(e){e.Local="local",e.Dev="dev",e.Staging="staging",e.Prod="prod"}(a||(a={}));const o="undefined"!=typeof window&&"undefined"!=typeof fin,r=("undefined"==typeof process||process.env,"undefined"!=typeof window),i=r?window.origin:a.Local,s=o&&fin.me.uuid,c=o&&fin.me.name,l=(o&&fin.me.entityType,a.Local,a.Dev,a.Staging,a.Prod,e=>e.startsWith("http://")||e.startsWith("https://")?e:i+e),d=(l("https://workspace.openfin.co/workspace/45.1.0"),l("https://workspace.openfin.co/workspace/45.1.0"),"undefined"!=typeof WORKSPACE_DOCS_PLATFORM_URL&&l(WORKSPACE_DOCS_PLATFORM_URL),"undefined"!=typeof WORKSPACE_DOCS_CLIENT_URL&&l(WORKSPACE_DOCS_CLIENT_URL),"45.1.0");"undefined"!=typeof WORKSPACE_BUILD_SHA&&WORKSPACE_BUILD_SHA},822(e,t,n){n.d(t,{h:()=>s});var a=n(232);let o="undefined"==typeof LOG_STRINGIFY||!0===LOG_STRINGIFY;const r={includeTimestamp:!0,customPrefix:"",stringifyData:void 0},i=e=>{try{return JSON.stringify(e,null,2)}catch(t){try{const t=new WeakSet;return JSON.stringify(e,(e,n)=>{if("object"==typeof n&&null!==n){if(t.has(n))return"[Circular Reference]";t.add(n)}return"bigint"==typeof n?`[BigInt: ${n.toString()}]`:"function"==typeof n?`[Function: ${n.name||"anonymous"}]`:"symbol"==typeof n?`[Symbol: ${n.toString()}]`:void 0===n?"[Undefined]":n},2)}catch(t){try{return`[Non-serializable: ${Object.prototype.toString.call(e)}]`}catch{return"[Unable to serialize data]"}}}},s=(e,t={})=>{const n={...r,...t},s=(r,s,d,p)=>{try{const a=((e,t,n,a)=>{const o=a.includeTimestamp?(new Date).toISOString():"";return`${o?`${o} `:""}${a.customPrefix?`${a.customPrefix} `:""}[${e}][${t}] ${n}`})(e,s,d,n),c=((e,t)=>{if(!e)return;const n="function"==typeof e?e():e;return n?t?i(n):n:void 0})(p,void 0!==t.stringifyData?t.stringifyData:o),l=console[r];void 0!==c?l(a,c):l(a)}catch(t){try{if(!l&&c){l=!0;try{c.error("logWithLevel","Failed to log message",{error:(0,a.b_)(t)})}finally{l=!1}}else console.error("[Logger Error] Failed to log message:",(0,a.b_)(t));console[r](`[${e}][${s}]`,d,p)}catch(e){}}};return{debug:(e,t,n)=>s("debug",e,t,n),info:(e,t,n)=>s("info",e,t,n),warn:(e,t,n)=>s("warn",e,t,n),error:(e,t,n)=>s("error",e,t,n)}};let c,l=!1;c=s("Logger.Fallback")},277(e,t,n){n.d(t,{os:()=>s});var a=n(723),o=n(822);n(70),n(232);(0,o.h)("common.usageRegister");var r;!function(e){e.Browser="Browser",e.Dock="Dock",e.EnterpriseDock="EnterpriseDock",e.Home="Home",e.Notification="Notification",e.Storefront="Storefront",e.Platform="Platform",e.Theming="Theming",e.Microflow="Microflow",e.SuppressWorkspaceSwitched="SuppressWorkspaceSwitched",e.SuppressWorkspaceSaved="SuppressWorkspaceSaved",e.AllowDuplicatePageTitles="AllowDuplicatePageTitles",e.PagePinning="PagePinning",e.ViewTabNewTabShortcut="ViewTabNewTabShortcut",e.SupertabHideShowTabs="PRODM-318: Supertab Hide/Show Tab Headers"}(r||(r={}));const i=async(e,t,n="workspace-licensing")=>{const o={apiVersion:t.apiVersion||a.et,componentName:e,componentVersion:t.componentVersion||a.et,allowed:t.allowed,rejectionCode:t.rejectionCode};fin.System.registerUsage({type:n,data:o})};const s=e=>{i(r.Notification,e)};new Map},70(e,t,n){n.d(t,{ct:()=>i});n(232),n(78);var a=n(438),o=n(723);(0,n(822).h)("common.window");var r;!function(e){e.Home="openfin-home",e.Dock="openfin-dock",e.Storefront="openfin-storefront",e.HomeInternal="openfin-home-internal",e.BrowserIndicator="openfin-browser-indicator",e.BrowserWindow="internal-generated-window",e.ClassicWindow="internal-generated-classic-window",e.BrowserAddressSearchPrefix="openfin-browser-menu-address-search-",e.DockCompanion="openfin-dock-companion",e.AICompanionPrefix="openfin-ai-companion-",e.AboutPageWindow="here-about-page",e.FindInPageViewPrefix="here-find-in-page-view-",e.BrowserMenu="openfin-browser-menu",e.BrowserSaveMenu="openfin-browser-save-menu",e.DockSaveWorkspaceMenu="openfin-dock3-save-workspace-menu",e.DropdownMenu="openfin-enterprise-dropdown-menu",e.EnterpriseContextMenu="openfin-enterprise-context-menu",e.TabSearchMenu="openfin-browser-tab-search-menu",e.EnterpriseBookmarkDialogWindow="openfin-enterprise-bookmark-dialog",e.ZoomControlsDialog="here-zoom-controls-dialog",e.UpdateVersionModal="here-update-version-modal",e.ApplyAndPublishModal="here-apply-and-publish-modal",e.PublishOnCloseModal="here-publish-on-close-modal",e.DesktopSignalsModal="here-desktop-signals-modal",e.IntentsResolverModal="here-intents-resolver-modal"}(r||(r={}));o.vL,o.$h;r.Home,a.MW.Workspace,r.Dock,a.MW.Workspace;const i={name:"Notification-Center",uuid:"notifications-service"};r.Storefront,a.MW.Workspace,a.MW.Workspace,a.MW.Workspace},812(e){e.exports=require("@openfin/notifications")}},t={};function n(a){var o=t[a];if(void 0!==o)return o.exports;var r=t[a]={exports:{}};return e[a](r,r.exports,n),r.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var a in t)n.o(t,a)&&!n.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var a={};n.r(a),n.d(a,{deregister:()=>h,isLegacyNotifications:()=>f,register:()=>S,usesNotificationsSyncChannel:()=>u});var o=n(277),r=n(78),i=n(79),s=n(812),c={};for(const e in s)["default","usesNotificationsSyncChannel","isLegacyNotifications","register","deregister"].indexOf(e)<0&&(c[e]=()=>s[e]);n.d(a,c);const l=async e=>{if(e instanceof Error){let t=e.message;if(e.message.includes("register-notifications-platform")){if(t="Notifications platforms are not supported in versions below 1.13.0, try updating your notifications-service.",s?.provider?.getStatus){const{version:e}=await s.provider.getStatus();t+=` Your version is: ${e}`}return t}return e.message}return"string"==typeof e?e:"unknown error registering Notifications"},d=async e=>{if(e instanceof Error&&e.message.includes("register-notifications-platform"))throw new Error(await l(e));throw e},p="of-notifications-service-v1",u=e=>{const[t]=e.split("."),n=Number.parseInt(t,10);return Number.isFinite(n)&&n>=2},f=e=>{const[t,n]=e.split(".").map(Number);return t<2||2===t&&n<=13},g={channelName:r.XI},m=async(e,t,n=!1)=>{const a=u(t.notificationsVersion)?g.channelName:p,o=await fin.InterApplicationBus.Channel.connect(a,{wait:n}),r=u(t.notificationsVersion)?"register-platform":"register-notifications-platform";await o.dispatch(r,e)};async function S(e){try{const t=await(0,r.kz)(),n=e&&"notificationsCustomManifest"in e?{customManifest:e.notificationsCustomManifest}:void 0;let a=!1;t!==r.XI?(g.channelName=t,a=!0):n&&n.customManifest?.manifestUuid&&(g.channelName=`${n.customManifest.manifestUuid}-${r.XI}`,console.warn("Using 'notificationsCustomManifest' is deprecated. Please include custom manifest in platform manifest."));const c=await s.register(n),l=await(0,i.N)(fin.me.identity),d=await l.dispatch(i.OF.GetThemePaletteSheet,void 0),p=await l.dispatch(i.OF.GetNotificationIndicatorColorsInternal,void 0);if(e){const t=await l.dispatch(i.OF.GetSelectedScheme,void 0),n=f(c.notificationsVersion),o=n?await l.dispatch(i.OF.GetLegacyNotificationsThemeInternal,void 0):null,r="notificationsPlatformOptions"in e?e.notificationsPlatformOptions:e,s=o??d;await m({theme:s,...n?{}:{notificationsIndicatorColors:p},scheme:t,...r,workspacePlatform:{identity:fin.Platform.getCurrentSync().identity,analytics:{isSupported:!0}}},{notificationsVersion:c.notificationsVersion},a)}return(0,o.os)({allowed:!0,apiVersion:s.VERSION,componentVersion:c.notificationsVersion}),c}catch(e){(0,o.os)({allowed:!1,rejectionCode:await l(e),apiVersion:s.VERSION}),await d(e)}}const h=async e=>{try{const{version:t}=await s.provider.getStatus();if(null===t)throw new Error("Notifications service is not currently running.");await(async(e,t)=>{const n=u(t.notificationsVersion)?g.channelName:p,a=await fin.InterApplicationBus.Channel.connect(n,{wait:!1}),o=u(t.notificationsVersion)?"deregister-platform":"deregister-notifications-platform";await a.dispatch(o,e)})({id:e},{notificationsVersion:t})}catch(e){await d(e)}};module.exports=a})();
|
|
1
|
+
(()=>{"use strict";var e={78(e,t,n){n.d(t,{XI:()=>c,kz:()=>d});var a=n(438),o=n(232),r=(n(102),n(822)),i=n(70);const s=(0,r.h)("common.protocol.notifications"),c="of-workspace-notifications-sync";var l;async function d(){const e=await async function(){try{const e=await(0,a.S8)(),t=e?.notifications?.customManifest?.manifestUuid;return t||i.ct.uuid}catch(e){return s.warn("getNotificationCenterUuid","Could not get manifest options for notifications, using default",{error:(0,o.b_)(e)}),i.ct.uuid}}();return e!==i.ct.uuid?`${e}-${c}`:c}!function(e){e.UpdatePlatformThemeScheme="update-platform-theme-scheme"}(l||(l={}))},79(e,t,n){n.d(t,{N:()=>c,OF:()=>r});var a=n(232);const o=(0,n(822).h)("common.protocol.workspacePlatform");var r;!function(e){e.LaunchApp="launchApp",e.SavePage="savePage",e.GetSavedPage="getSavedPage",e.CreateSavedPage="createSavedPage",e.UpdateSavedPage="updateSavedPage",e.DeleteSavedPage="deleteSavedPage",e.GetSavedPages="getSavedPages",e.CreateSavedPageInternal="createSavedPageInternal",e.UpdateSavedPageInternal="updateSavedPageInternal",e.DeleteSavedPageInternal="deleteSavedPageInternal",e.UpdatePageForWindow="updatePageForWindow",e.AttachPagesToWindow="attachPagesToWindow",e.DetachPagesFromWindow="detachPagesFromWindow",e.ReorderPagesForWindow="reorderPagesForWindow",e.SetActivePage="setActivePage",e.AddPage="addPage",e.AddDefaultPage="addDefaultPage",e.GetAllAttachedPages="getAllAttachedPages",e.GetActivePageIdForWindow="getActivePageIdForWindow",e.GetPagesForWindow="getPagesForWindow",e.GetPageForWindow="getPageForWindow",e.GetSavedPageMetadata="getSavedPageMetadata",e.GetUniquePageTitle="getUniquePageTitle",e.GetLastFocusedBrowserWindow="getLastFocusedBrowserWindow",e.GetPageByViewIdentity="getPageByViewIdentity",e.GetThemes="getThemes",e.GetGeneratedPalettes="getGeneratedPalettes",e.GetThemePaletteSheet="getThemePaletteSheet",e.GetSelectedScheme="getSelectedScheme",e.SetSelectedScheme="setSelectedScheme",e.OpenGlobalContextMenuInternal="openGlobalContextMenuInternal",e.OpenViewTabContextMenuInternal="openViewTabContextMenuInternal",e.OpenPageTabContextMenuInternal="openPageTabContextMenuInternal",e.OpenSaveButtonContextMenuInternal="openSaveButtonContextMenuInternal",e.InvokeCustomActionInternal="invokeCustomActionInternal",e.RequestQuitPlatformDialogInternal="requestQuitPlatformDialogInternal",e.GetSavedWorkspace="getSavedWorkspace",e.CreateSavedWorkspace="createSavedWorkspace",e.UpdateSavedWorkspace="updateSavedWorkspace",e.DeleteSavedWorkspace="deleteSavedWorkspace",e.GetSavedWorkspaces="getSavedWorkspaces",e.GetSavedWorkspacesMetadata="getSavedWorkspacesMetadata",e.SaveWorkspace="saveWorkspace",e.GetCurrentWorkspace="getCurrentWorkspace",e.ApplyWorkspace="applyWorkspace",e.RestoreLastSavedWorkspaceInternal="restoreLastSavedWorkspaceInternal",e.SetActiveWorkspace="setActiveWorkspace",e.IsBrowserInitialized="isBrowserInitialized",e.Analytics="analyticsInternal",e.GetLanguage="getLanguage",e.GetLanguageResourcesInternal="getLanguageResourcesInternal",e.SetLanguage="setLanguage",e.GetDockProviderConfig="getDockProviderConfig",e.SaveDockProviderConfig="saveDockProviderConfig",e.HandleSaveModalOnPageClose="handleSaveModalOnPageClose",e.ShouldPageClose="shouldPageClose",e.ShouldWindowClose="shouldWindowClose",e.CopyPage="copyPage",e.HandlePageChanges="handlePageChanges",e.MarkUnsavedPagesAsSavedInternal="markUnsavedPagesAsSavedInternal",e.TrackRemovedTabInternal="trackRemovedTabInternal",e.RestoreRemovedTabInternal="restoreRemovedTabInternal",e.TrackVisitedSiteInternal="trackVisitedSiteInternal",e.GetRecentlyVisitedSitesInternal="getRecentlyVisitedSitesInternal",e.GetFrequentlyVisitedSitesInternal="getFrequentlyVisitedSitesInternal",e.SearchSitesInternal="searchSitesInternal",e.GetSearchProvidersInternal="getSearchProvidersInternal",e.GetCuratedContentInternal="getCuratedContentInternal",e.HandleRequestNavigationInternal="handleRequestNavigationInternal",e.RefreshBookmarksInternal="refreshBookmarksInternal",e.LaunchBookmarkInternal="launchBookmarkInternal",e.GetNotificationsConfig="getNotificationsConfig",e.UpdateDockFavoritesInternal="updateDockFavoritesInternal",e.UpdateContentMenuInternal="updateContentMenuInternal",e.LaunchDockEntryInternal="launchDockEntryInternal",e.SetDockFavoritesOrderInternal="setDockFavoritesOrderInternal",e.NavigateContentMenuInternal="navigateContentMenuInternal",e.SetDefaultDockButtonsOrderInternal="setDefaultDockButtonsOrderInternal",e.GetDockWorkspacesContextMenuInternal="getDockWorkspacesContextMenuInternal",e.HandleDockWorkspacesMenuResponseInternal="handleDockWorkspacesMenuResponseInternal",e.RefreshDockCollectionMenuInternal="refreshDockCollectionMenuInternal",e.LaunchCollectionInternal="launchCollectionInternal",e.RemoveDockFavoriteInternal="removeDockFavoriteInternal",e.AddDockFavoriteInternal="addDockFavoriteInternal",e.FocusAndExpandSearchInternal="focusAndExpandSearchInternal",e.SendUpdateVersionModalResponseInternal="sendUpdateVersionModalResponseInternal",e.ShowUpdateVersionModalInternal="showUpdateVersionModalInternal",e.ShowApplyAndPublishModalInternal="showApplyAndPublishModalInternal",e.GetNotificationIndicatorColorsInternal="getNotificationIndicatorColorsInternal",e.GetIsLegacySinglePaletteTheme="getIsLegacySinglePaletteTheme",e.GetLegacyNotificationsThemeInternal="getLegacyNotificationsThemeInternal"}(r||(r={}));const i=async e=>fin.Platform.wrapSync(e).getClient(),s=async e=>{const t=await i(e),n="Target is not a Workspace Platform. Target must call WorkspacePlatform.init";let r;try{r=await t.dispatch("isWorkspacePlatform")}catch(e){throw new a.Wk(n,{cause:e})}if("boolean"==typeof r&&r)return o.warn("internalGetWorkspacePlatformChannelClient","You are using an older version of the workspace platform. Please update your workspace platform."),r;if("object"==typeof r&&r.isWorkspacePlatform)return r;throw new a.Wk(n)},c=async e=>(await s(e),i(e))},232(e,t,n){n.d(t,{Wk:()=>s,b_:()=>l});const a=new Set(["name","message","stack","cause"]),o=(e,t)=>{const n={};for(const o of Object.getOwnPropertyNames(e)){if(a.has(o))continue;const i=e[o];"errors"===o&&Array.isArray(i)?n.errors=i.map(e=>r(e,t)):n[o]=i}return n},r=(e,t=new WeakSet)=>{if(null!=e)return"object"==typeof e&&t.has(e)?{name:"CircularReference",message:"[circular]",context:{},timestamp:(new Date).toISOString()}:("object"==typeof e&&t.add(e),e instanceof i?{name:e.name,message:e.message,context:e.context,stack:e.stack,cause:r(e.cause,t),timestamp:e.timestamp.toISOString()}:e instanceof Error?{name:e.name,message:e.message,context:o(e,t),stack:e.stack,cause:r(e.cause,t),timestamp:(new Date).toISOString()}:{name:"NonError",message:String(e),context:{value:e},timestamp:(new Date).toISOString()})};class i extends Error{constructor(e,t){super(e,{cause:t?.cause}),this.name=this.constructor.name,this.context=t?.context??{},this.timestamp=new Date,Object.setPrototypeOf(this,new.target.prototype)}serialize(){const e=new WeakSet;return e.add(this),{name:this.name,message:this.message,context:this.context,stack:this.stack,cause:r(this.cause,e),timestamp:this.timestamp.toISOString()}}toJSON(){return this.serialize()}}class s extends i{}class c extends i{}const l=(e,t="An unexpected error occurred")=>e instanceof i?e:e instanceof Error?new c(e.message||t,{cause:e}):"string"==typeof e&&e.length>0?new c(e):new c(t,{context:{original:e}})},438(e,t,n){n.d(t,{MW:()=>a,S8:()=>s});n(232);var a,o,r=n(723);!function(e){e.Workspace="openfin-workspace",e.OldWorkspace="openfin-browser"}(a||(a={})),function(e){e.FinProtocol="fin-protocol"}(o||(o={}));r.$h,a.Workspace;let i=null;const s=async()=>(i||(i=fin.Application.getCurrentSync().getManifest()),i)},102(e,t,n){n(232);var a=n(723);(0,n(822).h)("common.channels"),a.YY&&"complete"!==document.readyState&&new Promise(e=>document.addEventListener("readystatechange",()=>{"complete"===document.readyState&&e()}))},723(e,t,n){var a;n.d(t,{$h:()=>s,YY:()=>r,et:()=>d,vL:()=>c}),function(e){e.Local="local",e.Dev="dev",e.Staging="staging",e.Prod="prod"}(a||(a={}));const o="undefined"!=typeof window&&"undefined"!=typeof fin,r=("undefined"==typeof process||process.env,"undefined"!=typeof window),i=r?window.origin:a.Local,s=o&&fin.me.uuid,c=o&&fin.me.name,l=(o&&fin.me.entityType,a.Local,a.Dev,a.Staging,a.Prod,e=>e.startsWith("http://")||e.startsWith("https://")?e:i+e),d=(l("https://workspace.openfin.co/workspace/45.1.2"),l("https://workspace.openfin.co/workspace/45.1.2"),"undefined"!=typeof WORKSPACE_DOCS_PLATFORM_URL&&l(WORKSPACE_DOCS_PLATFORM_URL),"undefined"!=typeof WORKSPACE_DOCS_CLIENT_URL&&l(WORKSPACE_DOCS_CLIENT_URL),"45.1.2");"undefined"!=typeof WORKSPACE_BUILD_SHA&&WORKSPACE_BUILD_SHA},822(e,t,n){n.d(t,{h:()=>s});var a=n(232);let o="undefined"==typeof LOG_STRINGIFY||!0===LOG_STRINGIFY;const r={includeTimestamp:!0,customPrefix:"",stringifyData:void 0},i=e=>{try{return JSON.stringify(e,null,2)}catch(t){try{const t=new WeakSet;return JSON.stringify(e,(e,n)=>{if("object"==typeof n&&null!==n){if(t.has(n))return"[Circular Reference]";t.add(n)}return"bigint"==typeof n?`[BigInt: ${n.toString()}]`:"function"==typeof n?`[Function: ${n.name||"anonymous"}]`:"symbol"==typeof n?`[Symbol: ${n.toString()}]`:void 0===n?"[Undefined]":n},2)}catch(t){try{return`[Non-serializable: ${Object.prototype.toString.call(e)}]`}catch{return"[Unable to serialize data]"}}}},s=(e,t={})=>{const n={...r,...t},s=(r,s,d,p)=>{try{const a=((e,t,n,a)=>{const o=a.includeTimestamp?(new Date).toISOString():"";return`${o?`${o} `:""}${a.customPrefix?`${a.customPrefix} `:""}[${e}][${t}] ${n}`})(e,s,d,n),c=((e,t)=>{if(!e)return;const n="function"==typeof e?e():e;return n?t?i(n):n:void 0})(p,void 0!==t.stringifyData?t.stringifyData:o),l=console[r];void 0!==c?l(a,c):l(a)}catch(t){try{if(!l&&c){l=!0;try{c.error("logWithLevel","Failed to log message",{error:(0,a.b_)(t)})}finally{l=!1}}else console.error("[Logger Error] Failed to log message:",(0,a.b_)(t));console[r](`[${e}][${s}]`,d,p)}catch(e){}}};return{debug:(e,t,n)=>s("debug",e,t,n),info:(e,t,n)=>s("info",e,t,n),warn:(e,t,n)=>s("warn",e,t,n),error:(e,t,n)=>s("error",e,t,n)}};let c,l=!1;c=s("Logger.Fallback")},277(e,t,n){n.d(t,{os:()=>s});var a=n(723),o=n(822);n(70),n(232);(0,o.h)("common.usageRegister");var r;!function(e){e.Browser="Browser",e.Dock="Dock",e.EnterpriseDock="EnterpriseDock",e.Home="Home",e.Notification="Notification",e.Storefront="Storefront",e.Platform="Platform",e.Theming="Theming",e.Microflow="Microflow",e.SuppressWorkspaceSwitched="SuppressWorkspaceSwitched",e.SuppressWorkspaceSaved="SuppressWorkspaceSaved",e.AllowDuplicatePageTitles="AllowDuplicatePageTitles",e.PagePinning="PagePinning",e.ViewTabNewTabShortcut="ViewTabNewTabShortcut",e.SupertabHideShowTabs="PRODM-318: Supertab Hide/Show Tab Headers"}(r||(r={}));const i=async(e,t,n="workspace-licensing")=>{const o={apiVersion:t.apiVersion||a.et,componentName:e,componentVersion:t.componentVersion||a.et,allowed:t.allowed,rejectionCode:t.rejectionCode};fin.System.registerUsage({type:n,data:o})};const s=e=>{i(r.Notification,e)};new Map},70(e,t,n){n.d(t,{ct:()=>i});n(232),n(78);var a=n(438),o=n(723);(0,n(822).h)("common.window");var r;!function(e){e.Home="openfin-home",e.Dock="openfin-dock",e.Storefront="openfin-storefront",e.HomeInternal="openfin-home-internal",e.BrowserIndicator="openfin-browser-indicator",e.BrowserWindow="internal-generated-window",e.ClassicWindow="internal-generated-classic-window",e.BrowserAddressSearchPrefix="openfin-browser-menu-address-search-",e.DockCompanion="openfin-dock-companion",e.AICompanionPrefix="openfin-ai-companion-",e.AboutPageWindow="here-about-page",e.FindInPageViewPrefix="here-find-in-page-view-",e.BrowserMenu="openfin-browser-menu",e.BrowserSaveMenu="openfin-browser-save-menu",e.DockSaveWorkspaceMenu="openfin-dock3-save-workspace-menu",e.DropdownMenu="openfin-enterprise-dropdown-menu",e.EnterpriseContextMenu="openfin-enterprise-context-menu",e.TabSearchMenu="openfin-browser-tab-search-menu",e.EnterpriseBookmarkDialogWindow="openfin-enterprise-bookmark-dialog",e.ZoomControlsDialog="here-zoom-controls-dialog",e.UpdateVersionModal="here-update-version-modal",e.ApplyAndPublishModal="here-apply-and-publish-modal",e.PublishOnCloseModal="here-publish-on-close-modal",e.DesktopSignalsModal="here-desktop-signals-modal",e.IntentsResolverModal="here-intents-resolver-modal"}(r||(r={}));o.vL,o.$h;r.Home,a.MW.Workspace,r.Dock,a.MW.Workspace;const i={name:"Notification-Center",uuid:"notifications-service"};r.Storefront,a.MW.Workspace,a.MW.Workspace,a.MW.Workspace},812(e){e.exports=require("@openfin/notifications")}},t={};function n(a){var o=t[a];if(void 0!==o)return o.exports;var r=t[a]={exports:{}};return e[a](r,r.exports,n),r.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var a in t)n.o(t,a)&&!n.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var a={};n.r(a),n.d(a,{deregister:()=>h,isLegacyNotifications:()=>f,register:()=>S,usesNotificationsSyncChannel:()=>u});var o=n(277),r=n(78),i=n(79),s=n(812),c={};for(const e in s)["default","usesNotificationsSyncChannel","isLegacyNotifications","register","deregister"].indexOf(e)<0&&(c[e]=()=>s[e]);n.d(a,c);const l=async e=>{if(e instanceof Error){let t=e.message;if(e.message.includes("register-notifications-platform")){if(t="Notifications platforms are not supported in versions below 1.13.0, try updating your notifications-service.",s?.provider?.getStatus){const{version:e}=await s.provider.getStatus();t+=` Your version is: ${e}`}return t}return e.message}return"string"==typeof e?e:"unknown error registering Notifications"},d=async e=>{if(e instanceof Error&&e.message.includes("register-notifications-platform"))throw new Error(await l(e));throw e},p="of-notifications-service-v1",u=e=>{const[t]=e.split("."),n=Number.parseInt(t,10);return Number.isFinite(n)&&n>=2},f=e=>{const[t,n]=e.split(".").map(Number);return t<2||2===t&&n<=13},g={channelName:r.XI},m=async(e,t,n=!1)=>{const a=u(t.notificationsVersion)?g.channelName:p,o=await fin.InterApplicationBus.Channel.connect(a,{wait:n}),r=u(t.notificationsVersion)?"register-platform":"register-notifications-platform";await o.dispatch(r,e)};async function S(e){try{const t=await(0,r.kz)(),n=e&&"notificationsCustomManifest"in e?{customManifest:e.notificationsCustomManifest}:void 0;let a=!1;t!==r.XI?(g.channelName=t,a=!0):n&&n.customManifest?.manifestUuid&&(g.channelName=`${n.customManifest.manifestUuid}-${r.XI}`,console.warn("Using 'notificationsCustomManifest' is deprecated. Please include custom manifest in platform manifest."));const c=await s.register(n),l=await(0,i.N)(fin.me.identity),d=await l.dispatch(i.OF.GetThemePaletteSheet,void 0),p=await l.dispatch(i.OF.GetNotificationIndicatorColorsInternal,void 0);if(e){const t=await l.dispatch(i.OF.GetSelectedScheme,void 0),n=f(c.notificationsVersion),o=n?await l.dispatch(i.OF.GetLegacyNotificationsThemeInternal,void 0):null,r="notificationsPlatformOptions"in e?e.notificationsPlatformOptions:e,s=o??d;await m({theme:s,...n?{}:{notificationsIndicatorColors:p},scheme:t,...r,workspacePlatform:{identity:fin.Platform.getCurrentSync().identity,analytics:{isSupported:!0}}},{notificationsVersion:c.notificationsVersion},a)}return(0,o.os)({allowed:!0,apiVersion:s.VERSION,componentVersion:c.notificationsVersion}),c}catch(e){(0,o.os)({allowed:!1,rejectionCode:await l(e),apiVersion:s.VERSION}),await d(e)}}const h=async e=>{try{const{version:t}=await s.provider.getStatus();if(null===t)throw new Error("Notifications service is not currently running.");await(async(e,t)=>{const n=u(t.notificationsVersion)?g.channelName:p,a=await fin.InterApplicationBus.Channel.connect(n,{wait:!1}),o=u(t.notificationsVersion)?"deregister-platform":"deregister-notifications-platform";await a.dispatch(o,e)})({id:e},{notificationsVersion:t})}catch(e){await d(e)}};module.exports=a})();
|
|
2
2
|
//# sourceMappingURL=notifications.js.map
|
package/package.json
CHANGED
|
@@ -2,18 +2,18 @@
|
|
|
2
2
|
"name": "@openfin/workspace",
|
|
3
3
|
"description": "An API for integrating with OpenFin Workspace.",
|
|
4
4
|
"main": "index.js",
|
|
5
|
-
"version": "45.1.
|
|
5
|
+
"version": "45.1.2",
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"keywords": [
|
|
8
8
|
"client api"
|
|
9
9
|
],
|
|
10
10
|
"license": "SEE LICENSE IN LICENSE.MD",
|
|
11
11
|
"peerDependencies": {
|
|
12
|
-
"@openfin/core": "45.100.
|
|
12
|
+
"@openfin/core": "45.100.104"
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
15
15
|
"@openfin/microsoft365": "^1.1.0",
|
|
16
|
-
"@openfin/notifications": "45.
|
|
16
|
+
"@openfin/notifications": "45.1.0-alpha-4875",
|
|
17
17
|
"dexie": "^4.0.11",
|
|
18
18
|
"i18next": "^23.7.16",
|
|
19
19
|
"lodash.debounce": "^4.0.8",
|