@pisell/materials 1.0.1107 → 1.0.1109
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/meta.js +3 -3
- package/build/lowcode/preview.css +1 -1
- package/build/lowcode/preview.js +1 -1
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +48 -48
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +48 -48
- package/es/components/PisellBasicGrid/PisellBasicGrid.d.ts +1 -2
- package/es/components/PisellCards/components/GraphicTextCard/GraphicTextCard.d.ts +1 -2
- package/es/components/PisellCards/components/MultilevelCard/MultilevelCard.d.ts +1 -1
- package/es/components/PisellCards/components/PisellImageCard/PisellImageCard.d.ts +1 -2
- package/es/components/PisellCards/components/TabCard/TabCard.d.ts +1 -2
- package/es/components/PisellCards/components/TextCard/TextCard.d.ts +1 -2
- package/es/components/PisellCards/index.d.ts +5 -6
- package/es/components/PisellContactBrief/PisellContactBrief.d.ts +2 -2
- package/es/components/PisellLayouts/index.d.ts +2 -2
- package/es/components/PisellMetrics/index.d.ts +2 -2
- package/es/components/appVersionControl/index.d.ts +1 -2
- package/es/components/auto-complete-number/index.d.ts +1 -2
- package/es/components/badge/index.d.ts +1 -2
- package/es/components/batch-editor/index.d.ts +1 -2
- package/es/components/calendar/index.d.ts +1 -4
- package/es/components/cardMetricItem/index.d.ts +1 -1
- package/es/components/cardPro/index.d.ts +1 -2
- package/es/components/checkbox/index.d.ts +1 -4
- package/es/components/classicLayout/index.d.ts +1 -2
- package/es/components/config-provider/index.d.ts +1 -2
- package/es/components/customSelect/index.d.ts +1 -1
- package/es/components/dataSourceComponents/dataSourceForm/group/index.d.ts +1 -1
- package/es/components/dataSourceComponents/dataSourceForm/submitButton/index.d.ts +1 -1
- package/es/components/dataSourceComponents/dataSourceMenu/index.d.ts +1 -1
- package/es/components/dataSourceComponents/dataSourceShow/dataSourceQRCode/index.d.ts +1 -4
- package/es/components/dataSourceComponents/dataSourceShow/dataSourceTypography/index.d.ts +2 -2
- package/es/components/dataSourceComponents/dataSourceWrapper/index.d.ts +1 -2
- package/es/components/dataSourceComponents/fields/IdentityRecognition/IdentityRecognitionEditor.d.ts +15 -0
- package/es/components/dataSourceComponents/fields/IdentityRecognition/IdentityRecognitionEditor.js +202 -0
- package/es/components/dataSourceComponents/fields/IdentityRecognition/SortableList.js +66 -0
- package/es/components/dataSourceComponents/fields/IdentityRecognition/config.d.ts +10 -0
- package/es/components/dataSourceComponents/fields/IdentityRecognition/config.js +61 -0
- package/es/components/dataSourceComponents/fields/IdentityRecognition/index.d.ts +24 -0
- package/es/components/dataSourceComponents/fields/IdentityRecognition/index.js +38 -0
- package/es/components/dataSourceComponents/fields/IdentityRecognition/locales.d.ts +5 -0
- package/es/components/dataSourceComponents/fields/IdentityRecognition/locales.js +191 -0
- package/es/components/dataSourceComponents/fields/IdentityRecognition/model.d.ts +8 -0
- package/es/components/dataSourceComponents/fields/IdentityRecognition/model.js +77 -0
- package/es/components/dataSourceComponents/fields/IdentityRecognition/style.less +114 -0
- package/es/components/dataSourceComponents/fields/IdentityRecognition/types.d.ts +48 -0
- package/es/components/dataSourceComponents/fields/IdentityRecognition/useIdentityText.js +14 -0
- package/es/components/dataSourceComponents/fields/RecordListWrapper/index.d.ts +2 -2
- package/es/components/dataSourceComponents/fields/Select/index.d.ts +2 -2
- package/es/components/dataSourceComponents/fields/Tabs/index.d.ts +1 -2
- package/es/components/dataSourceComponents/fields/index.js +4 -1
- package/es/components/dataSourceComponents/fields/utils.js +2 -0
- package/es/components/date-picker/index.d.ts +1 -4
- package/es/components/drag-sort-tree/index.d.ts +1 -2
- package/es/components/dropdown/index.d.ts +1 -3
- package/es/components/filter/index.d.ts +1 -2
- package/es/components/hardwareErrorTip/errorCard/index.d.ts +0 -1
- package/es/components/hardwareErrorTip/errorTipStatistics/index.d.ts +0 -1
- package/es/components/hardwareErrorTip/logCard/index.d.ts +0 -1
- package/es/components/keyboard/index.d.ts +1 -1
- package/es/components/list/index.d.ts +2 -2
- package/es/components/lowCodePage/index.d.ts +1 -3
- package/es/components/page/index.d.ts +1 -2
- package/es/components/page-header/index.d.ts +1 -1
- package/es/components/pisellActionPanel/PisellActionPanel.d.ts +2 -2
- package/es/components/pisellAdjustPrice/PisellAdjustPriceInputNumber.d.ts +1 -2
- package/es/components/pisellAdjustPrice/index.d.ts +1 -2
- package/es/components/pisellAlert/index.d.ts +1 -1
- package/es/components/pisellBaseCard/PisellBaseCard.d.ts +2 -2
- package/es/components/pisellCalendar/PisellCalendar.d.ts +2 -2
- package/es/components/pisellCalendar/PisellCalendar.js +1 -1
- package/es/components/pisellCard/index.d.ts +1 -2
- package/es/components/pisellCheckboxGroup/index.d.ts +1 -1
- package/es/components/pisellCountdown/index.d.ts +1 -1
- package/es/components/pisellCustomerBrief/PisellCustomerBrief.d.ts +2 -2
- package/es/components/pisellDatePicker/index.d.ts +1 -4
- package/es/components/pisellDraggable/index.d.ts +1 -1
- package/es/components/pisellEmpty/index.d.ts +1 -1
- package/es/components/pisellEntityCard/PisellEntityCard.d.ts +2 -2
- package/es/components/pisellExport/PisellExport.d.ts +2 -2
- package/es/components/pisellFilter/index.d.ts +1 -2
- package/es/components/pisellFloatingPanel/index.d.ts +1 -1
- package/es/components/pisellFloorMapLayout/components/FigmaTableCard.d.ts +5 -5
- package/es/components/pisellFloorMapLayout/components/FloorMapBuiltinShapeElement.d.ts +2 -2
- package/es/components/pisellFloorMapLayout/components/FloorMapImageElement.d.ts +2 -3
- package/es/components/pisellFloorMapLayout/components/FloorMapSelectionZoneElement.d.ts +2 -2
- package/es/components/pisellFloorMapLayout/context/FloorMapLayoutContext.d.ts +1 -1
- package/es/components/pisellGantt/PisellGantt.d.ts +2 -2
- package/es/components/pisellGoodPassCard/index.d.ts +1 -1
- package/es/components/pisellGridPro/GridView/index.d.ts +1 -2
- package/es/components/pisellImport/PisellImport.d.ts +2 -2
- package/es/components/pisellInformationEntry/index.d.ts +1 -1
- package/es/components/pisellInput/components/BankCard/index.d.ts +0 -1
- package/es/components/pisellInput/components/Copy/index.d.ts +0 -1
- package/es/components/pisellInput/components/SecurityCode/index.d.ts +0 -1
- package/es/components/pisellInput/index.d.ts +5 -5
- package/es/components/pisellLoading/index.d.ts +1 -2
- package/es/components/pisellMobileDateRangePicker/PisellMobileDateRangePicker.js +1 -0
- package/es/components/pisellMobileDateRangePicker/types.d.ts +4 -3
- package/es/components/pisellModal/index.d.ts +2 -2
- package/es/components/pisellRecordBoard/shellFrame/Calendar/PisellRecordBoardCalendarView.d.ts +2 -2
- package/es/components/pisellReservationSchedule/PisellReservationSchedule.d.ts +1 -1
- package/es/components/pisellReservationScheduleBand/PisellReservationScheduleBand.d.ts +2 -2
- package/es/components/pisellRow/index.d.ts +1 -1
- package/es/components/pisellSort/index.d.ts +1 -2
- package/es/components/pisellStatisticList/index.d.ts +1 -1
- package/es/components/pisellTags/index.d.ts +1 -1
- package/es/components/pisellText/index.d.ts +2 -2
- package/es/components/pisellTimeNavigator/PisellTimeNavigator.d.ts +2 -2
- package/es/components/pisellTooltip/index.d.ts +1 -2
- package/es/components/pisellUpload/index.d.ts +1 -2
- package/es/components/pisellWalletPassCard/index.d.ts +1 -1
- package/es/components/qrcode/index.d.ts +1 -3
- package/es/components/radio/index.d.ts +1 -4
- package/es/components/section-footers/index.d.ts +1 -3
- package/es/components/segmented/index.d.ts +1 -2
- package/es/components/select-time/index.d.ts +1 -2
- package/es/components/skeleton/index.d.ts +1 -4
- package/es/components/slider/index.d.ts +1 -3
- package/es/components/tabs/index.d.ts +2 -2
- package/es/components/time-picker/index.d.ts +1 -4
- package/es/components/upload/index.d.ts +1 -4
- package/es/components/versionSelect/index.d.ts +0 -1
- package/es/components/virtual-keyboard/Amount/index.d.ts +1 -2
- package/es/components/virtual-keyboard/Number/index.d.ts +1 -2
- package/es/components/virtual-keyboard/Time/index.d.ts +1 -1
- package/es/components/virtual-keyboard/index.d.ts +1 -1
- package/es/index.d.ts +7 -1
- package/es/index.js +6 -1
- package/es/pisell-materials.tw.css +1 -1
- package/lib/components/PisellBasicGrid/PisellBasicGrid.d.ts +2 -2
- package/lib/components/PisellCards/components/GraphicTextCard/GraphicTextCard.d.ts +2 -2
- package/lib/components/PisellCards/components/MultilevelCard/MultilevelCard.d.ts +1 -1
- package/lib/components/PisellCards/components/PisellImageCard/PisellImageCard.d.ts +2 -2
- package/lib/components/PisellCards/components/TabCard/TabCard.d.ts +2 -2
- package/lib/components/PisellCards/components/TextCard/TextCard.d.ts +2 -2
- package/lib/components/PisellCards/index.d.ts +5 -6
- package/lib/components/PisellContactBrief/PisellContactBrief.d.ts +2 -2
- package/lib/components/PisellLayouts/index.d.ts +2 -2
- package/lib/components/PisellMetrics/index.d.ts +2 -2
- package/lib/components/appVersionControl/index.d.ts +2 -2
- package/lib/components/auto-complete-number/index.d.ts +2 -2
- package/lib/components/badge/index.d.ts +2 -2
- package/lib/components/batch-editor/index.d.ts +2 -2
- package/lib/components/calendar/index.d.ts +1 -3
- package/lib/components/cardMetricItem/index.d.ts +1 -1
- package/lib/components/cardPro/index.d.ts +2 -2
- package/lib/components/checkbox/index.d.ts +1 -3
- package/lib/components/classicLayout/index.d.ts +2 -2
- package/lib/components/config-provider/index.d.ts +2 -2
- package/lib/components/customSelect/index.d.ts +1 -1
- package/lib/components/dataSourceComponents/dataSourceForm/group/index.d.ts +1 -1
- package/lib/components/dataSourceComponents/dataSourceForm/submitButton/index.d.ts +1 -1
- package/lib/components/dataSourceComponents/dataSourceMenu/index.d.ts +1 -1
- package/lib/components/dataSourceComponents/dataSourceShow/dataSourceQRCode/index.d.ts +1 -3
- package/lib/components/dataSourceComponents/dataSourceShow/dataSourceTypography/index.d.ts +2 -2
- package/lib/components/dataSourceComponents/dataSourceWrapper/index.d.ts +2 -2
- package/lib/components/dataSourceComponents/fields/IdentityRecognition/IdentityRecognitionEditor.d.ts +15 -0
- package/lib/components/dataSourceComponents/fields/IdentityRecognition/IdentityRecognitionEditor.js +205 -0
- package/lib/components/dataSourceComponents/fields/IdentityRecognition/SortableList.js +68 -0
- package/lib/components/dataSourceComponents/fields/IdentityRecognition/config.d.ts +10 -0
- package/lib/components/dataSourceComponents/fields/IdentityRecognition/config.js +64 -0
- package/lib/components/dataSourceComponents/fields/IdentityRecognition/index.d.ts +25 -0
- package/lib/components/dataSourceComponents/fields/IdentityRecognition/index.js +41 -0
- package/lib/components/dataSourceComponents/fields/IdentityRecognition/locales.d.ts +5 -0
- package/lib/components/dataSourceComponents/fields/IdentityRecognition/locales.js +191 -0
- package/lib/components/dataSourceComponents/fields/IdentityRecognition/model.d.ts +8 -0
- package/lib/components/dataSourceComponents/fields/IdentityRecognition/model.js +81 -0
- package/lib/components/dataSourceComponents/fields/IdentityRecognition/style.less +114 -0
- package/lib/components/dataSourceComponents/fields/IdentityRecognition/types.d.ts +48 -0
- package/lib/components/dataSourceComponents/fields/IdentityRecognition/useIdentityText.js +15 -0
- package/lib/components/dataSourceComponents/fields/RecordListWrapper/index.d.ts +2 -2
- package/lib/components/dataSourceComponents/fields/Select/index.d.ts +2 -2
- package/lib/components/dataSourceComponents/fields/Tabs/index.d.ts +1 -2
- package/lib/components/dataSourceComponents/fields/index.js +32 -29
- package/lib/components/dataSourceComponents/fields/utils.js +2 -0
- package/lib/components/date-picker/index.d.ts +1 -3
- package/lib/components/drag-sort-tree/index.d.ts +2 -2
- package/lib/components/dropdown/index.d.ts +2 -3
- package/lib/components/filter/index.d.ts +2 -2
- package/lib/components/hardwareErrorTip/errorCard/index.d.ts +1 -1
- package/lib/components/hardwareErrorTip/errorTipStatistics/index.d.ts +1 -1
- package/lib/components/hardwareErrorTip/logCard/index.d.ts +1 -1
- package/lib/components/keyboard/index.d.ts +1 -1
- package/lib/components/list/index.d.ts +2 -2
- package/lib/components/lowCodePage/index.d.ts +2 -3
- package/lib/components/page/index.d.ts +2 -2
- package/lib/components/page-header/index.d.ts +1 -1
- package/lib/components/pisellActionPanel/PisellActionPanel.d.ts +2 -2
- package/lib/components/pisellAdjustPrice/PisellAdjustPriceInputNumber.d.ts +2 -2
- package/lib/components/pisellAdjustPrice/index.d.ts +2 -2
- package/lib/components/pisellAlert/index.d.ts +1 -1
- package/lib/components/pisellBaseCard/PisellBaseCard.d.ts +2 -2
- package/lib/components/pisellCalendar/PisellCalendar.d.ts +2 -2
- package/lib/components/pisellCalendar/PisellCalendar.js +1 -1
- package/lib/components/pisellCard/index.d.ts +2 -2
- package/lib/components/pisellCheckboxGroup/index.d.ts +1 -1
- package/lib/components/pisellCountdown/index.d.ts +1 -1
- package/lib/components/pisellCustomerBrief/PisellCustomerBrief.d.ts +2 -2
- package/lib/components/pisellDatePicker/index.d.ts +1 -3
- package/lib/components/pisellDraggable/index.d.ts +1 -1
- package/lib/components/pisellEmpty/index.d.ts +1 -1
- package/lib/components/pisellEntityCard/PisellEntityCard.d.ts +2 -2
- package/lib/components/pisellExport/PisellExport.d.ts +2 -2
- package/lib/components/pisellFilter/index.d.ts +2 -2
- package/lib/components/pisellFloatingPanel/index.d.ts +1 -1
- package/lib/components/pisellFloorMapLayout/components/FigmaTableCard.d.ts +5 -5
- package/lib/components/pisellFloorMapLayout/components/FloorMapBuiltinShapeElement.d.ts +2 -2
- package/lib/components/pisellFloorMapLayout/components/FloorMapImageElement.d.ts +2 -3
- package/lib/components/pisellFloorMapLayout/components/FloorMapSelectionZoneElement.d.ts +2 -2
- package/lib/components/pisellFloorMapLayout/context/FloorMapLayoutContext.d.ts +1 -1
- package/lib/components/pisellGantt/PisellGantt.d.ts +2 -2
- package/lib/components/pisellGoodPassCard/index.d.ts +1 -1
- package/lib/components/pisellGridPro/GridView/index.d.ts +2 -2
- package/lib/components/pisellImport/PisellImport.d.ts +2 -2
- package/lib/components/pisellInformationEntry/index.d.ts +1 -1
- package/lib/components/pisellInput/components/BankCard/index.d.ts +1 -1
- package/lib/components/pisellInput/components/Copy/index.d.ts +1 -1
- package/lib/components/pisellInput/components/SecurityCode/index.d.ts +1 -1
- package/lib/components/pisellInput/index.d.ts +5 -5
- package/lib/components/pisellLoading/index.d.ts +2 -2
- package/lib/components/pisellMobileDateRangePicker/PisellMobileDateRangePicker.js +1 -0
- package/lib/components/pisellMobileDateRangePicker/types.d.ts +4 -3
- package/lib/components/pisellModal/index.d.ts +2 -2
- package/lib/components/pisellRecordBoard/shellFrame/Calendar/PisellRecordBoardCalendarView.d.ts +2 -2
- package/lib/components/pisellReservationSchedule/PisellReservationSchedule.d.ts +1 -1
- package/lib/components/pisellReservationScheduleBand/PisellReservationScheduleBand.d.ts +2 -2
- package/lib/components/pisellRow/index.d.ts +1 -1
- package/lib/components/pisellSort/index.d.ts +2 -2
- package/lib/components/pisellStatisticList/index.d.ts +1 -1
- package/lib/components/pisellTags/index.d.ts +1 -1
- package/lib/components/pisellText/index.d.ts +2 -2
- package/lib/components/pisellTimeNavigator/PisellTimeNavigator.d.ts +2 -2
- package/lib/components/pisellTooltip/index.d.ts +2 -2
- package/lib/components/pisellUpload/index.d.ts +2 -2
- package/lib/components/pisellWalletPassCard/index.d.ts +1 -1
- package/lib/components/qrcode/index.d.ts +2 -3
- package/lib/components/radio/index.d.ts +1 -3
- package/lib/components/section-footers/index.d.ts +1 -3
- package/lib/components/segmented/index.d.ts +2 -2
- package/lib/components/select-time/index.d.ts +2 -2
- package/lib/components/skeleton/index.d.ts +1 -3
- package/lib/components/slider/index.d.ts +2 -3
- package/lib/components/tabs/index.d.ts +2 -2
- package/lib/components/time-picker/index.d.ts +1 -3
- package/lib/components/upload/index.d.ts +1 -3
- package/lib/components/versionSelect/index.d.ts +1 -1
- package/lib/components/virtual-keyboard/Amount/index.d.ts +2 -2
- package/lib/components/virtual-keyboard/Number/index.d.ts +2 -2
- package/lib/components/virtual-keyboard/Time/index.d.ts +1 -1
- package/lib/components/virtual-keyboard/index.d.ts +1 -1
- package/lib/index.d.ts +7 -1
- package/lib/index.js +115 -102
- package/lib/pisell-materials.tw.css +1 -1
- package/lowcode/_utils/identificationMeta.ts +59 -0
- package/lowcode/data-source-form/constants.ts +6 -0
- package/lowcode/data-source-form/utils.ts +20 -2
- package/lowcode/form-item-smart-locker-identification/meta.ts +8 -0
- package/lowcode/form-item-smart-locker-identification/snippets.ts +17 -0
- package/lowcode/form-item-vending-machine-identification/meta.ts +8 -0
- package/lowcode/form-item-vending-machine-identification/snippets.ts +17 -0
- package/package.json +19 -19
- package/lowcode/pisell-brand/meta.ts +0 -363
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { PisellBasicGridProps } from "./types.js";
|
|
2
|
-
import React from "react";
|
|
3
2
|
//#region src/components/PisellBasicGrid/PisellBasicGrid.d.ts
|
|
4
3
|
/**
|
|
5
4
|
* 使用 memo 优化组件性能
|
|
6
5
|
* @description 当 props 没有变化时,避免不必要的重新渲染
|
|
7
6
|
*/
|
|
8
|
-
declare const MemoizedPisellBasicGrid: <T>(props: PisellBasicGridProps<T>) =>
|
|
7
|
+
declare const MemoizedPisellBasicGrid: <T>(props: PisellBasicGridProps<T>) => JSX.Element;
|
|
9
8
|
//#endregion
|
|
10
9
|
export { MemoizedPisellBasicGrid };
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { GraphicTextCardProps } from "./types.js";
|
|
2
|
-
import React from "react";
|
|
3
2
|
//#region src/components/PisellCards/components/GraphicTextCard/GraphicTextCard.d.ts
|
|
4
3
|
/**
|
|
5
4
|
* Provider 包装器
|
|
6
5
|
* 兼容 PisellCards 系统的 props 传递方式
|
|
7
6
|
*/
|
|
8
|
-
declare const Provider: (props: GraphicTextCardProps) =>
|
|
7
|
+
declare const Provider: (props: GraphicTextCardProps) => JSX.Element;
|
|
9
8
|
//#endregion
|
|
10
9
|
export { Provider };
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { PisellImageCardProps } from "./types.js";
|
|
2
|
-
import React from "react";
|
|
3
2
|
//#region src/components/PisellCards/components/PisellImageCard/PisellImageCard.d.ts
|
|
4
3
|
/**
|
|
5
4
|
* Provider 包装器
|
|
6
5
|
* 兼容 PisellCards 系统的 props 传递方式
|
|
7
6
|
*/
|
|
8
|
-
declare const Provider: (props: PisellImageCardProps) =>
|
|
7
|
+
declare const Provider: (props: PisellImageCardProps) => JSX.Element;
|
|
9
8
|
//#endregion
|
|
10
9
|
export { Provider };
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import React from "react";
|
|
2
1
|
//#region src/components/PisellCards/components/TextCard/TextCard.d.ts
|
|
3
2
|
/**
|
|
4
3
|
* Provider 包装器
|
|
5
4
|
* 兼容 PisellCards 系统的 props 传递方式
|
|
6
5
|
*/
|
|
7
|
-
declare const Provider: (props: any) =>
|
|
6
|
+
declare const Provider: (props: any) => JSX.Element;
|
|
8
7
|
//#endregion
|
|
9
8
|
export { Provider };
|
|
@@ -6,15 +6,14 @@ import { EntityCardActionItem, EntityCardDensity, EntityCardLayout, EntityCardMe
|
|
|
6
6
|
import { PisellEntityCard } from "../pisellEntityCard/PisellEntityCard.js";
|
|
7
7
|
import { BadgeConfig, TabCardProps } from "./components/TabCard/types.js";
|
|
8
8
|
import { MultilevelCardProps } from "./components/MultilevelCard/types.js";
|
|
9
|
-
import * as _$react from "react";
|
|
10
9
|
|
|
11
10
|
//#region src/components/PisellCards/index.d.ts
|
|
12
11
|
declare const PisellCards: {
|
|
13
|
-
TabCard: (props: any) =>
|
|
14
|
-
TextCard: (props: any) =>
|
|
15
|
-
GraphicTextCard: (props: GraphicTextCardProps) =>
|
|
16
|
-
MultilevelCard: (props: any) =>
|
|
17
|
-
PisellImageCard: (props: PisellImageCardProps) =>
|
|
12
|
+
TabCard: (props: any) => JSX.Element;
|
|
13
|
+
TextCard: (props: any) => JSX.Element;
|
|
14
|
+
GraphicTextCard: (props: GraphicTextCardProps) => JSX.Element;
|
|
15
|
+
MultilevelCard: (props: any) => JSX.Element;
|
|
16
|
+
PisellImageCard: (props: PisellImageCardProps) => JSX.Element;
|
|
18
17
|
PisellEntityCard: typeof PisellEntityCard;
|
|
19
18
|
};
|
|
20
19
|
//#endregion
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { PisellContactBriefProps } from "./types.js";
|
|
2
|
-
import React from "react";
|
|
3
3
|
//#region src/components/PisellContactBrief/PisellContactBrief.d.ts
|
|
4
4
|
/**
|
|
5
5
|
* PisellContactBrief 联系人简要卡片
|
|
@@ -29,6 +29,6 @@ declare function PisellContactBrief({
|
|
|
29
29
|
clickable,
|
|
30
30
|
disabled,
|
|
31
31
|
onClick
|
|
32
|
-
}: PisellContactBriefProps):
|
|
32
|
+
}: PisellContactBriefProps): JSX.Element;
|
|
33
33
|
//#endregion
|
|
34
34
|
export { PisellContactBrief };
|
|
@@ -31,7 +31,7 @@ import * as _$react from "react";
|
|
|
31
31
|
* </PisellLayouts.ScrollView>
|
|
32
32
|
*/
|
|
33
33
|
declare const PisellLayouts: {
|
|
34
|
-
BasicGrid: <T>(props: PisellBasicGridProps<T>) =>
|
|
34
|
+
BasicGrid: <T>(props: PisellBasicGridProps<T>) => JSX.Element;
|
|
35
35
|
ScrollView: _$react.ForwardRefExoticComponent<Omit<PisellScrollViewProps, "ref"> & _$react.RefAttributes<PisellScrollViewRef>>;
|
|
36
36
|
FloorMapLayout: <T_1 extends FloorMapItemBase = FloorMapItemBase>(props: PisellFloorMapLayoutProps<T_1> & {
|
|
37
37
|
ref?: _$react.Ref<PisellFloorMapLayoutRef | null> | undefined;
|
|
@@ -42,7 +42,7 @@ declare const PisellLayouts: {
|
|
|
42
42
|
Header: _$react.FC<PisellHeaderProps>;
|
|
43
43
|
Sider: _$react.FC<PisellSiderProps>;
|
|
44
44
|
Container: <T_2 extends RenderType>(props: PisellContainerProps<T_2>) => any;
|
|
45
|
-
Row: (props: PisellRowProps) =>
|
|
45
|
+
Row: (props: PisellRowProps) => JSX.Element;
|
|
46
46
|
ViewGrid: _$react.FC<PisellViewGridProps>;
|
|
47
47
|
};
|
|
48
48
|
//#endregion
|
|
@@ -22,8 +22,8 @@ import * as _$react from "react";
|
|
|
22
22
|
*/
|
|
23
23
|
declare const PisellMetrics: {
|
|
24
24
|
MetricCard: _$react.FC<PisellMetricCardProps>;
|
|
25
|
-
StatisticList: (props: PisellStatisticListProps) =>
|
|
26
|
-
MetricItem: (props: PisellStatisticProps) =>
|
|
25
|
+
StatisticList: (props: PisellStatisticListProps) => JSX.Element;
|
|
26
|
+
MetricItem: (props: PisellStatisticProps) => JSX.Element;
|
|
27
27
|
};
|
|
28
28
|
//#endregion
|
|
29
29
|
export { PisellMetrics };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { AppVersionControlProps } from "./types.js";
|
|
2
|
-
import React from "react";
|
|
3
2
|
//#region src/components/appVersionControl/index.d.ts
|
|
4
|
-
declare const AppVersionControl: (props: AppVersionControlProps) =>
|
|
3
|
+
declare const AppVersionControl: (props: AppVersionControlProps) => JSX.Element;
|
|
5
4
|
//#endregion
|
|
6
5
|
export { AppVersionControl };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import React from "react";
|
|
2
1
|
import { AutoCompleteProps, InputNumberProps } from "antd";
|
|
3
2
|
|
|
4
3
|
//#region src/components/auto-complete-number/index.d.ts
|
|
@@ -8,6 +7,6 @@ interface AutoCompleteNumberProps {
|
|
|
8
7
|
value?: any;
|
|
9
8
|
onChange?: any;
|
|
10
9
|
}
|
|
11
|
-
declare const AutoCompleteNumber: (props: AutoCompleteNumberProps) =>
|
|
10
|
+
declare const AutoCompleteNumber: (props: AutoCompleteNumberProps) => JSX.Element;
|
|
12
11
|
//#endregion
|
|
13
12
|
export { AutoCompleteNumber };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import React from "react";
|
|
2
1
|
//#region src/components/batch-editor/index.d.ts
|
|
3
2
|
interface BatchEditorProps {
|
|
4
3
|
columns: any[];
|
|
@@ -7,6 +6,6 @@ interface BatchEditorProps {
|
|
|
7
6
|
rowKey: string;
|
|
8
7
|
otherTableProps: any;
|
|
9
8
|
}
|
|
10
|
-
declare const BatchEditor: (props: BatchEditorProps) =>
|
|
9
|
+
declare const BatchEditor: (props: BatchEditorProps) => JSX.Element;
|
|
11
10
|
//#endregion
|
|
12
11
|
export { BatchEditor };
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import * as _$react from "react";
|
|
3
|
-
|
|
4
1
|
//#region src/components/calendar/index.d.ts
|
|
5
|
-
declare const Calendar: (props: any) =>
|
|
2
|
+
declare const Calendar: (props: any) => JSX.Element;
|
|
6
3
|
//#endregion
|
|
7
4
|
export { Calendar };
|
|
@@ -11,6 +11,6 @@ interface PisellStatisticProps {
|
|
|
11
11
|
showCurrencySymbol?: boolean;
|
|
12
12
|
style?: any;
|
|
13
13
|
}
|
|
14
|
-
declare const CardMetricItem: (props: PisellStatisticProps) =>
|
|
14
|
+
declare const CardMetricItem: (props: PisellStatisticProps) => JSX.Element;
|
|
15
15
|
//#endregion
|
|
16
16
|
export { CardMetricItem, PisellStatisticProps };
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import * as _$react from "react";
|
|
3
|
-
|
|
4
1
|
//#region src/components/checkbox/index.d.ts
|
|
5
|
-
declare const Checkbox: (props: any) =>
|
|
2
|
+
declare const Checkbox: (props: any) => JSX.Element;
|
|
6
3
|
//#endregion
|
|
7
4
|
export { Checkbox };
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import React from "react";
|
|
2
1
|
import { ConfigProviderProps } from "antd/es/config-provider";
|
|
3
2
|
|
|
4
3
|
//#region src/components/config-provider/index.d.ts
|
|
5
4
|
interface ConfigProviderProps$1 extends ConfigProviderProps {
|
|
6
5
|
[key: string]: any;
|
|
7
6
|
}
|
|
8
|
-
declare const ConfigProvider: (props: ConfigProviderProps$1) =>
|
|
7
|
+
declare const ConfigProvider: (props: ConfigProviderProps$1) => JSX.Element;
|
|
9
8
|
//#endregion
|
|
10
9
|
export { ConfigProvider, ConfigProviderProps$1 as ConfigProviderProps };
|
|
@@ -13,6 +13,6 @@ interface CustomSelectProps<T extends BaseOption> extends Omit<SelectProps<T['va
|
|
|
13
13
|
className?: string;
|
|
14
14
|
style?: React.CSSProperties;
|
|
15
15
|
}
|
|
16
|
-
declare const CustomSelect: <T extends BaseOption>(props: CustomSelectProps<T>) =>
|
|
16
|
+
declare const CustomSelect: <T extends BaseOption>(props: CustomSelectProps<T>) => JSX.Element;
|
|
17
17
|
//#endregion
|
|
18
18
|
export { CustomSelect };
|
|
@@ -16,6 +16,6 @@ interface FormGroupProps {
|
|
|
16
16
|
* @Author: shengjie.zuo
|
|
17
17
|
* @Date: 2024-11-25 17:14:25
|
|
18
18
|
*/
|
|
19
|
-
declare const FormGroup: (props: FormGroupProps) =>
|
|
19
|
+
declare const FormGroup: (props: FormGroupProps) => JSX.Element;
|
|
20
20
|
//#endregion
|
|
21
21
|
export { FormGroup };
|
|
@@ -35,6 +35,6 @@ interface SubmitButtonProps extends ButtonProps {
|
|
|
35
35
|
placement: 'top' | 'topLeft' | 'topRight' | 'bottom' | 'bottomLeft' | 'bottomRight';
|
|
36
36
|
};
|
|
37
37
|
}
|
|
38
|
-
declare const SubmitButton: (props: SubmitButtonProps) =>
|
|
38
|
+
declare const SubmitButton: (props: SubmitButtonProps) => JSX.Element | null;
|
|
39
39
|
//#endregion
|
|
40
40
|
export { SubmitButton };
|
|
@@ -6,6 +6,6 @@ import React from "react";
|
|
|
6
6
|
* @title: 数据源表单组件
|
|
7
7
|
* @description: 基于数据源动态生成表单,支持编辑、查看、禁用三种模式
|
|
8
8
|
*/
|
|
9
|
-
declare const DataSourceMenu: (props: PisellMenuProps, ref: React.Ref<any>) =>
|
|
9
|
+
declare const DataSourceMenu: (props: PisellMenuProps, ref: React.Ref<any>) => JSX.Element;
|
|
10
10
|
//#endregion
|
|
11
11
|
export { DataSourceMenu };
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import * as _$react from "react";
|
|
3
|
-
|
|
4
1
|
//#region src/components/dataSourceComponents/dataSourceShow/dataSourceQRCode/index.d.ts
|
|
5
|
-
declare const DataSourceQRCode: (props: any) =>
|
|
2
|
+
declare const DataSourceQRCode: (props: any) => JSX.Element;
|
|
6
3
|
//#endregion
|
|
7
4
|
export { DataSourceQRCode };
|
|
@@ -7,8 +7,8 @@ interface DataSourceTypographyProps {
|
|
|
7
7
|
children: React.ReactNode;
|
|
8
8
|
}
|
|
9
9
|
declare const DataSourceTypography: {
|
|
10
|
-
(props: DataSourceTypographyProps):
|
|
11
|
-
Text: (props: ParsedProps) =>
|
|
10
|
+
(props: DataSourceTypographyProps): JSX.Element;
|
|
11
|
+
Text: (props: ParsedProps) => JSX.Element;
|
|
12
12
|
};
|
|
13
13
|
//#endregion
|
|
14
14
|
export { DataSourceTypography };
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { DataSourceContextProps } from "../provider/dataSource/DataSourceContext.js";
|
|
2
|
-
import React from "react";
|
|
3
2
|
|
|
4
3
|
//#region src/components/dataSourceComponents/dataSourceWrapper/index.d.ts
|
|
5
|
-
declare const DataSourceWrapper: (props: DataSourceContextProps) =>
|
|
4
|
+
declare const DataSourceWrapper: (props: DataSourceContextProps) => JSX.Element;
|
|
6
5
|
//#endregion
|
|
7
6
|
export { DataSourceWrapper };
|
package/es/components/dataSourceComponents/fields/IdentityRecognition/IdentityRecognitionEditor.d.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { IdentityRecognitionProps } from "./types.js";
|
|
3
|
+
//#region src/components/dataSourceComponents/fields/IdentityRecognition/IdentityRecognitionEditor.d.ts
|
|
4
|
+
declare function IdentityRecognitionEditor({
|
|
5
|
+
config,
|
|
6
|
+
value,
|
|
7
|
+
onChange,
|
|
8
|
+
disabled,
|
|
9
|
+
readOnly,
|
|
10
|
+
renderMode,
|
|
11
|
+
className,
|
|
12
|
+
style
|
|
13
|
+
}: IdentityRecognitionProps): JSX.Element;
|
|
14
|
+
//#endregion
|
|
15
|
+
export { IdentityRecognitionEditor };
|
package/es/components/dataSourceComponents/fields/IdentityRecognition/IdentityRecognitionEditor.js
ADDED
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
import { _objectSpread2 } from "../../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectSpread2.js";
|
|
2
|
+
import PisellModal from "../../../pisellModal/index.js";
|
|
3
|
+
import useIdentityText from "./useIdentityText.js";
|
|
4
|
+
import SortableList from "./SortableList.js";
|
|
5
|
+
import { canDisableVerification, createIdentityDraft, validateIdentityRow } from "./model.js";
|
|
6
|
+
import React, { useEffect, useRef, useState } from "react";
|
|
7
|
+
import { Alert, Button, Card, Drawer, Grid, Switch, Typography, theme } from "antd";
|
|
8
|
+
import { CloseOutlined } from "@ant-design/icons";
|
|
9
|
+
import isEqual from "lodash/isEqual";
|
|
10
|
+
import "./style.less";
|
|
11
|
+
//#region src/components/dataSourceComponents/fields/IdentityRecognition/IdentityRecognitionEditor.tsx
|
|
12
|
+
function IdentityRecognitionEditor({ config, value, onChange, disabled, readOnly, renderMode, className, style }) {
|
|
13
|
+
const t = useIdentityText();
|
|
14
|
+
const { token } = theme.useToken();
|
|
15
|
+
const padding = Grid.useBreakpoint().sm === false ? token.padding : token.paddingLG;
|
|
16
|
+
const themeStyle = {
|
|
17
|
+
"--identity-border": token.colorBorderSecondary,
|
|
18
|
+
"--identity-radius": `${token.borderRadiusLG}px`,
|
|
19
|
+
"--identity-background": token.colorBgContainer,
|
|
20
|
+
"--identity-text": token.colorText,
|
|
21
|
+
"--identity-muted": token.colorTextTertiary,
|
|
22
|
+
"--identity-hover": token.colorFillTertiary,
|
|
23
|
+
"--identity-primary": token.colorPrimary,
|
|
24
|
+
"--identity-error": token.colorError,
|
|
25
|
+
"--identity-font-size": `${token.fontSize}px`,
|
|
26
|
+
"--identity-font-family": token.fontFamily
|
|
27
|
+
};
|
|
28
|
+
const [draft, setDraft] = useState(null);
|
|
29
|
+
const initialDraft = useRef(null);
|
|
30
|
+
const [confirmClose, setConfirmClose] = useState(false);
|
|
31
|
+
const [errors, setErrors] = useState({});
|
|
32
|
+
const isDisabled = disabled || renderMode === "disabled";
|
|
33
|
+
const locked = isDisabled || readOnly || renderMode === "view" || renderMode === "tableView";
|
|
34
|
+
useEffect(() => {
|
|
35
|
+
setDraft(null);
|
|
36
|
+
initialDraft.current = null;
|
|
37
|
+
setConfirmClose(false);
|
|
38
|
+
setErrors({});
|
|
39
|
+
}, [value, config]);
|
|
40
|
+
const rows = Array.isArray(value) ? value.filter((row) => row && config.methods.some((method) => method.id === row.id)) : [];
|
|
41
|
+
const activeMethod = config.methods.find((method) => method.id === (draft === null || draft === void 0 ? void 0 : draft.id));
|
|
42
|
+
const close = () => {
|
|
43
|
+
setDraft(null);
|
|
44
|
+
initialDraft.current = null;
|
|
45
|
+
setConfirmClose(false);
|
|
46
|
+
setErrors({});
|
|
47
|
+
};
|
|
48
|
+
const requestClose = () => {
|
|
49
|
+
if (draft && !isEqual(draft, initialDraft.current)) setConfirmClose(true);
|
|
50
|
+
else close();
|
|
51
|
+
};
|
|
52
|
+
const updateSettings = (id, settings) => {
|
|
53
|
+
if (!draft || locked) return;
|
|
54
|
+
setDraft(_objectSpread2(_objectSpread2({}, draft), {}, { settings: _objectSpread2(_objectSpread2({}, draft.settings), {}, { [id]: settings }) }));
|
|
55
|
+
setErrors((current) => {
|
|
56
|
+
const next = _objectSpread2({}, current);
|
|
57
|
+
delete next[id];
|
|
58
|
+
return next;
|
|
59
|
+
});
|
|
60
|
+
};
|
|
61
|
+
const save = () => {
|
|
62
|
+
if (!draft || locked) return;
|
|
63
|
+
const nextErrors = validateIdentityRow(draft, config, t);
|
|
64
|
+
setErrors(nextErrors);
|
|
65
|
+
if (Object.keys(nextErrors).length) return;
|
|
66
|
+
onChange === null || onChange === void 0 || onChange(rows.map((row) => row.id === draft.id ? _objectSpread2(_objectSpread2({}, row), {}, { settings: draft.settings }) : row));
|
|
67
|
+
close();
|
|
68
|
+
};
|
|
69
|
+
const sortingText = {
|
|
70
|
+
reorderLabel: (method) => t("reorder", { method }),
|
|
71
|
+
instructions: t("sortInstructions")
|
|
72
|
+
};
|
|
73
|
+
return /* @__PURE__ */ React.createElement("div", {
|
|
74
|
+
className: `identity-recognition ${className || ""}`,
|
|
75
|
+
style: _objectSpread2(_objectSpread2({}, themeStyle), style)
|
|
76
|
+
}, !rows.length && /* @__PURE__ */ React.createElement(Alert, {
|
|
77
|
+
type: "info",
|
|
78
|
+
message: t("empty")
|
|
79
|
+
}), /* @__PURE__ */ React.createElement(SortableList, _objectSpread2(_objectSpread2({
|
|
80
|
+
items: rows,
|
|
81
|
+
disabled: locked
|
|
82
|
+
}, sortingText), {}, {
|
|
83
|
+
label: (row) => t(config.methods.find((method) => method.id === row.id).label),
|
|
84
|
+
onChange: (next) => onChange === null || onChange === void 0 ? void 0 : onChange(next)
|
|
85
|
+
}), (row) => {
|
|
86
|
+
const label = t(config.methods.find((item) => item.id === row.id).label);
|
|
87
|
+
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("span", { className: "identity-recognition__label" }, label), /* @__PURE__ */ React.createElement(Button, {
|
|
88
|
+
disabled: isDisabled,
|
|
89
|
+
"aria-label": t("settingsTitle", { method: label }),
|
|
90
|
+
onClick: () => {
|
|
91
|
+
const nextDraft = createIdentityDraft(row, config);
|
|
92
|
+
initialDraft.current = nextDraft;
|
|
93
|
+
setDraft(nextDraft);
|
|
94
|
+
setConfirmClose(false);
|
|
95
|
+
setErrors({});
|
|
96
|
+
}
|
|
97
|
+
}, t("settings")), /* @__PURE__ */ React.createElement(Switch, {
|
|
98
|
+
"aria-label": t("enable", { method: label }),
|
|
99
|
+
checked: row.enabled === true,
|
|
100
|
+
disabled: locked,
|
|
101
|
+
onChange: (enabled) => onChange === null || onChange === void 0 ? void 0 : onChange(rows.map((item) => item.id === row.id ? _objectSpread2(_objectSpread2({}, item), {}, { enabled }) : item))
|
|
102
|
+
}));
|
|
103
|
+
}), /* @__PURE__ */ React.createElement(Drawer, {
|
|
104
|
+
open: !!draft,
|
|
105
|
+
onClose: requestClose,
|
|
106
|
+
width: 720,
|
|
107
|
+
rootClassName: "identity-recognition-drawer",
|
|
108
|
+
rootStyle: themeStyle,
|
|
109
|
+
contentWrapperStyle: { maxWidth: "100vw" },
|
|
110
|
+
destroyOnClose: true,
|
|
111
|
+
styles: {
|
|
112
|
+
header: { padding: `${token.padding}px ${padding}px` },
|
|
113
|
+
body: {
|
|
114
|
+
padding,
|
|
115
|
+
background: token.colorBgLayout
|
|
116
|
+
},
|
|
117
|
+
footer: { padding: `${token.paddingSM}px ${padding}px` }
|
|
118
|
+
},
|
|
119
|
+
closable: false,
|
|
120
|
+
extra: /* @__PURE__ */ React.createElement(Button, {
|
|
121
|
+
type: "text",
|
|
122
|
+
"aria-label": t("close"),
|
|
123
|
+
title: t("close"),
|
|
124
|
+
icon: /* @__PURE__ */ React.createElement(CloseOutlined, null),
|
|
125
|
+
onClick: requestClose
|
|
126
|
+
}),
|
|
127
|
+
title: /* @__PURE__ */ React.createElement("div", { className: "identity-recognition__drawer-heading" }, /* @__PURE__ */ React.createElement(Typography.Text, {
|
|
128
|
+
type: "secondary",
|
|
129
|
+
style: {
|
|
130
|
+
fontSize: token.fontSizeSM,
|
|
131
|
+
fontWeight: 400
|
|
132
|
+
}
|
|
133
|
+
}, t("sharedMethod")), /* @__PURE__ */ React.createElement(Typography.Text, {
|
|
134
|
+
strong: true,
|
|
135
|
+
style: { fontSize: token.fontSizeLG }
|
|
136
|
+
}, activeMethod ? t("settingsTitle", { method: t(activeMethod.label) }) : t("settings"))),
|
|
137
|
+
footer: /* @__PURE__ */ React.createElement("div", { className: "identity-recognition__footer" }, /* @__PURE__ */ React.createElement(Button, { onClick: requestClose }, t(locked ? "close" : "cancel")), !locked && /* @__PURE__ */ React.createElement(Button, {
|
|
138
|
+
type: "primary",
|
|
139
|
+
onClick: save
|
|
140
|
+
}, t("save")))
|
|
141
|
+
}, /* @__PURE__ */ React.createElement("div", { className: "identity-recognition__groups" }, draft && activeMethod && config.groups.map((group) => {
|
|
142
|
+
const settings = draft.settings[group.id];
|
|
143
|
+
const groupTitle = t(group.title);
|
|
144
|
+
return /* @__PURE__ */ React.createElement(Card, {
|
|
145
|
+
key: group.id,
|
|
146
|
+
className: "identity-recognition__group",
|
|
147
|
+
role: "region",
|
|
148
|
+
"aria-label": groupTitle,
|
|
149
|
+
headStyle: {
|
|
150
|
+
padding: `${token.padding}px ${padding}px`,
|
|
151
|
+
minHeight: "auto"
|
|
152
|
+
},
|
|
153
|
+
bodyStyle: { padding },
|
|
154
|
+
title: /* @__PURE__ */ React.createElement("div", { className: "identity-recognition__group-heading" }, /* @__PURE__ */ React.createElement(Typography.Text, { strong: true }, groupTitle), /* @__PURE__ */ React.createElement(Typography.Text, {
|
|
155
|
+
type: "secondary",
|
|
156
|
+
style: {
|
|
157
|
+
fontWeight: 400,
|
|
158
|
+
fontSize: token.fontSizeSM
|
|
159
|
+
}
|
|
160
|
+
}, t("groupDescription")))
|
|
161
|
+
}, /* @__PURE__ */ React.createElement("div", { className: "identity-recognition__section" }, /* @__PURE__ */ React.createElement("div", { className: "identity-recognition__verification" }, /* @__PURE__ */ React.createElement("div", { className: "identity-recognition__field-heading" }, /* @__PURE__ */ React.createElement(Typography.Text, { strong: true }, t("requireVerification")), /* @__PURE__ */ React.createElement(Typography.Text, { type: "secondary" }, t("verificationHint"))), /* @__PURE__ */ React.createElement(Switch, {
|
|
162
|
+
"aria-label": `${groupTitle}: ${t("requireVerification")}`,
|
|
163
|
+
checked: settings.requireVerification,
|
|
164
|
+
disabled: locked,
|
|
165
|
+
onChange: (requireVerification) => updateSettings(group.id, _objectSpread2(_objectSpread2({}, settings), {}, { requireVerification }))
|
|
166
|
+
})), settings.requireVerification && /* @__PURE__ */ React.createElement("div", { className: "identity-recognition__methods" }, /* @__PURE__ */ React.createElement("div", { className: "identity-recognition__field-heading" }, /* @__PURE__ */ React.createElement(Typography.Text, { strong: true }, t("verificationMethods")), /* @__PURE__ */ React.createElement(Typography.Text, { type: "secondary" }, t("sortHint"))), /* @__PURE__ */ React.createElement(SortableList, _objectSpread2(_objectSpread2({
|
|
167
|
+
items: settings.methods,
|
|
168
|
+
disabled: locked || !settings.requireVerification
|
|
169
|
+
}, sortingText), {}, {
|
|
170
|
+
label: (item) => t(activeMethod.verificationMethods.find((method) => method.id === item.id).label),
|
|
171
|
+
onChange: (methods) => updateSettings(group.id, _objectSpread2(_objectSpread2({}, settings), {}, { methods }))
|
|
172
|
+
}), (item) => {
|
|
173
|
+
const method = activeMethod.verificationMethods.find((entry) => entry.id === item.id);
|
|
174
|
+
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("span", { className: "identity-recognition__label" }, t(method.label)), /* @__PURE__ */ React.createElement(Switch, {
|
|
175
|
+
"aria-label": `${groupTitle}: ${t(method.label)}`,
|
|
176
|
+
checked: item.enabled,
|
|
177
|
+
disabled: locked || !settings.requireVerification || !canDisableVerification(settings, item.id),
|
|
178
|
+
onChange: (enabled) => updateSettings(group.id, _objectSpread2(_objectSpread2({}, settings), {}, { methods: settings.methods.map((entry) => entry.id === item.id ? _objectSpread2(_objectSpread2({}, entry), {}, { enabled }) : entry) }))
|
|
179
|
+
}));
|
|
180
|
+
})), errors[group.id] && /* @__PURE__ */ React.createElement("div", {
|
|
181
|
+
role: "alert",
|
|
182
|
+
className: "identity-recognition__error"
|
|
183
|
+
}, errors[group.id])));
|
|
184
|
+
}))), /* @__PURE__ */ React.createElement(PisellModal, {
|
|
185
|
+
open: confirmClose,
|
|
186
|
+
title: t("unsavedTitle"),
|
|
187
|
+
onCancel: () => setConfirmClose(false),
|
|
188
|
+
onOk: close,
|
|
189
|
+
okText: t("discardChanges"),
|
|
190
|
+
cancelText: t("continueEditing"),
|
|
191
|
+
size: "small",
|
|
192
|
+
closable: false,
|
|
193
|
+
headerDivider: false,
|
|
194
|
+
footerDivider: false,
|
|
195
|
+
keyboard: true,
|
|
196
|
+
mobileModalHeight: "auto",
|
|
197
|
+
wrapClassName: "identity-recognition-confirm",
|
|
198
|
+
centered: true
|
|
199
|
+
}, t("unsavedDescription")));
|
|
200
|
+
}
|
|
201
|
+
//#endregion
|
|
202
|
+
export { IdentityRecognitionEditor as default };
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { _objectSpread2 } from "../../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectSpread2.js";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { HolderOutlined } from "@ant-design/icons";
|
|
4
|
+
import { DndContext, PointerSensor, useSensor, useSensors } from "@dnd-kit/core";
|
|
5
|
+
import { SortableContext, arrayMove, useSortable, verticalListSortingStrategy } from "@dnd-kit/sortable";
|
|
6
|
+
import { CSS } from "@dnd-kit/utilities";
|
|
7
|
+
import { restrictToVerticalAxis } from "@dnd-kit/modifiers";
|
|
8
|
+
//#region src/components/dataSourceComponents/fields/IdentityRecognition/SortableList.tsx
|
|
9
|
+
function SortableRow({ id, label, disabled, onMove, children }) {
|
|
10
|
+
const { setNodeRef, setActivatorNodeRef, attributes, listeners, transform, transition, isDragging } = useSortable({
|
|
11
|
+
id,
|
|
12
|
+
disabled
|
|
13
|
+
});
|
|
14
|
+
return /* @__PURE__ */ React.createElement("div", {
|
|
15
|
+
ref: setNodeRef,
|
|
16
|
+
className: "identity-recognition__row",
|
|
17
|
+
role: "listitem",
|
|
18
|
+
style: {
|
|
19
|
+
transform: CSS.Transform.toString(transform),
|
|
20
|
+
transition,
|
|
21
|
+
position: "relative",
|
|
22
|
+
zIndex: isDragging ? 1 : void 0
|
|
23
|
+
}
|
|
24
|
+
}, /* @__PURE__ */ React.createElement("button", _objectSpread2(_objectSpread2(_objectSpread2({}, attributes), listeners), {}, {
|
|
25
|
+
ref: setActivatorNodeRef,
|
|
26
|
+
type: "button",
|
|
27
|
+
className: "identity-recognition__handle",
|
|
28
|
+
disabled,
|
|
29
|
+
"aria-label": label,
|
|
30
|
+
"aria-keyshortcuts": "Alt+ArrowUp Alt+ArrowDown",
|
|
31
|
+
onKeyDown: (event) => {
|
|
32
|
+
if (!disabled && event.altKey && ["ArrowUp", "ArrowDown"].includes(event.key)) {
|
|
33
|
+
event.preventDefault();
|
|
34
|
+
onMove(event.key === "ArrowUp" ? -1 : 1);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}), /* @__PURE__ */ React.createElement(HolderOutlined, null)), children);
|
|
38
|
+
}
|
|
39
|
+
function SortableList({ items, disabled, label, reorderLabel, instructions, onChange, children }) {
|
|
40
|
+
const sensors = useSensors(useSensor(PointerSensor, { activationConstraint: { distance: 6 } }));
|
|
41
|
+
const move = (from, to) => {
|
|
42
|
+
if (!disabled && from >= 0 && to >= 0 && to < items.length && from !== to) onChange(arrayMove(items, from, to));
|
|
43
|
+
};
|
|
44
|
+
return /* @__PURE__ */ React.createElement(DndContext, {
|
|
45
|
+
sensors,
|
|
46
|
+
accessibility: { screenReaderInstructions: { draggable: instructions } },
|
|
47
|
+
modifiers: [restrictToVerticalAxis],
|
|
48
|
+
onDragEnd: ({ active, over }) => {
|
|
49
|
+
if (over) move(items.findIndex((item) => item.id === active.id), items.findIndex((item) => item.id === over.id));
|
|
50
|
+
}
|
|
51
|
+
}, /* @__PURE__ */ React.createElement(SortableContext, {
|
|
52
|
+
items: items.map((item) => item.id),
|
|
53
|
+
strategy: verticalListSortingStrategy
|
|
54
|
+
}, /* @__PURE__ */ React.createElement("div", {
|
|
55
|
+
className: "identity-recognition__list",
|
|
56
|
+
role: "list"
|
|
57
|
+
}, items.map((item, index) => /* @__PURE__ */ React.createElement(SortableRow, {
|
|
58
|
+
key: item.id,
|
|
59
|
+
id: item.id,
|
|
60
|
+
label: reorderLabel(label(item)),
|
|
61
|
+
disabled,
|
|
62
|
+
onMove: (direction) => move(index, index + direction)
|
|
63
|
+
}, children(item))))));
|
|
64
|
+
}
|
|
65
|
+
//#endregion
|
|
66
|
+
export { SortableList as default };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { IdentityConfig } from "./types.js";
|
|
2
|
+
|
|
3
|
+
//#region src/components/dataSourceComponents/fields/IdentityRecognition/config.d.ts
|
|
4
|
+
declare const identificationConfigs: {
|
|
5
|
+
SmartLockerIdentification: IdentityConfig;
|
|
6
|
+
VendingMachineIdentification: IdentityConfig;
|
|
7
|
+
};
|
|
8
|
+
declare const isIdentificationInterface: (value: unknown) => value is "SmartLockerIdentification" | "VendingMachineIdentification";
|
|
9
|
+
//#endregion
|
|
10
|
+
export { identificationConfigs, isIdentificationInterface };
|