hzerojs-plugin-yqcloud-jssdk 1.0.24 → 1.0.25

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.
@@ -1,7 +1,7 @@
1
- import React from 'react';
2
-
3
- const TestLayoutHeaderExtra = () => {
4
- return <div style={{color: '#fff', border: '1px solid red'}}>testLayoutHeaderExtra</div>
5
- }
6
-
7
- export default TestLayoutHeaderExtra;
1
+ import React from 'react';
2
+
3
+ const TestLayoutHeaderExtra = () => {
4
+ return <div style={{color: '#fff', border: '1px solid red'}}>testLayoutHeaderExtra</div>
5
+ }
6
+
7
+ export default TestLayoutHeaderExtra;
@@ -1,61 +1,61 @@
1
- // @ts-ignore
2
- import { useModel } from 'umi';
3
- import React, { useMemo } from 'react';
4
- import { Layout } from 'choerodon-ui';
5
- // import { useLayoutController } from '@hzerojs/plugin-layout/lib/clients/HzeroLayout/hooks';
6
- // @ts-ignore
7
- import layoutCommonStyles from './styles.less';
8
- // import { Mode } from '../../../src';
9
-
10
- export interface HorizontalLayoutProps {
11
- children: JSX.Element;
12
- /** 完整路由表 */
13
- // routes: IRoute[];
14
- /** 当前层级路由表 */
15
- // route: IRoute;
16
- }
17
-
18
- export default function HorizontalLayout(props: HorizontalLayoutProps) {
19
- const { children } = props;
20
-
21
- const layoutController = useModel('hzeroLayout');
22
-
23
- const routes = useMemo(() => layoutController.getRoutes(), [
24
- layoutController.routerData,
25
- ]);
26
-
27
- return (
28
- <Layout style={{ height: '100vh' }}>
29
- <Layout.Sider width={220}>
30
- <Layout>
31
- <Layout.Header
32
- className={layoutCommonStyles['layout-header']}
33
- style={{ padding: '0' }}
34
- >
35
- <h2 style={{ height: '100%', color: '#fff' }}>
36
- 🚀 hzerojs3 horizontal 布局
37
- </h2>
38
- </Layout.Header>
39
- <Layout.Content className={layoutCommonStyles['layout-content']}>
40
- <div style={{ height: '100%', overflowY: 'scroll' }}>
41
- 路由菜单组件
42
- </div>
43
- </Layout.Content>
44
- </Layout>
45
- </Layout.Sider>
46
- <Layout.Content style={{ zIndex: 1 }}>
47
- <Layout>
48
- <Layout.Header
49
- className={layoutCommonStyles['layout-header']}
50
- style={{ color: '#fff', padding: '0' }}
51
- >
52
- header
53
- </Layout.Header>
54
- <Layout.Content className={layoutCommonStyles['layout-content']}>
55
- {children}
56
- </Layout.Content>
57
- </Layout>
58
- </Layout.Content>
59
- </Layout>
60
- );
61
- }
1
+ // @ts-ignore
2
+ import { useModel } from 'umi';
3
+ import React, { useMemo } from 'react';
4
+ import { Layout } from 'choerodon-ui';
5
+ // import { useLayoutController } from '@hzerojs/plugin-layout/lib/clients/HzeroLayout/hooks';
6
+ // @ts-ignore
7
+ import layoutCommonStyles from './styles.less';
8
+ // import { Mode } from '../../../src';
9
+
10
+ export interface HorizontalLayoutProps {
11
+ children: JSX.Element;
12
+ /** 完整路由表 */
13
+ // routes: IRoute[];
14
+ /** 当前层级路由表 */
15
+ // route: IRoute;
16
+ }
17
+
18
+ export default function HorizontalLayout(props: HorizontalLayoutProps) {
19
+ const { children } = props;
20
+
21
+ const layoutController = useModel('hzeroLayout');
22
+
23
+ const routes = useMemo(() => layoutController.getRoutes(), [
24
+ layoutController.routerData,
25
+ ]);
26
+
27
+ return (
28
+ <Layout style={{ height: '100vh' }}>
29
+ <Layout.Sider width={220}>
30
+ <Layout>
31
+ <Layout.Header
32
+ className={layoutCommonStyles['layout-header']}
33
+ style={{ padding: '0' }}
34
+ >
35
+ <h2 style={{ height: '100%', color: '#fff' }}>
36
+ 🚀 hzerojs3 horizontal 布局
37
+ </h2>
38
+ </Layout.Header>
39
+ <Layout.Content className={layoutCommonStyles['layout-content']}>
40
+ <div style={{ height: '100%', overflowY: 'scroll' }}>
41
+ 路由菜单组件
42
+ </div>
43
+ </Layout.Content>
44
+ </Layout>
45
+ </Layout.Sider>
46
+ <Layout.Content style={{ zIndex: 1 }}>
47
+ <Layout>
48
+ <Layout.Header
49
+ className={layoutCommonStyles['layout-header']}
50
+ style={{ color: '#fff', padding: '0' }}
51
+ >
52
+ header
53
+ </Layout.Header>
54
+ <Layout.Content className={layoutCommonStyles['layout-content']}>
55
+ {children}
56
+ </Layout.Content>
57
+ </Layout>
58
+ </Layout.Content>
59
+ </Layout>
60
+ );
61
+ }
@@ -1,14 +1,14 @@
1
-
2
- .layout-content {
3
- height: calc(100vh - 48px);
4
- background-color: #f0f2f5;
5
- overflow-x: visible;
6
- // overflow-y: visible;
7
- // z-index: 0;
8
- // overflow-x: hidden;
9
- }
10
-
11
- .layout-header {
12
- height: 48px;
13
- line-height: 48px;
14
- }
1
+
2
+ .layout-content {
3
+ height: calc(100vh - 48px);
4
+ background-color: #f0f2f5;
5
+ overflow-x: visible;
6
+ // overflow-y: visible;
7
+ // z-index: 0;
8
+ // overflow-x: hidden;
9
+ }
10
+
11
+ .layout-header {
12
+ height: 48px;
13
+ line-height: 48px;
14
+ }
@@ -1,7 +1,7 @@
1
- import React from 'react';
2
-
3
- const TestPage2 = () => {
4
- return <div>TestPage2</div>
5
- }
6
-
1
+ import React from 'react';
2
+
3
+ const TestPage2 = () => {
4
+ return <div>TestPage2</div>
5
+ }
6
+
7
7
  export default TestPage2;
