Updates
This commit is contained in:
parent
b037cec100
commit
20959c3580
@ -1,4 +1,3 @@
|
|||||||
import { AceEditorAcceptedModes } from "@/components/general/data/partials/EditDataListButton";
|
|
||||||
import React, { MutableRefObject } from "react";
|
import React, { MutableRefObject } from "react";
|
||||||
import { twMerge } from "tailwind-merge";
|
import { twMerge } from "tailwind-merge";
|
||||||
|
|
||||||
@ -9,7 +8,7 @@ export type AceEditorComponentType = {
|
|||||||
ctrlEnterFn?: (editor: AceAjax.Editor) => void;
|
ctrlEnterFn?: (editor: AceAjax.Editor) => void;
|
||||||
content?: string;
|
content?: string;
|
||||||
placeholder?: string;
|
placeholder?: string;
|
||||||
mode?: AceEditorAcceptedModes;
|
mode?: any;
|
||||||
fontSize?: string;
|
fontSize?: string;
|
||||||
previewMode?: boolean;
|
previewMode?: boolean;
|
||||||
onChange?: (value: string) => void;
|
onChange?: (value: string) => void;
|
||||||
|
@ -2,7 +2,7 @@ import React from "react";
|
|||||||
import Link from "../layout/Link";
|
import Link from "../layout/Link";
|
||||||
import Divider from "../layout/Divider";
|
import Divider from "../layout/Divider";
|
||||||
import Row from "../layout/Row";
|
import Row from "../layout/Row";
|
||||||
import lowerToTitleCase from "@/server-client-shared/utils/lower-to-title-case";
|
import lowerToTitleCase from "../utils/lower-to-title-case";
|
||||||
|
|
||||||
type LinkObject = {
|
type LinkObject = {
|
||||||
title: string;
|
title: string;
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
import { AuthCsrfHeaderName } from "@/server-client-shared/types/admin/auth";
|
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
|
|
||||||
type FetchApiOptions = {
|
type FetchApiOptions = {
|
||||||
@ -18,7 +17,7 @@ type FetchApiOptions = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
type FetchHeader = HeadersInit & {
|
type FetchHeader = HeadersInit & {
|
||||||
[key in AuthCsrfHeaderName]?: string | null;
|
[key: string]: string | null;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type FetchApiReturn = {
|
export type FetchApiReturn = {
|
||||||
|
9
components/lib/utils/lower-to-title-case.ts
Normal file
9
components/lib/utils/lower-to-title-case.ts
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
export default function lowerToTitleCase(str: string) {
|
||||||
|
return str
|
||||||
|
.replace(/_|-/g, " ")
|
||||||
|
.split(" ")
|
||||||
|
.map(
|
||||||
|
(word) => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase()
|
||||||
|
)
|
||||||
|
.join(" ");
|
||||||
|
}
|
@ -10,6 +10,7 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@moduletrace/datasquirel": "^2.7.4",
|
"@moduletrace/datasquirel": "^2.7.4",
|
||||||
|
"lodash": "^4.17.21",
|
||||||
"lucide-react": "^0.462.0",
|
"lucide-react": "^0.462.0",
|
||||||
"next": "15.0.3",
|
"next": "15.0.3",
|
||||||
"react": "19.0.0-rc-66855b96-20241106",
|
"react": "19.0.0-rc-66855b96-20241106",
|
||||||
@ -17,11 +18,12 @@
|
|||||||
"tailwind-merge": "^2.5.5"
|
"tailwind-merge": "^2.5.5"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"typescript": "^5",
|
"@types/lodash": "^4.17.13",
|
||||||
"@types/node": "^20",
|
"@types/node": "^20",
|
||||||
"@types/react": "^18",
|
"@types/react": "^18",
|
||||||
"@types/react-dom": "^18",
|
"@types/react-dom": "^18",
|
||||||
"postcss": "^8",
|
"postcss": "^8",
|
||||||
"tailwindcss": "^3.4.1"
|
"tailwindcss": "^3.4.1",
|
||||||
|
"typescript": "^5"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user