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