ps-toolkit-ui 1.21.73 → 1.21.82
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 +160 -122
- 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/classes/enum.class.js +35 -34
- package/esm2015/lib/classes/form.class.js +1 -2
- package/esm2015/lib/classes/helper.class.js +1 -2
- package/esm2015/lib/classes/modal.class.js +1 -2
- package/esm2015/lib/classes/request.class.js +4 -2
- package/esm2015/lib/classes/table.class.js +1 -2
- package/esm2015/lib/components/accordion/accordion.component.js +1 -2
- package/esm2015/lib/components/form/bank-card/form.bank-card.component.js +1 -2
- package/esm2015/lib/components/form/button/form.button.component.js +1 -2
- package/esm2015/lib/components/form/date/form.date.component.js +1 -2
- package/esm2015/lib/components/form/file/form.file.component.js +1 -2
- package/esm2015/lib/components/form/icon/form.icon.component.js +1 -2
- package/esm2015/lib/components/form/index/form.component.js +2 -2
- package/esm2015/lib/components/form/plaque/select/form.plaque.select.component.js +1 -2
- package/esm2015/lib/components/form/pre/form.pre.component.js +32 -0
- package/esm2015/lib/components/form/radio/form.radio.component.js +1 -2
- package/esm2015/lib/components/form/select/form.select.component.js +1 -2
- package/esm2015/lib/components/form/select/item/form.select.item.component.js +1 -1
- package/esm2015/lib/components/form/slide/form.slide.component.js +1 -2
- package/esm2015/lib/components/form/star/form.star.component.js +1 -2
- package/esm2015/lib/components/form/tag/form.tag.component.js +1 -2
- package/esm2015/lib/components/form/textbox/form.textbox.component.js +1 -1
- package/esm2015/lib/components/form/time/form.time.component.js +1 -2
- package/esm2015/lib/components/form/toggle/form.toggle.component.js +1 -1
- package/esm2015/lib/components/form/tree/form.tree.component.js +1 -2
- package/esm2015/lib/components/form/tree/item/form.tree.item.component.js +1 -2
- package/esm2015/lib/components/form/uploader/form.uploader.component.js +1 -2
- package/esm2015/lib/components/form/vehicle/form.vehicle.component.js +1 -1
- package/esm2015/lib/components/form/vehicle/search/form.vehicle.search.component.js +1 -1
- package/esm2015/lib/components/header/header.component.js +1 -2
- package/esm2015/lib/components/sidebar/item/sidebar.item.component.js +1 -2
- package/esm2015/lib/components/sidebar/sidebar.component.js +1 -2
- package/esm2015/lib/components/table/row/table.row.component.js +1 -2
- package/esm2015/lib/components/table/table.component.js +1 -2
- package/esm2015/lib/ps-toolkit-ui.module.js +4 -2
- package/esm2015/ps-toolkit-ui.js +2 -1
- package/fesm2015/ps-toolkit-ui.js +154 -120
- package/fesm2015/ps-toolkit-ui.js.map +1 -1
- package/lib/classes/enum.class.d.ts +34 -33
- package/lib/components/form/pre/form.pre.component.d.ts +8 -0
- package/package.json +3 -3
- package/ps-toolkit-ui.d.ts +1 -0
- package/ps-toolkit-ui.metadata.json +1 -1
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import { Inject, Component, Input, Injectable, EventEmitter, Output, ViewChild, HostListener, Pipe, NgModule } from '@angular/core';
|
|
2
|
-
import * as $$1 from 'jquery';
|
|
3
|
-
import { ajax, param } from 'jquery';
|
|
4
2
|
import { merge, get, groupBy, set, cloneDeep } from 'lodash';
|
|
5
3
|
import * as moment from 'jalali-moment';
|
|
6
4
|
import { now } from 'jalali-moment';
|
|
@@ -35,9 +33,9 @@ class AccordionComponent {
|
|
|
35
33
|
constructor() {
|
|
36
34
|
}
|
|
37
35
|
toggle(e) {
|
|
38
|
-
const chOpen =
|
|
36
|
+
const chOpen = $(e.target).closest('.accordion').find('.content.open');
|
|
39
37
|
const ocOpen = chOpen.closest('.accordion-item').find('.header > .icon');
|
|
40
|
-
const ch =
|
|
38
|
+
const ch = $(e.target).closest('.accordion-item').find(' > .content');
|
|
41
39
|
const oc = ch.closest('.accordion-item').find(' > .header > .icon');
|
|
42
40
|
if (ch.hasClass('open')) {
|
|
43
41
|
ch.removeClass('open');
|
|
@@ -442,39 +440,40 @@ var InputType;
|
|
|
442
440
|
InputType[InputType["Check"] = 21] = "Check";
|
|
443
441
|
InputType[InputType["TextArea"] = 22] = "TextArea";
|
|
444
442
|
InputType[InputType["Label"] = 23] = "Label";
|
|
445
|
-
InputType[InputType["
|
|
446
|
-
InputType[InputType["
|
|
447
|
-
InputType[InputType["
|
|
448
|
-
InputType[InputType["
|
|
449
|
-
InputType[InputType["
|
|
450
|
-
InputType[InputType["
|
|
451
|
-
InputType[InputType["
|
|
452
|
-
InputType[InputType["
|
|
453
|
-
InputType[InputType["
|
|
454
|
-
InputType[InputType["
|
|
455
|
-
InputType[InputType["
|
|
456
|
-
InputType[InputType["
|
|
457
|
-
InputType[InputType["
|
|
458
|
-
InputType[InputType["
|
|
459
|
-
InputType[InputType["
|
|
460
|
-
InputType[InputType["
|
|
461
|
-
InputType[InputType["
|
|
462
|
-
InputType[InputType["
|
|
463
|
-
InputType[InputType["
|
|
464
|
-
InputType[InputType["
|
|
465
|
-
InputType[InputType["
|
|
466
|
-
InputType[InputType["
|
|
467
|
-
InputType[InputType["
|
|
468
|
-
InputType[InputType["
|
|
469
|
-
InputType[InputType["
|
|
470
|
-
InputType[InputType["
|
|
471
|
-
InputType[InputType["
|
|
472
|
-
InputType[InputType["
|
|
473
|
-
InputType[InputType["
|
|
474
|
-
InputType[InputType["
|
|
475
|
-
InputType[InputType["
|
|
476
|
-
InputType[InputType["
|
|
477
|
-
InputType[InputType["
|
|
443
|
+
InputType[InputType["Pre"] = 24] = "Pre";
|
|
444
|
+
InputType[InputType["Button"] = 25] = "Button";
|
|
445
|
+
InputType[InputType["Submit"] = 26] = "Submit";
|
|
446
|
+
InputType[InputType["Icon"] = 27] = "Icon";
|
|
447
|
+
InputType[InputType["File"] = 28] = "File";
|
|
448
|
+
InputType[InputType["Url"] = 29] = "Url";
|
|
449
|
+
InputType[InputType["Price"] = 30] = "Price";
|
|
450
|
+
InputType[InputType["Radio"] = 31] = "Radio";
|
|
451
|
+
InputType[InputType["Tree"] = 32] = "Tree";
|
|
452
|
+
InputType[InputType["TreeRadio"] = 33] = "TreeRadio";
|
|
453
|
+
InputType[InputType["Plaque"] = 34] = "Plaque";
|
|
454
|
+
InputType[InputType["PlaqueM"] = 35] = "PlaqueM";
|
|
455
|
+
InputType[InputType["PlaqueF"] = 36] = "PlaqueF";
|
|
456
|
+
InputType[InputType["PlaqueG"] = 37] = "PlaqueG";
|
|
457
|
+
InputType[InputType["SelectAutoCompletePlaque"] = 38] = "SelectAutoCompletePlaque";
|
|
458
|
+
InputType[InputType["SelectAutoCompletePlaqueM"] = 39] = "SelectAutoCompletePlaqueM";
|
|
459
|
+
InputType[InputType["SelectAutoCompletePlaqueF"] = 40] = "SelectAutoCompletePlaqueF";
|
|
460
|
+
InputType[InputType["SelectAutoCompletePlaqueG"] = 41] = "SelectAutoCompletePlaqueG";
|
|
461
|
+
InputType[InputType["BankCard"] = 42] = "BankCard";
|
|
462
|
+
InputType[InputType["Constant"] = 43] = "Constant";
|
|
463
|
+
InputType[InputType["Hidden"] = 44] = "Hidden";
|
|
464
|
+
InputType[InputType["Table"] = 45] = "Table";
|
|
465
|
+
InputType[InputType["Tag"] = 46] = "Tag";
|
|
466
|
+
InputType[InputType["VehicleSearch"] = 47] = "VehicleSearch";
|
|
467
|
+
InputType[InputType["Vehicle"] = 48] = "Vehicle";
|
|
468
|
+
InputType[InputType["Finger"] = 49] = "Finger";
|
|
469
|
+
InputType[InputType["Color"] = 50] = "Color";
|
|
470
|
+
InputType[InputType["Star"] = 51] = "Star";
|
|
471
|
+
InputType[InputType["Toggle"] = 52] = "Toggle";
|
|
472
|
+
InputType[InputType["BillNumber"] = 53] = "BillNumber";
|
|
473
|
+
InputType[InputType["Ckeditor"] = 54] = "Ckeditor";
|
|
474
|
+
InputType[InputType["Uploader"] = 55] = "Uploader";
|
|
475
|
+
InputType[InputType["Slide"] = 56] = "Slide";
|
|
476
|
+
InputType[InputType["Username"] = 57] = "Username";
|
|
478
477
|
})(InputType || (InputType = {}));
|
|
479
478
|
var OperationEnum;
|
|
480
479
|
(function (OperationEnum) {
|
|
@@ -638,7 +637,7 @@ class HeaderComponent {
|
|
|
638
637
|
}
|
|
639
638
|
get type() { return InputType; }
|
|
640
639
|
showUserDropDown(e) {
|
|
641
|
-
|
|
640
|
+
$(e.target).closest('#Header').find('.user-drop-down').slideToggle(100);
|
|
642
641
|
}
|
|
643
642
|
}
|
|
644
643
|
HeaderComponent.decorators = [
|
|
@@ -1137,9 +1136,9 @@ class HelperClass {
|
|
|
1137
1136
|
static addNotification(m, e = true) {
|
|
1138
1137
|
const id = HelperClass.random(20);
|
|
1139
1138
|
// tslint:disable-next-line
|
|
1140
|
-
|
|
1139
|
+
$('#Notifications').append('<div id="' + id + '" class="con"><div class="item ' + (e ? 'error' : 'success') + '"><i class="fas fa-times"></i><div>' + m + '</div></div></div>');
|
|
1141
1140
|
setTimeout(() => {
|
|
1142
|
-
const d =
|
|
1141
|
+
const d = $('#' + id);
|
|
1143
1142
|
d.fadeOut(300, () => {
|
|
1144
1143
|
d.remove();
|
|
1145
1144
|
});
|
|
@@ -1225,7 +1224,7 @@ class HelperClass {
|
|
|
1225
1224
|
if (inp.type === InputType.Text) {
|
|
1226
1225
|
inp.setValue(s, false);
|
|
1227
1226
|
setTimeout(() => {
|
|
1228
|
-
|
|
1227
|
+
$('#' + inp.id + 'TextInput .control').click();
|
|
1229
1228
|
}, 100);
|
|
1230
1229
|
}
|
|
1231
1230
|
if (inp.onBarcodeReaderChange !== null) {
|
|
@@ -1478,6 +1477,9 @@ class RequestClass {
|
|
|
1478
1477
|
if (token != null) {
|
|
1479
1478
|
h.AuthorizationCu = tokenCu;
|
|
1480
1479
|
}
|
|
1480
|
+
if (this.environment.apiVersion) {
|
|
1481
|
+
h.ApiVersion = this.environment.apiVersion;
|
|
1482
|
+
}
|
|
1481
1483
|
if (!(data instanceof FormData)) {
|
|
1482
1484
|
data = HelperClass.jsonToFormData(data);
|
|
1483
1485
|
}
|
|
@@ -1495,7 +1497,7 @@ class RequestClass {
|
|
|
1495
1497
|
if (request != null) {
|
|
1496
1498
|
request.abort();
|
|
1497
1499
|
}
|
|
1498
|
-
request = ajax(settings);
|
|
1500
|
+
request = $.ajax(settings);
|
|
1499
1501
|
request.done((response) => {
|
|
1500
1502
|
if (!this.environment.production) {
|
|
1501
1503
|
console.log('%c' + Method[method].toString() + ' : ' + url, 'background: #2f6054; color: white', response);
|
|
@@ -2164,13 +2166,13 @@ class AccordionRowClass {
|
|
|
2164
2166
|
}
|
|
2165
2167
|
toggle() {
|
|
2166
2168
|
setTimeout(() => {
|
|
2167
|
-
|
|
2169
|
+
$('#AccordionRow' + this.id + ' > .header').click();
|
|
2168
2170
|
}, 100);
|
|
2169
2171
|
}
|
|
2170
2172
|
open() {
|
|
2171
2173
|
setTimeout(() => {
|
|
2172
|
-
if (
|
|
2173
|
-
|
|
2174
|
+
if (!$('#AccordionRow' + this.id + ' > .content').hasClass('open')) {
|
|
2175
|
+
$('#AccordionRow' + this.id + ' > .header').click();
|
|
2174
2176
|
}
|
|
2175
2177
|
}, 100);
|
|
2176
2178
|
}
|
|
@@ -2207,7 +2209,7 @@ class SidebarItemComponent {
|
|
|
2207
2209
|
};
|
|
2208
2210
|
}
|
|
2209
2211
|
openClose(e) {
|
|
2210
|
-
const op =
|
|
2212
|
+
const op = $(e.target).closest('.user-sidebar-item');
|
|
2211
2213
|
if (op.hasClass('open')) {
|
|
2212
2214
|
op.removeClass('open');
|
|
2213
2215
|
op.find(' > .children').slideUp();
|
|
@@ -2229,7 +2231,7 @@ class SidebarItemComponent {
|
|
|
2229
2231
|
return false;
|
|
2230
2232
|
}
|
|
2231
2233
|
closeSidebar() {
|
|
2232
|
-
|
|
2234
|
+
$('#Sidebar').addClass('open').removeClass('close');
|
|
2233
2235
|
}
|
|
2234
2236
|
}
|
|
2235
2237
|
SidebarItemComponent.decorators = [
|
|
@@ -2353,7 +2355,7 @@ class SidebarComponent {
|
|
|
2353
2355
|
return null;
|
|
2354
2356
|
}
|
|
2355
2357
|
toggleSidebar() {
|
|
2356
|
-
|
|
2358
|
+
$('#Sidebar').toggleClass('open').toggleClass('close');
|
|
2357
2359
|
}
|
|
2358
2360
|
}
|
|
2359
2361
|
SidebarComponent.decorators = [
|
|
@@ -2583,13 +2585,13 @@ class TableRowComponent {
|
|
|
2583
2585
|
get type() { return InputType; }
|
|
2584
2586
|
get tableOptionType() { return TableOptionType; }
|
|
2585
2587
|
mouseOut(e) {
|
|
2586
|
-
|
|
2588
|
+
$(e.target).find('.options-con').removeClass('show-group');
|
|
2587
2589
|
}
|
|
2588
2590
|
ngOnInit() {
|
|
2589
2591
|
this.row.subTable = this.table.subTable != null ? HelperClass.clone(this.table.subTable) : null;
|
|
2590
2592
|
this.group = new InputClass(this.table.environment, this.table.l, 'ShowOptions', 'fas fa-ellipsis-vertical', InputType.Icon, 'blue m-h-5 h-25 d-ib va-m f-u');
|
|
2591
2593
|
this.group.onFocusIn = (e) => {
|
|
2592
|
-
|
|
2594
|
+
$(e.target).closest('.options-con').addClass('show-group');
|
|
2593
2595
|
};
|
|
2594
2596
|
this.group.onFocusOut = (e) => {
|
|
2595
2597
|
// $(e.target).closest('.options-con').removeClass('show-group');
|
|
@@ -2614,8 +2616,8 @@ class TableRowComponent {
|
|
|
2614
2616
|
this.showChildren = new InputClass(this.table.environment, this.table.l, this.table.name + 'SubsetTitle', 'fad fa-angle-left f-s-22', this.row.Data.CountChild > 0 || (!this.table.childrenAutoLoad && this.children.length > 0) || this.row.subTable != null ? InputType.Icon : InputType.Hidden, 'h-25 m-h-5 d-ib va-m f-u');
|
|
2615
2617
|
this.showChildren.onClick = () => {
|
|
2616
2618
|
var _a, _b;
|
|
2617
|
-
if (
|
|
2618
|
-
|
|
2619
|
+
if ($(this.childrenDiv.nativeElement).is(':visible')) {
|
|
2620
|
+
$(this.childrenDiv.nativeElement).slideUp();
|
|
2619
2621
|
this.showChildren.icon = 'fad fa-angle-left f-s-22';
|
|
2620
2622
|
}
|
|
2621
2623
|
else if (this.table.hasChildren && this.children.length === 0) {
|
|
@@ -2631,11 +2633,11 @@ class TableRowComponent {
|
|
|
2631
2633
|
ps.Accesses = (_b = (_a = this.table.permissions.Accesses) === null || _a === void 0 ? void 0 : _a.filter(x => x.ParentId === acc.Id)) !== null && _b !== void 0 ? _b : [];
|
|
2632
2634
|
this.row.subTable.permissions = ps;
|
|
2633
2635
|
this.row.subTable.set();
|
|
2634
|
-
|
|
2636
|
+
$(this.childrenDiv.nativeElement).slideDown();
|
|
2635
2637
|
this.showChildren.icon = 'fad fa-angle-down f-s-22';
|
|
2636
2638
|
}
|
|
2637
2639
|
else {
|
|
2638
|
-
|
|
2640
|
+
$(this.childrenDiv.nativeElement).slideDown();
|
|
2639
2641
|
this.showChildren.icon = 'fad fa-angle-down f-s-22';
|
|
2640
2642
|
}
|
|
2641
2643
|
};
|
|
@@ -2656,7 +2658,7 @@ class TableRowComponent {
|
|
|
2656
2658
|
new RequestClass(this.table.environment, this.table.l).send(this.table.url + `/${p}`, Method.Post, data, this.showChildren, (result) => {
|
|
2657
2659
|
this.children = result.List;
|
|
2658
2660
|
setTimeout(() => {
|
|
2659
|
-
|
|
2661
|
+
$(this.childrenDiv.nativeElement).slideDown();
|
|
2660
2662
|
this.showChildren.icon = 'fad fa-angle-down f-s-22';
|
|
2661
2663
|
}, 50);
|
|
2662
2664
|
}, () => { });
|
|
@@ -2677,14 +2679,14 @@ class TableRowComponent {
|
|
|
2677
2679
|
if (this.table.hasChildren) {
|
|
2678
2680
|
setTimeout(() => {
|
|
2679
2681
|
// @ts-ignore
|
|
2680
|
-
|
|
2682
|
+
$(this.childrenDiv.nativeElement).sortable({
|
|
2681
2683
|
axis: 'y',
|
|
2682
2684
|
items: '.row',
|
|
2683
2685
|
handle: '> .handle-con > .handle.handle-sortable',
|
|
2684
2686
|
update: () => {
|
|
2685
2687
|
const data = [];
|
|
2686
2688
|
// @ts-ignore
|
|
2687
|
-
|
|
2689
|
+
$(this.childrenDiv.nativeElement).sortable('toArray', { attribute: 'data-id' }).forEach(x => {
|
|
2688
2690
|
data.push(parseInt(x, 10));
|
|
2689
2691
|
});
|
|
2690
2692
|
const p = new PermissionClass();
|
|
@@ -2950,7 +2952,7 @@ class TableRowComponent {
|
|
|
2950
2952
|
}
|
|
2951
2953
|
selectRow(e) {
|
|
2952
2954
|
if (this.table.withSelect) {
|
|
2953
|
-
if (
|
|
2955
|
+
if ($(e.target).closest('.handle-con').hasClass('handle-con') || $(e.target).closest('.options-cell').hasClass('options-cell')) {
|
|
2954
2956
|
return;
|
|
2955
2957
|
}
|
|
2956
2958
|
const s = this.table.rows.find(x => x.selected);
|
|
@@ -2965,7 +2967,7 @@ class TableRowComponent {
|
|
|
2965
2967
|
}
|
|
2966
2968
|
dblclickRow(e) {
|
|
2967
2969
|
if (this.table.withSelect) {
|
|
2968
|
-
if (
|
|
2970
|
+
if ($(e.target).closest('.handle-con').hasClass('handle-con') || $(e.target).closest('.options-cell').hasClass('options-cell')) {
|
|
2969
2971
|
return;
|
|
2970
2972
|
}
|
|
2971
2973
|
const s = this.table.rows.find(x => x.selected);
|
|
@@ -3028,8 +3030,8 @@ class ModalClass {
|
|
|
3028
3030
|
if (this.onShow) {
|
|
3029
3031
|
this.onShow(data);
|
|
3030
3032
|
}
|
|
3031
|
-
|
|
3032
|
-
|
|
3033
|
+
$('body').addClass('open-modal');
|
|
3034
|
+
$('#' + this.id + 'Modal').fadeIn(300, () => {
|
|
3033
3035
|
if (this.form != null) {
|
|
3034
3036
|
if (this.form.onShowModal) {
|
|
3035
3037
|
this.form.onShowModal();
|
|
@@ -3039,8 +3041,8 @@ class ModalClass {
|
|
|
3039
3041
|
});
|
|
3040
3042
|
}
|
|
3041
3043
|
hide() {
|
|
3042
|
-
|
|
3043
|
-
|
|
3044
|
+
$('body').removeClass('open-modal');
|
|
3045
|
+
$('#' + this.id + 'Modal').fadeOut(300, () => {
|
|
3044
3046
|
if (this.onHide) {
|
|
3045
3047
|
this.onHide();
|
|
3046
3048
|
}
|
|
@@ -3128,7 +3130,7 @@ class TableComponent {
|
|
|
3128
3130
|
this.table.load(this.reload);
|
|
3129
3131
|
};
|
|
3130
3132
|
this.export.onClick = () => {
|
|
3131
|
-
|
|
3133
|
+
$(this.exportDropDown.nativeElement).slideToggle();
|
|
3132
3134
|
};
|
|
3133
3135
|
this.pdf.onClick = () => {
|
|
3134
3136
|
this.exportTable(TableExportType.Pdf, this.pdf);
|
|
@@ -3143,12 +3145,12 @@ class TableComponent {
|
|
|
3143
3145
|
this.exportTable(TableExportType.Print, this.print);
|
|
3144
3146
|
};
|
|
3145
3147
|
this.maximum.onClick = () => {
|
|
3146
|
-
|
|
3148
|
+
$(this.tableDiv.nativeElement).toggleClass('maximum');
|
|
3147
3149
|
this.maximum.icon = this.maximum.name === 'Minimum' ? 'fad fa-arrows-maximize' : 'fad fa-arrows-minimize';
|
|
3148
3150
|
this.maximum.name = this.maximum.name === 'Minimum' ? 'Maximum' : 'Minimum';
|
|
3149
3151
|
};
|
|
3150
3152
|
this.expertSearch.onClick = () => {
|
|
3151
|
-
|
|
3153
|
+
$(this.tableDiv.nativeElement).addClass('show-expert-search');
|
|
3152
3154
|
};
|
|
3153
3155
|
this.table.showConfirm = (l, url, data, accept) => {
|
|
3154
3156
|
this.confirm.show(l, url, data, accept);
|
|
@@ -3208,14 +3210,14 @@ class TableComponent {
|
|
|
3208
3210
|
setSortable() {
|
|
3209
3211
|
setTimeout(() => {
|
|
3210
3212
|
// @ts-ignore
|
|
3211
|
-
|
|
3213
|
+
$(this.rows.nativeElement).sortable({
|
|
3212
3214
|
axis: 'y',
|
|
3213
3215
|
items: '.row',
|
|
3214
3216
|
handle: '> .handle-con > .handle.handle-sortable',
|
|
3215
3217
|
update: () => {
|
|
3216
3218
|
const data = [];
|
|
3217
3219
|
// @ts-ignore
|
|
3218
|
-
|
|
3220
|
+
$(this.rows.nativeElement).sortable('toArray', { attribute: 'data-id' }).forEach(x => {
|
|
3219
3221
|
data.push(parseInt(x, 10));
|
|
3220
3222
|
});
|
|
3221
3223
|
const p = new PermissionClass();
|
|
@@ -3253,7 +3255,7 @@ class TableComponent {
|
|
|
3253
3255
|
this.confirm.show(this.table.l(e.action + 'Confirm'), e.url, e.data, e.accept);
|
|
3254
3256
|
}
|
|
3255
3257
|
changeSort(e, s) {
|
|
3256
|
-
if (
|
|
3258
|
+
if ($(e.target).closest('.header-search').hasClass('header-search')) {
|
|
3257
3259
|
return;
|
|
3258
3260
|
}
|
|
3259
3261
|
this.table.sortType = this.table.sort === s ? this.table.sortType === 'ASC' ? 'DESC' : null : 'ASC';
|
|
@@ -3264,8 +3266,8 @@ class TableComponent {
|
|
|
3264
3266
|
return this.table.optionsActions.filter(x => x instanceof ModalClass);
|
|
3265
3267
|
}
|
|
3266
3268
|
hideExpertSearch(e) {
|
|
3267
|
-
if (this.table.expertSearch &&
|
|
3268
|
-
|
|
3269
|
+
if (this.table.expertSearch && $(e.target).hasClass('search-form')) {
|
|
3270
|
+
$(this.tableDiv.nativeElement).removeClass('show-expert-search');
|
|
3269
3271
|
}
|
|
3270
3272
|
}
|
|
3271
3273
|
}
|
|
@@ -3427,10 +3429,10 @@ class FormBankCardComponent {
|
|
|
3427
3429
|
setIcon() {
|
|
3428
3430
|
const b = this.banks.filter(x => { var _a, _b; return x.startWith.includes(((_a = this.part1.data()) !== null && _a !== void 0 ? _a : '').toString() + ((_b = this.part2.data()) !== null && _b !== void 0 ? _b : '').toString().substring(0, 2)); });
|
|
3429
3431
|
if (b.length > 0) {
|
|
3430
|
-
|
|
3432
|
+
$(this.inputIcon.nativeElement).removeClass('fa-money-check').addClass(b[0].name);
|
|
3431
3433
|
}
|
|
3432
3434
|
else {
|
|
3433
|
-
|
|
3435
|
+
$(this.inputIcon.nativeElement).addClass('fa-money-check').removeClass(this.banks.map(x => x.name));
|
|
3434
3436
|
}
|
|
3435
3437
|
}
|
|
3436
3438
|
changeFocus(p, a) {
|
|
@@ -3511,7 +3513,7 @@ class FormButtonComponent {
|
|
|
3511
3513
|
};
|
|
3512
3514
|
}
|
|
3513
3515
|
onFocusIn() {
|
|
3514
|
-
|
|
3516
|
+
$(this.inputBase.nativeElement).focus();
|
|
3515
3517
|
}
|
|
3516
3518
|
onClick(e) {
|
|
3517
3519
|
if (e.screenX && e.screenX !== 0 && e.screenY && e.screenY !== 0) {
|
|
@@ -3689,7 +3691,7 @@ class FormDateComponent {
|
|
|
3689
3691
|
this.openCalendar();
|
|
3690
3692
|
};
|
|
3691
3693
|
this.inp.focusOut = () => {
|
|
3692
|
-
|
|
3694
|
+
$(this.inputBase.nativeElement).blur();
|
|
3693
3695
|
};
|
|
3694
3696
|
}
|
|
3695
3697
|
setInpValue(v) {
|
|
@@ -3814,16 +3816,16 @@ class FormDateComponent {
|
|
|
3814
3816
|
}
|
|
3815
3817
|
openCalendar() {
|
|
3816
3818
|
this.setPosition();
|
|
3817
|
-
|
|
3819
|
+
$(this.inputBase.nativeElement).focus();
|
|
3818
3820
|
}
|
|
3819
3821
|
onKeyDown(e) {
|
|
3820
3822
|
const code = e.keyCode || e.which;
|
|
3821
3823
|
if (code === 9 || code === 13) {
|
|
3822
3824
|
e.preventDefault();
|
|
3823
|
-
|
|
3825
|
+
$(this.inputDiv.nativeElement).removeClass('top');
|
|
3824
3826
|
this.changeIndex.emit(code === 9 ? e.shiftKey ? 'ShiftTab' : 'Tab' : e.shiftKey ? 'ShiftEnter' : 'Enter');
|
|
3825
3827
|
if (!this.inForm) {
|
|
3826
|
-
|
|
3828
|
+
$(this.inputBase.nativeElement).blur();
|
|
3827
3829
|
}
|
|
3828
3830
|
}
|
|
3829
3831
|
}
|
|
@@ -3861,7 +3863,7 @@ class FormDateComponent {
|
|
|
3861
3863
|
}
|
|
3862
3864
|
}
|
|
3863
3865
|
onFocusOut() {
|
|
3864
|
-
|
|
3866
|
+
$(this.inputDiv.nativeElement).removeClass('top');
|
|
3865
3867
|
this.inp.search = this.inp.value != null ?
|
|
3866
3868
|
(this.inp.type === InputType.Year ?
|
|
3867
3869
|
moment(this.inp.value, 'jYYYY/jMM/jDD').locale('fa').format('jYYYY') :
|
|
@@ -3876,10 +3878,10 @@ class FormDateComponent {
|
|
|
3876
3878
|
const offsetOfBottom = window.innerHeight - rect.bottom;
|
|
3877
3879
|
const height = this.inputCalendarDiv.nativeElement.offsetHeight;
|
|
3878
3880
|
if (offsetOfBottom < height) {
|
|
3879
|
-
|
|
3881
|
+
$(this.inputDiv.nativeElement).addClass('top');
|
|
3880
3882
|
}
|
|
3881
3883
|
else {
|
|
3882
|
-
|
|
3884
|
+
$(this.inputDiv.nativeElement).removeClass('top');
|
|
3883
3885
|
}
|
|
3884
3886
|
}
|
|
3885
3887
|
selectDate(d) {
|
|
@@ -3894,10 +3896,10 @@ class FormDateComponent {
|
|
|
3894
3896
|
d.selected = true;
|
|
3895
3897
|
this.cSearch = this.inp.search;
|
|
3896
3898
|
setTimeout(() => {
|
|
3897
|
-
|
|
3899
|
+
$(this.inputDiv.nativeElement).removeClass('top');
|
|
3898
3900
|
this.changeIndex.emit('Tab');
|
|
3899
3901
|
if (!this.inForm) {
|
|
3900
|
-
|
|
3902
|
+
$(this.inputBase.nativeElement).blur();
|
|
3901
3903
|
}
|
|
3902
3904
|
}, 10);
|
|
3903
3905
|
if (this.inp.onChange) {
|
|
@@ -4117,7 +4119,7 @@ class FormFileComponent {
|
|
|
4117
4119
|
});
|
|
4118
4120
|
}
|
|
4119
4121
|
onClick() {
|
|
4120
|
-
|
|
4122
|
+
$(this.inputBase.nativeElement).focus();
|
|
4121
4123
|
}
|
|
4122
4124
|
onChange(e) {
|
|
4123
4125
|
this.inp.error = null;
|
|
@@ -4136,7 +4138,7 @@ class FormFileComponent {
|
|
|
4136
4138
|
}
|
|
4137
4139
|
}
|
|
4138
4140
|
onFocusIn() {
|
|
4139
|
-
|
|
4141
|
+
$(this.inputBase.nativeElement).focus();
|
|
4140
4142
|
}
|
|
4141
4143
|
title() {
|
|
4142
4144
|
if (this.inp.value == null || (this.inp.value instanceof Array && this.inp.value.length === 0)) {
|
|
@@ -4178,7 +4180,7 @@ class FormIconComponent {
|
|
|
4178
4180
|
};
|
|
4179
4181
|
}
|
|
4180
4182
|
onFocusIn(e = null) {
|
|
4181
|
-
|
|
4183
|
+
$(this.inputBase.nativeElement).focus();
|
|
4182
4184
|
if (this.inp.onFocusIn) {
|
|
4183
4185
|
this.inp.onFocusIn(e);
|
|
4184
4186
|
}
|
|
@@ -4285,7 +4287,7 @@ class FormComponent {
|
|
|
4285
4287
|
FormComponent.decorators = [
|
|
4286
4288
|
{ type: Component, args: [{
|
|
4287
4289
|
selector: 'lib-form',
|
|
4288
|
-
template: "<form [style]=\"form.style\" *ngIf=\"form\" [id]=\"form.id + 'Form'\" [className]=\"'form w-100 m-0' + (form.class ? ' ' + form.class : '')\">\r\n <div *ngIf=\"form.displayLabel\" [className]=\"(form.subName ? '' : 'underline ') + 'title'\">{{this.form.l(this.form.name)}}</div>\r\n <div *ngIf=\"form.displayLabel && form.subName\" class=\"sub-title underline\" [innerHTML]=\"this.form.l(this.form.subName)\"></div>\r\n <div *ngIf=\"form.loading\" class=\"loading\">\r\n <div class=\"text\" [innerHTML]=\"form.l('LoadingTable', 'Processing')\"></div>\r\n </div>\r\n <div *ngIf=\"!form.permission\" class=\"loading\">\r\n <div class=\"text\"><i class=\"fas fa-shield-alt icon\"></i>{{ form.l(\"PermissionDenied\") }}</div>\r\n </div>\r\n <ng-content></ng-content>\r\n <div class=\"inputs\">\r\n <span *ngFor=\"let inp of form.inputs; let i = index\">\r\n <lib-form-textbox (changeIndex)=\"changeIndex(i, $event)\" *ngIf=\"inp.visible && (inp.type == type.Text || inp.type == type.Password || inp.type == type.Mobile || inp.type == type.Username || inp.type == type.Phone || inp.type == type.Email || inp.type == type.NationalCode || inp.type == type.NationalNum || inp.type == type.NationalCodeNum || inp.type == type.EconomicNum || inp.type == type.Number || inp.type == type.Url || inp.type == type.PostalCode || inp.type == type.Price || inp.type == type.Sheba || inp.type == type.Color || inp.type == type.BillNumber)\" [inp]=\"inp\"></lib-form-textbox>\r\n <lib-form-textarea (changeIndex)=\"changeIndex(i, $event)\" *ngIf=\"inp.visible && inp.type == type.TextArea\" [inp]=\"inp\"></lib-form-textarea>\r\n <lib-form-checkbox (changeIndex)=\"changeIndex(i, $event)\" *ngIf=\"inp.visible && inp.type == type.Check\" [inp]=\"inp\"></lib-form-checkbox>\r\n <lib-form-select (changeIndex)=\"changeIndex(i, $event)\" *ngIf=\"inp.visible && (inp.type == type.Select || inp.type == type.SelectSearch || inp.type == type.SelectSearchRadio || inp.type == type.SelectAutoComplete)\" [inp]=\"inp\" [inForm]=\"true\"></lib-form-select>\r\n <lib-form-date (changeIndex)=\"changeIndex(i, $event)\" *ngIf=\"inp.visible && (inp.type == type.Date || inp.type == type.Month || inp.type == type.Year)\" [inp]=\"inp\" [inForm]=\"true\"></lib-form-date>\r\n <lib-form-time (changeIndex)=\"changeIndex(i, $event)\" *ngIf=\"inp.visible && inp.type == type.Time\" [inp]=\"inp\" [inForm]=\"true\"></lib-form-time>\r\n <lib-form-datetime (changeIndex)=\"changeIndex(i, $event)\" *ngIf=\"inp.visible && inp.type == type.DateTime\" [inp]=\"inp\" [inForm]=\"true\"></lib-form-datetime>\r\n <lib-form-file (changeIndex)=\"changeIndex(i, $event)\" *ngIf=\"inp.visible && inp.type == type.File\" [inp]=\"inp\"></lib-form-file>\r\n <lib-form-button (changeIndex)=\"changeIndex(i, $event)\" *ngIf=\"inp.visible && (inp.type == type.Button || inp.type == type.Submit)\" [inp]=\"inp\"></lib-form-button>\r\n <lib-form-icon (changeIndex)=\"changeIndex(i, $event)\" *ngIf=\"inp.visible && inp.type == type.Icon\" [inp]=\"inp\"></lib-form-icon>\r\n <lib-form-radio (changeIndex)=\"changeIndex(i, $event)\" *ngIf=\"inp.visible && inp.type == type.Radio\" [inp]=\"inp\"></lib-form-radio>\r\n <lib-form-tree (changeIndex)=\"changeIndex(i, $event)\" *ngIf=\"inp.visible && (inp.type == type.Tree || inp.type == type.TreeRadio)\" [inp]=\"inp\"></lib-form-tree>\r\n <lib-form-plaque (changeIndex)=\"changeIndex(i, $event)\" *ngIf=\"inp.visible && (inp.type == type.Plaque || inp.type == type.PlaqueM || inp.type == type.PlaqueF || inp.type == type.PlaqueG)\" [inp]=\"inp\"></lib-form-plaque>\r\n <lib-form-plaque-select (changeIndex)=\"changeIndex(i, $event)\" *ngIf=\"inp.visible && (inp.type == type.SelectAutoCompletePlaque || inp.type == type.SelectAutoCompletePlaqueM || inp.type == type.SelectAutoCompletePlaqueF || inp.type == type.SelectAutoCompletePlaqueG)\" [inp]=\"inp\"></lib-form-plaque-select>\r\n <lib-form-bank-card (changeIndex)=\"changeIndex(i, $event)\" *ngIf=\"inp.visible && inp.type == type.BankCard\" [inp]=\"inp\"></lib-form-bank-card>\r\n <lib-form-vehicle-search (changeIndex)=\"changeIndex(i, $event)\" *ngIf=\"inp.visible && inp.type == type.VehicleSearch\" [inp]=\"inp\"></lib-form-vehicle-search>\r\n <lib-form-vehicle (changeIndex)=\"changeIndex(i, $event)\" *ngIf=\"inp.visible && inp.type == type.Vehicle\" [inp]=\"inp\"></lib-form-vehicle>\r\n <lib-form-finger (changeIndex)=\"changeIndex(i, $event)\" *ngIf=\"inp.visible && inp.type == type.Finger\" [inp]=\"inp\"></lib-form-finger>\r\n <lib-form-star (changeIndex)=\"changeIndex(i, $event)\" *ngIf=\"inp.visible && inp.type == type.Star\" [inp]=\"inp\"></lib-form-star>\r\n <lib-form-toggle (changeIndex)=\"changeIndex(i, $event)\" *ngIf=\"inp.visible && inp.type == type.Toggle\" [inp]=\"inp\"></lib-form-toggle>\r\n <lib-form-table *ngIf=\"inp.visible && inp.type == type.Table\" [inp]=\"inp\"></lib-form-table>\r\n <lib-form-tag (changeIndex)=\"changeIndex(i, $event)\" *ngIf=\"inp.visible && inp.type == type.Tag\" [inp]=\"inp\"></lib-form-tag>\r\n <lib-form-ckeditor (changeIndex)=\"changeIndex(i, $event)\" *ngIf=\"inp.visible && inp.type == type.Ckeditor\" [inp]=\"inp\"></lib-form-ckeditor>\r\n <lib-form-uploader (changeIndex)=\"changeIndex(i, $event)\" *ngIf=\"inp.visible && inp.type == type.Uploader\" [inp]=\"inp\"></lib-form-uploader>\r\n <lib-form-slide (changeIndex)=\"changeIndex(i, $event)\" *ngIf=\"inp.visible && inp.type == type.Slide\" [inp]=\"inp\"></lib-form-slide>\r\n <lib-form-hidden *ngIf=\"inp.type == type.Hidden\" [inp]=\"inp\"></lib-form-hidden>\r\n <lib-form-label *ngIf=\"inp.visible && inp.type == type.Label\" [inp]=\"inp\"></lib-form-label>\r\n </span>\r\n </div>\r\n</form>\r\n",
|
|
4290
|
+
template: "<form [style]=\"form.style\" *ngIf=\"form\" [id]=\"form.id + 'Form'\" [className]=\"'form w-100 m-0' + (form.class ? ' ' + form.class : '')\">\r\n <div *ngIf=\"form.displayLabel\" [className]=\"(form.subName ? '' : 'underline ') + 'title'\">{{this.form.l(this.form.name)}}</div>\r\n <div *ngIf=\"form.displayLabel && form.subName\" class=\"sub-title underline\" [innerHTML]=\"this.form.l(this.form.subName)\"></div>\r\n <div *ngIf=\"form.loading\" class=\"loading\">\r\n <div class=\"text\" [innerHTML]=\"form.l('LoadingTable', 'Processing')\"></div>\r\n </div>\r\n <div *ngIf=\"!form.permission\" class=\"loading\">\r\n <div class=\"text\"><i class=\"fas fa-shield-alt icon\"></i>{{ form.l(\"PermissionDenied\") }}</div>\r\n </div>\r\n <ng-content></ng-content>\r\n <div class=\"inputs\">\r\n <span *ngFor=\"let inp of form.inputs; let i = index\">\r\n <lib-form-textbox (changeIndex)=\"changeIndex(i, $event)\" *ngIf=\"inp.visible && (inp.type == type.Text || inp.type == type.Password || inp.type == type.Mobile || inp.type == type.Username || inp.type == type.Phone || inp.type == type.Email || inp.type == type.NationalCode || inp.type == type.NationalNum || inp.type == type.NationalCodeNum || inp.type == type.EconomicNum || inp.type == type.Number || inp.type == type.Url || inp.type == type.PostalCode || inp.type == type.Price || inp.type == type.Sheba || inp.type == type.Color || inp.type == type.BillNumber)\" [inp]=\"inp\"></lib-form-textbox>\r\n <lib-form-textarea (changeIndex)=\"changeIndex(i, $event)\" *ngIf=\"inp.visible && inp.type == type.TextArea\" [inp]=\"inp\"></lib-form-textarea>\r\n <lib-form-checkbox (changeIndex)=\"changeIndex(i, $event)\" *ngIf=\"inp.visible && inp.type == type.Check\" [inp]=\"inp\"></lib-form-checkbox>\r\n <lib-form-select (changeIndex)=\"changeIndex(i, $event)\" *ngIf=\"inp.visible && (inp.type == type.Select || inp.type == type.SelectSearch || inp.type == type.SelectSearchRadio || inp.type == type.SelectAutoComplete)\" [inp]=\"inp\" [inForm]=\"true\"></lib-form-select>\r\n <lib-form-date (changeIndex)=\"changeIndex(i, $event)\" *ngIf=\"inp.visible && (inp.type == type.Date || inp.type == type.Month || inp.type == type.Year)\" [inp]=\"inp\" [inForm]=\"true\"></lib-form-date>\r\n <lib-form-time (changeIndex)=\"changeIndex(i, $event)\" *ngIf=\"inp.visible && inp.type == type.Time\" [inp]=\"inp\" [inForm]=\"true\"></lib-form-time>\r\n <lib-form-datetime (changeIndex)=\"changeIndex(i, $event)\" *ngIf=\"inp.visible && inp.type == type.DateTime\" [inp]=\"inp\" [inForm]=\"true\"></lib-form-datetime>\r\n <lib-form-file (changeIndex)=\"changeIndex(i, $event)\" *ngIf=\"inp.visible && inp.type == type.File\" [inp]=\"inp\"></lib-form-file>\r\n <lib-form-button (changeIndex)=\"changeIndex(i, $event)\" *ngIf=\"inp.visible && (inp.type == type.Button || inp.type == type.Submit)\" [inp]=\"inp\"></lib-form-button>\r\n <lib-form-icon (changeIndex)=\"changeIndex(i, $event)\" *ngIf=\"inp.visible && inp.type == type.Icon\" [inp]=\"inp\"></lib-form-icon>\r\n <lib-form-radio (changeIndex)=\"changeIndex(i, $event)\" *ngIf=\"inp.visible && inp.type == type.Radio\" [inp]=\"inp\"></lib-form-radio>\r\n <lib-form-tree (changeIndex)=\"changeIndex(i, $event)\" *ngIf=\"inp.visible && (inp.type == type.Tree || inp.type == type.TreeRadio)\" [inp]=\"inp\"></lib-form-tree>\r\n <lib-form-plaque (changeIndex)=\"changeIndex(i, $event)\" *ngIf=\"inp.visible && (inp.type == type.Plaque || inp.type == type.PlaqueM || inp.type == type.PlaqueF || inp.type == type.PlaqueG)\" [inp]=\"inp\"></lib-form-plaque>\r\n <lib-form-plaque-select (changeIndex)=\"changeIndex(i, $event)\" *ngIf=\"inp.visible && (inp.type == type.SelectAutoCompletePlaque || inp.type == type.SelectAutoCompletePlaqueM || inp.type == type.SelectAutoCompletePlaqueF || inp.type == type.SelectAutoCompletePlaqueG)\" [inp]=\"inp\"></lib-form-plaque-select>\r\n <lib-form-bank-card (changeIndex)=\"changeIndex(i, $event)\" *ngIf=\"inp.visible && inp.type == type.BankCard\" [inp]=\"inp\"></lib-form-bank-card>\r\n <lib-form-vehicle-search (changeIndex)=\"changeIndex(i, $event)\" *ngIf=\"inp.visible && inp.type == type.VehicleSearch\" [inp]=\"inp\"></lib-form-vehicle-search>\r\n <lib-form-vehicle (changeIndex)=\"changeIndex(i, $event)\" *ngIf=\"inp.visible && inp.type == type.Vehicle\" [inp]=\"inp\"></lib-form-vehicle>\r\n <lib-form-finger (changeIndex)=\"changeIndex(i, $event)\" *ngIf=\"inp.visible && inp.type == type.Finger\" [inp]=\"inp\"></lib-form-finger>\r\n <lib-form-star (changeIndex)=\"changeIndex(i, $event)\" *ngIf=\"inp.visible && inp.type == type.Star\" [inp]=\"inp\"></lib-form-star>\r\n <lib-form-toggle (changeIndex)=\"changeIndex(i, $event)\" *ngIf=\"inp.visible && inp.type == type.Toggle\" [inp]=\"inp\"></lib-form-toggle>\r\n <lib-form-table *ngIf=\"inp.visible && inp.type == type.Table\" [inp]=\"inp\"></lib-form-table>\r\n <lib-form-tag (changeIndex)=\"changeIndex(i, $event)\" *ngIf=\"inp.visible && inp.type == type.Tag\" [inp]=\"inp\"></lib-form-tag>\r\n <lib-form-ckeditor (changeIndex)=\"changeIndex(i, $event)\" *ngIf=\"inp.visible && inp.type == type.Ckeditor\" [inp]=\"inp\"></lib-form-ckeditor>\r\n <lib-form-uploader (changeIndex)=\"changeIndex(i, $event)\" *ngIf=\"inp.visible && inp.type == type.Uploader\" [inp]=\"inp\"></lib-form-uploader>\r\n <lib-form-slide (changeIndex)=\"changeIndex(i, $event)\" *ngIf=\"inp.visible && inp.type == type.Slide\" [inp]=\"inp\"></lib-form-slide>\r\n <lib-form-hidden *ngIf=\"inp.type == type.Hidden\" [inp]=\"inp\"></lib-form-hidden>\r\n <lib-form-label *ngIf=\"inp.visible && inp.type == type.Label\" [inp]=\"inp\"></lib-form-label>\r\n <lib-form-pre *ngIf=\"inp.visible && inp.type == type.Pre\" [inp]=\"inp\"></lib-form-pre>\r\n </span>\r\n </div>\r\n</form>\r\n",
|
|
4289
4291
|
styles: [".form{border-radius:var(--border-radius-base);padding:20px;position:relative}.form>.title{font-size:16px;font-weight:var(--font-bold);height:40px}.form>.sub-title,.form>.title{float:right;line-height:30px;margin-bottom:10px;position:relative;text-align:right;width:100%}.form>.sub-title{color:var(--black-light);font-size:12px;font-weight:var(--font-light);height:30px}.form .loading{background-color:#fff;border-radius:var(--border-radius-base);height:100%;right:0;top:0;z-index:104}.form .loading,.form .loading .text{position:absolute;text-align:center;width:100%}.form .loading .text{font-weight:var(--font-bold);height:35px;line-height:35px;top:calc(50% - 20px)}::ng-deep .form .loading .icon{font-size:20px!important;line-height:30px;margin-left:5px;position:relative;top:5px}.form-buttons,.form-error{float:right;width:100%}.form-error{color:var(--red-light);font-size:11px;height:15px;line-height:8px;margin-top:10px;padding:0 10px;position:relative;text-align:center}.form-error .message{float:left;width:calc(100% - 40px)}.form-error .icon{float:right;height:20px;line-height:6px;right:0;top:0;width:40px}.form .inputs{margin:0 -15px}"]
|
|
4290
4292
|
},] }
|
|
4291
4293
|
];
|
|
@@ -4325,6 +4327,37 @@ FormLabelComponent.propDecorators = {
|
|
|
4325
4327
|
inp: [{ type: Input }]
|
|
4326
4328
|
};
|
|
4327
4329
|
|
|
4330
|
+
class FormPreComponent {
|
|
4331
|
+
constructor() {
|
|
4332
|
+
}
|
|
4333
|
+
ngOnInit() {
|
|
4334
|
+
this.inp.setValue = (v) => {
|
|
4335
|
+
this.inp.value = typeof v === 'string' ? JSON.stringify(v, null, 2) : v;
|
|
4336
|
+
};
|
|
4337
|
+
this.inp.isValid = () => {
|
|
4338
|
+
return true;
|
|
4339
|
+
};
|
|
4340
|
+
this.inp.clear = () => {
|
|
4341
|
+
};
|
|
4342
|
+
}
|
|
4343
|
+
onClick() {
|
|
4344
|
+
if (this.inp.onClick) {
|
|
4345
|
+
this.inp.onClick(this.inp);
|
|
4346
|
+
}
|
|
4347
|
+
}
|
|
4348
|
+
}
|
|
4349
|
+
FormPreComponent.decorators = [
|
|
4350
|
+
{ type: Component, args: [{
|
|
4351
|
+
selector: 'lib-form-pre',
|
|
4352
|
+
template: "<pre [id]=\"inp.id + 'PreInput'\" (click)=\"onClick()\" #inputDiv [className]=\"'form-input pre w-100' + ' ' + inp.class\" [innerHTML]=\"inp.l(inp.value)\">\r\n</pre>\r\n",
|
|
4353
|
+
styles: [".form-input.pre{-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;-webkit-user-select:none;cursor:default;font-size:12px;line-height:30px;min-height:30px!important;padding:0 15px;position:relative;text-align:center}"]
|
|
4354
|
+
},] }
|
|
4355
|
+
];
|
|
4356
|
+
FormPreComponent.ctorParameters = () => [];
|
|
4357
|
+
FormPreComponent.propDecorators = {
|
|
4358
|
+
inp: [{ type: Input }]
|
|
4359
|
+
};
|
|
4360
|
+
|
|
4328
4361
|
class FormPlaqueSelectComponent {
|
|
4329
4362
|
constructor() {
|
|
4330
4363
|
this.changeIndex = new EventEmitter();
|
|
@@ -4505,8 +4538,8 @@ class FormPlaqueSelectComponent {
|
|
|
4505
4538
|
};
|
|
4506
4539
|
}
|
|
4507
4540
|
onFocusOutCloseOptions(e) {
|
|
4508
|
-
if (
|
|
4509
|
-
if (
|
|
4541
|
+
if ($(e.relatedTarget).length !== 0 || $(e.rangeParent).length !== 0) {
|
|
4542
|
+
if (!$(e.relatedTarget).closest('.form-input.plaque-select').hasClass('plaque-select') && !$(e.rangeParent).closest('.form-input.plaque-select').hasClass('plaque-select')) {
|
|
4510
4543
|
if (this.open) {
|
|
4511
4544
|
this.closeOptions();
|
|
4512
4545
|
}
|
|
@@ -4539,7 +4572,7 @@ class FormPlaqueSelectComponent {
|
|
|
4539
4572
|
closeOptions() {
|
|
4540
4573
|
setTimeout(() => {
|
|
4541
4574
|
this.open = false;
|
|
4542
|
-
|
|
4575
|
+
$(this.inputDiv.nativeElement).removeClass('top');
|
|
4543
4576
|
this.removeHover();
|
|
4544
4577
|
if (this.inp.value === null) {
|
|
4545
4578
|
this.inp.search = '';
|
|
@@ -4557,10 +4590,10 @@ class FormPlaqueSelectComponent {
|
|
|
4557
4590
|
const offsetOfBottom = window.innerHeight - rect.bottom;
|
|
4558
4591
|
const height = this.inputOptionsDiv.nativeElement.offsetHeight;
|
|
4559
4592
|
if (offsetOfBottom < height) {
|
|
4560
|
-
|
|
4593
|
+
$(this.inputDiv.nativeElement).addClass('top');
|
|
4561
4594
|
}
|
|
4562
4595
|
else {
|
|
4563
|
-
|
|
4596
|
+
$(this.inputDiv.nativeElement).removeClass('top');
|
|
4564
4597
|
}
|
|
4565
4598
|
}
|
|
4566
4599
|
onKeyDown(e) {
|
|
@@ -5107,7 +5140,7 @@ class FormRadioComponent {
|
|
|
5107
5140
|
}
|
|
5108
5141
|
}
|
|
5109
5142
|
onFocusIn() {
|
|
5110
|
-
|
|
5143
|
+
$(this.inputBase.nativeElement).focus();
|
|
5111
5144
|
}
|
|
5112
5145
|
}
|
|
5113
5146
|
FormRadioComponent.decorators = [
|
|
@@ -5221,7 +5254,7 @@ class FormSelectComponent {
|
|
|
5221
5254
|
return d;
|
|
5222
5255
|
};
|
|
5223
5256
|
this.inp.focusOut = () => {
|
|
5224
|
-
|
|
5257
|
+
$(this.inputBase.nativeElement).blur();
|
|
5225
5258
|
};
|
|
5226
5259
|
if (this.inp.hasBarcodeReader) {
|
|
5227
5260
|
HelperClass.setBarcodeReader(this.inp);
|
|
@@ -5259,14 +5292,14 @@ class FormSelectComponent {
|
|
|
5259
5292
|
openOptions() {
|
|
5260
5293
|
this.setPosition();
|
|
5261
5294
|
this.setHoverCenter();
|
|
5262
|
-
|
|
5295
|
+
$(this.inputBase.nativeElement).focus();
|
|
5263
5296
|
}
|
|
5264
5297
|
onFocusOut() {
|
|
5265
5298
|
this.closeOptions();
|
|
5266
5299
|
}
|
|
5267
5300
|
closeOptions() {
|
|
5268
5301
|
setTimeout(() => {
|
|
5269
|
-
|
|
5302
|
+
$(this.inputDiv.nativeElement).removeClass('top');
|
|
5270
5303
|
this.removeHover();
|
|
5271
5304
|
if (this.inp.value === null) {
|
|
5272
5305
|
if (!this.inp.addNew) {
|
|
@@ -5287,10 +5320,10 @@ class FormSelectComponent {
|
|
|
5287
5320
|
const offsetOfBottom = window.innerHeight - rect.bottom;
|
|
5288
5321
|
const height = this.inputOptionsDiv.nativeElement.offsetHeight;
|
|
5289
5322
|
if (offsetOfBottom < height) {
|
|
5290
|
-
|
|
5323
|
+
$(this.inputDiv.nativeElement).addClass('top');
|
|
5291
5324
|
}
|
|
5292
5325
|
else {
|
|
5293
|
-
|
|
5326
|
+
$(this.inputDiv.nativeElement).removeClass('top');
|
|
5294
5327
|
}
|
|
5295
5328
|
}
|
|
5296
5329
|
setOptions(r = this.inp.options) {
|
|
@@ -5308,7 +5341,7 @@ class FormSelectComponent {
|
|
|
5308
5341
|
}
|
|
5309
5342
|
else if (code === 13) {
|
|
5310
5343
|
e.preventDefault();
|
|
5311
|
-
if (
|
|
5344
|
+
if ($(this.inputBase.nativeElement).is(':focus')) {
|
|
5312
5345
|
const h = this.getSelectedHover();
|
|
5313
5346
|
if (!h) {
|
|
5314
5347
|
if (this.inp.addNew) {
|
|
@@ -5332,7 +5365,7 @@ class FormSelectComponent {
|
|
|
5332
5365
|
}
|
|
5333
5366
|
}
|
|
5334
5367
|
toggleOption(e) {
|
|
5335
|
-
if ((this.inp.multiple || this.inp.type === InputType.SelectSearchRadio) &&
|
|
5368
|
+
if ((this.inp.multiple || this.inp.type === InputType.SelectSearchRadio) && $(e.target).closest('.option').hasClass('option')) {
|
|
5336
5369
|
return;
|
|
5337
5370
|
}
|
|
5338
5371
|
this.openOptions();
|
|
@@ -5478,7 +5511,7 @@ class FormSelectComponent {
|
|
|
5478
5511
|
setTimeout(() => {
|
|
5479
5512
|
this.changeIndex.emit(i);
|
|
5480
5513
|
if (!this.inForm) {
|
|
5481
|
-
|
|
5514
|
+
$(this.inputBase.nativeElement).blur();
|
|
5482
5515
|
}
|
|
5483
5516
|
}, 10);
|
|
5484
5517
|
setTimeout(() => {
|
|
@@ -6049,7 +6082,7 @@ class FormTimeComponent {
|
|
|
6049
6082
|
this.openOptions();
|
|
6050
6083
|
};
|
|
6051
6084
|
this.inp.focusOut = () => {
|
|
6052
|
-
|
|
6085
|
+
$(this.inputBase.nativeElement).blur();
|
|
6053
6086
|
};
|
|
6054
6087
|
}
|
|
6055
6088
|
toggleTime() {
|
|
@@ -6057,27 +6090,27 @@ class FormTimeComponent {
|
|
|
6057
6090
|
}
|
|
6058
6091
|
openOptions() {
|
|
6059
6092
|
this.setPosition();
|
|
6060
|
-
|
|
6093
|
+
$(this.inputBase.nativeElement).focus();
|
|
6061
6094
|
}
|
|
6062
6095
|
setPosition() {
|
|
6063
6096
|
const rect = this.inputDiv.nativeElement.getBoundingClientRect();
|
|
6064
6097
|
const offsetOfBottom = window.innerHeight - rect.bottom;
|
|
6065
6098
|
const height = this.inputOptionsDiv.nativeElement.offsetHeight;
|
|
6066
6099
|
if (offsetOfBottom < height) {
|
|
6067
|
-
|
|
6100
|
+
$(this.inputDiv.nativeElement).addClass('top');
|
|
6068
6101
|
}
|
|
6069
6102
|
else {
|
|
6070
|
-
|
|
6103
|
+
$(this.inputDiv.nativeElement).removeClass('top');
|
|
6071
6104
|
}
|
|
6072
6105
|
}
|
|
6073
6106
|
onKeyDown(e) {
|
|
6074
6107
|
const code = e.keyCode || e.which;
|
|
6075
6108
|
if (code === 9 || code === 13) {
|
|
6076
6109
|
e.preventDefault();
|
|
6077
|
-
|
|
6110
|
+
$(this.inputDiv.nativeElement).removeClass('top');
|
|
6078
6111
|
this.changeIndex.emit(code === 9 ? e.shiftKey ? 'ShiftTab' : 'Tab' : e.shiftKey ? 'ShiftEnter' : 'Enter');
|
|
6079
6112
|
if (!this.inForm) {
|
|
6080
|
-
|
|
6113
|
+
$(this.inputBase.nativeElement).blur();
|
|
6081
6114
|
}
|
|
6082
6115
|
}
|
|
6083
6116
|
}
|
|
@@ -6100,7 +6133,7 @@ class FormTimeComponent {
|
|
|
6100
6133
|
}
|
|
6101
6134
|
}
|
|
6102
6135
|
onFocusOut() {
|
|
6103
|
-
|
|
6136
|
+
$(this.inputDiv.nativeElement).removeClass('top');
|
|
6104
6137
|
this.inp.search = this.inp.value;
|
|
6105
6138
|
}
|
|
6106
6139
|
selectTime(v, s) {
|
|
@@ -6148,8 +6181,8 @@ class FormTreeItemComponent {
|
|
|
6148
6181
|
this.item.parent = this.parent;
|
|
6149
6182
|
}
|
|
6150
6183
|
openClose(e) {
|
|
6151
|
-
const ch =
|
|
6152
|
-
const oc =
|
|
6184
|
+
const ch = $(e.target).closest('.row-item').find(' > .children');
|
|
6185
|
+
const oc = $(e.target).closest('.row-item').find(' > .open-close');
|
|
6153
6186
|
if (ch.hasClass('open')) {
|
|
6154
6187
|
ch.removeClass('open');
|
|
6155
6188
|
ch.stop().slideUp();
|
|
@@ -6227,7 +6260,7 @@ class FormTreeComponent {
|
|
|
6227
6260
|
}
|
|
6228
6261
|
}
|
|
6229
6262
|
onFocusIn() {
|
|
6230
|
-
|
|
6263
|
+
$(this.inputBase.nativeElement).focus();
|
|
6231
6264
|
}
|
|
6232
6265
|
getSelected() {
|
|
6233
6266
|
let l = [];
|
|
@@ -7395,7 +7428,7 @@ class FormStarComponent {
|
|
|
7395
7428
|
this.onFocusIn();
|
|
7396
7429
|
}
|
|
7397
7430
|
onFocusIn() {
|
|
7398
|
-
|
|
7431
|
+
$(this.inputBase.nativeElement).focus();
|
|
7399
7432
|
}
|
|
7400
7433
|
onKeyDown(e) {
|
|
7401
7434
|
const code = e.keyCode || e.which;
|
|
@@ -7470,7 +7503,7 @@ class FormTagComponent {
|
|
|
7470
7503
|
}
|
|
7471
7504
|
}
|
|
7472
7505
|
onKeyDown(e) {
|
|
7473
|
-
const v =
|
|
7506
|
+
const v = $(this.inputBase.nativeElement);
|
|
7474
7507
|
if (this.inp.onKeyDown) {
|
|
7475
7508
|
this.inp.onKeyDown(e);
|
|
7476
7509
|
}
|
|
@@ -7493,7 +7526,7 @@ class FormTagComponent {
|
|
|
7493
7526
|
this.inp.error = null;
|
|
7494
7527
|
}
|
|
7495
7528
|
onFocusOut() {
|
|
7496
|
-
const v =
|
|
7529
|
+
const v = $(this.inputBase.nativeElement);
|
|
7497
7530
|
this.setValue(v);
|
|
7498
7531
|
}
|
|
7499
7532
|
removeTag(t) {
|
|
@@ -7768,7 +7801,7 @@ class FormUploaderComponent {
|
|
|
7768
7801
|
});
|
|
7769
7802
|
}
|
|
7770
7803
|
onClick() {
|
|
7771
|
-
|
|
7804
|
+
$(this.inputBase.nativeElement).focus();
|
|
7772
7805
|
}
|
|
7773
7806
|
onChange(e) {
|
|
7774
7807
|
var _a, _b;
|
|
@@ -7802,7 +7835,7 @@ class FormUploaderComponent {
|
|
|
7802
7835
|
}
|
|
7803
7836
|
}
|
|
7804
7837
|
onFocusIn() {
|
|
7805
|
-
|
|
7838
|
+
$(this.inputBase.nativeElement).focus();
|
|
7806
7839
|
}
|
|
7807
7840
|
title() {
|
|
7808
7841
|
if (this.inp.value == null || (this.inp.value instanceof Array && this.inp.value.length === 0)) {
|
|
@@ -7896,7 +7929,7 @@ class FormSlideComponent {
|
|
|
7896
7929
|
}
|
|
7897
7930
|
}
|
|
7898
7931
|
onFocusIn() {
|
|
7899
|
-
|
|
7932
|
+
$(this.inputBase.nativeElement).focus();
|
|
7900
7933
|
}
|
|
7901
7934
|
}
|
|
7902
7935
|
FormSlideComponent.decorators = [
|
|
@@ -7934,7 +7967,7 @@ PsToolkitUiModule.decorators = [
|
|
|
7934
7967
|
FormTimeComponent, NotificationComponent, FormFingerComponent, FormVehicleSearchComponent, FormCkeditorComponent, FormUploaderComponent,
|
|
7935
7968
|
LayoutComponent, LoadingComponent, NotfoundComponent, FormVehicleComponent, FormHiddenComponent, CalendarComponent, FormToggleComponent,
|
|
7936
7969
|
ClockComponent, ChartComponent, FormTagComponent, ErrorComponent, LoginComponent, FormStarComponent, FormSlideComponent,
|
|
7937
|
-
SafeStylePipe, SafeHtmlPipe,
|
|
7970
|
+
SafeStylePipe, SafeHtmlPipe, FormPreComponent
|
|
7938
7971
|
],
|
|
7939
7972
|
imports: [
|
|
7940
7973
|
CommonModule,
|
|
@@ -7952,6 +7985,7 @@ PsToolkitUiModule.decorators = [
|
|
|
7952
7985
|
FormTimeComponent, NotificationComponent, FormFingerComponent, FormVehicleSearchComponent, FormCkeditorComponent, FormUploaderComponent,
|
|
7953
7986
|
LayoutComponent, LoadingComponent, NotfoundComponent, FormVehicleComponent, FormHiddenComponent, CalendarComponent, FormToggleComponent,
|
|
7954
7987
|
ClockComponent, ChartComponent, FormTagComponent, ErrorComponent, LoginComponent, FormStarComponent, FormSlideComponent,
|
|
7988
|
+
FormPreComponent
|
|
7955
7989
|
]
|
|
7956
7990
|
},] }
|
|
7957
7991
|
];
|
|
@@ -8456,7 +8490,7 @@ class TableClass {
|
|
|
8456
8490
|
p.Area = this.permissions.Area;
|
|
8457
8491
|
p.Controller = 'print';
|
|
8458
8492
|
p.Action = this.permissions.Controller + (this.permissions.Action ? this.permissions.Action : '');
|
|
8459
|
-
const params = param(this.searchData(true));
|
|
8493
|
+
const params = $.param(this.searchData(true));
|
|
8460
8494
|
const u = this.getUrl(access.Url);
|
|
8461
8495
|
window.open('/report' + u + (params ? (u.includes('?') ? '&' : '?') + params : ''), '_blank');
|
|
8462
8496
|
};
|
|
@@ -8925,5 +8959,5 @@ class HeaderClass {
|
|
|
8925
8959
|
* Generated bundle index. Do not edit.
|
|
8926
8960
|
*/
|
|
8927
8961
|
|
|
8928
|
-
export { AccordionClass, AccordionComponent, AccordionRowClass, AddModalClass, AlertComponent, BaseComponent, ChartClass, ConfirmComponent, CurrentDataClass, DayClass, EnumUtils, ErrorComponent, ExcelClass, FileIcons, FooterComponent, FormBankCardComponent, FormButtonComponent, FormCheckboxComponent, FormCkeditorComponent, FormClass, FormComponent, FormDateComponent, FormDatetimeComponent, FormFileComponent, FormFingerComponent, FormIconComponent, FormLabelComponent, FormPlaqueComponent, FormPlaqueSelectComponent, FormRadioComponent, FormSelectComponent, FormSlideComponent, FormStarComponent, FormTableComponent, FormTextareaComponent, FormTextboxComponent, FormTimeComponent, FormToggleComponent, FormTreeComponent, FormUploaderComponent, FormVehicleComponent, FormVehicleSearchComponent, HeaderClass, HeaderComponent, HelperClass, InputClass, InputError, InputType, LangClass, LayoutComponent, LoadingComponent, LoginClass, LoginStepClass, Method, ModalClass, ModalComponent, NotfoundComponent, OperationEnum, OptionClass, PaymentStatusEnum, PermissionAccessTypeEnum, PermissionClass, PermissionInputActionEnum, PermissionInputTypeEnum, PermissionTypeEnum, Progress, PsToolkitUiModule, RequestClass, ResultStatusEnum, SidebarClass, SidebarComponent, SidebarService, StatusEnum, StepsClass, StepsComponent, StepsItemClass, SubHeaderComponent, TableClass, TableCollClass, TableCollType, TableComponent, TableExportType, TableOptionType, TableRowStatus, TooltipComponent, TreeRowClass, UserType, VehicleType, FormSelectItemComponent as ɵa, TablePaginationComponent as ɵb, SidebarItemComponent as ɵc, PsToolkitUiConfigService as ɵd, TableLoadingComponent as ɵe, FormTreeItemComponent as ɵf, TableRowComponent as ɵg, NotificationComponent as ɵh, FormHiddenComponent as ɵi, CalendarComponent as ɵj, ClockComponent as ɵk, ChartComponent as ɵl, FormTagComponent as ɵm, LoginComponent as ɵn, SafeStylePipe as ɵo, SafeHtmlPipe as ɵp };
|
|
8962
|
+
export { AccordionClass, AccordionComponent, AccordionRowClass, AddModalClass, AlertComponent, BaseComponent, ChartClass, ConfirmComponent, CurrentDataClass, DayClass, EnumUtils, ErrorComponent, ExcelClass, FileIcons, FooterComponent, FormBankCardComponent, FormButtonComponent, FormCheckboxComponent, FormCkeditorComponent, FormClass, FormComponent, FormDateComponent, FormDatetimeComponent, FormFileComponent, FormFingerComponent, FormIconComponent, FormLabelComponent, FormPlaqueComponent, FormPlaqueSelectComponent, FormRadioComponent, FormSelectComponent, FormSlideComponent, FormStarComponent, FormTableComponent, FormTextareaComponent, FormTextboxComponent, FormTimeComponent, FormToggleComponent, FormTreeComponent, FormUploaderComponent, FormVehicleComponent, FormVehicleSearchComponent, HeaderClass, HeaderComponent, HelperClass, InputClass, InputError, InputType, LangClass, LayoutComponent, LoadingComponent, LoginClass, LoginStepClass, Method, ModalClass, ModalComponent, NotfoundComponent, OperationEnum, OptionClass, PaymentStatusEnum, PermissionAccessTypeEnum, PermissionClass, PermissionInputActionEnum, PermissionInputTypeEnum, PermissionTypeEnum, Progress, PsToolkitUiModule, RequestClass, ResultStatusEnum, SidebarClass, SidebarComponent, SidebarService, StatusEnum, StepsClass, StepsComponent, StepsItemClass, SubHeaderComponent, TableClass, TableCollClass, TableCollType, TableComponent, TableExportType, TableOptionType, TableRowStatus, TooltipComponent, TreeRowClass, UserType, VehicleType, FormSelectItemComponent as ɵa, TablePaginationComponent as ɵb, SidebarItemComponent as ɵc, PsToolkitUiConfigService as ɵd, TableLoadingComponent as ɵe, FormTreeItemComponent as ɵf, TableRowComponent as ɵg, NotificationComponent as ɵh, FormHiddenComponent as ɵi, CalendarComponent as ɵj, ClockComponent as ɵk, ChartComponent as ɵl, FormTagComponent as ɵm, LoginComponent as ɵn, SafeStylePipe as ɵo, SafeHtmlPipe as ɵp, FormPreComponent as ɵq };
|
|
8929
8963
|
//# sourceMappingURL=ps-toolkit-ui.js.map
|