@akanjs/ui 0.9.48 → 0.9.49

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.
Files changed (107) hide show
  1. package/Data/CardList.d.ts +1 -1
  2. package/Data/ListContainer.d.ts +4 -5
  3. package/Data/QueryMaker.d.ts +1 -1
  4. package/Data/TableList.d.ts +1 -1
  5. package/Data/index.d.ts +0 -1
  6. package/Field.d.ts +1 -1
  7. package/Layout/Navbar.d.ts +1 -1
  8. package/Model/AdminPanel.d.ts +2 -3
  9. package/System/CSR.d.ts +2 -2
  10. package/System/Client.d.ts +4 -2
  11. package/System/Common.d.ts +10 -9
  12. package/System/SSR.d.ts +2 -2
  13. package/cjs/Button.js +3 -4
  14. package/cjs/Data/Dashboard.js +1 -2
  15. package/cjs/Data/Insight.js +1 -2
  16. package/cjs/Data/Item.js +3 -4
  17. package/cjs/Data/ListContainer.js +5 -19
  18. package/cjs/Data/QueryMaker.js +1 -292
  19. package/cjs/Data/TableList.js +3 -3
  20. package/cjs/Data/index.js +2 -2
  21. package/cjs/DatePicker.js +4 -5
  22. package/cjs/Dialog/Modal.js +2 -3
  23. package/cjs/Empty.js +2 -3
  24. package/cjs/Field.js +42 -46
  25. package/cjs/Input.js +11 -12
  26. package/cjs/Layout/BottomTab.js +1 -2
  27. package/cjs/Link/CsrLink.js +1 -2
  28. package/cjs/Link/NextLink.js +1 -2
  29. package/cjs/Load/Page.js +1 -2
  30. package/cjs/Load/Units.js +4 -3
  31. package/cjs/Load/View.js +3 -2
  32. package/cjs/Model/Edit.js +2 -3
  33. package/cjs/Model/EditModal.js +5 -4
  34. package/cjs/Model/New.js +2 -3
  35. package/cjs/Model/NewWrapper_Client.js +3 -2
  36. package/cjs/Model/Remove.js +6 -8
  37. package/cjs/Model/RemoveWrapper.js +3 -4
  38. package/cjs/Model/SureToRemove.js +8 -10
  39. package/cjs/Model/ViewEditModal.js +4 -4
  40. package/cjs/Popconfirm.js +3 -4
  41. package/cjs/RecentTime.js +1 -2
  42. package/cjs/Select.js +2 -2
  43. package/cjs/Signal/Arg.js +2 -2
  44. package/cjs/Signal/Doc.js +2 -2
  45. package/cjs/Signal/GraphQL.js +4 -4
  46. package/cjs/Signal/Message.js +2 -4
  47. package/cjs/Signal/Object.js +12 -17
  48. package/cjs/Signal/PubSub.js +2 -4
  49. package/cjs/Signal/RestApi.js +2 -2
  50. package/cjs/System/CSR.js +3 -6
  51. package/cjs/System/Client.js +18 -7
  52. package/cjs/System/Common.js +2 -2
  53. package/cjs/System/Messages.js +2 -4
  54. package/cjs/System/Reconnect.js +16 -21
  55. package/cjs/System/Root.js +0 -4
  56. package/cjs/System/SSR.js +30 -24
  57. package/cjs/System/SelectLanguage.js +1 -2
  58. package/cjs/ToggleSelect.js +4 -5
  59. package/cjs/Unauthorized.js +2 -3
  60. package/esm/Button.js +3 -4
  61. package/esm/Data/Dashboard.js +1 -2
  62. package/esm/Data/Insight.js +1 -2
  63. package/esm/Data/Item.js +2 -3
  64. package/esm/Data/ListContainer.js +6 -20
  65. package/esm/Data/QueryMaker.js +1 -299
  66. package/esm/Data/TableList.js +2 -2
  67. package/esm/Data/index.js +3 -3
  68. package/esm/DatePicker.js +5 -6
  69. package/esm/Dialog/Modal.js +2 -3
  70. package/esm/Empty.js +2 -3
  71. package/esm/Field.js +30 -34
  72. package/esm/Input.js +7 -8
  73. package/esm/Layout/BottomTab.js +1 -2
  74. package/esm/Link/CsrLink.js +1 -2
  75. package/esm/Link/NextLink.js +1 -2
  76. package/esm/Load/Page.js +1 -2
  77. package/esm/Load/Units.js +4 -3
  78. package/esm/Load/View.js +3 -2
  79. package/esm/Model/Edit.js +2 -3
  80. package/esm/Model/EditModal.js +8 -7
  81. package/esm/Model/New.js +2 -3
  82. package/esm/Model/NewWrapper_Client.js +3 -2
  83. package/esm/Model/Remove.js +6 -8
  84. package/esm/Model/RemoveWrapper.js +3 -4
  85. package/esm/Model/SureToRemove.js +8 -10
  86. package/esm/Model/ViewEditModal.js +3 -3
  87. package/esm/Popconfirm.js +3 -4
  88. package/esm/RecentTime.js +1 -2
  89. package/esm/Select.js +3 -3
  90. package/esm/Signal/Arg.js +1 -1
  91. package/esm/Signal/Doc.js +1 -1
  92. package/esm/Signal/GraphQL.js +4 -4
  93. package/esm/Signal/Message.js +1 -3
  94. package/esm/Signal/Object.js +13 -18
  95. package/esm/Signal/PubSub.js +1 -3
  96. package/esm/Signal/RestApi.js +1 -1
  97. package/esm/System/CSR.js +3 -6
  98. package/esm/System/Client.js +22 -12
  99. package/esm/System/Common.js +2 -2
  100. package/esm/System/Messages.js +1 -3
  101. package/esm/System/Reconnect.js +15 -10
  102. package/esm/System/Root.js +0 -4
  103. package/esm/System/SSR.js +30 -24
  104. package/esm/System/SelectLanguage.js +1 -2
  105. package/esm/ToggleSelect.js +3 -4
  106. package/esm/Unauthorized.js +2 -3
  107. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
