@blocklet/pages-kit 0.2.385 → 0.2.386

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.
@@ -211,7 +211,7 @@ function ShareCommunity({ inputs, shareAttach, }) {
211
211
  const images = (_j = (_h = (_g = (_f = (_e = message.outputs) === null || _e === void 0 ? void 0 : _e.objects) === null || _f === void 0 ? void 0 : _f.find) === null || _g === void 0 ? void 0 : _g.call(_f, (i) => { var _a; return (_a = i === null || i === void 0 ? void 0 : i[types_1.RuntimeOutputVariable.images]) === null || _a === void 0 ? void 0 : _a.length; })) === null || _h === void 0 ? void 0 : _h[types_1.RuntimeOutputVariable.images]) === null || _j === void 0 ? void 0 : _j.map((i) => i.url);
212
212
  let content = '';
213
213
  if (shareAttach.shareAttachUrl) {
214
- content += `${link}\n\n`;
214
+ content += `[[]](${link})\n\n`;
215
215
  }
216
216
  if (shareAttach.shareAttachInputs) {
217
217
  content += `> ${inputs}\n\n`;
@@ -225,6 +225,7 @@ function ShareCommunity({ inputs, shareAttach, }) {
225
225
  format: 'markdown',
226
226
  title: `${((_k = message.inputs) === null || _k === void 0 ? void 0 : _k.question) || inputs}`,
227
227
  content,
228
+ labels: 'demo',
228
229
  };
229
230
  }, [inputs, shareAttach]);
230
231
  return ((0, jsx_runtime_1.jsx)(StyledActionButton, { tip: t('socialShare.shareToCommunity'), title: (0, jsx_runtime_1.jsx)(Community_1.default, {}), target: "_blank", href: (0, ufo_1.withQuery)('https://community.arcblock.io/discussions/add?', query) }));
@@ -1,4 +1,27 @@
1
1
  "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
2
25
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
26
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
27
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -16,7 +39,7 @@ exports.default = GoogleSearchRelatedView;
16
39
  const jsx_runtime_1 = require("react/jsx-runtime");
17
40
  const material_1 = require("@mui/material");
18
41
  const joi_1 = __importDefault(require("joi"));
19
- const react_1 = require("react");
42
+ const react_1 = __importStar(require("react"));
20
43
  const OutputFieldContainer_1 = __importDefault(require("../../components/OutputFieldContainer"));
21
44
  const CurrentAgent_1 = require("../../contexts/CurrentAgent");
22
45
  const CurrentMessage_1 = require("../../contexts/CurrentMessage");
@@ -48,7 +71,7 @@ function GoogleSearchRelatedView({ output, outputValue, onlyLastMessage, }) {
48
71
  return null;
49
72
  if ((!isLastMessage && onlyLastMessage) || !((_b = result === null || result === void 0 ? void 0 : result.related_questions) === null || _b === void 0 ? void 0 : _b.length))
50
73
  return null;
51
- return ((0, jsx_runtime_1.jsx)(OutputFieldContainer_1.default, { output: output, children: (0, jsx_runtime_1.jsx)(material_1.List, { dense: true, disablePadding: true, children: result.related_questions.map((item) => ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.ListItemButton, { sx: { py: 1, px: 2 }, onClick: () => __awaiter(this, void 0, void 0, function* () {
74
+ return ((0, jsx_runtime_1.jsx)(OutputFieldContainer_1.default, { output: output, children: (0, jsx_runtime_1.jsx)(material_1.List, { dense: true, disablePadding: true, children: result.related_questions.map((item) => ((0, jsx_runtime_1.jsxs)(react_1.default.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.ListItemButton, { sx: { py: 1, px: 2 }, onClick: () => __awaiter(this, void 0, void 0, function* () {
52
75
  if (submitting)
53
76
  return;
54
77
  setSubmitting(true);
@@ -58,5 +81,5 @@ function GoogleSearchRelatedView({ output, outputValue, onlyLastMessage, }) {
58
81
  finally {
59
82
  setSubmitting(false);
60
83
  }
61
- }), children: item.question }, item.title), (0, jsx_runtime_1.jsx)(material_1.Divider, {})] }))) }) }));
84
+ }), children: item.question }), (0, jsx_runtime_1.jsx)(material_1.Divider, {})] }, item.title))) }) }));
62
85
  }