@pisell/materials 3.3.85 → 3.3.87
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/dataSourceForm/utils.d.ts +1 -1
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.d.ts +1 -0
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableQuery.d.ts +1 -0
- package/es/components/dataSourceComponents/fields/Input.Subdomain/index.d.ts +1 -1
- package/es/components/dataSourceComponents/fields/Select/index.d.ts +1 -1
- package/es/components/dataSourceComponents/fields/Translation/BaseTranslation.d.ts +5 -0
- package/es/components/dataSourceComponents/fields/Translation/type.d.ts +21 -0
- package/es/components/dataSourceComponents/fields/index.d.ts +7 -7
- 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/pisellDataSourceContainer/hooks/useDataSourceKey.d.ts +1 -0
- 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/pisellWalletPassCard/index.js +1 -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/text/index.d.ts +1 -0
- package/es/components/table/Table/fields/treeSelect/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/dataSourceForm/utils.d.ts +1 -1
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.d.ts +1 -0
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableQuery.d.ts +1 -0
- package/lib/components/dataSourceComponents/fields/Input.Subdomain/index.d.ts +1 -1
- package/lib/components/dataSourceComponents/fields/Select/index.d.ts +1 -1
- package/lib/components/dataSourceComponents/fields/Translation/BaseTranslation.d.ts +5 -0
- package/lib/components/dataSourceComponents/fields/Translation/type.d.ts +21 -0
- package/lib/components/dataSourceComponents/fields/index.d.ts +7 -7
- 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/pisellDataSourceContainer/hooks/useDataSourceKey.d.ts +1 -0
- 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/pisellWalletPassCard/index.js +9 -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/text/index.d.ts +1 -0
- package/lib/components/table/Table/fields/treeSelect/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/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/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/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/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
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// src/components/pisellRecordBoard/context/RecordBoardContext.ts
|
|
20
|
+
var RecordBoardContext_exports = {};
|
|
21
|
+
__export(RecordBoardContext_exports, {
|
|
22
|
+
RecordBoardContext: () => RecordBoardContext
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(RecordBoardContext_exports);
|
|
25
|
+
var import_react = require("react");
|
|
26
|
+
var RecordBoardContext = (0, import_react.createContext)(null);
|
|
27
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
28
|
+
0 && (module.exports = {
|
|
29
|
+
RecordBoardContext
|
|
30
|
+
});
|
|
@@ -0,0 +1,46 @@
|
|
|
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/pisellRecordBoard/context/RecordBoardProvider.tsx
|
|
30
|
+
var RecordBoardProvider_exports = {};
|
|
31
|
+
__export(RecordBoardProvider_exports, {
|
|
32
|
+
RecordBoardProvider: () => RecordBoardProvider
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(RecordBoardProvider_exports);
|
|
35
|
+
var import_react = __toESM(require("react"));
|
|
36
|
+
var import_RecordBoardContext = require("./RecordBoardContext");
|
|
37
|
+
var RecordBoardProvider = ({
|
|
38
|
+
value,
|
|
39
|
+
children
|
|
40
|
+
}) => {
|
|
41
|
+
return /* @__PURE__ */ import_react.default.createElement(import_RecordBoardContext.RecordBoardContext.Provider, { value }, children);
|
|
42
|
+
};
|
|
43
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
44
|
+
0 && (module.exports = {
|
|
45
|
+
RecordBoardProvider
|
|
46
|
+
});
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// src/components/pisellRecordBoard/hooks/useRecordBoardContext.ts
|
|
20
|
+
var useRecordBoardContext_exports = {};
|
|
21
|
+
__export(useRecordBoardContext_exports, {
|
|
22
|
+
useRecordBoardContext: () => useRecordBoardContext
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(useRecordBoardContext_exports);
|
|
25
|
+
var import_react = require("react");
|
|
26
|
+
var import_RecordBoardContext = require("../context/RecordBoardContext");
|
|
27
|
+
function useRecordBoardContext(options = {}) {
|
|
28
|
+
const ctx = (0, import_react.useContext)(import_RecordBoardContext.RecordBoardContext);
|
|
29
|
+
if (!ctx) {
|
|
30
|
+
throw new Error(
|
|
31
|
+
"useRecordBoardContext 必须在 PisellRecordBoard(或 RecordBoardProvider)下使用"
|
|
32
|
+
);
|
|
33
|
+
}
|
|
34
|
+
const { displayName, childComponentProps } = options;
|
|
35
|
+
const mergedChildProps = childComponentProps ?? ctx.childComponentProps;
|
|
36
|
+
if (displayName && (mergedChildProps == null ? void 0 : mergedChildProps[displayName])) {
|
|
37
|
+
return {
|
|
38
|
+
...ctx,
|
|
39
|
+
...mergedChildProps[displayName]
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
return ctx;
|
|
43
|
+
}
|
|
44
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
45
|
+
0 && (module.exports = {
|
|
46
|
+
useRecordBoardContext
|
|
47
|
+
});
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import GridLayout from './layouts/GridLayout';
|
|
3
|
+
import CardLayout from './layouts/CardLayout';
|
|
4
|
+
import RecordBoardShellFrame, { RecordBoardToolBar, RecordBoardBatchActionBar, RecordBoardPagination, RecordBoardSearch } from './shellFrame';
|
|
5
|
+
import RecordBoardGridView from './layouts/GridLayout/Grid';
|
|
6
|
+
import RecordBoardCardList from './layouts/CardLayout/CardList';
|
|
7
|
+
import { useRecordBoardContext } from './hooks/useRecordBoardContext';
|
|
8
|
+
import type { RecordBoardProps } from './types';
|
|
9
|
+
/** RecordBoard 复合组件类型 */
|
|
10
|
+
interface PisellRecordBoardType extends React.FC<RecordBoardProps> {
|
|
11
|
+
/** Shell Frame:对 Layout 的扩展,提供 ToolBar + BatchActionBar + children(Layout) */
|
|
12
|
+
ShellFrame: typeof RecordBoardShellFrame;
|
|
13
|
+
/** Grid 布局:仅内容区(表格 + 分页),需配合 ShellFrame 使用 */
|
|
14
|
+
GridLayout: typeof GridLayout;
|
|
15
|
+
/** 卡片布局:仅内容区(卡片列表 + 分页),需配合 ShellFrame 使用 */
|
|
16
|
+
CardLayout: typeof CardLayout;
|
|
17
|
+
/** 单独使用:搜索槽(PisellFind,绑定 searchParams.keyword / onSearch) */
|
|
18
|
+
Search: typeof RecordBoardSearch;
|
|
19
|
+
/** 单独使用:工具栏(PisellToolBar,含搜索/导出,可透传 topLeft/topRight 等) */
|
|
20
|
+
ToolBar: typeof RecordBoardToolBar;
|
|
21
|
+
/** 单独使用:分页槽 */
|
|
22
|
+
Pagination: typeof RecordBoardPagination;
|
|
23
|
+
/** 单独使用:Grid 视图(表格) */
|
|
24
|
+
Grid: typeof RecordBoardGridView;
|
|
25
|
+
/** 单独使用:卡片列表视图 */
|
|
26
|
+
CardList: typeof RecordBoardCardList;
|
|
27
|
+
/** 多选操作栏(基于 PisellBatchActionBar,有选中项时展示) */
|
|
28
|
+
BatchActionBar: typeof RecordBoardBatchActionBar;
|
|
29
|
+
/** 消费 RecordBoard 上下文 */
|
|
30
|
+
useRecordBoardContext: typeof useRecordBoardContext;
|
|
31
|
+
}
|
|
32
|
+
declare const PisellRecordBoard: PisellRecordBoardType;
|
|
33
|
+
export default PisellRecordBoard;
|
|
34
|
+
export type { RecordBoardProps, RecordBoardLayoutType, RecordBoardContextValue, RecordBoardChildComponentProps, RecordBoardGridProps, RecordBoardColumnType, RecordBoardFieldType, RecordBoardColumnFilterConfig, RecordBoardOptionItem, RecordBoardGetOptions, } from './types';
|
|
35
|
+
export { useRecordBoardContext } from './hooks/useRecordBoardContext';
|
|
@@ -0,0 +1,59 @@
|
|
|
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/pisellRecordBoard/index.tsx
|
|
30
|
+
var pisellRecordBoard_exports = {};
|
|
31
|
+
__export(pisellRecordBoard_exports, {
|
|
32
|
+
default: () => pisellRecordBoard_default,
|
|
33
|
+
useRecordBoardContext: () => import_useRecordBoardContext2.useRecordBoardContext
|
|
34
|
+
});
|
|
35
|
+
module.exports = __toCommonJS(pisellRecordBoard_exports);
|
|
36
|
+
var import_PisellRecordBoard = __toESM(require("./PisellRecordBoard"));
|
|
37
|
+
var import_GridLayout = __toESM(require("./layouts/GridLayout"));
|
|
38
|
+
var import_CardLayout = __toESM(require("./layouts/CardLayout"));
|
|
39
|
+
var import_shellFrame = __toESM(require("./shellFrame"));
|
|
40
|
+
var import_Grid = __toESM(require("./layouts/GridLayout/Grid"));
|
|
41
|
+
var import_CardList = __toESM(require("./layouts/CardLayout/CardList"));
|
|
42
|
+
var import_useRecordBoardContext = require("./hooks/useRecordBoardContext");
|
|
43
|
+
var import_useRecordBoardContext2 = require("./hooks/useRecordBoardContext");
|
|
44
|
+
var PisellRecordBoard = import_PisellRecordBoard.default;
|
|
45
|
+
PisellRecordBoard.ShellFrame = import_shellFrame.default;
|
|
46
|
+
PisellRecordBoard.GridLayout = import_GridLayout.default;
|
|
47
|
+
PisellRecordBoard.CardLayout = import_CardLayout.default;
|
|
48
|
+
PisellRecordBoard.Search = import_shellFrame.RecordBoardSearch;
|
|
49
|
+
PisellRecordBoard.ToolBar = import_shellFrame.RecordBoardToolBar;
|
|
50
|
+
PisellRecordBoard.Pagination = import_shellFrame.RecordBoardPagination;
|
|
51
|
+
PisellRecordBoard.Grid = import_Grid.default;
|
|
52
|
+
PisellRecordBoard.CardList = import_CardList.default;
|
|
53
|
+
PisellRecordBoard.BatchActionBar = import_shellFrame.RecordBoardBatchActionBar;
|
|
54
|
+
PisellRecordBoard.useRecordBoardContext = import_useRecordBoardContext.useRecordBoardContext;
|
|
55
|
+
var pisellRecordBoard_default = PisellRecordBoard;
|
|
56
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
57
|
+
0 && (module.exports = {
|
|
58
|
+
useRecordBoardContext
|
|
59
|
+
});
|
|
@@ -0,0 +1,46 @@
|
|
|
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/pisellRecordBoard/layouts/CardLayout/CardList.tsx
|
|
30
|
+
var CardList_exports = {};
|
|
31
|
+
__export(CardList_exports, {
|
|
32
|
+
default: () => CardList_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(CardList_exports);
|
|
35
|
+
var import_react = __toESM(require("react"));
|
|
36
|
+
var import_useRecordBoardContext = require("../../hooks/useRecordBoardContext");
|
|
37
|
+
var RecordBoardCardList = (props) => {
|
|
38
|
+
var _a;
|
|
39
|
+
const ctx = (0, import_useRecordBoardContext.useRecordBoardContext)({ displayName: "cardList" });
|
|
40
|
+
const { render, ...rest } = props;
|
|
41
|
+
if (typeof render === "function") {
|
|
42
|
+
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, render({ ...ctx, ...rest }));
|
|
43
|
+
}
|
|
44
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { "data-layout-slot": "cardList", style: { minHeight: 120 } }, /* @__PURE__ */ import_react.default.createElement("span", { style: { color: "var(--color-text-tertiary, #999)" } }, "卡片视图(", ((_a = ctx.data) == null ? void 0 : _a.length) ?? 0, " 条,loading:", " ", String(ctx.loading), ")"));
|
|
45
|
+
};
|
|
46
|
+
var CardList_default = RecordBoardCardList;
|
|
@@ -0,0 +1,46 @@
|
|
|
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/pisellRecordBoard/layouts/CardLayout/index.tsx
|
|
30
|
+
var CardLayout_exports = {};
|
|
31
|
+
__export(CardLayout_exports, {
|
|
32
|
+
CardLayoutCardList: () => import_CardList.default,
|
|
33
|
+
default: () => CardLayout_default
|
|
34
|
+
});
|
|
35
|
+
module.exports = __toCommonJS(CardLayout_exports);
|
|
36
|
+
var import_react = __toESM(require("react"));
|
|
37
|
+
var import_CardList = __toESM(require("./CardList"));
|
|
38
|
+
var CardLayout = ({ className, style }) => {
|
|
39
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { className, style, "data-layout": "card" }, /* @__PURE__ */ import_react.default.createElement(import_CardList.default, null));
|
|
40
|
+
};
|
|
41
|
+
CardLayout.displayName = "RecordBoard.CardLayout";
|
|
42
|
+
var CardLayout_default = CardLayout;
|
|
43
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
44
|
+
0 && (module.exports = {
|
|
45
|
+
CardLayoutCardList
|
|
46
|
+
});
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { TableProps } from 'antd';
|
|
3
|
+
import type { RecordBoardContextValue } from '../../types';
|
|
4
|
+
import './Grid.less';
|
|
5
|
+
export interface RecordBoardGridViewProps extends Omit<TableProps<any>, 'dataSource' | 'loading' | 'pagination'>, Partial<Pick<RecordBoardContextValue, 'data' | 'loading'>> {
|
|
6
|
+
/** 列配置,同 antd Table columns */
|
|
7
|
+
columns?: TableProps<any>['columns'];
|
|
8
|
+
className?: string;
|
|
9
|
+
style?: React.CSSProperties;
|
|
10
|
+
/** 自定义渲染,传入后不再使用内置 Table */
|
|
11
|
+
render?: (ctx: RecordBoardContextValue) => React.ReactNode;
|
|
12
|
+
}
|
|
13
|
+
declare const RecordBoardGridView: React.FC<RecordBoardGridViewProps>;
|
|
14
|
+
export default RecordBoardGridView;
|
|
@@ -0,0 +1,264 @@
|
|
|
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/pisellRecordBoard/layouts/GridLayout/Grid.tsx
|
|
30
|
+
var Grid_exports = {};
|
|
31
|
+
__export(Grid_exports, {
|
|
32
|
+
default: () => Grid_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(Grid_exports);
|
|
35
|
+
var import_react = __toESM(require("react"));
|
|
36
|
+
var import_antd = require("antd");
|
|
37
|
+
var import_useRecordBoardContext = require("../../hooks/useRecordBoardContext");
|
|
38
|
+
var import_recordBoardColumns = require("../../utils/recordBoardColumns");
|
|
39
|
+
var import_locales = require("../../../../locales");
|
|
40
|
+
var import_Grid = require("./Grid.less");
|
|
41
|
+
function getRowKey(record, rowKey) {
|
|
42
|
+
if (typeof rowKey === "function") {
|
|
43
|
+
return rowKey(record);
|
|
44
|
+
}
|
|
45
|
+
if (typeof rowKey === "string" && record != null && rowKey in record) {
|
|
46
|
+
return record[rowKey];
|
|
47
|
+
}
|
|
48
|
+
return (record == null ? void 0 : record.id) ?? (record == null ? void 0 : record.key) ?? record;
|
|
49
|
+
}
|
|
50
|
+
var CONTEXT_ONLY_KEYS = [
|
|
51
|
+
"data",
|
|
52
|
+
"loading",
|
|
53
|
+
"total",
|
|
54
|
+
"pagination",
|
|
55
|
+
"onPageChange",
|
|
56
|
+
"searchParams",
|
|
57
|
+
"onSearch",
|
|
58
|
+
"onReset",
|
|
59
|
+
"layoutType",
|
|
60
|
+
"selectedKeys",
|
|
61
|
+
"selectedRows",
|
|
62
|
+
"onSelectionChange",
|
|
63
|
+
"rowKey",
|
|
64
|
+
"childComponentProps",
|
|
65
|
+
"columnVisibility",
|
|
66
|
+
"onColumnVisibilityChange",
|
|
67
|
+
"columns",
|
|
68
|
+
"scroll",
|
|
69
|
+
"size",
|
|
70
|
+
"defaultHiddenColumnKeys",
|
|
71
|
+
"scrollAreaHeight",
|
|
72
|
+
"setScrollAreaHeight",
|
|
73
|
+
"collapseUniformColumns",
|
|
74
|
+
"columnOrder",
|
|
75
|
+
"onColumnOrderChange"
|
|
76
|
+
];
|
|
77
|
+
var RecordBoardGridView = (props) => {
|
|
78
|
+
const ctx = (0, import_useRecordBoardContext.useRecordBoardContext)({ displayName: "grid" });
|
|
79
|
+
const {
|
|
80
|
+
render,
|
|
81
|
+
columns: columnsProp,
|
|
82
|
+
rowKey: rowKeyProp,
|
|
83
|
+
rowSelection: rowSelectionProp,
|
|
84
|
+
...rest
|
|
85
|
+
} = props;
|
|
86
|
+
const rawColumns = columnsProp ?? ctx.columns ?? [];
|
|
87
|
+
const columnVisibility = ctx.columnVisibility;
|
|
88
|
+
const columnOrder = ctx.columnOrder;
|
|
89
|
+
const collapseUniformColumns = ctx.collapseUniformColumns !== false;
|
|
90
|
+
const summaryRef = (0, import_react.useRef)(null);
|
|
91
|
+
const [uniformSummaryHeight, setUniformSummaryHeight] = (0, import_react.useState)(0);
|
|
92
|
+
const {
|
|
93
|
+
columns,
|
|
94
|
+
uniformSummaryItems: summaryItems,
|
|
95
|
+
processedColumnsForSummary
|
|
96
|
+
} = (0, import_react.useMemo)(() => {
|
|
97
|
+
let list = rawColumns;
|
|
98
|
+
if (Array.isArray(columnOrder) && columnOrder.length > 0) {
|
|
99
|
+
const keyToCol = new Map(
|
|
100
|
+
list.map((c) => [(0, import_recordBoardColumns.getRecordBoardColumnKey)(c), c])
|
|
101
|
+
);
|
|
102
|
+
const ordered = [];
|
|
103
|
+
for (const key of columnOrder) {
|
|
104
|
+
const col = keyToCol.get(key);
|
|
105
|
+
if (col) ordered.push(col);
|
|
106
|
+
}
|
|
107
|
+
list.forEach((col) => {
|
|
108
|
+
const key = (0, import_recordBoardColumns.getRecordBoardColumnKey)(col);
|
|
109
|
+
if (!columnOrder.includes(key)) ordered.push(col);
|
|
110
|
+
});
|
|
111
|
+
list = ordered;
|
|
112
|
+
}
|
|
113
|
+
const visibleByUser = columnVisibility == null ? list : list.filter(
|
|
114
|
+
(col) => columnVisibility[(0, import_recordBoardColumns.getRecordBoardColumnKey)(col)] !== false
|
|
115
|
+
);
|
|
116
|
+
const data = ctx.data ?? [];
|
|
117
|
+
const shouldCollapseUniform = collapseUniformColumns && data.length > 5;
|
|
118
|
+
if (!shouldCollapseUniform) {
|
|
119
|
+
return {
|
|
120
|
+
columns: (0, import_recordBoardColumns.processColumnsForGrid)(visibleByUser),
|
|
121
|
+
uniformSummaryItems: [],
|
|
122
|
+
processedColumnsForSummary: void 0
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
const processedAllVisible = (0, import_recordBoardColumns.processColumnsForGrid)(visibleByUser);
|
|
126
|
+
const { uniformHiddenColumnKeys, summaryItems: items } = (0, import_recordBoardColumns.computeUniformColumnSummary)(data, visibleByUser);
|
|
127
|
+
const columnsForTable = processedAllVisible.filter(
|
|
128
|
+
(col) => !uniformHiddenColumnKeys.includes((0, import_recordBoardColumns.getRecordBoardColumnKey)(col))
|
|
129
|
+
);
|
|
130
|
+
return {
|
|
131
|
+
columns: columnsForTable,
|
|
132
|
+
uniformSummaryItems: items,
|
|
133
|
+
processedColumnsForSummary: items.length > 0 ? processedAllVisible : void 0
|
|
134
|
+
};
|
|
135
|
+
}, [
|
|
136
|
+
rawColumns,
|
|
137
|
+
columnVisibility,
|
|
138
|
+
columnOrder,
|
|
139
|
+
collapseUniformColumns,
|
|
140
|
+
ctx.data
|
|
141
|
+
]);
|
|
142
|
+
const tableRowKey = (0, import_react.useMemo)(() => {
|
|
143
|
+
const key = ctx.rowKey ?? rowKeyProp ?? "id";
|
|
144
|
+
return typeof key === "function" ? key : (record) => getRowKey(record, typeof key === "string" ? key : String(key));
|
|
145
|
+
}, [ctx.rowKey, rowKeyProp]);
|
|
146
|
+
const rowSelectionConfig = rowSelectionProp ?? ctx.rowSelection;
|
|
147
|
+
const rowSelection = (0, import_react.useMemo)(() => {
|
|
148
|
+
if (rowSelectionConfig === false)
|
|
149
|
+
return void 0;
|
|
150
|
+
const base = typeof rowSelectionConfig === "object" ? rowSelectionConfig : {};
|
|
151
|
+
return {
|
|
152
|
+
...base,
|
|
153
|
+
selectedRowKeys: ctx.selectedKeys,
|
|
154
|
+
onChange: (selectedRowKeys, selectedRows) => {
|
|
155
|
+
var _a;
|
|
156
|
+
ctx.onSelectionChange(selectedRowKeys, selectedRows);
|
|
157
|
+
(_a = base.onChange) == null ? void 0 : _a.call(base, selectedRowKeys, selectedRows);
|
|
158
|
+
}
|
|
159
|
+
};
|
|
160
|
+
}, [ctx.selectedKeys, ctx.onSelectionChange, rowSelectionConfig]);
|
|
161
|
+
(0, import_react.useEffect)(() => {
|
|
162
|
+
if (summaryItems.length === 0) {
|
|
163
|
+
setUniformSummaryHeight(0);
|
|
164
|
+
return;
|
|
165
|
+
}
|
|
166
|
+
const el = summaryRef.current;
|
|
167
|
+
if (!el) return;
|
|
168
|
+
const ro = new ResizeObserver((entries) => {
|
|
169
|
+
const entry = entries[0];
|
|
170
|
+
if (entry) setUniformSummaryHeight(entry.contentRect.height);
|
|
171
|
+
});
|
|
172
|
+
ro.observe(el);
|
|
173
|
+
return () => {
|
|
174
|
+
ro.disconnect();
|
|
175
|
+
setUniformSummaryHeight(0);
|
|
176
|
+
};
|
|
177
|
+
}, [summaryItems.length]);
|
|
178
|
+
const gridTableProps = (0, import_react.useMemo)(() => {
|
|
179
|
+
const picked = {};
|
|
180
|
+
Object.keys(ctx).forEach((k) => {
|
|
181
|
+
if (CONTEXT_ONLY_KEYS.includes(
|
|
182
|
+
k
|
|
183
|
+
))
|
|
184
|
+
return;
|
|
185
|
+
picked[k] = ctx[k];
|
|
186
|
+
});
|
|
187
|
+
return picked;
|
|
188
|
+
}, [ctx]);
|
|
189
|
+
if (typeof render === "function") {
|
|
190
|
+
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, render({ ...ctx, ...rest }));
|
|
191
|
+
}
|
|
192
|
+
const dataSource = ctx.data ?? [];
|
|
193
|
+
const isEmpty = !Array.isArray(dataSource) || dataSource.length === 0;
|
|
194
|
+
const sumColumnWidths = (0, import_react.useMemo)(() => {
|
|
195
|
+
return columns.reduce(
|
|
196
|
+
(sum, col) => sum + (col.width ?? 250),
|
|
197
|
+
0
|
|
198
|
+
) || 2e3;
|
|
199
|
+
}, [columns]);
|
|
200
|
+
const tableScroll = (0, import_react.useMemo)(() => {
|
|
201
|
+
const scroll = rest.scroll ?? ctx.scroll;
|
|
202
|
+
const scrollX = isEmpty && scroll && typeof scroll.x !== "number" ? sumColumnWidths : scroll == null ? void 0 : scroll.x;
|
|
203
|
+
if ((scroll == null ? void 0 : scroll.autoCalc) && typeof ctx.scrollAreaHeight === "number") {
|
|
204
|
+
const wrapHeight = ctx.scrollAreaHeight;
|
|
205
|
+
const reservedHeight = 40 + uniformSummaryHeight + 24;
|
|
206
|
+
return {
|
|
207
|
+
x: scrollX ?? sumColumnWidths,
|
|
208
|
+
y: Math.max(wrapHeight - reservedHeight, 100),
|
|
209
|
+
scrollToFirstRowOnChange: scroll.scrollToFirstRowOnChange
|
|
210
|
+
};
|
|
211
|
+
}
|
|
212
|
+
if (scroll && typeof scroll === "object") {
|
|
213
|
+
const { autoCalc: _a, ...restScroll } = scroll;
|
|
214
|
+
const resolved = Object.keys(restScroll).length ? restScroll : void 0;
|
|
215
|
+
if (resolved) {
|
|
216
|
+
return {
|
|
217
|
+
...resolved,
|
|
218
|
+
x: scrollX ?? resolved.x ?? sumColumnWidths
|
|
219
|
+
};
|
|
220
|
+
}
|
|
221
|
+
return resolved;
|
|
222
|
+
}
|
|
223
|
+
return scroll;
|
|
224
|
+
}, [
|
|
225
|
+
rest.scroll,
|
|
226
|
+
ctx.scroll,
|
|
227
|
+
ctx.scrollAreaHeight,
|
|
228
|
+
ctx.pagination,
|
|
229
|
+
columns,
|
|
230
|
+
sumColumnWidths,
|
|
231
|
+
isEmpty,
|
|
232
|
+
uniformSummaryHeight
|
|
233
|
+
]);
|
|
234
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { "data-layout-slot": "grid", className: "pisell-lowcode-record-board-grid" }, summaryItems.length > 0 && /* @__PURE__ */ import_react.default.createElement("div", { ref: summaryRef, className: "pisell-record-board-uniform-summary" }, summaryItems.map((item) => {
|
|
235
|
+
const processedCol = processedColumnsForSummary == null ? void 0 : processedColumnsForSummary.find(
|
|
236
|
+
(c) => (0, import_recordBoardColumns.getRecordBoardColumnKey)(c) === item.columnKey
|
|
237
|
+
);
|
|
238
|
+
const useRender = typeof (processedCol == null ? void 0 : processedCol.render) === "function";
|
|
239
|
+
const content = useRender ? processedCol.render(item.cellValue, item.record ?? {}, 0) : item.type === "empty" ? (0, import_locales.getText)("record-board-uniform-summary-empty") : item.displayValue ?? (0, import_locales.getText)("record-board-uniform-summary-same");
|
|
240
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
241
|
+
"div",
|
|
242
|
+
{
|
|
243
|
+
key: item.columnKey,
|
|
244
|
+
className: "pisell-record-board-uniform-summary-item"
|
|
245
|
+
},
|
|
246
|
+
/* @__PURE__ */ import_react.default.createElement("span", { className: "pisell-record-board-uniform-summary-label" }, item.title),
|
|
247
|
+
/* @__PURE__ */ import_react.default.createElement("span", { className: "pisell-record-board-uniform-summary-value" }, content)
|
|
248
|
+
);
|
|
249
|
+
})), /* @__PURE__ */ import_react.default.createElement(
|
|
250
|
+
import_antd.Table,
|
|
251
|
+
{
|
|
252
|
+
...rest,
|
|
253
|
+
...gridTableProps,
|
|
254
|
+
scroll: tableScroll,
|
|
255
|
+
rowKey: tableRowKey,
|
|
256
|
+
dataSource: ctx.data ?? [],
|
|
257
|
+
loading: ctx.loading,
|
|
258
|
+
columns,
|
|
259
|
+
rowSelection,
|
|
260
|
+
pagination: false
|
|
261
|
+
}
|
|
262
|
+
));
|
|
263
|
+
};
|
|
264
|
+
var Grid_default = RecordBoardGridView;
|