1
  import { DataAction, DataColumn } from "@akanjs/client";
2
- import { type FilterType, SortType } from "@akanjs/constant";
2
+ import type { FilterType, SortType } 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 {
@@ -1,23 +1,22 @@
1
1
  import { DataAction, DataColumn, DataTool, ModelInsightProps, ModelProps } from "@akanjs/client";
2
- import { SortType } from "@akanjs/constant";
3
2
  import { type FetchInitForm } from "@akanjs/signal";
4
3
  import { ReactNode } from "react";
5
4
  export interface ListContainerProps<T extends string, State, Input, Full extends {
6
5
  id: string;
7
6
  }, Light extends {
8
7
  id: string;
9
- }, Sort extends SortType> {
8
+ }> {
10
9
  className?: string;
11
10
  cardListClassName?: string;
12
11
  type?: "card" | "list";
13
12
  query?: {
14
13
  [key: string]: any;
15
14
  };
16
- init?: FetchInitForm<Input, Full, Sort>;
15
+ init?: FetchInitForm<Input, Full, any>;
17
16
  sliceName: T;
18
17
  create?: boolean;
19
18
  title?: string;
20
- sort?: SortType;
19
+ sort?: any;
21
20
  columns?: DataColumn<any>[];
22
21
  tools?: DataTool[] | ((modelList: Light[]) => DataTool[]);
23
22
  actions?: DataAction[] | ((item: Light, idx: number) => DataAction[]);
@@ -39,4 +38,4 @@ export default function ListContainer<T extends string, State, Input, Full exten
39
38
  id: string;
40
39
  }, Light extends {
41
40
  id: string;
42
- }, Sort extends SortType>({ className, cardListClassName, type, query, init, create, sliceName, title, sort, columns, actions, tools, renderDashboard, renderItem, renderTemplate, renderTitle, renderView, renderQueryMaker, renderInsight, renderLoading, }: ListContainerProps<T, State, Input, Full, Light, Sort>): import("react/jsx-runtime").JSX.Element;
41
+ }>({ className, cardListClassName, type, query, init, create, sliceName, title, sort, columns, actions, tools, renderDashboard, renderItem, renderTemplate, renderTitle, renderView, renderQueryMaker, renderInsight, renderLoading, }: ListContainerProps<T, State, Input, Full, Light>): import("react/jsx-runtime").JSX.Element;
@@ -5,5 +5,5 @@ interface QueryMakerProps {
5
5
  [key: string]: any;
6
6
  };
