@fieldia/core 0.28.0 → 0.29.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.
Files changed (233) hide show
  1. package/README.md +125 -1
  2. package/package.json +1 -1
  3. package/schema/page.schema.json +263 -6
  4. package/src/index.d.mts +8 -2
  5. package/src/index.d.ts +8 -2
  6. package/src/index.js +29 -2
  7. package/src/index.js.map +1 -1
  8. package/src/index.mjs +11 -2
  9. package/src/index.mjs.map +1 -1
  10. package/src/lib/format/approval-checks.d.mts +8 -0
  11. package/src/lib/format/approval-checks.d.ts +8 -0
  12. package/src/lib/format/approval-checks.js +29 -0
  13. package/src/lib/format/approval-checks.js.map +1 -0
  14. package/src/lib/format/approval-checks.mjs +26 -0
  15. package/src/lib/format/approval-checks.mjs.map +1 -0
  16. package/src/lib/format/approval.d.mts +20 -0
  17. package/src/lib/format/approval.d.ts +20 -0
  18. package/src/lib/format/approval.js +25 -0
  19. package/src/lib/format/approval.js.map +1 -0
  20. package/src/lib/format/approval.mjs +22 -0
  21. package/src/lib/format/approval.mjs.map +1 -0
  22. package/src/lib/format/assist-checks.d.mts +14 -0
  23. package/src/lib/format/assist-checks.d.ts +14 -0
  24. package/src/lib/format/assist-checks.js +68 -0
  25. package/src/lib/format/assist-checks.js.map +1 -0
  26. package/src/lib/format/assist-checks.mjs +64 -0
  27. package/src/lib/format/assist-checks.mjs.map +1 -0
  28. package/src/lib/format/assist.d.mts +41 -0
  29. package/src/lib/format/assist.d.ts +41 -0
  30. package/src/lib/format/assist.js +29 -0
  31. package/src/lib/format/assist.js.map +1 -0
  32. package/src/lib/format/assist.mjs +26 -0
  33. package/src/lib/format/assist.mjs.map +1 -0
  34. package/src/lib/format/editable-checks.d.mts +8 -0
  35. package/src/lib/format/editable-checks.d.ts +8 -0
  36. package/src/lib/format/editable-checks.js +38 -0
  37. package/src/lib/format/editable-checks.js.map +1 -0
  38. package/src/lib/format/editable-checks.mjs +35 -0
  39. package/src/lib/format/editable-checks.mjs.map +1 -0
  40. package/src/lib/format/field.d.mts +86 -0
  41. package/src/lib/format/field.d.ts +86 -0
  42. package/src/lib/format/field.js +56 -10
  43. package/src/lib/format/field.js.map +1 -1
  44. package/src/lib/format/field.mjs +55 -9
  45. package/src/lib/format/field.mjs.map +1 -1
  46. package/src/lib/format/languages-checks.d.mts +8 -0
  47. package/src/lib/format/languages-checks.d.ts +8 -0
  48. package/src/lib/format/languages-checks.js +40 -0
  49. package/src/lib/format/languages-checks.js.map +1 -0
  50. package/src/lib/format/languages-checks.mjs +37 -0
  51. package/src/lib/format/languages-checks.mjs.map +1 -0
  52. package/src/lib/format/later-checks.d.mts +4 -3
  53. package/src/lib/format/later-checks.d.ts +4 -3
  54. package/src/lib/format/later-checks.js +4 -3
  55. package/src/lib/format/later-checks.js.map +1 -1
  56. package/src/lib/format/later-checks.mjs +4 -3
  57. package/src/lib/format/later-checks.mjs.map +1 -1
  58. package/src/lib/format/layout.d.mts +100 -26
  59. package/src/lib/format/layout.d.ts +100 -26
  60. package/src/lib/format/layout.js +19 -3
  61. package/src/lib/format/layout.js.map +1 -1
  62. package/src/lib/format/layout.mjs +17 -1
  63. package/src/lib/format/layout.mjs.map +1 -1
  64. package/src/lib/format/layout.types.d.mts +2 -1
  65. package/src/lib/format/layout.types.d.ts +2 -1
  66. package/src/lib/format/list-editable.d.mts +20 -0
  67. package/src/lib/format/list-editable.d.ts +20 -0
  68. package/src/lib/format/list-editable.js +33 -0
  69. package/src/lib/format/list-editable.js.map +1 -0
  70. package/src/lib/format/list-editable.mjs +28 -0
  71. package/src/lib/format/list-editable.mjs.map +1 -0
  72. package/src/lib/format/page.d.mts +84 -9
  73. package/src/lib/format/page.d.ts +84 -9
  74. package/src/lib/format/page.js +4 -0
  75. package/src/lib/format/page.js.map +1 -1
  76. package/src/lib/format/page.mjs +4 -0
  77. package/src/lib/format/page.mjs.map +1 -1
  78. package/src/lib/format/photos-options.d.mts +29 -0
  79. package/src/lib/format/photos-options.d.ts +29 -0
  80. package/src/lib/format/photos-options.js +49 -0
  81. package/src/lib/format/photos-options.js.map +1 -0
  82. package/src/lib/format/photos-options.mjs +45 -0
  83. package/src/lib/format/photos-options.mjs.map +1 -0
  84. package/src/lib/format/references.js +31 -1
  85. package/src/lib/format/references.js.map +1 -1
  86. package/src/lib/format/references.mjs +31 -1
  87. package/src/lib/format/references.mjs.map +1 -1
  88. package/src/lib/format/scan-checks.d.mts +12 -0
  89. package/src/lib/format/scan-checks.d.ts +12 -0
  90. package/src/lib/format/scan-checks.js +89 -0
  91. package/src/lib/format/scan-checks.js.map +1 -0
  92. package/src/lib/format/scan-checks.mjs +86 -0
  93. package/src/lib/format/scan-checks.mjs.map +1 -0
  94. package/src/lib/format/scan-options.d.mts +84 -0
  95. package/src/lib/format/scan-options.d.ts +84 -0
  96. package/src/lib/format/scan-options.js +58 -0
  97. package/src/lib/format/scan-options.js.map +1 -0
  98. package/src/lib/format/scan-options.mjs +54 -0
  99. package/src/lib/format/scan-options.mjs.map +1 -0
  100. package/src/lib/format/upgrade.d.mts +4 -2
  101. package/src/lib/format/upgrade.d.ts +4 -2
  102. package/src/lib/format/upgrade.js +4 -2
  103. package/src/lib/format/upgrade.js.map +1 -1
  104. package/src/lib/format/upgrade.mjs +4 -2
  105. package/src/lib/format/upgrade.mjs.map +1 -1
  106. package/src/lib/format/version.d.mts +2 -2
  107. package/src/lib/format/version.d.ts +2 -2
  108. package/src/lib/format/version.js +2 -2
  109. package/src/lib/format/version.js.map +1 -1
  110. package/src/lib/format/version.mjs +2 -2
  111. package/src/lib/format/version.mjs.map +1 -1
  112. package/src/lib/record/approvals-part.d.mts +6 -0
  113. package/src/lib/record/approvals-part.d.ts +6 -0
  114. package/src/lib/record/approvals-part.js +14 -0
  115. package/src/lib/record/approvals-part.js.map +1 -0
  116. package/src/lib/record/approvals-part.mjs +7 -0
  117. package/src/lib/record/approvals-part.mjs.map +1 -0
  118. package/src/lib/record/approving.d.mts +45 -0
  119. package/src/lib/record/approving.d.ts +45 -0
  120. package/src/lib/record/approving.js +10 -0
  121. package/src/lib/record/approving.js.map +1 -0
  122. package/src/lib/record/approving.mjs +7 -0
  123. package/src/lib/record/approving.mjs.map +1 -0
  124. package/src/lib/record/check.js +4 -0
  125. package/src/lib/record/check.js.map +1 -1
  126. package/src/lib/record/check.mjs +4 -0
  127. package/src/lib/record/check.mjs.map +1 -1
  128. package/src/lib/record/data-source.d.mts +270 -0
  129. package/src/lib/record/data-source.d.ts +270 -0
  130. package/src/lib/record/data-source.js.map +1 -1
  131. package/src/lib/record/data-source.mjs.map +1 -1
  132. package/src/lib/record/files-part.d.mts +7 -0
  133. package/src/lib/record/files-part.d.ts +7 -0
  134. package/src/lib/record/files-part.js +167 -0
  135. package/src/lib/record/files-part.js.map +1 -0
  136. package/src/lib/record/files-part.mjs +163 -0
  137. package/src/lib/record/files-part.mjs.map +1 -0
  138. package/src/lib/record/filter.d.mts +5 -0
  139. package/src/lib/record/filter.d.ts +5 -0
  140. package/src/lib/record/filter.js +1 -0
  141. package/src/lib/record/filter.js.map +1 -1
  142. package/src/lib/record/filter.mjs +1 -1
  143. package/src/lib/record/filter.mjs.map +1 -1
  144. package/src/lib/record/form-approvals.d.mts +47 -0
  145. package/src/lib/record/form-approvals.d.ts +47 -0
  146. package/src/lib/record/form-approvals.js +186 -0
  147. package/src/lib/record/form-approvals.js.map +1 -0
  148. package/src/lib/record/form-approvals.mjs +180 -0
  149. package/src/lib/record/form-approvals.mjs.map +1 -0
  150. package/src/lib/record/form.d.mts +32 -1
  151. package/src/lib/record/form.d.ts +32 -1
  152. package/src/lib/record/form.js +49 -5
  153. package/src/lib/record/form.js.map +1 -1
  154. package/src/lib/record/form.mjs +49 -5
  155. package/src/lib/record/form.mjs.map +1 -1
  156. package/src/lib/record/languages-part.d.mts +32 -0
  157. package/src/lib/record/languages-part.d.ts +32 -0
  158. package/src/lib/record/languages-part.js +104 -0
  159. package/src/lib/record/languages-part.js.map +1 -0
  160. package/src/lib/record/languages-part.mjs +96 -0
  161. package/src/lib/record/languages-part.mjs.map +1 -0
  162. package/src/lib/record/languages.d.mts +26 -0
  163. package/src/lib/record/languages.d.ts +26 -0
  164. package/src/lib/record/languages.js +20 -0
  165. package/src/lib/record/languages.js.map +1 -0
  166. package/src/lib/record/languages.mjs +15 -0
  167. package/src/lib/record/languages.mjs.map +1 -0
  168. package/src/lib/record/locales/ar.js +5 -0
  169. package/src/lib/record/locales/ar.js.map +1 -1
  170. package/src/lib/record/locales/ar.mjs +5 -0
  171. package/src/lib/record/locales/ar.mjs.map +1 -1
  172. package/src/lib/record/locales/de.js +5 -0
  173. package/src/lib/record/locales/de.js.map +1 -1
  174. package/src/lib/record/locales/de.mjs +5 -0
  175. package/src/lib/record/locales/de.mjs.map +1 -1
  176. package/src/lib/record/locales/fr.js +5 -0
  177. package/src/lib/record/locales/fr.js.map +1 -1
  178. package/src/lib/record/locales/fr.mjs +5 -0
  179. package/src/lib/record/locales/fr.mjs.map +1 -1
  180. package/src/lib/record/memory-approvals.d.mts +47 -0
  181. package/src/lib/record/memory-approvals.d.ts +47 -0
  182. package/src/lib/record/memory-approvals.js +78 -0
  183. package/src/lib/record/memory-approvals.js.map +1 -0
  184. package/src/lib/record/memory-approvals.mjs +75 -0
  185. package/src/lib/record/memory-approvals.mjs.map +1 -0
  186. package/src/lib/record/memory-assist.d.mts +53 -0
  187. package/src/lib/record/memory-assist.d.ts +53 -0
  188. package/src/lib/record/memory-assist.js +519 -0
  189. package/src/lib/record/memory-assist.js.map +1 -0
  190. package/src/lib/record/memory-assist.mjs +513 -0
  191. package/src/lib/record/memory-assist.mjs.map +1 -0
  192. package/src/lib/record/memory-clusters.d.mts +18 -0
  193. package/src/lib/record/memory-clusters.d.ts +18 -0
  194. package/src/lib/record/memory-clusters.js +83 -0
  195. package/src/lib/record/memory-clusters.js.map +1 -0
  196. package/src/lib/record/memory-clusters.mjs +80 -0
  197. package/src/lib/record/memory-clusters.mjs.map +1 -0
  198. package/src/lib/record/memory-data-source.d.mts +43 -3
  199. package/src/lib/record/memory-data-source.d.ts +43 -3
  200. package/src/lib/record/memory-data-source.js +105 -19
  201. package/src/lib/record/memory-data-source.js.map +1 -1
  202. package/src/lib/record/memory-data-source.mjs +105 -19
  203. package/src/lib/record/memory-data-source.mjs.map +1 -1
  204. package/src/lib/record/memory-later.d.mts +1 -1
  205. package/src/lib/record/memory-later.d.ts +1 -1
  206. package/src/lib/record/memory-later.js +4 -1
  207. package/src/lib/record/memory-later.js.map +1 -1
  208. package/src/lib/record/memory-later.mjs +4 -1
  209. package/src/lib/record/memory-later.mjs.map +1 -1
  210. package/src/lib/record/messages.d.mts +14 -0
  211. package/src/lib/record/messages.d.ts +14 -0
  212. package/src/lib/record/messages.js +5 -0
  213. package/src/lib/record/messages.js.map +1 -1
  214. package/src/lib/record/messages.mjs +5 -0
  215. package/src/lib/record/messages.mjs.map +1 -1
  216. package/src/lib/record/uploads.d.mts +35 -9
  217. package/src/lib/record/uploads.d.ts +35 -9
  218. package/src/lib/record/uploads.js +49 -169
  219. package/src/lib/record/uploads.js.map +1 -1
  220. package/src/lib/record/uploads.mjs +42 -164
  221. package/src/lib/record/uploads.mjs.map +1 -1
  222. package/src/lib/record/values.d.mts +23 -0
  223. package/src/lib/record/values.d.ts +23 -0
  224. package/src/lib/record/values.js +4 -0
  225. package/src/lib/record/values.js.map +1 -1
  226. package/src/lib/record/values.mjs +4 -0
  227. package/src/lib/record/values.mjs.map +1 -1
  228. package/src/runtime.d.mts +12 -5
  229. package/src/runtime.d.ts +12 -5
  230. package/src/runtime.js +18 -3
  231. package/src/runtime.js.map +1 -1
  232. package/src/runtime.mjs +7 -1
  233. package/src/runtime.mjs.map +1 -1
