tnx-shared 5.3.205 → 5.3.207

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.
@@ -21371,6 +21371,7 @@
21371
21371
  var _this = _super.call(this, http, injector, _moduleConfigService.getConfig().environment.apiDomain.workflowEndpoint + "/" + _moduleConfigService.getConfig().environment.apiVersion + "/WorkflowPermissionDetail") || this;
21372
21372
  _this.serviceManagers = {};
21373
21373
  _this.entityName = 'WorkflowPermissionDetail';
21374
+ _this.tableName = '';
21374
21375
  _this.endPoint = _moduleConfigService.getConfig().environment.apiDomain.workflowEndpoint;
21375
21376
  _this._moduleConfig = _moduleConfigService.getConfig();
21376
21377
  return _this;
@@ -21383,6 +21384,7 @@
21383
21384
  };
21384
21385
  WorkflowPermissionDetailService.prototype.changeEndpoint = function (baseService) {
21385
21386
  this.serviceUri = this.getEndpointByService(baseService) + "/WorkflowPermissionDetail";
21387
+ this.tableName = baseService.entityName;
21386
21388
  return this;
21387
21389
  };
21388
21390
  WorkflowPermissionDetailService.prototype.appendInfoForWorkflowSingle = function (userIdCurrent, data, fieldKey, ignoreWorkflow, callBackWhenNotHaveStatus) {
@@ -21492,6 +21494,9 @@
21492
21494
  this.newFilter('itemId', exports.Operator.in, lstItemId),
21493
21495
  this.newFilter('notInWorkflow', exports.Operator.equal, false),
21494
21496
  ];
21497
+ if (this.tableName) {
21498
+ filters.push(this.newFilter('tableName', exports.Operator.equal, this.tableName));
21499
+ }
21495
21500
  sorts = [];
21496
21501
  if (!ignoreWorkflow) {
21497
21502
  filters.push(this.newFilter('userId', exports.Operator.equal, userIdCurrent));
@@ -46624,10 +46629,11 @@
46624
46629
  };
46625
46630
  EquationEditorComponent.prototype.onModelChange = function (evt) {
46626
46631
  var _this = this;
46632
+ console.log(evt);
46627
46633
  clearTimeout(this.timeoutModelChange);
46628
- if (this.equationLatex && this.equationLatex.trim() != '') {
46634
+ if (evt && typeof evt == 'string' && evt.trim() != '') {
46629
46635
  this.timeoutModelChange = setTimeout(function () {
46630
- _this.showPreview(_this.equationLatex.trim());
46636
+ _this.showPreview(evt.trim());
46631
46637
  }, 500);
46632
46638
  }
46633
46639
  };
@@ -46679,12 +46685,12 @@
46679
46685
  selector: 'equation-editor',
46680
46686
  template: "<div class=\"ui-fluid\">\n <textarea #textarea class=\"latexContent\" placeholder=\"G\u00F5 c\u00F4ng th\u1EE9c to\u00E1n h\u1ECDc t\u1EA1i \u0111\u00E2y...\" rows=\"6\" pInputTextarea\n (ngModelChange)=\"onModelChange($event)\" [(ngModel)]=\"equationLatex\"></textarea>\n</div>\n<div class=\"preview\">\n <img #preview latex=\"true\" *ngIf=\"imageSrc\" [attr.height]=\"data.height != 0 ? data.height : null\"\n class=\"latex\" [style]=\"data.style | safeStyle\" [src]=\"imageSrc\" [alt]=\"equationLatex\" />\n</div>",
46681
46687
  providers: [ComponentContextService],
46682
- styles: [".btn-equation{width:30px;height:30px;cursor:pointer}.preview{text-align:center;margin-top:10px;padding:0 10px}.latexContent{resize:none;border-radius:0}"]
46688
+ styles: [".btn-equation{width:30px;height:30px;cursor:pointer}.preview{text-align:center;margin:20px 10px}.latexContent{resize:none;border-radius:0}textarea{width:100%}"]
46683
46689
  },] }
46684
46690
  ];
46685
46691
  EquationEditorComponent.ctorParameters = function () { return [
46686
46692
  { type: i0.Injector },
46687
- { type: TemplateService },
46693
+ { type: TemplateInstanceService },
46688
46694
  { type: platformBrowser.DomSanitizer }
46689
46695
  ]; };
