tnx-shared 5.3.232 → 5.3.234

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.
@@ -18671,7 +18671,7 @@
18671
18671
  case 5: return [4 /*yield*/, this._processAfterGetData(response.data)];
18672
18672
  case 6:
18673
18673
  _e.sent();
18674
- return [4 /*yield*/, this.onAfterGetDetail()];
18674
+ return [4 /*yield*/, this.onAfterGetDetail(response.data)];
18675
18675
  case 7:
18676
18676
  _e.sent();
18677
18677
  return [3 /*break*/, 10];
@@ -18704,7 +18704,7 @@
18704
18704
  return [4 /*yield*/, this._processAfterGetData(resultCheck.data)];
18705
18705
  case 13:
18706
18706
  _e.sent();
18707
- return [4 /*yield*/, this.onAfterGetDetail()];
18707
+ return [4 /*yield*/, this.onAfterGetDetail(resultCheck.data)];
18708
18708
  case 14:
18709
18709
  _e.sent();
18710
18710
  return [3 /*break*/, 17];
@@ -19057,7 +19057,7 @@
19057
19057
  this.model.data.id = this._commonService.guid();
19058
19058
  }
19059
19059
  };
19060
- DataFormBase.prototype.onAfterGetDetail = function () {
19060
+ DataFormBase.prototype.onAfterGetDetail = function (data) {
19061
19061
  return __awaiter(this, void 0, void 0, function () {
19062
19062
  return __generator(this, function (_e) {
19063
19063
  return [2 /*return*/];
@@ -54328,6 +54328,7 @@
54328
54328
  this.content = '';
54329
54329
  this.id = '';
54330
54330
  this.id = this._commonService.guid();
54331
+ this.loadMathConfig();
54331
54332
  }
54332
54333
  // ngOnChanges(changes: SimpleChanges) {
54333
54334
  // if (changes['content']) {
@@ -54360,28 +54361,36 @@
54360
54361
  var $this = _this;
54361
54362
  var autoScrollBottom = !!((_a = $this.control) === null || _a === void 0 ? void 0 : _a.autoScrollBottom);
54362
54363
  var output = $this.mathContent.nativeElement;
54363
- output.innerHTML = ((_b = $this.content) === null || _b === void 0 ? void 0 : _b.trim()) || '';
54364
- $this.mathJaxObject.texReset();
54365
- $this.mathJaxObject.typesetClear();
54366
- $this.mathJaxObject.typesetPromise([output]).catch(function (err) {
54367
- output.innerHTML = '';
54368
- output.appendChild(document.createTextNode(err.message));
54369
- console.error(err);
54370
- }).then(function () {
54371
- var _a, _b, _c;
54372
- // Do something after typeset
54373
- if (autoScrollBottom) {
54374
- var box = document.querySelector("#math-preview-box-" + $this.id);
54375
- var elem = box.getElementsByClassName('ps--active-y')[0];
54376
- if (elem) {
54377
- elem.scrollTop = elem.scrollHeight;
54378
- }
54379
- }
54380
- var value = (_c = (_b = (_a = document.getElementById("mathPreview-" + $this.id)) === null || _a === void 0 ? void 0 : _a.innerHTML) === null || _b === void 0 ? void 0 : _b.trim()) !== null && _c !== void 0 ? _c : '';
54381
- $this.onChange(value);
54382
- $this.onChanged.emit(value);
54383
- });
54384
- return _this.mathJaxObject.startup.defaultPageReady();
54364
+ var content = ((_b = $this.content) === null || _b === void 0 ? void 0 : _b.trim()) || '';
54365
+ content = content.replace(/\n/g, '<br>');
54366
+ output.innerHTML = content;
54367
+ if ($this.mathJaxObject.texReset) {
54368
+ $this.mathJaxObject.texReset();
54369
+ }
54370
+ if ($this.mathJaxObject.typesetClear) {
54371
+ $this.mathJaxObject.typesetClear();
54372
+ }
54373
+ if ($this.mathJaxObject.typesetPromise) {
54374
+ $this.mathJaxObject.typesetPromise([output]).catch(function (err) {
54375
+ output.innerHTML = '';
54376
+ output.appendChild(document.createTextNode(err.message));
54377
+ console.error(err);
54378
+ }).then(function () {
54379
+ var _a, _b, _c;
54380
+ // Do something after typeset
54381
+ if (autoScrollBottom) {
54382
+ var box = document.querySelector("#math-preview-box-" + $this.id);
54383
+ var elem = box.getElementsByClassName('ps--active-y')[0];
54384
+ if (elem) {
54385
+ elem.scrollTop = elem.scrollHeight;
54386
+ }
54387
+ }
54388
+ var value = (_c = (_b = (_a = document.getElementById("mathPreview-" + $this.id)) === null || _a === void 0 ? void 0 : _a.innerHTML) === null || _b === void 0 ? void 0 : _b.trim()) !== null && _c !== void 0 ? _c : '';
54389
+ $this.onChange(value);
54390
+ $this.onChanged.emit(value);
54391
+ });
54392
+ }
54393
+ return $this.mathJaxObject.startup.defaultPageReady ? $this.mathJaxObject.startup.defaultPageReady() : $this.mathJaxObject.startup.defaultPageReady;
54385
54394
  });
54386
54395
  };
54387
54396
  HtmlPreviewComponent.prototype.loadMathConfig = function () {
@@ -54437,7 +54446,6 @@
54437
54446
  document.head.appendChild(script);
54438
54447
  };
54439
54448
  HtmlPreviewComponent.prototype.ngOnInit = function () {
54440
- this.loadMathConfig();
54441
54449
  };
54442
54450
  return HtmlPreviewComponent;
54443
54451
  }());