ps-toolkit-ui 1.3.7 → 1.3.10
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 +14 -29
- 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/bank-card/form.bank-card.component.js +1 -2
- package/esm2015/lib/components/form/checkbox/form.checkbox.component.js +8 -20
- package/esm2015/lib/components/table/row/table.row.component.js +3 -5
- package/fesm2015/ps-toolkit-ui.js +89 -104
- package/fesm2015/ps-toolkit-ui.js.map +1 -1
- package/lib/components/form/checkbox/form.checkbox.component.d.ts +0 -2
- 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 $ 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 = $(e.target).closest('.accordion').find('.content.open');
|
|
32
32
|
const ocOpen = chOpen.closest('.accordion-item').find('.header > .icon');
|
|
33
|
-
const ch =
|
|
33
|
+
const ch = $(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
|
+
$('#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 = $('#' + 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
|
+
$('#AccordionRow' + this.id + ' > .header').click();
|
|
1551
1551
|
}, 100);
|
|
1552
1552
|
}
|
|
1553
1553
|
open() {
|
|
1554
1554
|
setTimeout(() => {
|
|
1555
|
-
if (
|
|
1556
|
-
|
|
1555
|
+
if (!$('#AccordionRow' + this.id + ' > .content').hasClass('open')) {
|
|
1556
|
+
$('#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
|
+
$(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 = $(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
|
+
$('#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
|
+
$('#Sidebar').toggleClass('open').toggleClass('close');
|
|
1724
1724
|
}
|
|
1725
1725
|
}
|
|
1726
1726
|
SidebarComponent.decorators = [
|
|
@@ -1990,15 +1990,15 @@ class TableRowComponent {
|
|
|
1990
1990
|
}
|
|
1991
1991
|
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');
|
|
1992
1992
|
this.showChildren.onClick = () => {
|
|
1993
|
-
if (
|
|
1994
|
-
|
|
1993
|
+
if ($(this.childrenDiv.nativeElement).is(':visible')) {
|
|
1994
|
+
$(this.childrenDiv.nativeElement).slideUp();
|
|
1995
1995
|
this.showChildren.icon = 'fa-duotone fa-angle-left f-s-22';
|
|
1996
1996
|
}
|
|
1997
1997
|
else if (this.children.length === 0) {
|
|
1998
1998
|
this.loadChildren(this.row.Data.Id);
|
|
1999
1999
|
}
|
|
2000
2000
|
else {
|
|
2001
|
-
|
|
2001
|
+
$(this.childrenDiv.nativeElement).slideDown();
|
|
2002
2002
|
this.showChildren.icon = 'fa-duotone fa-angle-down f-s-22';
|
|
2003
2003
|
}
|
|
2004
2004
|
};
|
|
@@ -2022,7 +2022,7 @@ class TableRowComponent {
|
|
|
2022
2022
|
new RequestClass(this.table.environment, this.table.l).send(this.table.url + `List/${p}`, Method.Post, null, this.showChildren, (result) => {
|
|
2023
2023
|
this.children = result.List;
|
|
2024
2024
|
setTimeout(() => {
|
|
2025
|
-
|
|
2025
|
+
$(this.childrenDiv.nativeElement).slideDown();
|
|
2026
2026
|
this.showChildren.icon = 'fa-duotone fa-angle-down f-s-22';
|
|
2027
2027
|
}, 50);
|
|
2028
2028
|
});
|
|
@@ -2040,13 +2040,13 @@ class TableRowComponent {
|
|
|
2040
2040
|
setTimeout(() => {
|
|
2041
2041
|
if (this.table.hasChildren) {
|
|
2042
2042
|
// @ts-ignore
|
|
2043
|
-
|
|
2043
|
+
$(this.childrenDiv.nativeElement).sortable({
|
|
2044
2044
|
axis: 'y',
|
|
2045
2045
|
handle: '> .row > .item-con > .handle-sortable',
|
|
2046
2046
|
update: () => {
|
|
2047
2047
|
const data = [];
|
|
2048
2048
|
// @ts-ignore
|
|
2049
|
-
|
|
2049
|
+
$(this.childrenDiv.nativeElement).sortable('toArray').forEach(x => data.push(x));
|
|
2050
2050
|
new RequestClass(this.table.l).send(this.table.url + 'Sort', Method.Post, data, null, () => {
|
|
2051
2051
|
if (this.table.onSort) {
|
|
2052
2052
|
this.table.onSort();
|
|
@@ -2058,20 +2058,18 @@ class TableRowComponent {
|
|
|
2058
2058
|
}, 500);
|
|
2059
2059
|
}
|
|
2060
2060
|
setOptions() {
|
|
2061
|
-
console.log('setOptionssetOptionssetOptionssetOptions');
|
|
2062
2061
|
const opts = [];
|
|
2063
2062
|
for (const option of this.row.Options.filter(x => x.Type === PermissionTypeEnum.Option && x.InputAction === PermissionInputActionEnum.Input)) {
|
|
2064
|
-
const inp = new InputClass(this.table.environment, this.table.l, null, null, InputType.Check, 'h-25 without-border m-h-5
|
|
2063
|
+
const inp = new InputClass(this.table.environment, this.table.l, null, null, InputType.Check, 'h-25 without-border m-h-5 p-0 w-u', this.row.Data[option.Action] === true);
|
|
2065
2064
|
inp.row = this.row;
|
|
2066
2065
|
inp.onChange = () => {
|
|
2067
|
-
console.log(inp.data(), 'onChangeonChangeonChange');
|
|
2068
2066
|
this.row.Data[option.Action] = !inp.data();
|
|
2069
2067
|
const p = new PermissionClass();
|
|
2070
2068
|
p.RelatedId = this.table.permissions.RelatedId;
|
|
2071
2069
|
p.Area = this.table.permissions.Area;
|
|
2072
2070
|
p.Controller = option.Controller;
|
|
2073
2071
|
p.Action = option.Action;
|
|
2074
|
-
new RequestClass(this.table.l).send(p.getUrl(), Method.Post, null, null, () => {
|
|
2072
|
+
new RequestClass(this.table.environment, this.table.l).send(p.getUrl() + '/' + this.row.Data.Id, Method.Post, null, null, () => {
|
|
2075
2073
|
});
|
|
2076
2074
|
};
|
|
2077
2075
|
inp.displayLabel = false;
|
|
@@ -2373,8 +2371,8 @@ class ModalClass {
|
|
|
2373
2371
|
if (this.onShow) {
|
|
2374
2372
|
this.onShow();
|
|
2375
2373
|
}
|
|
2376
|
-
|
|
2377
|
-
|
|
2374
|
+
$('body').addClass('open-modal');
|
|
2375
|
+
$('#' + this.id + 'Modal').fadeIn(300, () => {
|
|
2378
2376
|
if (this.form != null) {
|
|
2379
2377
|
const i = this.form.inputs.find(x => !x.disabled && x.type !== InputType.Label && x.type !== InputType.Hidden &&
|
|
2380
2378
|
x.type !== InputType.Constant && x.type !== InputType.Submit && x.type !== InputType.Button && x.type !== InputType.Icon &&
|
|
@@ -2386,8 +2384,8 @@ class ModalClass {
|
|
|
2386
2384
|
});
|
|
2387
2385
|
}
|
|
2388
2386
|
hide() {
|
|
2389
|
-
|
|
2390
|
-
|
|
2387
|
+
$('body').removeClass('open-modal');
|
|
2388
|
+
$('#' + this.id + 'Modal').fadeOut(300, () => {
|
|
2391
2389
|
if (this.form && this.form.name !== 'Confirm' && this.form.name !== 'Alert') {
|
|
2392
2390
|
this.form.clear();
|
|
2393
2391
|
if (this.form.onHideModal) {
|
|
@@ -2469,7 +2467,7 @@ class TableComponent {
|
|
|
2469
2467
|
this.table.load(this.reload);
|
|
2470
2468
|
};
|
|
2471
2469
|
this.maximum.onClick = () => {
|
|
2472
|
-
|
|
2470
|
+
$(this.tableDiv.nativeElement).toggleClass('maximum');
|
|
2473
2471
|
this.maximum.icon = this.maximum.name === 'Minimum' ? 'fa-duotone fa-arrows-maximize' : 'fa-duotone fa-arrows-minimize';
|
|
2474
2472
|
this.maximum.name = this.maximum.name === 'Minimum' ? 'Maximum' : 'Minimum';
|
|
2475
2473
|
};
|
|
@@ -2508,13 +2506,13 @@ class TableComponent {
|
|
|
2508
2506
|
setSortable() {
|
|
2509
2507
|
setTimeout(() => {
|
|
2510
2508
|
// @ts-ignore
|
|
2511
|
-
|
|
2509
|
+
$(this.rows.nativeElement).sortable({
|
|
2512
2510
|
axis: 'y',
|
|
2513
2511
|
items: 'tr',
|
|
2514
2512
|
update: () => {
|
|
2515
2513
|
const data = [];
|
|
2516
2514
|
// @ts-ignore
|
|
2517
|
-
|
|
2515
|
+
$(this.rows.nativeElement).sortable('toArray').forEach(x => data.push(x));
|
|
2518
2516
|
new RequestClass(this.table.l).send(this.table.url + 'Sort', Method.Post, { Ids: data }, null, () => {
|
|
2519
2517
|
if (this.table.onSort) {
|
|
2520
2518
|
this.table.onSort();
|
|
@@ -2545,7 +2543,7 @@ class TableComponent {
|
|
|
2545
2543
|
this.confirm.show(this.table.l('DeleteConfirm'), this.table.url + 'Delete/' + e.id, null, e.accept);
|
|
2546
2544
|
}
|
|
2547
2545
|
changeSort(e, s) {
|
|
2548
|
-
if (
|
|
2546
|
+
if ($(e.target).closest('.header-search').hasClass('header-search')) {
|
|
2549
2547
|
return;
|
|
2550
2548
|
}
|
|
2551
2549
|
this.table.sortType = this.table.sort === s ? this.table.sortType === 'ASC' ? 'DESC' : 'ASC' : 'ASC';
|
|
@@ -2712,13 +2710,12 @@ class FormBankCardComponent {
|
|
|
2712
2710
|
};
|
|
2713
2711
|
}
|
|
2714
2712
|
setIcon() {
|
|
2715
|
-
console.log(this.part1.data().toString() + this.part2.data().toString());
|
|
2716
2713
|
const b = this.banks.filter(x => x.startWith.includes(this.part1.data().toString() + this.part2.data().toString().substring(0, 2)));
|
|
2717
2714
|
if (b.length > 0) {
|
|
2718
|
-
|
|
2715
|
+
$(this.inputIcon.nativeElement).removeClass('fa-money-check').addClass(b[0].name);
|
|
2719
2716
|
}
|
|
2720
2717
|
else {
|
|
2721
|
-
|
|
2718
|
+
$(this.inputIcon.nativeElement).addClass('fa-money-check').removeClass(this.banks.map(x => x.name));
|
|
2722
2719
|
}
|
|
2723
2720
|
}
|
|
2724
2721
|
changeFocus(p, a) {
|
|
@@ -2799,7 +2796,7 @@ class FormButtonComponent {
|
|
|
2799
2796
|
};
|
|
2800
2797
|
}
|
|
2801
2798
|
onFocusIn() {
|
|
2802
|
-
|
|
2799
|
+
$(this.inputBase.nativeElement).focus();
|
|
2803
2800
|
}
|
|
2804
2801
|
onClick(e) {
|
|
2805
2802
|
if (e.screenX && e.screenX !== 0 && e.screenY && e.screenY !== 0) {
|
|
@@ -2860,10 +2857,9 @@ class FormCheckboxComponent {
|
|
|
2860
2857
|
this.changeIndex = new EventEmitter();
|
|
2861
2858
|
}
|
|
2862
2859
|
ngOnInit() {
|
|
2863
|
-
console.log(this.inp.value, 'ngOnInitngOnInitngOnInit');
|
|
2864
2860
|
this.inp.clear = () => {
|
|
2865
2861
|
this.inp.error = null;
|
|
2866
|
-
this.
|
|
2862
|
+
this.inp.value = this.inp.default;
|
|
2867
2863
|
};
|
|
2868
2864
|
this.inp.isValid = () => {
|
|
2869
2865
|
this.inp.error = null;
|
|
@@ -2877,29 +2873,19 @@ class FormCheckboxComponent {
|
|
|
2877
2873
|
return this.inp.value;
|
|
2878
2874
|
};
|
|
2879
2875
|
this.inp.setValue = (v) => {
|
|
2880
|
-
this.
|
|
2876
|
+
this.inp.value = v;
|
|
2881
2877
|
};
|
|
2882
2878
|
this.inp.focus = () => {
|
|
2883
2879
|
this.onFocusIn();
|
|
2884
2880
|
};
|
|
2881
|
+
this.inp.setValue(this.inp.value === true, false);
|
|
2885
2882
|
}
|
|
2886
2883
|
onFocusIn() {
|
|
2887
2884
|
this.inp.error = null;
|
|
2888
2885
|
this.inputBase.nativeElement.focus();
|
|
2889
2886
|
}
|
|
2890
2887
|
onClick() {
|
|
2891
|
-
this.
|
|
2892
|
-
console.log(this.inp.value, 'onClickonClickonClick');
|
|
2893
|
-
this.onChange();
|
|
2894
|
-
}
|
|
2895
|
-
setValue(v) {
|
|
2896
|
-
this.inp.value = v;
|
|
2897
|
-
if (v) {
|
|
2898
|
-
$(this.inputCon.nativeElement).addClass('checked');
|
|
2899
|
-
}
|
|
2900
|
-
else {
|
|
2901
|
-
$(this.inputCon.nativeElement).removeClass('checked');
|
|
2902
|
-
}
|
|
2888
|
+
this.inputBase.nativeElement.click();
|
|
2903
2889
|
}
|
|
2904
2890
|
onChange() {
|
|
2905
2891
|
if (this.inp.onChange) {
|
|
@@ -2919,8 +2905,8 @@ class FormCheckboxComponent {
|
|
|
2919
2905
|
FormCheckboxComponent.decorators = [
|
|
2920
2906
|
{ type: Component, args: [{
|
|
2921
2907
|
selector: 'lib-form-checkbox',
|
|
2922
|
-
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()\"
|
|
2923
|
-
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
|
|
2908
|
+
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)\" (change)=\"onChange()\" [disabled]=\"inp.disabled\" [(ngModel)]=\"inp.value\" #inputBase type=\"checkbox\" [name]=\"inp.name\" class=\"check\">\r\n <div (click)=\"onClick()\" 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",
|
|
2909
|
+
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 .check:checked+.control: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:18px;height:25px;line-height:25px;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;width:0}"]
|
|
2924
2910
|
},] }
|
|
2925
2911
|
];
|
|
2926
2912
|
FormCheckboxComponent.ctorParameters = () => [];
|
|
@@ -2928,8 +2914,7 @@ FormCheckboxComponent.propDecorators = {
|
|
|
2928
2914
|
inp: [{ type: Input }],
|
|
2929
2915
|
changeIndex: [{ type: Output }],
|
|
2930
2916
|
inputBase: [{ type: ViewChild, args: ['inputBase',] }],
|
|
2931
|
-
inputDiv: [{ type: ViewChild, args: ['inputDiv',] }]
|
|
2932
|
-
inputCon: [{ type: ViewChild, args: ['inputCon',] }]
|
|
2917
|
+
inputDiv: [{ type: ViewChild, args: ['inputDiv',] }]
|
|
2933
2918
|
};
|
|
2934
2919
|
|
|
2935
2920
|
class FormDateComponent {
|
|
@@ -2984,7 +2969,7 @@ class FormDateComponent {
|
|
|
2984
2969
|
this.openCalendar();
|
|
2985
2970
|
};
|
|
2986
2971
|
this.inp.focusOut = () => {
|
|
2987
|
-
|
|
2972
|
+
$(this.inputBase.nativeElement).blur();
|
|
2988
2973
|
};
|
|
2989
2974
|
}
|
|
2990
2975
|
setInpValue(v) {
|
|
@@ -3069,16 +3054,16 @@ class FormDateComponent {
|
|
|
3069
3054
|
}
|
|
3070
3055
|
openCalendar() {
|
|
3071
3056
|
this.setPosition();
|
|
3072
|
-
|
|
3057
|
+
$(this.inputBase.nativeElement).focus();
|
|
3073
3058
|
}
|
|
3074
3059
|
onKeyDown(e) {
|
|
3075
3060
|
const code = e.keyCode || e.which;
|
|
3076
3061
|
if (code === 9 || code === 13) {
|
|
3077
3062
|
e.preventDefault();
|
|
3078
|
-
|
|
3063
|
+
$(this.inputDiv.nativeElement).removeClass('top');
|
|
3079
3064
|
this.changeIndex.emit(code === 9 ? e.shiftKey ? 'ShiftTab' : 'Tab' : e.shiftKey ? 'ShiftEnter' : 'Enter');
|
|
3080
3065
|
if (!this.inForm) {
|
|
3081
|
-
|
|
3066
|
+
$(this.inputBase.nativeElement).blur();
|
|
3082
3067
|
}
|
|
3083
3068
|
}
|
|
3084
3069
|
}
|
|
@@ -3110,7 +3095,7 @@ class FormDateComponent {
|
|
|
3110
3095
|
}
|
|
3111
3096
|
}
|
|
3112
3097
|
onFocusOut() {
|
|
3113
|
-
|
|
3098
|
+
$(this.inputDiv.nativeElement).removeClass('top');
|
|
3114
3099
|
this.inp.search = this.inp.value;
|
|
3115
3100
|
this.state = 'day';
|
|
3116
3101
|
}
|
|
@@ -3119,10 +3104,10 @@ class FormDateComponent {
|
|
|
3119
3104
|
const offsetOfBottom = window.innerHeight - rect.bottom;
|
|
3120
3105
|
const height = this.inputCalendarDiv.nativeElement.offsetHeight;
|
|
3121
3106
|
if (offsetOfBottom < height) {
|
|
3122
|
-
|
|
3107
|
+
$(this.inputDiv.nativeElement).addClass('top');
|
|
3123
3108
|
}
|
|
3124
3109
|
else {
|
|
3125
|
-
|
|
3110
|
+
$(this.inputDiv.nativeElement).removeClass('top');
|
|
3126
3111
|
}
|
|
3127
3112
|
}
|
|
3128
3113
|
selectDate(d) {
|
|
@@ -3137,10 +3122,10 @@ class FormDateComponent {
|
|
|
3137
3122
|
d.selected = true;
|
|
3138
3123
|
this.cSearch = this.inp.search;
|
|
3139
3124
|
setTimeout(() => {
|
|
3140
|
-
|
|
3125
|
+
$(this.inputDiv.nativeElement).removeClass('top');
|
|
3141
3126
|
this.changeIndex.emit('Tab');
|
|
3142
3127
|
if (!this.inForm) {
|
|
3143
|
-
|
|
3128
|
+
$(this.inputBase.nativeElement).blur();
|
|
3144
3129
|
}
|
|
3145
3130
|
}, 10);
|
|
3146
3131
|
if (this.inp.onChange) {
|
|
@@ -3365,7 +3350,7 @@ class FormFileComponent {
|
|
|
3365
3350
|
});
|
|
3366
3351
|
}
|
|
3367
3352
|
onClick() {
|
|
3368
|
-
|
|
3353
|
+
$(this.inputBase.nativeElement).focus();
|
|
3369
3354
|
}
|
|
3370
3355
|
onChange(e) {
|
|
3371
3356
|
this.inp.error = null;
|
|
@@ -3384,7 +3369,7 @@ class FormFileComponent {
|
|
|
3384
3369
|
}
|
|
3385
3370
|
}
|
|
3386
3371
|
onFocusIn() {
|
|
3387
|
-
|
|
3372
|
+
$(this.inputBase.nativeElement).focus();
|
|
3388
3373
|
}
|
|
3389
3374
|
title() {
|
|
3390
3375
|
if (this.inp.value == null || (this.inp.value instanceof Array && this.inp.value.length === 0)) {
|
|
@@ -3426,7 +3411,7 @@ class FormIconComponent {
|
|
|
3426
3411
|
};
|
|
3427
3412
|
}
|
|
3428
3413
|
onFocusIn() {
|
|
3429
|
-
|
|
3414
|
+
$(this.inputBase.nativeElement).focus();
|
|
3430
3415
|
}
|
|
3431
3416
|
onClick(e) {
|
|
3432
3417
|
if (e.screenX && e.screenX !== 0 && e.screenY && e.screenY !== 0) {
|
|
@@ -3680,28 +3665,28 @@ class FormPlaqueSelectComponent {
|
|
|
3680
3665
|
}
|
|
3681
3666
|
};
|
|
3682
3667
|
this.part1.onFocusOut = (e) => {
|
|
3683
|
-
if (
|
|
3668
|
+
if (!$(e.relatedTarget).closest('.form-input.plaque-select').hasClass('plaque-select') && !$(e.rangeParent).closest('.form-input.plaque-select').hasClass('plaque-select')) {
|
|
3684
3669
|
if (this.open) {
|
|
3685
3670
|
this.closeOptions();
|
|
3686
3671
|
}
|
|
3687
3672
|
}
|
|
3688
3673
|
};
|
|
3689
3674
|
this.part2.onFocusOut = (e) => {
|
|
3690
|
-
if (
|
|
3675
|
+
if (!$(e.relatedTarget).closest('.form-input.plaque-select').hasClass('plaque-select') && !$(e.rangeParent).closest('.form-input.plaque-select').hasClass('plaque-select')) {
|
|
3691
3676
|
if (this.open) {
|
|
3692
3677
|
this.closeOptions();
|
|
3693
3678
|
}
|
|
3694
3679
|
}
|
|
3695
3680
|
};
|
|
3696
3681
|
this.part3.onFocusOut = (e) => {
|
|
3697
|
-
if (
|
|
3682
|
+
if (!$(e.relatedTarget).closest('.form-input.plaque-select').hasClass('plaque-select') && !$(e.rangeParent).closest('.form-input.plaque-select').hasClass('plaque-select')) {
|
|
3698
3683
|
if (this.open) {
|
|
3699
3684
|
this.closeOptions();
|
|
3700
3685
|
}
|
|
3701
3686
|
}
|
|
3702
3687
|
};
|
|
3703
3688
|
this.part4.onFocusOut = (e) => {
|
|
3704
|
-
if (
|
|
3689
|
+
if (!$(e.relatedTarget).closest('.form-input.plaque-select').hasClass('plaque-select') && !$(e.rangeParent).closest('.form-input.plaque-select').hasClass('plaque-select')) {
|
|
3705
3690
|
if (this.open) {
|
|
3706
3691
|
this.closeOptions();
|
|
3707
3692
|
}
|
|
@@ -3842,8 +3827,8 @@ class FormPlaqueSelectComponent {
|
|
|
3842
3827
|
}
|
|
3843
3828
|
setHoverCenter() {
|
|
3844
3829
|
setTimeout(() => {
|
|
3845
|
-
const hover =
|
|
3846
|
-
const items =
|
|
3830
|
+
const hover = $(this.inputOptionsDiv.nativeElement).find('.option.hover');
|
|
3831
|
+
const items = $(this.inputOptionsDiv.nativeElement).find('.items');
|
|
3847
3832
|
if (hover.length === 0) {
|
|
3848
3833
|
return;
|
|
3849
3834
|
}
|
|
@@ -4180,7 +4165,7 @@ class FormRadioComponent {
|
|
|
4180
4165
|
}
|
|
4181
4166
|
}
|
|
4182
4167
|
onFocusIn() {
|
|
4183
|
-
|
|
4168
|
+
$(this.inputBase.nativeElement).focus();
|
|
4184
4169
|
}
|
|
4185
4170
|
}
|
|
4186
4171
|
FormRadioComponent.decorators = [
|
|
@@ -4209,8 +4194,8 @@ class FormSelectItemComponent {
|
|
|
4209
4194
|
this.select.hover = opt.index;
|
|
4210
4195
|
}
|
|
4211
4196
|
toggleChildren(e) {
|
|
4212
|
-
const ch =
|
|
4213
|
-
const oc =
|
|
4197
|
+
const ch = $(e.target).closest('.option-con').find(' > .children');
|
|
4198
|
+
const oc = $(e.target).closest('.option-con').find(' > .caret-icon');
|
|
4214
4199
|
if (ch.hasClass('open')) {
|
|
4215
4200
|
ch.removeClass('open');
|
|
4216
4201
|
ch.slideUp();
|
|
@@ -4295,7 +4280,7 @@ class FormSelectComponent {
|
|
|
4295
4280
|
return !this.inp.multiple ? (this.inp.addNew ? this.inp.search : this.inp.value) : this.getSelected();
|
|
4296
4281
|
};
|
|
4297
4282
|
this.inp.focusOut = () => {
|
|
4298
|
-
|
|
4283
|
+
$(this.inputBase.nativeElement).blur();
|
|
4299
4284
|
};
|
|
4300
4285
|
}
|
|
4301
4286
|
loadOptions() {
|
|
@@ -4310,14 +4295,14 @@ class FormSelectComponent {
|
|
|
4310
4295
|
openOptions() {
|
|
4311
4296
|
this.setPosition();
|
|
4312
4297
|
this.setHoverCenter();
|
|
4313
|
-
|
|
4298
|
+
$(this.inputBase.nativeElement).focus();
|
|
4314
4299
|
}
|
|
4315
4300
|
onFocusOut() {
|
|
4316
4301
|
this.closeOptions();
|
|
4317
4302
|
}
|
|
4318
4303
|
closeOptions() {
|
|
4319
4304
|
setTimeout(() => {
|
|
4320
|
-
|
|
4305
|
+
$(this.inputDiv.nativeElement).removeClass('top');
|
|
4321
4306
|
this.inp.hover = -1;
|
|
4322
4307
|
if (this.inp.value === null) {
|
|
4323
4308
|
if (!this.inp.addNew) {
|
|
@@ -4338,10 +4323,10 @@ class FormSelectComponent {
|
|
|
4338
4323
|
const offsetOfBottom = window.innerHeight - rect.bottom;
|
|
4339
4324
|
const height = this.inputOptionsDiv.nativeElement.offsetHeight;
|
|
4340
4325
|
if (offsetOfBottom < height) {
|
|
4341
|
-
|
|
4326
|
+
$(this.inputDiv.nativeElement).addClass('top');
|
|
4342
4327
|
}
|
|
4343
4328
|
else {
|
|
4344
|
-
|
|
4329
|
+
$(this.inputDiv.nativeElement).removeClass('top');
|
|
4345
4330
|
}
|
|
4346
4331
|
}
|
|
4347
4332
|
setOptions(r = this.inp.options) {
|
|
@@ -4359,7 +4344,7 @@ class FormSelectComponent {
|
|
|
4359
4344
|
}
|
|
4360
4345
|
else if (code === 13) {
|
|
4361
4346
|
e.preventDefault();
|
|
4362
|
-
if (
|
|
4347
|
+
if ($(this.inputBase.nativeElement).is(':focus')) {
|
|
4363
4348
|
const h = this.getSelectedHover();
|
|
4364
4349
|
if (!h) {
|
|
4365
4350
|
return;
|
|
@@ -4389,7 +4374,7 @@ class FormSelectComponent {
|
|
|
4389
4374
|
}
|
|
4390
4375
|
}
|
|
4391
4376
|
toggleOption(e) {
|
|
4392
|
-
if (this.inp.multiple &&
|
|
4377
|
+
if (this.inp.multiple && $(e.target).closest('.option').hasClass('option')) {
|
|
4393
4378
|
return;
|
|
4394
4379
|
}
|
|
4395
4380
|
this.openOptions();
|
|
@@ -4500,7 +4485,7 @@ class FormSelectComponent {
|
|
|
4500
4485
|
setTimeout(() => {
|
|
4501
4486
|
this.changeIndex.emit(i);
|
|
4502
4487
|
if (!this.inForm) {
|
|
4503
|
-
|
|
4488
|
+
$(this.inputBase.nativeElement).blur();
|
|
4504
4489
|
}
|
|
4505
4490
|
}, 10);
|
|
4506
4491
|
setTimeout(() => {
|
|
@@ -4509,8 +4494,8 @@ class FormSelectComponent {
|
|
|
4509
4494
|
}
|
|
4510
4495
|
setHoverCenter() {
|
|
4511
4496
|
setTimeout(() => {
|
|
4512
|
-
const hover =
|
|
4513
|
-
const items =
|
|
4497
|
+
const hover = $(this.inputOptionsDiv.nativeElement).find('.option.hover');
|
|
4498
|
+
const items = $(this.inputOptionsDiv.nativeElement).find('.items');
|
|
4514
4499
|
if (hover.length === 0) {
|
|
4515
4500
|
return;
|
|
4516
4501
|
}
|
|
@@ -5022,7 +5007,7 @@ class FormTimeComponent {
|
|
|
5022
5007
|
this.openOptions();
|
|
5023
5008
|
};
|
|
5024
5009
|
this.inp.focusOut = () => {
|
|
5025
|
-
|
|
5010
|
+
$(this.inputBase.nativeElement).blur();
|
|
5026
5011
|
};
|
|
5027
5012
|
}
|
|
5028
5013
|
toggleTime() {
|
|
@@ -5030,27 +5015,27 @@ class FormTimeComponent {
|
|
|
5030
5015
|
}
|
|
5031
5016
|
openOptions() {
|
|
5032
5017
|
this.setPosition();
|
|
5033
|
-
|
|
5018
|
+
$(this.inputBase.nativeElement).focus();
|
|
5034
5019
|
}
|
|
5035
5020
|
setPosition() {
|
|
5036
5021
|
const rect = this.inputDiv.nativeElement.getBoundingClientRect();
|
|
5037
5022
|
const offsetOfBottom = window.innerHeight - rect.bottom;
|
|
5038
5023
|
const height = this.inputOptionsDiv.nativeElement.offsetHeight;
|
|
5039
5024
|
if (offsetOfBottom < height) {
|
|
5040
|
-
|
|
5025
|
+
$(this.inputDiv.nativeElement).addClass('top');
|
|
5041
5026
|
}
|
|
5042
5027
|
else {
|
|
5043
|
-
|
|
5028
|
+
$(this.inputDiv.nativeElement).removeClass('top');
|
|
5044
5029
|
}
|
|
5045
5030
|
}
|
|
5046
5031
|
onKeyDown(e) {
|
|
5047
5032
|
const code = e.keyCode || e.which;
|
|
5048
5033
|
if (code === 9 || code === 13) {
|
|
5049
5034
|
e.preventDefault();
|
|
5050
|
-
|
|
5035
|
+
$(this.inputDiv.nativeElement).removeClass('top');
|
|
5051
5036
|
this.changeIndex.emit(code === 9 ? e.shiftKey ? 'ShiftTab' : 'Tab' : e.shiftKey ? 'ShiftEnter' : 'Enter');
|
|
5052
5037
|
if (!this.inForm) {
|
|
5053
|
-
|
|
5038
|
+
$(this.inputBase.nativeElement).blur();
|
|
5054
5039
|
}
|
|
5055
5040
|
}
|
|
5056
5041
|
}
|
|
@@ -5073,7 +5058,7 @@ class FormTimeComponent {
|
|
|
5073
5058
|
}
|
|
5074
5059
|
}
|
|
5075
5060
|
onFocusOut() {
|
|
5076
|
-
|
|
5061
|
+
$(this.inputDiv.nativeElement).removeClass('top');
|
|
5077
5062
|
this.inp.search = this.inp.value;
|
|
5078
5063
|
}
|
|
5079
5064
|
selectTime(v, s) {
|
|
@@ -5117,8 +5102,8 @@ class FormTreeItemComponent {
|
|
|
5117
5102
|
this.item.parent = this.parent;
|
|
5118
5103
|
}
|
|
5119
5104
|
openClose(e) {
|
|
5120
|
-
const ch =
|
|
5121
|
-
const oc =
|
|
5105
|
+
const ch = $(e.target).closest('.row-item').find(' > .children');
|
|
5106
|
+
const oc = $(e.target).closest('.row-item').find(' > .open-close');
|
|
5122
5107
|
if (ch.hasClass('open')) {
|
|
5123
5108
|
ch.removeClass('open');
|
|
5124
5109
|
ch.stop().slideUp();
|
|
@@ -5192,7 +5177,7 @@ class FormTreeComponent {
|
|
|
5192
5177
|
}
|
|
5193
5178
|
}
|
|
5194
5179
|
onFocusIn() {
|
|
5195
|
-
|
|
5180
|
+
$(this.inputBase.nativeElement).focus();
|
|
5196
5181
|
}
|
|
5197
5182
|
getSelected() {
|
|
5198
5183
|
let l = [];
|
|
@@ -6277,15 +6262,15 @@ class TableOldRowComponent {
|
|
|
6277
6262
|
}
|
|
6278
6263
|
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');
|
|
6279
6264
|
this.showChildren.onClick = () => {
|
|
6280
|
-
if (
|
|
6281
|
-
|
|
6265
|
+
if ($(this.childrenDiv.nativeElement).is(':visible')) {
|
|
6266
|
+
$(this.childrenDiv.nativeElement).hide();
|
|
6282
6267
|
this.showChildren.icon = 'fa-duotone fa-angle-left f-s-22';
|
|
6283
6268
|
}
|
|
6284
6269
|
else if (this.children.length === 0) {
|
|
6285
6270
|
this.loadChildren(this.row.Data.Id);
|
|
6286
6271
|
}
|
|
6287
6272
|
else {
|
|
6288
|
-
|
|
6273
|
+
$(this.childrenDiv.nativeElement).show();
|
|
6289
6274
|
this.showChildren.icon = 'fa-duotone fa-angle-down f-s-22';
|
|
6290
6275
|
}
|
|
6291
6276
|
};
|
|
@@ -6308,7 +6293,7 @@ class TableOldRowComponent {
|
|
|
6308
6293
|
new RequestClass(this.table.environment, this.table.l).send(this.table.url + `List/${p}`, Method.Post, null, this.showChildren, (result) => {
|
|
6309
6294
|
this.children = result.List;
|
|
6310
6295
|
setTimeout(() => {
|
|
6311
|
-
|
|
6296
|
+
$(this.childrenDiv.nativeElement).slideDown();
|
|
6312
6297
|
this.showChildren.icon = 'fa-duotone fa-angle-down f-s-22';
|
|
6313
6298
|
}, 50);
|
|
6314
6299
|
});
|
|
@@ -6326,13 +6311,13 @@ class TableOldRowComponent {
|
|
|
6326
6311
|
setTimeout(() => {
|
|
6327
6312
|
if (this.table.hasChildren) {
|
|
6328
6313
|
// @ts-ignore
|
|
6329
|
-
|
|
6314
|
+
$(this.childrenDiv.nativeElement).sortable({
|
|
6330
6315
|
axis: 'y',
|
|
6331
6316
|
handle: '> .row > .item-con > .handle-sortable',
|
|
6332
6317
|
update: () => {
|
|
6333
6318
|
const data = [];
|
|
6334
6319
|
// @ts-ignore
|
|
6335
|
-
|
|
6320
|
+
$(this.childrenDiv.nativeElement).sortable('toArray').forEach(x => data.push(x));
|
|
6336
6321
|
new RequestClass(this.table.l).send(this.table.url + 'Sort', Method.Post, data, null, () => {
|
|
6337
6322
|
if (this.table.onSort) {
|
|
6338
6323
|
this.table.onSort();
|
|
@@ -6683,7 +6668,7 @@ class TableOldComponent {
|
|
|
6683
6668
|
this.table.load(this.reload);
|
|
6684
6669
|
};
|
|
6685
6670
|
this.maximum.onClick = () => {
|
|
6686
|
-
|
|
6671
|
+
$(this.tableDiv.nativeElement).toggleClass('maximum');
|
|
6687
6672
|
this.maximum.icon = this.maximum.name === 'Minimum' ? 'fa-duotone fa-arrows-maximize' : 'fa-duotone fa-arrows-minimize';
|
|
6688
6673
|
this.maximum.name = this.maximum.name === 'Minimum' ? 'Maximum' : 'Minimum';
|
|
6689
6674
|
};
|
|
@@ -6722,13 +6707,13 @@ class TableOldComponent {
|
|
|
6722
6707
|
setSortable() {
|
|
6723
6708
|
setTimeout(() => {
|
|
6724
6709
|
// @ts-ignore
|
|
6725
|
-
|
|
6710
|
+
$(this.rows.nativeElement).sortable({
|
|
6726
6711
|
axis: 'y',
|
|
6727
6712
|
items: 'tr',
|
|
6728
6713
|
update: () => {
|
|
6729
6714
|
const data = [];
|
|
6730
6715
|
// @ts-ignore
|
|
6731
|
-
|
|
6716
|
+
$(this.rows.nativeElement).sortable('toArray').forEach(x => data.push(x));
|
|
6732
6717
|
new RequestClass(this.table.l).send(this.table.url + 'Sort', Method.Post, { Ids: data }, null, () => {
|
|
6733
6718
|
if (this.table.onSort) {
|
|
6734
6719
|
this.table.onSort();
|
|
@@ -6759,7 +6744,7 @@ class TableOldComponent {
|
|
|
6759
6744
|
this.confirm.show(this.table.l('DeleteConfirm'), this.table.url + 'Delete/' + e.id, null, e.accept);
|
|
6760
6745
|
}
|
|
6761
6746
|
changeSort(e, s) {
|
|
6762
|
-
if (
|
|
6747
|
+
if ($(e.target).closest('.header-search').hasClass('header-search')) {
|
|
6763
6748
|
return;
|
|
6764
6749
|
}
|
|
6765
6750
|
this.table.sortType = this.table.sort === s ? this.table.sortType === 'ASC' ? 'DESC' : 'ASC' : 'ASC';
|