@fileverse-dev/fortune-core 1.0.2-mod-89-patch-006 → 1.0.2-mod-92

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
@@ -56371,9 +56371,6 @@ function execfunction(ctx, txt, r, c, id, calcChainSet, isrefresh, notInsertFunc
56371
56371
  });
56372
56372
  var formulaError = parsedResponse.error;
56373
56373
  var result = parsedResponse.result;
56374
- console.log({
56375
- resultFROMEXECUTEFUNCTION: result
56376
- });
56377
56374
  if (Object.prototype.toString.call(result) === "[object Date]" && !_.isNil(result)) {
56378
56375
  result = result.toString();
56379
56376
  }
@@ -56687,8 +56684,8 @@ function execFunctionGroup(ctx, origin_r, origin_c, value, id, data) {
56687
56684
  v: v[1],
56688
56685
  f: v[2]
56689
56686
  };
56690
- ctx.formulaCache.execFunctionExist = undefined;
56691
56687
  }
56688
+ ctx.formulaCache.execFunctionExist = undefined;
56692
56689
  }
56693
56690
  function findrangeindex(ctx, v, vp) {
56694
56691
  var re = /<span.*?>/g;
@@ -58279,6 +58276,25 @@ function setConditionRules(ctx, protection, generalDialog, conditionformat, rule
58279
58276
  var ruleArr = (_ctx$luckysheetfile$i = ctx.luckysheetfile[index].luckysheet_conditionformat_save) !== null && _ctx$luckysheetfile$i !== void 0 ? _ctx$luckysheetfile$i : [];
58280
58277
  ruleArr === null || ruleArr === void 0 ? void 0 : ruleArr.push(rule);
58281
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
+ });
58282
58298
  }
58283
58299
  function getColorGradation(color1, color2, value1, value2, value) {
58284
58300
  var rgb1 = color1.split(",");
@@ -58583,7 +58599,7 @@ function compute(ctx, ruleArr, d) {
58583
58599
  cellColor: cellColor
58584
58600
  };
58585
58601
  }
58586
- } else if (conditionName === "equal" && Number(_cell6.v) === Number(conditionValue0)) {
58602
+ } else if (conditionName === "equal" && _cell6.v.toString() === conditionValue0) {
58587
58603
  if ("".concat(_r0, "_").concat(_c0) in computeMap) {
58588
58604
  computeMap["".concat(_r0, "_").concat(_c0)].textColor = textColor;
58589
58605
  computeMap["".concat(_r0, "_").concat(_c0)].cellColor = cellColor;
package/dist/index.js CHANGED
@@ -56381,9 +56381,6 @@ function execfunction(ctx, txt, r, c, id, calcChainSet, isrefresh, notInsertFunc
56381
56381
  });
56382
56382
  var formulaError = parsedResponse.error;
56383
56383
  var result = parsedResponse.result;
56384
- console.log({
56385
- resultFROMEXECUTEFUNCTION: result
56386
- });
56387
56384
  if (Object.prototype.toString.call(result) === "[object Date]" && !___default['default'].isNil(result)) {
56388
56385
  result = result.toString();
56389
56386
  }
@@ -56697,8 +56694,8 @@ function execFunctionGroup(ctx, origin_r, origin_c, value, id, data) {
56697
56694
  v: v[1],
56698
56695
  f: v[2]
56699
56696
  };
56700
- ctx.formulaCache.execFunctionExist = undefined;
56701
56697
  }
56698
+ ctx.formulaCache.execFunctionExist = undefined;
56702
56699
  }
56703
56700
  function findrangeindex(ctx, v, vp) {
56704
56701
  var re = /<span.*?>/g;
@@ -58289,6 +58286,25 @@ function setConditionRules(ctx, protection, generalDialog, conditionformat, rule
58289
58286
  var ruleArr = (_ctx$luckysheetfile$i = ctx.luckysheetfile[index].luckysheet_conditionformat_save) !== null && _ctx$luckysheetfile$i !== void 0 ? _ctx$luckysheetfile$i : [];
58290
58287
  ruleArr === null || ruleArr === void 0 ? void 0 : ruleArr.push(rule);
58291
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
+ });
58292
58308
  }
58293
58309
  function getColorGradation(color1, color2, value1, value2, value) {
58294
58310
  var rgb1 = color1.split(",");
@@ -58593,7 +58609,7 @@ function compute(ctx, ruleArr, d) {
58593
58609
  cellColor: cellColor
58594
58610
  };
58595
58611
  }
58596
- } else if (conditionName === "equal" && Number(_cell6.v) === Number(conditionValue0)) {
58612
+ } else if (conditionName === "equal" && _cell6.v.toString() === conditionValue0) {
58597
58613
  if ("".concat(_r0, "_").concat(_c0) in computeMap) {
58598
58614
  computeMap["".concat(_r0, "_").concat(_c0)].textColor = textColor;
58599
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-006",
3
+ "version": "1.0.2-mod-92",
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-26",
14
14
  "dayjs": "^1.11.0",
15
15
  "immer": "^9.0.12",
16
16
  "lodash": "^4.17.21",