7
7
  }
8
- export default function QueryMaker({ className, sliceName, query }: QueryMakerProps): import("react/jsx-runtime").JSX.Element;
8
+ export default function QueryMaker({ className, sliceName, query }: QueryMakerProps): null;
9
9
  export {};
@@ -1,5 +1,5 @@
1
1
  import { DataAction, DataColumn } from "@akanjs/client";
2
- import { SortType } from "@akanjs/constant";
2
+ import type { SortType } 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 {
package/Data/index.d.ts CHANGED
@@ -6,5 +6,4 @@ export declare const Data: {
6
6
  ListContainer: typeof import("./ListContainer").default;
7
7
  Pagination: typeof import("./Pagination").default;
8
8
  TableList: typeof import("./TableList").default;
9
- QueryMaker: typeof import("./QueryMaker").default;
10
9
  };
package/Field.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { Dayjs, Enum } from "@akanjs/base";
2
- import { SortType } from "@akanjs/constant";
2
+ import type { SortType } from "@akanjs/document";
3
3
  import { ReactNode } from "react";
4
4
  interface LabelProps {
5
5
  className?: string;
@@ -4,7 +4,7 @@ export interface NavbarProps {
4
4
  children?: ReactNode;
5
5
  height?: number;
6
6
  title?: ReactNode;
7
- back: ReactNode;
7
+ back?: ReactNode;
8
8
  left?: ReactNode;
9
9
  right?: ReactNode;
10
10
  }
@@ -1,10 +1,9 @@
1
- import { type SortType } from "@akanjs/constant";
2
1
  import type { ListContainerProps } from "../Data/ListContainer";
3
2
  interface AdminPanelProps<T extends string, State, Input, Full extends {
4
3
  id: string;
5
4
  }, Light extends {
6
5
  id: string;
7
- }, Sort extends SortType> extends ListContainerProps<T, State, Input, Full, Light, Sort> {
6
+ }> extends ListContainerProps<T, State, Input, Full, Light> {
8
7
  sliceName: T;
9
8
  components: {
10
9
  Template: {
@@ -27,5 +26,5 @@ export default function AdminPanel<T extends string, State, Input, Full extends
27
26
  id: string;
28
27
  }, Light extends {
29
28
  id: string;
30
- }, Sort extends SortType>({ sliceName, components, summaryColumns, insightColumns, renderInsight, renderDashboard, ...props }: AdminPanelProps<T, State, Input, Full, Light, Sort>): import("react/jsx-runtime").JSX.Element;
29
+ }>({ sliceName, components, summaryColumns, insightColumns, renderInsight, renderDashboard, ...props }: AdminPanelProps<T, State, Input, Full, Light>): import("react/jsx-runtime").JSX.Element;
31
30
  export {};
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, fetch, children, gaTrackingId, fonts, layoutStyle, reconnect, of, fetchPing, fetchMe, fetchSelf, }: CSRProviderProps) => import("react/jsx-runtime").JSX.Element;
8
+ Provider: ({ className, appName, params, head, env, theme, prefix, children, gaTrackingId, fonts, layoutStyle, reconnect, of, fetchPing, fetchMe, fetchSelf, }: 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, fetch, children, gaTrackingId, fonts, layoutStyle, reconnect, of, fetchPing, fetchMe, fetchSelf, }: CSRProviderProps) => import("react/jsx-runtime").JSX.Element;
16
+ declare const CSRProvider: ({ className, appName, params, head, env, theme, prefix, children, gaTrackingId, fonts, layoutStyle, reconnect, of, fetchPing, fetchMe, fetchSelf, }: CSRProviderProps) => import("react/jsx-runtime").JSX.Element;
17
17
  interface CSRWrapperProps {
18
18
  className?: string;
19
19
  appName: string;
@@ -1,9 +1,10 @@
1
1
  import type { BaseClientEnv } from "@akanjs/base";
2
2
  import { type Location, type TransitionStyle } from "@akanjs/client";
3
+ import { SerializedSignal } from "@akanjs/signal";
3
4
  import { HTMLAttributes, RefObject } from "react";
4
5
  export declare const Client: {
5
6
  (): import("react/jsx-runtime").JSX.Element;
6
- Wrapper: ({ children, theme, lang, dictionary, reconnect, }: ClientWrapperProps) => import("react/jsx-runtime").JSX.Element;
7
+ Wrapper: ({ children, theme, lang, dictionary, signals, reconnect, }: ClientWrapperProps) => import("react/jsx-runtime").JSX.Element;
7
8
  Bridge: ({ env, lang, mePromise, selfPromise, theme, prefix, gaTrackingId }: ClientBridgeProps) => "" | import("react/jsx-runtime").JSX.Element | undefined;
8
9
  Inner: () => import("react/jsx-runtime").JSX.Element;
9
10
  NextBridge: ({ lang, prefix }: ClientNextBridgeProps) => null;
@@ -17,9 +18,10 @@ interface ClientWrapperProps {
17
18
  [key: string]: string;
18
19
  };
19
20
  };
21
+ signals?: SerializedSignal[];
20
22
  reconnect?: boolean;
21
23
  }
