@creekjs/web-components 1.0.5 → 1.0.6
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/.turbo/turbo-father$colon$build.log +35 -19
- package/README.md +97 -18
- package/dist/creek-config-provider/CreekConfigContext.d.ts +4 -0
- package/dist/creek-config-provider/CreekConfigContext.d.ts.map +1 -1
- package/dist/creek-config-provider/CreekConfigContext.js.map +2 -2
- package/dist/creek-config-provider/CreekI18nProvider.d.ts +22 -0
- package/dist/creek-config-provider/CreekI18nProvider.d.ts.map +1 -0
- package/dist/creek-config-provider/CreekI18nProvider.js +92 -0
- package/dist/creek-config-provider/CreekI18nProvider.js.map +7 -0
- package/dist/creek-config-provider/index.d.ts +5 -3
- package/dist/creek-config-provider/index.d.ts.map +1 -1
- package/dist/creek-config-provider/index.js +47 -4
- package/dist/creek-config-provider/index.js.map +3 -3
- package/dist/creek-hooks/useApp/index.d.ts +3 -3
- package/dist/creek-keep-alive/index.d.ts +24 -1
- package/dist/creek-keep-alive/index.d.ts.map +1 -1
- package/dist/creek-keep-alive/index.js +141 -4
- package/dist/creek-keep-alive/index.js.map +2 -2
- package/dist/creek-layout/ActionRender/FullScreen.d.ts.map +1 -1
- package/dist/creek-layout/ActionRender/FullScreen.js +3 -1
- package/dist/creek-layout/ActionRender/FullScreen.js.map +2 -2
- package/dist/creek-layout/ActionRender/LayoutSettings.d.ts +5 -0
- package/dist/creek-layout/ActionRender/LayoutSettings.d.ts.map +1 -0
- package/dist/creek-layout/ActionRender/LayoutSettings.js +73 -0
- package/dist/creek-layout/ActionRender/LayoutSettings.js.map +7 -0
- package/dist/creek-layout/ActionRender/UserInfo.js.map +2 -2
- package/dist/creek-layout/ActionRender/index.d.ts +1 -0
- package/dist/creek-layout/ActionRender/index.d.ts.map +1 -1
- package/dist/creek-layout/ActionRender/index.js +3 -0
- package/dist/creek-layout/ActionRender/index.js.map +2 -2
- package/dist/creek-layout/index.d.ts +5 -5
- package/dist/creek-layout/index.d.ts.map +1 -1
- package/dist/creek-layout/index.js +79 -16
- package/dist/creek-layout/index.js.map +3 -3
- package/dist/creek-layout/useLayoutSettingsStore.d.ts +20 -0
- package/dist/creek-layout/useLayoutSettingsStore.d.ts.map +1 -0
- package/dist/creek-layout/useLayoutSettingsStore.js +45 -0
- package/dist/creek-layout/useLayoutSettingsStore.js.map +7 -0
- package/dist/creek-locale-button/index.d.ts +1 -0
- package/dist/creek-locale-button/index.d.ts.map +1 -0
- package/dist/creek-locale-button/index.js +66 -0
- package/dist/creek-locale-button/index.js.map +7 -0
- package/dist/creek-page-container/index.d.ts +4 -0
- package/dist/creek-page-container/index.d.ts.map +1 -0
- package/dist/creek-page-container/index.js +68 -0
- package/dist/creek-page-container/index.js.map +7 -0
- package/dist/creek-style/index.d.ts +1 -0
- package/dist/creek-style/index.d.ts.map +1 -0
- package/dist/creek-style/index.js +24 -0
- package/dist/creek-style/index.js.map +7 -0
- package/dist/creek-style/scrollbar.d.ts +2 -0
- package/dist/creek-style/scrollbar.d.ts.map +1 -0
- package/dist/creek-style/scrollbar.js +55 -0
- package/dist/creek-style/scrollbar.js.map +7 -0
- package/dist/creek-table/SearchTable.d.ts +9 -0
- package/dist/creek-table/SearchTable.d.ts.map +1 -1
- package/dist/creek-table/SearchTable.js +109 -72
- package/dist/creek-table/SearchTable.js.map +3 -3
- package/dist/creek-table/components/DensityIcon.d.ts +9 -0
- package/dist/creek-table/components/DensityIcon.d.ts.map +1 -0
- package/dist/creek-table/components/DensityIcon.js +77 -0
- package/dist/creek-table/components/DensityIcon.js.map +7 -0
- package/dist/creek-table/components/EllipsisTooltip.d.ts +9 -0
- package/dist/creek-table/components/EllipsisTooltip.d.ts.map +1 -0
- package/dist/creek-table/components/EllipsisTooltip.js +122 -0
- package/dist/creek-table/components/EllipsisTooltip.js.map +7 -0
- package/dist/creek-table/components/index.d.ts +2 -0
- package/dist/creek-table/components/index.d.ts.map +1 -0
- package/dist/creek-table/components/index.js +26 -0
- package/dist/creek-table/components/index.js.map +7 -0
- package/dist/creek-table/hooks/index.d.ts +5 -0
- package/dist/creek-table/hooks/index.d.ts.map +1 -1
- package/dist/creek-table/hooks/index.js +10 -0
- package/dist/creek-table/hooks/index.js.map +2 -2
- package/dist/creek-table/hooks/useAutoWidthColumns.d.ts +1 -1
- package/dist/creek-table/hooks/useAutoWidthColumns.d.ts.map +1 -1
- package/dist/creek-table/hooks/useAutoWidthColumns.js +76 -17
- package/dist/creek-table/hooks/useAutoWidthColumns.js.map +2 -2
- package/dist/creek-table/hooks/useEllipsisColumns.d.ts +8 -0
- package/dist/creek-table/hooks/useEllipsisColumns.d.ts.map +1 -0
- package/dist/creek-table/hooks/useEllipsisColumns.js +58 -0
- package/dist/creek-table/hooks/useEllipsisColumns.js.map +7 -0
- package/dist/creek-table/hooks/useIndexColumn.d.ts +2 -0
- package/dist/creek-table/hooks/useIndexColumn.d.ts.map +1 -0
- package/dist/creek-table/hooks/useIndexColumn.js +52 -0
- package/dist/creek-table/hooks/useIndexColumn.js.map +7 -0
- package/dist/creek-table/hooks/useResizableColumns.d.ts +20 -0
- package/dist/creek-table/hooks/useResizableColumns.d.ts.map +1 -0
- package/dist/creek-table/hooks/useResizableColumns.js +279 -0
- package/dist/creek-table/hooks/useResizableColumns.js.map +7 -0
- package/dist/creek-table/hooks/useStatusColumns.d.ts +2 -0
- package/dist/creek-table/hooks/useStatusColumns.d.ts.map +1 -0
- package/dist/creek-table/hooks/useStatusColumns.js +215 -0
- package/dist/creek-table/hooks/useStatusColumns.js.map +7 -0
- package/dist/creek-table/hooks/useTableOptions.d.ts +15 -0
- package/dist/creek-table/hooks/useTableOptions.d.ts.map +1 -0
- package/dist/creek-table/hooks/useTableOptions.js +78 -0
- package/dist/creek-table/hooks/useTableOptions.js.map +7 -0
- package/dist/creek-table/hooks/useTableScrollHeight.d.ts +6 -1
- package/dist/creek-table/hooks/useTableScrollHeight.d.ts.map +1 -1
- package/dist/creek-table/hooks/useTableScrollHeight.js +44 -5
- package/dist/creek-table/hooks/useTableScrollHeight.js.map +2 -2
- package/dist/creek-table/type.d.ts +4 -6
- package/dist/creek-table/type.d.ts.map +1 -1
- package/dist/creek-table/type.js.map +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -0
- package/dist/index.js.map +2 -2
- package/dist/locales/en-US.d.ts +25 -0
- package/dist/locales/en-US.d.ts.map +1 -0
- package/dist/locales/en-US.js +49 -0
- package/dist/locales/en-US.js.map +7 -0
- package/dist/locales/zh-CN.d.ts +25 -0
- package/dist/locales/zh-CN.d.ts.map +1 -0
- package/dist/locales/zh-CN.js +49 -0
- package/dist/locales/zh-CN.js.map +7 -0
- package/dist/utils/i18n.d.ts +2 -0
- package/dist/utils/i18n.d.ts.map +1 -0
- package/dist/utils/i18n.js +34 -0
- package/dist/utils/i18n.js.map +7 -0
- package/i18n.config.ts +27 -0
- package/package.json +17 -3
- package/src/creek-config-provider/CreekConfigContext.tsx +5 -1
- package/src/creek-config-provider/CreekI18nProvider.tsx +87 -0
- package/src/creek-config-provider/index.tsx +53 -4
- package/src/creek-keep-alive/index.tsx +225 -6
- package/src/creek-layout/ActionRender/FullScreen.tsx +10 -6
- package/src/creek-layout/ActionRender/LayoutSettings.tsx +67 -0
- package/src/creek-layout/ActionRender/UserInfo.tsx +1 -1
- package/src/creek-layout/ActionRender/index.tsx +1 -0
- package/src/creek-layout/index.tsx +89 -22
- package/src/creek-layout/useLayoutSettingsStore.ts +25 -0
- package/src/creek-locale-button/index.tsx +42 -0
- package/src/creek-page-container/index.tsx +32 -0
- package/src/creek-style/index.ts +1 -0
- package/src/creek-style/scrollbar.ts +29 -0
- package/src/creek-table/SearchTable.tsx +125 -72
- package/src/creek-table/components/DensityIcon.tsx +63 -0
- package/src/creek-table/components/EllipsisTooltip.tsx +116 -0
- package/src/creek-table/components/index.tsx +3 -0
- package/src/creek-table/hooks/index.ts +5 -1
- package/src/creek-table/hooks/useAutoWidthColumns.tsx +93 -19
- package/src/creek-table/hooks/useEllipsisColumns.tsx +47 -0
- package/src/creek-table/hooks/useIndexColumn.tsx +27 -0
- package/src/creek-table/hooks/useResizableColumns.tsx +323 -0
- package/src/creek-table/hooks/useStatusColumns.tsx +252 -0
- package/src/creek-table/hooks/useTableOptions.tsx +81 -0
- package/src/creek-table/hooks/useTableScrollHeight.tsx +61 -6
- package/src/creek-table/type.ts +5 -7
- package/src/index.tsx +4 -0
- package/src/locales/en-US.ts +24 -0
- package/src/locales/zh-CN.ts +24 -0
- package/src/utils/i18n.ts +4 -0
- package/dist/creek-table/TableOptionRender.d.ts +0 -9
- package/dist/creek-table/TableOptionRender.d.ts.map +0 -1
- package/dist/creek-table/TableOptionRender.js +0 -74
- package/dist/creek-table/TableOptionRender.js.map +0 -7
- package/dist/creek-table/toolBarRender.d.ts +0 -5
- package/dist/creek-table/toolBarRender.d.ts.map +0 -1
- package/dist/creek-table/toolBarRender.js +0 -58
- package/dist/creek-table/toolBarRender.js.map +0 -7
- package/src/creek-table/TableOptionRender.tsx +0 -57
- package/src/creek-table/toolBarRender.tsx +0 -28
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/creek-layout/index.tsx"],
|
|
4
|
-
"sourcesContent": ["import { ProLayout, ProLayoutProps } from '@ant-design/pro-components';\nimport { useMemoizedFn } from 'ahooks';\nimport { theme } from 'antd';\nimport classnames from 'classnames';\n\nimport { FullScreen,
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,4BAA0C;AAC1C,oBAA8B;AAC9B,kBAAsB;AACtB,wBAAuB;AAEvB,
|
|
6
|
-
"names": ["classnames", "collapsed"]
|
|
4
|
+
"sourcesContent": ["import { ProLayout, ProLayoutProps } from '@ant-design/pro-components';\nimport { useMemoizedFn } from 'ahooks';\nimport { theme } from 'antd';\nimport _ from 'lodash';\n\nimport classnames from 'classnames';\n\nimport { useT } from '@creekjs/i18n/react';\n\nimport { CreekKeepAlive, CreekKeepAliveProps } from '../creek-keep-alive';\nimport { CreekLocaleButton } from '../creek-locale-button';\nimport { GlobalScrollbarStyle } from '../creek-style/scrollbar';\nimport { FullScreen, LayoutSettings } from './ActionRender';\nimport { CollapsedButton, useCollapsedStore } from './CollapseButton';\nimport { Exception } from './Exception';\nimport { useLayoutSettingsStore } from './useLayoutSettingsStore';\n\nexport type LayoutProps = ProLayoutProps & {\n runtimeConfig: ProLayoutProps;\n userConfig?: ProLayoutProps;\n navigate?: (path?: string | number) => void;\n showFullScreen?: boolean;\n showLocaleButton?: boolean;\n showSettingsButton?: boolean;\n initialInfo?: {\n initialState: any;\n loading: boolean;\n setInitialState: () => void;\n };\n keepAlive?: boolean | CreekKeepAliveProps;\n extraActions?: React.ReactNode[];\n};\n\nconst MenuName = ({ name, path }: { name: string; path?: string }) => {\n const t = useT();\n const key = !path || path === '/' ? 'menu.home' : `menu${path.replace(/\\//g, '.')}`;\n return <>{t(key, name)}</>;\n};\n\nexport const CreekLayout = (props: LayoutProps) => {\n const { route, userConfig, runtimeConfig, children, location, navigate, showFullScreen, showLocaleButton = true, showSettingsButton = true, keepAlive = true, extraActions = [], ...more } = props;\n\n const { useToken } = theme;\n const { token } = useToken();\n\n const { collapsed } = useCollapsedStore();\n const settingsStore = useLayoutSettingsStore();\n\n const actualShowFullScreen = settingsStore.showFullScreen ?? showFullScreen ?? false;\n const actualShowLocaleButton = settingsStore.showLocaleButton ?? showLocaleButton ?? true;\n const colorPrimary = settingsStore.colorPrimary || token.colorPrimary;\n const actualKeepAlive = settingsStore.keepAlive ?? keepAlive ?? true;\n\n const menuDataRender = useMemoizedFn((menuData: any[]) => {\n const mapMenu = (items: any[]): any[] => {\n return items.map((item) => {\n return {\n ...item,\n name: <MenuName name={item.name} path={item.path} />,\n children: item.children ? mapMenu(item.children) : undefined,\n };\n });\n };\n return mapMenu(menuData);\n });\n\n const menuItemRender: ProLayoutProps['menuItemRender'] = useMemoizedFn((itemProps, defaultDom) => {\n return (\n <span\n onClick={() => {\n if (navigate) {\n navigate(itemProps.path);\n }\n }}\n >\n {defaultDom}\n </span>\n );\n });\n\n const getTabTitle = useMemoizedFn((pathname: string) => {\n const findTitle = (routes: any[]): string | React.ReactNode | undefined => {\n for (const r of routes) {\n if (r.path === pathname) return r.name || r.title;\n if (r.children) {\n const found = findTitle(r.children);\n if (found) return found;\n }\n }\n return undefined;\n };\n return findTitle(route?.routes || []) || pathname;\n });\n\n const actions: React.ReactNode[] = [...extraActions];\n\n if (actualShowFullScreen) {\n actions.push(<FullScreen key=\"full-screen\" />);\n }\n\n if (actualShowLocaleButton) {\n actions.push(<CreekLocaleButton key=\"locale-button\" />);\n }\n\n if (showSettingsButton) {\n actions.push(\n <LayoutSettings\n key=\"settings\"\n defaultShowFullScreen={showFullScreen}\n defaultShowLocaleButton={showLocaleButton}\n defaultKeepAlive={_.isBoolean(keepAlive) ? keepAlive : true}\n />\n );\n }\n\n const keepAliveProps = _.isBoolean(keepAlive) ? {} : keepAlive;\n\n const _userConfig = { ...userConfig, ...runtimeConfig };\n\n const layoutContent = (\n <ProLayout\n className={classnames('creek-layout-container', _userConfig?.className)}\n route={route}\n title={_userConfig?.title}\n siderWidth={200}\n location={location}\n menuDataRender={menuDataRender}\n menuItemRender={menuItemRender}\n actionsRender={() => actions}\n token={{\n header: {\n colorBgHeader: '#fff',\n colorHeaderTitle: 'rgba(0, 0, 0, 0.80);',\n colorTextMenuSelected: colorPrimary,\n heightLayoutHeader: 48,\n },\n sider: {\n colorMenuBackground: '#f7f8fa',\n colorBgMenuItemSelected: 'transparent',\n colorTextMenuActive: colorPrimary,\n colorTextMenuSelected: colorPrimary,\n colorTextMenuItemHover: colorPrimary,\n colorTextMenu: '#333',\n },\n pageContainer: {\n paddingBlockPageContainerContent: 0,\n paddingInlinePageContainerContent: 0,\n colorBgPageContainer: 'linear-gradient(180deg, #F7F9FF 0%, #FFF 45.59%);',\n },\n }}\n fixSiderbar\n fixedHeader\n collapsed={collapsed}\n collapsedButtonRender={(collapsed) => {\n return <CollapsedButton collapsed={collapsed} />;\n }}\n {...more}\n >\n <GlobalScrollbarStyle />\n <Exception>{actualKeepAlive ? <CreekKeepAlive getTabTitle={getTabTitle} {...keepAliveProps} /> : children}</Exception>\n </ProLayout>\n );\n\n return layoutContent;\n};\n\nexport * from './Exception';\n"],
|
|
5
|
+
"mappings": "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",
|
|
6
|
+
"names": ["_", "classnames", "collapsed"]
|
|
7
7
|
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export type LayoutSettingsStore = {
|
|
2
|
+
colorPrimary?: string;
|
|
3
|
+
showFullScreen?: boolean;
|
|
4
|
+
showLocaleButton?: boolean;
|
|
5
|
+
keepAlive?: boolean;
|
|
6
|
+
setSettings: (settings: Partial<LayoutSettingsStore>) => void;
|
|
7
|
+
};
|
|
8
|
+
export declare const useLayoutSettingsStore: import("zustand").UseBoundStore<Omit<import("zustand").StoreApi<LayoutSettingsStore>, "setState" | "persist"> & {
|
|
9
|
+
setState(partial: LayoutSettingsStore | Partial<LayoutSettingsStore> | ((state: LayoutSettingsStore) => LayoutSettingsStore | Partial<LayoutSettingsStore>), replace?: false | undefined): unknown;
|
|
10
|
+
setState(state: LayoutSettingsStore | ((state: LayoutSettingsStore) => LayoutSettingsStore), replace: true): unknown;
|
|
11
|
+
persist: {
|
|
12
|
+
setOptions: (options: Partial<import("zustand/middleware").PersistOptions<LayoutSettingsStore, LayoutSettingsStore, unknown>>) => void;
|
|
13
|
+
clearStorage: () => void;
|
|
14
|
+
rehydrate: () => void | Promise<void>;
|
|
15
|
+
hasHydrated: () => boolean;
|
|
16
|
+
onHydrate: (fn: (state: LayoutSettingsStore) => void) => () => void;
|
|
17
|
+
onFinishHydration: (fn: (state: LayoutSettingsStore) => void) => () => void;
|
|
18
|
+
getOptions: () => Partial<import("zustand/middleware").PersistOptions<LayoutSettingsStore, LayoutSettingsStore, unknown>>;
|
|
19
|
+
};
|
|
20
|
+
}>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useLayoutSettingsStore.d.ts","sourceRoot":"","sources":["../../src/creek-layout/useLayoutSettingsStore.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,mBAAmB,GAAG;IAChC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,WAAW,EAAE,CAAC,QAAQ,EAAE,OAAO,CAAC,mBAAmB,CAAC,KAAK,IAAI,CAAC;CAC/D,CAAC;AAEF,eAAO,MAAM,sBAAsB;;;;;;;;;;;;EAalC,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// src/creek-layout/useLayoutSettingsStore.ts
|
|
20
|
+
var useLayoutSettingsStore_exports = {};
|
|
21
|
+
__export(useLayoutSettingsStore_exports, {
|
|
22
|
+
useLayoutSettingsStore: () => useLayoutSettingsStore
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(useLayoutSettingsStore_exports);
|
|
25
|
+
var import_zustand = require("zustand");
|
|
26
|
+
var import_middleware = require("zustand/middleware");
|
|
27
|
+
var useLayoutSettingsStore = (0, import_zustand.create)()(
|
|
28
|
+
(0, import_middleware.persist)(
|
|
29
|
+
(set) => ({
|
|
30
|
+
colorPrimary: void 0,
|
|
31
|
+
showFullScreen: true,
|
|
32
|
+
showLocaleButton: true,
|
|
33
|
+
keepAlive: true,
|
|
34
|
+
setSettings: (settings) => set((state) => ({ ...state, ...settings }))
|
|
35
|
+
}),
|
|
36
|
+
{
|
|
37
|
+
name: "creek-layout-settings"
|
|
38
|
+
}
|
|
39
|
+
)
|
|
40
|
+
);
|
|
41
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
42
|
+
0 && (module.exports = {
|
|
43
|
+
useLayoutSettingsStore
|
|
44
|
+
});
|
|
45
|
+
//# sourceMappingURL=useLayoutSettingsStore.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/creek-layout/useLayoutSettingsStore.ts"],
|
|
4
|
+
"sourcesContent": ["import { create } from 'zustand';\nimport { persist } from 'zustand/middleware';\n\nexport type LayoutSettingsStore = {\n colorPrimary?: string;\n showFullScreen?: boolean;\n showLocaleButton?: boolean;\n keepAlive?: boolean;\n setSettings: (settings: Partial<LayoutSettingsStore>) => void;\n};\n\nexport const useLayoutSettingsStore = create<LayoutSettingsStore>()(\n persist(\n (set) => ({\n colorPrimary: undefined,\n showFullScreen: true,\n showLocaleButton: true,\n keepAlive: true,\n setSettings: (settings) => set((state) => ({ ...state, ...settings })),\n }),\n {\n name: 'creek-layout-settings',\n }\n )\n);\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,qBAAuB;AACvB,wBAAwB;AAUjB,IAAM,6BAAyB,uBAA4B;AAAA,MAChE;AAAA,IACE,CAAC,SAAS;AAAA,MACR,cAAc;AAAA,MACd,gBAAgB;AAAA,MAChB,kBAAkB;AAAA,MAClB,WAAW;AAAA,MACX,aAAa,CAAC,aAAa,IAAI,CAAC,WAAW,EAAE,GAAG,OAAO,GAAG,SAAS,EAAE;AAAA,IACvE;AAAA,IACA;AAAA,MACE,MAAM;AAAA,IACR;AAAA,EACF;AACF;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const CreekLocaleButton: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/creek-locale-button/index.tsx"],"names":[],"mappings":"AAOA,eAAO,MAAM,iBAAiB,+CAkC7B,CAAC"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// src/creek-locale-button/index.tsx
|
|
20
|
+
var creek_locale_button_exports = {};
|
|
21
|
+
__export(creek_locale_button_exports, {
|
|
22
|
+
CreekLocaleButton: () => CreekLocaleButton
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(creek_locale_button_exports);
|
|
25
|
+
var import_icons = require("@ant-design/icons");
|
|
26
|
+
var import_antd = require("antd");
|
|
27
|
+
var import_react = require("@creekjs/i18n/react");
|
|
28
|
+
var import_creek_config_provider = require("../creek-config-provider");
|
|
29
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
30
|
+
var CreekLocaleButton = () => {
|
|
31
|
+
var _a;
|
|
32
|
+
const t = (0, import_react.useT)();
|
|
33
|
+
const { locale, changeLocale } = (0, import_creek_config_provider.useAppLocale)();
|
|
34
|
+
const items = [
|
|
35
|
+
{
|
|
36
|
+
key: "zh-CN",
|
|
37
|
+
label: t("creek-locale-button.index.jianTiZhongWen", "简体中文"),
|
|
38
|
+
disabled: locale === "zh-CN"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
key: "en-US",
|
|
42
|
+
label: "English",
|
|
43
|
+
disabled: locale === "en-US"
|
|
44
|
+
}
|
|
45
|
+
];
|
|
46
|
+
const currentLabel = ((_a = items.find((item) => item.key === locale)) == null ? void 0 : _a.label) || "Language";
|
|
47
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
48
|
+
import_antd.Dropdown,
|
|
49
|
+
{
|
|
50
|
+
menu: {
|
|
51
|
+
items,
|
|
52
|
+
onClick: (e) => changeLocale(e.key)
|
|
53
|
+
},
|
|
54
|
+
placement: "bottomRight",
|
|
55
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_antd.Space, { size: "small", align: "center", children: [
|
|
56
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.GlobalOutlined, {}),
|
|
57
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_antd.Typography.Text, { children: currentLabel })
|
|
58
|
+
] })
|
|
59
|
+
}
|
|
60
|
+
);
|
|
61
|
+
};
|
|
62
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
63
|
+
0 && (module.exports = {
|
|
64
|
+
CreekLocaleButton
|
|
65
|
+
});
|
|
66
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/creek-locale-button/index.tsx"],
|
|
4
|
+
"sourcesContent": ["import { GlobalOutlined } from '@ant-design/icons';\nimport { Dropdown, Space, Typography } from 'antd';\n\nimport { useT } from '@creekjs/i18n/react';\n\nimport { useAppLocale } from '../creek-config-provider';\n\nexport const CreekLocaleButton = () => {\n const t = useT();\n\n const { locale, changeLocale } = useAppLocale();\n\n const items = [\n {\n key: 'zh-CN',\n label: t('creek-locale-button.index.jianTiZhongWen', '简体中文'),\n disabled: locale === 'zh-CN',\n },\n {\n key: 'en-US',\n label: 'English',\n disabled: locale === 'en-US',\n },\n ];\n\n const currentLabel = items.find((item) => item.key === locale)?.label || 'Language';\n\n return (\n <Dropdown\n menu={{\n items,\n onClick: (e) => changeLocale(e.key),\n }}\n placement=\"bottomRight\"\n >\n <Space size=\"small\" align=\"center\">\n <GlobalOutlined />\n <Typography.Text>{currentLabel}</Typography.Text>\n </Space>\n </Dropdown>\n );\n};\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAA+B;AAC/B,kBAA4C;AAE5C,mBAAqB;AAErB,mCAA6B;AA8BvB;AA5BC,IAAM,oBAAoB,MAAM;AAPvC;AAQE,QAAM,QAAI,mBAAK;AAEf,QAAM,EAAE,QAAQ,aAAa,QAAI,2CAAa;AAE9C,QAAM,QAAQ;AAAA,IACZ;AAAA,MACE,KAAK;AAAA,MACL,OAAO,EAAE,4CAA4C,MAAM;AAAA,MAC3D,UAAU,WAAW;AAAA,IACvB;AAAA,IACA;AAAA,MACE,KAAK;AAAA,MACL,OAAO;AAAA,MACP,UAAU,WAAW;AAAA,IACvB;AAAA,EACF;AAEA,QAAM,iBAAe,WAAM,KAAK,CAAC,SAAS,KAAK,QAAQ,MAAM,MAAxC,mBAA2C,UAAS;AAEzE,SACE;AAAA,IAAC;AAAA;AAAA,MACC,MAAM;AAAA,QACJ;AAAA,QACA,SAAS,CAAC,MAAM,aAAa,EAAE,GAAG;AAAA,MACpC;AAAA,MACA,WAAU;AAAA,MAEV,uDAAC,qBAAM,MAAK,SAAQ,OAAM,UACxB;AAAA,oDAAC,+BAAe;AAAA,QAChB,4CAAC,uBAAW,MAAX,EAAiB,wBAAa;AAAA,SACjC;AAAA;AAAA,EACF;AAEJ;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/creek-page-container/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAiB,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAE/E,OAAO,KAAK,MAAM,OAAO,CAAC;AAU1B,MAAM,MAAM,uBAAuB,GAAG,kBAAkB,CAAC;AAEzD,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,CAiBhE,CAAC"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// src/creek-page-container/index.tsx
|
|
30
|
+
var creek_page_container_exports = {};
|
|
31
|
+
__export(creek_page_container_exports, {
|
|
32
|
+
CreekPageContainer: () => CreekPageContainer
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(creek_page_container_exports);
|
|
35
|
+
var import_pro_components = require("@ant-design/pro-components");
|
|
36
|
+
var import_antd_style = require("antd-style");
|
|
37
|
+
var import_classnames = __toESM(require("classnames"));
|
|
38
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
39
|
+
var useStyles = (0, import_antd_style.createStyles)(({ token }) => ({
|
|
40
|
+
container: {
|
|
41
|
+
padding: token.padding
|
|
42
|
+
}
|
|
43
|
+
}));
|
|
44
|
+
var CreekPageContainer = (props) => {
|
|
45
|
+
const { header, className, children, ...rest } = props;
|
|
46
|
+
const { styles } = useStyles();
|
|
47
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
48
|
+
import_pro_components.PageContainer,
|
|
49
|
+
{
|
|
50
|
+
header: {
|
|
51
|
+
title: null,
|
|
52
|
+
// 默认没有标题
|
|
53
|
+
breadcrumb: {},
|
|
54
|
+
// 保留面包屑配置能力
|
|
55
|
+
...header
|
|
56
|
+
// 允许外部覆盖
|
|
57
|
+
},
|
|
58
|
+
className: (0, import_classnames.default)(styles.container, className),
|
|
59
|
+
...rest,
|
|
60
|
+
children
|
|
61
|
+
}
|
|
62
|
+
);
|
|
63
|
+
};
|
|
64
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
65
|
+
0 && (module.exports = {
|
|
66
|
+
CreekPageContainer
|
|
67
|
+
});
|
|
68
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/creek-page-container/index.tsx"],
|
|
4
|
+
"sourcesContent": ["import { PageContainer, PageContainerProps } from '@ant-design/pro-components';\nimport { createStyles } from 'antd-style';\nimport React from 'react';\n\nimport classnames from 'classnames';\n\nconst useStyles = createStyles(({ token }) => ({\n container: {\n padding: token.padding,\n },\n}));\n\nexport type CreekPageContainerProps = PageContainerProps;\n\nexport const CreekPageContainer: React.FC<CreekPageContainerProps> = (props) => {\n const { header, className, children, ...rest } = props;\n const { styles } = useStyles();\n\n return (\n <PageContainer\n header={{\n title: null, // 默认没有标题\n breadcrumb: {}, // 保留面包屑配置能力\n ...header, // 允许外部覆盖\n }}\n className={classnames(styles.container, className)}\n {...rest}\n >\n {children}\n </PageContainer>\n );\n};\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,4BAAkD;AAClD,wBAA6B;AAG7B,wBAAuB;AAenB;AAbJ,IAAM,gBAAY,gCAAa,CAAC,EAAE,MAAM,OAAO;AAAA,EAC7C,WAAW;AAAA,IACT,SAAS,MAAM;AAAA,EACjB;AACF,EAAE;AAIK,IAAM,qBAAwD,CAAC,UAAU;AAC9E,QAAM,EAAE,QAAQ,WAAW,UAAU,GAAG,KAAK,IAAI;AACjD,QAAM,EAAE,OAAO,IAAI,UAAU;AAE7B,SACE;AAAA,IAAC;AAAA;AAAA,MACC,QAAQ;AAAA,QACN,OAAO;AAAA;AAAA,QACP,YAAY,CAAC;AAAA;AAAA,QACb,GAAG;AAAA;AAAA,MACL;AAAA,MACA,eAAW,kBAAAA,SAAW,OAAO,WAAW,SAAS;AAAA,MAChD,GAAG;AAAA,MAEH;AAAA;AAAA,EACH;AAEJ;",
|
|
6
|
+
"names": ["classnames"]
|
|
7
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './scrollbar';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/creek-style/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __copyProps = (to, from, except, desc) => {
|
|
6
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
7
|
+
for (let key of __getOwnPropNames(from))
|
|
8
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
9
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
10
|
+
}
|
|
11
|
+
return to;
|
|
12
|
+
};
|
|
13
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
14
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
|
+
|
|
16
|
+
// src/creek-style/index.ts
|
|
17
|
+
var creek_style_exports = {};
|
|
18
|
+
module.exports = __toCommonJS(creek_style_exports);
|
|
19
|
+
__reExport(creek_style_exports, require("./scrollbar"), module.exports);
|
|
20
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
21
|
+
0 && (module.exports = {
|
|
22
|
+
...require("./scrollbar")
|
|
23
|
+
});
|
|
24
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scrollbar.d.ts","sourceRoot":"","sources":["../../src/creek-style/scrollbar.ts"],"names":[],"mappings":";AAEA,eAAO,MAAM,oBAAoB,8CA0B/B,CAAC"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// src/creek-style/scrollbar.ts
|
|
20
|
+
var scrollbar_exports = {};
|
|
21
|
+
__export(scrollbar_exports, {
|
|
22
|
+
GlobalScrollbarStyle: () => GlobalScrollbarStyle
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(scrollbar_exports);
|
|
25
|
+
var import_antd_style = require("antd-style");
|
|
26
|
+
var GlobalScrollbarStyle = (0, import_antd_style.createGlobalStyle)(({ theme: token }) => {
|
|
27
|
+
return {
|
|
28
|
+
"*": {
|
|
29
|
+
scrollbarWidth: "auto",
|
|
30
|
+
scrollbarColor: `${token.colorFillSecondary} transparent !important`
|
|
31
|
+
},
|
|
32
|
+
/* Webkit (Chrome, Safari, Edge) 滚动条样式 */
|
|
33
|
+
"& *::-webkit-scrollbar": {
|
|
34
|
+
width: "6px !important",
|
|
35
|
+
height: "6px !important",
|
|
36
|
+
backgroundColor: "transparent !important"
|
|
37
|
+
},
|
|
38
|
+
"& *::-webkit-scrollbar-thumb": {
|
|
39
|
+
backgroundColor: `${token.colorFillSecondary} !important`,
|
|
40
|
+
borderRadius: "3px !important",
|
|
41
|
+
transition: "all 0.3s",
|
|
42
|
+
"&:hover": {
|
|
43
|
+
backgroundColor: `${token.colorFill} !important`
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
"& *::-webkit-scrollbar-track": {
|
|
47
|
+
backgroundColor: "transparent !important"
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
});
|
|
51
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
52
|
+
0 && (module.exports = {
|
|
53
|
+
GlobalScrollbarStyle
|
|
54
|
+
});
|
|
55
|
+
//# sourceMappingURL=scrollbar.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/creek-style/scrollbar.ts"],
|
|
4
|
+
"sourcesContent": ["import { createGlobalStyle } from 'antd-style';\n\nexport const GlobalScrollbarStyle = createGlobalStyle(({ theme: token }) => {\n return {\n '*': {\n scrollbarWidth: 'auto',\n scrollbarColor: `${token.colorFillSecondary} transparent !important`,\n },\n /* Webkit (Chrome, Safari, Edge) 滚动条样式 */\n '& *::-webkit-scrollbar': {\n width: '6px !important',\n height: '6px !important',\n backgroundColor: 'transparent !important',\n },\n\n '& *::-webkit-scrollbar-thumb': {\n backgroundColor: `${token.colorFillSecondary} !important`,\n borderRadius: '3px !important',\n transition: 'all 0.3s',\n '&:hover': {\n backgroundColor: `${token.colorFill} !important`,\n },\n },\n\n '& *::-webkit-scrollbar-track': {\n backgroundColor: 'transparent !important',\n },\n };\n});\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,wBAAkC;AAE3B,IAAM,2BAAuB,qCAAkB,CAAC,EAAE,OAAO,MAAM,MAAM;AAC1E,SAAO;AAAA,IACL,KAAK;AAAA,MACH,gBAAgB;AAAA,MAChB,gBAAgB,GAAG,MAAM;AAAA,IAC3B;AAAA;AAAA,IAEA,0BAA0B;AAAA,MACxB,OAAO;AAAA,MACP,QAAQ;AAAA,MACR,iBAAiB;AAAA,IACnB;AAAA,IAEA,gCAAgC;AAAA,MAC9B,iBAAiB,GAAG,MAAM;AAAA,MAC1B,cAAc;AAAA,MACd,YAAY;AAAA,MACZ,WAAW;AAAA,QACT,iBAAiB,GAAG,MAAM;AAAA,MAC5B;AAAA,IACF;AAAA,IAEA,gCAAgC;AAAA,MAC9B,iBAAiB;AAAA,IACnB;AAAA,EACF;AACF,CAAC;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1,3 +1,12 @@
|
|
|
1
1
|
import { ParamsType } from '@ant-design/pro-components';
|
|
2
2
|
import { CreekTableProps } from './type';
|
|
3
|
+
export type SearchTableStyleOptions = {
|
|
4
|
+
prefixCls?: string;
|
|
5
|
+
scrollY?: number;
|
|
6
|
+
tableContainerHeight?: number;
|
|
7
|
+
tableHeight?: number;
|
|
8
|
+
bordered?: boolean;
|
|
9
|
+
hasHeaderTitle?: boolean;
|
|
10
|
+
hasScroll?: boolean;
|
|
11
|
+
};
|
|
3
12
|
export declare const SearchProTable: <T extends ParamsType, U extends ParamsType, ValueType = "text">(props: CreekTableProps<T, U, ValueType>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchTable.d.ts","sourceRoot":"","sources":["../../src/creek-table/SearchTable.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAY,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"SearchTable.d.ts","sourceRoot":"","sources":["../../src/creek-table/SearchTable.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAY,MAAM,4BAA4B,CAAC;AASlE,OAAO,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAC;AAEzC,MAAM,MAAM,uBAAuB,GAAG;IACpC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC;AA2EF,eAAO,MAAM,cAAc,0EAA2E,gBAAgB,CAAC,EAAE,CAAC,EAAE,SAAS,CAAC,4CAiErI,CAAC"}
|