@ai-table/grid 0.1.22 → 0.1.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{constants/editor.d.ts → components/cell-editors/index.d.ts} +1 -1
- package/components/cell-editors/index.d.ts.map +1 -0
- package/components/drag/drag.component.d.ts.map +1 -1
- package/components/stat-type-menu/stat-type-menu.scss +12 -0
- package/components/stat-type-menu/stat-type-menucomponent.d.ts +18 -0
- package/components/stat-type-menu/stat-type-menucomponent.d.ts.map +1 -0
- package/constants/field-stat.d.ts +3 -0
- package/constants/field-stat.d.ts.map +1 -0
- package/constants/icon.d.ts +1 -0
- package/constants/icon.d.ts.map +1 -1
- package/constants/index.d.ts +0 -1
- package/constants/index.d.ts.map +1 -1
- package/constants/table.d.ts +6 -0
- package/constants/table.d.ts.map +1 -1
- package/core/coordinate.d.ts.map +1 -1
- package/core/utils/field.d.ts +1 -1
- package/fesm2022/ai-table-grid.mjs +1363 -426
- package/fesm2022/ai-table-grid.mjs.map +1 -1
- package/grid.component.d.ts +5 -3
- package/grid.component.d.ts.map +1 -1
- package/package.json +1 -1
- package/renderer/components/background.component.d.ts +37 -0
- package/renderer/components/background.component.d.ts.map +1 -0
- package/renderer/components/cells/link.component.d.ts.map +1 -1
- package/renderer/components/cells/rich-text.component.d.ts.map +1 -1
- package/renderer/components/field-head.component.d.ts.map +1 -1
- package/renderer/components/field-stat/stat.component.d.ts +74 -0
- package/renderer/components/field-stat/stat.component.d.ts.map +1 -0
- package/renderer/components/field-stat/stats.component.d.ts +14 -0
- package/renderer/components/field-stat/stats.component.d.ts.map +1 -0
- package/renderer/components/fill-handle.component.d.ts +21 -0
- package/renderer/components/fill-handle.component.d.ts.map +1 -0
- package/renderer/components/frozen-heads.component.d.ts +1 -1
- package/renderer/components/frozen-heads.component.d.ts.map +1 -1
- package/renderer/components/index.d.ts +1 -0
- package/renderer/components/index.d.ts.map +1 -1
- package/renderer/creations/create-cells.d.ts.map +1 -1
- package/renderer/creations/create-stats.d.ts +3 -0
- package/renderer/creations/create-stats.d.ts.map +1 -0
- package/renderer/drawers/add-row-layout-drawer.d.ts +1 -1
- package/renderer/drawers/add-row-layout-drawer.d.ts.map +1 -1
- package/renderer/renderer.component.d.ts +23 -2
- package/renderer/renderer.component.d.ts.map +1 -1
- package/services/selection.service.d.ts +1 -1
- package/services/selection.service.d.ts.map +1 -1
- package/types/cell.d.ts +1 -0
- package/types/cell.d.ts.map +1 -1
- package/types/component-config.d.ts +55 -0
- package/types/component-config.d.ts.map +1 -1
- package/types/grid.d.ts +3 -6
- package/types/grid.d.ts.map +1 -1
- package/utils/clipboard/paste.d.ts.map +1 -1
- package/utils/drag-fill/drag-fill.d.ts +18 -0
- package/utils/drag-fill/drag-fill.d.ts.map +1 -0
- package/utils/drag-fill/index.d.ts +2 -0
- package/utils/drag-fill/index.d.ts.map +1 -0
- package/utils/field/model/date.d.ts +1 -0
- package/utils/field/model/date.d.ts.map +1 -1
- package/utils/field-stat.d.ts +7 -0
- package/utils/field-stat.d.ts.map +1 -0
- package/utils/i18n.d.ts +58 -1
- package/utils/i18n.d.ts.map +1 -1
- package/utils/index.d.ts +2 -0
- package/utils/index.d.ts.map +1 -1
- package/utils/style.d.ts.map +1 -1
- 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';
|
@@ -53,12 +53,12 @@ import { ThySelect, ThySelectModule } from 'ngx-tethys/select';
|
|
53
53
|
import { ThyDot } from 'ngx-tethys/dot';
|
54
54
|
import { ThyIcon } from 'ngx-tethys/icon';
|
55
55
|
import { ThyTag } from 'ngx-tethys/tag';
|
56
|
-
import { ThyDropdownMenuComponent, ThyDropdownMenuGroup, ThyDropdownDirective,
|
56
|
+
import { ThyDropdownAbstractMenu, ThyDropdownMenuItemDirective, ThyDropdownMenuComponent, ThyDropdownMenuGroup, ThyDropdownDirective, ThyDropdownMenuItemIconDirective, ThyDropdownMenuItemNameDirective, ThyDropdownMenuItemExtendIconDirective, ThyDropdownMenuItemMetaDirective } from 'ngx-tethys/dropdown';
|
57
57
|
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
|
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
|
596
|
+
return AITableGridI18nText[key] || key;
|
581
597
|
};
|
582
598
|
const getI18nTextByKey = (aiTable, key) => {
|
583
599
|
if (aiTable.getI18nTextByKey) {
|
@@ -716,6 +732,260 @@ function getFieldOptionMap(aiTable) {
|
|
716
732
|
return aiTable.context?.fieldOptionMap();
|
717
733
|
}
|
718
734
|
|
735
|
+
const Colors = {
|
736
|
+
primary: '#6698FF',
|
737
|
+
gray100: '#f5f5f5',
|
738
|
+
gray200: '#eee',
|
739
|
+
gray300: '#ddd',
|
740
|
+
gray800: '#333',
|
741
|
+
gray600: '#999',
|
742
|
+
gray700: '#666',
|
743
|
+
white: '#fff',
|
744
|
+
black: '#000',
|
745
|
+
transparent: 'transparent',
|
746
|
+
gray80: '#fafafa',
|
747
|
+
headSelectedBgColor: '#EAEFFA',
|
748
|
+
itemActiveBgColor: '#6698ff1a',
|
749
|
+
itemMatchBgColor: '#ff9f731a',
|
750
|
+
waring: '#ffcd5d',
|
751
|
+
success: '#73d897',
|
752
|
+
danger: '#ff5b57'
|
753
|
+
};
|
754
|
+
|
755
|
+
var AITableAvatarSize;
|
756
|
+
(function (AITableAvatarSize) {
|
757
|
+
AITableAvatarSize[AITableAvatarSize["size16"] = 16] = "size16";
|
758
|
+
AITableAvatarSize[AITableAvatarSize["size20"] = 22] = "size20";
|
759
|
+
AITableAvatarSize[AITableAvatarSize["size24"] = 24] = "size24";
|
760
|
+
AITableAvatarSize[AITableAvatarSize["size28"] = 28] = "size28";
|
761
|
+
AITableAvatarSize[AITableAvatarSize["size32"] = 32] = "size32";
|
762
|
+
AITableAvatarSize[AITableAvatarSize["size36"] = 36] = "size36";
|
763
|
+
AITableAvatarSize[AITableAvatarSize["size44"] = 44] = "size44";
|
764
|
+
AITableAvatarSize[AITableAvatarSize["size48"] = 48] = "size48";
|
765
|
+
AITableAvatarSize[AITableAvatarSize["size68"] = 68] = "size68";
|
766
|
+
AITableAvatarSize[AITableAvatarSize["size110"] = 110] = "size110";
|
767
|
+
AITableAvatarSize[AITableAvatarSize["size160"] = 160] = "size160";
|
768
|
+
})(AITableAvatarSize || (AITableAvatarSize = {}));
|
769
|
+
var AITableAvatarType;
|
770
|
+
(function (AITableAvatarType) {
|
771
|
+
AITableAvatarType[AITableAvatarType["member"] = 0] = "member";
|
772
|
+
AITableAvatarType[AITableAvatarType["space"] = 1] = "space";
|
773
|
+
AITableAvatarType[AITableAvatarType["team"] = 2] = "team";
|
774
|
+
})(AITableAvatarType || (AITableAvatarType = {}));
|
775
|
+
var AITableMemberType;
|
776
|
+
(function (AITableMemberType) {
|
777
|
+
AITableMemberType[AITableMemberType["team"] = 1] = "team";
|
778
|
+
AITableMemberType[AITableMemberType["role"] = 2] = "role";
|
779
|
+
AITableMemberType[AITableMemberType["member"] = 3] = "member";
|
780
|
+
})(AITableMemberType || (AITableMemberType = {}));
|
781
|
+
|
782
|
+
var AITableMouseDownType;
|
783
|
+
(function (AITableMouseDownType) {
|
784
|
+
AITableMouseDownType[AITableMouseDownType["Left"] = 0] = "Left";
|
785
|
+
AITableMouseDownType[AITableMouseDownType["Center"] = 1] = "Center";
|
786
|
+
AITableMouseDownType[AITableMouseDownType["Right"] = 2] = "Right";
|
787
|
+
})(AITableMouseDownType || (AITableMouseDownType = {}));
|
788
|
+
|
789
|
+
var AITableCheckType;
|
790
|
+
(function (AITableCheckType) {
|
791
|
+
AITableCheckType["checked"] = "checked";
|
792
|
+
AITableCheckType["unchecked"] = "unchecked";
|
793
|
+
})(AITableCheckType || (AITableCheckType = {}));
|
794
|
+
var AITableAreaType;
|
795
|
+
(function (AITableAreaType) {
|
796
|
+
AITableAreaType["grid"] = "grid";
|
797
|
+
AITableAreaType["none"] = "none";
|
798
|
+
})(AITableAreaType || (AITableAreaType = {}));
|
799
|
+
var AITableSelectAllState;
|
800
|
+
(function (AITableSelectAllState) {
|
801
|
+
AITableSelectAllState["all"] = "all";
|
802
|
+
AITableSelectAllState["partial"] = "partial";
|
803
|
+
AITableSelectAllState["none"] = "none";
|
804
|
+
})(AITableSelectAllState || (AITableSelectAllState = {}));
|
805
|
+
|
806
|
+
var AITableRowType;
|
807
|
+
(function (AITableRowType) {
|
808
|
+
AITableRowType["add"] = "add";
|
809
|
+
AITableRowType["record"] = "record";
|
810
|
+
})(AITableRowType || (AITableRowType = {}));
|
811
|
+
|
812
|
+
const AI_TABLE_ACTION_COMMON_SIZE = 32; // 表格图标action背景的通用尺寸
|
813
|
+
const AI_TABLE_ACTION_COMMON_RADIUS = 4; // 表格图标action背景的radius通用尺寸
|
814
|
+
const AI_TABLE_ACTION_COMMON_RIGHT_PADDING = 6; // 表格图标action右侧padding尺寸
|
815
|
+
const AI_TABLE_DEFAULT_COLUMN_WIDTH = 200; // 默认列宽
|
816
|
+
const AI_TABLE_SCROLL_BAR_PADDING = 3; // 单元格滑动容器的滚动条宽度
|
817
|
+
const AI_TABLE_OFFSET = 0.5; // 边框线偏移值
|
818
|
+
const AI_TABLE_TEXT_GAP = 8; // 文本间距
|
819
|
+
const AI_TABLE_ROW_HEAD = 'AI_TABLE_ROW_HEAD'; // 行头
|
820
|
+
const AI_TABLE_ROW_DRAG_ICON_WIDTH = 18; // 行拖拽宽度
|
821
|
+
const AI_TABLE_ROW_HEAD_WIDTH = 44; // 表格行头 checkbox 列的宽度
|
822
|
+
const AI_TABLE_ROW_HEAD_WIDTH_AND_DRAG_ICON_WIDTH = AI_TABLE_ROW_HEAD_WIDTH + AI_TABLE_ROW_DRAG_ICON_WIDTH;
|
823
|
+
const AI_TABLE_ROW_HEAD_SIZE = 16; // 添加行按钮的尺寸
|
824
|
+
const AI_TABLE_ROW_ADD_BUTTON = 'AI_TABLE_ROW_ADD_BUTTON'; // 添加行名称
|
825
|
+
const AI_TABLE_BLANK = 'AI_TABLE_BLANK'; // 空白区域
|
826
|
+
const AI_TABLE_INDEX_FIELD_TEXT = ''; // 索引列显示文本
|
827
|
+
const AI_TABLE_FIELD_HEAD = 'AI_TABLE_FIELD_HEAD'; // 属性列头标识
|
828
|
+
const AI_TABLE_FIELD_HEAD_HEIGHT = 44; // 表格字段列头的高度
|
829
|
+
const AI_TABLE_ROW_BLANK_HEIGHT = 43; // 减去边框后真实的行高
|
830
|
+
const AI_TABLE_ROW_HEIGHT = 44; // 默认行高基准
|
831
|
+
const AI_TABLE_CELL_ACTIVE_BORDER_WIDTH = 2; // 选中单元格的边框宽度
|
832
|
+
const AI_TABLE_CELL_ATTACHMENT_ADD = 'AI_TABLE_CELL_ATTACHMENT_ADD'; // 附件cell中新增图标名称
|
833
|
+
const AI_TABLE_CELL_ATTACHMENT_FILE = 'AI_TABLE_CELL_ATTACHMENT_FILE'; // 附件cell中文件
|
834
|
+
const AI_TABLE_CELL_EDIT = 'AI_TABLE_CELL_EDIT'; // 附件cell中编辑图标名称
|
835
|
+
const AI_TABLE_FIELD_HEAD_TEXT_MIN_WIDTH = 30; // 字段列头文本的最小宽度
|
836
|
+
const AI_TABLE_ROW_SELECT_CHECKBOX = 'AI_TABLE_ROW_SELECT_CHECKBOX'; // 行 checkbox
|
837
|
+
const AI_TABLE_FIELD_HEAD_SELECT_CHECKBOX = 'AI_TABLE_FIELD_HEAD_SELECT_CHECKBOX'; // 表头 checkbox 标识
|
838
|
+
const AI_TABLE_FIELD_ADD_BUTTON = 'AI_TABLE_FIELD_ADD_BUTTON'; // 添加列名称
|
839
|
+
const AI_TABLE_FIELD_ADD_BUTTON_WIDTH = 100; // 添加列宽度
|
840
|
+
const AI_TABLE_FIELD_HEAD_ICON_GAP_SIZE = 8; // 字段表列头图标的间距
|
841
|
+
const AI_TABLE_FIELD_HEAD_MORE = 'AI_TABLE_FIELD_HEAD_MORE'; // 更多图标名称
|
842
|
+
const AI_TABLE_FIELD_HEAD_OPACITY_LINE = 'AI_TABLE_FIELD_HEAD_OPACITY_LINE'; // 字段列头透明线
|
843
|
+
const AI_TABLE_FIELD_STAT_BG = 'AI_TABLE_FIELD_STAT_BG'; // 统计按钮背景
|
844
|
+
const AI_TABLE_ROW_DRAG = 'AI_TABLE_ROW_DRAG'; // 行拖拽
|
845
|
+
const AI_TABLE_FILL_HANDLE = 'AI_TABLE_FILL_HANDLE'; // 填充手柄
|
846
|
+
const AI_TABLE_PREVENT_CLEAR_SELECTION_CLASS = '.ai-table-prevent-clear-selection';
|
847
|
+
const AI_TABLE_ICON_COMMON_SIZE = 16; // 表格图标的通用尺寸
|
848
|
+
const AI_TABLE_CELL = 'AI_TABLE_CELL'; // 单元格标识
|
849
|
+
// 因为 dom 的边距 12 是不包含 边框的,所以加上边框 2px 才能跟 编辑里面的内容对其;
|
850
|
+
const AI_TABLE_CELL_PADDING = 14; // 单元格内容的内边距
|
851
|
+
const AI_TABLE_CELL_BORDER = 2; // 单元格边框宽度
|
852
|
+
const AI_TABLE_CELL_LINE_BORDER = 1; // 单元格线宽度
|
853
|
+
const AI_TABLE_CELL_MULTI_PADDING_TOP = 10;
|
854
|
+
const AI_TABLE_CELL_MULTI_ITEM_MARGIN_TOP = 4;
|
855
|
+
const AI_TABLE_CELL_MULTI_PADDING_LEFT = 4;
|
856
|
+
// 最少显示文字宽度,一个文字+ 三个点
|
857
|
+
const AI_TABLE_MIN_TEXT_WIDTH = 24;
|
858
|
+
const AI_TABLE_CELL_MULTI_DOT_RADIUS = 4;
|
859
|
+
const AI_TABLE_CELL_MULTI_ITEM_MARGIN_LEFT = 8;
|
860
|
+
const AI_TABLE_CELL_DELETE_ITEM_BUTTON_SIZE = 8; // 选项删除按钮的宽度
|
861
|
+
const AI_TABLE_CELL_DELETE_ITEM_BUTTON_SIZE_OFFSET = 12; // 选项字段删除按钮大小的偏移量
|
862
|
+
const AI_TABLE_CELL_MULTI_ITEM_MIN_WIDTH = 36; // 选项字段项的最小宽度
|
863
|
+
const AI_TABLE_CELL_MAX_ROW_COUNT = 1; // 默认单元格展示的最大行数
|
864
|
+
const AI_TABLE_CELL_EMOJI_SIZE = 18;
|
865
|
+
const AI_TABLE_CELL_EMOJI_PADDING = 8;
|
866
|
+
const AI_TABLE_CELL_MEMBER_MAX_HEIGHT = 130; // 成员字段项最大高度
|
867
|
+
const AI_TABLE_CELL_MEMBER_ITEM_HEIGHT = 24; // 成员字段项高度
|
868
|
+
const AI_TABLE_CELL_MEMBER_ITEM_PADDING = 4; // 多个成员头像间距
|
869
|
+
const AI_TABLE_CELL_ADD_ITEM_BUTTON_SIZE = 22; // 成员/选项/链接/附件字段的新按钮大小
|
870
|
+
const AI_TABLE_MEMBER_AVATAR_SIZE = 24; // 成员头像大小
|
871
|
+
const AI_TABLE_MEMBER_ITEM_PADDING_RIGHT = 8; // 成员字段项右边距
|
872
|
+
const AI_TABLE_MEMBER_ITEM_AVATAR_MARGIN_RIGHT = 8; // 成员头像与成员名之间的间距
|
873
|
+
const AI_TABLE_FILE_ICON_ITEM_HEIGHT = 20; // 文件字段项高度
|
874
|
+
const AI_TABLE_FILE_ICON_SIZE = 20; // 文件图标大小
|
875
|
+
const AI_TABLE_CELL_FIELD_ITEM_HEIGHT = 8; // 文件字段项右边距
|
876
|
+
const AI_TABLE_FIELD_ITEM_MARGIN_RIGHT = 8; // 文件图标之间的间距
|
877
|
+
const AI_TABLE_OPTION_ITEM_PADDING = 10; // 选项按钮间距
|
878
|
+
const AI_TABLE_OPTION_ITEM_HEIGHT = 24;
|
879
|
+
const AI_TABLE_OPTION_ITEM_FONT_SIZE = 14;
|
880
|
+
const AI_TABLE_OPTION_ITEM_RADIUS = 18;
|
881
|
+
const AI_TABLE_TAG_PADDING = 12;
|
882
|
+
const AI_TABLE_TAG_FONT_SIZE = 12;
|
883
|
+
const AI_TABLE_PIECE_WIDTH = 10;
|
884
|
+
const AI_TABLE_PIECE_RADIUS = 2;
|
885
|
+
const AI_TABLE_COMMON_FONT_SIZE = 14;
|
886
|
+
const AI_TABLE_DOT_RADIUS = 5;
|
887
|
+
const AI_TABLE_PROGRESS_BAR_HEIGHT = 10;
|
888
|
+
const AI_TABLE_PROGRESS_BAR_RADIUS = 5;
|
889
|
+
const AI_TABLE_PROGRESS_BAR_POINTER_HEIGHT = 18;
|
890
|
+
const AI_TABLE_PROGRESS_BAR_POINTER_WIDTH = 8;
|
891
|
+
const AI_TABLE_PROGRESS_TEXT_WIDTH = 46;
|
892
|
+
const AI_TABLE_POPOVER_LEFT_OFFSET = 4;
|
893
|
+
const AI_TABLE_RATE_MAX = 5;
|
894
|
+
const AI_TABLE_SCROLL_BAR_SIZE = 18;
|
895
|
+
const AI_TABLE_AUTO_SCROLL_LEFT_THRESHOLD = 40;
|
896
|
+
const AI_TABLE_AUTO_SCROLL_RIGHT_THRESHOLD = 40;
|
897
|
+
const AI_TABLE_AUTO_SCROLL_TOP_THRESHOLD = AI_TABLE_FIELD_HEAD_HEIGHT / 2;
|
898
|
+
const AI_TABLE_AUTO_SCROLL_BOTTOM_THRESHOLD = AI_TABLE_FIELD_HEAD_HEIGHT / 2;
|
899
|
+
const AI_TABLE_FIELD_STAT_HEIGHT = 48; // 字段统计高度
|
900
|
+
const AI_TABLE_TEXT_LINE_HEIGHT = 1.84; // 默认文本行高
|
901
|
+
const AI_TABLE_FIELD_STAT_CONTAINER_HEIGHT = AI_TABLE_FIELD_STAT_HEIGHT + AI_TABLE_CELL_LINE_BORDER * 2;
|
902
|
+
|
903
|
+
const MIN_COLUMN_WIDTH = 80;
|
904
|
+
const DBL_CLICK_EDIT_TYPE = [
|
905
|
+
AITableFieldType.text,
|
906
|
+
AITableFieldType.number,
|
907
|
+
AITableFieldType.select,
|
908
|
+
AITableFieldType.date,
|
909
|
+
AITableFieldType.member,
|
910
|
+
AITableFieldType.link
|
911
|
+
];
|
912
|
+
const RowHeight = {
|
913
|
+
Short: 32,
|
914
|
+
Medium: 57,
|
915
|
+
Tall: 104,
|
916
|
+
ExtraTall: 152
|
917
|
+
};
|
918
|
+
const DEFAULT_POINT_POSITION = {
|
919
|
+
areaType: AITableAreaType.none,
|
920
|
+
targetName: AI_TABLE_BLANK,
|
921
|
+
realTargetName: AI_TABLE_BLANK,
|
922
|
+
rowIndex: -1,
|
923
|
+
columnIndex: -1,
|
924
|
+
x: 0,
|
925
|
+
y: 0,
|
926
|
+
offsetTop: 0,
|
927
|
+
offsetLeft: 0
|
928
|
+
};
|
929
|
+
const DEFAULT_SCROLL_STATE = {
|
930
|
+
scrollTop: 0,
|
931
|
+
scrollLeft: 0,
|
932
|
+
isScrolling: false
|
933
|
+
};
|
934
|
+
|
935
|
+
const DEFAULT_ICON_SHAPE = 'square';
|
936
|
+
const DEFAULT_ICON_SIZE = 16;
|
937
|
+
const Check = `
|
938
|
+
M15,1H3C1.9,1,1,1.9,1,3v12c0,1.1,0.9,2,2,2h12c1.1,0,2-0.9,2-2V3C17,1.9,16.1,1,15,1z M14,6.6l-5.7,5.7
|
939
|
+
c-0.2,0.2-0.4,0.3-0.6,0.3s-0.4-0.1-0.6-0.3L4.6,9.8c-0.3-0.3-0.3-0.9,0-1.2s0.9-0.3,1.2,0l1.9,1.9l5.1-5.1
|
940
|
+
c0.3-0.3,0.9-0.3,1.2,0C14.3,5.7,14.3,6.3,14,6.6z
|
941
|
+
`;
|
942
|
+
const Unchecked = `
|
943
|
+
M15,1H3C1.9,1,1,1.9,1,3v12c0,1.1,0.9,2,2,2h12c1.1,0,2-0.9,2-2V3C17,1.9,16.1,1,15,1z
|
944
|
+
M15.7,3.3v11.4c0,0.5-0.5,1-1,1H3.3c-0.5,0-1-0.5-1-1V3.3c0-0.5,0.5-1,1-1h11.4C15.2,2.3,15.7,2.8,15.7,3.3z
|
945
|
+
`;
|
946
|
+
const ColumnTextFilledPath = `M7.268 8.674l-2.076-4.86-2.076 4.86h4.152zm0.513 1.2H2.603l-1.294 3.03L0 12.902L4.49 2.4H5.894l4.484 10.486-1.31 0.002-1.287-3.014zm2.86 1.111c0-1.423 1.246-2.193 4.21-2.49 0-0.89-0.235-1.72-1.362-1.72-0.772 0-1.484 0.356-2.017 0.711l-0.475-0.771c0.653-0.415 1.602-0.889 2.669-0.889 1.602 0 2.313 1.127 2.313 2.787v4.151h-0.948l-0.12-0.83h-0.06c-0.651 0.534-1.422 0.949-2.252 0.949-1.127 0-1.957-0.652-1.957-1.898zm4.113-1.778c-2.253 0.296-3.024 0.83-3.024 1.72 0 0.77 0.534 1.067 1.186 1.067 0.652 0 1.186-0.297 1.838-0.89V9.207z`;
|
947
|
+
const ColumnRichTextFilledPath = `M14.5526,11.7084 C14.8845231,11.7084 15.1536,11.9774769 15.1536,12.3094 C15.1536,12.6413231 14.8845231,12.9104 14.5526,12.9104 L14.5526,12.9104 L11.7546,12.9104 C11.4226769,12.9104 11.1536,12.6413231 11.1536,12.3094 C11.1536,11.9774769 11.4226769,11.7084 11.7546,11.7084 L11.7546,11.7084 Z M5.894,2.4 L10.378,12.886 L9.068,12.888 L7.779,9.873 L2.603,9.873 L1.309,12.904 L2.84217094e-14,12.902 L4.49,2.4 L5.894,2.4 Z M5.191,3.814 L3.116,8.673 L7.267,8.673 L5.191,3.814 Z M14.5526,7.17723172 C14.8845231,7.17723172 15.1536,7.44630859 15.1536,7.77823172 C15.1536,8.11015486 14.8845231,8.37923172 14.5526,8.37923172 L14.5526,8.37923172 L10.7546,8.37923172 C10.4226769,8.37923172 10.1536,8.11015486 10.1536,7.77823172 C10.1536,7.44630859 10.4226769,7.17723172 10.7546,7.17723172 L10.7546,7.17723172 Z M14.5526,2.3094 C14.8845231,2.3094 15.1536,2.57847687 15.1536,2.9104 C15.1536,3.24232313 14.8845231,3.5114 14.5526,3.5114 L14.5526,3.5114 L9.7546,3.5114 C9.42267687,3.5114 9.1536,3.24232313 9.1536,2.9104 C9.1536,2.57847687 9.42267687,2.3094 9.7546,2.3094 L9.7546,2.3094 Z`;
|
948
|
+
const ColumnSelectFilledPath = `M8 16A8 8 0 1 1 8 0a8 8 0 0 1 0 16zm0-1.2A6.8 6.8 0 1 0 8 1.2a6.8 6.8 0 0 0 0 13.6zM5.666 7.207l1.8 1.845 3.482-3.554.857.84-4.34 4.43-2.658-2.723.86-.838z`;
|
949
|
+
const ColumnMultipleFillPath = `M2 2.551L3.576.976l.848.848L2 4.25.576 2.824l.848-.848L2 2.55zm0 5.425L3.576 6.4l.848.849L2 9.673.576 8.249l.848-.849.576.576zm0 5.4L3.576 11.8l.848.849L2 15.073.576 13.649l.848-.849.576.576zM5.663 2.6a.6.6 0 1 1 0-1.2H15.4a.6.6 0 0 1 0 1.2H5.663zm0 11.8a.6.6 0 0 1 0-1.2H15.4a.6.6 0 0 1 0 1.2H5.663zm0-6.2a.6.6 0 1 1 0-1.2H15.4a.6.6 0 0 1 0 1.2H5.663z`;
|
950
|
+
const ColumnCalendarFilledPath = `M10.9 3.2H5.1v1.6H3.9V3.2H1.2v3.2h13.6V3.2h-2.7v1.6h-1.2V3.2zM12.1 2H15a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H1a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1h2.9V.4h1.2V2h5.8V.4h1.2V2zm2.7 5.6H1.2v7.2h13.6V7.6z`;
|
951
|
+
const ColumnNumberFilledPath = `M4.236 9.9l.422-3.8H2.6a.6.6 0 1 1 0-1.2h2.19l.372-3.347a.6.6 0 1 1 1.192.133L5.998 4.9h4.793l.37-3.347a.6.6 0 0 1 1.193.133L11.998 4.9h2.459a.6.6 0 0 1 0 1.2h-2.592l-.421 3.8h2.013a.6.6 0 0 1 0 1.2H11.31l-.374 3.368a.6.6 0 0 1-1.192-.132l.358-3.236H5.311l-.374 3.368a.6.6 0 0 1-1.192-.132l.358-3.236H1.6a.6.6 0 0 1 0-1.2h2.636zm1.208 0h4.792l.422-3.8H5.865l-.421 3.8z`;
|
952
|
+
const ColumnLinkOutlinedPath = `M10.4238543,5.91643446 C11.7563563,7.48802206 11.6811634,9.84553933 10.1982756,11.3284271 L7.22842712,14.2982756 C5.66632996,15.8603728 3.13367004,15.8603728 1.57157288,14.2982756 C0.00947570825,12.7361784 0.00947570825,10.2035185 1.57157288,8.64142136 L2.387,7.82495116 L3.236,8.67395116 L2.42010101,9.48994949 C1.37219416,10.5378563 1.32853138,12.2097205 2.28911266,13.3096237 L2.42010101,13.4497475 C3.51356903,14.5432155 5.28643097,14.5432155 6.37989899,13.4497475 L9.34974747,10.479899 C10.3636395,9.46600698 10.4374244,7.86800734 9.57110232,6.76909967 L10.4238543,5.91643446 Z M14.4436815,1.67157288 C16.0057786,3.23367004 16.0057786,5.76632996 14.4436815,7.32842712 L13.5744058,8.198 L12.7254058,7.349 L13.5951533,6.47989899 C14.6430602,5.43199214 14.6867229,3.76012802 13.7261417,2.66022473 L13.5951533,2.52010101 C12.5016853,1.426633 10.7288234,1.426633 9.63535534,2.52010101 L6.66550686,5.48994949 C5.62228095,6.5331754 5.57434734,8.19479666 6.52170603,9.29485 L5.67236452,10.1460046 C4.25646867,8.57570748 4.3046734,6.15372668 5.81697872,4.64142136 L8.7868272,1.67157288 C10.3489244,0.109475708 12.8815843,0.109475708 14.4436815,1.67157288 Z`;
|
953
|
+
const ColumnRatingFilledPath = `M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0zm0 1.2a6.8 6.8 0 1 0 0 13.6A6.8 6.8 0 0 0 8 1.2zm.945 2.906l.077.106.064.112.03.069.564 1.46 1.646.1c.952.092 1.365 1.264.752 1.893l-.086.078-1.315 1.056.431 1.533c.295 1.031-.848 1.858-1.643 1.34l-.087-.063-1.315-.85-.006.001-1.309.842c-.85.567-1.903-.163-1.79-1.054l.019-.108.45-1.601-1.321-1.035c-.632-.633-.372-1.673.462-1.973l.123-.038.124-.026 1.571-.094.602-1.55c.364-.793 1.44-.836 1.957-.198zm-.91.815l-.809 2.085-2.253.134L6.8 8.571l-.602 2.139 1.44-.927.71-.087 1.569 1.016-.61-2.172 1.75-1.402-2.219-.134-.803-2.083z`;
|
954
|
+
const ColumnMemberFilledPath = `M10.212 8.416A6.603 6.603 0 0 1 14.5 14.6a.6.6 0 0 1-1.2 0 5.4 5.4 0 0 0-10.8 0 .6.6 0 0 1-1.2 0 6.602 6.602 0 0 1 4.159-6.134 4.1 4.1 0 1 1 4.753-.05zM7.8 8a2.9 2.9 0 1 0 0-5.8 2.9 2.9 0 0 0 0 5.8z`;
|
955
|
+
const ColumnProgressFilledPath = `M11.5 3.5a4.5 4.5 0 1 1 0 9h-7a4.5 4.5 0 1 1 0-9h7zm0 1.2h-7a3.3 3.3 0 0 0 0 6.6h7a3.3 3.3 0 1 0 0-6.6zM8 7.2v1.5H3.75a.75.75 0 0 1 0-1.5H8z`;
|
956
|
+
const AddOutlinedPath = `M8.578 7.383V1.602a.601.601 0 1 0-1.2 0v5.781H1.6a.601.601 0 0 0 0 1.203h5.777v5.812a.601.601 0 1 0 1.2 0V8.586H14.4a.601.601 0 0 0 0-1.203H8.578z`;
|
957
|
+
const MoreStandOutlinedPath = `M8 4.25a1.25 1.25 0 1 0 0-2.5 1.25 1.25 0 0 0 0 2.5zm0 5a1.25 1.25 0 1 0 0-2.5 1.25 1.25 0 0 0 0 2.5zm0 5a1.25 1.25 0 1 0 0-2.5 1.25 1.25 0 0 0 0 2.5z`;
|
958
|
+
const StarFill = `M9.186 2.12l1.02 2.769c.073.292.365.437.656.437l2.915.146c1.166.073 1.676 1.53.73 2.26l-2.26 1.821c-.219.146-.291.51-.219.729l.73 2.842c.29 1.093-.948 2.04-1.896 1.384l-2.477-1.603a.79.79 0 0 0-.802 0l-2.478 1.676c-.947.583-2.186-.291-1.894-1.457l.728-2.842c.073-.292 0-.583-.218-.729L1.46 7.731c-.874-.729-.437-2.186.73-2.259l2.914-.146c.292 0 .51-.218.656-.437l1.093-2.77c.365-1.092 1.895-1.092 2.332 0z`;
|
959
|
+
const WebOutlinedPath = `M1 8C1 4.13401 4.13401 1 8 1C11.866 1 15 4.13401 15 8C15 11.866 11.866 15 8 15C4.13401 15 1 11.866 1 8ZM6.04798 2.85646C4.19852 3.55874 2.82616 5.22986 2.55071 7.25H5.26373C5.31861 5.76009 5.53564 4.40148 5.87147 3.352C5.92605 3.18143 5.98481 3.0157 6.04798 2.85646ZM5.87147 12.648C5.53564 11.5985 5.31861 10.2399 5.26373 8.75H2.55071C2.82616 10.7701 4.19852 12.4413 6.04798 13.1435C5.98481 12.9843 5.92605 12.8186 5.87147 12.648ZM10.1285 12.648C10.0739 12.8186 10.0152 12.9843 9.95202 13.1435C11.8015 12.4413 13.1738 10.7701 13.4493 8.75H10.7363C10.6814 10.2399 10.4644 11.5985 10.1285 12.648ZM8.6999 12.1908C8.98163 11.3104 9.18095 10.1118 9.23518 8.75H6.76482C6.81905 10.1118 7.01837 11.3104 7.3001 12.1908C7.46768 12.7145 7.65131 13.0839 7.81962 13.3063C7.90746 13.4224 7.9686 13.4711 8 13.4906C8.0314 13.4711 8.09254 13.4224 8.18038 13.3063C8.34869 13.0839 8.53232 12.7145 8.6999 12.1908ZM7.3001 3.80916C7.01837 4.68959 6.81905 5.88818 6.76482 7.25H9.23518C9.18095 5.88818 8.98163 4.68959 8.6999 3.80916C8.53232 3.28548 8.34869 2.91612 8.18038 2.69367C8.09254 2.57756 8.0314 2.52893 8 2.50944C7.9686 2.52893 7.90746 2.57756 7.81962 2.69367C7.65131 2.91612 7.46768 3.28548 7.3001 3.80916ZM10.1285 3.352C10.4644 4.40148 10.6814 5.76009 10.7363 7.25H13.4493C13.1738 5.22986 11.8015 3.55874 9.95203 2.85646C10.0152 3.0157 10.0739 3.18143 10.1285 3.352Z`;
|
960
|
+
const DepartmentOutlinedPath = `M3 5.5C3 3.567 4.567 2 6.5 2C8.433 2 10 3.567 10 5.5C10 6.49548 9.5844 7.3939 8.91724 8.0312C10.7204 8.86779 12.017 10.6115 12.2217 12.6767C12.2976 13.4424 11.6682 14 11 14H2C1.33185 14 0.702358 13.4424 0.778277 12.6767C0.983033 10.6115 2.27961 8.86779 4.08276 8.0312C3.4156 7.3939 3 6.49548 3 5.5ZM8.5 5.5C8.5 4.39543 7.60457 3.5 6.5 3.5C5.39543 3.5 4.5 4.39543 4.5 5.5C4.5 6.60457 5.39543 7.5 6.5 7.5C7.60457 7.5 8.5 6.60457 8.5 5.5ZM2.31585 12.5H10.6841C10.3303 10.5108 8.59114 9 6.5 9C4.40886 9 2.66975 10.5108 2.31585 12.5Z', 'M11 3C10.5858 3 10.25 3.33579 10.25 3.75C10.25 4.16421 10.5858 4.5 11 4.5C11.6904 4.5 12.25 5.05964 12.25 5.75C12.25 6.44036 11.6904 7 11 7C10.5858 7 10.25 7.33579 10.25 7.75C10.25 8.16421 10.5858 8.5 11 8.5C12.6569 8.5 14 9.84315 14 11.5C14 11.9142 14.3358 12.25 14.75 12.25C15.1642 12.25 15.5 11.9142 15.5 11.5C15.5 9.77473 14.5291 8.27622 13.1038 7.52106C13.507 7.0426 13.75 6.42467 13.75 5.75C13.75 4.23122 12.5188 3 11 3Z`;
|
961
|
+
const AttachmentPath = `M9.1773124,11.8057395 C7.96668709,13.0163648 6.00387566,13.0163648 4.79325035,11.8057395 C3.58262505,10.5951142 3.58262505,8.63230278 4.78926443,7.4257012 L8.27628904,3.87217601 C8.50840068,3.63567937 8.88828274,3.63209333 9.12479868,3.86418566 C9.36131462,4.096278 9.36490066,4.47616006 9.13280833,4.712676 L5.64177849,8.27020561 C4.89978234,9.01220177 4.89978234,10.2152152 5.64177849,10.9572114 C6.38377464,11.6992075 7.5867881,11.6992075 8.32878426,10.9572114 L12.2321177,7.05387799 C13.3493901,5.93660552 13.2780395,4.02707269 12.0410949,2.79012806 C10.8041502,1.55318343 8.8946174,1.4818328 7.77734493,2.59910526 L3.72686067,6.64958953 C2.02034367,8.35610653 2.02835883,11.1329242 3.74721224,12.8517776 C5.46606565,14.570631 8.24288334,14.5786462 9.94940034,12.8721292 L13.5980637,9.22346588 C13.8323782,8.98915131 14.2122772,8.98915131 14.4465918,9.22346588 C14.6809064,9.45778046 14.6809064,9.83767945 14.4465918,10.071994 L10.7979285,13.7206573 C8.62168228,15.8969035 5.08507361,15.8866953 2.8986841,13.7003058 C0.712294592,11.5139163 0.702086332,7.97730759 2.87833253,5.8010614 L6.9288168,1.75057713 C8.52947856,0.149915361 11.1976354,0.249612361 12.889623,1.94159992 C14.5816106,3.63358749 14.6813076,6.30174436 13.0806458,7.90240612 L9.1773124,11.8057395 Z`;
|
962
|
+
const EditPath = `M2,8.33918294 L10.7095952,0 L15,4.17020474 L6.53816398,13 L2,13 L2,8.33918294 Z M3.2,8.85157902 L3.2,11.8 L6.02608482,11.8 L13.3091776,4.20020516 L10.7033283,1.66736141 L3.2,8.85157902 Z M0,16 L0,14.8 L16,14.8 L16,16 L0,16 Z`;
|
963
|
+
const RowDragPath = `M6,3 C6.55228475,3 7,2.55228475 7,2 C7,1.44771525 6.55228475,1 6,1 C5.44771525,1 5,1.44771525 5,2 C5,2.55228475 5.44771525,3 6,3 Z M10,3 C10.5522847,3 11,2.55228475 11,2 C11,1.44771525 10.5522847,1 10,1 C9.44771525,1 9,1.44771525 9,2 C9,2.55228475 9.44771525,3 10,3 Z M6,7 C6.55228475,7 7,6.55228475 7,6 C7,5.44771525 6.55228475,5 6,5 C5.44771525,5 5,5.44771525 5,6 C5,6.55228475 5.44771525,7 6,7 Z M10,7 C10.5522847,7 11,6.55228475 11,6 C11,5.44771525 10.5522847,5 10,5 C9.44771525,5 9,5.44771525 9,6 C9,6.55228475 9.44771525,7 10,7 Z M6,11 C6.55228475,11 7,10.5522847 7,10 C7,9.44771525 6.55228475,9 6,9 C5.44771525,9 5,9.44771525 5,10 C5,10.5522847 5.44771525,11 6,11 Z M10,11 C10.5522847,11 11,10.5522847 11,10 C11,9.44771525 10.5522847,9 10,9 C9.44771525,9 9,9.44771525 9,10 C9,10.5522847 9.44771525,11 10,11 Z M6,15 C6.55228475,15 7,14.5522847 7,14 C7,13.4477153 6.55228475,13 6,13 C5.44771525,13 5,13.4477153 5,14 C5,14.5522847 5.44771525,15 6,15 Z M10,15 C10.5522847,15 11,14.5522847 11,14 C11,13.4477153 10.5522847,13 10,13 C9.44771525,13 9,13.4477153 9,14 C9,14.5522847 9.44771525,15 10,15 Z`;
|
964
|
+
const AngleDownPath = `M7.97815,11.99732 L7.9728,12.00267 L2.2998,6.33067 L3.1298,5.49967 L7.97807731,10.3479473 L12.8255,5.49967 L13.6565,6.33067 L7.9835,12.00267 L7.97815,11.99732 Z`;
|
965
|
+
const IconPathMap = {};
|
966
|
+
|
967
|
+
const DEFAULT_FONT_SIZE = 14;
|
968
|
+
const DEFAULT_FONT_FAMILY = '-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,PingFang SC,Helvetica Neue,Noto Sans,Noto Sans CJK SC,Microsoft Yahei,Arial,Hiragino Sans GB,sans-serif';
|
969
|
+
const DEFAULT_FONT_STYLE = 'normal';
|
970
|
+
const DEFAULT_TEXT_LINE_HEIGHT = 24;
|
971
|
+
const DEFAULT_TEXT_FILL = Colors.gray800;
|
972
|
+
const DEFAULT_FONT_WEIGHT = 'normal';
|
973
|
+
const DEFAULT_TEXT_WRAP = 'none';
|
974
|
+
const DEFAULT_TEXT_TRANSFORMS_ENABLED = 'position';
|
975
|
+
const DEFAULT_TEXT_ELLIPSIS = true;
|
976
|
+
const DEFAULT_TEXT_LISTENING = false;
|
977
|
+
const DEFAULT_TEXT_ALIGN_LEFT = 'left';
|
978
|
+
const DEFAULT_TEXT_ALIGN_CENTER = 'center';
|
979
|
+
const DEFAULT_TEXT_ALIGN_RIGHT = 'right';
|
980
|
+
const DEFAULT_TEXT_VERTICAL_ALIGN_MIDDLE = 'middle';
|
981
|
+
const DEFAULT_TEXT_MAX_HEIGHT = 130;
|
982
|
+
const DEFAULT_WRAP_TEXT_MAX_ROW = 1;
|
983
|
+
const DEFAULT_TEXT_VERTICAL_ALIGN_TOP = 'top';
|
984
|
+
const DEFAULT_TEXT_DECORATION = 'none';
|
985
|
+
const DEFAULT_TEXT_SCALE = 1;
|
986
|
+
const DEFAULT_TEXT_MAX_CACHE = 500;
|
987
|
+
const FONT_SIZE_SM = 12;
|
988
|
+
|
719
989
|
/**
|
720
990
|
* 用于构建 Canvas 基础坐标系,后续的绘制工作以此为基础
|
721
991
|
*/
|
@@ -761,7 +1031,7 @@ class Coordinate {
|
|
761
1031
|
*/
|
762
1032
|
get totalHeight() {
|
763
1033
|
const { offset, size } = this.getCellMetaData(this.rowCount - 1, AITableRowColumnType.row);
|
764
|
-
return offset + size;
|
1034
|
+
return offset + size + AI_TABLE_FIELD_STAT_HEIGHT;
|
765
1035
|
}
|
766
1036
|
/**
|
767
1037
|
* 根据 rowIndex 获取对应行高
|
@@ -937,26 +1207,6 @@ class Coordinate {
|
|
937
1207
|
}
|
938
1208
|
}
|
939
1209
|
|
940
|
-
const Colors = {
|
941
|
-
primary: '#6698FF',
|
942
|
-
gray100: '#f5f5f5',
|
943
|
-
gray200: '#eee',
|
944
|
-
gray300: '#ddd',
|
945
|
-
gray800: '#333',
|
946
|
-
gray600: '#999',
|
947
|
-
gray700: '#666',
|
948
|
-
white: '#fff',
|
949
|
-
black: '#000',
|
950
|
-
transparent: 'transparent',
|
951
|
-
gray80: '#fafafa',
|
952
|
-
headSelectedBgColor: '#EAEFFA',
|
953
|
-
itemActiveBgColor: '#6698ff1a',
|
954
|
-
itemMatchBgColor: '#ff9f731a',
|
955
|
-
waring: '#ffcd5d',
|
956
|
-
success: '#73d897',
|
957
|
-
danger: '#ff5b57'
|
958
|
-
};
|
959
|
-
|
960
1210
|
const AITable = {
|
961
1211
|
getColors() {
|
962
1212
|
return Colors;
|
@@ -1086,63 +1336,6 @@ function shortIdsCreator(count) {
|
|
1086
1336
|
return shortId(undefined, 8, count);
|
1087
1337
|
}
|
1088
1338
|
|
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 = {}));
|
1139
|
-
|
1140
|
-
var AITableRowType;
|
1141
|
-
(function (AITableRowType) {
|
1142
|
-
AITableRowType["add"] = "add";
|
1143
|
-
AITableRowType["record"] = "record";
|
1144
|
-
})(AITableRowType || (AITableRowType = {}));
|
1145
|
-
|
1146
1339
|
function createAITable(records, fields, gridData) {
|
1147
1340
|
const aiTable = {
|
1148
1341
|
records,
|
@@ -2065,185 +2258,6 @@ function expandCell(aiTable, path) {
|
|
2065
2258
|
});
|
2066
2259
|
}
|
2067
2260
|
|
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_PREVENT_CLEAR_SELECTION_CLASS = '.ai-table-prevent-clear-selection';
|
2110
|
-
const AI_TABLE_ICON_COMMON_SIZE = 16; // 表格图标的通用尺寸
|
2111
|
-
const AI_TABLE_CELL = 'AI_TABLE_CELL'; // 单元格标识
|
2112
|
-
// 因为 dom 的边距 12 是不包含 边框的,所以加上边框 2px 才能跟 编辑里面的内容对其;
|
2113
|
-
const AI_TABLE_CELL_PADDING = 14; // 单元格内容的内边距
|
2114
|
-
const AI_TABLE_CELL_BORDER = 2; // 单元格边框宽度
|
2115
|
-
const AI_TABLE_CELL_MULTI_PADDING_TOP = 10;
|
2116
|
-
const AI_TABLE_CELL_MULTI_ITEM_MARGIN_TOP = 4;
|
2117
|
-
const AI_TABLE_CELL_MULTI_PADDING_LEFT = 4;
|
2118
|
-
// 最少显示文字宽度,一个文字+ 三个点
|
2119
|
-
const AI_TABLE_MIN_TEXT_WIDTH = 24;
|
2120
|
-
const AI_TABLE_CELL_MULTI_DOT_RADIUS = 4;
|
2121
|
-
const AI_TABLE_CELL_MULTI_ITEM_MARGIN_LEFT = 8;
|
2122
|
-
const AI_TABLE_CELL_DELETE_ITEM_BUTTON_SIZE = 8; // 选项删除按钮的宽度
|
2123
|
-
const AI_TABLE_CELL_DELETE_ITEM_BUTTON_SIZE_OFFSET = 12; // 选项字段删除按钮大小的偏移量
|
2124
|
-
const AI_TABLE_CELL_MULTI_ITEM_MIN_WIDTH = 36; // 选项字段项的最小宽度
|
2125
|
-
const AI_TABLE_CELL_MAX_ROW_COUNT = 1; // 默认单元格展示的最大行数
|
2126
|
-
const AI_TABLE_CELL_EMOJI_SIZE = 18;
|
2127
|
-
const AI_TABLE_CELL_EMOJI_PADDING = 8;
|
2128
|
-
const AI_TABLE_CELL_MEMBER_MAX_HEIGHT = 130; // 成员字段项最大高度
|
2129
|
-
const AI_TABLE_CELL_MEMBER_ITEM_HEIGHT = 24; // 成员字段项高度
|
2130
|
-
const AI_TABLE_CELL_MEMBER_ITEM_PADDING = 4; // 多个成员头像间距
|
2131
|
-
const AI_TABLE_CELL_ADD_ITEM_BUTTON_SIZE = 22; // 成员/选项/链接/附件字段的新按钮大小
|
2132
|
-
const AI_TABLE_MEMBER_AVATAR_SIZE = 24; // 成员头像大小
|
2133
|
-
const AI_TABLE_MEMBER_ITEM_PADDING_RIGHT = 8; // 成员字段项右边距
|
2134
|
-
const AI_TABLE_MEMBER_ITEM_AVATAR_MARGIN_RIGHT = 8; // 成员头像与成员名之间的间距
|
2135
|
-
const AI_TABLE_FILE_ICON_ITEM_HEIGHT = 20; // 文件字段项高度
|
2136
|
-
const AI_TABLE_FILE_ICON_SIZE = 20; // 文件图标大小
|
2137
|
-
const AI_TABLE_CELL_FIELD_ITEM_HEIGHT = 8; // 文件字段项右边距
|
2138
|
-
const AI_TABLE_FIELD_ITEM_MARGIN_RIGHT = 8; // 文件图标之间的间距
|
2139
|
-
const AI_TABLE_OPTION_ITEM_PADDING = 10; // 选项按钮间距
|
2140
|
-
const AI_TABLE_OPTION_ITEM_HEIGHT = 24;
|
2141
|
-
const AI_TABLE_OPTION_ITEM_FONT_SIZE = 14;
|
2142
|
-
const AI_TABLE_OPTION_ITEM_RADIUS = 18;
|
2143
|
-
const AI_TABLE_TAG_PADDING = 12;
|
2144
|
-
const AI_TABLE_TAG_FONT_SIZE = 12;
|
2145
|
-
const AI_TABLE_PIECE_WIDTH = 10;
|
2146
|
-
const AI_TABLE_PIECE_RADIUS = 2;
|
2147
|
-
const AI_TABLE_COMMON_FONT_SIZE = 14;
|
2148
|
-
const AI_TABLE_DOT_RADIUS = 5;
|
2149
|
-
const AI_TABLE_PROGRESS_BAR_HEIGHT = 10;
|
2150
|
-
const AI_TABLE_PROGRESS_BAR_RADIUS = 5;
|
2151
|
-
const AI_TABLE_PROGRESS_BAR_POINTER_HEIGHT = 18;
|
2152
|
-
const AI_TABLE_PROGRESS_BAR_POINTER_WIDTH = 8;
|
2153
|
-
const AI_TABLE_PROGRESS_TEXT_WIDTH = 46;
|
2154
|
-
const AI_TABLE_POPOVER_LEFT_OFFSET = 4;
|
2155
|
-
const AI_TABLE_RATE_MAX = 5;
|
2156
|
-
const AI_TABLE_SCROLL_BAR_SIZE = 18;
|
2157
|
-
const AI_TABLE_AUTO_SCROLL_LEFT_THRESHOLD = 40;
|
2158
|
-
const AI_TABLE_AUTO_SCROLL_RIGHT_THRESHOLD = 40;
|
2159
|
-
const AI_TABLE_AUTO_SCROLL_TOP_THRESHOLD = AI_TABLE_FIELD_HEAD_HEIGHT / 2;
|
2160
|
-
const AI_TABLE_AUTO_SCROLL_BOTTOM_THRESHOLD = AI_TABLE_FIELD_HEAD_HEIGHT / 2;
|
2161
|
-
|
2162
|
-
const MIN_COLUMN_WIDTH = 80;
|
2163
|
-
const DBL_CLICK_EDIT_TYPE = [
|
2164
|
-
AITableFieldType.text,
|
2165
|
-
AITableFieldType.number,
|
2166
|
-
AITableFieldType.select,
|
2167
|
-
AITableFieldType.date,
|
2168
|
-
AITableFieldType.member,
|
2169
|
-
AITableFieldType.link
|
2170
|
-
];
|
2171
|
-
const RowHeight = {
|
2172
|
-
Short: 32,
|
2173
|
-
Medium: 57,
|
2174
|
-
Tall: 104,
|
2175
|
-
ExtraTall: 152
|
2176
|
-
};
|
2177
|
-
const DEFAULT_POINT_POSITION = {
|
2178
|
-
areaType: AITableAreaType.none,
|
2179
|
-
targetName: AI_TABLE_BLANK,
|
2180
|
-
realTargetName: AI_TABLE_BLANK,
|
2181
|
-
rowIndex: -1,
|
2182
|
-
columnIndex: -1,
|
2183
|
-
x: 0,
|
2184
|
-
y: 0,
|
2185
|
-
offsetTop: 0,
|
2186
|
-
offsetLeft: 0
|
2187
|
-
};
|
2188
|
-
const DEFAULT_SCROLL_STATE = {
|
2189
|
-
scrollTop: 0,
|
2190
|
-
scrollLeft: 0,
|
2191
|
-
isScrolling: false
|
2192
|
-
};
|
2193
|
-
|
2194
|
-
const DEFAULT_ICON_SHAPE = 'square';
|
2195
|
-
const DEFAULT_ICON_SIZE = 16;
|
2196
|
-
const Check = `
|
2197
|
-
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
|
2198
|
-
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
|
2199
|
-
c0.3-0.3,0.9-0.3,1.2,0C14.3,5.7,14.3,6.3,14,6.6z
|
2200
|
-
`;
|
2201
|
-
const Unchecked = `
|
2202
|
-
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
|
2203
|
-
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
|
2204
|
-
`;
|
2205
|
-
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`;
|
2206
|
-
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`;
|
2207
|
-
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`;
|
2208
|
-
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`;
|
2209
|
-
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`;
|
2210
|
-
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`;
|
2211
|
-
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`;
|
2212
|
-
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`;
|
2213
|
-
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`;
|
2214
|
-
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`;
|
2215
|
-
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`;
|
2216
|
-
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`;
|
2217
|
-
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`;
|
2218
|
-
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`;
|
2219
|
-
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`;
|
2220
|
-
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`;
|
2221
|
-
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`;
|
2222
|
-
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`;
|
2223
|
-
const IconPathMap = {};
|
2224
|
-
|
2225
|
-
const DEFAULT_FONT_SIZE = 14;
|
2226
|
-
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';
|
2227
|
-
const DEFAULT_FONT_STYLE = 'normal';
|
2228
|
-
const DEFAULT_TEXT_LINE_HEIGHT = 24;
|
2229
|
-
const DEFAULT_TEXT_FILL = Colors.gray800;
|
2230
|
-
const DEFAULT_FONT_WEIGHT = 'normal';
|
2231
|
-
const DEFAULT_TEXT_WRAP = 'none';
|
2232
|
-
const DEFAULT_TEXT_TRANSFORMS_ENABLED = 'position';
|
2233
|
-
const DEFAULT_TEXT_ELLIPSIS = true;
|
2234
|
-
const DEFAULT_TEXT_LISTENING = false;
|
2235
|
-
const DEFAULT_TEXT_ALIGN_LEFT = 'left';
|
2236
|
-
const DEFAULT_TEXT_ALIGN_CENTER = 'center';
|
2237
|
-
const DEFAULT_TEXT_ALIGN_RIGHT = 'right';
|
2238
|
-
const DEFAULT_TEXT_VERTICAL_ALIGN_MIDDLE = 'middle';
|
2239
|
-
const DEFAULT_TEXT_MAX_HEIGHT = 130;
|
2240
|
-
const DEFAULT_WRAP_TEXT_MAX_ROW = 1;
|
2241
|
-
const DEFAULT_TEXT_VERTICAL_ALIGN_TOP = 'top';
|
2242
|
-
const DEFAULT_TEXT_DECORATION = 'none';
|
2243
|
-
const DEFAULT_TEXT_SCALE = 1;
|
2244
|
-
const DEFAULT_TEXT_MAX_CACHE = 500;
|
2245
|
-
const FONT_SIZE_SM = 12;
|
2246
|
-
|
2247
2261
|
/**
|
2248
2262
|
* 生成目标名称
|
2249
2263
|
*/
|
@@ -2746,12 +2760,48 @@ function cellValueToSortValue$4(cellValue, field, references, sortKey = 'title')
|
|
2746
2760
|
return values && values.length ? values.join(', ') : null;
|
2747
2761
|
}
|
2748
2762
|
|
2749
|
-
|
2750
|
-
|
2751
|
-
|
2763
|
+
const FIELD_STAT_TYPE_MAP = {
|
2764
|
+
[AITableStatType.EarliestTime]: {
|
2765
|
+
name: AITableGridI18nKey.earliestTime,
|
2766
|
+
type: AITableStatType.EarliestTime,
|
2767
|
+
format: AITableGridI18nKey.earliestTimeResult,
|
2768
|
+
exec: statEarliestTime
|
2769
|
+
},
|
2770
|
+
[AITableStatType.LatestTime]: {
|
2771
|
+
name: AITableGridI18nKey.latestTime,
|
2772
|
+
type: AITableStatType.LatestTime,
|
2773
|
+
format: AITableGridI18nKey.latestTimeResult,
|
2774
|
+
exec: statLatestTime
|
2775
|
+
},
|
2776
|
+
[AITableStatType.DateRangeOfDays]: {
|
2777
|
+
name: AITableGridI18nKey.dateRangeOfDays,
|
2778
|
+
type: AITableStatType.DateRangeOfDays,
|
2779
|
+
format: AITableGridI18nKey.dateRangeOfDaysResult,
|
2780
|
+
exec: statDateRangeOfDays
|
2781
|
+
},
|
2782
|
+
[AITableStatType.DateRangeOfMonths]: {
|
2783
|
+
name: AITableGridI18nKey.dateRangeOfMonths,
|
2784
|
+
type: AITableStatType.DateRangeOfMonths,
|
2785
|
+
format: AITableGridI18nKey.dateRangeOfMonthsResult,
|
2786
|
+
exec: statDateRangeOfMonths
|
2752
2787
|
}
|
2753
|
-
|
2754
|
-
|
2788
|
+
};
|
2789
|
+
|
2790
|
+
class DateField extends DateFieldBase {
|
2791
|
+
constructor() {
|
2792
|
+
super([
|
2793
|
+
...DEFAULT_FIELD_STAT_TYPE_ITEMS,
|
2794
|
+
FIELD_STAT_TYPE_MAP[AITableStatType.EarliestTime],
|
2795
|
+
FIELD_STAT_TYPE_MAP[AITableStatType.LatestTime],
|
2796
|
+
FIELD_STAT_TYPE_MAP[AITableStatType.DateRangeOfDays],
|
2797
|
+
FIELD_STAT_TYPE_MAP[AITableStatType.DateRangeOfMonths]
|
2798
|
+
]);
|
2799
|
+
}
|
2800
|
+
transformCellValue(cellValue, options) {
|
2801
|
+
return transformToCellText(cellValue, options);
|
2802
|
+
}
|
2803
|
+
isMeetFilter(condition, cellValue) {
|
2804
|
+
const [left, right] = this.getTimeRange(condition.value);
|
2755
2805
|
if (isUndefinedOrNull(cellValue)) {
|
2756
2806
|
return condition.operation === AITableFilterOperation.empty;
|
2757
2807
|
}
|
@@ -3646,9 +3696,10 @@ const writeToAITable = async (aiTable, actions) => {
|
|
3646
3696
|
const maxRecords = aiTable.context.maxRecords();
|
3647
3697
|
const startRowIndex = aiTable.context.visibleRowsIndexMap().get(startRecordId) ?? 0;
|
3648
3698
|
const lastRowIndex = aiTable.context.linearRows().length - 1;
|
3699
|
+
const recordsCount = aiTable.records().length;
|
3649
3700
|
let appendRowCount = clipboardContent.length - (lastRowIndex - startRowIndex);
|
3650
|
-
if (maxRecords &&
|
3651
|
-
appendRowCount = maxRecords -
|
3701
|
+
if (maxRecords && recordsCount + appendRowCount > maxRecords) {
|
3702
|
+
appendRowCount = maxRecords - recordsCount;
|
3652
3703
|
result.isPasteOverMaxRecords = true;
|
3653
3704
|
}
|
3654
3705
|
actions.addRecord({ count: appendRowCount });
|
@@ -3657,8 +3708,9 @@ const writeToAITable = async (aiTable, actions) => {
|
|
3657
3708
|
const copiedFieldLength = clipboardContent[0].length;
|
3658
3709
|
const appendColCount = copiedFieldLength - (lastColIndex - startColIndex) - 1;
|
3659
3710
|
const appendOffset = copiedFieldLength - appendColCount;
|
3711
|
+
const fieldsCount = aiTable.fields().length;
|
3660
3712
|
for (let i = 0; i < appendColCount; i++) {
|
3661
|
-
if (maxFields &&
|
3713
|
+
if (maxFields && fieldsCount + i + 1 < maxFields) {
|
3662
3714
|
const originField = aiTableContent?.fields[appendOffset + i] || null;
|
3663
3715
|
appendField(aiTable, originField, actions);
|
3664
3716
|
}
|
@@ -3813,6 +3865,9 @@ const handleMouseStyle = (realTargetName, areaType = AITableAreaType.grid, conta
|
|
3813
3865
|
case AI_TABLE_ROW_DRAG: {
|
3814
3866
|
return setMouseStyle('pointer', container);
|
3815
3867
|
}
|
3868
|
+
case AI_TABLE_FILL_HANDLE: {
|
3869
|
+
return setMouseStyle('crosshair', container);
|
3870
|
+
}
|
3816
3871
|
default:
|
3817
3872
|
return setMouseStyle('default', container);
|
3818
3873
|
}
|
@@ -5007,7 +5062,7 @@ class AITableCellLink extends CoverCellComponent {
|
|
5007
5062
|
fillStyle: Colors.primary,
|
5008
5063
|
fill: Colors.primary,
|
5009
5064
|
height: rowHeight + 2,
|
5010
|
-
lineHeight:
|
5065
|
+
lineHeight: AI_TABLE_TEXT_LINE_HEIGHT,
|
5011
5066
|
listening: true,
|
5012
5067
|
ellipsis: true,
|
5013
5068
|
textDecoration: 'underline',
|
@@ -5305,7 +5360,7 @@ class AITableCellRichText extends CoverCellComponent {
|
|
5305
5360
|
width: textWidth,
|
5306
5361
|
fillStyle: Colors.primary,
|
5307
5362
|
height: rowHeight + 2,
|
5308
|
-
lineHeight:
|
5363
|
+
lineHeight: AI_TABLE_TEXT_LINE_HEIGHT,
|
5309
5364
|
listening: false,
|
5310
5365
|
ellipsis: true,
|
5311
5366
|
zIndex
|
@@ -5528,7 +5583,7 @@ class AddRowLayout extends Layout {
|
|
5528
5583
|
stroke: this.colors.gray200
|
5529
5584
|
});
|
5530
5585
|
}
|
5531
|
-
renderFirstCell({ isHoverRow }) {
|
5586
|
+
renderFirstCell({ isHoverRow, isDisabled }) {
|
5532
5587
|
if (!this.isFirst)
|
5533
5588
|
return;
|
5534
5589
|
const y = this.y;
|
@@ -5561,7 +5616,7 @@ class AddRowLayout extends Layout {
|
|
5561
5616
|
y: y + (rowHeight - AI_TABLE_ICON_COMMON_SIZE) / 2 - AI_TABLE_OFFSET,
|
5562
5617
|
data: AddOutlinedPath,
|
5563
5618
|
size: AI_TABLE_ROW_HEAD_SIZE,
|
5564
|
-
fill: this.readonly ? this.colors.gray300 : this.colors.gray600
|
5619
|
+
fill: this.readonly || isDisabled ? this.colors.gray300 : this.colors.gray600
|
5565
5620
|
});
|
5566
5621
|
}
|
5567
5622
|
renderLastCell({ isHoverRow, isCheckedRow }) {
|
@@ -5584,9 +5639,10 @@ class AddRowLayout extends Layout {
|
|
5584
5639
|
isHoverRow
|
5585
5640
|
});
|
5586
5641
|
}
|
5587
|
-
render({ isHoverRow, isCheckedRow }) {
|
5642
|
+
render({ isHoverRow, isCheckedRow, isDisabled }) {
|
5588
5643
|
this.renderFirstCell({
|
5589
|
-
isHoverRow
|
5644
|
+
isHoverRow,
|
5645
|
+
isDisabled
|
5590
5646
|
});
|
5591
5647
|
this.renderCommonCell({
|
5592
5648
|
isHoverRow
|
@@ -6900,11 +6956,13 @@ const createCells = (config) => {
|
|
6900
6956
|
containerWidth: coordinate.containerWidth,
|
6901
6957
|
rowHeadWidth: context.rowHeadWidth(),
|
6902
6958
|
hiddenIndexColumn: !!context.aiFieldConfig()?.hiddenIndexColumn,
|
6903
|
-
hiddenRowDrag: !!context.aiFieldConfig()?.hiddenRowDrag
|
6959
|
+
hiddenRowDrag: !!context.aiFieldConfig()?.hiddenRowDrag,
|
6960
|
+
readonly: aiTable.context?.readonly?.()
|
6904
6961
|
});
|
6905
6962
|
addRowLayout.render({
|
6906
6963
|
isHoverRow,
|
6907
|
-
isCheckedRow
|
6964
|
+
isCheckedRow,
|
6965
|
+
isDisabled: maxRecords ? aiTable.records().length >= maxRecords : false
|
6908
6966
|
});
|
6909
6967
|
break;
|
6910
6968
|
}
|
@@ -7138,7 +7196,7 @@ class AITableAddField {
|
|
7138
7196
|
const fields = this.config().fields || [];
|
7139
7197
|
const index = this.config().columnStopIndex;
|
7140
7198
|
const fieldId = fields.length && index < fields.length ? fields[index]._id : '';
|
7141
|
-
const disabled = maxFields && aiTable.
|
7199
|
+
const disabled = maxFields && aiTable.fields().length >= maxFields;
|
7142
7200
|
return {
|
7143
7201
|
name: generateTargetName({
|
7144
7202
|
targetName: AI_TABLE_FIELD_ADD_BUTTON,
|
@@ -7167,7 +7225,7 @@ class AITableAddField {
|
|
7167
7225
|
fill: Colors.gray600,
|
7168
7226
|
listening: false,
|
7169
7227
|
visible: !readonly,
|
7170
|
-
disabled: maxFields ? aiTable.
|
7228
|
+
disabled: maxFields ? aiTable.fields().length >= maxFields : false
|
7171
7229
|
};
|
7172
7230
|
});
|
7173
7231
|
}
|
@@ -7367,7 +7425,7 @@ class AITableFieldHead {
|
|
7367
7425
|
width: Math.max(this.textData().width, AI_TABLE_FIELD_HEAD_TEXT_MIN_WIDTH),
|
7368
7426
|
height: height + 2,
|
7369
7427
|
text: field.name,
|
7370
|
-
lineHeight:
|
7428
|
+
lineHeight: AI_TABLE_TEXT_LINE_HEIGHT
|
7371
7429
|
};
|
7372
7430
|
});
|
7373
7431
|
this.moreIconConfig = computed(() => {
|
@@ -7635,7 +7693,7 @@ class AITableFrozenColumnHeads {
|
|
7635
7693
|
});
|
7636
7694
|
this.textConfig = computed(() => {
|
7637
7695
|
const text = AI_TABLE_INDEX_FIELD_TEXT;
|
7638
|
-
const lineHeight =
|
7696
|
+
const lineHeight = AI_TABLE_TEXT_LINE_HEIGHT;
|
7639
7697
|
const measureText = TextMeasure().measureText(text);
|
7640
7698
|
return {
|
7641
7699
|
x: AI_TABLE_CELL_PADDING + this.dragOccupyWidth() + measureText.width / 2,
|
@@ -7959,7 +8017,7 @@ class AITableOtherRows {
|
|
7959
8017
|
for (let rowIndex = rowStartIndex; rowIndex <= rowStopIndex; rowIndex++) {
|
7960
8018
|
if (rowIndex > coordinate.rowCount - 1)
|
7961
8019
|
break;
|
7962
|
-
if (maxRecords &&
|
8020
|
+
if (maxRecords && aiTable.records().length >= maxRecords)
|
7963
8021
|
break;
|
7964
8022
|
const { _id, type } = aiTable.context.linearRows()[rowIndex];
|
7965
8023
|
if (type === AITableRowType.record)
|
@@ -8017,130 +8075,702 @@ class AITablePlaceholderCells {
|
|
8017
8075
|
return getPlaceHolderCellsConfigs(this.config());
|
8018
8076
|
});
|
8019
8077
|
}
|
8020
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AITablePlaceholderCells, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
8021
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.10", type: AITablePlaceholderCells, isStandalone: true, selector: "ai-table-placeholder-cells", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: `
|
8022
|
-
@for (item of frozenPlaceHolderCellsConfig(); track $index) {
|
8023
|
-
<ko-rect [config]="item"></ko-rect>
|
8024
|
-
}
|
8025
|
-
`, 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"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
8078
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AITablePlaceholderCells, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
8079
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.10", type: AITablePlaceholderCells, isStandalone: true, selector: "ai-table-placeholder-cells", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: `
|
8080
|
+
@for (item of frozenPlaceHolderCellsConfig(); track $index) {
|
8081
|
+
<ko-rect [config]="item"></ko-rect>
|
8082
|
+
}
|
8083
|
+
`, 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"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
8084
|
+
}
|
8085
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AITablePlaceholderCells, decorators: [{
|
8086
|
+
type: Component,
|
8087
|
+
args: [{
|
8088
|
+
selector: 'ai-table-placeholder-cells',
|
8089
|
+
template: `
|
8090
|
+
@for (item of frozenPlaceHolderCellsConfig(); track $index) {
|
8091
|
+
<ko-rect [config]="item"></ko-rect>
|
8092
|
+
}
|
8093
|
+
`,
|
8094
|
+
imports: [KoShape],
|
8095
|
+
changeDetection: ChangeDetectionStrategy.OnPush
|
8096
|
+
}]
|
8097
|
+
}] });
|
8098
|
+
|
8099
|
+
class AITableBackground {
|
8100
|
+
constructor() {
|
8101
|
+
this.config = input.required();
|
8102
|
+
this.isActive = input(false);
|
8103
|
+
this.koClick = output();
|
8104
|
+
this.hover = output();
|
8105
|
+
this.koMouseenter = output();
|
8106
|
+
this.koMouseleave = output();
|
8107
|
+
this.groupConfig = computed(() => {
|
8108
|
+
const { x, y } = this.config();
|
8109
|
+
return { x, y, listening: false };
|
8110
|
+
});
|
8111
|
+
this.isHover = model(false);
|
8112
|
+
this.isShowSpecialBorderConfig = computed(() => {
|
8113
|
+
const { borders } = this.config();
|
8114
|
+
const stroke = this.stroke();
|
8115
|
+
const strokeWidth = this.strokeWidth();
|
8116
|
+
return borders && stroke && strokeWidth && ___default.some(borders, (item) => !item) && ___default.some(borders, (item) => !!item);
|
8117
|
+
});
|
8118
|
+
this.borderLinesConfig = computed(() => {
|
8119
|
+
const { borders, height, width } = this.config();
|
8120
|
+
const stroke = this.stroke();
|
8121
|
+
const strokeWidth = this.strokeWidth();
|
8122
|
+
const result = [];
|
8123
|
+
const [top, right, bottom, left] = borders || [false, false, false, false];
|
8124
|
+
if (top) {
|
8125
|
+
result.push({
|
8126
|
+
x: 0,
|
8127
|
+
y: 0,
|
8128
|
+
points: [0, 0, width, 0],
|
8129
|
+
stroke,
|
8130
|
+
strokeWidth,
|
8131
|
+
listening: false
|
8132
|
+
});
|
8133
|
+
}
|
8134
|
+
if (right) {
|
8135
|
+
result.push({
|
8136
|
+
x: 0,
|
8137
|
+
y: 0,
|
8138
|
+
points: [width, 0, width, height],
|
8139
|
+
stroke,
|
8140
|
+
strokeWidth,
|
8141
|
+
listening: false
|
8142
|
+
});
|
8143
|
+
}
|
8144
|
+
if (bottom) {
|
8145
|
+
result.push({
|
8146
|
+
x: 0,
|
8147
|
+
y: 0,
|
8148
|
+
points: [0, height, width, height],
|
8149
|
+
stroke,
|
8150
|
+
strokeWidth,
|
8151
|
+
listening: false
|
8152
|
+
});
|
8153
|
+
}
|
8154
|
+
if (left) {
|
8155
|
+
result.push({
|
8156
|
+
x: 0,
|
8157
|
+
y: 0,
|
8158
|
+
points: [0, 0, 0, height],
|
8159
|
+
stroke,
|
8160
|
+
strokeWidth,
|
8161
|
+
listening: false
|
8162
|
+
});
|
8163
|
+
}
|
8164
|
+
return result;
|
8165
|
+
});
|
8166
|
+
this.stroke = computed(() => {
|
8167
|
+
const { stroke, hoverStroke } = this.config();
|
8168
|
+
const active = this.isHover() || this.isActive();
|
8169
|
+
return active ? hoverStroke || stroke : stroke;
|
8170
|
+
});
|
8171
|
+
this.strokeWidth = computed(() => {
|
8172
|
+
const { strokeWidth, hoverStrokeWidth } = this.config();
|
8173
|
+
const active = this.isHover() || this.isActive();
|
8174
|
+
return active ? hoverStrokeWidth || strokeWidth : strokeWidth;
|
8175
|
+
});
|
8176
|
+
this.containerConfig = computed(() => {
|
8177
|
+
const { x, y } = this.config();
|
8178
|
+
return { x, y };
|
8179
|
+
});
|
8180
|
+
this.bgConfig = computed(() => {
|
8181
|
+
const { name, width, height, fill = Colors.transparent, cornerRadius, opacity, hoverFill, hoverOpacity, listening } = this.config();
|
8182
|
+
const active = this.isHover() || this.isActive();
|
8183
|
+
const result = {
|
8184
|
+
name,
|
8185
|
+
width,
|
8186
|
+
height,
|
8187
|
+
fill: active ? hoverFill || fill : fill,
|
8188
|
+
cornerRadius,
|
8189
|
+
opacity: active ? hoverOpacity || opacity : opacity,
|
8190
|
+
listening
|
8191
|
+
};
|
8192
|
+
if (!this.isShowSpecialBorderConfig()) {
|
8193
|
+
result.stroke = this.stroke();
|
8194
|
+
result.strokeWidth = this.strokeWidth();
|
8195
|
+
}
|
8196
|
+
return result;
|
8197
|
+
});
|
8198
|
+
}
|
8199
|
+
onClick(e) {
|
8200
|
+
this.koClick.emit(e);
|
8201
|
+
}
|
8202
|
+
koMousemove(e) {
|
8203
|
+
// e.event.cancelBubble = true;
|
8204
|
+
}
|
8205
|
+
onMouseenter(e) {
|
8206
|
+
this.isHover.set(true);
|
8207
|
+
const { coordinate } = this.config();
|
8208
|
+
setMouseStyle('pointer', coordinate.container);
|
8209
|
+
this.koMouseenter.emit(e);
|
8210
|
+
this.hover.emit(this.isHover());
|
8211
|
+
}
|
8212
|
+
onMouseleave(e) {
|
8213
|
+
this.isHover.set(false);
|
8214
|
+
const { coordinate } = this.config();
|
8215
|
+
setMouseStyle('default', coordinate.container);
|
8216
|
+
this.koMouseleave.emit(e);
|
8217
|
+
this.hover.emit(this.isHover());
|
8218
|
+
}
|
8219
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AITableBackground, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
8220
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.10", type: AITableBackground, isStandalone: true, selector: "ai-table-background", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: true, transformFunction: null }, isActive: { classPropertyName: "isActive", publicName: "isActive", isSignal: true, isRequired: false, transformFunction: null }, isHover: { classPropertyName: "isHover", publicName: "isHover", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { koClick: "koClick", hover: "hover", koMouseenter: "koMouseenter", koMouseleave: "koMouseleave", isHover: "isHoverChange" }, ngImport: i0, template: `
|
8221
|
+
<ko-group [config]="containerConfig()">
|
8222
|
+
<ko-group>
|
8223
|
+
<ko-rect
|
8224
|
+
[config]="bgConfig()"
|
8225
|
+
(koMousemove)="koMousemove($event)"
|
8226
|
+
(koMouseenter)="onMouseenter($event)"
|
8227
|
+
(koMouseleave)="onMouseleave($event)"
|
8228
|
+
(koClick)="koClick.emit($event)"
|
8229
|
+
></ko-rect>
|
8230
|
+
</ko-group>
|
8231
|
+
<ko-group>
|
8232
|
+
@for (lineConfig of borderLinesConfig(); track $index) {
|
8233
|
+
<ko-line [config]="lineConfig"></ko-line>
|
8234
|
+
}
|
8235
|
+
</ko-group>
|
8236
|
+
</ko-group>
|
8237
|
+
`, isInline: true, dependencies: [{ kind: "component", type: KoShape, selector: "ko-shape, ko-circle, ko-label, ko-rect, ko-ellipse, ko-wedge, ko-line, ko-sprite, ko-image, ko-text, ko-text-path, ko-star, ko-ring, ko-arc, ko-tag, ko-path, ko-regular-polygon, ko-arrow, ko-transformer", inputs: ["config"], outputs: ["koMouseover", "koMousemove", "koMouseout", "koMouseenter", "koMouseleave", "koMousedown", "koMouseup", "koWheel", "koContextmenu", "koClick", "koDblclick", "koTouchstart", "koTouchmove", "koTouchend", "koTap", "koDbltap", "koDragstart", "koDragmove", "koDragend"] }, { kind: "component", type: KoContainer, selector: "ko-layer, ko-fastlayer, ko-group" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
8238
|
+
}
|
8239
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AITableBackground, decorators: [{
|
8240
|
+
type: Component,
|
8241
|
+
args: [{
|
8242
|
+
selector: 'ai-table-background',
|
8243
|
+
template: `
|
8244
|
+
<ko-group [config]="containerConfig()">
|
8245
|
+
<ko-group>
|
8246
|
+
<ko-rect
|
8247
|
+
[config]="bgConfig()"
|
8248
|
+
(koMousemove)="koMousemove($event)"
|
8249
|
+
(koMouseenter)="onMouseenter($event)"
|
8250
|
+
(koMouseleave)="onMouseleave($event)"
|
8251
|
+
(koClick)="koClick.emit($event)"
|
8252
|
+
></ko-rect>
|
8253
|
+
</ko-group>
|
8254
|
+
<ko-group>
|
8255
|
+
@for (lineConfig of borderLinesConfig(); track $index) {
|
8256
|
+
<ko-line [config]="lineConfig"></ko-line>
|
8257
|
+
}
|
8258
|
+
</ko-group>
|
8259
|
+
</ko-group>
|
8260
|
+
`,
|
8261
|
+
imports: [KoShape, KoContainer],
|
8262
|
+
changeDetection: ChangeDetectionStrategy.OnPush
|
8263
|
+
}]
|
8264
|
+
}] });
|
8265
|
+
|
8266
|
+
class AITableFillHandle {
|
8267
|
+
constructor() {
|
8268
|
+
this.config = input.required();
|
8269
|
+
this.hasSelectedCells = computed(() => {
|
8270
|
+
return this.config().aiTable.selection().selectedCells.size > 0;
|
8271
|
+
});
|
8272
|
+
this.readonly = computed(() => {
|
8273
|
+
return this.config().readonly;
|
8274
|
+
});
|
8275
|
+
this.handleConfig = computed(() => {
|
8276
|
+
const { aiTable, coordinate } = this.config();
|
8277
|
+
const selectedCells = Array.from(aiTable.selection().selectedCells);
|
8278
|
+
const lastCell = selectedCells[selectedCells.length - 1];
|
8279
|
+
const [recordId, fieldId] = lastCell.split(':');
|
8280
|
+
const columnIndex = aiTable.context.visibleColumnsIndexMap().get(fieldId);
|
8281
|
+
const columnOffset = coordinate.getColumnOffset(columnIndex);
|
8282
|
+
const columnWidth = coordinate.getColumnWidth(columnIndex);
|
8283
|
+
const rowIndex = aiTable.context.visibleRowsIndexMap().get(recordId);
|
8284
|
+
const rowOffset = coordinate.getRowOffset(rowIndex);
|
8285
|
+
const width = 6;
|
8286
|
+
const height = 6;
|
8287
|
+
return {
|
8288
|
+
x: columnOffset + columnWidth - width / 2 + AI_TABLE_OFFSET,
|
8289
|
+
y: rowOffset + AI_TABLE_ROW_HEIGHT - height + AI_TABLE_CELL_BORDER + AI_TABLE_OFFSET,
|
8290
|
+
width,
|
8291
|
+
height,
|
8292
|
+
fill: Colors.primary,
|
8293
|
+
stroke: Colors.white,
|
8294
|
+
strokeWidth: 2,
|
8295
|
+
zIndex: 20,
|
8296
|
+
name: generateTargetName({
|
8297
|
+
targetName: AI_TABLE_FILL_HANDLE,
|
8298
|
+
fieldId,
|
8299
|
+
recordId
|
8300
|
+
})
|
8301
|
+
};
|
8302
|
+
});
|
8303
|
+
}
|
8304
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AITableFillHandle, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
8305
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.10", type: AITableFillHandle, isStandalone: true, selector: "ai-table-fill-handle", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: `
|
8306
|
+
@if (hasSelectedCells() && !readonly()) {
|
8307
|
+
<ko-rect [config]="handleConfig()"></ko-rect>
|
8308
|
+
}
|
8309
|
+
`, 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"] }] }); }
|
8310
|
+
}
|
8311
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AITableFillHandle, decorators: [{
|
8312
|
+
type: Component,
|
8313
|
+
args: [{
|
8314
|
+
selector: 'ai-table-fill-handle',
|
8315
|
+
template: `
|
8316
|
+
@if (hasSelectedCells() && !readonly()) {
|
8317
|
+
<ko-rect [config]="handleConfig()"></ko-rect>
|
8318
|
+
}
|
8319
|
+
`,
|
8320
|
+
imports: [KoShape]
|
8321
|
+
}]
|
8322
|
+
}] });
|
8323
|
+
|
8324
|
+
class AITableCoverCells {
|
8325
|
+
constructor() {
|
8326
|
+
this.config = input.required();
|
8327
|
+
this.onlyDisplayBorder = input(false);
|
8328
|
+
this.componentMap = {};
|
8329
|
+
this.groupConfig = computed(() => {
|
8330
|
+
return {
|
8331
|
+
x: this.coverCellConfig()?.x,
|
8332
|
+
y: this.coverCellConfig()?.y,
|
8333
|
+
listening: true
|
8334
|
+
};
|
8335
|
+
});
|
8336
|
+
this.coverCellConfig = computed(() => {
|
8337
|
+
const { aiTable, coordinate, references, readonly, actions } = this.config();
|
8338
|
+
const coverCell = this.coverCell();
|
8339
|
+
if (!coverCell) {
|
8340
|
+
return;
|
8341
|
+
}
|
8342
|
+
const { field, recordId, isExpand } = coverCell;
|
8343
|
+
const cellValue = AITableQueries.getFieldValue(aiTable, [recordId, field._id]);
|
8344
|
+
const fieldModel = FieldModelMap[field.type];
|
8345
|
+
const transformValue = fieldModel.transformCellValue(cellValue, { aiTable, field });
|
8346
|
+
const { rowHeight, columnCount, rowCount } = coordinate;
|
8347
|
+
const columnIndex = aiTable.context?.visibleColumnsIndexMap().get(field._id) ?? 0;
|
8348
|
+
const rowIndex = aiTable.context?.visibleRowsIndexMap().get(recordId) ?? 0;
|
8349
|
+
const x = coordinate.getColumnOffset(columnIndex) + AI_TABLE_OFFSET;
|
8350
|
+
const columnWidth = coordinate.getColumnWidth(columnIndex);
|
8351
|
+
const y = coordinate.getRowOffset(rowIndex) + AI_TABLE_OFFSET;
|
8352
|
+
const { width } = getCellHorizontalPosition({
|
8353
|
+
columnWidth,
|
8354
|
+
columnIndex,
|
8355
|
+
columnCount
|
8356
|
+
});
|
8357
|
+
const style = {
|
8358
|
+
textAlign: DEFAULT_TEXT_ALIGN_LEFT
|
8359
|
+
};
|
8360
|
+
const textAlign = style.textAlign;
|
8361
|
+
const renderX = textAlign === DEFAULT_TEXT_ALIGN_RIGHT
|
8362
|
+
? columnWidth - AI_TABLE_CELL_PADDING + AI_TABLE_OFFSET
|
8363
|
+
: AI_TABLE_CELL_PADDING + AI_TABLE_OFFSET;
|
8364
|
+
const renderY = 0 - AI_TABLE_OFFSET * 2;
|
8365
|
+
const result = {
|
8366
|
+
field,
|
8367
|
+
recordId,
|
8368
|
+
aiTable,
|
8369
|
+
coordinate,
|
8370
|
+
x,
|
8371
|
+
y,
|
8372
|
+
readonly,
|
8373
|
+
actions,
|
8374
|
+
isExpand,
|
8375
|
+
render: {
|
8376
|
+
aiTable,
|
8377
|
+
recordId,
|
8378
|
+
field,
|
8379
|
+
isActive: isSelectedField(field._id, aiTable),
|
8380
|
+
x: renderX,
|
8381
|
+
y: renderY,
|
8382
|
+
columnWidth: width,
|
8383
|
+
rowHeight,
|
8384
|
+
cellValue,
|
8385
|
+
transformValue,
|
8386
|
+
style,
|
8387
|
+
references
|
8388
|
+
}
|
8389
|
+
};
|
8390
|
+
return result;
|
8391
|
+
});
|
8392
|
+
this.coverCell = computed(() => getCoverCell(this.config().aiTable));
|
8393
|
+
}
|
8394
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AITableCoverCells, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
8395
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.10", type: AITableCoverCells, isStandalone: true, selector: "ai-table-cover-cell", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: true, transformFunction: null }, onlyDisplayBorder: { classPropertyName: "onlyDisplayBorder", publicName: "onlyDisplayBorder", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
|
8396
|
+
@if (coverCell()) {
|
8397
|
+
<ko-group [config]="groupConfig()">
|
8398
|
+
<ng-container
|
8399
|
+
*ngComponentOutlet="
|
8400
|
+
coverCell()!.renderComponentDefinition;
|
8401
|
+
inputs: { config: coverCellConfig(), onlyDisplayBorder: onlyDisplayBorder() }
|
8402
|
+
"
|
8403
|
+
>
|
8404
|
+
</ng-container>
|
8405
|
+
</ko-group>
|
8406
|
+
}
|
8407
|
+
`, isInline: true, dependencies: [{ kind: "component", type: KoContainer, selector: "ko-layer, ko-fastlayer, ko-group" }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$2.NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletContent", "ngComponentOutletNgModule", "ngComponentOutletNgModuleFactory"], exportAs: ["ngComponentOutlet"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
8408
|
+
}
|
8409
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AITableCoverCells, decorators: [{
|
8410
|
+
type: Component,
|
8411
|
+
args: [{
|
8412
|
+
selector: 'ai-table-cover-cell',
|
8413
|
+
template: `
|
8414
|
+
@if (coverCell()) {
|
8415
|
+
<ko-group [config]="groupConfig()">
|
8416
|
+
<ng-container
|
8417
|
+
*ngComponentOutlet="
|
8418
|
+
coverCell()!.renderComponentDefinition;
|
8419
|
+
inputs: { config: coverCellConfig(), onlyDisplayBorder: onlyDisplayBorder() }
|
8420
|
+
"
|
8421
|
+
>
|
8422
|
+
</ng-container>
|
8423
|
+
</ko-group>
|
8424
|
+
}
|
8425
|
+
`,
|
8426
|
+
imports: [KoContainer, CommonModule],
|
8427
|
+
changeDetection: ChangeDetectionStrategy.OnPush
|
8428
|
+
}]
|
8429
|
+
}] });
|
8430
|
+
|
8431
|
+
const createFieldStats = (config) => {
|
8432
|
+
const { coordinate, columnStartIndex, columnStopIndex, aiTable, actions, y, isHoverStatContainer, readonly } = config;
|
8433
|
+
const colors = Colors;
|
8434
|
+
const { columnCount, rowInitSize: fieldHeadHeight } = coordinate;
|
8435
|
+
const fields = aiTable.gridData().fields;
|
8436
|
+
const fieldStats = [];
|
8437
|
+
for (let columnIndex = columnStartIndex; columnIndex <= columnStopIndex; columnIndex++) {
|
8438
|
+
if (columnIndex > columnCount - 1)
|
8439
|
+
break;
|
8440
|
+
if (columnIndex < 0)
|
8441
|
+
continue;
|
8442
|
+
const field = fields[columnIndex];
|
8443
|
+
if (field == null)
|
8444
|
+
continue;
|
8445
|
+
const x = coordinate.getColumnOffset(columnIndex);
|
8446
|
+
const columnWidth = coordinate.getColumnWidth(columnIndex);
|
8447
|
+
const fieldStat = {
|
8448
|
+
aiTable,
|
8449
|
+
coordinate,
|
8450
|
+
actions,
|
8451
|
+
columnIndex,
|
8452
|
+
x,
|
8453
|
+
y,
|
8454
|
+
width: columnWidth,
|
8455
|
+
height: AI_TABLE_FIELD_STAT_HEIGHT,
|
8456
|
+
field,
|
8457
|
+
stroke: columnIndex === 0 ? colors.transparent : undefined,
|
8458
|
+
isHoverStatContainer: isHoverStatContainer,
|
8459
|
+
readonly
|
8460
|
+
};
|
8461
|
+
fieldStats.push(fieldStat);
|
8462
|
+
}
|
8463
|
+
return fieldStats;
|
8464
|
+
};
|
8465
|
+
|
8466
|
+
class AITableStatTypeMenu extends ThyDropdownAbstractMenu {
|
8467
|
+
constructor() {
|
8468
|
+
super(...arguments);
|
8469
|
+
this.field = input.required();
|
8470
|
+
this.aiTable = input.required();
|
8471
|
+
this.statMenus = input.required();
|
8472
|
+
this.menuClick = output();
|
8473
|
+
this.selectStatType = computed(() => this.field().stat_type || AITableStatType.None);
|
8474
|
+
}
|
8475
|
+
execute(menu) {
|
8476
|
+
this.menuClick.emit({
|
8477
|
+
menu,
|
8478
|
+
field: this.field()
|
8479
|
+
});
|
8480
|
+
}
|
8481
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AITableStatTypeMenu, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
8482
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.10", type: AITableStatTypeMenu, isStandalone: true, selector: "ai-table-stat-type-menu", inputs: { field: { classPropertyName: "field", publicName: "field", isSignal: true, isRequired: true, transformFunction: null }, aiTable: { classPropertyName: "aiTable", publicName: "aiTable", isSignal: true, isRequired: true, transformFunction: null }, statMenus: { classPropertyName: "statMenus", publicName: "statMenus", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { menuClick: "menuClick" }, host: { classAttribute: "stat-type-menu" }, usesInheritance: true, ngImport: i0, template: "@if (field()) {\n @for (menu of statMenus(); track index; let index = $index) {\n <a\n thyDropdownMenuItem\n href=\"javascript:;\"\n [ngClass]=\"{\n active: selectStatType() === menu.type\n }\"\n (click)=\"execute(menu)\"\n >\n <span>{{ menu.name }}</span>\n </a>\n }\n}\n", dependencies: [{ kind: "directive", type: ThyDropdownMenuItemDirective, selector: "[thyDropdownMenuItem]", inputs: ["thyType", "thyDisabled"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
8483
|
+
}
|
8484
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AITableStatTypeMenu, decorators: [{
|
8485
|
+
type: Component,
|
8486
|
+
args: [{ selector: 'ai-table-stat-type-menu', changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
8487
|
+
class: 'stat-type-menu'
|
8488
|
+
}, imports: [ThyDropdownMenuItemDirective, NgClass], template: "@if (field()) {\n @for (menu of statMenus(); track index; let index = $index) {\n <a\n thyDropdownMenuItem\n href=\"javascript:;\"\n [ngClass]=\"{\n active: selectStatType() === menu.type\n }\"\n (click)=\"execute(menu)\"\n >\n <span>{{ menu.name }}</span>\n </a>\n }\n}\n" }]
|
8489
|
+
}] });
|
8490
|
+
|
8491
|
+
class AITableFieldStat {
|
8492
|
+
constructor() {
|
8493
|
+
this.thyPopover = inject(ThyPopover);
|
8494
|
+
this.config = input.required();
|
8495
|
+
this.hover = output();
|
8496
|
+
this.isActive = signal(false);
|
8497
|
+
this.availableTextWidth = computed(() => {
|
8498
|
+
const { width } = this.config();
|
8499
|
+
return width - AI_TABLE_ACTION_COMMON_SIZE - AI_TABLE_CELL_PADDING;
|
8500
|
+
});
|
8501
|
+
this.textData = computed(() => {
|
8502
|
+
const textString = this.renderText() || '';
|
8503
|
+
const availableTextWidth = this.availableTextWidth();
|
8504
|
+
const { text, textWidth } = drawer.textEllipsis({
|
8505
|
+
text: textString,
|
8506
|
+
maxWidth: availableTextWidth,
|
8507
|
+
fontSize: DEFAULT_FONT_SIZE,
|
8508
|
+
fontWeight: DEFAULT_FONT_WEIGHT
|
8509
|
+
});
|
8510
|
+
return {
|
8511
|
+
width: textWidth,
|
8512
|
+
text
|
8513
|
+
};
|
8514
|
+
});
|
8515
|
+
this.groupConfig = computed(() => {
|
8516
|
+
return {
|
8517
|
+
x: this.config().x,
|
8518
|
+
y: this.config().y
|
8519
|
+
};
|
8520
|
+
});
|
8521
|
+
this.bgConfig = computed(() => {
|
8522
|
+
const { field, width, height, coordinate, readonly } = this.config();
|
8523
|
+
return {
|
8524
|
+
coordinate,
|
8525
|
+
x: 0,
|
8526
|
+
y: 0,
|
8527
|
+
name: generateTargetName({
|
8528
|
+
targetName: AI_TABLE_FIELD_STAT_BG,
|
8529
|
+
fieldId: field._id,
|
8530
|
+
mouseStyle: 'pointer'
|
8531
|
+
}),
|
8532
|
+
width: width,
|
8533
|
+
height: height,
|
8534
|
+
fill: Colors.white,
|
8535
|
+
hoverFill: Colors.gray100,
|
8536
|
+
opacity: 1,
|
8537
|
+
listening: !readonly
|
8538
|
+
};
|
8539
|
+
});
|
8540
|
+
this.field = computed(() => {
|
8541
|
+
const { field } = this.config();
|
8542
|
+
return field;
|
8543
|
+
});
|
8544
|
+
this.records = computed(() => {
|
8545
|
+
const { aiTable } = this.config();
|
8546
|
+
return aiTable.gridData().records;
|
8547
|
+
});
|
8548
|
+
this.aiFieldConfig = computed(() => {
|
8549
|
+
const { aiTable } = this.config();
|
8550
|
+
return aiTable.context?.aiFieldConfig;
|
8551
|
+
});
|
8552
|
+
this.aiTable = computed(() => {
|
8553
|
+
const { aiTable } = this.config();
|
8554
|
+
return aiTable;
|
8555
|
+
});
|
8556
|
+
this.options = computed(() => {
|
8557
|
+
const aiTable = this.aiTable();
|
8558
|
+
return {
|
8559
|
+
field: this.field(),
|
8560
|
+
aiTable
|
8561
|
+
};
|
8562
|
+
});
|
8563
|
+
this.isHoverStatContainer = computed(() => this.config().isHoverStatContainer);
|
8564
|
+
this.renderText = computed(() => {
|
8565
|
+
const field = this.field();
|
8566
|
+
const records = this.records();
|
8567
|
+
const fieldModel = FieldModelMap[field.type];
|
8568
|
+
const selectedInfo = this.selectedInfo();
|
8569
|
+
if (this.isFirstColumn() && selectedInfo.isSelected) {
|
8570
|
+
if (selectedInfo.selectedType === 'records') {
|
8571
|
+
return `已经选择 ${selectedInfo.selectedCount} 条记录`;
|
8572
|
+
}
|
8573
|
+
else {
|
8574
|
+
return `已经选择 ${selectedInfo.selectedCount} 个单元格`;
|
8575
|
+
}
|
8576
|
+
}
|
8577
|
+
else {
|
8578
|
+
const result = fieldModel.getStatFormatValue(records, this.options());
|
8579
|
+
if (!result && this.isHoverStatContainer()) {
|
8580
|
+
return `不展示`;
|
8581
|
+
}
|
8582
|
+
return result;
|
8583
|
+
}
|
8584
|
+
});
|
8585
|
+
this.containerBox = computed(() => {
|
8586
|
+
const { height, width } = this.config();
|
8587
|
+
return { height, width };
|
8588
|
+
});
|
8589
|
+
this.textConfig = computed(() => {
|
8590
|
+
const { height, width } = this.containerBox();
|
8591
|
+
const text = this.renderText();
|
8592
|
+
if (text) {
|
8593
|
+
const renderWidth = this.textData().width;
|
8594
|
+
return {
|
8595
|
+
x: width - AI_TABLE_ACTION_COMMON_SIZE - renderWidth,
|
8596
|
+
y: 0,
|
8597
|
+
width: renderWidth,
|
8598
|
+
height: height,
|
8599
|
+
text: this.textData().text,
|
8600
|
+
lineHeight: AI_TABLE_TEXT_LINE_HEIGHT,
|
8601
|
+
listening: false
|
8602
|
+
};
|
8603
|
+
}
|
8604
|
+
return null;
|
8605
|
+
});
|
8606
|
+
this.selectedRecordCount = computed(() => {
|
8607
|
+
const aiTable = this.aiTable();
|
8608
|
+
const selectedRecords = aiTable.selection().selectedRecords;
|
8609
|
+
return selectedRecords.size;
|
8610
|
+
});
|
8611
|
+
this.selectedCellCount = computed(() => {
|
8612
|
+
const aiTable = this.aiTable();
|
8613
|
+
const selectedCells = aiTable.selection().selectedCells;
|
8614
|
+
return selectedCells.size;
|
8615
|
+
});
|
8616
|
+
this.selectedInfo = computed(() => {
|
8617
|
+
const selectedRecordCount = this.selectedRecordCount();
|
8618
|
+
const selectedCellCount = this.selectedCellCount();
|
8619
|
+
const selectedCount = selectedRecordCount || selectedCellCount;
|
8620
|
+
const selectedType = selectedRecordCount > 0 ? 'records' : selectedCellCount > 0 ? 'cells' : null;
|
8621
|
+
const isSelected = selectedRecordCount > 0 || selectedCellCount > 1;
|
8622
|
+
const result = {
|
8623
|
+
isSelected,
|
8624
|
+
selectedType,
|
8625
|
+
selectedCount
|
8626
|
+
};
|
8627
|
+
return result;
|
8628
|
+
});
|
8629
|
+
this.isFirstColumn = computed(() => {
|
8630
|
+
const { columnIndex } = this.config();
|
8631
|
+
return columnIndex === 0;
|
8632
|
+
});
|
8633
|
+
this.iconConfig = computed(() => {
|
8634
|
+
const { field, width, height } = this.config();
|
8635
|
+
const commonIconOffsetY = (height - AI_TABLE_ACTION_COMMON_SIZE) / 2;
|
8636
|
+
return {
|
8637
|
+
x: width - AI_TABLE_ACTION_COMMON_SIZE,
|
8638
|
+
y: commonIconOffsetY,
|
8639
|
+
data: AngleDownPath,
|
8640
|
+
fill: Colors.gray600,
|
8641
|
+
background: Colors.transparent,
|
8642
|
+
backgroundWidth: AI_TABLE_ACTION_COMMON_SIZE,
|
8643
|
+
backgroundHeight: AI_TABLE_ACTION_COMMON_SIZE,
|
8644
|
+
cornerRadius: 4,
|
8645
|
+
listening: false
|
8646
|
+
};
|
8647
|
+
});
|
8648
|
+
}
|
8649
|
+
onHoverChange(isHover) {
|
8650
|
+
this.hover.emit(this.isActive() || isHover);
|
8651
|
+
}
|
8652
|
+
clickStat(e) {
|
8653
|
+
e.event.evt.stopPropagation();
|
8654
|
+
this.isActive.set(true);
|
8655
|
+
const { aiTable, coordinate, field, actions } = this.config();
|
8656
|
+
const statRect = e.event.target.getClientRect();
|
8657
|
+
const fieldGroupRect = e.event.target.getParent()?.getParent()?.getClientRect();
|
8658
|
+
const containerRect = coordinate.container.getBoundingClientRect();
|
8659
|
+
const position = {
|
8660
|
+
x: containerRect.x + statRect.x,
|
8661
|
+
y: containerRect.y + statRect.y + statRect.height - 50
|
8662
|
+
};
|
8663
|
+
const editFieldPosition = {
|
8664
|
+
x: containerRect.x + fieldGroupRect.x - AI_TABLE_CELL_PADDING,
|
8665
|
+
y: containerRect.y + fieldGroupRect.y + fieldGroupRect.height
|
8666
|
+
};
|
8667
|
+
const editOrigin = coordinate.container.querySelector('.konvajs-content');
|
8668
|
+
const fieldModel = FieldModelMap[field.type];
|
8669
|
+
const ref = this.thyPopover.open(AITableStatTypeMenu, {
|
8670
|
+
origin: coordinate.container,
|
8671
|
+
originPosition: position,
|
8672
|
+
placement: 'topLeft',
|
8673
|
+
originActiveClass: undefined,
|
8674
|
+
insideClosable: true,
|
8675
|
+
initialState: {
|
8676
|
+
origin: editOrigin,
|
8677
|
+
position: editFieldPosition,
|
8678
|
+
aiTable,
|
8679
|
+
field,
|
8680
|
+
statMenus: fieldModel.getStatTypes(aiTable)
|
8681
|
+
}
|
8682
|
+
});
|
8683
|
+
ref.componentInstance.menuClick.subscribe((event) => {
|
8684
|
+
this.isActive.set(false);
|
8685
|
+
actions.setField({
|
8686
|
+
...event.field,
|
8687
|
+
stat_type: event.menu.type
|
8688
|
+
});
|
8689
|
+
});
|
8690
|
+
ref.afterClosed().subscribe(() => {
|
8691
|
+
this.isActive.set(false);
|
8692
|
+
this.hover.emit(false);
|
8693
|
+
});
|
8694
|
+
}
|
8695
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AITableFieldStat, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
8696
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.10", type: AITableFieldStat, isStandalone: true, selector: "ai-table-field-stat", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { hover: "hover" }, ngImport: i0, template: `
|
8697
|
+
<ko-group [config]="groupConfig()">
|
8698
|
+
<ai-table-background
|
8699
|
+
[config]="bgConfig()"
|
8700
|
+
(koClick)="clickStat($event)"
|
8701
|
+
[isActive]="isActive()"
|
8702
|
+
(hover)="onHoverChange($event)"
|
8703
|
+
></ai-table-background>
|
8704
|
+
|
8705
|
+
@if (textConfig()) {
|
8706
|
+
<ko-group>
|
8707
|
+
<ai-table-text [config]="textConfig()!"></ai-table-text>
|
8708
|
+
<ai-table-icon [config]="iconConfig()"></ai-table-icon>
|
8709
|
+
</ko-group>
|
8710
|
+
}
|
8711
|
+
</ko-group>
|
8712
|
+
`, isInline: true, dependencies: [{ kind: "component", type: KoContainer, selector: "ko-layer, ko-fastlayer, ko-group" }, { kind: "component", type: AITableTextComponent, selector: "ai-table-text", inputs: ["config"], outputs: ["koClick", "koMouseMove"] }, { kind: "component", type: AITableIcon, selector: "ai-table-icon", inputs: ["config"] }, { kind: "component", type: AITableBackground, selector: "ai-table-background", inputs: ["config", "isActive", "isHover"], outputs: ["koClick", "hover", "koMouseenter", "koMouseleave", "isHoverChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
8026
8713
|
}
|
8027
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type:
|
8714
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AITableFieldStat, decorators: [{
|
8028
8715
|
type: Component,
|
8029
8716
|
args: [{
|
8030
|
-
selector: 'ai-table-
|
8717
|
+
selector: 'ai-table-field-stat',
|
8031
8718
|
template: `
|
8032
|
-
|
8033
|
-
<
|
8034
|
-
|
8719
|
+
<ko-group [config]="groupConfig()">
|
8720
|
+
<ai-table-background
|
8721
|
+
[config]="bgConfig()"
|
8722
|
+
(koClick)="clickStat($event)"
|
8723
|
+
[isActive]="isActive()"
|
8724
|
+
(hover)="onHoverChange($event)"
|
8725
|
+
></ai-table-background>
|
8726
|
+
|
8727
|
+
@if (textConfig()) {
|
8728
|
+
<ko-group>
|
8729
|
+
<ai-table-text [config]="textConfig()!"></ai-table-text>
|
8730
|
+
<ai-table-icon [config]="iconConfig()"></ai-table-icon>
|
8731
|
+
</ko-group>
|
8732
|
+
}
|
8733
|
+
</ko-group>
|
8035
8734
|
`,
|
8036
|
-
imports: [
|
8735
|
+
imports: [KoContainer, AITableTextComponent, AITableIcon, AITableBackground],
|
8037
8736
|
changeDetection: ChangeDetectionStrategy.OnPush
|
8038
8737
|
}]
|
8039
8738
|
}] });
|
8040
8739
|
|
8041
|
-
class
|
8740
|
+
class AITableFieldStats {
|
8042
8741
|
constructor() {
|
8043
8742
|
this.config = input.required();
|
8044
|
-
this.
|
8045
|
-
this.
|
8046
|
-
this.
|
8047
|
-
return {
|
8048
|
-
x: this.coverCellConfig()?.x,
|
8049
|
-
y: this.coverCellConfig()?.y,
|
8050
|
-
listening: true
|
8051
|
-
};
|
8052
|
-
});
|
8053
|
-
this.coverCellConfig = computed(() => {
|
8054
|
-
const { aiTable, coordinate, references, readonly, actions } = this.config();
|
8055
|
-
const coverCell = this.coverCell();
|
8056
|
-
if (!coverCell) {
|
8057
|
-
return;
|
8058
|
-
}
|
8059
|
-
const { field, recordId, isExpand } = coverCell;
|
8060
|
-
const cellValue = AITableQueries.getFieldValue(aiTable, [recordId, field._id]);
|
8061
|
-
const fieldModel = FieldModelMap[field.type];
|
8062
|
-
const transformValue = fieldModel.transformCellValue(cellValue, { aiTable, field });
|
8063
|
-
const { rowHeight, columnCount, rowCount } = coordinate;
|
8064
|
-
const columnIndex = aiTable.context?.visibleColumnsIndexMap().get(field._id) ?? 0;
|
8065
|
-
const rowIndex = aiTable.context?.visibleRowsIndexMap().get(recordId) ?? 0;
|
8066
|
-
const x = coordinate.getColumnOffset(columnIndex) + AI_TABLE_OFFSET;
|
8067
|
-
const columnWidth = coordinate.getColumnWidth(columnIndex);
|
8068
|
-
const y = coordinate.getRowOffset(rowIndex) + AI_TABLE_OFFSET;
|
8069
|
-
const { width } = getCellHorizontalPosition({
|
8070
|
-
columnWidth,
|
8071
|
-
columnIndex,
|
8072
|
-
columnCount
|
8073
|
-
});
|
8074
|
-
const style = {
|
8075
|
-
textAlign: DEFAULT_TEXT_ALIGN_LEFT
|
8076
|
-
};
|
8077
|
-
const textAlign = style.textAlign;
|
8078
|
-
const renderX = textAlign === DEFAULT_TEXT_ALIGN_RIGHT
|
8079
|
-
? columnWidth - AI_TABLE_CELL_PADDING + AI_TABLE_OFFSET
|
8080
|
-
: AI_TABLE_CELL_PADDING + AI_TABLE_OFFSET;
|
8081
|
-
const renderY = 0 - AI_TABLE_OFFSET * 2;
|
8082
|
-
const result = {
|
8083
|
-
field,
|
8084
|
-
recordId,
|
8085
|
-
aiTable,
|
8086
|
-
coordinate,
|
8087
|
-
x,
|
8088
|
-
y,
|
8089
|
-
readonly,
|
8090
|
-
actions,
|
8091
|
-
isExpand,
|
8092
|
-
render: {
|
8093
|
-
aiTable,
|
8094
|
-
recordId,
|
8095
|
-
field,
|
8096
|
-
isActive: isSelectedField(field._id, aiTable),
|
8097
|
-
x: renderX,
|
8098
|
-
y: renderY,
|
8099
|
-
columnWidth: width,
|
8100
|
-
rowHeight,
|
8101
|
-
cellValue,
|
8102
|
-
transformValue,
|
8103
|
-
style,
|
8104
|
-
references
|
8105
|
-
}
|
8106
|
-
};
|
8107
|
-
return result;
|
8108
|
-
});
|
8109
|
-
this.coverCell = computed(() => getCoverCell(this.config().aiTable));
|
8743
|
+
this.hover = output();
|
8744
|
+
this.isHover = signal(false);
|
8745
|
+
this.statConfigs = computed(() => createFieldStats(this.config()));
|
8110
8746
|
}
|
8111
|
-
|
8112
|
-
|
8113
|
-
|
8114
|
-
|
8115
|
-
|
8116
|
-
|
8117
|
-
|
8118
|
-
|
8119
|
-
|
8120
|
-
|
8121
|
-
|
8122
|
-
|
8123
|
-
|
8124
|
-
`, isInline: true, dependencies: [{ kind: "component", type:
|
8747
|
+
onMouseenter(e) {
|
8748
|
+
this.isHover.set(true);
|
8749
|
+
}
|
8750
|
+
onMouseleave(e) {
|
8751
|
+
this.isHover.set(false);
|
8752
|
+
}
|
8753
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AITableFieldStats, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
8754
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.10", type: AITableFieldStats, isStandalone: true, selector: "ai-table-column-stats", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { hover: "hover" }, ngImport: i0, template: `
|
8755
|
+
<ko-group>
|
8756
|
+
@for (config of statConfigs(); track $index) {
|
8757
|
+
<ai-table-field-stat [config]="config" (hover)="hover.emit($event)"></ai-table-field-stat>
|
8758
|
+
}
|
8759
|
+
</ko-group>
|
8760
|
+
`, isInline: true, dependencies: [{ kind: "component", type: AITableFieldStat, selector: "ai-table-field-stat", inputs: ["config"], outputs: ["hover"] }, { kind: "component", type: KoContainer, selector: "ko-layer, ko-fastlayer, ko-group" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
8125
8761
|
}
|
8126
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type:
|
8762
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AITableFieldStats, decorators: [{
|
8127
8763
|
type: Component,
|
8128
8764
|
args: [{
|
8129
|
-
selector: 'ai-table-
|
8765
|
+
selector: 'ai-table-column-stats',
|
8130
8766
|
template: `
|
8131
|
-
|
8132
|
-
|
8133
|
-
<
|
8134
|
-
|
8135
|
-
|
8136
|
-
inputs: { config: coverCellConfig(), onlyDisplayBorder: onlyDisplayBorder() }
|
8137
|
-
"
|
8138
|
-
>
|
8139
|
-
</ng-container>
|
8140
|
-
</ko-group>
|
8141
|
-
}
|
8767
|
+
<ko-group>
|
8768
|
+
@for (config of statConfigs(); track $index) {
|
8769
|
+
<ai-table-field-stat [config]="config" (hover)="hover.emit($event)"></ai-table-field-stat>
|
8770
|
+
}
|
8771
|
+
</ko-group>
|
8142
8772
|
`,
|
8143
|
-
imports: [
|
8773
|
+
imports: [AITableFieldStat, KoContainer],
|
8144
8774
|
changeDetection: ChangeDetectionStrategy.OnPush
|
8145
8775
|
}]
|
8146
8776
|
}] });
|
@@ -8157,6 +8787,7 @@ class AITableRenderer {
|
|
8157
8787
|
this.koClick = output();
|
8158
8788
|
this.koDblclick = output();
|
8159
8789
|
this.koMouseleave = output();
|
8790
|
+
this.isHoverStatContainer = signal(false);
|
8160
8791
|
this.fields = computed(() => {
|
8161
8792
|
return AITable.getVisibleFields(this.config().aiTable);
|
8162
8793
|
});
|
@@ -8175,6 +8806,9 @@ class AITableRenderer {
|
|
8175
8806
|
this.containerHeight = computed(() => {
|
8176
8807
|
return this.config().containerHeight;
|
8177
8808
|
});
|
8809
|
+
this.gridContainerHeight = computed(() => {
|
8810
|
+
return this.containerHeight() - AI_TABLE_FIELD_STAT_CONTAINER_HEIGHT;
|
8811
|
+
});
|
8178
8812
|
this.scrollState = computed(() => {
|
8179
8813
|
return this.config()?.aiTable.context.scrollState();
|
8180
8814
|
});
|
@@ -8206,7 +8840,15 @@ class AITableRenderer {
|
|
8206
8840
|
clipX: 0,
|
8207
8841
|
clipY: 0,
|
8208
8842
|
clipWidth: this.containerWidth(),
|
8209
|
-
clipHeight: this.
|
8843
|
+
clipHeight: this.gridContainerHeight()
|
8844
|
+
};
|
8845
|
+
});
|
8846
|
+
this.statGroupConfig = computed(() => {
|
8847
|
+
return {
|
8848
|
+
x: 0,
|
8849
|
+
y: this.containerHeight() - AI_TABLE_FIELD_STAT_CONTAINER_HEIGHT - AI_TABLE_CELL_LINE_BORDER,
|
8850
|
+
width: this.containerWidth(),
|
8851
|
+
height: AI_TABLE_FIELD_STAT_CONTAINER_HEIGHT
|
8210
8852
|
};
|
8211
8853
|
});
|
8212
8854
|
this.commonGroupConfig = computed(() => {
|
@@ -8214,7 +8856,7 @@ class AITableRenderer {
|
|
8214
8856
|
clipX: this.frozenAreaWidth() + 1,
|
8215
8857
|
clipY: 0,
|
8216
8858
|
clipWidth: this.cellGroupClipWidth(),
|
8217
|
-
clipHeight: this.
|
8859
|
+
clipHeight: this.gridContainerHeight()
|
8218
8860
|
};
|
8219
8861
|
});
|
8220
8862
|
this.attachGroupConfig = computed(() => {
|
@@ -8222,15 +8864,15 @@ class AITableRenderer {
|
|
8222
8864
|
clipX: this.frozenAreaWidth() - 1,
|
8223
8865
|
clipY: this.coordinate().rowInitSize - 1,
|
8224
8866
|
clipWidth: this.containerWidth() - this.frozenAreaWidth(),
|
8225
|
-
clipHeight: this.
|
8867
|
+
clipHeight: this.gridContainerHeight() - this.coordinate().rowInitSize
|
8226
8868
|
};
|
8227
8869
|
});
|
8228
8870
|
this.frozenAttachGroupConfig = computed(() => {
|
8229
8871
|
return {
|
8230
8872
|
clipX: 0,
|
8231
8873
|
clipY: this.coordinate().rowInitSize - 1,
|
8232
|
-
clipWidth: this.frozenAreaWidth(),
|
8233
|
-
clipHeight: this.
|
8874
|
+
clipWidth: this.frozenAreaWidth() + 10,
|
8875
|
+
clipHeight: this.gridContainerHeight() - this.coordinate().rowInitSize
|
8234
8876
|
};
|
8235
8877
|
});
|
8236
8878
|
this.frozenCoverAttachGroupConfig = computed(() => {
|
@@ -8238,7 +8880,7 @@ class AITableRenderer {
|
|
8238
8880
|
clipX: 0,
|
8239
8881
|
clipY: this.coordinate().rowInitSize + 1,
|
8240
8882
|
clipWidth: this.frozenAreaWidth(),
|
8241
|
-
clipHeight: this.
|
8883
|
+
clipHeight: this.gridContainerHeight() - this.coordinate().rowInitSize
|
8242
8884
|
};
|
8243
8885
|
});
|
8244
8886
|
this.offsetYConfig = computed(() => {
|
@@ -8260,13 +8902,31 @@ class AITableRenderer {
|
|
8260
8902
|
offsetY: scrollTop
|
8261
8903
|
};
|
8262
8904
|
});
|
8263
|
-
this.
|
8905
|
+
this.columnFrozenHeadFieldConfig = computed(() => {
|
8906
|
+
const { columnStartIndex, columnStopIndex } = this.visibleRangeInfo();
|
8907
|
+
const { aiTable, coordinate, readonly, maxFields, actions } = this.config();
|
8908
|
+
const { pointPosition } = aiTable.context;
|
8909
|
+
const fields = this.fields();
|
8910
|
+
return {
|
8911
|
+
aiTable,
|
8912
|
+
actions,
|
8913
|
+
coordinate,
|
8914
|
+
fields,
|
8915
|
+
columnStartIndex,
|
8916
|
+
columnStopIndex,
|
8917
|
+
pointPosition: pointPosition(),
|
8918
|
+
readonly,
|
8919
|
+
maxFields
|
8920
|
+
};
|
8921
|
+
});
|
8922
|
+
this.columnHeadFieldConfig = computed(() => {
|
8264
8923
|
const { columnStartIndex, columnStopIndex } = this.visibleRangeInfo();
|
8265
|
-
const { aiTable, coordinate, readonly, maxFields } = this.config();
|
8924
|
+
const { aiTable, coordinate, readonly, maxFields, actions } = this.config();
|
8266
8925
|
const { pointPosition } = aiTable.context;
|
8267
8926
|
const fields = this.fields();
|
8268
8927
|
return {
|
8269
8928
|
aiTable,
|
8929
|
+
actions,
|
8270
8930
|
coordinate,
|
8271
8931
|
fields,
|
8272
8932
|
columnStartIndex,
|
@@ -8276,6 +8936,43 @@ class AITableRenderer {
|
|
8276
8936
|
maxFields
|
8277
8937
|
};
|
8278
8938
|
});
|
8939
|
+
this.columnFieldStatsConfig = computed(() => {
|
8940
|
+
return {
|
8941
|
+
...this.columnHeadFieldConfig(),
|
8942
|
+
width: this.cellGroupClipWidth(),
|
8943
|
+
x: this.frozenAreaWidth(),
|
8944
|
+
y: AI_TABLE_CELL_LINE_BORDER,
|
8945
|
+
height: AI_TABLE_FIELD_STAT_HEIGHT,
|
8946
|
+
isHoverStatContainer: this.isHoverStatContainer()
|
8947
|
+
};
|
8948
|
+
});
|
8949
|
+
this.columnFieldStatsBgConfig = computed(() => {
|
8950
|
+
return {
|
8951
|
+
x: 0,
|
8952
|
+
y: 0,
|
8953
|
+
width: this.containerWidth(),
|
8954
|
+
height: AI_TABLE_FIELD_STAT_HEIGHT + AI_TABLE_CELL_LINE_BORDER * 2,
|
8955
|
+
fill: Colors.white,
|
8956
|
+
stroke: Colors.gray200,
|
8957
|
+
strokeWidth: AI_TABLE_CELL_LINE_BORDER,
|
8958
|
+
opacity: 1,
|
8959
|
+
borders: [true, false, true, false],
|
8960
|
+
listening: true,
|
8961
|
+
coordinate: this.coordinate()
|
8962
|
+
};
|
8963
|
+
});
|
8964
|
+
this.columnFrozenFieldStatsConfig = computed(() => {
|
8965
|
+
return {
|
8966
|
+
...this.columnHeadFieldConfig(),
|
8967
|
+
width: this.frozenAreaWidth(),
|
8968
|
+
x: 0,
|
8969
|
+
y: AI_TABLE_CELL_LINE_BORDER,
|
8970
|
+
columnStartIndex: 0,
|
8971
|
+
columnStopIndex: this.coordinate().frozenColumnCount - 1,
|
8972
|
+
height: AI_TABLE_FIELD_STAT_HEIGHT,
|
8973
|
+
isHoverStatContainer: this.isHoverStatContainer()
|
8974
|
+
};
|
8975
|
+
});
|
8279
8976
|
this.cellsConfig = computed(() => {
|
8280
8977
|
const { aiTable, readonly, coordinate, references, actions, maxRecords } = this.config();
|
8281
8978
|
const { rowStartIndex, rowStopIndex, columnStartIndex, columnStopIndex } = this.visibleRangeInfo();
|
@@ -8292,6 +8989,23 @@ class AITableRenderer {
|
|
8292
8989
|
maxRecords
|
8293
8990
|
};
|
8294
8991
|
});
|
8992
|
+
this.fillHandleConfig = computed(() => {
|
8993
|
+
return {
|
8994
|
+
aiTable: this.config().aiTable,
|
8995
|
+
coordinate: this.coordinate(),
|
8996
|
+
readonly: this.readonly()
|
8997
|
+
};
|
8998
|
+
});
|
8999
|
+
this.isLastSelectedCellInFrozenColumn = computed(() => {
|
9000
|
+
const { aiTable } = this.config();
|
9001
|
+
const selectedCells = Array.from(aiTable.selection().selectedCells);
|
9002
|
+
if (selectedCells.length === 0)
|
9003
|
+
return false;
|
9004
|
+
const lastCell = selectedCells[selectedCells.length - 1];
|
9005
|
+
const [, fieldId] = lastCell.split(':');
|
9006
|
+
const columnIndex = aiTable.context.visibleColumnsIndexMap().get(fieldId);
|
9007
|
+
return AITable.isFrozenColumn(aiTable, columnIndex);
|
9008
|
+
});
|
8295
9009
|
this.activeCellBorderConfig = computed(() => {
|
8296
9010
|
return createActiveCellBorder(this.cellsConfig());
|
8297
9011
|
});
|
@@ -8337,8 +9051,11 @@ class AITableRenderer {
|
|
8337
9051
|
stageMouseleave(e) {
|
8338
9052
|
this.koMouseleave.emit(e);
|
8339
9053
|
}
|
9054
|
+
onStatContainerHover(isHover) {
|
9055
|
+
this.isHoverStatContainer.set(isHover);
|
9056
|
+
}
|
8340
9057
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AITableRenderer, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
8341
|
-
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]=\"
|
9058
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.10", type: AITableRenderer, isStandalone: true, selector: "ai-table-renderer", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { koMousemove: "koMousemove", koMousedown: "koMousedown", koMouseup: "koMouseup", koContextmenu: "koContextmenu", koWheel: "koWheel", koClick: "koClick", koDblclick: "koDblclick", koMouseleave: "koMouseleave" }, ngImport: i0, template: "<ko-stage\n [config]=\"stageConfig()\"\n (koMousemove)=\"stageMousemove($event)\"\n (koMousedown)=\"stageMousedown($event)\"\n (koMouseup)=\"stageMouseup($event)\"\n (koContextmenu)=\"stageContextmenu($event)\"\n (koClick)=\"stageClick($event)\"\n (koDblclick)=\"stageDblclick($event)\"\n (koMouseleave)=\"stageMouseleave($event)\"\n>\n <ko-layer>\n <ko-group [config]=\"gridGroupConfig()\">\n <ko-group [config]=\"offsetYConfig()\">\n <ai-table-frozen-cells [config]=\"cellsConfig()\"></ai-table-frozen-cells>\n <ai-table-other-rows [config]=\"cellsConfig()\"></ai-table-other-rows>\n @if (!hiddenIndexColumn()) {\n <ai-table-hover-row-heads [config]=\"cellsConfig()\"></ai-table-hover-row-heads>\n }\n <ai-table-frozen-placeholder-cells [config]=\"cellsConfig()\"></ai-table-frozen-placeholder-cells>\n </ko-group>\n\n <ko-group>\n <ai-table-frozen-column-heads [config]=\"columnFrozenHeadFieldConfig()\"></ai-table-frozen-column-heads>\n </ko-group>\n\n <ko-group [config]=\"commonGroupConfig()\">\n <ko-group [config]=\"offsetConfig()\">\n <ai-table-cells [config]=\"cellsConfig()\"></ai-table-cells>\n <ai-table-placeholder-cells [config]=\"cellsConfig()\"></ai-table-placeholder-cells>\n <ai-table-cover-cell [config]=\"cellsConfig()\"></ai-table-cover-cell>\n </ko-group>\n\n <ko-group [config]=\"offsetXConfig()\">\n <ai-table-column-heads [config]=\"columnHeadFieldConfig()\"></ai-table-column-heads>\n <ai-table-add-field [config]=\"columnHeadFieldConfig()\"></ai-table-add-field>\n </ko-group>\n </ko-group>\n\n <ko-group [config]=\"attachGroupConfig()\">\n <ko-group [config]=\"offsetConfig()\">\n @if (activeCellBorderConfig().activeCellBorder) {\n <ko-rect [config]=\"activeCellBorderConfig().activeCellBorder!\"></ko-rect>\n }\n @if (showExpandCellBorder().expandCellBorder) {\n <ai-table-cover-cell [config]=\"cellsConfig()\" [onlyDisplayBorder]=\"true\"></ai-table-cover-cell>\n }\n @if (!isLastSelectedCellInFrozenColumn()) {\n <ai-table-fill-handle [config]=\"fillHandleConfig()\"></ai-table-fill-handle>\n }\n </ko-group>\n </ko-group>\n\n <ko-group [config]=\"frozenCoverAttachGroupConfig()\">\n <ko-group [config]=\"offsetYConfig()\">\n <ai-table-cover-cell [config]=\"cellsConfig()\"></ai-table-cover-cell>\n </ko-group>\n </ko-group>\n\n <ko-group [config]=\"frozenAttachGroupConfig()\">\n <ko-group [config]=\"offsetYConfig()\">\n @if (activeCellBorderConfig().frozenActiveCellBorder) {\n <ko-rect [config]=\"activeCellBorderConfig().frozenActiveCellBorder!\"></ko-rect>\n }\n @if (showExpandCellBorder().frozenExpandCellBorder) {\n <ai-table-cover-cell [config]=\"cellsConfig()\" [onlyDisplayBorder]=\"true\"></ai-table-cover-cell>\n }\n @if (isLastSelectedCellInFrozenColumn()) {\n <ai-table-fill-handle [config]=\"fillHandleConfig()\"></ai-table-fill-handle>\n }\n </ko-group>\n </ko-group>\n </ko-group>\n\n <ko-group [config]=\"statGroupConfig()\">\n <ai-table-background [config]=\"columnFieldStatsBgConfig()\"></ai-table-background>\n <ko-group>\n <ai-table-column-stats\n [config]=\"columnFrozenFieldStatsConfig()\"\n (hover)=\"onStatContainerHover($event)\"\n ></ai-table-column-stats>\n </ko-group>\n <ko-group [config]=\"commonGroupConfig()\">\n <ko-group [config]=\"offsetXConfig()\">\n <ai-table-column-stats\n [config]=\"columnFieldStatsConfig()\"\n (hover)=\"onStatContainerHover($event)\"\n ></ai-table-column-stats>\n </ko-group>\n </ko-group>\n </ko-group>\n </ko-layer>\n</ko-stage>\n\n<ng-content></ng-content>\n", dependencies: [{ kind: "component", type: KoContainer, selector: "ko-layer, ko-fastlayer, ko-group" }, { kind: "component", type: KoStage, selector: "ko-stage", inputs: ["config"], outputs: ["koMouseover", "koMousemove", "koMouseout", "koMouseenter", "koMouseleave", "koMousedown", "koMouseup", "koWheel", "koContextmenu", "koClick", "koDblclick", "koTouchstart", "koTouchmove", "koTouchend", "koTap", "koDbltap", "koDragstart", "koDragmove", "koDragend"] }, { kind: "component", type: KoShape, selector: "ko-shape, ko-circle, ko-label, ko-rect, ko-ellipse, ko-wedge, ko-line, ko-sprite, ko-image, ko-text, ko-text-path, ko-star, ko-ring, ko-arc, ko-tag, ko-path, ko-regular-polygon, ko-arrow, ko-transformer", inputs: ["config"], outputs: ["koMouseover", "koMousemove", "koMouseout", "koMouseenter", "koMouseleave", "koMousedown", "koMouseup", "koWheel", "koContextmenu", "koClick", "koDblclick", "koTouchstart", "koTouchmove", "koTouchend", "koTap", "koDbltap", "koDragstart", "koDragmove", "koDragend"] }, { kind: "component", type: AITableColumnHeads, selector: "ai-table-column-heads", inputs: ["config"] }, { kind: "component", type: AITableFrozenColumnHeads, selector: "ai-table-frozen-column-heads", inputs: ["config"] }, { kind: "component", type: AITableCells, selector: "ai-table-cells", inputs: ["config"] }, { kind: "component", type: AITableFrozenCells, selector: "ai-table-frozen-cells", inputs: ["config"] }, { kind: "component", type: AITableFrozenPlaceholderCells, selector: "ai-table-frozen-placeholder-cells", inputs: ["config"] }, { kind: "component", type: AITableCoverCells, selector: "ai-table-cover-cell", inputs: ["config", "onlyDisplayBorder"] }, { kind: "component", type: AITablePlaceholderCells, selector: "ai-table-placeholder-cells", inputs: ["config"] }, { kind: "component", type: AITableAddField, selector: "ai-table-add-field", inputs: ["config"] }, { kind: "component", type: AITableHoverRowHeads, selector: "ai-table-hover-row-heads", inputs: ["config"] }, { kind: "component", type: AITableOtherRows, selector: "ai-table-other-rows", inputs: ["config"] }, { kind: "component", type: AITableFillHandle, selector: "ai-table-fill-handle", inputs: ["config"] }, { kind: "component", type: AITableFieldStats, selector: "ai-table-column-stats", inputs: ["config"], outputs: ["hover"] }, { kind: "component", type: AITableBackground, selector: "ai-table-background", inputs: ["config", "isActive", "isHover"], outputs: ["koClick", "hover", "koMouseenter", "koMouseleave", "isHoverChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
8342
9059
|
}
|
8343
9060
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AITableRenderer, decorators: [{
|
8344
9061
|
type: Component,
|
@@ -8355,8 +9072,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImpo
|
|
8355
9072
|
AITablePlaceholderCells,
|
8356
9073
|
AITableAddField,
|
8357
9074
|
AITableHoverRowHeads,
|
8358
|
-
AITableOtherRows
|
8359
|
-
|
9075
|
+
AITableOtherRows,
|
9076
|
+
AITableFillHandle,
|
9077
|
+
AITableFieldStats,
|
9078
|
+
AITableBackground
|
9079
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<ko-stage\n [config]=\"stageConfig()\"\n (koMousemove)=\"stageMousemove($event)\"\n (koMousedown)=\"stageMousedown($event)\"\n (koMouseup)=\"stageMouseup($event)\"\n (koContextmenu)=\"stageContextmenu($event)\"\n (koClick)=\"stageClick($event)\"\n (koDblclick)=\"stageDblclick($event)\"\n (koMouseleave)=\"stageMouseleave($event)\"\n>\n <ko-layer>\n <ko-group [config]=\"gridGroupConfig()\">\n <ko-group [config]=\"offsetYConfig()\">\n <ai-table-frozen-cells [config]=\"cellsConfig()\"></ai-table-frozen-cells>\n <ai-table-other-rows [config]=\"cellsConfig()\"></ai-table-other-rows>\n @if (!hiddenIndexColumn()) {\n <ai-table-hover-row-heads [config]=\"cellsConfig()\"></ai-table-hover-row-heads>\n }\n <ai-table-frozen-placeholder-cells [config]=\"cellsConfig()\"></ai-table-frozen-placeholder-cells>\n </ko-group>\n\n <ko-group>\n <ai-table-frozen-column-heads [config]=\"columnFrozenHeadFieldConfig()\"></ai-table-frozen-column-heads>\n </ko-group>\n\n <ko-group [config]=\"commonGroupConfig()\">\n <ko-group [config]=\"offsetConfig()\">\n <ai-table-cells [config]=\"cellsConfig()\"></ai-table-cells>\n <ai-table-placeholder-cells [config]=\"cellsConfig()\"></ai-table-placeholder-cells>\n <ai-table-cover-cell [config]=\"cellsConfig()\"></ai-table-cover-cell>\n </ko-group>\n\n <ko-group [config]=\"offsetXConfig()\">\n <ai-table-column-heads [config]=\"columnHeadFieldConfig()\"></ai-table-column-heads>\n <ai-table-add-field [config]=\"columnHeadFieldConfig()\"></ai-table-add-field>\n </ko-group>\n </ko-group>\n\n <ko-group [config]=\"attachGroupConfig()\">\n <ko-group [config]=\"offsetConfig()\">\n @if (activeCellBorderConfig().activeCellBorder) {\n <ko-rect [config]=\"activeCellBorderConfig().activeCellBorder!\"></ko-rect>\n }\n @if (showExpandCellBorder().expandCellBorder) {\n <ai-table-cover-cell [config]=\"cellsConfig()\" [onlyDisplayBorder]=\"true\"></ai-table-cover-cell>\n }\n @if (!isLastSelectedCellInFrozenColumn()) {\n <ai-table-fill-handle [config]=\"fillHandleConfig()\"></ai-table-fill-handle>\n }\n </ko-group>\n </ko-group>\n\n <ko-group [config]=\"frozenCoverAttachGroupConfig()\">\n <ko-group [config]=\"offsetYConfig()\">\n <ai-table-cover-cell [config]=\"cellsConfig()\"></ai-table-cover-cell>\n </ko-group>\n </ko-group>\n\n <ko-group [config]=\"frozenAttachGroupConfig()\">\n <ko-group [config]=\"offsetYConfig()\">\n @if (activeCellBorderConfig().frozenActiveCellBorder) {\n <ko-rect [config]=\"activeCellBorderConfig().frozenActiveCellBorder!\"></ko-rect>\n }\n @if (showExpandCellBorder().frozenExpandCellBorder) {\n <ai-table-cover-cell [config]=\"cellsConfig()\" [onlyDisplayBorder]=\"true\"></ai-table-cover-cell>\n }\n @if (isLastSelectedCellInFrozenColumn()) {\n <ai-table-fill-handle [config]=\"fillHandleConfig()\"></ai-table-fill-handle>\n }\n </ko-group>\n </ko-group>\n </ko-group>\n\n <ko-group [config]=\"statGroupConfig()\">\n <ai-table-background [config]=\"columnFieldStatsBgConfig()\"></ai-table-background>\n <ko-group>\n <ai-table-column-stats\n [config]=\"columnFrozenFieldStatsConfig()\"\n (hover)=\"onStatContainerHover($event)\"\n ></ai-table-column-stats>\n </ko-group>\n <ko-group [config]=\"commonGroupConfig()\">\n <ko-group [config]=\"offsetXConfig()\">\n <ai-table-column-stats\n [config]=\"columnFieldStatsConfig()\"\n (hover)=\"onStatContainerHover($event)\"\n ></ai-table-column-stats>\n </ko-group>\n </ko-group>\n </ko-group>\n </ko-layer>\n</ko-stage>\n\n<ng-content></ng-content>\n" }]
|
8360
9080
|
}] });
|
8361
9081
|
|
8362
9082
|
class AITableCellRate extends CoverCellComponent {
|
@@ -8889,6 +9609,162 @@ function aiTableRectConfigToKonvaConfig(rectConfig, options) {
|
|
8889
9609
|
return result;
|
8890
9610
|
}
|
8891
9611
|
|
9612
|
+
function getDateFieldValues(records, options, filterNull = false) {
|
9613
|
+
const { aiTable, field } = options;
|
9614
|
+
const result = ___default.map(records, (record) => {
|
9615
|
+
const cellValue = AITableQueries.getFieldValue(aiTable, [record._id, field._id]);
|
9616
|
+
return cellValue;
|
9617
|
+
});
|
9618
|
+
if (filterNull) {
|
9619
|
+
return result.filter((value) => value !== null);
|
9620
|
+
}
|
9621
|
+
return result;
|
9622
|
+
}
|
9623
|
+
function statEarliestTime(records, options) {
|
9624
|
+
const values = getDateFieldValues(records, options, true);
|
9625
|
+
const result = ___default.minBy(values, (value) => {
|
9626
|
+
return value.timestamp;
|
9627
|
+
});
|
9628
|
+
return transformToCellText(result, options);
|
9629
|
+
}
|
9630
|
+
function statLatestTime(records, options) {
|
9631
|
+
const { field } = options;
|
9632
|
+
const values = getDateFieldValues(records, options, true);
|
9633
|
+
const result = ___default.maxBy(values, (value) => {
|
9634
|
+
return value.timestamp;
|
9635
|
+
});
|
9636
|
+
return transformToCellText(result, options);
|
9637
|
+
}
|
9638
|
+
function statDateRangeOfDays(records, options) {
|
9639
|
+
const { field } = options;
|
9640
|
+
const values = getDateFieldValues(records, options, true);
|
9641
|
+
const start = ___default.minBy(values, (value) => {
|
9642
|
+
return value.timestamp;
|
9643
|
+
});
|
9644
|
+
const end = ___default.maxBy(values, (value) => {
|
9645
|
+
return value.timestamp;
|
9646
|
+
});
|
9647
|
+
if (start && end) {
|
9648
|
+
const days = differenceInDays(fromUnixTime(end.timestamp), fromUnixTime(start.timestamp));
|
9649
|
+
return days;
|
9650
|
+
}
|
9651
|
+
return 0;
|
9652
|
+
}
|
9653
|
+
function statDateRangeOfMonths(records, options) {
|
9654
|
+
const values = getDateFieldValues(records, options, true);
|
9655
|
+
const start = ___default.minBy(values, (value) => {
|
9656
|
+
return value.timestamp;
|
9657
|
+
});
|
9658
|
+
const end = ___default.maxBy(values, (value) => {
|
9659
|
+
return value.timestamp;
|
9660
|
+
});
|
9661
|
+
if (start && end) {
|
9662
|
+
const months = differenceInMonths(fromUnixTime(end.timestamp), fromUnixTime(start.timestamp));
|
9663
|
+
return months;
|
9664
|
+
}
|
9665
|
+
return 0;
|
9666
|
+
}
|
9667
|
+
|
9668
|
+
function getFillDirection(aiTable, sourceCells, mouseUpRecordId) {
|
9669
|
+
const { startCell: sourceStartCell, endCell: sourceEndCell } = getStartAndEndCell(sourceCells);
|
9670
|
+
const currentRowIndex = aiTable.context.visibleRowsIndexMap().get(mouseUpRecordId);
|
9671
|
+
const sourceStartRowIndex = aiTable.context.visibleRowsIndexMap().get(sourceStartCell[0]);
|
9672
|
+
const sourceEndRowIndex = aiTable.context.visibleRowsIndexMap().get(sourceEndCell[0]);
|
9673
|
+
if (currentRowIndex < sourceStartRowIndex) {
|
9674
|
+
return 'upward';
|
9675
|
+
}
|
9676
|
+
else if (currentRowIndex > sourceEndRowIndex) {
|
9677
|
+
return 'downward';
|
9678
|
+
}
|
9679
|
+
else {
|
9680
|
+
return undefined;
|
9681
|
+
}
|
9682
|
+
}
|
9683
|
+
function dragFillHighlightArea(aiTable, sourceCells, currentRecordId) {
|
9684
|
+
const { startCell: sourceStartCell, endCell: sourceEndCell } = getStartAndEndCell(sourceCells);
|
9685
|
+
const direction = getFillDirection(aiTable, sourceCells, currentRecordId);
|
9686
|
+
const sourceStartCellFieldId = sourceStartCell[1];
|
9687
|
+
const sourceEndCellFieldId = sourceEndCell[1];
|
9688
|
+
let highlightStartCell;
|
9689
|
+
let highlightEndCell;
|
9690
|
+
if (direction === 'downward') {
|
9691
|
+
highlightStartCell = sourceStartCell;
|
9692
|
+
highlightEndCell = [currentRecordId, sourceEndCellFieldId];
|
9693
|
+
}
|
9694
|
+
else if (direction === 'upward') {
|
9695
|
+
highlightStartCell = [currentRecordId, sourceStartCellFieldId];
|
9696
|
+
highlightEndCell = sourceEndCell;
|
9697
|
+
}
|
9698
|
+
else {
|
9699
|
+
highlightStartCell = sourceStartCell;
|
9700
|
+
highlightEndCell = sourceEndCell;
|
9701
|
+
}
|
9702
|
+
return { highlightStartCell, highlightEndCell };
|
9703
|
+
}
|
9704
|
+
function performFill(aiTable, sourceCells, mouseUpRecordId, actions) {
|
9705
|
+
const selectedCells = Array.from(aiTable.selection().selectedCells);
|
9706
|
+
if (sourceCells.size === 0 || selectedCells.length === 0) {
|
9707
|
+
return;
|
9708
|
+
}
|
9709
|
+
const { startCell: sourceStartCell, endCell: sourceEndCell } = getStartAndEndCell(sourceCells);
|
9710
|
+
const visibleRowsIndexMap = aiTable.context.visibleRowsIndexMap();
|
9711
|
+
const sourceStartRowIndex = visibleRowsIndexMap.get(sourceStartCell[0]);
|
9712
|
+
const sourceEndRowIndex = visibleRowsIndexMap.get(sourceEndCell[0]);
|
9713
|
+
const selectedEndCell = selectedCells[selectedCells.length - 1].split(':');
|
9714
|
+
const selectedEndRowIndex = visibleRowsIndexMap.get(selectedEndCell[0]);
|
9715
|
+
let targetStartRowIndex;
|
9716
|
+
let targetEndRowIndex;
|
9717
|
+
const direction = getFillDirection(aiTable, sourceCells, mouseUpRecordId);
|
9718
|
+
if (direction === 'downward') {
|
9719
|
+
targetStartRowIndex = sourceEndRowIndex + 1;
|
9720
|
+
targetEndRowIndex = selectedEndRowIndex;
|
9721
|
+
}
|
9722
|
+
else {
|
9723
|
+
const selectedFirstCell = selectedCells[0].split(':');
|
9724
|
+
const selectedFirstRowIndex = visibleRowsIndexMap.get(selectedFirstCell[0]);
|
9725
|
+
targetStartRowIndex = selectedFirstRowIndex;
|
9726
|
+
targetEndRowIndex = sourceStartRowIndex - 1;
|
9727
|
+
}
|
9728
|
+
const sourceRowCount = sourceEndRowIndex - sourceStartRowIndex + 1;
|
9729
|
+
const sourceRows = [];
|
9730
|
+
const linearRows = aiTable.context.linearRows();
|
9731
|
+
for (let i = sourceStartRowIndex; i <= sourceEndRowIndex; i++) {
|
9732
|
+
sourceRows.push(linearRows[i]._id);
|
9733
|
+
}
|
9734
|
+
const updateData = [];
|
9735
|
+
const fields = AITable.getVisibleFields(aiTable);
|
9736
|
+
const visibleColumnsIndexMap = aiTable.context.visibleColumnsIndexMap();
|
9737
|
+
const recordsMap = aiTable.recordsMap();
|
9738
|
+
const startFieldIndex = visibleColumnsIndexMap.get(sourceStartCell[1]);
|
9739
|
+
const endFieldIndex = visibleColumnsIndexMap.get(sourceEndCell[1]);
|
9740
|
+
for (let index = startFieldIndex; index <= endFieldIndex; index++) {
|
9741
|
+
const fieldId = fields[index]._id;
|
9742
|
+
for (let rowIndex = targetStartRowIndex; rowIndex <= targetEndRowIndex; rowIndex++) {
|
9743
|
+
const targetRecordId = linearRows[rowIndex]._id;
|
9744
|
+
const relativeRowIndex = direction === 'downward' ? rowIndex - targetStartRowIndex : targetEndRowIndex - rowIndex;
|
9745
|
+
const mod = relativeRowIndex % sourceRowCount;
|
9746
|
+
const sourceRowIndex = direction === 'downward' ? mod : sourceRowCount - 1 - mod;
|
9747
|
+
const sourceRecordId = sourceRows[sourceRowIndex];
|
9748
|
+
const sourceValue = recordsMap[sourceRecordId]?.values[fieldId];
|
9749
|
+
updateData.push({
|
9750
|
+
path: [targetRecordId, fieldId],
|
9751
|
+
value: sourceValue
|
9752
|
+
});
|
9753
|
+
}
|
9754
|
+
}
|
9755
|
+
if (updateData.length > 0) {
|
9756
|
+
actions.updateFieldValues(updateData);
|
9757
|
+
}
|
9758
|
+
}
|
9759
|
+
function getStartAndEndCell(selectedCells) {
|
9760
|
+
const selectedCellsArray = Array.from(selectedCells);
|
9761
|
+
const firstCell = selectedCellsArray[0].split(':');
|
9762
|
+
const lastCell = selectedCellsArray[selectedCellsArray.length - 1].split(':');
|
9763
|
+
const startCell = [firstCell[0], firstCell[1]];
|
9764
|
+
const endCell = [lastCell[0], lastCell[1]];
|
9765
|
+
return { startCell, endCell };
|
9766
|
+
}
|
9767
|
+
|
8892
9768
|
class AITableFieldSetting {
|
8893
9769
|
constructor() {
|
8894
9770
|
this.aiEditField = model.required();
|
@@ -9138,7 +10014,7 @@ class AITableGridSelectionService {
|
|
9138
10014
|
this.clearSelection();
|
9139
10015
|
}
|
9140
10016
|
}
|
9141
|
-
selectCells(startCell, endCell) {
|
10017
|
+
selectCells(startCell, endCell, activeCell) {
|
9142
10018
|
const [startRecordId, startFieldId] = startCell;
|
9143
10019
|
const records = this.aiTable.context.linearRows();
|
9144
10020
|
const fields = AITable.getVisibleFields(this.aiTable);
|
@@ -9163,7 +10039,7 @@ class AITableGridSelectionService {
|
|
9163
10039
|
}
|
9164
10040
|
}
|
9165
10041
|
this.clearSelection();
|
9166
|
-
this.setActiveCell(startCell);
|
10042
|
+
this.setActiveCell(activeCell || startCell);
|
9167
10043
|
this.aiTable.selection().selectedCells = selectedCells;
|
9168
10044
|
}
|
9169
10045
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AITableGridSelectionService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
@@ -9220,6 +10096,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImpo
|
|
9220
10096
|
], template: "@for (menu of menuItems(); track $index) {\n @if ((menu.hidden && !menu.hidden(aiTable(), targetName(), position())) || !menu.hidden) {\n @if (menu.type === 'divider') {\n <thy-divider thyStyle=\"solid\"></thy-divider>\n } @else {\n @let disabled = !!(menu.disabled && menu.disabled(aiTable(), targetName(), position()));\n @let isRemoveRecords = menu.type === 'removeRecords';\n @let isPreventClearSelection =\n menu.type === 'copyCells' ||\n menu.type === 'pasteCells' ||\n menu.type === 'removeRecords' ||\n menu.type === 'insertUpwardRecords' ||\n menu.type === 'insertDownwardRecords';\n\n <a\n thyDropdownMenuItem\n href=\"javascript:;\"\n [ngClass]=\"{\n 'remove-record': isRemoveRecords && !disabled,\n 'ai-table-prevent-clear-selection': isPreventClearSelection && !disabled\n }\"\n draggable=\"false\"\n (click)=\"execute(menu)\"\n [thyDisabled]=\"disabled\"\n >\n <thy-icon thyDropdownMenuItemIcon [thyIconName]=\"menu.icon!\"></thy-icon>\n @if (menu?.isInputNumber) {\n <span thyDropdownMenuItemName class=\"d-flex align-items-center\">\n {{ menu.name }}\n <thy-input-number\n #inputNumber\n class=\"mx-2\"\n thySize=\"sm\"\n [(ngModel)]=\"menu.count\"\n [thyStep]=\"1\"\n [thyMin]=\"1\"\n [thyMax]=\"maxCount()\"\n (click)=\"inputNumberFocus($event)\"\n (thyEnter)=\"itemEnterHandle($event, menu)\"\n thyStopPropagation\n ></thy-input-number>\n {{ menu.nameSuffix }}\n </span>\n } @else {\n <span thyDropdownMenuItemName>{{ menu.name }}</span>\n }\n <span thyDropdownMenuItemMeta class=\"text-desc\">{{ menu.shortcutKey }}</span>\n </a>\n }\n }\n}\n" }]
|
9221
10097
|
}] });
|
9222
10098
|
|
10099
|
+
const GRID_CELL_EDITOR_MAP = {
|
10100
|
+
[AITableFieldType.text]: TextCellEditorComponent,
|
10101
|
+
[AITableFieldType.richText]: TextCellEditorComponent,
|
10102
|
+
[AITableFieldType.select]: SelectCellEditorComponent,
|
10103
|
+
[AITableFieldType.number]: NumberCellEditorComponent,
|
10104
|
+
[AITableFieldType.date]: DateCellEditorComponent,
|
10105
|
+
[AITableFieldType.link]: LinkCellEditorComponent
|
10106
|
+
};
|
10107
|
+
|
9223
10108
|
class AITableGridEventService {
|
9224
10109
|
constructor() {
|
9225
10110
|
this.dblClickEvent$ = new Subject();
|
@@ -9616,7 +10501,7 @@ class AITableGridBase {
|
|
9616
10501
|
AI_TABLE_GRID_FIELD_SERVICE_MAP.set(this.aiTable, this.aiTableGridFieldService);
|
9617
10502
|
}
|
9618
10503
|
addRecord(options) {
|
9619
|
-
const records = this.aiTable.
|
10504
|
+
const records = this.aiTable.records();
|
9620
10505
|
const recordCount = records.length;
|
9621
10506
|
if (this.aiMaxRecords() && recordCount >= this.aiMaxRecords()) {
|
9622
10507
|
return;
|
@@ -9630,7 +10515,7 @@ class AITableGridBase {
|
|
9630
10515
|
this.aiTableGridSelectionService.toggleSelectAll(checked);
|
9631
10516
|
}
|
9632
10517
|
addField(gridColumnBlank, position) {
|
9633
|
-
if (this.aiMaxFields() && this.aiTable.
|
10518
|
+
if (this.aiMaxFields() && this.aiTable.fields().length >= this.aiMaxFields()) {
|
9634
10519
|
return;
|
9635
10520
|
}
|
9636
10521
|
const field = createDefaultField(this.aiTable, AITableFieldType.text);
|
@@ -10242,7 +11127,8 @@ class AITableDragComponent {
|
|
10242
11127
|
verticalElement: this.verticalBarElement
|
10243
11128
|
},
|
10244
11129
|
frozenArea: {
|
10245
|
-
top: AI_TABLE_FIELD_HEAD_HEIGHT
|
11130
|
+
top: AI_TABLE_FIELD_HEAD_HEIGHT,
|
11131
|
+
bottom: this.containerHeight - AI_TABLE_SCROLL_BAR_SIZE - AI_TABLE_FIELD_STAT_CONTAINER_HEIGHT
|
10246
11132
|
},
|
10247
11133
|
edgeThreshold: {
|
10248
11134
|
top: AI_TABLE_AUTO_SCROLL_TOP_THRESHOLD,
|
@@ -10333,9 +11219,15 @@ class AITableGrid extends AITableGridBase {
|
|
10333
11219
|
constructor() {
|
10334
11220
|
super();
|
10335
11221
|
this.viewContainerRef = inject(ViewContainerRef);
|
10336
|
-
this.isDragSelecting = false;
|
10337
11222
|
this.isDragSelectionAutoScrolling = false;
|
10338
|
-
this.
|
11223
|
+
this.dragSelectState = {
|
11224
|
+
isDragging: false,
|
11225
|
+
startCell: null
|
11226
|
+
};
|
11227
|
+
this.dragFillState = {
|
11228
|
+
isDragging: false,
|
11229
|
+
sourceCells: new Set()
|
11230
|
+
};
|
10339
11231
|
this.notifyService = inject(ThyNotifyService);
|
10340
11232
|
this.scrollControllerService = inject(AITableScrollControllerService);
|
10341
11233
|
this.isPopoverOpen = false;
|
@@ -10623,13 +11515,25 @@ class AITableGrid extends AITableGridBase {
|
|
10623
11515
|
this.setDefaultPointPosition();
|
10624
11516
|
}
|
10625
11517
|
this.timer = null;
|
10626
|
-
if (this.
|
11518
|
+
if (this.dragSelectState.isDragging || this.dragFillState.isDragging) {
|
10627
11519
|
const { fieldId, recordId } = getDetailByTargetName(curMousePosition.realTargetName);
|
10628
11520
|
if (fieldId && recordId) {
|
10629
|
-
|
10630
|
-
|
11521
|
+
let startCell;
|
11522
|
+
let endCell;
|
11523
|
+
let activeCell = null;
|
11524
|
+
if (this.dragFillState.isDragging) {
|
11525
|
+
setMouseStyle('crosshair', this.containerElement());
|
11526
|
+
const { highlightStartCell, highlightEndCell } = dragFillHighlightArea(this.aiTable, this.dragFillState.sourceCells, recordId);
|
11527
|
+
activeCell = this.aiTable.selection().activeCell;
|
11528
|
+
startCell = highlightStartCell;
|
11529
|
+
endCell = highlightEndCell;
|
11530
|
+
}
|
11531
|
+
else {
|
11532
|
+
startCell = this.dragSelectState.startCell;
|
11533
|
+
endCell = [recordId, fieldId];
|
11534
|
+
}
|
10631
11535
|
if (startCell && !!startCell.length) {
|
10632
|
-
this.aiTableGridSelectionService.selectCells(startCell, endCell);
|
11536
|
+
this.aiTableGridSelectionService.selectCells(startCell, endCell, activeCell);
|
10633
11537
|
this.scrollViewToCell(pos, startCell, endCell, this.coordinate(), this.horizontalBarRef(), this.verticalBarRef());
|
10634
11538
|
}
|
10635
11539
|
}
|
@@ -10663,13 +11567,21 @@ class AITableGrid extends AITableGridBase {
|
|
10663
11567
|
case AI_TABLE_CELL:
|
10664
11568
|
if (!recordId || !fieldId)
|
10665
11569
|
return;
|
10666
|
-
const
|
10667
|
-
this.
|
11570
|
+
const startCell = [recordId, fieldId];
|
11571
|
+
this.updateDragSelectState(true, startCell);
|
10668
11572
|
const [expandRecordId, expandFieldId] = this.aiTable.selection().expandCell || [null, null];
|
10669
11573
|
if (expandRecordId !== recordId || expandFieldId !== fieldId) {
|
10670
|
-
this.aiTableGridSelectionService.selectCells(
|
11574
|
+
this.aiTableGridSelectionService.selectCells(startCell);
|
10671
11575
|
}
|
10672
11576
|
return;
|
11577
|
+
case AI_TABLE_FILL_HANDLE:
|
11578
|
+
if (!recordId || !fieldId)
|
11579
|
+
return;
|
11580
|
+
this.updateDragFillState({
|
11581
|
+
isDragging: true,
|
11582
|
+
sourceCells: this.aiTable.selection().selectedCells
|
11583
|
+
});
|
11584
|
+
return;
|
10673
11585
|
case AI_TABLE_ROW_DRAG:
|
10674
11586
|
if (!recordId)
|
10675
11587
|
return;
|
@@ -10696,11 +11608,31 @@ class AITableGrid extends AITableGridBase {
|
|
10696
11608
|
}
|
10697
11609
|
}
|
10698
11610
|
stageMouseup(e) {
|
10699
|
-
this.
|
11611
|
+
this.updateDragSelectState(false, null);
|
11612
|
+
if (this.dragFillState.isDragging) {
|
11613
|
+
this.performFill(e);
|
11614
|
+
}
|
11615
|
+
}
|
11616
|
+
performFill(e) {
|
11617
|
+
const targetName = e.event.target.name();
|
11618
|
+
const gridStage = e.event.currentTarget.getStage();
|
11619
|
+
const pos = gridStage?.getPointerPosition();
|
11620
|
+
if (pos == null) {
|
11621
|
+
this.updateDragFillState({ isDragging: false, sourceCells: new Set() });
|
11622
|
+
return;
|
11623
|
+
}
|
11624
|
+
const { context } = this.aiTable;
|
11625
|
+
const { x, y } = pos;
|
11626
|
+
const curMousePosition = getMousePosition(this.aiTable, x, y, this.coordinate(), AITable.getVisibleFields(this.aiTable), context, targetName);
|
11627
|
+
const { recordId } = getDetailByTargetName(curMousePosition.realTargetName);
|
11628
|
+
if (recordId) {
|
11629
|
+
performFill(this.aiTable, this.dragFillState.sourceCells, recordId, this.actions);
|
11630
|
+
}
|
11631
|
+
this.updateDragFillState({ isDragging: false, sourceCells: new Set() });
|
10700
11632
|
}
|
10701
11633
|
stageMouseleave(e) {
|
10702
11634
|
if (!this.isDragSelectionAutoScrolling) {
|
10703
|
-
this.
|
11635
|
+
this.updateDragSelectState(false, null);
|
10704
11636
|
}
|
10705
11637
|
if (this.timer) {
|
10706
11638
|
cancelAnimationFrame(this.timer);
|
@@ -10882,13 +11814,18 @@ class AITableGrid extends AITableGridBase {
|
|
10882
11814
|
!this.containerElement().contains(e.target) &&
|
10883
11815
|
!e.target.closest(AI_TABLE_PREVENT_CLEAR_SELECTION_CLASS)), takeUntilDestroyed(this.destroyRef))
|
10884
11816
|
.subscribe(() => {
|
10885
|
-
this.
|
11817
|
+
this.updateDragSelectState(false, null);
|
10886
11818
|
this.aiTableGridSelectionService.clearSelection();
|
10887
11819
|
});
|
10888
11820
|
}
|
10889
|
-
|
10890
|
-
this.
|
10891
|
-
|
11821
|
+
updateDragSelectState(isDragging, startCell) {
|
11822
|
+
this.dragSelectState = {
|
11823
|
+
isDragging: isDragging,
|
11824
|
+
startCell: startCell
|
11825
|
+
};
|
11826
|
+
}
|
11827
|
+
updateDragFillState(dragFillState) {
|
11828
|
+
this.dragFillState = dragFillState;
|
10892
11829
|
}
|
10893
11830
|
verticalScroll(e) {
|
10894
11831
|
const { scrollTop } = e.target;
|
@@ -11077,7 +12014,7 @@ class AITableGrid extends AITableGridBase {
|
|
11077
12014
|
this.scrollControllerService.scroll({
|
11078
12015
|
container: containerRect,
|
11079
12016
|
target: position,
|
11080
|
-
direction: isSelectionOnlyOnFrozenColumn ? 'vertical' : 'both',
|
12017
|
+
direction: isSelectionOnlyOnFrozenColumn || this.dragFillState.isDragging ? 'vertical' : 'both',
|
11081
12018
|
scrollableElement: {
|
11082
12019
|
horizontalElement: horizontalBarRef?.nativeElement,
|
11083
12020
|
verticalElement: verticalBarRef?.nativeElement
|
@@ -11085,7 +12022,7 @@ class AITableGrid extends AITableGridBase {
|
|
11085
12022
|
frozenArea: {
|
11086
12023
|
top: AI_TABLE_FIELD_HEAD_HEIGHT,
|
11087
12024
|
left: coordinate.getColumnWidth(0) + this.aiTable.context.rowHeadWidth(),
|
11088
|
-
bottom: containerRect.height - AI_TABLE_SCROLL_BAR_SIZE,
|
12025
|
+
bottom: containerRect.height - AI_TABLE_SCROLL_BAR_SIZE - AI_TABLE_FIELD_STAT_CONTAINER_HEIGHT,
|
11089
12026
|
right: containerRect.width - AI_TABLE_SCROLL_BAR_SIZE
|
11090
12027
|
},
|
11091
12028
|
edgeThreshold: {
|
@@ -11112,7 +12049,7 @@ class AITableGrid extends AITableGridBase {
|
|
11112
12049
|
},
|
11113
12050
|
onAutoScrollEnd: () => {
|
11114
12051
|
this.isDragSelectionAutoScrolling = false;
|
11115
|
-
this.
|
12052
|
+
this.updateDragSelectState(false, null);
|
11116
12053
|
}
|
11117
12054
|
});
|
11118
12055
|
}
|
@@ -11130,5 +12067,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImpo
|
|
11130
12067
|
* Generated bundle index. Do not edit.
|
11131
12068
|
*/
|
11132
12069
|
|
11133
|
-
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_FILE_ICON_ITEM_HEIGHT, AI_TABLE_FILE_ICON_SIZE, 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, 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,
|
12070
|
+
export { AITable, AITableActionIcon, AITableAddField, AITableAreaType, AITableAvatarSize, AITableAvatarType, AITableBackground, AITableCellAttachment, AITableCellLink, AITableCellProgress, AITableCellRate, AITableCellRichText, AITableCells, AITableCheckType, AITableColumnHeads, AITableContextMenu, AITableDomGrid, AITableFieldHead, AITableFieldIcon, AITableFieldIsSameOptionPipe, AITableFieldSetting, AITableFrozenCells, AITableFrozenColumnHeads, AITableFrozenPlaceholderCells, AITableGrid, AITableGridEventService, AITableGridFieldService, AITableGridI18nKey, AITableGridI18nText, AITableGridSelectionService, AITableHoverRowHeads, AITableIcon, AITableMemberType, AITableMouseDownType, AITableOtherRows, AITablePlaceholderCells, AITableQueries, AITableRenderer, AITableRowType, AITableSelectAllState, AITableTextComponent, AI_TABLE_ACTION_COMMON_RADIUS, AI_TABLE_ACTION_COMMON_RIGHT_PADDING, AI_TABLE_ACTION_COMMON_SIZE, AI_TABLE_AUTO_SCROLL_BOTTOM_THRESHOLD, AI_TABLE_AUTO_SCROLL_LEFT_THRESHOLD, AI_TABLE_AUTO_SCROLL_RIGHT_THRESHOLD, AI_TABLE_AUTO_SCROLL_TOP_THRESHOLD, AI_TABLE_BLANK, AI_TABLE_CELL, AI_TABLE_CELL_ACTIVE_BORDER_WIDTH, AI_TABLE_CELL_ADD_ITEM_BUTTON_SIZE, AI_TABLE_CELL_ATTACHMENT_ADD, AI_TABLE_CELL_ATTACHMENT_FILE, AI_TABLE_CELL_BORDER, AI_TABLE_CELL_DELETE_ITEM_BUTTON_SIZE, AI_TABLE_CELL_DELETE_ITEM_BUTTON_SIZE_OFFSET, AI_TABLE_CELL_EDIT, AI_TABLE_CELL_EMOJI_PADDING, AI_TABLE_CELL_EMOJI_SIZE, AI_TABLE_CELL_FIELD_ITEM_HEIGHT, AI_TABLE_CELL_LINE_BORDER, AI_TABLE_CELL_MAX_ROW_COUNT, AI_TABLE_CELL_MEMBER_ITEM_HEIGHT, AI_TABLE_CELL_MEMBER_ITEM_PADDING, AI_TABLE_CELL_MEMBER_MAX_HEIGHT, AI_TABLE_CELL_MULTI_DOT_RADIUS, AI_TABLE_CELL_MULTI_ITEM_MARGIN_LEFT, AI_TABLE_CELL_MULTI_ITEM_MARGIN_TOP, AI_TABLE_CELL_MULTI_ITEM_MIN_WIDTH, AI_TABLE_CELL_MULTI_PADDING_LEFT, AI_TABLE_CELL_MULTI_PADDING_TOP, AI_TABLE_CELL_PADDING, AI_TABLE_COMMON_FONT_SIZE, AI_TABLE_DEFAULT_COLUMN_WIDTH, AI_TABLE_DOT_RADIUS, AI_TABLE_FIELD_ADD_BUTTON, AI_TABLE_FIELD_ADD_BUTTON_WIDTH, AI_TABLE_FIELD_HEAD, AI_TABLE_FIELD_HEAD_HEIGHT, AI_TABLE_FIELD_HEAD_ICON_GAP_SIZE, AI_TABLE_FIELD_HEAD_MORE, AI_TABLE_FIELD_HEAD_OPACITY_LINE, AI_TABLE_FIELD_HEAD_SELECT_CHECKBOX, AI_TABLE_FIELD_HEAD_TEXT_MIN_WIDTH, AI_TABLE_FIELD_ITEM_MARGIN_RIGHT, AI_TABLE_FIELD_MAX_WIDTH, AI_TABLE_FIELD_MIDDLE_WIDTH, AI_TABLE_FIELD_MINI_WIDTH, AI_TABLE_FIELD_MIN_WIDTH, AI_TABLE_FIELD_STAT_BG, AI_TABLE_FIELD_STAT_CONTAINER_HEIGHT, AI_TABLE_FIELD_STAT_HEIGHT, AI_TABLE_FILE_ICON_ITEM_HEIGHT, AI_TABLE_FILE_ICON_SIZE, AI_TABLE_FILL_HANDLE, AI_TABLE_GRID_FIELD_SERVICE_MAP, AI_TABLE_ICON_COMMON_SIZE, AI_TABLE_INDEX_FIELD_TEXT, AI_TABLE_MEMBER_AVATAR_SIZE, AI_TABLE_MEMBER_ITEM_AVATAR_MARGIN_RIGHT, AI_TABLE_MEMBER_ITEM_PADDING_RIGHT, AI_TABLE_MIN_TEXT_WIDTH, AI_TABLE_OFFSET, AI_TABLE_OPTION_ITEM_FONT_SIZE, AI_TABLE_OPTION_ITEM_HEIGHT, AI_TABLE_OPTION_ITEM_PADDING, AI_TABLE_OPTION_ITEM_RADIUS, AI_TABLE_PIECE_RADIUS, AI_TABLE_PIECE_WIDTH, AI_TABLE_POPOVER_LEFT_OFFSET, AI_TABLE_PREVENT_CLEAR_SELECTION_CLASS, AI_TABLE_PROGRESS_BAR_HEIGHT, AI_TABLE_PROGRESS_BAR_POINTER_HEIGHT, AI_TABLE_PROGRESS_BAR_POINTER_WIDTH, AI_TABLE_PROGRESS_BAR_RADIUS, AI_TABLE_PROGRESS_TEXT_WIDTH, AI_TABLE_RATE_MAX, AI_TABLE_ROW_ADD_BUTTON, AI_TABLE_ROW_BLANK_HEIGHT, AI_TABLE_ROW_DRAG, AI_TABLE_ROW_DRAG_ICON_WIDTH, AI_TABLE_ROW_HEAD, AI_TABLE_ROW_HEAD_SIZE, AI_TABLE_ROW_HEAD_WIDTH, AI_TABLE_ROW_HEAD_WIDTH_AND_DRAG_ICON_WIDTH, AI_TABLE_ROW_HEIGHT, AI_TABLE_ROW_SELECT_CHECKBOX, AI_TABLE_SCROLL_BAR_PADDING, AI_TABLE_SCROLL_BAR_SIZE, AI_TABLE_TAG_FONT_SIZE, AI_TABLE_TAG_PADDING, AI_TABLE_TEXT_GAP, AI_TABLE_TEXT_LINE_HEIGHT, AbstractEditCellEditor, AddOutlinedPath, AngleDownPath, AttachmentField, AttachmentPath, CellDrawer, Check, Colors, ColumnCalendarFilledPath, ColumnLinkOutlinedPath, ColumnMemberFilledPath, ColumnMultipleFillPath, ColumnNumberFilledPath, ColumnProgressFilledPath, ColumnRatingFilledPath, ColumnRichTextFilledPath, ColumnSelectFilledPath, ColumnTextFilledPath, Coordinate, CoverCellComponent, DBL_CLICK_EDIT_TYPE, DEFAULT_FONT_FAMILY, DEFAULT_FONT_SIZE, DEFAULT_FONT_STYLE, DEFAULT_FONT_WEIGHT, DEFAULT_ICON_SHAPE, DEFAULT_ICON_SIZE, DEFAULT_POINT_POSITION, DEFAULT_SCROLL_STATE, DEFAULT_TEXT_ALIGN_CENTER, DEFAULT_TEXT_ALIGN_LEFT, DEFAULT_TEXT_ALIGN_RIGHT, DEFAULT_TEXT_DECORATION, DEFAULT_TEXT_ELLIPSIS, DEFAULT_TEXT_FILL, DEFAULT_TEXT_LINE_HEIGHT, DEFAULT_TEXT_LISTENING, DEFAULT_TEXT_MAX_CACHE, DEFAULT_TEXT_MAX_HEIGHT, DEFAULT_TEXT_SCALE, DEFAULT_TEXT_TRANSFORMS_ENABLED, DEFAULT_TEXT_VERTICAL_ALIGN_MIDDLE, DEFAULT_TEXT_VERTICAL_ALIGN_TOP, DEFAULT_TEXT_WRAP, DEFAULT_WRAP_TEXT_MAX_ROW, DateCellEditorComponent, DateField, DepartmentOutlinedPath, Drawer, EditPath, FONT_SIZE_SM, FieldModelMap, IconPathMap, IsSelectRecordPipe, KO_CONTAINER_TOKEN, KoComponent, KoContainer, KoShape, KoShapeTypes, KoStage, LinkCellEditorComponent, LinkField, MIN_COLUMN_WIDTH, MemberField, MemberSettingPipe, MoreStandOutlinedPath, NumberCellEditorComponent, NumberField, ProgressField, RateField, RendererContext, RichTextField, RowDragPath, RowHeight, SelectCellEditorComponent, SelectField, SelectOptionComponent, SelectOptionPipe, SelectOptionsPipe, SelectSettingPipe, StarFill, TextCellEditorComponent, TextField, TextMeasure, Unchecked, UserPipe, WebOutlinedPath, aiTableFragmentAttribute, aiTableImageConfigToKonvaConfig, aiTableRectConfigToKonvaConfig, aiTableTextConfigToKonvaConfig, applyNodeProps, buildClipboardData, buildGridData, buildGridLinearRows, castToString, cellDrawer, clearCells, compareNumber, compareOption, compareString, createAITable, createActiveCellBorder, createCells, createDefaultField, createDefaultFieldName, createListener, dragFillHighlightArea, drawer, expandCell, extractLinkUrl, extractText, generateNewName, generateTargetName, getAvatarBgColor, getAvatarShortName, getCellEditorBorderSpace, getCellHorizontalPosition, getColumnIndicesSizeMap, getCoverCell, getDateFieldValues, getDefaultFieldOptions, getDefaultFieldValue, getDefaultI18nTextByKey, getDetailByTargetName, getEditorBoxOffset, getEditorSpace, getFieldOptionByField, getFieldOptionMap, getFieldOptions, getFieldValue, getFileThumbnailSvgString, getFillDirection, getHoverEditorBoxOffset, getHoverEditorSpace, getI18nTextByKey, getMousePosition, getName, getOptionsByFieldAndRecords, getPlaceHolderCellsConfigs, getStartAndEndCell, getSystemFieldValue, getTargetName, getTextWidth, getVisibleRangeInfo, graphemeSplitter, handleMouseStyle, hasIntersect, idCreator, idsCreator, imageCache, isActiveCell, isArrayField, isCellMatchKeywords, isClipboardReadSupported, isClipboardReadTextSupported, isClipboardWriteSupported, isClipboardWriteTextSupported, isDateFiled, isEmptyOrNot, isMac, isMeetFilter, isNumberFiled, isSameFieldOption, isSelectedField, isSystemField, isVirtualKey, isWindows, isWindowsOS, isWithinFrozenColumnBoundary, performFill, processPastedValueForSelect, readFromClipboard, scrollMax, setMouseStyle, shortIdCreator, shortIdsCreator, statDateRangeOfDays, statDateRangeOfMonths, statEarliestTime, statLatestTime, stringInclude, textDataCache, toAttachmentFieldValue, toDateFieldValue, toLinkFieldValue, toMemberFieldValue, toNumberFieldValue, toProgressFieldValue, toRateFieldValue, toRichTextFieldValue, toSelectFieldValue, toTextFieldValue, transformToCellText, updatePicture, writeToAITable, writeToClipboard, zhIntlCollator };
|
11134
12071
|
//# sourceMappingURL=ai-table-grid.mjs.map
|