@fieldia/core 0.23.0 → 0.24.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/README.md +135 -3
- package/package.json +1 -1
- package/schema/page.schema.json +159 -4
- package/src/index.d.mts +6 -2
- package/src/index.d.ts +6 -2
- package/src/index.js +18 -1
- package/src/index.js.map +1 -1
- package/src/index.mjs +8 -2
- package/src/index.mjs.map +1 -1
- package/src/lib/format/autofill-group.d.mts +12 -0
- package/src/lib/format/autofill-group.d.ts +12 -0
- package/src/lib/format/autofill-group.js +23 -0
- package/src/lib/format/autofill-group.js.map +1 -0
- package/src/lib/format/autofill-group.mjs +19 -0
- package/src/lib/format/autofill-group.mjs.map +1 -0
- package/src/lib/format/autofill.d.mts +14 -0
- package/src/lib/format/autofill.d.ts +14 -0
- package/src/lib/format/autofill.js +54 -0
- package/src/lib/format/autofill.js.map +1 -0
- package/src/lib/format/autofill.mjs +48 -0
- package/src/lib/format/autofill.mjs.map +1 -0
- package/src/lib/format/bulk-edit.d.mts +18 -0
- package/src/lib/format/bulk-edit.d.ts +18 -0
- package/src/lib/format/bulk-edit.js +26 -0
- package/src/lib/format/bulk-edit.js.map +1 -0
- package/src/lib/format/bulk-edit.mjs +21 -0
- package/src/lib/format/bulk-edit.mjs.map +1 -0
- package/src/lib/format/field.d.mts +55 -34
- package/src/lib/format/field.d.ts +55 -34
- package/src/lib/format/field.js +16 -2
- package/src/lib/format/field.js.map +1 -1
- package/src/lib/format/field.mjs +15 -1
- package/src/lib/format/field.mjs.map +1 -1
- package/src/lib/format/layout.d.mts +365 -66
- package/src/lib/format/layout.d.ts +365 -66
- package/src/lib/format/layout.js +22 -4
- package/src/lib/format/layout.js.map +1 -1
- package/src/lib/format/layout.mjs +20 -3
- package/src/lib/format/layout.mjs.map +1 -1
- package/src/lib/format/page.d.mts +169 -29
- package/src/lib/format/page.d.ts +169 -29
- package/src/lib/format/page.js +11 -0
- package/src/lib/format/page.js.map +1 -1
- package/src/lib/format/page.mjs +12 -1
- package/src/lib/format/page.mjs.map +1 -1
- package/src/lib/format/phone.d.mts +27 -0
- package/src/lib/format/phone.d.ts +27 -0
- package/src/lib/format/phone.js +43 -0
- package/src/lib/format/phone.js.map +1 -0
- package/src/lib/format/phone.mjs +39 -0
- package/src/lib/format/phone.mjs.map +1 -0
- package/src/lib/format/references.d.mts +10 -0
- package/src/lib/format/references.d.ts +10 -0
- package/src/lib/format/references.js +96 -1
- package/src/lib/format/references.js.map +1 -1
- package/src/lib/format/references.mjs +96 -1
- package/src/lib/format/references.mjs.map +1 -1
- package/src/lib/format/slots-options.d.mts +26 -0
- package/src/lib/format/slots-options.d.ts +26 -0
- package/src/lib/format/slots-options.js +35 -0
- package/src/lib/format/slots-options.js.map +1 -0
- package/src/lib/format/slots-options.mjs +31 -0
- package/src/lib/format/slots-options.mjs.map +1 -0
- package/src/lib/format/upgrade.d.mts +4 -1
- package/src/lib/format/upgrade.d.ts +4 -1
- package/src/lib/format/upgrade.js +4 -1
- package/src/lib/format/upgrade.js.map +1 -1
- package/src/lib/format/upgrade.mjs +4 -1
- package/src/lib/format/upgrade.mjs.map +1 -1
- package/src/lib/format/version.d.mts +2 -2
- package/src/lib/format/version.d.ts +2 -2
- package/src/lib/format/version.js +2 -2
- package/src/lib/format/version.js.map +1 -1
- package/src/lib/format/version.mjs +2 -2
- package/src/lib/format/version.mjs.map +1 -1
- package/src/lib/format/zoned.d.mts +8 -0
- package/src/lib/format/zoned.d.ts +8 -0
- package/src/lib/format/zoned.js +36 -0
- package/src/lib/format/zoned.js.map +1 -0
- package/src/lib/format/zoned.mjs +33 -0
- package/src/lib/format/zoned.mjs.map +1 -0
- package/src/lib/record/check.d.mts +6 -1
- package/src/lib/record/check.d.ts +6 -1
- package/src/lib/record/check.js +12 -4
- package/src/lib/record/check.js.map +1 -1
- package/src/lib/record/check.mjs +12 -4
- package/src/lib/record/check.mjs.map +1 -1
- package/src/lib/record/data-source.d.mts +188 -3
- package/src/lib/record/data-source.d.ts +188 -3
- package/src/lib/record/data-source.js.map +1 -1
- package/src/lib/record/data-source.mjs.map +1 -1
- package/src/lib/record/form.d.mts +72 -25
- package/src/lib/record/form.d.ts +72 -25
- package/src/lib/record/form.js +404 -78
- package/src/lib/record/form.js.map +1 -1
- package/src/lib/record/form.mjs +404 -78
- package/src/lib/record/form.mjs.map +1 -1
- package/src/lib/record/input-rules.d.mts +51 -9
- package/src/lib/record/input-rules.d.ts +51 -9
- package/src/lib/record/input-rules.js +119 -20
- package/src/lib/record/input-rules.js.map +1 -1
- package/src/lib/record/input-rules.mjs +118 -19
- package/src/lib/record/input-rules.mjs.map +1 -1
- package/src/lib/record/inputs.js +4 -2
- package/src/lib/record/inputs.js.map +1 -1
- package/src/lib/record/inputs.mjs +4 -2
- package/src/lib/record/inputs.mjs.map +1 -1
- package/src/lib/record/limits.d.mts +1 -1
- package/src/lib/record/limits.d.ts +1 -1
- package/src/lib/record/limits.js +4 -2
- package/src/lib/record/limits.js.map +1 -1
- package/src/lib/record/limits.mjs +4 -2
- package/src/lib/record/limits.mjs.map +1 -1
- package/src/lib/record/locales/ar.js +3 -2
- package/src/lib/record/locales/ar.js.map +1 -1
- package/src/lib/record/locales/ar.mjs +3 -2
- package/src/lib/record/locales/ar.mjs.map +1 -1
- package/src/lib/record/locales/de.js +3 -2
- package/src/lib/record/locales/de.js.map +1 -1
- package/src/lib/record/locales/de.mjs +3 -2
- package/src/lib/record/locales/de.mjs.map +1 -1
- package/src/lib/record/locales/fr.js +3 -2
- package/src/lib/record/locales/fr.js.map +1 -1
- package/src/lib/record/locales/fr.mjs +3 -2
- package/src/lib/record/locales/fr.mjs.map +1 -1
- package/src/lib/record/memory-data-source.d.mts +13 -2
- package/src/lib/record/memory-data-source.d.ts +13 -2
- package/src/lib/record/memory-data-source.js +92 -35
- package/src/lib/record/memory-data-source.js.map +1 -1
- package/src/lib/record/memory-data-source.mjs +93 -36
- package/src/lib/record/memory-data-source.mjs.map +1 -1
- package/src/lib/record/memory-schedules.d.mts +45 -0
- package/src/lib/record/memory-schedules.d.ts +45 -0
- package/src/lib/record/memory-schedules.js +81 -0
- package/src/lib/record/memory-schedules.js.map +1 -0
- package/src/lib/record/memory-schedules.mjs +78 -0
- package/src/lib/record/memory-schedules.mjs.map +1 -0
- package/src/lib/record/messages.d.mts +3 -1
- package/src/lib/record/messages.d.ts +3 -1
- package/src/lib/record/messages.js +3 -2
- package/src/lib/record/messages.js.map +1 -1
- package/src/lib/record/messages.mjs +3 -2
- package/src/lib/record/messages.mjs.map +1 -1
- package/src/lib/record/periods.d.mts +47 -0
- package/src/lib/record/periods.d.ts +47 -0
- package/src/lib/record/periods.js +86 -0
- package/src/lib/record/periods.js.map +1 -0
- package/src/lib/record/periods.mjs +79 -0
- package/src/lib/record/periods.mjs.map +1 -0
- package/src/lib/record/rules.js +5 -6
- package/src/lib/record/rules.js.map +1 -1
- package/src/lib/record/rules.mjs +5 -6
- package/src/lib/record/rules.mjs.map +1 -1
- package/src/lib/record/run.d.mts +44 -8
- package/src/lib/record/run.d.ts +44 -8
- package/src/lib/record/run.js +155 -26
- package/src/lib/record/run.js.map +1 -1
- package/src/lib/record/run.mjs +156 -27
- package/src/lib/record/run.mjs.map +1 -1
- package/src/lib/record/search.d.mts +13 -3
- package/src/lib/record/search.d.ts +13 -3
- package/src/lib/record/search.js +11 -4
- package/src/lib/record/search.js.map +1 -1
- package/src/lib/record/search.mjs +11 -4
- package/src/lib/record/search.mjs.map +1 -1
- package/src/lib/record/zones.d.mts +57 -0
- package/src/lib/record/zones.d.ts +57 -0
- package/src/lib/record/zones.js +147 -0
- package/src/lib/record/zones.js.map +1 -0
- package/src/lib/record/zones.mjs +132 -0
- package/src/lib/record/zones.mjs.map +1 -0
- package/src/runtime.d.mts +12 -5
- package/src/runtime.d.ts +12 -5
- package/src/runtime.js +32 -2
- package/src/runtime.js.map +1 -1
- package/src/runtime.mjs +7 -1
- package/src/runtime.mjs.map +1 -1
package/README.md
CHANGED
|
@@ -28,7 +28,7 @@ list of records — that your app implements;
|
|
|
28
28
|
The page format is also a JSON Schema, for editors and other languages:
|
|
29
29
|
`@fieldia/core/page.schema.json`.
|
|
30
30
|
|
|
31
|
-
A page says which format it is written in (`"fieldia": "0.
|
|
31
|
+
A page says which format it is written in (`"fieldia": "0.3"`, `FORMAT_VERSION`; a page in 0.1 or 0.2 is read as it is).
|
|
32
32
|
One in an older format is brought up to date as it is read — by `checkPage`,
|
|
33
33
|
`validatePage` and `createForm`, so by the viewer and the designer too — and
|
|
34
34
|
`upgradePage` does it for the pages your app keeps. One newer than this Fieldia
|
|
@@ -63,6 +63,43 @@ settings each kind has are `PART_LOOKS`:
|
|
|
63
63
|
}
|
|
64
64
|
```
|
|
65
65
|
|
|
66
|
+
## A public form's bot check
|
|
67
|
+
|
|
68
|
+
A page of responses anyone may send — a sign-up, a contact form — can check that
|
|
69
|
+
a person sent it (`botCheck`): a box no person sees or reaches, which a bot
|
|
70
|
+
filling every box fills (`honeypot`, on unless `false`); the fewest seconds a
|
|
71
|
+
person takes from the page shown to its send (`minSeconds`, 3 unless said; 0
|
|
72
|
+
tells none); and the slot the app draws its own captcha in (`captcha`: a slot's
|
|
73
|
+
name — Turnstile, reCAPTCHA, hCaptcha):
|
|
74
|
+
|
|
75
|
+
```json
|
|
76
|
+
"layout": { "type": "sections", "id": "signup", "children": [
|
|
77
|
+
…,
|
|
78
|
+
{ "type": "slot", "id": "s-captcha", "name": "captcha" }
|
|
79
|
+
] },
|
|
80
|
+
"botCheck": { "minSeconds": 3, "captcha": "captcha" }
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
Nothing is refused for it on the page: each send tells the app what it saw,
|
|
84
|
+
beside the answers (`submit({ pageId, values, bot })`, and the `send` event), and
|
|
85
|
+
the app decides — keep the response aside, check the token with its service, or
|
|
86
|
+
refuse it:
|
|
87
|
+
|
|
88
|
+
```ts
|
|
89
|
+
async submit({ pageId, values, bot }) {
|
|
90
|
+
// bot: { honeypot: false, tooFast: false, seconds: 41.2, captcha: '0.Zx…' }
|
|
91
|
+
if (bot?.honeypot || bot?.tooFast) return keepAside(pageId, values);
|
|
92
|
+
if (bot && !(await verifyTurnstile(bot.captcha))) throw saveRefused({ kind: 'rule', message: 'Tick “I am human” first' });
|
|
93
|
+
return store(pageId, values);
|
|
94
|
+
}
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
The app's captcha widget hands its token to the form, `form.botCheck({ captcha: token })`
|
|
98
|
+
(null once it expires); a token goes once it is sent, as a captcha's is spent. The
|
|
99
|
+
viewer draws the hidden box and tells the form when it is filled
|
|
100
|
+
(`form.botCheck({ honeypot: true })`). A page without `botCheck` sends what it
|
|
101
|
+
always did.
|
|
102
|
+
|
|
66
103
|
## Files stored as they are picked
|
|
67
104
|
|
|
68
105
|
Give the data source `upload(file, request)` and a file or picture field sends
|
|
@@ -96,6 +133,75 @@ your words and offers no Retry; any other error offers Retry. Stop with an
|
|
|
96
133
|
one. Without `upload`, files travel inside the record as base64, as before.
|
|
97
134
|
See [files stored as they are picked](https://fieldia.dev/data/#upload).
|
|
98
135
|
|
|
136
|
+
## Lists that add up, and filter by time
|
|
137
|
+
|
|
138
|
+
A list asks its source's optional `totals({ model, filter, totals, groupBy?,
|
|
139
|
+
interval?, currencies? })` for a column's sum, average, lowest, highest or
|
|
140
|
+
count — over the search, under each group, or the rows ticked (`id in` their
|
|
141
|
+
ids) — and its `groups` for a date by the span it falls in (`interval`: `day`,
|
|
142
|
+
`week`, `month`, `quarter` or `year`, with `weekStart` and `timeZone`), each
|
|
143
|
+
group's value its span's first day. An amount named in `currencies` (by the
|
|
144
|
+
field holding each record's currency) is totalled within one currency only:
|
|
145
|
+
over several, its sum is `null`, and `currencies` in the answer names the one
|
|
146
|
+
it is in. A period a list's filter names ("This month", "Overdue") arrives as
|
|
147
|
+
plain conditions. `spanStart(value, interval, { weekStart, timeZone })` finds
|
|
148
|
+
the span a value falls in as the list counts it, and `dayIn` and `dayStarts`
|
|
149
|
+
a day in a time zone; `createMemoryDataSource` does it all. See
|
|
150
|
+
[lists that add up](https://fieldia.dev/lists/#totals).
|
|
151
|
+
|
|
152
|
+
## Time zones and booking slots
|
|
153
|
+
|
|
154
|
+
A page may name the time zone its dates and times are in, by its IANA name —
|
|
155
|
+
a branch's, a clinic's — and a date and time field may name its own:
|
|
156
|
+
|
|
157
|
+
```json
|
|
158
|
+
{ "timeZone": "Europe/Berlin", "fields": { "flight": { "type": "datetime", "label": "Departs", "timeZone": "Africa/Cairo" } } }
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
A date and time is still kept as an instant, as before (`2026-10-15T12:30:00.000Z`;
|
|
162
|
+
one written with its offset is read the same). It is shown and typed on the
|
|
163
|
+
zone's clock wherever the person is, with the zone's short name beside it where
|
|
164
|
+
the browser's zone is another ("14:30 CEST"). Today is the zone's day: a date's
|
|
165
|
+
default `"today"`, its earliest and latest counted from today, `today()`, a
|
|
166
|
+
rule's past and future, and `form.today()`. A time the clocks skip, or repeat, on
|
|
167
|
+
a change day is said, never moved. `zonedPage(page)` writes the page's zone into
|
|
168
|
+
each date and time field that names none, as the form and the viewer read it;
|
|
169
|
+
`wallTime`, `instantsAt`, `dayIn` and `clocksSkip` are the clock arithmetic
|
|
170
|
+
they use. `checkPage` and `validatePage` refuse a zone the browser does not know.
|
|
171
|
+
Without `timeZone`, the browser's own zone, as before.
|
|
172
|
+
|
|
173
|
+
A date and time drawn as booking slots (`"widget": "slots"`) asks the data
|
|
174
|
+
source's `slots(request)` for its free times: the days asked (`from`, `to`, in
|
|
175
|
+
`timeZone`), the schedule its node names (`options.schedule`), the booking's
|
|
176
|
+
`length` and the minutes `between` two as the page says, the record and its
|
|
177
|
+
values. It answers each day's state — `open`, `full`, `closed`, `holiday` with a
|
|
178
|
+
`note` — and the times free, as instants, and may say the booking's `length`.
|
|
179
|
+
`form.findSlots(field, { from, to })` asks it for a widget of your own;
|
|
180
|
+
`form.canFindSlots()` says whether the source can. Without `slots`, the field is
|
|
181
|
+
the plain date and time box. For demos and tests, `scheduleSlots(schedules)`
|
|
182
|
+
answers from booking schedules — hours by the day of the week on a zone's clock,
|
|
183
|
+
a booking's length, the minutes kept free after one, holidays, and the records
|
|
184
|
+
the bookings are:
|
|
185
|
+
|
|
186
|
+
```ts
|
|
187
|
+
import { createMemoryDataSource, scheduleSlots } from '@fieldia/core';
|
|
188
|
+
|
|
189
|
+
const weekday: [string, string][] = [['09:00', '13:00'], ['14:00', '18:00']];
|
|
190
|
+
const dataSource = createMemoryDataSource({
|
|
191
|
+
records,
|
|
192
|
+
slots: scheduleSlots({
|
|
193
|
+
showroom: {
|
|
194
|
+
timeZone: 'Europe/Berlin',
|
|
195
|
+
hours: { 1: weekday, 2: weekday, 3: weekday, 4: weekday, 5: weekday, 6: [['10:00', '14:00']] },
|
|
196
|
+
length: 45,
|
|
197
|
+
between: 15,
|
|
198
|
+
holidays: { '2026-12-25': 'Christmas Day' },
|
|
199
|
+
bookings: { model: 'drive.booking', field: 'start', endField: 'stop', same: ['car'] },
|
|
200
|
+
},
|
|
201
|
+
}),
|
|
202
|
+
});
|
|
203
|
+
```
|
|
204
|
+
|
|
99
205
|
## Two people, one record
|
|
100
206
|
|
|
101
207
|
A source that keeps versions returns each record with its version, and what this
|
|
@@ -141,7 +247,8 @@ values. It asks only about the person's work at risk (`workAtRisk(state)`):
|
|
|
141
247
|
each change of theirs the last finished save of the record did not send —
|
|
142
248
|
typed while it was on its way, while the run that saved went on, or since
|
|
143
249
|
(`state.unsent`, told against the record as that save left it; a value set by
|
|
144
|
-
a step, a rule, a compute or your app is never theirs
|
|
250
|
+
a step, a rule, a compute or your app is never theirs; text they left since
|
|
251
|
+
that does not read, "12a", counts as "12" does) — a file the store holds
|
|
145
252
|
that no save sent, files still on their way, and changes Reload set aside. Then
|
|
146
253
|
it asks "Discard your changes?" through the host's `ask(message, { discard:
|
|
147
254
|
true })`, or `confirm`; Cancel keeps the person where they are, and with
|
|
@@ -150,13 +257,38 @@ out behaves as it did in 0.20: a change not saved goes where a step leaves the
|
|
|
150
257
|
record. `form.leaveNow()` says whether a way out can go at once. Call
|
|
151
258
|
`form.leave()` before your app's own ways out — a route change, an unmount —
|
|
152
259
|
and `unsavedWork(state)` (any change, file or change set aside) for a browser's
|
|
153
|
-
`beforeunload
|
|
260
|
+
`beforeunload`, or let the viewer keep it (`warnOnLeave`). A save refused for a
|
|
261
|
+
conflict, waiting for Reload or Keep mine, is at risk too: the person asked for
|
|
262
|
+
it to be saved. Discard lets the changes no save took go back to the record as
|
|
263
|
+
the last save left it. Every answer that comes late — an onchange, a step's
|
|
264
|
+
Archive, Duplicate or Delete, Keep mine's read, a name a box looks up — is laid
|
|
265
|
+
only on the record it was asked for: anything of your own that waits and then
|
|
266
|
+
writes on the form asks `form.recordShown()` first (taken as it asks, true
|
|
267
|
+
while that record is still shown, as it was). What `can` does
|
|
154
268
|
not allow is kept to before any source is asked: fields locked or hidden (and
|
|
155
269
|
left out of what a save sends), a save refused with the source's `reason`, the
|
|
156
270
|
gear menu's Archive, Duplicate and Delete and the buttons whose steps would do
|
|
157
271
|
them hidden. `createMemoryDataSource({ versions: { by: 'Sara' }, can })` does
|
|
158
272
|
it all in memory, and `changeElsewhere` changes a record as someone else would.
|
|
159
273
|
|
|
274
|
+
## Many records at once
|
|
275
|
+
|
|
276
|
+
A list's "Select all 1,284 that match", its Export and its Edit of many
|
|
277
|
+
records read three optional members. `list({ …, allIds: true })` answers with
|
|
278
|
+
`allIds`, every matching id in the list's order (fewer than `total` means the
|
|
279
|
+
source stopped short, and the list says so). `writeMany({ model, ids, values,
|
|
280
|
+
fields, versions })` writes one value in a field of each record and answers
|
|
281
|
+
`{ failed: [{ id, message, problem? }] }`; without it the list saves each record
|
|
282
|
+
in turn (`save` with `partial: true` and the version it was listed at).
|
|
283
|
+
`exportRecords(request)` writes an export on the server: answer with the file
|
|
284
|
+
(`{ name, data }`, data a Blob, bytes or text, or `{ name, url }`), with
|
|
285
|
+
`{ message }` when it is handed over another way, or with `false` to let the
|
|
286
|
+
browser write it. A page offers Edit with its list's `bulkEdit` (`true`, or the
|
|
287
|
+
fields), and Export with `"export": true` — each off unless asked; `bulkEditFields(page, list)`
|
|
288
|
+
says which fields Edit offers. `createMemoryDataSource` gives `allIds` and
|
|
289
|
+
`writeMany` (each record refused as its save would be), and no `exportRecords`.
|
|
290
|
+
See [many records at once](https://fieldia.dev/data/#many).
|
|
291
|
+
|
|
160
292
|
## A saved form placed in another
|
|
161
293
|
|
|
162
294
|
A block made once — an address, a contact person, a consent — is a page of its
|
package/package.json
CHANGED
package/schema/page.schema.json
CHANGED
|
@@ -6,7 +6,8 @@
|
|
|
6
6
|
"type": "string",
|
|
7
7
|
"enum": [
|
|
8
8
|
"0.1",
|
|
9
|
-
"0.2"
|
|
9
|
+
"0.2",
|
|
10
|
+
"0.3"
|
|
10
11
|
]
|
|
11
12
|
},
|
|
12
13
|
"id": {
|
|
@@ -349,6 +350,15 @@
|
|
|
349
350
|
},
|
|
350
351
|
"on": {
|
|
351
352
|
"$ref": "#/$defs/PageEvents"
|
|
353
|
+
},
|
|
354
|
+
"botCheck": {
|
|
355
|
+
"$ref": "#/$defs/BotCheck"
|
|
356
|
+
},
|
|
357
|
+
"phone": {
|
|
358
|
+
"$ref": "#/$defs/PagePhone"
|
|
359
|
+
},
|
|
360
|
+
"timeZone": {
|
|
361
|
+
"$ref": "#/$defs/TimeZone"
|
|
352
362
|
}
|
|
353
363
|
},
|
|
354
364
|
"required": [
|
|
@@ -868,6 +878,9 @@
|
|
|
868
878
|
"minimum": 1,
|
|
869
879
|
"maximum": 7
|
|
870
880
|
}
|
|
881
|
+
},
|
|
882
|
+
"timeZone": {
|
|
883
|
+
"$ref": "#/$defs/TimeZone"
|
|
871
884
|
}
|
|
872
885
|
},
|
|
873
886
|
"required": [
|
|
@@ -1695,6 +1708,17 @@
|
|
|
1695
1708
|
},
|
|
1696
1709
|
"additionalProperties": false
|
|
1697
1710
|
},
|
|
1711
|
+
"TimeZone": {
|
|
1712
|
+
"type": "string",
|
|
1713
|
+
"pattern": "^[A-Za-z][\\w+-]*(\\/[\\w+-]+)*$",
|
|
1714
|
+
"description": "A time zone by its IANA name: its dates and times are shown and typed on that zone's clock.",
|
|
1715
|
+
"examples": [
|
|
1716
|
+
"Africa/Cairo",
|
|
1717
|
+
"Europe/Berlin",
|
|
1718
|
+
"America/New_York",
|
|
1719
|
+
"UTC"
|
|
1720
|
+
]
|
|
1721
|
+
},
|
|
1698
1722
|
"Option": {
|
|
1699
1723
|
"type": "object",
|
|
1700
1724
|
"properties": {
|
|
@@ -2327,6 +2351,9 @@
|
|
|
2327
2351
|
"minimum": 1,
|
|
2328
2352
|
"maximum": 7
|
|
2329
2353
|
}
|
|
2354
|
+
},
|
|
2355
|
+
"timeZone": {
|
|
2356
|
+
"$ref": "#/$defs/TimeZone"
|
|
2330
2357
|
}
|
|
2331
2358
|
},
|
|
2332
2359
|
"required": [
|
|
@@ -2973,6 +3000,9 @@
|
|
|
2973
3000
|
"minimum": 1,
|
|
2974
3001
|
"maximum": 7
|
|
2975
3002
|
}
|
|
3003
|
+
},
|
|
3004
|
+
"timeZone": {
|
|
3005
|
+
"$ref": "#/$defs/TimeZone"
|
|
2976
3006
|
}
|
|
2977
3007
|
},
|
|
2978
3008
|
"required": [
|
|
@@ -4157,6 +4187,9 @@
|
|
|
4157
4187
|
"minimum": 1,
|
|
4158
4188
|
"maximum": 7
|
|
4159
4189
|
}
|
|
4190
|
+
},
|
|
4191
|
+
"timeZone": {
|
|
4192
|
+
"$ref": "#/$defs/TimeZone"
|
|
4160
4193
|
}
|
|
4161
4194
|
},
|
|
4162
4195
|
"required": [
|
|
@@ -5770,6 +5803,22 @@
|
|
|
5770
5803
|
"$ref": "#/$defs/PlaceholderWhen"
|
|
5771
5804
|
}
|
|
5772
5805
|
},
|
|
5806
|
+
"autocomplete": {
|
|
5807
|
+
"type": "string",
|
|
5808
|
+
"pattern": "^(?:on|off|(?:section-\\S*(?: +(?:shipping|billing))?|shipping|billing)|(?:(?:section-\\S*(?: +(?:shipping|billing))?|shipping|billing) +)?(?:name|honorific-prefix|given-name|additional-name|family-name|honorific-suffix|nickname|username|new-password|current-password|one-time-code|organization-title|organization|street-address|address-line1|address-line2|address-line3|address-level4|address-level3|address-level2|address-level1|country|country-name|postal-code|cc-name|cc-given-name|cc-additional-name|cc-family-name|cc-number|cc-exp|cc-exp-month|cc-exp-year|cc-csc|cc-type|transaction-currency|transaction-amount|language|bday|bday-day|bday-month|bday-year|sex|url|photo|(?:(?:home|work|mobile|fax|pager) +)?(?:tel|tel-country-code|tel-national|tel-area-code|tel-local|tel-local-prefix|tel-local-suffix|tel-extension|email|impp))(?: +webauthn)?)$"
|
|
5809
|
+
},
|
|
5810
|
+
"inputmode": {
|
|
5811
|
+
"type": "string",
|
|
5812
|
+
"enum": [
|
|
5813
|
+
"text",
|
|
5814
|
+
"numeric",
|
|
5815
|
+
"decimal",
|
|
5816
|
+
"tel",
|
|
5817
|
+
"email",
|
|
5818
|
+
"url",
|
|
5819
|
+
"search"
|
|
5820
|
+
]
|
|
5821
|
+
},
|
|
5773
5822
|
"help": {
|
|
5774
5823
|
"type": "string"
|
|
5775
5824
|
},
|
|
@@ -8662,14 +8711,28 @@
|
|
|
8662
8711
|
"items": {
|
|
8663
8712
|
"$ref": "#/$defs/FilterItem"
|
|
8664
8713
|
}
|
|
8714
|
+
},
|
|
8715
|
+
"period": {
|
|
8716
|
+
"$ref": "#/$defs/FilterPeriod"
|
|
8665
8717
|
}
|
|
8666
8718
|
},
|
|
8667
8719
|
"required": [
|
|
8668
8720
|
"id",
|
|
8669
|
-
"label"
|
|
8670
|
-
"filter"
|
|
8721
|
+
"label"
|
|
8671
8722
|
],
|
|
8672
|
-
"additionalProperties": false
|
|
8723
|
+
"additionalProperties": false,
|
|
8724
|
+
"anyOf": [
|
|
8725
|
+
{
|
|
8726
|
+
"required": [
|
|
8727
|
+
"filter"
|
|
8728
|
+
]
|
|
8729
|
+
},
|
|
8730
|
+
{
|
|
8731
|
+
"required": [
|
|
8732
|
+
"period"
|
|
8733
|
+
]
|
|
8734
|
+
}
|
|
8735
|
+
]
|
|
8673
8736
|
}
|
|
8674
8737
|
},
|
|
8675
8738
|
"defaultFilters": {
|
|
@@ -8845,6 +8908,24 @@
|
|
|
8845
8908
|
"parentField": {
|
|
8846
8909
|
"type": "string",
|
|
8847
8910
|
"pattern": "^[A-Za-z_][A-Za-z0-9_]*$"
|
|
8911
|
+
},
|
|
8912
|
+
"export": {
|
|
8913
|
+
"type": "boolean"
|
|
8914
|
+
},
|
|
8915
|
+
"bulkEdit": {
|
|
8916
|
+
"anyOf": [
|
|
8917
|
+
{
|
|
8918
|
+
"type": "boolean"
|
|
8919
|
+
},
|
|
8920
|
+
{
|
|
8921
|
+
"minItems": 1,
|
|
8922
|
+
"type": "array",
|
|
8923
|
+
"items": {
|
|
8924
|
+
"type": "string",
|
|
8925
|
+
"pattern": "^[A-Za-z_][A-Za-z0-9_]*$"
|
|
8926
|
+
}
|
|
8927
|
+
}
|
|
8928
|
+
]
|
|
8848
8929
|
}
|
|
8849
8930
|
},
|
|
8850
8931
|
"required": [
|
|
@@ -8854,6 +8935,35 @@
|
|
|
8854
8935
|
],
|
|
8855
8936
|
"additionalProperties": false
|
|
8856
8937
|
},
|
|
8938
|
+
"FilterPeriod": {
|
|
8939
|
+
"type": "object",
|
|
8940
|
+
"properties": {
|
|
8941
|
+
"field": {
|
|
8942
|
+
"type": "string",
|
|
8943
|
+
"pattern": "^[A-Za-z_][A-Za-z0-9_]*$"
|
|
8944
|
+
},
|
|
8945
|
+
"is": {
|
|
8946
|
+
"type": "string",
|
|
8947
|
+
"enum": [
|
|
8948
|
+
"today",
|
|
8949
|
+
"yesterday",
|
|
8950
|
+
"thisWeek",
|
|
8951
|
+
"lastWeek",
|
|
8952
|
+
"thisMonth",
|
|
8953
|
+
"lastMonth",
|
|
8954
|
+
"thisYear",
|
|
8955
|
+
"last7Days",
|
|
8956
|
+
"last30Days",
|
|
8957
|
+
"overdue"
|
|
8958
|
+
]
|
|
8959
|
+
}
|
|
8960
|
+
},
|
|
8961
|
+
"required": [
|
|
8962
|
+
"field",
|
|
8963
|
+
"is"
|
|
8964
|
+
],
|
|
8965
|
+
"additionalProperties": false
|
|
8966
|
+
},
|
|
8857
8967
|
"ListMap": {
|
|
8858
8968
|
"type": "object",
|
|
8859
8969
|
"properties": {
|
|
@@ -9158,6 +9268,16 @@
|
|
|
9158
9268
|
"end"
|
|
9159
9269
|
]
|
|
9160
9270
|
},
|
|
9271
|
+
"total": {
|
|
9272
|
+
"type": "string",
|
|
9273
|
+
"enum": [
|
|
9274
|
+
"sum",
|
|
9275
|
+
"avg",
|
|
9276
|
+
"min",
|
|
9277
|
+
"max",
|
|
9278
|
+
"count"
|
|
9279
|
+
]
|
|
9280
|
+
},
|
|
9161
9281
|
"rule": {
|
|
9162
9282
|
"anyOf": [
|
|
9163
9283
|
{
|
|
@@ -9227,6 +9347,41 @@
|
|
|
9227
9347
|
}
|
|
9228
9348
|
},
|
|
9229
9349
|
"additionalProperties": false
|
|
9350
|
+
},
|
|
9351
|
+
"BotCheck": {
|
|
9352
|
+
"type": "object",
|
|
9353
|
+
"properties": {
|
|
9354
|
+
"honeypot": {
|
|
9355
|
+
"type": "boolean"
|
|
9356
|
+
},
|
|
9357
|
+
"minSeconds": {
|
|
9358
|
+
"type": "number",
|
|
9359
|
+
"minimum": 0,
|
|
9360
|
+
"maximum": 3600
|
|
9361
|
+
},
|
|
9362
|
+
"captcha": {
|
|
9363
|
+
"type": "string",
|
|
9364
|
+
"minLength": 1
|
|
9365
|
+
}
|
|
9366
|
+
},
|
|
9367
|
+
"additionalProperties": false
|
|
9368
|
+
},
|
|
9369
|
+
"PagePhone": {
|
|
9370
|
+
"type": "object",
|
|
9371
|
+
"properties": {
|
|
9372
|
+
"country": {
|
|
9373
|
+
"type": "string",
|
|
9374
|
+
"pattern": "^[A-Z]{2}$"
|
|
9375
|
+
},
|
|
9376
|
+
"shown": {
|
|
9377
|
+
"type": "string",
|
|
9378
|
+
"enum": [
|
|
9379
|
+
"international",
|
|
9380
|
+
"national"
|
|
9381
|
+
]
|
|
9382
|
+
}
|
|
9383
|
+
},
|
|
9384
|
+
"additionalProperties": false
|
|
9230
9385
|
}
|
|
9231
9386
|
}
|
|
9232
9387
|
}
|
package/src/index.d.mts
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
export * from './runtime.mjs';
|
|
2
|
-
export {
|
|
3
|
-
export {
|
|
2
|
+
export { scheduleSlots, type MemorySchedule } from './lib/record/memory-schedules.mjs';
|
|
3
|
+
export { FieldSchema, FieldsSchema, LineFieldSchema, LineKindsSchema, OptionSchema, PropertyDefinitionSchema, FilterConditionSchema, FilterItemSchema, MoneyLookSchema, ShrinkSchema, PERIODS, TimeZoneSchema, } from './lib/format/field.mjs';
|
|
4
|
+
export { ModifierSchema, RolesSchema, CellRulesSchema, ToneWhenSchema, LayoutNodeSchema, RootLayoutSchema, ListNodeSchema, ListCellSchema, ListCalendarSchema, FilterPeriodSchema } from './lib/format/layout.mjs';
|
|
4
5
|
export { PageSchema } from './lib/format/page.mjs';
|
|
5
6
|
export { ActionStepSchema, PageEventsSchema } from './lib/format/actions.mjs';
|
|
6
7
|
export { validatePage } from './lib/format/validate.mjs';
|
|
7
8
|
export { AddressSearchOptionsSchema } from './lib/format/address-search.mjs';
|
|
8
9
|
export { PathPickerOptionsSchema, StateDotOptionsSchema } from './lib/format/picker-options.mjs';
|
|
10
|
+
export { PagePhoneSchema, PhoneOptionsSchema } from './lib/format/phone.mjs';
|
|
11
|
+
export { SlotsOptionsSchema } from './lib/format/slots-options.mjs';
|
|
9
12
|
export { pageJsonSchema } from './lib/format/json-schema.mjs';
|
|
13
|
+
export { AUTOFILL, AUTOFILL_CONTACT, AUTOFILL_NAMES, autofillProblem, autofillPurpose } from './lib/format/autofill.mjs';
|
package/src/index.d.ts
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
export * from './runtime';
|
|
2
|
-
export {
|
|
3
|
-
export {
|
|
2
|
+
export { scheduleSlots, type MemorySchedule } from './lib/record/memory-schedules';
|
|
3
|
+
export { FieldSchema, FieldsSchema, LineFieldSchema, LineKindsSchema, OptionSchema, PropertyDefinitionSchema, FilterConditionSchema, FilterItemSchema, MoneyLookSchema, ShrinkSchema, PERIODS, TimeZoneSchema, } from './lib/format/field';
|
|
4
|
+
export { ModifierSchema, RolesSchema, CellRulesSchema, ToneWhenSchema, LayoutNodeSchema, RootLayoutSchema, ListNodeSchema, ListCellSchema, ListCalendarSchema, FilterPeriodSchema } from './lib/format/layout';
|
|
4
5
|
export { PageSchema } from './lib/format/page';
|
|
5
6
|
export { ActionStepSchema, PageEventsSchema } from './lib/format/actions';
|
|
6
7
|
export { validatePage } from './lib/format/validate';
|
|
7
8
|
export { AddressSearchOptionsSchema } from './lib/format/address-search';
|
|
8
9
|
export { PathPickerOptionsSchema, StateDotOptionsSchema } from './lib/format/picker-options';
|
|
10
|
+
export { PagePhoneSchema, PhoneOptionsSchema } from './lib/format/phone';
|
|
11
|
+
export { SlotsOptionsSchema } from './lib/format/slots-options';
|
|
9
12
|
export { pageJsonSchema } from './lib/format/json-schema';
|
|
13
|
+
export { AUTOFILL, AUTOFILL_CONTACT, AUTOFILL_NAMES, autofillProblem, autofillPurpose } from './lib/format/autofill';
|
package/src/index.js
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.pageJsonSchema = exports.StateDotOptionsSchema = exports.PathPickerOptionsSchema = exports.AddressSearchOptionsSchema = exports.validatePage = exports.PageEventsSchema = exports.ActionStepSchema = exports.PageSchema = exports.ListCalendarSchema = exports.ListCellSchema = exports.ListNodeSchema = exports.RootLayoutSchema = exports.LayoutNodeSchema = exports.ToneWhenSchema = exports.CellRulesSchema = exports.RolesSchema = exports.ModifierSchema = exports.PERIODS = exports.ShrinkSchema = exports.MoneyLookSchema = exports.FilterItemSchema = exports.FilterConditionSchema = exports.PropertyDefinitionSchema = exports.OptionSchema = exports.LineKindsSchema = exports.LineFieldSchema = exports.FieldsSchema = exports.FieldSchema = void 0;
|
|
3
|
+
exports.autofillPurpose = exports.autofillProblem = exports.AUTOFILL_NAMES = exports.AUTOFILL_CONTACT = exports.AUTOFILL = exports.pageJsonSchema = exports.SlotsOptionsSchema = exports.PhoneOptionsSchema = exports.PagePhoneSchema = exports.StateDotOptionsSchema = exports.PathPickerOptionsSchema = exports.AddressSearchOptionsSchema = exports.validatePage = exports.PageEventsSchema = exports.ActionStepSchema = exports.PageSchema = exports.FilterPeriodSchema = exports.ListCalendarSchema = exports.ListCellSchema = exports.ListNodeSchema = exports.RootLayoutSchema = exports.LayoutNodeSchema = exports.ToneWhenSchema = exports.CellRulesSchema = exports.RolesSchema = exports.ModifierSchema = exports.TimeZoneSchema = exports.PERIODS = exports.ShrinkSchema = exports.MoneyLookSchema = exports.FilterItemSchema = exports.FilterConditionSchema = exports.PropertyDefinitionSchema = exports.OptionSchema = exports.LineKindsSchema = exports.LineFieldSchema = exports.FieldsSchema = exports.FieldSchema = exports.scheduleSlots = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
tslib_1.__exportStar(require("./runtime"), exports);
|
|
6
|
+
// A memory source's free times from booking schedules: for demos and tests, outside the one-tag script.
|
|
7
|
+
var memory_schedules_1 = require("./lib/record/memory-schedules");
|
|
8
|
+
Object.defineProperty(exports, "scheduleSlots", { enumerable: true, get: function () { return memory_schedules_1.scheduleSlots; } });
|
|
6
9
|
var field_1 = require("./lib/format/field");
|
|
7
10
|
Object.defineProperty(exports, "FieldSchema", { enumerable: true, get: function () { return field_1.FieldSchema; } });
|
|
8
11
|
Object.defineProperty(exports, "FieldsSchema", { enumerable: true, get: function () { return field_1.FieldsSchema; } });
|
|
@@ -15,6 +18,7 @@ Object.defineProperty(exports, "FilterItemSchema", { enumerable: true, get: func
|
|
|
15
18
|
Object.defineProperty(exports, "MoneyLookSchema", { enumerable: true, get: function () { return field_1.MoneyLookSchema; } });
|
|
16
19
|
Object.defineProperty(exports, "ShrinkSchema", { enumerable: true, get: function () { return field_1.ShrinkSchema; } });
|
|
17
20
|
Object.defineProperty(exports, "PERIODS", { enumerable: true, get: function () { return field_1.PERIODS; } });
|
|
21
|
+
Object.defineProperty(exports, "TimeZoneSchema", { enumerable: true, get: function () { return field_1.TimeZoneSchema; } });
|
|
18
22
|
var layout_1 = require("./lib/format/layout");
|
|
19
23
|
Object.defineProperty(exports, "ModifierSchema", { enumerable: true, get: function () { return layout_1.ModifierSchema; } });
|
|
20
24
|
Object.defineProperty(exports, "RolesSchema", { enumerable: true, get: function () { return layout_1.RolesSchema; } });
|
|
@@ -25,6 +29,7 @@ Object.defineProperty(exports, "RootLayoutSchema", { enumerable: true, get: func
|
|
|
25
29
|
Object.defineProperty(exports, "ListNodeSchema", { enumerable: true, get: function () { return layout_1.ListNodeSchema; } });
|
|
26
30
|
Object.defineProperty(exports, "ListCellSchema", { enumerable: true, get: function () { return layout_1.ListCellSchema; } });
|
|
27
31
|
Object.defineProperty(exports, "ListCalendarSchema", { enumerable: true, get: function () { return layout_1.ListCalendarSchema; } });
|
|
32
|
+
Object.defineProperty(exports, "FilterPeriodSchema", { enumerable: true, get: function () { return layout_1.FilterPeriodSchema; } });
|
|
28
33
|
var page_1 = require("./lib/format/page");
|
|
29
34
|
Object.defineProperty(exports, "PageSchema", { enumerable: true, get: function () { return page_1.PageSchema; } });
|
|
30
35
|
var actions_1 = require("./lib/format/actions");
|
|
@@ -37,6 +42,18 @@ Object.defineProperty(exports, "AddressSearchOptionsSchema", { enumerable: true,
|
|
|
37
42
|
var picker_options_1 = require("./lib/format/picker-options");
|
|
38
43
|
Object.defineProperty(exports, "PathPickerOptionsSchema", { enumerable: true, get: function () { return picker_options_1.PathPickerOptionsSchema; } });
|
|
39
44
|
Object.defineProperty(exports, "StateDotOptionsSchema", { enumerable: true, get: function () { return picker_options_1.StateDotOptionsSchema; } });
|
|
45
|
+
var phone_1 = require("./lib/format/phone");
|
|
46
|
+
Object.defineProperty(exports, "PagePhoneSchema", { enumerable: true, get: function () { return phone_1.PagePhoneSchema; } });
|
|
47
|
+
Object.defineProperty(exports, "PhoneOptionsSchema", { enumerable: true, get: function () { return phone_1.PhoneOptionsSchema; } });
|
|
48
|
+
var slots_options_1 = require("./lib/format/slots-options");
|
|
49
|
+
Object.defineProperty(exports, "SlotsOptionsSchema", { enumerable: true, get: function () { return slots_options_1.SlotsOptionsSchema; } });
|
|
40
50
|
var json_schema_1 = require("./lib/format/json-schema");
|
|
41
51
|
Object.defineProperty(exports, "pageJsonSchema", { enumerable: true, get: function () { return json_schema_1.pageJsonSchema; } });
|
|
52
|
+
// The purposes a browser fills a box in with, from the HTML standard, as the format checks them.
|
|
53
|
+
var autofill_1 = require("./lib/format/autofill");
|
|
54
|
+
Object.defineProperty(exports, "AUTOFILL", { enumerable: true, get: function () { return autofill_1.AUTOFILL; } });
|
|
55
|
+
Object.defineProperty(exports, "AUTOFILL_CONTACT", { enumerable: true, get: function () { return autofill_1.AUTOFILL_CONTACT; } });
|
|
56
|
+
Object.defineProperty(exports, "AUTOFILL_NAMES", { enumerable: true, get: function () { return autofill_1.AUTOFILL_NAMES; } });
|
|
57
|
+
Object.defineProperty(exports, "autofillProblem", { enumerable: true, get: function () { return autofill_1.autofillProblem; } });
|
|
58
|
+
Object.defineProperty(exports, "autofillPurpose", { enumerable: true, get: function () { return autofill_1.autofillPurpose; } });
|
|
42
59
|
//# sourceMappingURL=index.js.map
|
package/src/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../libs/core/src/index.ts"],"names":[],"mappings":";;;;AAAA,oDAA0B;AAC1B,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../libs/core/src/index.ts"],"names":[],"mappings":";;;;AAAA,oDAA0B;AAC1B,wGAAwG;AACxG,kEAAmF;AAA1E,iHAAA,aAAa,OAAA;AACtB,4CAa4B;AAZ1B,oGAAA,WAAW,OAAA;AACX,qGAAA,YAAY,OAAA;AACZ,wGAAA,eAAe,OAAA;AACf,wGAAA,eAAe,OAAA;AACf,qGAAA,YAAY,OAAA;AACZ,iHAAA,wBAAwB,OAAA;AACxB,8GAAA,qBAAqB,OAAA;AACrB,yGAAA,gBAAgB,OAAA;AAChB,wGAAA,eAAe,OAAA;AACf,qGAAA,YAAY,OAAA;AACZ,gGAAA,OAAO,OAAA;AACP,uGAAA,cAAc,OAAA;AAEhB,8CAA+M;AAAtM,wGAAA,cAAc,OAAA;AAAE,qGAAA,WAAW,OAAA;AAAE,yGAAA,eAAe,OAAA;AAAE,wGAAA,cAAc,OAAA;AAAE,0GAAA,gBAAgB,OAAA;AAAE,0GAAA,gBAAgB,OAAA;AAAE,wGAAA,cAAc,OAAA;AAAE,wGAAA,cAAc,OAAA;AAAE,4GAAA,kBAAkB,OAAA;AAAE,4GAAA,kBAAkB,OAAA;AACjL,0CAA+C;AAAtC,kGAAA,UAAU,OAAA;AACnB,gDAA0E;AAAjE,2GAAA,gBAAgB,OAAA;AAAE,2GAAA,gBAAgB,OAAA;AAC3C,kDAAqD;AAA5C,wGAAA,YAAY,OAAA;AACrB,8DAAyE;AAAhE,4HAAA,0BAA0B,OAAA;AACnC,8DAA6F;AAApF,yHAAA,uBAAuB,OAAA;AAAE,uHAAA,qBAAqB,OAAA;AACvD,4CAAyE;AAAhE,wGAAA,eAAe,OAAA;AAAE,2GAAA,kBAAkB,OAAA;AAC5C,4DAAgE;AAAvD,mHAAA,kBAAkB,OAAA;AAC3B,wDAA0D;AAAjD,6GAAA,cAAc,OAAA;AACvB,iGAAiG;AACjG,kDAAqH;AAA5G,oGAAA,QAAQ,OAAA;AAAE,4GAAA,gBAAgB,OAAA;AAAE,0GAAA,cAAc,OAAA;AAAE,2GAAA,eAAe,OAAA;AAAE,2GAAA,eAAe,OAAA"}
|
package/src/index.mjs
CHANGED
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
export * from './runtime.mjs';
|
|
2
|
-
|
|
3
|
-
export {
|
|
2
|
+
// A memory source's free times from booking schedules: for demos and tests, outside the one-tag script.
|
|
3
|
+
export { scheduleSlots } from './lib/record/memory-schedules.mjs';
|
|
4
|
+
export { FieldSchema, FieldsSchema, LineFieldSchema, LineKindsSchema, OptionSchema, PropertyDefinitionSchema, FilterConditionSchema, FilterItemSchema, MoneyLookSchema, ShrinkSchema, PERIODS, TimeZoneSchema, } from './lib/format/field.mjs';
|
|
5
|
+
export { ModifierSchema, RolesSchema, CellRulesSchema, ToneWhenSchema, LayoutNodeSchema, RootLayoutSchema, ListNodeSchema, ListCellSchema, ListCalendarSchema, FilterPeriodSchema } from './lib/format/layout.mjs';
|
|
4
6
|
export { PageSchema } from './lib/format/page.mjs';
|
|
5
7
|
export { ActionStepSchema, PageEventsSchema } from './lib/format/actions.mjs';
|
|
6
8
|
export { validatePage } from './lib/format/validate.mjs';
|
|
7
9
|
export { AddressSearchOptionsSchema } from './lib/format/address-search.mjs';
|
|
8
10
|
export { PathPickerOptionsSchema, StateDotOptionsSchema } from './lib/format/picker-options.mjs';
|
|
11
|
+
export { PagePhoneSchema, PhoneOptionsSchema } from './lib/format/phone.mjs';
|
|
12
|
+
export { SlotsOptionsSchema } from './lib/format/slots-options.mjs';
|
|
9
13
|
export { pageJsonSchema } from './lib/format/json-schema.mjs';
|
|
14
|
+
// The purposes a browser fills a box in with, from the HTML standard, as the format checks them.
|
|
15
|
+
export { AUTOFILL, AUTOFILL_CONTACT, AUTOFILL_NAMES, autofillProblem, autofillPurpose } from './lib/format/autofill.mjs';
|
|
10
16
|
//# sourceMappingURL=index.mjs.map
|
package/src/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../../libs/core/src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,OAAO,EACL,WAAW,EACX,YAAY,EACZ,eAAe,EACf,eAAe,EACf,YAAY,EACZ,wBAAwB,EACxB,qBAAqB,EACrB,gBAAgB,EAChB,eAAe,EACf,YAAY,EACZ,OAAO,
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../../libs/core/src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,wGAAwG;AACxG,OAAO,EAAE,aAAa,EAAuB,MAAM,+BAA+B,CAAC;AACnF,OAAO,EACL,WAAW,EACX,YAAY,EACZ,eAAe,EACf,eAAe,EACf,YAAY,EACZ,wBAAwB,EACxB,qBAAqB,EACrB,gBAAgB,EAChB,eAAe,EACf,YAAY,EACZ,OAAO,EACP,cAAc,GACf,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,eAAe,EAAE,cAAc,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,cAAc,EAAE,cAAc,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAC/M,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAC1E,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAE,0BAA0B,EAAE,MAAM,6BAA6B,CAAC;AACzE,OAAO,EAAE,uBAAuB,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAC7F,OAAO,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AACzE,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,iGAAiG;AACjG,OAAO,EAAE,QAAQ,EAAE,gBAAgB,EAAE,cAAc,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What the quick check of a page (`checkPage`) keeps of a box's autocomplete purpose (autofill.ts): a box names what
|
|
3
|
+
* it holds, an address in parts only whose it is. Whether a purpose is one the HTML standard lists is the format's own
|
|
4
|
+
* check (`validatePage`), as every other shape is: a browser passes over one it does not know.
|
|
5
|
+
*/
|
|
6
|
+
/** The keyboards a phone shows for a box: words, digits alone, digits with a decimal mark, a phone's, an email's, a web address's, a search's. */
|
|
7
|
+
export declare const INPUT_MODES: readonly ["text", "numeric", "decimal", "tel", "email", "url", "search"];
|
|
8
|
+
export type InputMode = (typeof INPUT_MODES)[number];
|
|
9
|
+
/** Whose it is, with no purpose — `shipping`, `section-home billing` — which only an address in parts takes. */
|
|
10
|
+
export declare const AUTOFILL_GROUP: RegExp;
|
|
11
|
+
/** Why a field placed on a page cannot name this purpose — a box with whose it is alone, an address in parts (`parts`) with a purpose — or null. */
|
|
12
|
+
export declare function autofillGroupProblem(value: string, parts: boolean): string | null;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What the quick check of a page (`checkPage`) keeps of a box's autocomplete purpose (autofill.ts): a box names what
|
|
3
|
+
* it holds, an address in parts only whose it is. Whether a purpose is one the HTML standard lists is the format's own
|
|
4
|
+
* check (`validatePage`), as every other shape is: a browser passes over one it does not know.
|
|
5
|
+
*/
|
|
6
|
+
/** The keyboards a phone shows for a box: words, digits alone, digits with a decimal mark, a phone's, an email's, a web address's, a search's. */
|
|
7
|
+
export declare const INPUT_MODES: readonly ["text", "numeric", "decimal", "tel", "email", "url", "search"];
|
|
8
|
+
export type InputMode = (typeof INPUT_MODES)[number];
|
|
9
|
+
/** Whose it is, with no purpose — `shipping`, `section-home billing` — which only an address in parts takes. */
|
|
10
|
+
export declare const AUTOFILL_GROUP: RegExp;
|
|
11
|
+
/** Why a field placed on a page cannot name this purpose — a box with whose it is alone, an address in parts (`parts`) with a purpose — or null. */
|
|
12
|
+
export declare function autofillGroupProblem(value: string, parts: boolean): string | null;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* What the quick check of a page (`checkPage`) keeps of a box's autocomplete purpose (autofill.ts): a box names what
|
|
4
|
+
* it holds, an address in parts only whose it is. Whether a purpose is one the HTML standard lists is the format's own
|
|
5
|
+
* check (`validatePage`), as every other shape is: a browser passes over one it does not know.
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.AUTOFILL_GROUP = exports.INPUT_MODES = void 0;
|
|
9
|
+
exports.autofillGroupProblem = autofillGroupProblem;
|
|
10
|
+
/** The keyboards a phone shows for a box: words, digits alone, digits with a decimal mark, a phone's, an email's, a web address's, a search's. */
|
|
11
|
+
exports.INPUT_MODES = ['text', 'numeric', 'decimal', 'tel', 'email', 'url', 'search'];
|
|
12
|
+
/** Whose it is, with no purpose — `shipping`, `section-home billing` — which only an address in parts takes. */
|
|
13
|
+
exports.AUTOFILL_GROUP = /^(?:section-\S*(?: +(?:shipping|billing))?|shipping|billing)$/;
|
|
14
|
+
/** Why a field placed on a page cannot name this purpose — a box with whose it is alone, an address in parts (`parts`) with a purpose — or null. */
|
|
15
|
+
function autofillGroupProblem(value, parts) {
|
|
16
|
+
const group = exports.AUTOFILL_GROUP.test(value);
|
|
17
|
+
if (parts && !group && value !== 'on' && value !== 'off')
|
|
18
|
+
return 'an address in parts names each part’s own purpose: give only whose address it is, such as "shipping", or "off"';
|
|
19
|
+
if (!parts && group)
|
|
20
|
+
return `"${value}" says whose it is, not what the box holds: add its purpose, such as "${value} postal-code"`;
|
|
21
|
+
return null;
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=autofill-group.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"autofill-group.js","sourceRoot":"","sources":["../../../../../../libs/core/src/lib/format/autofill-group.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAUH,oDAKC;AAbD,kJAAkJ;AACrI,QAAA,WAAW,GAAG,CAAC,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,CAAU,CAAC;AAGpG,gHAAgH;AACnG,QAAA,cAAc,GAAG,+DAA+D,CAAC;AAE9F,oJAAoJ;AACpJ,SAAgB,oBAAoB,CAAC,KAAa,EAAE,KAAc;IAChE,MAAM,KAAK,GAAG,sBAAc,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACzC,IAAI,KAAK,IAAI,CAAC,KAAK,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,KAAK;QAAE,OAAO,gHAAgH,CAAC;IAClL,IAAI,CAAC,KAAK,IAAI,KAAK;QAAE,OAAO,IAAI,KAAK,yEAAyE,KAAK,eAAe,CAAC;IACnI,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What the quick check of a page (`checkPage`) keeps of a box's autocomplete purpose (autofill.ts): a box names what
|
|
3
|
+
* it holds, an address in parts only whose it is. Whether a purpose is one the HTML standard lists is the format's own
|
|
4
|
+
* check (`validatePage`), as every other shape is: a browser passes over one it does not know.
|
|
5
|
+
*/
|
|
6
|
+
/** The keyboards a phone shows for a box: words, digits alone, digits with a decimal mark, a phone's, an email's, a web address's, a search's. */
|
|
7
|
+
export const INPUT_MODES = ['text', 'numeric', 'decimal', 'tel', 'email', 'url', 'search'];
|
|
8
|
+
/** Whose it is, with no purpose — `shipping`, `section-home billing` — which only an address in parts takes. */
|
|
9
|
+
export const AUTOFILL_GROUP = /^(?:section-\S*(?: +(?:shipping|billing))?|shipping|billing)$/;
|
|
10
|
+
/** Why a field placed on a page cannot name this purpose — a box with whose it is alone, an address in parts (`parts`) with a purpose — or null. */
|
|
11
|
+
export function autofillGroupProblem(value, parts) {
|
|
12
|
+
const group = AUTOFILL_GROUP.test(value);
|
|
13
|
+
if (parts && !group && value !== 'on' && value !== 'off')
|
|
14
|
+
return 'an address in parts names each part’s own purpose: give only whose address it is, such as "shipping", or "off"';
|
|
15
|
+
if (!parts && group)
|
|
16
|
+
return `"${value}" says whose it is, not what the box holds: add its purpose, such as "${value} postal-code"`;
|
|
17
|
+
return null;
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=autofill-group.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"autofill-group.mjs","sourceRoot":"","sources":["../../../../../../libs/core/src/lib/format/autofill-group.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,kJAAkJ;AAClJ,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,CAAU,CAAC;AAGpG,gHAAgH;AAChH,MAAM,CAAC,MAAM,cAAc,GAAG,+DAA+D,CAAC;AAE9F,oJAAoJ;AACpJ,MAAM,UAAU,oBAAoB,CAAC,KAAa,EAAE,KAAc;IAChE,MAAM,KAAK,GAAG,cAAc,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACzC,IAAI,KAAK,IAAI,CAAC,KAAK,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,KAAK;QAAE,OAAO,gHAAgH,CAAC;IAClL,IAAI,CAAC,KAAK,IAAI,KAAK;QAAE,OAAO,IAAI,KAAK,yEAAyE,KAAK,eAAe,CAAC;IACnI,OAAO,IAAI,CAAC;AACd,CAAC"}
|