-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
56 changed files
with
712 additions
and
575 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
54 changes: 2 additions & 52 deletions
54
vuu-ui/packages/vuu-layout/src/layout-reducer/layoutTypes.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
vuu-ui/packages/vuu-layout/src/layout-view/useViewBroadcastChannel.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
61 changes: 8 additions & 53 deletions
61
vuu-ui/packages/vuu-shell/src/application-provider/ApplicationContext.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,72 +1,27 @@ | ||
import type { VuuUser } from "@finos/vuu-utils"; | ||
import type { Settings, VuuUser } from "@finos/vuu-utils"; | ||
import { VuuRowDataItemType } from "@finos/vuu-protocol-types"; | ||
import { createContext } from "react"; | ||
import { SettingsSchema } from "../application-settings/SettingsForm"; | ||
import { VuuRowDataItemType } from "packages/vuu-protocol-types"; | ||
|
||
// export interface CoreSettings { | ||
// themeMode: ThemeMode; | ||
// } | ||
import { SettingsSchema } from "../user-settings"; | ||
|
||
const Guest: VuuUser = { | ||
username: "unknown", | ||
token: "", | ||
}; | ||
|
||
export interface ApplicationContextProps { | ||
onApplicationSettingChanged: ( | ||
onUserSettingChanged: ( | ||
propertyName: string, | ||
value: VuuRowDataItemType | ||
) => void; | ||
applicationSettings?: Record<string, string | number | boolean>; | ||
applicationSettingsSchema?: SettingsSchema; | ||
userSettings?: Settings; | ||
userSettingsSchema?: SettingsSchema; | ||
user: VuuUser; | ||
} | ||
|
||
export const ApplicationContext = createContext<ApplicationContextProps>({ | ||
onApplicationSettingChanged: (propertyName: string) => | ||
console.log( | ||
onUserSettingChanged: (propertyName: string) => | ||
console.warn( | ||
`Cannot change setting '${propertyName}'.\nDid you forget to declare an ApplicationProvider ?` | ||
), | ||
applicationSettings: { | ||
themeMode: "light", | ||
dateFormatPattern: "dd MMMM yyyy", | ||
region: "apac", | ||
greyscale: false, | ||
}, | ||
applicationSettingsSchema: { | ||
properties: [ | ||
{ | ||
name: "themeMode", | ||
label: "Mode", | ||
values: ["light", "dark"], | ||
defaultValue: "light", | ||
type: "string", | ||
}, | ||
{ | ||
name: "dateFormatPattern", | ||
label: "Date Formatting", | ||
values: ["dd/mm/yyyy", "mm/dd/yyyy", "dd MMMM yyyy"], | ||
defaultValue: "dd/mm/yyyy", | ||
type: "string", | ||
}, | ||
{ | ||
name: "region", | ||
label: "Region", | ||
values: [ | ||
{ value: "us", label: "US" }, | ||
{ value: "apac", label: "Asia Pacific" }, | ||
{ value: "emea", label: "Europe, Middle East & Africa" }, | ||
], | ||
defaultValue: "apac", | ||
type: "string", | ||
}, | ||
{ | ||
name: "greyscale", | ||
label: "Greyscale", | ||
defaultValue: false, | ||
type: "boolean", | ||
}, | ||
], | ||
}, | ||
user: Guest, | ||
}); |
Oops, something went wrong.