package/lib/index.css CHANGED
@@ -1,14 +1,14 @@
1
- .yqcloud-hzero-jssdk-popover .c7n-popover-inner-content{
2
- padding: 0;
3
- }
4
- .yq-hzero-jssdk-btn:hover {
5
- color: #0840f8;
6
- }
7
- .yq-hzero-jssdk-btn {
8
- font-size: 13px;
9
- color: #0f1358;
10
- cursor: pointer;
11
- }
12
- .yqcloud-hzero-jssdk-popover.c7n-popover.c7n-popover .c7n-popover-content .c7n-popover-inner .c7n-popover-inner-content {
13
- padding: 0;
14
- }
1
+ .yqcloud-hzero-jssdk-popover .c7n-popover-inner-content{
2
+ padding: 0;
3
+ }
4
+ .yq-hzero-jssdk-btn:hover {
5
+ color: #0840f8;
6
+ }
7
+ .yq-hzero-jssdk-btn {
8
+ font-size: 13px;
9
+ color: #0f1358;
10
+ cursor: pointer;
11
+ }
12
+ .yqcloud-hzero-jssdk-popover.c7n-popover.c7n-popover .c7n-popover-content .c7n-popover-inner .c7n-popover-inner-content {
13
+ padding: 0;
14
+ }
package/lib/index.js CHANGED
@@ -33,8 +33,9 @@ __export(src_exports, {
33
33
  });
34
34
  module.exports = __toCommonJS(src_exports);
35
35
  var import_react = __toESM(require("react"));
36
- var import_pro = require("choerodon-ui/pro");
37
- var import_choerodon_ui = require("choerodon-ui");
36
+ var import_modal = __toESM(require("choerodon-ui/pro/lib/modal"));
37
+ var import_menu = __toESM(require("choerodon-ui/pro/lib/menu"));
38
+ var import_popover = __toESM(require("choerodon-ui/lib/popover"));
38
39
  var import_axios = __toESM(require("axios"));
39
40
  var import_index = require("./index.css");
40
41
  var YQ_API_HOST = "https://api.test.yqcloud.com";
