@univerjs-pro/sheets-pivot-ui 0.16.1 → 0.17.0

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 (60) hide show
  1. package/lib/cjs/index.js +1 -1
  2. package/lib/cjs/locale/ca-ES.js +1 -1
  3. package/lib/cjs/locale/en-US.js +1 -1
  4. package/lib/cjs/locale/es-ES.js +1 -1
  5. package/lib/cjs/locale/fa-IR.js +1 -1
  6. package/lib/cjs/locale/fr-FR.js +1 -1
  7. package/lib/cjs/locale/ja-JP.js +1 -1
  8. package/lib/cjs/locale/ko-KR.js +1 -1
  9. package/lib/cjs/locale/ru-RU.js +1 -1
  10. package/lib/cjs/locale/sk-SK.js +1 -1
  11. package/lib/cjs/locale/vi-VN.js +1 -1
  12. package/lib/cjs/locale/zh-CN.js +1 -1
  13. package/lib/cjs/locale/zh-TW.js +1 -1
  14. package/lib/es/index.js +1 -1
  15. package/lib/es/locale/ca-ES.js +1 -1
  16. package/lib/es/locale/en-US.js +1 -1
  17. package/lib/es/locale/es-ES.js +1 -1
  18. package/lib/es/locale/fa-IR.js +1 -1
  19. package/lib/es/locale/fr-FR.js +1 -1
  20. package/lib/es/locale/ja-JP.js +1 -1
  21. package/lib/es/locale/ko-KR.js +1 -1
  22. package/lib/es/locale/ru-RU.js +1 -1
  23. package/lib/es/locale/sk-SK.js +1 -1
  24. package/lib/es/locale/vi-VN.js +1 -1
  25. package/lib/es/locale/zh-CN.js +1 -1
  26. package/lib/es/locale/zh-TW.js +1 -1
  27. package/lib/index.css +1 -1
  28. package/lib/index.js +1 -1
  29. package/lib/locale/ca-ES.js +1 -1
  30. package/lib/locale/en-US.js +1 -1
  31. package/lib/locale/es-ES.js +1 -1
  32. package/lib/locale/fa-IR.js +1 -1
  33. package/lib/locale/fr-FR.js +1 -1
  34. package/lib/locale/ja-JP.js +1 -1
  35. package/lib/locale/ko-KR.js +1 -1
  36. package/lib/locale/ru-RU.js +1 -1
  37. package/lib/locale/sk-SK.js +1 -1
  38. package/lib/locale/vi-VN.js +1 -1
  39. package/lib/locale/zh-CN.js +1 -1
  40. package/lib/locale/zh-TW.js +1 -1
  41. package/lib/types/plugin.d.ts +2 -0
  42. package/lib/types/views/components/PivotDnd.d.ts +60 -0
  43. package/lib/types/views/components/PivotPanel.d.ts +3 -3
  44. package/lib/types/views/components/PivotPanelArea.d.ts +0 -6
  45. package/lib/types/views/components/PivotSourceList.d.ts +0 -6
  46. package/lib/types/views/components/util.d.ts +0 -7
  47. package/lib/umd/index.js +1 -1
  48. package/lib/umd/locale/ca-ES.js +1 -1
  49. package/lib/umd/locale/en-US.js +1 -1
  50. package/lib/umd/locale/es-ES.js +1 -1
  51. package/lib/umd/locale/fa-IR.js +1 -1
  52. package/lib/umd/locale/fr-FR.js +1 -1
  53. package/lib/umd/locale/ja-JP.js +1 -1
  54. package/lib/umd/locale/ko-KR.js +1 -1
  55. package/lib/umd/locale/ru-RU.js +1 -1
  56. package/lib/umd/locale/sk-SK.js +1 -1
  57. package/lib/umd/locale/vi-VN.js +1 -1
  58. package/lib/umd/locale/zh-CN.js +1 -1
  59. package/lib/umd/locale/zh-TW.js +1 -1
  60. package/package.json +14 -17
