@peasant-labs/fairtrade 0.0.60 → 0.0.62
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/lib/closed-value.js +23 -0
- package/dist/lib/commons.js +158 -158
- package/dist/lib/components.css +1 -1
- package/dist/lib/types/TranscriptLibraryTable.d.ts +208 -0
- package/dist/lib/types/closed-value.d.ts +47 -0
- package/dist/lib/types/groupPageRows.d.ts +56 -0
- package/dist/lib/types/index.d.ts +7 -0
- package/dist/lib/types/table/align-class.d.ts +6 -0
- package/dist/lib/types/table/column-align.d.ts +44 -0
- package/dist/lib/types/table/library-pickers.d.ts +50 -0
- package/dist/lib/types/transcript/action-groups.d.ts +5 -1
- package/dist/lib/{ui-DoP5-XrV.js → ui-B112SqIJ.js} +4664 -4124
- package/dist/lib/ui.js +6 -6
- package/package.json +11 -4
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
//#region src/ui/closed-value.js
|
|
2
|
+
function e(e, r) {
|
|
3
|
+
t(e), n(r);
|
|
4
|
+
let i = String(e);
|
|
5
|
+
return Object.freeze({
|
|
6
|
+
wire: e,
|
|
7
|
+
label: r,
|
|
8
|
+
String: () => i,
|
|
9
|
+
toString: () => i,
|
|
10
|
+
toJSON: () => e
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
function t(e) {
|
|
14
|
+
if (!(typeof e == "string" && e.length > 0) && !(typeof e == "number" && Number.isFinite(e))) throw TypeError(`closed(wire, label) failed in src/ui/closed-value.js: wire must be a non-empty string or a finite number, received ${r(e)}. A closed value's wire is the exact value persisted and compared, so it must be a primitive with a stable value (for example 'project' or 25). Pass the primitive at the member definition.`);
|
|
15
|
+
}
|
|
16
|
+
function n(e) {
|
|
17
|
+
if (!(typeof e == "string" && e.length > 0)) throw TypeError(`closed(wire, label) failed in src/ui/closed-value.js: label must be a non-empty string, received ${r(e)}. The label is the human-readable text shown for the member, so every member needs its own (for example '25' for the numeric wire 25). Pass the label at the member definition.`);
|
|
18
|
+
}
|
|
19
|
+
function r(e) {
|
|
20
|
+
return typeof e == "string" ? JSON.stringify(e) : typeof e == "number" ? String(e) : e === null ? "null" : Array.isArray(e) ? "an array" : `a ${typeof e}`;
|
|
21
|
+
}
|
|
22
|
+
//#endregion
|
|
23
|
+
export { e as closed };
|