@ai-table/grid 0.1.31 → 0.1.32
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/fesm2022/ai-table-grid.mjs +12 -18
- package/fesm2022/ai-table-grid.mjs.map +1 -1
- package/package.json +1 -1
- package/renderer/components/field-stat/stat.component.d.ts +2 -4
- package/renderer/components/field-stat/stat.component.d.ts.map +1 -1
- package/utils/field/model/checkbox.d.ts +0 -1
- package/utils/field/model/checkbox.d.ts.map +1 -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, AITableStatType, DateFieldBase, DEFAULT_FIELD_STAT_TYPE_ITEMS, isDateValid, isDateAndReturnDate, LinkFieldBase, MemberFieldBase, NumberFieldBase, ProgressFieldBase, isProgressAndReturnValue, RateFieldBase, RichTextFieldBase, SelectFieldBase, generateOptionsByTexts, TextFieldBase, CheckboxFieldBase,
|
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, CheckboxFieldBase, FieldModelBaseMap, numberFormat } from '@ai-table/utils';
|
29
29
|
import ObjectID from 'bson-objectid';
|
30
30
|
import { customAlphabet } from 'nanoid';
|
31
31
|
import * as _ from 'lodash';
|
@@ -3455,17 +3455,6 @@ function cellValueToSortValue$1(cellValue) {
|
|
3455
3455
|
}
|
3456
3456
|
|
3457
3457
|
class CheckboxField extends CheckboxFieldBase {
|
3458
|
-
constructor() {
|
3459
|
-
super([
|
3460
|
-
DEFAULT_FIELD_STAT_TYPE_MAP[AITableStatType.None],
|
3461
|
-
DEFAULT_FIELD_STAT_TYPE_MAP[AITableStatType.CountAll],
|
3462
|
-
DEFAULT_FIELD_STAT_TYPE_MAP[AITableStatType.Filled],
|
3463
|
-
DEFAULT_FIELD_STAT_TYPE_MAP[AITableStatType.Empty],
|
3464
|
-
DEFAULT_FIELD_STAT_TYPE_MAP[AITableStatType.Unique],
|
3465
|
-
DEFAULT_FIELD_STAT_TYPE_MAP[AITableStatType.PercentFilled],
|
3466
|
-
DEFAULT_FIELD_STAT_TYPE_MAP[AITableStatType.PercentEmpty]
|
3467
|
-
]);
|
3468
|
-
}
|
3469
3458
|
transformCellValue(cellValue, options) {
|
3470
3459
|
return transformToCellText(cellValue, options);
|
3471
3460
|
}
|
@@ -9187,8 +9176,16 @@ class AITableFieldStat {
|
|
9187
9176
|
this.isActiveOrHover = computed(() => {
|
9188
9177
|
return this.isActive() || this.isHover();
|
9189
9178
|
});
|
9179
|
+
this.containerBoxHeight = computed(() => {
|
9180
|
+
const { height } = this.config();
|
9181
|
+
return height;
|
9182
|
+
});
|
9183
|
+
this.containerBoxWidth = computed(() => {
|
9184
|
+
const { width } = this.config();
|
9185
|
+
return width;
|
9186
|
+
});
|
9190
9187
|
this.renderTexts = computed(() => {
|
9191
|
-
const
|
9188
|
+
const width = this.containerBoxWidth();
|
9192
9189
|
const field = this.field();
|
9193
9190
|
const records = this.records();
|
9194
9191
|
const fieldModel = FieldModelMap[field.type];
|
@@ -9237,12 +9234,9 @@ class AITableFieldStat {
|
|
9237
9234
|
statValue: statValue || ''
|
9238
9235
|
};
|
9239
9236
|
});
|
9240
|
-
this.containerBox = computed(() => {
|
9241
|
-
const { height, width } = this.config();
|
9242
|
-
return { height, width };
|
9243
|
-
});
|
9244
9237
|
this.textsConfig = computed(() => {
|
9245
|
-
const
|
9238
|
+
const height = this.containerBoxHeight();
|
9239
|
+
const width = this.containerBoxWidth();
|
9246
9240
|
const renderTexts = this.renderTexts();
|
9247
9241
|
const result = [];
|
9248
9242
|
let previousColor = Colors.gray700;
|