@finsemble/finsemble-ui 6.6.0 → 7.0.0-beta.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/package.json +18 -32
- package/react/assets/css/button.css +1 -1
- package/react/assets/css/favorites.css +0 -47
- package/react/assets/css/finsemble.css +3 -0
- package/react/assets/css/linkerWindow.css +13 -1
- package/react/assets/css/menus.css +2 -2
- package/react/assets/css/notificationsCenter.css +32 -1
- package/react/assets/css/shared/common.css +40 -0
- package/react/assets/css/userPreferences.css +17 -12
- package/react/assets/css/windowTitleBar.css +7 -0
- package/react/assets/icons/server.svg +26 -0
- package/react/components/common/ButtonIcon.js +1 -1
- package/react/components/common/ButtonIcon.js.map +1 -1
- package/react/components/common/ButtonRow.js +2 -2
- package/react/components/common/ButtonRow.js.map +1 -1
- package/react/components/common/Checkbox.js +1 -1
- package/react/components/common/Checkbox.js.map +1 -1
- package/react/components/common/ColorPicker.js +16 -15
- package/react/components/common/ColorPicker.js.map +1 -1
- package/react/components/common/ErrorBoundary.d.ts +16 -0
- package/react/components/common/ErrorBoundary.js +22 -0
- package/react/components/common/ErrorBoundary.js.map +1 -0
- package/react/components/common/FinsembleIcon.d.ts +3 -2
- package/react/components/common/FinsembleIcon.js +10 -3
- package/react/components/common/FinsembleIcon.js.map +1 -1
- package/react/components/common/FinsembleLink.d.ts +6 -0
- package/react/components/common/FinsembleLink.js +12 -0
- package/react/components/common/FinsembleLink.js.map +1 -0
- package/react/components/common/FinsembleToggle.d.ts +1 -2
- package/react/components/common/FinsembleToggle.js +2 -6
- package/react/components/common/FinsembleToggle.js.map +1 -1
- package/react/components/common/FinsembleToggleButtonBar.d.ts +13 -0
- package/react/components/common/FinsembleToggleButtonBar.js +44 -0
- package/react/components/common/FinsembleToggleButtonBar.js.map +1 -0
- package/react/components/common/InputTable.d.ts +3 -3
- package/react/components/common/InputTable.js +13 -13
- package/react/components/common/InputTable.js.map +1 -1
- package/react/components/common/Tab.js +33 -5
- package/react/components/common/Tab.js.map +1 -1
- package/react/components/common/css/FinsembleToggle.css +22 -0
- package/react/components/common/css/application-edit-page.css +10 -2
- package/react/components/common/css/tab.css +8 -8
- package/react/components/common/css/time-select.css +1 -1
- package/react/components/common/css/toggle.css +2 -10
- package/react/components/common/helpers.js +6 -1
- package/react/components/common/helpers.js.map +1 -1
- package/react/components/common/stories/ColorPicker.stories.js +6 -11
- package/react/components/common/stories/ColorPicker.stories.js.map +1 -1
- package/react/components/common/stories/FinsembleToggle.stories.d.ts +1 -2
- package/react/components/common/stories/FinsembleToggle.stories.js +0 -7
- package/react/components/common/stories/FinsembleToggle.stories.js.map +1 -1
- package/react/components/common/stories/FinsembleToggleButtonBar.stories.d.ts +14 -0
- package/react/components/common/stories/FinsembleToggleButtonBar.stories.js +97 -0
- package/react/components/common/stories/FinsembleToggleButtonBar.stories.js.map +1 -0
- package/react/components/common/stories/InputTable.stories.d.ts +4 -3
- package/react/components/common/stories/InputTable.stories.js +18 -8
- package/react/components/common/stories/InputTable.stories.js.map +1 -1
- package/react/components/common/tests/ButtonRow.spec.js +5 -0
- package/react/components/common/tests/ButtonRow.spec.js.map +1 -1
- package/react/components/common/tests/FinsembleToggle.spec.js +1 -6
- package/react/components/common/tests/FinsembleToggle.spec.js.map +1 -1
- package/react/components/common/tests/FinsembleToggleButtonBar.spec.d.ts +1 -0
- package/react/components/common/tests/FinsembleToggleButtonBar.spec.js +40 -0
- package/react/components/common/tests/FinsembleToggleButtonBar.spec.js.map +1 -0
- package/react/components/common/tests/InputTable.spec.js +3 -3
- package/react/components/common/tests/InputTable.spec.js.map +1 -1
- package/react/components/favorites/FavoriteMaker.js +1 -1
- package/react/components/favorites/FavoriteMaker.js.map +1 -1
- package/react/components/fdc3Resolver/ResolverContainer.js +4 -7
- package/react/components/fdc3Resolver/ResolverContainer.js.map +1 -1
- package/react/components/icon/Icon.d.ts +1 -1
- package/react/components/icon/Icon.js +8 -1
- package/react/components/icon/Icon.js.map +1 -1
- package/react/components/legacyControls/FinsembleDnDContext.js +7 -7
- package/react/components/legacyControls/FinsembleDnDContext.js.map +1 -1
- package/react/components/linker/remoteRedux.js +1 -0
- package/react/components/linker/remoteRedux.js.map +1 -1
- package/react/components/menu/MenuItem.js +1 -1
- package/react/components/menu/MenuItem.js.map +1 -1
- package/react/components/menu/MenuPortal.js +12 -21
- package/react/components/menu/MenuPortal.js.map +1 -1
- package/react/components/menu/MenuToggle.js +1 -1
- package/react/components/menu/MenuToggle.js.map +1 -1
- package/react/components/menu/keyboardNavigation.d.ts +1 -22
- package/react/components/menu/keyboardNavigation.js +110 -160
- package/react/components/menu/keyboardNavigation.js.map +1 -1
- package/react/components/notifications/components/drawer/DrawerControls.js +39 -25
- package/react/components/notifications/components/drawer/DrawerControls.js.map +1 -1
- package/react/components/notifications/components/notificationsCenter/NotificationsCenter.js +19 -6
- package/react/components/notifications/components/notificationsCenter/NotificationsCenter.js.map +1 -1
- package/react/components/notifications/components/shared/CheckButton.js +19 -8
- package/react/components/notifications/components/shared/CheckButton.js.map +1 -1
- package/react/components/notifications/components/shared/NotificationCardShell.js +2 -1
- package/react/components/notifications/components/shared/NotificationCardShell.js.map +1 -1
- package/react/components/notifications/components/shared/notificationCard/NotificationCardBodyShell.js +2 -1
- package/react/components/notifications/components/shared/notificationCard/NotificationCardBodyShell.js.map +1 -1
- package/react/components/notifications/components/shared/notificationCard/NotificationCardHeaderShell.js +2 -1
- package/react/components/notifications/components/shared/notificationCard/NotificationCardHeaderShell.js.map +1 -1
- package/react/components/notifications/components/views/CardView.js +5 -3
- package/react/components/notifications/components/views/CardView.js.map +1 -1
- package/react/components/notifications/components/views/ListView.js +3 -1
- package/react/components/notifications/components/views/ListView.js.map +1 -1
- package/react/components/notifications/types.d.ts +3 -0
- package/react/components/notifications/types.js.map +1 -1
- package/react/components/processMonitor/ProcessMonitor.js +4 -1
- package/react/components/processMonitor/ProcessMonitor.js.map +1 -1
- package/react/components/processMonitor/components/ProcessStatistics.js +1 -3
- package/react/components/processMonitor/components/ProcessStatistics.js.map +1 -1
- package/react/components/processMonitor/helpers.js +4 -3
- package/react/components/processMonitor/helpers.js.map +1 -1
- package/react/components/processMonitor/helpers.spec.js +7 -3
- package/react/components/processMonitor/helpers.spec.js.map +1 -1
- package/react/components/sdd/AddApp.d.ts +4 -3
- package/react/components/sdd/AddApp.js +132 -30
- package/react/components/sdd/AddApp.js.map +1 -1
- package/react/components/sdd/AppEditAccess.d.ts +4 -3
- package/react/components/sdd/AppEditAccess.js.map +1 -1
- package/react/components/sdd/AppEditPage.d.ts +4 -3
- package/react/components/sdd/AppEditPage.js +141 -116
- package/react/components/sdd/AppEditPage.js.map +1 -1
- package/react/components/sdd/Appearance.d.ts +2 -1
- package/react/components/sdd/Appearance.js +15 -7
- package/react/components/sdd/Appearance.js.map +1 -1
- package/react/components/sdd/Application.d.ts +5 -4
- package/react/components/sdd/Application.js +61 -42
- package/react/components/sdd/Application.js.map +1 -1
- package/react/components/sdd/Applications.d.ts +12 -11
- package/react/components/sdd/Applications.js +23 -4
- package/react/components/sdd/Applications.js.map +1 -1
- package/react/components/sdd/Authentication.js +1 -6
- package/react/components/sdd/Authentication.js.map +1 -1
- package/react/components/sdd/AuthenticationProviderConfig.js +5 -3
- package/react/components/sdd/AuthenticationProviderConfig.js.map +1 -1
- package/react/components/sdd/EditPreload.d.ts +4 -3
- package/react/components/sdd/EditPreload.js +39 -22
- package/react/components/sdd/EditPreload.js.map +1 -1
- package/react/components/sdd/Export.d.ts +7 -6
- package/react/components/sdd/Export.js +3 -2
- package/react/components/sdd/Export.js.map +1 -1
- package/react/components/sdd/GettingStarted.js +3 -3
- package/react/components/sdd/GettingStarted.js.map +1 -1
- package/react/components/sdd/Navigation.js +28 -4
- package/react/components/sdd/Navigation.js.map +1 -1
- package/react/components/sdd/OptionalSettingsView.d.ts +6 -5
- package/react/components/sdd/OptionalSettingsView.js +2 -10
- package/react/components/sdd/OptionalSettingsView.js.map +1 -1
- package/react/components/sdd/ProjectErrors.js +1 -1
- package/react/components/sdd/ProjectErrors.js.map +1 -1
- package/react/components/sdd/Publish.js +2 -2
- package/react/components/sdd/Publish.js.map +1 -1
- package/react/components/sdd/SmartDesktopDesigner.d.ts +17 -16
- package/react/components/sdd/SmartDesktopDesigner.js +37 -34
- package/react/components/sdd/SmartDesktopDesigner.js.map +1 -1
- package/react/components/sdd/ThemePage.js +8 -5
- package/react/components/sdd/ThemePage.js.map +1 -1
- package/react/components/sdd/Themes.d.ts +2 -1
- package/react/components/sdd/Themes.js +2 -2
- package/react/components/sdd/Themes.js.map +1 -1
- package/react/components/sdd/Toolbar.d.ts +5 -4
- package/react/components/sdd/Toolbar.js +11 -9
- package/react/components/sdd/Toolbar.js.map +1 -1
- package/react/components/sdd/common/setPreloadDefaults.d.ts +1 -1
- package/react/components/sdd/common/setPreloadDefaults.js +5 -4
- package/react/components/sdd/common/setPreloadDefaults.js.map +1 -1
- package/react/components/sdd/common/views.js +7 -4
- package/react/components/sdd/common/views.js.map +1 -1
- package/react/components/sdd/css/addApp.css +52 -0
- package/react/components/sdd/css/applications.css +0 -26
- package/react/components/sdd/css/nav.css +3 -3
- package/react/components/sdd/fixtures/authenticationProps.js +15 -1
- package/react/components/sdd/fixtures/authenticationProps.js.map +1 -1
- package/react/components/sdd/fixtures/preloads.js +14 -12
- package/react/components/sdd/fixtures/preloads.js.map +1 -1
- package/react/components/sdd/smartDesktopClient.d.ts +163 -0
- package/react/components/sdd/smartDesktopClient.js +573 -0
- package/react/components/sdd/smartDesktopClient.js.map +1 -0
- package/react/components/sdd/smartDesktopClient.spec.d.ts +1 -0
- package/react/components/sdd/smartDesktopClient.spec.js +61 -0
- package/react/components/sdd/smartDesktopClient.spec.js.map +1 -0
- package/react/components/sdd/stories/AddApp.stories.d.ts +10 -0
- package/react/components/sdd/stories/AddApp.stories.js +18 -0
- package/react/components/sdd/stories/AddApp.stories.js.map +1 -0
- package/react/components/sdd/stories/AppEditPage.stories.d.ts +2 -0
- package/react/components/sdd/stories/AppEditPage.stories.js +2 -0
- package/react/components/sdd/stories/AppEditPage.stories.js.map +1 -1
- package/react/components/sdd/stories/Appearance.stories.d.ts +1 -1
- package/react/components/sdd/stories/Appearance.stories.js +1 -0
- package/react/components/sdd/stories/Appearance.stories.js.map +1 -1
- package/react/components/sdd/stories/Authentication.stories.js +2 -16
- package/react/components/sdd/stories/Authentication.stories.js.map +1 -1
- package/react/components/sdd/stories/OptionalSettingsView.stories.js +1 -1
- package/react/components/sdd/stories/OptionalSettingsView.stories.js.map +1 -1
- package/react/components/sdd/stories/SmartDesktopDesigner.stories.d.ts +1 -1
- package/react/components/sdd/stories/SmartDesktopDesigner.stories.js +3 -0
- package/react/components/sdd/stories/SmartDesktopDesigner.stories.js.map +1 -1
- package/react/components/sdd/stories/Themes.stories.d.ts +1 -1
- package/react/components/sdd/stories/Themes.stories.js +1 -0
- package/react/components/sdd/stories/Themes.stories.js.map +1 -1
- package/react/components/sdd/tests/AddApp.spec.d.ts +1 -0
- package/react/components/sdd/tests/AddApp.spec.js +96 -0
- package/react/components/sdd/tests/AddApp.spec.js.map +1 -0
- package/react/components/sdd/tests/AppEditPage.spec.js +92 -23
- package/react/components/sdd/tests/AppEditPage.spec.js.map +1 -1
- package/react/components/sdd/tests/Application.spec.js +411 -24
- package/react/components/sdd/tests/Application.spec.js.map +1 -1
- package/react/components/sdd/tests/Applications.spec.js +1 -45
- package/react/components/sdd/tests/Applications.spec.js.map +1 -1
- package/react/components/sdd/tests/Authentication.spec.js +1 -1
- package/react/components/sdd/tests/Authentication.spec.js.map +1 -1
- package/react/components/sdd/tests/EditPreload.spec.js +50 -7
- package/react/components/sdd/tests/EditPreload.spec.js.map +1 -1
- package/react/components/sdd/tests/Navigation.spec.js +2 -2
- package/react/components/sdd/tests/Navigation.spec.js.map +1 -1
- package/react/components/sdd/tests/OptionalSettingsView.spec.js +235 -0
- package/react/components/sdd/tests/OptionalSettingsView.spec.js.map +1 -1
- package/react/components/sdd/tests/ProjectErrors.spec.js +1 -1
- package/react/components/sdd/tests/ProjectErrors.spec.js.map +1 -1
- package/react/components/sdd/tests/SmartDesktopDesigner.spec.js +2 -2
- package/react/components/sdd/tests/SmartDesktopDesigner.spec.js.map +1 -1
- package/react/components/search/Search.js +1 -1
- package/react/components/search/Search.js.map +1 -1
- package/react/components/shared/DefaultDropdownButton.js +12 -1
- package/react/components/shared/DefaultDropdownButton.js.map +1 -1
- package/react/components/shared/tests/DefaultDropdownButton.spec.js +12 -0
- package/react/components/shared/tests/DefaultDropdownButton.spec.js.map +1 -1
- package/react/components/smartDesktopDesigner/SmartDesktopDesigner.d.ts +1 -16
- package/react/components/smartDesktopDesigner/SmartDesktopDesigner.js +0 -4
- package/react/components/smartDesktopDesigner/SmartDesktopDesigner.js.map +1 -1
- package/react/components/toolbar/DragHandle.stories.js.map +1 -1
- package/react/components/toolbar/ToolbarIcon.js +2 -2
- package/react/components/toolbar/ToolbarIcon.js.map +1 -1
- package/react/components/toolbar/ToolbarSection.d.ts +1 -9
- package/react/components/toolbar/ToolbarSection.js +3 -7
- package/react/components/toolbar/ToolbarSection.js.map +1 -1
- package/react/components/toolbar/advancedAppLauncher/stores/StoreActions.js +1 -1
- package/react/components/toolbar/advancedAppLauncher/stores/StoreActions.js.map +1 -1
- package/react/components/toolbar/dashbar/Dashbar.js +21 -12
- package/react/components/toolbar/dashbar/Dashbar.js.map +1 -1
- package/react/components/toolbar/workspaceManagementMenu/components/Workspace.js +1 -1
- package/react/components/toolbar/workspaceManagementMenu/components/Workspace.js.map +1 -1
- package/react/components/userPreferences/components/ContentSection.js +1 -1
- package/react/components/userPreferences/components/ContentSection.js.map +1 -1
- package/react/components/userPreferences/components/content/notificationViews/NotificationsPreferencesHome.js +4 -3
- package/react/components/userPreferences/components/content/notificationViews/NotificationsPreferencesHome.js.map +1 -1
- package/react/components/userPreferences/components/general/ScheduledClose.js +12 -3
- package/react/components/userPreferences/components/general/ScheduledClose.js.map +1 -1
- package/react/components/userPreferences/components/workspaces/WorkspaceButton.js +1 -1
- package/react/components/userPreferences/components/workspaces/WorkspaceButton.js.map +1 -1
- package/react/components/windowTitleBar/WindowTitleBarShell.d.ts +17 -2
- package/react/components/windowTitleBar/WindowTitleBarShell.js +160 -6
- package/react/components/windowTitleBar/WindowTitleBarShell.js.map +1 -1
- package/react/components/windowTitleBar/components/left/LinkerButton.js +7 -1
- package/react/components/windowTitleBar/components/left/LinkerButton.js.map +1 -1
- package/react/components/windowTitleBar/components/windowTitle.js +10 -2
- package/react/components/windowTitleBar/components/windowTitle.js.map +1 -1
- package/react/components/windowTitleBar/stores/windowTitleBarStore.js +11 -1
- package/react/components/windowTitleBar/stores/windowTitleBarStore.js.map +1 -1
- package/react/reducers/rootReducer.d.ts +2 -2
- package/react/store.d.ts +4 -4
- package/react/tsconfig.tsbuildinfo +1 -0
- package/react/types/smartDesktopDesignerTypes.d.ts +3 -0
- package/react/types/smartDesktopDesignerTypes.js.map +1 -1
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export class ErrorBoundary extends React.Component {
|
|
3
|
+
constructor(props) {
|
|
4
|
+
super(props);
|
|
5
|
+
this.state = { hasError: false };
|
|
6
|
+
}
|
|
7
|
+
static getDerivedStateFromError(error) {
|
|
8
|
+
return { hasError: true };
|
|
9
|
+
}
|
|
10
|
+
componentDidCatch(error, errorInfo) {
|
|
11
|
+
console.error(error, errorInfo);
|
|
12
|
+
FSBL.Clients.Logger.system.error(error, errorInfo);
|
|
13
|
+
}
|
|
14
|
+
render() {
|
|
15
|
+
var _a;
|
|
16
|
+
if (this.state.hasError) {
|
|
17
|
+
return (_a = this.props.fallBackUI) !== null && _a !== void 0 ? _a : React.createElement(React.Fragment, null);
|
|
18
|
+
}
|
|
19
|
+
return this.props.children;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=ErrorBoundary.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ErrorBoundary.js","sourceRoot":"","sources":["../../../src/components/common/ErrorBoundary.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA+B,MAAM,OAAO,CAAC;AA2BpD,MAAM,OAAO,aAAc,SAAQ,KAAK,CAAC,SAAiD;IACzF,YAAY,KAAyB;QACpC,KAAK,CAAC,KAAK,CAAC,CAAC;QACb,IAAI,CAAC,KAAK,GAAG,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;IAClC,CAAC;IAED,MAAM,CAAC,wBAAwB,CAAC,KAAY;QAE3C,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IAC3B,CAAC;IAED,iBAAiB,CAAC,KAAY,EAAE,SAAoB;QAEnD,OAAO,CAAC,KAAK,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;QAChC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;IACpD,CAAC;IAED,MAAM;;QACL,IAAI,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE;YAExB,OAAO,MAAA,IAAI,CAAC,KAAK,CAAC,UAAU,mCAAI,yCAAK,CAAC;SACtC;QAED,OAAO,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC;IAC5B,CAAC;CACD","sourcesContent":["import React, { ErrorInfo, ReactNode } from \"react\";\n\ntype ErrorBoundaryProps = {\n\tfallBackUI?: ReactNode;\n};\ntype ErrorBoundaryState = {\n\thasError: boolean;\n};\n\n/**\n * Something like a try catch in React component form with some exceptions. Catches Errors and logs them to the central\n * logger. Prevents uncaught exceptions on the render of child components from unintentionally breaking the entire UI.\n * Has the added benefit of sending the errors to the Central Logger\n *\n * Note: The exceptions are that it not catch errors in Event handlers and Asynchronous code.\n * Note: This does not catch errors in the current component directly, only child components. See below for example\n *\n * Eg: WON'T WORK\n *\n * const ContainerComponent = ({test}:any) => <ErrorBoundary><div>{test.undefined.length}</div></ErrorBoundary>\n *\n * WILL WORK:\n * const BrokenComponent = ({test}:any) => <div>{test.undefined.length}</div>\n * const ContainerComponent = ({test}:any) => <ErrorBoundary><BrokenComponent test={test}/></ErrorBoundary>\n *\n * @see https://reactjs.org/docs/error-boundaries.html for more information on Error Boundaries\n */\nexport class ErrorBoundary extends React.Component<ErrorBoundaryProps, ErrorBoundaryState> {\n\tconstructor(props: ErrorBoundaryProps) {\n\t\tsuper(props);\n\t\tthis.state = { hasError: false };\n\t}\n\n\tstatic getDerivedStateFromError(error: Error) {\n\t\t// Update state so the next render will show the fallback UI.\n\t\treturn { hasError: true };\n\t}\n\n\tcomponentDidCatch(error: Error, errorInfo: ErrorInfo) {\n\t\t// Log the error to the dev tools where developers will expect it but also send it to the central logger\n\t\tconsole.error(error, errorInfo);\n\t\tFSBL.Clients.Logger.system.error(error, errorInfo);\n\t}\n\n\trender() {\n\t\tif (this.state.hasError) {\n\t\t\t// Render custom fallback UI or default to nothing\n\t\t\treturn this.props.fallBackUI ?? <></>;\n\t\t}\n\n\t\treturn this.props.children;\n\t}\n}\n"]}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import "./css/icon.css";
|
|
3
|
-
export declare type FinsembleIconType = "alwaysOnTop" | "caret" | "check-square" | "check" | "chevron-left" | "chevron-right" | "close" | "code-block" | "copy" | "documentation" | "exclamation-circle" | "external-link" | "flag" | "folder" | "font" | "globe" | "hdd" | "key" | "life-ring" | "linker" | "lock" | "magic" | "maximize" | "minimize" | "moon" | "paint-roller" | "pencil" | "plus" | "question-circle" | "search" | "sun" | "times" | "toggle-off" | "toggle-on" | "toolbar" | "tools" | "trash" | "upload" | "window";
|
|
3
|
+
export declare type FinsembleIconType = "alwaysOnTop" | "caret" | "check-square" | "check" | "chevron-left" | "chevron-right" | "close" | "code-block" | "copy" | "documentation" | "exclamation-circle" | "external-link" | "flag" | "folder" | "font" | "globe" | "hdd" | "key" | "life-ring" | "linker" | "lock" | "magic" | "maximize" | "minimize" | "moon" | "paint-roller" | "pencil" | "plus" | "question-circle" | "search" | "server" | "sun" | "times" | "toggle-off" | "toggle-on" | "toolbar" | "tools" | "trash" | "upload" | "window";
|
|
4
4
|
export declare type FinsembleIconProps = {
|
|
5
5
|
icon: FinsembleIconType;
|
|
6
6
|
className?: string;
|
|
7
7
|
onClick?: (e: React.MouseEvent) => void;
|
|
8
|
+
label?: string;
|
|
8
9
|
};
|
|
9
|
-
export declare const FinsembleIcon: (
|
|
10
|
+
export declare const FinsembleIcon: ({ icon, onClick, className, label }: FinsembleIconProps) => JSX.Element;
|
|
@@ -30,6 +30,7 @@ import { ReactComponent as PencilIcon } from "../../assets/icons/pencil.svg";
|
|
|
30
30
|
import { ReactComponent as PlusIcon } from "../../assets/icons/plus.svg";
|
|
31
31
|
import { ReactComponent as QuestionCircleIcon } from "../../assets/icons/question-circle.svg";
|
|
32
32
|
import { ReactComponent as SearchIcon } from "../../assets/icons/search.svg";
|
|
33
|
+
import { ReactComponent as ServerIcon } from "../../assets/icons/server.svg";
|
|
33
34
|
import { ReactComponent as SunIcon } from "../../assets/icons/sun.svg";
|
|
34
35
|
import { ReactComponent as TimesIcon } from "../../assets/icons/times.svg";
|
|
35
36
|
import { ReactComponent as ToggleOffIcon } from "../../assets/icons/toggle-off.svg";
|
|
@@ -70,6 +71,7 @@ const icons = {
|
|
|
70
71
|
plus: PlusIcon,
|
|
71
72
|
"question-circle": QuestionCircleIcon,
|
|
72
73
|
search: SearchIcon,
|
|
74
|
+
server: ServerIcon,
|
|
73
75
|
sun: SunIcon,
|
|
74
76
|
times: TimesIcon,
|
|
75
77
|
"toggle-off": ToggleOffIcon,
|
|
@@ -80,8 +82,13 @@ const icons = {
|
|
|
80
82
|
upload: UploadIcon,
|
|
81
83
|
window: WindowIcon,
|
|
82
84
|
};
|
|
83
|
-
export const FinsembleIcon = (
|
|
84
|
-
const Icon = icons[
|
|
85
|
-
return (React.createElement("span", { className: ["finsemble-icon", `finsemble-icon-${
|
|
85
|
+
export const FinsembleIcon = ({ icon, onClick = () => { }, className = "", label = "" }) => {
|
|
86
|
+
const Icon = icons[icon];
|
|
87
|
+
return (React.createElement("span", Object.assign({ className: ["finsemble-icon", `finsemble-icon-${icon}`, className].join(" ") }, (label
|
|
88
|
+
? {
|
|
89
|
+
role: "img",
|
|
90
|
+
"aria-label": label,
|
|
91
|
+
}
|
|
92
|
+
: {}), { onClick: onClick }), Icon && React.createElement(Icon, null)));
|
|
86
93
|
};
|
|
87
94
|
//# sourceMappingURL=FinsembleIcon.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FinsembleIcon.js","sourceRoot":"","sources":["../../../src/components/common/FinsembleIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,gBAAgB,CAAC;AACxB,OAAO,EAAE,cAAc,IAAI,eAAe,EAAE,MAAM,sCAAsC,CAAC;AACzF,OAAO,EAAE,cAAc,IAAI,KAAK,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,EAAE,cAAc,IAAI,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAC3E,OAAO,EAAE,cAAc,IAAI,WAAW,EAAE,MAAM,qCAAqC,CAAC;AACpF,OAAO,EAAE,cAAc,IAAI,eAAe,EAAE,MAAM,qCAAqC,CAAC;AACxF,OAAO,EAAE,cAAc,IAAI,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AAC1F,OAAO,EAAE,cAAc,IAAI,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAC3E,OAAO,EAAE,cAAc,IAAI,aAAa,EAAE,MAAM,mCAAmC,CAAC;AACpF,OAAO,EAAE,cAAc,IAAI,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACzE,OAAO,EAAE,cAAc,IAAI,iBAAiB,EAAE,MAAM,sCAAsC,CAAC;AAC3F,OAAO,EAAE,cAAc,IAAI,sBAAsB,EAAE,MAAM,2CAA2C,CAAC;AACrG,OAAO,EAAE,cAAc,IAAI,gBAAgB,EAAE,MA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AE,YAAY;IACzB,MAAM,EAAE,UAAU;IAClB,IAAI,EAAE,QAAQ;IACd,KAAK,EAAE,SAAS;IAChB,QAAQ,EAAE,YAAY;IACtB,QAAQ,EAAE,YAAY;IACtB,IAAI,EAAE,QAAQ;IACd,cAAc,EAAE,eAAe;IAC/B,MAAM,EAAE,UAAU;IAClB,IAAI,EAAE,QAAQ;IACd,iBAAiB,EAAE,kBAAkB;IACrC,MAAM,EAAE,UAAU;IAClB,MAAM,EAAE,UAAU;IAClB,GAAG,EAAE,OAAO;IACZ,KAAK,EAAE,SAAS;IAChB,YAAY,EAAE,aAAa;IAC3B,WAAW,EAAE,YAAY;IACzB,OAAO,EAAE,WAAW;IACpB,KAAK,EAAE,SAAS;IAChB,KAAK,EAAE,SAAS;IAChB,MAAM,EAAE,UAAU;IAClB,MAAM,EAAE,UAAU;CAClB,CAAC;AASF,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,EAAE,IAAI,EAAE,OAAO,GAAG,GAAG,EAAE,GAAE,CAAC,EAAE,SAAS,GAAG,EAAE,EAAE,KAAK,GAAG,EAAE,EAAsB,EAAE,EAAE;IAC7G,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC;IAEzB,OAAO,CACN,4CACC,SAAS,EAAE,CAAC,gBAAgB,EAAE,kBAAkB,IAAI,EAAE,EAAE,SAAS,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,IACxE,CAAC,KAAK;QACT,CAAC,CAAC;YACA,IAAI,EAAE,KAAK;YACX,YAAY,EAAE,KAAK;SAClB;QACH,CAAC,CAAC,EAAE,CAAC,IACN,OAAO,EAAE,OAAO,KAEf,IAAI,IAAI,oBAAC,IAAI,OAAQ,CAChB,CACP,CAAC;AACH,CAAC,CAAC","sourcesContent":["import React from \"react\";\nimport \"./css/icon.css\";\nimport { ReactComponent as AlwaysOnTopIcon } from \"../../assets/icons/always-on-top.svg\";\nimport { ReactComponent as Caret } from \"../../assets/icons/caret.svg\";\nimport { ReactComponent as CheckIcon } from \"../../assets/icons/check.svg\";\nimport { ReactComponent as CheckSquare } from \"../../assets/icons/check-square.svg\";\nimport { ReactComponent as ChevronLeftIcon } from \"../../assets/icons/chevron-left.svg\";\nimport { ReactComponent as ChevronRightIcon } from \"../../assets/icons/chevron-right.svg\";\nimport { ReactComponent as CloseIcon } from \"../../assets/icons/close.svg\";\nimport { ReactComponent as CodeBlockIcon } from \"../../assets/icons/code-block.svg\";\nimport { ReactComponent as CopyIcon } from \"../../assets/icons/copy.svg\";\nimport { ReactComponent as DocumentationIcon } from \"../../assets/icons/documentation.svg\";\nimport { ReactComponent as ExclaimationCircleIcon } from \"../../assets/icons/exclamation-circle.svg\";\nimport { ReactComponent as ExternalLinkIcon } from \"../../assets/icons/external-link.svg\";\nimport { ReactComponent as FlagIcon } from \"../../assets/icons/flag.svg\";\nimport { ReactComponent as FolderIcon } from \"../../assets/icons/folder.svg\";\nimport { ReactComponent as FontIcon } from \"../../assets/icons/font.svg\";\nimport { ReactComponent as GlobeIcon } from \"../../assets/icons/globe.svg\";\nimport { ReactComponent as HDDIcon } from \"../../assets/icons/hdd.svg\";\nimport { ReactComponent as KeyIcon } from \"../../assets/icons/key.svg\";\nimport { ReactComponent as LifeRingIcon } from \"../../assets/icons/life-ring.svg\";\nimport { ReactComponent as LinkerIcon } from \"../../assets/icons/linker.svg\";\nimport { ReactComponent as LockIcon } from \"../../assets/icons/lock.svg\";\nimport { ReactComponent as MagicIcon } from \"../../assets/icons/magic.svg\";\nimport { ReactComponent as MaximizeIcon } from \"../../assets/icons/maximize.svg\";\nimport { ReactComponent as MinimizeIcon } from \"../../assets/icons/minimize.svg\";\nimport { ReactComponent as MoonIcon } from \"../../assets/icons/moon.svg\";\nimport { ReactComponent as PaintRollerIcon } from \"../../assets/icons/paint-roller.svg\";\nimport { ReactComponent as PencilIcon } from \"../../assets/icons/pencil.svg\";\nimport { ReactComponent as PlusIcon } from \"../../assets/icons/plus.svg\";\nimport { ReactComponent as QuestionCircleIcon } from \"../../assets/icons/question-circle.svg\";\nimport { ReactComponent as SearchIcon } from \"../../assets/icons/search.svg\";\nimport { ReactComponent as ServerIcon } from \"../../assets/icons/server.svg\";\nimport { ReactComponent as SunIcon } from \"../../assets/icons/sun.svg\";\nimport { ReactComponent as TimesIcon } from \"../../assets/icons/times.svg\";\nimport { ReactComponent as ToggleOffIcon } from \"../../assets/icons/toggle-off.svg\";\nimport { ReactComponent as ToggleOnIcon } from \"../../assets/icons/toggle-on.svg\";\nimport { ReactComponent as ToolbarIcon } from \"../../assets/icons/toolbar.svg\";\nimport { ReactComponent as ToolsIcon } from \"../../assets/icons/tools.svg\";\nimport { ReactComponent as TrashIcon } from \"../../assets/icons/trash.svg\";\nimport { ReactComponent as UploadIcon } from \"../../assets/icons/upload.svg\";\nimport { ReactComponent as WindowIcon } from \"../../assets/icons/window.svg\";\n\nexport type FinsembleIconType =\n\t| \"alwaysOnTop\"\n\t| \"caret\"\n\t| \"check-square\"\n\t| \"check\"\n\t| \"chevron-left\"\n\t| \"chevron-right\"\n\t| \"close\"\n\t| \"code-block\"\n\t| \"copy\"\n\t| \"documentation\"\n\t| \"exclamation-circle\"\n\t| \"external-link\"\n\t| \"flag\"\n\t| \"folder\"\n\t| \"font\"\n\t| \"globe\"\n\t| \"hdd\"\n\t| \"key\"\n\t| \"life-ring\"\n\t| \"linker\"\n\t| \"lock\"\n\t| \"magic\"\n\t| \"maximize\"\n\t| \"minimize\"\n\t| \"moon\"\n\t| \"paint-roller\"\n\t| \"pencil\"\n\t| \"plus\"\n\t| \"question-circle\"\n\t| \"search\"\n\t| \"server\"\n\t| \"sun\"\n\t| \"times\"\n\t| \"toggle-off\"\n\t| \"toggle-on\"\n\t| \"toolbar\"\n\t| \"tools\"\n\t| \"trash\"\n\t| \"upload\"\n\t| \"window\";\n\ntype IconComponents = {\n\t[key in FinsembleIconType]: React.FunctionComponent<React.SVGProps<SVGSVGElement>>;\n};\n\nconst icons: IconComponents = {\n\talwaysOnTop: AlwaysOnTopIcon,\n\tcaret: Caret,\n\tcheck: CheckIcon,\n\t\"check-square\": CheckSquare,\n\t\"chevron-left\": ChevronLeftIcon,\n\t\"chevron-right\": ChevronRightIcon,\n\tclose: CloseIcon,\n\t\"code-block\": CodeBlockIcon,\n\tcopy: CopyIcon,\n\tdocumentation: DocumentationIcon,\n\t\"exclamation-circle\": ExclaimationCircleIcon,\n\t\"external-link\": ExternalLinkIcon,\n\tflag: FlagIcon,\n\tfolder: FolderIcon,\n\tfont: FontIcon,\n\tglobe: GlobeIcon,\n\thdd: HDDIcon,\n\tkey: KeyIcon,\n\t\"life-ring\": LifeRingIcon,\n\tlinker: LinkerIcon,\n\tlock: LockIcon,\n\tmagic: MagicIcon,\n\tmaximize: MaximizeIcon,\n\tminimize: MinimizeIcon,\n\tmoon: MoonIcon,\n\t\"paint-roller\": PaintRollerIcon,\n\tpencil: PencilIcon,\n\tplus: PlusIcon,\n\t\"question-circle\": QuestionCircleIcon,\n\tsearch: SearchIcon,\n\tserver: ServerIcon,\n\tsun: SunIcon,\n\ttimes: TimesIcon,\n\t\"toggle-off\": ToggleOffIcon,\n\t\"toggle-on\": ToggleOnIcon,\n\ttoolbar: ToolbarIcon,\n\ttools: ToolsIcon,\n\ttrash: TrashIcon,\n\tupload: UploadIcon,\n\twindow: WindowIcon,\n};\n\nexport type FinsembleIconProps = {\n\ticon: FinsembleIconType;\n\tclassName?: string;\n\tonClick?: (e: React.MouseEvent) => void;\n\tlabel?: string;\n};\n\nexport const FinsembleIcon = ({ icon, onClick = () => {}, className = \"\", label = \"\" }: FinsembleIconProps) => {\n\tconst Icon = icons[icon];\n\n\treturn (\n\t\t<span\n\t\t\tclassName={[\"finsemble-icon\", `finsemble-icon-${icon}`, className].join(\" \")}\n\t\t\t{...(label\n\t\t\t\t? {\n\t\t\t\t\t\trole: \"img\",\n\t\t\t\t\t\t\"aria-label\": label,\n\t\t\t\t }\n\t\t\t\t: {})}\n\t\t\tonClick={onClick}\n\t\t>\n\t\t\t{Icon && <Icon></Icon>}\n\t\t</span>\n\t);\n};\n"]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
const openLink = (url) => {
|
|
3
|
+
FSBL.Clients.LauncherClient.spawn("", {
|
|
4
|
+
url,
|
|
5
|
+
addToWorkspace: false,
|
|
6
|
+
}, () => { });
|
|
7
|
+
};
|
|
8
|
+
export const FinsembleLink = ({ url, text }) => (React.createElement("a", { href: "", onClick: (e) => {
|
|
9
|
+
e.preventDefault();
|
|
10
|
+
openLink(url);
|
|
11
|
+
} }, text));
|
|
12
|
+
//# sourceMappingURL=FinsembleLink.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FinsembleLink.js","sourceRoot":"","sources":["../../../src/components/common/FinsembleLink.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,MAAM,QAAQ,GAAG,CAAC,GAAW,EAAE,EAAE;IAChC,IAAI,CAAC,OAAO,CAAC,cAAc,CAAC,KAAK,CAChC,EAAE,EACF;QACC,GAAG;QACH,cAAc,EAAE,KAAK;KACrB,EACD,GAAG,EAAE,GAAE,CAAC,CACR,CAAC;AACH,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAAiC,CAAC,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,CAC7E,2BACC,IAAI,EAAC,EAAE,EACP,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE;QACd,CAAC,CAAC,cAAc,EAAE,CAAC;QACnB,QAAQ,CAAC,GAAG,CAAC,CAAC;IACf,CAAC,IAEA,IAAI,CACF,CACJ,CAAC","sourcesContent":["import React from \"react\";\n\nexport interface FinsembleLinkProps {\n\turl: string;\n\ttext: string;\n}\n\nconst openLink = (url: string) => {\n\tFSBL.Clients.LauncherClient.spawn(\n\t\t\"\",\n\t\t{\n\t\t\turl,\n\t\t\taddToWorkspace: false,\n\t\t},\n\t\t() => {}\n\t);\n};\n\nexport const FinsembleLink: React.FC<FinsembleLinkProps> = ({ url, text }) => (\n\t<a\n\t\thref=\"\"\n\t\tonClick={(e) => {\n\t\t\te.preventDefault();\n\t\t\topenLink(url);\n\t\t}}\n\t>\n\t\t{text}\n\t</a>\n);\n"]}
|
|
@@ -3,8 +3,7 @@ import "./css/toggle.css";
|
|
|
3
3
|
export interface FinsembleToggleProps {
|
|
4
4
|
label?: string;
|
|
5
5
|
checked: boolean;
|
|
6
|
-
textToggle?: [onLabel: string, offLabel: string];
|
|
7
6
|
onChange: (selected: boolean) => void;
|
|
8
7
|
enabled?: boolean;
|
|
9
8
|
}
|
|
10
|
-
export declare const FinsembleToggle: ({ checked, onChange, label, enabled
|
|
9
|
+
export declare const FinsembleToggle: ({ checked, onChange, label, enabled }: FinsembleToggleProps) => JSX.Element;
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import React, { useEffect, useState } from "react";
|
|
2
2
|
import "./css/toggle.css";
|
|
3
3
|
import { FinsembleIcon } from "./FinsembleIcon";
|
|
4
|
-
export const FinsembleToggle = ({ checked, onChange, label, enabled = true
|
|
4
|
+
export const FinsembleToggle = ({ checked, onChange, label, enabled = true }) => {
|
|
5
5
|
const [selected, setSelected] = useState(checked);
|
|
6
6
|
function doSetSelected(newValue) {
|
|
7
7
|
onChange(newValue);
|
|
8
8
|
setSelected(newValue);
|
|
9
9
|
}
|
|
10
|
-
const [yesLabel, noLabel] = textToggle !== null && textToggle !== void 0 ? textToggle : [];
|
|
11
10
|
useEffect(() => {
|
|
12
11
|
setSelected(checked);
|
|
13
12
|
}, [checked]);
|
|
@@ -16,10 +15,7 @@ export const FinsembleToggle = ({ checked, onChange, label, enabled = true, text
|
|
|
16
15
|
selected ? "finsembleToggle-on" : "finsembleToggle-off",
|
|
17
16
|
!enabled ? "disabled" : "",
|
|
18
17
|
].join(" ") },
|
|
19
|
-
|
|
20
|
-
textToggle && (React.createElement("span", { className: "toggle-text-label-wrapper" },
|
|
21
|
-
React.createElement("span", { className: "toggle-text-label toggle-text-label_on" }, yesLabel),
|
|
22
|
-
React.createElement("span", { className: "toggle-text-label toggle-text-label_off" }, noLabel))),
|
|
18
|
+
React.createElement(FinsembleIcon, { className: "finsembleToggle-icon", icon: selected ? "toggle-on" : "toggle-off" }),
|
|
23
19
|
React.createElement("input", Object.assign({ type: "checkbox", onChange: (e) => {
|
|
24
20
|
doSetSelected(e.target.checked);
|
|
25
21
|
}, checked: selected, disabled: !enabled }, (label ? { "aria-label": label } : "")))));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FinsembleToggle.js","sourceRoot":"","sources":["../../../src/components/common/FinsembleToggle.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,kBAAkB,CAAC;AAC1B,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"FinsembleToggle.js","sourceRoot":"","sources":["../../../src/components/common/FinsembleToggle.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,kBAAkB,CAAC;AAC1B,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAShD,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,GAAG,IAAI,EAAwB,EAAE,EAAE;IACrG,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,QAAQ,CAAC,OAAO,CAAC,CAAC;IAElD,SAAS,aAAa,CAAC,QAAiB;QACvC,QAAQ,CAAC,QAAQ,CAAC,CAAC;QACnB,WAAW,CAAC,QAAQ,CAAC,CAAC;IACvB,CAAC;IAED,SAAS,CAAC,GAAG,EAAE;QACd,WAAW,CAAC,OAAO,CAAC,CAAC;IACtB,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC;IAEd,OAAO,CACN,8BACC,SAAS,EAAE;YACV,iBAAiB;YACjB,QAAQ,CAAC,CAAC,CAAC,oBAAoB,CAAC,CAAC,CAAC,qBAAqB;YACvD,CAAC,OAAO,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE;SAC1B,CAAC,IAAI,CAAC,GAAG,CAAC;QAEX,oBAAC,aAAa,IAAC,SAAS,EAAC,sBAAsB,EAAC,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,YAAY,GAAI;QAC/F,6CACC,IAAI,EAAC,UAAU,EACf,QAAQ,EAAE,CAAC,CAAC,EAAE,EAAE;gBACf,aAAa,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;YACjC,CAAC,EACD,OAAO,EAAE,QAAQ,EACjB,QAAQ,EAAE,CAAC,OAAO,IACd,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,YAAY,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EACzC,CACI,CACP,CAAC;AACH,CAAC,CAAC","sourcesContent":["import React, { useEffect, useState } from \"react\";\nimport \"./css/toggle.css\";\nimport { FinsembleIcon } from \"./FinsembleIcon\";\n\nexport interface FinsembleToggleProps {\n\tlabel?: string;\n\tchecked: boolean;\n\tonChange: (selected: boolean) => void;\n\tenabled?: boolean;\n}\n\nexport const FinsembleToggle = ({ checked, onChange, label, enabled = true }: FinsembleToggleProps) => {\n\tconst [selected, setSelected] = useState(checked);\n\n\tfunction doSetSelected(newValue: boolean) {\n\t\tonChange(newValue);\n\t\tsetSelected(newValue);\n\t}\n\n\tuseEffect(() => {\n\t\tsetSelected(checked);\n\t}, [checked]);\n\n\treturn (\n\t\t<span\n\t\t\tclassName={[\n\t\t\t\t\"finsembleToggle\",\n\t\t\t\tselected ? \"finsembleToggle-on\" : \"finsembleToggle-off\",\n\t\t\t\t!enabled ? \"disabled\" : \"\",\n\t\t\t].join(\" \")}\n\t\t>\n\t\t\t<FinsembleIcon className=\"finsembleToggle-icon\" icon={selected ? \"toggle-on\" : \"toggle-off\"} />\n\t\t\t<input\n\t\t\t\ttype=\"checkbox\"\n\t\t\t\tonChange={(e) => {\n\t\t\t\t\tdoSetSelected(e.target.checked);\n\t\t\t\t}}\n\t\t\t\tchecked={selected}\n\t\t\t\tdisabled={!enabled}\n\t\t\t\t{...(label ? { \"aria-label\": label } : \"\")}\n\t\t\t/>\n\t\t</span>\n\t);\n};\n"]}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import "./css/FinsembleToggle.css";
|
|
3
|
+
export interface FinsembleToggleButtonBarProps {
|
|
4
|
+
label?: string;
|
|
5
|
+
selected: any;
|
|
6
|
+
options: {
|
|
7
|
+
label: string | React.ReactChild;
|
|
8
|
+
value: any;
|
|
9
|
+
}[];
|
|
10
|
+
onChange: (newSelected: any) => void;
|
|
11
|
+
enabled?: boolean;
|
|
12
|
+
}
|
|
13
|
+
export declare const FinsembleToggleButtonBar: ({ selected, options, onChange, enabled, }: FinsembleToggleButtonBarProps) => JSX.Element;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import React, { useRef } from "react";
|
|
2
|
+
import "./css/FinsembleToggle.css";
|
|
3
|
+
export const FinsembleToggleButtonBar = ({ selected, options, onChange, enabled = true, }) => {
|
|
4
|
+
const buttonList = useRef(null);
|
|
5
|
+
const changeButton = (fromKey, direction) => {
|
|
6
|
+
var _a, _b;
|
|
7
|
+
const buttons = (_a = buttonList.current) === null || _a === void 0 ? void 0 : _a.querySelectorAll("[role='radio']");
|
|
8
|
+
if (buttons === undefined) {
|
|
9
|
+
return;
|
|
10
|
+
}
|
|
11
|
+
if (fromKey === buttons.length) {
|
|
12
|
+
return;
|
|
13
|
+
}
|
|
14
|
+
let newKey = fromKey + direction;
|
|
15
|
+
if (newKey < 0) {
|
|
16
|
+
newKey = buttons.length - 1;
|
|
17
|
+
}
|
|
18
|
+
else if (newKey >= buttons.length) {
|
|
19
|
+
newKey = 0;
|
|
20
|
+
}
|
|
21
|
+
(_b = buttons[fromKey + direction]) === null || _b === void 0 ? void 0 : _b.focus();
|
|
22
|
+
};
|
|
23
|
+
return (React.createElement("span", { className: "finsembleToggle" },
|
|
24
|
+
React.createElement("span", { className: "toggle-text-label-wrapper", role: "radiogroup", ref: buttonList }, options.map((option, key) => (React.createElement("span", { key: key, className: `toggle-text-label ${enabled ? "" : "disabled"}`, role: "radio", "aria-checked": selected === option.value, tabIndex: selected === option.value ? 0 : -1, onClick: () => {
|
|
25
|
+
enabled && onChange(option.value);
|
|
26
|
+
}, onKeyDown: (e) => {
|
|
27
|
+
switch (e.key) {
|
|
28
|
+
case "ArrowLeft": {
|
|
29
|
+
changeButton(key, -1);
|
|
30
|
+
break;
|
|
31
|
+
}
|
|
32
|
+
case "ArrowRight": {
|
|
33
|
+
changeButton(key, 1);
|
|
34
|
+
break;
|
|
35
|
+
}
|
|
36
|
+
case "Enter": {
|
|
37
|
+
enabled && onChange(option.value);
|
|
38
|
+
}
|
|
39
|
+
default: {
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
} }, option.label))))));
|
|
43
|
+
};
|
|
44
|
+
//# sourceMappingURL=FinsembleToggleButtonBar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FinsembleToggleButtonBar.js","sourceRoot":"","sources":["../../../src/components/common/FinsembleToggleButtonBar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,2BAA2B,CAAC;AAanC,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,EACxC,QAAQ,EACR,OAAO,EACP,QAAQ,EACR,OAAO,GAAG,IAAI,GACiB,EAAE,EAAE;IACnC,MAAM,UAAU,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAC;IAEhD,MAAM,Y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C,GAAG,EAAE;oBACd,KAAK,WAAW,CAAC,CAAC;wBACjB,YAAY,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC;wBACtB,MAAM;qBACN;oBACD,KAAK,YAAY,CAAC,CAAC;wBAClB,YAAY,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;wBACrB,MAAM;qBACN;oBACD,KAAK,OAAO,CAAC,CAAC;wBACb,OAAO,IAAI,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;qBAClC;oBACD,OAAO,CAAC,CAAC;qBACR;iBACD;YACF,CAAC,IAEA,MAAM,CAAC,KAAK,CACP,CACP,CAAC,CACI,CACD,CACP,CAAC;AACH,CAAC,CAAC","sourcesContent":["import React, { useRef } from \"react\";\nimport \"./css/FinsembleToggle.css\";\n\nexport interface FinsembleToggleButtonBarProps {\n\tlabel?: string;\n\tselected: any; // <T>\n\toptions: {\n\t\tlabel: string | React.ReactChild;\n\t\tvalue: any; // <T>\n\t}[];\n\tonChange: (newSelected: any /* <T> */) => void;\n\tenabled?: boolean;\n}\n\nexport const FinsembleToggleButtonBar = ({\n\tselected,\n\toptions,\n\tonChange,\n\tenabled = true,\n}: FinsembleToggleButtonBarProps) => {\n\tconst buttonList = useRef<HTMLDivElement>(null);\n\n\tconst changeButton = (fromKey: number, direction: 1 | -1) => {\n\t\tconst buttons = buttonList.current?.querySelectorAll(\"[role='radio']\") as NodeListOf<HTMLElement> | undefined;\n\t\tif (buttons === undefined) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (fromKey === buttons.length) {\n\t\t\treturn;\n\t\t}\n\n\t\tlet newKey = fromKey + direction;\n\t\tif (newKey < 0) {\n\t\t\tnewKey = buttons.length - 1;\n\t\t} else if (newKey >= buttons.length) {\n\t\t\tnewKey = 0;\n\t\t}\n\n\t\tbuttons[fromKey + direction]?.focus();\n\t};\n\n\treturn (\n\t\t<span className=\"finsembleToggle\">\n\t\t\t<span className=\"toggle-text-label-wrapper\" role=\"radiogroup\" ref={buttonList}>\n\t\t\t\t{options.map((option, key) => (\n\t\t\t\t\t<span\n\t\t\t\t\t\tkey={key}\n\t\t\t\t\t\tclassName={`toggle-text-label ${enabled ? \"\" : \"disabled\"}`}\n\t\t\t\t\t\trole=\"radio\"\n\t\t\t\t\t\taria-checked={selected === option.value}\n\t\t\t\t\t\ttabIndex={selected === option.value ? 0 : -1}\n\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\tenabled && onChange(option.value);\n\t\t\t\t\t\t}}\n\t\t\t\t\t\tonKeyDown={(e) => {\n\t\t\t\t\t\t\tswitch (e.key) {\n\t\t\t\t\t\t\t\tcase \"ArrowLeft\": {\n\t\t\t\t\t\t\t\t\tchangeButton(key, -1);\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tcase \"ArrowRight\": {\n\t\t\t\t\t\t\t\t\tchangeButton(key, 1);\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tcase \"Enter\": {\n\t\t\t\t\t\t\t\t\tenabled && onChange(option.value);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tdefault: {\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\t{option.label}\n\t\t\t\t\t</span>\n\t\t\t\t))}\n\t\t\t</span>\n\t\t</span>\n\t);\n};\n"]}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
/// <reference types="react" />
|
|
6
6
|
export declare type InputTableProps = {
|
|
7
7
|
tableHeaders: (string | JSX.Element)[];
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
setData: (data: string[][]) => void;
|
|
9
|
+
data: string[][];
|
|
10
10
|
};
|
|
11
|
-
export declare const InputTable: ({ tableHeaders,
|
|
11
|
+
export declare const InputTable: ({ tableHeaders, setData, data }: InputTableProps) => JSX.Element;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Copyright 2017 - 2020 by ChartIQ, Inc.
|
|
3
3
|
* All rights reserved.
|
|
4
4
|
*/
|
|
5
|
-
import React, {
|
|
5
|
+
import React, { useEffect } from "react";
|
|
6
6
|
import { ButtonIcon } from "./ButtonIcon";
|
|
7
7
|
const isLastRowEmpty = (arr) => {
|
|
8
8
|
const lastRow = arr[arr.length - 1];
|
|
@@ -14,24 +14,24 @@ const isLastRowEmpty = (arr) => {
|
|
|
14
14
|
};
|
|
15
15
|
const deepCopy = (obj) => JSON.parse(JSON.stringify(obj));
|
|
16
16
|
const emptyRow = (colCount) => Array(colCount).fill("").slice(0);
|
|
17
|
-
export const InputTable = ({ tableHeaders,
|
|
18
|
-
const [data, setData] = useState(startingData !== null && startingData !== void 0 ? startingData : [emptyRow(tableHeaders.length)]);
|
|
17
|
+
export const InputTable = ({ tableHeaders, setData, data }) => {
|
|
19
18
|
const rowCount = data.length;
|
|
20
|
-
const doSetData = (newData) => {
|
|
21
|
-
setData(newData);
|
|
22
|
-
onUpdate(newData);
|
|
23
|
-
};
|
|
24
19
|
const addRow = () => {
|
|
25
|
-
|
|
20
|
+
setData(data.concat([emptyRow(tableHeaders.length)]));
|
|
26
21
|
};
|
|
27
22
|
const deleteRow = (rowIndex) => {
|
|
28
23
|
const newData = data.splice(0);
|
|
29
24
|
newData.splice(rowIndex, 1);
|
|
30
|
-
|
|
25
|
+
setData(newData);
|
|
31
26
|
};
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
27
|
+
useEffect(() => {
|
|
28
|
+
if (data.length === 0) {
|
|
29
|
+
setData([emptyRow(tableHeaders.length)]);
|
|
30
|
+
}
|
|
31
|
+
if (!isLastRowEmpty(data)) {
|
|
32
|
+
addRow();
|
|
33
|
+
}
|
|
34
|
+
}, [data]);
|
|
35
35
|
return (React.createElement("table", { className: "inputTable" },
|
|
36
36
|
React.createElement("thead", null,
|
|
37
37
|
React.createElement("tr", null, tableHeaders.map((th, index) => (React.createElement("th", { scope: "col", key: `th-${index}` }, th))))),
|
|
@@ -40,7 +40,7 @@ export const InputTable = ({ tableHeaders, onUpdate, startingData }) => {
|
|
|
40
40
|
React.createElement("input", { type: "text", id: `input-${rowNumber}-${colNumber}`, value: td, onChange: (e) => {
|
|
41
41
|
const newData = deepCopy(data);
|
|
42
42
|
newData[rowNumber][colNumber] = e.target.value;
|
|
43
|
-
|
|
43
|
+
setData(newData);
|
|
44
44
|
} })))),
|
|
45
45
|
rowNumber < rowCount - 1 && (React.createElement("td", null,
|
|
46
46
|
React.createElement(ButtonIcon, { icon: "times", text: "Remove row", onClick: () => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputTable.js","sourceRoot":"","sources":["../../../src/components/common/InputTable.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,EAAE,
|
|
1
|
+
{"version":3,"file":"InputTable.js","sourceRoot":"","sources":["../../../src/components/common/InputTable.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAQ1C,MAAM,cAAc,GAAG,CAAC,GAAe,EAAE,EAAE;IAC1C,MAAM,OAAO,GAAG,GAAG,CAAC,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IACpC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE;QAC5B,OAAO,IAAI,CAAC;KACZ;IAED,MAAM,aAAa,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IAC9D,OAAO,aAAa,CAAC,MAAM,KAAK,CAAC,CAAC;AACnC,CAAC,CAAC;AAEF,MAAM,QAAQ,GAAG,CAAC,GAAQ,EAAE,EAAE,CAAC,IAAI,CAAC,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AE,IAChC,EAAE,CACC,CACL,CAAC,CACE,CACE;QACR,mCACE,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,SAAS,EAAE,EAAE,CAC5B,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CACpB,4BAAI,GAAG,EAAE,MAAM,SAAS,EAAE;YACxB,GAAG,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,SAAS,EAAE,EAAE,CAAC,CAC3B,4BAAI,GAAG,EAAE,MAAM,SAAS,IAAI,SAAS,EAAE;gBACtC,+BACC,IAAI,EAAC,MAAM,EACX,EAAE,EAAE,SAAS,SAAS,IAAI,SAAS,EAAE,EACrC,KAAK,EAAE,EAAE,EACT,QAAQ,EAAE,CAAC,CAAC,EAAE,EAAE;wBACf,MAAM,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC;wBAC/B,OAAO,CAAC,SAAS,CAAC,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC;wBAC/C,OAAO,CAAC,OAAO,CAAC,CAAC;oBAClB,CAAC,GACA,CACE,CACL,CAAC;YACD,SAAS,GAAG,QAAQ,GAAG,CAAC,IAAI,CAC5B;gBACC,oBAAC,UAAU,IACV,IAAI,EAAC,OAAO,EACZ,IAAI,EAAC,YAAY,EACjB,OAAO,EAAE,GAAG,EAAE;wBACb,SAAS,CAAC,SAAS,CAAC,CAAC;oBACtB,CAAC,GACA,CACE,CACL,CACG,CACL,CAAC,CAAC,CAAC,IAAI,CACR,CACM,CACD,CACR,CAAC;AACH,CAAC,CAAC","sourcesContent":["/*!\n * Copyright 2017 - 2020 by ChartIQ, Inc.\n * All rights reserved.\n */\n\nimport React, { useEffect } from \"react\";\nimport { ButtonIcon } from \"./ButtonIcon\";\n\nexport type InputTableProps = {\n\ttableHeaders: (string | JSX.Element)[];\n\tsetData: (data: string[][]) => void;\n\tdata: string[][];\n};\n\nconst isLastRowEmpty = (arr: String[][]) => {\n\tconst lastRow = arr[arr.length - 1];\n\tif (!Array.isArray(lastRow)) {\n\t\treturn true;\n\t}\n\n\tconst nonEmptyCells = lastRow.filter((str) => str.length > 0);\n\treturn nonEmptyCells.length === 0;\n};\n\nconst deepCopy = (obj: any) => JSON.parse(JSON.stringify(obj));\nconst emptyRow = (colCount: number) => Array(colCount).fill(\"\").slice(0);\n\n/***\n * A table full on input fields. It auto-grows as users use it, and it provides \"Remove row\" functionality.\n * The number of columns in the table is determined by the number of table headers provided, which are required.\n * @param {string|JSX} tableHeaders The headers at the top of each column\n * @param {Function} onUpdate Callback providing the data in the table. This is called onInput for any input element in the table.\n * @param {string[][]} [data] Initial data for the table\n */\nexport const InputTable = ({ tableHeaders, setData, data }: InputTableProps) => {\n\tconst rowCount = data.length;\n\n\tconst addRow = () => {\n\t\tsetData(data.concat([emptyRow(tableHeaders.length)]));\n\t};\n\n\tconst deleteRow = (rowIndex: number) => {\n\t\tconst newData = data.splice(0);\n\t\tnewData.splice(rowIndex, 1);\n\t\tsetData(newData);\n\t};\n\n\tuseEffect(() => {\n\t\tif (data.length === 0) {\n\t\t\tsetData([emptyRow(tableHeaders.length)]);\n\t\t}\n\t\tif (!isLastRowEmpty(data)) {\n\t\t\taddRow();\n\t\t}\n\t}, [data]);\n\n\treturn (\n\t\t<table className=\"inputTable\">\n\t\t\t<thead>\n\t\t\t\t<tr>\n\t\t\t\t\t{tableHeaders.map((th, index) => (\n\t\t\t\t\t\t<th scope=\"col\" key={`th-${index}`}>\n\t\t\t\t\t\t\t{th}\n\t\t\t\t\t\t</th>\n\t\t\t\t\t))}\n\t\t\t\t</tr>\n\t\t\t</thead>\n\t\t\t<tbody>\n\t\t\t\t{data.map((row, rowNumber) =>\n\t\t\t\t\tArray.isArray(row) ? (\n\t\t\t\t\t\t<tr key={`tr-${rowNumber}`}>\n\t\t\t\t\t\t\t{row.map((td, colNumber) => (\n\t\t\t\t\t\t\t\t<td key={`td-${rowNumber}-${colNumber}`}>\n\t\t\t\t\t\t\t\t\t<input\n\t\t\t\t\t\t\t\t\t\ttype=\"text\"\n\t\t\t\t\t\t\t\t\t\tid={`input-${rowNumber}-${colNumber}`}\n\t\t\t\t\t\t\t\t\t\tvalue={td}\n\t\t\t\t\t\t\t\t\t\tonChange={(e) => {\n\t\t\t\t\t\t\t\t\t\t\tconst newData = deepCopy(data);\n\t\t\t\t\t\t\t\t\t\t\tnewData[rowNumber][colNumber] = e.target.value;\n\t\t\t\t\t\t\t\t\t\t\tsetData(newData);\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t{rowNumber < rowCount - 1 && (\n\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\t<ButtonIcon\n\t\t\t\t\t\t\t\t\t\ticon=\"times\"\n\t\t\t\t\t\t\t\t\t\ttext=\"Remove row\"\n\t\t\t\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\t\t\t\tdeleteRow(rowNumber);\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t) : null\n\t\t\t\t)}\n\t\t\t</tbody>\n\t\t</table>\n\t);\n};\n"]}
|
|
@@ -7,21 +7,49 @@ import "./css/tab.css";
|
|
|
7
7
|
export const Tab = ({ children, autofocus }) => {
|
|
8
8
|
const [selectedTab, setSelectedTab] = useState(autofocus || 0);
|
|
9
9
|
const ref = useRef(null);
|
|
10
|
+
const tabList = useRef(null);
|
|
10
11
|
useLayoutEffect(() => {
|
|
11
12
|
var _a;
|
|
12
13
|
if (ref.current !== null) {
|
|
13
14
|
ref.current.style.height = `${window.innerHeight - (((_a = ref.current.getBoundingClientRect()) === null || _a === void 0 ? void 0 : _a.top) || 0) - 10}px`;
|
|
14
15
|
}
|
|
15
16
|
});
|
|
17
|
+
const changeTab = (fromKey, direction) => {
|
|
18
|
+
var _a, _b;
|
|
19
|
+
const tabReferences = (_a = tabList.current) === null || _a === void 0 ? void 0 : _a.querySelectorAll("[role='tab']");
|
|
20
|
+
if (tabReferences === undefined) {
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
if (fromKey === tabReferences.length) {
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
(_b = tabReferences[fromKey + direction]) === null || _b === void 0 ? void 0 : _b.focus();
|
|
27
|
+
};
|
|
16
28
|
return (React.createElement(React.Fragment, null,
|
|
17
|
-
React.createElement("div", { role: "tablist" }, React.Children.map(children, (tab, key) => React.isValidElement(tab) && (React.createElement("div", { key: `tab-${key}`, role: "tab", "aria-selected": selectedTab === key, "aria-controls": `tabpanel-${key}`, tabIndex: 0, onKeyDown: (e) => {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
29
|
+
React.createElement("div", { className: "horizontal-tabs", role: "tablist", ref: tabList }, React.Children.map(children, (tab, key) => React.isValidElement(tab) && (React.createElement("div", { key: `tab-${key}`, role: "tab", "aria-selected": selectedTab === key, "aria-controls": `tabpanel-${key}`, tabIndex: selectedTab === key ? 0 : -1, onKeyDown: (e) => {
|
|
30
|
+
switch (e.key) {
|
|
31
|
+
case "Enter":
|
|
32
|
+
case " ": {
|
|
33
|
+
setSelectedTab(key);
|
|
34
|
+
e.preventDefault();
|
|
35
|
+
break;
|
|
36
|
+
}
|
|
37
|
+
case "ArrowRight": {
|
|
38
|
+
changeTab(key, 1);
|
|
39
|
+
e.preventDefault();
|
|
40
|
+
break;
|
|
41
|
+
}
|
|
42
|
+
case "ArrowLeft": {
|
|
43
|
+
changeTab(key, -1);
|
|
44
|
+
e.preventDefault();
|
|
45
|
+
break;
|
|
46
|
+
}
|
|
47
|
+
default: {
|
|
48
|
+
}
|
|
21
49
|
}
|
|
22
50
|
}, onClick: () => {
|
|
23
51
|
setSelectedTab(key);
|
|
24
52
|
} }, tab.props["data-label"])))),
|
|
25
|
-
React.createElement("div", { id: "tabpanelContainer", ref: ref }, React.Children.map(children, (tab, key) => (React.createElement("div", { key: `tabpanel-${key}`, role: "tabpanel", id: `tabpanel-${key}`, className: selectedTab === key ? "visible" : "" }, tab))))));
|
|
53
|
+
React.createElement("div", { className: "horizontal-tabs", id: "tabpanelContainer", ref: ref }, React.Children.map(children, (tab, key) => (React.createElement("div", { key: `tabpanel-${key}`, role: "tabpanel", id: `tabpanel-${key}`, className: selectedTab === key ? "visible" : "" }, tab))))));
|
|
26
54
|
};
|
|
27
55
|
//# sourceMappingURL=Tab.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tab.js","sourceRoot":"","sources":["../../../src/components/common/Tab.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,eAAe,EAAmC,MAAM,OAAO,CAAC;AAClG,OAAO,eAAe,CAAC;AAOvB,MAAM,CAAC,MAAM,GAAG,GAAgC,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,EAAE;IAC3E,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,QAAQ,CAAC,SAAS,IAAI,CAAC,CAAC,CAAC;IAC/D,MAAM,GAAG,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"Tab.js","sourceRoot":"","sources":["../../../src/components/common/Tab.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,eAAe,EAAmC,MAAM,OAAO,CAAC;AAClG,OAAO,eAAe,CAAC;AAOvB,MAAM,CAAC,MAAM,GAAG,GAAgC,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,EAAE;IAC3E,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,QAAQ,CAAC,SAAS,IAAI,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,CAAC,CAAC,EACtC,SAAS,EAAE,CAAC,CAAC,EAAE,EAAE;gBAChB,QAAQ,CAAC,CAAC,GAAG,EAAE;oBACd,KAAK,OAAO,CAAC;oBACb,KAAK,GAAG,CAAC,CAAC;wBACT,cAAc,CAAC,GAAG,CAAC,CAAC;wBACpB,CAAC,CAAC,cAAc,EAAE,CAAC;wBACnB,MAAM;qBACN;oBACD,KAAK,YAAY,CAAC,CAAC;wBAClB,SAAS,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;wBAClB,CAAC,CAAC,cAAc,EAAE,CAAC;wBACnB,MAAM;qBACN;oBACD,KAAK,WAAW,CAAC,CAAC;wBACjB,SAAS,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC;wBACnB,CAAC,CAAC,cAAc,EAAE,CAAC;wBACnB,MAAM;qBACN;oBACD,OAAO,CAAC,CAAC;qBACR;iBACD;YACF,CAAC,EACD,OAAO,EAAE,GAAG,EAAE;gBACb,cAAc,CAAC,GAAG,CAAC,CAAC;YACrB,CAAC,IAEC,GAAoB,CAAC,KAAK,CAAC,YAAY,CAAC,CACrC,CACN,CACF,CACI;QAEN,6BAAK,SAAS,EAAC,iBAAiB,EAAC,EAAE,EAAC,mBAAmB,EAAC,GAAG,EAAE,GAAG,IAC9D,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE,CAAC,CAC3C,6BACC,GAAG,EAAE,YAAY,GAAG,EAAE,EACtB,IAAI,EAAC,UAAU,EACf,EAAE,EAAE,YAAY,GAAG,EAAE,EACrB,SAAS,EAAE,WAAW,KAAK,GAAG,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,IAE9C,GAAG,CACC,CACN,CAAC,CACG,CACJ,CACH,CAAC;AACH,CAAC,CAAC","sourcesContent":["/*!\n * Copyright 2017 - 2020 by ChartIQ, Inc.\n * All rights reserved.\n */\n\nimport React, { useState, useRef, useLayoutEffect, FunctionComponent, ReactElement } from \"react\";\nimport \"./css/tab.css\";\n\nexport type TabProps = {\n\tchildren?: React.ReactNode;\n\tautofocus?: number;\n};\n\nexport const Tab: FunctionComponent<TabProps> = ({ children, autofocus }) => {\n\tconst [selectedTab, setSelectedTab] = useState(autofocus || 0);\n\tconst ref = useRef<HTMLDivElement>(null);\n\tconst tabList = useRef<HTMLDivElement>(null);\n\n\tuseLayoutEffect(() => {\n\t\t// Allow for the tab panel content to look nice with its own scrollbar,\n\t\t// which also keeps the heading/tab group at the top of the page.\n\t\t// It feels like css flex should do this, but I could never get it to work.\n\t\tif (ref.current !== null) {\n\t\t\tref.current.style.height = `${window.innerHeight - (ref.current.getBoundingClientRect()?.top || 0) - 10}px`;\n\t\t}\n\t});\n\n\tconst changeTab = (fromKey: number, direction: 1 | -1) => {\n\t\tconst tabReferences = tabList.current?.querySelectorAll(\"[role='tab']\") as NodeListOf<HTMLElement> | undefined;\n\t\tif (tabReferences === undefined) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (fromKey === tabReferences.length) {\n\t\t\treturn;\n\t\t}\n\n\t\ttabReferences[fromKey + direction]?.focus();\n\t};\n\n\treturn (\n\t\t<>\n\t\t\t<div className=\"horizontal-tabs\" role=\"tablist\" ref={tabList}>\n\t\t\t\t{React.Children.map(\n\t\t\t\t\tchildren,\n\t\t\t\t\t(tab, key) =>\n\t\t\t\t\t\tReact.isValidElement(tab) && (\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\tkey={`tab-${key}`}\n\t\t\t\t\t\t\t\trole=\"tab\"\n\t\t\t\t\t\t\t\taria-selected={selectedTab === key}\n\t\t\t\t\t\t\t\taria-controls={`tabpanel-${key}`}\n\t\t\t\t\t\t\t\ttabIndex={selectedTab === key ? 0 : -1}\n\t\t\t\t\t\t\t\tonKeyDown={(e) => {\n\t\t\t\t\t\t\t\t\tswitch (e.key) {\n\t\t\t\t\t\t\t\t\t\tcase \"Enter\":\n\t\t\t\t\t\t\t\t\t\tcase \" \": {\n\t\t\t\t\t\t\t\t\t\t\tsetSelectedTab(key);\n\t\t\t\t\t\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tcase \"ArrowRight\": {\n\t\t\t\t\t\t\t\t\t\t\tchangeTab(key, 1);\n\t\t\t\t\t\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tcase \"ArrowLeft\": {\n\t\t\t\t\t\t\t\t\t\t\tchangeTab(key, -1);\n\t\t\t\t\t\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tdefault: {\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\t\tsetSelectedTab(key);\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{(tab as ReactElement).props[\"data-label\"]}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t)\n\t\t\t\t)}\n\t\t\t</div>\n\n\t\t\t<div className=\"horizontal-tabs\" id=\"tabpanelContainer\" ref={ref}>\n\t\t\t\t{React.Children.map(children, (tab, key) => (\n\t\t\t\t\t<div\n\t\t\t\t\t\tkey={`tabpanel-${key}`}\n\t\t\t\t\t\trole=\"tabpanel\"\n\t\t\t\t\t\tid={`tabpanel-${key}`}\n\t\t\t\t\t\tclassName={selectedTab === key ? \"visible\" : \"\"}\n\t\t\t\t\t>\n\t\t\t\t\t\t{tab}\n\t\t\t\t\t</div>\n\t\t\t\t))}\n\t\t\t</div>\n\t\t</>\n\t);\n};\n"]}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
.finsembleToggle {
|
|
2
|
+
background-color: var(--core-primary);
|
|
3
|
+
padding: 4px;
|
|
4
|
+
border-radius: 5px;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.finsembleToggle .toggle-text-label.disabled {
|
|
8
|
+
opacity: 0.5;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.finsembleToggle .toggle-text-label {
|
|
12
|
+
border-radius: 5px;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.finsembleToggle .toggle-text-label[aria-checked="true"] {
|
|
16
|
+
background-color: var(--accent-primary-1);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.finsembleToggle .toggle-text-label[aria-checked="false"]:focus,
|
|
20
|
+
.finsembleToggle .toggle-text-label[aria-checked="false"]:hover {
|
|
21
|
+
background-color: var(--core-primary-3);
|
|
22
|
+
}
|
|
@@ -8,15 +8,23 @@
|
|
|
8
8
|
height: 100%;
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
-
.app-edit-actions
|
|
11
|
+
.app-edit-actions,
|
|
12
|
+
.app-edit-actions-right {
|
|
12
13
|
display: flex;
|
|
13
|
-
justify-content: space-between;
|
|
14
14
|
margin-top: 0.65em;
|
|
15
15
|
margin-bottom: 0.65em;
|
|
16
16
|
margin-left: 22px;
|
|
17
17
|
margin-right: 3em;
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
+
.app-edit-actions {
|
|
21
|
+
justify-content: space-between;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.app-edit-actions-right {
|
|
25
|
+
justify-content: flex-end;
|
|
26
|
+
}
|
|
27
|
+
|
|
20
28
|
.app-actions-right-wrapper {
|
|
21
29
|
width: 125px;
|
|
22
30
|
display: flex;
|
|
@@ -3,18 +3,18 @@
|
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
}
|
|
5
5
|
|
|
6
|
-
[role="tab"]:hover,
|
|
7
|
-
[role="tab"]:focus:not([aria-selected="true"]) {
|
|
6
|
+
.horizontal-tabs [role="tab"]:hover,
|
|
7
|
+
.horizontal-tabs [role="tab"]:focus:not([aria-selected="true"]) {
|
|
8
8
|
border-bottom: solid 3px #36788b;
|
|
9
9
|
margin-bottom: -3px;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
[role="tablist"] {
|
|
12
|
+
.horizontal-tabs[role="tablist"] {
|
|
13
13
|
width: 100px;
|
|
14
14
|
padding-bottom: 20px;
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
[role="tab"] {
|
|
17
|
+
.horizontal-tabs [role="tab"] {
|
|
18
18
|
display: inline;
|
|
19
19
|
width: fit-content;
|
|
20
20
|
height: 22px;
|
|
@@ -30,16 +30,16 @@
|
|
|
30
30
|
transition: border-bottom 0.2s ease-in;
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
-
[role="tab"][aria-selected="true"] {
|
|
33
|
+
.horizontal-tabs [role="tab"][aria-selected="true"] {
|
|
34
34
|
border-bottom: solid 3px #902e57;
|
|
35
35
|
margin-bottom: -3px;
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
[role="tab"]:first-child {
|
|
38
|
+
.horizontal-tabs [role="tab"]:first-child {
|
|
39
39
|
margin-top: 0px;
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
-
[role="tabpanel"] {
|
|
42
|
+
.horizontal-tabs [role="tabpanel"] {
|
|
43
43
|
padding-left: 5px;
|
|
44
44
|
overflow-y: scroll;
|
|
45
45
|
overflow-x: hidden;
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
transition: visibility 0s, opacity 0.5s linear;
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
-
.visible {
|
|
52
|
+
.horizontal-tabs [role="tabpanel"].visible {
|
|
53
53
|
visibility: visible;
|
|
54
54
|
opacity: 1;
|
|
55
55
|
height: 100%;
|
|
@@ -31,19 +31,11 @@
|
|
|
31
31
|
border-radius: 2px;
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
.finsembleToggle
|
|
34
|
+
.finsembleToggle .toggle-text-label[aria-selected="true"] {
|
|
35
35
|
background-color: #0a8cf4;
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
.finsembleToggle
|
|
39
|
-
background-color: #0a8cf4;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
.finsembleToggle-on:hover .toggle-text-label_off {
|
|
43
|
-
background-color: #3d4455;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
.finsembleToggle-off:hover .toggle-text-label_on {
|
|
38
|
+
.finsembleToggle .toggle-text-label[aria-selected="false"]:hover {
|
|
47
39
|
background-color: #3d4455;
|
|
48
40
|
}
|
|
49
41
|
|
|
@@ -24,8 +24,13 @@ export const initFSBL = (windowObject) => {
|
|
|
24
24
|
addEventListener: (name, callback) => {
|
|
25
25
|
callback();
|
|
26
26
|
},
|
|
27
|
+
getFSBLInfo: () => new Promise((resolve) => {
|
|
28
|
+
resolve({
|
|
29
|
+
FSBLVersion: "1.0.0",
|
|
30
|
+
});
|
|
31
|
+
}),
|
|
27
32
|
Clients: {
|
|
28
|
-
|
|
33
|
+
TmpSmartDesktopClient: {
|
|
29
34
|
checkValidURL(url) {
|
|
30
35
|
if (url.length === 0) {
|
|
31
36
|
return true;
|