How to use @covalent/core - 10 common examples

To help you get started, we’ve selected a few @covalent/core examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github viadee / sonarQuest / sonarQuest-frontend / src / app / pages / gamemaster-page / components / gamemaster-quest / gamemaster-quest.component.ts View on Github external
{ name: 'participants', label: 'Spieler' },
    { name: 'edit', label: '' }
  ];

  swalOptionsConfirmDelete: {}
  swalOptionsDeleteSuccess: {}
  // Sort / Filter / Paginate variables
  filteredData: any[] = this.data;
  filteredTotal: number = this.data.length;
  searchTerm = '';
  fromRow = 1;
  currentPage = 1;
  pageSize = 5;
  sortBy = 'title';
  selectedRows: any[] = [];
  sortOrder: TdDataTableSortingOrder = TdDataTableSortingOrder.Ascending;

  constructor(
    private questService: QuestService,
    private taskService: TaskService,
    private worldService: WorldService,
    private _dataTableService: TdDataTableService,
    private translateService: TranslateService,
    private dialog: MatDialog) {
      this.initSweetAlert();
  }

  ngOnInit() {
    this.translateTable();
    this.init();
    this.worldService.onWorldChange().subscribe(() => this.init());
    this.initSweetAlert();
github viadee / sonarQuest / sonarQuest-frontend / src / app / pages / gamemaster-page / components / gamemaster-adventure / gamemaster-adventure.component.ts View on Github external
{name: 'xp', label: 'XP'},
    {name: 'story', label: 'Story'},
    {name: 'status', label: 'Status'},
    {name: 'edit', label: '', width: 70}
  ]

  // Sort / Filter / Paginate variables
  filteredData: any[] = this.data
  filteredTotal: number = this.data.length
  searchTerm = '';
  fromRow = 1;
  currentPage = 1;
  pageSize = 5;
  sortBy = 'title';
  selectedRows: any[] = [];
  sortOrder: TdDataTableSortingOrder = TdDataTableSortingOrder.Ascending;
  freeQuestsAvailable: boolean;

  constructor(private _dataTableService: TdDataTableService,
              private questService: QuestService,
              private worldService: WorldService,
              private translateService: TranslateService,
              private dialog: MatDialog,
              private taskService: TaskService,
              private adventureService: AdventureService) {
  }

  ngOnInit() {
    this.translateTable();
    this.init();
    this.worldService.onWorldChange().subscribe(() => this.init());
  }
