@univerjs/sheets-ui 0.6.6-nightly.202503161606 → 0.6.6-nightly.202503171607
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/lib/cjs/index.js +1 -1
- package/lib/es/index.js +32 -31
- package/lib/types/services/auto-fill/type.d.ts +1 -1
- package/lib/umd/index.js +27 -27
- package/package.json +11 -11
package/lib/es/index.js
CHANGED
|
@@ -3821,48 +3821,49 @@ let zs = class extends de {
|
|
|
3821
3821
|
};
|
|
3822
3822
|
}
|
|
3823
3823
|
// calc apply data according to copy data and direction
|
|
3824
|
-
_getApplyData(e, t, n, i, o, s = !0) {
|
|
3825
|
-
const
|
|
3824
|
+
_getApplyData(e, t, n, i, o, s = !0, l) {
|
|
3825
|
+
const a = [], c = Math.floor(n / t), d = n % t, u = this._autoFillService.getRules();
|
|
3826
3826
|
if (!s && o === Ne.ONLY_FORMAT)
|
|
3827
3827
|
return console.error("ERROR: only format can not be applied when hasStyle is false"), [];
|
|
3828
|
-
const
|
|
3829
|
-
|
|
3830
|
-
|
|
3831
|
-
}),
|
|
3832
|
-
const { type:
|
|
3833
|
-
|
|
3834
|
-
const
|
|
3835
|
-
|
|
3836
|
-
|
|
3828
|
+
const h = {};
|
|
3829
|
+
u.forEach((g) => {
|
|
3830
|
+
h[g.type] = [];
|
|
3831
|
+
}), u.forEach((g) => {
|
|
3832
|
+
const { type: m, applyFunctions: f = {} } = g, p = e[m];
|
|
3833
|
+
p && p.forEach((S) => {
|
|
3834
|
+
const v = CC(S.index, d), C = S.index.length * c + v, w = this._applyFunctions(
|
|
3835
|
+
S,
|
|
3836
|
+
C,
|
|
3837
3837
|
i,
|
|
3838
3838
|
o,
|
|
3839
|
-
|
|
3840
|
-
e
|
|
3841
|
-
|
|
3842
|
-
|
|
3839
|
+
f,
|
|
3840
|
+
e,
|
|
3841
|
+
l
|
|
3842
|
+
), R = bC(t, n, S.index);
|
|
3843
|
+
h[m].push({ data: w, index: R });
|
|
3843
3844
|
});
|
|
3844
3845
|
});
|
|
3845
|
-
for (let
|
|
3846
|
-
|
|
3847
|
-
const { type:
|
|
3848
|
-
for (let
|
|
3849
|
-
|
|
3846
|
+
for (let g = 0; g < n; g++)
|
|
3847
|
+
u.forEach((m) => {
|
|
3848
|
+
const { type: f } = m, p = h[f];
|
|
3849
|
+
for (let S = 0; S < p.length; S++)
|
|
3850
|
+
g in p[S].index && a.push(p[S].data[p[S].index[g]]);
|
|
3850
3851
|
});
|
|
3851
|
-
return
|
|
3852
|
+
return a;
|
|
3852
3853
|
}
|
|
3853
|
-
_applyFunctions(e, t, n, i, o, s) {
|
|
3854
|
-
const { data:
|
|
3854
|
+
_applyFunctions(e, t, n, i, o, s, l) {
|
|
3855
|
+
const { data: a } = e, c = n === W.UP || n === W.LEFT;
|
|
3855
3856
|
if (i === Ne.COPY) {
|
|
3856
|
-
const
|
|
3857
|
-
return
|
|
3857
|
+
const d = o == null ? void 0 : o[Ne.COPY];
|
|
3858
|
+
return d ? d(e, t, n, s, l) : (c && a.reverse(), Tr(a, t));
|
|
3858
3859
|
}
|
|
3859
3860
|
if (i === Ne.SERIES) {
|
|
3860
|
-
const
|
|
3861
|
-
return
|
|
3861
|
+
const d = o == null ? void 0 : o[Ne.SERIES];
|
|
3862
|
+
return d ? d(e, t, n, s) : (c && a.reverse(), o != null && o[Ne.COPY] ? o[Ne.COPY](e, t, n, s, l) : Tr(a, t));
|
|
3862
3863
|
}
|
|
3863
3864
|
if (i === Ne.ONLY_FORMAT) {
|
|
3864
|
-
const
|
|
3865
|
-
return
|
|
3865
|
+
const d = o == null ? void 0 : o[Ne.ONLY_FORMAT];
|
|
3866
|
+
return d ? d(e, t, n, s) : _C(a, t);
|
|
3866
3867
|
}
|
|
3867
3868
|
}
|
|
3868
3869
|
_getCopyData(e, t) {
|
|
@@ -3987,7 +3988,7 @@ let zs = class extends de {
|
|
|
3987
3988
|
if (t === W.DOWN || t === W.UP) {
|
|
3988
3989
|
const O = m.length, H = [];
|
|
3989
3990
|
g.forEach((F, z) => {
|
|
3990
|
-
const B = S[z], j = this._getApplyData(B, v, O, t, n, s);
|
|
3991
|
+
const B = S[z], j = this._getApplyData(B, v, O, t, n, s, e);
|
|
3991
3992
|
H.push(j);
|
|
3992
3993
|
});
|
|
3993
3994
|
for (let F = 0; F < H[0].length; F++) {
|
|
@@ -4002,7 +4003,7 @@ let zs = class extends de {
|
|
|
4002
4003
|
} else {
|
|
4003
4004
|
const O = g.length;
|
|
4004
4005
|
m.forEach((H, F) => {
|
|
4005
|
-
const z = S[F], B = this._getApplyData(z, v, O, t, n, s), j = [];
|
|
4006
|
+
const z = S[F], B = this._getApplyData(z, v, O, t, n, s, e), j = [];
|
|
4006
4007
|
for (let Y = 0; Y < B.length; Y++)
|
|
4007
4008
|
j.push({
|
|
4008
4009
|
s: null,
|
|
@@ -60,7 +60,7 @@ export interface IRuleConfirmedData {
|
|
|
60
60
|
cellData: Nullable<ICellData>;
|
|
61
61
|
}
|
|
62
62
|
export type APPLY_FUNCTIONS = {
|
|
63
|
-
[key in APPLY_TYPE]?: (dataWithIndex: ICopyDataInType, len: number, direction: Direction, copyDataPiece: ICopyDataPiece) => Array<Nullable<ICellData>>;
|
|
63
|
+
[key in APPLY_TYPE]?: (dataWithIndex: ICopyDataInType, len: number, direction: Direction, copyDataPiece: ICopyDataPiece, location?: IAutoFillLocation) => Array<Nullable<ICellData>>;
|
|
64
64
|
};
|
|
65
65
|
export declare enum APPLY_TYPE {
|
|
66
66
|
COPY = "COPY",
|