├── .editorconfig ├── .eslintrc.json ├── .firebaserc ├── .github ├── ISSUE_TEMPLATE │ ├── bug.md │ └── feature.md ├── actions │ └── publish │ │ └── action.yml ├── pull_request_template.md └── workflows │ ├── ci-cd.yml │ ├── publish-components-latest.yml │ ├── publish-components-next.yml │ ├── publish-i18n-latest.yml │ ├── publish-ng-live-docs.yml │ ├── publish-route-analyzer-latest.yml │ └── publish-widget-object-latest.yml ├── .gitignore ├── .gitmessage ├── .prettierignore ├── .prettierrc.json ├── CODE-OF-CONDUCT.md ├── CONTRIBUTING.md ├── LICENSE.txt ├── NOTICE.txt ├── README.md ├── angular.json ├── cypress.json ├── cypress ├── downloads │ └── data-export.csv ├── fixtures │ └── example.json ├── integration │ ├── examples │ │ └── data-exporter.spec.ts │ └── find-cypress-widget.ts ├── plugins │ └── index.js ├── support │ ├── commands.js │ └── index.js └── tsconfig.json ├── firebase.json ├── jest.config.ts ├── jest.preset.js ├── karma.conf.base.js ├── nx.json ├── package-lock.json ├── package.json ├── projects ├── components │ ├── .eslintrc.json │ ├── CHANGELOG.MD │ ├── README.md │ ├── karma.conf.js │ ├── ng-package.json │ ├── package.json │ ├── project.json │ ├── src │ │ ├── action-menu │ │ │ ├── action-menu.component.html │ │ │ ├── action-menu.component.scss │ │ │ ├── action-menu.component.spec.ts │ │ │ ├── action-menu.component.ts │ │ │ ├── action-menu.module.ts │ │ │ └── index.ts │ │ ├── action-search-provider │ │ │ ├── action-search.provider.spec.ts │ │ │ ├── action-search.provider.ts │ │ │ └── index.ts │ │ ├── assets │ │ │ ├── index.js │ │ │ └── resources │ │ │ │ ├── de.properties │ │ │ │ ├── en.properties │ │ │ │ ├── es.properties │ │ │ │ ├── fr.properties │ │ │ │ ├── it.properties │ │ │ │ ├── ja.properties │ │ │ │ ├── ko.properties │ │ │ │ ├── pt-BR.properties │ │ │ │ ├── zh-CN.properties │ │ │ │ └── zh-TW.properties │ │ ├── common │ │ │ ├── activity-reporter │ │ │ │ ├── activity-promise-resolver.ts │ │ │ │ ├── activity-reporter.module.ts │ │ │ │ ├── activity-reporter.spec.ts │ │ │ │ ├── activity-reporter.ts │ │ │ │ ├── banner-activity-reporter.component.html │ │ │ │ ├── banner-activity-reporter.component.ts │ │ │ │ ├── banner-activity-reporter.spec.ts │ │ │ │ ├── index.ts │ │ │ │ ├── spinner-activity-reporter.component.html │ │ │ │ ├── spinner-activity-reporter.component.ts │ │ │ │ └── spinner-activity-reporter.spec.ts │ │ │ ├── error │ │ │ │ ├── error-banner.component.html │ │ │ │ ├── error-banner.component.scss │ │ │ │ ├── error-banner.component.spec.ts │ │ │ │ ├── error-banner.component.ts │ │ │ │ ├── error-banner.module.ts │ │ │ │ ├── error-banner.wo.ts │ │ │ │ └── index.ts │ │ │ ├── interfaces │ │ │ │ ├── action-item.interface.ts │ │ │ │ ├── index.ts │ │ │ │ └── select-option.ts │ │ │ ├── loading │ │ │ │ ├── index.ts │ │ │ │ ├── loading-indicator.component.html │ │ │ │ ├── loading-indicator.component.scss │ │ │ │ ├── loading-indicator.component.spec.ts │ │ │ │ ├── loading-indicator.component.ts │ │ │ │ └── loading-indicator.module.ts │ │ │ ├── pipes │ │ │ │ ├── nested-property.pipe.spec.ts │ │ │ │ ├── nested-property.pipe.ts │ │ │ │ └── pipes.module.ts │ │ │ └── subscription │ │ │ │ ├── index.ts │ │ │ │ ├── subscription-tracker.spec.ts │ │ │ │ └── subscription-tracker.ts │ │ ├── components.module.ts │ │ ├── constants.ts │ │ ├── data-exporter │ │ │ ├── csv-exporter.service.spec.ts │ │ │ ├── csv-exporter.service.ts │ │ │ ├── data-exporter.component.html │ │ │ ├── data-exporter.component.scss │ │ │ ├── data-exporter.component.spec.ts │ │ │ ├── data-exporter.component.ts │ │ │ ├── data-exporter.module.ts │ │ │ ├── data-exporter.wo.ts │ │ │ └── index.ts │ │ ├── datagrid │ │ │ ├── datagrid.component.html │ │ │ ├── datagrid.component.scss │ │ │ ├── datagrid.component.spec.ts │ │ │ ├── datagrid.component.ts │ │ │ ├── datagrid.module.ts │ │ │ ├── directives │ │ │ │ ├── component-renderer-outlet.directive.ts │ │ │ │ └── component-renderer-outlet.module.ts │ │ │ ├── filters │ │ │ │ ├── datagrid-filter.spec.ts │ │ │ │ ├── datagrid-filter.ts │ │ │ │ ├── datagrid-multiselect-filter.component.html │ │ │ │ ├── datagrid-multiselect-filter.component.spec.ts │ │ │ │ ├── datagrid-multiselect-filter.component.ts │ │ │ │ ├── datagrid-numeric-filter.component.html │ │ │ │ ├── datagrid-numeric-filter.component.scss │ │ │ │ ├── datagrid-numeric-filter.component.spec.ts │ │ │ │ ├── datagrid-numeric-filter.component.ts │ │ │ │ ├── datagrid-select-filter.component.html │ │ │ │ ├── datagrid-select-filter.component.spec.ts │ │ │ │ ├── datagrid-select-filter.component.ts │ │ │ │ ├── datagrid-string-filter.component.html │ │ │ │ ├── datagrid-string-filter.component.spec.ts │ │ │ │ └── datagrid-string-filter.component.ts │ │ │ ├── index.ts │ │ │ ├── interfaces │ │ │ │ ├── component-renderer.interface.ts │ │ │ │ ├── datagrid-action-display.interface.ts │ │ │ │ └── datagrid-column.interface.ts │ │ │ ├── mock-data.ts │ │ │ ├── pipes │ │ │ │ ├── function-renderer.pipe.spec.ts │ │ │ │ └── function-renderer.pipe.ts │ │ │ └── renderers │ │ │ │ ├── bold-text-renderer.component.spec.ts │ │ │ │ ├── bold-text-renderer.component.ts │ │ │ │ ├── bold-text-renderer.wo.ts │ │ │ │ └── index.ts │ │ ├── dropdown │ │ │ ├── dropdown-focus-handler.directive.spec.ts │ │ │ ├── dropdown-focus-handler.service.ts │ │ │ ├── dropdown.component.html │ │ │ ├── dropdown.component.scss │ │ │ ├── dropdown.component.spec.ts │ │ │ ├── dropdown.component.ts │ │ │ ├── dropdown.module.ts │ │ │ ├── dynamic-dropdown-position.directive.ts │ │ │ ├── dynamic-dropdown-position.spec.ts │ │ │ └── index.ts │ │ ├── form │ │ │ ├── base-form-control.spec.ts │ │ │ ├── base-form-control.ts │ │ │ ├── form-checkbox │ │ │ │ ├── form-checkbox.component.html │ │ │ │ ├── form-checkbox.component.scss │ │ │ │ ├── form-checkbox.component.spec.ts │ │ │ │ └── form-checkbox.component.ts │ │ │ ├── form-input │ │ │ │ ├── form-input.component.html │ │ │ │ ├── form-input.component.scss │ │ │ │ ├── form-input.component.spec.ts │ │ │ │ └── form-input.component.ts │ │ │ ├── form-select │ │ │ │ ├── form-select.component.html │ │ │ │ ├── form-select.component.scss │ │ │ │ ├── form-select.component.spec.ts │ │ │ │ └── form-select.component.ts │ │ │ ├── form.module.ts │ │ │ ├── form.scss │ │ │ ├── index.ts │ │ │ ├── interfaces │ │ │ │ └── can-be-read-only.interface.ts │ │ │ ├── number-with-unit-input │ │ │ │ ├── number-with-unit-form-input.component.html │ │ │ │ ├── number-with-unit-form-input.component.scss │ │ │ │ ├── number-with-unit-form-input.component.spec.ts │ │ │ │ ├── number-with-unit-form-input.component.ts │ │ │ │ └── number-with-unit-form-input.widget-object.ts │ │ │ ├── validators.spec.ts │ │ │ └── validators.ts │ │ ├── formly │ │ │ └── vcd │ │ │ │ ├── index.ts │ │ │ │ ├── inputs │ │ │ │ ├── input │ │ │ │ │ ├── formly-input.component.spec.ts │ │ │ │ │ └── formly-input.component.ts │ │ │ │ ├── number-with-unit-input │ │ │ │ │ ├── formly-number-with-unit-input.component.spec.ts │ │ │ │ │ └── formly-number-with-unit-input.component.ts │ │ │ │ └── select │ │ │ │ │ ├── formly-select.component.spec.ts │ │ │ │ │ └── formly-select.component.ts │ │ │ │ ├── vcd-formly.config.ts │ │ │ │ └── vcd-formly.module.ts │ │ ├── lib │ │ │ └── directives │ │ │ │ ├── alternative-text │ │ │ │ ├── alternative-text.directive.spec.ts │ │ │ │ ├── alternative-text.directive.ts │ │ │ │ └── alternative-text.module.ts │ │ │ │ ├── aria-activedescendant │ │ │ │ ├── aria-active-descendant.directive.ts │ │ │ │ ├── aria-active-descendant.service.ts │ │ │ │ ├── aria-activedescendant.module.ts │ │ │ │ └── index.ts │ │ │ │ ├── index.ts │ │ │ │ ├── responsive-input │ │ │ │ ├── responsive-input.directive.spec.ts │ │ │ │ ├── responsive-input.directive.ts │ │ │ │ └── responsive-input.module.ts │ │ │ │ ├── show-clipped-text.directive.module.ts │ │ │ │ ├── show-clipped-text.directive.spec.ts │ │ │ │ ├── show-clipped-text.directive.test-helper.ts │ │ │ │ └── show-clipped-text.directive.ts │ │ ├── public-api.ts │ │ ├── quick-search │ │ │ ├── drawer │ │ │ │ ├── drawer.component.html │ │ │ │ ├── drawer.component.scss │ │ │ │ └── drawer.component.ts │ │ │ ├── index.ts │ │ │ ├── quick-search-registrar.service.ts │ │ │ ├── quick-search-result.ts │ │ │ ├── quick-search.component.html │ │ │ ├── quick-search.component.scss │ │ │ ├── quick-search.component.spec.ts │ │ │ ├── quick-search.component.ts │ │ │ ├── quick-search.dataui.ts │ │ │ ├── quick-search.module.ts │ │ │ ├── quick-search.provider.ts │ │ │ ├── quick-search.service.spec.ts │ │ │ ├── quick-search.service.ts │ │ │ └── quick-search.wo.ts │ │ ├── sharing-modal │ │ │ ├── index.ts │ │ │ ├── renderers │ │ │ │ └── rights-dropdown-renderer.ts │ │ │ ├── select-all-checkbox │ │ │ │ ├── select-all-toggle.component.html │ │ │ │ ├── select-all-toggle.component.scss │ │ │ │ └── select-all-toggle.component.ts │ │ │ ├── sharing-modal.component.html │ │ │ ├── sharing-modal.component.scss │ │ │ ├── sharing-modal.component.spec.ts │ │ │ ├── sharing-modal.component.ts │ │ │ ├── sharing-modal.module.ts │ │ │ ├── tabs │ │ │ │ ├── sharing-modal-tab.component.html │ │ │ │ ├── sharing-modal-tab.component.scss │ │ │ │ └── sharing-modal-tab.component.ts │ │ │ └── users-groups-orgs-sharing-modal.directive.ts │ │ ├── test.ts │ │ └── utils │ │ │ ├── common-util.spec.ts │ │ │ ├── common-util.ts │ │ │ ├── dom-util.spec.ts │ │ │ ├── dom-util.ts │ │ │ ├── filter-builder.ts │ │ │ ├── filter-utils.ts │ │ │ ├── id-generator │ │ │ ├── id-generator.spec.ts │ │ │ └── id-generator.ts │ │ │ ├── index.ts │ │ │ ├── rest │ │ │ └── rest-query-search.client.ts │ │ │ ├── test │ │ │ ├── activity-reporter │ │ │ │ ├── banner-activity-reporter.wo.ts │ │ │ │ └── spinner-activity-reporter.wo.ts │ │ │ ├── filter-builder.spec.ts │ │ │ ├── index.ts │ │ │ ├── test-utils.ts │ │ │ ├── widget-object.spec.ts │ │ │ └── widget-object.ts │ │ │ ├── types.ts │ │ │ └── unit │ │ │ ├── unit-formatter.spec.ts │ │ │ ├── unit-formatter.ts │ │ │ ├── unit.spec.ts │ │ │ └── unit.ts │ ├── tsconfig.lib.json │ ├── tsconfig.lib.prod.json │ └── tsconfig.spec.json ├── examples │ ├── .eslintrc.json │ ├── browserslist │ ├── e2e │ │ ├── protractor.conf.js │ │ ├── src │ │ │ ├── app.e2e-spec.ts │ │ │ └── app.po.ts │ │ └── tsconfig.json │ ├── karma.conf.js │ ├── project.json │ ├── src │ │ ├── app │ │ │ ├── app-routing.module.ts │ │ │ ├── app.component.html │ │ │ ├── app.component.scss │ │ │ ├── app.component.ts │ │ │ ├── app.module.ts │ │ │ ├── components │ │ │ │ ├── action-menu │ │ │ │ │ ├── action-menu.examples.module.ts │ │ │ │ │ ├── contextual-actions │ │ │ │ │ │ ├── action-menu-contextual-actions-example.component.html │ │ │ │ │ │ ├── action-menu-contextual-actions-example.component.scss │ │ │ │ │ │ ├── action-menu-contextual-actions-example.component.ts │ │ │ │ │ │ └── action-menu-contextual-actions-example.module.ts │ │ │ │ │ ├── data-ui-attribute │ │ │ │ │ │ ├── action-menu-data-ui-example.component.html │ │ │ │ │ │ ├── action-menu-data-ui-example.component.scss │ │ │ │ │ │ ├── action-menu-data-ui-example.component.ts │ │ │ │ │ │ └── action-menu-data-ui-example.module.ts │ │ │ │ │ ├── hide-disable │ │ │ │ │ │ ├── action-menu-hide-disable-example.component.html │ │ │ │ │ │ ├── action-menu-hide-disable-example.component.scss │ │ │ │ │ │ ├── action-menu-hide-disable-example.component.ts │ │ │ │ │ │ └── action-menu-hide-disable.example.module.ts │ │ │ │ │ ├── search-debounce │ │ │ │ │ │ ├── action-menu-search-debounce.example.component.html │ │ │ │ │ │ ├── action-menu-search-debounce.example.component.scss │ │ │ │ │ │ ├── action-menu-search-debounce.example.component.ts │ │ │ │ │ │ └── action-menu-search-debounce.example.module.ts │ │ │ │ │ ├── search-pause-unpause │ │ │ │ │ │ ├── action-menu-search-pause-and-unpause.example.component.html │ │ │ │ │ │ ├── action-menu-search-pause-and-unpause.example.component.ts │ │ │ │ │ │ └── action-menu-search-pause-and-unpause.example.module.ts │ │ │ │ │ ├── search │ │ │ │ │ │ ├── action-menu-search-example.component.html │ │ │ │ │ │ ├── action-menu-search-example.component.scss │ │ │ │ │ │ ├── action-menu-search-example.component.ts │ │ │ │ │ │ └── action-menu-search-example.module.ts │ │ │ │ │ ├── static-actions │ │ │ │ │ │ ├── action-menu-static-actions-example.component.html │ │ │ │ │ │ ├── action-menu-static-actions-example.component.ts │ │ │ │ │ │ └── action-menu-static-actions-example.module.ts │ │ │ │ │ ├── static-and-contextual-actions │ │ │ │ │ │ ├── action-menu-static-and-contextual-actions-example.component.html │ │ │ │ │ │ ├── action-menu-static-and-contextual-actions-example.component.scss │ │ │ │ │ │ ├── action-menu-static-and-contextual-actions-example.component.ts │ │ │ │ │ │ └── action-menu-static-and-contextual-actions-example.module.ts │ │ │ │ │ └── with-separators │ │ │ │ │ │ ├── action-menu-with-separators.example.component.html │ │ │ │ │ │ ├── action-menu-with-separators.example.component.ts │ │ │ │ │ │ └── action-menu-with-separators.example.module.ts │ │ │ │ ├── sharing-modal │ │ │ │ │ ├── directive │ │ │ │ │ │ ├── users-groups-orgs-sharing-modal.example.html │ │ │ │ │ │ ├── users-groups-orgs-sharing-modal.example.module.ts │ │ │ │ │ │ ├── users-groups-orgs-sharing-modal.example.scss │ │ │ │ │ │ └── users-groups-orgs-sharing-modal.example.ts │ │ │ │ │ ├── sharing-modal-example.component.html │ │ │ │ │ ├── sharing-modal-example.component.scss │ │ │ │ │ ├── sharing-modal-example.component.ts │ │ │ │ │ ├── sharing-modal-example.module.ts │ │ │ │ │ └── sharing-modal-examples.module.ts │ │ │ │ └── show-clipped-text │ │ │ │ │ ├── focusing │ │ │ │ │ ├── focusing-clipped-text-example.component.html │ │ │ │ │ ├── focusing-clipped-text-example.component.scss │ │ │ │ │ └── focusing-clipped-text-example.component.ts │ │ │ │ │ ├── hide │ │ │ │ │ ├── hide-clipped-text-example.component.html │ │ │ │ │ ├── hide-clipped-text-example.component.scss │ │ │ │ │ ├── hide-clipped-text-example.component.ts │ │ │ │ │ └── hide-clipped-text-example.module.ts │ │ │ │ │ ├── positioning │ │ │ │ │ ├── show-clipped-text-positioning-example.component.html │ │ │ │ │ ├── show-clipped-text-positioning-example.component.scss │ │ │ │ │ ├── show-clipped-text-positioning-example.component.ts │ │ │ │ │ └── show-clipped-text-positioning-example.module.ts │ │ │ │ │ ├── show-clipped-text-examples.module.ts │ │ │ │ │ └── sizing │ │ │ │ │ ├── show-clipped-text-sizing-example.component.html │ │ │ │ │ ├── show-clipped-text-sizing-example.component.scss │ │ │ │ │ ├── show-clipped-text-sizing-example.component.ts │ │ │ │ │ └── show-clipped-text-sizing-example.module.ts │ │ │ └── home │ │ │ │ ├── home.component.html │ │ │ │ ├── home.component.spec.ts │ │ │ │ └── home.component.ts │ │ ├── assets │ │ │ ├── .gitkeep │ │ │ └── our-translations.json │ │ ├── components │ │ │ ├── activity-reporter │ │ │ │ ├── activity-reporter.examples.module.ts │ │ │ │ ├── banner-activity-reporter.example.component.html │ │ │ │ ├── banner-activity-reporter.example.component.ts │ │ │ │ ├── banner-activity-reporter.example.module.ts │ │ │ │ ├── spinner-activity-reporter.example.component.html │ │ │ │ ├── spinner-activity-reporter.example.component.ts │ │ │ │ └── spinner-activity-reporter.example.module.ts │ │ │ ├── data-exporter │ │ │ │ ├── data-exporter.example.component.ts │ │ │ │ ├── data-exporter.example.module.ts │ │ │ │ └── data-exporter.examples.module.ts │ │ │ ├── datagrid │ │ │ │ ├── datagrid-action-display-config.example.component.html │ │ │ │ ├── datagrid-action-display-config.example.component.scss │ │ │ │ ├── datagrid-action-display-config.example.component.ts │ │ │ │ ├── datagrid-action-display-config.example.module.ts │ │ │ │ ├── datagrid-action-menu-tracking-example.component.html │ │ │ │ ├── datagrid-action-menu-tracking-example.component.scss │ │ │ │ ├── datagrid-action-menu-tracking-example.component.ts │ │ │ │ ├── datagrid-action-menu-tracking.example.module.ts │ │ │ │ ├── datagrid-activity-reporter.example.component.html │ │ │ │ ├── datagrid-activity-reporter.example.component.ts │ │ │ │ ├── datagrid-activity-reporter.example.module.ts │ │ │ │ ├── datagrid-cliptext.example.component.html │ │ │ │ ├── datagrid-cliptext.example.component.ts │ │ │ │ ├── datagrid-cliptext.example.module.ts │ │ │ │ ├── datagrid-column-width.example.component.html │ │ │ │ ├── datagrid-column-width.example.component.scss │ │ │ │ ├── datagrid-column-width.example.component.ts │ │ │ │ ├── datagrid-column-width.example.module.ts │ │ │ │ ├── datagrid-css-classes.example.component.ts │ │ │ │ ├── datagrid-css-classes.example.module.ts │ │ │ │ ├── datagrid-detail-pane.example.component.ts │ │ │ │ ├── datagrid-detail-pane.example.module.ts │ │ │ │ ├── datagrid-detail-row.example.component.ts │ │ │ │ ├── datagrid-detail-row.example.module.ts │ │ │ │ ├── datagrid-filter.example.component.ts │ │ │ │ ├── datagrid-filter.example.module.ts │ │ │ │ ├── datagrid-header.example.component.html │ │ │ │ ├── datagrid-header.example.component.ts │ │ │ │ ├── datagrid-header.example.module.ts │ │ │ │ ├── datagrid-height.example.component.html │ │ │ │ ├── datagrid-height.example.component.scss │ │ │ │ ├── datagrid-height.example.component.ts │ │ │ │ ├── datagrid-height.example.module.ts │ │ │ │ ├── datagrid-is-row-selectable-example.component.html │ │ │ │ ├── datagrid-is-row-selectable-example.component.ts │ │ │ │ ├── datagrid-is-row-selectable-example.module.ts │ │ │ │ ├── datagrid-link.example.component.scss │ │ │ │ ├── datagrid-link.example.component.ts │ │ │ │ ├── datagrid-link.example.module.ts │ │ │ │ ├── datagrid-loading-placeholder.example.component.html │ │ │ │ ├── datagrid-loading-placeholder.example.component.ts │ │ │ │ ├── datagrid-loading-placeholder.example.module.ts │ │ │ │ ├── datagrid-pagination-example.component.ts │ │ │ │ ├── datagrid-pagination-example.module.ts │ │ │ │ ├── datagrid-preserve-selection.example.component.ts │ │ │ │ ├── datagrid-preserve-selection.example.module.ts │ │ │ │ ├── datagrid-row-icon.example.component.html │ │ │ │ ├── datagrid-row-icon.example.component.ts │ │ │ │ ├── datagrid-row-icon.example.module.ts │ │ │ │ ├── datagrid-row-select.example.component.ts │ │ │ │ ├── datagrid-row-select.example.module.ts │ │ │ │ ├── datagrid-show-hide.example.component.ts │ │ │ │ ├── datagrid-show-hide.example.module.ts │ │ │ │ ├── datagrid-sort.example.component.ts │ │ │ │ ├── datagrid-sort.example.module.ts │ │ │ │ ├── datagrid-string-filter-placeholder.example.component.ts │ │ │ │ ├── datagrid-three-renderers.example.component.ts │ │ │ │ ├── datagrid-three-renderers.example.module.ts │ │ │ │ └── datagrid.examples.module.ts │ │ │ ├── error │ │ │ │ ├── error-banner.example.component.html │ │ │ │ ├── error-banner.example.component.ts │ │ │ │ ├── error-banner.example.module.ts │ │ │ │ └── error-banner.examples.module.ts │ │ │ ├── form-input │ │ │ │ ├── form-checkbox.example.component.html │ │ │ │ ├── form-checkbox.example.component.ts │ │ │ │ ├── form-checkbox.example.module.ts │ │ │ │ ├── form-input-components.examples.module.ts │ │ │ │ ├── form-input.example.component.html │ │ │ │ ├── form-input.example.component.ts │ │ │ │ ├── form-input.example.module.ts │ │ │ │ ├── form-select-disabled-options.example.component.html │ │ │ │ ├── form-select-disabled-options.example.component.ts │ │ │ │ ├── form-select-disabled.example.component.html │ │ │ │ ├── form-select-disabled.example.component.ts │ │ │ │ ├── form-select-validation.example.component.html │ │ │ │ ├── form-select-validation.example.component.ts │ │ │ │ ├── form-select.example.component.html │ │ │ │ ├── form-select.example.component.ts │ │ │ │ ├── form-select.example.module.ts │ │ │ │ ├── number-with-unit-form-input-unitless.example.component.html │ │ │ │ ├── number-with-unit-form-input-unitless.example.component.scss │ │ │ │ ├── number-with-unit-form-input-unitless.example.component.ts │ │ │ │ ├── number-with-unit-form-input-unitless.example.module.ts │ │ │ │ ├── number-with-unit-form-input.example.component.html │ │ │ │ ├── number-with-unit-form-input.example.component.scss │ │ │ │ ├── number-with-unit-form-input.example.component.ts │ │ │ │ └── number-with-unit-form-input.example.module.ts │ │ │ ├── formly │ │ │ │ └── input │ │ │ │ │ ├── formly-input-example-wrapper.component.ts │ │ │ │ │ ├── formly-input-features.example.component.ts │ │ │ │ │ ├── formly-inputs.example.component.ts │ │ │ │ │ └── formly-inputs.examples.module.ts │ │ │ ├── loading │ │ │ │ ├── loading-indicator.example.component.html │ │ │ │ ├── loading-indicator.example.component.ts │ │ │ │ ├── loading-indicator.example.module.ts │ │ │ │ └── loading-indicator.examples.module.ts │ │ │ ├── quick-search │ │ │ │ ├── filters │ │ │ │ │ ├── quick-search-filters.example.component.html │ │ │ │ │ ├── quick-search-filters.example.component.scss │ │ │ │ │ ├── quick-search-filters.example.component.ts │ │ │ │ │ └── quick-search-filters.example.module.ts │ │ │ │ ├── nested-providers │ │ │ │ │ ├── quick-search-nested-providers.example.component.html │ │ │ │ │ ├── quick-search-nested-providers.example.component.scss │ │ │ │ │ ├── quick-search-nested-providers.example.component.ts │ │ │ │ │ └── quick-search-nested-providers.example.module.ts │ │ │ │ ├── quick-search-content-projection.example.component.html │ │ │ │ ├── quick-search-content-projection.example.component.scss │ │ │ │ ├── quick-search-content-projection.example.component.ts │ │ │ │ ├── quick-search-content-projection.example.module.ts │ │ │ │ ├── quick-search-hide-empty-section-example.component.html │ │ │ │ ├── quick-search-hide-empty-section-example.component.ts │ │ │ │ ├── quick-search-hide-empty-section-example.module.ts │ │ │ │ ├── quick-search-sync-async.example.component.html │ │ │ │ ├── quick-search-sync-async.example.component.scss │ │ │ │ ├── quick-search-sync-async.example.component.ts │ │ │ │ ├── quick-search-sync-async.example.module.ts │ │ │ │ └── quick-search.examples.module.ts │ │ │ └── subscription │ │ │ │ ├── subscription-tracker.example.component.ts │ │ │ │ ├── subscription-tracker.example.module.ts │ │ │ │ └── subscription-tracker.examples.module.ts │ │ ├── environments │ │ │ ├── environment.prod.ts │ │ │ └── environment.ts │ │ ├── favicon.ico │ │ ├── index.html │ │ ├── main.ts │ │ ├── mock-vcd-common.ts │ │ ├── polyfills.ts │ │ ├── styles.scss │ │ └── test.ts │ ├── tsconfig.app.json │ └── tsconfig.spec.json ├── i18n │ ├── .eslintrc.json │ ├── README.md │ ├── karma.conf.js │ ├── ng-package.json │ ├── package.json │ ├── project.json │ ├── scripts │ │ └── index.js │ ├── src │ │ ├── lib │ │ │ ├── i18n.module.spec.ts │ │ │ ├── i18n.module.ts │ │ │ ├── loader │ │ │ │ └── translation-loader.ts │ │ │ ├── pipe │ │ │ │ ├── format-date-time-pipe.spec.ts │ │ │ │ ├── format-date-time-pipe.ts │ │ │ │ ├── lazy-string.pipe.spec.ts │ │ │ │ ├── lazy-string.pipe.ts │ │ │ │ ├── translation-pipe.spec.ts │ │ │ │ └── translation-pipe.ts │ │ │ ├── service │ │ │ │ ├── message-format-translation-service.spec.ts │ │ │ │ ├── message-format-translation-service.ts │ │ │ │ ├── mock-translation-service.spec.ts │ │ │ │ ├── mock-translation-service.ts │ │ │ │ └── translation-service.ts │ │ │ └── utils │ │ │ │ ├── index.ts │ │ │ │ └── platform-util.ts │ │ ├── public-api.ts │ │ └── test.ts │ ├── tsconfig.lib.json │ ├── tsconfig.lib.prod.json │ └── tsconfig.spec.json ├── ng-live-docs │ ├── .eslintrc.json │ ├── CHANGELOG.md │ ├── README.md │ ├── karma.conf.js │ ├── ng-package.json │ ├── package.json │ ├── project.json │ ├── schematics │ │ ├── add-example │ │ │ ├── files │ │ │ │ ├── example-component │ │ │ │ │ ├── __name@dasherize__.example.component.html.template │ │ │ │ │ ├── __name@dasherize__.example.component.scss.template │ │ │ │ │ ├── __name@dasherize__.example.component.ts.template │ │ │ │ │ └── __name@dasherize__.example.module.ts.template │ │ │ │ ├── example-module │ │ │ │ │ └── __componentName@dasherize__.examples.module.ts.template │ │ │ │ └── root-module │ │ │ │ │ └── examples.module.ts.template │ │ │ ├── index.ts │ │ │ ├── schema.json │ │ │ └── schema.ts │ │ └── collection.json │ ├── scripts │ │ ├── create-module-data.js │ │ ├── create-module-data.js.map │ │ ├── create-module-data.ts │ │ ├── index.js │ │ └── tsconfig.json │ ├── src │ │ ├── api-viewer │ │ │ ├── api-viewer.component.html │ │ │ ├── api-viewer.component.scss │ │ │ ├── api-viewer.component.ts │ │ │ ├── api-viewer.module.ts │ │ │ └── index.ts │ │ ├── compodoc │ │ │ ├── compodoc-retriever.service.spec.ts │ │ │ ├── compodoc-retriever.service.ts │ │ │ └── compodoc-schema.ts │ │ ├── documentation-container │ │ │ ├── documentation-container-api.component.ts │ │ │ ├── documentation-container-documentation.component.ts │ │ │ ├── documentation-container-example.component.html │ │ │ ├── documentation-container-example.component.scss │ │ │ ├── documentation-container-example.component.ts │ │ │ ├── documentation-container.component.html │ │ │ ├── documentation-container.component.ts │ │ │ ├── documentation-container.module.ts │ │ │ └── index.ts │ │ ├── documentation-retriever.service.ts │ │ ├── documentation.ts │ │ ├── example-viewer │ │ │ ├── example-viewer.component.html │ │ │ ├── example-viewer.component.scss │ │ │ ├── example-viewer.component.ts │ │ │ ├── example-viewer.module.ts │ │ │ └── index.ts │ │ ├── injection-tokens.ts │ │ ├── interfaces.ts │ │ ├── ng-live-docs.module.ts │ │ ├── overview-viewer │ │ │ ├── index.ts │ │ │ ├── overview-viewer.component.html │ │ │ ├── overview-viewer.component.scss │ │ │ ├── overview-viewer.component.ts │ │ │ └── overview-viewer.module.ts │ │ ├── public-api.ts │ │ ├── source-code-viewer │ │ │ ├── index.ts │ │ │ ├── source-code-viewer.component.html │ │ │ ├── source-code-viewer.component.scss │ │ │ ├── source-code-viewer.component.ts │ │ │ └── source-code-viewer.module.ts │ │ ├── stack-blitz-writer.service.ts │ │ └── test.ts │ ├── tsconfig.lib.json │ ├── tsconfig.lib.prod.json │ ├── tsconfig.schematics.json │ └── tsconfig.spec.json ├── route-analyzer │ ├── .eslintrc.json │ ├── CHANGELOG.MD │ ├── README.md │ ├── jest.config.ts │ ├── karma.conf.js │ ├── ng-package.json │ ├── package.json │ ├── project.json │ ├── src │ │ ├── cli.ts │ │ ├── lib │ │ │ ├── app-route.ts │ │ │ ├── constants.ts │ │ │ ├── gen-route-builder.spec.ts │ │ │ ├── gen-route-builder.ts │ │ │ ├── gen-route-segments.ts │ │ │ ├── route-analyzer.ts │ │ │ ├── route-info.ts │ │ │ └── utils.ts │ │ └── public-api.ts │ ├── tsconfig.cli.json │ ├── tsconfig.lib.json │ └── tsconfig.spec.json └── widget-object │ ├── .eslintrc.json │ ├── CHANGELOG.MD │ ├── README.md │ ├── jest.config.ts │ ├── package.json │ ├── project.json │ ├── setup-jest.ts │ ├── src │ ├── index.ts │ └── lib │ │ ├── angular │ │ ├── angular-widget-finder.ts │ │ ├── angular-widget-object-element.ts │ │ └── angular-widget-object.spec.ts │ │ ├── cypress │ │ ├── cypress-widget-finder.ts │ │ ├── cypress-widget-object-element.spec.ts │ │ └── cypress-widget-object-element.ts │ │ ├── datagrid │ │ ├── datagrid.wo.ts │ │ └── vcd-datagrid.wo.ts │ │ ├── index.ts │ │ ├── selector-util.ts │ │ └── widget-object.ts │ ├── tsconfig.json │ ├── tsconfig.lib.json │ └── tsconfig.spec.json ├── tools └── scripts │ └── publish.mjs ├── tsconfig.json └── vcdh5cc.l10n /.editorconfig: -------------------------------------------------------------------------------- 1 | # Editor configuration, see https://editorconfig.org 2 | root = true 3 | 4 | [*] 5 | charset = utf-8 6 | indent_style = space 7 | indent_size = 4 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | 11 | [*.md] 12 | max_line_length = 120 13 | trim_trailing_whitespace = false 14 | 15 | [*.json] 16 | indent_size = 2 17 | -------------------------------------------------------------------------------- /.firebaserc: -------------------------------------------------------------------------------- 1 | { 2 | "projects": { 3 | "default": "vcdcc-examples-app" 4 | } 5 | } -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: 'Bug Report' 3 | about: 'Create a report to help us fix or improve an issue' 4 | title: '(impact: low,medium,high) [BUG TITLE]' 5 | labels: 'bug' 6 | --- 7 | 8 | ### Prerequisites 9 | 10 | [Check these off before submitting an issue]. 11 | 12 | - [ ] Are you running the latest version? OR Are you submitting a bug for a prior version? 13 | - [ ] Did you perform a basic issue search? 14 | 15 | For more information, see the `CONTRIBUTING` guide. 16 | 17 | ### Description 18 | 19 | [Description of the bug] 20 | 21 | ### Impact 22 | 23 | [Description of why we should fix this bug] 24 | 25 | ### Steps to Reproduce 26 | 27 | 1. [First Step] 28 | 2. [Second Step] 29 | 3. [and so on...] 30 | 31 | **Expected behavior:** [What you expected to happen] 32 | 33 | **Actual behavior:** [What actually happened] 34 | 35 | ### Versions 36 | 37 | 1. Package version (run `npm version`) 38 | 2. Node Version (run `node -v`) 39 | 3. OS Version 40 | 4. Browser Version 41 | 42 | ### Stackblitz 43 | 44 | [Put a Stackblitz reproduction] 45 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: 'Feature Request' 3 | about: 'Proposal for a new feature or enhancement' 4 | title: '(impact: low,medium,high) [FEATURE NAME]' 5 | labels: 'enhancement' 6 | --- 7 | 8 | ### Prerequisites 9 | 10 | [Check these off before submitting an issue]. 11 | 12 | - [ ] Are you running the latest version? 13 | - [ ] Did you perform a basic issue search? 14 | 15 | For more information, see the `CONTRIBUTING` guide. 16 | 17 | ### Description 18 | 19 | [Description of the feature] 20 | 21 | ### Impact 22 | 23 | [Description of why we should implement this feature] 24 | -------------------------------------------------------------------------------- /.github/workflows/publish-components-latest.yml: -------------------------------------------------------------------------------- 1 | name: Publish @vcd/ui-components@latest 2 | 3 | on: [ workflow_dispatch ] 4 | 5 | jobs: 6 | publish-components: 7 | runs-on: ubuntu-latest 8 | steps: 9 | - uses: actions/checkout@v3 10 | - uses: ./.github/actions/publish 11 | with: 12 | nx-name: components 13 | npm-name: '@vcd/ui-components' 14 | npm-publish-tag: latest 15 | npm-token: ${{ secrets.NPM_TOKEN }} 16 | -------------------------------------------------------------------------------- /.github/workflows/publish-components-next.yml: -------------------------------------------------------------------------------- 1 | name: Publish @vcd/ui-components@next 2 | 3 | on: [ workflow_dispatch ] 4 | 5 | jobs: 6 | publish-components: 7 | runs-on: ubuntu-latest 8 | steps: 9 | - uses: actions/checkout@v3 10 | - uses: ./.github/actions/publish 11 | with: 12 | nx-name: components 13 | npm-name: '@vcd/ui-components' 14 | npm-publish-tag: next 15 | npm-token: ${{ secrets.NPM_TOKEN }} 16 | -------------------------------------------------------------------------------- /.github/workflows/publish-i18n-latest.yml: -------------------------------------------------------------------------------- 1 | name: Publish @vcd/i18n@latest 2 | 3 | on: [ workflow_dispatch ] 4 | 5 | 6 | jobs: 7 | publish-components: 8 | runs-on: ubuntu-latest 9 | steps: 10 | - uses: actions/checkout@v3 11 | - uses: ./.github/actions/publish 12 | with: 13 | nx-name: i18n 14 | npm-name: '@vcd/i18n' 15 | npm-publish-tag: latest 16 | npm-token: ${{ secrets.NPM_TOKEN }} 17 | -------------------------------------------------------------------------------- /.github/workflows/publish-ng-live-docs.yml: -------------------------------------------------------------------------------- 1 | name: Publish @vcd/ng-live-docs@latest 2 | 3 | on: [ workflow_dispatch ] 4 | 5 | 6 | jobs: 7 | publish-components: 8 | runs-on: ubuntu-latest 9 | steps: 10 | - uses: actions/checkout@v3 11 | - uses: ./.github/actions/publish 12 | with: 13 | nx-name: ng-live-docs 14 | npm-name: '@vmw/ng-live-docs' 15 | npm-publish-tag: latest 16 | npm-token: ${{ secrets.NPM_TOKEN }} 17 | -------------------------------------------------------------------------------- /.github/workflows/publish-route-analyzer-latest.yml: -------------------------------------------------------------------------------- 1 | name: Publish @vcd/route-analyzer@latest 2 | 3 | on: [ workflow_dispatch ] 4 | 5 | jobs: 6 | publish-components: 7 | runs-on: ubuntu-latest 8 | steps: 9 | - uses: actions/checkout@v3 10 | - uses: ./.github/actions/publish 11 | with: 12 | nx-name: route-analyzer 13 | npm-name: '@vcd/route-analyzer' 14 | npm-publish-tag: latest 15 | npm-token: ${{ secrets.NPM_TOKEN }} 16 | -------------------------------------------------------------------------------- /.github/workflows/publish-widget-object-latest.yml: -------------------------------------------------------------------------------- 1 | name: Publish @vcd/widget-object@latest 2 | 3 | on: [workflow_dispatch] 4 | 5 | jobs: 6 | publish-components: 7 | runs-on: ubuntu-latest 8 | steps: 9 | - uses: actions/checkout@v3 10 | - uses: ./.github/actions/publish 11 | with: 12 | nx-name: widget-object 13 | npm-name: '@vcd/widget-object' 14 | npm-publish-tag: latest 15 | npm-token: ${{ secrets.NPM_TOKEN }} 16 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # See http://help.github.com/ignore-files/ for more about ignoring files. 2 | 3 | # compiled output 4 | /dist 5 | /tmp 6 | /out-tsc 7 | # Only exists if Bazel was run 8 | /bazel-out 9 | 10 | # dependencies 11 | /node_modules 12 | 13 | # profiling files 14 | chrome-profiler-events*.json 15 | speed-measure-plugin*.json 16 | 17 | # IDEs and editors 18 | /.idea 19 | *.iml 20 | .project 21 | .classpath 22 | .c9/ 23 | *.launch 24 | .settings/ 25 | *.sublime-workspace 26 | 27 | # IDE - VSCode 28 | .vscode/* 29 | !.vscode/settings.json 30 | !.vscode/tasks.json 31 | !.vscode/launch.json 32 | !.vscode/extensions.json 33 | .history/* 34 | 35 | # misc 36 | /.angular/cache 37 | /.cache 38 | /.sass-cache 39 | /connect.lock 40 | /coverage 41 | /libpeerconnection.log 42 | npm-debug.log 43 | yarn-error.log 44 | testem.log 45 | /typings 46 | 47 | # System Files 48 | .DS_Store 49 | Thumbs.db 50 | 51 | # Generated Files 52 | projects/examples/src/gen 53 | projects/examples/src/compodoc 54 | projects/examples/src/assets/i18n.json 55 | projects/components/src/assets/i18n.json 56 | 57 | .angular 58 | -------------------------------------------------------------------------------- /.gitmessage: -------------------------------------------------------------------------------- 1 | # The following commit template is intended to guide committers into 2 | # writing concise and useful commit messages. Please refer to 3 | # https://chris.beams.io/posts/git-commit/ for a more detailed analysis 4 | # of a good commit message. 5 | # 6 | # Summary line (limit to 50 chars) 7 | # -----------------------------------------------|*********************| 8 | # If this commit is applied, it will... 9 | 10 | 11 | # Do not forget to separate subject from body with a blank line 12 | # Why was this change made? 13 | 14 | # What testing was performed on this change? 15 | # Please list steps as bullet items for manual testing. 16 | Testing Done: 17 | 18 | # Reference to Bugzilla or JIRA issues 19 | Bug Number: 20 | 21 | # Reviewboard information [REQUIRED] 22 | Review URL: 23 | Reviewed by: 24 | -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | *.json 2 | -------------------------------------------------------------------------------- /.prettierrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "printWidth": 120, 3 | "tabWidth": 4, 4 | "singleQuote": true, 5 | "trailingComma": "es5", 6 | "overrides": [ 7 | { 8 | "files": ["*.html", "*.scss"], 9 | "options": { 10 | "tabWidth": 4 11 | } 12 | } 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /NOTICE.txt: -------------------------------------------------------------------------------- 1 | VMware Cloud Director UI Common Components 2 | Copyright (c) 2019 VMware, Inc. All Rights Reserved. 3 | 4 | This product is licensed to you under the BSD-2 license (the "License"). You may not use this product except in compliance with the BSD-2 License. 5 | 6 | This product may include a number of subcomponents with separate copyright notices and license terms. Your use of these subcomponents is subject to the terms and conditions of the subcomponent's license, as noted in the LICENSE file. 7 | 8 | -------------------------------------------------------------------------------- /angular.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "./node_modules/@angular/cli/lib/config/schema.json", 3 | "version": 2, 4 | "newProjectRoot": "projects", 5 | "projects": { 6 | "components": "projects/components", 7 | "examples": "projects/examples", 8 | "i18n": "projects/i18n", 9 | "ng-live-docs": "projects/ng-live-docs", 10 | "route-analyzer": "projects/route-analyzer", 11 | "widget-object": "projects/widget-object" 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /cypress.json: -------------------------------------------------------------------------------- 1 | { 2 | "baseUrl": "http://localhost:4200" 3 | } 4 | -------------------------------------------------------------------------------- /cypress/downloads/data-export.csv: -------------------------------------------------------------------------------- 1 | Description,Injection 2 | Tis what tis, =1+1 3 | Still tis what tis, +1+1 -------------------------------------------------------------------------------- /cypress/fixtures/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Using fixtures to represent data", 3 | "email": "hello@cypress.io", 4 | "body": "Fixtures are a great way to mock data for responses to routes" 5 | } -------------------------------------------------------------------------------- /cypress/support/commands.js: -------------------------------------------------------------------------------- 1 | // *********************************************** 2 | // This example commands.js shows you how to 3 | // create various custom commands and overwrite 4 | // existing commands. 5 | // 6 | // For more comprehensive examples of custom 7 | // commands please read more here: 8 | // https://on.cypress.io/custom-commands 9 | // *********************************************** 10 | // 11 | // 12 | // -- This is a parent command -- 13 | // Cypress.Commands.add("login", (email, password) => { ... }) 14 | // 15 | // 16 | // -- This is a child command -- 17 | // Cypress.Commands.add("drag", { prevSubject: 'element'}, (subject, options) => { ... }) 18 | // 19 | // 20 | // -- This is a dual command -- 21 | // Cypress.Commands.add("dismiss", { prevSubject: 'optional'}, (subject, options) => { ... }) 22 | // 23 | // 24 | // -- This will overwrite an existing command -- 25 | // Cypress.Commands.overwrite("visit", (originalFn, url, options) => { ... }) 26 | -------------------------------------------------------------------------------- /cypress/support/index.js: -------------------------------------------------------------------------------- 1 | // *********************************************************** 2 | // This example support/index.js is processed and 3 | // loaded automatically before your test files. 4 | // 5 | // This is a great place to put global configuration and 6 | // behavior that modifies Cypress. 7 | // 8 | // You can change the location of this file or turn off 9 | // automatically serving support files with the 10 | // 'supportFile' configuration option. 11 | // 12 | // You can read more here: 13 | // https://on.cypress.io/configuration 14 | // *********************************************************** 15 | 16 | // Load system JS registery 17 | import System from 'systemjs/dist/system'; 18 | // Provides the @vcd/common module so loading the VcdApiClient does not throw an error. 19 | window.SystemJs = System.registry.set('@vcd/common', System.newModule({})); // >= 9.5 20 | // Import commands.js using ES2015 syntax: 21 | import './commands'; 22 | 23 | // Alternatively you can use CommonJS syntax: 24 | // require('./commands') 25 | -------------------------------------------------------------------------------- /cypress/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "exclude": [], 4 | "compilerOptions": { 5 | "sourceMap": false, 6 | "types": ["cypress"], 7 | "typeRoots": [ "node_modules/cypress/types" ] 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /firebase.json: -------------------------------------------------------------------------------- 1 | { 2 | "hosting": { 3 | "public": ".dist/examples", 4 | "ignore": [ 5 | "firebase.json", 6 | "**/.*", 7 | "**/node_modules/**" 8 | ], 9 | "rewrites": [ 10 | { 11 | "source": "**", 12 | "destination": "/index.html" 13 | } 14 | ] 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /jest.config.ts: -------------------------------------------------------------------------------- 1 | import { getJestProjects } from '@nrwl/jest'; 2 | 3 | export default { 4 | projects: getJestProjects(), 5 | }; 6 | -------------------------------------------------------------------------------- /jest.preset.js: -------------------------------------------------------------------------------- 1 | const nxPreset = require('@nrwl/jest/preset').default; 2 | 3 | module.exports = { ...nxPreset }; 4 | -------------------------------------------------------------------------------- /projects/components/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../.eslintrc.json", 3 | "ignorePatterns": [ 4 | "!**/*" 5 | ], 6 | "overrides": [ 7 | { 8 | "files": [ 9 | "*.ts" 10 | ], 11 | "parserOptions": { 12 | "project": [ 13 | "projects/components/tsconfig.lib.json", 14 | "projects/components/tsconfig.spec.json" 15 | ], 16 | "createDefaultProgram": true 17 | } 18 | } 19 | ] 20 | } 21 | -------------------------------------------------------------------------------- /projects/components/karma.conf.js: -------------------------------------------------------------------------------- 1 | // Karma configuration file, see link for more information 2 | // https://karma-runner.github.io/1.0/config/configuration-file.html 3 | const generateKarmaConf = require('../../karma.conf.base'); 4 | 5 | module.exports = generateKarmaConf('components'); 6 | -------------------------------------------------------------------------------- /projects/components/ng-package.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "../../node_modules/ng-packagr/ng-package.schema.json", 3 | "dest": "../../dist/components", 4 | "lib": { 5 | "entryFile": "src/public-api.ts" 6 | }, 7 | "allowedNonPeerDependencies": ["@ngx-formly/core"] 8 | } 9 | -------------------------------------------------------------------------------- /projects/components/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@vcd/ui-components", 3 | "version": "15.0.1-dev.13", 4 | "dependencies": { 5 | "@ngx-formly/core": ">=6.0.4" 6 | }, 7 | "peerDependencies": { 8 | "@clr/angular": ">=15.0.3", 9 | "@angular/common": ">=15.2.3", 10 | "@angular/core": ">=15.2.3", 11 | "@vcd/i18n": ">=1.0.0", 12 | "@vcd/widget-object": ">=0.0.1", 13 | "@vcd/angular-client": "0.0.2-alpha.1", 14 | "@vcd/bindings": "9.1.1" 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /projects/components/src/action-menu/action-menu.component.scss: -------------------------------------------------------------------------------- 1 | .inline-actions-container { 2 | display: flex; 3 | flex-direction: row; 4 | 5 | & > .static-actions-separator { 6 | flex: 1 1 auto; 7 | } 8 | 9 | & .inline-action-dropdown { 10 | & ::ng-deep .nested-dropdown > .first-dropdown-toggle { 11 | // Without this, Clarity styles from .dropdown-toggle are making the margin-top as 0 px 12 | margin-top: 0.3rem; 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /projects/components/src/action-menu/action-menu.module.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2020 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | 6 | import { CommonModule } from '@angular/common'; 7 | import { NgModule } from '@angular/core'; 8 | import { ClarityModule } from '@clr/angular'; 9 | import { I18nModule } from '@vcd/i18n'; 10 | import { DropdownModule } from '../dropdown/dropdown.module'; 11 | import { ShowClippedTextDirectiveModule } from '../lib/directives/show-clipped-text.directive.module'; 12 | import { ActionMenuComponent } from './action-menu.component'; 13 | 14 | @NgModule({ 15 | imports: [ClarityModule, CommonModule, I18nModule, DropdownModule, ShowClippedTextDirectiveModule], 16 | declarations: [ActionMenuComponent], 17 | providers: [], 18 | exports: [ActionMenuComponent], 19 | }) 20 | export class VcdActionMenuModule {} 21 | -------------------------------------------------------------------------------- /projects/components/src/action-menu/index.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2019 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | 6 | export * from './action-menu.component'; 7 | export * from './action-menu.module'; 8 | -------------------------------------------------------------------------------- /projects/components/src/action-search-provider/index.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2020 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | 6 | export * from './action-search.provider'; 7 | -------------------------------------------------------------------------------- /projects/components/src/common/activity-reporter/activity-reporter.module.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2020 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | 6 | import { CommonModule } from '@angular/common'; 7 | import { NgModule } from '@angular/core'; 8 | import { ClarityModule } from '@clr/angular'; 9 | import { I18nModule } from '@vcd/i18n'; 10 | import { VcdErrorBannerModule } from '../error/error-banner.module'; 11 | import { VcdLoadingIndicatorModule } from '../loading/loading-indicator.module'; 12 | import { BannerActivityReporterComponent } from './banner-activity-reporter.component'; 13 | import { SpinnerActivityReporterComponent } from './spinner-activity-reporter.component'; 14 | 15 | @NgModule({ 16 | declarations: [BannerActivityReporterComponent, SpinnerActivityReporterComponent], 17 | imports: [CommonModule, ClarityModule, I18nModule, VcdErrorBannerModule, VcdLoadingIndicatorModule], 18 | exports: [BannerActivityReporterComponent, SpinnerActivityReporterComponent], 19 | }) 20 | export class VcdActivityReporterModule {} 21 | -------------------------------------------------------------------------------- /projects/components/src/common/activity-reporter/banner-activity-reporter.component.html: -------------------------------------------------------------------------------- 1 | 2 |
{{ loadingMessage | lazyString }}
3 |
4 | 5 | 6 |
7 | 8 | {{ errorText }} 9 | 10 |
11 |
12 | 13 | 14 |
15 | 16 | {{ successMessage }} 17 | 18 |
19 |
20 | -------------------------------------------------------------------------------- /projects/components/src/common/activity-reporter/index.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2020 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | 6 | export * from './activity-reporter.module'; 7 | export * from './activity-reporter'; 8 | export * from './activity-promise-resolver'; 9 | export * from './banner-activity-reporter.component'; 10 | export * from './spinner-activity-reporter.component'; 11 | -------------------------------------------------------------------------------- /projects/components/src/common/activity-reporter/spinner-activity-reporter.component.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /projects/components/src/common/error/error-banner.component.html: -------------------------------------------------------------------------------- 1 | 8 |
9 | {{ errorMessage }} 10 |
11 |
12 | -------------------------------------------------------------------------------- /projects/components/src/common/error/error-banner.component.scss: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2020 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | 6 | clr-alert ::ng-deep .alert { 7 | margin-left: 0; 8 | margin-right: 0; 9 | } 10 | -------------------------------------------------------------------------------- /projects/components/src/common/error/error-banner.module.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2020 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | 6 | import { CommonModule } from '@angular/common'; 7 | import { NgModule } from '@angular/core'; 8 | import { ClarityModule } from '@clr/angular'; 9 | import { I18nModule } from '@vcd/i18n'; 10 | import { ErrorBannerComponent } from './error-banner.component'; 11 | 12 | @NgModule({ 13 | declarations: [ErrorBannerComponent], 14 | imports: [CommonModule, ClarityModule, I18nModule], 15 | exports: [ErrorBannerComponent], 16 | }) 17 | export class VcdErrorBannerModule {} 18 | -------------------------------------------------------------------------------- /projects/components/src/common/error/error-banner.wo.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2020-2023 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | 6 | import { WidgetObject } from '../../utils/test/widget-object'; 7 | import { ErrorBannerComponent } from './error-banner.component'; 8 | 9 | /** 10 | * Testing Widget Object for {@link ErrorBannerComponent} 11 | */ 12 | export class ErrorBannerWidgetObject extends WidgetObject { 13 | static tagName = 'vcd-error-banner'; 14 | 15 | public getDisplayedError(): string { 16 | return this.findElement('clr-alert').nativeElement.textContent; 17 | } 18 | 19 | public close(): string { 20 | return this.findElement('clr-alert .close').nativeElement.click(); 21 | } 22 | 23 | /** 24 | * The ARIA role of the component. 25 | */ 26 | get ariaRole(): string { 27 | return this.findElement('clr-alert').nativeElement.getAttribute('role'); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /projects/components/src/common/error/index.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2020 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | 6 | export * from './error-banner.component'; 7 | export * from './error-banner.module'; 8 | -------------------------------------------------------------------------------- /projects/components/src/common/interfaces/index.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2020 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | 6 | export * from './select-option'; 7 | export * from './action-item.interface'; 8 | -------------------------------------------------------------------------------- /projects/components/src/common/interfaces/select-option.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2020 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | 6 | /** 7 | * Options displayed in a select input option list 8 | */ 9 | export interface SelectOption { 10 | /** 11 | * Value of a option 12 | */ 13 | value: string | number; 14 | /** 15 | * Text to be shown for the option 16 | */ 17 | display: string; 18 | /** 19 | * Used for translation of the {@link SelectOption.display} text 20 | */ 21 | isTranslatable?: boolean; 22 | /** 23 | * Wheather the option is disabled 24 | */ 25 | disabled?: boolean; 26 | } 27 | -------------------------------------------------------------------------------- /projects/components/src/common/loading/index.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2020 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | 6 | export * from './loading-indicator.component'; 7 | export * from './loading-indicator.module'; 8 | -------------------------------------------------------------------------------- /projects/components/src/common/loading/loading-indicator.component.html: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 |
5 | 6 | {{ loadingTextKey | translate }} 7 |
8 |
9 |
10 | 11 | -------------------------------------------------------------------------------- /projects/components/src/common/loading/loading-indicator.component.scss: -------------------------------------------------------------------------------- 1 | $overlay-background-color-default: rgba(250, 250, 250, 0.5); 2 | $overlay-background-color-modal: rgba(255, 255, 255, 0.5); 3 | 4 | @mixin full-height { 5 | position: absolute; 6 | top: 0; 7 | left: 0; 8 | right: 0; 9 | bottom: 0; 10 | } 11 | 12 | :host { 13 | display: block; 14 | position: relative; 15 | } 16 | 17 | :host-context(.modal-body) .overlay { 18 | background-color: $overlay-background-color-modal; 19 | } 20 | 21 | .overlay { 22 | background-color: $overlay-background-color-default; 23 | @include full-height(); 24 | z-index: 10; 25 | } 26 | 27 | .indicator-container { 28 | z-index: 600; 29 | display: flex; 30 | flex-direction: row; 31 | justify-content: center; 32 | align-items: center; 33 | @include full-height(); 34 | } 35 | -------------------------------------------------------------------------------- /projects/components/src/common/loading/loading-indicator.module.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2020 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | 6 | import { CommonModule } from '@angular/common'; 7 | import { NgModule } from '@angular/core'; 8 | import { ClarityModule } from '@clr/angular'; 9 | import { I18nModule } from '@vcd/i18n'; 10 | import { LoadingIndicatorComponent } from './loading-indicator.component'; 11 | 12 | @NgModule({ 13 | declarations: [LoadingIndicatorComponent], 14 | imports: [CommonModule, ClarityModule, I18nModule], 15 | exports: [LoadingIndicatorComponent], 16 | }) 17 | export class VcdLoadingIndicatorModule {} 18 | -------------------------------------------------------------------------------- /projects/components/src/common/pipes/pipes.module.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2019 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | 6 | import { NgModule } from '@angular/core'; 7 | import { NestedPropertyPipe } from './nested-property.pipe'; 8 | 9 | const declarations = [NestedPropertyPipe]; 10 | 11 | @NgModule({ 12 | declarations, 13 | exports: [...declarations], 14 | }) 15 | export class PipesModule {} 16 | -------------------------------------------------------------------------------- /projects/components/src/common/subscription/index.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2020 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | 6 | export * from './subscription-tracker'; 7 | -------------------------------------------------------------------------------- /projects/components/src/constants.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2020 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | 6 | export type NonEmptyArray = T[] & { 0: T }; 7 | 8 | /** 9 | * Key of an action item object that is intended to be used only by the {@link ActionMenuComponent} and the {@link DropdownComponent}. 10 | * This property is used to store the last emitted value from availability observable of an action item. 11 | */ 12 | export const lastAvailabilityValue = Symbol(); 13 | -------------------------------------------------------------------------------- /projects/components/src/data-exporter/data-exporter.component.scss: -------------------------------------------------------------------------------- 1 | div.progress { 2 | visibility: hidden; 3 | 4 | &.pending { 5 | visibility: visible; 6 | } 7 | } 8 | 9 | .flex-row { 10 | display: flex; 11 | flex-direction: row; 12 | } 13 | 14 | .fill-space { 15 | flex: 1; 16 | } 17 | 18 | .dropdown-button { 19 | margin-top: -1px; 20 | margin-left: 2px; 21 | } 22 | 23 | .progress-divider { 24 | height: 20px; 25 | } 26 | 27 | .column-container { 28 | overflow: auto; 29 | height: 50px; 30 | display: block; 31 | } 32 | 33 | button.select-all { 34 | margin: 0; 35 | padding: 0; 36 | } 37 | 38 | clr-dropdown-menu { 39 | height: 200px; 40 | overflow: auto; 41 | } 42 | 43 | .x-button.label { 44 | padding: 0 0.1rem 0.02rem; 45 | } 46 | 47 | button.btn-link.remove-col-button { 48 | margin: 0; 49 | clr-icon { 50 | margin-right: 0px; 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /projects/components/src/data-exporter/data-exporter.module.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2019 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | 6 | import { CommonModule } from '@angular/common'; 7 | import { NgModule } from '@angular/core'; 8 | import { ReactiveFormsModule } from '@angular/forms'; 9 | import { ClarityModule } from '@clr/angular'; 10 | import { I18nModule } from '@vcd/i18n'; 11 | import { DataExporterComponent } from './data-exporter.component'; 12 | 13 | @NgModule({ 14 | declarations: [DataExporterComponent], 15 | imports: [CommonModule, ReactiveFormsModule, ClarityModule, I18nModule], 16 | exports: [DataExporterComponent], 17 | }) 18 | export class VcdDataExporterModule {} 19 | -------------------------------------------------------------------------------- /projects/components/src/data-exporter/index.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2019 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | 6 | export * from './data-exporter.component'; 7 | export * from './data-exporter.module'; 8 | export * from './data-exporter.wo'; 9 | export * from './csv-exporter.service'; 10 | -------------------------------------------------------------------------------- /projects/components/src/datagrid/directives/component-renderer-outlet.module.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2021 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | 6 | import { CommonModule } from '@angular/common'; 7 | import { NgModule } from '@angular/core'; 8 | import { FormsModule, ReactiveFormsModule } from '@angular/forms'; 9 | import { ClarityModule } from '@clr/angular'; 10 | import { I18nModule } from '@vcd/i18n'; 11 | import { ComponentRendererOutletDirective } from './component-renderer-outlet.directive'; 12 | 13 | @NgModule({ 14 | declarations: [ComponentRendererOutletDirective], 15 | imports: [CommonModule, FormsModule, ReactiveFormsModule, ClarityModule, I18nModule], 16 | exports: [ComponentRendererOutletDirective], 17 | }) 18 | export class VcdComponentRendererOutletModule {} 19 | -------------------------------------------------------------------------------- /projects/components/src/datagrid/filters/datagrid-multiselect-filter.component.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |
5 | 6 | 9 |
10 |
11 |
12 |
13 | -------------------------------------------------------------------------------- /projects/components/src/datagrid/filters/datagrid-numeric-filter.component.scss: -------------------------------------------------------------------------------- 1 | vcd-form-input { 2 | & ::ng-deep .clr-form-control, 3 | & ::ng-deep .clr-subtext { 4 | margin-top: 0; 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /projects/components/src/datagrid/filters/datagrid-select-filter.component.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |
5 | 11 |
12 |
13 |
14 |
15 | -------------------------------------------------------------------------------- /projects/components/src/datagrid/filters/datagrid-string-filter.component.html: -------------------------------------------------------------------------------- 1 |
2 | 10 |
11 | -------------------------------------------------------------------------------- /projects/components/src/datagrid/index.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2019 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | 6 | export * from './datagrid.module'; 7 | export * from './datagrid.component'; 8 | export * from './interfaces/datagrid-column.interface'; 9 | export * from './interfaces/component-renderer.interface'; 10 | export * from './interfaces/datagrid-action-display.interface'; 11 | export * from './renderers/index'; 12 | export * from './filters/datagrid-filter'; 13 | export * from './filters/datagrid-numeric-filter.component'; 14 | export * from './filters/datagrid-string-filter.component'; 15 | export * from './filters/datagrid-select-filter.component'; 16 | export * from './filters/datagrid-multiselect-filter.component'; 17 | -------------------------------------------------------------------------------- /projects/components/src/datagrid/mock-data.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2019 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | 6 | export interface MockRecord { 7 | name: string; 8 | city: string; 9 | state: string; 10 | details: { 11 | gender: string; 12 | }; 13 | age: number; 14 | } 15 | 16 | export const mockData: MockRecord[] = [ 17 | { 18 | name: 'Person 1', 19 | city: 'Palo Alto', 20 | state: 'CA', 21 | details: { 22 | gender: 'Male', 23 | }, 24 | age: 30, 25 | }, 26 | { 27 | name: 'Person 2', 28 | city: 'Boston', 29 | state: 'MA', 30 | details: { 31 | gender: 'Female', 32 | }, 33 | age: 60, 34 | }, 35 | ]; 36 | -------------------------------------------------------------------------------- /projects/components/src/datagrid/pipes/function-renderer.pipe.spec.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2019 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | 6 | import { FunctionRendererPipe } from './function-renderer.pipe'; 7 | 8 | describe('FunctionRendererPipe', () => { 9 | const functionRendererPipe = new FunctionRendererPipe(); 10 | 11 | it('returns null if item or function is not provided', () => { 12 | expect(functionRendererPipe.transform(null, () => undefined)).toBeNull(); 13 | expect(functionRendererPipe.transform({}, null)).toBeNull(); 14 | }); 15 | 16 | it('returns transformed value as the value returned by the function given as input', () => { 17 | const item = { 18 | prop: 'value', 19 | }; 20 | const foo = (obj: { prop: string }) => { 21 | return obj.prop; 22 | }; 23 | const boo = (obj: unknown) => { 24 | return !!obj; 25 | }; 26 | expect(functionRendererPipe.transform(item, foo)).toEqual('value'); 27 | expect(functionRendererPipe.transform(item, boo)).toBeTruthy(); 28 | }); 29 | }); 30 | -------------------------------------------------------------------------------- /projects/components/src/datagrid/pipes/function-renderer.pipe.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2019 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | 6 | import { Pipe, PipeTransform } from '@angular/core'; 7 | 8 | /** 9 | * Used for executing the functions of column cells which use functions to calculate their values from different 10 | * properties of an object 11 | */ 12 | @Pipe({ 13 | name: 'functionRenderer', 14 | pure: true, 15 | }) 16 | export class FunctionRendererPipe implements PipeTransform { 17 | public transform(item: any, renderer: (val: any) => any): string { 18 | if (!item || !renderer) { 19 | return null; 20 | } 21 | return renderer(item); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /projects/components/src/datagrid/renderers/bold-text-renderer.wo.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2019 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | 6 | import { WidgetObject } from '../../utils/test/widget-object'; 7 | import { BoldTextRendererComponent } from './bold-text-renderer.component'; 8 | 9 | /** 10 | * Widget Object for the bold text renderer. 11 | */ 12 | export class BoldTextRendererWidgetObject extends WidgetObject { 13 | static tagName = 'vcd-bold-text-renderer'; 14 | 15 | get text(): string { 16 | return this.findElement('strong').nativeElement.textContent; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /projects/components/src/datagrid/renderers/index.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2019 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | 6 | export * from './bold-text-renderer.component'; 7 | -------------------------------------------------------------------------------- /projects/components/src/dropdown/dropdown.component.scss: -------------------------------------------------------------------------------- 1 | .nested-dropdown-menu { 2 | max-width: 15rem; 3 | 4 | ::ng-deep .nested-dropdown { 5 | display: block; 6 | white-space: nowrap; 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /projects/components/src/dropdown/dropdown.module.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2019 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | 6 | import { CommonModule } from '@angular/common'; 7 | import { NgModule } from '@angular/core'; 8 | import { ReactiveFormsModule } from '@angular/forms'; 9 | import { ClarityModule } from '@clr/angular'; 10 | import { I18nModule } from '@vcd/i18n'; 11 | import { ShowClippedTextDirectiveModule } from '../lib/directives/show-clipped-text.directive.module'; 12 | import { DropdownFocusHandlerDirective } from './dropdown.component'; 13 | import { DropdownComponent } from './dropdown.component'; 14 | import { DynamicDropdownPositionDirective } from './dynamic-dropdown-position.directive'; 15 | 16 | @NgModule({ 17 | declarations: [DropdownComponent, DynamicDropdownPositionDirective, DropdownFocusHandlerDirective], 18 | imports: [CommonModule, ReactiveFormsModule, ClarityModule, I18nModule, ShowClippedTextDirectiveModule], 19 | exports: [DropdownComponent, DynamicDropdownPositionDirective, DropdownFocusHandlerDirective], 20 | }) 21 | export class DropdownModule {} 22 | -------------------------------------------------------------------------------- /projects/components/src/dropdown/index.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2019 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | 6 | export * from './dropdown.module'; 7 | export * from './dropdown.component'; 8 | export * from './dynamic-dropdown-position.directive'; 9 | -------------------------------------------------------------------------------- /projects/components/src/form/form-checkbox/form-checkbox.component.scss: -------------------------------------------------------------------------------- 1 | label.clr-control-label { 2 | display: inline-block; 3 | } 4 | 5 | .clr-checkbox-wrapper, 6 | .clr-toggle-wrapper { 7 | display: flex; 8 | align-items: center; 9 | } 10 | 11 | .btn-blank { 12 | background-color: transparent; 13 | border: none; 14 | padding: 0; 15 | cursor: pointer; 16 | } 17 | -------------------------------------------------------------------------------- /projects/components/src/form/form-input/form-input.component.scss: -------------------------------------------------------------------------------- 1 | .form-group.hide-label { 2 | padding-left: 0; 3 | } 4 | 5 | :host-context(.modal):not(.adjust-aside-left) { 6 | .form-label { 7 | flex-grow: 1; 8 | } 9 | .form-label > input { 10 | width: 100%; 11 | } 12 | } 13 | 14 | .form-group-description { 15 | margin-bottom: 15px; 16 | } 17 | -------------------------------------------------------------------------------- /projects/components/src/form/form-select/form-select.component.scss: -------------------------------------------------------------------------------- 1 | .form-group.hide-label { 2 | padding-left: 0; 3 | } 4 | 5 | .form-group.hide-label label:first-child { 6 | visibility: hidden; 7 | } 8 | 9 | .error-content { 10 | white-space: normal; 11 | } 12 | 13 | :host(.site-selector-single-site) { 14 | display: none; 15 | } 16 | 17 | label { 18 | white-space: normal; 19 | } 20 | 21 | clr-signpost-content { 22 | white-space: pre; 23 | } 24 | 25 | clr-signpost { 26 | // Offset margin right on the button rendered by the signpost so there's 27 | // no extra room after the signpost 28 | margin-right: -12px; 29 | } 30 | -------------------------------------------------------------------------------- /projects/components/src/form/form.scss: -------------------------------------------------------------------------------- 1 | .required-field:after { 2 | content: '*'; 3 | color: red; 4 | padding-left: 5px; 5 | } 6 | .form-group ::ng-deep aside { 7 | display: inline-block; 8 | } 9 | 10 | clr-signpost-content p:first-child { 11 | margin-top: 0; 12 | 13 | // Sequences of whitespace will collapse into a single whitespace. 14 | // Text will wrap when necessary, and on line breaks. 15 | white-space: pre-line; 16 | } 17 | 18 | label.clr-control-label:empty { 19 | display: none; 20 | } 21 | -------------------------------------------------------------------------------- /projects/components/src/form/index.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2019 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | 6 | export * from './form.module'; 7 | export * from './base-form-control'; 8 | export * from './form-input/form-input.component'; 9 | export * from './form-select/form-select.component'; 10 | export * from './interfaces/can-be-read-only.interface'; 11 | export * from './validators'; 12 | export * from './number-with-unit-input/number-with-unit-form-input.component'; 13 | export * from './form-checkbox/form-checkbox.component'; 14 | -------------------------------------------------------------------------------- /projects/components/src/form/interfaces/can-be-read-only.interface.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2020 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | 6 | /** 7 | * Components that can be made readonly should implement this interface 8 | */ 9 | export interface CanBeReadOnly { 10 | /** 11 | * This being true implies that any controls that may edit data will not allow editing or be removed 12 | */ 13 | isReadOnly: boolean; 14 | } 15 | -------------------------------------------------------------------------------- /projects/components/src/form/number-with-unit-input/number-with-unit-form-input.component.scss: -------------------------------------------------------------------------------- 1 | .clr-control-container .clr-input { 2 | margin-right: 5px; 3 | } 4 | 5 | // To make the text input and the select align, it still doesn't at some zoom levels. 6 | input[type='number'] { 7 | margin-top: 1px; 8 | } 9 | 10 | .clr-input-wrapper { 11 | align-items: center; 12 | display: flex; 13 | } 14 | 15 | .clr-error { 16 | // When there's an error, the arrow in the dropdown is offset, undo it 17 | .clr-select-wrapper::after { 18 | right: 0.3rem; 19 | } 20 | .clr-validate-icon { 21 | margin-left: 0; 22 | } 23 | } 24 | 25 | div.clr-select-wrapper { 26 | width: auto; // The width is being set to 100% else where making this div grow wider than necessary 27 | flex: 0 1 auto; 28 | } 29 | 30 | .single-option { 31 | flex: 0; 32 | } 33 | -------------------------------------------------------------------------------- /projects/components/src/formly/vcd/index.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2020 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | 6 | export * from './vcd-formly.module'; 7 | export * from './vcd-formly.config'; 8 | export * from './inputs/input/formly-input.component'; 9 | export * from './inputs/select/formly-select.component'; 10 | export * from './inputs/number-with-unit-input/formly-number-with-unit-input.component'; 11 | -------------------------------------------------------------------------------- /projects/components/src/lib/directives/alternative-text/alternative-text.directive.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2020 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | 6 | import { AfterViewInit, Directive, ElementRef, Input, Renderer2 } from '@angular/core'; 7 | 8 | export const ALTERNATIVE_TEXT = 'alt'; 9 | 10 | /** 11 | * Adds the 'alt' attribute to the injected svg in clr-icon elements. 12 | */ 13 | @Directive({ 14 | // eslint-disable-next-line @angular-eslint/directive-selector 15 | selector: 'clr-icon', 16 | }) 17 | export class AlternativeTextDirective implements AfterViewInit { 18 | @Input() vcdAlternativeText: string = ''; 19 | 20 | constructor(private el: ElementRef, private renderer: Renderer2) {} 21 | 22 | ngAfterViewInit(): void { 23 | const svgElement = this.el.nativeElement.querySelector('svg'); 24 | if (svgElement && !svgElement.getAttribute(ALTERNATIVE_TEXT)) { 25 | this.renderer.setAttribute(svgElement, ALTERNATIVE_TEXT, this.vcdAlternativeText); 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /projects/components/src/lib/directives/alternative-text/alternative-text.module.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2020 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | 6 | import { NgModule } from '@angular/core'; 7 | import { AlternativeTextDirective } from './alternative-text.directive'; 8 | 9 | @NgModule({ 10 | declarations: [AlternativeTextDirective], 11 | exports: [AlternativeTextDirective], 12 | }) 13 | export class AlternativeTextModule {} 14 | -------------------------------------------------------------------------------- /projects/components/src/lib/directives/aria-activedescendant/aria-active-descendant.service.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2021 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | import { Injectable } from '@angular/core'; 6 | import { BehaviorSubject, Observable, Subject } from 'rxjs'; 7 | 8 | /** 9 | * Communication service between {@link AriaActiveDescendantDirective} and observer of activeDescendantObservable 10 | */ 11 | @Injectable() 12 | export class AriaActiveDescendantService { 13 | private activeDescendantSubject: Subject = new BehaviorSubject(''); 14 | 15 | /** 16 | * Observed by element which owns the section with possible active descendants 17 | */ 18 | public activeDescendantObservable: Observable = this.activeDescendantSubject.asObservable(); 19 | 20 | /** 21 | * Marks element as active descendant 22 | * @param id attribute of active descendant element 23 | */ 24 | public selectDescendant(id: string): void { 25 | this.activeDescendantSubject.next(id); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /projects/components/src/lib/directives/aria-activedescendant/aria-activedescendant.module.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2021 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | import { NgModule } from '@angular/core'; 6 | import { AriaActiveDescendantDirective } from './aria-active-descendant.directive'; 7 | 8 | @NgModule({ 9 | declarations: [AriaActiveDescendantDirective], 10 | exports: [AriaActiveDescendantDirective], 11 | }) 12 | export class AriaActivedescendantModule {} 13 | -------------------------------------------------------------------------------- /projects/components/src/lib/directives/aria-activedescendant/index.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2021 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | export * from './aria-active-descendant.directive'; 6 | export * from './aria-active-descendant.service'; 7 | export * from './aria-activedescendant.module'; 8 | -------------------------------------------------------------------------------- /projects/components/src/lib/directives/index.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2020 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | 6 | export * from './alternative-text/alternative-text.module'; 7 | export * from './alternative-text/alternative-text.directive'; 8 | export * from './responsive-input/responsive-input.directive'; 9 | export * from './responsive-input/responsive-input.module'; 10 | export * from './show-clipped-text.directive'; 11 | export * from './show-clipped-text.directive.module'; 12 | export * from './aria-activedescendant'; 13 | -------------------------------------------------------------------------------- /projects/components/src/lib/directives/responsive-input/responsive-input.module.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2020 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | 6 | import { NgModule } from '@angular/core'; 7 | import { ResponsiveInputDirective } from './responsive-input.directive'; 8 | 9 | @NgModule({ 10 | declarations: [ResponsiveInputDirective], 11 | exports: [ResponsiveInputDirective], 12 | }) 13 | export class ResponsiveInputDirectiveModule {} 14 | -------------------------------------------------------------------------------- /projects/components/src/lib/directives/show-clipped-text.directive.module.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2020 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | 6 | import { NgModule } from '@angular/core'; 7 | import { ShowClippedTextDirective } from './show-clipped-text.directive'; 8 | 9 | @NgModule({ 10 | declarations: [ShowClippedTextDirective], 11 | exports: [ShowClippedTextDirective], 12 | }) 13 | export class ShowClippedTextDirectiveModule {} 14 | -------------------------------------------------------------------------------- /projects/components/src/public-api.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2022 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | 6 | export * from './action-menu/index'; 7 | export * from './action-search-provider/index'; 8 | export * from './common/activity-reporter/index'; 9 | export * from './common/error/index'; 10 | export * from './common/interfaces/index'; 11 | export * from './common/loading/index'; 12 | export * from './common/subscription/index'; 13 | export * from './components.module'; 14 | export * from './data-exporter/index'; 15 | export * from './datagrid/index'; 16 | export * from './dropdown/index'; 17 | export * from './form/index'; 18 | export * from './formly/vcd/index'; 19 | export * from './lib/directives/index'; 20 | export * from './quick-search/index'; 21 | export * from './sharing-modal/index'; 22 | export * from './utils/index'; 23 | -------------------------------------------------------------------------------- /projects/components/src/quick-search/drawer/drawer.component.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 | 5 |
6 |
7 |
8 | -------------------------------------------------------------------------------- /projects/components/src/quick-search/drawer/drawer.component.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2021 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | import { Component, Input } from '@angular/core'; 6 | 7 | const CLARITY_HEADER_HEIGHT = 60; 8 | 9 | @Component({ 10 | selector: 'vcd-drawer-component', 11 | templateUrl: './drawer.component.html', 12 | styleUrls: ['./drawer.component.scss'], 13 | }) 14 | export class DrawerComponent { 15 | @Input() topOffset: number = 0; 16 | @Input() headerHeight: number = CLARITY_HEADER_HEIGHT; 17 | 18 | get containerHeight(): string { 19 | return 'calc(100vh - ' + (this.topOffset + this.headerHeight) + 'px)'; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /projects/components/src/quick-search/index.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2020 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | export * from './quick-search.module'; 6 | export * from './quick-search-result'; 7 | export * from './quick-search.component'; 8 | export * from './quick-search.service'; 9 | export * from './quick-search.provider'; 10 | export * from './quick-search-registrar.service'; 11 | export * from './quick-search.wo'; 12 | -------------------------------------------------------------------------------- /projects/components/src/quick-search/quick-search.dataui.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2021 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | export const DataUi = { 6 | modalBody: 'modal-body', 7 | searchResultSectionTitles: 'search-result-section-titles', 8 | searchResultItems: 'search-result-items', 9 | spinner: 'spinner', 10 | noResults: 'no-results', 11 | searchInput: 'search-input,', 12 | searchResultAlerts: 'search-result-alerts', 13 | filterDropdownItem: 'filter-dropdown-item', 14 | filterButton(id: string) { 15 | return `filter-btn:${id}`; 16 | }, 17 | }; 18 | -------------------------------------------------------------------------------- /projects/components/src/quick-search/quick-search.module.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2020 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | 6 | import { CommonModule } from '@angular/common'; 7 | import { NgModule } from '@angular/core'; 8 | import { FormsModule, ReactiveFormsModule } from '@angular/forms'; 9 | import { ClarityModule } from '@clr/angular'; 10 | import { I18nModule } from '@vcd/i18n'; 11 | import { ShowClippedTextDirectiveModule } from '../lib/directives/show-clipped-text.directive.module'; 12 | import { AriaActivedescendantModule } from '../lib/directives'; 13 | import { DrawerComponent } from './drawer/drawer.component'; 14 | import { QuickSearchComponent } from './quick-search.component'; 15 | 16 | @NgModule({ 17 | imports: [ 18 | CommonModule, 19 | ClarityModule, 20 | FormsModule, 21 | ReactiveFormsModule, 22 | I18nModule, 23 | ShowClippedTextDirectiveModule, 24 | AriaActivedescendantModule, 25 | ], 26 | declarations: [QuickSearchComponent, DrawerComponent], 27 | exports: [QuickSearchComponent], 28 | }) 29 | export class QuickSearchModule {} 30 | -------------------------------------------------------------------------------- /projects/components/src/sharing-modal/index.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2021 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | 6 | export * from './sharing-modal.component'; 7 | export * from './sharing-modal.module'; 8 | export * from './tabs/sharing-modal-tab.component'; 9 | export * from './users-groups-orgs-sharing-modal.directive'; 10 | -------------------------------------------------------------------------------- /projects/components/src/sharing-modal/select-all-checkbox/select-all-toggle.component.html: -------------------------------------------------------------------------------- 1 |
2 | 11 | 12 | 17 |
18 | -------------------------------------------------------------------------------- /projects/components/src/sharing-modal/select-all-checkbox/select-all-toggle.component.scss: -------------------------------------------------------------------------------- 1 | .select-all ::ng-deep .clr-select-wrapper { 2 | margin-left: 20px; 3 | margin-right: 20px; 4 | } 5 | 6 | .select-all { 7 | display: flex; 8 | } 9 | -------------------------------------------------------------------------------- /projects/components/src/sharing-modal/sharing-modal.component.scss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vmware-archive/vmware-cloud-director-ui-components/c0d4bee9936324c6232ddad1a6f8b56cd431abc2/projects/components/src/sharing-modal/sharing-modal.component.scss -------------------------------------------------------------------------------- /projects/components/src/test.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2019 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | 6 | // This file is required by karma.conf.js and loads recursively all the .spec and framework files 7 | /** 8 | * Patches in SystemJs for use by the VCD Angular Client. This package is @vcd/angular-client. 9 | * This project requires that you use system JS to provide a module that gives injection tokens. We need 10 | * to mock this module. 11 | */ 12 | import System from 'systemjs/dist/system'; 13 | // Provides the @vcd/common module so loading the VcdApiClient does not throw an error. 14 | (window as any).SystemJs = System.registry.set('@vcd/common', System.newModule({})); // >= 9.5 15 | import 'zone.js'; 16 | import 'zone.js/testing'; 17 | // eslint-disable-next-line sort-imports 18 | import { getTestBed } from '@angular/core/testing'; 19 | import { BrowserDynamicTestingModule, platformBrowserDynamicTesting } from '@angular/platform-browser-dynamic/testing'; 20 | 21 | // First, initialize the Angular testing environment. 22 | getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting(), { 23 | teardown: { destroyAfterEach: false }, 24 | }); 25 | -------------------------------------------------------------------------------- /projects/components/src/utils/id-generator/id-generator.spec.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2019 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | 6 | import { IdGenerator } from './id-generator'; 7 | 8 | describe('IdGenerator', () => { 9 | const prefix = 'testStr'; 10 | const idGenerator = new IdGenerator(prefix); 11 | const id1 = idGenerator.generate(); 12 | const id2 = idGenerator.generate(); 13 | const id3 = idGenerator.generate(); 14 | describe('prefix', () => { 15 | it('prepends the string given to constructor and a - to ID generated', () => { 16 | expect(id1.substring(0, prefix.length)).toEqual(prefix); 17 | expect(id1.charAt(prefix.length)).toEqual('-'); 18 | }); 19 | }); 20 | 21 | describe('id getter', () => { 22 | it('generates unique ID every time it is called', () => { 23 | expect(id1).toEqual(`${prefix}-0`); 24 | expect(id2).toEqual(`${prefix}-1`); 25 | expect(id3).toEqual(`${prefix}-2`); 26 | }); 27 | }); 28 | }); 29 | -------------------------------------------------------------------------------- /projects/components/src/utils/id-generator/id-generator.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2019 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | 6 | /** 7 | * Generates unique IDs 8 | */ 9 | export class IdGenerator { 10 | private static idCounter = 0; 11 | 12 | /** 13 | * Getter that returns the a unique ID 14 | */ 15 | generate(): string { 16 | return `${this.prefix}-${IdGenerator.idCounter++}`; 17 | } 18 | 19 | /** 20 | * The string to be prefixed for {@link IdGenerator#id} returned 21 | */ 22 | constructor(private prefix: string) {} 23 | } 24 | -------------------------------------------------------------------------------- /projects/components/src/utils/index.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2020 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | 6 | export * from './id-generator/id-generator'; 7 | export * from './test/index'; 8 | export * from './unit/unit'; 9 | export * from './unit/unit-formatter'; 10 | export * from './common-util'; 11 | export * from './filter-builder'; 12 | -------------------------------------------------------------------------------- /projects/components/src/utils/test/activity-reporter/banner-activity-reporter.wo.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2020 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | 6 | import { BannerActivityReporterComponent } from '../../../common/activity-reporter'; 7 | import { WidgetObject } from '../widget-object'; 8 | 9 | export class BannerActivityReporterWidgetObject extends WidgetObject { 10 | static tagName = 'vcd-banner-activity-reporter'; 11 | 12 | get running(): boolean { 13 | return this.component.running; 14 | } 15 | 16 | get errorText(): string { 17 | return this.component.errorText; 18 | } 19 | 20 | get sucessText(): string { 21 | return this.component.successMessage; 22 | } 23 | 24 | get loadingText(): string { 25 | return this.findElement('clr-alert').nativeElement.textContent; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /projects/components/src/utils/test/index.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2020 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | 6 | export * from './activity-reporter/banner-activity-reporter.wo'; 7 | export * from './activity-reporter/spinner-activity-reporter.wo'; 8 | -------------------------------------------------------------------------------- /projects/components/src/utils/test/test-utils.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2020 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | 6 | /** 7 | * Helper to create a promise from a setTimeout so we can await for it 8 | * @param ms How long to wait before resolving 9 | */ 10 | export function timeout(ms = 0): Promise { 11 | // See https://github.com/microsoft/tslint-microsoft-contrib/issues/355 12 | // eslint-disable-next-line 13 | return new Promise((resolve) => window.setTimeout(resolve, ms)); 14 | } 15 | -------------------------------------------------------------------------------- /projects/components/src/utils/types.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2020 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | 6 | import { Observable } from 'rxjs'; 7 | 8 | // This file contains miscellaneous type definitions that are provided by another library 9 | // but are important to link to in the documentation. 10 | // This is because of a limitation in Compodoc in linking to assets provided by another library. 11 | 12 | /** 13 | * The result of a call to either {@link TranslationService.translate} or {@link TranslationService.translateAsync}. 14 | * A duplicate of the @vcd/i18n LazyString. 15 | */ 16 | export type LazyString = string | Observable | Promise; 17 | -------------------------------------------------------------------------------- /projects/components/tsconfig.lib.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../../out-tsc/lib", 5 | "target": "es2015", 6 | "declaration": true, 7 | "inlineSources": true, 8 | "types": [], 9 | "lib": ["dom", "es2018"] 10 | }, 11 | "angularCompilerOptions": { 12 | "annotateForClosureCompiler": true, 13 | "compilationMode": "partial", 14 | "skipTemplateCodegen": true, 15 | "strictMetadataEmit": true, 16 | "fullTemplateTypeCheck": true, 17 | "strictInjectionParameters": true, 18 | "enableResourceInlining": true 19 | }, 20 | "include": ["**/*.ts"], 21 | "exclude": ["src/test.ts", "**/*.spec.ts"] 22 | } 23 | -------------------------------------------------------------------------------- /projects/components/tsconfig.lib.prod.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.lib.json", 3 | "compilerOptions": { 4 | "declarationMap": false 5 | }, 6 | "angularCompilerOptions": { 7 | "compilationMode": "partial" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /projects/components/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../../out-tsc/spec", 5 | "types": ["node", "jasmine"] 6 | }, 7 | "files": ["src/test.ts"], 8 | "include": ["**/*.spec.ts", "**/*.d.ts"] 9 | } 10 | -------------------------------------------------------------------------------- /projects/examples/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../.eslintrc.json", 3 | "ignorePatterns": [ 4 | "!**/*" 5 | ], 6 | "overrides": [ 7 | { 8 | "files": [ 9 | "*.ts" 10 | ], 11 | "parserOptions": { 12 | "project": [ 13 | "projects/examples/tsconfig.app.json", 14 | "projects/examples/tsconfig.spec.json", 15 | "projects/examples/e2e/tsconfig.json" 16 | ], 17 | "createDefaultProgram": true 18 | } 19 | } 20 | ] 21 | } 22 | -------------------------------------------------------------------------------- /projects/examples/browserslist: -------------------------------------------------------------------------------- 1 | # This file is used by the build system to adjust CSS and JS output to support the specified browsers below. 2 | # For additional information regarding the format and rule options, please see: 3 | # https://github.com/browserslist/browserslist#queries 4 | 5 | # You can see what browsers were selected by your queries by running: 6 | # npx browserslist 7 | 8 | > 0.5% 9 | last 2 versions 10 | Firefox ESR 11 | not dead 12 | not IE 9-11 13 | -------------------------------------------------------------------------------- /projects/examples/e2e/protractor.conf.js: -------------------------------------------------------------------------------- 1 | // @ts-check 2 | // Protractor configuration file, see link for more information 3 | // https://github.com/angular/protractor/blob/master/lib/config.ts 4 | 5 | const { SpecReporter } = require('jasmine-spec-reporter'); 6 | 7 | /** 8 | * @type { import("protractor").Config } 9 | */ 10 | exports.config = { 11 | allScriptsTimeout: 11000, 12 | specs: ['./src/**/*.e2e-spec.ts'], 13 | capabilities: { 14 | browserName: 'chrome', 15 | }, 16 | directConnect: true, 17 | baseUrl: 'http://localhost:4200/', 18 | framework: 'jasmine', 19 | jasmineNodeOpts: { 20 | showColors: true, 21 | defaultTimeoutInterval: 30000, 22 | print: function () {}, 23 | }, 24 | onPrepare() { 25 | require('ts-node').register({ 26 | project: require('path').join(__dirname, './tsconfig.json'), 27 | }); 28 | jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } })); 29 | }, 30 | }; 31 | -------------------------------------------------------------------------------- /projects/examples/e2e/src/app.e2e-spec.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2019 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | 6 | import { browser, logging } from 'protractor'; 7 | import { AppPage } from './app.po'; 8 | 9 | describe('workspace-project App', () => { 10 | let page: AppPage; 11 | 12 | beforeEach(() => { 13 | page = new AppPage(); 14 | }); 15 | 16 | it('should display welcome message', () => { 17 | page.navigateTo(); 18 | expect(page.getTitleText()).toEqual('examples app is running!'); 19 | }); 20 | 21 | afterEach(async () => { 22 | // Assert that there are no errors emitted from the browser 23 | const logs = await browser.manage().logs().get(logging.Type.BROWSER); 24 | expect(logs).not.toContain( 25 | jasmine.objectContaining({ 26 | level: logging.Level.SEVERE, 27 | } as logging.Entry) 28 | ); 29 | }); 30 | }); 31 | -------------------------------------------------------------------------------- /projects/examples/e2e/src/app.po.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2019 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | 6 | import { browser, by, element } from 'protractor'; 7 | 8 | export class AppPage { 9 | navigateTo(): Promise { 10 | return browser.get(browser.baseUrl) as Promise; 11 | } 12 | 13 | getTitleText(): Promise { 14 | return element(by.css('vcd-root .content span')).getText() as Promise; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /projects/examples/e2e/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../../../out-tsc/e2e", 5 | "module": "commonjs", 6 | "target": "es5", 7 | "types": ["jasmine", "jasminewd2", "node"] 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /projects/examples/karma.conf.js: -------------------------------------------------------------------------------- 1 | // Karma configuration file, see link for more information 2 | // https://karma-runner.github.io/1.0/config/configuration-file.html 3 | const generateKarmaConf = require('../../karma.conf.base'); 4 | 5 | module.exports = generateKarmaConf('examples'); 6 | -------------------------------------------------------------------------------- /projects/examples/src/app/app-routing.module.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2019 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | 6 | import { NgModule } from '@angular/core'; 7 | import { RouterModule } from '@angular/router'; 8 | 9 | @NgModule({ 10 | imports: [RouterModule.forRoot([])], 11 | exports: [RouterModule], 12 | }) 13 | export class AppRoutingModule {} 14 | -------------------------------------------------------------------------------- /projects/examples/src/app/app.component.scss: -------------------------------------------------------------------------------- 1 | .github { 2 | display: flex; 3 | flex: 1 0 auto; 4 | justify-content: flex-end; 5 | align-items: center; 6 | } 7 | -------------------------------------------------------------------------------- /projects/examples/src/app/components/action-menu/contextual-actions/action-menu-contextual-actions-example.component.scss: -------------------------------------------------------------------------------- 1 | vcd-action-menu ::ng-deep .inline-actions-container { 2 | & .inline-action-dropdown ::ng-deep .nested-dropdown > .first-dropdown-toggle { 3 | margin-top: 0 !important; 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /projects/examples/src/app/components/action-menu/contextual-actions/action-menu-contextual-actions-example.module.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2020 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | 6 | import { CommonModule } from '@angular/common'; 7 | import { NgModule } from '@angular/core'; 8 | import { ReactiveFormsModule } from '@angular/forms'; 9 | import { ClarityModule } from '@clr/angular'; 10 | import { VcdActionMenuModule } from '@vcd/ui-components'; 11 | import { ActionMenuContextualActionsExampleComponent } from './action-menu-contextual-actions-example.component'; 12 | 13 | @NgModule({ 14 | declarations: [ActionMenuContextualActionsExampleComponent], 15 | imports: [CommonModule, ClarityModule, ReactiveFormsModule, VcdActionMenuModule], 16 | exports: [ActionMenuContextualActionsExampleComponent], 17 | }) 18 | export class ActionMenuContextualActionsExampleModule {} 19 | -------------------------------------------------------------------------------- /projects/examples/src/app/components/action-menu/data-ui-attribute/action-menu-data-ui-example.component.html: -------------------------------------------------------------------------------- 1 |
2 |

3 | The textKeys of following actions are added as data-ui attributes on their HTML button elements. Inspect the 4 | action button HTML elements to notice the data-ui attributes on them 5 |

6 | 7 | 8 |
9 | -------------------------------------------------------------------------------- /projects/examples/src/app/components/action-menu/data-ui-attribute/action-menu-data-ui-example.component.scss: -------------------------------------------------------------------------------- 1 | vcd-action-menu ::ng-deep .inline-actions-container { 2 | & .inline-action-dropdown ::ng-deep .nested-dropdown > .first-dropdown-toggle { 3 | margin-top: 0 !important; 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /projects/examples/src/app/components/action-menu/data-ui-attribute/action-menu-data-ui-example.module.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2020 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | 6 | import { CommonModule } from '@angular/common'; 7 | import { NgModule } from '@angular/core'; 8 | import { ReactiveFormsModule } from '@angular/forms'; 9 | import { ClarityModule } from '@clr/angular'; 10 | import { VcdActionMenuModule } from '@vcd/ui-components'; 11 | import { ActionMenuDataUiExampleComponent } from './action-menu-data-ui-example.component'; 12 | 13 | @NgModule({ 14 | declarations: [ActionMenuDataUiExampleComponent], 15 | imports: [CommonModule, ClarityModule, ReactiveFormsModule, VcdActionMenuModule], 16 | exports: [ActionMenuDataUiExampleComponent], 17 | }) 18 | export class ActionMenuDataUiExampleModule {} 19 | -------------------------------------------------------------------------------- /projects/examples/src/app/components/action-menu/hide-disable/action-menu-hide-disable-example.component.scss: -------------------------------------------------------------------------------- 1 | vcd-action-menu ::ng-deep .inline-actions-container { 2 | & .inline-action-dropdown ::ng-deep .nested-dropdown > .first-dropdown-toggle { 3 | margin-top: 0 !important; 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /projects/examples/src/app/components/action-menu/hide-disable/action-menu-hide-disable.example.module.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2020 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | 6 | import { CommonModule } from '@angular/common'; 7 | import { NgModule } from '@angular/core'; 8 | import { ReactiveFormsModule } from '@angular/forms'; 9 | import { ClarityModule } from '@clr/angular'; 10 | import { VcdActionMenuModule } from '@vcd/ui-components'; 11 | import { ActionMenuHideDisableExampleComponent } from './action-menu-hide-disable-example.component'; 12 | 13 | @NgModule({ 14 | declarations: [ActionMenuHideDisableExampleComponent], 15 | imports: [CommonModule, ClarityModule, ReactiveFormsModule, VcdActionMenuModule], 16 | exports: [ActionMenuHideDisableExampleComponent], 17 | }) 18 | export class ActionMenuHideDisableExampleModule {} 19 | -------------------------------------------------------------------------------- /projects/examples/src/app/components/action-menu/search-debounce/action-menu-search-debounce.example.component.html: -------------------------------------------------------------------------------- 1 |
2 | 5 |

6 | Notice that there is a spinner displayed initially for 300ms before displaying the action items. This is because 7 | the action search provider is created to debounce the search using 2nd argument(boolean) passed to its 8 | constructor. 9 |

10 | 16 | 17 |
18 | 19 | 20 | -------------------------------------------------------------------------------- /projects/examples/src/app/components/action-menu/search-debounce/action-menu-search-debounce.example.component.scss: -------------------------------------------------------------------------------- 1 | vcd-action-menu ::ng-deep .inline-actions-container { 2 | & .inline-action-dropdown { 3 | & ::ng-deep .nested-dropdown > .first-dropdown-toggle { 4 | margin-top: 0 !important; 5 | } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /projects/examples/src/app/components/action-menu/search-debounce/action-menu-search-debounce.example.module.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2020 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | 6 | import { CommonModule } from '@angular/common'; 7 | import { NgModule } from '@angular/core'; 8 | import { VcdComponentsModule } from '@vcd/ui-components'; 9 | import { ActionMenuSearchDebounceExampleComponent } from './action-menu-search-debounce.example.component'; 10 | 11 | @NgModule({ 12 | declarations: [ActionMenuSearchDebounceExampleComponent], 13 | imports: [CommonModule, VcdComponentsModule], 14 | exports: [ActionMenuSearchDebounceExampleComponent], 15 | }) 16 | export class ActionMenuSearchDebounceExampleModule {} 17 | -------------------------------------------------------------------------------- /projects/examples/src/app/components/action-menu/search-pause-unpause/action-menu-search-pause-and-unpause.example.module.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2020 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | 6 | import { CommonModule } from '@angular/common'; 7 | import { NgModule } from '@angular/core'; 8 | import { ReactiveFormsModule } from '@angular/forms'; 9 | import { ClarityModule } from '@clr/angular'; 10 | import { QuickSearchModule, VcdActionMenuModule } from '@vcd/ui-components'; 11 | import { ActionMenuSearchPauseUnpauseExampleComponent } from './action-menu-search-pause-and-unpause.example.component'; 12 | 13 | @NgModule({ 14 | declarations: [ActionMenuSearchPauseUnpauseExampleComponent], 15 | imports: [CommonModule, ClarityModule, ReactiveFormsModule, VcdActionMenuModule, QuickSearchModule], 16 | exports: [ActionMenuSearchPauseUnpauseExampleComponent], 17 | }) 18 | export class ActionMenuSearchPauseAndUnpauseExampleModule {} 19 | -------------------------------------------------------------------------------- /projects/examples/src/app/components/action-menu/search/action-menu-search-example.component.html: -------------------------------------------------------------------------------- 1 |
2 | 3 |

4 | If there is an action with no children, it is not displayed in the search results. Try searching for `No 5 | children action` being passed in the list of actions and notice that it is not going to be a search result. 6 |

7 | 13 | 14 |
15 | 16 | 17 | -------------------------------------------------------------------------------- /projects/examples/src/app/components/action-menu/search/action-menu-search-example.component.scss: -------------------------------------------------------------------------------- 1 | vcd-action-menu ::ng-deep .inline-actions-container { 2 | & .inline-action-dropdown { 3 | & ::ng-deep .nested-dropdown > .first-dropdown-toggle { 4 | margin-top: 0 !important; 5 | } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /projects/examples/src/app/components/action-menu/search/action-menu-search-example.module.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2020 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | 6 | import { CommonModule } from '@angular/common'; 7 | import { NgModule } from '@angular/core'; 8 | import { ReactiveFormsModule } from '@angular/forms'; 9 | import { ClarityModule } from '@clr/angular'; 10 | import { QuickSearchModule, VcdActionMenuModule } from '@vcd/ui-components'; 11 | import { ActionMenuSearchExampleComponent } from './action-menu-search-example.component'; 12 | 13 | @NgModule({ 14 | declarations: [ActionMenuSearchExampleComponent], 15 | imports: [CommonModule, ClarityModule, ReactiveFormsModule, VcdActionMenuModule, QuickSearchModule], 16 | exports: [ActionMenuSearchExampleComponent], 17 | }) 18 | export class ActionMenuSearchExampleModule {} 19 | -------------------------------------------------------------------------------- /projects/examples/src/app/components/action-menu/static-actions/action-menu-static-actions-example.component.html: -------------------------------------------------------------------------------- 1 |
2 |

3 | Static actions don't depend on selected entities. Static actions marked as featured are shown towards the left 4 | side and the static actions that are not marked as featured are shown next to the right edge of inline action 5 | bar 6 |

7 | 8 |
9 | -------------------------------------------------------------------------------- /projects/examples/src/app/components/action-menu/static-actions/action-menu-static-actions-example.module.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2020 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | 6 | import { CommonModule } from '@angular/common'; 7 | import { NgModule } from '@angular/core'; 8 | import { ReactiveFormsModule } from '@angular/forms'; 9 | import { ClarityModule } from '@clr/angular'; 10 | import { VcdActionMenuModule } from '@vcd/ui-components'; 11 | import { ActionMenuStaticActionsExampleComponent } from './action-menu-static-actions-example.component'; 12 | 13 | @NgModule({ 14 | declarations: [ActionMenuStaticActionsExampleComponent], 15 | imports: [CommonModule, ClarityModule, ReactiveFormsModule, VcdActionMenuModule], 16 | exports: [ActionMenuStaticActionsExampleComponent], 17 | }) 18 | export class ActionMenuStaticActionsExampleModule {} 19 | -------------------------------------------------------------------------------- /projects/examples/src/app/components/action-menu/static-and-contextual-actions/action-menu-static-and-contextual-actions-example.component.html: -------------------------------------------------------------------------------- 1 |
2 |

3 | When static and contextual actions are displayed together, featured static actions are displayed first from 4 | left, followed by featured contextual actions, followed by all contextual actions dropdown and non featured 5 | static actions are displayed to the right most 6 |

7 | 8 | 9 |
10 | -------------------------------------------------------------------------------- /projects/examples/src/app/components/action-menu/static-and-contextual-actions/action-menu-static-and-contextual-actions-example.component.scss: -------------------------------------------------------------------------------- 1 | vcd-action-menu ::ng-deep .inline-actions-container { 2 | & .inline-action-dropdown ::ng-deep .nested-dropdown > .first-dropdown-toggle { 3 | margin-top: 0 !important; 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /projects/examples/src/app/components/action-menu/static-and-contextual-actions/action-menu-static-and-contextual-actions-example.module.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2020 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | 6 | import { CommonModule } from '@angular/common'; 7 | import { NgModule } from '@angular/core'; 8 | import { ReactiveFormsModule } from '@angular/forms'; 9 | import { ClarityModule } from '@clr/angular'; 10 | import { VcdActionMenuModule } from '@vcd/ui-components'; 11 | import { ActionMenuStaticAndContextualActionsExampleComponent } from './action-menu-static-and-contextual-actions-example.component'; 12 | 13 | @NgModule({ 14 | declarations: [ActionMenuStaticAndContextualActionsExampleComponent], 15 | imports: [CommonModule, ClarityModule, ReactiveFormsModule, VcdActionMenuModule], 16 | exports: [ActionMenuStaticAndContextualActionsExampleComponent], 17 | }) 18 | export class ActionMenuStaticAndContextualActionsExampleModule {} 19 | -------------------------------------------------------------------------------- /projects/examples/src/app/components/action-menu/with-separators/action-menu-with-separators.example.component.html: -------------------------------------------------------------------------------- 1 |
2 |
Use action items as separators to add a separator between action items in a dropdown
3 |
4 | As each item decides its own availability, some groups may become empty and multiple separators can become 5 | contiguous and we collapse the separators if they are contiguous 6 |
7 |
8 | In the following example, Separator at index 3 is collapsed. Please take a look in the TS at dropdown list items 9 | at indices 3 and 4 10 |
11 | 17 | 18 |
19 | -------------------------------------------------------------------------------- /projects/examples/src/app/components/action-menu/with-separators/action-menu-with-separators.example.module.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2020 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | 6 | import { CommonModule } from '@angular/common'; 7 | import { NgModule } from '@angular/core'; 8 | import { ReactiveFormsModule } from '@angular/forms'; 9 | import { ClarityModule } from '@clr/angular'; 10 | import { VcdActionMenuModule } from '@vcd/ui-components'; 11 | import { ActionMenuWithSeparatorsExampleComponent } from './action-menu-with-separators.example.component'; 12 | 13 | @NgModule({ 14 | declarations: [ActionMenuWithSeparatorsExampleComponent], 15 | imports: [CommonModule, ClarityModule, ReactiveFormsModule, VcdActionMenuModule], 16 | exports: [ActionMenuWithSeparatorsExampleComponent], 17 | }) 18 | export class ActionMenuWithSeparatorsExampleModule {} 19 | -------------------------------------------------------------------------------- /projects/examples/src/app/components/sharing-modal/directive/users-groups-orgs-sharing-modal.example.html: -------------------------------------------------------------------------------- 1 |

2 | This is an example of how to configure the sharing modal using the `vcdUsersGroupsOrgsSharingModal` directive. This 3 | directive gives convenience inputs for the users, groups, and organizations tabs. It also gives convenience inputs 4 | for predefined checkboxes. In each tab config, we also give a default for `makeSearch` that uses the @vcd/sdk to 5 | search for entities on the current environment. If you wish to use our default, just don't supply your own 6 | implementation of `makeSearch`. You can also override the default `entityRenderer` if you wish to have custom 7 | behavior. 8 |

9 | 10 | 23 | -------------------------------------------------------------------------------- /projects/examples/src/app/components/sharing-modal/directive/users-groups-orgs-sharing-modal.example.module.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2021 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | 6 | import { CommonModule } from '@angular/common'; 7 | import { NgModule } from '@angular/core'; 8 | import { VcdComponentsModule } from '@vcd/ui-components'; 9 | import { UsersGroupsOrgsSharingModalExampleComponent } from './users-groups-orgs-sharing-modal.example'; 10 | 11 | @NgModule({ 12 | declarations: [UsersGroupsOrgsSharingModalExampleComponent], 13 | imports: [CommonModule, VcdComponentsModule], 14 | exports: [UsersGroupsOrgsSharingModalExampleComponent], 15 | }) 16 | export class UsersGroupsOrgsSharingModalExampleModule {} 17 | -------------------------------------------------------------------------------- /projects/examples/src/app/components/sharing-modal/directive/users-groups-orgs-sharing-modal.example.scss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vmware-archive/vmware-cloud-director-ui-components/c0d4bee9936324c6232ddad1a6f8b56cd431abc2/projects/examples/src/app/components/sharing-modal/directive/users-groups-orgs-sharing-modal.example.scss -------------------------------------------------------------------------------- /projects/examples/src/app/components/sharing-modal/sharing-modal-example.component.html: -------------------------------------------------------------------------------- 1 |

2 | This is an example of how to configure the sharing modal on its own. You can customize the title, the tabs, and the 3 | checkboxes. Opening the modal must be done by a trigger coming outside through the two-way binding of `isOpened`. 4 | The form value is also a two way binding. Supply the currently shared with entities, and it will emit the new value 5 | when the user clicks submit. 6 |

7 | 8 | 17 | -------------------------------------------------------------------------------- /projects/examples/src/app/components/sharing-modal/sharing-modal-example.component.scss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vmware-archive/vmware-cloud-director-ui-components/c0d4bee9936324c6232ddad1a6f8b56cd431abc2/projects/examples/src/app/components/sharing-modal/sharing-modal-example.component.scss -------------------------------------------------------------------------------- /projects/examples/src/app/components/sharing-modal/sharing-modal-example.module.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2021 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | 6 | import { CommonModule } from '@angular/common'; 7 | import { NgModule } from '@angular/core'; 8 | import { VcdComponentsModule } from '@vcd/ui-components'; 9 | import { SharingModalExampleComponent, SharingModalRendererComponent } from './sharing-modal-example.component'; 10 | 11 | @NgModule({ 12 | declarations: [SharingModalExampleComponent, SharingModalRendererComponent], 13 | imports: [CommonModule, VcdComponentsModule], 14 | exports: [SharingModalExampleComponent], 15 | }) 16 | export class SharingModalExampleModule {} 17 | -------------------------------------------------------------------------------- /projects/examples/src/app/components/show-clipped-text/focusing/focusing-clipped-text-example.component.scss: -------------------------------------------------------------------------------- 1 | .example-el { 2 | border: 1px solid black; 3 | display: inline-block; 4 | min-height: 1rem; 5 | margin-top: 0.5rem; 6 | min-width: 100px; 7 | } 8 | -------------------------------------------------------------------------------- /projects/examples/src/app/components/show-clipped-text/focusing/focusing-clipped-text-example.component.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2021 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | import { Component } from '@angular/core'; 6 | import { CommonModule } from '@angular/common'; 7 | import { TooltipSize, VcdComponentsModule } from '@vcd/ui-components'; 8 | import { ClarityModule } from '@clr/angular'; 9 | import { FormsModule } from '@angular/forms'; 10 | 11 | @Component({ 12 | standalone: true, 13 | selector: 'vcd-focusing-clipped-text-example', 14 | templateUrl: 'focusing-clipped-text-example.component.html', 15 | styleUrls: ['focusing-clipped-text-example.component.scss'], 16 | imports: [CommonModule, VcdComponentsModule, ClarityModule, FormsModule], 17 | }) 18 | export class FocusingClippedTextExampleComponent { 19 | protected readonly TooltipSize = TooltipSize; 20 | } 21 | -------------------------------------------------------------------------------- /projects/examples/src/app/components/show-clipped-text/hide/hide-clipped-text-example.component.html: -------------------------------------------------------------------------------- 1 |
2 | 5 |
6 | Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's 7 | standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make 8 | a type specimen book. 9 |
10 |
11 | -------------------------------------------------------------------------------- /projects/examples/src/app/components/show-clipped-text/hide/hide-clipped-text-example.component.scss: -------------------------------------------------------------------------------- 1 | .scroll-container { 2 | position: relative; 3 | width: 100%; 4 | height: 500px; 5 | overflow: auto; 6 | } 7 | .clipped-container { 8 | width: 300px; 9 | padding: 10px; 10 | margin-top: 30px; 11 | cursor: pointer; 12 | } 13 | -------------------------------------------------------------------------------- /projects/examples/src/app/components/show-clipped-text/hide/hide-clipped-text-example.component.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2019 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | 6 | import { Component } from '@angular/core'; 7 | 8 | @Component({ 9 | selector: 'vcd-hide-clipped-text-example', 10 | templateUrl: './hide-clipped-text-example.component.html', 11 | styleUrls: ['./hide-clipped-text-example.component.scss'], 12 | }) 13 | export class HideClippedTextPositioningExampleComponent { 14 | public isClippedContainerVisible: boolean = true; 15 | 16 | toggleContainer(): void { 17 | this.isClippedContainerVisible = !this.isClippedContainerVisible; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /projects/examples/src/app/components/show-clipped-text/hide/hide-clipped-text-example.module.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2019 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | 6 | import { CommonModule } from '@angular/common'; 7 | import { NgModule } from '@angular/core'; 8 | import { ClarityModule } from '@clr/angular'; 9 | import { VcdComponentsModule } from '@vcd/ui-components'; 10 | import { HideClippedTextPositioningExampleComponent } from './hide-clipped-text-example.component'; 11 | 12 | @NgModule({ 13 | declarations: [HideClippedTextPositioningExampleComponent], 14 | imports: [CommonModule, VcdComponentsModule, ClarityModule], 15 | exports: [HideClippedTextPositioningExampleComponent], 16 | }) 17 | export class HideClippedTextPositioningExampleModule {} 18 | -------------------------------------------------------------------------------- /projects/examples/src/app/components/show-clipped-text/positioning/show-clipped-text-positioning-example.component.html: -------------------------------------------------------------------------------- 1 |
2 | Scroll around to make the clipped text show up in different parts of the screen and notice that the tooltip is 3 | always towards the center, keeping it within view. 4 |
I'm too big for my width
5 |
I'm too big for my width
6 |
7 | -------------------------------------------------------------------------------- /projects/examples/src/app/components/show-clipped-text/positioning/show-clipped-text-positioning-example.component.scss: -------------------------------------------------------------------------------- 1 | .scroll-container { 2 | position: relative; 3 | width: 100%; 4 | height: 500px; 5 | } 6 | 7 | .clipped-left { 8 | position: absolute; 9 | width: 100px; 10 | } 11 | 12 | .clipped-right { 13 | position: absolute; 14 | right: 10px; 15 | width: 100px; 16 | } 17 | -------------------------------------------------------------------------------- /projects/examples/src/app/components/show-clipped-text/positioning/show-clipped-text-positioning-example.component.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2019 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | 6 | import { Component } from '@angular/core'; 7 | 8 | @Component({ 9 | selector: 'vcd-show-clipped-text-positioning-example', 10 | templateUrl: './show-clipped-text-positioning-example.component.html', 11 | styleUrls: ['./show-clipped-text-positioning-example.component.scss'], 12 | }) 13 | export class ShowClippedTextPositioningExampleComponent {} 14 | -------------------------------------------------------------------------------- /projects/examples/src/app/components/show-clipped-text/positioning/show-clipped-text-positioning-example.module.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2019 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | 6 | import { CommonModule } from '@angular/common'; 7 | import { NgModule } from '@angular/core'; 8 | import { VcdComponentsModule } from '@vcd/ui-components'; 9 | import { ShowClippedTextPositioningExampleComponent } from './show-clipped-text-positioning-example.component'; 10 | 11 | @NgModule({ 12 | declarations: [ShowClippedTextPositioningExampleComponent], 13 | imports: [CommonModule, VcdComponentsModule], 14 | exports: [ShowClippedTextPositioningExampleComponent], 15 | }) 16 | export class ShowClippedTextPositioningExampleModule {} 17 | -------------------------------------------------------------------------------- /projects/examples/src/app/components/show-clipped-text/sizing/show-clipped-text-sizing-example.component.html: -------------------------------------------------------------------------------- 1 |

Using fixed width and small tooltip

2 | 3 |
{{ text }}
4 | 5 |

Using Max width using medium tooltip

6 |
7 |
{{ text2 }}
8 | 9 |

This div is a standard block using large tooltip

10 | 11 |
{{ text3 }}
12 | -------------------------------------------------------------------------------- /projects/examples/src/app/components/show-clipped-text/sizing/show-clipped-text-sizing-example.component.scss: -------------------------------------------------------------------------------- 1 | div { 2 | border: 1px solid black; 3 | } 4 | 5 | .fixed-width { 6 | width: 200px; 7 | } 8 | 9 | /** To use max-width, element must be inline-block */ 10 | .max-width { 11 | display: inline-block; 12 | max-width: 200px; 13 | } 14 | -------------------------------------------------------------------------------- /projects/examples/src/app/components/show-clipped-text/sizing/show-clipped-text-sizing-example.component.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2019 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | 6 | import { Component } from '@angular/core'; 7 | import { TooltipSize } from '@vcd/ui-components'; 8 | 9 | @Component({ 10 | selector: 'vcd-show-clipped-text-sizing-example', 11 | templateUrl: './show-clipped-text-sizing-example.component.html', 12 | styleUrls: ['./show-clipped-text-sizing-example.component.scss'], 13 | }) 14 | export class ShowClippedTextSizingExampleComponent { 15 | TooltipSize = TooltipSize; 16 | 17 | text = 18 | 'Something really long that will require clipping in most cases so we add random text' + 19 | ' to make sure that clipping happens on initially'; 20 | text2 = 21 | 'Something else for 2... really long that will require clipping in most cases so we add random text' + 22 | ' to make sure that clipping happens on initially'; 23 | 24 | text3 = 25 | 'Something else for 3... long that will require clipping in most cases so we add random text' + 26 | ' to make sure that clipping happens on initially'; 27 | } 28 | -------------------------------------------------------------------------------- /projects/examples/src/app/components/show-clipped-text/sizing/show-clipped-text-sizing-example.module.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2019 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | 6 | import { CommonModule } from '@angular/common'; 7 | import { NgModule } from '@angular/core'; 8 | import { FormsModule } from '@angular/forms'; 9 | import { VcdComponentsModule } from '@vcd/ui-components'; 10 | import { ShowClippedTextSizingExampleComponent } from './show-clipped-text-sizing-example.component'; 11 | 12 | @NgModule({ 13 | declarations: [ShowClippedTextSizingExampleComponent], 14 | imports: [CommonModule, FormsModule, VcdComponentsModule], 15 | exports: [ShowClippedTextSizingExampleComponent], 16 | }) 17 | export class ShowClippedTextSizingExampleModule {} 18 | -------------------------------------------------------------------------------- /projects/examples/src/app/home/home.component.spec.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2020 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | 6 | import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; 7 | 8 | import { HomeComponent } from './home.component'; 9 | 10 | describe('HomeComponent', () => { 11 | let component: HomeComponent; 12 | let fixture: ComponentFixture; 13 | 14 | beforeEach( 15 | waitForAsync(() => { 16 | TestBed.configureTestingModule({ 17 | declarations: [HomeComponent], 18 | }).compileComponents(); 19 | }) 20 | ); 21 | 22 | beforeEach(() => { 23 | fixture = TestBed.createComponent(HomeComponent); 24 | component = fixture.componentInstance; 25 | fixture.detectChanges(); 26 | }); 27 | 28 | it('should create', () => { 29 | expect(component).toBeTruthy(); 30 | }); 31 | }); 32 | -------------------------------------------------------------------------------- /projects/examples/src/app/home/home.component.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2020 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | 6 | import { Component } from '@angular/core'; 7 | 8 | @Component({ 9 | selector: 'vcd-home', 10 | templateUrl: './home.component.html', 11 | }) 12 | export class HomeComponent { 13 | ghReadMeUrl = 14 | 'https://github.com/vmware/vmware-cloud-director-ui-components/blob/master/projects/components/README.md#Components'; 15 | vcdUrl = 'https://www.vmware.com/products/cloud-director.html'; 16 | } 17 | -------------------------------------------------------------------------------- /projects/examples/src/assets/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vmware-archive/vmware-cloud-director-ui-components/c0d4bee9936324c6232ddad1a6f8b56cd431abc2/projects/examples/src/assets/.gitkeep -------------------------------------------------------------------------------- /projects/examples/src/components/activity-reporter/banner-activity-reporter.example.component.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /projects/examples/src/components/activity-reporter/banner-activity-reporter.example.module.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2020 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | 6 | import { CommonModule } from '@angular/common'; 7 | import { NgModule } from '@angular/core'; 8 | import { ReactiveFormsModule } from '@angular/forms'; 9 | import { ClarityModule } from '@clr/angular'; 10 | import { VcdComponentsModule } from '@vcd/ui-components'; 11 | import { BannerActivityReporterExampleComponent } from './banner-activity-reporter.example.component'; 12 | 13 | @NgModule({ 14 | declarations: [BannerActivityReporterExampleComponent], 15 | imports: [CommonModule, ClarityModule, ReactiveFormsModule, VcdComponentsModule], 16 | exports: [BannerActivityReporterExampleComponent], 17 | }) 18 | export class BannerActivityReporterExampleModule {} 19 | -------------------------------------------------------------------------------- /projects/examples/src/components/activity-reporter/spinner-activity-reporter.example.component.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /projects/examples/src/components/activity-reporter/spinner-activity-reporter.example.module.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2020 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | 6 | import { CommonModule } from '@angular/common'; 7 | import { NgModule } from '@angular/core'; 8 | import { ReactiveFormsModule } from '@angular/forms'; 9 | import { ClarityModule } from '@clr/angular'; 10 | import { VcdComponentsModule } from '@vcd/ui-components'; 11 | import { SpinnerActivityReporterExampleComponent } from './spinner-activity-reporter.example.component'; 12 | 13 | @NgModule({ 14 | declarations: [SpinnerActivityReporterExampleComponent], 15 | imports: [CommonModule, ClarityModule, ReactiveFormsModule, VcdComponentsModule], 16 | exports: [SpinnerActivityReporterExampleComponent], 17 | }) 18 | export class SpinnerActivityReporterExampleModule {} 19 | -------------------------------------------------------------------------------- /projects/examples/src/components/data-exporter/data-exporter.example.module.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2020 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | 6 | import { CommonModule } from '@angular/common'; 7 | import { NgModule } from '@angular/core'; 8 | import { ReactiveFormsModule } from '@angular/forms'; 9 | import { ClarityModule } from '@clr/angular'; 10 | import { VcdComponentsModule } from '@vcd/ui-components'; 11 | import { DataExporterExampleComponent } from './data-exporter.example.component'; 12 | 13 | @NgModule({ 14 | declarations: [DataExporterExampleComponent], 15 | imports: [CommonModule, ClarityModule, ReactiveFormsModule, VcdComponentsModule], 16 | exports: [DataExporterExampleComponent], 17 | }) 18 | export class DataExporterExampleModule {} 19 | -------------------------------------------------------------------------------- /projects/examples/src/components/data-exporter/data-exporter.examples.module.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2019 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | 6 | import { NgModule } from '@angular/core'; 7 | 8 | import { DataExporterComponent } from '@vcd/ui-components'; 9 | import { Documentation } from '@vmw/ng-live-docs'; 10 | import { DataExporterExampleComponent } from './data-exporter.example.component'; 11 | import { DataExporterExampleModule } from './data-exporter.example.module'; 12 | 13 | Documentation.registerDocumentationEntry({ 14 | component: DataExporterComponent, 15 | displayName: 'Data Exporter', 16 | urlSegment: 'dataExporter', 17 | examples: [ 18 | { 19 | component: DataExporterExampleComponent, 20 | title: 'Data Exporter example', 21 | urlSegment: 'data-exporter', 22 | }, 23 | ], 24 | }); 25 | 26 | @NgModule({ 27 | imports: [DataExporterExampleModule], 28 | }) 29 | export class DataExporterExamplesModule {} 30 | -------------------------------------------------------------------------------- /projects/examples/src/components/datagrid/datagrid-action-display-config.example.component.scss: -------------------------------------------------------------------------------- 1 | vcd-datagrid ::ng-deep .inline-actions-container { 2 | & .first-dropdown-toggle { 3 | margin-top: 0 !important; 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /projects/examples/src/components/datagrid/datagrid-action-display-config.example.module.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2021 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | 6 | import { CommonModule } from '@angular/common'; 7 | import { NgModule } from '@angular/core'; 8 | import { ReactiveFormsModule } from '@angular/forms'; 9 | import { ClarityModule } from '@clr/angular'; 10 | import { VcdComponentsModule } from '@vcd/ui-components'; 11 | import { DatagridActionDisplayConfigExampleComponent } from './datagrid-action-display-config.example.component'; 12 | 13 | @NgModule({ 14 | declarations: [DatagridActionDisplayConfigExampleComponent], 15 | imports: [CommonModule, ClarityModule, ReactiveFormsModule, VcdComponentsModule], 16 | exports: [DatagridActionDisplayConfigExampleComponent], 17 | }) 18 | export class DatagridActionDisplayConfigExampleModule {} 19 | -------------------------------------------------------------------------------- /projects/examples/src/components/datagrid/datagrid-action-menu-tracking-example.component.scss: -------------------------------------------------------------------------------- 1 | ::ng-deep { 2 | .clr-form-compact .clr-subtext { 3 | display: none; 4 | } 5 | 6 | clr-dg-action-bar.top-action-bar { 7 | margin-top: 0; 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /projects/examples/src/components/datagrid/datagrid-action-menu-tracking.example.module.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2021 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | 6 | import { CommonModule } from '@angular/common'; 7 | import { NgModule } from '@angular/core'; 8 | import { ReactiveFormsModule } from '@angular/forms'; 9 | import { ClarityModule } from '@clr/angular'; 10 | import { VcdActionMenuModule, VcdComponentsModule } from '@vcd/ui-components'; 11 | import { DatagridActionMenuTrackingExampleComponent } from './datagrid-action-menu-tracking-example.component'; 12 | 13 | @NgModule({ 14 | declarations: [DatagridActionMenuTrackingExampleComponent], 15 | imports: [CommonModule, ClarityModule, ReactiveFormsModule, VcdComponentsModule, VcdActionMenuModule], 16 | exports: [DatagridActionMenuTrackingExampleComponent], 17 | }) 18 | export class DatagridActionMenuTrackerExampleModule {} 19 | -------------------------------------------------------------------------------- /projects/examples/src/components/datagrid/datagrid-activity-reporter.example.component.html: -------------------------------------------------------------------------------- 1 | 8 | -------------------------------------------------------------------------------- /projects/examples/src/components/datagrid/datagrid-activity-reporter.example.module.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2020 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | 6 | import { CommonModule } from '@angular/common'; 7 | import { NgModule } from '@angular/core'; 8 | import { ClarityModule } from '@clr/angular'; 9 | import { VcdComponentsModule } from '@vcd/ui-components'; 10 | import { DatagridActivityReporterExampleComponent } from './datagrid-activity-reporter.example.component'; 11 | 12 | @NgModule({ 13 | declarations: [DatagridActivityReporterExampleComponent], 14 | imports: [CommonModule, ClarityModule, VcdComponentsModule], 15 | exports: [DatagridActivityReporterExampleComponent], 16 | }) 17 | export class DatagridActivityReporterExampleModule {} 18 | -------------------------------------------------------------------------------- /projects/examples/src/components/datagrid/datagrid-cliptext.example.component.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /projects/examples/src/components/datagrid/datagrid-cliptext.example.module.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2019 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | 6 | import { CommonModule } from '@angular/common'; 7 | import { NgModule } from '@angular/core'; 8 | import { ClarityModule } from '@clr/angular'; 9 | import { VcdComponentsModule } from '@vcd/ui-components'; 10 | import { DatagridCliptextExampleComponent } from './datagrid-cliptext.example.component'; 11 | 12 | @NgModule({ 13 | declarations: [DatagridCliptextExampleComponent], 14 | imports: [CommonModule, ClarityModule, VcdComponentsModule], 15 | exports: [DatagridCliptextExampleComponent], 16 | }) 17 | export class DatagridCliptextExampleModule {} 18 | -------------------------------------------------------------------------------- /projects/examples/src/components/datagrid/datagrid-column-width.example.component.html: -------------------------------------------------------------------------------- 1 |
2 | This is an example that shows that you can set the CSS class on each column to change things like the starting 3 | width. Each column has a different class that corresponds to a different width set with a different unit. The only 4 | units that are supported are 5 | absolute length units. Relative lengths do not seem well supported by Clarity. 8 |
9 | 10 | -------------------------------------------------------------------------------- /projects/examples/src/components/datagrid/datagrid-column-width.example.component.scss: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2020 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | 6 | ::ng-deep .col-1 { 7 | width: 2in; 8 | } 9 | 10 | ::ng-deep .col-2 { 11 | width: 200px; 12 | } 13 | 14 | ::ng-deep .col-3 { 15 | width: 4em; 16 | } 17 | 18 | ::ng-deep .col-4 { 19 | width: 50pt; 20 | } 21 | -------------------------------------------------------------------------------- /projects/examples/src/components/datagrid/datagrid-column-width.example.module.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2019 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | 6 | import { CommonModule } from '@angular/common'; 7 | import { NgModule } from '@angular/core'; 8 | import { ClarityModule } from '@clr/angular'; 9 | import { VcdComponentsModule } from '@vcd/ui-components'; 10 | import { DatagridColumnWidthExampleComponent } from './datagrid-column-width.example.component'; 11 | 12 | @NgModule({ 13 | declarations: [DatagridColumnWidthExampleComponent], 14 | imports: [CommonModule, ClarityModule, VcdComponentsModule], 15 | exports: [DatagridColumnWidthExampleComponent], 16 | }) 17 | export class DatagridColumnWidthExampleModule {} 18 | -------------------------------------------------------------------------------- /projects/examples/src/components/datagrid/datagrid-css-classes.example.module.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2019 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | 6 | import { CommonModule } from '@angular/common'; 7 | import { NgModule } from '@angular/core'; 8 | import { ClarityModule } from '@clr/angular'; 9 | import { VcdComponentsModule } from '@vcd/ui-components'; 10 | import { DatagridCssClassesExampleComponent } from './datagrid-css-classes.example.component'; 11 | 12 | @NgModule({ 13 | declarations: [DatagridCssClassesExampleComponent], 14 | imports: [CommonModule, ClarityModule, VcdComponentsModule], 15 | exports: [DatagridCssClassesExampleComponent], 16 | }) 17 | export class DatagridCssClassesExampleModule {} 18 | -------------------------------------------------------------------------------- /projects/examples/src/components/datagrid/datagrid-detail-pane.example.module.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2020 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | 6 | import { CommonModule } from '@angular/common'; 7 | import { NgModule } from '@angular/core'; 8 | import { ReactiveFormsModule } from '@angular/forms'; 9 | import { ClarityModule } from '@clr/angular'; 10 | import { VcdComponentsModule } from '@vcd/ui-components'; 11 | import { 12 | DatagridDetailPaneExampleComponent, 13 | DatagridDetailPaneSubComponent, 14 | } from './datagrid-detail-pane.example.component'; 15 | 16 | @NgModule({ 17 | declarations: [DatagridDetailPaneExampleComponent, DatagridDetailPaneSubComponent], 18 | imports: [CommonModule, ClarityModule, ReactiveFormsModule, VcdComponentsModule], 19 | exports: [DatagridDetailPaneExampleComponent], 20 | }) 21 | export class DatagridDetailPaneExampleModule {} 22 | -------------------------------------------------------------------------------- /projects/examples/src/components/datagrid/datagrid-detail-row.example.module.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2020 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | 6 | import { CommonModule } from '@angular/common'; 7 | import { NgModule } from '@angular/core'; 8 | import { ReactiveFormsModule } from '@angular/forms'; 9 | import { ClarityModule } from '@clr/angular'; 10 | import { VcdComponentsModule } from '@vcd/ui-components'; 11 | import { 12 | DatagridDetailRowExampleComponent, 13 | DatagridDetailRowSubComponent, 14 | DatagridDetailRowSubNoLazyComponent, 15 | } from './datagrid-detail-row.example.component'; 16 | 17 | @NgModule({ 18 | declarations: [ 19 | DatagridDetailRowExampleComponent, 20 | DatagridDetailRowSubComponent, 21 | DatagridDetailRowSubNoLazyComponent, 22 | ], 23 | imports: [CommonModule, ClarityModule, ReactiveFormsModule, VcdComponentsModule], 24 | exports: [DatagridDetailRowExampleComponent], 25 | }) 26 | export class DatagridDetailRowExampleModule {} 27 | -------------------------------------------------------------------------------- /projects/examples/src/components/datagrid/datagrid-filter.example.module.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2019 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | 6 | import { CommonModule } from '@angular/common'; 7 | import { NgModule } from '@angular/core'; 8 | import { ClarityModule } from '@clr/angular'; 9 | import { VcdComponentsModule } from '@vcd/ui-components'; 10 | import { DatagridFilterExampleComponent } from './datagrid-filter.example.component'; 11 | 12 | @NgModule({ 13 | declarations: [DatagridFilterExampleComponent], 14 | imports: [CommonModule, ClarityModule, VcdComponentsModule], 15 | exports: [DatagridFilterExampleComponent], 16 | }) 17 | export class DatagridFilterExampleModule {} 18 | -------------------------------------------------------------------------------- /projects/examples/src/components/datagrid/datagrid-header.example.component.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /projects/examples/src/components/datagrid/datagrid-header.example.component.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2020 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | 6 | import { Component } from '@angular/core'; 7 | import { GridColumn, GridDataFetchResult, GridState } from '@vcd/ui-components'; 8 | 9 | interface Data { 10 | value: string; 11 | } 12 | 13 | /** 14 | * Shows the capability of the datagrid to put a header on the top. 15 | */ 16 | @Component({ 17 | selector: 'vcd-datagrid-header-example', 18 | templateUrl: './datagrid-header.example.component.html', 19 | }) 20 | export class DatagridHeaderExampleComponent { 21 | gridData: GridDataFetchResult = { 22 | items: [], 23 | }; 24 | 25 | columns: GridColumn[] = [ 26 | { 27 | displayName: 'Column', 28 | renderer: 'value', 29 | }, 30 | ]; 31 | 32 | header = 'Some Header!'; 33 | 34 | refresh(eventData: GridState): void { 35 | this.gridData = { 36 | items: [{ value: 'a' }, { value: 'b' }], 37 | totalItems: 2, 38 | }; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /projects/examples/src/components/datagrid/datagrid-header.example.module.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2020 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | 6 | import { CommonModule } from '@angular/common'; 7 | import { NgModule } from '@angular/core'; 8 | import { ReactiveFormsModule } from '@angular/forms'; 9 | import { ClarityModule } from '@clr/angular'; 10 | import { VcdComponentsModule } from '@vcd/ui-components'; 11 | import { DatagridHeaderExampleComponent } from './datagrid-header.example.component'; 12 | 13 | @NgModule({ 14 | declarations: [DatagridHeaderExampleComponent], 15 | imports: [CommonModule, ClarityModule, ReactiveFormsModule, VcdComponentsModule], 16 | exports: [DatagridHeaderExampleComponent], 17 | }) 18 | export class DatagridHeaderExampleModule {} 19 | -------------------------------------------------------------------------------- /projects/examples/src/components/datagrid/datagrid-height.example.component.html: -------------------------------------------------------------------------------- 1 |
2 | 9 | 10 |
11 |
12 | 19 | 20 |

Ends Here!

21 |
22 | -------------------------------------------------------------------------------- /projects/examples/src/components/datagrid/datagrid-height.example.component.scss: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2020 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | 6 | .fixed-height { 7 | height: 500px; 8 | flex-direction: column; 9 | display: flex; 10 | } 11 | -------------------------------------------------------------------------------- /projects/examples/src/components/datagrid/datagrid-height.example.module.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2020 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | 6 | import { CommonModule } from '@angular/common'; 7 | import { NgModule } from '@angular/core'; 8 | import { ReactiveFormsModule } from '@angular/forms'; 9 | import { ClarityModule } from '@clr/angular'; 10 | import { VcdComponentsModule } from '@vcd/ui-components'; 11 | import { DatagridHeightExampleComponent } from './datagrid-height.example.component'; 12 | 13 | @NgModule({ 14 | declarations: [DatagridHeightExampleComponent], 15 | imports: [CommonModule, ClarityModule, ReactiveFormsModule, VcdComponentsModule], 16 | exports: [DatagridHeightExampleComponent], 17 | }) 18 | export class DatagridHeightExampleModule {} 19 | -------------------------------------------------------------------------------- /projects/examples/src/components/datagrid/datagrid-is-row-selectable-example.component.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 10 | -------------------------------------------------------------------------------- /projects/examples/src/components/datagrid/datagrid-is-row-selectable-example.module.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2022 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | 6 | import { CommonModule } from '@angular/common'; 7 | import { NgModule } from '@angular/core'; 8 | import { ReactiveFormsModule } from '@angular/forms'; 9 | import { ClarityModule } from '@clr/angular'; 10 | import { VcdComponentsModule } from '@vcd/ui-components'; 11 | import { DatagridIsRowSelectableExampleComponent } from './datagrid-is-row-selectable-example.component'; 12 | 13 | @NgModule({ 14 | declarations: [DatagridIsRowSelectableExampleComponent], 15 | imports: [CommonModule, ClarityModule, ReactiveFormsModule, VcdComponentsModule], 16 | exports: [DatagridIsRowSelectableExampleComponent], 17 | }) 18 | export class DatagridIsRowSelectableExampleModule {} 19 | -------------------------------------------------------------------------------- /projects/examples/src/components/datagrid/datagrid-link.example.component.scss: -------------------------------------------------------------------------------- 1 | vcd-datagrid ::ng-deep .inline-actions-container { 2 | & .inline-action-dropdown { 3 | & ::ng-deep .nested-dropdown > .first-dropdown-toggle { 4 | margin-top: 0 !important; 5 | } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /projects/examples/src/components/datagrid/datagrid-link.example.module.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2020 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | 6 | import { CommonModule } from '@angular/common'; 7 | import { NgModule } from '@angular/core'; 8 | import { ReactiveFormsModule } from '@angular/forms'; 9 | import { ClarityModule } from '@clr/angular'; 10 | import { VcdActionMenuModule, VcdComponentsModule } from '@vcd/ui-components'; 11 | import { DatagridLinkExampleComponent } from './datagrid-link.example.component'; 12 | 13 | @NgModule({ 14 | declarations: [DatagridLinkExampleComponent], 15 | imports: [CommonModule, ClarityModule, ReactiveFormsModule, VcdComponentsModule, VcdActionMenuModule], 16 | exports: [DatagridLinkExampleComponent], 17 | }) 18 | export class DatagridLinkExampleModule {} 19 | -------------------------------------------------------------------------------- /projects/examples/src/components/datagrid/datagrid-loading-placeholder.example.component.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /projects/examples/src/components/datagrid/datagrid-loading-placeholder.example.component.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2020 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | 6 | import { Component } from '@angular/core'; 7 | import { GridColumn, GridDataFetchResult, GridState } from '@vcd/ui-components'; 8 | 9 | interface Data { 10 | value: string; 11 | } 12 | 13 | /** 14 | * Press the first button to stop loading and show the placeholder. 15 | */ 16 | @Component({ 17 | selector: 'vcd-datagrid-loading-placeholder-example', 18 | templateUrl: './datagrid-loading-placeholder.example.component.html', 19 | }) 20 | export class DatagridLoadingPlaceholderExampleComponent { 21 | gridData: GridDataFetchResult = { 22 | items: [], 23 | }; 24 | 25 | columns: GridColumn[] = [ 26 | { 27 | displayName: 'Column', 28 | renderer: 'value', 29 | }, 30 | ]; 31 | 32 | setData(): void { 33 | this.gridData = { 34 | items: [], 35 | totalItems: 0, 36 | }; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /projects/examples/src/components/datagrid/datagrid-loading-placeholder.example.module.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2020 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | 6 | import { CommonModule } from '@angular/common'; 7 | import { NgModule } from '@angular/core'; 8 | import { ReactiveFormsModule } from '@angular/forms'; 9 | import { ClarityModule } from '@clr/angular'; 10 | import { VcdComponentsModule } from '@vcd/ui-components'; 11 | import { DatagridLoadingPlaceholderExampleComponent } from './datagrid-loading-placeholder.example.component'; 12 | 13 | @NgModule({ 14 | declarations: [DatagridLoadingPlaceholderExampleComponent], 15 | imports: [CommonModule, ClarityModule, ReactiveFormsModule, VcdComponentsModule], 16 | exports: [DatagridLoadingPlaceholderExampleComponent], 17 | }) 18 | export class DatagridLoadingPlaceholderExampleModule {} 19 | -------------------------------------------------------------------------------- /projects/examples/src/components/datagrid/datagrid-pagination-example.module.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2020 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | 6 | import { CommonModule } from '@angular/common'; 7 | import { NgModule } from '@angular/core'; 8 | import { ReactiveFormsModule } from '@angular/forms'; 9 | import { ClarityModule } from '@clr/angular'; 10 | import { VcdComponentsModule } from '@vcd/ui-components'; 11 | import { DatagridPaginationExampleComponent } from './datagrid-pagination-example.component'; 12 | 13 | @NgModule({ 14 | declarations: [DatagridPaginationExampleComponent], 15 | imports: [CommonModule, ClarityModule, ReactiveFormsModule, VcdComponentsModule], 16 | exports: [DatagridPaginationExampleComponent], 17 | }) 18 | export class DatagridPagionationExampleModule {} 19 | -------------------------------------------------------------------------------- /projects/examples/src/components/datagrid/datagrid-preserve-selection.example.module.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2023 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | 6 | import { CommonModule } from '@angular/common'; 7 | import { NgModule } from '@angular/core'; 8 | import { ReactiveFormsModule } from '@angular/forms'; 9 | import { ClarityModule } from '@clr/angular'; 10 | import { VcdComponentsModule } from '@vcd/ui-components'; 11 | import { DatagridPreserveSelectionExampleComponent } from './datagrid-preserve-selection.example.component'; 12 | 13 | @NgModule({ 14 | declarations: [DatagridPreserveSelectionExampleComponent], 15 | imports: [CommonModule, ClarityModule, ReactiveFormsModule, VcdComponentsModule], 16 | exports: [DatagridPreserveSelectionExampleComponent], 17 | }) 18 | export class DatagridPreserveSelectionExampleModule {} 19 | -------------------------------------------------------------------------------- /projects/examples/src/components/datagrid/datagrid-row-icon.example.component.html: -------------------------------------------------------------------------------- 1 |

2 | Shows that when the data within the grid is reloaded but the trackBy value stays the same, the DOM is not 3 | re-rendered. Thus, any row within the datagrid maintains its state. If the DOM was re-rendered, the modal would not 4 | open when you clicked the button because the state of the row would be cleared. 5 |

6 | 7 | -------------------------------------------------------------------------------- /projects/examples/src/components/datagrid/datagrid-row-icon.example.module.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2019 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | 6 | import { CommonModule } from '@angular/common'; 7 | import { NgModule } from '@angular/core'; 8 | import { ClarityModule } from '@clr/angular'; 9 | import { VcdComponentsModule } from '@vcd/ui-components'; 10 | import { DatagridRowIconExampleComponent, RowIconRendererComponent } from './datagrid-row-icon.example.component'; 11 | 12 | @NgModule({ 13 | declarations: [DatagridRowIconExampleComponent, RowIconRendererComponent], 14 | imports: [CommonModule, ClarityModule, VcdComponentsModule], 15 | exports: [DatagridRowIconExampleComponent], 16 | }) 17 | export class DatagridRowIconExampleModule {} 18 | -------------------------------------------------------------------------------- /projects/examples/src/components/datagrid/datagrid-row-select.example.module.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2019 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | 6 | import { CommonModule } from '@angular/common'; 7 | import { NgModule } from '@angular/core'; 8 | import { ReactiveFormsModule } from '@angular/forms'; 9 | import { ClarityModule } from '@clr/angular'; 10 | import { VcdComponentsModule } from '@vcd/ui-components'; 11 | import { DatagridRowSelectExampleComponent } from './datagrid-row-select.example.component'; 12 | 13 | @NgModule({ 14 | declarations: [DatagridRowSelectExampleComponent], 15 | imports: [CommonModule, ClarityModule, ReactiveFormsModule, VcdComponentsModule], 16 | exports: [DatagridRowSelectExampleComponent], 17 | }) 18 | export class DatagridRowSelectExampleModule {} 19 | -------------------------------------------------------------------------------- /projects/examples/src/components/datagrid/datagrid-show-hide.example.module.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2019 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | 6 | import { CommonModule } from '@angular/common'; 7 | import { NgModule } from '@angular/core'; 8 | import { ReactiveFormsModule } from '@angular/forms'; 9 | import { ClarityModule } from '@clr/angular'; 10 | import { VcdComponentsModule } from '@vcd/ui-components'; 11 | import { DatagridShowHideExampleComponent } from './datagrid-show-hide.example.component'; 12 | 13 | @NgModule({ 14 | declarations: [DatagridShowHideExampleComponent], 15 | imports: [CommonModule, ClarityModule, ReactiveFormsModule, VcdComponentsModule], 16 | exports: [DatagridShowHideExampleComponent], 17 | }) 18 | export class DatagridShowHideExampleModule {} 19 | -------------------------------------------------------------------------------- /projects/examples/src/components/datagrid/datagrid-sort.example.module.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2020 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | 6 | import { CommonModule } from '@angular/common'; 7 | import { NgModule } from '@angular/core'; 8 | import { ReactiveFormsModule } from '@angular/forms'; 9 | import { ClarityModule } from '@clr/angular'; 10 | import { VcdComponentsModule } from '@vcd/ui-components'; 11 | import { DatagridSortExampleComponent } from './datagrid-sort.example.component'; 12 | 13 | @NgModule({ 14 | declarations: [DatagridSortExampleComponent], 15 | imports: [CommonModule, ClarityModule, ReactiveFormsModule, VcdComponentsModule], 16 | exports: [DatagridSortExampleComponent], 17 | }) 18 | export class DatagridSortExampleModule {} 19 | -------------------------------------------------------------------------------- /projects/examples/src/components/datagrid/datagrid-three-renderers.example.module.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2019 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | 6 | import { CommonModule } from '@angular/common'; 7 | import { NgModule } from '@angular/core'; 8 | import { ClarityModule } from '@clr/angular'; 9 | import { VcdComponentsModule } from '@vcd/ui-components'; 10 | import { DatagridThreeRenderersExampleComponent } from './datagrid-three-renderers.example.component'; 11 | 12 | @NgModule({ 13 | declarations: [DatagridThreeRenderersExampleComponent], 14 | imports: [CommonModule, ClarityModule, VcdComponentsModule], 15 | exports: [DatagridThreeRenderersExampleComponent], 16 | }) 17 | export class DatagridThreeRenderersExampleModule {} 18 | -------------------------------------------------------------------------------- /projects/examples/src/components/error/error-banner.example.component.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /projects/examples/src/components/error/error-banner.example.component.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2020-2023 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | 6 | import { Component } from '@angular/core'; 7 | 8 | /** 9 | * Press the button to show/hide the error banner. 10 | */ 11 | @Component({ 12 | selector: 'vcd-error-banner-example', 13 | templateUrl: './error-banner.example.component.html', 14 | }) 15 | export class ErrorBannerExampleComponent { 16 | errorMessage: string; 17 | } 18 | -------------------------------------------------------------------------------- /projects/examples/src/components/error/error-banner.example.module.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2020 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | 6 | import { CommonModule } from '@angular/common'; 7 | import { NgModule } from '@angular/core'; 8 | import { ReactiveFormsModule } from '@angular/forms'; 9 | import { ClarityModule } from '@clr/angular'; 10 | import { VcdComponentsModule } from '@vcd/ui-components'; 11 | import { ErrorBannerExampleComponent } from './error-banner.example.component'; 12 | 13 | @NgModule({ 14 | declarations: [ErrorBannerExampleComponent], 15 | imports: [CommonModule, ClarityModule, ReactiveFormsModule, VcdComponentsModule], 16 | exports: [ErrorBannerExampleComponent], 17 | }) 18 | export class ErrorBannerExampleModule {} 19 | -------------------------------------------------------------------------------- /projects/examples/src/components/error/error-banner.examples.module.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2020 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | 6 | import { NgModule } from '@angular/core'; 7 | import { ErrorBannerComponent } from '@vcd/ui-components'; 8 | import { Documentation } from '@vmw/ng-live-docs'; 9 | import { ErrorBannerExampleComponent } from './error-banner.example.component'; 10 | import { ErrorBannerExampleModule } from './error-banner.example.module'; 11 | 12 | Documentation.registerDocumentationEntry({ 13 | component: ErrorBannerComponent, 14 | displayName: 'Error Banner', 15 | urlSegment: 'errorBanner', 16 | examples: [ 17 | { 18 | component: ErrorBannerExampleComponent, 19 | title: 'Error banner when the button is pressed', 20 | urlSegment: 'error-banner', 21 | }, 22 | ], 23 | }); 24 | 25 | /** 26 | * A module that imports all error banner examples. 27 | */ 28 | @NgModule({ 29 | imports: [ErrorBannerExampleModule], 30 | }) 31 | export class ErrorBannerExamplesModule {} 32 | -------------------------------------------------------------------------------- /projects/examples/src/components/form-input/form-checkbox.example.module.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2020 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | 6 | import { NgModule } from '@angular/core'; 7 | import { ReactiveFormsModule } from '@angular/forms'; 8 | import { VcdFormModule } from '@vcd/ui-components'; 9 | import { FormCheckboxExampleComponent } from './form-checkbox.example.component'; 10 | 11 | @NgModule({ 12 | declarations: [FormCheckboxExampleComponent], 13 | imports: [VcdFormModule, ReactiveFormsModule], 14 | exports: [FormCheckboxExampleComponent], 15 | }) 16 | export class FormCheckboxExampleModule {} 17 | -------------------------------------------------------------------------------- /projects/examples/src/components/form-input/form-input.example.module.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2020 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | 6 | import { NgModule } from '@angular/core'; 7 | import { ReactiveFormsModule } from '@angular/forms'; 8 | import { VcdFormModule } from '@vcd/ui-components'; 9 | import { FormInputExampleComponent } from './form-input.example.component'; 10 | 11 | @NgModule({ 12 | declarations: [FormInputExampleComponent], 13 | imports: [VcdFormModule, ReactiveFormsModule], 14 | exports: [FormInputExampleComponent], 15 | }) 16 | export class FormInputExampleModule {} 17 | -------------------------------------------------------------------------------- /projects/examples/src/components/form-input/form-select-disabled-options.example.component.html: -------------------------------------------------------------------------------- 1 |
2 | 8 | 9 |
10 | -------------------------------------------------------------------------------- /projects/examples/src/components/form-input/form-select-disabled.example.component.html: -------------------------------------------------------------------------------- 1 |
2 |

Disabled select component:

3 | 9 | 10 | 11 |

Read-only select component:

12 | 19 | 20 |
21 | -------------------------------------------------------------------------------- /projects/examples/src/components/form-input/form-select-validation.example.component.html: -------------------------------------------------------------------------------- 1 |
2 | 8 | 9 |
10 | -------------------------------------------------------------------------------- /projects/examples/src/components/form-input/form-select.example.component.html: -------------------------------------------------------------------------------- 1 |
2 | The select element supports hints with new lines. See the source code for the required HTML 3 | 4 | 12 | 13 | 14 | 23 | 24 |
25 | -------------------------------------------------------------------------------- /projects/examples/src/components/form-input/form-select.example.module.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2022 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | 6 | import { NgModule } from '@angular/core'; 7 | import { ReactiveFormsModule } from '@angular/forms'; 8 | import { VcdFormModule } from '@vcd/ui-components'; 9 | import { FormSelectDisabledOptionsExampleComponent } from './form-select-disabled-options.example.component'; 10 | import { FormSelectExampleComponent } from './form-select.example.component'; 11 | import { FormSelectValidationExampleComponent } from './form-select-validation.example.component'; 12 | import { FormSelectDisabledExampleComponent } from './form-select-disabled.example.component'; 13 | 14 | @NgModule({ 15 | declarations: [ 16 | FormSelectExampleComponent, 17 | FormSelectDisabledExampleComponent, 18 | FormSelectDisabledOptionsExampleComponent, 19 | FormSelectValidationExampleComponent, 20 | ], 21 | imports: [VcdFormModule, ReactiveFormsModule], 22 | exports: [FormSelectExampleComponent], 23 | }) 24 | export class FormSelectExampleModule {} 25 | -------------------------------------------------------------------------------- /projects/examples/src/components/form-input/number-with-unit-form-input-unitless.example.component.scss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vmware-archive/vmware-cloud-director-ui-components/c0d4bee9936324c6232ddad1a6f8b56cd431abc2/projects/examples/src/components/form-input/number-with-unit-form-input-unitless.example.component.scss -------------------------------------------------------------------------------- /projects/examples/src/components/form-input/number-with-unit-form-input-unitless.example.module.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2020 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | 6 | import { CommonModule } from '@angular/common'; 7 | import { NgModule } from '@angular/core'; 8 | import { ReactiveFormsModule } from '@angular/forms'; 9 | import { I18nModule } from '@vcd/i18n'; 10 | import { VcdFormModule } from '@vcd/ui-components'; 11 | import { NumberWithUnitFormInputUnitlessExampleComponent } from './number-with-unit-form-input-unitless.example.component'; 12 | 13 | @NgModule({ 14 | declarations: [NumberWithUnitFormInputUnitlessExampleComponent], 15 | imports: [CommonModule, VcdFormModule, ReactiveFormsModule, I18nModule], 16 | exports: [NumberWithUnitFormInputUnitlessExampleComponent], 17 | }) 18 | export class NumberWithUnitFormInputUnitlessExampleModule {} 19 | -------------------------------------------------------------------------------- /projects/examples/src/components/form-input/number-with-unit-form-input.example.component.scss: -------------------------------------------------------------------------------- 1 | .form-value-display { 2 | margin-top: 0.5rem; 3 | } 4 | 5 | .form-valid { 6 | margin-top: 1.5rem; 7 | } 8 | -------------------------------------------------------------------------------- /projects/examples/src/components/form-input/number-with-unit-form-input.example.module.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2020 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | 6 | import { CommonModule } from '@angular/common'; 7 | import { NgModule } from '@angular/core'; 8 | import { ReactiveFormsModule } from '@angular/forms'; 9 | import { I18nModule } from '@vcd/i18n'; 10 | import { VcdFormModule } from '@vcd/ui-components'; 11 | import { NumberWithUnitFormInputExampleComponent } from './number-with-unit-form-input.example.component'; 12 | 13 | @NgModule({ 14 | declarations: [NumberWithUnitFormInputExampleComponent], 15 | imports: [CommonModule, VcdFormModule, ReactiveFormsModule, I18nModule], 16 | exports: [NumberWithUnitFormInputExampleComponent], 17 | }) 18 | export class NumberWithUnitFormInputExampleModule {} 19 | -------------------------------------------------------------------------------- /projects/examples/src/components/formly/input/formly-input-example-wrapper.component.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2020 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | 6 | import { Component, ViewChild, ViewContainerRef } from '@angular/core'; 7 | import { FieldWrapper } from '@ngx-formly/core'; 8 | 9 | @Component({ 10 | selector: 'vcd-formly-input-example-wrapper', 11 | template: ` 12 |
13 |
14 |

{{ to.cardTitle }}

15 |
16 | 17 |
18 |
19 |
20 | `, 21 | }) 22 | export class FormlyInputExampleWrapperComponent extends FieldWrapper { 23 | @ViewChild('fieldComponent', { static: true, read: ViewContainerRef }) 24 | fieldComponent: ViewContainerRef; 25 | } 26 | -------------------------------------------------------------------------------- /projects/examples/src/components/loading/loading-indicator.example.component.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /projects/examples/src/components/loading/loading-indicator.example.component.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2020 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | 6 | import { Component } from '@angular/core'; 7 | 8 | /** 9 | * Press the button to start/stop the loading indicator. 10 | */ 11 | @Component({ 12 | selector: 'vcd-loading-indicator-example', 13 | templateUrl: './loading-indicator.example.component.html', 14 | }) 15 | export class LoadingIndicatorExampleComponent { 16 | isLoading = false; 17 | } 18 | -------------------------------------------------------------------------------- /projects/examples/src/components/loading/loading-indicator.example.module.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2020 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | 6 | import { CommonModule } from '@angular/common'; 7 | import { NgModule } from '@angular/core'; 8 | import { ReactiveFormsModule } from '@angular/forms'; 9 | import { ClarityModule } from '@clr/angular'; 10 | import { VcdComponentsModule } from '@vcd/ui-components'; 11 | import { LoadingIndicatorExampleComponent } from './loading-indicator.example.component'; 12 | 13 | @NgModule({ 14 | declarations: [LoadingIndicatorExampleComponent], 15 | imports: [CommonModule, ClarityModule, ReactiveFormsModule, VcdComponentsModule], 16 | exports: [LoadingIndicatorExampleComponent], 17 | }) 18 | export class LoadingIndicatorExampleModule {} 19 | -------------------------------------------------------------------------------- /projects/examples/src/components/loading/loading-indicator.examples.module.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2020 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | 6 | import { NgModule } from '@angular/core'; 7 | import { LoadingIndicatorComponent } from '@vcd/ui-components'; 8 | import { Documentation } from '@vmw/ng-live-docs'; 9 | import { LoadingIndicatorExampleComponent } from './loading-indicator.example.component'; 10 | import { LoadingIndicatorExampleModule } from './loading-indicator.example.module'; 11 | 12 | Documentation.registerDocumentationEntry({ 13 | component: LoadingIndicatorComponent, 14 | displayName: 'Loading Indicator', 15 | urlSegment: 'loadingIndicator', 16 | examples: [ 17 | { 18 | component: LoadingIndicatorExampleComponent, 19 | title: 'Shows a loading indicator when set to loading', 20 | urlSegment: 'loading-indicator', 21 | }, 22 | ], 23 | }); 24 | 25 | /** 26 | * A module that imports all loading indicator examples. 27 | */ 28 | @NgModule({ 29 | imports: [LoadingIndicatorExampleModule], 30 | }) 31 | export class LoadingIndicatorExamplesModule {} 32 | -------------------------------------------------------------------------------- /projects/examples/src/components/quick-search/filters/quick-search-filters.example.component.scss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vmware-archive/vmware-cloud-director-ui-components/c0d4bee9936324c6232ddad1a6f8b56cd431abc2/projects/examples/src/components/quick-search/filters/quick-search-filters.example.component.scss -------------------------------------------------------------------------------- /projects/examples/src/components/quick-search/filters/quick-search-filters.example.module.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2020 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | 6 | import { CommonModule } from '@angular/common'; 7 | import { NgModule } from '@angular/core'; 8 | import { ReactiveFormsModule } from '@angular/forms'; 9 | import { ClarityModule } from '@clr/angular'; 10 | import { QuickSearchModule, VcdFormModule } from '@vcd/ui-components'; 11 | import { ActionsSearchProvider, QuickSearchFiltersExampleComponent } from './quick-search-filters.example.component'; 12 | 13 | @NgModule({ 14 | imports: [CommonModule, ClarityModule, QuickSearchModule, VcdFormModule, ReactiveFormsModule], 15 | declarations: [QuickSearchFiltersExampleComponent], 16 | exports: [QuickSearchFiltersExampleComponent], 17 | }) 18 | export class QuickSearchFiltersExampleModule {} 19 | -------------------------------------------------------------------------------- /projects/examples/src/components/quick-search/nested-providers/quick-search-nested-providers.example.component.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |

4 | Quick search gives the client to register nested sections on-top-of normal sections. A nested section is a simple 5 | group of quick search providers that has a section name. 6 |

7 |
8 | These sections can be ordered amongst each-other, but will always display below normal quick search providers. 9 | 10 | 11 | -------------------------------------------------------------------------------- /projects/examples/src/components/quick-search/nested-providers/quick-search-nested-providers.example.component.scss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vmware-archive/vmware-cloud-director-ui-components/c0d4bee9936324c6232ddad1a6f8b56cd431abc2/projects/examples/src/components/quick-search/nested-providers/quick-search-nested-providers.example.component.scss -------------------------------------------------------------------------------- /projects/examples/src/components/quick-search/nested-providers/quick-search-nested-providers.example.module.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2020 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | 6 | import { CommonModule } from '@angular/common'; 7 | import { NgModule } from '@angular/core'; 8 | import { ReactiveFormsModule } from '@angular/forms'; 9 | import { ClarityModule } from '@clr/angular'; 10 | import { QuickSearchModule, VcdFormModule } from '@vcd/ui-components'; 11 | import { 12 | ActionsSearchProvider, 13 | QuickSearchNestedProvidersExampleComponent, 14 | } from './quick-search-nested-providers.example.component'; 15 | 16 | @NgModule({ 17 | imports: [CommonModule, ClarityModule, QuickSearchModule, VcdFormModule, ReactiveFormsModule], 18 | declarations: [QuickSearchNestedProvidersExampleComponent], 19 | exports: [QuickSearchNestedProvidersExampleComponent], 20 | }) 21 | export class QuickSearchNestedProvidersExampleModule {} 22 | -------------------------------------------------------------------------------- /projects/examples/src/components/quick-search/quick-search-content-projection.example.component.scss: -------------------------------------------------------------------------------- 1 | .info { 2 | display: flex; 3 | font-style: italic; 4 | justify-content: center; 5 | background-color: var(--clr-color-neutral-200); 6 | border-radius: 0.2em; 7 | } 8 | -------------------------------------------------------------------------------- /projects/examples/src/components/quick-search/quick-search-content-projection.example.module.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2020 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | 6 | import { CommonModule } from '@angular/common'; 7 | import { NgModule } from '@angular/core'; 8 | import { ReactiveFormsModule } from '@angular/forms'; 9 | import { ClarityModule } from '@clr/angular'; 10 | import { QuickSearchModule, VcdFormModule } from '@vcd/ui-components'; 11 | import { QuickSearchContentProjectionExampleComponent } from './quick-search-content-projection.example.component'; 12 | 13 | @NgModule({ 14 | imports: [CommonModule, ClarityModule, QuickSearchModule, VcdFormModule, ReactiveFormsModule], 15 | declarations: [QuickSearchContentProjectionExampleComponent], 16 | exports: [QuickSearchContentProjectionExampleComponent], 17 | }) 18 | export class QuickSearchContentProjectionExampleModule {} 19 | -------------------------------------------------------------------------------- /projects/examples/src/components/quick-search/quick-search-hide-empty-section-example.component.html: -------------------------------------------------------------------------------- 1 | 2 |

This example shows how to configure whether a provider section should be hidden if there are no results.

3 | 4 |

Use the form below to configure the Quick Search

5 | 6 |
7 | 12 | 13 |
14 | 15 | 16 | -------------------------------------------------------------------------------- /projects/examples/src/components/quick-search/quick-search-hide-empty-section-example.module.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2021 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | 6 | import { CommonModule } from '@angular/common'; 7 | import { NgModule } from '@angular/core'; 8 | import { ReactiveFormsModule } from '@angular/forms'; 9 | import { ClarityModule } from '@clr/angular'; 10 | import { QuickSearchModule, VcdFormModule } from '@vcd/ui-components'; 11 | import { 12 | ActionsSearchProvider, 13 | QuickSearchHideEmptySectionExampleComponent, 14 | } from './quick-search-hide-empty-section-example.component'; 15 | 16 | @NgModule({ 17 | imports: [CommonModule, ClarityModule, QuickSearchModule, VcdFormModule, ReactiveFormsModule], 18 | declarations: [QuickSearchHideEmptySectionExampleComponent], 19 | exports: [QuickSearchHideEmptySectionExampleComponent], 20 | providers: [ 21 | { 22 | provide: ActionsSearchProvider, 23 | useValue: new ActionsSearchProvider(false), 24 | }, 25 | ], 26 | }) 27 | export class QuickSearchHideEmptySectionExampleModule {} 28 | -------------------------------------------------------------------------------- /projects/examples/src/components/quick-search/quick-search-sync-async.example.component.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |

There several sections - some that do the search asynchronously while the other synchronously.

4 |

5 | Use the keyboard arrow keys to move through the search result. You can do this even while the results are still 6 | loading. 7 |

8 |

Press 'Enter' to invoke the selected action. You can also use the mouse to click on an item

9 |

Use the form below to configure the Quick Search

10 | 11 |
12 | 18 | 19 |
20 | 21 | 26 | -------------------------------------------------------------------------------- /projects/examples/src/components/quick-search/quick-search-sync-async.example.component.scss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vmware-archive/vmware-cloud-director-ui-components/c0d4bee9936324c6232ddad1a6f8b56cd431abc2/projects/examples/src/components/quick-search/quick-search-sync-async.example.component.scss -------------------------------------------------------------------------------- /projects/examples/src/components/quick-search/quick-search-sync-async.example.module.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2020 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | 6 | import { CommonModule } from '@angular/common'; 7 | import { NgModule } from '@angular/core'; 8 | import { ReactiveFormsModule } from '@angular/forms'; 9 | import { ClarityModule } from '@clr/angular'; 10 | import { QuickSearchModule, VcdFormModule } from '@vcd/ui-components'; 11 | import { 12 | ActionsSearchProvider, 13 | QuickSearchSyncAsyncExampleComponent, 14 | } from './quick-search-sync-async.example.component'; 15 | 16 | @NgModule({ 17 | imports: [CommonModule, ClarityModule, QuickSearchModule, VcdFormModule, ReactiveFormsModule], 18 | declarations: [QuickSearchSyncAsyncExampleComponent], 19 | exports: [QuickSearchSyncAsyncExampleComponent], 20 | providers: [ 21 | { 22 | provide: ActionsSearchProvider, 23 | useValue: new ActionsSearchProvider(false), 24 | }, 25 | ], 26 | }) 27 | export class QuickSearchSyncAsyncExampleModule {} 28 | -------------------------------------------------------------------------------- /projects/examples/src/components/subscription/subscription-tracker.example.module.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2020 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | 6 | import { CommonModule } from '@angular/common'; 7 | import { NgModule } from '@angular/core'; 8 | import { ReactiveFormsModule } from '@angular/forms'; 9 | import { ClarityModule } from '@clr/angular'; 10 | import { VcdComponentsModule } from '@vcd/ui-components'; 11 | import { 12 | SubscriptionTrackerExampleComponent, 13 | SubscriptionTrackerExampleSubComponent, 14 | } from './subscription-tracker.example.component'; 15 | 16 | @NgModule({ 17 | declarations: [SubscriptionTrackerExampleComponent, SubscriptionTrackerExampleSubComponent], 18 | imports: [CommonModule, ClarityModule, ReactiveFormsModule, VcdComponentsModule], 19 | exports: [SubscriptionTrackerExampleComponent], 20 | }) 21 | export class SubscriptionTrackerExampleModule {} 22 | -------------------------------------------------------------------------------- /projects/examples/src/environments/environment.prod.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2019 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | 6 | export const environment = { 7 | production: true, 8 | }; 9 | -------------------------------------------------------------------------------- /projects/examples/src/environments/environment.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2019 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | 6 | // This file can be replaced during build by using the `fileReplacements` array. 7 | // `ng build --prod` replaces `environment.ts` with `environment.prod.ts`. 8 | // The list of file replacements can be found in `angular.json`. 9 | 10 | export const environment = { 11 | production: false, 12 | }; 13 | 14 | /* 15 | * For easier debugging in development mode, you can import the following file 16 | * to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`. 17 | * 18 | * This import should be commented out in production mode because it will have a negative impact 19 | * on performance if an error is thrown. 20 | */ 21 | // import 'zone.js/plugins/zone-error'; // Included with Angular CLI. 22 | -------------------------------------------------------------------------------- /projects/examples/src/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vmware-archive/vmware-cloud-director-ui-components/c0d4bee9936324c6232ddad1a6f8b56cd431abc2/projects/examples/src/favicon.ico -------------------------------------------------------------------------------- /projects/examples/src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Examples 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /projects/examples/src/main.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2019 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | 6 | import { enableProdMode, LOCALE_ID } from '@angular/core'; 7 | import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; 8 | 9 | import { AppModule } from './app/app.module'; 10 | import { environment } from './environments/environment'; 11 | 12 | if (environment.production) { 13 | enableProdMode(); 14 | } 15 | 16 | platformBrowserDynamic([ 17 | { 18 | provide: LOCALE_ID, 19 | useValue: navigator.language, 20 | }, 21 | ]) 22 | .bootstrapModule(AppModule) 23 | .catch((err) => console.error(err)); 24 | -------------------------------------------------------------------------------- /projects/examples/src/mock-vcd-common.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2021 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | 6 | export const EMPTY = {}; 7 | -------------------------------------------------------------------------------- /projects/examples/src/styles.scss: -------------------------------------------------------------------------------- 1 | /* You can add global styles to this file, and also import other style files */ 2 | // TODO: Provide the users with option to select the prismjs CSS based on the theme they want 3 | @import '../../../node_modules/prismjs/themes/prism'; 4 | @import '~@cds/core/global.min.css'; 5 | -------------------------------------------------------------------------------- /projects/examples/src/test.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2019 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | 6 | // This file is required by karma.conf.js and loads recursively all the .spec and framework files 7 | 8 | import 'zone.js/testing'; 9 | // eslint-disable-next-line sort-imports 10 | import { getTestBed } from '@angular/core/testing'; 11 | import { BrowserDynamicTestingModule, platformBrowserDynamicTesting } from '@angular/platform-browser-dynamic/testing'; 12 | 13 | // First, initialize the Angular testing environment. 14 | getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting(), { 15 | teardown: { destroyAfterEach: false }, 16 | }); 17 | -------------------------------------------------------------------------------- /projects/examples/tsconfig.app.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../../out-tsc/app", 5 | "types": [] 6 | }, 7 | // TODO: Removed the 'files' property because files added to the property are being excluded by Compodoc parser 8 | // https://github.com/compodoc/compodoc/issues/831 9 | "include": ["src/main.ts", "src/polyfills.ts", "src/**/*.ts"], 10 | "exclude": ["src/test.ts", "src/**/*.spec.ts"] 11 | } 12 | -------------------------------------------------------------------------------- /projects/examples/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../../out-tsc/spec", 5 | "types": ["jasmine", "node"] 6 | }, 7 | "files": ["src/test.ts", "src/polyfills.ts"], 8 | "include": ["src/**/*.spec.ts", "src/**/*.d.ts"] 9 | } 10 | -------------------------------------------------------------------------------- /projects/i18n/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../.eslintrc.json", 3 | "ignorePatterns": [ 4 | "!**/*" 5 | ], 6 | "overrides": [ 7 | { 8 | "files": [ 9 | "*.ts" 10 | ], 11 | "parserOptions": { 12 | "project": [ 13 | "projects/i18n/tsconfig.lib.json", 14 | "projects/i18n/tsconfig.spec.json" 15 | ], 16 | "createDefaultProgram": true 17 | } 18 | } 19 | ] 20 | } 21 | -------------------------------------------------------------------------------- /projects/i18n/karma.conf.js: -------------------------------------------------------------------------------- 1 | // Karma configuration file, see link for more information 2 | // https://karma-runner.github.io/1.0/config/configuration-file.html 3 | const generateKarmaConf = require('../../karma.conf.base'); 4 | 5 | module.exports = generateKarmaConf('i18n'); 6 | -------------------------------------------------------------------------------- /projects/i18n/ng-package.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "../../node_modules/ng-packagr/ng-package.schema.json", 3 | "dest": "../../dist/i18n", 4 | "lib": { 5 | "entryFile": "src/public-api.ts" 6 | }, 7 | "allowedNonPeerDependencies": ["messageformat"] 8 | } 9 | -------------------------------------------------------------------------------- /projects/i18n/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@vcd/i18n", 3 | "version": "15.0.1", 4 | "peerDependencies": { 5 | "@angular/common": ">=15.2.3", 6 | "@angular/core": ">=15.2.3" 7 | }, 8 | "dependencies": { 9 | "@messageformat/core": "^3" 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /projects/i18n/src/lib/service/mock-translation-service.spec.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2020 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | 6 | import { MockTranslationService } from './mock-translation-service'; 7 | 8 | describe('MockTranslationService', () => { 9 | const service = new MockTranslationService(); 10 | 11 | it('uses the perferred local set', () => { 12 | service.preferredLocale = 'en'; 13 | expect(service.getActiveLocale()).toEqual('en'); 14 | }); 15 | 16 | it('formats dates using the default formatter', () => { 17 | expect(service.formatDate(new Date('1/1/1999'))).toEqual('1/1/1999, 12:00:00 AM'); 18 | expect(service.formatTime(new Date('1/1/1999'))).toEqual('1/1/1999, 12:00:00 AM'); 19 | expect(service.formatDateTime(new Date('1/1/1999'))).toEqual('1/1/1999, 12:00:00 AM'); 20 | }); 21 | }); 22 | -------------------------------------------------------------------------------- /projects/i18n/src/lib/utils/index.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2020 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | 6 | export * from './platform-util'; 7 | -------------------------------------------------------------------------------- /projects/i18n/src/public-api.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2020 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | 6 | export * from './lib/i18n.module'; 7 | export * from './lib/service/translation-service'; 8 | export * from './lib/pipe/translation-pipe'; 9 | export * from './lib/pipe/format-date-time-pipe'; 10 | export * from './lib/pipe/lazy-string.pipe'; 11 | export * from './lib/service/message-format-translation-service'; 12 | export * from './lib/service/mock-translation-service'; 13 | export * from './lib/loader/translation-loader'; 14 | export * from './lib/utils/index'; 15 | -------------------------------------------------------------------------------- /projects/i18n/src/test.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2020 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | 6 | // This file is required by karma.conf.js and loads recursively all the .spec and framework files 7 | 8 | import 'zone.js'; 9 | import 'zone.js/testing'; 10 | import { getTestBed } from '@angular/core/testing'; 11 | import { BrowserDynamicTestingModule, platformBrowserDynamicTesting } from '@angular/platform-browser-dynamic/testing'; 12 | 13 | // First, initialize the Angular testing environment. 14 | getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting(), { 15 | teardown: { destroyAfterEach: false }, 16 | }); 17 | -------------------------------------------------------------------------------- /projects/i18n/tsconfig.lib.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../../out-tsc/lib", 5 | "target": "es2015", 6 | "declaration": true, 7 | "inlineSources": true, 8 | "types": [], 9 | "lib": ["dom", "es2018"] 10 | }, 11 | "angularCompilerOptions": { 12 | "annotateForClosureCompiler": true, 13 | "compilationMode": "partial", 14 | "skipTemplateCodegen": true, 15 | "strictMetadataEmit": true, 16 | "fullTemplateTypeCheck": true, 17 | "strictInjectionParameters": true, 18 | "enableResourceInlining": true 19 | }, 20 | "include": ["**/*.ts"], 21 | "exclude": ["src/test.ts", "**/*.spec.ts"] 22 | } 23 | -------------------------------------------------------------------------------- /projects/i18n/tsconfig.lib.prod.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.lib.json", 3 | "compilerOptions": { 4 | "declarationMap": false 5 | }, 6 | "angularCompilerOptions": { 7 | "compilationMode": "partial" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /projects/i18n/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../../out-tsc/spec", 5 | "types": ["jasmine", "node"] 6 | }, 7 | "files": ["src/test.ts"], 8 | "include": ["**/*.spec.ts", "**/*.d.ts"] 9 | } 10 | -------------------------------------------------------------------------------- /projects/ng-live-docs/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../.eslintrc.json", 3 | "ignorePatterns": [ 4 | "!**/*" 5 | ], 6 | "overrides": [ 7 | { 8 | "files": [ 9 | "*.ts" 10 | ], 11 | "parserOptions": { 12 | "project": [ 13 | "projects/ng-live-docs/tsconfig.lib.json", 14 | "projects/ng-live-docs/tsconfig.spec.json" 15 | ], 16 | "createDefaultProgram": true 17 | }, 18 | "rules": { 19 | "@angular-eslint/component-selector": [ 20 | "error", 21 | { 22 | "type": "element", 23 | "prefix": "vmw", 24 | "style": "kebab-case" 25 | } 26 | ], 27 | "@angular-eslint/directive-selector": [ 28 | "error", 29 | { 30 | "type": "attribute", 31 | "prefix": "vmw", 32 | "style": "camelCase" 33 | } 34 | ] 35 | } 36 | } 37 | ] 38 | } 39 | -------------------------------------------------------------------------------- /projects/ng-live-docs/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | All notable changes to this project will be documented in this file. 4 | 5 | The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) 6 | 7 | ## [Unreleased] 8 | 9 | ## [0.0.15] 10 | 11 | Upgraded to Angular/Clarity 12 12 | 13 | ## [0.0.14] 14 | 15 | ### Fixed 16 | 17 | Make @vmw/ng-live-docs/index.js work on Windows 18 | 19 | ## [0.0.13] 20 | 21 | The first good version after problems with the pipeline. Version to be used for 22 | Angular 11 / Clarity 5 23 | 24 | ### Changed 25 | 26 | Updated to require @vmw/plain-js-livedocs@0.0.4 which has more liberal peer dependencies 27 | 28 | ## [0.0.10] 29 | 30 | ### Changed 31 | 32 | - Upgraded to Angular 11 / Clarity 5 33 | -------------------------------------------------------------------------------- /projects/ng-live-docs/karma.conf.js: -------------------------------------------------------------------------------- 1 | // Karma configuration file, see link for more information 2 | // https://karma-runner.github.io/1.0/config/configuration-file.html 3 | const generateKarmaConf = require('../../karma.conf.base'); 4 | 5 | module.exports = generateKarmaConf('ng-live-docs'); 6 | -------------------------------------------------------------------------------- /projects/ng-live-docs/ng-package.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "../../node_modules/ng-packagr/ng-package.schema.json", 3 | "dest": "../../dist/ng-live-docs", 4 | "lib": { 5 | "entryFile": "src/public-api.ts" 6 | }, 7 | "allowedNonPeerDependencies": [ 8 | "rbradford-compodoc", 9 | "@stackblitz/sdk", 10 | "schematics-utilities", 11 | "cross-spawn" 12 | ] 13 | } 14 | -------------------------------------------------------------------------------- /projects/ng-live-docs/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@vmw/ng-live-docs", 3 | "version": "0.0.16", 4 | "peerDependencies": { 5 | "@angular/common": "~13.3.11", 6 | "@angular/core": "~13.3.11", 7 | "@angular/platform-browser": "^13.3.11", 8 | "@clr/ui": "^13.5.0", 9 | "@clr/icons": "^13.0.2", 10 | "@clr/angular": "^13.5.0", 11 | "@cds/core": "^6.1.0", 12 | "prismjs": "^1" 13 | }, 14 | "dependencies": { 15 | "rbradford-compodoc": "1.1.11", 16 | "@stackblitz/sdk": "^1.3", 17 | "schematics-utilities": "^2", 18 | "cross-spawn": "^7.0.3" 19 | }, 20 | "schematics": "./schematics/collection.json" 21 | } 22 | -------------------------------------------------------------------------------- /projects/ng-live-docs/schematics/add-example/files/example-component/__name@dasherize__.example.component.html.template: -------------------------------------------------------------------------------- 1 |

<%= name %>

2 | -------------------------------------------------------------------------------- /projects/ng-live-docs/schematics/add-example/files/example-component/__name@dasherize__.example.component.scss.template: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vmware-archive/vmware-cloud-director-ui-components/c0d4bee9936324c6232ddad1a6f8b56cd431abc2/projects/ng-live-docs/schematics/add-example/files/example-component/__name@dasherize__.example.component.scss.template -------------------------------------------------------------------------------- /projects/ng-live-docs/schematics/add-example/files/example-component/__name@dasherize__.example.component.ts.template: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2020 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | 6 | import { Component, OnInit } from '@angular/core'; 7 | 8 | @Component({ 9 | selector: 'vcd-<%= dasherize(name) %>-example', 10 | templateUrl: './<%= dasherize(name) %>.example.component.html', 11 | styleUrls: ['./<%= dasherize(name) %>.example.component.scss'], 12 | }) 13 | export class <%= name %>ExampleComponent implements OnInit { 14 | constructor() {} 15 | 16 | ngOnInit(): void {} 17 | } 18 | -------------------------------------------------------------------------------- /projects/ng-live-docs/schematics/add-example/files/example-component/__name@dasherize__.example.module.ts.template: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2020 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | 6 | import { CommonModule } from '@angular/common'; 7 | import { NgModule } from '@angular/core'; 8 | import { <%= classify(moduleName) %> } from '<%= packageName %>'; 9 | import { <%= name %>ExampleComponent } from './<%= dasherize(name) %>.example.component'; 10 | 11 | @NgModule({ 12 | declarations: [<%= name %>ExampleComponent], 13 | imports: [CommonModule, <%= classify(moduleName) %> ], 14 | exports: [<%= name %>ExampleComponent], 15 | entryComponents: [<%= name %>ExampleComponent], 16 | }) 17 | export class <%= name %>ExampleModule {} 18 | -------------------------------------------------------------------------------- /projects/ng-live-docs/schematics/add-example/files/root-module/examples.module.ts.template: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2020 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | 6 | import { CommonModule } from '@angular/common'; 7 | import { NgModule } from '@angular/core'; 8 | import { <%= name %>ExamplesModule } from './<%= componentType %>s/<%= dasherize(name) %>/<%= dasherize(name) %>.examples.module'; 9 | 10 | @NgModule({ 11 | imports: [ 12 | CommonModule, 13 | <%= name %>ExamplesModule 14 | ] 15 | }) 16 | export class ExamplesModule {} 17 | -------------------------------------------------------------------------------- /projects/ng-live-docs/schematics/add-example/schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/schema", 3 | "id": "SchematicsMyService", 4 | "title": "My Service Schema", 5 | "type": "object", 6 | "properties": { 7 | "packageName": { 8 | "description": "Package name", 9 | "type": "string" 10 | }, 11 | "moduleName": { 12 | "description": "Module name", 13 | "type": "string" 14 | }, 15 | "componentName": { 16 | "description": "The component to add example", 17 | "type": "string" 18 | }, 19 | "exampleName": { 20 | "description": "Example name", 21 | "type": "string" 22 | }, 23 | "displayName": { 24 | "description": "Title of example", 25 | "type": "string" 26 | } 27 | }, 28 | "required": [ 29 | "packageName", "moduleName", "componentName", "exampleName", "displayName" 30 | ] 31 | } 32 | -------------------------------------------------------------------------------- /projects/ng-live-docs/schematics/add-example/schema.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2020 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | 6 | export interface Schema { 7 | packageName: string; 8 | moduleName: string; 9 | componentName: string; 10 | exampleName: string; 11 | displayName: string; 12 | } 13 | -------------------------------------------------------------------------------- /projects/ng-live-docs/schematics/collection.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "../../../node_modules/@angular-devkit/schematics/collection-schema.json", 3 | "schematics": { 4 | "add-example": { 5 | "description": "Add example", 6 | "factory": "./add-example/index#addExample", 7 | "schema": "./add-example/schema.json" 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /projects/ng-live-docs/scripts/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "moduleResolution": "node", 4 | "module": "commonjs", 5 | "noImplicitAny": true, 6 | "removeComments": true, 7 | "preserveConstEnums": true, 8 | "sourceMap": true, 9 | "target": "es2016", 10 | "outDir": "../../../dist/ng-live-docs", 11 | "types": ["jasmine", "node"], 12 | "lib": [ 13 | "es2015", 14 | "dom" 15 | ], 16 | "allowJs": true 17 | }, 18 | "files": [ 19 | "create-module-data.ts", 20 | "index.js" 21 | ] 22 | } 23 | -------------------------------------------------------------------------------- /projects/ng-live-docs/src/api-viewer/api-viewer.component.scss: -------------------------------------------------------------------------------- 1 | ::ng-deep body p { 2 | margin-top: 0; 3 | } 4 | -------------------------------------------------------------------------------- /projects/ng-live-docs/src/api-viewer/api-viewer.module.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2020 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | 6 | import { CommonModule } from '@angular/common'; 7 | import { NgModule } from '@angular/core'; 8 | import { ClarityModule } from '@clr/angular'; 9 | import { ApiViewerComponent } from './api-viewer.component'; 10 | 11 | const declarations = [ApiViewerComponent]; 12 | 13 | @NgModule({ 14 | imports: [ClarityModule, CommonModule], 15 | declarations: [...declarations], 16 | exports: [...declarations], 17 | }) 18 | export class ApiViewerModule {} 19 | -------------------------------------------------------------------------------- /projects/ng-live-docs/src/api-viewer/index.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2020 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | 6 | export * from './api-viewer.component'; 7 | export * from './api-viewer.module'; 8 | -------------------------------------------------------------------------------- /projects/ng-live-docs/src/documentation-container/documentation-container-api.component.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2020 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | 6 | import { Component, OnInit } from '@angular/core'; 7 | import { ActivatedRoute, Data } from '@angular/router'; 8 | 9 | @Component({ 10 | selector: 'vmw-documentation-container-api', 11 | template: ``, 12 | }) 13 | export class DocumentationContainerApiComponent implements OnInit { 14 | component: Component; 15 | 16 | constructor(private route: ActivatedRoute) {} 17 | 18 | ngOnInit(): void { 19 | this.route.data.subscribe((data: Data) => { 20 | if (data.component) { 21 | this.component = data.component; 22 | } 23 | }); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /projects/ng-live-docs/src/documentation-container/documentation-container-documentation.component.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2020 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | 6 | import { Component, OnInit } from '@angular/core'; 7 | import { ActivatedRoute, Data } from '@angular/router'; 8 | 9 | @Component({ 10 | selector: 'vmw-documentation-container-documentation', 11 | template: ``, 12 | }) 13 | export class DocumentationContainerDocumentationComponent implements OnInit { 14 | component: Component; 15 | 16 | constructor(private route: ActivatedRoute) {} 17 | 18 | ngOnInit(): void { 19 | this.route.data.subscribe((data: Data) => { 20 | if (data.component) { 21 | this.component = data.component; 22 | } 23 | }); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /projects/ng-live-docs/src/documentation-container/documentation-container-example.component.html: -------------------------------------------------------------------------------- 1 |
2 | 7 |
8 | 9 |
10 | 11 |
12 | -------------------------------------------------------------------------------- /projects/ng-live-docs/src/documentation-container/documentation-container-example.component.scss: -------------------------------------------------------------------------------- 1 | vcd-example-viewer { 2 | margin-top: 1rem; 3 | display: block; 4 | } 5 | 6 | ul.example-list { 7 | columns: auto 3; 8 | } 9 | -------------------------------------------------------------------------------- /projects/ng-live-docs/src/documentation-container/documentation-container-example.component.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2020 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | 6 | import { Component, OnInit } from '@angular/core'; 7 | import { ActivatedRoute, Data } from '@angular/router'; 8 | 9 | @Component({ 10 | selector: 'vmw-documentation-container-example', 11 | templateUrl: './documentation-container-example.component.html', 12 | styleUrls: ['./documentation-container-example.component.scss'], 13 | }) 14 | export class DocumentationContainerExampleComponent implements OnInit { 15 | examples = []; 16 | 17 | constructor(private route: ActivatedRoute) {} 18 | 19 | ngOnInit(): void { 20 | this.route.data.subscribe((data: Data) => { 21 | if (data.examples) { 22 | this.examples = data.examples; 23 | } 24 | }); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /projects/ng-live-docs/src/documentation-container/documentation-container.component.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /projects/ng-live-docs/src/documentation-container/documentation-container.component.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2020 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | 6 | import { Component } from '@angular/core'; 7 | import { ActivatedRoute } from '@angular/router'; 8 | import { DocumentationEntry } from '../interfaces'; 9 | 10 | @Component({ 11 | selector: 'vmw-documentation-container', 12 | templateUrl: './documentation-container.component.html', 13 | }) 14 | export class DocumentationContainerComponent { 15 | /** 16 | * The documentation entry registered for a component is obtained here using the route data 17 | * {@link Documentation.getRoutes} registered for that component using {@link Documentation.registerDocumentationEntry} 18 | */ 19 | documentationEntry: DocumentationEntry; 20 | 21 | constructor(private route: ActivatedRoute) {} 22 | } 23 | -------------------------------------------------------------------------------- /projects/ng-live-docs/src/documentation-container/index.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2020 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | 6 | export * from './documentation-container.component'; 7 | export * from './documentation-container.module'; 8 | export * from './documentation-container-api.component'; 9 | export * from './documentation-container-documentation.component'; 10 | export * from './documentation-container-example.component'; 11 | -------------------------------------------------------------------------------- /projects/ng-live-docs/src/example-viewer/example-viewer.component.scss: -------------------------------------------------------------------------------- 1 | $radius: 3px; 2 | $margin: 0.5rem; 3 | $bg-clr: #d8e3e9; 4 | 5 | .card-header-main { 6 | display: flex; 7 | 8 | .card-header { 9 | flex: 1; 10 | } 11 | 12 | .example-button-container { 13 | display: flex; 14 | margin: 0.4rem $margin 0 0; 15 | padding: 0 4px; 16 | 17 | &.example-shown { 18 | border-radius: $radius $radius 0 0; 19 | background-color: $bg-clr; 20 | } 21 | clr-icon { 22 | margin: 0 2px; 23 | cursor: pointer; 24 | align-self: center; 25 | } 26 | } 27 | } 28 | .source-code-container { 29 | border-radius: $radius 0 $radius $radius; 30 | margin: 0 $margin; 31 | background-color: $bg-clr; 32 | } 33 | -------------------------------------------------------------------------------- /projects/ng-live-docs/src/example-viewer/example-viewer.module.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2020 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | 6 | import { CommonModule } from '@angular/common'; 7 | import { NgModule } from '@angular/core'; 8 | import { ClarityModule } from '@clr/angular'; 9 | import { OverviewViewerModule } from '../overview-viewer/overview-viewer.module'; 10 | import { SourceCodeViewerModule } from '../source-code-viewer/source-code-viewer.module'; 11 | import { ExampleViewerComponent } from './example-viewer.component'; 12 | 13 | const declarations = [ExampleViewerComponent]; 14 | 15 | @NgModule({ 16 | imports: [ClarityModule, CommonModule, SourceCodeViewerModule, OverviewViewerModule], 17 | declarations: [...declarations], 18 | exports: [...declarations], 19 | }) 20 | export class ExampleViewerModule {} 21 | -------------------------------------------------------------------------------- /projects/ng-live-docs/src/example-viewer/index.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2020 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | 6 | export * from './example-viewer.component'; 7 | export * from './example-viewer.module'; 8 | -------------------------------------------------------------------------------- /projects/ng-live-docs/src/injection-tokens.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2020 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | 6 | import { InjectionToken } from '@angular/core'; 7 | import { CompodocSchema } from './compodoc/compodoc-schema'; 8 | import { StackBlitzInfo } from './interfaces'; 9 | 10 | /** 11 | * NOTE: The following two has to be exported otherwise the AoT compiler won't see it. 12 | */ 13 | 14 | /** 15 | * Token that makes the documentation JSONs available to the following factory function. 16 | */ 17 | export const DOCUMENTATION_DATA = new InjectionToken( 18 | 'NgLiveDocsModule.forRoot() CompoDocRetrieverService doc jsons.' 19 | ); 20 | 21 | /** 22 | * A token that is used to provide the url where the raw compodoc output is located. 23 | */ 24 | export const COMPODOC_URL = new InjectionToken('COMPODOC_URL'); 25 | 26 | /** 27 | * Token that makes Stqckblitz JSON data available to factory functions 28 | */ 29 | export const STACKBLITZ_DATA = new InjectionToken( 30 | 'NgLiveDocsModule.forRoot() StackBlitz template JSON data' 31 | ); 32 | -------------------------------------------------------------------------------- /projects/ng-live-docs/src/overview-viewer/index.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2020 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | 6 | export * from './overview-viewer.component'; 7 | export * from './overview-viewer.module'; 8 | -------------------------------------------------------------------------------- /projects/ng-live-docs/src/overview-viewer/overview-viewer.component.html: -------------------------------------------------------------------------------- 1 |
2 | -------------------------------------------------------------------------------- /projects/ng-live-docs/src/overview-viewer/overview-viewer.component.scss: -------------------------------------------------------------------------------- 1 | :host > div { 2 | padding-top: 10px; 3 | } 4 | 5 | :host ::ng-deep p { 6 | margin-bottom: 10px; 7 | } 8 | -------------------------------------------------------------------------------- /projects/ng-live-docs/src/overview-viewer/overview-viewer.module.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2020 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | 6 | import { CommonModule } from '@angular/common'; 7 | import { NgModule } from '@angular/core'; 8 | import { ClarityModule } from '@clr/angular'; 9 | import { OverviewViewerComponent } from './overview-viewer.component'; 10 | 11 | const declarations = [OverviewViewerComponent]; 12 | 13 | @NgModule({ 14 | imports: [ClarityModule, CommonModule], 15 | declarations: [...declarations], 16 | exports: [...declarations], 17 | }) 18 | export class OverviewViewerModule {} 19 | -------------------------------------------------------------------------------- /projects/ng-live-docs/src/public-api.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2020 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | 6 | /* 7 | * Public API Surface of doc-lib 8 | */ 9 | 10 | export * from './documentation-retriever.service'; 11 | export * from './documentation'; 12 | export * from './compodoc/compodoc-schema'; 13 | export * from './ng-live-docs.module'; 14 | export * from './api-viewer/index'; 15 | export * from './documentation-container/index'; 16 | export * from './example-viewer/index'; 17 | export * from './overview-viewer/index'; 18 | export * from './source-code-viewer/index'; 19 | export * from './stack-blitz-writer.service'; 20 | export * from './interfaces'; 21 | -------------------------------------------------------------------------------- /projects/ng-live-docs/src/source-code-viewer/index.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2020 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | 6 | export * from './source-code-viewer.component'; 7 | export * from './source-code-viewer.module'; 8 | -------------------------------------------------------------------------------- /projects/ng-live-docs/src/source-code-viewer/source-code-viewer.component.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |
6 |
7 |
8 | 9 | 10 | 11 |
12 |
13 |
14 | 15 | 16 | 17 |
18 |
19 |
20 |
21 | -------------------------------------------------------------------------------- /projects/ng-live-docs/src/source-code-viewer/source-code-viewer.component.scss: -------------------------------------------------------------------------------- 1 | pre { 2 | height: 15rem; 3 | max-height: 15rem; 4 | border-radius: 3px; 5 | } 6 | -------------------------------------------------------------------------------- /projects/ng-live-docs/src/source-code-viewer/source-code-viewer.module.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2020 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | 6 | import { CommonModule } from '@angular/common'; 7 | import { NgModule } from '@angular/core'; 8 | import { ClarityModule } from '@clr/angular'; 9 | import { SourceCodeViewerComponent } from './source-code-viewer.component'; 10 | 11 | const declarations = [SourceCodeViewerComponent]; 12 | 13 | @NgModule({ 14 | imports: [ClarityModule, CommonModule], 15 | declarations: [...declarations], 16 | exports: [...declarations], 17 | }) 18 | export class SourceCodeViewerModule {} 19 | -------------------------------------------------------------------------------- /projects/ng-live-docs/src/test.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2020 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | 6 | // This file is required by karma.conf.js and loads recursively all the .spec and framework files 7 | // The two zone.js imports below must be loaded before anything else 8 | import 'zone.js'; 9 | import 'zone.js/testing'; 10 | import { getTestBed } from '@angular/core/testing'; 11 | import { BrowserDynamicTestingModule, platformBrowserDynamicTesting } from '@angular/platform-browser-dynamic/testing'; 12 | 13 | // First, initialize the Angular testing environment. 14 | getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting(), { 15 | teardown: { destroyAfterEach: false }, 16 | }); 17 | -------------------------------------------------------------------------------- /projects/ng-live-docs/tsconfig.lib.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../../out-tsc/lib", 5 | "target": "es2015", 6 | "declaration": true, 7 | "inlineSources": true, 8 | "types": [], 9 | "lib": ["dom", "es2018"] 10 | }, 11 | "angularCompilerOptions": { 12 | "annotateForClosureCompiler": true, 13 | "compilationMode": "partial", 14 | "skipTemplateCodegen": true, 15 | "strictMetadataEmit": true, 16 | "fullTemplateTypeCheck": true, 17 | "strictInjectionParameters": true, 18 | "enableResourceInlining": true 19 | }, 20 | "include": ["**/*.ts"], 21 | "exclude": ["src/test.ts", "**/*.spec.ts"] 22 | } 23 | -------------------------------------------------------------------------------- /projects/ng-live-docs/tsconfig.lib.prod.json: -------------------------------------------------------------------------------- 1 | /* To learn more about this file see: https://angular.io/config/tsconfig. */ 2 | { 3 | "extends": "./tsconfig.lib.json", 4 | "compilerOptions": { 5 | "declarationMap": false 6 | }, 7 | "angularCompilerOptions": { 8 | "compilationMode": "partial" 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /projects/ng-live-docs/tsconfig.schematics.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "baseUrl": ".", 4 | "lib": [ 5 | "es2018", 6 | "dom" 7 | ], 8 | "declaration": true, 9 | "module": "commonjs", 10 | "moduleResolution": "node", 11 | "noEmitOnError": true, 12 | "noFallthroughCasesInSwitch": true, 13 | "noImplicitAny": true, 14 | "noImplicitThis": true, 15 | "noUnusedParameters": true, 16 | "noUnusedLocals": true, 17 | "rootDir": "schematics", 18 | "outDir": "../../dist/ng-live-docs/schematics", 19 | "skipDefaultLibCheck": true, 20 | "skipLibCheck": true, 21 | "sourceMap": true, 22 | "strictNullChecks": true, 23 | "target": "es6", 24 | "types": [ 25 | "jasmine", 26 | "node" 27 | ] 28 | }, 29 | "include": [ 30 | "schematics/**/*" 31 | ], 32 | "exclude": [ 33 | "schematics/*/files/**/*" 34 | ] 35 | } 36 | -------------------------------------------------------------------------------- /projects/ng-live-docs/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../../out-tsc/spec", 5 | "types": [ 6 | "jasmine", 7 | "node" 8 | ] 9 | }, 10 | "files": [ 11 | "src/test.ts" 12 | ], 13 | "include": [ 14 | "**/*.spec.ts", 15 | "**/*.d.ts" 16 | ] 17 | } 18 | -------------------------------------------------------------------------------- /projects/route-analyzer/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../.eslintrc.json", 3 | "ignorePatterns": [ 4 | "!**/*" 5 | ], 6 | "overrides": [ 7 | { 8 | "files": [ 9 | "*.ts" 10 | ], 11 | "parserOptions": { 12 | "project": [ 13 | "projects/route-analyzer/tsconfig.lib.json", 14 | "projects/route-analyzer/tsconfig.spec.json" 15 | ], 16 | "createDefaultProgram": true 17 | } 18 | } 19 | ] 20 | } 21 | -------------------------------------------------------------------------------- /projects/route-analyzer/jest.config.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | export default { 3 | displayName: 'route-analyzer', 4 | preset: '../../jest.preset.js', 5 | globals: { 6 | 'ts-jest': { 7 | tsconfig: '/tsconfig.spec.json', 8 | }, 9 | }, 10 | transform: { 11 | '^.+\\.[tj]sx?$': 'ts-jest', 12 | }, 13 | moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'], 14 | coverageDirectory: '../../coverage/route-analyzer', 15 | }; 16 | -------------------------------------------------------------------------------- /projects/route-analyzer/karma.conf.js: -------------------------------------------------------------------------------- 1 | // Karma configuration file, see link for more information 2 | // https://karma-runner.github.io/1.0/config/configuration-file.html 3 | const generateKarmaConf = require('../../karma.conf.base'); 4 | 5 | module.exports = generateKarmaConf('route-analyzer'); 6 | -------------------------------------------------------------------------------- /projects/route-analyzer/ng-package.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "../../node_modules/ng-packagr/ng-package.schema.json", 3 | "dest": "../../dist/route-analyzer", 4 | "lib": { 5 | "entryFile": "src/public-api.ts" 6 | }, 7 | "allowedNonPeerDependencies": ["ts-evaluator", "yargs", "@angular-devkit/core"] 8 | } 9 | -------------------------------------------------------------------------------- /projects/route-analyzer/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@vcd/route-analyzer", 3 | "version": "0.0.13", 4 | "bin": "cli.js", 5 | "dependencies": { 6 | "ts-evaluator": "1.1.0", 7 | "yargs": "17.2.1", 8 | "@angular-devkit/core": "^15" 9 | }, 10 | "peerDependencies": { 11 | "typescript": "^4.x" 12 | }, 13 | "devDependencies": { 14 | "ts-node": "^10.8.2", 15 | "@types/node": "^12.11.1" 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /projects/route-analyzer/src/lib/constants.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2020 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | export const ANGULAR_CORE = { 6 | ANGULAR_ROUTER: '@angular/router', 7 | FOR_CHILD: 'forChild', 8 | FOR_ROOT: 'forRoot', 9 | ROUTER_MODULE: 'RouterModule', 10 | }; 11 | 12 | export const ROUTE_PROP = { 13 | PATH: 'path', 14 | REDIRECT_TO: 'redirectTo', 15 | CHILDREN: 'children', 16 | LOAD_CHILDREN: 'loadChildren', 17 | COMPONENT: 'component', 18 | DATA: 'data', 19 | }; 20 | -------------------------------------------------------------------------------- /projects/route-analyzer/src/lib/route-info.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2021 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | export interface RouteInfo { 6 | /** 7 | * Calls this to create a route 8 | * @param args replacement IDs for each replaceable part of the URL 9 | */ 10 | route(...args: string[]): string; 11 | 12 | /** 13 | * Regex that can be used to see if this route matches an existing URL 14 | */ 15 | regex: RegExp; 16 | 17 | /** 18 | * The tag name that will be rendered by Angular's router for this route. 19 | */ 20 | tagName?: string; 21 | } 22 | -------------------------------------------------------------------------------- /projects/route-analyzer/src/public-api.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2020 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | 6 | /* 7 | * Public API Surface of route-analyzer 8 | */ 9 | 10 | export * from './lib/app-route'; 11 | export * from './lib/route-info'; 12 | -------------------------------------------------------------------------------- /projects/route-analyzer/tsconfig.cli.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "moduleResolution": "node", 4 | "module": "commonjs", 5 | "esModuleInterop": true, 6 | "target": "es2016", 7 | "sourceMap": true, 8 | "outDir": "../../dist/route-analyzer", 9 | "removeComments": true, 10 | "noImplicitAny": true, 11 | "noImplicitThis": true, 12 | "skipLibCheck": true, 13 | "forceConsistentCasingInFileNames": true, 14 | "lib": ["dom", "es2018", "es2020.string"] 15 | }, 16 | "files": ["./src/cli.ts"] 17 | } 18 | -------------------------------------------------------------------------------- /projects/route-analyzer/tsconfig.lib.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../../out-tsc/lib", 5 | "declaration": true, 6 | "inlineSources": true, 7 | "types": [], 8 | "lib": ["dom", "es2018", "es2020.string"] 9 | }, 10 | "angularCompilerOptions": { 11 | "annotateForClosureCompiler": true, 12 | "compilationMode": "partial", 13 | "skipTemplateCodegen": true, 14 | "strictMetadataEmit": true, 15 | "fullTemplateTypeCheck": true, 16 | "strictInjectionParameters": true, 17 | "enableResourceInlining": true 18 | }, 19 | "exclude": ["**/*.spec.ts"] 20 | } 21 | -------------------------------------------------------------------------------- /projects/route-analyzer/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../../out-tsc/spec", 5 | "types": ["jasmine", "node"] 6 | }, 7 | "include": ["jest.config.ts", "**/*.spec.ts", "**/*.d.ts"] 8 | } 9 | -------------------------------------------------------------------------------- /projects/widget-object/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": ["../../.eslintrc.json"], 3 | "ignorePatterns": ["!**/*"], 4 | "overrides": [ 5 | { 6 | "files": ["*.ts", "*.tsx", "*.js", "*.jsx"], 7 | "rules": {} 8 | }, 9 | { 10 | "files": ["*.ts", "*.tsx"], 11 | "rules": {} 12 | }, 13 | { 14 | "files": ["*.js", "*.jsx"], 15 | "rules": {} 16 | } 17 | ] 18 | } 19 | -------------------------------------------------------------------------------- /projects/widget-object/CHANGELOG.MD: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | All notable changes to this project will be documented in this file. 4 | 5 | The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), 6 | and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). 7 | 8 | ## [0.0.2] 9 | * Restore behavior of SelectorUtils that was broken when splitting out WidgetObject 10 | -------------------------------------------------------------------------------- /projects/widget-object/README.md: -------------------------------------------------------------------------------- 1 | # widget-object 2 | 3 | This library was generated with [Nx](https://nx.dev). 4 | 5 | ## Building 6 | 7 | Run `nx build widget-object` to build the library. 8 | 9 | ## Running unit tests 10 | 11 | Run `nx test widget-object` to execute the unit tests via [Jest](https://jestjs.io). 12 | -------------------------------------------------------------------------------- /projects/widget-object/jest.config.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | export default { 3 | displayName: 'widget-object', 4 | preset: 'jest-preset-angular', 5 | setupFilesAfterEnv: ['/setup-jest.ts'], 6 | globalSetup: 'jest-preset-angular/global-setup', 7 | globals: { 8 | 'ts-jest': { 9 | tsconfig: '/tsconfig.spec.json', 10 | }, 11 | }, 12 | transform: { 13 | '^.+\\.(ts|js|html)$': 'jest-preset-angular', 14 | }, 15 | restoreMocks: true, 16 | moduleFileExtensions: ['ts', 'js', 'html'], 17 | coverageDirectory: '../../coverage/projects/widget-object', 18 | }; 19 | -------------------------------------------------------------------------------- /projects/widget-object/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@vcd/widget-object", 3 | "version": "0.0.2", 4 | "type": "commonjs" 5 | } 6 | -------------------------------------------------------------------------------- /projects/widget-object/setup-jest.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2021 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | import 'jest-preset-angular/setup-jest'; 6 | -------------------------------------------------------------------------------- /projects/widget-object/src/index.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2021 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | export * from './lib/'; 6 | -------------------------------------------------------------------------------- /projects/widget-object/src/lib/datagrid/vcd-datagrid.wo.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2020 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | 6 | import { BaseWidgetObject } from '../'; 7 | import { ClrDatagridWidgetObject } from './datagrid.wo'; 8 | 9 | /** 10 | * Widget Object for our VCD DataGrid 11 | */ 12 | export class VcdDatagridWidgetObject extends BaseWidgetObject { 13 | static tagName = `vcd-datagrid`; 14 | 15 | /** 16 | * Gives the header above the grid. 17 | */ 18 | getHeader = this.factory.css('h3'); 19 | 20 | /** 21 | * Gives the widget object for this `clr-datagrid`. 22 | */ 23 | get clrDatagrid(): ClrDatagridWidgetObject { 24 | return this.el.findWidget>(ClrDatagridWidgetObject); 25 | } 26 | 27 | /** 28 | * Unwraps the `vcd-datagrid` 29 | * 30 | * @deprecated Please use {@link VcdDatagridWidgetObject.self()}. 31 | */ 32 | get vcdDatagrid(): T { 33 | return this.self(); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /projects/widget-object/src/lib/index.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2020 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | 6 | export { CypressWidgetObjectFinder, FindCypressWidgetOptions } from './cypress/cypress-widget-finder'; 7 | export { AngularWidgetObjectFinder } from './angular/angular-widget-finder'; 8 | export { TestElement } from './angular/angular-widget-object-element'; 9 | export { FindElementOptions, BaseWidgetObject, FindableWidget, WidgetObjectElement } from './widget-object'; 10 | export { ClrDatagridWidgetObject } from './datagrid/datagrid.wo'; 11 | export { VcdDatagridWidgetObject } from './datagrid/vcd-datagrid.wo'; 12 | -------------------------------------------------------------------------------- /projects/widget-object/src/lib/selector-util.ts: -------------------------------------------------------------------------------- 1 | /*! 2 | * Copyright 2021 VMware, Inc. 3 | * SPDX-License-Identifier: BSD-2-Clause 4 | */ 5 | import { FindElementOptions } from './widget-object'; 6 | 7 | export class SelectorUtil { 8 | /** 9 | * Extracts the selector from the parameter passed. It is possible that selector is a `FindElementOptions` but 10 | * does not contain dataUiSelector or cssSelector. That would 11 | * 12 | * @return a CSS selector string to be used or undefined if no CSS selector can be found 13 | */ 14 | static extractSelector(selector: string | FindElementOptions): string | undefined { 15 | if (typeof selector === 'string') { 16 | return selector; 17 | } else { 18 | if (selector.dataUiSelector) { 19 | return `[data-ui="${selector.dataUiSelector}"]`; 20 | } 21 | 22 | return selector.cssSelector; 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /projects/widget-object/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "module": "commonjs", 5 | "forceConsistentCasingInFileNames": true, 6 | "strict": true, 7 | "noImplicitOverride": true, 8 | "noPropertyAccessFromIndexSignature": true, 9 | "noImplicitReturns": true, 10 | "noFallthroughCasesInSwitch": true 11 | }, 12 | "files": [], 13 | "include": [], 14 | "references": [ 15 | { 16 | "path": "./tsconfig.lib.json" 17 | }, 18 | { 19 | "path": "./tsconfig.spec.json" 20 | } 21 | ] 22 | } 23 | -------------------------------------------------------------------------------- /projects/widget-object/tsconfig.lib.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../../dist/out-tsc", 5 | "declaration": true, 6 | "types": ["node"] 7 | }, 8 | "include": ["src/**/*.ts"], 9 | "exclude": ["jest.config.ts", "src/**/*.spec.ts", "src/**/*.test.ts"] 10 | } 11 | -------------------------------------------------------------------------------- /projects/widget-object/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../../dist/out-tsc", 5 | "module": "commonjs", 6 | "types": ["jest", "node"] 7 | }, 8 | "include": ["jest.config.ts", "src/**/*.test.ts", "src/**/*.spec.ts", "src/**/*.d.ts"] 9 | } 10 | -------------------------------------------------------------------------------- /vcdh5cc.l10n: -------------------------------------------------------------------------------- 1 | # 2 | # This file lists all files that should be localized for a release. 3 | # These localizations are maintained internally by VMware. 4 | # 5 | 6 | 7 | # For VCD-CC, all files including *.properties are UTF-8 encoded. 8 | # Override default value ('java_escape') for java-resource (*.properties) files. 9 | Encodingrule: java-resource => utf_8_sig 10 | Encodingrule: text-file => utf_8_sig 11 | 12 | ################################# 13 | # HTML5 UI 14 | [projects/components/src/assets/resources] 15 | %M.properties 16 | --------------------------------------------------------------------------------