@salsita-ai/sdk 0.50.0-develop.bc08a38ffe → 0.50.0-develop.bc204720a8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +31 -17
- package/dist/admin/AdminShell.js +1 -1
- package/dist/admin/common/admin-interface.d.ts +3 -3
- package/dist/admin/default-admin-elements.d.ts +9 -0
- package/dist/admin/default-admin-elements.js +1 -0
- package/dist/admin/default-elements/built-in-entity-element.d.ts +10 -0
- package/dist/admin/default-elements/built-in-entity-element.js +1 -0
- package/dist/admin/default-elements/built-in-layout-element.d.ts +10 -0
- package/dist/admin/default-elements/built-in-layout-element.js +1 -0
- package/dist/admin/default-elements/index.d.ts +2 -0
- package/dist/admin/default-elements/index.js +1 -0
- package/dist/admin/index.d.ts +1 -0
- package/dist/admin/index.js +1 -1
- package/dist/admin/legacy-admin/Application.js +1 -1
- package/dist/application/index.d.ts +1 -0
- package/dist/application/index.js +1 -1
- package/dist/application/mount-application.d.ts +1 -1
- package/dist/application/mount-application.js +1 -1
- package/dist/application/mount-configurator.d.ts +19 -0
- package/dist/application/mount-configurator.js +1 -0
- package/dist/application/mounted-application-runtime.d.ts +4 -0
- package/dist/application/mounted-application-runtime.js +1 -0
- package/dist/application/register-web-component.d.ts +2 -0
- package/dist/application/register-web-component.js +1 -0
- package/dist/application-spec/caching/content-diff.js +1 -1
- package/dist/application-spec/caching/index.d.ts +6 -1
- package/dist/application-spec/caching/index.js +1 -1
- package/dist/application-spec/core/application-file.d.ts +0 -2
- package/dist/application-spec/core/application-file.js +1 -1
- package/dist/application-spec/core/enhanced-json-value.d.ts +2 -31
- package/dist/application-spec/core/enhanced-json-value.js +1 -1
- package/dist/application-spec/core/index.d.ts +1 -3
- package/dist/application-spec/core/index.js +1 -1
- package/dist/application-spec/core/json-schema.d.ts +2 -52
- package/dist/application-spec/core/markers/index.d.ts +1 -1
- package/dist/application-spec/core/markers/index.js +1 -1
- package/dist/application-spec/core/markers/msg-marker.d.ts +2 -28
- package/dist/application-spec/core/markers/msg-marker.js +1 -1
- package/dist/application-spec/core/markers/raw-eval-write-marker.d.ts +1 -1
- package/dist/application-spec/core/markers/raw-eval-write-marker.js +1 -1
- package/dist/application-spec/core/markers/raw-read-write-marker.js +1 -1
- package/dist/application-spec/errors/diagnostic-codes.d.ts +25 -1
- package/dist/application-spec/errors/diagnostic-codes.js +1 -1
- package/dist/application-spec/errors/diagnostic-messages.d.ts +33 -2
- package/dist/application-spec/errors/diagnostic-messages.js +1 -1
- package/dist/application-spec/generate-application/code/common/code-imports.js +1 -1
- package/dist/application-spec/generate-application/code/common/env-reader.js +2 -2
- package/dist/application-spec/generate-application/code/common/index.d.ts +1 -0
- package/dist/application-spec/generate-application/code/common/index.js +1 -1
- package/dist/application-spec/generate-application/code/common/single-quoted-string.d.ts +6 -0
- package/dist/application-spec/generate-application/code/common/single-quoted-string.js +1 -0
- package/dist/application-spec/generate-application/code/domain-runtime-files.d.ts +0 -19
- package/dist/application-spec/generate-application/code/domain-runtime-files.js +1 -1
- package/dist/application-spec/generate-application/code/generate-application-code.d.ts +3 -2
- package/dist/application-spec/generate-application/code/generate-application-code.js +1 -1
- package/dist/application-spec/generate-application/code/index.d.ts +1 -0
- package/dist/application-spec/generate-application/code/project-scaffolding.d.ts +15 -14
- package/dist/application-spec/generate-application/code/project-scaffolding.js +2 -2
- package/dist/application-spec/generate-application/code/standalone-app-files.d.ts +6 -5
- package/dist/application-spec/generate-application/code/standalone-app-files.js +1 -1
- package/dist/application-spec/generate-application/code/story-files.js +1 -1
- package/dist/application-spec/generate-application/code/templates/admin-config.d.ts +1 -1
- package/dist/application-spec/generate-application/code/templates/admin-config.js +5 -1
- package/dist/application-spec/generate-application/code/templates/application-types.js +6 -6
- package/dist/application-spec/generate-application/code/templates/common/doc-comment.d.ts +2 -0
- package/dist/application-spec/generate-application/code/templates/common/doc-comment.js +1 -0
- package/dist/application-spec/generate-application/code/templates/common/format-property-key.d.ts +7 -0
- package/dist/application-spec/generate-application/code/templates/common/format-property-key.js +1 -0
- package/dist/application-spec/generate-application/code/templates/common/schema-to-type-string.js +3 -3
- package/dist/application-spec/generate-application/code/templates/configurator-config.js +7 -4
- package/dist/application-spec/generate-application/code/templates/configurator-globals.d.ts +2 -1
- package/dist/application-spec/generate-application/code/templates/configurator-globals.js +19 -6
- package/dist/application-spec/generate-application/code/templates/domain-spec/factory-types/domain-factory-types.d.ts +36 -0
- package/dist/application-spec/generate-application/code/templates/domain-spec/factory-types/domain-factory-types.js +5 -0
- package/dist/application-spec/generate-application/code/templates/domain-spec/factory-types/index.d.ts +1 -0
- package/dist/application-spec/generate-application/code/templates/domain-spec/factory-types/index.js +1 -0
- package/dist/application-spec/generate-application/code/templates/domain-spec/generate-base-configurator-builder.js +2 -1
- package/dist/application-spec/generate-application/code/templates/domain-spec/generate-component-optics.d.ts +1 -1
- package/dist/application-spec/generate-application/code/templates/domain-spec/generate-component-optics.js +6 -6
- package/dist/application-spec/generate-application/code/templates/domain-spec/generate-domain-block.js +57 -61
- package/dist/application-spec/generate-application/code/templates/domain-spec/generate-invariants.d.ts +8 -0
- package/dist/application-spec/generate-application/code/templates/domain-spec/generate-invariants.js +1 -1
- package/dist/application-spec/generate-application/code/templates/domain-spec/generate-locale.js +1 -1
- package/dist/application-spec/generate-application/code/templates/domain-spec/generate-presets.js +1 -1
- package/dist/application-spec/generate-application/code/templates/domain-spec/generate-resources.js +13 -13
- package/dist/application-spec/generate-application/code/templates/domain-spec/generate-states.d.ts +1 -1
- package/dist/application-spec/generate-application/code/templates/domain-spec/generate-states.js +2 -2
- package/dist/application-spec/generate-application/code/templates/domain-spec/index.d.ts +2 -1
- package/dist/application-spec/generate-application/code/templates/domain-spec/index.js +1 -1
- package/dist/application-spec/generate-application/code/templates/editor.d.ts +1 -1
- package/dist/application-spec/generate-application/code/templates/editor.js +16 -3
- package/dist/application-spec/generate-application/code/templates/eslint-config.d.ts +5 -0
- package/dist/application-spec/generate-application/code/templates/eslint-config.js +4 -5
- package/dist/application-spec/generate-application/code/templates/frontend-config.js +3 -5
- package/dist/application-spec/generate-application/code/templates/gitignore.js +2 -4
- package/dist/application-spec/generate-application/code/templates/global-definition/generate-action-types.js +7 -7
- package/dist/application-spec/generate-application/code/templates/global-definition/generate-assistant-form-element-types.d.ts +12 -0
- package/dist/application-spec/generate-application/code/templates/global-definition/generate-assistant-form-element-types.js +7 -0
- package/dist/application-spec/generate-application/code/templates/global-definition/generate-phx-types.d.ts +43 -0
- package/dist/application-spec/generate-application/code/templates/global-definition/generate-phx-types.js +33 -0
- package/dist/application-spec/generate-application/code/templates/global-definition/index.d.ts +2 -0
- package/dist/application-spec/generate-application/code/templates/global-definition/index.js +1 -1
- package/dist/application-spec/generate-application/code/templates/globals.js +24 -44
- package/dist/application-spec/generate-application/code/templates/html-index.d.ts +12 -1
- package/dist/application-spec/generate-application/code/templates/html-index.js +9 -10
- package/dist/application-spec/generate-application/code/templates/index.d.ts +6 -10
- package/dist/application-spec/generate-application/code/templates/index.js +1 -1
- package/dist/application-spec/generate-application/code/templates/lingui-rc.d.ts +5 -0
- package/dist/application-spec/generate-application/code/templates/lingui-rc.js +3 -2
- package/dist/application-spec/generate-application/code/templates/prettier-config.d.ts +5 -0
- package/dist/application-spec/generate-application/code/templates/prettier-config.js +4 -5
- package/dist/application-spec/generate-application/code/templates/root-tsconfig.d.ts +6 -0
- package/dist/application-spec/generate-application/code/templates/root-tsconfig.js +2 -0
- package/dist/application-spec/generate-application/code/templates/skills/core/cli.d.ts +2 -0
- package/dist/application-spec/generate-application/code/templates/skills/core/cli.js +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/core/index.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/core/index.js +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/core/sdk.d.ts +2 -0
- package/dist/application-spec/generate-application/code/templates/skills/core/sdk.js +89 -0
- package/dist/application-spec/generate-application/code/templates/skills/core/workflow.d.ts +2 -0
- package/dist/application-spec/generate-application/code/templates/skills/core/workflow.js +46 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/application-states/application-states.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/application-states/application-states.js +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/application-states/index.d.ts +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/application-states/index.js +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/application-states/navigation.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/application-states/navigation.js +48 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/application-states/presets.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/application-states/presets.js +38 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/application-states/selection.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/application-states/selection.js +35 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/application-states/views-and-tools.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/application-states/views-and-tools.js +61 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/custom-layout/custom-layout.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/custom-layout/custom-layout.js +7 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/custom-layout/finalization-actions.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/custom-layout/finalization-actions.js +79 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/custom-layout/index.d.ts +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/custom-layout/index.js +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/custom-layout/messages.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/custom-layout/messages.js +52 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/custom-layout/pages.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/custom-layout/pages.js +49 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/custom-layout/scene-and-safe-area.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/custom-layout/scene-and-safe-area.js +62 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/custom-layout/slots.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/custom-layout/slots.js +40 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/custom-layout/tabs-and-steps.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/custom-layout/tabs-and-steps.js +65 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/custom-layout/toolbar-actions.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/custom-layout/toolbar-actions.js +58 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/custom-layout/view-mode.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/custom-layout/view-mode.js +41 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/domain-controls/control-components.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/domain-controls/control-components.js +24 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/domain-controls/control-hooks.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/domain-controls/control-hooks.js +44 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/domain-controls/custom-controls.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/domain-controls/custom-controls.js +74 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/domain-controls/domain-controls.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/domain-controls/domain-controls.js +8 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/domain-controls/index.d.ts +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/domain-controls/index.js +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/domain-controls/scene-controls.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/domain-controls/scene-controls.js +48 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/domain-model/actions.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/domain-model/actions.js +64 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/domain-model/components.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/domain-model/components.js +62 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/domain-model/domain-model.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/domain-model/domain-model.js +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/domain-model/entities-and-relations.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/domain-model/entities-and-relations.js +59 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/domain-model/expressions.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/domain-model/expressions.js +46 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/domain-model/index.d.ts +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/domain-model/index.js +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/domain-model/transformers.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/domain-model/transformers.js +43 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/domain-model/validation-and-repair.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/domain-model/validation-and-repair.js +30 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/features.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/features.js +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/index.d.ts +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/index.js +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/inspection.d.ts +2 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/inspection.js +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/localization.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/localization.js +87 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/scene-objects.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/scene-objects.js +43 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/state/index.d.ts +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/state/index.js +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/state/slices.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/state/slices.js +48 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/state/state.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/state/state.js +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/state/updates.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/state/updates.js +39 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/state/violations.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/state/violations.js +36 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/variants.d.ts +2 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/variants.js +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/assistant-setup.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/assistant-setup.js +32 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/authentication.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/authentication.js +42 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/backend-data.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/backend-data.js +45 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/entry-and-environment.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/entry-and-environment.js +38 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/finalization.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/finalization.js +92 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/index.d.ts +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/index.js +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/publishing.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/publishing.js +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/tasks/callback.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/tasks/callback.js +26 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/tasks/documents.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/tasks/documents.js +51 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/tasks/email.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/tasks/email.js +38 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/tasks/index.d.ts +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/tasks/index.js +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/tasks/integrations.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/tasks/integrations.js +88 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/tasks/links-and-images.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/tasks/links-and-images.js +68 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/tasks/tasks.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/tasks/tasks.js +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/webhooks.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/features/webhooks/webhooks.js +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/guide.d.ts +68 -0
- package/dist/application-spec/generate-application/code/templates/skills/guide.js +18 -0
- package/dist/application-spec/generate-application/code/templates/skills/phoenix-skill-bundle.d.ts +10 -0
- package/dist/application-spec/generate-application/code/templates/skills/phoenix-skill-bundle.js +14 -0
- package/dist/application-spec/generate-application/code/templates/skills/phx-members-without-guide.d.ts +9 -0
- package/dist/application-spec/generate-application/code/templates/skills/phx-members-without-guide.js +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/asset-conversion.d.ts +2 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/asset-conversion.js +23 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/beta.d.ts +14 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/beta.js +4 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/feedback/evaluate.d.ts +2 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/feedback/evaluate.js +38 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/feedback/feedback.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/feedback/feedback.js +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/feedback/index.d.ts +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/feedback/index.js +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/feedback/report.d.ts +2 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/feedback/report.js +35 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/feedback/send.d.ts +2 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/feedback/send.js +2 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/finalization.d.ts +2 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/finalization.js +2 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/first-draft/build.d.ts +2 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/first-draft/build.js +25 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/first-draft/direction.d.ts +2 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/first-draft/direction.js +35 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/first-draft/first-draft.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/first-draft/first-draft.js +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/first-draft/handoff.d.ts +2 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/first-draft/handoff.js +9 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/first-draft/index.d.ts +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/first-draft/index.js +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/index.d.ts +8 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/index.js +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/model-migration.d.ts +2 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/model-migration.js +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/review/appearance.d.ts +2 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/review/appearance.js +46 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/review/code.d.ts +2 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/review/code.js +2 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/review/hand-over.d.ts +2 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/review/hand-over.js +6 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/review/index.d.ts +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/review/index.js +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/review/review.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/review/review.js +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/review/visual-inspection.d.ts +2 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/review/visual-inspection.js +13 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/specification/branding.d.ts +2 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/specification/branding.js +20 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/specification/catalog.d.ts +2 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/specification/catalog.js +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/specification/index.d.ts +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/specification/index.js +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/specification/product-definition.d.ts +2 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/specification/product-definition.js +22 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/specification/specification.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/specification/specification.js +1 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/specification/ux-guidelines.d.ts +2 -0
- package/dist/application-spec/generate-application/code/templates/skills/processes/specification/ux-guidelines.js +25 -0
- package/dist/application-spec/generate-application/code/templates/skills/sdk-content.d.ts +49 -239
- package/dist/application-spec/generate-application/code/templates/skills/sdk-content.js +3 -58
- package/dist/application-spec/generate-application/code/templates/skills/sdk-subpath-imports.d.ts +9 -0
- package/dist/application-spec/generate-application/code/templates/skills/sdk-subpath-imports.js +1 -0
- package/dist/application-spec/generate-application/code/templates/spec-code/collect-spec-code.d.ts +58 -0
- package/dist/application-spec/generate-application/code/templates/spec-code/collect-spec-code.js +1 -0
- package/dist/application-spec/generate-application/code/templates/spec-code/index.d.ts +2 -0
- package/dist/application-spec/generate-application/code/templates/spec-code/index.js +1 -0
- package/dist/application-spec/generate-application/code/templates/spec-code/spec-code.d.ts +18 -0
- package/dist/application-spec/generate-application/code/templates/spec-code/spec-code.js +41 -0
- package/dist/application-spec/generate-application/code/templates/spec-messages/index.d.ts +1 -0
- package/dist/application-spec/generate-application/code/templates/spec-messages/index.js +1 -0
- package/dist/application-spec/generate-application/code/templates/spec-messages/spec-messages.d.ts +20 -0
- package/dist/application-spec/generate-application/code/templates/spec-messages/spec-messages.js +6 -0
- package/dist/application-spec/generate-application/code/templates/story/phx-module.d.ts +8 -2
- package/dist/application-spec/generate-application/code/templates/story/phx-module.js +15 -3
- package/dist/application-spec/generate-application/code/templates/story/wrapper.d.ts +3 -0
- package/dist/application-spec/generate-application/code/templates/story/wrapper.js +4 -5
- package/dist/application-spec/generate-application/code/templates/tsconfig.d.ts +5 -0
- package/dist/application-spec/generate-application/code/templates/tsconfig.js +2 -1
- package/dist/application-spec/generate-application/code/templates/webhook-builders.js +4 -3
- package/dist/application-spec/generate-application/code/templates/webhook-index.d.ts +7 -1
- package/dist/application-spec/generate-application/code/templates/webhook-index.js +10 -1
- package/dist/application-spec/generate-application/code/templates/webhooks-config.js +2 -3
- package/dist/application-spec/generate-application/index.d.ts +1 -4
- package/dist/application-spec/generate-application/index.js +1 -1
- package/dist/application-spec/parse-application-files/categorize/categorize-files.d.ts +34 -0
- package/dist/application-spec/parse-application-files/categorize/categorize-files.js +1 -1
- package/dist/application-spec/parse-application-files/categorize/earlier-generated-editor-configs.d.ts +16 -0
- package/dist/application-spec/parse-application-files/categorize/earlier-generated-editor-configs.js +9 -0
- package/dist/application-spec/parse-application-files/categorize/earlier-generated-tsconfig.d.ts +9 -0
- package/dist/application-spec/parse-application-files/categorize/earlier-generated-tsconfig.js +1 -0
- package/dist/application-spec/parse-application-files/merge/merged-app-metadata.d.ts +1 -0
- package/dist/application-spec/parse-application-files/merge/merged-app-metadata.js +1 -1
- package/dist/application-spec/parse-application-files/merge/merged-assistant.d.ts +13 -4
- package/dist/application-spec/parse-application-files/merge/merged-assistant.js +1 -1
- package/dist/application-spec/parse-application-files/merge/merged-infra.d.ts +4 -11
- package/dist/application-spec/parse-application-files/merge/merged-transformers.d.ts +2 -4
- package/dist/application-spec/parse-application-files/parse-application-files.js +1 -1
- package/dist/application-spec/parse-application-files/raw-spec/parse-yaml-spec-file.js +1 -1
- package/dist/application-spec/parse-application-files/raw-spec/raw-acl.d.ts +2 -2
- package/dist/application-spec/parse-application-files/raw-spec/raw-acl.js +1 -1
- package/dist/application-spec/parse-application-files/raw-spec/raw-admin-pages.d.ts +3 -24
- package/dist/application-spec/parse-application-files/raw-spec/raw-assistant.d.ts +58 -23
- package/dist/application-spec/parse-application-files/raw-spec/raw-assistant.js +1 -1
- package/dist/application-spec/parse-application-files/raw-spec/raw-expressions.d.ts +1 -1
- package/dist/application-spec/parse-application-files/raw-spec/raw-expressions.js +1 -1
- package/dist/application-spec/parse-application-files/raw-spec/raw-resources.d.ts +19 -64
- package/dist/application-spec/parse-application-files/raw-spec/raw-spec-file.d.ts +1 -0
- package/dist/application-spec/parse-application-files/raw-spec/raw-spec-file.js +1 -1
- package/dist/application-spec/parse-application-files/spec/application/admin-spec/admin-pages.d.ts +3 -20
- package/dist/application-spec/parse-application-files/spec/application/admin-spec/admin-spec.js +1 -1
- package/dist/application-spec/parse-application-files/spec/application/admin-spec/states.d.ts +3 -5
- package/dist/application-spec/parse-application-files/spec/application/configurator-spec/configurator-spec.js +1 -1
- package/dist/application-spec/parse-application-files/spec/application/configurator-spec/states.d.ts +3 -8
- package/dist/application-spec/parse-application-files/spec/common/index.d.ts +1 -0
- package/dist/application-spec/parse-application-files/spec/common/index.js +1 -1
- package/dist/application-spec/parse-application-files/spec/common/value-type/format-value-type.d.ts +3 -0
- package/dist/application-spec/parse-application-files/spec/common/value-type/format-value-type.js +1 -0
- package/dist/application-spec/parse-application-files/spec/common/value-type/index.d.ts +5 -0
- package/dist/application-spec/parse-application-files/spec/common/value-type/index.js +1 -0
- package/dist/application-spec/parse-application-files/spec/common/value-type/intersect-value-types.d.ts +6 -0
- package/dist/application-spec/parse-application-files/spec/common/value-type/intersect-value-types.js +1 -0
- package/dist/application-spec/parse-application-files/spec/common/value-type/is-assignable-value-type.d.ts +8 -0
- package/dist/application-spec/parse-application-files/spec/common/value-type/is-assignable-value-type.js +1 -0
- package/dist/application-spec/parse-application-files/spec/common/value-type/value-type-at.d.ts +10 -0
- package/dist/application-spec/parse-application-files/spec/common/value-type/value-type-at.js +1 -0
- package/dist/application-spec/parse-application-files/spec/common/value-type/value-type.d.ts +98 -0
- package/dist/application-spec/parse-application-files/spec/common/value-type/value-type.js +1 -0
- package/dist/application-spec/parse-application-files/spec/components/bindings/component-path.d.ts +13 -0
- package/dist/application-spec/parse-application-files/spec/components/bindings/component-path.js +1 -0
- package/dist/application-spec/parse-application-files/spec/components/bindings/index.d.ts +2 -0
- package/dist/application-spec/parse-application-files/spec/components/bindings/index.js +1 -1
- package/dist/application-spec/parse-application-files/spec/components/bindings/read-binding-type.d.ts +24 -0
- package/dist/application-spec/parse-application-files/spec/components/bindings/read-binding-type.js +1 -0
- package/dist/application-spec/parse-application-files/spec/components/bindings/read-binding.d.ts +3 -13
- package/dist/application-spec/parse-application-files/spec/components/bindings/write-binding.d.ts +4 -32
- package/dist/application-spec/parse-application-files/spec/components/component-filter.d.ts +4 -10
- package/dist/application-spec/parse-application-files/spec/components/component-state-type.d.ts +8 -0
- package/dist/application-spec/parse-application-files/spec/components/component-state-type.js +1 -0
- package/dist/application-spec/parse-application-files/spec/components/components.d.ts +3 -4
- package/dist/application-spec/parse-application-files/spec/components/filter-criterion-types.d.ts +13 -0
- package/dist/application-spec/parse-application-files/spec/components/filter-criterion-types.js +1 -0
- package/dist/application-spec/parse-application-files/spec/components/index.d.ts +1 -2
- package/dist/application-spec/parse-application-files/spec/components/index.js +1 -1
- package/dist/application-spec/parse-application-files/spec/components/sdk-component-entry.d.ts +1 -1
- package/dist/application-spec/parse-application-files/spec/components/static-entity-id.d.ts +14 -0
- package/dist/application-spec/parse-application-files/spec/components/static-entity-id.js +1 -0
- package/dist/application-spec/parse-application-files/spec/components/user-component-entry.d.ts +8 -3
- package/dist/application-spec/parse-application-files/spec/components/user-component-entry.js +1 -1
- package/dist/application-spec/parse-application-files/spec/components/user-components.d.ts +9 -7
- package/dist/application-spec/parse-application-files/spec/components/user-components.js +1 -1
- package/dist/application-spec/parse-application-files/spec/expressions/expression-read-types.d.ts +24 -0
- package/dist/application-spec/parse-application-files/spec/expressions/expression-read-types.js +1 -0
- package/dist/application-spec/parse-application-files/spec/expressions/expression-read.d.ts +13 -0
- package/dist/application-spec/parse-application-files/spec/expressions/expression-value-type.d.ts +9 -0
- package/dist/application-spec/parse-application-files/spec/expressions/expression-value-type.js +1 -0
- package/dist/application-spec/parse-application-files/spec/expressions/expressions.d.ts +12 -30
- package/dist/application-spec/parse-application-files/spec/expressions/expressions.js +1 -1
- package/dist/application-spec/parse-application-files/spec/expressions/index.d.ts +0 -1
- package/dist/application-spec/parse-application-files/spec/expressions/memo-eval-plan.d.ts +4 -71
- package/dist/application-spec/parse-application-files/spec/expressions/memo-eval-plan.js +1 -1
- package/dist/application-spec/parse-application-files/spec/expressions/user-expressions.d.ts +5 -3
- package/dist/application-spec/parse-application-files/spec/expressions/user-expressions.js +1 -1
- package/dist/application-spec/parse-application-files/spec/invariants/invariant.d.ts +5 -21
- package/dist/application-spec/parse-application-files/spec/invariants/invariants.d.ts +6 -16
- package/dist/application-spec/parse-application-files/spec/invariants/invariants.js +1 -1
- package/dist/application-spec/parse-application-files/spec/model/aliases.d.ts +3 -9
- package/dist/application-spec/parse-application-files/spec/model/common-types.d.ts +6 -14
- package/dist/application-spec/parse-application-files/spec/model/defaults.d.ts +6 -31
- package/dist/application-spec/parse-application-files/spec/model/entity-types.d.ts +3 -8
- package/dist/application-spec/parse-application-files/spec/model/index.d.ts +1 -0
- package/dist/application-spec/parse-application-files/spec/model/index.js +1 -1
- package/dist/application-spec/parse-application-files/spec/model/model-type-resolution.d.ts +10 -0
- package/dist/application-spec/parse-application-files/spec/model/model-type-resolution.js +1 -0
- package/dist/application-spec/parse-application-files/spec/model/model-version-key.d.ts +3 -3
- package/dist/application-spec/parse-application-files/spec/model/names/action-name.d.ts +3 -7
- package/dist/application-spec/parse-application-files/spec/model/names/alias-name.d.ts +3 -7
- package/dist/application-spec/parse-application-files/spec/model/names/entity-or-alias-name.d.ts +3 -8
- package/dist/application-spec/parse-application-files/spec/model/names/entity-type-name.d.ts +3 -8
- package/dist/application-spec/parse-application-files/spec/model/names/expression-name.d.ts +3 -6
- package/dist/application-spec/parse-application-files/spec/model/names/instance-name.d.ts +3 -7
- package/dist/application-spec/parse-application-files/spec/model/names/invariant-name.d.ts +3 -3
- package/dist/application-spec/parse-application-files/spec/model/names/shape-property-name.d.ts +3 -11
- package/dist/application-spec/parse-application-files/spec/model/names/violation-type-name.d.ts +3 -3
- package/dist/application-spec/parse-application-files/spec/model/presets.d.ts +6 -29
- package/dist/application-spec/parse-application-files/spec/model/session-data-schema.js +1 -1
- package/dist/application-spec/parse-application-files/spec/sections/actions.d.ts +6 -23
- package/dist/application-spec/parse-application-files/spec/sections/app-metadata.d.ts +3 -18
- package/dist/application-spec/parse-application-files/spec/sections/app-metadata.js +1 -1
- package/dist/application-spec/parse-application-files/spec/sections/application-version.d.ts +3 -7
- package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-form-elements.d.ts +9 -0
- package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-form-elements.js +1 -0
- package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-schema.d.ts +4 -1
- package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant-schema.js +1 -1
- package/dist/application-spec/parse-application-files/spec/sections/assistant/assistant.js +1 -1
- package/dist/application-spec/parse-application-files/spec/sections/data-spec/chunks.d.ts +6 -23
- package/dist/application-spec/parse-application-files/spec/sections/data-spec/custom-data-spec.d.ts +1 -16
- package/dist/application-spec/parse-application-files/spec/sections/data-spec/data-entry-key.d.ts +3 -9
- package/dist/application-spec/parse-application-files/spec/sections/data-spec/data-spec.d.ts +1 -10
- package/dist/application-spec/parse-application-files/spec/sections/data-spec/swatch-data-spec.d.ts +1 -14
- package/dist/application-spec/parse-application-files/spec/sections/state-value.d.ts +3 -7
- package/dist/application-spec/parse-application-files/spec/sections/theme.d.ts +3 -10
- package/dist/application-spec/parse-application-files/spec/sections/transformers.d.ts +4 -11
- package/dist/application-spec/parse-application-files/spec/sections/ui.d.ts +3 -12
- package/dist/application-spec/webhook-boundary.js +1 -1
- package/dist/client/authorized-client.d.ts +5 -2
- package/dist/client/authorized-client.js +1 -1
- package/dist/client/contract.d.ts +56 -5
- package/dist/client/contract.js +1 -1
- package/dist/client/index.d.ts +1 -1
- package/dist/client/local-authorized-client.d.ts +4 -1
- package/dist/client/local-authorized-client.js +1 -1
- package/dist/client/memory-authorized-client.d.ts +5 -1
- package/dist/client/memory-authorized-client.js +1 -1
- package/dist/client/phoenix-api.d.ts +1581 -305
- package/dist/configurator/ConfiguratorApp.js +1 -1
- package/dist/configurator/agent-at-work/AgentAtWorkFallback.d.ts +7 -0
- package/dist/configurator/agent-at-work/AgentAtWorkFallback.js +1 -0
- package/dist/configurator/agent-at-work/AgentAtWorkPage.d.ts +20 -0
- package/dist/configurator/agent-at-work/AgentAtWorkPage.js +1 -0
- package/dist/configurator/agent-at-work/AgentModeBadge.d.ts +11 -0
- package/dist/configurator/agent-at-work/AgentModeBadge.js +1 -0
- package/dist/configurator/agent-at-work/StudioMark.d.ts +8 -0
- package/dist/configurator/agent-at-work/StudioMark.js +1 -0
- package/dist/configurator/agent-at-work/agent-at-work-copy.d.ts +17 -0
- package/dist/configurator/agent-at-work/agent-at-work-copy.js +1 -0
- package/dist/configurator/agent-at-work/agent-at-work-styles.d.ts +23 -0
- package/dist/configurator/agent-at-work/agent-at-work-styles.js +374 -0
- package/dist/configurator/agent-at-work/index.d.ts +3 -0
- package/dist/configurator/agent-at-work/index.js +1 -0
- package/dist/configurator/app-loader-content/DefaultAppLoaderContent.d.ts +2 -0
- package/dist/configurator/app-loader-content/DefaultAppLoaderContent.js +5 -0
- package/dist/configurator/app-loader-content/index.d.ts +1 -0
- package/dist/configurator/app-loader-content/index.js +1 -0
- package/dist/configurator/application-runtime/extensions/selectors.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-annotation.d.ts +34 -0
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-image-view.d.ts +18 -0
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-speech-player.d.ts +69 -0
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-speech-player.js +1 -0
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-system.d.ts +340 -26
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/assistant-system.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/composer-attachments.d.ts +68 -0
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/composer-attachments.js +1 -0
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/graphql-tools.d.ts +58 -9
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/graphql-tools.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/rasterize-image.d.ts +13 -0
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/rasterize-image.js +1 -0
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/speakable-reply.d.ts +7 -0
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/speakable-reply.js +1 -0
- package/dist/configurator/application-runtime/extensions/systems/camera-control-system/camera-control-system.d.ts +44 -1
- package/dist/configurator/application-runtime/extensions/systems/camera-control-system/camera-control-system.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/canvas-system.d.ts +8 -0
- package/dist/configurator/application-runtime/extensions/systems/canvas-system.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/export-system/export-busy-error.d.ts +8 -0
- package/dist/configurator/application-runtime/extensions/systems/export-system/export-busy-error.js +1 -0
- package/dist/configurator/application-runtime/extensions/systems/export-system/export-system.d.ts +26 -1
- package/dist/configurator/application-runtime/extensions/systems/export-system/export-system.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/graphql-system/close-unclosed-braces.d.ts +12 -0
- package/dist/configurator/application-runtime/extensions/systems/graphql-system/close-unclosed-braces.js +1 -0
- package/dist/configurator/application-runtime/extensions/systems/graphql-system/entity-meta.d.ts +82 -55
- package/dist/configurator/application-runtime/extensions/systems/graphql-system/entity-meta.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/graphql-system/graphql-system.d.ts +80 -6
- package/dist/configurator/application-runtime/extensions/systems/graphql-system/graphql-system.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/graphql-system/violations.d.ts +40 -0
- package/dist/configurator/application-runtime/extensions/systems/graphql-system/violations.js +1 -0
- package/dist/configurator/application-runtime/extensions/systems/image-rendering-system/capture-next-frame.d.ts +10 -0
- package/dist/configurator/application-runtime/extensions/systems/image-rendering-system/capture-next-frame.js +1 -0
- package/dist/configurator/application-runtime/extensions/systems/image-rendering-system/image-rendering-system.d.ts +22 -5
- package/dist/configurator/application-runtime/extensions/systems/image-rendering-system/image-rendering-system.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/index.d.ts +7 -2
- package/dist/configurator/application-runtime/extensions/systems/index.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/layout-system/layout-system.d.ts +11 -0
- package/dist/configurator/application-runtime/extensions/systems/layout-system/layout-system.js +1 -1
- package/dist/configurator/application-runtime/extensions/systems/sketching-system/sketching-system.d.ts +5 -5
- package/dist/configurator/common/configurator-interface.d.ts +150 -10
- package/dist/configurator/common/configurator-interface.js +1 -1
- package/dist/configurator/common/index.d.ts +3 -1
- package/dist/configurator/common/index.js +1 -1
- package/dist/configurator/common/use-reset-camera.d.ts +6 -0
- package/dist/configurator/common/use-reset-camera.js +1 -0
- package/dist/configurator/configuration-not-found-page/BuiltInConfigurationNotFoundPage.d.ts +5 -0
- package/dist/configurator/configuration-not-found-page/BuiltInConfigurationNotFoundPage.js +1 -0
- package/dist/configurator/configuration-not-found-page/ConfigurationNotFoundPageElement.d.ts +6 -0
- package/dist/configurator/configuration-not-found-page/ConfigurationNotFoundPageElement.js +1 -0
- package/dist/configurator/configuration-not-found-page/index.d.ts +2 -0
- package/dist/configurator/configuration-not-found-page/index.js +1 -0
- package/dist/configurator/configurator-context/PreviewContextProvider.js +1 -1
- package/dist/configurator/configurator-context/ViewportStateSync.d.ts +2 -2
- package/dist/configurator/configurator-context/ViewportStateSync.js +1 -1
- package/dist/configurator/configurator-context/configurator-hooks/index.d.ts +0 -1
- package/dist/configurator/configurator-context/configurator-hooks/index.js +1 -1
- package/dist/configurator/configurator-context/configurator-hooks/layout-hooks.d.ts +10 -0
- package/dist/configurator/configurator-context/configurator-hooks/layout-hooks.js +1 -1
- package/dist/configurator/configurator-context/index.d.ts +0 -5
- package/dist/configurator/configurator-context/index.js +1 -1
- package/dist/configurator/configurator-error-page/BuiltInConfiguratorErrorPage.d.ts +6 -0
- package/dist/configurator/configurator-error-page/BuiltInConfiguratorErrorPage.js +1 -0
- package/dist/configurator/configurator-error-page/ConfiguratorErrorPageElement.d.ts +7 -0
- package/dist/configurator/configurator-error-page/ConfiguratorErrorPageElement.js +1 -0
- package/dist/configurator/configurator-error-page/index.d.ts +2 -0
- package/dist/configurator/configurator-error-page/index.js +1 -0
- package/dist/configurator/index.d.ts +11 -0
- package/dist/configurator/index.js +1 -1
- package/dist/configurator/pages/ConfiguratorErrorPage.d.ts +0 -1
- package/dist/configurator/pages/ConfiguratorErrorPage.js +1 -1
- package/dist/configurator/pages/ConfiguratorNotFoundPage.js +1 -1
- package/dist/configurator/pages/DefaultConfiguratorLayout.d.ts +3 -2
- package/dist/configurator/pages/DefaultNotAuthenticatedPage.d.ts +8 -0
- package/dist/configurator/pages/DefaultNotAuthenticatedPage.js +1 -0
- package/dist/configurator/pages/DefaultPresetUi.d.ts +7 -0
- package/dist/configurator/pages/DefaultPresetUi.js +1 -0
- package/dist/configurator/pages/ExportingOverlay.d.ts +6 -0
- package/dist/configurator/pages/ExportingOverlay.js +1 -0
- package/dist/configurator/pages/InertRoot.d.ts +10 -0
- package/dist/configurator/pages/InertRoot.js +1 -0
- package/dist/configurator/pages/LoadedConfiguratorDetailPage.js +1 -1
- package/dist/configurator/pages/NewConfiguratorPage.js +1 -1
- package/dist/configurator/pages/PresetCreationErrorPage.d.ts +2 -2
- package/dist/configurator/pages/PresetCreationErrorPage.js +1 -1
- package/dist/configurator/pages/RootPage.js +1 -1
- package/dist/configurator/pages/configurator-layout-name.d.ts +2 -0
- package/dist/configurator/pages/configurator-layout-name.js +1 -0
- package/dist/configurator/pages/default-configurator-elements.d.ts +17 -0
- package/dist/configurator/pages/default-configurator-elements.js +1 -0
- package/dist/configurator/pages/default-elements/built-in-entity-element.d.ts +10 -0
- package/dist/configurator/pages/default-elements/built-in-entity-element.js +1 -0
- package/dist/configurator/pages/default-elements/built-in-layout-element.d.ts +10 -0
- package/dist/configurator/pages/default-elements/built-in-layout-element.js +1 -0
- package/dist/configurator/pages/default-elements/domain-control-elements.d.ts +6 -0
- package/dist/configurator/pages/default-elements/domain-control-elements.js +1 -0
- package/dist/configurator/pages/default-elements/index.d.ts +5 -0
- package/dist/configurator/pages/default-elements/index.js +1 -0
- package/dist/configurator/pages/default-elements/recipe-panel-elements.d.ts +3 -0
- package/dist/configurator/pages/default-elements/recipe-panel-elements.js +1 -0
- package/dist/configurator/pages/default-elements/scene-controls/BuiltInAddEntityFab.d.ts +3 -0
- package/dist/configurator/pages/default-elements/scene-controls/BuiltInAddEntityFab.js +1 -0
- package/dist/configurator/pages/default-elements/scene-controls/BuiltInDeleteEntityFab.d.ts +3 -0
- package/dist/configurator/pages/default-elements/scene-controls/BuiltInDeleteEntityFab.js +1 -0
- package/dist/configurator/pages/default-elements/scene-controls/BuiltInNavigationHotspot.d.ts +3 -0
- package/dist/configurator/pages/default-elements/scene-controls/BuiltInNavigationHotspot.js +1 -0
- package/dist/configurator/pages/default-elements/scene-controls/BuiltInSelectionHotspot.d.ts +3 -0
- package/dist/configurator/pages/default-elements/scene-controls/BuiltInSelectionHotspot.js +1 -0
- package/dist/configurator/pages/default-elements/scene-controls/BuiltInToolMenuFab.d.ts +3 -0
- package/dist/configurator/pages/default-elements/scene-controls/BuiltInToolMenuFab.js +1 -0
- package/dist/configurator/pages/default-elements/scene-controls/index.d.ts +6 -0
- package/dist/configurator/pages/default-elements/scene-controls/index.js +1 -0
- package/dist/configurator/pages/default-elements/scene-controls/scene-control-elements.d.ts +6 -0
- package/dist/configurator/pages/default-elements/scene-controls/scene-control-elements.js +1 -0
- package/dist/configurator/pages/default-elements/sidebar-footer-elements.d.ts +7 -0
- package/dist/configurator/pages/default-elements/sidebar-footer-elements.js +1 -0
- package/dist/configurator/pages/default-elements/toolbar-elements.d.ts +7 -0
- package/dist/configurator/pages/default-elements/toolbar-elements.js +1 -0
- package/dist/configurator/pages/error-boundaries/AgentModeErrorFallback.d.ts +8 -0
- package/dist/configurator/pages/error-boundaries/AgentModeErrorFallback.js +1 -0
- package/dist/configurator/pages/error-boundaries/BuiltInGeneralErrorFallback.d.ts +5 -0
- package/dist/configurator/pages/error-boundaries/BuiltInGeneralErrorFallback.js +1 -0
- package/dist/configurator/pages/error-boundaries/DevContextFallback.d.ts +4 -2
- package/dist/configurator/pages/error-boundaries/DevContextFallback.js +1 -1
- package/dist/configurator/pages/error-boundaries/DevLoadingFallback.d.ts +6 -4
- package/dist/configurator/pages/error-boundaries/DevLoadingFallback.js +1 -1
- package/dist/configurator/pages/error-boundaries/GeneralErrorBoundary.js +1 -1
- package/dist/configurator/pages/error-boundaries/LoadingErrorBoundary.js +1 -1
- package/dist/configurator/pages/error-boundaries/index.d.ts +1 -0
- package/dist/configurator/pages/error-boundaries/index.js +1 -1
- package/dist/configurator/pages/index.d.ts +1 -0
- package/dist/configurator/pages/index.js +1 -1
- package/dist/configurator/pages/provider-slots/ConfiguratorResponsiveProvider.d.ts +12 -0
- package/dist/configurator/pages/provider-slots/ConfiguratorResponsiveProvider.js +1 -0
- package/dist/configurator/pages/provider-slots/ContainerSlotProvider.d.ts +3 -0
- package/dist/configurator/pages/provider-slots/ContainerSlotProvider.js +1 -0
- package/dist/configurator/pages/provider-slots/LoaderSlotProvider.d.ts +3 -0
- package/dist/configurator/pages/provider-slots/LoaderSlotProvider.js +1 -0
- package/dist/configurator/pages/provider-slots/MessageHostSlotProvider.d.ts +3 -0
- package/dist/configurator/pages/provider-slots/MessageHostSlotProvider.js +1 -0
- package/dist/configurator/pages/provider-slots/SceneResourcesSlotProvider.d.ts +3 -0
- package/dist/configurator/pages/provider-slots/SceneResourcesSlotProvider.js +1 -0
- package/dist/configurator/pages/provider-slots/ThemeSlotProvider.d.ts +3 -0
- package/dist/configurator/pages/provider-slots/ThemeSlotProvider.js +1 -0
- package/dist/configurator/pages/provider-slots/configurator-provider-slot-elements.d.ts +3 -0
- package/dist/configurator/pages/provider-slots/configurator-provider-slot-elements.js +1 -0
- package/dist/configurator/pages/provider-slots/index.d.ts +6 -0
- package/dist/configurator/pages/provider-slots/index.js +1 -0
- package/dist/configurator/pages/ui-elements/BuiltInInvalidDeploymentReload.d.ts +2 -0
- package/dist/configurator/pages/ui-elements/BuiltInInvalidDeploymentReload.js +1 -0
- package/dist/configurator/pages/ui-elements/configurator-ui-elements.d.ts +3 -0
- package/dist/configurator/pages/ui-elements/configurator-ui-elements.js +1 -0
- package/dist/configurator/pages/ui-elements/index.d.ts +2 -0
- package/dist/configurator/pages/ui-elements/index.js +1 -0
- package/dist/configurator/preset-screen-elements/PresetDeviceNotSupportedElement.d.ts +4 -0
- package/dist/configurator/preset-screen-elements/PresetDeviceNotSupportedElement.js +1 -0
- package/dist/configurator/preset-screen-elements/PresetPageActionElement.d.ts +4 -0
- package/dist/configurator/preset-screen-elements/PresetPageActionElement.js +1 -0
- package/dist/configurator/preset-screen-elements/index.d.ts +2 -0
- package/dist/configurator/preset-screen-elements/index.js +1 -0
- package/dist/configurator/scene/cameras/CameraPadding.js +1 -1
- package/dist/configurator/scene/index.d.ts +1 -0
- package/dist/configurator/scene/index.js +1 -1
- package/dist/configurator/scene/scene-controls/DeleteEntityFab.js +1 -1
- package/dist/configurator/scene/scene-controls/SelectionHotspot.js +1 -1
- package/dist/configurator/scene/scene-controls/ToolFab.d.ts +4 -0
- package/dist/configurator/scene/scene-controls/ToolFab.js +1 -1
- package/dist/configurator/scene/scene-controls/use-scene-control-tooltip.d.ts +2 -1
- package/dist/configurator/scene/scene-entity/scene-controls/SceneEntityHtmlHotspots.js +1 -1
- package/dist/configurator/toolbar-actions/index.d.ts +3 -0
- package/dist/configurator/toolbar-actions/index.js +1 -0
- package/dist/configurator/toolbar-actions/use-assistant-panel.d.ts +18 -0
- package/dist/configurator/toolbar-actions/use-assistant-panel.js +1 -0
- package/dist/configurator/toolbar-actions/use-measurements.d.ts +35 -0
- package/dist/configurator/toolbar-actions/use-measurements.js +1 -0
- package/dist/configurator/toolbar-actions/use-toolbar-actions.d.ts +100 -0
- package/dist/configurator/toolbar-actions/use-toolbar-actions.js +1 -0
- package/dist/configurator/toolbar-actions/use-toolbar-help.d.ts +7 -0
- package/dist/configurator/toolbar-actions/use-toolbar-help.js +1 -0
- package/dist/configurator/ui/assistant/AssistantChips.d.ts +92 -3
- package/dist/configurator/ui/assistant/AssistantChips.js +1 -1
- package/dist/configurator/ui/assistant/AssistantComposer.d.ts +102 -1
- package/dist/configurator/ui/assistant/AssistantComposer.js +1 -1
- package/dist/configurator/ui/assistant/AssistantMarkdown.d.ts +41 -2
- package/dist/configurator/ui/assistant/AssistantMarkdown.js +1 -1
- package/dist/configurator/ui/assistant/AssistantPanel.d.ts +46 -1
- package/dist/configurator/ui/assistant/AssistantPanel.js +1 -1
- package/dist/configurator/ui/assistant/AssistantThread.d.ts +80 -4
- package/dist/configurator/ui/assistant/AssistantThread.js +1 -1
- package/dist/configurator/ui/assistant/AssistantThreadItemView.d.ts +104 -0
- package/dist/configurator/ui/assistant/AssistantThreadItemView.js +1 -0
- package/dist/configurator/ui/assistant/alert/AssistantAlert.d.ts +45 -0
- package/dist/configurator/ui/assistant/alert/AssistantAlert.js +1 -0
- package/dist/configurator/ui/assistant/alert/index.d.ts +2 -0
- package/dist/configurator/ui/assistant/alert/index.js +1 -0
- package/dist/configurator/ui/assistant/alert/remark-alerts.d.ts +10 -0
- package/dist/configurator/ui/assistant/alert/remark-alerts.js +1 -0
- package/dist/configurator/ui/assistant/annotation/AnnotationBadge.d.ts +43 -0
- package/dist/configurator/ui/assistant/annotation/AnnotationBadge.js +1 -0
- package/dist/configurator/ui/assistant/annotation/AnnotationOverlay.d.ts +5 -0
- package/dist/configurator/ui/assistant/annotation/AnnotationOverlay.js +1 -0
- package/dist/configurator/ui/assistant/annotation/AnnotationPin.d.ts +14 -0
- package/dist/configurator/ui/assistant/annotation/AnnotationPin.js +1 -0
- package/dist/configurator/ui/assistant/annotation/AnnotationViewer.d.ts +12 -0
- package/dist/configurator/ui/assistant/annotation/AnnotationViewer.js +1 -0
- package/dist/configurator/ui/assistant/annotation/MessageAnnotations.d.ts +11 -0
- package/dist/configurator/ui/assistant/annotation/MessageAnnotations.js +1 -0
- package/dist/configurator/ui/assistant/annotation/annotation-layout.d.ts +80 -0
- package/dist/configurator/ui/assistant/annotation/annotation-layout.js +1 -0
- package/dist/configurator/ui/assistant/annotation/editor/AnnotationComment.d.ts +49 -0
- package/dist/configurator/ui/assistant/annotation/editor/AnnotationComment.js +1 -0
- package/dist/configurator/ui/assistant/annotation/editor/AnnotationEditor.d.ts +18 -0
- package/dist/configurator/ui/assistant/annotation/editor/AnnotationEditor.js +1 -0
- package/dist/configurator/ui/assistant/annotation/editor/annotation-drawing.d.ts +22 -0
- package/dist/configurator/ui/assistant/annotation/editor/annotation-drawing.js +1 -0
- package/dist/configurator/ui/assistant/annotation/editor/annotation-pins.d.ts +22 -0
- package/dist/configurator/ui/assistant/annotation/editor/annotation-pins.js +1 -0
- package/dist/configurator/ui/assistant/annotation/editor/flatten-annotation.d.ts +17 -0
- package/dist/configurator/ui/assistant/annotation/editor/flatten-annotation.js +1 -0
- package/dist/configurator/ui/assistant/annotation/editor/index.d.ts +2 -0
- package/dist/configurator/ui/assistant/annotation/editor/index.js +1 -0
- package/dist/configurator/ui/assistant/annotation/index.d.ts +6 -0
- package/dist/configurator/ui/assistant/annotation/index.js +1 -0
- package/dist/configurator/ui/assistant/annotation/prefers-reduced-motion.d.ts +2 -0
- package/dist/configurator/ui/assistant/annotation/prefers-reduced-motion.js +1 -0
- package/dist/configurator/ui/assistant/annotation/use-end-on-unmount.d.ts +6 -0
- package/dist/configurator/ui/assistant/annotation/use-end-on-unmount.js +1 -0
- package/dist/configurator/ui/assistant/assistant-failure.d.ts +20 -7
- package/dist/configurator/ui/assistant/assistant-failure.js +1 -1
- package/dist/configurator/ui/assistant/attachments/MessageImages.d.ts +63 -0
- package/dist/configurator/ui/assistant/attachments/MessageImages.js +1 -0
- package/dist/configurator/ui/assistant/attachments/index.d.ts +2 -0
- package/dist/configurator/ui/assistant/attachments/index.js +1 -0
- package/dist/configurator/ui/assistant/attachments/prepare-image.d.ts +24 -0
- package/dist/configurator/ui/assistant/attachments/prepare-image.js +1 -0
- package/dist/configurator/ui/assistant/composer/composer-frame.d.ts +20 -0
- package/dist/configurator/ui/assistant/composer/composer-frame.js +1 -0
- package/dist/configurator/ui/assistant/composer/index.d.ts +1 -0
- package/dist/configurator/ui/assistant/composer/index.js +1 -0
- package/dist/configurator/ui/assistant/drawing/AssistantDrawing.d.ts +58 -0
- package/dist/configurator/ui/assistant/drawing/AssistantDrawing.js +1 -0
- package/dist/configurator/ui/assistant/drawing/index.d.ts +2 -0
- package/dist/configurator/ui/assistant/drawing/index.js +1 -0
- package/dist/configurator/ui/assistant/drawing/parse-drawing.d.ts +18 -0
- package/dist/configurator/ui/assistant/drawing/parse-drawing.js +1 -0
- package/dist/configurator/ui/assistant/drawing/use-drawing-url.d.ts +14 -0
- package/dist/configurator/ui/assistant/drawing/use-drawing-url.js +1 -0
- package/dist/configurator/ui/assistant/entity-link/AssistantEntityLink.d.ts +36 -2
- package/dist/configurator/ui/assistant/entity-link/AssistantEntityLink.js +1 -1
- package/dist/configurator/ui/assistant/entity-link/entity-link-state.d.ts +1 -1
- package/dist/configurator/ui/assistant/entity-link/index.d.ts +2 -3
- package/dist/configurator/ui/assistant/entity-link/index.js +1 -1
- package/dist/configurator/ui/assistant/form/AssistantForm.d.ts +76 -0
- package/dist/configurator/ui/assistant/form/AssistantForm.js +1 -0
- package/dist/configurator/ui/assistant/form/built-in-form-slots.d.ts +16 -0
- package/dist/configurator/ui/assistant/form/built-in-form-slots.js +1 -0
- package/dist/configurator/ui/assistant/form/compose-answer.d.ts +11 -0
- package/dist/configurator/ui/assistant/form/compose-answer.js +1 -0
- package/dist/configurator/ui/assistant/form/describe-build-errors.d.ts +6 -0
- package/dist/configurator/ui/assistant/form/describe-build-errors.js +1 -0
- package/dist/configurator/ui/assistant/form/form-model.d.ts +37 -0
- package/dist/configurator/ui/assistant/form/form-model.js +1 -0
- package/dist/configurator/ui/assistant/form/form-state.d.ts +4 -0
- package/dist/configurator/ui/assistant/form/form-state.js +1 -0
- package/dist/configurator/ui/assistant/form/index.d.ts +5 -0
- package/dist/configurator/ui/assistant/form/index.js +1 -0
- package/dist/configurator/ui/assistant/form/parse-form-block.d.ts +10 -0
- package/dist/configurator/ui/assistant/form/parse-form-block.js +1 -0
- package/dist/configurator/ui/assistant/form/read-form-attributes.d.ts +13 -0
- package/dist/configurator/ui/assistant/form/read-form-attributes.js +1 -0
- package/dist/configurator/ui/assistant/form/registry/built-in-form-elements.d.ts +29 -0
- package/dist/configurator/ui/assistant/form/registry/built-in-form-elements.js +1 -0
- package/dist/configurator/ui/assistant/form/registry/create-assistant-form-element.d.ts +31 -0
- package/dist/configurator/ui/assistant/form/registry/create-assistant-form-element.js +1 -0
- package/dist/configurator/ui/assistant/form/registry/form-element-definition.d.ts +16 -0
- package/dist/configurator/ui/assistant/form/registry/form-element-definition.js +1 -0
- package/dist/configurator/ui/assistant/form/registry/form-registry.d.ts +31 -0
- package/dist/configurator/ui/assistant/form/registry/form-registry.js +1 -0
- package/dist/configurator/ui/assistant/form/registry/index.d.ts +6 -0
- package/dist/configurator/ui/assistant/form/registry/index.js +1 -0
- package/dist/configurator/ui/assistant/form/registry/use-form-registry.d.ts +8 -0
- package/dist/configurator/ui/assistant/form/registry/use-form-registry.js +1 -0
- package/dist/configurator/ui/assistant/form-elements/FormCard.d.ts +68 -0
- package/dist/configurator/ui/assistant/form-elements/FormCard.js +1 -0
- package/dist/configurator/ui/assistant/form-elements/FormConfirm.d.ts +60 -0
- package/dist/configurator/ui/assistant/form-elements/FormConfirm.js +1 -0
- package/dist/configurator/ui/assistant/form-elements/FormGroup.d.ts +53 -0
- package/dist/configurator/ui/assistant/form-elements/FormGroup.js +1 -0
- package/dist/configurator/ui/assistant/form-elements/FormNumber.d.ts +52 -0
- package/dist/configurator/ui/assistant/form-elements/FormNumber.js +1 -0
- package/dist/configurator/ui/assistant/form-elements/FormOptions.d.ts +57 -0
- package/dist/configurator/ui/assistant/form-elements/FormOptions.js +1 -0
- package/dist/configurator/ui/assistant/form-elements/FormReply.d.ts +49 -0
- package/dist/configurator/ui/assistant/form-elements/FormReply.js +1 -0
- package/dist/configurator/ui/assistant/form-elements/FormSwatch.d.ts +61 -0
- package/dist/configurator/ui/assistant/form-elements/FormSwatch.js +1 -0
- package/dist/configurator/ui/assistant/form-elements/FormText.d.ts +53 -0
- package/dist/configurator/ui/assistant/form-elements/FormText.js +1 -0
- package/dist/configurator/ui/assistant/form-elements/clamp-form-number.d.ts +10 -0
- package/dist/configurator/ui/assistant/form-elements/clamp-form-number.js +1 -0
- package/dist/configurator/ui/assistant/form-elements/form-element-props.d.ts +38 -0
- package/dist/configurator/ui/assistant/form-elements/index.d.ts +9 -0
- package/dist/configurator/ui/assistant/form-elements/index.js +1 -0
- package/dist/configurator/ui/assistant/image-view/ImageView.d.ts +66 -0
- package/dist/configurator/ui/assistant/image-view/ImageView.js +1 -0
- package/dist/configurator/ui/assistant/image-view/index.d.ts +1 -0
- package/dist/configurator/ui/assistant/image-view/index.js +1 -0
- package/dist/configurator/ui/assistant/image-view/use-image-blob.d.ts +7 -0
- package/dist/configurator/ui/assistant/image-view/use-image-blob.js +1 -0
- package/dist/configurator/ui/assistant/index.d.ts +25 -1
- package/dist/configurator/ui/assistant/index.js +1 -1
- package/dist/configurator/ui/assistant/panel/AssistantPanelHeader.d.ts +57 -0
- package/dist/configurator/ui/assistant/panel/AssistantPanelHeader.js +1 -0
- package/dist/configurator/ui/assistant/panel/index.d.ts +1 -0
- package/dist/configurator/ui/assistant/panel/index.js +1 -0
- package/dist/configurator/ui/assistant/popover/AssistantPopover.d.ts +24 -0
- package/dist/configurator/ui/assistant/popover/AssistantPopover.js +1 -0
- package/dist/configurator/ui/assistant/popover/index.d.ts +1 -0
- package/dist/configurator/ui/assistant/popover/index.js +1 -0
- package/dist/configurator/ui/assistant/reference-link/AssistantReferenceLink.d.ts +58 -0
- package/dist/configurator/ui/assistant/reference-link/AssistantReferenceLink.js +1 -0
- package/dist/configurator/ui/assistant/reference-link/assistant-link-target.d.ts +34 -0
- package/dist/configurator/ui/assistant/reference-link/assistant-link-target.js +1 -0
- package/dist/configurator/ui/assistant/reference-link/assistant-reference-details.d.ts +25 -0
- package/dist/configurator/ui/assistant/reference-link/assistant-reference-details.js +1 -0
- package/dist/configurator/ui/assistant/reference-link/index.d.ts +3 -0
- package/dist/configurator/ui/assistant/reference-link/index.js +1 -0
- package/dist/configurator/ui/assistant/reference-link/reference-styles.d.ts +12 -0
- package/dist/configurator/ui/assistant/reference-link/reference-styles.js +1 -0
- package/dist/configurator/ui/assistant/reference-link/use-assistant-reference-details.d.ts +8 -0
- package/dist/configurator/ui/assistant/reference-link/use-assistant-reference-details.js +1 -0
- package/dist/configurator/ui/assistant/resource-image/AssistantImage.d.ts +56 -0
- package/dist/configurator/ui/assistant/resource-image/AssistantImage.js +1 -0
- package/dist/configurator/ui/assistant/resource-image/index.d.ts +3 -0
- package/dist/configurator/ui/assistant/resource-image/index.js +1 -0
- package/dist/configurator/ui/assistant/resource-image/resource-path.d.ts +2 -0
- package/dist/configurator/ui/assistant/resource-image/resource-path.js +1 -0
- package/dist/configurator/ui/assistant/resource-image/use-resource-image-url.d.ts +5 -0
- package/dist/configurator/ui/assistant/resource-image/use-resource-image-url.js +1 -0
- package/dist/configurator/ui/assistant/screenshots/ScreenshotThumbnails.d.ts +43 -0
- package/dist/configurator/ui/assistant/screenshots/ScreenshotThumbnails.js +1 -0
- package/dist/configurator/ui/assistant/screenshots/index.d.ts +3 -0
- package/dist/configurator/ui/assistant/screenshots/index.js +1 -0
- package/dist/configurator/ui/assistant/screenshots/tool-screenshots.d.ts +16 -0
- package/dist/configurator/ui/assistant/screenshots/tool-screenshots.js +1 -0
- package/dist/configurator/ui/assistant/screenshots/use-screenshot-src.d.ts +8 -0
- package/dist/configurator/ui/assistant/screenshots/use-screenshot-src.js +1 -0
- package/dist/configurator/ui/assistant/streamed-markdown.d.ts +15 -2
- package/dist/configurator/ui/assistant/streamed-markdown.js +2 -2
- package/dist/configurator/ui/assistant/thread-items.d.ts +29 -3
- package/dist/configurator/ui/assistant/thread-items.js +1 -1
- package/dist/configurator/ui/assistant/tool-chip.d.ts +19 -9
- package/dist/configurator/ui/assistant/tool-chip.js +1 -1
- package/dist/configurator/ui/assistant/use-assistant-composer.d.ts +88 -0
- package/dist/configurator/ui/assistant/use-assistant-composer.js +2 -0
- package/dist/configurator/ui/assistant/use-assistant-thread.d.ts +52 -0
- package/dist/configurator/ui/assistant/use-assistant-thread.js +1 -0
- package/dist/configurator/ui/assistant/use-follow-stream.js +1 -1
- package/dist/configurator/ui/assistant/use-load-older-on-top.d.ts +22 -0
- package/dist/configurator/ui/assistant/use-load-older-on-top.js +1 -0
- package/dist/configurator/ui/assistant/voice/RecordingBar.d.ts +21 -0
- package/dist/configurator/ui/assistant/voice/RecordingBar.js +1 -0
- package/dist/configurator/ui/assistant/voice/ReplyPlayButton.d.ts +43 -0
- package/dist/configurator/ui/assistant/voice/ReplyPlayButton.js +1 -0
- package/dist/configurator/ui/assistant/voice/index.d.ts +4 -0
- package/dist/configurator/ui/assistant/voice/index.js +1 -0
- package/dist/configurator/ui/assistant/voice/use-voice-recording.d.ts +39 -0
- package/dist/configurator/ui/assistant/voice/use-voice-recording.js +1 -0
- package/dist/configurator/ui/assistant/voice/voice-capture.d.ts +22 -0
- package/dist/configurator/ui/assistant/voice/voice-capture.js +1 -0
- package/dist/configurator/ui/configurator-layout/slots/canvas/GPUAccelerationDisabled.js +1 -1
- package/dist/configurator/ui/configurator-layout/slots/canvas/LayoutCanvas.js +1 -1
- package/dist/configurator/ui/configurator-layout/slots/canvas/SharedCanvas.js +1 -1
- package/dist/configurator/ui/configurator-layout/slots/canvas/WebGLNotSupported.js +1 -1
- package/dist/configurator/ui/configurator-layout/slots/mobile-tabs/use-mobile-tabs.d.ts +1 -1
- package/dist/configurator/ui/configurator-layout/slots/mobile-tabs/use-mobile-tabs.js +1 -1
- package/dist/configurator/ui/configurator-layout/slots/readonly-banner/CloneToEditDialog.js +1 -1
- package/dist/configurator/ui/configurator-layout/slots/services/InvariantViolations.js +1 -1
- package/dist/configurator/ui/configurator-layout/slots/services/Services.js +1 -1
- package/dist/configurator/ui/configurator-layout/slots/sidebar-tabs/use-sidebar-tabs.d.ts +1 -1
- package/dist/configurator/ui/configurator-layout/slots/sidebar-tabs/use-sidebar-tabs.js +1 -1
- package/dist/configurator/ui/configurator-layout/universal/DesktopPreview.js +1 -1
- package/dist/configurator/ui/configurator-layout/universal/MobilePreview.js +1 -1
- package/dist/configurator/ui/configurator-layout/universal/use-layout-scene-safe-area.d.ts +1 -1
- package/dist/configurator/ui/configurator-layout/universal/use-layout-scene-safe-area.js +1 -1
- package/dist/configurator/ui/configurator-layout/universal/use-scene-safe-area.d.ts +1 -1
- package/dist/configurator/ui/index.d.ts +1 -0
- package/dist/configurator/ui/index.js +1 -1
- package/dist/configurator/ui/legacy/chat/MobileChat.js +1 -1
- package/dist/configurator/ui/legacy/layout/common/CommonFinalizeButton.js +1 -1
- package/dist/configurator/ui/legacy/layout/common/CommonSummaryButton.js +1 -1
- package/dist/configurator/ui/legacy/layout/common/CommonTopNavigation.js +1 -1
- package/dist/configurator/ui/legacy/layout/common/ReactiveInterfaceLayout.js +1 -1
- package/dist/configurator/ui/legacy/layout/common/ResponsiveFinalizeButton.js +1 -1
- package/dist/configurator/ui/legacy/layout/common/SummaryReadLayout.js +1 -1
- package/dist/configurator/ui/legacy/layout/simple/SimpleOwnerLayout.js +1 -1
- package/dist/configurator/ui/legacy/layout/simple/SimpleSidebar.js +1 -1
- package/dist/configurator/ui/legacy/layout/simple/SimpleTopNavigation.js +1 -1
- package/dist/configurator/ui/legacy/layout/steps/StepsNavigation.js +1 -1
- package/dist/configurator/ui/legacy/layout/steps/StepsOwnerLayout.js +1 -1
- package/dist/configurator/ui/legacy/layout/steps/StepsSideBar.js +1 -1
- package/dist/configurator/ui/legacy/layout/steps/StepsSidebarFooter.js +1 -1
- package/dist/configurator/ui/legacy/layout/tabs/TabsOwnerLayout.js +1 -1
- package/dist/configurator/ui/legacy/layout/tabs/TabsSidebar.js +1 -1
- package/dist/configurator/ui/legacy/toolbar/common/DimensionUnitSelector.js +1 -1
- package/dist/configurator/ui/legacy/toolbar/common/MeasurementsIndicatorsSwitch.js +1 -1
- package/dist/configurator/ui/legacy/toolbar/desktop-toolbar/FullscreenToolbarAction.js +1 -1
- package/dist/configurator/ui/legacy/toolbar/desktop-toolbar/HelpToolbarAction.js +1 -1
- package/dist/configurator/ui/legacy/toolbar/desktop-toolbar/MeasurementsToolbarAction.js +1 -1
- package/dist/configurator/ui/legacy/toolbar/desktop-toolbar/UndoRedoToolbarGroup.js +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/AppLoader.d.ts +0 -7
- package/dist/configurator/ui/phoenix-layout-elements/AppLoader.js +2 -6
- package/dist/configurator/ui/phoenix-layout-elements/AssistantToolbarButton.js +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/EnterFullscreenToolbarButton.js +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/ExitFullscreenToolbarButton.js +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/HelpToolbarButton.js +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/LanguageMenuAction.js +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/LanguageToolbarButton.js +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/LayoutCustomOwnerUi.d.ts +1 -0
- package/dist/configurator/ui/phoenix-layout-elements/LayoutCustomOwnerUi.js +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/LayoutCustomReadUi.d.ts +1 -0
- package/dist/configurator/ui/phoenix-layout-elements/LayoutCustomReadUi.js +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/MeasurementsMenuAction.js +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/MeasurementsToolbarButton.js +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/RedoToolbarButton.js +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/ShareToolbarButton.js +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/UndoToolbarButton.js +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/header/common/back-button/use-go-back-action.js +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/header/common/horizontal-tabs/DesktopHorizontalTabs.js +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/header/common/step-navigation/DesktopNavigationSteps.d.ts +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/header/common/step-navigation/DesktopNavigationSteps.js +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/header/common/step-navigation/StepsNavigation.d.ts +2 -8
- package/dist/configurator/ui/phoenix-layout-elements/header/common/step-navigation/StepsNavigation.js +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/index.d.ts +8 -1
- package/dist/configurator/ui/phoenix-layout-elements/index.js +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/measurements/DimensionUnitSelector.js +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/measurements/MeasurementsIndicatorsSwitch.js +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/share/ShareModal.js +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/share/use-share.d.ts +7 -8
- package/dist/configurator/ui/phoenix-layout-elements/share/use-share.js +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/sidebar-footer/basic/BasicFinalizeButton.js +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/sidebar-footer/basic/use-basic-sidebar-footer.js +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/sidebar-footer/common/CustomFinalizeButton.js +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/sidebar-footer/common/EnterSummaryButton.js +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/sidebar-footer/common/FinalizeActions.js +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/sidebar-footer/common/NextStepButton.js +1 -1
- package/dist/configurator/ui/phoenix-layout-elements/sidebar-footer/common/PreviousStepButton.js +1 -1
- package/dist/configurator/ui/preset-layout/CategoryPresetUi.js +1 -1
- package/dist/configurator/ui/preset-layout/PresetUi.d.ts +4 -2
- package/dist/configurator/ui/preset-layout/PresetUi.js +1 -1
- package/dist/configurator/ui/preset-layout/index.d.ts +6 -1
- package/dist/configurator/ui/preset-layout/index.js +1 -1
- package/dist/configurator/ui/save-message-snackbars/SaveMessageSnackbars.d.ts +10 -0
- package/dist/configurator/ui/save-message-snackbars/SaveMessageSnackbars.js +1 -0
- package/dist/configurator/ui/save-message-snackbars/index.d.ts +1 -0
- package/dist/configurator/ui/save-message-snackbars/index.js +1 -0
- package/dist/docs/3d-scene/animations-basic.mdx +0 -4
- package/dist/docs/3d-scene/camera-based-hiding.mdx +0 -2
- package/dist/docs/3d-scene/cameras/custom.mdx +4 -4
- package/dist/docs/3d-scene/cameras/fit-during-drag.mdx +0 -4
- package/dist/docs/3d-scene/cameras/locks.mdx +0 -4
- package/dist/docs/3d-scene/cameras/transitions.mdx +0 -2
- package/dist/docs/3d-scene/engraving.mdx +0 -4
- package/dist/docs/3d-scene/materials/custom.mdx +1 -2
- package/dist/docs/3d-scene/materials/inherit.mdx +0 -4
- package/dist/docs/3d-scene/materials/multilevel.mdx +0 -47
- package/dist/docs/3d-scene/materials/override.mdx +0 -4
- package/dist/docs/3d-scene/materials/simple.mdx +0 -4
- package/dist/docs/3d-scene/materials/transformer.mdx +0 -4
- package/dist/docs/3d-scene/materials/transition.mdx +0 -4
- package/dist/docs/3d-scene/materials/transmissive.mdx +0 -4
- package/dist/docs/3d-scene/postprocessing.mdx +0 -2
- package/dist/docs/3d-scene/rendering/basic.mdx +5 -9
- package/dist/docs/3d-scene/rendering/custom-entity.mdx +0 -6
- package/dist/docs/3d-scene/rendering/lights/ambient-light.mdx +0 -2
- package/dist/docs/3d-scene/rendering/lights/directional-light.mdx +0 -2
- package/dist/docs/3d-scene/rendering/lights/point-light.mdx +0 -2
- package/dist/docs/3d-scene/rendering/lights/rect-area-light.mdx +0 -2
- package/dist/docs/3d-scene/rendering/lights/spot-light.mdx +0 -2
- package/dist/docs/3d-scene/rendering/object-groups.mdx +0 -2
- package/dist/docs/3d-scene/rendering/objects.mdx +0 -4
- package/dist/docs/3d-scene/rendering/scene-entity-object.mdx +0 -43
- package/dist/docs/3d-scene/rendering/smma.mdx +0 -2
- package/dist/docs/3d-scene/rendering/soft-shadows.mdx +0 -2
- package/dist/docs/3d-scene/rendering/transformer.mdx +1 -3
- package/dist/docs/complex-use-cases/custom-ui-on-root-level.mdx +0 -1
- package/dist/docs/complex-use-cases/filtered-controls-with-fix-dialog.mdx +19 -19
- package/dist/docs/complex-use-cases/focus-mode.mdx +2 -0
- package/dist/docs/complex-use-cases/navigation-guard.mdx +81 -19
- package/dist/docs/complex-use-cases/navigation-reset-selection.mdx +28 -65
- package/dist/docs/complex-use-cases/navigation-reset-undo.mdx +16 -20
- package/dist/docs/complex-use-cases/sketching.mdx +2 -10
- package/dist/docs/controls/custom.mdx +88 -87
- package/dist/docs/controls/manage-child-entities/entitychildrenlist.mdx +0 -4
- package/dist/docs/controls/nullable-attributes.mdx +0 -2
- package/dist/docs/controls/scene/custom-controls.mdx +7 -8
- package/dist/docs/controls/scene/html-hotspots.mdx +0 -4
- package/dist/docs/controls/scene/object-html-hotspots.mdx +0 -4
- package/dist/docs/controls/select-attribute/cardselect.mdx +0 -4
- package/dist/docs/controls/select-attribute/listselect.mdx +0 -4
- package/dist/docs/controls/select-attribute/select.mdx +0 -4
- package/dist/docs/controls/select-attribute/swatchselect.mdx +0 -4
- package/dist/docs/controls/select-attribute/switchselect.mdx +0 -4
- package/dist/docs/controls/select-attribute/toggleselect.mdx +0 -4
- package/dist/docs/controls/select-child-entity/cardselect.mdx +3 -6
- package/dist/docs/controls/select-child-entity/listselect.mdx +5 -11
- package/dist/docs/controls/select-child-entity/toggleselect.mdx +4 -10
- package/dist/docs/controls/text-input.mdx +90 -19
- package/dist/docs/demos/glass.mdx +0 -4
- package/dist/docs/demos/heater.mdx +0 -10
- package/dist/docs/demos/office-chair.mdx +0 -8
- package/dist/docs/demos/office-desk.mdx +0 -8
- package/dist/docs/demos/ring.mdx +0 -9
- package/dist/docs/dimensions/3d-scene-integration/angle-indicators.mdx +0 -2
- package/dist/docs/dimensions/3d-scene-integration/editable-angle-indicator.mdx +0 -2
- package/dist/docs/dimensions/3d-scene-integration/editable-distance-dimension-indicator.mdx +0 -14
- package/dist/docs/dimensions/3d-scene-integration/editable-offset-indicator.mdx +0 -6
- package/dist/docs/dimensions/3d-scene-integration/editable-size-indicator.mdx +0 -4
- package/dist/docs/dimensions/3d-scene-integration/list-selector-dimension-indicator.mdx +0 -16
- package/dist/docs/dimensions/3d-scene-integration/offset-indicator.mdx +0 -6
- package/dist/docs/dimensions/3d-scene-integration/overlap-offset-demo.mdx +0 -6
- package/dist/docs/dimensions/basic-concepts/dimension-data-unit.mdx +0 -12
- package/dist/docs/dimensions/basic-concepts/dimension-unit-config.mdx +0 -12
- package/dist/docs/dimensions/input-controls/distance-input.mdx +0 -12
- package/dist/docs/dimensions/input-controls/distance-slider.mdx +6 -18
- package/dist/docs/dimensions/selection-controls/list-selector.mdx +0 -14
- package/dist/docs/dimensions/selection-controls/toggle-selector.mdx +0 -14
- package/dist/docs/drag-and-drop/drag-handle.mdx +0 -1
- package/dist/docs/drag-and-drop/hotspot-handle.mdx +0 -1
- package/dist/docs/drag-and-drop/no-selection.mdx +0 -1
- package/dist/docs/drag-and-drop/planes.mdx +0 -3
- package/dist/docs/drag-and-drop/room-planner.mdx +1 -7
- package/dist/docs/drag-and-drop/rotatable.mdx +0 -1
- package/dist/docs/drag-and-drop/snapping/auto-rotation-demo.mdx +0 -2
- package/dist/docs/drag-and-drop/snapping/label-matching-demo.mdx +0 -2
- package/dist/docs/drag-and-drop/snapping/multi-snap-composition-demo.mdx +0 -2
- package/dist/docs/drag-and-drop/snapping/nested-entity-demo.mdx +0 -2
- package/dist/docs/drag-and-drop/snapping/priority-demo.mdx +0 -2
- package/dist/docs/drag-and-drop/snapping/snap-axis-demo.mdx +0 -2
- package/dist/docs/drag-and-drop/snapping/snap-edge-demo.mdx +0 -2
- package/dist/docs/drag-and-drop/snapping/snap-plane-demo.mdx +0 -5
- package/dist/docs/drag-and-drop/snapping/snap-point-demo.mdx +0 -2
- package/dist/docs/drag-and-drop/spatial-constraints/collision-system.mdx +0 -2
- package/dist/docs/drag-and-drop/spatial-constraints/disjoint-and-within.mdx +0 -6
- package/dist/docs/drag-and-drop/spatial-constraints/geometry-override.mdx +0 -4
- package/dist/docs/drag-and-drop/spatial-constraints/multiple-collision-meshes.mdx +0 -4
- package/dist/docs/drag-and-drop/spatial-constraints/touches.mdx +0 -4
- package/dist/docs/drag-and-drop/swap.mdx +0 -4
- package/dist/docs/fabs/basic.mdx +12 -14
- package/dist/docs/fabs/layout.mdx +0 -7
- package/dist/docs/index.json +100 -6
- package/dist/docs/integrations/lifecycle-providers.mdx +0 -12
- package/dist/docs/integrations/onloadprovider.mdx +0 -3
- package/dist/docs/integrations/webcomponent-api/basics.mdx +8 -2
- package/dist/docs/integrations/webcomponent-api/preset-tags.mdx +4 -1
- package/dist/docs/integrations/woocommerce/overview.mdx +4 -2
- package/dist/docs/layouts/custom-layout.mdx +1619 -226
- package/dist/docs/layouts/custom-price.mdx +0 -2
- package/dist/docs/layouts/custom-theme-handler.mdx +0 -4
- package/dist/docs/layouts/gallery/ardent-compressor.mdx +3485 -0
- package/dist/docs/layouts/gallery/corvid-drone.mdx +3399 -0
- package/dist/docs/layouts/gallery/fenwick-window.mdx +2778 -0
- package/dist/docs/layouts/gallery/ferrule-bar-station.mdx +6540 -0
- package/dist/docs/layouts/gallery/kestrel-kettle.mdx +1829 -0
- package/dist/docs/layouts/gallery/nightjar-guitar.mdx +3665 -0
- package/dist/docs/layouts/gallery/sunfold-solar.mdx +2657 -0
- package/dist/docs/layouts/gallery/tidepool-aquascape.mdx +5157 -0
- package/dist/docs/layouts/header/custom.mdx +0 -2
- package/dist/docs/layouts/icon-sets.mdx +0 -6
- package/dist/docs/layouts/phoenix-elements.mdx +0 -4
- package/dist/docs/layouts/phoenix-handlers.mdx +19 -28
- package/dist/docs/layouts/presets/action-and-overlay.mdx +0 -8
- package/dist/docs/layouts/presets/custom.mdx +6 -13
- package/dist/docs/layouts/preview/always-expand.mdx +4 -14
- package/dist/docs/layouts/preview/always.mdx +4 -14
- package/dist/docs/layouts/preview/auto-presets.mdx +4 -14
- package/dist/docs/layouts/preview/auto.mdx +4 -14
- package/dist/docs/layouts/preview/never.mdx +4 -14
- package/dist/docs/layouts/sidebar/in-a-custom-layout.mdx +18 -13
- package/dist/docs/layouts/sidebar/property-page-stack.mdx +0 -2
- package/dist/docs/layouts/sidebar/property-page.mdx +0 -2
- package/dist/docs/layouts/sidebar/tabs.mdx +0 -4
- package/dist/docs/layouts/sidebar-footer/custom.mdx +0 -2
- package/dist/docs/layouts/sidebar-footer/universal.mdx +0 -10
- package/dist/docs/layouts/tool-controls.mdx +0 -1
- package/dist/docs/layouts/toolbar.mdx +0 -4
- package/dist/docs/layouts/universal.mdx +2 -22
- package/dist/docs/other-features/client-side-rendering/camera-padding.mdx +0 -2
- package/dist/docs/other-features/client-side-rendering/custom.mdx +0 -6
- package/dist/docs/other-features/client-side-rendering/declarative.mdx +1 -5
- package/dist/docs/other-features/client-side-rendering/postprocessing.mdx +0 -6
- package/dist/docs/other-features/component-filters.mdx +0 -7
- package/dist/docs/other-features/currency.mdx +5 -6
- package/dist/docs/other-features/domain-actions.mdx +33 -7
- package/dist/docs/other-features/dynamic-component-attachments.mdx +75 -46
- package/dist/docs/other-features/error-5xx.mdx +1 -15
- package/dist/docs/other-features/navigation-hotspot.mdx +2 -5
- package/dist/docs/other-features/not-found-404.mdx +1 -15
- package/dist/docs/other-features/projected-entities.mdx +0 -5
- package/dist/docs/other-features/side-effects.mdx +0 -23
- package/dist/docs/other-features/transformers.mdx +101 -96
- package/dist/docs/other-features/violation-messages.mdx +0 -4
- package/dist/docs/other-features/violation-severity.mdx +2 -3
- package/dist/docs/performance/clone-highlight.mdx +0 -7
- package/dist/docs/performance/dynamic-components.mdx +0 -6
- package/dist/docs/performance/editable-dimension-stress-test.mdx +0 -2
- package/dist/docs/performance/fast-highlight.mdx +0 -7
- package/dist/docs/performance/general.mdx +0 -7
- package/dist/docs/performance/render-isolation.mdx +0 -6
- package/dist/docs/phoenix/admin.mdx +105 -134
- package/dist/docs/phoenix/application-states.mdx +45 -27
- package/dist/docs/phoenix/blender-rendering.mdx +3 -1
- package/dist/docs/phoenix/clerk-sign-in.mdx +1 -1
- package/dist/docs/phoenix/components.mdx +59 -46
- package/dist/docs/phoenix/configurator-interface.mdx +508 -135
- package/dist/docs/phoenix/data-sources.mdx +61 -37
- package/dist/docs/phoenix/deployments.mdx +13 -7
- package/dist/docs/phoenix/domain-model.mdx +26 -16
- package/dist/docs/phoenix/expression-context.mdx +3 -29
- package/dist/docs/phoenix/finalization.mdx +3 -2
- package/dist/docs/phoenix/getting-started.mdx +7 -6
- package/dist/docs/phoenix/integration/authentication-internal.mdx +2 -2
- package/dist/docs/phoenix/integration/finalization-internal.mdx +1 -1
- package/dist/docs/phoenix/layout-slots.mdx +46 -23
- package/dist/docs/phoenix/localization.mdx +74 -59
- package/dist/docs/phoenix/migration-guide.mdx +34 -22
- package/dist/docs/phoenix/phoenix-cli.mdx +130 -36
- package/dist/docs/phoenix/project-structure.mdx +109 -75
- package/dist/docs/phoenix/quickstart.mdx +8 -10
- package/dist/docs/phoenix/sdk-builder-workflow.mdx +27 -31
- package/dist/docs/phoenix/sessions-and-access.mdx +63 -40
- package/dist/docs/phoenix/sharing.mdx +1 -1
- package/dist/docs/phoenix/state-management.mdx +18 -16
- package/dist/docs/phoenix/testing.mdx +13 -0
- package/dist/docs/phoenix/webhooks.mdx +445 -244
- package/dist/docs/recipes-and-delete/delete-entity.mdx +3 -6
- package/dist/docs/recipes-and-delete/dynamic-root-entity.mdx +0 -2
- package/dist/docs/recipes-and-delete/grouped-button.mdx +0 -3
- package/dist/docs/recipes-and-delete/grouped-panel.mdx +0 -3
- package/dist/docs/recipes-and-delete/horizontal.mdx +3 -6
- package/dist/docs/recipes-and-delete/recipe-hierarchy-lists.mdx +0 -3
- package/dist/docs/recipes-and-delete/recipe-hierarchy-selection.mdx +0 -5
- package/dist/docs/recipes-and-delete/replace-dropdown.mdx +3 -6
- package/dist/docs/recipes-and-delete/replace-panel.mdx +0 -7
- package/dist/docs/recipes-and-delete/simple.mdx +3 -6
- package/dist/docs/recipes-and-delete/vertical.mdx +3 -6
- package/dist/docs/relations/aliases.mdx +0 -2
- package/dist/docs/relations/all-of-type.mdx +0 -4
- package/dist/docs/relations/child-nullable.mdx +0 -4
- package/dist/docs/relations/child-required.mdx +0 -2
- package/dist/docs/relations/collection-direct.mdx +0 -4
- package/dist/docs/relations/collection-indirect.mdx +0 -4
- package/dist/docs/relations/collection-multiple.mdx +0 -2
- package/dist/docs/relations/cross-reference.mdx +0 -2
- package/dist/docs/relations/hierarchy.mdx +0 -2
- package/dist/docs/selection-and-highlight/canvas.mdx +0 -1
- package/dist/docs/selection-and-highlight/disable-highlight-per-object.mdx +0 -1
- package/dist/docs/selection-and-highlight/disable-highlight.mdx +0 -1
- package/dist/docs/selection-and-highlight/effects/outline.mdx +0 -3
- package/dist/docs/selection-and-highlight/effects/overlay.mdx +0 -3
- package/dist/docs/selection-and-highlight/fast-emissive-highlight.mdx +0 -3
- package/dist/docs/selection-and-highlight/group-highlighting.mdx +0 -1
- package/dist/docs/selection-and-highlight/hierarchy.mdx +100 -151
- package/dist/docs/selection-and-highlight/hotspots.mdx +2 -1
- package/dist/domain/admin-domain/index.d.ts +2 -2
- package/dist/domain/application/GetApplicationWrapperHandler.d.ts +1 -1
- package/dist/domain/application/GetThemeHandler.d.ts +1 -1
- package/dist/domain/application/GetWebComponentOptions.d.ts +1 -1
- package/dist/domain/application/application-config.d.ts +8 -26
- package/dist/domain/application/assistant/assistant-fields.d.ts +1 -1
- package/dist/domain/application/assistant/assistant-value-type.d.ts +1 -1
- package/dist/domain/application/assistant/build-assistant-lenses.d.ts +1 -2
- package/dist/domain/application/assistant/build-assistant-lenses.js +1 -1
- package/dist/domain/application/assistant/build-assistant-manifest.d.ts +1 -2
- package/dist/domain/application/assistant/build-assistant-manifest.js +1 -1
- package/dist/domain/application/assistant/generate-assistant-prompt.d.ts +3 -1
- package/dist/domain/application/assistant/generate-assistant-prompt.js +1 -1
- package/dist/domain/application/assistant/index.d.ts +0 -3
- package/dist/domain/application/assistant/index.js +1 -1
- package/dist/domain/application/assistant/session-setup/AssistantSetupHandler.d.ts +1 -1
- package/dist/domain/application/assistant/session-setup/apply-assistant-setup.d.ts +1 -1
- package/dist/domain/application/assistant/session-setup/apply-assistant-setup.js +1 -1
- package/dist/domain/application/assistant/session-setup/assistant-setup-manifest.d.ts +5 -5
- package/dist/domain/application/assistant/session-setup/assistant-setup-manifest.js +1 -1
- package/dist/domain/application/assistant/session-setup/create-session-assistant.d.ts +1 -2
- package/dist/domain/application/assistant-field-options.d.ts +1 -1
- package/dist/domain/application/assistant-mutations.d.ts +1 -1
- package/dist/domain/application/assistant-mutations.js +1 -1
- package/dist/domain/application/assistant-recipe-groups.d.ts +4 -2
- package/dist/domain/application/configurator-builder.d.ts +46 -38
- package/dist/domain/application/configurator-builder.js +1 -1
- package/dist/domain/application/create-initial-published-data.d.ts +2 -1
- package/dist/domain/application/index.d.ts +1 -1
- package/dist/domain/application/index.js +1 -1
- package/dist/domain/application/published-data/DataRowValidatorHandler.d.ts +1 -1
- package/dist/domain/application/published-data/FilterPublishedChunksHandler.d.ts +1 -1
- package/dist/domain/application/published-data/MapPublishedChunkedDataHandler.d.ts +1 -1
- package/dist/domain/application/published-data/MapPublishedRevisionDataHandler.d.ts +1 -1
- package/dist/domain/application/published-data/SheetValidatorHandler.d.ts +1 -1
- package/dist/domain/application/standard-properties.js +1 -1
- package/dist/domain/application/web-component-property.d.ts +3 -1
- package/dist/domain/application/web-component-property.js +1 -1
- package/dist/domain/available-system-components/available-system-components.d.ts +11 -0
- package/dist/domain/available-system-components/available-system-components.js +1 -0
- package/dist/domain/available-system-components/index.d.ts +1 -0
- package/dist/domain/available-system-components/index.js +1 -0
- package/dist/domain/core/action/index.d.ts +0 -1
- package/dist/domain/core/action/index.js +1 -1
- package/dist/domain/core/domain.js +1 -1
- package/dist/domain/core/index.d.ts +1 -1
- package/dist/domain/core/index.js +1 -1
- package/dist/domain/core/invariant/violation.d.ts +3 -2
- package/dist/domain/core/schema/extended-schema-validator.js +1 -1
- package/dist/domain/domain-builder/domain-builder.d.ts +46 -0
- package/dist/domain/domain-builder/domain-builder.js +1 -0
- package/dist/domain/domain-builder/index.d.ts +1 -0
- package/dist/domain/domain-builder/index.js +1 -0
- package/dist/domain/domain-context/action-system/action-system.d.ts +32 -6
- package/dist/domain/domain-context/action-system/action-system.js +1 -1
- package/dist/domain/domain-context/domain-context-systems.d.ts +1 -1
- package/dist/domain/domain-context/index.d.ts +1 -1
- package/dist/domain/domain-context/store-system/store-system.d.ts +5 -0
- package/dist/domain/domain-context/store-system/store-system.js +1 -1
- package/dist/domain/domain-context/transformers/context.d.ts +4 -2
- package/dist/domain/domain-context/transformers/when-builder.d.ts +2 -1
- package/dist/domain/domain-context/undo-system.d.ts +28 -1
- package/dist/domain/domain-context/undo-system.js +1 -1
- package/dist/domain/domain-runtime/action-factory.d.ts +11 -0
- package/dist/domain/domain-runtime/application.d.ts +39 -0
- package/dist/domain/domain-runtime/application.js +1 -0
- package/dist/domain/domain-runtime/domain-context/action-context.d.ts +5 -5
- package/dist/domain/domain-runtime/domain-context/selectors.d.ts +3 -0
- package/dist/domain/domain-runtime/domain-context/selectors.js +1 -1
- package/dist/domain/domain-runtime/domain-runtime.d.ts +80 -28
- package/dist/domain/domain-runtime/domain-runtime.js +1 -1
- package/dist/domain/domain-runtime/environment/actions.d.ts +1 -0
- package/dist/domain/domain-runtime/environment/actions.js +1 -1
- package/dist/domain/domain-runtime/environment/initialize.d.ts +1 -1
- package/dist/domain/domain-runtime/environment/initialize.js +1 -1
- package/dist/domain/domain-runtime/environment/selectors.d.ts +2 -0
- package/dist/domain/domain-runtime/environment/selectors.js +1 -1
- package/dist/domain/domain-runtime/environment/types.d.ts +7 -1
- package/dist/domain/domain-runtime/index.d.ts +2 -1
- package/dist/domain/domain-runtime/index.js +1 -1
- package/dist/domain/domain-runtime/spec/create-violation-expressions.d.ts +1 -1
- package/dist/domain/domain-runtime/spec/create-violation-expressions.js +1 -1
- package/dist/domain/domain-runtime/spec/index.d.ts +1 -1
- package/dist/domain/domain-runtime/spec/index.js +1 -1
- package/dist/domain/domain-runtime/spec/initialize.js +1 -1
- package/dist/domain/domain-runtime/spec/resolve-imported-transformers.d.ts +22 -0
- package/dist/domain/domain-runtime/spec/resolve-imported-transformers.js +1 -0
- package/dist/domain/domain-runtime/spec/selectors.d.ts +8 -6
- package/dist/domain/domain-runtime/spec/selectors.js +1 -1
- package/dist/domain/domain-runtime/spec/types.d.ts +4 -2
- package/dist/domain/domain-runtime/web-component/actions.d.ts +3 -0
- package/dist/domain/domain-runtime/web-component/actions.js +1 -1
- package/dist/domain/domain-runtime/web-component/initialize.d.ts +1 -0
- package/dist/domain/domain-runtime/web-component/initialize.js +1 -1
- package/dist/domain/domain-runtime/web-component/selectors.d.ts +2 -0
- package/dist/domain/domain-runtime/web-component/selectors.js +1 -1
- package/dist/domain/domain-runtime/web-component/types.d.ts +6 -3
- package/dist/domain/extensions/export-images/agent-screenshot.d.ts +30 -0
- package/dist/domain/extensions/export-images/agent-screenshot.js +1 -0
- package/dist/domain/extensions/export-images/client-side-image.d.ts +14 -0
- package/dist/domain/extensions/export-images/client-side-image.js +1 -0
- package/dist/domain/extensions/export-images/index.d.ts +3 -0
- package/dist/domain/extensions/export-images/index.js +1 -0
- package/dist/domain/extensions/export-images/save-template-thumbnail.d.ts +14 -0
- package/dist/domain/extensions/export-images/save-template-thumbnail.js +1 -0
- package/dist/domain/extensions/index.d.ts +1 -2
- package/dist/domain/extensions/index.js +1 -1
- package/dist/domain/extensions/scene-entity-delete-fab.d.ts +1 -1
- package/dist/domain/extensions/scene-entity-delete-fab.js +1 -1
- package/dist/domain/index.d.ts +15 -2
- package/dist/domain/index.js +1 -1
- package/dist/domain/mocks/create-mock-domain-runtime.d.ts +14 -0
- package/dist/domain/mocks/create-test-application-config.d.ts +1 -1
- package/dist/domain/spec/application/admin-pages-section.d.ts +29 -0
- package/dist/domain/spec/application/admin-pages-section.js +1 -0
- package/dist/domain/spec/application/admin-pages.d.ts +26 -0
- package/dist/domain/spec/application/admin-pages.js +1 -0
- package/dist/domain/spec/application/admin-states.d.ts +5 -0
- package/dist/domain/spec/application/admin-states.js +1 -0
- package/dist/domain/spec/application/configurator-states.d.ts +8 -0
- package/dist/domain/spec/application/configurator-states.js +1 -0
- package/dist/domain/spec/application/index.d.ts +5 -0
- package/dist/domain/spec/application/index.js +1 -0
- package/dist/domain/spec/components/bindings/index.d.ts +2 -0
- package/dist/domain/spec/components/bindings/index.js +1 -0
- package/dist/domain/spec/components/bindings/read-binding.d.ts +13 -0
- package/dist/domain/spec/components/bindings/read-binding.js +1 -0
- package/dist/domain/spec/components/bindings/write-binding.d.ts +32 -0
- package/dist/domain/spec/components/bindings/write-binding.js +1 -0
- package/dist/domain/spec/components/component-entry.d.ts +90 -0
- package/dist/domain/spec/components/component-entry.js +1 -0
- package/dist/domain/spec/components/component-filter.d.ts +54 -0
- package/dist/domain/spec/components/component-filters.d.ts +10 -0
- package/dist/domain/spec/components/component-filters.js +1 -0
- package/dist/domain/spec/components/components.d.ts +4 -0
- package/dist/domain/spec/components/components.js +1 -0
- package/dist/domain/spec/components/index.d.ts +6 -0
- package/dist/domain/spec/enhanced-json/enhanced-json-value.d.ts +30 -0
- package/dist/domain/spec/enhanced-json/enhanced-json-value.js +1 -0
- package/dist/domain/spec/enhanced-json/index.d.ts +1 -0
- package/dist/domain/spec/enhanced-json/index.js +1 -0
- package/dist/domain/spec/errors/implementation-error-collector.d.ts +21 -0
- package/dist/domain/spec/errors/implementation-error-collector.js +1 -0
- package/dist/domain/spec/expressions/expression.d.ts +49 -0
- package/dist/domain/spec/expressions/expression.js +1 -0
- package/dist/domain/spec/expressions/expressions.d.ts +27 -0
- package/dist/domain/spec/expressions/expressions.js +1 -0
- package/dist/domain/spec/expressions/index.d.ts +5 -0
- package/dist/domain/spec/expressions/memo-eval-plan.d.ts +70 -0
- package/dist/domain/spec/expressions/memo-eval-plan.js +1 -0
- package/dist/domain/spec/expressions/relation-expression-params.d.ts +11 -0
- package/dist/domain/spec/expressions/relation-expression-params.js +1 -0
- package/dist/domain/spec/index.d.ts +4 -0
- package/dist/domain/spec/index.js +1 -0
- package/dist/domain/spec/invariants/index.d.ts +2 -0
- package/dist/domain/spec/invariants/index.js +1 -0
- package/dist/domain/spec/invariants/invariant.d.ts +24 -0
- package/dist/domain/spec/invariants/invariant.js +1 -0
- package/dist/domain/spec/invariants/invariants.d.ts +14 -0
- package/dist/domain/spec/invariants/invariants.js +1 -0
- package/dist/domain/spec/json-schema.d.ts +52 -0
- package/dist/domain/spec/json-schema.js +1 -0
- package/dist/domain/spec/markers/index.d.ts +3 -0
- package/dist/domain/spec/markers/index.js +1 -0
- package/dist/domain/spec/markers/msg-marker.d.ts +28 -0
- package/dist/domain/spec/markers/msg-marker.js +1 -0
- package/dist/domain/spec/model/aliases.d.ts +9 -0
- package/dist/domain/spec/model/aliases.js +1 -0
- package/dist/domain/spec/model/common-types.d.ts +15 -0
- package/dist/domain/spec/model/common-types.js +1 -0
- package/dist/domain/spec/model/defaults.d.ts +33 -0
- package/dist/domain/spec/model/defaults.js +1 -0
- package/dist/domain/spec/model/entity-types.d.ts +8 -0
- package/dist/domain/spec/model/entity-types.js +1 -0
- package/dist/domain/spec/model/index.d.ts +7 -0
- package/dist/domain/spec/model/index.js +1 -0
- package/dist/domain/spec/model/model-version-key.d.ts +3 -0
- package/dist/domain/spec/model/model-version-key.js +1 -0
- package/dist/domain/spec/model/names/action-name.d.ts +7 -0
- package/dist/domain/spec/model/names/action-name.js +1 -0
- package/dist/domain/spec/model/names/alias-name.d.ts +7 -0
- package/dist/domain/spec/model/names/alias-name.js +1 -0
- package/dist/domain/spec/model/names/entity-or-alias-name.d.ts +8 -0
- package/dist/domain/spec/model/names/entity-or-alias-name.js +1 -0
- package/dist/domain/spec/model/names/entity-type-name.d.ts +8 -0
- package/dist/domain/spec/model/names/entity-type-name.js +1 -0
- package/dist/domain/spec/model/names/expression-name.d.ts +6 -0
- package/dist/domain/spec/model/names/expression-name.js +1 -0
- package/dist/domain/spec/model/names/index.d.ts +9 -0
- package/dist/domain/spec/model/names/index.js +1 -0
- package/dist/domain/spec/model/names/instance-name.d.ts +7 -0
- package/dist/domain/spec/model/names/instance-name.js +1 -0
- package/dist/domain/spec/model/names/invariant-name.d.ts +3 -0
- package/dist/domain/spec/model/names/invariant-name.js +1 -0
- package/dist/domain/spec/model/names/shape-property-name.d.ts +11 -0
- package/dist/domain/spec/model/names/shape-property-name.js +1 -0
- package/dist/domain/spec/model/names/violation-type-name.d.ts +3 -0
- package/dist/domain/spec/model/names/violation-type-name.js +1 -0
- package/dist/domain/spec/model/presets.d.ts +30 -0
- package/dist/domain/spec/model/presets.js +1 -0
- package/dist/domain/spec/modules/element-registration.d.ts +125 -0
- package/dist/domain/spec/modules/element-registration.js +1 -0
- package/dist/domain/spec/modules/find-assistant-form-element-errors.d.ts +12 -0
- package/dist/domain/spec/modules/find-assistant-form-element-errors.js +1 -0
- package/dist/domain/spec/modules/index.d.ts +9 -0
- package/dist/domain/spec/modules/index.js +1 -0
- package/dist/domain/spec/modules/merge-expression-modules.d.ts +23 -0
- package/dist/domain/spec/modules/merge-expression-modules.js +1 -0
- package/dist/domain/spec/modules/project-modules.d.ts +32 -0
- package/dist/domain/spec/modules/project-modules.js +1 -0
- package/dist/domain/spec/modules/resolve-action-modules.d.ts +4 -0
- package/dist/domain/spec/modules/resolve-component-optic-modules.d.ts +4 -0
- package/dist/domain/spec/modules/resolve-expression-modules.d.ts +14 -0
- package/dist/domain/spec/modules/resolve-expression-modules.js +1 -0
- package/dist/domain/spec/modules/resolve-invariant-modules.d.ts +6 -0
- package/dist/domain/spec/phx/index.d.ts +1 -0
- package/dist/domain/spec/phx/index.js +1 -0
- package/dist/domain/spec/phx/phx-application-types.d.ts +25 -0
- package/dist/domain/spec/phx/phx-application-types.js +1 -0
- package/dist/domain/spec/phx/phx-domain.d.ts +36 -0
- package/dist/domain/spec/phx/phx-domain.js +1 -0
- package/dist/domain/spec/phx/phx-model.d.ts +24 -0
- package/dist/domain/spec/phx/phx-model.js +1 -0
- package/dist/domain/spec/phx/phx.d.ts +21 -0
- package/dist/domain/spec/phx/phx.js +1 -0
- package/dist/domain/spec/runtime/admin-runtime/admin-runtime.d.ts +32 -0
- package/dist/domain/spec/runtime/admin-runtime/admin-runtime.js +1 -0
- package/dist/domain/spec/runtime/admin-runtime/admin-spec-runtime.d.ts +16 -0
- package/dist/domain/spec/runtime/admin-runtime/admin-spec-runtime.js +1 -0
- package/dist/domain/spec/runtime/admin-runtime/index.d.ts +2 -0
- package/dist/domain/spec/runtime/admin-runtime/index.js +1 -0
- package/dist/domain/spec/runtime/admin-runtime/states-runtime.d.ts +8 -0
- package/dist/domain/spec/runtime/application-runtime.d.ts +62 -0
- package/dist/domain/spec/runtime/application-runtime.js +1 -0
- package/dist/domain/spec/runtime/application-spec-slice.d.ts +73 -0
- package/dist/domain/spec/runtime/application-spec-slice.js +1 -0
- package/dist/domain/spec/runtime/configurator-runtime/configurator-runtime.d.ts +37 -0
- package/dist/domain/spec/runtime/configurator-runtime/configurator-runtime.js +1 -0
- package/dist/domain/spec/runtime/configurator-runtime/configurator-spec-runtime.d.ts +16 -0
- package/dist/domain/spec/runtime/configurator-runtime/configurator-spec-runtime.js +1 -0
- package/dist/domain/spec/runtime/configurator-runtime/index.d.ts +2 -0
- package/dist/domain/spec/runtime/configurator-runtime/index.js +1 -0
- package/dist/domain/spec/runtime/configurator-runtime/states-runtime.d.ts +11 -0
- package/dist/domain/spec/runtime/create-application.d.ts +58 -0
- package/dist/domain/spec/runtime/create-application.js +1 -0
- package/dist/domain/spec/runtime/expressions/expression-runtime.d.ts +57 -0
- package/dist/domain/spec/runtime/expressions/expression-runtime.js +1 -0
- package/dist/domain/spec/runtime/expressions/generate-memo-eval-plan-runtime.d.ts +33 -0
- package/dist/domain/spec/runtime/expressions/generate-memo-eval-plan-runtime.js +1 -0
- package/dist/domain/spec/runtime/expressions/index.d.ts +3 -0
- package/dist/domain/spec/runtime/expressions/index.js +1 -0
- package/dist/domain/spec/runtime/expressions/reflection-constants-runtime.d.ts +11 -0
- package/dist/domain/spec/runtime/expressions/reflection-constants-runtime.js +1 -0
- package/dist/domain/spec/runtime/factory-data/factory-data-runtime.d.ts +44 -0
- package/dist/domain/spec/runtime/factory-data/factory-data-runtime.js +1 -0
- package/dist/domain/spec/runtime/factory-data/index.d.ts +3 -0
- package/dist/domain/spec/runtime/factory-data/index.js +1 -0
- package/dist/domain/spec/runtime/factory-data/recipe-defaults.d.ts +13 -0
- package/dist/domain/spec/runtime/factory-data/recipe-defaults.js +1 -0
- package/dist/domain/spec/runtime/factory-data/static-violations.d.ts +16 -0
- package/dist/domain/spec/runtime/factory-data/static-violations.js +1 -0
- package/dist/domain/spec/runtime/generate-runtime-instance.d.ts +2 -0
- package/dist/domain/spec/runtime/generate-runtime-instance.js +1 -0
- package/dist/domain/spec/runtime/index.d.ts +13 -0
- package/dist/domain/spec/runtime/index.js +1 -0
- package/dist/domain/spec/runtime/migrations/index.d.ts +1 -0
- package/dist/domain/spec/runtime/migrations/index.js +1 -0
- package/dist/domain/spec/runtime/migrations/migration-runtime.d.ts +53 -0
- package/dist/domain/spec/runtime/migrations/migration-runtime.js +1 -0
- package/dist/domain/spec/runtime/model/admin-model-runtime.d.ts +31 -0
- package/dist/domain/spec/runtime/model/admin-model-runtime.js +1 -0
- package/dist/domain/spec/runtime/model/configurator-model-runtime.d.ts +33 -0
- package/dist/domain/spec/runtime/model/configurator-model-runtime.js +1 -0
- package/dist/domain/spec/runtime/model/index.d.ts +2 -0
- package/dist/domain/spec/runtime/model/index.js +1 -0
- package/dist/domain/spec/runtime/optics/build-sdk-optic.d.ts +7 -0
- package/dist/domain/spec/runtime/optics/build-sdk-optic.js +1 -0
- package/dist/domain/spec/runtime/optics/build-user-bound-optic.d.ts +7 -0
- package/dist/domain/spec/runtime/optics/build-user-bound-optic.js +1 -0
- package/dist/domain/spec/runtime/optics/built-component-optic.d.ts +11 -0
- package/dist/domain/spec/runtime/optics/built-component-optic.js +1 -0
- package/dist/domain/spec/runtime/optics/component-optic.d.ts +26 -0
- package/dist/domain/spec/runtime/optics/component-optic.js +1 -0
- package/dist/domain/spec/runtime/optics/index.d.ts +2 -0
- package/dist/domain/spec/runtime/optics/index.js +1 -0
- package/dist/domain/spec/runtime/runtime-reference-store.d.ts +46 -0
- package/dist/domain/spec/runtime/runtime-reference-store.js +1 -0
- package/dist/domain/spec/runtime/sections/actions-runtime.d.ts +14 -0
- package/dist/domain/spec/runtime/sections/assistant-runtime.d.ts +10 -0
- package/dist/domain/spec/runtime/sections/data-runtime.d.ts +13 -0
- package/dist/domain/spec/runtime/sections/index.d.ts +6 -0
- package/dist/domain/spec/runtime/sections/index.js +1 -0
- package/dist/domain/spec/runtime/sections/preset-runtime.d.ts +20 -0
- package/dist/domain/spec/runtime/sections/theme-runtime.d.ts +10 -0
- package/dist/domain/spec/runtime/sections/transformers-runtime.d.ts +19 -0
- package/dist/domain/spec/runtime/spec-code/index.d.ts +2 -0
- package/dist/domain/spec/runtime/spec-code/index.js +1 -0
- package/dist/domain/spec/runtime/spec-code/resolve-spec-code.d.ts +18 -0
- package/dist/domain/spec/runtime/spec-code/resolve-spec-code.js +1 -0
- package/dist/domain/spec/runtime/spec-code/spec-code-module.d.ts +17 -0
- package/dist/domain/spec/runtime/spec-code/spec-code-module.js +1 -0
- package/dist/domain/spec/runtime/spec-runtime.d.ts +21 -0
- package/dist/domain/spec/runtime/spec-runtime.js +1 -0
- package/dist/domain/spec/runtime-spec/decode-runtime-spec.d.ts +9 -0
- package/dist/domain/spec/runtime-spec/decode-runtime-spec.js +1 -0
- package/dist/domain/spec/runtime-spec/encode-runtime-spec.d.ts +8 -0
- package/dist/domain/spec/runtime-spec/encode-runtime-spec.js +1 -0
- package/dist/domain/spec/runtime-spec/encoded-runtime-spec.d.ts +28 -0
- package/dist/domain/spec/runtime-spec/encoded-runtime-spec.js +1 -0
- package/dist/domain/spec/runtime-spec/index.d.ts +4 -0
- package/dist/domain/spec/runtime-spec/index.js +1 -0
- package/dist/domain/spec/runtime-spec/runtime-spec.d.ts +174 -0
- package/dist/domain/spec/runtime-spec/runtime-spec.js +1 -0
- package/dist/domain/spec/runtime-spec/spec-code-id.d.ts +40 -0
- package/dist/domain/spec/runtime-spec/spec-code-id.js +1 -0
- package/dist/domain/spec/sections/actions.d.ts +23 -0
- package/dist/domain/spec/sections/actions.js +1 -0
- package/dist/domain/spec/sections/app-metadata.d.ts +19 -0
- package/dist/domain/spec/sections/app-metadata.js +1 -0
- package/dist/domain/spec/sections/application-version.d.ts +7 -0
- package/dist/domain/spec/sections/application-version.js +1 -0
- package/dist/domain/spec/sections/assistant/assistant-manifest.d.ts +96 -0
- package/dist/domain/spec/sections/assistant/assistant-resolved-manifest.d.ts +135 -0
- package/dist/domain/spec/sections/assistant/assistant-resolved-manifest.js +1 -0
- package/dist/domain/spec/sections/assistant/form/assistant-form-element-name.d.ts +11 -0
- package/dist/domain/spec/sections/assistant/form/assistant-form-element-name.js +8 -0
- package/dist/domain/spec/sections/assistant/form/assistant-form-elements.d.ts +174 -0
- package/dist/domain/spec/sections/assistant/form/assistant-form-elements.js +1 -0
- package/dist/domain/spec/sections/assistant/form/assistant-resource-path.d.ts +10 -0
- package/dist/domain/spec/sections/assistant/form/assistant-resource-path.js +1 -0
- package/dist/domain/spec/sections/assistant/form/index.d.ts +4 -0
- package/dist/domain/spec/sections/assistant/form/index.js +1 -0
- package/dist/domain/spec/sections/assistant/index.d.ts +4 -0
- package/dist/domain/spec/sections/assistant/index.js +1 -0
- package/dist/domain/spec/sections/data-spec/chunks.d.ts +23 -0
- package/dist/domain/spec/sections/data-spec/chunks.js +1 -0
- package/dist/domain/spec/sections/data-spec/custom-data-spec-entry.d.ts +16 -0
- package/dist/domain/spec/sections/data-spec/custom-data-spec-entry.js +1 -0
- package/dist/domain/spec/sections/data-spec/data-entry-key.d.ts +9 -0
- package/dist/domain/spec/sections/data-spec/data-entry-key.js +1 -0
- package/dist/domain/spec/sections/data-spec/index.d.ts +5 -0
- package/dist/domain/spec/sections/data-spec/index.js +1 -0
- package/dist/domain/spec/sections/data-spec/parsed-data-spec-entries.d.ts +10 -0
- package/dist/domain/spec/sections/data-spec/parsed-data-spec-entries.js +1 -0
- package/dist/domain/spec/sections/data-spec/swatch-data-spec-entry.d.ts +14 -0
- package/dist/domain/spec/sections/data-spec/swatch-data-spec-entry.js +1 -0
- package/dist/domain/spec/sections/index.d.ts +10 -0
- package/dist/domain/spec/sections/index.js +1 -0
- package/dist/domain/spec/sections/infra/acl.d.ts +12 -0
- package/dist/domain/spec/sections/infra/acl.js +1 -0
- package/dist/domain/spec/sections/infra/index.d.ts +3 -0
- package/dist/domain/spec/sections/infra/index.js +1 -0
- package/dist/domain/spec/sections/infra/resource-entry.d.ts +46 -0
- package/dist/domain/spec/sections/infra/resource-entry.js +1 -0
- package/dist/domain/spec/sections/infra/resources-config.d.ts +10 -0
- package/dist/domain/spec/sections/infra/resources-config.js +1 -0
- package/dist/domain/spec/sections/state-value.d.ts +7 -0
- package/dist/domain/spec/sections/state-value.js +1 -0
- package/dist/domain/spec/sections/theme.d.ts +10 -0
- package/dist/domain/spec/sections/theme.js +1 -0
- package/dist/domain/spec/sections/transformers.d.ts +15 -0
- package/dist/domain/spec/sections/transformers.js +1 -0
- package/dist/domain/spec/sections/ui.d.ts +12 -0
- package/dist/domain/spec/sections/ui.js +1 -0
- package/dist/domain/system-components/child-entity-selection.js +1 -1
- package/dist/domain/system-components/common/scene-entity-control-schema.d.ts +3 -0
- package/dist/domain/system-components/common/scene-entity-control-schema.js +1 -1
- package/dist/domain/system-components/phoenix-entity-elements/child-entity-card-selector.d.ts +2 -3
- package/dist/domain/system-components/phoenix-entity-elements/child-entity-list-selector.d.ts +2 -3
- package/dist/domain/system-components/phoenix-entity-elements/child-entity-toggle-selector.d.ts +2 -3
- package/dist/domain/system-definitions.js +1 -1
- package/dist/domain/utils/index.d.ts +2 -0
- package/dist/domain/utils/index.js +1 -0
- package/dist/editor/Editor.d.ts +12 -0
- package/dist/editor/Editor.js +1 -1
- package/dist/editor/EditorMode.d.ts +2 -0
- package/dist/editor/EditorMode.js +1 -1
- package/dist/editor/agent-mode/AgentModeBridge.d.ts +10 -0
- package/dist/editor/agent-mode/AgentModeBridge.js +1 -0
- package/dist/editor/agent-mode/agent-at-work-fonts.d.ts +2 -0
- package/dist/editor/agent-mode/agent-at-work-fonts.js +1 -0
- package/dist/editor/console-reporter/BrowserConsoleReporter.js +1 -1
- package/dist/editor/console-reporter/console-capture.d.ts +20 -0
- package/dist/editor/console-reporter/console-capture.js +1 -0
- package/dist/editor/domain-editors/DomainSpecContext.js +1 -1
- package/dist/editor/domain-editors/apply-spec-update.d.ts +10 -2
- package/dist/editor/domain-editors/apply-spec-update.js +1 -1
- package/dist/editor/domain-editors/use-implementation-files.d.ts +6 -14
- package/dist/editor/domain-editors/use-implementation-files.js +1 -1
- package/dist/editor/graphql/GraphQLPanel.js +1 -1
- package/dist/editor/index.d.ts +1 -0
- package/dist/editor/index.js +1 -1
- package/dist/editor/mocks/CreateMockYaml.js +2 -2
- package/dist/editor/mocks/EditorMockContext.d.ts +2 -0
- package/dist/editor/mocks/EditorMockContext.js +1 -1
- package/dist/editor/screenshot/ScreenshotHandler.js +1 -1
- package/dist/editor/variants/VariantAnswerFooter.d.ts +8 -1
- package/dist/editor/variants/VariantAnswerFooter.js +1 -1
- package/dist/editor/variants/VariantPageUnavailable.d.ts +5 -0
- package/dist/editor/variants/VariantPageUnavailable.js +1 -0
- package/dist/editor/variants/VariantPreviewHandler.js +1 -1
- package/dist/editor/variants/variant-preview-fonts.d.ts +2 -0
- package/dist/editor/variants/variant-preview-fonts.js +1 -0
- package/dist/editor/variants/variant-preview-styles.d.ts +40 -48
- package/dist/editor/variants/variant-preview-styles.js +493 -1
- package/dist/extras/cognito/CognitoSignInPage.d.ts +2 -0
- package/dist/extras/cognito/CognitoSignInPage.js +1 -0
- package/dist/extras/cognito/index.d.ts +1 -0
- package/dist/extras/cognito/index.js +1 -0
- package/dist/globals/index.d.ts +2 -0
- package/dist/i18n/locales/cs/messages.js +1 -1
- package/dist/i18n/locales/da/messages.js +1 -1
- package/dist/i18n/locales/de/messages.js +1 -1
- package/dist/i18n/locales/de-AT/messages.js +1 -1
- package/dist/i18n/locales/en/messages.js +1 -1
- package/dist/i18n/locales/en-AU/messages.js +1 -1
- package/dist/i18n/locales/en-GB/messages.js +1 -1
- package/dist/i18n/locales/es/messages.js +1 -1
- package/dist/i18n/locales/fr/messages.js +1 -1
- package/dist/i18n/locales/hu/messages.js +1 -1
- package/dist/i18n/locales/it/messages.js +1 -1
- package/dist/i18n/locales/nl/messages.js +1 -1
- package/dist/i18n/locales/pl/messages.js +1 -1
- package/dist/i18n/locales/pt/messages.js +1 -1
- package/dist/i18n/locales/ro/messages.js +1 -1
- package/dist/i18n/locales/sk/messages.js +1 -1
- package/dist/i18n/locales/tr/messages.js +1 -1
- package/dist/i18n/merge-catalogs.d.ts +4 -1
- package/dist/i18n/merge-catalogs.js +1 -1
- package/dist/legacy/domain-cli/gen/configurator-builder.js +5 -4
- package/dist/legacy/domain-cli/utils/cache.d.ts +1 -1
- package/dist/legacy/domain-cli/utils/cache.js +1 -1
- package/dist/legacy/domain-spec/__generated/domain-schema.d.ts +97 -80
- package/dist/legacy/domain-spec/spec/domain-spec.js +1 -1
- package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/agents/claude-md.d.ts +1 -1
- package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/agents/cursor-rules.d.ts +1 -1
- package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/agents/shared-sdk-content.d.ts +1 -1
- package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/agents/shared-sdk-content.js +13 -2
- package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/frontend-admin.js +15 -14
- package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/frontend-configurator.js +14 -12
- package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/frontend-embedded-admin.js +14 -13
- package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/frontend-embedded-configurator.js +13 -11
- package/dist/legacy/phoenix-cli/project-gen/generators/file-templates/i18n-index.js +3 -3
- package/dist/legacy/phoenix-cli/services/webhook-service/transport.js +1 -1
- package/dist/legacy/phoenix-cli/services/webhook-service/tunnel.d.ts +1 -0
- package/dist/legacy/phoenix-cli/services/webhook-service/tunnel.js +1 -1
- package/dist/legacy/webhook-cli/lambda-local/index.js +1 -1
- package/dist/legacy/webhook-cli/lib/webhook-boundary.js +1 -1
- package/dist/phoenix/application-spec/application-spec-builder.d.ts +2 -4
- package/dist/phoenix/application-spec/application-spec-builder.js +1 -1
- package/dist/phoenix/application-spec/generate-application-spec-project.d.ts +3 -3
- package/dist/phoenix/application-spec/generate-application-spec-project.js +2 -2
- package/dist/phoenix/application-spec/generate-application-spec-story.js +2 -2
- package/dist/phoenix/application-spec/generate-project-files.d.ts +4 -4
- package/dist/phoenix/application-spec/generate-project-files.js +1 -1
- package/dist/phoenix/application-spec/index.d.ts +3 -0
- package/dist/phoenix/application-spec/index.js +1 -1
- package/dist/phoenix/application-spec/project-files.d.ts +8 -2
- package/dist/phoenix/application-spec/project-files.js +1 -1
- package/dist/phoenix/application-spec/read-spec-project.d.ts +1 -2
- package/dist/phoenix/application-spec/read-spec-project.js +1 -1
- package/dist/phoenix/application-spec/resolve-deployment-data.d.ts +12 -0
- package/dist/phoenix/application-spec/resolve-deployment-data.js +2 -2
- package/dist/phoenix/bin.d.ts +2 -0
- package/dist/phoenix/bin.js +2 -0
- package/dist/phoenix/check-configs/built-in-eslint-config.d.ts +9 -0
- package/dist/phoenix/check-configs/built-in-eslint-config.js +1 -0
- package/dist/phoenix/check-configs/eslint-config.d.ts +10 -0
- package/dist/phoenix/check-configs/eslint-config.js +1 -0
- package/dist/phoenix/check-configs/index.d.ts +8 -0
- package/dist/phoenix/check-configs/index.js +1 -0
- package/dist/phoenix/check-configs/typescript-project.d.ts +5 -0
- package/dist/phoenix/check-configs/typescript-project.js +1 -0
- package/dist/phoenix/cli.d.ts +0 -1
- package/dist/phoenix/cli.js +1 -2
- package/dist/phoenix/commands/account/index.d.ts +1 -0
- package/dist/phoenix/commands/account/index.js +1 -0
- package/dist/phoenix/commands/account/whoami.d.ts +4 -0
- package/dist/phoenix/commands/account/whoami.js +3 -0
- package/dist/phoenix/commands/activate-deployment.js +1 -1
- package/dist/phoenix/commands/build.d.ts +2 -1
- package/dist/phoenix/commands/build.js +1 -1
- package/dist/phoenix/commands/changelog.js +1 -1
- package/dist/phoenix/commands/check.js +1 -1
- package/dist/phoenix/commands/clean.d.ts +2 -1
- package/dist/phoenix/commands/clean.js +1 -1
- package/dist/phoenix/commands/cleanup-environment.js +2 -2
- package/dist/phoenix/commands/create-environment.js +1 -1
- package/dist/phoenix/commands/data.js +1 -1
- package/dist/phoenix/commands/deploy.js +3 -3
- package/dist/phoenix/commands/deployment-build-envs-command.js +1 -1
- package/dist/phoenix/commands/deps/deps.d.ts +73 -0
- package/dist/phoenix/commands/deps/deps.js +3 -0
- package/dist/phoenix/commands/deps/index.d.ts +1 -0
- package/dist/phoenix/commands/deps/index.js +1 -0
- package/dist/phoenix/commands/deps/sdk-manifest.d.ts +12 -0
- package/dist/phoenix/commands/deps/sdk-manifest.js +1 -0
- package/dist/phoenix/commands/dev.d.ts +2 -1
- package/dist/phoenix/commands/dev.js +4 -5
- package/dist/phoenix/commands/docs.js +1 -1
- package/dist/phoenix/commands/feedback.js +1 -1
- package/dist/phoenix/commands/finish-deployment-command.js +1 -1
- package/dist/phoenix/commands/fix.js +1 -1
- package/dist/phoenix/commands/index.d.ts +2 -0
- package/dist/phoenix/commands/index.js +1 -1
- package/dist/phoenix/commands/init.d.ts +17 -5
- package/dist/phoenix/commands/init.js +1 -1
- package/dist/phoenix/commands/inspect-assets.js +1 -1
- package/dist/phoenix/commands/link.js +1 -1
- package/dist/phoenix/commands/list-environments.js +1 -1
- package/dist/phoenix/commands/login.d.ts +9 -3
- package/dist/phoenix/commands/login.js +3 -3
- package/dist/phoenix/commands/logout.js +1 -1
- package/dist/phoenix/commands/prepare-deployment-command.js +2 -2
- package/dist/phoenix/commands/prepare-local-environment-command.js +1 -1
- package/dist/phoenix/commands/prettier.js +1 -1
- package/dist/phoenix/commands/register-deployment.js +1 -1
- package/dist/phoenix/commands/scene.js +1 -1
- package/dist/phoenix/commands/screenshot.js +1 -1
- package/dist/phoenix/commands/state.js +1 -1
- package/dist/phoenix/commands/story-build.js +3 -3
- package/dist/phoenix/commands/story-create.js +1 -1
- package/dist/phoenix/commands/story-dev.js +2 -2
- package/dist/phoenix/commands/sync.d.ts +2 -1
- package/dist/phoenix/commands/sync.js +1 -1
- package/dist/phoenix/commands/unlink.js +1 -1
- package/dist/phoenix/commands/variants.js +1 -1
- package/dist/phoenix/editor-server/commands-router.js +1 -1
- package/dist/phoenix/editor-server/editor-server.d.ts +2 -13
- package/dist/phoenix/editor-server/editor-server.js +1 -1
- package/dist/phoenix/editor-server/spec-router.js +1 -1
- package/dist/phoenix/editor-server/trpc.d.ts +2 -12
- package/dist/phoenix/lingui/index.d.ts +1 -0
- package/dist/phoenix/lingui/index.js +1 -0
- package/dist/phoenix/lingui/lingui.d.ts +18 -0
- package/dist/phoenix/lingui/lingui.js +1 -0
- package/dist/phoenix/scripts/docs-utils.js +1 -1
- package/dist/phoenix/services/application-spec-project-watcher.d.ts +16 -9
- package/dist/phoenix/services/application-spec-project-watcher.js +3 -3
- package/dist/phoenix/services/cli-credentials.d.ts +9 -6
- package/dist/phoenix/services/cli-credentials.js +2 -2
- package/dist/phoenix/services/cli-exit.d.ts +5 -0
- package/dist/phoenix/services/cli-exit.js +1 -0
- package/dist/phoenix/services/deployment/deployment-preparation-service.d.ts +28 -0
- package/dist/phoenix/services/deployment/deployment-preparation-service.js +1 -0
- package/dist/phoenix/services/deployment/generated-env-markers.d.ts +8 -0
- package/dist/phoenix/services/deployment/generated-env-markers.js +1 -0
- package/dist/phoenix/services/deployment/index.d.ts +2 -0
- package/dist/phoenix/services/deployment/index.js +1 -0
- package/dist/phoenix/services/dev-experience/dev-experience.d.ts +31 -0
- package/dist/phoenix/services/dev-experience/dev-experience.js +1 -0
- package/dist/phoenix/services/dev-experience/index.d.ts +3 -0
- package/dist/phoenix/services/dev-experience/index.js +1 -0
- package/dist/phoenix/services/dev-experience/read-explicit-editor-setting.d.ts +7 -0
- package/dist/phoenix/services/dev-experience/read-explicit-editor-setting.js +1 -0
- package/dist/phoenix/services/dev-experience/regenerated-page-experience.d.ts +24 -0
- package/dist/phoenix/services/dev-experience/regenerated-page-experience.js +1 -0
- package/dist/phoenix/services/index.d.ts +7 -2
- package/dist/phoenix/services/index.js +1 -1
- package/dist/phoenix/services/lingui-watcher.js +1 -1
- package/dist/phoenix/services/phoenix-pubsub.d.ts +4 -0
- package/dist/phoenix/services/phoenix-regions.d.ts +1 -1
- package/dist/phoenix/services/phoenix-regions.js +1 -1
- package/dist/phoenix/services/phoenix-store.d.ts +3 -0
- package/dist/phoenix/services/phoenix-store.js +1 -1
- package/dist/phoenix/services/prepare-development-environment.js +1 -1
- package/dist/phoenix/services/session/editor-server-handle.d.ts +5 -0
- package/dist/phoenix/services/session/editor-server-handle.js +1 -0
- package/dist/phoenix/services/session/index.d.ts +2 -0
- package/dist/phoenix/services/session/index.js +1 -0
- package/dist/phoenix/services/session/phoenix-application.d.ts +83 -0
- package/dist/phoenix/services/session/phoenix-application.js +2 -0
- package/dist/phoenix/services/signed-in-development-environment.js +1 -1
- package/dist/phoenix/services/source-archive.d.ts +2 -0
- package/dist/phoenix/services/source-archive.js +1 -1
- package/dist/phoenix/services/swc.d.ts +5 -4
- package/dist/phoenix/services/swc.js +2 -2
- package/dist/phoenix/services/telemetry/amplitude-telemetry-transport.d.ts +9 -0
- package/dist/phoenix/services/telemetry/amplitude-telemetry-transport.js +1 -0
- package/dist/phoenix/services/telemetry/index.d.ts +3 -0
- package/dist/phoenix/services/telemetry/index.js +1 -0
- package/dist/phoenix/services/telemetry/telemetry-client.d.ts +25 -0
- package/dist/phoenix/services/telemetry/telemetry-client.js +1 -0
- package/dist/phoenix/services/telemetry/telemetry-command.d.ts +2 -0
- package/dist/phoenix/services/telemetry/telemetry-command.js +1 -0
- package/dist/phoenix/services/telemetry/telemetry-event.d.ts +44 -0
- package/dist/phoenix/services/telemetry/telemetry-event.js +1 -0
- package/dist/phoenix/services/telemetry/telemetry-state.d.ts +25 -0
- package/dist/phoenix/services/telemetry/telemetry-state.js +2 -0
- package/dist/phoenix/services/vite-config.d.ts +2 -1
- package/dist/phoenix/services/vite-config.js +1 -1
- package/dist/phoenix/services/webhook-service/transport.js +1 -1
- package/dist/phoenix/services/webhook-service/tunnel.d.ts +1 -0
- package/dist/phoenix/services/webhook-service/tunnel.js +1 -1
- package/dist/phoenix/utils/index.d.ts +4 -2
- package/dist/phoenix/utils/index.js +1 -1
- package/dist/phoenix/utils/node-version/index.d.ts +1 -0
- package/dist/phoenix/utils/node-version/index.js +1 -0
- package/dist/phoenix/utils/node-version/supported-node-version.d.ts +12 -0
- package/dist/phoenix/utils/node-version/supported-node-version.js +4 -0
- package/dist/phoenix/utils/package-info.d.ts +0 -9
- package/dist/phoenix/utils/package-info.js +1 -1
- package/dist/phoenix/utils/package-manager/index.d.ts +2 -0
- package/dist/phoenix/utils/package-manager/index.js +1 -0
- package/dist/phoenix/utils/package-manager/package-manager-commands.d.ts +19 -0
- package/dist/phoenix/utils/package-manager/package-manager-commands.js +1 -0
- package/dist/phoenix/utils/package-manager/pnpm-project.d.ts +9 -0
- package/dist/phoenix/utils/package-manager/pnpm-project.js +1 -0
- package/dist/phoenix/utils/run-command.d.ts +11 -0
- package/dist/phoenix/utils/run-command.js +1 -1
- package/dist/phoenix/utils/sdk-tool/index.d.ts +1 -0
- package/dist/phoenix/utils/sdk-tool/index.js +1 -0
- package/dist/phoenix/utils/sdk-tool/resolve-sdk-tool-bin.d.ts +15 -0
- package/dist/phoenix/utils/sdk-tool/resolve-sdk-tool-bin.js +1 -0
- package/dist/react-sdk/application-runtime/common-services/analytics/analytics-service.d.ts +1 -1
- package/dist/react-sdk/application-runtime/common-services/analytics/frontend-analytics.d.ts +52 -0
- package/dist/react-sdk/application-runtime/common-services/analytics/index.d.ts +1 -0
- package/dist/react-sdk/application-runtime/common-services/analytics/index.js +1 -1
- package/dist/react-sdk/application-runtime/common-services/initialize.d.ts +2 -2
- package/dist/react-sdk/application-runtime/domain-application-context/chat-system.d.ts +1 -1
- package/dist/react-sdk/application-runtime/hooks/index.d.ts +2 -0
- package/dist/react-sdk/application-runtime/hooks/index.js +1 -1
- package/dist/react-sdk/application-runtime/hooks/loading/index.d.ts +5 -0
- package/dist/react-sdk/application-runtime/hooks/loading/index.js +1 -0
- package/dist/react-sdk/application-runtime/hooks/loading/loader-host-context.d.ts +11 -0
- package/dist/react-sdk/application-runtime/hooks/loading/loader-host-context.js +1 -0
- package/dist/react-sdk/application-runtime/hooks/loading/use-is-awaiting-loading-phase.d.ts +8 -0
- package/dist/react-sdk/application-runtime/hooks/loading/use-is-awaiting-loading-phase.js +1 -0
- package/dist/react-sdk/application-runtime/hooks/loading/use-is-loader-hosted.d.ts +7 -0
- package/dist/react-sdk/application-runtime/hooks/loading/use-is-loader-hosted.js +1 -0
- package/dist/react-sdk/application-runtime/hooks/loading/use-loading-actions.d.ts +9 -0
- package/dist/react-sdk/application-runtime/hooks/loading/use-loading-actions.js +1 -0
- package/dist/react-sdk/application-runtime/hooks/loading/use-loading-application.d.ts +24 -0
- package/dist/react-sdk/application-runtime/hooks/loading/use-loading-application.js +1 -0
- package/dist/react-sdk/application-runtime/hooks/responsive/index.d.ts +3 -0
- package/dist/react-sdk/application-runtime/hooks/responsive/index.js +1 -0
- package/dist/react-sdk/application-runtime/hooks/responsive/use-responsive-actions.d.ts +9 -0
- package/dist/react-sdk/application-runtime/hooks/responsive/use-responsive-actions.js +1 -0
- package/dist/react-sdk/application-runtime/hooks/responsive/use-responsive-application.d.ts +28 -0
- package/dist/react-sdk/application-runtime/hooks/responsive/use-responsive-application.js +1 -0
- package/dist/react-sdk/application-runtime/hooks/responsive/use-responsive-state.d.ts +10 -0
- package/dist/react-sdk/application-runtime/hooks/responsive/use-responsive-state.js +1 -0
- package/dist/react-sdk/application-runtime/hooks/responsive/use-responsive-store.d.ts +24 -0
- package/dist/react-sdk/application-runtime/hooks/responsive/use-responsive-store.js +1 -0
- package/dist/react-sdk/application-runtime/hooks/use-access-service.d.ts +5 -0
- package/dist/react-sdk/application-runtime/hooks/use-access-service.js +1 -1
- package/dist/react-sdk/application-runtime/hooks/use-environment.d.ts +7 -0
- package/dist/react-sdk/application-runtime/hooks/use-environment.js +1 -1
- package/dist/react-sdk/application-runtime/hooks/use-phoenix-element-slots.d.ts +2 -1
- package/dist/react-sdk/application-runtime/hooks/use-web-component-readonly-sync.d.ts +4 -11
- package/dist/react-sdk/application-runtime/hooks/use-web-component-readonly-sync.js +1 -1
- package/dist/react-sdk/application-runtime/hooks/use-web-component.d.ts +5 -0
- package/dist/react-sdk/application-runtime/hooks/use-web-component.js +1 -1
- package/dist/react-sdk/application-runtime/host-properties/actions.d.ts +15 -0
- package/dist/react-sdk/application-runtime/host-properties/actions.js +1 -0
- package/dist/react-sdk/application-runtime/host-properties/connect-host-properties.d.ts +30 -0
- package/dist/react-sdk/application-runtime/host-properties/connect-host-properties.js +1 -0
- package/dist/react-sdk/application-runtime/host-properties/domain-host-properties.d.ts +7 -0
- package/dist/react-sdk/application-runtime/host-properties/domain-host-properties.js +1 -0
- package/dist/react-sdk/application-runtime/host-properties/host-property-descriptors.d.ts +21 -0
- package/dist/react-sdk/application-runtime/host-properties/host-property-descriptors.js +1 -0
- package/dist/react-sdk/application-runtime/host-properties/host-property-scopes.d.ts +42 -0
- package/dist/react-sdk/application-runtime/host-properties/host-property-scopes.js +1 -0
- package/dist/react-sdk/application-runtime/host-properties/index.d.ts +8 -0
- package/dist/react-sdk/application-runtime/host-properties/index.js +1 -0
- package/dist/react-sdk/application-runtime/host-properties/initialize.d.ts +7 -0
- package/dist/react-sdk/application-runtime/host-properties/initialize.js +1 -0
- package/dist/react-sdk/application-runtime/host-properties/selectors.d.ts +54 -0
- package/dist/react-sdk/application-runtime/host-properties/selectors.js +1 -0
- package/dist/react-sdk/application-runtime/host-properties/types.d.ts +18 -0
- package/dist/react-sdk/application-runtime/host-properties/types.js +1 -0
- package/dist/react-sdk/application-runtime/index.d.ts +3 -0
- package/dist/react-sdk/application-runtime/integration/initialize.d.ts +7 -6
- package/dist/react-sdk/application-runtime/integration/initialize.js +1 -1
- package/dist/react-sdk/application-runtime/integration/selectors.d.ts +11 -2
- package/dist/react-sdk/application-runtime/integration/selectors.js +1 -1
- package/dist/react-sdk/application-runtime/integration/types.d.ts +5 -2
- package/dist/react-sdk/application-runtime/loading/actions.d.ts +45 -0
- package/dist/react-sdk/application-runtime/loading/actions.js +1 -0
- package/dist/react-sdk/application-runtime/loading/index.d.ts +4 -0
- package/dist/react-sdk/application-runtime/loading/index.js +1 -0
- package/dist/react-sdk/application-runtime/loading/initialize.d.ts +3 -0
- package/dist/react-sdk/application-runtime/loading/initialize.js +1 -0
- package/dist/react-sdk/application-runtime/loading/selectors.d.ts +18 -0
- package/dist/react-sdk/application-runtime/loading/selectors.js +1 -0
- package/dist/react-sdk/application-runtime/loading/types.d.ts +59 -0
- package/dist/react-sdk/application-runtime/loading/types.js +1 -0
- package/dist/react-sdk/application-runtime/mocks/create-mock-application-runtime.js +1 -1
- package/dist/react-sdk/application-runtime/provider/ApplicationRuntime.d.ts +6 -0
- package/dist/react-sdk/application-runtime/provider/ApplicationRuntime.js +1 -1
- package/dist/react-sdk/application-runtime/provider/ApplicationType.d.ts +7 -0
- package/dist/react-sdk/application-runtime/provider/ApplicationType.js +1 -1
- package/dist/react-sdk/application-runtime/responsive/actions.d.ts +53 -0
- package/dist/react-sdk/application-runtime/responsive/actions.js +1 -0
- package/dist/react-sdk/application-runtime/responsive/index.d.ts +4 -0
- package/dist/react-sdk/application-runtime/responsive/index.js +1 -0
- package/dist/react-sdk/application-runtime/responsive/initialize.d.ts +3 -0
- package/dist/react-sdk/application-runtime/responsive/initialize.js +1 -0
- package/dist/react-sdk/application-runtime/responsive/selectors.d.ts +20 -0
- package/dist/react-sdk/application-runtime/responsive/selectors.js +1 -0
- package/dist/react-sdk/application-runtime/responsive/types.d.ts +113 -0
- package/dist/react-sdk/application-runtime/responsive/types.js +1 -0
- package/dist/react-sdk/application-runtime/routing/routing-service.d.ts +34 -2
- package/dist/react-sdk/application-runtime/routing/routing-service.js +1 -1
- package/dist/react-sdk/application-runtime/runtime/create-application-runtime.d.ts +331 -10
- package/dist/react-sdk/application-runtime/runtime/create-application-runtime.js +1 -1
- package/dist/react-sdk/configurator-routing/ConfiguratorRoutingProvider.d.ts +11 -0
- package/dist/react-sdk/configurator-routing/ConfiguratorRoutingProvider.js +1 -0
- package/dist/react-sdk/configurator-routing/OnGoToIndexHandler.d.ts +9 -0
- package/dist/react-sdk/configurator-routing/OnGoToIndexHandler.js +1 -0
- package/dist/react-sdk/configurator-routing/index.d.ts +3 -0
- package/dist/react-sdk/configurator-routing/index.js +1 -0
- package/dist/react-sdk/configurator-routing/use-power-routing-lifecycle.d.ts +11 -0
- package/dist/react-sdk/configurator-routing/use-power-routing-lifecycle.js +1 -0
- package/dist/react-sdk/configurator-ui-elements/ConfiguratorUiElementHost.d.ts +7 -0
- package/dist/react-sdk/configurator-ui-elements/ConfiguratorUiElementHost.js +1 -0
- package/dist/react-sdk/configurator-ui-elements/ErrorFallbackElement.d.ts +14 -0
- package/dist/react-sdk/configurator-ui-elements/ErrorFallbackElement.js +1 -0
- package/dist/react-sdk/configurator-ui-elements/ErrorFallbackPropsProvider.d.ts +18 -0
- package/dist/react-sdk/configurator-ui-elements/ErrorFallbackPropsProvider.js +1 -0
- package/dist/react-sdk/configurator-ui-elements/PlainErrorFallback.d.ts +5 -0
- package/dist/react-sdk/configurator-ui-elements/PlainErrorFallback.js +1 -0
- package/dist/react-sdk/configurator-ui-elements/configurator-ui-element.d.ts +17 -0
- package/dist/react-sdk/configurator-ui-elements/configurator-ui-element.js +1 -0
- package/dist/react-sdk/configurator-ui-elements/create-configurator-ui-element.d.ts +5 -0
- package/dist/react-sdk/configurator-ui-elements/create-configurator-ui-element.js +1 -0
- package/dist/react-sdk/configurator-ui-elements/index.d.ts +6 -0
- package/dist/react-sdk/configurator-ui-elements/index.js +1 -0
- package/dist/react-sdk/domain-application-context/BackendDataProvider.js +1 -1
- package/dist/react-sdk/domain-application-context/ConfigurationPersistSystemFailureHandler.js +1 -1
- package/dist/react-sdk/domain-application-context/DomainLifecycleBoundary.js +1 -1
- package/dist/react-sdk/domain-application-context/FrontendDataProvider.js +1 -1
- package/dist/react-sdk/domain-application-context/OnPresetLoadedHandler.js +1 -0
- package/dist/react-sdk/domain-application-context/PublishedDataProvider.js +1 -1
- package/dist/react-sdk/domain-application-context/chat-hooks.d.ts +4 -0
- package/dist/react-sdk/domain-application-context/chat-hooks.js +1 -0
- package/dist/react-sdk/domain-application-context/index.d.ts +2 -0
- package/dist/react-sdk/domain-application-context/index.js +1 -1
- package/dist/react-sdk/domain-context/common-hooks/index.d.ts +9 -0
- package/dist/react-sdk/domain-context/common-hooks/index.js +1 -0
- package/dist/react-sdk/domain-context/common-hooks/use-configuration-save-state.d.ts +23 -0
- package/dist/react-sdk/domain-context/common-hooks/use-configuration-save-state.js +1 -0
- package/dist/react-sdk/domain-context/common-hooks/use-configurator-messages.d.ts +15 -4
- package/dist/react-sdk/domain-context/common-hooks/use-configurator-messages.js +1 -1
- package/dist/react-sdk/domain-context/common-hooks/use-domain-context.d.ts +5 -3
- package/dist/react-sdk/domain-context/common-hooks/use-state-validity.d.ts +6 -1
- package/dist/react-sdk/domain-context/common-hooks/use-state-validity.js +1 -1
- package/dist/react-sdk/domain-context/component-hooks/index.d.ts +1 -0
- package/dist/react-sdk/domain-context/component-hooks/index.js +1 -0
- package/dist/react-sdk/domain-context/component-hooks/use-component.js +1 -1
- package/dist/react-sdk/domain-context/entity-hooks/use-domain-entity-state.js +1 -1
- package/dist/react-sdk/domain-context/entity-hooks/use-entity-price.js +1 -1
- package/dist/react-sdk/domain-context/entity-hooks/use-root-entity-id.js +1 -1
- package/dist/react-sdk/domain-context/entity-hooks/use-root-entity-state.js +1 -1
- package/dist/react-sdk/domain-context/index.d.ts +8 -1
- package/dist/react-sdk/domain-context/index.js +1 -1
- package/dist/react-sdk/domain-context/system-hooks/composition-hooks.js +1 -1
- package/dist/react-sdk/domain-context/system-hooks/dimension-hooks.js +1 -1
- package/dist/react-sdk/domain-context/system-hooks/generate-share-link-hooks.d.ts +8 -0
- package/dist/react-sdk/domain-context/system-hooks/generate-share-link-hooks.js +1 -0
- package/dist/react-sdk/domain-context/system-hooks/hover-hooks.d.ts +2 -2
- package/dist/react-sdk/domain-context/system-hooks/hover-hooks.js +1 -1
- package/dist/react-sdk/domain-context/system-hooks/locale-switch-hooks.d.ts +24 -0
- package/dist/react-sdk/domain-context/system-hooks/locale-switch-hooks.js +1 -0
- package/dist/react-sdk/domain-context/system-hooks/navigation-hooks.d.ts +5 -0
- package/dist/react-sdk/domain-context/system-hooks/navigation-hooks.js +1 -1
- package/dist/react-sdk/domain-context/system-hooks/selection-hooks.js +1 -1
- package/dist/react-sdk/domain-context/system-hooks/share-links-hooks.d.ts +32 -0
- package/dist/react-sdk/domain-context/system-hooks/share-links-hooks.js +1 -0
- package/dist/react-sdk/domain-context/system-hooks/step-navigation-hooks.d.ts +57 -0
- package/dist/react-sdk/domain-context/system-hooks/step-navigation-hooks.js +1 -0
- package/dist/react-sdk/domain-context/system-hooks/tab-navigation-hooks.d.ts +61 -0
- package/dist/react-sdk/domain-context/system-hooks/tab-navigation-hooks.js +1 -0
- package/dist/react-sdk/domain-context/system-hooks/undo-redo-hooks.d.ts +20 -0
- package/dist/react-sdk/domain-context/system-hooks/undo-redo-hooks.js +1 -0
- package/dist/react-sdk/domain-controls/ChildEntityCardSelector.d.ts +2 -3
- package/dist/react-sdk/domain-controls/ChildEntityListSelector.d.ts +2 -3
- package/dist/react-sdk/domain-controls/ChildEntityToggleSelector.d.ts +2 -3
- package/dist/react-sdk/domain-controls/hooks/use-cook-replace-recipes.d.ts +3 -3
- package/dist/react-sdk/elements/PhoenixEntityElement.js +1 -1
- package/dist/react-sdk/elements/PhoenixLayoutElement.js +1 -1
- package/dist/react-sdk/handlers/FinalizeActionRunner.d.ts +13 -0
- package/dist/react-sdk/handlers/FinalizeActionRunner.js +1 -0
- package/dist/react-sdk/handlers/FinalizeActionsHost.d.ts +10 -0
- package/dist/react-sdk/handlers/FinalizeActionsHost.js +1 -0
- package/dist/react-sdk/handlers/FinalizeActionsProvider.d.ts +11 -0
- package/dist/react-sdk/handlers/FinalizeActionsProvider.js +1 -0
- package/dist/react-sdk/handlers/finalize-actions-context.d.ts +6 -0
- package/dist/react-sdk/handlers/finalize-actions-context.js +1 -0
- package/dist/react-sdk/handlers/finalize-actions-store.d.ts +23 -0
- package/dist/react-sdk/handlers/finalize-actions-store.js +1 -0
- package/dist/react-sdk/handlers/index.d.ts +6 -0
- package/dist/react-sdk/handlers/index.js +1 -1
- package/dist/react-sdk/handlers/use-finalize-action.d.ts +32 -0
- package/dist/react-sdk/handlers/use-finalize-action.js +1 -0
- package/dist/react-sdk/handlers/use-finalize-actions.d.ts +53 -0
- package/dist/react-sdk/handlers/use-finalize-actions.js +1 -0
- package/dist/react-sdk/index.d.ts +9 -0
- package/dist/react-sdk/index.js +1 -1
- package/dist/react-sdk/integration/IntegrationSubscription.js +1 -0
- package/dist/react-sdk/integration/index.d.ts +1 -0
- package/dist/react-sdk/integration/index.js +1 -0
- package/dist/react-sdk/lifecycle-providers/ConfiguratorDataProvider.d.ts +8 -0
- package/dist/react-sdk/lifecycle-providers/ConfiguratorDataProvider.js +1 -0
- package/dist/react-sdk/lifecycle-providers/LifecycleProviders.js +1 -0
- package/dist/react-sdk/lifecycle-providers/index.d.ts +2 -0
- package/dist/react-sdk/lifecycle-providers/index.js +1 -0
- package/dist/react-sdk/loading-state/LoaderHost.d.ts +20 -0
- package/dist/react-sdk/loading-state/LoaderHost.js +1 -0
- package/dist/react-sdk/loading-state/built-in-loading-phase.d.ts +9 -0
- package/dist/react-sdk/loading-state/built-in-loading-phase.js +1 -0
- package/dist/react-sdk/loading-state/create-app-loader.d.ts +18 -0
- package/dist/react-sdk/loading-state/create-app-loader.js +1 -0
- package/dist/react-sdk/loading-state/index.d.ts +4 -2
- package/dist/react-sdk/loading-state/index.js +1 -1
- package/dist/react-sdk/loading-state/loading-state-hooks.d.ts +22 -0
- package/dist/react-sdk/loading-state/loading-state-hooks.js +1 -0
- package/dist/react-sdk/notifications/index.d.ts +1 -0
- package/dist/react-sdk/notifications/index.js +1 -0
- package/dist/react-sdk/notifications/snackbar-action-button.d.ts +30 -0
- package/dist/react-sdk/notifications/snackbar-action-button.js +1 -0
- package/dist/react-sdk/page-elements/ConfigurationNotFoundPagePropsProvider.d.ts +17 -0
- package/dist/react-sdk/page-elements/ConfigurationNotFoundPagePropsProvider.js +1 -0
- package/dist/react-sdk/page-elements/ConfiguratorErrorPagePropsProvider.d.ts +17 -0
- package/dist/react-sdk/page-elements/ConfiguratorErrorPagePropsProvider.js +1 -0
- package/dist/react-sdk/page-elements/configurator-error-page-props.d.ts +20 -0
- package/dist/react-sdk/page-elements/configurator-error-page-props.js +1 -0
- package/dist/react-sdk/page-elements/create-configuration-not-found-page.d.ts +15 -0
- package/dist/react-sdk/page-elements/create-configuration-not-found-page.js +1 -0
- package/dist/react-sdk/page-elements/create-configurator-error-page.d.ts +14 -0
- package/dist/react-sdk/page-elements/create-configurator-error-page.js +1 -0
- package/dist/react-sdk/page-elements/create-preset-ui.d.ts +9 -0
- package/dist/react-sdk/page-elements/create-preset-ui.js +1 -0
- package/dist/react-sdk/page-elements/index.d.ts +6 -0
- package/dist/react-sdk/page-elements/index.js +1 -0
- package/dist/react-sdk/preset-selection/PresetSelectionProvider.js +1 -0
- package/dist/react-sdk/preset-selection/index.d.ts +1 -0
- package/dist/react-sdk/preset-selection/index.js +1 -0
- package/dist/react-sdk/provider-slots/ConfiguratorProviderSlotHost.d.ts +11 -0
- package/dist/react-sdk/provider-slots/ConfiguratorProviderSlotHost.js +1 -0
- package/dist/react-sdk/provider-slots/configurator-provider-slot.d.ts +24 -0
- package/dist/react-sdk/provider-slots/configurator-provider-slot.js +1 -0
- package/dist/react-sdk/provider-slots/create-configurator-provider-slot.d.ts +5 -0
- package/dist/react-sdk/provider-slots/create-configurator-provider-slot.js +1 -0
- package/dist/react-sdk/provider-slots/index.d.ts +3 -0
- package/dist/react-sdk/provider-slots/index.js +1 -0
- package/dist/react-sdk/scene-control-elements/AddEntityFabElement.d.ts +36 -0
- package/dist/react-sdk/scene-control-elements/AddEntityFabElement.js +1 -0
- package/dist/react-sdk/scene-control-elements/DeleteEntityFabElement.d.ts +44 -0
- package/dist/react-sdk/scene-control-elements/DeleteEntityFabElement.js +1 -0
- package/dist/react-sdk/scene-control-elements/NavigationHotspotElement.d.ts +38 -0
- package/dist/react-sdk/scene-control-elements/NavigationHotspotElement.js +1 -0
- package/dist/react-sdk/scene-control-elements/SelectionHotspotElement.d.ts +30 -0
- package/dist/react-sdk/scene-control-elements/SelectionHotspotElement.js +1 -0
- package/dist/react-sdk/scene-control-elements/ToolMenuFabElement.d.ts +30 -0
- package/dist/react-sdk/scene-control-elements/ToolMenuFabElement.js +1 -0
- package/dist/react-sdk/scene-control-elements/create-add-entity-fab.d.ts +9 -0
- package/dist/react-sdk/scene-control-elements/create-add-entity-fab.js +1 -0
- package/dist/react-sdk/scene-control-elements/create-delete-entity-fab.d.ts +9 -0
- package/dist/react-sdk/scene-control-elements/create-delete-entity-fab.js +1 -0
- package/dist/react-sdk/scene-control-elements/create-navigation-hotspot.d.ts +10 -0
- package/dist/react-sdk/scene-control-elements/create-navigation-hotspot.js +1 -0
- package/dist/react-sdk/scene-control-elements/create-selection-hotspot.d.ts +9 -0
- package/dist/react-sdk/scene-control-elements/create-selection-hotspot.js +1 -0
- package/dist/react-sdk/scene-control-elements/create-tool-menu-fab.d.ts +9 -0
- package/dist/react-sdk/scene-control-elements/create-tool-menu-fab.js +1 -0
- package/dist/react-sdk/scene-control-elements/index.d.ts +11 -0
- package/dist/react-sdk/scene-control-elements/index.js +1 -0
- package/dist/react-sdk/scene-control-elements/scene-control-tooltip-visibility.d.ts +5 -0
- package/dist/react-sdk/scene-control-elements/scene-control-tooltip-visibility.js +1 -0
- package/dist/react-sdk/session/NotAuthenticatedPage.d.ts +4 -0
- package/dist/react-sdk/session/NotAuthenticatedPage.js +1 -1
- package/dist/react-sdk/session/SessionServiceProvider.d.ts +5 -0
- package/dist/react-sdk/session/SessionServiceProvider.js +1 -1
- package/dist/react-sdk/web-component/create-web-component.js +1 -1
- package/dist/react-sdk/web-component/god-mode/god-mode-registry.d.ts +30 -0
- package/dist/react-sdk/web-component/god-mode/god-mode-registry.js +1 -0
- package/dist/react-sdk/web-component/god-mode/index.d.ts +1 -0
- package/dist/react-sdk/web-component/god-mode/index.js +1 -0
- package/dist/ui-sdk/components/numerical-input/InputField.d.ts +2 -0
- package/dist/ui-sdk/components/numerical-input/InputField.js +1 -1
- package/dist/ui-sdk/components/numerical-input/NumericalInput.d.ts +2 -2
- package/dist/ui-sdk/components/numerical-input/Slider.d.ts +3 -1
- package/dist/ui-sdk/components/numerical-input/Slider.js +1 -1
- package/dist/ui-sdk/components/snackbar/Snackbar.d.ts +24 -3
- package/dist/ui-sdk/components/snackbar/Snackbar.js +1 -1
- package/dist/ui-sdk/icons/__generated/ChatCircleText.d.ts +3 -0
- package/dist/ui-sdk/icons/__generated/ChatCircleText.js +1 -0
- package/dist/ui-sdk/icons/__generated/Lightbulb.d.ts +3 -0
- package/dist/ui-sdk/icons/__generated/Lightbulb.js +1 -0
- package/dist/ui-sdk/icons/__generated/Microphone.d.ts +3 -0
- package/dist/ui-sdk/icons/__generated/Microphone.js +1 -0
- package/dist/ui-sdk/icons/__generated/MicrophoneSlash.d.ts +3 -0
- package/dist/ui-sdk/icons/__generated/MicrophoneSlash.js +1 -0
- package/dist/ui-sdk/icons/__generated/Paperclip.d.ts +3 -0
- package/dist/ui-sdk/icons/__generated/Paperclip.js +1 -0
- package/dist/ui-sdk/icons/__generated/PencilSimpleLine.d.ts +3 -0
- package/dist/ui-sdk/icons/__generated/PencilSimpleLine.js +1 -0
- package/dist/ui-sdk/icons/__generated/SpeakerHigh.d.ts +3 -0
- package/dist/ui-sdk/icons/__generated/SpeakerHigh.js +1 -0
- package/dist/ui-sdk/icons/__generated/SpeakerSlash.d.ts +3 -0
- package/dist/ui-sdk/icons/__generated/SpeakerSlash.js +1 -0
- package/dist/ui-sdk/icons/__generated/Stop.d.ts +3 -0
- package/dist/ui-sdk/icons/__generated/Stop.js +1 -0
- package/dist/ui-sdk/icons/__generated/XCircle.d.ts +3 -0
- package/dist/ui-sdk/icons/__generated/XCircle.js +1 -0
- package/dist/ui-sdk/icons/__generated/index.d.ts +20 -0
- package/dist/ui-sdk/icons/__generated/index.js +1 -1
- package/dist/ui-sdk/icons/icons-registry.js +1 -1
- package/dist/ui-sdk/responsive-application/ResponsiveApplicationProvider.d.ts +9 -0
- package/dist/ui-sdk/responsive-application/ResponsiveApplicationProvider.js +1 -1
- package/dist/ui-sdk/responsive-application/index.d.ts +1 -0
- package/dist/ui-sdk/responsive-application/responsive-state-store.d.ts +59 -0
- package/dist/ui-sdk/responsive-application/responsive-state-store.js +1 -0
- package/dist/ui-sdk/responsive-application/use-store-responsive-info.d.ts +7 -0
- package/dist/ui-sdk/responsive-application/use-store-responsive-info.js +1 -0
- package/dist/ui-sdk/theme/types.d.ts +3 -3
- package/dist/watch/glob-matcher.d.ts +4 -4
- package/dist/watch/glob-matcher.js +1 -1
- package/dist/watch/watch.d.ts +4 -4
- package/dist/watch/watch.js +1 -1
- package/dist/webhook/builders/auth-handler-builder.d.ts +3 -0
- package/dist/webhook/builders/auth-handler-builder.js +1 -1
- package/dist/webhook/builders/common.d.ts +4 -2
- package/package.json +65 -37
- package/schema/domain-spec.json +310 -8
- package/dist/application-spec/caching/runtime-reference-store.d.ts +0 -50
- package/dist/application-spec/caching/runtime-reference-store.js +0 -1
- package/dist/application-spec/core/components/component-filter.d.ts +0 -53
- package/dist/application-spec/core/components/index.d.ts +0 -2
- package/dist/application-spec/core/expressions/index.d.ts +0 -2
- package/dist/application-spec/core/expressions/relation-expression-params.d.ts +0 -11
- package/dist/application-spec/generate-application/code/templates/nvmrc.d.ts +0 -1
- package/dist/application-spec/generate-application/code/templates/nvmrc.js +0 -2
- package/dist/application-spec/generate-application/code/templates/package-json.d.ts +0 -10
- package/dist/application-spec/generate-application/code/templates/package-json.js +0 -1
- package/dist/application-spec/generate-application/code/templates/skills/phoenix-cli-skill.d.ts +0 -1
- package/dist/application-spec/generate-application/code/templates/skills/phoenix-cli-skill.js +0 -1
- package/dist/application-spec/generate-application/code/templates/skills/phoenix-create-configurator-skill.d.ts +0 -3
- package/dist/application-spec/generate-application/code/templates/skills/phoenix-create-configurator-skill.js +0 -166
- package/dist/application-spec/generate-application/code/templates/skills/phoenix-feedback-skill.d.ts +0 -1
- package/dist/application-spec/generate-application/code/templates/skills/phoenix-feedback-skill.js +0 -54
- package/dist/application-spec/generate-application/code/templates/skills/phoenix-review-skill.d.ts +0 -1
- package/dist/application-spec/generate-application/code/templates/skills/phoenix-review-skill.js +0 -115
- package/dist/application-spec/generate-application/code/templates/skills/phoenix-skill.d.ts +0 -13
- package/dist/application-spec/generate-application/code/templates/skills/phoenix-skill.js +0 -1
- package/dist/application-spec/generate-application/code/templates/skills/phoenix-variants-skill.d.ts +0 -1
- package/dist/application-spec/generate-application/code/templates/skills/phoenix-variants-skill.js +0 -6
- package/dist/application-spec/generate-application/code/templates/webhook-implementation.d.ts +0 -1
- package/dist/application-spec/generate-application/code/templates/webhook-implementation.js +0 -7
- package/dist/application-spec/generate-application/runtime/admin-runtime/admin-model-runtime.d.ts +0 -28
- package/dist/application-spec/generate-application/runtime/admin-runtime/admin-model-runtime.js +0 -1
- package/dist/application-spec/generate-application/runtime/admin-runtime/admin-runtime.d.ts +0 -23
- package/dist/application-spec/generate-application/runtime/admin-runtime/admin-runtime.js +0 -1
- package/dist/application-spec/generate-application/runtime/admin-runtime/states-runtime.d.ts +0 -8
- package/dist/application-spec/generate-application/runtime/application-runtime.d.ts +0 -33
- package/dist/application-spec/generate-application/runtime/application-runtime.js +0 -1
- package/dist/application-spec/generate-application/runtime/configurator-runtime/configurator-model-runtime.d.ts +0 -30
- package/dist/application-spec/generate-application/runtime/configurator-runtime/configurator-model-runtime.js +0 -1
- package/dist/application-spec/generate-application/runtime/configurator-runtime/configurator-runtime.d.ts +0 -32
- package/dist/application-spec/generate-application/runtime/configurator-runtime/configurator-runtime.js +0 -1
- package/dist/application-spec/generate-application/runtime/configurator-runtime/states-runtime.d.ts +0 -11
- package/dist/application-spec/generate-application/runtime/generate-runtime-instance.d.ts +0 -2
- package/dist/application-spec/generate-application/runtime/generate-runtime-instance.js +0 -1
- package/dist/application-spec/generate-application/runtime/sections/actions-runtime.d.ts +0 -14
- package/dist/application-spec/generate-application/runtime/sections/assistant-runtime.d.ts +0 -10
- package/dist/application-spec/generate-application/runtime/sections/build-sdk-optic.d.ts +0 -7
- package/dist/application-spec/generate-application/runtime/sections/build-sdk-optic.js +0 -1
- package/dist/application-spec/generate-application/runtime/sections/build-user-bound-optic.d.ts +0 -7
- package/dist/application-spec/generate-application/runtime/sections/build-user-bound-optic.js +0 -1
- package/dist/application-spec/generate-application/runtime/sections/component-optic.d.ts +0 -33
- package/dist/application-spec/generate-application/runtime/sections/component-optic.js +0 -1
- package/dist/application-spec/generate-application/runtime/sections/data-runtime.d.ts +0 -13
- package/dist/application-spec/generate-application/runtime/sections/expression-runtime.d.ts +0 -46
- package/dist/application-spec/generate-application/runtime/sections/expression-runtime.js +0 -1
- package/dist/application-spec/generate-application/runtime/sections/generate-memo-eval-plan-runtime.d.ts +0 -29
- package/dist/application-spec/generate-application/runtime/sections/generate-memo-eval-plan-runtime.js +0 -1
- package/dist/application-spec/generate-application/runtime/sections/index.d.ts +0 -10
- package/dist/application-spec/generate-application/runtime/sections/index.js +0 -1
- package/dist/application-spec/generate-application/runtime/sections/preset-runtime.d.ts +0 -20
- package/dist/application-spec/generate-application/runtime/sections/reflection-constants-runtime.d.ts +0 -8
- package/dist/application-spec/generate-application/runtime/sections/reflection-constants-runtime.js +0 -1
- package/dist/application-spec/generate-application/runtime/sections/theme-runtime.d.ts +0 -10
- package/dist/application-spec/generate-application/runtime/sections/transformers-runtime.d.ts +0 -19
- package/dist/application-spec/parse-application-files/spec/components/component-entry.d.ts +0 -90
- package/dist/application-spec/parse-application-files/spec/expressions/expression.d.ts +0 -43
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/browser-details.d.ts +0 -17
- package/dist/configurator/application-runtime/extensions/systems/assistant-system/browser-details.js +0 -1
- package/dist/configurator/common/frontend-analytics.d.ts +0 -48
- package/dist/configurator/configurator-context/ConfiguratorDataProvider.d.ts +0 -2
- package/dist/configurator/configurator-context/ConfiguratorDataProvider.js +0 -1
- package/dist/configurator/configurator-context/IntegrationSubscription.js +0 -1
- package/dist/configurator/configurator-context/LifecycleProviders.js +0 -1
- package/dist/configurator/configurator-context/OnPresetLoadedHandler.js +0 -1
- package/dist/configurator/configurator-context/PresetSelectionProvider.js +0 -1
- package/dist/configurator/configurator-context/configurator-hooks/chat-hooks.d.ts +0 -1
- package/dist/configurator/configurator-context/configurator-hooks/chat-hooks.js +0 -1
- package/dist/configurator/configurator-context/configurator-routing/ConfiguratorRoutingProvider.d.ts +0 -11
- package/dist/configurator/configurator-context/configurator-routing/ConfiguratorRoutingProvider.js +0 -1
- package/dist/configurator/configurator-context/configurator-routing/OnGoToIndexHandler.d.ts +0 -10
- package/dist/configurator/configurator-context/configurator-routing/OnGoToIndexHandler.js +0 -1
- package/dist/configurator/configurator-context/configurator-routing/index.d.ts +0 -2
- package/dist/configurator/configurator-context/configurator-routing/index.js +0 -1
- package/dist/configurator/configurator-context/configurator-routing/use-power-routing-lifecycle.d.ts +0 -9
- package/dist/configurator/configurator-context/configurator-routing/use-power-routing-lifecycle.js +0 -1
- package/dist/configurator/ui/assistant/entity-link/entity-link-target.d.ts +0 -5
- package/dist/configurator/ui/assistant/entity-link/entity-link-target.js +0 -1
- package/dist/configurator/ui/assistant/theme.d.ts +0 -2
- package/dist/configurator/ui/assistant/theme.js +0 -1
- package/dist/configurator/ui/phoenix-layout-elements/language/use-locale-options.d.ts +0 -4
- package/dist/configurator/ui/phoenix-layout-elements/language/use-locale-options.js +0 -1
- package/dist/configurator/ui/phoenix-layout-elements/measurements/use-measurements-visibility.d.ts +0 -4
- package/dist/configurator/ui/phoenix-layout-elements/measurements/use-measurements-visibility.js +0 -1
- package/dist/domain/application/assistant/assistant-manifest.d.ts +0 -71
- package/dist/domain/application/assistant/assistant-resolved-manifest.d.ts +0 -131
- package/dist/domain/available-system-components.d.ts +0 -11
- package/dist/domain/available-system-components.js +0 -1
- package/dist/domain/core/action/action-factory.d.ts +0 -11
- package/dist/domain/domain-builder.d.ts +0 -40
- package/dist/domain/domain-builder.js +0 -1
- package/dist/domain/domain-runtime/errors/implementation-error-collector.d.ts +0 -19
- package/dist/domain/domain-runtime/errors/implementation-error-collector.js +0 -1
- package/dist/domain/domain-runtime/spec/module-checks/element-registration.d.ts +0 -110
- package/dist/domain/domain-runtime/spec/module-checks/element-registration.js +0 -1
- package/dist/domain/domain-runtime/spec/module-checks/index.d.ts +0 -8
- package/dist/domain/domain-runtime/spec/module-checks/index.js +0 -1
- package/dist/domain/domain-runtime/spec/module-checks/project-modules.d.ts +0 -32
- package/dist/domain/domain-runtime/spec/module-checks/project-modules.js +0 -1
- package/dist/domain/domain-runtime/spec/module-checks/resolve-action-modules.d.ts +0 -4
- package/dist/domain/domain-runtime/spec/module-checks/resolve-component-optic-modules.d.ts +0 -4
- package/dist/domain/domain-runtime/spec/module-checks/resolve-expression-modules.d.ts +0 -15
- package/dist/domain/domain-runtime/spec/module-checks/resolve-expression-modules.js +0 -1
- package/dist/domain/domain-runtime/spec/module-checks/resolve-imported-transformers.d.ts +0 -22
- package/dist/domain/domain-runtime/spec/module-checks/resolve-imported-transformers.js +0 -1
- package/dist/domain/domain-runtime/spec/module-checks/resolve-invariant-modules.d.ts +0 -6
- package/dist/domain/extensions/client-side-image.d.ts +0 -14
- package/dist/domain/extensions/client-side-image.js +0 -1
- package/dist/domain/extensions/save-template-thumbnail.d.ts +0 -14
- package/dist/domain/extensions/save-template-thumbnail.js +0 -1
- package/dist/phoenix/commands/generate-project-files.d.ts +0 -6
- package/dist/phoenix/commands/generate-project-files.js +0 -1
- package/dist/phoenix/commands/generated-env-markers.d.ts +0 -7
- package/dist/phoenix/commands/generated-env-markers.js +0 -1
- package/dist/phoenix/services/lingui.d.ts +0 -7
- package/dist/phoenix/services/lingui.js +0 -1
- package/dist/phoenix/services/phoenix-application.d.ts +0 -21
- package/dist/phoenix/services/phoenix-application.js +0 -1
- package/dist/react-sdk/application-runtime/runtime/god-mode.d.ts +0 -19
- package/dist/react-sdk/application-runtime/runtime/god-mode.js +0 -1
- package/dist/react-sdk/loading-state/LoadingStateProvider.d.ts +0 -31
- package/dist/react-sdk/loading-state/LoadingStateProvider.js +0 -1
- package/dist/react-sdk/loading-state/loading-state-manager.d.ts +0 -32
- package/dist/react-sdk/loading-state/loading-state-manager.js +0 -1
- /package/dist/application-spec/{core/expressions/relation-expression-params.js → parse-application-files/spec/expressions/expression-read.js} +0 -0
- /package/dist/{application-spec/parse-application-files/spec/components/component-entry.js → configurator/application-runtime/extensions/systems/assistant-system/assistant-annotation.js} +0 -0
- /package/dist/{application-spec/parse-application-files/spec/expressions/expression.js → configurator/application-runtime/extensions/systems/assistant-system/assistant-image-view.js} +0 -0
- /package/dist/{domain/application/assistant/assistant-manifest.js → configurator/ui/assistant/form-elements/form-element-props.js} +0 -0
- /package/dist/domain/{core/action → domain-runtime}/action-factory.js +0 -0
- /package/dist/{application-spec/core → domain/spec/application}/application-instance.d.ts +0 -0
- /package/dist/{application-spec/core → domain/spec/application}/application-instance.js +0 -0
- /package/dist/{application-spec/core → domain/spec}/components/component-filter.js +0 -0
- /package/dist/{application-spec/core → domain/spec}/components/index.js +0 -0
- /package/dist/{application-spec/core → domain/spec}/components/sdk-code-ref.d.ts +0 -0
- /package/dist/{application-spec/core → domain/spec}/components/sdk-code-ref.js +0 -0
- /package/dist/domain/{domain-runtime → spec}/errors/implementation-error.d.ts +0 -0
- /package/dist/domain/{domain-runtime → spec}/errors/implementation-error.js +0 -0
- /package/dist/domain/{domain-runtime → spec}/errors/implementation-errors.d.ts +0 -0
- /package/dist/domain/{domain-runtime → spec}/errors/implementation-errors.js +0 -0
- /package/dist/domain/{domain-runtime → spec}/errors/index.d.ts +0 -0
- /package/dist/domain/{domain-runtime → spec}/errors/index.js +0 -0
- /package/dist/domain/{domain-runtime → spec}/errors/to-implementation-errors.d.ts +0 -0
- /package/dist/domain/{domain-runtime → spec}/errors/to-implementation-errors.js +0 -0
- /package/dist/{application-spec/core → domain/spec}/expressions/index.js +0 -0
- /package/dist/{application-spec/core → domain/spec}/expressions/sdk-expression-implementation.d.ts +0 -0
- /package/dist/{application-spec/core → domain/spec}/expressions/sdk-expression-implementation.js +0 -0
- /package/dist/{application-spec/parse-application-files/spec/components → domain/spec/markers}/component-prop-target.d.ts +0 -0
- /package/dist/{application-spec/parse-application-files/spec/components → domain/spec/markers}/component-prop-target.js +0 -0
- /package/dist/{application-spec/core → domain/spec}/markers/eval-marker.d.ts +0 -0
- /package/dist/{application-spec/core → domain/spec}/markers/eval-marker.js +0 -0
- /package/dist/domain/{domain-runtime/spec/module-checks → spec/modules}/handler-registration.d.ts +0 -0
- /package/dist/domain/{domain-runtime/spec/module-checks → spec/modules}/handler-registration.js +0 -0
- /package/dist/domain/{domain-runtime/spec/module-checks → spec/modules}/resolve-action-modules.js +0 -0
- /package/dist/domain/{domain-runtime/spec/module-checks → spec/modules}/resolve-component-optic-modules.js +0 -0
- /package/dist/domain/{domain-runtime/spec/module-checks → spec/modules}/resolve-invariant-modules.js +0 -0
- /package/dist/{application-spec/generate-application → domain/spec}/runtime/admin-runtime/states-runtime.js +0 -0
- /package/dist/{application-spec/generate-application → domain/spec}/runtime/configurator-runtime/states-runtime.js +0 -0
- /package/dist/{application-spec/generate-application → domain/spec}/runtime/sections/actions-runtime.js +0 -0
- /package/dist/{application-spec/generate-application → domain/spec}/runtime/sections/assistant-runtime.js +0 -0
- /package/dist/{application-spec/generate-application → domain/spec}/runtime/sections/data-runtime.js +0 -0
- /package/dist/{application-spec/generate-application → domain/spec}/runtime/sections/preset-runtime.js +0 -0
- /package/dist/{application-spec/generate-application → domain/spec}/runtime/sections/theme-runtime.js +0 -0
- /package/dist/{application-spec/generate-application → domain/spec}/runtime/sections/transformers-runtime.js +0 -0
- /package/dist/domain/{application/assistant/assistant-resolved-manifest.js → spec/sections/assistant/assistant-manifest.js} +0 -0
- /package/dist/{configurator/common → react-sdk/application-runtime/common-services/analytics}/frontend-analytics.js +0 -0
- /package/dist/{configurator/configurator-context → react-sdk/domain-application-context}/OnPresetLoadedHandler.d.ts +0 -0
- /package/dist/{configurator/configurator-context → react-sdk/integration}/IntegrationSubscription.d.ts +0 -0
- /package/dist/{configurator/configurator-context → react-sdk/lifecycle-providers}/LifecycleProviders.d.ts +0 -0
- /package/dist/{configurator/configurator-context → react-sdk/preset-selection}/PresetSelectionProvider.d.ts +0 -0
|
@@ -0,0 +1,3485 @@
|
|
|
1
|
+
# Ardent Compressor
|
|
2
|
+
|
|
3
|
+
Quote an engineered product from a form, with no 3D model at all. An industrial compressor maker, Ardent Air, lets plant engineers size a rotary screw compressor and ask for a firm quote. The engineer works through five steps: the air demand, the air treatment, the plant room, service and delivery, and a review. Questions appear only when an earlier answer makes them relevant, conflicts between choices are flagged at the field that can fix them, and a price breakdown with every line, the subtotal and an express-delivery surcharge follows each change. **Request quote** sends the configuration to an application engineer and shows the answer. The configurator mounts no canvas: the spec holds the product, the prices, the rules and the quote action, and the layout is an ordinary React form.
|
|
4
|
+
|
|
5
|
+
- [Try it](#try-it)
|
|
6
|
+
- [What the example demonstrates](#what-the-example-demonstrates)
|
|
7
|
+
- [A configurator with no scene](#a-configurator-with-no-scene)
|
|
8
|
+
- [Steps from the spec](#steps-from-the-spec)
|
|
9
|
+
- [Questions that depend on earlier answers](#questions-that-depend-on-earlier-answers)
|
|
10
|
+
- [Options that follow the configuration](#options-that-follow-the-configuration)
|
|
11
|
+
- [Validation from invariants](#validation-from-invariants)
|
|
12
|
+
- [A live price breakdown](#a-live-price-breakdown)
|
|
13
|
+
- [Request a quote](#request-a-quote)
|
|
14
|
+
- [On a phone](#on-a-phone)
|
|
15
|
+
- [Test cases](#test-cases)
|
|
16
|
+
- [What this layout leaves out](#what-this-layout-leaves-out)
|
|
17
|
+
- [Related pages](#related-pages)
|
|
18
|
+
- [Complete Implementation](#complete-implementation)
|
|
19
|
+
|
|
20
|
+
## Try it
|
|
21
|
+
|
|
22
|
+
The phone version is under [On a phone](#on-a-phone).
|
|
23
|
+
|
|
24
|
+
## What the example demonstrates
|
|
25
|
+
|
|
26
|
+
[Custom Layout](?path=/docs/layouts-custom-layout--docs) explains how a project layout works. This page uses the same element for a product that has no model: the configuration backend, with its spec, rules, storage and finalize actions, runs a form.
|
|
27
|
+
|
|
28
|
+
| Piece | Where |
|
|
29
|
+
| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- |
|
|
30
|
+
| A `ConfiguratorLayout` that mounts no `LayoutSlots.SharedCanvas` | [A configurator with no scene](#a-configurator-with-no-scene) |
|
|
31
|
+
| `navigationSteps` with `phx.frontend.useStepNavigation()` | `StepHeader`, [Steps from the spec](#steps-from-the-spec) |
|
|
32
|
+
| `$filter.active` with `$eval`, and `phx.frontend.useComponent()` to follow it | `ChoiceField`, [Questions that depend on earlier answers](#questions-that-depend-on-earlier-answers) |
|
|
33
|
+
| `attributeSelection` options read from an expression | [Options that follow the configuration](#options-that-follow-the-configuration) |
|
|
34
|
+
| `warning` invariants shown at the field, read with `phx.frontend.useFinalizeViolations()` | `useWarnings`, `FieldShell`, [Validation from invariants](#validation-from-invariants) |
|
|
35
|
+
| Typed expressions declared in `expressions:` and read with `phx.frontend.useRootEntityState()` | `PriceBreakdown`, [A live price breakdown](#a-live-price-breakdown) |
|
|
36
|
+
| `genericDimension`, `attributeSwitch` and `textValue` controls in the layout's own inputs | `NumberField`, `SwitchField`, `TextInputField` |
|
|
37
|
+
| `phx.frontend.useFinalizeActions()` with a project handler that stands in for a webhook | `QuoteAction`, `request-quote.ts`, [Request a quote](#request-a-quote) |
|
|
38
|
+
| `phx.frontend.useUndoRedo()` in the brand bar | `DesktopPage` |
|
|
39
|
+
|
|
40
|
+
## A configurator with no scene
|
|
41
|
+
|
|
42
|
+
`src/elements/ConfiguratorLayout.tsx` mounts the services and a page, and never `LayoutSlots.SharedCanvas`. Without a canvas the app loader leaves as soon as the configuration is up, nothing waits for a scene, and no model, environment map or texture is downloaded, even when the spec names one; see [Configurator Interface → App Loader](?path=/docs/phoenix-configurator-interface--docs#app-loader). The spec needs no camera and no scene component.
|
|
43
|
+
|
|
44
|
+
```tsx
|
|
45
|
+
import { Box } from '@mui/material'
|
|
46
|
+
|
|
47
|
+
import { LayoutSlots } from '@salsita-ai/sdk/configurator'
|
|
48
|
+
|
|
49
|
+
import { ARDENT } from '../_form/index.js'
|
|
50
|
+
import { DesktopPage } from '../_shared/DesktopPage.js'
|
|
51
|
+
import { PhonePage } from '../_shared/PhonePage.js'
|
|
52
|
+
|
|
53
|
+
// A quote builder with no scene: the layout mounts the services and a page, never `LayoutSlots.SharedCanvas`, so the
|
|
54
|
+
// configurator loads no 3D scene and the app loader does not wait for one. Desktop or phone follows the width of the
|
|
55
|
+
// configurator's container.
|
|
56
|
+
const ConfiguratorLayout = () => {
|
|
57
|
+
// `null` until the container has been measured
|
|
58
|
+
const viewports = phx.frontend.useActiveViewports()
|
|
59
|
+
const isDesktop = viewports?.includes('desktop') ?? false
|
|
60
|
+
|
|
61
|
+
return (
|
|
62
|
+
<Box component="div" sx={{ position: 'absolute', inset: 0, overflow: 'clip', bgcolor: ARDENT.page }}>
|
|
63
|
+
<LayoutSlots.Services />
|
|
64
|
+
{viewports !== null && (isDesktop ? <DesktopPage /> : <PhonePage />)}
|
|
65
|
+
</Box>
|
|
66
|
+
)
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export default phx.frontend.createCustomPhoenixLayoutElement('ConfiguratorLayout', ConfiguratorLayout)
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
`phx.frontend.useActiveViewports()` measures the configurator's container, not the window, so the **Phone** story's 390-pixel frame shows the phone page. Finalizing works the same without a canvas, as long as the spec asks for no client-side images: an image capture waits for a canvas and fails after 10 seconds without one.
|
|
73
|
+
|
|
74
|
+
## Steps from the spec
|
|
75
|
+
|
|
76
|
+
The steps are the spec's `navigationSteps`. Each step names the navigation state it enters; the last one also holds `requested`, the state the quote handler enters, so the review stays the active step after the request.
|
|
77
|
+
|
|
78
|
+
```yaml
|
|
79
|
+
navigationStates:
|
|
80
|
+
- duty
|
|
81
|
+
- treatment
|
|
82
|
+
- installation
|
|
83
|
+
- service
|
|
84
|
+
- review
|
|
85
|
+
- requested
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
```yaml
|
|
89
|
+
components:
|
|
90
|
+
Compressor:
|
|
91
|
+
navigationSteps:
|
|
92
|
+
main:
|
|
93
|
+
steps:
|
|
94
|
+
- label: Duty
|
|
95
|
+
navigationStates:
|
|
96
|
+
- duty
|
|
97
|
+
- label: Air treatment
|
|
98
|
+
navigationStates:
|
|
99
|
+
- treatment
|
|
100
|
+
- label: Installation
|
|
101
|
+
navigationStates:
|
|
102
|
+
- installation
|
|
103
|
+
- label: Service and delivery
|
|
104
|
+
navigationStates:
|
|
105
|
+
- service
|
|
106
|
+
- label: Review
|
|
107
|
+
navigationStates:
|
|
108
|
+
- review
|
|
109
|
+
- requested
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
`StepHeader` draws them with `phx.frontend.useStepNavigation()`: each step has a `label`, a `status` of `complete`, `active` or `upcoming`, and `goTo(index)` enters it. The hook enforces no order, so the engineer can jump back to any step from the review. A step that holds a conflict carries a mark until it is resolved; which step resolves which invariant is the layout's own map, `STEP_WARNINGS`. `StepForm` renders the active step's sections by switching on `phx.frontend.useActiveNavigationState()`, and the page's **Back** and **Next** buttons call `previous()` and `next()`.
|
|
113
|
+
|
|
114
|
+
```tsx
|
|
115
|
+
import { Box, ButtonBase, Typography } from '@mui/material'
|
|
116
|
+
|
|
117
|
+
import { ARDENT, useWarnings } from '../_form/index.js'
|
|
118
|
+
import { STEP_WARNINGS } from './step-warnings.js'
|
|
119
|
+
|
|
120
|
+
const CHECK_ICON = 'M5 12.5 10 17.5 19 7'
|
|
121
|
+
|
|
122
|
+
interface StepHeaderProps {
|
|
123
|
+
readonly compact: boolean
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
// The spec's `navigationSteps` as a stepper. Every step can be entered, in any order; a step that holds a warning
|
|
127
|
+
// carries a mark until the warning is resolved. On a phone the stepper is one line with a segmented progress bar.
|
|
128
|
+
export const StepHeader = ({ compact }: StepHeaderProps) => {
|
|
129
|
+
const { steps, activeStep, goTo } = phx.frontend.useStepNavigation()
|
|
130
|
+
const warnings = useWarnings()
|
|
131
|
+
|
|
132
|
+
const hasWarning = (states: readonly string[]) => {
|
|
133
|
+
return states.some(state => warnings.some(warning => STEP_WARNINGS[state]?.includes(warning.type)))
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
if (compact) {
|
|
137
|
+
return (
|
|
138
|
+
<Box
|
|
139
|
+
component="nav"
|
|
140
|
+
aria-label="Quote steps"
|
|
141
|
+
sx={{ display: 'grid', gap: 1, paddingInline: 2, paddingBlock: 1.5 }}
|
|
142
|
+
>
|
|
143
|
+
<Box component="div" sx={{ display: 'flex', alignItems: 'baseline', gap: 1 }}>
|
|
144
|
+
<Typography sx={{ fontFamily: ARDENT.font, fontSize: 13, color: ARDENT.steel }}>
|
|
145
|
+
Step {(activeStep?.index ?? 0) + 1} of {steps.length}
|
|
146
|
+
</Typography>
|
|
147
|
+
<Typography component="h2" sx={{ fontFamily: ARDENT.font, fontSize: 17, fontWeight: 600, color: ARDENT.ink }}>
|
|
148
|
+
{activeStep?.label}
|
|
149
|
+
</Typography>
|
|
150
|
+
</Box>
|
|
151
|
+
<Box component="ol" sx={{ display: 'flex', gap: 0.5, margin: 0, padding: 0, listStyle: 'none' }}>
|
|
152
|
+
{steps.map(step => (
|
|
153
|
+
<Box component="li" key={step.state} sx={{ flex: 1 }}>
|
|
154
|
+
<ButtonBase
|
|
155
|
+
aria-label={`${step.label}${hasWarning(step.navigationStates) ? ', needs attention' : ''}`}
|
|
156
|
+
aria-current={step.status === 'active' ? 'step' : undefined}
|
|
157
|
+
onClick={() => goTo(step.index)}
|
|
158
|
+
sx={{
|
|
159
|
+
display: 'block',
|
|
160
|
+
inlineSize: '100%',
|
|
161
|
+
blockSize: 6,
|
|
162
|
+
borderRadius: 3,
|
|
163
|
+
// A bigger target than the bar itself, for a finger
|
|
164
|
+
outline: '8px solid transparent',
|
|
165
|
+
bgcolor: hasWarning(step.navigationStates)
|
|
166
|
+
? ARDENT.warning
|
|
167
|
+
: step.status === 'upcoming'
|
|
168
|
+
? ARDENT.line
|
|
169
|
+
: ARDENT.signal,
|
|
170
|
+
}}
|
|
171
|
+
/>
|
|
172
|
+
</Box>
|
|
173
|
+
))}
|
|
174
|
+
</Box>
|
|
175
|
+
</Box>
|
|
176
|
+
)
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
return (
|
|
180
|
+
<Box
|
|
181
|
+
component="nav"
|
|
182
|
+
aria-label="Quote steps"
|
|
183
|
+
sx={{ display: 'flex', alignItems: 'center', gap: 1, paddingInline: 4, paddingBlock: 1.5, overflowX: 'auto' }}
|
|
184
|
+
>
|
|
185
|
+
{steps.map((step, index) => {
|
|
186
|
+
const warn = hasWarning(step.navigationStates)
|
|
187
|
+
const isActive = step.status === 'active'
|
|
188
|
+
const isComplete = step.status === 'complete'
|
|
189
|
+
|
|
190
|
+
return (
|
|
191
|
+
<Box component="div" key={step.state} sx={{ display: 'flex', alignItems: 'center', gap: 1, flex: 'none' }}>
|
|
192
|
+
{index > 0 && (
|
|
193
|
+
<Box
|
|
194
|
+
component="span"
|
|
195
|
+
aria-hidden
|
|
196
|
+
sx={{ inlineSize: 32, blockSize: 2, bgcolor: isComplete || isActive ? ARDENT.signal : ARDENT.line }}
|
|
197
|
+
/>
|
|
198
|
+
)}
|
|
199
|
+
<ButtonBase
|
|
200
|
+
aria-current={isActive ? 'step' : undefined}
|
|
201
|
+
onClick={() => goTo(step.index)}
|
|
202
|
+
sx={{
|
|
203
|
+
display: 'flex',
|
|
204
|
+
alignItems: 'center',
|
|
205
|
+
gap: 1,
|
|
206
|
+
paddingInline: 1,
|
|
207
|
+
paddingBlock: 0.75,
|
|
208
|
+
borderRadius: 2,
|
|
209
|
+
'&:hover': { bgcolor: ARDENT.page },
|
|
210
|
+
'&.Mui-focusVisible': { outline: `2px solid ${ARDENT.navy}` },
|
|
211
|
+
}}
|
|
212
|
+
>
|
|
213
|
+
<Box
|
|
214
|
+
component="span"
|
|
215
|
+
sx={{
|
|
216
|
+
display: 'grid',
|
|
217
|
+
placeItems: 'center',
|
|
218
|
+
inlineSize: 28,
|
|
219
|
+
blockSize: 28,
|
|
220
|
+
borderRadius: '50%',
|
|
221
|
+
fontFamily: ARDENT.font,
|
|
222
|
+
fontSize: 14,
|
|
223
|
+
fontWeight: 600,
|
|
224
|
+
color: isActive || isComplete ? ARDENT.panel : ARDENT.steel,
|
|
225
|
+
bgcolor: isActive ? ARDENT.signal : isComplete ? ARDENT.navy : 'transparent',
|
|
226
|
+
border: isActive || isComplete ? 'none' : `2px solid ${ARDENT.line}`,
|
|
227
|
+
}}
|
|
228
|
+
>
|
|
229
|
+
{isComplete ? (
|
|
230
|
+
<Box component="svg" viewBox="0 0 24 24" aria-hidden sx={{ inlineSize: 16, blockSize: 16 }}>
|
|
231
|
+
<path d={CHECK_ICON} fill="none" stroke="currentColor" strokeWidth={3} strokeLinecap="round" />
|
|
232
|
+
</Box>
|
|
233
|
+
) : (
|
|
234
|
+
index + 1
|
|
235
|
+
)}
|
|
236
|
+
</Box>
|
|
237
|
+
<Typography
|
|
238
|
+
component="span"
|
|
239
|
+
sx={{
|
|
240
|
+
fontFamily: ARDENT.font,
|
|
241
|
+
fontSize: 15,
|
|
242
|
+
fontWeight: isActive ? 600 : 500,
|
|
243
|
+
color: isActive ? ARDENT.ink : ARDENT.steel,
|
|
244
|
+
whiteSpace: 'nowrap',
|
|
245
|
+
}}
|
|
246
|
+
>
|
|
247
|
+
{step.label}
|
|
248
|
+
</Typography>
|
|
249
|
+
{warn && (
|
|
250
|
+
<Box
|
|
251
|
+
component="span"
|
|
252
|
+
role="img"
|
|
253
|
+
aria-label="needs attention"
|
|
254
|
+
sx={{ inlineSize: 8, blockSize: 8, borderRadius: '50%', bgcolor: ARDENT.warning }}
|
|
255
|
+
/>
|
|
256
|
+
)}
|
|
257
|
+
</ButtonBase>
|
|
258
|
+
</Box>
|
|
259
|
+
)
|
|
260
|
+
})}
|
|
261
|
+
</Box>
|
|
262
|
+
)
|
|
263
|
+
}
|
|
264
|
+
```
|
|
265
|
+
|
|
266
|
+
## Questions that depend on earlier answers
|
|
267
|
+
|
|
268
|
+
A question that only makes sense after an earlier answer is a spec component with a filter. The dew point is asked only with a desiccant dryer, and heat recovery only for a water-cooled machine:
|
|
269
|
+
|
|
270
|
+
```yaml
|
|
271
|
+
components:
|
|
272
|
+
Compressor:
|
|
273
|
+
attributeSelection:
|
|
274
|
+
dewPoint:
|
|
275
|
+
value:
|
|
276
|
+
$bind: dewPoint
|
|
277
|
+
options:
|
|
278
|
+
- label: −40 °C
|
|
279
|
+
description: Outdoor lines, food and pharma
|
|
280
|
+
value: Minus40
|
|
281
|
+
- label: −70 °C
|
|
282
|
+
description: Electronics and laboratories
|
|
283
|
+
value: Minus70
|
|
284
|
+
$filter:
|
|
285
|
+
active:
|
|
286
|
+
$eval: self.dryer === 'Desiccant'
|
|
287
|
+
attributeSwitch:
|
|
288
|
+
heatRecovery:
|
|
289
|
+
value:
|
|
290
|
+
$bind: heatRecovery
|
|
291
|
+
$filter:
|
|
292
|
+
active:
|
|
293
|
+
$eval: self.cooling === 'Water'
|
|
294
|
+
```
|
|
295
|
+
|
|
296
|
+
The layout lists every field of a step and lets the spec decide which exist. A control hook such as `phx.frontend.useAttributeSelection()` throws when its component is not active, so `ChoiceField` first asks `phx.frontend.useComponent()` for the component and mounts the cards only when it is there. `SwitchField` does the same for `attributeSwitch`. The value of a hidden question stays in the configuration, so the expressions and the summary read it only where the question applies, such as the dew point of a desiccant dryer.
|
|
297
|
+
|
|
298
|
+
```tsx
|
|
299
|
+
import { Box, ButtonBase, Typography } from '@mui/material'
|
|
300
|
+
import type { KeyboardEvent } from 'react'
|
|
301
|
+
|
|
302
|
+
import { attributeSelectionComponent } from '@salsita-ai/sdk/domain'
|
|
303
|
+
|
|
304
|
+
import { FieldShell } from './FieldShell.js'
|
|
305
|
+
import { ARDENT } from './tokens.js'
|
|
306
|
+
|
|
307
|
+
// Arrow keys move the selection between the cards, as in a native radio group
|
|
308
|
+
const ARROW_STEPS: Readonly<Record<string, number | undefined>> = {
|
|
309
|
+
ArrowRight: 1,
|
|
310
|
+
ArrowDown: 1,
|
|
311
|
+
ArrowLeft: -1,
|
|
312
|
+
ArrowUp: -1,
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
interface ChoiceFieldProps {
|
|
316
|
+
readonly instanceName: string
|
|
317
|
+
readonly label: string
|
|
318
|
+
readonly hint?: string
|
|
319
|
+
readonly warningTypes?: readonly string[]
|
|
320
|
+
readonly readOnly: boolean
|
|
321
|
+
// The narrowest a card gets before the cards wrap onto another row
|
|
322
|
+
readonly minCardWidth?: number
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
const ChoiceCards = ({ instanceName, label, hint, warningTypes, readOnly, minCardWidth = 150 }: ChoiceFieldProps) => {
|
|
326
|
+
const resolve = phx.frontend.useResolveLocalizable()
|
|
327
|
+
const compressorId = phx.frontend.useRootEntityId()
|
|
328
|
+
const { value, options } = phx.frontend.useAttributeSelection(compressorId, instanceName)
|
|
329
|
+
// An option a `fixable` or `fatal` invariant rules out is `disabled`, with the reason in its `hint`
|
|
330
|
+
const optionHint = options.find(option => option.disabled && option.hint)?.hint
|
|
331
|
+
|
|
332
|
+
const handleKeyDown = (event: KeyboardEvent<HTMLElement>, index: number) => {
|
|
333
|
+
const step = ARROW_STEPS[event.key]
|
|
334
|
+
|
|
335
|
+
if (step === undefined) {
|
|
336
|
+
return
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
event.preventDefault()
|
|
340
|
+
const next = (index + step + options.length) % options.length
|
|
341
|
+
options[next]?.onSelect()
|
|
342
|
+
event.currentTarget.parentElement?.querySelectorAll<HTMLElement>('[role="radio"]')[next]?.focus()
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
return (
|
|
346
|
+
<FieldShell id={`ardent-${instanceName}`} label={label} hint={optionHint ?? hint} warningTypes={warningTypes}>
|
|
347
|
+
<Box
|
|
348
|
+
component="div"
|
|
349
|
+
role="radiogroup"
|
|
350
|
+
aria-labelledby={`ardent-${instanceName}-label`}
|
|
351
|
+
sx={{ display: 'grid', gridTemplateColumns: `repeat(auto-fit, minmax(${minCardWidth}px, 1fr))`, gap: 1.25 }}
|
|
352
|
+
>
|
|
353
|
+
{options.map((option, index) => {
|
|
354
|
+
const isSelected = option.value === value
|
|
355
|
+
const description = resolve(option.description)
|
|
356
|
+
|
|
357
|
+
return (
|
|
358
|
+
<ButtonBase
|
|
359
|
+
key={String(option.value)}
|
|
360
|
+
role="radio"
|
|
361
|
+
aria-checked={isSelected}
|
|
362
|
+
aria-disabled={option.disabled}
|
|
363
|
+
tabIndex={isSelected ? 0 : -1}
|
|
364
|
+
disabled={readOnly && !isSelected}
|
|
365
|
+
onClick={readOnly ? undefined : option.onSelect}
|
|
366
|
+
onKeyDown={readOnly ? undefined : event => handleKeyDown(event, index)}
|
|
367
|
+
sx={{
|
|
368
|
+
display: 'grid',
|
|
369
|
+
gridTemplateColumns: 'auto 1fr',
|
|
370
|
+
alignItems: 'start',
|
|
371
|
+
columnGap: 1.25,
|
|
372
|
+
rowGap: 0.25,
|
|
373
|
+
padding: 1.5,
|
|
374
|
+
textAlign: 'start',
|
|
375
|
+
borderRadius: 2,
|
|
376
|
+
border: `1px solid ${isSelected ? ARDENT.signal : ARDENT.line}`,
|
|
377
|
+
boxShadow: isSelected ? `inset 0 0 0 1px ${ARDENT.signal}` : 'none',
|
|
378
|
+
bgcolor: isSelected ? ARDENT.signalTint : ARDENT.panel,
|
|
379
|
+
fontFamily: ARDENT.font,
|
|
380
|
+
opacity: option.disabled ? 0.45 : 1,
|
|
381
|
+
transition: 'border-color 140ms, background-color 140ms',
|
|
382
|
+
'&:hover': { borderColor: isSelected ? ARDENT.signal : ARDENT.steel },
|
|
383
|
+
'&.Mui-focusVisible': { outline: `2px solid ${ARDENT.navy}`, outlineOffset: 2 },
|
|
384
|
+
'&.Mui-disabled': { opacity: 0.45 },
|
|
385
|
+
}}
|
|
386
|
+
>
|
|
387
|
+
{/* The radio mark: a ring, filled with a dot when the card is chosen */}
|
|
388
|
+
<Box
|
|
389
|
+
component="span"
|
|
390
|
+
aria-hidden
|
|
391
|
+
sx={{
|
|
392
|
+
gridRow: 'span 2',
|
|
393
|
+
marginBlockStart: 0.25,
|
|
394
|
+
inlineSize: 18,
|
|
395
|
+
blockSize: 18,
|
|
396
|
+
borderRadius: '50%',
|
|
397
|
+
border: `2px solid ${isSelected ? ARDENT.signal : ARDENT.steel}`,
|
|
398
|
+
boxShadow: isSelected ? `inset 0 0 0 3px ${ARDENT.signalTint}` : 'none',
|
|
399
|
+
bgcolor: isSelected ? ARDENT.signal : 'transparent',
|
|
400
|
+
}}
|
|
401
|
+
/>
|
|
402
|
+
<Typography
|
|
403
|
+
component="span"
|
|
404
|
+
sx={{ fontFamily: ARDENT.font, fontSize: 15, fontWeight: 600, color: ARDENT.ink }}
|
|
405
|
+
>
|
|
406
|
+
{resolve(option.title)}
|
|
407
|
+
</Typography>
|
|
408
|
+
{description && (
|
|
409
|
+
<Typography
|
|
410
|
+
component="span"
|
|
411
|
+
sx={{ fontFamily: ARDENT.font, fontSize: 13, lineHeight: 1.35, color: ARDENT.steel }}
|
|
412
|
+
>
|
|
413
|
+
{description}
|
|
414
|
+
</Typography>
|
|
415
|
+
)}
|
|
416
|
+
</ButtonBase>
|
|
417
|
+
)
|
|
418
|
+
})}
|
|
419
|
+
</Box>
|
|
420
|
+
</FieldShell>
|
|
421
|
+
)
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
// One `attributeSelection` of the spec as a group of cards. The field exists only while the spec's component is
|
|
425
|
+
// active: a `$filter` in the spec decides when a question is asked, and the layout follows it. The control hook throws
|
|
426
|
+
// for an inactive component, so the cards mount only after `useComponent` has found it. An option that a `fixable`
|
|
427
|
+
// invariant rules out is faded with its hint below the cards; it stays clickable, the change is rejected and the
|
|
428
|
+
// built-in snackbar says why.
|
|
429
|
+
export const ChoiceField = (props: ChoiceFieldProps) => {
|
|
430
|
+
const compressorId = phx.frontend.useRootEntityId()
|
|
431
|
+
const component = phx.frontend.useComponent({
|
|
432
|
+
entityId: compressorId,
|
|
433
|
+
componentType: attributeSelectionComponent,
|
|
434
|
+
instanceName: props.instanceName,
|
|
435
|
+
})
|
|
436
|
+
|
|
437
|
+
return component === null ? null : <ChoiceCards {...props} />
|
|
438
|
+
}
|
|
439
|
+
```
|
|
440
|
+
|
|
441
|
+
## Options that follow the configuration
|
|
442
|
+
|
|
443
|
+
The delivery options name their lead time, and express delivery is offered only for the stock frames up to 110 kW. The options are an expression instead of a list:
|
|
444
|
+
|
|
445
|
+
```yaml
|
|
446
|
+
components:
|
|
447
|
+
Compressor:
|
|
448
|
+
attributeSelection:
|
|
449
|
+
delivery:
|
|
450
|
+
value:
|
|
451
|
+
$bind: delivery
|
|
452
|
+
options:
|
|
453
|
+
$read: $deliveryOptions
|
|
454
|
+
```
|
|
455
|
+
|
|
456
|
+
`$deliveryOptions` in `src/expressions/compressor.ts` returns `{ label, description, value }` entries, "Standard, 6 weeks" and "Express, 3 weeks" for the first configuration. When a larger frame drops the express option while it is chosen, no card is selected and the `expressUnavailable` warning below tells the engineer to choose again.
|
|
457
|
+
|
|
458
|
+
## Validation from invariants
|
|
459
|
+
|
|
460
|
+
The rules between choices are invariants of the spec. Every one is a `warning`: a change that breaks it is kept, so the engineer sees the conflict and fixes it where it is shown, and finalizing waits until no warning is left. A `fixable` or `fatal` invariant would reject the change instead, as the [Kestrel Kettle](?path=/docs/layouts-gallery-kestrel-kettle--docs#a-rule-between-two-choices) shows. Two rules name numbers in their message, so they are declared with `types` and build the message in code.
|
|
461
|
+
|
|
462
|
+
```yaml
|
|
463
|
+
invariants:
|
|
464
|
+
Compressor:
|
|
465
|
+
flowRange:
|
|
466
|
+
types:
|
|
467
|
+
- flowAboveRange
|
|
468
|
+
desiccantNeedsFiltration:
|
|
469
|
+
type: desiccantNeedsFiltration
|
|
470
|
+
severity: warning
|
|
471
|
+
message: A desiccant dryer needs high-efficiency or oil-vapour filtration upstream, or oil aerosol spoils the desiccant.
|
|
472
|
+
receiverSize:
|
|
473
|
+
types:
|
|
474
|
+
- receiverTooSmall
|
|
475
|
+
expressUnavailable:
|
|
476
|
+
type: expressUnavailable
|
|
477
|
+
severity: warning
|
|
478
|
+
message: Express delivery covers stock frames up to 110 kW. Choose standard delivery for this frame.
|
|
479
|
+
companyMissing:
|
|
480
|
+
type: companyMissing
|
|
481
|
+
severity: warning
|
|
482
|
+
message: Enter the company the quote is for.
|
|
483
|
+
emailInvalid:
|
|
484
|
+
type: emailInvalid
|
|
485
|
+
severity: warning
|
|
486
|
+
message: Enter a valid email address for the quote.
|
|
487
|
+
```
|
|
488
|
+
|
|
489
|
+
```ts
|
|
490
|
+
const PRESSURE_LABEL = { Bar7: '7.5 bar', Bar10: '10 bar', Bar13: '13 bar' }
|
|
491
|
+
const RECEIVER_LITRES = { None: 0, Litres500: 500, Litres1000: 1000, Litres2000: 2000 }
|
|
492
|
+
const EMAIL = /^[^\s@]+@[^\s@]+\.[^\s@]{2,}$/
|
|
493
|
+
|
|
494
|
+
// Each rule is a `warning` in the spec: a change that breaks it is kept, so the customer can fix the conflict where it
|
|
495
|
+
// is shown, and finalizing waits until no warning is left
|
|
496
|
+
export default phx.domain.implementCustomInvariants({
|
|
497
|
+
Compressor: {
|
|
498
|
+
// The largest frame delivers less air at a higher pressure, so the limit depends on an earlier choice
|
|
499
|
+
flowRange: s => {
|
|
500
|
+
if (s.flow <= s.$maxFlow) {
|
|
501
|
+
return []
|
|
502
|
+
}
|
|
503
|
+
|
|
504
|
+
return [
|
|
505
|
+
{
|
|
506
|
+
type: 'flowAboveRange',
|
|
507
|
+
severity: 'warning',
|
|
508
|
+
message: `At ${PRESSURE_LABEL[s.pressure]} the largest frame delivers ${s.$maxFlow.toFixed(1)} m³/min. Lower the flow or the pressure.`,
|
|
509
|
+
},
|
|
510
|
+
]
|
|
511
|
+
},
|
|
512
|
+
desiccantNeedsFiltration: s => {
|
|
513
|
+
return s.dryer !== 'Desiccant' || s.filtration !== 'General'
|
|
514
|
+
},
|
|
515
|
+
// The message names the size the flow needs, so it is built here rather than in the spec
|
|
516
|
+
receiverSize: s => {
|
|
517
|
+
if (RECEIVER_LITRES[s.receiver] >= s.$minReceiverLitres) {
|
|
518
|
+
return []
|
|
519
|
+
}
|
|
520
|
+
|
|
521
|
+
return [
|
|
522
|
+
{
|
|
523
|
+
type: 'receiverTooSmall',
|
|
524
|
+
severity: 'warning',
|
|
525
|
+
message: `A fixed-speed compressor at ${s.flow.toFixed(1)} m³/min needs a receiver of at least ${s.$minReceiverLitres.toLocaleString('en')} L.`,
|
|
526
|
+
},
|
|
527
|
+
]
|
|
528
|
+
},
|
|
529
|
+
expressUnavailable: s => {
|
|
530
|
+
return s.delivery !== 'Express' || s.$frameKw <= 110
|
|
531
|
+
},
|
|
532
|
+
companyMissing: s => {
|
|
533
|
+
return s.company.trim().length > 0
|
|
534
|
+
},
|
|
535
|
+
emailInvalid: s => {
|
|
536
|
+
return EMAIL.test(s.email.trim())
|
|
537
|
+
},
|
|
538
|
+
},
|
|
539
|
+
})
|
|
540
|
+
```
|
|
541
|
+
|
|
542
|
+
The flow's limit depends on the pressure: at 13 bar the largest frame delivers less air. The `flow` dimension keeps a fixed range of 2 to 40 m³/min and the `flowAboveRange` warning carries the limit. A `max` read from an expression would not do: a pressure change that leaves the flow above a dimension's `max` is rejected with a built-in message, so the engineer could not choose 13 bar at all.
|
|
543
|
+
|
|
544
|
+
`useWarnings` resolves the warnings of the committed configuration. It reads them from `phx.frontend.useFinalizeViolations()`, which lists the violations that block finalizing.
|
|
545
|
+
|
|
546
|
+
```ts
|
|
547
|
+
import { useMemo } from 'react'
|
|
548
|
+
|
|
549
|
+
export interface Warning {
|
|
550
|
+
readonly type: string
|
|
551
|
+
readonly text: string
|
|
552
|
+
}
|
|
553
|
+
|
|
554
|
+
// The warnings of the committed configuration with their text resolved. A `warning` invariant keeps the change, so its
|
|
555
|
+
// violation stays in the committed state until the customer resolves it, and finalizing waits for that.
|
|
556
|
+
// `useFinalizeViolations` lists them.
|
|
557
|
+
export const useWarnings = (): readonly Warning[] => {
|
|
558
|
+
const { violations } = phx.frontend.useFinalizeViolations()
|
|
559
|
+
const resolve = phx.frontend.useResolveLocalizable()
|
|
560
|
+
|
|
561
|
+
return useMemo(() => {
|
|
562
|
+
return (violations ?? []).map(({ violation }) => ({ type: violation.type, text: resolve(violation.message) ?? '' }))
|
|
563
|
+
}, [violations, resolve])
|
|
564
|
+
}
|
|
565
|
+
```
|
|
566
|
+
|
|
567
|
+
`FieldShell` shows a field's warning below its input in place of the help text. A field names the types it can resolve, so the receiver field shows the receiver rule and the filter package the desiccant rule. The contact fields on the review step show theirs once the engineer has left the field, or after a request was attempted. The review step also lists every conflict left, each with a button to the step that resolves it.
|
|
568
|
+
|
|
569
|
+
## A live price breakdown
|
|
570
|
+
|
|
571
|
+
Every number of the breakdown is an expression. Declaring them in `expressions:` types them for the layout: `phx.frontend.useRootEntityState()` returns the root entity with its expressions, so `$quoteLines` is an array of `{ key, label, detail, amount }`. An expression that is only inferred from where the spec reads it gets the type of that place, which can be wider than the layout wants.
|
|
572
|
+
|
|
573
|
+
```yaml
|
|
574
|
+
expressions:
|
|
575
|
+
Compressor:
|
|
576
|
+
$leadTimeWeeks:
|
|
577
|
+
type: number
|
|
578
|
+
$quoteLines:
|
|
579
|
+
type: array
|
|
580
|
+
items:
|
|
581
|
+
type: object
|
|
582
|
+
properties:
|
|
583
|
+
key:
|
|
584
|
+
type: string
|
|
585
|
+
label:
|
|
586
|
+
type: string
|
|
587
|
+
detail:
|
|
588
|
+
type: string
|
|
589
|
+
amount:
|
|
590
|
+
type: number
|
|
591
|
+
required:
|
|
592
|
+
- key
|
|
593
|
+
- label
|
|
594
|
+
- detail
|
|
595
|
+
- amount
|
|
596
|
+
additionalProperties: false
|
|
597
|
+
$subtotal:
|
|
598
|
+
type: number
|
|
599
|
+
$leadTimeSurcharge:
|
|
600
|
+
type: number
|
|
601
|
+
$total:
|
|
602
|
+
type: number
|
|
603
|
+
```
|
|
604
|
+
|
|
605
|
+
`src/expressions/compressor.ts` picks the smallest frame that delivers the flow at the pressure and prices it, then adds a line for each option that costs extra: the variable speed drive, the dryer, the filters, water cooling and heat recovery, the receiver, the canopy, the 60 Hz build, the service plan and commissioning. Express delivery adds 8 % of the subtotal. The `price` component reads `$total`, so `phx.frontend.useRootEntityPrice()` formats the total in the component's currency:
|
|
606
|
+
|
|
607
|
+
```yaml
|
|
608
|
+
components:
|
|
609
|
+
Compressor:
|
|
610
|
+
price:
|
|
611
|
+
main:
|
|
612
|
+
price:
|
|
613
|
+
$read: $total
|
|
614
|
+
currency: EUR
|
|
615
|
+
```
|
|
616
|
+
|
|
617
|
+
```tsx
|
|
618
|
+
import { Box, Typography } from '@mui/material'
|
|
619
|
+
|
|
620
|
+
import { ARDENT, OVERLINE_SX } from '../_form/index.js'
|
|
621
|
+
|
|
622
|
+
const formatEuro = (amount: number) => {
|
|
623
|
+
return amount.toLocaleString('en-IE', { style: 'currency', currency: 'EUR', maximumFractionDigits: 0 })
|
|
624
|
+
}
|
|
625
|
+
|
|
626
|
+
const ROW_SX = {
|
|
627
|
+
display: 'grid',
|
|
628
|
+
gridTemplateColumns: '1fr auto',
|
|
629
|
+
columnGap: 2,
|
|
630
|
+
alignItems: 'baseline',
|
|
631
|
+
paddingBlock: 1,
|
|
632
|
+
} as const
|
|
633
|
+
|
|
634
|
+
// The quote's lines, subtotal, lead-time surcharge and total. Every number comes from an expression of the spec
|
|
635
|
+
// (`$quoteLines`, `$subtotal`, `$leadTimeSurcharge`, `$leadTimeWeeks`), read from the root entity, so the breakdown
|
|
636
|
+
// changes with each choice, and the total is the `price` component's value.
|
|
637
|
+
export const PriceBreakdown = () => {
|
|
638
|
+
const compressor = phx.frontend.useRootEntityState()
|
|
639
|
+
const total = phx.frontend.useRootEntityPrice()
|
|
640
|
+
|
|
641
|
+
return (
|
|
642
|
+
<Box component="section" aria-label="Price breakdown" sx={{ display: 'grid', fontFamily: ARDENT.font }}>
|
|
643
|
+
<Typography component="h2" sx={{ ...OVERLINE_SX, paddingBlockEnd: 1 }}>
|
|
644
|
+
Price breakdown
|
|
645
|
+
</Typography>
|
|
646
|
+
|
|
647
|
+
<Box component="ul" sx={{ margin: 0, padding: 0, listStyle: 'none' }}>
|
|
648
|
+
{compressor.$quoteLines.map(line => (
|
|
649
|
+
<Box component="li" key={line.key} sx={{ ...ROW_SX, borderBlockEnd: `1px solid ${ARDENT.line}` }}>
|
|
650
|
+
<Box component="div" sx={{ display: 'grid', minInlineSize: 0 }}>
|
|
651
|
+
<Typography
|
|
652
|
+
component="span"
|
|
653
|
+
sx={{ fontFamily: ARDENT.font, fontSize: 15, fontWeight: 500, color: ARDENT.ink }}
|
|
654
|
+
>
|
|
655
|
+
{line.label}
|
|
656
|
+
</Typography>
|
|
657
|
+
<Typography component="span" sx={{ fontFamily: ARDENT.font, fontSize: 13, color: ARDENT.steel }}>
|
|
658
|
+
{line.detail}
|
|
659
|
+
</Typography>
|
|
660
|
+
</Box>
|
|
661
|
+
<Typography
|
|
662
|
+
component="span"
|
|
663
|
+
sx={{ fontFamily: ARDENT.font, fontSize: 15, color: ARDENT.ink, fontVariantNumeric: 'tabular-nums' }}
|
|
664
|
+
>
|
|
665
|
+
{formatEuro(line.amount)}
|
|
666
|
+
</Typography>
|
|
667
|
+
</Box>
|
|
668
|
+
))}
|
|
669
|
+
</Box>
|
|
670
|
+
|
|
671
|
+
<Box component="div" sx={{ ...ROW_SX, paddingBlockStart: 1.5 }}>
|
|
672
|
+
<Typography component="span" sx={{ fontFamily: ARDENT.font, fontSize: 15, color: ARDENT.steel }}>
|
|
673
|
+
Subtotal
|
|
674
|
+
</Typography>
|
|
675
|
+
<Typography
|
|
676
|
+
component="span"
|
|
677
|
+
sx={{ fontFamily: ARDENT.font, fontSize: 15, color: ARDENT.ink, fontVariantNumeric: 'tabular-nums' }}
|
|
678
|
+
>
|
|
679
|
+
{formatEuro(compressor.$subtotal)}
|
|
680
|
+
</Typography>
|
|
681
|
+
</Box>
|
|
682
|
+
{compressor.$leadTimeSurcharge > 0 && (
|
|
683
|
+
<Box component="div" sx={ROW_SX}>
|
|
684
|
+
<Typography component="span" sx={{ fontFamily: ARDENT.font, fontSize: 15, color: ARDENT.steel }}>
|
|
685
|
+
Express delivery surcharge
|
|
686
|
+
</Typography>
|
|
687
|
+
<Typography
|
|
688
|
+
component="span"
|
|
689
|
+
sx={{ fontFamily: ARDENT.font, fontSize: 15, color: ARDENT.ink, fontVariantNumeric: 'tabular-nums' }}
|
|
690
|
+
>
|
|
691
|
+
{formatEuro(compressor.$leadTimeSurcharge)}
|
|
692
|
+
</Typography>
|
|
693
|
+
</Box>
|
|
694
|
+
)}
|
|
695
|
+
|
|
696
|
+
<Box
|
|
697
|
+
component="div"
|
|
698
|
+
sx={{ ...ROW_SX, marginBlockStart: 1, paddingBlockStart: 1.5, borderBlockStart: `2px solid ${ARDENT.ink}` }}
|
|
699
|
+
>
|
|
700
|
+
<Typography component="span" sx={{ fontFamily: ARDENT.font, fontSize: 17, fontWeight: 600, color: ARDENT.ink }}>
|
|
701
|
+
Total, ex works
|
|
702
|
+
</Typography>
|
|
703
|
+
<Typography
|
|
704
|
+
component="span"
|
|
705
|
+
sx={{
|
|
706
|
+
fontFamily: ARDENT.font,
|
|
707
|
+
fontSize: 26,
|
|
708
|
+
fontWeight: 700,
|
|
709
|
+
color: ARDENT.ink,
|
|
710
|
+
fontVariantNumeric: 'tabular-nums',
|
|
711
|
+
}}
|
|
712
|
+
>
|
|
713
|
+
{total}
|
|
714
|
+
</Typography>
|
|
715
|
+
</Box>
|
|
716
|
+
<Typography sx={{ fontFamily: ARDENT.font, fontSize: 14, color: ARDENT.steel, textAlign: 'end' }}>
|
|
717
|
+
Lead time {compressor.$leadTimeWeeks} weeks · prices excl. VAT
|
|
718
|
+
</Typography>
|
|
719
|
+
</Box>
|
|
720
|
+
)
|
|
721
|
+
}
|
|
722
|
+
```
|
|
723
|
+
|
|
724
|
+
On a desktop the breakdown is a column beside the form. On a phone the total sits in the bottom bar and opens the breakdown as a sheet.
|
|
725
|
+
|
|
726
|
+
## Request a quote
|
|
727
|
+
|
|
728
|
+
The spec declares one finalize action. Its handler is project code registered with `phx.frontend.createPhoenixHandler`; in a deployed project it sends the configuration to the project's finalize webhook (see [Finalization](?path=/docs/phoenix-finalization--docs) and [Webhooks](?path=/docs/phoenix-webhooks--docs)), and a CPQ system behind that webhook prices and answers. Storybook has no server, so this handler waits and answers with a fixed engineer and a reference made from the configuration's id.
|
|
729
|
+
|
|
730
|
+
```yaml
|
|
731
|
+
components:
|
|
732
|
+
Compressor:
|
|
733
|
+
finalizeAction:
|
|
734
|
+
quote:
|
|
735
|
+
variant: primary
|
|
736
|
+
label: Request quote
|
|
737
|
+
title: Send the configuration to an application engineer for a firm quote
|
|
738
|
+
icon: PaperPlaneTilt
|
|
739
|
+
handler: requestQuote
|
|
740
|
+
```
|
|
741
|
+
|
|
742
|
+
```ts
|
|
743
|
+
import { useCallback } from 'react'
|
|
744
|
+
|
|
745
|
+
import { setQuoteReceipt } from '../_shared/quote-receipt.js'
|
|
746
|
+
|
|
747
|
+
const VALID_DAYS = 30
|
|
748
|
+
|
|
749
|
+
// Stands in for Ardent's quote service. A deployed project sends the configuration to its finalize webhook here and
|
|
750
|
+
// waits for the answer; this one answers after a moment with a fixed engineer and a reference made from the
|
|
751
|
+
// configuration's id, then enters the `requested` navigation state.
|
|
752
|
+
export default phx.frontend.createPhoenixHandler('requestQuote', () => {
|
|
753
|
+
const navigate = phx.frontend.useNavigate()
|
|
754
|
+
const configurationId = phx.frontend.useConfigurationId()
|
|
755
|
+
const total = phx.frontend.useRootEntityPrice()
|
|
756
|
+
|
|
757
|
+
return {
|
|
758
|
+
handler: useCallback(async () => {
|
|
759
|
+
await new Promise(resolve => setTimeout(resolve, 1600))
|
|
760
|
+
|
|
761
|
+
const validUntil = new Date(Date.now() + VALID_DAYS * 24 * 60 * 60 * 1000)
|
|
762
|
+
|
|
763
|
+
setQuoteReceipt({
|
|
764
|
+
reference: `AQ-${String(configurationId)
|
|
765
|
+
.replace(/[^a-z0-9]/gi, '')
|
|
766
|
+
.slice(-6)
|
|
767
|
+
.toUpperCase()}`,
|
|
768
|
+
engineer: 'Marta Kovács, application engineer',
|
|
769
|
+
validUntil: validUntil.toLocaleDateString('en-GB', { day: 'numeric', month: 'long', year: 'numeric' }),
|
|
770
|
+
total: total ?? '',
|
|
771
|
+
})
|
|
772
|
+
navigate('requested')
|
|
773
|
+
}, [configurationId, navigate, total]),
|
|
774
|
+
}
|
|
775
|
+
})
|
|
776
|
+
```
|
|
777
|
+
|
|
778
|
+
A finalize action's `run()` resolves without a value, so the answer has no way back to the layout through the action. The handler keeps it in a small store of the project's own, which the review step reads:
|
|
779
|
+
|
|
780
|
+
```ts
|
|
781
|
+
import { useSyncExternalStore } from 'react'
|
|
782
|
+
|
|
783
|
+
/** What the quote service answers when a quote is requested: the reference the engineer will quote against */
|
|
784
|
+
export interface QuoteReceipt {
|
|
785
|
+
readonly reference: string
|
|
786
|
+
readonly engineer: string
|
|
787
|
+
readonly validUntil: string
|
|
788
|
+
readonly total: string
|
|
789
|
+
}
|
|
790
|
+
|
|
791
|
+
let receipt: QuoteReceipt | null = null
|
|
792
|
+
const listeners = new Set<() => void>()
|
|
793
|
+
|
|
794
|
+
const subscribe = (listener: () => void) => {
|
|
795
|
+
listeners.add(listener)
|
|
796
|
+
|
|
797
|
+
return () => {
|
|
798
|
+
listeners.delete(listener)
|
|
799
|
+
}
|
|
800
|
+
}
|
|
801
|
+
|
|
802
|
+
// A finalize action's `run()` resolves without a value, so the `requestQuote` handler keeps the service's answer here
|
|
803
|
+
// for the layout to show. The project owns this store; the configurator does not persist it.
|
|
804
|
+
export const setQuoteReceipt = (next: QuoteReceipt | null) => {
|
|
805
|
+
receipt = next
|
|
806
|
+
listeners.forEach(listener => listener())
|
|
807
|
+
}
|
|
808
|
+
|
|
809
|
+
export const useQuoteReceipt = () => {
|
|
810
|
+
return useSyncExternalStore(subscribe, () => receipt)
|
|
811
|
+
}
|
|
812
|
+
```
|
|
813
|
+
|
|
814
|
+
`QuoteAction` runs the action from `phx.frontend.useFinalizeActions().primary`. While a warning holds, the action is `disabled` and `hints` lists the warnings; the button stays clickable and, instead of running, reveals the warnings of the contact fields the engineer has not visited yet. During the request the button shows a spinner and "Sending to an engineer…"; afterwards the review step shows the reference, the engineer, the validity and the quoted total, and **Back to summary** returns to the `review` state. A failed request would show the handler's error below the button. A viewer of a shared configuration sees no button.
|
|
815
|
+
|
|
816
|
+
```tsx
|
|
817
|
+
import { Alert, Box, Button, CircularProgress, Typography } from '@mui/material'
|
|
818
|
+
|
|
819
|
+
import { ARDENT } from '../_form/index.js'
|
|
820
|
+
|
|
821
|
+
interface QuoteActionProps {
|
|
822
|
+
// Called instead of running the action while a warning blocks it, so the layout can show every warning
|
|
823
|
+
readonly onBlocked: () => void
|
|
824
|
+
// Leaves out the list of what blocks the request, for the phone's bottom bar
|
|
825
|
+
readonly compact: boolean
|
|
826
|
+
}
|
|
827
|
+
|
|
828
|
+
// The spec's `quote` finalize action. While any warning holds, `useFinalizeActions` reports the action `disabled` with
|
|
829
|
+
// the warnings as `hints`: the button stays clickable and reveals them instead of running. A viewer sees no button.
|
|
830
|
+
export const QuoteAction = ({ onBlocked, compact }: QuoteActionProps) => {
|
|
831
|
+
const { primary, hints } = phx.frontend.useFinalizeActions()
|
|
832
|
+
const { accessInfo } = phx.frontend.useAccessService()
|
|
833
|
+
|
|
834
|
+
if (primary === null || accessInfo.viewMode) {
|
|
835
|
+
return null
|
|
836
|
+
}
|
|
837
|
+
|
|
838
|
+
return (
|
|
839
|
+
<Box component="div" sx={{ display: 'grid', gap: 1.25 }}>
|
|
840
|
+
<Button
|
|
841
|
+
variant="contained"
|
|
842
|
+
disableElevation
|
|
843
|
+
disabled={primary.isPending}
|
|
844
|
+
aria-disabled={primary.disabled}
|
|
845
|
+
title={primary.title}
|
|
846
|
+
onClick={() => (primary.disabled ? onBlocked() : void primary.run())}
|
|
847
|
+
startIcon={primary.isPending ? <CircularProgress size={18} color="inherit" /> : undefined}
|
|
848
|
+
sx={{
|
|
849
|
+
minBlockSize: 52,
|
|
850
|
+
borderRadius: 2,
|
|
851
|
+
bgcolor: primary.disabled ? ARDENT.steel : ARDENT.signal,
|
|
852
|
+
color: ARDENT.panel,
|
|
853
|
+
fontFamily: ARDENT.font,
|
|
854
|
+
fontSize: 17,
|
|
855
|
+
fontWeight: 600,
|
|
856
|
+
textTransform: 'none',
|
|
857
|
+
'&:hover': { bgcolor: primary.disabled ? ARDENT.steel : ARDENT.signalDark },
|
|
858
|
+
'&.Mui-disabled': { bgcolor: ARDENT.signal, color: ARDENT.panel, opacity: 0.7 },
|
|
859
|
+
}}
|
|
860
|
+
>
|
|
861
|
+
{primary.isPending ? 'Sending to an engineer…' : primary.label}
|
|
862
|
+
</Button>
|
|
863
|
+
{!compact && primary.disabled && hints && (
|
|
864
|
+
<Typography sx={{ fontFamily: ARDENT.font, fontSize: 14, lineHeight: 1.4, color: ARDENT.warning }}>
|
|
865
|
+
Resolve before requesting: {hints}
|
|
866
|
+
</Typography>
|
|
867
|
+
)}
|
|
868
|
+
{primary.error && (
|
|
869
|
+
<Alert severity="error">The quote could not be sent: {primary.error.message} Try again in a moment.</Alert>
|
|
870
|
+
)}
|
|
871
|
+
</Box>
|
|
872
|
+
)
|
|
873
|
+
}
|
|
874
|
+
```
|
|
875
|
+
|
|
876
|
+
## On a phone
|
|
877
|
+
|
|
878
|
+
The same layout in a frame 390 pixels wide. The stepper is one line with a segmented bar, the form scrolls, and the bottom bar holds the total, the lead time and the way on: **Next** on every step, **Request quote** on the review. Tapping the total opens the breakdown above the bar. Opened on its own from the sidebar, the **Phone** story sets Storybook's viewport to 390 × 844.
|
|
879
|
+
|
|
880
|
+
## Test cases
|
|
881
|
+
|
|
882
|
+
- The page opens on **Duty** with the RSV-75 frame selected for 9 m³/min at 10 bar. The breakdown lists the compressor, the refrigerant dryer, the 500 L receiver, the Essential plan and commissioning, a total of **€40,975.00** and a lead time of 6 weeks.
|
|
883
|
+
- Typing 30 into the flow selects the RSV-250 frame and the total rises to €111,640.00; the stepper marks **Installation**, where a fixed-speed machine at this flow needs a 1,200 L receiver.
|
|
884
|
+
- Choosing **13 bar** with a flow of 30 shows "At 13 bar the largest frame delivers 29.5 m³/min. Lower the flow or the pressure." under the flow and marks **Duty**; choosing 10 bar again removes it.
|
|
885
|
+
- **Variable speed** adds the "Variable speed drive" line and clears the receiver mark.
|
|
886
|
+
- On **Air treatment**, **Desiccant** makes **Pressure dew point** appear and shows the filtration warning under **Filter package**; **High efficiency** clears it; **Refrigerant** removes the dew point question again.
|
|
887
|
+
- On **Installation**, **Water-cooled** makes **Heat recovery** appear; turning it on adds the "Heat recovery" line.
|
|
888
|
+
- On **Service and delivery** with the RSV-250 frame, **Delivery** offers only standard delivery. With a flow of 12 it also offers express; choosing it adds the "Express delivery surcharge" and shortens the lead time.
|
|
889
|
+
- Raising the flow to 25 while express is chosen shows "Express delivery covers stock frames up to 110 kW. …" under **Delivery**.
|
|
890
|
+
- The **Review** step lists the conflict with **Go to Service and delivery**. **Request quote** reveals "Enter the company the quote is for." and "Enter a valid email address for the quote." under the empty contact fields and does not send.
|
|
891
|
+
- **Go to Service and delivery** and **Standard** delivery clear the conflict: the mark leaves the stepper and the list leaves the review.
|
|
892
|
+
- An email without a domain shows the email warning after leaving the field; a valid company and email clear both warnings and the text under **Request quote**.
|
|
893
|
+
- **Request quote** shows a spinner and "Sending to an engineer…" for about two seconds, then "Quote requested" with a reference, the engineer, the date the price is valid until and the quoted total. **Back to summary** returns to the contact form with its values.
|
|
894
|
+
- **Undo** reverts the last change and **Redo** repeats it.
|
|
895
|
+
- In the **Phone** story, **Next** walks through the steps, the total opens and closes the breakdown, **Request quote** on the review reveals the contact warnings, and a filled form shows "Quote requested".
|
|
896
|
+
- The browser console shows no errors, the page has no `canvas` element, and no model or texture is requested.
|
|
897
|
+
|
|
898
|
+
## What this layout leaves out
|
|
899
|
+
|
|
900
|
+
- **Read mode.** The fields are inert and **Request quote** is hidden while `phx.frontend.useAccessService().accessInfo.viewMode` is set, but the example ships no read template; [Custom Layout → Serve read mode](?path=/docs/layouts-custom-layout--docs#serve-read-mode) shows one.
|
|
901
|
+
- **A quote that outlives the page.** The answer lives in the project's store for as long as the page; a configuration reopened in the `requested` state shows "Quote requested" without the details. A deployed project keeps the answer where its webhook stores it.
|
|
902
|
+
- **The built-in arrangement.** Header, sidebar, footer, tabs and the preview start screen are not mounted; [Layout Slots](?path=/docs/phoenix-layout-slots--docs) lists every slot a project layout can mount.
|
|
903
|
+
|
|
904
|
+
## Related pages
|
|
905
|
+
|
|
906
|
+
- [Fenwick Window](?path=/docs/layouts-gallery-fenwick-window--docs) draws the configuration as a shop drawing, and [Sunfold Solar](?path=/docs/layouts-gallery-sunfold-solar--docs) shows it as a dashboard; neither mounts a canvas either.
|
|
907
|
+
- [Custom Layout](?path=/docs/layouts-custom-layout--docs) explains a project layout step by step.
|
|
908
|
+
- [Configurator Interface → Hooks for a Project Layout](?path=/docs/phoenix-configurator-interface--docs#hooks-for-a-project-layout) lists the hooks used here.
|
|
909
|
+
- [Domain Model → Invariants](?path=/docs/phoenix-domain-model--docs#invariants) and [Domain Model → Expressions](?path=/docs/phoenix-domain-model--docs#expressions) describe the rules and the computed values.
|
|
910
|
+
- [Finalization](?path=/docs/phoenix-finalization--docs) describes the server side of a finalize action.
|
|
911
|
+
|
|
912
|
+
## Complete Implementation
|
|
913
|
+
|
|
914
|
+
{/* AUTO-GENERATED SECTION: This section is automatically updated by 'phoenix story build' */}
|
|
915
|
+
|
|
916
|
+
<details>
|
|
917
|
+
<summary>Click to view the complete implementation files</summary>
|
|
918
|
+
|
|
919
|
+
### ./spec/domain.yaml
|
|
920
|
+
|
|
921
|
+
```yaml
|
|
922
|
+
model:
|
|
923
|
+
latest:
|
|
924
|
+
entityTypes:
|
|
925
|
+
- Compressor
|
|
926
|
+
aliases:
|
|
927
|
+
RootEntity:
|
|
928
|
+
- Compressor
|
|
929
|
+
commonTypes:
|
|
930
|
+
Pressure:
|
|
931
|
+
enum:
|
|
932
|
+
- Bar7
|
|
933
|
+
- Bar10
|
|
934
|
+
- Bar13
|
|
935
|
+
DutyCycle:
|
|
936
|
+
enum:
|
|
937
|
+
- Intermittent
|
|
938
|
+
- Continuous
|
|
939
|
+
Drive:
|
|
940
|
+
enum:
|
|
941
|
+
- FixedSpeed
|
|
942
|
+
- VariableSpeed
|
|
943
|
+
Dryer:
|
|
944
|
+
enum:
|
|
945
|
+
- None
|
|
946
|
+
- Refrigerant
|
|
947
|
+
- Desiccant
|
|
948
|
+
DewPoint:
|
|
949
|
+
enum:
|
|
950
|
+
- Minus40
|
|
951
|
+
- Minus70
|
|
952
|
+
Filtration:
|
|
953
|
+
enum:
|
|
954
|
+
- General
|
|
955
|
+
- HighEfficiency
|
|
956
|
+
- OilVapour
|
|
957
|
+
Cooling:
|
|
958
|
+
enum:
|
|
959
|
+
- Air
|
|
960
|
+
- Water
|
|
961
|
+
Receiver:
|
|
962
|
+
enum:
|
|
963
|
+
- None
|
|
964
|
+
- Litres500
|
|
965
|
+
- Litres1000
|
|
966
|
+
- Litres2000
|
|
967
|
+
Enclosure:
|
|
968
|
+
enum:
|
|
969
|
+
- Standard
|
|
970
|
+
- LowNoise
|
|
971
|
+
Supply:
|
|
972
|
+
enum:
|
|
973
|
+
- V400Hz50
|
|
974
|
+
- V480Hz60
|
|
975
|
+
ServicePlan:
|
|
976
|
+
enum:
|
|
977
|
+
- None
|
|
978
|
+
- Essential
|
|
979
|
+
- TotalCare
|
|
980
|
+
Delivery:
|
|
981
|
+
enum:
|
|
982
|
+
- Standard
|
|
983
|
+
- Express
|
|
984
|
+
shapes:
|
|
985
|
+
Compressor:
|
|
986
|
+
flow:
|
|
987
|
+
type: number
|
|
988
|
+
pressure:
|
|
989
|
+
$ref: '#/model/latest/commonTypes/Pressure'
|
|
990
|
+
dutyCycle:
|
|
991
|
+
$ref: '#/model/latest/commonTypes/DutyCycle'
|
|
992
|
+
drive:
|
|
993
|
+
$ref: '#/model/latest/commonTypes/Drive'
|
|
994
|
+
dryer:
|
|
995
|
+
$ref: '#/model/latest/commonTypes/Dryer'
|
|
996
|
+
dewPoint:
|
|
997
|
+
$ref: '#/model/latest/commonTypes/DewPoint'
|
|
998
|
+
filtration:
|
|
999
|
+
$ref: '#/model/latest/commonTypes/Filtration'
|
|
1000
|
+
cooling:
|
|
1001
|
+
$ref: '#/model/latest/commonTypes/Cooling'
|
|
1002
|
+
heatRecovery:
|
|
1003
|
+
type: boolean
|
|
1004
|
+
receiver:
|
|
1005
|
+
$ref: '#/model/latest/commonTypes/Receiver'
|
|
1006
|
+
enclosure:
|
|
1007
|
+
$ref: '#/model/latest/commonTypes/Enclosure'
|
|
1008
|
+
supply:
|
|
1009
|
+
$ref: '#/model/latest/commonTypes/Supply'
|
|
1010
|
+
servicePlan:
|
|
1011
|
+
$ref: '#/model/latest/commonTypes/ServicePlan'
|
|
1012
|
+
commissioning:
|
|
1013
|
+
type: boolean
|
|
1014
|
+
delivery:
|
|
1015
|
+
$ref: '#/model/latest/commonTypes/Delivery'
|
|
1016
|
+
company:
|
|
1017
|
+
type: string
|
|
1018
|
+
email:
|
|
1019
|
+
type: string
|
|
1020
|
+
projectReference:
|
|
1021
|
+
type: string
|
|
1022
|
+
|
|
1023
|
+
presets:
|
|
1024
|
+
- rootEntityType: Compressor
|
|
1025
|
+
initialDomainEntities:
|
|
1026
|
+
- id: Compressor-1
|
|
1027
|
+
type: Compressor
|
|
1028
|
+
flow: 9
|
|
1029
|
+
pressure: Bar10
|
|
1030
|
+
dutyCycle: Intermittent
|
|
1031
|
+
drive: FixedSpeed
|
|
1032
|
+
dryer: Refrigerant
|
|
1033
|
+
dewPoint: Minus40
|
|
1034
|
+
filtration: General
|
|
1035
|
+
cooling: Air
|
|
1036
|
+
heatRecovery: false
|
|
1037
|
+
receiver: Litres500
|
|
1038
|
+
enclosure: Standard
|
|
1039
|
+
supply: V400Hz50
|
|
1040
|
+
servicePlan: Essential
|
|
1041
|
+
commissioning: true
|
|
1042
|
+
delivery: Standard
|
|
1043
|
+
company: ''
|
|
1044
|
+
email: ''
|
|
1045
|
+
projectReference: ''
|
|
1046
|
+
|
|
1047
|
+
navigationStates:
|
|
1048
|
+
- duty
|
|
1049
|
+
- treatment
|
|
1050
|
+
- installation
|
|
1051
|
+
- service
|
|
1052
|
+
- review
|
|
1053
|
+
- requested
|
|
1054
|
+
|
|
1055
|
+
# The quote's price, lead time and summary: declared here, computed in src/expressions/compressor.ts
|
|
1056
|
+
expressions:
|
|
1057
|
+
Compressor:
|
|
1058
|
+
$maxFlow:
|
|
1059
|
+
type: number
|
|
1060
|
+
$frameName:
|
|
1061
|
+
type: string
|
|
1062
|
+
$frameKw:
|
|
1063
|
+
type: number
|
|
1064
|
+
$minReceiverLitres:
|
|
1065
|
+
type: number
|
|
1066
|
+
$leadTimeWeeks:
|
|
1067
|
+
type: number
|
|
1068
|
+
$quoteLines:
|
|
1069
|
+
type: array
|
|
1070
|
+
items:
|
|
1071
|
+
type: object
|
|
1072
|
+
properties:
|
|
1073
|
+
key:
|
|
1074
|
+
type: string
|
|
1075
|
+
label:
|
|
1076
|
+
type: string
|
|
1077
|
+
detail:
|
|
1078
|
+
type: string
|
|
1079
|
+
amount:
|
|
1080
|
+
type: number
|
|
1081
|
+
required:
|
|
1082
|
+
- key
|
|
1083
|
+
- label
|
|
1084
|
+
- detail
|
|
1085
|
+
- amount
|
|
1086
|
+
additionalProperties: false
|
|
1087
|
+
$subtotal:
|
|
1088
|
+
type: number
|
|
1089
|
+
$leadTimeSurcharge:
|
|
1090
|
+
type: number
|
|
1091
|
+
$total:
|
|
1092
|
+
type: number
|
|
1093
|
+
$specSheet:
|
|
1094
|
+
type: array
|
|
1095
|
+
items:
|
|
1096
|
+
type: object
|
|
1097
|
+
properties:
|
|
1098
|
+
label:
|
|
1099
|
+
type: string
|
|
1100
|
+
value:
|
|
1101
|
+
type: string
|
|
1102
|
+
required:
|
|
1103
|
+
- label
|
|
1104
|
+
- value
|
|
1105
|
+
additionalProperties: false
|
|
1106
|
+
|
|
1107
|
+
# Every rule is a warning: the change is kept, the layout shows the message at the field, and finalizing waits
|
|
1108
|
+
# until it is resolved
|
|
1109
|
+
invariants:
|
|
1110
|
+
Compressor:
|
|
1111
|
+
flowRange:
|
|
1112
|
+
types:
|
|
1113
|
+
- flowAboveRange
|
|
1114
|
+
desiccantNeedsFiltration:
|
|
1115
|
+
type: desiccantNeedsFiltration
|
|
1116
|
+
severity: warning
|
|
1117
|
+
message: A desiccant dryer needs high-efficiency or oil-vapour filtration upstream, or oil aerosol spoils the desiccant.
|
|
1118
|
+
receiverSize:
|
|
1119
|
+
types:
|
|
1120
|
+
- receiverTooSmall
|
|
1121
|
+
expressUnavailable:
|
|
1122
|
+
type: expressUnavailable
|
|
1123
|
+
severity: warning
|
|
1124
|
+
message: Express delivery covers stock frames up to 110 kW. Choose standard delivery for this frame.
|
|
1125
|
+
companyMissing:
|
|
1126
|
+
type: companyMissing
|
|
1127
|
+
severity: warning
|
|
1128
|
+
message: Enter the company the quote is for.
|
|
1129
|
+
emailInvalid:
|
|
1130
|
+
type: emailInvalid
|
|
1131
|
+
severity: warning
|
|
1132
|
+
message: Enter a valid email address for the quote.
|
|
1133
|
+
|
|
1134
|
+
components:
|
|
1135
|
+
Compressor:
|
|
1136
|
+
price:
|
|
1137
|
+
main:
|
|
1138
|
+
price:
|
|
1139
|
+
$read: $total
|
|
1140
|
+
currency: EUR
|
|
1141
|
+
navigationSteps:
|
|
1142
|
+
main:
|
|
1143
|
+
steps:
|
|
1144
|
+
- label: Duty
|
|
1145
|
+
navigationStates:
|
|
1146
|
+
- duty
|
|
1147
|
+
- label: Air treatment
|
|
1148
|
+
navigationStates:
|
|
1149
|
+
- treatment
|
|
1150
|
+
- label: Installation
|
|
1151
|
+
navigationStates:
|
|
1152
|
+
- installation
|
|
1153
|
+
- label: Service and delivery
|
|
1154
|
+
navigationStates:
|
|
1155
|
+
- service
|
|
1156
|
+
- label: Review
|
|
1157
|
+
navigationStates:
|
|
1158
|
+
- review
|
|
1159
|
+
- requested
|
|
1160
|
+
finalizeAction:
|
|
1161
|
+
quote:
|
|
1162
|
+
variant: primary
|
|
1163
|
+
label: Request quote
|
|
1164
|
+
title: Send the configuration to an application engineer for a firm quote
|
|
1165
|
+
icon: PaperPlaneTilt
|
|
1166
|
+
handler: requestQuote
|
|
1167
|
+
|
|
1168
|
+
# Duty
|
|
1169
|
+
genericDimension:
|
|
1170
|
+
flow:
|
|
1171
|
+
value:
|
|
1172
|
+
$bind: flow
|
|
1173
|
+
min: 2
|
|
1174
|
+
max: 40
|
|
1175
|
+
unit: m³/min
|
|
1176
|
+
decimalPlaces: 1
|
|
1177
|
+
attributeSelection:
|
|
1178
|
+
pressure:
|
|
1179
|
+
value:
|
|
1180
|
+
$bind: pressure
|
|
1181
|
+
options:
|
|
1182
|
+
- label: 7.5 bar
|
|
1183
|
+
description: Workshops and general tools
|
|
1184
|
+
value: Bar7
|
|
1185
|
+
- label: 10 bar
|
|
1186
|
+
description: Most production plants
|
|
1187
|
+
value: Bar10
|
|
1188
|
+
- label: 13 bar
|
|
1189
|
+
description: Blow moulding pre-blow, long networks
|
|
1190
|
+
value: Bar13
|
|
1191
|
+
dutyCycle:
|
|
1192
|
+
value:
|
|
1193
|
+
$bind: dutyCycle
|
|
1194
|
+
options:
|
|
1195
|
+
- label: Intermittent
|
|
1196
|
+
description: Up to 60 % load, one or two shifts
|
|
1197
|
+
value: Intermittent
|
|
1198
|
+
- label: Continuous
|
|
1199
|
+
description: Around the clock, heavy-duty package
|
|
1200
|
+
value: Continuous
|
|
1201
|
+
drive:
|
|
1202
|
+
value:
|
|
1203
|
+
$bind: drive
|
|
1204
|
+
options:
|
|
1205
|
+
- label: Fixed speed
|
|
1206
|
+
description: Load and unload control, lowest first cost
|
|
1207
|
+
value: FixedSpeed
|
|
1208
|
+
- label: Variable speed
|
|
1209
|
+
description: Follows demand, about 30 % less energy
|
|
1210
|
+
value: VariableSpeed
|
|
1211
|
+
|
|
1212
|
+
# Air treatment
|
|
1213
|
+
dryer:
|
|
1214
|
+
value:
|
|
1215
|
+
$bind: dryer
|
|
1216
|
+
options:
|
|
1217
|
+
- label: No dryer
|
|
1218
|
+
description: Wet air, for tools that tolerate it
|
|
1219
|
+
value: None
|
|
1220
|
+
- label: Refrigerant
|
|
1221
|
+
description: Pressure dew point +3 °C
|
|
1222
|
+
value: Refrigerant
|
|
1223
|
+
- label: Desiccant
|
|
1224
|
+
description: Pressure dew point below freezing
|
|
1225
|
+
value: Desiccant
|
|
1226
|
+
dewPoint:
|
|
1227
|
+
value:
|
|
1228
|
+
$bind: dewPoint
|
|
1229
|
+
options:
|
|
1230
|
+
- label: −40 °C
|
|
1231
|
+
description: Outdoor lines, food and pharma
|
|
1232
|
+
value: Minus40
|
|
1233
|
+
- label: −70 °C
|
|
1234
|
+
description: Electronics and laboratories
|
|
1235
|
+
value: Minus70
|
|
1236
|
+
$filter:
|
|
1237
|
+
active:
|
|
1238
|
+
$eval: self.dryer === 'Desiccant'
|
|
1239
|
+
filtration:
|
|
1240
|
+
value:
|
|
1241
|
+
$bind: filtration
|
|
1242
|
+
options:
|
|
1243
|
+
- label: General purpose
|
|
1244
|
+
description: Removes particles down to 1 µm
|
|
1245
|
+
value: General
|
|
1246
|
+
- label: High efficiency
|
|
1247
|
+
description: Oil aerosol down to 0.01 mg/m³
|
|
1248
|
+
value: HighEfficiency
|
|
1249
|
+
- label: Oil vapour
|
|
1250
|
+
description: Adds activated carbon, 0.003 mg/m³
|
|
1251
|
+
value: OilVapour
|
|
1252
|
+
|
|
1253
|
+
# Installation
|
|
1254
|
+
cooling:
|
|
1255
|
+
value:
|
|
1256
|
+
$bind: cooling
|
|
1257
|
+
options:
|
|
1258
|
+
- label: Air-cooled
|
|
1259
|
+
description: Needs ventilation in the plant room
|
|
1260
|
+
value: Air
|
|
1261
|
+
- label: Water-cooled
|
|
1262
|
+
description: For hot rooms and heat recovery
|
|
1263
|
+
value: Water
|
|
1264
|
+
receiver:
|
|
1265
|
+
value:
|
|
1266
|
+
$bind: receiver
|
|
1267
|
+
options:
|
|
1268
|
+
- label: No receiver
|
|
1269
|
+
value: None
|
|
1270
|
+
- label: 500 L
|
|
1271
|
+
value: Litres500
|
|
1272
|
+
- label: 1,000 L
|
|
1273
|
+
value: Litres1000
|
|
1274
|
+
- label: 2,000 L
|
|
1275
|
+
value: Litres2000
|
|
1276
|
+
enclosure:
|
|
1277
|
+
value:
|
|
1278
|
+
$bind: enclosure
|
|
1279
|
+
options:
|
|
1280
|
+
- label: Standard canopy
|
|
1281
|
+
description: About 72 dB(A) at 1 m
|
|
1282
|
+
value: Standard
|
|
1283
|
+
- label: Low-noise canopy
|
|
1284
|
+
description: About 66 dB(A) at 1 m
|
|
1285
|
+
value: LowNoise
|
|
1286
|
+
supply:
|
|
1287
|
+
value:
|
|
1288
|
+
$bind: supply
|
|
1289
|
+
options:
|
|
1290
|
+
- label: 400 V, 50 Hz
|
|
1291
|
+
value: V400Hz50
|
|
1292
|
+
- label: 480 V, 60 Hz
|
|
1293
|
+
value: V480Hz60
|
|
1294
|
+
|
|
1295
|
+
# Service and delivery
|
|
1296
|
+
servicePlan:
|
|
1297
|
+
value:
|
|
1298
|
+
$bind: servicePlan
|
|
1299
|
+
options:
|
|
1300
|
+
- label: No plan
|
|
1301
|
+
description: Service on call
|
|
1302
|
+
value: None
|
|
1303
|
+
- label: Essential, 3 years
|
|
1304
|
+
description: Scheduled service and parts
|
|
1305
|
+
value: Essential
|
|
1306
|
+
- label: Total care, 5 years
|
|
1307
|
+
description: Parts, labour and an extended warranty
|
|
1308
|
+
value: TotalCare
|
|
1309
|
+
delivery:
|
|
1310
|
+
value:
|
|
1311
|
+
$bind: delivery
|
|
1312
|
+
options:
|
|
1313
|
+
$read: $deliveryOptions
|
|
1314
|
+
attributeSwitch:
|
|
1315
|
+
heatRecovery:
|
|
1316
|
+
value:
|
|
1317
|
+
$bind: heatRecovery
|
|
1318
|
+
$filter:
|
|
1319
|
+
active:
|
|
1320
|
+
$eval: self.cooling === 'Water'
|
|
1321
|
+
commissioning:
|
|
1322
|
+
value:
|
|
1323
|
+
$bind: commissioning
|
|
1324
|
+
textValue:
|
|
1325
|
+
company:
|
|
1326
|
+
value:
|
|
1327
|
+
$bind: company
|
|
1328
|
+
email:
|
|
1329
|
+
value:
|
|
1330
|
+
$bind: email
|
|
1331
|
+
projectReference:
|
|
1332
|
+
value:
|
|
1333
|
+
$bind: projectReference
|
|
1334
|
+
```
|
|
1335
|
+
|
|
1336
|
+
### ./src/\_form/ChoiceField.tsx
|
|
1337
|
+
|
|
1338
|
+
```tsx
|
|
1339
|
+
import { Box, ButtonBase, Typography } from '@mui/material'
|
|
1340
|
+
import type { KeyboardEvent } from 'react'
|
|
1341
|
+
|
|
1342
|
+
import { attributeSelectionComponent } from '@salsita-ai/sdk/domain'
|
|
1343
|
+
|
|
1344
|
+
import { FieldShell } from './FieldShell.js'
|
|
1345
|
+
import { ARDENT } from './tokens.js'
|
|
1346
|
+
|
|
1347
|
+
// Arrow keys move the selection between the cards, as in a native radio group
|
|
1348
|
+
const ARROW_STEPS: Readonly<Record<string, number | undefined>> = {
|
|
1349
|
+
ArrowRight: 1,
|
|
1350
|
+
ArrowDown: 1,
|
|
1351
|
+
ArrowLeft: -1,
|
|
1352
|
+
ArrowUp: -1,
|
|
1353
|
+
}
|
|
1354
|
+
|
|
1355
|
+
interface ChoiceFieldProps {
|
|
1356
|
+
readonly instanceName: string
|
|
1357
|
+
readonly label: string
|
|
1358
|
+
readonly hint?: string
|
|
1359
|
+
readonly warningTypes?: readonly string[]
|
|
1360
|
+
readonly readOnly: boolean
|
|
1361
|
+
// The narrowest a card gets before the cards wrap onto another row
|
|
1362
|
+
readonly minCardWidth?: number
|
|
1363
|
+
}
|
|
1364
|
+
|
|
1365
|
+
const ChoiceCards = ({ instanceName, label, hint, warningTypes, readOnly, minCardWidth = 150 }: ChoiceFieldProps) => {
|
|
1366
|
+
const resolve = phx.frontend.useResolveLocalizable()
|
|
1367
|
+
const compressorId = phx.frontend.useRootEntityId()
|
|
1368
|
+
const { value, options } = phx.frontend.useAttributeSelection(compressorId, instanceName)
|
|
1369
|
+
// An option a `fixable` or `fatal` invariant rules out is `disabled`, with the reason in its `hint`
|
|
1370
|
+
const optionHint = options.find(option => option.disabled && option.hint)?.hint
|
|
1371
|
+
|
|
1372
|
+
const handleKeyDown = (event: KeyboardEvent<HTMLElement>, index: number) => {
|
|
1373
|
+
const step = ARROW_STEPS[event.key]
|
|
1374
|
+
|
|
1375
|
+
if (step === undefined) {
|
|
1376
|
+
return
|
|
1377
|
+
}
|
|
1378
|
+
|
|
1379
|
+
event.preventDefault()
|
|
1380
|
+
const next = (index + step + options.length) % options.length
|
|
1381
|
+
options[next]?.onSelect()
|
|
1382
|
+
event.currentTarget.parentElement?.querySelectorAll<HTMLElement>('[role="radio"]')[next]?.focus()
|
|
1383
|
+
}
|
|
1384
|
+
|
|
1385
|
+
return (
|
|
1386
|
+
<FieldShell id={`ardent-${instanceName}`} label={label} hint={optionHint ?? hint} warningTypes={warningTypes}>
|
|
1387
|
+
<Box
|
|
1388
|
+
component="div"
|
|
1389
|
+
role="radiogroup"
|
|
1390
|
+
aria-labelledby={`ardent-${instanceName}-label`}
|
|
1391
|
+
sx={{ display: 'grid', gridTemplateColumns: `repeat(auto-fit, minmax(${minCardWidth}px, 1fr))`, gap: 1.25 }}
|
|
1392
|
+
>
|
|
1393
|
+
{options.map((option, index) => {
|
|
1394
|
+
const isSelected = option.value === value
|
|
1395
|
+
const description = resolve(option.description)
|
|
1396
|
+
|
|
1397
|
+
return (
|
|
1398
|
+
<ButtonBase
|
|
1399
|
+
key={String(option.value)}
|
|
1400
|
+
role="radio"
|
|
1401
|
+
aria-checked={isSelected}
|
|
1402
|
+
aria-disabled={option.disabled}
|
|
1403
|
+
tabIndex={isSelected ? 0 : -1}
|
|
1404
|
+
disabled={readOnly && !isSelected}
|
|
1405
|
+
onClick={readOnly ? undefined : option.onSelect}
|
|
1406
|
+
onKeyDown={readOnly ? undefined : event => handleKeyDown(event, index)}
|
|
1407
|
+
sx={{
|
|
1408
|
+
display: 'grid',
|
|
1409
|
+
gridTemplateColumns: 'auto 1fr',
|
|
1410
|
+
alignItems: 'start',
|
|
1411
|
+
columnGap: 1.25,
|
|
1412
|
+
rowGap: 0.25,
|
|
1413
|
+
padding: 1.5,
|
|
1414
|
+
textAlign: 'start',
|
|
1415
|
+
borderRadius: 2,
|
|
1416
|
+
border: `1px solid ${isSelected ? ARDENT.signal : ARDENT.line}`,
|
|
1417
|
+
boxShadow: isSelected ? `inset 0 0 0 1px ${ARDENT.signal}` : 'none',
|
|
1418
|
+
bgcolor: isSelected ? ARDENT.signalTint : ARDENT.panel,
|
|
1419
|
+
fontFamily: ARDENT.font,
|
|
1420
|
+
opacity: option.disabled ? 0.45 : 1,
|
|
1421
|
+
transition: 'border-color 140ms, background-color 140ms',
|
|
1422
|
+
'&:hover': { borderColor: isSelected ? ARDENT.signal : ARDENT.steel },
|
|
1423
|
+
'&.Mui-focusVisible': { outline: `2px solid ${ARDENT.navy}`, outlineOffset: 2 },
|
|
1424
|
+
'&.Mui-disabled': { opacity: 0.45 },
|
|
1425
|
+
}}
|
|
1426
|
+
>
|
|
1427
|
+
{/* The radio mark: a ring, filled with a dot when the card is chosen */}
|
|
1428
|
+
<Box
|
|
1429
|
+
component="span"
|
|
1430
|
+
aria-hidden
|
|
1431
|
+
sx={{
|
|
1432
|
+
gridRow: 'span 2',
|
|
1433
|
+
marginBlockStart: 0.25,
|
|
1434
|
+
inlineSize: 18,
|
|
1435
|
+
blockSize: 18,
|
|
1436
|
+
borderRadius: '50%',
|
|
1437
|
+
border: `2px solid ${isSelected ? ARDENT.signal : ARDENT.steel}`,
|
|
1438
|
+
boxShadow: isSelected ? `inset 0 0 0 3px ${ARDENT.signalTint}` : 'none',
|
|
1439
|
+
bgcolor: isSelected ? ARDENT.signal : 'transparent',
|
|
1440
|
+
}}
|
|
1441
|
+
/>
|
|
1442
|
+
<Typography
|
|
1443
|
+
component="span"
|
|
1444
|
+
sx={{ fontFamily: ARDENT.font, fontSize: 15, fontWeight: 600, color: ARDENT.ink }}
|
|
1445
|
+
>
|
|
1446
|
+
{resolve(option.title)}
|
|
1447
|
+
</Typography>
|
|
1448
|
+
{description && (
|
|
1449
|
+
<Typography
|
|
1450
|
+
component="span"
|
|
1451
|
+
sx={{ fontFamily: ARDENT.font, fontSize: 13, lineHeight: 1.35, color: ARDENT.steel }}
|
|
1452
|
+
>
|
|
1453
|
+
{description}
|
|
1454
|
+
</Typography>
|
|
1455
|
+
)}
|
|
1456
|
+
</ButtonBase>
|
|
1457
|
+
)
|
|
1458
|
+
})}
|
|
1459
|
+
</Box>
|
|
1460
|
+
</FieldShell>
|
|
1461
|
+
)
|
|
1462
|
+
}
|
|
1463
|
+
|
|
1464
|
+
// One `attributeSelection` of the spec as a group of cards. The field exists only while the spec's component is
|
|
1465
|
+
// active: a `$filter` in the spec decides when a question is asked, and the layout follows it. The control hook throws
|
|
1466
|
+
// for an inactive component, so the cards mount only after `useComponent` has found it. An option that a `fixable`
|
|
1467
|
+
// invariant rules out is faded with its hint below the cards; it stays clickable, the change is rejected and the
|
|
1468
|
+
// built-in snackbar says why.
|
|
1469
|
+
export const ChoiceField = (props: ChoiceFieldProps) => {
|
|
1470
|
+
const compressorId = phx.frontend.useRootEntityId()
|
|
1471
|
+
const component = phx.frontend.useComponent({
|
|
1472
|
+
entityId: compressorId,
|
|
1473
|
+
componentType: attributeSelectionComponent,
|
|
1474
|
+
instanceName: props.instanceName,
|
|
1475
|
+
})
|
|
1476
|
+
|
|
1477
|
+
return component === null ? null : <ChoiceCards {...props} />
|
|
1478
|
+
}
|
|
1479
|
+
```
|
|
1480
|
+
|
|
1481
|
+
### ./src/\_form/FieldShell.tsx
|
|
1482
|
+
|
|
1483
|
+
```tsx
|
|
1484
|
+
import { Box, Typography } from '@mui/material'
|
|
1485
|
+
import type { ReactNode } from 'react'
|
|
1486
|
+
|
|
1487
|
+
import { ARDENT } from './tokens.js'
|
|
1488
|
+
import { useWarnings } from './use-warnings.js'
|
|
1489
|
+
|
|
1490
|
+
const WARNING_ICON = 'M12 3 2 21h20L12 3Zm0 6v5m0 3.5v.5'
|
|
1491
|
+
|
|
1492
|
+
export interface FieldShellProps {
|
|
1493
|
+
readonly id: string
|
|
1494
|
+
readonly label: string
|
|
1495
|
+
// Help shown below the input while the field has no warning
|
|
1496
|
+
readonly hint?: string
|
|
1497
|
+
// The invariant types whose warning belongs to this field
|
|
1498
|
+
readonly warningTypes?: readonly string[]
|
|
1499
|
+
// Hides the warning until the customer has had a chance to fill the field in
|
|
1500
|
+
readonly showWarning?: boolean
|
|
1501
|
+
readonly aside?: ReactNode
|
|
1502
|
+
readonly children: ReactNode
|
|
1503
|
+
}
|
|
1504
|
+
|
|
1505
|
+
// A field's frame: the label, the input, and below it either the help text or the warning of an invariant that the
|
|
1506
|
+
// field can resolve. The warning comes from the committed configuration, so it appears and disappears with the rule.
|
|
1507
|
+
export const FieldShell = ({
|
|
1508
|
+
id,
|
|
1509
|
+
label,
|
|
1510
|
+
hint,
|
|
1511
|
+
warningTypes = [],
|
|
1512
|
+
showWarning = true,
|
|
1513
|
+
aside,
|
|
1514
|
+
children,
|
|
1515
|
+
}: FieldShellProps) => {
|
|
1516
|
+
const warning = useWarnings().find(candidate => warningTypes.includes(candidate.type))
|
|
1517
|
+
const visibleWarning = showWarning ? warning : undefined
|
|
1518
|
+
|
|
1519
|
+
return (
|
|
1520
|
+
<Box
|
|
1521
|
+
component="div"
|
|
1522
|
+
role="group"
|
|
1523
|
+
aria-labelledby={`${id}-label`}
|
|
1524
|
+
sx={{
|
|
1525
|
+
display: 'grid',
|
|
1526
|
+
gap: 1.25,
|
|
1527
|
+
animation: 'ardent-field-in 220ms ease-out',
|
|
1528
|
+
'@keyframes ardent-field-in': {
|
|
1529
|
+
from: { opacity: 0, transform: 'translateY(-4px)' },
|
|
1530
|
+
to: { opacity: 1, transform: 'none' },
|
|
1531
|
+
},
|
|
1532
|
+
}}
|
|
1533
|
+
>
|
|
1534
|
+
<Box component="div" sx={{ display: 'flex', alignItems: 'baseline', justifyContent: 'space-between', gap: 2 }}>
|
|
1535
|
+
<Typography
|
|
1536
|
+
id={`${id}-label`}
|
|
1537
|
+
component="h4"
|
|
1538
|
+
sx={{ fontFamily: ARDENT.font, fontSize: 16, fontWeight: 600, color: ARDENT.ink }}
|
|
1539
|
+
>
|
|
1540
|
+
{label}
|
|
1541
|
+
</Typography>
|
|
1542
|
+
{aside}
|
|
1543
|
+
</Box>
|
|
1544
|
+
{children}
|
|
1545
|
+
{visibleWarning ? (
|
|
1546
|
+
<Box
|
|
1547
|
+
component="p"
|
|
1548
|
+
role="alert"
|
|
1549
|
+
sx={{
|
|
1550
|
+
display: 'flex',
|
|
1551
|
+
gap: 1,
|
|
1552
|
+
alignItems: 'flex-start',
|
|
1553
|
+
margin: 0,
|
|
1554
|
+
paddingBlock: 1,
|
|
1555
|
+
paddingInline: 1.5,
|
|
1556
|
+
borderRadius: 1.5,
|
|
1557
|
+
bgcolor: ARDENT.warningTint,
|
|
1558
|
+
color: ARDENT.warning,
|
|
1559
|
+
fontFamily: ARDENT.font,
|
|
1560
|
+
fontSize: 14,
|
|
1561
|
+
lineHeight: 1.4,
|
|
1562
|
+
}}
|
|
1563
|
+
>
|
|
1564
|
+
<Box component="svg" viewBox="0 0 24 24" aria-hidden sx={{ inlineSize: 18, blockSize: 18, flex: 'none' }}>
|
|
1565
|
+
<path d={WARNING_ICON} fill="none" stroke="currentColor" strokeWidth={2} strokeLinejoin="round" />
|
|
1566
|
+
</Box>
|
|
1567
|
+
{visibleWarning.text}
|
|
1568
|
+
</Box>
|
|
1569
|
+
) : (
|
|
1570
|
+
hint && <Typography sx={{ fontFamily: ARDENT.font, fontSize: 14, color: ARDENT.steel }}>{hint}</Typography>
|
|
1571
|
+
)}
|
|
1572
|
+
</Box>
|
|
1573
|
+
)
|
|
1574
|
+
}
|
|
1575
|
+
```
|
|
1576
|
+
|
|
1577
|
+
### ./src/\_form/NumberField.tsx
|
|
1578
|
+
|
|
1579
|
+
```tsx
|
|
1580
|
+
import { Box, InputBase, Slider, Typography } from '@mui/material'
|
|
1581
|
+
import { useEffect, useState } from 'react'
|
|
1582
|
+
|
|
1583
|
+
import { FieldShell } from './FieldShell.js'
|
|
1584
|
+
import { ARDENT } from './tokens.js'
|
|
1585
|
+
|
|
1586
|
+
interface NumberFieldProps {
|
|
1587
|
+
readonly instanceName: string
|
|
1588
|
+
readonly label: string
|
|
1589
|
+
readonly hint?: string
|
|
1590
|
+
readonly warningTypes?: readonly string[]
|
|
1591
|
+
readonly readOnly: boolean
|
|
1592
|
+
readonly step: number
|
|
1593
|
+
}
|
|
1594
|
+
|
|
1595
|
+
// One `genericDimension` of the spec as a slider with a typed value beside it. Dragging stages each value, so the
|
|
1596
|
+
// price follows the thumb, and letting go commits it; a typed value is committed on Enter or when the input loses
|
|
1597
|
+
// focus. The slider's range is the component's `min` and `max`, which the spec can read from expressions.
|
|
1598
|
+
export const NumberField = ({ instanceName, label, hint, warningTypes, readOnly, step }: NumberFieldProps) => {
|
|
1599
|
+
const compressorId = phx.frontend.useRootEntityId()
|
|
1600
|
+
const dimension = phx.frontend.useGenericDimension(compressorId, instanceName)
|
|
1601
|
+
const [draft, setDraft] = useState(String(dimension.value))
|
|
1602
|
+
const min = dimension.min ?? 0
|
|
1603
|
+
const max = dimension.max ?? 100
|
|
1604
|
+
|
|
1605
|
+
useEffect(() => {
|
|
1606
|
+
setDraft(String(dimension.value))
|
|
1607
|
+
}, [dimension.value])
|
|
1608
|
+
|
|
1609
|
+
const commitDraft = () => {
|
|
1610
|
+
const parsed = Number(draft.replace(',', '.'))
|
|
1611
|
+
|
|
1612
|
+
if (!Number.isFinite(parsed)) {
|
|
1613
|
+
setDraft(String(dimension.value))
|
|
1614
|
+
|
|
1615
|
+
return
|
|
1616
|
+
}
|
|
1617
|
+
|
|
1618
|
+
dimension.update(parsed)
|
|
1619
|
+
dimension.resolve()
|
|
1620
|
+
}
|
|
1621
|
+
|
|
1622
|
+
return (
|
|
1623
|
+
<FieldShell
|
|
1624
|
+
id={`ardent-${instanceName}`}
|
|
1625
|
+
label={label}
|
|
1626
|
+
hint={hint}
|
|
1627
|
+
warningTypes={warningTypes}
|
|
1628
|
+
aside={
|
|
1629
|
+
<Box
|
|
1630
|
+
component="label"
|
|
1631
|
+
sx={{
|
|
1632
|
+
display: 'flex',
|
|
1633
|
+
alignItems: 'baseline',
|
|
1634
|
+
gap: 0.75,
|
|
1635
|
+
paddingInline: 1.25,
|
|
1636
|
+
paddingBlock: 0.5,
|
|
1637
|
+
borderRadius: 1.5,
|
|
1638
|
+
border: `1px solid ${ARDENT.line}`,
|
|
1639
|
+
bgcolor: ARDENT.panel,
|
|
1640
|
+
'&:focus-within': { borderColor: ARDENT.navy },
|
|
1641
|
+
}}
|
|
1642
|
+
>
|
|
1643
|
+
<InputBase
|
|
1644
|
+
value={draft}
|
|
1645
|
+
disabled={readOnly}
|
|
1646
|
+
onChange={event => setDraft(event.target.value)}
|
|
1647
|
+
onBlur={commitDraft}
|
|
1648
|
+
onKeyDown={event => {
|
|
1649
|
+
if (event.key === 'Enter') {
|
|
1650
|
+
commitDraft()
|
|
1651
|
+
}
|
|
1652
|
+
}}
|
|
1653
|
+
inputProps={{ inputMode: 'decimal', 'aria-label': `${label}, ${dimension.unit}` }}
|
|
1654
|
+
sx={{
|
|
1655
|
+
inlineSize: 56,
|
|
1656
|
+
fontFamily: ARDENT.font,
|
|
1657
|
+
fontSize: 20,
|
|
1658
|
+
fontWeight: 600,
|
|
1659
|
+
color: ARDENT.ink,
|
|
1660
|
+
'& input': { padding: 0, textAlign: 'end' },
|
|
1661
|
+
}}
|
|
1662
|
+
/>
|
|
1663
|
+
<Typography component="span" sx={{ fontFamily: ARDENT.font, fontSize: 14, color: ARDENT.steel }}>
|
|
1664
|
+
{dimension.unit}
|
|
1665
|
+
</Typography>
|
|
1666
|
+
</Box>
|
|
1667
|
+
}
|
|
1668
|
+
>
|
|
1669
|
+
<Box component="div" sx={{ paddingInline: 1.25 }}>
|
|
1670
|
+
<Slider
|
|
1671
|
+
value={Math.min(dimension.value, max)}
|
|
1672
|
+
min={min}
|
|
1673
|
+
max={max}
|
|
1674
|
+
step={step}
|
|
1675
|
+
disabled={readOnly}
|
|
1676
|
+
onChange={(_, value) => dimension.update(Array.isArray(value) ? (value[0] ?? min) : value)}
|
|
1677
|
+
onChangeCommitted={() => dimension.resolve()}
|
|
1678
|
+
marks={[
|
|
1679
|
+
{ value: min, label: `${min}` },
|
|
1680
|
+
{ value: max, label: `${max}` },
|
|
1681
|
+
]}
|
|
1682
|
+
slotProps={{ input: { 'aria-label': label } }}
|
|
1683
|
+
sx={{
|
|
1684
|
+
color: ARDENT.signal,
|
|
1685
|
+
blockSize: 6,
|
|
1686
|
+
'& .MuiSlider-rail': { bgcolor: ARDENT.line, opacity: 1 },
|
|
1687
|
+
'& .MuiSlider-thumb': {
|
|
1688
|
+
inlineSize: 22,
|
|
1689
|
+
blockSize: 22,
|
|
1690
|
+
bgcolor: ARDENT.panel,
|
|
1691
|
+
border: `3px solid ${ARDENT.signal}`,
|
|
1692
|
+
},
|
|
1693
|
+
'& .MuiSlider-markLabel': { fontFamily: ARDENT.font, fontSize: 12, color: ARDENT.steel },
|
|
1694
|
+
'& .MuiSlider-mark': { display: 'none' },
|
|
1695
|
+
}}
|
|
1696
|
+
/>
|
|
1697
|
+
</Box>
|
|
1698
|
+
</FieldShell>
|
|
1699
|
+
)
|
|
1700
|
+
}
|
|
1701
|
+
```
|
|
1702
|
+
|
|
1703
|
+
### ./src/\_form/SwitchField.tsx
|
|
1704
|
+
|
|
1705
|
+
```tsx
|
|
1706
|
+
import { Box, Switch, Typography } from '@mui/material'
|
|
1707
|
+
|
|
1708
|
+
import { attributeSwitchComponent } from '@salsita-ai/sdk/domain'
|
|
1709
|
+
|
|
1710
|
+
import { ARDENT } from './tokens.js'
|
|
1711
|
+
|
|
1712
|
+
interface SwitchFieldProps {
|
|
1713
|
+
readonly instanceName: string
|
|
1714
|
+
readonly label: string
|
|
1715
|
+
readonly description: string
|
|
1716
|
+
readonly readOnly: boolean
|
|
1717
|
+
}
|
|
1718
|
+
|
|
1719
|
+
const SwitchRow = ({ instanceName, label, description, readOnly }: SwitchFieldProps) => {
|
|
1720
|
+
const compressorId = phx.frontend.useRootEntityId()
|
|
1721
|
+
const toggle = phx.frontend.useAttributeSwitch(compressorId, instanceName)
|
|
1722
|
+
const labelId = `ardent-${instanceName}-label`
|
|
1723
|
+
|
|
1724
|
+
return (
|
|
1725
|
+
<Box
|
|
1726
|
+
component="div"
|
|
1727
|
+
sx={{
|
|
1728
|
+
display: 'flex',
|
|
1729
|
+
alignItems: 'center',
|
|
1730
|
+
justifyContent: 'space-between',
|
|
1731
|
+
gap: 2,
|
|
1732
|
+
padding: 1.5,
|
|
1733
|
+
borderRadius: 2,
|
|
1734
|
+
border: `1px solid ${ARDENT.line}`,
|
|
1735
|
+
animation: 'ardent-switch-in 220ms ease-out',
|
|
1736
|
+
'@keyframes ardent-switch-in': { from: { opacity: 0 }, to: { opacity: 1 } },
|
|
1737
|
+
}}
|
|
1738
|
+
>
|
|
1739
|
+
<Box component="div" sx={{ display: 'grid', gap: 0.25 }}>
|
|
1740
|
+
<Typography id={labelId} sx={{ fontFamily: ARDENT.font, fontSize: 16, fontWeight: 600, color: ARDENT.ink }}>
|
|
1741
|
+
{label}
|
|
1742
|
+
</Typography>
|
|
1743
|
+
<Typography sx={{ fontFamily: ARDENT.font, fontSize: 14, color: ARDENT.steel }}>{description}</Typography>
|
|
1744
|
+
</Box>
|
|
1745
|
+
<Switch
|
|
1746
|
+
checked={toggle.state.value}
|
|
1747
|
+
disabled={readOnly || toggle.disabled}
|
|
1748
|
+
onChange={toggle.onChange}
|
|
1749
|
+
inputProps={{ 'aria-labelledby': labelId }}
|
|
1750
|
+
sx={{
|
|
1751
|
+
'& .MuiSwitch-switchBase.Mui-checked': { color: ARDENT.panel },
|
|
1752
|
+
'& .MuiSwitch-switchBase.Mui-checked + .MuiSwitch-track': { bgcolor: ARDENT.signal, opacity: 1 },
|
|
1753
|
+
'& .MuiSwitch-track': { bgcolor: ARDENT.steel, opacity: 0.5 },
|
|
1754
|
+
}}
|
|
1755
|
+
/>
|
|
1756
|
+
</Box>
|
|
1757
|
+
)
|
|
1758
|
+
}
|
|
1759
|
+
|
|
1760
|
+
// One `attributeSwitch` of the spec as a labelled switch, shown only while the spec's component is active
|
|
1761
|
+
export const SwitchField = (props: SwitchFieldProps) => {
|
|
1762
|
+
const compressorId = phx.frontend.useRootEntityId()
|
|
1763
|
+
const component = phx.frontend.useComponent({
|
|
1764
|
+
entityId: compressorId,
|
|
1765
|
+
componentType: attributeSwitchComponent,
|
|
1766
|
+
instanceName: props.instanceName,
|
|
1767
|
+
})
|
|
1768
|
+
|
|
1769
|
+
return component === null ? null : <SwitchRow {...props} />
|
|
1770
|
+
}
|
|
1771
|
+
```
|
|
1772
|
+
|
|
1773
|
+
### ./src/\_form/TextInputField.tsx
|
|
1774
|
+
|
|
1775
|
+
```tsx
|
|
1776
|
+
import { InputBase } from '@mui/material'
|
|
1777
|
+
import { useState } from 'react'
|
|
1778
|
+
|
|
1779
|
+
import { FieldShell } from './FieldShell.js'
|
|
1780
|
+
import { ARDENT } from './tokens.js'
|
|
1781
|
+
|
|
1782
|
+
interface TextInputFieldProps {
|
|
1783
|
+
readonly instanceName: string
|
|
1784
|
+
readonly label: string
|
|
1785
|
+
readonly hint?: string
|
|
1786
|
+
readonly warningTypes?: readonly string[]
|
|
1787
|
+
readonly readOnly: boolean
|
|
1788
|
+
readonly type?: 'text' | 'email'
|
|
1789
|
+
readonly autoComplete?: string
|
|
1790
|
+
// Shows the field's warning before the customer has left the field, after a request was attempted
|
|
1791
|
+
readonly revealWarning: boolean
|
|
1792
|
+
}
|
|
1793
|
+
|
|
1794
|
+
// One `textValue` of the spec as a text input. Typing stages the text and leaving the field commits it, so the
|
|
1795
|
+
// invariants judge the committed text; their warning is shown once the customer has left the field.
|
|
1796
|
+
export const TextInputField = ({
|
|
1797
|
+
instanceName,
|
|
1798
|
+
label,
|
|
1799
|
+
hint,
|
|
1800
|
+
warningTypes,
|
|
1801
|
+
readOnly,
|
|
1802
|
+
type = 'text',
|
|
1803
|
+
autoComplete,
|
|
1804
|
+
revealWarning,
|
|
1805
|
+
}: TextInputFieldProps) => {
|
|
1806
|
+
const compressorId = phx.frontend.useRootEntityId()
|
|
1807
|
+
const text = phx.frontend.useTextValue(compressorId, instanceName)
|
|
1808
|
+
const [touched, setTouched] = useState(false)
|
|
1809
|
+
|
|
1810
|
+
return (
|
|
1811
|
+
<FieldShell
|
|
1812
|
+
id={`ardent-${instanceName}`}
|
|
1813
|
+
label={label}
|
|
1814
|
+
hint={hint}
|
|
1815
|
+
warningTypes={warningTypes}
|
|
1816
|
+
showWarning={touched || revealWarning}
|
|
1817
|
+
>
|
|
1818
|
+
<InputBase
|
|
1819
|
+
value={text.value}
|
|
1820
|
+
type={type}
|
|
1821
|
+
disabled={readOnly}
|
|
1822
|
+
autoComplete={autoComplete}
|
|
1823
|
+
onChange={event => text.update(event, event.target.value)}
|
|
1824
|
+
onBlur={() => {
|
|
1825
|
+
text.resolve()
|
|
1826
|
+
setTouched(true)
|
|
1827
|
+
}}
|
|
1828
|
+
inputProps={{ 'aria-labelledby': `ardent-${instanceName}-label` }}
|
|
1829
|
+
sx={{
|
|
1830
|
+
paddingInline: 1.5,
|
|
1831
|
+
paddingBlock: 1,
|
|
1832
|
+
borderRadius: 2,
|
|
1833
|
+
border: `1px solid ${ARDENT.line}`,
|
|
1834
|
+
bgcolor: ARDENT.panel,
|
|
1835
|
+
fontFamily: ARDENT.font,
|
|
1836
|
+
fontSize: 16,
|
|
1837
|
+
color: ARDENT.ink,
|
|
1838
|
+
'&.Mui-focused': { borderColor: ARDENT.navy, boxShadow: `0 0 0 3px ${ARDENT.page}` },
|
|
1839
|
+
}}
|
|
1840
|
+
/>
|
|
1841
|
+
</FieldShell>
|
|
1842
|
+
)
|
|
1843
|
+
}
|
|
1844
|
+
```
|
|
1845
|
+
|
|
1846
|
+
### ./src/\_form/tokens.ts
|
|
1847
|
+
|
|
1848
|
+
```ts
|
|
1849
|
+
// Ardent Air's palette and type: a navy shell, white work surfaces and the signal orange of the machines' doors.
|
|
1850
|
+
// Barlow is the brand's typeface; the stack falls back to system fonts where it is not loaded.
|
|
1851
|
+
export const ARDENT = {
|
|
1852
|
+
navy: '#0d1b2e',
|
|
1853
|
+
navySoft: '#1b2c45',
|
|
1854
|
+
ink: '#15202e',
|
|
1855
|
+
steel: '#5a6778',
|
|
1856
|
+
line: '#dde2e9',
|
|
1857
|
+
page: '#f1f3f6',
|
|
1858
|
+
panel: '#ffffff',
|
|
1859
|
+
signal: '#f0641a',
|
|
1860
|
+
signalDark: '#c84f0e',
|
|
1861
|
+
signalTint: '#fff1e8',
|
|
1862
|
+
warning: '#9a4b00',
|
|
1863
|
+
warningTint: '#fff6e0',
|
|
1864
|
+
success: '#17703f',
|
|
1865
|
+
successTint: '#e9f6ee',
|
|
1866
|
+
font: "'Barlow', 'Helvetica Neue', Arial, sans-serif",
|
|
1867
|
+
} as const
|
|
1868
|
+
|
|
1869
|
+
// Small capitals with wide tracking, for section labels and table headings
|
|
1870
|
+
export const OVERLINE_SX = {
|
|
1871
|
+
fontFamily: ARDENT.font,
|
|
1872
|
+
fontSize: 12,
|
|
1873
|
+
fontWeight: 500,
|
|
1874
|
+
letterSpacing: '0.14em',
|
|
1875
|
+
textTransform: 'uppercase',
|
|
1876
|
+
color: ARDENT.steel,
|
|
1877
|
+
} as const
|
|
1878
|
+
```
|
|
1879
|
+
|
|
1880
|
+
### ./src/\_form/use-warnings.ts
|
|
1881
|
+
|
|
1882
|
+
```ts
|
|
1883
|
+
import { useMemo } from 'react'
|
|
1884
|
+
|
|
1885
|
+
export interface Warning {
|
|
1886
|
+
readonly type: string
|
|
1887
|
+
readonly text: string
|
|
1888
|
+
}
|
|
1889
|
+
|
|
1890
|
+
// The warnings of the committed configuration with their text resolved. A `warning` invariant keeps the change, so its
|
|
1891
|
+
// violation stays in the committed state until the customer resolves it, and finalizing waits for that.
|
|
1892
|
+
// `useFinalizeViolations` lists them.
|
|
1893
|
+
export const useWarnings = (): readonly Warning[] => {
|
|
1894
|
+
const { violations } = phx.frontend.useFinalizeViolations()
|
|
1895
|
+
const resolve = phx.frontend.useResolveLocalizable()
|
|
1896
|
+
|
|
1897
|
+
return useMemo(() => {
|
|
1898
|
+
return (violations ?? []).map(({ violation }) => ({ type: violation.type, text: resolve(violation.message) ?? '' }))
|
|
1899
|
+
}, [violations, resolve])
|
|
1900
|
+
}
|
|
1901
|
+
```
|
|
1902
|
+
|
|
1903
|
+
### ./src/\_shared/DesktopPage.tsx
|
|
1904
|
+
|
|
1905
|
+
```tsx
|
|
1906
|
+
import { Box, Button, IconButton, Tooltip, Typography } from '@mui/material'
|
|
1907
|
+
import { useEffect, useRef, useState } from 'react'
|
|
1908
|
+
|
|
1909
|
+
import { LayoutSlots } from '@salsita-ai/sdk/configurator'
|
|
1910
|
+
|
|
1911
|
+
import { ARDENT, useWarnings } from '../_form/index.js'
|
|
1912
|
+
import { PriceBreakdown } from './PriceBreakdown.js'
|
|
1913
|
+
import { QuoteAction } from './QuoteAction.js'
|
|
1914
|
+
import { StepForm } from './StepForm.js'
|
|
1915
|
+
import { StepHeader } from './StepHeader.js'
|
|
1916
|
+
import { STEP_WARNINGS } from './step-warnings.js'
|
|
1917
|
+
|
|
1918
|
+
const UNDO_ICON = 'M9 14 4 9l5-5M4 9h10.5a5.5 5.5 0 0 1 0 11H11'
|
|
1919
|
+
const REDO_ICON = 'M15 14l5-5-5-5M20 9H9.5a5.5 5.5 0 0 0 0 11H13'
|
|
1920
|
+
const PANEL_WIDTH = 400
|
|
1921
|
+
|
|
1922
|
+
interface IconProps {
|
|
1923
|
+
readonly path: string
|
|
1924
|
+
}
|
|
1925
|
+
|
|
1926
|
+
const Icon = ({ path }: IconProps) => {
|
|
1927
|
+
return (
|
|
1928
|
+
<Box component="svg" viewBox="0 0 24 24" aria-hidden sx={{ inlineSize: 20, blockSize: 20 }}>
|
|
1929
|
+
<path d={path} fill="none" stroke="currentColor" strokeWidth={2} strokeLinecap="round" strokeLinejoin="round" />
|
|
1930
|
+
</Box>
|
|
1931
|
+
)
|
|
1932
|
+
}
|
|
1933
|
+
|
|
1934
|
+
// The desktop page: the brand bar with undo and redo, the stepper, the active step's form, and a column with the live
|
|
1935
|
+
// price breakdown and the way on. The form scrolls; the column stays.
|
|
1936
|
+
export const DesktopPage = () => {
|
|
1937
|
+
const { accessInfo } = phx.frontend.useAccessService()
|
|
1938
|
+
const { canUndo, canRedo, undo, redo } = phx.frontend.useUndoRedo()
|
|
1939
|
+
const { activeStep, isLast, canGoPrevious, canGoNext, steps, next, previous, goTo } = phx.frontend.useStepNavigation()
|
|
1940
|
+
const navigationState = phx.frontend.useActiveNavigationState()
|
|
1941
|
+
const compressor = phx.frontend.useRootEntityState()
|
|
1942
|
+
const warnings = useWarnings()
|
|
1943
|
+
const [revealWarnings, setRevealWarnings] = useState(false)
|
|
1944
|
+
const formRef = useRef<HTMLElement>(null)
|
|
1945
|
+
|
|
1946
|
+
// Each step starts at its top, as a new page would
|
|
1947
|
+
useEffect(() => {
|
|
1948
|
+
formRef.current?.scrollTo({ top: 0 })
|
|
1949
|
+
}, [navigationState])
|
|
1950
|
+
const readOnly = accessInfo.viewMode
|
|
1951
|
+
const nextStep = steps[(activeStep?.index ?? -1) + 1]
|
|
1952
|
+
const conflictCount = warnings.filter(warning =>
|
|
1953
|
+
Object.values(STEP_WARNINGS).some(types => types.includes(warning.type))
|
|
1954
|
+
).length
|
|
1955
|
+
|
|
1956
|
+
return (
|
|
1957
|
+
<Box
|
|
1958
|
+
component="div"
|
|
1959
|
+
sx={{
|
|
1960
|
+
position: 'absolute',
|
|
1961
|
+
inset: 0,
|
|
1962
|
+
display: 'grid',
|
|
1963
|
+
gridTemplateRows: 'auto auto minmax(0, 1fr)',
|
|
1964
|
+
gridTemplateColumns: `minmax(0, 1fr) ${PANEL_WIDTH}px`,
|
|
1965
|
+
bgcolor: ARDENT.page,
|
|
1966
|
+
fontFamily: ARDENT.font,
|
|
1967
|
+
}}
|
|
1968
|
+
>
|
|
1969
|
+
<Box
|
|
1970
|
+
component="header"
|
|
1971
|
+
sx={{
|
|
1972
|
+
gridColumn: '1 / -1',
|
|
1973
|
+
display: 'flex',
|
|
1974
|
+
alignItems: 'center',
|
|
1975
|
+
gap: 3,
|
|
1976
|
+
paddingInline: 4,
|
|
1977
|
+
blockSize: 64,
|
|
1978
|
+
bgcolor: ARDENT.navy,
|
|
1979
|
+
color: ARDENT.panel,
|
|
1980
|
+
}}
|
|
1981
|
+
>
|
|
1982
|
+
<Typography sx={{ fontFamily: ARDENT.font, fontSize: 22, fontWeight: 700, letterSpacing: '0.12em' }}>
|
|
1983
|
+
ARDENT
|
|
1984
|
+
<Box component="span" sx={{ color: ARDENT.signal }}>
|
|
1985
|
+
{' '}
|
|
1986
|
+
AIR
|
|
1987
|
+
</Box>
|
|
1988
|
+
</Typography>
|
|
1989
|
+
<Box component="span" aria-hidden sx={{ inlineSize: 1, blockSize: 28, bgcolor: ARDENT.navySoft }} />
|
|
1990
|
+
<Typography component="h1" sx={{ fontFamily: ARDENT.font, fontSize: 18, fontWeight: 500 }}>
|
|
1991
|
+
Compressor quote
|
|
1992
|
+
</Typography>
|
|
1993
|
+
<Typography sx={{ fontFamily: ARDENT.font, fontSize: 15, color: '#9fb0c6' }}>
|
|
1994
|
+
{compressor.$frameName} · {compressor.$frameKw} kW
|
|
1995
|
+
</Typography>
|
|
1996
|
+
<Box component="div" sx={{ marginInlineStart: 'auto', display: 'flex', gap: 0.5 }}>
|
|
1997
|
+
<Tooltip title="Undo">
|
|
1998
|
+
<span>
|
|
1999
|
+
<IconButton
|
|
2000
|
+
aria-label="Undo"
|
|
2001
|
+
disabled={!canUndo || readOnly}
|
|
2002
|
+
onClick={undo}
|
|
2003
|
+
sx={{ color: ARDENT.panel, '&.Mui-disabled': { color: ARDENT.navySoft } }}
|
|
2004
|
+
>
|
|
2005
|
+
<Icon path={UNDO_ICON} />
|
|
2006
|
+
</IconButton>
|
|
2007
|
+
</span>
|
|
2008
|
+
</Tooltip>
|
|
2009
|
+
<Tooltip title="Redo">
|
|
2010
|
+
<span>
|
|
2011
|
+
<IconButton
|
|
2012
|
+
aria-label="Redo"
|
|
2013
|
+
disabled={!canRedo || readOnly}
|
|
2014
|
+
onClick={redo}
|
|
2015
|
+
sx={{ color: ARDENT.panel, '&.Mui-disabled': { color: ARDENT.navySoft } }}
|
|
2016
|
+
>
|
|
2017
|
+
<Icon path={REDO_ICON} />
|
|
2018
|
+
</IconButton>
|
|
2019
|
+
</span>
|
|
2020
|
+
</Tooltip>
|
|
2021
|
+
</Box>
|
|
2022
|
+
</Box>
|
|
2023
|
+
|
|
2024
|
+
<Box
|
|
2025
|
+
component="div"
|
|
2026
|
+
sx={{ gridColumn: '1 / -1', bgcolor: ARDENT.panel, borderBlockEnd: `1px solid ${ARDENT.line}` }}
|
|
2027
|
+
>
|
|
2028
|
+
<StepHeader compact={false} />
|
|
2029
|
+
</Box>
|
|
2030
|
+
|
|
2031
|
+
<Box component="main" ref={formRef} sx={{ overflowY: 'auto', minBlockSize: 0 }}>
|
|
2032
|
+
<Box component="div" sx={{ display: 'grid', gap: 3, maxInlineSize: 820, marginInline: 'auto', padding: 4 }}>
|
|
2033
|
+
<Box component="div" sx={{ display: 'grid', gap: 0.5 }}>
|
|
2034
|
+
<Typography sx={{ fontFamily: ARDENT.font, fontSize: 14, color: ARDENT.steel }}>
|
|
2035
|
+
Step {(activeStep?.index ?? 0) + 1} of {steps.length}
|
|
2036
|
+
</Typography>
|
|
2037
|
+
<Typography
|
|
2038
|
+
component="h2"
|
|
2039
|
+
sx={{ fontFamily: ARDENT.font, fontSize: 32, fontWeight: 700, color: ARDENT.ink }}
|
|
2040
|
+
>
|
|
2041
|
+
{activeStep?.label}
|
|
2042
|
+
</Typography>
|
|
2043
|
+
</Box>
|
|
2044
|
+
<StepForm readOnly={readOnly} revealWarnings={revealWarnings} />
|
|
2045
|
+
<Box
|
|
2046
|
+
component="nav"
|
|
2047
|
+
aria-label="Step navigation"
|
|
2048
|
+
sx={{ display: 'flex', justifyContent: 'space-between', gap: 2 }}
|
|
2049
|
+
>
|
|
2050
|
+
<Button
|
|
2051
|
+
disabled={!canGoPrevious}
|
|
2052
|
+
onClick={previous}
|
|
2053
|
+
sx={{
|
|
2054
|
+
color: ARDENT.ink,
|
|
2055
|
+
fontFamily: ARDENT.font,
|
|
2056
|
+
fontSize: 16,
|
|
2057
|
+
textTransform: 'none',
|
|
2058
|
+
visibility: canGoPrevious ? 'visible' : 'hidden',
|
|
2059
|
+
}}
|
|
2060
|
+
>
|
|
2061
|
+
← Back
|
|
2062
|
+
</Button>
|
|
2063
|
+
{canGoNext && !isLast && (
|
|
2064
|
+
<Button
|
|
2065
|
+
variant="contained"
|
|
2066
|
+
disableElevation
|
|
2067
|
+
onClick={next}
|
|
2068
|
+
sx={{
|
|
2069
|
+
borderRadius: 2,
|
|
2070
|
+
paddingInline: 3,
|
|
2071
|
+
bgcolor: ARDENT.navy,
|
|
2072
|
+
fontFamily: ARDENT.font,
|
|
2073
|
+
fontSize: 16,
|
|
2074
|
+
fontWeight: 600,
|
|
2075
|
+
textTransform: 'none',
|
|
2076
|
+
'&:hover': { bgcolor: ARDENT.ink },
|
|
2077
|
+
}}
|
|
2078
|
+
>
|
|
2079
|
+
Next: {nextStep?.label}
|
|
2080
|
+
</Button>
|
|
2081
|
+
)}
|
|
2082
|
+
</Box>
|
|
2083
|
+
</Box>
|
|
2084
|
+
</Box>
|
|
2085
|
+
|
|
2086
|
+
<Box
|
|
2087
|
+
component="aside"
|
|
2088
|
+
aria-label="Quote"
|
|
2089
|
+
sx={{
|
|
2090
|
+
display: 'flex',
|
|
2091
|
+
flexDirection: 'column',
|
|
2092
|
+
gap: 3,
|
|
2093
|
+
minBlockSize: 0,
|
|
2094
|
+
overflowY: 'auto',
|
|
2095
|
+
padding: 4,
|
|
2096
|
+
bgcolor: ARDENT.panel,
|
|
2097
|
+
borderInlineStart: `1px solid ${ARDENT.line}`,
|
|
2098
|
+
}}
|
|
2099
|
+
>
|
|
2100
|
+
<PriceBreakdown />
|
|
2101
|
+
{isLast ? (
|
|
2102
|
+
navigationState !== 'requested' && <QuoteAction onBlocked={() => setRevealWarnings(true)} compact={false} />
|
|
2103
|
+
) : (
|
|
2104
|
+
<Box component="div" sx={{ display: 'grid', gap: 1 }}>
|
|
2105
|
+
{conflictCount > 0 && (
|
|
2106
|
+
<Typography sx={{ fontFamily: ARDENT.font, fontSize: 14, color: ARDENT.warning }}>
|
|
2107
|
+
{conflictCount === 1 ? 'One choice needs attention' : `${conflictCount} choices need attention`} before
|
|
2108
|
+
the quote can be requested.
|
|
2109
|
+
</Typography>
|
|
2110
|
+
)}
|
|
2111
|
+
<Button
|
|
2112
|
+
variant="outlined"
|
|
2113
|
+
onClick={() => goTo('review')}
|
|
2114
|
+
sx={{
|
|
2115
|
+
minBlockSize: 48,
|
|
2116
|
+
borderRadius: 2,
|
|
2117
|
+
borderColor: ARDENT.ink,
|
|
2118
|
+
color: ARDENT.ink,
|
|
2119
|
+
fontFamily: ARDENT.font,
|
|
2120
|
+
fontSize: 16,
|
|
2121
|
+
fontWeight: 600,
|
|
2122
|
+
textTransform: 'none',
|
|
2123
|
+
}}
|
|
2124
|
+
>
|
|
2125
|
+
Review and request quote
|
|
2126
|
+
</Button>
|
|
2127
|
+
</Box>
|
|
2128
|
+
)}
|
|
2129
|
+
{/* Snackbars for a failed save stack upwards from the bottom of the column */}
|
|
2130
|
+
<Box component="div" sx={{ marginBlockStart: 'auto' }}>
|
|
2131
|
+
<LayoutSlots.DesktopSnackbarsRoot />
|
|
2132
|
+
</Box>
|
|
2133
|
+
</Box>
|
|
2134
|
+
</Box>
|
|
2135
|
+
)
|
|
2136
|
+
}
|
|
2137
|
+
```
|
|
2138
|
+
|
|
2139
|
+
### ./src/\_shared/PhonePage.tsx
|
|
2140
|
+
|
|
2141
|
+
```tsx
|
|
2142
|
+
import { Box, Button, ButtonBase, Typography } from '@mui/material'
|
|
2143
|
+
import { useEffect, useRef, useState } from 'react'
|
|
2144
|
+
|
|
2145
|
+
import { LayoutSlots } from '@salsita-ai/sdk/configurator'
|
|
2146
|
+
|
|
2147
|
+
import { ARDENT } from '../_form/index.js'
|
|
2148
|
+
import { PriceBreakdown } from './PriceBreakdown.js'
|
|
2149
|
+
import { QuoteAction } from './QuoteAction.js'
|
|
2150
|
+
import { StepForm } from './StepForm.js'
|
|
2151
|
+
import { StepHeader } from './StepHeader.js'
|
|
2152
|
+
|
|
2153
|
+
const CHEVRON_ICON = 'M6 15l6-6 6 6'
|
|
2154
|
+
|
|
2155
|
+
// The phone page: one column with the compact stepper, the active step's form, and a bar at the bottom with the total
|
|
2156
|
+
// and the way on. The total opens the price breakdown as a sheet above the bar.
|
|
2157
|
+
export const PhonePage = () => {
|
|
2158
|
+
const { accessInfo } = phx.frontend.useAccessService()
|
|
2159
|
+
const { activeStep, isLast, steps, next } = phx.frontend.useStepNavigation()
|
|
2160
|
+
const navigationState = phx.frontend.useActiveNavigationState()
|
|
2161
|
+
const compressor = phx.frontend.useRootEntityState()
|
|
2162
|
+
const total = phx.frontend.useRootEntityPrice()
|
|
2163
|
+
const [isBreakdownOpen, setBreakdownOpen] = useState(false)
|
|
2164
|
+
const [revealWarnings, setRevealWarnings] = useState(false)
|
|
2165
|
+
const formRef = useRef<HTMLElement>(null)
|
|
2166
|
+
|
|
2167
|
+
// Each step starts at its top, as a new page would
|
|
2168
|
+
useEffect(() => {
|
|
2169
|
+
formRef.current?.scrollTo({ top: 0 })
|
|
2170
|
+
}, [navigationState])
|
|
2171
|
+
const nextStep = steps[(activeStep?.index ?? -1) + 1]
|
|
2172
|
+
|
|
2173
|
+
return (
|
|
2174
|
+
<Box
|
|
2175
|
+
component="div"
|
|
2176
|
+
sx={{
|
|
2177
|
+
position: 'absolute',
|
|
2178
|
+
inset: 0,
|
|
2179
|
+
display: 'grid',
|
|
2180
|
+
gridTemplateRows: 'auto auto minmax(0, 1fr) auto',
|
|
2181
|
+
bgcolor: ARDENT.page,
|
|
2182
|
+
fontFamily: ARDENT.font,
|
|
2183
|
+
}}
|
|
2184
|
+
>
|
|
2185
|
+
<Box
|
|
2186
|
+
component="header"
|
|
2187
|
+
sx={{
|
|
2188
|
+
display: 'flex',
|
|
2189
|
+
alignItems: 'center',
|
|
2190
|
+
gap: 1.5,
|
|
2191
|
+
paddingInline: 2,
|
|
2192
|
+
blockSize: 52,
|
|
2193
|
+
bgcolor: ARDENT.navy,
|
|
2194
|
+
color: ARDENT.panel,
|
|
2195
|
+
}}
|
|
2196
|
+
>
|
|
2197
|
+
<Typography sx={{ fontFamily: ARDENT.font, fontSize: 18, fontWeight: 700, letterSpacing: '0.12em' }}>
|
|
2198
|
+
ARDENT
|
|
2199
|
+
<Box component="span" sx={{ color: ARDENT.signal }}>
|
|
2200
|
+
{' '}
|
|
2201
|
+
AIR
|
|
2202
|
+
</Box>
|
|
2203
|
+
</Typography>
|
|
2204
|
+
<Typography
|
|
2205
|
+
component="h1"
|
|
2206
|
+
sx={{ marginInlineStart: 'auto', fontFamily: ARDENT.font, fontSize: 15, color: '#c9d3e0' }}
|
|
2207
|
+
>
|
|
2208
|
+
Quote · {compressor.$frameName}
|
|
2209
|
+
</Typography>
|
|
2210
|
+
</Box>
|
|
2211
|
+
|
|
2212
|
+
<Box component="div" sx={{ bgcolor: ARDENT.panel, borderBlockEnd: `1px solid ${ARDENT.line}` }}>
|
|
2213
|
+
<StepHeader compact />
|
|
2214
|
+
</Box>
|
|
2215
|
+
|
|
2216
|
+
<Box component="main" ref={formRef} sx={{ overflowY: 'auto', minBlockSize: 0 }}>
|
|
2217
|
+
<Box component="div" sx={{ display: 'grid', gap: 2, padding: 2, paddingBlockEnd: 3 }}>
|
|
2218
|
+
<StepForm readOnly={accessInfo.viewMode} revealWarnings={revealWarnings} />
|
|
2219
|
+
</Box>
|
|
2220
|
+
</Box>
|
|
2221
|
+
|
|
2222
|
+
{isBreakdownOpen && (
|
|
2223
|
+
<Box
|
|
2224
|
+
component="div"
|
|
2225
|
+
onClick={() => setBreakdownOpen(false)}
|
|
2226
|
+
sx={{ position: 'absolute', inset: 0, bgcolor: 'rgba(13, 27, 46, 0.4)' }}
|
|
2227
|
+
/>
|
|
2228
|
+
)}
|
|
2229
|
+
|
|
2230
|
+
<Box
|
|
2231
|
+
component="footer"
|
|
2232
|
+
sx={{
|
|
2233
|
+
position: 'relative',
|
|
2234
|
+
display: 'grid',
|
|
2235
|
+
gap: 1.5,
|
|
2236
|
+
padding: 2,
|
|
2237
|
+
bgcolor: ARDENT.panel,
|
|
2238
|
+
borderBlockStart: `1px solid ${ARDENT.line}`,
|
|
2239
|
+
boxShadow: '0 -8px 24px rgba(13, 27, 46, 0.08)',
|
|
2240
|
+
}}
|
|
2241
|
+
>
|
|
2242
|
+
{isBreakdownOpen && (
|
|
2243
|
+
<Box component="div" sx={{ maxBlockSize: '55vh', overflowY: 'auto', paddingBlockEnd: 1 }}>
|
|
2244
|
+
<PriceBreakdown />
|
|
2245
|
+
</Box>
|
|
2246
|
+
)}
|
|
2247
|
+
<Box component="div" sx={{ display: 'flex', alignItems: 'center', gap: 2 }}>
|
|
2248
|
+
<ButtonBase
|
|
2249
|
+
aria-expanded={isBreakdownOpen}
|
|
2250
|
+
aria-label={isBreakdownOpen ? 'Hide the price breakdown' : 'Show the price breakdown'}
|
|
2251
|
+
onClick={() => setBreakdownOpen(open => !open)}
|
|
2252
|
+
sx={{ display: 'grid', justifyItems: 'start', textAlign: 'start', borderRadius: 1, paddingInlineEnd: 1 }}
|
|
2253
|
+
>
|
|
2254
|
+
<Typography
|
|
2255
|
+
component="span"
|
|
2256
|
+
sx={{
|
|
2257
|
+
display: 'flex',
|
|
2258
|
+
alignItems: 'center',
|
|
2259
|
+
gap: 0.5,
|
|
2260
|
+
fontFamily: ARDENT.font,
|
|
2261
|
+
fontSize: 13,
|
|
2262
|
+
color: ARDENT.steel,
|
|
2263
|
+
}}
|
|
2264
|
+
>
|
|
2265
|
+
Total, {compressor.$leadTimeWeeks} weeks
|
|
2266
|
+
<Box
|
|
2267
|
+
component="svg"
|
|
2268
|
+
viewBox="0 0 24 24"
|
|
2269
|
+
aria-hidden
|
|
2270
|
+
sx={{
|
|
2271
|
+
inlineSize: 16,
|
|
2272
|
+
blockSize: 16,
|
|
2273
|
+
transform: isBreakdownOpen ? 'rotate(180deg)' : 'none',
|
|
2274
|
+
transition: 'transform 160ms',
|
|
2275
|
+
}}
|
|
2276
|
+
>
|
|
2277
|
+
<path d={CHEVRON_ICON} fill="none" stroke="currentColor" strokeWidth={2} strokeLinecap="round" />
|
|
2278
|
+
</Box>
|
|
2279
|
+
</Typography>
|
|
2280
|
+
<Typography
|
|
2281
|
+
component="span"
|
|
2282
|
+
sx={{ fontFamily: ARDENT.font, fontSize: 22, fontWeight: 700, color: ARDENT.ink }}
|
|
2283
|
+
>
|
|
2284
|
+
{total}
|
|
2285
|
+
</Typography>
|
|
2286
|
+
</ButtonBase>
|
|
2287
|
+
<Box component="div" sx={{ flex: 1, minInlineSize: 0 }}>
|
|
2288
|
+
{isLast ? (
|
|
2289
|
+
navigationState !== 'requested' && <QuoteAction onBlocked={() => setRevealWarnings(true)} compact />
|
|
2290
|
+
) : (
|
|
2291
|
+
<Button
|
|
2292
|
+
fullWidth
|
|
2293
|
+
variant="contained"
|
|
2294
|
+
disableElevation
|
|
2295
|
+
onClick={next}
|
|
2296
|
+
sx={{
|
|
2297
|
+
minBlockSize: 48,
|
|
2298
|
+
borderRadius: 2,
|
|
2299
|
+
bgcolor: ARDENT.navy,
|
|
2300
|
+
fontFamily: ARDENT.font,
|
|
2301
|
+
fontSize: 16,
|
|
2302
|
+
fontWeight: 600,
|
|
2303
|
+
textTransform: 'none',
|
|
2304
|
+
'&:hover': { bgcolor: ARDENT.ink },
|
|
2305
|
+
}}
|
|
2306
|
+
>
|
|
2307
|
+
Next: {nextStep?.label}
|
|
2308
|
+
</Button>
|
|
2309
|
+
)}
|
|
2310
|
+
</Box>
|
|
2311
|
+
</Box>
|
|
2312
|
+
</Box>
|
|
2313
|
+
|
|
2314
|
+
<LayoutSlots.MobileSnackbarsRoot />
|
|
2315
|
+
</Box>
|
|
2316
|
+
)
|
|
2317
|
+
}
|
|
2318
|
+
```
|
|
2319
|
+
|
|
2320
|
+
### ./src/\_shared/PriceBreakdown.tsx
|
|
2321
|
+
|
|
2322
|
+
```tsx
|
|
2323
|
+
import { Box, Typography } from '@mui/material'
|
|
2324
|
+
|
|
2325
|
+
import { ARDENT, OVERLINE_SX } from '../_form/index.js'
|
|
2326
|
+
|
|
2327
|
+
const formatEuro = (amount: number) => {
|
|
2328
|
+
return amount.toLocaleString('en-IE', { style: 'currency', currency: 'EUR', maximumFractionDigits: 0 })
|
|
2329
|
+
}
|
|
2330
|
+
|
|
2331
|
+
const ROW_SX = {
|
|
2332
|
+
display: 'grid',
|
|
2333
|
+
gridTemplateColumns: '1fr auto',
|
|
2334
|
+
columnGap: 2,
|
|
2335
|
+
alignItems: 'baseline',
|
|
2336
|
+
paddingBlock: 1,
|
|
2337
|
+
} as const
|
|
2338
|
+
|
|
2339
|
+
// The quote's lines, subtotal, lead-time surcharge and total. Every number comes from an expression of the spec
|
|
2340
|
+
// (`$quoteLines`, `$subtotal`, `$leadTimeSurcharge`, `$leadTimeWeeks`), read from the root entity, so the breakdown
|
|
2341
|
+
// changes with each choice, and the total is the `price` component's value.
|
|
2342
|
+
export const PriceBreakdown = () => {
|
|
2343
|
+
const compressor = phx.frontend.useRootEntityState()
|
|
2344
|
+
const total = phx.frontend.useRootEntityPrice()
|
|
2345
|
+
|
|
2346
|
+
return (
|
|
2347
|
+
<Box component="section" aria-label="Price breakdown" sx={{ display: 'grid', fontFamily: ARDENT.font }}>
|
|
2348
|
+
<Typography component="h2" sx={{ ...OVERLINE_SX, paddingBlockEnd: 1 }}>
|
|
2349
|
+
Price breakdown
|
|
2350
|
+
</Typography>
|
|
2351
|
+
|
|
2352
|
+
<Box component="ul" sx={{ margin: 0, padding: 0, listStyle: 'none' }}>
|
|
2353
|
+
{compressor.$quoteLines.map(line => (
|
|
2354
|
+
<Box component="li" key={line.key} sx={{ ...ROW_SX, borderBlockEnd: `1px solid ${ARDENT.line}` }}>
|
|
2355
|
+
<Box component="div" sx={{ display: 'grid', minInlineSize: 0 }}>
|
|
2356
|
+
<Typography
|
|
2357
|
+
component="span"
|
|
2358
|
+
sx={{ fontFamily: ARDENT.font, fontSize: 15, fontWeight: 500, color: ARDENT.ink }}
|
|
2359
|
+
>
|
|
2360
|
+
{line.label}
|
|
2361
|
+
</Typography>
|
|
2362
|
+
<Typography component="span" sx={{ fontFamily: ARDENT.font, fontSize: 13, color: ARDENT.steel }}>
|
|
2363
|
+
{line.detail}
|
|
2364
|
+
</Typography>
|
|
2365
|
+
</Box>
|
|
2366
|
+
<Typography
|
|
2367
|
+
component="span"
|
|
2368
|
+
sx={{ fontFamily: ARDENT.font, fontSize: 15, color: ARDENT.ink, fontVariantNumeric: 'tabular-nums' }}
|
|
2369
|
+
>
|
|
2370
|
+
{formatEuro(line.amount)}
|
|
2371
|
+
</Typography>
|
|
2372
|
+
</Box>
|
|
2373
|
+
))}
|
|
2374
|
+
</Box>
|
|
2375
|
+
|
|
2376
|
+
<Box component="div" sx={{ ...ROW_SX, paddingBlockStart: 1.5 }}>
|
|
2377
|
+
<Typography component="span" sx={{ fontFamily: ARDENT.font, fontSize: 15, color: ARDENT.steel }}>
|
|
2378
|
+
Subtotal
|
|
2379
|
+
</Typography>
|
|
2380
|
+
<Typography
|
|
2381
|
+
component="span"
|
|
2382
|
+
sx={{ fontFamily: ARDENT.font, fontSize: 15, color: ARDENT.ink, fontVariantNumeric: 'tabular-nums' }}
|
|
2383
|
+
>
|
|
2384
|
+
{formatEuro(compressor.$subtotal)}
|
|
2385
|
+
</Typography>
|
|
2386
|
+
</Box>
|
|
2387
|
+
{compressor.$leadTimeSurcharge > 0 && (
|
|
2388
|
+
<Box component="div" sx={ROW_SX}>
|
|
2389
|
+
<Typography component="span" sx={{ fontFamily: ARDENT.font, fontSize: 15, color: ARDENT.steel }}>
|
|
2390
|
+
Express delivery surcharge
|
|
2391
|
+
</Typography>
|
|
2392
|
+
<Typography
|
|
2393
|
+
component="span"
|
|
2394
|
+
sx={{ fontFamily: ARDENT.font, fontSize: 15, color: ARDENT.ink, fontVariantNumeric: 'tabular-nums' }}
|
|
2395
|
+
>
|
|
2396
|
+
{formatEuro(compressor.$leadTimeSurcharge)}
|
|
2397
|
+
</Typography>
|
|
2398
|
+
</Box>
|
|
2399
|
+
)}
|
|
2400
|
+
|
|
2401
|
+
<Box
|
|
2402
|
+
component="div"
|
|
2403
|
+
sx={{ ...ROW_SX, marginBlockStart: 1, paddingBlockStart: 1.5, borderBlockStart: `2px solid ${ARDENT.ink}` }}
|
|
2404
|
+
>
|
|
2405
|
+
<Typography component="span" sx={{ fontFamily: ARDENT.font, fontSize: 17, fontWeight: 600, color: ARDENT.ink }}>
|
|
2406
|
+
Total, ex works
|
|
2407
|
+
</Typography>
|
|
2408
|
+
<Typography
|
|
2409
|
+
component="span"
|
|
2410
|
+
sx={{
|
|
2411
|
+
fontFamily: ARDENT.font,
|
|
2412
|
+
fontSize: 26,
|
|
2413
|
+
fontWeight: 700,
|
|
2414
|
+
color: ARDENT.ink,
|
|
2415
|
+
fontVariantNumeric: 'tabular-nums',
|
|
2416
|
+
}}
|
|
2417
|
+
>
|
|
2418
|
+
{total}
|
|
2419
|
+
</Typography>
|
|
2420
|
+
</Box>
|
|
2421
|
+
<Typography sx={{ fontFamily: ARDENT.font, fontSize: 14, color: ARDENT.steel, textAlign: 'end' }}>
|
|
2422
|
+
Lead time {compressor.$leadTimeWeeks} weeks · prices excl. VAT
|
|
2423
|
+
</Typography>
|
|
2424
|
+
</Box>
|
|
2425
|
+
)
|
|
2426
|
+
}
|
|
2427
|
+
```
|
|
2428
|
+
|
|
2429
|
+
### ./src/\_shared/QuoteAction.tsx
|
|
2430
|
+
|
|
2431
|
+
```tsx
|
|
2432
|
+
import { Alert, Box, Button, CircularProgress, Typography } from '@mui/material'
|
|
2433
|
+
|
|
2434
|
+
import { ARDENT } from '../_form/index.js'
|
|
2435
|
+
|
|
2436
|
+
interface QuoteActionProps {
|
|
2437
|
+
// Called instead of running the action while a warning blocks it, so the layout can show every warning
|
|
2438
|
+
readonly onBlocked: () => void
|
|
2439
|
+
// Leaves out the list of what blocks the request, for the phone's bottom bar
|
|
2440
|
+
readonly compact: boolean
|
|
2441
|
+
}
|
|
2442
|
+
|
|
2443
|
+
// The spec's `quote` finalize action. While any warning holds, `useFinalizeActions` reports the action `disabled` with
|
|
2444
|
+
// the warnings as `hints`: the button stays clickable and reveals them instead of running. A viewer sees no button.
|
|
2445
|
+
export const QuoteAction = ({ onBlocked, compact }: QuoteActionProps) => {
|
|
2446
|
+
const { primary, hints } = phx.frontend.useFinalizeActions()
|
|
2447
|
+
const { accessInfo } = phx.frontend.useAccessService()
|
|
2448
|
+
|
|
2449
|
+
if (primary === null || accessInfo.viewMode) {
|
|
2450
|
+
return null
|
|
2451
|
+
}
|
|
2452
|
+
|
|
2453
|
+
return (
|
|
2454
|
+
<Box component="div" sx={{ display: 'grid', gap: 1.25 }}>
|
|
2455
|
+
<Button
|
|
2456
|
+
variant="contained"
|
|
2457
|
+
disableElevation
|
|
2458
|
+
disabled={primary.isPending}
|
|
2459
|
+
aria-disabled={primary.disabled}
|
|
2460
|
+
title={primary.title}
|
|
2461
|
+
onClick={() => (primary.disabled ? onBlocked() : void primary.run())}
|
|
2462
|
+
startIcon={primary.isPending ? <CircularProgress size={18} color="inherit" /> : undefined}
|
|
2463
|
+
sx={{
|
|
2464
|
+
minBlockSize: 52,
|
|
2465
|
+
borderRadius: 2,
|
|
2466
|
+
bgcolor: primary.disabled ? ARDENT.steel : ARDENT.signal,
|
|
2467
|
+
color: ARDENT.panel,
|
|
2468
|
+
fontFamily: ARDENT.font,
|
|
2469
|
+
fontSize: 17,
|
|
2470
|
+
fontWeight: 600,
|
|
2471
|
+
textTransform: 'none',
|
|
2472
|
+
'&:hover': { bgcolor: primary.disabled ? ARDENT.steel : ARDENT.signalDark },
|
|
2473
|
+
'&.Mui-disabled': { bgcolor: ARDENT.signal, color: ARDENT.panel, opacity: 0.7 },
|
|
2474
|
+
}}
|
|
2475
|
+
>
|
|
2476
|
+
{primary.isPending ? 'Sending to an engineer…' : primary.label}
|
|
2477
|
+
</Button>
|
|
2478
|
+
{!compact && primary.disabled && hints && (
|
|
2479
|
+
<Typography sx={{ fontFamily: ARDENT.font, fontSize: 14, lineHeight: 1.4, color: ARDENT.warning }}>
|
|
2480
|
+
Resolve before requesting: {hints}
|
|
2481
|
+
</Typography>
|
|
2482
|
+
)}
|
|
2483
|
+
{primary.error && (
|
|
2484
|
+
<Alert severity="error">The quote could not be sent: {primary.error.message} Try again in a moment.</Alert>
|
|
2485
|
+
)}
|
|
2486
|
+
</Box>
|
|
2487
|
+
)
|
|
2488
|
+
}
|
|
2489
|
+
```
|
|
2490
|
+
|
|
2491
|
+
### ./src/\_shared/ReviewStep.tsx
|
|
2492
|
+
|
|
2493
|
+
```tsx
|
|
2494
|
+
import { Box, Button, Typography } from '@mui/material'
|
|
2495
|
+
|
|
2496
|
+
import { ARDENT, OVERLINE_SX, TextInputField, useWarnings } from '../_form/index.js'
|
|
2497
|
+
import { setQuoteReceipt, useQuoteReceipt } from './quote-receipt.js'
|
|
2498
|
+
import { STEP_WARNINGS } from './step-warnings.js'
|
|
2499
|
+
|
|
2500
|
+
const CARD_SX = {
|
|
2501
|
+
display: 'grid',
|
|
2502
|
+
gap: 2.5,
|
|
2503
|
+
padding: { xs: 2.5, sm: 3 },
|
|
2504
|
+
borderRadius: 3,
|
|
2505
|
+
border: `1px solid ${ARDENT.line}`,
|
|
2506
|
+
bgcolor: ARDENT.panel,
|
|
2507
|
+
} as const
|
|
2508
|
+
|
|
2509
|
+
// The quote service's answer, kept visible after the request: what to quote against and who answers
|
|
2510
|
+
const Receipt = () => {
|
|
2511
|
+
const receipt = useQuoteReceipt()
|
|
2512
|
+
const navigate = phx.frontend.useNavigate()
|
|
2513
|
+
// The answer lives only as long as the page; a configuration reopened in the `requested` state shows no details
|
|
2514
|
+
const rows =
|
|
2515
|
+
receipt === null
|
|
2516
|
+
? []
|
|
2517
|
+
: [
|
|
2518
|
+
{ label: 'Reference', value: receipt.reference },
|
|
2519
|
+
{ label: 'Your engineer', value: receipt.engineer },
|
|
2520
|
+
{ label: 'Price valid until', value: receipt.validUntil },
|
|
2521
|
+
{ label: 'Quoted total', value: receipt.total },
|
|
2522
|
+
]
|
|
2523
|
+
|
|
2524
|
+
return (
|
|
2525
|
+
<Box
|
|
2526
|
+
component="section"
|
|
2527
|
+
role="status"
|
|
2528
|
+
sx={{ ...CARD_SX, borderColor: ARDENT.success, bgcolor: ARDENT.successTint }}
|
|
2529
|
+
>
|
|
2530
|
+
<Box component="header" sx={{ display: 'grid', gap: 0.5 }}>
|
|
2531
|
+
<Typography
|
|
2532
|
+
component="h3"
|
|
2533
|
+
sx={{ fontFamily: ARDENT.font, fontSize: 24, fontWeight: 700, color: ARDENT.success }}
|
|
2534
|
+
>
|
|
2535
|
+
Quote requested
|
|
2536
|
+
</Typography>
|
|
2537
|
+
<Typography sx={{ fontFamily: ARDENT.font, fontSize: 15, color: ARDENT.ink }}>
|
|
2538
|
+
Your engineer checks the duty and sends a firm quote within one working day.
|
|
2539
|
+
</Typography>
|
|
2540
|
+
</Box>
|
|
2541
|
+
<Box
|
|
2542
|
+
component="dl"
|
|
2543
|
+
sx={{ display: 'grid', gridTemplateColumns: 'max-content 1fr', columnGap: 3, rowGap: 1, margin: 0 }}
|
|
2544
|
+
>
|
|
2545
|
+
{rows.map(row => (
|
|
2546
|
+
<Box component="div" key={row.label} sx={{ display: 'contents' }}>
|
|
2547
|
+
<Typography component="dt" sx={{ fontFamily: ARDENT.font, fontSize: 15, color: ARDENT.steel }}>
|
|
2548
|
+
{row.label}
|
|
2549
|
+
</Typography>
|
|
2550
|
+
<Typography
|
|
2551
|
+
component="dd"
|
|
2552
|
+
sx={{ margin: 0, fontFamily: ARDENT.font, fontSize: 15, fontWeight: 600, color: ARDENT.ink }}
|
|
2553
|
+
>
|
|
2554
|
+
{row.value}
|
|
2555
|
+
</Typography>
|
|
2556
|
+
</Box>
|
|
2557
|
+
))}
|
|
2558
|
+
</Box>
|
|
2559
|
+
<Box component="div">
|
|
2560
|
+
<Button
|
|
2561
|
+
variant="outlined"
|
|
2562
|
+
onClick={() => {
|
|
2563
|
+
setQuoteReceipt(null)
|
|
2564
|
+
navigate('review')
|
|
2565
|
+
}}
|
|
2566
|
+
sx={{
|
|
2567
|
+
borderColor: ARDENT.ink,
|
|
2568
|
+
color: ARDENT.ink,
|
|
2569
|
+
fontFamily: ARDENT.font,
|
|
2570
|
+
fontSize: 15,
|
|
2571
|
+
textTransform: 'none',
|
|
2572
|
+
}}
|
|
2573
|
+
>
|
|
2574
|
+
Back to summary
|
|
2575
|
+
</Button>
|
|
2576
|
+
</Box>
|
|
2577
|
+
</Box>
|
|
2578
|
+
)
|
|
2579
|
+
}
|
|
2580
|
+
|
|
2581
|
+
// The conflicts left between choices, each with a way to the step that resolves it
|
|
2582
|
+
const Conflicts = () => {
|
|
2583
|
+
const warnings = useWarnings()
|
|
2584
|
+
const { steps, goTo } = phx.frontend.useStepNavigation()
|
|
2585
|
+
const conflicts = warnings.flatMap(warning => {
|
|
2586
|
+
const step = steps.find(candidate => STEP_WARNINGS[candidate.state]?.includes(warning.type))
|
|
2587
|
+
|
|
2588
|
+
return step ? [{ ...warning, step }] : []
|
|
2589
|
+
})
|
|
2590
|
+
|
|
2591
|
+
if (conflicts.length === 0) {
|
|
2592
|
+
return null
|
|
2593
|
+
}
|
|
2594
|
+
|
|
2595
|
+
return (
|
|
2596
|
+
<Box
|
|
2597
|
+
component="section"
|
|
2598
|
+
role="alert"
|
|
2599
|
+
sx={{ ...CARD_SX, gap: 1.5, borderColor: ARDENT.warning, bgcolor: ARDENT.warningTint }}
|
|
2600
|
+
>
|
|
2601
|
+
<Typography component="h3" sx={{ fontFamily: ARDENT.font, fontSize: 18, fontWeight: 600, color: ARDENT.warning }}>
|
|
2602
|
+
{conflicts.length === 1 ? 'One choice needs attention' : `${conflicts.length} choices need attention`}
|
|
2603
|
+
</Typography>
|
|
2604
|
+
{conflicts.map(conflict => (
|
|
2605
|
+
<Box
|
|
2606
|
+
component="div"
|
|
2607
|
+
key={conflict.type}
|
|
2608
|
+
sx={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between', gap: 2 }}
|
|
2609
|
+
>
|
|
2610
|
+
<Typography sx={{ fontFamily: ARDENT.font, fontSize: 15, color: ARDENT.ink }}>{conflict.text}</Typography>
|
|
2611
|
+
<Button
|
|
2612
|
+
onClick={() => goTo(conflict.step.index)}
|
|
2613
|
+
sx={{
|
|
2614
|
+
flex: 'none',
|
|
2615
|
+
color: ARDENT.warning,
|
|
2616
|
+
fontFamily: ARDENT.font,
|
|
2617
|
+
fontSize: 15,
|
|
2618
|
+
fontWeight: 600,
|
|
2619
|
+
textTransform: 'none',
|
|
2620
|
+
}}
|
|
2621
|
+
>
|
|
2622
|
+
Go to {conflict.step.label}
|
|
2623
|
+
</Button>
|
|
2624
|
+
</Box>
|
|
2625
|
+
))}
|
|
2626
|
+
</Box>
|
|
2627
|
+
)
|
|
2628
|
+
}
|
|
2629
|
+
|
|
2630
|
+
interface ReviewStepProps {
|
|
2631
|
+
readonly readOnly: boolean
|
|
2632
|
+
readonly revealWarnings: boolean
|
|
2633
|
+
}
|
|
2634
|
+
|
|
2635
|
+
// The last step: the conflicts left, the contact details the quote needs, and the summary of what is quoted, from the
|
|
2636
|
+
// spec's `$specSheet` expression. After the request, the service's answer takes the place of the contact details.
|
|
2637
|
+
export const ReviewStep = ({ readOnly, revealWarnings }: ReviewStepProps) => {
|
|
2638
|
+
const compressor = phx.frontend.useRootEntityState()
|
|
2639
|
+
const navigationState = phx.frontend.useActiveNavigationState()
|
|
2640
|
+
const isRequested = navigationState === 'requested'
|
|
2641
|
+
|
|
2642
|
+
return (
|
|
2643
|
+
<>
|
|
2644
|
+
{isRequested ? (
|
|
2645
|
+
<Receipt />
|
|
2646
|
+
) : (
|
|
2647
|
+
<>
|
|
2648
|
+
<Conflicts />
|
|
2649
|
+
<Box component="section" sx={CARD_SX}>
|
|
2650
|
+
<Typography component="h3" sx={OVERLINE_SX}>
|
|
2651
|
+
Your details
|
|
2652
|
+
</Typography>
|
|
2653
|
+
<Box component="div" sx={{ display: 'grid', gridTemplateColumns: { xs: '1fr', md: '1fr 1fr' }, gap: 2.5 }}>
|
|
2654
|
+
<TextInputField
|
|
2655
|
+
instanceName="company"
|
|
2656
|
+
label="Company"
|
|
2657
|
+
warningTypes={['companyMissing']}
|
|
2658
|
+
readOnly={readOnly}
|
|
2659
|
+
autoComplete="organization"
|
|
2660
|
+
revealWarning={revealWarnings}
|
|
2661
|
+
/>
|
|
2662
|
+
<TextInputField
|
|
2663
|
+
instanceName="email"
|
|
2664
|
+
label="Email"
|
|
2665
|
+
type="email"
|
|
2666
|
+
warningTypes={['emailInvalid']}
|
|
2667
|
+
readOnly={readOnly}
|
|
2668
|
+
autoComplete="email"
|
|
2669
|
+
revealWarning={revealWarnings}
|
|
2670
|
+
/>
|
|
2671
|
+
</Box>
|
|
2672
|
+
<TextInputField
|
|
2673
|
+
instanceName="projectReference"
|
|
2674
|
+
label="Project reference"
|
|
2675
|
+
hint="Optional. It is printed on the quote."
|
|
2676
|
+
readOnly={readOnly}
|
|
2677
|
+
revealWarning={revealWarnings}
|
|
2678
|
+
/>
|
|
2679
|
+
</Box>
|
|
2680
|
+
</>
|
|
2681
|
+
)}
|
|
2682
|
+
|
|
2683
|
+
<Box component="section" sx={CARD_SX}>
|
|
2684
|
+
<Typography component="h3" sx={OVERLINE_SX}>
|
|
2685
|
+
{isRequested ? 'What was quoted' : 'Quote summary'}
|
|
2686
|
+
</Typography>
|
|
2687
|
+
<Box
|
|
2688
|
+
component="dl"
|
|
2689
|
+
sx={{ display: 'grid', gridTemplateColumns: { xs: '1fr', sm: '1fr 1fr' }, columnGap: 4, margin: 0 }}
|
|
2690
|
+
>
|
|
2691
|
+
{compressor.$specSheet.map(row => (
|
|
2692
|
+
<Box
|
|
2693
|
+
component="div"
|
|
2694
|
+
key={row.label}
|
|
2695
|
+
sx={{
|
|
2696
|
+
display: 'flex',
|
|
2697
|
+
justifyContent: 'space-between',
|
|
2698
|
+
gap: 2,
|
|
2699
|
+
paddingBlock: 1,
|
|
2700
|
+
borderBlockEnd: `1px solid ${ARDENT.line}`,
|
|
2701
|
+
}}
|
|
2702
|
+
>
|
|
2703
|
+
<Typography component="dt" sx={{ fontFamily: ARDENT.font, fontSize: 15, color: ARDENT.steel }}>
|
|
2704
|
+
{row.label}
|
|
2705
|
+
</Typography>
|
|
2706
|
+
<Typography
|
|
2707
|
+
component="dd"
|
|
2708
|
+
sx={{
|
|
2709
|
+
margin: 0,
|
|
2710
|
+
fontFamily: ARDENT.font,
|
|
2711
|
+
fontSize: 15,
|
|
2712
|
+
fontWeight: 500,
|
|
2713
|
+
color: ARDENT.ink,
|
|
2714
|
+
textAlign: 'end',
|
|
2715
|
+
}}
|
|
2716
|
+
>
|
|
2717
|
+
{row.value}
|
|
2718
|
+
</Typography>
|
|
2719
|
+
</Box>
|
|
2720
|
+
))}
|
|
2721
|
+
</Box>
|
|
2722
|
+
</Box>
|
|
2723
|
+
</>
|
|
2724
|
+
)
|
|
2725
|
+
}
|
|
2726
|
+
```
|
|
2727
|
+
|
|
2728
|
+
### ./src/\_shared/StepForm.tsx
|
|
2729
|
+
|
|
2730
|
+
```tsx
|
|
2731
|
+
import { Box, Typography } from '@mui/material'
|
|
2732
|
+
import type { ReactNode } from 'react'
|
|
2733
|
+
|
|
2734
|
+
import { ARDENT, ChoiceField, NumberField, OVERLINE_SX, SwitchField } from '../_form/index.js'
|
|
2735
|
+
import { ReviewStep } from './ReviewStep.js'
|
|
2736
|
+
|
|
2737
|
+
interface SectionProps {
|
|
2738
|
+
readonly title: string
|
|
2739
|
+
readonly description?: string
|
|
2740
|
+
readonly children: ReactNode
|
|
2741
|
+
}
|
|
2742
|
+
|
|
2743
|
+
const Section = ({ title, description, children }: SectionProps) => {
|
|
2744
|
+
return (
|
|
2745
|
+
<Box
|
|
2746
|
+
component="section"
|
|
2747
|
+
sx={{
|
|
2748
|
+
display: 'grid',
|
|
2749
|
+
gap: 3,
|
|
2750
|
+
padding: { xs: 2.5, sm: 3 },
|
|
2751
|
+
borderRadius: 3,
|
|
2752
|
+
border: `1px solid ${ARDENT.line}`,
|
|
2753
|
+
bgcolor: ARDENT.panel,
|
|
2754
|
+
}}
|
|
2755
|
+
>
|
|
2756
|
+
<Box component="header" sx={{ display: 'grid', gap: 0.5 }}>
|
|
2757
|
+
<Typography component="h3" sx={OVERLINE_SX}>
|
|
2758
|
+
{title}
|
|
2759
|
+
</Typography>
|
|
2760
|
+
{description && (
|
|
2761
|
+
<Typography sx={{ fontFamily: ARDENT.font, fontSize: 15, color: ARDENT.steel }}>{description}</Typography>
|
|
2762
|
+
)}
|
|
2763
|
+
</Box>
|
|
2764
|
+
{children}
|
|
2765
|
+
</Box>
|
|
2766
|
+
)
|
|
2767
|
+
}
|
|
2768
|
+
|
|
2769
|
+
// The frame the duty selects, from the spec's expressions, so the customer sees what the numbers mean
|
|
2770
|
+
const FrameStrip = () => {
|
|
2771
|
+
const compressor = phx.frontend.useRootEntityState()
|
|
2772
|
+
|
|
2773
|
+
return (
|
|
2774
|
+
<Box
|
|
2775
|
+
component="div"
|
|
2776
|
+
role="status"
|
|
2777
|
+
sx={{
|
|
2778
|
+
display: 'flex',
|
|
2779
|
+
flexWrap: 'wrap',
|
|
2780
|
+
alignItems: 'baseline',
|
|
2781
|
+
columnGap: 1.5,
|
|
2782
|
+
rowGap: 0.5,
|
|
2783
|
+
paddingInline: 2,
|
|
2784
|
+
paddingBlock: 1.5,
|
|
2785
|
+
borderRadius: 2,
|
|
2786
|
+
bgcolor: ARDENT.navy,
|
|
2787
|
+
color: ARDENT.panel,
|
|
2788
|
+
fontFamily: ARDENT.font,
|
|
2789
|
+
}}
|
|
2790
|
+
>
|
|
2791
|
+
<Typography component="span" sx={{ ...OVERLINE_SX, color: '#9fb0c6' }}>
|
|
2792
|
+
Selected frame
|
|
2793
|
+
</Typography>
|
|
2794
|
+
<Typography component="span" sx={{ fontFamily: ARDENT.font, fontSize: 20, fontWeight: 700 }}>
|
|
2795
|
+
{compressor.$frameName}
|
|
2796
|
+
</Typography>
|
|
2797
|
+
<Typography component="span" sx={{ fontFamily: ARDENT.font, fontSize: 15, color: '#c9d3e0' }}>
|
|
2798
|
+
{compressor.$frameKw} kW motor, the smallest frame that meets the duty
|
|
2799
|
+
</Typography>
|
|
2800
|
+
</Box>
|
|
2801
|
+
)
|
|
2802
|
+
}
|
|
2803
|
+
|
|
2804
|
+
interface StepFormProps {
|
|
2805
|
+
readonly readOnly: boolean
|
|
2806
|
+
readonly revealWarnings: boolean
|
|
2807
|
+
}
|
|
2808
|
+
|
|
2809
|
+
// The form of the active step. Each section lists the fields the step asks for; a field whose spec component is
|
|
2810
|
+
// inactive, such as the dew point without a desiccant dryer, renders nothing, so the conditions stay in the spec.
|
|
2811
|
+
export const StepForm = ({ readOnly, revealWarnings }: StepFormProps) => {
|
|
2812
|
+
const navigationState = phx.frontend.useActiveNavigationState()
|
|
2813
|
+
const compressor = phx.frontend.useRootEntityState()
|
|
2814
|
+
const receiverHint =
|
|
2815
|
+
compressor.$minReceiverLitres > 0
|
|
2816
|
+
? `A fixed-speed machine at this flow needs at least ${compressor.$minReceiverLitres.toLocaleString('en')} L.`
|
|
2817
|
+
: 'A variable-speed machine follows demand and needs no large buffer.'
|
|
2818
|
+
|
|
2819
|
+
switch (navigationState) {
|
|
2820
|
+
case 'duty':
|
|
2821
|
+
return (
|
|
2822
|
+
<>
|
|
2823
|
+
<Section title="Air demand" description="How much air the plant draws at peak, and at what pressure.">
|
|
2824
|
+
<NumberField
|
|
2825
|
+
instanceName="flow"
|
|
2826
|
+
label="Free air delivery"
|
|
2827
|
+
hint="Read it from the plate of the machine you replace, or from a flow log."
|
|
2828
|
+
warningTypes={['flowAboveRange']}
|
|
2829
|
+
readOnly={readOnly}
|
|
2830
|
+
step={0.5}
|
|
2831
|
+
/>
|
|
2832
|
+
<ChoiceField instanceName="pressure" label="Working pressure" readOnly={readOnly} />
|
|
2833
|
+
<FrameStrip />
|
|
2834
|
+
</Section>
|
|
2835
|
+
<Section title="Drive and duty">
|
|
2836
|
+
<ChoiceField instanceName="drive" label="Drive" readOnly={readOnly} minCardWidth={200} />
|
|
2837
|
+
<ChoiceField instanceName="dutyCycle" label="Duty cycle" readOnly={readOnly} minCardWidth={200} />
|
|
2838
|
+
</Section>
|
|
2839
|
+
</>
|
|
2840
|
+
)
|
|
2841
|
+
case 'treatment':
|
|
2842
|
+
return (
|
|
2843
|
+
<>
|
|
2844
|
+
<Section title="Drying" description="Compressed air leaves the machine saturated with water.">
|
|
2845
|
+
<ChoiceField instanceName="dryer" label="Dryer" readOnly={readOnly} />
|
|
2846
|
+
<ChoiceField instanceName="dewPoint" label="Pressure dew point" readOnly={readOnly} minCardWidth={200} />
|
|
2847
|
+
</Section>
|
|
2848
|
+
<Section title="Filtration">
|
|
2849
|
+
<ChoiceField
|
|
2850
|
+
instanceName="filtration"
|
|
2851
|
+
label="Filter package"
|
|
2852
|
+
warningTypes={['desiccantNeedsFiltration']}
|
|
2853
|
+
readOnly={readOnly}
|
|
2854
|
+
/>
|
|
2855
|
+
</Section>
|
|
2856
|
+
</>
|
|
2857
|
+
)
|
|
2858
|
+
case 'installation':
|
|
2859
|
+
return (
|
|
2860
|
+
<>
|
|
2861
|
+
<Section title="Plant room">
|
|
2862
|
+
<ChoiceField instanceName="cooling" label="Cooling" readOnly={readOnly} minCardWidth={200} />
|
|
2863
|
+
<SwitchField
|
|
2864
|
+
instanceName="heatRecovery"
|
|
2865
|
+
label="Heat recovery"
|
|
2866
|
+
description="Turns up to 70 % of the motor's power into hot water for the plant."
|
|
2867
|
+
readOnly={readOnly}
|
|
2868
|
+
/>
|
|
2869
|
+
<ChoiceField instanceName="enclosure" label="Canopy" readOnly={readOnly} minCardWidth={200} />
|
|
2870
|
+
</Section>
|
|
2871
|
+
<Section title="Air network">
|
|
2872
|
+
<ChoiceField
|
|
2873
|
+
instanceName="receiver"
|
|
2874
|
+
label="Air receiver"
|
|
2875
|
+
hint={receiverHint}
|
|
2876
|
+
warningTypes={['receiverTooSmall']}
|
|
2877
|
+
readOnly={readOnly}
|
|
2878
|
+
minCardWidth={110}
|
|
2879
|
+
/>
|
|
2880
|
+
<ChoiceField instanceName="supply" label="Electrical supply" readOnly={readOnly} minCardWidth={200} />
|
|
2881
|
+
</Section>
|
|
2882
|
+
</>
|
|
2883
|
+
)
|
|
2884
|
+
case 'service':
|
|
2885
|
+
return (
|
|
2886
|
+
<>
|
|
2887
|
+
<Section title="Service">
|
|
2888
|
+
<ChoiceField instanceName="servicePlan" label="Service plan" readOnly={readOnly} />
|
|
2889
|
+
<SwitchField
|
|
2890
|
+
instanceName="commissioning"
|
|
2891
|
+
label="Commissioning on site"
|
|
2892
|
+
description="An Ardent engineer starts the machine and trains your staff."
|
|
2893
|
+
readOnly={readOnly}
|
|
2894
|
+
/>
|
|
2895
|
+
</Section>
|
|
2896
|
+
<Section title="Delivery" description="Lead times are ex works, from the order's confirmation.">
|
|
2897
|
+
<ChoiceField
|
|
2898
|
+
instanceName="delivery"
|
|
2899
|
+
label="Delivery"
|
|
2900
|
+
warningTypes={['expressUnavailable']}
|
|
2901
|
+
readOnly={readOnly}
|
|
2902
|
+
minCardWidth={200}
|
|
2903
|
+
/>
|
|
2904
|
+
</Section>
|
|
2905
|
+
</>
|
|
2906
|
+
)
|
|
2907
|
+
default:
|
|
2908
|
+
return <ReviewStep readOnly={readOnly} revealWarnings={revealWarnings} />
|
|
2909
|
+
}
|
|
2910
|
+
}
|
|
2911
|
+
```
|
|
2912
|
+
|
|
2913
|
+
### ./src/\_shared/StepHeader.tsx
|
|
2914
|
+
|
|
2915
|
+
```tsx
|
|
2916
|
+
import { Box, ButtonBase, Typography } from '@mui/material'
|
|
2917
|
+
|
|
2918
|
+
import { ARDENT, useWarnings } from '../_form/index.js'
|
|
2919
|
+
import { STEP_WARNINGS } from './step-warnings.js'
|
|
2920
|
+
|
|
2921
|
+
const CHECK_ICON = 'M5 12.5 10 17.5 19 7'
|
|
2922
|
+
|
|
2923
|
+
interface StepHeaderProps {
|
|
2924
|
+
readonly compact: boolean
|
|
2925
|
+
}
|
|
2926
|
+
|
|
2927
|
+
// The spec's `navigationSteps` as a stepper. Every step can be entered, in any order; a step that holds a warning
|
|
2928
|
+
// carries a mark until the warning is resolved. On a phone the stepper is one line with a segmented progress bar.
|
|
2929
|
+
export const StepHeader = ({ compact }: StepHeaderProps) => {
|
|
2930
|
+
const { steps, activeStep, goTo } = phx.frontend.useStepNavigation()
|
|
2931
|
+
const warnings = useWarnings()
|
|
2932
|
+
|
|
2933
|
+
const hasWarning = (states: readonly string[]) => {
|
|
2934
|
+
return states.some(state => warnings.some(warning => STEP_WARNINGS[state]?.includes(warning.type)))
|
|
2935
|
+
}
|
|
2936
|
+
|
|
2937
|
+
if (compact) {
|
|
2938
|
+
return (
|
|
2939
|
+
<Box
|
|
2940
|
+
component="nav"
|
|
2941
|
+
aria-label="Quote steps"
|
|
2942
|
+
sx={{ display: 'grid', gap: 1, paddingInline: 2, paddingBlock: 1.5 }}
|
|
2943
|
+
>
|
|
2944
|
+
<Box component="div" sx={{ display: 'flex', alignItems: 'baseline', gap: 1 }}>
|
|
2945
|
+
<Typography sx={{ fontFamily: ARDENT.font, fontSize: 13, color: ARDENT.steel }}>
|
|
2946
|
+
Step {(activeStep?.index ?? 0) + 1} of {steps.length}
|
|
2947
|
+
</Typography>
|
|
2948
|
+
<Typography component="h2" sx={{ fontFamily: ARDENT.font, fontSize: 17, fontWeight: 600, color: ARDENT.ink }}>
|
|
2949
|
+
{activeStep?.label}
|
|
2950
|
+
</Typography>
|
|
2951
|
+
</Box>
|
|
2952
|
+
<Box component="ol" sx={{ display: 'flex', gap: 0.5, margin: 0, padding: 0, listStyle: 'none' }}>
|
|
2953
|
+
{steps.map(step => (
|
|
2954
|
+
<Box component="li" key={step.state} sx={{ flex: 1 }}>
|
|
2955
|
+
<ButtonBase
|
|
2956
|
+
aria-label={`${step.label}${hasWarning(step.navigationStates) ? ', needs attention' : ''}`}
|
|
2957
|
+
aria-current={step.status === 'active' ? 'step' : undefined}
|
|
2958
|
+
onClick={() => goTo(step.index)}
|
|
2959
|
+
sx={{
|
|
2960
|
+
display: 'block',
|
|
2961
|
+
inlineSize: '100%',
|
|
2962
|
+
blockSize: 6,
|
|
2963
|
+
borderRadius: 3,
|
|
2964
|
+
// A bigger target than the bar itself, for a finger
|
|
2965
|
+
outline: '8px solid transparent',
|
|
2966
|
+
bgcolor: hasWarning(step.navigationStates)
|
|
2967
|
+
? ARDENT.warning
|
|
2968
|
+
: step.status === 'upcoming'
|
|
2969
|
+
? ARDENT.line
|
|
2970
|
+
: ARDENT.signal,
|
|
2971
|
+
}}
|
|
2972
|
+
/>
|
|
2973
|
+
</Box>
|
|
2974
|
+
))}
|
|
2975
|
+
</Box>
|
|
2976
|
+
</Box>
|
|
2977
|
+
)
|
|
2978
|
+
}
|
|
2979
|
+
|
|
2980
|
+
return (
|
|
2981
|
+
<Box
|
|
2982
|
+
component="nav"
|
|
2983
|
+
aria-label="Quote steps"
|
|
2984
|
+
sx={{ display: 'flex', alignItems: 'center', gap: 1, paddingInline: 4, paddingBlock: 1.5, overflowX: 'auto' }}
|
|
2985
|
+
>
|
|
2986
|
+
{steps.map((step, index) => {
|
|
2987
|
+
const warn = hasWarning(step.navigationStates)
|
|
2988
|
+
const isActive = step.status === 'active'
|
|
2989
|
+
const isComplete = step.status === 'complete'
|
|
2990
|
+
|
|
2991
|
+
return (
|
|
2992
|
+
<Box component="div" key={step.state} sx={{ display: 'flex', alignItems: 'center', gap: 1, flex: 'none' }}>
|
|
2993
|
+
{index > 0 && (
|
|
2994
|
+
<Box
|
|
2995
|
+
component="span"
|
|
2996
|
+
aria-hidden
|
|
2997
|
+
sx={{ inlineSize: 32, blockSize: 2, bgcolor: isComplete || isActive ? ARDENT.signal : ARDENT.line }}
|
|
2998
|
+
/>
|
|
2999
|
+
)}
|
|
3000
|
+
<ButtonBase
|
|
3001
|
+
aria-current={isActive ? 'step' : undefined}
|
|
3002
|
+
onClick={() => goTo(step.index)}
|
|
3003
|
+
sx={{
|
|
3004
|
+
display: 'flex',
|
|
3005
|
+
alignItems: 'center',
|
|
3006
|
+
gap: 1,
|
|
3007
|
+
paddingInline: 1,
|
|
3008
|
+
paddingBlock: 0.75,
|
|
3009
|
+
borderRadius: 2,
|
|
3010
|
+
'&:hover': { bgcolor: ARDENT.page },
|
|
3011
|
+
'&.Mui-focusVisible': { outline: `2px solid ${ARDENT.navy}` },
|
|
3012
|
+
}}
|
|
3013
|
+
>
|
|
3014
|
+
<Box
|
|
3015
|
+
component="span"
|
|
3016
|
+
sx={{
|
|
3017
|
+
display: 'grid',
|
|
3018
|
+
placeItems: 'center',
|
|
3019
|
+
inlineSize: 28,
|
|
3020
|
+
blockSize: 28,
|
|
3021
|
+
borderRadius: '50%',
|
|
3022
|
+
fontFamily: ARDENT.font,
|
|
3023
|
+
fontSize: 14,
|
|
3024
|
+
fontWeight: 600,
|
|
3025
|
+
color: isActive || isComplete ? ARDENT.panel : ARDENT.steel,
|
|
3026
|
+
bgcolor: isActive ? ARDENT.signal : isComplete ? ARDENT.navy : 'transparent',
|
|
3027
|
+
border: isActive || isComplete ? 'none' : `2px solid ${ARDENT.line}`,
|
|
3028
|
+
}}
|
|
3029
|
+
>
|
|
3030
|
+
{isComplete ? (
|
|
3031
|
+
<Box component="svg" viewBox="0 0 24 24" aria-hidden sx={{ inlineSize: 16, blockSize: 16 }}>
|
|
3032
|
+
<path d={CHECK_ICON} fill="none" stroke="currentColor" strokeWidth={3} strokeLinecap="round" />
|
|
3033
|
+
</Box>
|
|
3034
|
+
) : (
|
|
3035
|
+
index + 1
|
|
3036
|
+
)}
|
|
3037
|
+
</Box>
|
|
3038
|
+
<Typography
|
|
3039
|
+
component="span"
|
|
3040
|
+
sx={{
|
|
3041
|
+
fontFamily: ARDENT.font,
|
|
3042
|
+
fontSize: 15,
|
|
3043
|
+
fontWeight: isActive ? 600 : 500,
|
|
3044
|
+
color: isActive ? ARDENT.ink : ARDENT.steel,
|
|
3045
|
+
whiteSpace: 'nowrap',
|
|
3046
|
+
}}
|
|
3047
|
+
>
|
|
3048
|
+
{step.label}
|
|
3049
|
+
</Typography>
|
|
3050
|
+
{warn && (
|
|
3051
|
+
<Box
|
|
3052
|
+
component="span"
|
|
3053
|
+
role="img"
|
|
3054
|
+
aria-label="needs attention"
|
|
3055
|
+
sx={{ inlineSize: 8, blockSize: 8, borderRadius: '50%', bgcolor: ARDENT.warning }}
|
|
3056
|
+
/>
|
|
3057
|
+
)}
|
|
3058
|
+
</ButtonBase>
|
|
3059
|
+
</Box>
|
|
3060
|
+
)
|
|
3061
|
+
})}
|
|
3062
|
+
</Box>
|
|
3063
|
+
)
|
|
3064
|
+
}
|
|
3065
|
+
```
|
|
3066
|
+
|
|
3067
|
+
### ./src/\_shared/quote-receipt.ts
|
|
3068
|
+
|
|
3069
|
+
```ts
|
|
3070
|
+
import { useSyncExternalStore } from 'react'
|
|
3071
|
+
|
|
3072
|
+
/** What the quote service answers when a quote is requested: the reference the engineer will quote against */
|
|
3073
|
+
export interface QuoteReceipt {
|
|
3074
|
+
readonly reference: string
|
|
3075
|
+
readonly engineer: string
|
|
3076
|
+
readonly validUntil: string
|
|
3077
|
+
readonly total: string
|
|
3078
|
+
}
|
|
3079
|
+
|
|
3080
|
+
let receipt: QuoteReceipt | null = null
|
|
3081
|
+
const listeners = new Set<() => void>()
|
|
3082
|
+
|
|
3083
|
+
const subscribe = (listener: () => void) => {
|
|
3084
|
+
listeners.add(listener)
|
|
3085
|
+
|
|
3086
|
+
return () => {
|
|
3087
|
+
listeners.delete(listener)
|
|
3088
|
+
}
|
|
3089
|
+
}
|
|
3090
|
+
|
|
3091
|
+
// A finalize action's `run()` resolves without a value, so the `requestQuote` handler keeps the service's answer here
|
|
3092
|
+
// for the layout to show. The project owns this store; the configurator does not persist it.
|
|
3093
|
+
export const setQuoteReceipt = (next: QuoteReceipt | null) => {
|
|
3094
|
+
receipt = next
|
|
3095
|
+
listeners.forEach(listener => listener())
|
|
3096
|
+
}
|
|
3097
|
+
|
|
3098
|
+
export const useQuoteReceipt = () => {
|
|
3099
|
+
return useSyncExternalStore(subscribe, () => receipt)
|
|
3100
|
+
}
|
|
3101
|
+
```
|
|
3102
|
+
|
|
3103
|
+
### ./src/\_shared/step-warnings.ts
|
|
3104
|
+
|
|
3105
|
+
```ts
|
|
3106
|
+
// Which step resolves each conflict between choices: the stepper marks a step that holds one, and the review sends the
|
|
3107
|
+
// customer to the step that can fix it. The contact details' warnings stay with their fields on the review step.
|
|
3108
|
+
export const STEP_WARNINGS: Readonly<Record<string, readonly string[]>> = {
|
|
3109
|
+
duty: ['flowAboveRange'],
|
|
3110
|
+
treatment: ['desiccantNeedsFiltration'],
|
|
3111
|
+
installation: ['receiverTooSmall'],
|
|
3112
|
+
service: ['expressUnavailable'],
|
|
3113
|
+
}
|
|
3114
|
+
```
|
|
3115
|
+
|
|
3116
|
+
### ./src/elements/ConfiguratorLayout.tsx
|
|
3117
|
+
|
|
3118
|
+
```tsx
|
|
3119
|
+
import { Box } from '@mui/material'
|
|
3120
|
+
|
|
3121
|
+
import { LayoutSlots } from '@salsita-ai/sdk/configurator'
|
|
3122
|
+
|
|
3123
|
+
import { ARDENT } from '../_form/index.js'
|
|
3124
|
+
import { DesktopPage } from '../_shared/DesktopPage.js'
|
|
3125
|
+
import { PhonePage } from '../_shared/PhonePage.js'
|
|
3126
|
+
|
|
3127
|
+
// A quote builder with no scene: the layout mounts the services and a page, never `LayoutSlots.SharedCanvas`, so the
|
|
3128
|
+
// configurator loads no 3D scene and the app loader does not wait for one. Desktop or phone follows the width of the
|
|
3129
|
+
// configurator's container.
|
|
3130
|
+
const ConfiguratorLayout = () => {
|
|
3131
|
+
// `null` until the container has been measured
|
|
3132
|
+
const viewports = phx.frontend.useActiveViewports()
|
|
3133
|
+
const isDesktop = viewports?.includes('desktop') ?? false
|
|
3134
|
+
|
|
3135
|
+
return (
|
|
3136
|
+
<Box component="div" sx={{ position: 'absolute', inset: 0, overflow: 'clip', bgcolor: ARDENT.page }}>
|
|
3137
|
+
<LayoutSlots.Services />
|
|
3138
|
+
{viewports !== null && (isDesktop ? <DesktopPage /> : <PhonePage />)}
|
|
3139
|
+
</Box>
|
|
3140
|
+
)
|
|
3141
|
+
}
|
|
3142
|
+
|
|
3143
|
+
export default phx.frontend.createCustomPhoenixLayoutElement('ConfiguratorLayout', ConfiguratorLayout)
|
|
3144
|
+
```
|
|
3145
|
+
|
|
3146
|
+
### ./src/expressions/compressor.ts
|
|
3147
|
+
|
|
3148
|
+
```ts
|
|
3149
|
+
// The frames Ardent builds, by motor power, with the free air delivery of each at 7.5 bar in m³/min
|
|
3150
|
+
const LARGEST_FRAME = { kw: 250, flow: 41 }
|
|
3151
|
+
const FRAMES = [
|
|
3152
|
+
{ kw: 22, flow: 3.6 },
|
|
3153
|
+
{ kw: 30, flow: 5 },
|
|
3154
|
+
{ kw: 37, flow: 6.3 },
|
|
3155
|
+
{ kw: 45, flow: 7.6 },
|
|
3156
|
+
{ kw: 55, flow: 9.6 },
|
|
3157
|
+
{ kw: 75, flow: 13 },
|
|
3158
|
+
{ kw: 90, flow: 15.8 },
|
|
3159
|
+
{ kw: 110, flow: 19.6 },
|
|
3160
|
+
{ kw: 132, flow: 23 },
|
|
3161
|
+
{ kw: 160, flow: 27.5 },
|
|
3162
|
+
{ kw: 200, flow: 34 },
|
|
3163
|
+
LARGEST_FRAME,
|
|
3164
|
+
]
|
|
3165
|
+
|
|
3166
|
+
// A higher pressure takes more power, so the same frame delivers less air
|
|
3167
|
+
const PRESSURE = {
|
|
3168
|
+
Bar7: { factor: 1, label: '7.5 bar' },
|
|
3169
|
+
Bar10: { factor: 0.85, label: '10 bar' },
|
|
3170
|
+
Bar13: { factor: 0.72, label: '13 bar' },
|
|
3171
|
+
}
|
|
3172
|
+
|
|
3173
|
+
const LARGEST_STOCK_FRAME_KW = 110
|
|
3174
|
+
const RECEIVER_LITRES = { None: 0, Litres500: 500, Litres1000: 1000, Litres2000: 2000 }
|
|
3175
|
+
const RECEIVER_PRICE = { None: 0, Litres500: 1150, Litres1000: 1900, Litres2000: 3400 }
|
|
3176
|
+
const EXPRESS_SURCHARGE = 0.08
|
|
3177
|
+
|
|
3178
|
+
const DRYER_LABEL = { None: 'No dryer', Refrigerant: 'Refrigerant dryer, +3 °C', Desiccant: 'Desiccant dryer' }
|
|
3179
|
+
const DEW_POINT_LABEL = { Minus40: '−40 °C', Minus70: '−70 °C' }
|
|
3180
|
+
const FILTRATION_LABEL = { General: 'General purpose', HighEfficiency: 'High efficiency', OilVapour: 'Oil vapour' }
|
|
3181
|
+
const PLAN_LABEL = { None: 'No plan', Essential: 'Essential, 3 years', TotalCare: 'Total care, 5 years' }
|
|
3182
|
+
|
|
3183
|
+
interface CompressorChoices {
|
|
3184
|
+
readonly flow: number
|
|
3185
|
+
readonly pressure: keyof typeof PRESSURE
|
|
3186
|
+
readonly drive: 'FixedSpeed' | 'VariableSpeed'
|
|
3187
|
+
readonly dryer: keyof typeof DRYER_LABEL
|
|
3188
|
+
readonly cooling: 'Air' | 'Water'
|
|
3189
|
+
readonly enclosure: 'Standard' | 'LowNoise'
|
|
3190
|
+
readonly supply: 'V400Hz50' | 'V480Hz60'
|
|
3191
|
+
}
|
|
3192
|
+
|
|
3193
|
+
// The smallest frame that delivers the flow at the pressure, or the largest one when none does
|
|
3194
|
+
const frameFor = (s: CompressorChoices) => {
|
|
3195
|
+
const factor = PRESSURE[s.pressure].factor
|
|
3196
|
+
|
|
3197
|
+
return FRAMES.find(frame => frame.flow * factor >= s.flow) ?? LARGEST_FRAME
|
|
3198
|
+
}
|
|
3199
|
+
|
|
3200
|
+
const basePriceOf = (kw: number) => {
|
|
3201
|
+
return 6000 + 360 * kw
|
|
3202
|
+
}
|
|
3203
|
+
|
|
3204
|
+
const standardWeeks = (s: CompressorChoices) => {
|
|
3205
|
+
return (
|
|
3206
|
+
(s.drive === 'VariableSpeed' ? 8 : 6) +
|
|
3207
|
+
(s.dryer === 'Desiccant' ? 2 : 0) +
|
|
3208
|
+
(s.cooling === 'Water' ? 1 : 0) +
|
|
3209
|
+
(s.enclosure === 'LowNoise' ? 1 : 0) +
|
|
3210
|
+
(s.supply === 'V480Hz60' ? 1 : 0)
|
|
3211
|
+
)
|
|
3212
|
+
}
|
|
3213
|
+
|
|
3214
|
+
const expressWeeks = (s: CompressorChoices) => {
|
|
3215
|
+
return Math.max(3, standardWeeks(s) - 4)
|
|
3216
|
+
}
|
|
3217
|
+
|
|
3218
|
+
export default phx.domain.implementCustomExpressions({
|
|
3219
|
+
Compressor: {
|
|
3220
|
+
$maxFlow: s => {
|
|
3221
|
+
return Math.floor(LARGEST_FRAME.flow * PRESSURE[s.pressure].factor * 2) / 2
|
|
3222
|
+
},
|
|
3223
|
+
$frameKw: s => {
|
|
3224
|
+
return frameFor(s).kw
|
|
3225
|
+
},
|
|
3226
|
+
$frameName: s => {
|
|
3227
|
+
return `RSV-${frameFor(s).kw}`
|
|
3228
|
+
},
|
|
3229
|
+
// A fixed-speed machine loads and unloads, so it needs a buffer of about 40 litres per m³/min
|
|
3230
|
+
$minReceiverLitres: s => {
|
|
3231
|
+
return s.drive === 'FixedSpeed' ? Math.ceil(s.flow * 40) : 0
|
|
3232
|
+
},
|
|
3233
|
+
$leadTimeWeeks: s => {
|
|
3234
|
+
return s.delivery === 'Express' ? expressWeeks(s) : standardWeeks(s)
|
|
3235
|
+
},
|
|
3236
|
+
// The delivery options name their lead time; express is offered for stock frames only
|
|
3237
|
+
$deliveryOptions: s => {
|
|
3238
|
+
const standard = {
|
|
3239
|
+
label: `Standard, ${standardWeeks(s)} weeks`,
|
|
3240
|
+
description: 'Built to order',
|
|
3241
|
+
value: 'Standard',
|
|
3242
|
+
}
|
|
3243
|
+
const express = {
|
|
3244
|
+
label: `Express, ${expressWeeks(s)} weeks`,
|
|
3245
|
+
description: `From stock, ${EXPRESS_SURCHARGE * 100} % surcharge`,
|
|
3246
|
+
value: 'Express',
|
|
3247
|
+
}
|
|
3248
|
+
|
|
3249
|
+
return frameFor(s).kw > LARGEST_STOCK_FRAME_KW ? [standard] : [standard, express]
|
|
3250
|
+
},
|
|
3251
|
+
$quoteLines: s => {
|
|
3252
|
+
const frame = frameFor(s)
|
|
3253
|
+
const base = basePriceOf(frame.kw)
|
|
3254
|
+
const lines = [
|
|
3255
|
+
{
|
|
3256
|
+
key: 'frame',
|
|
3257
|
+
label: `RSV-${frame.kw} rotary screw compressor`,
|
|
3258
|
+
detail: `${frame.kw} kW, ${PRESSURE[s.pressure].label}, ${(frame.flow * PRESSURE[s.pressure].factor).toFixed(1)} m³/min`,
|
|
3259
|
+
amount: base,
|
|
3260
|
+
},
|
|
3261
|
+
]
|
|
3262
|
+
|
|
3263
|
+
if (s.drive === 'VariableSpeed') {
|
|
3264
|
+
lines.push({
|
|
3265
|
+
key: 'drive',
|
|
3266
|
+
label: 'Variable speed drive',
|
|
3267
|
+
detail: 'Inverter and PM motor',
|
|
3268
|
+
amount: base * 0.28,
|
|
3269
|
+
})
|
|
3270
|
+
}
|
|
3271
|
+
|
|
3272
|
+
if (s.dutyCycle === 'Continuous') {
|
|
3273
|
+
lines.push({ key: 'duty', label: 'Heavy-duty package', detail: 'For continuous duty', amount: base * 0.06 })
|
|
3274
|
+
}
|
|
3275
|
+
|
|
3276
|
+
if (s.dryer === 'Refrigerant') {
|
|
3277
|
+
lines.push({ key: 'dryer', label: 'Refrigerant dryer', detail: '+3 °C dew point', amount: 1200 + 95 * s.flow })
|
|
3278
|
+
}
|
|
3279
|
+
|
|
3280
|
+
if (s.dryer === 'Desiccant') {
|
|
3281
|
+
const dryer = (3800 + 310 * s.flow) * (s.dewPoint === 'Minus70' ? 1.18 : 1)
|
|
3282
|
+
lines.push({
|
|
3283
|
+
key: 'dryer',
|
|
3284
|
+
label: 'Desiccant dryer',
|
|
3285
|
+
detail: `${DEW_POINT_LABEL[s.dewPoint]} dew point`,
|
|
3286
|
+
amount: dryer,
|
|
3287
|
+
})
|
|
3288
|
+
}
|
|
3289
|
+
|
|
3290
|
+
if (s.filtration === 'HighEfficiency') {
|
|
3291
|
+
lines.push({
|
|
3292
|
+
key: 'filters',
|
|
3293
|
+
label: 'High-efficiency filters',
|
|
3294
|
+
detail: '0.01 mg/m³',
|
|
3295
|
+
amount: 1450 + 20 * s.flow,
|
|
3296
|
+
})
|
|
3297
|
+
}
|
|
3298
|
+
|
|
3299
|
+
if (s.filtration === 'OilVapour') {
|
|
3300
|
+
lines.push({ key: 'filters', label: 'Oil-vapour filters', detail: '0.003 mg/m³', amount: 2900 + 40 * s.flow })
|
|
3301
|
+
}
|
|
3302
|
+
|
|
3303
|
+
if (s.cooling === 'Water') {
|
|
3304
|
+
lines.push({ key: 'cooling', label: 'Water cooling', detail: 'Plate heat exchangers', amount: base * 0.07 })
|
|
3305
|
+
}
|
|
3306
|
+
|
|
3307
|
+
if (s.cooling === 'Water' && s.heatRecovery) {
|
|
3308
|
+
lines.push({
|
|
3309
|
+
key: 'heat',
|
|
3310
|
+
label: 'Heat recovery',
|
|
3311
|
+
detail: 'Up to 70 °C hot water',
|
|
3312
|
+
amount: 4200 + 25 * frame.kw,
|
|
3313
|
+
})
|
|
3314
|
+
}
|
|
3315
|
+
|
|
3316
|
+
if (s.receiver !== 'None') {
|
|
3317
|
+
const litres = RECEIVER_LITRES[s.receiver]
|
|
3318
|
+
lines.push({
|
|
3319
|
+
key: 'receiver',
|
|
3320
|
+
label: 'Air receiver',
|
|
3321
|
+
detail: `${litres.toLocaleString('en')} L, 11 bar`,
|
|
3322
|
+
amount: RECEIVER_PRICE[s.receiver],
|
|
3323
|
+
})
|
|
3324
|
+
}
|
|
3325
|
+
|
|
3326
|
+
if (s.enclosure === 'LowNoise') {
|
|
3327
|
+
lines.push({ key: 'canopy', label: 'Low-noise canopy', detail: 'About 66 dB(A)', amount: 2600 + 30 * frame.kw })
|
|
3328
|
+
}
|
|
3329
|
+
|
|
3330
|
+
if (s.supply === 'V480Hz60') {
|
|
3331
|
+
lines.push({ key: 'supply', label: '60 Hz build', detail: '480 V motor and starter', amount: base * 0.04 })
|
|
3332
|
+
}
|
|
3333
|
+
|
|
3334
|
+
if (s.servicePlan !== 'None') {
|
|
3335
|
+
const share = s.servicePlan === 'Essential' ? 0.09 : 0.22
|
|
3336
|
+
lines.push({ key: 'service', label: 'Service plan', detail: PLAN_LABEL[s.servicePlan], amount: base * share })
|
|
3337
|
+
}
|
|
3338
|
+
|
|
3339
|
+
if (s.commissioning) {
|
|
3340
|
+
lines.push({
|
|
3341
|
+
key: 'commissioning',
|
|
3342
|
+
label: 'Commissioning on site',
|
|
3343
|
+
detail: 'One engineer, one day',
|
|
3344
|
+
amount: 1800,
|
|
3345
|
+
})
|
|
3346
|
+
}
|
|
3347
|
+
|
|
3348
|
+
return lines.map(line => ({ ...line, amount: Math.round(line.amount) }))
|
|
3349
|
+
},
|
|
3350
|
+
$subtotal: s => {
|
|
3351
|
+
return s.$quoteLines.reduce((sum, line) => sum + line.amount, 0)
|
|
3352
|
+
},
|
|
3353
|
+
$leadTimeSurcharge: s => {
|
|
3354
|
+
return s.delivery === 'Express' ? Math.round(s.$subtotal * EXPRESS_SURCHARGE) : 0
|
|
3355
|
+
},
|
|
3356
|
+
$total: s => {
|
|
3357
|
+
return s.$subtotal + s.$leadTimeSurcharge
|
|
3358
|
+
},
|
|
3359
|
+
$specSheet: s => {
|
|
3360
|
+
const frame = frameFor(s)
|
|
3361
|
+
|
|
3362
|
+
return [
|
|
3363
|
+
{ label: 'Model', value: `RSV-${frame.kw}, ${frame.kw} kW` },
|
|
3364
|
+
{ label: 'Free air delivery', value: `${s.flow.toFixed(1)} m³/min required` },
|
|
3365
|
+
{ label: 'Working pressure', value: PRESSURE[s.pressure].label },
|
|
3366
|
+
{ label: 'Drive', value: s.drive === 'VariableSpeed' ? 'Variable speed' : 'Fixed speed' },
|
|
3367
|
+
{ label: 'Duty', value: s.dutyCycle === 'Continuous' ? 'Continuous' : 'Intermittent' },
|
|
3368
|
+
{
|
|
3369
|
+
label: 'Dryer',
|
|
3370
|
+
value: s.dryer === 'Desiccant' ? `Desiccant, ${DEW_POINT_LABEL[s.dewPoint]}` : DRYER_LABEL[s.dryer],
|
|
3371
|
+
},
|
|
3372
|
+
{ label: 'Filtration', value: FILTRATION_LABEL[s.filtration] },
|
|
3373
|
+
{
|
|
3374
|
+
label: 'Cooling',
|
|
3375
|
+
value: s.cooling === 'Water' ? `Water${s.heatRecovery ? ', with heat recovery' : ''}` : 'Air',
|
|
3376
|
+
},
|
|
3377
|
+
{
|
|
3378
|
+
label: 'Receiver',
|
|
3379
|
+
value: s.receiver === 'None' ? 'None' : `${RECEIVER_LITRES[s.receiver].toLocaleString('en')} L`,
|
|
3380
|
+
},
|
|
3381
|
+
{ label: 'Canopy', value: s.enclosure === 'LowNoise' ? 'Low-noise' : 'Standard' },
|
|
3382
|
+
{ label: 'Supply', value: s.supply === 'V480Hz60' ? '480 V, 60 Hz' : '400 V, 50 Hz' },
|
|
3383
|
+
{ label: 'Service', value: PLAN_LABEL[s.servicePlan] },
|
|
3384
|
+
{ label: 'Commissioning', value: s.commissioning ? 'On site' : 'Not included' },
|
|
3385
|
+
{ label: 'Delivery', value: `${s.delivery === 'Express' ? 'Express' : 'Standard'}, ${s.$leadTimeWeeks} weeks` },
|
|
3386
|
+
]
|
|
3387
|
+
},
|
|
3388
|
+
},
|
|
3389
|
+
})
|
|
3390
|
+
```
|
|
3391
|
+
|
|
3392
|
+
### ./src/handlers/request-quote.ts
|
|
3393
|
+
|
|
3394
|
+
```ts
|
|
3395
|
+
import { useCallback } from 'react'
|
|
3396
|
+
|
|
3397
|
+
import { setQuoteReceipt } from '../_shared/quote-receipt.js'
|
|
3398
|
+
|
|
3399
|
+
const VALID_DAYS = 30
|
|
3400
|
+
|
|
3401
|
+
// Stands in for Ardent's quote service. A deployed project sends the configuration to its finalize webhook here and
|
|
3402
|
+
// waits for the answer; this one answers after a moment with a fixed engineer and a reference made from the
|
|
3403
|
+
// configuration's id, then enters the `requested` navigation state.
|
|
3404
|
+
export default phx.frontend.createPhoenixHandler('requestQuote', () => {
|
|
3405
|
+
const navigate = phx.frontend.useNavigate()
|
|
3406
|
+
const configurationId = phx.frontend.useConfigurationId()
|
|
3407
|
+
const total = phx.frontend.useRootEntityPrice()
|
|
3408
|
+
|
|
3409
|
+
return {
|
|
3410
|
+
handler: useCallback(async () => {
|
|
3411
|
+
await new Promise(resolve => setTimeout(resolve, 1600))
|
|
3412
|
+
|
|
3413
|
+
const validUntil = new Date(Date.now() + VALID_DAYS * 24 * 60 * 60 * 1000)
|
|
3414
|
+
|
|
3415
|
+
setQuoteReceipt({
|
|
3416
|
+
reference: `AQ-${String(configurationId)
|
|
3417
|
+
.replace(/[^a-z0-9]/gi, '')
|
|
3418
|
+
.slice(-6)
|
|
3419
|
+
.toUpperCase()}`,
|
|
3420
|
+
engineer: 'Marta Kovács, application engineer',
|
|
3421
|
+
validUntil: validUntil.toLocaleDateString('en-GB', { day: 'numeric', month: 'long', year: 'numeric' }),
|
|
3422
|
+
total: total ?? '',
|
|
3423
|
+
})
|
|
3424
|
+
navigate('requested')
|
|
3425
|
+
}, [configurationId, navigate, total]),
|
|
3426
|
+
}
|
|
3427
|
+
})
|
|
3428
|
+
```
|
|
3429
|
+
|
|
3430
|
+
### ./src/invariants/compressor.ts
|
|
3431
|
+
|
|
3432
|
+
```ts
|
|
3433
|
+
const PRESSURE_LABEL = { Bar7: '7.5 bar', Bar10: '10 bar', Bar13: '13 bar' }
|
|
3434
|
+
const RECEIVER_LITRES = { None: 0, Litres500: 500, Litres1000: 1000, Litres2000: 2000 }
|
|
3435
|
+
const EMAIL = /^[^\s@]+@[^\s@]+\.[^\s@]{2,}$/
|
|
3436
|
+
|
|
3437
|
+
// Each rule is a `warning` in the spec: a change that breaks it is kept, so the customer can fix the conflict where it
|
|
3438
|
+
// is shown, and finalizing waits until no warning is left
|
|
3439
|
+
export default phx.domain.implementCustomInvariants({
|
|
3440
|
+
Compressor: {
|
|
3441
|
+
// The largest frame delivers less air at a higher pressure, so the limit depends on an earlier choice
|
|
3442
|
+
flowRange: s => {
|
|
3443
|
+
if (s.flow <= s.$maxFlow) {
|
|
3444
|
+
return []
|
|
3445
|
+
}
|
|
3446
|
+
|
|
3447
|
+
return [
|
|
3448
|
+
{
|
|
3449
|
+
type: 'flowAboveRange',
|
|
3450
|
+
severity: 'warning',
|
|
3451
|
+
message: `At ${PRESSURE_LABEL[s.pressure]} the largest frame delivers ${s.$maxFlow.toFixed(1)} m³/min. Lower the flow or the pressure.`,
|
|
3452
|
+
},
|
|
3453
|
+
]
|
|
3454
|
+
},
|
|
3455
|
+
desiccantNeedsFiltration: s => {
|
|
3456
|
+
return s.dryer !== 'Desiccant' || s.filtration !== 'General'
|
|
3457
|
+
},
|
|
3458
|
+
// The message names the size the flow needs, so it is built here rather than in the spec
|
|
3459
|
+
receiverSize: s => {
|
|
3460
|
+
if (RECEIVER_LITRES[s.receiver] >= s.$minReceiverLitres) {
|
|
3461
|
+
return []
|
|
3462
|
+
}
|
|
3463
|
+
|
|
3464
|
+
return [
|
|
3465
|
+
{
|
|
3466
|
+
type: 'receiverTooSmall',
|
|
3467
|
+
severity: 'warning',
|
|
3468
|
+
message: `A fixed-speed compressor at ${s.flow.toFixed(1)} m³/min needs a receiver of at least ${s.$minReceiverLitres.toLocaleString('en')} L.`,
|
|
3469
|
+
},
|
|
3470
|
+
]
|
|
3471
|
+
},
|
|
3472
|
+
expressUnavailable: s => {
|
|
3473
|
+
return s.delivery !== 'Express' || s.$frameKw <= 110
|
|
3474
|
+
},
|
|
3475
|
+
companyMissing: s => {
|
|
3476
|
+
return s.company.trim().length > 0
|
|
3477
|
+
},
|
|
3478
|
+
emailInvalid: s => {
|
|
3479
|
+
return EMAIL.test(s.email.trim())
|
|
3480
|
+
},
|
|
3481
|
+
},
|
|
3482
|
+
})
|
|
3483
|
+
```
|
|
3484
|
+
|
|
3485
|
+
</details>
|