Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions ags-validator-app/app/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
--secondary-foreground: 0 0% 0%;
--alternative: 30 100% 30%;
--alternative-foreground: 0 0% 100%;
--muted: 207 86 95%;
--muted: 207 86% 95%;
--muted-foreground: 0 0% 0%;
--accent: 0 0% 96%;
--accent-foreground: 0 0% 0%;
Expand Down Expand Up @@ -47,7 +47,7 @@
--secondary-foreground: 0 0% 98%;
--alternative: 30 100% 30%;
--alternative-foreground: 0 0% 100%;
--muted: 207 90 3%;
--muted: 207 90% 3%;
--muted-foreground: 0 0% 85%;
--accent: 0 0% 20%;
--accent-foreground: 0 0% 98%;
Expand Down
17 changes: 9 additions & 8 deletions ags-validator-app/components/mobile-nav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,15 @@ export function MobileNav() {
<p className="text-sm text-muted-foreground">
Visit our website to learn more about GroundUp.
</p>
<Link href="https://www.groundup.cloud">
<Button asChild size="sm">
<div className="flex flex-row gap-2">
<ExternalLink className="w-4 h-4" />
GroundUp
</div>
</Button>
</Link>
<Button asChild size="sm">
<Link
href="https://www.groundup.cloud"
className="flex flex-row gap-2"
>
<ExternalLink className="w-4 h-4" />
GroundUp
</Link>
</Button>
</div>
<Separator className="my-2" />

Expand Down
5 changes: 0 additions & 5 deletions ags-validator-app/components/validator/GridView/GridView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,6 @@ const GridView: React.FC<Props> = ({
}
}, [selection, setSelectedRows]);

console.log("theme", customTheme);

const scrollToError = useCallback(
(error: AgsError) => {
if (group.name !== error.group) {
Expand Down Expand Up @@ -203,8 +201,6 @@ const GridView: React.FC<Props> = ({
dispatch(applySetRowDataEffect());
};

const onCellEdited = () => {};

const getData = useCallback(
([colNum, rowNum]: Item): GridCell => {
const lineNumber = group.lineNumber + 4 + rowNum;
Expand Down Expand Up @@ -290,7 +286,6 @@ const GridView: React.FC<Props> = ({
columns={columns}
getCellContent={getData}
getCellsForSelection={true}
onCellEdited={onCellEdited}
rows={Object.keys(group.rows).length}
onPaste={onPaste}
maxColumnAutoWidth={200}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,11 @@ const CodeMirrorTextArea: React.FC<CodeMirrorTextAreaProps> = ({
setGoToErrorCallback,
}) => {
const { theme } = useTheme();
const isDark = theme === "dark";
const agsData = useAppSelector((state) => state.ags.rawData);
const errors = useAppSelector((state) => state.ags.errors);
const dispatch = useAppDispatch();

const isDark = theme === "dark";

const errorLines = errors?.map((error) => error.lineNumber);

const editorRef = useRef<EditorView | null>(null);
Expand Down Expand Up @@ -61,9 +60,7 @@ const CodeMirrorTextArea: React.FC<CodeMirrorTextAreaProps> = ({
[errorLines]
);

const themeDemo = useMemo(
() =>
EditorView.baseTheme({
const themeDemo = EditorView.baseTheme({
"&": {
backgroundColor: "transparent",
},
Expand Down Expand Up @@ -124,9 +121,7 @@ const CodeMirrorTextArea: React.FC<CodeMirrorTextAreaProps> = ({
".cm-string": { color: "hsl(var(--success))" },
".cm-number": { color: "hsl(var(--warning))" },
".cm-comment": { color: "hsl(var(--muted-foreground))" },
}),
[]
);
});

return (
<div className="h-full w-full flex flex-col overflow-auto">
Expand Down
7 changes: 0 additions & 7 deletions ags-validator-app/hooks/useGridTheme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,6 @@ export const useGridTheme = () => {
? `hsla(${formattedH}, ${formattedS}, ${formattedL}, ${opacity})`
: `hsl(${formattedH}, ${formattedS}, ${formattedL})`;

console.log(`Getting CSS var ${variableName}:`, {
rawValue: value,
opacity,
result,
components: { h: formattedH, s: formattedS, l: formattedL },
});

return result;
}

Expand Down
7 changes: 2 additions & 5 deletions ags-validator-app/lib/redux/ags.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,6 @@ type AgsState = {
agsDictionaryVersion: AgsDictionaryVersion;
past: HistoryAction[];
future: HistoryAction[];
canUndo: boolean;
canRedo: boolean;
};

interface SetRowDataPayload {
Expand All @@ -66,8 +64,6 @@ const initialState: AgsState = {
loading: false,
agsDictionaryVersion: "v4_0_4",

canUndo: false,
canRedo: false,
past: [],
future: [],
rulesConfig: {
Expand Down Expand Up @@ -127,6 +123,7 @@ export const applySetRowDataEffect = createAsyncThunk<
return new Promise<{ rawData: string; errors: AgsError[] }>((resolve) => {
worker.onmessage = (event) => {
const { rawData, errors } = event.data;
worker.terminate();
resolve({ rawData, errors });
};

Expand Down Expand Up @@ -156,7 +153,7 @@ export const applySetRawDataEffect = createAsyncThunk<
}>((resolve) => {
worker.onmessage = (event) => {
const { parsedAgsNormalized, errors } = event.data;

worker.terminate();
resolve({ parsedAgsNormalized, errors });
};

Expand Down
2 changes: 1 addition & 1 deletion ags-validator-app/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
"allowJs": true,
"skipLibCheck": true,
"noEmit": true,
"moduleResolution": "node",
"moduleResolution": "bundler",
"resolveJsonModule": true,
"isolatedModules": true
},
Expand Down
2 changes: 1 addition & 1 deletion ags/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@groundup-dev/ags",
"version": "0.2.2",
"version": "0.2.3",
"type": "module",
"main": "./dist/index.js",
"module": "./dist/index.js",
Expand Down
2 changes: 1 addition & 1 deletion ags/src/rules/rulesForParsedAgs/checkGroupAndHeadings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export const rule19: AgsValidationStepParsed = {
// Rule 19a A HEADING name shall not be more than 9 characters long and shall consist of uppercase letters,
// numbers or the underscore character only.
export const rule19a: AgsValidationStepParsed = {
rule: 19,
rule: "19a",
description:
"A HEADING name shall not be more than 9 characters long and shall consist of uppercase letters, numbers or the underscore character only.",
validate: function (ags: AgsRaw): AgsError[] {
Expand Down
2 changes: 0 additions & 2 deletions ags/src/validate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ export type RulesConfig = {
[key in RuleName]: boolean;
};

// happy to overwrite ts here

export const defaultRulesConfig = Object.fromEntries(
[
...Object.keys(rulesForParsedAgs),
Expand Down
6 changes: 3 additions & 3 deletions ags/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"compilerOptions": {
"target": "ES2018",
"target": "ES2019",
"module": "ESNext",
"moduleResolution": "node",
"lib": ["ES2018", "DOM"],
"moduleResolution": "bundler",
"lib": ["ES2019", "DOM"],
"declaration": true,
"declarationMap": true,
"sourceMap": true,
Expand Down
Loading