@backstage/plugin-catalog-react 1.1.3-next.2 → 1.1.4-next.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +37 -0
- package/alpha/package.json +1 -1
- package/dist/index.alpha.d.ts +5 -4
- package/dist/index.beta.d.ts +5 -4
- package/dist/index.d.ts +5 -4
- package/dist/index.esm.js +17 -9
- package/dist/index.esm.js.map +1 -1
- package/package.json +16 -16
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,42 @@
|
|
|
1
1
|
# @backstage/plugin-catalog-react
|
|
2
2
|
|
|
3
|
+
## 1.1.4-next.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 817f3196f6: Updated React Router dependencies to be peer dependencies.
|
|
8
|
+
- a6d551fad9: Properly handle free-text entity filtering in the case of empty tag arrays
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
- @backstage/core-components@0.11.1-next.1
|
|
11
|
+
- @backstage/core-plugin-api@1.0.6-next.1
|
|
12
|
+
- @backstage/plugin-permission-react@0.4.5-next.1
|
|
13
|
+
|
|
14
|
+
## 1.1.4-next.0
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- ef9ab322de: Minor API signatures cleanup
|
|
19
|
+
- Updated dependencies
|
|
20
|
+
- @backstage/core-plugin-api@1.0.6-next.0
|
|
21
|
+
- @backstage/core-components@0.11.1-next.0
|
|
22
|
+
- @backstage/catalog-client@1.0.5-next.0
|
|
23
|
+
- @backstage/integration@1.3.1-next.0
|
|
24
|
+
- @backstage/plugin-permission-common@0.6.4-next.0
|
|
25
|
+
- @backstage/plugin-permission-react@0.4.5-next.0
|
|
26
|
+
- @backstage/plugin-catalog-common@1.0.6-next.0
|
|
27
|
+
|
|
28
|
+
## 1.1.3
|
|
29
|
+
|
|
30
|
+
### Patch Changes
|
|
31
|
+
|
|
32
|
+
- 44e691a7f9: Modify description column to not use auto width.
|
|
33
|
+
- Updated dependencies
|
|
34
|
+
- @backstage/integration@1.3.0
|
|
35
|
+
- @backstage/core-components@0.11.0
|
|
36
|
+
- @backstage/core-plugin-api@1.0.5
|
|
37
|
+
- @backstage/plugin-catalog-common@1.0.5
|
|
38
|
+
- @backstage/plugin-permission-react@0.4.4
|
|
39
|
+
|
|
3
40
|
## 1.1.3-next.2
|
|
4
41
|
|
|
5
42
|
### Patch Changes
|
package/alpha/package.json
CHANGED
package/dist/index.alpha.d.ts
CHANGED
|
@@ -109,13 +109,13 @@ export declare const columnFactories: Readonly<{
|
|
|
109
109
|
createEntityRefColumn<T extends Entity>(options: {
|
|
110
110
|
defaultKind?: string;
|
|
111
111
|
}): TableColumn<T>;
|
|
112
|
-
createEntityRelationColumn<T_1 extends Entity>(
|
|
112
|
+
createEntityRelationColumn<T_1 extends Entity>(options: {
|
|
113
113
|
title: string;
|
|
114
114
|
relation: string;
|
|
115
|
-
defaultKind?: string
|
|
115
|
+
defaultKind?: string;
|
|
116
116
|
filter?: {
|
|
117
117
|
kind: string;
|
|
118
|
-
}
|
|
118
|
+
};
|
|
119
119
|
}): TableColumn<T_1>;
|
|
120
120
|
createOwnerColumn<T_2 extends Entity>(): TableColumn<T_2>;
|
|
121
121
|
createDomainColumn<T_3 extends Entity>(): TableColumn<T_3>;
|
|
@@ -387,7 +387,7 @@ export declare const EntityTable: {
|
|
|
387
387
|
createEntityRefColumn<T_1 extends Entity>(options: {
|
|
388
388
|
defaultKind?: string | undefined;
|
|
389
389
|
}): TableColumn<T_1>;
|
|
390
|
-
createEntityRelationColumn<T_2 extends Entity>(
|
|
390
|
+
createEntityRelationColumn<T_2 extends Entity>(options: {
|
|
391
391
|
title: string;
|
|
392
392
|
relation: string;
|
|
393
393
|
defaultKind?: string | undefined;
|
|
@@ -441,6 +441,7 @@ export declare class EntityTextFilter implements EntityFilter {
|
|
|
441
441
|
readonly value: string;
|
|
442
442
|
constructor(value: string);
|
|
443
443
|
filterEntity(entity: Entity): boolean;
|
|
444
|
+
private toUpperArray;
|
|
444
445
|
}
|
|
445
446
|
|
|
446
447
|
/**
|
package/dist/index.beta.d.ts
CHANGED
|
@@ -109,13 +109,13 @@ export declare const columnFactories: Readonly<{
|
|
|
109
109
|
createEntityRefColumn<T extends Entity>(options: {
|
|
110
110
|
defaultKind?: string;
|
|
111
111
|
}): TableColumn<T>;
|
|
112
|
-
createEntityRelationColumn<T_1 extends Entity>(
|
|
112
|
+
createEntityRelationColumn<T_1 extends Entity>(options: {
|
|
113
113
|
title: string;
|
|
114
114
|
relation: string;
|
|
115
|
-
defaultKind?: string
|
|
115
|
+
defaultKind?: string;
|
|
116
116
|
filter?: {
|
|
117
117
|
kind: string;
|
|
118
|
-
}
|
|
118
|
+
};
|
|
119
119
|
}): TableColumn<T_1>;
|
|
120
120
|
createOwnerColumn<T_2 extends Entity>(): TableColumn<T_2>;
|
|
121
121
|
createDomainColumn<T_3 extends Entity>(): TableColumn<T_3>;
|
|
@@ -387,7 +387,7 @@ export declare const EntityTable: {
|
|
|
387
387
|
createEntityRefColumn<T_1 extends Entity>(options: {
|
|
388
388
|
defaultKind?: string | undefined;
|
|
389
389
|
}): TableColumn<T_1>;
|
|
390
|
-
createEntityRelationColumn<T_2 extends Entity>(
|
|
390
|
+
createEntityRelationColumn<T_2 extends Entity>(options: {
|
|
391
391
|
title: string;
|
|
392
392
|
relation: string;
|
|
393
393
|
defaultKind?: string | undefined;
|
|
@@ -441,6 +441,7 @@ export declare class EntityTextFilter implements EntityFilter {
|
|
|
441
441
|
readonly value: string;
|
|
442
442
|
constructor(value: string);
|
|
443
443
|
filterEntity(entity: Entity): boolean;
|
|
444
|
+
private toUpperArray;
|
|
444
445
|
}
|
|
445
446
|
|
|
446
447
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -109,13 +109,13 @@ export declare const columnFactories: Readonly<{
|
|
|
109
109
|
createEntityRefColumn<T extends Entity>(options: {
|
|
110
110
|
defaultKind?: string;
|
|
111
111
|
}): TableColumn<T>;
|
|
112
|
-
createEntityRelationColumn<T_1 extends Entity>(
|
|
112
|
+
createEntityRelationColumn<T_1 extends Entity>(options: {
|
|
113
113
|
title: string;
|
|
114
114
|
relation: string;
|
|
115
|
-
defaultKind?: string
|
|
115
|
+
defaultKind?: string;
|
|
116
116
|
filter?: {
|
|
117
117
|
kind: string;
|
|
118
|
-
}
|
|
118
|
+
};
|
|
119
119
|
}): TableColumn<T_1>;
|
|
120
120
|
createOwnerColumn<T_2 extends Entity>(): TableColumn<T_2>;
|
|
121
121
|
createDomainColumn<T_3 extends Entity>(): TableColumn<T_3>;
|
|
@@ -387,7 +387,7 @@ export declare const EntityTable: {
|
|
|
387
387
|
createEntityRefColumn<T_1 extends Entity>(options: {
|
|
388
388
|
defaultKind?: string | undefined;
|
|
389
389
|
}): TableColumn<T_1>;
|
|
390
|
-
createEntityRelationColumn<T_2 extends Entity>(
|
|
390
|
+
createEntityRelationColumn<T_2 extends Entity>(options: {
|
|
391
391
|
title: string;
|
|
392
392
|
relation: string;
|
|
393
393
|
defaultKind?: string | undefined;
|
|
@@ -441,6 +441,7 @@ export declare class EntityTextFilter implements EntityFilter {
|
|
|
441
441
|
readonly value: string;
|
|
442
442
|
constructor(value: string);
|
|
443
443
|
filterEntity(entity: Entity): boolean;
|
|
444
|
+
private toUpperArray;
|
|
444
445
|
}
|
|
445
446
|
|
|
446
447
|
/**
|
package/dist/index.esm.js
CHANGED
|
@@ -474,9 +474,21 @@ class EntityTextFilter {
|
|
|
474
474
|
this.value = value;
|
|
475
475
|
}
|
|
476
476
|
filterEntity(entity) {
|
|
477
|
-
|
|
478
|
-
const
|
|
479
|
-
|
|
477
|
+
const words = this.toUpperArray(this.value.split(/\s/));
|
|
478
|
+
const exactMatch = this.toUpperArray([entity.metadata.tags]);
|
|
479
|
+
const partialMatch = this.toUpperArray([
|
|
480
|
+
entity.metadata.name,
|
|
481
|
+
entity.metadata.title
|
|
482
|
+
]);
|
|
483
|
+
for (const word of words) {
|
|
484
|
+
if (exactMatch.every((m) => m !== word) && partialMatch.every((m) => !m.includes(word))) {
|
|
485
|
+
return false;
|
|
486
|
+
}
|
|
487
|
+
}
|
|
488
|
+
return true;
|
|
489
|
+
}
|
|
490
|
+
toUpperArray(value) {
|
|
491
|
+
return value.flat().filter((m) => Boolean(m)).map((m) => m.toLocaleUpperCase("en-US"));
|
|
480
492
|
}
|
|
481
493
|
}
|
|
482
494
|
class EntityOwnerFilter {
|
|
@@ -1040,12 +1052,8 @@ const columnFactories = Object.freeze({
|
|
|
1040
1052
|
}
|
|
1041
1053
|
};
|
|
1042
1054
|
},
|
|
1043
|
-
createEntityRelationColumn({
|
|
1044
|
-
title,
|
|
1045
|
-
relation,
|
|
1046
|
-
defaultKind,
|
|
1047
|
-
filter: entityFilter
|
|
1048
|
-
}) {
|
|
1055
|
+
createEntityRelationColumn(options) {
|
|
1056
|
+
const { title, relation, defaultKind, filter: entityFilter } = options;
|
|
1049
1057
|
function getRelations(entity) {
|
|
1050
1058
|
return getEntityRelations(entity, relation, entityFilter);
|
|
1051
1059
|
}
|