package/src/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PhoneOptionsSchema = exports.PagePhoneSchema = exports.StateDotOptionsSchema = exports.PathPickerOptionsSchema = exports.AddressSearchOptionsSchema = exports.parseExpression = exports.writtenAs = exports.fieldKind = exports.kindWords = exports.kindProblemWords = exports.kindProblems = exports.validatePage = exports.pageWarnings = exports.PageEventsSchema = exports.ActionStepSchema = exports.PageSchema = exports.RelatedNodeSchema = exports.FilterPeriodSchema = exports.FilterRangeSchema = exports.ListGallerySchema = exports.ListCardSchema = 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.LinkedFieldSchema = exports.LineFieldSchema = exports.FieldsSchema = exports.FieldSchema = exports.nameLikeness = exports.alikeRecords = exports.scheduleSlots = exports.dayWords = exports.isQuestion = exports.whenWords = exports.takingWords = void 0;
4
- exports.autofillPurpose = exports.autofillProblem = exports.AUTOFILL_NAMES = exports.AUTOFILL_CONTACT = exports.AUTOFILL = exports.pageJsonSchema = exports.comparable = exports.DUPLICATE_KINDS = exports.PageLimitsSchema = exports.PageEndingSchema = exports.PageRecordsSchema = exports.PageDuplicatesSchema = exports.SignatureOptionsSchema = exports.SlotsOptionsSchema = void 0;
3
+ exports.pageWarnings = exports.PageEventsSchema = exports.ActionStepSchema = exports.PageSchema = exports.RelatedNodeSchema = exports.FilterPeriodSchema = exports.FilterRangeSchema = exports.ListEditableSchema = exports.ListGallerySchema = exports.ListCardSchema = 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.LinkedFieldSchema = exports.LineFieldSchema = exports.LanguageTagSchema = exports.FieldsSchema = exports.FieldSchema = exports.gridClusters = exports.standInNumber = exports.readSignature = exports.polishText = exports.assistStandIn = exports.nameLikeness = exports.alikeRecords = exports.scheduleSlots = exports.dayWords = exports.textOf = exports.textIn = exports.languagesAtFault = exports.languageName = exports.checkTranslated = exports.isQuestion = exports.whenWords = exports.takingWords = void 0;
4
+ exports.autofillPurpose = exports.autofillProblem = exports.AUTOFILL_NAMES = exports.AUTOFILL_CONTACT = exports.AUTOFILL = exports.pageJsonSchema = exports.comparable = exports.DUPLICATE_KINDS = exports.PageApprovalSchema = exports.PageLimitsSchema = exports.PageEndingSchema = exports.PageRecordsSchema = exports.PageDuplicatesSchema = exports.ScanSettingsSchema = exports.ScanOptionSchema = exports.ScanFillSchema = exports.SCAN_FORMATS = exports.PhotosOptionsSchema = exports.SignatureOptionsSchema = exports.SlotsOptionsSchema = exports.PhoneOptionsSchema = exports.PagePhoneSchema = exports.StateDotOptionsSchema = exports.PathPickerOptionsSchema = exports.AddressSearchOptionsSchema = exports.parseExpression = exports.writtenAs = exports.fieldKind = exports.kindWords = exports.kindProblemWords = exports.kindProblems = exports.validatePage = void 0;
5
5
  const tslib_1 = require("tslib");
