From 5505e42484efac0273627795583179d58f81a1ee Mon Sep 17 00:00:00 2001 From: Sudarshan Kumar Date: Fri, 31 Jan 2020 17:10:17 +0530 Subject: Added RDP Library added RDP Library Issue-ID: PORTAL-826 Change-Id: If00af4c55b568bb4e41c789b6b18749d8bc96858 Signed-off-by: Sudarshan Kumar --- .../projects/portalsdk-tag-lib/karma.conf.js | 31 + .../projects/portalsdk-tag-lib/ng-package.json | 7 + .../projects/portalsdk-tag-lib/package.json | 8 + .../src/lib/portalsdk-tag-lib.component.spec.ts | 25 + .../src/lib/portalsdk-tag-lib.component.ts | 19 + .../src/lib/portalsdk-tag-lib.module.ts | 10 + .../src/lib/portalsdk-tag-lib.service.spec.ts | 12 + .../src/lib/portalsdk-tag-lib.service.ts | 9 + .../src/lib/rdp/assets/images/spinner.gif | Bin 0 -> 4178 bytes .../src/lib/rdp/datasouce/RDPDataSource.ts | 72 ++ .../portalsdk-tag-lib/src/lib/rdp/model/column.ts | 68 ++ .../src/lib/rdp/model/data-table-settings.ts | 142 ++++ .../rdp-autocomplete-editor.component.html | 3 + .../rdp-autocomplete-editor.component.scss | 0 .../rdp-autocomplete-editor.component.spec.ts | 25 + .../rdp-autocomplete-editor.component.ts | 15 + .../rdp-button/rdp-button.component.css | 0 .../rdp-button/rdp-button.component.html | 3 + .../rdp-button/rdp-button.component.spec.ts | 25 + .../rdp-button/rdp-button.component.ts | 31 + .../rdp-checkbox-editor.component.html | 3 + .../rdp-checkbox-editor.component.scss | 0 .../rdp-checkbox-editor.component.spec.ts | 25 + .../rdp-checkbox-editor.component.ts | 28 + .../rdp-datepicker-editor.component.html | 3 + .../rdp-datepicker-editor.component.scss | 0 .../rdp-datepicker-editor.component.spec.ts | 25 + .../rdp-datepicker-editor.component.ts | 30 + .../rdp-icon-button/rdp-icon-button.component.css | 0 .../rdp-icon-button/rdp-icon-button.component.html | 3 + .../rdp-icon-button.component.spec.ts | 25 + .../rdp-icon-button/rdp-icon-button.component.ts | 36 + .../rdp-input-editor.component.html | 3 + .../rdp-input-editor.component.scss | 3 + .../rdp-input-editor.component.spec.ts | 25 + .../rdp-input-editor/rdp-input-editor.component.ts | 42 + .../rdp-radio-editor.component.html | 6 + .../rdp-radio-editor.component.scss | 0 .../rdp-radio-editor.component.spec.ts | 25 + .../rdp-radio-editor/rdp-radio-editor.component.ts | 36 + .../rdp-select-editor.component.html | 3 + .../rdp-select-editor.component.scss | 0 .../rdp-select-editor.component.spec.ts | 25 + .../rdp-select-editor.component.ts | 43 + .../rdp-textarea-editor.component.html | 3 + .../rdp-textarea-editor.component.scss | 0 .../rdp-textarea-editor.component.spec.ts | 25 + .../rdp-textarea-editor.component.ts | 28 + .../lib/rdp/rdp-column/rdp-column.component.html | 3 + .../lib/rdp/rdp-column/rdp-column.component.scss | 40 + .../rdp/rdp-column/rdp-column.component.spec.ts | 25 + .../src/lib/rdp/rdp-column/rdp-column.component.ts | 122 +++ .../rdp-data-table-edit.component.html | 92 +++ .../rdp-data-table-edit.component.scss | 0 .../rdp-data-table-edit.component.spec.ts | 25 + .../rdp-data-table-edit.component.ts | 46 ++ .../rdp-data-table/rdp-data-table.component.html | 57 ++ .../rdp-data-table/rdp-data-table.component.scss | 34 + .../rdp-data-table.component.spec.ts | 25 + .../rdp/rdp-data-table/rdp-data-table.component.ts | 266 +++++++ .../rdp-scroll-container.component.html | 1 + .../rdp-scroll-container.component.scss | 4 + .../rdp-scroll-container.component.spec.ts | 25 + .../rdp-scroll-container.component.ts | 67 ++ .../portalsdk-tag-lib/src/lib/rdp/rdp.module.ts | 67 ++ .../src/lib/rdp/services/rdp-modal.service.spec.ts | 12 + .../src/lib/rdp/services/rdp-modal.service.ts | 28 + .../lib/rdp/shared/rdp-data-table.service.spec.ts | 12 + .../src/lib/rdp/shared/rdp-data-table.service.ts | 36 + .../src/lib/rdp/shared/rdpCrudInterface.ts | 48 ++ .../src/lib/rdp/styles/_responsive.scss | 7 + .../src/lib/rdp/styles/_spinner.scss | 67 ++ .../src/lib/rdp/styles/_utils.scss | 3 + .../src/lib/rdp/styles/bootstrap/_alert.scss | 51 ++ .../src/lib/rdp/styles/bootstrap/_badge.scss | 47 ++ .../src/lib/rdp/styles/bootstrap/_breadcrumb.scss | 38 + .../lib/rdp/styles/bootstrap/_button-group.scss | 166 ++++ .../src/lib/rdp/styles/bootstrap/_buttons.scss | 147 ++++ .../src/lib/rdp/styles/bootstrap/_card.scss | 270 +++++++ .../src/lib/rdp/styles/bootstrap/_carousel.scss | 191 +++++ .../src/lib/rdp/styles/bootstrap/_close.scss | 34 + .../src/lib/rdp/styles/bootstrap/_code.scss | 56 ++ .../lib/rdp/styles/bootstrap/_custom-forms.scss | 282 +++++++ .../src/lib/rdp/styles/bootstrap/_dropdown.scss | 131 +++ .../src/lib/rdp/styles/bootstrap/_forms.scss | 333 ++++++++ .../src/lib/rdp/styles/bootstrap/_functions.scss | 86 ++ .../src/lib/rdp/styles/bootstrap/_grid.scss | 52 ++ .../src/lib/rdp/styles/bootstrap/_images.scss | 42 + .../src/lib/rdp/styles/bootstrap/_input-group.scss | 156 ++++ .../src/lib/rdp/styles/bootstrap/_jumbotron.scss | 16 + .../src/lib/rdp/styles/bootstrap/_list-group.scss | 115 +++ .../src/lib/rdp/styles/bootstrap/_media.scss | 8 + .../src/lib/rdp/styles/bootstrap/_mixins.scss | 42 + .../src/lib/rdp/styles/bootstrap/_modal.scss | 168 ++++ .../src/lib/rdp/styles/bootstrap/_nav.scss | 118 +++ .../src/lib/rdp/styles/bootstrap/_navbar.scss | 311 ++++++++ .../src/lib/rdp/styles/bootstrap/_pagination.scss | 72 ++ .../src/lib/rdp/styles/bootstrap/_popover.scss | 183 +++++ .../src/lib/rdp/styles/bootstrap/_print.scss | 110 +++ .../src/lib/rdp/styles/bootstrap/_progress.scss | 33 + .../src/lib/rdp/styles/bootstrap/_reboot.scss | 505 ++++++++++++ .../src/lib/rdp/styles/bootstrap/_root.scss | 19 + .../src/lib/rdp/styles/bootstrap/_tables.scss | 180 +++++ .../src/lib/rdp/styles/bootstrap/_tooltip.scss | 115 +++ .../src/lib/rdp/styles/bootstrap/_transitions.scss | 36 + .../src/lib/rdp/styles/bootstrap/_type.scss | 125 +++ .../src/lib/rdp/styles/bootstrap/_utilities.scss | 14 + .../src/lib/rdp/styles/bootstrap/_variables.scss | 874 +++++++++++++++++++++ .../lib/rdp/styles/bootstrap/bootstrap-grid.scss | 35 + .../lib/rdp/styles/bootstrap/bootstrap-reboot.scss | 12 + .../src/lib/rdp/styles/bootstrap/bootstrap.scss | 42 + .../lib/rdp/styles/bootstrap/mixins/_alert.scss | 13 + .../bootstrap/mixins/_background-variant.scss | 21 + .../lib/rdp/styles/bootstrap/mixins/_badge.scss | 12 + .../styles/bootstrap/mixins/_border-radius.scss | 35 + .../rdp/styles/bootstrap/mixins/_box-shadow.scss | 5 + .../rdp/styles/bootstrap/mixins/_breakpoints.scss | 121 +++ .../lib/rdp/styles/bootstrap/mixins/_buttons.scss | 101 +++ .../lib/rdp/styles/bootstrap/mixins/_caret.scss | 65 ++ .../lib/rdp/styles/bootstrap/mixins/_clearfix.scss | 7 + .../lib/rdp/styles/bootstrap/mixins/_float.scss | 11 + .../lib/rdp/styles/bootstrap/mixins/_forms.scss | 133 ++++ .../rdp/styles/bootstrap/mixins/_gradients.scss | 45 ++ .../styles/bootstrap/mixins/_grid-framework.scss | 69 ++ .../src/lib/rdp/styles/bootstrap/mixins/_grid.scss | 52 ++ .../lib/rdp/styles/bootstrap/mixins/_hover.scss | 61 ++ .../lib/rdp/styles/bootstrap/mixins/_image.scss | 36 + .../rdp/styles/bootstrap/mixins/_list-group.scss | 24 + .../lib/rdp/styles/bootstrap/mixins/_lists.scss | 7 + .../rdp/styles/bootstrap/mixins/_nav-divider.scss | 10 + .../rdp/styles/bootstrap/mixins/_navbar-align.scss | 10 + .../rdp/styles/bootstrap/mixins/_pagination.scss | 22 + .../rdp/styles/bootstrap/mixins/_reset-text.scss | 17 + .../lib/rdp/styles/bootstrap/mixins/_resize.scss | 6 + .../styles/bootstrap/mixins/_screen-reader.scss | 35 + .../src/lib/rdp/styles/bootstrap/mixins/_size.scss | 6 + .../rdp/styles/bootstrap/mixins/_table-row.scss | 30 + .../styles/bootstrap/mixins/_text-emphasis.scss | 14 + .../rdp/styles/bootstrap/mixins/_text-hide.scss | 9 + .../styles/bootstrap/mixins/_text-truncate.scss | 8 + .../rdp/styles/bootstrap/mixins/_transition.scss | 9 + .../rdp/styles/bootstrap/mixins/_visibility.scss | 7 + .../lib/rdp/styles/bootstrap/utilities/_align.scss | 8 + .../styles/bootstrap/utilities/_background.scss | 19 + .../rdp/styles/bootstrap/utilities/_borders.scss | 54 ++ .../rdp/styles/bootstrap/utilities/_clearfix.scss | 3 + .../rdp/styles/bootstrap/utilities/_display.scss | 56 ++ .../lib/rdp/styles/bootstrap/utilities/_embed.scss | 52 ++ .../lib/rdp/styles/bootstrap/utilities/_flex.scss | 46 ++ .../lib/rdp/styles/bootstrap/utilities/_float.scss | 9 + .../rdp/styles/bootstrap/utilities/_position.scss | 36 + .../styles/bootstrap/utilities/_screenreaders.scss | 11 + .../rdp/styles/bootstrap/utilities/_sizing.scss | 12 + .../rdp/styles/bootstrap/utilities/_spacing.scss | 51 ++ .../lib/rdp/styles/bootstrap/utilities/_text.scss | 52 ++ .../styles/bootstrap/utilities/_visibility.scss | 11 + .../styles/prebuilt-themes/deeppurple-amber.css | 1 + .../lib/rdp/styles/prebuilt-themes/indigo-pink.css | 1 + .../rdp/styles/prebuilt-themes/pink-bluegrey.css | 1 + .../rdp/styles/prebuilt-themes/purple-green.css | 1 + .../portalsdk-tag-lib/src/lib/rdp/styles/rdp.scss | 123 +++ .../portalsdk-tag-lib/src/material-module.ts | 98 +++ .../projects/portalsdk-tag-lib/src/public_api.ts | 16 + .../projects/portalsdk-tag-lib/src/test.ts | 22 + .../projects/portalsdk-tag-lib/tsconfig.lib.json | 22 + .../projects/portalsdk-tag-lib/tsconfig.spec.json | 17 + .../projects/portalsdk-tag-lib/tslint.json | 17 + 167 files changed, 9017 insertions(+) create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/karma.conf.js create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/ng-package.json create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/package.json create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/portalsdk-tag-lib.component.spec.ts create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/portalsdk-tag-lib.component.ts create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/portalsdk-tag-lib.module.ts create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/portalsdk-tag-lib.service.spec.ts create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/portalsdk-tag-lib.service.ts create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/assets/images/spinner.gif create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/datasouce/RDPDataSource.ts create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/model/column.ts create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/model/data-table-settings.ts create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-autocomplete-editor/rdp-autocomplete-editor.component.html create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-autocomplete-editor/rdp-autocomplete-editor.component.scss create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-autocomplete-editor/rdp-autocomplete-editor.component.spec.ts create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-autocomplete-editor/rdp-autocomplete-editor.component.ts create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-button/rdp-button.component.css create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-button/rdp-button.component.html create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-button/rdp-button.component.spec.ts create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-button/rdp-button.component.ts create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-checkbox-editor/rdp-checkbox-editor.component.html create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-checkbox-editor/rdp-checkbox-editor.component.scss create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-checkbox-editor/rdp-checkbox-editor.component.spec.ts create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-checkbox-editor/rdp-checkbox-editor.component.ts create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-datepicker-editor/rdp-datepicker-editor.component.html create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-datepicker-editor/rdp-datepicker-editor.component.scss create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-datepicker-editor/rdp-datepicker-editor.component.spec.ts create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-datepicker-editor/rdp-datepicker-editor.component.ts create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-icon-button/rdp-icon-button.component.css create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-icon-button/rdp-icon-button.component.html create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-icon-button/rdp-icon-button.component.spec.ts create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-icon-button/rdp-icon-button.component.ts create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-input-editor/rdp-input-editor.component.html create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-input-editor/rdp-input-editor.component.scss create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-input-editor/rdp-input-editor.component.spec.ts create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-input-editor/rdp-input-editor.component.ts create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-radio-editor/rdp-radio-editor.component.html create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-radio-editor/rdp-radio-editor.component.scss create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-radio-editor/rdp-radio-editor.component.spec.ts create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-radio-editor/rdp-radio-editor.component.ts create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-select-editor/rdp-select-editor.component.html create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-select-editor/rdp-select-editor.component.scss create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-select-editor/rdp-select-editor.component.spec.ts create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-select-editor/rdp-select-editor.component.ts create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-textarea-editor/rdp-textarea-editor.component.html create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-textarea-editor/rdp-textarea-editor.component.scss create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-textarea-editor/rdp-textarea-editor.component.spec.ts create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-textarea-editor/rdp-textarea-editor.component.ts create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-column/rdp-column.component.html create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-column/rdp-column.component.scss create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-column/rdp-column.component.spec.ts create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-column/rdp-column.component.ts create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-data-table/rdp-data-table-edit/rdp-data-table-edit.component.html create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-data-table/rdp-data-table-edit/rdp-data-table-edit.component.scss create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-data-table/rdp-data-table-edit/rdp-data-table-edit.component.spec.ts create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-data-table/rdp-data-table-edit/rdp-data-table-edit.component.ts create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-data-table/rdp-data-table.component.html create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-data-table/rdp-data-table.component.scss create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-data-table/rdp-data-table.component.spec.ts create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-data-table/rdp-data-table.component.ts create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-scroll-container/rdp-scroll-container.component.html create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-scroll-container/rdp-scroll-container.component.scss create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-scroll-container/rdp-scroll-container.component.spec.ts create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-scroll-container/rdp-scroll-container.component.ts create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp.module.ts create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/services/rdp-modal.service.spec.ts create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/services/rdp-modal.service.ts create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/shared/rdp-data-table.service.spec.ts create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/shared/rdp-data-table.service.ts create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/shared/rdpCrudInterface.ts create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/styles/_responsive.scss create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/styles/_spinner.scss create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/styles/_utils.scss create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/styles/bootstrap/_alert.scss create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/styles/bootstrap/_badge.scss create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/styles/bootstrap/_breadcrumb.scss create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/styles/bootstrap/_button-group.scss create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/styles/bootstrap/_buttons.scss create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/styles/bootstrap/_card.scss create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/styles/bootstrap/_carousel.scss create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/styles/bootstrap/_close.scss create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/styles/bootstrap/_code.scss create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/styles/bootstrap/_custom-forms.scss create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/styles/bootstrap/_dropdown.scss create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/styles/bootstrap/_forms.scss create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/styles/bootstrap/_functions.scss create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/styles/bootstrap/_grid.scss create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/styles/bootstrap/_images.scss create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/styles/bootstrap/_input-group.scss create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/styles/bootstrap/_jumbotron.scss create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/styles/bootstrap/_list-group.scss create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/styles/bootstrap/_media.scss create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/styles/bootstrap/_mixins.scss create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/styles/bootstrap/_modal.scss create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/styles/bootstrap/_nav.scss create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/styles/bootstrap/_navbar.scss create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/styles/bootstrap/_pagination.scss create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/styles/bootstrap/_popover.scss create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/styles/bootstrap/_print.scss create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/styles/bootstrap/_progress.scss create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/styles/bootstrap/_reboot.scss create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/styles/bootstrap/_root.scss create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/styles/bootstrap/_tables.scss create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/styles/bootstrap/_tooltip.scss create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/styles/bootstrap/_transitions.scss create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/styles/bootstrap/_type.scss create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/styles/bootstrap/_utilities.scss create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/styles/bootstrap/_variables.scss create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/styles/bootstrap/bootstrap-grid.scss create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/styles/bootstrap/bootstrap-reboot.scss create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/styles/bootstrap/bootstrap.scss create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/styles/bootstrap/mixins/_alert.scss create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/styles/bootstrap/mixins/_background-variant.scss create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/styles/bootstrap/mixins/_badge.scss create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/styles/bootstrap/mixins/_border-radius.scss create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/styles/bootstrap/mixins/_box-shadow.scss create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/styles/bootstrap/mixins/_breakpoints.scss create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/styles/bootstrap/mixins/_buttons.scss create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/styles/bootstrap/mixins/_caret.scss create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/styles/bootstrap/mixins/_clearfix.scss create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/styles/bootstrap/mixins/_float.scss create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/styles/bootstrap/mixins/_forms.scss create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/styles/bootstrap/mixins/_gradients.scss create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/styles/bootstrap/mixins/_grid-framework.scss create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/styles/bootstrap/mixins/_grid.scss create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/styles/bootstrap/mixins/_hover.scss create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/styles/bootstrap/mixins/_image.scss create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/styles/bootstrap/mixins/_list-group.scss create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/styles/bootstrap/mixins/_lists.scss create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/styles/bootstrap/mixins/_nav-divider.scss create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/styles/bootstrap/mixins/_navbar-align.scss create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/styles/bootstrap/mixins/_pagination.scss create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/styles/bootstrap/mixins/_reset-text.scss create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/styles/bootstrap/mixins/_resize.scss create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/styles/bootstrap/mixins/_screen-reader.scss create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/styles/bootstrap/mixins/_size.scss create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/styles/bootstrap/mixins/_table-row.scss create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/styles/bootstrap/mixins/_text-emphasis.scss create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/styles/bootstrap/mixins/_text-hide.scss create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/styles/bootstrap/mixins/_text-truncate.scss create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/styles/bootstrap/mixins/_transition.scss create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/styles/bootstrap/mixins/_visibility.scss create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/styles/bootstrap/utilities/_align.scss create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/styles/bootstrap/utilities/_background.scss create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/styles/bootstrap/utilities/_borders.scss create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/styles/bootstrap/utilities/_clearfix.scss create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/styles/bootstrap/utilities/_display.scss create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/styles/bootstrap/utilities/_embed.scss create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/styles/bootstrap/utilities/_flex.scss create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/styles/bootstrap/utilities/_float.scss create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/styles/bootstrap/utilities/_position.scss create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/styles/bootstrap/utilities/_screenreaders.scss create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/styles/bootstrap/utilities/_sizing.scss create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/styles/bootstrap/utilities/_spacing.scss create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/styles/bootstrap/utilities/_text.scss create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/styles/bootstrap/utilities/_visibility.scss create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/styles/prebuilt-themes/deeppurple-amber.css create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/styles/prebuilt-themes/indigo-pink.css create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/styles/prebuilt-themes/pink-bluegrey.css create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/styles/prebuilt-themes/purple-green.css create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/styles/rdp.scss create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/material-module.ts create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/public_api.ts create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/test.ts create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/tsconfig.lib.json create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/tsconfig.spec.json create mode 100644 ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/tslint.json (limited to 'ecomp-sdk/portalsdk-tag-library/projects') diff --git a/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/karma.conf.js b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/karma.conf.js new file mode 100644 index 00000000..4c5f8d03 --- /dev/null +++ b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/karma.conf.js @@ -0,0 +1,31 @@ +// Karma configuration file, see link for more information +// https://karma-runner.github.io/1.0/config/configuration-file.html + +module.exports = function (config) { + config.set({ + basePath: '', + frameworks: ['jasmine', '@angular-devkit/build-angular'], + plugins: [ + require('karma-jasmine'), + require('karma-chrome-launcher'), + require('karma-jasmine-html-reporter'), + require('karma-coverage-istanbul-reporter'), + require('@angular-devkit/build-angular/plugins/karma') + ], + client: { + clearContext: false // leave Jasmine Spec Runner output visible in browser + }, + coverageIstanbulReporter: { + dir: require('path').join(__dirname, '../../coverage'), + reports: ['html', 'lcovonly'], + fixWebpackSourcePaths: true + }, + reporters: ['progress', 'kjhtml'], + port: 9876, + colors: true, + logLevel: config.LOG_INFO, + autoWatch: true, + browsers: ['Chrome'], + singleRun: false + }); +}; diff --git a/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/ng-package.json b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/ng-package.json new file mode 100644 index 00000000..f1054253 --- /dev/null +++ b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/ng-package.json @@ -0,0 +1,7 @@ +{ + "$schema": "../../node_modules/ng-packagr/ng-package.schema.json", + "dest": "../../dist/portalsdk-tag-lib", + "lib": { + "entryFile": "src/public_api.ts" + } +} \ No newline at end of file diff --git a/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/package.json b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/package.json new file mode 100644 index 00000000..aefc983e --- /dev/null +++ b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/package.json @@ -0,0 +1,8 @@ +{ + "name": "portalsdk-tag-lib", + "version": "0.0.1", + "peerDependencies": { + "@angular/common": "^7.0.0", + "@angular/core": "^7.0.0" + } +} \ No newline at end of file diff --git a/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/portalsdk-tag-lib.component.spec.ts b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/portalsdk-tag-lib.component.spec.ts new file mode 100644 index 00000000..b6440f71 --- /dev/null +++ b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/portalsdk-tag-lib.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { PortalsdkTagLibComponent } from './portalsdk-tag-lib.component'; + +describe('PortalsdkTagLibComponent', () => { + let component: PortalsdkTagLibComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ PortalsdkTagLibComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(PortalsdkTagLibComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/portalsdk-tag-lib.component.ts b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/portalsdk-tag-lib.component.ts new file mode 100644 index 00000000..13d3fb6d --- /dev/null +++ b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/portalsdk-tag-lib.component.ts @@ -0,0 +1,19 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'enl-portalsdk-tag-lib', + template: ` +

