@pisell/materials 6.11.216 → 6.11.218
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/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/index.js +1 -1
- package/build/lowcode/meta.js +1 -1
- package/build/lowcode/preview.js +149 -149
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +15 -15
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +14 -14
- package/es/components/Pagination/index.d.ts +0 -1
- package/es/components/PisellCards/components/GraphicTextCard/GraphicTextCard.d.ts +0 -1
- package/es/components/PisellCards/components/PisellImageCard/PisellImageCard.d.ts +0 -1
- package/es/components/PisellCards/index.d.ts +0 -1
- package/es/components/PisellMetrics/index.d.ts +0 -1
- package/es/components/PisellTabbar/PisellTabbar.js +1 -2
- package/es/components/PisellTabbar/template/Template1/PisellTabbar.js +1 -2
- package/es/components/cardPro/index.d.ts +1 -0
- package/es/components/dataSourceComponents/dataSourceForm/formItem.d.ts +0 -1
- package/es/components/dataSourceComponents/dataSourceShow/dataSourceImage/index.d.ts +0 -1
- package/es/components/dataSourceComponents/dataSourceTable/filter/index.d.ts +0 -1
- package/es/components/dataSourceComponents/dataSourceTable/filter/utils.d.ts +0 -1
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.d.ts +0 -1
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +1 -1
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableQuery.d.ts +0 -1
- package/es/components/dataSourceComponents/dataSourceWrapper/index.d.ts +0 -1
- package/es/components/dataSourceComponents/fields/Input.Json/ReadPretty.d.ts +0 -1
- package/es/components/dataSourceComponents/fields/Input.Password/ReadPretty.d.ts +0 -1
- package/es/components/dataSourceComponents/fields/Input.Subdomain/index.d.ts +1 -1
- package/es/components/dataSourceComponents/fields/RecordListWrapper/index.d.ts +0 -1
- package/es/components/dataSourceComponents/fields/Select/index.d.ts +0 -1
- package/es/components/dataSourceComponents/fields/Tabs/index.d.ts +0 -1
- package/es/components/dataSourceComponents/fields/Translation/ReadPretty.d.ts +0 -1
- package/es/components/dataSourceComponents/fields/Upload/ReadPretty.d.ts +0 -1
- package/es/components/dataSourceComponents/fields/index.d.ts +12 -12
- package/es/components/date-picker/datePickerCpt.d.ts +0 -1
- package/es/components/date-picker/index.d.ts +1 -0
- package/es/components/drag-sort-tree/TreeItem/index.d.ts +1 -0
- package/es/components/filter/index.d.ts +0 -1
- package/es/components/list/index.d.ts +0 -1
- package/es/components/lowCodePage/index.d.ts +0 -1
- package/es/components/pisellDataSourceContainer/hooks/useDataSourceKey.d.ts +0 -1
- package/es/components/pisellDatePicker/datePickerCpt.d.ts +1 -0
- package/es/components/pisellFind/index.js +33 -19
- package/es/components/pisellInput/components/BankCard/index.d.ts +1 -0
- package/es/components/pisellInput/components/SecurityCode/index.d.ts +1 -0
- package/es/components/pisellInput/index.d.ts +1 -0
- package/es/components/pisellLoading/index.d.ts +0 -1
- package/es/components/pisellLookup/PisellLookup.js +34 -14
- package/es/components/pisellLookup/PisellLookup.less +21 -48
- package/es/components/pisellLookup/components/LookupTrigger.js +13 -6
- package/es/components/pisellLookup/components/SearchHistory.js +7 -1
- package/es/components/pisellLookup/types.d.ts +16 -1
- package/es/components/pisellRecordBoard/PisellRecordBoard.js +75 -21
- package/es/components/pisellRecordBoard/shellFrame/Pagination/index.js +1 -1
- package/es/components/pisellTimeRangeDisplay/PisellTimeRangeDisplay.d.ts +32 -0
- package/es/components/pisellTimeRangeDisplay/components/TimeRangeBlock.d.ts +36 -0
- package/es/components/pisellTimeRangeDisplay/types.d.ts +145 -0
- package/es/components/pisellTooltip/index.d.ts +1 -0
- package/es/components/productCard/cartSkuCard/components/AmountFooter/index.d.ts +0 -1
- package/es/components/productCard/cartSkuCard/components/MultiDay/index.d.ts +0 -1
- package/es/components/productCard/cartSkuCard/components/Note/index.d.ts +0 -1
- package/es/components/productCard/cartSkuCard/components/discountReason/index.d.ts +0 -1
- package/es/components/productCard/cartSkuCard/components/holders/index.d.ts +0 -1
- package/es/components/productCard/cartSkuCard/components/packages/index.d.ts +0 -1
- package/es/components/productCard/cartSkuCard/components/resources/index.d.ts +0 -1
- package/es/components/productCard/cartSkuCard/components/sales/index.d.ts +0 -1
- package/es/components/productCard/cartSkuCard/components/specs/index.d.ts +0 -1
- package/es/components/productCard/cartSkuCard/components/timeRange/index.d.ts +0 -1
- package/es/components/productCard/cartSkuCard/components/weighing/index.d.ts +0 -1
- package/es/components/productCard/components/Action/index.d.ts +1 -0
- package/es/components/productCard/components/AmountFooter/index.d.ts +0 -1
- package/es/components/productCard/components/Header/DeleteButton/index.d.ts +0 -1
- package/es/components/productCard/components/Note/index.d.ts +0 -1
- package/es/components/productCard/components/Packages/index.d.ts +0 -1
- package/es/components/productCard/components/Time/components/SelectResource/index.d.ts +0 -1
- package/es/components/productCard/components/Time/index.d.ts +0 -1
- package/es/components/productCard/lineItem/locales.d.ts +38 -0
- package/es/components/qrcode/index.d.ts +0 -1
- package/es/components/table/Actions/component/ColumnsSetting/index.d.ts +1 -0
- package/es/components/table/Actions/component/ExportImport/components/ExportFile/index.d.ts +0 -1
- package/es/components/table/Actions/component/ExportImport/components/ExportTable/index.d.ts +0 -1
- package/es/components/table/Actions/component/ExportImport/components/ImportLog/index.d.ts +0 -1
- package/es/components/table/Actions/component/ExportImport/components/ImportTable/index.d.ts +0 -1
- package/es/components/table/Actions/component/ExportImport/index.d.ts +0 -1
- package/es/components/table/Actions/component/GallerySetting/index.d.ts +0 -1
- package/es/components/table/Actions/component/Group/index.d.ts +0 -1
- package/es/components/table/Actions/component/ViewMode/index.d.ts +0 -1
- package/es/components/table/Actions/index.d.ts +0 -1
- package/es/components/table/BasicTable/index.d.ts +0 -1
- package/es/components/table/Gallery/components/GalleryItem/components/Cover/index.d.ts +0 -1
- package/es/components/table/Gallery/components/GalleryItem/components/RenderFields/index.d.ts +0 -1
- package/es/components/table/Gallery/components/GalleryItem/components/Title/index.d.ts +0 -1
- package/es/components/table/Table/fields/date/Show/index.d.ts +0 -1
- package/es/components/table/Table/fields/image/Show/index.d.ts +0 -1
- package/es/components/table/Table/fields/index.d.ts +2 -2
- package/es/components/table/Table/fields/link/Show/index.d.ts +0 -1
- package/es/components/table/Table/fields/number/Show/index.d.ts +0 -1
- package/es/components/table/Table/fields/numberRange/Show/index.d.ts +0 -1
- package/es/components/table/Table/fields/pSwitch/Show/index.d.ts +0 -1
- package/es/components/table/Table/fields/search/Show/index.d.ts +0 -1
- package/es/components/table/Table/fields/text/Show/index.d.ts +0 -1
- package/es/components/table/Table/tableConfig/SortRow/index.d.ts +0 -1
- package/es/components/table/Table/utils.d.ts +1 -1
- package/es/components/table/View/index.d.ts +0 -1
- package/es/components/versionSelect/index.d.ts +0 -1
- package/es/locales/en-US.d.ts +1 -0
- package/es/locales/en-US.js +1 -0
- package/es/locales/ja.d.ts +1 -0
- package/es/locales/ja.js +1 -0
- package/es/locales/pt.d.ts +1 -0
- package/es/locales/pt.js +1 -0
- package/es/locales/zh-CN.d.ts +1 -0
- package/es/locales/zh-CN.js +2 -1
- package/es/locales/zh-TW.d.ts +1 -0
- package/es/locales/zh-TW.js +2 -1
- package/lib/components/Pagination/index.d.ts +0 -1
- package/lib/components/PisellCards/components/GraphicTextCard/GraphicTextCard.d.ts +0 -1
- package/lib/components/PisellCards/components/PisellImageCard/PisellImageCard.d.ts +0 -1
- package/lib/components/PisellCards/index.d.ts +0 -1
- package/lib/components/PisellMetrics/index.d.ts +0 -1
- package/lib/components/PisellTabbar/PisellTabbar.js +1 -2
- package/lib/components/PisellTabbar/template/Template1/PisellTabbar.js +1 -2
- package/lib/components/cardPro/index.d.ts +1 -0
- package/lib/components/dataSourceComponents/dataSourceForm/formItem.d.ts +0 -1
- package/lib/components/dataSourceComponents/dataSourceShow/dataSourceImage/index.d.ts +0 -1
- package/lib/components/dataSourceComponents/dataSourceTable/filter/index.d.ts +0 -1
- package/lib/components/dataSourceComponents/dataSourceTable/filter/utils.d.ts +0 -1
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.d.ts +0 -1
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +1 -1
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableQuery.d.ts +0 -1
- package/lib/components/dataSourceComponents/dataSourceWrapper/index.d.ts +0 -1
- package/lib/components/dataSourceComponents/fields/Input.Json/ReadPretty.d.ts +0 -1
- package/lib/components/dataSourceComponents/fields/Input.Password/ReadPretty.d.ts +0 -1
- package/lib/components/dataSourceComponents/fields/Input.Subdomain/index.d.ts +1 -1
- package/lib/components/dataSourceComponents/fields/RecordListWrapper/index.d.ts +0 -1
- package/lib/components/dataSourceComponents/fields/Select/index.d.ts +0 -1
- package/lib/components/dataSourceComponents/fields/Tabs/index.d.ts +0 -1
- package/lib/components/dataSourceComponents/fields/Translation/ReadPretty.d.ts +0 -1
- package/lib/components/dataSourceComponents/fields/Upload/ReadPretty.d.ts +0 -1
- package/lib/components/dataSourceComponents/fields/index.d.ts +12 -12
- package/lib/components/date-picker/datePickerCpt.d.ts +0 -1
- package/lib/components/date-picker/index.d.ts +1 -0
- package/lib/components/drag-sort-tree/TreeItem/index.d.ts +1 -0
- package/lib/components/filter/index.d.ts +0 -1
- package/lib/components/list/index.d.ts +0 -1
- package/lib/components/lowCodePage/index.d.ts +0 -1
- package/lib/components/pisellDataSourceContainer/hooks/useDataSourceKey.d.ts +0 -1
- package/lib/components/pisellDatePicker/datePickerCpt.d.ts +1 -0
- package/lib/components/pisellFind/index.js +37 -13
- package/lib/components/pisellInput/components/BankCard/index.d.ts +1 -0
- package/lib/components/pisellInput/components/SecurityCode/index.d.ts +1 -0
- package/lib/components/pisellInput/index.d.ts +1 -0
- package/lib/components/pisellLoading/index.d.ts +0 -1
- package/lib/components/pisellLookup/PisellLookup.js +13 -2
- package/lib/components/pisellLookup/PisellLookup.less +21 -48
- package/lib/components/pisellLookup/components/LookupTrigger.js +14 -1
- package/lib/components/pisellLookup/components/SearchHistory.js +9 -1
- package/lib/components/pisellLookup/types.d.ts +16 -1
- package/lib/components/pisellRecordBoard/PisellRecordBoard.js +59 -5
- package/lib/components/pisellRecordBoard/shellFrame/Pagination/index.js +1 -1
- package/lib/components/pisellTimeRangeDisplay/PisellTimeRangeDisplay.d.ts +32 -0
- package/lib/components/pisellTimeRangeDisplay/components/TimeRangeBlock.d.ts +36 -0
- package/lib/components/pisellTimeRangeDisplay/types.d.ts +145 -0
- package/lib/components/pisellTooltip/index.d.ts +1 -0
- package/lib/components/productCard/cartSkuCard/components/AmountFooter/index.d.ts +0 -1
- package/lib/components/productCard/cartSkuCard/components/MultiDay/index.d.ts +0 -1
- package/lib/components/productCard/cartSkuCard/components/Note/index.d.ts +0 -1
- package/lib/components/productCard/cartSkuCard/components/discountReason/index.d.ts +0 -1
- package/lib/components/productCard/cartSkuCard/components/holders/index.d.ts +0 -1
- package/lib/components/productCard/cartSkuCard/components/packages/index.d.ts +0 -1
- package/lib/components/productCard/cartSkuCard/components/resources/index.d.ts +0 -1
- package/lib/components/productCard/cartSkuCard/components/sales/index.d.ts +0 -1
- package/lib/components/productCard/cartSkuCard/components/specs/index.d.ts +0 -1
- package/lib/components/productCard/cartSkuCard/components/timeRange/index.d.ts +0 -1
- package/lib/components/productCard/cartSkuCard/components/weighing/index.d.ts +0 -1
- package/lib/components/productCard/components/Action/index.d.ts +1 -0
- package/lib/components/productCard/components/AmountFooter/index.d.ts +0 -1
- package/lib/components/productCard/components/Header/DeleteButton/index.d.ts +0 -1
- package/lib/components/productCard/components/Note/index.d.ts +0 -1
- package/lib/components/productCard/components/Packages/index.d.ts +0 -1
- package/lib/components/productCard/components/Time/components/SelectResource/index.d.ts +0 -1
- package/lib/components/productCard/components/Time/index.d.ts +0 -1
- package/lib/components/productCard/lineItem/locales.d.ts +38 -0
- package/lib/components/qrcode/index.d.ts +0 -1
- package/lib/components/table/Actions/component/ColumnsSetting/index.d.ts +1 -0
- package/lib/components/table/Actions/component/ExportImport/components/ExportFile/index.d.ts +0 -1
- package/lib/components/table/Actions/component/ExportImport/components/ExportTable/index.d.ts +0 -1
- package/lib/components/table/Actions/component/ExportImport/components/ImportLog/index.d.ts +0 -1
- package/lib/components/table/Actions/component/ExportImport/components/ImportTable/index.d.ts +0 -1
- package/lib/components/table/Actions/component/ExportImport/index.d.ts +0 -1
- package/lib/components/table/Actions/component/GallerySetting/index.d.ts +0 -1
- package/lib/components/table/Actions/component/Group/index.d.ts +0 -1
- package/lib/components/table/Actions/component/ViewMode/index.d.ts +0 -1
- package/lib/components/table/Actions/index.d.ts +0 -1
- package/lib/components/table/BasicTable/index.d.ts +0 -1
- package/lib/components/table/Gallery/components/GalleryItem/components/Cover/index.d.ts +0 -1
- package/lib/components/table/Gallery/components/GalleryItem/components/RenderFields/index.d.ts +0 -1
- package/lib/components/table/Gallery/components/GalleryItem/components/Title/index.d.ts +0 -1
- package/lib/components/table/Table/fields/date/Show/index.d.ts +0 -1
- package/lib/components/table/Table/fields/image/Show/index.d.ts +0 -1
- package/lib/components/table/Table/fields/index.d.ts +2 -2
- package/lib/components/table/Table/fields/link/Show/index.d.ts +0 -1
- package/lib/components/table/Table/fields/number/Show/index.d.ts +0 -1
- package/lib/components/table/Table/fields/numberRange/Show/index.d.ts +0 -1
- package/lib/components/table/Table/fields/pSwitch/Show/index.d.ts +0 -1
- package/lib/components/table/Table/fields/search/Show/index.d.ts +0 -1
- package/lib/components/table/Table/fields/text/Show/index.d.ts +0 -1
- package/lib/components/table/Table/tableConfig/SortRow/index.d.ts +0 -1
- package/lib/components/table/Table/utils.d.ts +1 -1
- package/lib/components/table/View/index.d.ts +0 -1
- package/lib/components/versionSelect/index.d.ts +0 -1
- package/lib/locales/en-US.d.ts +1 -0
- package/lib/locales/en-US.js +1 -0
- package/lib/locales/ja.d.ts +1 -0
- package/lib/locales/ja.js +1 -0
- package/lib/locales/pt.d.ts +1 -0
- package/lib/locales/pt.js +1 -0
- package/lib/locales/zh-CN.d.ts +1 -0
- package/lib/locales/zh-CN.js +2 -1
- package/lib/locales/zh-TW.d.ts +1 -0
- package/lib/locales/zh-TW.js +2 -1
- package/package.json +3 -3
- package/es/components/productCard/lineItem/components/Holders/index.d.ts +0 -9
- package/lib/components/productCard/lineItem/components/Holders/index.d.ts +0 -9
|
@@ -219,17 +219,6 @@
|
|
|
219
219
|
}
|
|
220
220
|
}
|
|
221
221
|
|
|
222
|
-
.pisell-lookup-input-clear {
|
|
223
|
-
.anticon {
|
|
224
|
-
font-size: 18px;
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
.pisell-lookup-input-clear-text {
|
|
228
|
-
font-size: 14px;
|
|
229
|
-
line-height: 20px;
|
|
230
|
-
}
|
|
231
|
-
}
|
|
232
|
-
|
|
233
222
|
.pisell-lookup-input-scan {
|
|
234
223
|
font-size: 20px;
|
|
235
224
|
width: 20px;
|
|
@@ -249,12 +238,6 @@
|
|
|
249
238
|
min-height: 58px;
|
|
250
239
|
padding: 6px 6px 6px 16px;
|
|
251
240
|
|
|
252
|
-
.pisell-lookup-input-clear {
|
|
253
|
-
.anticon {
|
|
254
|
-
font-size: 20px;
|
|
255
|
-
}
|
|
256
|
-
}
|
|
257
|
-
|
|
258
241
|
.pisell-lookup-input-scan {
|
|
259
242
|
font-size: 28px;
|
|
260
243
|
width: 28px;
|
|
@@ -292,37 +275,6 @@
|
|
|
292
275
|
gap: 12px;
|
|
293
276
|
}
|
|
294
277
|
|
|
295
|
-
&-clear {
|
|
296
|
-
display: inline-flex;
|
|
297
|
-
align-items: center;
|
|
298
|
-
justify-content: center;
|
|
299
|
-
gap: 2px;
|
|
300
|
-
padding: 6px 4px;
|
|
301
|
-
cursor: pointer;
|
|
302
|
-
color: #7f56d9;
|
|
303
|
-
user-select: none;
|
|
304
|
-
transition: opacity 0.2s;
|
|
305
|
-
|
|
306
|
-
&:hover {
|
|
307
|
-
opacity: 0.8;
|
|
308
|
-
}
|
|
309
|
-
|
|
310
|
-
.anticon {
|
|
311
|
-
font-size: 24px;
|
|
312
|
-
color: #7f56d9;
|
|
313
|
-
line-height: 1;
|
|
314
|
-
display: flex;
|
|
315
|
-
align-items: center;
|
|
316
|
-
}
|
|
317
|
-
|
|
318
|
-
&-text {
|
|
319
|
-
font-size: 16px;
|
|
320
|
-
font-weight: 500;
|
|
321
|
-
line-height: 24px;
|
|
322
|
-
color: #7f56d9;
|
|
323
|
-
}
|
|
324
|
-
}
|
|
325
|
-
|
|
326
278
|
&-scan {
|
|
327
279
|
cursor: pointer;
|
|
328
280
|
color: #000000;
|
|
@@ -395,6 +347,27 @@
|
|
|
395
347
|
// ============ 搜索历史样式 ============
|
|
396
348
|
|
|
397
349
|
&-history {
|
|
350
|
+
&-footer {
|
|
351
|
+
display: flex;
|
|
352
|
+
justify-content: flex-start;
|
|
353
|
+
margin-top: 8px;
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
&-clear {
|
|
357
|
+
border: none;
|
|
358
|
+
background: transparent;
|
|
359
|
+
color: #7f56d9;
|
|
360
|
+
cursor: pointer;
|
|
361
|
+
font-size: 14px;
|
|
362
|
+
font-weight: 500;
|
|
363
|
+
line-height: 20px;
|
|
364
|
+
padding: 0;
|
|
365
|
+
|
|
366
|
+
&:hover {
|
|
367
|
+
opacity: 0.8;
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
|
|
398
371
|
&-list {
|
|
399
372
|
display: flex;
|
|
400
373
|
flex-wrap: wrap;
|
|
@@ -10,7 +10,7 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
|
10
10
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
11
11
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
12
12
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
13
|
-
import {
|
|
13
|
+
import { SearchOutlined } from '@ant-design/icons';
|
|
14
14
|
import { Button, Input } from 'antd';
|
|
15
15
|
import React, { cloneElement, forwardRef, isValidElement, useImperativeHandle, useRef, useState } from 'react';
|
|
16
16
|
import useEngineContext from "../../../hooks/useEngineContext";
|
|
@@ -49,6 +49,8 @@ var LookupTriggerComponent = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
49
49
|
_props$showScan = props.showScan,
|
|
50
50
|
showScan = _props$showScan === void 0 ? true : _props$showScan,
|
|
51
51
|
value = props.value,
|
|
52
|
+
_props$searchSource = props.searchSource,
|
|
53
|
+
searchSource = _props$searchSource === void 0 ? 'keyboard' : _props$searchSource,
|
|
52
54
|
loading = props.loading,
|
|
53
55
|
inputRender = props.inputRender,
|
|
54
56
|
_onChange = props.onChange,
|
|
@@ -235,6 +237,7 @@ var LookupTriggerComponent = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
235
237
|
onScan: function onScan(code) {
|
|
236
238
|
return _onScan === null || _onScan === void 0 ? void 0 : _onScan(code);
|
|
237
239
|
},
|
|
240
|
+
searchSource: searchSource,
|
|
238
241
|
onFocus: onFocus,
|
|
239
242
|
onBlur: onBlur
|
|
240
243
|
});
|
|
@@ -242,16 +245,20 @@ var LookupTriggerComponent = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
242
245
|
|
|
243
246
|
// 构建前缀图标
|
|
244
247
|
var prefix = showPrefixIcon ? prefixIcon || /*#__PURE__*/React.createElement(SearchOutlined, null) : undefined;
|
|
248
|
+
var isScanResult = searchSource === 'scan';
|
|
245
249
|
|
|
246
250
|
// 构建后缀图标
|
|
247
251
|
var suffix = /*#__PURE__*/React.createElement("div", {
|
|
248
252
|
className: "pisell-lookup-input-suffix"
|
|
249
|
-
}, showClear && value && /*#__PURE__*/React.createElement(
|
|
250
|
-
|
|
253
|
+
}, showClear && value && /*#__PURE__*/React.createElement(Button, {
|
|
254
|
+
type: "link",
|
|
255
|
+
size: size,
|
|
256
|
+
className: "pisell-lookup-input-cancel",
|
|
257
|
+
onMouseDown: function onMouseDown(event) {
|
|
258
|
+
return event.preventDefault();
|
|
259
|
+
},
|
|
251
260
|
onClick: handleClear
|
|
252
|
-
},
|
|
253
|
-
className: "pisell-lookup-input-clear-text"
|
|
254
|
-
}, getText('pisell-lookup-clear'))), showScan && /*#__PURE__*/React.createElement(Iconfont, {
|
|
261
|
+
}, isScanResult ? getText('pisell-lookup-cancel') || '取消' : getText('pisell-lookup-clear') || 'Clear'), showScan && /*#__PURE__*/React.createElement(Iconfont, {
|
|
255
262
|
className: "pisell-lookup-input-scan",
|
|
256
263
|
type: "pisell2-scan",
|
|
257
264
|
onClick: handleScanClick,
|
|
@@ -63,6 +63,12 @@ export var SearchHistory = function SearchHistory(props) {
|
|
|
63
63
|
},
|
|
64
64
|
closeIcon: /*#__PURE__*/React.createElement(CloseOutlined, null)
|
|
65
65
|
}, item);
|
|
66
|
-
}))
|
|
66
|
+
})), onClear && /*#__PURE__*/React.createElement("div", {
|
|
67
|
+
className: "pisell-lookup-history-footer"
|
|
68
|
+
}, /*#__PURE__*/React.createElement("button", {
|
|
69
|
+
type: "button",
|
|
70
|
+
className: "pisell-lookup-history-clear",
|
|
71
|
+
onClick: handleClearAll
|
|
72
|
+
}, "Clear")));
|
|
67
73
|
};
|
|
68
74
|
SearchHistory.displayName = 'SearchHistory';
|
|
@@ -11,6 +11,10 @@ export declare type DisplayType = 'inline' | 'popup' | 'modal' | 'drawer' | 'det
|
|
|
11
11
|
* 搜索模式
|
|
12
12
|
*/
|
|
13
13
|
export declare type SearchMode = 'realtime' | 'confirm';
|
|
14
|
+
/**
|
|
15
|
+
* 搜索来源
|
|
16
|
+
*/
|
|
17
|
+
export declare type LookupSearchSource = 'keyboard' | 'scan';
|
|
14
18
|
/**
|
|
15
19
|
* 输入框尺寸
|
|
16
20
|
*/
|
|
@@ -34,7 +38,7 @@ export interface PisellLookupRef {
|
|
|
34
38
|
/**
|
|
35
39
|
* 设置关键词
|
|
36
40
|
*/
|
|
37
|
-
setKeyword: (keyword: string) => void;
|
|
41
|
+
setKeyword: (keyword: string, source?: LookupSearchSource) => void;
|
|
38
42
|
}
|
|
39
43
|
/**
|
|
40
44
|
* Drawer 位置
|
|
@@ -69,6 +73,8 @@ export interface LookupInputRenderContext {
|
|
|
69
73
|
onClear: () => void;
|
|
70
74
|
/** 扫码结果回填 */
|
|
71
75
|
onScan?: (code: string) => void;
|
|
76
|
+
/** 最近一次搜索来源,用于输入栏区分键盘输入与扫码结果态 */
|
|
77
|
+
searchSource?: LookupSearchSource;
|
|
72
78
|
/** 聚焦:inline/popup 形态用于展开结果容器 */
|
|
73
79
|
onFocus?: () => void;
|
|
74
80
|
/** 失焦:inline/popup 形态用于延迟关闭结果容器 */
|
|
@@ -147,6 +153,11 @@ export interface PisellLookupProps {
|
|
|
147
153
|
* @default 'Lookup'
|
|
148
154
|
*/
|
|
149
155
|
confirmButtonText?: string;
|
|
156
|
+
/**
|
|
157
|
+
* Modal 搜索栏关闭按钮文本
|
|
158
|
+
* @default 'Close'
|
|
159
|
+
*/
|
|
160
|
+
closeButtonText?: string;
|
|
150
161
|
/**
|
|
151
162
|
* 搜索触发模式
|
|
152
163
|
* - realtime: 实时搜索(输入即触发)
|
|
@@ -477,6 +488,10 @@ export interface LookupTriggerProps {
|
|
|
477
488
|
* 当前值
|
|
478
489
|
*/
|
|
479
490
|
value?: string;
|
|
491
|
+
/**
|
|
492
|
+
* 最近一次搜索来源
|
|
493
|
+
*/
|
|
494
|
+
searchSource?: LookupSearchSource;
|
|
480
495
|
/**
|
|
481
496
|
* 值变化回调
|
|
482
497
|
*/
|
|
@@ -23,7 +23,7 @@ import { RecordBoardProvider } from "./context/RecordBoardProvider";
|
|
|
23
23
|
import { getRecordBoardColumnKey } from "./utils/recordBoardColumns";
|
|
24
24
|
var defaultPagination = {
|
|
25
25
|
pageNumber: 1,
|
|
26
|
-
pageSize:
|
|
26
|
+
pageSize: 20
|
|
27
27
|
};
|
|
28
28
|
function readBodyViewFromStorage(key, fallback) {
|
|
29
29
|
if (typeof window === 'undefined' || !key) return fallback;
|
|
@@ -35,6 +35,35 @@ function readBodyViewFromStorage(key, fallback) {
|
|
|
35
35
|
}
|
|
36
36
|
return fallback;
|
|
37
37
|
}
|
|
38
|
+
function getAccumulationKey(record, rowKey, index) {
|
|
39
|
+
var _ref, _ref2, _record$id;
|
|
40
|
+
if (typeof rowKey === 'function') {
|
|
41
|
+
return rowKey(record);
|
|
42
|
+
}
|
|
43
|
+
if (typeof rowKey === 'string' && record != null && rowKey in record) {
|
|
44
|
+
return record[rowKey];
|
|
45
|
+
}
|
|
46
|
+
return (_ref = (_ref2 = (_record$id = record === null || record === void 0 ? void 0 : record.id) !== null && _record$id !== void 0 ? _record$id : record === null || record === void 0 ? void 0 : record.key) !== null && _ref2 !== void 0 ? _ref2 : record) !== null && _ref !== void 0 ? _ref : index;
|
|
47
|
+
}
|
|
48
|
+
function mergeAccumulatedRows(previousRows, nextRows, rowKey) {
|
|
49
|
+
if (previousRows.length === 0) return nextRows;
|
|
50
|
+
if (nextRows.length === 0) return previousRows;
|
|
51
|
+
var merged = new Map();
|
|
52
|
+
previousRows.forEach(function (row, index) {
|
|
53
|
+
merged.set(getAccumulationKey(row, rowKey, index), row);
|
|
54
|
+
});
|
|
55
|
+
nextRows.forEach(function (row, index) {
|
|
56
|
+
merged.set(getAccumulationKey(row, rowKey, previousRows.length + index), row);
|
|
57
|
+
});
|
|
58
|
+
return Array.from(merged.values());
|
|
59
|
+
}
|
|
60
|
+
function isSameRowArray(left, right) {
|
|
61
|
+
if (left === right) return true;
|
|
62
|
+
if (left.length !== right.length) return false;
|
|
63
|
+
return left.every(function (item, index) {
|
|
64
|
+
return item === right[index];
|
|
65
|
+
});
|
|
66
|
+
}
|
|
38
67
|
|
|
39
68
|
/**
|
|
40
69
|
* 从打散 props 合并出 childComponentProps(供 context 使用)。
|
|
@@ -102,7 +131,7 @@ function getDefaultRecordBoardContext(layoutType, selection, rowKey) {
|
|
|
102
131
|
* 平面图推荐在 ShellFrame 内使用 **PisellRecordBoard.FloorMap** 声明,与根级 `floorMap` 合并(子优先)。
|
|
103
132
|
*/
|
|
104
133
|
var PisellRecordBoard = function PisellRecordBoard(props) {
|
|
105
|
-
var _props$columnVisibili, _props$
|
|
134
|
+
var _props$columnVisibili, _props$grid;
|
|
106
135
|
var children = props.children,
|
|
107
136
|
_props$layoutType = props.layoutType,
|
|
108
137
|
layoutType = _props$layoutType === void 0 ? 'grid' : _props$layoutType,
|
|
@@ -160,16 +189,20 @@ var PisellRecordBoard = function PisellRecordBoard(props) {
|
|
|
160
189
|
_useState8 = _slicedToArray(_useState7, 2),
|
|
161
190
|
filterResetKey = _useState8[0],
|
|
162
191
|
setFilterResetKey = _useState8[1];
|
|
163
|
-
var _useState9 = useState(
|
|
192
|
+
var _useState9 = useState([]),
|
|
193
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
|
194
|
+
accumulatedDataRows = _useState10[0],
|
|
195
|
+
setAccumulatedDataRows = _useState10[1];
|
|
196
|
+
var _useState11 = useState(function () {
|
|
164
197
|
if (effectiveLockedBodyView != null) {
|
|
165
198
|
return effectiveLockedBodyView;
|
|
166
199
|
}
|
|
167
200
|
var fallback = defaultBodyView === 'floorMap' ? 'floorMap' : defaultBodyView === 'calendar' ? 'calendar' : defaultBodyView === 'resourceWall' ? 'resourceWall' : 'grid';
|
|
168
201
|
return readBodyViewFromStorage(bodyViewStorageKey, fallback);
|
|
169
202
|
}),
|
|
170
|
-
|
|
171
|
-
bodyView =
|
|
172
|
-
setBodyViewState =
|
|
203
|
+
_useState12 = _slicedToArray(_useState11, 2),
|
|
204
|
+
bodyView = _useState12[0],
|
|
205
|
+
setBodyViewState = _useState12[1];
|
|
173
206
|
var setBodyView = useCallback(function (v) {
|
|
174
207
|
if (bodyViewSwitchable === false && effectiveLockedBodyView != null && v !== effectiveLockedBodyView) {
|
|
175
208
|
return;
|
|
@@ -188,10 +221,31 @@ var PisellRecordBoard = function PisellRecordBoard(props) {
|
|
|
188
221
|
setBodyViewState(effectiveLockedBodyView);
|
|
189
222
|
}
|
|
190
223
|
}, [bodyViewSwitchable, effectiveLockedBodyView, bodyView]);
|
|
191
|
-
var
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
224
|
+
var paginationForAccumulation = paginationProp !== undefined ? paginationProp : defaultPagination;
|
|
225
|
+
var gridInfiniteScrollEnabled = ((_props$grid = props.grid) === null || _props$grid === void 0 ? void 0 : _props$grid.infiniteScroll) !== false;
|
|
226
|
+
var dataRowsForInfiniteScroll = useMemo(function () {
|
|
227
|
+
if (dataProp === undefined || !gridInfiniteScrollEnabled) {
|
|
228
|
+
return dataProp;
|
|
229
|
+
}
|
|
230
|
+
if (paginationForAccumulation.pageNumber <= 1) {
|
|
231
|
+
return dataProp;
|
|
232
|
+
}
|
|
233
|
+
return mergeAccumulatedRows(accumulatedDataRows, dataProp, rowKeyProp);
|
|
234
|
+
}, [dataProp, gridInfiniteScrollEnabled, paginationForAccumulation.pageNumber, accumulatedDataRows, rowKeyProp]);
|
|
235
|
+
useEffect(function () {
|
|
236
|
+
if (dataProp === undefined || !gridInfiniteScrollEnabled) {
|
|
237
|
+
setAccumulatedDataRows([]);
|
|
238
|
+
return;
|
|
239
|
+
}
|
|
240
|
+
var nextRows = dataRowsForInfiniteScroll !== null && dataRowsForInfiniteScroll !== void 0 ? dataRowsForInfiniteScroll : [];
|
|
241
|
+
setAccumulatedDataRows(function (prev) {
|
|
242
|
+
return isSameRowArray(prev, nextRows) ? prev : nextRows;
|
|
243
|
+
});
|
|
244
|
+
}, [dataProp, dataRowsForInfiniteScroll, gridInfiniteScrollEnabled]);
|
|
245
|
+
var _useState13 = useState(function () {
|
|
246
|
+
var _props$grid$defaultHi, _props$grid2, _props$grid$columns, _props$grid3;
|
|
247
|
+
var fromConfig = (_props$grid$defaultHi = (_props$grid2 = props.grid) === null || _props$grid2 === void 0 ? void 0 : _props$grid2.defaultHiddenColumnKeys) !== null && _props$grid$defaultHi !== void 0 ? _props$grid$defaultHi : [];
|
|
248
|
+
var fromColumns = ((_props$grid$columns = (_props$grid3 = props.grid) === null || _props$grid3 === void 0 ? void 0 : _props$grid3.columns) !== null && _props$grid$columns !== void 0 ? _props$grid$columns : []).filter(function (col) {
|
|
195
249
|
return col.hidden === true;
|
|
196
250
|
}).map(function (col) {
|
|
197
251
|
return getRecordBoardColumnKey(col);
|
|
@@ -216,10 +270,10 @@ var PisellRecordBoard = function PisellRecordBoard(props) {
|
|
|
216
270
|
}
|
|
217
271
|
return defaultVis;
|
|
218
272
|
}),
|
|
219
|
-
|
|
220
|
-
internalColumnVisibility =
|
|
221
|
-
setInternalColumnVisibility =
|
|
222
|
-
var
|
|
273
|
+
_useState14 = _slicedToArray(_useState13, 2),
|
|
274
|
+
internalColumnVisibility = _useState14[0],
|
|
275
|
+
setInternalColumnVisibility = _useState14[1];
|
|
276
|
+
var _useState15 = useState(function () {
|
|
223
277
|
if (typeof columnVisibilityStorageKey === 'string' && columnVisibilityStorageKey && typeof getRecordBoardColumnSettingFromLocal === 'function') {
|
|
224
278
|
var _saved$columnOrder;
|
|
225
279
|
var saved = getRecordBoardColumnSettingFromLocal(columnVisibilityStorageKey);
|
|
@@ -227,9 +281,9 @@ var PisellRecordBoard = function PisellRecordBoard(props) {
|
|
|
227
281
|
}
|
|
228
282
|
return null;
|
|
229
283
|
}),
|
|
230
|
-
|
|
231
|
-
internalColumnOrder =
|
|
232
|
-
setInternalColumnOrder =
|
|
284
|
+
_useState16 = _slicedToArray(_useState15, 2),
|
|
285
|
+
internalColumnOrder = _useState16[0],
|
|
286
|
+
setInternalColumnOrder = _useState16[1];
|
|
233
287
|
useEffect(function () {
|
|
234
288
|
if (typeof columnVisibilityStorageKey !== 'string' || !columnVisibilityStorageKey) return;
|
|
235
289
|
saveColumnVisibilityToLocal({
|
|
@@ -251,7 +305,7 @@ var PisellRecordBoard = function PisellRecordBoard(props) {
|
|
|
251
305
|
setInternalColumnOrder(columnKeys);
|
|
252
306
|
}, []);
|
|
253
307
|
var contextValue = useMemo(function () {
|
|
254
|
-
var
|
|
308
|
+
var _gridSelection$select;
|
|
255
309
|
var defaultCtx = getDefaultRecordBoardContext(layoutType, {
|
|
256
310
|
selectedKeys: internalSelectedKeys,
|
|
257
311
|
selectedRows: internalSelectedRows,
|
|
@@ -260,7 +314,7 @@ var PisellRecordBoard = function PisellRecordBoard(props) {
|
|
|
260
314
|
|
|
261
315
|
/** 分页状态(推导表格切片前需要) */
|
|
262
316
|
var pagination = paginationProp !== undefined ? paginationProp : defaultCtx.pagination;
|
|
263
|
-
var gridInfiniteScroll =
|
|
317
|
+
var gridInfiniteScroll = gridInfiniteScrollEnabled;
|
|
264
318
|
|
|
265
319
|
/**
|
|
266
320
|
* 表格数据:
|
|
@@ -271,7 +325,7 @@ var PisellRecordBoard = function PisellRecordBoard(props) {
|
|
|
271
325
|
var data;
|
|
272
326
|
var total;
|
|
273
327
|
if (dataProp !== undefined) {
|
|
274
|
-
data = dataProp;
|
|
328
|
+
data = dataRowsForInfiniteScroll !== null && dataRowsForInfiniteScroll !== void 0 ? dataRowsForInfiniteScroll : dataProp;
|
|
275
329
|
total = totalProp !== undefined ? totalProp : defaultCtx.total;
|
|
276
330
|
} else if (dataSourcesProp != null && gridDataSourceKeyProp != null && gridDataSourceKeyProp !== '') {
|
|
277
331
|
var _dataSourcesProp$grid;
|
|
@@ -346,7 +400,7 @@ var PisellRecordBoard = function PisellRecordBoard(props) {
|
|
|
346
400
|
paginationRender: props.paginationRender,
|
|
347
401
|
gridInfiniteScroll: gridInfiniteScroll
|
|
348
402
|
});
|
|
349
|
-
}, [layoutType, layoutVariant, rowKeyProp, dataProp, dataSourcesProp, gridDataSourceKeyProp, loadingProp, totalProp, paginationProp, onPageChangeProp, searchParamsProp, onSearchProp, onResetProp, mergedChildComponentProps, internalSelectedKeys, internalSelectedRows, onSelectionChangeInternal, internalColumnVisibility, onColumnVisibilityChangeInternal, internalColumnOrder, onColumnOrderChangeInternal, fillHeight, scrollAreaHeight, filterResetKey, floorMapProp, floorMapLayoutContextProp, defaultBodyView, bodyViewSwitchable, floorMapLayoutRef, floorMapFooter, calendarProp, resourceWallProp, bodyView, setBodyView, props.paginationRender,
|
|
403
|
+
}, [layoutType, layoutVariant, rowKeyProp, dataProp, dataSourcesProp, gridDataSourceKeyProp, loadingProp, totalProp, paginationProp, onPageChangeProp, searchParamsProp, onSearchProp, onResetProp, mergedChildComponentProps, internalSelectedKeys, internalSelectedRows, onSelectionChangeInternal, internalColumnVisibility, onColumnVisibilityChangeInternal, internalColumnOrder, onColumnOrderChangeInternal, fillHeight, scrollAreaHeight, filterResetKey, floorMapProp, floorMapLayoutContextProp, defaultBodyView, bodyViewSwitchable, floorMapLayoutRef, floorMapFooter, calendarProp, resourceWallProp, bodyView, setBodyView, props.paginationRender, gridInfiniteScrollEnabled, dataRowsForInfiniteScroll]);
|
|
350
404
|
var content = /*#__PURE__*/React.createElement(RecordBoardProvider, {
|
|
351
405
|
value: contextValue
|
|
352
406
|
}, children);
|
|
@@ -13,7 +13,7 @@ import "./index.less";
|
|
|
13
13
|
import { useRecordBoardContext } from "../../hooks/useRecordBoardContext";
|
|
14
14
|
var defaultPagination = {
|
|
15
15
|
pageNumber: 1,
|
|
16
|
-
pageSize:
|
|
16
|
+
pageSize: 20
|
|
17
17
|
};
|
|
18
18
|
/**
|
|
19
19
|
* RecordBoard 下的分页:接入 packages/materials 的 Pagination,从 context 取 pagination / total / onPageChange;可透传 childComponentProps.pagination。
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import 'dayjs/locale/zh-cn';
|
|
3
|
+
import 'dayjs/locale/en';
|
|
4
|
+
import type { PisellTimeRangeDisplayProps } from './types';
|
|
5
|
+
import './PisellTimeRangeDisplay.less';
|
|
6
|
+
/**
|
|
7
|
+
* PisellTimeRangeDisplay 组件
|
|
8
|
+
*
|
|
9
|
+
* @description
|
|
10
|
+
* 纯展示型时间区间组件,将 startAt / endAt 格式化为「时间区间 + 持续时间」。
|
|
11
|
+
* - 同一天:HH:mm-HH:mm,可选显示日期/星期
|
|
12
|
+
* - 跨天:起止日期时间
|
|
13
|
+
* - 持续时间:d h m s 格式
|
|
14
|
+
* - 字段顺序由 fieldOrder 控制,可将 duration 放在中间
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* <PisellTimeRangeDisplay
|
|
18
|
+
* startAt="2026-02-04 09:00"
|
|
19
|
+
* endAt="2026-02-04 18:00"
|
|
20
|
+
* />
|
|
21
|
+
* // => "09:00-18:00" + "9h"
|
|
22
|
+
*
|
|
23
|
+
* <PisellTimeRangeDisplay
|
|
24
|
+
* startAt={start}
|
|
25
|
+
* endAt={end}
|
|
26
|
+
* fields={{ fieldOrder: ['time', 'duration', 'date', 'weekday'] }}
|
|
27
|
+
* showDateForSameDay
|
|
28
|
+
* />
|
|
29
|
+
*/
|
|
30
|
+
export declare const PisellTimeRangeDisplay: React.FC<PisellTimeRangeDisplayProps>;
|
|
31
|
+
declare const _default: React.NamedExoticComponent<PisellTimeRangeDisplayProps>;
|
|
32
|
+
export default _default;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type Dayjs } from 'dayjs';
|
|
3
|
+
import type { TimeFormatConfig, DateFormatConfig, WeekdayFormatConfig, TextStyleConfig } from '../types';
|
|
4
|
+
export interface TimeRangeBlockProps {
|
|
5
|
+
/** 开始时间 */
|
|
6
|
+
start: Dayjs;
|
|
7
|
+
/** 结束时间 */
|
|
8
|
+
end: Dayjs;
|
|
9
|
+
/** 是否同一天 */
|
|
10
|
+
isSameDay: boolean;
|
|
11
|
+
/** 时间格式配置 */
|
|
12
|
+
timeFormat?: TimeFormatConfig;
|
|
13
|
+
/** 日期格式配置(跨天时用于起止日期,含 showRelativeDay) */
|
|
14
|
+
dateFormat?: DateFormatConfig;
|
|
15
|
+
/** 星期格式配置(跨天时用于「Sat, 22 Jan」) */
|
|
16
|
+
weekdayFormat?: WeekdayFormatConfig;
|
|
17
|
+
/** 跨天时是否展示星期 */
|
|
18
|
+
showWeekdayInCrossDay?: boolean;
|
|
19
|
+
/** 参考日期,用于相对日判定,默认 dayjs() */
|
|
20
|
+
referenceDate?: Dayjs;
|
|
21
|
+
/** 文本样式 */
|
|
22
|
+
style?: TextStyleConfig;
|
|
23
|
+
/** 开始时间文本样式,会覆盖 style 中的同名字段 */
|
|
24
|
+
startStyle?: TextStyleConfig;
|
|
25
|
+
/** 结束时间文本样式,会覆盖 style 中的同名字段 */
|
|
26
|
+
endStyle?: TextStyleConfig;
|
|
27
|
+
/** 自定义类名 */
|
|
28
|
+
className?: string;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* 时间区间展示块
|
|
32
|
+
* - 同一天:HH:mm-HH:mm
|
|
33
|
+
* - 跨天:起止完整日期时间;若某端为相对日(今天/昨天/明天)则只显示「时间 相对日」,不显示星期+日期
|
|
34
|
+
*/
|
|
35
|
+
export declare const TimeRangeBlock: React.FC<TimeRangeBlockProps>;
|
|
36
|
+
export default TimeRangeBlock;
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
import type { CSSProperties } from 'react';
|
|
2
|
+
import type { Dayjs } from 'dayjs';
|
|
3
|
+
import type { TimeFormatConfig, DateFormatConfig, WeekdayFormatConfig, ContainerStyleConfig, TextStyleConfig, TextAlign } from '../pisellDateTimeDisplay/types';
|
|
4
|
+
export type { TimeFormatConfig, DateFormatConfig, WeekdayFormatConfig, ContainerStyleConfig, TextStyleConfig, TextAlign, };
|
|
5
|
+
/**
|
|
6
|
+
* 字段类型(时间区间、日期、星期、持续时长)
|
|
7
|
+
* - time: 时间区间块(HH:mm-HH:mm 或跨天起止)
|
|
8
|
+
* - date: 日期块
|
|
9
|
+
* - weekday: 星期块
|
|
10
|
+
* - duration: 持续时长块
|
|
11
|
+
*/
|
|
12
|
+
export declare type TimeRangeFieldType = 'time' | 'date' | 'weekday' | 'duration';
|
|
13
|
+
/**
|
|
14
|
+
* 持续时长格式配置
|
|
15
|
+
*/
|
|
16
|
+
export interface DurationFormatConfig {
|
|
17
|
+
/**
|
|
18
|
+
* 是否显示秒
|
|
19
|
+
* @default false
|
|
20
|
+
* @example true -> "2h30m23s" | false -> "2h30m"
|
|
21
|
+
*/
|
|
22
|
+
showSeconds?: boolean;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* 字段配置
|
|
26
|
+
*/
|
|
27
|
+
export interface TimeRangeFieldConfig {
|
|
28
|
+
/**
|
|
29
|
+
* 是否显示时间区间块
|
|
30
|
+
* @default true
|
|
31
|
+
*/
|
|
32
|
+
showTimeRange?: boolean;
|
|
33
|
+
/**
|
|
34
|
+
* 是否显示日期块
|
|
35
|
+
* @default true
|
|
36
|
+
*/
|
|
37
|
+
showDate?: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* 是否显示星期块
|
|
40
|
+
* @default true
|
|
41
|
+
*/
|
|
42
|
+
showWeekday?: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* 是否显示持续时长块
|
|
45
|
+
* @default true
|
|
46
|
+
*/
|
|
47
|
+
showDuration?: boolean;
|
|
48
|
+
/**
|
|
49
|
+
* 字段顺序(四类块可任意排序;默认 时间 日期 星期 持续时长,可实现「持续时间在前」等)
|
|
50
|
+
* @default ['weekday', 'date', 'time', 'duration'] 换行顺序:先持续时间 → 结束时间(跨天)→ 开始/结束时间与日期 → 星期
|
|
51
|
+
*/
|
|
52
|
+
fieldOrder?: TimeRangeFieldType[];
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* startAt / endAt 的 dayjs 兼容值
|
|
56
|
+
*/
|
|
57
|
+
export declare type DayjsLike = Dayjs | string | number;
|
|
58
|
+
/**
|
|
59
|
+
* PisellTimeRangeDisplay 组件 Props
|
|
60
|
+
*/
|
|
61
|
+
export interface PisellTimeRangeDisplayProps {
|
|
62
|
+
/**
|
|
63
|
+
* 开始时间(dayjs 兼容值)
|
|
64
|
+
*/
|
|
65
|
+
startAt: DayjsLike;
|
|
66
|
+
/**
|
|
67
|
+
* 结束时间(dayjs 兼容值)
|
|
68
|
+
*/
|
|
69
|
+
endAt: DayjsLike;
|
|
70
|
+
/**
|
|
71
|
+
* 文本对齐方式(单行/多行均生效)
|
|
72
|
+
* @default 'center'
|
|
73
|
+
*/
|
|
74
|
+
textAlign?: TextAlign;
|
|
75
|
+
/**
|
|
76
|
+
* 字段显示与排序配置
|
|
77
|
+
*/
|
|
78
|
+
fields?: TimeRangeFieldConfig;
|
|
79
|
+
/**
|
|
80
|
+
* 同一天时是否显示具体日期
|
|
81
|
+
* @default true
|
|
82
|
+
*/
|
|
83
|
+
showDateForSameDay?: boolean;
|
|
84
|
+
/**
|
|
85
|
+
* 时间格式配置(复用 PisellDateTimeDisplay)
|
|
86
|
+
*/
|
|
87
|
+
timeFormat?: TimeFormatConfig;
|
|
88
|
+
/**
|
|
89
|
+
* 日期格式配置(复用 PisellDateTimeDisplay)
|
|
90
|
+
*/
|
|
91
|
+
dateFormat?: DateFormatConfig;
|
|
92
|
+
/**
|
|
93
|
+
* 星期格式配置(复用 PisellDateTimeDisplay)
|
|
94
|
+
*/
|
|
95
|
+
weekdayFormat?: WeekdayFormatConfig;
|
|
96
|
+
/**
|
|
97
|
+
* 持续时长格式配置
|
|
98
|
+
*/
|
|
99
|
+
durationFormat?: DurationFormatConfig;
|
|
100
|
+
/**
|
|
101
|
+
* 容器样式
|
|
102
|
+
*/
|
|
103
|
+
containerStyle?: ContainerStyleConfig;
|
|
104
|
+
/**
|
|
105
|
+
* 时间区间文本样式
|
|
106
|
+
*/
|
|
107
|
+
timeStyle?: TextStyleConfig;
|
|
108
|
+
/**
|
|
109
|
+
* 开始时间文本样式,会覆盖 timeStyle 中的同名字段
|
|
110
|
+
*/
|
|
111
|
+
startTimeStyle?: TextStyleConfig;
|
|
112
|
+
/**
|
|
113
|
+
* 结束时间文本样式,会覆盖 timeStyle 中的同名字段
|
|
114
|
+
*/
|
|
115
|
+
endTimeStyle?: TextStyleConfig;
|
|
116
|
+
/**
|
|
117
|
+
* 日期文本样式
|
|
118
|
+
*/
|
|
119
|
+
dateStyle?: TextStyleConfig;
|
|
120
|
+
/**
|
|
121
|
+
* 星期文本样式
|
|
122
|
+
*/
|
|
123
|
+
weekdayStyle?: TextStyleConfig;
|
|
124
|
+
/**
|
|
125
|
+
* 持续时长文本样式
|
|
126
|
+
*/
|
|
127
|
+
durationStyle?: TextStyleConfig;
|
|
128
|
+
/**
|
|
129
|
+
* dayjs locale(语言代码)
|
|
130
|
+
* @default 优先使用全局配置,其次浏览器语言
|
|
131
|
+
*/
|
|
132
|
+
locale?: string;
|
|
133
|
+
/**
|
|
134
|
+
* 自定义类名
|
|
135
|
+
*/
|
|
136
|
+
className?: string;
|
|
137
|
+
/**
|
|
138
|
+
* 自定义样式
|
|
139
|
+
*/
|
|
140
|
+
style?: CSSProperties;
|
|
141
|
+
/**
|
|
142
|
+
* 点击回调
|
|
143
|
+
*/
|
|
144
|
+
onClick?: () => void;
|
|
145
|
+
}
|