@platox/pivot-table 0.0.44 → 0.0.46

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.
Files changed (38) hide show
  1. package/es/dashboard-workbench/components/add-module-modal/add-chart-modal/index.js +17 -13
  2. package/es/dashboard-workbench/components/add-module-modal/add-chart-modal/index.js.map +1 -1
  3. package/es/dashboard-workbench/components/add-module-modal/add-statistics-modal/custome-styles.js +29 -23
  4. package/es/dashboard-workbench/components/add-module-modal/add-statistics-modal/custome-styles.js.map +1 -1
  5. package/es/dashboard-workbench/components/add-module-modal/components/condition-modal/EnumSelect.d.ts +15 -0
  6. package/es/dashboard-workbench/components/add-module-modal/components/condition-modal/EnumSelect.js +89 -0
  7. package/es/dashboard-workbench/components/add-module-modal/components/condition-modal/EnumSelect.js.map +1 -0
  8. package/es/dashboard-workbench/components/add-module-modal/components/condition-modal/config.js +9 -6
  9. package/es/dashboard-workbench/components/add-module-modal/components/condition-modal/config.js.map +1 -1
  10. package/es/dashboard-workbench/components/add-module-modal/components/condition-modal/index.js +31 -28
  11. package/es/dashboard-workbench/components/add-module-modal/components/condition-modal/index.js.map +1 -1
  12. package/es/dashboard-workbench/components/global-filter-condition/ConditionSymbolAndValuePicker.d.ts +6 -2
  13. package/es/dashboard-workbench/components/global-filter-condition/ConditionSymbolAndValuePicker.js +36 -12
  14. package/es/dashboard-workbench/components/global-filter-condition/ConditionSymbolAndValuePicker.js.map +1 -1
  15. package/es/dashboard-workbench/components/global-filter-condition/index.js +1 -1
  16. package/es/dashboard-workbench/components/global-filter-condition/index.js.map +1 -1
  17. package/es/dashboard-workbench/components/module-content/statistics-module/index.js +7 -12
  18. package/es/dashboard-workbench/components/module-content/statistics-module/index.js.map +1 -1
  19. package/es/dashboard-workbench/components/module-content/utils.js +51 -12
  20. package/es/dashboard-workbench/components/module-content/utils.js.map +1 -1
  21. package/es/dashboard-workbench/context.d.ts +1 -0
  22. package/es/dashboard-workbench/context.js.map +1 -1
  23. package/es/dashboard-workbench/index.d.ts +1 -0
  24. package/es/dashboard-workbench/index.js +1 -0
  25. package/es/dashboard-workbench/index.js.map +1 -1
  26. package/es/dashboard-workbench/lang/en-US.d.ts +5 -0
  27. package/es/dashboard-workbench/lang/en-US.js +7 -2
  28. package/es/dashboard-workbench/lang/en-US.js.map +1 -1
  29. package/es/dashboard-workbench/lang/zh-CN.d.ts +5 -0
  30. package/es/dashboard-workbench/lang/zh-CN.js +7 -2
  31. package/es/dashboard-workbench/lang/zh-CN.js.map +1 -1
  32. package/es/dashboard-workbench/utils/index.js +1 -0
  33. package/es/dashboard-workbench/utils/index.js.map +1 -1
  34. package/package.json +1 -1
  35. package/umd/pivot-table.umd.cjs +45 -45
  36. package/es/dashboard-workbench/components/add-module-modal/components/condition-modal/debounce-select.d.ts +0 -12
  37. package/es/dashboard-workbench/components/add-module-modal/components/condition-modal/debounce-select.js +0 -44
  38. package/es/dashboard-workbench/components/add-module-modal/components/condition-modal/debounce-select.js.map +0 -1