@@ -126,7 +127,7 @@ var src_default = (props) => {
126
127
  if (fieldData) {
127
128
  urlParam = `&fieldData=${fieldData}${authParam}`;
128
129
  }
129
- const modal = import_pro.Modal.open({
130
+ const modal = import_modal.default.open({
130
131
  maskClosable: true,
131
132
  bodyStyle: {
132
133
  width: "100%",
@@ -161,9 +162,9 @@ var src_default = (props) => {
161
162
  function defaultIcon() {
162
163
  return /* @__PURE__ */ import_react.default.createElement("div", { type: "picture", style: { width: 18, height: 18, marginRight: 10, display: "inline-block" } });
163
164
  }
164
- const menu = /* @__PURE__ */ import_react.default.createElement(import_pro.Menu, null, (_a = appConfig == null ? void 0 : appConfig.openFunctions) == null ? void 0 : _a.map((openFunction) => {
165
+ const menu = /* @__PURE__ */ import_react.default.createElement(import_menu.default, null, (_a = appConfig == null ? void 0 : appConfig.openFunctions) == null ? void 0 : _a.map((openFunction) => {
165
166
  if (openFunction.enabledFlag) {
166
- return /* @__PURE__ */ import_react.default.createElement(import_pro.Menu.Item, { onClick: () => openModal(openFunction), key: openFunction.id }, openFunction.icon ? /* @__PURE__ */ import_react.default.createElement(
167
+ return /* @__PURE__ */ import_react.default.createElement(import_menu.default.Item, { onClick: () => openModal(openFunction), key: openFunction.id }, openFunction.icon ? /* @__PURE__ */ import_react.default.createElement(
167
168
  "img",
168
169
  {
169
170
  style: { width: 18, height: 18, marginRight: 10 },
@@ -175,5 +176,5 @@ var src_default = (props) => {
175
176
  return null;
176
177
  }));
177
178
  const onlyOneButton = /* @__PURE__ */ import_react.default.createElement("div", { className: "yq-hzero-jssdk-btn", style: { padding: 0 }, onClick: () => openModal(appConfig == null ? void 0 : appConfig.openFunctions[0]) }, appConfig.icon ? /* @__PURE__ */ import_react.default.createElement("img", { style: { width: 18, height: 18, marginRight: 10 }, src: `${apiHost}/hfle/yqc/v1/0/files/public/download-by-key?fileKey=${appConfig.icon}`, alt: "" }) : /* @__PURE__ */ import_react.default.createElement("div", { type: "picture", style: { width: 18, height: 18, marginRight: 10, display: "inline-block" } }), (entryDetail == null ? void 0 : entryDetail.entryName) || (appConfig == null ? void 0 : appConfig.displayName) || (appConfig == null ? void 0 : appConfig.name));
178
- return /* @__PURE__ */ import_react.default.createElement("div", { className: "yqcloud-hzero-jssdk", ref: eleRef }, ((_b = appConfig == null ? void 0 : appConfig.openFunctions) == null ? void 0 : _b.length) === 1 ? onlyOneButton : /* @__PURE__ */ import_react.default.createElement(import_choerodon_ui.Popover, { overlayClassName: "yqcloud-hzero-jssdk-popover", overlayStyle: { padding: 0 }, openClassName: "yqcloud-hzero-jssdk-popover", content: menu, placement: "left" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "yq-hzero-jssdk-btn", style: { padding: 0 } }, appConfig.icon ? /* @__PURE__ */ import_react.default.createElement("img", { style: { width: 18, height: 18, marginRight: 10 }, src: `${apiHost}/hfle/yqc/v1/0/files/public/download-by-key?fileKey=${appConfig.icon}`, alt: "" }) : /* @__PURE__ */ import_react.default.createElement("div", { type: "picture", style: { width: 18, height: 18, marginRight: 10, display: "inline-block" } }), (entryDetail == null ? void 0 : entryDetail.entryName) || (appConfig == null ? void 0 : appConfig.displayName) || (appConfig == null ? void 0 : appConfig.name))));
179
+ return /* @__PURE__ */ import_react.default.createElement("div", { className: "yqcloud-hzero-jssdk", ref: eleRef }, ((_b = appConfig == null ? void 0 : appConfig.openFunctions) == null ? void 0 : _b.length) === 1 ? onlyOneButton : /* @__PURE__ */ import_react.default.createElement(import_popover.default, { overlayClassName: "yqcloud-hzero-jssdk-popover", overlayStyle: { padding: 0 }, openClassName: "yqcloud-hzero-jssdk-popover", content: menu, placement: "left" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "yq-hzero-jssdk-btn", style: { padding: 0 } }, appConfig.icon ? /* @__PURE__ */ import_react.default.createElement("img", { style: { width: 18, height: 18, marginRight: 10 }, src: `${apiHost}/hfle/yqc/v1/0/files/public/download-by-key?fileKey=${appConfig.icon}`, alt: "" }) : /* @__PURE__ */ import_react.default.createElement("div", { type: "picture", style: { width: 18, height: 18, marginRight: 10, display: "inline-block" } }), (entryDetail == null ? void 0 : entryDetail.entryName) || (appConfig == null ? void 0 : appConfig.displayName) || (appConfig == null ? void 0 : appConfig.name))));
179
180
  };
package/package.json CHANGED
@@ -1,16 +1,16 @@
1
- {
2
- "name": "hzerojs-plugin-yqcloud-jssdk",
3
- "version": "1.0.24",
4
- "main": "lib/index.js",
5
- "license": "MIT",
6
- "scripts": {
7
- "build": "npx father build"
8
- },
9
- "peerDependencies": {
10
- "axios": "*"
11
- },
12
- "files": [
13
- "lib",
14
- "browsers"
15
- ]
16
- }
1
+ {
2
+ "name": "hzerojs-plugin-yqcloud-jssdk",
3
+ "version": "1.0.25",
4
+ "main": "lib/index.js",
5
+ "license": "MIT",
6
+ "scripts": {
7
+ "build": "npx father build"
8
+ },
9
+ "peerDependencies": {
10
+ "axios": "*"
11
+ },
12
+ "files": [
13
+ "lib",
14
+ "browsers"
15
+ ]
16
+ }