@resolveio/client-lib-core 15.0.0 → 15.0.2
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/esm2020/lib/models/user-group.model.mjs +1 -1
- package/esm2020/lib/util/common.helper.mjs +18 -21
- package/esm2020/lib/util/window-resize.service.mjs +4 -4
- package/esm2020/lib/widgets/dialog/dialog.confirm.content.mjs +4 -4
- package/esm2020/lib/widgets/dialog/dialog.error.content.mjs +4 -4
- package/esm2020/lib/widgets/dialog/dialog.notify.content.mjs +4 -4
- package/esm2020/lib/widgets/navbar-module/navbar-module.component.mjs +1 -8
- package/esm2020/lib/widgets/sort-table/sort-table.directive.mjs +8 -8
- package/fesm2015/resolveio-client-lib-core.mjs +36 -46
- package/fesm2015/resolveio-client-lib-core.mjs.map +1 -1
- package/fesm2020/resolveio-client-lib-core.mjs +36 -46
- package/fesm2020/resolveio-client-lib-core.mjs.map +1 -1
- package/lib/directive/scroll.d.ts +1 -1
- package/lib/models/dialog.model.d.ts +1 -1
- package/lib/models/navbar-main-tab.model.d.ts +1 -1
- package/lib/models/support-ticket.model.d.ts +5 -5
- package/lib/models/user-group.model.d.ts +1 -0
- package/lib/widgets/alert/alert.model.d.ts +1 -1
- package/lib/widgets/sort-table/sort-table.directive.d.ts +1 -1
- package/package.json +1 -1
|
@@ -117,14 +117,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
117
117
|
}], ctorParameters: function () { return []; } });
|
|
118
118
|
|
|
119
119
|
class ResizeService {
|
|
120
|
+
get onResize$() {
|
|
121
|
+
return this.resizeSubject.asObservable();
|
|
122
|
+
}
|
|
120
123
|
constructor(eventManager) {
|
|
121
124
|
this.eventManager = eventManager;
|
|
122
125
|
this.resizeSubject = new Subject();
|
|
123
126
|
this.eventManager.addGlobalEventListener('window', 'resize', this.onResize.bind(this));
|
|
124
127
|
}
|
|
125
|
-
get onResize$() {
|
|
126
|
-
return this.resizeSubject.asObservable();
|
|
127
|
-
}
|
|
128
128
|
onResize(event) {
|
|
129
129
|
this.resizeSubject.next(event.target);
|
|
130
130
|
}
|
|
@@ -466,31 +466,28 @@ function toDataURL(url, callback) {
|
|
|
466
466
|
function getDeepDiffDetails(obj1, obj2) {
|
|
467
467
|
let diff = detailedDiff(obj2, obj1);
|
|
468
468
|
let diffString = '';
|
|
469
|
+
const formatValue = (value) => {
|
|
470
|
+
if (moment.isDate(value) || moment(value, moment.ISO_8601, true).isValid()) {
|
|
471
|
+
return moment(value).format('llll');
|
|
472
|
+
}
|
|
473
|
+
return typeof value === 'string' ? `"${value}"` : String(value);
|
|
474
|
+
};
|
|
469
475
|
const formatObjectDiff = (obj1, obj2) => {
|
|
470
|
-
if (
|
|
471
|
-
return
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
if (
|
|
475
|
-
const arrayDiff = obj1[key].map((item, index) => typeof item === 'object' && obj2[key][index]
|
|
476
|
-
? `{${formatObjectDiff(item, obj2[key][index])}}`
|
|
477
|
-
: `"${item}" to "${obj2[key][index]}"`).join(', ');
|
|
478
|
-
return `${toTitleCase(key)}: [${arrayDiff}]`;
|
|
479
|
-
}
|
|
480
|
-
if (typeof obj1[key] === 'object' && obj2[key]) {
|
|
476
|
+
if (obj1 === null || obj2 === null || typeof obj1 !== 'object' || typeof obj2 !== 'object') {
|
|
477
|
+
return `from: ${formatValue(obj1)} to: ${formatValue(obj2)}`;
|
|
478
|
+
}
|
|
479
|
+
return Object.keys(obj1).map(key => {
|
|
480
|
+
if (typeof obj1[key] === 'object' && obj1[key] !== null && obj2[key] !== null) {
|
|
481
481
|
return `${toTitleCase(key)}: {${formatObjectDiff(obj1[key], obj2[key])}}`;
|
|
482
482
|
}
|
|
483
|
-
return `${toTitleCase(key)}:
|
|
484
|
-
})
|
|
485
|
-
.join(', ');
|
|
483
|
+
return `${toTitleCase(key)}: from: ${formatValue(obj1[key])} to: ${formatValue(obj2[key])}`;
|
|
484
|
+
}).join(', ');
|
|
486
485
|
};
|
|
487
|
-
if (Object.keys(diff
|
|
486
|
+
if (Object.keys(diff.updated).length > 0) {
|
|
488
487
|
diffString += 'Updated:\n';
|
|
489
|
-
const updates = Object.keys(diff
|
|
490
|
-
.filter(key => key.substr(0, 2) !== 'id' && diff
|
|
491
|
-
.map(key =>
|
|
492
|
-
? `${toTitleCase(key)}: "${moment(diff['updated'][key]).format('llll')}" to "${moment(obj2[key]).format('llll')}"`
|
|
493
|
-
: `${toTitleCase(key)}: {${formatObjectDiff(diff['updated'][key], obj2[key])}}`)
|
|
488
|
+
const updates = Object.keys(diff.updated)
|
|
489
|
+
.filter(key => key.substr(0, 2) !== 'id' && diff.updated[key] !== obj2[key])
|
|
490
|
+
.map(key => `${toTitleCase(key)}: {${formatObjectDiff(diff.updated[key], obj2[key])}}`)
|
|
494
491
|
.join(',\n');
|
|
495
492
|
diffString += updates ? `${updates}\n` : '';
|
|
496
493
|
}
|
|
@@ -1979,14 +1976,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
1979
1976
|
|
|
1980
1977
|
// tslint:disable-next-line:component-class-suffix
|
|
1981
1978
|
class DialogNotifyContent {
|
|
1982
|
-
constructor(activeModal) {
|
|
1983
|
-
this.activeModal = activeModal;
|
|
1984
|
-
}
|
|
1985
1979
|
handleKeyboardEvent(event) {
|
|
1986
1980
|
if (event.keyCode === 13) {
|
|
1987
1981
|
this.activeModal.close();
|
|
1988
1982
|
}
|
|
1989
1983
|
}
|
|
1984
|
+
constructor(activeModal) {
|
|
1985
|
+
this.activeModal = activeModal;
|
|
1986
|
+
}
|
|
1990
1987
|
}
|
|
1991
1988
|
DialogNotifyContent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DialogNotifyContent, deps: [{ token: i1$4.NgbActiveModal }], target: i0.ɵɵFactoryTarget.Component });
|
|
1992
1989
|
DialogNotifyContent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: DialogNotifyContent, selector: "ng-component", inputs: { title: "title", body: "body" }, host: { listeners: { "document:keypress": "handleKeyboardEvent($event)" } }, ngImport: i0, template: `
|
|
@@ -2326,14 +2323,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
2326
2323
|
|
|
2327
2324
|
// tslint:disable-next-line:component-class-suffix
|
|
2328
2325
|
class DialogErrorContent {
|
|
2329
|
-
constructor(activeModal) {
|
|
2330
|
-
this.activeModal = activeModal;
|
|
2331
|
-
}
|
|
2332
2326
|
handleKeyboardEvent(event) {
|
|
2333
2327
|
if (event.keyCode === 13) {
|
|
2334
2328
|
this.activeModal.close();
|
|
2335
2329
|
}
|
|
2336
2330
|
}
|
|
2331
|
+
constructor(activeModal) {
|
|
2332
|
+
this.activeModal = activeModal;
|
|
2333
|
+
}
|
|
2337
2334
|
}
|
|
2338
2335
|
DialogErrorContent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DialogErrorContent, deps: [{ token: i1$4.NgbActiveModal }], target: i0.ɵɵFactoryTarget.Component });
|
|
2339
2336
|
DialogErrorContent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: DialogErrorContent, selector: "ng-component", inputs: { title: "title", body: "body" }, host: { listeners: { "document:keypress": "handleKeyboardEvent($event)" } }, ngImport: i0, template: `
|
|
@@ -2379,14 +2376,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
2379
2376
|
|
|
2380
2377
|
// tslint:disable-next-line:component-class-suffix
|
|
2381
2378
|
class DialogConfirmContent {
|
|
2382
|
-
constructor(activeModal) {
|
|
2383
|
-
this.activeModal = activeModal;
|
|
2384
|
-
}
|
|
2385
2379
|
handleKeyboardEvent(event) {
|
|
2386
2380
|
if (event.keyCode === 13) {
|
|
2387
2381
|
this.activeModal.close();
|
|
2388
2382
|
}
|
|
2389
2383
|
}
|
|
2384
|
+
constructor(activeModal) {
|
|
2385
|
+
this.activeModal = activeModal;
|
|
2386
|
+
}
|
|
2390
2387
|
}
|
|
2391
2388
|
DialogConfirmContent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DialogConfirmContent, deps: [{ token: i1$4.NgbActiveModal }], target: i0.ɵɵFactoryTarget.Component });
|
|
2392
2389
|
DialogConfirmContent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: DialogConfirmContent, selector: "ng-component", inputs: { title: "title", body: "body", html: "html" }, host: { listeners: { "document:keypress": "handleKeyboardEvent($event)" } }, ngImport: i0, template: `
|
|
@@ -4856,13 +4853,6 @@ class NavbarModuleComponent extends BaseComponent {
|
|
|
4856
4853
|
this.selectTabFromRouter();
|
|
4857
4854
|
}
|
|
4858
4855
|
}));
|
|
4859
|
-
this.routerEvents$.push(this._services._router.events
|
|
4860
|
-
//.filter(event => event instanceof NavigationCancel)
|
|
4861
|
-
.subscribe((event) => {
|
|
4862
|
-
if (this._services._router.url.replace(/\/[a-f0-9]{24}$/, '').replace(/\?.+$/, '') !== this.currentRoute || !this.selectedTab) {
|
|
4863
|
-
this.selectTabFromRouter();
|
|
4864
|
-
}
|
|
4865
|
-
}));
|
|
4866
4856
|
this.routerEvents$.push(this._services._app.navbarModuleData.subscribe(data => {
|
|
4867
4857
|
this.menuData = data;
|
|
4868
4858
|
if (this._services._router.url.replace(/\/[a-f0-9]{24}$/, '').replace(/\?.+$/, '') !== this.currentRoute || !this.selectedTab) {
|
|
@@ -5982,6 +5972,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
5982
5972
|
}] });
|
|
5983
5973
|
|
|
5984
5974
|
class SortTableDirective {
|
|
5975
|
+
get direction() { return this._direction; }
|
|
5976
|
+
set direction(direction) {
|
|
5977
|
+
if (direction && direction !== -1 && direction !== 1) {
|
|
5978
|
+
throw Error(direction + ' is not a valid sort direction (0 or 1).');
|
|
5979
|
+
}
|
|
5980
|
+
this._direction = direction;
|
|
5981
|
+
}
|
|
5985
5982
|
// @HostBinding('class') elementClass = '';
|
|
5986
5983
|
constructor(element) {
|
|
5987
5984
|
this.element = element;
|
|
@@ -6007,13 +6004,6 @@ class SortTableDirective {
|
|
|
6007
6004
|
// this.elementClass = 'collapseTable';
|
|
6008
6005
|
// }
|
|
6009
6006
|
}
|
|
6010
|
-
get direction() { return this._direction; }
|
|
6011
|
-
set direction(direction) {
|
|
6012
|
-
if (direction && direction !== -1 && direction !== 1) {
|
|
6013
|
-
throw Error(direction + ' is not a valid sort direction (0 or 1).');
|
|
6014
|
-
}
|
|
6015
|
-
this._direction = direction;
|
|
6016
|
-
}
|
|
6017
6007
|
register(sortable) {
|
|
6018
6008
|
if (!sortable.id) {
|
|
6019
6009
|
throw Error('CTSortHeader must be provided with a unique id');
|