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
package/karma.conf.js
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
// Karma configuration file, see link for more information
|
|
2
|
+
// https://karma-runner.github.io/1.0/config/configuration-file.html
|
|
3
|
+
|
|
4
|
+
module.exports = function (config) {
|
|
5
|
+
config.set({
|
|
6
|
+
basePath: '',
|
|
7
|
+
frameworks: ['jasmine', '@angular-devkit/build-angular'],
|
|
8
|
+
plugins: [
|
|
9
|
+
require('karma-jasmine'),
|
|
10
|
+
require('karma-chrome-launcher'),
|
|
11
|
+
require('karma-jasmine-html-reporter'),
|
|
12
|
+
require('karma-coverage-istanbul-reporter'),
|
|
13
|
+
require('@angular-devkit/build-angular/plugins/karma')
|
|
14
|
+
],
|
|
15
|
+
client: {
|
|
16
|
+
clearContext: false // leave Jasmine Spec Runner output visible in browser
|
|
17
|
+
},
|
|
18
|
+
coverageIstanbulReporter: {
|
|
19
|
+
dir: require('path').join(__dirname, '../../coverage/ps-toolkit-ui'),
|
|
20
|
+
reports: ['html', 'lcovonly', 'text-summary'],
|
|
21
|
+
fixWebpackSourcePaths: true
|
|
22
|
+
},
|
|
23
|
+
reporters: ['progress', 'kjhtml'],
|
|
24
|
+
port: 9876,
|
|
25
|
+
colors: true,
|
|
26
|
+
logLevel: config.LOG_INFO,
|
|
27
|
+
autoWatch: true,
|
|
28
|
+
browsers: ['Chrome'],
|
|
29
|
+
singleRun: false,
|
|
30
|
+
restartOnFileChange: true
|
|
31
|
+
});
|
|
32
|
+
};
|
package/ng-package.json
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "../../node_modules/ng-packagr/ng-package.schema.json",
|
|
3
|
+
"dest": "../../dist/ps-toolkit-ui",
|
|
4
|
+
"lib": {
|
|
5
|
+
"entryFile": "src/public-api.ts"
|
|
6
|
+
},
|
|
7
|
+
"whitelistedNonPeerDependencies": [
|
|
8
|
+
"jalali-moment",
|
|
9
|
+
"jquery",
|
|
10
|
+
"lodash",
|
|
11
|
+
"highcharts"
|
|
12
|
+
],
|
|
13
|
+
"assets": [
|
|
14
|
+
"src/assets"
|
|
15
|
+
]
|
|
16
|
+
}
|
package/package.json
CHANGED
|
@@ -1,22 +1,19 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "ps-toolkit-ui",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"peerDependencies": {
|
|
5
|
-
"@angular/common": "^10.1.6",
|
|
6
|
-
"@angular/core": "^10.1.6"
|
|
7
|
-
},
|
|
8
|
-
"dependencies": {
|
|
9
|
-
"
|
|
10
|
-
"
|
|
11
|
-
"
|
|
12
|
-
"
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
"
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
"metadata": "ps-toolkit-ui.metadata.json",
|
|
21
|
-
"sideEffects": false
|
|
22
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "ps-toolkit-ui",
|
|
3
|
+
"version": "0.0.211",
|
|
4
|
+
"peerDependencies": {
|
|
5
|
+
"@angular/common": "^10.1.6",
|
|
6
|
+
"@angular/core": "^10.1.6"
|
|
7
|
+
},
|
|
8
|
+
"dependencies": {
|
|
9
|
+
"highcharts": "^9.3.3",
|
|
10
|
+
"jalali-moment": "^3.3.10",
|
|
11
|
+
"jquery": "^3.5.1",
|
|
12
|
+
"lodash": "^4.17.21",
|
|
13
|
+
"tslib": "^2.0.0"
|
|
14
|
+
},
|
|
15
|
+
"devDependencies": {
|
|
16
|
+
"@types/jquery": "^3.5.8",
|
|
17
|
+
"@types/lodash": "^4.14.176"
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import * as Highcharts from 'highcharts';
|
|
2
|
+
export class ChartClass {
|
|
3
|
+
constructor(l: (k, v?) => string, name: string) {
|
|
4
|
+
this.l = l;
|
|
5
|
+
this.name = name;
|
|
6
|
+
}
|
|
7
|
+
l: (k, v?) => string;
|
|
8
|
+
name: string;
|
|
9
|
+
style = {};
|
|
10
|
+
loading = false;
|
|
11
|
+
options = {};
|
|
12
|
+
setChart(cOpt, categories = []): void{
|
|
13
|
+
const date = this.l('Date');
|
|
14
|
+
const min = Math.min(...[].concat.apply([], cOpt.series.map(o => o.data)));
|
|
15
|
+
const th = this;
|
|
16
|
+
const opt = {
|
|
17
|
+
chart: {
|
|
18
|
+
type: 'line',
|
|
19
|
+
spacing: [30, 30, 30, 30]
|
|
20
|
+
},
|
|
21
|
+
title: {text: null},
|
|
22
|
+
credits: {enabled: false},
|
|
23
|
+
yAxis: {
|
|
24
|
+
visible: true, reverse: true, min, title: {text: null},
|
|
25
|
+
labels: {
|
|
26
|
+
useHTML: true,
|
|
27
|
+
style: {
|
|
28
|
+
fontFamily: 'VazirBold',
|
|
29
|
+
direction: 'rtl',
|
|
30
|
+
textAlign: 'center'
|
|
31
|
+
},
|
|
32
|
+
formatter(): string{
|
|
33
|
+
return cOpt.unit ? cOpt.unit.replace('{}', this.value.toLocaleString()) : this.value.toLocaleString();
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
plotOptions: {
|
|
38
|
+
line: {
|
|
39
|
+
marker: {
|
|
40
|
+
enabled: false
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
xAxis: {
|
|
45
|
+
categories,
|
|
46
|
+
reversed: true,
|
|
47
|
+
labels: {
|
|
48
|
+
useHTML: true,
|
|
49
|
+
style: {
|
|
50
|
+
fontFamily: 'VazirBold',
|
|
51
|
+
direction: 'rtl',
|
|
52
|
+
textAlign: 'center'
|
|
53
|
+
},
|
|
54
|
+
step: Math.floor(categories.length / 5),
|
|
55
|
+
formatter(): string{
|
|
56
|
+
return this.value.split(' ')[0];
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
legend: {
|
|
61
|
+
useHTML: true,
|
|
62
|
+
rtl: true,
|
|
63
|
+
itemMarginRight: 50,
|
|
64
|
+
itemMarginLeft: 50,
|
|
65
|
+
itemStyle: {
|
|
66
|
+
fontFamily: 'VazirBold',
|
|
67
|
+
direction: 'rtl'
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
tooltip: {
|
|
71
|
+
shared: true,
|
|
72
|
+
crosshairs: true,
|
|
73
|
+
useHTML: true,
|
|
74
|
+
style: {
|
|
75
|
+
fontFamily: 'VazirBold',
|
|
76
|
+
direction: 'rtl',
|
|
77
|
+
textAlign: 'center'
|
|
78
|
+
},
|
|
79
|
+
formatter(): string{
|
|
80
|
+
let s = '<div>' + date + ' : ' + this.x + '</br>';
|
|
81
|
+
for (const p of this.points.filter(x => x.y !== 0)){
|
|
82
|
+
const symbol = th.getSymbol(p);
|
|
83
|
+
s += (symbol ? symbol : '') + '<span class="rtl d-ib">' + (cOpt.showName ?
|
|
84
|
+
'<span style="' + (symbol ? '' : 'color: ' + p.color) + '" class="m-l-5">' +
|
|
85
|
+
p.series.name + '</span> ' : '') +
|
|
86
|
+
'<span style="' + (cOpt.showName ? '' : 'color: ' + p.color) + '">'
|
|
87
|
+
+ (cOpt.unit ? cOpt.unit.replace('{}', p.y.toLocaleString()) : p.y.toLocaleString()) + '</span>' + '</span></br>';
|
|
88
|
+
}
|
|
89
|
+
s += '</div>';
|
|
90
|
+
return s;
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
|
|
94
|
+
series: []
|
|
95
|
+
};
|
|
96
|
+
this.options = this.merge(opt, cOpt);
|
|
97
|
+
Highcharts.chart(this.name + 'Chart', this.options);
|
|
98
|
+
}
|
|
99
|
+
getSymbol(point): string{
|
|
100
|
+
let marker = null;
|
|
101
|
+
if ( point.point.graphic && point.point.graphic.symbolName ) {
|
|
102
|
+
switch ( point.point.graphic.symbolName ) {
|
|
103
|
+
case 'circle':
|
|
104
|
+
marker = '●';
|
|
105
|
+
break;
|
|
106
|
+
case 'diamond':
|
|
107
|
+
marker = '♦';
|
|
108
|
+
break;
|
|
109
|
+
case 'square':
|
|
110
|
+
marker = '■';
|
|
111
|
+
break;
|
|
112
|
+
case 'triangle':
|
|
113
|
+
marker = '▲';
|
|
114
|
+
break;
|
|
115
|
+
case 'triangle-down':
|
|
116
|
+
marker = '▼';
|
|
117
|
+
break;
|
|
118
|
+
default:
|
|
119
|
+
marker = '●';
|
|
120
|
+
break;
|
|
121
|
+
}
|
|
122
|
+
return '<span style="margin-left: 10px; color: ' + point.color + '">' + marker + '</span>';
|
|
123
|
+
}
|
|
124
|
+
return marker;
|
|
125
|
+
}
|
|
126
|
+
merge(b, c): any{
|
|
127
|
+
for (const k of Object.keys(c)){
|
|
128
|
+
if (Object.keys(b).includes(k)){
|
|
129
|
+
if (c[k] != null && c[k].constructor === Object){
|
|
130
|
+
b[k] = this.merge(b[k], c[k]);
|
|
131
|
+
}else{
|
|
132
|
+
b[k] = c[k];
|
|
133
|
+
}
|
|
134
|
+
}else{
|
|
135
|
+
b[k] = c[k];
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
return b;
|
|
139
|
+
}
|
|
140
|
+
}
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
// @dynamic
|
|
2
|
+
export class EnumUtils {
|
|
3
|
+
static getValues(enumObj: any): any[] {
|
|
4
|
+
return EnumUtils.getKeys(enumObj).map(value => enumObj[value]);
|
|
5
|
+
}
|
|
6
|
+
static getKeyByValue(enumObj: any, v): any[] {
|
|
7
|
+
return this.getKeys(enumObj).find(key => enumObj[key] === v);
|
|
8
|
+
}
|
|
9
|
+
static getKeys(enumObj: any): any[] {
|
|
10
|
+
return Object.keys(enumObj).filter(key => typeof enumObj[key] === 'number');
|
|
11
|
+
}
|
|
12
|
+
static getKeysAndValues(enumObj: any): any[] {
|
|
13
|
+
return this.getKeys(enumObj).map(key => {
|
|
14
|
+
return {
|
|
15
|
+
key, value: enumObj[key]
|
|
16
|
+
};
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export enum InputError {
|
|
22
|
+
Required = 'Required',
|
|
23
|
+
Invalid = 'Invalid',
|
|
24
|
+
Length = 'Length',
|
|
25
|
+
MinLength = 'MinLength',
|
|
26
|
+
MaxLength = 'MaxLength',
|
|
27
|
+
MinAmount = 'MinAmount',
|
|
28
|
+
MaxAmount = 'MaxAmount',
|
|
29
|
+
Expired = 'Expired',
|
|
30
|
+
Error = 'Error',
|
|
31
|
+
NotMatch = 'NotMatch',
|
|
32
|
+
NotAllowed = 'NotAllowed',
|
|
33
|
+
MaxContent = 'MaxContent',
|
|
34
|
+
Exist = 'Exist',
|
|
35
|
+
NotExist = 'NotExist',
|
|
36
|
+
Wrong = 'Wrong',
|
|
37
|
+
Upload = 'Upload',
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export enum InputType {
|
|
41
|
+
Text,
|
|
42
|
+
Password,
|
|
43
|
+
Mobile,
|
|
44
|
+
Phone,
|
|
45
|
+
Email,
|
|
46
|
+
NationalCode,
|
|
47
|
+
PostalCode,
|
|
48
|
+
Sheba,
|
|
49
|
+
Number,
|
|
50
|
+
Select,
|
|
51
|
+
SelectSearch,
|
|
52
|
+
SelectAutoComplete,
|
|
53
|
+
Date,
|
|
54
|
+
Time,
|
|
55
|
+
DateTime,
|
|
56
|
+
Check,
|
|
57
|
+
TextArea,
|
|
58
|
+
Label,
|
|
59
|
+
Button,
|
|
60
|
+
Submit,
|
|
61
|
+
Icon,
|
|
62
|
+
File,
|
|
63
|
+
Url,
|
|
64
|
+
Price,
|
|
65
|
+
Radio,
|
|
66
|
+
Tree,
|
|
67
|
+
Plaque,
|
|
68
|
+
PlaqueM,
|
|
69
|
+
SelectAutoCompletePlaque,
|
|
70
|
+
SelectAutoCompletePlaqueM,
|
|
71
|
+
BankCard,
|
|
72
|
+
Constant,
|
|
73
|
+
Hidden,
|
|
74
|
+
Table,
|
|
75
|
+
CarSearch,
|
|
76
|
+
Car,
|
|
77
|
+
Finger,
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export enum OperationEnum
|
|
81
|
+
{
|
|
82
|
+
All = -1,
|
|
83
|
+
Insert = 1,
|
|
84
|
+
Update = 2,
|
|
85
|
+
Delete = 3,
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export enum Method {
|
|
89
|
+
Get,
|
|
90
|
+
Post,
|
|
91
|
+
Delete,
|
|
92
|
+
Put,
|
|
93
|
+
Options,
|
|
94
|
+
Patch,
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
export enum TableCollType {
|
|
98
|
+
Text,
|
|
99
|
+
Date,
|
|
100
|
+
Time,
|
|
101
|
+
DateTime,
|
|
102
|
+
DateDif,
|
|
103
|
+
DateRemain,
|
|
104
|
+
Url,
|
|
105
|
+
Image,
|
|
106
|
+
Function,
|
|
107
|
+
Price,
|
|
108
|
+
Plaque,
|
|
109
|
+
PlaqueText,
|
|
110
|
+
FileSize,
|
|
111
|
+
Bool,
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
export enum UserType {
|
|
115
|
+
All = 0,
|
|
116
|
+
Admin = 1,
|
|
117
|
+
User = 2
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
export enum StatusEnum
|
|
121
|
+
{
|
|
122
|
+
All = -1,
|
|
123
|
+
Active = 0,
|
|
124
|
+
DeActive = 1,
|
|
125
|
+
Delete = 2,
|
|
126
|
+
Report = 3,
|
|
127
|
+
}
|
|
128
|
+
export enum PaymentStatusEnum
|
|
129
|
+
{
|
|
130
|
+
All = 0,
|
|
131
|
+
Success = 100,
|
|
132
|
+
NOK = 102,
|
|
133
|
+
Request = 103,
|
|
134
|
+
Notfound = 104,
|
|
135
|
+
NotRequest = 105,
|
|
136
|
+
NotfoundPackage = 106
|
|
137
|
+
}
|
|
138
|
+
export enum ResultStatusEnum
|
|
139
|
+
{
|
|
140
|
+
Failed = 0,
|
|
141
|
+
Success = 1,
|
|
142
|
+
Unauthorized = 2,
|
|
143
|
+
NotAccess = 3
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
export enum PermissionTypeEnum
|
|
147
|
+
{
|
|
148
|
+
Form = -1,
|
|
149
|
+
Item = 0,
|
|
150
|
+
Access = 1,
|
|
151
|
+
Option = 2,
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
export enum PermissionAccessTypeEnum
|
|
155
|
+
{
|
|
156
|
+
List = 1,
|
|
157
|
+
Insert = 2,
|
|
158
|
+
Update = 3,
|
|
159
|
+
Delete = 4,
|
|
160
|
+
Print = 5,
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
export enum PermissionInputActionEnum
|
|
164
|
+
{
|
|
165
|
+
None = 0,
|
|
166
|
+
OnClick = 1,
|
|
167
|
+
Link = 2,
|
|
168
|
+
LinkNewTab = 3,
|
|
169
|
+
File = 4,
|
|
170
|
+
Modal = 5,
|
|
171
|
+
Confirm = 6
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
export enum PermissionInputTypeEnum
|
|
175
|
+
{
|
|
176
|
+
Icon = 0,
|
|
177
|
+
Button = 1,
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
export enum VehicleType
|
|
181
|
+
{
|
|
182
|
+
Car = 1,
|
|
183
|
+
Motorcycle = 2,
|
|
184
|
+
Airplane = 3,
|
|
185
|
+
Train = 4,
|
|
186
|
+
Ship = 5,
|
|
187
|
+
}
|
|
188
|
+
export enum TableOptionType
|
|
189
|
+
{
|
|
190
|
+
Hidden = 1,
|
|
191
|
+
Show = 2,
|
|
192
|
+
Group = 3,
|
|
193
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
// import * as FileSaver from 'file-saver';
|
|
2
|
+
// import * as XLSX from 'xlsx';
|
|
3
|
+
const EXCEL_TYPE = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=UTF-8';
|
|
4
|
+
const CSV_TYPE = 'data:text/csv;charset=UTF-8';
|
|
5
|
+
const EXCEL_EXTENSION = '.xlsx';
|
|
6
|
+
const CSV_EXTENSION = '.csv';
|
|
7
|
+
|
|
8
|
+
export class ExcelService {
|
|
9
|
+
constructor() { }
|
|
10
|
+
// public exportAsExcelFile(json: any[], excelFileName: string): void
|
|
11
|
+
// {
|
|
12
|
+
// const worksheet: XLSX.WorkSheet = XLSX.utils.json_to_sheet(json);
|
|
13
|
+
// const workbook: XLSX.WorkBook = {
|
|
14
|
+
// Sheets: { data: worksheet },
|
|
15
|
+
// SheetNames: ['data']
|
|
16
|
+
// };
|
|
17
|
+
// const excelBuffer: any = XLSX.write(workbook, { bookType: 'xlsx', type: 'array' });
|
|
18
|
+
// this.saveAsExcelFile(excelBuffer, excelFileName);
|
|
19
|
+
// }
|
|
20
|
+
// public getExcelData(json: any[], excelFileName: string): Blob
|
|
21
|
+
// {
|
|
22
|
+
// const worksheet: XLSX.WorkSheet = XLSX.utils.json_to_sheet(json);
|
|
23
|
+
// const workbook: XLSX.WorkBook = {
|
|
24
|
+
// Sheets: { data: worksheet },
|
|
25
|
+
// SheetNames: ['data']
|
|
26
|
+
// };
|
|
27
|
+
// const excelBuffer: any = XLSX.write(workbook, { bookType: 'xlsx', type: 'array' });
|
|
28
|
+
// return new Blob([excelBuffer], {type: EXCEL_TYPE});
|
|
29
|
+
// }
|
|
30
|
+
// private saveAsExcelFile(buffer: any, fileName: string): void {
|
|
31
|
+
// const data: Blob = new Blob([buffer], {type: EXCEL_TYPE});
|
|
32
|
+
// FileSaver.saveAs(data, fileName + new Date().getTime() + EXCEL_EXTENSION);
|
|
33
|
+
// }
|
|
34
|
+
// private saveAsCsvFile(buffer: any, fileName: string): void {
|
|
35
|
+
// const data: Blob = new Blob([buffer], {type: CSV_TYPE});
|
|
36
|
+
// FileSaver.saveAs(data, fileName + new Date().getTime() + CSV_EXTENSION);
|
|
37
|
+
// }
|
|
38
|
+
// public exportAsCsvFile(json: any[], fileName: string): void {
|
|
39
|
+
// const replacer = (key, value) => value === null ? '' : value; // specify how you want to handle null values here
|
|
40
|
+
// const header = Object.keys(json[0]);
|
|
41
|
+
// const csv = json.map(row => header.map(fieldName => JSON.stringify(row[fieldName], replacer)).join(','));
|
|
42
|
+
// csv.unshift(header.join(','));
|
|
43
|
+
// const csvArray = csv.join('\r\n');
|
|
44
|
+
// this.saveAsCsvFile('\uFEFF' + csvArray, fileName);
|
|
45
|
+
// }
|
|
46
|
+
}
|