nitro-web 0.3.23 → 0.3.25
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.
|
@@ -107,7 +107,9 @@ export function FieldCurrency({
|
|
|
107
107
|
}
|
|
108
108
|
|
|
109
109
|
function onChange(source: 'event' | 'prop', floatValue?: number) {
|
|
110
|
-
|
|
110
|
+
// Prop changes came from the page, so pushing them back would loop
|
|
111
|
+
if (source === 'prop') return
|
|
112
|
+
setDontFix(true)
|
|
111
113
|
if (onChangeProp) onChangeProp({ target: { name: props.name, value: to('cents', floatValue, settings) }})
|
|
112
114
|
else setInternalValue(to('cents', floatValue, settings))
|
|
113
115
|
}
|
|
@@ -127,9 +129,9 @@ export function FieldCurrency({
|
|
|
127
129
|
thousandSeparator={settings.thousandSeparator}
|
|
128
130
|
decimalScale={settings.maxDecimals}
|
|
129
131
|
onValueChange={({ floatValue }, e) => onChange(e.source, floatValue)}
|
|
130
|
-
onBlur={() => { setLastBlurred(Date.now())}}
|
|
132
|
+
onBlur={() => { setDontFix(false); setLastBlurred(Date.now()) }}
|
|
131
133
|
placeholder={props.placeholder || '0.00'}
|
|
132
|
-
value={inputValue}
|
|
134
|
+
value={inputValue ?? ''}
|
|
133
135
|
suffix={settings.suffix}
|
|
134
136
|
style={{ textIndent: `${prefixWidth}px` }}
|
|
135
137
|
type="text"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nitro-web",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.25",
|
|
4
4
|
"repository": "github:boycce/nitro-web",
|
|
5
5
|
"homepage": "https://boycce.github.io/nitro-web/",
|
|
6
6
|
"description": "Nitro is a battle-tested, modular base project to turbocharge your projects, styled using Tailwind 🚀",
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
"node": ">=20.19.0"
|
|
75
75
|
},
|
|
76
76
|
"standard-version": {
|
|
77
|
-
"releaseCommitMessageFormat": "
|
|
77
|
+
"releaseCommitMessageFormat": "{{currentTag}}",
|
|
78
78
|
"sign": true,
|
|
79
79
|
"tag-prefix": "",
|
|
80
80
|
"skip": {
|
package/server/email/index.js
CHANGED
|
@@ -25,8 +25,8 @@ export const optionalEmailConfigKeys = ['emailReplyTo', 'emailTestMode', 'mailgu
|
|
|
25
25
|
* @param {string} opts.template - Template name or raw HTML, e.g., 'reset-password'
|
|
26
26
|
* @param {string} opts.to - Recipient(s), e.g. "Bruce<bruce@wayneenterprises.com>,..."
|
|
27
27
|
* @param {Config} opts.config - Config object
|
|
28
|
-
* @param {string} [opts.cc] - CC, e.g. "Bruce<bruce@wayneenterprises.com>,..."
|
|
29
|
-
* @param {string} [opts.bcc] - BCC, e.g. "Bruce<bruce@wayneenterprises.com>,..."
|
|
28
|
+
* @param {string} [opts.cc] - CC, e.g. "Bruce<bruce@wayneenterprises.com>,..."
|
|
29
|
+
* @param {string} [opts.bcc] - BCC, e.g. "Bruce<bruce@wayneenterprises.com>,..."
|
|
30
30
|
* @param {object} [opts.data] - common template data shared across recipients
|
|
31
31
|
* @param {object} [opts.swigData] - vars for Nunjucks/Swig render only (not sent to Mailgun). Inherits data.
|
|
32
32
|
* @param {string} [opts.from] - sender address, e.g. "Bruce<bruce@wayneenterprises.com>"
|
|
@@ -210,9 +210,9 @@ async function sendWithMailgun(settings, html) {
|
|
|
210
210
|
// Supports batch sending via recipientVariables, limit 1000 emails
|
|
211
211
|
// https://documentation.mailgun.com/en/latest/user_manual.html?highlight=batch%20sending#batch-sending
|
|
212
212
|
const processedhtml = await processTemplate(settings, html)
|
|
213
|
-
const copies = { ...(settings.cc ? { cc: settings.cc } : {}), ...(settings.bcc ? { bcc: settings.bcc } : {}) }
|
|
214
213
|
const mailgunOpts = {
|
|
215
|
-
...(settings.
|
|
214
|
+
...(settings.cc ? { cc: settings.cc } : {}),
|
|
215
|
+
...(settings.bcc ? { bcc: settings.bcc } : {}),
|
|
216
216
|
...(settings.attachments?.length ? { attachments: settings.attachments } : {}),
|
|
217
217
|
from: settings.from,
|
|
218
218
|
html: processedhtml,
|
|
@@ -229,7 +229,6 @@ async function sendWithMailgun(settings, html) {
|
|
|
229
229
|
if (settings.test && settings.isDev) {
|
|
230
230
|
console.info('Test mode: sendEmail mailgunOpts', {
|
|
231
231
|
...mailgunOpts,
|
|
232
|
-
...copies,
|
|
233
232
|
html: null,
|
|
234
233
|
'recipient-variables': settings.recipientVariables,
|
|
235
234
|
attachments: settings.attachments?.map((a) => `${a.filename} (${a.content?.length} bytes)`),
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
* @param {string} opts.template - Template name or raw HTML, e.g., 'reset-password'
|
|
7
7
|
* @param {string} opts.to - Recipient(s), e.g. "Bruce<bruce@wayneenterprises.com>,..."
|
|
8
8
|
* @param {Config} opts.config - Config object
|
|
9
|
-
* @param {string} [opts.cc] - CC, e.g. "Bruce<bruce@wayneenterprises.com>,..."
|
|
10
|
-
* @param {string} [opts.bcc] - BCC, e.g. "Bruce<bruce@wayneenterprises.com>,..."
|
|
9
|
+
* @param {string} [opts.cc] - CC, e.g. "Bruce<bruce@wayneenterprises.com>,..."
|
|
10
|
+
* @param {string} [opts.bcc] - BCC, e.g. "Bruce<bruce@wayneenterprises.com>,..."
|
|
11
11
|
* @param {object} [opts.data] - common template data shared across recipients
|
|
12
12
|
* @param {object} [opts.swigData] - vars for Nunjucks/Swig render only (not sent to Mailgun). Inherits data.
|
|
13
13
|
* @param {string} [opts.from] - sender address, e.g. "Bruce<bruce@wayneenterprises.com>"
|