@pisell/materials 1.0.926 → 1.0.928
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 +5 -5
- package/build/lowcode/preview.js +148 -164
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +23 -37
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +28 -42
- package/es/components/batch-editor/index.d.ts +1 -0
- package/es/components/dataSourceComponents/dataSourceForm/formItem.d.ts +1 -0
- package/es/components/dataSourceComponents/dataSourceForm/utils.d.ts +1 -1
- package/es/components/dataSourceComponents/dataSourceShow/dataSourceImage/index.d.ts +1 -0
- package/es/components/dataSourceComponents/dataSourceShow/dataSourceQRCode/index.d.ts +1 -0
- package/es/components/dataSourceComponents/dataSourceTable/BaseTable.js +11 -4
- package/es/components/dataSourceComponents/dataSourceTable/filter/index.d.ts +1 -0
- package/es/components/dataSourceComponents/dataSourceTable/filter/index.js +7 -2
- package/es/components/dataSourceComponents/dataSourceTable/filter/utils.d.ts +1 -0
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.d.ts +1 -0
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +9 -10
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.js +11 -4
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableQuery.d.ts +2 -1
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableQuery.js +92 -6
- package/es/components/dataSourceComponents/dataSourceTable/type.d.ts +5 -0
- package/es/components/dataSourceComponents/dataSourceWrapper/index.d.ts +1 -0
- package/es/components/dataSourceComponents/fields/Input.Json/ReadPretty.d.ts +1 -0
- package/es/components/dataSourceComponents/fields/Input.Password/ReadPretty.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 +2 -1
- package/es/components/dataSourceComponents/fields/Upload/ReadPretty.d.ts +1 -0
- package/es/components/dataSourceComponents/fields/Upload/index.js +4 -0
- package/es/components/dataSourceComponents/fields/index.d.ts +14 -13
- package/es/components/date-picker/datePickerCpt.d.ts +1 -0
- package/es/components/date-picker/index.d.ts +1 -0
- package/es/components/filter/index.d.ts +1 -0
- package/es/components/filter/types.d.ts +1 -0
- package/es/components/list/index.d.ts +1 -0
- package/es/components/lowCodePage/index.d.ts +1 -0
- package/es/components/page/index.d.ts +1 -0
- package/es/components/pisellAdjustPrice/PisellAdjustPriceInputNumber.d.ts +1 -0
- package/es/components/pisellAdjustPrice/index.d.ts +1 -0
- package/es/components/pisellInput/components/Copy/index.d.ts +1 -0
- package/es/components/pisellInput/index.d.ts +1 -0
- package/es/components/pisellLoading/index.d.ts +1 -0
- package/es/components/pisellModal/components/IpadModal/index.d.ts +1 -0
- package/es/components/pisellModal/components/MobileModal/index.d.ts +1 -0
- package/es/components/pisellModal/components/index.d.ts +1 -0
- package/es/components/pisellText/components/Editable/index.d.ts +29 -0
- package/es/components/pisellText/components/Editable/index.js +159 -0
- package/es/components/pisellText/components/Editable/index.less +40 -0
- package/es/components/pisellText/index.d.ts +1 -0
- package/es/components/pisellText/index.js +2 -0
- package/es/components/productCard/cartSkuCard/components/AmountFooter/index.d.ts +1 -0
- package/es/components/productCard/cartSkuCard/components/MultiDay/index.d.ts +1 -0
- package/es/components/productCard/cartSkuCard/components/Note/index.d.ts +1 -0
- package/es/components/productCard/cartSkuCard/components/discountReason/index.d.ts +1 -0
- package/es/components/productCard/cartSkuCard/components/holders/index.d.ts +1 -0
- package/es/components/productCard/cartSkuCard/components/packages/index.d.ts +1 -0
- package/es/components/productCard/cartSkuCard/components/resources/index.d.ts +1 -0
- package/es/components/productCard/cartSkuCard/components/sales/index.d.ts +1 -0
- package/es/components/productCard/cartSkuCard/components/specs/index.d.ts +1 -0
- package/es/components/productCard/cartSkuCard/components/timeRange/index.d.ts +1 -0
- package/es/components/productCard/cartSkuCard/index.d.ts +1 -0
- package/es/components/productCard/components/AmountFooter/index.d.ts +1 -0
- package/es/components/productCard/components/Header/EditButton/index.d.ts +1 -0
- package/es/components/productCard/components/Header/index.d.ts +1 -0
- package/es/components/productCard/components/MultiDay/index.d.ts +1 -0
- package/es/components/productCard/components/Note/index.d.ts +1 -0
- package/es/components/productCard/components/Packages/components/collapsibleList/utils.d.ts +1 -0
- package/es/components/productCard/components/Packages/components/options/index.d.ts +1 -0
- package/es/components/productCard/components/Packages/index.d.ts +1 -0
- package/es/components/productCard/components/Sales/index.d.ts +1 -0
- package/es/components/productCard/components/Time/components/SelectHolderModal/index.d.ts +1 -0
- package/es/components/productCard/components/Time/components/SelectHolderMultiple/index.d.ts +1 -0
- package/es/components/qrcode/index.d.ts +1 -0
- package/es/components/select/index.js +4 -2
- package/es/components/sortableList/index.d.ts +1 -1
- package/es/components/sortableList/index.js +2 -1
- package/es/components/table/Actions/component/GallerySetting/index.d.ts +1 -0
- package/es/components/table/Actions/component/Group/index.d.ts +1 -0
- package/es/components/table/Actions/index.d.ts +1 -0
- package/es/components/table/BasicTable/index.d.ts +1 -0
- package/es/components/table/Gallery/components/GalleryItem/components/Cover/index.d.ts +1 -0
- package/es/components/table/Gallery/components/GalleryItem/components/RenderFields/index.d.ts +1 -0
- package/es/components/table/Gallery/components/GalleryItem/components/Title/index.d.ts +1 -0
- package/es/components/table/Table/SelectField/index.d.ts +1 -0
- package/es/components/table/Table/fields/date/Show/index.d.ts +1 -0
- package/es/components/table/Table/fields/date/index.d.ts +1 -0
- package/es/components/table/Table/fields/image/Show/index.d.ts +1 -0
- package/es/components/table/Table/fields/index.d.ts +3 -2
- package/es/components/table/Table/fields/link/Show/index.d.ts +1 -0
- package/es/components/table/Table/fields/link/index.d.ts +1 -0
- package/es/components/table/Table/fields/number/Show/index.d.ts +1 -0
- package/es/components/table/Table/fields/number/index.d.ts +1 -0
- package/es/components/table/Table/fields/numberRange/Show/index.d.ts +1 -0
- package/es/components/table/Table/fields/numberRange/index.d.ts +1 -0
- package/es/components/table/Table/fields/oldRangePicker/index.d.ts +1 -0
- package/es/components/table/Table/fields/pSwitch/Show/index.d.ts +1 -0
- package/es/components/table/Table/fields/rangePicker/index.d.ts +1 -0
- package/es/components/table/Table/fields/search/Show/index.d.ts +1 -0
- package/es/components/table/Table/fields/search/index.d.ts +1 -0
- package/es/components/table/Table/fields/select/index.d.ts +1 -0
- package/es/components/table/Table/fields/text/Show/index.d.ts +1 -0
- 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/tableConfig/SortRow/index.d.ts +1 -0
- package/es/components/table/Table/utils.d.ts +1 -7
- package/es/components/table/Table/utils.js +23 -2
- package/es/components/table/View/index.d.ts +1 -0
- package/es/components/table/hooks/useTableSetting.d.ts +3 -4
- package/es/components/table/hooks/useTableSetting.js +113 -5
- package/es/components/table/index.js +14 -3
- package/es/components/table/types.d.ts +17 -0
- package/es/components/versionSelect/index.d.ts +1 -0
- package/es/components/virtual-keyboard/Amount/index.d.ts +1 -0
- package/es/components/virtual-keyboard/Number/index.d.ts +1 -0
- package/lib/components/batch-editor/index.d.ts +1 -0
- package/lib/components/dataSourceComponents/dataSourceForm/formItem.d.ts +1 -0
- package/lib/components/dataSourceComponents/dataSourceForm/utils.d.ts +1 -1
- package/lib/components/dataSourceComponents/dataSourceShow/dataSourceImage/index.d.ts +1 -0
- package/lib/components/dataSourceComponents/dataSourceShow/dataSourceQRCode/index.d.ts +1 -0
- package/lib/components/dataSourceComponents/dataSourceTable/BaseTable.js +8 -2
- package/lib/components/dataSourceComponents/dataSourceTable/filter/index.d.ts +1 -0
- package/lib/components/dataSourceComponents/dataSourceTable/filter/index.js +7 -2
- package/lib/components/dataSourceComponents/dataSourceTable/filter/utils.d.ts +1 -0
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.d.ts +1 -0
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +9 -10
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.js +11 -4
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableQuery.d.ts +2 -1
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableQuery.js +78 -7
- package/lib/components/dataSourceComponents/dataSourceTable/type.d.ts +5 -0
- package/lib/components/dataSourceComponents/dataSourceWrapper/index.d.ts +1 -0
- package/lib/components/dataSourceComponents/fields/Input.Json/ReadPretty.d.ts +1 -0
- package/lib/components/dataSourceComponents/fields/Input.Password/ReadPretty.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 +2 -1
- package/lib/components/dataSourceComponents/fields/Upload/ReadPretty.d.ts +1 -0
- package/lib/components/dataSourceComponents/fields/Upload/index.js +2 -0
- package/lib/components/dataSourceComponents/fields/index.d.ts +14 -13
- package/lib/components/date-picker/datePickerCpt.d.ts +1 -0
- package/lib/components/date-picker/index.d.ts +1 -0
- package/lib/components/filter/index.d.ts +1 -0
- package/lib/components/filter/types.d.ts +1 -0
- package/lib/components/list/index.d.ts +1 -0
- package/lib/components/lowCodePage/index.d.ts +1 -0
- package/lib/components/page/index.d.ts +1 -0
- package/lib/components/pisellAdjustPrice/PisellAdjustPriceInputNumber.d.ts +1 -0
- package/lib/components/pisellAdjustPrice/index.d.ts +1 -0
- package/lib/components/pisellInput/components/Copy/index.d.ts +1 -0
- package/lib/components/pisellInput/index.d.ts +1 -0
- package/lib/components/pisellLoading/index.d.ts +1 -0
- package/lib/components/pisellModal/components/IpadModal/index.d.ts +1 -0
- package/lib/components/pisellModal/components/MobileModal/index.d.ts +1 -0
- package/lib/components/pisellModal/components/index.d.ts +1 -0
- package/lib/components/pisellText/components/Editable/index.d.ts +29 -0
- package/lib/components/pisellText/components/Editable/index.js +143 -0
- package/lib/components/pisellText/components/Editable/index.less +40 -0
- package/lib/components/pisellText/index.d.ts +1 -0
- package/lib/components/pisellText/index.js +2 -0
- package/lib/components/productCard/cartSkuCard/components/AmountFooter/index.d.ts +1 -0
- package/lib/components/productCard/cartSkuCard/components/MultiDay/index.d.ts +1 -0
- package/lib/components/productCard/cartSkuCard/components/Note/index.d.ts +1 -0
- package/lib/components/productCard/cartSkuCard/components/discountReason/index.d.ts +1 -0
- package/lib/components/productCard/cartSkuCard/components/holders/index.d.ts +1 -0
- package/lib/components/productCard/cartSkuCard/components/packages/index.d.ts +1 -0
- package/lib/components/productCard/cartSkuCard/components/resources/index.d.ts +1 -0
- package/lib/components/productCard/cartSkuCard/components/sales/index.d.ts +1 -0
- package/lib/components/productCard/cartSkuCard/components/specs/index.d.ts +1 -0
- package/lib/components/productCard/cartSkuCard/components/timeRange/index.d.ts +1 -0
- package/lib/components/productCard/cartSkuCard/index.d.ts +1 -0
- package/lib/components/productCard/components/AmountFooter/index.d.ts +1 -0
- package/lib/components/productCard/components/Header/EditButton/index.d.ts +1 -0
- package/lib/components/productCard/components/Header/index.d.ts +1 -0
- package/lib/components/productCard/components/MultiDay/index.d.ts +1 -0
- package/lib/components/productCard/components/Note/index.d.ts +1 -0
- package/lib/components/productCard/components/Packages/components/collapsibleList/utils.d.ts +1 -0
- package/lib/components/productCard/components/Packages/components/options/index.d.ts +1 -0
- package/lib/components/productCard/components/Packages/index.d.ts +1 -0
- package/lib/components/productCard/components/Sales/index.d.ts +1 -0
- package/lib/components/productCard/components/Time/components/SelectHolderModal/index.d.ts +1 -0
- package/lib/components/productCard/components/Time/components/SelectHolderMultiple/index.d.ts +1 -0
- package/lib/components/qrcode/index.d.ts +1 -0
- package/lib/components/select/index.js +7 -2
- package/lib/components/sortableList/index.d.ts +1 -1
- package/lib/components/sortableList/index.js +2 -2
- package/lib/components/table/Actions/component/GallerySetting/index.d.ts +1 -0
- package/lib/components/table/Actions/component/Group/index.d.ts +1 -0
- package/lib/components/table/Actions/index.d.ts +1 -0
- package/lib/components/table/BasicTable/index.d.ts +1 -0
- package/lib/components/table/Gallery/components/GalleryItem/components/Cover/index.d.ts +1 -0
- package/lib/components/table/Gallery/components/GalleryItem/components/RenderFields/index.d.ts +1 -0
- package/lib/components/table/Gallery/components/GalleryItem/components/Title/index.d.ts +1 -0
- package/lib/components/table/Table/SelectField/index.d.ts +1 -0
- package/lib/components/table/Table/fields/date/Show/index.d.ts +1 -0
- package/lib/components/table/Table/fields/date/index.d.ts +1 -0
- package/lib/components/table/Table/fields/image/Show/index.d.ts +1 -0
- package/lib/components/table/Table/fields/index.d.ts +3 -2
- package/lib/components/table/Table/fields/link/Show/index.d.ts +1 -0
- package/lib/components/table/Table/fields/link/index.d.ts +1 -0
- package/lib/components/table/Table/fields/number/Show/index.d.ts +1 -0
- package/lib/components/table/Table/fields/number/index.d.ts +1 -0
- package/lib/components/table/Table/fields/numberRange/Show/index.d.ts +1 -0
- package/lib/components/table/Table/fields/numberRange/index.d.ts +1 -0
- package/lib/components/table/Table/fields/oldRangePicker/index.d.ts +1 -0
- package/lib/components/table/Table/fields/pSwitch/Show/index.d.ts +1 -0
- package/lib/components/table/Table/fields/rangePicker/index.d.ts +1 -0
- package/lib/components/table/Table/fields/search/Show/index.d.ts +1 -0
- package/lib/components/table/Table/fields/search/index.d.ts +1 -0
- package/lib/components/table/Table/fields/select/index.d.ts +1 -0
- package/lib/components/table/Table/fields/text/Show/index.d.ts +1 -0
- 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/tableConfig/SortRow/index.d.ts +1 -0
- package/lib/components/table/Table/utils.d.ts +1 -7
- package/lib/components/table/Table/utils.js +18 -3
- package/lib/components/table/View/index.d.ts +1 -0
- package/lib/components/table/hooks/useTableSetting.d.ts +3 -4
- package/lib/components/table/hooks/useTableSetting.js +104 -4
- package/lib/components/table/index.js +12 -1
- package/lib/components/table/types.d.ts +17 -0
- package/lib/components/versionSelect/index.d.ts +1 -0
- package/lib/components/virtual-keyboard/Amount/index.d.ts +1 -0
- package/lib/components/virtual-keyboard/Number/index.d.ts +1 -0
- package/lowcode/data-source-table/meta.ts +113 -0
- package/lowcode/pisell-text.editable/meta.ts +115 -0
- package/lowcode/pisell-text.editable/snippets.ts +15 -0
- package/lowcode/sortable-list/meta.ts +1 -1
- package/lowcode/table/meta.ts +104 -0
- package/package.json +3 -3
- package/dist/umd/materials.min.css +0 -1
- package/dist/umd/materials.min.js +0 -1
- package/dist/umd/static/DotsSix.57d66266.svg +0 -1
- package/dist/umd/static/arrow-left.e542294f.svg +0 -1
- package/dist/umd/static/arrow-right.763f03e0.svg +0 -1
- package/dist/umd/static/filter-lines.04a54ae9.svg +0 -1
- package/dist/umd/static/help-circle.31c9be40.svg +0 -1
- package/dist/umd/static/switch-vertical-01.7ebe3ba8.svg +0 -1
- package/es/components/drag-sort-tree/TreeItem/index.d.ts +0 -18
- package/es/components/iconfont/index.d.ts +0 -8
- package/es/components/pisell-config-provider/context.d.ts +0 -22
- package/es/components/pisellAdjustPrice/status.d.ts +0 -32
- package/es/components/pisellAdjustPrice/type.d.ts +0 -22
- package/es/components/pisellToast/squareToast/index.d.ts +0 -15
- package/es/components/pisellToast/squareToast/methods.d.ts +0 -13
- package/es/components/pisellToast/squareToast/renderImperatively.d.ts +0 -29
- package/es/components/pisellToast/squareToast/toast.d.ts +0 -25
- package/es/components/productCard/cartSkuCard/components/MultiDay/utils.d.ts +0 -14
- package/es/components/productCard/cartSkuCard/components/swipeAction/index.d.ts +0 -45
- package/es/components/productCard/cartSkuCard/locales.d.ts +0 -96
- package/es/components/productCard/components/Action/index.d.ts +0 -3
- package/es/components/productCard/locales.d.ts +0 -84
- package/es/components/virtual-keyboard/Amount/themeConfig.d.ts +0 -32
- package/es/components/virtual-keyboard/Keyboard/index.d.ts +0 -21
- package/es/components/virtual-keyboard/Number/themeConfig.d.ts +0 -32
- package/es/components/virtual-keyboard/Number/types.d.ts +0 -26
- package/es/components/virtual-keyboard/VirtualKeyInput/index.d.ts +0 -13
- package/lib/components/drag-sort-tree/TreeItem/index.d.ts +0 -18
- package/lib/components/iconfont/index.d.ts +0 -8
- package/lib/components/pisell-config-provider/context.d.ts +0 -22
- package/lib/components/pisellAdjustPrice/status.d.ts +0 -32
- package/lib/components/pisellAdjustPrice/type.d.ts +0 -22
- package/lib/components/pisellToast/squareToast/index.d.ts +0 -15
- package/lib/components/pisellToast/squareToast/methods.d.ts +0 -13
- package/lib/components/pisellToast/squareToast/renderImperatively.d.ts +0 -29
- package/lib/components/pisellToast/squareToast/toast.d.ts +0 -25
- package/lib/components/productCard/cartSkuCard/components/MultiDay/utils.d.ts +0 -14
- package/lib/components/productCard/cartSkuCard/components/swipeAction/index.d.ts +0 -45
- package/lib/components/productCard/cartSkuCard/locales.d.ts +0 -96
- package/lib/components/productCard/components/Action/index.d.ts +0 -3
- package/lib/components/productCard/locales.d.ts +0 -84
- package/lib/components/virtual-keyboard/Amount/themeConfig.d.ts +0 -32
- package/lib/components/virtual-keyboard/Keyboard/index.d.ts +0 -21
- package/lib/components/virtual-keyboard/Number/themeConfig.d.ts +0 -32
- package/lib/components/virtual-keyboard/Number/types.d.ts +0 -26
- package/lib/components/virtual-keyboard/VirtualKeyInput/index.d.ts +0 -13
|
@@ -36,6 +36,7 @@ var import_react = require("react");
|
|
|
36
36
|
var import_utils = require("../Table/utils");
|
|
37
37
|
var import_useEngineContext = __toESM(require("../../../hooks/useEngineContext"));
|
|
38
38
|
var import_ahooks = require("ahooks");
|
|
39
|
+
var import_react2 = __toESM(require("react"));
|
|
39
40
|
var useTableSetting = (params) => {
|
|
40
41
|
var _a;
|
|
41
42
|
const {
|
|
@@ -49,7 +50,8 @@ var useTableSetting = (params) => {
|
|
|
49
50
|
columns: propsColumns,
|
|
50
51
|
gallery,
|
|
51
52
|
currentSettingHash,
|
|
52
|
-
exportImport
|
|
53
|
+
exportImport,
|
|
54
|
+
localSettings
|
|
53
55
|
} = params;
|
|
54
56
|
const context = (0, import_useEngineContext.default)();
|
|
55
57
|
const { isTerminal, interaction } = ((_a = context.appHelper) == null ? void 0 : _a.utils) || {};
|
|
@@ -81,7 +83,8 @@ var useTableSetting = (params) => {
|
|
|
81
83
|
};
|
|
82
84
|
}, [gallery, columns]);
|
|
83
85
|
const localStorageSettingKeyArr = (0, import_react.useMemo)(() => {
|
|
84
|
-
|
|
86
|
+
var _a2;
|
|
87
|
+
const keys = (0, import_utils.getSettingKeyArrByMode)({
|
|
85
88
|
filter,
|
|
86
89
|
columnSetting,
|
|
87
90
|
dataSourceGroup,
|
|
@@ -89,6 +92,12 @@ var useTableSetting = (params) => {
|
|
|
89
92
|
mode: "localStorage",
|
|
90
93
|
currentViewMode
|
|
91
94
|
});
|
|
95
|
+
if ((localSettings == null ? void 0 : localSettings.enable) && ((_a2 = localSettings.scope) == null ? void 0 : _a2.includes("filters"))) {
|
|
96
|
+
if (!keys.includes("filters")) {
|
|
97
|
+
keys.push("filters");
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
return keys;
|
|
92
101
|
}, [tableId, filter, columnSetting, dataSourceGroup, sort, currentViewMode]);
|
|
93
102
|
const defaultKeyArr = (0, import_react.useMemo)(() => {
|
|
94
103
|
return (0, import_utils.getSettingKeyArrByMode)({
|
|
@@ -143,6 +152,8 @@ var useTableSetting = (params) => {
|
|
|
143
152
|
compactMode: ((_c = mergedSetting == null ? void 0 : mergedSetting[item]) == null ? void 0 : _c.compactMode) || defaultGalleryCoverSetting.compactMode,
|
|
144
153
|
isShowLabel: ((_d = mergedSetting == null ? void 0 : mergedSetting[item]) == null ? void 0 : _d.isShowLabel) ?? defaultGalleryCoverSetting.isShowLabel
|
|
145
154
|
};
|
|
155
|
+
} else if (item === "filters") {
|
|
156
|
+
setting[item] = (mergedSetting == null ? void 0 : mergedSetting[item]) || {};
|
|
146
157
|
} else {
|
|
147
158
|
setting[item] = mergedSetting == null ? void 0 : mergedSetting[item];
|
|
148
159
|
}
|
|
@@ -201,20 +212,109 @@ var useTableSetting = (params) => {
|
|
|
201
212
|
sortButtonShow
|
|
202
213
|
]);
|
|
203
214
|
const setTableSetting = (0, import_ahooks.useMemoizedFn)((values) => {
|
|
215
|
+
var _a2;
|
|
216
|
+
let valuesForSave = values;
|
|
217
|
+
if ((localSettings == null ? void 0 : localSettings.enable) && ((_a2 = localSettings.scope) == null ? void 0 : _a2.includes("filters"))) {
|
|
218
|
+
const excluded = new Set((localSettings == null ? void 0 : localSettings.excludedFilterFields) || []);
|
|
219
|
+
const filterValue = {};
|
|
220
|
+
((filter == null ? void 0 : filter.list) || []).forEach((item) => {
|
|
221
|
+
const rawName = item == null ? void 0 : item.name;
|
|
222
|
+
if (!rawName) return;
|
|
223
|
+
const key = Array.isArray(rawName) ? rawName.join(",") : String(rawName);
|
|
224
|
+
if (excluded.has(key)) return;
|
|
225
|
+
if (values.hasOwnProperty(key)) {
|
|
226
|
+
filterValue[key] = values[key];
|
|
227
|
+
}
|
|
228
|
+
});
|
|
229
|
+
valuesForSave = {
|
|
230
|
+
...values,
|
|
231
|
+
filters: filterValue
|
|
232
|
+
};
|
|
233
|
+
}
|
|
204
234
|
const result = (0, import_utils.setFormValuesToLocalStorage)({
|
|
205
235
|
tableId,
|
|
206
|
-
allValues:
|
|
236
|
+
allValues: valuesForSave,
|
|
207
237
|
keys: localStorageSettingKeyArr,
|
|
208
238
|
currentViewMode,
|
|
209
239
|
currentSettingHash
|
|
210
240
|
});
|
|
211
241
|
});
|
|
212
242
|
const tableSetting = (0, import_react.useMemo)(() => {
|
|
213
|
-
|
|
243
|
+
var _a2;
|
|
244
|
+
const merged = {
|
|
214
245
|
...tableLocalSetting,
|
|
215
246
|
...defaultTableSetting
|
|
216
247
|
};
|
|
248
|
+
if ((localSettings == null ? void 0 : localSettings.enable) && ((_a2 = localSettings.scope) == null ? void 0 : _a2.includes("filters"))) {
|
|
249
|
+
const persistedFilter = tableLocalSetting == null ? void 0 : tableLocalSetting.filters;
|
|
250
|
+
if (persistedFilter && typeof persistedFilter === "object") {
|
|
251
|
+
return {
|
|
252
|
+
...merged,
|
|
253
|
+
...persistedFilter
|
|
254
|
+
};
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
return merged;
|
|
217
258
|
}, [tableLocalSetting, defaultTableSetting]);
|
|
259
|
+
(0, import_react.useMemo)(() => {
|
|
260
|
+
var _a2;
|
|
261
|
+
try {
|
|
262
|
+
if (!tableId) return;
|
|
263
|
+
const current = (0, import_utils.getTableSettingByCurrentViewMode)(tableId, currentViewMode) || {};
|
|
264
|
+
const persistedFilters = (current == null ? void 0 : current.filters) || {};
|
|
265
|
+
let nextFilters = { ...persistedFilters };
|
|
266
|
+
let shouldUpdate = false;
|
|
267
|
+
const enableFiltersMemory = !!((localSettings == null ? void 0 : localSettings.enable) && ((_a2 = localSettings.scope) == null ? void 0 : _a2.includes("filters")));
|
|
268
|
+
if (!enableFiltersMemory) {
|
|
269
|
+
if (Object.keys(persistedFilters || {}).length > 0) {
|
|
270
|
+
nextFilters = {};
|
|
271
|
+
shouldUpdate = true;
|
|
272
|
+
}
|
|
273
|
+
} else {
|
|
274
|
+
let names = /* @__PURE__ */ new Set();
|
|
275
|
+
if (import_react2.default.isValidElement(filter)) {
|
|
276
|
+
names = new Set(
|
|
277
|
+
((filter == null ? void 0 : filter.items) || []).filter((item) => !item.isHidden).map((item) => {
|
|
278
|
+
const rawName = item == null ? void 0 : item.value;
|
|
279
|
+
if (!rawName) return void 0;
|
|
280
|
+
return Array.isArray(rawName) ? rawName.join(",") : String(rawName);
|
|
281
|
+
})
|
|
282
|
+
);
|
|
283
|
+
} else {
|
|
284
|
+
names = new Set(
|
|
285
|
+
((filter == null ? void 0 : filter.list) || []).map((item) => {
|
|
286
|
+
const rawName = item == null ? void 0 : item.name;
|
|
287
|
+
if (!rawName) return void 0;
|
|
288
|
+
return Array.isArray(rawName) ? rawName.join(",") : String(rawName);
|
|
289
|
+
}).filter(Boolean)
|
|
290
|
+
);
|
|
291
|
+
}
|
|
292
|
+
const excluded = new Set((localSettings == null ? void 0 : localSettings.excludedFilterFields) || []);
|
|
293
|
+
const allowed = new Set(Array.from(names).filter((k) => !excluded.has(k)));
|
|
294
|
+
const filtered = {};
|
|
295
|
+
Object.keys(persistedFilters || {}).forEach((k) => {
|
|
296
|
+
if (allowed.has(k)) {
|
|
297
|
+
filtered[k] = persistedFilters[k];
|
|
298
|
+
} else {
|
|
299
|
+
shouldUpdate = true;
|
|
300
|
+
}
|
|
301
|
+
});
|
|
302
|
+
if (Object.keys(filtered).length !== Object.keys(persistedFilters || {}).length) {
|
|
303
|
+
shouldUpdate = true;
|
|
304
|
+
}
|
|
305
|
+
nextFilters = filtered;
|
|
306
|
+
}
|
|
307
|
+
if (shouldUpdate) {
|
|
308
|
+
(0, import_utils.setTableSettingToLocalStorage)({
|
|
309
|
+
tableId,
|
|
310
|
+
tableSettingObj: { filters: nextFilters },
|
|
311
|
+
currentViewMode,
|
|
312
|
+
currentSettingHash
|
|
313
|
+
});
|
|
314
|
+
}
|
|
315
|
+
} catch (e) {
|
|
316
|
+
}
|
|
317
|
+
}, []);
|
|
218
318
|
return {
|
|
219
319
|
setTableSetting,
|
|
220
320
|
tableSetting
|
|
@@ -76,6 +76,7 @@ var GridView = (0, import_model.Provider)(
|
|
|
76
76
|
onValuesChange,
|
|
77
77
|
columnSetting,
|
|
78
78
|
dataSourceGroup: propsDataSourceGroup,
|
|
79
|
+
localSettings: _localSettings,
|
|
79
80
|
view = defaultView,
|
|
80
81
|
gallery,
|
|
81
82
|
currentSettingKey,
|
|
@@ -171,7 +172,8 @@ var GridView = (0, import_model.Provider)(
|
|
|
171
172
|
view,
|
|
172
173
|
currentViewMode,
|
|
173
174
|
gallery,
|
|
174
|
-
currentSettingHash
|
|
175
|
+
currentSettingHash,
|
|
176
|
+
localSettings: _localSettings
|
|
175
177
|
});
|
|
176
178
|
const getIsTriggerValuesChange = (0, import_useTriggerValuesChange.default)({
|
|
177
179
|
filter,
|
|
@@ -260,6 +262,15 @@ var GridView = (0, import_model.Provider)(
|
|
|
260
262
|
(0, import_react.useImperativeHandle)(ref, () => {
|
|
261
263
|
if (wrapRef.current) {
|
|
262
264
|
wrapRef.current.formInstance = form;
|
|
265
|
+
wrapRef.current.getCachedFilters = () => {
|
|
266
|
+
try {
|
|
267
|
+
if (!tableId) return {};
|
|
268
|
+
const setting = (0, import_utils.getTableSettingByCurrentViewMode)(tableId, currentViewMode);
|
|
269
|
+
return (setting == null ? void 0 : setting.filters) || {};
|
|
270
|
+
} catch (e) {
|
|
271
|
+
return {};
|
|
272
|
+
}
|
|
273
|
+
};
|
|
263
274
|
}
|
|
264
275
|
return wrapRef.current;
|
|
265
276
|
});
|
|
@@ -193,6 +193,21 @@ export declare type ExportImportType = {
|
|
|
193
193
|
apiUrl?: ApiProps;
|
|
194
194
|
otherParams?: any;
|
|
195
195
|
};
|
|
196
|
+
/**
|
|
197
|
+
* 设置记忆范围
|
|
198
|
+
*/
|
|
199
|
+
export declare type LocalSettingsScope = "filters" | "sorting" | "columns";
|
|
200
|
+
/**
|
|
201
|
+
* 本地记忆设置
|
|
202
|
+
*/
|
|
203
|
+
export declare type LocalSettingsType = {
|
|
204
|
+
/** 启用设置记忆 */
|
|
205
|
+
enable: boolean;
|
|
206
|
+
/** 记忆范围 */
|
|
207
|
+
scope: LocalSettingsScope[];
|
|
208
|
+
/** 不需要记忆的筛选字段(当 scope 包含 filters 时生效) */
|
|
209
|
+
excludedFilterFields?: string[];
|
|
210
|
+
};
|
|
196
211
|
export declare type GridViewProps = {
|
|
197
212
|
columns: any;
|
|
198
213
|
dataSource: any[];
|
|
@@ -249,5 +264,7 @@ export declare type GridViewProps = {
|
|
|
249
264
|
sortBy?: string;
|
|
250
265
|
}[];
|
|
251
266
|
};
|
|
267
|
+
/** 本地记忆设置 */
|
|
268
|
+
localSettings?: LocalSettingsType;
|
|
252
269
|
};
|
|
253
270
|
export {};
|
|
@@ -4542,6 +4542,119 @@ const dataSourceTable = {
|
|
|
4542
4542
|
},
|
|
4543
4543
|
],
|
|
4544
4544
|
},
|
|
4545
|
+
{
|
|
4546
|
+
title: "本地记忆",
|
|
4547
|
+
display: "block",
|
|
4548
|
+
type: "group",
|
|
4549
|
+
items: [
|
|
4550
|
+
{
|
|
4551
|
+
name: "localSettings.enable",
|
|
4552
|
+
title: {
|
|
4553
|
+
label: {
|
|
4554
|
+
type: 'i18n',
|
|
4555
|
+
'en-US': 'Enable settings memory',
|
|
4556
|
+
'zh-CN': '启用设置记忆',
|
|
4557
|
+
'zh-HK': '啟用設置記憶',
|
|
4558
|
+
},
|
|
4559
|
+
tip: {
|
|
4560
|
+
type: 'i18n',
|
|
4561
|
+
'en-US': 'Automatically save and restore table settings',
|
|
4562
|
+
'zh-CN': '自动保存和恢复表格设置',
|
|
4563
|
+
'zh-HK': '自動保存和恢復表格設置',
|
|
4564
|
+
},
|
|
4565
|
+
},
|
|
4566
|
+
propType: "bool",
|
|
4567
|
+
setter: "BoolSetter",
|
|
4568
|
+
defaultValue: true,
|
|
4569
|
+
},
|
|
4570
|
+
{
|
|
4571
|
+
name: "localSettings.scope",
|
|
4572
|
+
title: {
|
|
4573
|
+
label: {
|
|
4574
|
+
type: 'i18n',
|
|
4575
|
+
'en-US': 'Memory scope',
|
|
4576
|
+
'zh-CN': '记忆范围',
|
|
4577
|
+
'zh-HK': '記憶範圍',
|
|
4578
|
+
},
|
|
4579
|
+
tip: {
|
|
4580
|
+
type: 'i18n',
|
|
4581
|
+
'en-US': 'Choose which settings to remember',
|
|
4582
|
+
'zh-CN': '选择要记忆的设置项',
|
|
4583
|
+
'zh-HK': '選擇要記憶的設置項',
|
|
4584
|
+
},
|
|
4585
|
+
},
|
|
4586
|
+
condition: {
|
|
4587
|
+
type: "JSFunction",
|
|
4588
|
+
value: 'target => !!target.getProps().getPropValue("localSettings.enable")',
|
|
4589
|
+
},
|
|
4590
|
+
setter: {
|
|
4591
|
+
componentName: "SelectSetter",
|
|
4592
|
+
props: {
|
|
4593
|
+
mode: "multiple",
|
|
4594
|
+
options: [
|
|
4595
|
+
{ title: '筛选', value: "filters" },
|
|
4596
|
+
{ title: '排序', value: "sorting" },
|
|
4597
|
+
{ title: '列配置', value: "columns" },
|
|
4598
|
+
],
|
|
4599
|
+
},
|
|
4600
|
+
},
|
|
4601
|
+
defaultValue: ["filters", "sorting", "columns"],
|
|
4602
|
+
},
|
|
4603
|
+
{
|
|
4604
|
+
name: "localSettings.excludedFilterFields",
|
|
4605
|
+
title: {
|
|
4606
|
+
label: {
|
|
4607
|
+
type: 'i18n',
|
|
4608
|
+
'en-US': 'Excluded filter fields',
|
|
4609
|
+
'zh-CN': '筛选排除字段',
|
|
4610
|
+
'zh-HK': '篩選排除字段',
|
|
4611
|
+
},
|
|
4612
|
+
tip: {
|
|
4613
|
+
type: 'i18n',
|
|
4614
|
+
'en-US': 'Filter fields that should not be remembered',
|
|
4615
|
+
'zh-CN': '不需要记忆的筛选字段',
|
|
4616
|
+
'zh-HK': '不需要記憶的篩選字段',
|
|
4617
|
+
},
|
|
4618
|
+
},
|
|
4619
|
+
condition: {
|
|
4620
|
+
type: "JSFunction",
|
|
4621
|
+
value: 'target => { const enable = !!target.getProps().getPropValue("localSettings.enable"); const scope = target.getProps().getPropValue("localSettings.scope") || []; return enable && Array.isArray(scope) && scope.includes("filters"); }',
|
|
4622
|
+
},
|
|
4623
|
+
setter: {
|
|
4624
|
+
componentName: "SelectSetter",
|
|
4625
|
+
props: (target: any) => {
|
|
4626
|
+
const filterList = (target.parent.parent.getPropValue("filter.items") || []) as any[];
|
|
4627
|
+
|
|
4628
|
+
|
|
4629
|
+
const searchDetail = target.parent.parent.getPropValue("search");
|
|
4630
|
+
|
|
4631
|
+
if (searchDetail && searchDetail.show) {
|
|
4632
|
+
filterList.unshift({
|
|
4633
|
+
label: "搜索",
|
|
4634
|
+
value: searchDetail.key || "_keywords",
|
|
4635
|
+
isHidden: false,
|
|
4636
|
+
});
|
|
4637
|
+
}
|
|
4638
|
+
|
|
4639
|
+
return {
|
|
4640
|
+
mode: "multiple",
|
|
4641
|
+
options: filterList
|
|
4642
|
+
.map((item: any) => ({
|
|
4643
|
+
title:
|
|
4644
|
+
(item && (typeof item.label === 'string' ? item.label : item.label?.["zh-CN"] || item.label?.["zh-HK"] || item.label?.en)) ||
|
|
4645
|
+
item?.key ||
|
|
4646
|
+
item?.columnKey ||
|
|
4647
|
+
"",
|
|
4648
|
+
value: item?.value || "",
|
|
4649
|
+
isHidden: item?.isHidden,
|
|
4650
|
+
}))
|
|
4651
|
+
.filter((opt: any) => opt.value && !opt.isHidden),
|
|
4652
|
+
};
|
|
4653
|
+
},
|
|
4654
|
+
},
|
|
4655
|
+
},
|
|
4656
|
+
],
|
|
4657
|
+
},
|
|
4545
4658
|
{
|
|
4546
4659
|
title: { label: '列配置', tip: '表格的列配置' },
|
|
4547
4660
|
display: 'block',
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import snippets from './snippets';
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
snippets,
|
|
5
|
+
componentName: 'PisellText.Editable',
|
|
6
|
+
title: '可编辑文本',
|
|
7
|
+
category: '数据输入',
|
|
8
|
+
docUrl: '',
|
|
9
|
+
screenshot: '',
|
|
10
|
+
devMode: 'proCode',
|
|
11
|
+
npm: {
|
|
12
|
+
package: '@pisell/materials',
|
|
13
|
+
version: '1.0.1',
|
|
14
|
+
exportName: 'PisellText',
|
|
15
|
+
main: 'src/index.tsx',
|
|
16
|
+
destructuring: true,
|
|
17
|
+
subName: 'Editable',
|
|
18
|
+
},
|
|
19
|
+
props: [
|
|
20
|
+
{
|
|
21
|
+
name: 'value',
|
|
22
|
+
title: {
|
|
23
|
+
label: '文本内容',
|
|
24
|
+
tip: '文本内容,支持字符串或多语言对象'
|
|
25
|
+
},
|
|
26
|
+
propType: {
|
|
27
|
+
type: 'oneOfType',
|
|
28
|
+
value: ['string', 'object']
|
|
29
|
+
},
|
|
30
|
+
setter: {
|
|
31
|
+
componentName: 'MixedSetter',
|
|
32
|
+
props: {
|
|
33
|
+
setters: [
|
|
34
|
+
'StringSetter',
|
|
35
|
+
'JsonSetter'
|
|
36
|
+
]
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
name: 'editable',
|
|
42
|
+
title: {
|
|
43
|
+
label: '启用编辑',
|
|
44
|
+
tip: '启用编辑功能,支持布尔值或详细配置对象',
|
|
45
|
+
},
|
|
46
|
+
propType: {
|
|
47
|
+
type: 'oneOfType',
|
|
48
|
+
value: ['bool', 'object']
|
|
49
|
+
},
|
|
50
|
+
setter: {
|
|
51
|
+
componentName: 'MixedSetter',
|
|
52
|
+
props: {
|
|
53
|
+
setters: [
|
|
54
|
+
'BoolSetter',
|
|
55
|
+
{
|
|
56
|
+
componentName: 'ObjectSetter',
|
|
57
|
+
props: {
|
|
58
|
+
config: {
|
|
59
|
+
items: [
|
|
60
|
+
{
|
|
61
|
+
name: 'disabled',
|
|
62
|
+
title: { label: '禁用编辑', tip: '是否禁用编辑功能' },
|
|
63
|
+
propType: 'bool',
|
|
64
|
+
setter: 'BoolSetter',
|
|
65
|
+
defaultValue: false,
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
name: 'maxLength',
|
|
69
|
+
title: { label: '最大长度', tip: '编辑时的最大字符长度' },
|
|
70
|
+
propType: 'number',
|
|
71
|
+
setter: 'NumberSetter',
|
|
72
|
+
}
|
|
73
|
+
]
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
]
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
defaultValue: false,
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
name: 'size',
|
|
84
|
+
title: { label: '尺寸', tip: '输入框尺寸' },
|
|
85
|
+
propType: { type: 'oneOf', value: ['large', 'middle', 'small'] },
|
|
86
|
+
setter: [
|
|
87
|
+
{
|
|
88
|
+
componentName: 'RadioGroupSetter',
|
|
89
|
+
props: {
|
|
90
|
+
options: [
|
|
91
|
+
{ title: 'Large', value: 'large' },
|
|
92
|
+
{ title: 'Middle', value: 'middle' },
|
|
93
|
+
{ title: 'Small', value: 'small' },
|
|
94
|
+
]
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
'VariableSetter'
|
|
98
|
+
],
|
|
99
|
+
defaultValue: 'middle',
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
name: 'className',
|
|
103
|
+
title: { label: '类名', tip: '自定义CSS类名' },
|
|
104
|
+
propType: 'string',
|
|
105
|
+
setter: 'StringSetter',
|
|
106
|
+
},
|
|
107
|
+
],
|
|
108
|
+
configure: {
|
|
109
|
+
supports: {
|
|
110
|
+
style: true,
|
|
111
|
+
className: true,
|
|
112
|
+
events: ['onChange'],
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
};
|
package/lowcode/table/meta.ts
CHANGED
|
@@ -1457,6 +1457,110 @@ export default {
|
|
|
1457
1457
|
},
|
|
1458
1458
|
],
|
|
1459
1459
|
},
|
|
1460
|
+
{
|
|
1461
|
+
title: "本地记忆",
|
|
1462
|
+
display: "block",
|
|
1463
|
+
type: "group",
|
|
1464
|
+
items: [
|
|
1465
|
+
{
|
|
1466
|
+
name: "localSettings.enable",
|
|
1467
|
+
title: {
|
|
1468
|
+
label: {
|
|
1469
|
+
type: 'i18n',
|
|
1470
|
+
'en-US': 'Enable settings memory',
|
|
1471
|
+
'zh-CN': '启用设置记忆',
|
|
1472
|
+
'zh-HK': '啟用設置記憶',
|
|
1473
|
+
},
|
|
1474
|
+
tip: {
|
|
1475
|
+
type: 'i18n',
|
|
1476
|
+
'en-US': 'Automatically save and restore table settings',
|
|
1477
|
+
'zh-CN': '自动保存和恢复表格设置',
|
|
1478
|
+
'zh-HK': '自動保存和恢復表格設置',
|
|
1479
|
+
},
|
|
1480
|
+
},
|
|
1481
|
+
propType: "bool",
|
|
1482
|
+
setter: "BoolSetter",
|
|
1483
|
+
defaultValue: true,
|
|
1484
|
+
},
|
|
1485
|
+
{
|
|
1486
|
+
name: "localSettings.scope",
|
|
1487
|
+
title: {
|
|
1488
|
+
label: {
|
|
1489
|
+
type: 'i18n',
|
|
1490
|
+
'en-US': 'Memory scope',
|
|
1491
|
+
'zh-CN': '记忆范围',
|
|
1492
|
+
'zh-HK': '記憶範圍',
|
|
1493
|
+
},
|
|
1494
|
+
tip: {
|
|
1495
|
+
type: 'i18n',
|
|
1496
|
+
'en-US': 'Choose which settings to remember',
|
|
1497
|
+
'zh-CN': '选择要记忆的设置项',
|
|
1498
|
+
'zh-HK': '選擇要記憶的設置項',
|
|
1499
|
+
},
|
|
1500
|
+
},
|
|
1501
|
+
condition: {
|
|
1502
|
+
type: "JSFunction",
|
|
1503
|
+
value: 'target => !!target.getProps().getPropValue("localSettings.enable")',
|
|
1504
|
+
},
|
|
1505
|
+
setter: {
|
|
1506
|
+
componentName: "SelectSetter",
|
|
1507
|
+
props: {
|
|
1508
|
+
mode: "multiple",
|
|
1509
|
+
options: [
|
|
1510
|
+
{ title: '筛选', value: "filters" },
|
|
1511
|
+
{ title: '排序', value: "sorting" },
|
|
1512
|
+
{ title: '列配置', value: "columns" },
|
|
1513
|
+
],
|
|
1514
|
+
},
|
|
1515
|
+
},
|
|
1516
|
+
defaultValue: ["filters", "sorting", "columns"],
|
|
1517
|
+
},
|
|
1518
|
+
{
|
|
1519
|
+
name: "localSettings.excludedFilterFields",
|
|
1520
|
+
title: {
|
|
1521
|
+
label: {
|
|
1522
|
+
type: 'i18n',
|
|
1523
|
+
'en-US': 'Excluded filter fields',
|
|
1524
|
+
'zh-CN': '筛选排除字段',
|
|
1525
|
+
'zh-HK': '篩選排除字段',
|
|
1526
|
+
},
|
|
1527
|
+
tip: {
|
|
1528
|
+
type: 'i18n',
|
|
1529
|
+
'en-US': 'Filter fields that should not be remembered',
|
|
1530
|
+
'zh-CN': '不需要记忆的筛选字段',
|
|
1531
|
+
'zh-HK': '不需要記憶的篩選字段',
|
|
1532
|
+
},
|
|
1533
|
+
},
|
|
1534
|
+
// condition: {
|
|
1535
|
+
// type: "JSFunction",
|
|
1536
|
+
// value: 'target => { const enable = !!target.getProps().getPropValue("settingsMemory.enable"); const scope = target.getProps().getPropValue("settingsMemory.scope") || []; return enable && Array.isArray(scope) && scope.includes("filters"); }',
|
|
1537
|
+
// },
|
|
1538
|
+
condition: {
|
|
1539
|
+
type: "JSFunction",
|
|
1540
|
+
value: 'target => !!target.getProps().getPropValue("localSettings.enable")',
|
|
1541
|
+
},
|
|
1542
|
+
setter: {
|
|
1543
|
+
componentName: "SelectSetter",
|
|
1544
|
+
props: (target: any) => {
|
|
1545
|
+
const filterList = (target.parent.parent.getPropValue("filter.list") || []) as any[];
|
|
1546
|
+
return {
|
|
1547
|
+
mode: "multiple",
|
|
1548
|
+
options: filterList
|
|
1549
|
+
.map((item: any) => ({
|
|
1550
|
+
title:
|
|
1551
|
+
(item && (item.label?.["zh-CN"] || item.label?.["zh-HK"] || item.label?.en)) ||
|
|
1552
|
+
item?.key ||
|
|
1553
|
+
item?.columnKey ||
|
|
1554
|
+
"",
|
|
1555
|
+
value: item?.key || item?.columnKey || "",
|
|
1556
|
+
}))
|
|
1557
|
+
.filter((opt: any) => opt.value),
|
|
1558
|
+
};
|
|
1559
|
+
},
|
|
1560
|
+
},
|
|
1561
|
+
},
|
|
1562
|
+
],
|
|
1563
|
+
},
|
|
1460
1564
|
{
|
|
1461
1565
|
title: { label: "列配置", tip: "表格的列配置" },
|
|
1462
1566
|
display: "block",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pisell/materials",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.928",
|
|
4
4
|
"main": "./lib/index.js",
|
|
5
5
|
"module": "./es/index.js",
|
|
6
6
|
"types": "./lib/index.d.ts",
|
|
@@ -76,8 +76,8 @@
|
|
|
76
76
|
"vod-js-sdk-v6": "^1.4.11",
|
|
77
77
|
"react-camera-pro": "1.4.0",
|
|
78
78
|
"@pisell/date-picker": "1.0.126",
|
|
79
|
-
"@pisell/
|
|
80
|
-
"@pisell/
|
|
79
|
+
"@pisell/utils": "1.0.54",
|
|
80
|
+
"@pisell/icon": "0.0.10"
|
|
81
81
|
},
|
|
82
82
|
"peerDependencies": {
|
|
83
83
|
"react": "^18.0.0",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.materials-grid{display:flex;flex-direction:column;height:100%;width:100%}.materials-grid-header{align-items:center;display:flex;justify-content:space-between;margin-bottom:16px}.materials-grid-header .right-wrap{align-items:center;display:flex;gap:8px}.materials-grid-actions{align-items:center;display:flex;justify-content:space-between;margin-bottom:16px}.materials-grid-actions .left-wrap{align-items:center;display:flex;flex:1 1}.materials-grid-actions .left-wrap .pisell-lowcode-form-item{margin-bottom:0}.materials-grid-actions .right-wrap{align-items:center;display:flex;gap:8px}.materials-grid-actions .right-wrap .icon{cursor:pointer;transition:.2s}.materials-grid-actions .right-wrap .icon:hover{color:var(--theme-color)}.materials-grid-actions .right-wrap .button{align-items:center;display:flex;font-size:12px;height:28px;justify-content:center}.filter-dropdown-wrap{display:flex;flex-direction:column;max-height:400px;max-width:calc(100vw - 24px);min-width:250px;padding:4px;width:400px}.filter-dropdown-wrap .filter-dropdown-wrap-content{flex:1 1;overflow:auto}.filter-dropdown-wrap .filter-dropdown-drag-item{align-items:center;background:#f9fafb;background:var(--gray-50,#f9fafb);border-radius:8px;display:flex;margin-bottom:12px;padding:8px 12px 12px}.filter-dropdown-wrap .filter-dropdown-drag-item .dots-six-icon{color:#98a2b3;cursor:pointer;font-size:24px}.filter-dropdown-wrap .filter-dropdown-drag-item .pisell-lowcode-form-item{margin-bottom:0}.filter-dropdown-wrap .filter-dropdown-drag-item .filter-dropdown-drag-item-right{flex:1 1;margin-left:16px}.filter-dropdown-wrap .filter-dropdown-drag-item .filter-dropdown-drag-item-right .filter-dropdown-drag-item-title{color:#777;color:var(--text-text-2,#777);font-size:14px;font-style:normal;font-weight:600;line-height:20px}.filter-dropdown-container-wrap{border-bottom:1px solid #e2e2e2;border-bottom:1px solid var(--surface-surface-4,#e2e2e2);margin-bottom:20px;min-height:70px}.filter-dropdown-container-wrap:last-child{border:none}.filter-dropdown-container-wrap .filter-dropdown-container-title-wrap{align-items:center;color:#919191;color:var(--text-text-3,#919191);display:flex;font-size:16px;font-style:normal;font-weight:600;line-height:22px;margin-bottom:12px}.filter-dropdown-container-wrap .filter-dropdown-container-title-wrap .filter-dropdown-container-title{color:#101828;color:var(--gray-900,#101828);font-size:16px;font-style:normal;font-weight:600;line-height:24px;margin-right:6px}.filter-dropdown-container-wrap .filter-dropdown-container-title-wrap .filter-dropdown-container-icon-help{color:#98a2b3;color:var(--gray-400,#98a2b3);font-size:20px}.filter-dropdown-container-wrap .filter-dropdown-container-filter-wrap{min-height:80px}.materials-sort-list-empty{color:#5a5a5a;display:block;padding-top:22px;text-align:center}.materials-grid-summary{margin-bottom:16px}.grid-view-table-wrap{position:relative}.materials-grid-paginator{align-items:center;background-color:#fff;border:1px solid #f0f0f0;border-radius:0 0 8px 8px;border-top:none;display:flex;height:50px;justify-content:center;margin:0!important;padding:0 20px;width:100%}.materials-grid-paginator .pisell-lowcode-pagination-total-text{color:#667085;color:var(--gray-500,#667085);font-size:14px;font-style:normal;font-weight:500;margin-right:auto}.materials-grid-paginator .pisell-lowcode-pagination-item{border:1px solid #d0d5dd;border-radius:0;border-right:0;margin:0;position:relative}.materials-grid-paginator .pisell-lowcode-pagination-jump-next,.materials-grid-paginator .pisell-lowcode-pagination-jump-prev{border:1px solid #d0d5dd;border-radius:0;border-right:none;margin:0}.materials-grid-paginator .pisell-lowcode-pagination-item-link:hover{color:rgba(0,0,0,.88)!important;font-weight:450!important}.materials-grid-paginator .pisell-lowcode-pagination-item-link:hover .pisell-lowcode-pagination-item-link-icon{color:rgba(0,0,0,.88)!important;font-weight:450!important}.materials-grid-paginator .pisell-lowcode-pagination-item-active:hover{border-color:#d0d5dd!important}.materials-grid-paginator .pisell-lowcode-pagination-item-active{background-color:rgba(0,0,0,.06)}.materials-grid-paginator .pisell-lowcode-pagination-item-active a{color:rgba(0,0,0,.88)!important;font-weight:450!important}.materials-grid-paginator .pisell-lowcode-pagination-prev{align-items:center;border:1px solid #d0d5dd;border-radius:8px 0 0 8px;border-right:none;display:flex;justify-content:center;margin:0;min-width:auto}.materials-grid-paginator .pisell-lowcode-pagination-next{align-items:center;border:1px solid #d0d5dd;border-radius:0 8px 8px 0;display:flex;justify-content:center;margin:0;min-width:auto}.paginator-page-btn{align-items:center;border-radius:4px 4px 4px 4px;color:#344054;color:var(--gray-700,#344054);cursor:pointer;display:flex;font-size:12px;font-weight:400;justify-content:center;padding:10px 16px;transition:.2s;-ms-user-select:none;user-select:none}.paginator-page-btn .paginator-page-btn-text{font-weight:600}.paginator-page-btn .paginator-page-btn-left-icon,.paginator-page-btn .paginator-page-btn-right-icon{font-size:20px}.paginator-page-btn .paginator-page-btn-left-icon{margin-right:8px}.paginator-page-btn .paginator-page-btn-right-icon{margin-left:8px}.paginator-page-btn.left{margin-right:auto}.paginator-page-btn.left .icon{font-size:18px;margin-right:8px}.paginator-page-btn.right{margin-left:auto}.paginator-page-btn.right .icon{font-size:18px;margin-left:8px;transform:rotate(180deg)}.materials-grid-paginator-mini{align-items:center;background-color:#fff;border:1px solid #f0f0f0;border-radius:0 0 8px 8px;border-top:none;display:flex;height:50px;justify-content:space-between;margin:0!important;overflow:hidden;padding:0 20px;width:100%}.materials-grid-paginator-mini .paginator-page-btn{padding:8px}.materials-grid-paginator-mini .materials-grid-paginator-center{align-items:center;display:flex;gap:4px;justify-content:center}.materials-grid-paginator-mini .materials-grid-paginator-center .materials-grid-paginator-center-text{color:#344054;color:var(--gray-700,#344054);font-size:14px;font-style:normal;font-weight:400}.materials-grid-paginator-mini .materials-grid-paginator-center .materials-grid-paginator-center-value{color:#344054;color:var(--gray-700,#344054);font-size:14px;font-style:normal;font-weight:500}.materials-grid-paginator-mini .pisell-lowcode-pagination-next,.materials-grid-paginator-mini .pisell-lowcode-pagination-prev{border:1px solid #d0d5dd;border-radius:8px;margin:0}.materials-grid-paginator-mini .pisell-lowcode-pagination-next .paginator-page-btn-left-icon,.materials-grid-paginator-mini .pisell-lowcode-pagination-prev .paginator-page-btn-left-icon{margin-right:0}.materials-grid-paginator-mini .pisell-lowcode-pagination-next .paginator-page-btn-right-icon,.materials-grid-paginator-mini .pisell-lowcode-pagination-prev .paginator-page-btn-right-icon{margin-left:0}.react-resizable{position:relative}.react-resizable-handle{background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHN0eWxlPSJiYWNrZ3JvdW5kLWNvbG9yOiNmZmZmZmYwMCIgd2lkdGg9IjYiIGhlaWdodD0iNiI+PHBhdGggZD0iTTYgNkgwVjQuMmg0LjJWMEg2djZaIiBvcGFjaXR5PSIuMzAyIi8+PC9zdmc+);background-origin:content-box;background-position:100% 100%;background-repeat:no-repeat;box-sizing:border-box;height:20px;padding:0 3px 3px 0;position:absolute;width:20px}.react-resizable-handle-sw{bottom:0;cursor:sw-resize;left:0;transform:rotate(90deg)}.react-resizable-handle-se{bottom:0;cursor:se-resize;right:0}.react-resizable-handle-nw{cursor:nw-resize;left:0;top:0;transform:rotate(180deg)}.react-resizable-handle-ne{cursor:ne-resize;right:0;top:0;transform:rotate(270deg)}.react-resizable-handle-e,.react-resizable-handle-w{cursor:ew-resize;margin-top:-10px;top:50%}.react-resizable-handle-w{left:0;transform:rotate(135deg)}.react-resizable-handle-e{right:0;transform:rotate(315deg)}.react-resizable-handle-n,.react-resizable-handle-s{cursor:ns-resize;left:50%;margin-left:-10px}.react-resizable-handle-n{top:0;transform:rotate(225deg)}.react-resizable-handle-s{bottom:0;transform:rotate(45deg)}.materials-grid-table-header-cell{align-items:center;display:flex;height:44px;padding:0 14px}.materials-grid-table-header-cell .field-icon{color:#777;font-size:18px}.materials-grid-table-header-cell .materials-grid-table-header-cell-content{color:#1b1b1b;flex:auto;font-size:14px;font-weight:600;overflow:hidden;padding-right:10px;text-overflow:ellipsis;white-space:nowrap;word-break:break-all}.materials-grid-table-header-cell .actions{align-items:center;display:flex;gap:8px}.materials-grid-table-header-cell .actions .action{color:#ababab;cursor:pointer;font-size:14px}.editable-cell-value-wrap{height:100%;width:100%}.materials-grid-table-cell{height:1px;padding:0!important}.cell-provider{align-items:center;border-radius:4px;cursor:pointer;display:flex;height:100%;justify-content:center;padding:12px;position:relative;width:100%}.cell-provider.focus{box-shadow:var(--theme-color) 0 0 0 1px!important}
|