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,134 @@
|
|
|
1
|
+
#Notfound{
|
|
2
|
+
float: right;
|
|
3
|
+
width: 100%;
|
|
4
|
+
position: relative;
|
|
5
|
+
background-color: white;
|
|
6
|
+
min-height: calc(100vh - 125px);
|
|
7
|
+
justify-content: center;
|
|
8
|
+
align-items: center;
|
|
9
|
+
display: flex;
|
|
10
|
+
}
|
|
11
|
+
#Notfound .notfound-con{
|
|
12
|
+
width: 100%;
|
|
13
|
+
float: right;
|
|
14
|
+
height: 100%;
|
|
15
|
+
border-radius: 5px;
|
|
16
|
+
}
|
|
17
|
+
#Notfound .notfound-con .notfound{
|
|
18
|
+
float: right;
|
|
19
|
+
width: 100%;
|
|
20
|
+
text-align: center;
|
|
21
|
+
font-size: 60px;
|
|
22
|
+
height: 100px;
|
|
23
|
+
line-height: 120px;
|
|
24
|
+
font-family: VazirBold;
|
|
25
|
+
position: relative;
|
|
26
|
+
z-index: 2;
|
|
27
|
+
}
|
|
28
|
+
#Notfound .notfound-con .notfound-text{
|
|
29
|
+
float: right;
|
|
30
|
+
width: 100%;
|
|
31
|
+
text-align: center;
|
|
32
|
+
height: 40px;
|
|
33
|
+
line-height: 40px;
|
|
34
|
+
font-size: 16px;
|
|
35
|
+
font-family: VazirLight;
|
|
36
|
+
position: relative;
|
|
37
|
+
z-index: 2;
|
|
38
|
+
}
|
|
39
|
+
#Notfound .notfound-con .notfound-btn{
|
|
40
|
+
margin-top: 15px;
|
|
41
|
+
float: right;
|
|
42
|
+
width: 20%;
|
|
43
|
+
position: relative;
|
|
44
|
+
z-index: 2;
|
|
45
|
+
margin-right: 40%;
|
|
46
|
+
}
|
|
47
|
+
#Notfound .notfound-con .notfound-icon{
|
|
48
|
+
float: right;
|
|
49
|
+
width: 100%;
|
|
50
|
+
color: var(--base-33);
|
|
51
|
+
font-size: 150px;
|
|
52
|
+
text-align: center;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
@media (max-width: 399.99px) {
|
|
56
|
+
#Notfound .notfound-con{
|
|
57
|
+
width: 90%;
|
|
58
|
+
right: 5%;
|
|
59
|
+
}
|
|
60
|
+
#Notfound .notfound-con .notfound{
|
|
61
|
+
font-size: 90px;
|
|
62
|
+
}
|
|
63
|
+
#Notfound .notfound-con .notfound-text{
|
|
64
|
+
font-size: 14px;
|
|
65
|
+
}
|
|
66
|
+
#Notfound .notfound-con .notfound-icon{
|
|
67
|
+
font-size: 300px;
|
|
68
|
+
left: -90px;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
@media (min-width: 400px) and (max-width: 499.99px) {
|
|
73
|
+
#Notfound .notfound-con{
|
|
74
|
+
width: 90%;
|
|
75
|
+
right: 5%;
|
|
76
|
+
}
|
|
77
|
+
#Notfound .notfound-con .notfound{
|
|
78
|
+
font-size: 110px;
|
|
79
|
+
}
|
|
80
|
+
#Notfound .notfound-con .notfound-text{
|
|
81
|
+
font-size: 16px;
|
|
82
|
+
}
|
|
83
|
+
#Notfound .notfound-con .notfound-icon{
|
|
84
|
+
font-size: 380px;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
@media (min-width: 500px) and (max-width: 599.99px) {
|
|
89
|
+
#Notfound .notfound-con{
|
|
90
|
+
width: 90%;
|
|
91
|
+
right: 5%;
|
|
92
|
+
}
|
|
93
|
+
#Notfound .notfound-con .notfound{
|
|
94
|
+
font-size: 110px;
|
|
95
|
+
}
|
|
96
|
+
#Notfound .notfound-con .notfound-text{
|
|
97
|
+
font-size: 16px;
|
|
98
|
+
}
|
|
99
|
+
#Notfound .notfound-con .notfound-icon{
|
|
100
|
+
font-size: 380px;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
@media (min-width: 600px) and (max-width: 699.99px) {
|
|
105
|
+
#Notfound .notfound-con{
|
|
106
|
+
width: 80%;
|
|
107
|
+
right: 10%;
|
|
108
|
+
}
|
|
109
|
+
#Notfound .notfound-con .notfound{
|
|
110
|
+
font-size: 120px;
|
|
111
|
+
}
|
|
112
|
+
#Notfound .notfound-con .notfound-text{
|
|
113
|
+
font-size: 17px;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
@media (min-width: 700px) and (max-width: 799.99px) {
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
@media (min-width: 800px) and (max-width: 899.99px) {
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
@media (min-width: 900px) and (max-width: 999.99px) {
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
@media (min-width: 1000px) and (max-width: 1099.99px) {
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
@media (min-width: 1100px) and (max-width: 1199.99px) {
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
@media (min-width: 1200px) {
|
|
133
|
+
}
|
|
134
|
+
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
<div id="Notfound">
|
|
2
|
+
<div class="notfound-con">
|
|
3
|
+
<i class="far fa-frown notfound-icon"></i>
|
|
4
|
+
<div class="notfound">404</div>
|
|
5
|
+
<div class="notfound-text">{{l("Text")}}</div>
|
|
6
|
+
<div class="notfound-btn">
|
|
7
|
+
<lib-form-button [inp]="back"></lib-form-button>
|
|
8
|
+
</div>
|
|
9
|
+
</div>
|
|
10
|
+
</div>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import {Component} from '@angular/core';
|
|
2
|
+
import {PsToolkitUiConfigService} from '../../services/config.service';
|
|
3
|
+
import {LangClass} from '../../classes/lang.class';
|
|
4
|
+
import {InputClass} from '../../classes/form.class';
|
|
5
|
+
import {InputType} from '../../classes/enum.class';
|
|
6
|
+
|
|
7
|
+
@Component({
|
|
8
|
+
selector: 'lib-notfound',
|
|
9
|
+
templateUrl: './notfound.component.html',
|
|
10
|
+
styleUrls: ['./notfound.component.css']
|
|
11
|
+
})
|
|
12
|
+
export class NotfoundComponent{
|
|
13
|
+
back: InputClass;
|
|
14
|
+
l: (k, v?) => string;
|
|
15
|
+
constructor(public config: PsToolkitUiConfigService){
|
|
16
|
+
const lang = new LangClass(config.currentLang, config.strings);
|
|
17
|
+
this.l = (key: string, v = null): string => {
|
|
18
|
+
return lang.get('Public', 'Notfound', key, v);
|
|
19
|
+
};
|
|
20
|
+
this.back = new InputClass(config.environment, this.l, 'Back', 'fa-duotone fa-arrow-right', InputType.Button, '');
|
|
21
|
+
this.back.onClick = () => {
|
|
22
|
+
window.history.back();
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
#Notifications {
|
|
2
|
+
position: fixed;
|
|
3
|
+
bottom: 20px;
|
|
4
|
+
right: 0;
|
|
5
|
+
width: 350px;
|
|
6
|
+
z-index: 9999;
|
|
7
|
+
}
|
|
8
|
+
::ng-deep #Notifications .con{
|
|
9
|
+
float: right;
|
|
10
|
+
width: calc(100% - 40px);
|
|
11
|
+
padding: 5px 20px;
|
|
12
|
+
}
|
|
13
|
+
::ng-deep #Notifications .item{
|
|
14
|
+
float: right;
|
|
15
|
+
width: 100%;
|
|
16
|
+
background-color: var(--red);
|
|
17
|
+
position: relative;
|
|
18
|
+
color: white;
|
|
19
|
+
text-align: center;
|
|
20
|
+
border-radius: 5px;
|
|
21
|
+
box-shadow: var(--box-shadow);
|
|
22
|
+
}
|
|
23
|
+
::ng-deep #Notifications .item.success{
|
|
24
|
+
background-color: var(--green);
|
|
25
|
+
}
|
|
26
|
+
::ng-deep #Notifications .item i{
|
|
27
|
+
float: right;
|
|
28
|
+
width: 30px;
|
|
29
|
+
height: 30px;
|
|
30
|
+
line-height: 30px;
|
|
31
|
+
cursor: pointer;
|
|
32
|
+
}
|
|
33
|
+
::ng-deep #Notifications .item i:hover{
|
|
34
|
+
background-color: var(--red-dark);
|
|
35
|
+
}
|
|
36
|
+
::ng-deep #Notifications .item.success i:hover{
|
|
37
|
+
background-color: var(--green-dark);
|
|
38
|
+
}
|
|
39
|
+
::ng-deep #Notifications .item div{
|
|
40
|
+
float: right;
|
|
41
|
+
width: calc(100% - 30px);
|
|
42
|
+
line-height: 20px;
|
|
43
|
+
font-size: 12px;
|
|
44
|
+
padding: 10px;
|
|
45
|
+
}
|
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
.user-sidebar-item {
|
|
2
|
+
float: left;
|
|
3
|
+
width: 100%;
|
|
4
|
+
text-align: center;
|
|
5
|
+
position: relative;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.user-sidebar-item .content {
|
|
9
|
+
float: right;
|
|
10
|
+
width: 260px;
|
|
11
|
+
cursor: pointer;
|
|
12
|
+
position: relative;
|
|
13
|
+
-moz-transition: all 0.3s;
|
|
14
|
+
-webkit-transition: all 0.3s;
|
|
15
|
+
transition: all 0.3s;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.user-sidebar-item .dot {
|
|
19
|
+
background-color: var(--base);
|
|
20
|
+
width: 10px;
|
|
21
|
+
height: 10px;
|
|
22
|
+
border-radius: 50%;
|
|
23
|
+
border: 2px solid #eeeeee66;
|
|
24
|
+
position: absolute;
|
|
25
|
+
top: 15px;
|
|
26
|
+
right: -15px;
|
|
27
|
+
z-index: 2;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.user-sidebar-item .dot.active {
|
|
31
|
+
background-color: var(--base-11);
|
|
32
|
+
border: 2px solid var(--base-11);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.user-sidebar-item.parent-active > .dot.parent {
|
|
36
|
+
background-color: #eeeeee66;
|
|
37
|
+
border: none;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.user-sidebar-item .dot.back {
|
|
41
|
+
background-color: var(--base);
|
|
42
|
+
border: none;
|
|
43
|
+
z-index: 1;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.user-sidebar-item .children {
|
|
47
|
+
float: left;
|
|
48
|
+
width: 100%;
|
|
49
|
+
position: relative;
|
|
50
|
+
display: none;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.user-sidebar-item .children .items {
|
|
54
|
+
float: left;
|
|
55
|
+
width: 100%;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.user-sidebar-item .children .line {
|
|
59
|
+
width: 1px;
|
|
60
|
+
background-color: #eeeeee66;
|
|
61
|
+
top: 0;
|
|
62
|
+
left: calc(85% + 10px);
|
|
63
|
+
height: calc(100% - 20px);
|
|
64
|
+
position: absolute;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.user-sidebar-item .content .title {
|
|
68
|
+
float: right;
|
|
69
|
+
width: 0;
|
|
70
|
+
height: 45px;
|
|
71
|
+
line-height: 45px;
|
|
72
|
+
font-size: 12px;
|
|
73
|
+
color: #ffffffcc;
|
|
74
|
+
font-family: VazirLight;
|
|
75
|
+
overflow: hidden;
|
|
76
|
+
-moz-transition: all 0.3s;
|
|
77
|
+
-webkit-transition: all 0.3s;
|
|
78
|
+
transition: all 0.3s;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.user-sidebar-item .content .icon {
|
|
82
|
+
float: right;
|
|
83
|
+
width: 78px;
|
|
84
|
+
height: 45px;
|
|
85
|
+
line-height: 45px;
|
|
86
|
+
font-size: 18px;
|
|
87
|
+
color: #ffffffaa;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.user-sidebar-item .content .arrow {
|
|
91
|
+
position: absolute;
|
|
92
|
+
width: 40px;
|
|
93
|
+
opacity: 0;
|
|
94
|
+
height: 45px;
|
|
95
|
+
left: 0;
|
|
96
|
+
top: 0;
|
|
97
|
+
line-height: 45px;
|
|
98
|
+
font-size: 13px;
|
|
99
|
+
color: #ffffffcc;
|
|
100
|
+
overflow: hidden;
|
|
101
|
+
-moz-transition: all 0.3s;
|
|
102
|
+
-webkit-transition: all 0.3s;
|
|
103
|
+
transition: all 0.3s;
|
|
104
|
+
}
|
|
105
|
+
::ng-deep #Layout .panel.open-sidebar .sidebar .user-sidebar-item .content .arrow{
|
|
106
|
+
opacity: 1;
|
|
107
|
+
}
|
|
108
|
+
::ng-deep #Layout .panel.open-sidebar .sidebar .user-sidebar-item .content .title{
|
|
109
|
+
width: calc(100% - 110px);
|
|
110
|
+
}
|
|
111
|
+
::ng-deep #Layout .panel.close-sidebar .sidebar .user-sidebar-item .content{
|
|
112
|
+
padding: 0!important;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.user-sidebar-item.open .content .arrow {
|
|
116
|
+
-webkit-transform: rotate(-90deg);
|
|
117
|
+
-moz-transform: rotate(-90deg);
|
|
118
|
+
-o-transform: rotate(-90deg);
|
|
119
|
+
-ms-transform: rotate(-90deg);
|
|
120
|
+
transform: rotate(-90deg);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.user-sidebar-item > .children .content .icon{
|
|
124
|
+
font-size: 11px;
|
|
125
|
+
}
|
|
126
|
+
.user-sidebar-item.parent-active > .content, .user-sidebar-item:hover > .content {
|
|
127
|
+
background-color: var(--base-dark);
|
|
128
|
+
}
|
|
129
|
+
.user-sidebar-item.parent-active > .content .title, .user-sidebar-item:hover > .content .title{
|
|
130
|
+
color: #fff;
|
|
131
|
+
font-family: VazirBold;
|
|
132
|
+
}
|
|
133
|
+
.user-sidebar-item.parent-active > .content .icon, .user-sidebar-item:hover > .content .icon {
|
|
134
|
+
color: var(--comp);
|
|
135
|
+
}
|
|
136
|
+
.user-sidebar-item.parent-active > .content .arrow, .user-sidebar-item:hover > .content .arrow {
|
|
137
|
+
color: #fff;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
.user-sidebar-item.parent-active > .children {
|
|
142
|
+
display: block;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
@media (max-width: 399.98px) {
|
|
146
|
+
.user-sidebar-item .content .title {
|
|
147
|
+
width: calc(100% - 30px);
|
|
148
|
+
font-size: 11px;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
.user-sidebar-item .content .icon {
|
|
152
|
+
width: 30px;
|
|
153
|
+
font-size: 13px;
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
@media (min-width: 400px) and (max-width: 499.98px) {
|
|
158
|
+
.user-sidebar-item .content .title {
|
|
159
|
+
width: calc(100% - 30px);
|
|
160
|
+
font-size: 11px;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
.user-sidebar-item .content .icon {
|
|
164
|
+
width: 30px;
|
|
165
|
+
font-size: 13px;
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
@media (min-width: 500px) and (max-width: 599.98px) {
|
|
170
|
+
.user-sidebar-item .content .title {
|
|
171
|
+
width: calc(100% - 30px);
|
|
172
|
+
font-size: 11px;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
.user-sidebar-item .content .icon {
|
|
176
|
+
width: 30px;
|
|
177
|
+
font-size: 13px;
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
@media (min-width: 600px) and (max-width: 699.98px) {
|
|
182
|
+
.user-sidebar-item .content .title {
|
|
183
|
+
width: calc(100% - 30px);
|
|
184
|
+
font-size: 11px;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
.user-sidebar-item .content .icon {
|
|
188
|
+
width: 30px;
|
|
189
|
+
font-size: 13px;
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
@media (min-width: 700px) and (max-width: 799.98px) {
|
|
194
|
+
.user-sidebar-item .content .title {
|
|
195
|
+
width: calc(100% - 30px);
|
|
196
|
+
font-size: 11px;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
.user-sidebar-item .content .icon {
|
|
200
|
+
width: 30px;
|
|
201
|
+
font-size: 13px;
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
@media (min-width: 800px) and (max-width: 899.98px) {
|
|
206
|
+
.user-sidebar-item .content .title {
|
|
207
|
+
width: calc(100% - 30px);
|
|
208
|
+
font-size: 11px;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
.user-sidebar-item .content .icon {
|
|
212
|
+
width: 30px;
|
|
213
|
+
font-size: 13px;
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
@media (min-width: 900px) and (max-width: 999.98px) {
|
|
218
|
+
.user-sidebar-item .content .title {
|
|
219
|
+
width: calc(100% - 30px);
|
|
220
|
+
font-size: 11px;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
.user-sidebar-item .content .icon {
|
|
224
|
+
width: 30px;
|
|
225
|
+
font-size: 13px;
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
@media (min-width: 1000px) and (max-width: 1099.98px) {
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
@media (min-width: 1100px) and (max-width: 1199.98px) {
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
@media (min-width: 1200px) {
|
|
236
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<div [className]="(isActive(item) ? 'parent-active open ' : '') + 'user-sidebar-item'">
|
|
2
|
+
<a [style]="{paddingRight: (i * 25) + 'px'}" *ngIf="item.children.length == 0" [className]="(currentSidebar && item.name == currentSidebar.name ? 'active ' : '') + 'content'" [routerLink]="(area ? '/' + area : '') + '/' + (item.controller == 'Dashboard' ? '' : (item.controller + (item.action ? '/' + item.action : '')))">
|
|
3
|
+
<i [className]="item.icon + ' icon'"></i>
|
|
4
|
+
<div class="title">{{ l(item.name) }}</div>
|
|
5
|
+
</a>
|
|
6
|
+
<div [style]="{paddingRight: (i * 25) + 'px'}" *ngIf="item.children.length > 0" (click)="openClose($event)" class="content parent">
|
|
7
|
+
<i [className]="item.icon + ' icon'"></i>
|
|
8
|
+
<div class="title">{{ l(item.name) }}</div>
|
|
9
|
+
<i [className]="'fa-duotone fa-angle-left arrow'"></i>
|
|
10
|
+
</div>
|
|
11
|
+
<div *ngIf="item.children.length > 0" class="children">
|
|
12
|
+
<div class="items">
|
|
13
|
+
<lib-sidebar-item [i]="i + 1" [item]="child" [currentSidebar]="currentSidebar" [area]="area" *ngFor="let child of item.children"></lib-sidebar-item>
|
|
14
|
+
</div>
|
|
15
|
+
</div>
|
|
16
|
+
</div>
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import {Component, Input} from '@angular/core';
|
|
2
|
+
import * as $ from 'jquery';
|
|
3
|
+
import {SidebarClass} from '../../../classes/sidebar.class';
|
|
4
|
+
import {LangClass} from '../../../classes/lang.class';
|
|
5
|
+
import {PsToolkitUiConfigService} from '../../../services/config.service';
|
|
6
|
+
import {strings} from '../../../classes/string.class';
|
|
7
|
+
|
|
8
|
+
@Component({
|
|
9
|
+
selector: 'lib-sidebar-item',
|
|
10
|
+
templateUrl: './sidebar.item.component.html',
|
|
11
|
+
styleUrls: ['./sidebar.item.component.css']
|
|
12
|
+
})
|
|
13
|
+
export class SidebarItemComponent {
|
|
14
|
+
@Input()
|
|
15
|
+
item: SidebarClass;
|
|
16
|
+
@Input()
|
|
17
|
+
i: number;
|
|
18
|
+
@Input()
|
|
19
|
+
base: boolean;
|
|
20
|
+
@Input()
|
|
21
|
+
currentSidebar;
|
|
22
|
+
@Input()
|
|
23
|
+
area: string;
|
|
24
|
+
l: (k, v?) => string;
|
|
25
|
+
constructor(public config: PsToolkitUiConfigService){
|
|
26
|
+
const lang = new LangClass(config.currentLang, config.strings);
|
|
27
|
+
this.l = (key: string, v = null): string => {
|
|
28
|
+
return lang.get('Public', 'Sidebar', key, v);
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
openClose(e): void{
|
|
33
|
+
const op = $(e.target).closest('.user-sidebar-item');
|
|
34
|
+
if (op.hasClass('open')){
|
|
35
|
+
op.removeClass('open');
|
|
36
|
+
op.find(' > .children').slideUp();
|
|
37
|
+
}else{
|
|
38
|
+
op.addClass('open');
|
|
39
|
+
op.find(' > .children').slideDown();
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
isActive(item: SidebarClass): boolean{
|
|
44
|
+
if (item.children.length === 0){
|
|
45
|
+
return this.currentSidebar && item.name === this.currentSidebar.name;
|
|
46
|
+
}
|
|
47
|
+
for (const c of item.children){
|
|
48
|
+
if (this.isActive(c)){
|
|
49
|
+
return true;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
return false;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
#Sidebar{
|
|
2
|
+
float: right;
|
|
3
|
+
width: 100%;
|
|
4
|
+
}
|
|
5
|
+
#Sidebar .sidebar-con{
|
|
6
|
+
float: right;
|
|
7
|
+
width: 100%;
|
|
8
|
+
height: calc(100vh - 85px);
|
|
9
|
+
overflow-y: auto;
|
|
10
|
+
overflow-x: hidden;
|
|
11
|
+
direction: rtl;
|
|
12
|
+
}
|
|
13
|
+
#Sidebar .toggle-con{
|
|
14
|
+
float: right;
|
|
15
|
+
width: 100%;
|
|
16
|
+
height: 50px;
|
|
17
|
+
background-color: var(--base-dark);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
#Sidebar .toggle-con .toggle{
|
|
21
|
+
float: left;
|
|
22
|
+
text-align: center;
|
|
23
|
+
width: 78px;
|
|
24
|
+
height: 50px;
|
|
25
|
+
line-height: 50px;
|
|
26
|
+
color: #ffffffcc;
|
|
27
|
+
font-size: 18px;
|
|
28
|
+
cursor: pointer;
|
|
29
|
+
-moz-transition: all 0.3s;
|
|
30
|
+
-webkit-transition: all 0.3s;
|
|
31
|
+
transition: all 0.3s;
|
|
32
|
+
}
|
|
33
|
+
::ng-deep #Layout .panel.close-sidebar .sidebar .toggle-con .toggle{
|
|
34
|
+
-webkit-transform: scaleX(-1);
|
|
35
|
+
-moz-transform: scaleX(-1);
|
|
36
|
+
-o-transform: scaleX(-1);
|
|
37
|
+
-ms-transform: scaleX(-1);
|
|
38
|
+
transform: scaleX(-1);
|
|
39
|
+
}
|
|
40
|
+
#Sidebar .toggle-con .toggle:hover{
|
|
41
|
+
color: white;
|
|
42
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
<div id="Sidebar">
|
|
2
|
+
<div class="toggle-con">
|
|
3
|
+
<i (click)="toggleSidebar.emit()" class="toggle fa-duotone fa-angle-double-right"></i>
|
|
4
|
+
</div>
|
|
5
|
+
<div class="sidebar-con" id="sidebar-con">
|
|
6
|
+
<span *ngFor="let item of sidebar">
|
|
7
|
+
<lib-sidebar-item [i]="0" [item]="item" [base]="true" [currentSidebar]="currentSidebar" [area]="area"></lib-sidebar-item>
|
|
8
|
+
</span>
|
|
9
|
+
</div>
|
|
10
|
+
</div>
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import {Component, EventEmitter, Input, OnInit, Output} from '@angular/core';
|
|
2
|
+
import {PsToolkitUiConfigService} from '../../services/config.service';
|
|
3
|
+
import {LangClass} from '../../classes/lang.class';
|
|
4
|
+
import {SidebarClass} from '../../classes/sidebar.class';
|
|
5
|
+
import {NavigationEnd, Router} from '@angular/router';
|
|
6
|
+
import {HelperClass} from '../../classes/helper.class';
|
|
7
|
+
import {PermissionTypeEnum} from '../../classes/enum.class';
|
|
8
|
+
|
|
9
|
+
@Component({
|
|
10
|
+
selector: 'lib-sidebar',
|
|
11
|
+
templateUrl: './sidebar.component.html',
|
|
12
|
+
styleUrls: ['./sidebar.component.css']
|
|
13
|
+
})
|
|
14
|
+
export class SidebarComponent implements OnInit{
|
|
15
|
+
@Input()
|
|
16
|
+
permissions: any[] = [];
|
|
17
|
+
@Input()
|
|
18
|
+
area: string;
|
|
19
|
+
@Output()
|
|
20
|
+
toggleSidebar = new EventEmitter<string>();
|
|
21
|
+
sidebar: SidebarClass[] = [];
|
|
22
|
+
currentSidebar;
|
|
23
|
+
l: (k, v?) => string;
|
|
24
|
+
constructor(public config: PsToolkitUiConfigService, private router: Router){
|
|
25
|
+
const lang = new LangClass(config.currentLang, config.strings);
|
|
26
|
+
this.l = (key: string, v = null): string => {
|
|
27
|
+
return lang.get('Public', 'Sidebar', key, v);
|
|
28
|
+
};
|
|
29
|
+
router.events.subscribe(event => {
|
|
30
|
+
if (event instanceof NavigationEnd) {
|
|
31
|
+
this.setActive();
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
setActive(): void{
|
|
36
|
+
const active = HelperClass.getData('active', this.router.routerState, this.router.routerState.root)[0];
|
|
37
|
+
this.currentSidebar = this.getSidebarActive(this.sidebar, active);
|
|
38
|
+
}
|
|
39
|
+
ngOnInit(): void {
|
|
40
|
+
this.sidebar = this.getSidebar();
|
|
41
|
+
this.setActive();
|
|
42
|
+
}
|
|
43
|
+
getSidebar(parentId: string = null): SidebarClass[]{
|
|
44
|
+
return this.permissions.filter(x => x.Type === PermissionTypeEnum.Item && x.ParentId === parentId).map((s) => {
|
|
45
|
+
return new SidebarClass(this.l, s.Name, s.Controller, s.Action, s.Icon, this.getSidebar(s.Id));
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
getSidebarActive(item: SidebarClass[], active): SidebarClass{
|
|
49
|
+
for (const i of item){
|
|
50
|
+
if (i.controller + (i.action ? i.action : '') === active){
|
|
51
|
+
return i;
|
|
52
|
+
}
|
|
53
|
+
const ca = this.getSidebarActive(i.children, active);
|
|
54
|
+
if (ca){
|
|
55
|
+
return ca;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
return null;
|
|
59
|
+
}
|
|
60
|
+
}
|