@fileverse-dev/fortune-react 1.0.2-mod-19 → 1.0.2-mod-20

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/dist/index.css CHANGED
@@ -3304,8 +3304,8 @@ label {
3304
3304
  height: 252px;
3305
3305
  background: rgb(240, 240, 240);
3306
3306
  position: absolute;
3307
- bottom: 10px;
3308
- left: 100px;
3307
+ bottom: -110px;
3308
+ left: 197px;
3309
3309
  border-radius: 6px;
3310
3310
  box-shadow: 0 2px 4px rgb(0 0 0 / 20%);
3311
3311
  border: 1px solid rgba(0, 0, 0, 0.2);
@@ -3304,8 +3304,8 @@ label {
3304
3304
  height: 252px;
3305
3305
  background: rgb(240, 240, 240);
3306
3306
  position: absolute;
3307
- bottom: 10px;
3308
- left: 100px;
3307
+ bottom: -110px;
3308
+ left: 197px;
3309
3309
  border-radius: 6px;
3310
3310
  box-shadow: 0 2px 4px rgb(0 0 0 / 20%);
3311
3311
  border: 1px solid rgba(0, 0, 0, 0.2);
package/dist/index.esm.js CHANGED
@@ -137,274 +137,115 @@ function _objectWithoutPropertiesLoose(r, e) {
137
137
  }
138
138
  return t;
139
139
  }
140
- function _regeneratorRuntime() {
141
- _regeneratorRuntime = function () {
142
- return r;
143
- };
144
- var t,
145
- r = {},
146
- e = Object.prototype,
147
- n = e.hasOwnProperty,
148
- o = "function" == typeof Symbol ? Symbol : {},
149
- i = o.iterator || "@@iterator",
150
- a = o.asyncIterator || "@@asyncIterator",
151
- u = o.toStringTag || "@@toStringTag";
152
- function c(t, r, e, n) {
153
- return Object.defineProperty(t, r, {
154
- value: e,
155
- enumerable: !n,
156
- configurable: !n,
157
- writable: !n
158
- });
159
- }
160
- try {
161
- c({}, "");
162
- } catch (t) {
163
- c = function (t, r, e) {
164
- return t[r] = e;
165
- };
166
- }
167
- function h(r, e, n, o) {
168
- var i = e && e.prototype instanceof Generator ? e : Generator,
169
- a = Object.create(i.prototype);
170
- return c(a, "_invoke", function (r, e, n) {
171
- var o = 1;
172
- return function (i, a) {
173
- if (3 === o) throw Error("Generator is already running");
174
- if (4 === o) {
175
- if ("throw" === i) throw a;
176
- return {
177
- value: t,
178
- done: !0
179
- };
180
- }
181
- for (n.method = i, n.arg = a;;) {
182
- var u = n.delegate;
183
- if (u) {
184
- var c = d(u, n);
185
- if (c) {
186
- if (c === f) continue;
187
- return c;
188
- }
140
+ function _regenerator() {
141
+ /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */
142
+ var e,
143
+ t,
144
+ r = "function" == typeof Symbol ? Symbol : {},
145
+ n = r.iterator || "@@iterator",
146
+ o = r.toStringTag || "@@toStringTag";
147
+ function i(r, n, o, i) {
148
+ var c = n && n.prototype instanceof Generator ? n : Generator,
149
+ u = Object.create(c.prototype);
150
+ return _regeneratorDefine(u, "_invoke", function (r, n, o) {
151
+ var i,
152
+ c,
153
+ u,
154
+ f = 0,
155
+ p = o || [],
156
+ y = !1,
157
+ G = {
158
+ p: 0,
159
+ n: 0,
160
+ v: e,
161
+ a: d,
162
+ f: d.bind(e, 4),
163
+ d: function (t, r) {
164
+ return i = t, c = 0, u = e, G.n = r, a;
189
165
  }
190
- if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) {
191
- if (1 === o) throw o = 4, n.arg;
192
- n.dispatchException(n.arg);
193
- } else "return" === n.method && n.abrupt("return", n.arg);
194
- o = 3;
195
- var h = s(r, e, n);
196
- if ("normal" === h.type) {
197
- if (o = n.done ? 4 : 2, h.arg === f) continue;
198
- return {
199
- value: h.arg,
200
- done: n.done
201
- };
166
+ };
167
+ function d(r, n) {
168
+ for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) {
169
+ var o,
170
+ i = p[t],
171
+ d = G.p,
172
+ l = i[2];
173
+ r > 3 ? (o = l === n) && (c = i[4] || 3, u = i[5] === e ? i[3] : i[5], i[4] = 3, i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0));
174
+ }
175
+ if (o || r > 1) return a;
176
+ throw y = !0, n;
177
+ }
178
+ return function (o, p, l) {
179
+ if (f > 1) throw TypeError("Generator is already running");
180
+ for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) {
181
+ i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u);
182
+ try {
183
+ if (f = 2, i) {
184
+ if (c || (o = "next"), t = i[o]) {
185
+ if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object");
186
+ if (!t.done) return t;
187
+ u = t.value, c < 2 && (c = 0);
188
+ } else 1 === c && (t = i.return) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1);
189
+ i = e;
190
+ } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break;
191
+ } catch (t) {
192
+ i = e, c = 1, u = t;
193
+ } finally {
194
+ f = 1;
202
195
  }
203
- "throw" === h.type && (o = 4, n.method = "throw", n.arg = h.arg);
204
196
  }
197
+ return {
198
+ value: t,
199
+ done: y
200
+ };
205
201
  };
206
- }(r, n, new Context(o || [])), !0), a;
207
- }
208
- function s(t, r, e) {
209
- try {
210
- return {
211
- type: "normal",
212
- arg: t.call(r, e)
213
- };
214
- } catch (t) {
215
- return {
216
- type: "throw",
217
- arg: t
218
- };
219
- }
202
+ }(r, o, i), !0), u;
220
203
  }
221
- r.wrap = h;
222
- var f = {};
204
+ var a = {};
223
205
  function Generator() {}
224
206
  function GeneratorFunction() {}
225
207
  function GeneratorFunctionPrototype() {}
226
- var l = {};
227
- c(l, i, function () {
228
- return this;
229
- });
230
- var p = Object.getPrototypeOf,
231
- y = p && p(p(x([])));
232
- y && y !== e && n.call(y, i) && (l = y);
233
- var v = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(l);
234
- function g(t) {
235
- ["next", "throw", "return"].forEach(function (r) {
236
- c(t, r, function (t) {
237
- return this._invoke(r, t);
238
- });
239
- });
240
- }
241
- function AsyncIterator(t, r) {
242
- function e(o, i, a, u) {
243
- var c = s(t[o], t, i);
244
- if ("throw" !== c.type) {
245
- var h = c.arg,
246
- f = h.value;
247
- return f && "object" == typeof f && n.call(f, "__await") ? r.resolve(f.__await).then(function (t) {
248
- e("next", t, a, u);
249
- }, function (t) {
250
- e("throw", t, a, u);
251
- }) : r.resolve(f).then(function (t) {
252
- h.value = t, a(h);
253
- }, function (t) {
254
- return e("throw", t, a, u);
255
- });
256
- }
257
- u(c.arg);
258
- }
259
- var o;
260
- c(this, "_invoke", function (t, n) {
261
- function i() {
262
- return new r(function (r, o) {
263
- e(t, n, r, o);
264
- });
265
- }
266
- return o = o ? o.then(i, i) : i();
267
- }, !0);
268
- }
269
- function d(r, e) {
270
- var n = e.method,
271
- o = r.i[n];
272
- if (o === t) return e.delegate = null, "throw" === n && r.i.return && (e.method = "return", e.arg = t, d(r, e), "throw" === e.method) || "return" !== n && (e.method = "throw", e.arg = new TypeError("The iterator does not provide a '" + n + "' method")), f;
273
- var i = s(o, r.i, e.arg);
274
- if ("throw" === i.type) return e.method = "throw", e.arg = i.arg, e.delegate = null, f;
275
- var a = i.arg;
276
- return a ? a.done ? (e[r.r] = a.value, e.next = r.n, "return" !== e.method && (e.method = "next", e.arg = t), e.delegate = null, f) : a : (e.method = "throw", e.arg = new TypeError("iterator result is not an object"), e.delegate = null, f);
277
- }
278
- function w(t) {
279
- this.tryEntries.push(t);
208
+ t = Object.getPrototypeOf;
209
+ var c = [][n] ? t(t([][n]())) : (_regeneratorDefine(t = {}, n, function () {
210
+ return this;
211
+ }), t),
212
+ u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c);
213
+ function f(e) {
214
+ return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, _regeneratorDefine(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e;
280
215
  }
281
- function m(r) {
282
- var e = r[4] || {};
283
- e.type = "normal", e.arg = t, r[4] = e;
284
- }
285
- function Context(t) {
286
- this.tryEntries = [[-1]], t.forEach(w, this), this.reset(!0);
287
- }
288
- function x(r) {
289
- if (null != r) {
290
- var e = r[i];
291
- if (e) return e.call(r);
292
- if ("function" == typeof r.next) return r;
293
- if (!isNaN(r.length)) {
294
- var o = -1,
295
- a = function e() {
296
- for (; ++o < r.length;) if (n.call(r, o)) return e.value = r[o], e.done = !1, e;
297
- return e.value = t, e.done = !0, e;
298
- };
299
- return a.next = a;
300
- }
301
- }
302
- throw new TypeError(typeof r + " is not iterable");
303
- }
304
- return GeneratorFunction.prototype = GeneratorFunctionPrototype, c(v, "constructor", GeneratorFunctionPrototype), c(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = c(GeneratorFunctionPrototype, u, "GeneratorFunction"), r.isGeneratorFunction = function (t) {
305
- var r = "function" == typeof t && t.constructor;
306
- return !!r && (r === GeneratorFunction || "GeneratorFunction" === (r.displayName || r.name));
307
- }, r.mark = function (t) {
308
- return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, c(t, u, "GeneratorFunction")), t.prototype = Object.create(v), t;
309
- }, r.awrap = function (t) {
310
- return {
311
- __await: t
312
- };
313
- }, g(AsyncIterator.prototype), c(AsyncIterator.prototype, a, function () {
216
+ return GeneratorFunction.prototype = GeneratorFunctionPrototype, _regeneratorDefine(u, "constructor", GeneratorFunctionPrototype), _regeneratorDefine(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", _regeneratorDefine(GeneratorFunctionPrototype, o, "GeneratorFunction"), _regeneratorDefine(u), _regeneratorDefine(u, o, "Generator"), _regeneratorDefine(u, n, function () {
314
217
  return this;
315
- }), r.AsyncIterator = AsyncIterator, r.async = function (t, e, n, o, i) {
316
- void 0 === i && (i = Promise);
317
- var a = new AsyncIterator(h(t, e, n, o), i);
318
- return r.isGeneratorFunction(e) ? a : a.next().then(function (t) {
319
- return t.done ? t.value : a.next();
320
- });
321
- }, g(v), c(v, u, "Generator"), c(v, i, function () {
322
- return this;
323
- }), c(v, "toString", function () {
218
+ }), _regeneratorDefine(u, "toString", function () {
324
219
  return "[object Generator]";
325
- }), r.keys = function (t) {
326
- var r = Object(t),
327
- e = [];
328
- for (var n in r) e.unshift(n);
329
- return function t() {
330
- for (; e.length;) if ((n = e.pop()) in r) return t.value = n, t.done = !1, t;
331
- return t.done = !0, t;
220
+ }), (_regenerator = function () {
221
+ return {
222
+ w: i,
223
+ m: f
332
224
  };
333
- }, r.values = x, Context.prototype = {
334
- constructor: Context,
335
- reset: function (r) {
336
- if (this.prev = this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(m), !r) for (var e in this) "t" === e.charAt(0) && n.call(this, e) && !isNaN(+e.slice(1)) && (this[e] = t);
337
- },
338
- stop: function () {
339
- this.done = !0;
340
- var t = this.tryEntries[0][4];
341
- if ("throw" === t.type) throw t.arg;
342
- return this.rval;
343
- },
344
- dispatchException: function (r) {
345
- if (this.done) throw r;
346
- var e = this;
347
- function n(t) {
348
- a.type = "throw", a.arg = r, e.next = t;
349
- }
350
- for (var o = e.tryEntries.length - 1; o >= 0; --o) {
351
- var i = this.tryEntries[o],
352
- a = i[4],
353
- u = this.prev,
354
- c = i[1],
355
- h = i[2];
356
- if (-1 === i[0]) return n("end"), !1;
357
- if (!c && !h) throw Error("try statement without catch or finally");
358
- if (null != i[0] && i[0] <= u) {
359
- if (u < c) return this.method = "next", this.arg = t, n(c), !0;
360
- if (u < h) return n(h), !1;
361
- }
362
- }
363
- },
364
- abrupt: function (t, r) {
365
- for (var e = this.tryEntries.length - 1; e >= 0; --e) {
366
- var n = this.tryEntries[e];
367
- if (n[0] > -1 && n[0] <= this.prev && this.prev < n[2]) {
368
- var o = n;
369
- break;
370
- }
371
- }
372
- o && ("break" === t || "continue" === t) && o[0] <= r && r <= o[2] && (o = null);
373
- var i = o ? o[4] : {};
374
- return i.type = t, i.arg = r, o ? (this.method = "next", this.next = o[2], f) : this.complete(i);
375
- },
376
- complete: function (t, r) {
377
- if ("throw" === t.type) throw t.arg;
378
- return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && r && (this.next = r), f;
379
- },
380
- finish: function (t) {
381
- for (var r = this.tryEntries.length - 1; r >= 0; --r) {
382
- var e = this.tryEntries[r];
383
- if (e[2] === t) return this.complete(e[4], e[3]), m(e), f;
384
- }
385
- },
386
- catch: function (t) {
387
- for (var r = this.tryEntries.length - 1; r >= 0; --r) {
388
- var e = this.tryEntries[r];
389
- if (e[0] === t) {
390
- var n = e[4];
391
- if ("throw" === n.type) {
392
- var o = n.arg;
393
- m(e);
394
- }
395
- return o;
396
- }
225
+ })();
226
+ }
227
+ function _regeneratorDefine(e, r, n, t) {
228
+ var i = Object.defineProperty;
229
+ try {
230
+ i({}, "", {});
231
+ } catch (e) {
232
+ i = 0;
233
+ }
234
+ _regeneratorDefine = function (e, r, n, t) {
235
+ if (r) i ? i(e, r, {
236
+ value: n,
237
+ enumerable: !t,
238
+ configurable: !t,
239
+ writable: !t
240
+ }) : e[r] = n;else {
241
+ function o(r, n) {
242
+ _regeneratorDefine(e, r, function (e) {
243
+ return this._invoke(r, n, e);
244
+ });
397
245
  }
398
- throw Error("illegal catch attempt");
399
- },
400
- delegateYield: function (r, e, n) {
401
- return this.delegate = {
402
- i: x(r),
403
- r: e,
404
- n: n
405
- }, "next" === this.method && (this.arg = t), f;
246
+ o("next", 0), o("throw", 1), o("return", 2);
406
247
  }
407
- }, r;
248
+ }, _regeneratorDefine(e, r, n, t);
408
249
  }
409
250
  function _slicedToArray(r, e) {
410
251
  return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();
@@ -588,12 +429,19 @@ var ColumnHeader = function ColumnHeader() {
588
429
  useEffect(function () {
589
430
  var s = context.luckysheet_select_save;
590
431
  if (_.isNil(s)) return;
432
+ setSelectedLocation([]);
433
+ if (s[0].row_select) return;
591
434
  var columnTitleMap = {};
592
435
  for (var i = 0; i < s.length; i += 1) {
593
436
  var c1 = s[i].column[0];
594
437
  var c2 = s[i].column[1];
595
438
  columnTitleMap = selectTitlesMap(columnTitleMap, c1, c2);
596
439
  }
440
+ console.log({
441
+ x: s[0].row_select,
442
+ y: s[0].column_select,
443
+ columnTitleMap: columnTitleMap
444
+ });
597
445
  var columnTitleRange = selectTitlesRange(columnTitleMap);
598
446
  var selects = [];
599
447
  for (var j = 0; j < columnTitleRange.length; j += 1) {
@@ -678,7 +526,8 @@ var ColumnHeader = function ColumnHeader() {
678
526
  left: col_pre,
679
527
  width: col - col_pre - 1,
680
528
  display: "block",
681
- backgroundColor: "rgba(76, 76, 76, 0.1)"
529
+ backgroundColor: "#EFC703",
530
+ mixBlendMode: "multiply"
682
531
  }, fixColumnStyleOverflowInFreeze(context, c1, c2, (_refs$globalCache$fre3 = refs.globalCache.freezen) === null || _refs$globalCache$fre3 === void 0 ? void 0 : _refs$globalCache$fre3[context.currentSheetId]))
683
532
  });
684
533
  }), /*#__PURE__*/React.createElement("div", {
@@ -792,7 +641,11 @@ var RowHeader = function RowHeader() {
792
641
  });
793
642
  }, [refs.workbookContainer, setContext, settings, refs.cellArea]);
794
643
  useEffect(function () {
644
+ var _s$;
795
645
  var s = context.luckysheet_select_save || [];
646
+ if (_.isNil(s)) return;
647
+ setSelectedLocation([]);
648
+ if ((_s$ = s[0]) === null || _s$ === void 0 ? void 0 : _s$.column_select) return;
796
649
  var rowTitleMap = {};
797
650
  for (var i = 0; i < s.length; i += 1) {
798
651
  var r1 = s[i].row[0];
@@ -865,7 +718,8 @@ var RowHeader = function RowHeader() {
865
718
  top: row_pre,
866
719
  height: row - row_pre - 1,
867
720
  display: "block",
868
- backgroundColor: "rgba(76, 76, 76, 0.1)"
721
+ backgroundColor: "#EFC703",
722
+ mixBlendMode: "multiply"
869
723
  }, fixRowStyleOverflowInFreeze(context, r1, r2, (_refs$globalCache$fre3 = refs.globalCache.freezen) === null || _refs$globalCache$fre3 === void 0 ? void 0 : _refs$globalCache$fre3[context.currentSheetId]))
870
724
  });
871
725
  }), /*#__PURE__*/React.createElement("div", {
@@ -7600,22 +7454,21 @@ var ContextMenu = function ContextMenu() {
7600
7454
  return /*#__PURE__*/React.createElement(Menu, {
7601
7455
  key: name,
7602
7456
  onClick: function () {
7603
- var _onClick = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
7457
+ var _onClick = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee() {
7604
7458
  var clipboardText;
7605
- return _regeneratorRuntime().wrap(function _callee$(_context) {
7606
- while (1) switch (_context.prev = _context.next) {
7459
+ return _regenerator().w(function (_context) {
7460
+ while (1) switch (_context.n) {
7607
7461
  case 0:
7608
- _context.next = 2;
7462
+ _context.n = 1;
7609
7463
  return navigator.clipboard.readText();
7610
- case 2:
7611
- clipboardText = _context.sent;
7464
+ case 1:
7465
+ clipboardText = _context.v;
7612
7466
  setContext(function (draftCtx) {
7613
7467
  handlePasteByClick(draftCtx, clipboardText);
7614
7468
  draftCtx.contextMenu = {};
7615
7469
  });
7616
- case 4:
7617
- case "end":
7618
- return _context.stop();
7470
+ case 2:
7471
+ return _context.a(2);
7619
7472
  }
7620
7473
  }, _callee);
7621
7474
  }));