bhd-components 0.7.18 → 0.7.20

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,5 +1,5 @@
1
- import { z as zhCN, C as ConfigProvider, _ as _extends, a as _object_destructuring_empty, j as jsx, b as _object_spread_props, S as StyleProvider, t as transform, c as _object_spread, d as _sliced_to_array, T as Tooltip, e as Table$2, I as Icon, f as jsxs, m as message, E as ExclamationCircleFilled, P as Pagination, g as Select, h as CaretDownOutlined, M as Modal, i as _inherits, k as _create_super, l as _create_class, n as _class_call_check, o as _define_property, p as _assert_this_initialized, q as _async_to_generator, L as LeftOutlined, R as RightOutlined, r as MinusOutlined, s as PlusOutlined, u as __generator, v as Input, w as SearchOutlined, x as CloseOutlined, X, y as I, H, A as Remarkable, D as Drawer, B as HighlightJS, Z as ZoomInOutlined, F as _to_consumable_array } from './1a6b9ecf.esm.es5.development.js';
2
- export { G as Affix, J as Alert, K as Anchor, aF as App, N as AutoComplete, O as Avatar, U as BackTop, V as Badge, W as Breadcrumb, Y as Button, $ as Calendar, a0 as Card, a1 as Carousel, a2 as Cascader, a3 as Checkbox, a4 as Col, a5 as Collapse, a6 as DatePicker, a7 as Descriptions, a8 as Divider, D as Drawer, a9 as Dropdown, aa as Empty, Q as FloatButton, ab as Form, ac as Grid, ad as Image, v as Input, ae as InputNumber, af as Layout, ag as List, ah as Mentions, ai as Menu, M as Modal, ak as Popconfirm, al as Popover, am as Progress, aM as QRCode, an as Radio, ao as Rate, ap as Result, aq as Row, ar as Segmented, g as Select, as as Skeleton, at as Slider, au as Space, av as Spin, aw as Statistic, ax as Steps, ay as Switch, az as Tabs, aA as Tag, aC as TimePicker, aD as Timeline, T as Tooltip, aE as Tour, aG as Transfer, aH as Tree, aI as TreeSelect, aJ as Typography, aK as Upload, aL as Watermark, aO as en_US, aj as notification, aB as theme, aN as version, z as zh_CN } from './1a6b9ecf.esm.es5.development.js';
1
+ import { z as zhCN, C as ConfigProvider, _ as _extends, a as _object_destructuring_empty, j as jsx, b as _object_spread_props, S as StyleProvider, t as transform, c as _object_spread, d as _sliced_to_array, T as Tooltip, e as Table$2, I as Icon, f as jsxs, m as message, E as ExclamationCircleFilled, P as Pagination, g as Select, h as CaretDownOutlined, M as Modal, i as _inherits, k as _create_super, l as _create_class, n as _class_call_check, o as _define_property, p as _assert_this_initialized, q as _async_to_generator, L as LeftOutlined, R as RightOutlined, r as MinusOutlined, s as PlusOutlined, u as __generator, v as Input, w as SearchOutlined, x as CloseOutlined, X, y as I, H, A as Remarkable, D as Drawer, B as HighlightJS, Z as ZoomInOutlined, F as _to_consumable_array } from './519bd9ca.esm.es5.development.js';
2
+ export { G as Affix, J as Alert, K as Anchor, aF as App, N as AutoComplete, O as Avatar, U as BackTop, V as Badge, W as Breadcrumb, Y as Button, $ as Calendar, a0 as Card, a1 as Carousel, a2 as Cascader, a3 as Checkbox, a4 as Col, a5 as Collapse, a6 as DatePicker, a7 as Descriptions, a8 as Divider, D as Drawer, a9 as Dropdown, aa as Empty, Q as FloatButton, ab as Form, ac as Grid, ad as Image, v as Input, ae as InputNumber, af as Layout, ag as List, ah as Mentions, ai as Menu, M as Modal, ak as Popconfirm, al as Popover, am as Progress, aM as QRCode, an as Radio, ao as Rate, ap as Result, aq as Row, ar as Segmented, g as Select, as as Skeleton, at as Slider, au as Space, av as Spin, aw as Statistic, ax as Steps, ay as Switch, az as Tabs, aA as Tag, aC as TimePicker, aD as Timeline, T as Tooltip, aE as Tour, aG as Transfer, aH as Tree, aI as TreeSelect, aJ as Typography, aK as Upload, aL as Watermark, aO as en_US, aj as notification, aB as theme, aN as version, z as zh_CN } from './519bd9ca.esm.es5.development.js';
3
3
  import * as React from 'react';
4
4
  import { useState, useRef, useEffect, useLayoutEffect, forwardRef, useImperativeHandle } from 'react';
5
5
  import { Fragment } from 'react/jsx-runtime';