6
6
  tslib_1.__exportStar(require("./runtime"), exports);
7
7
  // Why a page takes no answers now, in words: the limits part's (`formLimitsPart`), whole here.
@@ -10,6 +10,13 @@ Object.defineProperty(exports, "takingWords", { enumerable: true, get: function
10
10
  Object.defineProperty(exports, "whenWords", { enumerable: true, get: function () { return form_limits_1.whenWords; } });
11
11
  var record_words_1 = require("./lib/record/record-words");
12
12
  Object.defineProperty(exports, "isQuestion", { enumerable: true, get: function () { return record_words_1.isQuestion; } });
13
+ // A text in several languages checked in each, and a language's name: the languages part's (`formLanguagesPart`), whole here.
14
+ var languages_part_1 = require("./lib/record/languages-part");
15
+ Object.defineProperty(exports, "checkTranslated", { enumerable: true, get: function () { return languages_part_1.checkTranslated; } });
16
+ Object.defineProperty(exports, "languageName", { enumerable: true, get: function () { return languages_part_1.languageName; } });
17
+ Object.defineProperty(exports, "languagesAtFault", { enumerable: true, get: function () { return languages_part_1.languagesAtFault; } });
18
+ Object.defineProperty(exports, "textIn", { enumerable: true, get: function () { return languages_part_1.textIn; } });
19
+ Object.defineProperty(exports, "textOf", { enumerable: true, get: function () { return languages_part_1.textOf; } });
13
20
  var day_words_1 = require("./lib/record/day-words");
14
21
  Object.defineProperty(exports, "dayWords", { enumerable: true, get: function () { return day_words_1.dayWords; } });
15
22
  // A memory source's free times from booking schedules: for demos and tests, outside the one-tag script.
@@ -19,9 +26,19 @@ Object.defineProperty(exports, "scheduleSlots", { enumerable: true, get: functio
19
26
  var memory_duplicates_1 = require("./lib/record/memory-duplicates");
20
27
  Object.defineProperty(exports, "alikeRecords", { enumerable: true, get: function () { return memory_duplicates_1.alikeRecords; } });
21
28
  Object.defineProperty(exports, "nameLikeness", { enumerable: true, get: function () { return memory_duplicates_1.nameLikeness; } });
29
+ // A stand-in for an app's AI, no model and no keys, for a memory source's `assist`: for demos and tests, outside the one-tag script.
30
+ var memory_assist_1 = require("./lib/record/memory-assist");
31
+ Object.defineProperty(exports, "assistStandIn", { enumerable: true, get: function () { return memory_assist_1.assistStandIn; } });
32
+ Object.defineProperty(exports, "polishText", { enumerable: true, get: function () { return memory_assist_1.polishText; } });
33
+ Object.defineProperty(exports, "readSignature", { enumerable: true, get: function () { return memory_assist_1.readSignature; } });
34
+ Object.defineProperty(exports, "standInNumber", { enumerable: true, get: function () { return memory_assist_1.standInNumber; } });
35
+ // A memory source's map records gathered by a grid, as a server gathers them, for its `clusters`: outside the one-tag script.
36
+ var memory_clusters_1 = require("./lib/record/memory-clusters");
37
+ Object.defineProperty(exports, "gridClusters", { enumerable: true, get: function () { return memory_clusters_1.gridClusters; } });
22
38
  var field_1 = require("./lib/format/field");
23
39
  Object.defineProperty(exports, "FieldSchema", { enumerable: true, get: function () { return field_1.FieldSchema; } });
24
40
  Object.defineProperty(exports, "FieldsSchema", { enumerable: true, get: function () { return field_1.FieldsSchema; } });
41
+ Object.defineProperty(exports, "LanguageTagSchema", { enumerable: true, get: function () { return field_1.LanguageTagSchema; } });
25
42
  Object.defineProperty(exports, "LineFieldSchema", { enumerable: true, get: function () { return field_1.LineFieldSchema; } });
26
43
  Object.defineProperty(exports, "LinkedFieldSchema", { enumerable: true, get: function () { return field_1.LinkedFieldSchema; } });
27
44
  Object.defineProperty(exports, "LineKindsSchema", { enumerable: true, get: function () { return field_1.LineKindsSchema; } });
@@ -45,6 +62,7 @@ Object.defineProperty(exports, "ListCellSchema", { enumerable: true, get: functi
45
62
  Object.defineProperty(exports, "ListCalendarSchema", { enumerable: true, get: function () { return layout_1.ListCalendarSchema; } });
46
63
  Object.defineProperty(exports, "ListCardSchema", { enumerable: true, get: function () { return layout_1.ListCardSchema; } });
47
64
  Object.defineProperty(exports, "ListGallerySchema", { enumerable: true, get: function () { return layout_1.ListGallerySchema; } });
65
+ Object.defineProperty(exports, "ListEditableSchema", { enumerable: true, get: function () { return layout_1.ListEditableSchema; } });
48
66
  Object.defineProperty(exports, "FilterRangeSchema", { enumerable: true, get: function () { return layout_1.FilterRangeSchema; } });
49
67
  Object.defineProperty(exports, "FilterPeriodSchema", { enumerable: true, get: function () { return layout_1.FilterPeriodSchema; } });
50
68
  Object.defineProperty(exports, "RelatedNodeSchema", { enumerable: true, get: function () { return layout_1.RelatedNodeSchema; } });
@@ -76,6 +94,13 @@ var slots_options_1 = require("./lib/format/slots-options");
76
94
  Object.defineProperty(exports, "SlotsOptionsSchema", { enumerable: true, get: function () { return slots_options_1.SlotsOptionsSchema; } });
77
95
  var signature_options_1 = require("./lib/format/signature-options");
78
96
  Object.defineProperty(exports, "SignatureOptionsSchema", { enumerable: true, get: function () { return signature_options_1.SignatureOptionsSchema; } });
97
+ var photos_options_1 = require("./lib/format/photos-options");
98
+ Object.defineProperty(exports, "PhotosOptionsSchema", { enumerable: true, get: function () { return photos_options_1.PhotosOptionsSchema; } });
99
+ var scan_options_1 = require("./lib/format/scan-options");
100
+ Object.defineProperty(exports, "SCAN_FORMATS", { enumerable: true, get: function () { return scan_options_1.SCAN_FORMATS; } });
101
+ Object.defineProperty(exports, "ScanFillSchema", { enumerable: true, get: function () { return scan_options_1.ScanFillSchema; } });
102
+ Object.defineProperty(exports, "ScanOptionSchema", { enumerable: true, get: function () { return scan_options_1.ScanOptionSchema; } });
103
+ Object.defineProperty(exports, "ScanSettingsSchema", { enumerable: true, get: function () { return scan_options_1.ScanSettingsSchema; } });
79
104
  var duplicates_1 = require("./lib/format/duplicates");
80
105
  Object.defineProperty(exports, "PageDuplicatesSchema", { enumerable: true, get: function () { return duplicates_1.PageDuplicatesSchema; } });
81
106
  var records_1 = require("./lib/format/records");
@@ -84,6 +109,8 @@ var endings_1 = require("./lib/format/endings");
84
109
  Object.defineProperty(exports, "PageEndingSchema", { enumerable: true, get: function () { return endings_1.PageEndingSchema; } });
85
110
  var limits_1 = require("./lib/format/limits");
86
111
  Object.defineProperty(exports, "PageLimitsSchema", { enumerable: true, get: function () { return limits_1.PageLimitsSchema; } });
112
+ var approval_1 = require("./lib/format/approval");
113
+ Object.defineProperty(exports, "PageApprovalSchema", { enumerable: true, get: function () { return approval_1.PageApprovalSchema; } });
87
114
  var duplicate_kinds_1 = require("./lib/format/duplicate-kinds");
88
115
  Object.defineProperty(exports, "DUPLICATE_KINDS", { enumerable: true, get: function () { return duplicate_kinds_1.DUPLICATE_KINDS; } });
89
116
  Object.defineProperty(exports, "comparable", { enumerable: true, get: function () { return duplicate_kinds_1.comparable; } });
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,+FAA+F;AAC/F,wDAAkE;AAAzD,0GAAA,WAAW,OAAA;AAAE,wGAAA,SAAS,OAAA;AAC/B,0DAAuD;AAA9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LimitsPart`), whole here.
3
3
  export { takingWords, whenWords } from './lib/record/form-limits.mjs';
4
4
  export { isQuestion } from './lib/record/record-words.mjs';
5
+ // A text in several languages checked in each, and a language's name: the languages part's (`formLanguagesPart`), whole here.
6
+ export { checkTranslated, languageName, languagesAtFault, textIn, textOf } from './lib/record/languages-part.mjs';
5
7
  export { dayWords } from './lib/record/day-words.mjs';
6
8
  // A memory source's free times from booking schedules: for demos and tests, outside the one-tag script.
7
9
  export { scheduleSlots } from './lib/record/memory-schedules.mjs';
8
10
  // A memory source's records like the one typed, for its `duplicates`: for demos and tests, outside the one-tag script.
9
11
  export { alikeRecords, nameLikeness } from './lib/record/memory-duplicates.mjs';
10
- export { FieldSchema, FieldsSchema, LineFieldSchema, LinkedFieldSchema, LineKindsSchema, OptionSchema, PropertyDefinitionSchema, FilterConditionSchema, FilterItemSchema, MoneyLookSchema, ShrinkSchema, PERIODS, TimeZoneSchema, } from './lib/format/field.mjs';
11
- export { ModifierSchema, RolesSchema, CellRulesSchema, ToneWhenSchema, LayoutNodeSchema, RootLayoutSchema, ListNodeSchema, ListCellSchema, ListCalendarSchema, ListCardSchema, ListGallerySchema, FilterRangeSchema, FilterPeriodSchema, RelatedNodeSchema } from './lib/format/layout.mjs';
12
+ // A stand-in for an app's AI, no model and no keys, for a memory source's `assist`: for demos and tests, outside the one-tag script.
13
+ export { assistStandIn, polishText, readSignature, standInNumber } from './lib/record/memory-assist.mjs';
14
+ // A memory source's map records gathered by a grid, as a server gathers them, for its `clusters`: outside the one-tag script.
15
+ export { gridClusters } from './lib/record/memory-clusters.mjs';
16
+ export { FieldSchema, FieldsSchema, LanguageTagSchema, LineFieldSchema, LinkedFieldSchema, LineKindsSchema, OptionSchema, PropertyDefinitionSchema, FilterConditionSchema, FilterItemSchema, MoneyLookSchema, ShrinkSchema, PERIODS, TimeZoneSchema, } from './lib/format/field.mjs';
17
+ export { ModifierSchema, RolesSchema, CellRulesSchema, ToneWhenSchema, LayoutNodeSchema, RootLayoutSchema, ListNodeSchema, ListCellSchema, ListCalendarSchema, ListCardSchema, ListGallerySchema, ListEditableSchema, FilterRangeSchema, FilterPeriodSchema, RelatedNodeSchema } from './lib/format/layout.mjs';
12
18
  export { PageSchema } from './lib/format/page.mjs';
13
19
  export { ActionStepSchema, PageEventsSchema } from './lib/format/actions.mjs';
14
20
  export { pageWarnings, validatePage } from './lib/format/validate.mjs';
@@ -19,10 +25,13 @@ export { PathPickerOptionsSchema, StateDotOptionsSchema } from './lib/format/pic
19
25
  export { PagePhoneSchema, PhoneOptionsSchema } from './lib/format/phone.mjs';
20
26
  export { SlotsOptionsSchema } from './lib/format/slots-options.mjs';
21
27
  export { SignatureOptionsSchema } from './lib/format/signature-options.mjs';
28
+ export { PhotosOptionsSchema } from './lib/format/photos-options.mjs';
29
+ export { SCAN_FORMATS, ScanFillSchema, ScanOptionSchema, ScanSettingsSchema } from './lib/format/scan-options.mjs';
22
30
  export { PageDuplicatesSchema } from './lib/format/duplicates.mjs';
23
31
  export { PageRecordsSchema } from './lib/format/records.mjs';
24
32
  export { PageEndingSchema } from './lib/format/endings.mjs';
25
33
  export { PageLimitsSchema } from './lib/format/limits.mjs';
34
+ export { PageApprovalSchema } from './lib/format/approval.mjs';
26
35
  export { DUPLICATE_KINDS, comparable } from './lib/format/duplicate-kinds.mjs';
27
36
  export { pageJsonSchema } from './lib/format/json-schema.mjs';
28
37
  // The purposes a browser fills a box in with, from the HTML standard, as the format checks them.
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,+FAA+F;AAC/F,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAClD,wGAAwG;AACxG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,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAC3E,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,8 @@
1
+ import type { Page } from './page.mjs';
2
+ import type { FieldTools } from './part-checks.mjs';
3
+ /**
4
+ * A page's `approval`: on a record's own page — a page of responses keeps no record to approve, and a list approves
5
+ * none of its rows — the fields it leaves open each one of the page's, named once. In the one-tag script it comes with
6
+ * the approvals part, which a page with approvals asks for: run once it came (later-checks.ts).
7
+ */
8
+ export declare function checkApproval(page: Page, tools: FieldTools): void;
@@ -0,0 +1,8 @@
1
+ import type { Page } from './page';
2
+ import type { FieldTools } from './part-checks';
3
+ /**
4
+ * A page's `approval`: on a record's own page — a page of responses keeps no record to approve, and a list approves
5
+ * none of its rows — the fields it leaves open each one of the page's, named once. In the one-tag script it comes with
6
+ * the approvals part, which a page with approvals asks for: run once it came (later-checks.ts).
7
+ */
8
+ export declare function checkApproval(page: Page, tools: FieldTools): void;
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.checkApproval = checkApproval;
4
+ /**
5
+ * A page's `approval`: on a record's own page — a page of responses keeps no record to approve, and a list approves
6
+ * none of its rows — the fields it leaves open each one of the page's, named once. In the one-tag script it comes with
7
+ * the approvals part, which a page with approvals asks for: run once it came (later-checks.ts).
8
+ */
9
+ function checkApproval(page, tools) {
10
+ const approval = page.approval;
11
+ if (approval === undefined)
12
+ return;
13
+ if (page.data.kind !== 'record')
14
+ tools.report('approval', 'approvals are asked of a record: a page of responses keeps none to approve');
15
+ else if (page.layout.type === 'list')
16
+ tools.report('approval', 'approvals are said on a record’s own page, not on a list of records');
17
+ const open = Array.isArray(approval.open) ? approval.open : [];
18
+ open.forEach((name, i) => {
19
+ const at = `approval.open[${i}]`;
20
+ if (typeof name !== 'string')
21
+ return;
22
+ if (open.indexOf(name) !== i)
23
+ return tools.report(at, `"${name}" is named twice`);
24
+ tools.need(name, at);
25
+ });
26
+ if (approval.lock === false && open.length)
27
+ tools.report('approval.open', 'nothing is locked while it waits (lock is false): no field needs to stay open');
28
+ }
29
+ //# sourceMappingURL=approval-checks.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"approval-checks.js","sourceRoot":"","sources":["../../../../../../libs/core/src/lib/format/approval-checks.ts"],"names":[],"mappings":";;AAQA,sCAaC;AAlBD;;;;GAIG;AACH,SAAgB,aAAa,CAAC,IAAU,EAAE,KAAiB;IACzD,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC;IAC/B,IAAI,QAAQ,KAAK,SAAS;QAAE,OAAO;IACnC,IAAI,IAAI,CAAC,IAAI,CAAC,IAAI,KAAK,QAAQ;QAAE,KAAK,CAAC,MAAM,CAAC,UAAU,EAAE,4EAA4E,CAAC,CAAC;SACnI,IAAI,IAAI,CAAC,MAAM,CAAC,IAAI,KAAK,MAAM;QAAE,KAAK,CAAC,MAAM,CAAC,UAAU,EAAE,qEAAqE,CAAC,CAAC;IACtI,MAAM,IAAI,GAAc,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC;IAC1E,IAAI,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE;QACvB,MAAM,EAAE,GAAG,iBAAiB,CAAC,GAAG,CAAC;QACjC,IAAI,OAAO,IAAI,KAAK,QAAQ;YAAE,OAAO;QACrC,IAAI,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC;YAAE,OAAO,KAAK,CAAC,MAAM,CAAC,EAAE,EAAE,IAAI,IAAI,kBAAkB,CAAC,CAAC;QAClF,KAAK,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;IACvB,CAAC,CAAC,CAAC;IACH,IAAI,QAAQ,CAAC,IAAI,KAAK,KAAK,IAAI,IAAI,CAAC,MAAM;QAAE,KAAK,CAAC,MAAM,CAAC,eAAe,EAAE,+EAA+E,CAAC,CAAC;AAC7J,CAAC"}
@@ -0,0 +1,26 @@
1
+ /**
2
+ * A page's `approval`: on a record's own page — a page of responses keeps no record to approve, and a list approves
3
+ * none of its rows — the fields it leaves open each one of the page's, named once. In the one-tag script it comes with
4
+ * the approvals part, which a page with approvals asks for: run once it came (later-checks.ts).
5
+ */
6
+ export function checkApproval(page, tools) {
7
+ const approval = page.approval;
8
+ if (approval === undefined)
9
+ return;
10
+ if (page.data.kind !== 'record')
11
+ tools.report('approval', 'approvals are asked of a record: a page of responses keeps none to approve');
12
+ else if (page.layout.type === 'list')
13
+ tools.report('approval', 'approvals are said on a record’s own page, not on a list of records');
14
+ const open = Array.isArray(approval.open) ? approval.open : [];
15
+ open.forEach((name, i) => {
16
+ const at = `approval.open[${i}]`;
17
+ if (typeof name !== 'string')
18
+ return;
19
+ if (open.indexOf(name) !== i)
20
+ return tools.report(at, `"${name}" is named twice`);
21
+ tools.need(name, at);
22
+ });
23
+ if (approval.lock === false && open.length)
24
+ tools.report('approval.open', 'nothing is locked while it waits (lock is false): no field needs to stay open');
25
+ }
26
+ //# sourceMappingURL=approval-checks.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"approval-checks.mjs","sourceRoot":"","sources":["../../../../../../libs/core/src/lib/format/approval-checks.ts"],"names":[],"mappings":"AAGA;;;;GAIG;AACH,MAAM,UAAU,aAAa,CAAC,IAAU,EAAE,KAAiB;IACzD,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC;IAC/B,IAAI,QAAQ,KAAK,SAAS;QAAE,OAAO;IACnC,IAAI,IAAI,CAAC,IAAI,CAAC,IAAI,KAAK,QAAQ;QAAE,KAAK,CAAC,MAAM,CAAC,UAAU,EAAE,4EAA4E,CAAC,CAAC;SACnI,IAAI,IAAI,CAAC,MAAM,CAAC,IAAI,KAAK,MAAM;QAAE,KAAK,CAAC,MAAM,CAAC,UAAU,EAAE,qEAAqE,CAAC,CAAC;IACtI,MAAM,IAAI,GAAc,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC;IAC1E,IAAI,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE;QACvB,MAAM,EAAE,GAAG,iBAAiB,CAAC,GAAG,CAAC;QACjC,IAAI,OAAO,IAAI,KAAK,QAAQ;YAAE,OAAO;QACrC,IAAI,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC;YAAE,OAAO,KAAK,CAAC,MAAM,CAAC,EAAE,EAAE,IAAI,IAAI,kBAAkB,CAAC,CAAC;QAClF,KAAK,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;IACvB,CAAC,CAAC,CAAC;IACH,IAAI,QAAQ,CAAC,IAAI,KAAK,KAAK,IAAI,IAAI,CAAC,MAAM;QAAE,KAAK,CAAC,MAAM,CAAC,eAAe,EAAE,+EAA+E,CAAC,CAAC;AAC7J,CAAC"}
@@ -0,0 +1,20 @@
1
+ import * as z from 'zod';
2
+ /**
3
+ * Approvals on a record (`approval` on a record's page): who must approve it at which level, the approval it waits
4
+ * for said on the record ("Waiting for Finance: Mona Adel"), Approve and Reject — Reject asking why — for those who may
5
+ * decide, the record locked while it waits, and what was decided, by whom and when. The app's data source tells it
6
+ * (`approvals`) and takes the decisions (`decide`): the app, or an approval engine behind it, decides who is asked and
7
+ * in what order. Without the source's `approvals`, nothing is asked and nothing shows.
8
+ *
9
+ * "approval": {}
10
+ * "approval": { "open": ["notes", "attachment_ids"] }
11
+ * "approval": { "lock": false }
12
+ *
13
+ * `open`: the fields that stay open while the record waits — a note, an attachment — every other one locked, its lock
14
+ * saying why. `lock: false` locks none of them: the app's `save` refuses what it must.
15
+ */
16
+ export declare const PageApprovalSchema: z.ZodObject<{
17
+ open: z.ZodOptional<z.ZodArray<z.ZodString>>;
18
+ lock: z.ZodOptional<z.ZodBoolean>;
19
+ }, z.core.$strict>;
20
+ export type PageApproval = z.infer<typeof PageApprovalSchema>;
@@ -0,0 +1,20 @@
1
+ import * as z from 'zod';
2
+ /**
3
+ * Approvals on a record (`approval` on a record's page): who must approve it at which level, the approval it waits
4
+ * for said on the record ("Waiting for Finance: Mona Adel"), Approve and Reject — Reject asking why — for those who may
5
+ * decide, the record locked while it waits, and what was decided, by whom and when. The app's data source tells it
6
+ * (`approvals`) and takes the decisions (`decide`): the app, or an approval engine behind it, decides who is asked and
7
+ * in what order. Without the source's `approvals`, nothing is asked and nothing shows.
8
+ *
9
+ * "approval": {}
10
+ * "approval": { "open": ["notes", "attachment_ids"] }
11
+ * "approval": { "lock": false }
12
+ *
13
+ * `open`: the fields that stay open while the record waits — a note, an attachment — every other one locked, its lock
14
+ * saying why. `lock: false` locks none of them: the app's `save` refuses what it must.
15
+ */
16
+ export declare const PageApprovalSchema: z.ZodObject<{
17
+ open: z.ZodOptional<z.ZodArray<z.ZodString>>;
18
+ lock: z.ZodOptional<z.ZodBoolean>;
19
+ }, z.z.core.$strict>;
20
+ export type PageApproval = z.infer<typeof PageApprovalSchema>;
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PageApprovalSchema = void 0;
4
+ const z = require("zod");
5
+ /**
6
+ * Approvals on a record (`approval` on a record's page): who must approve it at which level, the approval it waits
7
+ * for said on the record ("Waiting for Finance: Mona Adel"), Approve and Reject — Reject asking why — for those who may
8
+ * decide, the record locked while it waits, and what was decided, by whom and when. The app's data source tells it
9
+ * (`approvals`) and takes the decisions (`decide`): the app, or an approval engine behind it, decides who is asked and
10
+ * in what order. Without the source's `approvals`, nothing is asked and nothing shows.
11
+ *
12
+ * "approval": {}
13
+ * "approval": { "open": ["notes", "attachment_ids"] }
14
+ * "approval": { "lock": false }
15
+ *
16
+ * `open`: the fields that stay open while the record waits — a note, an attachment — every other one locked, its lock
17
+ * saying why. `lock: false` locks none of them: the app's `save` refuses what it must.
18
+ */
19
+ exports.PageApprovalSchema = z
20
+ .strictObject({
21
+ open: z.array(z.string().min(1)).optional(),
22
+ lock: z.boolean().optional(),
23
+ })
24
+ .meta({ id: 'PageApproval' });
25
+ //# sourceMappingURL=approval.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"approval.js","sourceRoot":"","sources":["../../../../../../libs/core/src/lib/format/approval.ts"],"names":[],"mappings":";;;AAAA,yBAAyB;AAEzB;;;;;;;;;;;;;GAaG;AACU,QAAA,kBAAkB,GAAG,CAAC;KAChC,YAAY,CAAC;IACZ,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;IAC3C,IAAI,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;CAC7B,CAAC;KACD,IAAI,CAAC,EAAE,EAAE,EAAE,cAAc,EAAE,CAAC,CAAC"}
@@ -0,0 +1,22 @@
1
+ import * as z from 'zod';
2
+ /**
3
+ * Approvals on a record (`approval` on a record's page): who must approve it at which level, the approval it waits
4
+ * for said on the record ("Waiting for Finance: Mona Adel"), Approve and Reject — Reject asking why — for those who may
5
+ * decide, the record locked while it waits, and what was decided, by whom and when. The app's data source tells it
6
+ * (`approvals`) and takes the decisions (`decide`): the app, or an approval engine behind it, decides who is asked and
7
+ * in what order. Without the source's `approvals`, nothing is asked and nothing shows.
8
+ *
9
+ * "approval": {}
10
+ * "approval": { "open": ["notes", "attachment_ids"] }
11
+ * "approval": { "lock": false }
12
+ *
13
+ * `open`: the fields that stay open while the record waits — a note, an attachment — every other one locked, its lock
14
+ * saying why. `lock: false` locks none of them: the app's `save` refuses what it must.
15
+ */
16
+ export const PageApprovalSchema = z
17
+ .strictObject({
18
+ open: z.array(z.string().min(1)).optional(),
19
+ lock: z.boolean().optional(),
20
+ })
21
+ .meta({ id: 'PageApproval' });
22
+ //# sourceMappingURL=approval.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"approval.mjs","sourceRoot":"","sources":["../../../../../../libs/core/src/lib/format/approval.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAEzB;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC;KAChC,YAAY,CAAC;IACZ,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;IAC3C,IAAI,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;CAC7B,CAAC;KACD,IAAI,CAAC,EAAE,EAAE,EAAE,cAAc,EAAE,CAAC,CAAC"}
@@ -0,0 +1,14 @@
1
+ import type { Field, LineField } from './field.mjs';
2
+ import type { FieldNode } from './layout.mjs';
3
+ import type { Page } from './page.mjs';
4
+ import type { FieldTools } from './part-checks.mjs';
5
+ /**
6
+ * AI help's checks (the assist part's in the one-tag script): a page's `suggest` — on a record's or a response's form,
7
+ * never a list's — its fields of the page, each once, of a kind a proposal fills; the words it reads, a text of the page's.
8
+ */
9
+ export declare function checkSuggest(page: Page, tools: FieldTools): void;
10
+ /**
11
+ * A text field's tools (`options.rewrite`): on a char, text or html field; `true`, or a list of `draft`, `polish` and
12
+ * the app's own `{ "how", "label" }`, each once.
13
+ */
14
+ export declare function checkRewrite(node: FieldNode, def: Field | LineField | undefined, path: string, tools: FieldTools): void;
@@ -0,0 +1,14 @@
1
+ import type { Field, LineField } from './field';
2
+ import type { FieldNode } from './layout';
3
+ import type { Page } from './page';
4
+ import type { FieldTools } from './part-checks';
5
+ /**
6
+ * AI help's checks (the assist part's in the one-tag script): a page's `suggest` — on a record's or a response's form,
7
+ * never a list's — its fields of the page, each once, of a kind a proposal fills; the words it reads, a text of the page's.
8
+ */
9
+ export declare function checkSuggest(page: Page, tools: FieldTools): void;
10
+ /**
11
+ * A text field's tools (`options.rewrite`): on a char, text or html field; `true`, or a list of `draft`, `polish` and
12
+ * the app's own `{ "how", "label" }`, each once.
13
+ */
14
+ export declare function checkRewrite(node: FieldNode, def: Field | LineField | undefined, path: string, tools: FieldTools): void;
@@ -0,0 +1,68 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.checkSuggest = checkSuggest;
4
+ exports.checkRewrite = checkRewrite;
5
+ /** The kinds a proposal fills: words, numbers, money, yes or no, a choice, a day, links, and a table of lines. */
6
+ const PROPOSED_KINDS = new Set(['char', 'text', 'html', 'integer', 'float', 'monetary', 'boolean', 'selection', 'date', 'datetime', 'many2one', 'many2many', 'one2many']);
7
+ /** The kinds a text field's tools rewrite. */
8
+ const TEXT_KINDS = new Set(['char', 'text', 'html']);
9
+ /**
10
+ * AI help's checks (the assist part's in the one-tag script): a page's `suggest` — on a record's or a response's form,
11
+ * never a list's — its fields of the page, each once, of a kind a proposal fills; the words it reads, a text of the page's.
12
+ */
13
+ function checkSuggest(page, tools) {
14
+ const suggest = page.suggest;
15
+ if (!suggest)
16
+ return;
17
+ if (page.layout.type === 'list')
18
+ tools.report('suggest', 'suggest fills a form’s fields; a list of records has none to fill: put it on the record’s page');
19
+ const seen = new Set();
20
+ (suggest.fields ?? []).forEach((name, i) => {
21
+ const at = `suggest.fields[${i}]`;
22
+ if (seen.has(name))
23
+ return tools.report(at, `"${name}" is named twice`);
24
+ seen.add(name);
25
+ const def = tools.need(name, at);
26
+ if (!def)
27
+ return;
28
+ if (!PROPOSED_KINDS.has(def.type))
29
+ tools.report(at, `"${name}" is a ${def.type}: a proposal fills words, numbers, money, yes or no, a choice, a day, links or a table of lines`);
30
+ else if (def.readonly === true || def.compute !== undefined)
31
+ tools.report(at, `"${name}" is ${def.compute !== undefined ? 'worked out' : 'read-only'}: a proposal fills what a person can set`);
32
+ });
33
+ // The words a record holds, read in place of words pasted: a text of the page's.
34
+ const from = suggest.fromField;
35
+ if (from === undefined)
36
+ return;
37
+ const def = tools.need(from, 'suggest.fromField');
38
+ if (def && !TEXT_KINDS.has(def.type))
39
+ tools.report('suggest.fromField', `"${from}" is a ${def.type}: the words read are a char, text or html field's`);
40
+ if (suggest.fields?.includes(from))
41
+ tools.report('suggest.fromField', `"${from}" is what is read: it is not filled too`);
42
+ }
43
+ /**
44
+ * A text field's tools (`options.rewrite`): on a char, text or html field; `true`, or a list of `draft`, `polish` and
45
+ * the app's own `{ "how", "label" }`, each once.
46
+ */
47
+ function checkRewrite(node, def, path, tools) {
48
+ const given = node.options?.['rewrite'];
49
+ const at = `${path}.options.rewrite`;
50
+ if (def && !TEXT_KINDS.has(def.type))
51
+ tools.report(at, `rewrite is for a char, text or html field; "${node.field}" is a ${def.type}`);
52
+ if (given === true || given === false)
53
+ return;
54
+ if (!Array.isArray(given) || !given.length)
55
+ return tools.report(at, 'rewrite is true, or a list of its tools: ["draft", "polish"], or { "how": "shorter", "label": "Shorter" }');
56
+ const seen = new Set();
57
+ given.forEach((tool, i) => {
58
+ const how = tool === 'draft' || tool === 'polish' ? tool : tool && typeof tool === 'object' && !Array.isArray(tool) ? tool['how'] : undefined;
59
+ const own = tool && typeof tool === 'object' && !Array.isArray(tool) ? tool : null;
60
+ if (typeof how !== 'string' || !how || (own && (typeof own['label'] !== 'string' || !own['label'] || Object.keys(own).some((key) => key !== 'how' && key !== 'label')))) {
61
+ return tools.report(`${at}[${i}]`, 'a tool is "draft", "polish", or one of the app’s own: { "how": "shorter", "label": "Shorter" }');
62
+ }
63
+ if (seen.has(how))
64
+ tools.report(`${at}[${i}]`, `"${how}" is given twice`);
65
+ seen.add(how);
66
+ });
67
+ }
68
+ //# sourceMappingURL=assist-checks.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"assist-checks.js","sourceRoot":"","sources":["../../../../../../libs/core/src/lib/format/assist-checks.ts"],"names":[],"mappings":";;AAeA,oCAoBC;AAMD,oCAgBC;AApDD,kHAAkH;AAClH,MAAM,cAAc,GAAwB,IAAI,GAAG,CAAC,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,EAAE,UAAU,EAAE,UAAU,EAAE,WAAW,EAAE,UAAU,CAAC,CAAC,CAAC;AAE/L,8CAA8C;AAC9C,MAAM,UAAU,GAAG,IAAI,GAAG,CAAC,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;AAErD;;;GAGG;AACH,SAAgB,YAAY,CAAC,IAAU,EAAE,KAAiB;IACxD,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC;IAC7B,IAAI,CAAC,OAAO;QAAE,OAAO;IACrB,IAAI,IAAI,CAAC,MAAM,CAAC,IAAI,KAAK,MAAM;QAAE,KAAK,CAAC,MAAM,CAAC,SAAS,EAAE,gGAAgG,CAAC,CAAC;IAC3J,MAAM,IAAI,GAAG,IAAI,GAAG,EAAU,CAAC;IAC/B,CAAC,OAAO,CAAC,MAAM,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE;QACzC,MAAM,EAAE,GAAG,kBAAkB,CAAC,GAAG,CAAC;QAClC,IAAI,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC;YAAE,OAAO,KAAK,CAAC,MAAM,CAAC,EAAE,EAAE,IAAI,IAAI,kBAAkB,CAAC,CAAC;QACxE,I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GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,KAAK,KAAK,IAAI,GAAG,KAAK,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC;YACxK,OAAO,KAAK,CAAC,MAAM,CAAC,GAAG,EAAE,IAAI,CAAC,GAAG,EAAE,gGAAgG,CAAC,CAAC;QACvI,CAAC;QACD,IAAI,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC;YAAE,KAAK,CAAC,MAAM,CAAC,GAAG,EAAE,IAAI,CAAC,GAAG,EAAE,IAAI,GAAG,kBAAkB,CAAC,CAAC;QAC1E,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IAChB,CAAC,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,64 @@
1
+ /** The kinds a proposal fills: words, numbers, money, yes or no, a choice, a day, links, and a table of lines. */
2
+ const PROPOSED_KINDS = new Set(['char', 'text', 'html', 'integer', 'float', 'monetary', 'boolean', 'selection', 'date', 'datetime', 'many2one', 'many2many', 'one2many']);
3
+ /** The kinds a text field's tools rewrite. */
4
+ const TEXT_KINDS = new Set(['char', 'text', 'html']);
5
+ /**
6
+ * AI help's checks (the assist part's in the one-tag script): a page's `suggest` — on a record's or a response's form,
7
+ * never a list's — its fields of the page, each once, of a kind a proposal fills; the words it reads, a text of the page's.
8
+ */
9
+ export function checkSuggest(page, tools) {
10
+ const suggest = page.suggest;
11
+ if (!suggest)
12
+ return;
13
+ if (page.layout.type === 'list')
14
+ tools.report('suggest', 'suggest fills a form’s fields; a list of records has none to fill: put it on the record’s page');
15
+ const seen = new Set();
16
+ (suggest.fields ?? []).forEach((name, i) => {
17
+ const at = `suggest.fields[${i}]`;
18
+ if (seen.has(name))
19
+ return tools.report(at, `"${name}" is named twice`);
20
+ seen.add(name);
21
+ const def = tools.need(name, at);
22
+ if (!def)
23
+ return;
24
+ if (!PROPOSED_KINDS.has(def.type))
25
+ tools.report(at, `"${name}" is a ${def.type}: a proposal fills words, numbers, money, yes or no, a choice, a day, links or a table of lines`);
26
+ else if (def.readonly === true || def.compute !== undefined)
27
+ tools.report(at, `"${name}" is ${def.compute !== undefined ? 'worked out' : 'read-only'}: a proposal fills what a person can set`);
28
+ });
29
+ // The words a record holds, read in place of words pasted: a text of the page's.
30
+ const from = suggest.fromField;
31
+ if (from === undefined)
32
+ return;
33
+ const def = tools.need(from, 'suggest.fromField');
34
+ if (def && !TEXT_KINDS.has(def.type))
35
+ tools.report('suggest.fromField', `"${from}" is a ${def.type}: the words read are a char, text or html field's`);
36
+ if (suggest.fields?.includes(from))
37
+ tools.report('suggest.fromField', `"${from}" is what is read: it is not filled too`);
38
+ }
39
+ /**
40
+ * A text field's tools (`options.rewrite`): on a char, text or html field; `true`, or a list of `draft`, `polish` and
41
+ * the app's own `{ "how", "label" }`, each once.
42
+ */
43
+ export function checkRewrite(node, def, path, tools) {
44
+ const given = node.options?.['rewrite'];
45
+ const at = `${path}.options.rewrite`;
46
+ if (def && !TEXT_KINDS.has(def.type))
47
+ tools.report(at, `rewrite is for a char, text or html field; "${node.field}" is a ${def.type}`);
48
+ if (given === true || given === false)
49
+ return;
50
+ if (!Array.isArray(given) || !given.length)
51
+ return tools.report(at, 'rewrite is true, or a list of its tools: ["draft", "polish"], or { "how": "shorter", "label": "Shorter" }');
52
+ const seen = new Set();
53
+ given.forEach((tool, i) => {
54
+ const how = tool === 'draft' || tool === 'polish' ? tool : tool && typeof tool === 'object' && !Array.isArray(tool) ? tool['how'] : undefined;
55
+ const own = tool && typeof tool === 'object' && !Array.isArray(tool) ? tool : null;
56
+ if (typeof how !== 'string' || !how || (own && (typeof own['label'] !== 'string' || !own['label'] || Object.keys(own).some((key) => key !== 'how' && key !== 'label')))) {
57
+ return tools.report(`${at}[${i}]`, 'a tool is "draft", "polish", or one of the app’s own: { "how": "shorter", "label": "Shorter" }');
58
+ }
59
+ if (seen.has(how))
60
+ tools.report(`${at}[${i}]`, `"${how}" is given twice`);
61
+ seen.add(how);
62
+ });
63
+ }
64
+ //# sourceMappingURL=assist-checks.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"assist-checks.mjs","sourceRoot":"","sources":["../../../../../../libs/core/src/lib/format/assist-checks.ts"],"names":[],"mappings":"AAKA,kHAAkH;AAClH,MAAM,cAAc,GAAwB,IAAI,GAAG,CAAC,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,EAAE,UAAU,EAAE,UAAU,EAAE,WAAW,EAAE,UAAU,CAAC,CAAC,CAAC;AAE/L,8CAA8C;AAC9C,MAAM,UAAU,GAAG,IAAI,GAAG,CAAC,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;AAErD;;;GAGG;AACH,MAAM,UAAU,YAAY,CAAC,IAAU,EAAE,KAAiB;IACxD,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC;IAC7B,IAAI,CAAC,OAAO;QAAE,OAAO;IACrB,IAAI,IAAI,CAAC,MAAM,CAAC,IAAI,KAAK,MAAM;QAAE,KAAK,CAAC,MAAM,CAAC,SAAS,EAAE,gGAAgG,CAAC,CAAC;IAC3J,MAAM,IAAI,GAAG,IAAI,GAAG,EAAU,CAAC;IAC/B,CAAC,OAAO,CAAC,MAAM,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE;QACzC,MAAM,EAAE,GAAG,kBAAkB,CAAC,GAAG,CAAC;QAClC,IAAI,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC;YAAE,OAAO,KAAK,CAAC,MAAM,CAAC,EAAE,EAAE,IAAI,IAAI,kBAAkB,CAAC,CAAC;QACxE,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QACf,MAAM,GAAG,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,CAAkC,CAAC;QAClE,IA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AE,CAAC;YACxK,OAAO,KAAK,CAAC,MAAM,CAAC,GAAG,EAAE,IAAI,CAAC,GAAG,EAAE,gGAAgG,CAAC,CAAC;QACvI,CAAC;QACD,IAAI,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC;YAAE,KAAK,CAAC,MAAM,CAAC,GAAG,EAAE,IAAI,CAAC,GAAG,EAAE,IAAI,GAAG,kBAAkB,CAAC,CAAC;QAC1E,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IAChB,CAAC,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,41 @@
1
+ import * as z from 'zod';
2
+ /**
3
+ * AI help on a page, through the app's own model (Fieldia ships no model and no keys): every value proposed is shown
4
+ * on its field — the old value and the new — to accept or reject, nothing kept until the person accepts it, Undo
5
+ * after; a proposal for a record no longer shown is let go, and what the person types wins over a late one.
6
+ *
7
+ * `suggest` on a page: a "Fill from text" button over its fields. The person pastes words — an e-mail signature, a
8
+ * message, a document's text — or picks files, and the data source's `suggest` answers with values for the fields
9
+ * named here (those shown that a person can set, when left out), a table of lines' as the lines to add.
10
+ *
11
+ * `fromField` reads the words a record holds — a buyer's message, a visit's notes — at a press, with no box to paste in.
12
+ *
13
+ * "suggest": {}
14
+ * "suggest": { "fields": ["name", "email", "phone", "contacts"], "label": "Fill from an e-mail", "from": ["text"] }
15
+ * "suggest": { "fromField": "message", "label": "Fill from the message", "fields": ["kind", "district", "budget"] }
16
+ */
17
+ export declare const PageSuggestSchema: z.ZodObject<{
18
+ fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
19
+ from: z.ZodOptional<z.ZodArray<z.ZodEnum<{
20
+ text: "text";
21
+ files: "files";
22
+ }>>>;
23
+ label: z.ZodOptional<z.ZodString>;
24
+ placeholder: z.ZodOptional<z.ZodString>;
25
+ fromField: z.ZodOptional<z.ZodString>;
26
+ }, z.core.$strict>;
27
+ export type PageSuggest = z.infer<typeof PageSuggestSchema>;
28
+ /**
29
+ * A text field's tools (`options.rewrite` on a char, text or html field), each asking the data source's `rewrite`:
30
+ * `draft` writes the field from the record — a reply to an enquiry from what it asks — and `polish` makes the words
31
+ * the person wrote clearer (offered once there are some). An app's own tool is `{ "how": "shorter", "label": "Make it
32
+ * shorter" }`, its `how` what the source is asked. `true` gives Draft and Polish. Each answer is shown under the field
33
+ * to accept or reject.
34
+ *
35
+ * "options": { "rewrite": ["draft", "polish"] }
36
+ * "options": { "rewrite": ["polish", { "how": "formal", "label": "More formal" }] }
37
+ */
38
+ export type RewriteTool = 'draft' | 'polish' | {
39
+ how: string;
40
+ label: string;
41
+ };
@@ -0,0 +1,41 @@
1
+ import * as z from 'zod';
2
+ /**
3
+ * AI help on a page, through the app's own model (Fieldia ships no model and no keys): every value proposed is shown
4
+ * on its field — the old value and the new — to accept or reject, nothing kept until the person accepts it, Undo
5
+ * after; a proposal for a record no longer shown is let go, and what the person types wins over a late one.
6
+ *
7
+ * `suggest` on a page: a "Fill from text" button over its fields. The person pastes words — an e-mail signature, a
8
+ * message, a document's text — or picks files, and the data source's `suggest` answers with values for the fields
9
+ * named here (those shown that a person can set, when left out), a table of lines' as the lines to add.
10
+ *
11
+ * `fromField` reads the words a record holds — a buyer's message, a visit's notes — at a press, with no box to paste in.
12
+ *
13
+ * "suggest": {}
14
+ * "suggest": { "fields": ["name", "email", "phone", "contacts"], "label": "Fill from an e-mail", "from": ["text"] }
15
+ * "suggest": { "fromField": "message", "label": "Fill from the message", "fields": ["kind", "district", "budget"] }
16
+ */
17
+ export declare const PageSuggestSchema: z.ZodObject<{
18
+ fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
19
+ from: z.ZodOptional<z.ZodArray<z.ZodEnum<{
20
+ text: "text";
21
+ files: "files";
22
+ }>>>;
23
+ label: z.ZodOptional<z.ZodString>;
24
+ placeholder: z.ZodOptional<z.ZodString>;
25
+ fromField: z.ZodOptional<z.ZodString>;
26
+ }, z.z.core.$strict>;
27
+ export type PageSuggest = z.infer<typeof PageSuggestSchema>;
28
+ /**
29
+ * A text field's tools (`options.rewrite` on a char, text or html field), each asking the data source's `rewrite`:
30
+ * `draft` writes the field from the record — a reply to an enquiry from what it asks — and `polish` makes the words
31
+ * the person wrote clearer (offered once there are some). An app's own tool is `{ "how": "shorter", "label": "Make it
32
+ * shorter" }`, its `how` what the source is asked. `true` gives Draft and Polish. Each answer is shown under the field
33
+ * to accept or reject.
34
+ *
35
+ * "options": { "rewrite": ["draft", "polish"] }
36
+ * "options": { "rewrite": ["polish", { "how": "formal", "label": "More formal" }] }
37
+ */
38
+ export type RewriteTool = 'draft' | 'polish' | {
39
+ how: string;
40
+ label: string;
41
+ };