@qoretechnologies/reqraft 0.10.64 → 0.10.65-pr.137.g20c3bec
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +53 -1
- package/dist/components/Description/AllowedValuesHelp.d.ts +20 -0
- package/dist/components/Description/AllowedValuesHelp.d.ts.map +1 -0
- package/dist/components/Description/AllowedValuesHelp.js +86 -0
- package/dist/components/Description/AllowedValuesHelp.js.map +1 -0
- package/dist/components/Description/describedControl.d.ts +54 -0
- package/dist/components/Description/describedControl.d.ts.map +1 -0
- package/dist/components/Description/describedControl.js +81 -0
- package/dist/components/Description/describedControl.js.map +1 -0
- package/dist/components/Description/index.d.ts.map +1 -1
- package/dist/components/Description/index.js +3 -2
- package/dist/components/Description/index.js.map +1 -1
- package/dist/components/colorValue/colorValue.d.ts +59 -0
- package/dist/components/colorValue/colorValue.d.ts.map +1 -0
- package/dist/components/colorValue/colorValue.js +245 -0
- package/dist/components/colorValue/colorValue.js.map +1 -0
- package/dist/components/colorValue/index.d.ts +34 -0
- package/dist/components/colorValue/index.d.ts.map +1 -0
- package/dist/components/colorValue/index.js +136 -0
- package/dist/components/colorValue/index.js.map +1 -0
- package/dist/components/colorValue/labels.d.ts +12 -0
- package/dist/components/colorValue/labels.d.ts.map +1 -0
- package/dist/components/colorValue/labels.js +11 -0
- package/dist/components/colorValue/labels.js.map +1 -0
- package/dist/components/composer/Composer.d.ts +1 -1
- package/dist/components/composer/Composer.d.ts.map +1 -1
- package/dist/components/composer/Composer.js +2 -2
- package/dist/components/composer/Composer.js.map +1 -1
- package/dist/components/dpqlEditor/DpqlEditor.d.ts.map +1 -1
- package/dist/components/dpqlEditor/DpqlEditor.js +41 -8
- package/dist/components/dpqlEditor/DpqlEditor.js.map +1 -1
- package/dist/components/dpqlEditor/dpqlCompletions.d.ts +35 -0
- package/dist/components/dpqlEditor/dpqlCompletions.d.ts.map +1 -0
- package/dist/components/dpqlEditor/dpqlCompletions.js +122 -0
- package/dist/components/dpqlEditor/dpqlCompletions.js.map +1 -0
- package/dist/components/dpqlEditor/dpqlHelpers.d.ts +47 -5
- package/dist/components/dpqlEditor/dpqlHelpers.d.ts.map +1 -1
- package/dist/components/dpqlEditor/dpqlHelpers.js +390 -62
- package/dist/components/dpqlEditor/dpqlHelpers.js.map +1 -1
- package/dist/components/dpqlEditor/dpqlInserter.d.ts.map +1 -1
- package/dist/components/dpqlEditor/dpqlInserter.js +59 -29
- package/dist/components/dpqlEditor/dpqlInserter.js.map +1 -1
- package/dist/components/dpqlEditor/dpqlTags.d.ts +17 -7
- package/dist/components/dpqlEditor/dpqlTags.d.ts.map +1 -1
- package/dist/components/dpqlEditor/dpqlTags.js +44 -17
- package/dist/components/dpqlEditor/dpqlTags.js.map +1 -1
- package/dist/components/dpqlEditor/types.d.ts +61 -8
- package/dist/components/dpqlEditor/types.d.ts.map +1 -1
- package/dist/components/dpqlEditor/useDpqlSession.d.ts +2 -2
- package/dist/components/dpqlEditor/useDpqlSession.d.ts.map +1 -1
- package/dist/components/dpqlEditor/useDpqlSession.js +16 -7
- package/dist/components/dpqlEditor/useDpqlSession.js.map +1 -1
- package/dist/components/form/engine/CompactRow.d.ts.map +1 -1
- package/dist/components/form/engine/CompactRow.js +327 -123
- 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 +29 -3
- package/dist/components/form/engine/CompactToolbar.js.map +1 -1
- package/dist/components/form/engine/FormEngine.d.ts +66 -11
- package/dist/components/form/engine/FormEngine.d.ts.map +1 -1
- package/dist/components/form/engine/FormEngine.js +597 -173
- package/dist/components/form/engine/FormEngine.js.map +1 -1
- package/dist/components/form/engine/HiddenFieldsNote.d.ts +28 -0
- package/dist/components/form/engine/HiddenFieldsNote.d.ts.map +1 -0
- package/dist/components/form/engine/HiddenFieldsNote.js +32 -0
- package/dist/components/form/engine/HiddenFieldsNote.js.map +1 -0
- package/dist/components/form/engine/OptionFieldMessages.d.ts.map +1 -1
- package/dist/components/form/engine/OptionFieldMessages.js +25 -3
- package/dist/components/form/engine/OptionFieldMessages.js.map +1 -1
- package/dist/components/form/engine/OptionsHelpDialog.d.ts.map +1 -1
- package/dist/components/form/engine/OptionsHelpDialog.js +19 -2
- package/dist/components/form/engine/OptionsHelpDialog.js.map +1 -1
- package/dist/components/form/engine/_structuredData/SchemaDataView.d.ts +2 -2
- package/dist/components/form/engine/_structuredData/SchemaDataView.d.ts.map +1 -1
- package/dist/components/form/engine/_structuredData/SchemaDataView.js +12 -6
- package/dist/components/form/engine/_structuredData/SchemaDataView.js.map +1 -1
- package/dist/components/form/engine/compactRowContext.d.ts +32 -1
- 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 +22 -10
- package/dist/components/form/engine/compactRowStyles.d.ts.map +1 -1
- package/dist/components/form/engine/compactRowStyles.js +53 -39
- package/dist/components/form/engine/compactRowStyles.js.map +1 -1
- package/dist/components/form/engine/compactToolbarColors.d.ts +16 -0
- package/dist/components/form/engine/compactToolbarColors.d.ts.map +1 -0
- package/dist/components/form/engine/compactToolbarColors.js +21 -0
- package/dist/components/form/engine/compactToolbarColors.js.map +1 -0
- package/dist/components/form/engine/inheritProps.d.ts +29 -0
- package/dist/components/form/engine/inheritProps.d.ts.map +1 -0
- package/dist/components/form/engine/inheritProps.js +43 -0
- package/dist/components/form/engine/inheritProps.js.map +1 -0
- package/dist/components/form/engine/operatorSummary.d.ts +26 -0
- package/dist/components/form/engine/operatorSummary.d.ts.map +1 -0
- package/dist/components/form/engine/operatorSummary.js +35 -0
- package/dist/components/form/engine/operatorSummary.js.map +1 -0
- package/dist/components/form/engine/readFirst.d.ts +24 -8
- package/dist/components/form/engine/readFirst.d.ts.map +1 -1
- package/dist/components/form/engine/readFirst.js +77 -109
- package/dist/components/form/engine/readFirst.js.map +1 -1
- package/dist/components/form/engine/readFirstColors.d.ts +30 -0
- package/dist/components/form/engine/readFirstColors.d.ts.map +1 -0
- package/dist/components/form/engine/readFirstColors.js +51 -0
- package/dist/components/form/engine/readFirstColors.js.map +1 -0
- package/dist/components/form/engine/rowFocus.d.ts +2 -0
- package/dist/components/form/engine/rowFocus.d.ts.map +1 -1
- package/dist/components/form/engine/rowFocus.js +26 -3
- package/dist/components/form/engine/rowFocus.js.map +1 -1
- package/dist/components/form/engine/typeChoices.d.ts +1 -1
- package/dist/components/form/engine/variants/VariantCalmTable.d.ts.map +1 -1
- package/dist/components/form/engine/variants/VariantCalmTable.js +2 -1
- package/dist/components/form/engine/variants/VariantCalmTable.js.map +1 -1
- package/dist/components/form/engine/variants/VariantCards.d.ts.map +1 -1
- package/dist/components/form/engine/variants/VariantCards.js +2 -1
- package/dist/components/form/engine/variants/VariantCards.js.map +1 -1
- package/dist/components/form/engine/variants/VariantFocus.js +1 -1
- package/dist/components/form/engine/variants/VariantFocus.js.map +1 -1
- package/dist/components/form/engine/variants/VariantMinimal.d.ts.map +1 -1
- package/dist/components/form/engine/variants/VariantMinimal.js +2 -1
- package/dist/components/form/engine/variants/VariantMinimal.js.map +1 -1
- package/dist/components/form/engine/variants/variantParts.d.ts +1 -1
- package/dist/components/form/engine/variants/variantParts.d.ts.map +1 -1
- package/dist/components/form/engine/variants/variantParts.js +25 -17
- package/dist/components/form/engine/variants/variantParts.js.map +1 -1
- package/dist/components/form/expressions/DpqlRendering.d.ts +1 -1
- package/dist/components/form/expressions/DpqlRendering.d.ts.map +1 -1
- package/dist/components/form/expressions/DpqlRendering.js +7 -6
- package/dist/components/form/expressions/DpqlRendering.js.map +1 -1
- package/dist/components/form/expressions/ExpressionField.d.ts +66 -3
- package/dist/components/form/expressions/ExpressionField.d.ts.map +1 -1
- package/dist/components/form/expressions/ExpressionField.js +475 -100
- package/dist/components/form/expressions/ExpressionField.js.map +1 -1
- package/dist/components/form/expressions/argumentPresence.d.ts +14 -0
- package/dist/components/form/expressions/argumentPresence.d.ts.map +1 -1
- package/dist/components/form/expressions/argumentPresence.js +16 -1
- package/dist/components/form/expressions/argumentPresence.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.map +1 -1
- package/dist/components/form/expressions/builder/argumentLabel.js +27 -9
- package/dist/components/form/expressions/builder/argumentLabel.js.map +1 -1
- package/dist/components/form/expressions/builder/argumentWrapper.d.ts.map +1 -1
- package/dist/components/form/expressions/builder/argumentWrapper.js +3 -1
- 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 +5 -4
- package/dist/components/form/expressions/builder/confirmMismatchedTypesModal.js.map +1 -1
- package/dist/components/form/expressions/builder/confirmUnsupportedTypeModal.d.ts +1 -1
- package/dist/components/form/expressions/builder/confirmUnsupportedTypeModal.d.ts.map +1 -1
- package/dist/components/form/expressions/builder/confirmUnsupportedTypeModal.js +6 -3
- package/dist/components/form/expressions/builder/confirmUnsupportedTypeModal.js.map +1 -1
- package/dist/components/form/expressions/builder/index.d.ts +29 -2
- package/dist/components/form/expressions/builder/index.d.ts.map +1 -1
- package/dist/components/form/expressions/builder/index.js +161 -78
- package/dist/components/form/expressions/builder/index.js.map +1 -1
- package/dist/components/form/expressions/builder/item.d.ts +6 -2
- package/dist/components/form/expressions/builder/item.d.ts.map +1 -1
- package/dist/components/form/expressions/builder/item.js +19 -5
- package/dist/components/form/expressions/builder/item.js.map +1 -1
- package/dist/components/form/expressions/builder/renderTemplate.js +1 -1
- package/dist/components/form/expressions/builder/renderTemplate.js.map +1 -1
- package/dist/components/form/expressions/dpqlMockRecordPath.d.ts +11 -0
- package/dist/components/form/expressions/dpqlMockRecordPath.d.ts.map +1 -0
- package/dist/components/form/expressions/dpqlMockRecordPath.js +254 -0
- package/dist/components/form/expressions/dpqlMockRecordPath.js.map +1 -0
- package/dist/components/form/expressions/expressionOperands.d.ts +16 -0
- package/dist/components/form/expressions/expressionOperands.d.ts.map +1 -0
- package/dist/components/form/expressions/expressionOperands.js +97 -0
- package/dist/components/form/expressions/expressionOperands.js.map +1 -0
- package/dist/components/form/expressions/fieldPath.d.ts +24 -0
- package/dist/components/form/expressions/fieldPath.d.ts.map +1 -0
- package/dist/components/form/expressions/fieldPath.js +152 -0
- package/dist/components/form/expressions/fieldPath.js.map +1 -0
- package/dist/components/form/expressions/loneValue.d.ts +17 -0
- package/dist/components/form/expressions/loneValue.d.ts.map +1 -0
- package/dist/components/form/expressions/loneValue.js +33 -0
- package/dist/components/form/expressions/loneValue.js.map +1 -0
- package/dist/components/form/expressions/mockExpressions.d.ts.map +1 -1
- package/dist/components/form/expressions/mockExpressions.js +22 -5
- package/dist/components/form/expressions/mockExpressions.js.map +1 -1
- package/dist/components/form/expressions/renderExpressionToText.d.ts +2 -0
- package/dist/components/form/expressions/renderExpressionToText.d.ts.map +1 -1
- package/dist/components/form/expressions/renderExpressionToText.js +43 -10
- package/dist/components/form/expressions/renderExpressionToText.js.map +1 -1
- package/dist/components/form/expressions/textOfExpression.d.ts +18 -0
- package/dist/components/form/expressions/textOfExpression.d.ts.map +1 -0
- package/dist/components/form/expressions/textOfExpression.js +49 -0
- package/dist/components/form/expressions/textOfExpression.js.map +1 -0
- package/dist/components/form/expressions/types.d.ts +7 -0
- package/dist/components/form/expressions/types.d.ts.map +1 -1
- package/dist/components/form/expressions/types.js +6 -1
- package/dist/components/form/expressions/types.js.map +1 -1
- package/dist/components/form/expressions/useExpressionType.d.ts +26 -0
- package/dist/components/form/expressions/useExpressionType.d.ts.map +1 -0
- package/dist/components/form/expressions/useExpressionType.js +181 -0
- package/dist/components/form/expressions/useExpressionType.js.map +1 -0
- package/dist/components/form/expressions/useRenderExpression.d.ts.map +1 -1
- package/dist/components/form/expressions/useRenderExpression.js +13 -9
- package/dist/components/form/expressions/useRenderExpression.js.map +1 -1
- package/dist/components/form/expressions/wildcardExpressions.d.ts +27 -0
- package/dist/components/form/expressions/wildcardExpressions.d.ts.map +1 -0
- package/dist/components/form/expressions/wildcardExpressions.js +101 -0
- package/dist/components/form/expressions/wildcardExpressions.js.map +1 -0
- package/dist/components/form/fields/Field.d.ts.map +1 -1
- package/dist/components/form/fields/Field.js +43 -20
- package/dist/components/form/fields/Field.js.map +1 -1
- package/dist/components/form/fields/allowed-values/AllowedValues.d.ts.map +1 -1
- package/dist/components/form/fields/allowed-values/AllowedValues.js +39 -6
- package/dist/components/form/fields/allowed-values/AllowedValues.js.map +1 -1
- package/dist/components/form/fields/allowed-values/choicePicture.d.ts +37 -0
- package/dist/components/form/fields/allowed-values/choicePicture.d.ts.map +1 -0
- package/dist/components/form/fields/allowed-values/choicePicture.js +64 -0
- package/dist/components/form/fields/allowed-values/choicePicture.js.map +1 -0
- package/dist/components/form/fields/array/ArrayAuto.d.ts.map +1 -1
- package/dist/components/form/fields/array/ArrayAuto.js +24 -0
- 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 +36 -13
- package/dist/components/form/fields/array/ArrayAutoField.js.map +1 -1
- package/dist/components/form/fields/auto/AutoFormField.d.ts +20 -1
- package/dist/components/form/fields/auto/AutoFormField.d.ts.map +1 -1
- package/dist/components/form/fields/auto/AutoFormField.js +91 -53
- package/dist/components/form/fields/auto/AutoFormField.js.map +1 -1
- package/dist/components/form/fields/auto/hostEditorValue.d.ts +30 -0
- package/dist/components/form/fields/auto/hostEditorValue.d.ts.map +1 -0
- package/dist/components/form/fields/auto/hostEditorValue.js +53 -0
- package/dist/components/form/fields/auto/hostEditorValue.js.map +1 -0
- package/dist/components/form/fields/binary/Binary.d.ts.map +1 -1
- package/dist/components/form/fields/binary/Binary.js +23 -3
- package/dist/components/form/fields/binary/Binary.js.map +1 -1
- package/dist/components/form/fields/boolean/Boolean.d.ts +5 -0
- package/dist/components/form/fields/boolean/Boolean.d.ts.map +1 -1
- package/dist/components/form/fields/boolean/Boolean.js +9 -1
- package/dist/components/form/fields/boolean/Boolean.js.map +1 -1
- package/dist/components/form/fields/color/Color.d.ts +103 -16
- package/dist/components/form/fields/color/Color.d.ts.map +1 -1
- package/dist/components/form/fields/color/Color.js +616 -16
- package/dist/components/form/fields/color/Color.js.map +1 -1
- package/dist/components/form/fields/emittedValues.d.ts +34 -3
- package/dist/components/form/fields/emittedValues.d.ts.map +1 -1
- package/dist/components/form/fields/emittedValues.js +24 -1
- package/dist/components/form/fields/emittedValues.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 +4 -2
- package/dist/components/form/fields/file/File.js.map +1 -1
- package/dist/components/form/fields/long-string/LongString.d.ts.map +1 -1
- package/dist/components/form/fields/long-string/LongString.js +29 -8
- package/dist/components/form/fields/long-string/LongString.js.map +1 -1
- package/dist/components/form/fields/markdown/MarkdownView.js +1 -1
- package/dist/components/form/fields/multi-select/MultiSelectFormField.d.ts.map +1 -1
- package/dist/components/form/fields/multi-select/MultiSelectFormField.js +13 -9
- package/dist/components/form/fields/multi-select/MultiSelectFormField.js.map +1 -1
- package/dist/components/form/fields/number/Number.d.ts +6 -0
- package/dist/components/form/fields/number/Number.d.ts.map +1 -1
- package/dist/components/form/fields/number/Number.js +41 -6
- package/dist/components/form/fields/number/Number.js.map +1 -1
- package/dist/components/form/fields/object/Object.d.ts +1 -1
- package/dist/components/form/fields/object/Object.d.ts.map +1 -1
- package/dist/components/form/fields/object/Object.js +4 -2
- package/dist/components/form/fields/object/Object.js.map +1 -1
- package/dist/components/form/fields/pendingEdit.d.ts +52 -0
- package/dist/components/form/fields/pendingEdit.d.ts.map +1 -0
- package/dist/components/form/fields/pendingEdit.js +79 -0
- package/dist/components/form/fields/pendingEdit.js.map +1 -0
- package/dist/components/form/fields/radio-group/RadioGroup.d.ts.map +1 -1
- package/dist/components/form/fields/radio-group/RadioGroup.js +4 -3
- package/dist/components/form/fields/radio-group/RadioGroup.js.map +1 -1
- package/dist/components/form/fields/rich-text/RichText.d.ts +8 -1
- package/dist/components/form/fields/rich-text/RichText.d.ts.map +1 -1
- package/dist/components/form/fields/rich-text/RichText.js +211 -85
- package/dist/components/form/fields/rich-text/RichText.js.map +1 -1
- package/dist/components/form/fields/rich-text/useTemplateTags.d.ts +18 -0
- package/dist/components/form/fields/rich-text/useTemplateTags.d.ts.map +1 -0
- package/dist/components/form/fields/rich-text/useTemplateTags.js +77 -0
- package/dist/components/form/fields/rich-text/useTemplateTags.js.map +1 -0
- package/dist/components/form/fields/schema-definition/CatalogLeafForm.d.ts.map +1 -1
- package/dist/components/form/fields/schema-definition/CatalogLeafForm.js +4 -1
- package/dist/components/form/fields/schema-definition/CatalogLeafForm.js.map +1 -1
- package/dist/components/form/fields/schema-definition/CatalogNodeEditor.d.ts.map +1 -1
- package/dist/components/form/fields/schema-definition/CatalogNodeEditor.js +20 -5
- package/dist/components/form/fields/schema-definition/CatalogNodeEditor.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 +10 -2
- package/dist/components/form/fields/schema-definition/TableEditor.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 +8 -4
- package/dist/components/form/fields/schema-definition/index.js.map +1 -1
- package/dist/components/form/fields/select/Select.d.ts +10 -1
- package/dist/components/form/fields/select/Select.d.ts.map +1 -1
- package/dist/components/form/fields/select/Select.js +28 -14
- package/dist/components/form/fields/select/Select.js.map +1 -1
- package/dist/components/form/fields/select/SelectCollection.d.ts +5 -0
- package/dist/components/form/fields/select/SelectCollection.d.ts.map +1 -1
- package/dist/components/form/fields/select/SelectCollection.js +25 -12
- package/dist/components/form/fields/select/SelectCollection.js.map +1 -1
- package/dist/components/form/fields/select/unavailableRow.d.ts +23 -0
- package/dist/components/form/fields/select/unavailableRow.d.ts.map +1 -0
- package/dist/components/form/fields/select/unavailableRow.js +55 -0
- package/dist/components/form/fields/select/unavailableRow.js.map +1 -0
- package/dist/components/form/fields/template/ReadOnlyTemplateTag.d.ts +11 -5
- package/dist/components/form/fields/template/ReadOnlyTemplateTag.d.ts.map +1 -1
- package/dist/components/form/fields/template/ReadOnlyTemplateTag.js +21 -5
- package/dist/components/form/fields/template/ReadOnlyTemplateTag.js.map +1 -1
- package/dist/components/form/fields/template/TemplateBrowser.d.ts +22 -0
- package/dist/components/form/fields/template/TemplateBrowser.d.ts.map +1 -0
- package/dist/components/form/fields/template/TemplateBrowser.js +54 -0
- package/dist/components/form/fields/template/TemplateBrowser.js.map +1 -0
- package/dist/components/form/fields/template/TemplateField.d.ts +103 -1
- package/dist/components/form/fields/template/TemplateField.d.ts.map +1 -1
- package/dist/components/form/fields/template/TemplateField.js +652 -104
- package/dist/components/form/fields/template/TemplateField.js.map +1 -1
- package/dist/components/form/fields/template/TemplateText.d.ts +0 -17
- package/dist/components/form/fields/template/TemplateText.d.ts.map +1 -1
- package/dist/components/form/fields/template/TemplateText.js +22 -16
- package/dist/components/form/fields/template/TemplateText.js.map +1 -1
- package/dist/components/form/fields/template/referenceNames.d.ts +63 -0
- package/dist/components/form/fields/template/referenceNames.d.ts.map +1 -0
- package/dist/components/form/fields/template/referenceNames.js +69 -0
- package/dist/components/form/fields/template/referenceNames.js.map +1 -0
- package/dist/components/form/fields/template/writtenAsText.d.ts +61 -0
- package/dist/components/form/fields/template/writtenAsText.d.ts.map +1 -0
- package/dist/components/form/fields/template/writtenAsText.js +204 -0
- package/dist/components/form/fields/template/writtenAsText.js.map +1 -0
- package/dist/components/form/index.d.ts +11 -0
- package/dist/components/form/index.d.ts.map +1 -1
- package/dist/components/form/index.js +24 -1
- package/dist/components/form/index.js.map +1 -1
- package/dist/components/form/typeSentenceForm.d.ts +11 -0
- package/dist/components/form/typeSentenceForm.d.ts.map +1 -0
- package/dist/components/form/typeSentenceForm.js +40 -0
- package/dist/components/form/typeSentenceForm.js.map +1 -0
- package/dist/components/imageLightbox/ImageLightbox.d.ts.map +1 -1
- package/dist/components/imageLightbox/ImageLightbox.js +19 -7
- package/dist/components/imageLightbox/ImageLightbox.js.map +1 -1
- package/dist/components/log/Log.d.ts.map +1 -1
- package/dist/components/log/Log.js +16 -8
- package/dist/components/log/Log.js.map +1 -1
- package/dist/components/menu/Menu.d.ts.map +1 -1
- package/dist/components/menu/Menu.js +19 -10
- package/dist/components/menu/Menu.js.map +1 -1
- package/dist/components/smartEditor/CompletionMenu.d.ts +45 -0
- package/dist/components/smartEditor/CompletionMenu.d.ts.map +1 -0
- package/dist/components/smartEditor/CompletionMenu.js +207 -0
- package/dist/components/smartEditor/CompletionMenu.js.map +1 -0
- package/dist/components/smartEditor/MarkdownDoc.d.ts +1 -1
- package/dist/components/smartEditor/MarkdownDoc.js +3 -3
- package/dist/components/smartEditor/MarkdownDoc.js.map +1 -1
- package/dist/components/smartEditor/SmartEditor.d.ts.map +1 -1
- package/dist/components/smartEditor/SmartEditor.js +366 -187
- package/dist/components/smartEditor/SmartEditor.js.map +1 -1
- package/dist/components/smartEditor/completionStyle.d.ts +27 -0
- package/dist/components/smartEditor/completionStyle.d.ts.map +1 -0
- package/dist/components/smartEditor/completionStyle.js +68 -0
- package/dist/components/smartEditor/completionStyle.js.map +1 -0
- package/dist/components/smartEditor/index.d.ts +5 -1
- package/dist/components/smartEditor/index.d.ts.map +1 -1
- package/dist/components/smartEditor/index.js +19 -1
- package/dist/components/smartEditor/index.js.map +1 -1
- package/dist/components/smartEditor/templateCompletions.d.ts +38 -0
- package/dist/components/smartEditor/templateCompletions.d.ts.map +1 -0
- package/dist/components/smartEditor/templateCompletions.js +126 -0
- package/dist/components/smartEditor/templateCompletions.js.map +1 -0
- package/dist/components/smartEditor/typedReferences.d.ts +21 -0
- package/dist/components/smartEditor/typedReferences.d.ts.map +1 -0
- package/dist/components/smartEditor/typedReferences.js +82 -0
- package/dist/components/smartEditor/typedReferences.js.map +1 -0
- package/dist/components/smartEditor/types.d.ts +66 -2
- package/dist/components/smartEditor/types.d.ts.map +1 -1
- package/dist/components/smartEditor/useLspAutocomplete.d.ts +62 -2
- package/dist/components/smartEditor/useLspAutocomplete.d.ts.map +1 -1
- package/dist/components/smartEditor/useLspAutocomplete.js +345 -146
- package/dist/components/smartEditor/useLspAutocomplete.js.map +1 -1
- package/dist/components/smartEditor/useLspHover.d.ts +33 -7
- package/dist/components/smartEditor/useLspHover.d.ts.map +1 -1
- package/dist/components/smartEditor/useLspHover.js +351 -35
- package/dist/components/smartEditor/useLspHover.js.map +1 -1
- package/dist/components/smartEditor/useLspSemanticTokens.js +1 -1
- package/dist/components/smartEditor/useLspSemanticTokens.js.map +1 -1
- package/dist/components/smartEditor/useLspSession.d.ts +6 -0
- package/dist/components/smartEditor/useLspSession.d.ts.map +1 -1
- package/dist/components/smartEditor/useLspSession.js +7 -6
- package/dist/components/smartEditor/useLspSession.js.map +1 -1
- package/dist/components/smartEditor/useLspSignatureHelp.d.ts.map +1 -1
- package/dist/components/smartEditor/useLspSignatureHelp.js +6 -11
- package/dist/components/smartEditor/useLspSignatureHelp.js.map +1 -1
- package/dist/components/supportTicket/AttachmentChips.d.ts.map +1 -1
- package/dist/components/supportTicket/AttachmentChips.js +15 -5
- package/dist/components/supportTicket/AttachmentChips.js.map +1 -1
- package/dist/components/supportTicket/ReferencePicker.d.ts +9 -2
- package/dist/components/supportTicket/ReferencePicker.d.ts.map +1 -1
- package/dist/components/supportTicket/ReferencePicker.js +27 -6
- package/dist/components/supportTicket/ReferencePicker.js.map +1 -1
- package/dist/components/supportTicket/TicketHeader.d.ts +3 -4
- package/dist/components/supportTicket/TicketHeader.d.ts.map +1 -1
- package/dist/components/supportTicket/TicketHeader.js +20 -2
- package/dist/components/supportTicket/TicketHeader.js.map +1 -1
- package/dist/components/supportTicket/TicketMetaTags.d.ts +1 -1
- package/dist/components/ticketReferences/TicketReferences.d.ts.map +1 -1
- package/dist/components/ticketReferences/TicketReferences.js +9 -4
- package/dist/components/ticketReferences/TicketReferences.js.map +1 -1
- package/dist/components/ticketThread/TicketThread.d.ts.map +1 -1
- package/dist/components/ticketThread/TicketThread.js +38 -13
- package/dist/components/ticketThread/TicketThread.js.map +1 -1
- package/dist/helpers/allowedValues.d.ts +21 -0
- package/dist/helpers/allowedValues.d.ts.map +1 -1
- package/dist/helpers/allowedValues.js +40 -1
- package/dist/helpers/allowedValues.js.map +1 -1
- package/dist/helpers/descriptionTooltip.d.ts +46 -0
- package/dist/helpers/descriptionTooltip.d.ts.map +1 -0
- package/dist/helpers/descriptionTooltip.js +76 -0
- package/dist/helpers/descriptionTooltip.js.map +1 -0
- package/dist/helpers/domProps.d.ts +5 -0
- package/dist/helpers/domProps.d.ts.map +1 -0
- package/dist/helpers/domProps.js +47 -0
- package/dist/helpers/domProps.js.map +1 -0
- package/dist/helpers/expressions.d.ts +107 -2
- package/dist/helpers/expressions.d.ts.map +1 -1
- package/dist/helpers/expressions.js +223 -8
- package/dist/helpers/expressions.js.map +1 -1
- package/dist/helpers/hoveringPointer.d.ts +26 -0
- package/dist/helpers/hoveringPointer.d.ts.map +1 -0
- package/dist/helpers/hoveringPointer.js +29 -0
- package/dist/helpers/hoveringPointer.js.map +1 -0
- package/dist/helpers/markdownText.d.ts +14 -0
- package/dist/helpers/markdownText.d.ts.map +1 -0
- package/dist/helpers/markdownText.js +160 -0
- package/dist/helpers/markdownText.js.map +1 -0
- package/dist/helpers/noDescription.d.ts +9 -0
- package/dist/helpers/noDescription.d.ts.map +1 -0
- package/dist/helpers/noDescription.js +13 -0
- package/dist/helpers/noDescription.js.map +1 -0
- package/dist/helpers/optionUiTypes.d.ts +2 -2
- package/dist/helpers/qorusTypeCatalogue.d.ts +85 -0
- package/dist/helpers/qorusTypeCatalogue.d.ts.map +1 -0
- package/dist/helpers/qorusTypeCatalogue.js +301 -0
- package/dist/helpers/qorusTypeCatalogue.js.map +1 -0
- package/dist/helpers/readableColors.d.ts +36 -0
- package/dist/helpers/readableColors.d.ts.map +1 -0
- package/dist/helpers/readableColors.js +116 -0
- package/dist/helpers/readableColors.js.map +1 -0
- package/dist/helpers/recordFieldReference.d.ts +15 -0
- package/dist/helpers/recordFieldReference.d.ts.map +1 -0
- package/dist/helpers/recordFieldReference.js +89 -0
- package/dist/helpers/recordFieldReference.js.map +1 -0
- package/dist/helpers/templateItems.d.ts +2 -2
- package/dist/helpers/templateItems.d.ts.map +1 -1
- package/dist/helpers/templateItems.js +6 -4
- package/dist/helpers/templateItems.js.map +1 -1
- package/dist/helpers/templateText.d.ts +1 -0
- package/dist/helpers/templateText.d.ts.map +1 -1
- package/dist/helpers/templateText.js +7 -3
- package/dist/helpers/templateText.js.map +1 -1
- package/dist/helpers/templates.d.ts +68 -14
- package/dist/helpers/templates.d.ts.map +1 -1
- package/dist/helpers/templates.js +210 -24
- package/dist/helpers/templates.js.map +1 -1
- package/dist/helpers/validations.d.ts +28 -1
- package/dist/helpers/validations.d.ts.map +1 -1
- package/dist/helpers/validations.js +166 -37
- package/dist/helpers/validations.js.map +1 -1
- package/dist/helpers/webLink.d.ts +8 -0
- package/dist/helpers/webLink.d.ts.map +1 -0
- package/dist/helpers/webLink.js +29 -0
- package/dist/helpers/webLink.js.map +1 -0
- package/dist/hooks/useQorusTypes.d.ts +7 -15
- package/dist/hooks/useQorusTypes.d.ts.map +1 -1
- package/dist/hooks/useQorusTypes.js +25 -166
- package/dist/hooks/useQorusTypes.js.map +1 -1
- package/dist/hooks/useReadableIntentShade.d.ts +9 -0
- package/dist/hooks/useReadableIntentShade.d.ts.map +1 -0
- package/dist/hooks/useReadableIntentShade.js +23 -0
- package/dist/hooks/useReadableIntentShade.js.map +1 -0
- package/dist/hooks/useReadableOpacity.d.ts +6 -0
- package/dist/hooks/useReadableOpacity.d.ts.map +1 -0
- package/dist/hooks/useReadableOpacity.js +17 -0
- package/dist/hooks/useReadableOpacity.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/tracking/ui/ExperimentCard.d.ts +1 -1
- package/dist/tracking/ui/ExperimentCard.d.ts.map +1 -1
- package/dist/tracking/ui/ExperimentCard.js +26 -10
- package/dist/tracking/ui/ExperimentCard.js.map +1 -1
- package/dist/tracking/ui/card.d.ts +2 -2
- package/dist/tracking/ui/card.d.ts.map +1 -1
- package/dist/tracking/ui/card.js +2 -2
- package/dist/tracking/ui/card.js.map +1 -1
- package/dist/tracking/ui/readable.d.ts +14 -0
- package/dist/tracking/ui/readable.d.ts.map +1 -0
- package/dist/tracking/ui/readable.js +60 -0
- package/dist/tracking/ui/readable.js.map +1 -0
- package/dist/utils/fetch.d.ts +9 -2
- package/dist/utils/fetch.d.ts.map +1 -1
- package/dist/utils/fetch.js +6 -5
- package/dist/utils/fetch.js.map +1 -1
- package/dist/utils/websocket.d.ts +65 -2
- package/dist/utils/websocket.d.ts.map +1 -1
- package/dist/utils/websocket.js +276 -44
- package/dist/utils/websocket.js.map +1 -1
- package/package.json +14 -5
- package/.claude/CLAUDE.md +0 -317
- package/.tasks/EXPORT_EXPRESSION_BUILDER.md +0 -38
- package/.tasks/EXPRESSION_BUILDER_REPORT.md +0 -149
- package/.tasks/EXPRESSION_FIELD_SEAMS.md +0 -66
- package/.tasks/FIELD_STACK_REPORT.md +0 -234
- package/.tasks/FORM_ENGINE_COMPACT_READ_FIRST.md +0 -558
- package/.tasks/FORM_ENGINE_EXPRESSIONS.md +0 -197
- package/.tasks/FORM_ENGINE_OPTIONS_SYNC.md +0 -95
- package/.tasks/FORM_FIELD_EXTRAS.md +0 -72
- package/.tasks/INDEX.md +0 -111
- package/.tasks/LSP_SHARED_CONNECTION.md +0 -75
- package/.tasks/QONSOLE_ASSIST_FEATURES.md +0 -306
- package/.tasks/RENDER_EXPRESSION_LSP.md +0 -159
- package/.tasks/REQRAFT_AUTO_FIELD.md +0 -176
- package/.tasks/SCHEMA_DEFINITION_FIELD.md +0 -250
- package/.tasks/SMART_EDITOR_CONTEXT_AND_POLISH.md +0 -340
- package/.tasks/SMART_EDITOR_LSP_FEATURES.md +0 -299
- package/.tasks/SMART_EDITOR_REVIEW_FOLLOWUPS.md +0 -280
- package/.tasks/SMART_EDITOR_UX_POLISH.md +0 -383
- package/.tasks/SMART_EDITOR_VISUAL_POLISH.md +0 -246
- package/.tasks/STORY_NETWORK_ISOLATION.md +0 -98
- package/.tasks/TEMPLATE_TOKEN_GRAMMAR.md +0 -72
- package/CODE_OF_CONDUCT.md +0 -105
- package/CONTRIBUTING.MD +0 -78
- package/SECURITY.md +0 -3
- package/chromatic.config.json +0 -5
- package/design/COMPACT_ENGINE_REDESIGN.md +0 -156
- package/design/COMPACT_INFO_DISPLAY.md +0 -87
- package/design/COMPACT_PARITY.md +0 -85
- package/design/EXPRESSION_BUILDER_REPORT_STRATEGY.md +0 -92
- package/design/FORM_ENGINE_COMPACT.md +0 -300
- package/design/FORM_ENGINE_COMPACT_UX_PLAN.md +0 -353
- package/design/FORM_ENGINE_EXPRESSIONS.md +0 -257
- package/design/FORM_ENGINE_FIELD_MIGRATION.md +0 -419
- package/design/IDE_INTEGRATION.md +0 -64
- package/design/RENDER_EXPRESSION_TRANSPORT.md +0 -156
- package/design/SELECT_DIALOG_FLOOR.md +0 -86
- package/design/SMART_EDITOR_UX.md +0 -438
- package/design/TRACKING.md +0 -290
- package/design/UNAVAILABLE_ALLOWED_VALUES.md +0 -226
- package/src/components/Description/index.tsx +0 -254
- package/src/components/Description/markdownRendererContext.tsx +0 -29
- package/src/components/FocusedEditing/index.tsx +0 -50
- package/src/components/codeSize/index.tsx +0 -79
- package/src/components/composer/Composer.stories.tsx +0 -238
- package/src/components/composer/Composer.tsx +0 -554
- package/src/components/composer/helpers.ts +0 -74
- package/src/components/composer/index.ts +0 -2
- package/src/components/dpqlEditor/DpqlEditor.stories.tsx +0 -1183
- package/src/components/dpqlEditor/DpqlEditor.tsx +0 -219
- package/src/components/dpqlEditor/dpqlHelpers.ts +0 -287
- package/src/components/dpqlEditor/dpqlInserter.ts +0 -121
- package/src/components/dpqlEditor/dpqlProbe.ts +0 -165
- package/src/components/dpqlEditor/dpqlTags.ts +0 -114
- package/src/components/dpqlEditor/index.ts +0 -41
- package/src/components/dpqlEditor/types.ts +0 -203
- package/src/components/dpqlEditor/useDpqlProbe.ts +0 -33
- package/src/components/dpqlEditor/useDpqlSession.ts +0 -411
- package/src/components/form/engine/CompactRow.tsx +0 -2620
- package/src/components/form/engine/CompactToolbar.tsx +0 -330
- package/src/components/form/engine/FormEngine.stories.tsx +0 -9920
- package/src/components/form/engine/FormEngine.tsx +0 -4569
- package/src/components/form/engine/FormEngineRemote.stories.tsx +0 -679
- package/src/components/form/engine/FormEngineStickyHeaders.stories.tsx +0 -331
- package/src/components/form/engine/FormFieldsSkeleton.tsx +0 -82
- package/src/components/form/engine/OptionFieldMessages.tsx +0 -477
- package/src/components/form/engine/OptionsHelpDialog.tsx +0 -29
- package/src/components/form/engine/__fixtures__/basicFormOptions.ts +0 -309
- package/src/components/form/engine/__fixtures__/fieldChromeOptions.ts +0 -45
- package/src/components/form/engine/_structuredData/SchemaDataView.stories.tsx +0 -233
- package/src/components/form/engine/_structuredData/SchemaDataView.tsx +0 -742
- package/src/components/form/engine/_structuredData/StructuredDataView.stories.tsx +0 -85
- package/src/components/form/engine/_structuredData/StructuredDataView.tsx +0 -75
- package/src/components/form/engine/_structuredData/structuredData.ts +0 -145
- package/src/components/form/engine/compactRowContext.ts +0 -148
- package/src/components/form/engine/compactRowStyles.ts +0 -898
- package/src/components/form/engine/compactToolbarContext.ts +0 -69
- package/src/components/form/engine/optionActions.ts +0 -128
- package/src/components/form/engine/optionsContext.ts +0 -24
- package/src/components/form/engine/readFirst.ts +0 -1077
- package/src/components/form/engine/rendererTypes.ts +0 -107
- package/src/components/form/engine/revealRow.ts +0 -123
- package/src/components/form/engine/rowFocus.ts +0 -101
- package/src/components/form/engine/rowMenuContext.ts +0 -159
- package/src/components/form/engine/rowOpenPicker.ts +0 -27
- package/src/components/form/engine/typeChoices.ts +0 -63
- package/src/components/form/engine/variants/FormEngineVariants.stories.tsx +0 -159
- package/src/components/form/engine/variants/VariantCalmTable.tsx +0 -244
- package/src/components/form/engine/variants/VariantCards.tsx +0 -212
- package/src/components/form/engine/variants/VariantFocus.tsx +0 -382
- package/src/components/form/engine/variants/VariantMinimal.tsx +0 -170
- package/src/components/form/engine/variants/focusDemo.ts +0 -145
- package/src/components/form/engine/variants/variantModel.ts +0 -223
- package/src/components/form/engine/variants/variantParts.tsx +0 -313
- package/src/components/form/expressions/DpqlRendering.tsx +0 -85
- package/src/components/form/expressions/ExpressionField.stories.tsx +0 -1395
- package/src/components/form/expressions/ExpressionField.tsx +0 -503
- package/src/components/form/expressions/argumentPresence.ts +0 -213
- package/src/components/form/expressions/builder/ExpressionBuilder.stories.tsx +0 -1683
- package/src/components/form/expressions/builder/argumentDetail.tsx +0 -17
- package/src/components/form/expressions/builder/argumentLabel.tsx +0 -146
- package/src/components/form/expressions/builder/argumentSlot.tsx +0 -101
- package/src/components/form/expressions/builder/argumentWrapper.tsx +0 -243
- package/src/components/form/expressions/builder/confirmMismatchedTypesModal.tsx +0 -120
- package/src/components/form/expressions/builder/confirmUnsupportedTypeModal.tsx +0 -69
- package/src/components/form/expressions/builder/index.tsx +0 -1545
- package/src/components/form/expressions/builder/item.tsx +0 -89
- package/src/components/form/expressions/builder/moveToPositionStrip.tsx +0 -156
- package/src/components/form/expressions/builder/renderTemplate.tsx +0 -42
- package/src/components/form/expressions/dpqlMockLanguage.ts +0 -566
- package/src/components/form/expressions/dpqlMockLsp.ts +0 -126
- package/src/components/form/expressions/mockExpressions.ts +0 -317
- package/src/components/form/expressions/renderExpressionToText.ts +0 -137
- package/src/components/form/expressions/types.ts +0 -110
- package/src/components/form/expressions/useExpressions.ts +0 -101
- package/src/components/form/expressions/useRenderExpression.ts +0 -165
- package/src/components/form/fields/Field.stories.tsx +0 -143
- package/src/components/form/fields/Field.tsx +0 -732
- package/src/components/form/fields/allowed-values/AllowedValues.tsx +0 -297
- package/src/components/form/fields/array/ArrayAuto.tsx +0 -237
- package/src/components/form/fields/array/ArrayAutoField.stories.tsx +0 -475
- package/src/components/form/fields/array/ArrayAutoField.tsx +0 -367
- package/src/components/form/fields/auto/AutoFormField.stories.tsx +0 -825
- package/src/components/form/fields/auto/AutoFormField.tsx +0 -1164
- package/src/components/form/fields/binary/Binary.stories.tsx +0 -122
- package/src/components/form/fields/binary/Binary.tsx +0 -91
- package/src/components/form/fields/boolean/Boolean.stories.tsx +0 -125
- package/src/components/form/fields/boolean/Boolean.tsx +0 -34
- package/src/components/form/fields/byte-size/ByteSize.stories.tsx +0 -87
- package/src/components/form/fields/byte-size/ByteSize.tsx +0 -58
- package/src/components/form/fields/color/Color.stories.tsx +0 -99
- package/src/components/form/fields/color/Color.tsx +0 -46
- package/src/components/form/fields/cron/Cron.stories.tsx +0 -68
- package/src/components/form/fields/cron/Cron.tsx +0 -80
- package/src/components/form/fields/date/Date.stories.tsx +0 -77
- package/src/components/form/fields/date/Date.tsx +0 -55
- package/src/components/form/fields/emittedValues.ts +0 -70
- package/src/components/form/fields/file/File.stories.tsx +0 -161
- package/src/components/form/fields/file/File.tsx +0 -227
- package/src/components/form/fields/long-string/LongString.stories.tsx +0 -120
- package/src/components/form/fields/long-string/LongString.tsx +0 -130
- package/src/components/form/fields/markdown/Markdown.stories.tsx +0 -76
- package/src/components/form/fields/markdown/Markdown.tsx +0 -81
- package/src/components/form/fields/markdown/MarkdownView.tsx +0 -222
- package/src/components/form/fields/multi-select/MultiSelectFormField.tsx +0 -139
- package/src/components/form/fields/number/Number.stories.tsx +0 -159
- package/src/components/form/fields/number/Number.tsx +0 -160
- package/src/components/form/fields/object/Object.stories.tsx +0 -398
- package/src/components/form/fields/object/Object.tsx +0 -255
- package/src/components/form/fields/radio-group/RadioGroup.stories.tsx +0 -95
- package/src/components/form/fields/radio-group/RadioGroup.tsx +0 -46
- package/src/components/form/fields/radio-group/images/java-96x128.png +0 -0
- package/src/components/form/fields/radio-group/images/python-129x128.png +0 -0
- package/src/components/form/fields/radio-group/images/qore-106x128.png +0 -0
- package/src/components/form/fields/rich-text/RichText.stories.tsx +0 -260
- package/src/components/form/fields/rich-text/RichText.tsx +0 -537
- package/src/components/form/fields/schema-definition/CatalogLeafForm.tsx +0 -242
- package/src/components/form/fields/schema-definition/CatalogNodeEditor.tsx +0 -758
- package/src/components/form/fields/schema-definition/Hint.tsx +0 -22
- package/src/components/form/fields/schema-definition/InlineValidationBanner.tsx +0 -138
- package/src/components/form/fields/schema-definition/Loader.tsx +0 -20
- package/src/components/form/fields/schema-definition/MigrationsTab.tsx +0 -187
- package/src/components/form/fields/schema-definition/SchemaDefinitionField.stories.tsx +0 -286
- package/src/components/form/fields/schema-definition/TableEditor.tsx +0 -155
- package/src/components/form/fields/schema-definition/TablesTab.tsx +0 -138
- package/src/components/form/fields/schema-definition/catalog.ts +0 -237
- package/src/components/form/fields/schema-definition/helpers.ts +0 -90
- package/src/components/form/fields/schema-definition/index.tsx +0 -418
- package/src/components/form/fields/schema-definition/mockCatalog.ts +0 -325
- package/src/components/form/fields/schema-definition/mockDefinition.ts +0 -111
- package/src/components/form/fields/schema-definition/referenceSuggestions.tsx +0 -152
- package/src/components/form/fields/schema-definition/starterTemplate.ts +0 -68
- package/src/components/form/fields/schema-definition/types.ts +0 -185
- package/src/components/form/fields/schema-definition/useSchemaOptionCatalog.ts +0 -49
- package/src/components/form/fields/select/Select.stories.tsx +0 -872
- package/src/components/form/fields/select/Select.tsx +0 -624
- package/src/components/form/fields/select/SelectCollection.tsx +0 -594
- package/src/components/form/fields/string/String.stories.tsx +0 -86
- package/src/components/form/fields/string/String.tsx +0 -43
- package/src/components/form/fields/template/ExampleValueModal.stories.tsx +0 -114
- package/src/components/form/fields/template/ExampleValueModal.tsx +0 -99
- package/src/components/form/fields/template/ReadOnlyTemplateTag.tsx +0 -47
- package/src/components/form/fields/template/TemplateField.stories.tsx +0 -1121
- package/src/components/form/fields/template/TemplateField.tsx +0 -1717
- package/src/components/form/fields/template/TemplateText.tsx +0 -115
- package/src/components/form/fields/template/__fixtures__/longExampleValue.ts +0 -7
- package/src/components/form/fields/template/__fixtures__/multiLevelTemplates.json +0 -147
- package/src/components/form/fields/template/__fixtures__/templates.json +0 -83
- package/src/components/form/fields/timeout/Timeout.stories.tsx +0 -228
- package/src/components/form/fields/timeout/Timeout.tsx +0 -87
- package/src/components/form/fields/url/Url.stories.tsx +0 -94
- package/src/components/form/fields/url/Url.tsx +0 -85
- package/src/components/form/index.tsx +0 -47
- package/src/components/imageLightbox/ImageLightbox.stories.tsx +0 -238
- package/src/components/imageLightbox/ImageLightbox.tsx +0 -236
- package/src/components/imageLightbox/index.ts +0 -1
- package/src/components/log/Log.stories.tsx +0 -333
- package/src/components/log/Log.tsx +0 -285
- package/src/components/menu/Menu.stories.tsx +0 -155
- package/src/components/menu/Menu.tsx +0 -312
- package/src/components/qonsoleSmartInput/QonsoleSmartInput.stories.tsx +0 -797
- package/src/components/qonsoleSmartInput/QonsoleSmartInput.tsx +0 -105
- package/src/components/qonsoleSmartInput/index.ts +0 -16
- package/src/components/qonsoleSmartInput/qonsoleInserter.ts +0 -77
- package/src/components/qonsoleSmartInput/types.ts +0 -133
- package/src/components/qonsoleSmartInput/useQonsoleSession.ts +0 -124
- package/src/components/searchFilterBar/SearchFilterBar.stories.tsx +0 -62
- package/src/components/searchFilterBar/SearchFilterBar.tsx +0 -144
- package/src/components/searchFilterBar/index.ts +0 -1
- package/src/components/smartEditor/MarkdownDoc.tsx +0 -190
- package/src/components/smartEditor/SmartEditor.stories.tsx +0 -475
- package/src/components/smartEditor/SmartEditor.tsx +0 -808
- package/src/components/smartEditor/__fixtures__/mockLspServer.ts +0 -205
- package/src/components/smartEditor/helpers.ts +0 -217
- package/src/components/smartEditor/index.ts +0 -35
- package/src/components/smartEditor/styling.ts +0 -45
- package/src/components/smartEditor/types.ts +0 -211
- package/src/components/smartEditor/useLspAutocomplete.ts +0 -758
- package/src/components/smartEditor/useLspDiagnosticDecorations.ts +0 -125
- package/src/components/smartEditor/useLspHover.ts +0 -230
- package/src/components/smartEditor/useLspSemanticTokens.ts +0 -298
- package/src/components/smartEditor/useLspSession.ts +0 -231
- package/src/components/smartEditor/useLspSignatureHelp.ts +0 -198
- package/src/components/supportTicket/AttachmentChips.stories.tsx +0 -171
- package/src/components/supportTicket/AttachmentChips.tsx +0 -147
- package/src/components/supportTicket/InterfaceReferenceTags.stories.tsx +0 -257
- package/src/components/supportTicket/InterfaceReferenceTags.tsx +0 -129
- package/src/components/supportTicket/ReferencePicker.stories.tsx +0 -584
- package/src/components/supportTicket/ReferencePicker.tsx +0 -563
- package/src/components/supportTicket/TicketConversation.stories.tsx +0 -121
- package/src/components/supportTicket/TicketHeader.stories.tsx +0 -183
- package/src/components/supportTicket/TicketHeader.tsx +0 -247
- package/src/components/supportTicket/TicketMetaTags.stories.tsx +0 -103
- package/src/components/supportTicket/TicketMetaTags.tsx +0 -85
- package/src/components/supportTicket/TicketReplyBox.stories.tsx +0 -354
- package/src/components/supportTicket/TicketReplyBox.tsx +0 -150
- package/src/components/supportTicket/__fixtures__/kindMarks.ts +0 -28
- package/src/components/supportTicket/attachmentAccess.ts +0 -97
- package/src/components/supportTicket/fileToAttachment.ts +0 -24
- package/src/components/supportTicket/index.ts +0 -10
- package/src/components/supportTicket/meta.ts +0 -206
- package/src/components/supportTicket/ticketModel.ts +0 -131
- package/src/components/supportTicket/useLoadedImages.ts +0 -73
- package/src/components/ticketReferences/TicketReferences.stories.tsx +0 -315
- package/src/components/ticketReferences/TicketReferences.tsx +0 -906
- package/src/components/ticketReferences/index.ts +0 -2
- package/src/components/ticketThread/TicketThread.stories.tsx +0 -829
- package/src/components/ticketThread/TicketThread.tsx +0 -719
- package/src/components/ticketThread/index.ts +0 -6
- package/src/contexts/FetchContext.tsx +0 -25
- package/src/contexts/ReqraftContext.tsx +0 -9
- package/src/contexts/StorageContext.tsx +0 -33
- package/src/global.d.ts +0 -4
- package/src/helpers/allowedValues.ts +0 -249
- package/src/helpers/choiceChip.ts +0 -227
- package/src/helpers/common.ts +0 -326
- package/src/helpers/dpqlDetection.ts +0 -209
- package/src/helpers/expressions.ts +0 -140
- package/src/helpers/optionUiTypes.ts +0 -199
- package/src/helpers/options.ts +0 -150
- package/src/helpers/providerValue.ts +0 -125
- package/src/helpers/scrollbar.ts +0 -32
- package/src/helpers/singleLineString.ts +0 -61
- package/src/helpers/templateItems.ts +0 -81
- package/src/helpers/templateText.ts +0 -350
- package/src/helpers/templates.ts +0 -602
- package/src/helpers/validations.ts +0 -2085
- package/src/hooks/useArgSchema.ts +0 -37
- package/src/hooks/useCoarsePointer.ts +0 -30
- package/src/hooks/useFetch/useFetch.stories.tsx +0 -379
- package/src/hooks/useFetch/useFetch.tsx +0 -154
- package/src/hooks/usePhoneViewport.ts +0 -34
- package/src/hooks/useQorusTypes.ts +0 -233
- package/src/hooks/useReqraftProperty.ts +0 -16
- package/src/hooks/useStorage/useStorage.stories.tsx +0 -168
- package/src/hooks/useStorage/useStorage.ts +0 -35
- package/src/hooks/useTemplates.ts +0 -123
- package/src/hooks/useValidation.ts +0 -9
- package/src/hooks/useWebSocket/useWebSocket.ts +0 -224
- package/src/hooks/useWebSocket/useWebsocket.stories.tsx +0 -640
- package/src/hooks/useWhyDidYouUpdate.ts +0 -38
- package/src/index.tsx +0 -86
- package/src/providers/FetchProvider.tsx +0 -40
- package/src/providers/ReqraftProvider.tsx +0 -52
- package/src/providers/StorageProvider.tsx +0 -131
- package/src/stores/currentUser/currentUser.stories.tsx +0 -100
- package/src/stores/currentUser/currentUser.tsx +0 -94
- package/src/stories/Data/fileFieldArgSchema.json +0 -86
- package/src/stories/Tests/utils.ts +0 -320
- package/src/stories/storyNetwork.ts +0 -92
- package/src/stories/tracking.tsx +0 -206
- package/src/tracking/browser/attach.ts +0 -186
- package/src/tracking/browser/env.ts +0 -78
- package/src/tracking/core/consent.ts +0 -37
- package/src/tracking/core/engagement.ts +0 -47
- package/src/tracking/core/experiments.ts +0 -258
- package/src/tracking/core/hash.ts +0 -26
- package/src/tracking/core/ids.ts +0 -25
- package/src/tracking/core/observable.ts +0 -23
- package/src/tracking/core/queue.ts +0 -131
- package/src/tracking/core/sections.ts +0 -166
- package/src/tracking/core/storage.ts +0 -69
- package/src/tracking/core/tracker.ts +0 -417
- package/src/tracking/core/types.ts +0 -162
- package/src/tracking/core/utm.ts +0 -23
- package/src/tracking/index.ts +0 -72
- package/src/tracking/markup.ts +0 -17
- package/src/tracking/react/Experiment.tsx +0 -44
- package/src/tracking/react/TrackingProvider.tsx +0 -56
- package/src/tracking/react/hooks.ts +0 -106
- package/src/tracking/react/index.ts +0 -13
- package/src/tracking/testing.ts +0 -108
- package/src/tracking/ui/ExperimentCard.stories.tsx +0 -296
- package/src/tracking/ui/ExperimentCard.tsx +0 -667
- package/src/tracking/ui/ExperimentsOverlay.stories.tsx +0 -155
- package/src/tracking/ui/ExperimentsOverlay.tsx +0 -437
- package/src/tracking/ui/anchor.ts +0 -180
- package/src/tracking/ui/card.ts +0 -464
- package/src/tracking/ui/client.ts +0 -117
- package/src/tracking/ui/index.ts +0 -77
- package/src/tracking/ui/types.ts +0 -110
- package/src/tracking/ui/useExperimentsAdmin.ts +0 -103
- package/src/types/Form.ts +0 -29
- package/src/types.ts +0 -14
- package/src/utils/datetime.ts +0 -10
- package/src/utils/fetch.ts +0 -457
- package/src/utils/lspClient.ts +0 -711
- package/src/utils/lspClient.types.ts +0 -211
- package/src/utils/queryUnlessCancelled.ts +0 -28
- package/src/utils/websocket.ts +0 -293
- package/vite.config.ts +0 -58
- package/vitest.config.ts +0 -69
|
@@ -97,10 +97,14 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
97
97
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
98
98
|
};
|
|
99
99
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
100
|
-
exports.FormEngine = exports.getTypeAndCanBeNull = exports.flattenOptions = exports.shouldEmitLocalValue = exports.agreementFromRebuild = exports.isMirrorOfValue = exports.fixOptions = exports.OptionsContext = exports.hasRequiredOptions = exports.getOptionFieldStorageType = exports.fixOperatorValue = exports.getType = exports.inheritedScopeFor = void 0;
|
|
100
|
+
exports.FormEngine = exports.getTypeAndCanBeNull = exports.flattenOptions = exports.shouldEmitLocalValue = exports.mergeOwnEdits = exports.takeHostsAttributes = exports.agreementFromRebuild = exports.isMirrorOfValue = exports.fixOptions = exports.OptionsContext = exports.hasRequiredOptions = exports.getOptionFieldStorageType = exports.fixOperatorValue = exports.getType = exports.inheritedScopeFor = void 0;
|
|
101
101
|
var react_1 = require("react");
|
|
102
102
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
103
103
|
var reqore_1 = require("@qoretechnologies/reqore");
|
|
104
|
+
var readFirstColors_1 = require("./readFirstColors");
|
|
105
|
+
var operatorSummary_1 = require("./operatorSummary");
|
|
106
|
+
var inheritProps_1 = require("./inheritProps");
|
|
107
|
+
var readableColors_1 = require("../../../helpers/readableColors");
|
|
104
108
|
var colors_1 = require("@qoretechnologies/reqore/dist/helpers/colors");
|
|
105
109
|
var argumentPresence_1 = require("../expressions/argumentPresence");
|
|
106
110
|
var typeChoices_1 = require("./typeChoices");
|
|
@@ -132,50 +136,18 @@ var compactRowContext_1 = require("./compactRowContext");
|
|
|
132
136
|
var compactRowStyles_1 = require("./compactRowStyles");
|
|
133
137
|
var CompactToolbar_1 = require("./CompactToolbar");
|
|
134
138
|
var compactToolbarContext_1 = require("./compactToolbarContext");
|
|
139
|
+
var HiddenFieldsNote_1 = require("./HiddenFieldsNote");
|
|
135
140
|
var OptionFieldMessages_1 = require("./OptionFieldMessages");
|
|
136
141
|
var optionsContext_1 = require("./optionsContext");
|
|
137
142
|
var markdownRendererContext_1 = require("../../Description/markdownRendererContext");
|
|
138
143
|
var OptionsHelpDialog_1 = require("./OptionsHelpDialog");
|
|
144
|
+
var typeSentenceForm_1 = require("../typeSentenceForm");
|
|
145
|
+
var referenceNames_1 = require("../fields/template/referenceNames");
|
|
146
|
+
var qorusTypeCatalogue_1 = require("../../../helpers/qorusTypeCatalogue");
|
|
147
|
+
var allowedValues_1 = require("../../../helpers/allowedValues");
|
|
148
|
+
var rowFocus_1 = require("./rowFocus");
|
|
139
149
|
var optionUiTypes_1 = require("../../../helpers/optionUiTypes");
|
|
140
150
|
var readFirst_1 = require("./readFirst");
|
|
141
|
-
/**
|
|
142
|
-
* Resolve a field's `inherit_props` map against the current available
|
|
143
|
-
* options (plus any values inherited from an outer FormEngine scope),
|
|
144
|
-
* producing a `{ propName: siblingValue }` hash suitable for spreading
|
|
145
|
-
* onto the field's renderer.
|
|
146
|
-
*
|
|
147
|
-
* For each entry `<prop-name-on-renderer> -> <sibling-field-name>`, the
|
|
148
|
-
* sibling's current value is forwarded under the receiving prop name.
|
|
149
|
-
* Lookup order:
|
|
150
|
-
* 1. `availableOptions[siblingName]?.value` — the field's local scope.
|
|
151
|
-
* 2. `inheritedFromParent[siblingName]` — the bag threaded in by an
|
|
152
|
-
* outer FormEngine (see the `inheritedFromParent` prop). Used when
|
|
153
|
-
* a composite field's `arg_schema` sub-form needs to reach a value
|
|
154
|
-
* on an ancestor scope — e.g. a service-method row's `body` picking
|
|
155
|
-
* up `language` from the parent service form.
|
|
156
|
-
* Missing siblings emit `undefined`, which the renderer's prop type can
|
|
157
|
-
* treat as "no hint".
|
|
158
|
-
*
|
|
159
|
-
* Designed to be JSON-pure: no closures, no transformations. Renderers
|
|
160
|
-
* decide how to use the forwarded value (e.g. the consumer-injected
|
|
161
|
-
* `code-editor` renderer maps a `language: "qore"` prop to its
|
|
162
|
-
* highlighter mode).
|
|
163
|
-
*
|
|
164
|
-
* Mirrored in qorus-ide `src/components/Field/systemOptions.tsx`; keep
|
|
165
|
-
* the two in sync (see qorus-ide's `.claude/CLAUDE.md`).
|
|
166
|
-
*/
|
|
167
|
-
var resolveInheritProps = function (inheritProps, availableOptions, inheritedFromParent) {
|
|
168
|
-
var _a;
|
|
169
|
-
if (!inheritProps)
|
|
170
|
-
return {};
|
|
171
|
-
var out = {};
|
|
172
|
-
for (var propName in inheritProps) {
|
|
173
|
-
var siblingName = inheritProps[propName];
|
|
174
|
-
var localValue = (_a = availableOptions === null || availableOptions === void 0 ? void 0 : availableOptions[siblingName]) === null || _a === void 0 ? void 0 : _a.value;
|
|
175
|
-
out[propName] = localValue !== undefined ? localValue : inheritedFromParent === null || inheritedFromParent === void 0 ? void 0 : inheritedFromParent[siblingName];
|
|
176
|
-
}
|
|
177
|
-
return out;
|
|
178
|
-
};
|
|
179
151
|
/** One shared "nothing came down from above" bag. See `inheritedScopeFor`. */
|
|
180
152
|
var NO_INHERITED_SCOPE = Object.freeze({});
|
|
181
153
|
/**
|
|
@@ -206,7 +178,7 @@ var NO_INHERITED_SCOPE = Object.freeze({});
|
|
|
206
178
|
* @param inheritedFromParent the bag threaded in from an outer form
|
|
207
179
|
*/
|
|
208
180
|
var inheritedScopeFor = function (inheritProps, availableOptions, inheritedFromParent) {
|
|
209
|
-
var resolved = resolveInheritProps(inheritProps, availableOptions, inheritedFromParent);
|
|
181
|
+
var resolved = (0, inheritProps_1.resolveInheritProps)(inheritProps, availableOptions, inheritedFromParent);
|
|
210
182
|
if (!Object.keys(resolved).length) {
|
|
211
183
|
return inheritedFromParent !== null && inheritedFromParent !== void 0 ? inheritedFromParent : NO_INHERITED_SCOPE;
|
|
212
184
|
}
|
|
@@ -228,7 +200,7 @@ var PositiveColorEffect = {
|
|
|
228
200
|
glow: 'success',
|
|
229
201
|
};
|
|
230
202
|
// Compact (read-first) layout: flat label | value | action rows in collapsible
|
|
231
|
-
// group panels;
|
|
203
|
+
// group panels; colors come in as props so the layout follows the Reqore theme.
|
|
232
204
|
var StyledCompactWrap = styled_components_1.default.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n display: flex;\n flex-flow: column;\n gap: 10px;\n width: 100%;\n /* Allow the wrap to shrink inside flex/grid parents so its rows' ellipsis can\n engage instead of overflowing the container horizontally. */\n min-width: 0;\n max-width: 100%;\n\n /* Scroll ownership \u2014 see `compactScroll`.\n\n 'host' (the default): the page or panel around us already scrolls, so we\n must not cap our height and scroll our own body, or the reader gets two\n scrollbars in two styles and cannot tell which moves what.\n\n `overflow-x: clip`, NOT `hidden`: CSS coerces an `overflow-y: visible`\n to `auto` whenever the other axis is neither visible nor clip, which would\n leave this box a scroll container \u2014 the element stops scrolling only\n because `max-height: none` means nothing overflows, while `position:\n sticky` inside it still resolves against US instead of the host, so the\n toolbar silently stops pinning. `clip` keeps the horizontal guard without\n that coercion. */\n ", "\n\n /* Option logos (e.g. language images) render as <img> inside ReqoreIcon's\n square box; constrain them so portrait PNGs don't overflow the row. */\n .reqore-icon img {\n width: 100%;\n height: 100%;\n object-fit: contain;\n }\n"], ["\n display: flex;\n flex-flow: column;\n gap: 10px;\n width: 100%;\n /* Allow the wrap to shrink inside flex/grid parents so its rows' ellipsis can\n engage instead of overflowing the container horizontally. */\n min-width: 0;\n max-width: 100%;\n\n /* Scroll ownership \u2014 see \\`compactScroll\\`.\n\n 'host' (the default): the page or panel around us already scrolls, so we\n must not cap our height and scroll our own body, or the reader gets two\n scrollbars in two styles and cannot tell which moves what.\n\n \\`overflow-x: clip\\`, NOT \\`hidden\\`: CSS coerces an \\`overflow-y: visible\\`\n to \\`auto\\` whenever the other axis is neither visible nor clip, which would\n leave this box a scroll container \u2014 the element stops scrolling only\n because \\`max-height: none\\` means nothing overflows, while \\`position:\n sticky\\` inside it still resolves against US instead of the host, so the\n toolbar silently stops pinning. \\`clip\\` keeps the horizontal guard without\n that coercion. */\n ", "\n\n /* Option logos (e.g. language images) render as <img> inside ReqoreIcon's\n square box; constrain them so portrait PNGs don't overflow the row. */\n .reqore-icon img {\n width: 100%;\n height: 100%;\n object-fit: contain;\n }\n"])), function (_a) {
|
|
233
205
|
var $ownScroll = _a.$ownScroll;
|
|
234
206
|
return $ownScroll ? (0, styled_components_1.css)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n /* 'own': we are the scroller. The sticky toolbar pins to whatever\n scrolls, so a host whose scrollport carries top padding would\n resolve sticky `top: 0` against its padding box and leave an\n unblurred strip above the toolbar. Scrolling in this unpadded box\n pins it flush. Cap at the host's available height, but do not grow\n to fill it \u2014 short forms still hug their content.\n\n `min-height: 0` is what lets a flex item shrink below its content\n so there is something to scroll; it belongs to this branch only. */\n min-height: 0;\n max-height: 100%;\n overflow-y: auto;\n overflow-x: hidden;\n "], ["\n /* 'own': we are the scroller. The sticky toolbar pins to whatever\n scrolls, so a host whose scrollport carries top padding would\n resolve sticky \\`top: 0\\` against its padding box and leave an\n unblurred strip above the toolbar. Scrolling in this unpadded box\n pins it flush. Cap at the host's available height, but do not grow\n to fill it \u2014 short forms still hug their content.\n\n \\`min-height: 0\\` is what lets a flex item shrink below its content\n so there is something to scroll; it belongs to this branch only. */\n min-height: 0;\n max-height: 100%;\n overflow-y: auto;\n overflow-x: hidden;\n "]))) : (0, styled_components_1.css)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n /* `min-height: auto` is load-bearing, not a default: inside a column\n flex parent the shrink allowance above collapses this box to zero\n height while its rows paint outside it, so the form looks right but\n contributes nothing to layout \u2014 the host cannot size or scroll to\n it and anything below it stacks against nothing. */\n min-height: auto;\n max-height: none;\n overflow-y: visible;\n overflow-x: clip;\n "], ["\n /* \\`min-height: auto\\` is load-bearing, not a default: inside a column\n flex parent the shrink allowance above collapses this box to zero\n height while its rows paint outside it, so the form looks right but\n contributes nothing to layout \u2014 the host cannot size or scroll to\n it and anything below it stacks against nothing. */\n min-height: auto;\n max-height: none;\n overflow-y: visible;\n overflow-x: clip;\n "])));
|
|
@@ -431,6 +403,34 @@ var normalizeEmptyFieldValues = function (fields) {
|
|
|
431
403
|
return acc;
|
|
432
404
|
}, {});
|
|
433
405
|
};
|
|
406
|
+
/**
|
|
407
|
+
* The value as a host can hand it back: each field as its value, and the fields that hold nothing left out.
|
|
408
|
+
*
|
|
409
|
+
* A report of the form's is recognised by what it says, not by how the host writes it back. A host that
|
|
410
|
+
* stores only the fields holding a value (the Qorus IDE's editors) hands a report back without its empty
|
|
411
|
+
* fields; one that stores a field under its own type (the IDE stores what an `int` field reported as a
|
|
412
|
+
* `string`) hands it back with that type. Compared field for field, type and all, the report never came
|
|
413
|
+
* back as itself:
|
|
414
|
+
* - the form took it for the host's own change and went back to it, losing what had been typed since, and
|
|
415
|
+
* the two chased each other's reports on every echo;
|
|
416
|
+
* - an edit back to a value reported before (A, then B, then A again), made as the echo of B arrived, was
|
|
417
|
+
* held back as made before the host's change, and the field went back to B (qorus#646: a template
|
|
418
|
+
* field's text, deleted back to its reference, kept the text in the IDE).
|
|
419
|
+
*
|
|
420
|
+
* For recognising a value only. Whether a rebuild adds anything is still read with the empty fields in
|
|
421
|
+
* (`isMirrorOfValue`): a new schema's empty required field is a row the form has to add.
|
|
422
|
+
*/
|
|
423
|
+
var reportedValues = function (fields) {
|
|
424
|
+
return (0, reduce_1.default)(fields || {}, function (acc, field, name) {
|
|
425
|
+
var fieldValue = comparableField(field);
|
|
426
|
+
if (fieldValue !== undefined) {
|
|
427
|
+
acc[name] = fieldValue;
|
|
428
|
+
}
|
|
429
|
+
return acc;
|
|
430
|
+
}, {});
|
|
431
|
+
};
|
|
432
|
+
/** The same value, as a report coming back from a host is recognised. */
|
|
433
|
+
var sameReportedValue = function (a, b) { return (0, lodash_1.isEqual)(reportedValues(a), reportedValues(b)); };
|
|
434
434
|
/**
|
|
435
435
|
* Does this rebuild say anything the parent does not already hold?
|
|
436
436
|
*
|
|
@@ -460,6 +460,118 @@ var agreementFromRebuild = function (fixedValue, value) {
|
|
|
460
460
|
return (0, exports.isMirrorOfValue)(fixedValue, value) ? fixedValue : undefined;
|
|
461
461
|
};
|
|
462
462
|
exports.agreementFromRebuild = agreementFromRebuild;
|
|
463
|
+
/**
|
|
464
|
+
* A field as the form compares one host value with another: an empty field ('' or none, whatever its type) is
|
|
465
|
+
* the same as no field, and a field is its value, however it is written (`{ type, value }` or the bare value).
|
|
466
|
+
*/
|
|
467
|
+
var comparableField = function (field) {
|
|
468
|
+
var fieldValue = field !== null && typeof field === 'object' && !Array.isArray(field) && 'value' in field ?
|
|
469
|
+
field.value
|
|
470
|
+
: field !== null && typeof field === 'object' && !Array.isArray(field) && 'type' in field ?
|
|
471
|
+
undefined
|
|
472
|
+
: field;
|
|
473
|
+
return fieldValue === '' ? undefined : fieldValue;
|
|
474
|
+
};
|
|
475
|
+
var sameField = function (a, b) {
|
|
476
|
+
return (0, lodash_1.isEqual)(comparableField(a), comparableField(b));
|
|
477
|
+
};
|
|
478
|
+
/** A field written as `{ type, value }`, not a bare value. */
|
|
479
|
+
var isTypedField = function (field) {
|
|
480
|
+
return field !== null &&
|
|
481
|
+
typeof field === 'object' &&
|
|
482
|
+
!Array.isArray(field) &&
|
|
483
|
+
typeof field.type === 'string';
|
|
484
|
+
};
|
|
485
|
+
/**
|
|
486
|
+
* The form's copy of a field, with everything the host changed beside its value since `base`: its type, whether
|
|
487
|
+
* it is an expression, its operator, or anything else it says. `own` itself where the host changed nothing.
|
|
488
|
+
*
|
|
489
|
+
* A report of the form's is recognised by its values, and a field's value is merged by its value (see
|
|
490
|
+
* `reportedValues`, `mergeOwnEdits`), so a change the host made to a field's type alone said nothing: the form
|
|
491
|
+
* kept its own type. The Qorus IDE makes an added field's whole number true or false, holding the same field
|
|
492
|
+
* `pos`; the form kept the `int` and drew `pos` as text on the Value tab, where a true or false field shows it on
|
|
493
|
+
* its Expression tab (qorus#646).
|
|
494
|
+
*
|
|
495
|
+
* Every key but `value` is compared, not a list of the ones known today: whatever a host writes into a field
|
|
496
|
+
* beside its value, a change of it is the host's. A key the host writes as it always has is not a change, so a
|
|
497
|
+
* host that stores a field under its own type does not change the form's (that is why the value alone is what
|
|
498
|
+
* recognises a report).
|
|
499
|
+
*/
|
|
500
|
+
var withHostsAttributes = function (own, host, base) {
|
|
501
|
+
if (!isTypedField(own) || !isTypedField(host)) {
|
|
502
|
+
return own;
|
|
503
|
+
}
|
|
504
|
+
var hostField = host;
|
|
505
|
+
var baseField = isTypedField(base) ? base : {};
|
|
506
|
+
var ownField = own;
|
|
507
|
+
var taken;
|
|
508
|
+
new Set(__spreadArray(__spreadArray([], Object.keys(hostField), true), Object.keys(baseField), true)).forEach(function (key) {
|
|
509
|
+
var hosts = hostField[key];
|
|
510
|
+
if (key === 'value' || (0, lodash_1.isEqual)(hosts, baseField[key]) || (0, lodash_1.isEqual)(ownField[key], hosts)) {
|
|
511
|
+
return;
|
|
512
|
+
}
|
|
513
|
+
taken = taken !== null && taken !== void 0 ? taken : __assign({}, ownField);
|
|
514
|
+
if (hosts === undefined) {
|
|
515
|
+
delete taken[key];
|
|
516
|
+
}
|
|
517
|
+
else {
|
|
518
|
+
taken[key] = hosts;
|
|
519
|
+
}
|
|
520
|
+
});
|
|
521
|
+
return taken !== null && taken !== void 0 ? taken : own;
|
|
522
|
+
};
|
|
523
|
+
/**
|
|
524
|
+
* The form's copy with what the host changed beside each field's value since `base` taken (see
|
|
525
|
+
* `withHostsAttributes`). Returns `ours` itself when there is nothing the form's copy does not have already.
|
|
526
|
+
*/
|
|
527
|
+
var takeHostsAttributes = function (theirs, ours, base) {
|
|
528
|
+
var _a;
|
|
529
|
+
var typed;
|
|
530
|
+
(0, lodash_1.forEach)(theirs || {}, function (host, name) {
|
|
531
|
+
var own = ours === null || ours === void 0 ? void 0 : ours[name];
|
|
532
|
+
var taken = withHostsAttributes(own, host, base === null || base === void 0 ? void 0 : base[name]);
|
|
533
|
+
if (taken !== own) {
|
|
534
|
+
typed = typed !== null && typed !== void 0 ? typed : __assign({}, (ours || {}));
|
|
535
|
+
typed[name] = taken;
|
|
536
|
+
}
|
|
537
|
+
});
|
|
538
|
+
return (_a = typed) !== null && _a !== void 0 ? _a : ours;
|
|
539
|
+
};
|
|
540
|
+
exports.takeHostsAttributes = takeHostsAttributes;
|
|
541
|
+
/**
|
|
542
|
+
* The host's change, with the form's own edits kept: a three-way merge of `theirs` (the `value` the host
|
|
543
|
+
* hands down now) and `ours` (the form's copy) against `base` (the `value` the form last saw).
|
|
544
|
+
*
|
|
545
|
+
* A field the form changed and the host did not keeps the form's value; every other field takes the host's,
|
|
546
|
+
* a field both changed included. The host and the form can change the value in the same commit - a host
|
|
547
|
+
* renaming something as the user's edit reaches the form - and taking either side whole lost the other's
|
|
548
|
+
* change; sending the form's copy over the host's change made the two trade places forever (qorus#646).
|
|
549
|
+
*
|
|
550
|
+
* Returns `theirs` itself when the form has nothing of its own to keep.
|
|
551
|
+
*/
|
|
552
|
+
var mergeOwnEdits = function (theirs, ours, base) {
|
|
553
|
+
var _a;
|
|
554
|
+
var merged;
|
|
555
|
+
var names = new Set(__spreadArray(__spreadArray([], Object.keys(ours || {}), true), Object.keys(base || {}), true));
|
|
556
|
+
names.forEach(function (name) {
|
|
557
|
+
var own = ours === null || ours === void 0 ? void 0 : ours[name];
|
|
558
|
+
var before = base === null || base === void 0 ? void 0 : base[name];
|
|
559
|
+
var host = theirs === null || theirs === void 0 ? void 0 : theirs[name];
|
|
560
|
+
if (sameField(own, before) || !sameField(host, before) || sameField(host, own)) {
|
|
561
|
+
return;
|
|
562
|
+
}
|
|
563
|
+
merged = merged !== null && merged !== void 0 ? merged : __assign({}, (theirs || {}));
|
|
564
|
+
if (own === undefined) {
|
|
565
|
+
delete merged[name];
|
|
566
|
+
}
|
|
567
|
+
else {
|
|
568
|
+
// the form's value, with what the host changed beside it (its type, say)
|
|
569
|
+
merged[name] = withHostsAttributes(own, host, before);
|
|
570
|
+
}
|
|
571
|
+
});
|
|
572
|
+
return (_a = merged) !== null && _a !== void 0 ? _a : theirs;
|
|
573
|
+
};
|
|
574
|
+
exports.mergeOwnEdits = mergeOwnEdits;
|
|
463
575
|
/**
|
|
464
576
|
* Should the form report `localValue` to its parent as an answer?
|
|
465
577
|
*
|
|
@@ -516,6 +628,8 @@ var getTypeAndCanBeNull = function (type, allowed_values, operatorData, operator
|
|
|
516
628
|
exports.getTypeAndCanBeNull = getTypeAndCanBeNull;
|
|
517
629
|
// Option types rendered full-width (IDE Options parity, commit 8e6b7781).
|
|
518
630
|
var STRECHABLE_TYPES = new Set(['tool-catalog']);
|
|
631
|
+
/** How faded reqore draws a panel's title icon. */
|
|
632
|
+
var PANEL_TITLE_ICON_ALPHA = 0.7;
|
|
519
633
|
var FormEngineImpl = function (_a) {
|
|
520
634
|
var _b, _c, _d, _f, _g;
|
|
521
635
|
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
|
|
@@ -534,12 +648,14 @@ var FormEngineImpl = function (_a) {
|
|
|
534
648
|
// been a no-op. Removing it from the API is a separate, breaking change —
|
|
535
649
|
// every consumer passing it today already gets the flush layout by default.
|
|
536
650
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
537
|
-
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.compactStickyBoxHeaders, compactStickyBoxHeaders = _o === void 0 ? true : _o, _p = _a.compactStickyOffset, compactStickyOffset = _p === void 0 ? 0 : _p, _q = _a.compactToolbar, compactToolbar = _q === void 0 ? true : _q, _r = _a.commitMode, commitMode = _r === void 0 ? 'immediate' : _r, _s = _a.expandMode, expandMode = _s === void 0 ? 'single' : _s, onCommit = _a.onCommit, operatorsProp = _a.operators, groups = _a.groups, optionsLoader = _a.optionsLoader, onValidityChange = _a.onValidityChange, optionActions = _a.optionActions, _t = _a.optionActionsCollapse, optionActionsCollapse = _t === void 0 ? 'auto' : _t, componentOverrides = _a.componentOverrides, codePreviewRenderer = _a.codePreviewRenderer,
|
|
651
|
+
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.compactStickyBoxHeaders, compactStickyBoxHeaders = _o === void 0 ? true : _o, _p = _a.compactStickyOffset, compactStickyOffset = _p === void 0 ? 0 : _p, _q = _a.compactToolbar, compactToolbar = _q === void 0 ? true : _q, _r = _a.commitMode, commitMode = _r === void 0 ? 'immediate' : _r, _s = _a.expandMode, expandMode = _s === void 0 ? 'single' : _s, onCommit = _a.onCommit, operatorsProp = _a.operators, groups = _a.groups, optionsLoader = _a.optionsLoader, onValidityChange = _a.onValidityChange, optionActions = _a.optionActions, _t = _a.optionActionsCollapse, optionActionsCollapse = _t === void 0 ? 'auto' : _t, componentOverrides = _a.componentOverrides, codePreviewRenderer = _a.codePreviewRenderer, readSummaries = _a.readSummaries, cardEditorTypes = _a.cardEditorTypes,
|
|
538
652
|
// consumed by the wrapper below, which publishes it to every description this
|
|
539
653
|
// form draws; destructured here only so it cannot reach `rest` and be spread
|
|
540
654
|
// onto a DOM node
|
|
541
655
|
_markdownRenderer = _a.markdownRenderer, // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
542
|
-
rendererOnlyUiTypes = _a.rendererOnlyUiTypes, templateAwareUiTypes = _a.templateAwareUiTypes, anyLikeUiTypes = _a.anyLikeUiTypes, inheritedFromParent = _a.inheritedFromParent, autoFocusFirstRequired = _a.autoFocusFirstRequired, expandFirstRequired = _a.expandFirstRequired, initialExpandedOptions = _a.initialExpandedOptions,
|
|
656
|
+
rendererOnlyUiTypes = _a.rendererOnlyUiTypes, templateAwareUiTypes = _a.templateAwareUiTypes, anyLikeUiTypes = _a.anyLikeUiTypes, inheritedFromParent = _a.inheritedFromParent, autoFocusFirstRequired = _a.autoFocusFirstRequired, expandFirstRequired = _a.expandFirstRequired, initialExpandedOptions = _a.initialExpandedOptions, valueKey = _a.valueKey, maxFieldsShown = _a.maxFieldsShown,
|
|
657
|
+
// The form's own props, read here and never handed on to the collection drawn below (`{...rest}`).
|
|
658
|
+
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", "valueKey", "maxFieldsShown", "options", "stringTemplates", "skeletonReason"]);
|
|
543
659
|
// Built-ins + whatever the consumer declared for its own injected editors.
|
|
544
660
|
var isRendererOnly = (0, react_2.useMemo)(function () { return (0, rendererTypes_1.createRendererOnlyUiTypeCheck)(rendererOnlyUiTypes); }, [JSON.stringify(rendererOnlyUiTypes)]);
|
|
545
661
|
// Pointer CAPABILITY and viewport WIDTH are different questions and both
|
|
@@ -564,10 +680,22 @@ var FormEngineImpl = function (_a) {
|
|
|
564
680
|
enters the component, so the header, the chips, the messages, the meter and
|
|
565
681
|
the read-first summary cannot disagree about it: every one of them reads
|
|
566
682
|
`options`, and none of them has to know the rule. */
|
|
567
|
-
var _u = (0, react_2.useState)(
|
|
683
|
+
var _u = (0, react_2.useState)(optionsSchema || undefined), servedOptions = _u[0], setOptions = _u[1];
|
|
568
684
|
var options = (0, react_2.useMemo)(function () { return (0, options_1.resolveDegenerateRequiredGroups)(servedOptions); }, [servedOptions]);
|
|
685
|
+
/* Whether the schema the form holds is the one in force: its host is not waiting behind the skeleton, and a
|
|
686
|
+
schema the host hands down has been taken in (`servedOptions` follows the `options` prop a render later).
|
|
687
|
+
Until then the value is neither pruned against the schema nor emitted. A host loading the schema hands an
|
|
688
|
+
empty or an earlier one meanwhile; read against that, every stored field was "not on this instance" and
|
|
689
|
+
was removed, so a Qog state opened before its options had loaded showed them empty and, once emitted,
|
|
690
|
+
lost them (qorus#646). */
|
|
691
|
+
var hostSchemaPending = !optionsLoader &&
|
|
692
|
+
!url &&
|
|
693
|
+
!customUrl &&
|
|
694
|
+
optionsSchema !== servedOptions &&
|
|
695
|
+
JSON.stringify(optionsSchema || undefined) !== JSON.stringify(servedOptions);
|
|
696
|
+
var schemaInForce = !rest.skeleton && !hostSchemaPending;
|
|
569
697
|
// optionsLoader lifecycle: loading feeds the skeleton gate, error the banner.
|
|
570
|
-
var _v = (0, react_2.useState)(!!optionsLoader && !
|
|
698
|
+
var _v = (0, react_2.useState)(!!optionsLoader && !optionsSchema), optionsLoading = _v[0], setOptionsLoading = _v[1];
|
|
571
699
|
var _w = (0, react_2.useState)(), optionsError = _w[0], setOptionsError = _w[1];
|
|
572
700
|
// Operators: prop-provided (compact) or fetched via operatorsUrl (dpql,
|
|
573
701
|
// ported from IDE Options) — the fetch overrides the seeded prop value.
|
|
@@ -636,6 +764,8 @@ var FormEngineImpl = function (_a) {
|
|
|
636
764
|
// stays put when its status flips (e.g. becomes valid) instead of jumping to
|
|
637
765
|
// another box mid-edit and stealing focus. Keyed by option name.
|
|
638
766
|
var settledBucket = (0, react_2.useRef)({});
|
|
767
|
+
// the one field that says where it moves when it is closed: see `heldOptions`
|
|
768
|
+
var movesToNoteFor = (0, react_2.useRef)(undefined);
|
|
639
769
|
// Measured form width (not viewport — the form lives in drawers/panels of
|
|
640
770
|
// arbitrary width) drives the stacked narrow layout.
|
|
641
771
|
var _7 = (0, react_use_1.useMeasure)(), compactWrapRef = _7[0], compactWrapWidth = _7[1].width;
|
|
@@ -657,7 +787,11 @@ var FormEngineImpl = function (_a) {
|
|
|
657
787
|
measurement below takes it as a dependency, and a dependency array is
|
|
658
788
|
evaluated during render — a `const` declared further down would still be
|
|
659
789
|
in its temporal dead zone. */
|
|
660
|
-
|
|
790
|
+
/* The label column the rows are laid out with: measured from the labels (see below), the
|
|
791
|
+
default until it is. A form stacks its rows where its value column would be too narrow
|
|
792
|
+
beside it (`isCompactNarrow`), not at one form width whatever its labels are. */
|
|
793
|
+
var _9 = (0, react_2.useState)(compactRowStyles_1.COMPACT_LABEL_COL), compactLabelColumn = _9[0], setCompactLabelColumn = _9[1];
|
|
794
|
+
var compactNarrow = !!compactWrapWidth && (0, compactRowStyles_1.isCompactNarrow)(compactWrapWidth, compactLabelColumn);
|
|
661
795
|
/* How much pinned chrome sits above a status-box header.
|
|
662
796
|
|
|
663
797
|
Sticky offsets do not compose on their own: everything pinned in one
|
|
@@ -672,7 +806,7 @@ var FormEngineImpl = function (_a) {
|
|
|
672
806
|
a search row and a field picker that each hide themselves when they have
|
|
673
807
|
nothing to say, and what is left wraps differently at every form width.
|
|
674
808
|
Zero when this form draws no toolbar at all. */
|
|
675
|
-
var
|
|
809
|
+
var _10 = (0, react_2.useState)(0), compactToolbarHeight = _10[0], setCompactToolbarHeight = _10[1];
|
|
676
810
|
(0, react_2.useLayoutEffect)(function () {
|
|
677
811
|
var wrap = compactWrapNode;
|
|
678
812
|
if (!compact || !wrap || compactNested || !compactStickyBoxHeaders) {
|
|
@@ -750,15 +884,17 @@ var FormEngineImpl = function (_a) {
|
|
|
750
884
|
// take, which is what it is for; the asterisk and the `?` are chrome that has
|
|
751
885
|
// to fit beside it either way.
|
|
752
886
|
var text = Math.max(compactRowStyles_1.LABEL_COL_MIN, Math.min(compactRowStyles_1.LABEL_COL_MAX, Math.round(widest)));
|
|
753
|
-
|
|
887
|
+
var column = text + compactRowStyles_1.LABEL_AFFORDANCE_WIDTH;
|
|
888
|
+
wrap.style.setProperty(compactRowStyles_1.LABEL_COL_VAR, "".concat(column, "px"));
|
|
889
|
+
setCompactLabelColumn(column);
|
|
754
890
|
}, [compact, options, theme, compactWrapNode]);
|
|
755
891
|
// Editing rows pin min-height to the measured read row they replace, so the
|
|
756
892
|
// toggle never shifts neighbours (height varies with chrome — measure it).
|
|
757
893
|
var readRowHeights = (0, react_2.useRef)({});
|
|
758
894
|
// Required-groups linkage: hovering a group chip highlights every member row;
|
|
759
895
|
// clicking a sibling in the chip's popover scrolls to it and flashes it.
|
|
760
|
-
var
|
|
761
|
-
var
|
|
896
|
+
var _11 = (0, react_2.useState)([]), highlightedOptions = _11[0], setHighlightedOptions = _11[1];
|
|
897
|
+
var _12 = (0, react_2.useState)([]), flashedOptions = _12[0], setFlashedOptions = _12[1];
|
|
762
898
|
var flashTimeout = (0, react_2.useRef)();
|
|
763
899
|
var flashOptions = (0, react_2.useCallback)(function (optionNames, scrollToFirst) {
|
|
764
900
|
if (scrollToFirst === void 0) { scrollToFirst = false; }
|
|
@@ -810,16 +946,16 @@ var FormEngineImpl = function (_a) {
|
|
|
810
946
|
}
|
|
811
947
|
});
|
|
812
948
|
// Info panels auto-open on Tier-1 content; the per-row user override sticks.
|
|
813
|
-
var
|
|
949
|
+
var _13 = (0, react_2.useState)({}), infoPanelOverrides = _13[0], setInfoPanelOverrides = _13[1];
|
|
814
950
|
// Toolbar filters affect the listed rows only — the meter reflects the full set.
|
|
815
|
-
var
|
|
816
|
-
var
|
|
951
|
+
var _14 = (0, react_2.useState)(false), requiredOnly = _14[0], setRequiredOnly = _14[1];
|
|
952
|
+
var _15 = (0, react_2.useState)(''), compactQuery = _15[0], setCompactQuery = _15[1];
|
|
817
953
|
// Compact field sort (Fields menu → "Sort by"); 'schema' = declared order.
|
|
818
|
-
var
|
|
819
|
-
var
|
|
954
|
+
var _16 = (0, react_2.useState)('schema'), compactSort = _16[0], setCompactSort = _16[1];
|
|
955
|
+
var _17 = (0, react_2.useState)(function () { return ({
|
|
820
956
|
fields: (0, exports.fixOptions)(value, options || {}, undefined, isRendererOnly),
|
|
821
957
|
meta: undefined,
|
|
822
|
-
}); }), localValue =
|
|
958
|
+
}); }), localValue = _17[0], setLocalValue = _17[1];
|
|
823
959
|
var originalValue = (0, react_2.useRef)();
|
|
824
960
|
// Track the last value we emitted via onChange so we can skip re-applying fixOptions
|
|
825
961
|
// when the parent echoes it back as the new value prop (controlled component loop prevention)
|
|
@@ -857,16 +993,52 @@ var FormEngineImpl = function (_a) {
|
|
|
857
993
|
* reset the form to it: the field under the cursor went back a step and the keys typed since were lost
|
|
858
994
|
* ("I have value" came out as "I he value" in a story under load).
|
|
859
995
|
*/
|
|
860
|
-
var inFlight = (0, emittedValues_1.useEmittedValues)(
|
|
861
|
-
|
|
862
|
-
|
|
996
|
+
var inFlight = (0, emittedValues_1.useEmittedValues)(sameReportedValue);
|
|
997
|
+
/**
|
|
998
|
+
* The `value` (and `valueKey`) as of the last commit: what a new `value` is a change from. The sync-down
|
|
999
|
+
* merges the host's change against it, and the emit effect tells by it that the host changed the value in
|
|
1000
|
+
* the very commit it runs in. Updated by the last effect of each commit (below the sync-down).
|
|
1001
|
+
*/
|
|
1002
|
+
var seenValue = (0, react_2.useRef)(value);
|
|
1003
|
+
var seenValueKey = (0, react_2.useRef)(valueKey);
|
|
1004
|
+
/** Whether `value` is the host's own change, made since the last commit: neither seen before nor a report of
|
|
1005
|
+
* this form's coming back. */
|
|
1006
|
+
var isHostsOwnChange = function () {
|
|
1007
|
+
return valueKey !== seenValueKey.current ||
|
|
1008
|
+
(!sameReportedValue(value, seenValue.current) &&
|
|
1009
|
+
!inFlight.includes(value) &&
|
|
1010
|
+
!sameReportedValue(value, lastEmittedValue.current));
|
|
1011
|
+
};
|
|
863
1012
|
if (originalValue.current === undefined && (0, size_1.default)(value)) {
|
|
864
1013
|
originalValue.current = localValue.fields;
|
|
865
1014
|
}
|
|
866
1015
|
var unavailableOptionsCount = (0, react_2.useRef)(0);
|
|
867
|
-
var
|
|
868
|
-
|
|
1016
|
+
var _18 = (0, useQorusTypes_1.useQorusTypes)(), compactValue = _18.compactValue, typesLoading = _18.loading;
|
|
1017
|
+
// an option's type in words, while the form shows field types (qorus#646: it said the type's code, `<string>`)
|
|
1018
|
+
var typeName = (0, typeSentenceForm_1.useTypeName)();
|
|
1019
|
+
var templates = (0, useTemplates_1.useTemplates)(allowTemplates, stringTemplates, interfaceContext);
|
|
869
1020
|
(0, react_2.useEffect)(function () {
|
|
1021
|
+
/* Nothing is emitted until the schema is in force (`schemaInForce`): read against the empty or earlier
|
|
1022
|
+
schema a host hands down while it loads its own, the value is no answer, and emitted it wiped a Qog
|
|
1023
|
+
state's stored options the moment the state was opened (qorus#646).
|
|
1024
|
+
|
|
1025
|
+
When it comes into force this check runs (it is a dependency). A host also shows the skeleton for other
|
|
1026
|
+
waits: qorus-ide shows it while the templates load, with the schema already there. The form completes the
|
|
1027
|
+
value meanwhile (a required field's default, e.g. the server's `created_by_user`), and nothing read it
|
|
1028
|
+
again when the skeleton cleared: the default was shown and never emitted, so never saved. A value that
|
|
1029
|
+
adds nothing still emits nothing. */
|
|
1030
|
+
if (!schemaInForce) {
|
|
1031
|
+
return;
|
|
1032
|
+
}
|
|
1033
|
+
/* The host changed the value in this same commit (effects run in order, and this one runs before the
|
|
1034
|
+
sync-down that takes the change in). The form's copy was made before that change: sent, it overwrote
|
|
1035
|
+
the host's change, the sync-down then took the host's value in, and the next commit sent that back -
|
|
1036
|
+
the form and the host traded places on every commit, forever (qorus#646: the Qorus IDE's OPC UA node
|
|
1037
|
+
editor, its namespace flipping between the old and the renamed one). The sync-down below merges the
|
|
1038
|
+
change with the form's own edits, and the next commit reports the result. */
|
|
1039
|
+
if (isHostsOwnChange()) {
|
|
1040
|
+
return;
|
|
1041
|
+
}
|
|
870
1042
|
if (!(0, exports.shouldEmitLocalValue)({
|
|
871
1043
|
localValue: localValue.fields,
|
|
872
1044
|
value: value,
|
|
@@ -881,15 +1053,15 @@ var FormEngineImpl = function (_a) {
|
|
|
881
1053
|
// Batched mode still emits every staged change (consumers may want to
|
|
882
1054
|
// live-validate), but flags it as a draft — persistence waits for Save.
|
|
883
1055
|
onChange === null || onChange === void 0 ? void 0 : onChange(name, toEmit, commitMode === 'batched' ? __assign(__assign({}, (meta || {})), { draft: true }) : meta);
|
|
884
|
-
}, [JSON.stringify(localValue)]);
|
|
1056
|
+
}, [JSON.stringify(localValue), schemaInForce]);
|
|
885
1057
|
(0, react_use_1.useUpdateEffect)(function () {
|
|
886
1058
|
// When a loader owns the schema, ignore controlled `options` syncs so a
|
|
887
1059
|
// late/undefined `options` prop can't clobber the loaded schema.
|
|
888
1060
|
if (optionsLoader) {
|
|
889
1061
|
return;
|
|
890
1062
|
}
|
|
891
|
-
setOptions(
|
|
892
|
-
}, [JSON.stringify(
|
|
1063
|
+
setOptions(optionsSchema);
|
|
1064
|
+
}, [JSON.stringify(optionsSchema)]);
|
|
893
1065
|
// Fetch the schema on mount and on loader identity change.
|
|
894
1066
|
(0, react_2.useEffect)(function () {
|
|
895
1067
|
if (!optionsLoader) {
|
|
@@ -1076,14 +1248,32 @@ var FormEngineImpl = function (_a) {
|
|
|
1076
1248
|
// change and re-fixes forever (e.g. byte-size / expression / ruled string fields).
|
|
1077
1249
|
// Note: compare fixedValue against value, not localValue.fields — localValue may have been
|
|
1078
1250
|
// updated by nested FormEngine emissions, so comparing against it would never skip.
|
|
1079
|
-
var normalizedValue = normalizeEmptyFieldValues(value);
|
|
1080
1251
|
/* What this rebuild lets us agree with the parent on — `undefined` when it
|
|
1081
1252
|
contributed something the parent has yet to learn. */
|
|
1082
1253
|
var agreed = (0, exports.agreementFromRebuild)(fixedValue, value);
|
|
1254
|
+
// a different record: nothing of the previous one is carried into it (see `valueKey`)
|
|
1255
|
+
var sameRecord = valueKey === seenValueKey.current;
|
|
1083
1256
|
// the echo of an emit still in flight - the last or an older one - is not the parent's change
|
|
1084
1257
|
var echo = inFlight.isEcho(value);
|
|
1085
|
-
if ((echo || (
|
|
1086
|
-
|
|
1258
|
+
if (sameRecord && (echo || sameReportedValue(value, lastEmittedValue.current))) {
|
|
1259
|
+
/* The form's own report coming back. Whatever the rebuild adds - a schema that changed in the same
|
|
1260
|
+
commit, a field the host does not store - is added to the form's copy, never by going back to the
|
|
1261
|
+
report: the report may be older than edits made since (an echo of "a" arriving after "ab" was
|
|
1262
|
+
reported lost the "b"). Nothing changes when the form's copy has it all already. */
|
|
1263
|
+
var rebuild_1 = function (fields) {
|
|
1264
|
+
return (0, exports.fixOptions)(fields, options || {}, undefined, isRendererOnly);
|
|
1265
|
+
};
|
|
1266
|
+
if (!(0, lodash_1.isEqual)(rebuild_1(localValue.fields), localValue.fields)) {
|
|
1267
|
+
// the parent has to learn what the rebuild added
|
|
1268
|
+
mirroredValue.current = undefined;
|
|
1269
|
+
}
|
|
1270
|
+
/* What the host changed beside a field's value is taken (its type, say): the report is recognised by its
|
|
1271
|
+
values (see `takeHostsAttributes`). */
|
|
1272
|
+
var base_1 = seenValue.current;
|
|
1273
|
+
setLocalValue(function (current) {
|
|
1274
|
+
var rebuilt = rebuild_1((0, exports.takeHostsAttributes)(value, current.fields, base_1));
|
|
1275
|
+
return (0, lodash_1.isEqual)(rebuilt, current.fields) ? current : { fields: rebuilt, meta: current.meta };
|
|
1276
|
+
});
|
|
1087
1277
|
return;
|
|
1088
1278
|
}
|
|
1089
1279
|
if (!originalValue.current && (0, size_1.default)(fixedValue)) {
|
|
@@ -1096,8 +1286,25 @@ var FormEngineImpl = function (_a) {
|
|
|
1096
1286
|
if (agreed !== undefined) {
|
|
1097
1287
|
lastEmittedValue.current = agreed;
|
|
1098
1288
|
}
|
|
1099
|
-
|
|
1100
|
-
|
|
1289
|
+
if (!sameRecord) {
|
|
1290
|
+
setLocalValue({ fields: fixedValue, meta: undefined });
|
|
1291
|
+
return;
|
|
1292
|
+
}
|
|
1293
|
+
// The host's change, with the form's own edits it did not touch kept (see `mergeOwnEdits`).
|
|
1294
|
+
var base = seenValue.current;
|
|
1295
|
+
setLocalValue(function (current) {
|
|
1296
|
+
var merged = (0, exports.mergeOwnEdits)(value, current.fields, base);
|
|
1297
|
+
return {
|
|
1298
|
+
fields: merged === value ? fixedValue : ((0, exports.fixOptions)(merged, options || {}, undefined, isRendererOnly)),
|
|
1299
|
+
meta: undefined,
|
|
1300
|
+
};
|
|
1301
|
+
});
|
|
1302
|
+
}, [JSON.stringify(options), JSON.stringify(value), isRendererOnly, valueKey]);
|
|
1303
|
+
// Last of the value effects: what the next commit's `value` is a change from.
|
|
1304
|
+
(0, react_2.useEffect)(function () {
|
|
1305
|
+
seenValue.current = value;
|
|
1306
|
+
seenValueKey.current = valueKey;
|
|
1307
|
+
});
|
|
1101
1308
|
var handleValueChange = (0, react_2.useCallback)(function (optionName, val, _type, isFunction) {
|
|
1102
1309
|
setLocalValue(function (_a) {
|
|
1103
1310
|
var _b, _c;
|
|
@@ -1294,8 +1501,11 @@ var FormEngineImpl = function (_a) {
|
|
|
1294
1501
|
var _a, _b;
|
|
1295
1502
|
var option = fixedValue[optionName];
|
|
1296
1503
|
if (!(options === null || options === void 0 ? void 0 : options[optionName])) {
|
|
1297
|
-
|
|
1298
|
-
|
|
1504
|
+
// not on this instance - unless the schema is not yet the one in force (see `schemaInForce`)
|
|
1505
|
+
if (schemaInForce) {
|
|
1506
|
+
unavailableOptionsCount.current += 1;
|
|
1507
|
+
removeSelectedOption(optionName);
|
|
1508
|
+
}
|
|
1299
1509
|
return newValue;
|
|
1300
1510
|
}
|
|
1301
1511
|
var rendererType = (0, exports.getType)((options[optionName].ui_type || options[optionName].type), operators, option === null || option === void 0 ? void 0 : option.op);
|
|
@@ -1315,6 +1525,7 @@ var FormEngineImpl = function (_a) {
|
|
|
1315
1525
|
unavailableOptionsCount.current,
|
|
1316
1526
|
JSON.stringify(operators),
|
|
1317
1527
|
showInvalidOptionsOnly,
|
|
1528
|
+
schemaInForce,
|
|
1318
1529
|
]);
|
|
1319
1530
|
// Per required-group: its member options, and which member (if any) already
|
|
1320
1531
|
// satisfies it — drives the "One of" chips and the "covered by" notes.
|
|
@@ -1383,9 +1594,8 @@ var FormEngineImpl = function (_a) {
|
|
|
1383
1594
|
var locked = [];
|
|
1384
1595
|
(0, lodash_1.forEach)(options || {}, function (optionSchema, name) {
|
|
1385
1596
|
(0, lodash_1.forEach)((optionSchema === null || optionSchema === void 0 ? void 0 : optionSchema.allowed_values) || [], function (allowedValue) {
|
|
1386
|
-
var _a;
|
|
1387
1597
|
if (!(0, OptionFieldMessages_1.getAllowedValueAvailability)(allowedValue, availableOptions, options || {}).available) {
|
|
1388
|
-
locked.push("".concat(name, "\0").concat(JSON.stringify((
|
|
1598
|
+
locked.push("".concat(name, "\0").concat(JSON.stringify((0, allowedValues_1.allowedValueOf)(allowedValue))));
|
|
1389
1599
|
}
|
|
1390
1600
|
});
|
|
1391
1601
|
});
|
|
@@ -1445,12 +1655,15 @@ var FormEngineImpl = function (_a) {
|
|
|
1445
1655
|
}, [JSON.stringify(options), JSON.stringify(fixedValue), JSON.stringify(availableOptions)]);
|
|
1446
1656
|
var isOptionValid = (0, react_2.useCallback)(function (optionName, type, optionValue) {
|
|
1447
1657
|
var _a, _b, _c, _d;
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
// not
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1658
|
+
// the same "not set" the row's status reads: an empty list is no value
|
|
1659
|
+
var isEmpty = (0, readFirst_1.isOptionValueEmpty)(optionValue);
|
|
1660
|
+
// A field whose `depends_on` does not hold does not apply: it is hidden, and nothing in it can make the
|
|
1661
|
+
// form invalid - a value it holds is kept, and said in the form's note, valid or not (qorus#646).
|
|
1662
|
+
if (dependencyLockedNames.includes(optionName)) {
|
|
1663
|
+
return true;
|
|
1664
|
+
}
|
|
1665
|
+
// An empty field that is not required is not missing.
|
|
1666
|
+
if (isEmpty && !((_a = options === null || options === void 0 ? void 0 : options[optionName]) === null || _a === void 0 ? void 0 : _a.required) && !((_b = options === null || options === void 0 ? void 0 : options[optionName]) === null || _b === void 0 ? void 0 : _b.required_groups)) {
|
|
1454
1667
|
return true;
|
|
1455
1668
|
}
|
|
1456
1669
|
return (0, validations_1.validateField)((0, exports.getType)(type), optionValue, __assign(__assign({ has_to_have_value: true, optionSchema: options, options: availableOptions }, options === null || options === void 0 ? void 0 : options[optionName]), {
|
|
@@ -1469,28 +1682,41 @@ var FormEngineImpl = function (_a) {
|
|
|
1469
1682
|
]);
|
|
1470
1683
|
var getValidityData = (0, react_2.useCallback)(function () {
|
|
1471
1684
|
var fields = (0, reduce_1.default)(availableOptions, function (result, option, optionName) {
|
|
1472
|
-
var _a, _b, _c;
|
|
1685
|
+
var _a, _b, _c, _d;
|
|
1473
1686
|
var type = (0, exports.getOptionFieldStorageType)(optionName, option.type, options, operators, option.op, isRendererOnly, optionHoldsExpression(option));
|
|
1474
1687
|
var optionValue = option.value;
|
|
1475
1688
|
var isRequired = (_a = options === null || options === void 0 ? void 0 : options[optionName]) === null || _a === void 0 ? void 0 : _a.required;
|
|
1476
1689
|
var hasRequiredGroups = !!((_b = options === null || options === void 0 ? void 0 : options[optionName]) === null || _b === void 0 ? void 0 : _b.required_groups);
|
|
1477
|
-
|
|
1690
|
+
// the same "not set" the row's status reads: an empty list is no value
|
|
1691
|
+
var isEmpty = (0, readFirst_1.isOptionValueEmpty)(optionValue);
|
|
1478
1692
|
var validation;
|
|
1479
|
-
/* A
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
if (isEmpty &&
|
|
1487
|
-
((!isRequired && !hasRequiredGroups) || dependencyLockedNames.includes(optionName))) {
|
|
1488
|
-
validation = { isValid: true, reasons: [] };
|
|
1693
|
+
/* A field whose host gives its own reason (`invalid_reason`) is invalid while it does, whatever the
|
|
1694
|
+
field makes of its value: the host knows something the field cannot - that a field it names
|
|
1695
|
+
is not in the record, that text around a field is not a whole number - and says it in the field,
|
|
1696
|
+
in place of the field's own message (`getOptionFieldMessages`). */
|
|
1697
|
+
var hostReason = (_c = options === null || options === void 0 ? void 0 : options[optionName]) === null || _c === void 0 ? void 0 : _c.invalid_reason;
|
|
1698
|
+
if (hostReason) {
|
|
1699
|
+
validation = { isValid: false, reason: hostReason, reasons: [hostReason] };
|
|
1489
1700
|
}
|
|
1490
1701
|
else {
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1702
|
+
/* A required field locked by an unmet `depends_on` does not apply
|
|
1703
|
+
while it is locked: it is not in "Needs attention", and an empty one
|
|
1704
|
+
does not make the form incomplete either. Otherwise a check whose
|
|
1705
|
+
kind is Equals could never be saved, because Minimum — required for
|
|
1706
|
+
Between alone — is empty; and a form whose only gaps are fields
|
|
1707
|
+
nobody can fill in would say Incomplete with nothing to act on. A
|
|
1708
|
+
locked field that still HOLDS a value is validated as before. */
|
|
1709
|
+
if (dependencyLockedNames.includes(optionName) ||
|
|
1710
|
+
(isEmpty && !isRequired && !hasRequiredGroups)) {
|
|
1711
|
+
/* A field whose `depends_on` does not hold is hidden and does not apply: nothing in it makes the
|
|
1712
|
+
form invalid, empty or holding a value (kept, and said in the form's note - qorus#646). */
|
|
1713
|
+
validation = { isValid: true, reasons: [] };
|
|
1714
|
+
}
|
|
1715
|
+
else {
|
|
1716
|
+
validation = (0, validations_1.validateFieldWithResult)((0, exports.getType)(type), optionValue, __assign(__assign({ has_to_have_value: true, optionSchema: options, options: availableOptions }, options === null || options === void 0 ? void 0 : options[optionName]), {
|
|
1717
|
+
// The expression flag lives on the field value, not the schema.
|
|
1718
|
+
isFunction: option.is_expression, hasOwnEditor: isRendererOnly((_d = options === null || options === void 0 ? void 0 : options[optionName]) === null || _d === void 0 ? void 0 : _d.ui_type) }));
|
|
1719
|
+
}
|
|
1494
1720
|
}
|
|
1495
1721
|
result.push({
|
|
1496
1722
|
fieldName: optionName,
|
|
@@ -1519,9 +1745,16 @@ var FormEngineImpl = function (_a) {
|
|
|
1519
1745
|
(0, react_2.useEffect)(function () {
|
|
1520
1746
|
onValidityChange === null || onValidityChange === void 0 ? void 0 : onValidityChange(optionsAreValid, validityData);
|
|
1521
1747
|
}, [JSON.stringify(validityData)]);
|
|
1748
|
+
/* A field whose `depends_on` does not hold is not shown (qorus#646, David): it is not of use until it applies,
|
|
1749
|
+
so it is left out of the form - not shown waiting, locked - and appears once its dependency holds (and
|
|
1750
|
+
flashes - see `dependencyLockedNames`). Its value is kept; one it holds meanwhile is said in the form's
|
|
1751
|
+
note (`hiddenFieldsWithValues`). */
|
|
1522
1752
|
var shownOptions = (0, react_2.useMemo)(function () {
|
|
1523
1753
|
return (0, reduce_1.default)(availableOptions, function (newValue, option, optionName) {
|
|
1524
1754
|
var _a;
|
|
1755
|
+
if (dependencyLockedNames.includes(optionName)) {
|
|
1756
|
+
return newValue;
|
|
1757
|
+
}
|
|
1525
1758
|
if (showInvalidOptionsOnly &&
|
|
1526
1759
|
isOptionValid(optionName, (0, exports.getOptionFieldStorageType)(optionName, option.type, options, operators, option.op, isRendererOnly, optionHoldsExpression(option)), option.value)) {
|
|
1527
1760
|
return newValue;
|
|
@@ -1529,6 +1762,7 @@ var FormEngineImpl = function (_a) {
|
|
|
1529
1762
|
return __assign(__assign({}, newValue), (_a = {}, _a[optionName] = option, _a));
|
|
1530
1763
|
}, {});
|
|
1531
1764
|
}, [
|
|
1765
|
+
dependencyLockedNames,
|
|
1532
1766
|
showInvalidOptionsOnly,
|
|
1533
1767
|
isRendererOnly,
|
|
1534
1768
|
JSON.stringify(availableOptions),
|
|
@@ -1542,7 +1776,7 @@ var FormEngineImpl = function (_a) {
|
|
|
1542
1776
|
var schemaMsgIntent = (0, react_2.useCallback)(function (name) {
|
|
1543
1777
|
var _a;
|
|
1544
1778
|
// Filtered, not raw: a message hidden by its own `when`/`unless` must not
|
|
1545
|
-
//
|
|
1779
|
+
// color the row or push the field into "Needs attention" — the whole point
|
|
1546
1780
|
// of a conditional warning is that it is absent while it does not apply.
|
|
1547
1781
|
var msgs = (0, OptionFieldMessages_1.getShownSchemaMessages)((_a = options === null || options === void 0 ? void 0 : options[name]) === null || _a === void 0 ? void 0 : _a.messages, availableOptions, options);
|
|
1548
1782
|
if (msgs.some(function (m) { return m.intent === 'danger'; }))
|
|
@@ -1612,9 +1846,10 @@ var FormEngineImpl = function (_a) {
|
|
|
1612
1846
|
}, [JSON.stringify(options), requiredGroupsInfo, getOptionStatus, dependencyLockedNames]);
|
|
1613
1847
|
// How many fields are in the "Needs attention" box — drives the header link.
|
|
1614
1848
|
var readFirstAttentionCount = (0, react_2.useMemo)(function () {
|
|
1615
|
-
return Object.keys(availableOptions || {}).filter(
|
|
1616
|
-
|
|
1617
|
-
|
|
1849
|
+
return Object.keys(availableOptions || {}).filter(
|
|
1850
|
+
// a hidden field (its `depends_on` does not hold) is not in the form, nor in its counts
|
|
1851
|
+
function (name) { return !dependencyLockedNames.includes(name) && getOptionBucket(name) === 'attention'; }).length;
|
|
1852
|
+
}, [JSON.stringify(availableOptions), getOptionBucket, dependencyLockedNames]);
|
|
1618
1853
|
var getIntent = (0, react_2.useCallback)(
|
|
1619
1854
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
1620
1855
|
function (optName, type, optValue, _op) {
|
|
@@ -1663,14 +1898,35 @@ var FormEngineImpl = function (_a) {
|
|
|
1663
1898
|
var handleOptionLabelClick = (0, react_2.useCallback)(function (optionName) {
|
|
1664
1899
|
setShowHelpForOption(optionName);
|
|
1665
1900
|
}, []);
|
|
1666
|
-
|
|
1901
|
+
/** Whether the first-required scan below has opened its row, or is spent by the user's first move (see it). Only a
|
|
1902
|
+
* remount arms it again. */
|
|
1903
|
+
var hasAutoFocusedRef = (0, react_2.useRef)(false);
|
|
1904
|
+
/** The fields the first-required scan has looked at: it opens a field that needs an answer when the field first
|
|
1905
|
+
* appears in the form, not when one already there comes to need one. */
|
|
1906
|
+
var scannedFieldsRef = (0, react_2.useRef)(new Set());
|
|
1907
|
+
/* A row is opened or closed by what the user did to the row as it was drawn, never by flipping whatever the
|
|
1908
|
+
state is by the time React applies the update. A toggle read the direction from the latest state: the
|
|
1909
|
+
first-required scan opens its row with an update of its own, and a click on that row, drawn closed, landed on
|
|
1910
|
+
top of it and closed the row the user had just opened (qorus#646: the Qorus IDE's Schema "Draft Is Saved").
|
|
1911
|
+
Each of these does nothing to a row already in its state.
|
|
1912
|
+
|
|
1913
|
+
A row the user opens or closes is where they have chosen to work: the first-required scan, if it is still
|
|
1914
|
+
waiting for the focus to be free, does not run after either (qorus#646). */
|
|
1915
|
+
var expandOption = (0, react_2.useCallback)(function (optionName) {
|
|
1916
|
+
hasAutoFocusedRef.current = true;
|
|
1667
1917
|
setExpandedOptions(function (prev) {
|
|
1668
|
-
return prev.includes(optionName) ? prev
|
|
1918
|
+
return prev.includes(optionName) ? prev
|
|
1669
1919
|
// single (default): opening a row collapses any other open one.
|
|
1670
1920
|
: expandMode === 'single' ? [optionName]
|
|
1671
1921
|
: __spreadArray(__spreadArray([], prev, true), [optionName], false);
|
|
1672
1922
|
});
|
|
1673
1923
|
}, [expandMode]);
|
|
1924
|
+
var collapseOption = (0, react_2.useCallback)(function (optionName) {
|
|
1925
|
+
hasAutoFocusedRef.current = true;
|
|
1926
|
+
setExpandedOptions(function (prev) {
|
|
1927
|
+
return prev.includes(optionName) ? prev.filter(function (name) { return name !== optionName; }) : prev;
|
|
1928
|
+
});
|
|
1929
|
+
}, []);
|
|
1674
1930
|
// --- Caller-named starting rows (opt-in) ----------------------------------
|
|
1675
1931
|
// `initialExpandedOptions` lets a consumer name the rows that must already
|
|
1676
1932
|
// be open when the form first paints — the case where the expanded row is
|
|
@@ -1702,6 +1958,41 @@ var FormEngineImpl = function (_a) {
|
|
|
1702
1958
|
setExpandedOptions(function (prev) { return __spreadArray(__spreadArray([], prev, true), toExpand.filter(function (name) { return !prev.includes(name); }), true); });
|
|
1703
1959
|
}, [initialExpandedOptions, compact, availableOptions]);
|
|
1704
1960
|
// --- First-attention-field autofocus (opt-in) -----------------------------
|
|
1961
|
+
/** The first row (of `names`, in order: every row by default) that needs an answer and can take one, if any: what
|
|
1962
|
+
* the first-required scan opens. */
|
|
1963
|
+
var firstAttentionRow = function (names) {
|
|
1964
|
+
if (names === void 0) { names = Object.keys(availableOptions); }
|
|
1965
|
+
return (0, readFirst_1.getFirstAttentionOptionName)(names, function (fieldName) {
|
|
1966
|
+
var schema = options === null || options === void 0 ? void 0 : options[fieldName];
|
|
1967
|
+
if (!schema) {
|
|
1968
|
+
return undefined;
|
|
1969
|
+
}
|
|
1970
|
+
return {
|
|
1971
|
+
focusable: !readOnly &&
|
|
1972
|
+
!schema.disabled &&
|
|
1973
|
+
!schema.readonly &&
|
|
1974
|
+
!dependencyLockedNames.includes(fieldName),
|
|
1975
|
+
// Single source of truth: the same bucket the read-first status boxes
|
|
1976
|
+
// show, so a filled-but-invalid required row is a target too.
|
|
1977
|
+
needsAttention: getOptionBucket(fieldName) === 'attention',
|
|
1978
|
+
};
|
|
1979
|
+
});
|
|
1980
|
+
};
|
|
1981
|
+
var openFirstAttentionRow = function (target) {
|
|
1982
|
+
if (target) {
|
|
1983
|
+
setExpandedOptions(function (prev) {
|
|
1984
|
+
return prev.includes(target) ? prev
|
|
1985
|
+
: expandMode === 'multi' ? __spreadArray(__spreadArray([], prev, true), [target], false)
|
|
1986
|
+
// `expandMode: 'single'` is a rule about what a CLICK does: opening a
|
|
1987
|
+
// row closes the one the reader last opened. It is not a licence to
|
|
1988
|
+
// close a row the HOST named through `initialExpandedOptions`. That
|
|
1989
|
+
// is an address — a statement about what the page is FOR, made before
|
|
1990
|
+
// the reader did anything — and this scan is a convenience layered on
|
|
1991
|
+
// top of it. Keep the named rows; replace only what a click could.
|
|
1992
|
+
: __spreadArray(__spreadArray([], prev.filter(function (name) { return initialExpandedOptions === null || initialExpandedOptions === void 0 ? void 0 : initialExpandedOptions.includes(name); }), true), [target], false);
|
|
1993
|
+
});
|
|
1994
|
+
}
|
|
1995
|
+
};
|
|
1705
1996
|
// With `autoFocusFirstRequired`, drop the user straight into the first field
|
|
1706
1997
|
// they must fix. We reuse the engine's own ordering (`availableOptions`), the
|
|
1707
1998
|
// very same `getOptionBucket` the status boxes use to decide "needs attention"
|
|
@@ -1711,13 +2002,17 @@ var FormEngineImpl = function (_a) {
|
|
|
1711
2002
|
// `expandedOptions` — the row's editor-focus effect does the rest. No DOM
|
|
1712
2003
|
// scraping, no synthetic clicks, no polling.
|
|
1713
2004
|
//
|
|
1714
|
-
//
|
|
1715
|
-
//
|
|
1716
|
-
//
|
|
1717
|
-
//
|
|
1718
|
-
// genuine remount (a fresh instance)
|
|
1719
|
-
//
|
|
1720
|
-
|
|
2005
|
+
// It opens one row for the life of this instance, keyed on a field's arrival: the first field that needs an
|
|
2006
|
+
// answer when it first appears in the form. A schema that arrives after the mount, or in pieces, is covered: the
|
|
2007
|
+
// fields of a later piece are looked at when they arrive, as long as the scan has opened nothing yet. A field
|
|
2008
|
+
// already in the form that comes to need an answer (a value edited, a server-driven update) is not a reason to
|
|
2009
|
+
// open it, nor to re-grab focus; only a genuine remount (a fresh instance) arms the scan again.
|
|
2010
|
+
//
|
|
2011
|
+
// It waits only for the user's first move. A form opened from a button mounts while that button holds the
|
|
2012
|
+
// focus, and the scan waits for it to be free - but the user does not wait: they open a row (which spends
|
|
2013
|
+
// the scan, `expandOption`) or come into the form from the keyboard (which runs it, below). Waiting
|
|
2014
|
+
// past that, the scan ran the first time the focus rested on nothing, which is the Done that closes the
|
|
2015
|
+
// user's row, and opened the next row that needed an answer by itself in the middle of their work.
|
|
1721
2016
|
(0, react_2.useEffect)(function () {
|
|
1722
2017
|
// Two decisions, one scan. Both open the row that needs attention;
|
|
1723
2018
|
// `autoFocusFirstRequired` additionally promises the caret lands in it, and
|
|
@@ -1726,14 +2021,25 @@ var FormEngineImpl = function (_a) {
|
|
|
1726
2021
|
// CompactRow's tap-to-edit rule, and it declines just as firmly to take one
|
|
1727
2022
|
// that is already somewhere outside the row.
|
|
1728
2023
|
var wantsFocus = !!autoFocusFirstRequired;
|
|
1729
|
-
|
|
2024
|
+
// the schema the form holds is the one in force: not one a skeleton stands for, nor one the host has replaced
|
|
2025
|
+
if ((!wantsFocus && !expandFirstRequired) || !compact || !options || !schemaInForce) {
|
|
1730
2026
|
return;
|
|
1731
2027
|
}
|
|
1732
2028
|
if (hasAutoFocusedRef.current) {
|
|
1733
2029
|
return;
|
|
1734
2030
|
}
|
|
1735
2031
|
var orderedNames = Object.keys(availableOptions);
|
|
1736
|
-
|
|
2032
|
+
// the fields that have appeared since the scan last looked: only they can be what it opens
|
|
2033
|
+
var arrived = orderedNames.filter(function (name) { return !scannedFieldsRef.current.has(name); });
|
|
2034
|
+
if (!arrived.length) {
|
|
2035
|
+
return;
|
|
2036
|
+
}
|
|
2037
|
+
/* Read on the form the schema makes: a required field the schema brings is added to the form's value by the
|
|
2038
|
+
sync-down, an effect, so the render after the schema arrives. Read before that, the form had no row for it:
|
|
2039
|
+
the scan found nothing to open and was spent, and the field's row stayed closed (qorus#646: the Qorus IDE's
|
|
2040
|
+
pipeline processor, whose required field mappings arrive with its schema). */
|
|
2041
|
+
var formTheSchemaMakes = (0, exports.fixOptions)(fixedValue, options, undefined, isRendererOnly);
|
|
2042
|
+
if (Object.keys(formTheSchemaMakes || {}).some(function (name) { return !(name in fixedValue); })) {
|
|
1737
2043
|
return;
|
|
1738
2044
|
}
|
|
1739
2045
|
// Never grab focus from a control the user is already in — including a field
|
|
@@ -1752,55 +2058,107 @@ var FormEngineImpl = function (_a) {
|
|
|
1752
2058
|
if (wantsFocus && active && active !== document.body) {
|
|
1753
2059
|
return;
|
|
1754
2060
|
}
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
return
|
|
1761
|
-
focusable: !readOnly &&
|
|
1762
|
-
!schema.disabled &&
|
|
1763
|
-
!schema.readonly &&
|
|
1764
|
-
!dependencyLockedNames.includes(fieldName),
|
|
1765
|
-
// Single source of truth: the same bucket the read-first status boxes
|
|
1766
|
-
// show, so a filled-but-invalid required row is a target too.
|
|
1767
|
-
needsAttention: getOptionBucket(fieldName) === 'attention',
|
|
1768
|
-
};
|
|
1769
|
-
});
|
|
1770
|
-
// Mark done even when nothing needs attention, so later value edits or an
|
|
1771
|
-
// in-place schema reload never re-scan or re-focus. Only a remount arms it
|
|
1772
|
-
// again.
|
|
1773
|
-
hasAutoFocusedRef.current = true;
|
|
1774
|
-
if (target) {
|
|
1775
|
-
setExpandedOptions(function (prev) {
|
|
1776
|
-
return prev.includes(target) ? prev
|
|
1777
|
-
: expandMode === 'multi' ? __spreadArray(__spreadArray([], prev, true), [target], false)
|
|
1778
|
-
// `expandMode: 'single'` is a rule about what a CLICK does: opening a
|
|
1779
|
-
// row closes the one the reader last opened. It is not a licence to
|
|
1780
|
-
// close a row the HOST named through `initialExpandedOptions`. That
|
|
1781
|
-
// is an address — a statement about what the page is FOR, made before
|
|
1782
|
-
// the reader did anything — and this scan is a convenience layered on
|
|
1783
|
-
// top of it. Keep the named rows; replace only what a click could.
|
|
1784
|
-
: __spreadArray(__spreadArray([], prev.filter(function (name) { return initialExpandedOptions === null || initialExpandedOptions === void 0 ? void 0 : initialExpandedOptions.includes(name); }), true), [target], false);
|
|
1785
|
-
});
|
|
2061
|
+
// Looked at: a field here now is not looked at again, whatever it comes to hold.
|
|
2062
|
+
orderedNames.forEach(function (name) { return scannedFieldsRef.current.add(name); });
|
|
2063
|
+
var target = firstAttentionRow(arrived);
|
|
2064
|
+
if (!target) {
|
|
2065
|
+
// nothing that arrived needs an answer: the scan waits for the fields still to come
|
|
2066
|
+
return;
|
|
1786
2067
|
}
|
|
2068
|
+
hasAutoFocusedRef.current = true;
|
|
2069
|
+
openFirstAttentionRow(target);
|
|
1787
2070
|
}, [
|
|
1788
2071
|
autoFocusFirstRequired,
|
|
1789
2072
|
expandFirstRequired,
|
|
1790
2073
|
compact,
|
|
1791
2074
|
options,
|
|
2075
|
+
schemaInForce,
|
|
1792
2076
|
availableOptions,
|
|
2077
|
+
isRendererOnly,
|
|
1793
2078
|
readOnly,
|
|
1794
2079
|
dependencyLockedNames,
|
|
1795
2080
|
getOptionBucket,
|
|
1796
2081
|
expandMode,
|
|
1797
2082
|
initialExpandedOptions,
|
|
1798
2083
|
]);
|
|
2084
|
+
/* The two first moves a user makes in a form opened from a button, while the scan above waits for the
|
|
2085
|
+
focus to be free:
|
|
2086
|
+
- pointing into the form (a click on a row, a field, the toolbar) is choosing where to work, and spends
|
|
2087
|
+
the scan, as opening a row does (`expandOption`);
|
|
2088
|
+
- coming into it from the keyboard (Tab from the button) chooses nothing, and runs the scan now: the user
|
|
2089
|
+
is put in the first row that needs an answer, once. Coming straight into a control they can type in
|
|
2090
|
+
(a field already open, the search box) is theirs, and spends the scan without moving them.
|
|
2091
|
+
Only while the scan still waits; it never runs twice. */
|
|
2092
|
+
var keyboardEntry = (0, react_2.useRef)();
|
|
2093
|
+
keyboardEntry.current = function (event) {
|
|
2094
|
+
if (hasAutoFocusedRef.current || !options || !Object.keys(availableOptions).length) {
|
|
2095
|
+
return;
|
|
2096
|
+
}
|
|
2097
|
+
var from = event.relatedTarget;
|
|
2098
|
+
if (from && (compactWrapNode === null || compactWrapNode === void 0 ? void 0 : compactWrapNode.contains(from))) {
|
|
2099
|
+
return;
|
|
2100
|
+
}
|
|
2101
|
+
hasAutoFocusedRef.current = true;
|
|
2102
|
+
var entered = event.target;
|
|
2103
|
+
if ((0, rowFocus_1.isTypingControl)(entered)) {
|
|
2104
|
+
return;
|
|
2105
|
+
}
|
|
2106
|
+
var target = firstAttentionRow();
|
|
2107
|
+
if (!target) {
|
|
2108
|
+
return;
|
|
2109
|
+
}
|
|
2110
|
+
// A row takes the caret only from nothing - never from an element the reader is on (see CompactRow) - so
|
|
2111
|
+
// the element the Tab landed on lets it go: the scan is what the reader came in for.
|
|
2112
|
+
entered.blur();
|
|
2113
|
+
openFirstAttentionRow(target);
|
|
2114
|
+
};
|
|
2115
|
+
(0, react_2.useEffect)(function () {
|
|
2116
|
+
if (!autoFocusFirstRequired || !compact || !compactWrapNode) {
|
|
2117
|
+
return undefined;
|
|
2118
|
+
}
|
|
2119
|
+
var onPointerDown = function () {
|
|
2120
|
+
hasAutoFocusedRef.current = true;
|
|
2121
|
+
};
|
|
2122
|
+
var onFocusIn = function (event) { var _a; return (_a = keyboardEntry.current) === null || _a === void 0 ? void 0 : _a.call(keyboardEntry, event); };
|
|
2123
|
+
// capture: the pointer is the user's choice before anything in the form answers it
|
|
2124
|
+
compactWrapNode.addEventListener('pointerdown', onPointerDown, true);
|
|
2125
|
+
compactWrapNode.addEventListener('focusin', onFocusIn);
|
|
2126
|
+
return function () {
|
|
2127
|
+
compactWrapNode.removeEventListener('pointerdown', onPointerDown, true);
|
|
2128
|
+
compactWrapNode.removeEventListener('focusin', onFocusIn);
|
|
2129
|
+
};
|
|
2130
|
+
}, [autoFocusFirstRequired, compact, compactWrapNode]);
|
|
1799
2131
|
// Read-first completion summary (how many shown options have a value set),
|
|
1800
2132
|
// surfaced as a progress meter at the top of the compact form.
|
|
1801
2133
|
var readFirstCompletion = (0, react_2.useMemo)(function () {
|
|
1802
|
-
return (0, readFirst_1.getReadFirstCompletion)(
|
|
1803
|
-
|
|
2134
|
+
return (0, readFirst_1.getReadFirstCompletion)(
|
|
2135
|
+
// a hidden field (its `depends_on` does not hold) is not in the form, nor in its meter
|
|
2136
|
+
(0, lodash_1.omit)(availableOptions, dependencyLockedNames), function (name) { return getOptionBucket(name) === 'attention'; });
|
|
2137
|
+
}, [JSON.stringify(availableOptions), getOptionBucket, dependencyLockedNames]);
|
|
2138
|
+
/* The hidden fields (their `depends_on` does not hold) that hold a value: kept, not dropped silently, so the form
|
|
2139
|
+
says so in a note - and whether the value is valid, as no field shows it (qorus#646, David). */
|
|
2140
|
+
var hiddenFieldsWithValues = (0, react_2.useMemo)(function () {
|
|
2141
|
+
return dependencyLockedNames
|
|
2142
|
+
.filter(function (name) { var _a; return !(0, readFirst_1.isOptionValueEmpty)((_a = availableOptions === null || availableOptions === void 0 ? void 0 : availableOptions[name]) === null || _a === void 0 ? void 0 : _a.value); })
|
|
2143
|
+
.map(function (name) {
|
|
2144
|
+
var field = availableOptions[name];
|
|
2145
|
+
var schema = options === null || options === void 0 ? void 0 : options[name];
|
|
2146
|
+
var type = (0, exports.getOptionFieldStorageType)(name, field.type, options, operators, field.op, isRendererOnly, optionHoldsExpression(field));
|
|
2147
|
+
var validation = (0, validations_1.validateFieldWithResult)((0, exports.getType)(type), field.value, __assign(__assign({ has_to_have_value: true, optionSchema: options, options: availableOptions }, schema), { isFunction: field.is_expression, hasOwnEditor: isRendererOnly(schema === null || schema === void 0 ? void 0 : schema.ui_type) }));
|
|
2148
|
+
return {
|
|
2149
|
+
name: name,
|
|
2150
|
+
label: (schema === null || schema === void 0 ? void 0 : schema.display_name) || name,
|
|
2151
|
+
conditions: (0, OptionFieldMessages_1.describeDependencies)(((schema === null || schema === void 0 ? void 0 : schema.depends_on) || []), options || {}),
|
|
2152
|
+
invalidReason: validation.isValid ? undefined : validation.reason,
|
|
2153
|
+
};
|
|
2154
|
+
});
|
|
2155
|
+
}, [
|
|
2156
|
+
dependencyLockedNames,
|
|
2157
|
+
JSON.stringify(availableOptions),
|
|
2158
|
+
JSON.stringify(options),
|
|
2159
|
+
JSON.stringify(operators),
|
|
2160
|
+
isRendererOnly,
|
|
2161
|
+
]);
|
|
1804
2162
|
var optionalFields = (0, react_2.useMemo)(function () {
|
|
1805
2163
|
return Object.keys(filteredOptions).map(function (option) {
|
|
1806
2164
|
var _a, _b, _c, _d, _f, _g;
|
|
@@ -1970,7 +2328,7 @@ var FormEngineImpl = function (_a) {
|
|
|
1970
2328
|
(0, jsx_runtime_1.jsx)(reqore_1.ReqoreButton, { disabled: readOnly, icon: 'DeleteBinLine', effect: NegativeColorEffect, fixed: true, onClick: function () { return handleRemoveOperator(optionName, fixedValue, index); } })
|
|
1971
2329
|
: null] }, index));
|
|
1972
2330
|
}) }), (0, jsx_runtime_1.jsx)(reqore_1.ReqoreVerticalSpacer, { height: 5 })] })
|
|
1973
|
-
: null, (0, react_1.createElement)(TemplateField_1.TemplateField, __assign({ fluid: true }, options === null || options === void 0 ? void 0 : options[optionName], resolveInheritProps((_c = options === null || options === void 0 ? void 0 : options[optionName]) === null || _c === void 0 ? void 0 : _c.inherit_props, availableOptions, inheritedFromParent), {
|
|
2331
|
+
: null, (0, react_1.createElement)(TemplateField_1.TemplateField, __assign({ fluid: true }, options === null || options === void 0 ? void 0 : options[optionName], (0, inheritProps_1.resolveInheritProps)((_c = options === null || options === void 0 ? void 0 : options[optionName]) === null || _c === void 0 ? void 0 : _c.inherit_props, availableOptions, inheritedFromParent), {
|
|
1974
2332
|
// qorus#347-followup (scope forwarding): merge accumulated
|
|
1975
2333
|
// inheritance (`inheritedFromParent`) with THIS field's freshly
|
|
1976
2334
|
// resolved inherit_props, and pass down as a single bag so any
|
|
@@ -1999,6 +2357,9 @@ var FormEngineImpl = function (_a) {
|
|
|
1999
2357
|
// reqraft: form-level expression fields get the Visual/Text shell
|
|
2000
2358
|
// (DPQL text mode); opt out per-form via `templateFieldProps`.
|
|
2001
2359
|
allowTextExpressions: true,
|
|
2360
|
+
// a form's options enter their value on tabs: Value · Expression · Visual, or Value · Template
|
|
2361
|
+
// where only templates are taken (qorus#646); opt out per-form via `templateFieldProps`
|
|
2362
|
+
valueTabs: true,
|
|
2002
2363
|
// A fixed allowed-value field still needs its selector even when
|
|
2003
2364
|
// arbitrary custom values are forbidden. TemplateField uses this
|
|
2004
2365
|
// flag to decide whether to mount AutoFormField at all; treating
|
|
@@ -2043,11 +2404,13 @@ var FormEngineImpl = function (_a) {
|
|
|
2043
2404
|
!(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) ?
|
|
2044
2405
|
getCustomMenuTemplateItems(optionName)
|
|
2045
2406
|
: 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 }), operators && (0, size_1.default)(operators) && (0, size_1.default)(other.op) ?
|
|
2046
|
-
(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',
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
|
|
2407
|
+
(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)({
|
|
2408
|
+
label: (optionSchema === null || optionSchema === void 0 ? void 0 : optionSchema.display_name) || optionName,
|
|
2409
|
+
operatorKeys: operatorParts,
|
|
2410
|
+
operators: operators,
|
|
2411
|
+
value: other.value,
|
|
2412
|
+
shown: (0, readFirst_1.formatOptionValue)(__assign({ type: resolvedType }, other), optionSchema),
|
|
2413
|
+
}) })] })
|
|
2051
2414
|
: null] }));
|
|
2052
2415
|
}, [
|
|
2053
2416
|
options,
|
|
@@ -2064,7 +2427,7 @@ var FormEngineImpl = function (_a) {
|
|
|
2064
2427
|
fixedValue,
|
|
2065
2428
|
// Depend on the specific `rest` values used, not the whole `rest` object
|
|
2066
2429
|
// (which is a fresh `{...rest}` every render and would defeat the memo).
|
|
2067
|
-
|
|
2430
|
+
optionsSchema,
|
|
2068
2431
|
rest === null || rest === void 0 ? void 0 : rest.size,
|
|
2069
2432
|
handleValueChange,
|
|
2070
2433
|
handleOperatorChange,
|
|
@@ -2076,11 +2439,11 @@ var FormEngineImpl = function (_a) {
|
|
|
2076
2439
|
inheritedFromParent,
|
|
2077
2440
|
]);
|
|
2078
2441
|
// Compact (read-first) rendering.
|
|
2079
|
-
// Theme-derived
|
|
2442
|
+
// Theme-derived colors so the flat-row layout adapts to light/dark/custom themes.
|
|
2080
2443
|
var cText = ((_b = theme === null || theme === void 0 ? void 0 : theme.text) === null || _b === void 0 ? void 0 : _b.color) || '#f1f0ee';
|
|
2081
|
-
// Text emphasis tiers via reqore's readable-
|
|
2444
|
+
// Text emphasis tiers via reqore's readable-color helper (key = full readable
|
|
2082
2445
|
// text, muted = its dimmed variant, faint = the dimmed variant softened
|
|
2083
|
-
// further) instead of hand-rolled hex-alpha suffixes on the raw text
|
|
2446
|
+
// further) instead of hand-rolled hex-alpha suffixes on the raw text color.
|
|
2084
2447
|
var cKey = (0, colors_1.getReadableColor)(theme);
|
|
2085
2448
|
var cMuted = (0, colors_1.getReadableColor)(theme, undefined, undefined, true);
|
|
2086
2449
|
var cFaint = "".concat(cMuted, "99");
|
|
@@ -2090,6 +2453,15 @@ var FormEngineImpl = function (_a) {
|
|
|
2090
2453
|
var cWarning = ((_d = theme === null || theme === void 0 ? void 0 : theme.intents) === null || _d === void 0 ? void 0 : _d.warning) || '#ffdf34';
|
|
2091
2454
|
var cInfo = ((_f = theme === null || theme === void 0 ? void 0 : theme.intents) === null || _f === void 0 ? void 0 : _f.info) || '#3b8eea';
|
|
2092
2455
|
var cSuccess = ((_g = theme === null || theme === void 0 ? void 0 : theme.intents) === null || _g === void 0 ? void 0 : _g.success) || '#36b37e';
|
|
2456
|
+
// the rows' own words and marks, in colors that read on every surface a row is drawn on
|
|
2457
|
+
var rowInks = (0, react_2.useMemo)(function () { return (0, readFirstColors_1.getReadFirstInks)(theme); }, [theme]);
|
|
2458
|
+
// an option panel's short description, faint: as faint as it still reads in the theme
|
|
2459
|
+
var optionDescOpacity = (0, react_2.useMemo)(function () { return (0, readableColors_1.getReadableTextOpacity)(theme, 0.3); }, [theme]);
|
|
2460
|
+
/* an invalid option's mark in its panel's title: the danger, in the shade of it that stands out as reqore draws a
|
|
2461
|
+
title icon, at 70% (danger:lighten:5 was 2.9:1) */
|
|
2462
|
+
var invalidOptionIconColor = (0, react_2.useMemo)(function () {
|
|
2463
|
+
return (0, readableColors_1.getReadableShade)(cDanger, (0, readableColors_1.getThemeSurfaces)(theme), readableColors_1.READABLE_ICON, PANEL_TITLE_ICON_ALPHA);
|
|
2464
|
+
}, [theme, cDanger]);
|
|
2093
2465
|
var cBg = (theme === null || theme === void 0 ? void 0 : theme.main) || '#181818';
|
|
2094
2466
|
var cRowBg = (0, colors_1.changeDarkness)((0, colors_1.getMainBackgroundColor)(theme), 0.01);
|
|
2095
2467
|
var cGroupLine = "".concat(cText, "1f");
|
|
@@ -2099,8 +2471,39 @@ var FormEngineImpl = function (_a) {
|
|
|
2099
2471
|
// The closure surface the extracted CompactRow reads through context. Refs and
|
|
2100
2472
|
// setters are stable; the state/memo/handler fields change identity as they do
|
|
2101
2473
|
// today, so a row re-renders exactly when its inputs do.
|
|
2474
|
+
/* An open field is held in the box it was opened in, so finishing an edit does not remount it elsewhere
|
|
2475
|
+
and take the focus (see `stableBucketOf`). Held, it says where it now belongs - otherwise a value
|
|
2476
|
+
already right sat under "Needs attention" until ✓ was pressed, with nothing saying why (David's review
|
|
2477
|
+
of qorus#646). Keyed by option name: the box it moves to when closed.
|
|
2478
|
+
|
|
2479
|
+
It is said once per form, on the first field held this way, and on no field once that one is closed:
|
|
2480
|
+
the user knows it from then on, and saying it on every field takes room (qlip build 20261008-083118;
|
|
2481
|
+
David's decision). `movesToNoteFor` is that field - undefined until one is held, null once it is
|
|
2482
|
+
closed. */
|
|
2483
|
+
var heldEntries = expandedOptions
|
|
2484
|
+
.map(function (name) { return [name, settledBucket.current[name], getOptionBucket(name)]; })
|
|
2485
|
+
.filter(function (_a) {
|
|
2486
|
+
var held = _a[1], now = _a[2];
|
|
2487
|
+
return !!held && held !== now;
|
|
2488
|
+
})
|
|
2489
|
+
.map(function (_a) {
|
|
2490
|
+
var name = _a[0], now = _a[2];
|
|
2491
|
+
return [name, now];
|
|
2492
|
+
});
|
|
2493
|
+
if (movesToNoteFor.current === undefined && heldEntries.length) {
|
|
2494
|
+
movesToNoteFor.current = heldEntries[0][0];
|
|
2495
|
+
}
|
|
2496
|
+
else if (movesToNoteFor.current && !expandedOptions.includes(movesToNoteFor.current)) {
|
|
2497
|
+
movesToNoteFor.current = null;
|
|
2498
|
+
}
|
|
2499
|
+
var heldOptionsKey = JSON.stringify(Object.fromEntries(heldEntries.filter(function (_a) {
|
|
2500
|
+
var name = _a[0];
|
|
2501
|
+
return name === movesToNoteFor.current;
|
|
2502
|
+
})));
|
|
2503
|
+
var heldOptions = (0, react_2.useMemo)(function () { return JSON.parse(heldOptionsKey); }, [heldOptionsKey]);
|
|
2102
2504
|
var compactRowContextValue = (0, react_2.useMemo)(function () { return ({
|
|
2103
2505
|
templates: templates.value,
|
|
2506
|
+
heldOptions: heldOptions,
|
|
2104
2507
|
readOnly: readOnly,
|
|
2105
2508
|
onReadOnlyActivate: onReadOnlyActivate,
|
|
2106
2509
|
commitMode: commitMode,
|
|
@@ -2110,6 +2513,9 @@ var FormEngineImpl = function (_a) {
|
|
|
2110
2513
|
focusedEditing: focusedEditing,
|
|
2111
2514
|
showFieldTypes: showFieldTypes,
|
|
2112
2515
|
codePreviewRenderer: codePreviewRenderer,
|
|
2516
|
+
codeEditor: componentOverrides === null || componentOverrides === void 0 ? void 0 : componentOverrides['code-editor'],
|
|
2517
|
+
readSummaries: readSummaries,
|
|
2518
|
+
cardEditorTypes: cardEditorTypes,
|
|
2113
2519
|
showAllDescriptions: showAllDescriptions,
|
|
2114
2520
|
expandedOptions: expandedOptions,
|
|
2115
2521
|
highlightedOptions: highlightedOptions,
|
|
@@ -2124,7 +2530,8 @@ var FormEngineImpl = function (_a) {
|
|
|
2124
2530
|
requiredGroupsInfo: requiredGroupsInfo,
|
|
2125
2531
|
handleValueChange: handleValueChange,
|
|
2126
2532
|
handleAddOptionalFieldChange: handleAddOptionalFieldChange,
|
|
2127
|
-
|
|
2533
|
+
expandOption: expandOption,
|
|
2534
|
+
collapseOption: collapseOption,
|
|
2128
2535
|
flashOption: flashOption,
|
|
2129
2536
|
hasOptionChanged: hasOptionChanged,
|
|
2130
2537
|
handleOptionLabelClick: handleOptionLabelClick,
|
|
@@ -2147,8 +2554,10 @@ var FormEngineImpl = function (_a) {
|
|
|
2147
2554
|
cWarning: cWarning,
|
|
2148
2555
|
cInfo: cInfo,
|
|
2149
2556
|
cBg: cBg,
|
|
2557
|
+
rowInks: rowInks,
|
|
2150
2558
|
}); }, [
|
|
2151
2559
|
templates.value,
|
|
2560
|
+
heldOptions,
|
|
2152
2561
|
readOnly,
|
|
2153
2562
|
commitMode,
|
|
2154
2563
|
expandMode,
|
|
@@ -2157,6 +2566,9 @@ var FormEngineImpl = function (_a) {
|
|
|
2157
2566
|
focusedEditing,
|
|
2158
2567
|
showFieldTypes,
|
|
2159
2568
|
codePreviewRenderer,
|
|
2569
|
+
componentOverrides,
|
|
2570
|
+
readSummaries,
|
|
2571
|
+
cardEditorTypes,
|
|
2160
2572
|
showAllDescriptions,
|
|
2161
2573
|
expandedOptions,
|
|
2162
2574
|
highlightedOptions,
|
|
@@ -2171,7 +2583,8 @@ var FormEngineImpl = function (_a) {
|
|
|
2171
2583
|
requiredGroupsInfo,
|
|
2172
2584
|
handleValueChange,
|
|
2173
2585
|
handleAddOptionalFieldChange,
|
|
2174
|
-
|
|
2586
|
+
expandOption,
|
|
2587
|
+
collapseOption,
|
|
2175
2588
|
flashOption,
|
|
2176
2589
|
hasOptionChanged,
|
|
2177
2590
|
handleOptionLabelClick,
|
|
@@ -2194,6 +2607,7 @@ var FormEngineImpl = function (_a) {
|
|
|
2194
2607
|
cWarning,
|
|
2195
2608
|
cInfo,
|
|
2196
2609
|
cBg,
|
|
2610
|
+
rowInks,
|
|
2197
2611
|
]);
|
|
2198
2612
|
// `compactToolbar` resolved to a full object, so neither the context type nor
|
|
2199
2613
|
// the toolbar itself has to re-default anything. `null` means no toolbar.
|
|
@@ -2571,7 +2985,7 @@ var FormEngineImpl = function (_a) {
|
|
|
2571
2985
|
// "Covers"/"Covered by" chips already say which member satisfies it.
|
|
2572
2986
|
if (requiredGroupsInfo.satisfiedBy[grp])
|
|
2573
2987
|
return railed;
|
|
2574
|
-
return ((0, jsx_runtime_1.jsxs)(compactRowStyles_1.StyledRequiredClusterBox, { className: 'options-readfirst-required-cluster', "$border": "".concat(cWarning, "33"), "$tint": "".concat(cWarning, "0d"), children: [(0, jsx_runtime_1.jsxs)(compactRowStyles_1.StyledRequiredClusterHeader, { "$color":
|
|
2988
|
+
return ((0, jsx_runtime_1.jsxs)(compactRowStyles_1.StyledRequiredClusterBox, { className: 'options-readfirst-required-cluster', "$border": "".concat(cWarning, "33"), "$tint": "".concat(cWarning, "0d"), children: [(0, jsx_runtime_1.jsxs)(compactRowStyles_1.StyledRequiredClusterHeader, { "$color": rowInks.warning, children: [(0, jsx_runtime_1.jsx)(reqore_1.ReqoreIcon, { icon: 'LinkM', size: '11px', style: { color: rowInks.warning } }), "One of the below is required"] }), railed] }, grp));
|
|
2575
2989
|
});
|
|
2576
2990
|
};
|
|
2577
2991
|
// One schema group inside a status box: its thin sub-label, the group's
|
|
@@ -2655,7 +3069,7 @@ var FormEngineImpl = function (_a) {
|
|
|
2655
3069
|
visible` to `auto` unless the other axis is visible or
|
|
2656
3070
|
clip, which would put the scrollport straight back. `clip`
|
|
2657
3071
|
keeps the horizontal guard the row ellipsis relies on. */
|
|
2658
|
-
overflowY: 'visible', overflowX: 'clip' }, compactPanelProps === null || compactPanelProps === void 0 ? void 0 : compactPanelProps.contentStyle), children: [(0, size_1.default)(groupKeys) === 0 || (readOnly && !bucketCount('set')) ?
|
|
3072
|
+
overflowY: 'visible', overflowX: 'clip' }, compactPanelProps === null || compactPanelProps === void 0 ? void 0 : compactPanelProps.contentStyle), children: [(0, jsx_runtime_1.jsx)(HiddenFieldsNote_1.HiddenFieldsNote, { fields: hiddenFieldsWithValues }), (0, size_1.default)(groupKeys) === 0 || (readOnly && !bucketCount('set')) ?
|
|
2659
3073
|
(0, jsx_runtime_1.jsx)(reqore_1.ReqoreMessage, { flat: true, opaque: false, size: 'small', children: readOnly && !query ?
|
|
2660
3074
|
'Nothing is set.'
|
|
2661
3075
|
: 'No fields match the current filters.' })
|
|
@@ -2772,7 +3186,7 @@ var FormEngineImpl = function (_a) {
|
|
|
2772
3186
|
})
|
|
2773
3187
|
: null] }) }, box.key));
|
|
2774
3188
|
})] })), commitMode === 'batched' && !readOnly && dirtyOptionNames.length ?
|
|
2775
|
-
(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: "".concat(dirtyOptionNames.length, " unsaved change").concat(dirtyOptionNames.length === 1 ? '' : 's') }), (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 ?
|
|
3189
|
+
(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: "".concat(dirtyOptionNames.length, " unsaved change").concat(dirtyOptionNames.length === 1 ? '' : 's') }), 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 ?
|
|
2776
3190
|
'Apply the staged changes'
|
|
2777
3191
|
: 'Resolve the invalid fields before saving', onClick: handleCommitClick, children: "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: "Discard" })] }) })
|
|
2778
3192
|
: null] }) })] }) }) }));
|
|
@@ -2780,7 +3194,10 @@ var FormEngineImpl = function (_a) {
|
|
|
2780
3194
|
/* Which of the seven waits is holding the form, in the order they are
|
|
2781
3195
|
tested. Rendered as `data-wait` on the placeholder so a page can be asked
|
|
2782
3196
|
what it is waiting FOR instead of only that it is waiting. */
|
|
2783
|
-
var waitReason = rest.skeleton ?
|
|
3197
|
+
var waitReason = rest.skeleton ?
|
|
3198
|
+
skeletonReason ?
|
|
3199
|
+
"host:".concat(skeletonReason)
|
|
3200
|
+
: 'host'
|
|
2784
3201
|
: templates.loading ? 'templates'
|
|
2785
3202
|
: typesLoading ? 'types'
|
|
2786
3203
|
: optionsLoading ? 'options'
|
|
@@ -2816,10 +3233,10 @@ var FormEngineImpl = function (_a) {
|
|
|
2816
3233
|
: "".concat((0, size_1.default)(validityData.invalidFields) < 2 ? 'A field is not valid and requires' : "".concat((0, size_1.default)(validityData.invalidFields), " fields are not valid and require"), " attention. Click here to only show invalid fields.") })
|
|
2817
3234
|
: null, unavailableOptionsCount.current ?
|
|
2818
3235
|
(0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(reqore_1.ReqoreMessage, { intent: 'warning', opaque: false, size: 'small', margin: 'bottom', children: "".concat(unavailableOptionsCount.current, " fields(s) hidden because they are not supported on the current instance") }), (0, jsx_runtime_1.jsx)(reqore_1.ReqoreVerticalSpacer, { height: 10 })] })
|
|
2819
|
-
: null, children, (0, size_1.default)(filteredOptions) >= 1 && !readOnly ?
|
|
3236
|
+
: null, (0, jsx_runtime_1.jsx)(HiddenFieldsNote_1.HiddenFieldsNote, { fields: hiddenFieldsWithValues }), children, (0, size_1.default)(filteredOptions) >= 1 && !readOnly ?
|
|
2820
3237
|
(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 || 'More Options Available', minimal: true, icon: 'ListView', showDescription: false, fluid: true, size: rest.size })] })
|
|
2821
3238
|
: null] })); }, sortButtonProps: { minimal: true }, showLayoutSwitch: false, style: { width: '100%' }, items: (0, map_1.default)(shownOptions, function (_a, optionName) {
|
|
2822
|
-
var _b, _c, _d, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u
|
|
3239
|
+
var _b, _c, _d, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u;
|
|
2823
3240
|
var type = _a.type, other = __rest(_a, ["type"]);
|
|
2824
3241
|
return ({
|
|
2825
3242
|
label: ((_b = options[optionName]) === null || _b === void 0 ? void 0 : _b.display_name) || optionName,
|
|
@@ -2843,12 +3260,14 @@ var FormEngineImpl = function (_a) {
|
|
|
2843
3260
|
content: ((0, jsx_runtime_1.jsx)(Description_1.Description, { longDescription: "".concat((_h = options[optionName]) === null || _h === void 0 ? void 0 : _h.short_desc).concat(((_j = options[optionName]) === null || _j === void 0 ? void 0 : _j.desc) ? '. Click to learn more.' : ''), margin: 'none' })),
|
|
2844
3261
|
},
|
|
2845
3262
|
description: showFieldTypes ?
|
|
2846
|
-
|
|
3263
|
+
[(0, qorusTypeCatalogue_1.optionTypeWords)(options[optionName], typeName), options[optionName].short_desc]
|
|
3264
|
+
.filter(Boolean)
|
|
3265
|
+
.join(' · ')
|
|
2847
3266
|
: options[optionName].short_desc || '',
|
|
2848
3267
|
descriptionEffect: {
|
|
2849
3268
|
textSize: '11px',
|
|
2850
|
-
opacity:
|
|
2851
|
-
underline: ((
|
|
3269
|
+
opacity: optionDescOpacity,
|
|
3270
|
+
underline: ((_k = options[optionName]) === null || _k === void 0 ? void 0 : _k.desc) ? 'underline dotted #878787' : undefined,
|
|
2852
3271
|
},
|
|
2853
3272
|
customTheme: {
|
|
2854
3273
|
main: 'main:darken:1',
|
|
@@ -2857,7 +3276,7 @@ var FormEngineImpl = function (_a) {
|
|
|
2857
3276
|
icon: !isOptionValid(optionName, type, other.value) ? 'SpamFill'
|
|
2858
3277
|
: undefined,
|
|
2859
3278
|
iconColor: !isOptionValid(optionName, type, other.value) ?
|
|
2860
|
-
|
|
3279
|
+
invalidOptionIconColor
|
|
2861
3280
|
: undefined,
|
|
2862
3281
|
transparent: false,
|
|
2863
3282
|
intent: getIntent(optionName, type, other.value, other.op),
|
|
@@ -2885,7 +3304,7 @@ var FormEngineImpl = function (_a) {
|
|
|
2885
3304
|
menu: [
|
|
2886
3305
|
!readOnly &&
|
|
2887
3306
|
type !== 'code-editor' &&
|
|
2888
|
-
(((
|
|
3307
|
+
(((_l = options[optionName]) === null || _l === void 0 ? void 0 : _l.ui_type) || ((_m = options[optionName]) === null || _m === void 0 ? void 0 : _m.type)) !==
|
|
2889
3308
|
'code-editor' && {
|
|
2890
3309
|
label: 'Focused editing',
|
|
2891
3310
|
icon: 'FullscreenLine',
|
|
@@ -2898,22 +3317,22 @@ var FormEngineImpl = function (_a) {
|
|
|
2898
3317
|
icon: 'HistoryLine',
|
|
2899
3318
|
className: 'options-item-revert',
|
|
2900
3319
|
onClick: function () {
|
|
2901
|
-
var _a
|
|
2902
|
-
handleValueChange(
|
|
3320
|
+
var _a;
|
|
3321
|
+
handleValueChange.apply(void 0, __spreadArray([optionName], (0, argumentPresence_1.restoredFieldChange)((_a = originalValue.current) === null || _a === void 0 ? void 0 : _a[optionName]), false));
|
|
2903
3322
|
},
|
|
2904
3323
|
},
|
|
2905
3324
|
!readOnly &&
|
|
2906
3325
|
other.value &&
|
|
2907
3326
|
!(0, lodash_1.isEqual)(other.value, (0, common_1.getDefaultValue)(options[optionName])) &&
|
|
2908
|
-
!(((
|
|
3327
|
+
!(((_o = options[optionName]) === null || _o === void 0 ? void 0 : _o.disabled) || ((_p = options[optionName]) === null || _p === void 0 ? void 0 : _p.readonly)) && {
|
|
2909
3328
|
label: 'Remove value',
|
|
2910
3329
|
icon: 'CloseLine',
|
|
2911
3330
|
className: 'options-item-remove',
|
|
2912
3331
|
onClick: function () { return handleValueChange(optionName, undefined); },
|
|
2913
3332
|
},
|
|
2914
3333
|
!readOnly &&
|
|
2915
|
-
!((
|
|
2916
|
-
!((
|
|
3334
|
+
!((_q = options[optionName]) === null || _q === void 0 ? void 0 : _q.preselected) &&
|
|
3335
|
+
!((_r = options[optionName]) === null || _r === void 0 ? void 0 : _r.required) && {
|
|
2917
3336
|
label: 'Remove option',
|
|
2918
3337
|
icon: 'DeleteBinLine',
|
|
2919
3338
|
intent: 'danger',
|
|
@@ -2929,8 +3348,8 @@ var FormEngineImpl = function (_a) {
|
|
|
2929
3348
|
},
|
|
2930
3349
|
],
|
|
2931
3350
|
}),
|
|
2932
|
-
content: ((0, jsx_runtime_1.jsxs)(FocusedEditing_1.FocusedEditing, { isFullscreen: focusedEditing === optionName, onClose: function () { return setFocusedEditing(undefined); }, description: (
|
|
2933
|
-
(0, jsx_runtime_1.jsx)(Description_1.Description, { longDescription: (
|
|
3351
|
+
content: ((0, jsx_runtime_1.jsxs)(FocusedEditing_1.FocusedEditing, { isFullscreen: focusedEditing === optionName, onClose: function () { return setFocusedEditing(undefined); }, description: (_s = options[optionName]) === null || _s === void 0 ? void 0 : _s.display_name, intent: getIntent(optionName, type, other.value, other.op), children: [focusedEditing === optionName ?
|
|
3352
|
+
(0, jsx_runtime_1.jsx)(Description_1.Description, { longDescription: (_t = options[optionName]) === null || _t === void 0 ? void 0 : _t.desc, shortDescription: (_u = options[optionName]) === null || _u === void 0 ? void 0 : _u.short_desc, longDescriptionShownByDefault: true })
|
|
2934
3353
|
: null, renderOption(optionName, __assign({ type: type }, other))] })),
|
|
2935
3354
|
});
|
|
2936
3355
|
}), defaultZoom: 1, zoomable: false, actions: __spreadArray(__spreadArray([], (rest.actions || []).map(function (action) { return (__assign(__assign({}, action), { minimal: true })); }), true), [
|
|
@@ -2967,8 +3386,13 @@ var FormEngineImpl = function (_a) {
|
|
|
2967
3386
|
* a child of the row it belongs to. Threading a renderer to each of them by
|
|
2968
3387
|
* hand is how one of them gets missed.
|
|
2969
3388
|
*/
|
|
2970
|
-
var FormEngine = function (props) {
|
|
3389
|
+
var FormEngine = function (props) {
|
|
3390
|
+
// what the host knows of references beyond the catalogue, for every chip the form draws (qorus#646)
|
|
3391
|
+
var referenceNames = (0, react_2.useMemo)(function () { var _a; return (_a = props.templateReferences) !== null && _a !== void 0 ? _a : NO_REFERENCE_NAMES; }, [props.templateReferences]);
|
|
3392
|
+
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)) }) }) }));
|
|
3393
|
+
};
|
|
2971
3394
|
exports.FormEngine = FormEngine;
|
|
3395
|
+
var NO_REFERENCE_NAMES = {};
|
|
2972
3396
|
exports.default = exports.FormEngine;
|
|
2973
3397
|
var templateObject_1, templateObject_2, templateObject_3, templateObject_4;
|
|
2974
3398
|
//# sourceMappingURL=FormEngine.js.map
|