ps-toolkit-ui 1.3.61 → 1.3.64
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 +11 -10
- 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/components/form/car/form.car.component.js +5 -1
- package/esm2015/lib/components/form/plaque/form.plaque.component.js +3 -5
- package/fesm2015/ps-toolkit-ui.js +76 -74
- package/fesm2015/ps-toolkit-ui.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Inject, Component, Input, EventEmitter, Output, ViewChild, Pipe, NgModule, Injectable } from '@angular/core';
|
|
2
|
-
import * as
|
|
2
|
+
import * as $$1 from 'jquery';
|
|
3
3
|
import { ajax, param } from 'jquery';
|
|
4
4
|
import { merge, get, set, cloneDeep } from 'lodash';
|
|
5
5
|
import * as moment from 'jalali-moment';
|
|
@@ -27,9 +27,9 @@ class AccordionComponent {
|
|
|
27
27
|
constructor() {
|
|
28
28
|
}
|
|
29
29
|
toggle(e) {
|
|
30
|
-
const chOpen =
|
|
30
|
+
const chOpen = $$1(e.target).closest('.accordion').find('.content.open');
|
|
31
31
|
const ocOpen = chOpen.closest('.accordion-item').find('.header > .icon');
|
|
32
|
-
const ch =
|
|
32
|
+
const ch = $$1(e.target).closest('.accordion-item').find(' > .content');
|
|
33
33
|
const oc = ch.closest('.accordion-item').find(' > .header > .icon');
|
|
34
34
|
if (ch.hasClass('open')) {
|
|
35
35
|
ch.removeClass('open');
|
|
@@ -787,9 +787,9 @@ class HelperClass {
|
|
|
787
787
|
static addNotification(m, e = true) {
|
|
788
788
|
const id = HelperClass.random(20);
|
|
789
789
|
// tslint:disable-next-line
|
|
790
|
-
|
|
790
|
+
$$1('#Notifications').append('<div id="' + id + '" class="con"><div class="item ' + (e ? 'error' : 'success') + '"><i class="fas fa-times"></i><div>' + m + '</div></div></div>');
|
|
791
791
|
setTimeout(() => {
|
|
792
|
-
const d =
|
|
792
|
+
const d = $$1('#' + id);
|
|
793
793
|
d.fadeOut(300, () => {
|
|
794
794
|
d.remove();
|
|
795
795
|
});
|
|
@@ -1497,13 +1497,13 @@ class AccordionRowClass {
|
|
|
1497
1497
|
}
|
|
1498
1498
|
toggle() {
|
|
1499
1499
|
setTimeout(() => {
|
|
1500
|
-
|
|
1500
|
+
$$1('#AccordionRow' + this.id + ' > .header').click();
|
|
1501
1501
|
}, 100);
|
|
1502
1502
|
}
|
|
1503
1503
|
open() {
|
|
1504
1504
|
setTimeout(() => {
|
|
1505
|
-
if (
|
|
1506
|
-
|
|
1505
|
+
if (!$$1('#AccordionRow' + this.id + ' > .content').hasClass('open')) {
|
|
1506
|
+
$$1('#AccordionRow' + this.id + ' > .header').click();
|
|
1507
1507
|
}
|
|
1508
1508
|
}, 100);
|
|
1509
1509
|
}
|
|
@@ -1523,7 +1523,7 @@ class HeaderComponent {
|
|
|
1523
1523
|
};
|
|
1524
1524
|
}
|
|
1525
1525
|
showUserDropDown(e) {
|
|
1526
|
-
|
|
1526
|
+
$$1(e.target).closest('#Header').find('.user-drop-down').slideToggle(100);
|
|
1527
1527
|
}
|
|
1528
1528
|
}
|
|
1529
1529
|
HeaderComponent.decorators = [
|
|
@@ -1571,7 +1571,7 @@ class SidebarItemComponent {
|
|
|
1571
1571
|
};
|
|
1572
1572
|
}
|
|
1573
1573
|
openClose(e) {
|
|
1574
|
-
const op =
|
|
1574
|
+
const op = $$1(e.target).closest('.user-sidebar-item');
|
|
1575
1575
|
if (op.hasClass('open')) {
|
|
1576
1576
|
op.removeClass('open');
|
|
1577
1577
|
op.find(' > .children').slideUp();
|
|
@@ -1593,7 +1593,7 @@ class SidebarItemComponent {
|
|
|
1593
1593
|
return false;
|
|
1594
1594
|
}
|
|
1595
1595
|
closeSidebar() {
|
|
1596
|
-
|
|
1596
|
+
$$1('#Sidebar').addClass('open').removeClass('close');
|
|
1597
1597
|
}
|
|
1598
1598
|
}
|
|
1599
1599
|
SidebarItemComponent.decorators = [
|
|
@@ -1670,7 +1670,7 @@ class SidebarComponent {
|
|
|
1670
1670
|
return null;
|
|
1671
1671
|
}
|
|
1672
1672
|
toggleSidebar() {
|
|
1673
|
-
|
|
1673
|
+
$$1('#Sidebar').toggleClass('open').toggleClass('close');
|
|
1674
1674
|
}
|
|
1675
1675
|
}
|
|
1676
1676
|
SidebarComponent.decorators = [
|
|
@@ -1940,15 +1940,15 @@ class TableRowComponent {
|
|
|
1940
1940
|
}
|
|
1941
1941
|
this.showChildren = new InputClass(this.table.environment, this.table.l, this.table.name + 'SubsetTitle', 'fa-duotone fa-angle-left f-s-22', this.row.Data.CountChild > 0 || (!this.table.childrenAutoLoad && this.children.length > 0) ? InputType.Icon : InputType.Hidden, 'h-25 m-h-5 d-ib va-m f-u');
|
|
1942
1942
|
this.showChildren.onClick = () => {
|
|
1943
|
-
if (
|
|
1944
|
-
|
|
1943
|
+
if ($$1(this.childrenDiv.nativeElement).is(':visible')) {
|
|
1944
|
+
$$1(this.childrenDiv.nativeElement).slideUp();
|
|
1945
1945
|
this.showChildren.icon = 'fa-duotone fa-angle-left f-s-22';
|
|
1946
1946
|
}
|
|
1947
1947
|
else if (this.children.length === 0) {
|
|
1948
1948
|
this.loadChildren(this.row.Data.Id);
|
|
1949
1949
|
}
|
|
1950
1950
|
else {
|
|
1951
|
-
|
|
1951
|
+
$$1(this.childrenDiv.nativeElement).slideDown();
|
|
1952
1952
|
this.showChildren.icon = 'fa-duotone fa-angle-down f-s-22';
|
|
1953
1953
|
}
|
|
1954
1954
|
};
|
|
@@ -1972,7 +1972,7 @@ class TableRowComponent {
|
|
|
1972
1972
|
new RequestClass(this.table.environment, this.table.l).send(this.table.url + `List/${p}`, Method.Post, null, this.showChildren, (result) => {
|
|
1973
1973
|
this.children = result.List;
|
|
1974
1974
|
setTimeout(() => {
|
|
1975
|
-
|
|
1975
|
+
$$1(this.childrenDiv.nativeElement).slideDown();
|
|
1976
1976
|
this.showChildren.icon = 'fa-duotone fa-angle-down f-s-22';
|
|
1977
1977
|
}, 50);
|
|
1978
1978
|
});
|
|
@@ -1990,13 +1990,13 @@ class TableRowComponent {
|
|
|
1990
1990
|
setTimeout(() => {
|
|
1991
1991
|
if (this.table.hasChildren) {
|
|
1992
1992
|
// @ts-ignore
|
|
1993
|
-
|
|
1993
|
+
$$1(this.childrenDiv.nativeElement).sortable({
|
|
1994
1994
|
axis: 'y',
|
|
1995
1995
|
handle: '> .row > .item-con > .handle-sortable',
|
|
1996
1996
|
update: () => {
|
|
1997
1997
|
const data = [];
|
|
1998
1998
|
// @ts-ignore
|
|
1999
|
-
|
|
1999
|
+
$$1(this.childrenDiv.nativeElement).sortable('toArray').forEach(x => data.push(x));
|
|
2000
2000
|
new RequestClass(this.table.l).send(this.table.url + 'Sort', Method.Post, data, null, () => {
|
|
2001
2001
|
if (this.table.onSort) {
|
|
2002
2002
|
this.table.onSort();
|
|
@@ -2328,8 +2328,8 @@ class ModalClass {
|
|
|
2328
2328
|
if (this.onShow) {
|
|
2329
2329
|
this.onShow();
|
|
2330
2330
|
}
|
|
2331
|
-
|
|
2332
|
-
|
|
2331
|
+
$$1('body').addClass('open-modal');
|
|
2332
|
+
$$1('#' + this.id + 'Modal').fadeIn(300, () => {
|
|
2333
2333
|
if (this.form != null) {
|
|
2334
2334
|
const i = this.form.inputs.find(x => !x.disabled && x.type !== InputType.Label && x.type !== InputType.Hidden &&
|
|
2335
2335
|
x.type !== InputType.Constant && x.type !== InputType.Submit && x.type !== InputType.Button && x.type !== InputType.Icon &&
|
|
@@ -2341,8 +2341,8 @@ class ModalClass {
|
|
|
2341
2341
|
});
|
|
2342
2342
|
}
|
|
2343
2343
|
hide() {
|
|
2344
|
-
|
|
2345
|
-
|
|
2344
|
+
$$1('body').removeClass('open-modal');
|
|
2345
|
+
$$1('#' + this.id + 'Modal').fadeOut(300, () => {
|
|
2346
2346
|
if (this.form && this.form.name !== 'Confirm' && this.form.name !== 'Alert') {
|
|
2347
2347
|
this.form.clear();
|
|
2348
2348
|
if (this.form.onHideModal) {
|
|
@@ -2424,7 +2424,7 @@ class TableComponent {
|
|
|
2424
2424
|
this.table.load(this.reload);
|
|
2425
2425
|
};
|
|
2426
2426
|
this.maximum.onClick = () => {
|
|
2427
|
-
|
|
2427
|
+
$$1(this.tableDiv.nativeElement).toggleClass('maximum');
|
|
2428
2428
|
this.maximum.icon = this.maximum.name === 'Minimum' ? 'fa-duotone fa-arrows-maximize' : 'fa-duotone fa-arrows-minimize';
|
|
2429
2429
|
this.maximum.name = this.maximum.name === 'Minimum' ? 'Maximum' : 'Minimum';
|
|
2430
2430
|
};
|
|
@@ -2463,13 +2463,13 @@ class TableComponent {
|
|
|
2463
2463
|
setSortable() {
|
|
2464
2464
|
setTimeout(() => {
|
|
2465
2465
|
// @ts-ignore
|
|
2466
|
-
|
|
2466
|
+
$$1(this.rows.nativeElement).sortable({
|
|
2467
2467
|
axis: 'y',
|
|
2468
2468
|
items: 'tr',
|
|
2469
2469
|
update: () => {
|
|
2470
2470
|
const data = [];
|
|
2471
2471
|
// @ts-ignore
|
|
2472
|
-
|
|
2472
|
+
$$1(this.rows.nativeElement).sortable('toArray').forEach(x => data.push(x));
|
|
2473
2473
|
new RequestClass(this.table.l).send(this.table.url + 'Sort', Method.Post, { Ids: data }, null, () => {
|
|
2474
2474
|
if (this.table.onSort) {
|
|
2475
2475
|
this.table.onSort();
|
|
@@ -2500,7 +2500,7 @@ class TableComponent {
|
|
|
2500
2500
|
this.confirm.show(this.table.l('DeleteConfirm'), this.table.url + 'Delete/' + e.id, null, e.accept);
|
|
2501
2501
|
}
|
|
2502
2502
|
changeSort(e, s) {
|
|
2503
|
-
if (
|
|
2503
|
+
if ($$1(e.target).closest('.header-search').hasClass('header-search')) {
|
|
2504
2504
|
return;
|
|
2505
2505
|
}
|
|
2506
2506
|
this.table.sortType = this.table.sort === s ? this.table.sortType === 'ASC' ? 'DESC' : 'ASC' : 'ASC';
|
|
@@ -2669,10 +2669,10 @@ class FormBankCardComponent {
|
|
|
2669
2669
|
setIcon() {
|
|
2670
2670
|
const b = this.banks.filter(x => x.startWith.includes(this.part1.data().toString() + this.part2.data().toString().substring(0, 2)));
|
|
2671
2671
|
if (b.length > 0) {
|
|
2672
|
-
|
|
2672
|
+
$$1(this.inputIcon.nativeElement).removeClass('fa-money-check').addClass(b[0].name);
|
|
2673
2673
|
}
|
|
2674
2674
|
else {
|
|
2675
|
-
|
|
2675
|
+
$$1(this.inputIcon.nativeElement).addClass('fa-money-check').removeClass(this.banks.map(x => x.name));
|
|
2676
2676
|
}
|
|
2677
2677
|
}
|
|
2678
2678
|
changeFocus(p, a) {
|
|
@@ -2753,7 +2753,7 @@ class FormButtonComponent {
|
|
|
2753
2753
|
};
|
|
2754
2754
|
}
|
|
2755
2755
|
onFocusIn() {
|
|
2756
|
-
|
|
2756
|
+
$$1(this.inputBase.nativeElement).focus();
|
|
2757
2757
|
}
|
|
2758
2758
|
onClick(e) {
|
|
2759
2759
|
if (e.screenX && e.screenX !== 0 && e.screenY && e.screenY !== 0) {
|
|
@@ -2926,7 +2926,7 @@ class FormDateComponent {
|
|
|
2926
2926
|
this.openCalendar();
|
|
2927
2927
|
};
|
|
2928
2928
|
this.inp.focusOut = () => {
|
|
2929
|
-
|
|
2929
|
+
$$1(this.inputBase.nativeElement).blur();
|
|
2930
2930
|
};
|
|
2931
2931
|
}
|
|
2932
2932
|
setInpValue(v) {
|
|
@@ -3011,16 +3011,16 @@ class FormDateComponent {
|
|
|
3011
3011
|
}
|
|
3012
3012
|
openCalendar() {
|
|
3013
3013
|
this.setPosition();
|
|
3014
|
-
|
|
3014
|
+
$$1(this.inputBase.nativeElement).focus();
|
|
3015
3015
|
}
|
|
3016
3016
|
onKeyDown(e) {
|
|
3017
3017
|
const code = e.keyCode || e.which;
|
|
3018
3018
|
if (code === 9 || code === 13) {
|
|
3019
3019
|
e.preventDefault();
|
|
3020
|
-
|
|
3020
|
+
$$1(this.inputDiv.nativeElement).removeClass('top');
|
|
3021
3021
|
this.changeIndex.emit(code === 9 ? e.shiftKey ? 'ShiftTab' : 'Tab' : e.shiftKey ? 'ShiftEnter' : 'Enter');
|
|
3022
3022
|
if (!this.inForm) {
|
|
3023
|
-
|
|
3023
|
+
$$1(this.inputBase.nativeElement).blur();
|
|
3024
3024
|
}
|
|
3025
3025
|
}
|
|
3026
3026
|
}
|
|
@@ -3052,7 +3052,7 @@ class FormDateComponent {
|
|
|
3052
3052
|
}
|
|
3053
3053
|
}
|
|
3054
3054
|
onFocusOut() {
|
|
3055
|
-
|
|
3055
|
+
$$1(this.inputDiv.nativeElement).removeClass('top');
|
|
3056
3056
|
this.inp.search = this.inp.value;
|
|
3057
3057
|
this.state = 'day';
|
|
3058
3058
|
}
|
|
@@ -3061,10 +3061,10 @@ class FormDateComponent {
|
|
|
3061
3061
|
const offsetOfBottom = window.innerHeight - rect.bottom;
|
|
3062
3062
|
const height = this.inputCalendarDiv.nativeElement.offsetHeight;
|
|
3063
3063
|
if (offsetOfBottom < height) {
|
|
3064
|
-
|
|
3064
|
+
$$1(this.inputDiv.nativeElement).addClass('top');
|
|
3065
3065
|
}
|
|
3066
3066
|
else {
|
|
3067
|
-
|
|
3067
|
+
$$1(this.inputDiv.nativeElement).removeClass('top');
|
|
3068
3068
|
}
|
|
3069
3069
|
}
|
|
3070
3070
|
selectDate(d) {
|
|
@@ -3079,10 +3079,10 @@ class FormDateComponent {
|
|
|
3079
3079
|
d.selected = true;
|
|
3080
3080
|
this.cSearch = this.inp.search;
|
|
3081
3081
|
setTimeout(() => {
|
|
3082
|
-
|
|
3082
|
+
$$1(this.inputDiv.nativeElement).removeClass('top');
|
|
3083
3083
|
this.changeIndex.emit('Tab');
|
|
3084
3084
|
if (!this.inForm) {
|
|
3085
|
-
|
|
3085
|
+
$$1(this.inputBase.nativeElement).blur();
|
|
3086
3086
|
}
|
|
3087
3087
|
}, 10);
|
|
3088
3088
|
if (this.inp.onChange) {
|
|
@@ -3307,7 +3307,7 @@ class FormFileComponent {
|
|
|
3307
3307
|
});
|
|
3308
3308
|
}
|
|
3309
3309
|
onClick() {
|
|
3310
|
-
|
|
3310
|
+
$$1(this.inputBase.nativeElement).focus();
|
|
3311
3311
|
}
|
|
3312
3312
|
onChange(e) {
|
|
3313
3313
|
this.inp.error = null;
|
|
@@ -3326,7 +3326,7 @@ class FormFileComponent {
|
|
|
3326
3326
|
}
|
|
3327
3327
|
}
|
|
3328
3328
|
onFocusIn() {
|
|
3329
|
-
|
|
3329
|
+
$$1(this.inputBase.nativeElement).focus();
|
|
3330
3330
|
}
|
|
3331
3331
|
title() {
|
|
3332
3332
|
if (this.inp.value == null || (this.inp.value instanceof Array && this.inp.value.length === 0)) {
|
|
@@ -3368,7 +3368,7 @@ class FormIconComponent {
|
|
|
3368
3368
|
};
|
|
3369
3369
|
}
|
|
3370
3370
|
onFocusIn() {
|
|
3371
|
-
|
|
3371
|
+
$$1(this.inputBase.nativeElement).focus();
|
|
3372
3372
|
}
|
|
3373
3373
|
onClick(e) {
|
|
3374
3374
|
if (e.screenX && e.screenX !== 0 && e.screenY && e.screenY !== 0) {
|
|
@@ -3622,28 +3622,28 @@ class FormPlaqueSelectComponent {
|
|
|
3622
3622
|
}
|
|
3623
3623
|
};
|
|
3624
3624
|
this.part1.onFocusOut = (e) => {
|
|
3625
|
-
if (
|
|
3625
|
+
if (!$$1(e.relatedTarget).closest('.form-input.plaque-select').hasClass('plaque-select') && !$$1(e.rangeParent).closest('.form-input.plaque-select').hasClass('plaque-select')) {
|
|
3626
3626
|
if (this.open) {
|
|
3627
3627
|
this.closeOptions();
|
|
3628
3628
|
}
|
|
3629
3629
|
}
|
|
3630
3630
|
};
|
|
3631
3631
|
this.part2.onFocusOut = (e) => {
|
|
3632
|
-
if (
|
|
3632
|
+
if (!$$1(e.relatedTarget).closest('.form-input.plaque-select').hasClass('plaque-select') && !$$1(e.rangeParent).closest('.form-input.plaque-select').hasClass('plaque-select')) {
|
|
3633
3633
|
if (this.open) {
|
|
3634
3634
|
this.closeOptions();
|
|
3635
3635
|
}
|
|
3636
3636
|
}
|
|
3637
3637
|
};
|
|
3638
3638
|
this.part3.onFocusOut = (e) => {
|
|
3639
|
-
if (
|
|
3639
|
+
if (!$$1(e.relatedTarget).closest('.form-input.plaque-select').hasClass('plaque-select') && !$$1(e.rangeParent).closest('.form-input.plaque-select').hasClass('plaque-select')) {
|
|
3640
3640
|
if (this.open) {
|
|
3641
3641
|
this.closeOptions();
|
|
3642
3642
|
}
|
|
3643
3643
|
}
|
|
3644
3644
|
};
|
|
3645
3645
|
this.part4.onFocusOut = (e) => {
|
|
3646
|
-
if (
|
|
3646
|
+
if (!$$1(e.relatedTarget).closest('.form-input.plaque-select').hasClass('plaque-select') && !$$1(e.rangeParent).closest('.form-input.plaque-select').hasClass('plaque-select')) {
|
|
3647
3647
|
if (this.open) {
|
|
3648
3648
|
this.closeOptions();
|
|
3649
3649
|
}
|
|
@@ -3784,8 +3784,8 @@ class FormPlaqueSelectComponent {
|
|
|
3784
3784
|
}
|
|
3785
3785
|
setHoverCenter() {
|
|
3786
3786
|
setTimeout(() => {
|
|
3787
|
-
const hover =
|
|
3788
|
-
const items =
|
|
3787
|
+
const hover = $$1(this.inputOptionsDiv.nativeElement).find('.option.hover');
|
|
3788
|
+
const items = $$1(this.inputOptionsDiv.nativeElement).find('.items');
|
|
3789
3789
|
if (hover.length === 0) {
|
|
3790
3790
|
return;
|
|
3791
3791
|
}
|
|
@@ -4076,12 +4076,10 @@ class FormPlaqueComponent {
|
|
|
4076
4076
|
}
|
|
4077
4077
|
}
|
|
4078
4078
|
onFocusIn(e = null) {
|
|
4079
|
-
console.log(111, 'onFocusIn');
|
|
4080
4079
|
if (e == null || !(e.screenX && e.screenX !== 0 && e.screenY && e.screenY !== 0)) {
|
|
4081
|
-
console.log(2222);
|
|
4082
4080
|
setTimeout(() => {
|
|
4083
|
-
|
|
4084
|
-
},
|
|
4081
|
+
$('#Part1Input .control').focus();
|
|
4082
|
+
}, 100);
|
|
4085
4083
|
}
|
|
4086
4084
|
}
|
|
4087
4085
|
onKeyDown(e) {
|
|
@@ -4173,7 +4171,7 @@ class FormRadioComponent {
|
|
|
4173
4171
|
}
|
|
4174
4172
|
}
|
|
4175
4173
|
onFocusIn() {
|
|
4176
|
-
|
|
4174
|
+
$$1(this.inputBase.nativeElement).focus();
|
|
4177
4175
|
}
|
|
4178
4176
|
}
|
|
4179
4177
|
FormRadioComponent.decorators = [
|
|
@@ -4202,8 +4200,8 @@ class FormSelectItemComponent {
|
|
|
4202
4200
|
this.select.hover = opt.index;
|
|
4203
4201
|
}
|
|
4204
4202
|
toggleChildren(e) {
|
|
4205
|
-
const ch =
|
|
4206
|
-
const oc =
|
|
4203
|
+
const ch = $$1(e.target).closest('.option-con').find(' > .children');
|
|
4204
|
+
const oc = $$1(e.target).closest('.option-con').find(' > .caret-icon');
|
|
4207
4205
|
if (ch.hasClass('open')) {
|
|
4208
4206
|
ch.removeClass('open');
|
|
4209
4207
|
ch.slideUp();
|
|
@@ -4288,7 +4286,7 @@ class FormSelectComponent {
|
|
|
4288
4286
|
return !this.inp.multiple ? (this.inp.addNew ? this.inp.search : this.inp.value) : this.getSelected();
|
|
4289
4287
|
};
|
|
4290
4288
|
this.inp.focusOut = () => {
|
|
4291
|
-
|
|
4289
|
+
$$1(this.inputBase.nativeElement).blur();
|
|
4292
4290
|
};
|
|
4293
4291
|
}
|
|
4294
4292
|
loadOptions() {
|
|
@@ -4303,14 +4301,14 @@ class FormSelectComponent {
|
|
|
4303
4301
|
openOptions() {
|
|
4304
4302
|
this.setPosition();
|
|
4305
4303
|
this.setHoverCenter();
|
|
4306
|
-
|
|
4304
|
+
$$1(this.inputBase.nativeElement).focus();
|
|
4307
4305
|
}
|
|
4308
4306
|
onFocusOut() {
|
|
4309
4307
|
this.closeOptions();
|
|
4310
4308
|
}
|
|
4311
4309
|
closeOptions() {
|
|
4312
4310
|
setTimeout(() => {
|
|
4313
|
-
|
|
4311
|
+
$$1(this.inputDiv.nativeElement).removeClass('top');
|
|
4314
4312
|
this.inp.hover = -1;
|
|
4315
4313
|
if (this.inp.value === null) {
|
|
4316
4314
|
if (!this.inp.addNew) {
|
|
@@ -4331,10 +4329,10 @@ class FormSelectComponent {
|
|
|
4331
4329
|
const offsetOfBottom = window.innerHeight - rect.bottom;
|
|
4332
4330
|
const height = this.inputOptionsDiv.nativeElement.offsetHeight;
|
|
4333
4331
|
if (offsetOfBottom < height) {
|
|
4334
|
-
|
|
4332
|
+
$$1(this.inputDiv.nativeElement).addClass('top');
|
|
4335
4333
|
}
|
|
4336
4334
|
else {
|
|
4337
|
-
|
|
4335
|
+
$$1(this.inputDiv.nativeElement).removeClass('top');
|
|
4338
4336
|
}
|
|
4339
4337
|
}
|
|
4340
4338
|
setOptions(r = this.inp.options) {
|
|
@@ -4352,7 +4350,7 @@ class FormSelectComponent {
|
|
|
4352
4350
|
}
|
|
4353
4351
|
else if (code === 13) {
|
|
4354
4352
|
e.preventDefault();
|
|
4355
|
-
if (
|
|
4353
|
+
if ($$1(this.inputBase.nativeElement).is(':focus')) {
|
|
4356
4354
|
const h = this.getSelectedHover();
|
|
4357
4355
|
if (!h) {
|
|
4358
4356
|
return;
|
|
@@ -4382,7 +4380,7 @@ class FormSelectComponent {
|
|
|
4382
4380
|
}
|
|
4383
4381
|
}
|
|
4384
4382
|
toggleOption(e) {
|
|
4385
|
-
if (this.inp.multiple &&
|
|
4383
|
+
if (this.inp.multiple && $$1(e.target).closest('.option').hasClass('option')) {
|
|
4386
4384
|
return;
|
|
4387
4385
|
}
|
|
4388
4386
|
this.openOptions();
|
|
@@ -4493,7 +4491,7 @@ class FormSelectComponent {
|
|
|
4493
4491
|
setTimeout(() => {
|
|
4494
4492
|
this.changeIndex.emit(i);
|
|
4495
4493
|
if (!this.inForm) {
|
|
4496
|
-
|
|
4494
|
+
$$1(this.inputBase.nativeElement).blur();
|
|
4497
4495
|
}
|
|
4498
4496
|
}, 10);
|
|
4499
4497
|
setTimeout(() => {
|
|
@@ -4502,8 +4500,8 @@ class FormSelectComponent {
|
|
|
4502
4500
|
}
|
|
4503
4501
|
setHoverCenter() {
|
|
4504
4502
|
setTimeout(() => {
|
|
4505
|
-
const hover =
|
|
4506
|
-
const items =
|
|
4503
|
+
const hover = $$1(this.inputOptionsDiv.nativeElement).find('.option.hover');
|
|
4504
|
+
const items = $$1(this.inputOptionsDiv.nativeElement).find('.items');
|
|
4507
4505
|
if (hover.length === 0) {
|
|
4508
4506
|
return;
|
|
4509
4507
|
}
|
|
@@ -5015,7 +5013,7 @@ class FormTimeComponent {
|
|
|
5015
5013
|
this.openOptions();
|
|
5016
5014
|
};
|
|
5017
5015
|
this.inp.focusOut = () => {
|
|
5018
|
-
|
|
5016
|
+
$$1(this.inputBase.nativeElement).blur();
|
|
5019
5017
|
};
|
|
5020
5018
|
}
|
|
5021
5019
|
toggleTime() {
|
|
@@ -5023,27 +5021,27 @@ class FormTimeComponent {
|
|
|
5023
5021
|
}
|
|
5024
5022
|
openOptions() {
|
|
5025
5023
|
this.setPosition();
|
|
5026
|
-
|
|
5024
|
+
$$1(this.inputBase.nativeElement).focus();
|
|
5027
5025
|
}
|
|
5028
5026
|
setPosition() {
|
|
5029
5027
|
const rect = this.inputDiv.nativeElement.getBoundingClientRect();
|
|
5030
5028
|
const offsetOfBottom = window.innerHeight - rect.bottom;
|
|
5031
5029
|
const height = this.inputOptionsDiv.nativeElement.offsetHeight;
|
|
5032
5030
|
if (offsetOfBottom < height) {
|
|
5033
|
-
|
|
5031
|
+
$$1(this.inputDiv.nativeElement).addClass('top');
|
|
5034
5032
|
}
|
|
5035
5033
|
else {
|
|
5036
|
-
|
|
5034
|
+
$$1(this.inputDiv.nativeElement).removeClass('top');
|
|
5037
5035
|
}
|
|
5038
5036
|
}
|
|
5039
5037
|
onKeyDown(e) {
|
|
5040
5038
|
const code = e.keyCode || e.which;
|
|
5041
5039
|
if (code === 9 || code === 13) {
|
|
5042
5040
|
e.preventDefault();
|
|
5043
|
-
|
|
5041
|
+
$$1(this.inputDiv.nativeElement).removeClass('top');
|
|
5044
5042
|
this.changeIndex.emit(code === 9 ? e.shiftKey ? 'ShiftTab' : 'Tab' : e.shiftKey ? 'ShiftEnter' : 'Enter');
|
|
5045
5043
|
if (!this.inForm) {
|
|
5046
|
-
|
|
5044
|
+
$$1(this.inputBase.nativeElement).blur();
|
|
5047
5045
|
}
|
|
5048
5046
|
}
|
|
5049
5047
|
}
|
|
@@ -5066,7 +5064,7 @@ class FormTimeComponent {
|
|
|
5066
5064
|
}
|
|
5067
5065
|
}
|
|
5068
5066
|
onFocusOut() {
|
|
5069
|
-
|
|
5067
|
+
$$1(this.inputDiv.nativeElement).removeClass('top');
|
|
5070
5068
|
this.inp.search = this.inp.value;
|
|
5071
5069
|
}
|
|
5072
5070
|
selectTime(v, s) {
|
|
@@ -5111,8 +5109,8 @@ class FormTreeItemComponent {
|
|
|
5111
5109
|
this.item.parent = this.parent;
|
|
5112
5110
|
}
|
|
5113
5111
|
openClose(e) {
|
|
5114
|
-
const ch =
|
|
5115
|
-
const oc =
|
|
5112
|
+
const ch = $$1(e.target).closest('.row-item').find(' > .children');
|
|
5113
|
+
const oc = $$1(e.target).closest('.row-item').find(' > .open-close');
|
|
5116
5114
|
if (ch.hasClass('open')) {
|
|
5117
5115
|
ch.removeClass('open');
|
|
5118
5116
|
ch.stop().slideUp();
|
|
@@ -5186,7 +5184,7 @@ class FormTreeComponent {
|
|
|
5186
5184
|
}
|
|
5187
5185
|
}
|
|
5188
5186
|
onFocusIn() {
|
|
5189
|
-
|
|
5187
|
+
$$1(this.inputBase.nativeElement).focus();
|
|
5190
5188
|
}
|
|
5191
5189
|
getSelected() {
|
|
5192
5190
|
let l = [];
|
|
@@ -5762,14 +5760,18 @@ class FormCarComponent {
|
|
|
5762
5760
|
this.onFocusIn();
|
|
5763
5761
|
}
|
|
5764
5762
|
onFocusIn() {
|
|
5763
|
+
console.log('onFocusIn');
|
|
5765
5764
|
if (this.type === VehicleType.Car) {
|
|
5766
5765
|
this.car.focus();
|
|
5766
|
+
console.log('Car');
|
|
5767
5767
|
}
|
|
5768
5768
|
else if (this.type === VehicleType.CarF) {
|
|
5769
5769
|
this.carF.focus();
|
|
5770
|
+
console.log('CarF');
|
|
5770
5771
|
}
|
|
5771
5772
|
else if (this.type === VehicleType.Motorcycle) {
|
|
5772
5773
|
this.motor.focus();
|
|
5774
|
+
console.log('Motorcycle');
|
|
5773
5775
|
}
|
|
5774
5776
|
}
|
|
5775
5777
|
}
|