ps-toolkit-ui 1.21.73 → 1.21.79
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/ps-toolkit-ui.umd.js +86 -87
- package/bundles/ps-toolkit-ui.umd.js.map +1 -1
- package/bundles/ps-toolkit-ui.umd.min.js +1 -1
- package/bundles/ps-toolkit-ui.umd.min.js.map +1 -1
- package/esm2015/lib/classes/form.class.js +1 -2
- package/esm2015/lib/classes/helper.class.js +1 -2
- package/esm2015/lib/classes/modal.class.js +1 -2
- package/esm2015/lib/classes/request.class.js +1 -2
- package/esm2015/lib/classes/table.class.js +1 -2
- package/esm2015/lib/components/accordion/accordion.component.js +1 -2
- package/esm2015/lib/components/form/bank-card/form.bank-card.component.js +1 -2
- package/esm2015/lib/components/form/button/form.button.component.js +1 -2
- package/esm2015/lib/components/form/date/form.date.component.js +1 -2
- package/esm2015/lib/components/form/file/form.file.component.js +1 -2
- package/esm2015/lib/components/form/icon/form.icon.component.js +1 -2
- package/esm2015/lib/components/form/plaque/select/form.plaque.select.component.js +1 -2
- package/esm2015/lib/components/form/radio/form.radio.component.js +1 -2
- package/esm2015/lib/components/form/select/form.select.component.js +1 -2
- package/esm2015/lib/components/form/select/item/form.select.item.component.js +1 -1
- package/esm2015/lib/components/form/slide/form.slide.component.js +1 -2
- package/esm2015/lib/components/form/star/form.star.component.js +1 -2
- package/esm2015/lib/components/form/tag/form.tag.component.js +1 -2
- package/esm2015/lib/components/form/textbox/form.textbox.component.js +1 -1
- package/esm2015/lib/components/form/time/form.time.component.js +1 -2
- package/esm2015/lib/components/form/toggle/form.toggle.component.js +1 -1
- package/esm2015/lib/components/form/tree/form.tree.component.js +1 -2
- package/esm2015/lib/components/form/tree/item/form.tree.item.component.js +1 -2
- package/esm2015/lib/components/form/uploader/form.uploader.component.js +1 -2
- package/esm2015/lib/components/form/vehicle/form.vehicle.component.js +1 -1
- package/esm2015/lib/components/form/vehicle/search/form.vehicle.search.component.js +1 -1
- package/esm2015/lib/components/header/header.component.js +1 -2
- package/esm2015/lib/components/sidebar/item/sidebar.item.component.js +1 -2
- package/esm2015/lib/components/sidebar/sidebar.component.js +1 -2
- package/esm2015/lib/components/table/row/table.row.component.js +1 -2
- package/esm2015/lib/components/table/table.component.js +1 -2
- package/fesm2015/ps-toolkit-ui.js +82 -84
- package/fesm2015/ps-toolkit-ui.js.map +1 -1
- package/package.json +3 -3
- package/ps-toolkit-ui.metadata.json +1 -1
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import { Inject, Component, Input, Injectable, EventEmitter, Output, ViewChild, HostListener, Pipe, NgModule } from '@angular/core';
|
|
2
|
-
import * as $$1 from 'jquery';
|
|
3
|
-
import { ajax, param } from 'jquery';
|
|
4
2
|
import { merge, get, groupBy, set, cloneDeep } from 'lodash';
|
|
5
3
|
import * as moment from 'jalali-moment';
|
|
6
4
|
import { now } from 'jalali-moment';
|
|
@@ -35,9 +33,9 @@ class AccordionComponent {
|
|
|
35
33
|
constructor() {
|
|
36
34
|
}
|
|
37
35
|
toggle(e) {
|
|
38
|
-
const chOpen =
|
|
36
|
+
const chOpen = $(e.target).closest('.accordion').find('.content.open');
|
|
39
37
|
const ocOpen = chOpen.closest('.accordion-item').find('.header > .icon');
|
|
40
|
-
const ch =
|
|
38
|
+
const ch = $(e.target).closest('.accordion-item').find(' > .content');
|
|
41
39
|
const oc = ch.closest('.accordion-item').find(' > .header > .icon');
|
|
42
40
|
if (ch.hasClass('open')) {
|
|
43
41
|
ch.removeClass('open');
|
|
@@ -638,7 +636,7 @@ class HeaderComponent {
|
|
|
638
636
|
}
|
|
639
637
|
get type() { return InputType; }
|
|
640
638
|
showUserDropDown(e) {
|
|
641
|
-
|
|
639
|
+
$(e.target).closest('#Header').find('.user-drop-down').slideToggle(100);
|
|
642
640
|
}
|
|
643
641
|
}
|
|
644
642
|
HeaderComponent.decorators = [
|
|
@@ -1137,9 +1135,9 @@ class HelperClass {
|
|
|
1137
1135
|
static addNotification(m, e = true) {
|
|
1138
1136
|
const id = HelperClass.random(20);
|
|
1139
1137
|
// tslint:disable-next-line
|
|
1140
|
-
|
|
1138
|
+
$('#Notifications').append('<div id="' + id + '" class="con"><div class="item ' + (e ? 'error' : 'success') + '"><i class="fas fa-times"></i><div>' + m + '</div></div></div>');
|
|
1141
1139
|
setTimeout(() => {
|
|
1142
|
-
const d =
|
|
1140
|
+
const d = $('#' + id);
|
|
1143
1141
|
d.fadeOut(300, () => {
|
|
1144
1142
|
d.remove();
|
|
1145
1143
|
});
|
|
@@ -1225,7 +1223,7 @@ class HelperClass {
|
|
|
1225
1223
|
if (inp.type === InputType.Text) {
|
|
1226
1224
|
inp.setValue(s, false);
|
|
1227
1225
|
setTimeout(() => {
|
|
1228
|
-
|
|
1226
|
+
$('#' + inp.id + 'TextInput .control').click();
|
|
1229
1227
|
}, 100);
|
|
1230
1228
|
}
|
|
1231
1229
|
if (inp.onBarcodeReaderChange !== null) {
|
|
@@ -1495,7 +1493,7 @@ class RequestClass {
|
|
|
1495
1493
|
if (request != null) {
|
|
1496
1494
|
request.abort();
|
|
1497
1495
|
}
|
|
1498
|
-
request = ajax(settings);
|
|
1496
|
+
request = $.ajax(settings);
|
|
1499
1497
|
request.done((response) => {
|
|
1500
1498
|
if (!this.environment.production) {
|
|
1501
1499
|
console.log('%c' + Method[method].toString() + ' : ' + url, 'background: #2f6054; color: white', response);
|
|
@@ -2164,13 +2162,13 @@ class AccordionRowClass {
|
|
|
2164
2162
|
}
|
|
2165
2163
|
toggle() {
|
|
2166
2164
|
setTimeout(() => {
|
|
2167
|
-
|
|
2165
|
+
$('#AccordionRow' + this.id + ' > .header').click();
|
|
2168
2166
|
}, 100);
|
|
2169
2167
|
}
|
|
2170
2168
|
open() {
|
|
2171
2169
|
setTimeout(() => {
|
|
2172
|
-
if (
|
|
2173
|
-
|
|
2170
|
+
if (!$('#AccordionRow' + this.id + ' > .content').hasClass('open')) {
|
|
2171
|
+
$('#AccordionRow' + this.id + ' > .header').click();
|
|
2174
2172
|
}
|
|
2175
2173
|
}, 100);
|
|
2176
2174
|
}
|
|
@@ -2207,7 +2205,7 @@ class SidebarItemComponent {
|
|
|
2207
2205
|
};
|
|
2208
2206
|
}
|
|
2209
2207
|
openClose(e) {
|
|
2210
|
-
const op =
|
|
2208
|
+
const op = $(e.target).closest('.user-sidebar-item');
|
|
2211
2209
|
if (op.hasClass('open')) {
|
|
2212
2210
|
op.removeClass('open');
|
|
2213
2211
|
op.find(' > .children').slideUp();
|
|
@@ -2229,7 +2227,7 @@ class SidebarItemComponent {
|
|
|
2229
2227
|
return false;
|
|
2230
2228
|
}
|
|
2231
2229
|
closeSidebar() {
|
|
2232
|
-
|
|
2230
|
+
$('#Sidebar').addClass('open').removeClass('close');
|
|
2233
2231
|
}
|
|
2234
2232
|
}
|
|
2235
2233
|
SidebarItemComponent.decorators = [
|
|
@@ -2353,7 +2351,7 @@ class SidebarComponent {
|
|
|
2353
2351
|
return null;
|
|
2354
2352
|
}
|
|
2355
2353
|
toggleSidebar() {
|
|
2356
|
-
|
|
2354
|
+
$('#Sidebar').toggleClass('open').toggleClass('close');
|
|
2357
2355
|
}
|
|
2358
2356
|
}
|
|
2359
2357
|
SidebarComponent.decorators = [
|
|
@@ -2583,13 +2581,13 @@ class TableRowComponent {
|
|
|
2583
2581
|
get type() { return InputType; }
|
|
2584
2582
|
get tableOptionType() { return TableOptionType; }
|
|
2585
2583
|
mouseOut(e) {
|
|
2586
|
-
|
|
2584
|
+
$(e.target).find('.options-con').removeClass('show-group');
|
|
2587
2585
|
}
|
|
2588
2586
|
ngOnInit() {
|
|
2589
2587
|
this.row.subTable = this.table.subTable != null ? HelperClass.clone(this.table.subTable) : null;
|
|
2590
2588
|
this.group = new InputClass(this.table.environment, this.table.l, 'ShowOptions', 'fas fa-ellipsis-vertical', InputType.Icon, 'blue m-h-5 h-25 d-ib va-m f-u');
|
|
2591
2589
|
this.group.onFocusIn = (e) => {
|
|
2592
|
-
|
|
2590
|
+
$(e.target).closest('.options-con').addClass('show-group');
|
|
2593
2591
|
};
|
|
2594
2592
|
this.group.onFocusOut = (e) => {
|
|
2595
2593
|
// $(e.target).closest('.options-con').removeClass('show-group');
|
|
@@ -2614,8 +2612,8 @@ class TableRowComponent {
|
|
|
2614
2612
|
this.showChildren = new InputClass(this.table.environment, this.table.l, this.table.name + 'SubsetTitle', 'fad fa-angle-left f-s-22', this.row.Data.CountChild > 0 || (!this.table.childrenAutoLoad && this.children.length > 0) || this.row.subTable != null ? InputType.Icon : InputType.Hidden, 'h-25 m-h-5 d-ib va-m f-u');
|
|
2615
2613
|
this.showChildren.onClick = () => {
|
|
2616
2614
|
var _a, _b;
|
|
2617
|
-
if (
|
|
2618
|
-
|
|
2615
|
+
if ($(this.childrenDiv.nativeElement).is(':visible')) {
|
|
2616
|
+
$(this.childrenDiv.nativeElement).slideUp();
|
|
2619
2617
|
this.showChildren.icon = 'fad fa-angle-left f-s-22';
|
|
2620
2618
|
}
|
|
2621
2619
|
else if (this.table.hasChildren && this.children.length === 0) {
|
|
@@ -2631,11 +2629,11 @@ class TableRowComponent {
|
|
|
2631
2629
|
ps.Accesses = (_b = (_a = this.table.permissions.Accesses) === null || _a === void 0 ? void 0 : _a.filter(x => x.ParentId === acc.Id)) !== null && _b !== void 0 ? _b : [];
|
|
2632
2630
|
this.row.subTable.permissions = ps;
|
|
2633
2631
|
this.row.subTable.set();
|
|
2634
|
-
|
|
2632
|
+
$(this.childrenDiv.nativeElement).slideDown();
|
|
2635
2633
|
this.showChildren.icon = 'fad fa-angle-down f-s-22';
|
|
2636
2634
|
}
|
|
2637
2635
|
else {
|
|
2638
|
-
|
|
2636
|
+
$(this.childrenDiv.nativeElement).slideDown();
|
|
2639
2637
|
this.showChildren.icon = 'fad fa-angle-down f-s-22';
|
|
2640
2638
|
}
|
|
2641
2639
|
};
|
|
@@ -2656,7 +2654,7 @@ class TableRowComponent {
|
|
|
2656
2654
|
new RequestClass(this.table.environment, this.table.l).send(this.table.url + `/${p}`, Method.Post, data, this.showChildren, (result) => {
|
|
2657
2655
|
this.children = result.List;
|
|
2658
2656
|
setTimeout(() => {
|
|
2659
|
-
|
|
2657
|
+
$(this.childrenDiv.nativeElement).slideDown();
|
|
2660
2658
|
this.showChildren.icon = 'fad fa-angle-down f-s-22';
|
|
2661
2659
|
}, 50);
|
|
2662
2660
|
}, () => { });
|
|
@@ -2677,14 +2675,14 @@ class TableRowComponent {
|
|
|
2677
2675
|
if (this.table.hasChildren) {
|
|
2678
2676
|
setTimeout(() => {
|
|
2679
2677
|
// @ts-ignore
|
|
2680
|
-
|
|
2678
|
+
$(this.childrenDiv.nativeElement).sortable({
|
|
2681
2679
|
axis: 'y',
|
|
2682
2680
|
items: '.row',
|
|
2683
2681
|
handle: '> .handle-con > .handle.handle-sortable',
|
|
2684
2682
|
update: () => {
|
|
2685
2683
|
const data = [];
|
|
2686
2684
|
// @ts-ignore
|
|
2687
|
-
|
|
2685
|
+
$(this.childrenDiv.nativeElement).sortable('toArray', { attribute: 'data-id' }).forEach(x => {
|
|
2688
2686
|
data.push(parseInt(x, 10));
|
|
2689
2687
|
});
|
|
2690
2688
|
const p = new PermissionClass();
|
|
@@ -2950,7 +2948,7 @@ class TableRowComponent {
|
|
|
2950
2948
|
}
|
|
2951
2949
|
selectRow(e) {
|
|
2952
2950
|
if (this.table.withSelect) {
|
|
2953
|
-
if (
|
|
2951
|
+
if ($(e.target).closest('.handle-con').hasClass('handle-con') || $(e.target).closest('.options-cell').hasClass('options-cell')) {
|
|
2954
2952
|
return;
|
|
2955
2953
|
}
|
|
2956
2954
|
const s = this.table.rows.find(x => x.selected);
|
|
@@ -2965,7 +2963,7 @@ class TableRowComponent {
|
|
|
2965
2963
|
}
|
|
2966
2964
|
dblclickRow(e) {
|
|
2967
2965
|
if (this.table.withSelect) {
|
|
2968
|
-
if (
|
|
2966
|
+
if ($(e.target).closest('.handle-con').hasClass('handle-con') || $(e.target).closest('.options-cell').hasClass('options-cell')) {
|
|
2969
2967
|
return;
|
|
2970
2968
|
}
|
|
2971
2969
|
const s = this.table.rows.find(x => x.selected);
|
|
@@ -3028,8 +3026,8 @@ class ModalClass {
|
|
|
3028
3026
|
if (this.onShow) {
|
|
3029
3027
|
this.onShow(data);
|
|
3030
3028
|
}
|
|
3031
|
-
|
|
3032
|
-
|
|
3029
|
+
$('body').addClass('open-modal');
|
|
3030
|
+
$('#' + this.id + 'Modal').fadeIn(300, () => {
|
|
3033
3031
|
if (this.form != null) {
|
|
3034
3032
|
if (this.form.onShowModal) {
|
|
3035
3033
|
this.form.onShowModal();
|
|
@@ -3039,8 +3037,8 @@ class ModalClass {
|
|
|
3039
3037
|
});
|
|
3040
3038
|
}
|
|
3041
3039
|
hide() {
|
|
3042
|
-
|
|
3043
|
-
|
|
3040
|
+
$('body').removeClass('open-modal');
|
|
3041
|
+
$('#' + this.id + 'Modal').fadeOut(300, () => {
|
|
3044
3042
|
if (this.onHide) {
|
|
3045
3043
|
this.onHide();
|
|
3046
3044
|
}
|
|
@@ -3128,7 +3126,7 @@ class TableComponent {
|
|
|
3128
3126
|
this.table.load(this.reload);
|
|
3129
3127
|
};
|
|
3130
3128
|
this.export.onClick = () => {
|
|
3131
|
-
|
|
3129
|
+
$(this.exportDropDown.nativeElement).slideToggle();
|
|
3132
3130
|
};
|
|
3133
3131
|
this.pdf.onClick = () => {
|
|
3134
3132
|
this.exportTable(TableExportType.Pdf, this.pdf);
|
|
@@ -3143,12 +3141,12 @@ class TableComponent {
|
|
|
3143
3141
|
this.exportTable(TableExportType.Print, this.print);
|
|
3144
3142
|
};
|
|
3145
3143
|
this.maximum.onClick = () => {
|
|
3146
|
-
|
|
3144
|
+
$(this.tableDiv.nativeElement).toggleClass('maximum');
|
|
3147
3145
|
this.maximum.icon = this.maximum.name === 'Minimum' ? 'fad fa-arrows-maximize' : 'fad fa-arrows-minimize';
|
|
3148
3146
|
this.maximum.name = this.maximum.name === 'Minimum' ? 'Maximum' : 'Minimum';
|
|
3149
3147
|
};
|
|
3150
3148
|
this.expertSearch.onClick = () => {
|
|
3151
|
-
|
|
3149
|
+
$(this.tableDiv.nativeElement).addClass('show-expert-search');
|
|
3152
3150
|
};
|
|
3153
3151
|
this.table.showConfirm = (l, url, data, accept) => {
|
|
3154
3152
|
this.confirm.show(l, url, data, accept);
|
|
@@ -3208,14 +3206,14 @@ class TableComponent {
|
|
|
3208
3206
|
setSortable() {
|
|
3209
3207
|
setTimeout(() => {
|
|
3210
3208
|
// @ts-ignore
|
|
3211
|
-
|
|
3209
|
+
$(this.rows.nativeElement).sortable({
|
|
3212
3210
|
axis: 'y',
|
|
3213
3211
|
items: '.row',
|
|
3214
3212
|
handle: '> .handle-con > .handle.handle-sortable',
|
|
3215
3213
|
update: () => {
|
|
3216
3214
|
const data = [];
|
|
3217
3215
|
// @ts-ignore
|
|
3218
|
-
|
|
3216
|
+
$(this.rows.nativeElement).sortable('toArray', { attribute: 'data-id' }).forEach(x => {
|
|
3219
3217
|
data.push(parseInt(x, 10));
|
|
3220
3218
|
});
|
|
3221
3219
|
const p = new PermissionClass();
|
|
@@ -3253,7 +3251,7 @@ class TableComponent {
|
|
|
3253
3251
|
this.confirm.show(this.table.l(e.action + 'Confirm'), e.url, e.data, e.accept);
|
|
3254
3252
|
}
|
|
3255
3253
|
changeSort(e, s) {
|
|
3256
|
-
if (
|
|
3254
|
+
if ($(e.target).closest('.header-search').hasClass('header-search')) {
|
|
3257
3255
|
return;
|
|
3258
3256
|
}
|
|
3259
3257
|
this.table.sortType = this.table.sort === s ? this.table.sortType === 'ASC' ? 'DESC' : null : 'ASC';
|
|
@@ -3264,8 +3262,8 @@ class TableComponent {
|
|
|
3264
3262
|
return this.table.optionsActions.filter(x => x instanceof ModalClass);
|
|
3265
3263
|
}
|
|
3266
3264
|
hideExpertSearch(e) {
|
|
3267
|
-
if (this.table.expertSearch &&
|
|
3268
|
-
|
|
3265
|
+
if (this.table.expertSearch && $(e.target).hasClass('search-form')) {
|
|
3266
|
+
$(this.tableDiv.nativeElement).removeClass('show-expert-search');
|
|
3269
3267
|
}
|
|
3270
3268
|
}
|
|
3271
3269
|
}
|
|
@@ -3427,10 +3425,10 @@ class FormBankCardComponent {
|
|
|
3427
3425
|
setIcon() {
|
|
3428
3426
|
const b = this.banks.filter(x => { var _a, _b; return x.startWith.includes(((_a = this.part1.data()) !== null && _a !== void 0 ? _a : '').toString() + ((_b = this.part2.data()) !== null && _b !== void 0 ? _b : '').toString().substring(0, 2)); });
|
|
3429
3427
|
if (b.length > 0) {
|
|
3430
|
-
|
|
3428
|
+
$(this.inputIcon.nativeElement).removeClass('fa-money-check').addClass(b[0].name);
|
|
3431
3429
|
}
|
|
3432
3430
|
else {
|
|
3433
|
-
|
|
3431
|
+
$(this.inputIcon.nativeElement).addClass('fa-money-check').removeClass(this.banks.map(x => x.name));
|
|
3434
3432
|
}
|
|
3435
3433
|
}
|
|
3436
3434
|
changeFocus(p, a) {
|
|
@@ -3511,7 +3509,7 @@ class FormButtonComponent {
|
|
|
3511
3509
|
};
|
|
3512
3510
|
}
|
|
3513
3511
|
onFocusIn() {
|
|
3514
|
-
|
|
3512
|
+
$(this.inputBase.nativeElement).focus();
|
|
3515
3513
|
}
|
|
3516
3514
|
onClick(e) {
|
|
3517
3515
|
if (e.screenX && e.screenX !== 0 && e.screenY && e.screenY !== 0) {
|
|
@@ -3689,7 +3687,7 @@ class FormDateComponent {
|
|
|
3689
3687
|
this.openCalendar();
|
|
3690
3688
|
};
|
|
3691
3689
|
this.inp.focusOut = () => {
|
|
3692
|
-
|
|
3690
|
+
$(this.inputBase.nativeElement).blur();
|
|
3693
3691
|
};
|
|
3694
3692
|
}
|
|
3695
3693
|
setInpValue(v) {
|
|
@@ -3814,16 +3812,16 @@ class FormDateComponent {
|
|
|
3814
3812
|
}
|
|
3815
3813
|
openCalendar() {
|
|
3816
3814
|
this.setPosition();
|
|
3817
|
-
|
|
3815
|
+
$(this.inputBase.nativeElement).focus();
|
|
3818
3816
|
}
|
|
3819
3817
|
onKeyDown(e) {
|
|
3820
3818
|
const code = e.keyCode || e.which;
|
|
3821
3819
|
if (code === 9 || code === 13) {
|
|
3822
3820
|
e.preventDefault();
|
|
3823
|
-
|
|
3821
|
+
$(this.inputDiv.nativeElement).removeClass('top');
|
|
3824
3822
|
this.changeIndex.emit(code === 9 ? e.shiftKey ? 'ShiftTab' : 'Tab' : e.shiftKey ? 'ShiftEnter' : 'Enter');
|
|
3825
3823
|
if (!this.inForm) {
|
|
3826
|
-
|
|
3824
|
+
$(this.inputBase.nativeElement).blur();
|
|
3827
3825
|
}
|
|
3828
3826
|
}
|
|
3829
3827
|
}
|
|
@@ -3861,7 +3859,7 @@ class FormDateComponent {
|
|
|
3861
3859
|
}
|
|
3862
3860
|
}
|
|
3863
3861
|
onFocusOut() {
|
|
3864
|
-
|
|
3862
|
+
$(this.inputDiv.nativeElement).removeClass('top');
|
|
3865
3863
|
this.inp.search = this.inp.value != null ?
|
|
3866
3864
|
(this.inp.type === InputType.Year ?
|
|
3867
3865
|
moment(this.inp.value, 'jYYYY/jMM/jDD').locale('fa').format('jYYYY') :
|
|
@@ -3876,10 +3874,10 @@ class FormDateComponent {
|
|
|
3876
3874
|
const offsetOfBottom = window.innerHeight - rect.bottom;
|
|
3877
3875
|
const height = this.inputCalendarDiv.nativeElement.offsetHeight;
|
|
3878
3876
|
if (offsetOfBottom < height) {
|
|
3879
|
-
|
|
3877
|
+
$(this.inputDiv.nativeElement).addClass('top');
|
|
3880
3878
|
}
|
|
3881
3879
|
else {
|
|
3882
|
-
|
|
3880
|
+
$(this.inputDiv.nativeElement).removeClass('top');
|
|
3883
3881
|
}
|
|
3884
3882
|
}
|
|
3885
3883
|
selectDate(d) {
|
|
@@ -3894,10 +3892,10 @@ class FormDateComponent {
|
|
|
3894
3892
|
d.selected = true;
|
|
3895
3893
|
this.cSearch = this.inp.search;
|
|
3896
3894
|
setTimeout(() => {
|
|
3897
|
-
|
|
3895
|
+
$(this.inputDiv.nativeElement).removeClass('top');
|
|
3898
3896
|
this.changeIndex.emit('Tab');
|
|
3899
3897
|
if (!this.inForm) {
|
|
3900
|
-
|
|
3898
|
+
$(this.inputBase.nativeElement).blur();
|
|
3901
3899
|
}
|
|
3902
3900
|
}, 10);
|
|
3903
3901
|
if (this.inp.onChange) {
|
|
@@ -4117,7 +4115,7 @@ class FormFileComponent {
|
|
|
4117
4115
|
});
|
|
4118
4116
|
}
|
|
4119
4117
|
onClick() {
|
|
4120
|
-
|
|
4118
|
+
$(this.inputBase.nativeElement).focus();
|
|
4121
4119
|
}
|
|
4122
4120
|
onChange(e) {
|
|
4123
4121
|
this.inp.error = null;
|
|
@@ -4136,7 +4134,7 @@ class FormFileComponent {
|
|
|
4136
4134
|
}
|
|
4137
4135
|
}
|
|
4138
4136
|
onFocusIn() {
|
|
4139
|
-
|
|
4137
|
+
$(this.inputBase.nativeElement).focus();
|
|
4140
4138
|
}
|
|
4141
4139
|
title() {
|
|
4142
4140
|
if (this.inp.value == null || (this.inp.value instanceof Array && this.inp.value.length === 0)) {
|
|
@@ -4178,7 +4176,7 @@ class FormIconComponent {
|
|
|
4178
4176
|
};
|
|
4179
4177
|
}
|
|
4180
4178
|
onFocusIn(e = null) {
|
|
4181
|
-
|
|
4179
|
+
$(this.inputBase.nativeElement).focus();
|
|
4182
4180
|
if (this.inp.onFocusIn) {
|
|
4183
4181
|
this.inp.onFocusIn(e);
|
|
4184
4182
|
}
|
|
@@ -4505,8 +4503,8 @@ class FormPlaqueSelectComponent {
|
|
|
4505
4503
|
};
|
|
4506
4504
|
}
|
|
4507
4505
|
onFocusOutCloseOptions(e) {
|
|
4508
|
-
if (
|
|
4509
|
-
if (
|
|
4506
|
+
if ($(e.relatedTarget).length !== 0 || $(e.rangeParent).length !== 0) {
|
|
4507
|
+
if (!$(e.relatedTarget).closest('.form-input.plaque-select').hasClass('plaque-select') && !$(e.rangeParent).closest('.form-input.plaque-select').hasClass('plaque-select')) {
|
|
4510
4508
|
if (this.open) {
|
|
4511
4509
|
this.closeOptions();
|
|
4512
4510
|
}
|
|
@@ -4539,7 +4537,7 @@ class FormPlaqueSelectComponent {
|
|
|
4539
4537
|
closeOptions() {
|
|
4540
4538
|
setTimeout(() => {
|
|
4541
4539
|
this.open = false;
|
|
4542
|
-
|
|
4540
|
+
$(this.inputDiv.nativeElement).removeClass('top');
|
|
4543
4541
|
this.removeHover();
|
|
4544
4542
|
if (this.inp.value === null) {
|
|
4545
4543
|
this.inp.search = '';
|
|
@@ -4557,10 +4555,10 @@ class FormPlaqueSelectComponent {
|
|
|
4557
4555
|
const offsetOfBottom = window.innerHeight - rect.bottom;
|
|
4558
4556
|
const height = this.inputOptionsDiv.nativeElement.offsetHeight;
|
|
4559
4557
|
if (offsetOfBottom < height) {
|
|
4560
|
-
|
|
4558
|
+
$(this.inputDiv.nativeElement).addClass('top');
|
|
4561
4559
|
}
|
|
4562
4560
|
else {
|
|
4563
|
-
|
|
4561
|
+
$(this.inputDiv.nativeElement).removeClass('top');
|
|
4564
4562
|
}
|
|
4565
4563
|
}
|
|
4566
4564
|
onKeyDown(e) {
|
|
@@ -5107,7 +5105,7 @@ class FormRadioComponent {
|
|
|
5107
5105
|
}
|
|
5108
5106
|
}
|
|
5109
5107
|
onFocusIn() {
|
|
5110
|
-
|
|
5108
|
+
$(this.inputBase.nativeElement).focus();
|
|
5111
5109
|
}
|
|
5112
5110
|
}
|
|
5113
5111
|
FormRadioComponent.decorators = [
|
|
@@ -5221,7 +5219,7 @@ class FormSelectComponent {
|
|
|
5221
5219
|
return d;
|
|
5222
5220
|
};
|
|
5223
5221
|
this.inp.focusOut = () => {
|
|
5224
|
-
|
|
5222
|
+
$(this.inputBase.nativeElement).blur();
|
|
5225
5223
|
};
|
|
5226
5224
|
if (this.inp.hasBarcodeReader) {
|
|
5227
5225
|
HelperClass.setBarcodeReader(this.inp);
|
|
@@ -5259,14 +5257,14 @@ class FormSelectComponent {
|
|
|
5259
5257
|
openOptions() {
|
|
5260
5258
|
this.setPosition();
|
|
5261
5259
|
this.setHoverCenter();
|
|
5262
|
-
|
|
5260
|
+
$(this.inputBase.nativeElement).focus();
|
|
5263
5261
|
}
|
|
5264
5262
|
onFocusOut() {
|
|
5265
5263
|
this.closeOptions();
|
|
5266
5264
|
}
|
|
5267
5265
|
closeOptions() {
|
|
5268
5266
|
setTimeout(() => {
|
|
5269
|
-
|
|
5267
|
+
$(this.inputDiv.nativeElement).removeClass('top');
|
|
5270
5268
|
this.removeHover();
|
|
5271
5269
|
if (this.inp.value === null) {
|
|
5272
5270
|
if (!this.inp.addNew) {
|
|
@@ -5287,10 +5285,10 @@ class FormSelectComponent {
|
|
|
5287
5285
|
const offsetOfBottom = window.innerHeight - rect.bottom;
|
|
5288
5286
|
const height = this.inputOptionsDiv.nativeElement.offsetHeight;
|
|
5289
5287
|
if (offsetOfBottom < height) {
|
|
5290
|
-
|
|
5288
|
+
$(this.inputDiv.nativeElement).addClass('top');
|
|
5291
5289
|
}
|
|
5292
5290
|
else {
|
|
5293
|
-
|
|
5291
|
+
$(this.inputDiv.nativeElement).removeClass('top');
|
|
5294
5292
|
}
|
|
5295
5293
|
}
|
|
5296
5294
|
setOptions(r = this.inp.options) {
|
|
@@ -5308,7 +5306,7 @@ class FormSelectComponent {
|
|
|
5308
5306
|
}
|
|
5309
5307
|
else if (code === 13) {
|
|
5310
5308
|
e.preventDefault();
|
|
5311
|
-
if (
|
|
5309
|
+
if ($(this.inputBase.nativeElement).is(':focus')) {
|
|
5312
5310
|
const h = this.getSelectedHover();
|
|
5313
5311
|
if (!h) {
|
|
5314
5312
|
if (this.inp.addNew) {
|
|
@@ -5332,7 +5330,7 @@ class FormSelectComponent {
|
|
|
5332
5330
|
}
|
|
5333
5331
|
}
|
|
5334
5332
|
toggleOption(e) {
|
|
5335
|
-
if ((this.inp.multiple || this.inp.type === InputType.SelectSearchRadio) &&
|
|
5333
|
+
if ((this.inp.multiple || this.inp.type === InputType.SelectSearchRadio) && $(e.target).closest('.option').hasClass('option')) {
|
|
5336
5334
|
return;
|
|
5337
5335
|
}
|
|
5338
5336
|
this.openOptions();
|
|
@@ -5478,7 +5476,7 @@ class FormSelectComponent {
|
|
|
5478
5476
|
setTimeout(() => {
|
|
5479
5477
|
this.changeIndex.emit(i);
|
|
5480
5478
|
if (!this.inForm) {
|
|
5481
|
-
|
|
5479
|
+
$(this.inputBase.nativeElement).blur();
|
|
5482
5480
|
}
|
|
5483
5481
|
}, 10);
|
|
5484
5482
|
setTimeout(() => {
|
|
@@ -6049,7 +6047,7 @@ class FormTimeComponent {
|
|
|
6049
6047
|
this.openOptions();
|
|
6050
6048
|
};
|
|
6051
6049
|
this.inp.focusOut = () => {
|
|
6052
|
-
|
|
6050
|
+
$(this.inputBase.nativeElement).blur();
|
|
6053
6051
|
};
|
|
6054
6052
|
}
|
|
6055
6053
|
toggleTime() {
|
|
@@ -6057,27 +6055,27 @@ class FormTimeComponent {
|
|
|
6057
6055
|
}
|
|
6058
6056
|
openOptions() {
|
|
6059
6057
|
this.setPosition();
|
|
6060
|
-
|
|
6058
|
+
$(this.inputBase.nativeElement).focus();
|
|
6061
6059
|
}
|
|
6062
6060
|
setPosition() {
|
|
6063
6061
|
const rect = this.inputDiv.nativeElement.getBoundingClientRect();
|
|
6064
6062
|
const offsetOfBottom = window.innerHeight - rect.bottom;
|
|
6065
6063
|
const height = this.inputOptionsDiv.nativeElement.offsetHeight;
|
|
6066
6064
|
if (offsetOfBottom < height) {
|
|
6067
|
-
|
|
6065
|
+
$(this.inputDiv.nativeElement).addClass('top');
|
|
6068
6066
|
}
|
|
6069
6067
|
else {
|
|
6070
|
-
|
|
6068
|
+
$(this.inputDiv.nativeElement).removeClass('top');
|
|
6071
6069
|
}
|
|
6072
6070
|
}
|
|
6073
6071
|
onKeyDown(e) {
|
|
6074
6072
|
const code = e.keyCode || e.which;
|
|
6075
6073
|
if (code === 9 || code === 13) {
|
|
6076
6074
|
e.preventDefault();
|
|
6077
|
-
|
|
6075
|
+
$(this.inputDiv.nativeElement).removeClass('top');
|
|
6078
6076
|
this.changeIndex.emit(code === 9 ? e.shiftKey ? 'ShiftTab' : 'Tab' : e.shiftKey ? 'ShiftEnter' : 'Enter');
|
|
6079
6077
|
if (!this.inForm) {
|
|
6080
|
-
|
|
6078
|
+
$(this.inputBase.nativeElement).blur();
|
|
6081
6079
|
}
|
|
6082
6080
|
}
|
|
6083
6081
|
}
|
|
@@ -6100,7 +6098,7 @@ class FormTimeComponent {
|
|
|
6100
6098
|
}
|
|
6101
6099
|
}
|
|
6102
6100
|
onFocusOut() {
|
|
6103
|
-
|
|
6101
|
+
$(this.inputDiv.nativeElement).removeClass('top');
|
|
6104
6102
|
this.inp.search = this.inp.value;
|
|
6105
6103
|
}
|
|
6106
6104
|
selectTime(v, s) {
|
|
@@ -6148,8 +6146,8 @@ class FormTreeItemComponent {
|
|
|
6148
6146
|
this.item.parent = this.parent;
|
|
6149
6147
|
}
|
|
6150
6148
|
openClose(e) {
|
|
6151
|
-
const ch =
|
|
6152
|
-
const oc =
|
|
6149
|
+
const ch = $(e.target).closest('.row-item').find(' > .children');
|
|
6150
|
+
const oc = $(e.target).closest('.row-item').find(' > .open-close');
|
|
6153
6151
|
if (ch.hasClass('open')) {
|
|
6154
6152
|
ch.removeClass('open');
|
|
6155
6153
|
ch.stop().slideUp();
|
|
@@ -6227,7 +6225,7 @@ class FormTreeComponent {
|
|
|
6227
6225
|
}
|
|
6228
6226
|
}
|
|
6229
6227
|
onFocusIn() {
|
|
6230
|
-
|
|
6228
|
+
$(this.inputBase.nativeElement).focus();
|
|
6231
6229
|
}
|
|
6232
6230
|
getSelected() {
|
|
6233
6231
|
let l = [];
|
|
@@ -7395,7 +7393,7 @@ class FormStarComponent {
|
|
|
7395
7393
|
this.onFocusIn();
|
|
7396
7394
|
}
|
|
7397
7395
|
onFocusIn() {
|
|
7398
|
-
|
|
7396
|
+
$(this.inputBase.nativeElement).focus();
|
|
7399
7397
|
}
|
|
7400
7398
|
onKeyDown(e) {
|
|
7401
7399
|
const code = e.keyCode || e.which;
|
|
@@ -7470,7 +7468,7 @@ class FormTagComponent {
|
|
|
7470
7468
|
}
|
|
7471
7469
|
}
|
|
7472
7470
|
onKeyDown(e) {
|
|
7473
|
-
const v =
|
|
7471
|
+
const v = $(this.inputBase.nativeElement);
|
|
7474
7472
|
if (this.inp.onKeyDown) {
|
|
7475
7473
|
this.inp.onKeyDown(e);
|
|
7476
7474
|
}
|
|
@@ -7493,7 +7491,7 @@ class FormTagComponent {
|
|
|
7493
7491
|
this.inp.error = null;
|
|
7494
7492
|
}
|
|
7495
7493
|
onFocusOut() {
|
|
7496
|
-
const v =
|
|
7494
|
+
const v = $(this.inputBase.nativeElement);
|
|
7497
7495
|
this.setValue(v);
|
|
7498
7496
|
}
|
|
7499
7497
|
removeTag(t) {
|
|
@@ -7768,7 +7766,7 @@ class FormUploaderComponent {
|
|
|
7768
7766
|
});
|
|
7769
7767
|
}
|
|
7770
7768
|
onClick() {
|
|
7771
|
-
|
|
7769
|
+
$(this.inputBase.nativeElement).focus();
|
|
7772
7770
|
}
|
|
7773
7771
|
onChange(e) {
|
|
7774
7772
|
var _a, _b;
|
|
@@ -7802,7 +7800,7 @@ class FormUploaderComponent {
|
|
|
7802
7800
|
}
|
|
7803
7801
|
}
|
|
7804
7802
|
onFocusIn() {
|
|
7805
|
-
|
|
7803
|
+
$(this.inputBase.nativeElement).focus();
|
|
7806
7804
|
}
|
|
7807
7805
|
title() {
|
|
7808
7806
|
if (this.inp.value == null || (this.inp.value instanceof Array && this.inp.value.length === 0)) {
|
|
@@ -7896,7 +7894,7 @@ class FormSlideComponent {
|
|
|
7896
7894
|
}
|
|
7897
7895
|
}
|
|
7898
7896
|
onFocusIn() {
|
|
7899
|
-
|
|
7897
|
+
$(this.inputBase.nativeElement).focus();
|
|
7900
7898
|
}
|
|
7901
7899
|
}
|
|
7902
7900
|
FormSlideComponent.decorators = [
|
|
@@ -8456,7 +8454,7 @@ class TableClass {
|
|
|
8456
8454
|
p.Area = this.permissions.Area;
|
|
8457
8455
|
p.Controller = 'print';
|
|
8458
8456
|
p.Action = this.permissions.Controller + (this.permissions.Action ? this.permissions.Action : '');
|
|
8459
|
-
const params = param(this.searchData(true));
|
|
8457
|
+
const params = $.param(this.searchData(true));
|
|
8460
8458
|
const u = this.getUrl(access.Url);
|
|
8461
8459
|
window.open('/report' + u + (params ? (u.includes('?') ? '&' : '?') + params : ''), '_blank');
|
|
8462
8460
|
};
|