github viadee / sonarQuest / sonarQuest-frontend / src / app / pages / gamemaster-page / components / gamemaster-marketplace / components / gamemaster-artefact-edit / gamemaster-artefact-edit.component.ts View on Github external
{name: 'name', label: 'Name', width: {min: 80}},
    {name: 'type', label: 'Type', width: {min: 40}},
    {name: 'value', label: 'Value', width: {min: 40}},
    {name: 'action', label: ''}
  ];

  // Sort / Filter / Paginate variables
  filteredSkills: Skill[];
  filteredTotal: number
  searchTerm = '';
  fromRow = 1;
  currentPage = 1;
  pageSize = 5;
  sortBy = 'name';
  selectedRows: any[] = [];
  sortOrder: TdDataTableSortingOrder = TdDataTableSortingOrder.Ascending;

  constructor(
    private dialogRef: MatDialogRef,
    private dialog: MatDialog,
    private artefactService: ArtefactService,
    private skillService: SkillService,
    @Inject(MAT_DIALOG_DATA) public artefact: Artefact,
    private _dataTableService: TdDataTableService  ) {
  }

  ngOnInit() {
    this.skillService.getSkillsForArtefact(this.artefact).then(skills => {
      this.skills = skills;
      this.filter();
    });
    this.name = this.artefact.name;
github viadee / sonarQuest / sonarQuest-frontend / src / app / pages / gamemaster-page / components / gamemaster-marketplace / components / gamemaster-artefact-create / gamemaster-artefact-create.component.ts View on Github external
{name: 'name', label: 'Name', width: {min: 80}},
    {name: 'type', label: 'Type', width: {min: 40}},
    {name: 'value', label: 'Value', width: {min: 40}},
    {name: 'action', label: ''}
  ];

  // Sort / Filter / Paginate variables
  filteredSkills: Skill[];
  filteredTotal: number
  searchTerm = '';
  fromRow = 1;
  currentPage = 1;
  pageSize = 5;
  sortBy = 'name';
  selectedRows: any[] = [];
  sortOrder: TdDataTableSortingOrder = TdDataTableSortingOrder.Ascending;

  constructor(
    private dialogRef: MatDialogRef,
    private artefactService: ArtefactService,
    private dialog: MatDialog,
    private skillService: SkillService,
    private _dataTableService: TdDataTableService) {
  }

  ngOnInit() {
    this.filter()
  }

  removeSkill(skill: Skill) {
    if (typeof skill.id !== 'undefined') {
      this.skillService.deleteSkill(skill).then();
github viadee / sonarQuest / sonarQuest-frontend / src / app / pages / gamemaster-page / components / gamemaster-task / components / gamemaster-special-task / gamemaster-special-task.component.ts View on Github external
{name: 'message', label: 'Mission'},
    {name: 'quest.title', label: 'Quest'},
    {name: 'status', label: 'Status'},
    {name: 'edit', label: ''}
  ];

  // Sort / Filter / Paginate variables
  filteredData: any[] = this.data;
  filteredTotal: number = this.data.length;
  searchTerm = '';
  fromRow = 1;
  currentPage = 1;
  pageSize = 5;
  sortBy = 'id';
  selectedRows: any[] = [];
  sortOrder: TdDataTableSortingOrder = TdDataTableSortingOrder.Ascending;

  constructor(
    private specialTaskService: SpecialTaskService,
    private questService: QuestService,
    private adventureService: AdventureService,
    private _dataTableService: TdDataTableService,
    private worldService: WorldService,
    private translateService: TranslateService,
    private dialog: MatDialog) {
  }

  ngOnInit() {
    this.translateTable();
    this.worldService.currentWorld$.subscribe(world => {
      this.currentWorld = world
      this.loadTasks();
github viadee / sonarQuest / sonarQuest-frontend / src / app / pages / admin-page / components / admin-world / admin-world.component.ts View on Github external
{ name: 'project', label: 'Project', width: { min: 300 } },
    { name: 'active', label: 'Active' },
    { name: 'usequestcards', label: 'Questcards' },
    { name: 'edit', label: '' }
  ];

  // Sort / Filter / Paginate variables
  filteredData: any[];
  filteredTotal: number;
  searchTerm = '';
  fromRow = 1;
  currentPage = 1;
  pageSize = 5;
  sortBy = 'id';
  selectedRows: any[];
  sortOrder: TdDataTableSortingOrder = TdDataTableSortingOrder.Ascending;

  constructor(private worldService: WorldService,
    private _dataTableService: TdDataTableService,
    private translateService: TranslateService,
    private dialog: MatDialog,
    private loadingService: LoadingService,
    private userService: UserService) {
  }

  ngOnInit() {
    this.translateTable();

    this.userService.user$.subscribe(user => {
      this.user = user
      if (this.user.role.name.toLocaleUpperCase() === 'ADMIN') {
        this.loadWorlds();
github viadee / sonarQuest / sonarQuest-frontend / src / app / pages / gamemaster-page / components / gamemaster-task / components / gamemaster-standard-task / gamemaster-standard-task.component.ts View on Github external
{name: 'severity', label: 'Severity'},
    {name: 'quest.title', label: 'Quest'},
    {name: 'status', label: 'Status'},
    {name: 'edit', label: ''}
  ];

  // Sort / Filter / Paginate variables
  filteredData: any[] = this.data;
  filteredTotal: number = this.data.length;
  searchTerm = '';
  fromRow = 1;
  currentPage = 1;
  pageSize = 5;
  sortBy = 'id';
  selectedRows: any[] = [];
  sortOrder: TdDataTableSortingOrder = TdDataTableSortingOrder.Ascending;

  currentWorld: World;

  constructor(
    private standardTaskService: StandardTaskService,
    private taskService: TaskService,
    private questService: QuestService,
    private adventureService: AdventureService,
    private _dataTableService: TdDataTableService,
    private worldService: WorldService,
    private translateService: TranslateService,
    private dialog: MatDialog,
    private loadingService: LoadingService) {
  }

  ngOnInit() {
github Teradata / kylo / ui / ui-app / src / main / resources / static / js / main / index-ng2.component.ts View on Github external
ngOnInit() {

        // Create state loading bar
        this.loadingService.create({
            name: STATE_LOADER,
            mode: LoadingMode.Indeterminate,
            type: LoadingType.Linear,
            color: "accent"
        });

        // Listen for state transitions
        this.transitions.onCreate({}, this.onTransitionStart.bind(this));
        this.transitions.onSuccess({}, this.onTransitionSuccess.bind(this));
        this.transitions.onError({}, this.onTransitionError.bind(this));

        // Fetch the allowed actions
        this.accessControlService.getUserAllowedActions()
            .then((actionSet: any)=> {
                this.allowSearch = this.accessControlService
                                        .hasAction(AccessConstants.GLOBAL_SEARCH_ACCESS,
                                                    actionSet.actions);
            });
github Teradata / kylo / ui / ui-app / src / main / resources / static / js / main / index-ng2.component.ts View on Github external
ngOnInit() {

        // Create state loading bar
        this.loadingService.create({
            name: STATE_LOADER,
            mode: LoadingMode.Indeterminate,
            type: LoadingType.Linear,
            color: "accent"
        });

        // Listen for state transitions
        this.transitions.onCreate({}, this.onTransitionStart.bind(this));
        this.transitions.onSuccess({}, this.onTransitionSuccess.bind(this));
        this.transitions.onError({}, this.onTransitionError.bind(this));

        // Fetch the allowed actions
        this.accessControlService.getUserAllowedActions()
            .then((actionSet: any)=> {
                this.allowSearch = this.accessControlService
                                        .hasAction(AccessConstants.GLOBAL_SEARCH_ACCESS,
                                                    actionSet.actions);
            });
github apache / nifi-registry / nifi-registry-web-ui / src / main / webapp / components / administration / users / dialogs / add-user-to-groups / nf-registry-add-user-to-groups.spec.js View on Github external
beforeEach(function () {
        nfRegistryService = new NfRegistryService();
        // setup the nfRegistryService
        nfRegistryService.user = {identifier: 3, identity: 'User 3', userGroups: []};
        nfRegistryService.groups = [{identifier: 1, identity: 'Group 1', configurable: true, checked: true, users: []}];

        nfRegistryApi = new NfRegistryApi();
        snackBarService = new fdsSnackBarsModule.FdsSnackBarService();
        dataTableService = new covalentCore.TdDataTableService();
        comp = new NfRegistryAddUserToGroups(nfRegistryApi, dataTableService, nfRegistryService, {
            close: function () {
            }
        }, snackBarService, {user: nfRegistryService.user});

        // Spy
        spyOn(nfRegistryApi, 'getUserGroup').and.callFake(function () {
        }).and.returnValue(rxjs.Observable.of({identifier: 1, identity: 'Group 1'}));
        spyOn(nfRegistryApi, 'updateUserGroup').and.callFake(function () {
        }).and.returnValue(rxjs.Observable.of({identifier: 1, identity: 'Group 1'}));
        spyOn(comp.dialogRef, 'close');
        spyOn(comp.snackBarService, 'openCoaster');
        spyOn(comp, 'filterGroups').and.callThrough();

        // initialize the component
        comp.ngOnInit();