@yuntijs/ui 1.0.0-beta.106 → 1.0.0-beta.108

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.
@@ -2,7 +2,7 @@
2
2
 
3
3
  import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
4
4
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
5
- var _excluded = ["avatarAddon", "onAvatarClick", "avatarProps", "actions", "className", "primary", "loading", "message", "placement", "type", "avatar", "error", "showTitle", "time", "editing", "onChange", "onEditingChange", "messageExtra", "renderMessage", "text", "errorMessage", "onDoubleClick", "fontSize", "markdownProps", "markdownClassname", "isLatest"];
5
+ var _excluded = ["avatarAddon", "onAvatarClick", "avatarProps", "actions", "className", "primary", "loading", "message", "placement", "type", "avatar", "error", "showTitle", "time", "editing", "onChange", "onEditingChange", "messageExtra", "affixation", "renderMessage", "text", "errorMessage", "onDoubleClick", "fontSize", "markdownProps", "markdownClassname", "isLatest"];
6
6
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
7
7
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
8
8
  import Avatar from '@lobehub/ui/es/chat/ChatItem/components/Avatar';
@@ -39,6 +39,7 @@ export var ChatItem = /*#__PURE__*/memo(function (_ref) {
39
39
  onChange = _ref.onChange,
40
40
  onEditingChange = _ref.onEditingChange,
41
41
  messageExtra = _ref.messageExtra,
42
+ affixation = _ref.affixation,
42
43
  renderMessage = _ref.renderMessage,
43
44
  text = _ref.text,
44
45
  errorMessage = _ref.errorMessage,
@@ -106,7 +107,10 @@ export var ChatItem = /*#__PURE__*/memo(function (_ref) {
106
107
  renderMessage: renderMessage,
107
108
  text: text,
108
109
  type: type
109
- }), /*#__PURE__*/_jsx(Actions, {
110
+ }), affixation ? /*#__PURE__*/_jsx("div", {
111
+ className: "affixation",
112
+ children: affixation
113
+ }) : null, /*#__PURE__*/_jsx(Actions, {
110
114
  actions: actions,
111
115
  editing: editing,
112
116
  placement: placement,
@@ -35,6 +35,7 @@ export interface ChatItemProps {
35
35
  */
36
36
  message?: ReactNode;
37
37
  messageExtra?: ReactNode;
38
+ affixation?: ReactNode;
38
39
  onAvatarClick?: () => void;
39
40
  /**
40
41
  * @description Callback when the message content changes
@@ -2,6 +2,9 @@ import { type FormListOperation } from 'antd';
2
2
  import React from 'react';
3
3
  import type { FormCollapseListColumn } from '.';
4
4
  import { ListFieldValue } from './utils';
5
+ export interface FormCollapseListOperation extends FormListOperation {
6
+ update: () => void;
7
+ }
5
8
  export declare const useFormCollapseListHooks: (name: string, childrenColumnName: string, columns: FormCollapseListColumn[]) => {
6
9
  values: ListFieldValue[];
7
10
  updateValues: () => void;
@@ -12,6 +15,6 @@ export declare const useFormCollapseListHooks: (name: string, childrenColumnName
12
15
  allExpandRowKeys: React.Key[];
13
16
  };
14
17
  getFieldPath: (fieldKeyPath: number[], fieldName?: string) => any;
15
- getFormListOperation: (operation: FormListOperation, record: ListFieldValue) => FormListOperation;
18
+ getFormListOperation: (operation: FormListOperation, record: ListFieldValue) => FormCollapseListOperation;
16
19
  firstColumnFormItemName: any;
17
20
  };
@@ -138,6 +138,9 @@ export var useFormCollapseListHooks = function useFormCollapseListHooks(name, ch
138
138
  fieldValue[to] = _ref[1];
139
139
  form.setFieldValue(fieldName, fieldValue);
140
140
  updateValues();
141
+ },
142
+ update: function update() {
143
+ return updateValues();
141
144
  }
142
145
  };
143
146
  }, [childrenColumnName, expandedRowKeys, firstColumnFormItemName, form, getFieldPath, name, updateValues]);
@@ -1,10 +1,11 @@
1
- import type { FormItemProps, FormListOperation, TableColumnProps } from 'antd';
1
+ import type { FormItemProps, TableColumnProps } from 'antd';
2
2
  import type { FormListProps as AntFormListProps } from 'antd/es/form';
3
3
  import React from 'react';
4
4
  import { CollapseGroupProps } from '../../CollapseGroup';
5
+ import { FormCollapseListOperation } from './hooks';
5
6
  import { FieldPath } from './utils';
6
7
  interface FormCollapseListColumnItem extends Omit<FormItemProps, 'dependencies' | 'rules' | 'tooltip' | 'labelAlign' | 'labelCol' | 'colon' | 'children'> {
7
- render?: (fieldName: number, index: number, operation: FormListOperation,
8
+ render?: (fieldName: number, index: number, operation: FormCollapseListOperation,
8
9
  /** 当前 item 的 path */
9
10
  fieldPath: FieldPath) => React.ReactElement;
10
11
  rules?: FormItemProps['rules'] | ((parentFieldPath: FieldPath, index: number) => FormItemProps['rules']);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yuntijs/ui",
3
- "version": "1.0.0-beta.106",
3
+ "version": "1.0.0-beta.108",
4
4
  "description": "☁️ Yunti UI - an open-source UI component library for building Cloud Native web apps",
5
5
  "keywords": [
6
6
  "yuntijs",