22
- export declare const ClientWrapper: ({ children, theme, lang, dictionary, reconnect, }: ClientWrapperProps) => import("react/jsx-runtime").JSX.Element;
24
+ export declare const ClientWrapper: ({ children, theme, lang, dictionary, signals, reconnect, }: ClientWrapperProps) => import("react/jsx-runtime").JSX.Element;
23
25
  interface ClientPathWrapperProps extends Omit<HTMLAttributes<HTMLDivElement>, "style"> {
24
26
  bind?: () => any;
25
27
  wrapperRef?: RefObject<HTMLDivElement | null> | null;
@@ -1,6 +1,7 @@
1
1
  import "dayjs/locale/ko";
2
2
  import type { BaseClientEnv } from "@akanjs/base";
3
3
  import { type RootLayoutProps } from "@akanjs/client";
4
+ import { FetchPolicy } from "@akanjs/common";
4
5
  import { ReactNode } from "react";
5
6
  export interface ProviderProps {
6
7
  className?: string;
@@ -10,21 +11,20 @@ export interface ProviderProps {
10
11
  env: BaseClientEnv;
11
12
  theme?: string;
12
13
  prefix?: string;
13
- fetch: any;
14
14
  children: ReactNode | ReactNode[];
15
15
  gaTrackingId?: string;
16
16
  layoutStyle?: "mobile" | "web";
17
17
  reconnect?: boolean;
18
18
  of: (props: any) => ReactNode | null;
19
- fetchPing?: () => Promise<any>;
19
+ fetchPing?: (option?: FetchPolicy) => Promise<any>;
20
20
  fetchMe?: (props: {
21
21
  crystalize: boolean;
22
- }) => Promise<{
22
+ }, option?: FetchPolicy) => Promise<{
23
23
  id: string;
24
24
  }>;
25
25
  fetchSelf?: (props: {
26
26
  crystalize: boolean;
27
- }) => Promise<{
27
+ }, option?: FetchPolicy) => Promise<{
28
28
  id: string;
29
29
  }>;
30
30
  }
