@ai-table/grid 0.1.23 → 0.1.25

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 (52) hide show
  1. package/components/cell-editors/cell-editor.scss +3 -0
  2. package/{constants/editor.d.ts → components/cell-editors/index.d.ts} +1 -1
  3. package/components/cell-editors/index.d.ts.map +1 -0
  4. package/components/drag/drag.component.d.ts.map +1 -1
  5. package/components/stat-type-menu/stat-type-menucomponent.d.ts +1 -0
  6. package/components/stat-type-menu/stat-type-menucomponent.d.ts.map +1 -1
  7. package/constants/field-stat.d.ts +3 -0
  8. package/constants/field-stat.d.ts.map +1 -0
  9. package/constants/index.d.ts +0 -1
  10. package/constants/index.d.ts.map +1 -1
  11. package/constants/table.d.ts +6 -1
  12. package/constants/table.d.ts.map +1 -1
  13. package/core/coordinate.d.ts.map +1 -1
  14. package/core/utils/field.d.ts +1 -1
  15. package/fesm2022/ai-table-grid.mjs +887 -434
  16. package/fesm2022/ai-table-grid.mjs.map +1 -1
  17. package/grid.component.d.ts.map +1 -1
  18. package/package.json +1 -1
  19. package/renderer/components/background.component.d.ts +37 -0
  20. package/renderer/components/background.component.d.ts.map +1 -0
  21. package/renderer/components/cells/link.component.d.ts.map +1 -1
  22. package/renderer/components/cells/rich-text.component.d.ts.map +1 -1
  23. package/renderer/components/field-head.component.d.ts.map +1 -1
  24. package/renderer/components/field-stat/stat.component.d.ts +29 -28
  25. package/renderer/components/field-stat/stat.component.d.ts.map +1 -1
  26. package/renderer/components/field-stat/stats.component.d.ts +6 -1
  27. package/renderer/components/field-stat/stats.component.d.ts.map +1 -1
  28. package/renderer/components/frozen-heads.component.d.ts +1 -1
  29. package/renderer/components/frozen-heads.component.d.ts.map +1 -1
  30. package/renderer/components/index.d.ts +1 -0
  31. package/renderer/components/index.d.ts.map +1 -1
  32. package/renderer/creations/create-cells.d.ts.map +1 -1
  33. package/renderer/creations/create-stats.d.ts.map +1 -1
  34. package/renderer/drawers/add-row-layout-drawer.d.ts +1 -1
  35. package/renderer/drawers/add-row-layout-drawer.d.ts.map +1 -1
  36. package/renderer/drawers/cell-drawer.d.ts.map +1 -1
  37. package/renderer/renderer.component.d.ts +20 -2
  38. package/renderer/renderer.component.d.ts.map +1 -1
  39. package/types/cell.d.ts +1 -0
  40. package/types/cell.d.ts.map +1 -1
  41. package/types/component-config.d.ts +31 -0
  42. package/types/component-config.d.ts.map +1 -1
  43. package/utils/clipboard/paste.d.ts.map +1 -1
  44. package/utils/field/model/date.d.ts +1 -0
  45. package/utils/field/model/date.d.ts.map +1 -1
  46. package/utils/field-stat.d.ts +7 -0
  47. package/utils/field-stat.d.ts.map +1 -0
  48. package/utils/i18n.d.ts +58 -1
  49. package/utils/i18n.d.ts.map +1 -1
  50. package/utils/index.d.ts +1 -0
  51. package/utils/index.d.ts.map +1 -1
  52. 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,261 @@ 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_MULTI_ITEM_FONT_SIZE = 12;