@@ -1,12 +0,0 @@
1
- import { default as React } from 'react';
2
- import { SelectProps } from 'antd';
3
- export interface DebounceSelectProps<ValueType = any> extends Omit<SelectProps<ValueType | ValueType[]>, 'options' | 'children'> {
4
- fetchOptions: (search: string) => Promise<ValueType[]>;
5
- debounceTimeout?: number;
6
- }
7
- declare function DebounceSelect<ValueType extends {
8
- key?: string;
9
- label: React.ReactNode;
10
- value: string | number;
11
- } = any>({ fetchOptions, debounceTimeout, ...props }: DebounceSelectProps<ValueType>): import("react/jsx-runtime").JSX.Element;
12
- export default DebounceSelect;
@@ -1,44 +0,0 @@
1
- import { jsx } from "react/jsx-runtime";
2
- import { useState, useRef, useMemo, useEffect } from "react";
3
- import { Select, Spin } from "antd";
4
- import { debounce } from "lodash-es";
5
- function DebounceSelect({ fetchOptions, debounceTimeout = 800, ...props }) {
6
- const [fetching, setFetching] = useState(false);
7
- const [options, setOptions] = useState([]);
8
- const fetchRef = useRef(0);
9
- const debounceFetcher = useMemo(() => {
10
- const loadOptions = (value) => {
11
- fetchRef.current += 1;
12
- const fetchId = fetchRef.current;
13
- setOptions([]);
14
- setFetching(true);
15
- fetchOptions(value).then((newOptions) => {
16
- if (fetchId !== fetchRef.current) {
17
- return;
18
- }
19
- setOptions(newOptions);
20
- setFetching(false);
21
- });
22
- };
23
- return debounce(loadOptions, debounceTimeout);
24
- }, [fetchOptions, debounceTimeout]);
25
- useEffect(() => {
26
- debounceFetcher("");
27
- }, []);
28
- return /* @__PURE__ */ jsx(
29
- Select,
30
- {
31
- labelInValue: true,
32
- showSearch: true,
33
- filterOption: false,
34
- onSearch: debounceFetcher,
35
- notFoundContent: fetching ? /* @__PURE__ */ jsx(Spin, { size: "small" }) : null,
36
- ...props,
37
- options
38
- }
39
- );
40
- }
41
- export {
42
- DebounceSelect as default
43
- };
44
- //# sourceMappingURL=debounce-select.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"debounce-select.js","sources":["../../../../../../packages/dashboard-workbench/components/add-module-modal/components/condition-modal/debounce-select.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport React, { useEffect, useMemo, useRef, useState } from 'react'\nimport { Select, Spin, type SelectProps } from 'antd'\nimport { debounce } from 'lodash-es'\n\nexport interface DebounceSelectProps<ValueType = any>\n extends Omit<SelectProps<ValueType | ValueType[]>, 'options' | 'children'> {\n fetchOptions: (search: string) => Promise<ValueType[]>\n debounceTimeout?: number\n}\n\nfunction DebounceSelect<\n ValueType extends {\n key?: string\n label: React.ReactNode\n value: string | number\n } = any,\n>({ fetchOptions, debounceTimeout = 800, ...props }: DebounceSelectProps<ValueType>) {\n const [fetching, setFetching] = useState(false)\n const [options, setOptions] = useState<ValueType[]>([])\n const fetchRef = useRef(0)\n\n const debounceFetcher = useMemo(() => {\n const loadOptions = (value: string) => {\n fetchRef.current += 1\n const fetchId = fetchRef.current\n setOptions([])\n setFetching(true)\n\n fetchOptions(value).then(newOptions => {\n if (fetchId !== fetchRef.current) {\n // for fetch callback order\n return\n }\n setOptions(newOptions)\n setFetching(false)\n })\n }\n\n return debounce(loadOptions, debounceTimeout)\n }, [fetchOptions, debounceTimeout])\n\n useEffect(() => {\n debounceFetcher('')\n }, [])\n\n return (\n <Select\n labelInValue\n showSearch\n filterOption={false}\n onSearch={debounceFetcher}\n notFoundContent={fetching ? <Spin size=\"small\" /> : null}\n {...props}\n options={options}\n />\n )\n}\n\nexport default DebounceSelect\n"],"names":[],"mappings":";;;;AAWA,SAAS,eAMP,EAAE,cAAc,kBAAkB,KAAK,GAAG,SAAyC;AACnF,QAAM,CAAC,UAAU,WAAW,IAAI,SAAS,KAAK;AAC9C,QAAM,CAAC,SAAS,UAAU,IAAI,SAAsB,CAAA,CAAE;AAChD,QAAA,WAAW,OAAO,CAAC;AAEnB,QAAA,kBAAkB,QAAQ,MAAM;AAC9B,UAAA,cAAc,CAAC,UAAkB;AACrC,eAAS,WAAW;AACpB,YAAM,UAAU,SAAS;AACzB,iBAAW,CAAA,CAAE;AACb,kBAAY,IAAI;AAEH,mBAAA,KAAK,EAAE,KAAK,CAAc,eAAA;AACjC,YAAA,YAAY,SAAS,SAAS;AAEhC;AAAA,QAAA;AAEF,mBAAW,UAAU;AACrB,oBAAY,KAAK;AAAA,MAAA,CAClB;AAAA,IACH;AAEO,WAAA,SAAS,aAAa,eAAe;AAAA,EAAA,GAC3C,CAAC,cAAc,eAAe,CAAC;AAElC,YAAU,MAAM;AACd,oBAAgB,EAAE;AAAA,EACpB,GAAG,EAAE;AAGH,SAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,cAAY;AAAA,MACZ,YAAU;AAAA,MACV,cAAc;AAAA,MACd,UAAU;AAAA,MACV,iBAAiB,WAAW,oBAAC,MAAK,EAAA,MAAK,QAAQ,CAAA,IAAK;AAAA,MACnD,GAAG;AAAA,MACJ;AAAA,IAAA;AAAA,EACF;AAEJ;"}