@aglyn/aglyn 1.0.0-beta.220 → 1.0.0-beta.222
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/package.json +15 -11
- package/src/lib/app-utils/agent-openapi.js +1 -1
- package/src/lib/app-utils/agent-openapi.js.map +1 -1
- package/src/lib/app-utils/analytics-events.d.ts +3 -2
- package/src/lib/app-utils/analytics-events.js +3 -2
- package/src/lib/app-utils/analytics-events.js.map +1 -1
- package/src/lib/app-utils/api-plugins.d.ts +30 -0
- package/src/lib/app-utils/api-plugins.js +24 -1
- package/src/lib/app-utils/api-plugins.js.map +1 -1
- package/src/lib/app-utils/author-html.d.ts +1 -1
- package/src/lib/app-utils/author-html.js.map +1 -1
- package/src/lib/app-utils/bandwidth-cap.d.ts +12 -1
- package/src/lib/app-utils/bandwidth-cap.js +17 -1
- package/src/lib/app-utils/bandwidth-cap.js.map +1 -1
- package/src/lib/app-utils/compose-reusable-components.d.ts +19 -0
- package/src/lib/app-utils/compose-reusable-components.js +116 -26
- package/src/lib/app-utils/compose-reusable-components.js.map +1 -1
- package/src/lib/app-utils/console-routes.d.ts +4 -0
- package/src/lib/app-utils/console-routes.js +3 -0
- package/src/lib/app-utils/console-routes.js.map +1 -1
- package/src/lib/app-utils/contacts.d.ts +71 -0
- package/src/lib/app-utils/contacts.js +55 -0
- package/src/lib/app-utils/contacts.js.map +1 -1
- package/src/lib/app-utils/contexts.d.ts +1 -0
- package/src/lib/app-utils/contexts.js +1 -0
- package/src/lib/app-utils/contexts.js.map +1 -1
- package/src/lib/app-utils/crm-email-templates.js +21 -4
- package/src/lib/app-utils/crm-email-templates.js.map +1 -1
- package/src/lib/app-utils/crm-kinds.d.ts +2 -0
- package/src/lib/app-utils/crm-kinds.js +1 -0
- package/src/lib/app-utils/crm-kinds.js.map +1 -1
- package/src/lib/app-utils/crm.d.ts +1199 -67
- package/src/lib/app-utils/crm.js +1951 -310
- package/src/lib/app-utils/crm.js.map +1 -1
- package/src/lib/app-utils/csv-import.d.ts +10 -38
- package/src/lib/app-utils/csv-import.js +17 -42
- package/src/lib/app-utils/csv-import.js.map +1 -1
- package/src/lib/app-utils/csv.d.ts +32 -11
- package/src/lib/app-utils/csv.js +43 -5
- package/src/lib/app-utils/csv.js.map +1 -1
- package/src/lib/app-utils/default-site.d.ts +116 -0
- package/src/lib/app-utils/default-site.js +1024 -0
- package/src/lib/app-utils/default-site.js.map +1 -0
- package/src/lib/app-utils/docs-help.generated.d.ts +23 -23
- package/src/lib/app-utils/docs-help.generated.js +47 -10
- package/src/lib/app-utils/docs-help.generated.js.map +1 -1
- package/src/lib/app-utils/docs-index.generated.js +746 -151
- package/src/lib/app-utils/docs-index.generated.js.map +1 -1
- package/src/lib/app-utils/draft-placeholders.d.ts +76 -0
- package/src/lib/app-utils/draft-placeholders.js +115 -0
- package/src/lib/app-utils/draft-placeholders.js.map +1 -0
- package/src/lib/app-utils/entity-picker-context.d.ts +19 -15
- package/src/lib/app-utils/entity-picker-context.js +4 -4
- package/src/lib/app-utils/entity-picker-context.js.map +1 -1
- package/src/lib/app-utils/expand-repeatables.d.ts +66 -10
- package/src/lib/app-utils/expand-repeatables.js +88 -14
- package/src/lib/app-utils/expand-repeatables.js.map +1 -1
- package/src/lib/app-utils/forms.d.ts +33 -22
- package/src/lib/app-utils/forms.js +47 -28
- package/src/lib/app-utils/forms.js.map +1 -1
- package/src/lib/app-utils/full-use-cost.d.ts +277 -0
- package/src/lib/app-utils/full-use-cost.js +421 -0
- package/src/lib/app-utils/full-use-cost.js.map +1 -0
- package/src/lib/app-utils/health-report.js +33 -0
- package/src/lib/app-utils/health-report.js.map +1 -1
- package/src/lib/app-utils/leaving-notice.d.ts +96 -0
- package/src/lib/app-utils/leaving-notice.js +157 -0
- package/src/lib/app-utils/leaving-notice.js.map +1 -0
- package/src/lib/app-utils/llms-txt.d.ts +20 -0
- package/src/lib/app-utils/llms-txt.js +7 -1
- package/src/lib/app-utils/llms-txt.js.map +1 -1
- package/src/lib/app-utils/media-asset-facts.d.ts +16 -1
- package/src/lib/app-utils/media-asset-facts.js +40 -13
- package/src/lib/app-utils/media-asset-facts.js.map +1 -1
- package/src/lib/app-utils/media-bandwidth.d.ts +52 -0
- package/src/lib/app-utils/media-bandwidth.js +94 -0
- package/src/lib/app-utils/media-bandwidth.js.map +1 -0
- package/src/lib/app-utils/media-ref.d.ts +241 -33
- package/src/lib/app-utils/media-ref.js +324 -43
- package/src/lib/app-utils/media-ref.js.map +1 -1
- package/src/lib/app-utils/media-src.d.ts +8 -8
- package/src/lib/app-utils/media-src.js +27 -11
- package/src/lib/app-utils/media-src.js.map +1 -1
- package/src/lib/app-utils/media-takedown-reach.d.ts +4 -1
- package/src/lib/app-utils/media-takedown-reach.js +6 -3
- package/src/lib/app-utils/media-takedown-reach.js.map +1 -1
- package/src/lib/app-utils/notifications.d.ts +1 -1
- package/src/lib/app-utils/notifications.js +2 -0
- package/src/lib/app-utils/notifications.js.map +1 -1
- package/src/lib/app-utils/operator-alerts.js +17 -0
- package/src/lib/app-utils/operator-alerts.js.map +1 -1
- package/src/lib/app-utils/organizations.d.ts +51 -2
- package/src/lib/app-utils/organizations.js +56 -3
- package/src/lib/app-utils/organizations.js.map +1 -1
- package/src/lib/app-utils/page-record-sources.d.ts +87 -0
- package/src/lib/app-utils/page-record-sources.js +53 -0
- package/src/lib/app-utils/page-record-sources.js.map +1 -0
- package/src/lib/app-utils/paid-media-source.d.ts +3 -7
- package/src/lib/app-utils/paid-media-source.js +5 -19
- package/src/lib/app-utils/paid-media-source.js.map +1 -1
- package/src/lib/app-utils/person-erasure.d.ts +5 -2
- package/src/lib/app-utils/person-erasure.js.map +1 -1
- package/src/lib/app-utils/picklists.d.ts +187 -0
- package/src/lib/app-utils/picklists.js +320 -0
- package/src/lib/app-utils/picklists.js.map +1 -0
- package/src/lib/app-utils/plan-entitlements.d.ts +220 -50
- package/src/lib/app-utils/plan-entitlements.js +309 -115
- package/src/lib/app-utils/plan-entitlements.js.map +1 -1
- package/src/lib/app-utils/realm-host-surface.generated.js +2 -0
- package/src/lib/app-utils/realm-host-surface.generated.js.map +1 -1
- package/src/lib/app-utils/release-flags.d.ts +1 -1
- package/src/lib/app-utils/release-flags.js +11 -0
- package/src/lib/app-utils/release-flags.js.map +1 -1
- package/src/lib/app-utils/rendered-widths.d.ts +121 -0
- package/src/lib/app-utils/rendered-widths.js +211 -0
- package/src/lib/app-utils/rendered-widths.js.map +1 -0
- package/src/lib/app-utils/repeat-sources.d.ts +2 -1
- package/src/lib/app-utils/repeat-sources.js.map +1 -1
- package/src/lib/app-utils/screen-link-context-value.d.ts +7 -0
- package/src/lib/app-utils/screen-link-context-value.js.map +1 -1
- package/src/lib/app-utils/screen-link-context.js +14 -2
- package/src/lib/app-utils/screen-link-context.js.map +1 -1
- package/src/lib/app-utils/screen-route.d.ts +157 -36
- package/src/lib/app-utils/screen-route.js +191 -41
- package/src/lib/app-utils/screen-route.js.map +1 -1
- package/src/lib/app-utils/seo-audit.d.ts +11 -1
- package/src/lib/app-utils/seo-audit.js +33 -13
- package/src/lib/app-utils/seo-audit.js.map +1 -1
- package/src/lib/app-utils/seo-keywords.d.ts +11 -0
- package/src/lib/app-utils/seo-keywords.js +19 -5
- package/src/lib/app-utils/seo-keywords.js.map +1 -1
- package/src/lib/app-utils/seo-page-facts.d.ts +47 -4
- package/src/lib/app-utils/seo-page-facts.js +136 -31
- package/src/lib/app-utils/seo-page-facts.js.map +1 -1
- package/src/lib/app-utils/seo-site-scan.d.ts +42 -4
- package/src/lib/app-utils/seo-site-scan.js +113 -12
- package/src/lib/app-utils/seo-site-scan.js.map +1 -1
- package/src/lib/app-utils/server.d.ts +5 -4
- package/src/lib/app-utils/server.js +14 -5
- package/src/lib/app-utils/server.js.map +1 -1
- package/src/lib/app-utils/site-icon-set.d.ts +195 -0
- package/src/lib/app-utils/site-icon-set.js +351 -0
- package/src/lib/app-utils/site-icon-set.js.map +1 -0
- package/src/lib/app-utils/site-interactions.d.ts +101 -4
- package/src/lib/app-utils/site-interactions.js +120 -4
- package/src/lib/app-utils/site-interactions.js.map +1 -1
- package/src/lib/app-utils/starter-template-nodes.d.ts +7 -0
- package/src/lib/app-utils/starter-template-nodes.js +3 -0
- package/src/lib/app-utils/starter-template-nodes.js.map +1 -1
- package/src/lib/app-utils/starter-templates.d.ts +5 -19
- package/src/lib/app-utils/starter-templates.js +5 -49
- package/src/lib/app-utils/starter-templates.js.map +1 -1
- package/src/lib/app-utils/transfer-launcher-context.d.ts +136 -0
- package/src/lib/app-utils/transfer-launcher-context.js +23 -0
- package/src/lib/app-utils/transfer-launcher-context.js.map +1 -0
- package/src/lib/app-utils/transfer-resume-import.d.ts +39 -0
- package/src/lib/app-utils/transfer-resume-import.js +128 -0
- package/src/lib/app-utils/transfer-resume-import.js.map +1 -0
- package/src/lib/app-utils/upgrade-proposal.d.ts +66 -0
- package/src/lib/app-utils/upgrade-proposal.js +95 -0
- package/src/lib/app-utils/upgrade-proposal.js.map +1 -0
- package/src/lib/app-utils/utc-month.d.ts +33 -0
- package/src/lib/app-utils/utc-month.js +35 -0
- package/src/lib/app-utils/utc-month.js.map +1 -0
- package/src/lib/app-utils/visitor-record-ceiling.d.ts +4 -4
- package/src/lib/app-utils/visitor-record-ceiling.js +4 -4
- package/src/lib/app-utils/visitor-record-ceiling.js.map +1 -1
- package/src/lib/app-utils/wire-nodes.d.ts +39 -19
- package/src/lib/app-utils/wire-nodes.js +120 -34
- package/src/lib/app-utils/wire-nodes.js.map +1 -1
- package/src/lib/data-transfer/access.d.ts +74 -0
- package/src/lib/data-transfer/access.js +93 -0
- package/src/lib/data-transfer/access.js.map +1 -0
- package/src/lib/data-transfer/derive.d.ts +246 -0
- package/src/lib/data-transfer/derive.js +1007 -0
- package/src/lib/data-transfer/derive.js.map +1 -0
- package/src/lib/data-transfer/export-file.d.ts +46 -0
- package/src/lib/data-transfer/export-file.js +146 -0
- package/src/lib/data-transfer/export-file.js.map +1 -0
- package/src/lib/data-transfer/field-catalog.d.ts +134 -0
- package/src/lib/data-transfer/field-catalog.js +278 -0
- package/src/lib/data-transfer/field-catalog.js.map +1 -0
- package/src/lib/data-transfer/header-match.d.ts +129 -0
- package/src/lib/data-transfer/header-match.js +367 -0
- package/src/lib/data-transfer/header-match.js.map +1 -0
- package/src/lib/data-transfer/index.d.ts +34 -0
- package/src/lib/data-transfer/index.js +40 -0
- package/src/lib/data-transfer/index.js.map +1 -0
- package/src/lib/data-transfer/job.d.ts +190 -0
- package/src/lib/data-transfer/job.js +229 -0
- package/src/lib/data-transfer/job.js.map +1 -0
- package/src/lib/data-transfer/lookup.d.ts +45 -0
- package/src/lib/data-transfer/lookup.js +71 -0
- package/src/lib/data-transfer/lookup.js.map +1 -0
- package/src/lib/data-transfer/match.d.ts +99 -0
- package/src/lib/data-transfer/match.js +244 -0
- package/src/lib/data-transfer/match.js.map +1 -0
- package/src/lib/data-transfer/package-plan.d.ts +205 -0
- package/src/lib/data-transfer/package-plan.js +475 -0
- package/src/lib/data-transfer/package-plan.js.map +1 -0
- package/src/lib/data-transfer/package.d.ts +181 -0
- package/src/lib/data-transfer/package.js +426 -0
- package/src/lib/data-transfer/package.js.map +1 -0
- package/src/lib/data-transfer/picklist-map.d.ts +139 -0
- package/src/lib/data-transfer/picklist-map.js +271 -0
- package/src/lib/data-transfer/picklist-map.js.map +1 -0
- package/src/lib/data-transfer/plan.d.ts +176 -0
- package/src/lib/data-transfer/plan.js +451 -0
- package/src/lib/data-transfer/plan.js.map +1 -0
- package/src/lib/data-transfer/policy.d.ts +170 -0
- package/src/lib/data-transfer/policy.js +378 -0
- package/src/lib/data-transfer/policy.js.map +1 -0
- package/src/lib/data-transfer/resource.d.ts +211 -0
- package/src/lib/data-transfer/resource.js +241 -0
- package/src/lib/data-transfer/resource.js.map +1 -0
- package/src/lib/data-transfer/review.d.ts +70 -0
- package/src/lib/data-transfer/review.js +233 -0
- package/src/lib/data-transfer/review.js.map +1 -0
- package/src/lib/data-transfer/similarity.d.ts +40 -0
- package/src/lib/data-transfer/similarity.js +106 -0
- package/src/lib/data-transfer/similarity.js.map +1 -0
- package/src/lib/data-transfer/site-package.d.ts +365 -0
- package/src/lib/data-transfer/site-package.js +1077 -0
- package/src/lib/data-transfer/site-package.js.map +1 -0
- package/src/lib/data-transfer/source.d.ts +74 -0
- package/src/lib/data-transfer/source.js +293 -0
- package/src/lib/data-transfer/source.js.map +1 -0
- package/src/lib/data-transfer/transfer-api.d.ts +898 -0
- package/src/lib/data-transfer/transfer-api.js +107 -0
- package/src/lib/data-transfer/transfer-api.js.map +1 -0
- package/src/lib/foundation/definitions/org-billing.types.d.ts +31 -0
- package/src/lib/foundation/definitions/org-billing.types.js.map +1 -1
- package/src/lib/foundation/definitions/organization.types.d.ts +42 -1
- package/src/lib/foundation/definitions/organization.types.js.map +1 -1
- package/src/lib/foundation/definitions/platform.types.d.ts +6 -4
- package/src/lib/foundation/definitions/platform.types.js.map +1 -1
- package/src/lib/foundation/index.d.ts +1 -1
- package/src/lib/foundation/index.js.map +1 -1
- package/src/lib/plugin-manager/feature-plugins.d.ts +91 -2
- package/src/lib/plugin-manager/feature-plugins.js +48 -3
- package/src/lib/plugin-manager/feature-plugins.js.map +1 -1
- package/src/lib/plugin-manager/first-party-plugins.generated.d.ts +56 -0
- package/src/lib/plugin-manager/first-party-plugins.generated.js +1132 -27
- package/src/lib/plugin-manager/first-party-plugins.generated.js.map +1 -1
- package/src/lib/plugin-manager/index.d.ts +0 -1
- package/src/lib/plugin-manager/index.js +0 -1
- package/src/lib/plugin-manager/index.js.map +1 -1
- package/src/lib/plugin-manager/interaction-recipes.d.ts +142 -0
- package/src/lib/plugin-manager/interaction-recipes.js +104 -0
- package/src/lib/plugin-manager/interaction-recipes.js.map +1 -0
- package/src/lib/plugin-manager/interaction-step-checks.d.ts +66 -0
- package/src/lib/plugin-manager/interaction-step-checks.js +86 -0
- package/src/lib/plugin-manager/interaction-step-checks.js.map +1 -0
- package/src/lib/plugin-manager/plugin-artifact-types.d.ts +235 -0
- package/src/lib/plugin-manager/plugin-artifact-types.js +99 -0
- package/src/lib/plugin-manager/plugin-artifact-types.js.map +1 -0
- package/src/lib/plugin-manager/plugin-contact-capture.d.ts +8 -0
- package/src/lib/plugin-manager/plugin-contact-capture.js.map +1 -1
- package/src/lib/plugin-manager/plugin-conversion-credit.d.ts +216 -0
- package/src/lib/plugin-manager/plugin-conversion-credit.js +91 -0
- package/src/lib/plugin-manager/plugin-conversion-credit.js.map +1 -0
- package/src/lib/plugin-manager/plugin-entity-pickers.d.ts +83 -0
- package/src/lib/plugin-manager/plugin-entity-pickers.js +87 -0
- package/src/lib/plugin-manager/plugin-entity-pickers.js.map +1 -0
- package/src/lib/plugin-manager/plugin-host-resources.d.ts +6 -0
- package/src/lib/plugin-manager/plugin-host-resources.js +6 -1
- package/src/lib/plugin-manager/plugin-host-resources.js.map +1 -1
- package/src/lib/plugin-manager/plugin-intake-gates.d.ts +75 -0
- package/src/lib/plugin-manager/plugin-intake-gates.js +49 -0
- package/src/lib/plugin-manager/plugin-intake-gates.js.map +1 -0
- package/src/lib/plugin-manager/plugin-jobs.d.ts +5 -5
- package/src/lib/plugin-manager/plugin-jobs.js +7 -7
- package/src/lib/plugin-manager/plugin-jobs.js.map +1 -1
- package/src/lib/plugin-manager/plugin-live-paths.d.ts +70 -0
- package/src/lib/plugin-manager/plugin-live-paths.js +66 -0
- package/src/lib/plugin-manager/plugin-live-paths.js.map +1 -0
- package/src/lib/plugin-manager/plugin-org-erasure.d.ts +3 -2
- package/src/lib/plugin-manager/plugin-org-erasure.js +30 -5
- package/src/lib/plugin-manager/plugin-org-erasure.js.map +1 -1
- package/src/lib/plugin-manager/plugin-person-erasure.d.ts +68 -9
- package/src/lib/plugin-manager/plugin-person-erasure.js +196 -51
- package/src/lib/plugin-manager/plugin-person-erasure.js.map +1 -1
- package/src/lib/plugin-manager/plugin-person-records.d.ts +275 -0
- package/src/lib/plugin-manager/plugin-person-records.js +107 -0
- package/src/lib/plugin-manager/plugin-person-records.js.map +1 -0
- package/src/lib/plugin-manager/plugin-record-counts.d.ts +76 -0
- package/src/lib/plugin-manager/plugin-record-counts.js +49 -0
- package/src/lib/plugin-manager/plugin-record-counts.js.map +1 -0
- package/src/lib/plugin-manager/plugin-record-email-state.d.ts +26 -0
- package/src/lib/plugin-manager/plugin-record-email-state.js +16 -0
- package/src/lib/plugin-manager/plugin-record-email-state.js.map +1 -1
- package/src/lib/plugin-manager/plugin-record-index.d.ts +10 -0
- package/src/lib/plugin-manager/plugin-record-index.js.map +1 -1
- package/src/lib/plugin-manager/plugin-record-lists.d.ts +86 -6
- package/src/lib/plugin-manager/plugin-record-lists.js +42 -5
- package/src/lib/plugin-manager/plugin-record-lists.js.map +1 -1
- package/src/lib/plugin-manager/plugin-record-origin.d.ts +79 -0
- package/src/lib/plugin-manager/plugin-record-origin.js +46 -0
- package/src/lib/plugin-manager/plugin-record-origin.js.map +1 -0
- package/src/lib/plugin-manager/plugin-record-pages.d.ts +37 -0
- package/src/lib/plugin-manager/plugin-record-pages.js +52 -0
- package/src/lib/plugin-manager/plugin-record-pages.js.map +1 -0
- package/src/lib/plugin-manager/plugin-record-timeline.d.ts +60 -0
- package/src/lib/plugin-manager/plugin-record-timeline.js +16 -0
- package/src/lib/plugin-manager/plugin-record-timeline.js.map +1 -1
- package/src/lib/plugin-manager/plugin-resource-drafts.d.ts +5 -5
- package/src/lib/plugin-manager/plugin-resource-drafts.js.map +1 -1
- package/src/lib/plugin-manager/plugin-revocations.d.ts +64 -0
- package/src/lib/plugin-manager/plugin-revocations.js +47 -0
- package/src/lib/plugin-manager/plugin-revocations.js.map +1 -0
- package/src/lib/plugin-manager/plugin-send-tallies.d.ts +69 -0
- package/src/lib/plugin-manager/plugin-send-tallies.js +45 -0
- package/src/lib/plugin-manager/plugin-send-tallies.js.map +1 -0
- package/src/lib/plugin-manager/plugin-server-steps.d.ts +170 -0
- package/src/lib/plugin-manager/plugin-server-steps.js +116 -0
- package/src/lib/plugin-manager/plugin-server-steps.js.map +1 -0
- package/src/lib/plugin-manager/plugin-site-bundle.d.ts +40 -0
- package/src/lib/plugin-manager/plugin-site-bundle.js +4 -0
- package/src/lib/plugin-manager/plugin-site-bundle.js.map +1 -1
- package/src/lib/plugin-manager/plugin-site-export.d.ts +57 -1
- package/src/lib/plugin-manager/plugin-site-export.js +23 -10
- package/src/lib/plugin-manager/plugin-site-export.js.map +1 -1
- package/src/lib/plugin-manager/plugin-sitemap-readers.d.ts +146 -0
- package/src/lib/plugin-manager/plugin-sitemap-readers.js +110 -0
- package/src/lib/plugin-manager/plugin-sitemap-readers.js.map +1 -0
- package/src/lib/plugin-manager/plugin-transfer-resources.d.ts +714 -0
- package/src/lib/plugin-manager/plugin-transfer-resources.js +443 -0
- package/src/lib/plugin-manager/plugin-transfer-resources.js.map +1 -0
- package/src/lib/plugin-manager/plugin-usage-axes.d.ts +54 -5
- package/src/lib/plugin-manager/plugin-usage-axes.js +11 -3
- package/src/lib/plugin-manager/plugin-usage-axes.js.map +1 -1
- package/src/lib/plugin-manager/plugin-user-erasure.js +9 -1
- package/src/lib/plugin-manager/plugin-user-erasure.js.map +1 -1
- package/src/lib/plugin-manager/plugin-visitor-doors.d.ts +104 -0
- package/src/lib/plugin-manager/plugin-visitor-doors.js +108 -0
- package/src/lib/plugin-manager/plugin-visitor-doors.js.map +1 -0
- package/src/lib/plugin-manager/realm-host-aglyn.generated.js +2 -0
- package/src/lib/plugin-manager/realm-host-aglyn.generated.js.map +1 -1
- package/src/lib/plugin-manager/repeat-rows.d.ts +5 -6
- package/src/lib/plugin-manager/repeat-rows.js.map +1 -1
- package/src/lib/app-utils/actions.d.ts +0 -310
- package/src/lib/app-utils/actions.js +0 -506
- package/src/lib/app-utils/actions.js.map +0 -1
- package/src/lib/app-utils/automation-placeholders.d.ts +0 -72
- package/src/lib/app-utils/automation-placeholders.js +0 -207
- package/src/lib/app-utils/automation-placeholders.js.map +0 -1
- package/src/lib/app-utils/dataset-models.d.ts +0 -339
- package/src/lib/app-utils/dataset-models.js +0 -722
- package/src/lib/app-utils/dataset-models.js.map +0 -1
- package/src/lib/app-utils/datasets.d.ts +0 -171
- package/src/lib/app-utils/datasets.js +0 -227
- package/src/lib/app-utils/datasets.js.map +0 -1
- package/src/lib/app-utils/form-abuse-ceiling.d.ts +0 -146
- package/src/lib/app-utils/form-abuse-ceiling.js +0 -158
- package/src/lib/app-utils/form-abuse-ceiling.js.map +0 -1
- package/src/lib/plugin-manager/order-fulfilment.d.ts +0 -142
- package/src/lib/plugin-manager/order-fulfilment.js +0 -104
- package/src/lib/plugin-manager/order-fulfilment.js.map +0 -1
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2026 Aglyn LLC
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
import { type InteractionStepBase, type SiteInteraction } from './site-interactions';
|
|
18
|
+
/**
|
|
19
|
+
* PLACEHOLDERS IN A DRAFTED INTERACTION (AGL-2919).
|
|
20
|
+
*
|
|
21
|
+
* A placeholder is a value a person still has to supply, written in square
|
|
22
|
+
* brackets where the value belongs: `[newsletter]` where a list is named,
|
|
23
|
+
* `[your phone number]` in an email's body. An interaction drafted for
|
|
24
|
+
* somebody to review — by a generator working from a description, an importer
|
|
25
|
+
* bringing flows over from another tool — carries one wherever the draft could
|
|
26
|
+
* not name a real record or did not know a fact.
|
|
27
|
+
*
|
|
28
|
+
* Square brackets because they are inert everywhere an interaction reads a
|
|
29
|
+
* value. A bracketed record name matches no record by name, so the step
|
|
30
|
+
* reports the unknown name in the run history rather than acting on the wrong
|
|
31
|
+
* record; a bracketed condition value equals no field an event carries, so a
|
|
32
|
+
* trigger never fires on a guess; and the Reference health audit already
|
|
33
|
+
* reports a name that resolves to nothing.
|
|
34
|
+
*
|
|
35
|
+
* Only the fields a person types words into are read: the conditions, and
|
|
36
|
+
* each step's `typedFields` — the platform's own for its client steps, and
|
|
37
|
+
* the declaring plugin's for every other (`interactionSteps` in
|
|
38
|
+
* `plugins.config.json`). Selectors, class names, HTML and scripts use
|
|
39
|
+
* brackets as syntax and never hold a placeholder. The drafter that writes
|
|
40
|
+
* placeholders, the editor that highlights them and the switch that names them
|
|
41
|
+
* before an interaction runs all read them here, so they never disagree about
|
|
42
|
+
* what is missing.
|
|
43
|
+
*/
|
|
44
|
+
/**
|
|
45
|
+
* A bracketed placeholder inside a value. Not one followed by `(`, which is a
|
|
46
|
+
* written link (`[our menu](https://…)`) rather than a gap, and never across a
|
|
47
|
+
* line or longer than a phrase.
|
|
48
|
+
*/
|
|
49
|
+
export declare const DRAFT_PLACEHOLDER_PATTERN: RegExp;
|
|
50
|
+
/** The longest words a placeholder keeps. */
|
|
51
|
+
export declare const DRAFT_PLACEHOLDER_MAX_CHARS = 100;
|
|
52
|
+
/** The words inside the first placeholder in a value, or `null` when it holds none. */
|
|
53
|
+
export declare function draftPlaceholderIn(value: unknown): string | null;
|
|
54
|
+
/**
|
|
55
|
+
* `words` as a placeholder: on one line, without brackets of their own, cut
|
|
56
|
+
* to a phrase. Empty words still make a placeholder, so a value that must be
|
|
57
|
+
* supplied is never written as an empty string a validator would refuse.
|
|
58
|
+
*/
|
|
59
|
+
export declare function draftPlaceholder(words: string): string;
|
|
60
|
+
/** One placeholder an interaction holds. */
|
|
61
|
+
export interface InteractionPlaceholder {
|
|
62
|
+
/** The 1-based step holding it; `null` for the trigger's own conditions. */
|
|
63
|
+
step: number | null;
|
|
64
|
+
/** The stored field it is in, or `condition` for a condition's value. */
|
|
65
|
+
field: string;
|
|
66
|
+
/** What a sentence calls that field: "the list", "a condition value". */
|
|
67
|
+
names: string;
|
|
68
|
+
/** The words inside the brackets. */
|
|
69
|
+
text: string;
|
|
70
|
+
}
|
|
71
|
+
/** The placeholders one step holds, in its fields' order: its guard, then its typed fields. */
|
|
72
|
+
export declare function interactionStepPlaceholders(step: InteractionStepBase, index: number): InteractionPlaceholder[];
|
|
73
|
+
/** Every placeholder an interaction holds: its trigger's conditions first, then each step's. */
|
|
74
|
+
export declare function interactionPlaceholders(interaction: Pick<SiteInteraction<InteractionStepBase>, 'trigger' | 'steps'> | null | undefined): InteractionPlaceholder[];
|
|
75
|
+
/** One placeholder as a person reads it: where it is, and what it stands in for. */
|
|
76
|
+
export declare function describeInteractionPlaceholder(placeholder: InteractionPlaceholder): string;
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { _ as _extends } from "@swc/helpers/_/_extends";
|
|
2
|
+
/**
|
|
3
|
+
* @license
|
|
4
|
+
* Copyright 2026 Aglyn LLC
|
|
5
|
+
*
|
|
6
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
7
|
+
* you may not use this file except in compliance with the License.
|
|
8
|
+
* You may obtain a copy of the License at
|
|
9
|
+
*
|
|
10
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
*
|
|
12
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
13
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
14
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
|
+
* See the License for the specific language governing permissions and
|
|
16
|
+
* limitations under the License.
|
|
17
|
+
*/ import { interactionStepTypedFields, normalizeTriggerConditions } from "./site-interactions.js";
|
|
18
|
+
/**
|
|
19
|
+
* PLACEHOLDERS IN A DRAFTED INTERACTION (AGL-2919).
|
|
20
|
+
*
|
|
21
|
+
* A placeholder is a value a person still has to supply, written in square
|
|
22
|
+
* brackets where the value belongs: `[newsletter]` where a list is named,
|
|
23
|
+
* `[your phone number]` in an email's body. An interaction drafted for
|
|
24
|
+
* somebody to review — by a generator working from a description, an importer
|
|
25
|
+
* bringing flows over from another tool — carries one wherever the draft could
|
|
26
|
+
* not name a real record or did not know a fact.
|
|
27
|
+
*
|
|
28
|
+
* Square brackets because they are inert everywhere an interaction reads a
|
|
29
|
+
* value. A bracketed record name matches no record by name, so the step
|
|
30
|
+
* reports the unknown name in the run history rather than acting on the wrong
|
|
31
|
+
* record; a bracketed condition value equals no field an event carries, so a
|
|
32
|
+
* trigger never fires on a guess; and the Reference health audit already
|
|
33
|
+
* reports a name that resolves to nothing.
|
|
34
|
+
*
|
|
35
|
+
* Only the fields a person types words into are read: the conditions, and
|
|
36
|
+
* each step's `typedFields` — the platform's own for its client steps, and
|
|
37
|
+
* the declaring plugin's for every other (`interactionSteps` in
|
|
38
|
+
* `plugins.config.json`). Selectors, class names, HTML and scripts use
|
|
39
|
+
* brackets as syntax and never hold a placeholder. The drafter that writes
|
|
40
|
+
* placeholders, the editor that highlights them and the switch that names them
|
|
41
|
+
* before an interaction runs all read them here, so they never disagree about
|
|
42
|
+
* what is missing.
|
|
43
|
+
*/ /**
|
|
44
|
+
* A bracketed placeholder inside a value. Not one followed by `(`, which is a
|
|
45
|
+
* written link (`[our menu](https://…)`) rather than a gap, and never across a
|
|
46
|
+
* line or longer than a phrase.
|
|
47
|
+
*/ export const DRAFT_PLACEHOLDER_PATTERN = /\[([^[\]\n]{1,120})\](?!\()/;
|
|
48
|
+
/** The longest words a placeholder keeps. */ export const DRAFT_PLACEHOLDER_MAX_CHARS = 100;
|
|
49
|
+
/** The words inside the first placeholder in a value, or `null` when it holds none. */ export function draftPlaceholderIn(value) {
|
|
50
|
+
var _match_;
|
|
51
|
+
if (typeof value !== 'string') return null;
|
|
52
|
+
const match = DRAFT_PLACEHOLDER_PATTERN.exec(value);
|
|
53
|
+
const words = match == null ? void 0 : (_match_ = match[1]) == null ? void 0 : _match_.trim();
|
|
54
|
+
return words ? words : null;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* `words` as a placeholder: on one line, without brackets of their own, cut
|
|
58
|
+
* to a phrase. Empty words still make a placeholder, so a value that must be
|
|
59
|
+
* supplied is never written as an empty string a validator would refuse.
|
|
60
|
+
*/ export function draftPlaceholder(words) {
|
|
61
|
+
const clean = words.replace(/[[\]\n\r]+/g, ' ').replace(/\s+/g, ' ').trim().slice(0, DRAFT_PLACEHOLDER_MAX_CHARS).trim();
|
|
62
|
+
return `[${clean || 'to fill in'}]`;
|
|
63
|
+
}
|
|
64
|
+
/** The field a condition's placeholder is reported as, and its words. */ const CONDITION = {
|
|
65
|
+
field: 'condition',
|
|
66
|
+
names: 'a condition value'
|
|
67
|
+
};
|
|
68
|
+
/** The placeholders one step holds, in its fields' order: its guard, then its typed fields. */ export function interactionStepPlaceholders(step, index) {
|
|
69
|
+
var _ref;
|
|
70
|
+
var _step_when;
|
|
71
|
+
const found = [];
|
|
72
|
+
const number = index + 1;
|
|
73
|
+
for (const clause of (_ref = (_step_when = step.when) == null ? void 0 : _step_when.conditions) != null ? _ref : []){
|
|
74
|
+
const text = draftPlaceholderIn(clause == null ? void 0 : clause.value);
|
|
75
|
+
if (text) found.push(_extends({
|
|
76
|
+
step: number
|
|
77
|
+
}, CONDITION, {
|
|
78
|
+
text
|
|
79
|
+
}));
|
|
80
|
+
}
|
|
81
|
+
for (const { key, names } of interactionStepTypedFields(step.type)){
|
|
82
|
+
const text = draftPlaceholderIn(step[key]);
|
|
83
|
+
if (text) found.push({
|
|
84
|
+
step: number,
|
|
85
|
+
field: key,
|
|
86
|
+
names,
|
|
87
|
+
text
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
return found;
|
|
91
|
+
}
|
|
92
|
+
/** Every placeholder an interaction holds: its trigger's conditions first, then each step's. */ export function interactionPlaceholders(interaction) {
|
|
93
|
+
var _interaction_steps;
|
|
94
|
+
if (!interaction) return [];
|
|
95
|
+
const found = [];
|
|
96
|
+
for (const condition of normalizeTriggerConditions(interaction.trigger)){
|
|
97
|
+
const text = draftPlaceholderIn(condition == null ? void 0 : condition.value);
|
|
98
|
+
if (text) found.push(_extends({
|
|
99
|
+
step: null
|
|
100
|
+
}, CONDITION, {
|
|
101
|
+
text
|
|
102
|
+
}));
|
|
103
|
+
}
|
|
104
|
+
;
|
|
105
|
+
((_interaction_steps = interaction.steps) != null ? _interaction_steps : []).forEach((step, index)=>{
|
|
106
|
+
if (step) found.push(...interactionStepPlaceholders(step, index));
|
|
107
|
+
});
|
|
108
|
+
return found;
|
|
109
|
+
}
|
|
110
|
+
/** One placeholder as a person reads it: where it is, and what it stands in for. */ export function describeInteractionPlaceholder(placeholder) {
|
|
111
|
+
const where = placeholder.step === null ? 'The trigger' : `Step ${placeholder.step}`;
|
|
112
|
+
return `${where}: ${placeholder.names} (“${placeholder.text}”)`;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
//# sourceMappingURL=draft-placeholders.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../libs/aglyn/src/lib/app-utils/draft-placeholders.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2026 Aglyn LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n type InteractionStepBase,\n interactionStepTypedFields,\n normalizeTriggerConditions,\n type SiteInteraction,\n} from './site-interactions'\n\n/**\n * PLACEHOLDERS IN A DRAFTED INTERACTION (AGL-2919).\n *\n * A placeholder is a value a person still has to supply, written in square\n * brackets where the value belongs: `[newsletter]` where a list is named,\n * `[your phone number]` in an email's body. An interaction drafted for\n * somebody to review — by a generator working from a description, an importer\n * bringing flows over from another tool — carries one wherever the draft could\n * not name a real record or did not know a fact.\n *\n * Square brackets because they are inert everywhere an interaction reads a\n * value. A bracketed record name matches no record by name, so the step\n * reports the unknown name in the run history rather than acting on the wrong\n * record; a bracketed condition value equals no field an event carries, so a\n * trigger never fires on a guess; and the Reference health audit already\n * reports a name that resolves to nothing.\n *\n * Only the fields a person types words into are read: the conditions, and\n * each step's `typedFields` — the platform's own for its client steps, and\n * the declaring plugin's for every other (`interactionSteps` in\n * `plugins.config.json`). Selectors, class names, HTML and scripts use\n * brackets as syntax and never hold a placeholder. The drafter that writes\n * placeholders, the editor that highlights them and the switch that names them\n * before an interaction runs all read them here, so they never disagree about\n * what is missing.\n */\n\n/**\n * A bracketed placeholder inside a value. Not one followed by `(`, which is a\n * written link (`[our menu](https://…)`) rather than a gap, and never across a\n * line or longer than a phrase.\n */\nexport const DRAFT_PLACEHOLDER_PATTERN = /\\[([^[\\]\\n]{1,120})\\](?!\\()/\n\n/** The longest words a placeholder keeps. */\nexport const DRAFT_PLACEHOLDER_MAX_CHARS = 100\n\n/** The words inside the first placeholder in a value, or `null` when it holds none. */\nexport function draftPlaceholderIn(value: unknown): string | null {\n if (typeof value !== 'string') return null\n const match = DRAFT_PLACEHOLDER_PATTERN.exec(value)\n const words = match?.[1]?.trim()\n return words ? words : null\n}\n\n/**\n * `words` as a placeholder: on one line, without brackets of their own, cut\n * to a phrase. Empty words still make a placeholder, so a value that must be\n * supplied is never written as an empty string a validator would refuse.\n */\nexport function draftPlaceholder(words: string): string {\n const clean = words\n .replace(/[[\\]\\n\\r]+/g, ' ')\n .replace(/\\s+/g, ' ')\n .trim()\n .slice(0, DRAFT_PLACEHOLDER_MAX_CHARS)\n .trim()\n return `[${clean || 'to fill in'}]`\n}\n\n/** One placeholder an interaction holds. */\nexport interface InteractionPlaceholder {\n /** The 1-based step holding it; `null` for the trigger's own conditions. */\n step: number | null\n /** The stored field it is in, or `condition` for a condition's value. */\n field: string\n /** What a sentence calls that field: \"the list\", \"a condition value\". */\n names: string\n /** The words inside the brackets. */\n text: string\n}\n\n/** The field a condition's placeholder is reported as, and its words. */\nconst CONDITION = { field: 'condition', names: 'a condition value' } as const\n\n/** The placeholders one step holds, in its fields' order: its guard, then its typed fields. */\nexport function interactionStepPlaceholders(\n step: InteractionStepBase,\n index: number,\n): InteractionPlaceholder[] {\n const found: InteractionPlaceholder[] = []\n const number = index + 1\n for (const clause of step.when?.conditions ?? []) {\n const text = draftPlaceholderIn(clause?.value)\n if (text) found.push({ step: number, ...CONDITION, text })\n }\n for (const { key, names } of interactionStepTypedFields(step.type)) {\n const text = draftPlaceholderIn(step[key])\n if (text) found.push({ step: number, field: key, names, text })\n }\n return found\n}\n\n/** Every placeholder an interaction holds: its trigger's conditions first, then each step's. */\nexport function interactionPlaceholders(\n interaction: Pick<SiteInteraction<InteractionStepBase>, 'trigger' | 'steps'> | null | undefined,\n): InteractionPlaceholder[] {\n if (!interaction) return []\n const found: InteractionPlaceholder[] = []\n for (const condition of normalizeTriggerConditions(interaction.trigger)) {\n const text = draftPlaceholderIn(condition?.value)\n if (text) found.push({ step: null, ...CONDITION, text })\n }\n ;(interaction.steps ?? []).forEach((step, index) => {\n if (step) found.push(...interactionStepPlaceholders(step, index))\n })\n return found\n}\n\n/** One placeholder as a person reads it: where it is, and what it stands in for. */\nexport function describeInteractionPlaceholder(placeholder: InteractionPlaceholder): string {\n const where = placeholder.step === null ? 'The trigger' : `Step ${placeholder.step}`\n return `${where}: ${placeholder.names} (“${placeholder.text}”)`\n}\n"],"names":["interactionStepTypedFields","normalizeTriggerConditions","DRAFT_PLACEHOLDER_PATTERN","DRAFT_PLACEHOLDER_MAX_CHARS","draftPlaceholderIn","value","match","exec","words","trim","draftPlaceholder","clean","replace","slice","CONDITION","field","names","interactionStepPlaceholders","step","index","found","number","clause","when","conditions","text","push","key","type","interactionPlaceholders","interaction","condition","trigger","steps","forEach","describeInteractionPlaceholder","placeholder","where"],"mappings":";AAAA;;;;;;;;;;;;;;;CAeC,GAED,SAEEA,0BAA0B,EAC1BC,0BAA0B,QAErB,yBAAqB;AAE5B;;;;;;;;;;;;;;;;;;;;;;;;;CAyBC,GAED;;;;CAIC,GACD,OAAO,MAAMC,4BAA4B,8BAA6B;AAEtE,2CAA2C,GAC3C,OAAO,MAAMC,8BAA8B,IAAG;AAE9C,qFAAqF,GACrF,OAAO,SAASC,mBAAmBC,KAAc;QAGjCC;IAFd,IAAI,OAAOD,UAAU,UAAU,OAAO;IACtC,MAAMC,QAAQJ,0BAA0BK,IAAI,CAACF;IAC7C,MAAMG,QAAQF,0BAAAA,UAAAA,KAAO,CAAC,EAAE,qBAAVA,QAAYG,IAAI;IAC9B,OAAOD,QAAQA,QAAQ;AACzB;AAEA;;;;CAIC,GACD,OAAO,SAASE,iBAAiBF,KAAa;IAC5C,MAAMG,QAAQH,MACXI,OAAO,CAAC,eAAe,KACvBA,OAAO,CAAC,QAAQ,KAChBH,IAAI,GACJI,KAAK,CAAC,GAAGV,6BACTM,IAAI;IACP,OAAO,CAAC,CAAC,EAAEE,SAAS,aAAa,CAAC,CAAC;AACrC;AAcA,uEAAuE,GACvE,MAAMG,YAAY;IAAEC,OAAO;IAAaC,OAAO;AAAoB;AAEnE,6FAA6F,GAC7F,OAAO,SAASC,4BACdC,IAAyB,EACzBC,KAAa;;QAIQD;IAFrB,MAAME,QAAkC,EAAE;IAC1C,MAAMC,SAASF,QAAQ;IACvB,KAAK,MAAMG,mBAAUJ,aAAAA,KAAKK,IAAI,qBAATL,WAAWM,UAAU,mBAAI,EAAE,CAAE;QAChD,MAAMC,OAAOrB,mBAAmBkB,0BAAAA,OAAQjB,KAAK;QAC7C,IAAIoB,MAAML,MAAMM,IAAI,CAAC;YAAER,MAAMG;WAAWP;YAAWW;;IACrD;IACA,KAAK,MAAM,EAAEE,GAAG,EAAEX,KAAK,EAAE,IAAIhB,2BAA2BkB,KAAKU,IAAI,EAAG;QAClE,MAAMH,OAAOrB,mBAAmBc,IAAI,CAACS,IAAI;QACzC,IAAIF,MAAML,MAAMM,IAAI,CAAC;YAAER,MAAMG;YAAQN,OAAOY;YAAKX;YAAOS;QAAK;IAC/D;IACA,OAAOL;AACT;AAEA,8FAA8F,GAC9F,OAAO,SAASS,wBACdC,WAA+F;QAQ7FA;IANF,IAAI,CAACA,aAAa,OAAO,EAAE;IAC3B,MAAMV,QAAkC,EAAE;IAC1C,KAAK,MAAMW,aAAa9B,2BAA2B6B,YAAYE,OAAO,EAAG;QACvE,MAAMP,OAAOrB,mBAAmB2B,6BAAAA,UAAW1B,KAAK;QAChD,IAAIoB,MAAML,MAAMM,IAAI,CAAC;YAAER,MAAM;WAASJ;YAAWW;;IACnD;;IACC,EAACK,qBAAAA,YAAYG,KAAK,YAAjBH,qBAAqB,EAAE,EAAEI,OAAO,CAAC,CAAChB,MAAMC;QACxC,IAAID,MAAME,MAAMM,IAAI,IAAIT,4BAA4BC,MAAMC;IAC5D;IACA,OAAOC;AACT;AAEA,kFAAkF,GAClF,OAAO,SAASe,+BAA+BC,WAAmC;IAChF,MAAMC,QAAQD,YAAYlB,IAAI,KAAK,OAAO,gBAAgB,CAAC,KAAK,EAAEkB,YAAYlB,IAAI,EAAE;IACpF,OAAO,GAAGmB,MAAM,EAAE,EAAED,YAAYpB,KAAK,CAAC,GAAG,EAAEoB,YAAYX,IAAI,CAAC,EAAE,CAAC;AACjE"}
|
|
@@ -6,14 +6,18 @@ export interface EntityOption {
|
|
|
6
6
|
}
|
|
7
7
|
/**
|
|
8
8
|
* Edit-time option lists for id-based entity pickers in component
|
|
9
|
-
* attributes (
|
|
10
|
-
* display-only; nodes persist the id, so renames never break references —
|
|
9
|
+
* attributes — every kind a plugin declares (a site's products, its forms,
|
|
10
|
+
* the organization's datasets…). Names are display-only; nodes persist the id, so renames never break references —
|
|
11
11
|
* the same contract as {@link ScreenLinkContext}. Provided by the
|
|
12
12
|
* console's besigner/preview surfaces; absent on the tenant (the tenant
|
|
13
13
|
* only resolves ids, never lists them).
|
|
14
14
|
*/
|
|
15
|
-
/**
|
|
16
|
-
|
|
15
|
+
/**
|
|
16
|
+
* A kind of entity a picker lists, as the plugin that keeps it declares it
|
|
17
|
+
* (`plugin-manager/plugin-entity-pickers`): `products`, `forms`, `datasets`…
|
|
18
|
+
* Open, because the kinds are the plugins' to add (AGL-3080).
|
|
19
|
+
*/
|
|
20
|
+
export type EntityPickerKind = string;
|
|
17
21
|
/**
|
|
18
22
|
* How much an empty list is worth believing.
|
|
19
23
|
*
|
|
@@ -65,12 +69,12 @@ export declare const ENTITY_PICKER_BROWSE_LIMIT = 25;
|
|
|
65
69
|
*/
|
|
66
70
|
export declare const ENTITY_PICKER_SEARCH_LIMIT = 25;
|
|
67
71
|
export interface EntityPickerContextValue {
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
72
|
+
/**
|
|
73
|
+
* Each kind's browse list, id-first: the site's products for a
|
|
74
|
+
* `PRODUCT_SELECT`, its form entities for a `FORM_SELECT`, and every other
|
|
75
|
+
* kind a plugin declares, keyed by the kind.
|
|
76
|
+
*/
|
|
77
|
+
options?: Readonly<Partial<Record<EntityPickerKind, EntityOption[]>>>;
|
|
74
78
|
/**
|
|
75
79
|
* The fields an entity's documents declare, keyed by kind and then by
|
|
76
80
|
* entity id, in the order the entity declares them: id = the stable field
|
|
@@ -125,11 +129,11 @@ export interface EntityPickerContextValue {
|
|
|
125
129
|
* This kind's documents carry the name-search keys, so a typed query
|
|
126
130
|
* reaches the WHOLE collection rather than only the browse window.
|
|
127
131
|
*
|
|
128
|
-
* True for
|
|
129
|
-
* the
|
|
130
|
-
* does not stamp them
|
|
131
|
-
* absent here must say its search covers the window only —
|
|
132
|
-
* otherwise would let an unfound entity read as a nonexistent one.
|
|
132
|
+
* True for a kind its declaration marks `searchable`, whose documents carry
|
|
133
|
+
* `nameTokens`/`nameLower` from the owner's own write path —
|
|
134
|
+
* `hosts/{host}/resources` deliberately does not stamp them. A picker for a
|
|
135
|
+
* kind that is absent here must say its search covers the window only —
|
|
136
|
+
* claiming otherwise would let an unfound entity read as a nonexistent one.
|
|
133
137
|
*/
|
|
134
138
|
searchable?: Partial<Record<EntityPickerKind, boolean>>;
|
|
135
139
|
/**
|
|
@@ -78,12 +78,12 @@ import { createContext } from "react";
|
|
|
78
78
|
* which is the cost splitting these two jobs exists to remove rather than to
|
|
79
79
|
* move.
|
|
80
80
|
*/ export function entityValueNeedsResolution(context, kind, value) {
|
|
81
|
-
var
|
|
82
|
-
var _context_resolved;
|
|
81
|
+
var _ref, _ref1;
|
|
82
|
+
var _context_options, _context_resolved;
|
|
83
83
|
const id = typeof value === 'string' ? value.trim() : '';
|
|
84
84
|
if (!id || !(context == null ? void 0 : context.resolve)) return undefined;
|
|
85
|
-
if (((
|
|
86
|
-
if (id in ((
|
|
85
|
+
if (((_ref = (_context_options = context.options) == null ? void 0 : _context_options[kind]) != null ? _ref : []).some((entity)=>entity.id === id)) return undefined;
|
|
86
|
+
if (id in ((_ref1 = (_context_resolved = context.resolved) == null ? void 0 : _context_resolved[kind]) != null ? _ref1 : {})) return undefined;
|
|
87
87
|
if (entityListState(context, kind) !== 'ready') return undefined;
|
|
88
88
|
return id;
|
|
89
89
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../libs/aglyn/src/lib/app-utils/entity-picker-context.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2026 Aglyn LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n// Same placement rationale as screen-link-context.ts: lives in\n// @aglyn/aglyn without a 'use client' banner so canvas-rendering surfaces\n// share one module graph.\nimport { createContext } from 'react'\n\nexport interface EntityOption {\n /** Stable document id — the persisted reference (AGL-343/344). */\n id: string\n /** Current display name, resolved at edit time. */\n label: string\n}\n\n/**\n * Edit-time option lists for id-based entity pickers in component\n * attributes (products, collections, categories, datasets, forms). Names are\n * display-only; nodes persist the id, so renames never break references —\n * the same contract as {@link ScreenLinkContext}. Provided by the\n * console's besigner/preview surfaces; absent on the tenant (the tenant\n * only resolves ids, never lists them).\n */\n/** The lists a picker can ask for. */\nexport type EntityPickerKind =\n | 'products'\n | 'collections'\n | 'categories'\n | 'datasets'\n | 'forms'\n\n/**\n * How much an empty list is worth believing.\n *\n * Every one of these renders as a dropdown with no entries, and an author\n * looking at four identical empty dropdowns cannot tell \"this site has no\n * forms yet\" from \"the read failed\" from \"this editor never lists forms at\n * all\". Only the first of those is a fact about their site; the other two\n * are the picker being broken, and a picker that cannot say which it is\n * sends the author looking for a form they already made.\n *\n * - `unavailable` — no provider is mounted, so nothing on this surface can\n * list entities. The tenant, and any editor outside a host.\n * - `loading` — a read is open or about to be, and no answer has arrived.\n * Also the state of a list nothing has asked for yet: demand is declared\n * on the same commit that would display it, so \"not asked\" and \"asked,\n * unanswered\" are the same beat.\n * - `ready` — the read settled. An empty list here IS the site's answer.\n * - `error` — the read failed. Empty means nothing.\n */\nexport type EntityListState = 'unavailable' | 'loading' | 'ready' | 'error'\n\n/**\n * How many documents a picker BROWSES.\n *\n * A picker is not a catalog viewer. It is a dropdown on a besigner surface\n * where the author is placing one element, and no table in the console offers\n * a page past `TABLE_PAGE_SIZE_OPTIONS` — a dropdown is the smaller surface of\n * the two, not the larger.\n *\n * The middle of that range rather than its floor: a table has a pager under it\n * and a dropdown does not, so the page a reader cannot advance is worth more\n * rows than the one they can.\n *\n * What makes this size SAFE is that browsing is the only job it does. A stored\n * value is named by {@link EntityPickerContextValue.resolve} — one keyed read\n * for the one document, exact at any catalog size — so nothing here has to be\n * wide enough to contain whatever an author picked last month. A window that\n * carried both jobs would have to be, and would still render a bound element\n * as unbound past its own width; widening this cannot fix that, only make it\n * rarer and more expensive.\n */\nexport const ENTITY_PICKER_BROWSE_LIMIT = 25\n\n/**\n * How many documents a server-side name search may return.\n *\n * The same size as the browse window, for the same reason: a reader who has\n * typed a query and still faces 25 rows narrows it further rather than\n * scrolling. Only the kinds in {@link EntityPickerContextValue.searchable}\n * spend this at all.\n */\nexport const ENTITY_PICKER_SEARCH_LIMIT = 25\n\nexport interface EntityPickerContextValue {\n products?: EntityOption[]\n collections?: EntityOption[]\n categories?: EntityOption[]\n datasets?: EntityOption[]\n /** The host's form entities, id-first, feeding FORM_SELECT attributes. */\n forms?: EntityOption[]\n /**\n * The fields an entity's documents declare, keyed by kind and then by\n * entity id, in the order the entity declares them: id = the stable field\n * id a node persists, label = its current display name (AGL-556).\n *\n * Only kinds whose documents carry a field model appear. Two surfaces read\n * it: a field picker that maps a value onto one of an entity's fields (a\n * form field's \"Maps to schema field\"), and the insert-token menu inside a\n * repeat, which offers `{{item.<field>}}` for each field of the entity the\n * repeat names (see `RepeatSource.entityKind`).\n */\n entityFields?: Partial<\n Record<EntityPickerKind, Readonly<Record<string, EntityOption[]>>>\n >\n /**\n * Declare that a picker of this kind is on screen (AGL-703).\n *\n * The provider reads these lists from Firestore, and it used to read ALL of\n * them the moment the besigner opened — up to 300 products, 200 catalog\n * collections, 200 categories and 200 datasets, on a site with a real\n * catalog, for pickers most editing sessions never open. Nothing about\n * moving a heading needs the product list.\n *\n * So the lists are demand-driven now, and the demand signal is the thing\n * that would DISPLAY one: a selected node whose schema declares a\n * `PRODUCT_SELECT`, a repeat bound to a dataset. Call this when that is\n * true and read the list on the render after; until then the list is\n * absent, exactly as it is for the beat before any listener syncs.\n *\n * Optional, and absent on the tenant — which resolves ids and never lists\n * them, so nothing there has a picker to ask for.\n */\n request?: (kind: EntityPickerKind) => void\n /**\n * Per-kind read state, so a picker can say WHY it has nothing to offer.\n * A kind the provider omits reads as `loading`; see {@link entityListState}.\n */\n status?: Partial<Record<EntityPickerKind, EntityListState>>\n /**\n * The browse window came back FULL for this kind, so the list above is a\n * page of the site's catalog and not the whole of it.\n *\n * Measured with a probe — the read asks for one document past\n * {@link ENTITY_PICKER_BROWSE_LIMIT} and the extra one is never offered —\n * so this is a fact about the collection rather than a guess from the\n * window being exactly full.\n *\n * A picker owes the reader this sentence for the same reason the inbox's\n * form filter does: \"not in the picker\" and \"does not exist\" are the same\n * empty dropdown, and only one of them is a fact about their site.\n */\n truncated?: Partial<Record<EntityPickerKind, boolean>>\n /**\n * This kind's documents carry the name-search keys, so a typed query\n * reaches the WHOLE collection rather than only the browse window.\n *\n * True for products alone today: `nameTokens`/`nameLower` are stamped by\n * the catalog's own write path, and `hosts/{host}/resources` deliberately\n * does not stamp them on the other four kinds. A picker for a kind that is\n * absent here must say its search covers the window only — claiming\n * otherwise would let an unfound entity read as a nonexistent one.\n */\n searchable?: Partial<Record<EntityPickerKind, boolean>>\n /**\n * Narrow this kind's offered list to what somebody typed.\n *\n * Matching is the provider's, not the dropdown's: it is the only side that\n * can merge the window's own matches with the ones a server query found\n * past it, and it uses `scoreMatch` so a query matches a word ANYWHERE in a\n * name — the same rule the switchers and global search follow.\n *\n * Passing an empty string restores the browse window.\n */\n search?: (kind: EntityPickerKind, text: string) => void\n /**\n * Resolve ONE stored id to its current name, whatever the browse window\n * holds.\n *\n * Deliberately NOT a job for the browse list, though a bulk read could do\n * both. Sharing one read makes the list's width the limit on which stored\n * values can be named, and past that width a picker renders a bound element\n * as UNBOUND rather than as its label — an empty control on an element that\n * is set, which an author repairs by picking again. That is how a correct\n * reference gets replaced with a different one.\n *\n * One keyed `getDoc` for one document instead: exact at any catalog size,\n * and asked for only when a node actually carries a value. Results land in\n * {@link resolved} and are never re-read.\n */\n resolve?: (kind: EntityPickerKind, id: string) => void\n /**\n * What {@link resolve} found, keyed by kind and then by id.\n *\n * Three states, and the picker renders a different label for each: an\n * `EntityOption` is the resolved name, `null` is a settled read that found\n * NO such document, and an absent key is a resolution still in flight.\n * Absent must never render as missing — a picker that flashed \"unavailable\"\n * over every live reference for the beat before its read landed would teach\n * authors to ignore the one warning that matters.\n */\n resolved?: Partial<\n Record<EntityPickerKind, Readonly<Record<string, EntityOption | null>>>\n >\n}\n\n/**\n * What the picker for `kind` should believe about its own emptiness.\n *\n * `request` is the \"a provider is mounted\" signal — it is the one member the\n * contract already says is absent wherever nothing lists entities — so a\n * surface with no provider resolves to `unavailable` rather than passing an\n * empty list off as the site's answer.\n */\nexport function entityListState(\n context: EntityPickerContextValue | undefined,\n kind: EntityPickerKind,\n): EntityListState {\n if (!context?.request) return 'unavailable'\n return context.status?.[kind] ?? 'loading'\n}\n\n/**\n * The id whose label a picker still needs a keyed read to learn, if any.\n *\n * Part of the contract rather than of one screen, because two surfaces ask\n * it — the attributes panel about a node's picker value, and the insert-token\n * menu about the dataset a repeat is bound to — and an answer that differed\n * between them would be a second keyed read for a document one of them\n * already had.\n *\n * Four cases resolve to \"ask nobody\", and each is a read not spent: there is\n * no value; the browse window already carries it, which is the common case on\n * a small site; a resolution has already answered, including the answer that\n * the document is gone; or the browse read has not settled, so the window may\n * be about to supply it for free.\n *\n * The last is the one worth stating. Asking while the listener is still\n * loading would spend a keyed read on nearly every picker on every site,\n * which is the cost splitting these two jobs exists to remove rather than to\n * move.\n */\nexport function entityValueNeedsResolution(\n context: EntityPickerContextValue | undefined,\n kind: EntityPickerKind,\n value: unknown,\n): string | undefined {\n const id = typeof value === 'string' ? value.trim() : ''\n if (!id || !context?.resolve) return undefined\n if ((context[kind] ?? []).some((entity) => entity.id === id)) return undefined\n if (id in (context.resolved?.[kind] ?? {})) return undefined\n if (entityListState(context, kind) !== 'ready') return undefined\n return id\n}\n\nexport const EntityPickerContext = createContext<EntityPickerContextValue>({})\nEntityPickerContext.displayName = 'EntityPickerContext'\n"],"names":["createContext","ENTITY_PICKER_BROWSE_LIMIT","ENTITY_PICKER_SEARCH_LIMIT","entityListState","context","kind","request","status","entityValueNeedsResolution","value","id","trim","resolve","undefined","some","entity","resolved","EntityPickerContext","displayName"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GACD,+DAA+D;AAC/D,0EAA0E;AAC1E,0BAA0B;AAC1B,SAASA,aAAa,QAAQ,QAAO;AA8CrC;;;;;;;;;;;;;;;;;;;CAmBC,GACD,OAAO,MAAMC,6BAA6B,GAAE;AAE5C;;;;;;;CAOC,GACD,OAAO,MAAMC,6BAA6B,GAAE;AAkH5C;;;;;;;CAOC,GACD,OAAO,SAASC,gBACdC,OAA6C,EAC7CC,IAAsB;;QAGfD;IADP,IAAI,EAACA,2BAAAA,QAASE,OAAO,GAAE,OAAO;IAC9B,gBAAOF,kBAAAA,QAAQG,MAAM,qBAAdH,eAAgB,CAACC,KAAK,mBAAI;AACnC;AAEA;;;;;;;;;;;;;;;;;;;CAmBC,GACD,OAAO,SAASG,2BACdJ,OAA6C,EAC7CC,IAAsB,EACtBI,KAAc;QAITL;QACMA;IAHX,MAAMM,KAAK,OAAOD,UAAU,WAAWA,MAAME,IAAI,KAAK;IACtD,IAAI,CAACD,MAAM,EAACN,2BAAAA,QAASQ,OAAO,GAAE,OAAOC;IACrC,IAAI,EAACT,gBAAAA,OAAO,CAACC,KAAK,YAAbD,gBAAiB,EAAE,EAAEU,IAAI,CAAC,CAACC,SAAWA,OAAOL,EAAE,KAAKA,KAAK,OAAOG;IACrE,IAAIH,gBAAON,oBAAAA,QAAQY,QAAQ,qBAAhBZ,iBAAkB,CAACC,KAAK,mBAAI,CAAC,IAAI,OAAOQ;IACnD,IAAIV,gBAAgBC,SAASC,UAAU,SAAS,OAAOQ;IACvD,OAAOH;AACT;AAEA,OAAO,MAAMO,sBAAsBjB,cAAwC,CAAC,GAAE;AAC9EiB,oBAAoBC,WAAW,GAAG"}
|
|
1
|
+
{"version":3,"sources":["../../../../../../libs/aglyn/src/lib/app-utils/entity-picker-context.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2026 Aglyn LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n// Same placement rationale as screen-link-context.ts: lives in\n// @aglyn/aglyn without a 'use client' banner so canvas-rendering surfaces\n// share one module graph.\nimport { createContext } from 'react'\n\nexport interface EntityOption {\n /** Stable document id — the persisted reference (AGL-343/344). */\n id: string\n /** Current display name, resolved at edit time. */\n label: string\n}\n\n/**\n * Edit-time option lists for id-based entity pickers in component\n * attributes — every kind a plugin declares (a site's products, its forms,\n * the organization's datasets…). Names are display-only; nodes persist the id, so renames never break references —\n * the same contract as {@link ScreenLinkContext}. Provided by the\n * console's besigner/preview surfaces; absent on the tenant (the tenant\n * only resolves ids, never lists them).\n */\n/**\n * A kind of entity a picker lists, as the plugin that keeps it declares it\n * (`plugin-manager/plugin-entity-pickers`): `products`, `forms`, `datasets`…\n * Open, because the kinds are the plugins' to add (AGL-3080).\n */\nexport type EntityPickerKind = string\n\n/**\n * How much an empty list is worth believing.\n *\n * Every one of these renders as a dropdown with no entries, and an author\n * looking at four identical empty dropdowns cannot tell \"this site has no\n * forms yet\" from \"the read failed\" from \"this editor never lists forms at\n * all\". Only the first of those is a fact about their site; the other two\n * are the picker being broken, and a picker that cannot say which it is\n * sends the author looking for a form they already made.\n *\n * - `unavailable` — no provider is mounted, so nothing on this surface can\n * list entities. The tenant, and any editor outside a host.\n * - `loading` — a read is open or about to be, and no answer has arrived.\n * Also the state of a list nothing has asked for yet: demand is declared\n * on the same commit that would display it, so \"not asked\" and \"asked,\n * unanswered\" are the same beat.\n * - `ready` — the read settled. An empty list here IS the site's answer.\n * - `error` — the read failed. Empty means nothing.\n */\nexport type EntityListState = 'unavailable' | 'loading' | 'ready' | 'error'\n\n/**\n * How many documents a picker BROWSES.\n *\n * A picker is not a catalog viewer. It is a dropdown on a besigner surface\n * where the author is placing one element, and no table in the console offers\n * a page past `TABLE_PAGE_SIZE_OPTIONS` — a dropdown is the smaller surface of\n * the two, not the larger.\n *\n * The middle of that range rather than its floor: a table has a pager under it\n * and a dropdown does not, so the page a reader cannot advance is worth more\n * rows than the one they can.\n *\n * What makes this size SAFE is that browsing is the only job it does. A stored\n * value is named by {@link EntityPickerContextValue.resolve} — one keyed read\n * for the one document, exact at any catalog size — so nothing here has to be\n * wide enough to contain whatever an author picked last month. A window that\n * carried both jobs would have to be, and would still render a bound element\n * as unbound past its own width; widening this cannot fix that, only make it\n * rarer and more expensive.\n */\nexport const ENTITY_PICKER_BROWSE_LIMIT = 25\n\n/**\n * How many documents a server-side name search may return.\n *\n * The same size as the browse window, for the same reason: a reader who has\n * typed a query and still faces 25 rows narrows it further rather than\n * scrolling. Only the kinds in {@link EntityPickerContextValue.searchable}\n * spend this at all.\n */\nexport const ENTITY_PICKER_SEARCH_LIMIT = 25\n\nexport interface EntityPickerContextValue {\n /**\n * Each kind's browse list, id-first: the site's products for a\n * `PRODUCT_SELECT`, its form entities for a `FORM_SELECT`, and every other\n * kind a plugin declares, keyed by the kind.\n */\n options?: Readonly<Partial<Record<EntityPickerKind, EntityOption[]>>>\n /**\n * The fields an entity's documents declare, keyed by kind and then by\n * entity id, in the order the entity declares them: id = the stable field\n * id a node persists, label = its current display name (AGL-556).\n *\n * Only kinds whose documents carry a field model appear. Two surfaces read\n * it: a field picker that maps a value onto one of an entity's fields (a\n * form field's \"Maps to schema field\"), and the insert-token menu inside a\n * repeat, which offers `{{item.<field>}}` for each field of the entity the\n * repeat names (see `RepeatSource.entityKind`).\n */\n entityFields?: Partial<\n Record<EntityPickerKind, Readonly<Record<string, EntityOption[]>>>\n >\n /**\n * Declare that a picker of this kind is on screen (AGL-703).\n *\n * The provider reads these lists from Firestore, and it used to read ALL of\n * them the moment the besigner opened — up to 300 products, 200 catalog\n * collections, 200 categories and 200 datasets, on a site with a real\n * catalog, for pickers most editing sessions never open. Nothing about\n * moving a heading needs the product list.\n *\n * So the lists are demand-driven now, and the demand signal is the thing\n * that would DISPLAY one: a selected node whose schema declares a\n * `PRODUCT_SELECT`, a repeat bound to a dataset. Call this when that is\n * true and read the list on the render after; until then the list is\n * absent, exactly as it is for the beat before any listener syncs.\n *\n * Optional, and absent on the tenant — which resolves ids and never lists\n * them, so nothing there has a picker to ask for.\n */\n request?: (kind: EntityPickerKind) => void\n /**\n * Per-kind read state, so a picker can say WHY it has nothing to offer.\n * A kind the provider omits reads as `loading`; see {@link entityListState}.\n */\n status?: Partial<Record<EntityPickerKind, EntityListState>>\n /**\n * The browse window came back FULL for this kind, so the list above is a\n * page of the site's catalog and not the whole of it.\n *\n * Measured with a probe — the read asks for one document past\n * {@link ENTITY_PICKER_BROWSE_LIMIT} and the extra one is never offered —\n * so this is a fact about the collection rather than a guess from the\n * window being exactly full.\n *\n * A picker owes the reader this sentence for the same reason the inbox's\n * form filter does: \"not in the picker\" and \"does not exist\" are the same\n * empty dropdown, and only one of them is a fact about their site.\n */\n truncated?: Partial<Record<EntityPickerKind, boolean>>\n /**\n * This kind's documents carry the name-search keys, so a typed query\n * reaches the WHOLE collection rather than only the browse window.\n *\n * True for a kind its declaration marks `searchable`, whose documents carry\n * `nameTokens`/`nameLower` from the owner's own write path —\n * `hosts/{host}/resources` deliberately does not stamp them. A picker for a\n * kind that is absent here must say its search covers the window only —\n * claiming otherwise would let an unfound entity read as a nonexistent one.\n */\n searchable?: Partial<Record<EntityPickerKind, boolean>>\n /**\n * Narrow this kind's offered list to what somebody typed.\n *\n * Matching is the provider's, not the dropdown's: it is the only side that\n * can merge the window's own matches with the ones a server query found\n * past it, and it uses `scoreMatch` so a query matches a word ANYWHERE in a\n * name — the same rule the switchers and global search follow.\n *\n * Passing an empty string restores the browse window.\n */\n search?: (kind: EntityPickerKind, text: string) => void\n /**\n * Resolve ONE stored id to its current name, whatever the browse window\n * holds.\n *\n * Deliberately NOT a job for the browse list, though a bulk read could do\n * both. Sharing one read makes the list's width the limit on which stored\n * values can be named, and past that width a picker renders a bound element\n * as UNBOUND rather than as its label — an empty control on an element that\n * is set, which an author repairs by picking again. That is how a correct\n * reference gets replaced with a different one.\n *\n * One keyed `getDoc` for one document instead: exact at any catalog size,\n * and asked for only when a node actually carries a value. Results land in\n * {@link resolved} and are never re-read.\n */\n resolve?: (kind: EntityPickerKind, id: string) => void\n /**\n * What {@link resolve} found, keyed by kind and then by id.\n *\n * Three states, and the picker renders a different label for each: an\n * `EntityOption` is the resolved name, `null` is a settled read that found\n * NO such document, and an absent key is a resolution still in flight.\n * Absent must never render as missing — a picker that flashed \"unavailable\"\n * over every live reference for the beat before its read landed would teach\n * authors to ignore the one warning that matters.\n */\n resolved?: Partial<\n Record<EntityPickerKind, Readonly<Record<string, EntityOption | null>>>\n >\n}\n\n/**\n * What the picker for `kind` should believe about its own emptiness.\n *\n * `request` is the \"a provider is mounted\" signal — it is the one member the\n * contract already says is absent wherever nothing lists entities — so a\n * surface with no provider resolves to `unavailable` rather than passing an\n * empty list off as the site's answer.\n */\nexport function entityListState(\n context: EntityPickerContextValue | undefined,\n kind: EntityPickerKind,\n): EntityListState {\n if (!context?.request) return 'unavailable'\n return context.status?.[kind] ?? 'loading'\n}\n\n/**\n * The id whose label a picker still needs a keyed read to learn, if any.\n *\n * Part of the contract rather than of one screen, because two surfaces ask\n * it — the attributes panel about a node's picker value, and the insert-token\n * menu about the dataset a repeat is bound to — and an answer that differed\n * between them would be a second keyed read for a document one of them\n * already had.\n *\n * Four cases resolve to \"ask nobody\", and each is a read not spent: there is\n * no value; the browse window already carries it, which is the common case on\n * a small site; a resolution has already answered, including the answer that\n * the document is gone; or the browse read has not settled, so the window may\n * be about to supply it for free.\n *\n * The last is the one worth stating. Asking while the listener is still\n * loading would spend a keyed read on nearly every picker on every site,\n * which is the cost splitting these two jobs exists to remove rather than to\n * move.\n */\nexport function entityValueNeedsResolution(\n context: EntityPickerContextValue | undefined,\n kind: EntityPickerKind,\n value: unknown,\n): string | undefined {\n const id = typeof value === 'string' ? value.trim() : ''\n if (!id || !context?.resolve) return undefined\n if ((context.options?.[kind] ?? []).some((entity) => entity.id === id)) return undefined\n if (id in (context.resolved?.[kind] ?? {})) return undefined\n if (entityListState(context, kind) !== 'ready') return undefined\n return id\n}\n\nexport const EntityPickerContext = createContext<EntityPickerContextValue>({})\nEntityPickerContext.displayName = 'EntityPickerContext'\n"],"names":["createContext","ENTITY_PICKER_BROWSE_LIMIT","ENTITY_PICKER_SEARCH_LIMIT","entityListState","context","kind","request","status","entityValueNeedsResolution","value","id","trim","resolve","undefined","options","some","entity","resolved","EntityPickerContext","displayName"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GACD,+DAA+D;AAC/D,0EAA0E;AAC1E,0BAA0B;AAC1B,SAASA,aAAa,QAAQ,QAAO;AA6CrC;;;;;;;;;;;;;;;;;;;CAmBC,GACD,OAAO,MAAMC,6BAA6B,GAAE;AAE5C;;;;;;;CAOC,GACD,OAAO,MAAMC,6BAA6B,GAAE;AAkH5C;;;;;;;CAOC,GACD,OAAO,SAASC,gBACdC,OAA6C,EAC7CC,IAAsB;;QAGfD;IADP,IAAI,EAACA,2BAAAA,QAASE,OAAO,GAAE,OAAO;IAC9B,gBAAOF,kBAAAA,QAAQG,MAAM,qBAAdH,eAAgB,CAACC,KAAK,mBAAI;AACnC;AAEA;;;;;;;;;;;;;;;;;;;CAmBC,GACD,OAAO,SAASG,2BACdJ,OAA6C,EAC7CC,IAAsB,EACtBI,KAAc;;QAITL,kBACMA;IAHX,MAAMM,KAAK,OAAOD,UAAU,WAAWA,MAAME,IAAI,KAAK;IACtD,IAAI,CAACD,MAAM,EAACN,2BAAAA,QAASQ,OAAO,GAAE,OAAOC;IACrC,IAAI,UAACT,mBAAAA,QAAQU,OAAO,qBAAfV,gBAAiB,CAACC,KAAK,mBAAI,EAAE,EAAEU,IAAI,CAAC,CAACC,SAAWA,OAAON,EAAE,KAAKA,KAAK,OAAOG;IAC/E,IAAIH,iBAAON,oBAAAA,QAAQa,QAAQ,qBAAhBb,iBAAkB,CAACC,KAAK,oBAAI,CAAC,IAAI,OAAOQ;IACnD,IAAIV,gBAAgBC,SAASC,UAAU,SAAS,OAAOQ;IACvD,OAAOH;AACT;AAEA,OAAO,MAAMQ,sBAAsBlB,cAAwC,CAAC,GAAE;AAC9EkB,oBAAoBC,WAAW,GAAG"}
|
|
@@ -19,6 +19,18 @@ import type { AglynNodeSchema, NodeId } from '../foundation';
|
|
|
19
19
|
export declare const REPEAT_NODE_ID_PREFIX = "rep__";
|
|
20
20
|
/** Hard bound on rows a single repeatable renders, before `repeatLimit`. */
|
|
21
21
|
export declare const REPEAT_MAX_RECORDS = 100;
|
|
22
|
+
/**
|
|
23
|
+
* What the expansion reads of the rows' field model (AGL-177, AGL-180): which
|
|
24
|
+
* fields are references, each with the key its target's rows are answered
|
|
25
|
+
* under (`datasetsByKey`). The model itself is the plugin's that keeps the
|
|
26
|
+
* rows, and it states this much of it when it hands the rows over
|
|
27
|
+
* (`plugin-manager/repeat-rows`, `repeat-sources`); a field it does not name
|
|
28
|
+
* here hops nowhere, and its token is left as written.
|
|
29
|
+
*/
|
|
30
|
+
export interface RepeatRowsModel {
|
|
31
|
+
/** Reference field id → the key of the rows it points into. */
|
|
32
|
+
references?: Readonly<Record<string, string>>;
|
|
33
|
+
}
|
|
22
34
|
export interface RepeatableDataset {
|
|
23
35
|
/**
|
|
24
36
|
* Row value maps, in display order. Rows carry `$id` (needed to resolve
|
|
@@ -26,8 +38,8 @@ export interface RepeatableDataset {
|
|
|
26
38
|
* substitution.
|
|
27
39
|
*/
|
|
28
40
|
records: Array<Record<string, unknown>>;
|
|
29
|
-
/**
|
|
30
|
-
model?:
|
|
41
|
+
/** The rows' references; required for reference-hop bindings. */
|
|
42
|
+
model?: RepeatRowsModel;
|
|
31
43
|
}
|
|
32
44
|
/**
|
|
33
45
|
* The key a node repeats over, trimmed, or `''` when it repeats over nothing.
|
|
@@ -97,11 +109,42 @@ export declare function repeatScope(node: unknown): RepeatScope;
|
|
|
97
109
|
*/
|
|
98
110
|
export declare function substituteRecordTokens<T>(props: T, context: {
|
|
99
111
|
record: Record<string, unknown>;
|
|
100
|
-
/**
|
|
101
|
-
model?:
|
|
112
|
+
/** The repeated rows' references (AGL-180). */
|
|
113
|
+
model?: RepeatRowsModel;
|
|
102
114
|
/** Rows by key, for a one-hop reference (AGL-180). */
|
|
103
115
|
datasetsByKey?: Record<string, RepeatableDataset | undefined>;
|
|
104
116
|
}): T;
|
|
117
|
+
/**
|
|
118
|
+
* The one record a whole page is rendered for (AGL-3475): a record template's
|
|
119
|
+
* routed record, in the shape a repeat hands each of its copies.
|
|
120
|
+
*/
|
|
121
|
+
export interface PageRecordScope {
|
|
122
|
+
record: Record<string, unknown>;
|
|
123
|
+
/** The record's references (AGL-180). */
|
|
124
|
+
model?: RepeatRowsModel;
|
|
125
|
+
/** Rows by key, for a one-hop reference (AGL-180). */
|
|
126
|
+
datasetsByKey?: Record<string, RepeatableDataset | undefined>;
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* Every node's props with the page's record put into its `{{item.field}}`
|
|
130
|
+
* tokens — the substitution a repeat makes on each copy, made once over a
|
|
131
|
+
* page that renders one record (AGL-3475).
|
|
132
|
+
*
|
|
133
|
+
* Run AFTER {@link expandRepeatables}: a repeat inside the page has already
|
|
134
|
+
* spent its own `{{item.*}}` tokens on its own rows by then, so what is left
|
|
135
|
+
* is the page's. A token naming a field the record does not have stays as
|
|
136
|
+
* written, exactly as in a repeat. Returns the input when there is no record.
|
|
137
|
+
*/
|
|
138
|
+
export declare function substituteNodesRecordTokens<N>(nodes: Record<NodeId, N>, scope: PageRecordScope | null | undefined): Record<NodeId, N>;
|
|
139
|
+
/**
|
|
140
|
+
* The page's record put into each repeat's FILTER, before the repeats expand
|
|
141
|
+
* (AGL-3475): on a record template, `category == {{item.category}}` lists the
|
|
142
|
+
* other records in the routed record's category. Only `repeatFilter` is
|
|
143
|
+
* touched — everything else inside a repeat is its template, whose
|
|
144
|
+
* `{{item.*}}` belongs to its own rows. Returns the input when there is no
|
|
145
|
+
* record or no filter names one.
|
|
146
|
+
*/
|
|
147
|
+
export declare function substituteRepeatFilterRecordTokens<N>(nodes: Record<NodeId, N>, scope: PageRecordScope | null | undefined): Record<NodeId, N>;
|
|
105
148
|
/** The node minus its repeat directives, or the node itself when it has none. */
|
|
106
149
|
export declare function withoutRepeatDirective<N>(node: N): N;
|
|
107
150
|
/**
|
|
@@ -114,7 +157,8 @@ export declare function withoutRepeatDirective<N>(node: N): N;
|
|
|
114
157
|
*/
|
|
115
158
|
export declare function repeatedRecords(node: unknown, dataset: RepeatableDataset | undefined): Array<Record<string, unknown>>;
|
|
116
159
|
/**
|
|
117
|
-
* Does this tree contain anything {@link expandRepeatables} would expand
|
|
160
|
+
* Does this tree contain anything {@link expandRepeatables} would expand —
|
|
161
|
+
* or, with no rows, empty?
|
|
118
162
|
*
|
|
119
163
|
* The rows read is the largest on the render path — up to two pages of
|
|
120
164
|
* {@link REPEAT_MAX_RECORDS} records for every key a page repeats over — and a
|
|
@@ -124,7 +168,8 @@ export declare function repeatedRecords(node: unknown, dataset: RepeatableDatase
|
|
|
124
168
|
* which is why this and {@link repeatKeys} share the one predicate
|
|
125
169
|
* `expandRepeatables` looks keys up with, {@link repeatKey}. A gate that is
|
|
126
170
|
* even slightly stricter than the expansion is not a saving: it is a published
|
|
127
|
-
* page
|
|
171
|
+
* page whose repeat never reaches the expansion at all, and so goes out as
|
|
172
|
+
* its raw template — `{{item.*}}` tokens and all — where the author put a list.
|
|
128
173
|
*/
|
|
129
174
|
export declare function hasRepeatableNodes(nodes: Record<NodeId, unknown> | null | undefined): boolean;
|
|
130
175
|
/**
|
|
@@ -162,11 +207,22 @@ export declare function repeatKeys(nodes: Record<NodeId, unknown> | null | undef
|
|
|
162
207
|
* node this expands, and every copy it makes, comes out without them.
|
|
163
208
|
* - Repeats do not nest. A repeat inside another repeat's template is copied
|
|
164
209
|
* with its directives consumed, so it renders once in each copy.
|
|
165
|
-
* -
|
|
166
|
-
*
|
|
167
|
-
*
|
|
168
|
-
*
|
|
210
|
+
* - No rows renders ZERO copies (AGL-3496): a `children` repeat keeps its
|
|
211
|
+
* element with an empty child list, a `self` repeat leaves its parent's
|
|
212
|
+
* list. That covers a filter matching nothing, an empty dataset, and a key
|
|
213
|
+
* the rows answer nothing under — a deleted or unshared dataset, or no rows
|
|
214
|
+
* map at all — because the template drawn without a record is its literal
|
|
215
|
+
* `{{item.*}}` tokens, printed to every visitor. Never a throw: a dataset
|
|
216
|
+
* going away empties a list, it does not take the page down.
|
|
217
|
+
* - An empty template, or a self-scoped node its parent does not list (the
|
|
218
|
+
* document root, say), has nothing to copy or nowhere to put copies, and is
|
|
219
|
+
* left as written.
|
|
169
220
|
* - Inputs are never mutated; templates stay in the map unreferenced.
|
|
221
|
+
*
|
|
222
|
+
* This is the PUBLISHED page's composition. The besigner's canvas keeps the
|
|
223
|
+
* template on screen whatever the rows say — it is what an author edits — and
|
|
224
|
+
* flags a repeat with no rows on its badge instead ({@link repeatedRecords}
|
|
225
|
+
* is the count both read).
|
|
170
226
|
*/
|
|
171
227
|
export declare function expandRepeatables<N extends AglynNodeSchema = AglynNodeSchema>(nodes: Record<NodeId, N>, datasetsByKey: Record<string, RepeatableDataset | undefined> | undefined): Record<NodeId, N>;
|
|
172
228
|
export default expandRepeatables;
|
|
@@ -24,10 +24,10 @@ import { applyRepeatQuery, parseRepeatFilter, parseRepeatSort } from "./repeat-q
|
|
|
24
24
|
/** Hard bound on rows a single repeatable renders, before `repeatLimit`. */ export const REPEAT_MAX_RECORDS = 100;
|
|
25
25
|
const displayValue = (value)=>Array.isArray(value) ? value.join(', ') : String(value);
|
|
26
26
|
/** Resolves `{{item.ref.field}}`: FKey(s) → target document field value. */ function resolveReferenceHop(context, fieldId, targetFieldId) {
|
|
27
|
-
var
|
|
28
|
-
const
|
|
29
|
-
if (
|
|
30
|
-
const target = (_context_datasetsByKey = context.datasetsByKey) == null ? void 0 : _context_datasetsByKey[
|
|
27
|
+
var _context_model_references, _context_model, _context_datasetsByKey;
|
|
28
|
+
const targetKey = (_context_model = context.model) == null ? void 0 : (_context_model_references = _context_model.references) == null ? void 0 : _context_model_references[fieldId];
|
|
29
|
+
if (!targetKey) return null;
|
|
30
|
+
const target = (_context_datasetsByKey = context.datasetsByKey) == null ? void 0 : _context_datasetsByKey[targetKey];
|
|
31
31
|
if (!target) return null;
|
|
32
32
|
const keys = context.record[fieldId];
|
|
33
33
|
const ids = Array.isArray(keys) ? keys : keys != null ? [
|
|
@@ -134,6 +134,49 @@ function substituteValue(value, context) {
|
|
|
134
134
|
*/ export function substituteRecordTokens(props, context) {
|
|
135
135
|
return substituteValue(props, context);
|
|
136
136
|
}
|
|
137
|
+
/**
|
|
138
|
+
* Every node's props with the page's record put into its `{{item.field}}`
|
|
139
|
+
* tokens — the substitution a repeat makes on each copy, made once over a
|
|
140
|
+
* page that renders one record (AGL-3475).
|
|
141
|
+
*
|
|
142
|
+
* Run AFTER {@link expandRepeatables}: a repeat inside the page has already
|
|
143
|
+
* spent its own `{{item.*}}` tokens on its own rows by then, so what is left
|
|
144
|
+
* is the page's. A token naming a field the record does not have stays as
|
|
145
|
+
* written, exactly as in a repeat. Returns the input when there is no record.
|
|
146
|
+
*/ export function substituteNodesRecordTokens(nodes, scope) {
|
|
147
|
+
if (!scope) return nodes;
|
|
148
|
+
const next = {};
|
|
149
|
+
for (const [id, node] of Object.entries(nodes)){
|
|
150
|
+
const props = node == null ? void 0 : node.props;
|
|
151
|
+
next[id] = props ? _extends({}, node, {
|
|
152
|
+
props: substituteValue(props, scope)
|
|
153
|
+
}) : node;
|
|
154
|
+
}
|
|
155
|
+
return next;
|
|
156
|
+
}
|
|
157
|
+
/**
|
|
158
|
+
* The page's record put into each repeat's FILTER, before the repeats expand
|
|
159
|
+
* (AGL-3475): on a record template, `category == {{item.category}}` lists the
|
|
160
|
+
* other records in the routed record's category. Only `repeatFilter` is
|
|
161
|
+
* touched — everything else inside a repeat is its template, whose
|
|
162
|
+
* `{{item.*}}` belongs to its own rows. Returns the input when there is no
|
|
163
|
+
* record or no filter names one.
|
|
164
|
+
*/ export function substituteRepeatFilterRecordTokens(nodes, scope) {
|
|
165
|
+
if (!scope) return nodes;
|
|
166
|
+
let next = null;
|
|
167
|
+
for (const [id, node] of Object.entries(nodes)){
|
|
168
|
+
const props = node == null ? void 0 : node.props;
|
|
169
|
+
const filter = props == null ? void 0 : props['repeatFilter'];
|
|
170
|
+
if (typeof filter !== 'string' || !filter.includes('{{')) continue;
|
|
171
|
+
next != null ? next : next = _extends({}, nodes);
|
|
172
|
+
next[id] = _extends({}, node, {
|
|
173
|
+
props: _extends({}, props, {
|
|
174
|
+
repeatFilter: substituteValue(filter, scope)
|
|
175
|
+
})
|
|
176
|
+
});
|
|
177
|
+
}
|
|
178
|
+
return next != null ? next : nodes;
|
|
179
|
+
}
|
|
137
180
|
/** The node minus its repeat directives, or the node itself when it has none. */ export function withoutRepeatDirective(node) {
|
|
138
181
|
const props = node == null ? void 0 : node.props;
|
|
139
182
|
if (!props || !REPEAT_DIRECTIVE_PROPS.some((key)=>key in props)) {
|
|
@@ -167,7 +210,8 @@ function substituteValue(value, context) {
|
|
|
167
210
|
} : {})).slice(0, Number.isFinite(limit) && limit > 0 ? Math.min(limit, REPEAT_MAX_RECORDS) : REPEAT_MAX_RECORDS);
|
|
168
211
|
}
|
|
169
212
|
/**
|
|
170
|
-
* Does this tree contain anything {@link expandRepeatables} would expand
|
|
213
|
+
* Does this tree contain anything {@link expandRepeatables} would expand —
|
|
214
|
+
* or, with no rows, empty?
|
|
171
215
|
*
|
|
172
216
|
* The rows read is the largest on the render path — up to two pages of
|
|
173
217
|
* {@link REPEAT_MAX_RECORDS} records for every key a page repeats over — and a
|
|
@@ -177,7 +221,8 @@ function substituteValue(value, context) {
|
|
|
177
221
|
* which is why this and {@link repeatKeys} share the one predicate
|
|
178
222
|
* `expandRepeatables` looks keys up with, {@link repeatKey}. A gate that is
|
|
179
223
|
* even slightly stricter than the expansion is not a saving: it is a published
|
|
180
|
-
* page
|
|
224
|
+
* page whose repeat never reaches the expansion at all, and so goes out as
|
|
225
|
+
* its raw template — `{{item.*}}` tokens and all — where the author put a list.
|
|
181
226
|
*/ export function hasRepeatableNodes(nodes) {
|
|
182
227
|
if (!nodes) return false;
|
|
183
228
|
return Object.values(nodes).some((node)=>repeatKey(node) !== '');
|
|
@@ -225,19 +270,30 @@ function substituteValue(value, context) {
|
|
|
225
270
|
* node this expands, and every copy it makes, comes out without them.
|
|
226
271
|
* - Repeats do not nest. A repeat inside another repeat's template is copied
|
|
227
272
|
* with its directives consumed, so it renders once in each copy.
|
|
228
|
-
* -
|
|
229
|
-
*
|
|
230
|
-
*
|
|
231
|
-
*
|
|
273
|
+
* - No rows renders ZERO copies (AGL-3496): a `children` repeat keeps its
|
|
274
|
+
* element with an empty child list, a `self` repeat leaves its parent's
|
|
275
|
+
* list. That covers a filter matching nothing, an empty dataset, and a key
|
|
276
|
+
* the rows answer nothing under — a deleted or unshared dataset, or no rows
|
|
277
|
+
* map at all — because the template drawn without a record is its literal
|
|
278
|
+
* `{{item.*}}` tokens, printed to every visitor. Never a throw: a dataset
|
|
279
|
+
* going away empties a list, it does not take the page down.
|
|
280
|
+
* - An empty template, or a self-scoped node its parent does not list (the
|
|
281
|
+
* document root, say), has nothing to copy or nowhere to put copies, and is
|
|
282
|
+
* left as written.
|
|
232
283
|
* - Inputs are never mutated; templates stay in the map unreferenced.
|
|
284
|
+
*
|
|
285
|
+
* This is the PUBLISHED page's composition. The besigner's canvas keeps the
|
|
286
|
+
* template on screen whatever the rows say — it is what an author edits — and
|
|
287
|
+
* flags a repeat with no rows on its badge instead ({@link repeatedRecords}
|
|
288
|
+
* is the count both read).
|
|
233
289
|
*/ export function expandRepeatables(nodes, datasetsByKey) {
|
|
234
|
-
|
|
290
|
+
const rowsByKey = datasetsByKey != null ? datasetsByKey : {};
|
|
235
291
|
const repeatIds = Object.entries(nodes).filter(([, node])=>repeatKey(node) !== '');
|
|
236
292
|
if (!repeatIds.length) return nodes;
|
|
237
293
|
const next = _extends({}, nodes);
|
|
238
294
|
for (const [repeatId, repeated] of repeatIds){
|
|
239
295
|
var _next_parentId;
|
|
240
|
-
const dataset =
|
|
296
|
+
const dataset = rowsByKey[repeatKey(repeated)];
|
|
241
297
|
const records = repeatedRecords(repeated, dataset);
|
|
242
298
|
const self = repeatScope(repeated) === 'self';
|
|
243
299
|
// The copies' parent: the node itself, or — for a self-scoped node — the
|
|
@@ -250,7 +306,25 @@ function substituteValue(value, context) {
|
|
|
250
306
|
repeatId
|
|
251
307
|
] : Array.isArray(repeated.nodes) ? repeated.nodes : [];
|
|
252
308
|
next[repeatId] = withoutRepeatDirective(next[repeatId]);
|
|
253
|
-
if (!
|
|
309
|
+
if (!templateIds.length || self && slot < 0) continue;
|
|
310
|
+
if (!records.length) {
|
|
311
|
+
// Zero copies (AGL-3496). The template is a design, not content: drawn
|
|
312
|
+
// without a record it prints `{{item.name}}` to every visitor.
|
|
313
|
+
if (self) {
|
|
314
|
+
const listed = [
|
|
315
|
+
...next[parentId].nodes
|
|
316
|
+
];
|
|
317
|
+
listed.splice(slot, 1);
|
|
318
|
+
next[parentId] = _extends({}, next[parentId], {
|
|
319
|
+
nodes: listed
|
|
320
|
+
});
|
|
321
|
+
} else {
|
|
322
|
+
next[repeatId] = _extends({}, next[repeatId], {
|
|
323
|
+
nodes: []
|
|
324
|
+
});
|
|
325
|
+
}
|
|
326
|
+
continue;
|
|
327
|
+
}
|
|
254
328
|
const copyIds = [];
|
|
255
329
|
records.forEach((record, index)=>{
|
|
256
330
|
const prefix = `${REPEAT_NODE_ID_PREFIX}${repeatId}__${index}__`;
|
|
@@ -266,7 +340,7 @@ function substituteValue(value, context) {
|
|
|
266
340
|
props: substituteValue((_node_props = node.props) != null ? _node_props : {}, {
|
|
267
341
|
record,
|
|
268
342
|
model: dataset == null ? void 0 : dataset.model,
|
|
269
|
-
datasetsByKey
|
|
343
|
+
datasetsByKey: rowsByKey
|
|
270
344
|
})
|
|
271
345
|
}, clonedChildren && {
|
|
272
346
|
nodes: clonedChildren.map((childId)=>prefixId(childId))
|