@creekjs/web-components 1.0.4 → 1.0.5

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 (54) hide show
  1. package/.turbo/turbo-father$colon$build.log +17 -17
  2. package/dist/creek-config-provider/CreekConfigContext.d.ts.map +1 -0
  3. package/dist/creek-config-provider/index.d.ts.map +1 -0
  4. package/dist/creek-hooks/index.d.ts.map +1 -0
  5. package/dist/creek-hooks/useApp/DrawerHelper.d.ts.map +1 -0
  6. package/dist/creek-hooks/useApp/ModalHelper.d.ts.map +1 -0
  7. package/dist/creek-hooks/useApp/index.d.ts.map +1 -0
  8. package/dist/creek-hooks/useApp/types.d.ts.map +1 -0
  9. package/dist/creek-hooks/useViewportHeight.d.ts.map +1 -0
  10. package/dist/creek-icon/index.d.ts.map +1 -0
  11. package/dist/creek-keep-alive/index.d.ts.map +1 -0
  12. package/dist/creek-layout/ActionRender/FullScreen.d.ts.map +1 -0
  13. package/dist/creek-layout/{HeaderContent → ActionRender}/FullScreen.js +1 -1
  14. package/dist/creek-layout/{HeaderContent → ActionRender}/FullScreen.js.map +1 -1
  15. package/dist/creek-layout/ActionRender/UserInfo.d.ts +8 -0
  16. package/dist/creek-layout/ActionRender/UserInfo.d.ts.map +1 -0
  17. package/dist/creek-layout/{HeaderContent → ActionRender}/UserInfo.js +7 -29
  18. package/dist/creek-layout/ActionRender/UserInfo.js.map +7 -0
  19. package/dist/creek-layout/ActionRender/index.d.ts +2 -0
  20. package/dist/creek-layout/ActionRender/index.d.ts.map +1 -0
  21. package/dist/creek-layout/ActionRender/index.js +33 -0
  22. package/dist/creek-layout/ActionRender/index.js.map +7 -0
  23. package/dist/creek-layout/CollapseButton.d.ts.map +1 -0
  24. package/dist/creek-layout/Exception/NotFound.d.ts.map +1 -0
  25. package/dist/creek-layout/Exception/NotFoundPage.d.ts.map +1 -0
  26. package/dist/creek-layout/Exception/index.d.ts.map +1 -0
  27. package/dist/creek-layout/index.d.ts +9 -2
  28. package/dist/creek-layout/index.d.ts.map +1 -0
  29. package/dist/creek-layout/index.js +23 -29
  30. package/dist/creek-layout/index.js.map +2 -2
  31. package/dist/creek-loading/index.d.ts.map +1 -0
  32. package/dist/creek-table/SearchTable.d.ts.map +1 -0
  33. package/dist/creek-table/TableOptionRender.d.ts.map +1 -0
  34. package/dist/creek-table/hooks/index.d.ts.map +1 -0
  35. package/dist/creek-table/hooks/useAdaptiveToolBar.d.ts.map +1 -0
  36. package/dist/creek-table/hooks/useAutoWidthColumns.d.ts.map +1 -0
  37. package/dist/creek-table/hooks/useElementDistance.d.ts.map +1 -0
  38. package/dist/creek-table/hooks/useTableScrollHeight.d.ts.map +1 -0
  39. package/dist/creek-table/index.d.ts.map +1 -0
  40. package/dist/creek-table/toolBarRender.d.ts.map +1 -0
  41. package/dist/creek-table/type.d.ts.map +1 -0
  42. package/dist/index.d.ts.map +1 -0
  43. package/package.json +1 -1
  44. package/src/creek-layout/{HeaderContent → ActionRender}/UserInfo.tsx +13 -24
  45. package/src/creek-layout/ActionRender/index.tsx +3 -0
  46. package/src/creek-layout/index.tsx +44 -43
  47. package/dist/creek-layout/HeaderContent/UserInfo.d.ts +0 -1
  48. package/dist/creek-layout/HeaderContent/UserInfo.js.map +0 -7
  49. package/dist/creek-layout/HeaderContent/index.d.ts +0 -1
  50. package/dist/creek-layout/HeaderContent/index.js +0 -49
  51. package/dist/creek-layout/HeaderContent/index.js.map +0 -7
  52. package/src/creek-layout/HeaderContent/index.tsx +0 -24
  53. /package/dist/creek-layout/{HeaderContent → ActionRender}/FullScreen.d.ts +0 -0
  54. /package/src/creek-layout/{HeaderContent → ActionRender}/FullScreen.tsx +0 -0
@@ -1,39 +1,39 @@
1
1
 
2
2
  
3
- > @creekjs/web-components@1.0.3 father:build /Users/ernestwang/Documents/code-resoorce/creek/packages/web-components
3
+ > @creekjs/web-components@1.0.4 father:build /Users/ernestwang/Documents/code-resoorce/creek/packages/web-components
4
4
  > father build
5
5
 
6
6
  info - Clean output directories
7
7
  info - Bundless for src directory to cjs format
8
- event - Bundless index.tsx to dist/creek-config-provider/index.js (with declaration)
9
8
  event - Bundless CreekConfigContext.tsx to dist/creek-config-provider/CreekConfigContext.js (with declaration)
10
9
  event - Bundless index.ts to dist/creek-hooks/index.js (with declaration)
11
10
  event - Bundless DrawerHelper.tsx to dist/creek-hooks/useApp/DrawerHelper.js (with declaration)
12
11
  event - Bundless index.tsx to dist/creek-hooks/useApp/index.js (with declaration)
13
- event - Bundless ModalHelper.tsx to dist/creek-hooks/useApp/ModalHelper.js (with declaration)
12
+ event - Bundless index.tsx to dist/creek-config-provider/index.js (with declaration)
13
+ event - Bundless index.tsx to dist/creek-icon/index.js (with declaration)
14
14
  event - Bundless types.ts to dist/creek-hooks/useApp/types.js (with declaration)
15
+ event - Bundless ModalHelper.tsx to dist/creek-hooks/useApp/ModalHelper.js (with declaration)
15
16
  event - Bundless useViewportHeight.tsx to dist/creek-hooks/useViewportHeight.js (with declaration)
16
- event - Bundless index.tsx to dist/creek-icon/index.js (with declaration)
17
- event - Bundless index.tsx to dist/creek-keep-alive/index.js (with declaration)
17
+ event - Bundless FullScreen.tsx to dist/creek-layout/ActionRender/FullScreen.js (with declaration)
18
18
  event - Bundless CollapseButton.tsx to dist/creek-layout/CollapseButton.js (with declaration)
19
- event - Bundless NotFound.tsx to dist/creek-layout/Exception/NotFound.js (with declaration)
20
19
  event - Bundless index.tsx to dist/creek-layout/Exception/index.js (with declaration)
20
+ event - Bundless index.tsx to dist/creek-keep-alive/index.js (with declaration)
21
+ event - Bundless UserInfo.tsx to dist/creek-layout/ActionRender/UserInfo.js (with declaration)
22
+ event - Bundless index.tsx to dist/creek-layout/ActionRender/index.js (with declaration)
23
+ event - Bundless NotFound.tsx to dist/creek-layout/Exception/NotFound.js (with declaration)
21
24
  event - Bundless NotFoundPage.tsx to dist/creek-layout/Exception/NotFoundPage.js (with declaration)
22
- event - Bundless FullScreen.tsx to dist/creek-layout/HeaderContent/FullScreen.js (with declaration)
23
- event - Bundless UserInfo.tsx to dist/creek-layout/HeaderContent/UserInfo.js (with declaration)
24
- event - Bundless index.tsx to dist/creek-layout/HeaderContent/index.js (with declaration)
25
- event - Bundless index.tsx to dist/creek-layout/index.js (with declaration)
26
25
  event - Bundless index.tsx to dist/creek-loading/index.js (with declaration)