881
+ const AI_TABLE_OPTION_ITEM_RADIUS = 18;
882
+ const AI_TABLE_TAG_PADDING = 12;
883
+ const AI_TABLE_TAG_FONT_SIZE = 12;
884
+ const AI_TABLE_PIECE_WIDTH = 10;
885
+ const AI_TABLE_PIECE_RADIUS = 4;
886
+ const AI_TABLE_COMMON_FONT_SIZE = 14;
887
+ const AI_TABLE_DOT_RADIUS = 5;
888
+ const AI_TABLE_PROGRESS_BAR_HEIGHT = 10;
889
+ const AI_TABLE_PROGRESS_BAR_RADIUS = 5;
890
+ const AI_TABLE_PROGRESS_BAR_POINTER_HEIGHT = 18;
891
+ const AI_TABLE_PROGRESS_BAR_POINTER_WIDTH = 8;
892
+ const AI_TABLE_PROGRESS_TEXT_WIDTH = 46;
893
+ const AI_TABLE_POPOVER_LEFT_OFFSET = 4;
894
+ const AI_TABLE_RATE_MAX = 5;
895
+ const AI_TABLE_SCROLL_BAR_SIZE = 18;
896
+ const AI_TABLE_AUTO_SCROLL_LEFT_THRESHOLD = 40;
897
+ const AI_TABLE_AUTO_SCROLL_RIGHT_THRESHOLD = 40;
898
+ const AI_TABLE_AUTO_SCROLL_TOP_THRESHOLD = AI_TABLE_FIELD_HEAD_HEIGHT / 2;
899
+ const AI_TABLE_AUTO_SCROLL_BOTTOM_THRESHOLD = AI_TABLE_FIELD_HEAD_HEIGHT / 2;
900
+ const AI_TABLE_FIELD_STAT_HEIGHT = 48; // 字段统计高度
901
+ const AI_TABLE_TEXT_LINE_HEIGHT = 1.84; // 默认文本行高
902
+ const AI_TABLE_FIELD_STAT_CONTAINER_HEIGHT = AI_TABLE_FIELD_STAT_HEIGHT + AI_TABLE_CELL_LINE_BORDER * 2;
903
+
904
+ const MIN_COLUMN_WIDTH = 80;
905
+ const DBL_CLICK_EDIT_TYPE = [
906
+ AITableFieldType.text,
907
+ AITableFieldType.number,
908
+ AITableFieldType.select,
909
+ AITableFieldType.date,
910
+ AITableFieldType.member,
911
+ AITableFieldType.link
912
+ ];
913
+ const RowHeight = {
914
+ Short: 32,
915
+ Medium: 57,
916
+ Tall: 104,
917
+ ExtraTall: 152
918
+ };
919
+ const DEFAULT_POINT_POSITION = {
920
+ areaType: AITableAreaType.none,
921
+ targetName: AI_TABLE_BLANK,
922
+ realTargetName: AI_TABLE_BLANK,
923
+ rowIndex: -1,
924
+ columnIndex: -1,
925
+ x: 0,
926
+ y: 0,
927
+ offsetTop: 0,
928
+ offsetLeft: 0
929
+ };
930
+ const DEFAULT_SCROLL_STATE = {
931
+ scrollTop: 0,
932
+ scrollLeft: 0,
933
+ isScrolling: false
934
+ };
935
+
936
+ const DEFAULT_ICON_SHAPE = 'square';
937
+ const DEFAULT_ICON_SIZE = 16;
938
+ const Check = `
939
+ 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
940
+ 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
941
+ c0.3-0.3,0.9-0.3,1.2,0C14.3,5.7,14.3,6.3,14,6.6z
942
+ `;
943
+ const Unchecked = `
944
+ 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
945
+ 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
946
+ `;
947
+ 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`;
948
+ 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`;
949
+ 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`;
950
+ 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`;
951
+ 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`;
952
+ 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`;
953
+ 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`;
954
+ 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`;
955
+ 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`;
956
+ 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`;
957
+ 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`;
958
+ 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`;
959
+ 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`;
960
+ 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`;
961
+ 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`;
962
+ 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`;
963
+ 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`;
964
+ 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`;
965
+ 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`;
966
+ const IconPathMap = {};
967
+
968
+ const DEFAULT_FONT_SIZE = 14;
969
+ 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';
970
+ const DEFAULT_FONT_STYLE = 'normal';
971
+ const DEFAULT_TEXT_LINE_HEIGHT = 24;
972
+ const DEFAULT_TEXT_FILL = Colors.gray800;
973
+ const DEFAULT_FONT_WEIGHT = 'normal';
974
+ const DEFAULT_TEXT_WRAP = 'none';
975
+ const DEFAULT_TEXT_TRANSFORMS_ENABLED = 'position';
976
+ const DEFAULT_TEXT_ELLIPSIS = true;
977
+ const DEFAULT_TEXT_LISTENING = false;
978
+ const DEFAULT_TEXT_ALIGN_LEFT = 'left';
979
+ const DEFAULT_TEXT_ALIGN_CENTER = 'center';
980
+ const DEFAULT_TEXT_ALIGN_RIGHT = 'right';
981
+ const DEFAULT_TEXT_VERTICAL_ALIGN_MIDDLE = 'middle';
982
+ const DEFAULT_TEXT_MAX_HEIGHT = 130;
983
+ const DEFAULT_WRAP_TEXT_MAX_ROW = 1;
984
+ const DEFAULT_TEXT_VERTICAL_ALIGN_TOP = 'top';
985
+ const DEFAULT_TEXT_DECORATION = 'none';
986
+ const DEFAULT_TEXT_SCALE = 1;
987
+ const DEFAULT_TEXT_MAX_CACHE = 500;
988
+ const FONT_SIZE_SM = 12;
989
+
719
990
  /**
720
991
  * 用于构建 Canvas 基础坐标系,后续的绘制工作以此为基础
721
992
  */
@@ -761,7 +1032,7 @@ class Coordinate {
761
1032
  */
762
1033
  get totalHeight() {
763
1034
  const { offset, size } = this.getCellMetaData(this.rowCount - 1, AITableRowColumnType.row);
764
- return offset + size;
1035
+ return offset + size + AI_TABLE_FIELD_STAT_HEIGHT;
765
1036
  }
766
1037
  /**
767
1038
  * 根据 rowIndex 获取对应行高
@@ -937,26 +1208,6 @@ class Coordinate {
937
1208
  }
938
1209
  }
939
1210
 
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
1211
  const AITable = {
961
1212
  getColors() {
962
1213
  return Colors;
@@ -1039,109 +1290,52 @@ const buildInAlphabets = {
1039
1290
  [AlphabetType.uppercase]: customAlphabet(AlphabetDictionary.uppercase),
1040
1291
  [AlphabetType.alphanumeric]: customAlphabet(AlphabetDictionary.alphanumeric)
1041
1292
  };
1042
- function shortId(alphabet = AlphabetType.url, size = 6, quantity) {
1043
- if (size < 6 || size > 32) {
1044
- throw new Error(`Invalid size "${size}", size must in 6-32`);
1045
- }
1046
- let idGenerator;
1047
- if (isNumber(alphabet)) {
1048
- if (!includes(values(AlphabetType), alphabet)) {
1049
- throw new Error(`Invalid alphabet "${alphabet}", alphabet must one of ${Object.values(AlphabetType).join(' ')}`);
1050
- }
1051
- 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 = {}));
1293
+ function shortId(alphabet = AlphabetType.url, size = 6, quantity) {
1294
+ if (size < 6 || size > 32) {
1295
+ throw new Error(`Invalid size "${size}", size must in 6-32`);
1296
+ }
1297
+ let idGenerator;
1298
+ if (isNumber(alphabet)) {
1299
+ if (!includes(values(AlphabetType), alphabet)) {
1300
+ throw new Error(`Invalid alphabet "${alphabet}", alphabet must one of ${Object.values(AlphabetType).join(' ')}`);
1301
+ }
1302
+ idGenerator = buildInAlphabets[alphabet];
1303
+ }
1304
+ else if (isString(alphabet)) {
1305
+ idGenerator = customAlphabet(alphabet);
1306
+ }
1307
+ else {
1308
+ throw new Error(`Invalid alphabet "${alphabet}", alphabet type must be AlphabetType or string`);
1309
+ }
1310
+ if (!isUndefinedOrNull(quantity)) {
1311
+ if (!isNumber(quantity)) {
1312
+ throw new Error(`Invalid quantity "${quantity}", quantity type must be number`);
1313
+ }
1314
+ const idTasks = Array.from({ length: quantity }, () => idGenerator(size));
1315
+ const ids = idTasks;
1316
+ return ids;
1317
+ }
1318
+ return idGenerator(size);
1319
+ }
1139
1320
 
1140
- var AITableRowType;
1141
- (function (AITableRowType) {
1142
- AITableRowType["add"] = "add";
1143
- AITableRowType["record"] = "record";
1144
- })(AITableRowType || (AITableRowType = {}));
1321
+ function idCreator() {
1322
+ return ObjectID().toHexString();
1323
+ }
1324
+ function idsCreator(count) {
1325
+ if (count <= 0)
1326
+ return [];
1327
+ const newIds = [];
1328
+ for (let i = 0; i < count; i++) {
1329
+ newIds.push(idCreator());
1330
+ }
1331
+ return newIds;
1332
+ }
1333
+ function shortIdCreator() {
1334
+ return shortId(undefined, 8);
1335
+ }
1336
+ function shortIdsCreator(count) {
1337
+ return shortId(undefined, 8, count);
1338
+ }
1145
1339
 
1146
1340
  function createAITable(records, fields, gridData) {
1147
1341
  const aiTable = {
@@ -2039,213 +2233,31 @@ function getAvatarShortName(name) {
2039
2233
  }
2040
2234
  if (SET_OF_LETTERS_REGEX.test(name) && name.indexOf(' ') > 0) {
2041
2235
  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;
2236
+ return (words[0].slice(0, 1) + words[1].slice(0, 1)).toUpperCase();
2237
+ }
2238
+ return name.length > 2 ? name.slice(0, 2).toUpperCase() : name.toUpperCase();
2239
+ }
2240
+ function getAvatarBgColor(name) {
2241
+ if (!name) {
2242
+ return;
2243
+ }
2244
+ const colors = ['#56abfb', '#5dcfff', '#84e17e', '#73d897', '#ff9f73', '#fa8888', '#fb7fb7', '#9a7ef4', '#868af6'];
2245
+ const nameArray = name.split('');
2246
+ const code = name && name.length > 0
2247
+ ? nameArray.reduce(function (result, item) {
2248
+ result.value += item.charCodeAt(0);
2249
+ return result;
2250
+ }, { value: 0 }).value
2251
+ : 0;
2252
+ return colors[code % 9];
2253
+ }
2254
+ function expandCell(aiTable, path) {
2255
+ const [recordId, fieldId] = path;
2256
+ aiTable.selection.set({
2257
+ ...aiTable.selection(),
2258
+ expandCell: [recordId, fieldId]
2259
+ });
2260
+ }
2249
2261
 
2250
2262
  /**
2251
2263
  * 生成目标名称
@@ -2749,7 +2761,43 @@ function cellValueToSortValue$4(cellValue, field, references, sortKey = 'title')
2749
2761
  return values && values.length ? values.join(', ') : null;
2750
2762
  }
2751
2763
 
2764
+ const FIELD_STAT_TYPE_MAP = {
2765
+ [AITableStatType.EarliestTime]: {
2766
+ name: AITableGridI18nKey.earliestTime,
2767
+ type: AITableStatType.EarliestTime,
2768
+ format: AITableGridI18nKey.earliestTimeResult,
2769
+ exec: statEarliestTime
2770
+ },
2771
+ [AITableStatType.LatestTime]: {
2772
+ name: AITableGridI18nKey.latestTime,
2773
+ type: AITableStatType.LatestTime,
2774
+ format: AITableGridI18nKey.latestTimeResult,
2775
+ exec: statLatestTime
2776
+ },
2777
+ [AITableStatType.DateRangeOfDays]: {
2778
+ name: AITableGridI18nKey.dateRangeOfDays,
2779
+ type: AITableStatType.DateRangeOfDays,
2780
+ format: AITableGridI18nKey.dateRangeOfDaysResult,
2781
+ exec: statDateRangeOfDays
2782
+ },
2783
+ [AITableStatType.DateRangeOfMonths]: {
2784
+ name: AITableGridI18nKey.dateRangeOfMonths,
2785
+ type: AITableStatType.DateRangeOfMonths,
2786
+ format: AITableGridI18nKey.dateRangeOfMonthsResult,
2787
+ exec: statDateRangeOfMonths
2788
+ }
2789
+ };
2790
+
2752
2791
  class DateField extends DateFieldBase {
2792
+ constructor() {
2793
+ super([
2794
+ ...DEFAULT_FIELD_STAT_TYPE_ITEMS,
2795
+ FIELD_STAT_TYPE_MAP[AITableStatType.EarliestTime],
2796
+ FIELD_STAT_TYPE_MAP[AITableStatType.LatestTime],
2797
+ FIELD_STAT_TYPE_MAP[AITableStatType.DateRangeOfDays],
2798
+ FIELD_STAT_TYPE_MAP[AITableStatType.DateRangeOfMonths]
2799
+ ]);
2800
+ }
2753
2801
  transformCellValue(cellValue, options) {
2754
2802
  return transformToCellText(cellValue, options);
2755
2803
  }
@@ -3649,9 +3697,10 @@ const writeToAITable = async (aiTable, actions) => {
3649
3697
  const maxRecords = aiTable.context.maxRecords();
3650
3698
  const startRowIndex = aiTable.context.visibleRowsIndexMap().get(startRecordId) ?? 0;
3651
3699
  const lastRowIndex = aiTable.context.linearRows().length - 1;
3700
+ const recordsCount = aiTable.records().length;
3652
3701
  let appendRowCount = clipboardContent.length - (lastRowIndex - startRowIndex);
3653
- if (maxRecords && lastRowIndex + appendRowCount > maxRecords) {
3654
- appendRowCount = maxRecords - lastRowIndex;
3702
+ if (maxRecords && recordsCount + appendRowCount > maxRecords) {
3703
+ appendRowCount = maxRecords - recordsCount;
3655
3704
  result.isPasteOverMaxRecords = true;
3656
3705
  }
3657
3706
  actions.addRecord({ count: appendRowCount });
@@ -3660,8 +3709,9 @@ const writeToAITable = async (aiTable, actions) => {
3660
3709
  const copiedFieldLength = clipboardContent[0].length;
3661
3710
  const appendColCount = copiedFieldLength - (lastColIndex - startColIndex) - 1;
3662
3711
  const appendOffset = copiedFieldLength - appendColCount;
3712
+ const fieldsCount = aiTable.fields().length;
3663
3713
  for (let i = 0; i < appendColCount; i++) {
3664
- if (maxFields && lastColIndex + i + 1 < maxFields) {
3714
+ if (maxFields && fieldsCount + i + 1 < maxFields) {
3665
3715
  const originField = aiTableContent?.fields[appendOffset + i] || null;
3666
3716
  appendField(aiTable, originField, actions);
3667
3717
  }
@@ -5013,7 +5063,7 @@ class AITableCellLink extends CoverCellComponent {
5013
5063
  fillStyle: Colors.primary,
5014
5064
  fill: Colors.primary,
5015
5065
  height: rowHeight + 2,
5016
- lineHeight: 1.84,
5066
+ lineHeight: AI_TABLE_TEXT_LINE_HEIGHT,
5017
5067
  listening: true,
5018
5068
  ellipsis: true,
5019
5069
  textDecoration: 'underline',
@@ -5311,7 +5361,7 @@ class AITableCellRichText extends CoverCellComponent {
5311
5361
  width: textWidth,
5312
5362
  fillStyle: Colors.primary,
5313
5363
  height: rowHeight + 2,
5314
- lineHeight: 1.84,
5364
+ lineHeight: AI_TABLE_TEXT_LINE_HEIGHT,
5315
5365
  listening: false,
5316
5366
  ellipsis: true,
5317
5367
  zIndex
@@ -5534,7 +5584,7 @@ class AddRowLayout extends Layout {
5534
5584
  stroke: this.colors.gray200
5535
5585
  });
5536
5586
  }
5537
- renderFirstCell({ isHoverRow }) {
5587
+ renderFirstCell({ isHoverRow, isDisabled }) {
5538
5588
  if (!this.isFirst)
5539
5589
  return;
5540
5590
  const y = this.y;
@@ -5567,7 +5617,7 @@ class AddRowLayout extends Layout {
5567
5617
  y: y + (rowHeight - AI_TABLE_ICON_COMMON_SIZE) / 2 - AI_TABLE_OFFSET,
5568
5618
  data: AddOutlinedPath,
5569
5619
  size: AI_TABLE_ROW_HEAD_SIZE,
5570
- fill: this.readonly ? this.colors.gray300 : this.colors.gray600
5620
+ fill: this.readonly || isDisabled ? this.colors.gray300 : this.colors.gray600
5571
5621
  });
5572
5622
  }
5573
5623
  renderLastCell({ isHoverRow, isCheckedRow }) {
@@ -5590,9 +5640,10 @@ class AddRowLayout extends Layout {
5590
5640
  isHoverRow
5591
5641
  });
5592
5642
  }
5593
- render({ isHoverRow, isCheckedRow }) {
5643
+ render({ isHoverRow, isCheckedRow, isDisabled }) {
5594
5644
  this.renderFirstCell({
5595
- isHoverRow
5645
+ isHoverRow,
5646
+ isDisabled
5596
5647
  });
5597
5648
  this.renderCommonCell({
5598
5649
  isHoverRow
@@ -6208,7 +6259,7 @@ class CellDrawer extends Drawer {
6208
6259
  let currentX = x + AI_TABLE_CELL_PADDING;
6209
6260
  const maxContainerWidth = columnWidth - 2 * AI_TABLE_CELL_PADDING;
6210
6261
  const optionStyle = field.settings.option_style;
6211
- const fontStyle = `${DEFAULT_FONT_WEIGHT} ${AI_TABLE_OPTION_ITEM_FONT_SIZE}px ${DEFAULT_FONT_FAMILY}`;
6262
+ const fontStyle = `${DEFAULT_FONT_WEIGHT} ${AI_TABLE_OPTION_MULTI_ITEM_FONT_SIZE}px ${DEFAULT_FONT_FAMILY}`;
6212
6263
  const isDotOrPiece = optionStyle === AITableSelectOptionStyle.dot || optionStyle === AITableSelectOptionStyle.piece;
6213
6264
  let totalWidth = 0;
6214
6265
  const cellItemInfoMap = new Map();
@@ -6302,14 +6353,14 @@ class CellDrawer extends Drawer {
6302
6353
  }
6303
6354
  this.text({
6304
6355
  x: bgConfig.x + AI_TABLE_CELL_PADDING + AI_TABLE_CELL_MULTI_DOT_RADIUS * 2 + AI_TABLE_CELL_MULTI_PADDING_LEFT,
6305
- y: y + (AI_TABLE_ROW_BLANK_HEIGHT - AI_TABLE_OPTION_ITEM_FONT_SIZE) / 2,
6356
+ y: y + (AI_TABLE_ROW_BLANK_HEIGHT - AI_TABLE_OPTION_MULTI_ITEM_FONT_SIZE) / 2,
6306
6357
  text: this.textEllipsis({
6307
6358
  text: item.text,
6308
6359
  maxWidth: bgWidth - baseWidth,
6309
- fontSize: AI_TABLE_OPTION_ITEM_FONT_SIZE
6360
+ fontSize: AI_TABLE_OPTION_MULTI_ITEM_FONT_SIZE
6310
6361
  }).text,
6311
6362
  fillStyle: Colors.gray700,
6312
- fontSize: AI_TABLE_OPTION_ITEM_FONT_SIZE
6363
+ fontSize: AI_TABLE_OPTION_MULTI_ITEM_FONT_SIZE
6313
6364
  });
6314
6365
  }
6315
6366
  else if (optionStyle === AITableSelectOptionStyle.tag) {
@@ -6906,11 +6957,13 @@ const createCells = (config) => {
6906
6957
  containerWidth: coordinate.containerWidth,
6907
6958
  rowHeadWidth: context.rowHeadWidth(),
6908
6959
  hiddenIndexColumn: !!context.aiFieldConfig()?.hiddenIndexColumn,
6909
- hiddenRowDrag: !!context.aiFieldConfig()?.hiddenRowDrag
6960
+ hiddenRowDrag: !!context.aiFieldConfig()?.hiddenRowDrag,
6961
+ readonly: aiTable.context?.readonly?.()
6910
6962
  });
6911
6963
  addRowLayout.render({
6912
6964
  isHoverRow,
6913
- isCheckedRow
6965
+ isCheckedRow,
6966
+ isDisabled: maxRecords ? aiTable.records().length >= maxRecords : false
6914
6967
  });
6915
6968
  break;
6916
6969
  }
@@ -7144,7 +7197,7 @@ class AITableAddField {
7144
7197
  const fields = this.config().fields || [];
7145
7198
  const index = this.config().columnStopIndex;
7146
7199
  const fieldId = fields.length && index < fields.length ? fields[index]._id : '';
7147
- const disabled = maxFields && aiTable.gridData().fields.length >= maxFields;
7200
+ const disabled = maxFields && aiTable.fields().length >= maxFields;
7148
7201
  return {
7149
7202
  name: generateTargetName({
7150
7203
  targetName: AI_TABLE_FIELD_ADD_BUTTON,
@@ -7173,7 +7226,7 @@ class AITableAddField {
7173
7226
  fill: Colors.gray600,
7174
7227
  listening: false,
7175
7228
  visible: !readonly,
7176
- disabled: maxFields ? aiTable.gridData().fields.length >= maxFields : false
7229
+ disabled: maxFields ? aiTable.fields().length >= maxFields : false
7177
7230
  };
7178
7231
  });
7179
7232
  }
@@ -7373,7 +7426,7 @@ class AITableFieldHead {
7373
7426
  width: Math.max(this.textData().width, AI_TABLE_FIELD_HEAD_TEXT_MIN_WIDTH),
7374
7427
  height: height + 2,
7375
7428
  text: field.name,
7376
- lineHeight: 1.84
7429
+ lineHeight: AI_TABLE_TEXT_LINE_HEIGHT
7377
7430
  };
7378
7431
  });
7379
7432
  this.moreIconConfig = computed(() => {
@@ -7641,7 +7694,7 @@ class AITableFrozenColumnHeads {
7641
7694
  });
7642
7695
  this.textConfig = computed(() => {
7643
7696
  const text = AI_TABLE_INDEX_FIELD_TEXT;
7644
- const lineHeight = 1.84;
7697
+ const lineHeight = AI_TABLE_TEXT_LINE_HEIGHT;
7645
7698
  const measureText = TextMeasure().measureText(text);
7646
7699
  return {
7647
7700
  x: AI_TABLE_CELL_PADDING + this.dragOccupyWidth() + measureText.width / 2,
@@ -7965,7 +8018,7 @@ class AITableOtherRows {
7965
8018
  for (let rowIndex = rowStartIndex; rowIndex <= rowStopIndex; rowIndex++) {
7966
8019
  if (rowIndex > coordinate.rowCount - 1)
7967
8020
  break;
7968
- if (maxRecords && rowIndex >= maxRecords)
8021
+ if (maxRecords && aiTable.records().length >= maxRecords)
7969
8022
  break;
7970
8023
  const { _id, type } = aiTable.context.linearRows()[rowIndex];
7971
8024
  if (type === AITableRowType.record)
@@ -8044,6 +8097,173 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImpo
8044
8097
  }]
8045
8098
  }] });
8046
8099
 
8100
+ class AITableBackground {
8101
+ constructor() {
8102
+ this.config = input.required();
8103
+ this.isActive = input(false);
8104
+ this.koClick = output();
8105
+ this.hover = output();
8106
+ this.koMouseenter = output();
8107
+ this.koMouseleave = output();
8108
+ this.groupConfig = computed(() => {
8109
+ const { x, y } = this.config();
8110
+ return { x, y, listening: false };
8111
+ });
8112
+ this.isHover = model(false);
8113
+ this.isShowSpecialBorderConfig = computed(() => {
8114
+ const { borders } = this.config();
8115
+ const stroke = this.stroke();
8116
+ const strokeWidth = this.strokeWidth();
8117
+ return borders && stroke && strokeWidth && ___default.some(borders, (item) => !item) && ___default.some(borders, (item) => !!item);
8118
+ });
8119
+ this.borderLinesConfig = computed(() => {
8120
+ const { borders, height, width } = this.config();
8121
+ const stroke = this.stroke();
8122
+ const strokeWidth = this.strokeWidth();
8123
+ const result = [];
8124
+ const [top, right, bottom, left] = borders || [false, false, false, false];
8125
+ if (top) {
8126
+ result.push({
8127
+ x: 0,
8128
+ y: 0,
8129
+ points: [0, 0, width, 0],
8130
+ stroke,
8131
+ strokeWidth,
8132
+ listening: false
8133
+ });
8134
+ }
8135
+ if (right) {
8136
+ result.push({
8137
+ x: 0,
8138
+ y: 0,
8139
+ points: [width, 0, width, height],
8140
+ stroke,
8141
+ strokeWidth,
8142
+ listening: false
8143
+ });
8144
+ }
8145
+ if (bottom) {
8146
+ result.push({
8147
+ x: 0,
8148
+ y: 0,
8149
+ points: [0, height, width, height],
8150
+ stroke,
8151
+ strokeWidth,
8152
+ listening: false
8153
+ });
8154
+ }
8155
+ if (left) {
8156
+ result.push({
8157
+ x: 0,
8158
+ y: 0,
8159
+ points: [0, 0, 0, height],
8160
+ stroke,
8161
+ strokeWidth,
8162
+ listening: false
8163
+ });
8164
+ }
8165
+ return result;
8166
+ });
8167
+ this.stroke = computed(() => {
8168
+ const { stroke, hoverStroke } = this.config();
8169
+ const active = this.isHover() || this.isActive();
8170
+ return active ? hoverStroke || stroke : stroke;
8171
+ });
8172
+ this.strokeWidth = computed(() => {
8173
+ const { strokeWidth, hoverStrokeWidth } = this.config();
8174
+ const active = this.isHover() || this.isActive();
8175
+ return active ? hoverStrokeWidth || strokeWidth : strokeWidth;
8176
+ });
8177
+ this.containerConfig = computed(() => {
8178
+ const { x, y } = this.config();
8179
+ return { x, y };
8180
+ });
8181
+ this.bgConfig = computed(() => {
8182
+ const { name, width, height, fill = Colors.transparent, cornerRadius, opacity, hoverFill, hoverOpacity, listening } = this.config();
8183
+ const active = this.isHover() || this.isActive();
8184
+ const result = {
8185
+ name,
8186
+ width,
8187
+ height,
8188
+ fill: active ? hoverFill || fill : fill,
8189
+ cornerRadius,
8190
+ opacity: active ? hoverOpacity || opacity : opacity,
8191
+ listening
8192
+ };
8193
+ if (!this.isShowSpecialBorderConfig()) {
8194
+ result.stroke = this.stroke();
8195
+ result.strokeWidth = this.strokeWidth();
8196
+ }
8197
+ return result;
8198
+ });
8199
+ }
8200
+ onClick(e) {
8201
+ this.koClick.emit(e);
8202
+ }
8203
+ koMousemove(e) {
8204
+ // e.event.cancelBubble = true;
8205
+ }
8206
+ onMouseenter(e) {
8207
+ this.isHover.set(true);
8208
+ const { coordinate } = this.config();
8209
+ setMouseStyle('pointer', coordinate.container);
8210
+ this.koMouseenter.emit(e);
8211
+ this.hover.emit(this.isHover());
8212
+ }
8213
+ onMouseleave(e) {
8214
+ this.isHover.set(false);
8215
+ const { coordinate } = this.config();
8216
+ setMouseStyle('default', coordinate.container);
8217
+ this.koMouseleave.emit(e);
8218
+ this.hover.emit(this.isHover());
8219
+ }
8220
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AITableBackground, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
8221
+ 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: `
8222
+ <ko-group [config]="containerConfig()">
8223
+ <ko-group>
8224
+ <ko-rect
8225
+ [config]="bgConfig()"
8226
+ (koMousemove)="koMousemove($event)"
8227
+ (koMouseenter)="onMouseenter($event)"
8228
+ (koMouseleave)="onMouseleave($event)"
8229
+ (koClick)="koClick.emit($event)"
8230
+ ></ko-rect>
8231
+ </ko-group>
8232
+ <ko-group>
8233
+ @for (lineConfig of borderLinesConfig(); track $index) {
8234
+ <ko-line [config]="lineConfig"></ko-line>
8235
+ }
8236
+ </ko-group>
8237
+ </ko-group>
8238
+ `, 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 }); }
8239
+ }
8240
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AITableBackground, decorators: [{
8241
+ type: Component,
8242
+ args: [{
8243
+ selector: 'ai-table-background',
8244
+ template: `
8245
+ <ko-group [config]="containerConfig()">
8246
+ <ko-group>
8247
+ <ko-rect
8248
+ [config]="bgConfig()"
8249
+ (koMousemove)="koMousemove($event)"
8250
+ (koMouseenter)="onMouseenter($event)"
8251
+ (koMouseleave)="onMouseleave($event)"
8252
+ (koClick)="koClick.emit($event)"
8253
+ ></ko-rect>
8254
+ </ko-group>
8255
+ <ko-group>
8256
+ @for (lineConfig of borderLinesConfig(); track $index) {
8257
+ <ko-line [config]="lineConfig"></ko-line>
8258
+ }
8259
+ </ko-group>
8260
+ </ko-group>
8261
+ `,
8262
+ imports: [KoShape, KoContainer],
8263
+ changeDetection: ChangeDetectionStrategy.OnPush
8264
+ }]
8265
+ }] });
8266
+
8047
8267
  class AITableFillHandle {
8048
8268
  constructor() {
8049
8269
  this.config = input.required();
@@ -8210,7 +8430,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImpo
8210
8430
  }] });
8211
8431
 
8212
8432
  const createFieldStats = (config) => {
8213
- const { coordinate, columnStartIndex, columnStopIndex, aiTable, actions } = config;
8433
+ const { coordinate, columnStartIndex, columnStopIndex, aiTable, actions, y, isHoverStatContainer, readonly } = config;
8214
8434
  const colors = Colors;
8215
8435
  const { columnCount, rowInitSize: fieldHeadHeight } = coordinate;
8216
8436
  const fields = aiTable.gridData().fields;
@@ -8229,12 +8449,15 @@ const createFieldStats = (config) => {
8229
8449
  aiTable,
8230
8450
  coordinate,
8231
8451
  actions,
8452
+ columnIndex,
8232
8453
  x,
8233
- y: coordinate.containerHeight - AI_TABLE_FIELD_STAT_HEIGHT,
8454
+ y,
8234
8455
  width: columnWidth,
8235
- height: fieldHeadHeight,
8456
+ height: AI_TABLE_FIELD_STAT_HEIGHT,
8236
8457
  field,
8237
- stroke: columnIndex === 0 ? colors.transparent : undefined
8458
+ stroke: columnIndex === 0 ? colors.transparent : undefined,
8459
+ isHoverStatContainer: isHoverStatContainer,
8460
+ readonly
8238
8461
  };
8239
8462
  fieldStats.push(fieldStat);
8240
8463
  }
@@ -8248,6 +8471,7 @@ class AITableStatTypeMenu extends ThyDropdownAbstractMenu {
8248
8471
  this.aiTable = input.required();
8249
8472
  this.statMenus = input.required();
8250
8473
  this.menuClick = output();
8474
+ this.selectStatType = computed(() => this.field().stat_type || AITableStatType.None);
8251
8475
  }
8252
8476
  execute(menu) {
8253
8477
  this.menuClick.emit({
@@ -8256,33 +8480,37 @@ class AITableStatTypeMenu extends ThyDropdownAbstractMenu {
8256
8480
  });
8257
8481
  }
8258
8482
  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 }); }
8483
+ 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
8484
  }
8261
8485
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AITableStatTypeMenu, decorators: [{
8262
8486
  type: Component,
8263
8487
  args: [{ selector: 'ai-table-stat-type-menu', changeDetection: ChangeDetectionStrategy.OnPush, host: {
8264
8488
  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" }]
8489
+ }, 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
8490
  }] });
8267
8491
 
8268
8492
  class AITableFieldStat {
8269
8493
  constructor() {
8270
8494
  this.thyPopover = inject(ThyPopover);
8271
8495
  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();
8496
+ this.hover = output();
8497
+ this.isActive = signal(false);
8274
8498
  this.availableTextWidth = computed(() => {
8275
8499
  const { width } = this.config();
8276
- return width - AI_TABLE_ICON_COMMON_SIZE;
8500
+ return width - AI_TABLE_ACTION_COMMON_SIZE - AI_TABLE_CELL_PADDING;
8277
8501
  });
8278
8502
  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);
8503
+ const textString = this.renderText() || '';
8504
+ const availableTextWidth = this.availableTextWidth();
8505
+ const { text, textWidth } = drawer.textEllipsis({
8506
+ text: textString,
8507
+ maxWidth: availableTextWidth,
8508
+ fontSize: DEFAULT_FONT_SIZE,
8509
+ fontWeight: DEFAULT_FONT_WEIGHT
8510
+ });
8282
8511
  return {
8283
- width: Math.min(width, this.availableTextWidth()),
8284
- height,
8285
- isOverflow
8512
+ width: textWidth,
8513
+ text
8286
8514
  };
8287
8515
  });
8288
8516
  this.groupConfig = computed(() => {
@@ -8292,21 +8520,22 @@ class AITableFieldStat {
8292
8520
  };
8293
8521
  });
8294
8522
  this.bgConfig = computed(() => {
8295
- const { field, width, height } = this.config();
8523
+ const { field, width, height, coordinate, readonly } = this.config();
8296
8524
  return {
8297
- x: AI_TABLE_OFFSET,
8298
- y: AI_TABLE_OFFSET,
8525
+ coordinate,
8526
+ x: 0,
8527
+ y: 0,
8299
8528
  name: generateTargetName({
8300
- targetName: 'sss',
8529
+ targetName: AI_TABLE_FIELD_STAT_BG,
8301
8530
  fieldId: field._id,
8302
8531
  mouseStyle: 'pointer'
8303
8532
  }),
8304
8533
  width: width,
8305
8534
  height: height,
8306
8535
  fill: Colors.white,
8307
- stroke: Colors.gray200,
8308
- strokeWidth: 1,
8309
- opacity: 1
8536
+ hoverFill: Colors.gray100,
8537
+ opacity: 1,
8538
+ listening: !readonly
8310
8539
  };
8311
8540
  });
8312
8541
  this.field = computed(() => {
@@ -8315,30 +8544,93 @@ class AITableFieldStat {
8315
8544
  });
8316
8545
  this.records = computed(() => {
8317
8546
  const { aiTable } = this.config();
8318
- return aiTable.records;
8547
+ return aiTable.gridData().records;
8548
+ });
8549
+ this.aiFieldConfig = computed(() => {
8550
+ const { aiTable } = this.config();
8551
+ return aiTable.context?.aiFieldConfig;
8552
+ });
8553
+ this.aiTable = computed(() => {
8554
+ const { aiTable } = this.config();
8555
+ return aiTable;
8556
+ });
8557
+ this.options = computed(() => {
8558
+ const aiTable = this.aiTable();
8559
+ return {
8560
+ field: this.field(),
8561
+ aiTable
8562
+ };
8319
8563
  });
8320
- this.statValue = computed(() => {
8564
+ this.isHoverStatContainer = computed(() => this.config().isHoverStatContainer);
8565
+ this.renderText = computed(() => {
8321
8566
  const field = this.field();
8322
8567
  const records = this.records();
8323
8568
  const fieldModel = FieldModelMap[field.type];
8324
- const result = fieldModel.getStatFormatValue(field, records());
8325
- return result;
8569
+ const selectedInfo = this.selectedInfo();
8570
+ if (this.isFirstColumn() && selectedInfo.isSelected) {
8571
+ if (selectedInfo.selectedType === 'records') {
8572
+ return `已经选择 ${selectedInfo.selectedCount} 条记录`;
8573
+ }
8574
+ else {
8575
+ return `已经选择 ${selectedInfo.selectedCount} 个单元格`;
8576
+ }
8577
+ }
8578
+ else {
8579
+ const result = fieldModel.getStatFormatValue(records, this.options());
8580
+ if (!result && this.isHoverStatContainer()) {
8581
+ return `不展示`;
8582
+ }
8583
+ return result;
8584
+ }
8585
+ });
8586
+ this.containerBox = computed(() => {
8587
+ const { height, width } = this.config();
8588
+ return { height, width };
8326
8589
  });
8327
8590
  this.textConfig = computed(() => {
8328
- const { field, height, aiTable } = this.config();
8329
- const text = this.statValue();
8591
+ const { height, width } = this.containerBox();
8592
+ const text = this.renderText();
8330
8593
  if (text) {
8594
+ const renderWidth = this.textData().width;
8331
8595
  return {
8332
- x: this.textOffset,
8596
+ x: width - AI_TABLE_ACTION_COMMON_SIZE - renderWidth,
8333
8597
  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
8598
+ width: renderWidth,
8599
+ height: height,
8600
+ text: this.textData().text,
8601
+ lineHeight: AI_TABLE_TEXT_LINE_HEIGHT,
8602
+ listening: false
8338
8603
  };
8339
8604
  }
8340
8605
  return null;
8341
8606
  });
8607
+ this.selectedRecordCount = computed(() => {
8608
+ const aiTable = this.aiTable();
8609
+ const selectedRecords = aiTable.selection().selectedRecords;
8610
+ return selectedRecords.size;
8611
+ });
8612
+ this.selectedCellCount = computed(() => {
8613
+ const aiTable = this.aiTable();
8614
+ const selectedCells = aiTable.selection().selectedCells;
8615
+ return selectedCells.size;
8616
+ });
8617
+ this.selectedInfo = computed(() => {
8618
+ const selectedRecordCount = this.selectedRecordCount();
8619
+ const selectedCellCount = this.selectedCellCount();
8620
+ const selectedCount = selectedRecordCount || selectedCellCount;
8621
+ const selectedType = selectedRecordCount > 0 ? 'records' : selectedCellCount > 0 ? 'cells' : null;
8622
+ const isSelected = selectedRecordCount > 0 || selectedCellCount > 1;
8623
+ const result = {
8624
+ isSelected,
8625
+ selectedType,
8626
+ selectedCount
8627
+ };
8628
+ return result;
8629
+ });
8630
+ this.isFirstColumn = computed(() => {
8631
+ const { columnIndex } = this.config();
8632
+ return columnIndex === 0;
8633
+ });
8342
8634
  this.iconConfig = computed(() => {
8343
8635
  const { field, width, height } = this.config();
8344
8636
  const commonIconOffsetY = (height - AI_TABLE_ACTION_COMMON_SIZE) / 2;
@@ -8355,8 +8647,12 @@ class AITableFieldStat {
8355
8647
  };
8356
8648
  });
8357
8649
  }
8650
+ onHoverChange(isHover) {
8651
+ this.hover.emit(this.isActive() || isHover);
8652
+ }
8358
8653
  clickStat(e) {
8359
8654
  e.event.evt.stopPropagation();
8655
+ this.isActive.set(true);
8360
8656
  const { aiTable, coordinate, field, actions } = this.config();
8361
8657
  const statRect = e.event.target.getClientRect();
8362
8658
  const fieldGroupRect = e.event.target.getParent()?.getParent()?.getClientRect();
@@ -8382,29 +8678,39 @@ class AITableFieldStat {
8382
8678
  position: editFieldPosition,
8383
8679
  aiTable,
8384
8680
  field,
8385
- statMenus: fieldModel.statTypes
8386
- // fieldMenus:
8681
+ statMenus: fieldModel.getStatTypes(aiTable)
8387
8682
  }
8388
8683
  });
8389
8684
  ref.componentInstance.menuClick.subscribe((event) => {
8685
+ this.isActive.set(false);
8390
8686
  actions.setField({
8391
8687
  ...event.field,
8392
8688
  stat_type: event.menu.type
8393
8689
  });
8394
8690
  });
8691
+ ref.afterClosed().subscribe(() => {
8692
+ this.isActive.set(false);
8693
+ this.hover.emit(false);
8694
+ });
8395
8695
  }
8396
8696
  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: `
