@voyantjs/resources-ui 0.19.0 → 0.20.0
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/resources-tabs-primary.d.ts +4 -2
- package/dist/components/resources-tabs-primary.d.ts.map +1 -1
- package/dist/components/resources-tabs-primary.js +14 -7
- package/dist/components/resources-tabs-secondary.d.ts +4 -2
- package/dist/components/resources-tabs-secondary.d.ts.map +1 -1
- package/dist/components/resources-tabs-secondary.js +8 -4
- package/package.json +12 -8
- package/src/styles.css +11 -0
|
@@ -4,7 +4,8 @@ type BulkFn = (args: {
|
|
|
4
4
|
ids: string[];
|
|
5
5
|
endpoint: string;
|
|
6
6
|
target: string;
|
|
7
|
-
|
|
7
|
+
nounSingular: string;
|
|
8
|
+
nounPlural: string;
|
|
8
9
|
payload: Record<string, unknown>;
|
|
9
10
|
successVerb: string;
|
|
10
11
|
clearSelection: () => void;
|
|
@@ -13,7 +14,8 @@ type DeleteFn = (args: {
|
|
|
13
14
|
ids: string[];
|
|
14
15
|
endpoint: string;
|
|
15
16
|
target: string;
|
|
16
|
-
|
|
17
|
+
nounSingular: string;
|
|
18
|
+
nounPlural: string;
|
|
17
19
|
clearSelection: () => void;
|
|
18
20
|
}) => Promise<void>;
|
|
19
21
|
export declare function ResourcesTab(props: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resources-tabs-primary.d.ts","sourceRoot":"","sources":["../../src/components/resources-tabs-primary.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAa,UAAU,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAA;AAErF,OAAO,EAEL,KAAK,aAAa,EAClB,KAAK,qBAAqB,EAC1B,KAAK,eAAe,EACpB,KAAK,WAAW,EAChB,KAAK,cAAc,EACpB,MAAM,2BAA2B,CAAA;AAWlC,KAAK,MAAM,GAAG,CAAC,IAAI,EAAE;IACnB,GAAG,EAAE,MAAM,EAAE,CAAA;IACb,Q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CAC7C,2CAgEA"}
|
|
@@ -118,7 +118,8 @@ export function ResourcesTab(props) {
|
|
|
118
118
|
ids: selectedRows.map((row) => row.original.id),
|
|
119
119
|
endpoint: "/v1/resources/resources",
|
|
120
120
|
target: "resources-activate",
|
|
121
|
-
|
|
121
|
+
nounSingular: "resource",
|
|
122
|
+
nounPlural: "resources",
|
|
122
123
|
payload: { active: true },
|
|
123
124
|
successVerb: section.actions.activate.successVerb,
|
|
124
125
|
clearSelection,
|
|
@@ -128,7 +129,8 @@ export function ResourcesTab(props) {
|
|
|
128
129
|
ids: selectedRows.map((row) => row.original.id),
|
|
129
130
|
endpoint: "/v1/resources/resources",
|
|
130
131
|
target: "resources-deactivate",
|
|
131
|
-
|
|
132
|
+
nounSingular: "resource",
|
|
133
|
+
nounPlural: "resources",
|
|
132
134
|
payload: { active: false },
|
|
133
135
|
successVerb: section.actions.deactivate.successVerb,
|
|
134
136
|
clearSelection,
|
|
@@ -138,7 +140,8 @@ export function ResourcesTab(props) {
|
|
|
138
140
|
ids: selectedRows.map((row) => row.original.id),
|
|
139
141
|
endpoint: "/v1/resources/resources",
|
|
140
142
|
target: "resources-delete",
|
|
141
|
-
|
|
143
|
+
nounSingular: "resource",
|
|
144
|
+
nounPlural: "resources",
|
|
142
145
|
clearSelection,
|
|
143
146
|
}) })] })), onRowClick: (row) => props.onEdit(row.original) })] }));
|
|
144
147
|
}
|
|
@@ -153,7 +156,8 @@ export function PoolsTab(props) {
|
|
|
153
156
|
ids: selectedRows.map((row) => row.original.id),
|
|
154
157
|
endpoint: "/v1/resources/pools",
|
|
155
158
|
target: "pools-activate",
|
|
156
|
-
|
|
159
|
+
nounSingular: "pool",
|
|
160
|
+
nounPlural: "pools",
|
|
157
161
|
payload: { active: true },
|
|
158
162
|
successVerb: section.actions.activate.successVerb,
|
|
159
163
|
clearSelection,
|
|
@@ -163,7 +167,8 @@ export function PoolsTab(props) {
|
|
|
163
167
|
ids: selectedRows.map((row) => row.original.id),
|
|
164
168
|
endpoint: "/v1/resources/pools",
|
|
165
169
|
target: "pools-deactivate",
|
|
166
|
-
|
|
170
|
+
nounSingular: "pool",
|
|
171
|
+
nounPlural: "pools",
|
|
167
172
|
payload: { active: false },
|
|
168
173
|
successVerb: section.actions.deactivate.successVerb,
|
|
169
174
|
clearSelection,
|
|
@@ -173,7 +178,8 @@ export function PoolsTab(props) {
|
|
|
173
178
|
ids: selectedRows.map((row) => row.original.id),
|
|
174
179
|
endpoint: "/v1/resources/pools",
|
|
175
180
|
target: "pools-delete",
|
|
176
|
-
|
|
181
|
+
nounSingular: "pool",
|
|
182
|
+
nounPlural: "pools",
|
|
177
183
|
clearSelection,
|
|
178
184
|
}) })] })), onRowClick: (row) => props.onEdit(row.original) })] }));
|
|
179
185
|
}
|
|
@@ -188,7 +194,8 @@ export function AllocationsTab(props) {
|
|
|
188
194
|
ids: selectedRows.map((row) => row.original.id),
|
|
189
195
|
endpoint: "/v1/resources/allocations",
|
|
190
196
|
target: "allocations-delete",
|
|
191
|
-
|
|
197
|
+
nounSingular: "allocation",
|
|
198
|
+
nounPlural: "allocations",
|
|
192
199
|
clearSelection,
|
|
193
200
|
}) }) })), onRowClick: (row) => props.onEdit(row.original) })] }));
|
|
194
201
|
}
|
|
@@ -4,7 +4,8 @@ type BulkFn = (args: {
|
|
|
4
4
|
ids: string[];
|
|
5
5
|
endpoint: string;
|
|
6
6
|
target: string;
|
|
7
|
-
|
|
7
|
+
nounSingular: string;
|
|
8
|
+
nounPlural: string;
|
|
8
9
|
payload: Record<string, unknown>;
|
|
9
10
|
successVerb: string;
|
|
10
11
|
clearSelection: () => void;
|
|
@@ -13,7 +14,8 @@ type DeleteFn = (args: {
|
|
|
13
14
|
ids: string[];
|
|
14
15
|
endpoint: string;
|
|
15
16
|
target: string;
|
|
16
|
-
|
|
17
|
+
nounSingular: string;
|
|
18
|
+
nounPlural: string;
|
|
17
19
|
clearSelection: () => void;
|
|
18
20
|
}) => Promise<void>;
|
|
19
21
|
export declare function AssignmentsTab(props: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resources-tabs-secondary.d.ts","sourceRoot":"","sources":["../../src/components/resources-tabs-secondary.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAa,UAAU,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAA;AAErF,OAAO,EACL,KAAK,aAAa,EAElB,KAAK,mBAAmB,EACxB,KAAK,WAAW,EAChB,KAAK,yBAAyB,EAC9B,KAAK,UAAU,EAChB,MAAM,2BAA2B,CAAA;AAgBlC,KAAK,MAAM,GAAG,CAAC,IAAI,EAAE;IACnB,GAAG,EAAE,MAAM,EAAE,CAAA;IACb,QAAQ,EAAE,MAAM,CAAA;IAChB,MAAM,EAAE,MAAM,CAAA;IACd,
|
|
1
|
+
{"version":3,"file":"resources-tabs-secondary.d.ts","sourceRoot":"","sources":["../../src/components/resources-tabs-secondary.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAa,UAAU,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAA;AAErF,OAAO,EACL,KAAK,aAAa,EAElB,KAAK,mBAAmB,EACxB,KAAK,WAAW,EAChB,KAAK,yBAAyB,EAC9B,KAAK,UAAU,EAChB,MAAM,2BAA2B,CAAA;AAgBlC,KAAK,MAAM,GAAG,CAAC,IAAI,EAAE;IACnB,GAAG,EAAE,MAAM,EAAE,CAAA;IACb,QAAQ,EAAE,MAAM,CAAA;IAChB,MAAM,EAAE,MAAM,CAAA;IACd,YAAY,EAAE,MAAM,CAAA;IACpB,UAAU,EAAE,MAAM,CAAA;IAClB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAChC,WAAW,EAAE,MAAM,CAAA;IACnB,cAAc,EAAE,MAAM,IAAI,CAAA;CAC3B,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;AAEnB,KAAK,QAAQ,GAAG,CAAC,IAAI,EAAE;IACrB,GAAG,EAAE,MAAM,EAAE,CAA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edRows.map((row) => row.original.id),
|
|
99
99
|
endpoint: "/v1/resources/slot-assignments",
|
|
100
100
|
target: "assignments-assigned",
|
|
101
|
-
|
|
101
|
+
nounSingular: "assignment",
|
|
102
|
+
nounPlural: "assignments",
|
|
102
103
|
payload: { status: "assigned" },
|
|
103
104
|
successVerb: section.actions.assign.successVerb,
|
|
104
105
|
clearSelection,
|
|
@@ -108,7 +109,8 @@ export function AssignmentsTab(props) {
|
|
|
108
109
|
ids: selectedRows.map((row) => row.original.id),
|
|
109
110
|
endpoint: "/v1/resources/slot-assignments",
|
|
110
111
|
target: "assignments-released",
|
|
111
|
-
|
|
112
|
+
nounSingular: "assignment",
|
|
113
|
+
nounPlural: "assignments",
|
|
112
114
|
payload: { status: "released" },
|
|
113
115
|
successVerb: section.actions.release.successVerb,
|
|
114
116
|
clearSelection,
|
|
@@ -118,7 +120,8 @@ export function AssignmentsTab(props) {
|
|
|
118
120
|
ids: selectedRows.map((row) => row.original.id),
|
|
119
121
|
endpoint: "/v1/resources/slot-assignments",
|
|
120
122
|
target: "assignments-delete",
|
|
121
|
-
|
|
123
|
+
nounSingular: "assignment",
|
|
124
|
+
nounPlural: "assignments",
|
|
122
125
|
clearSelection,
|
|
123
126
|
}) })] })), onRowClick: (row) => props.onEdit(row.original) })] }));
|
|
124
127
|
}
|
|
@@ -133,7 +136,8 @@ export function CloseoutsTab(props) {
|
|
|
133
136
|
ids: selectedRows.map((row) => row.original.id),
|
|
134
137
|
endpoint: "/v1/resources/closeouts",
|
|
135
138
|
target: "closeouts-delete",
|
|
136
|
-
|
|
139
|
+
nounSingular: "closeout",
|
|
140
|
+
nounPlural: "closeouts",
|
|
137
141
|
clearSelection,
|
|
138
142
|
}) }) })), onRowClick: (row) => props.onEdit(row.original) })] }));
|
|
139
143
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@voyantjs/resources-ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.20.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -15,6 +15,9 @@
|
|
|
15
15
|
"import": "./dist/index.js",
|
|
16
16
|
"default": "./dist/index.js"
|
|
17
17
|
},
|
|
18
|
+
"./styles.css": {
|
|
19
|
+
"default": "./src/styles.css"
|
|
20
|
+
},
|
|
18
21
|
"./i18n": {
|
|
19
22
|
"types": "./dist/i18n/index.d.ts",
|
|
20
23
|
"import": "./dist/i18n/index.js",
|
|
@@ -41,11 +44,11 @@
|
|
|
41
44
|
"@tanstack/react-table": "^8.0.0",
|
|
42
45
|
"react": "^19.0.0",
|
|
43
46
|
"react-dom": "^19.0.0",
|
|
44
|
-
"@voyantjs/resources-react": "0.
|
|
45
|
-
"@voyantjs/ui": "0.
|
|
47
|
+
"@voyantjs/resources-react": "0.20.0",
|
|
48
|
+
"@voyantjs/ui": "0.20.0"
|
|
46
49
|
},
|
|
47
50
|
"dependencies": {
|
|
48
|
-
"@voyantjs/i18n": "0.
|
|
51
|
+
"@voyantjs/i18n": "0.20.0"
|
|
49
52
|
},
|
|
50
53
|
"devDependencies": {
|
|
51
54
|
"@tanstack/react-query": "^5.96.2",
|
|
@@ -57,13 +60,14 @@
|
|
|
57
60
|
"react-dom": "^19.2.4",
|
|
58
61
|
"typescript": "^6.0.2",
|
|
59
62
|
"vitest": "^4.1.2",
|
|
60
|
-
"@voyantjs/i18n": "0.
|
|
61
|
-
"@voyantjs/resources-react": "0.
|
|
63
|
+
"@voyantjs/i18n": "0.20.0",
|
|
64
|
+
"@voyantjs/resources-react": "0.20.0",
|
|
62
65
|
"@voyantjs/voyant-typescript-config": "0.1.0",
|
|
63
|
-
"@voyantjs/ui": "0.
|
|
66
|
+
"@voyantjs/ui": "0.20.0"
|
|
64
67
|
},
|
|
65
68
|
"files": [
|
|
66
|
-
"dist"
|
|
69
|
+
"dist",
|
|
70
|
+
"src/styles.css"
|
|
67
71
|
],
|
|
68
72
|
"publishConfig": {
|
|
69
73
|
"access": "public"
|
package/src/styles.css
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/* Tailwind v4 source-detection helper.
|
|
2
|
+
*
|
|
3
|
+
* Templates that consume this package should `@import` this CSS so Tailwind
|
|
4
|
+
* scans these component files for utility classes:
|
|
5
|
+
*
|
|
6
|
+
* @import "@voyantjs/<domain>-ui/styles.css";
|
|
7
|
+
*
|
|
8
|
+
* Without it, classes that only appear inside this package (e.g. data-attr
|
|
9
|
+
* variants on primitives) won't be compiled into the final bundle.
|
|
10
|
+
*/
|
|
11
|
+
@source "./components/**/*.{ts,tsx}";
|