ps-toolkit-ui 1.21.82 → 1.21.83

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.
@@ -1,8 +1,10 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('lodash'), require('jalali-moment'), require('@angular/router'), require('rxjs'), require('jquery-ui-dist/jquery-ui'), require('@angular/forms'), require('@angular/common'), require('@angular/platform-browser'), require('ckeditor4-angular'), require('file-saver'), require('xlsx'), require('highcharts'), require('highcharts/modules/exporting'), require('highcharts/modules/export-data')) :
3
- typeof define === 'function' && define.amd ? define('ps-toolkit-ui', ['exports', '@angular/core', 'lodash', 'jalali-moment', '@angular/router', 'rxjs', 'jquery-ui-dist/jquery-ui', '@angular/forms', '@angular/common', '@angular/platform-browser', 'ckeditor4-angular', 'file-saver', 'xlsx', 'highcharts', 'highcharts/modules/exporting', 'highcharts/modules/export-data'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global['ps-toolkit-ui'] = {}, global.ng.core, global._, global.moment, global.ng.router, global.rxjs, null, global.ng.forms, global.ng.common, global.ng.platformBrowser, global.ckeditor4Angular, global.FileSaver, global.XLSX, global.Highcharts, global.HighchartsExporting, global.HighchartsExportData));
5
- }(this, (function (exports, core, _, moment, router, rxjs, jqueryUi, forms, common, platformBrowser, ckeditor4Angular, FileSaver, XLSX, Highcharts, HighchartsExporting, HighchartsExportData) { 'use strict';
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('lodash'), require('jalali-moment'), require('@angular/router'), require('rxjs'), require('jquery-ui-dist/jquery-ui'), require('json-formatter-js'), require('@angular/forms'), require('@angular/common'), require('@angular/platform-browser'), require('ckeditor4-angular'), require('file-saver'), require('xlsx'), require('highcharts'), require('highcharts/modules/exporting'), require('highcharts/modules/export-data')) :
3
+ typeof define === 'function' && define.amd ? define('ps-toolkit-ui', ['exports', '@angular/core', 'lodash', 'jalali-moment', '@angular/router', 'rxjs', 'jquery-ui-dist/jquery-ui', 'json-formatter-js', '@angular/forms', '@angular/common', '@angular/platform-browser', 'ckeditor4-angular', 'file-saver', 'xlsx', 'highcharts', 'highcharts/modules/exporting', 'highcharts/modules/export-data'], factory) :
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global['ps-toolkit-ui'] = {}, global.ng.core, global._, global.moment, global.ng.router, global.rxjs, null, global.JSONFormatter, global.ng.forms, global.ng.common, global.ng.platformBrowser, global.ckeditor4Angular, global.FileSaver, global.XLSX, global.Highcharts, global.HighchartsExporting, global.HighchartsExportData));
5
+ }(this, (function (exports, core, _, moment, router, rxjs, jqueryUi, JSONFormatter, forms, common, platformBrowser, ckeditor4Angular, FileSaver, XLSX, Highcharts, HighchartsExporting, HighchartsExportData) { 'use strict';
6
+
7
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
6
8
 
7
9
  function _interopNamespace(e) {
8
10
  if (e && e.__esModule) { return e; } else {
@@ -26,6 +28,7 @@
26
28
  }
27
29
 
28
30
  var moment__namespace = /*#__PURE__*/_interopNamespace(moment);
31
+ var JSONFormatter__default = /*#__PURE__*/_interopDefaultLegacy(JSONFormatter);
29
32
  var Highcharts__namespace = /*#__PURE__*/_interopNamespace(Highcharts);
30
33
  var HighchartsExporting__namespace = /*#__PURE__*/_interopNamespace(HighchartsExporting);
31
34
  var HighchartsExportData__namespace = /*#__PURE__*/_interopNamespace(HighchartsExportData);
@@ -5255,7 +5258,10 @@
5255
5258
  FormPreComponent.prototype.ngOnInit = function () {
5256
5259
  var _this = this;
5257
5260
  this.inp.setValue = function (v) {
5258
- _this.inp.value = typeof v === 'string' ? JSON.stringify(v, null, 2) : v;
5261
+ var formatter = new JSONFormatter__default['default'](typeof v === 'string' ? JSON.parse(v) : v, 2, {
5262
+ theme: 'dark'
5263
+ });
5264
+ _this.jsonContainer.nativeElement.appendChild(formatter.render());
5259
5265
  };
5260
5266
  this.inp.isValid = function () {
5261
5267
  return true;
@@ -5263,22 +5269,18 @@
5263
5269
  this.inp.clear = function () {
5264
5270
  };
5265
5271
  };
5266
- FormPreComponent.prototype.onClick = function () {
5267
- if (this.inp.onClick) {
5268
- this.inp.onClick(this.inp);
5269
- }
5270
- };
5271
5272
  return FormPreComponent;
5272
5273
  }());
5273
5274
  FormPreComponent.decorators = [
5274
5275
  { type: core.Component, args: [{
5275
5276
  selector: 'lib-form-pre',
5276
- template: "<pre [id]=\"inp.id + 'PreInput'\" (click)=\"onClick()\" #inputDiv [className]=\"'form-input pre w-100' + ' ' + inp.class\" [innerHTML]=\"inp.l(inp.value)\">\r\n</pre>\r\n",
5277
+ template: "<div #jsonContainer [id]=\"inp.id + 'PreInput'\" [className]=\"'form-input pre w-100' + ' ' + inp.class\">\r\n</div>\r\n",
5277
5278
  styles: [".form-input.pre{-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;-webkit-user-select:none;cursor:default;font-size:12px;line-height:30px;min-height:30px!important;padding:0 15px;position:relative;text-align:center}"]
5278
5279
  },] }
5279
5280
  ];
5280
5281
  FormPreComponent.ctorParameters = function () { return []; };
5281
5282
  FormPreComponent.propDecorators = {
5283
+ jsonContainer: [{ type: core.ViewChild, args: ['jsonContainer', { static: true },] }],
5282
5284
  inp: [{ type: core.Input }]
5283
5285
  };
5284
5286