@fieldia/core 0.24.0 → 0.25.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 +77 -1
- package/package.json +1 -1
- package/schema/page.schema.json +951 -380
- package/src/index.d.mts +5 -2
- package/src/index.d.ts +5 -2
- package/src/index.js +14 -1
- package/src/index.js.map +1 -1
- package/src/index.mjs +6 -2
- package/src/index.mjs.map +1 -1
- package/src/lib/format/actions.d.mts +31 -1
- package/src/lib/format/actions.d.ts +31 -1
- package/src/lib/format/actions.js +1 -0
- package/src/lib/format/actions.js.map +1 -1
- package/src/lib/format/actions.mjs +1 -0
- package/src/lib/format/actions.mjs.map +1 -1
- package/src/lib/format/duplicate-kinds.d.mts +10 -0
- package/src/lib/format/duplicate-kinds.d.ts +10 -0
- package/src/lib/format/duplicate-kinds.js +14 -0
- package/src/lib/format/duplicate-kinds.js.map +1 -0
- package/src/lib/format/duplicate-kinds.mjs +10 -0
- package/src/lib/format/duplicate-kinds.mjs.map +1 -0
- package/src/lib/format/duplicates.d.mts +22 -0
- package/src/lib/format/duplicates.d.ts +22 -0
- package/src/lib/format/duplicates.js +24 -0
- package/src/lib/format/duplicates.js.map +1 -0
- package/src/lib/format/duplicates.mjs +21 -0
- package/src/lib/format/duplicates.mjs.map +1 -0
- package/src/lib/format/field.d.mts +236 -0
- package/src/lib/format/field.d.ts +236 -0
- package/src/lib/format/field.js +4 -3
- package/src/lib/format/field.js.map +1 -1
- package/src/lib/format/field.mjs +2 -1
- package/src/lib/format/field.mjs.map +1 -1
- package/src/lib/format/import-fields.d.mts +18 -0
- package/src/lib/format/import-fields.d.ts +18 -0
- package/src/lib/format/import-fields.js +26 -0
- package/src/lib/format/import-fields.js.map +1 -0
- package/src/lib/format/import-fields.mjs +21 -0
- package/src/lib/format/import-fields.mjs.map +1 -0
- package/src/lib/format/layout.d.mts +5453 -1522
- package/src/lib/format/layout.d.ts +5453 -1522
- package/src/lib/format/layout.js +90 -32
- package/src/lib/format/layout.js.map +1 -1
- package/src/lib/format/layout.mjs +89 -31
- package/src/lib/format/layout.mjs.map +1 -1
- package/src/lib/format/layout.types.d.mts +5 -2
- package/src/lib/format/layout.types.d.ts +5 -2
- package/src/lib/format/page.d.mts +961 -127
- package/src/lib/format/page.d.ts +961 -127
- package/src/lib/format/page.js +14 -0
- package/src/lib/format/page.js.map +1 -1
- package/src/lib/format/page.mjs +14 -0
- package/src/lib/format/page.mjs.map +1 -1
- package/src/lib/format/references.d.mts +29 -0
- package/src/lib/format/references.d.ts +29 -0
- package/src/lib/format/references.js +172 -24
- package/src/lib/format/references.js.map +1 -1
- package/src/lib/format/references.mjs +172 -24
- package/src/lib/format/references.mjs.map +1 -1
- package/src/lib/format/translate.js +8 -4
- package/src/lib/format/translate.js.map +1 -1
- package/src/lib/format/translate.mjs +8 -4
- package/src/lib/format/translate.mjs.map +1 -1
- package/src/lib/format/upgrade.d.mts +5 -3
- package/src/lib/format/upgrade.d.ts +5 -3
- package/src/lib/format/upgrade.js +5 -3
- package/src/lib/format/upgrade.js.map +1 -1
- package/src/lib/format/upgrade.mjs +5 -3
- 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/record/data-source.d.mts +121 -0
- package/src/lib/record/data-source.d.ts +121 -0
- package/src/lib/record/data-source.js +16 -0
- package/src/lib/record/data-source.js.map +1 -1
- package/src/lib/record/data-source.mjs +15 -0
- package/src/lib/record/data-source.mjs.map +1 -1
- package/src/lib/record/form.d.mts +45 -1
- package/src/lib/record/form.d.ts +45 -1
- package/src/lib/record/form.js +53 -0
- package/src/lib/record/form.js.map +1 -1
- package/src/lib/record/form.mjs +53 -0
- package/src/lib/record/form.mjs.map +1 -1
- package/src/lib/record/memory-data-source.d.mts +12 -5
- package/src/lib/record/memory-data-source.d.ts +12 -5
- package/src/lib/record/memory-data-source.js +61 -0
- package/src/lib/record/memory-data-source.js.map +1 -1
- package/src/lib/record/memory-data-source.mjs +62 -1
- package/src/lib/record/memory-data-source.mjs.map +1 -1
- package/src/lib/record/memory-duplicates.d.mts +19 -0
- package/src/lib/record/memory-duplicates.d.ts +19 -0
- package/src/lib/record/memory-duplicates.js +78 -0
- package/src/lib/record/memory-duplicates.js.map +1 -0
- package/src/lib/record/memory-duplicates.mjs +74 -0
- package/src/lib/record/memory-duplicates.mjs.map +1 -0
- package/src/lib/record/run.d.mts +31 -1
- package/src/lib/record/run.d.ts +31 -1
- package/src/lib/record/run.js +15 -1
- package/src/lib/record/run.js.map +1 -1
- package/src/lib/record/run.mjs +15 -1
- package/src/lib/record/run.mjs.map +1 -1
- package/src/lib/record/waits.d.mts +32 -0
- package/src/lib/record/waits.d.ts +32 -0
- package/src/lib/record/waits.js +89 -0
- package/src/lib/record/waits.js.map +1 -0
- package/src/lib/record/waits.mjs +85 -0
- package/src/lib/record/waits.mjs.map +1 -0
- package/src/runtime.d.mts +10 -7
- package/src/runtime.d.ts +10 -7
- package/src/runtime.js +8 -3
- package/src/runtime.js.map +1 -1
- package/src/runtime.mjs +2 -1
- package/src/runtime.mjs.map +1 -1
package/src/index.d.mts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
export * from './runtime.mjs';
|
|
2
2
|
export { scheduleSlots, type MemorySchedule } from './lib/record/memory-schedules.mjs';
|
|
3
|
-
export {
|
|
4
|
-
export {
|
|
3
|
+
export { alikeRecords, nameLikeness } from './lib/record/memory-duplicates.mjs';
|
|
4
|
+
export { FieldSchema, FieldsSchema, LineFieldSchema, LinkedFieldSchema, 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, ListCardSchema, ListGallerySchema, FilterPeriodSchema, RelatedNodeSchema } from './lib/format/layout.mjs';
|
|
5
6
|
export { PageSchema } from './lib/format/page.mjs';
|
|
6
7
|
export { ActionStepSchema, PageEventsSchema } from './lib/format/actions.mjs';
|
|
7
8
|
export { validatePage } from './lib/format/validate.mjs';
|
|
@@ -9,5 +10,7 @@ export { AddressSearchOptionsSchema } from './lib/format/address-search.mjs';
|
|
|
9
10
|
export { PathPickerOptionsSchema, StateDotOptionsSchema } from './lib/format/picker-options.mjs';
|
|
10
11
|
export { PagePhoneSchema, PhoneOptionsSchema } from './lib/format/phone.mjs';
|
|
11
12
|
export { SlotsOptionsSchema } from './lib/format/slots-options.mjs';
|
|
13
|
+
export { PageDuplicatesSchema } from './lib/format/duplicates.mjs';
|
|
14
|
+
export { DUPLICATE_KINDS, comparable } from './lib/format/duplicate-kinds.mjs';
|
|
12
15
|
export { pageJsonSchema } from './lib/format/json-schema.mjs';
|
|
13
16
|
export { AUTOFILL, AUTOFILL_CONTACT, AUTOFILL_NAMES, autofillProblem, autofillPurpose } from './lib/format/autofill.mjs';
|
package/src/index.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
export * from './runtime';
|
|
2
2
|
export { scheduleSlots, type MemorySchedule } from './lib/record/memory-schedules';
|
|
3
|
-
export {
|
|
4
|
-
export {
|
|
3
|
+
export { alikeRecords, nameLikeness } from './lib/record/memory-duplicates';
|
|
4
|
+
export { FieldSchema, FieldsSchema, LineFieldSchema, LinkedFieldSchema, LineKindsSchema, OptionSchema, PropertyDefinitionSchema, FilterConditionSchema, FilterItemSchema, MoneyLookSchema, ShrinkSchema, PERIODS, TimeZoneSchema, } from './lib/format/field';
|
|
5
|
+
export { ModifierSchema, RolesSchema, CellRulesSchema, ToneWhenSchema, LayoutNodeSchema, RootLayoutSchema, ListNodeSchema, ListCellSchema, ListCalendarSchema, ListCardSchema, ListGallerySchema, FilterPeriodSchema, RelatedNodeSchema } from './lib/format/layout';
|
|
5
6
|
export { PageSchema } from './lib/format/page';
|
|
6
7
|
export { ActionStepSchema, PageEventsSchema } from './lib/format/actions';
|
|
7
8
|
export { validatePage } from './lib/format/validate';
|
|
@@ -9,5 +10,7 @@ export { AddressSearchOptionsSchema } from './lib/format/address-search';
|
|
|
9
10
|
export { PathPickerOptionsSchema, StateDotOptionsSchema } from './lib/format/picker-options';
|
|
10
11
|
export { PagePhoneSchema, PhoneOptionsSchema } from './lib/format/phone';
|
|
11
12
|
export { SlotsOptionsSchema } from './lib/format/slots-options';
|
|
13
|
+
export { PageDuplicatesSchema } from './lib/format/duplicates';
|
|
14
|
+
export { DUPLICATE_KINDS, comparable } from './lib/format/duplicate-kinds';
|
|
12
15
|
export { pageJsonSchema } from './lib/format/json-schema';
|
|
13
16
|
export { AUTOFILL, AUTOFILL_CONTACT, AUTOFILL_NAMES, autofillProblem, autofillPurpose } from './lib/format/autofill';
|
package/src/index.js
CHANGED
|
@@ -1,15 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
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;
|
|
3
|
+
exports.autofillPurpose = exports.autofillProblem = exports.AUTOFILL_NAMES = exports.AUTOFILL_CONTACT = exports.AUTOFILL = exports.pageJsonSchema = exports.comparable = exports.DUPLICATE_KINDS = exports.PageDuplicatesSchema = exports.SlotsOptionsSchema = exports.PhoneOptionsSchema = exports.PagePhoneSchema = exports.StateDotOptionsSchema = exports.PathPickerOptionsSchema = exports.AddressSearchOptionsSchema = exports.validatePage = exports.PageEventsSchema = exports.ActionStepSchema = exports.PageSchema = exports.RelatedNodeSchema = exports.FilterPeriodSchema = 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 = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
tslib_1.__exportStar(require("./runtime"), exports);
|
|
6
6
|
// A memory source's free times from booking schedules: for demos and tests, outside the one-tag script.
|
|
7
7
|
var memory_schedules_1 = require("./lib/record/memory-schedules");
|
|
8
8
|
Object.defineProperty(exports, "scheduleSlots", { enumerable: true, get: function () { return memory_schedules_1.scheduleSlots; } });
|
|
9
|
+
// A memory source's records like the one typed, for its `duplicates`: for demos and tests, outside the one-tag script.
|
|
10
|
+
var memory_duplicates_1 = require("./lib/record/memory-duplicates");
|
|
11
|
+
Object.defineProperty(exports, "alikeRecords", { enumerable: true, get: function () { return memory_duplicates_1.alikeRecords; } });
|
|
12
|
+
Object.defineProperty(exports, "nameLikeness", { enumerable: true, get: function () { return memory_duplicates_1.nameLikeness; } });
|
|
9
13
|
var field_1 = require("./lib/format/field");
|
|
10
14
|
Object.defineProperty(exports, "FieldSchema", { enumerable: true, get: function () { return field_1.FieldSchema; } });
|
|
11
15
|
Object.defineProperty(exports, "FieldsSchema", { enumerable: true, get: function () { return field_1.FieldsSchema; } });
|
|
12
16
|
Object.defineProperty(exports, "LineFieldSchema", { enumerable: true, get: function () { return field_1.LineFieldSchema; } });
|
|
17
|
+
Object.defineProperty(exports, "LinkedFieldSchema", { enumerable: true, get: function () { return field_1.LinkedFieldSchema; } });
|
|
13
18
|
Object.defineProperty(exports, "LineKindsSchema", { enumerable: true, get: function () { return field_1.LineKindsSchema; } });
|
|
14
19
|
Object.defineProperty(exports, "OptionSchema", { enumerable: true, get: function () { return field_1.OptionSchema; } });
|
|
15
20
|
Object.defineProperty(exports, "PropertyDefinitionSchema", { enumerable: true, get: function () { return field_1.PropertyDefinitionSchema; } });
|
|
@@ -29,7 +34,10 @@ Object.defineProperty(exports, "RootLayoutSchema", { enumerable: true, get: func
|
|
|
29
34
|
Object.defineProperty(exports, "ListNodeSchema", { enumerable: true, get: function () { return layout_1.ListNodeSchema; } });
|
|
30
35
|
Object.defineProperty(exports, "ListCellSchema", { enumerable: true, get: function () { return layout_1.ListCellSchema; } });
|
|
31
36
|
Object.defineProperty(exports, "ListCalendarSchema", { enumerable: true, get: function () { return layout_1.ListCalendarSchema; } });
|
|
37
|
+
Object.defineProperty(exports, "ListCardSchema", { enumerable: true, get: function () { return layout_1.ListCardSchema; } });
|
|
38
|
+
Object.defineProperty(exports, "ListGallerySchema", { enumerable: true, get: function () { return layout_1.ListGallerySchema; } });
|
|
32
39
|
Object.defineProperty(exports, "FilterPeriodSchema", { enumerable: true, get: function () { return layout_1.FilterPeriodSchema; } });
|
|
40
|
+
Object.defineProperty(exports, "RelatedNodeSchema", { enumerable: true, get: function () { return layout_1.RelatedNodeSchema; } });
|
|
33
41
|
var page_1 = require("./lib/format/page");
|
|
34
42
|
Object.defineProperty(exports, "PageSchema", { enumerable: true, get: function () { return page_1.PageSchema; } });
|
|
35
43
|
var actions_1 = require("./lib/format/actions");
|
|
@@ -47,6 +55,11 @@ Object.defineProperty(exports, "PagePhoneSchema", { enumerable: true, get: funct
|
|
|
47
55
|
Object.defineProperty(exports, "PhoneOptionsSchema", { enumerable: true, get: function () { return phone_1.PhoneOptionsSchema; } });
|
|
48
56
|
var slots_options_1 = require("./lib/format/slots-options");
|
|
49
57
|
Object.defineProperty(exports, "SlotsOptionsSchema", { enumerable: true, get: function () { return slots_options_1.SlotsOptionsSchema; } });
|
|
58
|
+
var duplicates_1 = require("./lib/format/duplicates");
|
|
59
|
+
Object.defineProperty(exports, "PageDuplicatesSchema", { enumerable: true, get: function () { return duplicates_1.PageDuplicatesSchema; } });
|
|
60
|
+
var duplicate_kinds_1 = require("./lib/format/duplicate-kinds");
|
|
61
|
+
Object.defineProperty(exports, "DUPLICATE_KINDS", { enumerable: true, get: function () { return duplicate_kinds_1.DUPLICATE_KINDS; } });
|
|
62
|
+
Object.defineProperty(exports, "comparable", { enumerable: true, get: function () { return duplicate_kinds_1.comparable; } });
|
|
50
63
|
var json_schema_1 = require("./lib/format/json-schema");
|
|
51
64
|
Object.defineProperty(exports, "pageJsonSchema", { enumerable: true, get: function () { return json_schema_1.pageJsonSchema; } });
|
|
52
65
|
// The purposes a browser fills a box in with, from the HTML standard, as the format checks them.
|
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,wGAAwG;AACxG,kEAAmF;AAA1E,iHAAA,aAAa,OAAA;AACtB,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../libs/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4DAAgE;AAAvD,mHAAA,kBAAkB,OAAA;AAC3B,sDAA+D;AAAtD,kHAAA,oBAAoB,OAAA;AAC7B,gEAA2E;AAAlE,kHAAA,eAAe,OAAA;AAAE,6GAAA,UAAU,OAAA;AACpC,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,8 +1,10 @@
|
|
|
1
1
|
export * from './runtime.mjs';
|
|
2
2
|
// A memory source's free times from booking schedules: for demos and tests, outside the one-tag script.
|
|
3
3
|
export { scheduleSlots } from './lib/record/memory-schedules.mjs';
|
|
4
|
-
|
|
5
|
-
export {
|
|
4
|
+
// A memory source's records like the one typed, for its `duplicates`: for demos and tests, outside the one-tag script.
|
|
5
|
+
export { alikeRecords, nameLikeness } from './lib/record/memory-duplicates.mjs';
|
|
6
|
+
export { FieldSchema, FieldsSchema, LineFieldSchema, LinkedFieldSchema, LineKindsSchema, OptionSchema, PropertyDefinitionSchema, FilterConditionSchema, FilterItemSchema, MoneyLookSchema, ShrinkSchema, PERIODS, TimeZoneSchema, } from './lib/format/field.mjs';
|
|
7
|
+
export { ModifierSchema, RolesSchema, CellRulesSchema, ToneWhenSchema, LayoutNodeSchema, RootLayoutSchema, ListNodeSchema, ListCellSchema, ListCalendarSchema, ListCardSchema, ListGallerySchema, FilterPeriodSchema, RelatedNodeSchema } from './lib/format/layout.mjs';
|
|
6
8
|
export { PageSchema } from './lib/format/page.mjs';
|
|
7
9
|
export { ActionStepSchema, PageEventsSchema } from './lib/format/actions.mjs';
|
|
8
10
|
export { validatePage } from './lib/format/validate.mjs';
|
|
@@ -10,6 +12,8 @@ export { AddressSearchOptionsSchema } from './lib/format/address-search.mjs';
|
|
|
10
12
|
export { PathPickerOptionsSchema, StateDotOptionsSchema } from './lib/format/picker-options.mjs';
|
|
11
13
|
export { PagePhoneSchema, PhoneOptionsSchema } from './lib/format/phone.mjs';
|
|
12
14
|
export { SlotsOptionsSchema } from './lib/format/slots-options.mjs';
|
|
15
|
+
export { PageDuplicatesSchema } from './lib/format/duplicates.mjs';
|
|
16
|
+
export { DUPLICATE_KINDS, comparable } from './lib/format/duplicate-kinds.mjs';
|
|
13
17
|
export { pageJsonSchema } from './lib/format/json-schema.mjs';
|
|
14
18
|
// The purposes a browser fills a box in with, from the HTML standard, as the format checks them.
|
|
15
19
|
export { AUTOFILL, AUTOFILL_CONTACT, AUTOFILL_NAMES, autofillProblem, autofillPurpose } from './lib/format/autofill.mjs';
|
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,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;
|
|
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,uHAAuH;AACvH,OAAO,EAAE,YAAY,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 'message';
|
|
174
174
|
}
|
|
175
|
-
|
|
175
|
+
/**
|
|
176
|
+
* Print the record, or the page, as the page prints: every tab one after
|
|
177
|
+
* another under its name, every step and folded section open, the values as
|
|
178
|
+
* words, the record's title and the day at the top — the browser's own print,
|
|
179
|
+
* to paper or to a PDF. A gear menu's built-in Print is this step.
|
|
180
|
+
*/
|
|
181
|
+
export interface PrintStep extends StepBase {
|
|
182
|
+
do: 'print';
|
|
183
|
+
}
|
|
184
|
+
export type ActionStep = OpenStep | SetStep | ClearStep | AddLineStep | CheckStep | SaveStep | ResetStep | GoToStep | SayStep | AskStep | CallStep | CloseStep | ReloadStep | OpenUrlStep | ArchiveStep | UnarchiveStep | DuplicateStep | DeleteStep | PostStep | PrintStep;
|
|
176
185
|
/**
|
|
177
186
|
* The moments of a form that run steps. A change is a person's: values set by
|
|
178
187
|
* a step, a rule or the app do not run `change` again, so steps never chase
|
|
@@ -380,6 +389,9 @@ export declare const ActionStepSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
380
389
|
message: "message";
|
|
381
390
|
note: "note";
|
|
382
391
|
}>>;
|
|
392
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
393
|
+
do: z.ZodLiteral<"print">;
|
|
394
|
+
when: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
|
|
383
395
|
}, z.core.$strict>], "do">;
|
|
384
396
|
export declare const ActionStepsSchema: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
385
397
|
do: z.ZodLiteral<"open">;
|
|
@@ -513,6 +525,9 @@ export declare const ActionStepsSchema: z.ZodArray<z.ZodDiscriminatedUnion<[z.Zo
|
|
|
513
525
|
message: "message";
|
|
514
526
|
note: "note";
|
|
515
527
|
}>>;
|
|
528
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
529
|
+
do: z.ZodLiteral<"print">;
|
|
530
|
+
when: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
|
|
516
531
|
}, z.core.$strict>], "do">>;
|
|
517
532
|
export declare const PageEventsSchema: z.ZodObject<{
|
|
518
533
|
open: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
@@ -647,6 +662,9 @@ export declare const PageEventsSchema: z.ZodObject<{
|
|
|
647
662
|
message: "message";
|
|
648
663
|
note: "note";
|
|
649
664
|
}>>;
|
|
665
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
666
|
+
do: z.ZodLiteral<"print">;
|
|
667
|
+
when: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
|
|
650
668
|
}, z.core.$strict>], "do">>>;
|
|
651
669
|
change: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
652
670
|
do: z.ZodLiteral<"open">;
|
|
@@ -780,6 +798,9 @@ export declare const PageEventsSchema: z.ZodObject<{
|
|
|
780
798
|
message: "message";
|
|
781
799
|
note: "note";
|
|
782
800
|
}>>;
|
|
801
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
802
|
+
do: z.ZodLiteral<"print">;
|
|
803
|
+
when: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
|
|
783
804
|
}, z.core.$strict>], "do">>>>;
|
|
784
805
|
beforeSave: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
785
806
|
do: z.ZodLiteral<"open">;
|
|
@@ -913,6 +934,9 @@ export declare const PageEventsSchema: z.ZodObject<{
|
|
|
913
934
|
message: "message";
|
|
914
935
|
note: "note";
|
|
915
936
|
}>>;
|
|
937
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
938
|
+
do: z.ZodLiteral<"print">;
|
|
939
|
+
when: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
|
|
916
940
|
}, z.core.$strict>], "do">>>;
|
|
917
941
|
afterSave: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
918
942
|
do: z.ZodLiteral<"open">;
|
|
@@ -1046,6 +1070,9 @@ export declare const PageEventsSchema: z.ZodObject<{
|
|
|
1046
1070
|
message: "message";
|
|
1047
1071
|
note: "note";
|
|
1048
1072
|
}>>;
|
|
1073
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1074
|
+
do: z.ZodLiteral<"print">;
|
|
1075
|
+
when: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
|
|
1049
1076
|
}, z.core.$strict>], "do">>>;
|
|
1050
1077
|
show: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1051
1078
|
do: z.ZodLiteral<"open">;
|
|
@@ -1179,6 +1206,9 @@ export declare const PageEventsSchema: z.ZodObject<{
|
|
|
1179
1206
|
message: "message";
|
|
1180
1207
|
note: "note";
|
|
1181
1208
|
}>>;
|
|
1209
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1210
|
+
do: z.ZodLiteral<"print">;
|
|
1211
|
+
when: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
|
|
1182
1212
|
}, z.core.$strict>], "do">>>>;
|
|
1183
1213
|
}, z.core.$strict>;
|
|
1184
1214
|
export {};
|
|
@@ -172,7 +172,16 @@ export interface PostStep extends StepBase {
|
|
|
172
172
|
message: string;
|
|
173
173
|
kind?: 'note' | 'message';
|
|
174
174
|
}
|
|
175
|
-
|
|
175
|
+
/**
|
|
176
|
+
* Print the record, or the page, as the page prints: every tab one after
|
|
177
|
+
* another under its name, every step and folded section open, the values as
|
|
178
|
+
* words, the record's title and the day at the top — the browser's own print,
|
|
179
|
+
* to paper or to a PDF. A gear menu's built-in Print is this step.
|
|
180
|
+
*/
|
|
181
|
+
export interface PrintStep extends StepBase {
|
|
182
|
+
do: 'print';
|
|
183
|
+
}
|
|
184
|
+
export type ActionStep = OpenStep | SetStep | ClearStep | AddLineStep | CheckStep | SaveStep | ResetStep | GoToStep | SayStep | AskStep | CallStep | CloseStep | ReloadStep | OpenUrlStep | ArchiveStep | UnarchiveStep | DuplicateStep | DeleteStep | PostStep | PrintStep;
|
|
176
185
|
/**
|
|
177
186
|
* The moments of a form that run steps. A change is a person's: values set by
|
|
178
187
|
* a step, a rule or the app do not run `change` again, so steps never chase
|
|
@@ -380,6 +389,9 @@ export declare const ActionStepSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
380
389
|
message: "message";
|
|
381
390
|
note: "note";
|
|
382
391
|
}>>;
|
|
392
|
+
}, z.z.core.$strict>, z.ZodObject<{
|
|
393
|
+
do: z.ZodLiteral<"print">;
|
|
394
|
+
when: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
|
|
383
395
|
}, z.z.core.$strict>], "do">;
|
|
384
396
|
export declare const ActionStepsSchema: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
385
397
|
do: z.ZodLiteral<"open">;
|
|
@@ -513,6 +525,9 @@ export declare const ActionStepsSchema: z.ZodArray<z.ZodDiscriminatedUnion<[z.Zo
|
|
|
513
525
|
message: "message";
|
|
514
526
|
note: "note";
|
|
515
527
|
}>>;
|
|
528
|
+
}, z.z.core.$strict>, z.ZodObject<{
|
|
529
|
+
do: z.ZodLiteral<"print">;
|
|
530
|
+
when: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
|
|
516
531
|
}, z.z.core.$strict>], "do">>;
|
|
517
532
|
export declare const PageEventsSchema: z.ZodObject<{
|
|
518
533
|
open: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
@@ -647,6 +662,9 @@ export declare const PageEventsSchema: z.ZodObject<{
|
|
|
647
662
|
message: "message";
|
|
648
663
|
note: "note";
|
|
649
664
|
}>>;
|
|
665
|
+
}, z.z.core.$strict>, z.ZodObject<{
|
|
666
|
+
do: z.ZodLiteral<"print">;
|
|
667
|
+
when: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
|
|
650
668
|
}, z.z.core.$strict>], "do">>>;
|
|
651
669
|
change: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
652
670
|
do: z.ZodLiteral<"open">;
|
|
@@ -780,6 +798,9 @@ export declare const PageEventsSchema: z.ZodObject<{
|
|
|
780
798
|
message: "message";
|
|
781
799
|
note: "note";
|
|
782
800
|
}>>;
|
|
801
|
+
}, z.z.core.$strict>, z.ZodObject<{
|
|
802
|
+
do: z.ZodLiteral<"print">;
|
|
803
|
+
when: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
|
|
783
804
|
}, z.z.core.$strict>], "do">>>>;
|
|
784
805
|
beforeSave: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
785
806
|
do: z.ZodLiteral<"open">;
|
|
@@ -913,6 +934,9 @@ export declare const PageEventsSchema: z.ZodObject<{
|
|
|
913
934
|
message: "message";
|
|
914
935
|
note: "note";
|
|
915
936
|
}>>;
|
|
937
|
+
}, z.z.core.$strict>, z.ZodObject<{
|
|
938
|
+
do: z.ZodLiteral<"print">;
|
|
939
|
+
when: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
|
|
916
940
|
}, z.z.core.$strict>], "do">>>;
|
|
917
941
|
afterSave: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
918
942
|
do: z.ZodLiteral<"open">;
|
|
@@ -1046,6 +1070,9 @@ export declare const PageEventsSchema: z.ZodObject<{
|
|
|
1046
1070
|
message: "message";
|
|
1047
1071
|
note: "note";
|
|
1048
1072
|
}>>;
|
|
1073
|
+
}, z.z.core.$strict>, z.ZodObject<{
|
|
1074
|
+
do: z.ZodLiteral<"print">;
|
|
1075
|
+
when: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
|
|
1049
1076
|
}, z.z.core.$strict>], "do">>>;
|
|
1050
1077
|
show: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1051
1078
|
do: z.ZodLiteral<"open">;
|
|
@@ -1179,6 +1206,9 @@ export declare const PageEventsSchema: z.ZodObject<{
|
|
|
1179
1206
|
message: "message";
|
|
1180
1207
|
note: "note";
|
|
1181
1208
|
}>>;
|
|
1209
|
+
}, z.z.core.$strict>, z.ZodObject<{
|
|
1210
|
+
do: z.ZodLiteral<"print">;
|
|
1211
|
+
when: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
|
|
1182
1212
|
}, z.z.core.$strict>], "do">>>>;
|
|
1183
1213
|
}, z.z.core.$strict>;
|
|
1184
1214
|
export {};
|
|
@@ -47,6 +47,7 @@ exports.ActionStepSchema = z
|
|
|
47
47
|
z.strictObject({ do: z.literal('duplicate'), when }),
|
|
48
48
|
z.strictObject({ do: z.literal('delete'), when }),
|
|
49
49
|
z.strictObject({ do: z.literal('post'), when, message: z.string().min(1), kind: z.enum(['note', 'message']).optional() }),
|
|
50
|
+
z.strictObject({ do: z.literal('print'), when }),
|
|
50
51
|
])
|
|
51
52
|
.meta({ id: 'ActionStep' });
|
|
52
53
|
exports.ActionStepsSchema = steps();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"actions.js","sourceRoot":"","sources":["../../../../../../libs/core/src/lib/format/actions.ts"],"names":[],"mappings":";;;AAAA,yBAAyB;AACzB,mCAA4D;AAC5D,iCAAyD;
|
|
1
|
+
{"version":3,"file":"actions.js","sourceRoot":"","sources":["../../../../../../libs/core/src/lib/format/actions.ts"],"names":[],"mappings":";;;AAAA,yBAAyB;AACzB,mCAA4D;AAC5D,iCAAyD;AAkPzD,+FAA+F;AAC/F,MAAM,IAAI,GAAG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,QAAQ,EAAE;IAC9B,SAAS,EAAE,KAAK,EAAE,CAAC,QAAQ,EAAE;IAC7B,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,QAAQ,EAAE;CACtD,CAAC;KACD,IAAI,CAAC,EAAE,EAAE,EAAE,YAAY,EAAE,CAAC,CAAC"}
|
|
@@ -44,6 +44,7 @@ export const ActionStepSchema = z
|
|
|
44
44
|
z.strictObject({ do: z.literal('duplicate'), when }),
|
|
45
45
|
z.strictObject({ do: z.literal('delete'), when }),
|
|
46
46
|
z.strictObject({ do: z.literal('post'), when, message: z.string().min(1), kind: z.enum(['note', 'message']).optional() }),
|
|
47
|
+
z.strictObject({ do: z.literal('print'), when }),
|
|
47
48
|
])
|
|
48
49
|
.meta({ id: 'ActionStep' });
|
|
49
50
|
export const ActionStepsSchema = steps();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"actions.mjs","sourceRoot":"","sources":["../../../../../../libs/core/src/lib/format/actions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AACzB,OAAO,EAAE,gBAAgB,EAAmB,MAAM,SAAS,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAkB,MAAM,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"actions.mjs","sourceRoot":"","sources":["../../../../../../libs/core/src/lib/format/actions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AACzB,OAAO,EAAE,gBAAgB,EAAmB,MAAM,SAAS,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAkB,MAAM,QAAQ,CAAC;AAkPzD,+FAA+F;AAC/F,MAAM,IAAI,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CA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AQ,EAAE;IAC7B,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,QAAQ,EAAE;CACtD,CAAC;KACD,IAAI,CAAC,EAAE,EAAE,EAAE,YAAY,EAAE,CAAC,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Field } from './field.mjs';
|
|
2
|
+
/**
|
|
3
|
+
* The kinds of field a record is compared by, for possible duplicates (`duplicates` on a page): words (a name, a
|
|
4
|
+
* phone, an email, an id), a number (an id kept as one), a day (a birthday), a choice or a link (a company). Never a
|
|
5
|
+
* table, links, a file, formatted text or JSON, whose likeness is no one value's. Apart from the format's schema
|
|
6
|
+
* (duplicates.ts), so the page's quick check carries no validation library.
|
|
7
|
+
*/
|
|
8
|
+
export declare const DUPLICATE_KINDS: ReadonlySet<string>;
|
|
9
|
+
/** Whether records may be compared by this field: of such a kind. */
|
|
10
|
+
export declare const comparable: (def: Field | undefined) => boolean;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Field } from './field';
|
|
2
|
+
/**
|
|
3
|
+
* The kinds of field a record is compared by, for possible duplicates (`duplicates` on a page): words (a name, a
|
|
4
|
+
* phone, an email, an id), a number (an id kept as one), a day (a birthday), a choice or a link (a company). Never a
|
|
5
|
+
* table, links, a file, formatted text or JSON, whose likeness is no one value's. Apart from the format's schema
|
|
6
|
+
* (duplicates.ts), so the page's quick check carries no validation library.
|
|
7
|
+
*/
|
|
8
|
+
export declare const DUPLICATE_KINDS: ReadonlySet<string>;
|
|
9
|
+
/** Whether records may be compared by this field: of such a kind. */
|
|
10
|
+
export declare const comparable: (def: Field | undefined) => boolean;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.comparable = exports.DUPLICATE_KINDS = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* The kinds of field a record is compared by, for possible duplicates (`duplicates` on a page): words (a name, a
|
|
6
|
+
* phone, an email, an id), a number (an id kept as one), a day (a birthday), a choice or a link (a company). Never a
|
|
7
|
+
* table, links, a file, formatted text or JSON, whose likeness is no one value's. Apart from the format's schema
|
|
8
|
+
* (duplicates.ts), so the page's quick check carries no validation library.
|
|
9
|
+
*/
|
|
10
|
+
exports.DUPLICATE_KINDS = new Set(['char', 'text', 'integer', 'float', 'date', 'selection', 'many2one']);
|
|
11
|
+
/** Whether records may be compared by this field: of such a kind. */
|
|
12
|
+
const comparable = (def) => !!def && exports.DUPLICATE_KINDS.has(def.type);
|
|
13
|
+
exports.comparable = comparable;
|
|
14
|
+
//# sourceMappingURL=duplicate-kinds.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"duplicate-kinds.js","sourceRoot":"","sources":["../../../../../../libs/core/src/lib/format/duplicate-kinds.ts"],"names":[],"mappings":";;;AAEA;;;;;GAKG;AACU,QAAA,eAAe,GAAwB,IAAI,GAAG,CAAC,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,UAAU,CAAC,CAAC,CAAC;AAEnI,qEAAqE;AAC9D,MAAM,UAAU,GAAG,CAAC,GAAsB,EAAW,EAAE,CAAC,CAAC,CAAC,GAAG,IAAI,uBAAe,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;AAAzF,QAAA,UAAU,cAA+E"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The kinds of field a record is compared by, for possible duplicates (`duplicates` on a page): words (a name, a
|
|
3
|
+
* phone, an email, an id), a number (an id kept as one), a day (a birthday), a choice or a link (a company). Never a
|
|
4
|
+
* table, links, a file, formatted text or JSON, whose likeness is no one value's. Apart from the format's schema
|
|
5
|
+
* (duplicates.ts), so the page's quick check carries no validation library.
|
|
6
|
+
*/
|
|
7
|
+
export const DUPLICATE_KINDS = new Set(['char', 'text', 'integer', 'float', 'date', 'selection', 'many2one']);
|
|
8
|
+
/** Whether records may be compared by this field: of such a kind. */
|
|
9
|
+
export const comparable = (def) => !!def && DUPLICATE_KINDS.has(def.type);
|
|
10
|
+
//# sourceMappingURL=duplicate-kinds.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"duplicate-kinds.mjs","sourceRoot":"","sources":["../../../../../../libs/core/src/lib/format/duplicate-kinds.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,MAAM,CAAC,MAAM,eAAe,GAAwB,IAAI,GAAG,CAAC,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,UAAU,CAAC,CAAC,CAAC;AAEnI,qEAAqE;AACrE,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,GAAsB,EAAW,EAAE,CAAC,CAAC,CAAC,GAAG,IAAI,eAAe,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as z from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* Possible duplicates (`duplicates` on a record's page): while a person types a record — and again as it is saved —
|
|
4
|
+
* the page asks the data source's `duplicates` whether records like it exist already, by the fields named here: the
|
|
5
|
+
* same phone, the same email, the same tax or national id, a name close enough. What matched is said under the field
|
|
6
|
+
* it matched on, with Open it, "It's someone new" and Merge. Without the source's `duplicates`, nothing is asked and
|
|
7
|
+
* nothing shows.
|
|
8
|
+
*
|
|
9
|
+
* "duplicates": { "fields": ["name", "phone", "email", "vat"] }
|
|
10
|
+
* "duplicates": { "fields": ["phone", "email"], "on": "save" }
|
|
11
|
+
*
|
|
12
|
+
* `on`: `type` (the default) asks as a field named here is typed in, a moment after the typing stops, as a saved
|
|
13
|
+
* record is opened, and as the record is saved; `save` only as it is saved.
|
|
14
|
+
*/
|
|
15
|
+
export declare const PageDuplicatesSchema: z.ZodObject<{
|
|
16
|
+
fields: z.ZodArray<z.ZodString>;
|
|
17
|
+
on: z.ZodOptional<z.ZodEnum<{
|
|
18
|
+
type: "type";
|
|
19
|
+
save: "save";
|
|
20
|
+
}>>;
|
|
21
|
+
}, z.core.$strict>;
|
|
22
|
+
export type PageDuplicates = z.infer<typeof PageDuplicatesSchema>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as z from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* Possible duplicates (`duplicates` on a record's page): while a person types a record — and again as it is saved —
|
|
4
|
+
* the page asks the data source's `duplicates` whether records like it exist already, by the fields named here: the
|
|
5
|
+
* same phone, the same email, the same tax or national id, a name close enough. What matched is said under the field
|
|
6
|
+
* it matched on, with Open it, "It's someone new" and Merge. Without the source's `duplicates`, nothing is asked and
|
|
7
|
+
* nothing shows.
|
|
8
|
+
*
|
|
9
|
+
* "duplicates": { "fields": ["name", "phone", "email", "vat"] }
|
|
10
|
+
* "duplicates": { "fields": ["phone", "email"], "on": "save" }
|
|
11
|
+
*
|
|
12
|
+
* `on`: `type` (the default) asks as a field named here is typed in, a moment after the typing stops, as a saved
|
|
13
|
+
* record is opened, and as the record is saved; `save` only as it is saved.
|
|
14
|
+
*/
|
|
15
|
+
export declare const PageDuplicatesSchema: z.ZodObject<{
|
|
16
|
+
fields: z.ZodArray<z.ZodString>;
|
|
17
|
+
on: z.ZodOptional<z.ZodEnum<{
|
|
18
|
+
type: "type";
|
|
19
|
+
save: "save";
|
|
20
|
+
}>>;
|
|
21
|
+
}, z.z.core.$strict>;
|
|
22
|
+
export type PageDuplicates = z.infer<typeof PageDuplicatesSchema>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PageDuplicatesSchema = void 0;
|
|
4
|
+
const z = require("zod");
|
|
5
|
+
/**
|
|
6
|
+
* Possible duplicates (`duplicates` on a record's page): while a person types a record — and again as it is saved —
|
|
7
|
+
* the page asks the data source's `duplicates` whether records like it exist already, by the fields named here: the
|
|
8
|
+
* same phone, the same email, the same tax or national id, a name close enough. What matched is said under the field
|
|
9
|
+
* it matched on, with Open it, "It's someone new" and Merge. Without the source's `duplicates`, nothing is asked and
|
|
10
|
+
* nothing shows.
|
|
11
|
+
*
|
|
12
|
+
* "duplicates": { "fields": ["name", "phone", "email", "vat"] }
|
|
13
|
+
* "duplicates": { "fields": ["phone", "email"], "on": "save" }
|
|
14
|
+
*
|
|
15
|
+
* `on`: `type` (the default) asks as a field named here is typed in, a moment after the typing stops, as a saved
|
|
16
|
+
* record is opened, and as the record is saved; `save` only as it is saved.
|
|
17
|
+
*/
|
|
18
|
+
exports.PageDuplicatesSchema = z
|
|
19
|
+
.strictObject({
|
|
20
|
+
fields: z.array(z.string().min(1)).min(1),
|
|
21
|
+
on: z.enum(['type', 'save'], { error: 'on is "type" (asked as the fields are typed in, and as the record is saved) or "save" (as it is saved)' }).optional(),
|
|
22
|
+
})
|
|
23
|
+
.meta({ id: 'PageDuplicates' });
|
|
24
|
+
//# sourceMappingURL=duplicates.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"duplicates.js","sourceRoot":"","sources":["../../../../../../libs/core/src/lib/format/duplicates.ts"],"names":[],"mappings":";;;AAAA,yBAAyB;AAEzB;;;;;;;;;;;;GAYG;AACU,QAAA,oBAAoB,GAAG,CAAC;KAClC,YAAY,CAAC;IACZ,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;IACzC,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,EAAE,KAAK,EAAE,wGAAwG,EAAE,CAAC,CAAC,QAAQ,EAAE;CAC7J,CAAC;KACD,IAAI,CAAC,EAAE,EAAE,EAAE,gBAAgB,EAAE,CAAC,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import * as z from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* Possible duplicates (`duplicates` on a record's page): while a person types a record — and again as it is saved —
|
|
4
|
+
* the page asks the data source's `duplicates` whether records like it exist already, by the fields named here: the
|
|
5
|
+
* same phone, the same email, the same tax or national id, a name close enough. What matched is said under the field
|
|
6
|
+
* it matched on, with Open it, "It's someone new" and Merge. Without the source's `duplicates`, nothing is asked and
|
|
7
|
+
* nothing shows.
|
|
8
|
+
*
|
|
9
|
+
* "duplicates": { "fields": ["name", "phone", "email", "vat"] }
|
|
10
|
+
* "duplicates": { "fields": ["phone", "email"], "on": "save" }
|
|
11
|
+
*
|
|
12
|
+
* `on`: `type` (the default) asks as a field named here is typed in, a moment after the typing stops, as a saved
|
|
13
|
+
* record is opened, and as the record is saved; `save` only as it is saved.
|
|
14
|
+
*/
|
|
15
|
+
export const PageDuplicatesSchema = z
|
|
16
|
+
.strictObject({
|
|
17
|
+
fields: z.array(z.string().min(1)).min(1),
|
|
18
|
+
on: z.enum(['type', 'save'], { error: 'on is "type" (asked as the fields are typed in, and as the record is saved) or "save" (as it is saved)' }).optional(),
|
|
19
|
+
})
|
|
20
|
+
.meta({ id: 'PageDuplicates' });
|
|
21
|
+
//# sourceMappingURL=duplicates.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"duplicates.mjs","sourceRoot":"","sources":["../../../../../../libs/core/src/lib/format/duplicates.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAEzB;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC;KAClC,YAAY,CAAC;IACZ,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;IACzC,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,EAAE,KAAK,EAAE,wGAAwG,EAAE,CAAC,CAAC,QAAQ,EAAE;CAC7J,CAAC;KACD,IAAI,CAAC,EAAE,EAAE,EAAE,gBAAgB,EAAE,CAAC,CAAC"}
|