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,10 +0,0 @@
|
|
|
1
|
-
<div #inputDiv [id]="inp.name + 'Input'" [style]="inp.style" (click)="onFocusIn($event)" [className]="inp.class + ' form-input plaque' + (inp.error == null ? '' : ' error') + (inp.disabled ? ' disabled' : '') + (inp.type === type.PlaqueM ? ' plaque-m' : '')">
|
|
2
|
-
<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>
|
|
3
|
-
<div [className]="'plaque-con' + (part2.value === 'ع' ? ' p' : '') + (part2.value === 'الف' ? ' g' : '')">
|
|
4
|
-
<div class="part-0" (click)="part1.focus()"></div>
|
|
5
|
-
<lib-form-textbox (changeIndex)="changeFocus('Part1', $event)" [inp]="part1"></lib-form-textbox>
|
|
6
|
-
<lib-form-select (changeIndex)="changeFocus('Part2', $event)" [inp]="part2"></lib-form-select>
|
|
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
|
-
</div>
|
|
@@ -1,178 +0,0 @@
|
|
|
1
|
-
import {Component, ElementRef, EventEmitter, Input, OnInit, Output, ViewChild} from '@angular/core';
|
|
2
|
-
import {InputClass, OptionClass} from '../../../classes/form.class';
|
|
3
|
-
import {InputError, InputType} from '../../../classes/enum.class';
|
|
4
|
-
|
|
5
|
-
@Component({
|
|
6
|
-
selector: 'lib-form-plaque',
|
|
7
|
-
templateUrl: './form.plaque.component.html',
|
|
8
|
-
styleUrls: ['./form.plaque.component.css']
|
|
9
|
-
})
|
|
10
|
-
export class FormPlaqueComponent implements OnInit{
|
|
11
|
-
@Input()
|
|
12
|
-
inp: InputClass;
|
|
13
|
-
@Output()
|
|
14
|
-
changeIndex = new EventEmitter<string>();
|
|
15
|
-
part1: InputClass;
|
|
16
|
-
part2: InputClass;
|
|
17
|
-
part3: InputClass;
|
|
18
|
-
part4: InputClass;
|
|
19
|
-
get type(): typeof InputType { return InputType; }
|
|
20
|
-
alphas = ['الف', 'ب', 'پ', 'ت', 'ث', 'ج', 'چ', 'ح', 'خ', 'د', 'ذ', 'ر', 'ز', 'ژ', 'س', 'ش', 'ص', 'ض', 'ط', 'ظ', 'ع', 'غ', 'ف', 'ق', 'ک', 'گ', 'ل', 'م', 'ن', 'و', 'ه', 'ی'];
|
|
21
|
-
@ViewChild('inputBase') inputBase: ElementRef;
|
|
22
|
-
@ViewChild('inputDiv') inputDiv: ElementRef;
|
|
23
|
-
@ViewChild('inputLabel') inputLabel: ElementRef;
|
|
24
|
-
constructor(){
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
ngOnInit(): void {
|
|
28
|
-
this.part1 = new InputClass(this.inp.environment, this.inp.l, 'Part1', null, InputType.Number,
|
|
29
|
-
'plaque-part-1 plaque-part-item' + (this.inp.type === InputType.PlaqueM ? ' plaque-part-m' : ''),
|
|
30
|
-
'', true,
|
|
31
|
-
this.inp.type === InputType.PlaqueM ? 100 : 10,
|
|
32
|
-
this.inp.type === InputType.PlaqueM ? 999 : 99);
|
|
33
|
-
this.part2 = new InputClass(this.inp.environment, this.inp.l, 'Part2', null, InputType.Select,
|
|
34
|
-
'plaque-part-2 plaque-part-item' + (this.inp.type === InputType.PlaqueM ? ' plaque-part-m' : ''),
|
|
35
|
-
'', true);
|
|
36
|
-
this.part2.options = this.alphas.map(x => new OptionClass(x, x));
|
|
37
|
-
this.part3 = new InputClass(this.inp.environment, this.inp.l, 'Part3', null, InputType.Number,
|
|
38
|
-
'plaque-part-3 plaque-part-item' + (this.inp.type === InputType.PlaqueM ? ' plaque-part-m' : ''),
|
|
39
|
-
'', true,
|
|
40
|
-
this.inp.type === InputType.PlaqueM ? 10000 : 100,
|
|
41
|
-
this.inp.type === InputType.PlaqueM ? 99999 : 999);
|
|
42
|
-
this.part4 = new InputClass(this.inp.environment, this.inp.l, 'Part4', null, InputType.Number,
|
|
43
|
-
'plaque-part-4 plaque-part-item' + (this.inp.type === InputType.PlaqueM ? ' plaque-part-m' : ''),
|
|
44
|
-
'', true, 10, 99);
|
|
45
|
-
this.part1.displayLabel = this.part2.displayLabel = this.part3.displayLabel = this.part4.displayLabel = false;
|
|
46
|
-
this.part1.placeholder = this.part2.placeholder = this.part3.placeholder = this.part4.placeholder = null;
|
|
47
|
-
this.part1.onChange = (v) => {
|
|
48
|
-
this.inp.error = null;
|
|
49
|
-
if (v.length === 2 && this.inp.type === InputType.Plaque){
|
|
50
|
-
this.part2.focus();
|
|
51
|
-
} else if (v.length === 3 && this.inp.type === InputType.PlaqueM){
|
|
52
|
-
this.part3.focus();
|
|
53
|
-
}
|
|
54
|
-
};
|
|
55
|
-
this.part2.onChange = () => {
|
|
56
|
-
this.inp.error = null;
|
|
57
|
-
setTimeout(() => {
|
|
58
|
-
this.part3.focus();
|
|
59
|
-
}, 100);
|
|
60
|
-
};
|
|
61
|
-
this.part3.onChange = (v) => {
|
|
62
|
-
this.inp.error = null;
|
|
63
|
-
if (v.length === 3 && this.inp.type === InputType.Plaque){
|
|
64
|
-
this.part4.focus();
|
|
65
|
-
} else if (v.length === 5 && this.inp.type === InputType.PlaqueM){
|
|
66
|
-
this.changeIndex.emit('Tab');
|
|
67
|
-
}
|
|
68
|
-
};
|
|
69
|
-
this.part4.onChange = (v) => {
|
|
70
|
-
this.inp.error = null;
|
|
71
|
-
if (v.length === 2){
|
|
72
|
-
this.changeIndex.emit('Tab');
|
|
73
|
-
}
|
|
74
|
-
};
|
|
75
|
-
this.inp.setValue = (v) => {
|
|
76
|
-
const parts = v.split('_');
|
|
77
|
-
if (parts.length === 4){
|
|
78
|
-
setTimeout(() => {
|
|
79
|
-
this.inp.value = v;
|
|
80
|
-
this.part1.value = parts[0];
|
|
81
|
-
this.part2.value = parts[1];
|
|
82
|
-
this.part2.search = parts[1];
|
|
83
|
-
this.part3.value = parts[2];
|
|
84
|
-
this.part4.value = parts[3];
|
|
85
|
-
}, 100);
|
|
86
|
-
} else if (parts.length === 2){
|
|
87
|
-
setTimeout(() => {
|
|
88
|
-
this.inp.value = v;
|
|
89
|
-
this.part1.value = parts[0];
|
|
90
|
-
this.part3.value = parts[1];
|
|
91
|
-
}, 100);
|
|
92
|
-
}else{
|
|
93
|
-
this.part1.value = '';
|
|
94
|
-
this.part2.value = '';
|
|
95
|
-
this.part2.search = '';
|
|
96
|
-
this.part3.value = '';
|
|
97
|
-
this.part4.value = '';
|
|
98
|
-
}
|
|
99
|
-
};
|
|
100
|
-
this.inp.isValid = () => {
|
|
101
|
-
this.inp.value = this.getValue();
|
|
102
|
-
if (this.inp.required && !this.inp.value) {
|
|
103
|
-
this.inp.error = InputError.Required;
|
|
104
|
-
return false;
|
|
105
|
-
}
|
|
106
|
-
if (!this.inp.required && !this.inp.value) {
|
|
107
|
-
return true;
|
|
108
|
-
}
|
|
109
|
-
if (this.inp.required && this.inp.type === InputType.Plaque &&
|
|
110
|
-
(!this.part1.isValid() || !this.part2.isValid() || !this.part3.isValid() || !this.part4.isValid())){
|
|
111
|
-
this.inp.error = InputError.Invalid;
|
|
112
|
-
return false;
|
|
113
|
-
}
|
|
114
|
-
if (this.inp.required && this.inp.type === InputType.PlaqueM && (!this.part1.isValid() || !this.part3.isValid())){
|
|
115
|
-
this.inp.error = InputError.Invalid;
|
|
116
|
-
return false;
|
|
117
|
-
}
|
|
118
|
-
return true;
|
|
119
|
-
};
|
|
120
|
-
this.inp.clear = () => {
|
|
121
|
-
this.inp.error = null;
|
|
122
|
-
this.inp.value = this.inp.default;
|
|
123
|
-
this.part1.value = this.part2.value = this.part3.value = this.part4.value = null;
|
|
124
|
-
this.part2.search = '';
|
|
125
|
-
};
|
|
126
|
-
this.inp.data = () => {
|
|
127
|
-
return this.getValue();
|
|
128
|
-
};
|
|
129
|
-
this.inp.focus = () => {
|
|
130
|
-
this.onFocusIn();
|
|
131
|
-
};
|
|
132
|
-
}
|
|
133
|
-
changeFocus(p, a): void{
|
|
134
|
-
if (p === 'Part1'){
|
|
135
|
-
if (a === 'Tab' || a === 'Enter'){
|
|
136
|
-
this.part2.focus();
|
|
137
|
-
} else if (a === 'ShiftTab' || a === 'ShiftEnter'){
|
|
138
|
-
this.changeIndex.emit('ShiftTab');
|
|
139
|
-
}
|
|
140
|
-
} else if (p === 'Part2'){
|
|
141
|
-
if (a === 'Tab' || a === 'Enter'){
|
|
142
|
-
this.part3.focus();
|
|
143
|
-
} else if (a === 'ShiftTab' || a === 'ShiftEnter'){
|
|
144
|
-
this.part1.focus();
|
|
145
|
-
}
|
|
146
|
-
} else if (p === 'Part3'){
|
|
147
|
-
if (a === 'Tab' || a === 'Enter'){
|
|
148
|
-
this.part4.focus();
|
|
149
|
-
} else if (a === 'ShiftTab' || a === 'ShiftEnter'){
|
|
150
|
-
this.part2.focus();
|
|
151
|
-
}
|
|
152
|
-
} else if (p === 'Part4'){
|
|
153
|
-
if (a === 'Tab' || a === 'Enter'){
|
|
154
|
-
this.changeIndex.emit('Tab');
|
|
155
|
-
} else if (a === 'ShiftTab' || a === 'ShiftEnter'){
|
|
156
|
-
this.part3.focus();
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
onFocusIn(e = null): void{
|
|
161
|
-
if (e == null || !(e.screenX && e.screenX !== 0 && e.screenY && e.screenY !== 0)){
|
|
162
|
-
this.part1.focus();
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
onKeyDown(e): void{
|
|
166
|
-
this.inp.error = null;
|
|
167
|
-
const code = e.keyCode || e.which;
|
|
168
|
-
if (code === 9) {
|
|
169
|
-
e.preventDefault();
|
|
170
|
-
this.changeIndex.emit(e.shiftKey ? 'ShiftTab' : 'Tab');
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
getValue(): string{
|
|
174
|
-
return this.inp.type === InputType.Plaque ?
|
|
175
|
-
`${this.part1.value ? this.part1.value : ''}_${this.part2.value ? this.part2.value : ''}_${this.part3.value ? this.part3.value : ''}_${this.part4.value ? this.part4.value : ''}` :
|
|
176
|
-
`${this.part1.value ? this.part1.value : ''}_${this.part3.value ? this.part3.value : ''}`;
|
|
177
|
-
}
|
|
178
|
-
}
|
|
@@ -1,167 +0,0 @@
|
|
|
1
|
-
.form-input.plaque-select {
|
|
2
|
-
position: relative;
|
|
3
|
-
float: right;
|
|
4
|
-
width: 198px;
|
|
5
|
-
padding: 0 15px;
|
|
6
|
-
font-size: 12px;
|
|
7
|
-
cursor: pointer;
|
|
8
|
-
-webkit-user-select: none;
|
|
9
|
-
-moz-user-select: none;
|
|
10
|
-
-khtml-user-select: none;
|
|
11
|
-
-ms-user-select: none;
|
|
12
|
-
}
|
|
13
|
-
.form-input.plaque-select > .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.plaque-select.error > .label {
|
|
30
|
-
color: var(--red);
|
|
31
|
-
}
|
|
32
|
-
.form-input.plaque-select > .label .required-icon{
|
|
33
|
-
height: 20px;
|
|
34
|
-
width: 20px;
|
|
35
|
-
line-height: 20px;
|
|
36
|
-
font-size: 9px;
|
|
37
|
-
color: var(--red);
|
|
38
|
-
text-align: center;
|
|
39
|
-
}
|
|
40
|
-
.form-input.plaque-select i.icon {
|
|
41
|
-
position: absolute;
|
|
42
|
-
width: 35px;
|
|
43
|
-
font-size: 15px;
|
|
44
|
-
color: var(--comp);
|
|
45
|
-
text-align: center;
|
|
46
|
-
height: 35px;
|
|
47
|
-
line-height: 35px;
|
|
48
|
-
left: 0;
|
|
49
|
-
bottom: 0;
|
|
50
|
-
z-index: 2;
|
|
51
|
-
}
|
|
52
|
-
.form-input.plaque-select.error i.icon {
|
|
53
|
-
color: var(--red-cc);
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
.form-input.plaque-select .options {
|
|
57
|
-
position: absolute;
|
|
58
|
-
width: 100%;
|
|
59
|
-
background-color: white;
|
|
60
|
-
box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.4);
|
|
61
|
-
border-radius: 0 0 5px 5px;
|
|
62
|
-
top: -2000px;
|
|
63
|
-
right: 0;
|
|
64
|
-
z-index: 5;
|
|
65
|
-
overflow: hidden;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
::ng-deep .form-input.plaque-select.without-sub-options .options .option {
|
|
69
|
-
width: 100%;
|
|
70
|
-
}
|
|
71
|
-
.form-input.plaque-select.open .options {
|
|
72
|
-
top: 35px !important;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
.form-input.plaque-select.top .options {
|
|
76
|
-
border-radius: 5px 5px 0 0;
|
|
77
|
-
bottom: 35px;
|
|
78
|
-
top: unset !important;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
.form-input.plaque-select .options .items {
|
|
82
|
-
float: right;
|
|
83
|
-
width: 100%;
|
|
84
|
-
max-height: 200px;
|
|
85
|
-
overflow-y: auto;
|
|
86
|
-
scroll-behavior: smooth;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
.form-input.plaque-select .options .option {
|
|
90
|
-
float: right;
|
|
91
|
-
width: 100%;
|
|
92
|
-
height: 35px;
|
|
93
|
-
line-height: 35px;
|
|
94
|
-
text-align: center;
|
|
95
|
-
font-size: 11px;
|
|
96
|
-
border-radius: 0;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
.form-input.plaque-select.open.h-50 .options {
|
|
100
|
-
top: 50px !important;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
.form-input.plaque-select.h-50.top .options {
|
|
104
|
-
top: unset !important;
|
|
105
|
-
bottom: 50px;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
.form-input.plaque-select.h-25 i.icon {
|
|
109
|
-
height: 25px;
|
|
110
|
-
width: 25px;
|
|
111
|
-
line-height: 25px;
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
.form-input.plaque-select.open.h-25 .options {
|
|
115
|
-
top: 25px !important;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
.form-input.plaque-select.h-25.top .options {
|
|
119
|
-
top: unset !important;
|
|
120
|
-
bottom: 25px;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
.form-input.plaque-select.h-25 .options .option {
|
|
124
|
-
height: 25px;
|
|
125
|
-
line-height: 25px;
|
|
126
|
-
font-size: 12px;
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
.form-input.plaque-select .plaque-con{
|
|
130
|
-
position: relative;
|
|
131
|
-
float: right;
|
|
132
|
-
width: 100%;
|
|
133
|
-
height: 35px;
|
|
134
|
-
font-size: 15px;
|
|
135
|
-
direction: ltr;
|
|
136
|
-
background-image: url("../../../../../assets/images/plaque.png");
|
|
137
|
-
background-repeat: no-repeat;
|
|
138
|
-
background-position: center center;
|
|
139
|
-
background-size: cover;
|
|
140
|
-
border-radius: 5px;
|
|
141
|
-
background-color: white;
|
|
142
|
-
}
|
|
143
|
-
.form-input.plaque-select .plaque-con .part-0{
|
|
144
|
-
width: 16px !important;
|
|
145
|
-
height: 35px !important;
|
|
146
|
-
float: left !important;
|
|
147
|
-
}
|
|
148
|
-
.form-input.plaque-select.plaque-m .plaque-con{
|
|
149
|
-
background-image: url("../../../../../assets/images/plaque_m.png");
|
|
150
|
-
background-color: white !important;
|
|
151
|
-
}
|
|
152
|
-
.form-input.plaque-select .plaque-con.p{
|
|
153
|
-
background-color: #ffc913;
|
|
154
|
-
}
|
|
155
|
-
.form-input.plaque-select .plaque-con.g{
|
|
156
|
-
background-color: #e20600;
|
|
157
|
-
}
|
|
158
|
-
::ng-deep .form-input.plaque-select .plaque-con .form-input .control{
|
|
159
|
-
background-color: transparent !important;
|
|
160
|
-
box-shadow: unset !important;
|
|
161
|
-
padding: 0 !important;
|
|
162
|
-
font-size: 13px!important;
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
::ng-deep #Part2Input .options{
|
|
166
|
-
z-index: 6;
|
|
167
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
<div #inputDiv [id]="inp.name + 'Input'" [style]="inp.style" (click)="toggleOption()" [className]="inp.class + (inp.error == null ? '' : ' error') + (top ? ' top' : '') + (open ? ' open' : '') + (inp.icon != null ? '' : ' without-icon') + (inp.type === type.SelectAutoCompletePlaqueM ? ' plaque-m' : '') + ' form-input plaque-select'">
|
|
2
|
-
<div *ngIf="inp.displayLabel" class="label"><i *ngIf="inp.required" class="fas fa-star-of-life required-icon"></i>{{inp.getLabel()}}</div>
|
|
3
|
-
<div class="w-100 p-r">
|
|
4
|
-
<div [className]="'plaque-con' + (part2.value === 'ع' ? ' p' : '') + (part2.value === 'الف' ? ' g' : '')">
|
|
5
|
-
<div class="image"></div>
|
|
6
|
-
<div class="part-0" (click)="part1.focus()"></div>
|
|
7
|
-
<lib-form-textbox (changeIndex)="plaqueChangeFocus('Part1', $event)" [inp]="part1"></lib-form-textbox>
|
|
8
|
-
<lib-form-select (changeIndex)="plaqueChangeFocus('Part2', $event)" [inp]="part2"></lib-form-select>
|
|
9
|
-
<lib-form-textbox (changeIndex)="plaqueChangeFocus('Part3', $event)" [inp]="part3"></lib-form-textbox>
|
|
10
|
-
<lib-form-textbox (changeIndex)="plaqueChangeFocus('Part4', $event)" [inp]="part4"></lib-form-textbox>
|
|
11
|
-
</div>
|
|
12
|
-
<i *ngIf="inp.loading" #inputIcon class="fa fa-spin fa-spinner icon"></i>
|
|
13
|
-
<div #inputOptionsDiv class="options">
|
|
14
|
-
<div class="items">
|
|
15
|
-
<lib-form-select-item (selectOption)="selectOption($event)" [select]="inp" [item]="opt" *ngFor="let opt of inp.options"></lib-form-select-item>
|
|
16
|
-
</div>
|
|
17
|
-
</div>
|
|
18
|
-
</div>
|
|
19
|
-
</div>
|