@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
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@finsemble/finsemble-ui",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "7.0.0-beta.2",
|
|
4
4
|
"description": "Ready-made React components to give you a head-start building your SmartDesktop.",
|
|
5
5
|
"types": "index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
"scripts": {
|
|
11
11
|
"build": "yarn clean && yarn copy-css && tsc",
|
|
12
12
|
"do-audit": " improved-yarn-audit --min-severity high",
|
|
13
|
+
"depcheck": "depcheck",
|
|
13
14
|
"clean": "rimraf ./react & rimraf coverage",
|
|
14
15
|
"copy-css": "copyfiles -u 1 \"./src/assets/**/*\" react/ && copyfiles -u 1 \"src/**/*.css\" \"react/\"",
|
|
15
16
|
"dev": "yarn copy-css && yarn watch",
|
|
@@ -27,26 +28,22 @@
|
|
|
27
28
|
"build-storybook": "build-storybook"
|
|
28
29
|
},
|
|
29
30
|
"dependencies": {
|
|
30
|
-
"@finsemble/finsemble-api": "
|
|
31
|
+
"@finsemble/finsemble-api": "7.0.0-beta.2",
|
|
31
32
|
"@q42/floating-focus-a11y": "^1.3.3",
|
|
32
33
|
"@reduxjs/toolkit": "^1.5.0",
|
|
33
34
|
"@svgr/webpack": "^5.5.0",
|
|
34
35
|
"@types/async": "3.2.12",
|
|
35
36
|
"@types/chai": "4.3.0",
|
|
36
|
-
"@types/lodash": "4.14.
|
|
37
|
-
"@types/mime-types": "^2.1.0",
|
|
37
|
+
"@types/lodash": "4.14.181",
|
|
38
38
|
"@types/mocha": "9.1.0",
|
|
39
|
-
"@types/react": "17.0.
|
|
40
|
-
"@types/react-dom": "17.0.
|
|
41
|
-
"@types/react-
|
|
42
|
-
"@types/react-redux": "7.1.22",
|
|
39
|
+
"@types/react": "17.0.43",
|
|
40
|
+
"@types/react-dom": "17.0.14",
|
|
41
|
+
"@types/react-redux": "7.1.23",
|
|
43
42
|
"@types/react-relative-portal": "^1.8.1",
|
|
44
|
-
"@types/react-syntax-highlighter": "13.5.2",
|
|
45
43
|
"async": "3.2.3",
|
|
46
44
|
"date-fns": "^2.25.0",
|
|
47
45
|
"immer": "9.0.12",
|
|
48
46
|
"lodash": "4.17.21",
|
|
49
|
-
"prop-types": "15.8.1",
|
|
50
47
|
"react-circular-progressbar": "^2.0.3",
|
|
51
48
|
"react-redux": "7.2.6",
|
|
52
49
|
"react-relative-portal": "^1.8.0",
|
|
@@ -61,14 +58,13 @@
|
|
|
61
58
|
"react-dom": "17.0.2"
|
|
62
59
|
},
|
|
63
60
|
"devDependencies": {
|
|
64
|
-
"@babel/plugin-proposal-private-methods": "7.16.7",
|
|
65
61
|
"@babel/preset-env": "^7.16.0",
|
|
66
62
|
"@babel/preset-react": "^7.12.10",
|
|
67
63
|
"@babel/register": "^7.16.0",
|
|
68
|
-
"@storybook/addon-actions": "6.4.
|
|
64
|
+
"@storybook/addon-actions": "6.4.19",
|
|
69
65
|
"@storybook/addon-essentials": "6.4.19",
|
|
70
|
-
"@storybook/addon-links": "6.4.
|
|
71
|
-
"@storybook/react": "6.4.
|
|
66
|
+
"@storybook/addon-links": "6.4.19",
|
|
67
|
+
"@storybook/react": "6.4.19",
|
|
72
68
|
"@types/enzyme": "^3.10.8",
|
|
73
69
|
"@types/react-syntax-highlighter": "13.5.2",
|
|
74
70
|
"@types/react-transition-group": "4.4.4",
|
|
@@ -76,40 +72,30 @@
|
|
|
76
72
|
"@wojtekmaj/enzyme-adapter-react-17": "^0.6.2",
|
|
77
73
|
"axe-core": "^4.2.3",
|
|
78
74
|
"babel-loader": "^8.2.2",
|
|
79
|
-
"canvas": "^2.
|
|
80
|
-
"chai": "4.3.
|
|
75
|
+
"canvas": "^2.9.0",
|
|
76
|
+
"chai": "4.3.6",
|
|
81
77
|
"chokidar-cli": "3.0.0",
|
|
82
78
|
"concurrently": "7.0.0",
|
|
83
79
|
"copyfiles": "2.4.1",
|
|
84
80
|
"core-js": "^3.15.2",
|
|
81
|
+
"depcheck": "^1.4.3",
|
|
85
82
|
"enzyme": "^3.11.0",
|
|
86
83
|
"ignore-styles": "^5.0.1",
|
|
87
84
|
"improved-yarn-audit": "^3.0.0",
|
|
88
85
|
"jsdom": "^19.0.0",
|
|
89
|
-
"
|
|
90
|
-
"mocha": "9.1.3",
|
|
86
|
+
"mocha": "9.2.2",
|
|
91
87
|
"nyc": "15.1.0",
|
|
92
88
|
"react": "17.0.2",
|
|
93
89
|
"react-dom": "17.0.2",
|
|
94
90
|
"rimraf": "3.0.2",
|
|
95
|
-
"sinon": "^
|
|
96
|
-
"ts-loader": "^9.2.3",
|
|
91
|
+
"sinon": "^13.0.1",
|
|
97
92
|
"ts-mocha": "9.0.2",
|
|
98
93
|
"typescript": "4.5.5"
|
|
99
94
|
},
|
|
100
95
|
"resolutions": {
|
|
101
|
-
"
|
|
102
|
-
"
|
|
103
|
-
"trim": "0.0.3"
|
|
104
|
-
"css-what": "5.0.1",
|
|
105
|
-
"prismjs": "1.24.0",
|
|
106
|
-
"tar": "6.1.9",
|
|
107
|
-
"set-value": "^4.0.1",
|
|
108
|
-
"glob-parent": "^5.1.2",
|
|
109
|
-
"immer": "^9.0.6",
|
|
110
|
-
"coa": "2.0.2",
|
|
111
|
-
"node-fetch": "2.6.7",
|
|
112
|
-
"simple-get": "^4.0.1"
|
|
96
|
+
"glob-parent": "~5.1.2",
|
|
97
|
+
"prismjs": "~1.27.0",
|
|
98
|
+
"trim": "~0.0.3"
|
|
113
99
|
},
|
|
114
100
|
"repository": {
|
|
115
101
|
"type": "git",
|
|
@@ -13,13 +13,6 @@
|
|
|
13
13
|
white-space: nowrap;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
/*
|
|
17
|
-
.favorite-maker {
|
|
18
|
-
position: absolute;
|
|
19
|
-
right: 0;
|
|
20
|
-
}
|
|
21
|
-
*/
|
|
22
|
-
|
|
23
16
|
.rearrange-region div {
|
|
24
17
|
cursor: pointer;
|
|
25
18
|
}
|
|
@@ -52,46 +45,6 @@
|
|
|
52
45
|
filter: alpha(opacity=20);
|
|
53
46
|
}
|
|
54
47
|
|
|
55
|
-
.chevron-container {
|
|
56
|
-
display: flex;
|
|
57
|
-
align-items: center;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
.scroll-button {
|
|
61
|
-
color: var(--toolbar-scroll-button-color);
|
|
62
|
-
margin: 8px 3px;
|
|
63
|
-
padding: 5px;
|
|
64
|
-
font-size: 10px;
|
|
65
|
-
border: 1px solid transparent;
|
|
66
|
-
border-radius: 50px;
|
|
67
|
-
height: 10px;
|
|
68
|
-
display: flex;
|
|
69
|
-
align-items: center;
|
|
70
|
-
justify-content: center;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
.ff-chevron-left:before {
|
|
74
|
-
padding-right: 2px;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
.ff-chevron-right:before {
|
|
78
|
-
padding-left: 2px;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
.scroll-button:hover {
|
|
82
|
-
background: var(--toolbar-button-hover-color);
|
|
83
|
-
cursor: pointer;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
.greyedOut {
|
|
87
|
-
opacity: 0.3;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
.greyedOut:hover {
|
|
91
|
-
background: transparent;
|
|
92
|
-
cursor: default;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
48
|
#favoritesContainer {
|
|
96
49
|
overflow: hidden;
|
|
97
50
|
display: flex;
|
|
@@ -95,6 +95,18 @@ body .linkerContainer {
|
|
|
95
95
|
border: 1px solid #f29a01;
|
|
96
96
|
}
|
|
97
97
|
|
|
98
|
+
.channel7 .linker-glyph,
|
|
99
|
+
.linker-group.channel7 {
|
|
100
|
+
background-color: #3c1d5f;
|
|
101
|
+
border: 1px solid #341853;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.channel8 .linker-glyph,
|
|
105
|
+
.linker-group.channel8 {
|
|
106
|
+
background-color: #690f2d;
|
|
107
|
+
border: 1px solid #5c0d27;
|
|
108
|
+
}
|
|
109
|
+
|
|
98
110
|
/* To reduce the number of channels in the linker simply hide them with CSS!
|
|
99
111
|
.channel6, .channel5 {
|
|
100
112
|
display: none;
|
|
@@ -113,7 +125,7 @@ body .linkerContainer {
|
|
|
113
125
|
display: block;
|
|
114
126
|
visibility: visible;
|
|
115
127
|
top: -10px;
|
|
116
|
-
position: relative;
|
|
128
|
+
position: relative;
|
|
117
129
|
}
|
|
118
130
|
*/
|
|
119
131
|
|
|
@@ -80,8 +80,8 @@ html.menu-portal body.menu-no-scroll {
|
|
|
80
80
|
The "focused" attribute is set during keyboard navigation.
|
|
81
81
|
*/
|
|
82
82
|
|
|
83
|
-
.menu-item
|
|
84
|
-
.menu-item-icon
|
|
83
|
+
.menu-item:focus,
|
|
84
|
+
.menu-item-icon:focus,
|
|
85
85
|
.menu-item:hover,
|
|
86
86
|
.menu-item:focus,
|
|
87
87
|
.finsemble-toolbar-button:hover {
|
|
@@ -113,7 +113,11 @@ body.notifications-center-body.notifications-popped-in {
|
|
|
113
113
|
display: flex;
|
|
114
114
|
flex-direction: row;
|
|
115
115
|
width: 100%;
|
|
116
|
-
padding:
|
|
116
|
+
padding: 5px 0;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.notifications-center-controls__row.center {
|
|
120
|
+
justify-content: center;
|
|
117
121
|
}
|
|
118
122
|
|
|
119
123
|
.notifications-center-controls__filter-btn {
|
|
@@ -128,6 +132,7 @@ body.notifications-center-body.notifications-popped-in {
|
|
|
128
132
|
padding: 0px 7px;
|
|
129
133
|
margin: 0 3px;
|
|
130
134
|
cursor: pointer;
|
|
135
|
+
white-space: nowrap;
|
|
131
136
|
}
|
|
132
137
|
|
|
133
138
|
.notifications-center-controls__filter-btn.active {
|
|
@@ -595,3 +600,29 @@ body.notifications-toasts-body {
|
|
|
595
600
|
.notifications-toast-exit-active {
|
|
596
601
|
animation: slide-out-right-opaque 0.5s cubic-bezier(0.55, 0.085, 0.68, 0.53) both;
|
|
597
602
|
}
|
|
603
|
+
|
|
604
|
+
.notifications-center-controls__filter-btn i {
|
|
605
|
+
padding-right: 5px;
|
|
606
|
+
}
|
|
607
|
+
|
|
608
|
+
.notifications-center-controls__filter-btn i.icon_active {
|
|
609
|
+
color: var(--accent-positive);
|
|
610
|
+
}
|
|
611
|
+
|
|
612
|
+
.visible {
|
|
613
|
+
display: flex;
|
|
614
|
+
}
|
|
615
|
+
|
|
616
|
+
.invisible {
|
|
617
|
+
display: none;
|
|
618
|
+
}
|
|
619
|
+
|
|
620
|
+
.enabled {
|
|
621
|
+
cursor: pointer;
|
|
622
|
+
opacity: 1;
|
|
623
|
+
}
|
|
624
|
+
|
|
625
|
+
.disabled {
|
|
626
|
+
cursor: default;
|
|
627
|
+
opacity: 0.4;
|
|
628
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/* chverons */
|
|
2
|
+
.chevron-container {
|
|
3
|
+
display: flex;
|
|
4
|
+
align-items: center;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.ff-chevron-left:before {
|
|
8
|
+
padding-right: 2px;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.ff-chevron-right:before {
|
|
12
|
+
padding-left: 2px;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.scroll-button {
|
|
16
|
+
color: var(--toolbar-scroll-button-color);
|
|
17
|
+
margin: 8px 3px;
|
|
18
|
+
padding: 5px;
|
|
19
|
+
font-size: 10px;
|
|
20
|
+
border: 1px solid transparent;
|
|
21
|
+
border-radius: 50px;
|
|
22
|
+
height: 10px;
|
|
23
|
+
display: flex;
|
|
24
|
+
align-items: center;
|
|
25
|
+
justify-content: center;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.scroll-button:hover {
|
|
29
|
+
background: var(--toolbar-button-hover-color);
|
|
30
|
+
cursor: pointer;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.greyedOut {
|
|
34
|
+
opacity: 0.3;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.greyedOut:hover {
|
|
38
|
+
background: transparent;
|
|
39
|
+
cursor: default;
|
|
40
|
+
}
|
|
@@ -44,11 +44,11 @@ img {
|
|
|
44
44
|
flex-direction: column;
|
|
45
45
|
justify-content: start;
|
|
46
46
|
color: var(--content-font-color);
|
|
47
|
-
background-color: var(--
|
|
47
|
+
background-color: var(--core-primary-1);
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
.complex-menu-left-nav-header {
|
|
51
|
-
background-color: var(--
|
|
51
|
+
background-color: var(--core-primary-1);
|
|
52
52
|
font-weight: var(--content-nav-header-font-weight);
|
|
53
53
|
font-size: var(--content-nav-header-font-size);
|
|
54
54
|
margin-bottom: 30px;
|
|
@@ -125,13 +125,14 @@ img {
|
|
|
125
125
|
align-items: center;
|
|
126
126
|
}
|
|
127
127
|
|
|
128
|
-
.complex-menu-section-toggle:hover
|
|
128
|
+
.complex-menu-section-toggle:hover,
|
|
129
|
+
.complex-menu-section-toggle:focus {
|
|
129
130
|
cursor: pointer;
|
|
130
|
-
background-color: var(--
|
|
131
|
+
background-color: var(--accent-primary);
|
|
131
132
|
}
|
|
132
133
|
|
|
133
134
|
.active-section-toggle {
|
|
134
|
-
background-color: var(--
|
|
135
|
+
background-color: var(--accent-primary-1);
|
|
135
136
|
}
|
|
136
137
|
|
|
137
138
|
.complex-menu-content-row {
|
|
@@ -139,7 +140,7 @@ img {
|
|
|
139
140
|
padding: 0.75em;
|
|
140
141
|
align-content: flex-start;
|
|
141
142
|
user-select: none;
|
|
142
|
-
background-color: var(--
|
|
143
|
+
background-color: var(--core-primary-2);
|
|
143
144
|
overflow: auto;
|
|
144
145
|
}
|
|
145
146
|
|
|
@@ -188,7 +189,7 @@ img {
|
|
|
188
189
|
}
|
|
189
190
|
|
|
190
191
|
.workspace-item:hover {
|
|
191
|
-
background-color: var(--
|
|
192
|
+
background-color: var(--core-primary-2);
|
|
192
193
|
}
|
|
193
194
|
|
|
194
195
|
.individual-workspace-actions {
|
|
@@ -272,8 +273,8 @@ img {
|
|
|
272
273
|
|
|
273
274
|
.action-button:hover {
|
|
274
275
|
cursor: pointer;
|
|
275
|
-
border: solid 1px var(--
|
|
276
|
-
color: var(--
|
|
276
|
+
border: solid 1px var(--font-color);
|
|
277
|
+
color: var(--font-color);
|
|
277
278
|
}
|
|
278
279
|
|
|
279
280
|
.disabled-button,
|
|
@@ -403,11 +404,11 @@ img {
|
|
|
403
404
|
}
|
|
404
405
|
|
|
405
406
|
.daily-select.disabled {
|
|
406
|
-
color: var(--
|
|
407
|
+
color: var(--core-primary-5);
|
|
407
408
|
}
|
|
408
409
|
|
|
409
410
|
.disabled-restart {
|
|
410
|
-
color: var(--
|
|
411
|
+
color: var(--core-primary-5) !important;
|
|
411
412
|
}
|
|
412
413
|
|
|
413
414
|
select:focus,
|
|
@@ -480,7 +481,7 @@ option:focus {
|
|
|
480
481
|
}
|
|
481
482
|
|
|
482
483
|
.row-btn:hover {
|
|
483
|
-
background: var(--
|
|
484
|
+
background: var(--accent-primary);
|
|
484
485
|
border-radius: 0px 20px 20px 0px;
|
|
485
486
|
}
|
|
486
487
|
|
|
@@ -571,3 +572,7 @@ option:focus {
|
|
|
571
572
|
margin-top: 8px;
|
|
572
573
|
margin-left: 10px;
|
|
573
574
|
}
|
|
575
|
+
|
|
576
|
+
.complex-menu-wrapper .workspace-list .individual-workspace-action:hover {
|
|
577
|
+
color: var(--font-color);
|
|
578
|
+
}
|
|
@@ -4,6 +4,13 @@
|
|
|
4
4
|
* All rights reserved.
|
|
5
5
|
*/
|
|
6
6
|
@import url("./linkerWindow.css");
|
|
7
|
+
@import url("./defaultTheme.css");
|
|
8
|
+
@import url("core/icons.css");
|
|
9
|
+
@import url("core/windowFrame.css");
|
|
10
|
+
@import url("core/formElements.css");
|
|
11
|
+
@import url("./font-finance.css");
|
|
12
|
+
@import url("./fonts/Open_Sans/OpenSans-Definition.css");
|
|
13
|
+
@import url("./focus.css");
|
|
7
14
|
|
|
8
15
|
.fsbl-drag-handle {
|
|
9
16
|
z-index: 2147483641;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<!-- Generator: Adobe Illustrator 26.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
|
3
|
+
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
|
4
|
+
viewBox="0 0 7.7 9.2" style="enable-background:new 0 0 7.7 9.2;" xml:space="preserve">
|
|
5
|
+
<style type="text/css">
|
|
6
|
+
.st0{fill:#FFFFFF;}
|
|
7
|
+
</style>
|
|
8
|
+
<g>
|
|
9
|
+
<path class="st0" d="M1.2,6.5H2c0.2,0,0.3-0.1,0.3-0.3V5.4c0-0.1,0-0.1-0.1-0.2C2.2,5.2,2.1,5.2,2,5.2H1.2c-0.2,0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0,4.5,0.2,4.5,0.5v8.3c0,0.2,0.2,0.5,0.5,0.5h2.3c0.2,0,0.5-0.2,0.5-0.5V0.5
|
|
22
|
+
C7.7,0.2,7.5,0,7.3,0z M7.1,0.6v8.1H5V0.6H7.1z"/>
|
|
23
|
+
<path class="st0" d="M2.8,0H0.5C0.2,0,0,0.2,0,0.5v8.3C0,9,0.2,9.2,0.5,9.2h2.3C3,9.2,3.3,9,3.3,8.8V0.5C3.3,0.2,3,0,2.8,0z
|
|
24
|
+
M2.7,0.6v8.1H0.6V0.6H2.7z"/>
|
|
25
|
+
</g>
|
|
26
|
+
</svg>
|
|
@@ -5,7 +5,7 @@ import { FinsembleIcon } from "./FinsembleIcon";
|
|
|
5
5
|
export const ButtonIcon = ({ icon, text = "", disabled = false, tabIndex = 0, onClick = () => { }, className = "", buttonAttributes = {}, }) => {
|
|
6
6
|
const containerClassName = fashion_class_lookup.icon;
|
|
7
7
|
return (React.createElement("div", { className: `${containerClassName} ${className}` },
|
|
8
|
-
React.createElement("button", Object.assign({}, buttonAttributes, { onClick: onClick, disabled: disabled, title: text, tabIndex: tabIndex }),
|
|
8
|
+
React.createElement("button", Object.assign({}, buttonAttributes, { onClick: onClick, disabled: disabled, title: text, "aria-label": text, tabIndex: tabIndex }),
|
|
9
9
|
React.createElement(FinsembleIcon, { icon: icon }))));
|
|
10
10
|
};
|
|
11
11
|
//# sourceMappingURL=ButtonIcon.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ButtonIcon.js","sourceRoot":"","sources":["../../../src/components/common/ButtonIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAuB,oBAAoB,EAAE,MAAM,UAAU,CAAC;AACrE,OAAO,kBAAkB,CAAC;AAC1B,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,MAAM,CAAC,MAAM,UAAU,GAAkC,CAAC,EACzD,IAAI,EACJ,IAAI,GAAG,EAAE,EACT,QAAQ,GAAG,KAAK,EAChB,QAAQ,GAAG,CAAC,EACZ,OAAO,GAAG,GAAG,EAAE,GAAE,CAAC,EAClB,SAAS,GAAG,EAAE,EACd,gBAAgB,GAAG,EAAE,GACrB,EAAE,EAAE;IACJ,MAAM,kBAAkB,GAAG,oBAAoB,CAAC,IAAI,CAAC;IAErD,OAAO,CACN,6BAAK,SAAS,EAAE,GAAG,kBAAkB,IAAI,SAAS,EAAE;QACnD,
|
|
1
|
+
{"version":3,"file":"ButtonIcon.js","sourceRoot":"","sources":["../../../src/components/common/ButtonIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAuB,oBAAoB,EAAE,MAAM,UAAU,CAAC;AACrE,OAAO,kBAAkB,CAAC;AAC1B,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,MAAM,CAAC,MAAM,UAAU,GAAkC,CAAC,EACzD,IAAI,EACJ,IAAI,GAAG,EAAE,EACT,QAAQ,GAAG,KAAK,EAChB,QAAQ,GAAG,CAAC,EACZ,OAAO,GAAG,GAAG,EAAE,GAAE,CAAC,EAClB,SAAS,GAAG,EAAE,EACd,gBAAgB,GAAG,EAAE,GACrB,EAAE,EAAE;IACJ,MAAM,kBAAkB,GAAG,oBAAoB,CAAC,IAAI,CAAC;IAErD,OAAO,CACN,6BAAK,SAAS,EAAE,GAAG,kBAAkB,IAAI,SAAS,EAAE;QACnD,gDACK,gBAAgB,IACpB,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,QAAQ,EAClB,KAAK,EAAE,IAAI,gBACC,IAAI,EAChB,QAAQ,EAAE,QAAQ;YAElB,oBAAC,aAAa,IAAC,IAAI,EAAE,IAAI,GAAkB,CACnC,CACJ,CACN,CAAC;AACH,CAAC,CAAC","sourcesContent":["import React from \"react\";\nimport { AdvancedButtonProps, fashion_class_lookup } from \"./Button\";\nimport \"./css/button.css\";\nimport { FinsembleIcon } from \"./FinsembleIcon\";\n\nexport const ButtonIcon: React.FC<AdvancedButtonProps> = ({\n\ticon,\n\ttext = \"\",\n\tdisabled = false,\n\ttabIndex = 0,\n\tonClick = () => {},\n\tclassName = \"\",\n\tbuttonAttributes = {},\n}) => {\n\tconst containerClassName = fashion_class_lookup.icon;\n\n\treturn (\n\t\t<div className={`${containerClassName} ${className}`}>\n\t\t\t<button\n\t\t\t\t{...buttonAttributes}\n\t\t\t\tonClick={onClick}\n\t\t\t\tdisabled={disabled}\n\t\t\t\ttitle={text}\n\t\t\t\taria-label={text}\n\t\t\t\ttabIndex={tabIndex}\n\t\t\t>\n\t\t\t\t<FinsembleIcon icon={icon}></FinsembleIcon>\n\t\t\t</button>\n\t\t</div>\n\t);\n};\n"]}
|
|
@@ -20,12 +20,12 @@ const ButtonRow = ({ label, onClick, iconClass, disabled, img, showDefaultIcon,
|
|
|
20
20
|
func();
|
|
21
21
|
}
|
|
22
22
|
} },
|
|
23
|
-
img && (React.createElement("img", { src: img, style: showDefaultIcon || imgError ? { display: "none" } : { width: "auto", height: "20px" }, onError: () => {
|
|
23
|
+
img && (React.createElement("img", { src: img, alt: "", style: showDefaultIcon || imgError ? { display: "none" } : { width: "auto", height: "20px" }, onError: () => {
|
|
24
24
|
setImgError(true);
|
|
25
25
|
} })),
|
|
26
26
|
(showDefaultIcon || imgError) && React.createElement("i", { className: "ff-finsemble default-img" }),
|
|
27
27
|
React.createElement("span", { className: "row__lbl" }, label),
|
|
28
|
-
React.createElement("i", { className: iconClass })));
|
|
28
|
+
React.createElement("i", { className: iconClass, "aria-hidden": true })));
|
|
29
29
|
};
|
|
30
30
|
ButtonRow.defaultProps = defaultProps;
|
|
31
31
|
export default ButtonRow;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ButtonRow.js","sourceRoot":"","sources":["../../../src/components/common/ButtonRow.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAA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,IAAI,CACP,6BACC,GAAG,EAAE,GAAG,EACR,GAAG,EAAC,EAAE,EACN,KAAK,EAAE,eAAe,IAAI,QAAQ,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,EAC5F,OAAO,EAAE,GAAG,EAAE;gBACb,WAAW,CAAC,IAAI,CAAC,CAAC;YACnB,CAAC,GACA,CACF;QACA,CAAC,eAAe,IAAI,QAAQ,CAAC,IAAI,2BAAG,SAAS,EAAC,0BAA0B,GAAG;QAC5E,8BAAM,SAAS,EAAC,UAAU,IAAE,KAAK,CAAQ;QACzC,2BAAG,SAAS,EAAE,SAAS,iBAAe,IAAI,GAAI,CACzC,CACN,CAAC;AACH,CAAC,CAAC;AAEF,SAAS,CAAC,YAAY,GAAG,YAAY,CAAC;AACtC,eAAe,SAAS,CAAC","sourcesContent":["import React, { useState } from \"react\";\n\nexport interface ButtonRowProps {\n\tlabel?: string;\n\tonClick: Function;\n\ticonClass?: string;\n\tdisabled?: boolean;\n\timg?: string;\n\tshowDefaultIcon?: boolean;\n\tclassName?: string;\n\trole?: string;\n\ttabIndex?: number;\n\tonKeyDown?: Function;\n}\n\nconst defaultProps: ButtonRowProps = {\n\tlabel: \"\",\n\tonClick: () => {},\n\ticonClass: \"\",\n\tdisabled: false,\n\tshowDefaultIcon: false,\n\tclassName: \"row-btn\",\n};\n\nconst ButtonRow: React.FC<ButtonRowProps> = ({\n\tlabel,\n\tonClick,\n\ticonClass,\n\tdisabled,\n\timg,\n\tshowDefaultIcon,\n\tclassName,\n}) => {\n\tconst [imgError, setImgError] = useState(false);\n\treturn (\n\t\t<div\n\t\t\tclassName={disabled ? \"row-btn-disabled\" : className}\n\t\t\trole=\"button\"\n\t\t\ttabIndex={0}\n\t\t\tonClick={() => {\n\t\t\t\tif (!disabled) {\n\t\t\t\t\tconst func = onClick;\n\t\t\t\t\tfunc();\n\t\t\t\t}\n\t\t\t}}\n\t\t\tonKeyDown={(e) => {\n\t\t\t\tif ((e.key === \"Enter\" || e.key === \" \") && !disabled) {\n\t\t\t\t\tconst func = onClick;\n\t\t\t\t\tfunc();\n\t\t\t\t}\n\t\t\t}}\n\t\t>\n\t\t\t{img && (\n\t\t\t\t<img\n\t\t\t\t\tsrc={img}\n\t\t\t\t\talt=\"\"\n\t\t\t\t\tstyle={showDefaultIcon || imgError ? { display: \"none\" } : { width: \"auto\", height: \"20px\" }}\n\t\t\t\t\tonError={() => {\n\t\t\t\t\t\tsetImgError(true);\n\t\t\t\t\t}}\n\t\t\t\t/>\n\t\t\t)}\n\t\t\t{(showDefaultIcon || imgError) && <i className=\"ff-finsemble default-img\" />}\n\t\t\t<span className=\"row__lbl\">{label}</span>\n\t\t\t<i className={iconClass} aria-hidden={true} />\n\t\t</div>\n\t);\n};\n\nButtonRow.defaultProps = defaultProps;\nexport default ButtonRow;\n"]}
|
|
@@ -10,7 +10,7 @@ export const Checkbox = ({ checked = false, disabled = false, label = "", onClic
|
|
|
10
10
|
if (disabled) {
|
|
11
11
|
style = {
|
|
12
12
|
cursor: "default",
|
|
13
|
-
opacity: ".
|
|
13
|
+
opacity: ".3",
|
|
14
14
|
};
|
|
15
15
|
}
|
|
16
16
|
return (React.createElement("div", { style: style, className: "complex-menu-checkbox-wrapper", role: "checkbox", "aria-checked": checked, "aria-label": label, tabIndex: 0, onClick: disabled ? () => { } : onClick, onKeyDown: (e) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Checkbox.js","sourceRoot":"","sources":["../../../src/components/common/Checkbox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,oBAAoB,CAAC;AAS5B,MAAM,CAAC,MAAM,QAAQ,GAA4B,CAAC,EACjD,OAAO,GAAG,KAAK,EACf,QAAQ,GAAG,KA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AAC,CAAC,GAAG,KAAK,OAAO,IAAI,CAAC,CAAC,GAAG,KAAK,GAAG,EAAE;gBACvC,CAAC,QAAQ,IAAI,OAAO,CAAC,CAAC,CAAC,CAAC;aACxB;QACF,CAAC;QAED,6BAAK,SAAS,EAAE,eAAe,IAAG,OAAO,IAAI,oBAAC,aAAa,IAAC,IAAI,EAAC,OAAO,GAAG,CAAO;QAClF,6BAAK,SAAS,EAAC,6BAA6B,IAAE,KAAK,CAAO,CACrD,CACN,CAAC;AACH,CAAC,CAAC","sourcesContent":["import React from \"react\";\nimport { FinsembleIcon } from \"./FinsembleIcon\";\nimport \"./css/checkbox.css\";\n\nexport interface CheckboxProps {\n\tchecked?: boolean;\n\tdisabled?: boolean;\n\tlabel?: string;\n\tonClick?: (e: React.MouseEvent<HTMLDivElement> | React.KeyboardEvent<HTMLDivElement>) => void;\n}\n\nexport const Checkbox: React.FC<CheckboxProps> = ({\n\tchecked = false,\n\tdisabled = false,\n\tlabel = \"\",\n\tonClick = () => {},\n}) => {\n\tlet checkboxClasses = \"complex-menu-checkbox\";\n\tif (checked) {\n\t\tcheckboxClasses = `${checkboxClasses} checked`;\n\t}\n\tlet style = {};\n\tif (disabled) {\n\t\tstyle = {\n\t\t\tcursor: \"default\",\n\t\t\topacity: \".3\",\n\t\t};\n\t}\n\treturn (\n\t\t<div\n\t\t\tstyle={style}\n\t\t\tclassName=\"complex-menu-checkbox-wrapper\"\n\t\t\trole=\"checkbox\"\n\t\t\taria-checked={checked}\n\t\t\taria-label={label}\n\t\t\ttabIndex={0}\n\t\t\tonClick={disabled ? () => {} : onClick}\n\t\t\tonKeyDown={(e) => {\n\t\t\t\tif (e.key === \"Enter\" || e.key === \" \") {\n\t\t\t\t\t!disabled && onClick(e);\n\t\t\t\t}\n\t\t\t}}\n\t\t>\n\t\t\t<div className={checkboxClasses}>{checked && <FinsembleIcon icon=\"check\" />}</div>\n\t\t\t<div className=\"complex-menu-checkbox-label\">{label}</div>\n\t\t</div>\n\t);\n};\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { useState
|
|
1
|
+
import React, { useState } from "react";
|
|
2
2
|
import "./css/color-picker.css";
|
|
3
3
|
const RE_HEX_COLOR = /^#[0-9a-f]{6}$/i;
|
|
4
4
|
export var RGBA_CHANNEL;
|
|
@@ -29,23 +29,24 @@ function colorToHex(color) {
|
|
|
29
29
|
return `#${hex}`;
|
|
30
30
|
}
|
|
31
31
|
export const ColorPicker = ({ id, startColor, updateColor }) => {
|
|
32
|
-
const [
|
|
33
|
-
const
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
if (startColor) {
|
|
41
|
-
setColor(startColor);
|
|
42
|
-
}
|
|
43
|
-
}, [startColor]);
|
|
32
|
+
const [priorColor, setPriorColor] = useState(startColor);
|
|
33
|
+
const [inputValue, setInputValue] = useState(null);
|
|
34
|
+
if (priorColor !== startColor) {
|
|
35
|
+
setPriorColor(startColor);
|
|
36
|
+
setInputValue(null);
|
|
37
|
+
}
|
|
38
|
+
const isValid = inputValue === null || inputValue.match(RE_HEX_COLOR) !== null;
|
|
39
|
+
const color = colorToHex(startColor);
|
|
44
40
|
const onColorChanged = ({ target }) => {
|
|
45
|
-
|
|
41
|
+
const maybeNewColor = target.value;
|
|
42
|
+
setInputValue(maybeNewColor);
|
|
43
|
+
const isNewValueValid = maybeNewColor.match(RE_HEX_COLOR) !== null;
|
|
44
|
+
if (isNewValueValid) {
|
|
45
|
+
updateColor(maybeNewColor);
|
|
46
|
+
}
|
|
46
47
|
};
|
|
47
48
|
return (React.createElement("div", { className: "color-picker" },
|
|
48
49
|
React.createElement("input", { className: "theme-color-picker", type: "color", value: color, onChange: onColorChanged, "aria-hidden": "true" }),
|
|
49
|
-
React.createElement("input", Object.assign({ className: "theme-color-picker-text", type: "text", "aria-invalid": !isValid, value: color, onChange: onColorChanged }, { id }))));
|
|
50
|
+
React.createElement("input", Object.assign({ className: "theme-color-picker-text", type: "text", "aria-invalid": !isValid, value: inputValue !== null && inputValue !== void 0 ? inputValue : color, onChange: onColorChanged }, { id }))));
|
|
50
51
|
};
|
|
51
52
|
//# sourceMappingURL=ColorPicker.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ColorPicker.js","sourceRoot":"","sources":["../../../src/components/common/ColorPicker.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,
|
|
1
|
+
{"version":3,"file":"ColorPicker.js","sourceRoot":"","sources":["../../../src/components/common/ColorPicker.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAa,MAAM,OAAO,CAAC;AACnD,OAAO,wBAAwB,CAAC;AAEhC,MAAM,YAAY,GAAG,iBAAiB,CAAC;AAEvC,MAAM,CAAN,IAAY,YAKX;AALD,WAAY,YAAY;IACvB,6CAAO,CAAA;IACP,iDAAS,CAAA;IACT,+CAAQ,CAAA;IACR,iDAAS,CAAA;AACV,CAAC,EALW,YAAY,KAAZ,YAAY,QAKvB;AAGD,MAAM,UAAU,WAAW,CAAC,KAAa;IAOxC,MAAM,GAAG,GAAG,QAAQ,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;IAC7C,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC;IACf,GAAG,CAAC,KAAK,GAAG,CAAC,CAAC;IAEd,MAAM,GAAG,GAAG,GAAG,CAAC,UAAU,CAAC,IAAI,CAAE,CAAC;IAClC,GAAG,CAAC,SAAS,GAAG,KAAK,CAAC;IACtB,GAAG,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;IACzB,OAAO,GAAG,CAAC,YAAY,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;AAC1C,CAAC;AAED,SAAS,SAAS,CAAC,GAAW;IAE7B,OAAO,IAAI,GAAG,C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C,KAAK,CAAC,YAAY,CAAC,KAAK,IAAI,CAAC;QACnE,IAAI,eAAe,EAAE;YACpB,WAAW,CAAC,aAAa,CAAC,CAAC;SAC3B;IACF,CAAC,CAAC;IAEF,OAAO,CACN,6BAAK,SAAS,EAAC,cAAc;QAC5B,+BACC,SAAS,EAAC,oBAAoB,EAC9B,IAAI,EAAC,OAAO,EACZ,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,cAAc,iBACZ,MAAM,GACV;QACT,6CACC,SAAS,EAAC,yBAAyB,EACnC,IAAI,EAAC,MAAM,kBACG,CAAC,OAAO,EACtB,KAAK,EAAE,UAAU,aAAV,UAAU,cAAV,UAAU,GAAI,KAAK,EAC1B,QAAQ,EAAE,cAAc,IACpB,EAAE,EAAE,EAAE,EACF,CACJ,CACN,CAAC;AACH,CAAC,CAAC","sourcesContent":["import React, { useState, useEffect } from \"react\";\nimport \"./css/color-picker.css\";\n\nconst RE_HEX_COLOR = /^#[0-9a-f]{6}$/i;\n\nexport enum RGBA_CHANNEL {\n\tRED = 0,\n\tGREEN = 1,\n\tBLUE = 2,\n\tALPHA = 3,\n}\n\n// From https://stackoverflow.com/a/24390910\nexport function colorToRGBA(color: string) {\n\t// Returns the color as an array of [r, g, b, a] -- all range from 0 - 255\n\t// color must be a valid canvas fillStyle. This will cover most anything\n\t// you'd want to use.\n\t// Examples:\n\t// colorToRGBA('red') # [255, 0, 0, 255]\n\t// colorToRGBA('#f00') # [255, 0, 0, 255]\n\tconst cvs = document.createElement(\"canvas\");\n\tcvs.height = 1;\n\tcvs.width = 1;\n\n\tconst ctx = cvs.getContext(\"2d\")!;\n\tctx.fillStyle = color;\n\tctx.fillRect(0, 0, 1, 1);\n\treturn ctx.getImageData(0, 0, 1, 1).data;\n}\n\nfunction byteToHex(num: number) {\n\t// Turns a number (0-255) into a 2-character hex number (00-ff)\n\treturn `0${num.toString(16)}`.slice(-2);\n}\n\nfunction colorToHex(color: string) {\n\t// Convert any CSS color to a hex representation\n\t// Examples:\n\t// colorToHex('red') # '#ff0000'\n\t// colorToHex('rgb(255, 0, 0)') # '#ff0000'\n\t// colorToHex('#ff0000') # '#ff0000'\n\tif (color.match(RE_HEX_COLOR) !== null) {\n\t\treturn color;\n\t}\n\tconst rgba = colorToRGBA(color);\n\tconst hex = [0, 1, 2].map((idx) => byteToHex(rgba[idx])).join(\"\");\n\treturn `#${hex}`;\n}\n\nexport interface ColorPickerProps {\n\tstartColor: string;\n\tupdateColor: (newColor: string) => void;\n\tid?: string;\n}\n\n/**\n * ColorPicker component to update theme variables. Displays a browser color input alongside a text version for hex color values.\n *\n * @param {{ [id]: string, startColor: string; updateColor: function }} { id, startColor, callback }\n */\nexport const ColorPicker = ({ id, startColor, updateColor }: ColorPickerProps) => {\n\t/**\n\t * There is a delicate ballet here between the color picket and the input box. This is because this color picker\n\t * has state (when the end user is in the midst of picking a color by editing the input field) and also\n\t * receives state (via props). When prop startColor is received, it overrides the input box. But when the user is editing,\n\t * the input box overrides the prop.\n\t */\n\tconst [priorColor, setPriorColor] = useState(startColor);\n\t/**\n\t * inputValue state is set _whenever the user is editing the input box_. Only at this time, the value in the input\n\t * box reflects the user's editing. If at any point the editing yields a valid color then it is immediately\n\t * passed up as an action, which updates the screen and resets the startColor prop. Whenever an invalid color has\n\t * been entered, the value is flagged invalid which causes the input box to be underlined red.\n\t */\n\tconst [inputValue, setInputValue] = useState<string | null>(null);\n\n\t/**\n\t * If the value of the startColor prop changes then we reset the input to the new color. This occurs for instance\n\t * when the user presses the light or dark themes on the theme page. At that point, the parent sends new values\n\t * down to all color pickers as a new prop.\n\t */\n\tif (priorColor !== startColor) {\n\t\tsetPriorColor(startColor);\n\t\tsetInputValue(null);\n\t}\n\n\t// If the value in the input box isn't valid then give UI feedback\n\tconst isValid = inputValue === null || inputValue.match(RE_HEX_COLOR) !== null;\n\n\t// The swatch always displays the current color from prop. This won't change\n\t// until a valid alternative color is picked.\n\tconst color = colorToHex(startColor);\n\n\tconst onColorChanged = ({ target }: { target: HTMLInputElement }) => {\n\t\tconst maybeNewColor = target.value;\n\t\t// Update the value in the input box\n\t\tsetInputValue(maybeNewColor);\n\t\t// If the color is valid then send an update\n\t\tconst isNewValueValid = maybeNewColor.match(RE_HEX_COLOR) !== null;\n\t\tif (isNewValueValid) {\n\t\t\tupdateColor(maybeNewColor);\n\t\t}\n\t};\n\n\treturn (\n\t\t<div className=\"color-picker\">\n\t\t\t<input\n\t\t\t\tclassName=\"theme-color-picker\"\n\t\t\t\ttype=\"color\"\n\t\t\t\tvalue={color}\n\t\t\t\tonChange={onColorChanged}\n\t\t\t\taria-hidden=\"true\"\n\t\t\t></input>\n\t\t\t<input\n\t\t\t\tclassName=\"theme-color-picker-text\"\n\t\t\t\ttype=\"text\"\n\t\t\t\taria-invalid={!isValid}\n\t\t\t\tvalue={inputValue ?? color}\n\t\t\t\tonChange={onColorChanged}\n\t\t\t\t{...{ id }}\n\t\t\t></input>\n\t\t</div>\n\t);\n};\n"]}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React, { ErrorInfo, ReactNode } from "react";
|
|
2
|
+
declare type ErrorBoundaryProps = {
|
|
3
|
+
fallBackUI?: ReactNode;
|
|
4
|
+
};
|
|
5
|
+
declare type ErrorBoundaryState = {
|
|
6
|
+
hasError: boolean;
|
|
7
|
+
};
|
|
8
|
+
export declare class ErrorBoundary extends React.Component<ErrorBoundaryProps, ErrorBoundaryState> {
|
|
9
|
+
constructor(props: ErrorBoundaryProps);
|
|
10
|
+
static getDerivedStateFromError(error: Error): {
|
|
11
|
+
hasError: boolean;
|
|
12
|
+
};
|
|
13
|
+
componentDidCatch(error: Error, errorInfo: ErrorInfo): void;
|
|
14
|
+
render(): React.ReactNode;
|
|
15
|
+
}
|
|
16
|
+
export {};
|