@ai-table/grid 0.1.23 → 0.1.24

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 (50) hide show
  1. package/{constants/editor.d.ts → components/cell-editors/index.d.ts} +1 -1
  2. package/components/cell-editors/index.d.ts.map +1 -0
  3. package/components/drag/drag.component.d.ts.map +1 -1
  4. package/components/stat-type-menu/stat-type-menucomponent.d.ts +1 -0
  5. package/components/stat-type-menu/stat-type-menucomponent.d.ts.map +1 -1
  6. package/constants/field-stat.d.ts +3 -0
  7. package/constants/field-stat.d.ts.map +1 -0
  8. package/constants/index.d.ts +0 -1
  9. package/constants/index.d.ts.map +1 -1
  10. package/constants/table.d.ts +4 -0
  11. package/constants/table.d.ts.map +1 -1
  12. package/core/coordinate.d.ts.map +1 -1
  13. package/core/utils/field.d.ts +1 -1
  14. package/fesm2022/ai-table-grid.mjs +873 -421
  15. package/fesm2022/ai-table-grid.mjs.map +1 -1
  16. package/grid.component.d.ts.map +1 -1
  17. package/package.json +1 -1
  18. package/renderer/components/background.component.d.ts +37 -0
  19. package/renderer/components/background.component.d.ts.map +1 -0
  20. package/renderer/components/cells/link.component.d.ts.map +1 -1
  21. package/renderer/components/cells/rich-text.component.d.ts.map +1 -1
  22. package/renderer/components/field-head.component.d.ts.map +1 -1
  23. package/renderer/components/field-stat/stat.component.d.ts +29 -28
  24. package/renderer/components/field-stat/stat.component.d.ts.map +1 -1
  25. package/renderer/components/field-stat/stats.component.d.ts +6 -1
  26. package/renderer/components/field-stat/stats.component.d.ts.map +1 -1
  27. package/renderer/components/frozen-heads.component.d.ts +1 -1
  28. package/renderer/components/frozen-heads.component.d.ts.map +1 -1
  29. package/renderer/components/index.d.ts +1 -0
  30. package/renderer/components/index.d.ts.map +1 -1
  31. package/renderer/creations/create-cells.d.ts.map +1 -1
  32. package/renderer/creations/create-stats.d.ts.map +1 -1
  33. package/renderer/drawers/add-row-layout-drawer.d.ts +1 -1
  34. package/renderer/drawers/add-row-layout-drawer.d.ts.map +1 -1
  35. package/renderer/renderer.component.d.ts +20 -2
  36. package/renderer/renderer.component.d.ts.map +1 -1
  37. package/types/cell.d.ts +1 -0
  38. package/types/cell.d.ts.map +1 -1
  39. package/types/component-config.d.ts +31 -0
  40. package/types/component-config.d.ts.map +1 -1
  41. package/utils/clipboard/paste.d.ts.map +1 -1
  42. package/utils/field/model/date.d.ts +1 -0
  43. package/utils/field/model/date.d.ts.map +1 -1
  44. package/utils/field-stat.d.ts +7 -0
  45. package/utils/field-stat.d.ts.map +1 -0
  46. package/utils/i18n.d.ts +58 -1
  47. package/utils/i18n.d.ts.map +1 -1
  48. package/utils/index.d.ts +1 -0
  49. package/utils/index.d.ts.map +1 -1
  50. package/constants/editor.d.ts.map +0 -1
@@ -25,7 +25,7 @@ import { Transformer } from 'konva/lib/shapes/Transformer';
25
25
  import { Wedge } from 'konva/lib/shapes/Wedge';
26
26
  import * as i1$1 from 'ngx-tethys/popover';
27
27
  import { ThyPopoverRef, ThyPopover, ThyPopoverModule } from 'ngx-tethys/popover';
28
- import { AITableFieldGroup, AITableFieldType, AITableRowColumnType, DragType, isUndefinedOrNull, idCreator as idCreator$1, isUrl, AITableSelectOptionStyle, isEmpty, AITableFilterOperation, AttachmentFieldBase, DateFieldBase, isDateValid, isDateAndReturnDate, LinkFieldBase, MemberFieldBase, NumberFieldBase, ProgressFieldBase, isProgressAndReturnValue, RateFieldBase, RichTextFieldBase, SelectFieldBase, generateOptionsByTexts, TextFieldBase, FieldModelBaseMap } from '@ai-table/utils';
28
+ import { AITableFieldGroup, AITableFieldType, AITableRowColumnType, DragType, isUndefinedOrNull, idCreator as idCreator$1, isUrl, AITableSelectOptionStyle, isEmpty, AITableFilterOperation, AttachmentFieldBase, AITableStatType, DateFieldBase, DEFAULT_FIELD_STAT_TYPE_ITEMS, isDateValid, isDateAndReturnDate, LinkFieldBase, MemberFieldBase, NumberFieldBase, ProgressFieldBase, isProgressAndReturnValue, RateFieldBase, RichTextFieldBase, SelectFieldBase, generateOptionsByTexts, TextFieldBase, FieldModelBaseMap } from '@ai-table/utils';
29
29
  import ObjectID from 'bson-objectid';
30
30
  import { customAlphabet } from 'nanoid';
31
31
  import * as _ from 'lodash';
@@ -58,7 +58,7 @@ import { ThySwitch } from 'ngx-tethys/switch';
58
58
  import { of, Subject, fromEvent, debounceTime, mergeWith, animationFrames, filter } from 'rxjs';
59
59
  import { isKeyHotkey } from 'is-hotkey';
60
60
  import { LRUCache } from 'lru-cache';
61
- import { fromUnixTime, subDays } from 'date-fns';
61
+ import { fromUnixTime, subDays, differenceInDays, differenceInMonths } from 'date-fns';
62
62
  import { isArray, TinyDate, helpers } from 'ngx-tethys/util';
63
63
  import { DEFAULT_COLORS } from 'ngx-tethys/color-picker';
64
64
  import GraphemeSplitter from 'grapheme-splitter';
@@ -534,8 +534,16 @@ var AITableGridI18nKey;
534
534
  AITableGridI18nKey["fieldGroupBase"] = "fieldGroupBase";
535
535
  AITableGridI18nKey["fieldGroupAdvanced"] = "fieldGroupAdvanced";
536
536
  AITableGridI18nKey["rowAddFilterTooltip"] = "rowAddFilterTooltip";
537
+ AITableGridI18nKey["earliestTime"] = "earliestTime";
538
+ AITableGridI18nKey["earliestTimeResult"] = "earliestTimeResult";
539
+ AITableGridI18nKey["latestTime"] = "latestTime";
540
+ AITableGridI18nKey["latestTimeResult"] = "latestTimeResult";
541
+ AITableGridI18nKey["dateRangeOfDays"] = "dateRangeOfDays";
542
+ AITableGridI18nKey["dateRangeOfDaysResult"] = "dateRangeOfDaysResult";
543
+ AITableGridI18nKey["dateRangeOfMonths"] = "dateRangeOfMonths";
544
+ AITableGridI18nKey["dateRangeOfMonthsResult"] = "dateRangeOfMonthsResult";
537
545
  })(AITableGridI18nKey || (AITableGridI18nKey = {}));
