Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed NG0912 selector collision warnings #859

Merged
merged 3 commits into from
Jul 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import {

@UntilDestroy()
@Component({
selector: 'cvc-org-selector-btn-group',
selector: 'cvc-org-selector-btn-group2',
templateUrl: './org-selector-btn-group.component.html',
styleUrls: ['./org-selector-btn-group.component.less'],
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export type EntityEdge = {
}

@Component({
selector: 'cvc-table-counts',
selector: 'cvc-table-counts2',
templateUrl: './table-counts.component.html',
styleUrls: ['./table-counts.component.less'],
changeDetection: ChangeDetectionStrategy.OnPush,
Expand Down
8 changes: 2 additions & 6 deletions client/src/app/forms2/mixins/base/base-field.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Component, OnInit } from '@angular/core'
import { Component, Injectable, OnInit } from '@angular/core'
import { BaseState } from '@app/forms2/states/base.state'
import { Maybe } from '@app/generated/civic.apollo'
import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy'
Expand All @@ -16,7 +16,7 @@ export function BaseFieldType<
V extends BaseFieldValue
>() {
@UntilDestroy()
@Component({ template: '' })
@Injectable()
class BaseFieldType extends FieldType<FC> {
state?: BaseState

Expand All @@ -31,10 +31,6 @@ export function BaseFieldType<
// STATE OUTPUT STREAM
stateValueChange$?: BehaviorSubject<Maybe<V>>

constructor() {
super() // call abstract FieldType's constructor
}

configureBaseField(): void {
if (!this.field?.options?.fieldChanges) {
console.error(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -521,8 +521,8 @@
</ng-container>
</nz-col>
<nz-col nzFlex="auto">
<cvc-table-counts
[cvcTableCountsConnection]="connection$"></cvc-table-counts>
<cvc-table-counts2
[cvcTableCountsConnection]="connection$"></cvc-table-counts2>
</nz-col>

<!-- card button row -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
}
// #cdk-overlay-0
// > div
// > cvc-enum-filter-menu
// > cvc-variant-enum-filter-menu
// > ul
// > li.ant-dropdown-menu-item.ng-star-inserted.ant-dropdown-menu-item-selected;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
import { ChangeDetectionStrategy, Component, EventEmitter, Input, Output } from '@angular/core'
import {
ChangeDetectionStrategy,
Component,
EventEmitter,
Input,
Output,
} from '@angular/core'
import { Maybe } from 'graphql/jsutils/Maybe'
import { NzTableFilterList } from 'ng-zorro-antd/table'
import { CvcFilterChange } from '../variant-manager.types'

@Component({
selector: 'cvc-enum-filter-menu',
selector: 'cvc-variant-enum-filter-menu',
templateUrl: './enum-filter-menu.component.html',
styleUrls: ['./enum-filter-menu.component.less'],
changeDetection: ChangeDetectionStrategy.OnPush,
Expand All @@ -13,5 +19,5 @@ export class EnumFilterMenuComponent {
@Input() cvcColumnKey!: string
@Input() cvcFilterOptions!: NzTableFilterList
@Input() cvcOption: Maybe<CvcFilterChange>
@Output() cvcOptionChange = new EventEmitter<CvcFilterChange>
@Output() cvcOptionChange = new EventEmitter<CvcFilterChange>()
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Component, EventEmitter, Input, Output } from '@angular/core'

@Component({
selector: 'cvc-table-filter-input',
selector: 'cvc-variant-table-filter-input',
templateUrl: './table-filter-input.component.html',
styleUrls: ['./table-filter-input.component.less'],
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,15 +123,15 @@
[nzAlign]="entityTagCol.align ?? 'left'"
[nzLeft]="entityTagCol.fixedLeft || false"
[nzRight]="entityTagCol.fixedRight || false">
<cvc-table-filter-input
<cvc-variant-table-filter-input
*ngIf="entityTagCol.filter as filter"
[cvcInputType]="entityTagCol.filter.inputType"
[cvcPlaceholder]="entityTagCol.filter.options[0].key"
[cvcModel]="entityTagCol.filter.options[0].value"
(cvcModelChange)="
filter.changes!.next({ key: entityTagCol.key, value: $event })
">
</cvc-table-filter-input>
</cvc-variant-table-filter-input>
</th>

<!-- ENUM TAG FILTER -->
Expand Down Expand Up @@ -170,15 +170,15 @@
nzTheme="fill"></span>
</nz-filter-trigger>
<nz-dropdown-menu #enumFilterMenu="nzDropdownMenu">
<cvc-enum-filter-menu
<cvc-variant-enum-filter-menu
[cvcColumnKey]="enumTagCol.key"
[cvcFilterOptions]="enumTagCol.filter.options"
[cvcOption]="enumTagCol.filter.changes | ngrxPush"
(cvcOptionChange)="
enumTagCol.filter.changes!.next($event);
enumTagFilterTrigger.nzVisible = false
">
</cvc-enum-filter-menu>
</cvc-variant-enum-filter-menu>
</nz-dropdown-menu>
</th>

Expand Down Expand Up @@ -206,7 +206,7 @@
<nz-dropdown-menu #textTagFilterMenu="nzDropdownMenu">
<div class="ant-table-filter-dropdown">
<div class="custom-input-dropdown">
<cvc-table-filter-input
<cvc-variant-table-filter-input
[cvcPlaceholder]="textTagCol.filter.options[0].key"
[cvcModel]="textTagCol.filter.options[0].value"
(cvcModelChange)="
Expand All @@ -215,7 +215,7 @@
value: $event
})
">
</cvc-table-filter-input>
</cvc-variant-table-filter-input>
</div>
</div>
</nz-dropdown-menu>
Expand All @@ -229,14 +229,14 @@
[nzAlign]="defaultCol.align ?? 'left'"
[nzLeft]="defaultCol.fixedLeft || false"
[nzRight]="defaultCol.fixedRight || false">
<cvc-table-filter-input
<cvc-variant-table-filter-input
*ngIf="defaultCol.filter as filter"
[cvcPlaceholder]="defaultCol.filter.options[0].key"
[cvcModel]="defaultCol.filter.options[0].value"
(cvcModelChange)="
filter.changes!.next({ key: defaultCol.key, value: $event })
">
</cvc-table-filter-input>
</cvc-variant-table-filter-input>
</th>
</ng-container>
</ng-container>
Expand Down Expand Up @@ -606,8 +606,8 @@
</ng-container>
</nz-col>
<nz-col nzFlex="auto">
<cvc-table-counts
[cvcTableCountsConnection]="connection$"></cvc-table-counts>
<cvc-table-counts2
[cvcTableCountsConnection]="connection$"></cvc-table-counts2>
</nz-col>

<!-- card button row -->
Expand Down
Loading