@blocklet/labels 1.6.12 → 1.6.14
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/dist/index.es.js +2 -0
- package/dist/index.umd.js +2 -0
- package/dist/label2/labels-context.d.ts +1 -0
- package/package.json +3 -3
package/dist/index.es.js
CHANGED
|
@@ -503,6 +503,7 @@ const useLabels = ({ loading, data, createLabel: createLabelAPI }) => {
|
|
|
503
503
|
},
|
|
504
504
|
[nodesKeyById]
|
|
505
505
|
);
|
|
506
|
+
const labelExists = useCallback((id) => !!nodesKeyById[id], [nodesKeyById]);
|
|
506
507
|
const getLabelName = (id) => {
|
|
507
508
|
var _a;
|
|
508
509
|
return (_a = nodesKeyById[id]) == null ? void 0 : _a.data.getName(locale);
|
|
@@ -573,6 +574,7 @@ const useLabels = ({ loading, data, createLabel: createLabelAPI }) => {
|
|
|
573
574
|
popularLabels,
|
|
574
575
|
counts,
|
|
575
576
|
getLabelsByIds,
|
|
577
|
+
labelExists,
|
|
576
578
|
getLabelName,
|
|
577
579
|
getRelatedLabels,
|
|
578
580
|
getRecommended,
|
package/dist/index.umd.js
CHANGED
|
@@ -491,6 +491,7 @@ var __publicField = (obj, key, value) => {
|
|
|
491
491
|
},
|
|
492
492
|
[nodesKeyById]
|
|
493
493
|
);
|
|
494
|
+
const labelExists = react.useCallback((id) => !!nodesKeyById[id], [nodesKeyById]);
|
|
494
495
|
const getLabelName = (id) => {
|
|
495
496
|
var _a;
|
|
496
497
|
return (_a = nodesKeyById[id]) == null ? void 0 : _a.data.getName(locale);
|
|
@@ -561,6 +562,7 @@ var __publicField = (obj, key, value) => {
|
|
|
561
562
|
popularLabels,
|
|
562
563
|
counts,
|
|
563
564
|
getLabelsByIds,
|
|
565
|
+
labelExists,
|
|
564
566
|
getLabelName,
|
|
565
567
|
getRelatedLabels,
|
|
566
568
|
getRecommended,
|
|
@@ -10,6 +10,7 @@ export declare const LabelsContainer: import("unstated-next").Container<{
|
|
|
10
10
|
popularLabels: LabelTreeNode[];
|
|
11
11
|
counts: Record<string, number>;
|
|
12
12
|
getLabelsByIds: (ids: string[]) => LabelTreeNode[];
|
|
13
|
+
labelExists: (id: string) => true;
|
|
13
14
|
getLabelName: (id: string) => string;
|
|
14
15
|
getRelatedLabels: (id: string) => import("./tree").TreeNode<{
|
|
15
16
|
id: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blocklet/labels",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.14",
|
|
4
4
|
"files": [
|
|
5
5
|
"dist"
|
|
6
6
|
],
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"access": "public"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@blocklet/translation-input": "1.6.
|
|
31
|
+
"@blocklet/translation-input": "1.6.14",
|
|
32
32
|
"@emotion/css": "^11.10.5",
|
|
33
33
|
"@emotion/react": "^11.10.5",
|
|
34
34
|
"@emotion/styled": "^11.10.5",
|
|
@@ -80,5 +80,5 @@
|
|
|
80
80
|
"resolutions": {
|
|
81
81
|
"react": "^18.2.0"
|
|
82
82
|
},
|
|
83
|
-
"gitHead": "
|
|
83
|
+
"gitHead": "2ad0018051c402959ca769c60fc2826f4f892086"
|
|
84
84
|
}
|