@donglegeyu/company-ui 1.2.21 → 1.2.23

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.
@@ -28,6 +28,22 @@ var import_jsx_runtime = require("react/jsx-runtime");
28
28
  var CompanyTypography = (props) => {
29
29
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_antd.ConfigProvider, { theme: import_theme.companyTheme, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_antd.Typography, { ...props }) });
30
30
  };
31
+ var withTheme = (Comp) => {
32
+ const Wrapped = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_antd.ConfigProvider, { theme: import_theme.companyTheme, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Comp, { ...props }) });
33
+ return Wrapped;
34
+ };
35
+ CompanyTypography.Link = withTheme(
36
+ import_antd.Typography.Link
37
+ );
38
+ CompanyTypography.Text = withTheme(
39
+ import_antd.Typography.Text
40
+ );
41
+ CompanyTypography.Title = withTheme(
42
+ import_antd.Typography.Title
43
+ );
44
+ CompanyTypography.Paragraph = withTheme(
45
+ import_antd.Typography.Paragraph
46
+ );
31
47
  // Annotate the CommonJS export names for ESM import in node:
32
48
  0 && (module.exports = {
33
49
  CompanyTypography
@@ -148,7 +148,9 @@ function SmartListTemplate({
148
148
  (0, import_react.useEffect)(() => {
149
149
  if (!fields || fields.length === 0)
150
150
  return;
151
- const updatedOptions = fields.filter((field) => !nonBusinessFields.includes(field.key)).map((field) => {
151
+ const updatedOptions = fields.filter(
152
+ (field) => !nonBusinessFields.includes(field.key) && !field.hideInFilter
153
+ ).map((field) => {
152
154
  var _a;
153
155
  return {
154
156
  key: field.key,
@@ -167,7 +169,7 @@ function SmartListTemplate({
167
169
  }, [fields]);
168
170
  const displayFilterItems = (0, import_react.useMemo)(() => {
169
171
  const filteredFields = fields.filter(
170
- (field) => !nonBusinessFields.includes(field.key)
172
+ (field) => !nonBusinessFields.includes(field.key) && !field.hideInFilter
171
173
  );
172
174
  if (!currentScheme || currentScheme === "default") {
173
175
  return filteredFields.map((f) => ({
@@ -51,6 +51,7 @@ export interface FieldDefinition {
51
51
  width?: number;
52
52
  fixed?: 'left' | 'right';
53
53
  ellipsis?: boolean;
54
+ hideInFilter?: boolean;
54
55
  }
55
56
  export interface PaginationConfig {
56
57
  current: number;
@@ -13,4 +13,17 @@ export var CompanyTypography = function CompanyTypography(props) {
13
13
  theme: companyTheme,
14
14
  children: /*#__PURE__*/_jsx(AntdTypography, _objectSpread({}, props))
15
15
  });
16
- };
16
+ };
17
+ var withTheme = function withTheme(Comp) {
18
+ var Wrapped = function Wrapped(props) {
19
+ return /*#__PURE__*/_jsx(ConfigProvider, {
20
+ theme: companyTheme,
21
+ children: /*#__PURE__*/_jsx(Comp, _objectSpread({}, props))
22
+ });
23
+ };
24
+ return Wrapped;
25
+ };
26
+ CompanyTypography.Link = withTheme(AntdTypography.Link);
27
+ CompanyTypography.Text = withTheme(AntdTypography.Text);
28
+ CompanyTypography.Title = withTheme(AntdTypography.Title);
29
+ CompanyTypography.Paragraph = withTheme(AntdTypography.Paragraph);
@@ -214,7 +214,7 @@ export default function SmartListTemplate(_ref) {
214
214
  useEffect(function () {
215
215
  if (!fields || fields.length === 0) return;
216
216
  var updatedOptions = fields.filter(function (field) {
217
- return !nonBusinessFields.includes(field.key);
217
+ return !nonBusinessFields.includes(field.key) && !field.hideInFilter;
218
218
  }).map(function (field) {
219
219
  var _field$options;
220
220
  return {
@@ -237,7 +237,7 @@ export default function SmartListTemplate(_ref) {
237
237
  }, [fields]);
238
238
  var displayFilterItems = useMemo(function () {
239
239
  var filteredFields = fields.filter(function (field) {
240
- return !nonBusinessFields.includes(field.key);
240
+ return !nonBusinessFields.includes(field.key) && !field.hideInFilter;
241
241
  });
242
242
  if (!currentScheme || currentScheme === 'default') {
243
243
  return filteredFields.map(function (f) {
@@ -51,6 +51,7 @@ export interface FieldDefinition {
51
51
  width?: number;
52
52
  fixed?: 'left' | 'right';
53
53
  ellipsis?: boolean;
54
+ hideInFilter?: boolean;
54
55
  }
55
56
  export interface PaginationConfig {
56
57
  current: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@donglegeyu/company-ui",
3
- "version": "1.2.21",
3
+ "version": "1.2.23",
4
4
  "main": "dist/cjs/index.js",
5
5
  "module": "dist/es/index.js",
6
6
  "types": "dist/es/index.d.ts",