@@ -4424,10 +4424,10 @@ var CustomerService = function(props) {
4424
4424
  var watchTime = params.videoProgress;
4425
4425
  var courseId = getQuery("yc_id");
4426
4426
  var sectionId = params.VideoBriefSummaryId;
4427
- // let courseId="31007",
4428
- // sectionId= "446168",
4429
- // videoId= "71399",
4430
- // watchTime= 527
4427
+ // let courseId="20899",
4428
+ // sectionId= "462368",
4429
+ // videoId= "29832",
4430
+ // watchTime= 753
4431
4431
  if (videoId && courseId && sectionId) {
4432
4432
  http.post("".concat(urllocation, "/chat-service/public/v1.0/knowledge-base/questions:recommend"), {
4433
4433
  "recommendedQuestions": [],
@@ -4447,16 +4447,26 @@ var CustomerService = function(props) {
4447
4447
  var questionsList = null;
4448
4448
  if (data.length > 0) {
4449
4449
  questionsList = data.map(function(item, index) {
4450
- return {
4451
- key: "messageSource",
4452
- value: item.id,
4453
- question: item.question,
4454
- answer: item.answer
4455
- };
4450
+ if (userData.modules.some(function(item) {
4451
+ return item.short == "AIservice";
4452
+ }) || item.answer) {
4453
+ return {
4454
+ key: "messageSource",
4455
+ value: item.id,
4456
+ question: item.question,
4457
+ answer: item.answer
4458
+ };
4459
+ } else {
4460
+ return null;
4461
+ }
4462
+ });
4463
+ questionsList = questionsList.filter(function(i) {
4464
+ return i != null;
4456
4465
  });
4457
4466
  recommendeQuestionID.current = data.map(function(item) {
4458
4467
  return item.id;
4459
4468
  });
4469
+ console.log(recommendeQuestionID.current, 4444444);
4460
4470
  }
4461
4471
  console.log("dflkvmdfklvdf欢迎语", data);
4462
4472
  var obj = {
@@ -7151,19 +7161,25 @@ var CustomerService = function(props) {
7151
7161
  return "<span class=".concat(styles.sign, ">").concat(i, "</span>");
7152
7162
  });
7153
7163
  }
7154
- return /*#__PURE__*/ jsx("p", {
7155
- className: styles.item,
7156
- children: /*#__PURE__*/ jsx("span", {
7157
- onClick: function() {
7158
- sendMessage(item, 2, "AssociativeProblem");
7159
- setKeyWord("");
7160
- onEvent(serverName + serverUrl(), "click_智能问答_ 发送", "提交");
7161
- },
7162
- dangerouslySetInnerHTML: {
7163
- __html: span
7164
- }
7165
- })
7166
- });
7164
+ if (userData.modules.some(function(item) {
7165
+ return item.short == "AIservice";
7166
+ }) || item.answer) {
7167
+ return /*#__PURE__*/ jsx("p", {
7168
+ className: styles.item,
7169
+ children: /*#__PURE__*/ jsx("span", {
7170
+ onClick: function() {
7171
+ sendMessage(item, 2, "AssociativeProblem");
7172
+ setKeyWord("");
7173
+ onEvent(serverName + serverUrl(), "click_智能问答_ 发送", "提交");
7174
+ },
7175
+ dangerouslySetInnerHTML: {
7176
+ __html: span
7177
+ }
7178
+ })
7179
+ });
7180
+ } else {
7181
+ return null;
7182
+ }
7167
7183
  })
7168
7184
  });
7169
7185
  }
@@ -7175,21 +7191,27 @@ var CustomerService = function(props) {
7175
7191
  className: styles.issues_list_flag,
7176
7192
  id: "BottomAssociationProblem",
7177
7193
  children: bottomRecommendationQuestions.map(function(item) {
7178
- return /*#__PURE__*/ jsxs(Fragment, {
7179
- children: [
7180
- /*#__PURE__*/ jsx("p", {
7181
- onClick: function() {
7182
- sendMessage(item, 1);
7183
- if (config && config.type == "video") {
7184
- setBottomRecommendationQuestions([]);
7185
- resettingBottomHei();
7186
- }
7187
- },
7188
- children: item.question
7189
- }, item.id),
7190
- /*#__PURE__*/ jsx("br", {})
7191
- ]
7192
- });
7194
+ if (userData.modules.some(function(item) {
7195
+ return item.short == "AIservice";
7196
+ }) || item.answer) {
7197
+ return /*#__PURE__*/ jsxs(Fragment, {
7198
+ children: [
7199
+ /*#__PURE__*/ jsx("p", {
7200
+ onClick: function() {
7201
+ sendMessage(item, 1);
7202
+ if (config && config.type == "video") {
7203
+ setBottomRecommendationQuestions([]);
7204
+ resettingBottomHei();
7205
+ }
7206
+ },
7207
+ children: item.question
7208
+ }, item.id),
7209
+ /*#__PURE__*/ jsx("br", {})
7210
+ ]
7211
+ });
7212
+ } else {
7213
+ return null;
7214
+ }
7193
7215
  })
7194
7216
  });
7195
7217
  } else {
@@ -7197,21 +7219,27 @@ var CustomerService = function(props) {
7197
7219
  className: styles.issues_list_flag,
7198
7220
  id: "BottomAssociationProblem_modal",
7199
7221
  children: bottomRecommendationQuestions.map(function(item) {
7200
- return /*#__PURE__*/ jsxs(Fragment, {
7201
- children: [
7202
- /*#__PURE__*/ jsx("p", {
7203
- onClick: function() {
7204
- sendMessage(item, 1);
7205
- if (config && config.type == "video") {
7206
- setBottomRecommendationQuestions([]);
7207
- resettingBottomHei();
7208
- }
7209
- },
7210
- children: item.question
7211
- }, item.id),
7212
- /*#__PURE__*/ jsx("br", {})
7213
- ]
7214
- });
7222
+ if (userData.modules.some(function(item) {
7223
+ return item.short == "AIservice";
7224
+ }) || item.answer) {
7225
+ return /*#__PURE__*/ jsxs(Fragment, {
7226
+ children: [
7227
+ /*#__PURE__*/ jsx("p", {
7228
+ onClick: function() {
7229
+ sendMessage(item, 1);
7230
+ if (config && config.type == "video") {
7231
+ setBottomRecommendationQuestions([]);
7232
+ resettingBottomHei();
7233
+ }
7234
+ },
7235
+ children: item.question
7236
+ }, item.id),
7237
+ /*#__PURE__*/ jsx("br", {})
7238
+ ]
7239
+ });
7240
+ } else {
7241
+ return null;
7242
+ }
7215
7243
  })
7216
7244
  });
7217
7245
  }