46690
46696
  EquationEditorComponent.propDecorators = {
@@ -51692,6 +51698,21 @@
51692
51698
  TnTinymceComponent.prototype.getTinyMceConfigByMode = function (mode) {
51693
51699
  var _this = this;
51694
51700
  var $this = this;
51701
+ tinymce.PluginManager.add('equation', function (editor) {
51702
+ var openDialog = function () {
51703
+ $this.header = 'Công thức toán học (dùng laTex)';
51704
+ $this.equationFormModel.show = true;
51705
+ $this.popupSize = { width: 1200, height: 700 };
51706
+ };
51707
+ editor.ui.registry.addButton('equation', {
51708
+ tooltip: 'Công thức toán học vào nội dung',
51709
+ // icon: 'insert-character',
51710
+ icon: 'ltr',
51711
+ onAction: function () {
51712
+ openDialog();
51713
+ }
51714
+ });
51715
+ });
51695
51716
  tinymce.PluginManager.add('addNews', function (editor) {
51696
51717
  var openDialog = function () {
51697
51718
  $this.header = 'Thêm/Chọn tin bài';
@@ -51715,7 +51736,7 @@
51715
51736
  };
51716
51737
  editor.ui.registry.addButton('template', {
51717
51738
  tooltip: 'Template',
51718
- icon: 'non-breaking',
51739
+ icon: 'template',
51719
51740
  onAction: function () {
51720
51741
  openDialog();
51721
51742
  }
@@ -51843,33 +51864,34 @@
51843
51864
  },
51844
51865
  mobile: {
51845
51866
  theme: 'silver',
51846
- plugins: ['advlist autolink lists link image charmap print preview anchor textcolor searchreplace visualblocks code fullscreen insertdatetime media table media code lists colorpicker imagetools tabfocus textcolor'],
51867
+ plugins: ['advlist autolink lists link image charmap print preview anchor textcolor searchreplace visualblocks code fullscreen insertdatetime media table media code lists colorpicker imagetools tabfocus textcolor equation'],
51847
51868
  }
51848
51869
  };
51849
51870
  if (mode == 'full') {
51850
51871
  config.plugins = [
51851
- 'advlist autolink lists link image charmap print preview anchor textcolor searchreplace visualblocks code fullscreen insertdatetime media table media code lists colorpicker imagetools tabfocus editFileNew addNews'
51872
+ 'advlist autolink lists link image charmap print preview anchor textcolor searchreplace visualblocks code fullscreen insertdatetime media table media code lists colorpicker imagetools tabfocus editFileNew addNews equation'
51852
51873
  ];
51853
- config.toolbar = 'formatselect | bold italic Strikethrough forecolor backcolor | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | table link editFileNew addNews | print removeformat undo redo | fullscreen ';
51854
- config.mobile.toolbar = 'bold italic Strikethrough forecolor backcolor | bullist numlist | fullscreen';
51855
- config.paste_data_images = true;
51874
+ config.toolbar = 'formatselect | bold italic Strikethrough forecolor backcolor | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | table link editFileNew addNews | print removeformat undo redo | equation | fullscreen ';
51875
+ config.mobile.toolbar = 'bold italic Strikethrough forecolor backcolor | bullist numlist | equation | fullscreen';
51856
51876
  return config;
51857
51877
  }
51858
51878
  else if (mode == 'medium') {
51859
- config.plugins = ['advlist autolink lists link image charmap print preview anchor textcolor searchreplace visualblocks code fullscreen insertdatetime media table media code lists colorpicker imagetools tabfocus textcolor'];
51860
- config.toolbar = 'formatselect | bold italic Strikethrough forecolor backcolor | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | table link | print removeformat undo redo | fullscreen';
51861
- config.mobile.toolbar = 'bold italic Strikethrough forecolor backcolor | bullist numlist | fullscreen';
51862
- config.paste_data_images = true;
51879
+ config.plugins = ['advlist autolink lists link image charmap print preview anchor textcolor searchreplace visualblocks code fullscreen insertdatetime media table media code lists colorpicker imagetools tabfocus textcolor equation'];
51880
+ config.toolbar = 'formatselect | bold italic Strikethrough forecolor backcolor | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | table link | print removeformat undo redo | equation | fullscreen';
51881
+ config.mobile.toolbar = 'bold italic Strikethrough forecolor backcolor | bullist numlist | equation | fullscreen';
51863
51882
  return config;
51864
51883
  }
51865
51884
  else if (mode == 'simple') {
51866
- config.plugins = ['advlist autolink lists link image charmap print preview anchor textcolor searchreplace visualblocks code fullscreen insertdatetime media table media code lists colorpicker imagetools tabfocus textcolor'];
51867
- config.toolbar = 'bold italic Strikethrough forecolor backcolor | bullist numlist | fullscreen';
51868
- config.mobile.toolbar = 'fullscreen | bold italic Strikethrough forecolor backcolor | bullist numlist';
51885
+ config.plugins = ['advlist autolink lists link image charmap print preview anchor textcolor searchreplace visualblocks code fullscreen insertdatetime media table media code lists colorpicker imagetools tabfocus textcolor equation'];
51886
+ config.toolbar = 'bold italic Strikethrough forecolor backcolor | bullist numlist | equation | fullscreen';
51887
+ config.mobile.toolbar = 'fullscreen | bold italic Strikethrough forecolor backcolor | bullist numlist | equation';
51888
+ return config;
51889
+ }
51890
+ else {
51891
+ config.plugins = ['advlist autolink lists link image charmap print preview anchor textcolor searchreplace visualblocks code fullscreen insertdatetime media table media code lists colorpicker imagetools tabfocus textcolor equation'];
51892
+ config.toolbar = 'formatselect | bold italic Strikethrough forecolor backcolor| alignleft aligncenter alignright alignjustify | bullist numlist | equation';
51893
+ config.toolbar = 'bold italic Strikethrough forecolor backcolor | bullist numlist | equation | fullscreen';
51869
51894
  }
51870
- config.plugins = ['advlist autolink lists link image charmap print preview anchor textcolor searchreplace visualblocks code fullscreen insertdatetime media table media code lists colorpicker imagetools tabfocus textcolor'];
51871
- config.toolbar = 'formatselect | bold italic Strikethrough forecolor backcolor| alignleft aligncenter alignright alignjustify | bullist numlist';
51872
- config.toolbar = 'bold italic Strikethrough forecolor backcolor | bullist numlist | fullscreen';
51873
51895
  config.paste_data_images = true;
51874
51896
  return config;
51875
51897
  };
@@ -51892,8 +51914,14 @@
51892
51914
  this.keydown.next({ event: e, topic: topic });
51893
51915
  };
51894
51916
  TnTinymceComponent.prototype.handleOk = function (evt) {
51895
- var data = this.equationForm.preview.nativeElement.outerHTML;
51896
- this.editor.execCommand('mceInsertContent', true, data);
51917
+ var html = this.equationForm.preview.nativeElement;
51918
+ html.height = 41;
51919
+ var data = html.outerHTML;
51920
+ if (data) {
51921
+ data = data.replace(/width\s*=\s*"(.+?)"/g, '');
51922
+ this.editor.insertContent(data);
51923
+ }
51924
+ this.equationFormModel.show = false;
51897
51925
  };
51898
51926
  TnTinymceComponent.prototype.focusTrap = function (event) {
51899
51927
  if (this.editor) {
@@ -52062,7 +52090,7 @@
52062
52090
  TnTinymceComponent.decorators = [
52063
52091
  { type: i0.Component, args: [{
52064
52092
  selector: 'tn-tinymce',
52065
- template: "<input *ngIf=\"!_deviceDetectorService.isDesktop()\" class=\"input-tab-trap\" (focus)=\"focusTrap($event)\" />\n<textarea class=\"tinymce-control\" id={{id}} [ngStyle]=\"{height: height+'px'}\"></textarea>\n<tn-dialog #dialog *ngIf=\"equationFormModel.show\" [closeOnEscape]=\"false\"\n [header]=\"'C\u00F4ng th\u1EE9c to\u00E1n h\u1ECDc (d\u00F9ng laTex)' | translate\" [popupSize]=\"popupSize\">\n <tn-custom-scrollbar #scrollbar>\n <equation-editor [data]=\"dataEquation\">\n </equation-editor>\n </tn-custom-scrollbar>\n <ng-template #footer>\n <button icon=\"fas fa-check\" [disabled]=\"model.submitting\" pButton type=\"button\" (click)=\"handleOk($event)\"\n [label]=\"'Ok' | translate\"></button>\n <button icon=\"fas fa-undo\" [disabled]=\"model.submitting\" pButton class=\"ui-button-secondary\" type=\"button\"\n (click)=\"equationFormModel.show = false\" [label]=\"'FORM.CANCEL' | translate\"></button>\n </ng-template>\n</tn-dialog>\n\n<tn-dialog *ngIf=\"isAddNews\" #dialog [styleClass]=\"'address-form'\" [header]=\"header | translate\" [popupSize]=\"popupSize\"\n (onHide)=\"isAddNews = false\">\n <add-news #listBase [languageCode]=\"languageCode\" (showChange)=\"showChanged($event)\"></add-news>\n</tn-dialog>\n\n<tn-dialog *ngIf=\"showTemplate\" #dialog [styleClass]=\"'address-form'\" [header]=\"header | translate\"\n [popupSize]=\"popupSize\" (onHide)=\"showTemplate = false\">\n <tn-template (onChanged)=\"addTemplate($event)\"></tn-template>\n</tn-dialog>\n\n<tn-dialog *ngIf=\"isAddFile\" #dialog [styleClass]=\"'address-form'\" [header]=\"header | translate\" [popupSize]=\"popupSize\"\n (onHide)=\"isAddFile = false\">\n <file-picker-dialog #formBase [parentModel]=\" model\" [parentContext]=\"context\" (closeForm)=\"isAddFile = false\"\n (onCancel)=\"handleRFCancel($event)\" (onChanged)=\"showChanged($event)\">\n </file-picker-dialog>\n</tn-dialog>",
52093
+ template: "<input *ngIf=\"!_deviceDetectorService.isDesktop()\" class=\"input-tab-trap\" (focus)=\"focusTrap($event)\" />\n<textarea class=\"tinymce-control\" id={{id}} [ngStyle]=\"{height: height+'px'}\"></textarea>\n<tn-dialog #dialog *ngIf=\"equationFormModel.show\" [closeOnEscape]=\"false\"\n [header]=\"'C\u00F4ng th\u1EE9c to\u00E1n h\u1ECDc (d\u00F9ng laTex)' | translate\" [popupSize]=\"popupSize\"\n (onHide)=\"equationFormModel.show = false\">\n <tn-custom-scrollbar #scrollbar>\n <equation-editor [data]=\"dataEquation\">\n </equation-editor>\n </tn-custom-scrollbar>\n <ng-template #footer>\n <button icon=\"fas fa-check\" class=\"p-button-text\" [disabled]=\"model.submitting\" pButton type=\"button\"\n (click)=\"handleOk($event)\" [label]=\"'X\u00E1c nh\u1EADn' | translate\"></button>\n <button icon=\"fas fa-undo\" [disabled]=\"model.submitting\" pButton class=\"p-button-text p-button-secondary\"\n type=\"button\" (click)=\"equationFormModel.show = false\" [label]=\"'FORM.CANCEL' | translate\"></button>\n </ng-template>\n</tn-dialog>\n\n<tn-dialog *ngIf=\"isAddNews\" #dialog [styleClass]=\"'address-form'\" [header]=\"header | translate\" [popupSize]=\"popupSize\"\n (onHide)=\"isAddNews = false\">\n <add-news #listBase [languageCode]=\"languageCode\" (showChange)=\"showChanged($event)\"></add-news>\n</tn-dialog>\n\n<tn-dialog *ngIf=\"showTemplate\" #dialog [styleClass]=\"'address-form'\" [header]=\"header | translate\"\n [popupSize]=\"popupSize\" (onHide)=\"showTemplate = false\">\n <tn-template (onChanged)=\"addTemplate($event)\"></tn-template>\n</tn-dialog>\n\n<tn-dialog *ngIf=\"isAddFile\" #dialog [styleClass]=\"'address-form'\" [header]=\"header | translate\" [popupSize]=\"popupSize\"\n (onHide)=\"isAddFile = false\">\n <file-picker-dialog #formBase [parentModel]=\" model\" [parentContext]=\"context\" (closeForm)=\"isAddFile = false\"\n (onCancel)=\"handleRFCancel($event)\" (onChanged)=\"showChanged($event)\">\n </file-picker-dialog>\n</tn-dialog>",
52066
52094
  providers: [
52067
52095
  {
52068
52096
  provide: forms.NG_VALUE_ACCESSOR,