@akanjs/ui 0.9.56 → 0.9.57
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Data/CardList.d.ts +3 -3
- package/Data/TableList.d.ts +4 -4
- package/Field.d.ts +11 -12
- package/Model/Remove.d.ts +3 -1
- package/Select.d.ts +2 -2
- package/Signal/Arg.d.ts +14 -11
- package/Signal/Doc.d.ts +8 -1
- package/Signal/GraphQL.d.ts +13 -16
- package/Signal/Message.d.ts +12 -15
- package/Signal/PubSub.d.ts +13 -15
- package/Signal/Response.d.ts +3 -5
- package/Signal/RestApi.d.ts +17 -20
- package/Signal/WebSocket.d.ts +1 -1
- package/System/CSR.d.ts +2 -2
- package/System/Common.d.ts +2 -25
- package/System/SSR.d.ts +2 -2
- package/Table.d.ts +2 -2
- package/cjs/Data/Insight.js +1 -1
- package/cjs/Data/Item.js +1 -1
- package/cjs/Data/ListContainer.js +5 -5
- package/cjs/Data/TableList.js +2 -5
- package/cjs/Field.js +11 -9
- package/cjs/Model/EditModal.js +1 -1
- package/cjs/Model/Remove.js +6 -11
- package/cjs/Model/ViewEditModal.js +14 -1
- package/cjs/Select.js +1 -1
- package/cjs/Signal/Arg.js +22 -22
- package/cjs/Signal/Doc.js +18 -27
- package/cjs/Signal/GraphQL.js +37 -52
- package/cjs/Signal/Message.js +25 -53
- package/cjs/Signal/Object.js +4 -12
- package/cjs/Signal/PubSub.js +20 -54
- package/cjs/Signal/Response.js +2 -2
- package/cjs/Signal/RestApi.js +63 -79
- package/cjs/Signal/WebSocket.js +14 -15
- package/cjs/System/CSR.js +5 -10
- package/cjs/System/Common.js +6 -6
- package/cjs/System/SSR.js +5 -10
- package/esm/Data/Insight.js +1 -1
- package/esm/Data/Item.js +1 -1
- package/esm/Data/ListContainer.js +5 -5
- package/esm/Data/TableList.js +2 -5
- package/esm/Field.js +12 -10
- package/esm/Model/EditModal.js +1 -1
- package/esm/Model/Remove.js +7 -12
- package/esm/Model/ViewEditModal.js +15 -2
- package/esm/Select.js +2 -2
- package/esm/Signal/Arg.js +24 -24
- package/esm/Signal/Doc.js +17 -26
- package/esm/Signal/GraphQL.js +39 -62
- package/esm/Signal/Message.js +27 -55
- package/esm/Signal/Object.js +4 -12
- package/esm/Signal/PubSub.js +22 -56
- package/esm/Signal/Response.js +2 -2
- package/esm/Signal/RestApi.js +66 -90
- package/esm/Signal/WebSocket.js +14 -15
- package/esm/System/CSR.js +5 -10
- package/esm/System/Common.js +6 -6
- package/esm/System/SSR.js +5 -10
- package/package.json +1 -1
package/Data/CardList.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DataAction, DataColumn } from "@akanjs/client";
|
|
2
|
-
import type {
|
|
2
|
+
import type { FilterInstance } from "@akanjs/document";
|
|
3
3
|
import { type FetchInitForm } from "@akanjs/signal";
|
|
4
4
|
import { ReactNode } from "react";
|
|
5
5
|
type DataItemProps<T extends string, M extends {
|
|
@@ -15,7 +15,7 @@ interface CardListProps<T extends string, Input, Full extends {
|
|
|
15
15
|
id: string;
|
|
16
16
|
}, Light extends {
|
|
17
17
|
id: string;
|
|
18
|
-
}, Filter extends
|
|
18
|
+
}, Filter extends FilterInstance> {
|
|
19
19
|
className?: string;
|
|
20
20
|
cardListClassName?: string;
|
|
21
21
|
init?: FetchInitForm<Input, Full, Filter>;
|
|
@@ -32,5 +32,5 @@ export default function CardList<T extends string, Input, Full extends {
|
|
|
32
32
|
id: string;
|
|
33
33
|
}, Light extends {
|
|
34
34
|
id: string;
|
|
35
|
-
},
|
|
35
|
+
}, Filter extends FilterInstance>({ className, cardListClassName, init, sliceName, actions, columns, renderItem, renderLoading, renderTemplate, renderView, renderTitle, }: CardListProps<T, Input, Full, Light, Filter>): import("react/jsx-runtime").JSX.Element;
|
|
36
36
|
export {};
|
package/Data/TableList.d.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { DataAction, DataColumn } from "@akanjs/client";
|
|
2
|
-
import type {
|
|
2
|
+
import type { FilterInstance } from "@akanjs/document";
|
|
3
3
|
import { type FetchInitForm } from "@akanjs/signal";
|
|
4
4
|
import { ReactNode } from "react";
|
|
5
5
|
interface TableListProps<T extends string, Input, Full extends {
|
|
6
6
|
id: string;
|
|
7
7
|
}, Light extends {
|
|
8
8
|
id: string;
|
|
9
|
-
},
|
|
9
|
+
}, Filter extends FilterInstance> {
|
|
10
10
|
className?: string;
|
|
11
11
|
queryArgs?: any[];
|
|
12
|
-
init?: FetchInitForm<Input, Full,
|
|
12
|
+
init?: FetchInitForm<Input, Full, Filter>;
|
|
13
13
|
sliceName: string;
|
|
14
14
|
columns: DataColumn<any>[];
|
|
15
15
|
renderTemplate?: (props: any) => ReactNode | null;
|
|
@@ -22,5 +22,5 @@ export default function TableList<T extends string, Input, Full extends {
|
|
|
22
22
|
id: string;
|
|
23
23
|
}, Light extends {
|
|
24
24
|
id: string;
|
|
25
|
-
},
|
|
25
|
+
}, Filter extends FilterInstance>({ className, init, queryArgs, sliceName, columns, actions, renderTemplate, renderTitle, renderView, onItemClick, }: TableListProps<T, Input, Full, Light, Filter>): import("react/jsx-runtime").JSX.Element;
|
|
26
26
|
export {};
|
package/Field.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { Dayjs,
|
|
2
|
-
import type { SortType } from "@akanjs/document";
|
|
1
|
+
import { Dayjs, EnumInstance } from "@akanjs/base";
|
|
3
2
|
import { ReactNode } from "react";
|
|
4
3
|
interface LabelProps {
|
|
5
4
|
className?: string;
|
|
@@ -41,22 +40,22 @@ export declare const Field: {
|
|
|
41
40
|
id: string;
|
|
42
41
|
}, Light extends {
|
|
43
42
|
id: string;
|
|
44
|
-
}
|
|
43
|
+
}>({ label, desc, labelClassName, selectClassName, className, nullable, disabled, initArgs, sliceName, value, onChange, onSearch, sortOption, renderOption, renderSelected, }: ParentProps<T, State, Input, Full, Light>) => import("react/jsx-runtime").JSX.Element;
|
|
45
44
|
ParentId: <T extends string, State, Input, Full extends {
|
|
46
45
|
id: string;
|
|
47
46
|
}, Light extends {
|
|
48
47
|
id: string;
|
|
49
|
-
}
|
|
48
|
+
}>({ label, desc, className, selectClassName, labelClassName, nullable, disabled, initArgs, sliceName, value, onChange, onSearch, sortOption, renderOption, renderSelected, }: ParentIdProps<T, State, Input, Full, Light>) => import("react/jsx-runtime").JSX.Element;
|
|
50
49
|
Children: <T extends string, State, Input, Full extends {
|
|
51
50
|
id: string;
|
|
52
51
|
}, Light extends {
|
|
53
52
|
id: string;
|
|
54
|
-
}
|
|
53
|
+
}>({ label, desc, labelClassName, selectClassName, className, nullable, disabled, initArgs, sliceName, value, onChange, onSearch, sortOption, renderOption, renderSelected, }: ChildrenProps<T, State, Input, Full, Light>) => import("react/jsx-runtime").JSX.Element;
|
|
55
54
|
ChildrenId: <T extends string, State, Input, Full extends {
|
|
56
55
|
id: string;
|
|
57
56
|
}, Light extends {
|
|
58
57
|
id: string;
|
|
59
|
-
}
|
|
58
|
+
}>({ label, desc, labelClassName, className, nullable, disabled, initArgs, sliceName, value, onChange, onSearch, sortOption, renderOption, }: ChildrenIdProps<T, State, Input, Full, Light>) => import("react/jsx-runtime").JSX.Element;
|
|
60
59
|
};
|
|
61
60
|
interface ListProps<Item> {
|
|
62
61
|
className?: string;
|
|
@@ -147,7 +146,7 @@ interface ToggleSelectProps<I> {
|
|
|
147
146
|
items: {
|
|
148
147
|
label: string;
|
|
149
148
|
value: I;
|
|
150
|
-
}[] | readonly I[] | I[] |
|
|
149
|
+
}[] | readonly I[] | I[] | EnumInstance<string, I>;
|
|
151
150
|
value: I;
|
|
152
151
|
nullable?: boolean;
|
|
153
152
|
disabled?: boolean;
|
|
@@ -162,7 +161,7 @@ interface MultiToggleSelectProps<I extends string | number | boolean> {
|
|
|
162
161
|
desc?: string;
|
|
163
162
|
model?: string;
|
|
164
163
|
field?: string;
|
|
165
|
-
items:
|
|
164
|
+
items: EnumInstance<string, I> | {
|
|
166
165
|
label: string;
|
|
167
166
|
value: I;
|
|
168
167
|
}[] | readonly I[] | I[];
|
|
@@ -335,7 +334,7 @@ interface PasswordProps {
|
|
|
335
334
|
onPressEnter?: () => void;
|
|
336
335
|
showConfirm?: boolean;
|
|
337
336
|
}
|
|
338
|
-
interface ParentProps<T extends string, State, Input, Full, Light
|
|
337
|
+
interface ParentProps<T extends string, State, Input, Full, Light> {
|
|
339
338
|
label?: string;
|
|
340
339
|
desc?: string;
|
|
341
340
|
labelClassName?: string;
|
|
@@ -352,7 +351,7 @@ interface ParentProps<T extends string, State, Input, Full, Light, Sort extends
|
|
|
352
351
|
renderOption: (model: Light) => ReactNode;
|
|
353
352
|
renderSelected?: (value: Light) => ReactNode;
|
|
354
353
|
}
|
|
355
|
-
interface ParentIdProps<T extends string, State, Input, Full, Light
|
|
354
|
+
interface ParentIdProps<T extends string, State, Input, Full, Light> {
|
|
356
355
|
label?: string;
|
|
357
356
|
desc?: string;
|
|
358
357
|
labelClassName?: string;
|
|
@@ -369,7 +368,7 @@ interface ParentIdProps<T extends string, State, Input, Full, Light, Sort extend
|
|
|
369
368
|
renderOption?: (model: Light) => ReactNode;
|
|
370
369
|
renderSelected?: (value: Light) => ReactNode;
|
|
371
370
|
}
|
|
372
|
-
interface ChildrenProps<T extends string, State, Input, Full, Light
|
|
371
|
+
interface ChildrenProps<T extends string, State, Input, Full, Light> {
|
|
373
372
|
label?: string;
|
|
374
373
|
desc?: string;
|
|
375
374
|
labelClassName?: string;
|
|
@@ -386,7 +385,7 @@ interface ChildrenProps<T extends string, State, Input, Full, Light, Sort extend
|
|
|
386
385
|
renderOption: (model: Light) => ReactNode;
|
|
387
386
|
renderSelected?: (value: Light) => ReactNode;
|
|
388
387
|
}
|
|
389
|
-
interface ChildrenIdProps<T extends string, State, Input, Full, Light
|
|
388
|
+
interface ChildrenIdProps<T extends string, State, Input, Full, Light> {
|
|
390
389
|
label?: string;
|
|
391
390
|
desc?: string;
|
|
392
391
|
labelClassName?: string;
|
package/Model/Remove.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ReactNode } from "react";
|
|
1
2
|
interface RemoveProps {
|
|
2
3
|
className?: string;
|
|
3
4
|
name?: string;
|
|
@@ -5,6 +6,7 @@ interface RemoveProps {
|
|
|
5
6
|
sliceName: string;
|
|
6
7
|
modal?: string | null;
|
|
7
8
|
redirect?: string;
|
|
9
|
+
children: ReactNode;
|
|
8
10
|
}
|
|
9
|
-
export default function Remove({ className, name, modelId, sliceName, modal, redirect }: RemoveProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export default function Remove({ className, name, modelId, sliceName, modal, redirect, children }: RemoveProps): import("react/jsx-runtime").JSX.Element;
|
|
10
12
|
export {};
|
package/Select.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { EnumInstance } from "@akanjs/base";
|
|
2
2
|
import { ReactNode } from "react";
|
|
3
3
|
interface LabelOption<T> {
|
|
4
4
|
label: string | boolean | number;
|
|
5
5
|
value: T;
|
|
6
6
|
}
|
|
7
|
-
type Options<T> = T[] | LabelOption<T>[] |
|
|
7
|
+
type Options<T> = T[] | LabelOption<T>[] | EnumInstance<string, T>;
|
|
8
8
|
interface SelectProps<T extends string | number | boolean | null | undefined, Multiple extends boolean = false, Searchable extends boolean = false, Option extends Options<T> = Options<T>> {
|
|
9
9
|
label?: string;
|
|
10
10
|
desc?: string;
|
package/Signal/Arg.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Dayjs, GqlScalarName } from "@akanjs/base";
|
|
2
|
-
import {
|
|
2
|
+
import { SerializedArg } from "@akanjs/signal";
|
|
3
3
|
interface ArgProps {
|
|
4
4
|
argType: GqlScalarName;
|
|
5
5
|
value: any;
|
|
@@ -7,10 +7,10 @@ interface ArgProps {
|
|
|
7
7
|
}
|
|
8
8
|
declare function Arg({ argType, value, onChange }: ArgProps): import("react/jsx-runtime").JSX.Element;
|
|
9
9
|
declare namespace Arg {
|
|
10
|
-
var Table: ({
|
|
11
|
-
var Param: ({ argMeta, value, onChange }: ArgParamProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
-
var Query: ({ argMeta, value, onChange }: ArgQueryProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
-
var FormData: ({ argMeta, value, onChange }: ArgFormDataProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
var Table: ({ refName, gqlKey, argMetas }: ArgTableProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
var Param: ({ gqlKey, argMeta, value, onChange }: ArgParamProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
var Query: ({ gqlKey, argMeta, value, onChange }: ArgQueryProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
var FormData: ({ gqlKey, argMeta, value, onChange }: ArgFormDataProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
14
|
var ID: ({ value, onChange }: ArgIDProps) => import("react/jsx-runtime").JSX.Element;
|
|
15
15
|
var Int: ({ value, onChange }: ArgIntProps) => import("react/jsx-runtime").JSX.Element;
|
|
16
16
|
var Float: ({ value, onChange }: ArgFloatProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -22,22 +22,25 @@ declare namespace Arg {
|
|
|
22
22
|
}
|
|
23
23
|
export default Arg;
|
|
24
24
|
interface ArgTableProps {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
argMetas:
|
|
25
|
+
refName: string;
|
|
26
|
+
gqlKey: string;
|
|
27
|
+
argMetas: SerializedArg[];
|
|
28
28
|
}
|
|
29
29
|
interface ArgParamProps {
|
|
30
|
-
|
|
30
|
+
gqlKey: string;
|
|
31
|
+
argMeta: SerializedArg;
|
|
31
32
|
value: any;
|
|
32
33
|
onChange: (value: any) => void;
|
|
33
34
|
}
|
|
34
35
|
interface ArgQueryProps {
|
|
35
|
-
|
|
36
|
+
gqlKey: string;
|
|
37
|
+
argMeta: SerializedArg;
|
|
36
38
|
value: any;
|
|
37
39
|
onChange: (value: any) => void;
|
|
38
40
|
}
|
|
39
41
|
interface ArgFormDataProps {
|
|
40
|
-
|
|
42
|
+
gqlKey: string;
|
|
43
|
+
argMeta: SerializedArg;
|
|
41
44
|
value: any;
|
|
42
45
|
onChange: (value: any) => void;
|
|
43
46
|
}
|
package/Signal/Doc.d.ts
CHANGED
|
@@ -1,12 +1,19 @@
|
|
|
1
1
|
declare function Doc(): import("react/jsx-runtime").JSX.Element;
|
|
2
2
|
declare namespace Doc {
|
|
3
|
-
var Setting: () => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
var Setting: ({ guardNames, roleTypes, roleKeys, }: DocSettingProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
var AuthModal: ({ children }: DocAuthModalProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
var DocSignals: () => import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
var DocSignal: ({ refName }: DocSignalProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
7
|
var Zone: ({ refName, openAll }: ZoneProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
8
|
}
|
|
9
9
|
export default Doc;
|
|
10
|
+
interface DocSettingProps {
|
|
11
|
+
guardNames?: string[];
|
|
12
|
+
roleTypes?: string[];
|
|
13
|
+
roleKeys?: {
|
|
14
|
+
[key: string]: string;
|
|
15
|
+
};
|
|
16
|
+
}
|
|
10
17
|
interface DocAuthModalProps {
|
|
11
18
|
children: any;
|
|
12
19
|
}
|
package/Signal/GraphQL.d.ts
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { ArgMeta, GqlMeta } from "@akanjs/signal";
|
|
1
|
+
import { SerializedEndpoint } from "@akanjs/signal";
|
|
3
2
|
declare function GraphQL(): import("react/jsx-runtime").JSX.Element;
|
|
4
3
|
declare namespace GraphQL {
|
|
5
|
-
var Endpoints: ({ refName, openAll }: GraphQLEndpointsProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
-
var Endpoint: ({
|
|
7
|
-
var Interface: ({
|
|
8
|
-
var Try: ({
|
|
4
|
+
var Endpoints: ({ refName, openAll }: GraphQLEndpointsProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
5
|
+
var Endpoint: ({ refName, gqlKey, gqlMeta, open }: GraphQLEndpointProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
var Interface: ({ refName, gqlKey, gqlMeta }: GraphQLInterfaceProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
var Try: ({ gqlKey, gqlMeta }: GraphQLTryProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
8
|
}
|
|
10
9
|
export default GraphQL;
|
|
11
10
|
interface GraphQLEndpointsProps {
|
|
@@ -13,19 +12,17 @@ interface GraphQLEndpointsProps {
|
|
|
13
12
|
openAll?: boolean;
|
|
14
13
|
}
|
|
15
14
|
interface GraphQLEndpointProps {
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
refName: string;
|
|
16
|
+
gqlKey: string;
|
|
17
|
+
gqlMeta: SerializedEndpoint;
|
|
18
18
|
open?: boolean;
|
|
19
19
|
}
|
|
20
20
|
interface GraphQLInterfaceProps {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
uploadArgMetas: ArgMeta[];
|
|
21
|
+
refName: string;
|
|
22
|
+
gqlKey: string;
|
|
23
|
+
gqlMeta: SerializedEndpoint;
|
|
25
24
|
}
|
|
26
25
|
interface GraphQLTryProps {
|
|
27
|
-
|
|
28
|
-
gqlMeta:
|
|
29
|
-
gqlArgMetas: ArgMeta[];
|
|
30
|
-
uploadArgMetas: ArgMeta[];
|
|
26
|
+
gqlKey: string;
|
|
27
|
+
gqlMeta: SerializedEndpoint;
|
|
31
28
|
}
|
package/Signal/Message.d.ts
CHANGED
|
@@ -1,26 +1,23 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { ArgMeta, GqlMeta } from "@akanjs/signal";
|
|
1
|
+
import { SerializedEndpoint } from "@akanjs/signal";
|
|
3
2
|
declare function Message(): import("react/jsx-runtime").JSX.Element;
|
|
4
3
|
declare namespace Message {
|
|
5
|
-
var Endpoint: ({
|
|
6
|
-
var Interface: ({
|
|
7
|
-
var Try: ({
|
|
4
|
+
var Endpoint: ({ refName, gqlKey, gqlMeta, open }: MessageEndpointProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
var Interface: ({ refName, gqlKey, gqlMeta }: MessageInterfaceProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
var Try: ({ gqlKey, gqlMeta }: MessageTryProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
7
|
}
|
|
9
8
|
export default Message;
|
|
10
9
|
interface MessageEndpointProps {
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
refName: string;
|
|
11
|
+
gqlKey: string;
|
|
12
|
+
gqlMeta: SerializedEndpoint;
|
|
13
13
|
open?: boolean;
|
|
14
14
|
}
|
|
15
15
|
interface MessageInterfaceProps {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
uploadArgMetas: ArgMeta[];
|
|
16
|
+
refName: string;
|
|
17
|
+
gqlKey: string;
|
|
18
|
+
gqlMeta: SerializedEndpoint;
|
|
20
19
|
}
|
|
21
20
|
interface MessageTryProps {
|
|
22
|
-
|
|
23
|
-
gqlMeta:
|
|
24
|
-
gqlArgMetas: ArgMeta[];
|
|
25
|
-
uploadArgMetas: ArgMeta[];
|
|
21
|
+
gqlKey: string;
|
|
22
|
+
gqlMeta: SerializedEndpoint;
|
|
26
23
|
}
|
package/Signal/PubSub.d.ts
CHANGED
|
@@ -1,26 +1,24 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { ArgMeta, GqlMeta } from "@akanjs/signal";
|
|
1
|
+
import { SerializedEndpoint } from "@akanjs/signal";
|
|
3
2
|
declare function PubSub(): import("react/jsx-runtime").JSX.Element;
|
|
4
3
|
declare namespace PubSub {
|
|
5
|
-
var Endpoint: ({
|
|
6
|
-
var Interface: ({
|
|
7
|
-
var Try: ({
|
|
4
|
+
var Endpoint: ({ refName, gqlKey, gqlMeta, open }: PubSubEndpointProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
var Interface: ({ refName, gqlKey, gqlMeta }: PubSubInterfaceProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
var Try: ({ refName, gqlKey, gqlMeta }: PubSubTryProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
7
|
}
|
|
9
8
|
export default PubSub;
|
|
10
9
|
interface PubSubEndpointProps {
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
refName: string;
|
|
11
|
+
gqlKey: string;
|
|
12
|
+
gqlMeta: SerializedEndpoint;
|
|
13
13
|
open?: boolean;
|
|
14
14
|
}
|
|
15
15
|
interface PubSubInterfaceProps {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
uploadArgMetas: ArgMeta[];
|
|
16
|
+
refName: string;
|
|
17
|
+
gqlKey: string;
|
|
18
|
+
gqlMeta: SerializedEndpoint;
|
|
20
19
|
}
|
|
21
20
|
interface PubSubTryProps {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
uploadArgMetas: ArgMeta[];
|
|
21
|
+
refName: string;
|
|
22
|
+
gqlKey: string;
|
|
23
|
+
gqlMeta: SerializedEndpoint;
|
|
26
24
|
}
|
package/Signal/Response.d.ts
CHANGED
|
@@ -1,14 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { GqlMeta } from "@akanjs/signal";
|
|
1
|
+
import { SerializedEndpoint } from "@akanjs/signal";
|
|
3
2
|
declare function Response(): import("react/jsx-runtime").JSX.Element;
|
|
4
3
|
declare namespace Response {
|
|
5
|
-
var Example: ({
|
|
4
|
+
var Example: ({ gqlMeta }: ResponseExampleProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
5
|
var Result: ({ status, data }: ResponseResultProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
6
|
}
|
|
8
7
|
export default Response;
|
|
9
8
|
interface ResponseExampleProps {
|
|
10
|
-
|
|
11
|
-
gqlMeta: GqlMeta;
|
|
9
|
+
gqlMeta: SerializedEndpoint;
|
|
12
10
|
}
|
|
13
11
|
interface ResponseResultProps {
|
|
14
12
|
status: "idle" | "loading" | "success" | "error";
|
package/Signal/RestApi.d.ts
CHANGED
|
@@ -1,39 +1,36 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { ArgMeta, GqlMeta } from "@akanjs/signal";
|
|
1
|
+
import { SerializedEndpoint } from "@akanjs/signal";
|
|
3
2
|
declare function RestApi(): import("react/jsx-runtime").JSX.Element;
|
|
4
3
|
declare namespace RestApi {
|
|
5
|
-
var Endpoints: ({ refName, endpoints, openAll, httpUri }: RestApiEndpointsProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
6
|
-
var Endpoint: ({
|
|
7
|
-
var Interface: ({
|
|
8
|
-
var Try: ({
|
|
4
|
+
var Endpoints: ({ refName, prefix, endpoints, openAll, httpUri }: RestApiEndpointsProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
5
|
+
var Endpoint: ({ refName, prefix, gqlKey, gqlMeta, open, httpUri }: RestApiEndpointProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
var Interface: ({ refName, gqlKey, gqlMeta }: RestApiInterfaceProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
var Try: ({ prefix, refName, gqlKey, gqlMeta, httpUri }: RestApiTryProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
8
|
}
|
|
10
9
|
export default RestApi;
|
|
11
10
|
interface RestApiEndpointsProps {
|
|
12
11
|
refName: string;
|
|
12
|
+
prefix?: string;
|
|
13
13
|
endpoints?: string[];
|
|
14
14
|
openAll?: boolean;
|
|
15
15
|
httpUri?: string;
|
|
16
16
|
}
|
|
17
17
|
interface RestApiEndpointProps {
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
refName: string;
|
|
19
|
+
prefix?: string;
|
|
20
|
+
gqlKey: string;
|
|
21
|
+
gqlMeta: SerializedEndpoint;
|
|
20
22
|
open?: boolean;
|
|
21
23
|
httpUri?: string;
|
|
22
24
|
}
|
|
23
25
|
interface RestApiInterfaceProps {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
paramArgMetas: ArgMeta[];
|
|
28
|
-
bodyArgMetas: ArgMeta[];
|
|
29
|
-
uploadArgMetas: ArgMeta[];
|
|
26
|
+
refName: string;
|
|
27
|
+
gqlKey: string;
|
|
28
|
+
gqlMeta: SerializedEndpoint;
|
|
30
29
|
}
|
|
31
30
|
interface RestApiTryProps {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
bodyArgMetas: ArgMeta[];
|
|
37
|
-
uploadArgMetas: ArgMeta[];
|
|
31
|
+
prefix?: string;
|
|
32
|
+
refName: string;
|
|
33
|
+
gqlKey: string;
|
|
34
|
+
gqlMeta: SerializedEndpoint;
|
|
38
35
|
httpUri?: string;
|
|
39
36
|
}
|
package/Signal/WebSocket.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
declare function WebSocket(): import("react/jsx-runtime").JSX.Element;
|
|
2
2
|
declare namespace WebSocket {
|
|
3
|
-
var Endpoints: ({ refName, openAll }: WebSocketEndpointsProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
var Endpoints: ({ refName, openAll }: WebSocketEndpointsProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
4
4
|
}
|
|
5
5
|
export default WebSocket;
|
|
6
6
|
interface WebSocketEndpointsProps {
|
package/System/CSR.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ export declare const CSR: {
|
|
|
5
5
|
({ children }: {
|
|
6
6
|
children: any;
|
|
7
7
|
}): import("react/jsx-runtime").JSX.Element;
|
|
8
|
-
Provider: ({ className, appName, params, head, env, theme, prefix, children, gaTrackingId, fonts, layoutStyle, reconnect, of,
|
|
8
|
+
Provider: ({ className, appName, params, head, env, theme, prefix, children, gaTrackingId, fonts, layoutStyle, reconnect, of, }: CSRProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
9
|
Wrapper: ({ children, lang, head, fonts, appName, className, prefix, layoutStyle, }: CSRWrapperProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
10
|
Inner: () => import("react/jsx-runtime").JSX.Element;
|
|
11
11
|
Bridge: ({ lang, prefix }: CSRBridgeProps) => null;
|
|
@@ -13,7 +13,7 @@ export declare const CSR: {
|
|
|
13
13
|
export type CSRProviderProps = ProviderProps & {
|
|
14
14
|
fonts: ReactFont[];
|
|
15
15
|
};
|
|
16
|
-
declare const CSRProvider: ({ className, appName, params, head, env, theme, prefix, children, gaTrackingId, fonts, layoutStyle, reconnect, of,
|
|
16
|
+
declare const CSRProvider: ({ className, appName, params, head, env, theme, prefix, children, gaTrackingId, fonts, layoutStyle, reconnect, of, }: CSRProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
17
17
|
interface CSRWrapperProps {
|
|
18
18
|
className?: string;
|
|
19
19
|
appName: string;
|
package/System/Common.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "dayjs/locale/ko";
|
|
2
|
-
import type
|
|
2
|
+
import { type BaseClientEnv } from "@akanjs/base";
|
|
3
3
|
import { type RootLayoutProps } from "@akanjs/client";
|
|
4
4
|
import { FetchPolicy } from "@akanjs/common";
|
|
5
5
|
import { ReactNode } from "react";
|
|
@@ -16,21 +16,10 @@ export interface ProviderProps {
|
|
|
16
16
|
layoutStyle?: "mobile" | "web";
|
|
17
17
|
reconnect?: boolean;
|
|
18
18
|
of: (props: any) => ReactNode | null;
|
|
19
|
-
fetchPing?: (option?: FetchPolicy) => Promise<any>;
|
|
20
|
-
fetchMe?: (props: {
|
|
21
|
-
crystalize: boolean;
|
|
22
|
-
}, option?: FetchPolicy) => Promise<{
|
|
23
|
-
id: string;
|
|
24
|
-
}>;
|
|
25
|
-
fetchSelf?: (props: {
|
|
26
|
-
crystalize: boolean;
|
|
27
|
-
}, option?: FetchPolicy) => Promise<{
|
|
28
|
-
id: string;
|
|
29
|
-
}>;
|
|
30
19
|
}
|
|
31
20
|
export declare const Common: {
|
|
32
21
|
(): import("react/jsx-runtime").JSX.Element;
|
|
33
|
-
Wrapper: ({ fetch,
|
|
22
|
+
Wrapper: ({ fetch, render, }: WrapperProps) => import("react/jsx-runtime").JSX.Element;
|
|
34
23
|
};
|
|
35
24
|
export type InitAuthFetchType = typeof window.fetch & {
|
|
36
25
|
ping: (option?: FetchPolicy) => Promise<any>;
|
|
@@ -47,21 +36,9 @@ export type InitAuthFetchType = typeof window.fetch & {
|
|
|
47
36
|
};
|
|
48
37
|
interface WrapperProps {
|
|
49
38
|
fetch: InitAuthFetchType;
|
|
50
|
-
environment: string;
|
|
51
39
|
render: (props: {
|
|
52
40
|
mePromise: Promise<any>;
|
|
53
41
|
selfPromise: Promise<any>;
|
|
54
42
|
}) => ReactNode;
|
|
55
|
-
fetchPing?: (option?: FetchPolicy) => Promise<any>;
|
|
56
|
-
fetchMe?: (props: {
|
|
57
|
-
crystalize: boolean;
|
|
58
|
-
}, option?: FetchPolicy) => Promise<{
|
|
59
|
-
id: string;
|
|
60
|
-
}> | undefined;
|
|
61
|
-
fetchSelf?: (props: {
|
|
62
|
-
crystalize: boolean;
|
|
63
|
-
}, option?: FetchPolicy) => Promise<{
|
|
64
|
-
id: string;
|
|
65
|
-
}> | undefined;
|
|
66
43
|
}
|
|
67
44
|
export {};
|
package/System/SSR.d.ts
CHANGED
|
@@ -2,13 +2,13 @@ import { ReactNode } from "react";
|
|
|
2
2
|
import { type ProviderProps } from "./Common";
|
|
3
3
|
export declare const SSR: {
|
|
4
4
|
(): import("react/jsx-runtime").JSX.Element;
|
|
5
|
-
Provider: ({ className, appName, params, head, env, gaTrackingId, children, theme, prefix, fonts, layoutStyle, reconnect, of,
|
|
5
|
+
Provider: ({ className, appName, params, head, env, gaTrackingId, children, theme, prefix, fonts, layoutStyle, reconnect, of, }: SSRProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
Wrapper: ({ children, lang, head, fonts, appName, className, prefix, layoutStyle, }: SSRWrapperProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
7
|
};
|
|
8
8
|
export type SSRProviderProps = ProviderProps & {
|
|
9
9
|
fonts?: NextFont[];
|
|
10
10
|
};
|
|
11
|
-
declare const SSRProvider: ({ className, appName, params, head, env, gaTrackingId, children, theme, prefix, fonts, layoutStyle, reconnect, of,
|
|
11
|
+
declare const SSRProvider: ({ className, appName, params, head, env, gaTrackingId, children, theme, prefix, fonts, layoutStyle, reconnect, of, }: SSRProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
12
|
export interface NextFont {
|
|
13
13
|
className: string;
|
|
14
14
|
variable: string;
|
package/Table.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ interface Column {
|
|
|
6
6
|
title: ReactNode;
|
|
7
7
|
dataIndex: string;
|
|
8
8
|
render?: (text: any, record: any, idx: number) => React.ReactNode;
|
|
9
|
-
responsive?: Responsive[];
|
|
9
|
+
responsive?: Responsive["value"][];
|
|
10
10
|
}
|
|
11
11
|
interface TableProps {
|
|
12
12
|
columns: Column[];
|
|
@@ -15,7 +15,7 @@ interface TableProps {
|
|
|
15
15
|
size?: "small" | "middle";
|
|
16
16
|
bordered?: boolean;
|
|
17
17
|
pagination?: PaginationProps | false;
|
|
18
|
-
showHeader?: boolean | Responsive[];
|
|
18
|
+
showHeader?: boolean | Responsive["value"][];
|
|
19
19
|
onRow?: (record: any, index: number) => {
|
|
20
20
|
onClick: (() => void) | (() => Promise<boolean>);
|
|
21
21
|
};
|
package/cjs/Data/Insight.js
CHANGED
|
@@ -34,7 +34,7 @@ function Insight({
|
|
|
34
34
|
const refName = import_store.st.slice[sliceName].refName;
|
|
35
35
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: (0, import_client.clsx)("stats my-2 flex w-full flex-wrap justify-center py-2 shadow-sm", className), children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "stats", children: columns?.map(
|
|
36
36
|
(column, idx) => insight[column] !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "stat mx-1 flex items-center rounded-none", children: [
|
|
37
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "stat-title", children: l.
|
|
37
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "stat-title", children: l._(`${refName}.${column}`) }),
|
|
38
38
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "stat-value text-xl", children: insight[column].toLocaleString() })
|
|
39
39
|
] }, idx)
|
|
40
40
|
) }) });
|
package/cjs/Data/Item.js
CHANGED
|
@@ -94,7 +94,7 @@ function Item({
|
|
|
94
94
|
return !["id", "status", "createdAt"].includes(key);
|
|
95
95
|
}).map((column, idx) => {
|
|
96
96
|
const key = typeof column === "string" ? column : column.key;
|
|
97
|
-
const title2 = typeof column !== "string" && column.title ? column.title : l.
|
|
97
|
+
const title2 = typeof column !== "string" && column.title ? column.title : l._(`${sliceName}.${key}`);
|
|
98
98
|
const render = convToAntdColumn(column).render ?? ((v, m, i) => JSON.stringify(v, null, 2));
|
|
99
99
|
const modelKeyLength = model[key]?.length;
|
|
100
100
|
if (convToAntdColumn(column).render) {
|
|
@@ -105,7 +105,7 @@ function ListContainer({
|
|
|
105
105
|
(0, import_react.useEffect)(() => {
|
|
106
106
|
void storeDo[namesOfSlice.initModel]();
|
|
107
107
|
}, []);
|
|
108
|
-
const RenderTitle = renderTitle ?? ((model) => `${l(`${refName}.modelName`)} - ${model.id ? model.id : "New"}`);
|
|
108
|
+
const RenderTitle = renderTitle ?? ((model) => `${l._(`${refName}.modelName`)} - ${model.id ? model.id : "New"}`);
|
|
109
109
|
const ModelDashboard = () => {
|
|
110
110
|
const summary = storeUse.summary();
|
|
111
111
|
const summaryLoading = storeUse.summaryLoading();
|
|
@@ -133,11 +133,11 @@ function ListContainer({
|
|
|
133
133
|
onClick: () => {
|
|
134
134
|
const header = columns.map((column) => {
|
|
135
135
|
if (typeof column === "string")
|
|
136
|
-
return l.
|
|
136
|
+
return l._(`${sliceName}.${column}`);
|
|
137
137
|
else if (column.title)
|
|
138
138
|
return column.title;
|
|
139
139
|
else
|
|
140
|
-
return l.
|
|
140
|
+
return l._(`${sliceName}.${column.key}`);
|
|
141
141
|
}).join(" ");
|
|
142
142
|
const body = modelList.map((model) => {
|
|
143
143
|
const line = columns.map((column) => {
|
|
@@ -196,7 +196,7 @@ ${body}`], { type: "text/csv;charset=utf-8" });
|
|
|
196
196
|
{
|
|
197
197
|
value: sortOfModel,
|
|
198
198
|
options: import_client.fetch[names.modelSortKeys]?.map((sortKey) => ({
|
|
199
|
-
label: l.
|
|
199
|
+
label: l._(`${refName}.${sortKey}`),
|
|
200
200
|
value: sortKey
|
|
201
201
|
})) ?? [],
|
|
202
202
|
onChange: (sortKey) => void storeDo[namesOfSlice.setSortOfModel](sortKey)
|
|
@@ -207,7 +207,7 @@ ${body}`], { type: "text/csv;charset=utf-8" });
|
|
|
207
207
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "mb-3 flex flex-wrap justify-between", children: [
|
|
208
208
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex pb-1", children: [
|
|
209
209
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("p", { className: "prose text-lg", children: [
|
|
210
|
-
title ?? l.
|
|
210
|
+
title ?? l._(`${sliceName}.modelName`),
|
|
211
211
|
"(",
|
|
212
212
|
modelInsight.count,
|
|
213
213
|
")"
|