ps-toolkit-ui 1.21.83 → 1.21.84
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/bundles/ps-toolkit-ui.umd.js +7 -14
- package/bundles/ps-toolkit-ui.umd.js.map +1 -1
- package/bundles/ps-toolkit-ui.umd.min.js +1 -1
- package/bundles/ps-toolkit-ui.umd.min.js.map +1 -1
- package/esm2015/lib/components/form/pre/form.pre.component.js +5 -10
- package/fesm2015/ps-toolkit-ui.js +3 -8
- package/fesm2015/ps-toolkit-ui.js.map +1 -1
- package/lib/components/form/pre/form.pre.component.d.ts +1 -2
- package/package.json +1 -1
- package/ps-toolkit-ui.metadata.json +1 -1
|
@@ -1,14 +1,10 @@
|
|
|
1
|
-
import { Component, Input
|
|
2
|
-
import JSONFormatter from 'json-formatter-js';
|
|
1
|
+
import { Component, Input } from '@angular/core';
|
|
3
2
|
export class FormPreComponent {
|
|
4
3
|
constructor() {
|
|
5
4
|
}
|
|
6
5
|
ngOnInit() {
|
|
7
6
|
this.inp.setValue = (v) => {
|
|
8
|
-
|
|
9
|
-
theme: 'dark'
|
|
10
|
-
});
|
|
11
|
-
this.jsonContainer.nativeElement.appendChild(formatter.render());
|
|
7
|
+
this.inp.value = typeof v === 'string' ? JSON.parse(v) : v;
|
|
12
8
|
};
|
|
13
9
|
this.inp.isValid = () => {
|
|
14
10
|
return true;
|
|
@@ -20,13 +16,12 @@ export class FormPreComponent {
|
|
|
20
16
|
FormPreComponent.decorators = [
|
|
21
17
|
{ type: Component, args: [{
|
|
22
18
|
selector: 'lib-form-pre',
|
|
23
|
-
template: "<
|
|
24
|
-
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:
|
|
19
|
+
template: "<pre [id]=\"inp.id + 'PreInput'\" #inputDiv [className]=\"'form-input pre w-100' + ' ' + inp.class\">\r\n {{inp.value}}\r\n</pre>\r\n",
|
|
20
|
+
styles: [".form-input.pre{-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;-webkit-user-select:none;cursor:default;direction:ltr;font-size:12px;line-height:30px;min-height:30px!important;padding:0 15px;position:relative;text-align:left}"]
|
|
25
21
|
},] }
|
|
26
22
|
];
|
|
27
23
|
FormPreComponent.ctorParameters = () => [];
|
|
28
24
|
FormPreComponent.propDecorators = {
|
|
29
|
-
jsonContainer: [{ type: ViewChild, args: ['jsonContainer', { static: true },] }],
|
|
30
25
|
inp: [{ type: Input }]
|
|
31
26
|
};
|
|
32
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
27
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZm9ybS5wcmUuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IkQ6L1BzVG9vbGtpdC9VSS9wcm9qZWN0cy9wcy10b29sa2l0LXVpL3NyYy8iLCJzb3VyY2VzIjpbImxpYi9jb21wb25lbnRzL2Zvcm0vcHJlL2Zvcm0ucHJlLmNvbXBvbmVudC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUMsU0FBUyxFQUFFLEtBQUssRUFBUyxNQUFNLGVBQWUsQ0FBQztBQVF2RCxNQUFNLE9BQU8sZ0JBQWdCO0lBRzNCO0lBQ0EsQ0FBQztJQUVELFFBQVE7UUFDTixJQUFJLENBQUMsR0FBRyxDQUFDLFFBQVEsR0FBRyxDQUFDLENBQUMsRUFBRSxFQUFFO1lBQ3hCLElBQUksQ0FBQyxHQUFHLENBQUMsS0FBSyxHQUFHLE9BQU8sQ0FBQyxLQUFLLFFBQVEsQ0FBQyxDQUFDLENBQUMsSUFBSSxDQUFDLEtBQUssQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFDO1FBQzdELENBQUMsQ0FBQztRQUNGLElBQUksQ0FBQyxHQ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cbiAgICB9O1xyXG4gICAgdGhpcy5pbnAuY2xlYXIgPSAoKSA9PiB7XHJcbiAgICB9O1xyXG4gIH1cclxufVxyXG4iXX0=
|
|
@@ -5,7 +5,6 @@ import { now } from 'jalali-moment';
|
|
|
5
5
|
import { NavigationEnd, Router, RouterModule } from '@angular/router';
|
|
6
6
|
import { BehaviorSubject } from 'rxjs';
|
|
7
7
|
import 'jquery-ui-dist/jquery-ui';
|
|
8
|
-
import JSONFormatter from 'json-formatter-js';
|
|
9
8
|
import { FormsModule } from '@angular/forms';
|
|
10
9
|
import { CommonModule } from '@angular/common';
|
|
11
10
|
import { DomSanitizer } from '@angular/platform-browser';
|
|
@@ -4333,10 +4332,7 @@ class FormPreComponent {
|
|
|
4333
4332
|
}
|
|
4334
4333
|
ngOnInit() {
|
|
4335
4334
|
this.inp.setValue = (v) => {
|
|
4336
|
-
|
|
4337
|
-
theme: 'dark'
|
|
4338
|
-
});
|
|
4339
|
-
this.jsonContainer.nativeElement.appendChild(formatter.render());
|
|
4335
|
+
this.inp.value = typeof v === 'string' ? JSON.parse(v) : v;
|
|
4340
4336
|
};
|
|
4341
4337
|
this.inp.isValid = () => {
|
|
4342
4338
|
return true;
|
|
@@ -4348,13 +4344,12 @@ class FormPreComponent {
|
|
|
4348
4344
|
FormPreComponent.decorators = [
|
|
4349
4345
|
{ type: Component, args: [{
|
|
4350
4346
|
selector: 'lib-form-pre',
|
|
4351
|
-
template: "<
|
|
4352
|
-
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:
|
|
4347
|
+
template: "<pre [id]=\"inp.id + 'PreInput'\" #inputDiv [className]=\"'form-input pre w-100' + ' ' + inp.class\">\r\n {{inp.value}}\r\n</pre>\r\n",
|
|
4348
|
+
styles: [".form-input.pre{-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;-webkit-user-select:none;cursor:default;direction:ltr;font-size:12px;line-height:30px;min-height:30px!important;padding:0 15px;position:relative;text-align:left}"]
|
|
4353
4349
|
},] }
|
|
4354
4350
|
];
|
|
4355
4351
|
FormPreComponent.ctorParameters = () => [];
|
|
4356
4352
|
FormPreComponent.propDecorators = {
|
|
4357
|
-
jsonContainer: [{ type: ViewChild, args: ['jsonContainer', { static: true },] }],
|
|
4358
4353
|
inp: [{ type: Input }]
|
|
4359
4354
|
};
|
|
4360
4355
|
|