+ portalsdk-tag-lib works! +

+ `, + styles: [] +}) +export class PortalsdkTagLibComponent implements OnInit { + + constructor() { } + + ngOnInit() { + } + +} diff --git a/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/portalsdk-tag-lib.module.ts b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/portalsdk-tag-lib.module.ts new file mode 100644 index 00000000..e4f1c339 --- /dev/null +++ b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/portalsdk-tag-lib.module.ts @@ -0,0 +1,10 @@ +import { NgModule } from '@angular/core'; +import { PortalsdkTagLibComponent } from './portalsdk-tag-lib.component'; + +@NgModule({ + declarations: [PortalsdkTagLibComponent], + imports: [ + ], + exports: [PortalsdkTagLibComponent] +}) +export class PortalsdkTagLibModule { } diff --git a/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/portalsdk-tag-lib.service.spec.ts b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/portalsdk-tag-lib.service.spec.ts new file mode 100644 index 00000000..bad744fb --- /dev/null +++ b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/portalsdk-tag-lib.service.spec.ts @@ -0,0 +1,12 @@ +import { TestBed } from '@angular/core/testing'; + +import { PortalsdkTagLibService } from './portalsdk-tag-lib.service'; + +describe('PortalsdkTagLibService', () => { + beforeEach(() => TestBed.configureTestingModule({})); + + it('should be created', () => { + const service: PortalsdkTagLibService = TestBed.get(PortalsdkTagLibService); + expect(service).toBeTruthy(); + }); +}); diff --git a/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/portalsdk-tag-lib.service.ts b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/portalsdk-tag-lib.service.ts new file mode 100644 index 00000000..d003e747 --- /dev/null +++ b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/portalsdk-tag-lib.service.ts @@ -0,0 +1,9 @@ +import { Injectable } from '@angular/core'; + +@Injectable({ + providedIn: 'root' +}) +export class PortalsdkTagLibService { + + constructor() { } +} diff --git a/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/assets/images/spinner.gif b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/assets/images/spinner.gif new file mode 100644 index 00000000..c97ec6ea Binary files /dev/null and b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/assets/images/spinner.gif differ diff --git a/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/datasouce/RDPDataSource.ts b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/datasouce/RDPDataSource.ts new file mode 100644 index 00000000..5a1ca7d5 --- /dev/null +++ b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/datasouce/RDPDataSource.ts @@ -0,0 +1,72 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2019 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the "License"); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the "License"); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * + */ + +import { CollectionViewer, DataSource } from "@angular/cdk/collections"; +import { Observable, BehaviorSubject, of } from 'rxjs'; +import { RdpDataTableService } from '../shared/rdp-data-table.service'; +import { catchError , finalize} from 'rxjs/operators'; + +export class RDPDataSource extends DataSource { + + private dataSubject = new BehaviorSubject([]); + private loadingSubject = new BehaviorSubject(false); + public loading$ = this.loadingSubject.asObservable(); + + constructor() { + super(); + } + + loadData(applicationService: any, filter:string, sortActive: string, sortDirection:string, pageIndex:number, pageSize:number) { + this.loadingSubject.next(true); + applicationService.loadTableData(filter, sortActive, sortDirection, + pageIndex, pageSize).pipe( + catchError(() => of([])), + finalize(() => this.loadingSubject.next(false)) + ) + .subscribe(data => this.dataSubject.next(data)); + } + + connect(collectionViewer: CollectionViewer): Observable { + return this.dataSubject.asObservable(); + } + + disconnect(collectionViewer: CollectionViewer): void { + this.dataSubject.complete(); + this.loadingSubject.complete(); + } +} \ No newline at end of file diff --git a/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/model/column.ts b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/model/column.ts new file mode 100644 index 00000000..f5bda1fe --- /dev/null +++ b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/model/column.ts @@ -0,0 +1,68 @@ +/*- + * ============LICENSE_START========================================== + * ONAP Portal-SDK + * =================================================================== + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the "License"); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the "License"); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * + */ + +export class Column { + title:string; + dispalyTitle:string; + type:ColumnTypes; + sort:boolean; + isColumnDisabled:boolean + listData = []; + + constructor(title:string, dispalyTitle:string, type:ColumnTypes, sort:boolean, listData) { + this.title = title; + this.dispalyTitle = dispalyTitle; + this.type = type + this.sort = sort; + this.isColumnDisabled = false; + this.listData = listData; + } + + set setIsColumnDisabled(value: boolean) { + this.isColumnDisabled = value; + } +} + +export enum ColumnTypes { + DROPDOWN = "dropdown", + TEXT = "text", + RADIO = "radio", + CHECKBOX = "checkbox", + TEXTAREA = "textarea", + DATE_PICKER = "datepicker" +} \ No newline at end of file diff --git a/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/model/data-table-settings.ts b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/model/data-table-settings.ts new file mode 100644 index 00000000..799fcdd0 --- /dev/null +++ b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/model/data-table-settings.ts @@ -0,0 +1,142 @@ +/*- + * ============LICENSE_START========================================== + * ONAP Portal-SDK + * =================================================================== + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the "License"); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the "License"); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * + */ + +import { Column } from './column'; + +export class DataTableSettings { + + private _columns: Array = []; + private _paginationsSize:string; + private _isPaginationEnabled:boolean; + private _isTableSearchEnabled: boolean; + private _isReadOnly: boolean; + private _isServerSidePaginationEnabled: boolean; + private _isServerSideSortingEnabled: boolean; + private _toggleEnabled: boolean; + private _applicationService: any; + private _modalPopupTitle: string; + + constructor() { + this._paginationsSize="10"; + this._isPaginationEnabled = true; + this._isReadOnly = false; + this._isTableSearchEnabled = true; + this._toggleEnabled = false; + } + + get columns(): Array { + return this._columns; + } + + set columns(value: Array) { + this._columns = value; + } + + get isPaginationEnabled(): boolean { + return this._isPaginationEnabled; + } + + set isPaginationEnabled(value: boolean) { + this._isPaginationEnabled = value; + } + + get paginationsSize(): string { + return this._paginationsSize; + } + + set paginationsSize(value: string) { + this._paginationsSize = value; + } + + get isReadOnly(): boolean { + return this._isReadOnly; + } + + set isReadOnly(value: boolean) { + this._isReadOnly = value; + } + + get isServerSidePaginationEnabled (): boolean { + return this._isServerSidePaginationEnabled ; + } + + set isServerSidePaginationEnabled(value: boolean) { + this._isServerSidePaginationEnabled = value; + } + + get isServerSideSortingEnabled(): boolean { + return this._isServerSideSortingEnabled; + } + + set isServerSideSortingEnabled(value: boolean) { + this._isServerSideSortingEnabled = value; + } + + get isTableSearchEnabled(): boolean { + return this._isTableSearchEnabled; + } + + set isTableSearchEnabled(value: boolean) { + this._isTableSearchEnabled = value; + } + + get isToggleEnabled(): boolean { + return this._toggleEnabled; + } + + set isToggleEnabled(value: boolean) { + this._toggleEnabled = value; + } + + get applicationService(): any { + return this._applicationService; + } + + set applicationService(value: any) { + this._applicationService = value; + } + + get modalPopupTitle(): string { + return this._modalPopupTitle; + } + + set modalPopupTitle(value: string) { + this._modalPopupTitle = value; + } + +} \ No newline at end of file diff --git a/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-autocomplete-editor/rdp-autocomplete-editor.component.html b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-autocomplete-editor/rdp-autocomplete-editor.component.html new file mode 100644 index 00000000..9df70a7b --- /dev/null +++ b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-autocomplete-editor/rdp-autocomplete-editor.component.html @@ -0,0 +1,3 @@ +

+ rdp-autocomplete-editor works! +

diff --git a/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-autocomplete-editor/rdp-autocomplete-editor.component.scss b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-autocomplete-editor/rdp-autocomplete-editor.component.scss new file mode 100644 index 00000000..e69de29b diff --git a/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-autocomplete-editor/rdp-autocomplete-editor.component.spec.ts b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-autocomplete-editor/rdp-autocomplete-editor.component.spec.ts new file mode 100644 index 00000000..99c8a6be --- /dev/null +++ b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-autocomplete-editor/rdp-autocomplete-editor.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { RdpAutocompleteEditorComponent } from './rdp-autocomplete-editor.component'; + +describe('RdpAutocompleteEditorComponent', () => { + let component: RdpAutocompleteEditorComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ RdpAutocompleteEditorComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(RdpAutocompleteEditorComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-autocomplete-editor/rdp-autocomplete-editor.component.ts b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-autocomplete-editor/rdp-autocomplete-editor.component.ts new file mode 100644 index 00000000..5ca328f9 --- /dev/null +++ b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-autocomplete-editor/rdp-autocomplete-editor.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'rdp-rdp-autocomplete-editor', + templateUrl: './rdp-autocomplete-editor.component.html', + styleUrls: ['./rdp-autocomplete-editor.component.scss'] +}) +export class RdpAutocompleteEditorComponent implements OnInit { + + constructor() { } + + ngOnInit() { + } + +} diff --git a/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-button/rdp-button.component.css b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-button/rdp-button.component.css new file mode 100644 index 00000000..e69de29b diff --git a/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-button/rdp-button.component.html b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-button/rdp-button.component.html new file mode 100644 index 00000000..3cddeaab --- /dev/null +++ b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-button/rdp-button.component.html @@ -0,0 +1,3 @@ +

+ rdp-button works! +

diff --git a/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-button/rdp-button.component.spec.ts b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-button/rdp-button.component.spec.ts new file mode 100644 index 00000000..e2645f9a --- /dev/null +++ b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-button/rdp-button.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { RdpButtonComponent } from './rdp-button.component'; + +describe('RdpButtonComponent', () => { + let component: RdpButtonComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ RdpButtonComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(RdpButtonComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-button/rdp-button.component.ts b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-button/rdp-button.component.ts new file mode 100644 index 00000000..49f51ce1 --- /dev/null +++ b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-button/rdp-button.component.ts @@ -0,0 +1,31 @@ +import { Component, OnInit, Output, EventEmitter, Input } from '@angular/core'; + +@Component({ + selector: 'rdp-button', + styleUrls: ['./rdp-button.component.css'], + template: ` + + ` +}) +export class RdpButtonComponent implements OnInit { + + @Output() rdpClick = new EventEmitter(); + @Input() isDisabled:boolean = false; + @Input() text = "Button Name"; + + constructor() { } + + ngOnInit() { + } + + emitClickEvent(){ + this.rdpClick.emit(); + } + + +// Usage Example 1: +// +// Example 2: +// + +} diff --git a/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-checkbox-editor/rdp-checkbox-editor.component.html b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-checkbox-editor/rdp-checkbox-editor.component.html new file mode 100644 index 00000000..d6b35d82 --- /dev/null +++ b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-checkbox-editor/rdp-checkbox-editor.component.html @@ -0,0 +1,3 @@ +

+ rdp-checkbox-editor works! +

diff --git a/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-checkbox-editor/rdp-checkbox-editor.component.scss b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-checkbox-editor/rdp-checkbox-editor.component.scss new file mode 100644 index 00000000..e69de29b diff --git a/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-checkbox-editor/rdp-checkbox-editor.component.spec.ts b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-checkbox-editor/rdp-checkbox-editor.component.spec.ts new file mode 100644 index 00000000..ac853d35 --- /dev/null +++ b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-checkbox-editor/rdp-checkbox-editor.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { RdpCheckboxEditorComponent } from './rdp-checkbox-editor.component'; + +describe('RdpCheckboxEditorComponent', () => { + let component: RdpCheckboxEditorComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ RdpCheckboxEditorComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(RdpCheckboxEditorComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-checkbox-editor/rdp-checkbox-editor.component.ts b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-checkbox-editor/rdp-checkbox-editor.component.ts new file mode 100644 index 00000000..407c745a --- /dev/null +++ b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-checkbox-editor/rdp-checkbox-editor.component.ts @@ -0,0 +1,28 @@ +import { Component, OnInit, Input } from '@angular/core'; + +@Component({ + selector: 'rdp-checkbox-editor', + styleUrls: ['./rdp-checkbox-editor.component.scss'], + template:` +
+ {{columntitle}} + +
+ ` +}) +export class RdpCheckboxEditorComponent implements OnInit { + + @Input() rowdata :any; + @Input() columntitle: any + columnValue: any; + + constructor() { } + + ngOnInit() { + console.log("RdpCheckboxEditorComponent Row Data ::: ",this.rowdata); + let rowObj = JSON.parse(this.rowdata); + let column = this.columntitle; + this.columnValue = rowObj[column]; + } + +} diff --git a/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-datepicker-editor/rdp-datepicker-editor.component.html b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-datepicker-editor/rdp-datepicker-editor.component.html new file mode 100644 index 00000000..c2812074 --- /dev/null +++ b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-datepicker-editor/rdp-datepicker-editor.component.html @@ -0,0 +1,3 @@ +

+ rdp-datepicker-editor works! +

diff --git a/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-datepicker-editor/rdp-datepicker-editor.component.scss b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-datepicker-editor/rdp-datepicker-editor.component.scss new file mode 100644 index 00000000..e69de29b diff --git a/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-datepicker-editor/rdp-datepicker-editor.component.spec.ts b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-datepicker-editor/rdp-datepicker-editor.component.spec.ts new file mode 100644 index 00000000..cb96a653 --- /dev/null +++ b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-datepicker-editor/rdp-datepicker-editor.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { RdpDatepickerEditorComponent } from './rdp-datepicker-editor.component'; + +describe('RdpDatepickerEditorComponent', () => { + let component: RdpDatepickerEditorComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ RdpDatepickerEditorComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(RdpDatepickerEditorComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-datepicker-editor/rdp-datepicker-editor.component.ts b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-datepicker-editor/rdp-datepicker-editor.component.ts new file mode 100644 index 00000000..fc99c7bf --- /dev/null +++ b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-datepicker-editor/rdp-datepicker-editor.component.ts @@ -0,0 +1,30 @@ +import { Component, OnInit, Input } from '@angular/core'; + +@Component({ + selector: 'rdp-datepicker-editor', + styleUrls: ['./rdp-datepicker-editor.component.scss'], + template:` + + + + + + ` +}) +export class RdpDatepickerEditorComponent implements OnInit { + + @Input() rowdata :any; + @Input() columntitle: any + + columnValue: any; + + constructor() { } + + ngOnInit() { + console.log("RdpDatepickerEditorComponent Row Data ::: ",this.rowdata); + let rowObj = JSON.parse(this.rowdata); + let column = this.columntitle; + this.columnValue = rowObj[column]; + } +} \ No newline at end of file diff --git a/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-icon-button/rdp-icon-button.component.css b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-icon-button/rdp-icon-button.component.css new file mode 100644 index 00000000..e69de29b diff --git a/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-icon-button/rdp-icon-button.component.html b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-icon-button/rdp-icon-button.component.html new file mode 100644 index 00000000..fd44ac1a --- /dev/null +++ b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-icon-button/rdp-icon-button.component.html @@ -0,0 +1,3 @@ +

+ rdp-icon-button works! +

diff --git a/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-icon-button/rdp-icon-button.component.spec.ts b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-icon-button/rdp-icon-button.component.spec.ts new file mode 100644 index 00000000..56520293 --- /dev/null +++ b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-icon-button/rdp-icon-button.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { RdpIconButtonComponent } from './rdp-icon-button.component'; + +describe('RdpIconButtonComponent', () => { + let component: RdpIconButtonComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ RdpIconButtonComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(RdpIconButtonComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-icon-button/rdp-icon-button.component.ts b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-icon-button/rdp-icon-button.component.ts new file mode 100644 index 00000000..225f739d --- /dev/null +++ b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-icon-button/rdp-icon-button.component.ts @@ -0,0 +1,36 @@ +import { Component, OnInit, Output, EventEmitter, Input } from '@angular/core'; + +@Component({ + selector: 'rdp-icon-button', + styleUrls: ['./rdp-icon-button.component.css'], + template: ` + +` +}) +export class RdpIconButtonComponent implements OnInit { + + @Output() rdpClick = new EventEmitter(); + @Input() isDisabled:boolean = false; + @Input() text = "Button Name"; + @Input() icon : string; + + + constructor() { } + + ngOnInit() { + } + + emitClickEvent(){ + this.rdpClick.emit(); + } + +// Example usage: ( Needs Testing: ) +// ================================== +// +// Note: Ensure the text and icon strings are enslosed in this formt : "' <> '" + + +} diff --git a/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-input-editor/rdp-input-editor.component.html b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-input-editor/rdp-input-editor.component.html new file mode 100644 index 00000000..af464510 --- /dev/null +++ b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-input-editor/rdp-input-editor.component.html @@ -0,0 +1,3 @@ +

+ rdp-input-editor works! +

diff --git a/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-input-editor/rdp-input-editor.component.scss b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-input-editor/rdp-input-editor.component.scss new file mode 100644 index 00000000..6e53e96f --- /dev/null +++ b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-input-editor/rdp-input-editor.component.scss @@ -0,0 +1,3 @@ +.input-editor{ + width: 31em; +} \ No newline at end of file diff --git a/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-input-editor/rdp-input-editor.component.spec.ts b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-input-editor/rdp-input-editor.component.spec.ts new file mode 100644 index 00000000..2b6b6bfd --- /dev/null +++ b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-input-editor/rdp-input-editor.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { RdpInputEditorComponent } from './rdp-input-editor.component'; + +describe('RdpInputEditorComponent', () => { + let component: RdpInputEditorComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ RdpInputEditorComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(RdpInputEditorComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-input-editor/rdp-input-editor.component.ts b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-input-editor/rdp-input-editor.component.ts new file mode 100644 index 00000000..31c9e9d7 --- /dev/null +++ b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-input-editor/rdp-input-editor.component.ts @@ -0,0 +1,42 @@ +import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core'; + +@Component({ + selector: 'rdp-input-editor', + styleUrls: ['./rdp-input-editor.component.scss'], + template: ` + + ` +}) +export class RdpInputEditorComponent implements OnInit { + + @Input() rowdata: any; + @Input() columntitle: any + @Input() disabled: boolean; + + @Output() changedColumnValue = new EventEmitter(); + + columnValue: any; + isColumnDisabled:boolean; + + constructor() { } + + ngOnInit() { + if (this.rowdata != null || this.rowdata != undefined) { + let rowObj = JSON.parse(this.rowdata); + let column = this.columntitle; + this.columnValue = rowObj[column]; + } else { + this.columnValue = null; + } + this.isColumnDisabled = this.disabled; + } + + detectChange(changedValue) { + this.changedColumnValue.emit(changedValue); + } + +} diff --git a/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-radio-editor/rdp-radio-editor.component.html b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-radio-editor/rdp-radio-editor.component.html new file mode 100644 index 00000000..a8618070 --- /dev/null +++ b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-radio-editor/rdp-radio-editor.component.html @@ -0,0 +1,6 @@ + + + {{element}} + + \ No newline at end of file diff --git a/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-radio-editor/rdp-radio-editor.component.scss b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-radio-editor/rdp-radio-editor.component.scss new file mode 100644 index 00000000..e69de29b diff --git a/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-radio-editor/rdp-radio-editor.component.spec.ts b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-radio-editor/rdp-radio-editor.component.spec.ts new file mode 100644 index 00000000..28207ab8 --- /dev/null +++ b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-radio-editor/rdp-radio-editor.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { RdpRadioEditorComponent } from './rdp-radio-editor.component'; + +describe('RdpRadioEditorComponent', () => { + let component: RdpRadioEditorComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ RdpRadioEditorComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(RdpRadioEditorComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-radio-editor/rdp-radio-editor.component.ts b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-radio-editor/rdp-radio-editor.component.ts new file mode 100644 index 00000000..e459c20c --- /dev/null +++ b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-radio-editor/rdp-radio-editor.component.ts @@ -0,0 +1,36 @@ +import { Component, OnInit, Input , EventEmitter, Output} from '@angular/core'; +import { MatRadioButton, MatRadioChange } from '@angular/material'; + +@Component({ + selector: 'rdp-radio-editor', + templateUrl: './rdp-radio-editor.component.html', + styleUrls: ['./rdp-radio-editor.component.scss'] +}) +export class RdpRadioEditorComponent implements OnInit { + @Input() rowdata :any; + @Input() columntitle: any + @Input() data: any[]; + @Output() changedColumnValue = new EventEmitter(); + columnValue: any; + selectedValue : any; + + constructor() { } + + ngOnInit() { + if (this.rowdata != null || this.rowdata != undefined) { + let rowObj = JSON.parse(this.rowdata); + let column = this.columntitle; + this.columnValue = rowObj[column]; + + } else { + this.columnValue = null; + } + this.selectedValue = this.columnValue; + console.log(" this.selected :::", this.selectedValue); + } + + onChange(changedValue){ + this.changedColumnValue.emit(changedValue.value); + } + +} diff --git a/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-select-editor/rdp-select-editor.component.html b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-select-editor/rdp-select-editor.component.html new file mode 100644 index 00000000..03621f97 --- /dev/null +++ b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-select-editor/rdp-select-editor.component.html @@ -0,0 +1,3 @@ +

+ rdp-select-editor works! +

diff --git a/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-select-editor/rdp-select-editor.component.scss b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-select-editor/rdp-select-editor.component.scss new file mode 100644 index 00000000..e69de29b diff --git a/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-select-editor/rdp-select-editor.component.spec.ts b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-select-editor/rdp-select-editor.component.spec.ts new file mode 100644 index 00000000..4f48efc9 --- /dev/null +++ b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-select-editor/rdp-select-editor.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { RdpSelectEditorComponent } from './rdp-select-editor.component'; + +describe('RdpSelectEditorComponent', () => { + let component: RdpSelectEditorComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ RdpSelectEditorComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(RdpSelectEditorComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-select-editor/rdp-select-editor.component.ts b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-select-editor/rdp-select-editor.component.ts new file mode 100644 index 00000000..a657a000 --- /dev/null +++ b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-select-editor/rdp-select-editor.component.ts @@ -0,0 +1,43 @@ +import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core'; + +@Component({ + selector: 'rdp-select-editor', + styleUrls: ['./rdp-select-editor.component.scss'], + template: ` + + + {{item.name}} + + + ` +}) +export class RdpSelectEditorComponent implements OnInit { + + @Input() rowdata: any; + @Input() columntitle: any; + @Input() data: any[]; + @Output() changedColumnValue = new EventEmitter(); + selected: any; + columnValue: any; + + constructor() { } + + ngOnInit() { + if (this.rowdata != null || this.rowdata != undefined) { + let rowObj = JSON.parse(this.rowdata); + let column = this.columntitle; + this.columnValue = rowObj[column]; + + } else { + this.columnValue = null; + } + this.selected = this.columnValue; + console.log(" this.selected :::", this.selected); + } + + detectChange(changedValue) { + this.changedColumnValue.emit(changedValue); + } + +} diff --git a/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-textarea-editor/rdp-textarea-editor.component.html b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-textarea-editor/rdp-textarea-editor.component.html new file mode 100644 index 00000000..13ef41dd --- /dev/null +++ b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-textarea-editor/rdp-textarea-editor.component.html @@ -0,0 +1,3 @@ +

+ rdp-textarea-editor works! +

diff --git a/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-textarea-editor/rdp-textarea-editor.component.scss b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-textarea-editor/rdp-textarea-editor.component.scss new file mode 100644 index 00000000..e69de29b diff --git a/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-textarea-editor/rdp-textarea-editor.component.spec.ts b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-textarea-editor/rdp-textarea-editor.component.spec.ts new file mode 100644 index 00000000..a9db92bb --- /dev/null +++ b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-textarea-editor/rdp-textarea-editor.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { RdpTextareaEditorComponent } from './rdp-textarea-editor.component'; + +describe('RdpTextareaEditorComponent', () => { + let component: RdpTextareaEditorComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ RdpTextareaEditorComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(RdpTextareaEditorComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-textarea-editor/rdp-textarea-editor.component.ts b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-textarea-editor/rdp-textarea-editor.component.ts new file mode 100644 index 00000000..afe67873 --- /dev/null +++ b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-cell-editor/rdp-textarea-editor/rdp-textarea-editor.component.ts @@ -0,0 +1,28 @@ +import { Component, OnInit, Input } from '@angular/core'; + +@Component({ + selector: 'rdp-textarea-editor', + styleUrls: ['./rdp-textarea-editor.component.scss'], + template:` + + ` +}) +export class RdpTextareaEditorComponent implements OnInit { + + @Input() rowdata :any; + @Input() columntitle: any + columnValue: any; + + + constructor() { } + + ngOnInit() { + console.log("RdpTextareaEditorComponent Row Data ::: ",this.rowdata); + let rowObj = JSON.parse(this.rowdata); + let column = this.columntitle; + this.columnValue = rowObj[column]; + } + +} diff --git a/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-column/rdp-column.component.html b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-column/rdp-column.component.html new file mode 100644 index 00000000..d9b9f287 --- /dev/null +++ b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-column/rdp-column.component.html @@ -0,0 +1,3 @@ +

+ rdp-column works! +

diff --git a/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-column/rdp-column.component.scss b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-column/rdp-column.component.scss new file mode 100644 index 00000000..47f3f482 --- /dev/null +++ b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-column/rdp-column.component.scss @@ -0,0 +1,40 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2019 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the "License"); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the "License"); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * + */ +.icon-trash{ + cursor: pointer; +} \ No newline at end of file diff --git a/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-column/rdp-column.component.spec.ts b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-column/rdp-column.component.spec.ts new file mode 100644 index 00000000..115126c5 --- /dev/null +++ b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-column/rdp-column.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { RdpColumnComponent } from './rdp-column.component'; + +describe('RdpColumnComponent', () => { + let component: RdpColumnComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ RdpColumnComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(RdpColumnComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-column/rdp-column.component.ts b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-column/rdp-column.component.ts new file mode 100644 index 00000000..52750203 --- /dev/null +++ b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-column/rdp-column.component.ts @@ -0,0 +1,122 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2019 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the "License"); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the "License"); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * + */ + +import {coerceBooleanProperty} from '@angular/cdk/coercion'; +import {Component, Input, OnDestroy, OnInit, Optional, ViewChild, ContentChild, TemplateRef} from '@angular/core'; +import {MatSortHeader} from '@angular/material'; +import {MatColumnDef, MatTable} from '@angular/material'; + +@Component({ + selector: 'rdp-column', + template: ` + +
+ {{ label }} +
+
+ {{ label }} +
+ + {{ getData(data) }} + +
` +}) +export class RdpColumnComponent implements OnDestroy, OnInit { + + // @ContentChild(TemplateRef) template: TemplateRef; + // @ContentChild('colContent') colContentTmpl: TemplateRef; + + /** Column name that should be used to reference this column. */ + @Input() + get name(): string { return this._name; } + set name(name: string) { + this._name = name; + this.columnDef.name = name; + } + _name: string; + + /** + * Text label that should be used for the column header. If this property is not + * set, the header text will default to the column name. + */ + @Input() label: string; + + /** + * Text label that should be used for the column header. If this property is not + * set, the header text will default to the column name. + */ + @Input() sort: boolean; + + /** + * Accessor function to retrieve the data should be provided to the cell. If this + * property is not set, the data cells will assume that the column name is the same + * as the data property the cells should display. + */ + @Input() dataAccessor: ((data: T, name: string) => string); + + @ViewChild(MatColumnDef) columnDef: MatColumnDef; + @ViewChild(MatSortHeader) sortHeader: MatSortHeader; + + constructor(@Optional() public table: MatTable) {} + + _sortable: boolean; + + ngOnInit() { + if (this.table) { + //console.log("Column name --"+this._name+ " Is Sorting applied ",this.sort); + this._sortable = coerceBooleanProperty(this.sort); + //console.log("this._sortable ",this._sortable); + if(this._name === 'delete' || this._name === 'edit'){ + //Don't add delete column as this column is not added dynamically. + }else{ + this.table.addColumnDef(this.columnDef); + } + } + } + + ngOnDestroy() { + if (this.table) { + this.table.removeColumnDef(this.columnDef); + } + } + + getData(data: T): any { + return this.dataAccessor ? this.dataAccessor(data, this.name) : (data as any)[this.name]; + } +} + diff --git a/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-data-table/rdp-data-table-edit/rdp-data-table-edit.component.html b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-data-table/rdp-data-table-edit/rdp-data-table-edit.component.html new file mode 100644 index 00000000..8a967121 --- /dev/null +++ b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-data-table/rdp-data-table-edit/rdp-data-table-edit.component.html @@ -0,0 +1,92 @@ + + +
+ + + + + +
\ No newline at end of file diff --git a/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-data-table/rdp-data-table-edit/rdp-data-table-edit.component.scss b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-data-table/rdp-data-table-edit/rdp-data-table-edit.component.scss new file mode 100644 index 00000000..e69de29b diff --git a/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-data-table/rdp-data-table-edit/rdp-data-table-edit.component.spec.ts b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-data-table/rdp-data-table-edit/rdp-data-table-edit.component.spec.ts new file mode 100644 index 00000000..755e33d9 --- /dev/null +++ b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-data-table/rdp-data-table-edit/rdp-data-table-edit.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { RdpDataTableEditComponent } from './rdp-data-table-edit.component'; + +describe('RdpDataTableEditComponent', () => { + let component: RdpDataTableEditComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ RdpDataTableEditComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(RdpDataTableEditComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-data-table/rdp-data-table-edit/rdp-data-table-edit.component.ts b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-data-table/rdp-data-table-edit/rdp-data-table-edit.component.ts new file mode 100644 index 00000000..ede8aa25 --- /dev/null +++ b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-data-table/rdp-data-table-edit/rdp-data-table-edit.component.ts @@ -0,0 +1,46 @@ +import { Component, OnInit, Input, EventEmitter, Output } from '@angular/core'; +import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; +import { RdpDataTableService } from '../../shared/rdp-data-table.service'; + +@Component({ + selector: 'rdp-rdp-data-table-edit', + templateUrl: './rdp-data-table-edit.component.html', + styleUrls: ['./rdp-data-table-edit.component.scss'] +}) +export class RdpDataTableEditComponent implements OnInit { + + @Input() settings: any; + @Input() rowdata: any; + @Input() isEditMode: boolean; + @Output() passEntry: EventEmitter = new EventEmitter(); + modalPopupTitle: string; + selectedRowData: any; + public columnsInfoList = []; + + constructor(public activeModal: NgbActiveModal, public rdpDataTableService: RdpDataTableService) { } + + ngOnInit() { + this.modalPopupTitle = "Edit"; + if (this.rowdata) { + this.selectedRowData = JSON.stringify(this.rowdata); + } + if (this.settings) { + if (this.settings.modalPopupTitle) { + this.modalPopupTitle = this.settings.modalPopupTitle; + } + for (var index in this.settings.columns) { + this.columnsInfoList.push(this.settings.columns[index]); + } + } + } + + saveChanges() { + this.passEntry.emit(this.rowdata); + this.activeModal.close(); + } + + columnDataChanged($event, columnTitle) { + this.rowdata[columnTitle] = $event; + } + +} diff --git a/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-data-table/rdp-data-table.component.html b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-data-table/rdp-data-table.component.html new file mode 100644 index 00000000..a87a7b70 --- /dev/null +++ b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-data-table/rdp-data-table.component.html @@ -0,0 +1,57 @@ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Edit + + + + Delete + + + + Active? + +
+ +
+ +
+
\ No newline at end of file diff --git a/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-data-table/rdp-data-table.component.scss b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-data-table/rdp-data-table.component.scss new file mode 100644 index 00000000..4bc8e11b --- /dev/null +++ b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-data-table/rdp-data-table.component.scss @@ -0,0 +1,34 @@ +.icon-trash{ + cursor: pointer; +} + +.table-search-box { + float: right; +} + +::ng-deep .table-search-box .mat-form-field-infix { + display: block; + position: relative; + flex: auto; + min-width: 0; + width: 340px; +} + +:host { + justify-content: flex-start; + display: flex; + flex-direction: column; +} + +rdp-scroll-container { + flex-grow: 0; + flex-shrink: 0; +} + +rdp-scroll-container.full { + flex-basis: auto; +} + +rdp-scroll-container.part { + flex-basis: 200px; +} \ No newline at end of file diff --git a/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-data-table/rdp-data-table.component.spec.ts b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-data-table/rdp-data-table.component.spec.ts new file mode 100644 index 00000000..dc063ef2 --- /dev/null +++ b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-data-table/rdp-data-table.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { RdpDataTableComponent } from './rdp-data-table.component'; + +describe('RdpDataTableComponent', () => { + let component: RdpDataTableComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ RdpDataTableComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(RdpDataTableComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-data-table/rdp-data-table.component.ts b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-data-table/rdp-data-table.component.ts new file mode 100644 index 00000000..7187ca07 --- /dev/null +++ b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-data-table/rdp-data-table.component.ts @@ -0,0 +1,266 @@ +/* + * ============LICENSE_START========================================== + * ONAP Portal SDK + * =================================================================== + * Copyright © 2019 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the "License"); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the "License"); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * + */ + +import { Component, Input, OnInit, OnChanges, ViewChild, AfterViewInit, ElementRef} from '@angular/core'; +import { MatPaginator, MatSort, MatTable, MatTableDataSource } from '@angular/material'; +import { NgbModal } from '@ng-bootstrap/ng-bootstrap'; +import { RdpDataTableService } from '../shared/rdp-data-table.service'; +import { RdpDataTableEditComponent } from './rdp-data-table-edit/rdp-data-table-edit.component'; +import { noop as _noop, update } from 'lodash-es'; +import { RDPDataSource } from '../datasouce/RDPDataSource'; +import { debounceTime, distinctUntilChanged, tap } from 'rxjs/operators'; +import { merge, fromEvent } from "rxjs"; +import { RdpModalService } from '../services/rdp-modal.service'; + + +@Component({ + selector: 'rdp-data-table', + templateUrl: './rdp-data-table.component.html', + styleUrls: ['./rdp-data-table.component.scss'] +}) +export class RdpDataTableComponent implements OnChanges, AfterViewInit, OnInit { + + @Input() data: any; + @Input() settings: any; + + @ViewChild(MatSort) sort: MatSort; + @ViewChild(MatPaginator) paginator: MatPaginator; + @ViewChild(MatTable) table: MatTable; + @ViewChild('input') input: ElementRef; + + limit: number = 1000; + full: boolean = true; + applicationService: any; + public displayedColumns = []; + public columnsInfoList = []; + public dataSource; + isPaginationRequired: boolean = false; + pageSize: number = 5; + isEditMode: boolean; + isSearchEnabled: boolean; + isServerSidePaginationEnabled: boolean = false; + showAddButton: boolean = true; + result : any; + totalRowsCount: any; + + + constructor(public dataTableService: RdpDataTableService, private rdpModal: RdpModalService) { } + + ngOnInit(): void { + if (this.data) { + this.setData(this.data); + } + } + + ngAfterViewInit() { + if(this.isServerSidePaginationEnabled){ + + this.sort.sortChange.subscribe(() => this.paginator.pageIndex = 0); + + fromEvent(this.input.nativeElement,'keyup') + .pipe( + debounceTime(150), + distinctUntilChanged(), + tap(() => { + this.paginator.pageIndex = 0; + + this.loadData(this.paginator.pageIndex, this.paginator.pageSize); + }) + ).subscribe(); + + merge(this.sort.sortChange, this.paginator.page) + .pipe( + tap(() => this.loadData(this.paginator.pageIndex, this.paginator.pageSize)) + ).subscribe(); + } + + this.dataSource.paginator = this.paginator; + this.dataSource.sort = this.sort; + } + + ngOnChanges() { + if (this.settings) { + console.log("Table setting Objects >>>>", this.settings); + + this.applicationService = this.settings.applicationService; + + this.settings.columns.forEach(element => { + this.displayedColumns.push(element.title); + this.columnsInfoList.push(element); + }); + + if (!this.settings.isReadOnly) { + this.displayedColumns.push('edit'); + } + + if (!this.settings.isReadOnly) { + this.displayedColumns.push('delete'); + } + + if (this.settings.isReadOnly) { + this.showAddButton = false; + } + + if (this.settings.isTableSearchEnabled) { + this.isSearchEnabled = true; + } + + if(this.settings.isServerSidePaginationEnabled){ + this.isServerSidePaginationEnabled = true; + } + + if (this.settings.isToggleEnabled) { + this.displayedColumns.push('toggle'); + } + + if (this.settings.isPaginationEnabled) { + this.isPaginationRequired = true; + if (this.settings.paginationsSize) { + this.pageSize = this.settings.paginationsSize; + } + } + console.log("this.displayedColumns>>>>>", this.displayedColumns); + } + } + + setData(data) { + if(this.settings.isServerSidePaginationEnabled){ + console.log("Server side pagination is enabled"); + this.dataSource = new RDPDataSource(); + this.dataSource.loadData(this.settings.applicationService,'', this.sort.active, this.sort.direction, 0, this.settings.paginationsSize); + this.totalRowsCount = this.getTotalRowCount(); + + }else{ + this.dataSource = new MatTableDataSource([]); + console.log("Server side pagination is not enabled"); + if (Array.isArray(data)) { + this.dataSource.data = data; + this.totalRowsCount = data.length; + } + } + } + + getTotalRowCount(): any { + let totalRows = 0; + try { + totalRows = this.settings.applicationService.getTotalRowCount(); + }catch (error){ + console.log("Error while getting total row count :: ",error); + } + return totalRows; + } + + loadData(pageIndex:any, pageSize:any) { + this.dataSource = new RDPDataSource(); + this.dataSource.loadData(this.settings.applicationService, this.input.nativeElement.value, this.sort.active, this.sort.direction, pageIndex , pageSize); + } + + onPaginationChange(event:any){ + console.log("onPaginationChange event :: ",event); + //this.loadData(event.pageIndex, event.pageSize); + } + + addRow(data: any) { + this.dataTableService.add(this.applicationService, data); + } + + updateRow(data: any) { + return this.dataTableService.update(this.applicationService, data); + } + + getRow(data: any) { + this.dataTableService.get(this.applicationService, data); + } + + deleteRow(data: any) { + this.dataTableService.delete(this.applicationService, data); + } + + applyFilter(filterValue: string) { + this.dataSource.filter = filterValue.trim().toLowerCase(); + } + + cloneObject: any; + /** + * openAddNewRoleModal + * @param rowData + */ + openEditModalPopup(rowData: any) { + this.cloneObject = Object.assign({}, rowData) + console.log("Copied Object : ", this.cloneObject); + if (this.cloneObject) { + const modalRef = this.rdpModal.open(RdpDataTableEditComponent, { size: 'lg' }); + modalRef.componentInstance.title = 'Edit'; + modalRef.componentInstance.settings = this.settings; + if (this.cloneObject != 'undefined' && this.cloneObject) { + modalRef.componentInstance.rowdata = this.cloneObject; + modalRef.componentInstance.isEditMode = true; + this.isEditMode = true; + } else { + modalRef.componentInstance.rowdata = {}; + modalRef.componentInstance.isEditMode = false; + this.isEditMode = false; + } + modalRef.componentInstance.passEntry.subscribe((receivedEntry: any) => { + if (receivedEntry) { + console.log("Original Object : ", rowData); + let response = this.updateRow(receivedEntry); + console.log("Response form application ",response); + console.log("Entry : ",receivedEntry); + rowData = receivedEntry; + if(this.dataTableService.response == "Success"){ + console.log("Result is success, update the tabel"); + this.columnsInfoList.push(receivedEntry); + console.log("Updtae column info list : ", this.columnsInfoList); + } + } + }); + } + } + + handleScroll = (scrolled: boolean) => { + scrolled ? this.dataSource : _noop(); + } + + toggleUserActive(rowData: any) { + console.log("Row data : ", rowData); + } + + //hasMore = () => !this.dataSource || this.dataSource.data.length < this.limit; + +} diff --git a/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-scroll-container/rdp-scroll-container.component.html b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-scroll-container/rdp-scroll-container.component.html new file mode 100644 index 00000000..95a0b70b --- /dev/null +++ b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-scroll-container/rdp-scroll-container.component.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-scroll-container/rdp-scroll-container.component.scss b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-scroll-container/rdp-scroll-container.component.scss new file mode 100644 index 00000000..e8765d83 --- /dev/null +++ b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-scroll-container/rdp-scroll-container.component.scss @@ -0,0 +1,4 @@ +:host { + overflow: auto; +} + \ No newline at end of file diff --git a/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-scroll-container/rdp-scroll-container.component.spec.ts b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-scroll-container/rdp-scroll-container.component.spec.ts new file mode 100644 index 00000000..1b38cce0 --- /dev/null +++ b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-scroll-container/rdp-scroll-container.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { RdpScrollContainerComponent } from './rdp-scroll-container.component'; + +describe('RdpScrollContainerComponent', () => { + let component: RdpScrollContainerComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ RdpScrollContainerComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(RdpScrollContainerComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-scroll-container/rdp-scroll-container.component.ts b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-scroll-container/rdp-scroll-container.component.ts new file mode 100644 index 00000000..db46b89f --- /dev/null +++ b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp-scroll-container/rdp-scroll-container.component.ts @@ -0,0 +1,67 @@ +import { Component, OnInit, OnChanges, Input, Output, EventEmitter, + HostListener, ElementRef } from '@angular/core'; +import { throttle as _throttle, noop as _noop } from "lodash-es"; + +enum ScrollDirection { + UP = 'up', + DOWN = 'down' +} + +enum ScrollListener { + HOST = 'scroll', + WINDOW = 'window:scroll' +} + +@Component({ + selector: 'rdp-scroll-container', + templateUrl: './rdp-scroll-container.component.html', + styleUrls: ['./rdp-scroll-container.component.scss'] +}) +export class RdpScrollContainerComponent implements OnInit, OnChanges { + + private _element: Element; + private _window: Element; + public scrollTop = 0; + @Input() more = true; + @Input() scrollDelay = 500; + @Input() scrollOffset = 1000; + @Output() scrolled: EventEmitter = new EventEmitter(); + @HostListener(ScrollListener.HOST) _scroll: Function; + @HostListener(ScrollListener.WINDOW) _windowScroll: Function; + + constructor(private elRef: ElementRef) { + this._element = this.elRef.nativeElement; + this._window = document.documentElement as Element; + } + + ngOnInit() { + this.setThrottle(); + } + + ngOnChanges(changes) { + if (changes.scrollDelay) this.setThrottle(); + } + + setThrottle() { + this._scroll = this._windowScroll = _throttle(this.handleScroll, this.scrollDelay); + } + + getListener = () => this.elRef.nativeElement.clientHeight === this.elRef.nativeElement.scrollHeight + ? ScrollListener.WINDOW + : ScrollListener.HOST + + roundTo = (from: number, to: number = this.scrollOffset) => Math.floor(from / to) * to; + getScrollDirection = (st: number) => this.scrollTop <= st ? ScrollDirection.DOWN : ScrollDirection.UP; + + canScroll(e: Element): boolean { + const scrolled = this.more + && this.getScrollDirection(e.scrollTop) === ScrollDirection.DOWN + && this.roundTo(e.clientHeight) === this.roundTo(e.scrollHeight - e.scrollTop); + this.scrollTop = e.scrollTop; + return scrolled; + } + + handleScroll = () => this.getListener() === ScrollListener.HOST + ? this.scrolled.emit( this.canScroll(this._element) ) + : this.scrolled.emit( this.canScroll(this._window) ) +} diff --git a/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp.module.ts b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp.module.ts new file mode 100644 index 00000000..e33ad4e6 --- /dev/null +++ b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/rdp.module.ts @@ -0,0 +1,67 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; + +import { MaterialModule } from '../../material-module'; +import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; +import { HttpClientModule } from '@angular/common/http'; +import { ReactiveFormsModule, FormsModule } from '@angular/forms'; +import { NgbModule } from '@ng-bootstrap/ng-bootstrap'; +import { RdpDataTableComponent } from './rdp-data-table/rdp-data-table.component'; +import { RdpColumnComponent } from './rdp-column/rdp-column.component'; +import { RdpDataTableEditComponent } from './rdp-data-table/rdp-data-table-edit/rdp-data-table-edit.component'; +import { RdpInputEditorComponent } from './rdp-cell-editor/rdp-input-editor/rdp-input-editor.component'; +import { RdpSelectEditorComponent } from './rdp-cell-editor/rdp-select-editor/rdp-select-editor.component'; +import { RdpTextareaEditorComponent } from './rdp-cell-editor/rdp-textarea-editor/rdp-textarea-editor.component'; +import { RdpCheckboxEditorComponent } from './rdp-cell-editor/rdp-checkbox-editor/rdp-checkbox-editor.component'; +import { RdpDatepickerEditorComponent } from './rdp-cell-editor/rdp-datepicker-editor/rdp-datepicker-editor.component'; +import { RdpAutocompleteEditorComponent } from './rdp-cell-editor/rdp-autocomplete-editor/rdp-autocomplete-editor.component'; +import { RdpRadioEditorComponent } from './rdp-cell-editor/rdp-radio-editor/rdp-radio-editor.component'; +import { RdpDataTableService } from './shared/rdp-data-table.service'; +import { RdpScrollContainerComponent } from './rdp-scroll-container/rdp-scroll-container.component'; +import { RdpButtonComponent } from './rdp-cell-editor/rdp-button/rdp-button.component'; +import { RdpIconButtonComponent } from './rdp-cell-editor/rdp-icon-button/rdp-icon-button.component'; +import { RdpModalService } from './services/rdp-modal.service'; + + +@NgModule({ + declarations: [ + RdpDataTableComponent, + RdpColumnComponent, + RdpDataTableEditComponent, + RdpInputEditorComponent, + RdpSelectEditorComponent, + RdpTextareaEditorComponent, + RdpCheckboxEditorComponent, + RdpRadioEditorComponent, + RdpDatepickerEditorComponent, + RdpAutocompleteEditorComponent, + RdpScrollContainerComponent, + RdpButtonComponent, + RdpIconButtonComponent + ], + imports: [ + CommonModule, + MaterialModule, + HttpClientModule, + ReactiveFormsModule, + FormsModule, + NgbModule + ], + exports: [ + RdpDataTableComponent, + RdpColumnComponent, + RdpInputEditorComponent, + RdpSelectEditorComponent, + RdpTextareaEditorComponent, + RdpCheckboxEditorComponent, + RdpRadioEditorComponent, + RdpDatepickerEditorComponent, + RdpAutocompleteEditorComponent, + RdpScrollContainerComponent, + RdpButtonComponent, + RdpIconButtonComponent + ], + entryComponents: [RdpDataTableEditComponent], + providers: [RdpDataTableService, RdpModalService] +}) +export class RdpModule { } diff --git a/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/services/rdp-modal.service.spec.ts b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/services/rdp-modal.service.spec.ts new file mode 100644 index 00000000..41e89601 --- /dev/null +++ b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/services/rdp-modal.service.spec.ts @@ -0,0 +1,12 @@ +import { TestBed } from '@angular/core/testing'; + +import { RdpModalService } from './rdp-modal.service'; + +describe('RdpModalService', () => { + beforeEach(() => TestBed.configureTestingModule({})); + + it('should be created', () => { + const service: RdpModalService = TestBed.get(RdpModalService); + expect(service).toBeTruthy(); + }); +}); diff --git a/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/services/rdp-modal.service.ts b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/services/rdp-modal.service.ts new file mode 100644 index 00000000..f4defc06 --- /dev/null +++ b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/services/rdp-modal.service.ts @@ -0,0 +1,28 @@ +import { Injectable } from '@angular/core'; +import { NgbModal, NgbModalOptions, NgbModalRef } from '@ng-bootstrap/ng-bootstrap'; + +@Injectable({ + providedIn: 'root' +}) +export class RdpModalService { + + constructor(private modalService: NgbModal) { } + + //KMM: Opens NGB Model and retruns the NGBModelRef instance as retrun type + open(content: any, options?: NgbModalOptions): NgbModalRef { + console.log("==== rdp modal service invoked ========"); + const modalRef = this.modalService.open(content); + return modalRef; + } + + // Dismisses all currently displayed modal windows with the supplied reason. + dismissAll(reason?: any): void { + this.modalService.dismissAll(reason); + } + + // Indicates if there are currently any open modal windows in the application. + hasOpenModals(): boolean { + return this.modalService.hasOpenModals(); + } + +} diff --git a/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/shared/rdp-data-table.service.spec.ts b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/shared/rdp-data-table.service.spec.ts new file mode 100644 index 00000000..bdc75d40 --- /dev/null +++ b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/shared/rdp-data-table.service.spec.ts @@ -0,0 +1,12 @@ +import { TestBed } from '@angular/core/testing'; + +import { RdpDataTableService } from './rdp-data-table.service'; + +describe('RdpDataTableService', () => { + beforeEach(() => TestBed.configureTestingModule({})); + + it('should be created', () => { + const service: RdpDataTableService = TestBed.get(RdpDataTableService); + expect(service).toBeTruthy(); + }); +}); diff --git a/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/shared/rdp-data-table.service.ts b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/shared/rdp-data-table.service.ts new file mode 100644 index 00000000..d22d6b2e --- /dev/null +++ b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/shared/rdp-data-table.service.ts @@ -0,0 +1,36 @@ +import { Injectable } from '@angular/core'; +import { HttpClient, HttpParams } from '@angular/common/http'; +import { Observable } from 'rxjs'; + +@Injectable({ + providedIn: 'root' +}) +export class RdpDataTableService { + + constructor(private http: HttpClient) { } + + add(applicationService: any, data: any): void { + applicationService.add(data); + } + + update(applicationService: any, data: any): void { + applicationService.update(data); + } + + delete(applicationService: any, data: any): void { + applicationService.delete(data) + } + + get(applicationService: any, data: any) { + applicationService.get(data) + } + + + getTableDataList(pageIndex, pageSize, serviceUrl) : Observable { + return this.http.get(serviceUrl,{ + params: new HttpParams() + .set('pageIndex', pageIndex.toString()) + .set('pageSize', pageSize.toString()) + }); + } +} diff --git a/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/shared/rdpCrudInterface.ts b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/shared/rdpCrudInterface.ts new file mode 100644 index 00000000..2c3122ce --- /dev/null +++ b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/shared/rdpCrudInterface.ts @@ -0,0 +1,48 @@ +import { Observable } from 'rxjs'; + +/*- + * ============LICENSE_START========================================== + * ONAP PORTAL-SDK + * =================================================================== + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the "License"); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the "License"); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * + */ + +export interface RdpCrudInterface { + get(data: any):any; + add(data: any): void; + update(data: any): void; + delete(data: any): void; + loadTableData(filter, sortActive, sortDirection, pageIndex, pageSize): Observable; + getTotalRowCount():any; +} \ No newline at end of file diff --git a/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/styles/_responsive.scss b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/styles/_responsive.scss new file mode 100644 index 00000000..b56b3c65 --- /dev/null +++ b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/styles/_responsive.scss @@ -0,0 +1,7 @@ +@media screen and (max-width: 992px) { + .push-right { + .sidebar { + left: 235px !important; + } + } +} diff --git a/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/styles/_spinner.scss b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/styles/_spinner.scss new file mode 100644 index 00000000..dd167385 --- /dev/null +++ b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/styles/_spinner.scss @@ -0,0 +1,67 @@ +/*- + * ============LICENSE_START========================================== + * ONAP Portal + * =================================================================== + * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * + * Unless otherwise specified, all software contained herein is licensed + * under the Apache License, Version 2.0 (the "License"); + * you may not use this software except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Unless otherwise specified, all documentation contained herein is licensed + * under the Creative Commons License, Attribution 4.0 Intl. (the "License"); + * you may not use this documentation except in compliance with the License. + * You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ============LICENSE_END============================================ + * + * + */ +.rdp-spinner { + background: url('../assets/images/spinner.gif') top left no-repeat; + width: 32px; + height: 32px; + position: absolute; + top: 35%; + left: calc(50% - 32px/2); +} +.rdp-save-spinner { + background: url('../assets/images/spinner.gif') top left no-repeat; + width: 25px; + height: 25px; + background-size: 25px; + position: absolute; + left: -50px; + top: 2px; +} +.rdp-small-spinner { + background: url('../assets/images/spinner.gif') top left no-repeat; + width: 25px; + height: 25px; + background-size: 25px; + position: relative; + display: inline-block; + vertical-align: 2px; + cursor: pointer; + top: 6px; + color: transparent; + margin-left: 8px; +} diff --git a/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/styles/_utils.scss b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/styles/_utils.scss new file mode 100644 index 00000000..2c47f5e2 --- /dev/null +++ b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/styles/_utils.scss @@ -0,0 +1,3 @@ +.fs-12 { + font-size: 12px; +} diff --git a/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/styles/bootstrap/_alert.scss b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/styles/bootstrap/_alert.scss new file mode 100644 index 00000000..c2d5c810 --- /dev/null +++ b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/styles/bootstrap/_alert.scss @@ -0,0 +1,51 @@ +// +// Base styles +// + +.alert { + position: relative; + padding: $alert-padding-y $alert-padding-x; + margin-bottom: $alert-margin-bottom; + border: $alert-border-width solid transparent; + @include border-radius($alert-border-radius); +} + +// Headings for larger alerts +.alert-heading { + // Specified to prevent conflicts of changing $headings-color + color: inherit; +} + +// Provide class for links that match alerts +.alert-link { + font-weight: $alert-link-font-weight; +} + + +// Dismissible alerts +// +// Expand the right padding and account for the close button's positioning. + +.alert-dismissible { + padding-right: ($close-font-size + $alert-padding-x * 2); + + // Adjust close link position + .close { + position: absolute; + top: 0; + right: 0; + padding: $alert-padding-y $alert-padding-x; + color: inherit; + } +} + + +// Alternate styles +// +// Generate contextual modifier classes for colorizing the alert. + +@each $color, $value in $theme-colors { + .alert-#{$color} { + @include alert-variant(theme-color-level($color, -10), theme-color-level($color, -9), theme-color-level($color, 6)); + } +} diff --git a/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/styles/bootstrap/_badge.scss b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/styles/bootstrap/_badge.scss new file mode 100644 index 00000000..b87a1b00 --- /dev/null +++ b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/styles/bootstrap/_badge.scss @@ -0,0 +1,47 @@ +// Base class +// +// Requires one of the contextual, color modifier classes for `color` and +// `background-color`. + +.badge { + display: inline-block; + padding: $badge-padding-y $badge-padding-x; + font-size: $badge-font-size; + font-weight: $badge-font-weight; + line-height: 1; + text-align: center; + white-space: nowrap; + vertical-align: baseline; + @include border-radius($badge-border-radius); + + // Empty badges collapse automatically + &:empty { + display: none; + } +} + +// Quick fix for badges in buttons +.btn .badge { + position: relative; + top: -1px; +} + +// Pill badges +// +// Make them extra rounded with a modifier to replace v3's badges. + +.badge-pill { + padding-right: $badge-pill-padding-x; + padding-left: $badge-pill-padding-x; + @include border-radius($badge-pill-border-radius); +} + +// Colors +// +// Contextual variations (linked badges get darker on :hover). + +@each $color, $value in $theme-colors { + .badge-#{$color} { + @include badge-variant($value); + } +} diff --git a/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/styles/bootstrap/_breadcrumb.scss b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/styles/bootstrap/_breadcrumb.scss new file mode 100644 index 00000000..25b9d85a --- /dev/null +++ b/ecomp-sdk/portalsdk-tag-library/projects/portalsdk-tag-lib/src/lib/rdp/styles/bootstrap/_breadcrumb.scss @@ -0,0 +1,38 @@ +.breadcrumb { + display: flex; + flex-wrap: wrap; + padding: $breadcrumb-padding-y $breadcrumb-padding-x; + margin-bottom: $breadcrumb-margin-bottom; + list-style: none; + background-color: $breadcrumb-bg; + @include border-radius($border-radius); +} + +.breadcrumb-item { + // The separator between breadcrumbs (by default, a forward-slash: "/") + + .breadcrumb-item::before { + display: inline-block; // Suppress underlining of the separator in modern browsers + padding-right: $breadcrumb-item-padding; + padding-left: $breadcrumb-item-padding; + color: $breadcrumb-divider-color; + content: "#{$breadcrumb-divider}"; + } + + // IE9-11 hack to properly handle hyperlink underlines for breadcrumbs built + // without `