diff --git a/README.md b/README.md index f1b41c7..9a7d8e1 100644 --- a/README.md +++ b/README.md @@ -1,21 +1,21 @@ -# Noodl +# Fluxscape -[Noodl](https://noodl.net) is a low-code platform where designers and developers build custom applications and experiences. Designed as a visual programming environment, it aims to expedite your development process. It promotes the swift and efficient creation of applications, requiring minimal coding knowledge. +Fluxscape is a low-code platform where designers and developers build custom applications and experiences. Designed as a visual programming environment, it aims to expedite your development process. It promotes the swift and efficient creation of applications, requiring minimal coding knowledge. ## Documentation -Documentation for how to use Noodl can be found here: -[https://noodlapp.github.io/noodl-docs/](https://noodlapp.github.io/noodl-docs/) +Documentation for how to use Fluxscape can be found here: +[Fluxscape Documentation](https://docs.fluxscape.io) ## Community -Main support channel is Discord: [https://www.noodl.net/community](https://www.noodl.net/community) +Main support channel is Discord: [Fluxscape Discord](https://discord.gg/fXNW9EXa6A) ## Download releases -Pre-built binaries can be [downloaded from Github](https://github.com/noodlapp/noodl/releases) +Pre-built binaries can be [downloaded from Github](https://github.com/fluxscape/fluxscape/releases) ## Note for users who are migrating from the deprecated closed source version -- [Migrating the project files and workspaces to a Git provider](https://noodlapp.github.io/noodl-docs/docs/guides/collaboration/migrating-from-noodl-hosted-git) -- [Migrate backend and database](https://noodlapp.github.io/noodl-docs/docs/guides/deploy/using-an-external-backend#migrating-from-a-noodl-cloud-service) -- [Self-host frontend](https://noodlapp.github.io/noodl-docs/docs/guides/deploy/hosting-frontend) +- [Migrating the project files and workspaces to a Git provider](https://docs.fluxscape.io/docs/guides/collaboration/migrating-from-noodl-hosted-git/) +- [Migrate backend and database](https://docs.fluxscape.io/docs/guides/deploy/using-an-external-backend/#migrating-from-a-noodl-cloud-service) +- [Self-host frontend](https://docs.fluxscape.io/docs/guides/deploy/hosting-frontend/) ## Building from source @@ -23,24 +23,24 @@ Pre-built binaries can be [downloaded from Github](https://github.com/noodlapp/n # Install all dependencies $ npm install -# Start the Noodl Editor and build a production version of the cloud and react runtime (useful when running Noodl from source but want to deploy to production) +# Start the Fluxscape Editor and build a production version of the cloud and react runtime (useful when running Fluxscape from source but want to deploy to production) $ npm start -# Start the Noodl Editor and watch the filesystem for changes to the runtimes. Development versions of the runtimes, not meant for production (mostly due to source maps and file size) +# Start the Fluxscape Editor and watch the filesystem for changes to the runtimes. Development versions of the runtimes, not meant for production (mostly due to source maps and file size) # This is ideal for a quick workflow when doing changes on the runtimes. $ npm run dev -# Start Noodl Editor test runner +# Start Fluxscape Editor test runner $ npm run test:editor ``` ## Licenses -This repository contains two different licenses for different parts of the Noodl platform. +This repository contains two different licenses for different parts of the Fluxscape platform. -- Components related to the editor, used to edit Noodl projects, are under GPLv3 -- Components related to the end applications, used by the applications Noodl deploys, are under MIT +- Components related to the editor, used to edit Fluxscape projects, are under GPLv3 +- Components related to the end applications, used by the applications Fluxscape deploys, are under MIT -All of the source code of applications created with Noodl are under MIT. This means you can do project specific changes to the runtime without having to redistribute your changes. +All of the source code of applications created with Fluxscape are under MIT. This means you can do project specific changes to the runtime without having to redistribute your changes. Packaged licensed under MIT: - `noodl-runtime` diff --git a/package.json b/package.json index 4106b0f..b052cee 100644 --- a/package.json +++ b/package.json @@ -2,8 +2,8 @@ "private": true, "name": "@noodl/repo", "description": "Low-code for when experience matter", - "author": "Noodl ", - "homepage": "https://noodl.net", + "author": "Fluxscape ", + "homepage": "https://fluxscape.io", "version": "1.0.0", "workspaces": [ "packages/*" diff --git a/packages/noodl-core-ui/src/components/popups/Tooltip/Tooltip.tsx b/packages/noodl-core-ui/src/components/popups/Tooltip/Tooltip.tsx index 798153e..5ed516f 100644 --- a/packages/noodl-core-ui/src/components/popups/Tooltip/Tooltip.tsx +++ b/packages/noodl-core-ui/src/components/popups/Tooltip/Tooltip.tsx @@ -11,7 +11,7 @@ import css from './Tooltip.module.scss'; export interface TooltipProps extends UnsafeStyleProps { content: SingleSlot; - fineType?: string; + fineType?: string | string[]; children: Slot; showAfterMs?: number; @@ -79,9 +79,17 @@ export function Tooltip({ {fineType && (
- + {Array.isArray(fineType) ? ( + fineType.map((x) => ( + + )) + ) : ( + + )}
)} diff --git a/packages/noodl-editor/src/editor/index.html b/packages/noodl-editor/src/editor/index.html index 80e31fa..3f99b57 100644 --- a/packages/noodl-editor/src/editor/index.html +++ b/packages/noodl-editor/src/editor/index.html @@ -2,7 +2,7 @@ - Noodl + Fluxscape diff --git a/packages/noodl-editor/src/editor/src/constants/Keybindings.ts b/packages/noodl-editor/src/editor/src/constants/Keybindings.ts index 0863d12..1ca08a0 100644 --- a/packages/noodl-editor/src/editor/src/constants/Keybindings.ts +++ b/packages/noodl-editor/src/editor/src/constants/Keybindings.ts @@ -2,6 +2,11 @@ import { Keybinding } from '@noodl-utils/keyboard/Keybinding'; import { KeyCode, KeyMod } from '@noodl-utils/keyboard/KeyCode'; export namespace Keybindings { + export const SEARCH = new Keybinding(KeyMod.CtrlCmd, KeyCode.KEY_F); + + export const CLOUD_SERVICE_OPEN_DASHBOARD = new Keybinding(KeyMod.CtrlCmd, KeyMod.Shift, KeyCode.KEY_P); + export const CLOUD_SERVICE_OPEN_DASHBOARD_BROWSER = new Keybinding(KeyMod.CtrlCmd, KeyCode.KEY_P); + export const REFRESH_PREVIEW = new Keybinding(KeyMod.CtrlCmd, KeyCode.KEY_R); export const OPEN_DEVTOOLS = new Keybinding(KeyMod.CtrlCmd, KeyCode.KEY_D); export const OPEN_CLOUD_DEVTOOLS = new Keybinding(KeyMod.CtrlCmd, KeyMod.Shift, KeyCode.KEY_R); diff --git a/packages/noodl-editor/src/editor/src/router.setup.ts b/packages/noodl-editor/src/editor/src/router.setup.ts index 4297783..e03ec63 100644 --- a/packages/noodl-editor/src/editor/src/router.setup.ts +++ b/packages/noodl-editor/src/editor/src/router.setup.ts @@ -1,7 +1,6 @@ import { AppRegistry } from '@noodl-models/app_registry'; import { SidebarModel } from '@noodl-models/sidebar'; -import { Keybinding } from '@noodl-utils/keyboard/Keybinding'; -import { KeyCode, KeyMod } from '@noodl-utils/keyboard/KeyCode'; +import { Keybindings } from '@noodl-constants/Keybindings'; import { IconName } from '@noodl-core-ui/components/common/Icon'; @@ -69,7 +68,7 @@ export function installSidePanel({ isLesson }: SetupEditorOptions) { SidebarModel.instance.register({ id: 'search', name: 'Search', - fineType: new Keybinding(KeyMod.CtrlCmd, KeyCode.KEY_F).label, + fineType: Keybindings.SEARCH.label, order: 2, icon: IconName.Search, panel: SearchPanel diff --git a/packages/noodl-editor/src/editor/src/utils/compilation/build/processors/html-processor.ts b/packages/noodl-editor/src/editor/src/utils/compilation/build/processors/html-processor.ts index 5eb8845..06d65ad 100644 --- a/packages/noodl-editor/src/editor/src/utils/compilation/build/processors/html-processor.ts +++ b/packages/noodl-editor/src/editor/src/utils/compilation/build/processors/html-processor.ts @@ -41,7 +41,7 @@ export class HtmlProcessor { baseUrl = baseUrl + '/'; } - const title = parameters.title || settings.htmlTitle || 'Noodl Viewer'; + const title = parameters.title || settings.htmlTitle || 'Fluxscape Viewer'; let headCode = settings.headCode || ''; if (parameters.headCode) { diff --git a/packages/noodl-editor/src/editor/src/views/panels/CloudServicePanel/CloudServiceCard/CloudServiceCard.tsx b/packages/noodl-editor/src/editor/src/views/panels/CloudServicePanel/CloudServiceCard/CloudServiceCard.tsx index f233649..84dc268 100644 --- a/packages/noodl-editor/src/editor/src/views/panels/CloudServicePanel/CloudServiceCard/CloudServiceCard.tsx +++ b/packages/noodl-editor/src/editor/src/views/panels/CloudServicePanel/CloudServiceCard/CloudServiceCard.tsx @@ -1,13 +1,16 @@ import classNames from 'classnames'; import React, { useEffect, useRef, useState } from 'react'; +import { Keybindings } from '@noodl-constants/Keybindings'; import { Environment } from '@noodl-models/CloudServices'; import ParseDashboardServer from '@noodl-utils/parsedashboardserver'; import { Icon, IconName, IconSize } from '@noodl-core-ui/components/common/Icon'; import { IconButton, IconButtonState, IconButtonVariant } from '@noodl-core-ui/components/inputs/IconButton'; import { PrimaryButton, PrimaryButtonSize, PrimaryButtonVariant } from '@noodl-core-ui/components/inputs/PrimaryButton'; +import { DialogRenderDirection } from '@noodl-core-ui/components/layout/BaseDialog'; import { Collapsible } from '@noodl-core-ui/components/layout/Collapsible'; +import { Tooltip } from '@noodl-core-ui/components/popups/Tooltip'; import { Label, LabelSpacingSize } from '@noodl-core-ui/components/typography/Label'; import { Text, TextType } from '@noodl-core-ui/components/typography/Text'; @@ -118,12 +121,21 @@ export function CloudServiceCard({ {isEditorEnvironment && ( - + + + )} diff --git a/packages/noodl-editor/src/frames/viewer-frame/index.html b/packages/noodl-editor/src/frames/viewer-frame/index.html index b72f695..176657a 100644 --- a/packages/noodl-editor/src/frames/viewer-frame/index.html +++ b/packages/noodl-editor/src/frames/viewer-frame/index.html @@ -2,7 +2,7 @@ - Noodl Viewer + Fluxscape Viewer diff --git a/packages/noodl-editor/src/main/src/web-server.js b/packages/noodl-editor/src/main/src/web-server.js index 8014e91..f416d6b 100644 --- a/packages/noodl-editor/src/main/src/web-server.js +++ b/packages/noodl-editor/src/main/src/web-server.js @@ -67,7 +67,7 @@ function startServer(app, projectGetSettings, projectGetInfo, projectGetComponen ProjectModules.instance.injectIntoHtml(info.projectDirectory, data, '/', function (injected) { projectGetSettings((settings) => { settings = settings || {}; - injected = injected.replace('{{#title#}}', settings.htmlTitle || 'Noodl Viewer'); + injected = injected.replace('{{#title#}}', settings.htmlTitle || 'Fluxscape Viewer'); injected = injected.replace('{{#customHeadCode#}}', settings.headCode || ''); response.writeHead(200, { diff --git a/packages/noodl-git/package.json b/packages/noodl-git/package.json index c9bcc7c..002e1d2 100644 --- a/packages/noodl-git/package.json +++ b/packages/noodl-git/package.json @@ -3,8 +3,8 @@ "version": "2.7.0", "main": "src/index.ts", "description": "", - "author": "Noodl ", - "homepage": "https://noodl.net", + "author": "Fluxscape ", + "homepage": "https://fluxscape.io", "dependencies": { "desktop-trampoline": "https://github.com/desktop/desktop-trampoline/archive/refs/tags/v0.9.8.tar.gz", "dugite": "^1.106.0", diff --git a/packages/noodl-platform-electron/package.json b/packages/noodl-platform-electron/package.json index bd0e371..20a3e2d 100644 --- a/packages/noodl-platform-electron/package.json +++ b/packages/noodl-platform-electron/package.json @@ -3,8 +3,8 @@ "version": "2.7.0", "main": "src/index.ts", "description": "Cross platform implementation of platform specific features.", - "author": "Noodl ", - "homepage": "https://noodl.net", + "author": "Fluxscape ", + "homepage": "https://fluxscape.io", "dependencies": { "@noodl/platform": "file:../noodl-platform", "@noodl/platform-node": "file:../noodl-platform-node" diff --git a/packages/noodl-platform-node/package.json b/packages/noodl-platform-node/package.json index b152442..19b9086 100644 --- a/packages/noodl-platform-node/package.json +++ b/packages/noodl-platform-node/package.json @@ -3,8 +3,8 @@ "version": "2.7.0", "main": "src/index.ts", "description": "Cross platform implementation of platform specific features.", - "author": "Noodl ", - "homepage": "https://noodl.net", + "author": "Fluxscape ", + "homepage": "https://fluxscape.io", "scripts": { "test": "jest", "test:coverage": "jest --coverage" diff --git a/packages/noodl-platform/package.json b/packages/noodl-platform/package.json index 6190f68..ce5d975 100644 --- a/packages/noodl-platform/package.json +++ b/packages/noodl-platform/package.json @@ -3,6 +3,6 @@ "version": "2.7.0", "main": "src/index.ts", "description": "Cross platform implementation of platform specific features.", - "author": "Noodl ", - "homepage": "https://noodl.net" + "author": "Fluxscape ", + "homepage": "https://fluxscape.io" } diff --git a/packages/noodl-runtime/src/nodes/std-library/data/setdbmodelpropertiesnode.js b/packages/noodl-runtime/src/nodes/std-library/data/setdbmodelpropertiesnode.js index 167df15..8c0d7af 100644 --- a/packages/noodl-runtime/src/nodes/std-library/data/setdbmodelpropertiesnode.js +++ b/packages/noodl-runtime/src/nodes/std-library/data/setdbmodelpropertiesnode.js @@ -75,12 +75,12 @@ var SetDbModelPropertiedNodeDefinition = { _this.setError('Missing Record Id'); return; } - var model = internal.model; - - for (var i in internal.inputValues) { - model.set(i, internal.inputValues[i], { resolve: true }); + + const model = internal.model; + for (const key in internal.inputValues) { + model.set(key, internal.inputValues[key], { resolve: true }); } - + CloudStore.forScope(_this.nodeScope.modelScope).save({ collection: internal.collectionId, objectId: model.getId(), // Get the objectId part of the model id diff --git a/packages/noodl-runtime/src/nodes/std-library/datetostring.js b/packages/noodl-runtime/src/nodes/std-library/datetostring.js index 04425b2..93e0b3e 100644 --- a/packages/noodl-runtime/src/nodes/std-library/datetostring.js +++ b/packages/noodl-runtime/src/nodes/std-library/datetostring.js @@ -59,6 +59,7 @@ const DateToStringNode = { const month = ('0' + (t.getMonth() + 1)).slice(-2); const monthShort = new Intl.DateTimeFormat('en-US', { month: 'short' }).format(t); const year = t.getFullYear(); + const yearShort = year.toString().substring(2); const hours = ('0' + t.getHours()).slice(-2); const minutes = ('0' + t.getMinutes()).slice(-2); const seconds = ('0' + t.getSeconds()).slice(-2); @@ -68,6 +69,7 @@ const DateToStringNode = { .replace(/\{month\}/g, month) .replace(/\{monthShort\}/g, monthShort) .replace(/\{year\}/g, year) + .replace(/\{yearShort\}/g, yearShort) .replace(/\{hours\}/g, hours) .replace(/\{minutes\}/g, minutes) .replace(/\{seconds\}/g, seconds); diff --git a/packages/noodl-types/package.json b/packages/noodl-types/package.json index a6fbf4d..20b7e28 100644 --- a/packages/noodl-types/package.json +++ b/packages/noodl-types/package.json @@ -3,6 +3,6 @@ "version": "2.7.0", "main": "src/index.d.ts", "description": "", - "author": "Noodl ", - "homepage": "https://noodl.net" + "author": "Fluxscape ", + "homepage": "https://fluxscape.io" } diff --git a/packages/noodl-viewer-cloud/package.json b/packages/noodl-viewer-cloud/package.json index 9f47bc9..9b4ec67 100644 --- a/packages/noodl-viewer-cloud/package.json +++ b/packages/noodl-viewer-cloud/package.json @@ -1,7 +1,7 @@ { "name": "@noodl/cloud-runtime", - "author": "Noodl ", - "homepage": "https://noodl.net", + "author": "Fluxscape ", + "homepage": "https://fluxscape.io", "version": "0.6.3", "license": "MIT", "main": "dist/main.js", diff --git a/packages/noodl-viewer-cloud/static/viewer/global.d.ts.keep b/packages/noodl-viewer-cloud/static/viewer/global.d.ts.keep index b8eaeda..1a8c715 100644 --- a/packages/noodl-viewer-cloud/static/viewer/global.d.ts.keep +++ b/packages/noodl-viewer-cloud/static/viewer/global.d.ts.keep @@ -74,6 +74,59 @@ declare namespace Noodl { */ const Object: any; + type RecordQuery = + { + lessThan: T + } | + { + lessThanOrEqualTo: T + } | + { + greaterThan: T + } | + { + greaterThanOrEqualTo: T + } | + { + equalTo: T + } | + { + notEqualTo: T + } | + { + containedIn: T + } | + { + notContainedIn : T + } | + { + exists: T + } | + { + matchesRegex: T + } | + { + text: T + } | + { + idEqualTo: T + } | + { + idContainedIn: T + } | + { + pointsTo: T + } | + { + relatedTo: T + }; + + type RecordQueryField = T extends RecordQuery ? + { [K in keyof T]: { [P in K]: T[P] } & Partial, never>> }[keyof T] + : never; + + type RecordSortKey = (`${T}` | `-${T}`)[]; + interface RecordsApi { /** * This is an async function that will query the database using the query @@ -115,15 +168,17 @@ declare namespace Noodl { * }) * ``` */ - query( - className: RecordClassName, - query?: any, + query( + className: TClassName, + query?: + RecordQueryField<{ [K in keyof DatabaseSchema[TClassName]]: RecordQuery }> | + { and: RecordQueryField<{ [K in keyof DatabaseSchema[TClassName]]: RecordQuery }>[] }, options?: { limit?: number; skip?: number; - sort?: string[]; - include?: any; - select?: any; + sort?: string | RecordSortKey; + include?: string | (keyof DatabaseSchema[TClassName])[]; + select?: string | (keyof DatabaseSchema[TClassName])[]; } ): Promise; diff --git a/packages/noodl-viewer-react/src/project-settings.js b/packages/noodl-viewer-react/src/project-settings.js index becf1cf..e102b85 100644 --- a/packages/noodl-viewer-react/src/project-settings.js +++ b/packages/noodl-viewer-react/src/project-settings.js @@ -6,7 +6,7 @@ export default { group: 'General', plug: 'input', type: 'string', - default: 'Noodl Viewer', + default: 'Fluxscape Viewer', tooltip: 'The title that web browsers show', ignoreInExport: true }, diff --git a/packages/noodl-viewer-react/static/viewer/global.d.ts.keep b/packages/noodl-viewer-react/static/viewer/global.d.ts.keep index e271bb1..e21e938 100644 --- a/packages/noodl-viewer-react/static/viewer/global.d.ts.keep +++ b/packages/noodl-viewer-react/static/viewer/global.d.ts.keep @@ -131,6 +131,59 @@ declare namespace Noodl { */ const Events: EventsApi; + type RecordQuery = + { + lessThan: T + } | + { + lessThanOrEqualTo: T + } | + { + greaterThan: T + } | + { + greaterThanOrEqualTo: T + } | + { + equalTo: T + } | + { + notEqualTo: T + } | + { + containedIn: T + } | + { + notContainedIn : T + } | + { + exists: T + } | + { + matchesRegex: T + } | + { + text: T + } | + { + idEqualTo: T + } | + { + idContainedIn: T + } | + { + pointsTo: T + } | + { + relatedTo: T + }; + + type RecordQueryField = T extends RecordQuery ? + { [K in keyof T]: { [P in K]: T[P] } & Partial, never>> }[keyof T] + : never; + + type RecordSortKey = (`${T}` | `-${T}`)[]; + interface RecordsApi { /** * This is an async function that will query the database using the query @@ -172,15 +225,17 @@ declare namespace Noodl { * }) * ``` */ - query( - className: RecordClassName, - query?: any, + query( + className: TClassName, + query?: + RecordQueryField<{ [K in keyof DatabaseSchema[TClassName]]: RecordQuery }> | + { and: RecordQueryField<{ [K in keyof DatabaseSchema[TClassName]]: RecordQuery }>[] }, options?: { limit?: number; skip?: number; - sort?: string[]; - include?: any; - select?: any; + sort?: string | RecordSortKey; + include?: string | (keyof DatabaseSchema[TClassName])[]; + select?: string | (keyof DatabaseSchema[TClassName])[]; } ): Promise;