ps-toolkit-ui 0.0.211 → 0.0.212
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 +7812 -0
- package/bundles/ps-toolkit-ui.umd.js.map +1 -0
- package/bundles/ps-toolkit-ui.umd.min.js +2 -0
- package/bundles/ps-toolkit-ui.umd.min.js.map +1 -0
- package/esm2015/lib/classes/chart.class.js +140 -0
- package/esm2015/lib/classes/enum.class.js +187 -0
- package/esm2015/lib/classes/form.class.js +481 -0
- package/esm2015/lib/classes/helper.class.js +284 -0
- package/esm2015/lib/classes/lang.class.js +32 -0
- package/esm2015/lib/classes/login.class.js +22 -0
- package/esm2015/lib/classes/modal.class.js +52 -0
- package/esm2015/lib/classes/permission.class.js +61 -0
- package/esm2015/lib/classes/request.class.js +256 -0
- package/esm2015/lib/classes/safestyle.class.js +15 -0
- package/esm2015/lib/classes/sidebar.class.js +14 -0
- package/esm2015/lib/classes/steps.class.js +20 -0
- package/esm2015/lib/classes/string.class.js +220 -0
- package/esm2015/lib/classes/table.class.js +215 -0
- package/esm2015/lib/components/accordion/accordion.component.js +45 -0
- package/esm2015/lib/components/alert/alert.component.js +39 -0
- package/esm2015/lib/components/base.component.js +45 -0
- package/esm2015/lib/components/calendar/calendar.component.js +97 -0
- package/esm2015/lib/components/chart/chart.component.js +17 -0
- package/esm2015/lib/components/clock/clock.component.js +33 -0
- package/esm2015/lib/components/confirm/confirm.component.js +50 -0
- package/esm2015/lib/components/footer/footer.component.js +23 -0
- package/esm2015/lib/components/form/bank-card/form.bank-card.component.js +148 -0
- package/esm2015/lib/components/form/button/form.button.component.js +68 -0
- package/esm2015/lib/components/form/car/form.car.component.js +84 -0
- package/esm2015/lib/components/form/car/search/form.car.search.component.js +172 -0
- package/esm2015/lib/components/form/checkbox/form.checkbox.component.js +66 -0
- package/esm2015/lib/components/form/date/form.date.component.js +254 -0
- package/esm2015/lib/components/form/datetime/form.datetime.component.js +104 -0
- package/esm2015/lib/components/form/file/form.file.component.js +133 -0
- package/esm2015/lib/components/form/finger/form.finger.component.js +138 -0
- package/esm2015/lib/components/form/hidden/form.hidden.component.js +31 -0
- package/esm2015/lib/components/form/icon/form.icon.component.js +76 -0
- package/esm2015/lib/components/form/index/form.component.js +48 -0
- package/esm2015/lib/components/form/label/form.label.component.js +32 -0
- package/esm2015/lib/components/form/plaque/form.plaque.component.js +176 -0
- package/esm2015/lib/components/form/plaque/select/form.plaque.select.component.js +390 -0
- package/esm2015/lib/components/form/radio/form.radio.component.js +79 -0
- package/esm2015/lib/components/form/select/form.select.component.js +374 -0
- package/esm2015/lib/components/form/select/item/form.select.item.component.js +43 -0
- package/esm2015/lib/components/form/table/form.table.component.js +98 -0
- package/esm2015/lib/components/form/textarea/form.textarea.component.js +78 -0
- package/esm2015/lib/components/form/textbox/form.textbox.component.js +186 -0
- package/esm2015/lib/components/form/time/form.time.component.js +145 -0
- package/esm2015/lib/components/form/tree/form.tree.component.js +99 -0
- package/esm2015/lib/components/form/tree/item/form.tree.item.component.js +48 -0
- package/esm2015/lib/components/header/header.component.js +33 -0
- package/esm2015/lib/components/header/sub/sub.header.component.js +14 -0
- package/esm2015/lib/components/layout/layout.component.js +25 -0
- package/esm2015/lib/components/loading/loading.component.js +22 -0
- package/esm2015/lib/components/login/login.component.js +148 -0
- package/esm2015/lib/components/modal/modal.component.js +25 -0
- package/esm2015/lib/components/notfound/notfound.component.js +29 -0
- package/esm2015/lib/components/notification/notification.component.js +14 -0
- package/esm2015/lib/components/sidebar/item/sidebar.item.component.js +53 -0
- package/esm2015/lib/components/sidebar/sidebar.component.js +67 -0
- package/esm2015/lib/components/steps/steps.component.js +51 -0
- package/esm2015/lib/components/table/loading/table.loading.component.js +17 -0
- package/esm2015/lib/components/table/pagination/table.pagination.component.js +84 -0
- package/esm2015/lib/components/table/report/table.report.component.js +246 -0
- package/esm2015/lib/components/table/row/table.row.component.js +379 -0
- package/esm2015/lib/components/table/table.component.js +179 -0
- package/esm2015/lib/components/tooltip/tooltip.component.js +19 -0
- package/esm2015/lib/ps-toolkit-ui.module.js +95 -0
- package/esm2015/lib/services/config.service.js +14 -0
- package/esm2015/ps-toolkit-ui.js +20 -0
- package/esm2015/public-api.js +53 -0
- package/fesm2015/ps-toolkit-ui.js +6706 -0
- package/fesm2015/ps-toolkit-ui.js.map +1 -0
- package/lib/classes/chart.class.d.ts +11 -0
- package/lib/classes/enum.class.d.ts +158 -0
- package/lib/classes/form.class.d.ts +173 -0
- package/lib/classes/helper.class.d.ts +28 -0
- package/lib/classes/lang.class.d.ts +5 -0
- package/lib/classes/login.class.d.ts +17 -0
- package/lib/classes/modal.class.d.ts +19 -0
- package/lib/classes/permission.class.d.ts +31 -0
- package/lib/classes/request.class.d.ts +12 -0
- package/lib/classes/safestyle.class.d.ts +7 -0
- package/lib/classes/sidebar.class.d.ts +11 -0
- package/lib/classes/steps.class.d.ts +17 -0
- package/lib/classes/string.class.d.ts +218 -0
- package/lib/classes/table.class.d.ts +69 -0
- package/lib/components/accordion/accordion.component.d.ts +7 -0
- package/lib/components/alert/alert.component.d.ts +10 -0
- package/lib/components/base.component.d.ts +14 -0
- package/lib/components/calendar/calendar.component.d.ts +26 -0
- package/lib/components/chart/chart.component.d.ts +5 -0
- package/lib/components/clock/clock.component.d.ts +11 -0
- package/lib/components/confirm/confirm.component.d.ts +14 -0
- package/lib/components/footer/footer.component.d.ts +6 -0
- package/lib/components/form/bank-card/form.bank-card.component.d.ts +22 -0
- package/lib/components/form/button/form.button.component.d.ts +15 -0
- package/lib/components/form/car/form.car.component.d.ts +16 -0
- package/lib/components/form/car/search/form.car.search.component.d.ts +17 -0
- package/lib/components/form/checkbox/form.checkbox.component.d.ts +14 -0
- package/lib/components/form/date/form.date.component.d.ts +42 -0
- package/lib/components/form/datetime/form.datetime.component.d.ts +13 -0
- package/lib/components/form/file/form.file.component.d.ts +17 -0
- package/lib/components/form/finger/form.finger.component.d.ts +15 -0
- package/lib/components/form/hidden/form.hidden.component.d.ts +7 -0
- package/lib/components/form/icon/form.icon.component.d.ts +15 -0
- package/lib/components/form/index/form.component.d.ts +10 -0
- package/lib/components/form/label/form.label.component.d.ts +8 -0
- package/lib/components/form/plaque/form.plaque.component.d.ts +22 -0
- package/lib/components/form/plaque/select/form.plaque.select.component.d.ts +36 -0
- package/lib/components/form/radio/form.radio.component.d.ts +13 -0
- package/lib/components/form/select/form.select.component.d.ts +39 -0
- package/lib/components/form/select/item/form.select.item.component.d.ts +12 -0
- package/lib/components/form/table/form.table.component.d.ts +9 -0
- package/lib/components/form/textarea/form.textarea.component.d.ts +13 -0
- package/lib/components/form/textbox/form.textbox.component.d.ts +20 -0
- package/lib/components/form/time/form.time.component.d.ts +25 -0
- package/lib/components/form/tree/form.tree.component.d.ts +16 -0
- package/lib/components/form/tree/item/form.tree.item.component.d.ts +17 -0
- package/lib/components/header/header.component.d.ts +9 -0
- package/lib/components/header/sub/sub.header.component.d.ts +3 -0
- package/lib/components/layout/layout.component.d.ts +8 -0
- package/lib/components/loading/loading.component.d.ts +5 -0
- package/lib/components/login/login.component.d.ts +13 -0
- package/lib/components/modal/modal.component.d.ts +9 -0
- package/lib/components/notfound/notfound.component.d.ts +8 -0
- package/lib/components/notification/notification.component.d.ts +3 -0
- package/lib/components/sidebar/item/sidebar.item.component.d.ts +14 -0
- package/lib/components/sidebar/sidebar.component.d.ts +19 -0
- package/lib/components/steps/steps.component.d.ts +10 -0
- package/lib/components/table/loading/table.loading.component.d.ts +5 -0
- package/lib/components/table/pagination/table.pagination.component.d.ts +15 -0
- package/lib/components/table/report/table.report.component.d.ts +34 -0
- package/lib/components/table/row/table.row.component.d.ts +34 -0
- package/lib/components/table/table.component.d.ts +40 -0
- package/lib/components/tooltip/tooltip.component.d.ts +5 -0
- package/lib/ps-toolkit-ui.module.d.ts +4 -0
- package/lib/services/config.service.d.ts +6 -0
- package/package.json +23 -19
- package/ps-toolkit-ui.d.ts +19 -0
- package/ps-toolkit-ui.metadata.json +1 -0
- package/{src/public-api.ts → public-api.d.ts} +49 -53
- package/karma.conf.js +0 -32
- package/ng-package.json +0 -16
- package/src/lib/classes/chart.class.ts +0 -140
- package/src/lib/classes/enum.class.ts +0 -193
- package/src/lib/classes/excel.class.ts +0 -46
- package/src/lib/classes/form.class.ts +0 -528
- package/src/lib/classes/helper.class.ts +0 -283
- package/src/lib/classes/lang.class.ts +0 -32
- package/src/lib/classes/login.class.ts +0 -27
- package/src/lib/classes/modal.class.ts +0 -59
- package/src/lib/classes/permission.class.ts +0 -55
- package/src/lib/classes/request.class.ts +0 -255
- package/src/lib/classes/safestyle.class.ts +0 -4
- package/src/lib/classes/sidebar.class.ts +0 -20
- package/src/lib/classes/steps.class.ts +0 -19
- package/src/lib/classes/string.class.ts +0 -219
- package/src/lib/classes/table.class.ts +0 -228
- package/src/lib/components/accordion/accordion.component.css +0 -116
- package/src/lib/components/accordion/accordion.component.html +0 -19
- package/src/lib/components/accordion/accordion.component.ts +0 -41
- package/src/lib/components/alert/alert.component.css +0 -112
- package/src/lib/components/alert/alert.component.html +0 -1
- package/src/lib/components/alert/alert.component.ts +0 -35
- package/src/lib/components/base.component.ts +0 -38
- package/src/lib/components/calendar/calendar.component.css +0 -206
- package/src/lib/components/calendar/calendar.component.html +0 -36
- package/src/lib/components/calendar/calendar.component.ts +0 -99
- package/src/lib/components/chart/chart.component.css +0 -24
- package/src/lib/components/chart/chart.component.html +0 -6
- package/src/lib/components/chart/chart.component.ts +0 -14
- package/src/lib/components/clock/clock.component.css +0 -141
- package/src/lib/components/clock/clock.component.html +0 -10
- package/src/lib/components/clock/clock.component.ts +0 -37
- package/src/lib/components/confirm/confirm.component.css +0 -112
- package/src/lib/components/confirm/confirm.component.html +0 -1
- package/src/lib/components/confirm/confirm.component.ts +0 -47
- package/src/lib/components/footer/footer.component.css +0 -46
- package/src/lib/components/footer/footer.component.html +0 -9
- package/src/lib/components/footer/footer.component.ts +0 -18
- package/src/lib/components/form/bank-card/form.bank-card.component.css +0 -115
- package/src/lib/components/form/bank-card/form.bank-card.component.html +0 -13
- package/src/lib/components/form/bank-card/form.bank-card.component.ts +0 -144
- package/src/lib/components/form/button/form.button.component.css +0 -222
- package/src/lib/components/form/button/form.button.component.html +0 -16
- package/src/lib/components/form/button/form.button.component.ts +0 -65
- package/src/lib/components/form/car/form.car.component.css +0 -287
- package/src/lib/components/form/car/form.car.component.html +0 -11
- package/src/lib/components/form/car/form.car.component.ts +0 -82
- package/src/lib/components/form/car/search/form.car.search.component.css +0 -287
- package/src/lib/components/form/car/search/form.car.search.component.html +0 -15
- package/src/lib/components/form/car/search/form.car.search.component.ts +0 -170
- package/src/lib/components/form/checkbox/form.checkbox.component.css +0 -128
- package/src/lib/components/form/checkbox/form.checkbox.component.html +0 -8
- package/src/lib/components/form/checkbox/form.checkbox.component.ts +0 -64
- package/src/lib/components/form/date/form.date.component.css +0 -310
- package/src/lib/components/form/date/form.date.component.html +0 -46
- package/src/lib/components/form/date/form.date.component.ts +0 -247
- package/src/lib/components/form/datetime/form.datetime.component.css +0 -157
- package/src/lib/components/form/datetime/form.datetime.component.html +0 -11
- package/src/lib/components/form/datetime/form.datetime.component.ts +0 -98
- package/src/lib/components/form/file/form.file.component.css +0 -151
- package/src/lib/components/form/file/form.file.component.html +0 -12
- package/src/lib/components/form/file/form.file.component.ts +0 -130
- package/src/lib/components/form/finger/form.finger.component.css +0 -215
- package/src/lib/components/form/finger/form.finger.component.html +0 -59
- package/src/lib/components/form/finger/form.finger.component.ts +0 -131
- package/src/lib/components/form/hidden/form.hidden.component.css +0 -0
- package/src/lib/components/form/hidden/form.hidden.component.html +0 -0
- package/src/lib/components/form/hidden/form.hidden.component.ts +0 -29
- package/src/lib/components/form/icon/form.icon.component.css +0 -108
- package/src/lib/components/form/icon/form.icon.component.html +0 -14
- package/src/lib/components/form/icon/form.icon.component.ts +0 -73
- package/src/lib/components/form/index/form.component.css +0 -89
- package/src/lib/components/form/index/form.component.html +0 -35
- package/src/lib/components/form/index/form.component.ts +0 -45
- package/src/lib/components/form/label/form.label.component.css +0 -45
- package/src/lib/components/form/label/form.label.component.html +0 -2
- package/src/lib/components/form/label/form.label.component.ts +0 -30
- package/src/lib/components/form/plaque/form.plaque.component.css +0 -76
- package/src/lib/components/form/plaque/form.plaque.component.html +0 -10
- package/src/lib/components/form/plaque/form.plaque.component.ts +0 -178
- package/src/lib/components/form/plaque/select/form.plaque.select.component.css +0 -167
- package/src/lib/components/form/plaque/select/form.plaque.select.component.html +0 -19
- package/src/lib/components/form/plaque/select/form.plaque.select.component.ts +0 -385
- package/src/lib/components/form/radio/form.radio.component.css +0 -158
- package/src/lib/components/form/radio/form.radio.component.html +0 -16
- package/src/lib/components/form/radio/form.radio.component.ts +0 -78
- package/src/lib/components/form/select/form.select.component.css +0 -326
- package/src/lib/components/form/select/form.select.component.html +0 -16
- package/src/lib/components/form/select/form.select.component.ts +0 -358
- package/src/lib/components/form/select/item/form.select.item.component.css +0 -59
- package/src/lib/components/form/select/item/form.select.item.component.html +0 -10
- package/src/lib/components/form/select/item/form.select.item.component.ts +0 -40
- package/src/lib/components/form/table/form.table.component.css +0 -50
- package/src/lib/components/form/table/form.table.component.html +0 -8
- package/src/lib/components/form/table/form.table.component.ts +0 -94
- package/src/lib/components/form/textarea/form.textarea.component.css +0 -109
- package/src/lib/components/form/textarea/form.textarea.component.html +0 -10
- package/src/lib/components/form/textarea/form.textarea.component.ts +0 -76
- package/src/lib/components/form/textbox/form.textbox.component.css +0 -296
- package/src/lib/components/form/textbox/form.textbox.component.html +0 -13
- package/src/lib/components/form/textbox/form.textbox.component.ts +0 -185
- package/src/lib/components/form/time/form.time.component.css +0 -205
- package/src/lib/components/form/time/form.time.component.html +0 -22
- package/src/lib/components/form/time/form.time.component.ts +0 -139
- package/src/lib/components/form/tree/form.tree.component.css +0 -109
- package/src/lib/components/form/tree/form.tree.component.html +0 -11
- package/src/lib/components/form/tree/form.tree.component.ts +0 -98
- package/src/lib/components/form/tree/item/form.tree.item.component.css +0 -142
- package/src/lib/components/form/tree/item/form.tree.item.component.html +0 -9
- package/src/lib/components/form/tree/item/form.tree.item.component.ts +0 -49
- package/src/lib/components/header/header.component.css +0 -57
- package/src/lib/components/header/header.component.html +0 -5
- package/src/lib/components/header/header.component.ts +0 -28
- package/src/lib/components/header/sub/sub.header.component.css +0 -62
- package/src/lib/components/header/sub/sub.header.component.html +0 -8
- package/src/lib/components/header/sub/sub.header.component.ts +0 -11
- package/src/lib/components/layout/layout.component.css +0 -300
- package/src/lib/components/layout/layout.component.html +0 -20
- package/src/lib/components/layout/layout.component.ts +0 -21
- package/src/lib/components/loading/loading.component.css +0 -39
- package/src/lib/components/loading/loading.component.html +0 -8
- package/src/lib/components/loading/loading.component.ts +0 -18
- package/src/lib/components/login/login.component.css +0 -389
- package/src/lib/components/login/login.component.html +0 -27
- package/src/lib/components/login/login.component.ts +0 -145
- package/src/lib/components/modal/modal.component.css +0 -60
- package/src/lib/components/modal/modal.component.html +0 -12
- package/src/lib/components/modal/modal.component.ts +0 -23
- package/src/lib/components/notfound/notfound.component.css +0 -134
- package/src/lib/components/notfound/notfound.component.html +0 -10
- package/src/lib/components/notfound/notfound.component.ts +0 -25
- package/src/lib/components/notification/notification.component.css +0 -45
- package/src/lib/components/notification/notification.component.html +0 -2
- package/src/lib/components/notification/notification.component.ts +0 -11
- package/src/lib/components/sidebar/item/sidebar.item.component.css +0 -236
- package/src/lib/components/sidebar/item/sidebar.item.component.html +0 -16
- package/src/lib/components/sidebar/item/sidebar.item.component.ts +0 -54
- package/src/lib/components/sidebar/sidebar.component.css +0 -42
- package/src/lib/components/sidebar/sidebar.component.html +0 -10
- package/src/lib/components/sidebar/sidebar.component.ts +0 -60
- package/src/lib/components/steps/steps.component.css +0 -320
- package/src/lib/components/steps/steps.component.html +0 -18
- package/src/lib/components/steps/steps.component.ts +0 -44
- package/src/lib/components/table/loading/table.loading.component.css +0 -29
- package/src/lib/components/table/loading/table.loading.component.html +0 -9
- package/src/lib/components/table/loading/table.loading.component.ts +0 -14
- package/src/lib/components/table/pagination/table.pagination.component.css +0 -138
- package/src/lib/components/table/pagination/table.pagination.component.html +0 -9
- package/src/lib/components/table/pagination/table.pagination.component.ts +0 -89
- package/src/lib/components/table/report/table.report.component.css +0 -125
- package/src/lib/components/table/report/table.report.component.html +0 -19
- package/src/lib/components/table/report/table.report.component.ts +0 -238
- package/src/lib/components/table/row/table.row.component.css +0 -170
- package/src/lib/components/table/row/table.row.component.html +0 -21
- package/src/lib/components/table/row/table.row.component.ts +0 -373
- package/src/lib/components/table/table.component.css +0 -116
- package/src/lib/components/table/table.component.html +0 -62
- package/src/lib/components/table/table.component.ts +0 -180
- package/src/lib/components/tooltip/tooltip.component.css +0 -159
- package/src/lib/components/tooltip/tooltip.component.html +0 -1
- package/src/lib/components/tooltip/tooltip.component.ts +0 -15
- package/src/lib/ps-toolkit-ui.module.ts +0 -94
- package/src/lib/services/config.service.ts +0 -8
- package/src/test.ts +0 -26
- package/tsconfig.lib.json +0 -25
- package/tsconfig.lib.prod.json +0 -10
- package/tsconfig.spec.json +0 -17
- package/tslint.json +0 -17
|
@@ -1,131 +0,0 @@
|
|
|
1
|
-
import {Component, ElementRef, EventEmitter, Input, OnInit, Output, ViewChild} from '@angular/core';
|
|
2
|
-
import {InputClass} from '../../../classes/form.class';
|
|
3
|
-
import {InputError} from '../../../classes/enum.class';
|
|
4
|
-
import {HelperClass} from '../../../classes/helper.class';
|
|
5
|
-
|
|
6
|
-
@Component({
|
|
7
|
-
selector: 'lib-form-finger',
|
|
8
|
-
templateUrl: './form.finger.component.html',
|
|
9
|
-
styleUrls: ['./form.finger.component.css']
|
|
10
|
-
})
|
|
11
|
-
export class FormFingerComponent implements OnInit {
|
|
12
|
-
@Input()
|
|
13
|
-
inp: InputClass;
|
|
14
|
-
@Output()
|
|
15
|
-
changeIndex = new EventEmitter<string>();
|
|
16
|
-
@ViewChild('inputBase') inputBase: ElementRef;
|
|
17
|
-
@ViewChild('inputDiv') inputDiv: ElementRef;
|
|
18
|
-
@ViewChild('inputLabel') inputLabel: ElementRef;
|
|
19
|
-
wsRegister = null;
|
|
20
|
-
ngOnInit(): void {
|
|
21
|
-
this.inp.setValue = (v) => {
|
|
22
|
-
this.inp.value = v != null ? v : {
|
|
23
|
-
R1: null,
|
|
24
|
-
R2: null,
|
|
25
|
-
R3: null,
|
|
26
|
-
R4: null,
|
|
27
|
-
R5: null,
|
|
28
|
-
L1: null,
|
|
29
|
-
L2: null,
|
|
30
|
-
L3: null,
|
|
31
|
-
L4: null,
|
|
32
|
-
L5: null,
|
|
33
|
-
};
|
|
34
|
-
};
|
|
35
|
-
this.inp.focus = () => {
|
|
36
|
-
this.onFocusIn();
|
|
37
|
-
};
|
|
38
|
-
this.inp.isValid = () => {
|
|
39
|
-
this.inp.error = null;
|
|
40
|
-
if (this.inp.required && !this.inp.value) {
|
|
41
|
-
this.inp.error = InputError.Required;
|
|
42
|
-
return false;
|
|
43
|
-
}
|
|
44
|
-
if (!this.inp.required && !this.inp.value) {
|
|
45
|
-
return true;
|
|
46
|
-
}
|
|
47
|
-
return true;
|
|
48
|
-
};
|
|
49
|
-
this.inp.clear = () => {
|
|
50
|
-
this.inp.error = null;
|
|
51
|
-
this.inp.setValue(null, false);
|
|
52
|
-
};
|
|
53
|
-
this.inp.data = () => {
|
|
54
|
-
if (this.inp.value === null) {
|
|
55
|
-
return null;
|
|
56
|
-
}
|
|
57
|
-
const d = new FormData();
|
|
58
|
-
for (const [key, value] of Object.entries(this.inp.value)) {
|
|
59
|
-
if (value != null && value !== 'Loading'){
|
|
60
|
-
// @ts-ignore
|
|
61
|
-
d.append(key, value.Hash.toString());
|
|
62
|
-
// @ts-ignore
|
|
63
|
-
d.append(key + 'Image', value.Image.toString());
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
return d;
|
|
67
|
-
};
|
|
68
|
-
this.inp.setValue(null, false);
|
|
69
|
-
}
|
|
70
|
-
onClick(): void{
|
|
71
|
-
this.onFocusIn();
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
onFocusIn(): void {
|
|
75
|
-
this.inputBase.nativeElement.focus();
|
|
76
|
-
}
|
|
77
|
-
onKeyDown(e): void{
|
|
78
|
-
const code = e.keyCode || e.which;
|
|
79
|
-
if (code === 9 || code === 13) {
|
|
80
|
-
e.preventDefault();
|
|
81
|
-
this.changeIndex.emit(e.shiftKey ? 'ShiftTab' : 'Tab');
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
addRemoveFinger(f: string): void{
|
|
85
|
-
const fv = this.inp.value[f];
|
|
86
|
-
if (fv === 'Loading') {
|
|
87
|
-
if (this.wsRegister != null){
|
|
88
|
-
this.wsRegister.close();
|
|
89
|
-
this.wsRegister = null;
|
|
90
|
-
}
|
|
91
|
-
this.inp.value[f] = null;
|
|
92
|
-
}else{
|
|
93
|
-
this.inp.value.R1 = this.inp.value.R1 === 'Loading' ? null : this.inp.value.R1;
|
|
94
|
-
this.inp.value.R2 = this.inp.value.R2 === 'Loading' ? null : this.inp.value.R2;
|
|
95
|
-
this.inp.value.R3 = this.inp.value.R3 === 'Loading' ? null : this.inp.value.R3;
|
|
96
|
-
this.inp.value.R4 = this.inp.value.R4 === 'Loading' ? null : this.inp.value.R4;
|
|
97
|
-
this.inp.value.R5 = this.inp.value.R5 === 'Loading' ? null : this.inp.value.R5;
|
|
98
|
-
this.inp.value.L1 = this.inp.value.L1 === 'Loading' ? null : this.inp.value.L1;
|
|
99
|
-
this.inp.value.L2 = this.inp.value.L2 === 'Loading' ? null : this.inp.value.L2;
|
|
100
|
-
this.inp.value.L3 = this.inp.value.L3 === 'Loading' ? null : this.inp.value.L3;
|
|
101
|
-
this.inp.value.L4 = this.inp.value.L4 === 'Loading' ? null : this.inp.value.L4;
|
|
102
|
-
this.inp.value.L5 = this.inp.value.L5 === 'Loading' ? null : this.inp.value.L5;
|
|
103
|
-
if (fv != null){
|
|
104
|
-
this.inp.value[f] = null;
|
|
105
|
-
} else {
|
|
106
|
-
this.wsRegister = new WebSocket('ws://localhost:7890/Register');
|
|
107
|
-
this.wsRegister.onopen = () => {
|
|
108
|
-
this.inp.value[f] = 'Loading';
|
|
109
|
-
};
|
|
110
|
-
this.wsRegister.onmessage = (evt) => {
|
|
111
|
-
console.log(evt.data);
|
|
112
|
-
if (evt.data === 'Exist'){
|
|
113
|
-
this.inp.value[f] = null;
|
|
114
|
-
HelperClass.addNotification(this.inp.l('FingerprintExist'));
|
|
115
|
-
} else if (evt.data.startsWith('Error')){
|
|
116
|
-
this.inp.value[f] = null;
|
|
117
|
-
HelperClass.addNotification(evt.data);
|
|
118
|
-
} else {
|
|
119
|
-
this.inp.value[f] = JSON.parse(evt.data);
|
|
120
|
-
}
|
|
121
|
-
this.wsRegister.close();
|
|
122
|
-
this.wsRegister = null;
|
|
123
|
-
};
|
|
124
|
-
this.wsRegister.onclose = () => {
|
|
125
|
-
};
|
|
126
|
-
this.wsRegister.onerror = () => {
|
|
127
|
-
};
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
}
|
|
File without changes
|
|
File without changes
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import {Component, Input, OnInit} from '@angular/core';
|
|
2
|
-
import {InputClass} from '../../../classes/form.class';
|
|
3
|
-
|
|
4
|
-
@Component({
|
|
5
|
-
selector: 'lib-form-hidden',
|
|
6
|
-
templateUrl: './form.hidden.component.html',
|
|
7
|
-
styleUrls: ['./form.hidden.component.css']
|
|
8
|
-
})
|
|
9
|
-
export class FormHiddenComponent implements OnInit{
|
|
10
|
-
@Input()
|
|
11
|
-
inp: InputClass;
|
|
12
|
-
constructor(){
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
ngOnInit(): void {
|
|
16
|
-
this.inp.setValue = (v) => {
|
|
17
|
-
this.inp.value = v;
|
|
18
|
-
};
|
|
19
|
-
this.inp.isValid = () => {
|
|
20
|
-
return true;
|
|
21
|
-
};
|
|
22
|
-
this.inp.clear = () => {
|
|
23
|
-
this.inp.value = null;
|
|
24
|
-
};
|
|
25
|
-
this.inp.data = () => {
|
|
26
|
-
return this.inp.value;
|
|
27
|
-
};
|
|
28
|
-
}
|
|
29
|
-
}
|
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
.form-input.icon {
|
|
2
|
-
position: relative;
|
|
3
|
-
float: right;
|
|
4
|
-
width: 30px;
|
|
5
|
-
height: 30px;
|
|
6
|
-
-webkit-user-select: none;
|
|
7
|
-
-moz-user-select: none;
|
|
8
|
-
-khtml-user-select: none;
|
|
9
|
-
-ms-user-select: none;
|
|
10
|
-
cursor: pointer;
|
|
11
|
-
z-index: 1;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
.form-input.icon .input-base {
|
|
15
|
-
position: absolute;
|
|
16
|
-
width: 0;
|
|
17
|
-
height: 0;
|
|
18
|
-
opacity: 0;
|
|
19
|
-
top: 50%;
|
|
20
|
-
right: 50%;
|
|
21
|
-
z-index: 0;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
.form-input.icon .icon-con {
|
|
25
|
-
border-radius: 5px;
|
|
26
|
-
float: right;
|
|
27
|
-
width: 100%;
|
|
28
|
-
height: 100%;
|
|
29
|
-
position: absolute;
|
|
30
|
-
top: 0;
|
|
31
|
-
right: 0;
|
|
32
|
-
}
|
|
33
|
-
.form-input.icon .icon-con i.icon {
|
|
34
|
-
font-size: 18px;
|
|
35
|
-
width: 30px;
|
|
36
|
-
height: 30px;
|
|
37
|
-
padding: 5px;
|
|
38
|
-
line-height: 20px;
|
|
39
|
-
color: var(--black-88);
|
|
40
|
-
text-align: center;
|
|
41
|
-
float: right;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
.form-input.icon:hover .icon-con, .form-input.icon .input-base:focus + .icon-con{
|
|
45
|
-
background-color: var(--black-22);
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
.form-input.icon:hover .icon-con i.icon, .form-input.icon .input-base:focus + .icon-con .icon{
|
|
49
|
-
color: var(--black-99);
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
.form-input.icon.red:hover .icon-con, .form-input.icon.red .input-base:focus + .icon-con{
|
|
53
|
-
background-color: var(--red-22);
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
.form-input.icon.red:hover .icon-con i.icon, .form-input.icon.red .input-base:focus + .icon-con .icon{
|
|
57
|
-
color: var(--red);
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
.form-input.icon.blue:hover .icon-con, .form-input.icon.blue .input-base:focus + .icon-con{
|
|
62
|
-
background-color: var(--blue-22);
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
.form-input.icon.blue:hover .icon-con i.icon, .form-input.icon.blue .input-base:focus + .icon-con .icon{
|
|
66
|
-
color: var(--blue);
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
.form-input.icon.green:hover .icon-con, .form-input.icon.green .input-base:focus + .icon-con{
|
|
71
|
-
background-color: var(--green-22);
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
.form-input.icon.green:hover .icon-con i.icon, .form-input.icon.green .input-base:focus + .icon-con .icon{
|
|
75
|
-
color: var(--green);
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
.form-input.icon.comp:hover .icon-con, .form-input.icon.comp .input-base:focus + .icon-con{
|
|
80
|
-
background-color: var(--comp-22);
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
.form-input.icon.comp:hover .icon-con i.icon, .form-input.icon.comp .input-base:focus + .icon-con .icon{
|
|
84
|
-
color: var(--comp);
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
.form-input.icon.h-20 {
|
|
88
|
-
width: 20px;
|
|
89
|
-
height: 20px;
|
|
90
|
-
}
|
|
91
|
-
.form-input.icon.h-20 .icon-con i.icon {
|
|
92
|
-
width: 20px;
|
|
93
|
-
height: 20px;
|
|
94
|
-
line-height: 18px;
|
|
95
|
-
font-size: 16px;
|
|
96
|
-
|
|
97
|
-
}
|
|
98
|
-
.form-input.icon.h-25 {
|
|
99
|
-
width: 25px;
|
|
100
|
-
height: 25px;
|
|
101
|
-
}
|
|
102
|
-
.form-input.icon.h-25 .icon-con i.icon {
|
|
103
|
-
width: 25px;
|
|
104
|
-
height: 25px;
|
|
105
|
-
line-height: 15px;
|
|
106
|
-
font-size: 15px;
|
|
107
|
-
|
|
108
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
<div *ngIf="inp.url == null" #inputDiv [id]="inp.name + 'Input'" (click)="onClick($event)" [className]="inp.class + ' form-input icon'" [style]="inp.style">
|
|
2
|
-
<lib-tooltip [text]="inp.l(inp.name)"></lib-tooltip>
|
|
3
|
-
<input #inputBase type="button" class="input-base" (keydown)="onKeyDown($event)" (focusin)="onFocusIn()">
|
|
4
|
-
<div class="icon-con">
|
|
5
|
-
<i *ngIf="inp.icon != null" #inputIcon [className]="(inp.loading ? 'fa-duotone fa-spin fa-spinner' : inp.icon) + ' icon'"></i>
|
|
6
|
-
</div>
|
|
7
|
-
</div>
|
|
8
|
-
<a *ngIf="inp.url != null" [target]="inp.urlNewTab ? '_blank' : ''" [routerLink]="inp.url" #inputDiv [id]="inp.name + 'Input'" (click)="onClick($event)" [className]="inp.class + ' form-input icon'" [style]="inp.style">
|
|
9
|
-
<lib-tooltip [text]="inp.l(inp.name)"></lib-tooltip>
|
|
10
|
-
<input #inputBase type="button" class="input-base" (keydown)="onKeyDown($event)" (focusin)="onFocusIn()">
|
|
11
|
-
<div class="icon-con">
|
|
12
|
-
<i *ngIf="inp.icon != null" #inputIcon [className]="(inp.loading ? 'fa-duotone fa-spin fa-spinner' : inp.icon) + ' icon'"></i>
|
|
13
|
-
</div>
|
|
14
|
-
</a>
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
import {Component, ElementRef, EventEmitter, HostListener, Input, OnInit, Output, ViewChild} from '@angular/core';
|
|
2
|
-
import * as $ from 'jquery';
|
|
3
|
-
import {InputClass} from '../../../classes/form.class';
|
|
4
|
-
|
|
5
|
-
@Component({
|
|
6
|
-
selector: 'lib-form-icon',
|
|
7
|
-
templateUrl: './form.icon.component.html',
|
|
8
|
-
styleUrls: ['./form.icon.component.css']
|
|
9
|
-
})
|
|
10
|
-
export class FormIconComponent implements OnInit{
|
|
11
|
-
@Input()
|
|
12
|
-
inp: InputClass;
|
|
13
|
-
@Output()
|
|
14
|
-
changeIndex = new EventEmitter<string>();
|
|
15
|
-
@ViewChild('inputDiv') inputDiv: ElementRef;
|
|
16
|
-
@ViewChild('inputBase') inputBase: ElementRef;
|
|
17
|
-
constructor(){
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
ngOnInit(): void {
|
|
21
|
-
this.inp.setValue = (v) => {
|
|
22
|
-
};
|
|
23
|
-
this.inp.isValid = () => {
|
|
24
|
-
return true;
|
|
25
|
-
};
|
|
26
|
-
this.inp.focus = () => {
|
|
27
|
-
this.onFocusIn();
|
|
28
|
-
};
|
|
29
|
-
}
|
|
30
|
-
onFocusIn(): void{
|
|
31
|
-
$(this.inputBase.nativeElement).focus();
|
|
32
|
-
}
|
|
33
|
-
onClick(e): void{
|
|
34
|
-
if (e.screenX && e.screenX !== 0 && e.screenY && e.screenY !== 0) {
|
|
35
|
-
this.mouseClick();
|
|
36
|
-
}else{
|
|
37
|
-
this.codeClick();
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
mouseClick(): void{
|
|
41
|
-
this.onFocusIn();
|
|
42
|
-
if (this.inp.modal){
|
|
43
|
-
if (this.inp.row){
|
|
44
|
-
this.inp.modal.relatedId = this.inp.row.Id;
|
|
45
|
-
}
|
|
46
|
-
this.inp.modal.show();
|
|
47
|
-
if (this.inp.modal.form){
|
|
48
|
-
this.inp.modal.form.onSuccessBase = () => {
|
|
49
|
-
this.inp.modal.hide();
|
|
50
|
-
};
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
if (!this.inp.loading && this.inp.onClick != null){
|
|
54
|
-
this.inp.onClick(this.inp);
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
codeClick(): void{
|
|
58
|
-
this.onFocusIn();
|
|
59
|
-
}
|
|
60
|
-
onKeyDown(e): void{
|
|
61
|
-
const code = e.keyCode || e.which;
|
|
62
|
-
if (code === 9) {
|
|
63
|
-
e.preventDefault();
|
|
64
|
-
this.changeIndex.emit(e.shiftKey ? 'ShiftTab' : 'Tab');
|
|
65
|
-
}
|
|
66
|
-
if (code === 13) {
|
|
67
|
-
e.preventDefault();
|
|
68
|
-
if (!this.inp.loading && this.inp.onClick != null){
|
|
69
|
-
this.inp.onClick(this.inp);
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
}
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
.form{
|
|
2
|
-
width: 100%;
|
|
3
|
-
float: right;
|
|
4
|
-
padding: 20px;
|
|
5
|
-
border-radius: 5px;
|
|
6
|
-
position: relative;
|
|
7
|
-
}
|
|
8
|
-
.form > .title{
|
|
9
|
-
float: right;
|
|
10
|
-
width: 100%;
|
|
11
|
-
height: 40px;
|
|
12
|
-
line-height: 30px;
|
|
13
|
-
font-family: VazirBold;
|
|
14
|
-
font-size: 16px;
|
|
15
|
-
text-align: right;
|
|
16
|
-
margin-bottom: 10px;
|
|
17
|
-
position: relative;
|
|
18
|
-
}
|
|
19
|
-
.form > .sub-title{
|
|
20
|
-
float: right;
|
|
21
|
-
width: 100%;
|
|
22
|
-
height: 30px;
|
|
23
|
-
line-height: 30px;
|
|
24
|
-
font-family: VazirLight;
|
|
25
|
-
text-align: right;
|
|
26
|
-
margin-bottom: 10px;
|
|
27
|
-
position: relative;
|
|
28
|
-
color: var(--black-88);
|
|
29
|
-
font-size: 12px;
|
|
30
|
-
}
|
|
31
|
-
.form .loading{
|
|
32
|
-
position: absolute;
|
|
33
|
-
background-color: white;
|
|
34
|
-
top: 0;
|
|
35
|
-
right: 0;
|
|
36
|
-
width: 100%;
|
|
37
|
-
height: 100%;
|
|
38
|
-
text-align: center;
|
|
39
|
-
border-radius: 5px;
|
|
40
|
-
z-index: 4;
|
|
41
|
-
}
|
|
42
|
-
.form .loading .text {
|
|
43
|
-
position: absolute;
|
|
44
|
-
height: 35px;
|
|
45
|
-
line-height: 35px;
|
|
46
|
-
width: 100%;
|
|
47
|
-
text-align: center;
|
|
48
|
-
font-family: VazirBold;
|
|
49
|
-
top: calc(50% - 20px);
|
|
50
|
-
}
|
|
51
|
-
::ng-deep .form .loading .icon {
|
|
52
|
-
font-size: 20px !important;
|
|
53
|
-
line-height: 30px;
|
|
54
|
-
position: relative;
|
|
55
|
-
top: 5px;
|
|
56
|
-
margin-left: 5px;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
.form-buttons{
|
|
60
|
-
float: right;
|
|
61
|
-
width: 100%;
|
|
62
|
-
}
|
|
63
|
-
.form-error{
|
|
64
|
-
margin-top: 10px;
|
|
65
|
-
padding: 0 10px;
|
|
66
|
-
position: relative;
|
|
67
|
-
float: right;
|
|
68
|
-
width: 100%;
|
|
69
|
-
height: 15px;
|
|
70
|
-
line-height: 8px;
|
|
71
|
-
color: var(--red-cc);
|
|
72
|
-
text-align: center;
|
|
73
|
-
font-size: 11px;
|
|
74
|
-
}
|
|
75
|
-
.form-error .message{
|
|
76
|
-
float: left;
|
|
77
|
-
width: calc(100% - 40px);
|
|
78
|
-
}
|
|
79
|
-
.form-error .icon{
|
|
80
|
-
float: right;
|
|
81
|
-
width: 40px;
|
|
82
|
-
height: 20px;
|
|
83
|
-
right: 0;
|
|
84
|
-
top: 0;
|
|
85
|
-
line-height: 6px;
|
|
86
|
-
}
|
|
87
|
-
.form .inputs{
|
|
88
|
-
margin: 0 -15px;
|
|
89
|
-
}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
<form [style]="form.style" *ngIf="form" [id]="form.id + 'Form'" [className]="'form' + (form.class ? ' ' + form.class : '')">
|
|
2
|
-
<div *ngIf="form.displayLabel" [className]="(form.subName ? '' : 'underline ') + 'title'">{{this.form.l(this.form.name)}}</div>
|
|
3
|
-
<div *ngIf="form.displayLabel && form.subName" class="sub-title underline">{{this.form.l(this.form.subName)}}</div>
|
|
4
|
-
<div *ngIf="form.loading" class="loading">
|
|
5
|
-
<div class="text" [innerHTML]="form.l('LoadingTable', 'Processing')"></div>
|
|
6
|
-
</div>
|
|
7
|
-
<div *ngIf="!form.permission" class="loading">
|
|
8
|
-
<div class="text"><i class="fas fa-shield-alt icon"></i>{{ form.l("PermissionDenied") }}</div>
|
|
9
|
-
</div>
|
|
10
|
-
<div class="inputs">
|
|
11
|
-
<span *ngFor="let inp of form.inputs; let i = index">
|
|
12
|
-
<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.Phone || inp.type == type.Email || inp.type == type.NationalCode || inp.type == type.Number || inp.type == type.Url || inp.type == type.PostalCode || inp.type == type.Price || inp.type == type.Sheba)" [inp]="inp"></lib-form-textbox>
|
|
13
|
-
<lib-form-textarea (changeIndex)="changeIndex(i, $event)" *ngIf="inp.visible && inp.type == type.TextArea" [inp]="inp"></lib-form-textarea>
|
|
14
|
-
<lib-form-checkbox (changeIndex)="changeIndex(i, $event)" *ngIf="inp.visible && inp.type == type.Check" [inp]="inp"></lib-form-checkbox>
|
|
15
|
-
<lib-form-select [inForm]="true" (changeIndex)="changeIndex(i, $event)" *ngIf="inp.visible && (inp.type == type.Select || inp.type == type.SelectSearch || inp.type == type.SelectAutoComplete)" [inp]="inp"></lib-form-select>
|
|
16
|
-
<lib-form-date [inForm]="true" (changeIndex)="changeIndex(i, $event)" *ngIf="inp.visible && inp.type == type.Date" [inp]="inp"></lib-form-date>
|
|
17
|
-
<lib-form-time [inForm]="true" (changeIndex)="changeIndex(i, $event)" *ngIf="inp.visible && inp.type == type.Time" [inp]="inp"></lib-form-time>
|
|
18
|
-
<lib-form-datetime [inForm]="true" (changeIndex)="changeIndex(i, $event)" *ngIf="inp.visible && inp.type == type.DateTime" [inp]="inp"></lib-form-datetime>
|
|
19
|
-
<lib-form-label *ngIf="inp.visible && inp.type == type.Label" [inp]="inp"></lib-form-label>
|
|
20
|
-
<lib-form-file (changeIndex)="changeIndex(i, $event)" *ngIf="inp.visible && inp.type == type.File" [inp]="inp"></lib-form-file>
|
|
21
|
-
<lib-form-button (changeIndex)="changeIndex(i, $event)" *ngIf="inp.visible && (inp.type == type.Button || inp.type == type.Submit)" [inp]="inp"></lib-form-button>
|
|
22
|
-
<lib-form-icon (changeIndex)="changeIndex(i, $event)" *ngIf="inp.visible && inp.type == type.Icon" [inp]="inp"></lib-form-icon>
|
|
23
|
-
<lib-form-radio (changeIndex)="changeIndex(i, $event)" *ngIf="inp.visible && inp.type == type.Radio" [inp]="inp"></lib-form-radio>
|
|
24
|
-
<lib-form-tree (changeIndex)="changeIndex(i, $event)" *ngIf="inp.visible && inp.type == type.Tree" [inp]="inp"></lib-form-tree>
|
|
25
|
-
<lib-form-plaque (changeIndex)="changeIndex(i, $event)" *ngIf="inp.visible && (inp.type == type.Plaque || inp.type == type.PlaqueM)" [inp]="inp"></lib-form-plaque>
|
|
26
|
-
<lib-form-plaque-select (changeIndex)="changeIndex(i, $event)" *ngIf="inp.visible && (inp.type == type.SelectAutoCompletePlaque || inp.type == type.SelectAutoCompletePlaqueM)" [inp]="inp"></lib-form-plaque-select>
|
|
27
|
-
<lib-form-bank-card (changeIndex)="changeIndex(i, $event)" *ngIf="inp.visible && inp.type == type.BankCard" [inp]="inp"></lib-form-bank-card>
|
|
28
|
-
<lib-form-car-search (changeIndex)="changeIndex(i, $event)" *ngIf="inp.visible && inp.type == type.CarSearch" [inp]="inp"></lib-form-car-search>
|
|
29
|
-
<lib-form-car (changeIndex)="changeIndex(i, $event)" *ngIf="inp.visible && inp.type == type.Car" [inp]="inp"></lib-form-car>
|
|
30
|
-
<lib-form-finger (changeIndex)="changeIndex(i, $event)" *ngIf="inp.visible && inp.type == type.Finger" [inp]="inp"></lib-form-finger>
|
|
31
|
-
<lib-form-table *ngIf="inp.visible && inp.type == type.Table" [inp]="inp"></lib-form-table>
|
|
32
|
-
<lib-form-hidden *ngIf="inp.type == type.Hidden" [inp]="inp"></lib-form-hidden>
|
|
33
|
-
</span>
|
|
34
|
-
</div>
|
|
35
|
-
</form>
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import {Component, Input, OnInit} from '@angular/core';
|
|
2
|
-
import {FormClass} from '../../../classes/form.class';
|
|
3
|
-
import {InputType} from '../../../classes/enum.class';
|
|
4
|
-
|
|
5
|
-
@Component({
|
|
6
|
-
selector: 'lib-form',
|
|
7
|
-
templateUrl: './form.component.html',
|
|
8
|
-
styleUrls: ['./form.component.css']
|
|
9
|
-
})
|
|
10
|
-
export class FormComponent implements OnInit{
|
|
11
|
-
@Input()
|
|
12
|
-
form: FormClass;
|
|
13
|
-
get type(): typeof InputType { return InputType; }
|
|
14
|
-
constructor(){
|
|
15
|
-
}
|
|
16
|
-
ngOnInit(): void{
|
|
17
|
-
}
|
|
18
|
-
changeIndex(index, action): void{
|
|
19
|
-
const n = action === 'ShiftTab' || action === 'ShiftEnter' ? -1 : 1;
|
|
20
|
-
const lastInp = this.form.inputs.map(
|
|
21
|
-
x => x.type !== InputType.Submit && x.type !== InputType.Button &&
|
|
22
|
-
x.type !== InputType.Label && x.type !== InputType.Hidden && !x.disabled && x.visible).lastIndexOf(true);
|
|
23
|
-
if (index === lastInp && action === 'Enter') {
|
|
24
|
-
const submit = this.form.inputs.findIndex(x => x.type === InputType.Submit);
|
|
25
|
-
if (submit !== -1){
|
|
26
|
-
this.form.submit();
|
|
27
|
-
return;
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
let next = index + n;
|
|
31
|
-
while (next >= 0 && next < this.form.inputs.length && (this.form.inputs[next].disabled || !this.form.inputs[next].visible
|
|
32
|
-
|| this.form.inputs[next].type === InputType.Label || this.form.inputs[next].type === InputType.Hidden)){
|
|
33
|
-
next = next + n;
|
|
34
|
-
}
|
|
35
|
-
if (next >= 0 && next < this.form.inputs.length){
|
|
36
|
-
setTimeout(() => {
|
|
37
|
-
this.form.inputs[next].focus(true);
|
|
38
|
-
}, 1);
|
|
39
|
-
}else{
|
|
40
|
-
setTimeout(() => {
|
|
41
|
-
this.form.inputs[index].focusOut();
|
|
42
|
-
}, 1);
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
.form-input.label {
|
|
2
|
-
position: relative;
|
|
3
|
-
float: right;
|
|
4
|
-
width: 100%;
|
|
5
|
-
padding: 0 15px;
|
|
6
|
-
font-size: 12px;
|
|
7
|
-
text-align: center;
|
|
8
|
-
cursor: default;
|
|
9
|
-
line-height: 30px;
|
|
10
|
-
-webkit-user-select: none;
|
|
11
|
-
-moz-user-select: none;
|
|
12
|
-
-khtml-user-select: none;
|
|
13
|
-
-ms-user-select: none;
|
|
14
|
-
}
|
|
15
|
-
.form-input.label.underline {
|
|
16
|
-
width: calc(100% - 30px);
|
|
17
|
-
margin: 20px 15px;
|
|
18
|
-
}
|
|
19
|
-
.form-input.label.form-group-title {
|
|
20
|
-
width: calc(100% - 30px);
|
|
21
|
-
margin: 0 15px 10px 15px;
|
|
22
|
-
}
|
|
23
|
-
.form-input.label.space {
|
|
24
|
-
width: calc(100% - 30px);
|
|
25
|
-
margin: 10px 15px;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
.form-input.label.h-58{
|
|
29
|
-
height: 58px;
|
|
30
|
-
line-height: 58px;
|
|
31
|
-
}
|
|
32
|
-
.form-input.label.h-45{
|
|
33
|
-
height: 45px;
|
|
34
|
-
line-height: 45px;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
.form-input.label.h-30{
|
|
38
|
-
height: 30px;
|
|
39
|
-
line-height: 30px;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
.form-input.label.h-25{
|
|
43
|
-
height: 25px;
|
|
44
|
-
line-height: 25px;
|
|
45
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import {Component, Input, OnInit} from '@angular/core';
|
|
2
|
-
import {InputClass} from '../../../classes/form.class';
|
|
3
|
-
|
|
4
|
-
@Component({
|
|
5
|
-
selector: 'lib-form-label',
|
|
6
|
-
templateUrl: './form.label.component.html',
|
|
7
|
-
styleUrls: ['./form.label.component.css']
|
|
8
|
-
})
|
|
9
|
-
export class FormLabelComponent implements OnInit{
|
|
10
|
-
@Input()
|
|
11
|
-
inp: InputClass;
|
|
12
|
-
constructor(){
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
ngOnInit(): void {
|
|
16
|
-
this.inp.setValue = (v) => {
|
|
17
|
-
this.inp.value = v;
|
|
18
|
-
};
|
|
19
|
-
this.inp.isValid = () => {
|
|
20
|
-
return true;
|
|
21
|
-
};
|
|
22
|
-
this.inp.clear = () => {
|
|
23
|
-
};
|
|
24
|
-
}
|
|
25
|
-
onClick(): void{
|
|
26
|
-
if (this.inp.onClick){
|
|
27
|
-
this.inp.onClick(this.inp);
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
}
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
.form-input.plaque {
|
|
2
|
-
position: relative;
|
|
3
|
-
float: right;
|
|
4
|
-
width: 198px;
|
|
5
|
-
padding: 0 15px;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
.form-input.plaque .label {
|
|
9
|
-
float: right;
|
|
10
|
-
width: 100%;
|
|
11
|
-
height: 20px;
|
|
12
|
-
line-height: 20px;
|
|
13
|
-
padding: 0 10px;
|
|
14
|
-
font-size: 12px;
|
|
15
|
-
margin-bottom: 3px;
|
|
16
|
-
cursor: default;
|
|
17
|
-
-webkit-user-select: none;
|
|
18
|
-
-moz-user-select: none;
|
|
19
|
-
-khtml-user-select: none;
|
|
20
|
-
-ms-user-select: none;
|
|
21
|
-
direction: rtl;
|
|
22
|
-
text-align: right;
|
|
23
|
-
}
|
|
24
|
-
.form-input.plaque.error .label {
|
|
25
|
-
font-size: 10px;
|
|
26
|
-
color: var(--red);
|
|
27
|
-
}
|
|
28
|
-
.form-input.plaque .label .required-icon{
|
|
29
|
-
height: 20px;
|
|
30
|
-
width: 20px;
|
|
31
|
-
line-height: 20px;
|
|
32
|
-
font-size: 9px;
|
|
33
|
-
color: var(--red);
|
|
34
|
-
text-align: center;
|
|
35
|
-
}
|
|
36
|
-
.form-input.plaque .plaque-con{
|
|
37
|
-
position: relative;
|
|
38
|
-
float: right;
|
|
39
|
-
width: 100%;
|
|
40
|
-
height: 35px;
|
|
41
|
-
font-size: 15px;
|
|
42
|
-
direction: ltr;
|
|
43
|
-
background-image: url("../../../../assets/images/plaque.png");
|
|
44
|
-
background-repeat: no-repeat;
|
|
45
|
-
background-position: center center;
|
|
46
|
-
background-size: cover;
|
|
47
|
-
border-radius: 5px;
|
|
48
|
-
background-color: white;
|
|
49
|
-
}
|
|
50
|
-
.form-input.plaque .plaque-con .part-0{
|
|
51
|
-
width: 16px !important;
|
|
52
|
-
height: 35px !important;
|
|
53
|
-
float: left !important;
|
|
54
|
-
}
|
|
55
|
-
.form-input.plaque.plaque-m .plaque-con{
|
|
56
|
-
background-image: url("../../../../assets/images/plaque_m.png");
|
|
57
|
-
}
|
|
58
|
-
.form-input.plaque .plaque-con .image{
|
|
59
|
-
position: absolute;
|
|
60
|
-
top: 0;
|
|
61
|
-
right: 0;
|
|
62
|
-
height: 100%;
|
|
63
|
-
width: 100%;
|
|
64
|
-
}
|
|
65
|
-
.form-input.plaque .plaque-con.p{
|
|
66
|
-
background-color: #ffc913;
|
|
67
|
-
}
|
|
68
|
-
.form-input.plaque .plaque-con.g{
|
|
69
|
-
background-color: #e20600;
|
|
70
|
-
}
|
|
71
|
-
::ng-deep .form-input.plaque .plaque-con .form-input .control{
|
|
72
|
-
background-color: transparent !important;
|
|
73
|
-
box-shadow: unset !important;
|
|
74
|
-
padding: 0 !important;
|
|
75
|
-
font-size: 13px!important;
|
|
76
|
-
}
|