8697
+ 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
8698
  <ko-group [config]="groupConfig()">
8399
- <ko-rect [config]="bgConfig()" (koClick)="clickStat($event)"></ko-rect>
8400
- @if (textConfig()) {
8401
- <ko-group>
8699
+ <ai-table-background
8700
+ [config]="bgConfig()"
8701
+ (koClick)="clickStat($event)"
8702
+ [isActive]="isActive()"
8703
+ (hover)="onHoverChange($event)"
8704
+ ></ai-table-background>
8705
+
8706
+ <ko-group>
8707
+ @if (textConfig()) {
8402
8708
  <ai-table-text [config]="textConfig()!"></ai-table-text>
8403
8709
  <ai-table-icon [config]="iconConfig()"></ai-table-icon>
8404
- </ko-group>
8405
- }
8710
+ }
8711
+ </ko-group>
8406
8712
  </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 }); }
8713
+ `, 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
8714
  }
8409
8715
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AITableFieldStat, decorators: [{
8410
8716
  type: Component,
@@ -8412,16 +8718,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImpo
8412
8718
  selector: 'ai-table-field-stat',
8413
8719
  template: `
8414
8720
  <ko-group [config]="groupConfig()">
8415
- <ko-rect [config]="bgConfig()" (koClick)="clickStat($event)"></ko-rect>
8416
- @if (textConfig()) {
8417
- <ko-group>
8721
+ <ai-table-background
8722
+ [config]="bgConfig()"
8723
+ (koClick)="clickStat($event)"
8724
+ [isActive]="isActive()"
8725
+ (hover)="onHoverChange($event)"
8726
+ ></ai-table-background>
8727
+
8728
+ <ko-group>
8729
+ @if (textConfig()) {
8418
8730
  <ai-table-text [config]="textConfig()!"></ai-table-text>
8419
8731
  <ai-table-icon [config]="iconConfig()"></ai-table-icon>
8420
- </ko-group>
8421
- }
8732
+ }
8733
+ </ko-group>
8422
8734
  </ko-group>
