taxtank-core 0.1.5 → 0.2.0
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/taxtank-core.umd.js +357 -271
- package/bundles/taxtank-core.umd.js.map +1 -1
- package/esm2015/lib/collections/abstract.collection.js +19 -3
- package/esm2015/lib/collections/collection-dictionary.js +4 -1
- package/esm2015/lib/collections/user-event-setting.collection.js +3 -55
- package/esm2015/lib/db/Enums/user-event-status.enum.js +2 -1
- package/esm2015/lib/db/Enums/user-event-type-client-type.enum.js +29 -0
- package/esm2015/lib/db/Enums/user-event-type-employee-type.enum.js +17 -0
- package/esm2015/lib/db/Enums/user-event-type-frequency.enum.js +4 -5
- package/esm2015/lib/db/Enums/user-event-type-user-type.enum.js +7 -0
- package/esm2015/lib/db/Models/user-event-setting.js +1 -1
- package/esm2015/lib/db/Models/user-event-type-category.js +3 -0
- package/esm2015/lib/db/Models/user-event-type.js +1 -1
- package/esm2015/lib/db/Models/user-event.js +1 -1
- package/esm2015/lib/models/data-table/data-table-column.js +13 -0
- package/esm2015/lib/models/data-table/data-table.js +40 -0
- package/esm2015/lib/models/notification/notification.js +13 -37
- package/esm2015/lib/models/pdf/pdf-config.js +24 -0
- package/esm2015/lib/models/user-event/user-event-setting.js +3 -3
- package/esm2015/lib/models/user-event/user-event-type-category.js +4 -0
- package/esm2015/lib/models/user-event/user-event-type.js +13 -18
- package/esm2015/lib/services/bank/bank-transaction.service.js +3 -3
- package/esm2015/lib/services/bank/basiq.service.js +3 -3
- package/esm2015/lib/services/pdf/pdf.service.js +55 -0
- package/esm2015/lib/services/xlsx/xlsx.service.js +54 -0
- package/esm2015/public-api.js +9 -7
- package/fesm2015/taxtank-core.js +315 -243
- package/fesm2015/taxtank-core.js.map +1 -1
- package/lib/collections/abstract.collection.d.ts +4 -1
- package/lib/collections/collection-dictionary.d.ts +4 -1
- package/lib/collections/user-event-setting.collection.d.ts +1 -23
- package/lib/db/Enums/user-event-status.enum.d.ts +2 -1
- package/lib/db/Enums/user-event-type-client-type.enum.d.ts +27 -0
- package/lib/db/Enums/user-event-type-employee-type.enum.d.ts +15 -0
- package/lib/db/Enums/user-event-type-frequency.enum.d.ts +3 -4
- package/lib/db/Enums/user-event-type-user-type.enum.d.ts +5 -0
- package/lib/db/Models/user-event-setting.d.ts +1 -1
- package/lib/db/Models/user-event-type-category.d.ts +4 -0
- package/lib/db/Models/user-event-type.d.ts +5 -3
- package/lib/db/Models/user-event.d.ts +3 -1
- package/lib/models/data-table/data-table-column.d.ts +20 -0
- package/lib/models/data-table/data-table.d.ts +24 -0
- package/lib/models/notification/notification.d.ts +4 -6
- package/lib/models/pdf/pdf-config.d.ts +8 -0
- package/lib/models/user-event/user-event-setting.d.ts +1 -1
- package/lib/models/user-event/user-event-type-category.d.ts +3 -0
- package/lib/models/user-event/user-event-type.d.ts +4 -2
- package/lib/services/pdf/pdf.service.d.ts +14 -0
- package/lib/services/xlsx/xlsx.service.d.ts +11 -0
- package/package.json +6 -2
- package/public-api.d.ts +8 -6
- package/esm2015/lib/db/Enums/user-event-type-reminder-type.enum.js +0 -8
- package/esm2015/lib/db/Enums/user-event-type-reminder.enum.js +0 -7
- package/esm2015/lib/db/Enums/user-event-type-type.enum.js +0 -35
- package/esm2015/lib/models/notification/notification-event-types.const.js +0 -43
- package/esm2015/lib/models/user-event/user-event-category.enum.js +0 -11
- package/esm2015/lib/models/user-event/user-event-category.js +0 -6
- package/lib/db/Enums/user-event-type-reminder-type.enum.d.ts +0 -6
- package/lib/db/Enums/user-event-type-reminder.enum.d.ts +0 -5
- package/lib/db/Enums/user-event-type-type.enum.d.ts +0 -33
- package/lib/models/notification/notification-event-types.const.d.ts +0 -7
- package/lib/models/user-event/user-event-category.d.ts +0 -8
- package/lib/models/user-event/user-event-category.enum.d.ts +0 -9
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('lodash/has'), require('lodash/get'), require('lodash/flatten'), require('lodash/first'), require('lodash/last'), require('lodash/uniqBy'), require('lodash/concat'), require('lodash/compact'), require('class-transformer'), require('moment'), require('moment-range'), require('lodash/cloneDeep'), require('@angular/forms'), require('rxjs'), require('rxjs/operators'), require('@angular/common/http'), require('@auth0/angular-jwt'), require('lodash'), require('event-source-polyfill/src/eventsource.min.js'), require('@angular/router'), require('lodash/clone'), require('@stripe/stripe-js')) :
|
|
3
|
-
typeof define === 'function' && define.amd ? define('taxtank-core', ['exports', '@angular/core', '@angular/common', 'lodash/has', 'lodash/get', 'lodash/flatten', 'lodash/first', 'lodash/last', 'lodash/uniqBy', 'lodash/concat', 'lodash/compact', 'class-transformer', 'moment', 'moment-range', 'lodash/cloneDeep', '@angular/forms', 'rxjs', 'rxjs/operators', '@angular/common/http', '@auth0/angular-jwt', 'lodash', 'event-source-polyfill/src/eventsource.min.js', '@angular/router', 'lodash/clone', '@stripe/stripe-js'], factory) :
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["taxtank-core"] = {}, global.ng.core, global.ng.common, global.has, global.get, global.flatten, global.first, global.last, global.uniqBy, global.concat, global.compact, global.classTransformer, global.moment, global.momentRange, global.cloneDeep$1, global.ng.forms, global.rxjs, global.rxjs.operators, global.ng.common.http, global.angularJwt, global._, global.eventsource_min_js, global.ng.router, global.clone, global.stripeJs));
|
|
5
|
-
})(this, (function (exports, i0, common, has, get, flatten, first, last, uniqBy, concat, compact, classTransformer, moment, momentRange, cloneDeep$1, forms, rxjs, operators, i1, angularJwt, _, eventsource_min_js, i1$1, clone, stripeJs) { 'use strict';
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('lodash/has'), require('lodash/get'), require('lodash/flatten'), require('lodash/first'), require('lodash/last'), require('lodash/uniqBy'), require('lodash/concat'), require('lodash/compact'), require('class-transformer'), require('moment'), require('moment-range'), require('lodash/cloneDeep'), require('@angular/forms'), require('rxjs'), require('rxjs/operators'), require('@angular/common/http'), require('@auth0/angular-jwt'), require('lodash'), require('event-source-polyfill/src/eventsource.min.js'), require('@angular/router'), require('lodash/clone'), require('jspdf'), require('jspdf-autotable'), require('@stripe/stripe-js'), require('xlsx'), require('file-saver')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define('taxtank-core', ['exports', '@angular/core', '@angular/common', 'lodash/has', 'lodash/get', 'lodash/flatten', 'lodash/first', 'lodash/last', 'lodash/uniqBy', 'lodash/concat', 'lodash/compact', 'class-transformer', 'moment', 'moment-range', 'lodash/cloneDeep', '@angular/forms', 'rxjs', 'rxjs/operators', '@angular/common/http', '@auth0/angular-jwt', 'lodash', 'event-source-polyfill/src/eventsource.min.js', '@angular/router', 'lodash/clone', 'jspdf', 'jspdf-autotable', '@stripe/stripe-js', 'xlsx', 'file-saver'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["taxtank-core"] = {}, global.ng.core, global.ng.common, global.has, global.get, global.flatten, global.first, global.last, global.uniqBy, global.concat, global.compact, global.classTransformer, global.moment, global.momentRange, global.cloneDeep$1, global.ng.forms, global.rxjs, global.rxjs.operators, global.ng.common.http, global.angularJwt, global._, global.eventsource_min_js, global.ng.router, global.clone, global.jsPDF, global.autoTable, global.stripeJs, global.xlsx, global.FileSaver));
|
|
5
|
+
})(this, (function (exports, i0, common, has, get, flatten, first, last, uniqBy, concat, compact, classTransformer, moment, momentRange, cloneDeep$1, forms, rxjs, operators, i1, angularJwt, _, eventsource_min_js, i1$1, clone, jsPDF, autoTable, stripeJs, xlsx, FileSaver) { 'use strict';
|
|
6
6
|
|
|
7
7
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
8
8
|
|
|
@@ -39,6 +39,10 @@
|
|
|
39
39
|
var ___default = /*#__PURE__*/_interopDefaultLegacy(_);
|
|
40
40
|
var i1__namespace$1 = /*#__PURE__*/_interopNamespace(i1$1);
|
|
41
41
|
var clone__default = /*#__PURE__*/_interopDefaultLegacy(clone);
|
|
42
|
+
var jsPDF__default = /*#__PURE__*/_interopDefaultLegacy(jsPDF);
|
|
43
|
+
var autoTable__default = /*#__PURE__*/_interopDefaultLegacy(autoTable);
|
|
44
|
+
var xlsx__namespace = /*#__PURE__*/_interopNamespace(xlsx);
|
|
45
|
+
var FileSaver__namespace = /*#__PURE__*/_interopNamespace(FileSaver);
|
|
42
46
|
|
|
43
47
|
var TtCoreModule = /** @class */ (function () {
|
|
44
48
|
function TtCoreModule() {
|
|
@@ -453,6 +457,9 @@
|
|
|
453
457
|
if (items === void 0) { items = []; }
|
|
454
458
|
return new this.collectionConstructor(items);
|
|
455
459
|
};
|
|
460
|
+
CollectionDictionary.prototype.length = function () {
|
|
461
|
+
return this.keys.length;
|
|
462
|
+
};
|
|
456
463
|
/**
|
|
457
464
|
* Group collection items by passed path into items object
|
|
458
465
|
*/
|
|
@@ -480,6 +487,7 @@
|
|
|
480
487
|
return CollectionDictionary;
|
|
481
488
|
}());
|
|
482
489
|
|
|
490
|
+
var DEFAULT_INDEX = 'other';
|
|
483
491
|
/**
|
|
484
492
|
* collection abstract class. Contains common properties and methods for all collections
|
|
485
493
|
*/
|
|
@@ -488,8 +496,24 @@
|
|
|
488
496
|
if (items === void 0) { items = []; }
|
|
489
497
|
this.items = items;
|
|
490
498
|
}
|
|
491
|
-
AbstractCollection.prototype.
|
|
492
|
-
|
|
499
|
+
AbstractCollection.prototype.create = function (items) {
|
|
500
|
+
if (items === void 0) { items = []; }
|
|
501
|
+
return new this.constructor(items);
|
|
502
|
+
};
|
|
503
|
+
AbstractCollection.prototype.getBy = function (field, value) {
|
|
504
|
+
return this.create(this.items.filter(function (item) { return item[field] === value; }));
|
|
505
|
+
};
|
|
506
|
+
AbstractCollection.prototype.groupBy = function (path) {
|
|
507
|
+
if (path === void 0) { path = ''; }
|
|
508
|
+
return new CollectionDictionary(this, path);
|
|
509
|
+
};
|
|
510
|
+
AbstractCollection.prototype.indexBy = function (path) {
|
|
511
|
+
// Create empty initial object for groups
|
|
512
|
+
var result = {};
|
|
513
|
+
this.toArray().forEach(function (model) {
|
|
514
|
+
result[get__default["default"](model, path, DEFAULT_INDEX)] = model;
|
|
515
|
+
});
|
|
516
|
+
return result;
|
|
493
517
|
};
|
|
494
518
|
/**
|
|
495
519
|
* Iterator that allow to iterate collection items
|
|
@@ -2078,143 +2102,16 @@
|
|
|
2078
2102
|
return TransactionCollection;
|
|
2079
2103
|
}(AbstractCollection));
|
|
2080
2104
|
|
|
2081
|
-
var UserEventSetting$1 = /** @class */ (function () {
|
|
2082
|
-
function UserEventSetting() {
|
|
2083
|
-
}
|
|
2084
|
-
return UserEventSetting;
|
|
2085
|
-
}());
|
|
2086
|
-
|
|
2087
|
-
var UserEventType$1 = /** @class */ (function () {
|
|
2088
|
-
function UserEventType() {
|
|
2089
|
-
}
|
|
2090
|
-
return UserEventType;
|
|
2091
|
-
}());
|
|
2092
|
-
|
|
2093
|
-
/**
|
|
2094
|
-
* Category of user event type
|
|
2095
|
-
*/
|
|
2096
|
-
var UserEventCategory = /** @class */ (function () {
|
|
2097
|
-
function UserEventCategory() {
|
|
2098
|
-
}
|
|
2099
|
-
return UserEventCategory;
|
|
2100
|
-
}());
|
|
2101
|
-
|
|
2102
|
-
/**
|
|
2103
|
-
* Enum with user event categories
|
|
2104
|
-
*/
|
|
2105
|
-
exports.UserEventCategoryEnum = void 0;
|
|
2106
|
-
(function (UserEventCategoryEnum) {
|
|
2107
|
-
UserEventCategoryEnum[UserEventCategoryEnum["USER"] = 1] = "USER";
|
|
2108
|
-
UserEventCategoryEnum[UserEventCategoryEnum["CO_OWNER"] = 2] = "CO_OWNER";
|
|
2109
|
-
UserEventCategoryEnum[UserEventCategoryEnum["FIRM"] = 3] = "FIRM";
|
|
2110
|
-
UserEventCategoryEnum[UserEventCategoryEnum["BASIQ"] = 4] = "BASIQ";
|
|
2111
|
-
})(exports.UserEventCategoryEnum || (exports.UserEventCategoryEnum = {}));
|
|
2112
|
-
|
|
2113
|
-
var UserEventType = /** @class */ (function (_super) {
|
|
2114
|
-
__extends(UserEventType, _super);
|
|
2115
|
-
function UserEventType() {
|
|
2116
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
2117
|
-
}
|
|
2118
|
-
return UserEventType;
|
|
2119
|
-
}(UserEventType$1));
|
|
2120
|
-
__decorate([
|
|
2121
|
-
classTransformer.Expose({ toClassOnly: true }),
|
|
2122
|
-
classTransformer.Transform(function (_a) {
|
|
2123
|
-
var obj = _a.obj;
|
|
2124
|
-
switch (true) {
|
|
2125
|
-
case String(obj.type).startsWith('1'):
|
|
2126
|
-
return classTransformer.plainToClass(UserEventCategory, { name: 'User\'s events', type: exports.UserEventCategoryEnum.USER });
|
|
2127
|
-
case String(obj.type).startsWith('2'):
|
|
2128
|
-
return classTransformer.plainToClass(UserEventCategory, { name: 'Co-owner\'s events', type: exports.UserEventCategoryEnum.CO_OWNER });
|
|
2129
|
-
case String(obj.type).startsWith('3'):
|
|
2130
|
-
return classTransformer.plainToClass(UserEventCategory, { name: 'Firm\'s events', type: exports.UserEventCategoryEnum.FIRM });
|
|
2131
|
-
default:
|
|
2132
|
-
return classTransformer.plainToClass(UserEventCategory, { name: 'Basiq events', type: exports.UserEventCategoryEnum.BASIQ });
|
|
2133
|
-
}
|
|
2134
|
-
}),
|
|
2135
|
-
classTransformer.Type(function () { return UserEventCategory; })
|
|
2136
|
-
], UserEventType.prototype, "category", void 0);
|
|
2137
|
-
|
|
2138
|
-
var UserEventSetting = /** @class */ (function (_super) {
|
|
2139
|
-
__extends(UserEventSetting, _super);
|
|
2140
|
-
function UserEventSetting() {
|
|
2141
|
-
var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
|
|
2142
|
-
// flag indicates that the setting is updating now saved or not
|
|
2143
|
-
_this.isUpdating = false;
|
|
2144
|
-
return _this;
|
|
2145
|
-
}
|
|
2146
|
-
return UserEventSetting;
|
|
2147
|
-
}(UserEventSetting$1));
|
|
2148
|
-
__decorate([
|
|
2149
|
-
classTransformer.Type(function () { return UserEventType; })
|
|
2150
|
-
], UserEventSetting.prototype, "userEventType", void 0);
|
|
2151
|
-
__decorate([
|
|
2152
|
-
classTransformer.Exclude({ toPlainOnly: true })
|
|
2153
|
-
], UserEventSetting.prototype, "isUpdating", void 0);
|
|
2154
|
-
|
|
2155
2105
|
/**
|
|
2156
2106
|
* Collection of user event settings
|
|
2157
2107
|
*/
|
|
2158
2108
|
var UserEventSettingCollection = /** @class */ (function (_super) {
|
|
2159
2109
|
__extends(UserEventSettingCollection, _super);
|
|
2160
|
-
function UserEventSettingCollection(
|
|
2161
|
-
|
|
2162
|
-
_this.setItems(userEventTypes);
|
|
2163
|
-
return _this;
|
|
2110
|
+
function UserEventSettingCollection() {
|
|
2111
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
2164
2112
|
}
|
|
2165
|
-
|
|
2166
|
-
|
|
2167
|
-
*/
|
|
2168
|
-
UserEventSettingCollection.prototype.isAllSelected = function (field) {
|
|
2169
|
-
return !this.items.find(function (item) { return !item[field]; });
|
|
2170
|
-
};
|
|
2171
|
-
/**
|
|
2172
|
-
* Flag that indicates if all settings are deselected for provided field
|
|
2173
|
-
*/
|
|
2174
|
-
UserEventSettingCollection.prototype.isAllDeselected = function (field) {
|
|
2175
|
-
return !this.items.find(function (item) { return item[field]; });
|
|
2176
|
-
};
|
|
2177
|
-
/**
|
|
2178
|
-
* Check is any setting is updating by 'isUpdating' flag
|
|
2179
|
-
*/
|
|
2180
|
-
UserEventSettingCollection.prototype.isAnyUpdating = function () {
|
|
2181
|
-
return this.items.some(function (item) { return item.isUpdating; });
|
|
2182
|
-
};
|
|
2183
|
-
Object.defineProperty(UserEventSettingCollection.prototype, "commonFrequencyType", {
|
|
2184
|
-
/**
|
|
2185
|
-
* Get frequency type based on each collection item 'frequency' field value
|
|
2186
|
-
*/
|
|
2187
|
-
get: function () {
|
|
2188
|
-
var _this = this;
|
|
2189
|
-
var frequencyDictionary = new CollectionDictionary(this, '', 'frequency');
|
|
2190
|
-
return +Object.keys(frequencyDictionary).find(function (key) { return frequencyDictionary[key].length === _this.length; }) || false;
|
|
2191
|
-
},
|
|
2192
|
-
enumerable: false,
|
|
2193
|
-
configurable: true
|
|
2194
|
-
});
|
|
2195
|
-
/**
|
|
2196
|
-
* Rewrite collection items with provided user event types
|
|
2197
|
-
*/
|
|
2198
|
-
UserEventSettingCollection.prototype.setItems = function (userEventTypes) {
|
|
2199
|
-
var _this = this;
|
|
2200
|
-
if (!userEventTypes) {
|
|
2201
|
-
return;
|
|
2202
|
-
}
|
|
2203
|
-
this.items = userEventTypes.map(function (userEventType) {
|
|
2204
|
-
// find existing setting by user event type id
|
|
2205
|
-
var existingSetting = _this.items.find(function (setting) { return setting.userEventType.id === userEventType.id; });
|
|
2206
|
-
// if setting exist - return new UserEventSetting instance based on existing setting and default user event type
|
|
2207
|
-
if (existingSetting) {
|
|
2208
|
-
return classTransformer.plainToClass(UserEventSetting, Object.assign(existingSetting, { userEventType: userEventType }));
|
|
2209
|
-
}
|
|
2210
|
-
// ...or return new UserEventSetting instance based on default user event type
|
|
2211
|
-
return classTransformer.plainToClass(UserEventSetting, {
|
|
2212
|
-
byEmail: userEventType.byEmail,
|
|
2213
|
-
byNotification: userEventType.byNotification,
|
|
2214
|
-
frequency: userEventType.frequency,
|
|
2215
|
-
userEventType: userEventType
|
|
2216
|
-
});
|
|
2217
|
-
});
|
|
2113
|
+
UserEventSettingCollection.prototype.getConfigurableBy = function (field) {
|
|
2114
|
+
return new UserEventSettingCollection(this.items.filter(function (setting) { return setting[field] !== null; }));
|
|
2218
2115
|
};
|
|
2219
2116
|
return UserEventSettingCollection;
|
|
2220
2117
|
}(AbstractCollection));
|
|
@@ -2818,65 +2715,68 @@
|
|
|
2818
2715
|
UserEventStatusEnum[UserEventStatusEnum["NEED_ACTION"] = 2] = "NEED_ACTION";
|
|
2819
2716
|
UserEventStatusEnum[UserEventStatusEnum["DONE"] = 3] = "DONE";
|
|
2820
2717
|
UserEventStatusEnum[UserEventStatusEnum["REFUSED"] = 4] = "REFUSED";
|
|
2718
|
+
UserEventStatusEnum[UserEventStatusEnum["OUTDATED"] = 5] = "OUTDATED";
|
|
2821
2719
|
})(exports.UserEventStatusEnum || (exports.UserEventStatusEnum = {}));
|
|
2822
2720
|
|
|
2823
2721
|
exports.UserEventTypeFrequencyEnum = void 0;
|
|
2824
2722
|
(function (UserEventTypeFrequencyEnum) {
|
|
2825
|
-
UserEventTypeFrequencyEnum[UserEventTypeFrequencyEnum["
|
|
2826
|
-
UserEventTypeFrequencyEnum[UserEventTypeFrequencyEnum["
|
|
2827
|
-
UserEventTypeFrequencyEnum[UserEventTypeFrequencyEnum["
|
|
2828
|
-
UserEventTypeFrequencyEnum[UserEventTypeFrequencyEnum["MONTHLY"] = 4] = "MONTHLY";
|
|
2723
|
+
UserEventTypeFrequencyEnum[UserEventTypeFrequencyEnum["DAILY"] = 1] = "DAILY";
|
|
2724
|
+
UserEventTypeFrequencyEnum[UserEventTypeFrequencyEnum["WEEKLY"] = 2] = "WEEKLY";
|
|
2725
|
+
UserEventTypeFrequencyEnum[UserEventTypeFrequencyEnum["MONTHLY"] = 3] = "MONTHLY";
|
|
2829
2726
|
})(exports.UserEventTypeFrequencyEnum || (exports.UserEventTypeFrequencyEnum = {}));
|
|
2830
2727
|
|
|
2831
|
-
exports.
|
|
2832
|
-
(function (
|
|
2833
|
-
|
|
2834
|
-
|
|
2835
|
-
|
|
2836
|
-
})(exports.
|
|
2837
|
-
|
|
2838
|
-
exports.
|
|
2839
|
-
(function (
|
|
2840
|
-
|
|
2841
|
-
|
|
2842
|
-
|
|
2843
|
-
|
|
2844
|
-
|
|
2845
|
-
|
|
2846
|
-
|
|
2847
|
-
|
|
2848
|
-
|
|
2849
|
-
|
|
2850
|
-
|
|
2851
|
-
|
|
2852
|
-
|
|
2853
|
-
|
|
2854
|
-
|
|
2855
|
-
|
|
2856
|
-
|
|
2857
|
-
|
|
2858
|
-
|
|
2859
|
-
|
|
2860
|
-
|
|
2861
|
-
|
|
2862
|
-
|
|
2863
|
-
|
|
2864
|
-
|
|
2865
|
-
|
|
2866
|
-
|
|
2867
|
-
|
|
2868
|
-
|
|
2869
|
-
|
|
2870
|
-
|
|
2871
|
-
|
|
2872
|
-
|
|
2873
|
-
|
|
2874
|
-
|
|
2875
|
-
|
|
2876
|
-
|
|
2877
|
-
|
|
2878
|
-
|
|
2879
|
-
|
|
2728
|
+
exports.UserEventTypeUserTypeEnum = void 0;
|
|
2729
|
+
(function (UserEventTypeUserTypeEnum) {
|
|
2730
|
+
UserEventTypeUserTypeEnum[UserEventTypeUserTypeEnum["REGISTERED"] = 1000] = "REGISTERED";
|
|
2731
|
+
UserEventTypeUserTypeEnum[UserEventTypeUserTypeEnum["PASSWORD_RESET"] = 1001] = "PASSWORD_RESET";
|
|
2732
|
+
UserEventTypeUserTypeEnum[UserEventTypeUserTypeEnum["APP_FEATURES"] = 1010] = "APP_FEATURES";
|
|
2733
|
+
})(exports.UserEventTypeUserTypeEnum || (exports.UserEventTypeUserTypeEnum = {}));
|
|
2734
|
+
|
|
2735
|
+
exports.UserEventTypeEmployeeTypeEnum = void 0;
|
|
2736
|
+
(function (UserEventTypeEmployeeTypeEnum) {
|
|
2737
|
+
UserEventTypeEmployeeTypeEnum[UserEventTypeEmployeeTypeEnum["FIRM_INVITE_TO_REGISTER"] = 3000] = "FIRM_INVITE_TO_REGISTER";
|
|
2738
|
+
UserEventTypeEmployeeTypeEnum[UserEventTypeEmployeeTypeEnum["FIRM_INVITE"] = 3001] = "FIRM_INVITE";
|
|
2739
|
+
UserEventTypeEmployeeTypeEnum[UserEventTypeEmployeeTypeEnum["CLIENT_INVITE_ACCEPTED"] = 3002] = "CLIENT_INVITE_ACCEPTED";
|
|
2740
|
+
UserEventTypeEmployeeTypeEnum[UserEventTypeEmployeeTypeEnum["CLIENT_INVITE_REJECTED"] = 3003] = "CLIENT_INVITE_REJECTED";
|
|
2741
|
+
UserEventTypeEmployeeTypeEnum[UserEventTypeEmployeeTypeEnum["CLIENT_INVITE_REGISTERED"] = 3004] = "CLIENT_INVITE_REGISTERED";
|
|
2742
|
+
UserEventTypeEmployeeTypeEnum[UserEventTypeEmployeeTypeEnum["FIRM_NEW_CLIENT"] = 3005] = "FIRM_NEW_CLIENT";
|
|
2743
|
+
UserEventTypeEmployeeTypeEnum[UserEventTypeEmployeeTypeEnum["FIRM_LOST_CLIENT"] = 3006] = "FIRM_LOST_CLIENT";
|
|
2744
|
+
UserEventTypeEmployeeTypeEnum[UserEventTypeEmployeeTypeEnum["EMPLOYEE_INVITE"] = 3010] = "EMPLOYEE_INVITE";
|
|
2745
|
+
UserEventTypeEmployeeTypeEnum[UserEventTypeEmployeeTypeEnum["EMPLOYEE_LOST_CLIENT"] = 3011] = "EMPLOYEE_LOST_CLIENT";
|
|
2746
|
+
UserEventTypeEmployeeTypeEnum[UserEventTypeEmployeeTypeEnum["EMPLOYEE_NEW_CLIENT"] = 3012] = "EMPLOYEE_NEW_CLIENT";
|
|
2747
|
+
UserEventTypeEmployeeTypeEnum[UserEventTypeEmployeeTypeEnum["EMPLOYEE_INVITE_ACCEPTED"] = 3013] = "EMPLOYEE_INVITE_ACCEPTED";
|
|
2748
|
+
UserEventTypeEmployeeTypeEnum[UserEventTypeEmployeeTypeEnum["EMAIL_CONFIRMED"] = 3020] = "EMAIL_CONFIRMED";
|
|
2749
|
+
UserEventTypeEmployeeTypeEnum[UserEventTypeEmployeeTypeEnum["TAX_REVIEW_REQUESTED"] = 3030] = "TAX_REVIEW_REQUESTED";
|
|
2750
|
+
})(exports.UserEventTypeEmployeeTypeEnum || (exports.UserEventTypeEmployeeTypeEnum = {}));
|
|
2751
|
+
|
|
2752
|
+
exports.UserEventTypeClientTypeEnum = void 0;
|
|
2753
|
+
(function (UserEventTypeClientTypeEnum) {
|
|
2754
|
+
UserEventTypeClientTypeEnum[UserEventTypeClientTypeEnum["SUBSCRIBED"] = 2000] = "SUBSCRIBED";
|
|
2755
|
+
UserEventTypeClientTypeEnum[UserEventTypeClientTypeEnum["UNSUBSCRIBED"] = 2001] = "UNSUBSCRIBED";
|
|
2756
|
+
UserEventTypeClientTypeEnum[UserEventTypeClientTypeEnum["SUBSCRIPTION_UPDATE"] = 2004] = "SUBSCRIPTION_UPDATE";
|
|
2757
|
+
UserEventTypeClientTypeEnum[UserEventTypeClientTypeEnum["SUBSCRIPTION_TRIAL_UPDATE"] = 2005] = "SUBSCRIPTION_TRIAL_UPDATE";
|
|
2758
|
+
UserEventTypeClientTypeEnum[UserEventTypeClientTypeEnum["CLIENT_INVITE"] = 2010] = "CLIENT_INVITE";
|
|
2759
|
+
UserEventTypeClientTypeEnum[UserEventTypeClientTypeEnum["CLIENT_INVITE_TO_REGISTER"] = 2011] = "CLIENT_INVITE_TO_REGISTER";
|
|
2760
|
+
UserEventTypeClientTypeEnum[UserEventTypeClientTypeEnum["FIRM_INVITE_ACCEPTED"] = 2012] = "FIRM_INVITE_ACCEPTED";
|
|
2761
|
+
UserEventTypeClientTypeEnum[UserEventTypeClientTypeEnum["FIRM_INVITE_REJECTED"] = 2013] = "FIRM_INVITE_REJECTED";
|
|
2762
|
+
UserEventTypeClientTypeEnum[UserEventTypeClientTypeEnum["FIRM_INVITE_REGISTERED"] = 2014] = "FIRM_INVITE_REGISTERED";
|
|
2763
|
+
UserEventTypeClientTypeEnum[UserEventTypeClientTypeEnum["CO_OWNER_INVITE"] = 2020] = "CO_OWNER_INVITE";
|
|
2764
|
+
UserEventTypeClientTypeEnum[UserEventTypeClientTypeEnum["CO_OWNER_INVITE_TO_REGISTER"] = 2021] = "CO_OWNER_INVITE_TO_REGISTER";
|
|
2765
|
+
UserEventTypeClientTypeEnum[UserEventTypeClientTypeEnum["CO_OWNER_INVITE_ACCEPTED"] = 2022] = "CO_OWNER_INVITE_ACCEPTED";
|
|
2766
|
+
UserEventTypeClientTypeEnum[UserEventTypeClientTypeEnum["CO_OWNER_INVITE_REJECTED"] = 2023] = "CO_OWNER_INVITE_REJECTED";
|
|
2767
|
+
UserEventTypeClientTypeEnum[UserEventTypeClientTypeEnum["CO_OWNER_INVITE_REGISTERED"] = 2024] = "CO_OWNER_INVITE_REGISTERED";
|
|
2768
|
+
UserEventTypeClientTypeEnum[UserEventTypeClientTypeEnum["CO_OWNER_CHANGE_REQUESTED"] = 2025] = "CO_OWNER_CHANGE_REQUESTED";
|
|
2769
|
+
UserEventTypeClientTypeEnum[UserEventTypeClientTypeEnum["CO_OWNER_CHANGE_ACCEPTED"] = 2026] = "CO_OWNER_CHANGE_ACCEPTED";
|
|
2770
|
+
UserEventTypeClientTypeEnum[UserEventTypeClientTypeEnum["CO_OWNER_CHANGE_REJECTED"] = 2027] = "CO_OWNER_CHANGE_REJECTED";
|
|
2771
|
+
UserEventTypeClientTypeEnum[UserEventTypeClientTypeEnum["BASIQ_NEW_ACCOUNTS"] = 2030] = "BASIQ_NEW_ACCOUNTS";
|
|
2772
|
+
UserEventTypeClientTypeEnum[UserEventTypeClientTypeEnum["BASIQ_FIRST_IMPORT_COMPLETE"] = 2031] = "BASIQ_FIRST_IMPORT_COMPLETE";
|
|
2773
|
+
UserEventTypeClientTypeEnum[UserEventTypeClientTypeEnum["BASIQ_AUTHORIZATION_FAIL"] = 2032] = "BASIQ_AUTHORIZATION_FAIL";
|
|
2774
|
+
UserEventTypeClientTypeEnum[UserEventTypeClientTypeEnum["TRANSACTION_ALLOCATE_REMINDER"] = 2033] = "TRANSACTION_ALLOCATE_REMINDER";
|
|
2775
|
+
UserEventTypeClientTypeEnum[UserEventTypeClientTypeEnum["REGISTRATION_INVITE"] = 2040] = "REGISTRATION_INVITE";
|
|
2776
|
+
UserEventTypeClientTypeEnum[UserEventTypeClientTypeEnum["REGISTRATION_INVITE_ACCEPTED"] = 2041] = "REGISTRATION_INVITE_ACCEPTED";
|
|
2777
|
+
UserEventTypeClientTypeEnum[UserEventTypeClientTypeEnum["EMAIL_CONFIRMED"] = 2050] = "EMAIL_CONFIRMED";
|
|
2778
|
+
UserEventTypeClientTypeEnum[UserEventTypeClientTypeEnum["TAX_REVIEW_REQUESTED"] = 2060] = "TAX_REVIEW_REQUESTED";
|
|
2779
|
+
})(exports.UserEventTypeClientTypeEnum || (exports.UserEventTypeClientTypeEnum = {}));
|
|
2880
2780
|
|
|
2881
2781
|
exports.UserMedicareExemptionEnum = void 0;
|
|
2882
2782
|
(function (UserMedicareExemptionEnum) {
|
|
@@ -5742,6 +5642,62 @@
|
|
|
5742
5642
|
return ClientPortfolioReport;
|
|
5743
5643
|
}());
|
|
5744
5644
|
|
|
5645
|
+
/**
|
|
5646
|
+
* Class to generate data-table structure based on provided collection.
|
|
5647
|
+
* Use to work with HTML/PDF/XLSX tables
|
|
5648
|
+
*/
|
|
5649
|
+
var DataTable = /** @class */ (function () {
|
|
5650
|
+
function DataTable(collection, columns, caption, footerCaption) {
|
|
5651
|
+
this.caption = caption;
|
|
5652
|
+
this.columns = columns;
|
|
5653
|
+
this.setRows(collection);
|
|
5654
|
+
if (footerCaption) {
|
|
5655
|
+
this.setFooterRow(collection, footerCaption);
|
|
5656
|
+
}
|
|
5657
|
+
}
|
|
5658
|
+
DataTable.prototype.setRows = function (collection) {
|
|
5659
|
+
var _this = this;
|
|
5660
|
+
this.rows = collection.items.map(function (item) {
|
|
5661
|
+
// parse table columns to return items based on column properties
|
|
5662
|
+
return _this.columns.map(function (column) {
|
|
5663
|
+
// if the pipe is provided - transform the return value
|
|
5664
|
+
if (column.pipe) {
|
|
5665
|
+
return column.pipe.transform(item[column.key]);
|
|
5666
|
+
}
|
|
5667
|
+
return (item[column.key] ? item[column.key] : '-').toString();
|
|
5668
|
+
});
|
|
5669
|
+
});
|
|
5670
|
+
};
|
|
5671
|
+
DataTable.prototype.setFooterRow = function (collection, footerCaption) {
|
|
5672
|
+
this.footerRow = this.columns.map(function (column, index) {
|
|
5673
|
+
if (index === 0) {
|
|
5674
|
+
return footerCaption.toString();
|
|
5675
|
+
}
|
|
5676
|
+
if (!column.total) {
|
|
5677
|
+
return '';
|
|
5678
|
+
}
|
|
5679
|
+
return collection.items
|
|
5680
|
+
.reduce(function (sum, item) { return sum + Number(item[column.key]); }, 0)
|
|
5681
|
+
.toString();
|
|
5682
|
+
});
|
|
5683
|
+
};
|
|
5684
|
+
return DataTable;
|
|
5685
|
+
}());
|
|
5686
|
+
|
|
5687
|
+
var DataTableColumn = /** @class */ (function () {
|
|
5688
|
+
function DataTableColumn(name, key, total, pipe) {
|
|
5689
|
+
/**
|
|
5690
|
+
* Flag that shows should the column be in the total calculation or not
|
|
5691
|
+
*/
|
|
5692
|
+
this.total = false;
|
|
5693
|
+
this.name = name;
|
|
5694
|
+
this.key = key;
|
|
5695
|
+
this.total = total;
|
|
5696
|
+
this.pipe = pipe;
|
|
5697
|
+
}
|
|
5698
|
+
return DataTableColumn;
|
|
5699
|
+
}());
|
|
5700
|
+
|
|
5745
5701
|
exports.DepreciationGroupEnum = void 0;
|
|
5746
5702
|
(function (DepreciationGroupEnum) {
|
|
5747
5703
|
DepreciationGroupEnum[DepreciationGroupEnum["BUILDING_IMPROVEMENTS"] = 0] = "BUILDING_IMPROVEMENTS";
|
|
@@ -6380,48 +6336,6 @@
|
|
|
6380
6336
|
return ServiceNotification;
|
|
6381
6337
|
}());
|
|
6382
6338
|
|
|
6383
|
-
/**
|
|
6384
|
-
* Notification events grouped by types
|
|
6385
|
-
*/
|
|
6386
|
-
var NOTIFICATION_EVENT_TYPES = {
|
|
6387
|
-
// events from employees to clients
|
|
6388
|
-
employeeInvite: [
|
|
6389
|
-
exports.UserEventTypeTypeEnum.EMPLOYEE_INVITE_TO_REGISTER_ACCEPTED,
|
|
6390
|
-
exports.UserEventTypeTypeEnum.EMPLOYEE_INVITE_TO_JOIN_ACCEPTED,
|
|
6391
|
-
exports.UserEventTypeTypeEnum.EMPLOYEE_INVITE_TO_JOIN_REJECTED,
|
|
6392
|
-
exports.UserEventTypeTypeEnum.EMPLOYEE_INVITE_TO_REGISTER,
|
|
6393
|
-
exports.UserEventTypeTypeEnum.CLIENT_INVITE_TO_JOIN,
|
|
6394
|
-
],
|
|
6395
|
-
// events from clients to employee
|
|
6396
|
-
employeeInviteFromClient: [
|
|
6397
|
-
exports.UserEventTypeTypeEnum.EMPLOYEE_INVITE_TO_JOIN,
|
|
6398
|
-
],
|
|
6399
|
-
bankConnection: [
|
|
6400
|
-
exports.UserEventTypeTypeEnum.BASIQ_NEW_ACCOUNTS,
|
|
6401
|
-
exports.UserEventTypeTypeEnum.BASIQ_FIRST_IMPORT_COMPLETE,
|
|
6402
|
-
exports.UserEventTypeTypeEnum.BASIQ_AUTHORIZATION_FAIL
|
|
6403
|
-
],
|
|
6404
|
-
clientInvite: [
|
|
6405
|
-
exports.UserEventTypeTypeEnum.CLIENT_INVITE_TO_JOIN_ACCEPTED,
|
|
6406
|
-
exports.UserEventTypeTypeEnum.CLIENT_INVITE_TO_JOIN_REJECTED,
|
|
6407
|
-
exports.UserEventTypeTypeEnum.CLIENT_INVITE_TO_REGISTER
|
|
6408
|
-
],
|
|
6409
|
-
clientMovement: [
|
|
6410
|
-
exports.UserEventTypeTypeEnum.CLIENT_LEFT_FIRM,
|
|
6411
|
-
exports.UserEventTypeTypeEnum.EMPLOYEE_LOST_CLIENT,
|
|
6412
|
-
exports.UserEventTypeTypeEnum.EMPLOYEE_RECEIVED_CLIENT
|
|
6413
|
-
],
|
|
6414
|
-
propertyOwner: [
|
|
6415
|
-
exports.UserEventTypeTypeEnum.CO_OWNER_INVITE_SEND,
|
|
6416
|
-
exports.UserEventTypeTypeEnum.CO_OWNER_INVITE_ACCEPT,
|
|
6417
|
-
exports.UserEventTypeTypeEnum.CO_OWNER_INVITE_REJECT,
|
|
6418
|
-
exports.UserEventTypeTypeEnum.CO_OWNER_REGISTER,
|
|
6419
|
-
exports.UserEventTypeTypeEnum.CO_OWNER_CHANGES_OFFER,
|
|
6420
|
-
exports.UserEventTypeTypeEnum.CO_OWNER_CHANGES_ACCEPT,
|
|
6421
|
-
exports.UserEventTypeTypeEnum.CO_OWNER_CHANGES_REJECT
|
|
6422
|
-
]
|
|
6423
|
-
};
|
|
6424
|
-
|
|
6425
6339
|
var Notification = /** @class */ (function (_super) {
|
|
6426
6340
|
__extends(Notification, _super);
|
|
6427
6341
|
function Notification() {
|
|
@@ -6429,35 +6343,11 @@
|
|
|
6429
6343
|
}
|
|
6430
6344
|
Object.defineProperty(Notification.prototype, "eventType", {
|
|
6431
6345
|
get: function () {
|
|
6432
|
-
return this.userEvent.
|
|
6346
|
+
return this.userEvent.type.type;
|
|
6433
6347
|
},
|
|
6434
6348
|
enumerable: false,
|
|
6435
6349
|
configurable: true
|
|
6436
6350
|
});
|
|
6437
|
-
/**
|
|
6438
|
-
* Set redirection link based on current event type
|
|
6439
|
-
*/
|
|
6440
|
-
Notification.prototype.setRedirectionLink = function () {
|
|
6441
|
-
switch (true) {
|
|
6442
|
-
case NOTIFICATION_EVENT_TYPES.employeeInvite.includes(this.eventType):
|
|
6443
|
-
this.redirectionLink = '/client/users/firms';
|
|
6444
|
-
break;
|
|
6445
|
-
case NOTIFICATION_EVENT_TYPES.bankConnection.includes(this.eventType):
|
|
6446
|
-
this.redirectionLink = '/client/bank-feeds';
|
|
6447
|
-
break;
|
|
6448
|
-
case NOTIFICATION_EVENT_TYPES.clientInvite.includes(this.eventType):
|
|
6449
|
-
this.redirectionLink = '/client/users/invitations';
|
|
6450
|
-
break;
|
|
6451
|
-
case NOTIFICATION_EVENT_TYPES.propertyOwner.includes(this.eventType):
|
|
6452
|
-
this.redirectionLink = '/client/users/co-owners';
|
|
6453
|
-
break;
|
|
6454
|
-
case NOTIFICATION_EVENT_TYPES.employeeInviteFromClient.includes(this.eventType):
|
|
6455
|
-
this.redirectionLink = '/firm/clients/invites';
|
|
6456
|
-
break;
|
|
6457
|
-
default:
|
|
6458
|
-
this.redirectionLink = '';
|
|
6459
|
-
}
|
|
6460
|
-
};
|
|
6461
6351
|
/**
|
|
6462
6352
|
* Check if notification is from user or not
|
|
6463
6353
|
*/
|
|
@@ -6474,16 +6364,17 @@
|
|
|
6474
6364
|
classTransformer.Transform(function (_a) {
|
|
6475
6365
|
var obj = _a.obj;
|
|
6476
6366
|
switch (true) {
|
|
6477
|
-
|
|
6478
|
-
|
|
6479
|
-
|
|
6480
|
-
|
|
6481
|
-
|
|
6482
|
-
|
|
6483
|
-
|
|
6484
|
-
|
|
6485
|
-
|
|
6486
|
-
|
|
6367
|
+
// @TODO vik
|
|
6368
|
+
// case NOTIFICATION_EVENT_TYPES.employeeInvite.includes(obj.eventType):
|
|
6369
|
+
// return '/client/users/firms';
|
|
6370
|
+
// case NOTIFICATION_EVENT_TYPES.bankConnection.includes(obj.eventType):
|
|
6371
|
+
// return '/client/bank-feeds';
|
|
6372
|
+
// case NOTIFICATION_EVENT_TYPES.clientInvite.includes(obj.eventType):
|
|
6373
|
+
// return '/client/users/invitations';
|
|
6374
|
+
// case NOTIFICATION_EVENT_TYPES.propertyOwner.includes(obj.eventType):
|
|
6375
|
+
// return '/client/users/co-owners';
|
|
6376
|
+
// case NOTIFICATION_EVENT_TYPES.employeeInviteFromClient.includes(obj.eventType):
|
|
6377
|
+
// return '/firm/clients/invites';
|
|
6487
6378
|
default:
|
|
6488
6379
|
return '';
|
|
6489
6380
|
}
|
|
@@ -7231,6 +7122,68 @@
|
|
|
7231
7122
|
return UserToRegister;
|
|
7232
7123
|
}());
|
|
7233
7124
|
|
|
7125
|
+
var UserEventTypeCategory$1 = /** @class */ (function () {
|
|
7126
|
+
function UserEventTypeCategory() {
|
|
7127
|
+
}
|
|
7128
|
+
return UserEventTypeCategory;
|
|
7129
|
+
}());
|
|
7130
|
+
|
|
7131
|
+
var UserEventTypeCategory = /** @class */ (function (_super) {
|
|
7132
|
+
__extends(UserEventTypeCategory, _super);
|
|
7133
|
+
function UserEventTypeCategory() {
|
|
7134
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
7135
|
+
}
|
|
7136
|
+
return UserEventTypeCategory;
|
|
7137
|
+
}(UserEventTypeCategory$1));
|
|
7138
|
+
|
|
7139
|
+
var UserEventSetting$1 = /** @class */ (function () {
|
|
7140
|
+
function UserEventSetting() {
|
|
7141
|
+
}
|
|
7142
|
+
return UserEventSetting;
|
|
7143
|
+
}());
|
|
7144
|
+
|
|
7145
|
+
var UserEventType$1 = /** @class */ (function () {
|
|
7146
|
+
function UserEventType() {
|
|
7147
|
+
}
|
|
7148
|
+
return UserEventType;
|
|
7149
|
+
}());
|
|
7150
|
+
|
|
7151
|
+
var UserEventType = /** @class */ (function (_super) {
|
|
7152
|
+
__extends(UserEventType, _super);
|
|
7153
|
+
function UserEventType() {
|
|
7154
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
7155
|
+
}
|
|
7156
|
+
UserEventType.prototype.toSetting = function () {
|
|
7157
|
+
return classTransformer.plainToClass(UserEventSetting, {
|
|
7158
|
+
byEmail: this.byEmail,
|
|
7159
|
+
byNotification: this.byNotification,
|
|
7160
|
+
frequency: this.frequency,
|
|
7161
|
+
type: this
|
|
7162
|
+
});
|
|
7163
|
+
};
|
|
7164
|
+
return UserEventType;
|
|
7165
|
+
}(UserEventType$1));
|
|
7166
|
+
__decorate([
|
|
7167
|
+
classTransformer.Type(function () { return UserEventTypeCategory; })
|
|
7168
|
+
], UserEventType.prototype, "category", void 0);
|
|
7169
|
+
|
|
7170
|
+
var UserEventSetting = /** @class */ (function (_super) {
|
|
7171
|
+
__extends(UserEventSetting, _super);
|
|
7172
|
+
function UserEventSetting() {
|
|
7173
|
+
var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
|
|
7174
|
+
// flag indicates that the setting is updating now saved or not
|
|
7175
|
+
_this.isUpdating = false;
|
|
7176
|
+
return _this;
|
|
7177
|
+
}
|
|
7178
|
+
return UserEventSetting;
|
|
7179
|
+
}(UserEventSetting$1));
|
|
7180
|
+
__decorate([
|
|
7181
|
+
classTransformer.Type(function () { return UserEventType; })
|
|
7182
|
+
], UserEventSetting.prototype, "type", void 0);
|
|
7183
|
+
__decorate([
|
|
7184
|
+
classTransformer.Exclude({ toPlainOnly: true })
|
|
7185
|
+
], UserEventSetting.prototype, "isUpdating", void 0);
|
|
7186
|
+
|
|
7234
7187
|
/**
|
|
7235
7188
|
* Enum with user event setting fields
|
|
7236
7189
|
*/
|
|
@@ -8052,7 +8005,7 @@
|
|
|
8052
8005
|
BankTransactionService.prototype.listenBankTransactionsImport = function () {
|
|
8053
8006
|
var _this = this;
|
|
8054
8007
|
this.eventDispatcherService.on(exports.AppEventTypeEnum.NOTIFICATION_ADDED).subscribe(function (notification) {
|
|
8055
|
-
if (!notification.isRead && notification.eventType === exports.
|
|
8008
|
+
if (!notification.isRead && notification.eventType === exports.UserEventTypeClientTypeEnum.BASIQ_FIRST_IMPORT_COMPLETE) {
|
|
8056
8009
|
_this.resetCache();
|
|
8057
8010
|
}
|
|
8058
8011
|
});
|
|
@@ -8142,7 +8095,7 @@
|
|
|
8142
8095
|
BasiqService.prototype.listenNotifications = function () {
|
|
8143
8096
|
var _this = this;
|
|
8144
8097
|
this.eventDispatcherService.on(exports.AppEventTypeEnum.NOTIFICATION_ADDED).subscribe(function (notification) {
|
|
8145
|
-
if (!notification.isRead && notification.eventType === exports.
|
|
8098
|
+
if (!notification.isRead && notification.eventType === exports.UserEventTypeClientTypeEnum.BASIQ_NEW_ACCOUNTS) {
|
|
8146
8099
|
_this.resetCache();
|
|
8147
8100
|
_this.get().subscribe();
|
|
8148
8101
|
}
|
|
@@ -9870,6 +9823,83 @@
|
|
|
9870
9823
|
}] }, { type: SseService }];
|
|
9871
9824
|
} });
|
|
9872
9825
|
|
|
9826
|
+
/**
|
|
9827
|
+
* Configuration file with the settings to generate PDF file
|
|
9828
|
+
*/
|
|
9829
|
+
var PDF_CONFIG = {
|
|
9830
|
+
text: {
|
|
9831
|
+
fontSize: 18,
|
|
9832
|
+
fontName: 'helvetica',
|
|
9833
|
+
fontStyle: '',
|
|
9834
|
+
fontWeight: 'bold',
|
|
9835
|
+
positionX: 14,
|
|
9836
|
+
positionY: 10,
|
|
9837
|
+
fillColor: 255,
|
|
9838
|
+
textColor: 0
|
|
9839
|
+
},
|
|
9840
|
+
// coords for file section title (group, table, e.t.c.)
|
|
9841
|
+
contentTitleCoords: {
|
|
9842
|
+
marginTop: 20
|
|
9843
|
+
},
|
|
9844
|
+
contentCoords: {
|
|
9845
|
+
marginTop: 15,
|
|
9846
|
+
marginLeft: 14
|
|
9847
|
+
}
|
|
9848
|
+
};
|
|
9849
|
+
|
|
9850
|
+
/**
|
|
9851
|
+
* Service to work with PDF (generate, download, e.t.c.)
|
|
9852
|
+
*/
|
|
9853
|
+
var PdfService = /** @class */ (function () {
|
|
9854
|
+
function PdfService() {
|
|
9855
|
+
}
|
|
9856
|
+
// @Todo remove 'any' type
|
|
9857
|
+
/**
|
|
9858
|
+
* Download generated PDF file
|
|
9859
|
+
*/
|
|
9860
|
+
PdfService.prototype.download = function (tables, title, fileName) {
|
|
9861
|
+
var document = this.generatePdfFile(tables, title);
|
|
9862
|
+
document.save(fileName + ".pdf");
|
|
9863
|
+
};
|
|
9864
|
+
/**
|
|
9865
|
+
* Generate PDF file from provided data
|
|
9866
|
+
*/
|
|
9867
|
+
PdfService.prototype.generatePdfFile = function (tables, title) {
|
|
9868
|
+
var pdf = new jsPDF__default["default"]();
|
|
9869
|
+
// set document title
|
|
9870
|
+
pdf.setFontSize(PDF_CONFIG.text.fontSize);
|
|
9871
|
+
pdf.setFont(PDF_CONFIG.text.fontName, PDF_CONFIG.text.fontStyle, PDF_CONFIG.text.fontWeight);
|
|
9872
|
+
pdf.text(title, PDF_CONFIG.text.positionX, PDF_CONFIG.text.positionY);
|
|
9873
|
+
tables.forEach(function (table) {
|
|
9874
|
+
// coords of last table
|
|
9875
|
+
var lastTableCoords = pdf['lastAutoTable'].finalY || PDF_CONFIG.contentCoords.marginTop;
|
|
9876
|
+
pdf.text(table.caption, PDF_CONFIG.contentCoords.marginLeft, lastTableCoords + PDF_CONFIG.contentCoords.marginTop);
|
|
9877
|
+
// table options
|
|
9878
|
+
var options = {
|
|
9879
|
+
startY: lastTableCoords + PDF_CONFIG.contentTitleCoords.marginTop,
|
|
9880
|
+
head: [table['columns'].map(function (column) { return column.name; })],
|
|
9881
|
+
body: table['rows'],
|
|
9882
|
+
foot: [table['footerRow']],
|
|
9883
|
+
footStyles: {
|
|
9884
|
+
fillColor: PDF_CONFIG.text.fillColor,
|
|
9885
|
+
textColor: PDF_CONFIG.text.textColor
|
|
9886
|
+
}
|
|
9887
|
+
};
|
|
9888
|
+
autoTable__default["default"](pdf, options);
|
|
9889
|
+
});
|
|
9890
|
+
return pdf;
|
|
9891
|
+
};
|
|
9892
|
+
return PdfService;
|
|
9893
|
+
}());
|
|
9894
|
+
PdfService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: PdfService, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
9895
|
+
PdfService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: PdfService, providedIn: 'root' });
|
|
9896
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: PdfService, decorators: [{
|
|
9897
|
+
type: i0.Injectable,
|
|
9898
|
+
args: [{
|
|
9899
|
+
providedIn: 'root'
|
|
9900
|
+
}]
|
|
9901
|
+
}] });
|
|
9902
|
+
|
|
9873
9903
|
var PreloaderService = /** @class */ (function () {
|
|
9874
9904
|
function PreloaderService() {
|
|
9875
9905
|
this.activePreloaders = new rxjs.BehaviorSubject([]);
|
|
@@ -11740,6 +11770,59 @@
|
|
|
11740
11770
|
}] }];
|
|
11741
11771
|
} });
|
|
11742
11772
|
|
|
11773
|
+
/**
|
|
11774
|
+
* Service to work with XLSX (generate, download, e.t.c.)
|
|
11775
|
+
*/
|
|
11776
|
+
var XlsxService = /** @class */ (function () {
|
|
11777
|
+
function XlsxService() {
|
|
11778
|
+
}
|
|
11779
|
+
// @Todo remove 'any' type
|
|
11780
|
+
/**s
|
|
11781
|
+
* Download generated Excel file
|
|
11782
|
+
*/
|
|
11783
|
+
XlsxService.prototype.download = function (tables, title, fileName) {
|
|
11784
|
+
var excelFile = this.generateFile(tables, title);
|
|
11785
|
+
var data = new Blob([excelFile], {
|
|
11786
|
+
type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=UTF-8'
|
|
11787
|
+
});
|
|
11788
|
+
FileSaver__namespace.saveAs(data, fileName + ".xlsx");
|
|
11789
|
+
};
|
|
11790
|
+
XlsxService.prototype.generateFile = function (tables, title) {
|
|
11791
|
+
// create new workbook
|
|
11792
|
+
var workbook = xlsx__namespace.utils.book_new();
|
|
11793
|
+
// create empty worksheet
|
|
11794
|
+
var worksheet = {
|
|
11795
|
+
SheetNames: [],
|
|
11796
|
+
Sheets: {}
|
|
11797
|
+
};
|
|
11798
|
+
var sheetData = tables.map(function (table) {
|
|
11799
|
+
// add caption, columns, rows and footer rows
|
|
11800
|
+
return __spreadArray(__spreadArray([
|
|
11801
|
+
[table.caption],
|
|
11802
|
+
table.columns.map(function (column) { return column.name; })
|
|
11803
|
+
], __read(table.rows)), [
|
|
11804
|
+
table.footerRow,
|
|
11805
|
+
]);
|
|
11806
|
+
});
|
|
11807
|
+
sheetData.forEach(function (data) {
|
|
11808
|
+
xlsx__namespace.utils.sheet_add_json(worksheet, data, { origin: -1, skipHeader: true });
|
|
11809
|
+
// set empty row after each table
|
|
11810
|
+
xlsx__namespace.utils.sheet_add_json(worksheet, [], { origin: -1 });
|
|
11811
|
+
});
|
|
11812
|
+
xlsx__namespace.utils.book_append_sheet(workbook, worksheet);
|
|
11813
|
+
return xlsx__namespace.write(workbook, { bookType: 'xlsx', type: 'array' });
|
|
11814
|
+
};
|
|
11815
|
+
return XlsxService;
|
|
11816
|
+
}());
|
|
11817
|
+
XlsxService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: XlsxService, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
11818
|
+
XlsxService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: XlsxService, providedIn: 'root' });
|
|
11819
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: XlsxService, decorators: [{
|
|
11820
|
+
type: i0.Injectable,
|
|
11821
|
+
args: [{
|
|
11822
|
+
providedIn: 'root'
|
|
11823
|
+
}]
|
|
11824
|
+
}] });
|
|
11825
|
+
|
|
11743
11826
|
// deep clone for entity
|
|
11744
11827
|
function cloneDeep(array) {
|
|
11745
11828
|
return JSON.parse(JSON.stringify(array));
|
|
@@ -11879,6 +11962,8 @@
|
|
|
11879
11962
|
exports.DEFAULT_VEHICLE_EXPENSE = DEFAULT_VEHICLE_EXPENSE;
|
|
11880
11963
|
exports.DEPRECIATION_GROUPS = DEPRECIATION_GROUPS;
|
|
11881
11964
|
exports.DOCUMENT_FILE_TYPES = DOCUMENT_FILE_TYPES;
|
|
11965
|
+
exports.DataTable = DataTable;
|
|
11966
|
+
exports.DataTableColumn = DataTableColumn;
|
|
11882
11967
|
exports.Depreciation = Depreciation;
|
|
11883
11968
|
exports.DepreciationCapitalProject = DepreciationCapitalProject;
|
|
11884
11969
|
exports.DepreciationCollection = DepreciationCollection;
|
|
@@ -11929,11 +12014,11 @@
|
|
|
11929
12014
|
exports.MessageDocumentService = MessageDocumentService;
|
|
11930
12015
|
exports.MessageService = MessageService;
|
|
11931
12016
|
exports.MyAccountHistory = MyAccountHistory;
|
|
11932
|
-
exports.NOTIFICATION_EVENT_TYPES = NOTIFICATION_EVENT_TYPES;
|
|
11933
12017
|
exports.Notification = Notification;
|
|
11934
12018
|
exports.NotificationService = NotificationService;
|
|
11935
12019
|
exports.Occupation = Occupation;
|
|
11936
12020
|
exports.OccupationService = OccupationService;
|
|
12021
|
+
exports.PdfService = PdfService;
|
|
11937
12022
|
exports.Phone = Phone;
|
|
11938
12023
|
exports.PreloaderService = PreloaderService;
|
|
11939
12024
|
exports.Property = Property;
|
|
@@ -11995,11 +12080,11 @@
|
|
|
11995
12080
|
exports.USER_ROLES = USER_ROLES;
|
|
11996
12081
|
exports.USER_WORK_POSITION = USER_WORK_POSITION;
|
|
11997
12082
|
exports.User = User;
|
|
11998
|
-
exports.UserEventCategory = UserEventCategory;
|
|
11999
12083
|
exports.UserEventSetting = UserEventSetting;
|
|
12000
12084
|
exports.UserEventSettingCollection = UserEventSettingCollection;
|
|
12001
12085
|
exports.UserEventSettingService = UserEventSettingService;
|
|
12002
12086
|
exports.UserEventType = UserEventType;
|
|
12087
|
+
exports.UserEventTypeCategory = UserEventTypeCategory;
|
|
12003
12088
|
exports.UserEventTypeService = UserEventTypeService;
|
|
12004
12089
|
exports.UserService = UserService;
|
|
12005
12090
|
exports.UserSwitcherService = UserSwitcherService;
|
|
@@ -12009,6 +12094,7 @@
|
|
|
12009
12094
|
exports.VehicleLogbook = VehicleLogbook;
|
|
12010
12095
|
exports.WORK_TANK_LOGBOOK_PURPOSE_OPTIONS = WORK_TANK_LOGBOOK_PURPOSE_OPTIONS;
|
|
12011
12096
|
exports.WorkTankService = WorkTankService;
|
|
12097
|
+
exports.XlsxService = XlsxService;
|
|
12012
12098
|
exports.cloneDeep = cloneDeep;
|
|
12013
12099
|
exports.compare = compare;
|
|
12014
12100
|
exports.compareMatOptions = compareMatOptions;
|