@qoretechnologies/reqraft 0.10.77 → 0.10.78-pr.145.gca7df95
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 +18 -2
- package/dist/components/composer/Composer.d.ts.map +1 -1
- package/dist/components/composer/Composer.js +57 -29
- package/dist/components/composer/Composer.js.map +1 -1
- package/dist/components/composer/labels.d.ts +24 -0
- package/dist/components/composer/labels.d.ts.map +1 -0
- package/dist/components/composer/labels.js +16 -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 +576 -207
- 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 +17 -0
- package/dist/components/form/engine/compactRowStyles.d.ts.map +1 -1
- package/dist/components/form/engine/compactRowStyles.js +99 -52
- 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 +41 -15
- 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 +6 -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/codeFont.d.ts +12 -0
- package/dist/components/form/fields/codeFont.d.ts.map +1 -0
- package/dist/components/form/fields/codeFont.js +26 -0
- package/dist/components/form/fields/codeFont.js.map +1 -0
- package/dist/components/form/fields/color/Color.d.ts.map +1 -1
- package/dist/components/form/fields/color/Color.js +9 -6
- package/dist/components/form/fields/color/Color.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 +24 -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/ExampleValueModal.d.ts.map +1 -1
- package/dist/components/form/fields/template/ExampleValueModal.js +4 -1
- package/dist/components/form/fields/template/ExampleValueModal.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 +12 -2
- package/dist/components/form/fields/template/TemplateField.d.ts.map +1 -1
- package/dist/components/form/fields/template/TemplateField.js +71 -60
- 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 +41 -19
- 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 +159 -0
- package/dist/components/supportTicket/labels.d.ts.map +1 -0
- package/dist/components/supportTicket/labels.js +216 -0
- package/dist/components/supportTicket/labels.js.map +1 -0
- package/dist/components/supportTicket/meta.d.ts +31 -4
- package/dist/components/supportTicket/meta.d.ts.map +1 -1
- package/dist/components/supportTicket/meta.js +98 -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 +58 -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/readableColors.d.ts +8 -0
- package/dist/helpers/readableColors.d.ts.map +1 -1
- package/dist/helpers/readableColors.js +12 -1
- package/dist/helpers/readableColors.js.map +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) {
|
|
@@ -865,7 +892,11 @@ var FormEngineImpl = function (_a) {
|
|
|
865
892
|
header's height below the top edge with nothing under it. Read from
|
|
866
893
|
the element rather than from the props that produced it, so every
|
|
867
894
|
route to that decision is accounted for. */
|
|
868
|
-
|
|
895
|
+
/* A Reqore that pins a header only while its panel is clearly taller than its scroller
|
|
896
|
+
(decision 028, reqore#715) says whether it pins in `data-pins-header`, and decides it
|
|
897
|
+
after it has measured, so the toolbar was not sticky yet when this first read it. */
|
|
898
|
+
var says = header.getAttribute('data-pins-header');
|
|
899
|
+
var pinned = says !== null ? says === 'true' : getComputedStyle(header).position === 'sticky';
|
|
869
900
|
var next = pinned ? Math.round(header.getBoundingClientRect().height) : 0;
|
|
870
901
|
return prev === next ? prev : next;
|
|
871
902
|
});
|
|
@@ -873,17 +904,53 @@ var FormEngineImpl = function (_a) {
|
|
|
873
904
|
read();
|
|
874
905
|
/* jsdom and older engines have no ResizeObserver; the one-shot read above
|
|
875
906
|
still gives the right answer for a form whose toolbar never reflows. */
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
907
|
+
var observer = typeof ResizeObserver === 'undefined' ? undefined : new ResizeObserver(read);
|
|
908
|
+
observer === null || observer === void 0 ? void 0 : observer.observe(header);
|
|
909
|
+
/* The pin can change without the toolbar's size changing: Reqore measures first and pins
|
|
910
|
+
after, and pins no more once the form is short. */
|
|
911
|
+
var pinWatch = typeof MutationObserver === 'undefined' ? undefined : new MutationObserver(read);
|
|
912
|
+
pinWatch === null || pinWatch === void 0 ? void 0 : pinWatch.observe(header, { attributes: true, attributeFilter: ['data-pins-header'] });
|
|
913
|
+
return function () {
|
|
914
|
+
observer === null || observer === void 0 ? void 0 : observer.disconnect();
|
|
915
|
+
pinWatch === null || pinWatch === void 0 ? void 0 : pinWatch.disconnect();
|
|
916
|
+
};
|
|
882
917
|
/* `compactNarrow` is a dependency, not decoration: crossing the width
|
|
883
918
|
breakpoint takes the pin OFF the toolbar without changing its height, so
|
|
884
919
|
the ResizeObserver never fires and a stale 124px would go on offsetting
|
|
885
920
|
the box headers below a toolbar that is no longer there. */
|
|
886
921
|
}, [compact, compactNested, compactStickyBoxHeaders, compactNarrow, compactWrapNode, options]);
|
|
922
|
+
/* The color a calm form sits on, for its pinned toolbar's glass.
|
|
923
|
+
|
|
924
|
+
A calm form has no surface of its own, so the toolbar has to paint one to
|
|
925
|
+
keep the rows that scroll under it from showing through the meter and the
|
|
926
|
+
search — and it has to be the host's color, or it draws a band across the
|
|
927
|
+
form before anything has moved. The host is whatever paints first above the
|
|
928
|
+
form: the page, a drawer's panel surface, a card. Read once it mounts (and
|
|
929
|
+
when the theme changes), not assumed from the theme's main color. */
|
|
930
|
+
var _13 = (0, react_2.useState)(), compactHostColour = _13[0], setCompactHostColour = _13[1];
|
|
931
|
+
(0, react_2.useLayoutEffect)(function () {
|
|
932
|
+
if (!calm || !compact || compactNested || !compactWrapNode) {
|
|
933
|
+
setCompactHostColour(undefined);
|
|
934
|
+
return;
|
|
935
|
+
}
|
|
936
|
+
var _loop_1 = function (node) {
|
|
937
|
+
var _a = (getComputedStyle(node).backgroundColor.match(/[\d.]+/g) || [])
|
|
938
|
+
.slice(0, 4)
|
|
939
|
+
.map(Number), r = _a[0], g = _a[1], b = _a[2], _b = _a[3], alpha = _b === void 0 ? 1 : _b;
|
|
940
|
+
if (alpha > 0 && b !== undefined) {
|
|
941
|
+
setCompactHostColour(function (prev) {
|
|
942
|
+
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];
|
|
943
|
+
});
|
|
944
|
+
return { value: void 0 };
|
|
945
|
+
}
|
|
946
|
+
};
|
|
947
|
+
for (var node = compactWrapNode.parentElement; node; node = node.parentElement) {
|
|
948
|
+
var state_1 = _loop_1(node);
|
|
949
|
+
if (typeof state_1 === "object")
|
|
950
|
+
return state_1.value;
|
|
951
|
+
}
|
|
952
|
+
setCompactHostColour(undefined);
|
|
953
|
+
}, [calm, compact, compactNested, compactWrapNode, theme]);
|
|
887
954
|
// Global label-column sizing: size the label column to the WIDEST field label
|
|
888
955
|
// across the whole form, clamped to [MIN, MAX], and publish it as a CSS var on
|
|
889
956
|
// the scroll wrap. Both the grid column and the value-surface offsets read the
|
|
@@ -932,8 +999,8 @@ var FormEngineImpl = function (_a) {
|
|
|
932
999
|
var readRowHeights = (0, react_2.useRef)({});
|
|
933
1000
|
// Required-groups linkage: hovering a group chip highlights every member row;
|
|
934
1001
|
// clicking a sibling in the chip's popover scrolls to it and flashes it.
|
|
935
|
-
var
|
|
936
|
-
var
|
|
1002
|
+
var _14 = (0, react_2.useState)([]), highlightedOptions = _14[0], setHighlightedOptions = _14[1];
|
|
1003
|
+
var _15 = (0, react_2.useState)([]), flashedOptions = _15[0], setFlashedOptions = _15[1];
|
|
937
1004
|
var flashTimeout = (0, react_2.useRef)();
|
|
938
1005
|
var flashOptions = (0, react_2.useCallback)(function (optionNames, scrollToFirst) {
|
|
939
1006
|
if (scrollToFirst === void 0) { scrollToFirst = false; }
|
|
@@ -968,33 +1035,34 @@ var FormEngineImpl = function (_a) {
|
|
|
968
1035
|
// Follow a field across panels: when its status bucket changes — e.g. you fill
|
|
969
1036
|
// an optional field and it jumps to Set / Needs attention — scroll to its new
|
|
970
1037
|
// row and flash it so it's easy to keep track of. `settledBucket` holds each
|
|
971
|
-
// field's current panel
|
|
972
|
-
//
|
|
973
|
-
//
|
|
974
|
-
//
|
|
1038
|
+
// field's current panel, so diffing it after every render catches the move the
|
|
1039
|
+
// instant it lands in the new panel. A field being edited moves as its value
|
|
1040
|
+
// does - the first character typed into an empty required field takes it to Set,
|
|
1041
|
+
// the caret with it (`rowPlaces`) - and is followed the same way. Runs every
|
|
1042
|
+
// render; the diff is cheap and only fires a scroll on an ACTUAL move.
|
|
975
1043
|
var prevSettledBucket = (0, react_2.useRef)({});
|
|
976
1044
|
(0, react_2.useEffect)(function () {
|
|
977
1045
|
if (!compact)
|
|
978
1046
|
return;
|
|
979
1047
|
var cur = settledBucket.current;
|
|
980
1048
|
var prev = prevSettledBucket.current;
|
|
981
|
-
var moved = Object.keys(cur).find(function (name) { return prev[name] && prev[name] !== cur[name]
|
|
1049
|
+
var moved = Object.keys(cur).find(function (name) { return prev[name] && prev[name] !== cur[name]; });
|
|
982
1050
|
prevSettledBucket.current = __assign({}, cur);
|
|
983
1051
|
if (moved) {
|
|
984
1052
|
flashOptions([moved], true);
|
|
985
1053
|
}
|
|
986
1054
|
});
|
|
987
1055
|
// Info panels auto-open on Tier-1 content; the per-row user override sticks.
|
|
988
|
-
var
|
|
1056
|
+
var _16 = (0, react_2.useState)({}), infoPanelOverrides = _16[0], setInfoPanelOverrides = _16[1];
|
|
989
1057
|
// Toolbar filters affect the listed rows only — the meter reflects the full set.
|
|
990
|
-
var
|
|
991
|
-
var
|
|
1058
|
+
var _17 = (0, react_2.useState)(false), requiredOnly = _17[0], setRequiredOnly = _17[1];
|
|
1059
|
+
var _18 = (0, react_2.useState)(''), compactQuery = _18[0], setCompactQuery = _18[1];
|
|
992
1060
|
// Compact field sort (Fields menu → "Sort by"); 'schema' = declared order.
|
|
993
|
-
var
|
|
994
|
-
var
|
|
1061
|
+
var _19 = (0, react_2.useState)('schema'), compactSort = _19[0], setCompactSort = _19[1];
|
|
1062
|
+
var _20 = (0, react_2.useState)(function () { return ({
|
|
995
1063
|
fields: (0, exports.fixOptions)(value, options || {}, undefined, isRendererOnly),
|
|
996
1064
|
meta: undefined,
|
|
997
|
-
}); }), localValue =
|
|
1065
|
+
}); }), localValue = _20[0], setLocalValue = _20[1];
|
|
998
1066
|
var originalValue = (0, react_2.useRef)();
|
|
999
1067
|
// Track the last value we emitted via onChange so we can skip re-applying fixOptions
|
|
1000
1068
|
// when the parent echoes it back as the new value prop (controlled component loop prevention)
|
|
@@ -1052,7 +1120,7 @@ var FormEngineImpl = function (_a) {
|
|
|
1052
1120
|
originalValue.current = localValue.fields;
|
|
1053
1121
|
}
|
|
1054
1122
|
var unavailableOptionsCount = (0, react_2.useRef)(0);
|
|
1055
|
-
var
|
|
1123
|
+
var _21 = (0, useQorusTypes_1.useQorusTypes)(), compactValue = _21.compactValue, typesLoading = _21.loading;
|
|
1056
1124
|
// an option's type in words, while the form shows field types (qorus#646: it said the type's code, `<string>`)
|
|
1057
1125
|
var typeName = (0, typeSentenceForm_1.useTypeName)();
|
|
1058
1126
|
var templates = (0, useTemplates_1.useTemplates)(allowTemplates, stringTemplates, interfaceContext);
|
|
@@ -1795,6 +1863,11 @@ var FormEngineImpl = function (_a) {
|
|
|
1795
1863
|
return newValue;
|
|
1796
1864
|
}
|
|
1797
1865
|
if (showInvalidOptionsOnly &&
|
|
1866
|
+
// An open row stays while the reader is in it, as its box does
|
|
1867
|
+
// (`stableBucketOf`): the first character typed into an empty required
|
|
1868
|
+
// field makes it valid, and hiding it then would pull the field out
|
|
1869
|
+
// from under the caret mid-word.
|
|
1870
|
+
!expandedOptions.includes(optionName) &&
|
|
1798
1871
|
isOptionValid(optionName, (0, exports.getOptionFieldStorageType)(optionName, option.type, options, operators, option.op, isRendererOnly, optionHoldsExpression(option)), option.value)) {
|
|
1799
1872
|
return newValue;
|
|
1800
1873
|
}
|
|
@@ -1803,6 +1876,7 @@ var FormEngineImpl = function (_a) {
|
|
|
1803
1876
|
}, [
|
|
1804
1877
|
dependencyLockedNames,
|
|
1805
1878
|
showInvalidOptionsOnly,
|
|
1879
|
+
expandedOptions,
|
|
1806
1880
|
isRendererOnly,
|
|
1807
1881
|
JSON.stringify(availableOptions),
|
|
1808
1882
|
JSON.stringify(options),
|
|
@@ -1858,8 +1932,17 @@ var FormEngineImpl = function (_a) {
|
|
|
1858
1932
|
covered: covered,
|
|
1859
1933
|
invalid: invalid,
|
|
1860
1934
|
warned: msgIntent === 'warning',
|
|
1935
|
+
// a one-of member, once anyone has been to its group (`hasBeenToTheField`)
|
|
1936
|
+
visited: (0, readFirst_1.hasBeenToTheField)(name, {
|
|
1937
|
+
visitedOptions: visitedOptions,
|
|
1938
|
+
revealRequired: revealRequired,
|
|
1939
|
+
requiredGroups: reqGroups,
|
|
1940
|
+
groupMembers: requiredGroupsInfo.members,
|
|
1941
|
+
}),
|
|
1861
1942
|
});
|
|
1862
1943
|
}, [
|
|
1944
|
+
revealRequired,
|
|
1945
|
+
visitedOptions,
|
|
1863
1946
|
isRendererOnly,
|
|
1864
1947
|
JSON.stringify(options),
|
|
1865
1948
|
JSON.stringify(availableOptions),
|
|
@@ -1889,6 +1972,37 @@ var FormEngineImpl = function (_a) {
|
|
|
1889
1972
|
// a hidden field (its `depends_on` does not hold) is not in the form, nor in its counts
|
|
1890
1973
|
function (name) { return !dependencyLockedNames.includes(name) && getOptionBucket(name) === 'attention'; }).length;
|
|
1891
1974
|
}, [JSON.stringify(availableOptions), getOptionBucket, dependencyLockedNames]);
|
|
1975
|
+
// How many of those are faults rather than only still to fill in (`pending`). Zero
|
|
1976
|
+
// on a new form, so its first box reads "To fill in" without amber.
|
|
1977
|
+
var readFirstAttentionFaultCount = (0, react_2.useMemo)(function () {
|
|
1978
|
+
return Object.keys(availableOptions || {}).filter(function (name) { return getOptionBucket(name) === 'attention' && getOptionStatus(name) !== 'pending'; }).length;
|
|
1979
|
+
}, [JSON.stringify(availableOptions), getOptionBucket, getOptionStatus]);
|
|
1980
|
+
/* Fields whose value fails but that are not in the first box: an optional field its host says is wrong
|
|
1981
|
+
(`invalid_reason`) stays among the optional ones. They make the form "Incomplete", so the readiness line counts
|
|
1982
|
+
them with the faults: it said "Incomplete" and nothing else, with nothing to tell the reader what. */
|
|
1983
|
+
var readFirstFaultsOutsideBox = (0, react_2.useMemo)(function () {
|
|
1984
|
+
return validityData.invalidFields.filter(function (_a) {
|
|
1985
|
+
var fieldName = _a.fieldName;
|
|
1986
|
+
return !!(availableOptions === null || availableOptions === void 0 ? void 0 : availableOptions[fieldName]) &&
|
|
1987
|
+
!dependencyLockedNames.includes(fieldName) &&
|
|
1988
|
+
getOptionBucket(fieldName) !== 'attention';
|
|
1989
|
+
}).length;
|
|
1990
|
+
}, [validityData, JSON.stringify(availableOptions), dependencyLockedNames, getOptionBucket]);
|
|
1991
|
+
// The same two numbers, to a host that draws its own submit control from them.
|
|
1992
|
+
var onAttentionChangeRef = (0, react_2.useRef)(onAttentionChange);
|
|
1993
|
+
onAttentionChangeRef.current = onAttentionChange;
|
|
1994
|
+
// What the host found wrong outside the fields: in the line and in what the host is told.
|
|
1995
|
+
var outsideAttentionCount = Math.max(0, (_b = outsideAttention === null || outsideAttention === void 0 ? void 0 : outsideAttention.count) !== null && _b !== void 0 ? _b : 0);
|
|
1996
|
+
(0, react_2.useEffect)(function () {
|
|
1997
|
+
var _a;
|
|
1998
|
+
/* The line's numbers, to the one: a field its host says is wrong outside the first box (`readFirstFaultsOutsideBox`)
|
|
1999
|
+
is counted in the line, and so in what the host is told - the host's submit read ready while the line said
|
|
2000
|
+
"Incomplete · 1 need attention". */
|
|
2001
|
+
(_a = onAttentionChangeRef.current) === null || _a === void 0 ? void 0 : _a.call(onAttentionChangeRef, {
|
|
2002
|
+
count: readFirstAttentionCount + readFirstFaultsOutsideBox + outsideAttentionCount,
|
|
2003
|
+
faults: readFirstAttentionFaultCount + readFirstFaultsOutsideBox + outsideAttentionCount,
|
|
2004
|
+
});
|
|
2005
|
+
}, [readFirstAttentionCount, readFirstAttentionFaultCount, readFirstFaultsOutsideBox, outsideAttentionCount]);
|
|
1892
2006
|
var getIntent = (0, react_2.useCallback)(
|
|
1893
2007
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
1894
2008
|
function (optName, type, optValue, _op) {
|
|
@@ -2159,7 +2273,7 @@ var FormEngineImpl = function (_a) {
|
|
|
2159
2273
|
}
|
|
2160
2274
|
hasAutoFocusedRef.current = true;
|
|
2161
2275
|
var entered = event.target;
|
|
2162
|
-
if ((0,
|
|
2276
|
+
if ((0, rowFocus_2.isTypingControl)(entered)) {
|
|
2163
2277
|
return;
|
|
2164
2278
|
}
|
|
2165
2279
|
var target = firstAttentionRow();
|
|
@@ -2187,6 +2301,48 @@ var FormEngineImpl = function (_a) {
|
|
|
2187
2301
|
compactWrapNode.removeEventListener('focusin', onFocusIn);
|
|
2188
2302
|
};
|
|
2189
2303
|
}, [autoFocusFirstRequired, compact, compactWrapNode]);
|
|
2304
|
+
// A submit that could not go is answered with where to type: each new
|
|
2305
|
+
// `focusAttentionRequest` opens the first field that needs attention and puts the
|
|
2306
|
+
// caret in it. The host's submit button holds the caret at that moment, and an open
|
|
2307
|
+
// row never takes a caret held outside it (CompactRow), so the button lets go of it
|
|
2308
|
+
// here first; the person asked to submit, and this is the answer to that. It picks
|
|
2309
|
+
// the field the arrival scan above would (`firstAttentionRow`), and spends that scan:
|
|
2310
|
+
// the person has been taken to a field now.
|
|
2311
|
+
var lastFocusRequest = (0, react_2.useRef)(focusAttentionRequest);
|
|
2312
|
+
(0, react_2.useEffect)(function () {
|
|
2313
|
+
var _a;
|
|
2314
|
+
if (focusAttentionRequest === lastFocusRequest.current) {
|
|
2315
|
+
return;
|
|
2316
|
+
}
|
|
2317
|
+
lastFocusRequest.current = focusAttentionRequest;
|
|
2318
|
+
if (!focusAttentionRequest || !compact || !options) {
|
|
2319
|
+
return;
|
|
2320
|
+
}
|
|
2321
|
+
var target = firstAttentionRow();
|
|
2322
|
+
if (!target) {
|
|
2323
|
+
return;
|
|
2324
|
+
}
|
|
2325
|
+
hasAutoFocusedRef.current = true;
|
|
2326
|
+
var wrap = compactWrapNodeRef.current;
|
|
2327
|
+
var active = document.activeElement;
|
|
2328
|
+
if (active && active !== document.body && !(wrap === null || wrap === void 0 ? void 0 : wrap.contains(active))) {
|
|
2329
|
+
active.blur();
|
|
2330
|
+
}
|
|
2331
|
+
if (!expandedOptions.includes(target)) {
|
|
2332
|
+
// The row's own open effect reveals it and takes the caret.
|
|
2333
|
+
openFirstAttentionRow(target);
|
|
2334
|
+
return;
|
|
2335
|
+
}
|
|
2336
|
+
// Already open (the field the form opened on arrival): its open effect has run,
|
|
2337
|
+
// so the caret goes to its control here.
|
|
2338
|
+
var row = wrap === null || wrap === void 0 ? void 0 : wrap.querySelector("[data-field=\"".concat(target, "\"]"));
|
|
2339
|
+
if (row) {
|
|
2340
|
+
(0, revealRow_1.revealRow)(row, 'auto');
|
|
2341
|
+
(_a = (0, rowFocus_1.findRowFocusTarget)(row.querySelector('.options-readfirst-row-editor'), {
|
|
2342
|
+
textEntryOnly: row.classList.contains('options-readfirst-card'),
|
|
2343
|
+
})) === null || _a === void 0 ? void 0 : _a.focus({ preventScroll: true });
|
|
2344
|
+
}
|
|
2345
|
+
}, [focusAttentionRequest]);
|
|
2190
2346
|
// Read-first completion summary (how many shown options have a value set),
|
|
2191
2347
|
// surfaced as a progress meter at the top of the compact form.
|
|
2192
2348
|
var readFirstCompletion = (0, react_2.useMemo)(function () {
|
|
@@ -2362,7 +2518,7 @@ var FormEngineImpl = function (_a) {
|
|
|
2362
2518
|
return null;
|
|
2363
2519
|
var items = schemaMsgs.map(function (_a, index) {
|
|
2364
2520
|
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',
|
|
2521
|
+
return ((0, jsx_runtime_1.jsx)(reqore_1.ReqoreMessage, { intent: (0, formAppearance_1.calmNoteIntent)(intent, calm), title: title, opaque: false, size: 'small',
|
|
2366
2522
|
// Compact: flat (no border) to match the read-row info panels;
|
|
2367
2523
|
// classic forms keep the bordered, bottom-margined message.
|
|
2368
2524
|
flat: compact || undefined, margin: compact ? undefined : 'bottom', children: content }, title || index));
|
|
@@ -2462,7 +2618,10 @@ var FormEngineImpl = function (_a) {
|
|
|
2462
2618
|
readOnly ||
|
|
2463
2619
|
!(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
2620
|
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
|
|
2621
|
+
: 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,
|
|
2622
|
+
// Open is not left: a field the form opened for typing (the first empty
|
|
2623
|
+
// one, on a new form) says what it needs without already being wrong.
|
|
2624
|
+
requirementPending: !(revealRequired || visitedOptions.includes(optionName)) }), operators && (0, size_1.default)(operators) && (0, size_1.default)(other.op) ?
|
|
2466
2625
|
(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
2626
|
label: (optionSchema === null || optionSchema === void 0 ? void 0 : optionSchema.display_name) || optionName,
|
|
2468
2627
|
operatorKeys: operatorParts,
|
|
@@ -2496,10 +2655,12 @@ var FormEngineImpl = function (_a) {
|
|
|
2496
2655
|
getTypeForOption,
|
|
2497
2656
|
inheritedScopes,
|
|
2498
2657
|
inheritedFromParent,
|
|
2658
|
+
revealRequired,
|
|
2659
|
+
visitedOptions,
|
|
2499
2660
|
]);
|
|
2500
2661
|
// Compact (read-first) rendering.
|
|
2501
2662
|
// Theme-derived colors so the flat-row layout adapts to light/dark/custom themes.
|
|
2502
|
-
var cText = (
|
|
2663
|
+
var cText = (0, formAppearance_1.getThemeTextColour)(theme, '#f1f0ee');
|
|
2503
2664
|
// Text emphasis tiers via reqore's readable-color helper (key = full readable
|
|
2504
2665
|
// text, muted = its dimmed variant, faint = the dimmed variant softened
|
|
2505
2666
|
// further) instead of hand-rolled hex-alpha suffixes on the raw text color.
|
|
@@ -2508,8 +2669,10 @@ var FormEngineImpl = function (_a) {
|
|
|
2508
2669
|
var cFaint = "".concat(cMuted, "99");
|
|
2509
2670
|
var cDivider = "".concat(cText, "14");
|
|
2510
2671
|
var cHover = "".concat(cText, "0d");
|
|
2511
|
-
|
|
2512
|
-
|
|
2672
|
+
// Calm: the intents as words that read on the section surface, not the
|
|
2673
|
+
// theme's fills (see `getCalmIntentText`). Dots and edges take them too.
|
|
2674
|
+
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';
|
|
2675
|
+
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
2676
|
var cInfo = ((_f = theme === null || theme === void 0 ? void 0 : theme.intents) === null || _f === void 0 ? void 0 : _f.info) || '#3b8eea';
|
|
2514
2677
|
var cSuccess = ((_g = theme === null || theme === void 0 ? void 0 : theme.intents) === null || _g === void 0 ? void 0 : _g.success) || '#36b37e';
|
|
2515
2678
|
// the rows' own words and marks, in colors that read on every surface a row is drawn on
|
|
@@ -2527,6 +2690,10 @@ var FormEngineImpl = function (_a) {
|
|
|
2527
2690
|
// The "N more fields" row's dashed edge. Well above the divider tint: this
|
|
2528
2691
|
// one is an affordance the reader has to notice, not a hairline between rows.
|
|
2529
2692
|
var cMoreBorder = "".concat(cText, "4d");
|
|
2693
|
+
// Calm: the section surface and its hairline, from the theme's panel (the
|
|
2694
|
+
// same surface and edge Reqore gives the section panels themselves).
|
|
2695
|
+
var cPanel = (0, formAppearance_1.getCalmPanelSurface)(theme);
|
|
2696
|
+
var cHairline = (0, formAppearance_1.getCalmPanelHairline)(theme);
|
|
2530
2697
|
// The closure surface the extracted CompactRow reads through context. Refs and
|
|
2531
2698
|
// setters are stable; the state/memo/handler fields change identity as they do
|
|
2532
2699
|
// today, so a row re-renders exactly when its inputs do.
|
|
@@ -2546,6 +2713,8 @@ var FormEngineImpl = function (_a) {
|
|
|
2546
2713
|
cardEditorTypes: cardEditorTypes,
|
|
2547
2714
|
showAllDescriptions: showAllDescriptions,
|
|
2548
2715
|
expandedOptions: expandedOptions,
|
|
2716
|
+
visitedOptions: visitedOptions,
|
|
2717
|
+
revealRequired: revealRequired,
|
|
2549
2718
|
highlightedOptions: highlightedOptions,
|
|
2550
2719
|
flashedOptions: flashedOptions,
|
|
2551
2720
|
infoPanelOverrides: infoPanelOverrides,
|
|
@@ -2598,6 +2767,8 @@ var FormEngineImpl = function (_a) {
|
|
|
2598
2767
|
cardEditorTypes,
|
|
2599
2768
|
showAllDescriptions,
|
|
2600
2769
|
expandedOptions,
|
|
2770
|
+
visitedOptions,
|
|
2771
|
+
revealRequired,
|
|
2601
2772
|
highlightedOptions,
|
|
2602
2773
|
flashedOptions,
|
|
2603
2774
|
infoPanelOverrides,
|
|
@@ -2641,13 +2812,22 @@ var FormEngineImpl = function (_a) {
|
|
|
2641
2812
|
var compactToolbarParts = (0, react_2.useMemo)(function () {
|
|
2642
2813
|
if (compactToolbar === false)
|
|
2643
2814
|
return null;
|
|
2815
|
+
// A calm sub-form nested in a row (a list item, a hash field) draws only its
|
|
2816
|
+
// fields. Its readiness is said once, by the item it sits in, and each row
|
|
2817
|
+
// says what it lacks; a search over two to six fields helps nobody, and one
|
|
2818
|
+
// per item stacked a second search box under the form's own for every item.
|
|
2819
|
+
if (calm && compactNested)
|
|
2820
|
+
return null;
|
|
2644
2821
|
var all = { completion: true, search: true, fields: true, help: true };
|
|
2645
2822
|
return compactToolbar === true ? all : __assign(__assign({}, all), compactToolbar);
|
|
2646
|
-
}, [JSON.stringify(compactToolbar)]);
|
|
2823
|
+
}, [JSON.stringify(compactToolbar), calm, compactNested]);
|
|
2647
2824
|
var compactToolbarContextValue = (0, react_2.useMemo)(function () { return ({
|
|
2648
2825
|
readOnly: readOnly,
|
|
2649
2826
|
invalidCount: (0, size_1.default)(validityData.invalidFields),
|
|
2650
|
-
attentionCount: readFirstAttentionCount,
|
|
2827
|
+
attentionCount: readFirstAttentionCount + readFirstFaultsOutsideBox,
|
|
2828
|
+
attentionFaultCount: readFirstAttentionFaultCount + readFirstFaultsOutsideBox,
|
|
2829
|
+
outsideAttentionCount: outsideAttentionCount,
|
|
2830
|
+
onRevealOutside: outsideAttention === null || outsideAttention === void 0 ? void 0 : outsideAttention.onReveal,
|
|
2651
2831
|
completion: readFirstCompletion,
|
|
2652
2832
|
showInvalidOnly: showInvalidOptionsOnly,
|
|
2653
2833
|
onToggleInvalidOnly: handleToggleInvalidOnly,
|
|
@@ -2694,6 +2874,8 @@ var FormEngineImpl = function (_a) {
|
|
|
2694
2874
|
onReadOnlyActivate,
|
|
2695
2875
|
validityData,
|
|
2696
2876
|
readFirstAttentionCount,
|
|
2877
|
+
readFirstAttentionFaultCount,
|
|
2878
|
+
readFirstFaultsOutsideBox,
|
|
2697
2879
|
readFirstCompletion,
|
|
2698
2880
|
showInvalidOptionsOnly,
|
|
2699
2881
|
handleToggleInvalidOnly,
|
|
@@ -2723,8 +2905,22 @@ var FormEngineImpl = function (_a) {
|
|
|
2723
2905
|
// removes it, and then the header carries just the consumer's own actions.
|
|
2724
2906
|
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
2907
|
var renderCompact = function () {
|
|
2726
|
-
var _a, _b, _c, _d;
|
|
2727
|
-
|
|
2908
|
+
var _a, _b, _c, _d, _f;
|
|
2909
|
+
/* The rows of this render, each drawn at the stage into its own node; the boxes draw places for them
|
|
2910
|
+
(`renderRow`). A row that changes box is moved, not drawn anew (`rowPlaces`). */
|
|
2911
|
+
var stagedRows = new Map();
|
|
2912
|
+
// Whether the box being drawn shows its rows: a collapsed one keeps only their places (`useOpenBoxes`)
|
|
2913
|
+
var drawingRows = true;
|
|
2914
|
+
// Calm: the host's own color (see `compactHostColour`), so the pinned
|
|
2915
|
+
// toolbar is invisible until something scrolls under it - and opaque, so
|
|
2916
|
+
// what scrolls under it does not read through. At 88% with a blur the rows
|
|
2917
|
+
// still showed through crisply around the readiness line and the search
|
|
2918
|
+
// wherever the blur did not apply (headless captures, a browser or a
|
|
2919
|
+
// compositor without backdrop-filter): the blur was never something to
|
|
2920
|
+
// count on, the host's color is.
|
|
2921
|
+
var headerBg = calm && compactHostColour ? "rgb(".concat(compactHostColour.join(', '), ")")
|
|
2922
|
+
: calm ? (0, colors_1.getMainBackgroundColor)(theme)
|
|
2923
|
+
: "".concat((0, colors_1.changeDarkness)((0, colors_1.getMainBackgroundColor)(theme), 0.02)).concat((0, colors_1.percentToHexAlpha)(88));
|
|
2728
2924
|
// Toolbar filters narrow the listed rows; the meter reflects the full set.
|
|
2729
2925
|
var query = compactQuery.trim().toLowerCase();
|
|
2730
2926
|
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 +3054,32 @@ var FormEngineImpl = function (_a) {
|
|
|
2858
3054
|
set: [],
|
|
2859
3055
|
optional: [],
|
|
2860
3056
|
};
|
|
2861
|
-
|
|
2862
|
-
|
|
2863
|
-
|
|
2864
|
-
var
|
|
3057
|
+
/* A box a row being edited cannot move into: a closed one - collapsed on screen, by the form or the reader,
|
|
3058
|
+
or not drawn yet and to be drawn collapsed (Optional, with no search). The row's place there is not in the
|
|
3059
|
+
page, so the row would leave it, and the caret with it. */
|
|
3060
|
+
var boxIsClosed = function (box) {
|
|
2865
3061
|
var _a;
|
|
3062
|
+
if (readOnly || (calm && compactNested))
|
|
3063
|
+
return false;
|
|
3064
|
+
if ((_a = statusBoxRefs.current[box]) === null || _a === void 0 ? void 0 : _a.isConnected)
|
|
3065
|
+
return !openBoxes.isShown(box);
|
|
3066
|
+
return (compactCollapsedGroupsProp !== null && compactCollapsedGroupsProp !== void 0 ? compactCollapsedGroupsProp : ['optional']).includes(box) && !query;
|
|
3067
|
+
};
|
|
3068
|
+
/* A row's box is what it holds now - the one rule the box headers, the readiness line, the meter and the
|
|
3069
|
+
host's numbers count by (`getOptionBucket`). A row being edited moves with it: it is the same row in its new
|
|
3070
|
+
box, its editor and caret kept (`rowPlaces`), where it was kept in the box it was opened in, and counted
|
|
3071
|
+
elsewhere (Qlip build 489). Into a closed box it does not move until it is closed: an optional value cleared
|
|
3072
|
+
as it is edited stays under the caret, not in a collapsed Optional box. `settledBucket` is the box a row is
|
|
3073
|
+
shown in, which is what follows a field across the boxes (the flash below). */
|
|
3074
|
+
var stableBucketOf = function (entry) {
|
|
2866
3075
|
var fresh = getOptionBucket(entry.name, entry.hidden);
|
|
2867
|
-
var
|
|
2868
|
-
|
|
2869
|
-
|
|
2870
|
-
|
|
2871
|
-
|
|
2872
|
-
|
|
2873
|
-
|
|
2874
|
-
return memo;
|
|
3076
|
+
var shownIn = settledBucket.current[entry.name];
|
|
3077
|
+
if (shownIn &&
|
|
3078
|
+
shownIn !== fresh &&
|
|
3079
|
+
!entry.hidden &&
|
|
3080
|
+
expandedOptions.includes(entry.name) &&
|
|
3081
|
+
boxIsClosed(fresh)) {
|
|
3082
|
+
return shownIn;
|
|
2875
3083
|
}
|
|
2876
3084
|
settledBucket.current[entry.name] = fresh;
|
|
2877
3085
|
return fresh;
|
|
@@ -2953,21 +3161,29 @@ var FormEngineImpl = function (_a) {
|
|
|
2953
3161
|
var stickyBoxHeaders = compactStickyBoxHeaders && !compactNested;
|
|
2954
3162
|
var boxStickyOffset = compactStickyOffset + compactToolbarHeight;
|
|
2955
3163
|
var STATUS_BOXES = [
|
|
2956
|
-
|
|
2957
|
-
|
|
2958
|
-
|
|
2959
|
-
|
|
2960
|
-
|
|
2961
|
-
|
|
3164
|
+
// The first box is amber only once something in it is a fault. On a new form it
|
|
3165
|
+
// holds the required fields still to fill in, which is not yet anything wrong.
|
|
3166
|
+
readFirstAttentionFaultCount ?
|
|
3167
|
+
{
|
|
3168
|
+
key: 'attention',
|
|
3169
|
+
label: (_a = compactBoxLabels === null || compactBoxLabels === void 0 ? void 0 : compactBoxLabels.attention) !== null && _a !== void 0 ? _a : feWords.boxAttention,
|
|
3170
|
+
intent: 'warning',
|
|
3171
|
+
icon: 'ErrorWarningLine',
|
|
3172
|
+
}
|
|
3173
|
+
: {
|
|
3174
|
+
key: 'attention',
|
|
3175
|
+
label: (_b = compactBoxLabels === null || compactBoxLabels === void 0 ? void 0 : compactBoxLabels.pending) !== null && _b !== void 0 ? _b : feWords.boxPending,
|
|
3176
|
+
icon: 'CheckboxBlankCircleLine',
|
|
3177
|
+
},
|
|
2962
3178
|
{
|
|
2963
3179
|
key: 'set',
|
|
2964
|
-
label: (
|
|
3180
|
+
label: (_c = compactBoxLabels === null || compactBoxLabels === void 0 ? void 0 : compactBoxLabels.set) !== null && _c !== void 0 ? _c : feWords.boxSet,
|
|
2965
3181
|
intent: 'success',
|
|
2966
3182
|
icon: 'CheckLine',
|
|
2967
3183
|
},
|
|
2968
3184
|
{
|
|
2969
3185
|
key: 'optional',
|
|
2970
|
-
label: (
|
|
3186
|
+
label: (_d = compactBoxLabels === null || compactBoxLabels === void 0 ? void 0 : compactBoxLabels.optional) !== null && _d !== void 0 ? _d : feWords.boxOptional,
|
|
2971
3187
|
icon: 'CheckboxBlankCircleLine',
|
|
2972
3188
|
},
|
|
2973
3189
|
];
|
|
@@ -2981,7 +3197,17 @@ var FormEngineImpl = function (_a) {
|
|
|
2981
3197
|
return Object.keys(absorbedBy).filter(function (absorbedName) { return absorbedBy[absorbedName] === hostName; });
|
|
2982
3198
|
};
|
|
2983
3199
|
var renderGroupRows = function (names) {
|
|
2984
|
-
var renderRow = function (entry, clustered, clusterFirst, clusterLast) {
|
|
3200
|
+
var renderRow = function (entry, clustered, clusterFirst, clusterLast) {
|
|
3201
|
+
// a row is in one place at a time
|
|
3202
|
+
if (stagedRows.has(entry.name))
|
|
3203
|
+
return null;
|
|
3204
|
+
var host = rowHosts.hostFor(entry.name);
|
|
3205
|
+
if (drawingRows) {
|
|
3206
|
+
stagedRows.set(entry.name, (0, rowPlaces_1.stagedRow)(drawRow(entry, clustered, clusterFirst, clusterLast), host, entry.name));
|
|
3207
|
+
}
|
|
3208
|
+
return (0, jsx_runtime_1.jsx)(rowPlaces_1.RowPlace, { host: host }, entry.name);
|
|
3209
|
+
};
|
|
3210
|
+
var drawRow = function (entry, clustered, clusterFirst, clusterLast) { return ((0, jsx_runtime_1.jsx)(CompactRow_1.CompactRow, { optionName: entry.name, optionField: entry.hidden ?
|
|
2985
3211
|
{
|
|
2986
3212
|
type: getOptionSchemaStorageType(options === null || options === void 0 ? void 0 : options[entry.name], isRendererOnly),
|
|
2987
3213
|
value: undefined,
|
|
@@ -3017,7 +3243,13 @@ var FormEngineImpl = function (_a) {
|
|
|
3017
3243
|
// "Covers"/"Covered by" chips already say which member satisfies it.
|
|
3018
3244
|
if (requiredGroupsInfo.satisfiedBy[grp])
|
|
3019
3245
|
return railed;
|
|
3020
|
-
|
|
3246
|
+
// Amber once someone has been to the group (or a submit was attempted); until
|
|
3247
|
+
// then it is still to fill in, in the quiet color, like its members.
|
|
3248
|
+
var clusterVisited = memberEntries.some(function (e) { return getOptionStatus(e.name) !== 'pending'; });
|
|
3249
|
+
var clusterColor = clusterVisited ? cWarning : cMuted;
|
|
3250
|
+
// its words and mark: the same color, in the shade of it that reads on the tint
|
|
3251
|
+
var clusterInk = clusterVisited ? rowInks.warning : rowInks.mutedReason;
|
|
3252
|
+
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
3253
|
});
|
|
3022
3254
|
};
|
|
3023
3255
|
// One schema group inside a status box: its thin sub-label, the group's
|
|
@@ -3028,32 +3260,115 @@ var FormEngineImpl = function (_a) {
|
|
|
3028
3260
|
can be split across the shown and folded halves of a capped box, and its
|
|
3029
3261
|
label must appear above whichever half holds its first row. */
|
|
3030
3262
|
var renderBoxGroup = function (boxKey, groupName, only) {
|
|
3031
|
-
var groupConfig = groups === null || groups === void 0 ? void 0 : groups[groupName];
|
|
3032
3263
|
var rows = only ?
|
|
3033
3264
|
(buckets[boxKey][groupName] || []).filter(function (entry) { return only.has(entry.name); })
|
|
3034
3265
|
: buckets[boxKey][groupName];
|
|
3035
3266
|
if (only && !rows.length) {
|
|
3036
3267
|
return null;
|
|
3037
3268
|
}
|
|
3269
|
+
return renderGroupBlock(groupName, rows);
|
|
3270
|
+
};
|
|
3271
|
+
/** A group's sub-label, subtitle and rows. `key` tells two halves of one
|
|
3272
|
+
group apart when both render in the same body. */
|
|
3273
|
+
var renderGroupBlock = function (groupName, rows, key) {
|
|
3274
|
+
if (key === void 0) { key = groupName; }
|
|
3275
|
+
var groupConfig = groups === null || groups === void 0 ? void 0 : groups[groupName];
|
|
3038
3276
|
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) })
|
|
3277
|
+
(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
3278
|
: 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
|
-
|
|
3279
|
+
(0, jsx_runtime_1.jsx)(reqore_1.ReqoreP, { className: 'options-readfirst-group-subtitle', size: 'small', effect: { opacity: 0.6 }, style: calm ?
|
|
3280
|
+
// Under the calm heading, at the rows' inset; the space below
|
|
3281
|
+
// it is the next row's own padding.
|
|
3282
|
+
{ margin: 0, padding: "2px ".concat(compactRowStyles_1.CALM_INSET, " 4px") }
|
|
3283
|
+
: {
|
|
3284
|
+
marginTop: 2,
|
|
3285
|
+
marginBottom: 8,
|
|
3286
|
+
marginLeft: compactRowStyles_1.GROUP_INDENT,
|
|
3287
|
+
paddingRight: 10,
|
|
3288
|
+
}, children: groupConfig.subtitle })
|
|
3289
|
+
: null, renderGroupRows(rows)] }, key));
|
|
3290
|
+
};
|
|
3291
|
+
/** The "N more fields" control: a quiet last row of the body it folds. */
|
|
3292
|
+
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 () {
|
|
3293
|
+
return setExpandedMoreBoxes(function (prev) {
|
|
3294
|
+
return prev.includes(boxKey) ? prev.filter(function (k) { return k !== boxKey; }) : __spreadArray(__spreadArray([], prev, true), [boxKey], false);
|
|
3295
|
+
});
|
|
3296
|
+
}, 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 } })] })); };
|
|
3297
|
+
var groupBodyProps = {
|
|
3298
|
+
$calm: calm,
|
|
3299
|
+
$hairline: cHairline,
|
|
3300
|
+
$divider: cDivider,
|
|
3301
|
+
$hover: cHover,
|
|
3302
|
+
// The keyboard's ring in the one ring color (decision 030); amber said a good row was at fault
|
|
3303
|
+
$focus: (0, readableColors_1.getFocusRingColor)(theme),
|
|
3304
|
+
// Calm: the text color's wash, as a hovered row has; amber would say the group is wrong (a satisfied one
|
|
3305
|
+
// stayed amber under the pointer)
|
|
3306
|
+
$groupHighlight: calm ? cHover : "".concat(cWarning, "1f"),
|
|
3307
|
+
$success: cSuccess,
|
|
3308
|
+
$rowBg: cRowBg,
|
|
3309
|
+
$lineColor: cGroupLine,
|
|
3310
|
+
$moreBorder: cMoreBorder,
|
|
3311
|
+
};
|
|
3312
|
+
/* Calm, nested in a row (a list item, a hash field's sub-form): the item is
|
|
3313
|
+
already the card, so its fields sit in it directly instead of in status
|
|
3314
|
+
boxes, which drew a card inside the card. In schema order, so a row does
|
|
3315
|
+
not move to another box under the caret as it is filled; a row that lacks
|
|
3316
|
+
a value still says so where the value would be. The fields nobody has
|
|
3317
|
+
added fold behind one quiet last row, the same control a capped box ends
|
|
3318
|
+
with — and when nothing else is listed they ARE the form, so they show. */
|
|
3319
|
+
var renderNestedRows = function () {
|
|
3320
|
+
// Fields with no named group are one list here. The engine files them under
|
|
3321
|
+
// two synthetic keys (the required ones and the rest), which the boxes
|
|
3322
|
+
// never showed; in one list that split put a set Description above an
|
|
3323
|
+
// empty Method Name. Named groups keep their sub-labels and their order.
|
|
3324
|
+
var UNLABELLED = '';
|
|
3325
|
+
var keyOf = function (groupName) { return (showGroupSubLabel(groupName) ? groupName : UNLABELLED); };
|
|
3326
|
+
var nestedKeys = (0, lodash_1.uniq)(groupKeys.map(keyOf));
|
|
3327
|
+
var listedByGroup = {};
|
|
3328
|
+
var addableByGroup = {};
|
|
3329
|
+
groupKeys.forEach(function (groupName) {
|
|
3330
|
+
grouped[groupName].forEach(function (entry) {
|
|
3331
|
+
var _a;
|
|
3332
|
+
var target = entry.hidden ? addableByGroup : listedByGroup;
|
|
3333
|
+
(target[_a = keyOf(groupName)] || (target[_a] = [])).push(entry);
|
|
3334
|
+
});
|
|
3335
|
+
});
|
|
3336
|
+
// In the schema's order, not the order the values arrived in.
|
|
3337
|
+
var schemaOrder = Object.keys(options || {});
|
|
3338
|
+
var bySchema = function (a, b) {
|
|
3339
|
+
return schemaOrder.indexOf(a.name) - schemaOrder.indexOf(b.name);
|
|
3340
|
+
};
|
|
3341
|
+
(0, lodash_1.forEach)(listedByGroup, function (rows) { return rows.sort(bySchema); });
|
|
3342
|
+
(0, lodash_1.forEach)(addableByGroup, function (rows) { return rows.sort(bySchema); });
|
|
3343
|
+
var renderNestedGroup = function (key, rows, half) {
|
|
3344
|
+
return key === UNLABELLED ?
|
|
3345
|
+
(0, jsx_runtime_1.jsx)(react_2.default.Fragment, { children: renderGroupRows(rows) }, "".concat(half, "-fields"))
|
|
3346
|
+
: renderGroupBlock(key, rows, "".concat(half, "-").concat(key));
|
|
3347
|
+
};
|
|
3348
|
+
var listedGroups = nestedKeys.filter(function (key) { var _a; return (_a = listedByGroup[key]) === null || _a === void 0 ? void 0 : _a.length; });
|
|
3349
|
+
var addableGroups = nestedKeys.filter(function (key) { var _a; return (_a = addableByGroup[key]) === null || _a === void 0 ? void 0 : _a.length; });
|
|
3350
|
+
var addableCount = addableGroups.reduce(function (total, key) { return total + addableByGroup[key].length; }, 0);
|
|
3351
|
+
var folds = listedGroups.length > 0;
|
|
3352
|
+
var addableOpen = !folds || expandedMoreBoxes.includes('optional');
|
|
3353
|
+
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 ?
|
|
3354
|
+
addableGroups.map(function (key) { return renderNestedGroup(key, addableByGroup[key], 'addable'); })
|
|
3355
|
+
: null] })));
|
|
3048
3356
|
};
|
|
3049
3357
|
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
3358
|
// Mirrors the toolbar's own search-row gate: when no search
|
|
3051
3359
|
// row renders, the header is a thin strip and sits tight to
|
|
3052
3360
|
// 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 &&
|
|
3361
|
+
, __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
3362
|
!!((compactPanelProps === null || compactPanelProps === void 0 ? void 0 : compactPanelProps.label) ||
|
|
3055
3363
|
(compactPanelProps === null || compactPanelProps === void 0 ? void 0 : compactPanelProps.icon) ||
|
|
3056
|
-
((
|
|
3364
|
+
((_f = compactPanelProps === null || compactPanelProps === void 0 ? void 0 : compactPanelProps.actions) === null || _f === void 0 ? void 0 : _f.length)), flat: true,
|
|
3365
|
+
// Calm: no surface and no lift at all. A theme that gives
|
|
3366
|
+
// panels a surface of their own (Reqore's `theme.panel`) would
|
|
3367
|
+
// otherwise paint this wrapper as a card around the section
|
|
3368
|
+
// cards inside it. Transparent and un-raised, Reqore also drops
|
|
3369
|
+
// the wrapper's horizontal padding, so the readiness line, the
|
|
3370
|
+
// search and the sections share one left edge with the host.
|
|
3371
|
+
raised: !calm, minimal: true, transparent: calm || undefined,
|
|
3057
3372
|
// No panel background: the form sits transparently on whatever
|
|
3058
3373
|
// hosts it (page, drawer, or — for an arg_schema field — the
|
|
3059
3374
|
// parent's edit card) instead of stacking its own dark surface.
|
|
@@ -3105,117 +3420,163 @@ var FormEngineImpl = function (_a) {
|
|
|
3105
3420
|
(0, jsx_runtime_1.jsx)(reqore_1.ReqoreMessage, { flat: true, opaque: false, size: 'small', children: readOnly && !query ? feWords.nothingSet : feWords.noFieldsMatch })
|
|
3106
3421
|
: null, readOnly ?
|
|
3107
3422
|
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, {
|
|
3423
|
+
(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
3424
|
: 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
|
-
|
|
3425
|
+
: calm && compactNested ? renderNestedRows()
|
|
3426
|
+
: STATUS_BOXES.map(function (box) {
|
|
3427
|
+
var groupsInBox = bucketGroups[box.key];
|
|
3428
|
+
var count = bucketCount(box.key);
|
|
3429
|
+
if (!count)
|
|
3430
|
+
return null;
|
|
3431
|
+
/* A row being edited is on show in the box it is in: neither the preselected split
|
|
3432
|
+
nor a cap folds it away (it moves only into an open box - `boxIsClosed`). */
|
|
3433
|
+
var isOpenRow = function (entry) { return expandedOptions.includes(entry.name); };
|
|
3434
|
+
var hasPreselectedRows = boxHasPreselectedRows(box.key);
|
|
3435
|
+
var wouldCollapse = compactCollapsedGroups.includes(box.key) &&
|
|
3436
|
+
!query &&
|
|
3437
|
+
!(box.key === 'optional' && onlyOptionalRows && !collapsedGroupsRequested);
|
|
3438
|
+
// Only a box that was opened SOLELY to reveal a preselected
|
|
3439
|
+
// row splits its body; a box that renders open anyway shows
|
|
3440
|
+
// all of its groups as before.
|
|
3441
|
+
var splitForPreselected = wouldCollapse && hasPreselectedRows;
|
|
3442
|
+
var opensCollapsed = wouldCollapse && !hasPreselectedRows;
|
|
3443
|
+
// Its rows are drawn while it is open: as the form opens it, or as the reader just
|
|
3444
|
+
// did (the reveal below needs them in the box it scrolls to), or as its content says
|
|
3445
|
+
drawingRows = openBoxes.drawsRows(box.key, !opensCollapsed || openedStatusBox === box.key);
|
|
3446
|
+
// Which rows this box shows, and which fold away, decided at
|
|
3447
|
+
// ROW level because `maxFieldsShown` counts fields — a
|
|
3448
|
+
// group-level split can only ever cut at a group boundary.
|
|
3449
|
+
// Group order is preserved so the visible rows read in the
|
|
3450
|
+
// same order they would if nothing were folded.
|
|
3451
|
+
var orderedRows = groupsInBox.flatMap(function (groupName) { return buckets[box.key][groupName] || []; });
|
|
3452
|
+
// The number in the box's header counts the rows in it: what they
|
|
3453
|
+
// hold now, as the line and the host count them (a field being
|
|
3454
|
+
// edited moves box with its value - `stableBucketOf`).
|
|
3455
|
+
var headerCount = readOnly ? count : (orderedRows.filter(function (entry) { return getOptionBucket(entry.name, entry.hidden) === box.key; }).length);
|
|
3456
|
+
// Optional's own rule first: a box opened solely to reveal
|
|
3457
|
+
// preselected rows offers those, not an arbitrary first-N.
|
|
3458
|
+
var candidateRows = splitForPreselected ?
|
|
3459
|
+
orderedRows.filter(function (entry) { return isPreselectedRow(entry) || isOpenRow(entry); })
|
|
3460
|
+
: orderedRows;
|
|
3461
|
+
// …then the cap applies to whatever that left - but for a row being edited.
|
|
3462
|
+
var capped = maxFieldsShown !== undefined && candidateRows.length > maxFieldsShown;
|
|
3463
|
+
var shownRows = capped ?
|
|
3464
|
+
candidateRows.filter(function (entry, index) { return index < maxFieldsShown || isOpenRow(entry); })
|
|
3465
|
+
: candidateRows;
|
|
3466
|
+
var shownRowSet = new Set(shownRows.map(function (entry) { return entry.name; }));
|
|
3467
|
+
// Everything the box holds that is not on show. Once the
|
|
3468
|
+
// reader asks for more they get the whole box — withholding
|
|
3469
|
+
// the non-preselected remainder behind a second control is
|
|
3470
|
+
// the same defect one level down.
|
|
3471
|
+
var deferredRowSet = new Set(orderedRows
|
|
3472
|
+
.filter(function (entry) { return !shownRowSet.has(entry.name); })
|
|
3473
|
+
.map(function (entry) { return entry.name; }));
|
|
3474
|
+
var deferredCount = deferredRowSet.size;
|
|
3475
|
+
var shownGroups = groupsInBox.filter(function (groupName) {
|
|
3476
|
+
return (buckets[box.key][groupName] || []).some(function (entry) {
|
|
3477
|
+
return shownRowSet.has(entry.name);
|
|
3478
|
+
});
|
|
3479
|
+
});
|
|
3480
|
+
var deferredGroups = groupsInBox.filter(function (groupName) {
|
|
3481
|
+
return (buckets[box.key][groupName] || []).some(function (entry) { return !shownRowSet.has(entry.name); });
|
|
3147
3482
|
});
|
|
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
|
-
|
|
3483
|
+
var moreOpen = Boolean(query) || expandedMoreBoxes.includes(box.key);
|
|
3484
|
+
var accent = box.key === 'attention' && readFirstAttentionFaultCount ? cWarning
|
|
3485
|
+
: box.key === 'set' ? cSuccess
|
|
3486
|
+
: cMuted;
|
|
3487
|
+
// The muted "Optional" box reads as a quieter, recessed
|
|
3488
|
+
// surface — a touch darker than the page rather than the
|
|
3489
|
+
// faint grey tint the accent would give.
|
|
3490
|
+
// Calm: every box is the same panel — no recessed one.
|
|
3491
|
+
var boxBg = box.key === 'optional' && !calm ?
|
|
3492
|
+
(0, colors_1.changeDarkness)((0, colors_1.getMainBackgroundColor)(theme), 0.06)
|
|
3493
|
+
: undefined;
|
|
3494
|
+
return ((0, jsx_runtime_1.jsxs)(compactRowStyles_1.StyledStatusBox, { "$accent": accent, "$bg": boxBg, "$calm": calm, "$surface": stickyBoxHeaders ?
|
|
3495
|
+
calm ? cPanel
|
|
3496
|
+
: (0, colors_1.getMainBackgroundColor)(theme)
|
|
3497
|
+
: undefined, ref: function (node) {
|
|
3498
|
+
statusBoxRefs.current[box.key] = node;
|
|
3499
|
+
},
|
|
3500
|
+
// Opening arms the reveal; collapsing disarms it, so a
|
|
3501
|
+
// close never scrolls.
|
|
3502
|
+
onCollapseChange: function (collapsed) {
|
|
3503
|
+
return setOpenedStatusBox(collapsed ? undefined : box.key);
|
|
3504
|
+
},
|
|
3505
|
+
// Calm: an ordinary panel — Reqore paints the theme's
|
|
3506
|
+
// panel surface and its hairline edge. The header stays
|
|
3507
|
+
// minimal (no surface or rule of its own); the first
|
|
3508
|
+
// row's hairline is the line under it.
|
|
3509
|
+
flat: !calm, minimal: true,
|
|
3510
|
+
/* The header stays on screen while its own box is
|
|
3511
|
+
being read — see `compactStickyBoxHeaders`. Sticky
|
|
3512
|
+
is bounded by its containing block, so the header
|
|
3513
|
+
leaves with its box and only one is ever pinned. */
|
|
3514
|
+
stickyHeader: stickyBoxHeaders, stickyHeaderOffset: stickyBoxHeaders ? boxStickyOffset : undefined, collapseButtonProps: { flat: true, minimal: true, size: 'small' }, collapsible: true,
|
|
3515
|
+
// Which boxes start closed is the consumer's call
|
|
3516
|
+
// (`compactCollapsedGroups`, default `['optional']`: the
|
|
3517
|
+
// Optional box holds every not-yet-added field, so a form
|
|
3518
|
+
// opens on what is in use). Two rules override it:
|
|
3519
|
+
//
|
|
3520
|
+
// A SEARCH forces every box open — ReqorePanel unmounts
|
|
3521
|
+
// collapsed content, so a match inside a closed box would
|
|
3522
|
+
// be unreachable. (isCollapsed is the panel's controllable
|
|
3523
|
+
// state; manual toggling still works with no query set.)
|
|
3524
|
+
//
|
|
3525
|
+
// The Optional box stays open when it is the ONLY box,
|
|
3526
|
+
// because collapsing it renders a card that looks empty and
|
|
3527
|
+
// broken: an auth profile's Authorization block, whose nine
|
|
3528
|
+
// requirement fields are all optional, showed as a titled
|
|
3529
|
+
// card containing one collapsed "Optional 9" strip and
|
|
3530
|
+
// nothing else. This does not generalise to the other two —
|
|
3531
|
+
// a lone Set box collapsed is a deliberate ask, and its
|
|
3532
|
+
// header still reports what is in there.
|
|
3533
|
+
//
|
|
3534
|
+
// A PRESELECTED row overrides it too: the schema asked
|
|
3535
|
+
// for that field to be visible on a new form, so the
|
|
3536
|
+
// box it lands in opens. The groups it does NOT appear
|
|
3537
|
+
// in stay behind an inner collapse below, so opening
|
|
3538
|
+
// the box reveals the preselected fields without also
|
|
3539
|
+
// dumping every not-yet-added optional field on the
|
|
3540
|
+
// author.
|
|
3541
|
+
isCollapsed: opensCollapsed, label: calm ?
|
|
3542
|
+
// One status dot and a word — and only where a
|
|
3543
|
+
// person is needed. The count is a quiet number.
|
|
3544
|
+
(0, jsx_runtime_1.jsxs)(compactRowStyles_1.StyledGroupHeader, { "$calm": true, children: [box.key === 'attention' && readFirstAttentionFaultCount ?
|
|
3545
|
+
(0, jsx_runtime_1.jsx)(compactRowStyles_1.StyledStatusDot, { className: 'options-readfirst-group-dot', "$color": cWarning, "aria-hidden": true })
|
|
3546
|
+
: null, (0, jsx_runtime_1.jsx)(reqore_1.ReqoreP, { effect: { weight: 'bold' }, size: 'normal', children: box.label }), headerCount ?
|
|
3547
|
+
(0, jsx_runtime_1.jsx)(reqore_1.ReqoreSpan, { className: 'options-readfirst-group-count', size: 'small', effect: { opacity: 0.65 }, children: headerCount })
|
|
3548
|
+
: null] })
|
|
3549
|
+
: (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 ?
|
|
3550
|
+
(0, jsx_runtime_1.jsx)(reqore_1.ReqoreTag, { size: 'small', minimal: true, compact: true, intent: box.intent, label: String(headerCount) })
|
|
3551
|
+
: null] }), icon: calm ? undefined : box.icon,
|
|
3552
|
+
/* ONE left edge: the title and the rows start where Reqore puts them.
|
|
3553
|
+
Reqore pads the title bar and the padded content by the same amount
|
|
3554
|
+
at their sides - its size's padding, or as much as clears the
|
|
3555
|
+
corner (#715) - and the rows add nothing to it: a calm body draws
|
|
3556
|
+
its rows full-bleed and takes their inset back (`$boxCorners`);
|
|
3557
|
+
a classic row's text sits its own padding into its pill, and the
|
|
3558
|
+
icon that starts the title moves in by as much. Neither knows what
|
|
3559
|
+
Reqore pads by: a title padded for the corner and rows padded by a
|
|
3560
|
+
number of their own were two edges (22px and 17px under a 14px
|
|
3561
|
+
corner). */
|
|
3562
|
+
iconProps: calm ? undefined : { style: { marginLeft: compactRowStyles_1.COMPACT_ROW_PAD_X } }, className: 'options-readfirst-group', contentStyle: calm ?
|
|
3563
|
+
{
|
|
3564
|
+
paddingTop: 0,
|
|
3565
|
+
paddingBottom: 0,
|
|
3566
|
+
// the rows' bands and hairlines reach the box's edges, its
|
|
3567
|
+
// corners too, and no further
|
|
3568
|
+
overflow: 'clip',
|
|
3569
|
+
borderBottomLeftRadius: 'inherit',
|
|
3570
|
+
borderBottomRightRadius: 'inherit',
|
|
3571
|
+
}
|
|
3572
|
+
: { 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) {
|
|
3573
|
+
return renderBoxGroup(box.key, groupName, shownRowSet);
|
|
3574
|
+
}), deferredCount ? renderMoreRow(box.key, deferredCount, moreOpen) : null, deferredCount && moreOpen ?
|
|
3575
|
+
deferredGroups.map(function (groupName) {
|
|
3576
|
+
return renderBoxGroup(box.key, groupName, deferredRowSet);
|
|
3577
|
+
})
|
|
3578
|
+
: null] }))] }, box.key));
|
|
3579
|
+
})] })), (0, jsx_runtime_1.jsx)(rowPlaces_1.RowStage, { rows: Array.from(stagedRows.values()) }), commitMode === 'batched' && !readOnly && dirtyOptionNames.length ?
|
|
3219
3580
|
(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
3581
|
: null] }) })] }) }) }));
|
|
3221
3582
|
};
|
|
@@ -3252,7 +3613,7 @@ var FormEngineImpl = function (_a) {
|
|
|
3252
3613
|
return renderCompact();
|
|
3253
3614
|
}
|
|
3254
3615
|
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 })] })
|
|
3616
|
+
(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
3617
|
: 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
3618
|
disabled: (0, size_1.default)(availableOptions) < 2,
|
|
3258
3619
|
}, 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 +3625,7 @@ var FormEngineImpl = function (_a) {
|
|
|
3264
3625
|
: null, (0, jsx_runtime_1.jsx)(HiddenFieldsNote_1.HiddenFieldsNote, { fields: hiddenFieldsWithValues }), children, (0, size_1.default)(filteredOptions) >= 1 && !readOnly ?
|
|
3265
3626
|
(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
3627
|
: 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
|
|
3628
|
+
var _b, _c, _d, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
|
|
3268
3629
|
var type = _a.type, other = __rest(_a, ["type"]);
|
|
3269
3630
|
return ({
|
|
3270
3631
|
label: ((_b = options[optionName]) === null || _b === void 0 ? void 0 : _b.display_name) || optionName,
|
|
@@ -3280,12 +3641,14 @@ var FormEngineImpl = function (_a) {
|
|
|
3280
3641
|
cursor: 'help',
|
|
3281
3642
|
}
|
|
3282
3643
|
: undefined,
|
|
3283
|
-
onClick: ((
|
|
3644
|
+
onClick: (0, fieldDescription_1.fieldHasLongDescription)(options[optionName]) ?
|
|
3645
|
+
function () { return handleOptionLabelClick(optionName); }
|
|
3646
|
+
: undefined,
|
|
3284
3647
|
},
|
|
3285
|
-
showLabelTooltip: !!((
|
|
3648
|
+
showLabelTooltip: !!((_f = options[optionName]) === null || _f === void 0 ? void 0 : _f.short_desc),
|
|
3286
3649
|
customLabelTooltip: {
|
|
3287
3650
|
delay: 300,
|
|
3288
|
-
content: ((0, jsx_runtime_1.jsx)(Description_1.Description, { longDescription: "".concat((
|
|
3651
|
+
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
3652
|
},
|
|
3290
3653
|
description: showFieldTypes ?
|
|
3291
3654
|
[(0, qorusTypeCatalogue_1.optionTypeWords)(options[optionName], typeName), options[optionName].short_desc]
|
|
@@ -3295,7 +3658,7 @@ var FormEngineImpl = function (_a) {
|
|
|
3295
3658
|
descriptionEffect: {
|
|
3296
3659
|
textSize: '11px',
|
|
3297
3660
|
opacity: optionDescOpacity,
|
|
3298
|
-
underline: ((
|
|
3661
|
+
underline: (0, fieldDescription_1.fieldHasLongDescription)(options[optionName]) ? 'underline dotted #878787' : undefined,
|
|
3299
3662
|
},
|
|
3300
3663
|
customTheme: {
|
|
3301
3664
|
main: 'main:darken:1',
|
|
@@ -3332,7 +3695,7 @@ var FormEngineImpl = function (_a) {
|
|
|
3332
3695
|
menu: [
|
|
3333
3696
|
!readOnly &&
|
|
3334
3697
|
type !== 'code-editor' &&
|
|
3335
|
-
(((
|
|
3698
|
+
(((_h = options[optionName]) === null || _h === void 0 ? void 0 : _h.ui_type) || ((_j = options[optionName]) === null || _j === void 0 ? void 0 : _j.type)) !==
|
|
3336
3699
|
'code-editor' && {
|
|
3337
3700
|
label: feWords.focusedEditing,
|
|
3338
3701
|
icon: 'FullscreenLine',
|
|
@@ -3352,15 +3715,15 @@ var FormEngineImpl = function (_a) {
|
|
|
3352
3715
|
!readOnly &&
|
|
3353
3716
|
other.value &&
|
|
3354
3717
|
!(0, lodash_1.isEqual)(other.value, (0, common_1.getDefaultValue)(options[optionName])) &&
|
|
3355
|
-
!(((
|
|
3718
|
+
!(((_k = options[optionName]) === null || _k === void 0 ? void 0 : _k.disabled) || ((_l = options[optionName]) === null || _l === void 0 ? void 0 : _l.readonly)) && {
|
|
3356
3719
|
label: feWords.removeValue,
|
|
3357
3720
|
icon: 'CloseLine',
|
|
3358
3721
|
className: 'options-item-remove',
|
|
3359
3722
|
onClick: function () { return handleValueChange(optionName, undefined); },
|
|
3360
3723
|
},
|
|
3361
3724
|
!readOnly &&
|
|
3362
|
-
!((
|
|
3363
|
-
!((
|
|
3725
|
+
!((_m = options[optionName]) === null || _m === void 0 ? void 0 : _m.preselected) &&
|
|
3726
|
+
!((_o = options[optionName]) === null || _o === void 0 ? void 0 : _o.required) && {
|
|
3364
3727
|
label: feWords.removeOption,
|
|
3365
3728
|
icon: 'DeleteBinLine',
|
|
3366
3729
|
intent: 'danger',
|
|
@@ -3376,8 +3739,8 @@ var FormEngineImpl = function (_a) {
|
|
|
3376
3739
|
},
|
|
3377
3740
|
],
|
|
3378
3741
|
}),
|
|
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: (
|
|
3742
|
+
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 ?
|
|
3743
|
+
(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
3744
|
: null, renderOption(optionName, __assign({ type: type }, other))] })),
|
|
3382
3745
|
});
|
|
3383
3746
|
}), defaultZoom: 1, zoomable: false, actions: __spreadArray(__spreadArray([], (rest.actions || []).map(function (action) { return (__assign(__assign({}, action), { minimal: true })); }), true), [
|
|
@@ -3415,9 +3778,15 @@ var FormEngineImpl = function (_a) {
|
|
|
3415
3778
|
* hand is how one of them gets missed.
|
|
3416
3779
|
*/
|
|
3417
3780
|
var FormEngine = function (props) {
|
|
3781
|
+
var _a;
|
|
3782
|
+
// The form's own `appearance` wins; without one it follows the form (or the
|
|
3783
|
+
// host's provider) it sits in, so a nested sub-form never changes look
|
|
3784
|
+
// halfway down its parent.
|
|
3785
|
+
var inherited = (0, formAppearance_1.useFormAppearance)();
|
|
3786
|
+
var appearance = (_a = props.appearance) !== null && _a !== void 0 ? _a : inherited;
|
|
3418
3787
|
// what the host knows of references beyond the catalogue, for every chip the form draws (qorus#646)
|
|
3419
3788
|
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)) }) }) }));
|
|
3789
|
+
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
3790
|
};
|
|
3422
3791
|
exports.FormEngine = FormEngine;
|
|
3423
3792
|
var NO_REFERENCE_NAMES = {};
|