8423
8735
  `,
8424
- imports: [KoContainer, KoShape, AITableTextComponent, AITableIcon],
8736
+ imports: [KoContainer, AITableTextComponent, AITableIcon, AITableBackground],
8425
8737
  changeDetection: ChangeDetectionStrategy.OnPush
8426
8738
  }]
8427
8739
  }] });
@@ -8429,32 +8741,37 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImpo
8429
8741
  class AITableFieldStats {
8430
8742
  constructor() {
8431
8743
  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
- });
8744
+ this.hover = output();
8745
+ this.isHover = signal(false);
8746
+ this.statConfigs = computed(() => createFieldStats(this.config()));
8747
+ }
8748
+ onMouseenter(e) {
8749
+ this.isHover.set(true);
8750
+ }
8751
+ onMouseleave(e) {
8752
+ this.isHover.set(false);
8440
8753
  }
8441
8754
  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 }); }
8755
+ 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: `
8756
+ <ko-group>
8757
+ @for (config of statConfigs(); track $index) {
8758
+ <ai-table-field-stat [config]="config" (hover)="hover.emit($event)"></ai-table-field-stat>
8759
+ }
8760
+ </ko-group>
8761
+ `, 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
8762
  }
8448
8763
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AITableFieldStats, decorators: [{
8449
8764
  type: Component,
8450
8765
  args: [{
8451
8766
  selector: 'ai-table-column-stats',
8452
8767
  template: `
