@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
|
@@ -185,31 +185,28 @@ function toDataURL(url, callback) {
|
|
|
185
185
|
function getDeepDiffDetails(obj1, obj2) {
|
|
186
186
|
let diff = detailedDiff(obj2, obj1);
|
|
187
187
|
let diffString = '';
|
|
188
|
+
const formatValue = (value) => {
|
|
189
|
+
if (moment.isDate(value) || moment(value, moment.ISO_8601, true).isValid()) {
|
|
190
|
+
return moment(value).format('llll');
|
|
191
|
+
}
|
|
192
|
+
return typeof value === 'string' ? `"${value}"` : String(value);
|
|
193
|
+
};
|
|
188
194
|
const formatObjectDiff = (obj1, obj2) => {
|
|
189
|
-
if (
|
|
190
|
-
return
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
if (
|
|
194
|
-
const arrayDiff = obj1[key].map((item, index) => typeof item === 'object' && obj2[key][index]
|
|
195
|
-
? `{${formatObjectDiff(item, obj2[key][index])}}`
|
|
196
|
-
: `"${item}" to "${obj2[key][index]}"`).join(', ');
|
|
197
|
-
return `${toTitleCase(key)}: [${arrayDiff}]`;
|
|
198
|
-
}
|
|
199
|
-
if (typeof obj1[key] === 'object' && obj2[key]) {
|
|
195
|
+
if (obj1 === null || obj2 === null || typeof obj1 !== 'object' || typeof obj2 !== 'object') {
|
|
196
|
+
return `from: ${formatValue(obj1)} to: ${formatValue(obj2)}`;
|
|
197
|
+
}
|
|
198
|
+
return Object.keys(obj1).map(key => {
|
|
199
|
+
if (typeof obj1[key] === 'object' && obj1[key] !== null && obj2[key] !== null) {
|
|
200
200
|
return `${toTitleCase(key)}: {${formatObjectDiff(obj1[key], obj2[key])}}`;
|
|
201
201
|
}
|
|
202
|
-
return `${toTitleCase(key)}:
|
|
203
|
-
})
|
|
204
|
-
.join(', ');
|
|
202
|
+
return `${toTitleCase(key)}: from: ${formatValue(obj1[key])} to: ${formatValue(obj2[key])}`;
|
|
203
|
+
}).join(', ');
|
|
205
204
|
};
|
|
206
|
-
if (Object.keys(diff
|
|
205
|
+
if (Object.keys(diff.updated).length > 0) {
|
|
207
206
|
diffString += 'Updated:\n';
|
|
208
|
-
const updates = Object.keys(diff
|
|
209
|
-
.filter(key => key.substr(0, 2) !== 'id' && diff
|
|
210
|
-
.map(key =>
|
|
211
|
-
? `${toTitleCase(key)}: "${moment(diff['updated'][key]).format('llll')}" to "${moment(obj2[key]).format('llll')}"`
|
|
212
|
-
: `${toTitleCase(key)}: {${formatObjectDiff(diff['updated'][key], obj2[key])}}`)
|
|
207
|
+
const updates = Object.keys(diff.updated)
|
|
208
|
+
.filter(key => key.substr(0, 2) !== 'id' && diff.updated[key] !== obj2[key])
|
|
209
|
+
.map(key => `${toTitleCase(key)}: {${formatObjectDiff(diff.updated[key], obj2[key])}}`)
|
|
213
210
|
.join(',\n');
|
|
214
211
|
diffString += updates ? `${updates}\n` : '';
|
|
215
212
|
}
|
|
@@ -1961,14 +1958,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
1961
1958
|
|
|
1962
1959
|
// tslint:disable-next-line:component-class-suffix
|
|
1963
1960
|
class DialogNotifyContent {
|
|
1964
|
-
constructor(activeModal) {
|
|
1965
|
-
this.activeModal = activeModal;
|
|
1966
|
-
}
|
|
1967
1961
|
handleKeyboardEvent(event) {
|
|
1968
1962
|
if (event.keyCode === 13) {
|
|
1969
1963
|
this.activeModal.close();
|
|
1970
1964
|
}
|
|
1971
1965
|
}
|
|
1966
|
+
constructor(activeModal) {
|
|
1967
|
+
this.activeModal = activeModal;
|
|
1968
|
+
}
|
|
1972
1969
|
}
|
|
1973
1970
|
DialogNotifyContent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DialogNotifyContent, deps: [{ token: i1$3.NgbActiveModal }], target: i0.ɵɵFactoryTarget.Component });
|
|
1974
1971
|
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: `
|
|
@@ -2308,14 +2305,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
2308
2305
|
|
|
2309
2306
|
// tslint:disable-next-line:component-class-suffix
|
|
2310
2307
|
class DialogErrorContent {
|
|
2311
|
-
constructor(activeModal) {
|
|
2312
|
-
this.activeModal = activeModal;
|
|
2313
|
-
}
|
|
2314
2308
|
handleKeyboardEvent(event) {
|
|
2315
2309
|
if (event.keyCode === 13) {
|
|
2316
2310
|
this.activeModal.close();
|
|
2317
2311
|
}
|
|
2318
2312
|
}
|
|
2313
|
+
constructor(activeModal) {
|
|
2314
|
+
this.activeModal = activeModal;
|
|
2315
|
+
}
|
|
2319
2316
|
}
|
|
2320
2317
|
DialogErrorContent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DialogErrorContent, deps: [{ token: i1$3.NgbActiveModal }], target: i0.ɵɵFactoryTarget.Component });
|
|
2321
2318
|
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: `
|
|
@@ -2361,14 +2358,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
2361
2358
|
|
|
2362
2359
|
// tslint:disable-next-line:component-class-suffix
|
|
2363
2360
|
class DialogConfirmContent {
|
|
2364
|
-
constructor(activeModal) {
|
|
2365
|
-
this.activeModal = activeModal;
|
|
2366
|
-
}
|
|
2367
2361
|
handleKeyboardEvent(event) {
|
|
2368
2362
|
if (event.keyCode === 13) {
|
|
2369
2363
|
this.activeModal.close();
|
|
2370
2364
|
}
|
|
2371
2365
|
}
|
|
2366
|
+
constructor(activeModal) {
|
|
2367
|
+
this.activeModal = activeModal;
|
|
2368
|
+
}
|
|
2372
2369
|
}
|
|
2373
2370
|
DialogConfirmContent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DialogConfirmContent, deps: [{ token: i1$3.NgbActiveModal }], target: i0.ɵɵFactoryTarget.Component });
|
|
2374
2371
|
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: `
|
|
@@ -2780,14 +2777,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
2780
2777
|
}] } });
|
|
2781
2778
|
|
|
2782
2779
|
class ResizeService {
|
|
2780
|
+
get onResize$() {
|
|
2781
|
+
return this.resizeSubject.asObservable();
|
|
2782
|
+
}
|
|
2783
2783
|
constructor(eventManager) {
|
|
2784
2784
|
this.eventManager = eventManager;
|
|
2785
2785
|
this.resizeSubject = new Subject();
|
|
2786
2786
|
this.eventManager.addGlobalEventListener('window', 'resize', this.onResize.bind(this));
|
|
2787
2787
|
}
|
|
2788
|
-
get onResize$() {
|
|
2789
|
-
return this.resizeSubject.asObservable();
|
|
2790
|
-
}
|
|
2791
2788
|
onResize(event) {
|
|
2792
2789
|
this.resizeSubject.next(event.target);
|
|
2793
2790
|
}
|
|
@@ -4859,13 +4856,6 @@ class NavbarModuleComponent extends BaseComponent {
|
|
|
4859
4856
|
this.selectTabFromRouter();
|
|
4860
4857
|
}
|
|
4861
4858
|
}));
|
|
4862
|
-
this.routerEvents$.push(this._services._router.events
|
|
4863
|
-
//.filter(event => event instanceof NavigationCancel)
|
|
4864
|
-
.subscribe((event) => {
|
|
4865
|
-
if (this._services._router.url.replace(/\/[a-f0-9]{24}$/, '').replace(/\?.+$/, '') !== this.currentRoute || !this.selectedTab) {
|
|
4866
|
-
this.selectTabFromRouter();
|
|
4867
|
-
}
|
|
4868
|
-
}));
|
|
4869
4859
|
this.routerEvents$.push(this._services._app.navbarModuleData.subscribe(data => {
|
|
4870
4860
|
this.menuData = data;
|
|
4871
4861
|
if (this._services._router.url.replace(/\/[a-f0-9]{24}$/, '').replace(/\?.+$/, '') !== this.currentRoute || !this.selectedTab) {
|
|
@@ -5985,6 +5975,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
5985
5975
|
}] });
|
|
5986
5976
|
|
|
5987
5977
|
class SortTableDirective {
|
|
5978
|
+
get direction() { return this._direction; }
|
|
5979
|
+
set direction(direction) {
|
|
5980
|
+
if (direction && direction !== -1 && direction !== 1) {
|
|
5981
|
+
throw Error(direction + ' is not a valid sort direction (0 or 1).');
|
|
5982
|
+
}
|
|
5983
|
+
this._direction = direction;
|
|
5984
|
+
}
|
|
5988
5985
|
// @HostBinding('class') elementClass = '';
|
|
5989
5986
|
constructor(element) {
|
|
5990
5987
|
this.element = element;
|
|
@@ -6010,13 +6007,6 @@ class SortTableDirective {
|
|
|
6010
6007
|
// this.elementClass = 'collapseTable';
|
|
6011
6008
|
// }
|
|
6012
6009
|
}
|
|
6013
|
-
get direction() { return this._direction; }
|
|
6014
|
-
set direction(direction) {
|
|
6015
|
-
if (direction && direction !== -1 && direction !== 1) {
|
|
6016
|
-
throw Error(direction + ' is not a valid sort direction (0 or 1).');
|
|
6017
|
-
}
|
|
6018
|
-
this._direction = direction;
|
|
6019
|
-
}
|
|
6020
6010
|
register(sortable) {
|
|
6021
6011
|
if (!sortable.id) {
|
|
6022
6012
|
throw Error('CTSortHeader must be provided with a unique id');
|