27
- event - Bundless useAdaptiveToolBar.tsx to dist/creek-table/hooks/useAdaptiveToolBar.js (with declaration)
26
+ event - Bundless index.tsx to dist/creek-layout/index.js (with declaration)
28
27
  event - Bundless index.ts to dist/creek-table/hooks/index.js (with declaration)
29
28
  event - Bundless useAutoWidthColumns.tsx to dist/creek-table/hooks/useAutoWidthColumns.js (with declaration)
30
- event - Bundless useTableScrollHeight.tsx to dist/creek-table/hooks/useTableScrollHeight.js (with declaration)
31
- event - Bundless TableOptionRender.tsx to dist/creek-table/TableOptionRender.js (with declaration)
32
- event - Bundless index.tsx to dist/creek-table/index.js (with declaration)
29
+ event - Bundless useAdaptiveToolBar.tsx to dist/creek-table/hooks/useAdaptiveToolBar.js (with declaration)
33
30
  event - Bundless useElementDistance.tsx to dist/creek-table/hooks/useElementDistance.js (with declaration)
31
+ event - Bundless SearchTable.tsx to dist/creek-table/SearchTable.js (with declaration)
32
+ event - Bundless TableOptionRender.tsx to dist/creek-table/TableOptionRender.js (with declaration)
33
+ event - Bundless index.tsx to dist/index.js (with declaration)
34
34
  event - Bundless type.ts to dist/creek-table/type.js (with declaration)
35
+ event - Bundless useTableScrollHeight.tsx to dist/creek-table/hooks/useTableScrollHeight.js (with declaration)
36
+ event - Bundless index.tsx to dist/creek-table/index.js (with declaration)
35
37
  event - Bundless toolBarRender.tsx to dist/creek-table/toolBarRender.js (with declaration)
36
- event - Bundless index.tsx to dist/index.js (with declaration)
37
- event - Bundless SearchTable.tsx to dist/creek-table/SearchTable.js (with declaration)
38
38
  event - Generate declaration files...
39
- event - Transformed successfully in 13711 ms (30 files)
39
+ event - Transformed successfully in 5787 ms (30 files)
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CreekConfigContext.d.ts","sourceRoot":"","sources":["../../src/creek-config-provider/CreekConfigContext.tsx"],"names":[],"mappings":";AAEA,MAAM,MAAM,uBAAuB,GAAG;IACpC,WAAW,CAAC,EAAE,MAAM,EAAE,CAAA;CACvB,CAAC;AAEF,eAAO,MAAM,kBAAkB,kDAA6C,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/creek-config-provider/index.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAsB,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AAEnF,MAAM,MAAM,wBAAwB,GAAG,uBAAuB,GAAG;IAC/D,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B,CAAC;AAEF,eAAO,MAAM,mBAAmB;YAAW,wBAAwB;;CAGlE,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/creek-hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,qBAAqB,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DrawerHelper.d.ts","sourceRoot":"","sources":["../../../src/creek-hooks/useApp/DrawerHelper.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,YAAY,EAAwC,MAAM,SAAS,CAAC;AAE7E,UAAU,iBAAiB;IACzB,IAAI,EAAE,OAAO,CAAC;IACd,MAAM,EAAE,YAAY,CAAC;IACrB,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CA8BpD,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ModalHelper.d.ts","sourceRoot":"","sources":["../../../src/creek-hooks/useApp/ModalHelper.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAmB,WAAW,EAAqB,MAAM,SAAS,CAAC;AAE1E,UAAU,gBAAgB;IACxB,IAAI,EAAE,OAAO,CAAC;IACd,MAAM,EAAE,WAAW,CAAC;IACpB,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CA8BlD,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/creek-hooks/useApp/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAuD,MAAM,OAAO,CAAC;AAI5E,OAAO,EAGL,gBAAgB,EAChB,eAAe,EAEf,kBAAkB,EAClB,iBAAiB,EAClB,MAAM,SAAS,CAAC;AAsBjB,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC;IAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,CA6B/D,CAAC;AAEF,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;CAiDlB,CAAC;AAEF,cAAc,SAAS,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/creek-hooks/useApp/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC7E,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAC/C,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,MAAM,MAAM,UAAU,GAAG;IACvB,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CAAC;AAGF,MAAM,MAAM,iBAAiB,GAAG,UAAU,GAAG,UAAU,GAAG;IAAE,IAAI,CAAC,EAAE,QAAQ,CAAA;CAAE,CAAC;AAC9E,MAAM,MAAM,eAAe,CAAC,CAAC,GAAG,GAAG,IAAI,UAAU,GAAG,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,EAAE,SAAS,CAAC,GAAG;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AAC1G,MAAM,MAAM,WAAW,GAAG,iBAAiB,GAAG,eAAe,CAAC;AAG9D,MAAM,MAAM,kBAAkB,GAAG,UAAU,GAAG,WAAW,GAAG;IAAE,IAAI,CAAC,EAAE,QAAQ,CAAA;CAAE,CAAC;AAChF,MAAM,MAAM,gBAAgB,CAAC,CAAC,GAAG,GAAG,IAAI,UAAU,GAAG,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC,EAAE,SAAS,CAAC,GAAG;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AAC5G,MAAM,MAAM,YAAY,GAAG,kBAAkB,GAAG,gBAAgB,CAAC;AAEjE,MAAM,WAAW,cAAc;IAC7B,UAAU,EAAE,CAAC,MAAM,EAAE,YAAY,KAAK,IAAI,CAAC;IAC3C,WAAW,EAAE,MAAM,IAAI,CAAC;IACxB,SAAS,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,IAAI,CAAC;IACzC,UAAU,EAAE,MAAM,IAAI,CAAC;CACxB"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useViewportHeight.d.ts","sourceRoot":"","sources":["../../src/creek-hooks/useViewportHeight.tsx"],"names":[],"mappings":";AAGA,UAAU,wBAAwB;IAChC,+BAA+B;IAC/B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,4BAA4B;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,iBAAiB;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,gBAAgB;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mBAAmB;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,2BAA2B;IAC3B,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,yBAAyB;IACzB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,mCAAmC;IACnC,IAAI,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC;IAE5B,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B;AAED,eAAO,MAAM,iBAAiB,aAAa,wBAAwB;IAuJ/D,wBAAwB;;IAExB,kBAAkB;;IAElB,kBAAkB;;IAElB,gBAAgB;;CAGnB,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/creek-icon/index.tsx"],"names":[],"mappings":"AAAA,OAAO,IAA8B,MAAM,mBAAmB,CAAC;AAC/D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,MAAM,CAAC;AAIrC,OAAO,EAAuB,wBAAwB,EAAE,MAAM,0BAA0B,CAAC;AAEzF,KAAK,wBAAwB,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEtD,MAAM,MAAM,cAAc,GAAG,wBAAwB,GAAG;IACtD,WAAW,CAAC,EAAE,wBAAwB,CAAC,aAAa,CAAC,CAAC;IACtD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,wBAAwB,CAAC,WAAW,CAAC,CAAC;CACnD,CAAC;AAEF,eAAO,MAAM,SAAS,UAAW,cAAc,mDAkB9C,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/creek-keep-alive/index.tsx"],"names":[],"mappings":"AAEA,eAAO,MAAM,cAAc,+CAQ1B,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FullScreen.d.ts","sourceRoot":"","sources":["../../../src/creek-layout/ActionRender/FullScreen.tsx"],"names":[],"mappings":"AAKA,MAAM,MAAM,eAAe,GAAG;IAC5B,YAAY,EAAE,OAAO,CAAC;IACtB,gBAAgB,EAAE,MAAM,IAAI,CAAC;CAC9B,CAAC;AAEF,eAAO,MAAM,kBAAkB,8EAU7B,CAAC;AAEH,eAAO,MAAM,UAAU,+CAuBtB,CAAC"}
@@ -16,7 +16,7 @@ var __copyProps = (to, from, except, desc) => {
16
16
  };
