@qoretechnologies/reqraft 0.10.76 → 0.10.77-pr.145.g0df8d34
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 +560 -200
- 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 +7 -0
- package/dist/components/form/engine/compactRowStyles.d.ts.map +1 -1
- package/dist/components/form/engine/compactRowStyles.js +86 -46
- 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/engine/rowPlaces.d.ts +43 -0
- package/dist/components/form/engine/rowPlaces.d.ts.map +1 -0
- package/dist/components/form/engine/rowPlaces.js +163 -0
- package/dist/components/form/engine/rowPlaces.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/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 +9 -1
- package/dist/components/form/fields/object/Object.d.ts.map +1 -1
- package/dist/components/form/fields/object/Object.js +21 -8
- 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 +35 -16
- 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 +13 -6
- 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 +17 -2
- package/dist/components/smartEditor/completionStyle.d.ts.map +1 -1
- package/dist/components/smartEditor/completionStyle.js +32 -4
- 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,13 +145,15 @@ 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");
|
|
156
|
+
var rowPlaces_1 = require("./rowPlaces");
|
|
153
157
|
/** One shared "nothing came down from above" bag. See `inheritedScopeFor`. */
|
|
154
158
|
var NO_INHERITED_SCOPE = Object.freeze({});
|
|
155
159
|
/**
|
|
@@ -672,27 +676,30 @@ var FormEngineImpl = function (_a) {
|
|
|
672
676
|
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
677
|
isValid = _a.isValid, // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
674
678
|
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,
|
|
679
|
+
// Read through the context `FormEngine` provides (resolved there against an
|
|
680
|
+
// inherited appearance); destructured only to keep it out of `rest`.
|
|
681
|
+
_appearance = _a.appearance, // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
675
682
|
// Destructured only to keep it out of `rest` (and so off the DOM). The gutter
|
|
676
683
|
// this prop documents was never implemented: it was passed to the wrap as
|
|
677
684
|
// `$flush`, whose styled template had no interpolation slot, so it has always
|
|
678
685
|
// been a no-op. Removing it from the API is a separate, breaking change —
|
|
679
686
|
// every consumer passing it today already gets the flush layout by default.
|
|
680
687
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
681
|
-
_k = _a.compactFlush,
|
|
688
|
+
_k = _a.compactFlush, // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
682
689
|
// Destructured only to keep it out of `rest` (and so off the DOM). The gutter
|
|
683
690
|
// this prop documents was never implemented: it was passed to the wrap as
|
|
684
691
|
// `$flush`, whose styled template had no interpolation slot, so it has always
|
|
685
692
|
// been a no-op. Removing it from the API is a separate, breaking change —
|
|
686
693
|
// every consumer passing it today already gets the flush layout by default.
|
|
687
694
|
// 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.
|
|
695
|
+
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
696
|
// consumed by the wrapper below, which publishes it to every description this
|
|
690
697
|
// form draws; destructured here only so it cannot reach `rest` and be spread
|
|
691
698
|
// onto a DOM node
|
|
692
699
|
_markdownRenderer = _a.markdownRenderer, // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
693
700
|
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
701
|
// 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"]);
|
|
702
|
+
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
703
|
var feWords = (0, reqraftLabels_1.useReqraftLabels)().formEngine;
|
|
697
704
|
// Built-ins + whatever the consumer declared for its own injected editors.
|
|
698
705
|
var isRendererOnly = (0, react_2.useMemo)(function () { return (0, rendererTypes_1.createRendererOnlyUiTypeCheck)(rendererOnlyUiTypes); }, [JSON.stringify(rendererOnlyUiTypes)]);
|
|
@@ -718,7 +725,7 @@ var FormEngineImpl = function (_a) {
|
|
|
718
725
|
enters the component, so the header, the chips, the messages, the meter and
|
|
719
726
|
the read-first summary cannot disagree about it: every one of them reads
|
|
720
727
|
`options`, and none of them has to know the rule. */
|
|
721
|
-
var
|
|
728
|
+
var _v = (0, react_2.useState)(optionsSchema || undefined), servedOptions = _v[0], setOptions = _v[1];
|
|
722
729
|
var options = (0, react_2.useMemo)(function () { return (0, options_1.resolveDegenerateRequiredGroups)(servedOptions); }, [servedOptions]);
|
|
723
730
|
/* Whether the schema the form holds is the one in force: its host is not waiting behind the skeleton, and a
|
|
724
731
|
schema the host hands down has been taken in (`servedOptions` follows the `options` prop a render later).
|
|
@@ -733,31 +740,47 @@ var FormEngineImpl = function (_a) {
|
|
|
733
740
|
JSON.stringify(optionsSchema || undefined) !== JSON.stringify(servedOptions);
|
|
734
741
|
var schemaInForce = !rest.skeleton && !hostSchemaPending;
|
|
735
742
|
// optionsLoader lifecycle: loading feeds the skeleton gate, error the banner.
|
|
736
|
-
var
|
|
737
|
-
var
|
|
743
|
+
var _w = (0, react_2.useState)(!!optionsLoader && !optionsSchema), optionsLoading = _w[0], setOptionsLoading = _w[1];
|
|
744
|
+
var _x = (0, react_2.useState)(), optionsError = _x[0], setOptionsError = _x[1];
|
|
738
745
|
// Operators: prop-provided (compact) or fetched via operatorsUrl (dpql,
|
|
739
746
|
// ported from IDE Options) — the fetch overrides the seeded prop value.
|
|
740
|
-
var
|
|
747
|
+
var _y = (0, react_2.useState)(operatorsProp), operators = _y[0], setOperators = _y[1];
|
|
741
748
|
// Remote-fetch loading (ported from IDE Options); only relevant when one of
|
|
742
749
|
// the fetch urls is set — schema-as-props consumers never see the skeleton.
|
|
743
|
-
var
|
|
750
|
+
var _z = (0, react_2.useState)(!!(url || customUrl || operatorsUrl)), loading = _z[0], setLoading = _z[1];
|
|
744
751
|
var confirmAction = (0, reqore_1.useReqoreProperty)('confirmAction');
|
|
745
752
|
var theme = (0, reqore_1.useReqoreTheme)();
|
|
746
|
-
var
|
|
747
|
-
var _0 = (0, react_2.useState)(
|
|
753
|
+
var calm = (0, formAppearance_1.useIsCalmForm)();
|
|
754
|
+
var _0 = (0, react_2.useState)(), focusedEditing = _0[0], setFocusedEditing = _0[1];
|
|
755
|
+
var _1 = (0, react_2.useState)(false), showFieldTypes = _1[0], setShowFieldTypes = _1[1];
|
|
748
756
|
// Global toggle (toolbar ⓘ): reveal the short-description info panel on every
|
|
749
757
|
// field that has a short_desc. Per-row ⓘ overrides still win over it.
|
|
750
758
|
// Global field-info visibility, tri-state: `undefined` = default (critical
|
|
751
759
|
// messages auto-open, the rest closed); `true` = show all; `false` = hide all
|
|
752
760
|
// (even message fields). The toolbar ⓘ drives it.
|
|
753
|
-
var
|
|
754
|
-
var
|
|
755
|
-
var
|
|
761
|
+
var _2 = (0, react_2.useState)(undefined), showAllDescriptions = _2[0], setShowAllDescriptions = _2[1];
|
|
762
|
+
var _3 = (0, react_2.useState)(), showHelpForOption = _3[0], setShowHelpForOption = _3[1];
|
|
763
|
+
var _4 = (0, react_2.useState)(false), showInvalidOptionsOnly = _4[0], setShowInvalidOptionsOnly = _4[1];
|
|
756
764
|
// Which options are expanded into their editor (several can be open at once).
|
|
757
|
-
var
|
|
765
|
+
var _5 = (0, react_2.useState)([]), expandedOptions = _5[0], setExpandedOptions = _5[1];
|
|
766
|
+
// The fields the person has opened and left. An empty required field becomes a
|
|
767
|
+
// fault only then (or after a submit attempt, `revealRequired`): a form nobody has
|
|
768
|
+
// touched is not already wrong.
|
|
769
|
+
var _6 = (0, react_2.useState)([]), visitedOptions = _6[0], setVisitedOptions = _6[1];
|
|
770
|
+
var lastExpandedOptions = (0, react_2.useRef)([]);
|
|
771
|
+
(0, react_2.useEffect)(function () {
|
|
772
|
+
var left = lastExpandedOptions.current.filter(function (name) { return !expandedOptions.includes(name); });
|
|
773
|
+
lastExpandedOptions.current = expandedOptions;
|
|
774
|
+
if (left.length) {
|
|
775
|
+
setVisitedOptions(function (prev) {
|
|
776
|
+
var added = left.filter(function (name) { return !prev.includes(name); });
|
|
777
|
+
return added.length ? __spreadArray(__spreadArray([], prev, true), added, true) : prev;
|
|
778
|
+
});
|
|
779
|
+
}
|
|
780
|
+
}, [expandedOptions]);
|
|
758
781
|
/** Status boxes whose "N more fields" control the reader has opened. Keyed by
|
|
759
782
|
box so opening Optional does not also unfold Set. */
|
|
760
|
-
var
|
|
783
|
+
var _7 = (0, react_2.useState)([]), expandedMoreBoxes = _7[0], setExpandedMoreBoxes = _7[1];
|
|
761
784
|
// --- Reveal a status box's content when it is opened ----------------------
|
|
762
785
|
//
|
|
763
786
|
// The status boxes stack, so the last one ("Optional", which holds every
|
|
@@ -773,7 +796,7 @@ var FormEngineImpl = function (_a) {
|
|
|
773
796
|
// box has not grown and there is nothing to scroll to. A layout effect runs
|
|
774
797
|
// after the DOM is updated and before paint, which makes the reveal
|
|
775
798
|
// deterministic instead of a guessed delay.
|
|
776
|
-
var
|
|
799
|
+
var _8 = (0, react_2.useState)(undefined), openedStatusBox = _8[0], setOpenedStatusBox = _8[1];
|
|
777
800
|
var statusBoxRefs = (0, react_2.useRef)({});
|
|
778
801
|
(0, react_2.useLayoutEffect)(function () {
|
|
779
802
|
var _a, _b;
|
|
@@ -802,15 +825,19 @@ var FormEngineImpl = function (_a) {
|
|
|
802
825
|
// stays put when its status flips (e.g. becomes valid) instead of jumping to
|
|
803
826
|
// another box mid-edit and stealing focus. Keyed by option name.
|
|
804
827
|
var settledBucket = (0, react_2.useRef)({});
|
|
828
|
+
// Each row's own node, drawn into once and moved between the boxes (`rowPlaces`)
|
|
829
|
+
var rowHosts = (0, rowPlaces_1.useRowHosts)();
|
|
830
|
+
// Which boxes are open, so a collapsed box's rows are not drawn (`rowPlaces`)
|
|
831
|
+
var openBoxes = (0, rowPlaces_1.useOpenBoxes)();
|
|
805
832
|
// Measured form width (not viewport — the form lives in drawers/panels of
|
|
806
833
|
// arbitrary width) drives the stacked narrow layout.
|
|
807
|
-
var
|
|
834
|
+
var _9 = (0, react_use_1.useMeasure)(), compactWrapRef = _9[0], compactWrapWidth = _9[1].width;
|
|
808
835
|
// Own handle on the scroll wrap (useMeasure's ref is a callback, no `.current`)
|
|
809
836
|
// so the label-column measurement can publish its CSS var on the element. It's
|
|
810
837
|
// STATE, not a ref: the wrap mounts only after the loading-skeleton gate
|
|
811
838
|
// resolves, so the measurement effect must re-run when the node appears — a
|
|
812
839
|
// ref wouldn't retrigger it.
|
|
813
|
-
var
|
|
840
|
+
var _10 = (0, react_2.useState)(null), compactWrapNode = _10[0], setCompactWrapNode = _10[1];
|
|
814
841
|
// Ref mirror of the wrap node for callbacks that must not re-create when it
|
|
815
842
|
// mounts (flashOptions reads it inside a rAF).
|
|
816
843
|
var compactWrapNodeRef = (0, react_2.useRef)(null);
|
|
@@ -826,7 +853,7 @@ var FormEngineImpl = function (_a) {
|
|
|
826
853
|
/* The label column the rows are laid out with: measured from the labels (see below), the
|
|
827
854
|
default until it is. A form stacks its rows where its value column would be too narrow
|
|
828
855
|
beside it (`isCompactNarrow`), not at one form width whatever its labels are. */
|
|
829
|
-
var
|
|
856
|
+
var _11 = (0, react_2.useState)(compactRowStyles_1.COMPACT_LABEL_COL), compactLabelColumn = _11[0], setCompactLabelColumn = _11[1];
|
|
830
857
|
// the label column holds a finger's help button where the pointer is a finger (`labelAffordanceWidth`)
|
|
831
858
|
var coarsePointer = (0, useCoarsePointer_1.useCoarsePointer)();
|
|
832
859
|
var compactNarrow = !!compactWrapWidth && (0, compactRowStyles_1.isCompactNarrow)(compactWrapWidth, compactLabelColumn);
|
|
@@ -844,7 +871,7 @@ var FormEngineImpl = function (_a) {
|
|
|
844
871
|
a search row and a field picker that each hide themselves when they have
|
|
845
872
|
nothing to say, and what is left wraps differently at every form width.
|
|
846
873
|
Zero when this form draws no toolbar at all. */
|
|
847
|
-
var
|
|
874
|
+
var _12 = (0, react_2.useState)(0), compactToolbarHeight = _12[0], setCompactToolbarHeight = _12[1];
|
|
848
875
|
(0, react_2.useLayoutEffect)(function () {
|
|
849
876
|
var wrap = compactWrapNode;
|
|
850
877
|
if (!compact || !wrap || compactNested || !compactStickyBoxHeaders) {
|
|
@@ -884,6 +911,38 @@ var FormEngineImpl = function (_a) {
|
|
|
884
911
|
the ResizeObserver never fires and a stale 124px would go on offsetting
|
|
885
912
|
the box headers below a toolbar that is no longer there. */
|
|
886
913
|
}, [compact, compactNested, compactStickyBoxHeaders, compactNarrow, compactWrapNode, options]);
|
|
914
|
+
/* The colour a calm form sits on, for its pinned toolbar's glass.
|
|
915
|
+
|
|
916
|
+
A calm form has no surface of its own, so the toolbar has to paint one to
|
|
917
|
+
keep the rows that scroll under it from showing through the meter and the
|
|
918
|
+
search — and it has to be the host's colour, or it draws a band across the
|
|
919
|
+
form before anything has moved. The host is whatever paints first above the
|
|
920
|
+
form: the page, a drawer's panel surface, a card. Read once it mounts (and
|
|
921
|
+
when the theme changes), not assumed from the theme's main colour. */
|
|
922
|
+
var _13 = (0, react_2.useState)(), compactHostColour = _13[0], setCompactHostColour = _13[1];
|
|
923
|
+
(0, react_2.useLayoutEffect)(function () {
|
|
924
|
+
if (!calm || !compact || compactNested || !compactWrapNode) {
|
|
925
|
+
setCompactHostColour(undefined);
|
|
926
|
+
return;
|
|
927
|
+
}
|
|
928
|
+
var _loop_1 = function (node) {
|
|
929
|
+
var _a = (getComputedStyle(node).backgroundColor.match(/[\d.]+/g) || [])
|
|
930
|
+
.slice(0, 4)
|
|
931
|
+
.map(Number), r = _a[0], g = _a[1], b = _a[2], _b = _a[3], alpha = _b === void 0 ? 1 : _b;
|
|
932
|
+
if (alpha > 0 && b !== undefined) {
|
|
933
|
+
setCompactHostColour(function (prev) {
|
|
934
|
+
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];
|
|
935
|
+
});
|
|
936
|
+
return { value: void 0 };
|
|
937
|
+
}
|
|
938
|
+
};
|
|
939
|
+
for (var node = compactWrapNode.parentElement; node; node = node.parentElement) {
|
|
940
|
+
var state_1 = _loop_1(node);
|
|
941
|
+
if (typeof state_1 === "object")
|
|
942
|
+
return state_1.value;
|
|
943
|
+
}
|
|
944
|
+
setCompactHostColour(undefined);
|
|
945
|
+
}, [calm, compact, compactNested, compactWrapNode, theme]);
|
|
887
946
|
// Global label-column sizing: size the label column to the WIDEST field label
|
|
888
947
|
// across the whole form, clamped to [MIN, MAX], and publish it as a CSS var on
|
|
889
948
|
// the scroll wrap. Both the grid column and the value-surface offsets read the
|
|
@@ -932,8 +991,8 @@ var FormEngineImpl = function (_a) {
|
|
|
932
991
|
var readRowHeights = (0, react_2.useRef)({});
|
|
933
992
|
// Required-groups linkage: hovering a group chip highlights every member row;
|
|
934
993
|
// clicking a sibling in the chip's popover scrolls to it and flashes it.
|
|
935
|
-
var
|
|
936
|
-
var
|
|
994
|
+
var _14 = (0, react_2.useState)([]), highlightedOptions = _14[0], setHighlightedOptions = _14[1];
|
|
995
|
+
var _15 = (0, react_2.useState)([]), flashedOptions = _15[0], setFlashedOptions = _15[1];
|
|
937
996
|
var flashTimeout = (0, react_2.useRef)();
|
|
938
997
|
var flashOptions = (0, react_2.useCallback)(function (optionNames, scrollToFirst) {
|
|
939
998
|
if (scrollToFirst === void 0) { scrollToFirst = false; }
|
|
@@ -968,33 +1027,34 @@ var FormEngineImpl = function (_a) {
|
|
|
968
1027
|
// Follow a field across panels: when its status bucket changes — e.g. you fill
|
|
969
1028
|
// an optional field and it jumps to Set / Needs attention — scroll to its new
|
|
970
1029
|
// row and flash it so it's easy to keep track of. `settledBucket` holds each
|
|
971
|
-
// field's current panel
|
|
972
|
-
//
|
|
973
|
-
//
|
|
974
|
-
//
|
|
1030
|
+
// field's current panel, so diffing it after every render catches the move the
|
|
1031
|
+
// instant it lands in the new panel. A field being edited moves as its value
|
|
1032
|
+
// does - the first character typed into an empty required field takes it to Set,
|
|
1033
|
+
// the caret with it (`rowPlaces`) - and is followed the same way. Runs every
|
|
1034
|
+
// render; the diff is cheap and only fires a scroll on an ACTUAL move.
|
|
975
1035
|
var prevSettledBucket = (0, react_2.useRef)({});
|
|
976
1036
|
(0, react_2.useEffect)(function () {
|
|
977
1037
|
if (!compact)
|
|
978
1038
|
return;
|
|
979
1039
|
var cur = settledBucket.current;
|
|
980
1040
|
var prev = prevSettledBucket.current;
|
|
981
|
-
var moved = Object.keys(cur).find(function (name) { return prev[name] && prev[name] !== cur[name]
|
|
1041
|
+
var moved = Object.keys(cur).find(function (name) { return prev[name] && prev[name] !== cur[name]; });
|
|
982
1042
|
prevSettledBucket.current = __assign({}, cur);
|
|
983
1043
|
if (moved) {
|
|
984
1044
|
flashOptions([moved], true);
|
|
985
1045
|
}
|
|
986
1046
|
});
|
|
987
1047
|
// Info panels auto-open on Tier-1 content; the per-row user override sticks.
|
|
988
|
-
var
|
|
1048
|
+
var _16 = (0, react_2.useState)({}), infoPanelOverrides = _16[0], setInfoPanelOverrides = _16[1];
|
|
989
1049
|
// Toolbar filters affect the listed rows only — the meter reflects the full set.
|
|
990
|
-
var
|
|
991
|
-
var
|
|
1050
|
+
var _17 = (0, react_2.useState)(false), requiredOnly = _17[0], setRequiredOnly = _17[1];
|
|
1051
|
+
var _18 = (0, react_2.useState)(''), compactQuery = _18[0], setCompactQuery = _18[1];
|
|
992
1052
|
// Compact field sort (Fields menu → "Sort by"); 'schema' = declared order.
|
|
993
|
-
var
|
|
994
|
-
var
|
|
1053
|
+
var _19 = (0, react_2.useState)('schema'), compactSort = _19[0], setCompactSort = _19[1];
|
|
1054
|
+
var _20 = (0, react_2.useState)(function () { return ({
|
|
995
1055
|
fields: (0, exports.fixOptions)(value, options || {}, undefined, isRendererOnly),
|
|
996
1056
|
meta: undefined,
|
|
997
|
-
}); }), localValue =
|
|
1057
|
+
}); }), localValue = _20[0], setLocalValue = _20[1];
|
|
998
1058
|
var originalValue = (0, react_2.useRef)();
|
|
999
1059
|
// Track the last value we emitted via onChange so we can skip re-applying fixOptions
|
|
1000
1060
|
// when the parent echoes it back as the new value prop (controlled component loop prevention)
|
|
@@ -1052,7 +1112,7 @@ var FormEngineImpl = function (_a) {
|
|
|
1052
1112
|
originalValue.current = localValue.fields;
|
|
1053
1113
|
}
|
|
1054
1114
|
var unavailableOptionsCount = (0, react_2.useRef)(0);
|
|
1055
|
-
var
|
|
1115
|
+
var _21 = (0, useQorusTypes_1.useQorusTypes)(), compactValue = _21.compactValue, typesLoading = _21.loading;
|
|
1056
1116
|
// an option's type in words, while the form shows field types (qorus#646: it said the type's code, `<string>`)
|
|
1057
1117
|
var typeName = (0, typeSentenceForm_1.useTypeName)();
|
|
1058
1118
|
var templates = (0, useTemplates_1.useTemplates)(allowTemplates, stringTemplates, interfaceContext);
|
|
@@ -1795,6 +1855,11 @@ var FormEngineImpl = function (_a) {
|
|
|
1795
1855
|
return newValue;
|
|
1796
1856
|
}
|
|
1797
1857
|
if (showInvalidOptionsOnly &&
|
|
1858
|
+
// An open row stays while the reader is in it, as its box does
|
|
1859
|
+
// (`stableBucketOf`): the first character typed into an empty required
|
|
1860
|
+
// field makes it valid, and hiding it then would pull the field out
|
|
1861
|
+
// from under the caret mid-word.
|
|
1862
|
+
!expandedOptions.includes(optionName) &&
|
|
1798
1863
|
isOptionValid(optionName, (0, exports.getOptionFieldStorageType)(optionName, option.type, options, operators, option.op, isRendererOnly, optionHoldsExpression(option)), option.value)) {
|
|
1799
1864
|
return newValue;
|
|
1800
1865
|
}
|
|
@@ -1803,6 +1868,7 @@ var FormEngineImpl = function (_a) {
|
|
|
1803
1868
|
}, [
|
|
1804
1869
|
dependencyLockedNames,
|
|
1805
1870
|
showInvalidOptionsOnly,
|
|
1871
|
+
expandedOptions,
|
|
1806
1872
|
isRendererOnly,
|
|
1807
1873
|
JSON.stringify(availableOptions),
|
|
1808
1874
|
JSON.stringify(options),
|
|
@@ -1858,8 +1924,17 @@ var FormEngineImpl = function (_a) {
|
|
|
1858
1924
|
covered: covered,
|
|
1859
1925
|
invalid: invalid,
|
|
1860
1926
|
warned: msgIntent === 'warning',
|
|
1927
|
+
// a one-of member, once anyone has been to its group (`hasBeenToTheField`)
|
|
1928
|
+
visited: (0, readFirst_1.hasBeenToTheField)(name, {
|
|
1929
|
+
visitedOptions: visitedOptions,
|
|
1930
|
+
revealRequired: revealRequired,
|
|
1931
|
+
requiredGroups: reqGroups,
|
|
1932
|
+
groupMembers: requiredGroupsInfo.members,
|
|
1933
|
+
}),
|
|
1861
1934
|
});
|
|
1862
1935
|
}, [
|
|
1936
|
+
revealRequired,
|
|
1937
|
+
visitedOptions,
|
|
1863
1938
|
isRendererOnly,
|
|
1864
1939
|
JSON.stringify(options),
|
|
1865
1940
|
JSON.stringify(availableOptions),
|
|
@@ -1889,6 +1964,37 @@ var FormEngineImpl = function (_a) {
|
|
|
1889
1964
|
// a hidden field (its `depends_on` does not hold) is not in the form, nor in its counts
|
|
1890
1965
|
function (name) { return !dependencyLockedNames.includes(name) && getOptionBucket(name) === 'attention'; }).length;
|
|
1891
1966
|
}, [JSON.stringify(availableOptions), getOptionBucket, dependencyLockedNames]);
|
|
1967
|
+
// How many of those are faults rather than only still to fill in (`pending`). Zero
|
|
1968
|
+
// on a new form, so its first box reads "To fill in" without amber.
|
|
1969
|
+
var readFirstAttentionFaultCount = (0, react_2.useMemo)(function () {
|
|
1970
|
+
return Object.keys(availableOptions || {}).filter(function (name) { return getOptionBucket(name) === 'attention' && getOptionStatus(name) !== 'pending'; }).length;
|
|
1971
|
+
}, [JSON.stringify(availableOptions), getOptionBucket, getOptionStatus]);
|
|
1972
|
+
/* Fields whose value fails but that are not in the first box: an optional field its host says is wrong
|
|
1973
|
+
(`invalid_reason`) stays among the optional ones. They make the form "Incomplete", so the readiness line counts
|
|
1974
|
+
them with the faults: it said "Incomplete" and nothing else, with nothing to tell the reader what. */
|
|
1975
|
+
var readFirstFaultsOutsideBox = (0, react_2.useMemo)(function () {
|
|
1976
|
+
return validityData.invalidFields.filter(function (_a) {
|
|
1977
|
+
var fieldName = _a.fieldName;
|
|
1978
|
+
return !!(availableOptions === null || availableOptions === void 0 ? void 0 : availableOptions[fieldName]) &&
|
|
1979
|
+
!dependencyLockedNames.includes(fieldName) &&
|
|
1980
|
+
getOptionBucket(fieldName) !== 'attention';
|
|
1981
|
+
}).length;
|
|
1982
|
+
}, [validityData, JSON.stringify(availableOptions), dependencyLockedNames, getOptionBucket]);
|
|
1983
|
+
// The same two numbers, to a host that draws its own submit control from them.
|
|
1984
|
+
var onAttentionChangeRef = (0, react_2.useRef)(onAttentionChange);
|
|
1985
|
+
onAttentionChangeRef.current = onAttentionChange;
|
|
1986
|
+
// What the host found wrong outside the fields: in the line and in what the host is told.
|
|
1987
|
+
var outsideAttentionCount = Math.max(0, (_b = outsideAttention === null || outsideAttention === void 0 ? void 0 : outsideAttention.count) !== null && _b !== void 0 ? _b : 0);
|
|
1988
|
+
(0, react_2.useEffect)(function () {
|
|
1989
|
+
var _a;
|
|
1990
|
+
/* The line's numbers, to the one: a field its host says is wrong outside the first box (`readFirstFaultsOutsideBox`)
|
|
1991
|
+
is counted in the line, and so in what the host is told - the host's submit read ready while the line said
|
|
1992
|
+
"Incomplete · 1 need attention". */
|
|
1993
|
+
(_a = onAttentionChangeRef.current) === null || _a === void 0 ? void 0 : _a.call(onAttentionChangeRef, {
|
|
1994
|
+
count: readFirstAttentionCount + readFirstFaultsOutsideBox + outsideAttentionCount,
|
|
1995
|
+
faults: readFirstAttentionFaultCount + readFirstFaultsOutsideBox + outsideAttentionCount,
|
|
1996
|
+
});
|
|
1997
|
+
}, [readFirstAttentionCount, readFirstAttentionFaultCount, readFirstFaultsOutsideBox, outsideAttentionCount]);
|
|
1892
1998
|
var getIntent = (0, react_2.useCallback)(
|
|
1893
1999
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
1894
2000
|
function (optName, type, optValue, _op) {
|
|
@@ -2159,7 +2265,7 @@ var FormEngineImpl = function (_a) {
|
|
|
2159
2265
|
}
|
|
2160
2266
|
hasAutoFocusedRef.current = true;
|
|
2161
2267
|
var entered = event.target;
|
|
2162
|
-
if ((0,
|
|
2268
|
+
if ((0, rowFocus_2.isTypingControl)(entered)) {
|
|
2163
2269
|
return;
|
|
2164
2270
|
}
|
|
2165
2271
|
var target = firstAttentionRow();
|
|
@@ -2187,6 +2293,48 @@ var FormEngineImpl = function (_a) {
|
|
|
2187
2293
|
compactWrapNode.removeEventListener('focusin', onFocusIn);
|
|
2188
2294
|
};
|
|
2189
2295
|
}, [autoFocusFirstRequired, compact, compactWrapNode]);
|
|
2296
|
+
// A submit that could not go is answered with where to type: each new
|
|
2297
|
+
// `focusAttentionRequest` opens the first field that needs attention and puts the
|
|
2298
|
+
// caret in it. The host's submit button holds the caret at that moment, and an open
|
|
2299
|
+
// row never takes a caret held outside it (CompactRow), so the button lets go of it
|
|
2300
|
+
// here first; the person asked to submit, and this is the answer to that. It picks
|
|
2301
|
+
// the field the arrival scan above would (`firstAttentionRow`), and spends that scan:
|
|
2302
|
+
// the person has been taken to a field now.
|
|
2303
|
+
var lastFocusRequest = (0, react_2.useRef)(focusAttentionRequest);
|
|
2304
|
+
(0, react_2.useEffect)(function () {
|
|
2305
|
+
var _a;
|
|
2306
|
+
if (focusAttentionRequest === lastFocusRequest.current) {
|
|
2307
|
+
return;
|
|
2308
|
+
}
|
|
2309
|
+
lastFocusRequest.current = focusAttentionRequest;
|
|
2310
|
+
if (!focusAttentionRequest || !compact || !options) {
|
|
2311
|
+
return;
|
|
2312
|
+
}
|
|
2313
|
+
var target = firstAttentionRow();
|
|
2314
|
+
if (!target) {
|
|
2315
|
+
return;
|
|
2316
|
+
}
|
|
2317
|
+
hasAutoFocusedRef.current = true;
|
|
2318
|
+
var wrap = compactWrapNodeRef.current;
|
|
2319
|
+
var active = document.activeElement;
|
|
2320
|
+
if (active && active !== document.body && !(wrap === null || wrap === void 0 ? void 0 : wrap.contains(active))) {
|
|
2321
|
+
active.blur();
|
|
2322
|
+
}
|
|
2323
|
+
if (!expandedOptions.includes(target)) {
|
|
2324
|
+
// The row's own open effect reveals it and takes the caret.
|
|
2325
|
+
openFirstAttentionRow(target);
|
|
2326
|
+
return;
|
|
2327
|
+
}
|
|
2328
|
+
// Already open (the field the form opened on arrival): its open effect has run,
|
|
2329
|
+
// so the caret goes to its control here.
|
|
2330
|
+
var row = wrap === null || wrap === void 0 ? void 0 : wrap.querySelector("[data-field=\"".concat(target, "\"]"));
|
|
2331
|
+
if (row) {
|
|
2332
|
+
(0, revealRow_1.revealRow)(row, 'auto');
|
|
2333
|
+
(_a = (0, rowFocus_1.findRowFocusTarget)(row.querySelector('.options-readfirst-row-editor'), {
|
|
2334
|
+
textEntryOnly: row.classList.contains('options-readfirst-card'),
|
|
2335
|
+
})) === null || _a === void 0 ? void 0 : _a.focus({ preventScroll: true });
|
|
2336
|
+
}
|
|
2337
|
+
}, [focusAttentionRequest]);
|
|
2190
2338
|
// Read-first completion summary (how many shown options have a value set),
|
|
2191
2339
|
// surfaced as a progress meter at the top of the compact form.
|
|
2192
2340
|
var readFirstCompletion = (0, react_2.useMemo)(function () {
|
|
@@ -2362,7 +2510,7 @@ var FormEngineImpl = function (_a) {
|
|
|
2362
2510
|
return null;
|
|
2363
2511
|
var items = schemaMsgs.map(function (_a, index) {
|
|
2364
2512
|
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',
|
|
2513
|
+
return ((0, jsx_runtime_1.jsx)(reqore_1.ReqoreMessage, { intent: (0, formAppearance_1.calmNoteIntent)(intent, calm), title: title, opaque: false, size: 'small',
|
|
2366
2514
|
// Compact: flat (no border) to match the read-row info panels;
|
|
2367
2515
|
// classic forms keep the bordered, bottom-margined message.
|
|
2368
2516
|
flat: compact || undefined, margin: compact ? undefined : 'bottom', children: content }, title || index));
|
|
@@ -2462,7 +2610,10 @@ var FormEngineImpl = function (_a) {
|
|
|
2462
2610
|
readOnly ||
|
|
2463
2611
|
!(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
2612
|
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
|
|
2613
|
+
: 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,
|
|
2614
|
+
// Open is not left: a field the form opened for typing (the first empty
|
|
2615
|
+
// one, on a new form) says what it needs without already being wrong.
|
|
2616
|
+
requirementPending: !(revealRequired || visitedOptions.includes(optionName)) }), operators && (0, size_1.default)(operators) && (0, size_1.default)(other.op) ?
|
|
2466
2617
|
(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
2618
|
label: (optionSchema === null || optionSchema === void 0 ? void 0 : optionSchema.display_name) || optionName,
|
|
2468
2619
|
operatorKeys: operatorParts,
|
|
@@ -2496,10 +2647,12 @@ var FormEngineImpl = function (_a) {
|
|
|
2496
2647
|
getTypeForOption,
|
|
2497
2648
|
inheritedScopes,
|
|
2498
2649
|
inheritedFromParent,
|
|
2650
|
+
revealRequired,
|
|
2651
|
+
visitedOptions,
|
|
2499
2652
|
]);
|
|
2500
2653
|
// Compact (read-first) rendering.
|
|
2501
2654
|
// Theme-derived colors so the flat-row layout adapts to light/dark/custom themes.
|
|
2502
|
-
var cText = (
|
|
2655
|
+
var cText = (0, formAppearance_1.getThemeTextColour)(theme, '#f1f0ee');
|
|
2503
2656
|
// Text emphasis tiers via reqore's readable-color helper (key = full readable
|
|
2504
2657
|
// text, muted = its dimmed variant, faint = the dimmed variant softened
|
|
2505
2658
|
// further) instead of hand-rolled hex-alpha suffixes on the raw text color.
|
|
@@ -2508,8 +2661,10 @@ var FormEngineImpl = function (_a) {
|
|
|
2508
2661
|
var cFaint = "".concat(cMuted, "99");
|
|
2509
2662
|
var cDivider = "".concat(cText, "14");
|
|
2510
2663
|
var cHover = "".concat(cText, "0d");
|
|
2511
|
-
|
|
2512
|
-
|
|
2664
|
+
// Calm: the intents as words that read on the section surface, not the
|
|
2665
|
+
// theme's fills (see `getCalmIntentText`). Dots and edges take them too.
|
|
2666
|
+
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';
|
|
2667
|
+
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
2668
|
var cInfo = ((_f = theme === null || theme === void 0 ? void 0 : theme.intents) === null || _f === void 0 ? void 0 : _f.info) || '#3b8eea';
|
|
2514
2669
|
var cSuccess = ((_g = theme === null || theme === void 0 ? void 0 : theme.intents) === null || _g === void 0 ? void 0 : _g.success) || '#36b37e';
|
|
2515
2670
|
// the rows' own words and marks, in colors that read on every surface a row is drawn on
|
|
@@ -2527,6 +2682,10 @@ var FormEngineImpl = function (_a) {
|
|
|
2527
2682
|
// The "N more fields" row's dashed edge. Well above the divider tint: this
|
|
2528
2683
|
// one is an affordance the reader has to notice, not a hairline between rows.
|
|
2529
2684
|
var cMoreBorder = "".concat(cText, "4d");
|
|
2685
|
+
// Calm: the section surface and its hairline, from the theme's panel (the
|
|
2686
|
+
// same surface and edge Reqore gives the section panels themselves).
|
|
2687
|
+
var cPanel = (0, formAppearance_1.getCalmPanelSurface)(theme);
|
|
2688
|
+
var cHairline = (0, formAppearance_1.getCalmPanelHairline)(theme);
|
|
2530
2689
|
// The closure surface the extracted CompactRow reads through context. Refs and
|
|
2531
2690
|
// setters are stable; the state/memo/handler fields change identity as they do
|
|
2532
2691
|
// today, so a row re-renders exactly when its inputs do.
|
|
@@ -2546,6 +2705,8 @@ var FormEngineImpl = function (_a) {
|
|
|
2546
2705
|
cardEditorTypes: cardEditorTypes,
|
|
2547
2706
|
showAllDescriptions: showAllDescriptions,
|
|
2548
2707
|
expandedOptions: expandedOptions,
|
|
2708
|
+
visitedOptions: visitedOptions,
|
|
2709
|
+
revealRequired: revealRequired,
|
|
2549
2710
|
highlightedOptions: highlightedOptions,
|
|
2550
2711
|
flashedOptions: flashedOptions,
|
|
2551
2712
|
infoPanelOverrides: infoPanelOverrides,
|
|
@@ -2598,6 +2759,8 @@ var FormEngineImpl = function (_a) {
|
|
|
2598
2759
|
cardEditorTypes,
|
|
2599
2760
|
showAllDescriptions,
|
|
2600
2761
|
expandedOptions,
|
|
2762
|
+
visitedOptions,
|
|
2763
|
+
revealRequired,
|
|
2601
2764
|
highlightedOptions,
|
|
2602
2765
|
flashedOptions,
|
|
2603
2766
|
infoPanelOverrides,
|
|
@@ -2641,13 +2804,22 @@ var FormEngineImpl = function (_a) {
|
|
|
2641
2804
|
var compactToolbarParts = (0, react_2.useMemo)(function () {
|
|
2642
2805
|
if (compactToolbar === false)
|
|
2643
2806
|
return null;
|
|
2807
|
+
// A calm sub-form nested in a row (a list item, a hash field) draws only its
|
|
2808
|
+
// fields. Its readiness is said once, by the item it sits in, and each row
|
|
2809
|
+
// says what it lacks; a search over two to six fields helps nobody, and one
|
|
2810
|
+
// per item stacked a second search box under the form's own for every item.
|
|
2811
|
+
if (calm && compactNested)
|
|
2812
|
+
return null;
|
|
2644
2813
|
var all = { completion: true, search: true, fields: true, help: true };
|
|
2645
2814
|
return compactToolbar === true ? all : __assign(__assign({}, all), compactToolbar);
|
|
2646
|
-
}, [JSON.stringify(compactToolbar)]);
|
|
2815
|
+
}, [JSON.stringify(compactToolbar), calm, compactNested]);
|
|
2647
2816
|
var compactToolbarContextValue = (0, react_2.useMemo)(function () { return ({
|
|
2648
2817
|
readOnly: readOnly,
|
|
2649
2818
|
invalidCount: (0, size_1.default)(validityData.invalidFields),
|
|
2650
|
-
attentionCount: readFirstAttentionCount,
|
|
2819
|
+
attentionCount: readFirstAttentionCount + readFirstFaultsOutsideBox,
|
|
2820
|
+
attentionFaultCount: readFirstAttentionFaultCount + readFirstFaultsOutsideBox,
|
|
2821
|
+
outsideAttentionCount: outsideAttentionCount,
|
|
2822
|
+
onRevealOutside: outsideAttention === null || outsideAttention === void 0 ? void 0 : outsideAttention.onReveal,
|
|
2651
2823
|
completion: readFirstCompletion,
|
|
2652
2824
|
showInvalidOnly: showInvalidOptionsOnly,
|
|
2653
2825
|
onToggleInvalidOnly: handleToggleInvalidOnly,
|
|
@@ -2694,6 +2866,8 @@ var FormEngineImpl = function (_a) {
|
|
|
2694
2866
|
onReadOnlyActivate,
|
|
2695
2867
|
validityData,
|
|
2696
2868
|
readFirstAttentionCount,
|
|
2869
|
+
readFirstAttentionFaultCount,
|
|
2870
|
+
readFirstFaultsOutsideBox,
|
|
2697
2871
|
readFirstCompletion,
|
|
2698
2872
|
showInvalidOptionsOnly,
|
|
2699
2873
|
handleToggleInvalidOnly,
|
|
@@ -2723,8 +2897,22 @@ var FormEngineImpl = function (_a) {
|
|
|
2723
2897
|
// removes it, and then the header carries just the consumer's own actions.
|
|
2724
2898
|
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
2899
|
var renderCompact = function () {
|
|
2726
|
-
var _a, _b, _c, _d;
|
|
2727
|
-
|
|
2900
|
+
var _a, _b, _c, _d, _f;
|
|
2901
|
+
/* The rows of this render, each drawn at the stage into its own node; the boxes draw places for them
|
|
2902
|
+
(`renderRow`). A row that changes box is moved, not drawn anew (`rowPlaces`). */
|
|
2903
|
+
var stagedRows = new Map();
|
|
2904
|
+
// Whether the box being drawn shows its rows: a collapsed one keeps only their places (`useOpenBoxes`)
|
|
2905
|
+
var drawingRows = true;
|
|
2906
|
+
// Calm: the host's own colour (see `compactHostColour`), so the pinned
|
|
2907
|
+
// toolbar is invisible until something scrolls under it - and opaque, so
|
|
2908
|
+
// what scrolls under it does not read through. At 88% with a blur the rows
|
|
2909
|
+
// still showed through crisply around the readiness line and the search
|
|
2910
|
+
// wherever the blur did not apply (headless captures, a browser or a
|
|
2911
|
+
// compositor without backdrop-filter): the blur was never something to
|
|
2912
|
+
// count on, the host's color is.
|
|
2913
|
+
var headerBg = calm && compactHostColour ? "rgb(".concat(compactHostColour.join(', '), ")")
|
|
2914
|
+
: calm ? (0, colors_1.getMainBackgroundColor)(theme)
|
|
2915
|
+
: "".concat((0, colors_1.changeDarkness)((0, colors_1.getMainBackgroundColor)(theme), 0.02)).concat((0, colors_1.percentToHexAlpha)(88));
|
|
2728
2916
|
// Toolbar filters narrow the listed rows; the meter reflects the full set.
|
|
2729
2917
|
var query = compactQuery.trim().toLowerCase();
|
|
2730
2918
|
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); };
|
|
@@ -2858,20 +3046,32 @@ var FormEngineImpl = function (_a) {
|
|
|
2858
3046
|
set: [],
|
|
2859
3047
|
optional: [],
|
|
2860
3048
|
};
|
|
2861
|
-
|
|
2862
|
-
|
|
2863
|
-
|
|
2864
|
-
var
|
|
3049
|
+
/* A box a row being edited cannot move into: a closed one - collapsed on screen, by the form or the reader,
|
|
3050
|
+
or not drawn yet and to be drawn collapsed (Optional, with no search). The row's place there is not in the
|
|
3051
|
+
page, so the row would leave it, and the caret with it. */
|
|
3052
|
+
var boxIsClosed = function (box) {
|
|
2865
3053
|
var _a;
|
|
3054
|
+
if (readOnly || (calm && compactNested))
|
|
3055
|
+
return false;
|
|
3056
|
+
if ((_a = statusBoxRefs.current[box]) === null || _a === void 0 ? void 0 : _a.isConnected)
|
|
3057
|
+
return !openBoxes.isShown(box);
|
|
3058
|
+
return (compactCollapsedGroupsProp !== null && compactCollapsedGroupsProp !== void 0 ? compactCollapsedGroupsProp : ['optional']).includes(box) && !query;
|
|
3059
|
+
};
|
|
3060
|
+
/* A row's box is what it holds now - the one rule the box headers, the readiness line, the meter and the
|
|
3061
|
+
host's numbers count by (`getOptionBucket`). A row being edited moves with it: it is the same row in its new
|
|
3062
|
+
box, its editor and caret kept (`rowPlaces`), where it was kept in the box it was opened in, and counted
|
|
3063
|
+
elsewhere (Qlip build 489). Into a closed box it does not move until it is closed: an optional value cleared
|
|
3064
|
+
as it is edited stays under the caret, not in a collapsed Optional box. `settledBucket` is the box a row is
|
|
3065
|
+
shown in, which is what follows a field across the boxes (the flash below). */
|
|
3066
|
+
var stableBucketOf = function (entry) {
|
|
2866
3067
|
var fresh = getOptionBucket(entry.name, entry.hidden);
|
|
2867
|
-
var
|
|
2868
|
-
|
|
2869
|
-
|
|
2870
|
-
|
|
2871
|
-
|
|
2872
|
-
|
|
2873
|
-
|
|
2874
|
-
return memo;
|
|
3068
|
+
var shownIn = settledBucket.current[entry.name];
|
|
3069
|
+
if (shownIn &&
|
|
3070
|
+
shownIn !== fresh &&
|
|
3071
|
+
!entry.hidden &&
|
|
3072
|
+
expandedOptions.includes(entry.name) &&
|
|
3073
|
+
boxIsClosed(fresh)) {
|
|
3074
|
+
return shownIn;
|
|
2875
3075
|
}
|
|
2876
3076
|
settledBucket.current[entry.name] = fresh;
|
|
2877
3077
|
return fresh;
|
|
@@ -2953,21 +3153,29 @@ var FormEngineImpl = function (_a) {
|
|
|
2953
3153
|
var stickyBoxHeaders = compactStickyBoxHeaders && !compactNested;
|
|
2954
3154
|
var boxStickyOffset = compactStickyOffset + compactToolbarHeight;
|
|
2955
3155
|
var STATUS_BOXES = [
|
|
2956
|
-
|
|
2957
|
-
|
|
2958
|
-
|
|
2959
|
-
|
|
2960
|
-
|
|
2961
|
-
|
|
3156
|
+
// The first box is amber only once something in it is a fault. On a new form it
|
|
3157
|
+
// holds the required fields still to fill in, which is not yet anything wrong.
|
|
3158
|
+
readFirstAttentionFaultCount ?
|
|
3159
|
+
{
|
|
3160
|
+
key: 'attention',
|
|
3161
|
+
label: (_a = compactBoxLabels === null || compactBoxLabels === void 0 ? void 0 : compactBoxLabels.attention) !== null && _a !== void 0 ? _a : feWords.boxAttention,
|
|
3162
|
+
intent: 'warning',
|
|
3163
|
+
icon: 'ErrorWarningLine',
|
|
3164
|
+
}
|
|
3165
|
+
: {
|
|
3166
|
+
key: 'attention',
|
|
3167
|
+
label: (_b = compactBoxLabels === null || compactBoxLabels === void 0 ? void 0 : compactBoxLabels.pending) !== null && _b !== void 0 ? _b : feWords.boxPending,
|
|
3168
|
+
icon: 'CheckboxBlankCircleLine',
|
|
3169
|
+
},
|
|
2962
3170
|
{
|
|
2963
3171
|
key: 'set',
|
|
2964
|
-
label: (
|
|
3172
|
+
label: (_c = compactBoxLabels === null || compactBoxLabels === void 0 ? void 0 : compactBoxLabels.set) !== null && _c !== void 0 ? _c : feWords.boxSet,
|
|
2965
3173
|
intent: 'success',
|
|
2966
3174
|
icon: 'CheckLine',
|
|
2967
3175
|
},
|
|
2968
3176
|
{
|
|
2969
3177
|
key: 'optional',
|
|
2970
|
-
label: (
|
|
3178
|
+
label: (_d = compactBoxLabels === null || compactBoxLabels === void 0 ? void 0 : compactBoxLabels.optional) !== null && _d !== void 0 ? _d : feWords.boxOptional,
|
|
2971
3179
|
icon: 'CheckboxBlankCircleLine',
|
|
2972
3180
|
},
|
|
2973
3181
|
];
|
|
@@ -2981,7 +3189,17 @@ var FormEngineImpl = function (_a) {
|
|
|
2981
3189
|
return Object.keys(absorbedBy).filter(function (absorbedName) { return absorbedBy[absorbedName] === hostName; });
|
|
2982
3190
|
};
|
|
2983
3191
|
var renderGroupRows = function (names) {
|
|
2984
|
-
var renderRow = function (entry, clustered, clusterFirst, clusterLast) {
|
|
3192
|
+
var renderRow = function (entry, clustered, clusterFirst, clusterLast) {
|
|
3193
|
+
// a row is in one place at a time
|
|
3194
|
+
if (stagedRows.has(entry.name))
|
|
3195
|
+
return null;
|
|
3196
|
+
var host = rowHosts.hostFor(entry.name);
|
|
3197
|
+
if (drawingRows) {
|
|
3198
|
+
stagedRows.set(entry.name, (0, rowPlaces_1.stagedRow)(drawRow(entry, clustered, clusterFirst, clusterLast), host, entry.name));
|
|
3199
|
+
}
|
|
3200
|
+
return (0, jsx_runtime_1.jsx)(rowPlaces_1.RowPlace, { host: host }, entry.name);
|
|
3201
|
+
};
|
|
3202
|
+
var drawRow = function (entry, clustered, clusterFirst, clusterLast) { return ((0, jsx_runtime_1.jsx)(CompactRow_1.CompactRow, { optionName: entry.name, optionField: entry.hidden ?
|
|
2985
3203
|
{
|
|
2986
3204
|
type: getOptionSchemaStorageType(options === null || options === void 0 ? void 0 : options[entry.name], isRendererOnly),
|
|
2987
3205
|
value: undefined,
|
|
@@ -3017,7 +3235,13 @@ var FormEngineImpl = function (_a) {
|
|
|
3017
3235
|
// "Covers"/"Covered by" chips already say which member satisfies it.
|
|
3018
3236
|
if (requiredGroupsInfo.satisfiedBy[grp])
|
|
3019
3237
|
return railed;
|
|
3020
|
-
|
|
3238
|
+
// Amber once someone has been to the group (or a submit was attempted); until
|
|
3239
|
+
// then it is still to fill in, in the quiet colour, like its members.
|
|
3240
|
+
var clusterVisited = memberEntries.some(function (e) { return getOptionStatus(e.name) !== 'pending'; });
|
|
3241
|
+
var clusterColor = clusterVisited ? cWarning : cMuted;
|
|
3242
|
+
// its words and mark: the same colour, in the shade of it that reads on the tint
|
|
3243
|
+
var clusterInk = clusterVisited ? rowInks.warning : rowInks.mutedReason;
|
|
3244
|
+
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
3245
|
});
|
|
3022
3246
|
};
|
|
3023
3247
|
// One schema group inside a status box: its thin sub-label, the group's
|
|
@@ -3028,32 +3252,114 @@ var FormEngineImpl = function (_a) {
|
|
|
3028
3252
|
can be split across the shown and folded halves of a capped box, and its
|
|
3029
3253
|
label must appear above whichever half holds its first row. */
|
|
3030
3254
|
var renderBoxGroup = function (boxKey, groupName, only) {
|
|
3031
|
-
var groupConfig = groups === null || groups === void 0 ? void 0 : groups[groupName];
|
|
3032
3255
|
var rows = only ?
|
|
3033
3256
|
(buckets[boxKey][groupName] || []).filter(function (entry) { return only.has(entry.name); })
|
|
3034
3257
|
: buckets[boxKey][groupName];
|
|
3035
3258
|
if (only && !rows.length) {
|
|
3036
3259
|
return null;
|
|
3037
3260
|
}
|
|
3261
|
+
return renderGroupBlock(groupName, rows);
|
|
3262
|
+
};
|
|
3263
|
+
/** A group's sub-label, subtitle and rows. `key` tells two halves of one
|
|
3264
|
+
group apart when both render in the same body. */
|
|
3265
|
+
var renderGroupBlock = function (groupName, rows, key) {
|
|
3266
|
+
if (key === void 0) { key = groupName; }
|
|
3267
|
+
var groupConfig = groups === null || groups === void 0 ? void 0 : groups[groupName];
|
|
3038
3268
|
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) })
|
|
3269
|
+
(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
3270
|
: 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
|
-
|
|
3271
|
+
(0, jsx_runtime_1.jsx)(reqore_1.ReqoreP, { className: 'options-readfirst-group-subtitle', size: 'small', effect: { opacity: 0.6 }, style: calm ?
|
|
3272
|
+
// Under the calm heading, at the rows' inset; the space below
|
|
3273
|
+
// it is the next row's own padding.
|
|
3274
|
+
{ margin: 0, padding: "2px ".concat(compactRowStyles_1.CALM_SECTION_INSET, "px 4px") }
|
|
3275
|
+
: {
|
|
3276
|
+
marginTop: 2,
|
|
3277
|
+
marginBottom: 8,
|
|
3278
|
+
marginLeft: compactRowStyles_1.GROUP_INDENT,
|
|
3279
|
+
paddingRight: 10,
|
|
3280
|
+
}, children: groupConfig.subtitle })
|
|
3281
|
+
: null, renderGroupRows(rows)] }, key));
|
|
3282
|
+
};
|
|
3283
|
+
/** The "N more fields" control: a quiet last row of the body it folds. */
|
|
3284
|
+
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 () {
|
|
3285
|
+
return setExpandedMoreBoxes(function (prev) {
|
|
3286
|
+
return prev.includes(boxKey) ? prev.filter(function (k) { return k !== boxKey; }) : __spreadArray(__spreadArray([], prev, true), [boxKey], false);
|
|
3287
|
+
});
|
|
3288
|
+
}, 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 } })] })); };
|
|
3289
|
+
var groupBodyProps = {
|
|
3290
|
+
$calm: calm,
|
|
3291
|
+
$hairline: cHairline,
|
|
3292
|
+
$divider: cDivider,
|
|
3293
|
+
$hover: cHover,
|
|
3294
|
+
$focus: cWarning,
|
|
3295
|
+
// Calm: the text color's wash, as a hovered row has; amber would say the group is wrong (a satisfied one
|
|
3296
|
+
// stayed amber under the pointer)
|
|
3297
|
+
$groupHighlight: calm ? cHover : "".concat(cWarning, "1f"),
|
|
3298
|
+
$success: cSuccess,
|
|
3299
|
+
$rowBg: cRowBg,
|
|
3300
|
+
$lineColor: cGroupLine,
|
|
3301
|
+
$moreBorder: cMoreBorder,
|
|
3302
|
+
};
|
|
3303
|
+
/* Calm, nested in a row (a list item, a hash field's sub-form): the item is
|
|
3304
|
+
already the card, so its fields sit in it directly instead of in status
|
|
3305
|
+
boxes, which drew a card inside the card. In schema order, so a row does
|
|
3306
|
+
not move to another box under the caret as it is filled; a row that lacks
|
|
3307
|
+
a value still says so where the value would be. The fields nobody has
|
|
3308
|
+
added fold behind one quiet last row, the same control a capped box ends
|
|
3309
|
+
with — and when nothing else is listed they ARE the form, so they show. */
|
|
3310
|
+
var renderNestedRows = function () {
|
|
3311
|
+
// Fields with no named group are one list here. The engine files them under
|
|
3312
|
+
// two synthetic keys (the required ones and the rest), which the boxes
|
|
3313
|
+
// never showed; in one list that split put a set Description above an
|
|
3314
|
+
// empty Method Name. Named groups keep their sub-labels and their order.
|
|
3315
|
+
var UNLABELLED = '';
|
|
3316
|
+
var keyOf = function (groupName) { return (showGroupSubLabel(groupName) ? groupName : UNLABELLED); };
|
|
3317
|
+
var nestedKeys = (0, lodash_1.uniq)(groupKeys.map(keyOf));
|
|
3318
|
+
var listedByGroup = {};
|
|
3319
|
+
var addableByGroup = {};
|
|
3320
|
+
groupKeys.forEach(function (groupName) {
|
|
3321
|
+
grouped[groupName].forEach(function (entry) {
|
|
3322
|
+
var _a;
|
|
3323
|
+
var target = entry.hidden ? addableByGroup : listedByGroup;
|
|
3324
|
+
(target[_a = keyOf(groupName)] || (target[_a] = [])).push(entry);
|
|
3325
|
+
});
|
|
3326
|
+
});
|
|
3327
|
+
// In the schema's order, not the order the values arrived in.
|
|
3328
|
+
var schemaOrder = Object.keys(options || {});
|
|
3329
|
+
var bySchema = function (a, b) {
|
|
3330
|
+
return schemaOrder.indexOf(a.name) - schemaOrder.indexOf(b.name);
|
|
3331
|
+
};
|
|
3332
|
+
(0, lodash_1.forEach)(listedByGroup, function (rows) { return rows.sort(bySchema); });
|
|
3333
|
+
(0, lodash_1.forEach)(addableByGroup, function (rows) { return rows.sort(bySchema); });
|
|
3334
|
+
var renderNestedGroup = function (key, rows, half) {
|
|
3335
|
+
return key === UNLABELLED ?
|
|
3336
|
+
(0, jsx_runtime_1.jsx)(react_2.default.Fragment, { children: renderGroupRows(rows) }, "".concat(half, "-fields"))
|
|
3337
|
+
: renderGroupBlock(key, rows, "".concat(half, "-").concat(key));
|
|
3338
|
+
};
|
|
3339
|
+
var listedGroups = nestedKeys.filter(function (key) { var _a; return (_a = listedByGroup[key]) === null || _a === void 0 ? void 0 : _a.length; });
|
|
3340
|
+
var addableGroups = nestedKeys.filter(function (key) { var _a; return (_a = addableByGroup[key]) === null || _a === void 0 ? void 0 : _a.length; });
|
|
3341
|
+
var addableCount = addableGroups.reduce(function (total, key) { return total + addableByGroup[key].length; }, 0);
|
|
3342
|
+
var folds = listedGroups.length > 0;
|
|
3343
|
+
var addableOpen = !folds || expandedMoreBoxes.includes('optional');
|
|
3344
|
+
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 ?
|
|
3345
|
+
addableGroups.map(function (key) { return renderNestedGroup(key, addableByGroup[key], 'addable'); })
|
|
3346
|
+
: null] })));
|
|
3048
3347
|
};
|
|
3049
3348
|
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
3349
|
// Mirrors the toolbar's own search-row gate: when no search
|
|
3051
3350
|
// row renders, the header is a thin strip and sits tight to
|
|
3052
3351
|
// 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 &&
|
|
3352
|
+
, __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
3353
|
!!((compactPanelProps === null || compactPanelProps === void 0 ? void 0 : compactPanelProps.label) ||
|
|
3055
3354
|
(compactPanelProps === null || compactPanelProps === void 0 ? void 0 : compactPanelProps.icon) ||
|
|
3056
|
-
((
|
|
3355
|
+
((_f = compactPanelProps === null || compactPanelProps === void 0 ? void 0 : compactPanelProps.actions) === null || _f === void 0 ? void 0 : _f.length)), flat: true,
|
|
3356
|
+
// Calm: no surface and no lift at all. A theme that gives
|
|
3357
|
+
// panels a surface of their own (Reqore's `theme.panel`) would
|
|
3358
|
+
// otherwise paint this wrapper as a card around the section
|
|
3359
|
+
// cards inside it. Transparent and un-raised, Reqore also drops
|
|
3360
|
+
// the wrapper's horizontal padding, so the readiness line, the
|
|
3361
|
+
// search and the sections share one left edge with the host.
|
|
3362
|
+
raised: !calm, minimal: true, transparent: calm || undefined,
|
|
3057
3363
|
// No panel background: the form sits transparently on whatever
|
|
3058
3364
|
// hosts it (page, drawer, or — for an arg_schema field — the
|
|
3059
3365
|
// parent's edit card) instead of stacking its own dark surface.
|
|
@@ -3105,117 +3411,163 @@ var FormEngineImpl = function (_a) {
|
|
|
3105
3411
|
(0, jsx_runtime_1.jsx)(reqore_1.ReqoreMessage, { flat: true, opaque: false, size: 'small', children: readOnly && !query ? feWords.nothingSet : feWords.noFieldsMatch })
|
|
3106
3412
|
: null, readOnly ?
|
|
3107
3413
|
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, {
|
|
3414
|
+
(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
3415
|
: 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
|
-
|
|
3143
|
-
|
|
3144
|
-
|
|
3145
|
-
|
|
3146
|
-
|
|
3416
|
+
: calm && compactNested ? renderNestedRows()
|
|
3417
|
+
: STATUS_BOXES.map(function (box) {
|
|
3418
|
+
var groupsInBox = bucketGroups[box.key];
|
|
3419
|
+
var count = bucketCount(box.key);
|
|
3420
|
+
if (!count)
|
|
3421
|
+
return null;
|
|
3422
|
+
/* A row being edited is on show in the box it is in: neither the preselected split
|
|
3423
|
+
nor a cap folds it away (it moves only into an open box - `boxIsClosed`). */
|
|
3424
|
+
var isOpenRow = function (entry) { return expandedOptions.includes(entry.name); };
|
|
3425
|
+
var hasPreselectedRows = boxHasPreselectedRows(box.key);
|
|
3426
|
+
var wouldCollapse = compactCollapsedGroups.includes(box.key) &&
|
|
3427
|
+
!query &&
|
|
3428
|
+
!(box.key === 'optional' && onlyOptionalRows && !collapsedGroupsRequested);
|
|
3429
|
+
// Only a box that was opened SOLELY to reveal a preselected
|
|
3430
|
+
// row splits its body; a box that renders open anyway shows
|
|
3431
|
+
// all of its groups as before.
|
|
3432
|
+
var splitForPreselected = wouldCollapse && hasPreselectedRows;
|
|
3433
|
+
var opensCollapsed = wouldCollapse && !hasPreselectedRows;
|
|
3434
|
+
// Its rows are drawn while it is open: as the form opens it, or as the reader just
|
|
3435
|
+
// did (the reveal below needs them in the box it scrolls to), or as its content says
|
|
3436
|
+
drawingRows = openBoxes.drawsRows(box.key, !opensCollapsed || openedStatusBox === box.key);
|
|
3437
|
+
// Which rows this box shows, and which fold away, decided at
|
|
3438
|
+
// ROW level because `maxFieldsShown` counts fields — a
|
|
3439
|
+
// group-level split can only ever cut at a group boundary.
|
|
3440
|
+
// Group order is preserved so the visible rows read in the
|
|
3441
|
+
// same order they would if nothing were folded.
|
|
3442
|
+
var orderedRows = groupsInBox.flatMap(function (groupName) { return buckets[box.key][groupName] || []; });
|
|
3443
|
+
// The number in the box's header counts the rows in it: what they
|
|
3444
|
+
// hold now, as the line and the host count them (a field being
|
|
3445
|
+
// edited moves box with its value - `stableBucketOf`).
|
|
3446
|
+
var headerCount = readOnly ? count : (orderedRows.filter(function (entry) { return getOptionBucket(entry.name, entry.hidden) === box.key; }).length);
|
|
3447
|
+
// Optional's own rule first: a box opened solely to reveal
|
|
3448
|
+
// preselected rows offers those, not an arbitrary first-N.
|
|
3449
|
+
var candidateRows = splitForPreselected ?
|
|
3450
|
+
orderedRows.filter(function (entry) { return isPreselectedRow(entry) || isOpenRow(entry); })
|
|
3451
|
+
: orderedRows;
|
|
3452
|
+
// …then the cap applies to whatever that left - but for a row being edited.
|
|
3453
|
+
var capped = maxFieldsShown !== undefined && candidateRows.length > maxFieldsShown;
|
|
3454
|
+
var shownRows = capped ?
|
|
3455
|
+
candidateRows.filter(function (entry, index) { return index < maxFieldsShown || isOpenRow(entry); })
|
|
3456
|
+
: candidateRows;
|
|
3457
|
+
var shownRowSet = new Set(shownRows.map(function (entry) { return entry.name; }));
|
|
3458
|
+
// Everything the box holds that is not on show. Once the
|
|
3459
|
+
// reader asks for more they get the whole box — withholding
|
|
3460
|
+
// the non-preselected remainder behind a second control is
|
|
3461
|
+
// the same defect one level down.
|
|
3462
|
+
var deferredRowSet = new Set(orderedRows
|
|
3463
|
+
.filter(function (entry) { return !shownRowSet.has(entry.name); })
|
|
3464
|
+
.map(function (entry) { return entry.name; }));
|
|
3465
|
+
var deferredCount = deferredRowSet.size;
|
|
3466
|
+
var shownGroups = groupsInBox.filter(function (groupName) {
|
|
3467
|
+
return (buckets[box.key][groupName] || []).some(function (entry) {
|
|
3468
|
+
return shownRowSet.has(entry.name);
|
|
3469
|
+
});
|
|
3147
3470
|
});
|
|
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
|
-
|
|
3471
|
+
var deferredGroups = groupsInBox.filter(function (groupName) {
|
|
3472
|
+
return (buckets[box.key][groupName] || []).some(function (entry) { return !shownRowSet.has(entry.name); });
|
|
3473
|
+
});
|
|
3474
|
+
var moreOpen = Boolean(query) || expandedMoreBoxes.includes(box.key);
|
|
3475
|
+
var accent = box.key === 'attention' && readFirstAttentionFaultCount ? cWarning
|
|
3476
|
+
: box.key === 'set' ? cSuccess
|
|
3477
|
+
: cMuted;
|
|
3478
|
+
// The muted "Optional" box reads as a quieter, recessed
|
|
3479
|
+
// surface — a touch darker than the page rather than the
|
|
3480
|
+
// faint grey tint the accent would give.
|
|
3481
|
+
// Calm: every box is the same panel — no recessed one.
|
|
3482
|
+
var boxBg = box.key === 'optional' && !calm ?
|
|
3483
|
+
(0, colors_1.changeDarkness)((0, colors_1.getMainBackgroundColor)(theme), 0.06)
|
|
3484
|
+
: undefined;
|
|
3485
|
+
return ((0, jsx_runtime_1.jsxs)(compactRowStyles_1.StyledStatusBox, { "$accent": accent, "$bg": boxBg, "$calm": calm, "$surface": stickyBoxHeaders ?
|
|
3486
|
+
calm ? cPanel
|
|
3487
|
+
: (0, colors_1.getMainBackgroundColor)(theme)
|
|
3488
|
+
: undefined, ref: function (node) {
|
|
3489
|
+
statusBoxRefs.current[box.key] = node;
|
|
3490
|
+
},
|
|
3491
|
+
// Opening arms the reveal; collapsing disarms it, so a
|
|
3492
|
+
// close never scrolls.
|
|
3493
|
+
onCollapseChange: function (collapsed) {
|
|
3494
|
+
return setOpenedStatusBox(collapsed ? undefined : box.key);
|
|
3495
|
+
},
|
|
3496
|
+
// Calm: an ordinary panel — Reqore paints the theme's
|
|
3497
|
+
// panel surface and its hairline edge. The header stays
|
|
3498
|
+
// minimal (no surface or rule of its own); the first
|
|
3499
|
+
// row's hairline is the line under it.
|
|
3500
|
+
flat: !calm, minimal: true,
|
|
3501
|
+
/* The header stays on screen while its own box is
|
|
3502
|
+
being read — see `compactStickyBoxHeaders`. Sticky
|
|
3503
|
+
is bounded by its containing block, so the header
|
|
3504
|
+
leaves with its box and only one is ever pinned. */
|
|
3505
|
+
stickyHeader: stickyBoxHeaders, stickyHeaderOffset: stickyBoxHeaders ? boxStickyOffset : undefined, collapseButtonProps: { flat: true, minimal: true, size: 'small' }, collapsible: true,
|
|
3506
|
+
// Which boxes start closed is the consumer's call
|
|
3507
|
+
// (`compactCollapsedGroups`, default `['optional']`: the
|
|
3508
|
+
// Optional box holds every not-yet-added field, so a form
|
|
3509
|
+
// opens on what is in use). Two rules override it:
|
|
3510
|
+
//
|
|
3511
|
+
// A SEARCH forces every box open — ReqorePanel unmounts
|
|
3512
|
+
// collapsed content, so a match inside a closed box would
|
|
3513
|
+
// be unreachable. (isCollapsed is the panel's controllable
|
|
3514
|
+
// state; manual toggling still works with no query set.)
|
|
3515
|
+
//
|
|
3516
|
+
// The Optional box stays open when it is the ONLY box,
|
|
3517
|
+
// because collapsing it renders a card that looks empty and
|
|
3518
|
+
// broken: an auth profile's Authorization block, whose nine
|
|
3519
|
+
// requirement fields are all optional, showed as a titled
|
|
3520
|
+
// card containing one collapsed "Optional 9" strip and
|
|
3521
|
+
// nothing else. This does not generalise to the other two —
|
|
3522
|
+
// a lone Set box collapsed is a deliberate ask, and its
|
|
3523
|
+
// header still reports what is in there.
|
|
3524
|
+
//
|
|
3525
|
+
// A PRESELECTED row overrides it too: the schema asked
|
|
3526
|
+
// for that field to be visible on a new form, so the
|
|
3527
|
+
// box it lands in opens. The groups it does NOT appear
|
|
3528
|
+
// in stay behind an inner collapse below, so opening
|
|
3529
|
+
// the box reveals the preselected fields without also
|
|
3530
|
+
// dumping every not-yet-added optional field on the
|
|
3531
|
+
// author.
|
|
3532
|
+
isCollapsed: opensCollapsed, label: calm ?
|
|
3533
|
+
// One status dot and a word — and only where a
|
|
3534
|
+
// person is needed. The count is a quiet number.
|
|
3535
|
+
(0, jsx_runtime_1.jsxs)(compactRowStyles_1.StyledGroupHeader, { "$calm": true, children: [box.key === 'attention' && readFirstAttentionFaultCount ?
|
|
3536
|
+
(0, jsx_runtime_1.jsx)(compactRowStyles_1.StyledStatusDot, { className: 'options-readfirst-group-dot', "$color": cWarning, "aria-hidden": true })
|
|
3537
|
+
: null, (0, jsx_runtime_1.jsx)(reqore_1.ReqoreP, { effect: { weight: 'bold' }, size: 'normal', children: box.label }), headerCount ?
|
|
3538
|
+
(0, jsx_runtime_1.jsx)(reqore_1.ReqoreSpan, { className: 'options-readfirst-group-count', size: 'small', effect: { opacity: 0.65 }, children: headerCount })
|
|
3539
|
+
: null] })
|
|
3540
|
+
: (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 ?
|
|
3541
|
+
(0, jsx_runtime_1.jsx)(reqore_1.ReqoreTag, { size: 'small', minimal: true, compact: true, intent: box.intent, label: String(headerCount) })
|
|
3542
|
+
: null] }), icon: calm ? undefined : box.icon,
|
|
3543
|
+
/* ONE left edge: the title and the rows start where Reqore puts them.
|
|
3544
|
+
Reqore pads the title bar and the padded content by the same amount
|
|
3545
|
+
at their sides - its size's padding, or as much as clears the
|
|
3546
|
+
corner (#715) - and the rows add nothing to it: a calm body draws
|
|
3547
|
+
its rows full-bleed and takes their inset back (`$boxCorners`);
|
|
3548
|
+
a classic row's text sits its own padding into its pill, and the
|
|
3549
|
+
icon that starts the title moves in by as much. Neither knows what
|
|
3550
|
+
Reqore pads by: a title padded for the corner and rows padded by a
|
|
3551
|
+
number of their own were two edges (22px and 17px under a 14px
|
|
3552
|
+
corner). */
|
|
3553
|
+
iconProps: calm ? undefined : { style: { marginLeft: compactRowStyles_1.COMPACT_ROW_PAD_X } }, className: 'options-readfirst-group', contentStyle: calm ?
|
|
3554
|
+
{
|
|
3555
|
+
paddingTop: 0,
|
|
3556
|
+
paddingBottom: 0,
|
|
3557
|
+
// the rows' bands and hairlines reach the box's edges, its
|
|
3558
|
+
// corners too, and no further
|
|
3559
|
+
overflow: 'clip',
|
|
3560
|
+
borderBottomLeftRadius: 'inherit',
|
|
3561
|
+
borderBottomRightRadius: 'inherit',
|
|
3562
|
+
}
|
|
3563
|
+
: { paddingTop: 4, paddingBottom: 6 }, children: [(0, jsx_runtime_1.jsx)(rowPlaces_1.OpenBoxMark, { box: box.key, onShown: openBoxes.onShown }), (0, jsx_runtime_1.jsxs)(compactRowStyles_1.StyledGroupBody, __assign({}, groupBodyProps, { "$boxCorners": true, className: compactNarrow ? 'readfirst-narrow' : undefined, children: [shownGroups.map(function (groupName) {
|
|
3564
|
+
return renderBoxGroup(box.key, groupName, shownRowSet);
|
|
3565
|
+
}), deferredCount ? renderMoreRow(box.key, deferredCount, moreOpen) : null, deferredCount && moreOpen ?
|
|
3566
|
+
deferredGroups.map(function (groupName) {
|
|
3567
|
+
return renderBoxGroup(box.key, groupName, deferredRowSet);
|
|
3568
|
+
})
|
|
3569
|
+
: null] }))] }, box.key));
|
|
3570
|
+
})] })), (0, jsx_runtime_1.jsx)(rowPlaces_1.RowStage, { rows: Array.from(stagedRows.values()) }), commitMode === 'batched' && !readOnly && dirtyOptionNames.length ?
|
|
3219
3571
|
(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
3572
|
: null] }) })] }) }) }));
|
|
3221
3573
|
};
|
|
@@ -3252,7 +3604,7 @@ var FormEngineImpl = function (_a) {
|
|
|
3252
3604
|
return renderCompact();
|
|
3253
3605
|
}
|
|
3254
3606
|
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 })] })
|
|
3607
|
+
(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
3608
|
: 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
3609
|
disabled: (0, size_1.default)(availableOptions) < 2,
|
|
3258
3610
|
}, 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 +3616,7 @@ var FormEngineImpl = function (_a) {
|
|
|
3264
3616
|
: null, (0, jsx_runtime_1.jsx)(HiddenFieldsNote_1.HiddenFieldsNote, { fields: hiddenFieldsWithValues }), children, (0, size_1.default)(filteredOptions) >= 1 && !readOnly ?
|
|
3265
3617
|
(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
3618
|
: 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
|
|
3619
|
+
var _b, _c, _d, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
|
|
3268
3620
|
var type = _a.type, other = __rest(_a, ["type"]);
|
|
3269
3621
|
return ({
|
|
3270
3622
|
label: ((_b = options[optionName]) === null || _b === void 0 ? void 0 : _b.display_name) || optionName,
|
|
@@ -3280,12 +3632,14 @@ var FormEngineImpl = function (_a) {
|
|
|
3280
3632
|
cursor: 'help',
|
|
3281
3633
|
}
|
|
3282
3634
|
: undefined,
|
|
3283
|
-
onClick: ((
|
|
3635
|
+
onClick: (0, fieldDescription_1.fieldHasLongDescription)(options[optionName]) ?
|
|
3636
|
+
function () { return handleOptionLabelClick(optionName); }
|
|
3637
|
+
: undefined,
|
|
3284
3638
|
},
|
|
3285
|
-
showLabelTooltip: !!((
|
|
3639
|
+
showLabelTooltip: !!((_f = options[optionName]) === null || _f === void 0 ? void 0 : _f.short_desc),
|
|
3286
3640
|
customLabelTooltip: {
|
|
3287
3641
|
delay: 300,
|
|
3288
|
-
content: ((0, jsx_runtime_1.jsx)(Description_1.Description, { longDescription: "".concat((
|
|
3642
|
+
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
3643
|
},
|
|
3290
3644
|
description: showFieldTypes ?
|
|
3291
3645
|
[(0, qorusTypeCatalogue_1.optionTypeWords)(options[optionName], typeName), options[optionName].short_desc]
|
|
@@ -3295,7 +3649,7 @@ var FormEngineImpl = function (_a) {
|
|
|
3295
3649
|
descriptionEffect: {
|
|
3296
3650
|
textSize: '11px',
|
|
3297
3651
|
opacity: optionDescOpacity,
|
|
3298
|
-
underline: ((
|
|
3652
|
+
underline: (0, fieldDescription_1.fieldHasLongDescription)(options[optionName]) ? 'underline dotted #878787' : undefined,
|
|
3299
3653
|
},
|
|
3300
3654
|
customTheme: {
|
|
3301
3655
|
main: 'main:darken:1',
|
|
@@ -3332,7 +3686,7 @@ var FormEngineImpl = function (_a) {
|
|
|
3332
3686
|
menu: [
|
|
3333
3687
|
!readOnly &&
|
|
3334
3688
|
type !== 'code-editor' &&
|
|
3335
|
-
(((
|
|
3689
|
+
(((_h = options[optionName]) === null || _h === void 0 ? void 0 : _h.ui_type) || ((_j = options[optionName]) === null || _j === void 0 ? void 0 : _j.type)) !==
|
|
3336
3690
|
'code-editor' && {
|
|
3337
3691
|
label: feWords.focusedEditing,
|
|
3338
3692
|
icon: 'FullscreenLine',
|
|
@@ -3352,15 +3706,15 @@ var FormEngineImpl = function (_a) {
|
|
|
3352
3706
|
!readOnly &&
|
|
3353
3707
|
other.value &&
|
|
3354
3708
|
!(0, lodash_1.isEqual)(other.value, (0, common_1.getDefaultValue)(options[optionName])) &&
|
|
3355
|
-
!(((
|
|
3709
|
+
!(((_k = options[optionName]) === null || _k === void 0 ? void 0 : _k.disabled) || ((_l = options[optionName]) === null || _l === void 0 ? void 0 : _l.readonly)) && {
|
|
3356
3710
|
label: feWords.removeValue,
|
|
3357
3711
|
icon: 'CloseLine',
|
|
3358
3712
|
className: 'options-item-remove',
|
|
3359
3713
|
onClick: function () { return handleValueChange(optionName, undefined); },
|
|
3360
3714
|
},
|
|
3361
3715
|
!readOnly &&
|
|
3362
|
-
!((
|
|
3363
|
-
!((
|
|
3716
|
+
!((_m = options[optionName]) === null || _m === void 0 ? void 0 : _m.preselected) &&
|
|
3717
|
+
!((_o = options[optionName]) === null || _o === void 0 ? void 0 : _o.required) && {
|
|
3364
3718
|
label: feWords.removeOption,
|
|
3365
3719
|
icon: 'DeleteBinLine',
|
|
3366
3720
|
intent: 'danger',
|
|
@@ -3376,8 +3730,8 @@ var FormEngineImpl = function (_a) {
|
|
|
3376
3730
|
},
|
|
3377
3731
|
],
|
|
3378
3732
|
}),
|
|
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: (
|
|
3733
|
+
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 ?
|
|
3734
|
+
(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
3735
|
: null, renderOption(optionName, __assign({ type: type }, other))] })),
|
|
3382
3736
|
});
|
|
3383
3737
|
}), defaultZoom: 1, zoomable: false, actions: __spreadArray(__spreadArray([], (rest.actions || []).map(function (action) { return (__assign(__assign({}, action), { minimal: true })); }), true), [
|
|
@@ -3415,9 +3769,15 @@ var FormEngineImpl = function (_a) {
|
|
|
3415
3769
|
* hand is how one of them gets missed.
|
|
3416
3770
|
*/
|
|
3417
3771
|
var FormEngine = function (props) {
|
|
3772
|
+
var _a;
|
|
3773
|
+
// The form's own `appearance` wins; without one it follows the form (or the
|
|
3774
|
+
// host's provider) it sits in, so a nested sub-form never changes look
|
|
3775
|
+
// halfway down its parent.
|
|
3776
|
+
var inherited = (0, formAppearance_1.useFormAppearance)();
|
|
3777
|
+
var appearance = (_a = props.appearance) !== null && _a !== void 0 ? _a : inherited;
|
|
3418
3778
|
// what the host knows of references beyond the catalogue, for every chip the form draws (qorus#646)
|
|
3419
3779
|
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)) }) }) }));
|
|
3780
|
+
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
3781
|
};
|
|
3422
3782
|
exports.FormEngine = FormEngine;
|
|
3423
3783
|
var NO_REFERENCE_NAMES = {};
|