@featurevisor/site 0.57.0 → 0.58.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/.eslintcache +1 -1
- package/CHANGELOG.md +19 -0
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
- package/src/components/ShowFeature.tsx +56 -45
- package/src/utils/index.ts +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@featurevisor/site",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.58.0",
|
|
4
4
|
"description": "Static site for Featurevisor",
|
|
5
5
|
"main": "dist",
|
|
6
6
|
"scripts": {
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"webpack-merge": "^5.10.0"
|
|
64
64
|
},
|
|
65
65
|
"dependencies": {
|
|
66
|
-
"@featurevisor/types": "^0.
|
|
66
|
+
"@featurevisor/types": "^0.58.0"
|
|
67
67
|
},
|
|
68
|
-
"gitHead": "
|
|
68
|
+
"gitHead": "0a7f0f889fb6353a70304d0e14ec12a50240e7f2"
|
|
69
69
|
}
|
|
@@ -208,51 +208,62 @@ export function DisplayFeatureRulesTable() {
|
|
|
208
208
|
}
|
|
209
209
|
|
|
210
210
|
return (
|
|
211
|
-
<
|
|
212
|
-
|
|
213
|
-
<
|
|
214
|
-
<
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
211
|
+
<div>
|
|
212
|
+
{feature.environments[environmentKey].expose === false && (
|
|
213
|
+
<p className="mt-2 block rounded border-2 border-orange-300 bg-orange-200 p-3 text-sm text-gray-600">
|
|
214
|
+
Rules are not <a href="https://featurevisor.com/docs/features/#expose">exposed</a> in this
|
|
215
|
+
environment.
|
|
216
|
+
</p>
|
|
217
|
+
)}
|
|
218
|
+
|
|
219
|
+
<table className="mt-3 min-w-full divide-y divide-gray-300 border border-gray-200">
|
|
220
|
+
<thead className="bg-gray-50">
|
|
221
|
+
<tr>
|
|
222
|
+
<th className="py-4 pl-4 pr-3 text-left text-sm font-semibold text-gray-500">
|
|
223
|
+
Percentage
|
|
224
|
+
</th>
|
|
225
|
+
<th className="py-4 pl-4 pr-3 text-left text-sm font-semibold text-gray-500">
|
|
226
|
+
Segments
|
|
227
|
+
</th>
|
|
228
|
+
<th className="py-4 pl-4 pr-3 text-left text-sm font-semibold text-gray-500">
|
|
229
|
+
Variables
|
|
230
|
+
</th>
|
|
231
|
+
</tr>
|
|
232
|
+
</thead>
|
|
233
|
+
|
|
234
|
+
<tbody>
|
|
235
|
+
{feature.environments[environmentKey].rules.map((rule, index) => {
|
|
236
|
+
return (
|
|
237
|
+
<tr key={index} className={index % 2 === 0 ? undefined : "bg-gray-50"}>
|
|
238
|
+
<td className="py-4 pl-4 pr-3 text-sm text-gray-900">{rule.percentage}%</td>
|
|
239
|
+
<td className="py-4 pl-4 pr-3 text-sm text-gray-900">
|
|
240
|
+
<ExpandRuleSegments segments={rule.segments} />
|
|
241
|
+
</td>
|
|
242
|
+
<td className="py-4 pl-4 pr-3 text-sm text-gray-900">
|
|
243
|
+
{rule.variables && (
|
|
244
|
+
<ul className="list-inside list-disc">
|
|
245
|
+
{Object.keys(rule.variables).map((k) => {
|
|
246
|
+
return (
|
|
247
|
+
<li key={k}>
|
|
248
|
+
<span className="font-semibold">{k}</span>:{" "}
|
|
249
|
+
{typeof rule.variables[k] === "string" && rule.variables[k]}
|
|
250
|
+
{typeof rule.variables[k] !== "string" && (
|
|
251
|
+
<code className="rounded bg-gray-100 px-2 py-1 text-red-400">
|
|
252
|
+
{rule.variables[k]}
|
|
253
|
+
</code>
|
|
254
|
+
)}
|
|
255
|
+
</li>
|
|
256
|
+
);
|
|
257
|
+
})}
|
|
258
|
+
</ul>
|
|
259
|
+
)}
|
|
260
|
+
</td>
|
|
261
|
+
</tr>
|
|
262
|
+
);
|
|
263
|
+
})}
|
|
264
|
+
</tbody>
|
|
265
|
+
</table>
|
|
266
|
+
</div>
|
|
256
267
|
);
|
|
257
268
|
}
|
|
258
269
|
|
package/src/utils/index.ts
CHANGED