17
17
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
18
 
19
- // src/creek-layout/HeaderContent/FullScreen.tsx
19
+ // src/creek-layout/ActionRender/FullScreen.tsx
20
20
  var FullScreen_exports = {};
21
21
  __export(FullScreen_exports, {
22
22
  FullScreen: () => FullScreen,
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../src/creek-layout/HeaderContent/FullScreen.tsx"],
3
+ "sources": ["../../../src/creek-layout/ActionRender/FullScreen.tsx"],
4
4
  "sourcesContent": ["import { FullscreenExitOutlined, FullscreenOutlined } from \"@ant-design/icons\";\nimport { useFullscreen, useMemoizedFn } from \"ahooks\";\nimport { Tooltip } from \"antd\";\nimport { create } from \"zustand\";\n\nexport type FullScreenStore = {\n isFullScreen: boolean;\n changeFullScreen: () => void;\n};\n\nexport const useFullScreenStore = create<FullScreenStore>((set, get) => {\n return {\n isFullScreen: false,\n changeFullScreen: () => {\n const _isFullScreen = get().isFullScreen;\n set({\n isFullScreen: !_isFullScreen,\n });\n },\n };\n});\n\nexport const FullScreen = () => {\n const [, { toggleFullscreen }] = useFullscreen(document.body);\n\n const { isFullScreen, changeFullScreen } = useFullScreenStore.getState();\n\n const handleFullScreen = useMemoizedFn(() => {\n toggleFullscreen();\n changeFullScreen();\n });\n\n return (\n <>\n {isFullScreen ? (\n <Tooltip title=\"退出全屏\" placement=\"top\">\n <FullscreenExitOutlined onClick={handleFullScreen} />\n </Tooltip>\n ) : (\n <Tooltip title=\"全屏\" placement=\"top\">\n <FullscreenOutlined onClick={handleFullScreen} />\n </Tooltip>\n )}\n </>\n );\n};\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAA2D;AAC3D,oBAA6C;AAC7C,kBAAwB;AACxB,qBAAuB;AA8BnB;AAvBG,IAAM,yBAAqB,uBAAwB,CAAC,KAAK,QAAQ;AACtE,SAAO;AAAA,IACL,cAAc;AAAA,IACd,kBAAkB,MAAM;AACtB,YAAM,gBAAgB,IAAI,EAAE;AAC5B,UAAI;AAAA,QACF,cAAc,CAAC;AAAA,MACjB,CAAC;AAAA,IACH;AAAA,EACF;AACF,CAAC;AAEM,IAAM,aAAa,MAAM;AAC9B,QAAM,CAAC,EAAE,EAAE,iBAAiB,CAAC,QAAI,6BAAc,SAAS,IAAI;AAE5D,QAAM,EAAE,cAAc,iBAAiB,IAAI,mBAAmB,SAAS;AAEvE,QAAM,uBAAmB,6BAAc,MAAM;AAC3C,qBAAiB;AACjB,qBAAiB;AAAA,EACnB,CAAC;AAED,SACE,2EACG,yBACC,4CAAC,uBAAQ,OAAM,QAAO,WAAU,OAC9B,sDAAC,uCAAuB,SAAS,kBAAkB,GACrD,IAEA,4CAAC,uBAAQ,OAAM,MAAK,WAAU,OAC5B,sDAAC,mCAAmB,SAAS,kBAAkB,GACjD,GAEJ;AAEJ;",
6
6
  "names": []
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" />
2
+ import { DropDownProps } from "antd";
3
+ export interface UserInfoProps {
4
+ name?: React.ReactNode;
5
+ avatar?: string;
6
+ menu?: DropDownProps['menu'];
7
+ }
8
+ export declare const UserInfo: (props: UserInfoProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UserInfo.d.ts","sourceRoot":"","sources":["../../../src/creek-layout/ActionRender/UserInfo.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAoB,aAAa,EAAS,MAAM,MAAM,CAAC;AAsB9D,MAAM,WAAW,aAAa;IAC5B,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;CAC9B;AAED,eAAO,MAAM,QAAQ,UAAW,aAAa,4CAc5C,CAAC"}
@@ -16,13 +16,12 @@ var __copyProps = (to, from, except, desc) => {
16
16
  };
17
17
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
18
 
19
- // src/creek-layout/HeaderContent/UserInfo.tsx
19
+ // src/creek-layout/ActionRender/UserInfo.tsx
20
20
  var UserInfo_exports = {};
21
21
  __export(UserInfo_exports, {
22
22
  UserInfo: () => UserInfo
23
23
  });
24
24
  module.exports = __toCommonJS(UserInfo_exports);
25
- var import_icons = require("@ant-design/icons");
26
25
  var import_antd = require("antd");
27
26
  var import_antd_style = require("antd-style");
28
27
  var import_jsx_runtime = require("react/jsx-runtime");
@@ -44,34 +43,13 @@ var useStyles = (0, import_antd_style.createStyles)(({ token }) => ({
44
43
  }
45
44
  }
46
45
  }));
47
- var UserInfo = () => {
46
+ var UserInfo = (props) => {
48
47
  const { styles } = useStyles();
49
- const userInfoMenu = {
50
- items: [
51
- {
52
- key: "logout",
53
- label: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_antd.Space, { size: 8, children: [
54
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.LogoutOutlined, {}),
55
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: "退出登录" })
56
- ] }),
57
- onClick: () => {
58
- }
59
- }
60
- ]
61
- };
62
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
63
- import_antd.Dropdown,
64
- {
65
- arrow: true,
66
- placement: "bottom",
67
- overlayClassName: styles.userInfoDropdownOverlay,
68
- menu: userInfoMenu,
69
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_antd.Space, { size: 4, align: "center", children: [
70
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_antd.Avatar, { className: styles.avatarContainer, children: "C" }),
71
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: "Creek" })
72
- ] })
73
- }
74
- );
48
+ const { name, avatar, menu } = props;
49
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_antd.Dropdown, { arrow: true, placement: "bottom", overlayClassName: styles.userInfoDropdownOverlay, menu, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_antd.Space, { size: 4, align: "center", children: [
50
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_antd.Avatar, { className: styles.avatarContainer, src: avatar, children: name }),
51
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: name })
52
+ ] }) });
75
53
  };
76
54
  // Annotate the CommonJS export names for ESM import in node:
