@fileverse-dev/fortune-core 1.2.4 → 1.2.5-onchain-functions-1

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/es/canvas.js CHANGED
@@ -11,7 +11,7 @@ import { cellFadeAnimator } from "./animate";
11
11
  export var defaultStyle = {
12
12
  fillStyle: "#000000",
13
13
  textBaseline: "middle",
14
- strokeStyle: "#e8ebec",
14
+ strokeStyle: "#dfdfdf",
15
15
  rowFillStyle: "#5e5e5e",
16
16
  textAlign: "center"
17
17
  };
@@ -791,9 +791,9 @@ var Canvas = function () {
791
791
  var finalPillWidth = ((columnWidth === null || columnWidth === void 0 ? void 0 : columnWidth[c]) || 70) - 5;
792
792
  var ps_w = finalPillWidth * this.sheetCtx.zoomRatio;
793
793
  var ps_h = 16 * this.sheetCtx.zoomRatio;
794
- var radius = 5 * this.sheetCtx.zoomRatio;
794
+ var radius = 8 * this.sheetCtx.zoomRatio;
795
795
  var x = endX + offsetLeft - 4 - ps_w;
796
- var y = startY + offsetTop + 2;
796
+ var y = startY + offsetTop + 2.7;
797
797
  renderCtx.beginPath();
798
798
  renderCtx.fillStyle = "rgba(232, 235, 236, 1)";
799
799
  renderCtx.roundRect(x, y, ps_w, ps_h, radius);
@@ -801,7 +801,7 @@ var Canvas = function () {
801
801
  renderCtx.closePath();
802
802
  var chevronWidth = 7 * this.sheetCtx.zoomRatio;
803
803
  var chevronHeight = 4 * this.sheetCtx.zoomRatio;
804
- var chevronX = x + ps_w - chevronWidth - 2 * this.sheetCtx.zoomRatio;
804
+ var chevronX = x - 2 + ps_w - chevronWidth - 2 * this.sheetCtx.zoomRatio;
805
805
  var chevronY = y + (ps_h - chevronHeight) / 2;
806
806
  renderCtx.beginPath();
807
807
  renderCtx.fillStyle = "rgba(0, 0, 0, 1)";
@@ -903,9 +903,9 @@ var Canvas = function () {
903
903
  var finalPillWidth = ((columnWidth === null || columnWidth === void 0 ? void 0 : columnWidth[c]) || 70) - 5;
904
904
  var ps_w = finalPillWidth * this.sheetCtx.zoomRatio;
905
905
  var ps_h = 16 * this.sheetCtx.zoomRatio;
906
- var radius = 5 * this.sheetCtx.zoomRatio;
906
+ var radius = 8 * this.sheetCtx.zoomRatio;
907
907
  var baseX = endX + offsetLeft - 4 - ps_w;
908
- var baseY = startY + offsetTop + 2;
908
+ var baseY = startY + offsetTop + 2.7;
909
909
  var pillSpacing = 2 * this.sheetCtx.zoomRatio;
910
910
  var _loop_1 = function _loop_1(i) {
911
911
  var x = baseX;
@@ -918,13 +918,13 @@ var Canvas = function () {
918
918
  });
919
919
  renderCtx.beginPath();
920
920
  renderCtx.fillStyle = bgColor || "rgba(232, 235, 236, 1)";
921
- renderCtx.roundRect(x, y, ps_w - 8, ps_h, radius);
921
+ renderCtx.roundRect(x, y, ps_w, ps_h, radius);
922
922
  renderCtx.fill();
923
923
  renderCtx.closePath();
924
924
  if (i === 0) {
925
925
  var chevronWidth = 7 * this_1.sheetCtx.zoomRatio;
926
926
  var chevronHeight = 4 * this_1.sheetCtx.zoomRatio;
927
- var chevronX = x + 3 + ps_w - chevronWidth - 2 * this_1.sheetCtx.zoomRatio;
927
+ var chevronX = x - 2 + ps_w - chevronWidth - 2 * this_1.sheetCtx.zoomRatio;
928
928
  var chevronY = y + (ps_h - chevronHeight) / 2;
929
929
  renderCtx.beginPath();
930
930
  renderCtx.fillStyle = "rgba(0, 0, 0, 1)";
package/es/locale/en.js CHANGED
@@ -5097,62 +5097,6 @@ export default {
5097
5097
  repeat: "n",
5098
5098
  type: "rangenumber"
5099
5099
  }]
5100
- }, {
5101
- n: "PRICE",
5102
- t: 8,
5103
- d: "Calculates the price of a security paying periodic interest, such as a US Treasury Bond, based on expected yield.",
5104
- a: "Price of a security paying periodic interest.",
5105
- m: [6, 7],
5106
- p: [{
5107
- name: "settlement",
5108
- detail: "The settlement date of the security, the date after issuance when the security is delivered to the buyer.",
5109
- example: "DATE(2010",
5110
- require: "m",
5111
- repeat: "n",
5112
- type: "rangeall"
5113
- }, {
5114
- name: "maturity",
5115
- detail: "The maturity or end date of the security, when it can be redeemed at face, or par value.",
5116
- example: "DATE(2010",
5117
- require: "m",
5118
- repeat: "n",
5119
- type: "rangeall"
5120
- }, {
5121
- name: "rate",
5122
- detail: "The annualized rate of interest.",
5123
- example: "0.057",
5124
- require: "m",
5125
- repeat: "n",
5126
- type: "rangenumber"
5127
- }, {
5128
- name: "yield",
5129
- detail: "The expected annual yield of the security.",
5130
- example: "0.065",
5131
- require: "m",
5132
- repeat: "n",
5133
- type: "rangenumber"
5134
- }, {
5135
- name: "redemption",
5136
- detail: "The redemption amount per 100 face value, or par.",
5137
- example: "100",
5138
- require: "m",
5139
- repeat: "n",
5140
- type: "rangenumber"
5141
- }, {
5142
- name: "frequency",
5143
- detail: "The number of interest or coupon payments per year (1, 2, or 4).",
5144
- example: "1",
5145
- require: "m",
5146
- repeat: "n",
5147
- type: "rangenumber"
5148
- }, {
5149
- name: "day_count_convention",
5150
- detail: "An indicator of what day count method to use.",
5151
- example: "0",
5152
- require: "o",
5153
- repeat: "n",
5154
- type: "rangenumber"
5155
- }]
5156
5100
  }, {
5157
5101
  n: "PRICEDISC",
5158
5102
  t: 8,
@@ -516,8 +516,10 @@ export function cellFocus(ctx, r, c, clickMode) {
516
516
  if (!dataVerification) return;
517
517
  var row = ctx.visibledatarow[r];
518
518
  var row_pre = r === 0 ? 0 : ctx.visibledatarow[r - 1];
519
+ var row_pre2 = r === 0 ? 0 : ctx.visibledatarow[r - 3];
519
520
  var col = ctx.visibledatacolumn[c];
520
521
  var col_pre = c === 0 ? 0 : ctx.visibledatacolumn[c - 1];
522
+ var col_pre2 = c === 0 ? 0 : ctx.visibledatacolumn[c];
521
523
  var d = getFlowdata(ctx);
522
524
  if (!d) return;
523
525
  var margeSet = mergeBorder(ctx, d, r, c);
@@ -579,8 +581,8 @@ export function cellFocus(ctx, r, c, clickMode) {
579
581
  failureText = invalidText + failureText + getFailureText(ctx, item);
580
582
  showHintBox.innerHTML = failureText;
581
583
  showHintBox.style.display = "block";
582
- showHintBox.style.left = "".concat(col_pre, "px");
583
- showHintBox.style.top = "".concat(row, "px");
584
+ showHintBox.style.left = "".concat(col_pre2, "px");
585
+ showHintBox.style.top = "".concat(row_pre2, "px");
584
586
  }
585
587
  }
586
588
  export function setDropdownValue(ctx, value, arr) {
package/lib/canvas.js CHANGED
@@ -18,7 +18,7 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
18
18
  var defaultStyle = exports.defaultStyle = {
19
19
  fillStyle: "#000000",
20
20
  textBaseline: "middle",
21
- strokeStyle: "#e8ebec",
21
+ strokeStyle: "#dfdfdf",
22
22
  rowFillStyle: "#5e5e5e",
23
23
  textAlign: "center"
24
24
  };
@@ -798,9 +798,9 @@ var Canvas = exports.Canvas = function () {
798
798
  var finalPillWidth = ((columnWidth === null || columnWidth === void 0 ? void 0 : columnWidth[c]) || 70) - 5;
799
799
  var ps_w = finalPillWidth * this.sheetCtx.zoomRatio;
800
800
  var ps_h = 16 * this.sheetCtx.zoomRatio;
801
- var radius = 5 * this.sheetCtx.zoomRatio;
801
+ var radius = 8 * this.sheetCtx.zoomRatio;
802
802
  var x = endX + offsetLeft - 4 - ps_w;
803
- var y = startY + offsetTop + 2;
803
+ var y = startY + offsetTop + 2.7;
804
804
  renderCtx.beginPath();
805
805
  renderCtx.fillStyle = "rgba(232, 235, 236, 1)";
806
806
  renderCtx.roundRect(x, y, ps_w, ps_h, radius);
@@ -808,7 +808,7 @@ var Canvas = exports.Canvas = function () {
808
808
  renderCtx.closePath();
809
809
  var chevronWidth = 7 * this.sheetCtx.zoomRatio;
810
810
  var chevronHeight = 4 * this.sheetCtx.zoomRatio;
811
- var chevronX = x + ps_w - chevronWidth - 2 * this.sheetCtx.zoomRatio;
811
+ var chevronX = x - 2 + ps_w - chevronWidth - 2 * this.sheetCtx.zoomRatio;
812
812
  var chevronY = y + (ps_h - chevronHeight) / 2;
813
813
  renderCtx.beginPath();
814
814
  renderCtx.fillStyle = "rgba(0, 0, 0, 1)";
@@ -910,9 +910,9 @@ var Canvas = exports.Canvas = function () {
910
910
  var finalPillWidth = ((columnWidth === null || columnWidth === void 0 ? void 0 : columnWidth[c]) || 70) - 5;
911
911
  var ps_w = finalPillWidth * this.sheetCtx.zoomRatio;
912
912
  var ps_h = 16 * this.sheetCtx.zoomRatio;
913
- var radius = 5 * this.sheetCtx.zoomRatio;
913
+ var radius = 8 * this.sheetCtx.zoomRatio;
914
914
  var baseX = endX + offsetLeft - 4 - ps_w;
915
- var baseY = startY + offsetTop + 2;
915
+ var baseY = startY + offsetTop + 2.7;
916
916
  var pillSpacing = 2 * this.sheetCtx.zoomRatio;
917
917
  var _loop_1 = function _loop_1(i) {
918
918
  var x = baseX;
@@ -925,13 +925,13 @@ var Canvas = exports.Canvas = function () {
925
925
  });
926
926
  renderCtx.beginPath();
927
927
  renderCtx.fillStyle = bgColor || "rgba(232, 235, 236, 1)";
928
- renderCtx.roundRect(x, y, ps_w - 8, ps_h, radius);
928
+ renderCtx.roundRect(x, y, ps_w, ps_h, radius);
929
929
  renderCtx.fill();
930
930
  renderCtx.closePath();
931
931
  if (i === 0) {
932
932
  var chevronWidth = 7 * this_1.sheetCtx.zoomRatio;
933
933
  var chevronHeight = 4 * this_1.sheetCtx.zoomRatio;
934
- var chevronX = x + 3 + ps_w - chevronWidth - 2 * this_1.sheetCtx.zoomRatio;
934
+ var chevronX = x - 2 + ps_w - chevronWidth - 2 * this_1.sheetCtx.zoomRatio;
935
935
  var chevronY = y + (ps_h - chevronHeight) / 2;
936
936
  renderCtx.beginPath();
937
937
  renderCtx.fillStyle = "rgba(0, 0, 0, 1)";
package/lib/locale/en.js CHANGED
@@ -5103,62 +5103,6 @@ var _default = exports.default = {
5103
5103
  repeat: "n",
5104
5104
  type: "rangenumber"
5105
5105
  }]
5106
- }, {
5107
- n: "PRICE",
5108
- t: 8,
5109
- d: "Calculates the price of a security paying periodic interest, such as a US Treasury Bond, based on expected yield.",
5110
- a: "Price of a security paying periodic interest.",
5111
- m: [6, 7],
5112
- p: [{
5113
- name: "settlement",
5114
- detail: "The settlement date of the security, the date after issuance when the security is delivered to the buyer.",
5115
- example: "DATE(2010",
5116
- require: "m",
5117
- repeat: "n",
5118
- type: "rangeall"
5119
- }, {
5120
- name: "maturity",
5121
- detail: "The maturity or end date of the security, when it can be redeemed at face, or par value.",
5122
- example: "DATE(2010",
5123
- require: "m",
5124
- repeat: "n",
5125
- type: "rangeall"
5126
- }, {
5127
- name: "rate",
5128
- detail: "The annualized rate of interest.",
5129
- example: "0.057",
5130
- require: "m",
5131
- repeat: "n",
5132
- type: "rangenumber"
5133
- }, {
5134
- name: "yield",
5135
- detail: "The expected annual yield of the security.",
5136
- example: "0.065",
5137
- require: "m",
5138
- repeat: "n",
5139
- type: "rangenumber"
5140
- }, {
5141
- name: "redemption",
5142
- detail: "The redemption amount per 100 face value, or par.",
5143
- example: "100",
5144
- require: "m",
5145
- repeat: "n",
5146
- type: "rangenumber"
5147
- }, {
5148
- name: "frequency",
5149
- detail: "The number of interest or coupon payments per year (1, 2, or 4).",
5150
- example: "1",
5151
- require: "m",
5152
- repeat: "n",
5153
- type: "rangenumber"
5154
- }, {
5155
- name: "day_count_convention",
5156
- detail: "An indicator of what day count method to use.",
5157
- example: "0",
5158
- require: "o",
5159
- repeat: "n",
5160
- type: "rangenumber"
5161
- }]
5162
5106
  }, {
5163
5107
  n: "PRICEDISC",
5164
5108
  t: 8,
@@ -531,8 +531,10 @@ function cellFocus(ctx, r, c, clickMode) {
531
531
  if (!dataVerification) return;
532
532
  var row = ctx.visibledatarow[r];
533
533
  var row_pre = r === 0 ? 0 : ctx.visibledatarow[r - 1];
534
+ var row_pre2 = r === 0 ? 0 : ctx.visibledatarow[r - 3];
534
535
  var col = ctx.visibledatacolumn[c];
535
536
  var col_pre = c === 0 ? 0 : ctx.visibledatacolumn[c - 1];
537
+ var col_pre2 = c === 0 ? 0 : ctx.visibledatacolumn[c];
536
538
  var d = (0, _.getFlowdata)(ctx);
537
539
  if (!d) return;
538
540
  var margeSet = (0, _.mergeBorder)(ctx, d, r, c);
@@ -594,8 +596,8 @@ function cellFocus(ctx, r, c, clickMode) {
594
596
  failureText = invalidText + failureText + getFailureText(ctx, item);
595
597
  showHintBox.innerHTML = failureText;
596
598
  showHintBox.style.display = "block";
597
- showHintBox.style.left = "".concat(col_pre, "px");
598
- showHintBox.style.top = "".concat(row, "px");
599
+ showHintBox.style.left = "".concat(col_pre2, "px");
600
+ showHintBox.style.top = "".concat(row_pre2, "px");
599
601
  }
600
602
  }
601
603
  function setDropdownValue(ctx, value, arr) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fileverse-dev/fortune-core",
3
- "version": "1.2.4",
3
+ "version": "1.2.5-onchain-functions-1",
4
4
  "main": "lib/index.js",
5
5
  "module": "es/index.js",
6
6
  "typings": "lib/index.d.ts",
@@ -15,7 +15,7 @@
15
15
  "dev": "father-build --watch"
16
16
  },
17
17
  "dependencies": {
18
- "@fileverse-dev/formula-parser": "0.2.72",
18
+ "@fileverse-dev/formula-parser": "0.2.7-onchain-functions-1",
19
19
  "dayjs": "^1.11.0",
20
20
  "immer": "^9.0.12",
21
21
  "lodash": "^4.17.21",