@ -> lib
This commit is contained in:
parent
005f0f69d1
commit
4d75c90b4d
12
charts.ts
12
charts.ts
|
|
@ -1,6 +1,6 @@
|
||||||
export { AreaChart } from "@/comps/charts/area";
|
export { AreaChart } from "lib/comps/charts/area";
|
||||||
export { BarChart } from "@/comps/charts/bar";
|
export { BarChart } from "lib/comps/charts/bar";
|
||||||
export { DoughnutChart } from "@/comps/charts/doughnut";
|
export { DoughnutChart } from "lib/comps/charts/doughnut";
|
||||||
export { LineChart } from "@/comps/charts/line";
|
export { LineChart } from "lib/comps/charts/line";
|
||||||
export { PieChart } from "@/comps/charts/pie";
|
export { PieChart } from "lib/comps/charts/pie";
|
||||||
export { PolarAreaChart } from "@/comps/charts/polar";
|
export { PolarAreaChart } from "lib/comps/charts/polar";
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { useLocal } from "@/utils/use-local";
|
import { useLocal } from "lib/utils/use-local";
|
||||||
import { FC, useEffect } from "react";
|
import { FC, useEffect } from "react";
|
||||||
import { loadChart } from "./loader";
|
import { loadChart } from "./loader";
|
||||||
import type { Line } from "react-chartjs-2";
|
import type { Line } from "react-chartjs-2";
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { useLocal } from "@/utils/use-local";
|
import { useLocal } from "lib/utils/use-local";
|
||||||
import { FC, useEffect } from "react";
|
import { FC, useEffect } from "react";
|
||||||
import { loadChart } from "./loader";
|
import { loadChart } from "./loader";
|
||||||
import type { Bar } from "react-chartjs-2";
|
import type { Bar } from "react-chartjs-2";
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { useLocal } from "@/utils/use-local";
|
import { useLocal } from "lib/utils/use-local";
|
||||||
import { FC, useEffect } from "react";
|
import { FC, useEffect } from "react";
|
||||||
import { loadChart } from "./loader";
|
import { loadChart } from "./loader";
|
||||||
import type { Doughnut } from "react-chartjs-2";
|
import type { Doughnut } from "react-chartjs-2";
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { useLocal } from "@/utils/use-local";
|
import { useLocal } from "lib/utils/use-local";
|
||||||
import { FC, useEffect } from "react";
|
import { FC, useEffect } from "react";
|
||||||
import { loadChart } from "./loader";
|
import { loadChart } from "./loader";
|
||||||
import type { Line } from "react-chartjs-2";
|
import type { Line } from "react-chartjs-2";
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { useLocal } from "@/utils/use-local";
|
import { useLocal } from "lib/utils/use-local";
|
||||||
import { FC, useEffect } from "react";
|
import { FC, useEffect } from "react";
|
||||||
import { loadChart } from "./loader";
|
import { loadChart } from "./loader";
|
||||||
import type { Pie } from "react-chartjs-2";
|
import type { Pie } from "react-chartjs-2";
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { useLocal } from "@/utils/use-local";
|
import { useLocal } from "lib/utils/use-local";
|
||||||
import { FC, useEffect } from "react";
|
import { FC, useEffect } from "react";
|
||||||
import { loadChart } from "./loader";
|
import { loadChart } from "./loader";
|
||||||
import type { PolarArea } from "react-chartjs-2";
|
import type { PolarArea } from "react-chartjs-2";
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { useLocal } from "@/utils/use-local";
|
import { useLocal } from "lib/utils/use-local";
|
||||||
import { FC, ReactNode, useEffect } from "react";
|
import { FC, ReactNode, useEffect } from "react";
|
||||||
import { FieldLoading } from "../ui/field-loading";
|
import { FieldLoading } from "../ui/field-loading";
|
||||||
import { ChevronLeft } from "lucide-react";
|
import { ChevronLeft } from "lucide-react";
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import { FC, ReactNode, isValidElement, useEffect } from "react";
|
import { FC, ReactNode, isValidElement, useEffect } from "react";
|
||||||
import * as card from "../ui/card";
|
import * as card from "../ui/card";
|
||||||
import { cn } from "@/utils";
|
import { cn } from "lib/utils";
|
||||||
import { useLocal } from "@/utils/use-local";
|
import { useLocal } from "lib/utils/use-local";
|
||||||
import { Skeleton } from "../ui/skeleton";
|
import { Skeleton } from "../ui/skeleton";
|
||||||
|
|
||||||
export const Card: FC<{
|
export const Card: FC<{
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ import {
|
||||||
CarouselNext,
|
CarouselNext,
|
||||||
CarouselPrevious,
|
CarouselPrevious,
|
||||||
Carousel as SCarousel,
|
Carousel as SCarousel,
|
||||||
} from "@/comps/ui/carousel";
|
} from "lib/comps/ui/carousel";
|
||||||
import { FC } from "react";
|
import { FC } from "react";
|
||||||
|
|
||||||
export const Carousel: FC<{ list: any[] }> = ({ list }) => {
|
export const Carousel: FC<{ list: any[] }> = ({ list }) => {
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { useLocal } from "@/utils/use-local";
|
import { useLocal } from "lib/utils/use-local";
|
||||||
import { cx } from "class-variance-authority";
|
import { cx } from "class-variance-authority";
|
||||||
import { ArrowRight } from "lucide-react";
|
import { ArrowRight } from "lucide-react";
|
||||||
import { FC } from "react";
|
import { FC } from "react";
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { useLocal } from "@/utils/use-local";
|
import { useLocal } from "lib/utils/use-local";
|
||||||
import { FC, ReactNode, useEffect } from "react";
|
import { FC, ReactNode, useEffect } from "react";
|
||||||
import { Skeleton } from "../ui/skeleton";
|
import { Skeleton } from "../ui/skeleton";
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { useLocal } from "@/utils/use-local";
|
import { useLocal } from "lib/utils/use-local";
|
||||||
import { FC, ReactNode, useEffect } from "react";
|
import { FC, ReactNode, useEffect } from "react";
|
||||||
import { Skeleton } from "../ui/skeleton";
|
import { Skeleton } from "../ui/skeleton";
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,8 +6,8 @@ import {
|
||||||
NavigationMenuList,
|
NavigationMenuList,
|
||||||
NavigationMenuTrigger,
|
NavigationMenuTrigger,
|
||||||
navigationMenuTriggerStyle,
|
navigationMenuTriggerStyle,
|
||||||
} from "@/comps/ui/navigation-menu";
|
} from "lib/comps/ui/navigation-menu";
|
||||||
import { useLocal } from "@/utils/use-local";
|
import { useLocal } from "lib/utils/use-local";
|
||||||
import get from "lodash.get";
|
import get from "lodash.get";
|
||||||
import { FC, forwardRef } from "react";
|
import { FC, forwardRef } from "react";
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import { FC, ReactNode, useEffect } from "react";
|
import { FC, ReactNode, useEffect } from "react";
|
||||||
import { Tabs, TabsList, TabsTrigger } from "../ui/tabs";
|
import { Tabs, TabsList, TabsTrigger } from "../ui/tabs";
|
||||||
import { useLocal } from "@/utils/use-local";
|
import { useLocal } from "lib/utils/use-local";
|
||||||
|
|
||||||
export const ShowHidePanel: FC<{
|
export const ShowHidePanel: FC<{
|
||||||
head: ReactNode;
|
head: ReactNode;
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import { FC, useEffect } from "react";
|
import { FC, useEffect } from "react";
|
||||||
import { Tabs, TabsList, TabsTrigger } from "../ui/tabs";
|
import { Tabs, TabsList, TabsTrigger } from "../ui/tabs";
|
||||||
import { useLocal } from "@/utils/use-local";
|
import { useLocal } from "lib/utils/use-local";
|
||||||
|
|
||||||
export const Tab: FC<{
|
export const Tab: FC<{
|
||||||
tabs: (arg: { count: (string | number)[] }) => {
|
tabs: (arg: { count: (string | number)[] }) => {
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { useLocal } from "@/utils/use-local";
|
import { useLocal } from "lib/utils/use-local";
|
||||||
import { icon } from "../icon";
|
import { icon } from "../icon";
|
||||||
import { FC } from "react";
|
import { FC } from "react";
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { useLocal } from "@/utils/use-local";
|
import { useLocal } from "lib/utils/use-local";
|
||||||
import { glb } from "app/lib/goal";
|
import { glb } from "app/lib/goal";
|
||||||
import { Button } from "lib/comps/ui/button";
|
import { Button } from "lib/comps/ui/button";
|
||||||
import {
|
import {
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ import { BaseForm } from "../form/base/BaseForm";
|
||||||
import { FilterLocal } from "./utils/types";
|
import { FilterLocal } from "./utils/types";
|
||||||
import { useLocal } from "lib/utils/use-local";
|
import { useLocal } from "lib/utils/use-local";
|
||||||
import { getFilter } from "./utils/get-filter";
|
import { getFilter } from "./utils/get-filter";
|
||||||
import { FieldLoading, FMLocal } from "lib/exports";
|
import { FMLocal } from "../form/typings";
|
||||||
|
|
||||||
export const FilterContent: FC<{
|
export const FilterContent: FC<{
|
||||||
mode: string;
|
mode: string;
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,10 @@
|
||||||
import { useLocal } from "@/utils/use-local";
|
import { useLocal } from "lib/utils/use-local";
|
||||||
import { FC, ReactNode } from "react";
|
import { FC, ReactNode } from "react";
|
||||||
import { FMLocal, GenField } from "../form/typings";
|
import { FMLocal, GenField } from "../form/typings";
|
||||||
import { FilterContent } from "./FilterContent";
|
import { FilterContent } from "./FilterContent";
|
||||||
import { getFilter } from "./utils/get-filter";
|
import { getFilter } from "./utils/get-filter";
|
||||||
import { default_filter_local } from "./utils/types";
|
import { default_filter_local } from "./utils/types";
|
||||||
import { FieldLoading } from "lib/exports";
|
import { FieldLoading } from "../ui/field-loading";
|
||||||
|
|
||||||
type FilterMode = "raw" | "inline";
|
type FilterMode = "raw" | "inline";
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { isEmptyString } from "../../../utils/is-empty-string";
|
import { isEmptyString } from "lib/utils/is-empty-string";
|
||||||
|
|
||||||
export const softDeleteFilter = (
|
export const softDeleteFilter = (
|
||||||
where: any,
|
where: any,
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { useLocal } from "@/utils/use-local";
|
import { useLocal } from "lib/utils/use-local";
|
||||||
import { FC, useEffect, useRef } from "react";
|
import { FC, useEffect, useRef } from "react";
|
||||||
import { createPortal } from "react-dom";
|
import { createPortal } from "react-dom";
|
||||||
import { Toaster } from "sonner";
|
import { Toaster } from "sonner";
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
import { ReactNode, useCallback, useEffect, useState } from "react";
|
|
||||||
import { BaseFormLocal, default_base_form_local } from "./types";
|
|
||||||
import { useLocal } from "lib/utils/use-local";
|
import { useLocal } from "lib/utils/use-local";
|
||||||
import { FieldLocal, FieldProp, fieldType, FMLocal } from "../typings";
|
import { ReactNode, useCallback, useEffect } from "react";
|
||||||
import { FieldLoading } from "lib/exports";
|
import { FieldLocal, FieldProp, FMLocal } from "../typings";
|
||||||
|
import { BaseFormLocal, default_base_form_local } from "./types";
|
||||||
|
import { FieldLoading } from "lib/comps/ui/field-loading";
|
||||||
|
|
||||||
export type BaseFormProps<T> = {
|
export type BaseFormProps<T> = {
|
||||||
data: T;
|
data: T;
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
import { useLocal } from "@/utils/use-local";
|
import { useLocal } from "lib/utils/use-local";
|
||||||
import { call_prasi_events } from "lib/exports";
|
|
||||||
import { hashSum } from "lib/utils/hash-sum";
|
import { hashSum } from "lib/utils/hash-sum";
|
||||||
import { FC, useEffect } from "react";
|
import { FC, useEffect } from "react";
|
||||||
import { FieldProp } from "../typings";
|
import { FieldProp } from "../typings";
|
||||||
|
|
@ -7,6 +6,7 @@ import { useField } from "../utils/use-field";
|
||||||
import { validate } from "../utils/validate";
|
import { validate } from "../utils/validate";
|
||||||
import { FieldInput } from "./FieldInput";
|
import { FieldInput } from "./FieldInput";
|
||||||
import { Label } from "./Label";
|
import { Label } from "./Label";
|
||||||
|
import { call_prasi_events } from "lib/utils/prasi-events";
|
||||||
|
|
||||||
const prepForSum = (obj: any): any => {
|
const prepForSum = (obj: any): any => {
|
||||||
if (Array.isArray(obj)) {
|
if (Array.isArray(obj)) {
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import { FC, useEffect } from "react";
|
import { FC, useEffect } from "react";
|
||||||
import { FMLocal, FieldLocal, FieldProp } from "../../typings";
|
import { FMLocal, FieldLocal, FieldProp } from "../../typings";
|
||||||
import { useLocal } from "@/utils/use-local";
|
import { useLocal } from "lib/utils/use-local";
|
||||||
import get from "lodash.get";
|
import get from "lodash.get";
|
||||||
|
|
||||||
export const FieldButton: FC<{
|
export const FieldButton: FC<{
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,7 @@
|
||||||
import { useLocal } from "@/utils/use-local";
|
import { useLocal } from "lib/utils/use-local";
|
||||||
import get from "lodash.get";
|
|
||||||
import { FC, useEffect } from "react";
|
import { FC, useEffect } from "react";
|
||||||
import { FMLocal, FieldLocal, FieldProp } from "../../typings";
|
import { FMLocal, FieldLocal, FieldProp } from "../../typings";
|
||||||
import { Button } from "../../../../..";
|
import { Button } from "lib/comps/ui/button";
|
||||||
|
|
||||||
export const FieldCheckbox: FC<{
|
export const FieldCheckbox: FC<{
|
||||||
field: FieldLocal;
|
field: FieldLocal;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { useLocal } from "@/utils/use-local";
|
import { useLocal } from "lib/utils/use-local";
|
||||||
import { FC, isValidElement } from "react";
|
import { FC, isValidElement } from "react";
|
||||||
import { FMLocal, FieldLocal } from "../../typings";
|
import { FMLocal, FieldLocal } from "../../typings";
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { useLocal } from "@/utils/use-local";
|
import { useLocal } from "lib/utils/use-local";
|
||||||
import { FieldLoading } from "lib/comps/ui/field-loading";
|
import { FieldLoading } from "lib/comps/ui/field-loading";
|
||||||
import { Typeahead } from "lib/comps/ui/typeahead";
|
import { Typeahead } from "lib/comps/ui/typeahead";
|
||||||
import { FC, useEffect } from "react";
|
import { FC, useEffect } from "react";
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import { AutoHeightTextarea } from "@/comps/custom/AutoHeightTextarea";
|
import { AutoHeightTextarea } from "lib/comps/custom/AutoHeightTextarea";
|
||||||
import { useLocal } from "@/utils/use-local";
|
import { useLocal } from "lib/utils/use-local";
|
||||||
import parser from "any-date-parser";
|
import parser from "any-date-parser";
|
||||||
import Datepicker from "lib/comps/custom/Datepicker";
|
import Datepicker from "lib/comps/custom/Datepicker";
|
||||||
import { EyeIcon, EyeOff } from "lucide-react";
|
import { EyeIcon, EyeOff } from "lucide-react";
|
||||||
|
|
|
||||||
|
|
@ -4,11 +4,10 @@ import { FieldLoading, Spinner } from "lib/comps/ui/field-loading";
|
||||||
import { hashSum } from "lib/utils/hash-sum";
|
import { hashSum } from "lib/utils/hash-sum";
|
||||||
import { getPathname } from "lib/utils/pathname";
|
import { getPathname } from "lib/utils/pathname";
|
||||||
import { useLocal } from "lib/utils/use-local";
|
import { useLocal } from "lib/utils/use-local";
|
||||||
import { ArrowUpRight, Construction, Cuboid, Loader } from "lucide-react";
|
import { ArrowUpRight, Construction } from "lucide-react";
|
||||||
import { FC, ReactNode, useEffect } from "react";
|
import { FC, ReactNode, useEffect } from "react";
|
||||||
import { FMLocal, FieldLocal, FieldProp } from "../../typings";
|
import { FMLocal, FieldLocal, FieldProp } from "../../typings";
|
||||||
|
import { link_cache } from "lib/utils/fetch-link-params";
|
||||||
const link_cache = {} as Record<string, any>;
|
|
||||||
|
|
||||||
export const FieldLink: FC<{
|
export const FieldLink: FC<{
|
||||||
field: FieldLocal;
|
field: FieldLocal;
|
||||||
|
|
@ -235,42 +234,3 @@ const navigateLink = async (
|
||||||
navigate(`${link.url}#lnk=${prev_link + vhash}`);
|
navigate(`${link.url}#lnk=${prev_link + vhash}`);
|
||||||
return true;
|
return true;
|
||||||
};
|
};
|
||||||
|
|
||||||
export const parseLink = () => {
|
|
||||||
const lnk = location.hash.split("#").find((e) => e.startsWith("lnk="));
|
|
||||||
|
|
||||||
if (lnk) {
|
|
||||||
const res = lnk.split("=").pop() || "";
|
|
||||||
if (res) {
|
|
||||||
return res.split("+");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return [];
|
|
||||||
};
|
|
||||||
|
|
||||||
export const lastParams = async () => {
|
|
||||||
const parsed = parseLink();
|
|
||||||
if (parsed.length > 0) {
|
|
||||||
const res = await fetchLinkParams([parsed.pop() || ""]);
|
|
||||||
return res[0];
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
};
|
|
||||||
|
|
||||||
export const fetchLinkParams = async (
|
|
||||||
parsed_link?: ReturnType<typeof parseLink>
|
|
||||||
) => {
|
|
||||||
const parsed = parsed_link || parseLink();
|
|
||||||
|
|
||||||
return await Promise.all(
|
|
||||||
parsed.map(async (e) => {
|
|
||||||
if (link_cache[e]) {
|
|
||||||
return link_cache[e] as LinkParam;
|
|
||||||
}
|
|
||||||
|
|
||||||
const result = await api._kv("get", e);
|
|
||||||
link_cache[e] = result;
|
|
||||||
return result as unknown as LinkParam;
|
|
||||||
})
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { useLocal } from "@/utils/use-local";
|
import { useLocal } from "lib/utils/use-local";
|
||||||
import { FC, useEffect } from "react";
|
import { FC, useEffect } from "react";
|
||||||
import { FMLocal, FieldLocal, FieldProp } from "../../typings";
|
import { FMLocal, FieldLocal, FieldProp } from "../../typings";
|
||||||
import { PropTypeInput } from "./TypeInput";
|
import { PropTypeInput } from "./TypeInput";
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { useLocal } from "@/utils/use-local";
|
import { useLocal } from "lib/utils/use-local";
|
||||||
import get from "lodash.get";
|
import get from "lodash.get";
|
||||||
import { FC, useEffect } from "react";
|
import { FC, useEffect } from "react";
|
||||||
import { FMLocal, FieldLocal, FieldProp } from "../../typings";
|
import { FMLocal, FieldLocal, FieldProp } from "../../typings";
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { useLocal } from "@/utils/use-local";
|
import { useLocal } from "lib/utils/use-local";
|
||||||
import Quill from "quill";
|
import Quill from "quill";
|
||||||
import "quill/dist/quill.snow.css"; // Import CSS untuk tema Quill
|
import "quill/dist/quill.snow.css"; // Import CSS untuk tema Quill
|
||||||
import { FC, useEffect } from "react";
|
import { FC, useEffect } from "react";
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { useLocal } from "@/utils/use-local";
|
import { useLocal } from "lib/utils/use-local";
|
||||||
import get from "lodash.get";
|
import get from "lodash.get";
|
||||||
import { FC, useEffect } from "react";
|
import { FC, useEffect } from "react";
|
||||||
import { FMLocal, FieldLocal, FieldProp } from "../../typings";
|
import { FMLocal, FieldLocal, FieldProp } from "../../typings";
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { useLocal } from "@/utils/use-local";
|
import { useLocal } from "lib/utils/use-local";
|
||||||
import { FC } from "react";
|
import { FC } from "react";
|
||||||
|
|
||||||
export type PropTypeSwitch = {};
|
export type PropTypeSwitch = {};
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { useLocal } from "@/utils/use-local";
|
import { useLocal } from "lib/utils/use-local";
|
||||||
import { Typeahead } from "lib/comps/ui/typeahead";
|
import { Typeahead } from "lib/comps/ui/typeahead";
|
||||||
import { FC } from "react";
|
import { FC } from "react";
|
||||||
import { FMLocal, FieldLocal, FieldProp } from "../../typings";
|
import { FMLocal, FieldLocal, FieldProp } from "../../typings";
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { useLocal } from "@/utils/use-local";
|
import { useLocal } from "lib/utils/use-local";
|
||||||
import get from "lodash.get";
|
import get from "lodash.get";
|
||||||
import { FC, useEffect } from "react";
|
import { FC, useEffect } from "react";
|
||||||
import { FMLocal, FieldLocal, FieldProp } from "../../typings";
|
import { FMLocal, FieldLocal, FieldProp } from "../../typings";
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { useLocal } from "@/utils/use-local";
|
import { useLocal } from "lib/utils/use-local";
|
||||||
import { Spinner } from "lib/comps/ui/field-loading";
|
import { Spinner } from "lib/comps/ui/field-loading";
|
||||||
import { Tooltip } from "lib/comps/ui/tooltip";
|
import { Tooltip } from "lib/comps/ui/tooltip";
|
||||||
import get from "lodash.get";
|
import get from "lodash.get";
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { useLocal } from "@/utils/use-local";
|
import { useLocal } from "lib/utils/use-local";
|
||||||
import get from "lodash.get";
|
import get from "lodash.get";
|
||||||
import { Loader2, Paperclip, Trash2, Upload } from "lucide-react";
|
import { Loader2, Paperclip, Trash2, Upload } from "lucide-react";
|
||||||
import { ChangeEvent, FC } from "react";
|
import { ChangeEvent, FC } from "react";
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
import { GFCol } from "@/gen/utils";
|
import { GFCol } from "lib/gen/utils";
|
||||||
import { FC, MutableRefObject, ReactElement, ReactNode } from "react";
|
import { FC, ReactElement, ReactNode } from "react";
|
||||||
import { editorFormData } from "./utils/ed-data";
|
import { editorFormData } from "./utils/ed-data";
|
||||||
import { MDLocal } from "../md/utils/typings";
|
|
||||||
|
|
||||||
export type FMProps = {
|
export type FMProps = {
|
||||||
on_init: (arg: { fm: FMLocal; submit: any; reload: any }) => any;
|
on_init: (arg: { fm: FMLocal; submit: any; reload: any }) => any;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { parseGenField } from "@/gen/utils";
|
import { parseGenField } from "lib/gen/utils";
|
||||||
import { MDLocal } from "lib/comps/md/utils/typings";
|
import { MDLocal } from "lib/comps/md/utils/typings";
|
||||||
import { Button } from "lib/comps/ui/button";
|
import { Button } from "lib/comps/ui/button";
|
||||||
import { toast } from "lib/comps/ui/toast";
|
import { toast } from "lib/comps/ui/toast";
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { useLocal } from "@/utils/use-local";
|
import { useLocal } from "lib/utils/use-local";
|
||||||
import { useEffect, useRef } from "react";
|
import { useEffect, useRef } from "react";
|
||||||
import { FieldInternal, FieldProp } from "../typings";
|
import { FieldInternal, FieldProp } from "../typings";
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { useLocal } from "@/utils/use-local";
|
import { useLocal } from "lib/utils/use-local";
|
||||||
import { FC, useEffect } from "react";
|
import { FC, useEffect } from "react";
|
||||||
import * as XLSX from "xlsx";
|
import * as XLSX from "xlsx";
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { useLocal } from "@/utils/use-local";
|
import { useLocal } from "lib/utils/use-local";
|
||||||
import { FC, MouseEvent } from "react";
|
import { FC, MouseEvent } from "react";
|
||||||
// import ExcelJS from "exceljs";
|
// import ExcelJS from "exceljs";
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import { GFCol } from "@/gen/utils";
|
import { GFCol } from "lib/gen/utils";
|
||||||
import { useLocal } from "@/utils/use-local";
|
import { useLocal } from "lib/utils/use-local";
|
||||||
import { ChangeEvent, FC, MouseEvent } from "react";
|
import { ChangeEvent, FC, MouseEvent } from "react";
|
||||||
// import { Workbook } from 'exceljs';
|
// import { Workbook } from 'exceljs';
|
||||||
// import * as XLSX from "xlsx";
|
// import * as XLSX from "xlsx";
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import { GFCol, parseGenField } from "@/gen/utils";
|
import { GFCol, parseGenField } from "lib/gen/utils";
|
||||||
import { cn } from "@/utils";
|
import { cn } from "lib/utils";
|
||||||
import { fields_map } from "@/utils/format-value";
|
import { fields_map } from "lib/utils/format-value";
|
||||||
import { useLocal } from "@/utils/use-local";
|
import { useLocal } from "lib/utils/use-local";
|
||||||
import { set } from "lib/utils/set";
|
import { set } from "lib/utils/set";
|
||||||
import get from "lodash.get";
|
import get from "lodash.get";
|
||||||
import {
|
import {
|
||||||
|
|
@ -29,17 +29,16 @@ import DataGrid, {
|
||||||
import "react-data-grid/lib/styles.css";
|
import "react-data-grid/lib/styles.css";
|
||||||
import { createPortal } from "react-dom";
|
import { createPortal } from "react-dom";
|
||||||
import { Toaster } from "sonner";
|
import { Toaster } from "sonner";
|
||||||
import { call_prasi_events } from "../../..";
|
|
||||||
import { filterWhere } from "../filter/parser/filter-where";
|
import { filterWhere } from "../filter/parser/filter-where";
|
||||||
import { getFilter } from "../filter/utils/get-filter";
|
import { getFilter } from "../filter/utils/get-filter";
|
||||||
import { MDLocal } from "../md/utils/typings";
|
import { MDLocal } from "../md/utils/typings";
|
||||||
import { Skeleton } from "../ui/skeleton";
|
import { Skeleton } from "../ui/skeleton";
|
||||||
import { toast } from "../ui/toast";
|
import { toast } from "../ui/toast";
|
||||||
import { sortTree } from "./utils/sort-tree";
|
|
||||||
import { TLList } from "./TLList";
|
import { TLList } from "./TLList";
|
||||||
import { OnRowClick } from "./utils/type";
|
|
||||||
import { TLSlider } from "./TLSlider";
|
import { TLSlider } from "./TLSlider";
|
||||||
import { getPathname } from "lib/exports";
|
import { sortTree } from "./utils/sort-tree";
|
||||||
|
import { OnRowClick } from "./utils/type";
|
||||||
|
import { call_prasi_events } from "lib/utils/prasi-events";
|
||||||
|
|
||||||
let EMPTY_SET = new Set() as ReadonlySet<any>;
|
let EMPTY_SET = new Set() as ReadonlySet<any>;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { useLocal } from "@/utils/use-local";
|
import { useLocal } from "lib/utils/use-local";
|
||||||
import { ElementType, FC, ReactElement, ReactNode, useEffect } from "react";
|
import { ElementType, FC, ReactElement, ReactNode, useEffect } from "react";
|
||||||
import { NodeRendererProps, Tree as Arborist, NodeApi } from "react-arborist";
|
import { NodeRendererProps, Tree as Arborist, NodeApi } from "react-arborist";
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import { filterWhere } from "lib/comps/filter/parser/filter-where";
|
import { filterWhere } from "lib/comps/filter/parser/filter-where";
|
||||||
import { call_prasi_events } from "lib/exports";
|
import { call_prasi_events } from "lib/utils/prasi-events";
|
||||||
|
|
||||||
export const export_excel = async ({
|
export const export_excel = async ({
|
||||||
list,
|
list,
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { useLocal } from "@/utils/use-local";
|
import { useLocal } from "lib/utils/use-local";
|
||||||
import { parseGenField } from "lib/gen/utils";
|
import { parseGenField } from "lib/gen/utils";
|
||||||
import { FC, useEffect, useRef } from "react";
|
import { FC, useEffect, useRef } from "react";
|
||||||
import { ModeFull } from "./mode/full";
|
import { ModeFull } from "./mode/full";
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
import { GFCol } from "lib/comps/form/gen/fields";
|
import { GFCol } from "lib/comps/form/gen/fields";
|
||||||
|
import { createItem, parseGenField } from "lib/gen/utils";
|
||||||
import { set } from "lib/utils/set";
|
import { set } from "lib/utils/set";
|
||||||
import capitalize from "lodash.capitalize";
|
import capitalize from "lodash.capitalize";
|
||||||
import get from "lodash.get";
|
import get from "lodash.get";
|
||||||
import { createItem, parseGenField } from "../../../gen/utils";
|
|
||||||
import { generateSelect } from "./md-select";
|
import { generateSelect } from "./md-select";
|
||||||
import { on_load } from "./tbl-list/on_load";
|
import { on_load } from "./tbl-list/on_load";
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,7 @@
|
||||||
import { formatName, GenFn } from "lib/gen/utils";
|
import { formatName, GenFn } from "lib/gen/utils";
|
||||||
import { generateMDForm } from "./md-form";
|
import { generateMDForm } from "./md-form";
|
||||||
import { generateMDList } from "./md-list";
|
import { generateMDList } from "./md-list";
|
||||||
import { getValueProp } from "lib/comps/form/gen/gen-rel";
|
|
||||||
import { getProp } from "lib/utils/get-prop";
|
|
||||||
import { propFromItem } from "lib/utils/diff-gen";
|
|
||||||
const w = window as any;
|
const w = window as any;
|
||||||
export const generateMasterDetail: GenFn<{
|
export const generateMasterDetail: GenFn<{
|
||||||
item: PrasiItem;
|
item: PrasiItem;
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ import { Panel, PanelGroup, PanelResizeHandle } from "react-resizable-panels";
|
||||||
import { MDMaster } from "../parts/MDMaster";
|
import { MDMaster } from "../parts/MDMaster";
|
||||||
import { MDDetail } from "../parts/MDDetail";
|
import { MDDetail } from "../parts/MDDetail";
|
||||||
import { MDLocal, MDRef } from "../utils/typings";
|
import { MDLocal, MDRef } from "../utils/typings";
|
||||||
import { getPathname } from "@/utils/pathname";
|
import { getPathname } from "lib/utils/pathname";
|
||||||
|
|
||||||
export const ModeHSplit: FC<{ md: MDLocal; mdr: MDRef }> = ({ md, mdr }) => {
|
export const ModeHSplit: FC<{ md: MDLocal; mdr: MDRef }> = ({ md, mdr }) => {
|
||||||
return (
|
return (
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ import { Panel, PanelGroup, PanelResizeHandle } from "react-resizable-panels";
|
||||||
import { MDDetail } from "../parts/MDDetail";
|
import { MDDetail } from "../parts/MDDetail";
|
||||||
import { MDMaster } from "../parts/MDMaster";
|
import { MDMaster } from "../parts/MDMaster";
|
||||||
import { MDLocal, MDRef } from "../utils/typings";
|
import { MDLocal, MDRef } from "../utils/typings";
|
||||||
import { getPathname } from "@/utils/pathname";
|
import { getPathname } from "lib/utils/pathname";
|
||||||
|
|
||||||
export const ModeVSplit: FC<{ md: MDLocal; mdr: MDRef }> = ({ md, mdr }) => {
|
export const ModeVSplit: FC<{ md: MDLocal; mdr: MDRef }> = ({ md, mdr }) => {
|
||||||
return (
|
return (
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { fetchLinkParams, parseLink } from "lib/comps/form/field/type/TypeLink";
|
import { fetchLinkParams, parseLink } from "lib/utils/fetch-link-params";
|
||||||
import { MDLocal } from "./typings";
|
import { MDLocal } from "./typings";
|
||||||
import { BreadItem } from "lib/comps/custom/Breadcrumb";
|
import { BreadItem } from "lib/comps/custom/Breadcrumb";
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import { BreadItem } from "@/comps/custom/Breadcrumb";
|
import { BreadItem } from "lib/comps/custom/Breadcrumb";
|
||||||
import { FMLocal } from "@/comps/form/typings";
|
import { FMLocal } from "lib/comps/form/typings";
|
||||||
import { GFCol } from "@/gen/utils";
|
import { GFCol } from "lib/gen/utils";
|
||||||
import { LinkParam } from "lib/comps/form/field/type/TypeLink";
|
import { LinkParam } from "lib/comps/form/field/type/TypeLink";
|
||||||
import { ReactNode } from "react";
|
import { ReactNode } from "react";
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { useLocal } from "@/utils/use-local";
|
import { useLocal } from "lib/utils/use-local";
|
||||||
import * as SheetPrimitive from "@radix-ui/react-dialog";
|
import * as SheetPrimitive from "@radix-ui/react-dialog";
|
||||||
import { X } from "lucide-react";
|
import { X } from "lucide-react";
|
||||||
import { FC, useEffect } from "react";
|
import { FC, useEffect } from "react";
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
import * as React from "react"
|
import * as React from "react"
|
||||||
import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog"
|
import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog"
|
||||||
|
|
||||||
import { cn } from "@/utils"
|
import { cn } from "lib/utils"
|
||||||
import { buttonVariants } from "@/comps//ui/button"
|
import { buttonVariants } from "lib/comps//ui/button"
|
||||||
|
|
||||||
const AlertDialog = AlertDialogPrimitive.Root
|
const AlertDialog = AlertDialogPrimitive.Root
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import * as React from "react"
|
import * as React from "react"
|
||||||
import { cva, type VariantProps } from "class-variance-authority"
|
import { cva, type VariantProps } from "class-variance-authority"
|
||||||
|
|
||||||
import { cn } from "@/utils"
|
import { cn } from "lib/utils"
|
||||||
|
|
||||||
const badgeVariants = cva(
|
const badgeVariants = cva(
|
||||||
"c-inline-flex c-items-center c-rounded-full c-border c-px-2.5 c-py-0.5 c-font-semibold c-transition-colors focus:c-outline-none focus:c-ring-2 focus:c-ring-ring focus:c-ring-offset-2",
|
"c-inline-flex c-items-center c-rounded-full c-border c-px-2.5 c-py-0.5 c-font-semibold c-transition-colors focus:c-outline-none focus:c-ring-2 focus:c-ring-ring focus:c-ring-offset-2",
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ import * as React from "react";
|
||||||
import { Slot } from "@radix-ui/react-slot";
|
import { Slot } from "@radix-ui/react-slot";
|
||||||
import { cva, type VariantProps } from "class-variance-authority";
|
import { cva, type VariantProps } from "class-variance-authority";
|
||||||
|
|
||||||
import { cn } from "@/utils";
|
import { cn } from "lib/utils";
|
||||||
|
|
||||||
const buttonVariants = cva(
|
const buttonVariants = cva(
|
||||||
"button c-inline-flex c-items-center c-justify-center c-whitespace-nowrap c-rounded-md c-text-sm c-font-medium c-ring-offset-background c-transition-colors focus-visible:c-outline-none focus-visible:c-ring-2 focus-visible:c-ring-ring focus-visible:c-ring-offset-2 disabled:c-pointer-events-none disabled:c-opacity-50",
|
"button c-inline-flex c-items-center c-justify-center c-whitespace-nowrap c-rounded-md c-text-sm c-font-medium c-ring-offset-background c-transition-colors focus-visible:c-outline-none focus-visible:c-ring-2 focus-visible:c-ring-ring focus-visible:c-ring-offset-2 disabled:c-pointer-events-none disabled:c-opacity-50",
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import * as React from "react"
|
import * as React from "react"
|
||||||
|
|
||||||
import { cn } from "@/utils"
|
import { cn } from "lib/utils"
|
||||||
|
|
||||||
const Card = React.forwardRef<
|
const Card = React.forwardRef<
|
||||||
HTMLDivElement,
|
HTMLDivElement,
|
||||||
|
|
|
||||||
|
|
@ -4,8 +4,8 @@ import useEmblaCarousel, {
|
||||||
} from "embla-carousel-react"
|
} from "embla-carousel-react"
|
||||||
import { ArrowLeft, ArrowRight } from "lucide-react"
|
import { ArrowLeft, ArrowRight } from "lucide-react"
|
||||||
|
|
||||||
import { cn } from "@/utils"
|
import { cn } from "lib/utils"
|
||||||
import { Button } from "@/comps/ui/button"
|
import { Button } from "lib/comps/ui/button"
|
||||||
|
|
||||||
type CarouselApi = UseEmblaCarouselType[1]
|
type CarouselApi = UseEmblaCarouselType[1]
|
||||||
type UseCarouselParameters = Parameters<typeof useEmblaCarousel>
|
type UseCarouselParameters = Parameters<typeof useEmblaCarousel>
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ import * as React from "react";
|
||||||
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
||||||
import { X } from "lucide-react";
|
import { X } from "lucide-react";
|
||||||
|
|
||||||
import { cn } from "@/utils";
|
import { cn } from "lib/utils";
|
||||||
|
|
||||||
const Dialog = DialogPrimitive.Root;
|
const Dialog = DialogPrimitive.Root;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ import * as React from "react"
|
||||||
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu"
|
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu"
|
||||||
import { Check, ChevronRight, Circle } from "lucide-react"
|
import { Check, ChevronRight, Circle } from "lucide-react"
|
||||||
|
|
||||||
import { cn } from "@/utils"
|
import { cn } from "lib/utils"
|
||||||
|
|
||||||
const DropdownMenu = DropdownMenuPrimitive.Root
|
const DropdownMenu = DropdownMenuPrimitive.Root
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { Skeleton } from "@/comps/ui/skeleton";
|
import { Skeleton } from "lib/comps/ui/skeleton";
|
||||||
import { Loader2 } from "lucide-react";
|
import { Loader2 } from "lucide-react";
|
||||||
import { FC } from "react";
|
import { FC } from "react";
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import * as React from "react"
|
import * as React from "react"
|
||||||
|
|
||||||
import { cn } from "@/utils"
|
import { cn } from "lib/utils"
|
||||||
|
|
||||||
export interface InputProps
|
export interface InputProps
|
||||||
extends React.InputHTMLAttributes<HTMLInputElement> {}
|
extends React.InputHTMLAttributes<HTMLInputElement> {}
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ import * as React from "react"
|
||||||
import * as LabelPrimitive from "@radix-ui/react-label"
|
import * as LabelPrimitive from "@radix-ui/react-label"
|
||||||
import { cva, type VariantProps } from "class-variance-authority"
|
import { cva, type VariantProps } from "class-variance-authority"
|
||||||
|
|
||||||
import { cn } from "@/utils"
|
import { cn } from "lib/utils"
|
||||||
|
|
||||||
const labelVariants = cva(
|
const labelVariants = cva(
|
||||||
"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
|
"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ import * as NavigationMenuPrimitive from "@radix-ui/react-navigation-menu";
|
||||||
import { cva } from "class-variance-authority";
|
import { cva } from "class-variance-authority";
|
||||||
import { ChevronDown } from "lucide-react";
|
import { ChevronDown } from "lucide-react";
|
||||||
|
|
||||||
import { cn } from "@/utils";
|
import { cn } from "lib/utils";
|
||||||
|
|
||||||
const NavigationMenu = React.forwardRef<
|
const NavigationMenu = React.forwardRef<
|
||||||
React.ElementRef<typeof NavigationMenuPrimitive.Root>,
|
React.ElementRef<typeof NavigationMenuPrimitive.Root>,
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import * as React from "react"
|
import * as React from "react"
|
||||||
import * as PopoverPrimitive from "@radix-ui/react-popover"
|
import * as PopoverPrimitive from "@radix-ui/react-popover"
|
||||||
|
|
||||||
import { cn } from "@/utils"
|
import { cn } from "lib/utils"
|
||||||
|
|
||||||
const Popover = PopoverPrimitive.Root
|
const Popover = PopoverPrimitive.Root
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
import * as React from "react"
|
import * as React from "react"
|
||||||
import * as ProgressPrimitive from "@radix-ui/react-progress"
|
import * as ProgressPrimitive from "@radix-ui/react-progress"
|
||||||
|
|
||||||
import { cn } from "@/utils"
|
import { cn } from "lib/utils"
|
||||||
|
|
||||||
const Progress = React.forwardRef<
|
const Progress = React.forwardRef<
|
||||||
React.ElementRef<typeof ProgressPrimitive.Root>,
|
React.ElementRef<typeof ProgressPrimitive.Root>,
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
import * as React from "react";
|
import * as React from "react";
|
||||||
import * as ScrollAreaPrimitive from "@radix-ui/react-scroll-area";
|
import * as ScrollAreaPrimitive from "@radix-ui/react-scroll-area";
|
||||||
import { cn } from "@/utils";
|
import { cn } from "lib/utils";
|
||||||
const ScrollArea = React.forwardRef<
|
const ScrollArea = React.forwardRef<
|
||||||
React.ElementRef<typeof ScrollAreaPrimitive.Root>,
|
React.ElementRef<typeof ScrollAreaPrimitive.Root>,
|
||||||
React.ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.Root>
|
React.ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.Root>
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ import * as React from "react";
|
||||||
import * as SheetPrimitive from "@radix-ui/react-dialog";
|
import * as SheetPrimitive from "@radix-ui/react-dialog";
|
||||||
import { cva, type VariantProps } from "class-variance-authority";
|
import { cva, type VariantProps } from "class-variance-authority";
|
||||||
|
|
||||||
import { cn } from "@/utils";
|
import { cn } from "lib/utils";
|
||||||
|
|
||||||
const Sheet = SheetPrimitive.Root;
|
const Sheet = SheetPrimitive.Root;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { cn } from "@/utils"
|
import { cn } from "lib/utils"
|
||||||
|
|
||||||
function Skeleton({
|
function Skeleton({
|
||||||
className,
|
className,
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import * as React from "react"
|
import * as React from "react"
|
||||||
import * as SliderPrimitive from "@radix-ui/react-slider"
|
import * as SliderPrimitive from "@radix-ui/react-slider"
|
||||||
|
|
||||||
import { cn } from "@/utils"
|
import { cn } from "lib/utils"
|
||||||
|
|
||||||
const Slider = React.forwardRef<
|
const Slider = React.forwardRef<
|
||||||
React.ElementRef<typeof SliderPrimitive.Root>,
|
React.ElementRef<typeof SliderPrimitive.Root>,
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import * as React from "react"
|
import * as React from "react"
|
||||||
import * as SwitchPrimitives from "@radix-ui/react-switch"
|
import * as SwitchPrimitives from "@radix-ui/react-switch"
|
||||||
|
|
||||||
import { cn } from "@/utils"
|
import { cn } from "lib/utils"
|
||||||
|
|
||||||
const Switch = React.forwardRef<
|
const Switch = React.forwardRef<
|
||||||
React.ElementRef<typeof SwitchPrimitives.Root>,
|
React.ElementRef<typeof SwitchPrimitives.Root>,
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import * as React from "react"
|
import * as React from "react"
|
||||||
|
|
||||||
import { cn } from "@/utils"
|
import { cn } from "lib/utils"
|
||||||
|
|
||||||
const Table = React.forwardRef<
|
const Table = React.forwardRef<
|
||||||
HTMLTableElement,
|
HTMLTableElement,
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import * as React from "react";
|
import * as React from "react";
|
||||||
import * as TabsPrimitive from "@radix-ui/react-tabs";
|
import * as TabsPrimitive from "@radix-ui/react-tabs";
|
||||||
|
|
||||||
import { cn } from "@/utils";
|
import { cn } from "lib/utils";
|
||||||
|
|
||||||
const Tabs = TabsPrimitive.Root;
|
const Tabs = TabsPrimitive.Root;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import * as React from "react"
|
import * as React from "react"
|
||||||
|
|
||||||
import { cn } from "@/utils"
|
import { cn } from "lib/utils"
|
||||||
|
|
||||||
export interface TextareaProps
|
export interface TextareaProps
|
||||||
extends React.TextareaHTMLAttributes<HTMLTextAreaElement> {}
|
extends React.TextareaHTMLAttributes<HTMLTextAreaElement> {}
|
||||||
|
|
|
||||||
166
exports.tsx
166
exports.tsx
|
|
@ -1,51 +1,60 @@
|
||||||
import { lazify, lazifyMany } from "@/utils/lazify";
|
import { lazify, lazifyMany } from "lib/utils/lazify";
|
||||||
|
|
||||||
export const Accordion = lazify(
|
export const Accordion = lazify(
|
||||||
async () => (await import("@/comps/ui/accordion")).Accordion
|
async () => (await import("lib/comps/ui/accordion")).Accordion
|
||||||
);
|
);
|
||||||
|
|
||||||
export const Popover = lazify(
|
export const Popover = lazify(
|
||||||
async () => (await import("@/comps/custom/Popover")).Popover
|
async () => (await import("lib/comps/custom/Popover")).Popover
|
||||||
);
|
);
|
||||||
export const Progress = lazify(
|
export const Progress = lazify(
|
||||||
async () => (await import("@/comps/ui/progress")).Progress
|
async () => (await import("lib/comps/ui/progress")).Progress
|
||||||
);
|
);
|
||||||
|
|
||||||
export const Dialog = lazify(
|
export const Dialog = lazify(
|
||||||
async () => (await import("@/comps/ui/dialog")).Dialog
|
async () => (await import("lib/comps/ui/dialog")).Dialog
|
||||||
);
|
);
|
||||||
|
|
||||||
export const Typeahead = lazify(
|
export const Typeahead = lazify(
|
||||||
async () => (await import("@/comps/ui/typeahead")).Typeahead
|
async () => (await import("lib/comps/ui/typeahead")).Typeahead
|
||||||
);
|
);
|
||||||
|
|
||||||
/** Master - Detail - List - Form */
|
/** Master - Detail - List - Form */
|
||||||
export const MasterDetail = lazify(
|
export const MasterDetail = lazify(
|
||||||
async () => (await import("@/comps/md/MasterDetail")).MasterDetail
|
async () => (await import("lib/comps/md/MasterDetail")).MasterDetail
|
||||||
);
|
);
|
||||||
export const MDRenderMaster = lazify(
|
export const MDRenderMaster = lazify(
|
||||||
async () => (await import("@/comps/md/parts/MDMaster")).MDRenderMaster
|
async () => (await import("lib/comps/md/parts/MDMaster")).MDRenderMaster
|
||||||
);
|
);
|
||||||
export const MDRenderTab = lazify(
|
export const MDRenderTab = lazify(
|
||||||
async () => (await import("@/comps/md/parts/MDDetail")).MDRenderTab
|
async () => (await import("lib/comps/md/parts/MDDetail")).MDRenderTab
|
||||||
);
|
);
|
||||||
export const MDAction = lazify(
|
export const MDAction = lazify(
|
||||||
async () => (await import("@/comps/md/parts/MDAction")).MDAction
|
async () => (await import("lib/comps/md/parts/MDAction")).MDAction
|
||||||
);
|
);
|
||||||
export const Breadcrumb = lazify(
|
export const Breadcrumb = lazify(
|
||||||
async () => (await import("@/comps/custom/Breadcrumb")).Breadcrumb
|
async () => (await import("lib/comps/custom/Breadcrumb")).Breadcrumb
|
||||||
);
|
);
|
||||||
export const TableList = lazify(
|
export const TableList = lazify(
|
||||||
async () => (await import("@/comps/list/TableList")).TableList
|
async () => (await import("lib/comps/list/TableList")).TableList
|
||||||
);
|
);
|
||||||
export const TableEdit = lazify(
|
export const TableEdit = lazify(
|
||||||
async () =>
|
async () =>
|
||||||
(await import("@/comps/form/field/table-edit/TableEdit")).TableEdit
|
(await import("lib/comps/form/field/table-edit/TableEdit")).TableEdit
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const loading = lazifyMany({
|
||||||
|
FieldLoading: async () =>
|
||||||
|
(await import("lib/comps/ui/field-loading")).FieldLoading,
|
||||||
|
Spinner: async () => (await import("lib/comps/ui/field-loading")).Spinner,
|
||||||
|
});
|
||||||
|
|
||||||
|
export const FieldLoading = loading.FieldLoading;
|
||||||
|
export const Spinner = loading.Spinner;
|
||||||
|
|
||||||
const form = lazifyMany({
|
const form = lazifyMany({
|
||||||
Form: async () => (await import("@/comps/form/Form")).Form,
|
Form: async () => (await import("lib/comps/form/Form")).Form,
|
||||||
Field: async () => (await import("@/comps/form/field/Field")).Field,
|
Field: async () => (await import("lib/comps/form/field/Field")).Field,
|
||||||
});
|
});
|
||||||
|
|
||||||
export const Form = form.Form;
|
export const Form = form.Form;
|
||||||
|
|
@ -53,68 +62,71 @@ export const Field = form.Field;
|
||||||
|
|
||||||
/** Export - Import */
|
/** Export - Import */
|
||||||
export const ImportExcel = lazify(
|
export const ImportExcel = lazify(
|
||||||
async () => (await import("@/comps/list/ImportExcel")).ImportExcel
|
async () => (await import("lib/comps/list/ImportExcel")).ImportExcel
|
||||||
);
|
);
|
||||||
|
|
||||||
export const ExportExcel = lazify(
|
export const ExportExcel = lazify(
|
||||||
async () => (await import("@/comps/list/ExportExcel")).ExportExcel
|
async () => (await import("lib/comps/list/ExportExcel")).ExportExcel
|
||||||
);
|
);
|
||||||
|
|
||||||
/** Filter */
|
/** Filter */
|
||||||
export const MasterFilter = lazify(
|
export const MasterFilter = lazify(
|
||||||
async () => (await import("@/comps/filter/MasterFilter")).MasterFilter
|
async () => (await import("lib/comps/filter/MasterFilter")).MasterFilter
|
||||||
);
|
);
|
||||||
|
|
||||||
export const FilterField = lazify(
|
export const FilterField = lazify(
|
||||||
async () => (await import("@/comps/filter/FilterField")).FilterField
|
async () => (await import("lib/comps/filter/FilterField")).FilterField
|
||||||
);
|
);
|
||||||
|
|
||||||
export const HeaderProfile = lazify(
|
export const HeaderProfile = lazify(
|
||||||
async () => (await import("@/comps/custom/HeaderProfile")).HeaderProfile
|
async () => (await import("lib/comps/custom/HeaderProfile")).HeaderProfile
|
||||||
);
|
);
|
||||||
|
|
||||||
/** charts */
|
/** charts */
|
||||||
export const BarChart = lazify(
|
export const BarChart = lazify(
|
||||||
async () => (await import("@/comps/charts/bar")).BarChart
|
async () => (await import("lib/comps/charts/bar")).BarChart
|
||||||
);
|
);
|
||||||
export const PieChart = lazify(
|
export const PieChart = lazify(
|
||||||
async () => (await import("@/comps/charts/pie")).PieChart
|
async () => (await import("lib/comps/charts/pie")).PieChart
|
||||||
);
|
);
|
||||||
export const DoughnutChart = lazify(
|
export const DoughnutChart = lazify(
|
||||||
async () => (await import("@/comps/charts/doughnut")).DoughnutChart
|
async () => (await import("lib/comps/charts/doughnut")).DoughnutChart
|
||||||
);
|
);
|
||||||
export const LineChart = lazify(
|
export const LineChart = lazify(
|
||||||
async () => (await import("@/comps/charts/line")).LineChart
|
async () => (await import("lib/comps/charts/line")).LineChart
|
||||||
);
|
);
|
||||||
|
|
||||||
export const ScrollArea = lazify(
|
export const ScrollArea = lazify(
|
||||||
async () => (await import("@/comps/ui/scroll-area")).ScrollArea
|
async () => (await import("lib/comps/ui/scroll-area")).ScrollArea
|
||||||
);
|
);
|
||||||
|
|
||||||
export const KeyValue = lazify(
|
export const KeyValue = lazify(
|
||||||
async () => (await import("@/comps/form/field/type/KeyValue")).KeyValue
|
async () => (await import("lib/comps/form/field/type/KeyValue")).KeyValue
|
||||||
);
|
);
|
||||||
export const Pop = lazify(
|
export const Pop = lazify(
|
||||||
async () => (await import("@/comps/dialog/Dialog")).Pop
|
async () => (await import("lib/comps/dialog/Dialog")).Pop
|
||||||
);
|
);
|
||||||
|
|
||||||
export const Import = lazify(
|
export const Import = lazify(
|
||||||
async () => (await import("@/comps/import/Import")).Import
|
async () => (await import("lib/comps/import/Import")).Import
|
||||||
);
|
);
|
||||||
|
|
||||||
export const Sheet = lazify(
|
export const Sheet = lazify(
|
||||||
async () => (await import("@/comps/sheet/sheet")).SheetCn
|
async () => (await import("lib/comps/sheet/sheet")).SheetCn
|
||||||
);
|
);
|
||||||
export { formatBytes } from "@/comps/import/lib/formatBytes";
|
|
||||||
export { fetchLinkParams } from "@/comps/form/field/type/TypeLink";
|
export const Layout = lazify(
|
||||||
export { FieldLoading, Spinner } from "@/comps/ui/field-loading";
|
async () => (await import("lib/preset/menu/Layout")).Layout
|
||||||
|
);
|
||||||
|
|
||||||
|
export { formatBytes } from "lib/comps/import/lib/formatBytes";
|
||||||
|
export { fetchLinkParams, lastParams } from "lib/utils/fetch-link-params";
|
||||||
export { lang } from "lib/lang";
|
export { lang } from "lib/lang";
|
||||||
export { prasi_gen } from "./gen/prasi_gen";
|
export { prasi_gen } from "./gen/prasi_gen";
|
||||||
export { guessLabel } from "./utils/guess-label";
|
export { guessLabel } from "./utils/guess-label";
|
||||||
import __get from "lodash.get";
|
import __get from "lodash.get";
|
||||||
import { sum } from "./utils/sum";
|
import { sum } from "./utils/sum";
|
||||||
export { ImgThumb } from "@/comps/form/field/type/FilePreview";
|
export { ImgThumb } from "lib/comps/form/field/type/FilePreview";
|
||||||
export { lastParams } from "@/comps/form/field/type/TypeLink";
|
|
||||||
export { _post } from "./utils/post";
|
export { _post } from "./utils/post";
|
||||||
export { toast, Toaster } from "./comps/ui/toast";
|
export { toast, Toaster } from "./comps/ui/toast";
|
||||||
export { NavLink } from "./comps/popup/NavLink";
|
export { NavLink } from "./comps/popup/NavLink";
|
||||||
|
|
@ -126,70 +138,56 @@ export const _sum = sum;
|
||||||
export const _get = __get;
|
export const _get = __get;
|
||||||
|
|
||||||
/** Generator */
|
/** Generator */
|
||||||
export { generateFilter as genereteFilter } from "@/comps/filter/gen/gen-filter";
|
export { generateFilter as genereteFilter } from "lib/comps/filter/gen/gen-filter";
|
||||||
export { generateRelation } from "@/comps/form/gen/gen-rel";
|
export { generateRelation } from "lib/comps/form/gen/gen-rel";
|
||||||
export { genTableEdit } from "@/comps/form/gen/gen-table-edit";
|
export { genTableEdit } from "lib/comps/form/gen/gen-table-edit";
|
||||||
export { generateMasterDetail } from "@/comps/md/gen/md-gen";
|
export { generateMasterDetail } from "lib/comps/md/gen/md-gen";
|
||||||
export { parseGenField } from "@/gen/utils";
|
export { parseGenField } from "lib/gen/utils";
|
||||||
|
|
||||||
/** ETC */
|
/** ETC */
|
||||||
export { filterModifier } from "@/comps/filter/utils/filter-modifier";
|
export { filterModifier } from "lib/comps/filter/utils/filter-modifier";
|
||||||
export { generateField } from "@/comps/form/gen/gen-field";
|
export { generateField } from "lib/comps/form/gen/gen-field";
|
||||||
export { generateForm } from "@/comps/form/gen/gen-form";
|
export { generateForm } from "lib/comps/form/gen/gen-form";
|
||||||
export { validate as validateField } from "@/comps/form/utils/validate";
|
export { validate as validateField } from "lib/comps/form/utils/validate";
|
||||||
export { sortTree, treePrefix } from "@/comps/list/utils/sort-tree";
|
export { sortTree, treePrefix } from "lib/comps/list/utils/sort-tree";
|
||||||
|
|
||||||
export { getFilter } from "@/comps/filter/utils/get-filter";
|
export { getFilter } from "lib/comps/filter/utils/get-filter";
|
||||||
export type {
|
export type {
|
||||||
fieldType,
|
fieldType,
|
||||||
FieldTypeCustom,
|
FieldTypeCustom,
|
||||||
FMLocal,
|
FMLocal,
|
||||||
formType,
|
formType,
|
||||||
} from "@/comps/form/typings";
|
} from "lib/comps/form/typings";
|
||||||
export type { TableListType } from "@/comps/list/utils/typings";
|
export type { TableListType } from "lib/comps/list/utils/typings";
|
||||||
export { generateTableList as generateTableList } from "@/comps/md/gen/gen-table-list";
|
export { generateTableList as generateTableList } from "lib/comps/md/gen/gen-table-list";
|
||||||
export { generateSelect } from "@/comps/md/gen/md-select";
|
export { generateSelect } from "lib/comps/md/gen/md-select";
|
||||||
export { MasterDetailType } from "@/comps/md/utils/typings";
|
export { MasterDetailType } from "lib/comps/md/utils/typings";
|
||||||
export { Button, FloatButton } from "@/comps/ui/button";
|
export { Button, FloatButton } from "lib/comps/ui/button";
|
||||||
export { baseurl, imgThumb } from "@/utils/baseurl";
|
export { baseurl, imgThumb } from "lib/utils/baseurl";
|
||||||
export { FormatValue } from "@/utils/format-value";
|
export { FormatValue } from "lib/utils/format-value";
|
||||||
export { GetValue } from "@/utils/get-value";
|
export { GetValue } from "lib/utils/get-value";
|
||||||
export { password } from "@/utils/password";
|
export { password } from "lib/utils/password";
|
||||||
export { call_prasi_events, prasi_events } from "lib/utils/prasi-events";
|
export { call_prasi_events, prasi_events } from "lib/utils/prasi-events";
|
||||||
|
export { Card } from "lib/comps/custom/Card";
|
||||||
/** Session */
|
|
||||||
export { Login } from "@/preset/login/Login";
|
|
||||||
export { generateLogin } from "@/preset/login/utils/generate";
|
|
||||||
export { logout } from "@/preset/login/utils/logout";
|
|
||||||
export type { RG } from "@/preset/login/utils/register";
|
|
||||||
export { registerSession } from "@/preset/login/utils/register";
|
|
||||||
export type { UserSession } from "@/preset/login/utils/register";
|
|
||||||
|
|
||||||
export { Card } from "@/comps/custom/Card";
|
|
||||||
|
|
||||||
/** Layout */
|
|
||||||
export { Layout } from "@/preset/menu/Layout";
|
|
||||||
|
|
||||||
/* MENU */
|
/* MENU */
|
||||||
export { Menu, MenuIcon } from "@/preset/menu/Menu";
|
export { Menu, MenuIcon } from "lib/preset/menu/Menu";
|
||||||
|
|
||||||
/*Panel Tab*/
|
/*Panel Tab*/
|
||||||
export { ShowHidePanel } from "@/comps/custom/ShowHidePanel";
|
export { ShowHidePanel } from "lib/comps/custom/ShowHidePanel";
|
||||||
export { PanelBody } from "@/comps/tab/parts/PanelBody";
|
export { PanelBody } from "lib/comps/tab/parts/PanelBody";
|
||||||
export { PanelHeader } from "@/comps/tab/parts/PanelHead";
|
export { PanelHeader } from "lib/comps/tab/parts/PanelHead";
|
||||||
export { PanelTab } from "@/comps/tab/parts/PanelTab";
|
export { PanelTab } from "lib/comps/tab/parts/PanelTab";
|
||||||
|
|
||||||
/*Popup*/
|
/*Popup*/
|
||||||
export { Popup } from "@/comps/popup/PopUp";
|
export { Popup } from "lib/comps/popup/PopUp";
|
||||||
|
|
||||||
export { Detail } from "@/comps/custom/Detail";
|
export { Detail } from "lib/comps/custom/Detail";
|
||||||
export * from "@/comps/ui/input";
|
export * from "lib/comps/ui/input";
|
||||||
export { ButtonUpload } from "@/preset/profile/ButtonUpload";
|
export { ButtonUpload } from "lib/preset/profile/ButtonUpload";
|
||||||
export { Profile } from "@/preset/profile/Profile";
|
export { Profile } from "lib/preset/profile/Profile";
|
||||||
export { generateProfile } from "@/preset/profile/utils/generate";
|
export { generateProfile } from "lib/preset/profile/utils/generate";
|
||||||
export { formatTime, longDate, shortDate, timeAgo } from "@/utils/date";
|
export { formatTime, longDate, shortDate, timeAgo } from "lib/utils/date";
|
||||||
export { getBasename, getPathname } from "@/utils/pathname";
|
export { getBasename, getPathname } from "lib/utils/pathname";
|
||||||
|
|
||||||
export { Flow } from "@/comps/ui/flow";
|
export { formatMoney } from "lib/comps/form/field/type/TypeMoney";
|
||||||
|
|
||||||
export { formatMoney } from "@/comps/form/field/type/TypeMoney";
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { get as kget, set as kset } from "@/utils/idb-keyval";
|
import { get as kget, set as kset } from "lib/utils/idb-keyval";
|
||||||
|
|
||||||
const single = {} as Record<
|
const single = {} as Record<
|
||||||
string,
|
string,
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
import { getBasename } from "lib/exports";
|
|
||||||
import { useLocal } from "lib/utils/use-local";
|
import { useLocal } from "lib/utils/use-local";
|
||||||
import { FC } from "react";
|
import { FC } from "react";
|
||||||
import { FieldLoading } from "../../..";
|
import { FieldLoading } from "../../..";
|
||||||
import { loadSession } from "./utils/load";
|
import { loadSession } from "./utils/load";
|
||||||
|
import { getBasename } from "lib/utils/pathname";
|
||||||
|
|
||||||
const w = window as unknown as {
|
const w = window as unknown as {
|
||||||
user: any;
|
user: any;
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,9 @@
|
||||||
import { LinkParam } from "lib/comps/form/field/type/TypeLink";
|
import { overrideNav } from "lib/utils/override-nav";
|
||||||
import { FieldLoading } from "lib/exports";
|
|
||||||
import { hashSum } from "lib/utils/hash-sum";
|
|
||||||
import { getPathname } from "lib/utils/pathname";
|
import { getPathname } from "lib/utils/pathname";
|
||||||
import { useLocal } from "lib/utils/use-local";
|
import { useLocal } from "lib/utils/use-local";
|
||||||
import { FC, ReactNode, useLayoutEffect } from "react";
|
import { FC, ReactNode, useLayoutEffect } from "react";
|
||||||
import { loadSession } from "../login/utils/load";
|
import { loadSession } from "../login/utils/load";
|
||||||
import { overrideNav } from "lib/utils/override-nav";
|
import { FieldLoading } from "lib/comps/ui/field-loading";
|
||||||
|
|
||||||
const w = window as any;
|
const w = window as any;
|
||||||
const initResponsive = function () {
|
const initResponsive = function () {
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { useLocal } from "@/utils/use-local";
|
import { useLocal } from "lib/utils/use-local";
|
||||||
import get from "lodash.get";
|
import get from "lodash.get";
|
||||||
import { FC, ReactNode } from "react";
|
import { FC, ReactNode } from "react";
|
||||||
export const ButtonUpload: FC<{
|
export const ButtonUpload: FC<{
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { select } from "@/preset/login/utils/select";
|
import { select } from "lib/preset/login/utils/select";
|
||||||
import { set } from "lib/utils/set";
|
import { set } from "lib/utils/set";
|
||||||
import get from "lodash.get";
|
import get from "lodash.get";
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,41 @@
|
||||||
|
import type { LinkParam } from "lib/comps/form/field/type/TypeLink";
|
||||||
|
export const link_cache = {} as Record<string, any>;
|
||||||
|
|
||||||
|
export const fetchLinkParams = async (
|
||||||
|
parsed_link?: ReturnType<typeof parseLink>
|
||||||
|
) => {
|
||||||
|
const parsed = parsed_link || parseLink();
|
||||||
|
|
||||||
|
return await Promise.all(
|
||||||
|
parsed.map(async (e) => {
|
||||||
|
if (link_cache[e]) {
|
||||||
|
return link_cache[e] as LinkParam;
|
||||||
|
}
|
||||||
|
|
||||||
|
const result = await api._kv("get", e);
|
||||||
|
link_cache[e] = result;
|
||||||
|
return result as unknown as LinkParam;
|
||||||
|
})
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export const parseLink = () => {
|
||||||
|
const lnk = location.hash.split("#").find((e) => e.startsWith("lnk="));
|
||||||
|
|
||||||
|
if (lnk) {
|
||||||
|
const res = lnk.split("=").pop() || "";
|
||||||
|
if (res) {
|
||||||
|
return res.split("+");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return [];
|
||||||
|
};
|
||||||
|
|
||||||
|
export const lastParams = async () => {
|
||||||
|
const parsed = parseLink();
|
||||||
|
if (parsed.length > 0) {
|
||||||
|
const res = await fetchLinkParams([parsed.pop() || ""]);
|
||||||
|
return res[0];
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
};
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { GFCol } from "@/gen/utils";
|
import { GFCol } from "lib/gen/utils";
|
||||||
import dayjs from "dayjs";
|
import dayjs from "dayjs";
|
||||||
import { formatDate } from "lib/comps/custom/Datepicker/helpers";
|
import { formatDate } from "lib/comps/custom/Datepicker/helpers";
|
||||||
import { FilePreview } from "lib/comps/form/field/type/FilePreview";
|
import { FilePreview } from "lib/comps/form/field/type/FilePreview";
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { GFCol } from "@/gen/utils";
|
import { GFCol } from "lib/gen/utils";
|
||||||
import get from "lodash.get";
|
import get from "lodash.get";
|
||||||
import { FC } from "react";
|
import { FC } from "react";
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import * as _bcrypt from "@/utils/bcrypt";
|
import * as _bcrypt from "lib/utils/bcrypt";
|
||||||
export const bcrypt = _bcrypt;
|
export const bcrypt = _bcrypt;
|
||||||
|
|
||||||
export const hashPassword = (pass: string) => {
|
export const hashPassword = (pass: string) => {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue