@pisell/materials 3.3.85 → 3.3.86
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 +6 -6
- package/build/lowcode/preview.js +8 -8
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +21 -21
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +21 -21
- package/es/components/Pagination/index.d.ts +4 -5
- package/es/components/Pagination/index.js +77 -59
- package/es/components/Pagination/index.less +13 -7
- package/es/components/PisellFields/index.d.ts +2 -2
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.d.ts +0 -1
- package/es/components/dataSourceComponents/fields/index.d.ts +2 -3
- package/es/components/filter/components/Dropdown/index.js +6 -2
- package/es/components/filter/components/FilterButton/index.js +19 -4
- package/es/components/filter/components/FilterButton/types.d.ts +8 -0
- package/es/components/filter/components/FilterItem/AsyncOptionsSelectWrapper.d.ts +21 -0
- package/es/components/filter/components/FilterItem/AsyncOptionsSelectWrapper.js +90 -0
- package/es/components/filter/components/FilterItem/index.d.ts +3 -3
- package/es/components/filter/components/FilterItem/index.js +138 -7
- package/es/components/filter/components/FilterItem/index.less +90 -0
- package/es/components/filter/types.d.ts +4 -2
- package/es/components/pisellBatchActionBar/PisellBatchActionBar.js +38 -29
- package/es/components/pisellCurrency/PisellCurrency.less +163 -25
- package/es/components/pisellCurrency/PisellCurrency.stories.js +1 -1
- package/es/components/pisellCurrency/index.d.ts +2 -1
- package/es/components/pisellCurrency/index.js +16 -1
- package/es/components/pisellDataSourceContainer/components/ColumnsSetting/index.d.ts +7 -1
- package/es/components/pisellDataSourceContainer/components/ColumnsSetting/index.js +30 -3
- package/es/components/pisellDataSourceContainer/components/ColumnsSetting/utils.d.ts +28 -0
- package/es/components/pisellDataSourceContainer/components/ColumnsSetting/utils.js +68 -0
- package/es/components/pisellDataSourceContainer/components/Table/index.d.ts +1 -0
- package/es/components/pisellDataSourceContainer/components/Table/index.js +5 -3
- package/es/components/pisellDataSourceContainer/components/Table/useColumns.d.ts +1 -0
- package/es/components/pisellDataSourceContainer/components/Table/useColumns.js +37 -15
- package/es/components/pisellDateTimeDisplay/PisellDateTimeDisplay.js +21 -15
- package/es/components/pisellDateTimeDisplay/PisellDateTimeDisplay.less +2 -1
- package/es/components/pisellDateTimeDisplay/hooks/useCurrentTime.js +6 -4
- package/es/components/pisellDateTimeDisplay/utils/localeUtils.d.ts +2 -2
- package/es/components/pisellDateTimeDisplay/utils/localeUtils.js +15 -4
- package/es/components/pisellDateTimeDisplay/utils/relativeDay.d.ts +1 -0
- package/es/components/pisellDateTimeDisplay/utils/relativeDay.js +4 -2
- package/es/components/pisellEmail/PisellEmail.less +119 -10
- package/es/components/pisellEmail/PisellEmail.stories.js +1 -1
- package/es/components/pisellEmail/index.d.ts +3 -1
- package/es/components/pisellEmail/index.js +17 -1
- package/es/components/pisellFilter/index.js +76 -10
- package/es/components/pisellFind/index.js +11 -2
- package/es/components/pisellGridPro/ToolBar/index.less +23 -0
- package/es/components/pisellGridPro/index.d.ts +4 -0
- package/es/components/pisellLongText/PisellLongText.less +72 -4
- package/es/components/pisellLongText/PisellLongText.stories.js +1 -1
- package/es/components/pisellLongText/index.d.ts +2 -1
- package/es/components/pisellLongText/index.js +16 -1
- package/es/components/pisellLookup/PisellLookup.js +18 -9
- package/es/components/pisellLookup/PisellLookup.less +39 -16
- package/es/components/pisellLookup/components/LookupTrigger.js +14 -4
- package/es/components/pisellMultipleSelect/PisellMultipleSelect.less +159 -124
- package/es/components/pisellMultipleSelect/PisellMultipleSelect.stories.js +1 -1
- package/es/components/pisellMultipleSelect/components/EditView.js +8 -2
- package/es/components/pisellMultipleSelect/components/ReadOnlyView.d.ts +1 -1
- package/es/components/pisellMultipleSelect/components/ReadOnlyView.js +15 -11
- package/es/components/pisellMultipleSelect/index.d.ts +2 -1
- package/es/components/pisellMultipleSelect/index.js +16 -1
- package/es/components/pisellNumber/PisellNumber.less +135 -17
- package/es/components/pisellNumber/PisellNumber.stories.js +1 -1
- package/es/components/pisellNumber/index.d.ts +2 -1
- package/es/components/pisellNumber/index.js +16 -1
- package/es/components/pisellPercent/PisellPercent.less +142 -24
- package/es/components/pisellPercent/PisellPercent.stories.js +1 -1
- package/es/components/pisellPercent/index.d.ts +2 -1
- package/es/components/pisellPercent/index.js +16 -1
- package/es/components/pisellPhone/PisellPhone.less +122 -27
- package/es/components/pisellPhone/PisellPhone.stories.js +1 -1
- package/es/components/pisellPhone/components/EditView.js +1 -1
- package/es/components/pisellPhone/components/ReadOnlyView.js +15 -6
- package/es/components/pisellPhone/index.d.ts +2 -1
- package/es/components/pisellPhone/index.js +16 -1
- package/es/components/pisellRating/PisellRating.less +20 -12
- package/es/components/pisellRating/PisellRating.stories.js +1 -1
- package/es/components/pisellRating/index.d.ts +2 -1
- package/es/components/pisellRating/index.js +16 -1
- package/es/components/pisellRecordBoard/PisellRecordBoard.d.ts +8 -0
- package/es/components/pisellRecordBoard/PisellRecordBoard.js +243 -0
- package/es/components/pisellRecordBoard/PisellRecordBoard.stories.d.ts +81 -0
- package/es/components/pisellRecordBoard/PisellRecordBoard.stories.js +2358 -0
- package/es/components/pisellRecordBoard/context/RecordBoardContext.js +2 -0
- package/es/components/pisellRecordBoard/context/RecordBoardProvider.js +13 -0
- package/es/components/pisellRecordBoard/hooks/useRecordBoardContext.js +29 -0
- package/es/components/pisellRecordBoard/index.d.ts +35 -0
- package/es/components/pisellRecordBoard/index.js +23 -0
- package/es/components/pisellRecordBoard/layouts/CardLayout/CardList.js +36 -0
- package/es/components/pisellRecordBoard/layouts/CardLayout/index.js +20 -0
- package/es/components/pisellRecordBoard/layouts/GridLayout/Grid.d.ts +14 -0
- package/es/components/pisellRecordBoard/layouts/GridLayout/Grid.js +242 -0
- package/es/components/pisellRecordBoard/layouts/GridLayout/Grid.less +100 -0
- package/es/components/pisellRecordBoard/layouts/GridLayout/index.d.ts +13 -0
- package/es/components/pisellRecordBoard/layouts/GridLayout/index.js +20 -0
- package/es/components/pisellRecordBoard/shellFrame/BatchActionBar/index.d.ts +8 -0
- package/es/components/pisellRecordBoard/shellFrame/BatchActionBar/index.js +90 -0
- package/es/components/pisellRecordBoard/shellFrame/ColumnSetting/ColumnSettingPopover.d.ts +15 -0
- package/es/components/pisellRecordBoard/shellFrame/ColumnSetting/ColumnSettingPopover.js +138 -0
- package/es/components/pisellRecordBoard/shellFrame/ColumnSetting/index.d.ts +8 -0
- package/es/components/pisellRecordBoard/shellFrame/ColumnSetting/index.js +66 -0
- package/es/components/pisellRecordBoard/shellFrame/ColumnSetting/index.less +2 -0
- package/es/components/pisellRecordBoard/shellFrame/Pagination/index.d.ts +14 -0
- package/es/components/pisellRecordBoard/shellFrame/Pagination/index.js +66 -0
- package/es/components/pisellRecordBoard/shellFrame/Pagination/index.less +78 -0
- package/es/components/pisellRecordBoard/shellFrame/Search/index.d.ts +10 -0
- package/es/components/pisellRecordBoard/shellFrame/Search/index.js +41 -0
- package/es/components/pisellRecordBoard/shellFrame/ToolBar/ToolBarFilter.less +112 -0
- package/es/components/pisellRecordBoard/shellFrame/ToolBar/index.d.ts +11 -0
- package/es/components/pisellRecordBoard/shellFrame/ToolBar/index.js +215 -0
- package/es/components/pisellRecordBoard/shellFrame/ToolBarQuickFilter/index.d.ts +17 -0
- package/es/components/pisellRecordBoard/shellFrame/ToolBarQuickFilter/index.js +77 -0
- package/es/components/pisellRecordBoard/shellFrame/ToolBarReset/index.d.ts +16 -0
- package/es/components/pisellRecordBoard/shellFrame/ToolBarReset/index.js +65 -0
- package/es/components/pisellRecordBoard/shellFrame/ToolBarReset/index.less +41 -0
- package/es/components/pisellRecordBoard/shellFrame/index.d.ts +26 -0
- package/es/components/pisellRecordBoard/shellFrame/index.js +104 -0
- package/es/components/pisellRecordBoard/types.js +1 -0
- package/es/components/pisellRecordBoard/utils/recordBoardColumns.d.ts +41 -0
- package/es/components/pisellRecordBoard/utils/recordBoardColumns.js +508 -0
- package/es/components/pisellRecordBoard/utils/withRecordBoard.js +27 -0
- package/es/components/pisellShellFrame/PisellShellFrame.js +107 -0
- package/es/components/pisellShellFrame/PisellShellFrame.less +78 -0
- package/es/components/pisellShellFrame/PisellShellFrame.stories.js +195 -0
- package/es/components/pisellShellFrame/index.js +1 -0
- package/es/components/pisellShellFrame/types.js +1 -0
- package/es/components/pisellSingleLineText/PisellSingleLineText.stories.js +1 -1
- package/es/components/pisellSingleLineText/index.d.ts +2 -1
- package/es/components/pisellSingleLineText/index.js +16 -1
- package/es/components/pisellSingleSelect/PisellSingleSelect.less +103 -46
- package/es/components/pisellSingleSelect/PisellSingleSelect.stories.js +1 -1
- package/es/components/pisellSingleSelect/components/EditView.js +8 -2
- package/es/components/pisellSingleSelect/components/ReadOnlyView.d.ts +1 -1
- package/es/components/pisellSingleSelect/components/ReadOnlyView.js +10 -6
- package/es/components/pisellSingleSelect/index.d.ts +2 -1
- package/es/components/pisellSingleSelect/index.js +16 -1
- package/es/components/pisellTimeRangeDisplay/PisellTimeRangeDisplay.js +6 -3
- package/es/components/pisellUrl/PisellUrl.less +120 -11
- package/es/components/pisellUrl/PisellUrl.stories.js +1 -1
- package/es/components/pisellUrl/index.d.ts +3 -1
- package/es/components/pisellUrl/index.js +17 -1
- package/es/components/productCard/components/Packages/utils.d.ts +1 -1
- package/es/components/select/index.less +18 -2
- package/es/components/sort/index.js +25 -3
- package/es/components/table/Table/fields/select/index.d.ts +0 -1
- package/es/components/table/Table/fields/text/index.d.ts +1 -0
- package/es/components/table/Table/utils.d.ts +1 -1
- package/es/index.d.ts +6 -2
- package/es/index.js +2 -0
- package/es/locales/en-US.d.ts +36 -0
- package/es/locales/en-US.js +50 -2
- package/es/locales/index.js +2 -2
- package/es/locales/ja.d.ts +2 -0
- package/es/locales/ja.js +2 -0
- package/es/locales/pt.d.ts +2 -0
- package/es/locales/pt.js +2 -0
- package/es/locales/zh-CN.d.ts +36 -0
- package/es/locales/zh-CN.js +54 -6
- package/es/locales/zh-TW.d.ts +36 -0
- package/es/locales/zh-TW.js +54 -6
- package/es/utils/tagColor.js +39 -0
- package/lib/components/Pagination/index.d.ts +4 -5
- package/lib/components/Pagination/index.js +44 -21
- package/lib/components/Pagination/index.less +13 -7
- package/lib/components/PisellFields/index.d.ts +2 -2
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.d.ts +0 -1
- package/lib/components/dataSourceComponents/fields/index.d.ts +2 -3
- package/lib/components/filter/components/Dropdown/index.js +9 -2
- package/lib/components/filter/components/FilterButton/index.js +14 -3
- package/lib/components/filter/components/FilterButton/types.d.ts +8 -0
- package/lib/components/filter/components/FilterItem/AsyncOptionsSelectWrapper.d.ts +21 -0
- package/lib/components/filter/components/FilterItem/AsyncOptionsSelectWrapper.js +69 -0
- package/lib/components/filter/components/FilterItem/index.d.ts +3 -3
- package/lib/components/filter/components/FilterItem/index.js +133 -4
- package/lib/components/filter/components/FilterItem/index.less +90 -0
- package/lib/components/filter/types.d.ts +4 -2
- package/lib/components/pisellBatchActionBar/PisellBatchActionBar.js +26 -23
- package/lib/components/pisellCurrency/PisellCurrency.less +163 -25
- package/lib/components/pisellCurrency/PisellCurrency.stories.js +1 -1
- package/lib/components/pisellCurrency/index.d.ts +2 -1
- package/lib/components/pisellCurrency/index.js +7 -0
- package/lib/components/pisellDataSourceContainer/components/ColumnsSetting/index.d.ts +7 -1
- package/lib/components/pisellDataSourceContainer/components/ColumnsSetting/index.js +18 -2
- package/lib/components/pisellDataSourceContainer/components/ColumnsSetting/utils.d.ts +28 -0
- package/lib/components/pisellDataSourceContainer/components/ColumnsSetting/utils.js +81 -0
- package/lib/components/pisellDataSourceContainer/components/Table/index.d.ts +1 -0
- package/lib/components/pisellDataSourceContainer/components/Table/index.js +3 -1
- package/lib/components/pisellDataSourceContainer/components/Table/useColumns.d.ts +1 -0
- package/lib/components/pisellDataSourceContainer/components/Table/useColumns.js +25 -14
- package/lib/components/pisellDateTimeDisplay/PisellDateTimeDisplay.js +17 -11
- package/lib/components/pisellDateTimeDisplay/PisellDateTimeDisplay.less +2 -1
- package/lib/components/pisellDateTimeDisplay/hooks/useCurrentTime.js +7 -1
- package/lib/components/pisellDateTimeDisplay/utils/localeUtils.d.ts +2 -2
- package/lib/components/pisellDateTimeDisplay/utils/localeUtils.js +10 -2
- package/lib/components/pisellDateTimeDisplay/utils/relativeDay.d.ts +1 -0
- package/lib/components/pisellDateTimeDisplay/utils/relativeDay.js +2 -1
- package/lib/components/pisellEmail/PisellEmail.less +119 -10
- package/lib/components/pisellEmail/PisellEmail.stories.js +1 -1
- package/lib/components/pisellEmail/index.d.ts +3 -1
- package/lib/components/pisellEmail/index.js +10 -2
- package/lib/components/pisellFilter/index.js +79 -8
- package/lib/components/pisellFind/index.js +11 -2
- package/lib/components/pisellGridPro/ToolBar/index.less +23 -0
- package/lib/components/pisellGridPro/index.d.ts +4 -0
- package/lib/components/pisellLongText/PisellLongText.less +72 -4
- package/lib/components/pisellLongText/PisellLongText.stories.js +1 -1
- package/lib/components/pisellLongText/index.d.ts +2 -1
- package/lib/components/pisellLongText/index.js +7 -0
- package/lib/components/pisellLookup/PisellLookup.js +12 -6
- package/lib/components/pisellLookup/PisellLookup.less +39 -16
- package/lib/components/pisellLookup/components/LookupTrigger.js +9 -3
- package/lib/components/pisellMultipleSelect/PisellMultipleSelect.less +159 -124
- package/lib/components/pisellMultipleSelect/PisellMultipleSelect.stories.js +1 -1
- package/lib/components/pisellMultipleSelect/components/EditView.js +4 -1
- package/lib/components/pisellMultipleSelect/components/ReadOnlyView.d.ts +1 -1
- package/lib/components/pisellMultipleSelect/components/ReadOnlyView.js +29 -1
- package/lib/components/pisellMultipleSelect/index.d.ts +2 -1
- package/lib/components/pisellMultipleSelect/index.js +7 -0
- package/lib/components/pisellNumber/PisellNumber.less +135 -17
- package/lib/components/pisellNumber/PisellNumber.stories.js +1 -1
- package/lib/components/pisellNumber/index.d.ts +2 -1
- package/lib/components/pisellNumber/index.js +7 -0
- package/lib/components/pisellPercent/PisellPercent.less +142 -24
- package/lib/components/pisellPercent/PisellPercent.stories.js +1 -1
- package/lib/components/pisellPercent/index.d.ts +2 -1
- package/lib/components/pisellPercent/index.js +7 -0
- package/lib/components/pisellPhone/PisellPhone.less +122 -27
- package/lib/components/pisellPhone/PisellPhone.stories.js +1 -1
- package/lib/components/pisellPhone/components/EditView.js +1 -1
- package/lib/components/pisellPhone/components/ReadOnlyView.js +18 -4
- package/lib/components/pisellPhone/index.d.ts +2 -1
- package/lib/components/pisellPhone/index.js +7 -0
- package/lib/components/pisellRating/PisellRating.less +20 -12
- package/lib/components/pisellRating/PisellRating.stories.js +1 -1
- package/lib/components/pisellRating/index.d.ts +2 -1
- package/lib/components/pisellRating/index.js +7 -0
- package/lib/components/pisellRecordBoard/PisellRecordBoard.d.ts +8 -0
- package/lib/components/pisellRecordBoard/PisellRecordBoard.js +263 -0
- package/lib/components/pisellRecordBoard/PisellRecordBoard.stories.d.ts +81 -0
- package/lib/components/pisellRecordBoard/PisellRecordBoard.stories.js +1673 -0
- package/lib/components/pisellRecordBoard/context/RecordBoardContext.js +30 -0
- package/lib/components/pisellRecordBoard/context/RecordBoardProvider.js +46 -0
- package/lib/components/pisellRecordBoard/hooks/useRecordBoardContext.js +47 -0
- package/lib/components/pisellRecordBoard/index.d.ts +35 -0
- package/lib/components/pisellRecordBoard/index.js +59 -0
- package/lib/components/pisellRecordBoard/layouts/CardLayout/CardList.js +46 -0
- package/lib/components/pisellRecordBoard/layouts/CardLayout/index.js +46 -0
- package/lib/components/pisellRecordBoard/layouts/GridLayout/Grid.d.ts +14 -0
- package/lib/components/pisellRecordBoard/layouts/GridLayout/Grid.js +264 -0
- package/lib/components/pisellRecordBoard/layouts/GridLayout/Grid.less +100 -0
- package/lib/components/pisellRecordBoard/layouts/GridLayout/index.d.ts +13 -0
- package/lib/components/pisellRecordBoard/layouts/GridLayout/index.js +46 -0
- package/lib/components/pisellRecordBoard/shellFrame/BatchActionBar/index.d.ts +8 -0
- package/lib/components/pisellRecordBoard/shellFrame/BatchActionBar/index.js +108 -0
- package/lib/components/pisellRecordBoard/shellFrame/ColumnSetting/ColumnSettingPopover.d.ts +15 -0
- package/lib/components/pisellRecordBoard/shellFrame/ColumnSetting/ColumnSettingPopover.js +173 -0
- package/lib/components/pisellRecordBoard/shellFrame/ColumnSetting/index.d.ts +8 -0
- package/lib/components/pisellRecordBoard/shellFrame/ColumnSetting/index.js +100 -0
- package/lib/components/pisellRecordBoard/shellFrame/ColumnSetting/index.less +2 -0
- package/lib/components/pisellRecordBoard/shellFrame/Pagination/index.d.ts +14 -0
- package/lib/components/pisellRecordBoard/shellFrame/Pagination/index.js +90 -0
- package/lib/components/pisellRecordBoard/shellFrame/Pagination/index.less +78 -0
- package/lib/components/pisellRecordBoard/shellFrame/Search/index.d.ts +10 -0
- package/lib/components/pisellRecordBoard/shellFrame/Search/index.js +53 -0
- package/lib/components/pisellRecordBoard/shellFrame/ToolBar/ToolBarFilter.less +112 -0
- package/lib/components/pisellRecordBoard/shellFrame/ToolBar/index.d.ts +11 -0
- package/lib/components/pisellRecordBoard/shellFrame/ToolBar/index.js +247 -0
- package/lib/components/pisellRecordBoard/shellFrame/ToolBarQuickFilter/index.d.ts +17 -0
- package/lib/components/pisellRecordBoard/shellFrame/ToolBarQuickFilter/index.js +93 -0
- package/lib/components/pisellRecordBoard/shellFrame/ToolBarReset/index.d.ts +16 -0
- package/lib/components/pisellRecordBoard/shellFrame/ToolBarReset/index.js +85 -0
- package/lib/components/pisellRecordBoard/shellFrame/ToolBarReset/index.less +41 -0
- package/lib/components/pisellRecordBoard/shellFrame/index.d.ts +26 -0
- package/lib/components/pisellRecordBoard/shellFrame/index.js +137 -0
- package/lib/components/pisellRecordBoard/types.js +17 -0
- package/lib/components/pisellRecordBoard/utils/recordBoardColumns.d.ts +41 -0
- package/lib/components/pisellRecordBoard/utils/recordBoardColumns.js +365 -0
- package/lib/components/pisellRecordBoard/utils/withRecordBoard.js +49 -0
- package/lib/components/pisellShellFrame/PisellShellFrame.js +113 -0
- package/lib/components/pisellShellFrame/PisellShellFrame.less +78 -0
- package/lib/components/pisellShellFrame/PisellShellFrame.stories.js +129 -0
- package/lib/components/pisellShellFrame/index.js +40 -0
- package/lib/components/pisellShellFrame/types.js +17 -0
- package/lib/components/pisellSingleLineText/PisellSingleLineText.stories.js +1 -1
- package/lib/components/pisellSingleLineText/index.d.ts +2 -1
- package/lib/components/pisellSingleLineText/index.js +7 -0
- package/lib/components/pisellSingleSelect/PisellSingleSelect.less +103 -46
- package/lib/components/pisellSingleSelect/PisellSingleSelect.stories.js +1 -1
- package/lib/components/pisellSingleSelect/components/EditView.js +4 -1
- package/lib/components/pisellSingleSelect/components/ReadOnlyView.d.ts +1 -1
- package/lib/components/pisellSingleSelect/components/ReadOnlyView.js +12 -9
- package/lib/components/pisellSingleSelect/index.d.ts +2 -1
- package/lib/components/pisellSingleSelect/index.js +7 -0
- package/lib/components/pisellTimeRangeDisplay/PisellTimeRangeDisplay.js +6 -2
- package/lib/components/pisellUrl/PisellUrl.less +120 -11
- package/lib/components/pisellUrl/PisellUrl.stories.js +1 -1
- package/lib/components/pisellUrl/index.d.ts +3 -1
- package/lib/components/pisellUrl/index.js +10 -2
- package/lib/components/productCard/components/Packages/utils.d.ts +1 -1
- package/lib/components/select/index.less +18 -2
- package/lib/components/sort/index.js +13 -3
- package/lib/components/table/Table/fields/select/index.d.ts +0 -1
- package/lib/components/table/Table/fields/text/index.d.ts +1 -0
- package/lib/components/table/Table/utils.d.ts +1 -1
- package/lib/index.d.ts +6 -2
- package/lib/index.js +6 -0
- package/lib/locales/en-US.d.ts +36 -0
- package/lib/locales/en-US.js +42 -2
- package/lib/locales/index.js +2 -2
- package/lib/locales/ja.d.ts +2 -0
- package/lib/locales/ja.js +2 -0
- package/lib/locales/pt.d.ts +2 -0
- package/lib/locales/pt.js +2 -0
- package/lib/locales/zh-CN.d.ts +36 -0
- package/lib/locales/zh-CN.js +46 -6
- package/lib/locales/zh-TW.d.ts +36 -0
- package/lib/locales/zh-TW.js +46 -6
- package/lib/utils/tagColor.js +60 -0
- package/lowcode/auto-resize-text/meta.ts +1 -1
- package/package.json +3 -3
- package/es/components/PisellProcedure/PisellProcedure.stories.d.ts +0 -163
- package/es/components/PisellProcedure/index.d.ts +0 -5
- package/es/components/PisellSteps/PisellSteps.d.ts +0 -14
- package/es/components/pisellDateTimeDisplay/formats/dateTimeDisplayFormats.d.ts +0 -7
- package/es/components/pisellDateTimeDisplay/formats/index.d.ts +0 -1
- package/es/components/pisellDateTimeDisplay/types.d.ts +0 -347
- package/es/components/pisellDateTimeDisplay/utils/formatTime.d.ts +0 -19
- package/es/components/pisellDateTimeDisplay/utils/getRefreshInterval.d.ts +0 -18
- package/es/components/pisellLookup/PisellLookup.d.ts +0 -4
- package/es/components/pisellLookup/PisellLookup.stories.d.ts +0 -129
- package/es/components/pisellLookup/components/HotWords.d.ts +0 -7
- package/es/components/pisellLookup/components/LookupAuxiliary.d.ts +0 -7
- package/es/components/pisellLookup/components/LookupResultHost.d.ts +0 -7
- package/es/components/pisellLookup/components/LookupTrigger.d.ts +0 -3
- package/es/components/pisellLookup/components/SearchHistory.d.ts +0 -7
- package/es/components/pisellLookup/components/SuggestWords.d.ts +0 -7
- package/es/components/pisellLookup/components/index.d.ts +0 -9
- package/es/components/pisellLookup/hooks/index.d.ts +0 -6
- package/es/components/pisellLookup/hooks/useSearchHistory.d.ts +0 -48
- package/es/components/pisellLookup/index.d.ts +0 -6
- package/es/components/pisellLookup/types.d.ts +0 -666
- package/es/components/pisellLookup/utils/index.d.ts +0 -5
- package/es/components/pisellLookup/utils/trigger.d.ts +0 -42
- package/es/components/pisellSort/type.d.ts +0 -7
- package/es/components/pisellTimeRangeDisplay/types.d.ts +0 -137
- package/es/components/pisellTimeRangeDisplay/utils/parseTimeRange.d.ts +0 -23
- package/es/components/sort/types.d.ts +0 -20
- package/es/components/virtualInput/index.d.ts +0 -29
- package/es/hooks/useThemeTokens.d.ts +0 -7
- package/lib/components/PisellProcedure/PisellProcedure.stories.d.ts +0 -163
- package/lib/components/PisellProcedure/index.d.ts +0 -5
- package/lib/components/PisellSteps/PisellSteps.d.ts +0 -14
- package/lib/components/pisellDateTimeDisplay/formats/dateTimeDisplayFormats.d.ts +0 -7
- package/lib/components/pisellDateTimeDisplay/formats/index.d.ts +0 -1
- package/lib/components/pisellDateTimeDisplay/types.d.ts +0 -347
- package/lib/components/pisellDateTimeDisplay/utils/formatTime.d.ts +0 -19
- package/lib/components/pisellDateTimeDisplay/utils/getRefreshInterval.d.ts +0 -18
- package/lib/components/pisellLookup/PisellLookup.d.ts +0 -4
- package/lib/components/pisellLookup/PisellLookup.stories.d.ts +0 -129
- package/lib/components/pisellLookup/components/HotWords.d.ts +0 -7
- package/lib/components/pisellLookup/components/LookupAuxiliary.d.ts +0 -7
- package/lib/components/pisellLookup/components/LookupResultHost.d.ts +0 -7
- package/lib/components/pisellLookup/components/LookupTrigger.d.ts +0 -3
- package/lib/components/pisellLookup/components/SearchHistory.d.ts +0 -7
- package/lib/components/pisellLookup/components/SuggestWords.d.ts +0 -7
- package/lib/components/pisellLookup/components/index.d.ts +0 -9
- package/lib/components/pisellLookup/hooks/index.d.ts +0 -6
- package/lib/components/pisellLookup/hooks/useSearchHistory.d.ts +0 -48
- package/lib/components/pisellLookup/index.d.ts +0 -6
- package/lib/components/pisellLookup/types.d.ts +0 -666
- package/lib/components/pisellLookup/utils/index.d.ts +0 -5
- package/lib/components/pisellLookup/utils/trigger.d.ts +0 -42
- package/lib/components/pisellSort/type.d.ts +0 -7
- package/lib/components/pisellTimeRangeDisplay/types.d.ts +0 -137
- package/lib/components/pisellTimeRangeDisplay/utils/parseTimeRange.d.ts +0 -23
- package/lib/components/sort/types.d.ts +0 -20
- package/lib/components/virtualInput/index.d.ts +0 -29
- package/lib/hooks/useThemeTokens.d.ts +0 -7
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import { PaginationProps } from
|
|
3
|
-
import
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { PaginationProps } from 'antd';
|
|
3
|
+
import './index.less';
|
|
4
|
+
declare const Pagination: (props: PaginationProps) => React.JSX.Element | null;
|
|
4
5
|
export declare const paginationConfig: {
|
|
5
6
|
className: string;
|
|
6
7
|
defaultCurrent: number;
|
|
7
8
|
showTotal: (total: number, range: [number, number]) => string;
|
|
8
|
-
itemRender: (page: number, type: "page" | "next" | "prev" | "jump-prev" | "jump-next", element: React.ReactNode) => React.ReactNode;
|
|
9
9
|
responsive: boolean;
|
|
10
10
|
size: string;
|
|
11
11
|
};
|
|
12
|
-
declare const Pagination: (props: PaginationProps) => React.JSX.Element | null;
|
|
13
12
|
export default Pagination;
|
|
14
13
|
export declare const FormPagination: ({ value, onChange, page, pageSize, ...other }: any) => React.JSX.Element;
|
|
@@ -8,74 +8,89 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
8
8
|
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; }
|
|
9
9
|
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; }
|
|
10
10
|
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); }
|
|
11
|
-
import React, { useEffect, useMemo, useState } from
|
|
11
|
+
import React, { useEffect, useMemo, useState } from 'react';
|
|
12
12
|
// import { ArrowLeft, ArrowRight } from "@pisell/icon/es";
|
|
13
|
-
import ArrowRight from
|
|
14
|
-
import ArrowLeft from
|
|
15
|
-
import { Pagination as OriginPagination } from
|
|
16
|
-
import classNames from
|
|
13
|
+
import ArrowRight from '@pisell/icon/es/ArrowRight';
|
|
14
|
+
import ArrowLeft from '@pisell/icon/es/ArrowLeft';
|
|
15
|
+
import { Pagination as OriginPagination } from 'antd';
|
|
16
|
+
import classNames from 'classnames';
|
|
17
17
|
import "./index.less";
|
|
18
|
+
import { locales as utilsLocales } from '@pisell/utils';
|
|
18
19
|
import { getText } from "../../locales";
|
|
19
20
|
import useIsMobileTable from "../table/hooks/useIsMobileTable";
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
var itemRender = function itemRender(_, type, originalElement) {
|
|
29
|
-
if (type === "prev") {
|
|
30
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
31
|
-
className: classNames("paginator-page-btn", "left")
|
|
32
|
-
}, /*#__PURE__*/React.createElement(ArrowLeft, {
|
|
33
|
-
className: "paginator-page-btn-left-icon"
|
|
34
|
-
}), /*#__PURE__*/React.createElement("span", {
|
|
35
|
-
className: "paginator-page-btn-text"
|
|
36
|
-
}, getText("table-pagination-previous")));
|
|
37
|
-
}
|
|
38
|
-
if (type === "next") {
|
|
39
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
40
|
-
className: classNames("paginator-page-btn", "right")
|
|
41
|
-
}, /*#__PURE__*/React.createElement("span", {
|
|
42
|
-
className: "paginator-page-btn-text"
|
|
43
|
-
}, getText("table-pagination-next")), /*#__PURE__*/React.createElement(ArrowRight, {
|
|
44
|
-
className: "paginator-page-btn-right-icon"
|
|
45
|
-
}));
|
|
46
|
-
}
|
|
47
|
-
return originalElement;
|
|
48
|
-
};
|
|
49
|
-
|
|
50
|
-
// 分页配置
|
|
51
|
-
export var paginationConfig = {
|
|
52
|
-
className: "materials-grid-paginator",
|
|
53
|
-
defaultCurrent: 1,
|
|
54
|
-
showTotal: function showTotal(total, range) {
|
|
55
|
-
return "Page ".concat(range[0], " of ").concat(range[1]);
|
|
56
|
-
},
|
|
57
|
-
itemRender: itemRender,
|
|
58
|
-
responsive: true,
|
|
59
|
-
size: "small"
|
|
60
|
-
};
|
|
21
|
+
/** 优先 utils;若 utils 返回 key(未命中)则用 materials RecordBoard 再回退 table-pagination-* */
|
|
22
|
+
function getPaginationText(key) {
|
|
23
|
+
var _getText;
|
|
24
|
+
var fullKey = "pisell2.salesManagement.pagination.".concat(key);
|
|
25
|
+
var fromUtils = utilsLocales.getText(fullKey);
|
|
26
|
+
if (fromUtils !== fullKey) return fromUtils;
|
|
27
|
+
return (_getText = getText(fullKey)) !== null && _getText !== void 0 ? _getText : getText("table-pagination-".concat(key));
|
|
28
|
+
}
|
|
61
29
|
var Pagination = function Pagination(props) {
|
|
62
30
|
var show = useMemo(function () {
|
|
63
31
|
return Object.keys(props).length;
|
|
64
32
|
}, [props]);
|
|
65
33
|
var isMiniPagination = useIsMobileTable();
|
|
34
|
+
var effectiveConfig = useMemo(function () {
|
|
35
|
+
var prevText = getPaginationText('previous');
|
|
36
|
+
var nextText = getPaginationText('next');
|
|
37
|
+
var showTotalFn = getPaginationText('showTotal');
|
|
38
|
+
var itemRenderFn = function itemRenderFn(_, type, originalElement) {
|
|
39
|
+
if (type === 'prev') {
|
|
40
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
41
|
+
className: classNames('paginator-page-btn', 'left')
|
|
42
|
+
}, /*#__PURE__*/React.createElement(ArrowLeft, {
|
|
43
|
+
className: 'paginator-page-btn-left-icon'
|
|
44
|
+
}), /*#__PURE__*/React.createElement("span", {
|
|
45
|
+
className: 'paginator-page-btn-text'
|
|
46
|
+
}, prevText));
|
|
47
|
+
}
|
|
48
|
+
if (type === 'next') {
|
|
49
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
50
|
+
className: classNames('paginator-page-btn', 'right')
|
|
51
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
52
|
+
className: 'paginator-page-btn-text'
|
|
53
|
+
}, nextText), /*#__PURE__*/React.createElement(ArrowRight, {
|
|
54
|
+
className: 'paginator-page-btn-right-icon'
|
|
55
|
+
}));
|
|
56
|
+
}
|
|
57
|
+
return originalElement;
|
|
58
|
+
};
|
|
59
|
+
var showTotal = typeof showTotalFn === 'function' ? function (total, range) {
|
|
60
|
+
return showTotalFn(range[0], range[1]);
|
|
61
|
+
} : function (total, range) {
|
|
62
|
+
return "Page ".concat(range[0], " of ").concat(range[1]);
|
|
63
|
+
};
|
|
64
|
+
return {
|
|
65
|
+
className: 'materials-grid-paginator',
|
|
66
|
+
defaultCurrent: 1,
|
|
67
|
+
showTotal: showTotal,
|
|
68
|
+
itemRender: itemRenderFn,
|
|
69
|
+
responsive: true,
|
|
70
|
+
size: 'small'
|
|
71
|
+
};
|
|
72
|
+
}, []);
|
|
66
73
|
var content = useMemo(function () {
|
|
67
74
|
if (!show) {
|
|
68
75
|
return null;
|
|
69
76
|
}
|
|
70
77
|
var Com = OriginPagination;
|
|
71
|
-
// 移动端使用简单分页
|
|
72
78
|
if (isMiniPagination) {
|
|
73
79
|
Com = MiniPagination;
|
|
74
80
|
}
|
|
75
|
-
return /*#__PURE__*/React.createElement(Com, _extends({},
|
|
76
|
-
}, [show,
|
|
81
|
+
return /*#__PURE__*/React.createElement(Com, _extends({}, effectiveConfig, props));
|
|
82
|
+
}, [show, effectiveConfig, props, isMiniPagination]);
|
|
77
83
|
return content;
|
|
78
84
|
};
|
|
85
|
+
export var paginationConfig = {
|
|
86
|
+
className: 'materials-grid-paginator',
|
|
87
|
+
defaultCurrent: 1,
|
|
88
|
+
showTotal: function showTotal(total, range) {
|
|
89
|
+
return "Page ".concat(range[0], " of ").concat(range[1]);
|
|
90
|
+
},
|
|
91
|
+
responsive: true,
|
|
92
|
+
size: 'small'
|
|
93
|
+
};
|
|
79
94
|
export default Pagination;
|
|
80
95
|
var MiniPagination = function MiniPagination(props) {
|
|
81
96
|
var _props$current = props.current,
|
|
@@ -105,44 +120,47 @@ var MiniPagination = function MiniPagination(props) {
|
|
|
105
120
|
*/
|
|
106
121
|
var onChange = function onChange(type) {
|
|
107
122
|
var currentPage = current;
|
|
108
|
-
if (type ===
|
|
123
|
+
if (type === 'prev') {
|
|
109
124
|
currentPage = current - 1;
|
|
110
125
|
}
|
|
111
|
-
if (type ===
|
|
126
|
+
if (type === 'next') {
|
|
112
127
|
currentPage = current + 1;
|
|
113
128
|
}
|
|
114
129
|
props.onChange && props.onChange(currentPage, pageSize || 10);
|
|
115
130
|
};
|
|
116
131
|
return /*#__PURE__*/React.createElement("div", {
|
|
117
|
-
className: "materials-grid-paginator
|
|
132
|
+
className: "materials-grid-paginator"
|
|
118
133
|
}, /*#__PURE__*/React.createElement("div", {
|
|
119
134
|
className: "pisell-lowcode-pagination-prev",
|
|
120
135
|
onClick: function onClick() {
|
|
121
136
|
if (current <= MIN) {
|
|
122
137
|
return;
|
|
123
138
|
}
|
|
124
|
-
onChange(
|
|
139
|
+
onChange('prev');
|
|
125
140
|
}
|
|
126
141
|
}, /*#__PURE__*/React.createElement("div", {
|
|
127
|
-
className: classNames(
|
|
142
|
+
className: classNames('paginator-page-btn', 'left')
|
|
128
143
|
}, /*#__PURE__*/React.createElement(ArrowLeft, {
|
|
129
|
-
className:
|
|
144
|
+
className: 'paginator-page-btn-left-icon'
|
|
130
145
|
}))), /*#__PURE__*/React.createElement("div", {
|
|
131
146
|
className: "materials-grid-paginator-center"
|
|
132
147
|
}, /*#__PURE__*/React.createElement("span", {
|
|
133
148
|
className: "materials-grid-paginator-center-text"
|
|
134
|
-
},
|
|
149
|
+
}, function () {
|
|
150
|
+
var totalFn = getPaginationText('total');
|
|
151
|
+
return typeof totalFn === 'function' ? totalFn(current, MAX) : "".concat(current, " / ").concat(MAX);
|
|
152
|
+
}())), /*#__PURE__*/React.createElement("div", {
|
|
135
153
|
className: "pisell-lowcode-pagination-next",
|
|
136
154
|
onClick: function onClick() {
|
|
137
155
|
if (current >= MAX) {
|
|
138
156
|
return;
|
|
139
157
|
}
|
|
140
|
-
onChange(
|
|
158
|
+
onChange('next');
|
|
141
159
|
}
|
|
142
160
|
}, /*#__PURE__*/React.createElement("div", {
|
|
143
|
-
className: classNames(
|
|
161
|
+
className: classNames('paginator-page-btn', 'right')
|
|
144
162
|
}, /*#__PURE__*/React.createElement(ArrowRight, {
|
|
145
|
-
className:
|
|
163
|
+
className: 'paginator-page-btn-right-icon'
|
|
146
164
|
}))));
|
|
147
165
|
};
|
|
148
166
|
export var FormPagination = function FormPagination(_ref) {
|
|
@@ -24,7 +24,6 @@
|
|
|
24
24
|
|
|
25
25
|
.pisell-lowcode-pagination-item {
|
|
26
26
|
position: relative;
|
|
27
|
-
border: none;
|
|
28
27
|
margin: 0;
|
|
29
28
|
border-radius: 0;
|
|
30
29
|
border: 1px solid #D0D5DD;
|
|
@@ -36,6 +35,7 @@
|
|
|
36
35
|
margin: 0;
|
|
37
36
|
border-radius: 0;
|
|
38
37
|
border-right: none;
|
|
38
|
+
height: 100%;
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
.pisell-lowcode-pagination-jump-next {
|
|
@@ -45,22 +45,28 @@
|
|
|
45
45
|
border-right: none;
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
-
.pisell-lowcode-pagination-item-link
|
|
49
|
-
|
|
50
|
-
color: rgba(0, 0, 0, 0.88) !important;
|
|
48
|
+
.pisell-lowcode-pagination-item-link {
|
|
49
|
+
width: 100%;
|
|
51
50
|
|
|
52
|
-
|
|
51
|
+
&:hover {
|
|
53
52
|
font-weight: 450 !important;
|
|
54
53
|
color: rgba(0, 0, 0, 0.88) !important;
|
|
54
|
+
|
|
55
|
+
.pisell-lowcode-pagination-item-link-icon {
|
|
56
|
+
font-weight: 450 !important;
|
|
57
|
+
color: rgba(0, 0, 0, 0.88) !important;
|
|
58
|
+
}
|
|
55
59
|
}
|
|
56
60
|
}
|
|
57
61
|
|
|
62
|
+
|
|
58
63
|
.pisell-lowcode-pagination-disabled {
|
|
59
64
|
cursor: not-allowed;
|
|
60
|
-
color: rgba(0,0,0
|
|
65
|
+
color: rgba(0, 0, 0, .25);
|
|
66
|
+
|
|
61
67
|
.paginator-page-btn {
|
|
62
68
|
cursor: not-allowed;
|
|
63
|
-
color: rgba(0,0,0
|
|
69
|
+
color: rgba(0, 0, 0, .25);
|
|
64
70
|
}
|
|
65
71
|
}
|
|
66
72
|
|
|
@@ -17,8 +17,8 @@ declare const PisellFields: {
|
|
|
17
17
|
Currency: import("react").NamedExoticComponent<import("../pisellCurrency").PisellCurrencyProps>;
|
|
18
18
|
Percent: import("react").NamedExoticComponent<import("../pisellPercent").PisellPercentProps>;
|
|
19
19
|
Phone: import("react").NamedExoticComponent<import("../pisellPhone").PisellPhoneProps>;
|
|
20
|
-
Email: import("react").
|
|
21
|
-
Url: import("react").
|
|
20
|
+
Email: import("react").NamedExoticComponent<import("../pisellEmail").PisellEmailProps>;
|
|
21
|
+
Url: import("react").NamedExoticComponent<import("../pisellUrl").PisellUrlProps>;
|
|
22
22
|
Rating: import("react").NamedExoticComponent<import("../pisellRating").PisellRatingProps>;
|
|
23
23
|
SingleSelect: import("react").ForwardRefExoticComponent<import("../pisellSingleSelect").PisellSingleSelectProps<string | number> & import("react").RefAttributes<import("../pisellSingleSelect").SingleSelectRef<string | number>>>;
|
|
24
24
|
MultipleSelect: import("react").ForwardRefExoticComponent<import("../pisellMultipleSelect").PisellMultipleSelectProps<string | number> & import("react").RefAttributes<import("../pisellMultipleSelect").MultipleSelectRef<string | number>>>;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
declare const formFieldMap: {
|
|
3
2
|
FormItemCheckbox: import("react").FC<{}> & {
|
|
4
3
|
Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
@@ -61,7 +60,7 @@ declare const formFieldMap: {
|
|
|
61
60
|
FormItemTranslation: import("react").FC<import("./Translation/type").TranslationProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
62
61
|
FormItemIconSelect: import("react").FC<import("./IconSelect/type").IconSelectProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
63
62
|
};
|
|
64
|
-
declare const getFieldComponent: (fieldComponent: string) =>
|
|
63
|
+
declare const getFieldComponent: (fieldComponent: string) => (import("react").FC<{}> & {
|
|
65
64
|
Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
66
65
|
} & {
|
|
67
66
|
Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
@@ -98,7 +97,7 @@ declare const getFieldComponent: (fieldComponent: string) => import("react").FC<
|
|
|
98
97
|
} & {
|
|
99
98
|
dataSource?: any;
|
|
100
99
|
extraParams?: Record<string, any> | undefined;
|
|
101
|
-
}) => import("react").JSX.Element) | import("react").FC<import("./TimePicker/type").TimePickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Input.Phone/WithMode").PhoneInputProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Input.Mobile/WithMode").PhoneInputProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd").InputProps & {
|
|
100
|
+
}) => import("react").JSX.Element) | import("react").FC<any> | import("react").FC<import("./TimePicker/type").TimePickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Input.Phone/WithMode").PhoneInputProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Input.Mobile/WithMode").PhoneInputProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd").InputProps & {
|
|
102
101
|
onChange: (value: string) => void;
|
|
103
102
|
} & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd").InputProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd/es/input").PasswordProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps> | import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps> | import("react").FC<import("./DateRangePicker/type").DateRangePickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Upload/type").UploadProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Translation/type").TranslationProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./IconSelect/type").IconSelectProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
104
103
|
export { getFieldComponent, formFieldMap };
|
|
@@ -77,6 +77,10 @@ var Dropdown = function Dropdown(props) {
|
|
|
77
77
|
quickFilter: getText('table-action-filter-quick-filter-tip'),
|
|
78
78
|
otherFilter: getText('table-action-filter-other-filter-tip')
|
|
79
79
|
};
|
|
80
|
+
var getTooltipTitle = useCallback(function (id) {
|
|
81
|
+
var fn = tooltipMap[id];
|
|
82
|
+
return typeof fn === 'function' ? fn(quickFilterMaxLength) : fn;
|
|
83
|
+
}, [quickFilterMaxLength]);
|
|
80
84
|
var renderContainer = useCallback(function (_ref) {
|
|
81
85
|
var children = _ref.children,
|
|
82
86
|
ref = _ref.ref,
|
|
@@ -88,14 +92,14 @@ var Dropdown = function Dropdown(props) {
|
|
|
88
92
|
}, /*#__PURE__*/React.createElement("span", {
|
|
89
93
|
className: "filter-dropdown-container-title"
|
|
90
94
|
}, titleMap[id]), /*#__PURE__*/React.createElement(Tooltip, {
|
|
91
|
-
title:
|
|
95
|
+
title: getTooltipTitle(id)
|
|
92
96
|
}, /*#__PURE__*/React.createElement(HelpCircle, {
|
|
93
97
|
className: "filter-dropdown-container-icon-help"
|
|
94
98
|
}))), /*#__PURE__*/React.createElement("div", {
|
|
95
99
|
ref: ref,
|
|
96
100
|
className: "filter-dropdown-container-filter-wrap"
|
|
97
101
|
}, children));
|
|
98
|
-
}, [quickFilterMaxLength]);
|
|
102
|
+
}, [quickFilterMaxLength, getTooltipTitle]);
|
|
99
103
|
return /*#__PURE__*/React.createElement("div", {
|
|
100
104
|
className: "filter-dropdown-wrap"
|
|
101
105
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -13,9 +13,19 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
13
13
|
import React, { useMemo, useRef, useState } from 'react';
|
|
14
14
|
import { Button, Popover } from 'antd';
|
|
15
15
|
import FilterLines from '@pisell/icon/es/FilterLines';
|
|
16
|
+
import { locales as utilsLocales } from '@pisell/utils';
|
|
16
17
|
import Dropdown from "../Dropdown";
|
|
17
18
|
import { getText } from "../../../../locales";
|
|
18
19
|
import { isMobile } from "../../../../utils/platform";
|
|
20
|
+
|
|
21
|
+
/** 与 Quick Filter 同源:优先 utils,若 utils 返回 key(未命中)则用 materials RecordBoard 再回退 table-action */
|
|
22
|
+
function getFilterButtonLabel(buttonText) {
|
|
23
|
+
if (buttonText != null && buttonText !== '') return buttonText;
|
|
24
|
+
var key = 'pisell2.recordBoard.toolbar.filter';
|
|
25
|
+
var fromUtils = utilsLocales.getText(key);
|
|
26
|
+
if (fromUtils && fromUtils !== key) return fromUtils;
|
|
27
|
+
return getText(key) || getText('table-action-filter-button');
|
|
28
|
+
}
|
|
19
29
|
var Filter = function Filter(_ref) {
|
|
20
30
|
var value = _ref.value,
|
|
21
31
|
hiddenQuickFilter = _ref.hiddenQuickFilter,
|
|
@@ -24,7 +34,11 @@ var Filter = function Filter(_ref) {
|
|
|
24
34
|
quickFilterMaxLength = _ref.quickFilterMaxLength,
|
|
25
35
|
formFiltersPrefix = _ref.formFiltersPrefix,
|
|
26
36
|
renderItem = _ref.renderItem,
|
|
27
|
-
placement = _ref.placement
|
|
37
|
+
placement = _ref.placement,
|
|
38
|
+
_ref$size = _ref.size,
|
|
39
|
+
size = _ref$size === void 0 ? 'large' : _ref$size,
|
|
40
|
+
buttonClassName = _ref.buttonClassName,
|
|
41
|
+
buttonText = _ref.buttonText;
|
|
28
42
|
var ref = useRef(null);
|
|
29
43
|
var _useState = useState(false),
|
|
30
44
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -83,10 +97,11 @@ var Filter = function Filter(_ref) {
|
|
|
83
97
|
}
|
|
84
98
|
setOpen(visible);
|
|
85
99
|
},
|
|
86
|
-
placement: placement
|
|
100
|
+
placement: placement !== null && placement !== void 0 ? placement : 'bottom'
|
|
87
101
|
}, /*#__PURE__*/React.createElement(Button, {
|
|
102
|
+
className: buttonClassName,
|
|
88
103
|
icon: /*#__PURE__*/React.createElement(FilterLines, null),
|
|
89
|
-
size:
|
|
90
|
-
}, isMobileBool ? null :
|
|
104
|
+
size: size
|
|
105
|
+
}, isMobileBool ? null : getFilterButtonLabel(buttonText))));
|
|
91
106
|
};
|
|
92
107
|
export default Filter;
|
|
@@ -3,6 +3,8 @@ import { FilterItemProps } from '../../types';
|
|
|
3
3
|
export declare type FilterValueType = {
|
|
4
4
|
quickFilter: FilterItemProps[];
|
|
5
5
|
otherFilter: FilterItemProps[];
|
|
6
|
+
/** 筛选项表单值,字段名 -> 值,与 Form 的 values 一致 */
|
|
7
|
+
values?: Record<string, any>;
|
|
6
8
|
};
|
|
7
9
|
export declare type FilterListProps = {
|
|
8
10
|
value?: FilterValueType;
|
|
@@ -13,4 +15,10 @@ export declare type FilterListProps = {
|
|
|
13
15
|
formFiltersPrefix: string;
|
|
14
16
|
renderItem?: (item: any, otherProps?: any) => React.ReactNode;
|
|
15
17
|
placement?: 'top' | 'left' | 'right' | 'bottom' | 'topLeft' | 'topRight' | 'bottomLeft' | 'bottomRight' | 'leftTop' | 'leftBottom' | 'rightTop' | 'rightBottom';
|
|
18
|
+
/** 筛选按钮尺寸,与 antd Button size 一致 */
|
|
19
|
+
size?: 'small' | 'middle' | 'large';
|
|
20
|
+
/** 筛选触发按钮的 className,用于定制样式(如与设计系统对齐) */
|
|
21
|
+
buttonClassName?: string;
|
|
22
|
+
/** 筛选按钮文案,不传则使用 materials 内置多语言 */
|
|
23
|
+
buttonText?: string;
|
|
16
24
|
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 筛选项中 singleSelect/multipleSelect 的异步 options 包装器。
|
|
3
|
+
* 当列配置传入 getOptions(同步或异步)时,先解析再渲染 PisellSingleSelect/PisellMultipleSelect。
|
|
4
|
+
*/
|
|
5
|
+
import React from 'react';
|
|
6
|
+
export declare type GetOptionsFn = (() => {
|
|
7
|
+
label: string;
|
|
8
|
+
value: any;
|
|
9
|
+
}[]) | (() => Promise<{
|
|
10
|
+
label: string;
|
|
11
|
+
value: any;
|
|
12
|
+
}[]>);
|
|
13
|
+
export interface AsyncOptionsSelectWrapperProps {
|
|
14
|
+
getOptions: GetOptionsFn;
|
|
15
|
+
fieldType: 'singleSelect' | 'multipleSelect';
|
|
16
|
+
value?: any;
|
|
17
|
+
onChange?: (value: any, option?: any) => void;
|
|
18
|
+
[key: string]: any;
|
|
19
|
+
}
|
|
20
|
+
declare const AsyncOptionsSelectWrapper: React.FC<AsyncOptionsSelectWrapperProps>;
|
|
21
|
+
export default AsyncOptionsSelectWrapper;
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
var _excluded = ["getOptions", "fieldType", "value", "onChange"];
|
|
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 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; }
|
|
4
|
+
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; }
|
|
5
|
+
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; }
|
|
6
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
7
|
+
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); }
|
|
8
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
9
|
+
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."); }
|
|
10
|
+
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); }
|
|
11
|
+
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; }
|
|
12
|
+
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; } }
|
|
13
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
14
|
+
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; }
|
|
15
|
+
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; }
|
|
16
|
+
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); }
|
|
17
|
+
/**
|
|
18
|
+
* 筛选项中 singleSelect/multipleSelect 的异步 options 包装器。
|
|
19
|
+
* 当列配置传入 getOptions(同步或异步)时,先解析再渲染 PisellSingleSelect/PisellMultipleSelect。
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
import React, { useState, useEffect } from 'react';
|
|
23
|
+
import { Spin } from 'antd';
|
|
24
|
+
import { PisellSingleSelect } from "../../../pisellSingleSelect";
|
|
25
|
+
import { PisellMultipleSelect } from "../../../pisellMultipleSelect";
|
|
26
|
+
function normalizeOptions(list) {
|
|
27
|
+
if (!Array.isArray(list)) return [];
|
|
28
|
+
return list.map(function (item) {
|
|
29
|
+
return item && _typeof(item) === 'object' && 'label' in item && 'value' in item ? {
|
|
30
|
+
label: String(item.label),
|
|
31
|
+
value: item.value
|
|
32
|
+
} : {
|
|
33
|
+
label: String(item),
|
|
34
|
+
value: item
|
|
35
|
+
};
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
var AsyncOptionsSelectWrapper = function AsyncOptionsSelectWrapper(props) {
|
|
39
|
+
var getOptions = props.getOptions,
|
|
40
|
+
fieldType = props.fieldType,
|
|
41
|
+
value = props.value,
|
|
42
|
+
onChange = props.onChange,
|
|
43
|
+
rest = _objectWithoutProperties(props, _excluded);
|
|
44
|
+
var _useState = useState([]),
|
|
45
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
46
|
+
options = _useState2[0],
|
|
47
|
+
setOptions = _useState2[1];
|
|
48
|
+
var _useState3 = useState(true),
|
|
49
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
50
|
+
loading = _useState4[0],
|
|
51
|
+
setLoading = _useState4[1];
|
|
52
|
+
useEffect(function () {
|
|
53
|
+
setLoading(true);
|
|
54
|
+
var result = getOptions();
|
|
55
|
+
var resolved = Promise.resolve(result);
|
|
56
|
+
resolved.then(function (list) {
|
|
57
|
+
setOptions(normalizeOptions(list));
|
|
58
|
+
}).finally(function () {
|
|
59
|
+
setLoading(false);
|
|
60
|
+
});
|
|
61
|
+
}, [getOptions]);
|
|
62
|
+
var commonProps = _objectSpread(_objectSpread({}, rest), {}, {
|
|
63
|
+
options: options,
|
|
64
|
+
mode: 'edit'
|
|
65
|
+
});
|
|
66
|
+
if (loading) {
|
|
67
|
+
return /*#__PURE__*/React.createElement(Spin, {
|
|
68
|
+
spinning: true,
|
|
69
|
+
size: "small"
|
|
70
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
71
|
+
style: {
|
|
72
|
+
display: 'inline-block',
|
|
73
|
+
minWidth: 120,
|
|
74
|
+
minHeight: 32
|
|
75
|
+
}
|
|
76
|
+
}));
|
|
77
|
+
}
|
|
78
|
+
if (fieldType === 'multipleSelect') {
|
|
79
|
+
return /*#__PURE__*/React.createElement(PisellMultipleSelect, _extends({}, commonProps, {
|
|
80
|
+
value: value,
|
|
81
|
+
onChange: onChange
|
|
82
|
+
}));
|
|
83
|
+
}
|
|
84
|
+
return /*#__PURE__*/React.createElement(PisellSingleSelect, _extends({}, commonProps, {
|
|
85
|
+
value: value,
|
|
86
|
+
onChange: onChange
|
|
87
|
+
}));
|
|
88
|
+
};
|
|
89
|
+
AsyncOptionsSelectWrapper.displayName = 'AsyncOptionsSelectWrapper';
|
|
90
|
+
export default AsyncOptionsSelectWrapper;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import { FilterItemProps } from
|
|
3
|
-
import
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { FilterItemProps } from '../../types';
|
|
3
|
+
import './index.less';
|
|
4
4
|
declare const FilterItem: React.FC<FilterItemProps>;
|
|
5
5
|
export default FilterItem;
|