77
55
  0 && (module.exports = {
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/creek-layout/ActionRender/UserInfo.tsx"],
4
+ "sourcesContent": ["import { Avatar, Dropdown, DropDownProps, Space } from \"antd\";\nimport { createStyles } from \"antd-style\";\n\nconst useStyles = createStyles(({ token }) => ({\n avatarContainer: {\n backgroundColor: token.colorPrimary,\n width: 24,\n height: 24,\n },\n userInfoDropdownOverlay: {\n \".ant-dropdown-menu\": {\n padding: \"8px 0\",\n },\n \".ant-dropdown-menu-item\": {\n \".ant-dropdown-menu-item-icon\": {\n fontSize: \"18px\",\n marginRight: \"8px\",\n },\n },\n },\n}));\n\nexport interface UserInfoProps {\n name?: React.ReactNode;\n avatar?: string;\n menu?: DropDownProps['menu'];\n}\n\nexport const UserInfo = (props: UserInfoProps) => {\n const { styles } = useStyles();\n const { name, avatar, menu } = props;\n\n return (\n <Dropdown arrow placement=\"bottom\" overlayClassName={styles.userInfoDropdownOverlay} menu={menu}>\n <Space size={4} align=\"center\">\n <Avatar className={styles.avatarContainer} src={avatar}>\n {name}\n </Avatar>\n <span>{name}</span>\n </Space>\n </Dropdown>\n );\n};\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAuD;AACvD,wBAA6B;AAiCvB;AA/BN,IAAM,gBAAY,gCAAa,CAAC,EAAE,MAAM,OAAO;AAAA,EAC7C,iBAAiB;AAAA,IACf,iBAAiB,MAAM;AAAA,IACvB,OAAO;AAAA,IACP,QAAQ;AAAA,EACV;AAAA,EACA,yBAAyB;AAAA,IACvB,sBAAsB;AAAA,MACpB,SAAS;AAAA,IACX;AAAA,IACA,2BAA2B;AAAA,MACzB,gCAAgC;AAAA,QAC9B,UAAU;AAAA,QACV,aAAa;AAAA,MACf;AAAA,IACF;AAAA,EACF;AACF,EAAE;AAQK,IAAM,WAAW,CAAC,UAAyB;AAChD,QAAM,EAAE,OAAO,IAAI,UAAU;AAC7B,QAAM,EAAE,MAAM,QAAQ,KAAK,IAAI;AAE/B,SACE,4CAAC,wBAAS,OAAK,MAAC,WAAU,UAAS,kBAAkB,OAAO,yBAAyB,MACnF,uDAAC,qBAAM,MAAM,GAAG,OAAM,UACpB;AAAA,gDAAC,sBAAO,WAAW,OAAO,iBAAiB,KAAK,QAC7C,gBACH;AAAA,IACA,4CAAC,UAAM,gBAAK;AAAA,KACd,GACF;AAEJ;",
6
+ "names": []
7
+ }
@@ -0,0 +1,2 @@
1
+ export { FullScreen } from './FullScreen';
2
+ export { UserInfo } from './UserInfo';
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/creek-layout/ActionRender/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC"}
@@ -0,0 +1,33 @@
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/ActionRender/index.tsx
20
+ var ActionRender_exports = {};
21
+ __export(ActionRender_exports, {
22
+ FullScreen: () => import_FullScreen.FullScreen,
23
+ UserInfo: () => import_UserInfo.UserInfo
24
+ });
25
+ module.exports = __toCommonJS(ActionRender_exports);
26
+ var import_FullScreen = require("./FullScreen");
27
+ var import_UserInfo = require("./UserInfo");
28
+ // Annotate the CommonJS export names for ESM import in node:
29
+ 0 && (module.exports = {
30
+ FullScreen,
31
+ UserInfo
32
+ });
33
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/creek-layout/ActionRender/index.tsx"],
4
+ "sourcesContent": ["export { FullScreen } from './FullScreen';\nexport { UserInfo } from './UserInfo';\n\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,wBAA2B;AAC3B,sBAAyB;",
6
+ "names": []
7
+ }
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CollapseButton.d.ts","sourceRoot":"","sources":["../../src/creek-layout/CollapseButton.tsx"],"names":[],"mappings":"AAKA,MAAM,MAAM,oBAAoB,GAAG;IACjC,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG;IACjC,SAAS,EAAE,OAAO,CAAC;IACnB,eAAe,EAAE,MAAM,IAAI,CAAC;CAC7B,CAAC;AAiBF,eAAO,MAAM,iBAAiB,mFAU5B,CAAC;AAEH,eAAO,MAAM,eAAe,UAAW,oBAAoB,4CAwB1D,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NotFound.d.ts","sourceRoot":"","sources":["../../../src/creek-layout/Exception/NotFound.tsx"],"names":[],"mappings":"AAEA,eAAO,MAAM,QAAQ,+CASpB,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NotFoundPage.d.ts","sourceRoot":"","sources":["../../../src/creek-layout/Exception/NotFoundPage.tsx"],"names":[],"mappings":";AACA,wBAEE"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/creek-layout/Exception/index.tsx"],"names":[],"mappings":";AAAA,cAAc,YAAY,CAAC;AAE3B,MAAM,MAAM,cAAc,GAAG;IAC3B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B,CAAC;AAEF,eAAO,MAAM,SAAS,UAAW,cAAc,4CAG9C,CAAC"}
@@ -1,8 +1,15 @@
1
- import { ProLayoutProps } from "@ant-design/pro-components";
1
+ /// <reference types="react" />
2
+ import { ProLayoutProps } from '@ant-design/pro-components';
2
3
  export type LayoutProps = ProLayoutProps & {
3
4
  runtimeConfig: ProLayoutProps;
4
5
  userConfig?: ProLayoutProps;
5
6
  navigate?: (path?: string | number) => void;
7
+ showFullScreen?: boolean;
8
+ userInfo?: {
9
+ name?: React.ReactNode;
10
+ avatar?: string;
11
+ menu?: any;
12
+ };
6
13
  initialInfo?: {
7
14
  initialState: any;
8
15
  loading: boolean;
@@ -10,4 +17,4 @@ export type LayoutProps = ProLayoutProps & {
10
17
  };
11
18
  };
12
19
  export declare const CreekLayout: (props: LayoutProps) => import("react/jsx-runtime").JSX.Element;
13
- export * from "./Exception";
20
+ export * from './Exception';
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/creek-layout/index.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAa,cAAc,EAAE,MAAM,4BAA4B,CAAC;AASvE,MAAM,MAAM,WAAW,GAAG,cAAc,GAAG;IACzC,aAAa,EAAE,cAAc,CAAC;IAC9B,UAAU,CAAC,EAAE,cAAc,CAAC;IAC5B,QAAQ,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,KAAK,IAAI,CAAC;IAC5C,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,QAAQ,CAAC,EAAE;QACT,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;QACvB,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,IAAI,CAAC,EAAE,GAAG,CAAC;KACZ,CAAC;IACF,WAAW,CAAC,EAAE;QACZ,YAAY,EAAE,GAAG,CAAC;QAClB,OAAO,EAAE,OAAO,CAAC;QACjB,eAAe,EAAE,MAAM,IAAI,CAAC;KAC7B,CAAC;CACH,CAAC;AAEF,eAAO,MAAM,WAAW,UAAW,WAAW,4CAuE7C,CAAC;AAEF,cAAc,aAAa,CAAC"}
@@ -37,52 +37,46 @@ var import_pro_components = require("@ant-design/pro-components");
37
37
  var import_ahooks = require("ahooks");
38
38
  var import_antd = require("antd");
39
39
  var import_classnames = __toESM(require("classnames"));
40
+ var import_ActionRender = require("./ActionRender");
40
41
  var import_CollapseButton = require("./CollapseButton");
41
42
  var import_Exception = require("./Exception");
42
- var import_HeaderContent = require("./HeaderContent");
43
43
  __reExport(creek_layout_exports, require("./Exception"), module.exports);
44
44
  var import_jsx_runtime = require("react/jsx-runtime");
45
45
  var CreekLayout = (props) => {
46
- const {
47
- route,
48
- userConfig,
49
- runtimeConfig,
50
- children,
51
- location,
52
- navigate,
53
- ...more
54
- } = props;
46
+ const { route, userConfig, runtimeConfig, children, location, navigate, showFullScreen, userInfo, ...more } = props;
55
47
  const { useToken } = import_antd.theme;
56
48
  const { token } = useToken();
57
49
  const { collapsed } = (0, import_CollapseButton.useCollapsedStore)();
58
- const menuItemRender = (0, import_ahooks.useMemoizedFn)(
59
- (itemProps, defaultDom) => {
60
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
61
- "span",
62
- {
63
- onClick: () => {
64
- if (navigate) {
65
- navigate(itemProps.path);
66
- }
67
- },
68
- children: defaultDom
69
- }
70
- );
71
- }
72
- );
50
+ const menuItemRender = (0, import_ahooks.useMemoizedFn)((itemProps, defaultDom) => {
51
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
52
+ "span",
53
+ {
54
+ onClick: () => {
55
+ if (navigate) {
56
+ navigate(itemProps.path);
57
+ }
58
+ },
59
+ children: defaultDom
60
+ }
61
+ );
62
+ });
63
+ const actions = [];
64
+ if (showFullScreen) {
65
+ actions.push(/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ActionRender.FullScreen, {}, "full-screen"));
66
+ }
67
+ if (userInfo) {
68
+ actions.push(/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ActionRender.UserInfo, { ...userInfo }, "user-info"));
69
+ }
73
70
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
74
71
  import_pro_components.ProLayout,
