@flatbiz/antd 5.0.34 → 5.0.35
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.
- package/dist/_commonjsHelpers-B0GIDhER.js +33 -0
- package/dist/_commonjsHelpers-B0GIDhER.js.map +1 -0
- package/dist/ai-search/index.js +1 -1
- package/dist/{ai-search-DIVO-ryc.js → ai-search-WcG2oakE.js} +2 -2
- package/dist/{ai-search-DIVO-ryc.js.map → ai-search-WcG2oakE.js.map} +1 -1
- package/dist/dialog-drag-modal/index.js +2 -1
- package/dist/dialog-drag-modal/index.js.map +1 -1
- package/dist/drag-editable-card/index.d.ts +7 -4
- package/dist/drag-editable-card/index.js +7 -7
- package/dist/{drag-modal-hO3kzep4.js → drag-modal-DVq260Mc.js} +5 -33
- package/dist/{drag-modal-hO3kzep4.js.map → drag-modal-DVq260Mc.js.map} +1 -1
- package/dist/drawer-BI8T3w7e.js +257 -0
- package/dist/drawer-BI8T3w7e.js.map +1 -0
- package/dist/easy-form/index.d.ts +0 -4
- package/dist/easy-form/index.js +1 -1
- package/dist/easy-table/index.d.ts +0 -4
- package/dist/easy-table/index.js +1 -1
- package/dist/editable-card/index.d.ts +7 -4
- package/dist/editable-card/index.js +6 -6
- package/dist/{editable-card-DlqrwXa0.js → editable-card-BN9ViZz0.js} +69 -56
- package/dist/editable-card-BN9ViZz0.js.map +1 -0
- package/dist/{editable-card-eGAbYXAH.js → editable-card-BrnWDl8j.js} +2 -2
- package/dist/{editable-card-eGAbYXAH.js.map → editable-card-BrnWDl8j.js.map} +1 -1
- package/dist/{form-3qaPduiy.js → form-DNtjXzAW.js} +35 -36
- package/dist/form-DNtjXzAW.js.map +1 -0
- package/dist/index.d.ts +475 -447
- package/dist/index.js +9 -5
- package/dist/index.js.map +1 -1
- package/dist/resizable-drawer/index.css +1 -0
- package/dist/resizable-drawer/index.d.ts +29 -0
- package/dist/resizable-drawer/index.js +41 -0
- package/dist/resizable-drawer/index.js.map +1 -0
- package/package.json +10 -5
- package/dist/editable-card-DlqrwXa0.js.map +0 -1
- package/dist/form-3qaPduiy.js.map +0 -1
package/dist/index.js
CHANGED
|
@@ -91,6 +91,7 @@ import './pre-defined-class-name/index.css';
|
|
|
91
91
|
import './radio-group-wrapper/index.css';
|
|
92
92
|
import './relation-tree/index.css';
|
|
93
93
|
import './request-status/index.css';
|
|
94
|
+
import './resizable-drawer/index.css';
|
|
94
95
|
import './rich-text-editor/index.css';
|
|
95
96
|
import './rich-text-viewer/index.css';
|
|
96
97
|
import './roll-location-center/index.css';
|
|
@@ -139,7 +140,7 @@ export { A as AceEditorJava } from './editor-BBLseWzD.js';
|
|
|
139
140
|
export { A as AceEditorJson } from './editor-D-wv_4El.js';
|
|
140
141
|
export { A as AceEditorMysql } from './editor-_CPhhFJO.js';
|
|
141
142
|
export { A as AceEditorXml } from './editor-DU3q52Nx.js';
|
|
142
|
-
export { A as AiSearch } from './ai-search-
|
|
143
|
+
export { A as AiSearch } from './ai-search-WcG2oakE.js';
|
|
143
144
|
export { A as AlertWrapper } from './alert-gN_wp9C1.js';
|
|
144
145
|
export { A as AmountFenInput } from './amount-fen-input-DSueMlf8.js';
|
|
145
146
|
export { A as AmountFenInputFormItem } from './amount-fen-input-goqylrM3.js';
|
|
@@ -164,7 +165,7 @@ export { D as DateRangePickerWrapperFormItem } from './date-range-picker-wrapper
|
|
|
164
165
|
export { D as DeleteNode } from './delete-node-C6jwhyxz.js';
|
|
165
166
|
export { d as dialogAlert } from './dialog-alert-BJUJNVk3.js';
|
|
166
167
|
export { d as dialogConfirm } from './dialog-confirm-CagitgW9.js';
|
|
167
|
-
export { d as dialogDragModal } from './drag-modal-
|
|
168
|
+
export { d as dialogDragModal } from './drag-modal-DVq260Mc.js';
|
|
168
169
|
export { d as dialogDrawer } from './dialog-drawer-CTo7BS1O.js';
|
|
169
170
|
export { D as DialogDrawerContent } from './content-BrpRj7zk.js';
|
|
170
171
|
export { d as dialogLoading } from './dialog-loading-DWAkSW3k.js';
|
|
@@ -172,16 +173,16 @@ export { d as dialogModal } from './dialog-modal-Nyty6_h7.js';
|
|
|
172
173
|
export { d as dialogPreviewImage } from './preview-image-Dxw8Vx6a.js';
|
|
173
174
|
export { D as DragCollapse } from './drag-collapse-fR-vIpas.js';
|
|
174
175
|
export { D as DragCollapseFormList } from './drag-collapse-C9Ufwg8F.js';
|
|
175
|
-
export { D as DragEditableCard } from './editable-card-
|
|
176
|
+
export { D as DragEditableCard } from './editable-card-BrnWDl8j.js';
|
|
176
177
|
export { D as DragEditableTable } from './drag-CD2Oqu4S.js';
|
|
177
178
|
export { D as DragEditableTablePro } from './drag-Wzt5Qu0X.js';
|
|
178
179
|
export { D as DragFormList } from './drag-form-list-_DJotlyC.js';
|
|
179
180
|
export { D as DragTable } from './drag-table-CYRFOAYX.js';
|
|
180
181
|
export { D as DropdownMenuWrapper } from './dropdown-menu-wrapper-Dti5BObg.js';
|
|
181
182
|
export { d as dynamicNode } from './dynamic-node-B_An5owN.js';
|
|
182
|
-
export { E as EasyForm } from './form-
|
|
183
|
+
export { E as EasyForm } from './form-DNtjXzAW.js';
|
|
183
184
|
export { EasyTable } from './easy-table/index.js';
|
|
184
|
-
export { E as EditableCard } from './editable-card-
|
|
185
|
+
export { E as EditableCard } from './editable-card-BN9ViZz0.js';
|
|
185
186
|
export { E as EditableField } from './editable-field-CJrq0eiF.js';
|
|
186
187
|
export { E as EditableFieldProvider } from './editable-field-provider-DqKcZQYP.js';
|
|
187
188
|
export { E as EditableTable } from './editable-table-D2-osC9X.js';
|
|
@@ -226,6 +227,7 @@ export { preDefinedClassName } from './pre-defined-class-name/index.js';
|
|
|
226
227
|
export { R as RadioGroupWrapper } from './radio-group-wrapper-Dip9OsdR.js';
|
|
227
228
|
export { R as RelationTree } from './relation-tree-C6XAfRoa.js';
|
|
228
229
|
export { R as RequestStatus } from './request-status-CJ_zkp3v.js';
|
|
230
|
+
export { R as ResizableDrawer } from './drawer-BI8T3w7e.js';
|
|
229
231
|
export { R as RichTextEditor } from './rich-text-editor-BMDEIxeg.js';
|
|
230
232
|
export { R as RichTextViewer } from './rich-text-viewer-BoeWMAbJ.js';
|
|
231
233
|
export { R as RollLocationCenter } from './center-BXeKtiny.js';
|
|
@@ -321,6 +323,7 @@ import './time-CeL7904f.js';
|
|
|
321
323
|
import '@ant-design/icons/es/icons/DeleteOutlined.js';
|
|
322
324
|
import '@ant-design/icons/es/icons/CloseOutlined.js';
|
|
323
325
|
import 'react-dom/client';
|
|
326
|
+
import './_commonjsHelpers-B0GIDhER.js';
|
|
324
327
|
import 'react-is';
|
|
325
328
|
import 'react-dom';
|
|
326
329
|
import './context-BOYja0yN.js';
|
|
@@ -344,6 +347,7 @@ import './use-responsive-point-Bp3D3lZT.js';
|
|
|
344
347
|
import '@dimjs/utils/uuid/uuid';
|
|
345
348
|
import '@ant-design/icons/es/icons/QuestionCircleFilled.js';
|
|
346
349
|
import '@dimjs/lang/is-deep-equal';
|
|
350
|
+
import 'react-resizable';
|
|
347
351
|
import '@tinymce/tinymce-react';
|
|
348
352
|
import '@ant-design/icons/es/icons/PlusCircleOutlined.js';
|
|
349
353
|
import '@ant-design/icons/es/icons/FullscreenOutlined.js';
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.bw-center-loading{left:50%;position:absolute;top:50%;transform:translate(-50%,-50%)}.ant-btn.button-remove-gap{height:auto;line-height:normal;margin:0;min-height:auto;padding:0}.resize-border{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAeCAYAAADkftS9AAAAIklEQVQoU2M4c+bMfxAGAgYYmwGrIIiDjrELjpo5aiZeMwF+yNnOs5KSvgAAAABJRU5ErkJggg==");background-position:50%;background-repeat:no-repeat;box-sizing:border-box;cursor:ew-resize;height:100%;left:0;position:absolute;top:0;user-select:none;width:10px;z-index:2}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes fadeOut{0%{opacity:1}to{opacity:0}}.drawer-resizable{bottom:0;opacity:0;pointer-events:none;position:fixed;right:0;top:0;transition:opacity .3s cubic-bezier(.7,0,.3,1);z-index:99}.drawer-resizable.drawer-resizable-visible{opacity:1;pointer-events:auto}.drawer-resizable .drawer-resizable-mask{animation-fill-mode:forwards;animation-timing-function:cubic-bezier(.7,0,.3,1);background-color:rgba(0,0,0,.4);inset:0;opacity:0;position:absolute;transition:opacity .3s cubic-bezier(.7,0,.3,1)}.drawer-resizable .drawer-resizable-content{background-color:#fff;bottom:0;box-shadow:0 16px 24px 2px rgba(0,0,0,.14),0 6px 30px 5px rgba(0,0,0,.12),0 8px 10px -5px rgba(0,0,0,.2);display:flex;flex-direction:column;height:100%;opacity:0;position:absolute;right:0;top:0;transform:translateX(100%);transition:transform .3s cubic-bezier(.7,0,.3,1),opacity .3s cubic-bezier(.7,0,.3,1)}.drawer-resizable .drawer-resizable-header{align-items:center;border-bottom:1px solid #e5e6eb;display:flex;justify-content:space-between;padding:16px 24px}.drawer-resizable .drawer-resizable-header .drawer-resizable-title{color:#1d2129;display:inline-flex;font-size:16px;font-weight:600;line-height:normal}.drawer-resizable .drawer-resizable-header .drawer-close{border-radius:50%;color:#4e5969;padding:8px;transition:color .2s,background-color .2s}.drawer-resizable .drawer-resizable-header .drawer-close:hover{background-color:#f2f3f5;color:#1d2129}.drawer-resizable .drawer-resizable-body{flex:1;overflow-y:auto;padding:16px}.drawer-resizable .drawer-footer{border-top:1px solid #e5e6eb;padding:8px 16px}.ant-btn.drawer-resizable-title-close{align-items:center;background:transparent;border:0;border-radius:4px;color:rgba(0,0,0,.45);cursor:pointer;display:inline-flex;font-size:16px;font-style:normal;font-weight:600;height:24px;justify-content:center;line-height:1;margin-inline-end:8px;text-align:center;text-decoration:none;text-rendering:auto;text-transform:none;transition:all .2s;width:24px}.ant-btn.drawer-resizable-title-close:hover{background-color:rgba(0,0,0,.06);color:rgba(0,0,0,.88);text-decoration:none}.ant-btn.drawer-resizable-title-close:active{background-color:rgba(0,0,0,.15)}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import React$1 from 'react';
|
|
2
|
+
import { CSSProperties, ReactElement } from 'react';
|
|
3
|
+
|
|
4
|
+
export type ResizableDrawerProps = {
|
|
5
|
+
open?: boolean;
|
|
6
|
+
onClose?: () => void;
|
|
7
|
+
title?: React$1.ReactNode;
|
|
8
|
+
width?: number | string;
|
|
9
|
+
children?: React$1.ReactNode;
|
|
10
|
+
footer?: React$1.ReactNode | null;
|
|
11
|
+
hidenFooter?: boolean;
|
|
12
|
+
maskClosable?: boolean;
|
|
13
|
+
mask?: boolean;
|
|
14
|
+
className?: string;
|
|
15
|
+
style?: React$1.CSSProperties;
|
|
16
|
+
styles?: {
|
|
17
|
+
header?: React$1.CSSProperties;
|
|
18
|
+
body?: React$1.CSSProperties;
|
|
19
|
+
footer?: React$1.CSSProperties;
|
|
20
|
+
};
|
|
21
|
+
headerExtraRender?: React$1.ReactElement;
|
|
22
|
+
zIndex?: number;
|
|
23
|
+
onOk?: (e: React$1.MouseEvent<HTMLElement>) => void | Promise<void>;
|
|
24
|
+
cancelText?: string;
|
|
25
|
+
okText?: string;
|
|
26
|
+
};
|
|
27
|
+
export declare const ResizableDrawer: React$1.FC<ResizableDrawerProps>;
|
|
28
|
+
|
|
29
|
+
export {};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import './../fba-hooks/index.css';
|
|
3
|
+
import './index.css';
|
|
4
|
+
/*! @flatjs/forge MIT @flatbiz/antd */
|
|
5
|
+
|
|
6
|
+
export { R as ResizableDrawer } from '../drawer-BI8T3w7e.js';
|
|
7
|
+
import '@ant-design/icons/es/icons/CloseOutlined.js';
|
|
8
|
+
import '../_rollupPluginBabelHelpers-CP5aeNcJ.js';
|
|
9
|
+
import '@dimjs/lang/is-promise';
|
|
10
|
+
import '@wove/react/hooks';
|
|
11
|
+
import 'react';
|
|
12
|
+
import 'react-dom';
|
|
13
|
+
import 'react-resizable';
|
|
14
|
+
import 'antd';
|
|
15
|
+
import '../_commonjsHelpers-B0GIDhER.js';
|
|
16
|
+
import '../button-wrapper-C2koH6hy.js';
|
|
17
|
+
import '@ant-design/icons/es/icons/LoadingOutlined.js';
|
|
18
|
+
import '@dimjs/utils/class-names/class-names';
|
|
19
|
+
import '@flatbiz/utils';
|
|
20
|
+
import '../config-provider-wrapper-Dbk1Er0W.js';
|
|
21
|
+
import 'antd/es/locale/en_US.js';
|
|
22
|
+
import 'antd/es/locale/zh_CN.js';
|
|
23
|
+
import 'dayjs';
|
|
24
|
+
import 'dayjs/plugin/advancedFormat.js';
|
|
25
|
+
import 'dayjs/plugin/customParseFormat.js';
|
|
26
|
+
import 'dayjs/plugin/localeData.js';
|
|
27
|
+
import 'dayjs/plugin/utc.js';
|
|
28
|
+
import 'dayjs/plugin/weekday.js';
|
|
29
|
+
import 'dayjs/plugin/weekOfYear.js';
|
|
30
|
+
import 'dayjs/plugin/weekYear.js';
|
|
31
|
+
import '@dimjs/utils/extend/extend';
|
|
32
|
+
import '../fba-hooks/index.js';
|
|
33
|
+
import '../use-responsive-point-Bp3D3lZT.js';
|
|
34
|
+
import '@dimjs/utils/uuid/uuid';
|
|
35
|
+
import 'dayjs/locale/en.js';
|
|
36
|
+
import 'dayjs/locale/zh-cn.js';
|
|
37
|
+
import 'react/jsx-runtime';
|
|
38
|
+
import '../fba-utils-Dfbczn1S.js';
|
|
39
|
+
import '@dimjs/lang/is-array';
|
|
40
|
+
import '@dimjs/model';
|
|
41
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flatbiz/antd",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.35",
|
|
4
4
|
"homepage": "https://gitlab.itcjf.com/flatjs-next/node-template-mono",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -382,6 +382,10 @@
|
|
|
382
382
|
"types": "./dist/request-status/index.d.ts",
|
|
383
383
|
"import": "./dist/request-status/index.js"
|
|
384
384
|
},
|
|
385
|
+
"./resizable-drawer": {
|
|
386
|
+
"types": "./dist/resizable-drawer/index.d.ts",
|
|
387
|
+
"import": "./dist/resizable-drawer/index.js"
|
|
388
|
+
},
|
|
385
389
|
"./rich-text-editor": {
|
|
386
390
|
"types": "./dist/rich-text-editor/index.d.ts",
|
|
387
391
|
"import": "./dist/rich-text-editor/index.js"
|
|
@@ -569,6 +573,7 @@
|
|
|
569
573
|
"@dimjs/model": "^2.0.1",
|
|
570
574
|
"@dimjs/model-react": "^2.0.1",
|
|
571
575
|
"@dimjs/utils": "^2.0.2",
|
|
576
|
+
"@flatbiz/ai-request": "^4.0.0",
|
|
572
577
|
"@flatjs/cli": "2.1.9",
|
|
573
578
|
"@hyperse/eslint-config-hyperse": "^1.2.6",
|
|
574
579
|
"@types/node": "22.7.9",
|
|
@@ -583,24 +588,24 @@
|
|
|
583
588
|
"react-dom": "18.2.0",
|
|
584
589
|
"typescript": "5.6.3",
|
|
585
590
|
"vite-tsconfig-paths": "5.0.1",
|
|
586
|
-
"vitest": "2.1.3"
|
|
587
|
-
"@flatbiz/ai-request": "^4.0.0"
|
|
591
|
+
"vitest": "2.1.3"
|
|
588
592
|
},
|
|
589
593
|
"peerDependencies": {
|
|
590
594
|
"@dimjs/lang": ">=2.0.0",
|
|
591
595
|
"@dimjs/model": ">=2.0.1",
|
|
592
596
|
"@dimjs/model-react": ">=2.0.1",
|
|
593
597
|
"@dimjs/utils": ">=2.0.2",
|
|
598
|
+
"@flatbiz/ai-request": ">=4.0.0",
|
|
594
599
|
"@flatbiz/utils": ">=5.0.9",
|
|
595
600
|
"@wove/react": ">=2.0.2",
|
|
596
601
|
"ahooks": ">=3.7.11",
|
|
597
602
|
"antd": ">=5.21.4",
|
|
598
603
|
"dayjs": ">=1.11.9",
|
|
599
604
|
"react": ">=18.2.0",
|
|
600
|
-
"react-dom": ">=18.2.0"
|
|
601
|
-
"@flatbiz/ai-request": ">=4.0.0"
|
|
605
|
+
"react-dom": ">=18.2.0"
|
|
602
606
|
},
|
|
603
607
|
"dependencies": {
|
|
608
|
+
"react-resizable": "^3.0.5",
|
|
604
609
|
"@dnd-kit/core": "^6.1.0",
|
|
605
610
|
"@dnd-kit/modifiers": "^7.0.0",
|
|
606
611
|
"@dnd-kit/sortable": "^8.0.0",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"editable-card-DlqrwXa0.js","sources":["@flatbiz/antd/src/editable-card/editable-card.tsx"],"sourcesContent":["import type { ReactElement } from 'react';\nimport { Fragment, isValidElement, useRef } from 'react';\nimport type { FormListFieldData } from 'antd';\nimport { ConfigProvider, Empty, Form, type FormListOperation } from 'antd';\nimport { PlusOutlined } from '@ant-design/icons';\nimport { classNames } from '@dimjs/utils';\nimport type { TAny } from '@flatbiz/utils';\nimport { isUndefinedOrNull, toArray } from '@flatbiz/utils';\nimport { hooks } from '@wove/react';\nimport { ButtonWrapper } from '../button-wrapper/button-wrapper.jsx';\nimport { CardWrapper } from '../card-wrapper/card-wrapper.jsx';\nimport { DeleteNode } from '../delete-node/delete-node.jsx';\nimport { EasyForm } from '../easy-form/form.jsx';\nimport { fbaHooks } from '../fba-hooks/index.js';\nimport { fbaUtils } from '../fba-utils/fba-utils.js';\nimport { FormItemHidden } from '../form-item-hidden/form-item-hidden.jsx';\nimport { FormItemWrapper } from '../form-item-wrapper/form-item-wrapper.jsx';\nimport { TipsWrapper } from '../tips-wrapper/tips-wrapper.jsx';\nimport type {\n EditableCardDataIndex,\n EditableCardOperation,\n EditableCardProps,\n} from './type.js';\nimport './style.less';\n\n/**\n * 使用FormList实现可编辑卡片\n * ```\n * 1. 必须在外部包裹Form组件或者EasyForm组件\n * 2. 行内需要联动逻辑可使用 column.render.operation.setCurrentRowField 方法\n * 3. 可使用DragEditableCard组件实现拖拽排序\n *\n * demo\n * https://fex.qa.tcshuke.com/docs/admin/main/form/grid\n * ```\n */\nexport const EditableCard = (props: EditableCardProps) => {\n const form = Form.useFormInstance();\n const formListName = toArray<string | number>(props.formListName);\n\n const formListOperationRef = useRef<FormListOperation>();\n const forceUpdate = hooks.useForceUpdate();\n const { componentDisabled } = ConfigProvider.useConfig();\n\n const formListCompleteName = props.formListCompleteName || formListName;\n\n const validateRowFields = hooks.useCallbackRef(\n async (\n formItemPrevName: Array<string | number>,\n nameList: EditableCardDataIndex[]\n ) => {\n await form.validateFields(\n nameList.map((item) => [\n ...formItemPrevName,\n ...toArray<string | number>(item),\n ])\n );\n }\n );\n const getCurrentRowData = hooks.useCallbackRef(\n (formItemPrevName: Array<string | number>) => {\n return form.getFieldValue(formItemPrevName);\n }\n );\n\n const setCurrentRowField = hooks.useCallbackRef(\n (\n formItemPrevName: string | number,\n dataIndexConfigs: {\n name: EditableCardDataIndex;\n value?: TAny;\n }[]\n ) => {\n fbaUtils.setFormFieldsAndTriggerValuesChange(\n form,\n dataIndexConfigs.map((item) => {\n return {\n name: [\n ...formListCompleteName,\n formItemPrevName,\n ...toArray<string | number>(item.name),\n ],\n value: item.value,\n };\n })\n );\n forceUpdate();\n }\n );\n\n const columns = fbaHooks.useMemoCustom(() => {\n return props.columns.map((column) => {\n const title = column.title;\n let titleRender: ReactElement | string | undefined = title;\n if (column.tips) {\n titleRender = (\n <TipsWrapper\n tipType=\"popover\"\n popoverProps={{ content: column.tips }}\n >\n {title}\n </TipsWrapper>\n );\n }\n\n let required = column.required;\n\n if (\n !required &&\n typeof column.formItemProps === 'object' &&\n column.formItemProps.rules?.length\n ) {\n required = !!column.formItemProps.rules.find(\n (item) => !!item['required']\n );\n }\n\n const dataIndex = toArray<string>(column['dataIndex']);\n\n return {\n dataIndex,\n render: (\n index,\n fieldData: FormListFieldData,\n operation: FormListOperation\n ) => {\n const value = form.getFieldValue([\n ...formListCompleteName,\n fieldData.name,\n ...dataIndex,\n ]);\n if (isUndefinedOrNull(column.render)) {\n return <Fragment>{value}</Fragment>;\n }\n\n const rowFormItemCompleteName = [\n ...formListCompleteName,\n fieldData.name,\n ];\n\n const editable =\n typeof column?.editable === 'function'\n ? column?.editable(\n {\n index,\n getCurrentRowData: getCurrentRowData.bind(\n null,\n rowFormItemCompleteName\n ),\n },\n index\n )\n : column?.editable;\n\n const renderOperationProps: EditableCardOperation = {\n index,\n editable,\n add: operation.add,\n remove: operation.remove,\n move: operation.move,\n rowFormItemName: fieldData.name,\n rowFormItemCompleteName,\n setCurrentRowField: setCurrentRowField.bind(null, fieldData.name),\n validateRowFields: validateRowFields.bind(\n null,\n rowFormItemCompleteName\n ),\n getCurrentRowData: getCurrentRowData.bind(\n null,\n rowFormItemCompleteName\n ),\n forceUpdate,\n };\n\n if (column.remove?.(renderOperationProps, index)) {\n return <Fragment />;\n }\n\n if (column.hidden?.(renderOperationProps, index)) {\n return (\n <FormItemHidden\n name={[fieldData.name, ...dataIndex]}\n key={fieldData.key}\n />\n );\n }\n let formItemProps =\n typeof column.formItemProps === 'function'\n ? column.formItemProps(renderOperationProps)\n : column.formItemProps;\n\n if (!formItemProps?.rules?.length && required) {\n formItemProps = {\n ...formItemProps,\n rules: [{ required: true, message: '' }],\n };\n }\n\n if (editable === true) {\n if (column.formItemContainer) {\n return column.formItemContainer(\n <FormItemWrapper\n label={titleRender}\n {...formItemProps}\n name={[fieldData.name, ...dataIndex]}\n span={column.gridNumber}\n key={fieldData.key}\n >\n {column.render?.(renderOperationProps) as React.ReactNode}\n </FormItemWrapper>\n );\n }\n return (\n <FormItemWrapper\n label={titleRender}\n {...formItemProps}\n name={[fieldData.name, ...dataIndex]}\n span={column.gridNumber}\n key={fieldData.key}\n >\n {column.render?.(renderOperationProps) as React.ReactNode}\n </FormItemWrapper>\n );\n }\n if (column.formItemContainer) {\n return column.formItemContainer(\n <FormItemWrapper\n label={titleRender}\n span={column.gridNumber}\n key={fieldData.key}\n {...formItemProps}\n >\n {column.render?.(renderOperationProps)}\n </FormItemWrapper>\n );\n }\n return (\n <FormItemWrapper\n label={titleRender}\n span={column.gridNumber}\n key={fieldData.key}\n {...formItemProps}\n >\n {column.render?.(renderOperationProps)}\n </FormItemWrapper>\n );\n },\n };\n });\n }, [\n props.columns,\n form,\n formListCompleteName,\n setCurrentRowField,\n validateRowFields,\n getCurrentRowData,\n forceUpdate,\n ]);\n\n const className = classNames('editable-card', props.className);\n\n return (\n <div className={className} style={props.style}>\n <Form.List\n name={formListName}\n rules={props.rules}\n initialValue={props.initialValue}\n >\n {(fields, formListOperation, { errors }) => {\n formListOperationRef.current = formListOperation;\n return (\n <div\n style={{\n borderRadius: '6px',\n border: errors?.length\n ? '1px solid #ff4d4f'\n : '1px solid transparent',\n }}\n >\n {props.contentBeforeRender?.(formListOperation, fields.length)}\n {fields.map((fieldItem, index) => {\n const title = props.onCustomGroupName\n ? props.onCustomGroupName(index)\n : index + 1;\n\n const extraData = {\n index,\n fields,\n fieldItem,\n operation: formListOperation,\n required: props.required,\n key: `${fieldItem.key}`,\n };\n if (props.onCustomWrapper) {\n return (\n <Fragment key={fieldItem.key}>\n {props.onCustomWrapper(\n <EasyForm\n nonuseFormWrapper={true}\n {...props.cardEasyFormProps}\n style={{\n padding: 0,\n margin: 0,\n ...props.cardEasyFormProps?.style,\n }}\n >\n {columns.map((column) => {\n return column.render(\n index,\n fieldItem,\n formListOperation\n );\n })}\n </EasyForm>,\n extraData\n )}\n </Fragment>\n );\n }\n\n const cardExtraRenderResult =\n props.cardExtraRender?.(extraData);\n\n return (\n <CardWrapper\n key={fieldItem.key}\n className={props.cardClassName}\n title={title}\n size=\"small\"\n style={{\n padding: 0,\n margin: '0 0 15px 0',\n ...props.cardStyle,\n }}\n bodyStyle={{ paddingBottom: 0 }}\n // styles={{ body: { paddingBottom: 0 } }}\n extra={\n isValidElement(cardExtraRenderResult) ? (\n cardExtraRenderResult\n ) : (\n <div\n style={{\n display: 'inline-flex',\n alignItems: 'center',\n gap: '8px',\n }}\n >\n {cardExtraRenderResult?.['before']}\n <DeleteNode\n style={{ color: 'red' }}\n hidden={\n props.hiddenDeleteBtn ||\n (props.required && fields.length === 1) ||\n componentDisabled\n }\n onDelete={() => {\n formListOperation.remove(index);\n }}\n />\n {cardExtraRenderResult?.['after']}\n </div>\n )\n }\n >\n <EasyForm\n nonuseFormWrapper={true}\n {...props.cardEasyFormProps}\n style={{\n padding: 0,\n margin: 0,\n ...props.cardEasyFormProps?.style,\n }}\n >\n {columns.map((column) => {\n return column.render(\n index,\n fieldItem,\n formListOperation\n );\n })}\n </EasyForm>\n </CardWrapper>\n );\n })}\n {fields.length === 0 ? (\n <div className=\"editable-card-empty\">\n <Empty image={Empty.PRESENTED_IMAGE_SIMPLE} />\n </div>\n ) : null}\n <ButtonWrapper\n block\n hidden={props.hiddenFooterBtn || componentDisabled}\n type=\"dashed\"\n icon={<PlusOutlined />}\n onClick={() => {\n const defaultValues = props.addRowDefaultValues?.();\n formListOperation.add({ ...defaultValues });\n }}\n >\n {props.addRowBtnName || '新增'}\n </ButtonWrapper>\n {props.contentAfterRender?.(formListOperation, fields.length)}\n {errors.length ? (\n <Form.ErrorList\n errors={[\n <div style={{ color: '#ff4d4f', padding: '5px' }} key=\"0\">\n {errors}\n </div>,\n ]}\n />\n ) : null}\n </div>\n );\n }}\n </Form.List>\n </div>\n );\n};\n"],"names":["EditableCard","props","form","Form","useFormInstance","formListName","toArray","formListOperationRef","useRef","forceUpdate","_hooks","useForceUpdate","_ConfigProvider$useCo","ConfigProvider","useConfig","componentDisabled","formListCompleteName","validateRowFields","useCallbackRef","formItemPrevName","nameList","Promise","$return","$error","resolve","validateFields","map","item","concat","_toConsumableArray","then","$await_1","$boundEx","getCurrentRowData","getFieldValue","setCurrentRowField","dataIndexConfigs","fbaUtils","setFormFieldsAndTriggerValuesChange","name","value","columns","fbaHooks","useMemoCustom","column","_column$formItemProps","title","titleRender","tips","_jsx","TipsWrapper","tipType","popoverProps","content","children","required","formItemProps","rules","length","find","dataIndex","render","index","fieldData","operation","_column$remove","_column$hidden","_formItemProps","_column$render4","isUndefinedOrNull","Fragment","rowFormItemCompleteName","editable","bind","renderOperationProps","add","remove","move","rowFormItemName","call","hidden","FormItemHidden","key","_objectSpread","message","_column$render2","formItemContainer","_column$render","_createElement","FormItemWrapper","label","span","gridNumber","_column$render3","className","_classNames","style","List","initialValue","fields","formListOperation","_ref","_props$contentBeforeR","_props$contentAfterRe","errors","current","_jsxs","borderRadius","border","contentBeforeRender","fieldItem","_props$cardExtraRende","_props$cardEasyFormPr2","onCustomGroupName","extraData","onCustomWrapper","_props$cardEasyFormPr","EasyForm","nonuseFormWrapper","cardEasyFormProps","padding","margin","cardExtraRenderResult","cardExtraRender","CardWrapper","cardClassName","size","cardStyle","bodyStyle","paddingBottom","extra","isValidElement","display","alignItems","gap","DeleteNode","color","hiddenDeleteBtn","onDelete","Empty","image","PRESENTED_IMAGE_SIMPLE","ButtonWrapper","block","hiddenFooterBtn","type","icon","_PlusOutlined","onClick","_props$addRowDefaultV","defaultValues","addRowDefaultValues","addRowBtnName","contentAfterRender","ErrorList"],"mappings":";;;;;;;;;;;;;;;;;;;;IAoCaA,YAAY,GAAG,SAAfA,YAAYA,CA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D8C,MAAM,CAAC9C,MAAM,gBACZT,GAAA,CAAC9C,IAAI,CAACuJ,SAAS,EAAA;YACblD,MAAM,EAAE,cACNvD,GAAA,CAAA,KAAA,EAAA;AAAK+C,cAAAA,KAAK,EAAE;AAAEwC,gBAAAA,KAAK,EAAE,SAAS;AAAEhB,gBAAAA,OAAO,EAAE;eAAQ;AAAAlE,cAAAA,QAAA,EAC9CkD;AAAM,aAAA,EAD6C,GAEjD,CAAC;WAET,CAAC,GACA,IAAI;AAAA,SACL,CAAC;AAEV;KACS;AAAC,GACT,CAAC;AAEV;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"form-3qaPduiy.js","sources":["@flatbiz/antd/src/easy-form/form.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\nimport { Children, cloneElement, Fragment, useMemo, useRef } from 'react';\nimport { Form } from 'antd';\nimport { classNames } from '@dimjs/utils';\nimport type { TAny } from '@flatbiz/utils';\nimport { dom, isUndefinedOrNull } from '@flatbiz/utils';\nimport { BoxGrid } from '../box-grid/index.js';\nimport type { BoxRowProps } from '../box-grid/row.jsx';\nimport type { GutterParams } from '../box-grid/type.js';\nimport { fbaHooks } from '../fba-hooks/index.js';\nimport type { FormWrapperProps } from '../form-wrapper/form-wrapper.jsx';\nimport { FormWrapper } from '../form-wrapper/form-wrapper.jsx';\nimport { preDefinedClassName } from '../pre-defined-class-name/index.js';\nimport './style.less';\n\nexport type EasyFormProps = Omit<FormWrapperProps, 'children'> & {\n /**\n * 定义一行显示几列(当外层宽度尺寸大于 992px(lg) 时,一行显示几列), 默认值:3\n * ```\n * 1. 当外层宽度尺寸小于992px(lg),为xs、sm、md情况下不受column值影响(column=1除外)\n * 2. 宽度尺寸定义\n * xs: 宽度 < 576px\n * sm: 宽度 ≥ 576px\n * md: 宽度 ≥ 768px\n * lg: 宽度 ≥ 992px\n * xl: 宽度 ≥ 1200px\n * xxl: 宽度 ≥ 1600px\n * 3. 列数尺寸定义\n * {\n * 1: { xs: 24, sm: 24, md: 24, lg: 24, xl: 24, xxl: 24 },\n * 2: { xs: 24, sm: 12, md: 12, lg: 12, xl: 12, xxl: 12 },\n * 3: { xs: 24, sm: 12, md: 12, lg: 8, xl: 8, xxl: 8 },\n * 4: { xs: 24, sm: 12, md: 12, lg: 6, xl: 6, xxl: 6 },\n * };\n * ```\n */\n column?: 1 | 2 | 3 | 4;\n /**\n * 强制定义一行显示几列,不考虑响应式\n * ```\n * 1. 优先级大于column\n * 2. 建议优先使用column配置\n * ```\n */\n forceColumn?: 1 | 2 | 3 | 4;\n /**\n * Form显示宽度,可数值、可百分比;在小屏幕尺寸(xs、sm)上无效\n */\n width?: number | string;\n /** 网格间距 */\n gridGutter?: BoxRowProps['gutter'];\n children: ReactNode;\n /**\n * 是否为纯净模式,对EasyForm的子节点不做任何包装处理\n */\n isPure?: boolean;\n /**\n * true: 当前EasyForm组件不使用Antd Form包裹,可在Form、EasyForm、FormWrapper内部使用\n */\n nonuseFormWrapper?: boolean;\n /**\n * 栅格占位格数,最大值:24\n * ```\n * 1. 当前EasyForm处在 EasyForm 直接子节点中有效,即当前EasyForm在EasyForm栅格中的占位格数;\n * 2. 父节点使用属性值,当前节点不使用属性值\n * ```\n */\n span?: number;\n};\n\n/**\n * 简单Form布局,可自定义网格布局\n * ```\n * 1. demo:https://fex.qa.tcshuke.com/docs/admin/main/form/grid\n * 2. EasyForm的children列表会进行网格化布局\n * 3. 自定义栅格占位格数的4中方式\n * 3.1 设置FormItemWrapper、FormItemText组件span属性;\n * 3.2 使用 EasyFormItemSpan 包裹children item,设置span属性\n * 3.3 使用 <BoxGrid.Col span={24} ></BoxGrid.Col> 包裹,设置响应式属性\n * 3.4 设置 EasyForm isPure = true设置纯净模式,对EasyForm的子节点不做任何包装处理\n * 4. EasyForm可嵌套使用,嵌套内部的<EasyForm />节点Form相关属性失效,例如属性form、initialValues等都失效\n * <EasyForm form={form}>\n * ....\n * <EasyForm>...</EasyForm>\n * ....\n * <EasyForm>...</EasyForm>\n * ....\n * </EasyForm>\n * 5. 布局网格以当前组件的宽度来计算的,不是屏幕宽度\n * 6. EasyForm 子节点包含 hidden = true 会被忽略\n * 7. 通过 column 可定义一行显示几列FormItem\n * 8. 通过 labelItemVertical 可定义 formitem 竖直布局\n * 9. 通过 formItemGap 可定义 formItem竖直方向间隙\n * 10. 通过 forceColumn 可强制定义一行显示几列,不考虑响应式\n * 11. 通过 labelWidth 可控制Form内部所有label的宽度(可实现整齐效果)\n * 12. 自定义栅格占位格数,见下方`例如`\n\n * 例如\n * <EasyForm column={3}>\n *\t <FormItemWrapper name=\"field1\" label=\"条件1\">\n *\t <Input placeholder=\"请输入\" allowClear={true} />\n *\t </FormItemWrapper>\n *\t <!-- !!自定义栅格占位格数第一种方式:可通过使用 BoxGrid.Col 包裹元素来自定义网格占比 -->\n *\t <BoxGrid.Col span={24}>\n *\t <FormItemWrapper name=\"field5\" label=\"条件5\">\n *\t \t<Input placeholder=\"请输入\" allowClear={true} />\n *\t </FormItemWrapper>\n *\t </BoxGrid.Col>\n *\t <!-- !!自定义栅格占位格数第二种方式:如果为FormItemWrapper组件,可设置span属性 -->\n *\t <FormItemWrapper name=\"field6\" label=\"条件6\" span={24}>\n *\t <Input placeholder=\"请输入\" allowClear={true} />\n *\t </FormItemWrapper>\n *\t <FormItemWrapper noStyle span={24}>\n *\t <Button>按钮</Buttone>\n *\t </FormItemWrapper>\n * </EasyForm>\n * ```\n */\nexport const EasyForm = (props: EasyFormProps) => {\n const screenType = fbaHooks.useResponsivePoint() || '';\n\n const {\n column,\n forceColumn,\n children,\n width,\n gridGutter,\n labelWidth,\n labelItemVertical,\n labelAlign,\n formItemGap = '15',\n isPure,\n nonuseFormWrapper,\n ...otherProps\n } = props;\n const gridSize = useMemo(() => {\n if (forceColumn) {\n const num = 24 / forceColumn;\n return { xs: num, sm: num, md: num, lg: num, xl: num, xxl: num };\n }\n if (!column) {\n return { xs: 24, sm: 12, md: 12, lg: 8, xl: 8, xxl: 6 };\n }\n const columnMap = {\n 1: { xs: 24, sm: 24, md: 24, lg: 24, xl: 24, xxl: 24 },\n 2: { xs: 24, sm: 12, md: 12, lg: 12, xl: 12, xxl: 12 },\n 3: { xs: 24, sm: 12, md: 12, lg: 8, xl: 8, xxl: 8 },\n 4: { xs: 24, sm: 12, md: 12, lg: 6, xl: 6, xxl: 6 },\n };\n return columnMap[column];\n }, [column, forceColumn]);\n\n const getFormRowChildren = () => {\n const childrenList = Children.toArray(children).filter((item: TAny) => {\n return !!item;\n });\n return childrenList\n .map((item: TAny, index) => {\n const domTypeName = item.type['domTypeName'];\n\n let span: number | undefined = undefined;\n if (\n domTypeName === 'FormItemText' ||\n domTypeName === 'FormItemSpan' ||\n domTypeName === 'FormItemWrapper' ||\n domTypeName === 'BoxGridCol' ||\n domTypeName === 'EasyForm'\n ) {\n span = item.props['span'] as number;\n if (span) {\n if (screenType === 'xs') {\n span = 24;\n } else if (screenType === 'sm') {\n span = span > 12 ? span : 12;\n }\n }\n }\n\n if (domTypeName === 'BoxGridCol' || domTypeName === 'FormItemSpan') {\n if (domTypeName === 'FormItemSpan' && item.props.hidden) {\n return null;\n }\n return cloneElement(item, {\n ...item.props,\n ...gridSize,\n span,\n key: index,\n });\n }\n const display = item.props?.style?.display;\n let removeWrapper = false;\n if (\n domTypeName === 'FormItemText' ||\n domTypeName === 'FormItemHidden' ||\n domTypeName === 'FormItemWrapper' ||\n domTypeName === 'FormItemWrapperDependencies' ||\n item.type === Form.Item ||\n display === 'none'\n ) {\n removeWrapper = true;\n }\n\n if (domTypeName === 'FormItemWrapper' || item.props.noStyle) {\n removeWrapper = false;\n }\n return (\n <BoxGrid.Col\n key={index}\n {...gridSize}\n span={span}\n removeWrapper={removeWrapper}\n >\n {item}\n </BoxGrid.Col>\n );\n })\n .filter(Boolean);\n };\n\n const innerStyle = useMemo(() => {\n /** 小屏幕不控制宽度 */\n if (['xs', 'sm'].includes(screenType) || !width) {\n return {};\n }\n return { width };\n }, [screenType, width]);\n\n const gutter = isUndefinedOrNull(gridGutter)\n ? ([15, 0] as GutterParams)\n : gridGutter;\n const anchorRef = useRef<HTMLDivElement>(null);\n\n // 是否嵌套内部EasyForm节点\n const getIsNestedEasyForm = () => {\n try {\n if (nonuseFormWrapper) {\n return true;\n }\n if (anchorRef.current) {\n const target = dom.findParentsElement(anchorRef.current, (node) => {\n return node.classList?.contains?.('easy-form');\n });\n return target ? true : false;\n }\n return undefined;\n } catch (error) {\n console.log('error', error);\n return false;\n }\n };\n\n const isNestedEasyForm = getIsNestedEasyForm();\n\n const labelAlignNew = useMemo(() => {\n if (['xs'].includes(screenType)) {\n return 'left';\n }\n return labelAlign;\n }, [labelAlign, screenType]);\n\n const fromLayoutClassName = useMemo(() => {\n return preDefinedClassName.getFormLayoutClassName({\n labelWidth,\n labelItemVertical,\n labelAlign: labelAlignNew,\n formItemGap,\n className: otherProps.className,\n });\n }, [\n labelWidth,\n labelItemVertical,\n labelAlignNew,\n formItemGap,\n otherProps.className,\n ]);\n\n return (\n <Fragment>\n <div className=\"easy-form-anchor\" ref={anchorRef}></div>\n {isNestedEasyForm === true ? (\n <div\n style={{ ...innerStyle, ...otherProps.style }}\n className={classNames(\n 'easy-form',\n { 'easy-form-pure': isPure },\n 'easy-form-nested',\n fromLayoutClassName\n )}\n >\n {isPure ? (\n children\n ) : (\n <BoxGrid.Row gutter={gutter}>{getFormRowChildren()}</BoxGrid.Row>\n )}\n </div>\n ) : undefined}\n {isNestedEasyForm === false ? (\n <FormWrapper\n {...otherProps}\n labelWidth={labelWidth}\n labelAlign={labelAlignNew}\n labelItemVertical={labelItemVertical}\n formItemGap={formItemGap}\n style={{ ...innerStyle, ...otherProps.style }}\n className={classNames(\n 'easy-form',\n { 'easy-form-pure': isPure },\n fromLayoutClassName\n )}\n autoComplete=\"off\"\n >\n {isPure ? (\n children\n ) : (\n <BoxGrid.Row gutter={gutter}>{getFormRowChildren()}</BoxGrid.Row>\n )}\n </FormWrapper>\n ) : undefined}\n </Fragment>\n );\n};\n\nEasyForm['domTypeName'] = 'EasyForm';\n"],"names":["EasyForm","props","screenType","fbaHooks","useResponsivePoint","column","forceColumn","children","width","gridGutter","labelWidth","labelItemVertical","labelAlign","_props$formItemGap","formItemGap","isPure","nonuseFormWrapper","otherProps","_objectWithoutProperties","_excluded","gridSize","useMemo","num","xs","sm","md","lg","xl","xxl","columnMap","getFormRowChildren","childrenList","Children","toArray","filter","item","map","index","_item$props","domTypeName","type","span","undefined","hidden","cloneElement","_objectSpread","key","display","style","removeWrapper","Form","Item","noStyle","_jsx","BoxGrid","Col","Boolean","innerStyle","includes","gutter","isUndefinedOrNull","anchorRef","useRef","getIsNestedEasyForm","current","target","dom","findParentsElement","node","_node$classList","_node$classList$conta","classList","contains","call","error","console","log","isNestedEasyForm","labelAlignNew","fromLayoutClassName","preDefinedClassName","getFormLayoutClassName","className","_jsxs","Fragment","ref","_classNames","Row","FormWrapper","autoComplete"],"mappings":";;;;;;;;;;;;;;AAsEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;IACaA,QAAQ,GAAG,SAAXA,QAAQA,CAAIC,KAAoB,EAAK;EAChD,IAAMC,UAAU,GAAGC,QAAQ,CAACC,kBAAkB,EAAE,IAAI,EAAE;AAEtD,EAAA,IACEC,MAAM,GAYJJ,KAAK,CAZPI,MAAM;IACNC,WAAW,GAWTL,KAAK,CAXPK,WAAW;IACXC,QAAQ,GAUNN,KAAK,CAVPM,QAAQ;IACRC,KAAK,GASHP,KAAK,CATPO,KAAK;IACLC,UAAU,GAQRR,KAAK,CARPQ,UAAU;IACVC,UAAU,GAORT,KAAK,CAPPS,UAAU;IACVC,iBAAiB,GAMfV,KAAK,CANPU,iBA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