ps-toolkit-ui 1.3.62 → 1.3.65
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 +8 -12
- 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/plaque/form.plaque.component.js +4 -3
- package/esm2015/lib/components/form/textbox/form.textbox.component.js +1 -5
- package/fesm2015/ps-toolkit-ui.js +73 -76
- 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
|
}
|
|
@@ -4078,8 +4078,9 @@ class FormPlaqueComponent {
|
|
|
4078
4078
|
onFocusIn(e = null) {
|
|
4079
4079
|
if (e == null || !(e.screenX && e.screenX !== 0 && e.screenY && e.screenY !== 0)) {
|
|
4080
4080
|
setTimeout(() => {
|
|
4081
|
-
|
|
4082
|
-
|
|
4081
|
+
console.log($('#Part1Input .control'));
|
|
4082
|
+
$('#Part1Input .control').focus();
|
|
4083
|
+
}, 100);
|
|
4083
4084
|
}
|
|
4084
4085
|
}
|
|
4085
4086
|
onKeyDown(e) {
|
|
@@ -4171,7 +4172,7 @@ class FormRadioComponent {
|
|
|
4171
4172
|
}
|
|
4172
4173
|
}
|
|
4173
4174
|
onFocusIn() {
|
|
4174
|
-
|
|
4175
|
+
$$1(this.inputBase.nativeElement).focus();
|
|
4175
4176
|
}
|
|
4176
4177
|
}
|
|
4177
4178
|
FormRadioComponent.decorators = [
|
|
@@ -4200,8 +4201,8 @@ class FormSelectItemComponent {
|
|
|
4200
4201
|
this.select.hover = opt.index;
|
|
4201
4202
|
}
|
|
4202
4203
|
toggleChildren(e) {
|
|
4203
|
-
const ch =
|
|
4204
|
-
const oc =
|
|
4204
|
+
const ch = $$1(e.target).closest('.option-con').find(' > .children');
|
|
4205
|
+
const oc = $$1(e.target).closest('.option-con').find(' > .caret-icon');
|
|
4205
4206
|
if (ch.hasClass('open')) {
|
|
4206
4207
|
ch.removeClass('open');
|
|
4207
4208
|
ch.slideUp();
|
|
@@ -4286,7 +4287,7 @@ class FormSelectComponent {
|
|
|
4286
4287
|
return !this.inp.multiple ? (this.inp.addNew ? this.inp.search : this.inp.value) : this.getSelected();
|
|
4287
4288
|
};
|
|
4288
4289
|
this.inp.focusOut = () => {
|
|
4289
|
-
|
|
4290
|
+
$$1(this.inputBase.nativeElement).blur();
|
|
4290
4291
|
};
|
|
4291
4292
|
}
|
|
4292
4293
|
loadOptions() {
|
|
@@ -4301,14 +4302,14 @@ class FormSelectComponent {
|
|
|
4301
4302
|
openOptions() {
|
|
4302
4303
|
this.setPosition();
|
|
4303
4304
|
this.setHoverCenter();
|
|
4304
|
-
|
|
4305
|
+
$$1(this.inputBase.nativeElement).focus();
|
|
4305
4306
|
}
|
|
4306
4307
|
onFocusOut() {
|
|
4307
4308
|
this.closeOptions();
|
|
4308
4309
|
}
|
|
4309
4310
|
closeOptions() {
|
|
4310
4311
|
setTimeout(() => {
|
|
4311
|
-
|
|
4312
|
+
$$1(this.inputDiv.nativeElement).removeClass('top');
|
|
4312
4313
|
this.inp.hover = -1;
|
|
4313
4314
|
if (this.inp.value === null) {
|
|
4314
4315
|
if (!this.inp.addNew) {
|
|
@@ -4329,10 +4330,10 @@ class FormSelectComponent {
|
|
|
4329
4330
|
const offsetOfBottom = window.innerHeight - rect.bottom;
|
|
4330
4331
|
const height = this.inputOptionsDiv.nativeElement.offsetHeight;
|
|
4331
4332
|
if (offsetOfBottom < height) {
|
|
4332
|
-
|
|
4333
|
+
$$1(this.inputDiv.nativeElement).addClass('top');
|
|
4333
4334
|
}
|
|
4334
4335
|
else {
|
|
4335
|
-
|
|
4336
|
+
$$1(this.inputDiv.nativeElement).removeClass('top');
|
|
4336
4337
|
}
|
|
4337
4338
|
}
|
|
4338
4339
|
setOptions(r = this.inp.options) {
|
|
@@ -4350,7 +4351,7 @@ class FormSelectComponent {
|
|
|
4350
4351
|
}
|
|
4351
4352
|
else if (code === 13) {
|
|
4352
4353
|
e.preventDefault();
|
|
4353
|
-
if (
|
|
4354
|
+
if ($$1(this.inputBase.nativeElement).is(':focus')) {
|
|
4354
4355
|
const h = this.getSelectedHover();
|
|
4355
4356
|
if (!h) {
|
|
4356
4357
|
return;
|
|
@@ -4380,7 +4381,7 @@ class FormSelectComponent {
|
|
|
4380
4381
|
}
|
|
4381
4382
|
}
|
|
4382
4383
|
toggleOption(e) {
|
|
4383
|
-
if (this.inp.multiple &&
|
|
4384
|
+
if (this.inp.multiple && $$1(e.target).closest('.option').hasClass('option')) {
|
|
4384
4385
|
return;
|
|
4385
4386
|
}
|
|
4386
4387
|
this.openOptions();
|
|
@@ -4491,7 +4492,7 @@ class FormSelectComponent {
|
|
|
4491
4492
|
setTimeout(() => {
|
|
4492
4493
|
this.changeIndex.emit(i);
|
|
4493
4494
|
if (!this.inForm) {
|
|
4494
|
-
|
|
4495
|
+
$$1(this.inputBase.nativeElement).blur();
|
|
4495
4496
|
}
|
|
4496
4497
|
}, 10);
|
|
4497
4498
|
setTimeout(() => {
|
|
@@ -4500,8 +4501,8 @@ class FormSelectComponent {
|
|
|
4500
4501
|
}
|
|
4501
4502
|
setHoverCenter() {
|
|
4502
4503
|
setTimeout(() => {
|
|
4503
|
-
const hover =
|
|
4504
|
-
const items =
|
|
4504
|
+
const hover = $$1(this.inputOptionsDiv.nativeElement).find('.option.hover');
|
|
4505
|
+
const items = $$1(this.inputOptionsDiv.nativeElement).find('.items');
|
|
4505
4506
|
if (hover.length === 0) {
|
|
4506
4507
|
return;
|
|
4507
4508
|
}
|
|
@@ -4784,7 +4785,6 @@ class FormTextboxComponent {
|
|
|
4784
4785
|
this.inp.value = v != null ? v.toString() : '';
|
|
4785
4786
|
};
|
|
4786
4787
|
this.inp.focus = (changeIndex = false) => {
|
|
4787
|
-
console.log('this.inp.focus');
|
|
4788
4788
|
this.onFocusIn(changeIndex);
|
|
4789
4789
|
};
|
|
4790
4790
|
this.inp.isValid = () => {
|
|
@@ -4883,14 +4883,11 @@ class FormTextboxComponent {
|
|
|
4883
4883
|
};
|
|
4884
4884
|
}
|
|
4885
4885
|
onFocusIn(changeIndex = false) {
|
|
4886
|
-
console.log('11111onFocusIn');
|
|
4887
4886
|
if (changeIndex) {
|
|
4888
4887
|
this.inputBase.nativeElement.select();
|
|
4889
|
-
console.log('this.inputBase.nativeElement.select');
|
|
4890
4888
|
}
|
|
4891
4889
|
else {
|
|
4892
4890
|
this.inputBase.nativeElement.focus();
|
|
4893
|
-
console.log('this.inputBase.nativeElement.focus');
|
|
4894
4891
|
}
|
|
4895
4892
|
}
|
|
4896
4893
|
onChange(e) {
|
|
@@ -5017,7 +5014,7 @@ class FormTimeComponent {
|
|
|
5017
5014
|
this.openOptions();
|
|
5018
5015
|
};
|
|
5019
5016
|
this.inp.focusOut = () => {
|
|
5020
|
-
|
|
5017
|
+
$$1(this.inputBase.nativeElement).blur();
|
|
5021
5018
|
};
|
|
5022
5019
|
}
|
|
5023
5020
|
toggleTime() {
|
|
@@ -5025,27 +5022,27 @@ class FormTimeComponent {
|
|
|
5025
5022
|
}
|
|
5026
5023
|
openOptions() {
|
|
5027
5024
|
this.setPosition();
|
|
5028
|
-
|
|
5025
|
+
$$1(this.inputBase.nativeElement).focus();
|
|
5029
5026
|
}
|
|
5030
5027
|
setPosition() {
|
|
5031
5028
|
const rect = this.inputDiv.nativeElement.getBoundingClientRect();
|
|
5032
5029
|
const offsetOfBottom = window.innerHeight - rect.bottom;
|
|
5033
5030
|
const height = this.inputOptionsDiv.nativeElement.offsetHeight;
|
|
5034
5031
|
if (offsetOfBottom < height) {
|
|
5035
|
-
|
|
5032
|
+
$$1(this.inputDiv.nativeElement).addClass('top');
|
|
5036
5033
|
}
|
|
5037
5034
|
else {
|
|
5038
|
-
|
|
5035
|
+
$$1(this.inputDiv.nativeElement).removeClass('top');
|
|
5039
5036
|
}
|
|
5040
5037
|
}
|
|
5041
5038
|
onKeyDown(e) {
|
|
5042
5039
|
const code = e.keyCode || e.which;
|
|
5043
5040
|
if (code === 9 || code === 13) {
|
|
5044
5041
|
e.preventDefault();
|
|
5045
|
-
|
|
5042
|
+
$$1(this.inputDiv.nativeElement).removeClass('top');
|
|
5046
5043
|
this.changeIndex.emit(code === 9 ? e.shiftKey ? 'ShiftTab' : 'Tab' : e.shiftKey ? 'ShiftEnter' : 'Enter');
|
|
5047
5044
|
if (!this.inForm) {
|
|
5048
|
-
|
|
5045
|
+
$$1(this.inputBase.nativeElement).blur();
|
|
5049
5046
|
}
|
|
5050
5047
|
}
|
|
5051
5048
|
}
|
|
@@ -5068,7 +5065,7 @@ class FormTimeComponent {
|
|
|
5068
5065
|
}
|
|
5069
5066
|
}
|
|
5070
5067
|
onFocusOut() {
|
|
5071
|
-
|
|
5068
|
+
$$1(this.inputDiv.nativeElement).removeClass('top');
|
|
5072
5069
|
this.inp.search = this.inp.value;
|
|
5073
5070
|
}
|
|
5074
5071
|
selectTime(v, s) {
|
|
@@ -5113,8 +5110,8 @@ class FormTreeItemComponent {
|
|
|
5113
5110
|
this.item.parent = this.parent;
|
|
5114
5111
|
}
|
|
5115
5112
|
openClose(e) {
|
|
5116
|
-
const ch =
|
|
5117
|
-
const oc =
|
|
5113
|
+
const ch = $$1(e.target).closest('.row-item').find(' > .children');
|
|
5114
|
+
const oc = $$1(e.target).closest('.row-item').find(' > .open-close');
|
|
5118
5115
|
if (ch.hasClass('open')) {
|
|
5119
5116
|
ch.removeClass('open');
|
|
5120
5117
|
ch.stop().slideUp();
|
|
@@ -5188,7 +5185,7 @@ class FormTreeComponent {
|
|
|
5188
5185
|
}
|
|
5189
5186
|
}
|
|
5190
5187
|
onFocusIn() {
|
|
5191
|
-
|
|
5188
|
+
$$1(this.inputBase.nativeElement).focus();
|
|
5192
5189
|
}
|
|
5193
5190
|
getSelected() {
|
|
5194
5191
|
let l = [];
|