ngx-techlify-core 11.3.6 → 11.4.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/ngx-techlify-core.umd.js +268 -96
- package/bundles/ngx-techlify-core.umd.js.map +1 -1
- package/bundles/ngx-techlify-core.umd.min.js +2 -2
- package/bundles/ngx-techlify-core.umd.min.js.map +1 -1
- package/esm2015/lib/audit-log/audit-log-view/audit-log-view.component.js +7 -9
- package/esm2015/lib/audit-log/audit-log-view-model/audit-log-view-model.component.js +7 -9
- package/esm2015/lib/email-subscription/email-subscription-type/email-subscription-type-list/email-subscription-type-list.component.js +2 -2
- package/esm2015/lib/email-subscription/email-subscription-user/email-subscription-user-list-filter/email-subscription-user-list-filter.component.js +2 -2
- package/esm2015/lib/login-history-for-user/login-history-for-user.component.js +11 -2
- package/esm2015/lib/searchable-selector/searchable-selector.component.js +34 -4
- package/esm2015/lib/techlify-feature/on-off-switch/on-off-switch.component.js +27 -0
- package/esm2015/lib/techlify-feature/techlify-feature-enabled.directive.js +78 -0
- package/esm2015/lib/techlify-feature/techlify-feature-listing.component.js +177 -0
- package/esm2015/lib/techlify-feature/techlify-feature.module.js +30 -0
- package/esm2015/lib/techlify-feature/techlify-feature.routing.js +12 -0
- package/esm2015/lib/techlify-feature/techlify-feature.service.js +28 -0
- package/esm2015/lib/timeline-filter/calculate-timeline.js +2 -2
- package/esm2015/lib/timeline-filter/timeline-filter.component.js +145 -16
- package/esm2015/ngx-techlify-core.js +6 -3
- package/esm2015/public-api.js +5 -6
- package/fesm2015/ngx-techlify-core.js +221 -61
- package/fesm2015/ngx-techlify-core.js.map +1 -1
- package/lib/login-history-for-user/login-history-for-user.component.d.ts +2 -0
- package/lib/searchable-selector/searchable-selector.component.d.ts +5 -0
- package/lib/{company-feature → techlify-feature}/on-off-switch/on-off-switch.component.d.ts +0 -0
- package/lib/techlify-feature/techlify-feature-enabled.directive.d.ts +17 -0
- package/lib/{company-feature/company-feature.component.d.ts → techlify-feature/techlify-feature-listing.component.d.ts} +7 -4
- package/lib/techlify-feature/techlify-feature.module.d.ts +2 -0
- package/lib/techlify-feature/techlify-feature.routing.d.ts +2 -0
- package/lib/{company-feature/company-feature.service.d.ts → techlify-feature/techlify-feature.service.d.ts} +1 -1
- package/lib/timeline-filter/calculate-timeline.d.ts +5 -0
- package/lib/timeline-filter/timeline-filter.component.d.ts +47 -6
- package/ngx-techlify-core.d.ts +5 -2
- package/ngx-techlify-core.metadata.json +1 -1
- package/package.json +1 -1
- package/public-api.d.ts +4 -5
- package/esm2015/lib/company-feature/company-feature.component.js +0 -174
- package/esm2015/lib/company-feature/company-feature.module.js +0 -30
- package/esm2015/lib/company-feature/company-feature.routing.js +0 -12
- package/esm2015/lib/company-feature/company-feature.service.js +0 -28
- package/esm2015/lib/company-feature/ngx-feature-enabled.directive.js +0 -77
- package/esm2015/lib/company-feature/on-off-switch/on-off-switch.component.js +0 -27
- package/lib/company-feature/company-feature.module.d.ts +0 -2
- package/lib/company-feature/company-feature.routing.d.ts +0 -2
- package/lib/company-feature/ngx-feature-enabled.directive.d.ts +0 -16
|
@@ -2281,6 +2281,9 @@
|
|
|
2281
2281
|
this.edit = false;
|
|
2282
2282
|
this.sort = true;
|
|
2283
2283
|
this.items = [];
|
|
2284
|
+
this.cache = false;
|
|
2285
|
+
this.perPage = 25;
|
|
2286
|
+
this.inDataSearch = false;
|
|
2284
2287
|
this.selectionChange = new i0.EventEmitter();
|
|
2285
2288
|
this.itemsChange = new i0.EventEmitter();
|
|
2286
2289
|
this.isLoading = false;
|
|
@@ -2291,6 +2294,7 @@
|
|
|
2291
2294
|
this.controlType = 'searchable-selctor';
|
|
2292
2295
|
this.id = "searchable-selctor-" + SearchableSelectorComponent_1.nextId++;
|
|
2293
2296
|
this.describedBy = '';
|
|
2297
|
+
this.cachedItems = [];
|
|
2294
2298
|
this._required = false;
|
|
2295
2299
|
this._disabled = false;
|
|
2296
2300
|
this.selectorForm = formBuilder.group({
|
|
@@ -2386,7 +2390,7 @@
|
|
|
2386
2390
|
_this.search(value);
|
|
2387
2391
|
});
|
|
2388
2392
|
this.filters = {
|
|
2389
|
-
perPage:
|
|
2393
|
+
perPage: this.perPage,
|
|
2390
2394
|
search: '',
|
|
2391
2395
|
page: 1,
|
|
2392
2396
|
lastPage: 1
|
|
@@ -2402,8 +2406,15 @@
|
|
|
2402
2406
|
SearchableSelectorComponent.prototype.fetchItemList = function () {
|
|
2403
2407
|
var _this = this;
|
|
2404
2408
|
this.isLoading = true;
|
|
2405
|
-
|
|
2409
|
+
var request = this.http.get(this.apiUrl, { params: this.filters });
|
|
2410
|
+
if (this.cache) {
|
|
2411
|
+
request = this.http.cache().get(this.apiUrl, { params: this.filters });
|
|
2412
|
+
}
|
|
2413
|
+
rxjs.of().pipe(operators.startWith(true), operators.switchMap(function (_) { return rxjs.from(request); }), operators.finalize(function () { return _this.isLoading = false; }), untilDestroy.untilDestroyed(this)).subscribe(function (result) {
|
|
2406
2414
|
_this.items = _this.items.concat(result.data);
|
|
2415
|
+
if (_this.cache) {
|
|
2416
|
+
_this.cachedItems = _this.items;
|
|
2417
|
+
}
|
|
2407
2418
|
_this.filters.page = result.current_page;
|
|
2408
2419
|
_this.filters.lastPage = result.last_page;
|
|
2409
2420
|
});
|
|
@@ -2477,7 +2488,24 @@
|
|
|
2477
2488
|
else {
|
|
2478
2489
|
this.filters.search = event;
|
|
2479
2490
|
}
|
|
2480
|
-
|
|
2491
|
+
// we need search field to search in data
|
|
2492
|
+
if (this.inDataSearch && this.searchField) {
|
|
2493
|
+
this.filterItems(event);
|
|
2494
|
+
}
|
|
2495
|
+
else {
|
|
2496
|
+
this.reloadData();
|
|
2497
|
+
}
|
|
2498
|
+
};
|
|
2499
|
+
SearchableSelectorComponent.prototype.filterItems = function (event) {
|
|
2500
|
+
var _this = this;
|
|
2501
|
+
if (event) {
|
|
2502
|
+
this.items = this.cachedItems.filter(function (value) {
|
|
2503
|
+
return value[_this.searchField].toLowerCase().search(event.toLowerCase()) != -1;
|
|
2504
|
+
});
|
|
2505
|
+
}
|
|
2506
|
+
else {
|
|
2507
|
+
this.items = this.cachedItems;
|
|
2508
|
+
}
|
|
2481
2509
|
};
|
|
2482
2510
|
SearchableSelectorComponent.prototype.addItem = function (event) {
|
|
2483
2511
|
var _this = this;
|
|
@@ -2552,6 +2580,9 @@
|
|
|
2552
2580
|
searchField: [{ type: i0.Input }],
|
|
2553
2581
|
itemComponent: [{ type: i0.Input }],
|
|
2554
2582
|
items: [{ type: i0.Input }],
|
|
2583
|
+
cache: [{ type: i0.Input }],
|
|
2584
|
+
perPage: [{ type: i0.Input }],
|
|
2585
|
+
inDataSearch: [{ type: i0.Input }],
|
|
2555
2586
|
selectionChange: [{ type: i0.Output }],
|
|
2556
2587
|
itemsChange: [{ type: i0.Output }],
|
|
2557
2588
|
required: [{ type: i0.Input }],
|
|
@@ -2786,7 +2817,7 @@
|
|
|
2786
2817
|
}
|
|
2787
2818
|
case 4: { // This Week
|
|
2788
2819
|
var first = date.getDate() - date.getDay() + 1; // First day is the day of the month - the day of the week
|
|
2789
|
-
var last = first + 6; // last day is the first day + 6
|
|
2820
|
+
var last = first + 6; // last day is the first day + 6
|
|
2790
2821
|
data.date_from = new Date(date.setDate(first));
|
|
2791
2822
|
data.date_to = new Date(date.setDate(last));
|
|
2792
2823
|
break;
|
|
@@ -2868,8 +2899,11 @@
|
|
|
2868
2899
|
Timeline.LAST_YEAR = 11;
|
|
2869
2900
|
Timeline.ALL = 12;
|
|
2870
2901
|
|
|
2871
|
-
|
|
2872
|
-
|
|
2902
|
+
var TimelineFilterComponent_1;
|
|
2903
|
+
exports.ɵbb = TimelineFilterComponent_1 = /** @class */ (function () {
|
|
2904
|
+
function TimelineFilterComponent(formBuilder, ngControl, datePipe) {
|
|
2905
|
+
this.ngControl = ngControl;
|
|
2906
|
+
this.datePipe = datePipe;
|
|
2873
2907
|
this.timelineValue = new forms.FormControl('');
|
|
2874
2908
|
this.timelines = [
|
|
2875
2909
|
{ value: 1, viewValue: 'Custom' },
|
|
@@ -2885,12 +2919,33 @@
|
|
|
2885
2919
|
{ value: 11, viewValue: 'Last Year' },
|
|
2886
2920
|
{ value: 12, viewValue: 'All dates' },
|
|
2887
2921
|
];
|
|
2888
|
-
this.labelText = 'Select Timeline';
|
|
2889
2922
|
this.dateFrom = 'date_from';
|
|
2890
2923
|
this.dateTo = 'date_to';
|
|
2891
2924
|
this.appearance = "legacy";
|
|
2892
2925
|
this.showClearbutton = false;
|
|
2926
|
+
/**
|
|
2927
|
+
* @deprecated The form input is deprated
|
|
2928
|
+
*/
|
|
2929
|
+
this.form = null;
|
|
2930
|
+
this.labelText = 'Select Timeline';
|
|
2931
|
+
this.touchUi = true;
|
|
2932
|
+
this.selectedValueChange = new i0.EventEmitter();
|
|
2933
|
+
this.selectionChange = new i0.EventEmitter();
|
|
2934
|
+
this.onChange = function () { };
|
|
2935
|
+
this.onTouched = function () { };
|
|
2936
|
+
this.stateChanges = new rxjs.Subject();
|
|
2937
|
+
this.controlType = 'timeline-filter';
|
|
2938
|
+
this.id = "timeline-filter-" + TimelineFilterComponent_1.nextId++;
|
|
2939
|
+
this.describedBy = '';
|
|
2893
2940
|
this.showCustomDateFields = false;
|
|
2941
|
+
this._required = false;
|
|
2942
|
+
this._disabled = false;
|
|
2943
|
+
this.selectorForm = formBuilder.group({
|
|
2944
|
+
select_value: [null],
|
|
2945
|
+
});
|
|
2946
|
+
if (this.ngControl != null) {
|
|
2947
|
+
this.ngControl.valueAccessor = this;
|
|
2948
|
+
}
|
|
2894
2949
|
}
|
|
2895
2950
|
Object.defineProperty(TimelineFilterComponent.prototype, "defaultValue", {
|
|
2896
2951
|
set: function (value) {
|
|
@@ -2900,10 +2955,53 @@
|
|
|
2900
2955
|
enumerable: false,
|
|
2901
2956
|
configurable: true
|
|
2902
2957
|
});
|
|
2903
|
-
TimelineFilterComponent.prototype
|
|
2904
|
-
|
|
2905
|
-
|
|
2906
|
-
|
|
2958
|
+
Object.defineProperty(TimelineFilterComponent.prototype, "required", {
|
|
2959
|
+
get: function () { return this._required; },
|
|
2960
|
+
set: function (value) {
|
|
2961
|
+
this.selectorForm.get('select_value').setValidators(forms.Validators.required);
|
|
2962
|
+
this._required = coercion.coerceBooleanProperty(value);
|
|
2963
|
+
this.stateChanges.next();
|
|
2964
|
+
},
|
|
2965
|
+
enumerable: false,
|
|
2966
|
+
configurable: true
|
|
2967
|
+
});
|
|
2968
|
+
Object.defineProperty(TimelineFilterComponent.prototype, "disabled", {
|
|
2969
|
+
get: function () { return this._disabled; },
|
|
2970
|
+
set: function (value) {
|
|
2971
|
+
this._disabled = coercion.coerceBooleanProperty(value);
|
|
2972
|
+
this._disabled ? this.selectorForm.disable() : this.selectorForm.enable();
|
|
2973
|
+
this.stateChanges.next();
|
|
2974
|
+
},
|
|
2975
|
+
enumerable: false,
|
|
2976
|
+
configurable: true
|
|
2977
|
+
});
|
|
2978
|
+
Object.defineProperty(TimelineFilterComponent.prototype, "value", {
|
|
2979
|
+
get: function () {
|
|
2980
|
+
if (this.selectorForm.valid) {
|
|
2981
|
+
return this.selectorForm.value.select_value;
|
|
2982
|
+
}
|
|
2983
|
+
return '';
|
|
2984
|
+
},
|
|
2985
|
+
set: function (data) {
|
|
2986
|
+
this.selectorForm.patchValue({ select_value: data || '' });
|
|
2987
|
+
this._handleInput();
|
|
2988
|
+
this.stateChanges.next();
|
|
2989
|
+
},
|
|
2990
|
+
enumerable: false,
|
|
2991
|
+
configurable: true
|
|
2992
|
+
});
|
|
2993
|
+
TimelineFilterComponent.prototype.getDateRangeString = function () {
|
|
2994
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
2995
|
+
var str = "";
|
|
2996
|
+
if ((_a = this.selectedRange) === null || _a === void 0 ? void 0 : _a.show_custom_field) {
|
|
2997
|
+
if (((_b = this.selectedRange) === null || _b === void 0 ? void 0 : _b.date_from.toUTCString()) != 'Invalid Date') {
|
|
2998
|
+
str += ' - ' + this.datePipe.transform((_d = (_c = this.selectedRange) === null || _c === void 0 ? void 0 : _c.date_from) === null || _d === void 0 ? void 0 : _d.toUTCString());
|
|
2999
|
+
}
|
|
3000
|
+
if (((_e = this.selectedRange) === null || _e === void 0 ? void 0 : _e.date_to.toUTCString()) != 'Invalid Date') {
|
|
3001
|
+
str += ' - ' + this.datePipe.transform((_g = (_f = this.selectedRange) === null || _f === void 0 ? void 0 : _f.date_to) === null || _g === void 0 ? void 0 : _g.toUTCString());
|
|
3002
|
+
}
|
|
3003
|
+
}
|
|
3004
|
+
return str;
|
|
2907
3005
|
};
|
|
2908
3006
|
TimelineFilterComponent.prototype.resetFieldValue = function (field) {
|
|
2909
3007
|
this.form.get(field).setValue('');
|
|
@@ -2922,28 +3020,98 @@
|
|
|
2922
3020
|
this.showCustomDateFields = timeline.show_custom_field;
|
|
2923
3021
|
}
|
|
2924
3022
|
};
|
|
3023
|
+
TimelineFilterComponent.prototype._handleInput = function () {
|
|
3024
|
+
if (this.value == 1) {
|
|
3025
|
+
this.picker.open();
|
|
3026
|
+
return;
|
|
3027
|
+
}
|
|
3028
|
+
var range = calculateTimeline(this.value);
|
|
3029
|
+
this.selectedRange = range;
|
|
3030
|
+
this.onChange(this.value);
|
|
3031
|
+
this.selectedValueChange.emit(this.selectedValue);
|
|
3032
|
+
this.selectionChange.emit(range);
|
|
3033
|
+
};
|
|
3034
|
+
TimelineFilterComponent.prototype.dateRangeChange = function (dateRangeStart, dateRangeEnd) {
|
|
3035
|
+
var range = {
|
|
3036
|
+
date_from: new Date(dateRangeStart.value),
|
|
3037
|
+
date_to: new Date(dateRangeEnd.value),
|
|
3038
|
+
show_custom_field: true
|
|
3039
|
+
};
|
|
3040
|
+
this.selectedRange = range;
|
|
3041
|
+
this.onChange(this.value);
|
|
3042
|
+
this.selectedValueChange.emit(this.selectedValue);
|
|
3043
|
+
this.selectionChange.emit(range);
|
|
3044
|
+
};
|
|
3045
|
+
TimelineFilterComponent.prototype.onCustomDateChange = function (event) {
|
|
3046
|
+
};
|
|
3047
|
+
TimelineFilterComponent.prototype.setDescribedByIds = function (ids) {
|
|
3048
|
+
this.describedBy = ids.join(' ');
|
|
3049
|
+
};
|
|
3050
|
+
TimelineFilterComponent.prototype.onContainerClick = function (event) {
|
|
3051
|
+
event.stopPropagation();
|
|
3052
|
+
};
|
|
3053
|
+
TimelineFilterComponent.prototype.writeValue = function (data) {
|
|
3054
|
+
this.value = data;
|
|
3055
|
+
};
|
|
3056
|
+
TimelineFilterComponent.prototype.registerOnChange = function (fn) {
|
|
3057
|
+
this.onChange = fn;
|
|
3058
|
+
};
|
|
3059
|
+
TimelineFilterComponent.prototype.registerOnTouched = function (fn) {
|
|
3060
|
+
this.onTouched = fn;
|
|
3061
|
+
};
|
|
3062
|
+
TimelineFilterComponent.prototype.setDisabledState = function (isDisabled) {
|
|
3063
|
+
this.disabled = isDisabled;
|
|
3064
|
+
};
|
|
3065
|
+
TimelineFilterComponent.prototype.ngOnInit = function () {
|
|
3066
|
+
var _this = this;
|
|
3067
|
+
console.log(this.form);
|
|
3068
|
+
this.timelineValue.valueChanges.
|
|
3069
|
+
pipe(operators.debounceTime(100), operators.distinctUntilChanged(), untilDestroy.untilDestroyed(this)).subscribe(function (value) { return _this.changeTimeline(value); });
|
|
3070
|
+
};
|
|
3071
|
+
TimelineFilterComponent.prototype.ngOnDestroy = function () {
|
|
3072
|
+
this.stateChanges.complete();
|
|
3073
|
+
};
|
|
2925
3074
|
return TimelineFilterComponent;
|
|
2926
3075
|
}());
|
|
3076
|
+
exports.ɵbb.nextId = 0;
|
|
2927
3077
|
exports.ɵbb.decorators = [
|
|
2928
3078
|
{ type: i0.Component, args: [{
|
|
2929
3079
|
selector: 'app-timeline-filter',
|
|
2930
|
-
template: "<ng-container [formGroup]=\"form\">\n
|
|
3080
|
+
template: "<ng-container *ngIf=\"form\" [formGroup]=\"form\">\n <mat-form-field [appearance]=\"appearance\">\n <mat-label>{{labelText}}</mat-label>\n <mat-select [formControl]=\"timelineValue\">\n <mat-option *ngFor=\"let timeline of timelines\" [value]=\"timeline.value\">\n {{timeline.viewValue}}\n </mat-option>\n </mat-select>\n <button mat-button *ngIf=\"showClearbutton && timelineValue.value\" matSuffix mat-icon-button\n (click)=\"timelineValue.setValue('')\">\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n\n <ng-container *ngIf=\"showCustomDateFields\">\n <mat-form-field [appearance]=\"appearance\">\n <mat-label>From Date</mat-label>\n <input matInput formControlName=\"{{dateFrom}}\" [matDatepicker]=\"fromPicker\" (click)=\"fromPicker.open()\"\n placeholder=\"From Date\" readonly />\n <mat-datepicker-toggle matSuffix [for]=\"fromPicker\"></mat-datepicker-toggle>\n <mat-datepicker #fromPicker></mat-datepicker>\n <button mat-button *ngIf=\"getFieldValue(dateFrom)\" matSuffix mat-icon-button\n (click)=\"resetFieldValue(dateFrom)\">\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n\n <mat-form-field [appearance]=\"appearance\">\n <mat-label>To Date</mat-label>\n <input matInput formControlName=\"{{dateTo}}\" [matDatepicker]=\"toPicker\" (click)=\"toPicker.open()\"\n placeholder=\"To Date\" readonly />\n <mat-datepicker-toggle matSuffix [for]=\"\"></mat-datepicker-toggle>\n <mat-datepicker #toPicker></mat-datepicker>\n <button mat-button *ngIf=\"getFieldValue(dateTo)\" matSuffix mat-icon-button\n (click)=\"resetFieldValue(dateTo)\">\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n\n </ng-container>\n</ng-container>\n<div *ngIf=\"!form\" [formGroup]=\"selectorForm\">\n <mat-select formControlName=\"select_value\" focused=\"false\" [required]=\"required\"\n autocomplete=\"off\" (selectionChange)=\"_handleInput()\">\n <mat-option *ngFor=\"let timeline of timelines\" [value]=\"timeline?.value\">\n {{ timeline?.viewValue }} {{ selectedRange?.show_custom_field && timeline?.value == 1 ? getDateRangeString() : '' }}\n </mat-option>\n </mat-select>\n <mat-date-range-input hidden (dateChange)=\"onCustomDateChange($event)\" [rangePicker]=\"picker\">\n <input matStartDate #customStartDate>\n <input matEndDate (dateChange)=\"dateRangeChange(customStartDate, customEndDate)\" #customEndDate>\n </mat-date-range-input>\n <mat-date-range-picker #picker [touchUi]=\"touchUi\"></mat-date-range-picker>\n</div>\n",
|
|
3081
|
+
providers: [
|
|
3082
|
+
{
|
|
3083
|
+
provide: formField.MatFormFieldControl,
|
|
3084
|
+
useExisting: TimelineFilterComponent_1
|
|
3085
|
+
}
|
|
3086
|
+
],
|
|
2931
3087
|
styles: [""]
|
|
2932
3088
|
},] }
|
|
2933
3089
|
];
|
|
2934
|
-
exports.ɵbb.ctorParameters = function () { return [
|
|
3090
|
+
exports.ɵbb.ctorParameters = function () { return [
|
|
3091
|
+
{ type: forms.FormBuilder },
|
|
3092
|
+
{ type: forms.NgControl, decorators: [{ type: i0.Optional }, { type: i0.Self }] },
|
|
3093
|
+
{ type: common.DatePipe }
|
|
3094
|
+
]; };
|
|
2935
3095
|
exports.ɵbb.propDecorators = {
|
|
3096
|
+
picker: [{ type: i0.ViewChild, args: ['picker',] }],
|
|
2936
3097
|
timelineValue: [{ type: i0.Input }],
|
|
2937
3098
|
timelines: [{ type: i0.Input }],
|
|
2938
|
-
labelText: [{ type: i0.Input }],
|
|
2939
3099
|
dateFrom: [{ type: i0.Input }],
|
|
2940
3100
|
dateTo: [{ type: i0.Input }],
|
|
2941
3101
|
appearance: [{ type: i0.Input }],
|
|
2942
3102
|
showClearbutton: [{ type: i0.Input }],
|
|
2943
3103
|
form: [{ type: i0.Input }],
|
|
2944
|
-
|
|
3104
|
+
labelText: [{ type: i0.Input }],
|
|
3105
|
+
selectedValue: [{ type: i0.Input }],
|
|
3106
|
+
touchUi: [{ type: i0.Input }],
|
|
3107
|
+
selectedValueChange: [{ type: i0.Output }],
|
|
3108
|
+
selectionChange: [{ type: i0.Output }],
|
|
3109
|
+
defaultValue: [{ type: i0.Input }],
|
|
3110
|
+
required: [{ type: i0.Input }],
|
|
3111
|
+
disabled: [{ type: i0.Input }],
|
|
3112
|
+
value: [{ type: i0.Input }]
|
|
2945
3113
|
};
|
|
2946
|
-
exports.ɵbb = __decorate([
|
|
3114
|
+
exports.ɵbb = TimelineFilterComponent_1 = __decorate([
|
|
2947
3115
|
untilDestroy.UntilDestroy()
|
|
2948
3116
|
], exports.ɵbb);
|
|
2949
3117
|
|
|
@@ -4050,7 +4218,7 @@
|
|
|
4050
4218
|
exports.ɵbh.decorators = [
|
|
4051
4219
|
{ type: i0.Component, args: [{
|
|
4052
4220
|
selector: 'app-email-subscription-user-list-filter',
|
|
4053
|
-
template: "<form [formGroup]=\"esUserFilterForm\" fxLayout=\"row wrap\" fxLayoutGap=\"1rem\" fxLayoutAlign=\"start center\">\n <mat-form-field class=\"ml-3\">\n <mat-label>User</mat-label>\n <app-searchable-selector formControlName=\"user_id\" apiUrl=\"api/users\" titleField=\"name\">\n </app-searchable-selector>\n <button mat-button *ngIf=\"getFieldValue('user_id')\" matSuffix mat-icon-button\n (click)=\"resetFieldValue('user_id')\">\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n\n <mat-form-field class=\"ml-3\">\n <mat-label>Email Type</mat-label>\n <app-searchable-selector formControlName=\"email_type_id\" apiUrl=\"api/email-subscription-types\">\n </app-searchable-selector>\n <button mat-button *ngIf=\"getFieldValue('
|
|
4221
|
+
template: "<form [formGroup]=\"esUserFilterForm\" fxLayout=\"row wrap\" fxLayoutGap=\"1rem\" fxLayoutAlign=\"start center\">\n <mat-form-field class=\"ml-3\">\n <mat-label>User</mat-label>\n <app-searchable-selector formControlName=\"user_id\" apiUrl=\"api/users\" titleField=\"name\">\n </app-searchable-selector>\n <button mat-button *ngIf=\"getFieldValue('user_id')\" matSuffix mat-icon-button\n (click)=\"resetFieldValue('user_id')\">\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n\n <mat-form-field class=\"ml-3\">\n <mat-label>Email Type</mat-label>\n <app-searchable-selector formControlName=\"email_type_id\" apiUrl=\"api/email-subscription-types\">\n </app-searchable-selector>\n <button mat-button *ngIf=\"getFieldValue('email_type_id')\" matSuffix mat-icon-button\n (click)=\"resetFieldValue('email_type_id')\">\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n</form>",
|
|
4054
4222
|
styles: [""]
|
|
4055
4223
|
},] }
|
|
4056
4224
|
];
|
|
@@ -4401,7 +4569,7 @@
|
|
|
4401
4569
|
exports.ɵbj.decorators = [
|
|
4402
4570
|
{ type: i0.Component, args: [{
|
|
4403
4571
|
selector: 'app-email-subscription-type-list',
|
|
4404
|
-
template: "<div class=\"mat-typography m-4\">\n <div fxLayout=\"row wrap\" fxLayoutAlign=\"start center\">\n <mat-form-field>\n <input matInput [formControl]=\"search\" placeholder=\"Email Type\" autocomplete=\"off\" />\n <button mat-button matSuffix mat-icon-button>\n <mat-icon>search</mat-icon>\n </button>\n <button mat-button *ngIf=\"search.value\" matSuffix mat-icon-button (click)=\"search.setValue('')\">\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n <div class=\"ml-2\">\n <button mat-raised-button color=\"primary\" type=\"button\" (click)=\"addEmailSubscriptionType()\">+ Email\n Type</button>\n </div>\n <span fxFlex></span>\n <mat-form-field appearance=\"outline\" class=\"no-padding\">\n <mat-label>Columns</mat-label>\n <mat-select [formControl]=\"displayColumns\" multiple (selectionChange)=\"columnsChange()\">\n <mat-option *ngFor=\"let column of availableDisplayColumns\" [value]=\"column.value\">{{column.name}}\n </mat-option>\n </mat-select>\n </mat-form-field>\n </div>\n\n <section>\n <div class=\"scroll-container\" infiniteScroll [infiniteScrollDistance]=\"2\" [infiniteScrollThrottle]=\"50\"\n (scrolled)=\"onScroll()\" [scrollWindow]=\"false\">\n <table mat-table [dataSource]=\"emailSubscriptionTypeList\" matSort class=\"w-100 mt-1\" multiTemplateDataRows\n id=\"email-subscription-type-table\">\n\n <!-- Index Column -->\n <ng-container matColumnDef=\"index\">\n <th mat-header-cell *matHeaderCellDef> # </th>\n <td mat-cell *matCellDef=\"let emailSubscriptionType; let i = dataIndex\"> {{ i+1 }} </td>\n </ng-container>\n <ng-container matColumnDef=\"title\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header> Title </th>\n <td mat-cell *matCellDef=\"let emailSubscriptionType;\"> {{ emailSubscriptionType?.title }} </td>\n </ng-container>\n <ng-container matColumnDef=\"code\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header> Code </th>\n <td mat-cell *matCellDef=\"let emailSubscriptionType;\"> {{ emailSubscriptionType?.code }}\n </td>\n </ng-container>\n <ng-container matColumnDef=\"frequency.title\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>
|
|
4572
|
+
template: "<div class=\"mat-typography m-4\">\n <div fxLayout=\"row wrap\" fxLayoutAlign=\"start center\">\n <mat-form-field>\n <input matInput [formControl]=\"search\" placeholder=\"Email Type\" autocomplete=\"off\" />\n <button mat-button matSuffix mat-icon-button>\n <mat-icon>search</mat-icon>\n </button>\n <button mat-button *ngIf=\"search.value\" matSuffix mat-icon-button (click)=\"search.setValue('')\">\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n <div class=\"ml-2\">\n <button mat-raised-button color=\"primary\" type=\"button\" (click)=\"addEmailSubscriptionType()\">+ Email\n Type</button>\n </div>\n <span fxFlex></span>\n <mat-form-field appearance=\"outline\" class=\"no-padding\">\n <mat-label>Columns</mat-label>\n <mat-select [formControl]=\"displayColumns\" multiple (selectionChange)=\"columnsChange()\">\n <mat-option *ngFor=\"let column of availableDisplayColumns\" [value]=\"column.value\">{{column.name}}\n </mat-option>\n </mat-select>\n </mat-form-field>\n </div>\n\n <section>\n <div class=\"scroll-container\" infiniteScroll [infiniteScrollDistance]=\"2\" [infiniteScrollThrottle]=\"50\"\n (scrolled)=\"onScroll()\" [scrollWindow]=\"false\">\n <table mat-table [dataSource]=\"emailSubscriptionTypeList\" matSort class=\"w-100 mt-1\" multiTemplateDataRows\n id=\"email-subscription-type-table\">\n\n <!-- Index Column -->\n <ng-container matColumnDef=\"index\">\n <th mat-header-cell *matHeaderCellDef> # </th>\n <td mat-cell *matCellDef=\"let emailSubscriptionType; let i = dataIndex\"> {{ i+1 }} </td>\n </ng-container>\n <ng-container matColumnDef=\"title\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header> Title </th>\n <td mat-cell *matCellDef=\"let emailSubscriptionType;\"> {{ emailSubscriptionType?.title }} </td>\n </ng-container>\n <ng-container matColumnDef=\"code\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header> Code </th>\n <td mat-cell *matCellDef=\"let emailSubscriptionType;\"> {{ emailSubscriptionType?.code }}\n </td>\n </ng-container>\n <ng-container matColumnDef=\"frequency.title\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header> Frequency </th>\n <td mat-cell *matCellDef=\"let emailSubscriptionType;\"> {{ emailSubscriptionType?.frequency?.title }}\n </td>\n </ng-container>\n <ng-container matColumnDef=\"description\">\n <th mat-header-cell *matHeaderCellDef> Description </th>\n <td mat-cell *matCellDef=\"let emailSubscriptionType;\"> {{ emailSubscriptionType?.description }}\n </td>\n </ng-container>\n\n <!-- Actions Column -->\n <ng-container matColumnDef=\"actions\">\n <th mat-header-cell *matHeaderCellDef> Actions </th>\n <td mat-cell *matCellDef=\"let emailSubscriptionType\">\n <button type=\"button\" mat-icon-button\n (click)=\"deleteEmailSubscriptionType($event,emailSubscriptionType)\">\n <mat-icon>delete</mat-icon>\n </button>\n <button type=\"button\" mat-icon-button\n (click)=\"editEmailSubscriptionType($event,emailSubscriptionType)\">\n <mat-icon>edit</mat-icon>\n </button>\n </td>\n </ng-container>\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns; sticky:true\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns;\"></tr>\n </table>\n </div>\n </section>\n</div>",
|
|
4405
4573
|
styles: [".scroll-container{max-height:800px;overflow-y:auto}"]
|
|
4406
4574
|
},] }
|
|
4407
4575
|
];
|
|
@@ -5487,14 +5655,12 @@
|
|
|
5487
5655
|
AuditLogViewModelComponent.prototype.getTransformedChanges = function () {
|
|
5488
5656
|
var _this = this;
|
|
5489
5657
|
var _a, _b, _c, _d;
|
|
5490
|
-
|
|
5491
|
-
|
|
5492
|
-
|
|
5493
|
-
|
|
5494
|
-
|
|
5495
|
-
|
|
5496
|
-
});
|
|
5497
|
-
}
|
|
5658
|
+
var changes = ((((_a = this.logInfo) === null || _a === void 0 ? void 0 : _a.action) === 'deleted') ? Object.keys((_b = this.logInfo) === null || _b === void 0 ? void 0 : _b.object) : Object.keys((_d = (_c = this.logInfo) === null || _c === void 0 ? void 0 : _c.data) === null || _d === void 0 ? void 0 : _d.changes)) || [];
|
|
5659
|
+
changes.forEach(function (key) {
|
|
5660
|
+
var _a, _b, _c, _d, _e;
|
|
5661
|
+
var displayAttribute = key.split('_').map(function (x) { return x.charAt(0).toUpperCase() + x.slice(1); }).join(' ');
|
|
5662
|
+
_this.changeList.push({ displayAttribute: displayAttribute, attribute: key, newValue: (((_a = _this.logInfo) === null || _a === void 0 ? void 0 : _a.action) === 'deleted') ? '' : ((_c = (_b = _this.logInfo) === null || _b === void 0 ? void 0 : _b.object[key]) !== null && _c !== void 0 ? _c : ''), oldValue: (_e = (_d = _this.logInfo) === null || _d === void 0 ? void 0 : _d.pre_object[key]) !== null && _e !== void 0 ? _e : '' });
|
|
5663
|
+
});
|
|
5498
5664
|
};
|
|
5499
5665
|
AuditLogViewModelComponent.prototype.close = function () {
|
|
5500
5666
|
this.dialogRef.close();
|
|
@@ -5992,23 +6158,21 @@
|
|
|
5992
6158
|
AuditLogViewComponent.prototype.getTransformedChanges = function () {
|
|
5993
6159
|
var _this = this;
|
|
5994
6160
|
var _a, _b, _c, _d;
|
|
5995
|
-
|
|
5996
|
-
|
|
5997
|
-
|
|
5998
|
-
|
|
5999
|
-
|
|
6000
|
-
|
|
6001
|
-
});
|
|
6002
|
-
}
|
|
6161
|
+
var changes = ((((_a = this.logInfo) === null || _a === void 0 ? void 0 : _a.action) === 'deleted') ? Object.keys((_b = this.logInfo) === null || _b === void 0 ? void 0 : _b.object) : Object.keys((_d = (_c = this.logInfo) === null || _c === void 0 ? void 0 : _c.data) === null || _d === void 0 ? void 0 : _d.changes)) || [];
|
|
6162
|
+
changes.forEach(function (key) {
|
|
6163
|
+
var _a, _b, _c, _d, _e;
|
|
6164
|
+
var displayAttribute = key.split('_').map(function (x) { return x.charAt(0).toUpperCase() + x.slice(1); }).join(' ');
|
|
6165
|
+
_this.changeList.push({ displayAttribute: displayAttribute, attribute: key, newValue: (((_a = _this.logInfo) === null || _a === void 0 ? void 0 : _a.action) === 'deleted') ? '' : ((_c = (_b = _this.logInfo) === null || _b === void 0 ? void 0 : _b.object[key]) !== null && _c !== void 0 ? _c : ''), oldValue: (_e = (_d = _this.logInfo) === null || _d === void 0 ? void 0 : _d.pre_object[key]) !== null && _e !== void 0 ? _e : '' });
|
|
6166
|
+
});
|
|
6003
6167
|
};
|
|
6004
6168
|
AuditLogViewComponent.prototype.fetchLogDetail = function (logId) {
|
|
6005
6169
|
return __awaiter(this, void 0, void 0, function () {
|
|
6006
6170
|
var result;
|
|
6007
|
-
return __generator(this, function (
|
|
6008
|
-
switch (
|
|
6171
|
+
return __generator(this, function (_f) {
|
|
6172
|
+
switch (_f.label) {
|
|
6009
6173
|
case 0: return [4 /*yield*/, this.dataManager.GET("api/audit-logs/" + logId)];
|
|
6010
6174
|
case 1:
|
|
6011
|
-
result =
|
|
6175
|
+
result = _f.sent();
|
|
6012
6176
|
this.logInfo = result.item;
|
|
6013
6177
|
this.getTransformedChanges();
|
|
6014
6178
|
this.patchDelta();
|
|
@@ -6492,6 +6656,7 @@
|
|
|
6492
6656
|
};
|
|
6493
6657
|
this.displayedColumns = ['index', 'created_at'];
|
|
6494
6658
|
this.historyFilterForm = this.fb.group({
|
|
6659
|
+
'duration': [''],
|
|
6495
6660
|
'date_from': [''],
|
|
6496
6661
|
'date_to': ['']
|
|
6497
6662
|
});
|
|
@@ -6508,6 +6673,14 @@
|
|
|
6508
6673
|
});
|
|
6509
6674
|
this.initializeData();
|
|
6510
6675
|
};
|
|
6676
|
+
LoginHistoryForUserComponent.prototype.onTimelineChange = function (range) {
|
|
6677
|
+
var date_from = (range === null || range === void 0 ? void 0 : range.date_from) ? new Date(range.date_from) : '';
|
|
6678
|
+
var date_to = (range === null || range === void 0 ? void 0 : range.date_to) ? new Date(range.date_to) : '';
|
|
6679
|
+
this.historyFilterForm.patchValue({
|
|
6680
|
+
date_from: date_from,
|
|
6681
|
+
date_to: date_to
|
|
6682
|
+
});
|
|
6683
|
+
};
|
|
6511
6684
|
LoginHistoryForUserComponent.prototype.initializeData = function () {
|
|
6512
6685
|
var _this = this;
|
|
6513
6686
|
this.http.get("api/user-login-history", { params: Object.assign(Object.assign({}, this.filters), this.pageEvent) })
|
|
@@ -6541,7 +6714,7 @@
|
|
|
6541
6714
|
exports.LoginHistoryForUserComponent.decorators = [
|
|
6542
6715
|
{ type: i0.Component, args: [{
|
|
6543
6716
|
selector: 'app-login-history-for-user',
|
|
6544
|
-
template: "<div class=\"mat-typography m-4\">\n <form fxLayoutAlign=\" start center\">\n <app-timeline-filter
|
|
6717
|
+
template: "<div class=\"mat-typography m-4\">\n <form [formGroup]=\"historyFilterForm\" fxLayoutAlign=\" start center\">\n <app-timeline-filter formControlName=\"duration\" (selectionChange)=\"onTimelineChange($event)\"></app-timeline-filter>\n </form>\n\n <section>\n <div class=\"scroll-container\" infiniteScroll [infiniteScrollDistance]=\"2\" [infiniteScrollThrottle]=\"50\"\n (scrolled)=\"onScroll()\" [scrollWindow]=\"false\">\n <table mat-table [dataSource]=\"loginHistoryList\" matSort class=\"w-100 mt-1\" multiTemplateDataRows\n id=\"login-history-table\">\n\n <!-- Index Column -->\n <ng-container matColumnDef=\"index\">\n <th mat-header-cell *matHeaderCellDef> # </th>\n <td mat-cell *matCellDef=\"let loginHistory; let i = dataIndex\"> {{ i+1 }} </td>\n </ng-container>\n\n <ng-container matColumnDef=\"created_at\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header> Last Login</th>\n <td mat-cell *matCellDef=\"let loginHistory;\">\n {{loginHistory?.created_at | date:'medium' }}\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns;\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns;\"></tr>\n </table>\n </div>\n\n </section>\n</div>\n",
|
|
6545
6718
|
styles: [".scroll-container{max-height:800px;overflow-y:auto}"]
|
|
6546
6719
|
},] }
|
|
6547
6720
|
];
|
|
@@ -7161,33 +7334,33 @@
|
|
|
7161
7334
|
},] }
|
|
7162
7335
|
];
|
|
7163
7336
|
|
|
7164
|
-
var
|
|
7165
|
-
function
|
|
7337
|
+
var TechlifyFeatureService = /** @class */ (function () {
|
|
7338
|
+
function TechlifyFeatureService(dataManager) {
|
|
7166
7339
|
this.dataManager = dataManager;
|
|
7167
7340
|
}
|
|
7168
|
-
|
|
7341
|
+
TechlifyFeatureService.prototype.getFeatures = function () {
|
|
7169
7342
|
return this.dataManager.GET("api/features");
|
|
7170
7343
|
};
|
|
7171
|
-
|
|
7344
|
+
TechlifyFeatureService.prototype.disableFeature = function (id) {
|
|
7172
7345
|
return this.dataManager.GET("api/feature/" + id + "/disable");
|
|
7173
7346
|
};
|
|
7174
|
-
|
|
7347
|
+
TechlifyFeatureService.prototype.enableFeature = function (id) {
|
|
7175
7348
|
return this.dataManager.GET("api/feature/" + id + "/enable");
|
|
7176
7349
|
};
|
|
7177
|
-
return
|
|
7350
|
+
return TechlifyFeatureService;
|
|
7178
7351
|
}());
|
|
7179
|
-
|
|
7180
|
-
|
|
7352
|
+
TechlifyFeatureService.ɵprov = i0.ɵɵdefineInjectable({ factory: function TechlifyFeatureService_Factory() { return new TechlifyFeatureService(i0.ɵɵinject(DataManager)); }, token: TechlifyFeatureService, providedIn: "root" });
|
|
7353
|
+
TechlifyFeatureService.decorators = [
|
|
7181
7354
|
{ type: i0.Injectable, args: [{
|
|
7182
7355
|
providedIn: 'root'
|
|
7183
7356
|
},] }
|
|
7184
7357
|
];
|
|
7185
|
-
|
|
7358
|
+
TechlifyFeatureService.ctorParameters = function () { return [
|
|
7186
7359
|
{ type: DataManager }
|
|
7187
7360
|
]; };
|
|
7188
7361
|
|
|
7189
|
-
exports.
|
|
7190
|
-
function
|
|
7362
|
+
exports.TechlifyFeatureListingComponent = /** @class */ (function () {
|
|
7363
|
+
function TechlifyFeatureListingComponent(dataManager, errorHandler, fb, alertService, dialog, storage, featureService) {
|
|
7191
7364
|
this.dataManager = dataManager;
|
|
7192
7365
|
this.errorHandler = errorHandler;
|
|
7193
7366
|
this.fb = fb;
|
|
@@ -7210,11 +7383,11 @@
|
|
|
7210
7383
|
num_items: [""]
|
|
7211
7384
|
});
|
|
7212
7385
|
}
|
|
7213
|
-
|
|
7386
|
+
TechlifyFeatureListingComponent.prototype.ngOnInit = function () {
|
|
7214
7387
|
this.loadData();
|
|
7215
7388
|
this.listenForChanges();
|
|
7216
7389
|
};
|
|
7217
|
-
|
|
7390
|
+
TechlifyFeatureListingComponent.prototype.listenForChanges = function () {
|
|
7218
7391
|
var _this = this;
|
|
7219
7392
|
this.filterFormGroup.valueChanges
|
|
7220
7393
|
.pipe(operators.debounceTime(500), untilDestroy.untilDestroyed(this))
|
|
@@ -7222,7 +7395,7 @@
|
|
|
7222
7395
|
_this.reload();
|
|
7223
7396
|
});
|
|
7224
7397
|
};
|
|
7225
|
-
|
|
7398
|
+
TechlifyFeatureListingComponent.prototype.loadData = function () {
|
|
7226
7399
|
return __awaiter(this, void 0, void 0, function () {
|
|
7227
7400
|
var result, filter, error_1;
|
|
7228
7401
|
return __generator(this, function (_a) {
|
|
@@ -7255,7 +7428,7 @@
|
|
|
7255
7428
|
});
|
|
7256
7429
|
});
|
|
7257
7430
|
};
|
|
7258
|
-
|
|
7431
|
+
TechlifyFeatureListingComponent.prototype.toggeleFeature = function (element, feature) {
|
|
7259
7432
|
return __awaiter(this, void 0, void 0, function () {
|
|
7260
7433
|
var status, data, dialogRef;
|
|
7261
7434
|
var _this = this;
|
|
@@ -7312,7 +7485,7 @@
|
|
|
7312
7485
|
});
|
|
7313
7486
|
});
|
|
7314
7487
|
};
|
|
7315
|
-
|
|
7488
|
+
TechlifyFeatureListingComponent.prototype.setStorage = function (features) {
|
|
7316
7489
|
var e_1, _a;
|
|
7317
7490
|
var localFeatures = [];
|
|
7318
7491
|
try {
|
|
@@ -7339,25 +7512,25 @@
|
|
|
7339
7512
|
}
|
|
7340
7513
|
this.storage.setItem("features", localFeatures);
|
|
7341
7514
|
};
|
|
7342
|
-
|
|
7515
|
+
TechlifyFeatureListingComponent.prototype.reload = function () {
|
|
7343
7516
|
this.features = [];
|
|
7344
7517
|
this.page = 1;
|
|
7345
7518
|
if (!this.isWorking) {
|
|
7346
7519
|
this.loadData();
|
|
7347
7520
|
}
|
|
7348
7521
|
};
|
|
7349
|
-
|
|
7522
|
+
TechlifyFeatureListingComponent.prototype.onScroll = function () {
|
|
7350
7523
|
if (!this.isWorking && this.page < this.lastPage) {
|
|
7351
7524
|
this.page += 1;
|
|
7352
7525
|
this.loadData();
|
|
7353
7526
|
}
|
|
7354
7527
|
};
|
|
7355
|
-
|
|
7528
|
+
TechlifyFeatureListingComponent.prototype.sortColumn = function (event) {
|
|
7356
7529
|
var direction = event.direction.toString().toUpperCase();
|
|
7357
7530
|
this.assignFilter(event.active, direction);
|
|
7358
7531
|
this.reload();
|
|
7359
7532
|
};
|
|
7360
|
-
|
|
7533
|
+
TechlifyFeatureListingComponent.prototype.assignFilter = function (column, direction) {
|
|
7361
7534
|
switch (column) {
|
|
7362
7535
|
case 'name': {
|
|
7363
7536
|
return this.filterFormGroup
|
|
@@ -7371,36 +7544,36 @@
|
|
|
7371
7544
|
}
|
|
7372
7545
|
}
|
|
7373
7546
|
};
|
|
7374
|
-
return
|
|
7547
|
+
return TechlifyFeatureListingComponent;
|
|
7375
7548
|
}());
|
|
7376
|
-
exports.
|
|
7549
|
+
exports.TechlifyFeatureListingComponent.decorators = [
|
|
7377
7550
|
{ type: i0.Component, args: [{
|
|
7378
|
-
selector: 'app-
|
|
7551
|
+
selector: 'app-techlify-listing-feature',
|
|
7379
7552
|
template: "<div fxLayout=\"column\" fxLayoutGap=\"3rem\" class=\"p-3\">\n <div fxLayout=\"column\" fxLayoutAlign=\"center center\" class=\"primary-color mt-3\">\n <h3>Features Configuration</h3>\n <mat-hint>\n <i> Here you can specify which optional features you'd like to have available to your team </i>\n </mat-hint>\n </div>\n\n\n <div>\n <mat-card>\n <mat-card-content fxlayout=\"column\" style=\"overflow: auto; height: 700px\" class=\"classifications-card\">\n <table mat-table [dataSource]=\"dataSource\" class=\"mat-elevation-z8 w-100\" matSort multiTemplateDataRows\n (matSortChange)=\"sortColumn($event)\" infiniteScroll [infiniteScrollDistance]=\"2\" [infiniteScrollThrottle]=\"50\"\n (scrolled)=\"onScroll()\" [fromRoot]=\"true\" [infiniteScrollContainer]=\"'.classifications-card'\">\n <!-- Index Column -->\n <ng-container matColumnDef=\"index\">\n <th mat-header-cell *matHeaderCellDef>#</th>\n <td mat-cell *matCellDef=\"let element; let i = dataIndex\">\n {{ i + 1 }}\n </td>\n </ng-container>\n\n <!-- Title Column -->\n <ng-container matColumnDef=\"feature\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header disableClear>\n Feature\n </th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.title }}</td>\n </ng-container>\n\n <!-- Description Column -->\n <ng-container matColumnDef=\"description\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header disableClear>\n Descriptions\n </th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.description }}\n </td>\n </ng-container>\n\n <!-- Actions Column -->\n <ng-container matColumnDef=\"actions\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header disableClear>\n Actions\n </th>\n <td mat-cell *matCellDef=\"let element\">\n <div *ngIf=\"!element?.client_feature\">\n <app-on-off-switch [value]=\"element?.is_enabled_default\"\n (click)=\"toggeleFeature(element?.is_enabled_default, element)\"></app-on-off-switch>\n </div>\n <div *ngIf=\"element?.client_feature\">\n <app-on-off-switch [value]=\"element?.client_feature?.is_enabled\"\n (click)=\"toggeleFeature(element?.client_feature?.is_enabled, element)\"></app-on-off-switch>\n </div>\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns\"></tr>\n </table>\n </mat-card-content>\n </mat-card>\n </div>\n</div>\n",
|
|
7380
7553
|
styles: [""]
|
|
7381
7554
|
},] }
|
|
7382
7555
|
];
|
|
7383
|
-
exports.
|
|
7556
|
+
exports.TechlifyFeatureListingComponent.ctorParameters = function () { return [
|
|
7384
7557
|
{ type: DataManager },
|
|
7385
7558
|
{ type: ErrorHandlerService },
|
|
7386
7559
|
{ type: forms.FormBuilder },
|
|
7387
7560
|
{ type: AlertService },
|
|
7388
7561
|
{ type: dialog.MatDialog },
|
|
7389
7562
|
{ type: StorageService },
|
|
7390
|
-
{ type:
|
|
7563
|
+
{ type: TechlifyFeatureService }
|
|
7391
7564
|
]; };
|
|
7392
|
-
exports.
|
|
7565
|
+
exports.TechlifyFeatureListingComponent = __decorate([
|
|
7393
7566
|
untilDestroy.UntilDestroy()
|
|
7394
|
-
], exports.
|
|
7567
|
+
], exports.TechlifyFeatureListingComponent);
|
|
7395
7568
|
|
|
7396
7569
|
var routes$n = [
|
|
7397
7570
|
{
|
|
7398
7571
|
path: '',
|
|
7399
|
-
component: exports.
|
|
7572
|
+
component: exports.TechlifyFeatureListingComponent,
|
|
7400
7573
|
canActivate: [AuthenticationGuard]
|
|
7401
7574
|
},
|
|
7402
7575
|
];
|
|
7403
|
-
var
|
|
7576
|
+
var TechlifyFeatureRoutes = i1$2.RouterModule.forChild(routes$n);
|
|
7404
7577
|
|
|
7405
7578
|
var OnOffSwitchComponent = /** @class */ (function () {
|
|
7406
7579
|
function OnOffSwitchComponent(fb) {
|
|
@@ -7428,15 +7601,15 @@
|
|
|
7428
7601
|
value: [{ type: i0.Input }]
|
|
7429
7602
|
};
|
|
7430
7603
|
|
|
7431
|
-
var
|
|
7432
|
-
function
|
|
7604
|
+
var TechlifyFeatureEnabledDirective = /** @class */ (function () {
|
|
7605
|
+
function TechlifyFeatureEnabledDirective(el, featureService, errorHandler, storage) {
|
|
7433
7606
|
this.el = el;
|
|
7434
7607
|
this.featureService = featureService;
|
|
7435
7608
|
this.errorHandler = errorHandler;
|
|
7436
7609
|
this.storage = storage;
|
|
7437
7610
|
this.localFeatures = [];
|
|
7438
7611
|
}
|
|
7439
|
-
|
|
7612
|
+
TechlifyFeatureEnabledDirective.prototype.ngOnInit = function () {
|
|
7440
7613
|
if (!this.storage.getItem('features')) {
|
|
7441
7614
|
this.getFeatures();
|
|
7442
7615
|
}
|
|
@@ -7444,7 +7617,7 @@
|
|
|
7444
7617
|
this.checkForFeatureEnabled();
|
|
7445
7618
|
}
|
|
7446
7619
|
};
|
|
7447
|
-
|
|
7620
|
+
TechlifyFeatureEnabledDirective.prototype.getFeatures = function () {
|
|
7448
7621
|
return __awaiter(this, void 0, void 0, function () {
|
|
7449
7622
|
var features, _a, _b, feature, error_1;
|
|
7450
7623
|
var e_1, _c;
|
|
@@ -7491,7 +7664,7 @@
|
|
|
7491
7664
|
});
|
|
7492
7665
|
});
|
|
7493
7666
|
};
|
|
7494
|
-
|
|
7667
|
+
TechlifyFeatureEnabledDirective.prototype.checkForFeatureEnabled = function () {
|
|
7495
7668
|
try {
|
|
7496
7669
|
var features = this.storage.getItem('features');
|
|
7497
7670
|
var features_split = features.split(',');
|
|
@@ -7506,42 +7679,42 @@
|
|
|
7506
7679
|
this.errorHandler.handleError(error);
|
|
7507
7680
|
}
|
|
7508
7681
|
};
|
|
7509
|
-
return
|
|
7682
|
+
return TechlifyFeatureEnabledDirective;
|
|
7510
7683
|
}());
|
|
7511
|
-
|
|
7684
|
+
TechlifyFeatureEnabledDirective.decorators = [
|
|
7512
7685
|
{ type: i0.Directive, args: [{
|
|
7513
|
-
selector: '[
|
|
7686
|
+
selector: '[techlifyFeatureEnabled]'
|
|
7514
7687
|
},] }
|
|
7515
7688
|
];
|
|
7516
|
-
|
|
7689
|
+
TechlifyFeatureEnabledDirective.ctorParameters = function () { return [
|
|
7517
7690
|
{ type: i0.ElementRef },
|
|
7518
|
-
{ type:
|
|
7691
|
+
{ type: TechlifyFeatureService },
|
|
7519
7692
|
{ type: ErrorHandlerService },
|
|
7520
7693
|
{ type: StorageService }
|
|
7521
7694
|
]; };
|
|
7522
|
-
|
|
7523
|
-
enabledFeature: [{ type: i0.Input, args: ['
|
|
7695
|
+
TechlifyFeatureEnabledDirective.propDecorators = {
|
|
7696
|
+
enabledFeature: [{ type: i0.Input, args: ['techlifyFeatureEnabled',] }]
|
|
7524
7697
|
};
|
|
7525
7698
|
|
|
7526
|
-
var
|
|
7527
|
-
function
|
|
7699
|
+
var TechlifyFeatureModule = /** @class */ (function () {
|
|
7700
|
+
function TechlifyFeatureModule() {
|
|
7528
7701
|
}
|
|
7529
|
-
return
|
|
7702
|
+
return TechlifyFeatureModule;
|
|
7530
7703
|
}());
|
|
7531
|
-
|
|
7704
|
+
TechlifyFeatureModule.decorators = [
|
|
7532
7705
|
{ type: i0.NgModule, args: [{
|
|
7533
7706
|
imports: [
|
|
7534
7707
|
common.CommonModule,
|
|
7535
7708
|
MaterialModule,
|
|
7536
7709
|
flexLayout.FlexLayoutModule,
|
|
7537
|
-
|
|
7710
|
+
TechlifyFeatureRoutes,
|
|
7538
7711
|
slideToggle.MatSlideToggleModule,
|
|
7539
7712
|
forms.FormsModule,
|
|
7540
7713
|
forms.ReactiveFormsModule,
|
|
7541
7714
|
ngxInfiniteScroll.InfiniteScrollModule
|
|
7542
7715
|
],
|
|
7543
|
-
declarations: [exports.
|
|
7544
|
-
exports: [exports.
|
|
7716
|
+
declarations: [exports.TechlifyFeatureListingComponent, OnOffSwitchComponent, TechlifyFeatureEnabledDirective],
|
|
7717
|
+
exports: [exports.TechlifyFeatureListingComponent, TechlifyFeatureEnabledDirective]
|
|
7545
7718
|
},] }
|
|
7546
7719
|
];
|
|
7547
7720
|
|
|
@@ -7578,8 +7751,6 @@
|
|
|
7578
7751
|
exports.AuthenticationService = AuthenticationService;
|
|
7579
7752
|
exports.CacheInterceptor = CacheInterceptor;
|
|
7580
7753
|
exports.CommentFormComponent = CommentFormComponent;
|
|
7581
|
-
exports.CompanyFeatureModule = CompanyFeatureModule;
|
|
7582
|
-
exports.CompanyFeatureRoutes = CompanyFeatureRoutes;
|
|
7583
7754
|
exports.ConfigService = ConfigService;
|
|
7584
7755
|
exports.CoreModule = CoreModule;
|
|
7585
7756
|
exports.CredentialsService = CredentialsService;
|
|
@@ -7646,13 +7817,11 @@
|
|
|
7646
7817
|
exports.LoginHistoryForUserRoutingModule = LoginHistoryForUserRoutingModule;
|
|
7647
7818
|
exports.MatSelectInfiniteScrollDirective = MatSelectInfiniteScrollDirective;
|
|
7648
7819
|
exports.MaterialModule = MaterialModule;
|
|
7649
|
-
exports.NgxFeatureEnabledDirective = NgxFeatureEnabledDirective;
|
|
7650
7820
|
exports.NoteFormComponent = NoteFormComponent;
|
|
7651
7821
|
exports.NoteListComponent = NoteListComponent;
|
|
7652
7822
|
exports.NoteModule = NoteModule;
|
|
7653
7823
|
exports.NumItemsSelector = NumItemsSelector;
|
|
7654
7824
|
exports.NumberSelector = NumberSelector;
|
|
7655
|
-
exports.OnOffSwitchComponent = OnOffSwitchComponent;
|
|
7656
7825
|
exports.PageEvent = PageEvent;
|
|
7657
7826
|
exports.ReadMoreComponent = ReadMoreComponent;
|
|
7658
7827
|
exports.ReadMoreModule = ReadMoreModule;
|
|
@@ -7663,6 +7832,9 @@
|
|
|
7663
7832
|
exports.StorageService = StorageService;
|
|
7664
7833
|
exports.SuccessSnackComponent = SuccessSnackComponent;
|
|
7665
7834
|
exports.TechlifyConfig = TechlifyConfig;
|
|
7835
|
+
exports.TechlifyFeatureEnabledDirective = TechlifyFeatureEnabledDirective;
|
|
7836
|
+
exports.TechlifyFeatureModule = TechlifyFeatureModule;
|
|
7837
|
+
exports.TechlifyFeatureRoutes = TechlifyFeatureRoutes;
|
|
7666
7838
|
exports.TechlifyTaggerTagFormConfigModel = TechlifyTaggerTagFormConfigModel;
|
|
7667
7839
|
exports.TechlifyTaggerTagFormFieldModule = TechlifyTaggerTagFormFieldModule;
|
|
7668
7840
|
exports.TechlifyTaggerTagSelectorModule = TechlifyTaggerTagSelectorModule;
|
|
@@ -7695,13 +7867,13 @@
|
|
|
7695
7867
|
exports.ɵbt = UpdateViewModule;
|
|
7696
7868
|
exports.ɵbu = UpdateViewComponent;
|
|
7697
7869
|
exports.ɵbv = DataManager;
|
|
7698
|
-
exports.ɵbw =
|
|
7699
|
-
exports.ɵbx =
|
|
7700
|
-
exports.ɵby =
|
|
7701
|
-
exports.ɵbz =
|
|
7870
|
+
exports.ɵbw = ErrorHandlerService;
|
|
7871
|
+
exports.ɵbx = StorageService;
|
|
7872
|
+
exports.ɵby = TechlifyFeatureService;
|
|
7873
|
+
exports.ɵbz = DataManager;
|
|
7702
7874
|
exports.ɵc = ErrorSnackComponent;
|
|
7703
|
-
exports.ɵca =
|
|
7704
|
-
exports.ɵcb =
|
|
7875
|
+
exports.ɵca = AuthenticationGuard;
|
|
7876
|
+
exports.ɵcb = OnOffSwitchComponent;
|
|
7705
7877
|
exports.ɵd = HTTP_DYNAMIC_INTERCEPTORS;
|
|
7706
7878
|
exports.ɵe = HttpService;
|
|
7707
7879
|
exports.ɵf = RouteReusableStrategy;
|