@pisell/materials 1.0.446 → 1.0.447
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 +2 -2
- package/build/lowcode/preview.js +7 -7
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +7 -7
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +7 -7
- package/es/components/browserSelect/chevron-down.png +0 -0
- package/es/components/browserSelect/index.d.ts +15 -0
- package/es/components/browserSelect/index.js +36 -0
- package/es/components/browserSelect/index.less +18 -0
- package/es/components/button/index.js +2 -0
- package/es/components/buttonGroupEdit/index.d.ts +8 -0
- package/es/components/buttonGroupEdit/index.js +411 -0
- package/es/components/buttonGroupPreview/index.d.ts +20 -0
- package/es/components/buttonGroupPreview/index.js +81 -0
- package/es/components/cardPro/index.d.ts +4 -0
- package/es/components/cardPro/index.js +66 -0
- package/es/components/cardPro/index.less +58 -0
- package/es/components/collapse/index.d.ts +6 -0
- package/es/components/collapse/index.js +66 -0
- package/es/components/collapse/index.less +1 -0
- package/es/components/date-picker/constants.d.ts +39 -0
- package/es/components/date-picker/constants.js +76 -0
- package/es/components/date-picker/datePickerCpt.d.ts +8 -0
- package/es/components/date-picker/datePickerCpt.js +370 -0
- package/es/components/date-picker/hooks/useMediaQuery.d.ts +2 -0
- package/es/components/date-picker/hooks/useMediaQuery.js +28 -0
- package/es/components/date-picker/index.js +2 -2
- package/es/components/date-picker/index.less +1880 -0
- package/es/components/drag-sort-tree/index.d.ts +0 -1
- package/es/components/drag-sort-tree/index.js +2 -1
- package/es/components/iconfont/index.js +1 -1
- package/es/components/picker-view/index.d.ts +2 -0
- package/es/components/picker-view/index.js +2 -0
- package/es/components/pisellAnchor/index.d.ts +15 -0
- package/es/components/pisellAnchor/index.js +114 -0
- package/es/components/pisellAnchor/index.less +98 -0
- package/es/components/pisellInformationEntry/Input/index.js +9 -3
- package/es/components/pisellInformationEntry/constants.d.ts +10 -0
- package/es/components/pisellInformationEntry/constants.js +10 -0
- package/es/components/pisellInformationEntry/hooks/useTerminalPeripherals.d.ts +8 -0
- package/es/components/pisellInformationEntry/hooks/useTerminalPeripherals.js +54 -0
- package/es/components/pisellInformationEntry/index.js +21 -4
- package/es/components/pisellInformationEntry/index.less +1 -1
- package/es/components/pisellLoading/index.d.ts +2 -0
- package/es/components/pisellLoading/index.js +3 -1
- package/es/components/pisellQrcode/index.d.ts +4 -0
- package/es/components/pisellQrcode/index.js +75 -0
- package/es/components/pisellQrcode/index.less +41 -0
- package/es/components/pisellStatistic/index.d.ts +10 -0
- package/es/components/pisellStatistic/index.js +26 -0
- package/es/components/pisellStatistic/index.less +14 -0
- package/es/components/pisellTags/index.d.ts +13 -0
- package/es/components/pisellTags/index.js +83 -0
- package/es/components/pisellTags/index.less +17 -0
- package/es/components/pisellTags/utils.d.ts +1 -0
- package/es/components/pisellTags/utils.js +89 -0
- package/es/components/pisellUpload/index.d.ts +11 -0
- package/es/components/pisellUpload/index.js +34 -0
- package/es/components/pisellUpload/index.less +15 -0
- package/es/components/pisellUploadCrop/index.d.ts +3 -0
- package/es/components/pisellUploadCrop/index.js +73 -0
- package/es/components/pisellUploadCrop/index.less +15 -0
- package/es/components/pisellWalletCard/img/drak.png +0 -0
- package/es/components/pisellWalletCard/img/light.png +0 -0
- package/es/components/pisellWalletCard/index.d.ts +4 -0
- package/es/components/pisellWalletCard/index.js +122 -0
- package/es/components/pisellWalletCard/index.less +96 -0
- package/es/components/pisellWalletPassCard/index.d.ts +2 -0
- package/es/components/pisellWalletPassCard/index.js +16 -4
- package/es/components/pisellWalletPassCard/index.less +3 -0
- package/es/components/productCard/components/Actions/index.d.ts +4 -0
- package/es/components/productCard/components/Actions/index.js +20 -0
- package/es/components/productCard/components/Actions/index.less +14 -0
- package/es/components/productCard/components/AmountFooter/index.d.ts +4 -0
- package/es/components/productCard/components/AmountFooter/index.js +32 -0
- package/es/components/productCard/components/AmountFooter/index.less +30 -0
- package/es/components/productCard/components/Divider/index.d.ts +4 -0
- package/es/components/productCard/components/Divider/index.js +11 -0
- package/es/components/productCard/components/Divider/index.less +13 -0
- package/es/components/productCard/components/Header/index.d.ts +4 -0
- package/es/components/productCard/components/Header/index.js +69 -0
- package/es/components/productCard/components/Header/index.less +59 -0
- package/es/components/productCard/components/Holder/index.d.ts +4 -0
- package/es/components/productCard/components/Holder/index.js +11 -0
- package/es/components/productCard/components/Holder/index.less +11 -0
- package/es/components/productCard/components/Note/index.d.ts +4 -0
- package/es/components/productCard/components/Note/index.js +17 -0
- package/es/components/productCard/components/Note/index.less +20 -0
- package/es/components/productCard/components/Packages/components/collapsibleList/index.d.ts +10 -0
- package/es/components/productCard/components/Packages/components/collapsibleList/index.js +96 -0
- package/es/components/productCard/components/Packages/components/collapsibleList/index.less +53 -0
- package/es/components/productCard/components/Packages/components/collapsibleList/utils.d.ts +2 -0
- package/es/components/productCard/components/Packages/components/collapsibleList/utils.js +31 -0
- package/es/components/productCard/components/Packages/components/options/index.d.ts +4 -0
- package/es/components/productCard/components/Packages/components/options/index.js +23 -0
- package/es/components/productCard/components/Packages/components/options/index.less +28 -0
- package/es/components/productCard/components/Packages/index.d.ts +4 -0
- package/es/components/productCard/components/Packages/index.js +22 -0
- package/es/components/productCard/components/Packages/index.less +17 -0
- package/es/components/productCard/components/Packages/utils.d.ts +20 -0
- package/es/components/productCard/components/Packages/utils.js +40 -0
- package/es/components/productCard/components/Sales/index.d.ts +4 -0
- package/es/components/productCard/components/Sales/index.js +22 -0
- package/es/components/productCard/components/Sales/index.less +18 -0
- package/es/components/productCard/components/Time/components/Like/index.d.ts +9 -0
- package/es/components/productCard/components/Time/components/Like/index.js +26 -0
- package/es/components/productCard/components/Time/components/Like/index.less +6 -0
- package/es/components/productCard/components/Time/components/Like/like-heart.png +0 -0
- package/es/components/productCard/components/Time/components/Like/like-hide-heart.png +0 -0
- package/es/components/productCard/components/Time/index.d.ts +4 -0
- package/es/components/productCard/components/Time/index.js +30 -0
- package/es/components/productCard/components/Time/index.less +25 -0
- package/es/components/productCard/index.d.ts +5 -0
- package/es/components/productCard/index.js +80 -0
- package/es/components/productCard/index.less +48 -0
- package/es/components/productCard/types.d.ts +10 -0
- package/es/components/productCard/types.js +1 -0
- package/es/components/productCard/utils.d.ts +162 -0
- package/es/components/productCard/utils.js +683 -0
- package/es/components/record-view/index.d.ts +3 -3
- package/es/components/record-view/index.js +23 -16
- package/es/components/section-footers/index.d.ts +8 -0
- package/es/components/section-footers/index.js +16 -0
- package/es/components/select-time/RightPanel/index.d.ts +2 -2
- package/es/components/select-time/RightPanel/index.js +7 -7
- package/es/components/table/Actions/component/ExportImport/index.js +3 -3
- package/es/components/table/BasicTable/index.js +7 -1
- package/es/components/table/Gallery/components/GalleryItem/components/Title/index.less +1 -1
- package/es/components/table/Gallery/components/GalleryItem/index.js +10 -3
- package/es/components/table/Gallery/components/GalleryItem/index.less +1 -0
- package/es/components/table/Gallery/index.js +14 -4
- package/es/components/table/Table/index.js +2 -1
- package/es/components/table/Table/utils.d.ts +15 -3
- package/es/components/table/Table/utils.js +6 -2
- package/es/components/table/hooks/useTableSetting.js +26 -5
- package/es/components/table/hooks/useTransDataSource.d.ts +1 -0
- package/es/components/table/hooks/useTransDataSource.js +6 -4
- package/es/components/table/types.d.ts +2 -0
- package/es/components/tabs/index.d.ts +1 -0
- package/es/components/tabs/index.js +33 -11
- package/es/components/virtual-keyboard/Keyboard/index.d.ts +1 -0
- package/es/components/virtual-keyboard/Keyboard/index.js +10 -2
- package/es/index.d.ts +18 -4
- package/es/index.js +20 -3
- package/es/locales/en-US.d.ts +14 -0
- package/es/locales/en-US.js +16 -1
- package/es/locales/zh-CN.d.ts +14 -0
- package/es/locales/zh-CN.js +16 -1
- package/es/locales/zh-TW.d.ts +14 -0
- package/es/locales/zh-TW.js +16 -1
- package/es/utils/index.d.ts +1 -0
- package/es/utils/index.js +4 -1
- package/lib/components/browserSelect/chevron-down.png +0 -0
- package/lib/components/browserSelect/index.d.ts +15 -0
- package/lib/components/browserSelect/index.js +59 -0
- package/lib/components/browserSelect/index.less +18 -0
- package/lib/components/button/index.js +2 -0
- package/lib/components/buttonGroupEdit/index.d.ts +8 -0
- package/lib/components/buttonGroupEdit/index.js +234 -0
- package/lib/components/buttonGroupPreview/index.d.ts +20 -0
- package/lib/components/buttonGroupPreview/index.js +65 -0
- package/lib/components/cardPro/index.d.ts +4 -0
- package/lib/components/cardPro/index.js +60 -0
- package/lib/components/cardPro/index.less +58 -0
- package/lib/components/collapse/index.d.ts +6 -0
- package/lib/components/collapse/index.js +88 -0
- package/lib/components/collapse/index.less +1 -0
- package/lib/components/date-picker/constants.d.ts +39 -0
- package/lib/components/date-picker/constants.js +78 -0
- package/lib/components/date-picker/datePickerCpt.d.ts +8 -0
- package/lib/components/date-picker/datePickerCpt.js +403 -0
- package/lib/components/date-picker/hooks/useMediaQuery.d.ts +2 -0
- package/lib/components/date-picker/hooks/useMediaQuery.js +43 -0
- package/lib/components/date-picker/index.js +2 -2
- package/lib/components/date-picker/index.less +1880 -0
- package/lib/components/drag-sort-tree/index.d.ts +0 -1
- package/lib/components/drag-sort-tree/index.js +0 -1
- package/lib/components/iconfont/index.js +1 -1
- package/lib/components/picker-view/index.d.ts +2 -0
- package/lib/components/picker-view/index.js +36 -0
- package/lib/components/pisellAnchor/index.d.ts +15 -0
- package/lib/components/pisellAnchor/index.js +107 -0
- package/lib/components/pisellAnchor/index.less +98 -0
- package/lib/components/pisellInformationEntry/Input/index.js +9 -1
- package/lib/components/pisellInformationEntry/constants.d.ts +10 -0
- package/lib/components/pisellInformationEntry/constants.js +12 -0
- package/lib/components/pisellInformationEntry/hooks/useTerminalPeripherals.d.ts +8 -0
- package/lib/components/pisellInformationEntry/hooks/useTerminalPeripherals.js +83 -0
- package/lib/components/pisellInformationEntry/index.js +18 -2
- package/lib/components/pisellInformationEntry/index.less +1 -1
- package/lib/components/pisellLoading/index.d.ts +2 -0
- package/lib/components/pisellLoading/index.js +2 -1
- package/lib/components/pisellQrcode/index.d.ts +4 -0
- package/lib/components/pisellQrcode/index.js +79 -0
- package/lib/components/pisellQrcode/index.less +41 -0
- package/lib/components/pisellStatistic/index.d.ts +10 -0
- package/lib/components/pisellStatistic/index.js +51 -0
- package/lib/components/pisellStatistic/index.less +14 -0
- package/lib/components/pisellTags/index.d.ts +13 -0
- package/lib/components/pisellTags/index.js +113 -0
- package/lib/components/pisellTags/index.less +17 -0
- package/lib/components/pisellTags/utils.d.ts +1 -0
- package/lib/components/pisellTags/utils.js +86 -0
- package/lib/components/pisellUpload/index.d.ts +11 -0
- package/lib/components/pisellUpload/index.js +53 -0
- package/lib/components/pisellUpload/index.less +15 -0
- package/lib/components/pisellUploadCrop/index.d.ts +3 -0
- package/lib/components/pisellUploadCrop/index.js +75 -0
- package/lib/components/pisellUploadCrop/index.less +15 -0
- package/lib/components/pisellWalletCard/img/drak.png +0 -0
- package/lib/components/pisellWalletCard/img/light.png +0 -0
- package/lib/components/pisellWalletCard/index.d.ts +4 -0
- package/lib/components/pisellWalletCard/index.js +184 -0
- package/lib/components/pisellWalletCard/index.less +96 -0
- package/lib/components/pisellWalletPassCard/index.d.ts +2 -0
- package/lib/components/pisellWalletPassCard/index.js +8 -4
- package/lib/components/pisellWalletPassCard/index.less +3 -0
- package/lib/components/productCard/components/Actions/index.d.ts +4 -0
- package/lib/components/productCard/components/Actions/index.js +54 -0
- package/lib/components/productCard/components/Actions/index.less +14 -0
- package/lib/components/productCard/components/AmountFooter/index.d.ts +4 -0
- package/lib/components/productCard/components/AmountFooter/index.js +61 -0
- package/lib/components/productCard/components/AmountFooter/index.less +30 -0
- package/lib/components/productCard/components/Divider/index.d.ts +4 -0
- package/lib/components/productCard/components/Divider/index.js +50 -0
- package/lib/components/productCard/components/Divider/index.less +13 -0
- package/lib/components/productCard/components/Header/index.d.ts +4 -0
- package/lib/components/productCard/components/Header/index.js +81 -0
- package/lib/components/productCard/components/Header/index.less +59 -0
- package/lib/components/productCard/components/Holder/index.d.ts +4 -0
- package/lib/components/productCard/components/Holder/index.js +42 -0
- package/lib/components/productCard/components/Holder/index.less +11 -0
- package/lib/components/productCard/components/Note/index.d.ts +4 -0
- package/lib/components/productCard/components/Note/index.js +43 -0
- package/lib/components/productCard/components/Note/index.less +20 -0
- package/lib/components/productCard/components/Packages/components/collapsibleList/index.d.ts +10 -0
- package/lib/components/productCard/components/Packages/components/collapsibleList/index.js +93 -0
- package/lib/components/productCard/components/Packages/components/collapsibleList/index.less +53 -0
- package/lib/components/productCard/components/Packages/components/collapsibleList/utils.d.ts +2 -0
- package/lib/components/productCard/components/Packages/components/collapsibleList/utils.js +48 -0
- package/lib/components/productCard/components/Packages/components/options/index.d.ts +4 -0
- package/lib/components/productCard/components/Packages/components/options/index.js +73 -0
- package/lib/components/productCard/components/Packages/components/options/index.less +28 -0
- package/lib/components/productCard/components/Packages/index.d.ts +4 -0
- package/lib/components/productCard/components/Packages/index.js +51 -0
- package/lib/components/productCard/components/Packages/index.less +17 -0
- package/lib/components/productCard/components/Packages/utils.d.ts +20 -0
- package/lib/components/productCard/components/Packages/utils.js +44 -0
- package/lib/components/productCard/components/Sales/index.d.ts +4 -0
- package/lib/components/productCard/components/Sales/index.js +51 -0
- package/lib/components/productCard/components/Sales/index.less +18 -0
- package/lib/components/productCard/components/Time/components/Like/index.d.ts +9 -0
- package/lib/components/productCard/components/Time/components/Like/index.js +64 -0
- package/lib/components/productCard/components/Time/components/Like/index.less +6 -0
- package/lib/components/productCard/components/Time/components/Like/like-heart.png +0 -0
- package/lib/components/productCard/components/Time/components/Like/like-hide-heart.png +0 -0
- package/lib/components/productCard/components/Time/index.d.ts +4 -0
- package/lib/components/productCard/components/Time/index.js +57 -0
- package/lib/components/productCard/components/Time/index.less +25 -0
- package/lib/components/productCard/index.d.ts +5 -0
- package/lib/components/productCard/index.js +101 -0
- package/lib/components/productCard/index.less +48 -0
- package/lib/components/productCard/types.d.ts +10 -0
- package/lib/components/productCard/types.js +17 -0
- package/lib/components/productCard/utils.d.ts +162 -0
- package/lib/components/productCard/utils.js +598 -0
- package/lib/components/record-view/index.d.ts +3 -3
- package/lib/components/record-view/index.js +19 -3
- package/lib/components/section-footers/index.d.ts +8 -0
- package/lib/components/section-footers/index.js +39 -0
- package/lib/components/select-time/RightPanel/index.d.ts +2 -2
- package/lib/components/table/Actions/component/ExportImport/index.js +3 -4
- package/lib/components/table/BasicTable/index.js +5 -1
- package/lib/components/table/Gallery/components/GalleryItem/components/Title/index.less +1 -1
- package/lib/components/table/Gallery/components/GalleryItem/index.js +18 -4
- package/lib/components/table/Gallery/components/GalleryItem/index.less +1 -0
- package/lib/components/table/Gallery/index.js +14 -3
- package/lib/components/table/Table/index.js +2 -1
- package/lib/components/table/Table/utils.d.ts +15 -3
- package/lib/components/table/Table/utils.js +7 -1
- package/lib/components/table/hooks/useTableSetting.js +23 -9
- package/lib/components/table/hooks/useTransDataSource.d.ts +1 -0
- package/lib/components/table/hooks/useTransDataSource.js +5 -4
- package/lib/components/table/types.d.ts +2 -0
- package/lib/components/tabs/index.d.ts +1 -0
- package/lib/components/tabs/index.js +36 -6
- package/lib/components/virtual-keyboard/Keyboard/index.d.ts +1 -0
- package/lib/components/virtual-keyboard/Keyboard/index.js +15 -2
- package/lib/index.d.ts +18 -4
- package/lib/index.js +76 -34
- package/lib/locales/en-US.d.ts +14 -0
- package/lib/locales/en-US.js +16 -1
- package/lib/locales/zh-CN.d.ts +14 -0
- package/lib/locales/zh-CN.js +16 -1
- package/lib/locales/zh-TW.d.ts +14 -0
- package/lib/locales/zh-TW.js +16 -1
- package/lib/utils/index.d.ts +1 -0
- package/lib/utils/index.js +7 -2
- package/lowcode/badge/meta.ts +8 -8
- package/lowcode/collapse/meta.ts +85 -1
- package/lowcode/pisell-anchor/meta.ts +127 -0
- package/lowcode/pisell-anchor/snippets.ts +20 -0
- package/lowcode/pisell-qrcode/__screenshots__/upload-1.png +0 -0
- package/lowcode/pisell-qrcode/meta.ts +46 -0
- package/lowcode/pisell-qrcode/snippets.ts +12 -0
- package/lowcode/pisell-statistic/meta.ts +83 -0
- package/lowcode/pisell-statistic/snippets.ts +13 -0
- package/lowcode/pisell-tooltip/meta.ts +1 -1
- package/lowcode/pisell-upload/__screenshots__/upload-1.png +0 -0
- package/lowcode/pisell-upload/meta.ts +508 -0
- package/lowcode/pisell-upload/snippets.ts +20 -0
- package/lowcode/pisell-upload-crop/meta.ts +77 -0
- package/lowcode/pisell-upload-crop/snippe.ts +12 -0
- package/lowcode/pisell-wallet-card/meta.ts +141 -0
- package/lowcode/pisell-wallet-card/snippets.ts +26 -0
- package/lowcode/product-card/meta.ts +92 -0
- package/lowcode/product-card/snippets.ts +15 -0
- package/lowcode/record-view/meta.ts +12 -0
- package/lowcode/section-footers/meta.ts +47 -3
- package/lowcode/section-footers/snippe.ts +14 -1
- package/lowcode/statistic/meta.ts +1 -1
- package/lowcode/tabs/meta.ts +51 -51
- package/lowcode/tabs/snippets.ts +36 -36
- package/lowcode/tag/meta.ts +6 -0
- package/lowcode/timeline/meta.ts +12 -3
- package/lowcode/timeline/snippets.ts +2 -0
- package/lowcode/timeline.item/meta.ts +1 -1
- package/package.json +31 -26
- package/dist/umd/materials.min.css +0 -1
- package/dist/umd/materials.min.js +0 -1
- package/dist/umd/static/DotsSix.57d66266.svg +0 -1
- package/dist/umd/static/arrow-left.e542294f.svg +0 -1
- package/dist/umd/static/arrow-right.763f03e0.svg +0 -1
- package/dist/umd/static/filter-lines.04a54ae9.svg +0 -1
- package/dist/umd/static/help-circle.31c9be40.svg +0 -1
- package/dist/umd/static/switch-vertical-01.7ebe3ba8.svg +0 -1
|
@@ -37,7 +37,6 @@ var import_core = require("@dnd-kit/core");
|
|
|
37
37
|
var import_sortable = require("@dnd-kit/sortable");
|
|
38
38
|
var import_TreeItem = __toESM(require("./TreeItem"));
|
|
39
39
|
var import_modifiers = require("@dnd-kit/modifiers");
|
|
40
|
-
var import_index = require("./index.less");
|
|
41
40
|
var DragSortTree = (props) => {
|
|
42
41
|
const { value, rowKey, tabKey, hiddenKeys, onChange } = props;
|
|
43
42
|
const [items, setItems] = (0, import_react.useState)(value || []);
|
|
@@ -35,7 +35,7 @@ module.exports = __toCommonJS(iconfont_exports);
|
|
|
35
35
|
var import_icons = require("@ant-design/icons");
|
|
36
36
|
var import_react = __toESM(require("react"));
|
|
37
37
|
var MyIcon = (0, import_icons.createFromIconfontCN)({
|
|
38
|
-
scriptUrl: "https://
|
|
38
|
+
scriptUrl: "https://static.pisellcdn.com/pisell2iconfont.js"
|
|
39
39
|
// 在 iconfont.cn 上生成
|
|
40
40
|
});
|
|
41
41
|
var IconFont = (props) => {
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// src/components/picker-view/index.tsx
|
|
30
|
+
var picker_view_exports = {};
|
|
31
|
+
__export(picker_view_exports, {
|
|
32
|
+
default: () => picker_view_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(picker_view_exports);
|
|
35
|
+
var import_picker_view = __toESM(require("antd-mobile/es/components/picker-view"));
|
|
36
|
+
var picker_view_default = import_picker_view.default;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { AnchorProps } from 'antd';
|
|
3
|
+
import './index.less';
|
|
4
|
+
export interface PisellAnchorProps extends AnchorProps {
|
|
5
|
+
items: any[];
|
|
6
|
+
direction: 'horizontal' | 'vertical';
|
|
7
|
+
scrollNumber: number;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* PisellAnchor锚点组件
|
|
11
|
+
* @param props
|
|
12
|
+
* @constructor
|
|
13
|
+
*/
|
|
14
|
+
declare const PisellAnchor: (props: PisellAnchorProps) => React.JSX.Element;
|
|
15
|
+
export default PisellAnchor;
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// src/components/pisellAnchor/index.tsx
|
|
30
|
+
var pisellAnchor_exports = {};
|
|
31
|
+
__export(pisellAnchor_exports, {
|
|
32
|
+
default: () => pisellAnchor_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(pisellAnchor_exports);
|
|
35
|
+
var import_react = __toESM(require("react"));
|
|
36
|
+
var import_antd = require("antd");
|
|
37
|
+
var import_classnames = __toESM(require("classnames"));
|
|
38
|
+
var import_ahooks = require("ahooks");
|
|
39
|
+
var import_icons = require("@ant-design/icons");
|
|
40
|
+
var import_index = require("./index.less");
|
|
41
|
+
var PisellAnchor = (props) => {
|
|
42
|
+
console.log(
|
|
43
|
+
"%c [ props ]-21",
|
|
44
|
+
"font-size:13px; background:pink; color:#bf2c9f;",
|
|
45
|
+
props
|
|
46
|
+
);
|
|
47
|
+
const [leftDisabled, setLeftDisabled] = (0, import_react.useState)(true);
|
|
48
|
+
const [rightDisabled, setRightDisabled] = (0, import_react.useState)(false);
|
|
49
|
+
const { items = [], direction, scrollNumber = 1 } = props;
|
|
50
|
+
const InnerProps = {
|
|
51
|
+
onChange: (key) => {
|
|
52
|
+
console.log(key);
|
|
53
|
+
},
|
|
54
|
+
getCurrentAnchor: () => {
|
|
55
|
+
if (items.length > 0) {
|
|
56
|
+
return items[0].href;
|
|
57
|
+
}
|
|
58
|
+
return "";
|
|
59
|
+
},
|
|
60
|
+
items
|
|
61
|
+
};
|
|
62
|
+
let itemsWidth = 0;
|
|
63
|
+
let containerWidth = 0;
|
|
64
|
+
const handleScroll = (e) => {
|
|
65
|
+
const left = e.target.scrollLeft;
|
|
66
|
+
console.log("滚动位置:", left);
|
|
67
|
+
setLeftDisabled(left === 0);
|
|
68
|
+
};
|
|
69
|
+
const debouncedScroll = (0, import_ahooks.useDebounceFn)(handleScroll, { wait: 1e3 });
|
|
70
|
+
const scrollToAnchor = ({ direction: direction2 }) => {
|
|
71
|
+
};
|
|
72
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { className: (0, import_classnames.default)("pisell-anchor-wapper") }, /* @__PURE__ */ import_react.default.createElement(import_antd.Anchor, { direction: "horizontal", ...InnerProps }), /* @__PURE__ */ import_react.default.createElement(import_antd.Flex, { className: "pisell-anchor-control" }, /* @__PURE__ */ import_react.default.createElement(
|
|
73
|
+
import_antd.Button,
|
|
74
|
+
{
|
|
75
|
+
icon: /* @__PURE__ */ import_react.default.createElement(import_icons.LeftOutlined, null),
|
|
76
|
+
shape: "circle",
|
|
77
|
+
disabled: leftDisabled,
|
|
78
|
+
onClick: () => scrollToAnchor({ direction: "left" })
|
|
79
|
+
}
|
|
80
|
+
), /* @__PURE__ */ import_react.default.createElement(
|
|
81
|
+
import_antd.Button,
|
|
82
|
+
{
|
|
83
|
+
icon: /* @__PURE__ */ import_react.default.createElement(import_icons.RightOutlined, null),
|
|
84
|
+
shape: "circle",
|
|
85
|
+
disabled: rightDisabled,
|
|
86
|
+
onClick: () => scrollToAnchor({ direction: "right" })
|
|
87
|
+
}
|
|
88
|
+
)), items.map((item) => {
|
|
89
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
90
|
+
"div",
|
|
91
|
+
{
|
|
92
|
+
id: `${item.key}`,
|
|
93
|
+
className: (0, import_classnames.default)("pisell-anchor-content"),
|
|
94
|
+
style: {
|
|
95
|
+
width: "100vw",
|
|
96
|
+
height: "100vh",
|
|
97
|
+
textAlign: "center",
|
|
98
|
+
background: "rgba(0,255,0,0.02)"
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
"这是",
|
|
102
|
+
item.title,
|
|
103
|
+
"的内容"
|
|
104
|
+
);
|
|
105
|
+
}));
|
|
106
|
+
};
|
|
107
|
+
var pisellAnchor_default = PisellAnchor;
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
// .pisell-anchor-wapper {
|
|
2
|
+
// width: 100%;
|
|
3
|
+
// overflow: hidden;
|
|
4
|
+
// .pisell-anchor-control {
|
|
5
|
+
// display: flex;
|
|
6
|
+
// position: absolute;
|
|
7
|
+
// top: 0;
|
|
8
|
+
// right: 0;
|
|
9
|
+
// z-index: 10;
|
|
10
|
+
// }
|
|
11
|
+
|
|
12
|
+
// .pisell-lowcode-anchor-wrapper {
|
|
13
|
+
// position: relative;
|
|
14
|
+
// height: 48px;
|
|
15
|
+
// width: 500px;
|
|
16
|
+
// margin: 0 auto;
|
|
17
|
+
// overflow-x: auto;
|
|
18
|
+
// scroll-snap-type: x mandatory;
|
|
19
|
+
// scroll-behavior: smooth;
|
|
20
|
+
// overflow-y: hidden;
|
|
21
|
+
|
|
22
|
+
// &::-webkit-scrollbar {
|
|
23
|
+
// display: none;
|
|
24
|
+
// }
|
|
25
|
+
// &::after {
|
|
26
|
+
// position: absolute;
|
|
27
|
+
// right: 0;
|
|
28
|
+
// top: 0;
|
|
29
|
+
// content: '';
|
|
30
|
+
// display: inline-block;
|
|
31
|
+
// width: 64px;
|
|
32
|
+
// height: 44px;
|
|
33
|
+
|
|
34
|
+
// background: linear-gradient(to right, #0000, #fff);
|
|
35
|
+
// }
|
|
36
|
+
// .pisell-lowcode-anchor {
|
|
37
|
+
// height: 44px;
|
|
38
|
+
// background-color: #fff;
|
|
39
|
+
// width: max-content;
|
|
40
|
+
// display: inline-block;
|
|
41
|
+
// .pisell-lowcode-anchor-ink-visible {
|
|
42
|
+
// display: none;
|
|
43
|
+
// }
|
|
44
|
+
// .pisell-lowcode-anchor-link {
|
|
45
|
+
// scroll-snap-align: start;
|
|
46
|
+
// max-width: 200px;
|
|
47
|
+
// // overflow: hidden;
|
|
48
|
+
// text-overflow: ellipsis;
|
|
49
|
+
// display: inline-block;
|
|
50
|
+
|
|
51
|
+
// padding: 12px 16px;
|
|
52
|
+
// height: 44px;
|
|
53
|
+
// box-sizing: border-box;
|
|
54
|
+
// align-items: center;
|
|
55
|
+
// background-color: #fff;
|
|
56
|
+
|
|
57
|
+
// .pisell-lowcode-anchor-link-title {
|
|
58
|
+
// color: var(--Gray-900, #101828);
|
|
59
|
+
|
|
60
|
+
// /* Text md/Semibold */
|
|
61
|
+
// font-family: Inter;
|
|
62
|
+
// font-size: 16px;
|
|
63
|
+
// font-style: normal;
|
|
64
|
+
// font-weight: 600;
|
|
65
|
+
// line-height: 24px; /* 150% */
|
|
66
|
+
// &:active,
|
|
67
|
+
// &:hover,
|
|
68
|
+
// &:visited,
|
|
69
|
+
// &:link {
|
|
70
|
+
// text-decoration: none;
|
|
71
|
+
// }
|
|
72
|
+
// }
|
|
73
|
+
|
|
74
|
+
// &.pisell-lowcode-anchor-link-active {
|
|
75
|
+
// border-radius: 100px;
|
|
76
|
+
// background: var(--Primary-600, #7f56d9);
|
|
77
|
+
// .pisell-lowcode-anchor-link-title {
|
|
78
|
+
// color: var(--White, #fff);
|
|
79
|
+
// }
|
|
80
|
+
// }
|
|
81
|
+
// // &:hover {
|
|
82
|
+
// // border-radius: 88px;
|
|
83
|
+
// // background: var(--Gray-100, #f2f4f7);
|
|
84
|
+
// // }
|
|
85
|
+
// }
|
|
86
|
+
// .pisell-lowcode-anchor-link + .pisell-lowcode-anchor-link {
|
|
87
|
+
// margin-left: 12px;
|
|
88
|
+
// }
|
|
89
|
+
// }
|
|
90
|
+
// }
|
|
91
|
+
// .pisell-anchor-content {
|
|
92
|
+
// width: 100%;
|
|
93
|
+
// height: 300px;
|
|
94
|
+
// line-height: 300px;
|
|
95
|
+
// font-size: 30px;
|
|
96
|
+
// text-align: center;
|
|
97
|
+
// }
|
|
98
|
+
// }
|
|
@@ -46,7 +46,15 @@ var PisellEntryInput = (props) => {
|
|
|
46
46
|
{
|
|
47
47
|
autoFocus: true,
|
|
48
48
|
value,
|
|
49
|
-
onChange: (e) =>
|
|
49
|
+
onChange: (e) => {
|
|
50
|
+
setValue(e.target.value);
|
|
51
|
+
if (!e.target.value) {
|
|
52
|
+
onChange(e.target.value);
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
onPressEnter: (e) => {
|
|
56
|
+
onChange(value);
|
|
57
|
+
},
|
|
50
58
|
style: { flex: 1 },
|
|
51
59
|
prefix: /* @__PURE__ */ import_react.default.createElement(import_iconfont.default, { style: { color: "#667085" }, type: "pisell2-search-lg" }),
|
|
52
60
|
allowClear: true
|
|
@@ -1,3 +1,13 @@
|
|
|
1
1
|
import { EntryModeType } from './index';
|
|
2
2
|
export declare const entryModeTextIcon: Record<EntryModeType['type'], any>;
|
|
3
|
+
export declare const entryModeErrorTextIcon: {
|
|
4
|
+
scanner: {
|
|
5
|
+
icon: string;
|
|
6
|
+
text: string;
|
|
7
|
+
};
|
|
8
|
+
nfc: {
|
|
9
|
+
icon: string;
|
|
10
|
+
text: string;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
3
13
|
export declare const passiveModeType: string[];
|
|
@@ -19,6 +19,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
19
19
|
// src/components/pisellInformationEntry/constants.ts
|
|
20
20
|
var constants_exports = {};
|
|
21
21
|
__export(constants_exports, {
|
|
22
|
+
entryModeErrorTextIcon: () => entryModeErrorTextIcon,
|
|
22
23
|
entryModeTextIcon: () => entryModeTextIcon,
|
|
23
24
|
passiveModeType: () => passiveModeType
|
|
24
25
|
});
|
|
@@ -41,9 +42,20 @@ var entryModeTextIcon = {
|
|
|
41
42
|
text: "NFC ready"
|
|
42
43
|
}
|
|
43
44
|
};
|
|
45
|
+
var entryModeErrorTextIcon = {
|
|
46
|
+
scanner: {
|
|
47
|
+
icon: "pisell2-a-Scanner11",
|
|
48
|
+
text: "Scanner"
|
|
49
|
+
},
|
|
50
|
+
nfc: {
|
|
51
|
+
icon: "pisell2-a-NFC1",
|
|
52
|
+
text: "NFC"
|
|
53
|
+
}
|
|
54
|
+
};
|
|
44
55
|
var passiveModeType = ["scanner", "nfc"];
|
|
45
56
|
// Annotate the CommonJS export names for ESM import in node:
|
|
46
57
|
0 && (module.exports = {
|
|
58
|
+
entryModeErrorTextIcon,
|
|
47
59
|
entryModeTextIcon,
|
|
48
60
|
passiveModeType
|
|
49
61
|
});
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
declare type Peripherals = {
|
|
2
|
+
scanner: 'none' | 'connected' | 'disconnect';
|
|
3
|
+
nfc: 'none' | 'connected' | 'disconnect';
|
|
4
|
+
};
|
|
5
|
+
declare const useTerminalPeripherals: (onChange?: ((val: string) => void) | undefined) => {
|
|
6
|
+
peripheralsStatus: Peripherals;
|
|
7
|
+
};
|
|
8
|
+
export default useTerminalPeripherals;
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// src/components/pisellInformationEntry/hooks/useTerminalPeripherals.ts
|
|
30
|
+
var useTerminalPeripherals_exports = {};
|
|
31
|
+
__export(useTerminalPeripherals_exports, {
|
|
32
|
+
default: () => useTerminalPeripherals_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(useTerminalPeripherals_exports);
|
|
35
|
+
var import_react = require("react");
|
|
36
|
+
var import_useEngineContext = __toESM(require("../../../hooks/useEngineContext"));
|
|
37
|
+
var useTerminalPeripherals = (onChange) => {
|
|
38
|
+
var _a;
|
|
39
|
+
const context = (0, import_useEngineContext.default)();
|
|
40
|
+
const { interaction } = ((_a = context.appHelper) == null ? void 0 : _a.utils) || {};
|
|
41
|
+
const [peripheralsStatus, setPeripheralsStatus] = (0, import_react.useState)({
|
|
42
|
+
scanner: "none",
|
|
43
|
+
nfc: "none"
|
|
44
|
+
});
|
|
45
|
+
(0, import_react.useEffect)(() => {
|
|
46
|
+
var _a2, _b, _c, _d, _e, _f;
|
|
47
|
+
(_b = (_a2 = interaction == null ? void 0 : interaction.utils) == null ? void 0 : _a2.mountFunction) == null ? void 0 : _b.call(
|
|
48
|
+
_a2,
|
|
49
|
+
"global",
|
|
50
|
+
"peripheralsResult",
|
|
51
|
+
(strVal) => {
|
|
52
|
+
try {
|
|
53
|
+
const val = JSON.parse(strVal);
|
|
54
|
+
onChange == null ? void 0 : onChange(val.value);
|
|
55
|
+
} catch (err) {
|
|
56
|
+
console.error(err);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
);
|
|
60
|
+
(_d = (_c = interaction == null ? void 0 : interaction.utils) == null ? void 0 : _c.postMessageToApp) == null ? void 0 : _d.call(_c, {
|
|
61
|
+
module: "global",
|
|
62
|
+
key: "get_peripherals_status",
|
|
63
|
+
data: {}
|
|
64
|
+
});
|
|
65
|
+
(_f = (_e = interaction == null ? void 0 : interaction.utils) == null ? void 0 : _e.mountFunction) == null ? void 0 : _f.call(
|
|
66
|
+
_e,
|
|
67
|
+
"global",
|
|
68
|
+
"peripheralsStatus",
|
|
69
|
+
(strPeripherals) => {
|
|
70
|
+
try {
|
|
71
|
+
const peripherals = JSON.parse(strPeripherals);
|
|
72
|
+
setPeripheralsStatus(peripherals);
|
|
73
|
+
} catch (err) {
|
|
74
|
+
console.error(err);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
);
|
|
78
|
+
}, []);
|
|
79
|
+
return {
|
|
80
|
+
peripheralsStatus
|
|
81
|
+
};
|
|
82
|
+
};
|
|
83
|
+
var useTerminalPeripherals_default = useTerminalPeripherals;
|
|
@@ -42,6 +42,7 @@ var import_Scan = __toESM(require("./Scan"));
|
|
|
42
42
|
var import_button = __toESM(require("../button"));
|
|
43
43
|
var import_Input = __toESM(require("./Input"));
|
|
44
44
|
var import_utils = require("./utils");
|
|
45
|
+
var import_useTerminalPeripherals = __toESM(require("./hooks/useTerminalPeripherals"));
|
|
45
46
|
var import_index = require("./index.less");
|
|
46
47
|
var CardButton = (props) => {
|
|
47
48
|
const { icon, children, ...others } = props;
|
|
@@ -60,6 +61,7 @@ var PisellInformationEntry = (props) => {
|
|
|
60
61
|
const [currentType, setCurrentType] = (0, import_react.useState)(
|
|
61
62
|
null
|
|
62
63
|
);
|
|
64
|
+
const { peripheralsStatus } = (0, import_useTerminalPeripherals.default)(onChange);
|
|
63
65
|
const [availableEntryModes, setAvailableEntryModes] = (0, import_react.useState)(entryModes);
|
|
64
66
|
(0, import_react.useEffect)(() => {
|
|
65
67
|
document.body.id = "body";
|
|
@@ -70,13 +72,22 @@ var PisellInformationEntry = (props) => {
|
|
|
70
72
|
if (!await (0, import_utils.hasCamera)()) {
|
|
71
73
|
available = entryModes.filter((item) => item.type !== "scanCode");
|
|
72
74
|
}
|
|
75
|
+
available = available.filter((item) => {
|
|
76
|
+
if (item.type === "scanner") {
|
|
77
|
+
return peripheralsStatus.scanner !== "none";
|
|
78
|
+
}
|
|
79
|
+
if (item.type === "nfc") {
|
|
80
|
+
return peripheralsStatus.nfc !== "none";
|
|
81
|
+
}
|
|
82
|
+
return true;
|
|
83
|
+
});
|
|
73
84
|
if (available.length === 1) {
|
|
74
85
|
setCurrentType(available[0].type);
|
|
75
86
|
}
|
|
76
87
|
setAvailableEntryModes(available);
|
|
77
88
|
};
|
|
78
89
|
getEntryModes();
|
|
79
|
-
}, [entryModes]);
|
|
90
|
+
}, [entryModes, peripheralsStatus]);
|
|
80
91
|
const handleChange = (val) => {
|
|
81
92
|
onChange == null ? void 0 : onChange(val);
|
|
82
93
|
};
|
|
@@ -139,6 +150,11 @@ var PisellInformationEntry = (props) => {
|
|
|
139
150
|
}
|
|
140
151
|
))), isShowEntryModes && /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-information-entry-modes" }, availableEntryModes.map((item) => {
|
|
141
152
|
const detail = import_constants.entryModeTextIcon[item.type];
|
|
153
|
+
let icon = detail.icon;
|
|
154
|
+
if (["scanner", "nfc"].includes(item.type)) {
|
|
155
|
+
const disconnect = import_constants.entryModeErrorTextIcon[item.type];
|
|
156
|
+
icon = peripheralsStatus[item.type] === "connected" ? detail.icon : disconnect.icon;
|
|
157
|
+
}
|
|
142
158
|
return /* @__PURE__ */ import_react.default.createElement(
|
|
143
159
|
CardButton,
|
|
144
160
|
{
|
|
@@ -146,7 +162,7 @@ var PisellInformationEntry = (props) => {
|
|
|
146
162
|
icon: /* @__PURE__ */ import_react.default.createElement(
|
|
147
163
|
import_iconfont.default,
|
|
148
164
|
{
|
|
149
|
-
type:
|
|
165
|
+
type: icon,
|
|
150
166
|
className: "pisell-card-button-icon"
|
|
151
167
|
}
|
|
152
168
|
),
|
|
@@ -13,6 +13,8 @@ export interface PisellLoadingProps extends SpinProps {
|
|
|
13
13
|
mask?: boolean | MaskType;
|
|
14
14
|
/** 是否全屏 */
|
|
15
15
|
fullscreen?: boolean;
|
|
16
|
+
/** 延迟显示加载效果的时间(防止闪烁) */
|
|
17
|
+
delay?: number;
|
|
16
18
|
}
|
|
17
19
|
declare const PisellLoading: (props: PisellLoadingProps) => React.JSX.Element;
|
|
18
20
|
export default PisellLoading;
|
|
@@ -39,7 +39,7 @@ var import_useCssVariables = __toESM(require("../../hooks/useCssVariables"));
|
|
|
39
39
|
var import_utils = require("../../utils");
|
|
40
40
|
var import_index = require("./index.less");
|
|
41
41
|
var PisellLoading = (props) => {
|
|
42
|
-
const { children, fullscreen, mask, loading } = props;
|
|
42
|
+
const { children, fullscreen, mask, loading, delay } = props;
|
|
43
43
|
const ref = (0, import_react.useRef)(null);
|
|
44
44
|
const {
|
|
45
45
|
backgroundColor = "#fff",
|
|
@@ -60,6 +60,7 @@ var PisellLoading = (props) => {
|
|
|
60
60
|
import_antd.Spin,
|
|
61
61
|
{
|
|
62
62
|
fullscreen,
|
|
63
|
+
delay,
|
|
63
64
|
spinning: loading,
|
|
64
65
|
indicator: /* @__PURE__ */ import_react.default.createElement(import_iconfont.default, { type: "pisell2-loader2", style: { fontSize: 40 }, spin: true })
|
|
65
66
|
},
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// src/components/pisellQrcode/index.tsx
|
|
30
|
+
var pisellQrcode_exports = {};
|
|
31
|
+
__export(pisellQrcode_exports, {
|
|
32
|
+
default: () => pisellQrcode_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(pisellQrcode_exports);
|
|
35
|
+
var import_react = __toESM(require("react"));
|
|
36
|
+
var import_antd = require("antd");
|
|
37
|
+
var import_classnames = __toESM(require("classnames"));
|
|
38
|
+
var import_pisellModal = __toESM(require("./../pisellModal"));
|
|
39
|
+
var import_index = require("./index.less");
|
|
40
|
+
var qrcodeValue = "https://www.baidu.com";
|
|
41
|
+
var PisellQrcode = (props) => {
|
|
42
|
+
const { size, platform } = props;
|
|
43
|
+
const [open, setOpen] = (0, import_react.useState)(false);
|
|
44
|
+
const [height, setHeight] = import_react.default.useState(0);
|
|
45
|
+
(0, import_react.useEffect)(() => {
|
|
46
|
+
document.body.id = "body";
|
|
47
|
+
}, []);
|
|
48
|
+
const modalRef = (0, import_react.useRef)(null);
|
|
49
|
+
(0, import_react.useEffect)(() => {
|
|
50
|
+
if (open) {
|
|
51
|
+
console.log(
|
|
52
|
+
"%c [ modalRef ]-22",
|
|
53
|
+
"font-size:13px; background:pink; color:#bf2c9f;",
|
|
54
|
+
modalRef
|
|
55
|
+
);
|
|
56
|
+
}
|
|
57
|
+
}, [open]);
|
|
58
|
+
const modalProps = {
|
|
59
|
+
title: "QR code",
|
|
60
|
+
platform,
|
|
61
|
+
onCancel: () => setOpen(false),
|
|
62
|
+
open,
|
|
63
|
+
footer: null,
|
|
64
|
+
mobileModalHeight: "auto",
|
|
65
|
+
className: (0, import_classnames.default)("pisell-qrcode-modal"),
|
|
66
|
+
bodyStyle: {
|
|
67
|
+
padding: 0
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { className: (0, import_classnames.default)("pisell-qrcode-wrapper") }, /* @__PURE__ */ import_react.default.createElement("div", { onClick: () => setOpen(true) }, /* @__PURE__ */ import_react.default.createElement(import_antd.QRCode, { size, value: qrcodeValue, bordered: false })), /* @__PURE__ */ import_react.default.createElement(import_pisellModal.default, { ...modalProps }, /* @__PURE__ */ import_react.default.createElement(import_antd.QRCode, { size, value: qrcodeValue }), /* @__PURE__ */ import_react.default.createElement("p", { className: (0, import_classnames.default)("pisell-qrcode-modal-value") }, qrcodeValue), /* @__PURE__ */ import_react.default.createElement(import_antd.Divider, null), /* @__PURE__ */ import_react.default.createElement(
|
|
71
|
+
import_antd.Button,
|
|
72
|
+
{
|
|
73
|
+
onClick: () => setOpen(false),
|
|
74
|
+
className: (0, import_classnames.default)("pisell-qrcode-modal-button")
|
|
75
|
+
},
|
|
76
|
+
"Done"
|
|
77
|
+
)));
|
|
78
|
+
};
|
|
79
|
+
var pisellQrcode_default = PisellQrcode;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
.pisell-qrcode-wrapper {
|
|
2
|
+
}
|
|
3
|
+
|
|
4
|
+
.pisell-qrcode-modal {
|
|
5
|
+
.pisell-lowcode-modal-content {
|
|
6
|
+
padding: 0;
|
|
7
|
+
.pisell-lowcode-modal-body {
|
|
8
|
+
display: flex;
|
|
9
|
+
width: 100%;
|
|
10
|
+
align-items: center;
|
|
11
|
+
flex-direction: column;
|
|
12
|
+
.pisell-qrcode-modal-value {
|
|
13
|
+
color: var(--Gray-500, #667085);
|
|
14
|
+
font-family: Inter;
|
|
15
|
+
font-size: 14px;
|
|
16
|
+
font-style: normal;
|
|
17
|
+
font-weight: 400;
|
|
18
|
+
line-height: 20px;
|
|
19
|
+
margin: 20px 0 24px;
|
|
20
|
+
}
|
|
21
|
+
.pisell-lowcode-divider {
|
|
22
|
+
margin: 0;
|
|
23
|
+
}
|
|
24
|
+
.pisell-qrcode-modal-button {
|
|
25
|
+
margin: 24px;
|
|
26
|
+
|
|
27
|
+
color: var(--Base-White, #fff);
|
|
28
|
+
|
|
29
|
+
font-family: Inter;
|
|
30
|
+
font-size: 16px;
|
|
31
|
+
font-style: normal;
|
|
32
|
+
font-weight: 600;
|
|
33
|
+
line-height: 24px;
|
|
34
|
+
|
|
35
|
+
width: calc(100% - 48px);
|
|
36
|
+
box-sizing: border-box;
|
|
37
|
+
background-color: var(--theme-color, #7f56d9);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|