@blocklet/labels 2.0.172 → 2.0.174
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/components/label/context.d.ts +1 -1
- package/dist/components/label/label-picker.d.ts +1 -1
- package/dist/components/label/label-tree.d.ts +1 -1
- package/dist/components/label/labels.d.ts +1 -1
- package/dist/index.es.js +3 -3
- package/dist/index.umd.js +3 -3
- package/dist/label2/labels-context.d.ts +6 -6
- package/dist/label2/labels-input.d.ts +1 -1
- package/dist/label2/labels2.d.ts +1 -1
- package/package.json +40 -47
package/dist/index.es.js
CHANGED
|
@@ -18,8 +18,8 @@ import { arrayToTree } from "performant-array-to-tree";
|
|
|
18
18
|
import { SessionContext } from "@arcblock/did-connect/lib/Session";
|
|
19
19
|
import chroma from "chroma-js";
|
|
20
20
|
import CloseOutlineIcon from "@mui/icons-material/Close";
|
|
21
|
-
const materialSymbolsLabelRounded = (props) => /* @__PURE__ */ jsx("svg", { viewBox: "0 0 24 24", width: "1.2em", height: "1.2em", ...props, children: /* @__PURE__ */ jsx("path", { fill: "currentColor", d: "
|
|
22
|
-
const materialSymbolsCheckSmall = (props) => /* @__PURE__ */ jsx("svg", { viewBox: "0 0 24 24", width: "1.2em", height: "1.2em", ...props, children: /* @__PURE__ */ jsx("path", { fill: "currentColor", d: "m10 16.4l-4-4L7.4 11l2.6 2.6L16.6 7L18 8.
|
|
21
|
+
const materialSymbolsLabelRounded = (props) => /* @__PURE__ */ jsx("svg", { viewBox: "0 0 24 24", width: "1.2em", height: "1.2em", ...props, children: /* @__PURE__ */ jsx("path", { fill: "currentColor", d: "M4 20q-.825 0-1.412-.587T2 18V6q0-.825.588-1.412T4 4h11q.475 0 .9.213t.7.587l4.5 6q.4.525.4 1.2t-.4 1.2l-4.5 6q-.275.375-.7.588T15 20z" }) });
|
|
22
|
+
const materialSymbolsCheckSmall = (props) => /* @__PURE__ */ jsx("svg", { viewBox: "0 0 24 24", width: "1.2em", height: "1.2em", ...props, children: /* @__PURE__ */ jsx("path", { fill: "currentColor", d: "m10 16.4l-4-4L7.4 11l2.6 2.6L16.6 7L18 8.4z" }) });
|
|
23
23
|
const LabelTreeContext = createContext({});
|
|
24
24
|
function LabelTreeProvider({
|
|
25
25
|
selectable = false,
|
|
@@ -755,7 +755,7 @@ function Labels({ labels, editable, onChange, sx, renderLabel }) {
|
|
|
755
755
|
editable && isEmpty && /* @__PURE__ */ jsx(Button, { color: "inherit", variant: "outlined", startIcon: /* @__PURE__ */ jsx(LabelOutlined, {}), onClick: () => setEditing(true), children: "Edit labels" })
|
|
756
756
|
] });
|
|
757
757
|
}
|
|
758
|
-
const mdiTagPlusOutline = (props) => /* @__PURE__ */ jsx("svg", { viewBox: "0 0 24 24", width: "1.2em", height: "1.2em", ...props, children: /* @__PURE__ */ jsx("path", { fill: "currentColor", d: "M6.5 5A1.5 1.5 0 1 0 8 6.5A1.5 1.5 0 0 0 6.5 5m0 0A1.5 1.5 0 1 0 8 6.5A1.5 1.5 0 0 0 6.5 5m14.91 6.58l-9-9A2 2 0 0 0 11 2H4a2 2 0 0 0-2 2v7a2 2 0 0 0 .59 1.42l.41.4a5.
|
|
758
|
+
const mdiTagPlusOutline = (props) => /* @__PURE__ */ jsx("svg", { viewBox: "0 0 24 24", width: "1.2em", height: "1.2em", ...props, children: /* @__PURE__ */ jsx("path", { fill: "currentColor", d: "M6.5 5A1.5 1.5 0 1 0 8 6.5A1.5 1.5 0 0 0 6.5 5m0 0A1.5 1.5 0 1 0 8 6.5A1.5 1.5 0 0 0 6.5 5m14.91 6.58l-9-9A2 2 0 0 0 11 2H4a2 2 0 0 0-2 2v7a2 2 0 0 0 .59 1.42l.41.4a5.6 5.6 0 0 1 2.08-.74L4 11V4h7l9 9l-7 7l-1.08-1.08a5.6 5.6 0 0 1-.74 2.08l.41.41A2 2 0 0 0 13 22a2 2 0 0 0 1.41-.59l7-7A2 2 0 0 0 22 13a2 2 0 0 0-.59-1.42M6.5 5A1.5 1.5 0 1 0 8 6.5A1.5 1.5 0 0 0 6.5 5M10 19H7v3H5v-3H2v-2h3v-3h2v3h3Z" }) });
|
|
759
759
|
const useSessionContext = () => {
|
|
760
760
|
var _a, _b;
|
|
761
761
|
const ctx = useContext(SessionContext) || {};
|
package/dist/index.umd.js
CHANGED
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
6
6
|
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
7
7
|
|
|
8
|
-
const materialSymbolsLabelRounded = (props) => /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 24 24", width: "1.2em", height: "1.2em", ...props, children: /* @__PURE__ */ jsxRuntime.jsx("path", { fill: "currentColor", d: "
|
|
9
|
-
const materialSymbolsCheckSmall = (props) => /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 24 24", width: "1.2em", height: "1.2em", ...props, children: /* @__PURE__ */ jsxRuntime.jsx("path", { fill: "currentColor", d: "m10 16.4l-4-4L7.4 11l2.6 2.6L16.6 7L18 8.
|
|
8
|
+
const materialSymbolsLabelRounded = (props) => /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 24 24", width: "1.2em", height: "1.2em", ...props, children: /* @__PURE__ */ jsxRuntime.jsx("path", { fill: "currentColor", d: "M4 20q-.825 0-1.412-.587T2 18V6q0-.825.588-1.412T4 4h11q.475 0 .9.213t.7.587l4.5 6q.4.525.4 1.2t-.4 1.2l-4.5 6q-.275.375-.7.588T15 20z" }) });
|
|
9
|
+
const materialSymbolsCheckSmall = (props) => /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 24 24", width: "1.2em", height: "1.2em", ...props, children: /* @__PURE__ */ jsxRuntime.jsx("path", { fill: "currentColor", d: "m10 16.4l-4-4L7.4 11l2.6 2.6L16.6 7L18 8.4z" }) });
|
|
10
10
|
const LabelTreeContext = react.createContext({});
|
|
11
11
|
function LabelTreeProvider({
|
|
12
12
|
selectable = false,
|
|
@@ -742,7 +742,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
742
742
|
editable && isEmpty && /* @__PURE__ */ jsxRuntime.jsx(material.Button, { color: "inherit", variant: "outlined", startIcon: /* @__PURE__ */ jsxRuntime.jsx(iconsMaterial.LabelOutlined, {}), onClick: () => setEditing(true), children: "Edit labels" })
|
|
743
743
|
] });
|
|
744
744
|
}
|
|
745
|
-
const mdiTagPlusOutline = (props) => /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 24 24", width: "1.2em", height: "1.2em", ...props, children: /* @__PURE__ */ jsxRuntime.jsx("path", { fill: "currentColor", d: "M6.5 5A1.5 1.5 0 1 0 8 6.5A1.5 1.5 0 0 0 6.5 5m0 0A1.5 1.5 0 1 0 8 6.5A1.5 1.5 0 0 0 6.5 5m14.91 6.58l-9-9A2 2 0 0 0 11 2H4a2 2 0 0 0-2 2v7a2 2 0 0 0 .59 1.42l.41.4a5.
|
|
745
|
+
const mdiTagPlusOutline = (props) => /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 24 24", width: "1.2em", height: "1.2em", ...props, children: /* @__PURE__ */ jsxRuntime.jsx("path", { fill: "currentColor", d: "M6.5 5A1.5 1.5 0 1 0 8 6.5A1.5 1.5 0 0 0 6.5 5m0 0A1.5 1.5 0 1 0 8 6.5A1.5 1.5 0 0 0 6.5 5m14.91 6.58l-9-9A2 2 0 0 0 11 2H4a2 2 0 0 0-2 2v7a2 2 0 0 0 .59 1.42l.41.4a5.6 5.6 0 0 1 2.08-.74L4 11V4h7l9 9l-7 7l-1.08-1.08a5.6 5.6 0 0 1-.74 2.08l.41.41A2 2 0 0 0 13 22a2 2 0 0 0 1.41-.59l7-7A2 2 0 0 0 22 13a2 2 0 0 0-.59-1.42M6.5 5A1.5 1.5 0 1 0 8 6.5A1.5 1.5 0 0 0 6.5 5M10 19H7v3H5v-3H2v-2h3v-3h2v3h3Z" }) });
|
|
746
746
|
const useSessionContext = () => {
|
|
747
747
|
var _a, _b;
|
|
748
748
|
const ctx = react.useContext(Session.SessionContext) || {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { CreateLabel, LabelPayload, LabelsResponse } from '../types';
|
|
2
1
|
import { LabelTreeNode } from './tree';
|
|
2
|
+
import { CreateLabel, LabelPayload, LabelsResponse } from '../types';
|
|
3
3
|
|
|
4
4
|
interface InitialState {
|
|
5
5
|
loading: boolean;
|
|
@@ -13,11 +13,11 @@ export declare const LabelsContainer: import('unstated-next').Container<{
|
|
|
13
13
|
getLabelsByIds: (ids: string[]) => LabelTreeNode[];
|
|
14
14
|
labelExists: (id: string) => true;
|
|
15
15
|
getLabelName: (id: string) => string;
|
|
16
|
-
getRelatedLabels: (id: string) => import(
|
|
16
|
+
getRelatedLabels: (id: string) => import('./tree').TreeNode<{
|
|
17
17
|
id: string;
|
|
18
18
|
name: string;
|
|
19
19
|
icon?: string | undefined;
|
|
20
|
-
type?: import(
|
|
20
|
+
type?: import('../types').LabelType;
|
|
21
21
|
color: string;
|
|
22
22
|
passports: string[];
|
|
23
23
|
translation?: {
|
|
@@ -28,11 +28,11 @@ export declare const LabelsContainer: import('unstated-next').Container<{
|
|
|
28
28
|
}): any;
|
|
29
29
|
getName(locale: string): string;
|
|
30
30
|
}>[];
|
|
31
|
-
getRecommended: (id?: string) => import(
|
|
31
|
+
getRecommended: (id?: string) => import('./tree').TreeNode<{
|
|
32
32
|
id: string;
|
|
33
33
|
name: string;
|
|
34
34
|
icon?: string | undefined;
|
|
35
|
-
type?: import(
|
|
35
|
+
type?: import('../types').LabelType;
|
|
36
36
|
color: string;
|
|
37
37
|
passports: string[];
|
|
38
38
|
translation?: {
|
|
@@ -47,7 +47,7 @@ export declare const LabelsContainer: import('unstated-next').Container<{
|
|
|
47
47
|
id: string;
|
|
48
48
|
name: string;
|
|
49
49
|
icon?: string | undefined;
|
|
50
|
-
type?: import(
|
|
50
|
+
type?: import('../types').LabelType;
|
|
51
51
|
color: string;
|
|
52
52
|
passports: string[];
|
|
53
53
|
translation?: {
|
package/dist/label2/labels2.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blocklet/labels",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.174",
|
|
4
4
|
"files": [
|
|
5
5
|
"dist"
|
|
6
6
|
],
|
|
@@ -14,32 +14,22 @@
|
|
|
14
14
|
},
|
|
15
15
|
"./src/*": "./src/*"
|
|
16
16
|
},
|
|
17
|
-
"scripts": {
|
|
18
|
-
"dev": "npm run storybook",
|
|
19
|
-
"build": "tsc && vite build",
|
|
20
|
-
"build:watch": "vite build --watch",
|
|
21
|
-
"preview": "vite preview",
|
|
22
|
-
"storybook": "start-storybook -p 6007",
|
|
23
|
-
"build-storybook": "build-storybook",
|
|
24
|
-
"lint": "eslint src --ext .mjs,.js,.jsx,.ts,.tsx",
|
|
25
|
-
"lint:fix": "eslint src --ext .mjs,.js,.jsx,.ts,.tsx --fix"
|
|
26
|
-
},
|
|
27
17
|
"publishConfig": {
|
|
28
18
|
"access": "public"
|
|
29
19
|
},
|
|
30
20
|
"dependencies": {
|
|
31
|
-
"@
|
|
32
|
-
"@emotion/
|
|
33
|
-
"@emotion/
|
|
34
|
-
"@
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
"chroma-js": "^2.4.2",
|
|
21
|
+
"@emotion/css": "^11.13.0",
|
|
22
|
+
"@emotion/react": "^11.13.3",
|
|
23
|
+
"@emotion/styled": "^11.13.0",
|
|
24
|
+
"@iconify/react": "^4.1.1",
|
|
25
|
+
"ahooks": "^3.8.1",
|
|
26
|
+
"chroma-js": "^2.6.0",
|
|
38
27
|
"performant-array-to-tree": "^1.11.0",
|
|
39
|
-
"react-arborist": "^2.
|
|
28
|
+
"react-arborist": "^2.3.0",
|
|
40
29
|
"react-color": "^2.19.3",
|
|
41
|
-
"react-select": "^5.
|
|
42
|
-
"unstated-next": "^1.1.0"
|
|
30
|
+
"react-select": "^5.8.0",
|
|
31
|
+
"unstated-next": "^1.1.0",
|
|
32
|
+
"@blocklet/translation-input": "^2.0.174"
|
|
43
33
|
},
|
|
44
34
|
"peerDependencies": {
|
|
45
35
|
"@arcblock/did-connect": "^2.10.5",
|
|
@@ -53,35 +43,38 @@
|
|
|
53
43
|
},
|
|
54
44
|
"devDependencies": {
|
|
55
45
|
"@arcblock/eslint-config-ts": "^0.3.2",
|
|
56
|
-
"@babel/core": "^7.
|
|
57
|
-
"@
|
|
58
|
-
"@
|
|
59
|
-
"@
|
|
60
|
-
"@storybook/addon-
|
|
61
|
-
"@storybook/
|
|
62
|
-
"@storybook/
|
|
63
|
-
"@storybook/addon-links": "^6.5.13",
|
|
64
|
-
"@storybook/builder-vite": "^8.0.6",
|
|
65
|
-
"@storybook/react": "^6.5.13",
|
|
46
|
+
"@babel/core": "^7.25.2",
|
|
47
|
+
"@storybook/addon-actions": "^6.5.16",
|
|
48
|
+
"@storybook/addon-essentials": "^6.5.16",
|
|
49
|
+
"@storybook/addon-interactions": "^6.5.16",
|
|
50
|
+
"@storybook/addon-links": "^6.5.16",
|
|
51
|
+
"@storybook/builder-vite": "^8.3.0",
|
|
52
|
+
"@storybook/react": "^6.5.16",
|
|
66
53
|
"@storybook/testing-library": "^0.0.13",
|
|
67
54
|
"@svgr/core": "^6.5.1",
|
|
68
55
|
"@types/chroma-js": "^2.4.4",
|
|
69
|
-
"@types/react": "^18.
|
|
70
|
-
"@types/react-color": "^3.0.
|
|
71
|
-
"@types/react-dom": "^18.0
|
|
72
|
-
"@vitejs/plugin-react": "^4.
|
|
56
|
+
"@types/react": "^18.3.5",
|
|
57
|
+
"@types/react-color": "^3.0.12",
|
|
58
|
+
"@types/react-dom": "^18.3.0",
|
|
59
|
+
"@vitejs/plugin-react": "^4.3.1",
|
|
73
60
|
"babel-loader": "^8.3.0",
|
|
74
|
-
"react": "^18.
|
|
75
|
-
"react-dom": "^18.
|
|
76
|
-
"rollup-plugin-node-externals": "^7.1.
|
|
77
|
-
"typescript": "^4.
|
|
78
|
-
"unplugin-icons": "^0.14.
|
|
79
|
-
"vite": "^5.4.
|
|
80
|
-
"vite-plugin-dts": "^3.
|
|
61
|
+
"react": "^18.3.1",
|
|
62
|
+
"react-dom": "^18.3.1",
|
|
63
|
+
"rollup-plugin-node-externals": "^7.1.3",
|
|
64
|
+
"typescript": "^4.9.5",
|
|
65
|
+
"unplugin-icons": "^0.14.15",
|
|
66
|
+
"vite": "^5.4.4",
|
|
67
|
+
"vite-plugin-dts": "^3.9.1",
|
|
81
68
|
"vite-plugin-libcss": "^1.1.1"
|
|
82
69
|
},
|
|
83
|
-
"
|
|
84
|
-
"
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
70
|
+
"scripts": {
|
|
71
|
+
"dev": "npm run storybook",
|
|
72
|
+
"build": "tsc && vite build",
|
|
73
|
+
"build:watch": "vite build --watch",
|
|
74
|
+
"preview": "vite preview",
|
|
75
|
+
"storybook": "start-storybook -p 6007",
|
|
76
|
+
"build-storybook": "build-storybook",
|
|
77
|
+
"lint": "eslint src --ext .mjs,.js,.jsx,.ts,.tsx",
|
|
78
|
+
"lint:fix": "eslint src --ext .mjs,.js,.jsx,.ts,.tsx --fix"
|
|
79
|
+
}
|
|
80
|
+
}
|