@finsemble/finsemble-ui 7.2.0 → 7.3.0
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/package.json +14 -14
- package/react/assets/css/button.css +34 -6
- package/react/assets/css/contextMenu.css +118 -0
- package/react/assets/css/notificationsCenter.css +3 -214
- package/react/assets/css/userPreferences.css +2 -2
- package/react/components/common/Checkbox.d.ts +3 -2
- package/react/components/common/Checkbox.js +5 -21
- package/react/components/common/Checkbox.js.map +1 -1
- package/react/components/common/ContextMenu.d.ts +13 -0
- package/react/components/common/ContextMenu.js +69 -0
- package/react/components/common/ContextMenu.js.map +1 -0
- package/react/components/common/DropdownButton.d.ts +0 -4
- package/react/components/common/DropdownButton.js +39 -10
- package/react/components/common/DropdownButton.js.map +1 -1
- package/react/components/common/css/FinsembleToggle.css +0 -1
- package/react/components/common/css/application-edit-page.css +3 -4
- package/react/components/common/css/checkbox.css +60 -21
- package/react/components/common/css/icon.css +2 -2
- package/react/components/common/css/toggle.css +4 -1
- package/react/components/common/helpers.js +9 -0
- package/react/components/common/helpers.js.map +1 -1
- package/react/components/common/stories/ContextMenu.stories.d.ts +38 -0
- package/react/components/common/stories/ContextMenu.stories.js +70 -0
- package/react/components/common/stories/ContextMenu.stories.js.map +1 -0
- package/react/components/common/stories/DropdownButton.stories.d.ts +3 -3
- package/react/components/common/stories/DropdownButton.stories.js +11 -10
- package/react/components/common/stories/DropdownButton.stories.js.map +1 -1
- package/react/components/common/tests/Checkbox.spec.js +10 -12
- package/react/components/common/tests/Checkbox.spec.js.map +1 -1
- package/react/components/common/tests/ContextMenu.spec.d.ts +1 -0
- package/react/components/common/tests/ContextMenu.spec.js +108 -0
- package/react/components/common/tests/ContextMenu.spec.js.map +1 -0
- package/react/components/common/tests/DropdownButton.spec.d.ts +1 -0
- package/react/components/common/tests/DropdownButton.spec.js +32 -0
- package/react/components/common/tests/DropdownButton.spec.js.map +1 -0
- package/react/components/fdc3Resolver/ResolverDialog.js +5 -1
- package/react/components/fdc3Resolver/ResolverDialog.js.map +1 -1
- package/react/components/notifications/components/drawer/DrawerHeader.js +3 -3
- package/react/components/notifications/components/drawer/DrawerHeader.js.map +1 -1
- package/react/components/notifications/components/notificationsCenter/NotificationsCenter.js +1 -0
- package/react/components/notifications/components/notificationsCenter/NotificationsCenter.js.map +1 -1
- package/react/components/notifications/components/notificationsToasts/NotificationsToasts.js +2 -0
- package/react/components/notifications/components/notificationsToasts/NotificationsToasts.js.map +1 -1
- package/react/components/notifications/components/shared/IconButton.js +2 -1
- package/react/components/notifications/components/shared/IconButton.js.map +1 -1
- package/react/components/notifications/components/shared/NotificationCardShell.d.ts +2 -0
- package/react/components/notifications/components/shared/NotificationCardShell.js +55 -49
- package/react/components/notifications/components/shared/NotificationCardShell.js.map +1 -1
- package/react/components/notifications/components/shared/notificationCard/NotificationCardBodyShell.js +2 -3
- package/react/components/notifications/components/shared/notificationCard/NotificationCardBodyShell.js.map +1 -1
- package/react/components/notifications/components/shared/notificationCard/NotificationCardHeaderControls.d.ts +4 -0
- package/react/components/notifications/components/shared/notificationCard/NotificationCardHeaderControls.js +92 -13
- package/react/components/notifications/components/shared/notificationCard/NotificationCardHeaderControls.js.map +1 -1
- package/react/components/notifications/components/views/ListView.js +5 -9
- package/react/components/notifications/components/views/ListView.js.map +1 -1
- package/react/components/notifications/css/notification-card.css +165 -0
- package/react/components/notifications/stories/NotificationCardShell.stories.d.ts +14 -0
- package/react/components/notifications/stories/NotificationCardShell.stories.js +108 -0
- package/react/components/notifications/stories/NotificationCardShell.stories.js.map +1 -0
- package/react/components/notifications/tests/NotificationCardShell.spec.d.ts +1 -0
- package/react/components/notifications/tests/NotificationCardShell.spec.js +91 -0
- package/react/components/notifications/tests/NotificationCardShell.spec.js.map +1 -0
- package/react/components/notifications/types.d.ts +4 -2
- package/react/components/notifications/types.js.map +1 -1
- package/react/components/sdd/AddApp.d.ts +3 -3
- package/react/components/sdd/AddApp.js +29 -21
- package/react/components/sdd/AddApp.js.map +1 -1
- package/react/components/sdd/AppEditPage.js +1 -8
- package/react/components/sdd/AppEditPage.js.map +1 -1
- package/react/components/sdd/Appearance.css +2 -1
- package/react/components/sdd/Applications.js +7 -7
- package/react/components/sdd/Applications.js.map +1 -1
- package/react/components/sdd/Navigation.js +2 -4
- package/react/components/sdd/Navigation.js.map +1 -1
- package/react/components/sdd/common/views.js +1 -14
- package/react/components/sdd/common/views.js.map +1 -1
- package/react/components/sdd/css/addApp.css +64 -1
- package/react/components/sdd/css/nav.css +50 -29
- package/react/components/sdd/fixtures/views.js +1 -14
- package/react/components/sdd/fixtures/views.js.map +1 -1
- package/react/components/sdd/tests/AddApp.spec.js +2 -2
- package/react/components/sdd/tests/AddApp.spec.js.map +1 -1
- package/react/components/sdd/tests/AppEditPage.spec.js +5 -8
- package/react/components/sdd/tests/AppEditPage.spec.js.map +1 -1
- package/react/components/sdd/tests/Export.spec.js +11 -11
- package/react/components/sdd/tests/Export.spec.js.map +1 -1
- package/react/components/sdd/tests/ExportZip.spec.js +3 -3
- package/react/components/sdd/tests/ExportZip.spec.js.map +1 -1
- package/react/components/sdd/tests/Navigation.spec.js +3 -2
- package/react/components/sdd/tests/Navigation.spec.js.map +1 -1
- package/react/components/sdd/tests/SmartDesktopDesigner.spec.js +1 -2
- package/react/components/sdd/tests/SmartDesktopDesigner.spec.js.map +1 -1
- package/react/components/toolbar/dashbar/Dashbar.js +18 -14
- package/react/components/toolbar/dashbar/Dashbar.js.map +1 -1
- package/react/components/toolbar/workspaceManagementMenu/components/Workspace.d.ts +9 -1
- package/react/components/toolbar/workspaceManagementMenu/components/Workspace.js +35 -1
- package/react/components/toolbar/workspaceManagementMenu/components/Workspace.js.map +1 -1
- package/react/components/toolbar/workspaceManagementMenu/stores/workspaceManagementMenuStore.js +1 -1
- package/react/components/toolbar/workspaceManagementMenu/stores/workspaceManagementMenuStore.js.map +1 -1
- package/react/components/userPreferences/components/content/Workspaces.d.ts +3 -1
- package/react/components/userPreferences/components/content/Workspaces.js +20 -3
- package/react/components/userPreferences/components/content/Workspaces.js.map +1 -1
- package/react/components/userPreferences/components/workspaces/WorkspaceItem.d.ts +1 -0
- package/react/components/userPreferences/components/workspaces/WorkspaceItem.js +3 -2
- package/react/components/userPreferences/components/workspaces/WorkspaceItem.js.map +1 -1
- package/react/components/userPreferences/tests/NotificationsPreferencesHome.spec.js +12 -9
- package/react/components/userPreferences/tests/NotificationsPreferencesHome.spec.js.map +1 -1
- package/react/components/userPreferences/tests/UserPreferencesBase.spec.js +2 -0
- package/react/components/userPreferences/tests/UserPreferencesBase.spec.js.map +1 -1
- package/react/components/windowTitleBar/WindowTitleBarShell.d.ts +99 -26
- package/react/components/windowTitleBar/WindowTitleBarShell.js +206 -138
- package/react/components/windowTitleBar/WindowTitleBarShell.js.map +1 -1
- package/react/components/windowTitleBar/components/left/LinkerButton.js +30 -21
- package/react/components/windowTitleBar/components/left/LinkerButton.js.map +1 -1
- package/react/hooks/useNotifications.js +8 -7
- package/react/hooks/useNotifications.js.map +1 -1
- package/react/tsconfig.tsbuildinfo +1 -1
- package/react/components/notifications/components/shared/OverflowMenu.d.ts +0 -16
- package/react/components/notifications/components/shared/OverflowMenu.js +0 -114
- package/react/components/notifications/components/shared/OverflowMenu.js.map +0 -1
- package/react/components/sdd/GettingStarted.d.ts +0 -8
- package/react/components/sdd/GettingStarted.js +0 -25
- package/react/components/sdd/GettingStarted.js.map +0 -1
- package/react/components/sdd/stories/GettingStarted.stories.d.ts +0 -11
- package/react/components/sdd/stories/GettingStarted.stories.js +0 -18
- package/react/components/sdd/stories/GettingStarted.stories.js.map +0 -1
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import React, { Dispatch, SetStateAction } from "react";
|
|
2
|
-
import { OverFlowMenuAction } from "../../types";
|
|
3
|
-
import { services } from "@finsemble/finsemble-api";
|
|
4
|
-
declare type INotification = services.notification.types.INotification;
|
|
5
|
-
export declare const OverflowMenuActions: {
|
|
6
|
-
[key: string]: OverFlowMenuAction;
|
|
7
|
-
};
|
|
8
|
-
export declare const renderOverflowMenuAction: (notification: INotification, menuAction: OverFlowMenuAction, isMuted: boolean) => JSX.Element | null;
|
|
9
|
-
/**
|
|
10
|
-
* Overflow menu component for notifications that will provide a set of actions
|
|
11
|
-
* a user can perform on a notification (e.g. dismiss, snooze)
|
|
12
|
-
*/
|
|
13
|
-
declare const OverflowMenu: React.FunctionComponent<{
|
|
14
|
-
closeSelf: Dispatch<SetStateAction<boolean>>;
|
|
15
|
-
}>;
|
|
16
|
-
export default OverflowMenu;
|
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
import React, { useEffect, useRef, useState } from "react";
|
|
2
|
-
// Hooks
|
|
3
|
-
import { useOutsideClickDetector } from "../../../../hooks/useOutsideClickDetector";
|
|
4
|
-
import { markNotificationsRead, markNotificationsUnread, snoozeNotifications, } from "../../../../hooks/useNotifications";
|
|
5
|
-
// Icons
|
|
6
|
-
import EnvelopeCloseIcon from "../../icons/EnvelopeClose";
|
|
7
|
-
import EnvelopeOpenIcon from "../../icons/EnvelopeOpen";
|
|
8
|
-
import SnoozeIcon from "../../icons/SnoozeIcon";
|
|
9
|
-
export const OverflowMenuActions = {
|
|
10
|
-
MARK_AS_UNREAD: {
|
|
11
|
-
name: "MARK_AS_UNREAD",
|
|
12
|
-
icon: React.createElement(EnvelopeCloseIcon, null),
|
|
13
|
-
label: "Mark Unread",
|
|
14
|
-
action: (notification) => markNotificationsUnread([notification]),
|
|
15
|
-
},
|
|
16
|
-
MARK_AS_READ: {
|
|
17
|
-
name: "MARK_AS_READ",
|
|
18
|
-
icon: React.createElement(EnvelopeOpenIcon, null),
|
|
19
|
-
label: "Mark Read",
|
|
20
|
-
action: (notification) => markNotificationsRead([notification]),
|
|
21
|
-
},
|
|
22
|
-
SNOOZE: {
|
|
23
|
-
name: "SNOOZE",
|
|
24
|
-
icon: React.createElement(SnoozeIcon, null),
|
|
25
|
-
label: "Snooze",
|
|
26
|
-
action: (notification) => snoozeNotifications([notification]),
|
|
27
|
-
},
|
|
28
|
-
DISMISS: {
|
|
29
|
-
name: "DISMISS",
|
|
30
|
-
icon: (React.createElement("div", { className: "finsemble-icon" },
|
|
31
|
-
React.createElement("i", { className: "ff-close" }))),
|
|
32
|
-
label: "Dismiss",
|
|
33
|
-
action: () => {
|
|
34
|
-
// Empty - filled in later
|
|
35
|
-
},
|
|
36
|
-
},
|
|
37
|
-
SETTINGS: {
|
|
38
|
-
name: "SETTINGS",
|
|
39
|
-
icon: (React.createElement("div", { className: "finsemble-icon" },
|
|
40
|
-
React.createElement("i", { className: "ff-settings" }))),
|
|
41
|
-
label: "Settings",
|
|
42
|
-
action: (notification) => {
|
|
43
|
-
FSBL.Clients.LauncherClient.showWindow({
|
|
44
|
-
componentType: "UserPreferences",
|
|
45
|
-
}, {
|
|
46
|
-
monitor: "mine",
|
|
47
|
-
left: "center",
|
|
48
|
-
top: "center",
|
|
49
|
-
}, () => {
|
|
50
|
-
FSBL.Clients.RouterClient.transmit("FinsembleUserPreferencesChannel", {
|
|
51
|
-
preferencesTab: "Notifications",
|
|
52
|
-
notification,
|
|
53
|
-
});
|
|
54
|
-
// we need this timeout otherwise the UserPreferences screen does not detect the message being transmited
|
|
55
|
-
setTimeout(() => {
|
|
56
|
-
FSBL.Clients.RouterClient.transmit("FinsembleNotificationsNavigationChannel", { notification });
|
|
57
|
-
}, 50);
|
|
58
|
-
});
|
|
59
|
-
},
|
|
60
|
-
},
|
|
61
|
-
DETAILS: {
|
|
62
|
-
name: "DETAILS",
|
|
63
|
-
icon: (React.createElement("div", { className: "finsemble-icon" },
|
|
64
|
-
React.createElement("i", { className: "ff-dots-horz" }))),
|
|
65
|
-
label: "Details",
|
|
66
|
-
action: () => {
|
|
67
|
-
// Empty - filled in later
|
|
68
|
-
},
|
|
69
|
-
},
|
|
70
|
-
};
|
|
71
|
-
export const renderOverflowMenuAction = (notification, menuAction,
|
|
72
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
73
|
-
isMuted) => {
|
|
74
|
-
if (
|
|
75
|
-
// Don't display read if notification is read
|
|
76
|
-
(notification.isRead && menuAction.name === OverflowMenuActions.MARK_AS_READ.name) ||
|
|
77
|
-
// Don't display unread if notification is unread
|
|
78
|
-
(!notification.isRead && menuAction.name === OverflowMenuActions.MARK_AS_UNREAD.name)) {
|
|
79
|
-
return null;
|
|
80
|
-
}
|
|
81
|
-
return (React.createElement("div", { key: `${notification.id}_${menuAction.name}`, className: "overflow-menu__action", tabIndex: 0, onClick: () => {
|
|
82
|
-
menuAction === null || menuAction === void 0 ? void 0 : menuAction.action(notification);
|
|
83
|
-
}, onKeyDown: (e) => {
|
|
84
|
-
if (e.key === "Enter") {
|
|
85
|
-
menuAction === null || menuAction === void 0 ? void 0 : menuAction.action(notification);
|
|
86
|
-
}
|
|
87
|
-
} }, menuAction === null || menuAction === void 0 ? void 0 :
|
|
88
|
-
menuAction.icon,
|
|
89
|
-
React.createElement("span", { className: "btn-label" }, menuAction === null || menuAction === void 0 ? void 0 : menuAction.label)));
|
|
90
|
-
};
|
|
91
|
-
/**
|
|
92
|
-
* Overflow menu component for notifications that will provide a set of actions
|
|
93
|
-
* a user can perform on a notification (e.g. dismiss, snooze)
|
|
94
|
-
*/
|
|
95
|
-
const OverflowMenu = ({ closeSelf, children }) => {
|
|
96
|
-
const wrapperRef = useRef(null);
|
|
97
|
-
const [className, setClassName] = useState("overflow-menu__container");
|
|
98
|
-
useOutsideClickDetector(wrapperRef, () => closeSelf(false));
|
|
99
|
-
const moveElementIntoView = () => {
|
|
100
|
-
var _a;
|
|
101
|
-
const bottomViewPort = window.innerHeight + window.scrollY;
|
|
102
|
-
const domRect = (_a = wrapperRef === null || wrapperRef === void 0 ? void 0 : wrapperRef.current) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect();
|
|
103
|
-
const elementBottom = domRect ? domRect.y + domRect.height + window.scrollY : null;
|
|
104
|
-
if (elementBottom && elementBottom > bottomViewPort) {
|
|
105
|
-
setClassName("overflow-menu__container flow-up");
|
|
106
|
-
}
|
|
107
|
-
};
|
|
108
|
-
useEffect(() => {
|
|
109
|
-
moveElementIntoView();
|
|
110
|
-
});
|
|
111
|
-
return (React.createElement("div", { ref: wrapperRef, className: className }, children));
|
|
112
|
-
};
|
|
113
|
-
export default OverflowMenu;
|
|
114
|
-
//# sourceMappingURL=OverflowMenu.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"OverflowMenu.js","sourceRoot":"","sources":["../../../../../src/components/notifications/components/shared/OverflowMenu.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAA4B,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAErF,QAAQ;AACR,OAAO,EAAE,uBAAuB,EAAE,MAAM,2CAA2C,CAAC;AACpF,OAAO,EACN,qBAAqB,EACrB,uBAAuB,EACvB,mBAAmB,GACnB,MAAM,oCAAoC,CAAC;AAK5C,QAAQ;AACR,OAAO,iBAAiB,MAAM,2BAA2B,CAAC;AAC1D,OAAO,gBAAgB,MAAM,0BAA0B,CAAC;AACxD,OAAO,UAAU,MAAM,wBAAwB,CAAC;AAKhD,MAAM,CAAC,MAAM,mBAAmB,GAA0C;IACzE,cAAc,EAAE;QACf,IAAI,EAAE,gBAAgB;QACtB,IAAI,EAAE,oBAAC,iBAAiB,OAAG;QAC3B,KAAK,EAAE,aAAa;QACpB,MAAM,EAAE,CAAC,YAA2B,EAAE,EAAE,CAAC,uBAAuB,CAAC,CAAC,YAAY,CAAC,CAAC;KAChF;IACD,YAAY,EAAE;QACb,IAAI,EAAE,cAAc;QACpB,IAAI,EAAE,oBAAC,gBAAgB,OAAG;QAC1B,KAAK,EAAE,WAAW;QAClB,MAAM,EAAE,CAAC,YAA2B,EAAE,EAAE,CAAC,qBAAqB,CAAC,CAAC,YAAY,CAAC,CAAC;KAC9E;IACD,MAAM,EAAE;QACP,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,oBA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AChD,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,CAAC,0BAA0B,CAAC,CAAC;IAEvE,uBAAuB,CAAC,UAAU,EAAE,GAAG,EAAE,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC;IAE5D,MAAM,mBAAmB,GAAG,GAAG,EAAE;;QAChC,MAAM,cAAc,GAAG,MAAM,CAAC,WAAW,GAAG,MAAM,CAAC,OAAO,CAAC;QAC3D,MAAM,OAAO,GAAG,MAAA,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,OAAO,0CAAE,qBAAqB,EAAE,CAAC;QAC7D,MAAM,aAAa,GAAG,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,OAAO,CAAC,MAAM,GAAG,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC;QAEnF,IAAI,aAAa,IAAI,aAAa,GAAG,cAAc,EAAE;YACpD,YAAY,CAAC,kCAAkC,CAAC,CAAC;SACjD;IACF,CAAC,CAAC;IAEF,SAAS,CAAC,GAAG,EAAE;QACd,mBAAmB,EAAE,CAAC;IACvB,CAAC,CAAC,CAAC;IAEH,OAAO,CACN,6BAAK,GAAG,EAAE,UAAU,EAAE,SAAS,EAAE,SAAS,IACxC,QAAQ,CACJ,CACN,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,YAAY,CAAC","sourcesContent":["import React, { Dispatch, SetStateAction, useEffect, useRef, useState } from \"react\";\n\n// Hooks\nimport { useOutsideClickDetector } from \"../../../../hooks/useOutsideClickDetector\";\nimport {\n\tmarkNotificationsRead,\n\tmarkNotificationsUnread,\n\tsnoozeNotifications,\n} from \"../../../../hooks/useNotifications\";\n\n// Types\nimport { OverFlowMenuAction } from \"../../types\";\n\n// Icons\nimport EnvelopeCloseIcon from \"../../icons/EnvelopeClose\";\nimport EnvelopeOpenIcon from \"../../icons/EnvelopeOpen\";\nimport SnoozeIcon from \"../../icons/SnoozeIcon\";\nimport { services } from \"@finsemble/finsemble-api\";\n\ntype INotification = services.notification.types.INotification;\n\nexport const OverflowMenuActions: { [key: string]: OverFlowMenuAction } = {\n\tMARK_AS_UNREAD: {\n\t\tname: \"MARK_AS_UNREAD\",\n\t\ticon: <EnvelopeCloseIcon />,\n\t\tlabel: \"Mark Unread\",\n\t\taction: (notification: INotification) => markNotificationsUnread([notification]),\n\t},\n\tMARK_AS_READ: {\n\t\tname: \"MARK_AS_READ\",\n\t\ticon: <EnvelopeOpenIcon />,\n\t\tlabel: \"Mark Read\",\n\t\taction: (notification: INotification) => markNotificationsRead([notification]),\n\t},\n\tSNOOZE: {\n\t\tname: \"SNOOZE\",\n\t\ticon: <SnoozeIcon />,\n\t\tlabel: \"Snooze\",\n\t\taction: (notification: INotification) => snoozeNotifications([notification]),\n\t},\n\tDISMISS: {\n\t\tname: \"DISMISS\",\n\t\ticon: (\n\t\t\t<div className=\"finsemble-icon\">\n\t\t\t\t<i className=\"ff-close\" />\n\t\t\t</div>\n\t\t),\n\t\tlabel: \"Dismiss\",\n\t\taction: () => {\n\t\t\t// Empty - filled in later\n\t\t},\n\t},\n\tSETTINGS: {\n\t\tname: \"SETTINGS\",\n\t\ticon: (\n\t\t\t<div className=\"finsemble-icon\">\n\t\t\t\t<i className=\"ff-settings\" />\n\t\t\t</div>\n\t\t),\n\t\tlabel: \"Settings\",\n\t\taction: (notification: INotification) => {\n\t\t\tFSBL.Clients.LauncherClient.showWindow(\n\t\t\t\t{\n\t\t\t\t\tcomponentType: \"UserPreferences\",\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tmonitor: \"mine\",\n\t\t\t\t\tleft: \"center\",\n\t\t\t\t\ttop: \"center\",\n\t\t\t\t},\n\t\t\t\t() => {\n\t\t\t\t\tFSBL.Clients.RouterClient.transmit(\"FinsembleUserPreferencesChannel\", {\n\t\t\t\t\t\tpreferencesTab: \"Notifications\",\n\t\t\t\t\t\tnotification,\n\t\t\t\t\t});\n\t\t\t\t\t// we need this timeout otherwise the UserPreferences screen does not detect the message being transmited\n\t\t\t\t\tsetTimeout(() => {\n\t\t\t\t\t\tFSBL.Clients.RouterClient.transmit(\"FinsembleNotificationsNavigationChannel\", { notification });\n\t\t\t\t\t}, 50);\n\t\t\t\t}\n\t\t\t);\n\t\t},\n\t},\n\tDETAILS: {\n\t\tname: \"DETAILS\",\n\t\ticon: (\n\t\t\t<div className=\"finsemble-icon\">\n\t\t\t\t<i className=\"ff-dots-horz\" />\n\t\t\t</div>\n\t\t),\n\t\tlabel: \"Details\",\n\t\taction: () => {\n\t\t\t// Empty - filled in later\n\t\t},\n\t},\n};\n\nexport const renderOverflowMenuAction = (\n\tnotification: INotification,\n\tmenuAction: OverFlowMenuAction,\n\t// eslint-disable-next-line @typescript-eslint/no-unused-vars\n\tisMuted: boolean\n) => {\n\tif (\n\t\t// Don't display read if notification is read\n\t\t(notification.isRead && menuAction.name === OverflowMenuActions.MARK_AS_READ.name) ||\n\t\t// Don't display unread if notification is unread\n\t\t(!notification.isRead && menuAction.name === OverflowMenuActions.MARK_AS_UNREAD.name)\n\t) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<div\n\t\t\tkey={`${notification.id}_${menuAction.name}`}\n\t\t\tclassName=\"overflow-menu__action\"\n\t\t\ttabIndex={0}\n\t\t\tonClick={() => {\n\t\t\t\tmenuAction?.action(notification);\n\t\t\t}}\n\t\t\tonKeyDown={(e) => {\n\t\t\t\tif (e.key === \"Enter\") {\n\t\t\t\t\tmenuAction?.action(notification);\n\t\t\t\t}\n\t\t\t}}\n\t\t>\n\t\t\t{menuAction?.icon}\n\t\t\t<span className=\"btn-label\">{menuAction?.label}</span>\n\t\t</div>\n\t);\n};\n\n/**\n * Overflow menu component for notifications that will provide a set of actions\n * a user can perform on a notification (e.g. dismiss, snooze)\n */\nconst OverflowMenu: React.FunctionComponent<{\n\tcloseSelf: Dispatch<SetStateAction<boolean>>;\n}> = ({ closeSelf, children }) => {\n\tconst wrapperRef = useRef<HTMLDivElement>(null);\n\tconst [className, setClassName] = useState(\"overflow-menu__container\");\n\n\tuseOutsideClickDetector(wrapperRef, () => closeSelf(false));\n\n\tconst moveElementIntoView = () => {\n\t\tconst bottomViewPort = window.innerHeight + window.scrollY;\n\t\tconst domRect = wrapperRef?.current?.getBoundingClientRect();\n\t\tconst elementBottom = domRect ? domRect.y + domRect.height + window.scrollY : null;\n\n\t\tif (elementBottom && elementBottom > bottomViewPort) {\n\t\t\tsetClassName(\"overflow-menu__container flow-up\");\n\t\t}\n\t};\n\n\tuseEffect(() => {\n\t\tmoveElementIntoView();\n\t});\n\n\treturn (\n\t\t<div ref={wrapperRef} className={className}>\n\t\t\t{children}\n\t\t</div>\n\t);\n};\n\nexport default OverflowMenu;\n"]}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright 2017 - 2020 by ChartIQ, Inc.
|
|
3
|
-
* All rights reserved.
|
|
4
|
-
*/
|
|
5
|
-
import React from "react";
|
|
6
|
-
import { useDispatch } from "../../store";
|
|
7
|
-
import { Header } from "../common/Header";
|
|
8
|
-
import { View } from "./View";
|
|
9
|
-
import { Content } from "./Content";
|
|
10
|
-
import { launchTutorialLink } from "./common/fsbl_functions";
|
|
11
|
-
import "./css/getting-started.css";
|
|
12
|
-
export const GettingStarted = () => {
|
|
13
|
-
const dispatch = useDispatch();
|
|
14
|
-
return (React.createElement(React.Fragment, null,
|
|
15
|
-
React.createElement("div", { className: "getting-started-gray-back" }),
|
|
16
|
-
React.createElement(View, null,
|
|
17
|
-
React.createElement(Header, { helpFunction: () => {
|
|
18
|
-
launchTutorialLink("SDD-01-Welcome");
|
|
19
|
-
} }, "Smart Desktop Designer"),
|
|
20
|
-
React.createElement(Content, null,
|
|
21
|
-
React.createElement("p", null, "Design a smart desktop. Add, remove, and manage apps; arrange your workspaces. Customize the look to follow your branding. When you're done, publish your desktop to share with others or package it for further development."),
|
|
22
|
-
React.createElement("div", { className: "hero" },
|
|
23
|
-
React.createElement("img", { src: "/build/assets/img/finsemble-display.png", width: "436px", height: "354px", alt: "" }))))));
|
|
24
|
-
};
|
|
25
|
-
//# sourceMappingURL=GettingStarted.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"GettingStarted.js","sourceRoot":"","sources":["../../../src/components/sdd/GettingStarted.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAE1C,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAI7D,OAAO,2BAA2B,CAAC;AAInC,MAAM,CAAC,MAAM,cAAc,GAAG,GAAG,EAAE;IAClC,MAAM,QAAQ,GAAG,WAAW,EAAE,CAAC;IAE/B,OAAO,CACN;QACC,6BAAK,SAAS,EAAC,2BAA2B,GAAG;QAC7C,oBAAC,IAAI;YACJ,oBAAC,MAAM,IACN,YAAY,EAAE,GAAG,EAAE;oBAClB,kBAAkB,CAAC,gBAAgB,CAAC,CAAC;gBACtC,CAAC,6BAGO;YAET,oBAAC,OAAO;gBACP,+PAII;gBAEJ,6BAAK,SAAS,EAAC,MAAM;oBACpB,6BAAK,GAAG,EAAC,yCAAyC,EAAC,KAAK,EAAC,OAAO,EAAC,MAAM,EAAC,OAAO,EAAC,GAAG,EAAC,EAAE,GAAG,CACpF,CACG,CACJ,CACL,CACH,CAAC;AACH,CAAC,CAAC","sourcesContent":["/*!\n * Copyright 2017 - 2020 by ChartIQ, Inc.\n * All rights reserved.\n */\n\nimport React from \"react\";\nimport { useDispatch } from \"../../store\";\nimport { Header } from \"../common/Header\";\nimport { ButtonTile } from \"../common/ButtonTile\";\nimport { View } from \"./View\";\nimport { Content } from \"./Content\";\nimport { launchTutorialLink } from \"./common/fsbl_functions\";\n\nimport { SmartDesktopDesignerActions } from \"../../actions/smartDesktopDesignerActions\";\n\nimport \"./css/getting-started.css\";\n\nexport type GettingStartedProps = {};\n\nexport const GettingStarted = () => {\n\tconst dispatch = useDispatch();\n\n\treturn (\n\t\t<>\n\t\t\t<div className=\"getting-started-gray-back\" />\n\t\t\t<View>\n\t\t\t\t<Header\n\t\t\t\t\thelpFunction={() => {\n\t\t\t\t\t\tlaunchTutorialLink(\"SDD-01-Welcome\");\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\tSmart Desktop Designer\n\t\t\t\t</Header>\n\n\t\t\t\t<Content>\n\t\t\t\t\t<p>\n\t\t\t\t\t\tDesign a smart desktop. Add, remove, and manage apps; arrange your workspaces. Customize the look to follow\n\t\t\t\t\t\tyour branding. When you're done, publish your desktop to share with others or package it for further\n\t\t\t\t\t\tdevelopment.\n\t\t\t\t\t</p>\n\n\t\t\t\t\t<div className=\"hero\">\n\t\t\t\t\t\t<img src=\"/build/assets/img/finsemble-display.png\" width=\"436px\" height=\"354px\" alt=\"\" />\n\t\t\t\t\t</div>\n\t\t\t\t</Content>\n\t\t\t</View>\n\t\t</>\n\t);\n};\n"]}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { GettingStartedProps } from "../GettingStarted";
|
|
3
|
-
import "../../../assets/css/finsemble.css";
|
|
4
|
-
import "../../common/css/styles.css";
|
|
5
|
-
import { Story } from "@storybook/react/types-6-0";
|
|
6
|
-
declare const _default: {
|
|
7
|
-
title: string;
|
|
8
|
-
component: () => JSX.Element;
|
|
9
|
-
};
|
|
10
|
-
export default _default;
|
|
11
|
-
export declare const DefaultGettingStarted: Story<GettingStartedProps>;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { GettingStarted } from "../GettingStarted";
|
|
3
|
-
import "../../../assets/css/finsemble.css";
|
|
4
|
-
import "../../common/css/styles.css";
|
|
5
|
-
import { initFSBL } from "../../common/helpers";
|
|
6
|
-
import { FinsembleProvider } from "../../FinsembleProvider";
|
|
7
|
-
export default {
|
|
8
|
-
title: "Views/GettingStarted",
|
|
9
|
-
component: GettingStarted,
|
|
10
|
-
};
|
|
11
|
-
const Template = (args) => {
|
|
12
|
-
initFSBL(window);
|
|
13
|
-
return (React.createElement(FinsembleProvider, null,
|
|
14
|
-
React.createElement(GettingStarted, Object.assign({}, args))));
|
|
15
|
-
};
|
|
16
|
-
export const DefaultGettingStarted = Template.bind({});
|
|
17
|
-
DefaultGettingStarted.args = {};
|
|
18
|
-
//# sourceMappingURL=GettingStarted.stories.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"GettingStarted.stories.js","sourceRoot":"","sources":["../../../../src/components/sdd/stories/GettingStarted.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,cAAc,EAAuB,MAAM,mBAAmB,CAAC;AACxE,OAAO,mCAAmC,CAAC;AAC3C,OAAO,6BAA6B,CAAC;AAErC,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAE5D,eAAe;IACd,KAAK,EAAE,sBAAsB;IAC7B,SAAS,EAAE,cAAc;CACzB,CAAC;AAEF,MAAM,QAAQ,GAA+B,CAAC,IAAyB,EAAE,EAAE;IAC1E,QAAQ,CAAC,MAAM,CAAC,CAAC;IAEjB,OAAO,CACN,oBAAC,iBAAiB;QACjB,oBAAC,cAAc,oBAAK,IAAI,EAAI,CACT,CACpB,CAAC;AACH,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,qBAAqB,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACvD,qBAAqB,CAAC,IAAI,GAAG,EAAE,CAAC","sourcesContent":["import React from \"react\";\nimport { GettingStarted, GettingStartedProps } from \"../GettingStarted\";\nimport \"../../../assets/css/finsemble.css\";\nimport \"../../common/css/styles.css\";\nimport { Story } from \"@storybook/react/types-6-0\";\nimport { initFSBL } from \"../../common/helpers\";\nimport { FinsembleProvider } from \"../../FinsembleProvider\";\n\nexport default {\n\ttitle: \"Views/GettingStarted\",\n\tcomponent: GettingStarted,\n};\n\nconst Template: Story<GettingStartedProps> = (args: GettingStartedProps) => {\n\tinitFSBL(window);\n\n\treturn (\n\t\t<FinsembleProvider>\n\t\t\t<GettingStarted {...args} />\n\t\t</FinsembleProvider>\n\t);\n};\n\nexport const DefaultGettingStarted = Template.bind({});\nDefaultGettingStarted.args = {};\n"]}
|