@fileverse-dev/fortune-core 1.0.2-mod-89-patch-004 → 1.0.2-mod-91

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.
@@ -49,6 +49,7 @@ export declare function getSheetWithLatestCelldata(ctx: Context, options?: Commo
49
49
  luckysheet_conditionformat_save?: any[] | undefined;
50
50
  luckysheet_alternateformat_save?: any[] | undefined;
51
51
  dataVerification?: any;
52
+ conditionRules?: import("../types").ConditionRulesProps | undefined;
52
53
  hyperlink?: Record<string, {
53
54
  linkType: string;
54
55
  linkAddress: string;
package/dist/index.esm.js CHANGED
@@ -58276,6 +58276,25 @@ function setConditionRules(ctx, protection, generalDialog, conditionformat, rule
58276
58276
  var ruleArr = (_ctx$luckysheetfile$i = ctx.luckysheetfile[index].luckysheet_conditionformat_save) !== null && _ctx$luckysheetfile$i !== void 0 ? _ctx$luckysheetfile$i : [];
58277
58277
  ruleArr === null || ruleArr === void 0 ? void 0 : ruleArr.push(rule);
58278
58278
  ctx.luckysheetfile[index].luckysheet_conditionformat_save = ruleArr;
58279
+ ctx.luckysheetfile[index].conditionRules = _objectSpread2(_objectSpread2({}, rules), {}, {
58280
+ rulesType: rules.rulesType || "",
58281
+ rulesValue: rules.rulesValue || "",
58282
+ textColor: rules.textColor || {
58283
+ check: true,
58284
+ color: "#000000"
58285
+ },
58286
+ cellColor: rules.cellColor || {
58287
+ check: true,
58288
+ color: "#000000"
58289
+ },
58290
+ betweenValue: rules.betweenValue || {
58291
+ value1: "",
58292
+ value2: ""
58293
+ },
58294
+ dateValue: rules.dateValue || "",
58295
+ repeatValue: rules.repeatValue || "0",
58296
+ projectValue: rules.projectValue || "10"
58297
+ });
58279
58298
  }
58280
58299
  function getColorGradation(color1, color2, value1, value2, value) {
58281
58300
  var rgb1 = color1.split(",");
@@ -58580,7 +58599,7 @@ function compute(ctx, ruleArr, d) {
58580
58599
  cellColor: cellColor
58581
58600
  };
58582
58601
  }
58583
- } else if (conditionName === "equal" && Number(_cell6.v) === Number(conditionValue0)) {
58602
+ } else if (conditionName === "equal" && _cell6.v.toString() === conditionValue0) {
58584
58603
  if ("".concat(_r0, "_").concat(_c0) in computeMap) {
58585
58604
  computeMap["".concat(_r0, "_").concat(_c0)].textColor = textColor;
58586
58605
  computeMap["".concat(_r0, "_").concat(_c0)].cellColor = cellColor;
package/dist/index.js CHANGED
@@ -58286,6 +58286,25 @@ function setConditionRules(ctx, protection, generalDialog, conditionformat, rule
58286
58286
  var ruleArr = (_ctx$luckysheetfile$i = ctx.luckysheetfile[index].luckysheet_conditionformat_save) !== null && _ctx$luckysheetfile$i !== void 0 ? _ctx$luckysheetfile$i : [];
58287
58287
  ruleArr === null || ruleArr === void 0 ? void 0 : ruleArr.push(rule);
58288
58288
  ctx.luckysheetfile[index].luckysheet_conditionformat_save = ruleArr;
58289
+ ctx.luckysheetfile[index].conditionRules = _objectSpread2(_objectSpread2({}, rules), {}, {
58290
+ rulesType: rules.rulesType || "",
58291
+ rulesValue: rules.rulesValue || "",
58292
+ textColor: rules.textColor || {
58293
+ check: true,
58294
+ color: "#000000"
58295
+ },
58296
+ cellColor: rules.cellColor || {
58297
+ check: true,
58298
+ color: "#000000"
58299
+ },
58300
+ betweenValue: rules.betweenValue || {
58301
+ value1: "",
58302
+ value2: ""
58303
+ },
58304
+ dateValue: rules.dateValue || "",
58305
+ repeatValue: rules.repeatValue || "0",
58306
+ projectValue: rules.projectValue || "10"
58307
+ });
58289
58308
  }
58290
58309
  function getColorGradation(color1, color2, value1, value2, value) {
58291
58310
  var rgb1 = color1.split(",");
@@ -58590,7 +58609,7 @@ function compute(ctx, ruleArr, d) {
58590
58609
  cellColor: cellColor
58591
58610
  };
58592
58611
  }
58593
- } else if (conditionName === "equal" && Number(_cell6.v) === Number(conditionValue0)) {
58612
+ } else if (conditionName === "equal" && _cell6.v.toString() === conditionValue0) {
58594
58613
  if ("".concat(_r0, "_").concat(_c0) in computeMap) {
58595
58614
  computeMap["".concat(_r0, "_").concat(_c0)].textColor = textColor;
58596
58615
  computeMap["".concat(_r0, "_").concat(_c0)].cellColor = cellColor;
package/dist/types.d.ts CHANGED
@@ -121,6 +121,25 @@ export type Image = {
121
121
  top: number;
122
122
  src: string;
123
123
  };
124
+ export type ConditionRulesProps = {
125
+ rulesType: string;
126
+ rulesValue: string;
127
+ textColor: {
128
+ check: boolean;
129
+ color: string;
130
+ };
131
+ cellColor: {
132
+ check: boolean;
133
+ color: string;
134
+ };
135
+ betweenValue: {
136
+ value1: string;
137
+ value2: string;
138
+ };
139
+ dateValue: string;
140
+ repeatValue: string;
141
+ projectValue: string;
142
+ };
124
143
  export type Sheet = {
125
144
  name: string;
126
145
  config?: SheetConfig;
@@ -163,6 +182,7 @@ export type Sheet = {
163
182
  luckysheet_conditionformat_save?: any[];
164
183
  luckysheet_alternateformat_save?: any[];
165
184
  dataVerification?: any;
185
+ conditionRules?: ConditionRulesProps;
166
186
  hyperlink?: Record<string, {
167
187
  linkType: string;
168
188
  linkAddress: string;
@@ -231,25 +251,6 @@ export type DataRegulationProps = {
231
251
  hintShow: boolean;
232
252
  hintValue: string;
233
253
  };
234
- export type ConditionRulesProps = {
235
- rulesType: string;
236
- rulesValue: string;
237
- textColor: {
238
- check: boolean;
239
- color: string;
240
- };
241
- cellColor: {
242
- check: boolean;
243
- color: string;
244
- };
245
- betweenValue: {
246
- value1: string;
247
- value2: string;
248
- };
249
- dateValue: string;
250
- repeatValue: string;
251
- projectValue: string;
252
- };
253
254
  export type FilterOptions = {
254
255
  startRow: number;
255
256
  endRow: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fileverse-dev/fortune-core",
3
- "version": "1.0.2-mod-89-patch-004",
3
+ "version": "1.0.2-mod-91",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.esm.js",
6
6
  "typings": "dist/index.d.ts",
@@ -10,7 +10,7 @@
10
10
  "repository": "https://github.com/ruilisi/fortune-sheet",
11
11
  "license": "MIT",
12
12
  "dependencies": {
13
- "@fileverse-dev/formula-parser": "0.2.13-mod-25-patch-004",
13
+ "@fileverse-dev/formula-parser": "0.2.13-mod-25",
14
14
  "dayjs": "^1.11.0",
15
15
  "immer": "^9.0.12",
16
16
  "lodash": "^4.17.21",