@@ -33,14 +33,15 @@ export declare const Common: {
33
33
  Wrapper: ({ fetch, environment, render, fetchPing, fetchMe, fetchSelf, }: WrapperProps) => import("react/jsx-runtime").JSX.Element;
34
34
  };
35
35
  export type InitAuthFetchType = typeof window.fetch & {
36
+ ping: (option?: FetchPolicy) => Promise<any>;
36
37
  me?: (props: {
37
38
  crystalize: boolean;
38
- }) => Promise<{
39
+ }, option?: FetchPolicy) => Promise<{
39
40
  id: string;
40
41
  }>;
41
42
  getSelf?: (props: {
42
43
  crystalize: boolean;
43
- }) => Promise<{
44
+ }, option?: FetchPolicy) => Promise<{
44
45
  id: string;
45
46
  }>;
46
47
  };
@@ -51,15 +52,15 @@ interface WrapperProps {
51
52
  mePromise: Promise<any>;
52
53
  selfPromise: Promise<any>;
53
54
  }) => ReactNode;
54
- fetchPing?: () => Promise<any>;
55
+ fetchPing?: (option?: FetchPolicy) => Promise<any>;
55
56
  fetchMe?: (props: {
56
57
  crystalize: boolean;
57
- }) => Promise<{
58
+ }, option?: FetchPolicy) => Promise<{
58
59
  id: string;
59
60
  }> | undefined;
60
61
  fetchSelf?: (props: {
61
62
  crystalize: boolean;
62
- }) => Promise<{
63
+ }, option?: FetchPolicy) => Promise<{
63
64
  id: string;
64
65
  }> | undefined;
65
66
  }
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, fetch, children, theme, prefix, fonts, layoutStyle, reconnect, of, fetchPing, fetchMe, fetchSelf, }: SSRProviderProps) => import("react/jsx-runtime").JSX.Element;
5
+ Provider: ({ className, appName, params, head, env, gaTrackingId, children, theme, prefix, fonts, layoutStyle, reconnect, of, fetchPing, fetchMe, fetchSelf, }: 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, fetch, children, theme, prefix, fonts, layoutStyle, reconnect, of, fetchPing, fetchMe, fetchSelf, }: SSRProviderProps) => import("react/jsx-runtime").JSX.Element;
11
+ declare const SSRProvider: ({ className, appName, params, head, env, gaTrackingId, children, theme, prefix, fonts, layoutStyle, reconnect, of, fetchPing, fetchMe, fetchSelf, }: SSRProviderProps) => import("react/jsx-runtime").JSX.Element;
12
12
  export interface NextFont {
13
13
  className: string;
14
14
  variable: string;
package/cjs/Button.js CHANGED
@@ -23,11 +23,10 @@ __export(Button_exports, {
23
23
  module.exports = __toCommonJS(Button_exports);
24
24
  var import_jsx_runtime = require("react/jsx-runtime");
25
25
  var import_client = require("@akanjs/client");
26
- var import_next = require("@akanjs/next");
27
26
  var import_react = require("react");
28
27
  var import_ai = require("react-icons/ai");
29
28
  const Button = ({ className, children, onClick, onSuccess, ...rest }) => {
30
- const { l } = (0, import_next.usePage)();
29
+ const { l } = (0, import_client.usePage)();
31
30
  const [state, setState] = (0, import_react.useState)({
32
31
  mode: "idle",
33
32
  error: null,
@@ -58,11 +57,11 @@ const Button = ({ className, children, onClick, onSuccess, ...rest }) => {
58
57
  children: state.mode === "loading" ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
59
58
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "loading loading-bars loading-md" }),
60
59
  " ",
61
- l("util.processing")
60
+ l("base.processing")
62
61
  ] }) : state.mode === "success" ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
63
62
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ai.AiOutlineCheckCircle, {}),
64
63
  " ",
65
- l("util.processed")
64
+ l("base.processed")
66
65
  ] }) : children
67
66
  }
68
67
  ),
