ps-toolkit-ui 0.2.94 → 0.2.97
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 +21 -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/checkbox/form.checkbox.component.js +17 -7
- package/fesm2015/ps-toolkit-ui.js +96 -86
- package/fesm2015/ps-toolkit-ui.js.map +1 -1
- package/lib/components/form/checkbox/form.checkbox.component.d.ts +2 -0
- package/package.json +1 -1
- package/ps-toolkit-ui.metadata.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';
|
|
@@ -28,9 +28,9 @@ class AccordionComponent {
|
|
|
28
28
|
constructor() {
|
|
29
29
|
}
|
|
30
30
|
toggle(e) {
|
|
31
|
-
const chOpen =
|
|
31
|
+
const chOpen = $$1(e.target).closest('.accordion').find('.content.open');
|
|
32
32
|
const ocOpen = chOpen.closest('.accordion-item').find('.header > .icon');
|
|
33
|
-
const ch =
|
|
33
|
+
const ch = $$1(e.target).closest('.accordion-item').find(' > .content');
|
|
34
34
|
const oc = ch.closest('.accordion-item').find(' > .header > .icon');
|
|
35
35
|
if (ch.hasClass('open')) {
|
|
36
36
|
ch.removeClass('open');
|
|
@@ -783,9 +783,9 @@ class HelperClass {
|
|
|
783
783
|
static addNotification(m, e = true) {
|
|
784
784
|
const id = HelperClass.random(20);
|
|
785
785
|
// tslint:disable-next-line
|
|
786
|
-
|
|
786
|
+
$$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>');
|
|
787
787
|
setTimeout(() => {
|
|
788
|
-
const d =
|
|
788
|
+
const d = $$1('#' + id);
|
|
789
789
|
d.fadeOut(300, () => {
|
|
790
790
|
d.remove();
|
|
791
791
|
});
|
|
@@ -1547,13 +1547,13 @@ class AccordionRowClass {
|
|
|
1547
1547
|
}
|
|
1548
1548
|
toggle() {
|
|
1549
1549
|
setTimeout(() => {
|
|
1550
|
-
|
|
1550
|
+
$$1('#AccordionRow' + this.id + ' > .header').click();
|
|
1551
1551
|
}, 100);
|
|
1552
1552
|
}
|
|
1553
1553
|
open() {
|
|
1554
1554
|
setTimeout(() => {
|
|
1555
|
-
if (
|
|
1556
|
-
|
|
1555
|
+
if (!$$1('#AccordionRow' + this.id + ' > .content').hasClass('open')) {
|
|
1556
|
+
$$1('#AccordionRow' + this.id + ' > .header').click();
|
|
1557
1557
|
}
|
|
1558
1558
|
}, 100);
|
|
1559
1559
|
}
|
|
@@ -1573,7 +1573,7 @@ class HeaderComponent {
|
|
|
1573
1573
|
};
|
|
1574
1574
|
}
|
|
1575
1575
|
showUserDropDown(e) {
|
|
1576
|
-
|
|
1576
|
+
$$1(e.target).closest('#Header').find('.user-drop-down').slideToggle(100);
|
|
1577
1577
|
}
|
|
1578
1578
|
}
|
|
1579
1579
|
HeaderComponent.decorators = [
|
|
@@ -1621,7 +1621,7 @@ class SidebarItemComponent {
|
|
|
1621
1621
|
};
|
|
1622
1622
|
}
|
|
1623
1623
|
openClose(e) {
|
|
1624
|
-
const op =
|
|
1624
|
+
const op = $$1(e.target).closest('.user-sidebar-item');
|
|
1625
1625
|
if (op.hasClass('open')) {
|
|
1626
1626
|
op.removeClass('open');
|
|
1627
1627
|
op.find(' > .children').slideUp();
|
|
@@ -1643,7 +1643,7 @@ class SidebarItemComponent {
|
|
|
1643
1643
|
return false;
|
|
1644
1644
|
}
|
|
1645
1645
|
closeSidebar() {
|
|
1646
|
-
|
|
1646
|
+
$$1('#Sidebar').addClass('open').removeClass('close');
|
|
1647
1647
|
}
|
|
1648
1648
|
}
|
|
1649
1649
|
SidebarItemComponent.decorators = [
|
|
@@ -1720,7 +1720,7 @@ class SidebarComponent {
|
|
|
1720
1720
|
return null;
|
|
1721
1721
|
}
|
|
1722
1722
|
toggleSidebar() {
|
|
1723
|
-
|
|
1723
|
+
$$1('#Sidebar').toggleClass('open').toggleClass('close');
|
|
1724
1724
|
}
|
|
1725
1725
|
}
|
|
1726
1726
|
SidebarComponent.decorators = [
|
|
@@ -1989,15 +1989,15 @@ class TableRowComponent {
|
|
|
1989
1989
|
}
|
|
1990
1990
|
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');
|
|
1991
1991
|
this.showChildren.onClick = () => {
|
|
1992
|
-
if (
|
|
1993
|
-
|
|
1992
|
+
if ($$1(this.childrenDiv.nativeElement).is(':visible')) {
|
|
1993
|
+
$$1(this.childrenDiv.nativeElement).slideUp();
|
|
1994
1994
|
this.showChildren.icon = 'fa-duotone fa-angle-left f-s-22';
|
|
1995
1995
|
}
|
|
1996
1996
|
else if (this.children.length === 0) {
|
|
1997
1997
|
this.loadChildren(this.row.Data.Id);
|
|
1998
1998
|
}
|
|
1999
1999
|
else {
|
|
2000
|
-
|
|
2000
|
+
$$1(this.childrenDiv.nativeElement).slideDown();
|
|
2001
2001
|
this.showChildren.icon = 'fa-duotone fa-angle-down f-s-22';
|
|
2002
2002
|
}
|
|
2003
2003
|
};
|
|
@@ -2020,7 +2020,7 @@ class TableRowComponent {
|
|
|
2020
2020
|
new RequestClass(this.table.environment, this.table.l).send(this.table.url + `List/${p}`, Method.Post, null, this.showChildren, (result) => {
|
|
2021
2021
|
this.children = result.List;
|
|
2022
2022
|
setTimeout(() => {
|
|
2023
|
-
|
|
2023
|
+
$$1(this.childrenDiv.nativeElement).slideDown();
|
|
2024
2024
|
this.showChildren.icon = 'fa-duotone fa-angle-down f-s-22';
|
|
2025
2025
|
}, 50);
|
|
2026
2026
|
});
|
|
@@ -2038,13 +2038,13 @@ class TableRowComponent {
|
|
|
2038
2038
|
setTimeout(() => {
|
|
2039
2039
|
if (this.table.hasChildren) {
|
|
2040
2040
|
// @ts-ignore
|
|
2041
|
-
|
|
2041
|
+
$$1(this.childrenDiv.nativeElement).sortable({
|
|
2042
2042
|
axis: 'y',
|
|
2043
2043
|
handle: '> .row > .item-con > .handle-sortable',
|
|
2044
2044
|
update: () => {
|
|
2045
2045
|
const data = [];
|
|
2046
2046
|
// @ts-ignore
|
|
2047
|
-
|
|
2047
|
+
$$1(this.childrenDiv.nativeElement).sortable('toArray').forEach(x => data.push(x));
|
|
2048
2048
|
new RequestClass(this.table.l).send(this.table.url + 'Sort', Method.Post, data, null, () => {
|
|
2049
2049
|
if (this.table.onSort) {
|
|
2050
2050
|
this.table.onSort();
|
|
@@ -2368,8 +2368,8 @@ class ModalClass {
|
|
|
2368
2368
|
if (this.onShow) {
|
|
2369
2369
|
this.onShow();
|
|
2370
2370
|
}
|
|
2371
|
-
|
|
2372
|
-
|
|
2371
|
+
$$1('body').addClass('open-modal');
|
|
2372
|
+
$$1('#' + this.id + 'Modal').fadeIn(300, () => {
|
|
2373
2373
|
if (this.form != null) {
|
|
2374
2374
|
const i = this.form.inputs.find(x => !x.disabled && x.type !== InputType.Label && x.type !== InputType.Hidden &&
|
|
2375
2375
|
x.type !== InputType.Constant && x.type !== InputType.Submit && x.type !== InputType.Button && x.type !== InputType.Icon &&
|
|
@@ -2381,8 +2381,8 @@ class ModalClass {
|
|
|
2381
2381
|
});
|
|
2382
2382
|
}
|
|
2383
2383
|
hide() {
|
|
2384
|
-
|
|
2385
|
-
|
|
2384
|
+
$$1('body').removeClass('open-modal');
|
|
2385
|
+
$$1('#' + this.id + 'Modal').fadeOut(300, () => {
|
|
2386
2386
|
if (this.form && this.form.name !== 'Confirm' && this.form.name !== 'Alert') {
|
|
2387
2387
|
this.form.clear();
|
|
2388
2388
|
if (this.form.onHideModal) {
|
|
@@ -2464,7 +2464,7 @@ class TableComponent {
|
|
|
2464
2464
|
this.table.load(this.reload);
|
|
2465
2465
|
};
|
|
2466
2466
|
this.maximum.onClick = () => {
|
|
2467
|
-
|
|
2467
|
+
$$1(this.tableDiv.nativeElement).toggleClass('maximum');
|
|
2468
2468
|
this.maximum.icon = this.maximum.name === 'Minimum' ? 'fa-duotone fa-arrows-maximize' : 'fa-duotone fa-arrows-minimize';
|
|
2469
2469
|
this.maximum.name = this.maximum.name === 'Minimum' ? 'Maximum' : 'Minimum';
|
|
2470
2470
|
};
|
|
@@ -2503,13 +2503,13 @@ class TableComponent {
|
|
|
2503
2503
|
setSortable() {
|
|
2504
2504
|
setTimeout(() => {
|
|
2505
2505
|
// @ts-ignore
|
|
2506
|
-
|
|
2506
|
+
$$1(this.rows.nativeElement).sortable({
|
|
2507
2507
|
axis: 'y',
|
|
2508
2508
|
items: 'tr',
|
|
2509
2509
|
update: () => {
|
|
2510
2510
|
const data = [];
|
|
2511
2511
|
// @ts-ignore
|
|
2512
|
-
|
|
2512
|
+
$$1(this.rows.nativeElement).sortable('toArray').forEach(x => data.push(x));
|
|
2513
2513
|
new RequestClass(this.table.l).send(this.table.url + 'Sort', Method.Post, { Ids: data }, null, () => {
|
|
2514
2514
|
if (this.table.onSort) {
|
|
2515
2515
|
this.table.onSort();
|
|
@@ -2540,7 +2540,7 @@ class TableComponent {
|
|
|
2540
2540
|
this.confirm.show(this.table.l('DeleteConfirm'), this.table.url + 'Delete/' + e.id, null, e.accept);
|
|
2541
2541
|
}
|
|
2542
2542
|
changeSort(e, s) {
|
|
2543
|
-
if (
|
|
2543
|
+
if ($$1(e.target).closest('.header-search').hasClass('header-search')) {
|
|
2544
2544
|
return;
|
|
2545
2545
|
}
|
|
2546
2546
|
this.table.sortType = this.table.sort === s ? this.table.sortType === 'ASC' ? 'DESC' : 'ASC' : 'ASC';
|
|
@@ -2710,10 +2710,10 @@ class FormBankCardComponent {
|
|
|
2710
2710
|
console.log(this.part1.data().toString() + this.part2.data().toString());
|
|
2711
2711
|
const b = this.banks.filter(x => x.startWith.includes(this.part1.data().toString() + this.part2.data().toString().substring(0, 2)));
|
|
2712
2712
|
if (b.length > 0) {
|
|
2713
|
-
|
|
2713
|
+
$$1(this.inputIcon.nativeElement).removeClass('fa-money-check').addClass(b[0].name);
|
|
2714
2714
|
}
|
|
2715
2715
|
else {
|
|
2716
|
-
|
|
2716
|
+
$$1(this.inputIcon.nativeElement).addClass('fa-money-check').removeClass(this.banks.map(x => x.name));
|
|
2717
2717
|
}
|
|
2718
2718
|
}
|
|
2719
2719
|
changeFocus(p, a) {
|
|
@@ -2794,7 +2794,7 @@ class FormButtonComponent {
|
|
|
2794
2794
|
};
|
|
2795
2795
|
}
|
|
2796
2796
|
onFocusIn() {
|
|
2797
|
-
|
|
2797
|
+
$$1(this.inputBase.nativeElement).focus();
|
|
2798
2798
|
}
|
|
2799
2799
|
onClick(e) {
|
|
2800
2800
|
if (e.screenX && e.screenX !== 0 && e.screenY && e.screenY !== 0) {
|
|
@@ -2857,7 +2857,7 @@ class FormCheckboxComponent {
|
|
|
2857
2857
|
ngOnInit() {
|
|
2858
2858
|
this.inp.clear = () => {
|
|
2859
2859
|
this.inp.error = null;
|
|
2860
|
-
this.
|
|
2860
|
+
this.setValue(this.inp.default);
|
|
2861
2861
|
};
|
|
2862
2862
|
this.inp.isValid = () => {
|
|
2863
2863
|
this.inp.error = null;
|
|
@@ -2871,7 +2871,7 @@ class FormCheckboxComponent {
|
|
|
2871
2871
|
return this.inp.value;
|
|
2872
2872
|
};
|
|
2873
2873
|
this.inp.setValue = (v) => {
|
|
2874
|
-
this.
|
|
2874
|
+
this.setValue(v);
|
|
2875
2875
|
};
|
|
2876
2876
|
this.inp.focus = () => {
|
|
2877
2877
|
this.onFocusIn();
|
|
@@ -2882,7 +2882,16 @@ class FormCheckboxComponent {
|
|
|
2882
2882
|
this.inputBase.nativeElement.focus();
|
|
2883
2883
|
}
|
|
2884
2884
|
onClick() {
|
|
2885
|
-
this.
|
|
2885
|
+
this.setValue(!this.inp.value);
|
|
2886
|
+
}
|
|
2887
|
+
setValue(v) {
|
|
2888
|
+
this.inp.value = v;
|
|
2889
|
+
if (v) {
|
|
2890
|
+
$(this.inputCon.nativeElement).addClass('checked');
|
|
2891
|
+
}
|
|
2892
|
+
else {
|
|
2893
|
+
$(this.inputCon.nativeElement).removeClass('checked');
|
|
2894
|
+
}
|
|
2886
2895
|
}
|
|
2887
2896
|
onChange() {
|
|
2888
2897
|
if (this.inp.onChange) {
|
|
@@ -2902,8 +2911,8 @@ class FormCheckboxComponent {
|
|
|
2902
2911
|
FormCheckboxComponent.decorators = [
|
|
2903
2912
|
{ type: Component, args: [{
|
|
2904
2913
|
selector: 'lib-form-checkbox',
|
|
2905
|
-
template: "<div #inputDiv [id]=\"inp.name + 'Input'\" [style]=\"inp.style\" [className]=\"'form-input-con checkbox w-100' + (inp.error == null ? '' : ' error') + (inp.disabled ? ' disabled' : '') + (inp.icon == null ? ' without-icon' : '') + (!inp.displayLabel ? ' without-label' : '') + ' ' + inp.class\">\r\n <div class=\"form-input\" (click)=\"onFocusIn()\">\r\n <div *ngIf=\"inp.displayLabel\" class=\"label\"></div>\r\n <input (keydown)=\"onKeyDown($event)\"
|
|
2906
|
-
styles: [".form-input-con.checkbox{padding:0 15px;position:relative}.form-input-con.checkbox .form-input{float:right;position:relative;width:100%}.form-input-con.checkbox .form-input .label{cursor:default;direction:rtl;font-size:12px;height:20px;margin-bottom:3px;padding:0 10px;text-align:right}.form-input-con.checkbox .form-input .control,.form-input-con.checkbox .form-input .label{-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;-webkit-user-select:none;float:right;line-height:20px;width:100%}.form-input-con.checkbox .form-input .control{align-items:center;background-color:#fff;border:var(--border-input);border-radius:var(--border-radius-base);cursor:pointer;display:flex;font-size:11px;justify-content:center;min-height:35px;padding:5px 45px;position:relative;text-align:center;z-index:2}.form-input-con.checkbox.without-border .form-input .control{border:unset}.form-input-con.checkbox .form-input .control:after{content:\"\\f0c8\";font-family:Font Awesome\\ 5 Pro;font-size:17px;font-weight:400;height:35px;line-height:32px;position:absolute;right:0;top:0;width:35px}.form-input-con.checkbox:not(.without-border) .form-input .check:focus+.control,.form-input-con.checkbox:not(.without-border) .form-input .control:hover{border:var(--border-input-dark);outline:none}.form-input-con.checkbox.error .form-input .control{border:var(--border-input-red)}.form-input-con.checkbox.error .form-input .control,.form-input-con.checkbox.error .form-input span.icon{color:var(--red)}.form-input-con.checkbox .form-input .check{cursor:pointer;height:0;opacity:0;position:absolute;right:50%;top:50%;width:0;z-index:1}.form-input-con.checkbox .form-input .
|
|
2914
|
+
template: "<div #inputDiv [id]=\"inp.name + 'Input'\" [style]=\"inp.style\" [className]=\"'form-input-con checkbox w-100' + (inp.error == null ? '' : ' error') + (inp.disabled ? ' disabled' : '') + (inp.icon == null ? ' without-icon' : '') + (!inp.displayLabel ? ' without-label' : '') + ' ' + inp.class\">\r\n <div class=\"form-input\" (click)=\"onFocusIn()\">\r\n <div *ngIf=\"inp.displayLabel\" class=\"label\"></div>\r\n <input (keydown)=\"onKeyDown($event)\" #inputBase type=\"checkbox\" class=\"check\">\r\n <div (click)=\"onClick()\" #inputCon class=\"control\">{{inp.l(inp.name)}}</div>\r\n <i *ngIf=\"inp.icon != null || inp.loading\" #inputIcon [className]=\"(inp.loading ? 'fa-duotone fa-spin fa-spinner' : inp.icon) + ' icon'\"></i>\r\n </div>\r\n</div>\r\n",
|
|
2915
|
+
styles: [".form-input-con.checkbox{padding:0 15px;position:relative}.form-input-con.checkbox .form-input{float:right;position:relative;width:100%}.form-input-con.checkbox .form-input .label{cursor:default;direction:rtl;font-size:12px;height:20px;margin-bottom:3px;padding:0 10px;text-align:right}.form-input-con.checkbox .form-input .control,.form-input-con.checkbox .form-input .label{-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;-webkit-user-select:none;float:right;line-height:20px;width:100%}.form-input-con.checkbox .form-input .control{align-items:center;background-color:#fff;border:var(--border-input);border-radius:var(--border-radius-base);cursor:pointer;display:flex;font-size:11px;justify-content:center;min-height:35px;padding:5px 45px;position:relative;text-align:center;z-index:2}.form-input-con.checkbox.without-border .form-input .control{border:unset}.form-input-con.checkbox .form-input .control:after{content:\"\\f0c8\";font-family:Font Awesome\\ 5 Pro;font-size:17px;font-weight:400;height:35px;line-height:32px;position:absolute;right:0;top:0;width:35px}.form-input-con.checkbox:not(.without-border) .form-input .check:focus+.control,.form-input-con.checkbox:not(.without-border) .form-input .control:hover{border:var(--border-input-dark);outline:none}.form-input-con.checkbox.error .form-input .control{border:var(--border-input-red)}.form-input-con.checkbox.error .form-input .control,.form-input-con.checkbox.error .form-input span.icon{color:var(--red)}.form-input-con.checkbox .form-input .check{cursor:pointer;height:0;opacity:0;position:absolute;right:50%;top:50%;width:0;z-index:1}.form-input-con.checkbox .form-input .control.checked:after{animation:pop .18s ease-in;color:var(--green);content:\"\\f14a\";font-weight:900}.form-input-con.checkbox .form-input i.icon{color:var(--primary);cursor:pointer;font-size:13px;height:35px;left:0;line-height:35px;position:absolute;text-align:center;top:24px;transition:all .35s ease-in-out;width:35px;z-index:2}.form-input-con.checkbox.without-label .form-input i.icon{top:0}.form-input-con.checkbox.without-icon .form-input .control{padding:0 35px 0 0}.form-input-con.checkbox.h-30 .form-input .control{font-size:10px;line-height:28px;min-height:30px;padding:0 40px}.form-input-con.checkbox.h-30 .form-input .control:after{font-size:14px;height:30px;line-height:28px;width:30px}.form-input-con.checkbox.h-30 .form-input i.icon{font-size:11px;height:30px;line-height:30px;width:30px}.form-input-con.checkbox.h-30.without-icon .form-input .control{padding:0 0 0 40px}"]
|
|
2907
2916
|
},] }
|
|
2908
2917
|
];
|
|
2909
2918
|
FormCheckboxComponent.ctorParameters = () => [];
|
|
@@ -2911,7 +2920,8 @@ FormCheckboxComponent.propDecorators = {
|
|
|
2911
2920
|
inp: [{ type: Input }],
|
|
2912
2921
|
changeIndex: [{ type: Output }],
|
|
2913
2922
|
inputBase: [{ type: ViewChild, args: ['inputBase',] }],
|
|
2914
|
-
inputDiv: [{ type: ViewChild, args: ['inputDiv',] }]
|
|
2923
|
+
inputDiv: [{ type: ViewChild, args: ['inputDiv',] }],
|
|
2924
|
+
inputCon: [{ type: ViewChild, args: ['inputCon',] }]
|
|
2915
2925
|
};
|
|
2916
2926
|
|
|
2917
2927
|
class FormDateComponent {
|
|
@@ -2966,7 +2976,7 @@ class FormDateComponent {
|
|
|
2966
2976
|
this.openCalendar();
|
|
2967
2977
|
};
|
|
2968
2978
|
this.inp.focusOut = () => {
|
|
2969
|
-
|
|
2979
|
+
$$1(this.inputBase.nativeElement).blur();
|
|
2970
2980
|
};
|
|
2971
2981
|
}
|
|
2972
2982
|
setInpValue(v) {
|
|
@@ -3051,16 +3061,16 @@ class FormDateComponent {
|
|
|
3051
3061
|
}
|
|
3052
3062
|
openCalendar() {
|
|
3053
3063
|
this.setPosition();
|
|
3054
|
-
|
|
3064
|
+
$$1(this.inputBase.nativeElement).focus();
|
|
3055
3065
|
}
|
|
3056
3066
|
onKeyDown(e) {
|
|
3057
3067
|
const code = e.keyCode || e.which;
|
|
3058
3068
|
if (code === 9 || code === 13) {
|
|
3059
3069
|
e.preventDefault();
|
|
3060
|
-
|
|
3070
|
+
$$1(this.inputDiv.nativeElement).removeClass('top');
|
|
3061
3071
|
this.changeIndex.emit(code === 9 ? e.shiftKey ? 'ShiftTab' : 'Tab' : e.shiftKey ? 'ShiftEnter' : 'Enter');
|
|
3062
3072
|
if (!this.inForm) {
|
|
3063
|
-
|
|
3073
|
+
$$1(this.inputBase.nativeElement).blur();
|
|
3064
3074
|
}
|
|
3065
3075
|
}
|
|
3066
3076
|
}
|
|
@@ -3092,7 +3102,7 @@ class FormDateComponent {
|
|
|
3092
3102
|
}
|
|
3093
3103
|
}
|
|
3094
3104
|
onFocusOut() {
|
|
3095
|
-
|
|
3105
|
+
$$1(this.inputDiv.nativeElement).removeClass('top');
|
|
3096
3106
|
this.inp.search = this.inp.value;
|
|
3097
3107
|
this.state = 'day';
|
|
3098
3108
|
}
|
|
@@ -3101,10 +3111,10 @@ class FormDateComponent {
|
|
|
3101
3111
|
const offsetOfBottom = window.innerHeight - rect.bottom;
|
|
3102
3112
|
const height = this.inputCalendarDiv.nativeElement.offsetHeight;
|
|
3103
3113
|
if (offsetOfBottom < height) {
|
|
3104
|
-
|
|
3114
|
+
$$1(this.inputDiv.nativeElement).addClass('top');
|
|
3105
3115
|
}
|
|
3106
3116
|
else {
|
|
3107
|
-
|
|
3117
|
+
$$1(this.inputDiv.nativeElement).removeClass('top');
|
|
3108
3118
|
}
|
|
3109
3119
|
}
|
|
3110
3120
|
selectDate(d) {
|
|
@@ -3119,10 +3129,10 @@ class FormDateComponent {
|
|
|
3119
3129
|
d.selected = true;
|
|
3120
3130
|
this.cSearch = this.inp.search;
|
|
3121
3131
|
setTimeout(() => {
|
|
3122
|
-
|
|
3132
|
+
$$1(this.inputDiv.nativeElement).removeClass('top');
|
|
3123
3133
|
this.changeIndex.emit('Tab');
|
|
3124
3134
|
if (!this.inForm) {
|
|
3125
|
-
|
|
3135
|
+
$$1(this.inputBase.nativeElement).blur();
|
|
3126
3136
|
}
|
|
3127
3137
|
}, 10);
|
|
3128
3138
|
if (this.inp.onChange) {
|
|
@@ -3347,7 +3357,7 @@ class FormFileComponent {
|
|
|
3347
3357
|
});
|
|
3348
3358
|
}
|
|
3349
3359
|
onClick() {
|
|
3350
|
-
|
|
3360
|
+
$$1(this.inputBase.nativeElement).focus();
|
|
3351
3361
|
}
|
|
3352
3362
|
onChange(e) {
|
|
3353
3363
|
this.inp.error = null;
|
|
@@ -3366,7 +3376,7 @@ class FormFileComponent {
|
|
|
3366
3376
|
}
|
|
3367
3377
|
}
|
|
3368
3378
|
onFocusIn() {
|
|
3369
|
-
|
|
3379
|
+
$$1(this.inputBase.nativeElement).focus();
|
|
3370
3380
|
}
|
|
3371
3381
|
title() {
|
|
3372
3382
|
if (this.inp.value == null || (this.inp.value instanceof Array && this.inp.value.length === 0)) {
|
|
@@ -3408,7 +3418,7 @@ class FormIconComponent {
|
|
|
3408
3418
|
};
|
|
3409
3419
|
}
|
|
3410
3420
|
onFocusIn() {
|
|
3411
|
-
|
|
3421
|
+
$$1(this.inputBase.nativeElement).focus();
|
|
3412
3422
|
}
|
|
3413
3423
|
onClick(e) {
|
|
3414
3424
|
if (e.screenX && e.screenX !== 0 && e.screenY && e.screenY !== 0) {
|
|
@@ -3662,28 +3672,28 @@ class FormPlaqueSelectComponent {
|
|
|
3662
3672
|
}
|
|
3663
3673
|
};
|
|
3664
3674
|
this.part1.onFocusOut = (e) => {
|
|
3665
|
-
if (
|
|
3675
|
+
if (!$$1(e.relatedTarget).closest('.form-input.plaque-select').hasClass('plaque-select') && !$$1(e.rangeParent).closest('.form-input.plaque-select').hasClass('plaque-select')) {
|
|
3666
3676
|
if (this.open) {
|
|
3667
3677
|
this.closeOptions();
|
|
3668
3678
|
}
|
|
3669
3679
|
}
|
|
3670
3680
|
};
|
|
3671
3681
|
this.part2.onFocusOut = (e) => {
|
|
3672
|
-
if (
|
|
3682
|
+
if (!$$1(e.relatedTarget).closest('.form-input.plaque-select').hasClass('plaque-select') && !$$1(e.rangeParent).closest('.form-input.plaque-select').hasClass('plaque-select')) {
|
|
3673
3683
|
if (this.open) {
|
|
3674
3684
|
this.closeOptions();
|
|
3675
3685
|
}
|
|
3676
3686
|
}
|
|
3677
3687
|
};
|
|
3678
3688
|
this.part3.onFocusOut = (e) => {
|
|
3679
|
-
if (
|
|
3689
|
+
if (!$$1(e.relatedTarget).closest('.form-input.plaque-select').hasClass('plaque-select') && !$$1(e.rangeParent).closest('.form-input.plaque-select').hasClass('plaque-select')) {
|
|
3680
3690
|
if (this.open) {
|
|
3681
3691
|
this.closeOptions();
|
|
3682
3692
|
}
|
|
3683
3693
|
}
|
|
3684
3694
|
};
|
|
3685
3695
|
this.part4.onFocusOut = (e) => {
|
|
3686
|
-
if (
|
|
3696
|
+
if (!$$1(e.relatedTarget).closest('.form-input.plaque-select').hasClass('plaque-select') && !$$1(e.rangeParent).closest('.form-input.plaque-select').hasClass('plaque-select')) {
|
|
3687
3697
|
if (this.open) {
|
|
3688
3698
|
this.closeOptions();
|
|
3689
3699
|
}
|
|
@@ -3824,8 +3834,8 @@ class FormPlaqueSelectComponent {
|
|
|
3824
3834
|
}
|
|
3825
3835
|
setHoverCenter() {
|
|
3826
3836
|
setTimeout(() => {
|
|
3827
|
-
const hover =
|
|
3828
|
-
const items =
|
|
3837
|
+
const hover = $$1(this.inputOptionsDiv.nativeElement).find('.option.hover');
|
|
3838
|
+
const items = $$1(this.inputOptionsDiv.nativeElement).find('.items');
|
|
3829
3839
|
if (hover.length === 0) {
|
|
3830
3840
|
return;
|
|
3831
3841
|
}
|
|
@@ -4162,7 +4172,7 @@ class FormRadioComponent {
|
|
|
4162
4172
|
}
|
|
4163
4173
|
}
|
|
4164
4174
|
onFocusIn() {
|
|
4165
|
-
|
|
4175
|
+
$$1(this.inputBase.nativeElement).focus();
|
|
4166
4176
|
}
|
|
4167
4177
|
}
|
|
4168
4178
|
FormRadioComponent.decorators = [
|
|
@@ -4191,8 +4201,8 @@ class FormSelectItemComponent {
|
|
|
4191
4201
|
this.select.hover = opt.index;
|
|
4192
4202
|
}
|
|
4193
4203
|
toggleChildren(e) {
|
|
4194
|
-
const ch =
|
|
4195
|
-
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');
|
|
4196
4206
|
if (ch.hasClass('open')) {
|
|
4197
4207
|
ch.removeClass('open');
|
|
4198
4208
|
ch.slideUp();
|
|
@@ -4277,7 +4287,7 @@ class FormSelectComponent {
|
|
|
4277
4287
|
return !this.inp.multiple ? (this.inp.addNew ? this.inp.search : this.inp.value) : this.getSelected();
|
|
4278
4288
|
};
|
|
4279
4289
|
this.inp.focusOut = () => {
|
|
4280
|
-
|
|
4290
|
+
$$1(this.inputBase.nativeElement).blur();
|
|
4281
4291
|
};
|
|
4282
4292
|
}
|
|
4283
4293
|
loadOptions() {
|
|
@@ -4292,14 +4302,14 @@ class FormSelectComponent {
|
|
|
4292
4302
|
openOptions() {
|
|
4293
4303
|
this.setPosition();
|
|
4294
4304
|
this.setHoverCenter();
|
|
4295
|
-
|
|
4305
|
+
$$1(this.inputBase.nativeElement).focus();
|
|
4296
4306
|
}
|
|
4297
4307
|
onFocusOut() {
|
|
4298
4308
|
this.closeOptions();
|
|
4299
4309
|
}
|
|
4300
4310
|
closeOptions() {
|
|
4301
4311
|
setTimeout(() => {
|
|
4302
|
-
|
|
4312
|
+
$$1(this.inputDiv.nativeElement).removeClass('top');
|
|
4303
4313
|
this.inp.hover = -1;
|
|
4304
4314
|
if (this.inp.value === null) {
|
|
4305
4315
|
if (!this.inp.addNew) {
|
|
@@ -4320,10 +4330,10 @@ class FormSelectComponent {
|
|
|
4320
4330
|
const offsetOfBottom = window.innerHeight - rect.bottom;
|
|
4321
4331
|
const height = this.inputOptionsDiv.nativeElement.offsetHeight;
|
|
4322
4332
|
if (offsetOfBottom < height) {
|
|
4323
|
-
|
|
4333
|
+
$$1(this.inputDiv.nativeElement).addClass('top');
|
|
4324
4334
|
}
|
|
4325
4335
|
else {
|
|
4326
|
-
|
|
4336
|
+
$$1(this.inputDiv.nativeElement).removeClass('top');
|
|
4327
4337
|
}
|
|
4328
4338
|
}
|
|
4329
4339
|
setOptions(r = this.inp.options) {
|
|
@@ -4341,7 +4351,7 @@ class FormSelectComponent {
|
|
|
4341
4351
|
}
|
|
4342
4352
|
else if (code === 13) {
|
|
4343
4353
|
e.preventDefault();
|
|
4344
|
-
if (
|
|
4354
|
+
if ($$1(this.inputBase.nativeElement).is(':focus')) {
|
|
4345
4355
|
const h = this.getSelectedHover();
|
|
4346
4356
|
if (!h) {
|
|
4347
4357
|
return;
|
|
@@ -4371,7 +4381,7 @@ class FormSelectComponent {
|
|
|
4371
4381
|
}
|
|
4372
4382
|
}
|
|
4373
4383
|
toggleOption(e) {
|
|
4374
|
-
if (this.inp.multiple &&
|
|
4384
|
+
if (this.inp.multiple && $$1(e.target).closest('.option').hasClass('option')) {
|
|
4375
4385
|
return;
|
|
4376
4386
|
}
|
|
4377
4387
|
this.openOptions();
|
|
@@ -4482,7 +4492,7 @@ class FormSelectComponent {
|
|
|
4482
4492
|
setTimeout(() => {
|
|
4483
4493
|
this.changeIndex.emit(i);
|
|
4484
4494
|
if (!this.inForm) {
|
|
4485
|
-
|
|
4495
|
+
$$1(this.inputBase.nativeElement).blur();
|
|
4486
4496
|
}
|
|
4487
4497
|
}, 10);
|
|
4488
4498
|
setTimeout(() => {
|
|
@@ -4491,8 +4501,8 @@ class FormSelectComponent {
|
|
|
4491
4501
|
}
|
|
4492
4502
|
setHoverCenter() {
|
|
4493
4503
|
setTimeout(() => {
|
|
4494
|
-
const hover =
|
|
4495
|
-
const items =
|
|
4504
|
+
const hover = $$1(this.inputOptionsDiv.nativeElement).find('.option.hover');
|
|
4505
|
+
const items = $$1(this.inputOptionsDiv.nativeElement).find('.items');
|
|
4496
4506
|
if (hover.length === 0) {
|
|
4497
4507
|
return;
|
|
4498
4508
|
}
|
|
@@ -5004,7 +5014,7 @@ class FormTimeComponent {
|
|
|
5004
5014
|
this.openOptions();
|
|
5005
5015
|
};
|
|
5006
5016
|
this.inp.focusOut = () => {
|
|
5007
|
-
|
|
5017
|
+
$$1(this.inputBase.nativeElement).blur();
|
|
5008
5018
|
};
|
|
5009
5019
|
}
|
|
5010
5020
|
toggleTime() {
|
|
@@ -5012,27 +5022,27 @@ class FormTimeComponent {
|
|
|
5012
5022
|
}
|
|
5013
5023
|
openOptions() {
|
|
5014
5024
|
this.setPosition();
|
|
5015
|
-
|
|
5025
|
+
$$1(this.inputBase.nativeElement).focus();
|
|
5016
5026
|
}
|
|
5017
5027
|
setPosition() {
|
|
5018
5028
|
const rect = this.inputDiv.nativeElement.getBoundingClientRect();
|
|
5019
5029
|
const offsetOfBottom = window.innerHeight - rect.bottom;
|
|
5020
5030
|
const height = this.inputOptionsDiv.nativeElement.offsetHeight;
|
|
5021
5031
|
if (offsetOfBottom < height) {
|
|
5022
|
-
|
|
5032
|
+
$$1(this.inputDiv.nativeElement).addClass('top');
|
|
5023
5033
|
}
|
|
5024
5034
|
else {
|
|
5025
|
-
|
|
5035
|
+
$$1(this.inputDiv.nativeElement).removeClass('top');
|
|
5026
5036
|
}
|
|
5027
5037
|
}
|
|
5028
5038
|
onKeyDown(e) {
|
|
5029
5039
|
const code = e.keyCode || e.which;
|
|
5030
5040
|
if (code === 9 || code === 13) {
|
|
5031
5041
|
e.preventDefault();
|
|
5032
|
-
|
|
5042
|
+
$$1(this.inputDiv.nativeElement).removeClass('top');
|
|
5033
5043
|
this.changeIndex.emit(code === 9 ? e.shiftKey ? 'ShiftTab' : 'Tab' : e.shiftKey ? 'ShiftEnter' : 'Enter');
|
|
5034
5044
|
if (!this.inForm) {
|
|
5035
|
-
|
|
5045
|
+
$$1(this.inputBase.nativeElement).blur();
|
|
5036
5046
|
}
|
|
5037
5047
|
}
|
|
5038
5048
|
}
|
|
@@ -5055,7 +5065,7 @@ class FormTimeComponent {
|
|
|
5055
5065
|
}
|
|
5056
5066
|
}
|
|
5057
5067
|
onFocusOut() {
|
|
5058
|
-
|
|
5068
|
+
$$1(this.inputDiv.nativeElement).removeClass('top');
|
|
5059
5069
|
this.inp.search = this.inp.value;
|
|
5060
5070
|
}
|
|
5061
5071
|
selectTime(v, s) {
|
|
@@ -5099,8 +5109,8 @@ class FormTreeItemComponent {
|
|
|
5099
5109
|
this.item.parent = this.parent;
|
|
5100
5110
|
}
|
|
5101
5111
|
openClose(e) {
|
|
5102
|
-
const ch =
|
|
5103
|
-
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');
|
|
5104
5114
|
if (ch.hasClass('open')) {
|
|
5105
5115
|
ch.removeClass('open');
|
|
5106
5116
|
ch.stop().slideUp();
|
|
@@ -5174,7 +5184,7 @@ class FormTreeComponent {
|
|
|
5174
5184
|
}
|
|
5175
5185
|
}
|
|
5176
5186
|
onFocusIn() {
|
|
5177
|
-
|
|
5187
|
+
$$1(this.inputBase.nativeElement).focus();
|
|
5178
5188
|
}
|
|
5179
5189
|
getSelected() {
|
|
5180
5190
|
let l = [];
|
|
@@ -6259,15 +6269,15 @@ class TableOldRowComponent {
|
|
|
6259
6269
|
}
|
|
6260
6270
|
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');
|
|
6261
6271
|
this.showChildren.onClick = () => {
|
|
6262
|
-
if (
|
|
6263
|
-
|
|
6272
|
+
if ($$1(this.childrenDiv.nativeElement).is(':visible')) {
|
|
6273
|
+
$$1(this.childrenDiv.nativeElement).hide();
|
|
6264
6274
|
this.showChildren.icon = 'fa-duotone fa-angle-left f-s-22';
|
|
6265
6275
|
}
|
|
6266
6276
|
else if (this.children.length === 0) {
|
|
6267
6277
|
this.loadChildren(this.row.Data.Id);
|
|
6268
6278
|
}
|
|
6269
6279
|
else {
|
|
6270
|
-
|
|
6280
|
+
$$1(this.childrenDiv.nativeElement).show();
|
|
6271
6281
|
this.showChildren.icon = 'fa-duotone fa-angle-down f-s-22';
|
|
6272
6282
|
}
|
|
6273
6283
|
};
|
|
@@ -6290,7 +6300,7 @@ class TableOldRowComponent {
|
|
|
6290
6300
|
new RequestClass(this.table.environment, this.table.l).send(this.table.url + `List/${p}`, Method.Post, null, this.showChildren, (result) => {
|
|
6291
6301
|
this.children = result.List;
|
|
6292
6302
|
setTimeout(() => {
|
|
6293
|
-
|
|
6303
|
+
$$1(this.childrenDiv.nativeElement).slideDown();
|
|
6294
6304
|
this.showChildren.icon = 'fa-duotone fa-angle-down f-s-22';
|
|
6295
6305
|
}, 50);
|
|
6296
6306
|
});
|
|
@@ -6308,13 +6318,13 @@ class TableOldRowComponent {
|
|
|
6308
6318
|
setTimeout(() => {
|
|
6309
6319
|
if (this.table.hasChildren) {
|
|
6310
6320
|
// @ts-ignore
|
|
6311
|
-
|
|
6321
|
+
$$1(this.childrenDiv.nativeElement).sortable({
|
|
6312
6322
|
axis: 'y',
|
|
6313
6323
|
handle: '> .row > .item-con > .handle-sortable',
|
|
6314
6324
|
update: () => {
|
|
6315
6325
|
const data = [];
|
|
6316
6326
|
// @ts-ignore
|
|
6317
|
-
|
|
6327
|
+
$$1(this.childrenDiv.nativeElement).sortable('toArray').forEach(x => data.push(x));
|
|
6318
6328
|
new RequestClass(this.table.l).send(this.table.url + 'Sort', Method.Post, data, null, () => {
|
|
6319
6329
|
if (this.table.onSort) {
|
|
6320
6330
|
this.table.onSort();
|
|
@@ -6665,7 +6675,7 @@ class TableOldComponent {
|
|
|
6665
6675
|
this.table.load(this.reload);
|
|
6666
6676
|
};
|
|
6667
6677
|
this.maximum.onClick = () => {
|
|
6668
|
-
|
|
6678
|
+
$$1(this.tableDiv.nativeElement).toggleClass('maximum');
|
|
6669
6679
|
this.maximum.icon = this.maximum.name === 'Minimum' ? 'fa-duotone fa-arrows-maximize' : 'fa-duotone fa-arrows-minimize';
|
|
6670
6680
|
this.maximum.name = this.maximum.name === 'Minimum' ? 'Maximum' : 'Minimum';
|
|
6671
6681
|
};
|
|
@@ -6704,13 +6714,13 @@ class TableOldComponent {
|
|
|
6704
6714
|
setSortable() {
|
|
6705
6715
|
setTimeout(() => {
|
|
6706
6716
|
// @ts-ignore
|
|
6707
|
-
|
|
6717
|
+
$$1(this.rows.nativeElement).sortable({
|
|
6708
6718
|
axis: 'y',
|
|
6709
6719
|
items: 'tr',
|
|
6710
6720
|
update: () => {
|
|
6711
6721
|
const data = [];
|
|
6712
6722
|
// @ts-ignore
|
|
6713
|
-
|
|
6723
|
+
$$1(this.rows.nativeElement).sortable('toArray').forEach(x => data.push(x));
|
|
6714
6724
|
new RequestClass(this.table.l).send(this.table.url + 'Sort', Method.Post, { Ids: data }, null, () => {
|
|
6715
6725
|
if (this.table.onSort) {
|
|
6716
6726
|
this.table.onSort();
|
|
@@ -6741,7 +6751,7 @@ class TableOldComponent {
|
|
|
6741
6751
|
this.confirm.show(this.table.l('DeleteConfirm'), this.table.url + 'Delete/' + e.id, null, e.accept);
|
|
6742
6752
|
}
|
|
6743
6753
|
changeSort(e, s) {
|
|
6744
|
-
if (
|
|
6754
|
+
if ($$1(e.target).closest('.header-search').hasClass('header-search')) {
|
|
6745
6755
|
return;
|
|
6746
6756
|
}
|
|
6747
6757
|
this.table.sortType = this.table.sort === s ? this.table.sortType === 'ASC' ? 'DESC' : 'ASC' : 'ASC';
|