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,47 +0,0 @@
|
|
|
1
|
-
import {Component, Input, OnInit} from '@angular/core';
|
|
2
|
-
import {FormClass, InputClass} from '../../classes/form.class';
|
|
3
|
-
import {ModalClass} from '../../classes/modal.class';
|
|
4
|
-
import {InputType} from '../../classes/enum.class';
|
|
5
|
-
import {PsToolkitUiConfigService} from '../../services/config.service';
|
|
6
|
-
import {LangClass} from '../../classes/lang.class';
|
|
7
|
-
|
|
8
|
-
@Component({
|
|
9
|
-
selector: 'lib-confirm',
|
|
10
|
-
templateUrl: './confirm.component.html',
|
|
11
|
-
styleUrls: ['./confirm.component.css']
|
|
12
|
-
})
|
|
13
|
-
export class ConfirmComponent implements OnInit{
|
|
14
|
-
@Input()
|
|
15
|
-
tableId: string;
|
|
16
|
-
l: (k, v?) => string;
|
|
17
|
-
confirm: ModalClass;
|
|
18
|
-
confirmLabel: InputClass;
|
|
19
|
-
constructor(public config: PsToolkitUiConfigService){
|
|
20
|
-
const lang = new LangClass(config.currentLang, config.strings);
|
|
21
|
-
this.l = (key: string, v = null): string => {
|
|
22
|
-
return lang.get('Public', 'Confirm', key, v);
|
|
23
|
-
};
|
|
24
|
-
}
|
|
25
|
-
ngOnInit(): void {
|
|
26
|
-
this.confirm = new ModalClass(this.config.environment, this.l, (this.tableId ? this.tableId : '') + 'Confirm');
|
|
27
|
-
this.confirm.form = new FormClass(this.config.environment, this.l, 'Confirm');
|
|
28
|
-
this.confirmLabel = new InputClass(this.config.environment, this.l, 'Confirm', null, InputType.Label, 'f-s-16 p-h-20 p-t-10 l-h-30', 'Confirm');
|
|
29
|
-
this.confirm.form.inputs = [
|
|
30
|
-
this.confirmLabel,
|
|
31
|
-
];
|
|
32
|
-
this.confirm.form.addButtons('Accept', 'blue', false);
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
show(l: string, url: string, data, accept: (btn: InputClass) => void): void{
|
|
36
|
-
this.confirmLabel.value = l;
|
|
37
|
-
this.confirm.form.url = url;
|
|
38
|
-
this.confirm.form.data = () => {
|
|
39
|
-
return data;
|
|
40
|
-
};
|
|
41
|
-
this.confirm.form.onSuccess = (btn) => {
|
|
42
|
-
this.confirm.hide();
|
|
43
|
-
accept(btn);
|
|
44
|
-
};
|
|
45
|
-
this.confirm.show();
|
|
46
|
-
}
|
|
47
|
-
}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
#Footer{
|
|
2
|
-
position: fixed;
|
|
3
|
-
width: 100%;
|
|
4
|
-
line-height: 35px;
|
|
5
|
-
background-color: var(--base-dark);
|
|
6
|
-
bottom: 0;
|
|
7
|
-
right: 0;
|
|
8
|
-
color: white;
|
|
9
|
-
text-align: center;
|
|
10
|
-
z-index: 2;
|
|
11
|
-
font-size: 12px;
|
|
12
|
-
font-family: VazirBold;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
#Footer .copyright, #Footer .creator{
|
|
16
|
-
float: right;
|
|
17
|
-
width: 50%;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
#Footer .copyright i, #Footer .creator i, #Footer .creator a{
|
|
21
|
-
color: var(--comp)!important;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
@media (max-width: 399.98px) {
|
|
26
|
-
#Footer .copyright, #Footer .creator{
|
|
27
|
-
width: 100%;
|
|
28
|
-
font-size: 11px;
|
|
29
|
-
line-height: 30px;
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
@media (min-width: 400px) and (max-width: 499.98px) {
|
|
34
|
-
#Footer .copyright, #Footer .creator{
|
|
35
|
-
width: 100%;
|
|
36
|
-
line-height: 30px;
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
@media (min-width: 500px) and (max-width: 599.98px) {
|
|
41
|
-
#Footer .copyright, #Footer .creator{
|
|
42
|
-
width: 100%;
|
|
43
|
-
line-height: 30px;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
<div id="Footer">
|
|
2
|
-
<div class="copyright">
|
|
3
|
-
<i class="far fa-copyright"></i>
|
|
4
|
-
{{l('Copyright')}}
|
|
5
|
-
</div>
|
|
6
|
-
<div class="creator">
|
|
7
|
-
<i class="fas fa-heart"></i> {{l('CreatorDesc')}} <a href="http://partsilicon.ir/" target="_blank">{{l('CreatorCom')}}</a>
|
|
8
|
-
</div>
|
|
9
|
-
</div>
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import {Component} from '@angular/core';
|
|
2
|
-
import {LangClass} from '../../classes/lang.class';
|
|
3
|
-
import {PsToolkitUiConfigService} from '../../services/config.service';
|
|
4
|
-
|
|
5
|
-
@Component({
|
|
6
|
-
selector: 'lib-footer',
|
|
7
|
-
templateUrl: './footer.component.html',
|
|
8
|
-
styleUrls: ['./footer.component.css']
|
|
9
|
-
})
|
|
10
|
-
export class FooterComponent{
|
|
11
|
-
l: (k, v?) => string;
|
|
12
|
-
constructor(public config: PsToolkitUiConfigService){
|
|
13
|
-
const lang = new LangClass(config.currentLang, config.strings);
|
|
14
|
-
this.l = (key: string, v = null): string => {
|
|
15
|
-
return lang.get('Public', 'Footer', key, v);
|
|
16
|
-
};
|
|
17
|
-
}
|
|
18
|
-
}
|
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
.form-input-con.bank-card {
|
|
2
|
-
position: relative;
|
|
3
|
-
float: right;
|
|
4
|
-
width: 100%;
|
|
5
|
-
padding: 0 15px;
|
|
6
|
-
}
|
|
7
|
-
.form-input-con.bank-card .form-input {
|
|
8
|
-
position: relative;
|
|
9
|
-
float: right;
|
|
10
|
-
width: 100%;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
.form-input-con.bank-card .form-input .label {
|
|
14
|
-
float: right;
|
|
15
|
-
width: 100%;
|
|
16
|
-
height: 20px;
|
|
17
|
-
line-height: 20px;
|
|
18
|
-
padding: 0 10px;
|
|
19
|
-
font-size: 12px;
|
|
20
|
-
margin-bottom: 3px;
|
|
21
|
-
cursor: default;
|
|
22
|
-
-webkit-user-select: none;
|
|
23
|
-
-moz-user-select: none;
|
|
24
|
-
-khtml-user-select: none;
|
|
25
|
-
-ms-user-select: none;
|
|
26
|
-
direction: rtl;
|
|
27
|
-
text-align: right;
|
|
28
|
-
}
|
|
29
|
-
.form-input-con.bank-card.error .form-input .label {
|
|
30
|
-
font-size: 10px;
|
|
31
|
-
color: var(--red);
|
|
32
|
-
}
|
|
33
|
-
.form-input-con.bank-card .form-input .label .required-icon{
|
|
34
|
-
height: 20px;
|
|
35
|
-
width: 20px;
|
|
36
|
-
line-height: 20px;
|
|
37
|
-
font-size: 9px;
|
|
38
|
-
color: var(--red);
|
|
39
|
-
text-align: center;
|
|
40
|
-
}
|
|
41
|
-
.form-input-con.bank-card .form-input .control {
|
|
42
|
-
float: right;
|
|
43
|
-
width: 100%;
|
|
44
|
-
height: 35px;
|
|
45
|
-
padding: 0 35px;
|
|
46
|
-
border-radius: 5px;
|
|
47
|
-
border: var(--border-input);
|
|
48
|
-
background-color: white;
|
|
49
|
-
position: relative;
|
|
50
|
-
direction: ltr;
|
|
51
|
-
overflow: hidden;
|
|
52
|
-
}
|
|
53
|
-
.form-input-con.bank-card .form-input:hover .control, .form-input-con.bank-card .form-input .control:focus {
|
|
54
|
-
outline: none;
|
|
55
|
-
border: var(--border-input-dark);
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
.form-input-con.bank-card.error .form-input .control {
|
|
59
|
-
border: var(--border-input-red);
|
|
60
|
-
}
|
|
61
|
-
.form-input-con.bank-card.error .form-input .control, .form-input-con.bank-card.error .form-input span.icon {
|
|
62
|
-
color: var(--red);
|
|
63
|
-
}
|
|
64
|
-
.form-input-con.bank-card.error .form-input:hover .control, .form-input-con.bank-card.error .form-input .control:focus {
|
|
65
|
-
border: var(--border-input-red-dark);
|
|
66
|
-
}
|
|
67
|
-
.form-input-con.bank-card.without-icon .form-input .control {
|
|
68
|
-
padding: 5px 10px;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
.form-input-con.bank-card .form-input i.icon {
|
|
72
|
-
position: absolute;
|
|
73
|
-
font-size: 14px;
|
|
74
|
-
color: var(--comp);
|
|
75
|
-
cursor: text;
|
|
76
|
-
bottom: 0;
|
|
77
|
-
z-index: 2;
|
|
78
|
-
-webkit-transition: all .35s ease-in-out;
|
|
79
|
-
transition: all .35s ease-in-out;
|
|
80
|
-
width: 35px;
|
|
81
|
-
text-align: center;
|
|
82
|
-
height: 35px;
|
|
83
|
-
line-height: 35px;
|
|
84
|
-
left: 0;
|
|
85
|
-
text-align: center;
|
|
86
|
-
}
|
|
87
|
-
.form-input-con.bank-card .form-input i.clear-icon {
|
|
88
|
-
position: absolute;
|
|
89
|
-
font-size: 14px;
|
|
90
|
-
color: var(--red);
|
|
91
|
-
cursor: pointer;
|
|
92
|
-
bottom: 0;
|
|
93
|
-
z-index: 3;
|
|
94
|
-
-webkit-transition: all .35s ease-in-out;
|
|
95
|
-
transition: all .35s ease-in-out;
|
|
96
|
-
width: 35px;
|
|
97
|
-
text-align: center;
|
|
98
|
-
height: 35px;
|
|
99
|
-
line-height: 38px;
|
|
100
|
-
right: 0;
|
|
101
|
-
}
|
|
102
|
-
.form-input-con.bank-card.disabled .form-input .control, .form-input-con.bank-card.disabled .form-input i.icon, .form-input-con.bank-card.disabled .form-input .label {
|
|
103
|
-
cursor: default;
|
|
104
|
-
box-shadow: unset;
|
|
105
|
-
opacity: 0.7;
|
|
106
|
-
filter: blur(0.5px);
|
|
107
|
-
-webkit-user-select: none;
|
|
108
|
-
-moz-user-select: none;
|
|
109
|
-
-khtml-user-select: none;
|
|
110
|
-
-ms-user-select: none;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
.form-input-con.bank-card.without-icon .form-input .control {
|
|
114
|
-
padding: 5px 10px;
|
|
115
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
<div #inputDiv [id]="inp.name + 'Input'" [style]="inp.style" [className]="inp.class + ' form-input-con bank-card' + (inp.error == null ? '' : ' error') + (inp.disabled || inp.loading ? ' disabled' : '') + (inp.icon == null ? ' without-icon' : '')">
|
|
2
|
-
<div class="form-input" (click)="onFocusIn($event)">
|
|
3
|
-
<div (click)="part1.focus()" *ngIf="inp.displayLabel" class="label"><i *ngIf="inp.required" class="fas fa-star-of-life required-icon"></i>{{inp.getLabel()}}</div>
|
|
4
|
-
<div class="control">
|
|
5
|
-
<lib-form-textbox (changeIndex)="changeFocus('Part1', $event)" [inp]="part1"></lib-form-textbox>
|
|
6
|
-
<lib-form-textbox (changeIndex)="changeFocus('Part2', $event)" [inp]="part2"></lib-form-textbox>
|
|
7
|
-
<lib-form-textbox (changeIndex)="changeFocus('Part3', $event)" [inp]="part3"></lib-form-textbox>
|
|
8
|
-
<lib-form-textbox (changeIndex)="changeFocus('Part4', $event)" [inp]="part4"></lib-form-textbox>
|
|
9
|
-
</div>
|
|
10
|
-
<i *ngIf="inp.icon != null || inp.loading" #inputIcon [className]="(inp.loading ? 'fa-duotone fa-spin fa-spinner' : inp.icon) + ' icon'" (click)="part1.focus()"></i>
|
|
11
|
-
<i *ngIf="inp.withClear && (part1.value || part2.value || part3.value || part4.value)" (click)="inp.clear()" class="fa-duotone fa-eraser clear-icon"></i>
|
|
12
|
-
</div>
|
|
13
|
-
</div>
|
|
@@ -1,144 +0,0 @@
|
|
|
1
|
-
import {Component, ElementRef, EventEmitter, HostListener, Input, OnInit, Output, ViewChild} from '@angular/core';
|
|
2
|
-
import {InputClass} from '../../../classes/form.class';
|
|
3
|
-
import {InputError, InputType} from '../../../classes/enum.class';
|
|
4
|
-
import {HelperClass} from '../../../classes/helper.class';
|
|
5
|
-
|
|
6
|
-
@Component({
|
|
7
|
-
selector: 'lib-form-bank-card',
|
|
8
|
-
templateUrl: './form.bank-card.component.html',
|
|
9
|
-
styleUrls: ['./form.bank-card.component.css']
|
|
10
|
-
})
|
|
11
|
-
export class FormBankCardComponent implements OnInit {
|
|
12
|
-
@Input()
|
|
13
|
-
inp: InputClass;
|
|
14
|
-
@Output()
|
|
15
|
-
changeIndex = new EventEmitter<string>();
|
|
16
|
-
cValue = '';
|
|
17
|
-
get type(): typeof InputType {
|
|
18
|
-
return InputType;
|
|
19
|
-
}
|
|
20
|
-
part1: InputClass;
|
|
21
|
-
part2: InputClass;
|
|
22
|
-
part3: InputClass;
|
|
23
|
-
part4: InputClass;
|
|
24
|
-
@ViewChild('inputPart1') inputPart1: ElementRef;
|
|
25
|
-
@ViewChild('inputPart2') inputPart2: ElementRef;
|
|
26
|
-
@ViewChild('inputPart3') inputPart3: ElementRef;
|
|
27
|
-
@ViewChild('inputPart4') inputPart4: ElementRef;
|
|
28
|
-
ngOnInit(): void {
|
|
29
|
-
this.part1 = new InputClass(this.inp.environment, this.inp.l, 'BankCardPart1', null, InputType.Number, 'bank-card-part-1 bank-card-part-item',
|
|
30
|
-
'', true, 1000, 9999);
|
|
31
|
-
this.part2 = new InputClass(this.inp.environment, this.inp.l, 'BankCardPart2', null, InputType.Number, 'bank-card-part-2 bank-card-part-item',
|
|
32
|
-
'', true, 1000, 9999);
|
|
33
|
-
this.part3 = new InputClass(this.inp.environment, this.inp.l, 'BankCardPart3', null, InputType.Number, 'bank-card-part-3 bank-card-part-item',
|
|
34
|
-
'', true, 1000, 9999);
|
|
35
|
-
this.part4 = new InputClass(this.inp.environment, this.inp.l, 'BankCardPart4', null, InputType.Number, 'bank-card-part-4 bank-card-part-item',
|
|
36
|
-
'', true, 1000, 9999);
|
|
37
|
-
this.part1.displayLabel = this.part2.displayLabel = this.part3.displayLabel = this.part4.displayLabel = false;
|
|
38
|
-
this.part1.placeholder = this.part2.placeholder = this.part3.placeholder = this.part4.placeholder = null;
|
|
39
|
-
this.part1.onChange = (v) => {
|
|
40
|
-
this.inp.error = null;
|
|
41
|
-
if (v.length === 4){
|
|
42
|
-
this.part2.focus();
|
|
43
|
-
}
|
|
44
|
-
};
|
|
45
|
-
this.part2.onChange = (v) => {
|
|
46
|
-
this.inp.error = null;
|
|
47
|
-
if (v.length === 4){
|
|
48
|
-
this.part3.focus();
|
|
49
|
-
}
|
|
50
|
-
};
|
|
51
|
-
this.part3.onChange = (v) => {
|
|
52
|
-
this.inp.error = null;
|
|
53
|
-
if (v.length === 4){
|
|
54
|
-
this.part4.focus();
|
|
55
|
-
}
|
|
56
|
-
};
|
|
57
|
-
this.part4.onChange = (v) => {
|
|
58
|
-
this.inp.error = null;
|
|
59
|
-
if (v.length === 4){
|
|
60
|
-
this.changeIndex.emit('Tab');
|
|
61
|
-
}
|
|
62
|
-
};
|
|
63
|
-
this.inp.setValue = (v) => {
|
|
64
|
-
if (v === null){
|
|
65
|
-
return;
|
|
66
|
-
}
|
|
67
|
-
this.part1.value = v.substr(0, 4);
|
|
68
|
-
this.part2.value = v.substr(4, 4);
|
|
69
|
-
this.part3.value = v.substr(8, 4);
|
|
70
|
-
this.part4.value = v.substr(12, 4);
|
|
71
|
-
};
|
|
72
|
-
this.inp.isValid = () => {
|
|
73
|
-
const v = this.getValue();
|
|
74
|
-
if (!this.inp.required && !v) {
|
|
75
|
-
return true;
|
|
76
|
-
}
|
|
77
|
-
if (!v) {
|
|
78
|
-
this.inp.error = InputError.Required;
|
|
79
|
-
return false;
|
|
80
|
-
}
|
|
81
|
-
if (!HelperClass.checkCartDigit(v)){
|
|
82
|
-
this.inp.error = InputError.Invalid;
|
|
83
|
-
return false;
|
|
84
|
-
}
|
|
85
|
-
return true;
|
|
86
|
-
};
|
|
87
|
-
this.inp.clear = () => {
|
|
88
|
-
this.inp.error = null;
|
|
89
|
-
this.part1.value = this.inp.default ? this.inp.default.substr(0, 4) : null;
|
|
90
|
-
this.part2.value = this.inp.default ? this.inp.default.substr(4, 4) : null;
|
|
91
|
-
this.part3.value = this.inp.default ? this.inp.default.substr(8, 4) : null;
|
|
92
|
-
this.part4.value = this.inp.default ? this.inp.default.substr(12, 4) : null;
|
|
93
|
-
};
|
|
94
|
-
this.inp.data = () => {
|
|
95
|
-
return this.getValue();
|
|
96
|
-
};
|
|
97
|
-
this.inp.focus = () => {
|
|
98
|
-
this.onFocusIn();
|
|
99
|
-
};
|
|
100
|
-
}
|
|
101
|
-
changeFocus(p, a): void{
|
|
102
|
-
if (p === 'Part1'){
|
|
103
|
-
if (a === 'Tab' || a === 'Enter'){
|
|
104
|
-
this.part2.focus();
|
|
105
|
-
} else if (a === 'ShiftTab' || a === 'ShiftEnter'){
|
|
106
|
-
this.changeIndex.emit('ShiftTab');
|
|
107
|
-
}
|
|
108
|
-
} else if (p === 'Part2'){
|
|
109
|
-
if (a === 'Tab' || a === 'Enter'){
|
|
110
|
-
this.part3.focus();
|
|
111
|
-
} else if (a === 'ShiftTab' || a === 'ShiftEnter'){
|
|
112
|
-
this.part1.focus();
|
|
113
|
-
}
|
|
114
|
-
} else if (p === 'Part3'){
|
|
115
|
-
if (a === 'Tab' || a === 'Enter'){
|
|
116
|
-
this.part4.focus();
|
|
117
|
-
} else if (a === 'ShiftTab' || a === 'ShiftEnter'){
|
|
118
|
-
this.part2.focus();
|
|
119
|
-
}
|
|
120
|
-
} else if (p === 'Part4'){
|
|
121
|
-
if (a === 'Tab' || a === 'Enter'){
|
|
122
|
-
this.changeIndex.emit('Tab');
|
|
123
|
-
} else if (a === 'ShiftTab' || a === 'ShiftEnter'){
|
|
124
|
-
this.part3.focus();
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
onFocusIn(e = null): void{
|
|
129
|
-
if (e == null || !(e.screenX && e.screenX !== 0 && e.screenY && e.screenY !== 0)){
|
|
130
|
-
this.part1.focus();
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
onKeyDown(e): void{
|
|
134
|
-
this.inp.error = null;
|
|
135
|
-
const code = e.keyCode || e.which;
|
|
136
|
-
if (code === 9) {
|
|
137
|
-
e.preventDefault();
|
|
138
|
-
this.changeIndex.emit(e.shiftKey ? 'ShiftTab' : 'Tab');
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
getValue(): string{
|
|
142
|
-
return `${this.part1.value ? this.part1.value : ''}${this.part2.value ? this.part2.value : ''}${this.part3.value ? this.part3.value : ''}${this.part4.value ? this.part4.value : ''}`;
|
|
143
|
-
}
|
|
144
|
-
}
|
|
@@ -1,222 +0,0 @@
|
|
|
1
|
-
.form-input-con.button {
|
|
2
|
-
position: relative;
|
|
3
|
-
float: right;
|
|
4
|
-
width: 100%;
|
|
5
|
-
padding: 0 15px;
|
|
6
|
-
-webkit-user-select: none;
|
|
7
|
-
-moz-user-select: none;
|
|
8
|
-
-khtml-user-select: none;
|
|
9
|
-
-ms-user-select: none;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
.form-input-con.button .form-input {
|
|
13
|
-
position: relative;
|
|
14
|
-
float: right;
|
|
15
|
-
width: 100%;
|
|
16
|
-
cursor: pointer;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
.form-input-con.button .form-input .input-base {
|
|
20
|
-
position: absolute;
|
|
21
|
-
width: 0;
|
|
22
|
-
height: 0;
|
|
23
|
-
opacity: 0;
|
|
24
|
-
cursor: pointer;
|
|
25
|
-
top: 50%;
|
|
26
|
-
right: 50%;
|
|
27
|
-
z-index: 1;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
.form-input-con.button .form-input .control {
|
|
31
|
-
display: block;
|
|
32
|
-
width: 100%;
|
|
33
|
-
height: 35px;
|
|
34
|
-
font-weight: 300;
|
|
35
|
-
background-image: none;
|
|
36
|
-
border: none;
|
|
37
|
-
border-radius: 5px;
|
|
38
|
-
padding: 0 35px 0 20px;
|
|
39
|
-
line-height: 35px;
|
|
40
|
-
text-align: center;
|
|
41
|
-
color: white;
|
|
42
|
-
float: left;
|
|
43
|
-
background-color: var(--base);
|
|
44
|
-
z-index: 2;
|
|
45
|
-
position: relative;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
.form-input-con.button .form-input i.icon {
|
|
49
|
-
font-size: 12px;
|
|
50
|
-
-webkit-transition: all .35s ease-in-out;
|
|
51
|
-
transition: all .35s ease-in-out;
|
|
52
|
-
width: 30px;
|
|
53
|
-
height: 35px;
|
|
54
|
-
line-height: 35px;
|
|
55
|
-
color: white;
|
|
56
|
-
text-align: center;
|
|
57
|
-
cursor: pointer;
|
|
58
|
-
float: right;
|
|
59
|
-
position: absolute;
|
|
60
|
-
top: 0;
|
|
61
|
-
right: 0;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
.form-input-con.button .form-input .control:hover, .form-input-con.button .form-input .input-base:focus + .control {
|
|
65
|
-
background-color: var(--base-dark);
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
.form-input-con.button.red .form-input .control{
|
|
69
|
-
background-color: var(--red);
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
.form-input-con.button.red .form-input:hover .control, .form-input-con.button.red .form-input .input-base:focus + .control{
|
|
73
|
-
background-color: var(--red-dark);
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
.form-input-con.button.grey .form-input .control{
|
|
77
|
-
color: var(--black);
|
|
78
|
-
background-color: var(--black-22);
|
|
79
|
-
}
|
|
80
|
-
.form-input-con.button.grey .form-input i.icon {
|
|
81
|
-
color: var(--black);
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
.form-input-con.button.grey .form-input:hover .control, .form-input-con.button.grey .form-input .input-base:focus + .control{
|
|
85
|
-
background-color: var(--black-44);
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
.form-input-con.button.blue .form-input .control {
|
|
89
|
-
background-color: var(--blue);
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
.form-input-con.button.blue .form-input:hover .control, .form-input-con.button.blue .form-input .input-base:focus + .control {
|
|
93
|
-
background-color: var(--blue-dark);
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
.form-input-con.button.green .form-input .control {
|
|
97
|
-
background-color: var(--green);
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
.form-input-con.button.green .form-input:hover .control, .form-input-con.button.green .form-input .input-base:focus + .control {
|
|
101
|
-
background-color: var(--green-dark);
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
.form-input-con.button.comp .form-input .control {
|
|
105
|
-
background-color: var(--comp);
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
.form-input-con.button.comp .form-input:hover .control, .form-input-con.button.comp .form-input .input-base:focus + .control {
|
|
109
|
-
background-color: var(--comp-dark);
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
.form-input-con.button.yellow .form-input .control {
|
|
113
|
-
background-color: var(--yellow);
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
.form-input-con.button.yellow .form-input:hover .control, .form-input-con.button.yellow .form-input .input-base:focus + .control {
|
|
117
|
-
background-color: var(--yellow-dark);
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
.form-input-con.button.active .form-input .control {
|
|
121
|
-
background-color: white;
|
|
122
|
-
border: var(--border-input);
|
|
123
|
-
color: var(--black);
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
.form-input-con.button.left-icon .form-input .control {
|
|
127
|
-
float: right;
|
|
128
|
-
padding: 0 20px 0 35px;
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
.form-input-con.button.left-icon .form-input i.icon {
|
|
132
|
-
right: unset;
|
|
133
|
-
left: 0;
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
.form-input-con.button.only-icon .form-input .control{
|
|
137
|
-
padding: 0;
|
|
138
|
-
min-width: 35px;
|
|
139
|
-
}
|
|
140
|
-
.form-input-con.button.only-icon .form-input i.icon{
|
|
141
|
-
width: 100%;
|
|
142
|
-
}
|
|
143
|
-
.form-input-con.button.only-icon .form-input .text{
|
|
144
|
-
display: none;
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
.form-input-con.button.h-45 {
|
|
148
|
-
height: 45px;
|
|
149
|
-
font-size: 13px;
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
.form-input-con.button.h-45 .form-input .control, .form-input-con.button.h-45 .form-input i.icon {
|
|
153
|
-
height: 45px;
|
|
154
|
-
line-height: 45px;
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
.form-input-con.button.h-45 .form-input i.icon {
|
|
158
|
-
width: 35px;
|
|
159
|
-
font-size: 17px;
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
.form-input-con.button.h-30 {
|
|
163
|
-
height: 30px;
|
|
164
|
-
font-size: 12px;
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
.form-input-con.button.h-30 .form-input .control, .form-input-con.button.h-30 .form-input i.icon {
|
|
168
|
-
height: 30px;
|
|
169
|
-
line-height: 30px;
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
.form-input-con.button.h-30 .form-input i.icon {
|
|
173
|
-
max-width: 30px;
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
.form-input-con.button.h-30.only-icon .form-input .control{
|
|
177
|
-
padding: 0;
|
|
178
|
-
min-width: 30px;
|
|
179
|
-
}
|
|
180
|
-
.form-input-con.button.h-25 {
|
|
181
|
-
height: 25px;
|
|
182
|
-
font-size: 12px;
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
.form-input-con.button.h-25 .form-input .control, .form-input-con.button.h-25 .form-input i.icon {
|
|
186
|
-
height: 25px;
|
|
187
|
-
line-height: 25px;
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
.form-input-con.button.h-25 .form-input i.icon {
|
|
191
|
-
width: 25px;
|
|
192
|
-
}
|
|
193
|
-
.form-input-con.button.h-25.only-icon .form-input .control{
|
|
194
|
-
padding: 0;
|
|
195
|
-
min-width: 25px;
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
.form-input-con.button.h-20 {
|
|
199
|
-
height: 20px;
|
|
200
|
-
font-size: 11px;
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
.form-input-con.button.h-20 .form-input .control, .form-input-con.button.h-20 .form-input i.icon {
|
|
204
|
-
height: 20px;
|
|
205
|
-
line-height: 20px;
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
.form-input-con.button.h-20 .form-input i.icon {
|
|
209
|
-
width: 20px;
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
.form-input-con.button.without-icon .form-input .control {
|
|
213
|
-
width: 100%;
|
|
214
|
-
padding: 0 8px;
|
|
215
|
-
min-width: 25px;
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
::ng-deep .form-input-con.button.h-25 .form-input .dot-spinner > div {
|
|
219
|
-
width: 3px;
|
|
220
|
-
height: 3px;
|
|
221
|
-
margin-right: 2px;
|
|
222
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
<div #inputDiv [id]="inp.name + 'Input'" [className]="inp.class + (inp.name == null ? ' only-icon' : (inp.icon == null ? ' without-icon' : '')) + ' form-input-con button'" [style]="inp.style">
|
|
2
|
-
<div *ngIf="inp.url == null" class="form-input" (click)="onClick($event)">
|
|
3
|
-
<input #inputBase type="button" class="input-base" (keydown)="onKeyDown($event)" (focusin)="onFocusIn()">
|
|
4
|
-
<div class="control">
|
|
5
|
-
<div *ngIf="inp.name != null" class="text" [innerHTML]="inp.loading ? (inp.loadingName ? inp.l('Loading', inp.loadingName) : inp.l('LoadingEmpty')) : inp.l(inp.name)"></div>
|
|
6
|
-
<i *ngIf="inp.icon != null" #inputIcon [className]="(inp.loading ? 'fa-duotone fa-spin fa-spinner' : inp.icon) + ' icon'"></i>
|
|
7
|
-
</div>
|
|
8
|
-
</div>
|
|
9
|
-
<a *ngIf="inp.url != null" [target]="inp.urlNewTab ? '_blank' : ''" [routerLink]="inp.url" class="form-input" (click)="onClick($event)">
|
|
10
|
-
<input #inputBase type="button" class="input-base" (keydown)="onKeyDown($event)" (focusin)="onFocusIn()">
|
|
11
|
-
<div class="control">
|
|
12
|
-
<div *ngIf="inp.name != null" class="text" [innerHTML]="inp.loading ? (inp.loadingName ? inp.l('Loading', inp.loadingName) : inp.l('LoadingEmpty')) : inp.l(inp.name)"></div>
|
|
13
|
-
<i *ngIf="inp.icon != null" #inputIcon [className]="(inp.loading ? 'fa-duotone fa-spin fa-spinner' : inp.icon) + ' icon'"></i>
|
|
14
|
-
</div>
|
|
15
|
-
</a>
|
|
16
|
-
</div>
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
import {Component, ElementRef, EventEmitter, 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-button',
|
|
7
|
-
templateUrl: './form.button.component.html',
|
|
8
|
-
styleUrls: ['./form.button.component.css']
|
|
9
|
-
})
|
|
10
|
-
export class FormButtonComponent 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.focus = () => {
|
|
22
|
-
this.onFocusIn();
|
|
23
|
-
};
|
|
24
|
-
}
|
|
25
|
-
onFocusIn(): void{
|
|
26
|
-
$(this.inputBase.nativeElement).focus();
|
|
27
|
-
}
|
|
28
|
-
onClick(e): void{
|
|
29
|
-
if (e.screenX && e.screenX !== 0 && e.screenY && e.screenY !== 0) {
|
|
30
|
-
this.mouseClick();
|
|
31
|
-
}else{
|
|
32
|
-
this.codeClick();
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
mouseClick(): void{
|
|
36
|
-
this.onFocusIn();
|
|
37
|
-
if (this.inp.modal){
|
|
38
|
-
this.inp.modal.show();
|
|
39
|
-
if (this.inp.modal.form){
|
|
40
|
-
this.inp.modal.form.onSuccessBase = () => {
|
|
41
|
-
this.inp.modal.hide();
|
|
42
|
-
};
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
if (!this.inp.loading && this.inp.onClick != null){
|
|
46
|
-
this.inp.onClick(this.inp);
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
codeClick(): void{
|
|
50
|
-
this.onFocusIn();
|
|
51
|
-
}
|
|
52
|
-
onKeyDown(e): void{
|
|
53
|
-
const code = e.keyCode || e.which;
|
|
54
|
-
if (code === 9) {
|
|
55
|
-
e.preventDefault();
|
|
56
|
-
this.changeIndex.emit(e.shiftKey ? 'ShiftTab' : 'Tab');
|
|
57
|
-
}
|
|
58
|
-
if (code === 13) {
|
|
59
|
-
e.preventDefault();
|
|
60
|
-
if (!this.inp.loading && this.inp.onClick != null){
|
|
61
|
-
this.inp.onClick(this.inp);
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
}
|