@qoretechnologies/reqraft 0.10.75 → 0.10.76-pr.145.g01deca4
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/dist/components/Description/AllowedValuesHelp.d.ts +4 -4
- package/dist/components/Description/AllowedValuesHelp.d.ts.map +1 -1
- package/dist/components/Description/AllowedValuesHelp.js +10 -7
- package/dist/components/Description/AllowedValuesHelp.js.map +1 -1
- package/dist/components/Description/index.d.ts.map +1 -1
- package/dist/components/Description/index.js +22 -4
- package/dist/components/Description/index.js.map +1 -1
- package/dist/components/FocusedEditing/index.d.ts.map +1 -1
- package/dist/components/FocusedEditing/index.js +3 -1
- package/dist/components/FocusedEditing/index.js.map +1 -1
- package/dist/components/codeSize/index.d.ts +6 -0
- package/dist/components/codeSize/index.d.ts.map +1 -1
- package/dist/components/codeSize/index.js +12 -2
- package/dist/components/codeSize/index.js.map +1 -1
- package/dist/components/colorValue/colorValue.d.ts.map +1 -1
- package/dist/components/colorValue/colorValue.js +27 -36
- package/dist/components/colorValue/colorValue.js.map +1 -1
- package/dist/components/composer/Composer.d.ts +7 -2
- package/dist/components/composer/Composer.d.ts.map +1 -1
- package/dist/components/composer/Composer.js +18 -13
- package/dist/components/composer/Composer.js.map +1 -1
- package/dist/components/composer/labels.d.ts +22 -0
- package/dist/components/composer/labels.d.ts.map +1 -0
- package/dist/components/composer/labels.js +15 -0
- package/dist/components/composer/labels.js.map +1 -0
- package/dist/components/dpqlEditor/dpqlTags.js +1 -1
- package/dist/components/dpqlEditor/dpqlTags.js.map +1 -1
- package/dist/components/form/engine/CompactRow.d.ts.map +1 -1
- package/dist/components/form/engine/CompactRow.js +168 -32
- package/dist/components/form/engine/CompactRow.js.map +1 -1
- package/dist/components/form/engine/CompactToolbar.d.ts.map +1 -1
- package/dist/components/form/engine/CompactToolbar.js +73 -21
- package/dist/components/form/engine/CompactToolbar.js.map +1 -1
- package/dist/components/form/engine/FormEngine.d.ts +66 -2
- package/dist/components/form/engine/FormEngine.d.ts.map +1 -1
- package/dist/components/form/engine/FormEngine.js +476 -182
- package/dist/components/form/engine/FormEngine.js.map +1 -1
- package/dist/components/form/engine/ItemAttention.d.ts +12 -0
- package/dist/components/form/engine/ItemAttention.d.ts.map +1 -0
- package/dist/components/form/engine/ItemAttention.js +33 -0
- package/dist/components/form/engine/ItemAttention.js.map +1 -0
- package/dist/components/form/engine/OptionFieldMessages.d.ts +35 -2
- package/dist/components/form/engine/OptionFieldMessages.d.ts.map +1 -1
- package/dist/components/form/engine/OptionFieldMessages.js +42 -6
- package/dist/components/form/engine/OptionFieldMessages.js.map +1 -1
- package/dist/components/form/engine/_structuredData/SchemaDataView.d.ts.map +1 -1
- package/dist/components/form/engine/_structuredData/SchemaDataView.js +27 -1
- package/dist/components/form/engine/_structuredData/SchemaDataView.js.map +1 -1
- package/dist/components/form/engine/compactRowContext.d.ts +5 -0
- package/dist/components/form/engine/compactRowContext.d.ts.map +1 -1
- package/dist/components/form/engine/compactRowContext.js.map +1 -1
- package/dist/components/form/engine/compactRowStyles.d.ts +12 -0
- package/dist/components/form/engine/compactRowStyles.d.ts.map +1 -1
- package/dist/components/form/engine/compactRowStyles.js +81 -45
- package/dist/components/form/engine/compactRowStyles.js.map +1 -1
- package/dist/components/form/engine/compactToolbarContext.d.ts +9 -0
- package/dist/components/form/engine/compactToolbarContext.d.ts.map +1 -1
- package/dist/components/form/engine/compactToolbarContext.js.map +1 -1
- package/dist/components/form/engine/formAppearance.d.ts +96 -0
- package/dist/components/form/engine/formAppearance.d.ts.map +1 -0
- package/dist/components/form/engine/formAppearance.js +156 -0
- package/dist/components/form/engine/formAppearance.js.map +1 -0
- package/dist/components/form/engine/readFirst.d.ts +38 -2
- package/dist/components/form/engine/readFirst.d.ts.map +1 -1
- package/dist/components/form/engine/readFirst.js +31 -6
- package/dist/components/form/engine/readFirst.js.map +1 -1
- package/dist/components/form/engine/revealRow.d.ts +13 -0
- package/dist/components/form/engine/revealRow.d.ts.map +1 -1
- package/dist/components/form/engine/revealRow.js +24 -1
- package/dist/components/form/engine/revealRow.js.map +1 -1
- package/dist/components/form/engine/rowFocus.d.ts +9 -1
- package/dist/components/form/engine/rowFocus.d.ts.map +1 -1
- package/dist/components/form/engine/rowFocus.js +17 -4
- package/dist/components/form/engine/rowFocus.js.map +1 -1
- package/dist/components/form/engine/rowLabelled.d.ts +9 -0
- package/dist/components/form/engine/rowLabelled.d.ts.map +1 -0
- package/dist/components/form/engine/rowLabelled.js +12 -0
- package/dist/components/form/engine/rowLabelled.js.map +1 -0
- package/dist/components/form/expressions/DpqlRendering.d.ts.map +1 -1
- package/dist/components/form/expressions/DpqlRendering.js +3 -1
- package/dist/components/form/expressions/DpqlRendering.js.map +1 -1
- package/dist/components/form/expressions/ExpressionField.d.ts +6 -8
- package/dist/components/form/expressions/ExpressionField.d.ts.map +1 -1
- package/dist/components/form/expressions/ExpressionField.js +13 -11
- package/dist/components/form/expressions/ExpressionField.js.map +1 -1
- package/dist/components/form/expressions/builder/argumentDetail.d.ts.map +1 -1
- package/dist/components/form/expressions/builder/argumentDetail.js +4 -1
- package/dist/components/form/expressions/builder/argumentDetail.js.map +1 -1
- package/dist/components/form/expressions/builder/argumentLabel.d.ts +3 -1
- package/dist/components/form/expressions/builder/argumentLabel.d.ts.map +1 -1
- package/dist/components/form/expressions/builder/argumentLabel.js +66 -26
- package/dist/components/form/expressions/builder/argumentLabel.js.map +1 -1
- package/dist/components/form/expressions/builder/argumentSlot.d.ts.map +1 -1
- package/dist/components/form/expressions/builder/argumentSlot.js +3 -2
- package/dist/components/form/expressions/builder/argumentSlot.js.map +1 -1
- package/dist/components/form/expressions/builder/argumentWrapper.d.ts.map +1 -1
- package/dist/components/form/expressions/builder/argumentWrapper.js +10 -6
- package/dist/components/form/expressions/builder/argumentWrapper.js.map +1 -1
- package/dist/components/form/expressions/builder/confirmMismatchedTypesModal.d.ts.map +1 -1
- package/dist/components/form/expressions/builder/confirmMismatchedTypesModal.js +13 -8
- package/dist/components/form/expressions/builder/confirmMismatchedTypesModal.js.map +1 -1
- package/dist/components/form/expressions/builder/confirmUnsupportedTypeModal.d.ts.map +1 -1
- package/dist/components/form/expressions/builder/confirmUnsupportedTypeModal.js +4 -2
- package/dist/components/form/expressions/builder/confirmUnsupportedTypeModal.js.map +1 -1
- package/dist/components/form/expressions/builder/index.d.ts +6 -1
- package/dist/components/form/expressions/builder/index.d.ts.map +1 -1
- package/dist/components/form/expressions/builder/index.js +110 -64
- package/dist/components/form/expressions/builder/index.js.map +1 -1
- package/dist/components/form/expressions/builder/item.d.ts.map +1 -1
- package/dist/components/form/expressions/builder/item.js +4 -2
- package/dist/components/form/expressions/builder/item.js.map +1 -1
- package/dist/components/form/expressions/builder/moveToPositionStrip.d.ts +1 -1
- package/dist/components/form/expressions/builder/moveToPositionStrip.d.ts.map +1 -1
- package/dist/components/form/expressions/builder/moveToPositionStrip.js +8 -7
- package/dist/components/form/expressions/builder/moveToPositionStrip.js.map +1 -1
- package/dist/components/form/expressions/builder/renderTemplate.d.ts.map +1 -1
- package/dist/components/form/expressions/builder/renderTemplate.js +3 -1
- package/dist/components/form/expressions/builder/renderTemplate.js.map +1 -1
- package/dist/components/form/expressions/expressionOperands.js +1 -1
- package/dist/components/form/expressions/labels.d.ts +143 -0
- package/dist/components/form/expressions/labels.d.ts.map +1 -0
- package/dist/components/form/expressions/labels.js +123 -0
- package/dist/components/form/expressions/labels.js.map +1 -0
- package/dist/components/form/expressions/mockExpressions.d.ts.map +1 -1
- package/dist/components/form/expressions/mockExpressions.js +18 -0
- package/dist/components/form/expressions/mockExpressions.js.map +1 -1
- package/dist/components/form/expressions/renderExpressionToText.d.ts.map +1 -1
- package/dist/components/form/expressions/renderExpressionToText.js +15 -0
- package/dist/components/form/expressions/renderExpressionToText.js.map +1 -1
- package/dist/components/form/expressions/types.d.ts +1 -1
- package/dist/components/form/fields/ChoiceGroupHeading.d.ts +22 -0
- package/dist/components/form/fields/ChoiceGroupHeading.d.ts.map +1 -0
- package/dist/components/form/fields/ChoiceGroupHeading.js +40 -0
- package/dist/components/form/fields/ChoiceGroupHeading.js.map +1 -0
- package/dist/components/form/fields/Field.d.ts.map +1 -1
- package/dist/components/form/fields/Field.js +9 -5
- package/dist/components/form/fields/Field.js.map +1 -1
- package/dist/components/form/fields/allowed-values/AllowedValues.d.ts +7 -0
- package/dist/components/form/fields/allowed-values/AllowedValues.d.ts.map +1 -1
- package/dist/components/form/fields/allowed-values/AllowedValues.js +34 -10
- package/dist/components/form/fields/allowed-values/AllowedValues.js.map +1 -1
- package/dist/components/form/fields/allowed-values/savedValues.d.ts +30 -0
- package/dist/components/form/fields/allowed-values/savedValues.d.ts.map +1 -0
- package/dist/components/form/fields/allowed-values/savedValues.js +39 -0
- package/dist/components/form/fields/allowed-values/savedValues.js.map +1 -0
- package/dist/components/form/fields/array/ArrayAuto.d.ts.map +1 -1
- package/dist/components/form/fields/array/ArrayAuto.js +31 -14
- package/dist/components/form/fields/array/ArrayAuto.js.map +1 -1
- package/dist/components/form/fields/array/ArrayAutoField.d.ts.map +1 -1
- package/dist/components/form/fields/array/ArrayAutoField.js +21 -19
- package/dist/components/form/fields/array/ArrayAutoField.js.map +1 -1
- package/dist/components/form/fields/auto/AutoFormField.d.ts +5 -1
- package/dist/components/form/fields/auto/AutoFormField.d.ts.map +1 -1
- package/dist/components/form/fields/auto/AutoFormField.js +37 -14
- package/dist/components/form/fields/auto/AutoFormField.js.map +1 -1
- package/dist/components/form/fields/binary/Binary.d.ts.map +1 -1
- package/dist/components/form/fields/binary/Binary.js +3 -1
- package/dist/components/form/fields/binary/Binary.js.map +1 -1
- package/dist/components/form/fields/boolean/Boolean.d.ts +7 -1
- package/dist/components/form/fields/boolean/Boolean.d.ts.map +1 -1
- package/dist/components/form/fields/boolean/Boolean.js +8 -2
- package/dist/components/form/fields/boolean/Boolean.js.map +1 -1
- package/dist/components/form/fields/file/File.d.ts +1 -1
- package/dist/components/form/fields/file/File.d.ts.map +1 -1
- package/dist/components/form/fields/file/File.js +18 -6
- package/dist/components/form/fields/file/File.js.map +1 -1
- package/dist/components/form/fields/labels.d.ts +72 -0
- package/dist/components/form/fields/labels.d.ts.map +1 -0
- package/dist/components/form/fields/labels.js +47 -0
- package/dist/components/form/fields/labels.js.map +1 -0
- package/dist/components/form/fields/long-string/LongString.d.ts +7 -1
- package/dist/components/form/fields/long-string/LongString.d.ts.map +1 -1
- package/dist/components/form/fields/long-string/LongString.js +15 -5
- package/dist/components/form/fields/long-string/LongString.js.map +1 -1
- package/dist/components/form/fields/markdown/Markdown.d.ts.map +1 -1
- package/dist/components/form/fields/markdown/Markdown.js +3 -1
- package/dist/components/form/fields/markdown/Markdown.js.map +1 -1
- package/dist/components/form/fields/number/Number.d.ts +4 -1
- package/dist/components/form/fields/number/Number.d.ts.map +1 -1
- package/dist/components/form/fields/number/Number.js +21 -7
- package/dist/components/form/fields/number/Number.js.map +1 -1
- package/dist/components/form/fields/object/Object.d.ts.map +1 -1
- package/dist/components/form/fields/object/Object.js +8 -5
- package/dist/components/form/fields/object/Object.js.map +1 -1
- package/dist/components/form/fields/radio-group/RadioGroup.d.ts.map +1 -1
- package/dist/components/form/fields/radio-group/RadioGroup.js +13 -7
- package/dist/components/form/fields/radio-group/RadioGroup.js.map +1 -1
- package/dist/components/form/fields/rich-text/RichText.d.ts.map +1 -1
- package/dist/components/form/fields/rich-text/RichText.js +6 -3
- package/dist/components/form/fields/rich-text/RichText.js.map +1 -1
- package/dist/components/form/fields/rich-text/useTemplateTags.d.ts +2 -0
- package/dist/components/form/fields/rich-text/useTemplateTags.d.ts.map +1 -1
- package/dist/components/form/fields/rich-text/useTemplateTags.js +7 -1
- package/dist/components/form/fields/rich-text/useTemplateTags.js.map +1 -1
- package/dist/components/form/fields/schema-definition/CatalogLeafForm.d.ts.map +1 -1
- package/dist/components/form/fields/schema-definition/CatalogLeafForm.js +10 -8
- package/dist/components/form/fields/schema-definition/CatalogLeafForm.js.map +1 -1
- package/dist/components/form/fields/schema-definition/CatalogNodeEditor.d.ts +1 -1
- package/dist/components/form/fields/schema-definition/CatalogNodeEditor.d.ts.map +1 -1
- package/dist/components/form/fields/schema-definition/CatalogNodeEditor.js +39 -27
- package/dist/components/form/fields/schema-definition/CatalogNodeEditor.js.map +1 -1
- package/dist/components/form/fields/schema-definition/Hint.d.ts +4 -3
- package/dist/components/form/fields/schema-definition/Hint.d.ts.map +1 -1
- package/dist/components/form/fields/schema-definition/Hint.js +10 -2
- package/dist/components/form/fields/schema-definition/Hint.js.map +1 -1
- package/dist/components/form/fields/schema-definition/InlineValidationBanner.d.ts.map +1 -1
- package/dist/components/form/fields/schema-definition/InlineValidationBanner.js +3 -1
- package/dist/components/form/fields/schema-definition/InlineValidationBanner.js.map +1 -1
- package/dist/components/form/fields/schema-definition/Loader.d.ts.map +1 -1
- package/dist/components/form/fields/schema-definition/Loader.js +4 -2
- package/dist/components/form/fields/schema-definition/Loader.js.map +1 -1
- package/dist/components/form/fields/schema-definition/MigrationsTab.d.ts.map +1 -1
- package/dist/components/form/fields/schema-definition/MigrationsTab.js +31 -26
- package/dist/components/form/fields/schema-definition/MigrationsTab.js.map +1 -1
- package/dist/components/form/fields/schema-definition/TableEditor.d.ts.map +1 -1
- package/dist/components/form/fields/schema-definition/TableEditor.js +3 -1
- package/dist/components/form/fields/schema-definition/TableEditor.js.map +1 -1
- package/dist/components/form/fields/schema-definition/TablesTab.d.ts.map +1 -1
- package/dist/components/form/fields/schema-definition/TablesTab.js +25 -23
- package/dist/components/form/fields/schema-definition/TablesTab.js.map +1 -1
- package/dist/components/form/fields/schema-definition/index.d.ts.map +1 -1
- package/dist/components/form/fields/schema-definition/index.js +20 -14
- package/dist/components/form/fields/schema-definition/index.js.map +1 -1
- package/dist/components/form/fields/schema-definition/labels.d.ts +123 -0
- package/dist/components/form/fields/schema-definition/labels.d.ts.map +1 -0
- package/dist/components/form/fields/schema-definition/labels.js +113 -0
- package/dist/components/form/fields/schema-definition/labels.js.map +1 -0
- package/dist/components/form/fields/select/Select.d.ts +1 -1
- package/dist/components/form/fields/select/Select.d.ts.map +1 -1
- package/dist/components/form/fields/select/Select.js +13 -6
- package/dist/components/form/fields/select/Select.js.map +1 -1
- package/dist/components/form/fields/select/SelectCollection.d.ts +2 -2
- package/dist/components/form/fields/select/SelectCollection.d.ts.map +1 -1
- package/dist/components/form/fields/select/SelectCollection.js +11 -3
- package/dist/components/form/fields/select/SelectCollection.js.map +1 -1
- package/dist/components/form/fields/template/TemplateBrowser.d.ts.map +1 -1
- package/dist/components/form/fields/template/TemplateBrowser.js +3 -1
- package/dist/components/form/fields/template/TemplateBrowser.js.map +1 -1
- package/dist/components/form/fields/template/TemplateField.d.ts +2 -2
- package/dist/components/form/fields/template/TemplateField.d.ts.map +1 -1
- package/dist/components/form/fields/template/TemplateField.js +63 -57
- package/dist/components/form/fields/template/TemplateField.js.map +1 -1
- package/dist/components/form/fields/template/TemplatePicker.d.ts +7 -1
- package/dist/components/form/fields/template/TemplatePicker.d.ts.map +1 -1
- package/dist/components/form/fields/template/TemplatePicker.js +22 -12
- package/dist/components/form/fields/template/TemplatePicker.js.map +1 -1
- package/dist/components/form/fields/template/templatesListProps.d.ts +11 -0
- package/dist/components/form/fields/template/templatesListProps.d.ts.map +1 -0
- package/dist/components/form/fields/template/templatesListProps.js +37 -0
- package/dist/components/form/fields/template/templatesListProps.js.map +1 -0
- package/dist/components/form/index.d.ts +2 -0
- package/dist/components/form/index.d.ts.map +1 -1
- package/dist/components/form/index.js +2 -0
- package/dist/components/form/index.js.map +1 -1
- package/dist/components/imageLightbox/ImageLightbox.d.ts.map +1 -1
- package/dist/components/imageLightbox/ImageLightbox.js +10 -6
- package/dist/components/imageLightbox/ImageLightbox.js.map +1 -1
- package/dist/components/log/Log.d.ts +1 -1
- package/dist/components/log/Log.d.ts.map +1 -1
- package/dist/components/log/Log.js +21 -18
- package/dist/components/log/Log.js.map +1 -1
- package/dist/components/log/labels.d.ts +25 -0
- package/dist/components/log/labels.d.ts.map +1 -0
- package/dist/components/log/labels.js +22 -0
- package/dist/components/log/labels.js.map +1 -0
- package/dist/components/menu/Menu.d.ts.map +1 -1
- package/dist/components/menu/Menu.js +3 -1
- package/dist/components/menu/Menu.js.map +1 -1
- package/dist/components/qonsoleSmartInput/useQonsoleSession.d.ts.map +1 -1
- package/dist/components/qonsoleSmartInput/useQonsoleSession.js +3 -2
- package/dist/components/qonsoleSmartInput/useQonsoleSession.js.map +1 -1
- package/dist/components/smartEditor/CompletionMenu.d.ts.map +1 -1
- package/dist/components/smartEditor/CompletionMenu.js +6 -2
- package/dist/components/smartEditor/CompletionMenu.js.map +1 -1
- package/dist/components/smartEditor/SmartEditor.d.ts.map +1 -1
- package/dist/components/smartEditor/SmartEditor.js +3 -1
- package/dist/components/smartEditor/SmartEditor.js.map +1 -1
- package/dist/components/smartEditor/completionStyle.d.ts +9 -1
- package/dist/components/smartEditor/completionStyle.d.ts.map +1 -1
- package/dist/components/smartEditor/completionStyle.js +19 -2
- package/dist/components/smartEditor/completionStyle.js.map +1 -1
- package/dist/components/smartEditor/templateCompletions.js +1 -1
- package/dist/components/smartEditor/templateCompletions.js.map +1 -1
- package/dist/components/smartEditor/useLspAutocomplete.d.ts +5 -0
- package/dist/components/smartEditor/useLspAutocomplete.d.ts.map +1 -1
- package/dist/components/smartEditor/useLspAutocomplete.js +76 -20
- package/dist/components/smartEditor/useLspAutocomplete.js.map +1 -1
- package/dist/components/supportTicket/AttachmentChips.d.ts.map +1 -1
- package/dist/components/supportTicket/AttachmentChips.js +4 -2
- package/dist/components/supportTicket/AttachmentChips.js.map +1 -1
- package/dist/components/supportTicket/InterfaceReferenceTags.d.ts +3 -2
- package/dist/components/supportTicket/InterfaceReferenceTags.d.ts.map +1 -1
- package/dist/components/supportTicket/InterfaceReferenceTags.js +6 -6
- package/dist/components/supportTicket/InterfaceReferenceTags.js.map +1 -1
- package/dist/components/supportTicket/ReferencePicker.d.ts +3 -2
- package/dist/components/supportTicket/ReferencePicker.d.ts.map +1 -1
- package/dist/components/supportTicket/ReferencePicker.js +35 -25
- package/dist/components/supportTicket/ReferencePicker.js.map +1 -1
- package/dist/components/supportTicket/TicketHeader.d.ts.map +1 -1
- package/dist/components/supportTicket/TicketHeader.js +4 -1
- package/dist/components/supportTicket/TicketHeader.js.map +1 -1
- package/dist/components/supportTicket/TicketMetaTags.d.ts +19 -12
- package/dist/components/supportTicket/TicketMetaTags.d.ts.map +1 -1
- package/dist/components/supportTicket/TicketMetaTags.js +57 -6
- package/dist/components/supportTicket/TicketMetaTags.js.map +1 -1
- package/dist/components/supportTicket/TicketReplyBox.d.ts +3 -2
- package/dist/components/supportTicket/TicketReplyBox.d.ts.map +1 -1
- package/dist/components/supportTicket/TicketReplyBox.js +39 -18
- package/dist/components/supportTicket/TicketReplyBox.js.map +1 -1
- package/dist/components/supportTicket/WorkspaceAccessStatus.d.ts +10 -2
- package/dist/components/supportTicket/WorkspaceAccessStatus.d.ts.map +1 -1
- package/dist/components/supportTicket/WorkspaceAccessStatus.js +45 -17
- package/dist/components/supportTicket/WorkspaceAccessStatus.js.map +1 -1
- package/dist/components/supportTicket/accessMeta.d.ts +6 -1
- package/dist/components/supportTicket/accessMeta.d.ts.map +1 -1
- package/dist/components/supportTicket/accessMeta.js +83 -65
- package/dist/components/supportTicket/accessMeta.js.map +1 -1
- package/dist/components/supportTicket/attachmentAccess.d.ts.map +1 -1
- package/dist/components/supportTicket/attachmentAccess.js +14 -26
- package/dist/components/supportTicket/attachmentAccess.js.map +1 -1
- package/dist/components/supportTicket/fileToAttachment.d.ts.map +1 -1
- package/dist/components/supportTicket/fileToAttachment.js +4 -1
- package/dist/components/supportTicket/fileToAttachment.js.map +1 -1
- package/dist/components/supportTicket/labels.d.ts +155 -0
- package/dist/components/supportTicket/labels.d.ts.map +1 -0
- package/dist/components/supportTicket/labels.js +214 -0
- package/dist/components/supportTicket/labels.js.map +1 -0
- package/dist/components/supportTicket/meta.d.ts +22 -0
- package/dist/components/supportTicket/meta.d.ts.map +1 -1
- package/dist/components/supportTicket/meta.js +91 -72
- package/dist/components/supportTicket/meta.js.map +1 -1
- package/dist/components/supportTicket/ticketAttentionInks.d.ts +23 -0
- package/dist/components/supportTicket/ticketAttentionInks.d.ts.map +1 -0
- package/dist/components/supportTicket/ticketAttentionInks.js +42 -0
- package/dist/components/supportTicket/ticketAttentionInks.js.map +1 -0
- package/dist/components/supportTicket/ticketModel.d.ts +5 -1
- package/dist/components/supportTicket/ticketModel.d.ts.map +1 -1
- package/dist/components/supportTicket/useLoadedImages.d.ts +10 -0
- package/dist/components/supportTicket/useLoadedImages.d.ts.map +1 -1
- package/dist/components/supportTicket/useLoadedImages.js +64 -1
- package/dist/components/supportTicket/useLoadedImages.js.map +1 -1
- package/dist/components/ticketReferences/TicketReferences.d.ts.map +1 -1
- package/dist/components/ticketReferences/TicketReferences.js +56 -45
- package/dist/components/ticketReferences/TicketReferences.js.map +1 -1
- package/dist/components/ticketThread/TicketThread.d.ts +22 -2
- package/dist/components/ticketThread/TicketThread.d.ts.map +1 -1
- package/dist/components/ticketThread/TicketThread.js +57 -36
- package/dist/components/ticketThread/TicketThread.js.map +1 -1
- package/dist/components/ticketThread/index.d.ts +1 -1
- package/dist/components/ticketThread/index.d.ts.map +1 -1
- package/dist/components/ticketThread/index.js +2 -1
- package/dist/components/ticketThread/index.js.map +1 -1
- package/dist/helpers/allowedValues.d.ts.map +1 -1
- package/dist/helpers/allowedValues.js +11 -4
- package/dist/helpers/allowedValues.js.map +1 -1
- package/dist/helpers/expressions.d.ts.map +1 -1
- package/dist/helpers/expressions.js +7 -12
- package/dist/helpers/expressions.js.map +1 -1
- package/dist/helpers/fieldDescription.d.ts +16 -0
- package/dist/helpers/fieldDescription.d.ts.map +1 -0
- package/dist/helpers/fieldDescription.js +40 -0
- package/dist/helpers/fieldDescription.js.map +1 -0
- package/dist/helpers/markdownText.d.ts +9 -0
- package/dist/helpers/markdownText.d.ts.map +1 -1
- package/dist/helpers/markdownText.js +49 -2
- package/dist/helpers/markdownText.js.map +1 -1
- package/dist/helpers/noDescription.d.ts +4 -4
- package/dist/helpers/noDescription.d.ts.map +1 -1
- package/dist/helpers/noDescription.js +8 -6
- package/dist/helpers/noDescription.js.map +1 -1
- package/dist/helpers/optionUiTypes.d.ts +3 -3
- package/dist/helpers/options.d.ts +2 -2
- package/dist/helpers/options.d.ts.map +1 -1
- package/dist/helpers/options.js +11 -8
- package/dist/helpers/options.js.map +1 -1
- package/dist/helpers/qorusTypeCatalogue.d.ts +1 -1
- package/dist/helpers/qorusTypeCatalogue.js +1 -1
- package/dist/helpers/reqraftLabels.d.ts +83 -0
- package/dist/helpers/reqraftLabels.d.ts.map +1 -1
- package/dist/helpers/reqraftLabels.js +56 -11
- package/dist/helpers/reqraftLabels.js.map +1 -1
- package/dist/helpers/sentenceCase.d.ts +9 -0
- package/dist/helpers/sentenceCase.d.ts.map +1 -0
- package/dist/helpers/sentenceCase.js +22 -0
- package/dist/helpers/sentenceCase.js.map +1 -0
- package/dist/helpers/singleLineString.d.ts.map +1 -1
- package/dist/helpers/singleLineString.js +1 -0
- package/dist/helpers/singleLineString.js.map +1 -1
- package/dist/helpers/templateItems.d.ts +1 -1
- package/dist/helpers/templateItems.js +1 -1
- package/dist/helpers/templates.js +1 -1
- package/dist/helpers/templates.js.map +1 -1
- package/dist/helpers/validationLabels.d.ts +190 -0
- package/dist/helpers/validationLabels.d.ts.map +1 -0
- package/dist/helpers/validationLabels.js +210 -0
- package/dist/helpers/validationLabels.js.map +1 -0
- package/dist/helpers/validations.d.ts +14 -2
- package/dist/helpers/validations.d.ts.map +1 -1
- package/dist/helpers/validations.js +165 -178
- package/dist/helpers/validations.js.map +1 -1
- package/dist/hooks/useDestructiveButtonProps.d.ts +22 -0
- package/dist/hooks/useDestructiveButtonProps.d.ts.map +1 -0
- package/dist/hooks/useDestructiveButtonProps.js +46 -0
- package/dist/hooks/useDestructiveButtonProps.js.map +1 -0
- package/dist/hooks/useWebSocket/useWebSocket.d.ts.map +1 -1
- package/dist/hooks/useWebSocket/useWebSocket.js +6 -5
- package/dist/hooks/useWebSocket/useWebSocket.js.map +1 -1
- package/dist/tracking/ui/ExperimentCard.d.ts +3 -3
- package/dist/tracking/ui/ExperimentCard.d.ts.map +1 -1
- package/dist/tracking/ui/ExperimentCard.js +33 -45
- package/dist/tracking/ui/ExperimentCard.js.map +1 -1
- package/dist/tracking/ui/ExperimentsOverlay.d.ts +3 -3
- package/dist/tracking/ui/ExperimentsOverlay.d.ts.map +1 -1
- package/dist/tracking/ui/ExperimentsOverlay.js +8 -6
- package/dist/tracking/ui/ExperimentsOverlay.js.map +1 -1
- package/dist/tracking/ui/card.d.ts +9 -13
- package/dist/tracking/ui/card.d.ts.map +1 -1
- package/dist/tracking/ui/card.js +96 -107
- package/dist/tracking/ui/card.js.map +1 -1
- package/dist/tracking/ui/client.d.ts +0 -6
- package/dist/tracking/ui/client.d.ts.map +1 -1
- package/dist/tracking/ui/client.js +9 -2
- package/dist/tracking/ui/client.js.map +1 -1
- package/dist/tracking/ui/labels.d.ts +198 -0
- package/dist/tracking/ui/labels.d.ts.map +1 -0
- package/dist/tracking/ui/labels.js +171 -0
- package/dist/tracking/ui/labels.js.map +1 -0
- package/package.json +1 -1
|
@@ -112,6 +112,7 @@ var typeChoices_1 = require("./typeChoices");
|
|
|
112
112
|
var optionActions_1 = require("./optionActions");
|
|
113
113
|
var rendererTypes_1 = require("./rendererTypes");
|
|
114
114
|
var revealRow_1 = require("./revealRow");
|
|
115
|
+
var rowFocus_1 = require("./rowFocus");
|
|
115
116
|
var emittedValues_1 = require("../fields/emittedValues");
|
|
116
117
|
var lodash_1 = require("lodash");
|
|
117
118
|
var map_1 = __importDefault(require("lodash/map"));
|
|
@@ -120,6 +121,7 @@ var size_1 = __importDefault(require("lodash/size"));
|
|
|
120
121
|
var react_2 = __importStar(require("react"));
|
|
121
122
|
var react_use_1 = require("react-use");
|
|
122
123
|
var styled_components_1 = __importStar(require("styled-components"));
|
|
124
|
+
var fieldDescription_1 = require("../../../helpers/fieldDescription");
|
|
123
125
|
var common_1 = require("../../../helpers/common");
|
|
124
126
|
var options_1 = require("../../../helpers/options");
|
|
125
127
|
var validations_1 = require("../../../helpers/validations");
|
|
@@ -143,11 +145,12 @@ var OptionFieldMessages_1 = require("./OptionFieldMessages");
|
|
|
143
145
|
var optionsContext_1 = require("./optionsContext");
|
|
144
146
|
var markdownRendererContext_1 = require("../../Description/markdownRendererContext");
|
|
145
147
|
var OptionsHelpDialog_1 = require("./OptionsHelpDialog");
|
|
148
|
+
var formAppearance_1 = require("./formAppearance");
|
|
146
149
|
var typeSentenceForm_1 = require("../typeSentenceForm");
|
|
147
150
|
var referenceNames_1 = require("../fields/template/referenceNames");
|
|
148
151
|
var qorusTypeCatalogue_1 = require("../../../helpers/qorusTypeCatalogue");
|
|
149
152
|
var allowedValues_1 = require("../../../helpers/allowedValues");
|
|
150
|
-
var
|
|
153
|
+
var rowFocus_2 = require("./rowFocus");
|
|
151
154
|
var optionUiTypes_1 = require("../../../helpers/optionUiTypes");
|
|
152
155
|
var readFirst_1 = require("./readFirst");
|
|
153
156
|
/** One shared "nothing came down from above" bag. See `inheritedScopeFor`. */
|
|
@@ -672,27 +675,30 @@ var FormEngineImpl = function (_a) {
|
|
|
672
675
|
var name = _a.name, uniqueName = _a.uniqueName, value = _a.value, onChange = _a.onChange, onSingleOptionsChange = _a.onSingleOptionsChange, onDependableOptionChange = _a.onDependableOptionChange, placeholder = _a.placeholder, noValueString = _a.noValueString, // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
673
676
|
isValid = _a.isValid, // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
674
677
|
url = _a.url, customUrl = _a.customUrl, operatorsUrl = _a.operatorsUrl, onOptionsLoaded = _a.onOptionsLoaded, recordRequiresSearchOptions = _a.recordRequiresSearchOptions, readOnly = _a.readOnly, onReadOnlyActivate = _a.onReadOnlyActivate, _h = _a.allowTemplates, allowTemplates = _h === void 0 ? true : _h, interfaceContext = _a.interfaceContext, templateFieldProps = _a.templateFieldProps, forceDropdown = _a.forceDropdown, _j = _a.showTypeToggle, showTypeToggle = _j === void 0 ? true : _j, compact = _a.compact,
|
|
678
|
+
// Read through the context `FormEngine` provides (resolved there against an
|
|
679
|
+
// inherited appearance); destructured only to keep it out of `rest`.
|
|
680
|
+
_appearance = _a.appearance, // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
675
681
|
// Destructured only to keep it out of `rest` (and so off the DOM). The gutter
|
|
676
682
|
// this prop documents was never implemented: it was passed to the wrap as
|
|
677
683
|
// `$flush`, whose styled template had no interpolation slot, so it has always
|
|
678
684
|
// been a no-op. Removing it from the API is a separate, breaking change —
|
|
679
685
|
// every consumer passing it today already gets the flush layout by default.
|
|
680
686
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
681
|
-
_k = _a.compactFlush,
|
|
687
|
+
_k = _a.compactFlush, // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
682
688
|
// Destructured only to keep it out of `rest` (and so off the DOM). The gutter
|
|
683
689
|
// this prop documents was never implemented: it was passed to the wrap as
|
|
684
690
|
// `$flush`, whose styled template had no interpolation slot, so it has always
|
|
685
691
|
// been a no-op. Removing it from the API is a separate, breaking change —
|
|
686
692
|
// every consumer passing it today already gets the flush layout by default.
|
|
687
693
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
688
|
-
compactFlush = _k === void 0 ? false : _k, _l = _a.compactNested, compactNested = _l === void 0 ? false : _l, _m = _a.compactScroll, compactScroll = _m === void 0 ? 'host' : _m, compactPanelProps = _a.compactPanelProps, compactCollapsedGroupsProp = _a.compactCollapsedGroups, compactBoxLabels = _a.compactBoxLabels, _o = _a.
|
|
694
|
+
compactFlush = _k === void 0 ? false : _k, _l = _a.compactNested, compactNested = _l === void 0 ? false : _l, _m = _a.compactScroll, compactScroll = _m === void 0 ? 'host' : _m, compactPanelProps = _a.compactPanelProps, compactCollapsedGroupsProp = _a.compactCollapsedGroups, compactBoxLabels = _a.compactBoxLabels, _o = _a.revealRequired, revealRequired = _o === void 0 ? false : _o, focusAttentionRequest = _a.focusAttentionRequest, onAttentionChange = _a.onAttentionChange, outsideAttention = _a.outsideAttention, _p = _a.compactStickyBoxHeaders, compactStickyBoxHeaders = _p === void 0 ? true : _p, _q = _a.compactStickyOffset, compactStickyOffset = _q === void 0 ? 0 : _q, _r = _a.compactToolbar, compactToolbar = _r === void 0 ? true : _r, _s = _a.commitMode, commitMode = _s === void 0 ? 'immediate' : _s, _t = _a.expandMode, expandMode = _t === void 0 ? 'single' : _t, onCommit = _a.onCommit, operatorsProp = _a.operators, groups = _a.groups, optionsLoader = _a.optionsLoader, onValidityChange = _a.onValidityChange, optionActions = _a.optionActions, _u = _a.optionActionsCollapse, optionActionsCollapse = _u === void 0 ? 'auto' : _u, componentOverrides = _a.componentOverrides, codePreviewRenderer = _a.codePreviewRenderer, readSummaries = _a.readSummaries, cardEditorTypes = _a.cardEditorTypes,
|
|
689
695
|
// consumed by the wrapper below, which publishes it to every description this
|
|
690
696
|
// form draws; destructured here only so it cannot reach `rest` and be spread
|
|
691
697
|
// onto a DOM node
|
|
692
698
|
_markdownRenderer = _a.markdownRenderer, // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
693
699
|
rendererOnlyUiTypes = _a.rendererOnlyUiTypes, templateAwareUiTypes = _a.templateAwareUiTypes, anyLikeUiTypes = _a.anyLikeUiTypes, inheritedFromParent = _a.inheritedFromParent, autoFocusFirstRequired = _a.autoFocusFirstRequired, expandFirstRequired = _a.expandFirstRequired, initialExpandedOptions = _a.initialExpandedOptions, expandOptionsRequest = _a.expandOptionsRequest, valueKey = _a.valueKey, maxFieldsShown = _a.maxFieldsShown,
|
|
694
700
|
// The form's own props, read here and never handed on to the collection drawn below (`{...rest}`).
|
|
695
|
-
optionsSchema = _a.options, stringTemplates = _a.stringTemplates, skeletonReason = _a.skeletonReason, rest = __rest(_a, ["name", "uniqueName", "value", "onChange", "onSingleOptionsChange", "onDependableOptionChange", "placeholder", "noValueString", "isValid", "url", "customUrl", "operatorsUrl", "onOptionsLoaded", "recordRequiresSearchOptions", "readOnly", "onReadOnlyActivate", "allowTemplates", "interfaceContext", "templateFieldProps", "forceDropdown", "showTypeToggle", "compact", "compactFlush", "compactNested", "compactScroll", "compactPanelProps", "compactCollapsedGroups", "compactBoxLabels", "compactStickyBoxHeaders", "compactStickyOffset", "compactToolbar", "commitMode", "expandMode", "onCommit", "operators", "groups", "optionsLoader", "onValidityChange", "optionActions", "optionActionsCollapse", "componentOverrides", "codePreviewRenderer", "readSummaries", "cardEditorTypes", "markdownRenderer", "rendererOnlyUiTypes", "templateAwareUiTypes", "anyLikeUiTypes", "inheritedFromParent", "autoFocusFirstRequired", "expandFirstRequired", "initialExpandedOptions", "expandOptionsRequest", "valueKey", "maxFieldsShown", "options", "stringTemplates", "skeletonReason"]);
|
|
701
|
+
optionsSchema = _a.options, stringTemplates = _a.stringTemplates, skeletonReason = _a.skeletonReason, rest = __rest(_a, ["name", "uniqueName", "value", "onChange", "onSingleOptionsChange", "onDependableOptionChange", "placeholder", "noValueString", "isValid", "url", "customUrl", "operatorsUrl", "onOptionsLoaded", "recordRequiresSearchOptions", "readOnly", "onReadOnlyActivate", "allowTemplates", "interfaceContext", "templateFieldProps", "forceDropdown", "showTypeToggle", "compact", "appearance", "compactFlush", "compactNested", "compactScroll", "compactPanelProps", "compactCollapsedGroups", "compactBoxLabels", "revealRequired", "focusAttentionRequest", "onAttentionChange", "outsideAttention", "compactStickyBoxHeaders", "compactStickyOffset", "compactToolbar", "commitMode", "expandMode", "onCommit", "operators", "groups", "optionsLoader", "onValidityChange", "optionActions", "optionActionsCollapse", "componentOverrides", "codePreviewRenderer", "readSummaries", "cardEditorTypes", "markdownRenderer", "rendererOnlyUiTypes", "templateAwareUiTypes", "anyLikeUiTypes", "inheritedFromParent", "autoFocusFirstRequired", "expandFirstRequired", "initialExpandedOptions", "expandOptionsRequest", "valueKey", "maxFieldsShown", "options", "stringTemplates", "skeletonReason"]);
|
|
696
702
|
var feWords = (0, reqraftLabels_1.useReqraftLabels)().formEngine;
|
|
697
703
|
// Built-ins + whatever the consumer declared for its own injected editors.
|
|
698
704
|
var isRendererOnly = (0, react_2.useMemo)(function () { return (0, rendererTypes_1.createRendererOnlyUiTypeCheck)(rendererOnlyUiTypes); }, [JSON.stringify(rendererOnlyUiTypes)]);
|
|
@@ -718,7 +724,7 @@ var FormEngineImpl = function (_a) {
|
|
|
718
724
|
enters the component, so the header, the chips, the messages, the meter and
|
|
719
725
|
the read-first summary cannot disagree about it: every one of them reads
|
|
720
726
|
`options`, and none of them has to know the rule. */
|
|
721
|
-
var
|
|
727
|
+
var _v = (0, react_2.useState)(optionsSchema || undefined), servedOptions = _v[0], setOptions = _v[1];
|
|
722
728
|
var options = (0, react_2.useMemo)(function () { return (0, options_1.resolveDegenerateRequiredGroups)(servedOptions); }, [servedOptions]);
|
|
723
729
|
/* Whether the schema the form holds is the one in force: its host is not waiting behind the skeleton, and a
|
|
724
730
|
schema the host hands down has been taken in (`servedOptions` follows the `options` prop a render later).
|
|
@@ -733,31 +739,47 @@ var FormEngineImpl = function (_a) {
|
|
|
733
739
|
JSON.stringify(optionsSchema || undefined) !== JSON.stringify(servedOptions);
|
|
734
740
|
var schemaInForce = !rest.skeleton && !hostSchemaPending;
|
|
735
741
|
// optionsLoader lifecycle: loading feeds the skeleton gate, error the banner.
|
|
736
|
-
var
|
|
737
|
-
var
|
|
742
|
+
var _w = (0, react_2.useState)(!!optionsLoader && !optionsSchema), optionsLoading = _w[0], setOptionsLoading = _w[1];
|
|
743
|
+
var _x = (0, react_2.useState)(), optionsError = _x[0], setOptionsError = _x[1];
|
|
738
744
|
// Operators: prop-provided (compact) or fetched via operatorsUrl (dpql,
|
|
739
745
|
// ported from IDE Options) — the fetch overrides the seeded prop value.
|
|
740
|
-
var
|
|
746
|
+
var _y = (0, react_2.useState)(operatorsProp), operators = _y[0], setOperators = _y[1];
|
|
741
747
|
// Remote-fetch loading (ported from IDE Options); only relevant when one of
|
|
742
748
|
// the fetch urls is set — schema-as-props consumers never see the skeleton.
|
|
743
|
-
var
|
|
749
|
+
var _z = (0, react_2.useState)(!!(url || customUrl || operatorsUrl)), loading = _z[0], setLoading = _z[1];
|
|
744
750
|
var confirmAction = (0, reqore_1.useReqoreProperty)('confirmAction');
|
|
745
751
|
var theme = (0, reqore_1.useReqoreTheme)();
|
|
746
|
-
var
|
|
747
|
-
var _0 = (0, react_2.useState)(
|
|
752
|
+
var calm = (0, formAppearance_1.useIsCalmForm)();
|
|
753
|
+
var _0 = (0, react_2.useState)(), focusedEditing = _0[0], setFocusedEditing = _0[1];
|
|
754
|
+
var _1 = (0, react_2.useState)(false), showFieldTypes = _1[0], setShowFieldTypes = _1[1];
|
|
748
755
|
// Global toggle (toolbar ⓘ): reveal the short-description info panel on every
|
|
749
756
|
// field that has a short_desc. Per-row ⓘ overrides still win over it.
|
|
750
757
|
// Global field-info visibility, tri-state: `undefined` = default (critical
|
|
751
758
|
// messages auto-open, the rest closed); `true` = show all; `false` = hide all
|
|
752
759
|
// (even message fields). The toolbar ⓘ drives it.
|
|
753
|
-
var
|
|
754
|
-
var
|
|
755
|
-
var
|
|
760
|
+
var _2 = (0, react_2.useState)(undefined), showAllDescriptions = _2[0], setShowAllDescriptions = _2[1];
|
|
761
|
+
var _3 = (0, react_2.useState)(), showHelpForOption = _3[0], setShowHelpForOption = _3[1];
|
|
762
|
+
var _4 = (0, react_2.useState)(false), showInvalidOptionsOnly = _4[0], setShowInvalidOptionsOnly = _4[1];
|
|
756
763
|
// Which options are expanded into their editor (several can be open at once).
|
|
757
|
-
var
|
|
764
|
+
var _5 = (0, react_2.useState)([]), expandedOptions = _5[0], setExpandedOptions = _5[1];
|
|
765
|
+
// The fields the person has opened and left. An empty required field becomes a
|
|
766
|
+
// fault only then (or after a submit attempt, `revealRequired`): a form nobody has
|
|
767
|
+
// touched is not already wrong.
|
|
768
|
+
var _6 = (0, react_2.useState)([]), visitedOptions = _6[0], setVisitedOptions = _6[1];
|
|
769
|
+
var lastExpandedOptions = (0, react_2.useRef)([]);
|
|
770
|
+
(0, react_2.useEffect)(function () {
|
|
771
|
+
var left = lastExpandedOptions.current.filter(function (name) { return !expandedOptions.includes(name); });
|
|
772
|
+
lastExpandedOptions.current = expandedOptions;
|
|
773
|
+
if (left.length) {
|
|
774
|
+
setVisitedOptions(function (prev) {
|
|
775
|
+
var added = left.filter(function (name) { return !prev.includes(name); });
|
|
776
|
+
return added.length ? __spreadArray(__spreadArray([], prev, true), added, true) : prev;
|
|
777
|
+
});
|
|
778
|
+
}
|
|
779
|
+
}, [expandedOptions]);
|
|
758
780
|
/** Status boxes whose "N more fields" control the reader has opened. Keyed by
|
|
759
781
|
box so opening Optional does not also unfold Set. */
|
|
760
|
-
var
|
|
782
|
+
var _7 = (0, react_2.useState)([]), expandedMoreBoxes = _7[0], setExpandedMoreBoxes = _7[1];
|
|
761
783
|
// --- Reveal a status box's content when it is opened ----------------------
|
|
762
784
|
//
|
|
763
785
|
// The status boxes stack, so the last one ("Optional", which holds every
|
|
@@ -773,7 +795,7 @@ var FormEngineImpl = function (_a) {
|
|
|
773
795
|
// box has not grown and there is nothing to scroll to. A layout effect runs
|
|
774
796
|
// after the DOM is updated and before paint, which makes the reveal
|
|
775
797
|
// deterministic instead of a guessed delay.
|
|
776
|
-
var
|
|
798
|
+
var _8 = (0, react_2.useState)(undefined), openedStatusBox = _8[0], setOpenedStatusBox = _8[1];
|
|
777
799
|
var statusBoxRefs = (0, react_2.useRef)({});
|
|
778
800
|
(0, react_2.useLayoutEffect)(function () {
|
|
779
801
|
var _a, _b;
|
|
@@ -804,13 +826,13 @@ var FormEngineImpl = function (_a) {
|
|
|
804
826
|
var settledBucket = (0, react_2.useRef)({});
|
|
805
827
|
// Measured form width (not viewport — the form lives in drawers/panels of
|
|
806
828
|
// arbitrary width) drives the stacked narrow layout.
|
|
807
|
-
var
|
|
829
|
+
var _9 = (0, react_use_1.useMeasure)(), compactWrapRef = _9[0], compactWrapWidth = _9[1].width;
|
|
808
830
|
// Own handle on the scroll wrap (useMeasure's ref is a callback, no `.current`)
|
|
809
831
|
// so the label-column measurement can publish its CSS var on the element. It's
|
|
810
832
|
// STATE, not a ref: the wrap mounts only after the loading-skeleton gate
|
|
811
833
|
// resolves, so the measurement effect must re-run when the node appears — a
|
|
812
834
|
// ref wouldn't retrigger it.
|
|
813
|
-
var
|
|
835
|
+
var _10 = (0, react_2.useState)(null), compactWrapNode = _10[0], setCompactWrapNode = _10[1];
|
|
814
836
|
// Ref mirror of the wrap node for callbacks that must not re-create when it
|
|
815
837
|
// mounts (flashOptions reads it inside a rAF).
|
|
816
838
|
var compactWrapNodeRef = (0, react_2.useRef)(null);
|
|
@@ -826,7 +848,7 @@ var FormEngineImpl = function (_a) {
|
|
|
826
848
|
/* The label column the rows are laid out with: measured from the labels (see below), the
|
|
827
849
|
default until it is. A form stacks its rows where its value column would be too narrow
|
|
828
850
|
beside it (`isCompactNarrow`), not at one form width whatever its labels are. */
|
|
829
|
-
var
|
|
851
|
+
var _11 = (0, react_2.useState)(compactRowStyles_1.COMPACT_LABEL_COL), compactLabelColumn = _11[0], setCompactLabelColumn = _11[1];
|
|
830
852
|
// the label column holds a finger's help button where the pointer is a finger (`labelAffordanceWidth`)
|
|
831
853
|
var coarsePointer = (0, useCoarsePointer_1.useCoarsePointer)();
|
|
832
854
|
var compactNarrow = !!compactWrapWidth && (0, compactRowStyles_1.isCompactNarrow)(compactWrapWidth, compactLabelColumn);
|
|
@@ -844,7 +866,7 @@ var FormEngineImpl = function (_a) {
|
|
|
844
866
|
a search row and a field picker that each hide themselves when they have
|
|
845
867
|
nothing to say, and what is left wraps differently at every form width.
|
|
846
868
|
Zero when this form draws no toolbar at all. */
|
|
847
|
-
var
|
|
869
|
+
var _12 = (0, react_2.useState)(0), compactToolbarHeight = _12[0], setCompactToolbarHeight = _12[1];
|
|
848
870
|
(0, react_2.useLayoutEffect)(function () {
|
|
849
871
|
var wrap = compactWrapNode;
|
|
850
872
|
if (!compact || !wrap || compactNested || !compactStickyBoxHeaders) {
|
|
@@ -884,6 +906,38 @@ var FormEngineImpl = function (_a) {
|
|
|
884
906
|
the ResizeObserver never fires and a stale 124px would go on offsetting
|
|
885
907
|
the box headers below a toolbar that is no longer there. */
|
|
886
908
|
}, [compact, compactNested, compactStickyBoxHeaders, compactNarrow, compactWrapNode, options]);
|
|
909
|
+
/* The colour a calm form sits on, for its pinned toolbar's glass.
|
|
910
|
+
|
|
911
|
+
A calm form has no surface of its own, so the toolbar has to paint one to
|
|
912
|
+
keep the rows that scroll under it from showing through the meter and the
|
|
913
|
+
search — and it has to be the host's colour, or it draws a band across the
|
|
914
|
+
form before anything has moved. The host is whatever paints first above the
|
|
915
|
+
form: the page, a drawer's panel surface, a card. Read once it mounts (and
|
|
916
|
+
when the theme changes), not assumed from the theme's main colour. */
|
|
917
|
+
var _13 = (0, react_2.useState)(), compactHostColour = _13[0], setCompactHostColour = _13[1];
|
|
918
|
+
(0, react_2.useLayoutEffect)(function () {
|
|
919
|
+
if (!calm || !compact || compactNested || !compactWrapNode) {
|
|
920
|
+
setCompactHostColour(undefined);
|
|
921
|
+
return;
|
|
922
|
+
}
|
|
923
|
+
var _loop_1 = function (node) {
|
|
924
|
+
var _a = (getComputedStyle(node).backgroundColor.match(/[\d.]+/g) || [])
|
|
925
|
+
.slice(0, 4)
|
|
926
|
+
.map(Number), r = _a[0], g = _a[1], b = _a[2], _b = _a[3], alpha = _b === void 0 ? 1 : _b;
|
|
927
|
+
if (alpha > 0 && b !== undefined) {
|
|
928
|
+
setCompactHostColour(function (prev) {
|
|
929
|
+
return (prev === null || prev === void 0 ? void 0 : prev[0]) === r && (prev === null || prev === void 0 ? void 0 : prev[1]) === g && (prev === null || prev === void 0 ? void 0 : prev[2]) === b ? prev : [r, g, b];
|
|
930
|
+
});
|
|
931
|
+
return { value: void 0 };
|
|
932
|
+
}
|
|
933
|
+
};
|
|
934
|
+
for (var node = compactWrapNode.parentElement; node; node = node.parentElement) {
|
|
935
|
+
var state_1 = _loop_1(node);
|
|
936
|
+
if (typeof state_1 === "object")
|
|
937
|
+
return state_1.value;
|
|
938
|
+
}
|
|
939
|
+
setCompactHostColour(undefined);
|
|
940
|
+
}, [calm, compact, compactNested, compactWrapNode, theme]);
|
|
887
941
|
// Global label-column sizing: size the label column to the WIDEST field label
|
|
888
942
|
// across the whole form, clamped to [MIN, MAX], and publish it as a CSS var on
|
|
889
943
|
// the scroll wrap. Both the grid column and the value-surface offsets read the
|
|
@@ -932,8 +986,8 @@ var FormEngineImpl = function (_a) {
|
|
|
932
986
|
var readRowHeights = (0, react_2.useRef)({});
|
|
933
987
|
// Required-groups linkage: hovering a group chip highlights every member row;
|
|
934
988
|
// clicking a sibling in the chip's popover scrolls to it and flashes it.
|
|
935
|
-
var
|
|
936
|
-
var
|
|
989
|
+
var _14 = (0, react_2.useState)([]), highlightedOptions = _14[0], setHighlightedOptions = _14[1];
|
|
990
|
+
var _15 = (0, react_2.useState)([]), flashedOptions = _15[0], setFlashedOptions = _15[1];
|
|
937
991
|
var flashTimeout = (0, react_2.useRef)();
|
|
938
992
|
var flashOptions = (0, react_2.useCallback)(function (optionNames, scrollToFirst) {
|
|
939
993
|
if (scrollToFirst === void 0) { scrollToFirst = false; }
|
|
@@ -985,16 +1039,16 @@ var FormEngineImpl = function (_a) {
|
|
|
985
1039
|
}
|
|
986
1040
|
});
|
|
987
1041
|
// Info panels auto-open on Tier-1 content; the per-row user override sticks.
|
|
988
|
-
var
|
|
1042
|
+
var _16 = (0, react_2.useState)({}), infoPanelOverrides = _16[0], setInfoPanelOverrides = _16[1];
|
|
989
1043
|
// Toolbar filters affect the listed rows only — the meter reflects the full set.
|
|
990
|
-
var
|
|
991
|
-
var
|
|
1044
|
+
var _17 = (0, react_2.useState)(false), requiredOnly = _17[0], setRequiredOnly = _17[1];
|
|
1045
|
+
var _18 = (0, react_2.useState)(''), compactQuery = _18[0], setCompactQuery = _18[1];
|
|
992
1046
|
// Compact field sort (Fields menu → "Sort by"); 'schema' = declared order.
|
|
993
|
-
var
|
|
994
|
-
var
|
|
1047
|
+
var _19 = (0, react_2.useState)('schema'), compactSort = _19[0], setCompactSort = _19[1];
|
|
1048
|
+
var _20 = (0, react_2.useState)(function () { return ({
|
|
995
1049
|
fields: (0, exports.fixOptions)(value, options || {}, undefined, isRendererOnly),
|
|
996
1050
|
meta: undefined,
|
|
997
|
-
}); }), localValue =
|
|
1051
|
+
}); }), localValue = _20[0], setLocalValue = _20[1];
|
|
998
1052
|
var originalValue = (0, react_2.useRef)();
|
|
999
1053
|
// Track the last value we emitted via onChange so we can skip re-applying fixOptions
|
|
1000
1054
|
// when the parent echoes it back as the new value prop (controlled component loop prevention)
|
|
@@ -1052,7 +1106,7 @@ var FormEngineImpl = function (_a) {
|
|
|
1052
1106
|
originalValue.current = localValue.fields;
|
|
1053
1107
|
}
|
|
1054
1108
|
var unavailableOptionsCount = (0, react_2.useRef)(0);
|
|
1055
|
-
var
|
|
1109
|
+
var _21 = (0, useQorusTypes_1.useQorusTypes)(), compactValue = _21.compactValue, typesLoading = _21.loading;
|
|
1056
1110
|
// an option's type in words, while the form shows field types (qorus#646: it said the type's code, `<string>`)
|
|
1057
1111
|
var typeName = (0, typeSentenceForm_1.useTypeName)();
|
|
1058
1112
|
var templates = (0, useTemplates_1.useTemplates)(allowTemplates, stringTemplates, interfaceContext);
|
|
@@ -1795,6 +1849,11 @@ var FormEngineImpl = function (_a) {
|
|
|
1795
1849
|
return newValue;
|
|
1796
1850
|
}
|
|
1797
1851
|
if (showInvalidOptionsOnly &&
|
|
1852
|
+
// An open row stays while the reader is in it, as its box does
|
|
1853
|
+
// (`stableBucketOf`): the first character typed into an empty required
|
|
1854
|
+
// field makes it valid, and hiding it then would pull the field out
|
|
1855
|
+
// from under the caret mid-word.
|
|
1856
|
+
!expandedOptions.includes(optionName) &&
|
|
1798
1857
|
isOptionValid(optionName, (0, exports.getOptionFieldStorageType)(optionName, option.type, options, operators, option.op, isRendererOnly, optionHoldsExpression(option)), option.value)) {
|
|
1799
1858
|
return newValue;
|
|
1800
1859
|
}
|
|
@@ -1803,6 +1862,7 @@ var FormEngineImpl = function (_a) {
|
|
|
1803
1862
|
}, [
|
|
1804
1863
|
dependencyLockedNames,
|
|
1805
1864
|
showInvalidOptionsOnly,
|
|
1865
|
+
expandedOptions,
|
|
1806
1866
|
isRendererOnly,
|
|
1807
1867
|
JSON.stringify(availableOptions),
|
|
1808
1868
|
JSON.stringify(options),
|
|
@@ -1858,8 +1918,17 @@ var FormEngineImpl = function (_a) {
|
|
|
1858
1918
|
covered: covered,
|
|
1859
1919
|
invalid: invalid,
|
|
1860
1920
|
warned: msgIntent === 'warning',
|
|
1921
|
+
// a one-of member, once anyone has been to its group (`hasBeenToTheField`)
|
|
1922
|
+
visited: (0, readFirst_1.hasBeenToTheField)(name, {
|
|
1923
|
+
visitedOptions: visitedOptions,
|
|
1924
|
+
revealRequired: revealRequired,
|
|
1925
|
+
requiredGroups: reqGroups,
|
|
1926
|
+
groupMembers: requiredGroupsInfo.members,
|
|
1927
|
+
}),
|
|
1861
1928
|
});
|
|
1862
1929
|
}, [
|
|
1930
|
+
revealRequired,
|
|
1931
|
+
visitedOptions,
|
|
1863
1932
|
isRendererOnly,
|
|
1864
1933
|
JSON.stringify(options),
|
|
1865
1934
|
JSON.stringify(availableOptions),
|
|
@@ -1889,6 +1958,34 @@ var FormEngineImpl = function (_a) {
|
|
|
1889
1958
|
// a hidden field (its `depends_on` does not hold) is not in the form, nor in its counts
|
|
1890
1959
|
function (name) { return !dependencyLockedNames.includes(name) && getOptionBucket(name) === 'attention'; }).length;
|
|
1891
1960
|
}, [JSON.stringify(availableOptions), getOptionBucket, dependencyLockedNames]);
|
|
1961
|
+
// How many of those are faults rather than only still to fill in (`pending`). Zero
|
|
1962
|
+
// on a new form, so its first box reads "To fill in" without amber.
|
|
1963
|
+
var readFirstAttentionFaultCount = (0, react_2.useMemo)(function () {
|
|
1964
|
+
return Object.keys(availableOptions || {}).filter(function (name) { return getOptionBucket(name) === 'attention' && getOptionStatus(name) !== 'pending'; }).length;
|
|
1965
|
+
}, [JSON.stringify(availableOptions), getOptionBucket, getOptionStatus]);
|
|
1966
|
+
/* Fields whose value fails but that are not in the first box: an optional field its host says is wrong
|
|
1967
|
+
(`invalid_reason`) stays among the optional ones. They make the form "Incomplete", so the readiness line counts
|
|
1968
|
+
them with the faults: it said "Incomplete" and nothing else, with nothing to tell the reader what. */
|
|
1969
|
+
var readFirstFaultsOutsideBox = (0, react_2.useMemo)(function () {
|
|
1970
|
+
return validityData.invalidFields.filter(function (_a) {
|
|
1971
|
+
var fieldName = _a.fieldName;
|
|
1972
|
+
return !!(availableOptions === null || availableOptions === void 0 ? void 0 : availableOptions[fieldName]) &&
|
|
1973
|
+
!dependencyLockedNames.includes(fieldName) &&
|
|
1974
|
+
getOptionBucket(fieldName) !== 'attention';
|
|
1975
|
+
}).length;
|
|
1976
|
+
}, [validityData, JSON.stringify(availableOptions), dependencyLockedNames, getOptionBucket]);
|
|
1977
|
+
// The same two numbers, to a host that draws its own submit control from them.
|
|
1978
|
+
var onAttentionChangeRef = (0, react_2.useRef)(onAttentionChange);
|
|
1979
|
+
onAttentionChangeRef.current = onAttentionChange;
|
|
1980
|
+
// What the host found wrong outside the fields: in the line and in what the host is told.
|
|
1981
|
+
var outsideAttentionCount = Math.max(0, (_b = outsideAttention === null || outsideAttention === void 0 ? void 0 : outsideAttention.count) !== null && _b !== void 0 ? _b : 0);
|
|
1982
|
+
(0, react_2.useEffect)(function () {
|
|
1983
|
+
var _a;
|
|
1984
|
+
(_a = onAttentionChangeRef.current) === null || _a === void 0 ? void 0 : _a.call(onAttentionChangeRef, {
|
|
1985
|
+
count: readFirstAttentionCount + outsideAttentionCount,
|
|
1986
|
+
faults: readFirstAttentionFaultCount + outsideAttentionCount,
|
|
1987
|
+
});
|
|
1988
|
+
}, [readFirstAttentionCount, readFirstAttentionFaultCount, outsideAttentionCount]);
|
|
1892
1989
|
var getIntent = (0, react_2.useCallback)(
|
|
1893
1990
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
1894
1991
|
function (optName, type, optValue, _op) {
|
|
@@ -2159,7 +2256,7 @@ var FormEngineImpl = function (_a) {
|
|
|
2159
2256
|
}
|
|
2160
2257
|
hasAutoFocusedRef.current = true;
|
|
2161
2258
|
var entered = event.target;
|
|
2162
|
-
if ((0,
|
|
2259
|
+
if ((0, rowFocus_2.isTypingControl)(entered)) {
|
|
2163
2260
|
return;
|
|
2164
2261
|
}
|
|
2165
2262
|
var target = firstAttentionRow();
|
|
@@ -2187,6 +2284,48 @@ var FormEngineImpl = function (_a) {
|
|
|
2187
2284
|
compactWrapNode.removeEventListener('focusin', onFocusIn);
|
|
2188
2285
|
};
|
|
2189
2286
|
}, [autoFocusFirstRequired, compact, compactWrapNode]);
|
|
2287
|
+
// A submit that could not go is answered with where to type: each new
|
|
2288
|
+
// `focusAttentionRequest` opens the first field that needs attention and puts the
|
|
2289
|
+
// caret in it. The host's submit button holds the caret at that moment, and an open
|
|
2290
|
+
// row never takes a caret held outside it (CompactRow), so the button lets go of it
|
|
2291
|
+
// here first; the person asked to submit, and this is the answer to that. It picks
|
|
2292
|
+
// the field the arrival scan above would (`firstAttentionRow`), and spends that scan:
|
|
2293
|
+
// the person has been taken to a field now.
|
|
2294
|
+
var lastFocusRequest = (0, react_2.useRef)(focusAttentionRequest);
|
|
2295
|
+
(0, react_2.useEffect)(function () {
|
|
2296
|
+
var _a;
|
|
2297
|
+
if (focusAttentionRequest === lastFocusRequest.current) {
|
|
2298
|
+
return;
|
|
2299
|
+
}
|
|
2300
|
+
lastFocusRequest.current = focusAttentionRequest;
|
|
2301
|
+
if (!focusAttentionRequest || !compact || !options) {
|
|
2302
|
+
return;
|
|
2303
|
+
}
|
|
2304
|
+
var target = firstAttentionRow();
|
|
2305
|
+
if (!target) {
|
|
2306
|
+
return;
|
|
2307
|
+
}
|
|
2308
|
+
hasAutoFocusedRef.current = true;
|
|
2309
|
+
var wrap = compactWrapNodeRef.current;
|
|
2310
|
+
var active = document.activeElement;
|
|
2311
|
+
if (active && active !== document.body && !(wrap === null || wrap === void 0 ? void 0 : wrap.contains(active))) {
|
|
2312
|
+
active.blur();
|
|
2313
|
+
}
|
|
2314
|
+
if (!expandedOptions.includes(target)) {
|
|
2315
|
+
// The row's own open effect reveals it and takes the caret.
|
|
2316
|
+
openFirstAttentionRow(target);
|
|
2317
|
+
return;
|
|
2318
|
+
}
|
|
2319
|
+
// Already open (the field the form opened on arrival): its open effect has run,
|
|
2320
|
+
// so the caret goes to its control here.
|
|
2321
|
+
var row = wrap === null || wrap === void 0 ? void 0 : wrap.querySelector("[data-field=\"".concat(target, "\"]"));
|
|
2322
|
+
if (row) {
|
|
2323
|
+
(0, revealRow_1.revealRow)(row, 'auto');
|
|
2324
|
+
(_a = (0, rowFocus_1.findRowFocusTarget)(row.querySelector('.options-readfirst-row-editor'), {
|
|
2325
|
+
textEntryOnly: row.classList.contains('options-readfirst-card'),
|
|
2326
|
+
})) === null || _a === void 0 ? void 0 : _a.focus({ preventScroll: true });
|
|
2327
|
+
}
|
|
2328
|
+
}, [focusAttentionRequest]);
|
|
2190
2329
|
// Read-first completion summary (how many shown options have a value set),
|
|
2191
2330
|
// surfaced as a progress meter at the top of the compact form.
|
|
2192
2331
|
var readFirstCompletion = (0, react_2.useMemo)(function () {
|
|
@@ -2362,7 +2501,7 @@ var FormEngineImpl = function (_a) {
|
|
|
2362
2501
|
return null;
|
|
2363
2502
|
var items = schemaMsgs.map(function (_a, index) {
|
|
2364
2503
|
var intent = _a.intent, title = _a.title, content = _a.content;
|
|
2365
|
-
return ((0, jsx_runtime_1.jsx)(reqore_1.ReqoreMessage, { intent: intent, title: title, opaque: false, size: 'small',
|
|
2504
|
+
return ((0, jsx_runtime_1.jsx)(reqore_1.ReqoreMessage, { intent: (0, formAppearance_1.calmNoteIntent)(intent, calm), title: title, opaque: false, size: 'small',
|
|
2366
2505
|
// Compact: flat (no border) to match the read-row info panels;
|
|
2367
2506
|
// classic forms keep the bordered, bottom-margined message.
|
|
2368
2507
|
flat: compact || undefined, margin: compact ? undefined : 'bottom', children: content }, title || index));
|
|
@@ -2462,7 +2601,10 @@ var FormEngineImpl = function (_a) {
|
|
|
2462
2601
|
readOnly ||
|
|
2463
2602
|
!(0, validations_1.hasAllDependenciesFullfilled)((_v = options === null || options === void 0 ? void 0 : options[optionName]) === null || _v === void 0 ? void 0 : _v.depends_on, availableOptions, options || {}), readOnly: readOnly, size: editorSize || rest.size, menuItems: (0, typeChoices_1.offersTypeChoices)(options === null || options === void 0 ? void 0 : options[optionName], anyLikeUiTypes) ?
|
|
2464
2603
|
getCustomMenuTemplateItems(optionName)
|
|
2465
|
-
: undefined }, templateFieldProps, { forceDropdown: effectiveForceDropdown })), (0, jsx_runtime_1.jsx)(OptionFieldMessages_1.OptionFieldMessages, { schema: options || {}, allOptions: availableOptions, name: optionName, option: __assign({ type: resolvedType }, other), getType: getTypeForOption, isRendererOnly: isRendererOnly
|
|
2604
|
+
: undefined }, templateFieldProps, { forceDropdown: effectiveForceDropdown })), (0, jsx_runtime_1.jsx)(OptionFieldMessages_1.OptionFieldMessages, { schema: options || {}, allOptions: availableOptions, name: optionName, option: __assign({ type: resolvedType }, other), getType: getTypeForOption, isRendererOnly: isRendererOnly,
|
|
2605
|
+
// Open is not left: a field the form opened for typing (the first empty
|
|
2606
|
+
// one, on a new form) says what it needs without already being wrong.
|
|
2607
|
+
requirementPending: !(revealRequired || visitedOptions.includes(optionName)) }), operators && (0, size_1.default)(operators) && (0, size_1.default)(other.op) ?
|
|
2466
2608
|
(0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(reqore_1.ReqoreVerticalSpacer, { height: 5 }), (0, jsx_runtime_1.jsx)(reqore_1.ReqoreMessage, { size: 'small', className: 'options-operator-summary', children: (0, operatorSummary_1.operatorSummary)({
|
|
2467
2609
|
label: (optionSchema === null || optionSchema === void 0 ? void 0 : optionSchema.display_name) || optionName,
|
|
2468
2610
|
operatorKeys: operatorParts,
|
|
@@ -2496,10 +2638,12 @@ var FormEngineImpl = function (_a) {
|
|
|
2496
2638
|
getTypeForOption,
|
|
2497
2639
|
inheritedScopes,
|
|
2498
2640
|
inheritedFromParent,
|
|
2641
|
+
revealRequired,
|
|
2642
|
+
visitedOptions,
|
|
2499
2643
|
]);
|
|
2500
2644
|
// Compact (read-first) rendering.
|
|
2501
2645
|
// Theme-derived colors so the flat-row layout adapts to light/dark/custom themes.
|
|
2502
|
-
var cText = (
|
|
2646
|
+
var cText = (0, formAppearance_1.getThemeTextColour)(theme, '#f1f0ee');
|
|
2503
2647
|
// Text emphasis tiers via reqore's readable-color helper (key = full readable
|
|
2504
2648
|
// text, muted = its dimmed variant, faint = the dimmed variant softened
|
|
2505
2649
|
// further) instead of hand-rolled hex-alpha suffixes on the raw text color.
|
|
@@ -2508,8 +2652,10 @@ var FormEngineImpl = function (_a) {
|
|
|
2508
2652
|
var cFaint = "".concat(cMuted, "99");
|
|
2509
2653
|
var cDivider = "".concat(cText, "14");
|
|
2510
2654
|
var cHover = "".concat(cText, "0d");
|
|
2511
|
-
|
|
2512
|
-
|
|
2655
|
+
// Calm: the intents as words that read on the section surface, not the
|
|
2656
|
+
// theme's fills (see `getCalmIntentText`). Dots and edges take them too.
|
|
2657
|
+
var cDanger = calm ? (0, formAppearance_1.getCalmIntentText)(theme, 'danger') : ((_c = theme === null || theme === void 0 ? void 0 : theme.intents) === null || _c === void 0 ? void 0 : _c.danger) || '#e35a5a';
|
|
2658
|
+
var cWarning = calm ? (0, formAppearance_1.getCalmIntentText)(theme, 'warning') : ((_d = theme === null || theme === void 0 ? void 0 : theme.intents) === null || _d === void 0 ? void 0 : _d.warning) || '#ffdf34';
|
|
2513
2659
|
var cInfo = ((_f = theme === null || theme === void 0 ? void 0 : theme.intents) === null || _f === void 0 ? void 0 : _f.info) || '#3b8eea';
|
|
2514
2660
|
var cSuccess = ((_g = theme === null || theme === void 0 ? void 0 : theme.intents) === null || _g === void 0 ? void 0 : _g.success) || '#36b37e';
|
|
2515
2661
|
// the rows' own words and marks, in colors that read on every surface a row is drawn on
|
|
@@ -2527,6 +2673,10 @@ var FormEngineImpl = function (_a) {
|
|
|
2527
2673
|
// The "N more fields" row's dashed edge. Well above the divider tint: this
|
|
2528
2674
|
// one is an affordance the reader has to notice, not a hairline between rows.
|
|
2529
2675
|
var cMoreBorder = "".concat(cText, "4d");
|
|
2676
|
+
// Calm: the section surface and its hairline, from the theme's panel (the
|
|
2677
|
+
// same surface and edge Reqore gives the section panels themselves).
|
|
2678
|
+
var cPanel = (0, formAppearance_1.getCalmPanelSurface)(theme);
|
|
2679
|
+
var cHairline = (0, formAppearance_1.getCalmPanelHairline)(theme);
|
|
2530
2680
|
// The closure surface the extracted CompactRow reads through context. Refs and
|
|
2531
2681
|
// setters are stable; the state/memo/handler fields change identity as they do
|
|
2532
2682
|
// today, so a row re-renders exactly when its inputs do.
|
|
@@ -2546,6 +2696,8 @@ var FormEngineImpl = function (_a) {
|
|
|
2546
2696
|
cardEditorTypes: cardEditorTypes,
|
|
2547
2697
|
showAllDescriptions: showAllDescriptions,
|
|
2548
2698
|
expandedOptions: expandedOptions,
|
|
2699
|
+
visitedOptions: visitedOptions,
|
|
2700
|
+
revealRequired: revealRequired,
|
|
2549
2701
|
highlightedOptions: highlightedOptions,
|
|
2550
2702
|
flashedOptions: flashedOptions,
|
|
2551
2703
|
infoPanelOverrides: infoPanelOverrides,
|
|
@@ -2598,6 +2750,8 @@ var FormEngineImpl = function (_a) {
|
|
|
2598
2750
|
cardEditorTypes,
|
|
2599
2751
|
showAllDescriptions,
|
|
2600
2752
|
expandedOptions,
|
|
2753
|
+
visitedOptions,
|
|
2754
|
+
revealRequired,
|
|
2601
2755
|
highlightedOptions,
|
|
2602
2756
|
flashedOptions,
|
|
2603
2757
|
infoPanelOverrides,
|
|
@@ -2641,13 +2795,22 @@ var FormEngineImpl = function (_a) {
|
|
|
2641
2795
|
var compactToolbarParts = (0, react_2.useMemo)(function () {
|
|
2642
2796
|
if (compactToolbar === false)
|
|
2643
2797
|
return null;
|
|
2798
|
+
// A calm sub-form nested in a row (a list item, a hash field) draws only its
|
|
2799
|
+
// fields. Its readiness is said once, by the item it sits in, and each row
|
|
2800
|
+
// says what it lacks; a search over two to six fields helps nobody, and one
|
|
2801
|
+
// per item stacked a second search box under the form's own for every item.
|
|
2802
|
+
if (calm && compactNested)
|
|
2803
|
+
return null;
|
|
2644
2804
|
var all = { completion: true, search: true, fields: true, help: true };
|
|
2645
2805
|
return compactToolbar === true ? all : __assign(__assign({}, all), compactToolbar);
|
|
2646
|
-
}, [JSON.stringify(compactToolbar)]);
|
|
2806
|
+
}, [JSON.stringify(compactToolbar), calm, compactNested]);
|
|
2647
2807
|
var compactToolbarContextValue = (0, react_2.useMemo)(function () { return ({
|
|
2648
2808
|
readOnly: readOnly,
|
|
2649
2809
|
invalidCount: (0, size_1.default)(validityData.invalidFields),
|
|
2650
|
-
attentionCount: readFirstAttentionCount,
|
|
2810
|
+
attentionCount: readFirstAttentionCount + readFirstFaultsOutsideBox,
|
|
2811
|
+
attentionFaultCount: readFirstAttentionFaultCount + readFirstFaultsOutsideBox,
|
|
2812
|
+
outsideAttentionCount: outsideAttentionCount,
|
|
2813
|
+
onRevealOutside: outsideAttention === null || outsideAttention === void 0 ? void 0 : outsideAttention.onReveal,
|
|
2651
2814
|
completion: readFirstCompletion,
|
|
2652
2815
|
showInvalidOnly: showInvalidOptionsOnly,
|
|
2653
2816
|
onToggleInvalidOnly: handleToggleInvalidOnly,
|
|
@@ -2694,6 +2857,8 @@ var FormEngineImpl = function (_a) {
|
|
|
2694
2857
|
onReadOnlyActivate,
|
|
2695
2858
|
validityData,
|
|
2696
2859
|
readFirstAttentionCount,
|
|
2860
|
+
readFirstAttentionFaultCount,
|
|
2861
|
+
readFirstFaultsOutsideBox,
|
|
2697
2862
|
readFirstCompletion,
|
|
2698
2863
|
showInvalidOptionsOnly,
|
|
2699
2864
|
handleToggleInvalidOnly,
|
|
@@ -2723,8 +2888,17 @@ var FormEngineImpl = function (_a) {
|
|
|
2723
2888
|
// removes it, and then the header carries just the consumer's own actions.
|
|
2724
2889
|
var compactHeaderActions = (0, react_2.useMemo)(function () { return __spreadArray(__spreadArray([], (compactToolbarParts ? [{ as: CompactToolbar_1.CompactToolbar, responsive: false }] : []), true), ((compactPanelProps === null || compactPanelProps === void 0 ? void 0 : compactPanelProps.actions) || []), true); }, [compactPanelProps === null || compactPanelProps === void 0 ? void 0 : compactPanelProps.actions, compactToolbarParts]);
|
|
2725
2890
|
var renderCompact = function () {
|
|
2726
|
-
var _a, _b, _c, _d;
|
|
2727
|
-
|
|
2891
|
+
var _a, _b, _c, _d, _f;
|
|
2892
|
+
// Calm: the host's own colour (see `compactHostColour`), so the pinned
|
|
2893
|
+
// toolbar is invisible until something scrolls under it - and opaque, so
|
|
2894
|
+
// what scrolls under it does not read through. At 88% with a blur the rows
|
|
2895
|
+
// still showed through crisply around the readiness line and the search
|
|
2896
|
+
// wherever the blur did not apply (headless captures, a browser or a
|
|
2897
|
+
// compositor without backdrop-filter): the blur was never something to
|
|
2898
|
+
// count on, the host's color is.
|
|
2899
|
+
var headerBg = calm && compactHostColour ? "rgb(".concat(compactHostColour.join(', '), ")")
|
|
2900
|
+
: calm ? (0, colors_1.getMainBackgroundColor)(theme)
|
|
2901
|
+
: "".concat((0, colors_1.changeDarkness)((0, colors_1.getMainBackgroundColor)(theme), 0.02)).concat((0, colors_1.percentToHexAlpha)(88));
|
|
2728
2902
|
// Toolbar filters narrow the listed rows; the meter reflects the full set.
|
|
2729
2903
|
var query = compactQuery.trim().toLowerCase();
|
|
2730
2904
|
var matchesQuery = function (optionName) { var _a; return !query || (((_a = options === null || options === void 0 ? void 0 : options[optionName]) === null || _a === void 0 ? void 0 : _a.display_name) || optionName).toLowerCase().includes(query); };
|
|
@@ -2953,21 +3127,29 @@ var FormEngineImpl = function (_a) {
|
|
|
2953
3127
|
var stickyBoxHeaders = compactStickyBoxHeaders && !compactNested;
|
|
2954
3128
|
var boxStickyOffset = compactStickyOffset + compactToolbarHeight;
|
|
2955
3129
|
var STATUS_BOXES = [
|
|
2956
|
-
|
|
2957
|
-
|
|
2958
|
-
|
|
2959
|
-
|
|
2960
|
-
|
|
2961
|
-
|
|
3130
|
+
// The first box is amber only once something in it is a fault. On a new form it
|
|
3131
|
+
// holds the required fields still to fill in, which is not yet anything wrong.
|
|
3132
|
+
readFirstAttentionFaultCount ?
|
|
3133
|
+
{
|
|
3134
|
+
key: 'attention',
|
|
3135
|
+
label: (_a = compactBoxLabels === null || compactBoxLabels === void 0 ? void 0 : compactBoxLabels.attention) !== null && _a !== void 0 ? _a : feWords.boxAttention,
|
|
3136
|
+
intent: 'warning',
|
|
3137
|
+
icon: 'ErrorWarningLine',
|
|
3138
|
+
}
|
|
3139
|
+
: {
|
|
3140
|
+
key: 'attention',
|
|
3141
|
+
label: (_b = compactBoxLabels === null || compactBoxLabels === void 0 ? void 0 : compactBoxLabels.pending) !== null && _b !== void 0 ? _b : feWords.boxPending,
|
|
3142
|
+
icon: 'CheckboxBlankCircleLine',
|
|
3143
|
+
},
|
|
2962
3144
|
{
|
|
2963
3145
|
key: 'set',
|
|
2964
|
-
label: (
|
|
3146
|
+
label: (_c = compactBoxLabels === null || compactBoxLabels === void 0 ? void 0 : compactBoxLabels.set) !== null && _c !== void 0 ? _c : feWords.boxSet,
|
|
2965
3147
|
intent: 'success',
|
|
2966
3148
|
icon: 'CheckLine',
|
|
2967
3149
|
},
|
|
2968
3150
|
{
|
|
2969
3151
|
key: 'optional',
|
|
2970
|
-
label: (
|
|
3152
|
+
label: (_d = compactBoxLabels === null || compactBoxLabels === void 0 ? void 0 : compactBoxLabels.optional) !== null && _d !== void 0 ? _d : feWords.boxOptional,
|
|
2971
3153
|
icon: 'CheckboxBlankCircleLine',
|
|
2972
3154
|
},
|
|
2973
3155
|
];
|
|
@@ -3017,7 +3199,13 @@ var FormEngineImpl = function (_a) {
|
|
|
3017
3199
|
// "Covers"/"Covered by" chips already say which member satisfies it.
|
|
3018
3200
|
if (requiredGroupsInfo.satisfiedBy[grp])
|
|
3019
3201
|
return railed;
|
|
3020
|
-
|
|
3202
|
+
// Amber once someone has been to the group (or a submit was attempted); until
|
|
3203
|
+
// then it is still to fill in, in the quiet colour, like its members.
|
|
3204
|
+
var clusterVisited = memberEntries.some(function (e) { return getOptionStatus(e.name) !== 'pending'; });
|
|
3205
|
+
var clusterColor = clusterVisited ? cWarning : cMuted;
|
|
3206
|
+
// its words and mark: the same colour, in the shade of it that reads on the tint
|
|
3207
|
+
var clusterInk = clusterVisited ? rowInks.warning : rowInks.mutedReason;
|
|
3208
|
+
return ((0, jsx_runtime_1.jsxs)(compactRowStyles_1.StyledRequiredClusterBox, { className: 'options-readfirst-required-cluster', "$border": "".concat(clusterColor, "33"), "$tint": "".concat(clusterColor, "0d"), "$calm": calm, children: [(0, jsx_runtime_1.jsxs)(compactRowStyles_1.StyledRequiredClusterHeader, { className: 'options-readfirst-required-cluster-header', "$color": clusterInk, "$calm": calm, children: [(0, jsx_runtime_1.jsx)(reqore_1.ReqoreIcon, { icon: 'LinkM', size: calm ? '13px' : '11px', style: { color: clusterInk } }), feWords.oneOfRequired] }), railed] }, grp));
|
|
3021
3209
|
});
|
|
3022
3210
|
};
|
|
3023
3211
|
// One schema group inside a status box: its thin sub-label, the group's
|
|
@@ -3028,32 +3216,114 @@ var FormEngineImpl = function (_a) {
|
|
|
3028
3216
|
can be split across the shown and folded halves of a capped box, and its
|
|
3029
3217
|
label must appear above whichever half holds its first row. */
|
|
3030
3218
|
var renderBoxGroup = function (boxKey, groupName, only) {
|
|
3031
|
-
var groupConfig = groups === null || groups === void 0 ? void 0 : groups[groupName];
|
|
3032
3219
|
var rows = only ?
|
|
3033
3220
|
(buckets[boxKey][groupName] || []).filter(function (entry) { return only.has(entry.name); })
|
|
3034
3221
|
: buckets[boxKey][groupName];
|
|
3035
3222
|
if (only && !rows.length) {
|
|
3036
3223
|
return null;
|
|
3037
3224
|
}
|
|
3225
|
+
return renderGroupBlock(groupName, rows);
|
|
3226
|
+
};
|
|
3227
|
+
/** A group's sub-label, subtitle and rows. `key` tells two halves of one
|
|
3228
|
+
group apart when both render in the same body. */
|
|
3229
|
+
var renderGroupBlock = function (groupName, rows, key) {
|
|
3230
|
+
if (key === void 0) { key = groupName; }
|
|
3231
|
+
var groupConfig = groups === null || groups === void 0 ? void 0 : groups[groupName];
|
|
3038
3232
|
return ((0, jsx_runtime_1.jsxs)(react_2.default.Fragment, { children: [showGroupSubLabel(groupName) ?
|
|
3039
|
-
(0, jsx_runtime_1.jsx)(compactRowStyles_1.StyledStatusBoxGroupLabel, { children: (0, readFirst_1.getOptionGroupLabel)(groupName, groups) })
|
|
3233
|
+
(0, jsx_runtime_1.jsx)(compactRowStyles_1.StyledStatusBoxGroupLabel, { className: 'options-readfirst-group-label', "$calm": calm, "$color": cKey, children: (0, readFirst_1.getOptionGroupLabel)(groupName, groups) })
|
|
3040
3234
|
: null, showGroupSubLabel(groupName) && (groupConfig === null || groupConfig === void 0 ? void 0 : groupConfig.subtitle) ?
|
|
3041
|
-
(0, jsx_runtime_1.jsx)(reqore_1.ReqoreP, { size: 'small', effect: { opacity: 0.6 }, style:
|
|
3042
|
-
|
|
3043
|
-
|
|
3044
|
-
|
|
3045
|
-
|
|
3046
|
-
|
|
3047
|
-
|
|
3235
|
+
(0, jsx_runtime_1.jsx)(reqore_1.ReqoreP, { className: 'options-readfirst-group-subtitle', size: 'small', effect: { opacity: 0.6 }, style: calm ?
|
|
3236
|
+
// Under the calm heading, at the rows' inset; the space below
|
|
3237
|
+
// it is the next row's own padding.
|
|
3238
|
+
{ margin: 0, padding: "2px ".concat(compactRowStyles_1.CALM_SECTION_INSET, "px 4px") }
|
|
3239
|
+
: {
|
|
3240
|
+
marginTop: 2,
|
|
3241
|
+
marginBottom: 8,
|
|
3242
|
+
marginLeft: compactRowStyles_1.GROUP_INDENT,
|
|
3243
|
+
paddingRight: 10,
|
|
3244
|
+
}, children: groupConfig.subtitle })
|
|
3245
|
+
: null, renderGroupRows(rows)] }, key));
|
|
3246
|
+
};
|
|
3247
|
+
/** The "N more fields" control: a quiet last row of the body it folds. */
|
|
3248
|
+
var renderMoreRow = function (boxKey, count, open) { return ((0, jsx_runtime_1.jsxs)("button", { type: 'button', className: 'readfirst-row readfirst-more-row options-readfirst-more', "aria-expanded": open, onClick: function () {
|
|
3249
|
+
return setExpandedMoreBoxes(function (prev) {
|
|
3250
|
+
return prev.includes(boxKey) ? prev.filter(function (k) { return k !== boxKey; }) : __spreadArray(__spreadArray([], prev, true), [boxKey], false);
|
|
3251
|
+
});
|
|
3252
|
+
}, children: [(0, jsx_runtime_1.jsx)(reqore_1.ReqoreP, { size: 'small', effect: { opacity: 0.8 }, children: open ? feWords.showFewer : feWords.moreFields(count, boxKey === 'optional') }), (0, jsx_runtime_1.jsx)(reqore_1.ReqoreIcon, { icon: 'ArrowDownSLine', size: 'small', className: 'readfirst-more-chevron', effect: { opacity: 0.8 } })] })); };
|
|
3253
|
+
var groupBodyProps = {
|
|
3254
|
+
$calm: calm,
|
|
3255
|
+
$hairline: cHairline,
|
|
3256
|
+
$divider: cDivider,
|
|
3257
|
+
$hover: cHover,
|
|
3258
|
+
$focus: cWarning,
|
|
3259
|
+
// Calm: the text color's wash, as a hovered row has; amber would say the group is wrong (a satisfied one
|
|
3260
|
+
// stayed amber under the pointer)
|
|
3261
|
+
$groupHighlight: calm ? cHover : "".concat(cWarning, "1f"),
|
|
3262
|
+
$success: cSuccess,
|
|
3263
|
+
$rowBg: cRowBg,
|
|
3264
|
+
$lineColor: cGroupLine,
|
|
3265
|
+
$moreBorder: cMoreBorder,
|
|
3266
|
+
};
|
|
3267
|
+
/* Calm, nested in a row (a list item, a hash field's sub-form): the item is
|
|
3268
|
+
already the card, so its fields sit in it directly instead of in status
|
|
3269
|
+
boxes, which drew a card inside the card. In schema order, so a row does
|
|
3270
|
+
not move to another box under the caret as it is filled; a row that lacks
|
|
3271
|
+
a value still says so where the value would be. The fields nobody has
|
|
3272
|
+
added fold behind one quiet last row, the same control a capped box ends
|
|
3273
|
+
with — and when nothing else is listed they ARE the form, so they show. */
|
|
3274
|
+
var renderNestedRows = function () {
|
|
3275
|
+
// Fields with no named group are one list here. The engine files them under
|
|
3276
|
+
// two synthetic keys (the required ones and the rest), which the boxes
|
|
3277
|
+
// never showed; in one list that split put a set Description above an
|
|
3278
|
+
// empty Method Name. Named groups keep their sub-labels and their order.
|
|
3279
|
+
var UNLABELLED = '';
|
|
3280
|
+
var keyOf = function (groupName) { return (showGroupSubLabel(groupName) ? groupName : UNLABELLED); };
|
|
3281
|
+
var nestedKeys = (0, lodash_1.uniq)(groupKeys.map(keyOf));
|
|
3282
|
+
var listedByGroup = {};
|
|
3283
|
+
var addableByGroup = {};
|
|
3284
|
+
groupKeys.forEach(function (groupName) {
|
|
3285
|
+
grouped[groupName].forEach(function (entry) {
|
|
3286
|
+
var _a;
|
|
3287
|
+
var target = entry.hidden ? addableByGroup : listedByGroup;
|
|
3288
|
+
(target[_a = keyOf(groupName)] || (target[_a] = [])).push(entry);
|
|
3289
|
+
});
|
|
3290
|
+
});
|
|
3291
|
+
// In the schema's order, not the order the values arrived in.
|
|
3292
|
+
var schemaOrder = Object.keys(options || {});
|
|
3293
|
+
var bySchema = function (a, b) {
|
|
3294
|
+
return schemaOrder.indexOf(a.name) - schemaOrder.indexOf(b.name);
|
|
3295
|
+
};
|
|
3296
|
+
(0, lodash_1.forEach)(listedByGroup, function (rows) { return rows.sort(bySchema); });
|
|
3297
|
+
(0, lodash_1.forEach)(addableByGroup, function (rows) { return rows.sort(bySchema); });
|
|
3298
|
+
var renderNestedGroup = function (key, rows, half) {
|
|
3299
|
+
return key === UNLABELLED ?
|
|
3300
|
+
(0, jsx_runtime_1.jsx)(react_2.default.Fragment, { children: renderGroupRows(rows) }, "".concat(half, "-fields"))
|
|
3301
|
+
: renderGroupBlock(key, rows, "".concat(half, "-").concat(key));
|
|
3302
|
+
};
|
|
3303
|
+
var listedGroups = nestedKeys.filter(function (key) { var _a; return (_a = listedByGroup[key]) === null || _a === void 0 ? void 0 : _a.length; });
|
|
3304
|
+
var addableGroups = nestedKeys.filter(function (key) { var _a; return (_a = addableByGroup[key]) === null || _a === void 0 ? void 0 : _a.length; });
|
|
3305
|
+
var addableCount = addableGroups.reduce(function (total, key) { return total + addableByGroup[key].length; }, 0);
|
|
3306
|
+
var folds = listedGroups.length > 0;
|
|
3307
|
+
var addableOpen = !folds || expandedMoreBoxes.includes('optional');
|
|
3308
|
+
return ((0, jsx_runtime_1.jsxs)(compactRowStyles_1.StyledGroupBody, __assign({}, groupBodyProps, { className: "readfirst-nested-list".concat(compactNarrow ? ' readfirst-narrow' : ''), children: [listedGroups.map(function (key) { return renderNestedGroup(key, listedByGroup[key], 'listed'); }), folds && addableCount ? renderMoreRow('optional', addableCount, addableOpen) : null, addableOpen ?
|
|
3309
|
+
addableGroups.map(function (key) { return renderNestedGroup(key, addableByGroup[key], 'addable'); })
|
|
3310
|
+
: null] })));
|
|
3048
3311
|
};
|
|
3049
3312
|
return ((0, jsx_runtime_1.jsx)(optionsContext_1.OptionsContext.Provider, { value: { schema: options, value: availableOptions }, children: (0, jsx_runtime_1.jsx)(compactRowContext_1.CompactRowContext.Provider, { value: compactRowContextValue, children: (0, jsx_runtime_1.jsxs)(reqore_1.ReqoreErrorBoundary, { children: [showHelpForOption && ((0, jsx_runtime_1.jsx)(OptionsHelpDialog_1.OptionsHelpDialog, { onClose: function () { return setShowHelpForOption(undefined); }, option: options[showHelpForOption] })), (0, jsx_runtime_1.jsx)(compactToolbarContext_1.CompactToolbarContext.Provider, { value: compactToolbarContextValue, children: (0, jsx_runtime_1.jsxs)(StyledCompactWrap, { ref: setCompactWrap, className: 'options-readfirst-scroll', "$ownScroll": compactScroll === 'own' && !compactNested, children: [(0, jsx_runtime_1.jsxs)(compactRowStyles_1.StyledCompactPanel
|
|
3050
3313
|
// Mirrors the toolbar's own search-row gate: when no search
|
|
3051
3314
|
// row renders, the header is a thin strip and sits tight to
|
|
3052
3315
|
// the first status box (see StyledCompactPanel).
|
|
3053
|
-
, __assign({ "$tightHeader": !((compactToolbarParts === null || compactToolbarParts === void 0 ? void 0 : compactToolbarParts.search) && (0, size_1.default)(options) > 1), "$headerBg": compactNested ? 'transparent' : headerBg, "$nested": compactNested, "$stickyBoxes": compactStickyBoxHeaders && !compactNested, "$stackHeader": compactNarrow &&
|
|
3316
|
+
, __assign({ "$tightHeader": !((compactToolbarParts === null || compactToolbarParts === void 0 ? void 0 : compactToolbarParts.search) && (0, size_1.default)(options) > 1), "$headerBg": compactNested ? 'transparent' : headerBg, "$nested": compactNested, "$calm": calm, "$stickyBoxes": compactStickyBoxHeaders && !compactNested, "$stackHeader": compactNarrow &&
|
|
3054
3317
|
!!((compactPanelProps === null || compactPanelProps === void 0 ? void 0 : compactPanelProps.label) ||
|
|
3055
3318
|
(compactPanelProps === null || compactPanelProps === void 0 ? void 0 : compactPanelProps.icon) ||
|
|
3056
|
-
((
|
|
3319
|
+
((_f = compactPanelProps === null || compactPanelProps === void 0 ? void 0 : compactPanelProps.actions) === null || _f === void 0 ? void 0 : _f.length)), flat: true,
|
|
3320
|
+
// Calm: no surface and no lift at all. A theme that gives
|
|
3321
|
+
// panels a surface of their own (Reqore's `theme.panel`) would
|
|
3322
|
+
// otherwise paint this wrapper as a card around the section
|
|
3323
|
+
// cards inside it. Transparent and un-raised, Reqore also drops
|
|
3324
|
+
// the wrapper's horizontal padding, so the readiness line, the
|
|
3325
|
+
// search and the sections share one left edge with the host.
|
|
3326
|
+
raised: !calm, minimal: true, transparent: calm || undefined,
|
|
3057
3327
|
// No panel background: the form sits transparently on whatever
|
|
3058
3328
|
// hosts it (page, drawer, or — for an arg_schema field — the
|
|
3059
3329
|
// parent's edit card) instead of stacking its own dark surface.
|
|
@@ -3105,117 +3375,133 @@ var FormEngineImpl = function (_a) {
|
|
|
3105
3375
|
(0, jsx_runtime_1.jsx)(reqore_1.ReqoreMessage, { flat: true, opaque: false, size: 'small', children: readOnly && !query ? feWords.nothingSet : feWords.noFieldsMatch })
|
|
3106
3376
|
: null, readOnly ?
|
|
3107
3377
|
bucketCount('set') ?
|
|
3108
|
-
(0, jsx_runtime_1.jsx)("div", { className: 'options-readfirst-read', style: { padding: '4px 4px 6px' }, children: (0, jsx_runtime_1.jsx)(compactRowStyles_1.StyledGroupBody, {
|
|
3378
|
+
(0, jsx_runtime_1.jsx)("div", { className: 'options-readfirst-read', style: { padding: calm ? 0 : '4px 4px 6px' }, children: (0, jsx_runtime_1.jsx)(compactRowStyles_1.StyledGroupBody, __assign({}, groupBodyProps, { className: "readfirst-read-list".concat(compactNarrow ? ' readfirst-narrow' : ''), children: bucketGroups.set.map(function (groupName) { return renderBoxGroup('set', groupName); }) })) })
|
|
3109
3379
|
: null
|
|
3110
|
-
:
|
|
3111
|
-
|
|
3112
|
-
|
|
3113
|
-
|
|
3114
|
-
|
|
3115
|
-
|
|
3116
|
-
|
|
3117
|
-
|
|
3118
|
-
|
|
3119
|
-
|
|
3120
|
-
|
|
3121
|
-
|
|
3122
|
-
|
|
3123
|
-
|
|
3124
|
-
|
|
3125
|
-
|
|
3126
|
-
|
|
3127
|
-
|
|
3128
|
-
|
|
3129
|
-
|
|
3130
|
-
|
|
3131
|
-
|
|
3132
|
-
|
|
3133
|
-
|
|
3134
|
-
|
|
3135
|
-
|
|
3136
|
-
|
|
3137
|
-
|
|
3138
|
-
|
|
3139
|
-
|
|
3140
|
-
|
|
3141
|
-
|
|
3142
|
-
.map(function (entry) { return entry.name; }));
|
|
3143
|
-
|
|
3144
|
-
|
|
3145
|
-
|
|
3146
|
-
|
|
3380
|
+
: calm && compactNested ? renderNestedRows()
|
|
3381
|
+
: STATUS_BOXES.map(function (box) {
|
|
3382
|
+
var groupsInBox = bucketGroups[box.key];
|
|
3383
|
+
var count = bucketCount(box.key);
|
|
3384
|
+
if (!count)
|
|
3385
|
+
return null;
|
|
3386
|
+
var hasPreselectedRows = boxHasPreselectedRows(box.key);
|
|
3387
|
+
var wouldCollapse = compactCollapsedGroups.includes(box.key) &&
|
|
3388
|
+
!query &&
|
|
3389
|
+
!(box.key === 'optional' && onlyOptionalRows && !collapsedGroupsRequested);
|
|
3390
|
+
// Only a box that was opened SOLELY to reveal a preselected
|
|
3391
|
+
// row splits its body; a box that renders open anyway shows
|
|
3392
|
+
// all of its groups as before.
|
|
3393
|
+
var splitForPreselected = wouldCollapse && hasPreselectedRows;
|
|
3394
|
+
// Which rows this box shows, and which fold away, decided at
|
|
3395
|
+
// ROW level because `maxFieldsShown` counts fields — a
|
|
3396
|
+
// group-level split can only ever cut at a group boundary.
|
|
3397
|
+
// Group order is preserved so the visible rows read in the
|
|
3398
|
+
// same order they would if nothing were folded.
|
|
3399
|
+
var orderedRows = groupsInBox.flatMap(function (groupName) { return buckets[box.key][groupName] || []; });
|
|
3400
|
+
// The number in the box's header counts the rows whose value
|
|
3401
|
+
// belongs in it NOW. A field being edited keeps its box until it
|
|
3402
|
+
// is left (so it does not jump away under the caret), and it used
|
|
3403
|
+
// to keep its count too: a box read "To fill in 1" while its last
|
|
3404
|
+
// field already had a value and the host's submit read ready.
|
|
3405
|
+
var headerCount = readOnly ? count : (orderedRows.filter(function (entry) { return getOptionBucket(entry.name, entry.hidden) === box.key; }).length);
|
|
3406
|
+
// Optional's own rule first: a box opened solely to reveal
|
|
3407
|
+
// preselected rows offers those, not an arbitrary first-N.
|
|
3408
|
+
var candidateRows = splitForPreselected ? orderedRows.filter(isPreselectedRow) : orderedRows;
|
|
3409
|
+
// …then the cap applies to whatever that left.
|
|
3410
|
+
var capped = maxFieldsShown !== undefined && candidateRows.length > maxFieldsShown;
|
|
3411
|
+
var shownRows = capped ? candidateRows.slice(0, maxFieldsShown) : candidateRows;
|
|
3412
|
+
var shownRowSet = new Set(shownRows.map(function (entry) { return entry.name; }));
|
|
3413
|
+
// Everything the box holds that is not on show. Once the
|
|
3414
|
+
// reader asks for more they get the whole box — withholding
|
|
3415
|
+
// the non-preselected remainder behind a second control is
|
|
3416
|
+
// the same defect one level down.
|
|
3417
|
+
var deferredRowSet = new Set(orderedRows
|
|
3418
|
+
.filter(function (entry) { return !shownRowSet.has(entry.name); })
|
|
3419
|
+
.map(function (entry) { return entry.name; }));
|
|
3420
|
+
var deferredCount = deferredRowSet.size;
|
|
3421
|
+
var shownGroups = groupsInBox.filter(function (groupName) {
|
|
3422
|
+
return (buckets[box.key][groupName] || []).some(function (entry) {
|
|
3423
|
+
return shownRowSet.has(entry.name);
|
|
3424
|
+
});
|
|
3147
3425
|
});
|
|
3148
|
-
|
|
3149
|
-
|
|
3150
|
-
|
|
3151
|
-
|
|
3152
|
-
|
|
3153
|
-
|
|
3154
|
-
|
|
3155
|
-
|
|
3156
|
-
|
|
3157
|
-
|
|
3158
|
-
|
|
3159
|
-
|
|
3160
|
-
|
|
3161
|
-
|
|
3162
|
-
|
|
3163
|
-
|
|
3164
|
-
|
|
3165
|
-
|
|
3166
|
-
|
|
3167
|
-
|
|
3168
|
-
|
|
3169
|
-
|
|
3170
|
-
|
|
3171
|
-
|
|
3172
|
-
|
|
3173
|
-
|
|
3174
|
-
|
|
3175
|
-
|
|
3176
|
-
|
|
3177
|
-
|
|
3178
|
-
|
|
3179
|
-
|
|
3180
|
-
|
|
3181
|
-
|
|
3182
|
-
|
|
3183
|
-
|
|
3184
|
-
|
|
3185
|
-
|
|
3186
|
-
|
|
3187
|
-
|
|
3188
|
-
|
|
3189
|
-
|
|
3190
|
-
|
|
3191
|
-
|
|
3192
|
-
|
|
3193
|
-
|
|
3194
|
-
|
|
3195
|
-
|
|
3196
|
-
|
|
3197
|
-
|
|
3198
|
-
|
|
3199
|
-
|
|
3200
|
-
|
|
3201
|
-
|
|
3202
|
-
|
|
3203
|
-
|
|
3204
|
-
|
|
3205
|
-
|
|
3206
|
-
|
|
3207
|
-
|
|
3208
|
-
|
|
3209
|
-
|
|
3210
|
-
|
|
3211
|
-
|
|
3212
|
-
|
|
3213
|
-
|
|
3214
|
-
|
|
3215
|
-
|
|
3216
|
-
|
|
3217
|
-
|
|
3218
|
-
|
|
3426
|
+
var deferredGroups = groupsInBox.filter(function (groupName) {
|
|
3427
|
+
return (buckets[box.key][groupName] || []).some(function (entry) { return !shownRowSet.has(entry.name); });
|
|
3428
|
+
});
|
|
3429
|
+
var moreOpen = Boolean(query) || expandedMoreBoxes.includes(box.key);
|
|
3430
|
+
var accent = box.key === 'attention' && readFirstAttentionFaultCount ? cWarning
|
|
3431
|
+
: box.key === 'set' ? cSuccess
|
|
3432
|
+
: cMuted;
|
|
3433
|
+
// The muted "Optional" box reads as a quieter, recessed
|
|
3434
|
+
// surface — a touch darker than the page rather than the
|
|
3435
|
+
// faint grey tint the accent would give.
|
|
3436
|
+
// Calm: every box is the same panel — no recessed one.
|
|
3437
|
+
var boxBg = box.key === 'optional' && !calm ?
|
|
3438
|
+
(0, colors_1.changeDarkness)((0, colors_1.getMainBackgroundColor)(theme), 0.06)
|
|
3439
|
+
: undefined;
|
|
3440
|
+
return ((0, jsx_runtime_1.jsx)(compactRowStyles_1.StyledStatusBox, { "$accent": accent, "$bg": boxBg, "$calm": calm, "$surface": stickyBoxHeaders ?
|
|
3441
|
+
calm ? cPanel
|
|
3442
|
+
: (0, colors_1.getMainBackgroundColor)(theme)
|
|
3443
|
+
: undefined, ref: function (node) {
|
|
3444
|
+
statusBoxRefs.current[box.key] = node;
|
|
3445
|
+
},
|
|
3446
|
+
// Opening arms the reveal; collapsing disarms it, so a
|
|
3447
|
+
// close never scrolls.
|
|
3448
|
+
onCollapseChange: function (collapsed) {
|
|
3449
|
+
return setOpenedStatusBox(collapsed ? undefined : box.key);
|
|
3450
|
+
},
|
|
3451
|
+
// Calm: an ordinary panel — Reqore paints the theme's
|
|
3452
|
+
// panel surface and its hairline edge. The header stays
|
|
3453
|
+
// minimal (no surface or rule of its own); the first
|
|
3454
|
+
// row's hairline is the line under it.
|
|
3455
|
+
flat: !calm, minimal: true,
|
|
3456
|
+
/* The header stays on screen while its own box is
|
|
3457
|
+
being read — see `compactStickyBoxHeaders`. Sticky
|
|
3458
|
+
is bounded by its containing block, so the header
|
|
3459
|
+
leaves with its box and only one is ever pinned. */
|
|
3460
|
+
stickyHeader: stickyBoxHeaders, stickyHeaderOffset: stickyBoxHeaders ? boxStickyOffset : undefined, collapseButtonProps: { flat: true, minimal: true, size: 'small' }, collapsible: true,
|
|
3461
|
+
// Which boxes start closed is the consumer's call
|
|
3462
|
+
// (`compactCollapsedGroups`, default `['optional']`: the
|
|
3463
|
+
// Optional box holds every not-yet-added field, so a form
|
|
3464
|
+
// opens on what is in use). Two rules override it:
|
|
3465
|
+
//
|
|
3466
|
+
// A SEARCH forces every box open — ReqorePanel unmounts
|
|
3467
|
+
// collapsed content, so a match inside a closed box would
|
|
3468
|
+
// be unreachable. (isCollapsed is the panel's controllable
|
|
3469
|
+
// state; manual toggling still works with no query set.)
|
|
3470
|
+
//
|
|
3471
|
+
// The Optional box stays open when it is the ONLY box,
|
|
3472
|
+
// because collapsing it renders a card that looks empty and
|
|
3473
|
+
// broken: an auth profile's Authorization block, whose nine
|
|
3474
|
+
// requirement fields are all optional, showed as a titled
|
|
3475
|
+
// card containing one collapsed "Optional 9" strip and
|
|
3476
|
+
// nothing else. This does not generalise to the other two —
|
|
3477
|
+
// a lone Set box collapsed is a deliberate ask, and its
|
|
3478
|
+
// header still reports what is in there.
|
|
3479
|
+
//
|
|
3480
|
+
// A PRESELECTED row overrides it too: the schema asked
|
|
3481
|
+
// for that field to be visible on a new form, so the
|
|
3482
|
+
// box it lands in opens. The groups it does NOT appear
|
|
3483
|
+
// in stay behind an inner collapse below, so opening
|
|
3484
|
+
// the box reveals the preselected fields without also
|
|
3485
|
+
// dumping every not-yet-added optional field on the
|
|
3486
|
+
// author.
|
|
3487
|
+
isCollapsed: wouldCollapse && !hasPreselectedRows, label: calm ?
|
|
3488
|
+
// One status dot and a word — and only where a
|
|
3489
|
+
// person is needed. The count is a quiet number.
|
|
3490
|
+
(0, jsx_runtime_1.jsxs)(compactRowStyles_1.StyledGroupHeader, { "$calm": true, children: [box.key === 'attention' && readFirstAttentionFaultCount ?
|
|
3491
|
+
(0, jsx_runtime_1.jsx)(compactRowStyles_1.StyledStatusDot, { className: 'options-readfirst-group-dot', "$color": cWarning, "aria-hidden": true })
|
|
3492
|
+
: null, (0, jsx_runtime_1.jsx)(reqore_1.ReqoreP, { effect: { weight: 'bold' }, size: 'normal', children: box.label }), headerCount ?
|
|
3493
|
+
(0, jsx_runtime_1.jsx)(reqore_1.ReqoreSpan, { className: 'options-readfirst-group-count', size: 'small', effect: { opacity: 0.65 }, children: headerCount })
|
|
3494
|
+
: null] })
|
|
3495
|
+
: (0, jsx_runtime_1.jsxs)(compactRowStyles_1.StyledGroupHeader, { children: [(0, jsx_runtime_1.jsx)(reqore_1.ReqoreP, { effect: { weight: 'bold' }, size: 'normal', children: box.label }), headerCount ?
|
|
3496
|
+
(0, jsx_runtime_1.jsx)(reqore_1.ReqoreTag, { size: 'small', minimal: true, compact: true, intent: box.intent, label: String(headerCount) })
|
|
3497
|
+
: null] }), icon: calm ? undefined : box.icon, className: 'options-readfirst-group', padded: false, contentStyle: { padding: calm ? 0 : '4px 4px 6px' }, children: (0, jsx_runtime_1.jsxs)(compactRowStyles_1.StyledGroupBody, __assign({}, groupBodyProps, { className: compactNarrow ? 'readfirst-narrow' : undefined, children: [shownGroups.map(function (groupName) {
|
|
3498
|
+
return renderBoxGroup(box.key, groupName, shownRowSet);
|
|
3499
|
+
}), deferredCount ? renderMoreRow(box.key, deferredCount, moreOpen) : null, deferredCount && moreOpen ?
|
|
3500
|
+
deferredGroups.map(function (groupName) {
|
|
3501
|
+
return renderBoxGroup(box.key, groupName, deferredRowSet);
|
|
3502
|
+
})
|
|
3503
|
+
: null] })) }, box.key));
|
|
3504
|
+
})] })), commitMode === 'batched' && !readOnly && dirtyOptionNames.length ?
|
|
3219
3505
|
(0, jsx_runtime_1.jsx)(StyledCommitDock, { "$bg": cBg, "$border": cDivider, children: (0, jsx_runtime_1.jsxs)(reqore_1.ReqoreControlGroup, { className: 'options-readfirst-commitbar', verticalAlign: 'center', wrap: true, children: [(0, jsx_runtime_1.jsx)(reqore_1.ReqoreTag, { size: 'tiny', minimal: true, flat: true, compact: true, effect: { uppercase: true, spaced: 1 }, intent: 'warning', icon: 'EditLine', label: feWords.unsavedChanges(dirtyOptionNames.length) }), validityData.isValid ? null : ((0, jsx_runtime_1.jsx)(reqore_1.ReqoreTag, { size: 'tiny', minimal: true, flat: true, wrap: true, intent: 'danger', icon: 'ErrorWarningLine', className: 'options-readfirst-commit-blocked', label: (0, readFirst_1.describeBlockedSave)(validityData.invalidFields, options) })), (0, jsx_runtime_1.jsx)(reqore_1.ReqoreButton, { size: 'small', intent: 'success', icon: 'CheckLine', fixed: true, className: 'options-readfirst-save', disabled: !validityData.isValid, tooltip: validityData.isValid ? feWords.applyChanges : feWords.resolveInvalid, onClick: handleCommitClick, children: feWords.save }), (0, jsx_runtime_1.jsx)(reqore_1.ReqoreButton, { size: 'small', minimal: true, flat: true, fixed: true, icon: 'HistoryLine', className: 'options-readfirst-discard', onClick: handleRevertChangesClick, children: feWords.discard })] }) })
|
|
3220
3506
|
: null] }) })] }) }) }));
|
|
3221
3507
|
};
|
|
@@ -3252,7 +3538,7 @@ var FormEngineImpl = function (_a) {
|
|
|
3252
3538
|
return renderCompact();
|
|
3253
3539
|
}
|
|
3254
3540
|
return ((0, jsx_runtime_1.jsx)(optionsContext_1.OptionsContext.Provider, { value: { schema: options, value: availableOptions }, children: (0, jsx_runtime_1.jsxs)(reqore_1.ReqoreErrorBoundary, { children: [showHelpForOption && ((0, jsx_runtime_1.jsx)(OptionsHelpDialog_1.OptionsHelpDialog, { onClose: function () { return setShowHelpForOption(undefined); }, option: options[showHelpForOption] })), recordRequiresSearchOptions && !readOnly ?
|
|
3255
|
-
(0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(reqore_1.ReqoreMessage, { intent: 'info', children: feWords.searchOptionsRequired }), (0, jsx_runtime_1.jsx)(reqore_1.ReqoreVerticalSpacer, { height: 10 })] })
|
|
3541
|
+
(0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(reqore_1.ReqoreMessage, { intent: (0, formAppearance_1.calmNoteIntent)('info', calm), children: feWords.searchOptionsRequired }), (0, jsx_runtime_1.jsx)(reqore_1.ReqoreVerticalSpacer, { height: 10 })] })
|
|
3256
3542
|
: null, (0, jsx_runtime_1.jsx)(reqore_1.ReqoreCollection, __assign({ minColumnWidth: '350px', flat: true, padded: false, minimal: true }, rest, { label: compact ? undefined : rest.label, responsiveTitle: false, inputProps: {
|
|
3257
3543
|
disabled: (0, size_1.default)(availableOptions) < 2,
|
|
3258
3544
|
}, labelSize: 4, filterable: 'filterable' in rest ? rest.filterable : !compact, sortable: 'sortable' in rest ? rest.sortable : !compact && (0, size_1.default)(availableOptions) > 1, defaultSortBy: null, contentRenderer: function (children) { return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, size_1.default)(validityData.invalidFields) && !readOnly ?
|
|
@@ -3264,7 +3550,7 @@ var FormEngineImpl = function (_a) {
|
|
|
3264
3550
|
: null, (0, jsx_runtime_1.jsx)(HiddenFieldsNote_1.HiddenFieldsNote, { fields: hiddenFieldsWithValues }), children, (0, size_1.default)(filteredOptions) >= 1 && !readOnly ?
|
|
3265
3551
|
(0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(reqore_1.ReqoreVerticalSpacer, { height: 10 }), (0, jsx_runtime_1.jsx)(Select_1.SelectFormField, { items: optionalFields, onChange: function (val) { return handleAddOptionalFieldChange('options', val); }, placeholder: placeholder || feWords.moreOptions, minimal: true, icon: 'ListView', showDescription: false, fluid: true, size: rest.size })] })
|
|
3266
3552
|
: null] })); }, sortButtonProps: { minimal: true }, showLayoutSwitch: false, style: { width: '100%' }, items: (0, map_1.default)(shownOptions, function (_a, optionName) {
|
|
3267
|
-
var _b, _c, _d, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r
|
|
3553
|
+
var _b, _c, _d, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
|
|
3268
3554
|
var type = _a.type, other = __rest(_a, ["type"]);
|
|
3269
3555
|
return ({
|
|
3270
3556
|
label: ((_b = options[optionName]) === null || _b === void 0 ? void 0 : _b.display_name) || optionName,
|
|
@@ -3280,12 +3566,14 @@ var FormEngineImpl = function (_a) {
|
|
|
3280
3566
|
cursor: 'help',
|
|
3281
3567
|
}
|
|
3282
3568
|
: undefined,
|
|
3283
|
-
onClick: ((
|
|
3569
|
+
onClick: (0, fieldDescription_1.fieldHasLongDescription)(options[optionName]) ?
|
|
3570
|
+
function () { return handleOptionLabelClick(optionName); }
|
|
3571
|
+
: undefined,
|
|
3284
3572
|
},
|
|
3285
|
-
showLabelTooltip: !!((
|
|
3573
|
+
showLabelTooltip: !!((_f = options[optionName]) === null || _f === void 0 ? void 0 : _f.short_desc),
|
|
3286
3574
|
customLabelTooltip: {
|
|
3287
3575
|
delay: 300,
|
|
3288
|
-
content: ((0, jsx_runtime_1.jsx)(Description_1.Description, { longDescription: "".concat((
|
|
3576
|
+
content: ((0, jsx_runtime_1.jsx)(Description_1.Description, { longDescription: "".concat((_g = options[optionName]) === null || _g === void 0 ? void 0 : _g.short_desc).concat((0, fieldDescription_1.fieldHasLongDescription)(options[optionName]) ? feWords.clickToLearnMore : ''), margin: 'none' })),
|
|
3289
3577
|
},
|
|
3290
3578
|
description: showFieldTypes ?
|
|
3291
3579
|
[(0, qorusTypeCatalogue_1.optionTypeWords)(options[optionName], typeName), options[optionName].short_desc]
|
|
@@ -3295,7 +3583,7 @@ var FormEngineImpl = function (_a) {
|
|
|
3295
3583
|
descriptionEffect: {
|
|
3296
3584
|
textSize: '11px',
|
|
3297
3585
|
opacity: optionDescOpacity,
|
|
3298
|
-
underline: ((
|
|
3586
|
+
underline: (0, fieldDescription_1.fieldHasLongDescription)(options[optionName]) ? 'underline dotted #878787' : undefined,
|
|
3299
3587
|
},
|
|
3300
3588
|
customTheme: {
|
|
3301
3589
|
main: 'main:darken:1',
|
|
@@ -3332,7 +3620,7 @@ var FormEngineImpl = function (_a) {
|
|
|
3332
3620
|
menu: [
|
|
3333
3621
|
!readOnly &&
|
|
3334
3622
|
type !== 'code-editor' &&
|
|
3335
|
-
(((
|
|
3623
|
+
(((_h = options[optionName]) === null || _h === void 0 ? void 0 : _h.ui_type) || ((_j = options[optionName]) === null || _j === void 0 ? void 0 : _j.type)) !==
|
|
3336
3624
|
'code-editor' && {
|
|
3337
3625
|
label: feWords.focusedEditing,
|
|
3338
3626
|
icon: 'FullscreenLine',
|
|
@@ -3352,15 +3640,15 @@ var FormEngineImpl = function (_a) {
|
|
|
3352
3640
|
!readOnly &&
|
|
3353
3641
|
other.value &&
|
|
3354
3642
|
!(0, lodash_1.isEqual)(other.value, (0, common_1.getDefaultValue)(options[optionName])) &&
|
|
3355
|
-
!(((
|
|
3643
|
+
!(((_k = options[optionName]) === null || _k === void 0 ? void 0 : _k.disabled) || ((_l = options[optionName]) === null || _l === void 0 ? void 0 : _l.readonly)) && {
|
|
3356
3644
|
label: feWords.removeValue,
|
|
3357
3645
|
icon: 'CloseLine',
|
|
3358
3646
|
className: 'options-item-remove',
|
|
3359
3647
|
onClick: function () { return handleValueChange(optionName, undefined); },
|
|
3360
3648
|
},
|
|
3361
3649
|
!readOnly &&
|
|
3362
|
-
!((
|
|
3363
|
-
!((
|
|
3650
|
+
!((_m = options[optionName]) === null || _m === void 0 ? void 0 : _m.preselected) &&
|
|
3651
|
+
!((_o = options[optionName]) === null || _o === void 0 ? void 0 : _o.required) && {
|
|
3364
3652
|
label: feWords.removeOption,
|
|
3365
3653
|
icon: 'DeleteBinLine',
|
|
3366
3654
|
intent: 'danger',
|
|
@@ -3376,8 +3664,8 @@ var FormEngineImpl = function (_a) {
|
|
|
3376
3664
|
},
|
|
3377
3665
|
],
|
|
3378
3666
|
}),
|
|
3379
|
-
content: ((0, jsx_runtime_1.jsxs)(FocusedEditing_1.FocusedEditing, { isFullscreen: focusedEditing === optionName, onClose: function () { return setFocusedEditing(undefined); }, description: (
|
|
3380
|
-
(0, jsx_runtime_1.jsx)(Description_1.Description, { longDescription: (
|
|
3667
|
+
content: ((0, jsx_runtime_1.jsxs)(FocusedEditing_1.FocusedEditing, { isFullscreen: focusedEditing === optionName, onClose: function () { return setFocusedEditing(undefined); }, description: (_p = options[optionName]) === null || _p === void 0 ? void 0 : _p.display_name, intent: getIntent(optionName, type, other.value, other.op), children: [focusedEditing === optionName ?
|
|
3668
|
+
(0, jsx_runtime_1.jsx)(Description_1.Description, { longDescription: (_q = options[optionName]) === null || _q === void 0 ? void 0 : _q.desc, shortDescription: (_r = options[optionName]) === null || _r === void 0 ? void 0 : _r.short_desc, longDescriptionShownByDefault: true })
|
|
3381
3669
|
: null, renderOption(optionName, __assign({ type: type }, other))] })),
|
|
3382
3670
|
});
|
|
3383
3671
|
}), defaultZoom: 1, zoomable: false, actions: __spreadArray(__spreadArray([], (rest.actions || []).map(function (action) { return (__assign(__assign({}, action), { minimal: true })); }), true), [
|
|
@@ -3415,9 +3703,15 @@ var FormEngineImpl = function (_a) {
|
|
|
3415
3703
|
* hand is how one of them gets missed.
|
|
3416
3704
|
*/
|
|
3417
3705
|
var FormEngine = function (props) {
|
|
3706
|
+
var _a;
|
|
3707
|
+
// The form's own `appearance` wins; without one it follows the form (or the
|
|
3708
|
+
// host's provider) it sits in, so a nested sub-form never changes look
|
|
3709
|
+
// halfway down its parent.
|
|
3710
|
+
var inherited = (0, formAppearance_1.useFormAppearance)();
|
|
3711
|
+
var appearance = (_a = props.appearance) !== null && _a !== void 0 ? _a : inherited;
|
|
3418
3712
|
// what the host knows of references beyond the catalogue, for every chip the form draws (qorus#646)
|
|
3419
3713
|
var referenceNames = (0, react_2.useMemo)(function () { var _a; return (_a = props.templateReferences) !== null && _a !== void 0 ? _a : NO_REFERENCE_NAMES; }, [props.templateReferences]);
|
|
3420
|
-
return ((0, jsx_runtime_1.jsx)(markdownRendererContext_1.MarkdownRendererContext.Provider, { value: props.markdownRenderer, children: (0, jsx_runtime_1.jsx)(typeSentenceForm_1.TypeSentenceFormProvider, { children: (0, jsx_runtime_1.jsx)(referenceNames_1.TemplateReferenceNamesProvider, { value: referenceNames, children: (0, jsx_runtime_1.jsx)(FormEngineImpl, __assign({}, props)) }) }) }));
|
|
3714
|
+
return ((0, jsx_runtime_1.jsx)(markdownRendererContext_1.MarkdownRendererContext.Provider, { value: props.markdownRenderer, children: (0, jsx_runtime_1.jsx)(formAppearance_1.FormAppearanceProvider, { value: appearance, children: (0, jsx_runtime_1.jsx)(typeSentenceForm_1.TypeSentenceFormProvider, { children: (0, jsx_runtime_1.jsx)(referenceNames_1.TemplateReferenceNamesProvider, { value: referenceNames, children: (0, jsx_runtime_1.jsx)(FormEngineImpl, __assign({}, props)) }) }) }) }));
|
|
3421
3715
|
};
|
|
3422
3716
|
exports.FormEngine = FormEngine;
|
|
3423
3717
|
var NO_REFERENCE_NAMES = {};
|