@tonguetoquill/collection 0.1.7 → 0.1.8
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/package.json
CHANGED
|
@@ -23,9 +23,10 @@
|
|
|
23
23
|
date: none,
|
|
24
24
|
// Format of indorsement: "standard" (same page), "informal" (no header), or "separate_page" (starts on new page)
|
|
25
25
|
format: "standard",
|
|
26
|
-
// Approval action:
|
|
26
|
+
// Approval action: none (default, no action line displayed), "undecided", "approve", or "disapprove".
|
|
27
|
+
// When set to "undecided", the action line is displayed with neither option circled.
|
|
27
28
|
// When set to "approve" or "disapprove", the action line is displayed with the selected option circled.
|
|
28
|
-
action:
|
|
29
|
+
action: none,
|
|
29
30
|
content,
|
|
30
31
|
) = {
|
|
31
32
|
// Validate format parameter
|
|
@@ -90,8 +91,8 @@
|
|
|
90
91
|
blank-line()
|
|
91
92
|
}
|
|
92
93
|
|
|
93
|
-
// Show action line only when an action decision is set (not
|
|
94
|
-
if action !=
|
|
94
|
+
// Show action line only when an action decision is set (not `none`)
|
|
95
|
+
if action != none {
|
|
95
96
|
render-action-line(action)
|
|
96
97
|
}
|
|
97
98
|
|
|
@@ -144,28 +144,29 @@
|
|
|
144
144
|
// =============================================================================
|
|
145
145
|
// ACTION LINE RENDERING
|
|
146
146
|
// =============================================================================
|
|
147
|
-
// Renders the
|
|
148
|
-
// action: "none" = no action line displayed (hidden), "
|
|
149
|
-
// "
|
|
150
|
-
// action is
|
|
147
|
+
// Renders the Approve / Disapprove action line for indorsement memos.
|
|
148
|
+
// action: "none" = no action line displayed (hidden), "undecided" = both options
|
|
149
|
+
// rendered plain (no circle), "approve" = Approve circled,
|
|
150
|
+
// "disapprove" = Disapprove circled. The action line is rendered when
|
|
151
|
+
// action is "undecided", "approve", or "disapprove".
|
|
151
152
|
|
|
152
153
|
#let render-action-line(action) = {
|
|
153
154
|
assert(
|
|
154
|
-
action in ("none", "approve", "disapprove"),
|
|
155
|
-
message: "action must be \"none\", \"approve\", or \"disapprove\"",
|
|
155
|
+
action in ("none", "undecided", "approve", "disapprove"),
|
|
156
|
+
message: "action must be \"none\", \"undecided\", \"approve\", or \"disapprove\"",
|
|
156
157
|
)
|
|
157
158
|
blank-line()
|
|
158
159
|
// Circle the selected option using a box with rounded corners
|
|
159
160
|
// Use baseline parameter to maintain vertical text alignment
|
|
160
161
|
let approve-text = if action == "approve" {
|
|
161
|
-
box(stroke: 0.5pt + black, radius: 2pt, inset: 2pt, baseline: 2pt)[
|
|
162
|
+
box(stroke: 0.5pt + black, radius: 2pt, inset: 2pt, baseline: 2pt)[Approve]
|
|
162
163
|
} else {
|
|
163
|
-
[
|
|
164
|
+
[Approve]
|
|
164
165
|
}
|
|
165
166
|
let disapprove-text = if action == "disapprove" {
|
|
166
|
-
box(stroke: 0.5pt + black, radius: 2pt, inset: 2pt, baseline: 2pt)[
|
|
167
|
+
box(stroke: 0.5pt + black, radius: 2pt, inset: 2pt, baseline: 2pt)[Disapprove]
|
|
167
168
|
} else {
|
|
168
|
-
[
|
|
169
|
+
[Disapprove]
|
|
169
170
|
}
|
|
170
171
|
[#approve-text / #disapprove-text]
|
|
171
172
|
}
|