Compare commits

..

1 Commits

Author SHA1 Message Date
shamoon
3e3ff39b0c Enhancement: allow tags list selection without auto parent/child 2025-11-04 08:28:14 -08:00
4 changed files with 20 additions and 16 deletions

View File

@@ -53,7 +53,7 @@
"@angular/cli": "~20.3.3", "@angular/cli": "~20.3.3",
"@angular/compiler-cli": "~20.3.2", "@angular/compiler-cli": "~20.3.2",
"@codecov/webpack-plugin": "^1.9.1", "@codecov/webpack-plugin": "^1.9.1",
"@playwright/test": "^1.56.1", "@playwright/test": "^1.55.1",
"@types/jest": "^30.0.0", "@types/jest": "^30.0.0",
"@types/node": "^24.6.1", "@types/node": "^24.6.1",
"@typescript-eslint/eslint-plugin": "^8.45.0", "@typescript-eslint/eslint-plugin": "^8.45.0",

26
src-ui/pnpm-lock.yaml generated
View File

@@ -130,8 +130,8 @@ importers:
specifier: ^1.9.1 specifier: ^1.9.1
version: 1.9.1(webpack@5.102.0) version: 1.9.1(webpack@5.102.0)
'@playwright/test': '@playwright/test':
specifier: ^1.56.1 specifier: ^1.55.1
version: 1.56.1 version: 1.55.1
'@types/jest': '@types/jest':
specifier: ^30.0.0 specifier: ^30.0.0
version: 30.0.0 version: 30.0.0
@@ -2571,8 +2571,8 @@ packages:
resolution: {integrity: sha512-QNqXyfVS2wm9hweSYD2O7F0G06uurj9kZ96TRQE5Y9hU7+tgdZwIkbAKc5Ocy1HxEY2kuDQa6cQ1WRs/O5LFKA==} resolution: {integrity: sha512-QNqXyfVS2wm9hweSYD2O7F0G06uurj9kZ96TRQE5Y9hU7+tgdZwIkbAKc5Ocy1HxEY2kuDQa6cQ1WRs/O5LFKA==}
engines: {node: ^12.20.0 || ^14.18.0 || >=16.0.0} engines: {node: ^12.20.0 || ^14.18.0 || >=16.0.0}
'@playwright/test@1.56.1': '@playwright/test@1.55.1':
resolution: {integrity: sha512-vSMYtL/zOcFpvJCW71Q/OEGQb7KYBPAdKh35WNSkaZA75JlAO8ED8UN6GUNTm3drWomcbcqRPFqQbLae8yBTdg==} resolution: {integrity: sha512-IVAh/nOJaw6W9g+RJVlIQJ6gSiER+ae6mKQ5CX1bERzQgbC1VSeBlwdvczT7pxb0GWiyrxH4TGKbMfDb4Sq/ig==}
engines: {node: '>=18'} engines: {node: '>=18'}
hasBin: true hasBin: true
@@ -5711,13 +5711,13 @@ packages:
resolution: {integrity: sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==} resolution: {integrity: sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==}
engines: {node: '>=8'} engines: {node: '>=8'}
playwright-core@1.56.1: playwright-core@1.55.1:
resolution: {integrity: sha512-hutraynyn31F+Bifme+Ps9Vq59hKuUCz7H1kDOcBs+2oGguKkWTU50bBWrtz34OUWmIwpBTWDxaRPXrIXkgvmQ==} resolution: {integrity: sha512-Z6Mh9mkwX+zxSlHqdr5AOcJnfp+xUWLCt9uKV18fhzA8eyxUd8NUWzAjxUh55RZKSYwDGX0cfaySdhZJGMoJ+w==}
engines: {node: '>=18'} engines: {node: '>=18'}
hasBin: true hasBin: true
playwright@1.56.1: playwright@1.55.1:
resolution: {integrity: sha512-aFi5B0WovBHTEvpM3DzXTUaeN6eN0qWnTkKx4NQaH4Wvcmc153PdaY2UBdSYKaGYw+UyWXSVyxDUg5DoPEttjw==} resolution: {integrity: sha512-cJW4Xd/G3v5ovXtJJ52MAOclqeac9S/aGGgRzLabuF8TnIb6xHvMzKIa6JmrRzUkeXJgfL1MhukP0NK6l39h3A==}
engines: {node: '>=18'} engines: {node: '>=18'}
hasBin: true hasBin: true
@@ -9632,9 +9632,9 @@ snapshots:
'@pkgr/core@0.2.9': {} '@pkgr/core@0.2.9': {}
'@playwright/test@1.56.1': '@playwright/test@1.55.1':
dependencies: dependencies:
playwright: 1.56.1 playwright: 1.55.1
'@popperjs/core@2.11.8': {} '@popperjs/core@2.11.8': {}
@@ -13208,11 +13208,11 @@ snapshots:
dependencies: dependencies:
find-up: 4.1.0 find-up: 4.1.0
playwright-core@1.56.1: {} playwright-core@1.55.1: {}
playwright@1.56.1: playwright@1.55.1:
dependencies: dependencies:
playwright-core: 1.56.1 playwright-core: 1.55.1
optionalDependencies: optionalDependencies:
fsevents: 2.3.2 fsevents: 2.3.2

View File

@@ -210,6 +210,7 @@
<pngx-input-tags <pngx-input-tags
[allowCreate]="false" [allowCreate]="false"
[title]="null" [title]="null"
[autoHeirarchy]="false"
formControlName="values" formControlName="values"
></pngx-input-tags> ></pngx-input-tags>
} @else if ( } @else if (

View File

@@ -103,6 +103,9 @@ export class TagsComponent implements OnInit, ControlValueAccessor {
@Input() @Input()
multiple: boolean = true multiple: boolean = true
@Input()
autoHeirarchy: boolean = true
@Output() @Output()
filterDocuments = new EventEmitter<Tag[]>() filterDocuments = new EventEmitter<Tag[]>()
@@ -134,7 +137,7 @@ export class TagsComponent implements OnInit, ControlValueAccessor {
oldValue.splice(index, 1) oldValue.splice(index, 1)
// remove children // remove children
oldValue = this.removeChildren(oldValue, tag) if (this.autoHeirarchy) oldValue = this.removeChildren(oldValue, tag)
this.value = [...oldValue] this.value = [...oldValue]
this.onChange(this.value) this.onChange(this.value)
@@ -153,7 +156,7 @@ export class TagsComponent implements OnInit, ControlValueAccessor {
} }
public onAdd(tag: Tag) { public onAdd(tag: Tag) {
if (tag.parent) { if (this.autoHeirarchy && tag.parent) {
// add all parents recursively // add all parents recursively
const parent = this.getTag(tag.parent) const parent = this.getTag(tag.parent)
this.value = [...this.value, parent.id] this.value = [...this.value, parent.id]