@openfin/workspace-platform 16.0.7 → 16.0.9

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.
@@ -204,15 +204,12 @@ string | {
204
204
  */
205
205
  dark: string;
206
206
  };
207
- export type SplitButtonOption = {
208
- /**
209
- * The label that appears on the button.
210
- */
211
- label?: string;
207
+ export type ContactInfoButtons = {
208
+ type: 'button';
212
209
  /**
213
210
  * The icon to display on the button.
214
211
  */
215
- icon?: ButtonIcon;
212
+ icon: ButtonIcon;
216
213
  /**
217
214
  * The tooltip to display on the button.
218
215
  */
@@ -221,12 +218,8 @@ export type SplitButtonOption = {
221
218
  * The action to execute when the button is clicked.
222
219
  */
223
220
  action: string;
224
- };
225
- export type SplitButton = {
226
- /**
227
- * The label that appears on the button.
228
- */
229
- label?: string;
221
+ } | {
222
+ type: 'dropdown';
230
223
  /**
231
224
  * The icon to display on the button.
232
225
  */
@@ -238,29 +231,25 @@ export type SplitButton = {
238
231
  /**
239
232
  * The action to execute when the button is clicked.
240
233
  */
241
- action: string;
234
+ action?: string;
242
235
  /**
243
236
  * The list of options to display in the dropdown.
244
237
  */
245
- options: SplitButtonOption[];
238
+ options: {
239
+ /**
240
+ * The icon to display on the button.
241
+ */
242
+ icon?: ButtonIcon;
243
+ /**
244
+ * The tooltip to display on the button.
245
+ */
246
+ tooltip: string;
247
+ /**
248
+ * The action to execute when the button is clicked.
249
+ */
250
+ action: string;
251
+ }[];
246
252
  };
247
- export type ContactInfoButtons = {
248
- type: 'button';
249
- /**
250
- * The icon to display on the button.
251
- */
252
- icon: ButtonIcon;
253
- /**
254
- * The tooltip to display on the button.
255
- */
256
- tooltip: string;
257
- /**
258
- * The action to execute when the button is clicked.
259
- */
260
- action: string;
261
- } | (SplitButton & {
262
- type: 'dropdown';
263
- });
264
253
  /**
265
254
  * Contact Info Search Result
266
255
  */
@@ -3,20 +3,18 @@
3
3
  *
4
4
  * @module Templates
5
5
  */
6
- import { SplitButton as SplitButtonTemplateData } from './home';
7
6
  export type ListPairs = [string, string][];
8
- export type CustomTemplateData = Record<string, string | ListPairs | SplitButtonTemplateData>;
9
- export type ContainerFragmentTypes = PlainContainerTemplateFragment | ButtonTemplateFragment | SplitButtonFragment;
7
+ export type CustomTemplateData = Record<string, string | ListPairs>;
8
+ export type ContainerFragmentTypes = PlainContainerTemplateFragment | ButtonTemplateFragment;
10
9
  export type PresentationFragmentTypes = TextTemplateFragment | ImageTemplateFragment | ListTemplateFragment;
11
10
  export type InteractiveFragmentTypes = ButtonTemplateFragment | TextTemplateFragment | ImageTemplateFragment;
12
11
  /**
13
12
  * The options to build your custom template composition layout.
14
13
  */
15
- export type TemplateFragment = PlainContainerTemplateFragment | ButtonTemplateFragment | TextTemplateFragment | ListTemplateFragment | ImageTemplateFragment | SplitButtonFragment;
14
+ export type TemplateFragment = PlainContainerTemplateFragment | ButtonTemplateFragment | TextTemplateFragment | ListTemplateFragment | ImageTemplateFragment;
16
15
  export declare const ContainerTemplateFragmentNames: {
17
16
  readonly Container: "Container";
18
17
  readonly Button: "Button";
19
- readonly SplitButton: "SplitButton";
20
18
  };
21
19
  export declare const PresentationTemplateFragmentNames: {
22
20
  readonly Text: "Text";
@@ -29,7 +27,6 @@ export declare const TemplateFragmentTypes: {
29
27
  readonly List: "List";
30
28
  readonly Container: "Container";
31
29
  readonly Button: "Button";
32
- readonly SplitButton: "SplitButton";
33
30
  };
34
31
  export interface BaseTemplateFragment<T extends keyof typeof TemplateFragmentTypes> {
35
32
  /**
@@ -118,55 +115,6 @@ export type ButtonTemplateFragment = ContainerTemplateFragment<'Button'> & Fragm
118
115
  */
119
116
  buttonStyle?: ButtonStyle;
120
117
  };
121
- export type SplitButtonFragment = ContainerTemplateFragment<'SplitButton'> & {
122
- /**
123
- * The type of button that determines styling.
124
- */
125
- buttonType: 'primary' | 'secondary';
126
- /**
127
- * Data key of the template fragment.
128
- *
129
- * The data associated with this fragment will be looked up in `templateData` map with this key.
130
- *
131
- * Example:
132
- * ```ts
133
- * const myTemplateLayout = {
134
- * type: FragmentTypes.SplitButton,
135
- * buttonType: 'primary',
136
- * dataKey: 'splitButton1',
137
- * }
138
- *
139
- * const searchResult: CLISearchResultCustom = {
140
- * //...
141
- * template: CLITemplate.Custom,
142
- * templateContent: {
143
- * layout: myTemplateLayout,
144
- * data: {
145
- * splitButton1: {
146
- * label: 'Split Button 1',
147
- * tooltip: 'Click me',
148
- * icon: 'iconURL',
149
- * action: 'primaryAction',
150
- * options: [
151
- * {
152
- * label: 'Menu Option 1',
153
- * tooltip: 'Click for optionAction1',
154
- * action: 'optionAction1'
155
- * },
156
- * {
157
- * label: 'Menu Option 2',
158
- * tooltip: 'Click for optionAction2',
159
- * action: 'optionAction1'
160
- * }
161
- * ]
162
- * }
163
- * }
164
- * };
165
- * ```
166
- *
167
- */
168
- dataKey: string;
169
- };
170
118
  export type TextTemplateFragment = PresentationTemplateFragment<'Text'> & FragmentAction;
171
119
  export type ImageTemplateFragment = PresentationTemplateFragment<'Image'> & FragmentAction & {
172
120
  /**
@@ -11,7 +11,7 @@ export type { App, AppIntent, Image } from '../../client-api/src/shapes';
11
11
  export type { CustomActionSpecifier, CustomButtonConfig } from '../../common/src/api/action';
12
12
  export type { AttachedPage, Page, PageLayout, PageLayoutDetails, PageWithUpdatableRuntimeAttribs, PanelConfigHorizontal, PanelConfigVertical, PanelConfig, ExtendedPanelConfig } from '../../common/src/api/pages/shapes';
13
13
  export { PanelPosition } from '../../common/src/api/pages/shapes';
14
- export type { CustomThemes, CustomThemeOptions, CustomThemeOptionsWithScheme, CustomPaletteSet, BaseThemeOptions, ThemeExtension, WorkspaceThemePaletteSet, NotificationIndicatorColorsSet, NotificationIndicatorColorsSetDarkScheme, NotificationIndicatorColorsSetLightScheme, NotificationIndicatorColorsWithScheme } from '../../common/src/api/theming';
14
+ export type { CustomThemes, CustomThemeOptions, CustomThemeOptionsWithScheme, CustomPaletteSet } from '../../common/src/api/theming';
15
15
  export type { AnalyticsEvent } from '../../common/src/utils/usage-register';
16
16
  export type { WorkflowIntegration } from '../../client-api/src/shapes/integrations';
17
17
  /**
@@ -339,7 +339,7 @@ export interface CustomBrowserButtonConfig extends CustomButtonConfig {
339
339
  */
340
340
  export interface PreDefinedButtonConfig {
341
341
  /** Type of default browser button */
342
- type: Exclude<BrowserButtonType, BrowserButtonType.ShowHideTabs | BrowserButtonType.LockUnlockPage | BrowserButtonType.Custom>;
342
+ type: BrowserButtonType;
343
343
  /** Button name text when hovered over */
344
344
  tooltip?: string;
345
345
  /** icon URL for icon image */
@@ -361,30 +361,6 @@ export interface PreDefinedButtonConfig {
361
361
  export type ShowHideTabsConfig = {
362
362
  type: BrowserButtonType.ShowHideTabs;
363
363
  disabled?: boolean;
364
- tabsShownIconUrl?: {
365
- /**
366
- * The URL of the icon to display when the button is disabled and tabs are hidden.
367
- *
368
- * The button is disabled when the page is locked.
369
- */
370
- disabled?: string;
371
- /**
372
- * The URL of the icon to display when the button is enabled and tabs are hidden.
373
- */
374
- enabled?: string;
375
- };
376
- tabsHiddenIconUrl?: {
377
- /**
378
- * The URL of the icon to display when the button is disabled and tabs are hidden.
379
- *
380
- * The button is disabled when the page is locked.
381
- */
382
- disabled?: string;
383
- /**
384
- * The URL of the icon to display when the button is enabled and tabs are hidden.
385
- */
386
- enabled?: string;
387
- };
388
364
  };
389
365
  /**
390
366
  * Configuration Object for the page lock/unlock button within the browser toolbar
@@ -400,8 +376,6 @@ export type ShowHideTabsConfig = {
400
376
  export type LockUnlockPageConfig = {
401
377
  type: BrowserButtonType.LockUnlockPage;
402
378
  disabled?: boolean;
403
- lockedIconUrl?: string;
404
- unlockedIconUrl?: string;
405
379
  };
406
380
  /**
407
381
  * Buttons on the left of WindowStateButtonOptions
@@ -1,4 +1,3 @@
1
- import type { DefaultTheme } from 'styled-components';
2
1
  import type OpenFin from '@openfin/core';
3
2
  import type { ThemePaletteSet } from '@openfin/ui-library';
4
3
  import { ColorSchemeOptionType } from '../../../client-api-platform/src/shapes';
@@ -6,65 +5,20 @@ export type WorkspaceComponentSetSelectedSchemePayload = {
6
5
  newScheme: ColorSchemeOptionType;
7
6
  identity: OpenFin.Identity;
8
7
  };
8
+ export type BrowserSetSelectedSchemePayload = string;
9
9
  export type ComputedThemes = ComputedTheme[];
10
10
  export interface ComputedTheme {
11
11
  label: string;
12
12
  logoUrl?: string;
13
- theme: WorkspaceThemePaletteSet;
13
+ theme: ThemePaletteSet;
14
14
  defaultScheme?: ColorSchemeOptionType;
15
15
  }
16
- export interface WorkspaceThemePaletteSet extends ThemePaletteSet {
17
- light: ThemeExtension;
18
- dark: ThemeExtension;
19
- }
20
- export interface ThemeExtension extends DefaultTheme {
21
- notificationIndicatorColors?: Record<string, Omit<NotificationIndicatorColorsSet, 'foreground'> & {
22
- foreground: string;
23
- }>;
24
- }
25
- export interface NotificationIndicatorColorsSet {
26
- background: string;
27
- foreground?: string;
28
- }
29
- export interface NotificationIndicatorColorsSetDarkScheme {
30
- dark: NotificationIndicatorColorsSet;
31
- light?: NotificationIndicatorColorsSet;
32
- }
33
- export interface NotificationIndicatorColorsSetLightScheme {
34
- dark?: NotificationIndicatorColorsSet;
35
- light: NotificationIndicatorColorsSet;
36
- }
37
- export type NotificationIndicatorColorsWithScheme = Record<string, NotificationIndicatorColorsSetDarkScheme | NotificationIndicatorColorsSetLightScheme>;
38
- export interface BaseThemeOptions {
16
+ interface BaseThemeOptions {
39
17
  label: string;
40
18
  logoUrl?: string;
41
19
  }
42
20
  export interface CustomThemeOptions extends BaseThemeOptions {
43
21
  palette: CustomPaletteSet;
44
- /**
45
- * NOTE: Only used in Notifications
46
- *
47
- * Used for providing color overrides of notification indicators or defining custom colors that clients could target.
48
- *
49
- * @example
50
- * ```ts
51
- * const themeOptions = {
52
- * default: 'light',
53
- * palettes: {...}
54
- * notificationIndicatorColors: {
55
- * red: {
56
- * background: '#FF0000',
57
- * foreground: '#FFFFDD'
58
- * },
59
- * customred: {
60
- * // If `foreground` is not defined it will default to `#FFFFFF`
61
- * background: '#FF0011'
62
- * }
63
- * }
64
- * };
65
- * ```
66
- */
67
- notificationIndicatorColors?: Record<string, NotificationIndicatorColorsSet>;
68
22
  }
69
23
  export interface CustomThemeOptionsWithScheme extends BaseThemeOptions {
70
24
  /**
@@ -86,39 +40,6 @@ export interface CustomThemeOptionsWithScheme extends BaseThemeOptions {
86
40
  light: CustomPaletteSet;
87
41
  dark: CustomPaletteSet;
88
42
  };
89
- /**
90
- * NOTE: Only used in Notifications
91
- *
92
- * Used for providing color overrides of notification indicators or defining custom colors that clients could target.
93
- *
94
- * @example
95
- * ```ts
96
- * const themeOptions = {
97
- * default: 'light',
98
- * palettes: {...}
99
- * notificationIndicatorColors: {
100
- * red: {
101
- * dark: {
102
- * background: '#FF0000',
103
- * foreground: '#FFFFDD'
104
- * },
105
- * light: {
106
- * // If `foreground` is not defined it will default to `#FFFFFF`
107
- * background: '#FF1100',
108
- * }
109
- * },
110
- * customred: {
111
- * // If one of the schemes is not defined (in this case `light`) the values from the defined one will be copied to the other
112
- * dark: {
113
- * background: '#FF0011',
114
- * foreground: '#FFDDDD'
115
- * }
116
- * }
117
- * }
118
- * };
119
- * ```
120
- */
121
- notificationIndicatorColors?: NotificationIndicatorColorsWithScheme;
122
43
  }
123
44
  export type CustomThemes = (CustomThemeOptions | CustomThemeOptionsWithScheme)[];
124
45
  export interface DefaultPaletteSet {
@@ -176,69 +97,16 @@ export interface CustomPaletteSet extends DefaultPaletteSet {
176
97
  linkDefault?: string;
177
98
  linkHover?: string;
178
99
  }
179
- export declare const OpenFinLightTheme: {
180
- background1: "#FFFFFF";
181
- background2: "#FAFBFE";
182
- background3: "#F3F5F8";
183
- background4: "#ECEEF1";
184
- background5: "#DDDFE4";
185
- background6: "#C9CBD2";
186
- brandSecondary: "#1E1F23";
187
- inputBackground: "#ECEEF1";
188
- inputColor: "#1E1F23";
189
- inputPlaceholder: "#383A40";
190
- inputDisabled: "#7D808A";
191
- inputFocused: "#C9CBD2";
192
- inputBorder: "#7D808A";
193
- textDefault: "#1E1F23";
194
- textHelp: "#2F3136";
195
- textInactive: "#7D808A";
196
- brandPrimary: string;
197
- statusSuccess: "#207735";
198
- statusWarning: "#F48F00";
199
- statusCritical: "#F31818";
200
- statusActive: "#0A76D3";
201
- contentBackground1: string;
202
- contentBackground2: string;
203
- contentBackground3: string;
204
- contentBackground4: string;
205
- contentBackground5: string;
206
- };
207
- export declare const OpenFinDarkTheme: {
208
- background1: "#111214";
209
- background2: "#1E1F23";
210
- background3: "#24262B";
211
- background4: "#2F3136";
212
- background5: "#383A40";
213
- background6: "#53565F";
214
- brandSecondary: "#383A40";
215
- inputBackground: "#53565F";
216
- inputColor: "#FFFFFF";
217
- inputPlaceholder: "#C9CBD2";
218
- inputDisabled: "#7D808A";
219
- inputFocused: "#C9CBD2";
220
- inputBorder: "#7D808A";
221
- textDefault: "#FFFFFF";
222
- textHelp: "#C9CBD2";
223
- textInactive: "#7D808A";
224
- brandPrimary: string;
225
- statusSuccess: "#207735";
226
- statusWarning: "#F48F00";
227
- statusCritical: "#F31818";
228
- statusActive: "#0A76D3";
229
- contentBackground1: string;
230
- contentBackground2: string;
231
- contentBackground3: string;
232
- contentBackground4: string;
233
- contentBackground5: string;
234
- };
235
100
  /**
236
- * Transforms input {@link CustomThemes} to {@link ComputedThemes} used by Workspace Platform / Notifications Platform.
237
- *
238
- * @param customThemes array of themes to transform
239
- * @param storedScheme sets the default scheme if provided
240
- * @returns array of {@link ComputedThemes | computed themes}
101
+ * computeThemes()
102
+ * Accepts the array of registered CustomThemes objects
103
+ * Creates a light and dark palette from a tempalte overriding with custom options
104
+ * Uses createTheme to build theme object
105
+ * Creates a ThemePaletteSet
106
+ * @param customPalettes
107
+ * @returns theme object ready to be applied to the UI
241
108
  */
242
- export declare const computeThemes: (customThemes: CustomThemes, storedScheme?: ColorSchemeOptionType) => ComputedThemes;
109
+ export declare const computeThemes: (customPalettes: CustomThemes, storedScheme?: ColorSchemeOptionType) => ComputedThemes;
243
110
  export declare const getComputedPlatformTheme: (platformIdentity: OpenFin.Identity) => Promise<ComputedTheme>;
244
111
  export declare const setSelectedScheme: (ctx: ColorSchemeOptionType) => Promise<void>;
112
+ export {};
@@ -1,16 +1,13 @@
1
- export declare const workspacePerformancePrefix = "of-workspace-";
2
- type WorkspacePerformanceMarks = 'home-registration' | 'dock-registration' | 'store-registration' | 'home-show' | 'dock-show' | 'store-show' | 'workspace-app-started' | 'home-window-initialized' | 'dock-window-initialized' | 'store-window-initialized';
1
+ type WorkspacePerformanceMarks = 'home-registration' | 'dock-registration' | 'store-registration';
3
2
  /**
4
3
  * @classdesc
5
4
  * WorkspacePerformance is a class that provides a set of methods to measure performance of workspace
6
5
  *
7
6
  */
8
7
  declare class WorkspacePerformance {
9
- mark(markName: WorkspacePerformanceMarks): void;
10
8
  markStart(markName: WorkspacePerformanceMarks): void;
11
9
  markEnd(markName: WorkspacePerformanceMarks): void;
12
- markEndAndMeasure(markName: WorkspacePerformanceMarks): PerformanceMeasure;
13
- markAndMeasure(markName: WorkspacePerformanceMarks, measureAgainst: WorkspacePerformanceMarks): PerformanceMeasure;
10
+ markEndAndMeasure(markName: WorkspacePerformanceMarks): void;
14
11
  reportWorkspacePerformanceEntries(): PerformanceEntry[];
15
12
  reportWorkspacePerformance(): {
16
13
  name: string;