@yomotech/view-toolkit 1.0.70 → 1.0.71
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.
|
@@ -11521,6 +11521,10 @@ function fieldsOfSections(layoutSchema) {
|
|
|
11521
11521
|
return (layoutSchema?.formSections || []).flatMap((section) => section?.formFields || []);
|
|
11522
11522
|
}
|
|
11523
11523
|
|
|
11524
|
+
// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-11-17
|
|
11525
|
+
// - fix: addonRecords - the add-on gets the records as they are stored and shown (dates and times as local time
|
|
11526
|
+
// without zone, storageValue); JSON of the Date objects gave it UTC ("2026-11-16T23:00:00.000Z" for the 17th) and
|
|
11527
|
+
// tm-guided booked an hour early, a day early after midnight (protag read the digits)
|
|
11524
11528
|
// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-11-13
|
|
11525
11529
|
// - new: checks - addon.json checks { <name>: { handler } }, a button names one with check "addon:<name>"; the function
|
|
11526
11530
|
// gives back [{ message, field? }], [] = fine (checkHandler, checkCheckResult, AddonCheckRefused; OFFENE-PUNKTE 225 B)
|
|
@@ -11530,6 +11534,16 @@ function fieldsOfSections(layoutSchema) {
|
|
|
11530
11534
|
// - new: the rules the app holds an add-on to (OFFENE-PUNKTE 92, addonApi 1): what a transform and a route must give
|
|
11531
11535
|
// back, which hosts its http may call, its limits - checked in the app, so a wrong answer is a message, no crash
|
|
11532
11536
|
const ADDON_API_VERSION = 1;
|
|
11537
|
+
/**
|
|
11538
|
+
* The records as the add-on gets them: a copy in the form they are stored and shown - a date or time as local time
|
|
11539
|
+
* without zone (2026-11-17T20:00:00), never the UTC of a Date in JSON.
|
|
11540
|
+
*/
|
|
11541
|
+
function addonRecords(records) {
|
|
11542
|
+
const plain = (record) => record && typeof record === 'object' && !Array.isArray(record) && !(record instanceof Date)
|
|
11543
|
+
? Object.fromEntries(Object.entries(record).map(([key, value]) => [key, storageValue(value)]))
|
|
11544
|
+
: storageValue(record);
|
|
11545
|
+
return JSON.parse(JSON.stringify((records ?? []).map(plain)));
|
|
11546
|
+
}
|
|
11533
11547
|
function addonLimits(manifest) {
|
|
11534
11548
|
const timeoutMs = Number(manifest?.limits?.timeoutMs);
|
|
11535
11549
|
const upstreamCalls = Number(manifest?.limits?.upstreamCalls);
|
|
@@ -11762,6 +11776,8 @@ function linkAddonModules(files, entry, makeUrl) {
|
|
|
11762
11776
|
return link(entry);
|
|
11763
11777
|
}
|
|
11764
11778
|
|
|
11779
|
+
// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-11-17
|
|
11780
|
+
// - fix: transform and check hand the add-on the records as stored (addonRecords: local time, no UTC of a Date)
|
|
11765
11781
|
// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-11-13
|
|
11766
11782
|
// - new: check(name, records, params) - the add-on's check before saving / sending (OFFENE-PUNKTE 225 B)
|
|
11767
11783
|
// Faramarz Yousefian and Agent Toni (Claude Opus 5.5) 2026-11-05
|
|
@@ -11850,7 +11866,7 @@ class AddonHostService {
|
|
|
11850
11866
|
const handler = transformHandler(addon.manifest, name);
|
|
11851
11867
|
if (!handler)
|
|
11852
11868
|
throw new Error(`The add-on has no transform "${name}" (addon/addon.json transforms).`);
|
|
11853
|
-
const result = await this.call(addon, handler, { records:
|
|
11869
|
+
const result = await this.call(addon, handler, { records: addonRecords(records), params });
|
|
11854
11870
|
const checked = checkTransformResult(name, result, addon.limits);
|
|
11855
11871
|
if (checked.problem)
|
|
11856
11872
|
throw new Error(checked.problem);
|
|
@@ -11862,7 +11878,7 @@ class AddonHostService {
|
|
|
11862
11878
|
const handler = checkHandler(addon.manifest, name);
|
|
11863
11879
|
if (!handler)
|
|
11864
11880
|
throw new Error(`The add-on has no check "${name}" (addon/addon.json checks).`);
|
|
11865
|
-
const result = await this.call(addon, handler, { records:
|
|
11881
|
+
const result = await this.call(addon, handler, { records: addonRecords(records), params });
|
|
11866
11882
|
const checked = checkCheckResult(name, result);
|
|
11867
11883
|
if (checked.problem)
|
|
11868
11884
|
throw new Error(checked.problem);
|
|
@@ -18205,5 +18221,5 @@ function termsUser(userInfo) {
|
|
|
18205
18221
|
* Generated bundle index. Do not edit.
|
|
18206
18222
|
*/
|
|
18207
18223
|
|
|
18208
|
-
export { ADDON_API_VERSION, ADDON_TEST_KIT, AddonCheckRefused, AddonHostService, AppVersionResetService, Autocomplete, BACKEND_PROXY_PREFIX, BackendCallService, CardComponent, CardDesigner, CheckboxControl, ConfigService, ControlComponent, Couchdb, CustomKeyboardComponent, CustomKeyboardDirective, CustomKeyboardService, DATA_KEY_ANSWER, DATA_KEY_NONE, DEFAULT_DATE_FORMAT, DESIGN_TEXTS, DateFormatPipe, DateHintPipe, DateRangeControl, DateTextPipe, DateTimeControl, DesignBarComponent, DesignFieldPipe, DesignTextPipe, DropMarkerComponent, DropdownControl, FormComponent, GRID_COLUMNS, GridComponent, HeaderMenuComponent, LogsComponent, MAX_FIELDS_PER_ROW, MAX_ROW_COLUMNS, MediaControl, MediaSourcePipe, MobileKeycloakService, MobileOidcService, MobileOktaService, ModelComponent, NetworkLogService, NotificationService, NumberControl, PLACEHOLDER_SOURCES, PageData, PaginationComponent, PasswordControl, PdfViewerComponent, PdfViewerService, PlaceholderPipe, READ_ATTEMPT_TIMEOUT, REQUEST_STAGES, RETRY_PAUSES, RETRY_STATUSES, RadioControl, RecordStore, RemoteListService, RequestService, RequestTimeoutError, RequestTimeoutService, RulesPipe, SEND_ERROR_KEY, SIDE_DOCK_CLASS, STORAGE_DATE_FORMAT, SectionDesigner, SideMenuComponent, SlideshowComponent, SwitchControl, TermsDialog, TextareaControl, Textbox, UtilityService, VL_MEDIA_RESOLVER, ViewToolkitModule, VisiblePipe, acceptedLocally, addButton, addCardButton, addSection, addonHostAllowed, addonImports, addonLimits, addonManifestProblem, applyLayoutDefaults, applyMapping, backendTermsState, backendUrl, blankComments, buildBackendCall, buttonLocked, bytesOfBase64, cardButton, checkCheckResult, checkHandler, checkRouteResult, checkTransformResult, clearHeader, cloneLayout, columnFromProperty, controlKind, controlProperty, currencyDigits, currentDateLanguage, dateDigitCount, dateInputPattern, dependsOnForm, designDropIds, designField, designText, designTexts, designerLinksOn, designerPlace, displayDateValue, displayNumber, dropCardProperty, dropGridProperty, dropObjectName, dropProperty, dropTypeAt, durationText, elementFromProperty, fieldFromProperty, fieldInnerLayoutStyle, fieldModel, fieldRules, fieldSpan, fillFromUser, fillPlaceholders, fixedTimeText, formValuesGiven, formatDate, formatDates, fromStorageValue, gridColumnCount, hasBackendCall, hasHeaderTarget, headerButton, inputFormatHint, insertField, isAddonCode, isAddonTestFile, isBrowserSource, isIsoDate, isNativeMobile, isNativePhone, isPropertyDrop, isSignedIn, isTarget, languageDatePattern, layoutPlaceholder, linkAddonModules, linkOfRecord, loadErrorOf, lockHint, lockReason, lockReasons, mappedValues, mediaKind, moveCardElement, moveColumn, moveField, moveSection, moveTreeNode, newButton, newSection, nextZoom, normalizeCard, normalizeCustomKeyboardType, normalizeSections, numberShape, numberStep, numberSuffix, parseAnswer, parseRecords, parseStorageDate, parseTimeText, perUserField, primeDatePattern, proxyFor, rebalanceRow, recordOf, recordsFrom, removeCardElement, removeColumn, removeField, removeHeaderElement, removeSection, removeTreeNode, renewSignIn, replaceCardElement, replaceColumn, replaceField, replaceSection, replaceTreeNode, requestDesignDelete, resizeColumn, resolveAddonPath, resolveCustomKeyboardType, resolvePlaceholder, resolveTemplate, routeOf, ruleMessage, runAddonTests, sampleRecords, sampleValue, sectionPlain, sectionSpan, sectionSticky, sectionTabletSpan, sectionVisible, sendErrorText, sendsForm, setDateLanguage, setInputHintLanguage, setProxyEnvironment, setSignInRenewal, setToolkitKeyboardOnWeb, shapeDateDigits, shapeTimeText, sideDockWidth, splitReference, stagedRead, stagedRequest, storageKeyOf, storageKind, storageValue, storedToTyped, styleParts, termsStamp, termsStorageKey, termsToConfirm, termsUrl, termsUser, testAction, testFieldKey, testFieldPath, testWrites, timeHourFormat, toggleMeridiem, toggleRecord, toolkitKeyboardActive, transformHandler, treeNode, treePaths, typedMeridiem, typedToStored, useDesignerLinks, useDraftSource, userRecord, usesTwelveHours, validTreePath, valueAt, visibleFields, whenOnline, withAppPagination, withUserRecord, withoutMarks, wrapperStyleOf };
|
|
18224
|
+
export { ADDON_API_VERSION, ADDON_TEST_KIT, AddonCheckRefused, AddonHostService, AppVersionResetService, Autocomplete, BACKEND_PROXY_PREFIX, BackendCallService, CardComponent, CardDesigner, CheckboxControl, ConfigService, ControlComponent, Couchdb, CustomKeyboardComponent, CustomKeyboardDirective, CustomKeyboardService, DATA_KEY_ANSWER, DATA_KEY_NONE, DEFAULT_DATE_FORMAT, DESIGN_TEXTS, DateFormatPipe, DateHintPipe, DateRangeControl, DateTextPipe, DateTimeControl, DesignBarComponent, DesignFieldPipe, DesignTextPipe, DropMarkerComponent, DropdownControl, FormComponent, GRID_COLUMNS, GridComponent, HeaderMenuComponent, LogsComponent, MAX_FIELDS_PER_ROW, MAX_ROW_COLUMNS, MediaControl, MediaSourcePipe, MobileKeycloakService, MobileOidcService, MobileOktaService, ModelComponent, NetworkLogService, NotificationService, NumberControl, PLACEHOLDER_SOURCES, PageData, PaginationComponent, PasswordControl, PdfViewerComponent, PdfViewerService, PlaceholderPipe, READ_ATTEMPT_TIMEOUT, REQUEST_STAGES, RETRY_PAUSES, RETRY_STATUSES, RadioControl, RecordStore, RemoteListService, RequestService, RequestTimeoutError, RequestTimeoutService, RulesPipe, SEND_ERROR_KEY, SIDE_DOCK_CLASS, STORAGE_DATE_FORMAT, SectionDesigner, SideMenuComponent, SlideshowComponent, SwitchControl, TermsDialog, TextareaControl, Textbox, UtilityService, VL_MEDIA_RESOLVER, ViewToolkitModule, VisiblePipe, acceptedLocally, addButton, addCardButton, addSection, addonHostAllowed, addonImports, addonLimits, addonManifestProblem, addonRecords, applyLayoutDefaults, applyMapping, backendTermsState, backendUrl, blankComments, buildBackendCall, buttonLocked, bytesOfBase64, cardButton, checkCheckResult, checkHandler, checkRouteResult, checkTransformResult, clearHeader, cloneLayout, columnFromProperty, controlKind, controlProperty, currencyDigits, currentDateLanguage, dateDigitCount, dateInputPattern, dependsOnForm, designDropIds, designField, designText, designTexts, designerLinksOn, designerPlace, displayDateValue, displayNumber, dropCardProperty, dropGridProperty, dropObjectName, dropProperty, dropTypeAt, durationText, elementFromProperty, fieldFromProperty, fieldInnerLayoutStyle, fieldModel, fieldRules, fieldSpan, fillFromUser, fillPlaceholders, fixedTimeText, formValuesGiven, formatDate, formatDates, fromStorageValue, gridColumnCount, hasBackendCall, hasHeaderTarget, headerButton, inputFormatHint, insertField, isAddonCode, isAddonTestFile, isBrowserSource, isIsoDate, isNativeMobile, isNativePhone, isPropertyDrop, isSignedIn, isTarget, languageDatePattern, layoutPlaceholder, linkAddonModules, linkOfRecord, loadErrorOf, lockHint, lockReason, lockReasons, mappedValues, mediaKind, moveCardElement, moveColumn, moveField, moveSection, moveTreeNode, newButton, newSection, nextZoom, normalizeCard, normalizeCustomKeyboardType, normalizeSections, numberShape, numberStep, numberSuffix, parseAnswer, parseRecords, parseStorageDate, parseTimeText, perUserField, primeDatePattern, proxyFor, rebalanceRow, recordOf, recordsFrom, removeCardElement, removeColumn, removeField, removeHeaderElement, removeSection, removeTreeNode, renewSignIn, replaceCardElement, replaceColumn, replaceField, replaceSection, replaceTreeNode, requestDesignDelete, resizeColumn, resolveAddonPath, resolveCustomKeyboardType, resolvePlaceholder, resolveTemplate, routeOf, ruleMessage, runAddonTests, sampleRecords, sampleValue, sectionPlain, sectionSpan, sectionSticky, sectionTabletSpan, sectionVisible, sendErrorText, sendsForm, setDateLanguage, setInputHintLanguage, setProxyEnvironment, setSignInRenewal, setToolkitKeyboardOnWeb, shapeDateDigits, shapeTimeText, sideDockWidth, splitReference, stagedRead, stagedRequest, storageKeyOf, storageKind, storageValue, storedToTyped, styleParts, termsStamp, termsStorageKey, termsToConfirm, termsUrl, termsUser, testAction, testFieldKey, testFieldPath, testWrites, timeHourFormat, toggleMeridiem, toggleRecord, toolkitKeyboardActive, transformHandler, treeNode, treePaths, typedMeridiem, typedToStored, useDesignerLinks, useDraftSource, userRecord, usesTwelveHours, validTreePath, valueAt, visibleFields, whenOnline, withAppPagination, withUserRecord, withoutMarks, wrapperStyleOf };
|
|
18209
18225
|
//# sourceMappingURL=yomotech-view-toolkit.mjs.map
|