@@ -24,7 +24,6 @@ module.exports = __toCommonJS(Dashboard_exports);
24
24
  var import_jsx_runtime = require("react/jsx-runtime");
25
25
  var import_client = require("@akanjs/client");
26
26
  var import_common = require("@akanjs/common");
27
- var import_next = require("@akanjs/next");
28
27
  var import_store = require("@akanjs/store");
29
28
  var import_Link = require("../Link");
30
29
  function Dashboard({
@@ -36,7 +35,7 @@ function Dashboard({
36
35
  presents,
37
36
  hidePresents
38
37
  }) {
39
- const { l } = (0, import_next.usePage)();
38
+ const { l } = (0, import_client.usePage)();
40
39
  const { filter } = import_store.st.use.searchParams();
41
40
  const refName = import_store.st.slice[sliceName].refName;
42
41
  const [modelName, modelClassName] = [refName, (0, import_common.capitalize)(refName)];
@@ -23,7 +23,6 @@ __export(Insight_exports, {
23
23
  module.exports = __toCommonJS(Insight_exports);
24
24
  var import_jsx_runtime = require("react/jsx-runtime");
25
25
  var import_client = require("@akanjs/client");
26
- var import_next = require("@akanjs/next");
27
26
  var import_store = require("@akanjs/store");
28
27
  function Insight({
29
28
  className,
@@ -31,7 +30,7 @@ function Insight({
31
30
  sliceName,
32
31
  columns
33
32
  }) {
34
- const { l } = (0, import_next.usePage)();
33
+ const { l } = (0, import_client.usePage)();
35
34
  const refName = import_store.st.slice[sliceName].refName;
36
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(
37
36
  (column, idx) => insight[column] !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "stat mx-1 flex items-center rounded-none", children: [
package/cjs/Data/Item.js CHANGED
@@ -26,7 +26,6 @@ module.exports = __toCommonJS(Item_exports);
26
26
  var import_jsx_runtime = require("react/jsx-runtime");
27
27
  var import_client = require("@akanjs/client");
28
28
  var import_common = require("@akanjs/common");
29
- var import_next = require("@akanjs/next");
30
29
  var import_store = require("@akanjs/store");
31
30
  var import_ai = require("react-icons/ai");
32
31
  var import_Dropdown = require("../Dropdown");
@@ -87,7 +86,7 @@ function Item({
87
86
  columns = [],
88
87
  children
89
88
  }) {
90
- const { l } = (0, import_next.usePage)();
89
+ const { l } = (0, import_client.usePage)();
91
90
  const strActions = actions.filter((action) => typeof action === "string").map((action, idx) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Action, { action, outline: false, model, sliceName }, idx));
92
91
  const customActions = actions.filter((action) => typeof action !== "string").map((action, idx) => ({ key: idx, label: action }));
93
92
  const extraCols = columns.filter((column) => {
@@ -143,7 +142,7 @@ const Action = ({
143
142
  sliceName,
144
143
  outline = true
145
144
  }) => {
146
- const { l } = (0, import_next.usePage)();
145
+ const { l } = (0, import_client.usePage)();
147
146
  const storeDo = import_store.st.do;
148
147
  const storeGet = import_store.st.get;
149
148
  const refName = import_store.st.slice[sliceName].refName;
@@ -176,7 +175,7 @@ const Action = ({
176
175
  ) : action === "remove" ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
177
176
  import_Popconfirm.Popconfirm,
178
177
  {
179
- title: l("shared.removeMsg"),
178
+ title: l("base.removeMsg"),
180
179
  onConfirm: () => void storeDo[namesOfSlice.removeModel](model.id),
181
180
  children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { className: `btn btn-square btn-ghost btn-sm m-1 text-center ${outline && "btn-outline border-dashed"}`, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ai.AiOutlineDelete, {}) })
182
181
  },
@@ -35,7 +35,6 @@ var import_jsx_runtime = require("react/jsx-runtime");
35
35
  var import_client = require("@akanjs/client");
36
36
  var import_common = require("@akanjs/common");
37
37
  var import_constant = require("@akanjs/constant");
38
- var import_next = require("@akanjs/next");
39
38
  var import_store = require("@akanjs/store");
40
39
  var import_file_saver = require("file-saver");
41
40
  var import_ai = require("react-icons/ai");
@@ -44,7 +43,6 @@ var import_Loading = require("../Loading");
44
43
  var import_Model = require("../Model");
45
44
  var import_Select = require("../Select");
46
45
  var import_CardList = __toESM(require("./CardList"));
47
- var import_QueryMaker = __toESM(require("./QueryMaker"));
48
46
  var import_TableList = __toESM(require("./TableList"));
49
47
  function ListContainer({
50
48
  className,
@@ -68,7 +66,7 @@ function ListContainer({
68
66
  renderInsight,
69
67
  renderLoading
70
68
  }) {
71
- const { l } = (0, import_next.usePage)();
69
+ const { l } = (0, import_client.usePage)();
72
70
  const storeUse = import_store.st.use;
73
71
  const storeDo = import_store.st.do;
74
72
  const refName = import_store.st.slice[sliceName].refName;
@@ -100,7 +98,7 @@ function ListContainer({
100
98
  setSortOfModel: sliceName.replace(names.model, names.setSortOfModel),
101
99
  setLimitOfModel: sliceName.replace(names.model, names.setLimitOfModel)
102
100
  };
103
- const cnst = (0, import_constant.getCnstMeta)(sliceName);
101
+ const cnstInfo = import_constant.constantInfo.getDatabase(sliceName);
104
102
  const limitOfModel = storeUse[namesOfSlice.limitOfModel]();
105
103
  const sortOfModel = storeUse[namesOfSlice.sortOfModel]();
106
104
  const RenderTitle = renderTitle ?? ((model) => `${l(`${refName}.modelName`)} - ${model.id ? model.id : "New"}`);
@@ -189,18 +187,7 @@ ${body}`], { type: "text/csv;charset=utf-8" });
189
187
  );
190
188
  };
191
189
  const RenderSort = () => {
192
- const sortMap = (0, import_constant.getFilterSortMap)(cnst.Filter);
193
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
194
- import_Select.Select,
195
- {
196
- value: sortOfModel,
197
- options: Object.keys(sortMap).map((sortKey) => ({
198
- label: l.field(sliceName, sortKey),
199
- value: sortKey
200
- })),
201
- onChange: (sortKey) => void storeDo[namesOfSlice.setSortOfModel](sortKey)
202
- }
203
- );
190
+ return null;
204
191
  };
205
192
  return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: (0, import_client.clsx)("m-4", className), children: [
206
193
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "mb-3 flex flex-wrap justify-between", children: [
@@ -215,7 +202,7 @@ ${body}`], { type: "text/csv;charset=utf-8" });
215
202
  children: [
216
203
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ai.AiOutlinePlus, {}),
217
204
  " ",
218
- l("shared.new")
205
+ l("base.new")
219
206
  ]
220
207
  }
221
208
  ) : null,
@@ -237,7 +224,7 @@ ${body}`], { type: "text/csv;charset=utf-8" });
237
224
  {
238
225
  value: limitOfModel,
239
226
  options: [10, 20, 50, 100].map((limit) => ({
240
- label: `${limit} ${l("shared.perPage")}`,
227
+ label: `${limit} ${l("base.perPage")}`,
241
228
  value: limit
242
229
  })),
243
230
  onChange: (limit) => void storeDo[namesOfSlice.setLimitOfModel](limit)
@@ -246,7 +233,6 @@ ${body}`], { type: "text/csv;charset=utf-8" });
246
233
  ] })
247
234
  ] }),
248
235
  !query && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ModelDashboard, {}),
249
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_QueryMaker.default, { className: "mb-4", sliceName, query }),
250
236
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(RenderQueryMaker, {}),
251
237
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(RenderInsight, {}),
252
238
  type === "card" ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(