hzerojs-plugin-yqcloud-jssdk 1.0.11 → 1.0.13

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 (2) hide show
  1. package/lib/index.js +4 -5
  2. package/package.json +4 -1
package/lib/index.js CHANGED
@@ -38,7 +38,6 @@ var import_menu = __toESM(require("choerodon-ui/pro/es/menu"));
38
38
  var import_popover = __toESM(require("choerodon-ui/es/popover"));
39
39
  var import_axios = __toESM(require("axios"));
40
40
  var import_index = require("./index.css");
41
- var import_hzero_ui = require("hzero-ui");
42
41
  var YQ_API_HOST = "https://api.test.yqcloud.com";
43
42
  var src_default = (props) => {
44
43
  var _a, _b;
@@ -105,7 +104,7 @@ var src_default = (props) => {
105
104
  console.log("【YQCloud】:", jsonData.message);
106
105
  } else {
107
106
  const appConfig2 = JSON.parse(jsonData.jsonConfig);
108
- tenantIdRef.current = appConfig2.tenantId;
107
+ tenantIdRef.current = jsonData.tenantId;
109
108
  setAppConfig(appConfig2);
110
109
  console.log("【YQCloud】解析配置成功:", appConfig2);
111
110
  }
@@ -150,9 +149,9 @@ var src_default = (props) => {
150
149
  window.addEventListener("message", closeModal);
151
150
  };
152
151
  function defaultIcon() {
153
- return /* @__PURE__ */ import_react.default.createElement(import_hzero_ui.Icon, { type: "picture" });
152
+ return /* @__PURE__ */ import_react.default.createElement("div", { type: "picture", style: { width: 18, height: 18, marginRight: 10, display: "inline-block" } });
154
153
  }
155
154
  const menu = /* @__PURE__ */ import_react.default.createElement(import_menu.default, null, (_a = appConfig == null ? void 0 : appConfig.openFunctions) == null ? void 0 : _a.map((openFunction) => /* @__PURE__ */ import_react.default.createElement(import_menu.default.Item, { onClick: () => openModal(openFunction) }, openFunction.icon ? /* @__PURE__ */ import_react.default.createElement("img", { style: { width: 18, height: 18, marginRight: 10 }, src: `${apiHost}/hfle/yqc/v1/0/files/download-by-key?fileKey=${openFunction.icon}`, alt: "" }) : defaultIcon(), openFunction.displayName)));
156
- 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/download-by-key?fileKey=${appConfig.icon}`, alt: "" }) : /* @__PURE__ */ import_react.default.createElement(import_hzero_ui.Icon, { type: "picture", style: { width: 18, height: 18, marginRight: 10 } }), (entryDetail == null ? void 0 : entryDetail.entryName) || (appConfig == null ? void 0 : appConfig.displayName) || (appConfig == null ? void 0 : appConfig.name));
157
- 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/download-by-key?fileKey=${appConfig.icon}`, alt: "" }) : /* @__PURE__ */ import_react.default.createElement(import_hzero_ui.Icon, { type: "picture", style: { width: 18, height: 18, marginRight: 10 } }), (entryDetail == null ? void 0 : entryDetail.entryName) || (appConfig == null ? void 0 : appConfig.displayName) || (appConfig == null ? void 0 : appConfig.name))));
155
+ 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/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));
156
+ 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/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))));
158
157
  };
package/package.json CHANGED
@@ -1,11 +1,14 @@
1
1
  {
2
2
  "name": "hzerojs-plugin-yqcloud-jssdk",
3
- "version": "1.0.11",
3
+ "version": "1.0.13",
4
4
  "main": "lib/index.js",
5
5
  "license": "MIT",
6
6
  "scripts": {
7
7
  "build": "npx father build"
8
8
  },
9
+ "peerDependencies": {
10
+ "axios": "*"
11
+ },
9
12
  "dependencies": {
10
13
  "choerodon-ui": "^1.6.1-yqcloud-alpha.2",
11
14
  "react": "^16.14.0"