ps-toolkit-ui 0.0.210 → 0.0.211
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/karma.conf.js +32 -0
- package/ng-package.json +16 -0
- package/package.json +19 -22
- package/src/lib/classes/chart.class.ts +140 -0
- package/src/lib/classes/enum.class.ts +193 -0
- package/src/lib/classes/excel.class.ts +46 -0
- package/src/lib/classes/form.class.ts +528 -0
- package/src/lib/classes/helper.class.ts +283 -0
- package/src/lib/classes/lang.class.ts +32 -0
- package/src/lib/classes/login.class.ts +27 -0
- package/src/lib/classes/modal.class.ts +59 -0
- package/src/lib/classes/permission.class.ts +55 -0
- package/src/lib/classes/request.class.ts +255 -0
- package/src/lib/classes/safestyle.class.ts +4 -0
- package/src/lib/classes/sidebar.class.ts +20 -0
- package/src/lib/classes/steps.class.ts +19 -0
- package/src/lib/classes/string.class.ts +219 -0
- package/src/lib/classes/table.class.ts +228 -0
- package/src/lib/components/accordion/accordion.component.css +116 -0
- package/src/lib/components/accordion/accordion.component.html +19 -0
- package/src/lib/components/accordion/accordion.component.ts +41 -0
- package/src/lib/components/alert/alert.component.css +112 -0
- package/src/lib/components/alert/alert.component.html +1 -0
- package/src/lib/components/alert/alert.component.ts +35 -0
- package/src/lib/components/base.component.ts +38 -0
- package/src/lib/components/calendar/calendar.component.css +206 -0
- package/src/lib/components/calendar/calendar.component.html +36 -0
- package/src/lib/components/calendar/calendar.component.ts +99 -0
- package/src/lib/components/chart/chart.component.css +24 -0
- package/src/lib/components/chart/chart.component.html +6 -0
- package/src/lib/components/chart/chart.component.ts +14 -0
- package/src/lib/components/clock/clock.component.css +141 -0
- package/src/lib/components/clock/clock.component.html +10 -0
- package/src/lib/components/clock/clock.component.ts +37 -0
- package/src/lib/components/confirm/confirm.component.css +112 -0
- package/src/lib/components/confirm/confirm.component.html +1 -0
- package/src/lib/components/confirm/confirm.component.ts +47 -0
- package/src/lib/components/footer/footer.component.css +46 -0
- package/src/lib/components/footer/footer.component.html +9 -0
- package/src/lib/components/footer/footer.component.ts +18 -0
- package/src/lib/components/form/bank-card/form.bank-card.component.css +115 -0
- package/src/lib/components/form/bank-card/form.bank-card.component.html +13 -0
- package/src/lib/components/form/bank-card/form.bank-card.component.ts +144 -0
- package/src/lib/components/form/button/form.button.component.css +222 -0
- package/src/lib/components/form/button/form.button.component.html +16 -0
- package/src/lib/components/form/button/form.button.component.ts +65 -0
- package/src/lib/components/form/car/form.car.component.css +287 -0
- package/src/lib/components/form/car/form.car.component.html +11 -0
- package/src/lib/components/form/car/form.car.component.ts +82 -0
- package/src/lib/components/form/car/search/form.car.search.component.css +287 -0
- package/src/lib/components/form/car/search/form.car.search.component.html +15 -0
- package/src/lib/components/form/car/search/form.car.search.component.ts +170 -0
- package/src/lib/components/form/checkbox/form.checkbox.component.css +128 -0
- package/src/lib/components/form/checkbox/form.checkbox.component.html +8 -0
- package/src/lib/components/form/checkbox/form.checkbox.component.ts +64 -0
- package/src/lib/components/form/date/form.date.component.css +310 -0
- package/src/lib/components/form/date/form.date.component.html +46 -0
- package/src/lib/components/form/date/form.date.component.ts +247 -0
- package/src/lib/components/form/datetime/form.datetime.component.css +157 -0
- package/src/lib/components/form/datetime/form.datetime.component.html +11 -0
- package/src/lib/components/form/datetime/form.datetime.component.ts +98 -0
- package/src/lib/components/form/file/form.file.component.css +151 -0
- package/src/lib/components/form/file/form.file.component.html +12 -0
- package/src/lib/components/form/file/form.file.component.ts +130 -0
- package/src/lib/components/form/finger/form.finger.component.css +215 -0
- package/src/lib/components/form/finger/form.finger.component.html +59 -0
- package/src/lib/components/form/finger/form.finger.component.ts +131 -0
- 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 +29 -0
- package/src/lib/components/form/icon/form.icon.component.css +108 -0
- package/src/lib/components/form/icon/form.icon.component.html +14 -0
- package/src/lib/components/form/icon/form.icon.component.ts +73 -0
- package/src/lib/components/form/index/form.component.css +89 -0
- package/src/lib/components/form/index/form.component.html +35 -0
- package/src/lib/components/form/index/form.component.ts +45 -0
- package/src/lib/components/form/label/form.label.component.css +45 -0
- package/src/lib/components/form/label/form.label.component.html +2 -0
- package/src/lib/components/form/label/form.label.component.ts +30 -0
- package/src/lib/components/form/plaque/form.plaque.component.css +76 -0
- package/src/lib/components/form/plaque/form.plaque.component.html +10 -0
- package/src/lib/components/form/plaque/form.plaque.component.ts +178 -0
- package/src/lib/components/form/plaque/select/form.plaque.select.component.css +167 -0
- package/src/lib/components/form/plaque/select/form.plaque.select.component.html +19 -0
- package/src/lib/components/form/plaque/select/form.plaque.select.component.ts +385 -0
- package/src/lib/components/form/radio/form.radio.component.css +158 -0
- package/src/lib/components/form/radio/form.radio.component.html +16 -0
- package/src/lib/components/form/radio/form.radio.component.ts +78 -0
- package/src/lib/components/form/select/form.select.component.css +326 -0
- package/src/lib/components/form/select/form.select.component.html +16 -0
- package/src/lib/components/form/select/form.select.component.ts +358 -0
- package/src/lib/components/form/select/item/form.select.item.component.css +59 -0
- package/src/lib/components/form/select/item/form.select.item.component.html +10 -0
- package/src/lib/components/form/select/item/form.select.item.component.ts +40 -0
- package/src/lib/components/form/table/form.table.component.css +50 -0
- package/src/lib/components/form/table/form.table.component.html +8 -0
- package/src/lib/components/form/table/form.table.component.ts +94 -0
- package/src/lib/components/form/textarea/form.textarea.component.css +109 -0
- package/src/lib/components/form/textarea/form.textarea.component.html +10 -0
- package/src/lib/components/form/textarea/form.textarea.component.ts +76 -0
- package/src/lib/components/form/textbox/form.textbox.component.css +296 -0
- package/src/lib/components/form/textbox/form.textbox.component.html +13 -0
- package/src/lib/components/form/textbox/form.textbox.component.ts +185 -0
- package/src/lib/components/form/time/form.time.component.css +205 -0
- package/src/lib/components/form/time/form.time.component.html +22 -0
- package/src/lib/components/form/time/form.time.component.ts +139 -0
- package/src/lib/components/form/tree/form.tree.component.css +109 -0
- package/src/lib/components/form/tree/form.tree.component.html +11 -0
- package/src/lib/components/form/tree/form.tree.component.ts +98 -0
- package/src/lib/components/form/tree/item/form.tree.item.component.css +142 -0
- package/src/lib/components/form/tree/item/form.tree.item.component.html +9 -0
- package/src/lib/components/form/tree/item/form.tree.item.component.ts +49 -0
- package/src/lib/components/header/header.component.css +57 -0
- package/src/lib/components/header/header.component.html +5 -0
- package/src/lib/components/header/header.component.ts +28 -0
- package/src/lib/components/header/sub/sub.header.component.css +62 -0
- package/src/lib/components/header/sub/sub.header.component.html +8 -0
- package/src/lib/components/header/sub/sub.header.component.ts +11 -0
- package/src/lib/components/layout/layout.component.css +300 -0
- package/src/lib/components/layout/layout.component.html +20 -0
- package/src/lib/components/layout/layout.component.ts +21 -0
- package/src/lib/components/loading/loading.component.css +39 -0
- package/src/lib/components/loading/loading.component.html +8 -0
- package/src/lib/components/loading/loading.component.ts +18 -0
- package/src/lib/components/login/login.component.css +389 -0
- package/src/lib/components/login/login.component.html +27 -0
- package/src/lib/components/login/login.component.ts +145 -0
- package/src/lib/components/modal/modal.component.css +60 -0
- package/src/lib/components/modal/modal.component.html +12 -0
- package/src/lib/components/modal/modal.component.ts +23 -0
- package/src/lib/components/notfound/notfound.component.css +134 -0
- package/src/lib/components/notfound/notfound.component.html +10 -0
- package/src/lib/components/notfound/notfound.component.ts +25 -0
- package/src/lib/components/notification/notification.component.css +45 -0
- package/src/lib/components/notification/notification.component.html +2 -0
- package/src/lib/components/notification/notification.component.ts +11 -0
- package/src/lib/components/sidebar/item/sidebar.item.component.css +236 -0
- package/src/lib/components/sidebar/item/sidebar.item.component.html +16 -0
- package/src/lib/components/sidebar/item/sidebar.item.component.ts +54 -0
- package/src/lib/components/sidebar/sidebar.component.css +42 -0
- package/src/lib/components/sidebar/sidebar.component.html +10 -0
- package/src/lib/components/sidebar/sidebar.component.ts +60 -0
- package/src/lib/components/steps/steps.component.css +320 -0
- package/src/lib/components/steps/steps.component.html +18 -0
- package/src/lib/components/steps/steps.component.ts +44 -0
- package/src/lib/components/table/loading/table.loading.component.css +29 -0
- package/src/lib/components/table/loading/table.loading.component.html +9 -0
- package/src/lib/components/table/loading/table.loading.component.ts +14 -0
- package/src/lib/components/table/pagination/table.pagination.component.css +138 -0
- package/src/lib/components/table/pagination/table.pagination.component.html +9 -0
- package/src/lib/components/table/pagination/table.pagination.component.ts +89 -0
- package/src/lib/components/table/report/table.report.component.css +125 -0
- package/src/lib/components/table/report/table.report.component.html +19 -0
- package/src/lib/components/table/report/table.report.component.ts +238 -0
- package/src/lib/components/table/row/table.row.component.css +170 -0
- package/src/lib/components/table/row/table.row.component.html +21 -0
- package/src/lib/components/table/row/table.row.component.ts +373 -0
- package/src/lib/components/table/table.component.css +116 -0
- package/src/lib/components/table/table.component.html +62 -0
- package/src/lib/components/table/table.component.ts +180 -0
- package/src/lib/components/tooltip/tooltip.component.css +159 -0
- package/src/lib/components/tooltip/tooltip.component.html +1 -0
- package/src/lib/components/tooltip/tooltip.component.ts +15 -0
- package/src/lib/ps-toolkit-ui.module.ts +94 -0
- package/src/lib/services/config.service.ts +8 -0
- package/{public-api.d.ts → src/public-api.ts} +53 -48
- package/src/test.ts +26 -0
- package/tsconfig.lib.json +25 -0
- package/tsconfig.lib.prod.json +10 -0
- package/tsconfig.spec.json +17 -0
- package/tslint.json +17 -0
- package/bundles/ps-toolkit-ui.umd.js +0 -7646
- package/bundles/ps-toolkit-ui.umd.js.map +0 -1
- package/bundles/ps-toolkit-ui.umd.min.js +0 -2
- package/bundles/ps-toolkit-ui.umd.min.js.map +0 -1
- package/esm2015/lib/classes/chart.class.js +0 -140
- package/esm2015/lib/classes/enum.class.js +0 -187
- package/esm2015/lib/classes/form.class.js +0 -481
- package/esm2015/lib/classes/helper.class.js +0 -284
- package/esm2015/lib/classes/lang.class.js +0 -32
- package/esm2015/lib/classes/login.class.js +0 -22
- package/esm2015/lib/classes/modal.class.js +0 -52
- package/esm2015/lib/classes/permission.class.js +0 -61
- package/esm2015/lib/classes/request.class.js +0 -256
- package/esm2015/lib/classes/safestyle.class.js +0 -15
- package/esm2015/lib/classes/sidebar.class.js +0 -14
- package/esm2015/lib/classes/steps.class.js +0 -20
- package/esm2015/lib/classes/string.class.js +0 -220
- package/esm2015/lib/classes/table.class.js +0 -215
- package/esm2015/lib/components/accordion/accordion.component.js +0 -45
- package/esm2015/lib/components/alert/alert.component.js +0 -39
- package/esm2015/lib/components/base.component.js +0 -45
- package/esm2015/lib/components/calendar/calendar.component.js +0 -97
- package/esm2015/lib/components/chart/chart.component.js +0 -17
- package/esm2015/lib/components/clock/clock.component.js +0 -33
- package/esm2015/lib/components/confirm/confirm.component.js +0 -50
- package/esm2015/lib/components/footer/footer.component.js +0 -23
- package/esm2015/lib/components/form/bank-card/form.bank-card.component.js +0 -148
- package/esm2015/lib/components/form/button/form.button.component.js +0 -68
- package/esm2015/lib/components/form/car/form.car.component.js +0 -84
- package/esm2015/lib/components/form/car/search/form.car.search.component.js +0 -172
- package/esm2015/lib/components/form/checkbox/form.checkbox.component.js +0 -66
- package/esm2015/lib/components/form/date/form.date.component.js +0 -254
- package/esm2015/lib/components/form/datetime/form.datetime.component.js +0 -104
- package/esm2015/lib/components/form/file/form.file.component.js +0 -133
- package/esm2015/lib/components/form/finger/form.finger.component.js +0 -138
- package/esm2015/lib/components/form/hidden/form.hidden.component.js +0 -31
- package/esm2015/lib/components/form/icon/form.icon.component.js +0 -76
- package/esm2015/lib/components/form/index/form.component.js +0 -48
- package/esm2015/lib/components/form/label/form.label.component.js +0 -32
- package/esm2015/lib/components/form/plaque/form.plaque.component.js +0 -176
- package/esm2015/lib/components/form/plaque/select/form.plaque.select.component.js +0 -390
- package/esm2015/lib/components/form/radio/form.radio.component.js +0 -79
- package/esm2015/lib/components/form/select/form.select.component.js +0 -374
- package/esm2015/lib/components/form/select/item/form.select.item.component.js +0 -43
- package/esm2015/lib/components/form/table/form.table.component.js +0 -98
- package/esm2015/lib/components/form/textarea/form.textarea.component.js +0 -78
- package/esm2015/lib/components/form/textbox/form.textbox.component.js +0 -186
- package/esm2015/lib/components/form/time/form.time.component.js +0 -145
- package/esm2015/lib/components/form/tree/form.tree.component.js +0 -99
- package/esm2015/lib/components/form/tree/item/form.tree.item.component.js +0 -48
- package/esm2015/lib/components/header/header.component.js +0 -33
- package/esm2015/lib/components/header/sub/sub.header.component.js +0 -14
- package/esm2015/lib/components/layout/layout.component.js +0 -25
- package/esm2015/lib/components/loading/loading.component.js +0 -22
- package/esm2015/lib/components/login/login.component.js +0 -148
- package/esm2015/lib/components/modal/modal.component.js +0 -25
- package/esm2015/lib/components/notfound/notfound.component.js +0 -29
- package/esm2015/lib/components/notification/notification.component.js +0 -14
- package/esm2015/lib/components/sidebar/item/sidebar.item.component.js +0 -53
- package/esm2015/lib/components/sidebar/sidebar.component.js +0 -67
- package/esm2015/lib/components/steps/steps.component.js +0 -51
- package/esm2015/lib/components/table/loading/table.loading.component.js +0 -17
- package/esm2015/lib/components/table/pagination/table.pagination.component.js +0 -84
- package/esm2015/lib/components/table/report/table.report.component.js +0 -246
- package/esm2015/lib/components/table/row/table.row.component.js +0 -379
- package/esm2015/lib/components/table/table.component.js +0 -179
- package/esm2015/lib/components/tooltip/tooltip.component.js +0 -19
- package/esm2015/lib/ps-toolkit-ui.module.js +0 -95
- package/esm2015/lib/services/config.service.js +0 -14
- package/esm2015/ps-toolkit-ui.js +0 -20
- package/esm2015/public-api.js +0 -52
- package/fesm2015/ps-toolkit-ui.js +0 -6566
- package/fesm2015/ps-toolkit-ui.js.map +0 -1
- package/lib/classes/chart.class.d.ts +0 -11
- package/lib/classes/enum.class.d.ts +0 -158
- package/lib/classes/form.class.d.ts +0 -173
- package/lib/classes/helper.class.d.ts +0 -28
- package/lib/classes/lang.class.d.ts +0 -5
- package/lib/classes/login.class.d.ts +0 -17
- package/lib/classes/modal.class.d.ts +0 -19
- package/lib/classes/permission.class.d.ts +0 -31
- package/lib/classes/request.class.d.ts +0 -12
- package/lib/classes/safestyle.class.d.ts +0 -7
- package/lib/classes/sidebar.class.d.ts +0 -11
- package/lib/classes/steps.class.d.ts +0 -17
- package/lib/classes/string.class.d.ts +0 -218
- package/lib/classes/table.class.d.ts +0 -69
- package/lib/components/accordion/accordion.component.d.ts +0 -7
- package/lib/components/alert/alert.component.d.ts +0 -10
- package/lib/components/base.component.d.ts +0 -14
- package/lib/components/calendar/calendar.component.d.ts +0 -26
- package/lib/components/chart/chart.component.d.ts +0 -5
- package/lib/components/clock/clock.component.d.ts +0 -11
- package/lib/components/confirm/confirm.component.d.ts +0 -14
- package/lib/components/footer/footer.component.d.ts +0 -6
- package/lib/components/form/bank-card/form.bank-card.component.d.ts +0 -22
- package/lib/components/form/button/form.button.component.d.ts +0 -15
- package/lib/components/form/car/form.car.component.d.ts +0 -16
- package/lib/components/form/car/search/form.car.search.component.d.ts +0 -17
- package/lib/components/form/checkbox/form.checkbox.component.d.ts +0 -14
- package/lib/components/form/date/form.date.component.d.ts +0 -42
- package/lib/components/form/datetime/form.datetime.component.d.ts +0 -13
- package/lib/components/form/file/form.file.component.d.ts +0 -17
- package/lib/components/form/finger/form.finger.component.d.ts +0 -15
- package/lib/components/form/hidden/form.hidden.component.d.ts +0 -7
- package/lib/components/form/icon/form.icon.component.d.ts +0 -15
- package/lib/components/form/index/form.component.d.ts +0 -10
- package/lib/components/form/label/form.label.component.d.ts +0 -8
- package/lib/components/form/plaque/form.plaque.component.d.ts +0 -22
- package/lib/components/form/plaque/select/form.plaque.select.component.d.ts +0 -36
- package/lib/components/form/radio/form.radio.component.d.ts +0 -13
- package/lib/components/form/select/form.select.component.d.ts +0 -39
- package/lib/components/form/select/item/form.select.item.component.d.ts +0 -12
- package/lib/components/form/table/form.table.component.d.ts +0 -9
- package/lib/components/form/textarea/form.textarea.component.d.ts +0 -13
- package/lib/components/form/textbox/form.textbox.component.d.ts +0 -20
- package/lib/components/form/time/form.time.component.d.ts +0 -25
- package/lib/components/form/tree/form.tree.component.d.ts +0 -16
- package/lib/components/form/tree/item/form.tree.item.component.d.ts +0 -17
- package/lib/components/header/header.component.d.ts +0 -9
- package/lib/components/header/sub/sub.header.component.d.ts +0 -3
- package/lib/components/layout/layout.component.d.ts +0 -8
- package/lib/components/loading/loading.component.d.ts +0 -5
- package/lib/components/login/login.component.d.ts +0 -13
- package/lib/components/modal/modal.component.d.ts +0 -9
- package/lib/components/notfound/notfound.component.d.ts +0 -8
- package/lib/components/notification/notification.component.d.ts +0 -3
- package/lib/components/sidebar/item/sidebar.item.component.d.ts +0 -14
- package/lib/components/sidebar/sidebar.component.d.ts +0 -19
- package/lib/components/steps/steps.component.d.ts +0 -10
- package/lib/components/table/loading/table.loading.component.d.ts +0 -5
- package/lib/components/table/pagination/table.pagination.component.d.ts +0 -15
- package/lib/components/table/report/table.report.component.d.ts +0 -34
- package/lib/components/table/row/table.row.component.d.ts +0 -34
- package/lib/components/table/table.component.d.ts +0 -40
- package/lib/components/tooltip/tooltip.component.d.ts +0 -5
- package/lib/ps-toolkit-ui.module.d.ts +0 -4
- package/lib/services/config.service.d.ts +0 -6
- package/ps-toolkit-ui.d.ts +0 -19
- package/ps-toolkit-ui.metadata.json +0 -1
|
@@ -0,0 +1,320 @@
|
|
|
1
|
+
.steps{
|
|
2
|
+
float: right;
|
|
3
|
+
width: 100%;
|
|
4
|
+
padding: 20px;
|
|
5
|
+
background-color: white;
|
|
6
|
+
border-radius: 5px;
|
|
7
|
+
}
|
|
8
|
+
.steps > .header{
|
|
9
|
+
float: right;
|
|
10
|
+
width: 100%;
|
|
11
|
+
justify-content: center;
|
|
12
|
+
align-items: center;
|
|
13
|
+
display: flex;
|
|
14
|
+
-webkit-user-select: none;
|
|
15
|
+
-moz-user-select: none;
|
|
16
|
+
-khtml-user-select: none;
|
|
17
|
+
-ms-user-select: none;
|
|
18
|
+
}
|
|
19
|
+
.steps > .header > .step-con{
|
|
20
|
+
float: right;
|
|
21
|
+
width: 160px;
|
|
22
|
+
position: relative;
|
|
23
|
+
padding: 10px;
|
|
24
|
+
}
|
|
25
|
+
.steps > .header > .step-con .step{
|
|
26
|
+
float: right;
|
|
27
|
+
width: 100%;
|
|
28
|
+
position: relative;
|
|
29
|
+
padding: 10px;
|
|
30
|
+
border-radius: 5px;
|
|
31
|
+
cursor: default;
|
|
32
|
+
pointer-events: none;
|
|
33
|
+
}
|
|
34
|
+
.steps > .header > .step-con.done .step, .steps > .header > .step-con.next .step, .steps > .header > .step-con.process .step{
|
|
35
|
+
cursor: pointer;
|
|
36
|
+
pointer-events: unset;
|
|
37
|
+
}
|
|
38
|
+
.steps > .header > .step-con.done .step:hover, .steps > .header > .step-con.next .step:hover, .steps > .header > .step-con.process .step{
|
|
39
|
+
background-color: var(--base-11);
|
|
40
|
+
}
|
|
41
|
+
.steps > .header > .step-con .step .icon{
|
|
42
|
+
float: right;
|
|
43
|
+
width: 40px;
|
|
44
|
+
margin-right: calc(50% - 20px);
|
|
45
|
+
text-align: center;
|
|
46
|
+
font-size: 25px;
|
|
47
|
+
height: 40px;
|
|
48
|
+
line-height: 40px;
|
|
49
|
+
}
|
|
50
|
+
.steps > .header > .step-con .step .icon i{
|
|
51
|
+
line-height: 35px;
|
|
52
|
+
}
|
|
53
|
+
.steps > .header > .step-con.done .icon {
|
|
54
|
+
/*border: 2px solid var(--comp);*/
|
|
55
|
+
}
|
|
56
|
+
.steps > .header > .step-con.process .icon{
|
|
57
|
+
/*border: 2px solid var(--comp);*/
|
|
58
|
+
}
|
|
59
|
+
.steps > .header > .step-con .step .title{
|
|
60
|
+
float: right;
|
|
61
|
+
width: 100%;
|
|
62
|
+
text-align: center;
|
|
63
|
+
font-size: 13px;
|
|
64
|
+
height: 50px;
|
|
65
|
+
line-height: 50px;
|
|
66
|
+
}
|
|
67
|
+
.steps > .header > .step-con .step.with-description .title{
|
|
68
|
+
float: right;
|
|
69
|
+
width: 100%;
|
|
70
|
+
text-align: center;
|
|
71
|
+
font-size: 13px;
|
|
72
|
+
height: 25px;
|
|
73
|
+
line-height: 32px;
|
|
74
|
+
}
|
|
75
|
+
.steps > .header > .step-con .step .description{
|
|
76
|
+
float: right;
|
|
77
|
+
width: 100%;
|
|
78
|
+
text-align: center;
|
|
79
|
+
font-size: 11px;
|
|
80
|
+
height: 25px;
|
|
81
|
+
line-height: 20px;
|
|
82
|
+
}
|
|
83
|
+
.steps > .header > .step-con .step .dot{
|
|
84
|
+
float: right;
|
|
85
|
+
width: 15px;
|
|
86
|
+
height: 15px;
|
|
87
|
+
line-height: 15px;
|
|
88
|
+
margin-right: calc((100% - 15px) / 2);
|
|
89
|
+
border-radius: 50%;
|
|
90
|
+
}
|
|
91
|
+
.steps > .header > .step-con .step .delete{
|
|
92
|
+
width: 20px;
|
|
93
|
+
height: 20px;
|
|
94
|
+
line-height: 20px;
|
|
95
|
+
position: absolute;
|
|
96
|
+
top: -10px;
|
|
97
|
+
right: -10px;
|
|
98
|
+
font-size: 25px;
|
|
99
|
+
text-align: center;
|
|
100
|
+
color: var(--red);
|
|
101
|
+
cursor: pointer;
|
|
102
|
+
display: none;
|
|
103
|
+
}
|
|
104
|
+
.steps > .header > .step-con .step .delete:hover{
|
|
105
|
+
color: var(--red-dark);
|
|
106
|
+
}
|
|
107
|
+
.steps > .header > .step-con.process .step .delete{
|
|
108
|
+
display: block;
|
|
109
|
+
}
|
|
110
|
+
.steps > .header > .step-con .step .dot.dot-done{
|
|
111
|
+
display: none;
|
|
112
|
+
color: var(--comp);
|
|
113
|
+
}
|
|
114
|
+
.steps > .header > .step-con .step .dot.dot-process{
|
|
115
|
+
display: none;
|
|
116
|
+
color: var(--comp);
|
|
117
|
+
font-size: 20px;
|
|
118
|
+
}
|
|
119
|
+
.steps > .header > .step-con.done .step .dot, .steps > .header > .step-con.process .step .dot{
|
|
120
|
+
display: none;
|
|
121
|
+
}
|
|
122
|
+
.steps > .header > .step-con.done .step .dot.dot-done{
|
|
123
|
+
display: block;
|
|
124
|
+
}
|
|
125
|
+
.steps > .header > .step-con.process .step .dot.dot-process{
|
|
126
|
+
display: block;
|
|
127
|
+
}
|
|
128
|
+
.steps > .header > .step-con .step .line-r{
|
|
129
|
+
position: absolute;
|
|
130
|
+
width: calc((100% - 5px) / 2);
|
|
131
|
+
height: 2px;
|
|
132
|
+
bottom: 16px;
|
|
133
|
+
right: -10px;
|
|
134
|
+
background-image: linear-gradient(to right, rgba(51, 51, 51, 0.1), rgba(51, 51, 51, 0.4));
|
|
135
|
+
}
|
|
136
|
+
.steps > .header > .step-con .step .line-l{
|
|
137
|
+
position: absolute;
|
|
138
|
+
width: calc((100% - 5px) / 2);
|
|
139
|
+
height: 2px;
|
|
140
|
+
bottom: 16px;
|
|
141
|
+
left: -10px;
|
|
142
|
+
background-image: linear-gradient(to left, rgba(51, 51, 51, 0.1), rgba(51, 51, 51, 0.4));
|
|
143
|
+
}
|
|
144
|
+
.steps > .header > .step-con:first-of-type .step .line-r{
|
|
145
|
+
display: none;
|
|
146
|
+
}
|
|
147
|
+
.steps > .header > .step-con:last-of-type .step .line-l{
|
|
148
|
+
display: none;
|
|
149
|
+
}
|
|
150
|
+
@media (max-width: 399.99px) {
|
|
151
|
+
.steps{
|
|
152
|
+
width: 96%;
|
|
153
|
+
margin: 20px 2%;
|
|
154
|
+
}
|
|
155
|
+
.steps {
|
|
156
|
+
width: 100%;
|
|
157
|
+
margin: 0;
|
|
158
|
+
padding: 10px;
|
|
159
|
+
}
|
|
160
|
+
.steps .steps{
|
|
161
|
+
width: 100%;
|
|
162
|
+
margin-right: 0;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
.steps > .header > .step-con .step .icon{
|
|
166
|
+
width: 30px;
|
|
167
|
+
margin-right: calc((100% - 30px) / 2);
|
|
168
|
+
font-size: 18px;
|
|
169
|
+
height: 30px;
|
|
170
|
+
}
|
|
171
|
+
.steps > .header > .step-con .step .icon i{
|
|
172
|
+
line-height: 25px;
|
|
173
|
+
}
|
|
174
|
+
.steps > .header > .step-con .step .title{
|
|
175
|
+
font-size: 10px;
|
|
176
|
+
line-height: 13px;
|
|
177
|
+
justify-content: center;
|
|
178
|
+
align-items: center;
|
|
179
|
+
display: flex;
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
@media (min-width: 400px) and (max-width: 499.99px) {
|
|
184
|
+
.steps{
|
|
185
|
+
width: 96%;
|
|
186
|
+
margin: 20px 2%;
|
|
187
|
+
}
|
|
188
|
+
.steps {
|
|
189
|
+
width: 100%;
|
|
190
|
+
margin: 0;
|
|
191
|
+
padding: 10px;
|
|
192
|
+
}
|
|
193
|
+
.steps .steps{
|
|
194
|
+
width: 100%;
|
|
195
|
+
margin-right: 0;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
.steps > .header > .step-con .step .icon{
|
|
199
|
+
width: 30px;
|
|
200
|
+
margin-right: calc((100% - 30px) / 2);
|
|
201
|
+
font-size: 18px;
|
|
202
|
+
height: 30px;
|
|
203
|
+
}
|
|
204
|
+
.steps > .header > .step-con .step .icon i{
|
|
205
|
+
line-height: 25px;
|
|
206
|
+
}
|
|
207
|
+
.steps > .header > .step-con .step .title{
|
|
208
|
+
font-size: 10px;
|
|
209
|
+
line-height: 13px;
|
|
210
|
+
justify-content: center;
|
|
211
|
+
align-items: center;
|
|
212
|
+
display: flex;
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
@media (min-width: 500px) and (max-width: 599.99px) {
|
|
217
|
+
.steps{
|
|
218
|
+
width: 96%;
|
|
219
|
+
margin: 20px 2%;
|
|
220
|
+
}
|
|
221
|
+
.steps {
|
|
222
|
+
width: 100%;
|
|
223
|
+
margin: 0;
|
|
224
|
+
}
|
|
225
|
+
.steps .steps{
|
|
226
|
+
width: 100%;
|
|
227
|
+
margin-right: 0;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
.steps > .header > .step-con .step .icon{
|
|
231
|
+
width: 35px;
|
|
232
|
+
margin-right: calc((100% - 35px) / 2);
|
|
233
|
+
font-size: 20px;
|
|
234
|
+
height: 35px;
|
|
235
|
+
}
|
|
236
|
+
.steps > .header > .step-con .step .icon i{
|
|
237
|
+
line-height: 30px;
|
|
238
|
+
}
|
|
239
|
+
.steps > .header > .step-con .step .title{
|
|
240
|
+
font-size: 11px;
|
|
241
|
+
line-height: 13px;
|
|
242
|
+
justify-content: center;
|
|
243
|
+
align-items: center;
|
|
244
|
+
display: flex;
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
@media (min-width: 600px) and (max-width: 699.99px) {
|
|
249
|
+
.steps{
|
|
250
|
+
width: 96%;
|
|
251
|
+
margin: 20px 2%;
|
|
252
|
+
}
|
|
253
|
+
.steps {
|
|
254
|
+
width: 100%;
|
|
255
|
+
margin: 0;
|
|
256
|
+
}
|
|
257
|
+
.steps .steps{
|
|
258
|
+
width: 100%;
|
|
259
|
+
margin-right: 0;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
.steps > .header > .step-con .step .icon{
|
|
263
|
+
width: 35px;
|
|
264
|
+
margin-right: calc((100% - 35px) / 2);
|
|
265
|
+
font-size: 20px;
|
|
266
|
+
height: 35px;
|
|
267
|
+
}
|
|
268
|
+
.steps > .header > .step-con .step .icon i{
|
|
269
|
+
line-height: 30px;
|
|
270
|
+
}
|
|
271
|
+
.steps > .header > .step-con .step .title{
|
|
272
|
+
font-size: 11px;
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
@media (min-width: 700px) and (max-width: 799.99px) {
|
|
277
|
+
.steps{
|
|
278
|
+
width: 96%;
|
|
279
|
+
margin: 20px 2%;
|
|
280
|
+
}
|
|
281
|
+
.steps {
|
|
282
|
+
width: 100%;
|
|
283
|
+
margin: 0;
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
@media (min-width: 800px) and (max-width: 899.99px) {
|
|
288
|
+
.steps {
|
|
289
|
+
width: 100%;
|
|
290
|
+
margin: 0;
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
@media (min-width: 900px) and (max-width: 999.99px) {
|
|
295
|
+
.steps {
|
|
296
|
+
width: 90%;
|
|
297
|
+
margin: 0 5%;
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
@media (min-width: 1000px) and (max-width: 1099.99px) {
|
|
302
|
+
.steps {
|
|
303
|
+
width: 80%;
|
|
304
|
+
margin: 0 10%;
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
@media (min-width: 1100px) and (max-width: 1199.99px) {
|
|
309
|
+
.steps {
|
|
310
|
+
width: 70%;
|
|
311
|
+
margin: 0 15%;
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
@media (min-width: 1200px) and (max-width: 1299.99px) {
|
|
316
|
+
.steps {
|
|
317
|
+
width: 70%;
|
|
318
|
+
margin: 0 15%;
|
|
319
|
+
}
|
|
320
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<div class="steps">
|
|
2
|
+
<div class="header">
|
|
3
|
+
<div *ngFor="let s of steps.items; let i = index" [className]="(getActive() === i ? 'process ' : getActive() > i ? 'done ' : steps.activeAll ? 'next ' : '') + 'step-con'">
|
|
4
|
+
<div [className]="(s.description ? 'with-description ' : '') + 'step'" (click)="changeStep(i, s)">
|
|
5
|
+
<div [className]="s.icon + ' icon fa svg'"></div>
|
|
6
|
+
<div class="title o-h-d">{{steps.l(s.title)}}</div>
|
|
7
|
+
<div *ngIf="s.description" class="description o-h-d">({{steps.l(s.description)}})</div>
|
|
8
|
+
<i *ngIf="s.onDelete" (click)="onDelete(s)" class="delete fas fa-times"></i>
|
|
9
|
+
<i class="dot fas fa-dot-circle"></i>
|
|
10
|
+
<i class="dot dot-done fas fa-circle"></i>
|
|
11
|
+
<i class="dot dot-process fas fa-spinner"></i>
|
|
12
|
+
<div class="line-r"></div>
|
|
13
|
+
<div class="line-l"></div>
|
|
14
|
+
</div>
|
|
15
|
+
</div>
|
|
16
|
+
</div>
|
|
17
|
+
<ng-content></ng-content>
|
|
18
|
+
</div>
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import {Component, Input, OnInit} from '@angular/core';
|
|
2
|
+
import {Router} from '@angular/router';
|
|
3
|
+
import {StepsClass, StepsItemClass} from '../../classes/steps.class';
|
|
4
|
+
|
|
5
|
+
@Component({
|
|
6
|
+
selector: 'lib-steps',
|
|
7
|
+
templateUrl: './steps.component.html',
|
|
8
|
+
styleUrls: ['./steps.component.css']
|
|
9
|
+
})
|
|
10
|
+
export class StepsComponent{
|
|
11
|
+
@Input()
|
|
12
|
+
steps: StepsClass;
|
|
13
|
+
|
|
14
|
+
constructor(private router: Router) {
|
|
15
|
+
}
|
|
16
|
+
getActive(): number {
|
|
17
|
+
return this.steps.items.findIndex(x => x.active);
|
|
18
|
+
}
|
|
19
|
+
changeStep(i: number, s: StepsItemClass): void{
|
|
20
|
+
if (s.url != null){
|
|
21
|
+
if (this.getActive() !== 0 || this.steps.activeAll) {
|
|
22
|
+
this.router.navigate([s.url]);
|
|
23
|
+
}
|
|
24
|
+
}else{
|
|
25
|
+
if (s.onClick){
|
|
26
|
+
s.onClick(s);
|
|
27
|
+
}else{
|
|
28
|
+
const a = this.steps.items.findIndex(x => x.active);
|
|
29
|
+
if (a > i || this.steps.activeAll){
|
|
30
|
+
this.steps.items[a].active = false;
|
|
31
|
+
this.steps.items[i].active = true;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
onDelete(s: StepsItemClass): void{
|
|
37
|
+
const a = this.steps.items.findIndex(x => x.name === s.name);
|
|
38
|
+
if (this.steps.items[a].active){
|
|
39
|
+
this.steps.items[a - 1].active = true;
|
|
40
|
+
}
|
|
41
|
+
this.steps.items = this.steps.items.filter(x => x.name !== s.name);
|
|
42
|
+
s.onDelete(s);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
.loading {
|
|
2
|
+
position: absolute;
|
|
3
|
+
background-color: white;
|
|
4
|
+
bottom: 0;
|
|
5
|
+
right: 0;
|
|
6
|
+
width: 100%;
|
|
7
|
+
height: 100%;
|
|
8
|
+
text-align: center;
|
|
9
|
+
border-radius: 5px;
|
|
10
|
+
z-index: 101;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.loading .text {
|
|
14
|
+
position: absolute;
|
|
15
|
+
height: 35px;
|
|
16
|
+
line-height: 35px;
|
|
17
|
+
width: 100%;
|
|
18
|
+
text-align: center;
|
|
19
|
+
font-family: VazirBold;
|
|
20
|
+
top: calc(50% - 20px);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
::ng-deep .loading .text .icon {
|
|
24
|
+
font-size: 20px !important;
|
|
25
|
+
line-height: 30px;
|
|
26
|
+
position: relative;
|
|
27
|
+
top: 5px;
|
|
28
|
+
margin-left: 5px;
|
|
29
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
<div *ngIf="table.loading" class="loading">
|
|
2
|
+
<div class="text" [innerHTML]="table.l('LoadingTable', 'Processing')"></div>
|
|
3
|
+
</div>
|
|
4
|
+
<div *ngIf="!table.permission" class="loading">
|
|
5
|
+
<div class="text"><i class="fas fa-shield-alt icon"></i>{{ table.l("PermissionDenied") }}</div>
|
|
6
|
+
</div>
|
|
7
|
+
<div *ngIf="!table.loading && table.permission && table.rows.length == 0" class="loading">
|
|
8
|
+
<div class="text"><i class="fas fa-exclamation icon"></i>{{ table.l("NotfoundTitle") }}</div>
|
|
9
|
+
</div>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import {Component, Input, OnInit} from '@angular/core';
|
|
2
|
+
import {TableClass} from '../../../classes/table.class';
|
|
3
|
+
|
|
4
|
+
@Component({
|
|
5
|
+
selector: 'lib-table-loading',
|
|
6
|
+
templateUrl: './table.loading.component.html',
|
|
7
|
+
styleUrls: ['./table.loading.component.css']
|
|
8
|
+
})
|
|
9
|
+
export class TableLoadingComponent{
|
|
10
|
+
@Input()
|
|
11
|
+
table: TableClass;
|
|
12
|
+
constructor() {
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
.pagination{
|
|
2
|
+
float: right;
|
|
3
|
+
width: 100%;
|
|
4
|
+
text-align: center;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.pagination .items{
|
|
8
|
+
display: inline-block;
|
|
9
|
+
position: relative;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
::ng-deep .table-con .pagination .form-input-con.button{
|
|
13
|
+
width: unset;
|
|
14
|
+
float: unset;
|
|
15
|
+
padding: 0 5px;
|
|
16
|
+
display: inline-block;
|
|
17
|
+
min-width: 25px;
|
|
18
|
+
margin: 0 2px;
|
|
19
|
+
vertical-align: middle;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
::ng-deep .table-con .pagination .items .dots{
|
|
23
|
+
height: 25px;
|
|
24
|
+
line-height: 25px;
|
|
25
|
+
display: inline-block;
|
|
26
|
+
min-width: 25px;
|
|
27
|
+
margin: 0 5px;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
::ng-deep .table-con .pagination .form-input-con.select{
|
|
31
|
+
width: unset;
|
|
32
|
+
padding: 0 5px;
|
|
33
|
+
display: inline-block;
|
|
34
|
+
min-width: 25px;
|
|
35
|
+
margin: 0 5px;
|
|
36
|
+
float: left;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
@media (max-width: 399.98px) {
|
|
43
|
+
::ng-deep .table-con .pagination .form-input-con.button.extra,
|
|
44
|
+
::ng-deep .table-con .pagination .form-input-con.button.first,
|
|
45
|
+
::ng-deep .table-con .pagination .form-input-con.button.last{
|
|
46
|
+
display: none;
|
|
47
|
+
}
|
|
48
|
+
::ng-deep .table-con .pagination .form-input-con.button{
|
|
49
|
+
padding: 0 3px;
|
|
50
|
+
margin: 0 3px;
|
|
51
|
+
}
|
|
52
|
+
::ng-deep .table-con .pagination .items .dots {
|
|
53
|
+
display: none;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
@media (min-width: 400px) and (max-width: 499.98px) {
|
|
58
|
+
::ng-deep .table-con .pagination .form-input-con.button.extra,
|
|
59
|
+
::ng-deep .table-con .pagination .form-input-con.button.first,
|
|
60
|
+
::ng-deep .table-con .pagination .form-input-con.button.last{
|
|
61
|
+
display: none;
|
|
62
|
+
}
|
|
63
|
+
::ng-deep .table-con .pagination .form-input-con.button{
|
|
64
|
+
padding: 0 3px;
|
|
65
|
+
margin: 0 3px;
|
|
66
|
+
}
|
|
67
|
+
::ng-deep .table-con .pagination .items .dots {
|
|
68
|
+
display: none;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
@media (min-width: 500px) and (max-width: 599.98px) {
|
|
73
|
+
::ng-deep .table-con .pagination .form-input-con.button.extra{
|
|
74
|
+
display: none;
|
|
75
|
+
}
|
|
76
|
+
::ng-deep .table-con .pagination .form-input-con.button{
|
|
77
|
+
padding: 0 3px;
|
|
78
|
+
margin: 0 3px;
|
|
79
|
+
}
|
|
80
|
+
::ng-deep .table-con .pagination .items .dots {
|
|
81
|
+
margin: 0;
|
|
82
|
+
font-size: 10px;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
@media (min-width: 600px) and (max-width: 699.98px) {
|
|
87
|
+
::ng-deep .table-con .pagination .form-input-con.button{
|
|
88
|
+
padding: 0 3px;
|
|
89
|
+
margin: 0 3px;
|
|
90
|
+
}
|
|
91
|
+
::ng-deep .table-con .pagination .items .dots {
|
|
92
|
+
margin: 0;
|
|
93
|
+
font-size: 10px;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
@media (min-width: 700px) and (max-width: 799.98px) {
|
|
98
|
+
::ng-deep .table-con .pagination .form-input-con.button{
|
|
99
|
+
padding: 0 3px;
|
|
100
|
+
margin: 0 3px;
|
|
101
|
+
}
|
|
102
|
+
::ng-deep .table-con .pagination .items .dots {
|
|
103
|
+
margin: 0;
|
|
104
|
+
font-size: 10px;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
@media (min-width: 800px) and (max-width: 899.98px) {
|
|
109
|
+
::ng-deep .table-con .pagination .form-input-con.button{
|
|
110
|
+
padding: 0 3px;
|
|
111
|
+
margin: 0 3px;
|
|
112
|
+
}
|
|
113
|
+
::ng-deep .table-con .pagination .items .dots {
|
|
114
|
+
margin: 0;
|
|
115
|
+
font-size: 10px;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
@media (min-width: 900px) and (max-width: 999.98px) {
|
|
120
|
+
::ng-deep .table-con .pagination .form-input-con.button{
|
|
121
|
+
padding: 0 3px;
|
|
122
|
+
margin: 0 3px;
|
|
123
|
+
}
|
|
124
|
+
::ng-deep .table-con .pagination .items .dots {
|
|
125
|
+
margin: 0;
|
|
126
|
+
font-size: 10px;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
@media (min-width: 1000px) and (max-width: 1099.98px) {
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
@media (min-width: 1100px) and (max-width: 1199.98px) {
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
@media (min-width: 1200px) {
|
|
137
|
+
}
|
|
138
|
+
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
<div class="pagination">
|
|
2
|
+
<div class="items">
|
|
3
|
+
<span *ngFor="let btn of getButtons()">
|
|
4
|
+
<lib-form-button *ngIf="btn.type === type.Button" [inp]="btn"></lib-form-button>
|
|
5
|
+
<div class="dots" *ngIf="btn.type === type.Icon"><div class="w-100"><i class="fas fa-ellipsis-h icon"></i></div></div>
|
|
6
|
+
</span>
|
|
7
|
+
</div>
|
|
8
|
+
<lib-form-select [inp]="perPageSelect"></lib-form-select>
|
|
9
|
+
</div>
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import {Component, Input, OnInit} from '@angular/core';
|
|
2
|
+
import {TableClass} from '../../../classes/table.class';
|
|
3
|
+
import {InputClass, OptionClass} from '../../../classes/form.class';
|
|
4
|
+
import {InputType} from '../../../classes/enum.class';
|
|
5
|
+
|
|
6
|
+
@Component({
|
|
7
|
+
selector: 'lib-table-pagination',
|
|
8
|
+
templateUrl: './table.pagination.component.html',
|
|
9
|
+
styleUrls: ['./table.pagination.component.css']
|
|
10
|
+
})
|
|
11
|
+
export class TablePaginationComponent implements OnInit {
|
|
12
|
+
@Input()
|
|
13
|
+
table: TableClass;
|
|
14
|
+
size: number;
|
|
15
|
+
perPageSelect: InputClass;
|
|
16
|
+
next: InputClass;
|
|
17
|
+
get type(): typeof InputType { return InputType; }
|
|
18
|
+
|
|
19
|
+
getButtons(): InputClass[]{
|
|
20
|
+
this.size = parseInt((this.table.count / this.table.perPage).toString(), 10) + (this.table.count % this.table.perPage > 0 ? 1 : 0);
|
|
21
|
+
if (this.size <= 1) {
|
|
22
|
+
return [];
|
|
23
|
+
}
|
|
24
|
+
const previous = new InputClass(this.table.environment, this.table.l, null,
|
|
25
|
+
'fa-duotone fa-angle-right', InputType.Button, 'h-25', this.table.page - 1);
|
|
26
|
+
previous.onClick = (btn) => this.changePage(btn);
|
|
27
|
+
const next = new InputClass(this.table.environment, this.table.l, null,
|
|
28
|
+
'fa-duotone fa-angle-left', InputType.Button, 'h-25', this.table.page + 1);
|
|
29
|
+
next.onClick = (btn) => this.changePage(btn);
|
|
30
|
+
const last = new InputClass(this.table.environment, this.table.l, this.size.toString(), null,
|
|
31
|
+
InputType.Button, 'h-25 last', this.size);
|
|
32
|
+
last.onClick = (btn) => this.changePage(btn);
|
|
33
|
+
const first = new InputClass(this.table.environment, this.table.l, '1', null, InputType.Button, 'h-25 first', 1);
|
|
34
|
+
first.onClick = (btn) => this.changePage(btn);
|
|
35
|
+
const dots = new InputClass(this.table.environment, this.table.l, 'dots', '', InputType.Icon);
|
|
36
|
+
let buttons: InputClass[] = [];
|
|
37
|
+
buttons.push(previous);
|
|
38
|
+
if (this.table.page === 1){
|
|
39
|
+
previous.onClick = null;
|
|
40
|
+
}
|
|
41
|
+
if (this.size < 6) {
|
|
42
|
+
buttons = buttons.concat(this.add(1, this.size + 1));
|
|
43
|
+
} else if (this.table.page < 4) {
|
|
44
|
+
buttons = buttons.concat(this.add(1, 5), [dots, last]);
|
|
45
|
+
} else if (this.table.page > this.size - 3) {
|
|
46
|
+
buttons = buttons.concat([first, dots], this.add(this.size - 3, this.size + 1));
|
|
47
|
+
} else {
|
|
48
|
+
buttons = buttons.concat([first, dots], this.add(this.table.page - 1, this.table.page + 2), [dots, last]);
|
|
49
|
+
}
|
|
50
|
+
buttons.push(next);
|
|
51
|
+
if (this.table.page === this.size){
|
|
52
|
+
next.onClick = null;
|
|
53
|
+
}
|
|
54
|
+
return buttons;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
add(s: number, f: number): InputClass[] {
|
|
58
|
+
const l: InputClass[] = [];
|
|
59
|
+
for (let i = s; i < f; i++) {
|
|
60
|
+
const b = new InputClass(this.table.environment, this.table.l, i.toString(),
|
|
61
|
+
null, InputType.Button, 'h-25' + (this.table.page === i ? ' active' : ' extra'), i);
|
|
62
|
+
b.onClick = (btn) => this.changePage(btn);
|
|
63
|
+
l.push(b);
|
|
64
|
+
}
|
|
65
|
+
return l;
|
|
66
|
+
}
|
|
67
|
+
changePage(btn): void{
|
|
68
|
+
this.table.page = btn.value;
|
|
69
|
+
this.table.load(btn);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
ngOnInit(): void{
|
|
73
|
+
this.perPageSelect = new InputClass(this.table.environment, this.table.l, 'PerPage', '', InputType.Select, 'h-25 w-80-p f-l');
|
|
74
|
+
this.perPageSelect.value = this.table.perPage.toString();
|
|
75
|
+
this.perPageSelect.options = [
|
|
76
|
+
new OptionClass('5', '5'),
|
|
77
|
+
new OptionClass('10', '10'),
|
|
78
|
+
new OptionClass('50', '50'),
|
|
79
|
+
new OptionClass('100', '100'),
|
|
80
|
+
];
|
|
81
|
+
this.perPageSelect.value = this.perPageSelect.search = this.table.perPage.toString();
|
|
82
|
+
this.perPageSelect.displayLabel = false;
|
|
83
|
+
this.perPageSelect.onChange = (v) => {
|
|
84
|
+
this.table.page = 1;
|
|
85
|
+
this.table.perPage = parseInt(v.value, 10);
|
|
86
|
+
this.table.load();
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
}
|