@@ -1 +1 @@
1
- function _0x11a5(_0x30cbae,_0x2209c0){_0x30cbae=_0x30cbae-0xe7;const _0x1fe2c5=_0x1fe2();let _0x11a517=_0x1fe2c5[_0x30cbae];return _0x11a517;}const _0x4974cd=_0x11a5;(function(_0x51b777,_0x29c09a){const _0x330890=_0x11a5,_0xd8fc44=_0x51b777();while(!![]){try{const _0x15ede1=parseInt(_0x330890(0xfe))/0x1*(parseInt(_0x330890(0x118))/0x2)+parseInt(_0x330890(0x10b))/0x3*(parseInt(_0x330890(0x10f))/0x4)+-parseInt(_0x330890(0x103))/0x5+-parseInt(_0x330890(0x101))/0x6+-parseInt(_0x330890(0xea))/0x7+parseInt(_0x330890(0xf2))/0x8*(parseInt(_0x330890(0x108))/0x9)+parseInt(_0x330890(0xff))/0xa*(parseInt(_0x330890(0x104))/0xb);if(_0x15ede1===_0x29c09a)break;else _0xd8fc44['push'](_0xd8fc44['shift']());}catch(_0x57c165){_0xd8fc44['push'](_0xd8fc44['shift']());}}}(_0x1fe2,0x41efc));function _0x1fe2(){const _0x597a62=['常規格式不包含任何特定的數字格式。','新工作表','數據源','小數位數','千分位符','無法編輯受保護的工作表中的數據透視表','288646SwYela','總體方差','資料透視表','移除字段','現有工作表','2550212tpMBMs','清除篩選','合併單元格無法插入數據透視表','移動到列','添加到值','日期類型','添加到列','數據源範圍','4592vdiowl','篩選字段','總體標準差','無法對所選單元格進行此更改,因為它會影響資料透視表。請使用字段列表更改報表。如果您試圖插入或刪除單元格,請移動資料透視表,然後再試。','標準差','(空白)','平均值','字段設置','匯總方式','拖動字段填充為欄','拖動字段到以下區域','插入數據透視表','1IsniII','6017380lWcKhP','負數類型','2376540FjSBKD','數據源已經更新','1821460kyPZHv','11eAPRCO','請選擇數據源','千分位符格式用於一般數字的表示,貨幣和會計格式則提供貨幣值計算的專用格式。','列和欄的計算結果','5319dxmEJl','目標區域中已有數據,該操作將覆蓋原有數據,是否繼續?','無法編輯數據透視表中的單元格','928437STRPWP','移動到欄','添加到篩選','數值計數','4lgDZpo','拖動字段填充為列','數據源字段'];_0x1fe2=function(){return _0x597a62;};return _0x1fe2();}const e={'sheets-pivot-panel':{'title':_0x4974cd(0xe7),'sourceRangeLabel':_0x4974cd(0x114),'sourceRangePlaceholder':_0x4974cd(0x102),'sourceFieldTile':_0x4974cd(0x111),'sourceFieldDescription':_0x4974cd(0xfc),'filter':'篩選','column':'欄','row':'列','value':'值','multipleValue':'Σ數值','filterDesc':'拖入字段篩選數據','columnDesc':_0x4974cd(0xfb),'rowDesc':_0x4974cd(0x110),'valueDesc':_0x4974cd(0x107),'addToFilter':_0x4974cd(0x10d),'addToColumn':'添加到欄','addToRow':_0x4974cd(0xf0),'addToValue':_0x4974cd(0xee),'removeField':_0x4974cd(0xe8),'filterField':_0x4974cd(0xf3),'fieldSettings':_0x4974cd(0xf9),'moveToRow':_0x4974cd(0xed),'moveToColumn':_0x4974cd(0x10c),'dialog':{'fieldName':'字段名稱','sourceName':'源字段名:','summarizeBy':_0x4974cd(0xfa),'format':'數字格式','ok':'確定','cancel':'取消','filter':{'ascending':'升序','descending':'降序','selectAll':'全選','clearFilter':_0x4974cd(0xeb),'blank':_0x4974cd(0xf7),'cancel':'取消','confirm':'確定'},'numfmt':{'general':'常規','accounting':'會計','currency':'貨幣','date':'日期','thousandthPercentile':_0x4974cd(0x116),'fieldSetting':'字段設置','formatTypes':'格式類型','confirm':'確定','cancel':'取消','generalDesc':_0x4974cd(0x112),'accountingDesc':'會計數字格式可對一欄數值進行貨幣符號和小數點對齊。','currencyDesc':'貨幣格式用於表示一般貨幣數值,會計格式可以對一欄數值進行小數點對齊。','dateDesc':'日期格式將日期和時間系列數值顯示為日期值。','thousandthPercentileDesc':_0x4974cd(0x106),'decimalPlaces':_0x4974cd(0x115),'currencyTypes':'貨幣類型','negativeNumberTypes':_0x4974cd(0x100),'dateTypes':_0x4974cd(0xef)},'source':{'insertPivotTable':_0x4974cd(0xfd),'sourceData':_0x4974cd(0xf1),'position':'透視表放置位置','newSheet':_0x4974cd(0x113),'existingSheet':_0x4974cd(0xe9),'intersect':'不能和源數據重疊'}},'subtotal':{'average':_0x4974cd(0xf8),'count':'計數','countNums':_0x4974cd(0x10e),'max':'最大值','min':'最小值','product':'乘積','stdDev':_0x4974cd(0xf6),'stdDevp':_0x4974cd(0xf4),'sum':'求和','var':'方差','varp':_0x4974cd(0x119)},'subTotalText':'匯總','grandTotalText':'總計','perform':{'tips':'提示','info':_0x4974cd(0x109),'confirm':'確認','cancel':'取消','rowColError':_0x4974cd(0xf5)},'msg':{'emptySourceRange':_0x4974cd(0x105),'invalidSize':'無效的數據大小','mergeCellError':_0x4974cd(0xec),'editCellError':_0x4974cd(0x10a),'permissionError':_0x4974cd(0x117)}}};export{e as default};
1
+ const _0x4ac805=_0x1c0f;function _0x1c0f(_0x3a978a,_0x2fddbb){_0x3a978a=_0x3a978a-0xd0;const _0x26c96e=_0x26c9();let _0x1c0f00=_0x26c96e[_0x3a978a];return _0x1c0f00;}function _0x26c9(){const _0x3256c6=['會計數字格式可對一欄數值進行貨幣符號和小數點對齊。','無法編輯受保護的工作表中的數據透視表','拖動字段到以下區域','目標區域中已有數據,該操作將覆蓋原有數據,是否繼續?','無法對所選單元格進行此更改,因為它會影響資料透視表。請使用字段列表更改報表。如果您試圖插入或刪除單元格,請移動資料透視表,然後再試。','添加到欄','移動到列','152736EzDpGO','匯總方式','不能和源數據重疊','拖動字段填充為欄','字段名稱','列和欄的計算結果','最小值','(空白)','數值計數','字段設置','現有工作表','常規格式不包含任何特定的數字格式。','請選擇數據源','拖動字段填充為列','格式類型','數字格式','數據源範圍','平均值','5401YLvZPF','191619iUhWjY','數據源','Σ數值','4973478eLSpxy','最大值','移除字段','6eaRgSs','篩選字段','插入數據透視表','清除篩選','6tHWoxY','數據源字段','添加到篩選','日期格式將日期和時間系列數值顯示為日期值。','4377540FuNyia','新工作表','千分位符','貨幣類型','標準差','190769kozCVJ','4ncCQBU','源字段名:','移動到欄','無效的數據大小','11552320jDWPQN','總體標準差','資料透視表','430JMGrOS','數據源已經更新','11718329csnyTS'];_0x26c9=function(){return _0x3256c6;};return _0x26c9();}(function(_0x56a68c,_0x538a74){const _0x2e567c=_0x1c0f,_0x29709f=_0x56a68c();while(!![]){try{const _0x591850=-parseInt(_0x2e567c(0xd7))/0x1*(-parseInt(_0x2e567c(0x106))/0x2)+-parseInt(_0x2e567c(0xff))/0x3*(-parseInt(_0x2e567c(0xd8))/0x4)+parseInt(_0x2e567c(0xd2))/0x5+-parseInt(_0x2e567c(0x102))/0x6*(-parseInt(_0x2e567c(0xe1))/0x7)+parseInt(_0x2e567c(0xdc))/0x8+-parseInt(_0x2e567c(0xfc))/0x9*(-parseInt(_0x2e567c(0xdf))/0xa)+-parseInt(_0x2e567c(0xfb))/0xb*(parseInt(_0x2e567c(0xe9))/0xc);if(_0x591850===_0x538a74)break;else _0x29709f['push'](_0x29709f['shift']());}catch(_0x1e551c){_0x29709f['push'](_0x29709f['shift']());}}}(_0x26c9,0xd93c1));const e={'sheets-pivot-panel':{'title':_0x4ac805(0xde),'sourceRangeLabel':_0x4ac805(0xfd),'sourceRangePlaceholder':_0x4ac805(0xe0),'sourceFieldTile':_0x4ac805(0x107),'sourceFieldDescription':_0x4ac805(0xe4),'filter':'篩選','column':'欄','row':'列','value':'值','multipleValue':_0x4ac805(0xfe),'filterDesc':'拖入字段篩選數據','columnDesc':_0x4ac805(0xec),'rowDesc':_0x4ac805(0xf6),'valueDesc':_0x4ac805(0xee),'addToFilter':_0x4ac805(0xd0),'addToColumn':_0x4ac805(0xe7),'addToRow':'添加到列','addToValue':'添加到值','removeField':_0x4ac805(0x101),'filterField':_0x4ac805(0x103),'fieldSettings':_0x4ac805(0xf2),'moveToRow':_0x4ac805(0xe8),'moveToColumn':_0x4ac805(0xda),'dialog':{'fieldName':_0x4ac805(0xed),'sourceName':_0x4ac805(0xd9),'summarizeBy':_0x4ac805(0xea),'format':_0x4ac805(0xf8),'ok':'確定','cancel':'取消','filter':{'ascending':'升序','descending':'降序','selectAll':'全選','clearFilter':_0x4ac805(0x105),'blank':_0x4ac805(0xf0),'cancel':'取消','confirm':'確定'},'numfmt':{'general':'常規','accounting':'會計','currency':'貨幣','date':'日期','thousandthPercentile':_0x4ac805(0xd4),'fieldSetting':_0x4ac805(0xf2),'formatTypes':_0x4ac805(0xf7),'confirm':'確定','cancel':'取消','generalDesc':_0x4ac805(0xf4),'accountingDesc':_0x4ac805(0xe2),'currencyDesc':'貨幣格式用於表示一般貨幣數值,會計格式可以對一欄數值進行小數點對齊。','dateDesc':_0x4ac805(0xd1),'thousandthPercentileDesc':'千分位符格式用於一般數字的表示,貨幣和會計格式則提供貨幣值計算的專用格式。','decimalPlaces':'小數位數','currencyTypes':_0x4ac805(0xd5),'negativeNumberTypes':'負數類型','dateTypes':'日期類型'},'source':{'insertPivotTable':_0x4ac805(0x104),'sourceData':_0x4ac805(0xf9),'position':'透視表放置位置','newSheet':_0x4ac805(0xd3),'existingSheet':_0x4ac805(0xf3),'intersect':_0x4ac805(0xeb)}},'subtotal':{'average':_0x4ac805(0xfa),'count':'計數','countNums':_0x4ac805(0xf1),'max':_0x4ac805(0x100),'min':_0x4ac805(0xef),'product':'乘積','stdDev':_0x4ac805(0xd6),'stdDevp':_0x4ac805(0xdd),'sum':'求和','var':'方差','varp':'總體方差'},'subTotalText':'匯總','grandTotalText':'總計','perform':{'tips':'提示','info':_0x4ac805(0xe5),'confirm':'確認','cancel':'取消','rowColError':_0x4ac805(0xe6)},'msg':{'emptySourceRange':_0x4ac805(0xf5),'invalidSize':_0x4ac805(0xdb),'mergeCellError':'合併單元格無法插入數據透視表','editCellError':'無法編輯數據透視表中的單元格','permissionError':_0x4ac805(0xe3)}}};export{e as default};
@@ -8,6 +8,8 @@ export declare class UniverSheetsPivotTableUIPlugin extends Plugin {
8
8
  private readonly _renderManagerService;
9
9
  private readonly _configService;
10
10
  static pluginName: string;
11
+ static packageName: string;
12
+ static version: string;
11
13
  static type: UniverInstanceType;
12
14
  constructor(_config: Partial<IUniverSheetsPivotUIConfig> | undefined, _injector: Injector, _commandService: ICommandService, _renderManagerService: IRenderManagerService, _configService: IConfigService);
13
15
  onStarting(): void;
@@ -0,0 +1,60 @@
1
+ import { CSSProperties, HTMLAttributes, ReactNode } from 'react';
2
+ export interface IDraggableLocation {
3
+ droppableId: string;
4
+ index: number;
5
+ }
6
+ export interface IDragStart {
7
+ draggableId: string;
8
+ source: IDraggableLocation;
9
+ }
10
+ export interface IDragUpdate {
11
+ draggableId: string;
12
+ source: IDraggableLocation;
13
+ destination: IDraggableLocation | null;
14
+ }
15
+ export interface IDropResult {
16
+ draggableId: string;
17
+ source: IDraggableLocation;
18
+ destination: IDraggableLocation | null;
19
+ reason: 'DROP' | 'CANCEL';
20
+ }
21
+ interface IDragDropContextProps {
22
+ children: ReactNode;
23
+ onDragStart?: (start: IDragStart) => void;
24
+ onDragUpdate?: (update: IDragUpdate) => void;
25
+ onDragEnd?: (result: IDropResult) => void | Promise<void>;
26
+ }
27
+ interface IDroppableProps {
28
+ droppableId: string;
29
+ isDropDisabled?: boolean;
30
+ direction?: 'vertical' | 'horizontal';
31
+ isCombineEnabled?: boolean;
32
+ ignoreContainerClipping?: boolean;
33
+ children: (provided: {
34
+ innerRef: (element: HTMLDivElement | null) => void;
35
+ droppableProps: HTMLAttributes<HTMLDivElement>;
36
+ placeholder: ReactNode;
37
+ }, snapshot: {
38
+ isDraggingOver: boolean;
39
+ }) => ReactNode;
40
+ }
41
+ interface IDraggableProps {
42
+ draggableId: string;
43
+ index: number;
44
+ isDragDisabled?: boolean;
45
+ children: (provided: {
46
+ innerRef: (element: HTMLDivElement | null) => void;
47
+ draggableProps: HTMLAttributes<HTMLDivElement> & {
48
+ style?: CSSProperties;
49
+ draggable?: boolean;
50
+ };
51
+ dragHandleProps: HTMLAttributes<HTMLDivElement>;
52
+ }, snapshot: {
53
+ isDragging: boolean;
54
+ draggingOver?: string;
55
+ }) => ReactNode;
56
+ }
57
+ export declare function DragDropContext(props: IDragDropContextProps): import("react/jsx-runtime").JSX.Element;
58
+ export declare function Droppable(props: IDroppableProps): import("react/jsx-runtime").JSX.Element;
59
+ export declare function Draggable(props: IDraggableProps): ReactNode;
60
+ export {};
@@ -1,6 +1,6 @@
1
1
  import { IPivotPanelDataInfo } from '@univerjs-pro/sheets-pivot';
2
2
  import { Nullable } from '@univerjs/core';
3
- import { DraggableLocation } from 'react-beautiful-dnd';
3
+ import { IDraggableLocation } from './PivotDnd';
4
4
  interface IPivotPanelProps {
5
5
  pivotTableId: string;
6
6
  version: number;
@@ -11,8 +11,8 @@ interface IPivotPanelProps {
11
11
  }
12
12
  export type IDraggingInfo = Nullable<{
13
13
  draggingId: string;
14
- destination?: Nullable<DraggableLocation>;
15
- source?: Nullable<DraggableLocation>;
14
+ destination?: Nullable<IDraggableLocation>;
15
+ source?: Nullable<IDraggableLocation>;
16
16
  }>;
17
17
  export declare function PivotPanel(props: IPivotPanelProps): import("react/jsx-runtime").JSX.Element | null;
18
18
  export {};
@@ -1,5 +1,4 @@
1
1
  import { IPivotPanelDataInfo, IPivotPanelTableListItemBase, IPivotTableConfig } from '@univerjs-pro/sheets-pivot';
2
- import { IDraggingInfo } from './PivotPanel';
3
2
  import { PivotPanelAreaType } from './util';
4
3
  interface IPivotFieldAreaItemProps {
5
4
  areaType: PivotPanelAreaType;
@@ -7,12 +6,7 @@ interface IPivotFieldAreaItemProps {
7
6
  positionInfo: IPivotTableConfig['targetCellInfo'];
8
7
  pivotTableId: string;
9
8
  pivotTableInfo: IPivotPanelDataInfo;
10
- containerOffset: {
11
- top: number;
12
- left: number;
13
- };
14
9
  refreshHandler: () => void;
15
- draggingInfo: IDraggingInfo;
16
10
  }
17
11
  export declare function PivotFieldAreaItem(props: IPivotFieldAreaItemProps): import("react/jsx-runtime").JSX.Element;
18
12
  export {};
@@ -1,5 +1,4 @@
1
1
  import { IPivotPanelDataInfo, IPivotPanelSourceList } from '@univerjs-pro/sheets-pivot';
2
- import { RefObject } from 'react';
3
2
  interface IPivotSourceListProps {
4
3
  sourceList: IPivotPanelSourceList[];
5
4
  refreshHandler: () => void;
@@ -7,12 +6,7 @@ interface IPivotSourceListProps {
7
6
  pivotTableInfo: IPivotPanelDataInfo;
8
7
  unitId: string;
9
8
  subUnitId: string;
10
- sourceRef: RefObject<HTMLDivElement>;
11
9
  draggingId: string;
12
- containerOffset: {
13
- top: number;
14
- left: number;
15
- };
16
10
  }
17
11
  export declare function PivotSourceList(props: IPivotSourceListProps): import("react/jsx-runtime").JSX.Element;
18
12
  export {};
@@ -1,7 +1,6 @@
1
1
  import { IPivotTableFilterInfo, PivotSubtotalTypeEnum, PivotTableFiledAreaEnum, PivotTableValuePositionEnum } from '@univerjs-pro/engine-pivot';
2
2
  import { IPivotPanelDataInfo, IUnitRangeNameWithSubUnitId } from '@univerjs-pro/sheets-pivot';
3
3
  import { ICommandService, IRange, Nullable, Worksheet } from '@univerjs/core';
4
- import { DraggingStyle, NotDraggingStyle } from 'react-beautiful-dnd';
5
4
  import { PivotFilterStatus } from '../../const';
6
5
  export declare const PivotDropId = "PivotDropId";
7
6
  export declare const PivotMultipleValueId = "PivotMultipleValueId";
@@ -18,7 +17,6 @@ export declare enum PivotPanelAreaType {
18
17
  Value = "value",
19
18
  Source = "source"
20
19
  }
21
- export declare function getDraggedStyle(isDragging: boolean): React.CSSProperties;
22
20
  interface IPivotPanelDragCtx {
23
21
  pivotTableInfo: IPivotPanelDataInfo;
24
22
  pivotTableId: string;
@@ -75,9 +73,4 @@ export declare const getPrefixName: (baseName: string, textInfo: Record<string,
75
73
  export declare function getPivotFilterStatus(filterInfo: Nullable<IPivotTableFilterInfo>, additionalParams: {
76
74
  items?: string[];
77
75
  }): PivotFilterStatus;
78
- export declare const getDraggingCorrectedStyle: (isDragging: boolean, style: DraggingStyle | NotDraggingStyle | undefined, containerOffset: {
79
- top: number;
80
- left: number;
81
- }) => React.CSSProperties | null;
82
- export declare const getNotDraggedStyle: (draggableId: string, currentId: string) => React.CSSProperties | null;
83
76
  export {};