Skip to content

Commit

Permalink
5.3 public seed
Browse files Browse the repository at this point in the history
  • Loading branch information
kyle-ciq committed Feb 17, 2021
1 parent cda4604 commit 927b158
Show file tree
Hide file tree
Showing 18 changed files with 4,412 additions and 95 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ world</del> turbocharge your workflow.
2. 📦 Install the deps

(Note, we recommend using the [Yarn Package Manager](https://yarnpkg.com/) - it's fast and reliable. But you can also
use npm.)
use npm. **If using npm you must use a version >= 7.x.x. Lower versions will encounter errors regarding changing
folder names with missing permissions**)

```
cd finsemble-seed
Expand Down
Binary file added assets/img/installer-image.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
39 changes: 34 additions & 5 deletions build/webpack/webpack.components.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,20 +98,49 @@ for (let key in componentsToBuild) {
let webpackConfig = generateDefaultConfig();
webpackConfig.entry = entries;

/**
* Recursively gets all of the files in a folder.
* @param {string} dirPath
* @param {Array} arrayOfFiles
*/
const getAllFiles = (dirPath, arrayOfFiles) => {
const files = fs.readdirSync(dirPath);

arrayOfFiles = arrayOfFiles || [];

files.forEach((file) => {
const filePath = path.join(dirPath, file);
if (fs.statSync(filePath).isDirectory()) {
arrayOfFiles = getAllFiles(filePath, arrayOfFiles);
} else {
arrayOfFiles.push(path.join(__dirname, filePath));
}
});

return arrayOfFiles;
};

// This function iterates through src, building a list of all the directories but eliminating duplicates.
function collapseBuiltInFiles() {
var srcList = {}; // contains the final compressed list
let componentSrcPath = path.join(__homename, "src/components"); // path to src components
const srcList = {}; // contains the final compressed list
const componentSrcPath = path.join(__homename, "src", "components"); // path to src components

// Now put all the src items into our combined list. If there's a dup, then it will override the built in
var srcItems = fs.readdirSync(componentSrcPath);
const srcItems = fs.readdirSync(componentSrcPath);
for (let i = 0; i < srcItems.length; i++) {
let folder = srcItems[i];
const folder = srcItems[i];
if (folder === ".gitignore") {
// Don't copy a .gitignore folder.
continue;
}
srcList[folder] = path.join(componentSrcPath, folder);

// Don't copy empty folders
const folderPath = path.join(componentSrcPath, folder);
const folderItems = getAllFiles(folderPath);

if (folderItems.length > 0) {
srcList[folder] = folderPath;
}
}
return srcList;
}
Expand Down
8 changes: 8 additions & 0 deletions build/webpack/webpack.finsemble-built-in.entries.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,13 @@
"registration": {
"output": "components/registration/Registration",
"entry": "./src/components/registration/Registration.tsx"
},
"NotificationsCenter": {
"output": "components/notificationsCenter/NotificationsCenter",
"entry": "./src/components/notificationsCenter/NotificationsCenter.tsx"
},
"NotificationsToasts": {
"output": "components/notificationsToasts/NotificationsToasts",
"entry": "./src/components/notificationsToasts/NotificationsToasts.tsx"
}
}
116 changes: 116 additions & 0 deletions configs/application/UIComponents.json
Original file line number Diff line number Diff line change
Expand Up @@ -506,6 +506,122 @@
}
}
}
},
"NotificationsCenter": {
"window": {
"url": "$applicationRoot/components/notificationsCenter/notificationsCenter.html",
"forceOntoMonitor": true,
"top": 0,
"right": 0,
"width": 428,
"maxWidth": 428,
"minWidth": 428,
"height": "100%",
"position": "available",
"monitor": "primary",
"addToWorkspace": false,
"options": {
"transparent": true,
"alwaysOnTop": true,
"autoShow": false,
"resizable": true,
"showTaskbarIcon": false,
"maximizable": false,
"isEvergreen": false
},
"data": {
"notifications": {
"applyMuteFilters": false,
"notificationsHistory": true,
"newNotificationHighlightSeconds": 180
}
}
},
"component": {
"preload": false,
"spawnOnStartup": true,
"singleton": true,
"category": "system",
"canMaximize": false
},
"foreign": {
"components": {
"App Launcher": {
"launchableByUser": false
},
"Window Manager": {
"title": "notification-center",
"FSBLHeader": {
"hideMaximize": true,
"hideClose": false,
"hideMinimize": true
},
"disableBrowserView": true
},
"Toolbar": {
"iconClass": "notification-center"
}
},
"services": {
"windowService": {
"allowAutoArrange": false,
"allowSnapping": false,
"allowTabbing": false,
"allowTiling": false,
"allowGrouping": false,
"allowMinimize": false
}
}
}
},
"NotificationsToasts": {
"window": {
"name": "notifications-toasts",
"url": "$applicationRoot/components/notificationsToasts/notificationsToasts.html",
"options": {
"transparent": true,
"alwaysOnTop": true,
"autoShow": true,
"resizable": false,
"showTaskbarIcon": false
},
"forceOntoMonitor": true,
"top": 0,
"right": 0,
"width": 428,
"height": "100%",
"position": "available"
},
"component": {
"preload": false,
"spawnOnStartup": true,
"singleton": true,
"category": "system"
},
"foreign": {
"services": {
"windowService": {
"manageWindowMovement": true,
"allowAutoArrange": false,
"allowSnapping": false,
"allowTabbing": false,
"allowTiling": false,
"allowGrouping": false,
"allowMinimize": false
},
"workspace": {}
},
"components": {
"App Launcher": {
"launchableByUser": false
},
"Window Manager": {
"FSBLHeader": false,
"title": "NotificationsToasts",
"persistWindowState": true
}
}
}
}
}
}
2 changes: 0 additions & 2 deletions configs/application/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,6 @@
"alwaysOnTopIcon": false,
"floatingTitlebarComponent": "Floating Titlebar"
},
"//appDirectoryEndpoint": "If you'd like to test the server locally, point 'appDirectoryEndpoint' to http://localhost:3030/v1/ and make sure to run the AppD project.",
"appDirectoryEndpoint": "https://fpe.finsemble.com/v1/",
"globalHotkeys": {},
"//": "this importConfig contains components that are necessary to start Finsemble. All other components are loaded dynamically. See server/auth/test.json",
"importConfig": [
Expand Down
3 changes: 2 additions & 1 deletion configs/application/manifest-local.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@
"importConfig": ["$applicationRoot/configs/application/config.json"]
},
"finsemble-electron-adapter": {
"useDOMBasedMovement": true
"useDOMBasedMovement": true,
"allowedManifestDomains": ["*"]
}
}
4 changes: 3 additions & 1 deletion configs/other/installer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,7 @@
"//background": "Path to the image used as the background for a Mac installer",
"background": "./assets/img/background.png",
"//macIcon": "Path to the icon to be used on Mac",
"macIcon": "./assets/img/installer_icon.icns"
"macIcon": "./assets/img/installer_icon.icns",
"//loadingGif": "Path to the GIF image to display during installation",
"loadingGif": "./assets/img/installer-image.gif"
}
2 changes: 0 additions & 2 deletions configs/other/server-environment-startup.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"serverPort": 3375,
"//serverConfig": "Url for your application's manifest.",
"serverConfig": "http://localhost:3375/configs/application/manifest-local.json",
"clientRoute": "http://localhost:3375/",
"//electronDebug": "Whether to start the finsemble-electron-adapter in debug mode. Default: true.",
"electronDebug": true,
"//breakpointOnStart": "Whether to pause finsemble-electron-adapter when it starts. Default: false.",
Expand All @@ -20,7 +19,6 @@
"serverPort": 3375,
"//serverConfig": "Url for your application's manifest.",
"serverConfig": "http://localhost:3375/configs/application/manifest-local.json",
"clientRoute": "http://localhost:3375/",
"//electronDebug": "Whether to start the finsemble-electron-adapter in debug mode. Default: true.",
"electronDebug": true,
"//breakpointOnStart": "Whether to pause finsemble-electron-adapter when it starts. Default: false.",
Expand Down
11 changes: 9 additions & 2 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@
const shell = require("shelljs");
const path = require("path");
const treeKill = require("tree-kill");
const FEA = require("@finsemble/finsemble-electron-adapter/exports");
let FEA;
// Internal Cosaic development: exports doesn't exist when running yarn clean
try {
FEA = require("@finsemble/finsemble-electron-adapter/exports");
} catch (e) {}
const FEA_PATH = path.resolve("./node_modules/@finsemble/finsemble-electron-adapter");
const FEAPackager = FEA ? FEA.packager : undefined;
const startupConfig = require("./configs/other/server-environment-startup");
Expand Down Expand Up @@ -290,6 +294,7 @@
"dev:noLaunch": (done) => {
async.series([taskMethods["build:dev"], taskMethods.startServer], done);
},

launchElectron: (done) => {
const cfg = taskMethods.startupConfig[env.NODE_ENV];

Expand All @@ -316,11 +321,13 @@
manifest: cfg.serverConfig,
onElectronClose: handleElectronClose,
chromiumFlags: JSON.stringify(cfg.chromiumFlags),
path: FEA_PATH,
socketCertificatePath,
breakpointOnStart: cfg.breakpointOnStart,
};

// Copy any command line args from server-environment-startup.json
config.args = taskMethods.startupConfig[env.NODE_ENV]["args"];

if (!FEA) {
console.error("Could not launch ");
process.exit(1);
Expand Down
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "finsemble-seed",
"version": "5.2.0",
"version": "5.3.0",
"description": "",
"main": "index.js",
"scripts": {
Expand Down Expand Up @@ -30,12 +30,12 @@
"author": "Cosaic",
"license": "SEE LICENSE IN LICENSE",
"optionalDependencies": {
"@finsemble/finsemble-cli": "5.2.*"
"@finsemble/finsemble-cli": "5.3.*"
},
"dependencies": {
"@finsemble/finsemble-core": "5.2.*",
"@finsemble/finsemble-electron-adapter": "5.2.*",
"@finsemble/finsemble-ui": "5.2.*",
"@finsemble/finsemble-core": "5.3.*",
"@finsemble/finsemble-electron-adapter": "5.3.*",
"@finsemble/finsemble-ui": "5.3.*",
"async": "3.2.0",
"compression": "1.7.3",
"express": "4.16.4",
Expand All @@ -46,7 +46,7 @@
"@babel/core": "7.6.4",
"@babel/plugin-proposal-class-properties": "7.8.3",
"@babel/plugin-proposal-decorators": "7.8.3",
"@babel/plugin-proposal-export-default-from": "7.8.3",
"@babel/plugin-proposal-export-default-from": "7.12.1",
"@babel/plugin-transform-modules-commonjs": "7.8.3",
"@babel/plugin-transform-runtime": "7.8.3",
"@babel/preset-env": "7.8.7",
Expand Down
17 changes: 17 additions & 0 deletions src/components/notificationsCenter/NotificationsCenter.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/*!
* Copyright 2017 by ChartIQ, Inc.
* All rights reserved.
*/
import React from "react";
import ReactDOM from "react-dom";
import { FinsembleProvider } from "@finsemble/finsemble-ui/react/components/FinsembleProvider";
import { NotificationsCenter } from "@finsemble/finsemble-ui/react/components/notifications";
import "@finsemble/finsemble-ui/react/assets/css/finsemble.css";
import "../../../assets/css/theme.css";

ReactDOM.render(
<FinsembleProvider>
<NotificationsCenter />
</FinsembleProvider>,
document.getElementById("notifications-center")
);
18 changes: 18 additions & 0 deletions src/components/notificationsCenter/notificationsCenter.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<script src="../../vendor.bundle.js"></script>
<title>Finsemble Notifications Center</title>
<style>
.main-application {
font-weight: bolder;
}
</style>
</head>

<body id="notifications-center-container" class="notifications-center-body">
<div id="notifications-center" />
<script src="NotificationsCenter.js"></script>
</body>
</html>
25 changes: 25 additions & 0 deletions src/components/notificationsToasts/NotificationsToasts.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import React from "react";
import ReactDOM from "react-dom";
import { FinsembleProvider } from "@finsemble/finsemble-ui/react/components/FinsembleProvider";
import "@finsemble/finsemble-ui/react/assets/css/finsemble.css";
import { NotificationsToasts } from "@finsemble/finsemble-ui/react/components/notifications";
import "../../../assets/css/theme.css";

// Create a custom representation of your notifications / display custom meta fields
// const ToastCard = (props: any) => {
// return (
// <div style={{backgroundColor:"black", height: "200px"}}>
// This is a custom notification card: {props.notification.id}
// Meta field: {props.notification.meta.id}
// </div>
// );
// }

ReactDOM.render(
<FinsembleProvider>
<NotificationsToasts
// notificationCard={ToastCard}
/>
</FinsembleProvider>,
document.getElementById("notifications-toasts")
);
13 changes: 13 additions & 0 deletions src/components/notificationsToasts/notificationsToasts.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>NotificationsToasts</title>
<script src="../../vendor.bundle.js"></script>
</head>

<body class="notifications-toasts-body">
<div id="notifications-toasts" />
<script src="NotificationsToasts.js"></script>
</body>
</html>
Loading

0 comments on commit 927b158

Please sign in to comment.