@sd-angular/core 1.1.4 → 1.1.5
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/assets/scss/sd-core.scss +1 -0
- package/bundles/sd-angular-core-header-title.umd.js +2 -2
- package/bundles/sd-angular-core-header-title.umd.js.map +1 -1
- package/bundles/sd-angular-core-header-title.umd.min.js +1 -1
- package/bundles/sd-angular-core-header-title.umd.min.js.map +1 -1
- package/bundles/sd-angular-core-json-editor.umd.js +505 -0
- package/bundles/sd-angular-core-json-editor.umd.js.map +1 -0
- package/bundles/sd-angular-core-json-editor.umd.min.js +16 -0
- package/bundles/sd-angular-core-json-editor.umd.min.js.map +1 -0
- package/bundles/sd-angular-core.umd.js +4 -4
- package/bundles/sd-angular-core.umd.min.js +1 -1
- package/bundles/sd-angular-core.umd.min.js.map +1 -1
- package/esm2015/header-title/src/lib/header-title.component.js +3 -3
- package/esm2015/json-editor/index.js +2 -0
- package/esm2015/json-editor/sd-angular-core-json-editor.js +5 -0
- package/esm2015/json-editor/src/lib/json-editor.component.js +120 -0
- package/esm2015/json-editor/src/lib/json-editor.module.js +36 -0
- package/esm2015/json-editor/src/public-api.js +6 -0
- package/esm2015/public-api.js +3 -1
- package/fesm2015/sd-angular-core-header-title.js +2 -2
- package/fesm2015/sd-angular-core-header-title.js.map +1 -1
- package/fesm2015/sd-angular-core-json-editor.js +162 -0
- package/fesm2015/sd-angular-core-json-editor.js.map +1 -0
- package/fesm2015/sd-angular-core.js +2 -0
- package/fesm2015/sd-angular-core.js.map +1 -1
- package/header-title/sd-angular-core-header-title.metadata.json +1 -1
- package/json-editor/index.d.ts +1 -0
- package/json-editor/package.json +12 -0
- package/json-editor/sd-angular-core-json-editor.d.ts +4 -0
- package/json-editor/sd-angular-core-json-editor.metadata.json +1 -0
- package/json-editor/src/lib/json-editor.component.d.ts +29 -0
- package/json-editor/src/lib/json-editor.module.d.ts +2 -0
- package/json-editor/src/public-api.d.ts +2 -0
- package/package.json +2 -1
- package/public-api.d.ts +2 -0
- package/{sd-angular-core-1.1.4.tgz → sd-angular-core-1.1.5.tgz} +0 -0
package/assets/scss/sd-core.scss
CHANGED
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
@import "~quill/dist/quill.bubble.css";
|
|
20
20
|
@import "~quill/dist/quill.snow.css";
|
|
21
21
|
@import "./quill-mention/quill-mention.css";
|
|
22
|
+
@import "~jsoneditor/dist/jsoneditor.min.css";
|
|
22
23
|
|
|
23
24
|
.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_other_month {
|
|
24
25
|
opacity: 1;
|
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
SdHeaderTitleComponent.decorators = [
|
|
15
15
|
{ type: core.Component, args: [{
|
|
16
16
|
selector: 'sd-header-title',
|
|
17
|
-
template: "<div class=\"d-flex\">\r\n <div *ngIf=\"icon\" class=\"flex-shrink-1 c-header-icon\">\r\n <mat-icon style=\"color: #757575;\"\r\n class=\"material-symbols-outlined\">{{icon}}</mat-icon>\r\n </div>\r\n <div class=\"d-flex flex-column w-100 overflow-hidden\">\r\n <div class=\"d-flex\">\r\n <span class=\"
|
|
18
|
-
styles: [".c-header-icon{align-items:center;display:flex;height:28px;margin-right:8px;width:28px}.c-header-
|
|
17
|
+
template: "<div class=\"d-flex\">\r\n <div *ngIf=\"icon\" class=\"flex-shrink-1 c-header-icon\">\r\n <mat-icon style=\"color: #757575;\"\r\n class=\"material-symbols-outlined\">{{icon}}</mat-icon>\r\n </div>\r\n <div class=\"d-flex flex-column w-100 overflow-hidden\">\r\n <div class=\"d-flex\">\r\n <span class=\"T16M\">{{title}}</span>\r\n <ng-container *ngIf=\"tooltip\">\r\n <mat-icon\r\n [matTooltip]=\"tooltip\"\r\n class=\"material-icons-outlined c-header-icon-tooltip\"> info </mat-icon>\r\n </ng-container>\r\n </div>\r\n <span *ngIf=\"description\" class=\"c-header-description\">{{description}}</span>\r\n </div>\r\n <div class=\"flex-shrink-1\">\r\n <ng-content select=\"[sdHeaderRight]\"></ng-content>\r\n </div>\r\n</div>\r\n",
|
|
18
|
+
styles: [".c-header-icon{align-items:center;display:flex;height:28px;margin-right:8px;width:28px}.c-header-icon-tooltip{align-items:center;color:#757575;display:flex;font-size:20px;height:28px!important;margin-left:10px}.c-header-description{font-size:14px;line-height:20px}"]
|
|
19
19
|
},] }
|
|
20
20
|
];
|
|
21
21
|
SdHeaderTitleComponent.ctorParameters = function () { return []; };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-angular-core-header-title.umd.js","sources":["../../../../projects/sd-core/header-title/src/lib/header-title.component.ts","../../../../projects/sd-core/header-title/src/lib/header-title.module.ts","../../../../projects/sd-core/header-title/sd-angular-core-header-title.ts"],"sourcesContent":["import { Component, OnInit, Input } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'sd-header-title',\r\n templateUrl: './header-title.component.html',\r\n styleUrls: ['./header-title.component.scss']\r\n})\r\nexport class SdHeaderTitleComponent implements OnInit {\r\n\r\n @Input() title: string;\r\n @Input() icon: string;\r\n @Input() description: string;\r\n @Input() tooltip: string;\r\n\r\n constructor() { }\r\n\r\n ngOnInit(): void {\r\n }\r\n\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { MatIconModule } from '@angular/material/icon';\r\nimport { SdHeaderTitleComponent } from './header-title.component';\r\nimport {MatTooltipModule} from '@angular/material/tooltip';\r\n@NgModule({\r\n imports: [\r\n CommonModule,\r\n MatIconModule,\r\n MatTooltipModule\r\n ],\r\n declarations: [SdHeaderTitleComponent],\r\n exports: [SdHeaderTitleComponent]\r\n})\r\nexport class SdHeaderTitleModule { }\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n\nexport {SdHeaderTitleComponent as ɵa} from './src/lib/header-title.component';"],"names":["Component","Input","NgModule","CommonModule","MatIconModule","MatTooltipModule"],"mappings":";;;;;;;QAcE;SAAiB;QAEjB,yCAAQ,GAAR;SACC;;;;gBAfFA,cAAS,SAAC;oBACT,QAAQ,EAAE,iBAAiB;oBAC3B,
|
|
1
|
+
{"version":3,"file":"sd-angular-core-header-title.umd.js","sources":["../../../../projects/sd-core/header-title/src/lib/header-title.component.ts","../../../../projects/sd-core/header-title/src/lib/header-title.module.ts","../../../../projects/sd-core/header-title/sd-angular-core-header-title.ts"],"sourcesContent":["import { Component, OnInit, Input } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'sd-header-title',\r\n templateUrl: './header-title.component.html',\r\n styleUrls: ['./header-title.component.scss']\r\n})\r\nexport class SdHeaderTitleComponent implements OnInit {\r\n\r\n @Input() title: string;\r\n @Input() icon: string;\r\n @Input() description: string;\r\n @Input() tooltip: string;\r\n\r\n constructor() { }\r\n\r\n ngOnInit(): void {\r\n }\r\n\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { MatIconModule } from '@angular/material/icon';\r\nimport { SdHeaderTitleComponent } from './header-title.component';\r\nimport {MatTooltipModule} from '@angular/material/tooltip';\r\n@NgModule({\r\n imports: [\r\n CommonModule,\r\n MatIconModule,\r\n MatTooltipModule\r\n ],\r\n declarations: [SdHeaderTitleComponent],\r\n exports: [SdHeaderTitleComponent]\r\n})\r\nexport class SdHeaderTitleModule { }\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n\nexport {SdHeaderTitleComponent as ɵa} from './src/lib/header-title.component';"],"names":["Component","Input","NgModule","CommonModule","MatIconModule","MatTooltipModule"],"mappings":";;;;;;;QAcE;SAAiB;QAEjB,yCAAQ,GAAR;SACC;;;;gBAfFA,cAAS,SAAC;oBACT,QAAQ,EAAE,iBAAiB;oBAC3B,syBAA4C;;iBAE7C;;;;wBAGEC,UAAK;uBACLA,UAAK;8BACLA,UAAK;0BACLA,UAAK;;;;QCER;;;;;gBATCC,aAAQ,SAAC;oBACR,OAAO,EAAE;wBACPC,mBAAY;wBACZC,kBAAa;wBACbC,wBAAgB;qBACjB;oBACD,YAAY,EAAE,CAAC,sBAAsB,CAAC;oBACtC,OAAO,EAAE,CAAC,sBAAsB,CAAC;iBAClC;;;ICbD;;;;;;;;;;;;;;;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("@angular/core"),require("@angular/common"),require("@angular/material/icon"),require("@angular/material/tooltip")):"function"==typeof define&&define.amd?define("@sd-angular/core/header-title",["exports","@angular/core","@angular/common","@angular/material/icon","@angular/material/tooltip"],n):n(((e="undefined"!=typeof globalThis?globalThis:e||self)["sd-angular"]=e["sd-angular"]||{},e["sd-angular"].core=e["sd-angular"].core||{},e["sd-angular"].core["header-title"]={}),e.ng.core,e.ng.common,e.ng.material.icon,e.ng.material.tooltip)}(this,(function(e,n,t,o,r){"use strict";var i=function(){function e(){}return e.prototype.ngOnInit=function(){},e}();i.decorators=[{type:n.Component,args:[{selector:"sd-header-title",template:'<div class="d-flex">\r\n <div *ngIf="icon" class="flex-shrink-1 c-header-icon">\r\n <mat-icon style="color: #757575;"\r\n class="material-symbols-outlined">{{icon}}</mat-icon>\r\n </div>\r\n <div class="d-flex flex-column w-100 overflow-hidden">\r\n <div class="d-flex">\r\n <span class="
|
|
1
|
+
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("@angular/core"),require("@angular/common"),require("@angular/material/icon"),require("@angular/material/tooltip")):"function"==typeof define&&define.amd?define("@sd-angular/core/header-title",["exports","@angular/core","@angular/common","@angular/material/icon","@angular/material/tooltip"],n):n(((e="undefined"!=typeof globalThis?globalThis:e||self)["sd-angular"]=e["sd-angular"]||{},e["sd-angular"].core=e["sd-angular"].core||{},e["sd-angular"].core["header-title"]={}),e.ng.core,e.ng.common,e.ng.material.icon,e.ng.material.tooltip)}(this,(function(e,n,t,o,r){"use strict";var i=function(){function e(){}return e.prototype.ngOnInit=function(){},e}();i.decorators=[{type:n.Component,args:[{selector:"sd-header-title",template:'<div class="d-flex">\r\n <div *ngIf="icon" class="flex-shrink-1 c-header-icon">\r\n <mat-icon style="color: #757575;"\r\n class="material-symbols-outlined">{{icon}}</mat-icon>\r\n </div>\r\n <div class="d-flex flex-column w-100 overflow-hidden">\r\n <div class="d-flex">\r\n <span class="T16M">{{title}}</span>\r\n <ng-container *ngIf="tooltip">\r\n <mat-icon\r\n [matTooltip]="tooltip"\r\n class="material-icons-outlined c-header-icon-tooltip"> info </mat-icon>\r\n </ng-container>\r\n </div>\r\n <span *ngIf="description" class="c-header-description">{{description}}</span>\r\n </div>\r\n <div class="flex-shrink-1">\r\n <ng-content select="[sdHeaderRight]"></ng-content>\r\n </div>\r\n</div>\r\n',styles:[".c-header-icon{align-items:center;display:flex;height:28px;margin-right:8px;width:28px}.c-header-icon-tooltip{align-items:center;color:#757575;display:flex;font-size:20px;height:28px!important;margin-left:10px}.c-header-description{font-size:14px;line-height:20px}"]}]}],i.ctorParameters=function(){return[]},i.propDecorators={title:[{type:n.Input}],icon:[{type:n.Input}],description:[{type:n.Input}],tooltip:[{type:n.Input}]};var a=function(){};a.decorators=[{type:n.NgModule,args:[{imports:[t.CommonModule,o.MatIconModule,r.MatTooltipModule],declarations:[i],exports:[i]}]}],e.SdHeaderTitleModule=a,e.ɵa=i,Object.defineProperty(e,"__esModule",{value:!0})}));
|
|
2
2
|
//# sourceMappingURL=sd-angular-core-header-title.umd.min.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../projects/sd-core/header-title/src/lib/header-title.component.ts","../../../../projects/sd-core/header-title/src/lib/header-title.module.ts"],"names":["SdHeaderTitleComponent","prototype","ngOnInit","Component","args","selector","template","Input","NgModule","imports","CommonModule","MatIconModule","MatTooltipModule","declarations","exports"],"mappings":"wqBAcE,SAAAA,YAEAA,EAAAC,UAAAC,SAAA,sCAdDC,EAAAA,UAASC,KAAA,CAAC,CACTC,SAAU,kBACVC,SAAA,
|
|
1
|
+
{"version":3,"sources":["../../../../projects/sd-core/header-title/src/lib/header-title.component.ts","../../../../projects/sd-core/header-title/src/lib/header-title.module.ts"],"names":["SdHeaderTitleComponent","prototype","ngOnInit","Component","args","selector","template","Input","NgModule","imports","CommonModule","MatIconModule","MatTooltipModule","declarations","exports"],"mappings":"wqBAcE,SAAAA,YAEAA,EAAAC,UAAAC,SAAA,sCAdDC,EAAAA,UAASC,KAAA,CAAC,CACTC,SAAU,kBACVC,SAAA,4lCAKCC,EAAAA,oBACAA,EAAAA,2BACAA,EAAAA,uBACAA,EAAAA,eCEH,iCATCC,EAAAA,SAAQJ,KAAA,CAAC,CACRK,QAAS,CACPC,EAAAA,aACAC,EAAAA,cACAC,EAAAA,kBAEFC,aAAc,CAACb,GACfc,QAAS,CAACd","sourcesContent":["import { Component, OnInit, Input } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'sd-header-title',\r\n templateUrl: './header-title.component.html',\r\n styleUrls: ['./header-title.component.scss']\r\n})\r\nexport class SdHeaderTitleComponent implements OnInit {\r\n\r\n @Input() title: string;\r\n @Input() icon: string;\r\n @Input() description: string;\r\n @Input() tooltip: string;\r\n\r\n constructor() { }\r\n\r\n ngOnInit(): void {\r\n }\r\n\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { MatIconModule } from '@angular/material/icon';\r\nimport { SdHeaderTitleComponent } from './header-title.component';\r\nimport {MatTooltipModule} from '@angular/material/tooltip';\r\n@NgModule({\r\n imports: [\r\n CommonModule,\r\n MatIconModule,\r\n MatTooltipModule\r\n ],\r\n declarations: [SdHeaderTitleComponent],\r\n exports: [SdHeaderTitleComponent]\r\n})\r\nexport class SdHeaderTitleModule { }\r\n"]}
|
|
@@ -0,0 +1,505 @@
|
|
|
1
|
+
(function (global, factory) {
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('@angular/material/icon'), require('@angular/material/tooltip'), require('@angular/material/input'), require('@angular/material/form-field'), require('@sd-angular/core/translate'), require('@angular/forms'), require('@sd-angular/core/common'), require('@angular/material/button'), require('uuid'), require('rxjs/operators'), require('rxjs'), require('@sd-angular/core/utility'), require('jsoneditor')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define('@sd-angular/core/json-editor', ['exports', '@angular/core', '@angular/common', '@angular/material/icon', '@angular/material/tooltip', '@angular/material/input', '@angular/material/form-field', '@sd-angular/core/translate', '@angular/forms', '@sd-angular/core/common', '@angular/material/button', 'uuid', 'rxjs/operators', 'rxjs', '@sd-angular/core/utility', 'jsoneditor'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global['sd-angular'] = global['sd-angular'] || {}, global['sd-angular'].core = global['sd-angular'].core || {}, global['sd-angular'].core['json-editor'] = {}), global.ng.core, global.ng.common, global.ng.material.icon, global.ng.material.tooltip, global.ng.material.input, global.ng.material.formField, global['sd-angular'].core.translate, global.ng.forms, global['sd-angular'].core.common, global.ng.material.button, global.uuid, global.rxjs.operators, global.rxjs, global['sd-angular'].core.utility, global.JSONEditor));
|
|
5
|
+
}(this, (function (exports, core, common$1, icon, tooltip, input, formField, translate, forms, common, button, uuid, operators, rxjs, utility, JSONEditor) { 'use strict';
|
|
6
|
+
|
|
7
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
8
|
+
|
|
9
|
+
var JSONEditor__default = /*#__PURE__*/_interopDefaultLegacy(JSONEditor);
|
|
10
|
+
|
|
11
|
+
/*! *****************************************************************************
|
|
12
|
+
Copyright (c) Microsoft Corporation.
|
|
13
|
+
|
|
14
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
15
|
+
purpose with or without fee is hereby granted.
|
|
16
|
+
|
|
17
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
18
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
19
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
20
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
21
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
22
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
23
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
24
|
+
***************************************************************************** */
|
|
25
|
+
/* global Reflect, Promise */
|
|
26
|
+
var extendStatics = function (d, b) {
|
|
27
|
+
extendStatics = Object.setPrototypeOf ||
|
|
28
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
29
|
+
function (d, b) { for (var p in b)
|
|
30
|
+
if (Object.prototype.hasOwnProperty.call(b, p))
|
|
31
|
+
d[p] = b[p]; };
|
|
32
|
+
return extendStatics(d, b);
|
|
33
|
+
};
|
|
34
|
+
function __extends(d, b) {
|
|
35
|
+
if (typeof b !== "function" && b !== null)
|
|
36
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
37
|
+
extendStatics(d, b);
|
|
38
|
+
function __() { this.constructor = d; }
|
|
39
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
40
|
+
}
|
|
41
|
+
var __assign = function () {
|
|
42
|
+
__assign = Object.assign || function __assign(t) {
|
|
43
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
44
|
+
s = arguments[i];
|
|
45
|
+
for (var p in s)
|
|
46
|
+
if (Object.prototype.hasOwnProperty.call(s, p))
|
|
47
|
+
t[p] = s[p];
|
|
48
|
+
}
|
|
49
|
+
return t;
|
|
50
|
+
};
|
|
51
|
+
return __assign.apply(this, arguments);
|
|
52
|
+
};
|
|
53
|
+
function __rest(s, e) {
|
|
54
|
+
var t = {};
|
|
55
|
+
for (var p in s)
|
|
56
|
+
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
57
|
+
t[p] = s[p];
|
|
58
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
59
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
60
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
61
|
+
t[p[i]] = s[p[i]];
|
|
62
|
+
}
|
|
63
|
+
return t;
|
|
64
|
+
}
|
|
65
|
+
function __decorate(decorators, target, key, desc) {
|
|
66
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
67
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
68
|
+
r = Reflect.decorate(decorators, target, key, desc);
|
|
69
|
+
else
|
|
70
|
+
for (var i = decorators.length - 1; i >= 0; i--)
|
|
71
|
+
if (d = decorators[i])
|
|
72
|
+
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
73
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
74
|
+
}
|
|
75
|
+
function __param(paramIndex, decorator) {
|
|
76
|
+
return function (target, key) { decorator(target, key, paramIndex); };
|
|
77
|
+
}
|
|
78
|
+
function __metadata(metadataKey, metadataValue) {
|
|
79
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
80
|
+
return Reflect.metadata(metadataKey, metadataValue);
|
|
81
|
+
}
|
|
82
|
+
function __awaiter(thisArg, _arguments, P, generator) {
|
|
83
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
84
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
85
|
+
function fulfilled(value) { try {
|
|
86
|
+
step(generator.next(value));
|
|
87
|
+
}
|
|
88
|
+
catch (e) {
|
|
89
|
+
reject(e);
|
|
90
|
+
} }
|
|
91
|
+
function rejected(value) { try {
|
|
92
|
+
step(generator["throw"](value));
|
|
93
|
+
}
|
|
94
|
+
catch (e) {
|
|
95
|
+
reject(e);
|
|
96
|
+
} }
|
|
97
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
98
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
function __generator(thisArg, body) {
|
|
102
|
+
var _ = { label: 0, sent: function () { if (t[0] & 1)
|
|
103
|
+
throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
104
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
|
|
105
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
106
|
+
function step(op) {
|
|
107
|
+
if (f)
|
|
108
|
+
throw new TypeError("Generator is already executing.");
|
|
109
|
+
while (_)
|
|
110
|
+
try {
|
|
111
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
|
|
112
|
+
return t;
|
|
113
|
+
if (y = 0, t)
|
|
114
|
+
op = [op[0] & 2, t.value];
|
|
115
|
+
switch (op[0]) {
|
|
116
|
+
case 0:
|
|
117
|
+
case 1:
|
|
118
|
+
t = op;
|
|
119
|
+
break;
|
|
120
|
+
case 4:
|
|
121
|
+
_.label++;
|
|
122
|
+
return { value: op[1], done: false };
|
|
123
|
+
case 5:
|
|
124
|
+
_.label++;
|
|
125
|
+
y = op[1];
|
|
126
|
+
op = [0];
|
|
127
|
+
continue;
|
|
128
|
+
case 7:
|
|
129
|
+
op = _.ops.pop();
|
|
130
|
+
_.trys.pop();
|
|
131
|
+
continue;
|
|
132
|
+
default:
|
|
133
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
134
|
+
_ = 0;
|
|
135
|
+
continue;
|
|
136
|
+
}
|
|
137
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
|
|
138
|
+
_.label = op[1];
|
|
139
|
+
break;
|
|
140
|
+
}
|
|
141
|
+
if (op[0] === 6 && _.label < t[1]) {
|
|
142
|
+
_.label = t[1];
|
|
143
|
+
t = op;
|
|
144
|
+
break;
|
|
145
|
+
}
|
|
146
|
+
if (t && _.label < t[2]) {
|
|
147
|
+
_.label = t[2];
|
|
148
|
+
_.ops.push(op);
|
|
149
|
+
break;
|
|
150
|
+
}
|
|
151
|
+
if (t[2])
|
|
152
|
+
_.ops.pop();
|
|
153
|
+
_.trys.pop();
|
|
154
|
+
continue;
|
|
155
|
+
}
|
|
156
|
+
op = body.call(thisArg, _);
|
|
157
|
+
}
|
|
158
|
+
catch (e) {
|
|
159
|
+
op = [6, e];
|
|
160
|
+
y = 0;
|
|
161
|
+
}
|
|
162
|
+
finally {
|
|
163
|
+
f = t = 0;
|
|
164
|
+
}
|
|
165
|
+
if (op[0] & 5)
|
|
166
|
+
throw op[1];
|
|
167
|
+
return { value: op[0] ? op[1] : void 0, done: true };
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
var __createBinding = Object.create ? (function (o, m, k, k2) {
|
|
171
|
+
if (k2 === undefined)
|
|
172
|
+
k2 = k;
|
|
173
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function () { return m[k]; } });
|
|
174
|
+
}) : (function (o, m, k, k2) {
|
|
175
|
+
if (k2 === undefined)
|
|
176
|
+
k2 = k;
|
|
177
|
+
o[k2] = m[k];
|
|
178
|
+
});
|
|
179
|
+
function __exportStar(m, o) {
|
|
180
|
+
for (var p in m)
|
|
181
|
+
if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
|
|
182
|
+
__createBinding(o, m, p);
|
|
183
|
+
}
|
|
184
|
+
function __values(o) {
|
|
185
|
+
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
186
|
+
if (m)
|
|
187
|
+
return m.call(o);
|
|
188
|
+
if (o && typeof o.length === "number")
|
|
189
|
+
return {
|
|
190
|
+
next: function () {
|
|
191
|
+
if (o && i >= o.length)
|
|
192
|
+
o = void 0;
|
|
193
|
+
return { value: o && o[i++], done: !o };
|
|
194
|
+
}
|
|
195
|
+
};
|
|
196
|
+
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
197
|
+
}
|
|
198
|
+
function __read(o, n) {
|
|
199
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
200
|
+
if (!m)
|
|
201
|
+
return o;
|
|
202
|
+
var i = m.call(o), r, ar = [], e;
|
|
203
|
+
try {
|
|
204
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
|
|
205
|
+
ar.push(r.value);
|
|
206
|
+
}
|
|
207
|
+
catch (error) {
|
|
208
|
+
e = { error: error };
|
|
209
|
+
}
|
|
210
|
+
finally {
|
|
211
|
+
try {
|
|
212
|
+
if (r && !r.done && (m = i["return"]))
|
|
213
|
+
m.call(i);
|
|
214
|
+
}
|
|
215
|
+
finally {
|
|
216
|
+
if (e)
|
|
217
|
+
throw e.error;
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
return ar;
|
|
221
|
+
}
|
|
222
|
+
/** @deprecated */
|
|
223
|
+
function __spread() {
|
|
224
|
+
for (var ar = [], i = 0; i < arguments.length; i++)
|
|
225
|
+
ar = ar.concat(__read(arguments[i]));
|
|
226
|
+
return ar;
|
|
227
|
+
}
|
|
228
|
+
/** @deprecated */
|
|
229
|
+
function __spreadArrays() {
|
|
230
|
+
for (var s = 0, i = 0, il = arguments.length; i < il; i++)
|
|
231
|
+
s += arguments[i].length;
|
|
232
|
+
for (var r = Array(s), k = 0, i = 0; i < il; i++)
|
|
233
|
+
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
|
|
234
|
+
r[k] = a[j];
|
|
235
|
+
return r;
|
|
236
|
+
}
|
|
237
|
+
function __spreadArray(to, from, pack) {
|
|
238
|
+
if (pack || arguments.length === 2)
|
|
239
|
+
for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
240
|
+
if (ar || !(i in from)) {
|
|
241
|
+
if (!ar)
|
|
242
|
+
ar = Array.prototype.slice.call(from, 0, i);
|
|
243
|
+
ar[i] = from[i];
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
247
|
+
}
|
|
248
|
+
function __await(v) {
|
|
249
|
+
return this instanceof __await ? (this.v = v, this) : new __await(v);
|
|
250
|
+
}
|
|
251
|
+
function __asyncGenerator(thisArg, _arguments, generator) {
|
|
252
|
+
if (!Symbol.asyncIterator)
|
|
253
|
+
throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
254
|
+
var g = generator.apply(thisArg, _arguments || []), i, q = [];
|
|
255
|
+
return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
|
|
256
|
+
function verb(n) { if (g[n])
|
|
257
|
+
i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
|
|
258
|
+
function resume(n, v) { try {
|
|
259
|
+
step(g[n](v));
|
|
260
|
+
}
|
|
261
|
+
catch (e) {
|
|
262
|
+
settle(q[0][3], e);
|
|
263
|
+
} }
|
|
264
|
+
function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
|
|
265
|
+
function fulfill(value) { resume("next", value); }
|
|
266
|
+
function reject(value) { resume("throw", value); }
|
|
267
|
+
function settle(f, v) { if (f(v), q.shift(), q.length)
|
|
268
|
+
resume(q[0][0], q[0][1]); }
|
|
269
|
+
}
|
|
270
|
+
function __asyncDelegator(o) {
|
|
271
|
+
var i, p;
|
|
272
|
+
return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
|
|
273
|
+
function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
|
|
274
|
+
}
|
|
275
|
+
function __asyncValues(o) {
|
|
276
|
+
if (!Symbol.asyncIterator)
|
|
277
|
+
throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
278
|
+
var m = o[Symbol.asyncIterator], i;
|
|
279
|
+
return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
|
|
280
|
+
function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
|
|
281
|
+
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
|
|
282
|
+
}
|
|
283
|
+
function __makeTemplateObject(cooked, raw) {
|
|
284
|
+
if (Object.defineProperty) {
|
|
285
|
+
Object.defineProperty(cooked, "raw", { value: raw });
|
|
286
|
+
}
|
|
287
|
+
else {
|
|
288
|
+
cooked.raw = raw;
|
|
289
|
+
}
|
|
290
|
+
return cooked;
|
|
291
|
+
}
|
|
292
|
+
;
|
|
293
|
+
var __setModuleDefault = Object.create ? (function (o, v) {
|
|
294
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
295
|
+
}) : function (o, v) {
|
|
296
|
+
o["default"] = v;
|
|
297
|
+
};
|
|
298
|
+
function __importStar(mod) {
|
|
299
|
+
if (mod && mod.__esModule)
|
|
300
|
+
return mod;
|
|
301
|
+
var result = {};
|
|
302
|
+
if (mod != null)
|
|
303
|
+
for (var k in mod)
|
|
304
|
+
if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
|
|
305
|
+
__createBinding(result, mod, k);
|
|
306
|
+
__setModuleDefault(result, mod);
|
|
307
|
+
return result;
|
|
308
|
+
}
|
|
309
|
+
function __importDefault(mod) {
|
|
310
|
+
return (mod && mod.__esModule) ? mod : { default: mod };
|
|
311
|
+
}
|
|
312
|
+
function __classPrivateFieldGet(receiver, state, kind, f) {
|
|
313
|
+
if (kind === "a" && !f)
|
|
314
|
+
throw new TypeError("Private accessor was defined without a getter");
|
|
315
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
316
|
+
throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
317
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
318
|
+
}
|
|
319
|
+
function __classPrivateFieldSet(receiver, state, value, kind, f) {
|
|
320
|
+
if (kind === "m")
|
|
321
|
+
throw new TypeError("Private method is not writable");
|
|
322
|
+
if (kind === "a" && !f)
|
|
323
|
+
throw new TypeError("Private accessor was defined without a setter");
|
|
324
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
325
|
+
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
326
|
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
var _name, _form, _model, _subscription, _onChange;
|
|
330
|
+
var SdJsonEditor = /** @class */ (function () {
|
|
331
|
+
function SdJsonEditor(ref, utilityService) {
|
|
332
|
+
var _this = this;
|
|
333
|
+
this.ref = ref;
|
|
334
|
+
this.utilityService = utilityService;
|
|
335
|
+
this.id = "I" + uuid.v4();
|
|
336
|
+
_name.set(this, uuid.v4());
|
|
337
|
+
_form.set(this, void 0);
|
|
338
|
+
_model.set(this, void 0);
|
|
339
|
+
this.modelChange = new core.EventEmitter();
|
|
340
|
+
// Validator
|
|
341
|
+
this.isRequired = false;
|
|
342
|
+
this.sdChange = new core.EventEmitter();
|
|
343
|
+
this.formControl = new common.SdFormControl();
|
|
344
|
+
_subscription.set(this, new rxjs.Subscription());
|
|
345
|
+
this.reValidate = function () {
|
|
346
|
+
_this.formControl.updateValueAndValidity();
|
|
347
|
+
};
|
|
348
|
+
_onChange.set(this, function (value) {
|
|
349
|
+
_this.modelChange.emit(value);
|
|
350
|
+
_this.sdChange.emit(value);
|
|
351
|
+
});
|
|
352
|
+
}
|
|
353
|
+
Object.defineProperty(SdJsonEditor.prototype, "name", {
|
|
354
|
+
set: function (val) {
|
|
355
|
+
if (val) {
|
|
356
|
+
__classPrivateFieldSet(this, _name, val);
|
|
357
|
+
}
|
|
358
|
+
},
|
|
359
|
+
enumerable: false,
|
|
360
|
+
configurable: true
|
|
361
|
+
});
|
|
362
|
+
Object.defineProperty(SdJsonEditor.prototype, "form", {
|
|
363
|
+
set: function (val) {
|
|
364
|
+
if (val) {
|
|
365
|
+
if (val instanceof forms.NgForm) {
|
|
366
|
+
__classPrivateFieldSet(this, _form, val.form);
|
|
367
|
+
}
|
|
368
|
+
else {
|
|
369
|
+
__classPrivateFieldSet(this, _form, val);
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
},
|
|
373
|
+
enumerable: false,
|
|
374
|
+
configurable: true
|
|
375
|
+
});
|
|
376
|
+
Object.defineProperty(SdJsonEditor.prototype, "model", {
|
|
377
|
+
set: function (value) {
|
|
378
|
+
if (__classPrivateFieldGet(this, _model) !== value) {
|
|
379
|
+
__classPrivateFieldSet(this, _model, value);
|
|
380
|
+
this.formControl.setValue(value, {
|
|
381
|
+
emitEvent: false
|
|
382
|
+
});
|
|
383
|
+
}
|
|
384
|
+
},
|
|
385
|
+
enumerable: false,
|
|
386
|
+
configurable: true
|
|
387
|
+
});
|
|
388
|
+
Object.defineProperty(SdJsonEditor.prototype, "required", {
|
|
389
|
+
set: function (val) {
|
|
390
|
+
this.isRequired = (val === '') || val;
|
|
391
|
+
// this.#updateValidator();
|
|
392
|
+
},
|
|
393
|
+
enumerable: false,
|
|
394
|
+
configurable: true
|
|
395
|
+
});
|
|
396
|
+
Object.defineProperty(SdJsonEditor.prototype, "disabled", {
|
|
397
|
+
// Optional
|
|
398
|
+
set: function (val) {
|
|
399
|
+
val = (val === '') || val;
|
|
400
|
+
if (val) {
|
|
401
|
+
this.formControl.disable();
|
|
402
|
+
}
|
|
403
|
+
else {
|
|
404
|
+
this.formControl.enable();
|
|
405
|
+
}
|
|
406
|
+
},
|
|
407
|
+
enumerable: false,
|
|
408
|
+
configurable: true
|
|
409
|
+
});
|
|
410
|
+
SdJsonEditor.prototype.ngOnInit = function () {
|
|
411
|
+
var _this = this;
|
|
412
|
+
__classPrivateFieldGet(this, _subscription).add(this.formControl.sdChanges.subscribe(function () {
|
|
413
|
+
_this.ref.markForCheck();
|
|
414
|
+
}));
|
|
415
|
+
};
|
|
416
|
+
SdJsonEditor.prototype.ngAfterViewInit = function () {
|
|
417
|
+
var _this = this;
|
|
418
|
+
var _a;
|
|
419
|
+
var container = document.getElementById(this.id);
|
|
420
|
+
var option = {
|
|
421
|
+
onChange: function () {
|
|
422
|
+
_this.formControl.setValue(_this.editor.get());
|
|
423
|
+
},
|
|
424
|
+
};
|
|
425
|
+
this.editor = new JSONEditor__default['default'](container, option);
|
|
426
|
+
this.editor.set(this.formControl.value);
|
|
427
|
+
__classPrivateFieldGet(this, _subscription).add(this.formControl.valueChanges.pipe(operators.debounceTime(200)).subscribe(__classPrivateFieldGet(this, _onChange)));
|
|
428
|
+
(_a = __classPrivateFieldGet(this, _form)) === null || _a === void 0 ? void 0 : _a.addControl(__classPrivateFieldGet(this, _name), this.formControl);
|
|
429
|
+
this.ref.detectChanges();
|
|
430
|
+
};
|
|
431
|
+
SdJsonEditor.prototype.ngOnDestroy = function () {
|
|
432
|
+
var _a;
|
|
433
|
+
(_a = __classPrivateFieldGet(this, _form)) === null || _a === void 0 ? void 0 : _a.removeControl(__classPrivateFieldGet(this, _name));
|
|
434
|
+
__classPrivateFieldGet(this, _subscription).unsubscribe();
|
|
435
|
+
};
|
|
436
|
+
return SdJsonEditor;
|
|
437
|
+
}());
|
|
438
|
+
_name = new WeakMap(), _form = new WeakMap(), _model = new WeakMap(), _subscription = new WeakMap(), _onChange = new WeakMap();
|
|
439
|
+
SdJsonEditor.decorators = [
|
|
440
|
+
{ type: core.Component, args: [{
|
|
441
|
+
selector: 'sd-json-editor',
|
|
442
|
+
template: "<label *ngIf=\"label\" class=\"d-block T14M\">{{label}} <span class=\"text-danger mb-2\" *ngIf=\"required\">*</span></label>\r\n<div [id]=\"id\"></div>\r\n",
|
|
443
|
+
changeDetection: core.ChangeDetectionStrategy.OnPush,
|
|
444
|
+
styles: [""]
|
|
445
|
+
},] }
|
|
446
|
+
];
|
|
447
|
+
SdJsonEditor.ctorParameters = function () { return [
|
|
448
|
+
{ type: core.ChangeDetectorRef },
|
|
449
|
+
{ type: utility.SdUtilityService }
|
|
450
|
+
]; };
|
|
451
|
+
SdJsonEditor.propDecorators = {
|
|
452
|
+
name: [{ type: core.Input }],
|
|
453
|
+
form: [{ type: core.Input }],
|
|
454
|
+
label: [{ type: core.Input }],
|
|
455
|
+
model: [{ type: core.Input }],
|
|
456
|
+
modelChange: [{ type: core.Output }],
|
|
457
|
+
required: [{ type: core.Input }],
|
|
458
|
+
disabled: [{ type: core.Input }],
|
|
459
|
+
tooltip: [{ type: core.Input }],
|
|
460
|
+
sdChange: [{ type: core.Output }]
|
|
461
|
+
};
|
|
462
|
+
|
|
463
|
+
var SdJsonEditorModule = /** @class */ (function () {
|
|
464
|
+
function SdJsonEditorModule() {
|
|
465
|
+
}
|
|
466
|
+
return SdJsonEditorModule;
|
|
467
|
+
}());
|
|
468
|
+
SdJsonEditorModule.decorators = [
|
|
469
|
+
{ type: core.NgModule, args: [{
|
|
470
|
+
imports: [
|
|
471
|
+
common$1.CommonModule,
|
|
472
|
+
forms.FormsModule,
|
|
473
|
+
forms.ReactiveFormsModule,
|
|
474
|
+
formField.MatFormFieldModule,
|
|
475
|
+
input.MatInputModule,
|
|
476
|
+
icon.MatIconModule,
|
|
477
|
+
tooltip.MatTooltipModule,
|
|
478
|
+
translate.SdTranslateModule,
|
|
479
|
+
common.SdCommonModule,
|
|
480
|
+
button.MatButtonModule
|
|
481
|
+
],
|
|
482
|
+
declarations: [
|
|
483
|
+
SdJsonEditor,
|
|
484
|
+
],
|
|
485
|
+
exports: [
|
|
486
|
+
SdJsonEditor
|
|
487
|
+
]
|
|
488
|
+
},] }
|
|
489
|
+
];
|
|
490
|
+
|
|
491
|
+
/*
|
|
492
|
+
* Public API Surface of superdev-angular-core
|
|
493
|
+
*/
|
|
494
|
+
|
|
495
|
+
/**
|
|
496
|
+
* Generated bundle index. Do not edit.
|
|
497
|
+
*/
|
|
498
|
+
|
|
499
|
+
exports.SdJsonEditor = SdJsonEditor;
|
|
500
|
+
exports.SdJsonEditorModule = SdJsonEditorModule;
|
|
501
|
+
|
|
502
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
503
|
+
|
|
504
|
+
})));
|
|
505
|
+
//# sourceMappingURL=sd-angular-core-json-editor.umd.js.map
|