ps-toolkit-ui 0.2.95 → 0.2.98
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 +25 -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/checkbox/form.checkbox.component.js +20 -7
- package/esm2015/lib/components/table/row/table.row.component.js +2 -2
- package/fesm2015/ps-toolkit-ui.js +100 -87
- 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();
|
|
@@ -2058,7 +2058,7 @@ class TableRowComponent {
|
|
|
2058
2058
|
getOptions() {
|
|
2059
2059
|
const opts = [];
|
|
2060
2060
|
for (const option of this.row.Options.filter(x => x.Type === PermissionTypeEnum.Option && x.InputAction === PermissionInputActionEnum.Input)) {
|
|
2061
|
-
const inp = new InputClass(this.table.environment, this.table.l,
|
|
2061
|
+
const inp = new InputClass(this.table.environment, this.table.l, null, null, InputType.Check, 'h-25 without-border m-h-5 d-ib va-m f-u', this.row.Data[option.Action] === true);
|
|
2062
2062
|
inp.row = this.row;
|
|
2063
2063
|
inp.onChange = () => {
|
|
2064
2064
|
const p = new PermissionClass();
|
|
@@ -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) {
|
|
@@ -2855,9 +2855,12 @@ class FormCheckboxComponent {
|
|
|
2855
2855
|
this.changeIndex = new EventEmitter();
|
|
2856
2856
|
}
|
|
2857
2857
|
ngOnInit() {
|
|
2858
|
+
if (this.inp.value === true) {
|
|
2859
|
+
this.setValue(this.inp.value);
|
|
2860
|
+
}
|
|
2858
2861
|
this.inp.clear = () => {
|
|
2859
2862
|
this.inp.error = null;
|
|
2860
|
-
this.
|
|
2863
|
+
this.setValue(this.inp.default);
|
|
2861
2864
|
};
|
|
2862
2865
|
this.inp.isValid = () => {
|
|
2863
2866
|
this.inp.error = null;
|
|
@@ -2871,7 +2874,7 @@ class FormCheckboxComponent {
|
|
|
2871
2874
|
return this.inp.value;
|
|
2872
2875
|
};
|
|
2873
2876
|
this.inp.setValue = (v) => {
|
|
2874
|
-
this.
|
|
2877
|
+
this.setValue(v);
|
|
2875
2878
|
};
|
|
2876
2879
|
this.inp.focus = () => {
|
|
2877
2880
|
this.onFocusIn();
|
|
@@ -2882,7 +2885,16 @@ class FormCheckboxComponent {
|
|
|
2882
2885
|
this.inputBase.nativeElement.focus();
|
|
2883
2886
|
}
|
|
2884
2887
|
onClick() {
|
|
2885
|
-
this.
|
|
2888
|
+
this.setValue(!this.inp.value);
|
|
2889
|
+
}
|
|
2890
|
+
setValue(v) {
|
|
2891
|
+
this.inp.value = v;
|
|
2892
|
+
if (v) {
|
|
2893
|
+
$(this.inputCon.nativeElement).addClass('checked');
|
|
2894
|
+
}
|
|
2895
|
+
else {
|
|
2896
|
+
$(this.inputCon.nativeElement).removeClass('checked');
|
|
2897
|
+
}
|
|
2886
2898
|
}
|
|
2887
2899
|
onChange() {
|
|
2888
2900
|
if (this.inp.onChange) {
|
|
@@ -2902,8 +2914,8 @@ class FormCheckboxComponent {
|
|
|
2902
2914
|
FormCheckboxComponent.decorators = [
|
|
2903
2915
|
{ type: Component, args: [{
|
|
2904
2916
|
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 .
|
|
2917
|
+
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",
|
|
2918
|
+
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 30px 0 0}.form-input-con.checkbox.h-25 .form-input .control{font-size:10px;line-height:23px;min-height:25px;padding:0 25px}.form-input-con.checkbox.h-25 .form-input .control:after{font-size:14px;height:25px;line-height:23px;width:25px}.form-input-con.checkbox.h-25 .form-input i.icon{font-size:11px;height:25px;line-height:25px;width:25px}.form-input-con.checkbox.h-25.without-icon .form-input .control{padding:0 25px 0 0}"]
|
|
2907
2919
|
},] }
|
|
2908
2920
|
];
|
|
2909
2921
|
FormCheckboxComponent.ctorParameters = () => [];
|
|
@@ -2911,7 +2923,8 @@ FormCheckboxComponent.propDecorators = {
|
|
|
2911
2923
|
inp: [{ type: Input }],
|
|
2912
2924
|
changeIndex: [{ type: Output }],
|
|
2913
2925
|
inputBase: [{ type: ViewChild, args: ['inputBase',] }],
|
|
2914
|
-
inputDiv: [{ type: ViewChild, args: ['inputDiv',] }]
|
|
2926
|
+
inputDiv: [{ type: ViewChild, args: ['inputDiv',] }],
|
|
2927
|
+
inputCon: [{ type: ViewChild, args: ['inputCon',] }]
|
|
2915
2928
|
};
|
|
2916
2929
|
|
|
2917
2930
|
class FormDateComponent {
|
|
@@ -2966,7 +2979,7 @@ class FormDateComponent {
|
|
|
2966
2979
|
this.openCalendar();
|
|
2967
2980
|
};
|
|
2968
2981
|
this.inp.focusOut = () => {
|
|
2969
|
-
|
|
2982
|
+
$$1(this.inputBase.nativeElement).blur();
|
|
2970
2983
|
};
|
|
2971
2984
|
}
|
|
2972
2985
|
setInpValue(v) {
|
|
@@ -3051,16 +3064,16 @@ class FormDateComponent {
|
|
|
3051
3064
|
}
|
|
3052
3065
|
openCalendar() {
|
|
3053
3066
|
this.setPosition();
|
|
3054
|
-
|
|
3067
|
+
$$1(this.inputBase.nativeElement).focus();
|
|
3055
3068
|
}
|
|
3056
3069
|
onKeyDown(e) {
|
|
3057
3070
|
const code = e.keyCode || e.which;
|
|
3058
3071
|
if (code === 9 || code === 13) {
|
|
3059
3072
|
e.preventDefault();
|
|
3060
|
-
|
|
3073
|
+
$$1(this.inputDiv.nativeElement).removeClass('top');
|
|
3061
3074
|
this.changeIndex.emit(code === 9 ? e.shiftKey ? 'ShiftTab' : 'Tab' : e.shiftKey ? 'ShiftEnter' : 'Enter');
|
|
3062
3075
|
if (!this.inForm) {
|
|
3063
|
-
|
|
3076
|
+
$$1(this.inputBase.nativeElement).blur();
|
|
3064
3077
|
}
|
|
3065
3078
|
}
|
|
3066
3079
|
}
|
|
@@ -3092,7 +3105,7 @@ class FormDateComponent {
|
|
|
3092
3105
|
}
|
|
3093
3106
|
}
|
|
3094
3107
|
onFocusOut() {
|
|
3095
|
-
|
|
3108
|
+
$$1(this.inputDiv.nativeElement).removeClass('top');
|
|
3096
3109
|
this.inp.search = this.inp.value;
|
|
3097
3110
|
this.state = 'day';
|
|
3098
3111
|
}
|
|
@@ -3101,10 +3114,10 @@ class FormDateComponent {
|
|
|
3101
3114
|
const offsetOfBottom = window.innerHeight - rect.bottom;
|
|
3102
3115
|
const height = this.inputCalendarDiv.nativeElement.offsetHeight;
|
|
3103
3116
|
if (offsetOfBottom < height) {
|
|
3104
|
-
|
|
3117
|
+
$$1(this.inputDiv.nativeElement).addClass('top');
|
|
3105
3118
|
}
|
|
3106
3119
|
else {
|
|
3107
|
-
|
|
3120
|
+
$$1(this.inputDiv.nativeElement).removeClass('top');
|
|
3108
3121
|
}
|
|
3109
3122
|
}
|
|
3110
3123
|
selectDate(d) {
|
|
@@ -3119,10 +3132,10 @@ class FormDateComponent {
|
|
|
3119
3132
|
d.selected = true;
|
|
3120
3133
|
this.cSearch = this.inp.search;
|
|
3121
3134
|
setTimeout(() => {
|
|
3122
|
-
|
|
3135
|
+
$$1(this.inputDiv.nativeElement).removeClass('top');
|
|
3123
3136
|
this.changeIndex.emit('Tab');
|
|
3124
3137
|
if (!this.inForm) {
|
|
3125
|
-
|
|
3138
|
+
$$1(this.inputBase.nativeElement).blur();
|
|
3126
3139
|
}
|
|
3127
3140
|
}, 10);
|
|
3128
3141
|
if (this.inp.onChange) {
|
|
@@ -3347,7 +3360,7 @@ class FormFileComponent {
|
|
|
3347
3360
|
});
|
|
3348
3361
|
}
|
|
3349
3362
|
onClick() {
|
|
3350
|
-
|
|
3363
|
+
$$1(this.inputBase.nativeElement).focus();
|
|
3351
3364
|
}
|
|
3352
3365
|
onChange(e) {
|
|
3353
3366
|
this.inp.error = null;
|
|
@@ -3366,7 +3379,7 @@ class FormFileComponent {
|
|
|
3366
3379
|
}
|
|
3367
3380
|
}
|
|
3368
3381
|
onFocusIn() {
|
|
3369
|
-
|
|
3382
|
+
$$1(this.inputBase.nativeElement).focus();
|
|
3370
3383
|
}
|
|
3371
3384
|
title() {
|
|
3372
3385
|
if (this.inp.value == null || (this.inp.value instanceof Array && this.inp.value.length === 0)) {
|
|
@@ -3408,7 +3421,7 @@ class FormIconComponent {
|
|
|
3408
3421
|
};
|
|
3409
3422
|
}
|
|
3410
3423
|
onFocusIn() {
|
|
3411
|
-
|
|
3424
|
+
$$1(this.inputBase.nativeElement).focus();
|
|
3412
3425
|
}
|
|
3413
3426
|
onClick(e) {
|
|
3414
3427
|
if (e.screenX && e.screenX !== 0 && e.screenY && e.screenY !== 0) {
|
|
@@ -3662,28 +3675,28 @@ class FormPlaqueSelectComponent {
|
|
|
3662
3675
|
}
|
|
3663
3676
|
};
|
|
3664
3677
|
this.part1.onFocusOut = (e) => {
|
|
3665
|
-
if (
|
|
3678
|
+
if (!$$1(e.relatedTarget).closest('.form-input.plaque-select').hasClass('plaque-select') && !$$1(e.rangeParent).closest('.form-input.plaque-select').hasClass('plaque-select')) {
|
|
3666
3679
|
if (this.open) {
|
|
3667
3680
|
this.closeOptions();
|
|
3668
3681
|
}
|
|
3669
3682
|
}
|
|
3670
3683
|
};
|
|
3671
3684
|
this.part2.onFocusOut = (e) => {
|
|
3672
|
-
if (
|
|
3685
|
+
if (!$$1(e.relatedTarget).closest('.form-input.plaque-select').hasClass('plaque-select') && !$$1(e.rangeParent).closest('.form-input.plaque-select').hasClass('plaque-select')) {
|
|
3673
3686
|
if (this.open) {
|
|
3674
3687
|
this.closeOptions();
|
|
3675
3688
|
}
|
|
3676
3689
|
}
|
|
3677
3690
|
};
|
|
3678
3691
|
this.part3.onFocusOut = (e) => {
|
|
3679
|
-
if (
|
|
3692
|
+
if (!$$1(e.relatedTarget).closest('.form-input.plaque-select').hasClass('plaque-select') && !$$1(e.rangeParent).closest('.form-input.plaque-select').hasClass('plaque-select')) {
|
|
3680
3693
|
if (this.open) {
|
|
3681
3694
|
this.closeOptions();
|
|
3682
3695
|
}
|
|
3683
3696
|
}
|
|
3684
3697
|
};
|
|
3685
3698
|
this.part4.onFocusOut = (e) => {
|
|
3686
|
-
if (
|
|
3699
|
+
if (!$$1(e.relatedTarget).closest('.form-input.plaque-select').hasClass('plaque-select') && !$$1(e.rangeParent).closest('.form-input.plaque-select').hasClass('plaque-select')) {
|
|
3687
3700
|
if (this.open) {
|
|
3688
3701
|
this.closeOptions();
|
|
3689
3702
|
}
|
|
@@ -3824,8 +3837,8 @@ class FormPlaqueSelectComponent {
|
|
|
3824
3837
|
}
|
|
3825
3838
|
setHoverCenter() {
|
|
3826
3839
|
setTimeout(() => {
|
|
3827
|
-
const hover =
|
|
3828
|
-
const items =
|
|
3840
|
+
const hover = $$1(this.inputOptionsDiv.nativeElement).find('.option.hover');
|
|
3841
|
+
const items = $$1(this.inputOptionsDiv.nativeElement).find('.items');
|
|
3829
3842
|
if (hover.length === 0) {
|
|
3830
3843
|
return;
|
|
3831
3844
|
}
|
|
@@ -4162,7 +4175,7 @@ class FormRadioComponent {
|
|
|
4162
4175
|
}
|
|
4163
4176
|
}
|
|
4164
4177
|
onFocusIn() {
|
|
4165
|
-
|
|
4178
|
+
$$1(this.inputBase.nativeElement).focus();
|
|
4166
4179
|
}
|
|
4167
4180
|
}
|
|
4168
4181
|
FormRadioComponent.decorators = [
|
|
@@ -4191,8 +4204,8 @@ class FormSelectItemComponent {
|
|
|
4191
4204
|
this.select.hover = opt.index;
|
|
4192
4205
|
}
|
|
4193
4206
|
toggleChildren(e) {
|
|
4194
|
-
const ch =
|
|
4195
|
-
const oc =
|
|
4207
|
+
const ch = $$1(e.target).closest('.option-con').find(' > .children');
|
|
4208
|
+
const oc = $$1(e.target).closest('.option-con').find(' > .caret-icon');
|
|
4196
4209
|
if (ch.hasClass('open')) {
|
|
4197
4210
|
ch.removeClass('open');
|
|
4198
4211
|
ch.slideUp();
|
|
@@ -4277,7 +4290,7 @@ class FormSelectComponent {
|
|
|
4277
4290
|
return !this.inp.multiple ? (this.inp.addNew ? this.inp.search : this.inp.value) : this.getSelected();
|
|
4278
4291
|
};
|
|
4279
4292
|
this.inp.focusOut = () => {
|
|
4280
|
-
|
|
4293
|
+
$$1(this.inputBase.nativeElement).blur();
|
|
4281
4294
|
};
|
|
4282
4295
|
}
|
|
4283
4296
|
loadOptions() {
|
|
@@ -4292,14 +4305,14 @@ class FormSelectComponent {
|
|
|
4292
4305
|
openOptions() {
|
|
4293
4306
|
this.setPosition();
|
|
4294
4307
|
this.setHoverCenter();
|
|
4295
|
-
|
|
4308
|
+
$$1(this.inputBase.nativeElement).focus();
|
|
4296
4309
|
}
|
|
4297
4310
|
onFocusOut() {
|
|
4298
4311
|
this.closeOptions();
|
|
4299
4312
|
}
|
|
4300
4313
|
closeOptions() {
|
|
4301
4314
|
setTimeout(() => {
|
|
4302
|
-
|
|
4315
|
+
$$1(this.inputDiv.nativeElement).removeClass('top');
|
|
4303
4316
|
this.inp.hover = -1;
|
|
4304
4317
|
if (this.inp.value === null) {
|
|
4305
4318
|
if (!this.inp.addNew) {
|
|
@@ -4320,10 +4333,10 @@ class FormSelectComponent {
|
|
|
4320
4333
|
const offsetOfBottom = window.innerHeight - rect.bottom;
|
|
4321
4334
|
const height = this.inputOptionsDiv.nativeElement.offsetHeight;
|
|
4322
4335
|
if (offsetOfBottom < height) {
|
|
4323
|
-
|
|
4336
|
+
$$1(this.inputDiv.nativeElement).addClass('top');
|
|
4324
4337
|
}
|
|
4325
4338
|
else {
|
|
4326
|
-
|
|
4339
|
+
$$1(this.inputDiv.nativeElement).removeClass('top');
|
|
4327
4340
|
}
|
|
4328
4341
|
}
|
|
4329
4342
|
setOptions(r = this.inp.options) {
|
|
@@ -4341,7 +4354,7 @@ class FormSelectComponent {
|
|
|
4341
4354
|
}
|
|
4342
4355
|
else if (code === 13) {
|
|
4343
4356
|
e.preventDefault();
|
|
4344
|
-
if (
|
|
4357
|
+
if ($$1(this.inputBase.nativeElement).is(':focus')) {
|
|
4345
4358
|
const h = this.getSelectedHover();
|
|
4346
4359
|
if (!h) {
|
|
4347
4360
|
return;
|
|
@@ -4371,7 +4384,7 @@ class FormSelectComponent {
|
|
|
4371
4384
|
}
|
|
4372
4385
|
}
|
|
4373
4386
|
toggleOption(e) {
|
|
4374
|
-
if (this.inp.multiple &&
|
|
4387
|
+
if (this.inp.multiple && $$1(e.target).closest('.option').hasClass('option')) {
|
|
4375
4388
|
return;
|
|
4376
4389
|
}
|
|
4377
4390
|
this.openOptions();
|
|
@@ -4482,7 +4495,7 @@ class FormSelectComponent {
|
|
|
4482
4495
|
setTimeout(() => {
|
|
4483
4496
|
this.changeIndex.emit(i);
|
|
4484
4497
|
if (!this.inForm) {
|
|
4485
|
-
|
|
4498
|
+
$$1(this.inputBase.nativeElement).blur();
|
|
4486
4499
|
}
|
|
4487
4500
|
}, 10);
|
|
4488
4501
|
setTimeout(() => {
|
|
@@ -4491,8 +4504,8 @@ class FormSelectComponent {
|
|
|
4491
4504
|
}
|
|
4492
4505
|
setHoverCenter() {
|
|
4493
4506
|
setTimeout(() => {
|
|
4494
|
-
const hover =
|
|
4495
|
-
const items =
|
|
4507
|
+
const hover = $$1(this.inputOptionsDiv.nativeElement).find('.option.hover');
|
|
4508
|
+
const items = $$1(this.inputOptionsDiv.nativeElement).find('.items');
|
|
4496
4509
|
if (hover.length === 0) {
|
|
4497
4510
|
return;
|
|
4498
4511
|
}
|
|
@@ -5004,7 +5017,7 @@ class FormTimeComponent {
|
|
|
5004
5017
|
this.openOptions();
|
|
5005
5018
|
};
|
|
5006
5019
|
this.inp.focusOut = () => {
|
|
5007
|
-
|
|
5020
|
+
$$1(this.inputBase.nativeElement).blur();
|
|
5008
5021
|
};
|
|
5009
5022
|
}
|
|
5010
5023
|
toggleTime() {
|
|
@@ -5012,27 +5025,27 @@ class FormTimeComponent {
|
|
|
5012
5025
|
}
|
|
5013
5026
|
openOptions() {
|
|
5014
5027
|
this.setPosition();
|
|
5015
|
-
|
|
5028
|
+
$$1(this.inputBase.nativeElement).focus();
|
|
5016
5029
|
}
|
|
5017
5030
|
setPosition() {
|
|
5018
5031
|
const rect = this.inputDiv.nativeElement.getBoundingClientRect();
|
|
5019
5032
|
const offsetOfBottom = window.innerHeight - rect.bottom;
|
|
5020
5033
|
const height = this.inputOptionsDiv.nativeElement.offsetHeight;
|
|
5021
5034
|
if (offsetOfBottom < height) {
|
|
5022
|
-
|
|
5035
|
+
$$1(this.inputDiv.nativeElement).addClass('top');
|
|
5023
5036
|
}
|
|
5024
5037
|
else {
|
|
5025
|
-
|
|
5038
|
+
$$1(this.inputDiv.nativeElement).removeClass('top');
|
|
5026
5039
|
}
|
|
5027
5040
|
}
|
|
5028
5041
|
onKeyDown(e) {
|
|
5029
5042
|
const code = e.keyCode || e.which;
|
|
5030
5043
|
if (code === 9 || code === 13) {
|
|
5031
5044
|
e.preventDefault();
|
|
5032
|
-
|
|
5045
|
+
$$1(this.inputDiv.nativeElement).removeClass('top');
|
|
5033
5046
|
this.changeIndex.emit(code === 9 ? e.shiftKey ? 'ShiftTab' : 'Tab' : e.shiftKey ? 'ShiftEnter' : 'Enter');
|
|
5034
5047
|
if (!this.inForm) {
|
|
5035
|
-
|
|
5048
|
+
$$1(this.inputBase.nativeElement).blur();
|
|
5036
5049
|
}
|
|
5037
5050
|
}
|
|
5038
5051
|
}
|
|
@@ -5055,7 +5068,7 @@ class FormTimeComponent {
|
|
|
5055
5068
|
}
|
|
5056
5069
|
}
|
|
5057
5070
|
onFocusOut() {
|
|
5058
|
-
|
|
5071
|
+
$$1(this.inputDiv.nativeElement).removeClass('top');
|
|
5059
5072
|
this.inp.search = this.inp.value;
|
|
5060
5073
|
}
|
|
5061
5074
|
selectTime(v, s) {
|
|
@@ -5099,8 +5112,8 @@ class FormTreeItemComponent {
|
|
|
5099
5112
|
this.item.parent = this.parent;
|
|
5100
5113
|
}
|
|
5101
5114
|
openClose(e) {
|
|
5102
|
-
const ch =
|
|
5103
|
-
const oc =
|
|
5115
|
+
const ch = $$1(e.target).closest('.row-item').find(' > .children');
|
|
5116
|
+
const oc = $$1(e.target).closest('.row-item').find(' > .open-close');
|
|
5104
5117
|
if (ch.hasClass('open')) {
|
|
5105
5118
|
ch.removeClass('open');
|
|
5106
5119
|
ch.stop().slideUp();
|
|
@@ -5174,7 +5187,7 @@ class FormTreeComponent {
|
|
|
5174
5187
|
}
|
|
5175
5188
|
}
|
|
5176
5189
|
onFocusIn() {
|
|
5177
|
-
|
|
5190
|
+
$$1(this.inputBase.nativeElement).focus();
|
|
5178
5191
|
}
|
|
5179
5192
|
getSelected() {
|
|
5180
5193
|
let l = [];
|
|
@@ -6259,15 +6272,15 @@ class TableOldRowComponent {
|
|
|
6259
6272
|
}
|
|
6260
6273
|
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
6274
|
this.showChildren.onClick = () => {
|
|
6262
|
-
if (
|
|
6263
|
-
|
|
6275
|
+
if ($$1(this.childrenDiv.nativeElement).is(':visible')) {
|
|
6276
|
+
$$1(this.childrenDiv.nativeElement).hide();
|
|
6264
6277
|
this.showChildren.icon = 'fa-duotone fa-angle-left f-s-22';
|
|
6265
6278
|
}
|
|
6266
6279
|
else if (this.children.length === 0) {
|
|
6267
6280
|
this.loadChildren(this.row.Data.Id);
|
|
6268
6281
|
}
|
|
6269
6282
|
else {
|
|
6270
|
-
|
|
6283
|
+
$$1(this.childrenDiv.nativeElement).show();
|
|
6271
6284
|
this.showChildren.icon = 'fa-duotone fa-angle-down f-s-22';
|
|
6272
6285
|
}
|
|
6273
6286
|
};
|
|
@@ -6290,7 +6303,7 @@ class TableOldRowComponent {
|
|
|
6290
6303
|
new RequestClass(this.table.environment, this.table.l).send(this.table.url + `List/${p}`, Method.Post, null, this.showChildren, (result) => {
|
|
6291
6304
|
this.children = result.List;
|
|
6292
6305
|
setTimeout(() => {
|
|
6293
|
-
|
|
6306
|
+
$$1(this.childrenDiv.nativeElement).slideDown();
|
|
6294
6307
|
this.showChildren.icon = 'fa-duotone fa-angle-down f-s-22';
|
|
6295
6308
|
}, 50);
|
|
6296
6309
|
});
|
|
@@ -6308,13 +6321,13 @@ class TableOldRowComponent {
|
|
|
6308
6321
|
setTimeout(() => {
|
|
6309
6322
|
if (this.table.hasChildren) {
|
|
6310
6323
|
// @ts-ignore
|
|
6311
|
-
|
|
6324
|
+
$$1(this.childrenDiv.nativeElement).sortable({
|
|
6312
6325
|
axis: 'y',
|
|
6313
6326
|
handle: '> .row > .item-con > .handle-sortable',
|
|
6314
6327
|
update: () => {
|
|
6315
6328
|
const data = [];
|
|
6316
6329
|
// @ts-ignore
|
|
6317
|
-
|
|
6330
|
+
$$1(this.childrenDiv.nativeElement).sortable('toArray').forEach(x => data.push(x));
|
|
6318
6331
|
new RequestClass(this.table.l).send(this.table.url + 'Sort', Method.Post, data, null, () => {
|
|
6319
6332
|
if (this.table.onSort) {
|
|
6320
6333
|
this.table.onSort();
|
|
@@ -6665,7 +6678,7 @@ class TableOldComponent {
|
|
|
6665
6678
|
this.table.load(this.reload);
|
|
6666
6679
|
};
|
|
6667
6680
|
this.maximum.onClick = () => {
|
|
6668
|
-
|
|
6681
|
+
$$1(this.tableDiv.nativeElement).toggleClass('maximum');
|
|
6669
6682
|
this.maximum.icon = this.maximum.name === 'Minimum' ? 'fa-duotone fa-arrows-maximize' : 'fa-duotone fa-arrows-minimize';
|
|
6670
6683
|
this.maximum.name = this.maximum.name === 'Minimum' ? 'Maximum' : 'Minimum';
|
|
6671
6684
|
};
|
|
@@ -6704,13 +6717,13 @@ class TableOldComponent {
|
|
|
6704
6717
|
setSortable() {
|
|
6705
6718
|
setTimeout(() => {
|
|
6706
6719
|
// @ts-ignore
|
|
6707
|
-
|
|
6720
|
+
$$1(this.rows.nativeElement).sortable({
|
|
6708
6721
|
axis: 'y',
|
|
6709
6722
|
items: 'tr',
|
|
6710
6723
|
update: () => {
|
|
6711
6724
|
const data = [];
|
|
6712
6725
|
// @ts-ignore
|
|
6713
|
-
|
|
6726
|
+
$$1(this.rows.nativeElement).sortable('toArray').forEach(x => data.push(x));
|
|
6714
6727
|
new RequestClass(this.table.l).send(this.table.url + 'Sort', Method.Post, { Ids: data }, null, () => {
|
|
6715
6728
|
if (this.table.onSort) {
|
|
6716
6729
|
this.table.onSort();
|
|
@@ -6741,7 +6754,7 @@ class TableOldComponent {
|
|
|
6741
6754
|
this.confirm.show(this.table.l('DeleteConfirm'), this.table.url + 'Delete/' + e.id, null, e.accept);
|
|
6742
6755
|
}
|
|
6743
6756
|
changeSort(e, s) {
|
|
6744
|
-
if (
|
|
6757
|
+
if ($$1(e.target).closest('.header-search').hasClass('header-search')) {
|
|
6745
6758
|
return;
|
|
6746
6759
|
}
|
|
6747
6760
|
this.table.sortType = this.table.sort === s ? this.table.sortType === 'ASC' ? 'DESC' : 'ASC' : 'ASC';
|