nira-falcon 0.1.22 → 0.1.24
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/ng-package.json +7 -0
- package/package copy.json +13 -0
- package/package.json +13 -26
- package/src/assets/images/hub-dashboard-title-bg.png +0 -0
- package/src/assets/images/iran.png +0 -0
- package/src/environments/environment.ts +7 -0
- package/src/lib/core-auto-complete/core-auto-complete.component.html +30 -0
- package/src/lib/core-auto-complete/core-auto-complete.component.scss +89 -0
- package/src/lib/core-auto-complete/core-auto-complete.component.ts +92 -0
- package/src/lib/core-btn/core-btn-bluebird.component.html +21 -0
- package/src/lib/core-btn/core-btn-bluebird.component.scss +123 -0
- package/src/lib/core-btn/core-btn-falcon.component.html +20 -0
- package/src/lib/core-btn/core-btn-falcon.component.scss +115 -0
- package/src/lib/core-btn/core-btn.component.ts +54 -0
- package/src/lib/core-card/core-card.component.html +3 -0
- package/src/lib/core-card/core-card.component.scss +0 -0
- package/src/lib/core-card/core-card.component.ts +10 -0
- package/src/lib/core-checkbox/core-checkbox.component.html +9 -0
- package/src/lib/core-checkbox/core-checkbox.component.scss +60 -0
- package/src/lib/core-checkbox/core-checkbox.component.ts +19 -0
- package/src/lib/core-confirm-dialog/core-confirm-dialog.component.html +28 -0
- package/src/lib/core-confirm-dialog/core-confirm-dialog.component.scss +131 -0
- package/src/lib/core-confirm-dialog/core-confirm-dialog.component.ts +29 -0
- package/src/lib/core-date-picker/core-date-picker-bluebird.component.html +15 -0
- package/src/lib/core-date-picker/core-date-picker-bluebird.component.scss +0 -0
- package/src/lib/core-date-picker/core-date-picker-falcon.component.html +14 -0
- package/src/lib/core-date-picker/core-date-picker-falcon.component.scss +0 -0
- package/src/lib/core-date-picker/core-date-picker.component.ts +44 -0
- package/src/lib/core-input/core-input-bluebird.component.html +95 -0
- package/src/lib/core-input/core-input-bluebird.component.scss +152 -0
- package/src/lib/core-input/core-input-falcon.component.html +90 -0
- package/src/lib/core-input/core-input-falcon.component.scss +141 -0
- package/src/lib/core-input/core-input.component.ts +112 -0
- package/src/lib/core-multi-select/core-multi-select-row/core-multi-select-row.component.html +3 -0
- package/src/lib/core-multi-select/core-multi-select-row/core-multi-select-row.component.scss +15 -0
- package/src/lib/core-multi-select/core-multi-select-row/core-multi-select-row.component.ts +19 -0
- package/src/lib/core-multi-select/core-multi-select.component.html +41 -0
- package/src/lib/core-multi-select/core-multi-select.component.scss +119 -0
- package/src/lib/core-multi-select/core-multi-select.component.ts +139 -0
- package/src/lib/core-number/core-number.component.html +3 -0
- package/src/lib/core-number/core-number.component.scss +1 -0
- package/src/lib/core-number/core-number.component.ts +45 -0
- package/src/lib/core-page-title/core-page-title.component.html +14 -0
- package/src/lib/core-page-title/core-page-title.component.scss +16 -0
- package/src/lib/core-page-title/core-page-title.component.ts +11 -0
- package/src/lib/core-radio-buttons/core-radio-buttons.component.html +17 -0
- package/src/lib/core-radio-buttons/core-radio-buttons.component.scss +46 -0
- package/src/lib/core-radio-buttons/core-radio-buttons.component.spec.ts +21 -0
- package/src/lib/core-radio-buttons/core-radio-buttons.component.ts +64 -0
- package/src/lib/core-search-box/core-search-box.component.html +14 -0
- package/src/lib/core-search-box/core-search-box.component.scss +37 -0
- package/src/lib/core-search-box/core-search-box.component.ts +15 -0
- package/src/lib/core-select/core-select-bluebird.component.html +57 -0
- package/src/lib/core-select/core-select-bluebird.component.scss +129 -0
- package/src/lib/core-select/core-select-falcon.component.html +56 -0
- package/src/lib/core-select/core-select-falcon.component.scss +123 -0
- package/src/lib/core-select/core-select.component.spec.ts +21 -0
- package/src/lib/core-select/core-select.component.ts +93 -0
- package/src/lib/core-spinner/core-spinner.component.html +14 -0
- package/src/lib/core-spinner/core-spinner.component.scss +162 -0
- package/src/lib/core-spinner/core-spinner.component.ts +13 -0
- package/src/lib/core-switch/core-switch.component.html +13 -0
- package/src/lib/core-switch/core-switch.component.scss +58 -0
- package/src/lib/core-switch/core-switch.component.spec.ts +21 -0
- package/src/lib/core-switch/core-switch.component.ts +28 -0
- package/src/lib/core-table/core-column-date-picker/core-column-date-picker.component.html +21 -0
- package/src/lib/core-table/core-column-date-picker/core-column-date-picker.component.scss +3 -0
- package/src/lib/core-table/core-column-date-picker/core-column-date-picker.component.ts +55 -0
- package/src/lib/core-table/core-column-input/core-column-input.component.html +17 -0
- package/src/lib/core-table/core-column-input/core-column-input.component.scss +21 -0
- package/src/lib/core-table/core-column-input/core-column-input.component.ts +23 -0
- package/src/lib/core-table/core-column-selector/core-column-selector.component.html +47 -0
- package/src/lib/core-table/core-column-selector/core-column-selector.component.scss +113 -0
- package/src/lib/core-table/core-column-selector/core-column-selector.component.ts +94 -0
- package/src/lib/core-table/core-row-pelak/core-row-pelak.component.html +12 -0
- package/src/lib/core-table/core-row-pelak/core-row-pelak.component.scss +21 -0
- package/src/lib/core-table/core-row-pelak/core-row-pelak.component.ts +12 -0
- package/src/lib/core-table/core-table/core-table.component.html +168 -0
- package/src/lib/core-table/core-table/core-table.component.scss +65 -0
- package/src/lib/core-table/core-table/core-table.component.ts +179 -0
- package/src/lib/core-table/core-table-action-buttons-column/core-table-action-buttons-column.component.html +10 -0
- package/src/lib/core-table/core-table-action-buttons-column/core-table-action-buttons-column.component.scss +3 -0
- package/src/lib/core-table/core-table-action-buttons-column/core-table-action-buttons-column.component.ts +24 -0
- package/src/lib/core-table/core-table-action-column/core-table-action-column.component.html +6 -0
- package/src/lib/core-table/core-table-action-column/core-table-action-column.component.scss +3 -0
- package/src/lib/core-table/core-table-action-column/core-table-action-column.component.ts +19 -0
- package/src/lib/core-table/core-table-card-manager/core-table-card-manager.component.html +94 -0
- package/src/lib/core-table/core-table-card-manager/core-table-card-manager.component.scss +0 -0
- package/src/lib/core-table/core-table-card-manager/core-table-card-manager.component.ts +58 -0
- package/src/lib/core-table/core-table-column-manager/core-table-column-manager.component.html +99 -0
- package/src/lib/core-table/core-table-column-manager/core-table-column-manager.component.scss +0 -0
- package/src/lib/core-table/core-table-column-manager/core-table-column-manager.component.ts +59 -0
- package/src/lib/core-table/core-table-detail-viewer-for-report/core-table-detail-viewer-for-report.component.html +5 -0
- package/src/lib/core-table/core-table-detail-viewer-for-report/core-table-detail-viewer-for-report.component.scss +8 -0
- package/src/lib/core-table/core-table-detail-viewer-for-report/core-table-detail-viewer-for-report.component.ts +28 -0
- package/src/lib/core-table/core-table-filter-dialog/core-table-filter-dialog/core-table-filter-dialog.component.html +24 -0
- package/src/lib/core-table/core-table-filter-dialog/core-table-filter-dialog/core-table-filter-dialog.component.scss +10 -0
- package/src/lib/core-table/core-table-filter-dialog/core-table-filter-dialog/core-table-filter-dialog.component.ts +76 -0
- package/src/lib/core-table/core-table-no-content/core-table-no-content.component.html +6 -0
- package/src/lib/core-table/core-table-no-content/core-table-no-content.component.scss +7 -0
- package/src/lib/core-table/core-table-no-content/core-table-no-content.component.ts +14 -0
- package/src/lib/core-table/core-table-no-content/core-table-no-content.label.ts +14 -0
- package/src/lib/core-table/core-table-row-selector-column/core-table-row-selector-column.component.html +5 -0
- package/src/lib/core-table/core-table-row-selector-column/core-table-row-selector-column.component.scss +0 -0
- package/src/lib/core-table/core-table-row-selector-column/core-table-row-selector-column.component.ts +60 -0
- package/src/lib/core-table/core-table-shamsi-date/core-table-shamsi-date.component.html +3 -0
- package/src/lib/core-table/core-table-shamsi-date/core-table-shamsi-date.component.scss +0 -0
- package/src/lib/core-table/core-table-shamsi-date/core-table-shamsi-date.component.ts +24 -0
- package/src/lib/core-table/core-table-status-active-column/core-table-status-active-column.component.html +3 -0
- package/src/lib/core-table/core-table-status-active-column/core-table-status-active-column.component.scss +14 -0
- package/src/lib/core-table/core-table-status-active-column/core-table-status-active-column.component.ts +14 -0
- package/src/lib/core-table/core-table-status-column/core-table-status-column.component.html +3 -0
- package/src/lib/core-table/core-table-status-column/core-table-status-column.component.scss +14 -0
- package/src/lib/core-table/core-table-status-column/core-table-status-column.component.ts +11 -0
- package/src/lib/core-textarea/core-textarea.component.html +18 -0
- package/src/lib/core-textarea/core-textarea.component.scss +62 -0
- package/src/lib/core-textarea/core-textarea.component.ts +31 -0
- package/src/lib/core-time-picker/core-time-picker.component.html +51 -0
- package/src/lib/core-time-picker/core-time-picker.component.scss +144 -0
- package/src/lib/core-time-picker/core-time-picker.component.ts +102 -0
- package/src/lib/core-time-picker/time-picker-modal/time-picker-modal.component.html +50 -0
- package/src/lib/core-time-picker/time-picker-modal/time-picker-modal.component.scss +424 -0
- package/src/lib/core-time-picker/time-picker-modal/time-picker-modal.component.spec.ts +21 -0
- package/src/lib/core-time-picker/time-picker-modal/time-picker-modal.component.ts +172 -0
- package/src/lib/falcon-lib.module.ts +157 -0
- package/src/lib/falconTypes.ts +35 -0
- package/src/lib/pipes/digit-group.pipe.ts +10 -0
- package/src/lib/pipes/form-control.pipe.ts +11 -0
- package/src/lib/pipes/persian-digits.pipe.ts +33 -0
- package/src/lib/pipes/price-format.pipe.ts +20 -0
- package/src/lib/pipes/shamsi-date.pipe.ts +24 -0
- package/src/lib/pipes/time-format.pipe.ts +21 -0
- package/src/lib/pipes/weight.pipe.ts +10 -0
- package/src/lib/wordify.ts +116 -0
- package/{public-api.d.ts → src/public-api.ts} +31 -27
- package/src/svg-icon/arrow-down-icon/arrow-down-icon.component.html +8 -0
- package/src/svg-icon/arrow-down-icon/arrow-down-icon.component.scss +0 -0
- package/src/svg-icon/arrow-down-icon/arrow-down-icon.component.ts +8 -0
- package/src/svg-icon/calendar-icon/calendar-icon.component.html +10 -0
- package/src/svg-icon/calendar-icon/calendar-icon.component.scss +0 -0
- package/src/svg-icon/calendar-icon/calendar-icon.component.ts +8 -0
- package/src/svg-icon/caret-up-icon/caret-up-icon.component.html +16 -0
- package/src/svg-icon/caret-up-icon/caret-up-icon.component.scss +0 -0
- package/src/svg-icon/caret-up-icon/caret-up-icon.component.ts +10 -0
- package/src/svg-icon/close-icon/close-icon.component.html +10 -0
- package/src/svg-icon/close-icon/close-icon.component.scss +0 -0
- package/src/svg-icon/close-icon/close-icon.component.ts +8 -0
- package/src/svg-icon/edit-square-icon/edit-square-icon.component.html +10 -0
- package/src/svg-icon/edit-square-icon/edit-square-icon.component.scss +0 -0
- package/src/svg-icon/edit-square-icon/edit-square-icon.component.ts +8 -0
- package/src/svg-icon/pelak-icon/pelak-icon.component.html +32 -0
- package/src/svg-icon/pelak-icon/pelak-icon.component.scss +0 -0
- package/src/svg-icon/pelak-icon/pelak-icon.component.ts +8 -0
- package/src/svg-icon/search-icon/search-icon.component.html +10 -0
- package/src/svg-icon/search-icon/search-icon.component.scss +0 -0
- package/src/svg-icon/search-icon/search-icon.component.spec.ts +21 -0
- package/src/svg-icon/search-icon/search-icon.component.ts +8 -0
- package/src/svg-icon/sort-down-icon/sort-down-icon.component.html +5 -0
- package/src/svg-icon/sort-down-icon/sort-down-icon.component.scss +0 -0
- package/src/svg-icon/sort-down-icon/sort-down-icon.component.ts +10 -0
- package/src/svg-icon/sort-solid-icon/sort-solid-icon.component.html +5 -0
- package/src/svg-icon/sort-solid-icon/sort-solid-icon.component.scss +0 -0
- package/src/svg-icon/sort-solid-icon/sort-solid-icon.component.ts +8 -0
- package/src/svg-icon/sort-up-icon/sort-up-icon.component.html +5 -0
- package/src/svg-icon/sort-up-icon/sort-up-icon.component.scss +0 -0
- package/src/svg-icon/sort-up-icon/sort-up-icon.component.ts +8 -0
- package/src/svg-icon/time-icon/time-icon.component.html +10 -0
- package/src/svg-icon/time-icon/time-icon.component.scss +0 -0
- package/src/svg-icon/time-icon/time-icon.component.ts +8 -0
- package/src/svg-icon/warning-icon/warning-icon.component.html +10 -0
- package/src/svg-icon/warning-icon/warning-icon.component.scss +0 -0
- package/src/svg-icon/warning-icon/warning-icon.component.ts +10 -0
- package/src/utils/constants.ts +182 -0
- package/src/utils/directives/detail-viewer-manager.directive.ts +78 -0
- package/src/utils/directives/filterTableDirective.ts +36 -0
- package/src/utils/directives/table-detail-viewer-manager.directive.ts +57 -0
- package/src/utils/interfaces.ts +0 -0
- package/src/utils/jsonparser.ts +49 -0
- package/src/utils/links.ts +67 -0
- package/src/utils/toast.ts +35 -0
- package/src/utils/types.ts +20 -0
- package/src/utils/util.ts +32 -0
- package/tsconfig.lib.json +14 -0
- package/tsconfig.lib.prod.json +10 -0
- package/tsconfig.spec.json +14 -0
- package/environments/environment.d.ts +0 -4
- package/esm2022/environments/environment.mjs +0 -7
- package/esm2022/lib/core-auto-complete/core-auto-complete.component.mjs +0 -82
- package/esm2022/lib/core-btn/core-btn.component.mjs +0 -68
- package/esm2022/lib/core-card/core-card.component.mjs +0 -16
- package/esm2022/lib/core-checkbox/core-checkbox.component.mjs +0 -33
- package/esm2022/lib/core-confirm-dialog/core-confirm-dialog.component.mjs +0 -31
- package/esm2022/lib/core-date-picker/core-date-picker.component.mjs +0 -46
- package/esm2022/lib/core-input/core-input.component.mjs +0 -132
- package/esm2022/lib/core-mulite-select/core-mulite-select-row/core-mulite-select-row.component.mjs +0 -29
- package/esm2022/lib/core-mulite-select/core-mulite-select.component.mjs +0 -130
- package/esm2022/lib/core-number/core-number.component.mjs +0 -64
- package/esm2022/lib/core-page-title/core-page-title.component.mjs +0 -19
- package/esm2022/lib/core-radio-buttons/core-radio-buttons.component.mjs +0 -75
- package/esm2022/lib/core-search-box/core-search-box.component.mjs +0 -25
- package/esm2022/lib/core-select/core-select.component.mjs +0 -91
- package/esm2022/lib/core-spinner/core-spinner.component.mjs +0 -23
- package/esm2022/lib/core-switch/core-switch.component.mjs +0 -33
- package/esm2022/lib/core-table/core-column-date-picker/core-column-date-picker.component.mjs +0 -62
- package/esm2022/lib/core-table/core-column-input/core-column-input.component.mjs +0 -37
- package/esm2022/lib/core-table/core-column-selector/core-column-selector.component.mjs +0 -99
- package/esm2022/lib/core-table/core-row-pelak/core-row-pelak.component.mjs +0 -21
- package/esm2022/lib/core-table/core-table/core-table.component.mjs +0 -182
- package/esm2022/lib/core-table/core-table-action-buttons-column/core-table-action-buttons-column.component.mjs +0 -34
- package/esm2022/lib/core-table/core-table-action-column/core-table-action-column.component.mjs +0 -27
- package/esm2022/lib/core-table/core-table-card-manager/core-table-card-manager.component.mjs +0 -83
- package/esm2022/lib/core-table/core-table-column-manager/core-table-column-manager.component.mjs +0 -85
- package/esm2022/lib/core-table/core-table-detail-viewer-for-report/core-table-detail-viewer-for-report.component.mjs +0 -29
- package/esm2022/lib/core-table/core-table-filter-dialog/core-table-filter-dialog/core-table-filter-dialog.component.mjs +0 -82
- package/esm2022/lib/core-table/core-table-no-content/core-table-no-content.component.mjs +0 -23
- package/esm2022/lib/core-table/core-table-no-content/core-table-no-content.label.mjs +0 -9
- package/esm2022/lib/core-table/core-table-row-selector-column/core-table-row-selector-column.component.mjs +0 -68
- package/esm2022/lib/core-table/core-table-shamsi-date/core-table-shamsi-date.component.mjs +0 -34
- package/esm2022/lib/core-table/core-table-status-active-column/core-table-status-active-column.component.mjs +0 -20
- package/esm2022/lib/core-table/core-table-status-column/core-table-status-column.component.mjs +0 -18
- package/esm2022/lib/core-textarea/core-textarea.component.mjs +0 -47
- package/esm2022/lib/core-time-picker/core-time-picker.component.mjs +0 -118
- package/esm2022/lib/core-time-picker/time-picker-modal/time-picker-modal.component.mjs +0 -147
- package/esm2022/lib/falcon-lib.module.mjs +0 -246
- package/esm2022/lib/falconTypes.mjs +0 -9
- package/esm2022/lib/pipes/digit-group.pipe.mjs +0 -16
- package/esm2022/lib/pipes/form-control.pipe.mjs +0 -16
- package/esm2022/lib/pipes/persian-digits.pipe.mjs +0 -40
- package/esm2022/lib/pipes/price-format.pipe.mjs +0 -23
- package/esm2022/lib/pipes/shamsi-date.pipe.mjs +0 -24
- package/esm2022/lib/pipes/time-format.pipe.mjs +0 -28
- package/esm2022/lib/pipes/weight.pipe.mjs +0 -16
- package/esm2022/lib/wordify.mjs +0 -109
- package/esm2022/nira-falcon.mjs +0 -5
- package/esm2022/public-api.mjs +0 -31
- package/esm2022/svg-icon/caret-up-icon/caret-up-icon.component.mjs +0 -11
- package/esm2022/svg-icon/close-icon/close-icon.component.mjs +0 -11
- package/esm2022/svg-icon/edit-square-icon/edit-square-icon.component.mjs +0 -11
- package/esm2022/svg-icon/pelak-icon/pelak-icon.component.mjs +0 -11
- package/esm2022/svg-icon/search-icon/search-icon.component.mjs +0 -11
- package/esm2022/svg-icon/sort-down-icon/sort-down-icon.component.mjs +0 -11
- package/esm2022/svg-icon/sort-solid-icon/sort-solid-icon.component.mjs +0 -11
- package/esm2022/svg-icon/sort-up-icon/sort-up-icon.component.mjs +0 -11
- package/esm2022/svg-icon/time-icon/time-icon.component.mjs +0 -11
- package/esm2022/svg-icon/warning-icon/warning-icon.component.mjs +0 -11
- package/esm2022/utils/constants.mjs +0 -184
- package/esm2022/utils/directives/detail-viewer-manager.directive.mjs +0 -71
- package/esm2022/utils/directives/table-detail-viewer-manager.directive.mjs +0 -49
- package/esm2022/utils/util.mjs +0 -26
- package/fesm2022/nira-falcon.mjs +0 -2831
- package/fesm2022/nira-falcon.mjs.map +0 -1
- package/index.d.ts +0 -5
- package/lib/core-auto-complete/core-auto-complete.component.d.ts +0 -30
- package/lib/core-btn/core-btn.component.d.ts +0 -22
- package/lib/core-card/core-card.component.d.ts +0 -6
- package/lib/core-checkbox/core-checkbox.component.d.ts +0 -13
- package/lib/core-confirm-dialog/core-confirm-dialog.component.d.ts +0 -14
- package/lib/core-date-picker/core-date-picker.component.d.ts +0 -20
- package/lib/core-input/core-input.component.d.ts +0 -28
- package/lib/core-mulite-select/core-mulite-select-row/core-mulite-select-row.component.d.ts +0 -11
- package/lib/core-mulite-select/core-mulite-select.component.d.ts +0 -42
- package/lib/core-number/core-number.component.d.ts +0 -12
- package/lib/core-page-title/core-page-title.component.d.ts +0 -7
- package/lib/core-radio-buttons/core-radio-buttons.component.d.ts +0 -29
- package/lib/core-search-box/core-search-box.component.d.ts +0 -10
- package/lib/core-select/core-select.component.d.ts +0 -36
- package/lib/core-spinner/core-spinner.component.d.ts +0 -9
- package/lib/core-switch/core-switch.component.d.ts +0 -17
- package/lib/core-table/core-column-date-picker/core-column-date-picker.component.d.ts +0 -21
- package/lib/core-table/core-column-input/core-column-input.component.d.ts +0 -15
- package/lib/core-table/core-column-selector/core-column-selector.component.d.ts +0 -35
- package/lib/core-table/core-row-pelak/core-row-pelak.component.d.ts +0 -8
- package/lib/core-table/core-table/core-table.component.d.ts +0 -42
- package/lib/core-table/core-table-action-buttons-column/core-table-action-buttons-column.component.d.ts +0 -11
- package/lib/core-table/core-table-action-column/core-table-action-column.component.d.ts +0 -11
- package/lib/core-table/core-table-card-manager/core-table-card-manager.component.d.ts +0 -24
- package/lib/core-table/core-table-column-manager/core-table-column-manager.component.d.ts +0 -24
- package/lib/core-table/core-table-detail-viewer-for-report/core-table-detail-viewer-for-report.component.d.ts +0 -11
- package/lib/core-table/core-table-filter-dialog/core-table-filter-dialog/core-table-filter-dialog.component.d.ts +0 -22
- package/lib/core-table/core-table-no-content/core-table-no-content.component.d.ts +0 -9
- package/lib/core-table/core-table-no-content/core-table-no-content.label.d.ts +0 -5
- package/lib/core-table/core-table-row-selector-column/core-table-row-selector-column.component.d.ts +0 -14
- package/lib/core-table/core-table-shamsi-date/core-table-shamsi-date.component.d.ts +0 -13
- package/lib/core-table/core-table-status-active-column/core-table-status-active-column.component.d.ts +0 -8
- package/lib/core-table/core-table-status-column/core-table-status-column.component.d.ts +0 -7
- package/lib/core-textarea/core-textarea.component.d.ts +0 -13
- package/lib/core-time-picker/core-time-picker.component.d.ts +0 -26
- package/lib/core-time-picker/time-picker-modal/time-picker-modal.component.d.ts +0 -35
- package/lib/falcon-lib.module.d.ts +0 -64
- package/lib/falconTypes.d.ts +0 -23
- package/lib/pipes/digit-group.pipe.d.ts +0 -7
- package/lib/pipes/form-control.pipe.d.ts +0 -8
- package/lib/pipes/persian-digits.pipe.d.ts +0 -7
- package/lib/pipes/price-format.pipe.d.ts +0 -7
- package/lib/pipes/shamsi-date.pipe.d.ts +0 -9
- package/lib/pipes/time-format.pipe.d.ts +0 -7
- package/lib/pipes/weight.pipe.d.ts +0 -7
- package/lib/wordify.d.ts +0 -2
- package/svg-icon/caret-up-icon/caret-up-icon.component.d.ts +0 -5
- package/svg-icon/close-icon/close-icon.component.d.ts +0 -5
- package/svg-icon/edit-square-icon/edit-square-icon.component.d.ts +0 -5
- package/svg-icon/pelak-icon/pelak-icon.component.d.ts +0 -5
- package/svg-icon/search-icon/search-icon.component.d.ts +0 -5
- package/svg-icon/sort-down-icon/sort-down-icon.component.d.ts +0 -5
- package/svg-icon/sort-solid-icon/sort-solid-icon.component.d.ts +0 -5
- package/svg-icon/sort-up-icon/sort-up-icon.component.d.ts +0 -5
- package/svg-icon/time-icon/time-icon.component.d.ts +0 -5
- package/svg-icon/warning-icon/warning-icon.component.d.ts +0 -5
- package/utils/constants.d.ts +0 -70
- package/utils/directives/detail-viewer-manager.directive.d.ts +0 -18
- package/utils/directives/table-detail-viewer-manager.directive.d.ts +0 -16
- package/utils/util.d.ts +0 -11
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
<container-element [ngSwitch]="column.type">
|
|
2
|
+
<ng-content></ng-content>
|
|
3
|
+
|
|
4
|
+
<app-core-table-row-selector-column
|
|
5
|
+
*ngSwitchCase="columnsTypes.ROW_SELECTOR"
|
|
6
|
+
[rowSelector]="rowSelector"
|
|
7
|
+
[data]="data"
|
|
8
|
+
[allTableData]="allTableData"
|
|
9
|
+
[column]="column"
|
|
10
|
+
></app-core-table-row-selector-column>
|
|
11
|
+
<app-core-table-status-active-column
|
|
12
|
+
*ngSwitchCase="columnsTypes.STATUS_ACTIVE"
|
|
13
|
+
[data]="data"
|
|
14
|
+
[column]="column"
|
|
15
|
+
></app-core-table-status-active-column>
|
|
16
|
+
<app-core-table-status-column
|
|
17
|
+
*ngSwitchCase="columnsTypes.STATUS"
|
|
18
|
+
[data]="data"
|
|
19
|
+
[column]="column"
|
|
20
|
+
></app-core-table-status-column>
|
|
21
|
+
<app-core-table-action-column
|
|
22
|
+
*ngSwitchCase="columnsTypes.ACTION"
|
|
23
|
+
[data]="data"
|
|
24
|
+
[column]="column"
|
|
25
|
+
></app-core-table-action-column>
|
|
26
|
+
<app-core-table-action-buttons-column
|
|
27
|
+
*ngSwitchCase="columnsTypes.ACTION_BUTTONS"
|
|
28
|
+
(onClick)="clicked($event)"
|
|
29
|
+
[data]="data"
|
|
30
|
+
[column]="column"
|
|
31
|
+
></app-core-table-action-buttons-column>
|
|
32
|
+
<app-core-table-shamsi-date
|
|
33
|
+
*ngSwitchCase="columnsTypes.SHAMSI_DATE"
|
|
34
|
+
[data]="data"
|
|
35
|
+
[column]="column"
|
|
36
|
+
>
|
|
37
|
+
</app-core-table-shamsi-date>
|
|
38
|
+
<app-core-row-pelak
|
|
39
|
+
class="inline-block"
|
|
40
|
+
*ngSwitchCase="columnsTypes.PELAK"
|
|
41
|
+
[data]="data"
|
|
42
|
+
[column]="column"
|
|
43
|
+
></app-core-row-pelak>
|
|
44
|
+
<span
|
|
45
|
+
*ngSwitchCase="columnsTypes.TEXT"
|
|
46
|
+
[ngClass]="{ 'cursor-pointer': column.coptToClipboard }"
|
|
47
|
+
(click)="onTextColumnClicked(column, data[column.key])"
|
|
48
|
+
tableDetailViewerManager
|
|
49
|
+
[detailViewerData]="
|
|
50
|
+
combinedData(column.detailViewer, data[column.detailViewer?.key])
|
|
51
|
+
"
|
|
52
|
+
>{{ data[column.key] | persianDigits }}</span
|
|
53
|
+
>
|
|
54
|
+
<span
|
|
55
|
+
*ngSwitchCase="columnsTypes.NUMBER"
|
|
56
|
+
[ngClass]="{
|
|
57
|
+
'cursor-pointer': column.copyToClipboard,
|
|
58
|
+
green: data[column.key] > 0 && column.canColorfulNumber,
|
|
59
|
+
red: data[column.key] < 0 && column.canColorfulNumber
|
|
60
|
+
}"
|
|
61
|
+
(click)="onTextColumnClicked(column, data[column.key])"
|
|
62
|
+
tableDetailViewerManager
|
|
63
|
+
dir="ltr"
|
|
64
|
+
[detailViewerData]="
|
|
65
|
+
combinedData(column.detailViewer, data[column.detailViewer?.key])
|
|
66
|
+
"
|
|
67
|
+
><app-core-number
|
|
68
|
+
[number]="data[column.key]"
|
|
69
|
+
[type]="'number'"
|
|
70
|
+
[canSplitNumbers]="true"
|
|
71
|
+
[canShowWordInToolTip]="true"
|
|
72
|
+
>
|
|
73
|
+
</app-core-number>
|
|
74
|
+
</span>
|
|
75
|
+
<span *ngSwitchCase="columnsTypes.SELECTOR">
|
|
76
|
+
<span
|
|
77
|
+
*ngIf="data[column.key.split('.')[0]]"
|
|
78
|
+
tableDetailViewerManager
|
|
79
|
+
[detailViewerData]="
|
|
80
|
+
combinedData(
|
|
81
|
+
column.detailViewer,
|
|
82
|
+
getSelectorData(
|
|
83
|
+
data[column.key.split('.')[0]],
|
|
84
|
+
column.detailViewer?.key
|
|
85
|
+
)
|
|
86
|
+
)
|
|
87
|
+
"
|
|
88
|
+
>{{
|
|
89
|
+
getSelectorData(data[column.key.split(".")[0]], column.data.key)
|
|
90
|
+
| persianDigits
|
|
91
|
+
}}</span
|
|
92
|
+
>
|
|
93
|
+
</span>
|
|
94
|
+
</container-element>
|
|
File without changes
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { Component, EventEmitter, Input, Output } from '@angular/core';
|
|
2
|
+
import { NiraSnackBarService } from 'nira-snack-bar';
|
|
3
|
+
import { COLUMNS_TYPES } from '../../../utils/constants';
|
|
4
|
+
import { BehaviorSubject } from 'rxjs';
|
|
5
|
+
|
|
6
|
+
@Component({
|
|
7
|
+
selector: 'app-core-table-card-manager',
|
|
8
|
+
templateUrl: './core-table-card-manager.component.html',
|
|
9
|
+
styleUrls: ['./core-table-card-manager.component.scss'],
|
|
10
|
+
})
|
|
11
|
+
export class CoreTableCardManagerComponent {
|
|
12
|
+
@Input({ required: true }) data!: any;
|
|
13
|
+
@Input({ required: true }) column!: any;
|
|
14
|
+
@Input({ required: true }) allTableData!: any;
|
|
15
|
+
@Input({ required: false }) rowSelector: BehaviorSubject<any> | undefined =
|
|
16
|
+
undefined;
|
|
17
|
+
@Output() onColumnClicked: EventEmitter<any> = new EventEmitter();
|
|
18
|
+
get columnsTypes() {
|
|
19
|
+
return COLUMNS_TYPES;
|
|
20
|
+
}
|
|
21
|
+
constructor(private niraSnackBar: NiraSnackBarService) {}
|
|
22
|
+
getSelectorData(data: any, key: string) {
|
|
23
|
+
if (key) {
|
|
24
|
+
const split = key.split('.');
|
|
25
|
+
if (split.length === 1) {
|
|
26
|
+
return data[key];
|
|
27
|
+
} else {
|
|
28
|
+
let newData = data;
|
|
29
|
+
split.forEach((newKay) => {
|
|
30
|
+
newData = newData[newKay];
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
return newData;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
onTextColumnClicked(column: any, data: string) {
|
|
38
|
+
if (!column.coptToClipboard) return;
|
|
39
|
+
navigator.clipboard
|
|
40
|
+
.writeText(data)
|
|
41
|
+
.then((e) => {
|
|
42
|
+
this.niraSnackBar.show('با موفقیت کپی شد', {
|
|
43
|
+
statusClass: 'success',
|
|
44
|
+
duration: 3000,
|
|
45
|
+
});
|
|
46
|
+
})
|
|
47
|
+
.catch((e) => console.error(e));
|
|
48
|
+
}
|
|
49
|
+
clicked(val: any) {
|
|
50
|
+
this.onColumnClicked.emit(val);
|
|
51
|
+
}
|
|
52
|
+
combinedData(detailViewer: any, data: any) {
|
|
53
|
+
return {
|
|
54
|
+
detailViewer: detailViewer,
|
|
55
|
+
data: data,
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
<container-element [ngSwitch]="column.type">
|
|
2
|
+
<ng-content></ng-content>
|
|
3
|
+
|
|
4
|
+
<app-core-table-row-selector-column
|
|
5
|
+
*ngSwitchCase="columnsTypes.ROW_SELECTOR"
|
|
6
|
+
[rowSelector]="rowSelector"
|
|
7
|
+
[data]="data"
|
|
8
|
+
[allTableData]="allTableData"
|
|
9
|
+
[column]="column"
|
|
10
|
+
></app-core-table-row-selector-column>
|
|
11
|
+
<app-core-table-status-active-column
|
|
12
|
+
*ngSwitchCase="columnsTypes.STATUS_ACTIVE"
|
|
13
|
+
[data]="data"
|
|
14
|
+
[column]="column"
|
|
15
|
+
></app-core-table-status-active-column>
|
|
16
|
+
<app-core-table-status-column
|
|
17
|
+
*ngSwitchCase="columnsTypes.STATUS"
|
|
18
|
+
[data]="data"
|
|
19
|
+
[column]="column"
|
|
20
|
+
></app-core-table-status-column>
|
|
21
|
+
<app-core-table-action-column
|
|
22
|
+
*ngSwitchCase="columnsTypes.ACTION"
|
|
23
|
+
[data]="data"
|
|
24
|
+
[column]="column"
|
|
25
|
+
></app-core-table-action-column>
|
|
26
|
+
<app-core-table-action-buttons-column
|
|
27
|
+
*ngSwitchCase="columnsTypes.ACTION_BUTTONS"
|
|
28
|
+
(onClick)="clicked($event)"
|
|
29
|
+
[data]="data"
|
|
30
|
+
[column]="column"
|
|
31
|
+
></app-core-table-action-buttons-column>
|
|
32
|
+
<app-core-table-shamsi-date
|
|
33
|
+
*ngSwitchCase="columnsTypes.SHAMSI_DATE"
|
|
34
|
+
[data]="data"
|
|
35
|
+
[column]="column"
|
|
36
|
+
>
|
|
37
|
+
</app-core-table-shamsi-date>
|
|
38
|
+
<app-core-row-pelak
|
|
39
|
+
*ngSwitchCase="columnsTypes.PELAK"
|
|
40
|
+
[data]="data"
|
|
41
|
+
[column]="column"
|
|
42
|
+
></app-core-row-pelak>
|
|
43
|
+
<core-table-detail-viewer-for-report
|
|
44
|
+
*ngSwitchCase="columnsTypes.DETAIL_VIEWER_FOR_REPORT"
|
|
45
|
+
[data]="data"
|
|
46
|
+
[column]="column"
|
|
47
|
+
></core-table-detail-viewer-for-report>
|
|
48
|
+
<span
|
|
49
|
+
*ngSwitchCase="columnsTypes.TEXT"
|
|
50
|
+
[ngClass]="{ 'cursor-pointer': column.coptToClipboard }"
|
|
51
|
+
(click)="onTextColumnClicked(column, data[column.key])"
|
|
52
|
+
tableDetailViewerManager
|
|
53
|
+
[detailViewerData]="
|
|
54
|
+
combinedData(column.detailViewer, data[column.detailViewer?.key])
|
|
55
|
+
"
|
|
56
|
+
>{{ data[column.key] | persianDigits }}</span
|
|
57
|
+
>
|
|
58
|
+
<span
|
|
59
|
+
*ngSwitchCase="columnsTypes.NUMBER"
|
|
60
|
+
[ngClass]="{
|
|
61
|
+
'cursor-pointer': column.copyToClipboard,
|
|
62
|
+
green: data[column.key] > 0 && column.canColorfulNumber,
|
|
63
|
+
red: data[column.key] < 0 && column.canColorfulNumber
|
|
64
|
+
}"
|
|
65
|
+
(click)="onTextColumnClicked(column, data[column.key])"
|
|
66
|
+
tableDetailViewerManager
|
|
67
|
+
dir="ltr"
|
|
68
|
+
[detailViewerData]="
|
|
69
|
+
combinedData(column.detailViewer, data[column.detailViewer?.key])
|
|
70
|
+
"
|
|
71
|
+
><app-core-number
|
|
72
|
+
[number]="data[column.key]"
|
|
73
|
+
[type]="'number'"
|
|
74
|
+
[canSplitNumbers]="true"
|
|
75
|
+
[canShowWordInToolTip]="true"
|
|
76
|
+
>
|
|
77
|
+
</app-core-number>
|
|
78
|
+
</span>
|
|
79
|
+
|
|
80
|
+
<span *ngSwitchCase="columnsTypes.SELECTOR">
|
|
81
|
+
<span
|
|
82
|
+
*ngIf="data[column.key.split('.')[0]]"
|
|
83
|
+
tableDetailViewerManager
|
|
84
|
+
[detailViewerData]="
|
|
85
|
+
combinedData(
|
|
86
|
+
column.detailViewer,
|
|
87
|
+
getSelectorData(
|
|
88
|
+
data[column.key.split('.')[0]],
|
|
89
|
+
column.detailViewer?.key
|
|
90
|
+
)
|
|
91
|
+
)
|
|
92
|
+
"
|
|
93
|
+
>{{
|
|
94
|
+
getSelectorData(data[column.key.split(".")[0]], column.data.key)
|
|
95
|
+
| persianDigits
|
|
96
|
+
}}</span
|
|
97
|
+
>
|
|
98
|
+
</span>
|
|
99
|
+
</container-element>
|
|
File without changes
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { Component, EventEmitter, Input, Output } from '@angular/core';
|
|
2
|
+
import { NiraSnackBarService } from 'nira-snack-bar';
|
|
3
|
+
import { COLUMNS_TYPES } from '../../../utils/constants';
|
|
4
|
+
import { BehaviorSubject } from 'rxjs';
|
|
5
|
+
|
|
6
|
+
@Component({
|
|
7
|
+
selector: 'app-core-table-column-manager',
|
|
8
|
+
templateUrl: './core-table-column-manager.component.html',
|
|
9
|
+
styleUrls: ['./core-table-column-manager.component.scss'],
|
|
10
|
+
})
|
|
11
|
+
export class CoreTableColumnManagerComponent {
|
|
12
|
+
@Input({ required: true }) data!: any;
|
|
13
|
+
@Input({ required: true }) column!: any;
|
|
14
|
+
@Input({ required: true }) allTableData!: any;
|
|
15
|
+
@Input({ required: false }) rowSelector: BehaviorSubject<any> | undefined =
|
|
16
|
+
undefined;
|
|
17
|
+
@Output() onColumnClicked: EventEmitter<any> = new EventEmitter();
|
|
18
|
+
get columnsTypes() {
|
|
19
|
+
return COLUMNS_TYPES;
|
|
20
|
+
}
|
|
21
|
+
constructor(private niraSnackBar: NiraSnackBarService) {}
|
|
22
|
+
getSelectorData(data: any, key: string) {
|
|
23
|
+
if (!key) {
|
|
24
|
+
return '';
|
|
25
|
+
}
|
|
26
|
+
const split = key.split('.');
|
|
27
|
+
if (split.length === 1) {
|
|
28
|
+
return data[key];
|
|
29
|
+
} else {
|
|
30
|
+
let newData = data;
|
|
31
|
+
split.forEach((newKey) => {
|
|
32
|
+
newData = newData[newKey];
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
return newData;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
onTextColumnClicked(column: any, data: string) {
|
|
39
|
+
if (!column.coptToClipboard) return;
|
|
40
|
+
navigator.clipboard
|
|
41
|
+
.writeText(data)
|
|
42
|
+
.then((e) => {
|
|
43
|
+
this.niraSnackBar.show('با موفقیت کپی شد', {
|
|
44
|
+
statusClass: 'success',
|
|
45
|
+
duration: 3000,
|
|
46
|
+
});
|
|
47
|
+
})
|
|
48
|
+
.catch((e) => console.error(e));
|
|
49
|
+
}
|
|
50
|
+
clicked(val: any) {
|
|
51
|
+
this.onColumnClicked.emit(val);
|
|
52
|
+
}
|
|
53
|
+
combinedData(detailViewer: any, data: any) {
|
|
54
|
+
return {
|
|
55
|
+
detailViewer: detailViewer,
|
|
56
|
+
data: data,
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Component, Input } from '@angular/core';
|
|
2
|
+
import { DetailViewers } from '../../falconTypes';
|
|
3
|
+
|
|
4
|
+
@Component({
|
|
5
|
+
selector: 'core-table-detail-viewer-for-report',
|
|
6
|
+
templateUrl: './core-table-detail-viewer-for-report.component.html',
|
|
7
|
+
styleUrls: ['./core-table-detail-viewer-for-report.component.scss'],
|
|
8
|
+
})
|
|
9
|
+
export class CoreTableDetailViewerForReportComponent {
|
|
10
|
+
@Input({ required: true }) data!: any;
|
|
11
|
+
@Input({ required: true }) column!: any;
|
|
12
|
+
|
|
13
|
+
get detailViewers() {
|
|
14
|
+
return this.column.data.detailViewers;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
ngOnInit(): void {}
|
|
18
|
+
|
|
19
|
+
hasDetailViewers() {
|
|
20
|
+
return this.detailViewers.some(
|
|
21
|
+
(item: any) => item === this.data[this.column.data.keyType]
|
|
22
|
+
);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
onClick() {
|
|
26
|
+
this.column.data.onClick(this.data);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<core-card class="block min-w-64 max-h-[80vh] overflow-auto">
|
|
2
|
+
<div class="root flex mb-6 justify-between">
|
|
3
|
+
<b class="m-3 self-center">فیلتر جدول</b>
|
|
4
|
+
<close-icon
|
|
5
|
+
(click)="close()"
|
|
6
|
+
class="close-icon h-10 m-3 rounded-full cursor-pointer p-2 hover:shadow-md"
|
|
7
|
+
></close-icon>
|
|
8
|
+
</div>
|
|
9
|
+
|
|
10
|
+
<div *ngFor="let column of columnsSchema">
|
|
11
|
+
<div>
|
|
12
|
+
<core-checkbox
|
|
13
|
+
class="inline-block w-4 ms-4"
|
|
14
|
+
[checked]="column.active === undefined ? true : column.active"
|
|
15
|
+
(onChange)="onCheckboxClicked(column, $event)"
|
|
16
|
+
></core-checkbox>
|
|
17
|
+
{{ column.label }}
|
|
18
|
+
</div>
|
|
19
|
+
</div>
|
|
20
|
+
|
|
21
|
+
<div class="grid grid-cols-3 gap-x-2 p-3" dir="ltr">
|
|
22
|
+
<core-btn (btnClicked)="submitBtn()" class="col-span-1"> بستن </core-btn>
|
|
23
|
+
</div>
|
|
24
|
+
</core-card>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
.close-icon {
|
|
2
|
+
fill: var(--default-table-column-date-picker-close-icon-color);
|
|
3
|
+
:hover {
|
|
4
|
+
background-color: var(--default-table-hover-background-icon-color);
|
|
5
|
+
fill: var(--default-table-hover-fill-icon-color);
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
.root {
|
|
9
|
+
background-color: var(--default-table-th-background-color);
|
|
10
|
+
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { Component, Input } from '@angular/core';
|
|
2
|
+
import { NgxIndexedDBService } from 'ngx-indexed-db';
|
|
3
|
+
import { IModal, NiraModalConfig } from 'nira-modal';
|
|
4
|
+
import { Subject } from 'rxjs';
|
|
5
|
+
|
|
6
|
+
@Component({
|
|
7
|
+
selector: 'app-core-table-filter-dialog',
|
|
8
|
+
templateUrl: './core-table-filter-dialog.component.html',
|
|
9
|
+
styleUrls: ['./core-table-filter-dialog.component.scss'],
|
|
10
|
+
})
|
|
11
|
+
export class CoreTableFilterDialogComponent implements IModal {
|
|
12
|
+
@Input() closeSubject!: Subject<any>;
|
|
13
|
+
@Input() config!: NiraModalConfig;
|
|
14
|
+
key!: string;
|
|
15
|
+
columnsSchema: any[] = [];
|
|
16
|
+
dbTableFilter: any;
|
|
17
|
+
constructor(private dbService: NgxIndexedDBService) {}
|
|
18
|
+
ngOnInit() {
|
|
19
|
+
this.columnsSchema = this.config.data.columnsSchema;
|
|
20
|
+
this.key = this.config.data.key;
|
|
21
|
+
this.getDbTableFilter();
|
|
22
|
+
}
|
|
23
|
+
onCheckboxClicked(selectedColumn: any, event: any) {
|
|
24
|
+
this.columnsSchema.map((column) => {
|
|
25
|
+
if (selectedColumn.key === column.key) {
|
|
26
|
+
column.active = event.srcElement.checked;
|
|
27
|
+
}
|
|
28
|
+
return column;
|
|
29
|
+
});
|
|
30
|
+
setTimeout(() => {
|
|
31
|
+
this.saveTableFilter();
|
|
32
|
+
}, 50);
|
|
33
|
+
}
|
|
34
|
+
getDbTableFilter() {
|
|
35
|
+
this.dbService
|
|
36
|
+
.getByIndex('tableFilter', 'key', this.key)
|
|
37
|
+
.subscribe((data) => {
|
|
38
|
+
this.dbTableFilter = data;
|
|
39
|
+
if (this.dbTableFilter) {
|
|
40
|
+
this.setTableFilter();
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
saveTableFilter() {
|
|
45
|
+
const data: any = {
|
|
46
|
+
key: this.key,
|
|
47
|
+
columnsSchema: JSON.stringify(this.columnsSchema),
|
|
48
|
+
};
|
|
49
|
+
if (this.dbTableFilter) {
|
|
50
|
+
data.id = this.dbTableFilter.id;
|
|
51
|
+
this.dbService.update('tableFilter', data).subscribe(() => {});
|
|
52
|
+
} else {
|
|
53
|
+
this.dbService.add('tableFilter', data).subscribe(() => {
|
|
54
|
+
this.getDbTableFilter();
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
setTableFilter() {
|
|
59
|
+
this.columnsSchema.map((column: any) => {
|
|
60
|
+
JSON.parse(this.dbTableFilter.columnsSchema).forEach(
|
|
61
|
+
(dbColumnsSchema: any) => {
|
|
62
|
+
if (dbColumnsSchema.key === column.key) {
|
|
63
|
+
column.active = dbColumnsSchema.active;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
);
|
|
67
|
+
return column;
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
submitBtn() {
|
|
71
|
+
this.closeSubject.next('');
|
|
72
|
+
}
|
|
73
|
+
close() {
|
|
74
|
+
this.closeSubject.next('');
|
|
75
|
+
}
|
|
76
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
<div *ngIf="tableData; let data" class="text-center mt-10 mb-10">
|
|
2
|
+
<ng-container *ngIf="$any(data).length == 0 && !loading">
|
|
3
|
+
<warning-icon class="icon-color inline-block w-24"></warning-icon>
|
|
4
|
+
<b class="content block">{{ labels.noResult }}</b></ng-container
|
|
5
|
+
>
|
|
6
|
+
</div>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Component, Input } from '@angular/core';
|
|
2
|
+
import { Label } from './core-table-no-content.label';
|
|
3
|
+
|
|
4
|
+
@Component({
|
|
5
|
+
selector: 'core-table-no-content',
|
|
6
|
+
templateUrl: './core-table-no-content.component.html',
|
|
7
|
+
styleUrls: ['./core-table-no-content.component.scss'],
|
|
8
|
+
})
|
|
9
|
+
export class CoreTableNoContentComponent {
|
|
10
|
+
labels = Label['fa'];
|
|
11
|
+
@Input({ required: true }) tableData: any;
|
|
12
|
+
@Input({ required: false }) loading: any;
|
|
13
|
+
constructor() {}
|
|
14
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { UserLanguage } from '../../../utils/constants';
|
|
2
|
+
|
|
3
|
+
export interface ITabelNoContent {
|
|
4
|
+
noResult: string;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export const Label: Record<UserLanguage, ITabelNoContent> = {
|
|
8
|
+
fa: {
|
|
9
|
+
noResult: 'موردی یافت نشد',
|
|
10
|
+
},
|
|
11
|
+
en: {
|
|
12
|
+
noResult: 'No Result',
|
|
13
|
+
},
|
|
14
|
+
};
|
|
File without changes
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { Component, EventEmitter, Input, Output } from '@angular/core';
|
|
2
|
+
import { BehaviorSubject } from 'rxjs';
|
|
3
|
+
|
|
4
|
+
@Component({
|
|
5
|
+
selector: 'app-core-table-row-selector-column',
|
|
6
|
+
templateUrl: './core-table-row-selector-column.component.html',
|
|
7
|
+
styleUrls: ['./core-table-row-selector-column.component.scss'],
|
|
8
|
+
})
|
|
9
|
+
export class CoreTableRowSelectorColumnComponent {
|
|
10
|
+
checked = false;
|
|
11
|
+
@Input({ required: true }) data!: any;
|
|
12
|
+
@Input({ required: true }) column!: any;
|
|
13
|
+
@Input({ required: true }) allTableData!: any;
|
|
14
|
+
@Input({ required: false }) rowSelector: BehaviorSubject<any> | undefined =
|
|
15
|
+
undefined;
|
|
16
|
+
|
|
17
|
+
ngOnInit() {
|
|
18
|
+
this.rowSelector?.subscribe((data: any[]) => {
|
|
19
|
+
const index = data.findIndex((item) => item.id === this.data.id);
|
|
20
|
+
this.checked = index >= 0;
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
change(event: any) {
|
|
25
|
+
let rowSelector: any[] = this.rowSelector?.getValue();
|
|
26
|
+
if (event.srcElement.checked) {
|
|
27
|
+
rowSelector = [...rowSelector, this.data];
|
|
28
|
+
} else {
|
|
29
|
+
const index = rowSelector.findIndex((item) => this.data.id === item.id);
|
|
30
|
+
rowSelector.splice(index, 1);
|
|
31
|
+
}
|
|
32
|
+
this.rowSelector?.next(rowSelector);
|
|
33
|
+
}
|
|
34
|
+
async oncontextmenu(event: any) {
|
|
35
|
+
if (!this.column.data.key) return;
|
|
36
|
+
event.preventDefault();
|
|
37
|
+
let rowSelector: any[] = this.rowSelector?.getValue();
|
|
38
|
+
if (!event.srcElement.checked) {
|
|
39
|
+
const others = this.allTableData.filter(
|
|
40
|
+
(data: any) =>
|
|
41
|
+
data[this.column.data.key] === this.data[this.column.data.key]
|
|
42
|
+
);
|
|
43
|
+
for await (const row of others) {
|
|
44
|
+
const index = rowSelector.findIndex((item) => row.id === item.id);
|
|
45
|
+
if (!(index >= 0)) {
|
|
46
|
+
rowSelector = [...rowSelector, row];
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
} else {
|
|
50
|
+
const others = rowSelector.filter(
|
|
51
|
+
(item) => this.data[this.column.data.key] === item[this.column.data.key]
|
|
52
|
+
);
|
|
53
|
+
for await (const row of others) {
|
|
54
|
+
const index = rowSelector.findIndex((item) => row.id === item.id);
|
|
55
|
+
rowSelector.splice(index, 1);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
this.rowSelector?.next(rowSelector);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Component, EventEmitter, Input, Output } from '@angular/core';
|
|
2
|
+
import { COLUMNS_TYPES } from '../../../utils/constants';
|
|
3
|
+
|
|
4
|
+
@Component({
|
|
5
|
+
selector: 'app-core-table-shamsi-date',
|
|
6
|
+
templateUrl: './core-table-shamsi-date.component.html',
|
|
7
|
+
styleUrls: ['./core-table-shamsi-date.component.scss'],
|
|
8
|
+
})
|
|
9
|
+
export class CoreTableShamsiDateComponent {
|
|
10
|
+
@Input({ required: true }) data!: any;
|
|
11
|
+
@Input({ required: true }) column!: any;
|
|
12
|
+
@Output() onClick: EventEmitter<any> = new EventEmitter();
|
|
13
|
+
dateFormat = 'jYYYY/jMM/jDD HH:mm';
|
|
14
|
+
|
|
15
|
+
ngOnInit() {
|
|
16
|
+
if (this.column?.data?.dateFormat) {
|
|
17
|
+
this.dateFormat = this.column.data.dateFormat;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
get columnsTypes() {
|
|
22
|
+
return COLUMNS_TYPES;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
.active {
|
|
2
|
+
background: #d9f8eb;
|
|
3
|
+
color: #00894f;
|
|
4
|
+
border-radius: 16px;
|
|
5
|
+
padding: 2px 12px 2px 12px;
|
|
6
|
+
font-size: smaller;
|
|
7
|
+
}
|
|
8
|
+
.deActive {
|
|
9
|
+
color: #ac5a2b;
|
|
10
|
+
background: #fde6d8;
|
|
11
|
+
border-radius: 16px;
|
|
12
|
+
padding: 2px 12px 2px 12px;
|
|
13
|
+
font-size: smaller;
|
|
14
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Component, Input } from '@angular/core';
|
|
2
|
+
|
|
3
|
+
@Component({
|
|
4
|
+
selector: 'app-core-table-status-active-column',
|
|
5
|
+
templateUrl: './core-table-status-active-column.component.html',
|
|
6
|
+
styleUrls: ['./core-table-status-active-column.component.scss'],
|
|
7
|
+
})
|
|
8
|
+
export class CoreTableStatusActiveColumnComponent {
|
|
9
|
+
@Input({ required: true }) data: any;
|
|
10
|
+
@Input({ required: true }) column!: any;
|
|
11
|
+
ngOnInit(): void {
|
|
12
|
+
|
|
13
|
+
}
|
|
14
|
+
}
|