@pisell/materials 6.5.2 → 6.5.4
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 +7 -7
- package/build/lowcode/preview.js +150 -150
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +23 -22
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +30 -29
- package/es/components/auto-complete-number/index.d.ts +0 -1
- package/es/components/auto-resize-text/auto-text-size-standalone.d.ts +20 -0
- package/es/components/auto-resize-text/auto-text-size-standalone.js +258 -0
- package/es/components/auto-resize-text/index.d.ts +6 -0
- package/es/components/auto-resize-text/index.js +40 -0
- package/es/components/badge/index.d.ts +0 -1
- package/es/components/batch-editor/fields/index.d.ts +0 -1
- package/es/components/batch-editor/index.d.ts +1 -0
- package/es/components/calendar/index.d.ts +0 -1
- package/es/components/checkbox/index.d.ts +0 -1
- package/es/components/classicLayout/index.d.ts +0 -1
- package/es/components/colorPicker/index.d.ts +0 -1
- package/es/components/config-provider/index.d.ts +0 -1
- package/es/components/dataSourceComponents/dataSourceShow/dataSourceImage/index.d.ts +1 -0
- package/es/components/dataSourceComponents/dataSourceShow/dataSourceQRCode/index.d.ts +1 -0
- package/es/components/dataSourceComponents/dataSourceTable/BaseTable.js +11 -4
- package/es/components/dataSourceComponents/dataSourceTable/filter/index.d.ts +2 -0
- package/es/components/dataSourceComponents/dataSourceTable/filter/index.js +7 -2
- package/es/components/dataSourceComponents/dataSourceTable/filter/utils.d.ts +1 -0
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +6 -7
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.js +11 -4
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableQuery.d.ts +3 -1
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableQuery.js +92 -6
- package/es/components/dataSourceComponents/dataSourceTable/type.d.ts +5 -0
- package/es/components/dataSourceComponents/dataSourceWrapper/index.d.ts +1 -0
- package/es/components/dataSourceComponents/fields/ColorPicker/ReadPretty.d.ts +0 -1
- package/es/components/dataSourceComponents/fields/DateRangePicker/ReadPretty.d.ts +0 -1
- package/es/components/dataSourceComponents/fields/IconSelect/ReadPretty.d.ts +0 -1
- package/es/components/dataSourceComponents/fields/Input/ReadPretty.d.ts +0 -1
- package/es/components/dataSourceComponents/fields/Input.Email/ReadPretty.d.ts +0 -1
- package/es/components/dataSourceComponents/fields/Input.Subdomain/ReadPretty.d.ts +0 -1
- package/es/components/dataSourceComponents/fields/Input.TextArea/ReadPretty.d.ts +0 -1
- package/es/components/dataSourceComponents/fields/Input.Url/ReadPretty.d.ts +0 -1
- package/es/components/dataSourceComponents/fields/Select/index.d.ts +1 -0
- package/es/components/dataSourceComponents/fields/TimePicker/ReadPretty.d.ts +0 -1
- package/es/components/dataSourceComponents/fields/Translation/ReadPretty.d.ts +0 -1
- package/es/components/dataSourceComponents/fields/Upload/ReadPretty.d.ts +1 -0
- package/es/components/dataSourceComponents/fields/Upload/utils.d.ts +1 -1
- package/es/components/dataSourceComponents/fields/index.d.ts +4 -3
- package/es/components/date-picker/datePickerCpt.d.ts +1 -0
- package/es/components/date-picker/index.d.ts +1 -0
- package/es/components/dropdown/index.d.ts +0 -1
- package/es/components/filter/components/items/index.d.ts +0 -1
- package/es/components/filter/components/items/text/Editor/index.d.ts +0 -1
- package/es/components/filter/components/items/text/Preview/index.d.ts +0 -1
- package/es/components/filter/components/items/text/index.d.ts +0 -1
- package/es/components/filter/index.d.ts +1 -0
- package/es/components/filter/types.d.ts +2 -0
- package/es/components/iconfont/index.d.ts +8 -0
- package/es/components/iconfont/index.js +1 -1
- package/es/components/keyboard/index.d.ts +22 -0
- package/es/components/keyboard/index.js +159 -0
- package/es/components/keyboard/index.less +44 -0
- package/es/components/list/index.d.ts +1 -0
- package/es/components/pisell-config-provider/context.d.ts +22 -0
- package/es/components/pisellAdjustPrice/index.d.ts +1 -0
- package/es/components/pisellAdjustPrice/status.d.ts +32 -0
- package/es/components/pisellAdjustPrice/type.d.ts +22 -0
- package/es/components/pisellCard/index.d.ts +0 -1
- package/es/components/pisellCheckboxGroup/index.d.ts +40 -0
- package/es/components/pisellDatePicker/index.d.ts +0 -1
- package/es/components/pisellInput/components/Copy/index.d.ts +1 -0
- package/es/components/pisellInput/index.d.ts +1 -0
- package/es/components/pisellQRScanner/index.d.ts +0 -13
- package/es/components/pisellQRScanner/index.js +0 -8
- package/es/components/pisellText/components/Amount/index.d.ts +20 -0
- package/es/components/pisellToast/index.d.ts +17 -0
- package/es/components/pisellToast/squareToast/index.d.ts +15 -0
- package/es/components/pisellToast/squareToast/methods.d.ts +13 -0
- package/es/components/pisellToast/squareToast/renderImperatively.d.ts +29 -0
- package/es/components/pisellToast/squareToast/toast.d.ts +25 -0
- package/es/components/pisellUpload/index.d.ts +0 -1
- package/es/components/pisellWalletPassCard/index.d.ts +1 -1
- package/es/components/pisellWalletPassCard/index.js +6 -3
- package/es/components/productCard/cartSkuCard/components/AmountFooter/index.d.ts +4 -0
- package/es/components/productCard/cartSkuCard/components/MultiDay/index.d.ts +4 -0
- package/es/components/productCard/cartSkuCard/components/MultiDay/utils.d.ts +14 -0
- package/es/components/productCard/cartSkuCard/components/Note/index.d.ts +4 -0
- package/es/components/productCard/cartSkuCard/components/basicInfo/index.d.ts +27 -0
- package/es/components/productCard/cartSkuCard/components/discountReason/index.d.ts +3 -0
- package/es/components/productCard/cartSkuCard/components/holders/index.d.ts +4 -0
- package/es/components/productCard/cartSkuCard/components/packages/index.d.ts +11 -0
- package/es/components/productCard/cartSkuCard/components/packages/utils.d.ts +20 -0
- package/es/components/productCard/cartSkuCard/components/resources/index.d.ts +4 -0
- package/es/components/productCard/cartSkuCard/components/sales/index.d.ts +13 -0
- package/es/components/productCard/cartSkuCard/components/specs/index.d.ts +4 -0
- package/es/components/productCard/cartSkuCard/components/swipeAction/index.d.ts +46 -0
- package/es/components/productCard/cartSkuCard/components/swipeAction/index.js +73 -5
- package/es/components/productCard/cartSkuCard/components/swipeAction/index.less +39 -0
- package/es/components/productCard/cartSkuCard/components/timeRange/index.d.ts +7 -0
- package/es/components/productCard/cartSkuCard/index.d.ts +11 -0
- package/es/components/productCard/cartSkuCard/index.js +2 -11
- package/es/components/productCard/cartSkuCard/locales.d.ts +96 -0
- package/es/components/productCard/components/Action/index.d.ts +3 -0
- package/es/components/productCard/components/Divider/index.d.ts +0 -1
- package/es/components/productCard/components/Header/index.d.ts +1 -0
- package/es/components/productCard/components/Packages/utils.d.ts +1 -1
- package/es/components/productCard/components/Sales/index.d.ts +4 -0
- package/es/components/productCard/components/Time/components/Like/index.d.ts +0 -1
- package/es/components/productCard/components/Time/components/SelectHolderModal/index.d.ts +14 -0
- package/es/components/productCard/locales.d.ts +84 -0
- package/es/components/radio/index.d.ts +0 -1
- package/es/components/segmented/index.d.ts +0 -1
- package/es/components/select-time/RightPanel/index.d.ts +0 -1
- package/es/components/skeleton/index.d.ts +0 -1
- package/es/components/slider/index.d.ts +0 -1
- package/es/components/sort/components/InlineMenu/index.d.ts +0 -1
- package/es/components/table/Actions/component/GallerySetting/index.d.ts +1 -0
- package/es/components/table/Actions/component/Group/index.d.ts +1 -0
- package/es/components/table/Actions/index.d.ts +1 -0
- package/es/components/table/BasicTable/index.d.ts +1 -0
- package/es/components/table/Gallery/components/GalleryItem/components/Cover/index.d.ts +1 -0
- package/es/components/table/Gallery/components/GalleryItem/components/Title/index.d.ts +1 -0
- package/es/components/table/Summary/index.d.ts +0 -1
- package/es/components/table/Table/SelectField/index.d.ts +1 -0
- package/es/components/table/Table/fields/date/Config/index.d.ts +0 -1
- package/es/components/table/Table/fields/date/Sort/index.d.ts +0 -1
- package/es/components/table/Table/fields/date/index.d.ts +1 -0
- package/es/components/table/Table/fields/image/Config/index.d.ts +0 -1
- package/es/components/table/Table/fields/image/Sort/index.d.ts +0 -1
- package/es/components/table/Table/fields/image/index.d.ts +0 -1
- package/es/components/table/Table/fields/index.d.ts +1 -0
- package/es/components/table/Table/fields/link/Config/index.d.ts +0 -1
- package/es/components/table/Table/fields/link/Sort/index.d.ts +0 -1
- package/es/components/table/Table/fields/number/Config/index.d.ts +0 -1
- package/es/components/table/Table/fields/number/Sort/index.d.ts +0 -1
- package/es/components/table/Table/fields/numberRange/Config/index.d.ts +0 -1
- package/es/components/table/Table/fields/numberRange/Sort/index.d.ts +0 -1
- package/es/components/table/Table/fields/oldRangePicker/Config/index.d.ts +0 -1
- package/es/components/table/Table/fields/oldRangePicker/Show/index.d.ts +0 -1
- package/es/components/table/Table/fields/oldRangePicker/Sort/index.d.ts +0 -1
- package/es/components/table/Table/fields/oldRangePicker/index.d.ts +1 -0
- package/es/components/table/Table/fields/pSwitch/Config/index.d.ts +0 -1
- package/es/components/table/Table/fields/pSwitch/Sort/index.d.ts +0 -1
- package/es/components/table/Table/fields/pSwitch/index.d.ts +0 -1
- package/es/components/table/Table/fields/rangePicker/Config/index.d.ts +0 -1
- package/es/components/table/Table/fields/rangePicker/Show/index.d.ts +0 -1
- package/es/components/table/Table/fields/rangePicker/Sort/index.d.ts +0 -1
- package/es/components/table/Table/fields/rangePicker/index.d.ts +1 -0
- package/es/components/table/Table/fields/search/Config/index.d.ts +0 -1
- package/es/components/table/Table/fields/search/Sort/index.d.ts +0 -1
- package/es/components/table/Table/fields/select/Config/index.d.ts +0 -1
- package/es/components/table/Table/fields/select/Show/index.d.ts +0 -1
- package/es/components/table/Table/fields/select/Sort/index.d.ts +0 -1
- package/es/components/table/Table/fields/select/index.d.ts +1 -0
- package/es/components/table/Table/fields/text/Config/index.d.ts +0 -1
- package/es/components/table/Table/fields/text/Show/index.d.ts +1 -0
- package/es/components/table/Table/fields/text/Sort/index.d.ts +0 -1
- package/es/components/table/Table/fields/text/index.d.ts +1 -0
- package/es/components/table/Table/fields/treeSelect/Config/index.d.ts +0 -1
- package/es/components/table/Table/fields/treeSelect/Show/index.d.ts +0 -1
- package/es/components/table/Table/fields/treeSelect/Sort/index.d.ts +0 -1
- package/es/components/table/Table/tableConfig/SortRow/index.d.ts +1 -0
- package/es/components/table/Table/tableConfig/summary/index.d.ts +0 -1
- package/es/components/table/Table/utils.d.ts +1 -1
- package/es/components/table/Table/utils.js +22 -1
- package/es/components/table/TableFilter/SortIcon.d.ts +0 -1
- package/es/components/table/View/index.d.ts +1 -0
- package/es/components/table/hooks/useTableSetting.d.ts +3 -4
- package/es/components/table/hooks/useTableSetting.js +113 -5
- package/es/components/table/index.js +14 -3
- package/es/components/table/types.d.ts +17 -0
- package/es/components/time-picker/index.d.ts +0 -1
- package/es/components/upload/index.d.ts +0 -1
- package/es/components/versionSelect/index.d.ts +1 -0
- package/es/components/virtual-keyboard/Amount/index.d.ts +6 -0
- package/es/components/virtual-keyboard/Amount/themeConfig.d.ts +32 -0
- package/es/components/virtual-keyboard/Amount/types.d.ts +44 -0
- package/es/components/virtual-keyboard/BaseNumberKeyboard/Presets.d.ts +5 -2
- package/es/components/virtual-keyboard/BaseNumberKeyboard/Presets.js +21 -7
- package/es/components/virtual-keyboard/BaseNumberKeyboard/Presets.less +9 -5
- package/es/components/virtual-keyboard/BaseNumberKeyboard/index.d.ts +25 -0
- package/es/components/virtual-keyboard/BaseNumberKeyboard/index.js +44 -25
- package/es/components/virtual-keyboard/Keyboard/index.d.ts +21 -0
- package/es/components/virtual-keyboard/Number/index.d.ts +6 -0
- package/es/components/virtual-keyboard/Number/themeConfig.d.ts +32 -0
- package/es/components/virtual-keyboard/Number/types.d.ts +26 -0
- package/es/components/virtual-keyboard/Time/utils.d.ts +0 -1
- package/es/components/virtual-keyboard/VirtualKeyInput/index.d.ts +13 -0
- package/es/components/virtual-keyboard/index.d.ts +25 -0
- package/es/components/virtualInput/BaseVirtualInput/index.d.ts +40 -0
- package/es/components/virtualInput/BaseVirtualInput/index.js +163 -0
- package/es/components/virtualInput/BaseVirtualInput/index.less +77 -0
- package/es/components/virtualInput/index.d.ts +24 -0
- package/es/components/virtualInput/index.js +60 -0
- package/es/components/virtualInput/index.less +42 -0
- package/es/components/walletCard/Guest/index.d.ts +0 -1
- package/es/components/walletCard/Guide/index.d.ts +0 -1
- package/es/index.d.ts +3 -0
- package/es/index.js +4 -1
- package/es/locales/en-US.d.ts +1 -0
- package/es/locales/en-US.js +1 -0
- package/es/locales/zh-CN.d.ts +1 -0
- package/es/locales/zh-CN.js +1 -0
- package/es/locales/zh-TW.d.ts +1 -0
- package/es/locales/zh-TW.js +1 -0
- package/es/utils/platform.d.ts +1 -1
- package/lib/components/auto-complete-number/index.d.ts +0 -1
- package/lib/components/auto-resize-text/auto-text-size-standalone.d.ts +20 -0
- package/lib/components/auto-resize-text/auto-text-size-standalone.js +273 -0
- package/lib/components/auto-resize-text/index.d.ts +6 -0
- package/lib/components/auto-resize-text/index.js +71 -0
- package/lib/components/badge/index.d.ts +0 -1
- package/lib/components/batch-editor/fields/index.d.ts +0 -1
- package/lib/components/batch-editor/index.d.ts +1 -0
- package/lib/components/calendar/index.d.ts +0 -1
- package/lib/components/checkbox/index.d.ts +0 -1
- package/lib/components/classicLayout/index.d.ts +0 -1
- package/lib/components/colorPicker/index.d.ts +0 -1
- package/lib/components/config-provider/index.d.ts +0 -1
- package/lib/components/dataSourceComponents/dataSourceShow/dataSourceImage/index.d.ts +1 -0
- package/lib/components/dataSourceComponents/dataSourceShow/dataSourceQRCode/index.d.ts +1 -0
- package/lib/components/dataSourceComponents/dataSourceTable/BaseTable.js +8 -2
- package/lib/components/dataSourceComponents/dataSourceTable/filter/index.d.ts +2 -0
- package/lib/components/dataSourceComponents/dataSourceTable/filter/index.js +7 -2
- package/lib/components/dataSourceComponents/dataSourceTable/filter/utils.d.ts +1 -0
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +6 -7
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.js +11 -4
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableQuery.d.ts +3 -1
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableQuery.js +78 -7
- package/lib/components/dataSourceComponents/dataSourceTable/type.d.ts +5 -0
- package/lib/components/dataSourceComponents/dataSourceWrapper/index.d.ts +1 -0
- package/lib/components/dataSourceComponents/fields/ColorPicker/ReadPretty.d.ts +0 -1
- package/lib/components/dataSourceComponents/fields/DateRangePicker/ReadPretty.d.ts +0 -1
- package/lib/components/dataSourceComponents/fields/IconSelect/ReadPretty.d.ts +0 -1
- package/lib/components/dataSourceComponents/fields/Input/ReadPretty.d.ts +0 -1
- package/lib/components/dataSourceComponents/fields/Input.Email/ReadPretty.d.ts +0 -1
- package/lib/components/dataSourceComponents/fields/Input.Subdomain/ReadPretty.d.ts +0 -1
- package/lib/components/dataSourceComponents/fields/Input.TextArea/ReadPretty.d.ts +0 -1
- package/lib/components/dataSourceComponents/fields/Input.Url/ReadPretty.d.ts +0 -1
- package/lib/components/dataSourceComponents/fields/Select/index.d.ts +1 -0
- package/lib/components/dataSourceComponents/fields/TimePicker/ReadPretty.d.ts +0 -1
- package/lib/components/dataSourceComponents/fields/Translation/ReadPretty.d.ts +0 -1
- package/lib/components/dataSourceComponents/fields/Upload/ReadPretty.d.ts +1 -0
- package/lib/components/dataSourceComponents/fields/Upload/utils.d.ts +1 -1
- package/lib/components/dataSourceComponents/fields/index.d.ts +4 -3
- package/lib/components/date-picker/datePickerCpt.d.ts +1 -0
- package/lib/components/date-picker/index.d.ts +1 -0
- package/lib/components/dropdown/index.d.ts +0 -1
- package/lib/components/filter/components/items/index.d.ts +0 -1
- package/lib/components/filter/components/items/text/Editor/index.d.ts +0 -1
- package/lib/components/filter/components/items/text/Preview/index.d.ts +0 -1
- package/lib/components/filter/components/items/text/index.d.ts +0 -1
- package/lib/components/filter/index.d.ts +1 -0
- package/lib/components/filter/types.d.ts +2 -0
- package/lib/components/iconfont/index.d.ts +8 -0
- package/lib/components/iconfont/index.js +1 -1
- package/lib/components/keyboard/index.d.ts +22 -0
- package/lib/components/keyboard/index.js +223 -0
- package/lib/components/keyboard/index.less +44 -0
- package/lib/components/list/index.d.ts +1 -0
- package/lib/components/pisell-config-provider/context.d.ts +22 -0
- package/lib/components/pisellAdjustPrice/index.d.ts +1 -0
- package/lib/components/pisellAdjustPrice/status.d.ts +32 -0
- package/lib/components/pisellAdjustPrice/type.d.ts +22 -0
- package/lib/components/pisellCard/index.d.ts +0 -1
- package/lib/components/pisellCheckboxGroup/index.d.ts +40 -0
- package/lib/components/pisellDatePicker/index.d.ts +0 -1
- package/lib/components/pisellInput/components/Copy/index.d.ts +1 -0
- package/lib/components/pisellInput/index.d.ts +1 -0
- package/lib/components/pisellQRScanner/index.d.ts +0 -13
- package/lib/components/pisellText/components/Amount/index.d.ts +20 -0
- package/lib/components/pisellToast/index.d.ts +17 -0
- package/lib/components/pisellToast/squareToast/index.d.ts +15 -0
- package/lib/components/pisellToast/squareToast/methods.d.ts +13 -0
- package/lib/components/pisellToast/squareToast/renderImperatively.d.ts +29 -0
- package/lib/components/pisellToast/squareToast/toast.d.ts +25 -0
- package/lib/components/pisellUpload/index.d.ts +0 -1
- package/lib/components/pisellWalletPassCard/index.d.ts +1 -1
- package/lib/components/pisellWalletPassCard/index.js +7 -2
- package/lib/components/productCard/cartSkuCard/components/AmountFooter/index.d.ts +4 -0
- package/lib/components/productCard/cartSkuCard/components/MultiDay/index.d.ts +4 -0
- package/lib/components/productCard/cartSkuCard/components/MultiDay/utils.d.ts +14 -0
- package/lib/components/productCard/cartSkuCard/components/Note/index.d.ts +4 -0
- package/lib/components/productCard/cartSkuCard/components/basicInfo/index.d.ts +27 -0
- package/lib/components/productCard/cartSkuCard/components/discountReason/index.d.ts +3 -0
- package/lib/components/productCard/cartSkuCard/components/holders/index.d.ts +4 -0
- package/lib/components/productCard/cartSkuCard/components/packages/index.d.ts +11 -0
- package/lib/components/productCard/cartSkuCard/components/packages/utils.d.ts +20 -0
- package/lib/components/productCard/cartSkuCard/components/resources/index.d.ts +4 -0
- package/lib/components/productCard/cartSkuCard/components/sales/index.d.ts +13 -0
- package/lib/components/productCard/cartSkuCard/components/specs/index.d.ts +4 -0
- package/lib/components/productCard/cartSkuCard/components/swipeAction/index.d.ts +46 -0
- package/lib/components/productCard/cartSkuCard/components/swipeAction/index.js +45 -11
- package/lib/components/productCard/cartSkuCard/components/swipeAction/index.less +39 -0
- package/lib/components/productCard/cartSkuCard/components/timeRange/index.d.ts +7 -0
- package/lib/components/productCard/cartSkuCard/index.d.ts +11 -0
- package/lib/components/productCard/cartSkuCard/index.js +2 -13
- package/lib/components/productCard/cartSkuCard/locales.d.ts +96 -0
- package/lib/components/productCard/components/Action/index.d.ts +3 -0
- package/lib/components/productCard/components/Divider/index.d.ts +0 -1
- package/lib/components/productCard/components/Header/index.d.ts +1 -0
- package/lib/components/productCard/components/Packages/utils.d.ts +1 -1
- package/lib/components/productCard/components/Sales/index.d.ts +4 -0
- package/lib/components/productCard/components/Time/components/Like/index.d.ts +0 -1
- package/lib/components/productCard/components/Time/components/SelectHolderModal/index.d.ts +14 -0
- package/lib/components/productCard/locales.d.ts +84 -0
- package/lib/components/radio/index.d.ts +0 -1
- package/lib/components/segmented/index.d.ts +0 -1
- package/lib/components/select-time/RightPanel/index.d.ts +0 -1
- package/lib/components/skeleton/index.d.ts +0 -1
- package/lib/components/slider/index.d.ts +0 -1
- package/lib/components/sort/components/InlineMenu/index.d.ts +0 -1
- package/lib/components/table/Actions/component/GallerySetting/index.d.ts +1 -0
- package/lib/components/table/Actions/component/Group/index.d.ts +1 -0
- package/lib/components/table/Actions/index.d.ts +1 -0
- package/lib/components/table/BasicTable/index.d.ts +1 -0
- package/lib/components/table/Gallery/components/GalleryItem/components/Cover/index.d.ts +1 -0
- package/lib/components/table/Gallery/components/GalleryItem/components/Title/index.d.ts +1 -0
- package/lib/components/table/Summary/index.d.ts +0 -1
- package/lib/components/table/Table/SelectField/index.d.ts +1 -0
- package/lib/components/table/Table/fields/date/Config/index.d.ts +0 -1
- package/lib/components/table/Table/fields/date/Sort/index.d.ts +0 -1
- package/lib/components/table/Table/fields/date/index.d.ts +1 -0
- package/lib/components/table/Table/fields/image/Config/index.d.ts +0 -1
- package/lib/components/table/Table/fields/image/Sort/index.d.ts +0 -1
- package/lib/components/table/Table/fields/image/index.d.ts +0 -1
- package/lib/components/table/Table/fields/index.d.ts +1 -0
- package/lib/components/table/Table/fields/link/Config/index.d.ts +0 -1
- package/lib/components/table/Table/fields/link/Sort/index.d.ts +0 -1
- package/lib/components/table/Table/fields/number/Config/index.d.ts +0 -1
- package/lib/components/table/Table/fields/number/Sort/index.d.ts +0 -1
- package/lib/components/table/Table/fields/numberRange/Config/index.d.ts +0 -1
- package/lib/components/table/Table/fields/numberRange/Sort/index.d.ts +0 -1
- package/lib/components/table/Table/fields/oldRangePicker/Config/index.d.ts +0 -1
- package/lib/components/table/Table/fields/oldRangePicker/Show/index.d.ts +0 -1
- package/lib/components/table/Table/fields/oldRangePicker/Sort/index.d.ts +0 -1
- package/lib/components/table/Table/fields/oldRangePicker/index.d.ts +1 -0
- package/lib/components/table/Table/fields/pSwitch/Config/index.d.ts +0 -1
- package/lib/components/table/Table/fields/pSwitch/Sort/index.d.ts +0 -1
- package/lib/components/table/Table/fields/pSwitch/index.d.ts +0 -1
- package/lib/components/table/Table/fields/rangePicker/Config/index.d.ts +0 -1
- package/lib/components/table/Table/fields/rangePicker/Show/index.d.ts +0 -1
- package/lib/components/table/Table/fields/rangePicker/Sort/index.d.ts +0 -1
- package/lib/components/table/Table/fields/rangePicker/index.d.ts +1 -0
- package/lib/components/table/Table/fields/search/Config/index.d.ts +0 -1
- package/lib/components/table/Table/fields/search/Sort/index.d.ts +0 -1
- package/lib/components/table/Table/fields/select/Config/index.d.ts +0 -1
- package/lib/components/table/Table/fields/select/Show/index.d.ts +0 -1
- package/lib/components/table/Table/fields/select/Sort/index.d.ts +0 -1
- package/lib/components/table/Table/fields/select/index.d.ts +1 -0
- package/lib/components/table/Table/fields/text/Config/index.d.ts +0 -1
- package/lib/components/table/Table/fields/text/Show/index.d.ts +1 -0
- package/lib/components/table/Table/fields/text/Sort/index.d.ts +0 -1
- package/lib/components/table/Table/fields/text/index.d.ts +1 -0
- package/lib/components/table/Table/fields/treeSelect/Config/index.d.ts +0 -1
- package/lib/components/table/Table/fields/treeSelect/Show/index.d.ts +0 -1
- package/lib/components/table/Table/fields/treeSelect/Sort/index.d.ts +0 -1
- package/lib/components/table/Table/tableConfig/SortRow/index.d.ts +1 -0
- package/lib/components/table/Table/tableConfig/summary/index.d.ts +0 -1
- package/lib/components/table/Table/utils.d.ts +1 -1
- package/lib/components/table/Table/utils.js +18 -1
- package/lib/components/table/TableFilter/SortIcon.d.ts +0 -1
- package/lib/components/table/View/index.d.ts +1 -0
- package/lib/components/table/hooks/useTableSetting.d.ts +3 -4
- package/lib/components/table/hooks/useTableSetting.js +114 -4
- package/lib/components/table/index.js +12 -1
- package/lib/components/table/types.d.ts +17 -0
- package/lib/components/time-picker/index.d.ts +0 -1
- package/lib/components/upload/index.d.ts +0 -1
- package/lib/components/versionSelect/index.d.ts +1 -0
- package/lib/components/virtual-keyboard/Amount/index.d.ts +6 -0
- package/lib/components/virtual-keyboard/Amount/themeConfig.d.ts +32 -0
- package/lib/components/virtual-keyboard/Amount/types.d.ts +44 -0
- package/lib/components/virtual-keyboard/BaseNumberKeyboard/Presets.d.ts +5 -2
- package/lib/components/virtual-keyboard/BaseNumberKeyboard/Presets.js +19 -2
- package/lib/components/virtual-keyboard/BaseNumberKeyboard/Presets.less +9 -5
- package/lib/components/virtual-keyboard/BaseNumberKeyboard/index.d.ts +25 -0
- package/lib/components/virtual-keyboard/BaseNumberKeyboard/index.js +45 -27
- package/lib/components/virtual-keyboard/Keyboard/index.d.ts +21 -0
- package/lib/components/virtual-keyboard/Number/index.d.ts +6 -0
- package/lib/components/virtual-keyboard/Number/themeConfig.d.ts +32 -0
- package/lib/components/virtual-keyboard/Number/types.d.ts +26 -0
- package/lib/components/virtual-keyboard/Time/utils.d.ts +0 -1
- package/lib/components/virtual-keyboard/VirtualKeyInput/index.d.ts +13 -0
- package/lib/components/virtual-keyboard/index.d.ts +25 -0
- package/lib/components/virtualInput/BaseVirtualInput/index.d.ts +40 -0
- package/lib/components/virtualInput/BaseVirtualInput/index.js +179 -0
- package/lib/components/virtualInput/BaseVirtualInput/index.less +77 -0
- package/lib/components/virtualInput/index.d.ts +24 -0
- package/lib/components/virtualInput/index.js +102 -0
- package/lib/components/virtualInput/index.less +42 -0
- package/lib/components/walletCard/Guest/index.d.ts +0 -1
- package/lib/components/walletCard/Guide/index.d.ts +0 -1
- package/lib/index.d.ts +3 -0
- package/lib/index.js +9 -0
- package/lib/locales/en-US.d.ts +1 -0
- package/lib/locales/en-US.js +1 -0
- package/lib/locales/zh-CN.d.ts +1 -0
- package/lib/locales/zh-CN.js +1 -0
- package/lib/locales/zh-TW.d.ts +1 -0
- package/lib/locales/zh-TW.js +1 -0
- package/lib/utils/platform.d.ts +1 -1
- package/lowcode/auto-resize-text/meta.ts +9431 -0
- package/lowcode/data-source-table/meta.ts +239 -0
- package/lowcode/table/meta.ts +104 -0
- package/package.json +1 -1
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './index.less';
|
|
3
|
+
export declare type ItemValue = string | number;
|
|
4
|
+
export interface Item {
|
|
5
|
+
value: ItemValue;
|
|
6
|
+
label: React.ReactNode;
|
|
7
|
+
disabled: boolean;
|
|
8
|
+
type: 'text' | 'primary';
|
|
9
|
+
style?: React.CSSProperties;
|
|
10
|
+
size?: number;
|
|
11
|
+
}
|
|
12
|
+
export interface KeyboardProps {
|
|
13
|
+
className?: string;
|
|
14
|
+
style?: React.CSSProperties;
|
|
15
|
+
onChange?: (value?: ItemValue) => void;
|
|
16
|
+
items?: Item[];
|
|
17
|
+
rightItems?: Item[];
|
|
18
|
+
keydown?: boolean;
|
|
19
|
+
}
|
|
20
|
+
declare const _default: React.MemoExoticComponent<(props: KeyboardProps) => JSX.Element>;
|
|
21
|
+
export default _default;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export declare const numberThemeConfig: {
|
|
2
|
+
dark: {
|
|
3
|
+
backgroundColor: string;
|
|
4
|
+
containerBackgroundColor: string;
|
|
5
|
+
buttonBackgroundColor: string;
|
|
6
|
+
textColor: string;
|
|
7
|
+
resetButtonBackgroundColor: string;
|
|
8
|
+
resetButtonTextColor: string;
|
|
9
|
+
isDoneButtonFollowTheme: boolean;
|
|
10
|
+
doneButtonBackgroundColor: string;
|
|
11
|
+
doneButtonTextColor: string;
|
|
12
|
+
keyboardBackgroundColor: string;
|
|
13
|
+
keyboardButtonBackgroundColor: string;
|
|
14
|
+
keyboardButtonTextColor: string;
|
|
15
|
+
keyboardButtonHoverColor: string;
|
|
16
|
+
};
|
|
17
|
+
light: {
|
|
18
|
+
backgroundColor: string;
|
|
19
|
+
containerBackgroundColor: string;
|
|
20
|
+
buttonBackgroundColor: string;
|
|
21
|
+
textColor: string;
|
|
22
|
+
resetButtonBackgroundColor: string;
|
|
23
|
+
resetButtonTextColor: string;
|
|
24
|
+
isDoneButtonFollowTheme: boolean;
|
|
25
|
+
doneButtonBackgroundColor: string;
|
|
26
|
+
doneButtonTextColor: string;
|
|
27
|
+
keyboardBackgroundColor: string;
|
|
28
|
+
keyboardButtonBackgroundColor: string;
|
|
29
|
+
keyboardButtonTextColor: string;
|
|
30
|
+
keyboardButtonHoverColor: string;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export interface NumberProps {
|
|
2
|
+
max?: number;
|
|
3
|
+
min?: number;
|
|
4
|
+
doneText?: string;
|
|
5
|
+
resetText: string;
|
|
6
|
+
defaultValue?: string | number;
|
|
7
|
+
placeholder?: string;
|
|
8
|
+
value?: string | number;
|
|
9
|
+
onChange?: (val: string | number) => void;
|
|
10
|
+
onEnter?: (val: string | number) => void;
|
|
11
|
+
defaultSelect?: boolean;
|
|
12
|
+
selectType?: 'light' | 'dark';
|
|
13
|
+
backgroundColor?: string;
|
|
14
|
+
containerBackgroundColor?: string;
|
|
15
|
+
buttonBackgroundColor?: string;
|
|
16
|
+
textColor?: string;
|
|
17
|
+
resetButtonBackgroundColor?: string;
|
|
18
|
+
resetButtonTextColor?: string;
|
|
19
|
+
isDoneButtonFollowTheme?: boolean;
|
|
20
|
+
doneButtonBackgroundColor?: string;
|
|
21
|
+
doneButtonTextColor?: string;
|
|
22
|
+
keyboardBackgroundColor?: string;
|
|
23
|
+
keyboardButtonBackgroundColor?: string;
|
|
24
|
+
keyboardButtonTextColor?: string;
|
|
25
|
+
keyboardButtonHoverColor?: string;
|
|
26
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { InputProps } from 'antd';
|
|
3
|
+
import './index.less';
|
|
4
|
+
export interface VirtualKeyInputProps extends InputProps {
|
|
5
|
+
previewValue?: string;
|
|
6
|
+
renderInput?: (props: any) => any;
|
|
7
|
+
showDelete?: boolean;
|
|
8
|
+
onValueSelect?: (selected: boolean) => void;
|
|
9
|
+
defaultSelect?: boolean;
|
|
10
|
+
style?: React.CSSProperties;
|
|
11
|
+
}
|
|
12
|
+
declare const VirtualKeyInput: (props: VirtualKeyInputProps) => JSX.Element;
|
|
13
|
+
export default VirtualKeyInput;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { KeyboardProps } from "./Keyboard";
|
|
3
|
+
import { VirtualKeyInputProps } from "./VirtualKeyInput";
|
|
4
|
+
import "./index.less";
|
|
5
|
+
interface VirtualKeyboardProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
6
|
+
keyboardProps?: KeyboardProps;
|
|
7
|
+
virtualKeyInputProps?: VirtualKeyInputProps;
|
|
8
|
+
rightPanel?: React.ReactNode;
|
|
9
|
+
style?: React.CSSProperties;
|
|
10
|
+
onChange?: (value?: any) => void;
|
|
11
|
+
value?: string;
|
|
12
|
+
selectType?: 'light' | 'dark';
|
|
13
|
+
backgroundColor?: string;
|
|
14
|
+
containerBackgroundColor?: string;
|
|
15
|
+
buttonBackgroundColor?: string;
|
|
16
|
+
textColor?: string;
|
|
17
|
+
keyboardBackgroundColor?: string;
|
|
18
|
+
keyboardButtonBackgroundColor?: string;
|
|
19
|
+
keyboardButtonTextColor?: string;
|
|
20
|
+
keyboardButtonHoverColor?: string;
|
|
21
|
+
primaryButtonBackgroundColor?: string;
|
|
22
|
+
primaryButtonTextColor?: string;
|
|
23
|
+
}
|
|
24
|
+
declare const VirtualKeyboard: (props: VirtualKeyboardProps) => JSX.Element;
|
|
25
|
+
export default VirtualKeyboard;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './index.less';
|
|
3
|
+
export interface BaseVirtualInputProps {
|
|
4
|
+
/** 输入值 */
|
|
5
|
+
value?: string | React.ReactNode;
|
|
6
|
+
/** 占位符 */
|
|
7
|
+
placeholder?: string;
|
|
8
|
+
/** 是否自动聚焦 */
|
|
9
|
+
autoFocus?: boolean;
|
|
10
|
+
/** 是否禁用 */
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
/** 组件高度,默认60px */
|
|
13
|
+
height?: number | string;
|
|
14
|
+
/** 字体大小,默认48px,如果不设置会根据高度自动计算 */
|
|
15
|
+
fontSize?: number | string;
|
|
16
|
+
/** 聚焦回调 */
|
|
17
|
+
onFocus?: () => void;
|
|
18
|
+
/** 失焦回调 */
|
|
19
|
+
onBlur?: () => void;
|
|
20
|
+
/** 文字位置 */
|
|
21
|
+
textAlign?: 'start' | 'center' | 'end';
|
|
22
|
+
/** 自定义样式 */
|
|
23
|
+
style?: React.CSSProperties;
|
|
24
|
+
/** 自定义类名 */
|
|
25
|
+
className?: string;
|
|
26
|
+
/** showCursor */
|
|
27
|
+
showCursor?: boolean;
|
|
28
|
+
/** 防止失焦的元素选择器或ref */
|
|
29
|
+
preventBlurElements?: Array<string | React.RefObject<HTMLElement>>;
|
|
30
|
+
/** 是否聚焦(受控模式) */
|
|
31
|
+
focused?: boolean;
|
|
32
|
+
}
|
|
33
|
+
export interface BaseVirtualInputRef {
|
|
34
|
+
/** 手动聚焦 */
|
|
35
|
+
focus: () => void;
|
|
36
|
+
/** 手动失焦 */
|
|
37
|
+
blur: () => void;
|
|
38
|
+
}
|
|
39
|
+
declare const BaseVirtualInput: React.ForwardRefExoticComponent<BaseVirtualInputProps & React.RefAttributes<BaseVirtualInputRef>>;
|
|
40
|
+
export default BaseVirtualInput;
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
8
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
9
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
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
|
+
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
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
13
|
+
import React, { useState, useCallback, useEffect, useRef, forwardRef, useImperativeHandle } from 'react';
|
|
14
|
+
import classNames from 'classnames';
|
|
15
|
+
import AutoResizeText from "../../auto-resize-text";
|
|
16
|
+
import "./index.less";
|
|
17
|
+
var BaseVirtualInput = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
18
|
+
var _props$value = props.value,
|
|
19
|
+
value = _props$value === void 0 ? '' : _props$value,
|
|
20
|
+
_props$placeholder = props.placeholder,
|
|
21
|
+
placeholder = _props$placeholder === void 0 ? '' : _props$placeholder,
|
|
22
|
+
_props$autoFocus = props.autoFocus,
|
|
23
|
+
autoFocus = _props$autoFocus === void 0 ? false : _props$autoFocus,
|
|
24
|
+
_props$disabled = props.disabled,
|
|
25
|
+
disabled = _props$disabled === void 0 ? false : _props$disabled,
|
|
26
|
+
_props$height = props.height,
|
|
27
|
+
height = _props$height === void 0 ? 60 : _props$height,
|
|
28
|
+
fontSize = props.fontSize,
|
|
29
|
+
onFocus = props.onFocus,
|
|
30
|
+
onBlur = props.onBlur,
|
|
31
|
+
style = props.style,
|
|
32
|
+
className = props.className,
|
|
33
|
+
_props$preventBlurEle = props.preventBlurElements,
|
|
34
|
+
preventBlurElements = _props$preventBlurEle === void 0 ? [] : _props$preventBlurEle,
|
|
35
|
+
focused = props.focused,
|
|
36
|
+
_props$showCursor = props.showCursor,
|
|
37
|
+
showCursor = _props$showCursor === void 0 ? true : _props$showCursor;
|
|
38
|
+
// 使用 useControllableValue 管理 focused 状态
|
|
39
|
+
var _useState = useState(focused !== null && focused !== void 0 ? focused : autoFocus),
|
|
40
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
41
|
+
localFocused = _useState2[0],
|
|
42
|
+
setLocalFocused = _useState2[1];
|
|
43
|
+
var internalFocused = 'focused' in props ? props.focused : localFocused;
|
|
44
|
+
var containerRef = useRef(null);
|
|
45
|
+
|
|
46
|
+
// 处理聚焦
|
|
47
|
+
var handleFocus = useCallback(function () {
|
|
48
|
+
if (disabled) return;
|
|
49
|
+
setLocalFocused(true);
|
|
50
|
+
onFocus === null || onFocus === void 0 || onFocus();
|
|
51
|
+
}, [disabled, onFocus]);
|
|
52
|
+
|
|
53
|
+
// 处理失焦
|
|
54
|
+
var handleBlur = useCallback(function () {
|
|
55
|
+
setLocalFocused(false);
|
|
56
|
+
onBlur === null || onBlur === void 0 || onBlur();
|
|
57
|
+
}, [onBlur]);
|
|
58
|
+
var shouldPreventBlur = useCallback(function (target) {
|
|
59
|
+
if (!target || !(target instanceof Element)) return false;
|
|
60
|
+
return preventBlurElements.some(function (element) {
|
|
61
|
+
if (typeof element === 'string') {
|
|
62
|
+
// 字符串选择器 - 查找页面中所有匹配的元素,检查是否包含目标元素
|
|
63
|
+
var matchedElements = document.querySelectorAll(element);
|
|
64
|
+
return Array.from(matchedElements).some(function (el) {
|
|
65
|
+
return el.contains(target) || el === target;
|
|
66
|
+
});
|
|
67
|
+
} else if (element && 'current' in element && element.current) {
|
|
68
|
+
// React ref
|
|
69
|
+
return element.current.contains(target);
|
|
70
|
+
}
|
|
71
|
+
return false;
|
|
72
|
+
});
|
|
73
|
+
}, [preventBlurElements]);
|
|
74
|
+
useEffect(function () {
|
|
75
|
+
var handleGlobalClick = function handleGlobalClick(event) {
|
|
76
|
+
if (!internalFocused) return;
|
|
77
|
+
var target = event.target;
|
|
78
|
+
if (containerRef.current && containerRef.current.contains(target)) {
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
81
|
+
if (shouldPreventBlur(target)) {
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
handleBlur();
|
|
85
|
+
};
|
|
86
|
+
if (internalFocused) {
|
|
87
|
+
document.addEventListener('mousedown', handleGlobalClick);
|
|
88
|
+
}
|
|
89
|
+
return function () {
|
|
90
|
+
document.removeEventListener('mousedown', handleGlobalClick);
|
|
91
|
+
};
|
|
92
|
+
}, [internalFocused, handleBlur, shouldPreventBlur]);
|
|
93
|
+
|
|
94
|
+
// 处理点击事件
|
|
95
|
+
var handleClick = useCallback(function (event) {
|
|
96
|
+
handleFocus();
|
|
97
|
+
}, [handleFocus]);
|
|
98
|
+
|
|
99
|
+
// 暴露给父组件的方法
|
|
100
|
+
useImperativeHandle(ref, function () {
|
|
101
|
+
return {
|
|
102
|
+
focus: handleFocus,
|
|
103
|
+
blur: handleBlur
|
|
104
|
+
};
|
|
105
|
+
}, [handleFocus, handleBlur]);
|
|
106
|
+
|
|
107
|
+
// 计算组件高度
|
|
108
|
+
var componentHeight = typeof height === 'number' ? "".concat(height, "px") : height;
|
|
109
|
+
|
|
110
|
+
// 获取基础字体大小
|
|
111
|
+
var getBaseFontSize = useCallback(function () {
|
|
112
|
+
if (fontSize) {
|
|
113
|
+
return typeof fontSize === 'number' ? fontSize : parseFloat(fontSize);
|
|
114
|
+
}
|
|
115
|
+
return typeof height === 'number' ? height * 0.8 : 48;
|
|
116
|
+
}, [fontSize, height]);
|
|
117
|
+
|
|
118
|
+
// 计算最小和最大字体大小
|
|
119
|
+
var baseFontSize = getBaseFontSize();
|
|
120
|
+
var minFontSize = Math.max(10, baseFontSize * 0.2);
|
|
121
|
+
var maxFontSize = baseFontSize;
|
|
122
|
+
|
|
123
|
+
// 计算光标高度(容器高度的三分之二)
|
|
124
|
+
var caretHeight = "calc(".concat(componentHeight, " * 0.67)");
|
|
125
|
+
|
|
126
|
+
// 合并样式,将高度和光标高度传递给组件
|
|
127
|
+
var mergedStyle = _objectSpread(_objectSpread({}, style), {}, {
|
|
128
|
+
'--virtual-input-height': componentHeight,
|
|
129
|
+
'--virtual-input-caret-height': caretHeight,
|
|
130
|
+
'--virtual-input-font-size': "".concat(baseFontSize, "px")
|
|
131
|
+
});
|
|
132
|
+
|
|
133
|
+
// 是否显示占位符
|
|
134
|
+
var showPlaceholder = value === undefined || value === '';
|
|
135
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
136
|
+
ref: containerRef,
|
|
137
|
+
className: classNames('pisell-base-virtual-input', {
|
|
138
|
+
'pisell-base-virtual-input--focused': internalFocused,
|
|
139
|
+
'pisell-base-virtual-input--disabled': disabled
|
|
140
|
+
}, className),
|
|
141
|
+
style: mergedStyle,
|
|
142
|
+
onClick: handleClick
|
|
143
|
+
}, showPlaceholder && /*#__PURE__*/React.createElement(AutoResizeText, {
|
|
144
|
+
className: "pisell-base-virtual-input-placeholder",
|
|
145
|
+
mode: "oneline",
|
|
146
|
+
minFontSizePx: minFontSize,
|
|
147
|
+
maxFontSizePx: maxFontSize,
|
|
148
|
+
fontSizePrecisionPx: 0.5
|
|
149
|
+
}, placeholder), !!value && /*#__PURE__*/React.createElement(AutoResizeText, {
|
|
150
|
+
className: "pisell-base-virtual-input-value",
|
|
151
|
+
mode: "oneline",
|
|
152
|
+
minFontSizePx: minFontSize,
|
|
153
|
+
maxFontSizePx: maxFontSize,
|
|
154
|
+
fontSizePrecisionPx: 0.5,
|
|
155
|
+
scrollToEnd: true
|
|
156
|
+
}, value), /*#__PURE__*/React.createElement("div", {
|
|
157
|
+
className: "pisell-base-virtual-input-caret-container"
|
|
158
|
+
}, internalFocused && !disabled && showCursor && /*#__PURE__*/React.createElement("div", {
|
|
159
|
+
className: "pisell-base-virtual-input-caret"
|
|
160
|
+
})));
|
|
161
|
+
});
|
|
162
|
+
BaseVirtualInput.displayName = 'BaseVirtualInput';
|
|
163
|
+
export default BaseVirtualInput;
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
.pisell-base-virtual-input {
|
|
2
|
+
width: 100%;
|
|
3
|
+
display: flex;
|
|
4
|
+
align-items: center;
|
|
5
|
+
background-color: transparent;
|
|
6
|
+
cursor: pointer;
|
|
7
|
+
transition: all 0.2s ease;
|
|
8
|
+
outline: none;
|
|
9
|
+
position: relative;
|
|
10
|
+
height: var(--virtual-input-height);
|
|
11
|
+
|
|
12
|
+
&--disabled {
|
|
13
|
+
cursor: not-allowed;
|
|
14
|
+
opacity: 0.6;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.pisell-base-virtual-input-placeholder {
|
|
19
|
+
color: #98a2b3;
|
|
20
|
+
font-weight: 400;
|
|
21
|
+
user-select: none;
|
|
22
|
+
position: absolute;
|
|
23
|
+
left: 0;
|
|
24
|
+
top: 0;
|
|
25
|
+
width: 100%;
|
|
26
|
+
max-width: 100%;
|
|
27
|
+
overflow: hidden;
|
|
28
|
+
pointer-events: none;
|
|
29
|
+
font-size: var(--virtual-input-font-size);
|
|
30
|
+
height: var(--virtual-input-height);
|
|
31
|
+
line-height: var(--virtual-input-height);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.pisell-base-virtual-input-value {
|
|
35
|
+
font-weight: 600;
|
|
36
|
+
white-space: nowrap;
|
|
37
|
+
flex-shrink: 0;
|
|
38
|
+
// width: 100%;
|
|
39
|
+
max-width: 100%;
|
|
40
|
+
overflow-y: hidden;
|
|
41
|
+
overflow-x: auto;
|
|
42
|
+
font-size: var(--virtual-input-font-size);
|
|
43
|
+
line-height: var(--virtual-input-height);
|
|
44
|
+
height: var(--virtual-input-height);
|
|
45
|
+
|
|
46
|
+
-ms-overflow-style: none; /* IE 和 Edge */
|
|
47
|
+
scrollbar-width: none; /* Firefox */
|
|
48
|
+
&::-webkit-scrollbar {
|
|
49
|
+
display: none; /* Chrome, Safari 和 Opera */
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.pisell-base-virtual-input-caret-container {
|
|
54
|
+
height: 100%;
|
|
55
|
+
display: flex;
|
|
56
|
+
align-items: center;
|
|
57
|
+
flex-shrink: 0;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.pisell-base-virtual-input-caret {
|
|
61
|
+
width: 2px;
|
|
62
|
+
height: var(--virtual-input-caret-height);
|
|
63
|
+
background-color: #1570ef;
|
|
64
|
+
border-radius: 1px;
|
|
65
|
+
animation: pisell-base-virtual-input-caret-blink 1s infinite;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
@keyframes pisell-base-virtual-input-caret-blink {
|
|
69
|
+
0%,
|
|
70
|
+
50% {
|
|
71
|
+
opacity: 1;
|
|
72
|
+
}
|
|
73
|
+
51%,
|
|
74
|
+
100% {
|
|
75
|
+
opacity: 0;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { BaseVirtualInputProps, BaseVirtualInputRef } from './BaseVirtualInput';
|
|
3
|
+
import './index.less';
|
|
4
|
+
export { BaseVirtualInputProps, BaseVirtualInputRef } from './BaseVirtualInput';
|
|
5
|
+
export interface VirtualInputProps extends BaseVirtualInputProps {
|
|
6
|
+
/** 在VirtualInput上方显示的额外内容 */
|
|
7
|
+
topContent?: React.ReactNode;
|
|
8
|
+
/** 在VirtualInput下方显示的额外内容 */
|
|
9
|
+
bottomContent?: React.ReactNode;
|
|
10
|
+
/** wrapper class */
|
|
11
|
+
wrapperClassName?: string;
|
|
12
|
+
/** 虚拟输入框包装器的样式 */
|
|
13
|
+
wrapperStyle?: React.CSSProperties;
|
|
14
|
+
/** 是否允许清除输入框中的内容 */
|
|
15
|
+
allowClear?: boolean;
|
|
16
|
+
/** 清除输入框内容的回调函数 */
|
|
17
|
+
onClear?: () => void;
|
|
18
|
+
/** 自定义清除按钮的样式 */
|
|
19
|
+
clearButtonStyle?: React.CSSProperties;
|
|
20
|
+
}
|
|
21
|
+
export interface VirtualInputRef extends BaseVirtualInputRef {
|
|
22
|
+
}
|
|
23
|
+
declare const VirtualInput: React.ForwardRefExoticComponent<VirtualInputProps & React.RefAttributes<VirtualInputRef>>;
|
|
24
|
+
export default VirtualInput;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
var _excluded = ["topContent", "bottomContent", "wrapperStyle", "wrapperClassName", "allowClear", "onClear", "value", "clearButtonStyle"];
|
|
2
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
3
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
4
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
5
|
+
import React, { forwardRef, useImperativeHandle, useRef } from 'react';
|
|
6
|
+
import classNames from 'classnames';
|
|
7
|
+
import Icon from "../icon";
|
|
8
|
+
import BaseVirtualInput from "./BaseVirtualInput";
|
|
9
|
+
import "./index.less";
|
|
10
|
+
export { BaseVirtualInputProps, BaseVirtualInputRef } from "./BaseVirtualInput";
|
|
11
|
+
var VirtualInput = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
12
|
+
var topContent = _ref.topContent,
|
|
13
|
+
bottomContent = _ref.bottomContent,
|
|
14
|
+
wrapperStyle = _ref.wrapperStyle,
|
|
15
|
+
wrapperClassName = _ref.wrapperClassName,
|
|
16
|
+
_ref$allowClear = _ref.allowClear,
|
|
17
|
+
allowClear = _ref$allowClear === void 0 ? false : _ref$allowClear,
|
|
18
|
+
onClear = _ref.onClear,
|
|
19
|
+
value = _ref.value,
|
|
20
|
+
clearButtonStyle = _ref.clearButtonStyle,
|
|
21
|
+
virtualInputProps = _objectWithoutProperties(_ref, _excluded);
|
|
22
|
+
var baseInputRef = useRef(null);
|
|
23
|
+
|
|
24
|
+
// 处理清除操作
|
|
25
|
+
var handleClear = function handleClear() {
|
|
26
|
+
// 全部清除
|
|
27
|
+
onClear === null || onClear === void 0 || onClear();
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
// 暴露给父组件的方法
|
|
31
|
+
useImperativeHandle(ref, function () {
|
|
32
|
+
return {
|
|
33
|
+
focus: function focus() {
|
|
34
|
+
var _baseInputRef$current;
|
|
35
|
+
return (_baseInputRef$current = baseInputRef.current) === null || _baseInputRef$current === void 0 ? void 0 : _baseInputRef$current.focus();
|
|
36
|
+
},
|
|
37
|
+
blur: function blur() {
|
|
38
|
+
var _baseInputRef$current2;
|
|
39
|
+
return (_baseInputRef$current2 = baseInputRef.current) === null || _baseInputRef$current2 === void 0 ? void 0 : _baseInputRef$current2.blur();
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
});
|
|
43
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
44
|
+
className: classNames('pisell-virtual-input-wrapper', wrapperClassName),
|
|
45
|
+
style: wrapperStyle
|
|
46
|
+
}, topContent, /*#__PURE__*/React.createElement("div", {
|
|
47
|
+
className: "pisell-virtual-input-container"
|
|
48
|
+
}, /*#__PURE__*/React.createElement(BaseVirtualInput, _extends({
|
|
49
|
+
ref: baseInputRef,
|
|
50
|
+
value: value
|
|
51
|
+
}, virtualInputProps)), allowClear && /*#__PURE__*/React.createElement("div", {
|
|
52
|
+
className: "pisell-virtual-input-clear-button",
|
|
53
|
+
onClick: handleClear,
|
|
54
|
+
style: clearButtonStyle
|
|
55
|
+
}, /*#__PURE__*/React.createElement(Icon, {
|
|
56
|
+
type: "pisell2-delete"
|
|
57
|
+
}))), bottomContent);
|
|
58
|
+
});
|
|
59
|
+
VirtualInput.displayName = 'VirtualInput';
|
|
60
|
+
export default VirtualInput;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
.pisell-virtual-input-wrapper {
|
|
2
|
+
overflow: hidden;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.pisell-virtual-input-container {
|
|
6
|
+
position: relative;
|
|
7
|
+
display: flex;
|
|
8
|
+
align-items: center;
|
|
9
|
+
width: 100%;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.pisell-virtual-input-clear-button {
|
|
13
|
+
position: absolute;
|
|
14
|
+
right: 8px;
|
|
15
|
+
top: 50%;
|
|
16
|
+
transform: translateY(-50%);
|
|
17
|
+
display: flex;
|
|
18
|
+
align-items: center;
|
|
19
|
+
justify-content: center;
|
|
20
|
+
width: 24px;
|
|
21
|
+
height: 24px;
|
|
22
|
+
cursor: pointer;
|
|
23
|
+
border-radius: 4px;
|
|
24
|
+
transition: all 0.2s ease;
|
|
25
|
+
color: #667085;
|
|
26
|
+
background-color: transparent;
|
|
27
|
+
z-index: 1;
|
|
28
|
+
|
|
29
|
+
&:hover {
|
|
30
|
+
background-color: #f2f4f7;
|
|
31
|
+
color: #344054;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
&:active {
|
|
35
|
+
background-color: #e4e7ec;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
svg {
|
|
39
|
+
width: 16px;
|
|
40
|
+
height: 16px;
|
|
41
|
+
}
|
|
42
|
+
}
|
package/es/index.d.ts
CHANGED
|
@@ -140,3 +140,6 @@ export { default as SectionFooters } from './components/section-footers';
|
|
|
140
140
|
export { default as ProductCard } from './components/productCard';
|
|
141
141
|
export { default as Collapse } from './components/collapse';
|
|
142
142
|
export { default as PisellGoodPassCard } from './components/pisellGoodPassCard';
|
|
143
|
+
export { default as Keyboard } from './components/keyboard';
|
|
144
|
+
export { default as VirtualInput } from './components/virtualInput';
|
|
145
|
+
export { default as AutoResizeText } from './components/auto-resize-text';
|
package/es/index.js
CHANGED
|
@@ -138,4 +138,7 @@ export { default as PisellList01 } from "./components/pisellList01";
|
|
|
138
138
|
export { default as SectionFooters } from "./components/section-footers";
|
|
139
139
|
export { default as ProductCard } from "./components/productCard";
|
|
140
140
|
export { default as Collapse } from "./components/collapse";
|
|
141
|
-
export { default as PisellGoodPassCard } from "./components/pisellGoodPassCard";
|
|
141
|
+
export { default as PisellGoodPassCard } from "./components/pisellGoodPassCard";
|
|
142
|
+
export { default as Keyboard } from "./components/keyboard";
|
|
143
|
+
export { default as VirtualInput } from "./components/virtualInput";
|
|
144
|
+
export { default as AutoResizeText } from "./components/auto-resize-text";
|
package/es/locales/en-US.d.ts
CHANGED
|
@@ -279,6 +279,7 @@ declare const _default: {
|
|
|
279
279
|
'pisell-wallet-pass-card-status-expired': string;
|
|
280
280
|
'pisell-wallet-pass-card-status-disabled': string;
|
|
281
281
|
'pisell-wallet-pass-card-status-conflict': string;
|
|
282
|
+
'pisell-wallet-pass-card-status-lastPayment': string;
|
|
282
283
|
'pisell-wallet-pass-card-reset': string;
|
|
283
284
|
'pisell-wallet-pass-card-done': string;
|
|
284
285
|
};
|
package/es/locales/en-US.js
CHANGED
|
@@ -345,6 +345,7 @@ export default {
|
|
|
345
345
|
'pisell-wallet-pass-card-status-expired': 'Expired',
|
|
346
346
|
'pisell-wallet-pass-card-status-disabled': 'Disabled',
|
|
347
347
|
'pisell-wallet-pass-card-status-conflict': 'Conflict',
|
|
348
|
+
'pisell-wallet-pass-card-status-lastPayment': 'Last Payment',
|
|
348
349
|
'pisell-wallet-pass-card-reset': 'Reset',
|
|
349
350
|
'pisell-wallet-pass-card-done': 'Done'
|
|
350
351
|
};
|
package/es/locales/zh-CN.d.ts
CHANGED
|
@@ -274,6 +274,7 @@ declare const _default: {
|
|
|
274
274
|
'pisell-wallet-pass-card-status-expired': string;
|
|
275
275
|
'pisell-wallet-pass-card-status-disabled': string;
|
|
276
276
|
'pisell-wallet-pass-card-status-conflict': string;
|
|
277
|
+
'pisell-wallet-pass-card-status-lastPayment': string;
|
|
277
278
|
'pisell-wallet-pass-card-reset': string;
|
|
278
279
|
'pisell-wallet-pass-card-done': string;
|
|
279
280
|
};
|
package/es/locales/zh-CN.js
CHANGED
|
@@ -336,6 +336,7 @@ export default {
|
|
|
336
336
|
'pisell-wallet-pass-card-status-expired': '已过期',
|
|
337
337
|
'pisell-wallet-pass-card-status-disabled': '已禁用',
|
|
338
338
|
'pisell-wallet-pass-card-status-conflict': '冲突',
|
|
339
|
+
'pisell-wallet-pass-card-status-lastPayment': '上次结算',
|
|
339
340
|
'pisell-wallet-pass-card-reset': '清空',
|
|
340
341
|
'pisell-wallet-pass-card-done': '保存'
|
|
341
342
|
};
|
package/es/locales/zh-TW.d.ts
CHANGED
|
@@ -274,6 +274,7 @@ declare const _default: {
|
|
|
274
274
|
'pisell-wallet-pass-card-status-expired': string;
|
|
275
275
|
'pisell-wallet-pass-card-status-disabled': string;
|
|
276
276
|
'pisell-wallet-pass-card-status-conflict': string;
|
|
277
|
+
'pisell-wallet-pass-card-status-lastPayment': string;
|
|
277
278
|
'pisell-wallet-pass-card-reset': string;
|
|
278
279
|
'pisell-wallet-pass-card-done': string;
|
|
279
280
|
};
|
package/es/locales/zh-TW.js
CHANGED
|
@@ -337,6 +337,7 @@ export default {
|
|
|
337
337
|
'pisell-wallet-pass-card-status-expired': '已過期',
|
|
338
338
|
'pisell-wallet-pass-card-status-disabled': '已禁用',
|
|
339
339
|
'pisell-wallet-pass-card-status-conflict': '衝突',
|
|
340
|
+
'pisell-wallet-pass-card-status-lastPayment': '上次結算',
|
|
340
341
|
'pisell-wallet-pass-card-reset': '清空',
|
|
341
342
|
'pisell-wallet-pass-card-done': '保存'
|
|
342
343
|
};
|
package/es/utils/platform.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const isMobile: () =>
|
|
1
|
+
export declare const isMobile: () => boolean;
|