8453
- @for (config of statConfigs(); track $index) {
8454
- <ai-table-field-stat [config]="config"></ai-table-field-stat>
8455
- }
8768
+ <ko-group>
8769
+ @for (config of statConfigs(); track $index) {
8770
+ <ai-table-field-stat [config]="config" (hover)="hover.emit($event)"></ai-table-field-stat>
8771
+ }
8772
+ </ko-group>
8456
8773
  `,
8457
- imports: [AITableFieldStat],
8774
+ imports: [AITableFieldStat, KoContainer],
8458
8775
  changeDetection: ChangeDetectionStrategy.OnPush
8459
8776
  }]
8460
8777
  }] });
@@ -8471,6 +8788,7 @@ class AITableRenderer {
8471
8788
  this.koClick = output();
8472
8789
  this.koDblclick = output();
8473
8790
  this.koMouseleave = output();
8791
+ this.isHoverStatContainer = signal(false);
8474
8792
  this.fields = computed(() => {
8475
8793
  return AITable.getVisibleFields(this.config().aiTable);
8476
8794
  });
@@ -8489,6 +8807,9 @@ class AITableRenderer {
8489
8807
  this.containerHeight = computed(() => {
8490
8808
  return this.config().containerHeight;
8491
8809
  });
8810
+ this.gridContainerHeight = computed(() => {
8811
+ return this.containerHeight() - AI_TABLE_FIELD_STAT_CONTAINER_HEIGHT;
8812
+ });
8492
8813
  this.scrollState = computed(() => {
8493
8814
  return this.config()?.aiTable.context.scrollState();
8494
8815
  });
@@ -8520,7 +8841,15 @@ class AITableRenderer {
8520
8841
  clipX: 0,
8521
8842
  clipY: 0,
8522
8843
  clipWidth: this.containerWidth(),
8523
- clipHeight: this.containerHeight()
8844
+ clipHeight: this.gridContainerHeight()
8845
+ };
8846
+ });
8847
+ this.statGroupConfig = computed(() => {
8848
+ return {
8849
+ x: 0,
8850
+ y: this.containerHeight() - AI_TABLE_FIELD_STAT_CONTAINER_HEIGHT - AI_TABLE_CELL_LINE_BORDER,
8851
+ width: this.containerWidth(),
8852
+ height: AI_TABLE_FIELD_STAT_CONTAINER_HEIGHT
8524
8853
  };
8525
8854
  });
8526
8855
  this.commonGroupConfig = computed(() => {
@@ -8528,7 +8857,7 @@ class AITableRenderer {
8528
8857
  clipX: this.frozenAreaWidth() + 1,
8529
8858
  clipY: 0,
8530
8859
  clipWidth: this.cellGroupClipWidth(),
8531
- clipHeight: this.containerHeight()
8860
+ clipHeight: this.gridContainerHeight()
8532
8861
  };
8533
8862
  });
8534
8863
  this.attachGroupConfig = computed(() => {
@@ -8536,7 +8865,7 @@ class AITableRenderer {
8536
8865
  clipX: this.frozenAreaWidth() - 1,
8537
8866
  clipY: this.coordinate().rowInitSize - 1,
8538
8867
  clipWidth: this.containerWidth() - this.frozenAreaWidth(),
8539
- clipHeight: this.containerHeight() - this.coordinate().rowInitSize
8868
+ clipHeight: this.gridContainerHeight() - this.coordinate().rowInitSize
8540
8869
  };
8541
8870
  });
8542
8871
  this.frozenAttachGroupConfig = computed(() => {
@@ -8544,7 +8873,7 @@ class AITableRenderer {
8544
8873
  clipX: 0,
8545
8874
  clipY: this.coordinate().rowInitSize - 1,
8546
8875
  clipWidth: this.frozenAreaWidth() + 10,
8547
- clipHeight: this.containerHeight() - this.coordinate().rowInitSize
8876
+ clipHeight: this.gridContainerHeight() - this.coordinate().rowInitSize
8548
8877
  };
8549
8878
  });
8550
8879
  this.frozenCoverAttachGroupConfig = computed(() => {
@@ -8552,7 +8881,7 @@ class AITableRenderer {
8552
8881
  clipX: 0,
8553
8882
  clipY: this.coordinate().rowInitSize + 1,
8554
8883
  clipWidth: this.frozenAreaWidth(),
8555
- clipHeight: this.containerHeight() - this.coordinate().rowInitSize
8884
+ clipHeight: this.gridContainerHeight() - this.coordinate().rowInitSize
8556
8885
  };
8557
8886
  });
8558
8887
  this.offsetYConfig = computed(() => {
@@ -8574,7 +8903,7 @@ class AITableRenderer {
8574
8903
  offsetY: scrollTop
8575
8904
  };
8576
8905
  });
8577
- this.columnHeadOrAddFieldConfig = computed(() => {
8906
+ this.columnFrozenHeadFieldConfig = computed(() => {
8578
8907
  const { columnStartIndex, columnStopIndex } = this.visibleRangeInfo();
8579
8908
  const { aiTable, coordinate, readonly, maxFields, actions } = this.config();
8580
8909
  const { pointPosition } = aiTable.context;
@@ -8591,6 +8920,60 @@ class AITableRenderer {
8591
8920
  maxFields
8592
8921
  };
8593
8922
  });
8923
+ this.columnHeadFieldConfig = computed(() => {
8924
+ const { columnStartIndex, columnStopIndex } = this.visibleRangeInfo();
8925
+ const { aiTable, coordinate, readonly, maxFields, actions } = this.config();
8926
+ const { pointPosition } = aiTable.context;
8927
+ const fields = this.fields();
8928
+ return {
8929
+ aiTable,
8930
+ actions,
8931
+ coordinate,
8932
+ fields,
8933
+ columnStartIndex,
8934
+ columnStopIndex,
8935
+ pointPosition: pointPosition(),
8936
+ readonly,
8937
+ maxFields
8938
+ };
8939
+ });
8940
+ this.columnFieldStatsConfig = computed(() => {
8941
+ return {
8942
+ ...this.columnHeadFieldConfig(),
8943
+ width: this.cellGroupClipWidth(),
8944
+ x: this.frozenAreaWidth(),
8945
+ y: AI_TABLE_CELL_LINE_BORDER,
8946
+ height: AI_TABLE_FIELD_STAT_HEIGHT,
8947
+ isHoverStatContainer: this.isHoverStatContainer()
8948
+ };
8949
+ });
8950
+ this.columnFieldStatsBgConfig = computed(() => {
8951
+ return {
8952
+ x: 0,
8953
+ y: 0,
8954
+ width: this.containerWidth(),
8955
+ height: AI_TABLE_FIELD_STAT_HEIGHT + AI_TABLE_CELL_LINE_BORDER * 2,
8956
+ fill: Colors.white,
8957
+ stroke: Colors.gray200,
8958
+ strokeWidth: AI_TABLE_CELL_LINE_BORDER,
8959
+ opacity: 1,
8960
+ borders: [true, false, true, false],
8961
+ listening: true,
8962
+ coordinate: this.coordinate()
8963
+ };
8964
+ });
8965
+ this.columnFrozenFieldStatsConfig = computed(() => {
8966
+ return {
8967
+ ...this.columnHeadFieldConfig(),
8968
+ width: this.frozenAreaWidth(),
8969
+ x: 0,
8970
+ y: AI_TABLE_CELL_LINE_BORDER,
8971
+ columnStartIndex: 0,
8972
+ columnStopIndex: this.coordinate().frozenColumnCount - 1,
8973
+ height: AI_TABLE_FIELD_STAT_HEIGHT,
8974
+ isHoverStatContainer: this.isHoverStatContainer()
8975
+ };
8976
+ });
8594
8977
  this.cellsConfig = computed(() => {
8595
8978
  const { aiTable, readonly, coordinate, references, actions, maxRecords } = this.config();
8596
8979
  const { rowStartIndex, rowStopIndex, columnStartIndex, columnStopIndex } = this.visibleRangeInfo();
@@ -8669,8 +9052,11 @@ class AITableRenderer {
8669
9052
  stageMouseleave(e) {
8670
9053
  this.koMouseleave.emit(e);
8671
9054
  }
9055
+ onStatContainerHover(isHover) {
9056
+ this.isHoverStatContainer.set(isHover);
9057
+ }
8672
9058
  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 }); }
9059
+ 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
9060
  }
8675
9061
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AITableRenderer, decorators: [{
8676
9062
  type: Component,
@@ -8689,8 +9075,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImpo
8689
9075
  AITableHoverRowHeads,
8690
9076
  AITableOtherRows,
8691
9077
  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" }]
9078
+ AITableFieldStats,
9079
+ AITableBackground
9080
+ ], 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
9081
  }] });
8695
9082
 
8696
9083
  class AITableCellRate extends CoverCellComponent {
@@ -9223,6 +9610,62 @@ function aiTableRectConfigToKonvaConfig(rectConfig, options) {
9223
9610
  return result;
9224
9611
  }
9225
9612
 
9613
+ function getDateFieldValues(records, options, filterNull = false) {
9614
+ const { aiTable, field } = options;
9615
+ const result = ___default.map(records, (record) => {
9616
+ const cellValue = AITableQueries.getFieldValue(aiTable, [record._id, field._id]);
9617
+ return cellValue;
9618
+ });
9619
+ if (filterNull) {
9620
+ return result.filter((value) => value !== null);
9621
+ }
9622
+ return result;
9623
+ }
9624
+ function statEarliestTime(records, options) {
9625
+ const values = getDateFieldValues(records, options, true);
9626
+ const result = ___default.minBy(values, (value) => {
9627
+ return value.timestamp;
9628
+ });
9629
+ return transformToCellText(result, options);
9630
+ }
9631
+ function statLatestTime(records, options) {
9632
+ const { field } = options;
9633
+ const values = getDateFieldValues(records, options, true);
9634
+ const result = ___default.maxBy(values, (value) => {
9635
+ return value.timestamp;
9636
+ });
9637
+ return transformToCellText(result, options);
9638
+ }
9639
+ function statDateRangeOfDays(records, options) {
9640
+ const { field } = options;
9641
+ const values = getDateFieldValues(records, options, true);
9642
+ const start = ___default.minBy(values, (value) => {
9643
+ return value.timestamp;
9644
+ });
9645
+ const end = ___default.maxBy(values, (value) => {
9646
+ return value.timestamp;
9647
+ });
9648
+ if (start && end) {
9649
+ const days = differenceInDays(fromUnixTime(end.timestamp), fromUnixTime(start.timestamp));
9650
+ return days;
9651
+ }
9652
+ return 0;
9653
+ }
9654
+ function statDateRangeOfMonths(records, options) {
9655
+ const values = getDateFieldValues(records, options, true);
9656
+ const start = ___default.minBy(values, (value) => {
9657
+ return value.timestamp;
9658
+ });
9659
+ const end = ___default.maxBy(values, (value) => {
9660
+ return value.timestamp;
9661
+ });
9662
+ if (start && end) {
9663
+ const months = differenceInMonths(fromUnixTime(end.timestamp), fromUnixTime(start.timestamp));
9664
+ return months;
9665
+ }
9666
+ return 0;
9667
+ }
9668
+
9226
9669
  function getFillDirection(aiTable, sourceCells, mouseUpRecordId) {
9227
9670
  const { startCell: sourceStartCell, endCell: sourceEndCell } = getStartAndEndCell(sourceCells);
9228
9671
  const currentRowIndex = aiTable.context.visibleRowsIndexMap().get(mouseUpRecordId);
@@ -9654,6 +10097,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImpo
9654
10097
  ], 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
10098
  }] });
9656
10099
 
10100
+ const GRID_CELL_EDITOR_MAP = {
10101
+ [AITableFieldType.text]: TextCellEditorComponent,
10102
+ [AITableFieldType.richText]: TextCellEditorComponent,
10103
+ [AITableFieldType.select]: SelectCellEditorComponent,
10104
+ [AITableFieldType.number]: NumberCellEditorComponent,
10105
+ [AITableFieldType.date]: DateCellEditorComponent,
10106
+ [AITableFieldType.link]: LinkCellEditorComponent
10107
+ };
10108
+
9657
10109
  class AITableGridEventService {
9658
10110
  constructor() {
9659
10111
  this.dblClickEvent$ = new Subject();
@@ -10050,7 +10502,7 @@ class AITableGridBase {
10050
10502
  AI_TABLE_GRID_FIELD_SERVICE_MAP.set(this.aiTable, this.aiTableGridFieldService);
10051
10503
  }
10052
10504
  addRecord(options) {
10053
- const records = this.aiTable.gridData().records;
10505
+ const records = this.aiTable.records();
10054
10506
  const recordCount = records.length;
10055
10507
  if (this.aiMaxRecords() && recordCount >= this.aiMaxRecords()) {
10056
10508
  return;
@@ -10064,7 +10516,7 @@ class AITableGridBase {
10064
10516
  this.aiTableGridSelectionService.toggleSelectAll(checked);
10065
10517
  }
10066
10518
  addField(gridColumnBlank, position) {
10067
- if (this.aiMaxFields() && this.aiTable.gridData().fields.length >= this.aiMaxFields()) {
10519
+ if (this.aiMaxFields() && this.aiTable.fields().length >= this.aiMaxFields()) {
10068
10520
  return;
10069
10521
  }
10070
10522
  const field = createDefaultField(this.aiTable, AITableFieldType.text);
@@ -10676,7 +11128,8 @@ class AITableDragComponent {
10676
11128
  verticalElement: this.verticalBarElement
10677
11129
  },
10678
11130
  frozenArea: {
10679
- top: AI_TABLE_FIELD_HEAD_HEIGHT
11131
+ top: AI_TABLE_FIELD_HEAD_HEIGHT,
11132
+ bottom: this.containerHeight - AI_TABLE_SCROLL_BAR_SIZE - AI_TABLE_FIELD_STAT_CONTAINER_HEIGHT
10680
11133
  },
10681
11134
  edgeThreshold: {
10682
11135
  top: AI_TABLE_AUTO_SCROLL_TOP_THRESHOLD,
@@ -11570,7 +12023,7 @@ class AITableGrid extends AITableGridBase {
11570
12023
  frozenArea: {
11571
12024
  top: AI_TABLE_FIELD_HEAD_HEIGHT,
11572
12025
  left: coordinate.getColumnWidth(0) + this.aiTable.context.rowHeadWidth(),
11573
- bottom: containerRect.height - AI_TABLE_SCROLL_BAR_SIZE,
12026
+ bottom: containerRect.height - AI_TABLE_SCROLL_BAR_SIZE - AI_TABLE_FIELD_STAT_CONTAINER_HEIGHT,
11574
12027
  right: containerRect.width - AI_TABLE_SCROLL_BAR_SIZE
11575
12028
  },
11576
12029
  edgeThreshold: {
@@ -11615,5 +12068,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImpo
11615
12068
  * Generated bundle index. Do not edit.
11616
12069
  */
11617
12070
 
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 };
12071
+ 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_OPTION_MULTI_ITEM_FONT_SIZE, 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
12072
  //# sourceMappingURL=ai-table-grid.mjs.map