75
72
  {
76
73
  className: (0, import_classnames.default)("creek-layout-container", userConfig == null ? void 0 : userConfig.className),
77
- layout: "mix",
78
74
  route,
79
75
  title: userConfig == null ? void 0 : userConfig.title,
80
76
  siderWidth: 212,
81
77
  location,
82
78
  menuItemRender,
83
- headerContentRender: () => {
84
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_HeaderContent.HeaderContent, {});
85
- },
79
+ actionsRender: () => actions,
86
80
  token: {
87
81
  header: {
88
82
  colorBgHeader: "#fff",
@@ -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 { CollapsedButton, useCollapsedStore } from \"./CollapseButton\";\nimport { Exception } from \"./Exception\";\nimport { HeaderContent } from \"./HeaderContent\";\n\nexport type LayoutProps = ProLayoutProps & {\n runtimeConfig: ProLayoutProps;\n userConfig?: ProLayoutProps;\n navigate?: (path?: string | number) => void;\n initialInfo?: {\n initialState: any;\n loading: boolean;\n setInitialState: () => void;\n };\n};\n\nexport const CreekLayout = (props: LayoutProps) => {\n const {\n route,\n userConfig,\n runtimeConfig,\n children,\n location,\n navigate,\n ...more\n } = props;\n\n const { useToken } = theme;\n const { token } = useToken();\n\n const { collapsed } = useCollapsedStore();\n\n const menuItemRender: ProLayoutProps[\"menuItemRender\"] = useMemoizedFn(\n (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\n return (\n <ProLayout\n className={classnames(\"creek-layout-container\", userConfig?.className)}\n layout=\"mix\"\n route={route}\n title={userConfig?.title}\n siderWidth={212}\n location={location}\n menuItemRender={menuItemRender}\n headerContentRender={() => {\n return <HeaderContent />;\n }}\n token={{\n header: {\n colorBgHeader: \"#fff\",\n colorHeaderTitle: \"rgba(0, 0, 0, 0.80);\",\n colorTextMenuSelected: token.colorPrimary,\n heightLayoutHeader: 48,\n },\n sider: {\n colorMenuBackground: \"#f7f8fa\",\n colorBgMenuItemSelected: \"transparent\",\n colorTextMenuActive: token.colorPrimary,\n colorTextMenuSelected: token.colorPrimary,\n colorTextMenuItemHover: token.colorPrimary,\n colorTextMenu: \"#333\",\n },\n pageContainer: {\n paddingBlockPageContainerContent: token.padding,\n paddingInlinePageContainerContent: token.padding,\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 <Exception>{children}</Exception>\n </ProLayout>\n );\n};\n\nexport * from \"./Exception\";\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,4BAA0C;AAC1C,oBAA8B;AAC9B,kBAAsB;AACtB,wBAAuB;AAEvB,4BAAmD;AACnD,uBAA0B;AAC1B,2BAA8B;AA2F9B,iCAAc,wBAlGd;AAuCQ;AAnBD,IAAM,cAAc,CAAC,UAAuB;AACjD,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EACL,IAAI;AAEJ,QAAM,EAAE,SAAS,IAAI;AACrB,QAAM,EAAE,MAAM,IAAI,SAAS;AAE3B,QAAM,EAAE,UAAU,QAAI,yCAAkB;AAExC,QAAM,qBAAmD;AAAA,IACvD,CAAC,WAAW,eAAe;AACzB,aACE;AAAA,QAAC;AAAA;AAAA,UACC,SAAS,MAAM;AACb,gBAAI,UAAU;AACZ,uBAAS,UAAU,IAAI;AAAA,YACzB;AAAA,UACF;AAAA,UAEC;AAAA;AAAA,MACH;AAAA,IAEJ;AAAA,EACF;AAEA,SACE;AAAA,IAAC;AAAA;AAAA,MACC,eAAW,kBAAAA,SAAW,0BAA0B,yCAAY,SAAS;AAAA,MACrE,QAAO;AAAA,MACP;AAAA,MACA,OAAO,yCAAY;AAAA,MACnB,YAAY;AAAA,MACZ;AAAA,MACA;AAAA,MACA,qBAAqB,MAAM;AACzB,eAAO,4CAAC,sCAAc;AAAA,MACxB;AAAA,MACA,OAAO;AAAA,QACL,QAAQ;AAAA,UACN,eAAe;AAAA,UACf,kBAAkB;AAAA,UAClB,uBAAuB,MAAM;AAAA,UAC7B,oBAAoB;AAAA,QACtB;AAAA,QACA,OAAO;AAAA,UACL,qBAAqB;AAAA,UACrB,yBAAyB;AAAA,UACzB,qBAAqB,MAAM;AAAA,UAC3B,uBAAuB,MAAM;AAAA,UAC7B,wBAAwB,MAAM;AAAA,UAC9B,eAAe;AAAA,QACjB;AAAA,QACA,eAAe;AAAA,UACb,kCAAkC,MAAM;AAAA,UACxC,mCAAmC,MAAM;AAAA,UACzC,sBAAsB;AAAA,QACxB;AAAA,MACF;AAAA,MACA,aAAW;AAAA,MACX,aAAW;AAAA,MACX;AAAA,MACA,uBAAuB,CAACC,eAAc;AACpC,eAAO,4CAAC,yCAAgB,WAAWA,YAAW;AAAA,MAChD;AAAA,MACC,GAAG;AAAA,MAEJ,sDAAC,8BAAW,UAAS;AAAA;AAAA,EACvB;AAEJ;",
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, UserInfo } from './ActionRender';\nimport { CollapsedButton, useCollapsedStore } from './CollapseButton';\nimport { Exception } from './Exception';\n\nexport type LayoutProps = ProLayoutProps & {\n runtimeConfig: ProLayoutProps;\n userConfig?: ProLayoutProps;\n navigate?: (path?: string | number) => void;\n showFullScreen?: boolean;\n userInfo?: {\n name?: React.ReactNode;\n avatar?: string;\n menu?: any;\n };\n initialInfo?: {\n initialState: any;\n loading: boolean;\n setInitialState: () => void;\n };\n};\n\nexport const CreekLayout = (props: LayoutProps) => {\n const { route, userConfig, runtimeConfig, children, location, navigate, showFullScreen, userInfo, ...more } = props;\n\n const { useToken } = theme;\n const { token } = useToken();\n\n const { collapsed } = useCollapsedStore();\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 actions: React.ReactNode[] = [];\n if (showFullScreen) {\n actions.push(<FullScreen key=\"full-screen\" />);\n }\n if (userInfo) {\n actions.push(<UserInfo key=\"user-info\" {...userInfo} />);\n }\n\n return (\n <ProLayout\n className={classnames('creek-layout-container', userConfig?.className)}\n route={route}\n title={userConfig?.title}\n siderWidth={212}\n location={location}\n menuItemRender={menuItemRender}\n actionsRender={() => actions}\n token={{\n header: {\n colorBgHeader: '#fff',\n colorHeaderTitle: 'rgba(0, 0, 0, 0.80);',\n colorTextMenuSelected: token.colorPrimary,\n heightLayoutHeader: 48,\n },\n sider: {\n colorMenuBackground: '#f7f8fa',\n colorBgMenuItemSelected: 'transparent',\n colorTextMenuActive: token.colorPrimary,\n colorTextMenuSelected: token.colorPrimary,\n colorTextMenuItemHover: token.colorPrimary,\n colorTextMenu: '#333',\n },\n pageContainer: {\n paddingBlockPageContainerContent: token.padding,\n paddingInlinePageContainerContent: token.padding,\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 <Exception>{children}</Exception>\n </ProLayout>\n );\n};\n\nexport * from './Exception';\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,4BAA0C;AAC1C,oBAA8B;AAC9B,kBAAsB;AACtB,wBAAuB;AAEvB,0BAAqC;AACrC,4BAAmD;AACnD,uBAA0B;AA4F1B,iCAAc,wBAnGd;AAoCM;AAVC,IAAM,cAAc,CAAC,UAAuB;AACjD,QAAM,EAAE,OAAO,YAAY,eAAe,UAAU,UAAU,UAAU,gBAAgB,UAAU,GAAG,KAAK,IAAI;AAE9G,QAAM,EAAE,SAAS,IAAI;AACrB,QAAM,EAAE,MAAM,IAAI,SAAS;AAE3B,QAAM,EAAE,UAAU,QAAI,yCAAkB;AAExC,QAAM,qBAAmD,6BAAc,CAAC,WAAW,eAAe;AAChG,WACE;AAAA,MAAC;AAAA;AAAA,QACC,SAAS,MAAM;AACb,cAAI,UAAU;AACZ,qBAAS,UAAU,IAAI;AAAA,UACzB;AAAA,QACF;AAAA,QAEC;AAAA;AAAA,IACH;AAAA,EAEJ,CAAC;AAED,QAAM,UAA6B,CAAC;AACpC,MAAI,gBAAgB;AAClB,YAAQ,KAAK,4CAAC,oCAAe,aAAc,CAAE;AAAA,EAC/C;AACA,MAAI,UAAU;AACZ,YAAQ,KAAK,4CAAC,gCAA0B,GAAG,YAAhB,WAA0B,CAAE;AAAA,EACzD;AAEA,SACE;AAAA,IAAC;AAAA;AAAA,MACC,eAAW,kBAAAA,SAAW,0BAA0B,yCAAY,SAAS;AAAA,MACrE;AAAA,MACA,OAAO,yCAAY;AAAA,MACnB,YAAY;AAAA,MACZ;AAAA,MACA;AAAA,MACA,eAAe,MAAM;AAAA,MACrB,OAAO;AAAA,QACL,QAAQ;AAAA,UACN,eAAe;AAAA,UACf,kBAAkB;AAAA,UAClB,uBAAuB,MAAM;AAAA,UAC7B,oBAAoB;AAAA,QACtB;AAAA,QACA,OAAO;AAAA,UACL,qBAAqB;AAAA,UACrB,yBAAyB;AAAA,UACzB,qBAAqB,MAAM;AAAA,UAC3B,uBAAuB,MAAM;AAAA,UAC7B,wBAAwB,MAAM;AAAA,UAC9B,eAAe;AAAA,QACjB;AAAA,QACA,eAAe;AAAA,UACb,kCAAkC,MAAM;AAAA,UACxC,mCAAmC,MAAM;AAAA,UACzC,sBAAsB;AAAA,QACxB;AAAA,MACF;AAAA,MACA,aAAW;AAAA,MACX,aAAW;AAAA,MACX;AAAA,MACA,uBAAuB,CAACC,eAAc;AACpC,eAAO,4CAAC,yCAAgB,WAAWA,YAAW;AAAA,MAChD;AAAA,MACC,GAAG;AAAA,MAEJ,sDAAC,8BAAW,UAAS;AAAA;AAAA,EACvB;AAEJ;",
6
6
  "names": ["classnames", "collapsed"]
7
7
  }
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/creek-loading/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,qBAAa,OAAO;IAClB,OAAO,CAAC,MAAM,CAAC,SAAS,CAA+B;IACvD,OAAO,CAAC,MAAM,CAAC,IAAI,CAA8C;IAEjE,OAAO,CAAC,MAAM,CAAC,eAAe;IAS9B,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,IAAI,CAAC;IAMtD,MAAM,CAAC,KAAK;CAWb"}
@@ -0,0 +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;AAUlE,OAAO,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAC;AA6CzC,eAAO,MAAM,cAAc,0EAA2E,gBAAgB,CAAC,EAAE,CAAC,EAAE,SAAS,CAAC,4CAmDrI,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TableOptionRender.d.ts","sourceRoot":"","sources":["../../src/creek-table/TableOptionRender.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAIxD,OAAO,EAAE,kBAAkB,EAAE,MAAM,QAAQ,CAAC;AAa5C,MAAM,MAAM,sBAAsB,CAAC,CAAC,SAAS,UAAU,EAAE,CAAC,SAAS,UAAU,EAAE,SAAS,GAAG,MAAM,IAAI;IACnG,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,EAAE,CAAC;IAC/B,YAAY,CAAC,EAAE,kBAAkB,CAAC;IAClC,YAAY,CAAC,EAAE,kBAAkB,CAAC;CACnC,CAAC;AAEF,eAAO,MAAM,iBAAiB,0EAA2E,uBAAuB,CAAC,EAAE,CAAC,EAAE,SAAS,CAAC,4CAgC/I,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/creek-table/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,wBAAwB,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useAdaptiveToolBar.d.ts","sourceRoot":"","sources":["../../../src/creek-table/hooks/useAdaptiveToolBar.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAA+B,MAAM,OAAO,CAAC;AAGtE,eAAO,MAAM,kBAAkB,YAAa;IAC1C,YAAY,EAAE,iBAAiB,WAAW,GAAG,IAAI,CAAC,CAAC;IACnD,SAAS,EAAE,MAAM,CAAC;IAClB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;;CAoCA,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useAutoWidthColumns.d.ts","sourceRoot":"","sources":["../../../src/creek-table/hooks/useAutoWidthColumns.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAGxD,OAAO,EAAE,SAAS,EAAwC,MAAM,OAAO,CAAC;AA4ExE,eAAO,MAAM,mBAAmB,0BACrB,WAAW,CAAC,EAAE,SAAS,CAAC,EAAE,GAAG,SAAS,YACrC,UAAU,cAAc,CAAC;aACvB,WAAW,CAAC,EAAE,SAAS,CAAC,EAAE,GAAG,SAAS;gBAAc,MAAM,GAAG,SAAS;CAiInF,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useElementDistance.d.ts","sourceRoot":"","sources":["../../../src/creek-table/hooks/useElementDistance.tsx"],"names":[],"mappings":";AAGA,KAAK,UAAU,GAAG,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;AAO/C,UAAU,QAAQ;IAChB,CAAC,EAAE,MAAM,CAAC;CACX;AAeD,eAAO,MAAM,kBAAkB,wDAAuD,QAAQ,GAAG,IAoChG,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useTableScrollHeight.d.ts","sourceRoot":"","sources":["../../../src/creek-table/hooks/useTableScrollHeight.tsx"],"names":[],"mappings":"AAGA,eAAO,MAAM,oBAAoB,cAAe,MAAM,YAAY,MAAM,SAAS,CAAC,cAAc,CAAC,oBAAmB,OAAO,mBAAyB,MAAM,iBAAqB,MAAM,uBA2DpL,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/creek-table/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAGxD,OAAO,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAC;AAEzC,eAAO,MAAM,UAAU,0EAA2E,gBAAgB,CAAC,EAAE,CAAC,EAAE,SAAS,CAAC,4CAMjI,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toolBarRender.d.ts","sourceRoot":"","sources":["../../src/creek-table/toolBarRender.tsx"],"names":[],"mappings":"AAGA,eAAO,MAAM,aAAa,YAAa;IAAE,cAAc,EAAE,OAAO,CAAC;IAAC,SAAS,EAAE,GAAG,CAAC;IAAC,IAAI,CAAC,EAAE,GAAG,EAAE,CAAA;CAAE,QAwB/F,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../../src/creek-table/type.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAEvE,MAAM,MAAM,kBAAkB,GAAG;IAC/B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,eAAe,CAAC,CAAC,SAAS,UAAU,EAAE,CAAC,SAAS,UAAU,EAAE,SAAS,GAAG,MAAM,IAAI,IAAI,CAAC,aAAa,CAAC,CAAC,EAAE,CAAC,EAAE,SAAS,CAAC,EAAG,SAAS,CAAC,GAAG;IAC/I,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,qBAAqB,CAAC,EAAE;QACtB,+BAA+B;QAC/B,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB,CAAC;IACF,OAAO,CAAC,EAAE,aAAa,CAAC,CAAC,EAAE,CAAC,EAAE,SAAS,CAAC,CAAC,SAAS,CAAC,GAAG;QACpD,YAAY,CAAC,EAAE,kBAAkB,CAAC;QAClC,YAAY,CAAC,EAAE,kBAAkB,CAAC;KACnC,CAAC;IAEF,sBAAsB,CAAC,EAAE,OAAO,CAAC;CAClC,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AACA,cAAc,yBAAyB,CAAC;AACxC,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@creekjs/web-components",
3
- "version": "1.0.4",
3
+ "version": "1.0.5",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -1,4 +1,3 @@
1
- import { LogoutOutlined } from "@ant-design/icons";
2
1
  import { Avatar, Dropdown, DropDownProps, Space } from "antd";
3
2
  import { createStyles } from "antd-style";
4
3
 
@@ -21,33 +20,23 @@ const useStyles = createStyles(({ token }) => ({
21
20
  },
22
21
  }));
23
22
 
24
- export const UserInfo = () => {
23
+ export interface UserInfoProps {
24
+ name?: React.ReactNode;
25
+ avatar?: string;
26
+ menu?: DropDownProps['menu'];
27
+ }
28
+
29
+ export const UserInfo = (props: UserInfoProps) => {
25
30
  const { styles } = useStyles();
31
+ const { name, avatar, menu } = props;
26
32
 
27
- const userInfoMenu: DropDownProps["menu"] = {
28
- items: [
29
- {
30
- key: "logout",
31
- label: (
32
- <Space size={8}>
33
- <LogoutOutlined />
34
- <span>退出登录</span>
35
- </Space>
36
- ),
37
- onClick: () => {},
38
- },
39
- ],
40
- };
41
33
  return (
42
- <Dropdown
43
- arrow
44
- placement="bottom"
45
- overlayClassName={styles.userInfoDropdownOverlay}
46
- menu={userInfoMenu}
47
- >
34
+ <Dropdown arrow placement="bottom" overlayClassName={styles.userInfoDropdownOverlay} menu={menu}>
48
35
  <Space size={4} align="center">
49
- <Avatar className={styles.avatarContainer}>C</Avatar>
50
- <span>Creek</span>
36
+ <Avatar className={styles.avatarContainer} src={avatar}>
37
+ {name}
38
+ </Avatar>
39
+ <span>{name}</span>
51
40
  </Space>
52
41
  </Dropdown>
53
42
  );
@@ -0,0 +1,3 @@
1
+ export { FullScreen } from './FullScreen';
2
+ export { UserInfo } from './UserInfo';
3
+
@@ -1,16 +1,22 @@
1
- import { ProLayout, ProLayoutProps } from "@ant-design/pro-components";
2
- import { useMemoizedFn } from "ahooks";
3
- import { theme } from "antd";
4
- import classnames from "classnames";
1
+ import { ProLayout, ProLayoutProps } from '@ant-design/pro-components';
2
+ import { useMemoizedFn } from 'ahooks';
3
+ import { theme } from 'antd';
4
+ import classnames from 'classnames';
5
5
 
6
- import { CollapsedButton, useCollapsedStore } from "./CollapseButton";
7
- import { Exception } from "./Exception";
8
- import { HeaderContent } from "./HeaderContent";
6
+ import { FullScreen, UserInfo } from './ActionRender';
7
+ import { CollapsedButton, useCollapsedStore } from './CollapseButton';
8
+ import { Exception } from './Exception';
9
9
 
10
10
  export type LayoutProps = ProLayoutProps & {
11
11
  runtimeConfig: ProLayoutProps;
12
12
  userConfig?: ProLayoutProps;
13
13
  navigate?: (path?: string | number) => void;
14
+ showFullScreen?: boolean;
15
+ userInfo?: {
16
+ name?: React.ReactNode;
17
+ avatar?: string;
18
+ menu?: any;
19
+ };
14
20
  initialInfo?: {
15
21
  initialState: any;
16
22
  loading: boolean;
@@ -19,68 +25,63 @@ export type LayoutProps = ProLayoutProps & {
19
25
  };
20
26
 
21
27
  export const CreekLayout = (props: LayoutProps) => {
22
- const {
23
- route,
24
- userConfig,
25
- runtimeConfig,
26
- children,
27
- location,
28
- navigate,
29
- ...more
30
- } = props;
28
+ const { route, userConfig, runtimeConfig, children, location, navigate, showFullScreen, userInfo, ...more } = props;
31
29
 
32
30
  const { useToken } = theme;
33
31
  const { token } = useToken();
34
32
 
35
33
  const { collapsed } = useCollapsedStore();
36
34
 
37
- const menuItemRender: ProLayoutProps["menuItemRender"] = useMemoizedFn(
38
- (itemProps, defaultDom) => {
39
- return (
40
- <span
41
- onClick={() => {
42
- if (navigate) {
43
- navigate(itemProps.path);
44
- }
45
- }}
46
- >
47
- {defaultDom}
48
- </span>
49
- );
50
- }
51
- );
35
+ const menuItemRender: ProLayoutProps['menuItemRender'] = useMemoizedFn((itemProps, defaultDom) => {
36
+ return (
37
+ <span
38
+ onClick={() => {
39
+ if (navigate) {
40
+ navigate(itemProps.path);
41
+ }
42
+ }}
43
+ >
44
+ {defaultDom}
45
+ </span>
46
+ );
47
+ });
48
+
49
+ const actions: React.ReactNode[] = [];
50
+ if (showFullScreen) {
51
+ actions.push(<FullScreen key="full-screen" />);
52
+ }
53
+ if (userInfo) {
54
+ actions.push(<UserInfo key="user-info" {...userInfo} />);
55
+ }
52
56
 
53
57
  return (
54
58
  <ProLayout
55
- className={classnames("creek-layout-container", userConfig?.className)}
56
- layout="mix"
59
+ className={classnames('creek-layout-container', userConfig?.className)}
57
60
  route={route}
58
61
  title={userConfig?.title}
59
62
  siderWidth={212}
60
63
  location={location}
61
64
  menuItemRender={menuItemRender}
62
- headerContentRender={() => {
63
- return <HeaderContent />;
64
- }}
65
+ actionsRender={() => actions}
65
66
  token={{
66
67
  header: {
67
- colorBgHeader: "#fff",
68
- colorHeaderTitle: "rgba(0, 0, 0, 0.80);",
68
+ colorBgHeader: '#fff',
69
+ colorHeaderTitle: 'rgba(0, 0, 0, 0.80);',
69
70
  colorTextMenuSelected: token.colorPrimary,
70
71
  heightLayoutHeader: 48,
71
72
  },
72
73
  sider: {
73
- colorMenuBackground: "#f7f8fa",
74
- colorBgMenuItemSelected: "transparent",
74
+ colorMenuBackground: '#f7f8fa',
75
+ colorBgMenuItemSelected: 'transparent',
75
76
  colorTextMenuActive: token.colorPrimary,
76
77
  colorTextMenuSelected: token.colorPrimary,
77
78
  colorTextMenuItemHover: token.colorPrimary,
78
- colorTextMenu: "#333",
79
+ colorTextMenu: '#333',
79
80
  },
80
81
  pageContainer: {
81
82
  paddingBlockPageContainerContent: token.padding,
82
83
  paddingInlinePageContainerContent: token.padding,
83
- colorBgPageContainer: 'linear-gradient(180deg, #F7F9FF 0%, #FFF 45.59%);'
84
+ colorBgPageContainer: 'linear-gradient(180deg, #F7F9FF 0%, #FFF 45.59%);',
84
85
  },
85
86
  }}
86
87
  fixSiderbar
@@ -96,4 +97,4 @@ export const CreekLayout = (props: LayoutProps) => {
96
97
  );
97
98
  };
98
99
 
99
- export * from "./Exception";
100
+ export * from './Exception';
@@ -1 +0,0 @@
1
- export declare const UserInfo: () => import("react/jsx-runtime").JSX.Element;
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/creek-layout/HeaderContent/UserInfo.tsx"],
4
- "sourcesContent": ["import { LogoutOutlined } from \"@ant-design/icons\";\nimport { Avatar, Dropdown, DropDownProps, Space } from \"antd\";\nimport { createStyles } from \"antd-style\";\n\nconst useStyles = createStyles(({ token }) => ({\n avatarContainer: {\n backgroundColor: token.colorPrimary,\n width: 24,\n height: 24,\n },\n userInfoDropdownOverlay: {\n \".ant-dropdown-menu\": {\n padding: \"8px 0\",\n },\n \".ant-dropdown-menu-item\": {\n \".ant-dropdown-menu-item-icon\": {\n fontSize: \"18px\",\n marginRight: \"8px\",\n },\n },\n },\n}));\n\nexport const UserInfo = () => {\n const { styles } = useStyles();\n\n const userInfoMenu: DropDownProps[\"menu\"] = {\n items: [\n {\n key: \"logout\",\n label: (\n <Space size={8}>\n <LogoutOutlined />\n <span>退出登录</span>\n </Space>\n ),\n onClick: () => {},\n },\n ],\n };\n return (\n <Dropdown\n arrow\n placement=\"bottom\"\n overlayClassName={styles.userInfoDropdownOverlay}\n menu={userInfoMenu}\n >\n <Space size={4} align=\"center\">\n <Avatar className={styles.avatarContainer}>C</Avatar>\n <span>Creek</span>\n </Space>\n </Dropdown>\n );\n};\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAA+B;AAC/B,kBAAuD;AACvD,wBAA6B;AA6BnB;AA3BV,IAAM,gBAAY,gCAAa,CAAC,EAAE,MAAM,OAAO;AAAA,EAC7C,iBAAiB;AAAA,IACf,iBAAiB,MAAM;AAAA,IACvB,OAAO;AAAA,IACP,QAAQ;AAAA,EACV;AAAA,EACA,yBAAyB;AAAA,IACvB,sBAAsB;AAAA,MACpB,SAAS;AAAA,IACX;AAAA,IACA,2BAA2B;AAAA,MACzB,gCAAgC;AAAA,QAC9B,UAAU;AAAA,QACV,aAAa;AAAA,MACf;AAAA,IACF;AAAA,EACF;AACF,EAAE;AAEK,IAAM,WAAW,MAAM;AAC5B,QAAM,EAAE,OAAO,IAAI,UAAU;AAE7B,QAAM,eAAsC;AAAA,IAC1C,OAAO;AAAA,MACL;AAAA,QACE,KAAK;AAAA,QACL,OACE,6CAAC,qBAAM,MAAM,GACX;AAAA,sDAAC,+BAAe;AAAA,UAChB,4CAAC,UAAK,kBAAI;AAAA,WACZ;AAAA,QAEF,SAAS,MAAM;AAAA,QAAC;AAAA,MAClB;AAAA,IACF;AAAA,EACF;AACA,SACE;AAAA,IAAC;AAAA;AAAA,MACC,OAAK;AAAA,MACL,WAAU;AAAA,MACV,kBAAkB,OAAO;AAAA,MACzB,MAAM;AAAA,MAEN,uDAAC,qBAAM,MAAM,GAAG,OAAM,UACpB;AAAA,oDAAC,sBAAO,WAAW,OAAO,iBAAiB,eAAC;AAAA,QAC5C,4CAAC,UAAK,mBAAK;AAAA,SACb;AAAA;AAAA,EACF;AAEJ;",
6
- "names": []
7
- }
@@ -1 +0,0 @@
1
- export declare const HeaderContent: () => import("react/jsx-runtime").JSX.Element;
@@ -1,49 +0,0 @@
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/HeaderContent/index.tsx
20
- var HeaderContent_exports = {};
21
- __export(HeaderContent_exports, {
22
- HeaderContent: () => HeaderContent
23
- });
24
- module.exports = __toCommonJS(HeaderContent_exports);
25
- var import_antd = require("antd");
26
- var import_antd_style = require("antd-style");
27
- var import_FullScreen = require("./FullScreen");
28
- var import_UserInfo = require("./UserInfo");
29
- var import_jsx_runtime = require("react/jsx-runtime");
30
- var useStyles = (0, import_antd_style.createStyles)(({}) => ({
31
- dividerContainer: {
32
- backgroundColor: "#9b9999"
33
- }
34
- }));
35
- var HeaderContent = () => {
36
- const { styles } = useStyles();
37
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_antd.Flex, { justify: "space-between", children: [
38
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {}),
39
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_antd.Space, { split: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_antd.Divider, { type: "vertical", className: styles.dividerContainer }), children: [
40
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_FullScreen.FullScreen, {}),
41
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_UserInfo.UserInfo, {})
42
- ] })
43
- ] });
44
- };
45
- // Annotate the CommonJS export names for ESM import in node:
46
- 0 && (module.exports = {
47
- HeaderContent
48
- });
49
- //# sourceMappingURL=index.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/creek-layout/HeaderContent/index.tsx"],
4
- "sourcesContent": ["import { Divider, Flex, Space } from 'antd';\nimport { createStyles } from 'antd-style';\n\nimport { FullScreen } from './FullScreen';\nimport { UserInfo } from './UserInfo';\n\nconst useStyles = createStyles(({}) => ({\n dividerContainer: {\n backgroundColor: '#9b9999',\n },\n}));\n\nexport const HeaderContent = () => {\n const { styles } = useStyles();\n return (\n <Flex justify=\"space-between\">\n <span />\n <Space split={<Divider type=\"vertical\" className={styles.dividerContainer} />}>\n <FullScreen />\n <UserInfo />\n </Space>\n </Flex>\n );\n};\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAqC;AACrC,wBAA6B;AAE7B,wBAA2B;AAC3B,sBAAyB;AAYnB;AAVN,IAAM,gBAAY,gCAAa,CAAC,CAAC,OAAO;AAAA,EACtC,kBAAkB;AAAA,IAChB,iBAAiB;AAAA,EACnB;AACF,EAAE;AAEK,IAAM,gBAAgB,MAAM;AACjC,QAAM,EAAE,OAAO,IAAI,UAAU;AAC7B,SACE,6CAAC,oBAAK,SAAQ,iBACZ;AAAA,gDAAC,UAAK;AAAA,IACN,6CAAC,qBAAM,OAAO,4CAAC,uBAAQ,MAAK,YAAW,WAAW,OAAO,kBAAkB,GACzE;AAAA,kDAAC,gCAAW;AAAA,MACZ,4CAAC,4BAAS;AAAA,OACZ;AAAA,KACF;AAEJ;",
6
- "names": []
7
- }
@@ -1,24 +0,0 @@
1
- import { Divider, Flex, Space } from 'antd';
2
- import { createStyles } from 'antd-style';
3
-
4
- import { FullScreen } from './FullScreen';
5
- import { UserInfo } from './UserInfo';
6
-
7
- const useStyles = createStyles(({}) => ({
8
- dividerContainer: {
9
- backgroundColor: '#9b9999',
10
- },
11
- }));
12
-
13
- export const HeaderContent = () => {
14
- const { styles } = useStyles();
15
- return (
16
- <Flex justify="space-between">
17
- <span />
18
- <Space split={<Divider type="vertical" className={styles.dividerContainer} />}>
19
- <FullScreen />
20
- <UserInfo />
21
- </Space>
22
- </Flex>
23
- );
24
- };