538
- const AITableI18nText = {
546
+ const AITableGridI18nText = {
539
547
  [AITableGridI18nKey.dataPickerPlaceholder]: '选择日期',
540
548
  [AITableGridI18nKey.linkTooltip]: '链接',
541
549
  [AITableGridI18nKey.invalidLinkFormat]: '链接格式不正确',
@@ -574,10 +582,18 @@ const AITableI18nText = {
574
582
  [AITableGridI18nKey.fieldTypeUpdatedAt]: '更新时间',
575
583
  [AITableGridI18nKey.fieldGroupBase]: '基础',
576
584
  [AITableGridI18nKey.fieldGroupAdvanced]: '高级',
577
- [AITableGridI18nKey.rowAddFilterTooltip]: '本记录已被筛选过滤,点击该记录以外位置将被隐藏'
585
+ [AITableGridI18nKey.rowAddFilterTooltip]: '本记录已被筛选过滤,点击该记录以外位置将被隐藏',
586
+ [AITableGridI18nKey.earliestTime]: '最早时间',
587
+ [AITableGridI18nKey.earliestTimeResult]: '最早时间 {{statValue}}',
588
+ [AITableGridI18nKey.latestTime]: '最晚时间',
589
+ [AITableGridI18nKey.latestTimeResult]: '最晚时间 {{statValue}}',
590
+ [AITableGridI18nKey.dateRangeOfDays]: '时间范围(日)',
591
+ [AITableGridI18nKey.dateRangeOfDaysResult]: '时间范围 {{statValue}} 天',
592
+ [AITableGridI18nKey.dateRangeOfMonths]: '时间范围(月)',
593
+ [AITableGridI18nKey.dateRangeOfMonthsResult]: '时间范围 {{statValue}} 月'
578
594
  };
579
595
  const getDefaultI18nTextByKey = (key) => {
580
- return AITableI18nText[key] || key;
596
+ return AITableGridI18nText[key] || key;
581
597
  };
582
598
  const getI18nTextByKey = (aiTable, key) => {
583
599
  if (aiTable.getI18nTextByKey) {
@@ -716,6 +732,260 @@ function getFieldOptionMap(aiTable) {
716
732
  return aiTable.context?.fieldOptionMap();
717
733
  }
718
734
 
735
+ const Colors = {
736
+ primary: '#6698FF',
737
+ gray100: '#f5f5f5',
738
+ gray200: '#eee',
739
+ gray300: '#ddd',
740
+ gray800: '#333',
741
+ gray600: '#999',
742
+ gray700: '#666',
743
+ white: '#fff',
744
+ black: '#000',
745
+ transparent: 'transparent',
746
+ gray80: '#fafafa',
747
+ headSelectedBgColor: '#EAEFFA',
748
+ itemActiveBgColor: '#6698ff1a',
749
+ itemMatchBgColor: '#ff9f731a',
750
+ waring: '#ffcd5d',
751
+ success: '#73d897',
752
+ danger: '#ff5b57'
753
+ };
754
+
755
+ var AITableAvatarSize;
756
+ (function (AITableAvatarSize) {
757
+ AITableAvatarSize[AITableAvatarSize["size16"] = 16] = "size16";
758
+ AITableAvatarSize[AITableAvatarSize["size20"] = 22] = "size20";
759
+ AITableAvatarSize[AITableAvatarSize["size24"] = 24] = "size24";
760
+ AITableAvatarSize[AITableAvatarSize["size28"] = 28] = "size28";
761
+ AITableAvatarSize[AITableAvatarSize["size32"] = 32] = "size32";
762
+ AITableAvatarSize[AITableAvatarSize["size36"] = 36] = "size36";
763
+ AITableAvatarSize[AITableAvatarSize["size44"] = 44] = "size44";
764
+ AITableAvatarSize[AITableAvatarSize["size48"] = 48] = "size48";
765
+ AITableAvatarSize[AITableAvatarSize["size68"] = 68] = "size68";
766
+ AITableAvatarSize[AITableAvatarSize["size110"] = 110] = "size110";
767
+ AITableAvatarSize[AITableAvatarSize["size160"] = 160] = "size160";
768
+ })(AITableAvatarSize || (AITableAvatarSize = {}));
769
+ var AITableAvatarType;
770
+ (function (AITableAvatarType) {
771
+ AITableAvatarType[AITableAvatarType["member"] = 0] = "member";
772
+ AITableAvatarType[AITableAvatarType["space"] = 1] = "space";
773
+ AITableAvatarType[AITableAvatarType["team"] = 2] = "team";
774
+ })(AITableAvatarType || (AITableAvatarType = {}));
775
+ var AITableMemberType;
776
+ (function (AITableMemberType) {
777
+ AITableMemberType[AITableMemberType["team"] = 1] = "team";
778
+ AITableMemberType[AITableMemberType["role"] = 2] = "role";
779
+ AITableMemberType[AITableMemberType["member"] = 3] = "member";
780
+ })(AITableMemberType || (AITableMemberType = {}));
781
+
782
+ var AITableMouseDownType;
783
+ (function (AITableMouseDownType) {
784
+ AITableMouseDownType[AITableMouseDownType["Left"] = 0] = "Left";
785
+ AITableMouseDownType[AITableMouseDownType["Center"] = 1] = "Center";
786
+ AITableMouseDownType[AITableMouseDownType["Right"] = 2] = "Right";
787
+ })(AITableMouseDownType || (AITableMouseDownType = {}));
788
+
789
+ var AITableCheckType;
790
+ (function (AITableCheckType) {
791
+ AITableCheckType["checked"] = "checked";
792
+ AITableCheckType["unchecked"] = "unchecked";
793
+ })(AITableCheckType || (AITableCheckType = {}));
794
+ var AITableAreaType;
795
+ (function (AITableAreaType) {
796
+ AITableAreaType["grid"] = "grid";
797
+ AITableAreaType["none"] = "none";
798
+ })(AITableAreaType || (AITableAreaType = {}));
799
+ var AITableSelectAllState;
800
+ (function (AITableSelectAllState) {
801
+ AITableSelectAllState["all"] = "all";
802
+ AITableSelectAllState["partial"] = "partial";
803
+ AITableSelectAllState["none"] = "none";
804
+ })(AITableSelectAllState || (AITableSelectAllState = {}));
805
+
806
+ var AITableRowType;
807
+ (function (AITableRowType) {
808
+ AITableRowType["add"] = "add";
809
+ AITableRowType["record"] = "record";
810
+ })(AITableRowType || (AITableRowType = {}));
811
+
812
+ const AI_TABLE_ACTION_COMMON_SIZE = 32; // 表格图标action背景的通用尺寸
813
+ const AI_TABLE_ACTION_COMMON_RADIUS = 4; // 表格图标action背景的radius通用尺寸
814
+ const AI_TABLE_ACTION_COMMON_RIGHT_PADDING = 6; // 表格图标action右侧padding尺寸
815
+ const AI_TABLE_DEFAULT_COLUMN_WIDTH = 200; // 默认列宽
816
+ const AI_TABLE_SCROLL_BAR_PADDING = 3; // 单元格滑动容器的滚动条宽度
817
+ const AI_TABLE_OFFSET = 0.5; // 边框线偏移值
818
+ const AI_TABLE_TEXT_GAP = 8; // 文本间距
819
+ const AI_TABLE_ROW_HEAD = 'AI_TABLE_ROW_HEAD'; // 行头
820
+ const AI_TABLE_ROW_DRAG_ICON_WIDTH = 18; // 行拖拽宽度
821
+ const AI_TABLE_ROW_HEAD_WIDTH = 44; // 表格行头 checkbox 列的宽度
822
+ const AI_TABLE_ROW_HEAD_WIDTH_AND_DRAG_ICON_WIDTH = AI_TABLE_ROW_HEAD_WIDTH + AI_TABLE_ROW_DRAG_ICON_WIDTH;
823
+ const AI_TABLE_ROW_HEAD_SIZE = 16; // 添加行按钮的尺寸
824
+ const AI_TABLE_ROW_ADD_BUTTON = 'AI_TABLE_ROW_ADD_BUTTON'; // 添加行名称
825
+ const AI_TABLE_BLANK = 'AI_TABLE_BLANK'; // 空白区域
826
+ const AI_TABLE_INDEX_FIELD_TEXT = ''; // 索引列显示文本
827
+ const AI_TABLE_FIELD_HEAD = 'AI_TABLE_FIELD_HEAD'; // 属性列头标识
828
+ const AI_TABLE_FIELD_HEAD_HEIGHT = 44; // 表格字段列头的高度
829
+ const AI_TABLE_ROW_BLANK_HEIGHT = 43; // 减去边框后真实的行高
830
+ const AI_TABLE_ROW_HEIGHT = 44; // 默认行高基准
831
+ const AI_TABLE_CELL_ACTIVE_BORDER_WIDTH = 2; // 选中单元格的边框宽度
832
+ const AI_TABLE_CELL_ATTACHMENT_ADD = 'AI_TABLE_CELL_ATTACHMENT_ADD'; // 附件cell中新增图标名称
833
+ const AI_TABLE_CELL_ATTACHMENT_FILE = 'AI_TABLE_CELL_ATTACHMENT_FILE'; // 附件cell中文件
834
+ const AI_TABLE_CELL_EDIT = 'AI_TABLE_CELL_EDIT'; // 附件cell中编辑图标名称
835
+ const AI_TABLE_FIELD_HEAD_TEXT_MIN_WIDTH = 30; // 字段列头文本的最小宽度
836
+ const AI_TABLE_ROW_SELECT_CHECKBOX = 'AI_TABLE_ROW_SELECT_CHECKBOX'; // 行 checkbox
837
+ const AI_TABLE_FIELD_HEAD_SELECT_CHECKBOX = 'AI_TABLE_FIELD_HEAD_SELECT_CHECKBOX'; // 表头 checkbox 标识
838
+ const AI_TABLE_FIELD_ADD_BUTTON = 'AI_TABLE_FIELD_ADD_BUTTON'; // 添加列名称
839
+ const AI_TABLE_FIELD_ADD_BUTTON_WIDTH = 100; // 添加列宽度
840
+ const AI_TABLE_FIELD_HEAD_ICON_GAP_SIZE = 8; // 字段表列头图标的间距
841
+ const AI_TABLE_FIELD_HEAD_MORE = 'AI_TABLE_FIELD_HEAD_MORE'; // 更多图标名称
842
+ const AI_TABLE_FIELD_HEAD_OPACITY_LINE = 'AI_TABLE_FIELD_HEAD_OPACITY_LINE'; // 字段列头透明线
843
+ const AI_TABLE_FIELD_STAT_BG = 'AI_TABLE_FIELD_STAT_BG'; // 统计按钮背景
844
+ const AI_TABLE_ROW_DRAG = 'AI_TABLE_ROW_DRAG'; // 行拖拽
845
+ const AI_TABLE_FILL_HANDLE = 'AI_TABLE_FILL_HANDLE'; // 填充手柄
846
+ const AI_TABLE_PREVENT_CLEAR_SELECTION_CLASS = '.ai-table-prevent-clear-selection';
847
+ const AI_TABLE_ICON_COMMON_SIZE = 16; // 表格图标的通用尺寸
848
+ const AI_TABLE_CELL = 'AI_TABLE_CELL'; // 单元格标识
849
+ // 因为 dom 的边距 12 是不包含 边框的,所以加上边框 2px 才能跟 编辑里面的内容对其;
850
+ const AI_TABLE_CELL_PADDING = 14; // 单元格内容的内边距
851
+ const AI_TABLE_CELL_BORDER = 2; // 单元格边框宽度
852
+ const AI_TABLE_CELL_LINE_BORDER = 1; // 单元格线宽度
853
+ const AI_TABLE_CELL_MULTI_PADDING_TOP = 10;
854
+ const AI_TABLE_CELL_MULTI_ITEM_MARGIN_TOP = 4;
855
+ const AI_TABLE_CELL_MULTI_PADDING_LEFT = 4;
856
+ // 最少显示文字宽度,一个文字+ 三个点
857
+ const AI_TABLE_MIN_TEXT_WIDTH = 24;
858
+ const AI_TABLE_CELL_MULTI_DOT_RADIUS = 4;
859
+ const AI_TABLE_CELL_MULTI_ITEM_MARGIN_LEFT = 8;
860
+ const AI_TABLE_CELL_DELETE_ITEM_BUTTON_SIZE = 8; // 选项删除按钮的宽度
861
+ const AI_TABLE_CELL_DELETE_ITEM_BUTTON_SIZE_OFFSET = 12; // 选项字段删除按钮大小的偏移量
862
+ const AI_TABLE_CELL_MULTI_ITEM_MIN_WIDTH = 36; // 选项字段项的最小宽度
863
+ const AI_TABLE_CELL_MAX_ROW_COUNT = 1; // 默认单元格展示的最大行数
864
+ const AI_TABLE_CELL_EMOJI_SIZE = 18;
865
+ const AI_TABLE_CELL_EMOJI_PADDING = 8;
866
+ const AI_TABLE_CELL_MEMBER_MAX_HEIGHT = 130; // 成员字段项最大高度
867
+ const AI_TABLE_CELL_MEMBER_ITEM_HEIGHT = 24; // 成员字段项高度
868
+ const AI_TABLE_CELL_MEMBER_ITEM_PADDING = 4; // 多个成员头像间距
869
+ const AI_TABLE_CELL_ADD_ITEM_BUTTON_SIZE = 22; // 成员/选项/链接/附件字段的新按钮大小
870
+ const AI_TABLE_MEMBER_AVATAR_SIZE = 24; // 成员头像大小
871
+ const AI_TABLE_MEMBER_ITEM_PADDING_RIGHT = 8; // 成员字段项右边距
872
+ const AI_TABLE_MEMBER_ITEM_AVATAR_MARGIN_RIGHT = 8; // 成员头像与成员名之间的间距
873
+ const AI_TABLE_FILE_ICON_ITEM_HEIGHT = 20; // 文件字段项高度
874
+ const AI_TABLE_FILE_ICON_SIZE = 20; // 文件图标大小
875
+ const AI_TABLE_CELL_FIELD_ITEM_HEIGHT = 8; // 文件字段项右边距
876
+ const AI_TABLE_FIELD_ITEM_MARGIN_RIGHT = 8; // 文件图标之间的间距
877
+ const AI_TABLE_OPTION_ITEM_PADDING = 10; // 选项按钮间距
878
+ const AI_TABLE_OPTION_ITEM_HEIGHT = 24;
879
+ const AI_TABLE_OPTION_ITEM_FONT_SIZE = 14;
880
+ const AI_TABLE_OPTION_ITEM_RADIUS = 18;
881
+ const AI_TABLE_TAG_PADDING = 12;
882
+ const AI_TABLE_TAG_FONT_SIZE = 12;
883
+ const AI_TABLE_PIECE_WIDTH = 10;
884
+ const AI_TABLE_PIECE_RADIUS = 2;
885
+ const AI_TABLE_COMMON_FONT_SIZE = 14;
886
+ const AI_TABLE_DOT_RADIUS = 5;
887
+ const AI_TABLE_PROGRESS_BAR_HEIGHT = 10;
888
+ const AI_TABLE_PROGRESS_BAR_RADIUS = 5;
889
+ const AI_TABLE_PROGRESS_BAR_POINTER_HEIGHT = 18;
890
+ const AI_TABLE_PROGRESS_BAR_POINTER_WIDTH = 8;
891
+ const AI_TABLE_PROGRESS_TEXT_WIDTH = 46;
892
+ const AI_TABLE_POPOVER_LEFT_OFFSET = 4;
893
+ const AI_TABLE_RATE_MAX = 5;
894
+ const AI_TABLE_SCROLL_BAR_SIZE = 18;
895
+ const AI_TABLE_AUTO_SCROLL_LEFT_THRESHOLD = 40;
896
+ const AI_TABLE_AUTO_SCROLL_RIGHT_THRESHOLD = 40;
897
+ const AI_TABLE_AUTO_SCROLL_TOP_THRESHOLD = AI_TABLE_FIELD_HEAD_HEIGHT / 2;
898
+ const AI_TABLE_AUTO_SCROLL_BOTTOM_THRESHOLD = AI_TABLE_FIELD_HEAD_HEIGHT / 2;
899
+ const AI_TABLE_FIELD_STAT_HEIGHT = 48; // 字段统计高度
900
+ const AI_TABLE_TEXT_LINE_HEIGHT = 1.84; // 默认文本行高
901
+ const AI_TABLE_FIELD_STAT_CONTAINER_HEIGHT = AI_TABLE_FIELD_STAT_HEIGHT + AI_TABLE_CELL_LINE_BORDER * 2;
902
+
903
+ const MIN_COLUMN_WIDTH = 80;
904
+ const DBL_CLICK_EDIT_TYPE = [
905
+ AITableFieldType.text,
906
+ AITableFieldType.number,
907
+ AITableFieldType.select,
908
+ AITableFieldType.date,
909
+ AITableFieldType.member,
910
+ AITableFieldType.link
911
+ ];
912
+ const RowHeight = {
913
+ Short: 32,
914
+ Medium: 57,
915
+ Tall: 104,
916
+ ExtraTall: 152
917
+ };
918
+ const DEFAULT_POINT_POSITION = {
919
+ areaType: AITableAreaType.none,
920
+ targetName: AI_TABLE_BLANK,
921
+ realTargetName: AI_TABLE_BLANK,
922
+ rowIndex: -1,
923
+ columnIndex: -1,
924
+ x: 0,
925
+ y: 0,
926
+ offsetTop: 0,
927
+ offsetLeft: 0
928
+ };
929
+ const DEFAULT_SCROLL_STATE = {
930
+ scrollTop: 0,
931
+ scrollLeft: 0,
932
+ isScrolling: false
933
+ };
934
+
935
+ const DEFAULT_ICON_SHAPE = 'square';
936
+ const DEFAULT_ICON_SIZE = 16;
937
+ const Check = `
938
+ M15,1H3C1.9,1,1,1.9,1,3v12c0,1.1,0.9,2,2,2h12c1.1,0,2-0.9,2-2V3C17,1.9,16.1,1,15,1z M14,6.6l-5.7,5.7
939
+ c-0.2,0.2-0.4,0.3-0.6,0.3s-0.4-0.1-0.6-0.3L4.6,9.8c-0.3-0.3-0.3-0.9,0-1.2s0.9-0.3,1.2,0l1.9,1.9l5.1-5.1
940
+ c0.3-0.3,0.9-0.3,1.2,0C14.3,5.7,14.3,6.3,14,6.6z
941
+ `;
942
+ const Unchecked = `
943
+ M15,1H3C1.9,1,1,1.9,1,3v12c0,1.1,0.9,2,2,2h12c1.1,0,2-0.9,2-2V3C17,1.9,16.1,1,15,1z
944
+ M15.7,3.3v11.4c0,0.5-0.5,1-1,1H3.3c-0.5,0-1-0.5-1-1V3.3c0-0.5,0.5-1,1-1h11.4C15.2,2.3,15.7,2.8,15.7,3.3z
945
+ `;
946
+ const ColumnTextFilledPath = `M7.268 8.674l-2.076-4.86-2.076 4.86h4.152zm0.513 1.2H2.603l-1.294 3.03L0 12.902L4.49 2.4H5.894l4.484 10.486-1.31 0.002-1.287-3.014zm2.86 1.111c0-1.423 1.246-2.193 4.21-2.49 0-0.89-0.235-1.72-1.362-1.72-0.772 0-1.484 0.356-2.017 0.711l-0.475-0.771c0.653-0.415 1.602-0.889 2.669-0.889 1.602 0 2.313 1.127 2.313 2.787v4.151h-0.948l-0.12-0.83h-0.06c-0.651 0.534-1.422 0.949-2.252 0.949-1.127 0-1.957-0.652-1.957-1.898zm4.113-1.778c-2.253 0.296-3.024 0.83-3.024 1.72 0 0.77 0.534 1.067 1.186 1.067 0.652 0 1.186-0.297 1.838-0.89V9.207z`;
947
+ const ColumnRichTextFilledPath = `M14.5526,11.7084 C14.8845231,11.7084 15.1536,11.9774769 15.1536,12.3094 C15.1536,12.6413231 14.8845231,12.9104 14.5526,12.9104 L14.5526,12.9104 L11.7546,12.9104 C11.4226769,12.9104 11.1536,12.6413231 11.1536,12.3094 C11.1536,11.9774769 11.4226769,11.7084 11.7546,11.7084 L11.7546,11.7084 Z M5.894,2.4 L10.378,12.886 L9.068,12.888 L7.779,9.873 L2.603,9.873 L1.309,12.904 L2.84217094e-14,12.902 L4.49,2.4 L5.894,2.4 Z M5.191,3.814 L3.116,8.673 L7.267,8.673 L5.191,3.814 Z M14.5526,7.17723172 C14.8845231,7.17723172 15.1536,7.44630859 15.1536,7.77823172 C15.1536,8.11015486 14.8845231,8.37923172 14.5526,8.37923172 L14.5526,8.37923172 L10.7546,8.37923172 C10.4226769,8.37923172 10.1536,8.11015486 10.1536,7.77823172 C10.1536,7.44630859 10.4226769,7.17723172 10.7546,7.17723172 L10.7546,7.17723172 Z M14.5526,2.3094 C14.8845231,2.3094 15.1536,2.57847687 15.1536,2.9104 C15.1536,3.24232313 14.8845231,3.5114 14.5526,3.5114 L14.5526,3.5114 L9.7546,3.5114 C9.42267687,3.5114 9.1536,3.24232313 9.1536,2.9104 C9.1536,2.57847687 9.42267687,2.3094 9.7546,2.3094 L9.7546,2.3094 Z`;
948
+ const ColumnSelectFilledPath = `M8 16A8 8 0 1 1 8 0a8 8 0 0 1 0 16zm0-1.2A6.8 6.8 0 1 0 8 1.2a6.8 6.8 0 0 0 0 13.6zM5.666 7.207l1.8 1.845 3.482-3.554.857.84-4.34 4.43-2.658-2.723.86-.838z`;
949
+ const ColumnMultipleFillPath = `M2 2.551L3.576.976l.848.848L2 4.25.576 2.824l.848-.848L2 2.55zm0 5.425L3.576 6.4l.848.849L2 9.673.576 8.249l.848-.849.576.576zm0 5.4L3.576 11.8l.848.849L2 15.073.576 13.649l.848-.849.576.576zM5.663 2.6a.6.6 0 1 1 0-1.2H15.4a.6.6 0 0 1 0 1.2H5.663zm0 11.8a.6.6 0 0 1 0-1.2H15.4a.6.6 0 0 1 0 1.2H5.663zm0-6.2a.6.6 0 1 1 0-1.2H15.4a.6.6 0 0 1 0 1.2H5.663z`;
950
+ const ColumnCalendarFilledPath = `M10.9 3.2H5.1v1.6H3.9V3.2H1.2v3.2h13.6V3.2h-2.7v1.6h-1.2V3.2zM12.1 2H15a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H1a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1h2.9V.4h1.2V2h5.8V.4h1.2V2zm2.7 5.6H1.2v7.2h13.6V7.6z`;
951
+ const ColumnNumberFilledPath = `M4.236 9.9l.422-3.8H2.6a.6.6 0 1 1 0-1.2h2.19l.372-3.347a.6.6 0 1 1 1.192.133L5.998 4.9h4.793l.37-3.347a.6.6 0 0 1 1.193.133L11.998 4.9h2.459a.6.6 0 0 1 0 1.2h-2.592l-.421 3.8h2.013a.6.6 0 0 1 0 1.2H11.31l-.374 3.368a.6.6 0 0 1-1.192-.132l.358-3.236H5.311l-.374 3.368a.6.6 0 0 1-1.192-.132l.358-3.236H1.6a.6.6 0 0 1 0-1.2h2.636zm1.208 0h4.792l.422-3.8H5.865l-.421 3.8z`;
952
+ const ColumnLinkOutlinedPath = `M10.4238543,5.91643446 C11.7563563,7.48802206 11.6811634,9.84553933 10.1982756,11.3284271 L7.22842712,14.2982756 C5.66632996,15.8603728 3.13367004,15.8603728 1.57157288,14.2982756 C0.00947570825,12.7361784 0.00947570825,10.2035185 1.57157288,8.64142136 L2.387,7.82495116 L3.236,8.67395116 L2.42010101,9.48994949 C1.37219416,10.5378563 1.32853138,12.2097205 2.28911266,13.3096237 L2.42010101,13.4497475 C3.51356903,14.5432155 5.28643097,14.5432155 6.37989899,13.4497475 L9.34974747,10.479899 C10.3636395,9.46600698 10.4374244,7.86800734 9.57110232,6.76909967 L10.4238543,5.91643446 Z M14.4436815,1.67157288 C16.0057786,3.23367004 16.0057786,5.76632996 14.4436815,7.32842712 L13.5744058,8.198 L12.7254058,7.349 L13.5951533,6.47989899 C14.6430602,5.43199214 14.6867229,3.76012802 13.7261417,2.66022473 L13.5951533,2.52010101 C12.5016853,1.426633 10.7288234,1.426633 9.63535534,2.52010101 L6.66550686,5.48994949 C5.62228095,6.5331754 5.57434734,8.19479666 6.52170603,9.29485 L5.67236452,10.1460046 C4.25646867,8.57570748 4.3046734,6.15372668 5.81697872,4.64142136 L8.7868272,1.67157288 C10.3489244,0.109475708 12.8815843,0.109475708 14.4436815,1.67157288 Z`;
953
+ const ColumnRatingFilledPath = `M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0zm0 1.2a6.8 6.8 0 1 0 0 13.6A6.8 6.8 0 0 0 8 1.2zm.945 2.906l.077.106.064.112.03.069.564 1.46 1.646.1c.952.092 1.365 1.264.752 1.893l-.086.078-1.315 1.056.431 1.533c.295 1.031-.848 1.858-1.643 1.34l-.087-.063-1.315-.85-.006.001-1.309.842c-.85.567-1.903-.163-1.79-1.054l.019-.108.45-1.601-1.321-1.035c-.632-.633-.372-1.673.462-1.973l.123-.038.124-.026 1.571-.094.602-1.55c.364-.793 1.44-.836 1.957-.198zm-.91.815l-.809 2.085-2.253.134L6.8 8.571l-.602 2.139 1.44-.927.71-.087 1.569 1.016-.61-2.172 1.75-1.402-2.219-.134-.803-2.083z`;
954
+ const ColumnMemberFilledPath = `M10.212 8.416A6.603 6.603 0 0 1 14.5 14.6a.6.6 0 0 1-1.2 0 5.4 5.4 0 0 0-10.8 0 .6.6 0 0 1-1.2 0 6.602 6.602 0 0 1 4.159-6.134 4.1 4.1 0 1 1 4.753-.05zM7.8 8a2.9 2.9 0 1 0 0-5.8 2.9 2.9 0 0 0 0 5.8z`;
955
+ const ColumnProgressFilledPath = `M11.5 3.5a4.5 4.5 0 1 1 0 9h-7a4.5 4.5 0 1 1 0-9h7zm0 1.2h-7a3.3 3.3 0 0 0 0 6.6h7a3.3 3.3 0 1 0 0-6.6zM8 7.2v1.5H3.75a.75.75 0 0 1 0-1.5H8z`;
956
+ const AddOutlinedPath = `M8.578 7.383V1.602a.601.601 0 1 0-1.2 0v5.781H1.6a.601.601 0 0 0 0 1.203h5.777v5.812a.601.601 0 1 0 1.2 0V8.586H14.4a.601.601 0 0 0 0-1.203H8.578z`;
957
+ const MoreStandOutlinedPath = `M8 4.25a1.25 1.25 0 1 0 0-2.5 1.25 1.25 0 0 0 0 2.5zm0 5a1.25 1.25 0 1 0 0-2.5 1.25 1.25 0 0 0 0 2.5zm0 5a1.25 1.25 0 1 0 0-2.5 1.25 1.25 0 0 0 0 2.5z`;
958
+ const StarFill = `M9.186 2.12l1.02 2.769c.073.292.365.437.656.437l2.915.146c1.166.073 1.676 1.53.73 2.26l-2.26 1.821c-.219.146-.291.51-.219.729l.73 2.842c.29 1.093-.948 2.04-1.896 1.384l-2.477-1.603a.79.79 0 0 0-.802 0l-2.478 1.676c-.947.583-2.186-.291-1.894-1.457l.728-2.842c.073-.292 0-.583-.218-.729L1.46 7.731c-.874-.729-.437-2.186.73-2.259l2.914-.146c.292 0 .51-.218.656-.437l1.093-2.77c.365-1.092 1.895-1.092 2.332 0z`;
959
+ const WebOutlinedPath = `M1 8C1 4.13401 4.13401 1 8 1C11.866 1 15 4.13401 15 8C15 11.866 11.866 15 8 15C4.13401 15 1 11.866 1 8ZM6.04798 2.85646C4.19852 3.55874 2.82616 5.22986 2.55071 7.25H5.26373C5.31861 5.76009 5.53564 4.40148 5.87147 3.352C5.92605 3.18143 5.98481 3.0157 6.04798 2.85646ZM5.87147 12.648C5.53564 11.5985 5.31861 10.2399 5.26373 8.75H2.55071C2.82616 10.7701 4.19852 12.4413 6.04798 13.1435C5.98481 12.9843 5.92605 12.8186 5.87147 12.648ZM10.1285 12.648C10.0739 12.8186 10.0152 12.9843 9.95202 13.1435C11.8015 12.4413 13.1738 10.7701 13.4493 8.75H10.7363C10.6814 10.2399 10.4644 11.5985 10.1285 12.648ZM8.6999 12.1908C8.98163 11.3104 9.18095 10.1118 9.23518 8.75H6.76482C6.81905 10.1118 7.01837 11.3104 7.3001 12.1908C7.46768 12.7145 7.65131 13.0839 7.81962 13.3063C7.90746 13.4224 7.9686 13.4711 8 13.4906C8.0314 13.4711 8.09254 13.4224 8.18038 13.3063C8.34869 13.0839 8.53232 12.7145 8.6999 12.1908ZM7.3001 3.80916C7.01837 4.68959 6.81905 5.88818 6.76482 7.25H9.23518C9.18095 5.88818 8.98163 4.68959 8.6999 3.80916C8.53232 3.28548 8.34869 2.91612 8.18038 2.69367C8.09254 2.57756 8.0314 2.52893 8 2.50944C7.9686 2.52893 7.90746 2.57756 7.81962 2.69367C7.65131 2.91612 7.46768 3.28548 7.3001 3.80916ZM10.1285 3.352C10.4644 4.40148 10.6814 5.76009 10.7363 7.25H13.4493C13.1738 5.22986 11.8015 3.55874 9.95203 2.85646C10.0152 3.0157 10.0739 3.18143 10.1285 3.352Z`;
960
+ const DepartmentOutlinedPath = `M3 5.5C3 3.567 4.567 2 6.5 2C8.433 2 10 3.567 10 5.5C10 6.49548 9.5844 7.3939 8.91724 8.0312C10.7204 8.86779 12.017 10.6115 12.2217 12.6767C12.2976 13.4424 11.6682 14 11 14H2C1.33185 14 0.702358 13.4424 0.778277 12.6767C0.983033 10.6115 2.27961 8.86779 4.08276 8.0312C3.4156 7.3939 3 6.49548 3 5.5ZM8.5 5.5C8.5 4.39543 7.60457 3.5 6.5 3.5C5.39543 3.5 4.5 4.39543 4.5 5.5C4.5 6.60457 5.39543 7.5 6.5 7.5C7.60457 7.5 8.5 6.60457 8.5 5.5ZM2.31585 12.5H10.6841C10.3303 10.5108 8.59114 9 6.5 9C4.40886 9 2.66975 10.5108 2.31585 12.5Z', 'M11 3C10.5858 3 10.25 3.33579 10.25 3.75C10.25 4.16421 10.5858 4.5 11 4.5C11.6904 4.5 12.25 5.05964 12.25 5.75C12.25 6.44036 11.6904 7 11 7C10.5858 7 10.25 7.33579 10.25 7.75C10.25 8.16421 10.5858 8.5 11 8.5C12.6569 8.5 14 9.84315 14 11.5C14 11.9142 14.3358 12.25 14.75 12.25C15.1642 12.25 15.5 11.9142 15.5 11.5C15.5 9.77473 14.5291 8.27622 13.1038 7.52106C13.507 7.0426 13.75 6.42467 13.75 5.75C13.75 4.23122 12.5188 3 11 3Z`;
961
+ const AttachmentPath = `M9.1773124,11.8057395 C7.96668709,13.0163648 6.00387566,13.0163648 4.79325035,11.8057395 C3.58262505,10.5951142 3.58262505,8.63230278 4.78926443,7.4257012 L8.27628904,3.87217601 C8.50840068,3.63567937 8.88828274,3.63209333 9.12479868,3.86418566 C9.36131462,4.096278 9.36490066,4.47616006 9.13280833,4.712676 L5.64177849,8.27020561 C4.89978234,9.01220177 4.89978234,10.2152152 5.64177849,10.9572114 C6.38377464,11.6992075 7.5867881,11.6992075 8.32878426,10.9572114 L12.2321177,7.05387799 C13.3493901,5.93660552 13.2780395,4.02707269 12.0410949,2.79012806 C10.8041502,1.55318343 8.8946174,1.4818328 7.77734493,2.59910526 L3.72686067,6.64958953 C2.02034367,8.35610653 2.02835883,11.1329242 3.74721224,12.8517776 C5.46606565,14.570631 8.24288334,14.5786462 9.94940034,12.8721292 L13.5980637,9.22346588 C13.8323782,8.98915131 14.2122772,8.98915131 14.4465918,9.22346588 C14.6809064,9.45778046 14.6809064,9.83767945 14.4465918,10.071994 L10.7979285,13.7206573 C8.62168228,15.8969035 5.08507361,15.8866953 2.8986841,13.7003058 C0.712294592,11.5139163 0.702086332,7.97730759 2.87833253,5.8010614 L6.9288168,1.75057713 C8.52947856,0.149915361 11.1976354,0.249612361 12.889623,1.94159992 C14.5816106,3.63358749 14.6813076,6.30174436 13.0806458,7.90240612 L9.1773124,11.8057395 Z`;
962
+ const EditPath = `M2,8.33918294 L10.7095952,0 L15,4.17020474 L6.53816398,13 L2,13 L2,8.33918294 Z M3.2,8.85157902 L3.2,11.8 L6.02608482,11.8 L13.3091776,4.20020516 L10.7033283,1.66736141 L3.2,8.85157902 Z M0,16 L0,14.8 L16,14.8 L16,16 L0,16 Z`;
963
+ const RowDragPath = `M6,3 C6.55228475,3 7,2.55228475 7,2 C7,1.44771525 6.55228475,1 6,1 C5.44771525,1 5,1.44771525 5,2 C5,2.55228475 5.44771525,3 6,3 Z M10,3 C10.5522847,3 11,2.55228475 11,2 C11,1.44771525 10.5522847,1 10,1 C9.44771525,1 9,1.44771525 9,2 C9,2.55228475 9.44771525,3 10,3 Z M6,7 C6.55228475,7 7,6.55228475 7,6 C7,5.44771525 6.55228475,5 6,5 C5.44771525,5 5,5.44771525 5,6 C5,6.55228475 5.44771525,7 6,7 Z M10,7 C10.5522847,7 11,6.55228475 11,6 C11,5.44771525 10.5522847,5 10,5 C9.44771525,5 9,5.44771525 9,6 C9,6.55228475 9.44771525,7 10,7 Z M6,11 C6.55228475,11 7,10.5522847 7,10 C7,9.44771525 6.55228475,9 6,9 C5.44771525,9 5,9.44771525 5,10 C5,10.5522847 5.44771525,11 6,11 Z M10,11 C10.5522847,11 11,10.5522847 11,10 C11,9.44771525 10.5522847,9 10,9 C9.44771525,9 9,9.44771525 9,10 C9,10.5522847 9.44771525,11 10,11 Z M6,15 C6.55228475,15 7,14.5522847 7,14 C7,13.4477153 6.55228475,13 6,13 C5.44771525,13 5,13.4477153 5,14 C5,14.5522847 5.44771525,15 6,15 Z M10,15 C10.5522847,15 11,14.5522847 11,14 C11,13.4477153 10.5522847,13 10,13 C9.44771525,13 9,13.4477153 9,14 C9,14.5522847 9.44771525,15 10,15 Z`;
964
+ const AngleDownPath = `M7.97815,11.99732 L7.9728,12.00267 L2.2998,6.33067 L3.1298,5.49967 L7.97807731,10.3479473 L12.8255,5.49967 L13.6565,6.33067 L7.9835,12.00267 L7.97815,11.99732 Z`;
965
+ const IconPathMap = {};
966
+
967
+ const DEFAULT_FONT_SIZE = 14;
968
+ const DEFAULT_FONT_FAMILY = '-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,PingFang SC,Helvetica Neue,Noto Sans,Noto Sans CJK SC,Microsoft Yahei,Arial,Hiragino Sans GB,sans-serif';
969
+ const DEFAULT_FONT_STYLE = 'normal';
970
+ const DEFAULT_TEXT_LINE_HEIGHT = 24;
971
+ const DEFAULT_TEXT_FILL = Colors.gray800;
972
+ const DEFAULT_FONT_WEIGHT = 'normal';
973
+ const DEFAULT_TEXT_WRAP = 'none';
974
+ const DEFAULT_TEXT_TRANSFORMS_ENABLED = 'position';
975
+ const DEFAULT_TEXT_ELLIPSIS = true;
976
+ const DEFAULT_TEXT_LISTENING = false;
977
+ const DEFAULT_TEXT_ALIGN_LEFT = 'left';
978
+ const DEFAULT_TEXT_ALIGN_CENTER = 'center';
979
+ const DEFAULT_TEXT_ALIGN_RIGHT = 'right';
980
+ const DEFAULT_TEXT_VERTICAL_ALIGN_MIDDLE = 'middle';
981
+ const DEFAULT_TEXT_MAX_HEIGHT = 130;
982
+ const DEFAULT_WRAP_TEXT_MAX_ROW = 1;
983
+ const DEFAULT_TEXT_VERTICAL_ALIGN_TOP = 'top';
984
+ const DEFAULT_TEXT_DECORATION = 'none';
985
+ const DEFAULT_TEXT_SCALE = 1;
986
+ const DEFAULT_TEXT_MAX_CACHE = 500;
987
+ const FONT_SIZE_SM = 12;
988
+
719
989
  /**
720
990
  * 用于构建 Canvas 基础坐标系,后续的绘制工作以此为基础
721
991
  */
@@ -761,7 +1031,7 @@ class Coordinate {
761
1031
  */
762
1032
  get totalHeight() {
763
1033
  const { offset, size } = this.getCellMetaData(this.rowCount - 1, AITableRowColumnType.row);
764
- return offset + size;
1034
+ return offset + size + AI_TABLE_FIELD_STAT_HEIGHT;
765
1035
  }
766
1036
  /**
767
1037
  * 根据 rowIndex 获取对应行高
@@ -937,26 +1207,6 @@ class Coordinate {
937
1207
  }
938
1208
  }
939
1209
 
940
- const Colors = {
941
- primary: '#6698FF',
942
- gray100: '#f5f5f5',
943
- gray200: '#eee',
944
- gray300: '#ddd',
945
- gray800: '#333',
946
- gray600: '#999',
947
- gray700: '#666',
948
- white: '#fff',
949
- black: '#000',
950
- transparent: 'transparent',
951
- gray80: '#fafafa',
952
- headSelectedBgColor: '#EAEFFA',
953
- itemActiveBgColor: '#6698ff1a',
954
- itemMatchBgColor: '#ff9f731a',
955
- waring: '#ffcd5d',
956
- success: '#73d897',
957
- danger: '#ff5b57'
958
- };
959
-
960
1210
  const AITable = {
961
1211
  getColors() {
962
1212
  return Colors;
@@ -1049,99 +1299,42 @@ function shortId(alphabet = AlphabetType.url, size = 6, quantity) {
1049
1299
  throw new Error(`Invalid alphabet "${alphabet}", alphabet must one of ${Object.values(AlphabetType).join(' ')}`);
1050
1300
  }
1051
1301
  idGenerator = buildInAlphabets[alphabet];
1052
- }
1053
- else if (isString(alphabet)) {
1054
- idGenerator = customAlphabet(alphabet);
1055
- }
1056
- else {
1057
- throw new Error(`Invalid alphabet "${alphabet}", alphabet type must be AlphabetType or string`);
1058
- }
1059
- if (!isUndefinedOrNull(quantity)) {
1060
- if (!isNumber(quantity)) {
1061
- throw new Error(`Invalid quantity "${quantity}", quantity type must be number`);
1062
- }
1063
- const idTasks = Array.from({ length: quantity }, () => idGenerator(size));
1064
- const ids = idTasks;
1065
- return ids;
1066
- }
1067
- return idGenerator(size);
1068
- }
1069
-
1070
- function idCreator() {
1071
- return ObjectID().toHexString();
1072
- }
1073
- function idsCreator(count) {
1074
- if (count <= 0)
1075
- return [];
1076
- const newIds = [];
1077
- for (let i = 0; i < count; i++) {
1078
- newIds.push(idCreator());
1079
- }
1080
- return newIds;
1081
- }
1082
- function shortIdCreator() {
1083
- return shortId(undefined, 8);
1084
- }
1085
- function shortIdsCreator(count) {
1086
- return shortId(undefined, 8, count);
1087
- }
1088
-
1089
- var AITableAvatarSize;
1090
- (function (AITableAvatarSize) {
1091
- AITableAvatarSize[AITableAvatarSize["size16"] = 16] = "size16";
1092
- AITableAvatarSize[AITableAvatarSize["size20"] = 22] = "size20";
1093
- AITableAvatarSize[AITableAvatarSize["size24"] = 24] = "size24";
1094
- AITableAvatarSize[AITableAvatarSize["size28"] = 28] = "size28";
1095
- AITableAvatarSize[AITableAvatarSize["size32"] = 32] = "size32";
1096
- AITableAvatarSize[AITableAvatarSize["size36"] = 36] = "size36";
1097
- AITableAvatarSize[AITableAvatarSize["size44"] = 44] = "size44";
1098
- AITableAvatarSize[AITableAvatarSize["size48"] = 48] = "size48";
1099
- AITableAvatarSize[AITableAvatarSize["size68"] = 68] = "size68";
1100
- AITableAvatarSize[AITableAvatarSize["size110"] = 110] = "size110";
1101
- AITableAvatarSize[AITableAvatarSize["size160"] = 160] = "size160";
1102
- })(AITableAvatarSize || (AITableAvatarSize = {}));
1103
- var AITableAvatarType;
1104
- (function (AITableAvatarType) {
1105
- AITableAvatarType[AITableAvatarType["member"] = 0] = "member";
1106
- AITableAvatarType[AITableAvatarType["space"] = 1] = "space";
1107
- AITableAvatarType[AITableAvatarType["team"] = 2] = "team";
1108
- })(AITableAvatarType || (AITableAvatarType = {}));
1109
- var AITableMemberType;
1110
- (function (AITableMemberType) {
1111
- AITableMemberType[AITableMemberType["team"] = 1] = "team";
1112
- AITableMemberType[AITableMemberType["role"] = 2] = "role";
1113
- AITableMemberType[AITableMemberType["member"] = 3] = "member";
1114
- })(AITableMemberType || (AITableMemberType = {}));
1115
-
1116
- var AITableMouseDownType;
1117
- (function (AITableMouseDownType) {
1118
- AITableMouseDownType[AITableMouseDownType["Left"] = 0] = "Left";
1119
- AITableMouseDownType[AITableMouseDownType["Center"] = 1] = "Center";
1120
- AITableMouseDownType[AITableMouseDownType["Right"] = 2] = "Right";
1121
- })(AITableMouseDownType || (AITableMouseDownType = {}));
1122
-
1123
- var AITableCheckType;
1124
- (function (AITableCheckType) {
1125
- AITableCheckType["checked"] = "checked";
1126
- AITableCheckType["unchecked"] = "unchecked";
1127
- })(AITableCheckType || (AITableCheckType = {}));
1128
- var AITableAreaType;
1129
- (function (AITableAreaType) {
1130
- AITableAreaType["grid"] = "grid";
1131
- AITableAreaType["none"] = "none";
1132
- })(AITableAreaType || (AITableAreaType = {}));
1133
- var AITableSelectAllState;
1134
- (function (AITableSelectAllState) {
1135
- AITableSelectAllState["all"] = "all";
1136
- AITableSelectAllState["partial"] = "partial";
1137
- AITableSelectAllState["none"] = "none";
1138
- })(AITableSelectAllState || (AITableSelectAllState = {}));
1302
+ }
1303
+ else if (isString(alphabet)) {
1304
+ idGenerator = customAlphabet(alphabet);
1305
+ }
1306
+ else {
1307
+ throw new Error(`Invalid alphabet "${alphabet}", alphabet type must be AlphabetType or string`);
1308
+ }
1309
+ if (!isUndefinedOrNull(quantity)) {
1310
+ if (!isNumber(quantity)) {
1311
+ throw new Error(`Invalid quantity "${quantity}", quantity type must be number`);
1312
+ }
1313
+ const idTasks = Array.from({ length: quantity }, () => idGenerator(size));
1314
+ const ids = idTasks;
1315
+ return ids;
1316
+ }
1317
+ return idGenerator(size);
1318
+ }
1139
1319
 
1140
- var AITableRowType;
1141
- (function (AITableRowType) {
1142
- AITableRowType["add"] = "add";
1143
- AITableRowType["record"] = "record";
1144
- })(AITableRowType || (AITableRowType = {}));
1320
+ function idCreator() {
1321
+ return ObjectID().toHexString();
1322
+ }
1323
+ function idsCreator(count) {
1324
+ if (count <= 0)
1325
+ return [];
1326
+ const newIds = [];
1327
+ for (let i = 0; i < count; i++) {
1328
+ newIds.push(idCreator());
1329
+ }
1330
+ return newIds;
1331
+ }
1332
+ function shortIdCreator() {
1333
+ return shortId(undefined, 8);
1334
+ }
1335
+ function shortIdsCreator(count) {
1336
+ return shortId(undefined, 8, count);
1337
+ }
1145
1338
 
1146
1339
  function createAITable(records, fields, gridData) {
1147
1340
  const aiTable = {
@@ -2030,222 +2223,40 @@ function transformToCellText(cellValue, options) {
2030
2223
  const UNIFIED_IDEOGRAPHS_REGEX = /^[\u4e00-\u9fa5]+$/;
2031
2224
  const SET_OF_LETTERS_REGEX = /^[a-zA-Z\/ ]+$/;
2032
2225
  function getAvatarShortName(name) {
2033
- if (!name) {
2034
- return '';
2035
- }
2036
- name = name.trim();
2037
- if (UNIFIED_IDEOGRAPHS_REGEX.test(name) && name.length > 2) {
2038
- return name.slice(name.length - 2);
2039
- }
2040
- if (SET_OF_LETTERS_REGEX.test(name) && name.indexOf(' ') > 0) {
2041
- const words = name.split(' ');
2042
- return (words[0].slice(0, 1) + words[1].slice(0, 1)).toUpperCase();
2043
- }
2044
- return name.length > 2 ? name.slice(0, 2).toUpperCase() : name.toUpperCase();
2045
- }
2046
- function getAvatarBgColor(name) {
2047
- if (!name) {
2048
- return;
2049
- }
2050
- const colors = ['#56abfb', '#5dcfff', '#84e17e', '#73d897', '#ff9f73', '#fa8888', '#fb7fb7', '#9a7ef4', '#868af6'];
2051
- const nameArray = name.split('');
2052
- const code = name && name.length > 0
2053
- ? nameArray.reduce(function (result, item) {
2054
- result.value += item.charCodeAt(0);
2055
- return result;
2056
- }, { value: 0 }).value
2057
- : 0;
2058
- return colors[code % 9];
2059
- }
2060
- function expandCell(aiTable, path) {
2061
- const [recordId, fieldId] = path;
2062
- aiTable.selection.set({
2063
- ...aiTable.selection(),
2064
- expandCell: [recordId, fieldId]
2065
- });
2066
- }
2067
-
2068
- const GRID_CELL_EDITOR_MAP = {
2069
- [AITableFieldType.text]: TextCellEditorComponent,
2070
- [AITableFieldType.richText]: TextCellEditorComponent,
2071
- [AITableFieldType.select]: SelectCellEditorComponent,
2072
- [AITableFieldType.number]: NumberCellEditorComponent,
2073
- [AITableFieldType.date]: DateCellEditorComponent,
2074
- [AITableFieldType.link]: LinkCellEditorComponent
2075
- };
2076
-
2077
- const AI_TABLE_ACTION_COMMON_SIZE = 32; // 表格图标action背景的通用尺寸
2078
- const AI_TABLE_ACTION_COMMON_RADIUS = 4; // 表格图标action背景的radius通用尺寸
2079
- const AI_TABLE_ACTION_COMMON_RIGHT_PADDING = 6; // 表格图标action右侧padding尺寸
2080
- const AI_TABLE_DEFAULT_COLUMN_WIDTH = 200; // 默认列宽
2081
- const AI_TABLE_SCROLL_BAR_PADDING = 3; // 单元格滑动容器的滚动条宽度
2082
- const AI_TABLE_OFFSET = 0.5; // 边框线偏移值
2083
- const AI_TABLE_TEXT_GAP = 8; // 文本间距
2084
- const AI_TABLE_ROW_HEAD = 'AI_TABLE_ROW_HEAD'; // 行头
2085
- const AI_TABLE_ROW_DRAG_ICON_WIDTH = 18; // 行拖拽宽度
2086
- const AI_TABLE_ROW_HEAD_WIDTH = 44; // 表格行头 checkbox 列的宽度
2087
- const AI_TABLE_ROW_HEAD_WIDTH_AND_DRAG_ICON_WIDTH = AI_TABLE_ROW_HEAD_WIDTH + AI_TABLE_ROW_DRAG_ICON_WIDTH;
2088
- const AI_TABLE_ROW_HEAD_SIZE = 16; // 添加行按钮的尺寸
2089
- const AI_TABLE_ROW_ADD_BUTTON = 'AI_TABLE_ROW_ADD_BUTTON'; // 添加行名称
2090
- const AI_TABLE_BLANK = 'AI_TABLE_BLANK'; // 空白区域
2091
- const AI_TABLE_INDEX_FIELD_TEXT = ''; // 索引列显示文本
2092
- const AI_TABLE_FIELD_HEAD = 'AI_TABLE_FIELD_HEAD'; // 属性列头标识
2093
- const AI_TABLE_FIELD_HEAD_HEIGHT = 44; // 表格字段列头的高度
2094
- const AI_TABLE_ROW_BLANK_HEIGHT = 43; // 减去边框后真实的行高
2095
- const AI_TABLE_ROW_HEIGHT = 44; // 默认行高基准
2096
- const AI_TABLE_CELL_ACTIVE_BORDER_WIDTH = 2; // 选中单元格的边框宽度
2097
- const AI_TABLE_CELL_ATTACHMENT_ADD = 'AI_TABLE_CELL_ATTACHMENT_ADD'; // 附件cell中新增图标名称
2098
- const AI_TABLE_CELL_ATTACHMENT_FILE = 'AI_TABLE_CELL_ATTACHMENT_FILE'; // 附件cell中文件
2099
- const AI_TABLE_CELL_EDIT = 'AI_TABLE_CELL_EDIT'; // 附件cell中编辑图标名称
2100
- const AI_TABLE_FIELD_HEAD_TEXT_MIN_WIDTH = 30; // 字段列头文本的最小宽度
2101
- const AI_TABLE_ROW_SELECT_CHECKBOX = 'AI_TABLE_ROW_SELECT_CHECKBOX'; // 行 checkbox
2102
- const AI_TABLE_FIELD_HEAD_SELECT_CHECKBOX = 'AI_TABLE_FIELD_HEAD_SELECT_CHECKBOX'; // 表头 checkbox 标识
2103
- const AI_TABLE_FIELD_ADD_BUTTON = 'AI_TABLE_FIELD_ADD_BUTTON'; // 添加列名称
2104
- const AI_TABLE_FIELD_ADD_BUTTON_WIDTH = 100; // 添加列宽度
2105
- const AI_TABLE_FIELD_HEAD_ICON_GAP_SIZE = 8; // 字段表列头图标的间距
2106
- const AI_TABLE_FIELD_HEAD_MORE = 'AI_TABLE_FIELD_HEAD_MORE'; // 更多图标名称
2107
- const AI_TABLE_FIELD_HEAD_OPACITY_LINE = 'AI_TABLE_FIELD_HEAD_OPACITY_LINE'; // 字段列头透明线
2108
- const AI_TABLE_ROW_DRAG = 'AI_TABLE_ROW_DRAG'; // 行拖拽
2109
- const AI_TABLE_FILL_HANDLE = 'AI_TABLE_FILL_HANDLE'; // 填充手柄
2110
- const AI_TABLE_PREVENT_CLEAR_SELECTION_CLASS = '.ai-table-prevent-clear-selection';
2111
- const AI_TABLE_ICON_COMMON_SIZE = 16; // 表格图标的通用尺寸
2112
- const AI_TABLE_CELL = 'AI_TABLE_CELL'; // 单元格标识
2113
- // 因为 dom 的边距 12 是不包含 边框的,所以加上边框 2px 才能跟 编辑里面的内容对其;
2114
- const AI_TABLE_CELL_PADDING = 14; // 单元格内容的内边距
2115
- const AI_TABLE_CELL_BORDER = 2; // 单元格边框宽度
2116
- const AI_TABLE_CELL_MULTI_PADDING_TOP = 10;
2117
- const AI_TABLE_CELL_MULTI_ITEM_MARGIN_TOP = 4;
2118
- const AI_TABLE_CELL_MULTI_PADDING_LEFT = 4;
2119
- // 最少显示文字宽度,一个文字+ 三个点
2120
- const AI_TABLE_MIN_TEXT_WIDTH = 24;
2121
- const AI_TABLE_CELL_MULTI_DOT_RADIUS = 4;
2122
- const AI_TABLE_CELL_MULTI_ITEM_MARGIN_LEFT = 8;
2123
- const AI_TABLE_CELL_DELETE_ITEM_BUTTON_SIZE = 8; // 选项删除按钮的宽度
2124
- const AI_TABLE_CELL_DELETE_ITEM_BUTTON_SIZE_OFFSET = 12; // 选项字段删除按钮大小的偏移量
2125
- const AI_TABLE_CELL_MULTI_ITEM_MIN_WIDTH = 36; // 选项字段项的最小宽度
2126
- const AI_TABLE_CELL_MAX_ROW_COUNT = 1; // 默认单元格展示的最大行数
2127
- const AI_TABLE_CELL_EMOJI_SIZE = 18;
2128
- const AI_TABLE_CELL_EMOJI_PADDING = 8;
2129
- const AI_TABLE_CELL_MEMBER_MAX_HEIGHT = 130; // 成员字段项最大高度
2130
- const AI_TABLE_CELL_MEMBER_ITEM_HEIGHT = 24; // 成员字段项高度
2131
- const AI_TABLE_CELL_MEMBER_ITEM_PADDING = 4; // 多个成员头像间距
2132
- const AI_TABLE_CELL_ADD_ITEM_BUTTON_SIZE = 22; // 成员/选项/链接/附件字段的新按钮大小
2133
- const AI_TABLE_MEMBER_AVATAR_SIZE = 24; // 成员头像大小
2134
- const AI_TABLE_MEMBER_ITEM_PADDING_RIGHT = 8; // 成员字段项右边距
2135
- const AI_TABLE_MEMBER_ITEM_AVATAR_MARGIN_RIGHT = 8; // 成员头像与成员名之间的间距
2136
- const AI_TABLE_FILE_ICON_ITEM_HEIGHT = 20; // 文件字段项高度
2137
- const AI_TABLE_FILE_ICON_SIZE = 20; // 文件图标大小
2138
- const AI_TABLE_CELL_FIELD_ITEM_HEIGHT = 8; // 文件字段项右边距
2139
- const AI_TABLE_FIELD_ITEM_MARGIN_RIGHT = 8; // 文件图标之间的间距
2140
- const AI_TABLE_OPTION_ITEM_PADDING = 10; // 选项按钮间距
2141
- const AI_TABLE_OPTION_ITEM_HEIGHT = 24;
2142
- const AI_TABLE_OPTION_ITEM_FONT_SIZE = 14;
2143
- const AI_TABLE_OPTION_ITEM_RADIUS = 18;
2144
- const AI_TABLE_TAG_PADDING = 12;
2145
- const AI_TABLE_TAG_FONT_SIZE = 12;
2146
- const AI_TABLE_PIECE_WIDTH = 10;
2147
- const AI_TABLE_PIECE_RADIUS = 2;
2148
- const AI_TABLE_COMMON_FONT_SIZE = 14;
2149
- const AI_TABLE_DOT_RADIUS = 5;
2150
- const AI_TABLE_PROGRESS_BAR_HEIGHT = 10;
2151
- const AI_TABLE_PROGRESS_BAR_RADIUS = 5;
2152
- const AI_TABLE_PROGRESS_BAR_POINTER_HEIGHT = 18;
2153
- const AI_TABLE_PROGRESS_BAR_POINTER_WIDTH = 8;
2154
- const AI_TABLE_PROGRESS_TEXT_WIDTH = 46;
2155
- const AI_TABLE_POPOVER_LEFT_OFFSET = 4;
2156
- const AI_TABLE_RATE_MAX = 5;
2157
- const AI_TABLE_SCROLL_BAR_SIZE = 18;
2158
- const AI_TABLE_AUTO_SCROLL_LEFT_THRESHOLD = 40;
2159
- const AI_TABLE_AUTO_SCROLL_RIGHT_THRESHOLD = 40;
2160
- const AI_TABLE_AUTO_SCROLL_TOP_THRESHOLD = AI_TABLE_FIELD_HEAD_HEIGHT / 2;
2161
- const AI_TABLE_AUTO_SCROLL_BOTTOM_THRESHOLD = AI_TABLE_FIELD_HEAD_HEIGHT / 2;
2162
- const AI_TABLE_FIELD_STAT_HEIGHT = 48; // 字段统计高度
2163
-
2164
- const MIN_COLUMN_WIDTH = 80;
2165
- const DBL_CLICK_EDIT_TYPE = [
2166
- AITableFieldType.text,
2167
- AITableFieldType.number,
2168
- AITableFieldType.select,
2169
- AITableFieldType.date,
2170
- AITableFieldType.member,
2171
- AITableFieldType.link
2172
- ];
2173
- const RowHeight = {
2174
- Short: 32,
2175
- Medium: 57,
2176
- Tall: 104,
2177
- ExtraTall: 152
2178
- };
2179
- const DEFAULT_POINT_POSITION = {
2180
- areaType: AITableAreaType.none,
2181
- targetName: AI_TABLE_BLANK,
2182
- realTargetName: AI_TABLE_BLANK,
2183
- rowIndex: -1,
2184
- columnIndex: -1,
2185
- x: 0,
2186
- y: 0,
2187
- offsetTop: 0,
2188
- offsetLeft: 0
2189
- };
2190
- const DEFAULT_SCROLL_STATE = {
2191
- scrollTop: 0,
2192
- scrollLeft: 0,
2193
- isScrolling: false
2194
- };
2195
-
2196
- const DEFAULT_ICON_SHAPE = 'square';
2197
- const DEFAULT_ICON_SIZE = 16;
2198
- const Check = `
2199
- M15,1H3C1.9,1,1,1.9,1,3v12c0,1.1,0.9,2,2,2h12c1.1,0,2-0.9,2-2V3C17,1.9,16.1,1,15,1z M14,6.6l-5.7,5.7
2200
- c-0.2,0.2-0.4,0.3-0.6,0.3s-0.4-0.1-0.6-0.3L4.6,9.8c-0.3-0.3-0.3-0.9,0-1.2s0.9-0.3,1.2,0l1.9,1.9l5.1-5.1
2201
- c0.3-0.3,0.9-0.3,1.2,0C14.3,5.7,14.3,6.3,14,6.6z
2202
- `;
2203
- const Unchecked = `
2204
- M15,1H3C1.9,1,1,1.9,1,3v12c0,1.1,0.9,2,2,2h12c1.1,0,2-0.9,2-2V3C17,1.9,16.1,1,15,1z
2205
- M15.7,3.3v11.4c0,0.5-0.5,1-1,1H3.3c-0.5,0-1-0.5-1-1V3.3c0-0.5,0.5-1,1-1h11.4C15.2,2.3,15.7,2.8,15.7,3.3z
2206
- `;
2207
- const ColumnTextFilledPath = `M7.268 8.674l-2.076-4.86-2.076 4.86h4.152zm0.513 1.2H2.603l-1.294 3.03L0 12.902L4.49 2.4H5.894l4.484 10.486-1.31 0.002-1.287-3.014zm2.86 1.111c0-1.423 1.246-2.193 4.21-2.49 0-0.89-0.235-1.72-1.362-1.72-0.772 0-1.484 0.356-2.017 0.711l-0.475-0.771c0.653-0.415 1.602-0.889 2.669-0.889 1.602 0 2.313 1.127 2.313 2.787v4.151h-0.948l-0.12-0.83h-0.06c-0.651 0.534-1.422 0.949-2.252 0.949-1.127 0-1.957-0.652-1.957-1.898zm4.113-1.778c-2.253 0.296-3.024 0.83-3.024 1.72 0 0.77 0.534 1.067 1.186 1.067 0.652 0 1.186-0.297 1.838-0.89V9.207z`;
2208
- const ColumnRichTextFilledPath = `M14.5526,11.7084 C14.8845231,11.7084 15.1536,11.9774769 15.1536,12.3094 C15.1536,12.6413231 14.8845231,12.9104 14.5526,12.9104 L14.5526,12.9104 L11.7546,12.9104 C11.4226769,12.9104 11.1536,12.6413231 11.1536,12.3094 C11.1536,11.9774769 11.4226769,11.7084 11.7546,11.7084 L11.7546,11.7084 Z M5.894,2.4 L10.378,12.886 L9.068,12.888 L7.779,9.873 L2.603,9.873 L1.309,12.904 L2.84217094e-14,12.902 L4.49,2.4 L5.894,2.4 Z M5.191,3.814 L3.116,8.673 L7.267,8.673 L5.191,3.814 Z M14.5526,7.17723172 C14.8845231,7.17723172 15.1536,7.44630859 15.1536,7.77823172 C15.1536,8.11015486 14.8845231,8.37923172 14.5526,8.37923172 L14.5526,8.37923172 L10.7546,8.37923172 C10.4226769,8.37923172 10.1536,8.11015486 10.1536,7.77823172 C10.1536,7.44630859 10.4226769,7.17723172 10.7546,7.17723172 L10.7546,7.17723172 Z M14.5526,2.3094 C14.8845231,2.3094 15.1536,2.57847687 15.1536,2.9104 C15.1536,3.24232313 14.8845231,3.5114 14.5526,3.5114 L14.5526,3.5114 L9.7546,3.5114 C9.42267687,3.5114 9.1536,3.24232313 9.1536,2.9104 C9.1536,2.57847687 9.42267687,2.3094 9.7546,2.3094 L9.7546,2.3094 Z`;
2209
- const ColumnSelectFilledPath = `M8 16A8 8 0 1 1 8 0a8 8 0 0 1 0 16zm0-1.2A6.8 6.8 0 1 0 8 1.2a6.8 6.8 0 0 0 0 13.6zM5.666 7.207l1.8 1.845 3.482-3.554.857.84-4.34 4.43-2.658-2.723.86-.838z`;
2210
- const ColumnMultipleFillPath = `M2 2.551L3.576.976l.848.848L2 4.25.576 2.824l.848-.848L2 2.55zm0 5.425L3.576 6.4l.848.849L2 9.673.576 8.249l.848-.849.576.576zm0 5.4L3.576 11.8l.848.849L2 15.073.576 13.649l.848-.849.576.576zM5.663 2.6a.6.6 0 1 1 0-1.2H15.4a.6.6 0 0 1 0 1.2H5.663zm0 11.8a.6.6 0 0 1 0-1.2H15.4a.6.6 0 0 1 0 1.2H5.663zm0-6.2a.6.6 0 1 1 0-1.2H15.4a.6.6 0 0 1 0 1.2H5.663z`;
2211
- const ColumnCalendarFilledPath = `M10.9 3.2H5.1v1.6H3.9V3.2H1.2v3.2h13.6V3.2h-2.7v1.6h-1.2V3.2zM12.1 2H15a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H1a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1h2.9V.4h1.2V2h5.8V.4h1.2V2zm2.7 5.6H1.2v7.2h13.6V7.6z`;
2212
- const ColumnNumberFilledPath = `M4.236 9.9l.422-3.8H2.6a.6.6 0 1 1 0-1.2h2.19l.372-3.347a.6.6 0 1 1 1.192.133L5.998 4.9h4.793l.37-3.347a.6.6 0 0 1 1.193.133L11.998 4.9h2.459a.6.6 0 0 1 0 1.2h-2.592l-.421 3.8h2.013a.6.6 0 0 1 0 1.2H11.31l-.374 3.368a.6.6 0 0 1-1.192-.132l.358-3.236H5.311l-.374 3.368a.6.6 0 0 1-1.192-.132l.358-3.236H1.6a.6.6 0 0 1 0-1.2h2.636zm1.208 0h4.792l.422-3.8H5.865l-.421 3.8z`;
2213
- const ColumnLinkOutlinedPath = `M10.4238543,5.91643446 C11.7563563,7.48802206 11.6811634,9.84553933 10.1982756,11.3284271 L7.22842712,14.2982756 C5.66632996,15.8603728 3.13367004,15.8603728 1.57157288,14.2982756 C0.00947570825,12.7361784 0.00947570825,10.2035185 1.57157288,8.64142136 L2.387,7.82495116 L3.236,8.67395116 L2.42010101,9.48994949 C1.37219416,10.5378563 1.32853138,12.2097205 2.28911266,13.3096237 L2.42010101,13.4497475 C3.51356903,14.5432155 5.28643097,14.5432155 6.37989899,13.4497475 L9.34974747,10.479899 C10.3636395,9.46600698 10.4374244,7.86800734 9.57110232,6.76909967 L10.4238543,5.91643446 Z M14.4436815,1.67157288 C16.0057786,3.23367004 16.0057786,5.76632996 14.4436815,7.32842712 L13.5744058,8.198 L12.7254058,7.349 L13.5951533,6.47989899 C14.6430602,5.43199214 14.6867229,3.76012802 13.7261417,2.66022473 L13.5951533,2.52010101 C12.5016853,1.426633 10.7288234,1.426633 9.63535534,2.52010101 L6.66550686,5.48994949 C5.62228095,6.5331754 5.57434734,8.19479666 6.52170603,9.29485 L5.67236452,10.1460046 C4.25646867,8.57570748 4.3046734,6.15372668 5.81697872,4.64142136 L8.7868272,1.67157288 C10.3489244,0.109475708 12.8815843,0.109475708 14.4436815,1.67157288 Z`;
2214
- const ColumnRatingFilledPath = `M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0zm0 1.2a6.8 6.8 0 1 0 0 13.6A6.8 6.8 0 0 0 8 1.2zm.945 2.906l.077.106.064.112.03.069.564 1.46 1.646.1c.952.092 1.365 1.264.752 1.893l-.086.078-1.315 1.056.431 1.533c.295 1.031-.848 1.858-1.643 1.34l-.087-.063-1.315-.85-.006.001-1.309.842c-.85.567-1.903-.163-1.79-1.054l.019-.108.45-1.601-1.321-1.035c-.632-.633-.372-1.673.462-1.973l.123-.038.124-.026 1.571-.094.602-1.55c.364-.793 1.44-.836 1.957-.198zm-.91.815l-.809 2.085-2.253.134L6.8 8.571l-.602 2.139 1.44-.927.71-.087 1.569 1.016-.61-2.172 1.75-1.402-2.219-.134-.803-2.083z`;
2215
- const ColumnMemberFilledPath = `M10.212 8.416A6.603 6.603 0 0 1 14.5 14.6a.6.6 0 0 1-1.2 0 5.4 5.4 0 0 0-10.8 0 .6.6 0 0 1-1.2 0 6.602 6.602 0 0 1 4.159-6.134 4.1 4.1 0 1 1 4.753-.05zM7.8 8a2.9 2.9 0 1 0 0-5.8 2.9 2.9 0 0 0 0 5.8z`;
2216
- const ColumnProgressFilledPath = `M11.5 3.5a4.5 4.5 0 1 1 0 9h-7a4.5 4.5 0 1 1 0-9h7zm0 1.2h-7a3.3 3.3 0 0 0 0 6.6h7a3.3 3.3 0 1 0 0-6.6zM8 7.2v1.5H3.75a.75.75 0 0 1 0-1.5H8z`;
2217
- const AddOutlinedPath = `M8.578 7.383V1.602a.601.601 0 1 0-1.2 0v5.781H1.6a.601.601 0 0 0 0 1.203h5.777v5.812a.601.601 0 1 0 1.2 0V8.586H14.4a.601.601 0 0 0 0-1.203H8.578z`;
2218
- const MoreStandOutlinedPath = `M8 4.25a1.25 1.25 0 1 0 0-2.5 1.25 1.25 0 0 0 0 2.5zm0 5a1.25 1.25 0 1 0 0-2.5 1.25 1.25 0 0 0 0 2.5zm0 5a1.25 1.25 0 1 0 0-2.5 1.25 1.25 0 0 0 0 2.5z`;
2219
- const StarFill = `M9.186 2.12l1.02 2.769c.073.292.365.437.656.437l2.915.146c1.166.073 1.676 1.53.73 2.26l-2.26 1.821c-.219.146-.291.51-.219.729l.73 2.842c.29 1.093-.948 2.04-1.896 1.384l-2.477-1.603a.79.79 0 0 0-.802 0l-2.478 1.676c-.947.583-2.186-.291-1.894-1.457l.728-2.842c.073-.292 0-.583-.218-.729L1.46 7.731c-.874-.729-.437-2.186.73-2.259l2.914-.146c.292 0 .51-.218.656-.437l1.093-2.77c.365-1.092 1.895-1.092 2.332 0z`;
2220
- const WebOutlinedPath = `M1 8C1 4.13401 4.13401 1 8 1C11.866 1 15 4.13401 15 8C15 11.866 11.866 15 8 15C4.13401 15 1 11.866 1 8ZM6.04798 2.85646C4.19852 3.55874 2.82616 5.22986 2.55071 7.25H5.26373C5.31861 5.76009 5.53564 4.40148 5.87147 3.352C5.92605 3.18143 5.98481 3.0157 6.04798 2.85646ZM5.87147 12.648C5.53564 11.5985 5.31861 10.2399 5.26373 8.75H2.55071C2.82616 10.7701 4.19852 12.4413 6.04798 13.1435C5.98481 12.9843 5.92605 12.8186 5.87147 12.648ZM10.1285 12.648C10.0739 12.8186 10.0152 12.9843 9.95202 13.1435C11.8015 12.4413 13.1738 10.7701 13.4493 8.75H10.7363C10.6814 10.2399 10.4644 11.5985 10.1285 12.648ZM8.6999 12.1908C8.98163 11.3104 9.18095 10.1118 9.23518 8.75H6.76482C6.81905 10.1118 7.01837 11.3104 7.3001 12.1908C7.46768 12.7145 7.65131 13.0839 7.81962 13.3063C7.90746 13.4224 7.9686 13.4711 8 13.4906C8.0314 13.4711 8.09254 13.4224 8.18038 13.3063C8.34869 13.0839 8.53232 12.7145 8.6999 12.1908ZM7.3001 3.80916C7.01837 4.68959 6.81905 5.88818 6.76482 7.25H9.23518C9.18095 5.88818 8.98163 4.68959 8.6999 3.80916C8.53232 3.28548 8.34869 2.91612 8.18038 2.69367C8.09254 2.57756 8.0314 2.52893 8 2.50944C7.9686 2.52893 7.90746 2.57756 7.81962 2.69367C7.65131 2.91612 7.46768 3.28548 7.3001 3.80916ZM10.1285 3.352C10.4644 4.40148 10.6814 5.76009 10.7363 7.25H13.4493C13.1738 5.22986 11.8015 3.55874 9.95203 2.85646C10.0152 3.0157 10.0739 3.18143 10.1285 3.352Z`;
2221
- const DepartmentOutlinedPath = `M3 5.5C3 3.567 4.567 2 6.5 2C8.433 2 10 3.567 10 5.5C10 6.49548 9.5844 7.3939 8.91724 8.0312C10.7204 8.86779 12.017 10.6115 12.2217 12.6767C12.2976 13.4424 11.6682 14 11 14H2C1.33185 14 0.702358 13.4424 0.778277 12.6767C0.983033 10.6115 2.27961 8.86779 4.08276 8.0312C3.4156 7.3939 3 6.49548 3 5.5ZM8.5 5.5C8.5 4.39543 7.60457 3.5 6.5 3.5C5.39543 3.5 4.5 4.39543 4.5 5.5C4.5 6.60457 5.39543 7.5 6.5 7.5C7.60457 7.5 8.5 6.60457 8.5 5.5ZM2.31585 12.5H10.6841C10.3303 10.5108 8.59114 9 6.5 9C4.40886 9 2.66975 10.5108 2.31585 12.5Z', 'M11 3C10.5858 3 10.25 3.33579 10.25 3.75C10.25 4.16421 10.5858 4.5 11 4.5C11.6904 4.5 12.25 5.05964 12.25 5.75C12.25 6.44036 11.6904 7 11 7C10.5858 7 10.25 7.33579 10.25 7.75C10.25 8.16421 10.5858 8.5 11 8.5C12.6569 8.5 14 9.84315 14 11.5C14 11.9142 14.3358 12.25 14.75 12.25C15.1642 12.25 15.5 11.9142 15.5 11.5C15.5 9.77473 14.5291 8.27622 13.1038 7.52106C13.507 7.0426 13.75 6.42467 13.75 5.75C13.75 4.23122 12.5188 3 11 3Z`;
2222
- const AttachmentPath = `M9.1773124,11.8057395 C7.96668709,13.0163648 6.00387566,13.0163648 4.79325035,11.8057395 C3.58262505,10.5951142 3.58262505,8.63230278 4.78926443,7.4257012 L8.27628904,3.87217601 C8.50840068,3.63567937 8.88828274,3.63209333 9.12479868,3.86418566 C9.36131462,4.096278 9.36490066,4.47616006 9.13280833,4.712676 L5.64177849,8.27020561 C4.89978234,9.01220177 4.89978234,10.2152152 5.64177849,10.9572114 C6.38377464,11.6992075 7.5867881,11.6992075 8.32878426,10.9572114 L12.2321177,7.05387799 C13.3493901,5.93660552 13.2780395,4.02707269 12.0410949,2.79012806 C10.8041502,1.55318343 8.8946174,1.4818328 7.77734493,2.59910526 L3.72686067,6.64958953 C2.02034367,8.35610653 2.02835883,11.1329242 3.74721224,12.8517776 C5.46606565,14.570631 8.24288334,14.5786462 9.94940034,12.8721292 L13.5980637,9.22346588 C13.8323782,8.98915131 14.2122772,8.98915131 14.4465918,9.22346588 C14.6809064,9.45778046 14.6809064,9.83767945 14.4465918,10.071994 L10.7979285,13.7206573 C8.62168228,15.8969035 5.08507361,15.8866953 2.8986841,13.7003058 C0.712294592,11.5139163 0.702086332,7.97730759 2.87833253,5.8010614 L6.9288168,1.75057713 C8.52947856,0.149915361 11.1976354,0.249612361 12.889623,1.94159992 C14.5816106,3.63358749 14.6813076,6.30174436 13.0806458,7.90240612 L9.1773124,11.8057395 Z`;
2223
- const EditPath = `M2,8.33918294 L10.7095952,0 L15,4.17020474 L6.53816398,13 L2,13 L2,8.33918294 Z M3.2,8.85157902 L3.2,11.8 L6.02608482,11.8 L13.3091776,4.20020516 L10.7033283,1.66736141 L3.2,8.85157902 Z M0,16 L0,14.8 L16,14.8 L16,16 L0,16 Z`;
2224
- const RowDragPath = `M6,3 C6.55228475,3 7,2.55228475 7,2 C7,1.44771525 6.55228475,1 6,1 C5.44771525,1 5,1.44771525 5,2 C5,2.55228475 5.44771525,3 6,3 Z M10,3 C10.5522847,3 11,2.55228475 11,2 C11,1.44771525 10.5522847,1 10,1 C9.44771525,1 9,1.44771525 9,2 C9,2.55228475 9.44771525,3 10,3 Z M6,7 C6.55228475,7 7,6.55228475 7,6 C7,5.44771525 6.55228475,5 6,5 C5.44771525,5 5,5.44771525 5,6 C5,6.55228475 5.44771525,7 6,7 Z M10,7 C10.5522847,7 11,6.55228475 11,6 C11,5.44771525 10.5522847,5 10,5 C9.44771525,5 9,5.44771525 9,6 C9,6.55228475 9.44771525,7 10,7 Z M6,11 C6.55228475,11 7,10.5522847 7,10 C7,9.44771525 6.55228475,9 6,9 C5.44771525,9 5,9.44771525 5,10 C5,10.5522847 5.44771525,11 6,11 Z M10,11 C10.5522847,11 11,10.5522847 11,10 C11,9.44771525 10.5522847,9 10,9 C9.44771525,9 9,9.44771525 9,10 C9,10.5522847 9.44771525,11 10,11 Z M6,15 C6.55228475,15 7,14.5522847 7,14 C7,13.4477153 6.55228475,13 6,13 C5.44771525,13 5,13.4477153 5,14 C5,14.5522847 5.44771525,15 6,15 Z M10,15 C10.5522847,15 11,14.5522847 11,14 C11,13.4477153 10.5522847,13 10,13 C9.44771525,13 9,13.4477153 9,14 C9,14.5522847 9.44771525,15 10,15 Z`;
2225
- const AngleDownPath = `M7.97815,11.99732 L7.9728,12.00267 L2.2998,6.33067 L3.1298,5.49967 L7.97807731,10.3479473 L12.8255,5.49967 L13.6565,6.33067 L7.9835,12.00267 L7.97815,11.99732 Z`;
2226
- const IconPathMap = {};
2227
-
2228
- const DEFAULT_FONT_SIZE = 14;
2229
- const DEFAULT_FONT_FAMILY = '-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,PingFang SC,Helvetica Neue,Noto Sans,Noto Sans CJK SC,Microsoft Yahei,Arial,Hiragino Sans GB,sans-serif';
2230
- const DEFAULT_FONT_STYLE = 'normal';
2231
- const DEFAULT_TEXT_LINE_HEIGHT = 24;
2232
- const DEFAULT_TEXT_FILL = Colors.gray800;
2233
- const DEFAULT_FONT_WEIGHT = 'normal';
2234
- const DEFAULT_TEXT_WRAP = 'none';
2235
- const DEFAULT_TEXT_TRANSFORMS_ENABLED = 'position';
2236
- const DEFAULT_TEXT_ELLIPSIS = true;
2237
- const DEFAULT_TEXT_LISTENING = false;
2238
- const DEFAULT_TEXT_ALIGN_LEFT = 'left';
2239
- const DEFAULT_TEXT_ALIGN_CENTER = 'center';
2240
- const DEFAULT_TEXT_ALIGN_RIGHT = 'right';
2241
- const DEFAULT_TEXT_VERTICAL_ALIGN_MIDDLE = 'middle';
2242
- const DEFAULT_TEXT_MAX_HEIGHT = 130;
2243
- const DEFAULT_WRAP_TEXT_MAX_ROW = 1;
2244
- const DEFAULT_TEXT_VERTICAL_ALIGN_TOP = 'top';
2245
- const DEFAULT_TEXT_DECORATION = 'none';
2246
- const DEFAULT_TEXT_SCALE = 1;
2247
- const DEFAULT_TEXT_MAX_CACHE = 500;
2248
- const FONT_SIZE_SM = 12;
2226
+ if (!name) {
2227
+ return '';
2228
+ }
2229
+ name = name.trim();
2230
+ if (UNIFIED_IDEOGRAPHS_REGEX.test(name) && name.length > 2) {
2231
+ return name.slice(name.length - 2);
2232
+ }
2233
+ if (SET_OF_LETTERS_REGEX.test(name) && name.indexOf(' ') > 0) {
2234
+ const words = name.split(' ');
2235
+ return (words[0].slice(0, 1) + words[1].slice(0, 1)).toUpperCase();
2236
+ }
2237
+ return name.length > 2 ? name.slice(0, 2).toUpperCase() : name.toUpperCase();
2238
+ }
2239
+ function getAvatarBgColor(name) {
2240
+ if (!name) {
2241
+ return;
2242
+ }
2243
+ const colors = ['#56abfb', '#5dcfff', '#84e17e', '#73d897', '#ff9f73', '#fa8888', '#fb7fb7', '#9a7ef4', '#868af6'];
2244
+ const nameArray = name.split('');
2245
+ const code = name && name.length > 0
2246
+ ? nameArray.reduce(function (result, item) {
2247
+ result.value += item.charCodeAt(0);
2248
+ return result;
2249
+ }, { value: 0 }).value
2250
+ : 0;
2251
+ return colors[code % 9];
2252
+ }
2253
+ function expandCell(aiTable, path) {
2254
+ const [recordId, fieldId] = path;
2255
+ aiTable.selection.set({
2256
+ ...aiTable.selection(),
2257
+ expandCell: [recordId, fieldId]
2258
+ });
2259
+ }
2249
2260
 
2250
2261
  /**
2251
2262
  * 生成目标名称
@@ -2749,7 +2760,43 @@ function cellValueToSortValue$4(cellValue, field, references, sortKey = 'title')
2749
2760
  return values && values.length ? values.join(', ') : null;
2750
2761
  }
2751
2762
 
2763
+ const FIELD_STAT_TYPE_MAP = {
2764
+ [AITableStatType.EarliestTime]: {
2765
+ name: AITableGridI18nKey.earliestTime,
2766
+ type: AITableStatType.EarliestTime,
2767
+ format: AITableGridI18nKey.earliestTimeResult,
2768
+ exec: statEarliestTime
2769
+ },
2770
+ [AITableStatType.LatestTime]: {
2771
+ name: AITableGridI18nKey.latestTime,
2772
+ type: AITableStatType.LatestTime,
2773
+ format: AITableGridI18nKey.latestTimeResult,
2774
+ exec: statLatestTime
2775
+ },
2776
+ [AITableStatType.DateRangeOfDays]: {
2777
+ name: AITableGridI18nKey.dateRangeOfDays,
2778
+ type: AITableStatType.DateRangeOfDays,
2779
+ format: AITableGridI18nKey.dateRangeOfDaysResult,
2780
+ exec: statDateRangeOfDays
2781
+ },
2782
+ [AITableStatType.DateRangeOfMonths]: {
2783
+ name: AITableGridI18nKey.dateRangeOfMonths,
2784
+ type: AITableStatType.DateRangeOfMonths,
2785
+ format: AITableGridI18nKey.dateRangeOfMonthsResult,
2786
+ exec: statDateRangeOfMonths
2787
+ }
2788
+ };
2789
+
2752
2790
  class DateField extends DateFieldBase {
2791
+ constructor() {
2792
+ super([
2793
+ ...DEFAULT_FIELD_STAT_TYPE_ITEMS,
2794
+ FIELD_STAT_TYPE_MAP[AITableStatType.EarliestTime],
2795
+ FIELD_STAT_TYPE_MAP[AITableStatType.LatestTime],
2796
+ FIELD_STAT_TYPE_MAP[AITableStatType.DateRangeOfDays],
2797
+ FIELD_STAT_TYPE_MAP[AITableStatType.DateRangeOfMonths]
2798
+ ]);
2799
+ }
2753
2800
  transformCellValue(cellValue, options) {
2754
2801
  return transformToCellText(cellValue, options);
2755
2802
  }
@@ -3649,9 +3696,10 @@ const writeToAITable = async (aiTable, actions) => {
3649
3696
  const maxRecords = aiTable.context.maxRecords();
3650
3697
  const startRowIndex = aiTable.context.visibleRowsIndexMap().get(startRecordId) ?? 0;
3651
3698
  const lastRowIndex = aiTable.context.linearRows().length - 1;
3699
+ const recordsCount = aiTable.records().length;
3652
3700
  let appendRowCount = clipboardContent.length - (lastRowIndex - startRowIndex);
3653
- if (maxRecords && lastRowIndex + appendRowCount > maxRecords) {
3654
- appendRowCount = maxRecords - lastRowIndex;
3701
+ if (maxRecords && recordsCount + appendRowCount > maxRecords) {
3702
+ appendRowCount = maxRecords - recordsCount;
3655
3703
  result.isPasteOverMaxRecords = true;
3656
3704
  }
3657
3705
  actions.addRecord({ count: appendRowCount });
@@ -3660,8 +3708,9 @@ const writeToAITable = async (aiTable, actions) => {
3660
3708
  const copiedFieldLength = clipboardContent[0].length;
3661
3709
  const appendColCount = copiedFieldLength - (lastColIndex - startColIndex) - 1;
3662
3710
  const appendOffset = copiedFieldLength - appendColCount;
3711
+ const fieldsCount = aiTable.fields().length;
3663
3712
  for (let i = 0; i < appendColCount; i++) {
3664
- if (maxFields && lastColIndex + i + 1 < maxFields) {
3713
+ if (maxFields && fieldsCount + i + 1 < maxFields) {
3665
3714
  const originField = aiTableContent?.fields[appendOffset + i] || null;
3666
3715
  appendField(aiTable, originField, actions);
3667
3716
  }
@@ -5013,7 +5062,7 @@ class AITableCellLink extends CoverCellComponent {
5013
5062
  fillStyle: Colors.primary,
5014
5063
  fill: Colors.primary,
5015
5064
  height: rowHeight + 2,
5016
- lineHeight: 1.84,
5065
+ lineHeight: AI_TABLE_TEXT_LINE_HEIGHT,
5017
5066
  listening: true,
5018
5067
  ellipsis: true,
5019
5068
  textDecoration: 'underline',
@@ -5311,7 +5360,7 @@ class AITableCellRichText extends CoverCellComponent {
5311
5360
  width: textWidth,
5312
5361
  fillStyle: Colors.primary,
5313
5362
  height: rowHeight + 2,
5314
- lineHeight: 1.84,
5363
+ lineHeight: AI_TABLE_TEXT_LINE_HEIGHT,
5315
5364
  listening: false,
5316
5365
  ellipsis: true,
5317
5366
  zIndex
@@ -5534,7 +5583,7 @@ class AddRowLayout extends Layout {
5534
5583
  stroke: this.colors.gray200
5535
5584
  });
5536
5585
  }
5537
- renderFirstCell({ isHoverRow }) {
5586
+ renderFirstCell({ isHoverRow, isDisabled }) {
5538
5587
  if (!this.isFirst)
5539
5588
  return;
5540
5589
  const y = this.y;
@@ -5567,7 +5616,7 @@ class AddRowLayout extends Layout {
5567
5616
  y: y + (rowHeight - AI_TABLE_ICON_COMMON_SIZE) / 2 - AI_TABLE_OFFSET,
5568
5617
  data: AddOutlinedPath,
5569
5618
  size: AI_TABLE_ROW_HEAD_SIZE,
5570
- fill: this.readonly ? this.colors.gray300 : this.colors.gray600
5619
+ fill: this.readonly || isDisabled ? this.colors.gray300 : this.colors.gray600
5571
5620
  });
5572
5621
  }
5573
5622
  renderLastCell({ isHoverRow, isCheckedRow }) {
@@ -5590,9 +5639,10 @@ class AddRowLayout extends Layout {
5590
5639
  isHoverRow
5591
5640
  });
5592
5641
  }
5593
- render({ isHoverRow, isCheckedRow }) {
5642
+ render({ isHoverRow, isCheckedRow, isDisabled }) {
5594
5643
  this.renderFirstCell({
5595
- isHoverRow
5644
+ isHoverRow,
5645
+ isDisabled
5596
5646
  });
5597
5647
  this.renderCommonCell({
5598
5648
  isHoverRow
@@ -6906,11 +6956,13 @@ const createCells = (config) => {
6906
6956
  containerWidth: coordinate.containerWidth,
6907
6957
  rowHeadWidth: context.rowHeadWidth(),
6908
6958
  hiddenIndexColumn: !!context.aiFieldConfig()?.hiddenIndexColumn,
6909
- hiddenRowDrag: !!context.aiFieldConfig()?.hiddenRowDrag
6959
+ hiddenRowDrag: !!context.aiFieldConfig()?.hiddenRowDrag,
6960
+ readonly: aiTable.context?.readonly?.()
6910
6961
  });
6911
6962
  addRowLayout.render({
6912
6963
  isHoverRow,
6913
- isCheckedRow
6964
+ isCheckedRow,
6965
+ isDisabled: maxRecords ? aiTable.records().length >= maxRecords : false
6914
6966
  });
6915
6967
  break;
6916
6968
  }
@@ -7144,7 +7196,7 @@ class AITableAddField {
7144
7196
  const fields = this.config().fields || [];
7145
7197
  const index = this.config().columnStopIndex;
7146
7198
  const fieldId = fields.length && index < fields.length ? fields[index]._id : '';
7147
- const disabled = maxFields && aiTable.gridData().fields.length >= maxFields;
7199
+ const disabled = maxFields && aiTable.fields().length >= maxFields;
7148
7200
  return {
7149
7201
  name: generateTargetName({
7150
7202
  targetName: AI_TABLE_FIELD_ADD_BUTTON,
@@ -7173,7 +7225,7 @@ class AITableAddField {
7173
7225
  fill: Colors.gray600,
7174
7226
  listening: false,
7175
7227
  visible: !readonly,
7176
- disabled: maxFields ? aiTable.gridData().fields.length >= maxFields : false
7228
+ disabled: maxFields ? aiTable.fields().length >= maxFields : false
7177
7229
  };
7178
7230
  });
7179
7231
  }
@@ -7373,7 +7425,7 @@ class AITableFieldHead {
7373
7425
  width: Math.max(this.textData().width, AI_TABLE_FIELD_HEAD_TEXT_MIN_WIDTH),
7374
7426
  height: height + 2,
7375
7427
  text: field.name,
7376
- lineHeight: 1.84
7428
+ lineHeight: AI_TABLE_TEXT_LINE_HEIGHT
7377
7429
  };
7378
7430
  });
7379
7431
  this.moreIconConfig = computed(() => {
@@ -7641,7 +7693,7 @@ class AITableFrozenColumnHeads {
7641
7693
  });
7642
7694
  this.textConfig = computed(() => {
7643
7695
  const text = AI_TABLE_INDEX_FIELD_TEXT;
7644
- const lineHeight = 1.84;
7696
+ const lineHeight = AI_TABLE_TEXT_LINE_HEIGHT;
7645
7697
  const measureText = TextMeasure().measureText(text);
7646
7698
  return {
7647
7699
  x: AI_TABLE_CELL_PADDING + this.dragOccupyWidth() + measureText.width / 2,
@@ -7965,7 +8017,7 @@ class AITableOtherRows {
7965
8017
  for (let rowIndex = rowStartIndex; rowIndex <= rowStopIndex; rowIndex++) {
7966
8018
  if (rowIndex > coordinate.rowCount - 1)
7967
8019
  break;
7968
- if (maxRecords && rowIndex >= maxRecords)
8020
+ if (maxRecords && aiTable.records().length >= maxRecords)
7969
8021
  break;
7970
8022
  const { _id, type } = aiTable.context.linearRows()[rowIndex];
7971
8023
  if (type === AITableRowType.record)
@@ -8044,6 +8096,173 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImpo
8044
8096
  }]
8045
8097
  }] });
8046
8098
 
8099
+ class AITableBackground {
8100
+ constructor() {
8101
+ this.config = input.required();
8102
+ this.isActive = input(false);
8103
+ this.koClick = output();
8104
+ this.hover = output();
8105
+ this.koMouseenter = output();
8106
+ this.koMouseleave = output();
8107
+ this.groupConfig = computed(() => {
8108
+ const { x, y } = this.config();
8109
+ return { x, y, listening: false };
8110
+ });
8111
+ this.isHover = model(false);
8112
+ this.isShowSpecialBorderConfig = computed(() => {
8113
+ const { borders } = this.config();
8114
+ const stroke = this.stroke();
8115
+ const strokeWidth = this.strokeWidth();
8116
+ return borders && stroke && strokeWidth && ___default.some(borders, (item) => !item) && ___default.some(borders, (item) => !!item);
8117
+ });
8118
+ this.borderLinesConfig = computed(() => {
8119
+ const { borders, height, width } = this.config();
8120
+ const stroke = this.stroke();
8121
+ const strokeWidth = this.strokeWidth();
8122
+ const result = [];
8123
+ const [top, right, bottom, left] = borders || [false, false, false, false];
8124
+ if (top) {
8125
+ result.push({
8126
+ x: 0,
8127
+ y: 0,
8128
+ points: [0, 0, width, 0],
8129
+ stroke,
8130
+ strokeWidth,
8131
+ listening: false
8132
+ });
8133
+ }
8134
+ if (right) {
8135
+ result.push({
8136
+ x: 0,
8137
+ y: 0,
8138
+ points: [width, 0, width, height],
8139
+ stroke,
8140
+ strokeWidth,
8141
+ listening: false
8142
+ });
8143
+ }
8144
+ if (bottom) {
8145
+ result.push({
8146
+ x: 0,
8147
+ y: 0,
8148
+ points: [0, height, width, height],
8149
+ stroke,
8150
+ strokeWidth,
8151
+ listening: false
8152
+ });
8153
+ }
8154
+ if (left) {
8155
+ result.push({
8156
+ x: 0,
8157
+ y: 0,
8158
+ points: [0, 0, 0, height],
8159
+ stroke,
8160
+ strokeWidth,
8161
+ listening: false
8162
+ });
8163
+ }
8164
+ return result;
8165
+ });
8166
+ this.stroke = computed(() => {
8167
+ const { stroke, hoverStroke } = this.config();
8168
+ const active = this.isHover() || this.isActive();
8169
+ return active ? hoverStroke || stroke : stroke;
8170
+ });
8171
+ this.strokeWidth = computed(() => {
8172
+ const { strokeWidth, hoverStrokeWidth } = this.config();
8173
+ const active = this.isHover() || this.isActive();
8174
+ return active ? hoverStrokeWidth || strokeWidth : strokeWidth;
8175
+ });
8176
+ this.containerConfig = computed(() => {
8177
+ const { x, y } = this.config();
8178
+ return { x, y };
8179
+ });
8180
+ this.bgConfig = computed(() => {
8181
+ const { name, width, height, fill = Colors.transparent, cornerRadius, opacity, hoverFill, hoverOpacity, listening } = this.config();
8182
+ const active = this.isHover() || this.isActive();
8183
+ const result = {
8184
+ name,
8185
+ width,
8186
+ height,
8187
+ fill: active ? hoverFill || fill : fill,
8188
+ cornerRadius,
8189
+ opacity: active ? hoverOpacity || opacity : opacity,
8190
+ listening
8191
+ };
8192
+ if (!this.isShowSpecialBorderConfig()) {
8193
+ result.stroke = this.stroke();
8194
+ result.strokeWidth = this.strokeWidth();
8195
+ }
8196
+ return result;
8197
+ });
8198
+ }
8199
+ onClick(e) {
8200
+ this.koClick.emit(e);
8201
+ }
8202
+ koMousemove(e) {
8203
+ // e.event.cancelBubble = true;
8204
+ }
8205
+ onMouseenter(e) {
8206
+ this.isHover.set(true);
8207
+ const { coordinate } = this.config();
8208
+ setMouseStyle('pointer', coordinate.container);
8209
+ this.koMouseenter.emit(e);
8210
+ this.hover.emit(this.isHover());
8211
+ }
8212
+ onMouseleave(e) {
8213
+ this.isHover.set(false);
8214
+ const { coordinate } = this.config();
8215
+ setMouseStyle('default', coordinate.container);
8216
+ this.koMouseleave.emit(e);
8217
+ this.hover.emit(this.isHover());
8218
+ }
8219
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AITableBackground, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
8220
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.10", type: AITableBackground, isStandalone: true, selector: "ai-table-background", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: true, transformFunction: null }, isActive: { classPropertyName: "isActive", publicName: "isActive", isSignal: true, isRequired: false, transformFunction: null }, isHover: { classPropertyName: "isHover", publicName: "isHover", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { koClick: "koClick", hover: "hover", koMouseenter: "koMouseenter", koMouseleave: "koMouseleave", isHover: "isHoverChange" }, ngImport: i0, template: `
8221
+ <ko-group [config]="containerConfig()">
8222
+ <ko-group>
8223
+ <ko-rect
8224
+ [config]="bgConfig()"
8225
+ (koMousemove)="koMousemove($event)"
8226
+ (koMouseenter)="onMouseenter($event)"
8227
+ (koMouseleave)="onMouseleave($event)"
8228
+ (koClick)="koClick.emit($event)"
8229
+ ></ko-rect>
8230
+ </ko-group>
8231
+ <ko-group>
8232
+ @for (lineConfig of borderLinesConfig(); track $index) {
8233
+ <ko-line [config]="lineConfig"></ko-line>
8234
+ }
8235
+ </ko-group>
8236
+ </ko-group>
8237
+ `, isInline: true, dependencies: [{ kind: "component", type: KoShape, selector: "ko-shape, ko-circle, ko-label, ko-rect, ko-ellipse, ko-wedge, ko-line, ko-sprite, ko-image, ko-text, ko-text-path, ko-star, ko-ring, ko-arc, ko-tag, ko-path, ko-regular-polygon, ko-arrow, ko-transformer", inputs: ["config"], outputs: ["koMouseover", "koMousemove", "koMouseout", "koMouseenter", "koMouseleave", "koMousedown", "koMouseup", "koWheel", "koContextmenu", "koClick", "koDblclick", "koTouchstart", "koTouchmove", "koTouchend", "koTap", "koDbltap", "koDragstart", "koDragmove", "koDragend"] }, { kind: "component", type: KoContainer, selector: "ko-layer, ko-fastlayer, ko-group" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
8238
+ }
8239
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AITableBackground, decorators: [{
8240
+ type: Component,
8241
+ args: [{
8242
+ selector: 'ai-table-background',
8243
+ template: `
8244
+ <ko-group [config]="containerConfig()">
8245
+ <ko-group>
8246
+ <ko-rect
8247
+ [config]="bgConfig()"
8248
+ (koMousemove)="koMousemove($event)"
8249
+ (koMouseenter)="onMouseenter($event)"
8250
+ (koMouseleave)="onMouseleave($event)"
8251
+ (koClick)="koClick.emit($event)"
8252
+ ></ko-rect>
8253
+ </ko-group>
8254
+ <ko-group>
8255
+ @for (lineConfig of borderLinesConfig(); track $index) {
8256
+ <ko-line [config]="lineConfig"></ko-line>
8257
+ }
8258
+ </ko-group>
8259
+ </ko-group>
8260
+ `,
8261
+ imports: [KoShape, KoContainer],
8262
+ changeDetection: ChangeDetectionStrategy.OnPush
8263
+ }]
8264
+ }] });
8265
+
8047
8266
  class AITableFillHandle {
8048
8267
  constructor() {
8049
8268
  this.config = input.required();
@@ -8210,7 +8429,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImpo
8210
8429
  }] });
8211
8430
 
8212
8431
  const createFieldStats = (config) => {
8213
- const { coordinate, columnStartIndex, columnStopIndex, aiTable, actions } = config;
8432
+ const { coordinate, columnStartIndex, columnStopIndex, aiTable, actions, y, isHoverStatContainer, readonly } = config;
8214
8433
  const colors = Colors;
8215
8434
  const { columnCount, rowInitSize: fieldHeadHeight } = coordinate;
8216
8435
  const fields = aiTable.gridData().fields;
@@ -8229,12 +8448,15 @@ const createFieldStats = (config) => {
8229
8448
  aiTable,
8230
8449
  coordinate,
8231
8450
  actions,
8451
+ columnIndex,
8232
8452
  x,
8233
- y: coordinate.containerHeight - AI_TABLE_FIELD_STAT_HEIGHT,
8453
+ y,
8234
8454
  width: columnWidth,
8235
- height: fieldHeadHeight,
8455
+ height: AI_TABLE_FIELD_STAT_HEIGHT,
8236
8456
  field,
8237
- stroke: columnIndex === 0 ? colors.transparent : undefined
8457
+ stroke: columnIndex === 0 ? colors.transparent : undefined,
8458
+ isHoverStatContainer: isHoverStatContainer,
8459
+ readonly
8238
8460
  };
8239
8461
  fieldStats.push(fieldStat);
8240
8462
  }
@@ -8248,6 +8470,7 @@ class AITableStatTypeMenu extends ThyDropdownAbstractMenu {
8248
8470
  this.aiTable = input.required();
8249
8471
  this.statMenus = input.required();
8250
8472
  this.menuClick = output();
8473
+ this.selectStatType = computed(() => this.field().stat_type || AITableStatType.None);
8251
8474
  }
8252
8475
  execute(menu) {
8253
8476
  this.menuClick.emit({
@@ -8256,33 +8479,37 @@ class AITableStatTypeMenu extends ThyDropdownAbstractMenu {
8256
8479
  });
8257
8480
  }
8258
8481
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AITableStatTypeMenu, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
8259
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.10", type: AITableStatTypeMenu, isStandalone: true, selector: "ai-table-stat-type-menu", inputs: { field: { classPropertyName: "field", publicName: "field", isSignal: true, isRequired: true, transformFunction: null }, aiTable: { classPropertyName: "aiTable", publicName: "aiTable", isSignal: true, isRequired: true, transformFunction: null }, statMenus: { classPropertyName: "statMenus", publicName: "statMenus", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { menuClick: "menuClick" }, host: { classAttribute: "stat-type-menu" }, usesInheritance: true, ngImport: i0, template: "@if (field()) {\n @for (menu of statMenus(); track index; let index = $index) {\n <a thyDropdownMenuItem href=\"javascript:;\" (click)=\"execute(menu)\">\n <span>{{ menu.name }}</span>\n </a>\n }\n}\n", dependencies: [{ kind: "directive", type: ThyDropdownMenuItemDirective, selector: "[thyDropdownMenuItem]", inputs: ["thyType", "thyDisabled"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
8482
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.10", type: AITableStatTypeMenu, isStandalone: true, selector: "ai-table-stat-type-menu", inputs: { field: { classPropertyName: "field", publicName: "field", isSignal: true, isRequired: true, transformFunction: null }, aiTable: { classPropertyName: "aiTable", publicName: "aiTable", isSignal: true, isRequired: true, transformFunction: null }, statMenus: { classPropertyName: "statMenus", publicName: "statMenus", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { menuClick: "menuClick" }, host: { classAttribute: "stat-type-menu" }, usesInheritance: true, ngImport: i0, template: "@if (field()) {\n @for (menu of statMenus(); track index; let index = $index) {\n <a\n thyDropdownMenuItem\n href=\"javascript:;\"\n [ngClass]=\"{\n active: selectStatType() === menu.type\n }\"\n (click)=\"execute(menu)\"\n >\n <span>{{ menu.name }}</span>\n </a>\n }\n}\n", dependencies: [{ kind: "directive", type: ThyDropdownMenuItemDirective, selector: "[thyDropdownMenuItem]", inputs: ["thyType", "thyDisabled"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
8260
8483
  }
8261
8484
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AITableStatTypeMenu, decorators: [{
8262
8485
  type: Component,
8263
8486
  args: [{ selector: 'ai-table-stat-type-menu', changeDetection: ChangeDetectionStrategy.OnPush, host: {
8264
8487
  class: 'stat-type-menu'
8265
- }, imports: [ThyDropdownMenuItemDirective], template: "@if (field()) {\n @for (menu of statMenus(); track index; let index = $index) {\n <a thyDropdownMenuItem href=\"javascript:;\" (click)=\"execute(menu)\">\n <span>{{ menu.name }}</span>\n </a>\n }\n}\n" }]
8488
+ }, imports: [ThyDropdownMenuItemDirective, NgClass], template: "@if (field()) {\n @for (menu of statMenus(); track index; let index = $index) {\n <a\n thyDropdownMenuItem\n href=\"javascript:;\"\n [ngClass]=\"{\n active: selectStatType() === menu.type\n }\"\n (click)=\"execute(menu)\"\n >\n <span>{{ menu.name }}</span>\n </a>\n }\n}\n" }]
8266
8489
  }] });
8267
8490
 
8268
8491
  class AITableFieldStat {
8269
8492
  constructor() {
8270
8493
  this.thyPopover = inject(ThyPopover);
8271
8494
  this.config = input.required();
8272
- this.textOffset = AI_TABLE_CELL_PADDING + AI_TABLE_ICON_COMMON_SIZE + AI_TABLE_FIELD_HEAD_ICON_GAP_SIZE;
8273
- this.textMeasure = TextMeasure();
8495
+ this.hover = output();
8496
+ this.isActive = signal(false);
8274
8497
  this.availableTextWidth = computed(() => {
8275
8498
  const { width } = this.config();
8276
- return width - AI_TABLE_ICON_COMMON_SIZE;
8499
+ return width - AI_TABLE_ACTION_COMMON_SIZE - AI_TABLE_CELL_PADDING;
8277
8500
  });
8278
8501
  this.textData = computed(() => {
8279
- const fieldName = this.config().field.name.replace(/\r|\n/g, ' ');
8280
- this.textMeasure.setFont({ fontSize: DEFAULT_FONT_SIZE });
8281
- const { width, height, isOverflow } = this.textMeasure.measureText(fieldName, this.availableTextWidth(), 1);
8502
+ const textString = this.renderText() || '';
8503
+ const availableTextWidth = this.availableTextWidth();
8504
+ const { text, textWidth } = drawer.textEllipsis({
8505
+ text: textString,
8506
+ maxWidth: availableTextWidth,
8507
+ fontSize: DEFAULT_FONT_SIZE,
8508
+ fontWeight: DEFAULT_FONT_WEIGHT
8509
+ });
8282
8510
  return {
8283
- width: Math.min(width, this.availableTextWidth()),
8284
- height,
8285
- isOverflow
8511
+ width: textWidth,
8512
+ text
8286
8513
  };
8287
8514
  });
8288
8515
  this.groupConfig = computed(() => {
@@ -8292,21 +8519,22 @@ class AITableFieldStat {
8292
8519
  };
8293
8520
  });
8294
8521
  this.bgConfig = computed(() => {
8295
- const { field, width, height } = this.config();
8522
+ const { field, width, height, coordinate, readonly } = this.config();
8296
8523
  return {
8297
- x: AI_TABLE_OFFSET,
8298
- y: AI_TABLE_OFFSET,
8524
+ coordinate,
8525
+ x: 0,
8526
+ y: 0,
8299
8527
  name: generateTargetName({
8300
- targetName: 'sss',
8528
+ targetName: AI_TABLE_FIELD_STAT_BG,
8301
8529
  fieldId: field._id,
8302
8530
  mouseStyle: 'pointer'
8303
8531
  }),
8304
8532
  width: width,
8305
8533
  height: height,
8306
8534
  fill: Colors.white,
8307
- stroke: Colors.gray200,
8308
- strokeWidth: 1,
8309
- opacity: 1
8535
+ hoverFill: Colors.gray100,
8536
+ opacity: 1,
8537
+ listening: !readonly
8310
8538
  };
8311
8539
  });
8312
8540
  this.field = computed(() => {
@@ -8315,30 +8543,93 @@ class AITableFieldStat {
8315
8543
  });
8316
8544
  this.records = computed(() => {
8317
8545
  const { aiTable } = this.config();
8318
- return aiTable.records;
8546
+ return aiTable.gridData().records;
8547
+ });
8548
+ this.aiFieldConfig = computed(() => {
8549
+ const { aiTable } = this.config();
8550
+ return aiTable.context?.aiFieldConfig;
8551
+ });
8552
+ this.aiTable = computed(() => {
8553
+ const { aiTable } = this.config();
8554
+ return aiTable;
8555
+ });
8556
+ this.options = computed(() => {
8557
+ const aiTable = this.aiTable();
8558
+ return {
8559
+ field: this.field(),
8560
+ aiTable
8561
+ };
8319
8562
  });
8320
- this.statValue = computed(() => {
8563
+ this.isHoverStatContainer = computed(() => this.config().isHoverStatContainer);
8564
+ this.renderText = computed(() => {
8321
8565
  const field = this.field();
8322
8566
  const records = this.records();
8323
8567
  const fieldModel = FieldModelMap[field.type];
8324
- const result = fieldModel.getStatFormatValue(field, records());
8325
- return result;
8568
+ const selectedInfo = this.selectedInfo();
8569
+ if (this.isFirstColumn() && selectedInfo.isSelected) {
8570
+ if (selectedInfo.selectedType === 'records') {
8571
+ return `已经选择 ${selectedInfo.selectedCount} 条记录`;
8572
+ }
8573
+ else {
8574
+ return `已经选择 ${selectedInfo.selectedCount} 个单元格`;
8575
+ }
8576
+ }
8577
+ else {
8578
+ const result = fieldModel.getStatFormatValue(records, this.options());
8579
+ if (!result && this.isHoverStatContainer()) {
8580
+ return `不展示`;
8581
+ }
8582
+ return result;
8583
+ }
8584
+ });
8585
+ this.containerBox = computed(() => {
8586
+ const { height, width } = this.config();
8587
+ return { height, width };
8326
8588
  });
8327
8589
  this.textConfig = computed(() => {
8328
- const { field, height, aiTable } = this.config();
8329
- const text = this.statValue();
8590
+ const { height, width } = this.containerBox();
8591
+ const text = this.renderText();
8330
8592
  if (text) {
8593
+ const renderWidth = this.textData().width;
8331
8594
  return {
8332
- x: this.textOffset,
8595
+ x: width - AI_TABLE_ACTION_COMMON_SIZE - renderWidth,
8333
8596
  y: 0,
8334
- width: Math.max(this.textData().width, AI_TABLE_FIELD_HEAD_TEXT_MIN_WIDTH),
8335
- height: height + 2,
8336
- text: this.statValue(),
8337
- lineHeight: 1.84
8597
+ width: renderWidth,
8598
+ height: height,
8599
+ text: this.textData().text,
8600
+ lineHeight: AI_TABLE_TEXT_LINE_HEIGHT,
8601
+ listening: false
8338
8602
  };
8339
8603
  }
8340
8604
  return null;
8341
8605
  });
8606
+ this.selectedRecordCount = computed(() => {
8607
+ const aiTable = this.aiTable();
8608
+ const selectedRecords = aiTable.selection().selectedRecords;
8609
+ return selectedRecords.size;
8610
+ });
8611
+ this.selectedCellCount = computed(() => {
8612
+ const aiTable = this.aiTable();
8613
+ const selectedCells = aiTable.selection().selectedCells;
8614
+ return selectedCells.size;
8615
+ });
8616
+ this.selectedInfo = computed(() => {
8617
+ const selectedRecordCount = this.selectedRecordCount();
8618
+ const selectedCellCount = this.selectedCellCount();
8619
+ const selectedCount = selectedRecordCount || selectedCellCount;
8620
+ const selectedType = selectedRecordCount > 0 ? 'records' : selectedCellCount > 0 ? 'cells' : null;
8621
+ const isSelected = selectedRecordCount > 0 || selectedCellCount > 1;
8622
+ const result = {
8623
+ isSelected,
8624
+ selectedType,
8625
+ selectedCount
8626
+ };
8627
+ return result;
8628
+ });
8629
+ this.isFirstColumn = computed(() => {
8630
+ const { columnIndex } = this.config();
8631
+ return columnIndex === 0;
8632
+ });
8342
8633
  this.iconConfig = computed(() => {
8343
8634
  const { field, width, height } = this.config();
8344
8635
  const commonIconOffsetY = (height - AI_TABLE_ACTION_COMMON_SIZE) / 2;
@@ -8355,8 +8646,12 @@ class AITableFieldStat {
8355
8646
  };
8356
8647
  });
8357
8648
  }
8649
+ onHoverChange(isHover) {
8650
+ this.hover.emit(this.isActive() || isHover);
8651
+ }
8358
8652
  clickStat(e) {
8359
8653
  e.event.evt.stopPropagation();
8654
+ this.isActive.set(true);
8360
8655
  const { aiTable, coordinate, field, actions } = this.config();
8361
8656
  const statRect = e.event.target.getClientRect();
8362
8657
  const fieldGroupRect = e.event.target.getParent()?.getParent()?.getClientRect();
@@ -8382,21 +8677,31 @@ class AITableFieldStat {
8382
8677
  position: editFieldPosition,
8383
8678
  aiTable,
8384
8679
  field,
8385
- statMenus: fieldModel.statTypes
8386
- // fieldMenus:
8680
+ statMenus: fieldModel.getStatTypes(aiTable)
8387
8681
  }
8388
8682
  });
8389
8683
  ref.componentInstance.menuClick.subscribe((event) => {
8684
+ this.isActive.set(false);
8390
8685
  actions.setField({
8391
8686
  ...event.field,
8392
8687
  stat_type: event.menu.type
8393
8688
  });
8394
8689
  });
8690
+ ref.afterClosed().subscribe(() => {
8691
+ this.isActive.set(false);
8692
+ this.hover.emit(false);
8693
+ });
8395
8694
  }
8396
8695
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AITableFieldStat, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
8397
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.10", type: AITableFieldStat, isStandalone: true, selector: "ai-table-field-stat", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: `
8696
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.10", type: AITableFieldStat, isStandalone: true, selector: "ai-table-field-stat", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { hover: "hover" }, ngImport: i0, template: `
8398
8697
  <ko-group [config]="groupConfig()">
8399
- <ko-rect [config]="bgConfig()" (koClick)="clickStat($event)"></ko-rect>
8698
+ <ai-table-background
8699
+ [config]="bgConfig()"
8700
+ (koClick)="clickStat($event)"
8701
+ [isActive]="isActive()"
8702
+ (hover)="onHoverChange($event)"
8703
+ ></ai-table-background>
8704
+
8400
8705
  @if (textConfig()) {
8401
8706
  <ko-group>
8402
8707
  <ai-table-text [config]="textConfig()!"></ai-table-text>
@@ -8404,7 +8709,7 @@ class AITableFieldStat {
8404
8709
  </ko-group>
8405
8710
  }
8406
8711
  </ko-group>
8407
- `, isInline: true, dependencies: [{ kind: "component", type: KoContainer, selector: "ko-layer, ko-fastlayer, ko-group" }, { kind: "component", type: KoShape, selector: "ko-shape, ko-circle, ko-label, ko-rect, ko-ellipse, ko-wedge, ko-line, ko-sprite, ko-image, ko-text, ko-text-path, ko-star, ko-ring, ko-arc, ko-tag, ko-path, ko-regular-polygon, ko-arrow, ko-transformer", inputs: ["config"], outputs: ["koMouseover", "koMousemove", "koMouseout", "koMouseenter", "koMouseleave", "koMousedown", "koMouseup", "koWheel", "koContextmenu", "koClick", "koDblclick", "koTouchstart", "koTouchmove", "koTouchend", "koTap", "koDbltap", "koDragstart", "koDragmove", "koDragend"] }, { kind: "component", type: AITableTextComponent, selector: "ai-table-text", inputs: ["config"], outputs: ["koClick", "koMouseMove"] }, { kind: "component", type: AITableIcon, selector: "ai-table-icon", inputs: ["config"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
8712
+ `, isInline: true, dependencies: [{ kind: "component", type: KoContainer, selector: "ko-layer, ko-fastlayer, ko-group" }, { kind: "component", type: AITableTextComponent, selector: "ai-table-text", inputs: ["config"], outputs: ["koClick", "koMouseMove"] }, { kind: "component", type: AITableIcon, selector: "ai-table-icon", inputs: ["config"] }, { kind: "component", type: AITableBackground, selector: "ai-table-background", inputs: ["config", "isActive", "isHover"], outputs: ["koClick", "hover", "koMouseenter", "koMouseleave", "isHoverChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
8408
8713
  }
8409
8714
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AITableFieldStat, decorators: [{
8410
8715
  type: Component,
@@ -8412,7 +8717,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImpo
8412
8717
  selector: 'ai-table-field-stat',
8413
8718
  template: `
8414
8719
  <ko-group [config]="groupConfig()">
8415
- <ko-rect [config]="bgConfig()" (koClick)="clickStat($event)"></ko-rect>
8720
+ <ai-table-background
8721
+ [config]="bgConfig()"
8722
+ (koClick)="clickStat($event)"
8723
+ [isActive]="isActive()"
8724
+ (hover)="onHoverChange($event)"
8725
+ ></ai-table-background>
8726
+
8416
8727
  @if (textConfig()) {
8417
8728
  <ko-group>
8418
8729
  <ai-table-text [config]="textConfig()!"></ai-table-text>
@@ -8421,7 +8732,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImpo
8421
8732
  }
8422
8733
  </ko-group>
8423
8734
  `,
8424
- imports: [KoContainer, KoShape, AITableTextComponent, AITableIcon],
8735
+ imports: [KoContainer, AITableTextComponent, AITableIcon, AITableBackground],
8425
8736
  changeDetection: ChangeDetectionStrategy.OnPush
8426
8737
  }]
8427
8738
  }] });
@@ -8429,32 +8740,37 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImpo
8429
8740
  class AITableFieldStats {
8430
8741
  constructor() {
8431
8742
  this.config = input.required();
8432
- this.statConfigs = computed(() => {
8433
- const { coordinate, columnStartIndex } = this.config();
8434
- const { frozenColumnCount } = coordinate;
8435
- return createFieldStats({
8436
- ...this.config(),
8437
- columnStartIndex: Math.max(columnStartIndex, frozenColumnCount)
8438
- });
8439
- });
8743
+ this.hover = output();
8744
+ this.isHover = signal(false);
8745
+ this.statConfigs = computed(() => createFieldStats(this.config()));
8746
+ }
8747
+ onMouseenter(e) {
8748
+ this.isHover.set(true);
8749
+ }
8750
+ onMouseleave(e) {
8751
+ this.isHover.set(false);
8440
8752
  }
8441
8753
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AITableFieldStats, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
8442
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.10", type: AITableFieldStats, isStandalone: true, selector: "ai-table-column-stats", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: `
8443
- @for (config of statConfigs(); track $index) {
8444
- <ai-table-field-stat [config]="config"></ai-table-field-stat>
8445
- }
8446
- `, isInline: true, dependencies: [{ kind: "component", type: AITableFieldStat, selector: "ai-table-field-stat", inputs: ["config"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
8754
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.10", type: AITableFieldStats, isStandalone: true, selector: "ai-table-column-stats", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { hover: "hover" }, ngImport: i0, template: `
8755
+ <ko-group>
8756
+ @for (config of statConfigs(); track $index) {
8757
+ <ai-table-field-stat [config]="config" (hover)="hover.emit($event)"></ai-table-field-stat>
8758
+ }
8759
+ </ko-group>
8760
+ `, isInline: true, dependencies: [{ kind: "component", type: AITableFieldStat, selector: "ai-table-field-stat", inputs: ["config"], outputs: ["hover"] }, { kind: "component", type: KoContainer, selector: "ko-layer, ko-fastlayer, ko-group" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
8447
8761
  }
8448
8762
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AITableFieldStats, decorators: [{
8449
8763
  type: Component,
8450
8764
  args: [{
8451
8765
  selector: 'ai-table-column-stats',
8452
8766
  template: `
8453
- @for (config of statConfigs(); track $index) {
8454
- <ai-table-field-stat [config]="config"></ai-table-field-stat>
8455
- }
8767
+ <ko-group>
8768
+ @for (config of statConfigs(); track $index) {
8769
+ <ai-table-field-stat [config]="config" (hover)="hover.emit($event)"></ai-table-field-stat>
8770
+ }
8771
+ </ko-group>
8456
8772
  `,
8457
- imports: [AITableFieldStat],
8773
+ imports: [AITableFieldStat, KoContainer],
8458
8774
  changeDetection: ChangeDetectionStrategy.OnPush
8459
8775
  }]
8460
8776
  }] });
@@ -8471,6 +8787,7 @@ class AITableRenderer {
8471
8787
  this.koClick = output();
8472
8788
  this.koDblclick = output();
8473
8789
  this.koMouseleave = output();
8790
+ this.isHoverStatContainer = signal(false);
8474
8791
  this.fields = computed(() => {
8475
8792
  return AITable.getVisibleFields(this.config().aiTable);
8476
8793
  });
@@ -8489,6 +8806,9 @@ class AITableRenderer {
8489
8806
  this.containerHeight = computed(() => {
8490
8807
  return this.config().containerHeight;
8491
8808
  });
8809
+ this.gridContainerHeight = computed(() => {
8810
+ return this.containerHeight() - AI_TABLE_FIELD_STAT_CONTAINER_HEIGHT;
8811
+ });
8492
8812
  this.scrollState = computed(() => {
8493
8813
  return this.config()?.aiTable.context.scrollState();
8494
8814
  });
@@ -8520,7 +8840,15 @@ class AITableRenderer {
8520
8840
  clipX: 0,
8521
8841
  clipY: 0,
8522
8842
  clipWidth: this.containerWidth(),
8523
- clipHeight: this.containerHeight()
8843
+ clipHeight: this.gridContainerHeight()
8844
+ };
8845
+ });
8846
+ this.statGroupConfig = computed(() => {
8847
+ return {
8848
+ x: 0,
8849
+ y: this.containerHeight() - AI_TABLE_FIELD_STAT_CONTAINER_HEIGHT - AI_TABLE_CELL_LINE_BORDER,
8850
+ width: this.containerWidth(),
8851
+ height: AI_TABLE_FIELD_STAT_CONTAINER_HEIGHT
8524
8852
  };
8525
8853
  });
8526
8854
  this.commonGroupConfig = computed(() => {
@@ -8528,7 +8856,7 @@ class AITableRenderer {
8528
8856
  clipX: this.frozenAreaWidth() + 1,
8529
8857
  clipY: 0,
8530
8858
  clipWidth: this.cellGroupClipWidth(),
8531
- clipHeight: this.containerHeight()
8859
+ clipHeight: this.gridContainerHeight()
8532
8860
  };
8533
8861
  });
8534
8862
  this.attachGroupConfig = computed(() => {
@@ -8536,7 +8864,7 @@ class AITableRenderer {
8536
8864
  clipX: this.frozenAreaWidth() - 1,
8537
8865
  clipY: this.coordinate().rowInitSize - 1,
8538
8866
  clipWidth: this.containerWidth() - this.frozenAreaWidth(),
8539
- clipHeight: this.containerHeight() - this.coordinate().rowInitSize
8867
+ clipHeight: this.gridContainerHeight() - this.coordinate().rowInitSize
8540
8868
  };
8541
8869
  });
8542
8870
  this.frozenAttachGroupConfig = computed(() => {
@@ -8544,7 +8872,7 @@ class AITableRenderer {
8544
8872
  clipX: 0,
8545
8873
  clipY: this.coordinate().rowInitSize - 1,
8546
8874
  clipWidth: this.frozenAreaWidth() + 10,
8547
- clipHeight: this.containerHeight() - this.coordinate().rowInitSize
8875
+ clipHeight: this.gridContainerHeight() - this.coordinate().rowInitSize
8548
8876
  };
8549
8877
  });
8550
8878
  this.frozenCoverAttachGroupConfig = computed(() => {
@@ -8552,7 +8880,7 @@ class AITableRenderer {
8552
8880
  clipX: 0,
8553
8881
  clipY: this.coordinate().rowInitSize + 1,
8554
8882
  clipWidth: this.frozenAreaWidth(),
8555
- clipHeight: this.containerHeight() - this.coordinate().rowInitSize
8883
+ clipHeight: this.gridContainerHeight() - this.coordinate().rowInitSize
8556
8884
  };
8557
8885
  });
8558
8886
  this.offsetYConfig = computed(() => {
@@ -8574,7 +8902,7 @@ class AITableRenderer {
8574
8902
  offsetY: scrollTop
8575
8903
  };
8576
8904
  });
8577
- this.columnHeadOrAddFieldConfig = computed(() => {
8905
+ this.columnFrozenHeadFieldConfig = computed(() => {
8578
8906
  const { columnStartIndex, columnStopIndex } = this.visibleRangeInfo();
8579
8907
  const { aiTable, coordinate, readonly, maxFields, actions } = this.config();
8580
8908
  const { pointPosition } = aiTable.context;
@@ -8591,6 +8919,60 @@ class AITableRenderer {
8591
8919
  maxFields
8592
8920
  };
8593
8921
  });
8922
+ this.columnHeadFieldConfig = computed(() => {
8923
+ const { columnStartIndex, columnStopIndex } = this.visibleRangeInfo();
8924
+ const { aiTable, coordinate, readonly, maxFields, actions } = this.config();
8925
+ const { pointPosition } = aiTable.context;
8926
+ const fields = this.fields();
8927
+ return {
8928
+ aiTable,
8929
+ actions,
8930
+ coordinate,
8931
+ fields,
8932
+ columnStartIndex,
8933
+ columnStopIndex,
8934
+ pointPosition: pointPosition(),
8935
+ readonly,
8936
+ maxFields
8937
+ };
8938
+ });
8939
+ this.columnFieldStatsConfig = computed(() => {
8940
+ return {
8941
+ ...this.columnHeadFieldConfig(),
8942
+ width: this.cellGroupClipWidth(),
8943
+ x: this.frozenAreaWidth(),
8944
+ y: AI_TABLE_CELL_LINE_BORDER,
8945
+ height: AI_TABLE_FIELD_STAT_HEIGHT,
8946
+ isHoverStatContainer: this.isHoverStatContainer()
8947
+ };
8948
+ });
8949
+ this.columnFieldStatsBgConfig = computed(() => {
8950
+ return {
8951
+ x: 0,
8952
+ y: 0,
8953
+ width: this.containerWidth(),
8954
+ height: AI_TABLE_FIELD_STAT_HEIGHT + AI_TABLE_CELL_LINE_BORDER * 2,
8955
+ fill: Colors.white,
8956
+ stroke: Colors.gray200,
8957
+ strokeWidth: AI_TABLE_CELL_LINE_BORDER,
8958
+ opacity: 1,
8959
+ borders: [true, false, true, false],
8960
+ listening: true,
8961
+ coordinate: this.coordinate()
8962
+ };
8963
+ });
8964
+ this.columnFrozenFieldStatsConfig = computed(() => {
8965
+ return {
8966
+ ...this.columnHeadFieldConfig(),
8967
+ width: this.frozenAreaWidth(),
8968
+ x: 0,
8969
+ y: AI_TABLE_CELL_LINE_BORDER,
8970
+ columnStartIndex: 0,
8971
+ columnStopIndex: this.coordinate().frozenColumnCount - 1,
8972
+ height: AI_TABLE_FIELD_STAT_HEIGHT,
8973
+ isHoverStatContainer: this.isHoverStatContainer()
8974
+ };
8975
+ });
8594
8976
  this.cellsConfig = computed(() => {
8595
8977
  const { aiTable, readonly, coordinate, references, actions, maxRecords } = this.config();
8596
8978
  const { rowStartIndex, rowStopIndex, columnStartIndex, columnStopIndex } = this.visibleRangeInfo();
@@ -8669,8 +9051,11 @@ class AITableRenderer {
8669
9051
  stageMouseleave(e) {
8670
9052
  this.koMouseleave.emit(e);
8671
9053
  }
9054
+ onStatContainerHover(isHover) {
9055
+ this.isHoverStatContainer.set(isHover);
9056
+ }
8672
9057
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AITableRenderer, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
8673
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.10", type: AITableRenderer, isStandalone: true, selector: "ai-table-renderer", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { koMousemove: "koMousemove", koMousedown: "koMousedown", koMouseup: "koMouseup", koContextmenu: "koContextmenu", koWheel: "koWheel", koClick: "koClick", koDblclick: "koDblclick", koMouseleave: "koMouseleave" }, ngImport: i0, template: "<ko-stage\n [config]=\"stageConfig()\"\n (koMousemove)=\"stageMousemove($event)\"\n (koMousedown)=\"stageMousedown($event)\"\n (koMouseup)=\"stageMouseup($event)\"\n (koContextmenu)=\"stageContextmenu($event)\"\n (koClick)=\"stageClick($event)\"\n (koDblclick)=\"stageDblclick($event)\"\n (koMouseleave)=\"stageMouseleave($event)\"\n>\n <ko-layer>\n <ko-group [config]=\"gridGroupConfig()\">\n <ko-group [config]=\"offsetYConfig()\">\n <ai-table-frozen-cells [config]=\"cellsConfig()\"></ai-table-frozen-cells>\n <ai-table-other-rows [config]=\"cellsConfig()\"></ai-table-other-rows>\n @if (!hiddenIndexColumn()) {\n <ai-table-hover-row-heads [config]=\"cellsConfig()\"></ai-table-hover-row-heads>\n }\n <ai-table-frozen-placeholder-cells [config]=\"cellsConfig()\"></ai-table-frozen-placeholder-cells>\n </ko-group>\n\n <ko-group>\n <ai-table-frozen-column-heads [config]=\"columnHeadOrAddFieldConfig()\"></ai-table-frozen-column-heads>\n </ko-group>\n\n <ko-group [config]=\"commonGroupConfig()\">\n <ko-group [config]=\"offsetConfig()\">\n <ai-table-cells [config]=\"cellsConfig()\"></ai-table-cells>\n <ai-table-placeholder-cells [config]=\"cellsConfig()\"></ai-table-placeholder-cells>\n <ai-table-cover-cell [config]=\"cellsConfig()\"></ai-table-cover-cell>\n </ko-group>\n\n <ko-group [config]=\"offsetXConfig()\">\n <ai-table-column-heads [config]=\"columnHeadOrAddFieldConfig()\"></ai-table-column-heads>\n <ai-table-add-field [config]=\"columnHeadOrAddFieldConfig()\"></ai-table-add-field>\n <ai-table-column-stats [config]=\"columnHeadOrAddFieldConfig()\"></ai-table-column-stats>\n </ko-group>\n </ko-group>\n\n <ko-group [config]=\"attachGroupConfig()\">\n <ko-group [config]=\"offsetConfig()\">\n @if (activeCellBorderConfig().activeCellBorder) {\n <ko-rect [config]=\"activeCellBorderConfig().activeCellBorder!\"></ko-rect>\n }\n @if (showExpandCellBorder().expandCellBorder) {\n <ai-table-cover-cell [config]=\"cellsConfig()\" [onlyDisplayBorder]=\"true\"></ai-table-cover-cell>\n }\n @if (!isLastSelectedCellInFrozenColumn()) {\n <ai-table-fill-handle [config]=\"fillHandleConfig()\"></ai-table-fill-handle>\n }\n </ko-group>\n </ko-group>\n\n <ko-group [config]=\"frozenCoverAttachGroupConfig()\">\n <ko-group [config]=\"offsetYConfig()\">\n <ai-table-cover-cell [config]=\"cellsConfig()\"></ai-table-cover-cell>\n </ko-group>\n </ko-group>\n\n <ko-group [config]=\"frozenAttachGroupConfig()\">\n <ko-group [config]=\"offsetYConfig()\">\n @if (activeCellBorderConfig().frozenActiveCellBorder) {\n <ko-rect [config]=\"activeCellBorderConfig().frozenActiveCellBorder!\"></ko-rect>\n }\n @if (showExpandCellBorder().frozenExpandCellBorder) {\n <ai-table-cover-cell [config]=\"cellsConfig()\" [onlyDisplayBorder]=\"true\"></ai-table-cover-cell>\n }\n @if (isLastSelectedCellInFrozenColumn()) {\n <ai-table-fill-handle [config]=\"fillHandleConfig()\"></ai-table-fill-handle>\n }\n </ko-group>\n </ko-group>\n </ko-group>\n </ko-layer>\n</ko-stage>\n\n<ng-content></ng-content>\n", dependencies: [{ kind: "component", type: KoContainer, selector: "ko-layer, ko-fastlayer, ko-group" }, { kind: "component", type: KoStage, selector: "ko-stage", inputs: ["config"], outputs: ["koMouseover", "koMousemove", "koMouseout", "koMouseenter", "koMouseleave", "koMousedown", "koMouseup", "koWheel", "koContextmenu", "koClick", "koDblclick", "koTouchstart", "koTouchmove", "koTouchend", "koTap", "koDbltap", "koDragstart", "koDragmove", "koDragend"] }, { kind: "component", type: KoShape, selector: "ko-shape, ko-circle, ko-label, ko-rect, ko-ellipse, ko-wedge, ko-line, ko-sprite, ko-image, ko-text, ko-text-path, ko-star, ko-ring, ko-arc, ko-tag, ko-path, ko-regular-polygon, ko-arrow, ko-transformer", inputs: ["config"], outputs: ["koMouseover", "koMousemove", "koMouseout", "koMouseenter", "koMouseleave", "koMousedown", "koMouseup", "koWheel", "koContextmenu", "koClick", "koDblclick", "koTouchstart", "koTouchmove", "koTouchend", "koTap", "koDbltap", "koDragstart", "koDragmove", "koDragend"] }, { kind: "component", type: AITableColumnHeads, selector: "ai-table-column-heads", inputs: ["config"] }, { kind: "component", type: AITableFrozenColumnHeads, selector: "ai-table-frozen-column-heads", inputs: ["config"] }, { kind: "component", type: AITableCells, selector: "ai-table-cells", inputs: ["config"] }, { kind: "component", type: AITableFrozenCells, selector: "ai-table-frozen-cells", inputs: ["config"] }, { kind: "component", type: AITableFrozenPlaceholderCells, selector: "ai-table-frozen-placeholder-cells", inputs: ["config"] }, { kind: "component", type: AITableCoverCells, selector: "ai-table-cover-cell", inputs: ["config", "onlyDisplayBorder"] }, { kind: "component", type: AITablePlaceholderCells, selector: "ai-table-placeholder-cells", inputs: ["config"] }, { kind: "component", type: AITableAddField, selector: "ai-table-add-field", inputs: ["config"] }, { kind: "component", type: AITableHoverRowHeads, selector: "ai-table-hover-row-heads", inputs: ["config"] }, { kind: "component", type: AITableOtherRows, selector: "ai-table-other-rows", inputs: ["config"] }, { kind: "component", type: AITableFillHandle, selector: "ai-table-fill-handle", inputs: ["config"] }, { kind: "component", type: AITableFieldStats, selector: "ai-table-column-stats", inputs: ["config"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
9058
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.10", type: AITableRenderer, isStandalone: true, selector: "ai-table-renderer", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { koMousemove: "koMousemove", koMousedown: "koMousedown", koMouseup: "koMouseup", koContextmenu: "koContextmenu", koWheel: "koWheel", koClick: "koClick", koDblclick: "koDblclick", koMouseleave: "koMouseleave" }, ngImport: i0, template: "<ko-stage\n [config]=\"stageConfig()\"\n (koMousemove)=\"stageMousemove($event)\"\n (koMousedown)=\"stageMousedown($event)\"\n (koMouseup)=\"stageMouseup($event)\"\n (koContextmenu)=\"stageContextmenu($event)\"\n (koClick)=\"stageClick($event)\"\n (koDblclick)=\"stageDblclick($event)\"\n (koMouseleave)=\"stageMouseleave($event)\"\n>\n <ko-layer>\n <ko-group [config]=\"gridGroupConfig()\">\n <ko-group [config]=\"offsetYConfig()\">\n <ai-table-frozen-cells [config]=\"cellsConfig()\"></ai-table-frozen-cells>\n <ai-table-other-rows [config]=\"cellsConfig()\"></ai-table-other-rows>\n @if (!hiddenIndexColumn()) {\n <ai-table-hover-row-heads [config]=\"cellsConfig()\"></ai-table-hover-row-heads>\n }\n <ai-table-frozen-placeholder-cells [config]=\"cellsConfig()\"></ai-table-frozen-placeholder-cells>\n </ko-group>\n\n <ko-group>\n <ai-table-frozen-column-heads [config]=\"columnFrozenHeadFieldConfig()\"></ai-table-frozen-column-heads>\n </ko-group>\n\n <ko-group [config]=\"commonGroupConfig()\">\n <ko-group [config]=\"offsetConfig()\">\n <ai-table-cells [config]=\"cellsConfig()\"></ai-table-cells>\n <ai-table-placeholder-cells [config]=\"cellsConfig()\"></ai-table-placeholder-cells>\n <ai-table-cover-cell [config]=\"cellsConfig()\"></ai-table-cover-cell>\n </ko-group>\n\n <ko-group [config]=\"offsetXConfig()\">\n <ai-table-column-heads [config]=\"columnHeadFieldConfig()\"></ai-table-column-heads>\n <ai-table-add-field [config]=\"columnHeadFieldConfig()\"></ai-table-add-field>\n </ko-group>\n </ko-group>\n\n <ko-group [config]=\"attachGroupConfig()\">\n <ko-group [config]=\"offsetConfig()\">\n @if (activeCellBorderConfig().activeCellBorder) {\n <ko-rect [config]=\"activeCellBorderConfig().activeCellBorder!\"></ko-rect>\n }\n @if (showExpandCellBorder().expandCellBorder) {\n <ai-table-cover-cell [config]=\"cellsConfig()\" [onlyDisplayBorder]=\"true\"></ai-table-cover-cell>\n }\n @if (!isLastSelectedCellInFrozenColumn()) {\n <ai-table-fill-handle [config]=\"fillHandleConfig()\"></ai-table-fill-handle>\n }\n </ko-group>\n </ko-group>\n\n <ko-group [config]=\"frozenCoverAttachGroupConfig()\">\n <ko-group [config]=\"offsetYConfig()\">\n <ai-table-cover-cell [config]=\"cellsConfig()\"></ai-table-cover-cell>\n </ko-group>\n </ko-group>\n\n <ko-group [config]=\"frozenAttachGroupConfig()\">\n <ko-group [config]=\"offsetYConfig()\">\n @if (activeCellBorderConfig().frozenActiveCellBorder) {\n <ko-rect [config]=\"activeCellBorderConfig().frozenActiveCellBorder!\"></ko-rect>\n }\n @if (showExpandCellBorder().frozenExpandCellBorder) {\n <ai-table-cover-cell [config]=\"cellsConfig()\" [onlyDisplayBorder]=\"true\"></ai-table-cover-cell>\n }\n @if (isLastSelectedCellInFrozenColumn()) {\n <ai-table-fill-handle [config]=\"fillHandleConfig()\"></ai-table-fill-handle>\n }\n </ko-group>\n </ko-group>\n </ko-group>\n\n <ko-group [config]=\"statGroupConfig()\">\n <ai-table-background [config]=\"columnFieldStatsBgConfig()\"></ai-table-background>\n <ko-group>\n <ai-table-column-stats\n [config]=\"columnFrozenFieldStatsConfig()\"\n (hover)=\"onStatContainerHover($event)\"\n ></ai-table-column-stats>\n </ko-group>\n <ko-group [config]=\"commonGroupConfig()\">\n <ko-group [config]=\"offsetXConfig()\">\n <ai-table-column-stats\n [config]=\"columnFieldStatsConfig()\"\n (hover)=\"onStatContainerHover($event)\"\n ></ai-table-column-stats>\n </ko-group>\n </ko-group>\n </ko-group>\n </ko-layer>\n</ko-stage>\n\n<ng-content></ng-content>\n", dependencies: [{ kind: "component", type: KoContainer, selector: "ko-layer, ko-fastlayer, ko-group" }, { kind: "component", type: KoStage, selector: "ko-stage", inputs: ["config"], outputs: ["koMouseover", "koMousemove", "koMouseout", "koMouseenter", "koMouseleave", "koMousedown", "koMouseup", "koWheel", "koContextmenu", "koClick", "koDblclick", "koTouchstart", "koTouchmove", "koTouchend", "koTap", "koDbltap", "koDragstart", "koDragmove", "koDragend"] }, { kind: "component", type: KoShape, selector: "ko-shape, ko-circle, ko-label, ko-rect, ko-ellipse, ko-wedge, ko-line, ko-sprite, ko-image, ko-text, ko-text-path, ko-star, ko-ring, ko-arc, ko-tag, ko-path, ko-regular-polygon, ko-arrow, ko-transformer", inputs: ["config"], outputs: ["koMouseover", "koMousemove", "koMouseout", "koMouseenter", "koMouseleave", "koMousedown", "koMouseup", "koWheel", "koContextmenu", "koClick", "koDblclick", "koTouchstart", "koTouchmove", "koTouchend", "koTap", "koDbltap", "koDragstart", "koDragmove", "koDragend"] }, { kind: "component", type: AITableColumnHeads, selector: "ai-table-column-heads", inputs: ["config"] }, { kind: "component", type: AITableFrozenColumnHeads, selector: "ai-table-frozen-column-heads", inputs: ["config"] }, { kind: "component", type: AITableCells, selector: "ai-table-cells", inputs: ["config"] }, { kind: "component", type: AITableFrozenCells, selector: "ai-table-frozen-cells", inputs: ["config"] }, { kind: "component", type: AITableFrozenPlaceholderCells, selector: "ai-table-frozen-placeholder-cells", inputs: ["config"] }, { kind: "component", type: AITableCoverCells, selector: "ai-table-cover-cell", inputs: ["config", "onlyDisplayBorder"] }, { kind: "component", type: AITablePlaceholderCells, selector: "ai-table-placeholder-cells", inputs: ["config"] }, { kind: "component", type: AITableAddField, selector: "ai-table-add-field", inputs: ["config"] }, { kind: "component", type: AITableHoverRowHeads, selector: "ai-table-hover-row-heads", inputs: ["config"] }, { kind: "component", type: AITableOtherRows, selector: "ai-table-other-rows", inputs: ["config"] }, { kind: "component", type: AITableFillHandle, selector: "ai-table-fill-handle", inputs: ["config"] }, { kind: "component", type: AITableFieldStats, selector: "ai-table-column-stats", inputs: ["config"], outputs: ["hover"] }, { kind: "component", type: AITableBackground, selector: "ai-table-background", inputs: ["config", "isActive", "isHover"], outputs: ["koClick", "hover", "koMouseenter", "koMouseleave", "isHoverChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
8674
9059
  }
8675
9060
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AITableRenderer, decorators: [{
8676
9061
  type: Component,
@@ -8689,8 +9074,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImpo
8689
9074
  AITableHoverRowHeads,
8690
9075
  AITableOtherRows,
8691
9076
  AITableFillHandle,
8692
- AITableFieldStats
8693
- ], changeDetection: ChangeDetectionStrategy.OnPush, template: "<ko-stage\n [config]=\"stageConfig()\"\n (koMousemove)=\"stageMousemove($event)\"\n (koMousedown)=\"stageMousedown($event)\"\n (koMouseup)=\"stageMouseup($event)\"\n (koContextmenu)=\"stageContextmenu($event)\"\n (koClick)=\"stageClick($event)\"\n (koDblclick)=\"stageDblclick($event)\"\n (koMouseleave)=\"stageMouseleave($event)\"\n>\n <ko-layer>\n <ko-group [config]=\"gridGroupConfig()\">\n <ko-group [config]=\"offsetYConfig()\">\n <ai-table-frozen-cells [config]=\"cellsConfig()\"></ai-table-frozen-cells>\n <ai-table-other-rows [config]=\"cellsConfig()\"></ai-table-other-rows>\n @if (!hiddenIndexColumn()) {\n <ai-table-hover-row-heads [config]=\"cellsConfig()\"></ai-table-hover-row-heads>\n }\n <ai-table-frozen-placeholder-cells [config]=\"cellsConfig()\"></ai-table-frozen-placeholder-cells>\n </ko-group>\n\n <ko-group>\n <ai-table-frozen-column-heads [config]=\"columnHeadOrAddFieldConfig()\"></ai-table-frozen-column-heads>\n </ko-group>\n\n <ko-group [config]=\"commonGroupConfig()\">\n <ko-group [config]=\"offsetConfig()\">\n <ai-table-cells [config]=\"cellsConfig()\"></ai-table-cells>\n <ai-table-placeholder-cells [config]=\"cellsConfig()\"></ai-table-placeholder-cells>\n <ai-table-cover-cell [config]=\"cellsConfig()\"></ai-table-cover-cell>\n </ko-group>\n\n <ko-group [config]=\"offsetXConfig()\">\n <ai-table-column-heads [config]=\"columnHeadOrAddFieldConfig()\"></ai-table-column-heads>\n <ai-table-add-field [config]=\"columnHeadOrAddFieldConfig()\"></ai-table-add-field>\n <ai-table-column-stats [config]=\"columnHeadOrAddFieldConfig()\"></ai-table-column-stats>\n </ko-group>\n </ko-group>\n\n <ko-group [config]=\"attachGroupConfig()\">\n <ko-group [config]=\"offsetConfig()\">\n @if (activeCellBorderConfig().activeCellBorder) {\n <ko-rect [config]=\"activeCellBorderConfig().activeCellBorder!\"></ko-rect>\n }\n @if (showExpandCellBorder().expandCellBorder) {\n <ai-table-cover-cell [config]=\"cellsConfig()\" [onlyDisplayBorder]=\"true\"></ai-table-cover-cell>\n }\n @if (!isLastSelectedCellInFrozenColumn()) {\n <ai-table-fill-handle [config]=\"fillHandleConfig()\"></ai-table-fill-handle>\n }\n </ko-group>\n </ko-group>\n\n <ko-group [config]=\"frozenCoverAttachGroupConfig()\">\n <ko-group [config]=\"offsetYConfig()\">\n <ai-table-cover-cell [config]=\"cellsConfig()\"></ai-table-cover-cell>\n </ko-group>\n </ko-group>\n\n <ko-group [config]=\"frozenAttachGroupConfig()\">\n <ko-group [config]=\"offsetYConfig()\">\n @if (activeCellBorderConfig().frozenActiveCellBorder) {\n <ko-rect [config]=\"activeCellBorderConfig().frozenActiveCellBorder!\"></ko-rect>\n }\n @if (showExpandCellBorder().frozenExpandCellBorder) {\n <ai-table-cover-cell [config]=\"cellsConfig()\" [onlyDisplayBorder]=\"true\"></ai-table-cover-cell>\n }\n @if (isLastSelectedCellInFrozenColumn()) {\n <ai-table-fill-handle [config]=\"fillHandleConfig()\"></ai-table-fill-handle>\n }\n </ko-group>\n </ko-group>\n </ko-group>\n </ko-layer>\n</ko-stage>\n\n<ng-content></ng-content>\n" }]
9077
+ AITableFieldStats,
9078
+ AITableBackground
9079
+ ], changeDetection: ChangeDetectionStrategy.OnPush, template: "<ko-stage\n [config]=\"stageConfig()\"\n (koMousemove)=\"stageMousemove($event)\"\n (koMousedown)=\"stageMousedown($event)\"\n (koMouseup)=\"stageMouseup($event)\"\n (koContextmenu)=\"stageContextmenu($event)\"\n (koClick)=\"stageClick($event)\"\n (koDblclick)=\"stageDblclick($event)\"\n (koMouseleave)=\"stageMouseleave($event)\"\n>\n <ko-layer>\n <ko-group [config]=\"gridGroupConfig()\">\n <ko-group [config]=\"offsetYConfig()\">\n <ai-table-frozen-cells [config]=\"cellsConfig()\"></ai-table-frozen-cells>\n <ai-table-other-rows [config]=\"cellsConfig()\"></ai-table-other-rows>\n @if (!hiddenIndexColumn()) {\n <ai-table-hover-row-heads [config]=\"cellsConfig()\"></ai-table-hover-row-heads>\n }\n <ai-table-frozen-placeholder-cells [config]=\"cellsConfig()\"></ai-table-frozen-placeholder-cells>\n </ko-group>\n\n <ko-group>\n <ai-table-frozen-column-heads [config]=\"columnFrozenHeadFieldConfig()\"></ai-table-frozen-column-heads>\n </ko-group>\n\n <ko-group [config]=\"commonGroupConfig()\">\n <ko-group [config]=\"offsetConfig()\">\n <ai-table-cells [config]=\"cellsConfig()\"></ai-table-cells>\n <ai-table-placeholder-cells [config]=\"cellsConfig()\"></ai-table-placeholder-cells>\n <ai-table-cover-cell [config]=\"cellsConfig()\"></ai-table-cover-cell>\n </ko-group>\n\n <ko-group [config]=\"offsetXConfig()\">\n <ai-table-column-heads [config]=\"columnHeadFieldConfig()\"></ai-table-column-heads>\n <ai-table-add-field [config]=\"columnHeadFieldConfig()\"></ai-table-add-field>\n </ko-group>\n </ko-group>\n\n <ko-group [config]=\"attachGroupConfig()\">\n <ko-group [config]=\"offsetConfig()\">\n @if (activeCellBorderConfig().activeCellBorder) {\n <ko-rect [config]=\"activeCellBorderConfig().activeCellBorder!\"></ko-rect>\n }\n @if (showExpandCellBorder().expandCellBorder) {\n <ai-table-cover-cell [config]=\"cellsConfig()\" [onlyDisplayBorder]=\"true\"></ai-table-cover-cell>\n }\n @if (!isLastSelectedCellInFrozenColumn()) {\n <ai-table-fill-handle [config]=\"fillHandleConfig()\"></ai-table-fill-handle>\n }\n </ko-group>\n </ko-group>\n\n <ko-group [config]=\"frozenCoverAttachGroupConfig()\">\n <ko-group [config]=\"offsetYConfig()\">\n <ai-table-cover-cell [config]=\"cellsConfig()\"></ai-table-cover-cell>\n </ko-group>\n </ko-group>\n\n <ko-group [config]=\"frozenAttachGroupConfig()\">\n <ko-group [config]=\"offsetYConfig()\">\n @if (activeCellBorderConfig().frozenActiveCellBorder) {\n <ko-rect [config]=\"activeCellBorderConfig().frozenActiveCellBorder!\"></ko-rect>\n }\n @if (showExpandCellBorder().frozenExpandCellBorder) {\n <ai-table-cover-cell [config]=\"cellsConfig()\" [onlyDisplayBorder]=\"true\"></ai-table-cover-cell>\n }\n @if (isLastSelectedCellInFrozenColumn()) {\n <ai-table-fill-handle [config]=\"fillHandleConfig()\"></ai-table-fill-handle>\n }\n </ko-group>\n </ko-group>\n </ko-group>\n\n <ko-group [config]=\"statGroupConfig()\">\n <ai-table-background [config]=\"columnFieldStatsBgConfig()\"></ai-table-background>\n <ko-group>\n <ai-table-column-stats\n [config]=\"columnFrozenFieldStatsConfig()\"\n (hover)=\"onStatContainerHover($event)\"\n ></ai-table-column-stats>\n </ko-group>\n <ko-group [config]=\"commonGroupConfig()\">\n <ko-group [config]=\"offsetXConfig()\">\n <ai-table-column-stats\n [config]=\"columnFieldStatsConfig()\"\n (hover)=\"onStatContainerHover($event)\"\n ></ai-table-column-stats>\n </ko-group>\n </ko-group>\n </ko-group>\n </ko-layer>\n</ko-stage>\n\n<ng-content></ng-content>\n" }]
8694
9080
  }] });
8695
9081
 
8696
9082
  class AITableCellRate extends CoverCellComponent {
@@ -9223,6 +9609,62 @@ function aiTableRectConfigToKonvaConfig(rectConfig, options) {
9223
9609
  return result;
9224
9610
  }
9225
9611
 
9612
+ function getDateFieldValues(records, options, filterNull = false) {
9613
+ const { aiTable, field } = options;
9614
+ const result = ___default.map(records, (record) => {
9615
+ const cellValue = AITableQueries.getFieldValue(aiTable, [record._id, field._id]);
9616
+ return cellValue;
9617
+ });
9618
+ if (filterNull) {
9619
+ return result.filter((value) => value !== null);
9620
+ }
9621
+ return result;
9622
+ }
9623
+ function statEarliestTime(records, options) {
9624
+ const values = getDateFieldValues(records, options, true);
9625
+ const result = ___default.minBy(values, (value) => {
9626
+ return value.timestamp;
9627
+ });
9628
+ return transformToCellText(result, options);
9629
+ }
9630
+ function statLatestTime(records, options) {
9631
+ const { field } = options;
9632
+ const values = getDateFieldValues(records, options, true);
9633
+ const result = ___default.maxBy(values, (value) => {
9634
+ return value.timestamp;
9635
+ });
9636
+ return transformToCellText(result, options);
9637
+ }
9638
+ function statDateRangeOfDays(records, options) {
9639
+ const { field } = options;
9640
+ const values = getDateFieldValues(records, options, true);
9641
+ const start = ___default.minBy(values, (value) => {
9642
+ return value.timestamp;
9643
+ });
9644
+ const end = ___default.maxBy(values, (value) => {
9645
+ return value.timestamp;
9646
+ });
9647
+ if (start && end) {
9648
+ const days = differenceInDays(fromUnixTime(end.timestamp), fromUnixTime(start.timestamp));
9649
+ return days;
9650
+ }
9651
+ return 0;
9652
+ }
9653
+ function statDateRangeOfMonths(records, options) {
9654
+ const values = getDateFieldValues(records, options, true);
9655
+ const start = ___default.minBy(values, (value) => {
9656
+ return value.timestamp;
9657
+ });
9658
+ const end = ___default.maxBy(values, (value) => {
9659
+ return value.timestamp;
9660
+ });
9661
+ if (start && end) {
9662
+ const months = differenceInMonths(fromUnixTime(end.timestamp), fromUnixTime(start.timestamp));
9663
+ return months;
9664
+ }
9665
+ return 0;
9666
+ }
9667
+
9226
9668
  function getFillDirection(aiTable, sourceCells, mouseUpRecordId) {
9227
9669
  const { startCell: sourceStartCell, endCell: sourceEndCell } = getStartAndEndCell(sourceCells);
9228
9670
  const currentRowIndex = aiTable.context.visibleRowsIndexMap().get(mouseUpRecordId);
@@ -9654,6 +10096,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImpo
9654
10096
  ], template: "@for (menu of menuItems(); track $index) {\n @if ((menu.hidden && !menu.hidden(aiTable(), targetName(), position())) || !menu.hidden) {\n @if (menu.type === 'divider') {\n <thy-divider thyStyle=\"solid\"></thy-divider>\n } @else {\n @let disabled = !!(menu.disabled && menu.disabled(aiTable(), targetName(), position()));\n @let isRemoveRecords = menu.type === 'removeRecords';\n @let isPreventClearSelection =\n menu.type === 'copyCells' ||\n menu.type === 'pasteCells' ||\n menu.type === 'removeRecords' ||\n menu.type === 'insertUpwardRecords' ||\n menu.type === 'insertDownwardRecords';\n\n <a\n thyDropdownMenuItem\n href=\"javascript:;\"\n [ngClass]=\"{\n 'remove-record': isRemoveRecords && !disabled,\n 'ai-table-prevent-clear-selection': isPreventClearSelection && !disabled\n }\"\n draggable=\"false\"\n (click)=\"execute(menu)\"\n [thyDisabled]=\"disabled\"\n >\n <thy-icon thyDropdownMenuItemIcon [thyIconName]=\"menu.icon!\"></thy-icon>\n @if (menu?.isInputNumber) {\n <span thyDropdownMenuItemName class=\"d-flex align-items-center\">\n {{ menu.name }}\n <thy-input-number\n #inputNumber\n class=\"mx-2\"\n thySize=\"sm\"\n [(ngModel)]=\"menu.count\"\n [thyStep]=\"1\"\n [thyMin]=\"1\"\n [thyMax]=\"maxCount()\"\n (click)=\"inputNumberFocus($event)\"\n (thyEnter)=\"itemEnterHandle($event, menu)\"\n thyStopPropagation\n ></thy-input-number>\n {{ menu.nameSuffix }}\n </span>\n } @else {\n <span thyDropdownMenuItemName>{{ menu.name }}</span>\n }\n <span thyDropdownMenuItemMeta class=\"text-desc\">{{ menu.shortcutKey }}</span>\n </a>\n }\n }\n}\n" }]
9655
10097
  }] });
9656
10098
 
10099
+ const GRID_CELL_EDITOR_MAP = {
10100
+ [AITableFieldType.text]: TextCellEditorComponent,
10101
+ [AITableFieldType.richText]: TextCellEditorComponent,
10102
+ [AITableFieldType.select]: SelectCellEditorComponent,
10103
+ [AITableFieldType.number]: NumberCellEditorComponent,
10104
+ [AITableFieldType.date]: DateCellEditorComponent,
10105
+ [AITableFieldType.link]: LinkCellEditorComponent
10106
+ };
10107
+
9657
10108
  class AITableGridEventService {
9658
10109
  constructor() {
9659
10110
  this.dblClickEvent$ = new Subject();
@@ -10050,7 +10501,7 @@ class AITableGridBase {
10050
10501
  AI_TABLE_GRID_FIELD_SERVICE_MAP.set(this.aiTable, this.aiTableGridFieldService);
10051
10502
  }
10052
10503
  addRecord(options) {
10053
- const records = this.aiTable.gridData().records;
10504
+ const records = this.aiTable.records();
10054
10505
  const recordCount = records.length;
10055
10506
  if (this.aiMaxRecords() && recordCount >= this.aiMaxRecords()) {
10056
10507
  return;
@@ -10064,7 +10515,7 @@ class AITableGridBase {
10064
10515
  this.aiTableGridSelectionService.toggleSelectAll(checked);
10065
10516
  }
10066
10517
  addField(gridColumnBlank, position) {
10067
- if (this.aiMaxFields() && this.aiTable.gridData().fields.length >= this.aiMaxFields()) {
10518
+ if (this.aiMaxFields() && this.aiTable.fields().length >= this.aiMaxFields()) {
10068
10519
  return;
10069
10520
  }
10070
10521
  const field = createDefaultField(this.aiTable, AITableFieldType.text);
@@ -10676,7 +11127,8 @@ class AITableDragComponent {
10676
11127
  verticalElement: this.verticalBarElement
10677
11128
  },
10678
11129
  frozenArea: {
10679
- top: AI_TABLE_FIELD_HEAD_HEIGHT
11130
+ top: AI_TABLE_FIELD_HEAD_HEIGHT,
11131
+ bottom: this.containerHeight - AI_TABLE_SCROLL_BAR_SIZE - AI_TABLE_FIELD_STAT_CONTAINER_HEIGHT
10680
11132
  },
10681
11133
  edgeThreshold: {
10682
11134
  top: AI_TABLE_AUTO_SCROLL_TOP_THRESHOLD,
@@ -11570,7 +12022,7 @@ class AITableGrid extends AITableGridBase {
11570
12022
  frozenArea: {
11571
12023
  top: AI_TABLE_FIELD_HEAD_HEIGHT,
11572
12024
  left: coordinate.getColumnWidth(0) + this.aiTable.context.rowHeadWidth(),
11573
- bottom: containerRect.height - AI_TABLE_SCROLL_BAR_SIZE,
12025
+ bottom: containerRect.height - AI_TABLE_SCROLL_BAR_SIZE - AI_TABLE_FIELD_STAT_CONTAINER_HEIGHT,
11574
12026
  right: containerRect.width - AI_TABLE_SCROLL_BAR_SIZE
11575
12027
  },
11576
12028
  edgeThreshold: {
@@ -11615,5 +12067,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImpo
11615
12067
  * Generated bundle index. Do not edit.
11616
12068
  */
11617
12069
 
11618
- export { AITable, AITableActionIcon, AITableAddField, AITableAreaType, AITableAvatarSize, AITableAvatarType, AITableCellAttachment, AITableCellLink, AITableCellProgress, AITableCellRate, AITableCellRichText, AITableCells, AITableCheckType, AITableColumnHeads, AITableContextMenu, AITableDomGrid, AITableFieldHead, AITableFieldIcon, AITableFieldIsSameOptionPipe, AITableFieldSetting, AITableFrozenCells, AITableFrozenColumnHeads, AITableFrozenPlaceholderCells, AITableGrid, AITableGridEventService, AITableGridFieldService, AITableGridI18nKey, AITableGridSelectionService, AITableHoverRowHeads, AITableIcon, AITableMemberType, AITableMouseDownType, AITableOtherRows, AITablePlaceholderCells, AITableQueries, AITableRenderer, AITableRowType, AITableSelectAllState, AITableTextComponent, AI_TABLE_ACTION_COMMON_RADIUS, AI_TABLE_ACTION_COMMON_RIGHT_PADDING, AI_TABLE_ACTION_COMMON_SIZE, AI_TABLE_AUTO_SCROLL_BOTTOM_THRESHOLD, AI_TABLE_AUTO_SCROLL_LEFT_THRESHOLD, AI_TABLE_AUTO_SCROLL_RIGHT_THRESHOLD, AI_TABLE_AUTO_SCROLL_TOP_THRESHOLD, AI_TABLE_BLANK, AI_TABLE_CELL, AI_TABLE_CELL_ACTIVE_BORDER_WIDTH, AI_TABLE_CELL_ADD_ITEM_BUTTON_SIZE, AI_TABLE_CELL_ATTACHMENT_ADD, AI_TABLE_CELL_ATTACHMENT_FILE, AI_TABLE_CELL_BORDER, AI_TABLE_CELL_DELETE_ITEM_BUTTON_SIZE, AI_TABLE_CELL_DELETE_ITEM_BUTTON_SIZE_OFFSET, AI_TABLE_CELL_EDIT, AI_TABLE_CELL_EMOJI_PADDING, AI_TABLE_CELL_EMOJI_SIZE, AI_TABLE_CELL_FIELD_ITEM_HEIGHT, AI_TABLE_CELL_MAX_ROW_COUNT, AI_TABLE_CELL_MEMBER_ITEM_HEIGHT, AI_TABLE_CELL_MEMBER_ITEM_PADDING, AI_TABLE_CELL_MEMBER_MAX_HEIGHT, AI_TABLE_CELL_MULTI_DOT_RADIUS, AI_TABLE_CELL_MULTI_ITEM_MARGIN_LEFT, AI_TABLE_CELL_MULTI_ITEM_MARGIN_TOP, AI_TABLE_CELL_MULTI_ITEM_MIN_WIDTH, AI_TABLE_CELL_MULTI_PADDING_LEFT, AI_TABLE_CELL_MULTI_PADDING_TOP, AI_TABLE_CELL_PADDING, AI_TABLE_COMMON_FONT_SIZE, AI_TABLE_DEFAULT_COLUMN_WIDTH, AI_TABLE_DOT_RADIUS, AI_TABLE_FIELD_ADD_BUTTON, AI_TABLE_FIELD_ADD_BUTTON_WIDTH, AI_TABLE_FIELD_HEAD, AI_TABLE_FIELD_HEAD_HEIGHT, AI_TABLE_FIELD_HEAD_ICON_GAP_SIZE, AI_TABLE_FIELD_HEAD_MORE, AI_TABLE_FIELD_HEAD_OPACITY_LINE, AI_TABLE_FIELD_HEAD_SELECT_CHECKBOX, AI_TABLE_FIELD_HEAD_TEXT_MIN_WIDTH, AI_TABLE_FIELD_ITEM_MARGIN_RIGHT, AI_TABLE_FIELD_MAX_WIDTH, AI_TABLE_FIELD_MIDDLE_WIDTH, AI_TABLE_FIELD_MINI_WIDTH, AI_TABLE_FIELD_MIN_WIDTH, AI_TABLE_FIELD_STAT_HEIGHT, AI_TABLE_FILE_ICON_ITEM_HEIGHT, AI_TABLE_FILE_ICON_SIZE, AI_TABLE_FILL_HANDLE, AI_TABLE_GRID_FIELD_SERVICE_MAP, AI_TABLE_ICON_COMMON_SIZE, AI_TABLE_INDEX_FIELD_TEXT, AI_TABLE_MEMBER_AVATAR_SIZE, AI_TABLE_MEMBER_ITEM_AVATAR_MARGIN_RIGHT, AI_TABLE_MEMBER_ITEM_PADDING_RIGHT, AI_TABLE_MIN_TEXT_WIDTH, AI_TABLE_OFFSET, AI_TABLE_OPTION_ITEM_FONT_SIZE, AI_TABLE_OPTION_ITEM_HEIGHT, AI_TABLE_OPTION_ITEM_PADDING, AI_TABLE_OPTION_ITEM_RADIUS, AI_TABLE_PIECE_RADIUS, AI_TABLE_PIECE_WIDTH, AI_TABLE_POPOVER_LEFT_OFFSET, AI_TABLE_PREVENT_CLEAR_SELECTION_CLASS, AI_TABLE_PROGRESS_BAR_HEIGHT, AI_TABLE_PROGRESS_BAR_POINTER_HEIGHT, AI_TABLE_PROGRESS_BAR_POINTER_WIDTH, AI_TABLE_PROGRESS_BAR_RADIUS, AI_TABLE_PROGRESS_TEXT_WIDTH, AI_TABLE_RATE_MAX, AI_TABLE_ROW_ADD_BUTTON, AI_TABLE_ROW_BLANK_HEIGHT, AI_TABLE_ROW_DRAG, AI_TABLE_ROW_DRAG_ICON_WIDTH, AI_TABLE_ROW_HEAD, AI_TABLE_ROW_HEAD_SIZE, AI_TABLE_ROW_HEAD_WIDTH, AI_TABLE_ROW_HEAD_WIDTH_AND_DRAG_ICON_WIDTH, AI_TABLE_ROW_HEIGHT, AI_TABLE_ROW_SELECT_CHECKBOX, AI_TABLE_SCROLL_BAR_PADDING, AI_TABLE_SCROLL_BAR_SIZE, AI_TABLE_TAG_FONT_SIZE, AI_TABLE_TAG_PADDING, AI_TABLE_TEXT_GAP, AbstractEditCellEditor, AddOutlinedPath, AngleDownPath, AttachmentField, AttachmentPath, CellDrawer, Check, Colors, ColumnCalendarFilledPath, ColumnLinkOutlinedPath, ColumnMemberFilledPath, ColumnMultipleFillPath, ColumnNumberFilledPath, ColumnProgressFilledPath, ColumnRatingFilledPath, ColumnRichTextFilledPath, ColumnSelectFilledPath, ColumnTextFilledPath, Coordinate, CoverCellComponent, DBL_CLICK_EDIT_TYPE, DEFAULT_FONT_FAMILY, DEFAULT_FONT_SIZE, DEFAULT_FONT_STYLE, DEFAULT_FONT_WEIGHT, DEFAULT_ICON_SHAPE, DEFAULT_ICON_SIZE, DEFAULT_POINT_POSITION, DEFAULT_SCROLL_STATE, DEFAULT_TEXT_ALIGN_CENTER, DEFAULT_TEXT_ALIGN_LEFT, DEFAULT_TEXT_ALIGN_RIGHT, DEFAULT_TEXT_DECORATION, DEFAULT_TEXT_ELLIPSIS, DEFAULT_TEXT_FILL, DEFAULT_TEXT_LINE_HEIGHT, DEFAULT_TEXT_LISTENING, DEFAULT_TEXT_MAX_CACHE, DEFAULT_TEXT_MAX_HEIGHT, DEFAULT_TEXT_SCALE, DEFAULT_TEXT_TRANSFORMS_ENABLED, DEFAULT_TEXT_VERTICAL_ALIGN_MIDDLE, DEFAULT_TEXT_VERTICAL_ALIGN_TOP, DEFAULT_TEXT_WRAP, DEFAULT_WRAP_TEXT_MAX_ROW, DateCellEditorComponent, DateField, DepartmentOutlinedPath, Drawer, EditPath, FONT_SIZE_SM, FieldModelMap, GRID_CELL_EDITOR_MAP, IconPathMap, IsSelectRecordPipe, KO_CONTAINER_TOKEN, KoComponent, KoContainer, KoShape, KoShapeTypes, KoStage, LinkCellEditorComponent, LinkField, MIN_COLUMN_WIDTH, MemberField, MemberSettingPipe, MoreStandOutlinedPath, NumberCellEditorComponent, NumberField, ProgressField, RateField, RendererContext, RichTextField, RowDragPath, RowHeight, SelectCellEditorComponent, SelectField, SelectOptionComponent, SelectOptionPipe, SelectOptionsPipe, SelectSettingPipe, StarFill, TextCellEditorComponent, TextField, TextMeasure, Unchecked, UserPipe, WebOutlinedPath, aiTableFragmentAttribute, aiTableImageConfigToKonvaConfig, aiTableRectConfigToKonvaConfig, aiTableTextConfigToKonvaConfig, applyNodeProps, buildClipboardData, buildGridData, buildGridLinearRows, castToString, cellDrawer, clearCells, compareNumber, compareOption, compareString, createAITable, createActiveCellBorder, createCells, createDefaultField, createDefaultFieldName, createListener, dragFillHighlightArea, drawer, expandCell, extractLinkUrl, extractText, generateNewName, generateTargetName, getAvatarBgColor, getAvatarShortName, getCellEditorBorderSpace, getCellHorizontalPosition, getColumnIndicesSizeMap, getCoverCell, getDefaultFieldOptions, getDefaultFieldValue, getDefaultI18nTextByKey, getDetailByTargetName, getEditorBoxOffset, getEditorSpace, getFieldOptionByField, getFieldOptionMap, getFieldOptions, getFieldValue, getFileThumbnailSvgString, getFillDirection, getHoverEditorBoxOffset, getHoverEditorSpace, getI18nTextByKey, getMousePosition, getName, getOptionsByFieldAndRecords, getPlaceHolderCellsConfigs, getStartAndEndCell, getSystemFieldValue, getTargetName, getTextWidth, getVisibleRangeInfo, graphemeSplitter, handleMouseStyle, hasIntersect, idCreator, idsCreator, imageCache, isActiveCell, isArrayField, isCellMatchKeywords, isClipboardReadSupported, isClipboardReadTextSupported, isClipboardWriteSupported, isClipboardWriteTextSupported, isDateFiled, isEmptyOrNot, isMac, isMeetFilter, isNumberFiled, isSameFieldOption, isSelectedField, isSystemField, isVirtualKey, isWindows, isWindowsOS, isWithinFrozenColumnBoundary, performFill, processPastedValueForSelect, readFromClipboard, scrollMax, setMouseStyle, shortIdCreator, shortIdsCreator, stringInclude, textDataCache, toAttachmentFieldValue, toDateFieldValue, toLinkFieldValue, toMemberFieldValue, toNumberFieldValue, toProgressFieldValue, toRateFieldValue, toRichTextFieldValue, toSelectFieldValue, toTextFieldValue, transformToCellText, updatePicture, writeToAITable, writeToClipboard, zhIntlCollator };
12070
+ export { AITable, AITableActionIcon, AITableAddField, AITableAreaType, AITableAvatarSize, AITableAvatarType, AITableBackground, AITableCellAttachment, AITableCellLink, AITableCellProgress, AITableCellRate, AITableCellRichText, AITableCells, AITableCheckType, AITableColumnHeads, AITableContextMenu, AITableDomGrid, AITableFieldHead, AITableFieldIcon, AITableFieldIsSameOptionPipe, AITableFieldSetting, AITableFrozenCells, AITableFrozenColumnHeads, AITableFrozenPlaceholderCells, AITableGrid, AITableGridEventService, AITableGridFieldService, AITableGridI18nKey, AITableGridI18nText, AITableGridSelectionService, AITableHoverRowHeads, AITableIcon, AITableMemberType, AITableMouseDownType, AITableOtherRows, AITablePlaceholderCells, AITableQueries, AITableRenderer, AITableRowType, AITableSelectAllState, AITableTextComponent, AI_TABLE_ACTION_COMMON_RADIUS, AI_TABLE_ACTION_COMMON_RIGHT_PADDING, AI_TABLE_ACTION_COMMON_SIZE, AI_TABLE_AUTO_SCROLL_BOTTOM_THRESHOLD, AI_TABLE_AUTO_SCROLL_LEFT_THRESHOLD, AI_TABLE_AUTO_SCROLL_RIGHT_THRESHOLD, AI_TABLE_AUTO_SCROLL_TOP_THRESHOLD, AI_TABLE_BLANK, AI_TABLE_CELL, AI_TABLE_CELL_ACTIVE_BORDER_WIDTH, AI_TABLE_CELL_ADD_ITEM_BUTTON_SIZE, AI_TABLE_CELL_ATTACHMENT_ADD, AI_TABLE_CELL_ATTACHMENT_FILE, AI_TABLE_CELL_BORDER, AI_TABLE_CELL_DELETE_ITEM_BUTTON_SIZE, AI_TABLE_CELL_DELETE_ITEM_BUTTON_SIZE_OFFSET, AI_TABLE_CELL_EDIT, AI_TABLE_CELL_EMOJI_PADDING, AI_TABLE_CELL_EMOJI_SIZE, AI_TABLE_CELL_FIELD_ITEM_HEIGHT, AI_TABLE_CELL_LINE_BORDER, AI_TABLE_CELL_MAX_ROW_COUNT, AI_TABLE_CELL_MEMBER_ITEM_HEIGHT, AI_TABLE_CELL_MEMBER_ITEM_PADDING, AI_TABLE_CELL_MEMBER_MAX_HEIGHT, AI_TABLE_CELL_MULTI_DOT_RADIUS, AI_TABLE_CELL_MULTI_ITEM_MARGIN_LEFT, AI_TABLE_CELL_MULTI_ITEM_MARGIN_TOP, AI_TABLE_CELL_MULTI_ITEM_MIN_WIDTH, AI_TABLE_CELL_MULTI_PADDING_LEFT, AI_TABLE_CELL_MULTI_PADDING_TOP, AI_TABLE_CELL_PADDING, AI_TABLE_COMMON_FONT_SIZE, AI_TABLE_DEFAULT_COLUMN_WIDTH, AI_TABLE_DOT_RADIUS, AI_TABLE_FIELD_ADD_BUTTON, AI_TABLE_FIELD_ADD_BUTTON_WIDTH, AI_TABLE_FIELD_HEAD, AI_TABLE_FIELD_HEAD_HEIGHT, AI_TABLE_FIELD_HEAD_ICON_GAP_SIZE, AI_TABLE_FIELD_HEAD_MORE, AI_TABLE_FIELD_HEAD_OPACITY_LINE, AI_TABLE_FIELD_HEAD_SELECT_CHECKBOX, AI_TABLE_FIELD_HEAD_TEXT_MIN_WIDTH, AI_TABLE_FIELD_ITEM_MARGIN_RIGHT, AI_TABLE_FIELD_MAX_WIDTH, AI_TABLE_FIELD_MIDDLE_WIDTH, AI_TABLE_FIELD_MINI_WIDTH, AI_TABLE_FIELD_MIN_WIDTH, AI_TABLE_FIELD_STAT_BG, AI_TABLE_FIELD_STAT_CONTAINER_HEIGHT, AI_TABLE_FIELD_STAT_HEIGHT, AI_TABLE_FILE_ICON_ITEM_HEIGHT, AI_TABLE_FILE_ICON_SIZE, AI_TABLE_FILL_HANDLE, AI_TABLE_GRID_FIELD_SERVICE_MAP, AI_TABLE_ICON_COMMON_SIZE, AI_TABLE_INDEX_FIELD_TEXT, AI_TABLE_MEMBER_AVATAR_SIZE, AI_TABLE_MEMBER_ITEM_AVATAR_MARGIN_RIGHT, AI_TABLE_MEMBER_ITEM_PADDING_RIGHT, AI_TABLE_MIN_TEXT_WIDTH, AI_TABLE_OFFSET, AI_TABLE_OPTION_ITEM_FONT_SIZE, AI_TABLE_OPTION_ITEM_HEIGHT, AI_TABLE_OPTION_ITEM_PADDING, AI_TABLE_OPTION_ITEM_RADIUS, AI_TABLE_PIECE_RADIUS, AI_TABLE_PIECE_WIDTH, AI_TABLE_POPOVER_LEFT_OFFSET, AI_TABLE_PREVENT_CLEAR_SELECTION_CLASS, AI_TABLE_PROGRESS_BAR_HEIGHT, AI_TABLE_PROGRESS_BAR_POINTER_HEIGHT, AI_TABLE_PROGRESS_BAR_POINTER_WIDTH, AI_TABLE_PROGRESS_BAR_RADIUS, AI_TABLE_PROGRESS_TEXT_WIDTH, AI_TABLE_RATE_MAX, AI_TABLE_ROW_ADD_BUTTON, AI_TABLE_ROW_BLANK_HEIGHT, AI_TABLE_ROW_DRAG, AI_TABLE_ROW_DRAG_ICON_WIDTH, AI_TABLE_ROW_HEAD, AI_TABLE_ROW_HEAD_SIZE, AI_TABLE_ROW_HEAD_WIDTH, AI_TABLE_ROW_HEAD_WIDTH_AND_DRAG_ICON_WIDTH, AI_TABLE_ROW_HEIGHT, AI_TABLE_ROW_SELECT_CHECKBOX, AI_TABLE_SCROLL_BAR_PADDING, AI_TABLE_SCROLL_BAR_SIZE, AI_TABLE_TAG_FONT_SIZE, AI_TABLE_TAG_PADDING, AI_TABLE_TEXT_GAP, AI_TABLE_TEXT_LINE_HEIGHT, AbstractEditCellEditor, AddOutlinedPath, AngleDownPath, AttachmentField, AttachmentPath, CellDrawer, Check, Colors, ColumnCalendarFilledPath, ColumnLinkOutlinedPath, ColumnMemberFilledPath, ColumnMultipleFillPath, ColumnNumberFilledPath, ColumnProgressFilledPath, ColumnRatingFilledPath, ColumnRichTextFilledPath, ColumnSelectFilledPath, ColumnTextFilledPath, Coordinate, CoverCellComponent, DBL_CLICK_EDIT_TYPE, DEFAULT_FONT_FAMILY, DEFAULT_FONT_SIZE, DEFAULT_FONT_STYLE, DEFAULT_FONT_WEIGHT, DEFAULT_ICON_SHAPE, DEFAULT_ICON_SIZE, DEFAULT_POINT_POSITION, DEFAULT_SCROLL_STATE, DEFAULT_TEXT_ALIGN_CENTER, DEFAULT_TEXT_ALIGN_LEFT, DEFAULT_TEXT_ALIGN_RIGHT, DEFAULT_TEXT_DECORATION, DEFAULT_TEXT_ELLIPSIS, DEFAULT_TEXT_FILL, DEFAULT_TEXT_LINE_HEIGHT, DEFAULT_TEXT_LISTENING, DEFAULT_TEXT_MAX_CACHE, DEFAULT_TEXT_MAX_HEIGHT, DEFAULT_TEXT_SCALE, DEFAULT_TEXT_TRANSFORMS_ENABLED, DEFAULT_TEXT_VERTICAL_ALIGN_MIDDLE, DEFAULT_TEXT_VERTICAL_ALIGN_TOP, DEFAULT_TEXT_WRAP, DEFAULT_WRAP_TEXT_MAX_ROW, DateCellEditorComponent, DateField, DepartmentOutlinedPath, Drawer, EditPath, FONT_SIZE_SM, FieldModelMap, IconPathMap, IsSelectRecordPipe, KO_CONTAINER_TOKEN, KoComponent, KoContainer, KoShape, KoShapeTypes, KoStage, LinkCellEditorComponent, LinkField, MIN_COLUMN_WIDTH, MemberField, MemberSettingPipe, MoreStandOutlinedPath, NumberCellEditorComponent, NumberField, ProgressField, RateField, RendererContext, RichTextField, RowDragPath, RowHeight, SelectCellEditorComponent, SelectField, SelectOptionComponent, SelectOptionPipe, SelectOptionsPipe, SelectSettingPipe, StarFill, TextCellEditorComponent, TextField, TextMeasure, Unchecked, UserPipe, WebOutlinedPath, aiTableFragmentAttribute, aiTableImageConfigToKonvaConfig, aiTableRectConfigToKonvaConfig, aiTableTextConfigToKonvaConfig, applyNodeProps, buildClipboardData, buildGridData, buildGridLinearRows, castToString, cellDrawer, clearCells, compareNumber, compareOption, compareString, createAITable, createActiveCellBorder, createCells, createDefaultField, createDefaultFieldName, createListener, dragFillHighlightArea, drawer, expandCell, extractLinkUrl, extractText, generateNewName, generateTargetName, getAvatarBgColor, getAvatarShortName, getCellEditorBorderSpace, getCellHorizontalPosition, getColumnIndicesSizeMap, getCoverCell, getDateFieldValues, getDefaultFieldOptions, getDefaultFieldValue, getDefaultI18nTextByKey, getDetailByTargetName, getEditorBoxOffset, getEditorSpace, getFieldOptionByField, getFieldOptionMap, getFieldOptions, getFieldValue, getFileThumbnailSvgString, getFillDirection, getHoverEditorBoxOffset, getHoverEditorSpace, getI18nTextByKey, getMousePosition, getName, getOptionsByFieldAndRecords, getPlaceHolderCellsConfigs, getStartAndEndCell, getSystemFieldValue, getTargetName, getTextWidth, getVisibleRangeInfo, graphemeSplitter, handleMouseStyle, hasIntersect, idCreator, idsCreator, imageCache, isActiveCell, isArrayField, isCellMatchKeywords, isClipboardReadSupported, isClipboardReadTextSupported, isClipboardWriteSupported, isClipboardWriteTextSupported, isDateFiled, isEmptyOrNot, isMac, isMeetFilter, isNumberFiled, isSameFieldOption, isSelectedField, isSystemField, isVirtualKey, isWindows, isWindowsOS, isWithinFrozenColumnBoundary, performFill, processPastedValueForSelect, readFromClipboard, scrollMax, setMouseStyle, shortIdCreator, shortIdsCreator, statDateRangeOfDays, statDateRangeOfMonths, statEarliestTime, statLatestTime, stringInclude, textDataCache, toAttachmentFieldValue, toDateFieldValue, toLinkFieldValue, toMemberFieldValue, toNumberFieldValue, toProgressFieldValue, toRateFieldValue, toRichTextFieldValue, toSelectFieldValue, toTextFieldValue, transformToCellText, updatePicture, writeToAITable, writeToClipboard, zhIntlCollator };
11619
12071
  //# sourceMappingURL=ai-table-grid.mjs.map