@qoretechnologies/reqraft 0.10.64 → 0.10.65-pr.137.g62fcecc
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/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 +25 -5
- package/dist/components/dpqlEditor/DpqlEditor.js.map +1 -1
- package/dist/components/dpqlEditor/dpqlHelpers.d.ts +36 -5
- package/dist/components/dpqlEditor/dpqlHelpers.d.ts.map +1 -1
- package/dist/components/dpqlEditor/dpqlHelpers.js +340 -62
- package/dist/components/dpqlEditor/dpqlHelpers.js.map +1 -1
- package/dist/components/dpqlEditor/dpqlTags.d.ts +11 -7
- package/dist/components/dpqlEditor/dpqlTags.d.ts.map +1 -1
- package/dist/components/dpqlEditor/dpqlTags.js +35 -17
- package/dist/components/dpqlEditor/dpqlTags.js.map +1 -1
- package/dist/components/dpqlEditor/types.d.ts +54 -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 +207 -97
- 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 +58 -10
- package/dist/components/form/engine/FormEngine.d.ts.map +1 -1
- package/dist/components/form/engine/FormEngine.js +542 -112
- 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 +24 -3
- package/dist/components/form/engine/OptionFieldMessages.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 +21 -0
- package/dist/components/form/engine/compactRowContext.d.ts.map +1 -1
- package/dist/components/form/engine/compactRowContext.js.map +1 -1
- package/dist/components/form/engine/compactRowStyles.d.ts +20 -10
- package/dist/components/form/engine/compactRowStyles.d.ts.map +1 -1
- package/dist/components/form/engine/compactRowStyles.js +36 -30
- 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/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 +3 -3
- package/dist/components/form/expressions/DpqlRendering.js.map +1 -1
- package/dist/components/form/expressions/ExpressionField.d.ts +64 -3
- package/dist/components/form/expressions/ExpressionField.d.ts.map +1 -1
- package/dist/components/form/expressions/ExpressionField.js +459 -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 +24 -2
- package/dist/components/form/expressions/builder/index.d.ts.map +1 -1
- package/dist/components/form/expressions/builder/index.js +138 -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/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 +40 -9
- 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 +26 -9
- 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 +17 -4
- package/dist/components/form/fields/allowed-values/AllowedValues.js.map +1 -1
- 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 +81 -36
- 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 +17 -3
- 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 +4 -1
- 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/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 +188 -82
- 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 +49 -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 +2 -0
- package/dist/components/form/fields/select/Select.d.ts.map +1 -1
- package/dist/components/form/fields/select/Select.js +19 -10
- package/dist/components/form/fields/select/Select.js.map +1 -1
- package/dist/components/form/fields/select/SelectCollection.d.ts.map +1 -1
- package/dist/components/form/fields/select/SelectCollection.js +8 -2
- 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 +13 -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 +102 -1
- package/dist/components/form/fields/template/TemplateField.d.ts.map +1 -1
- package/dist/components/form/fields/template/TemplateField.js +572 -85
- 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 +9 -11
- package/dist/components/form/fields/template/TemplateText.js.map +1 -1
- 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 +10 -0
- package/dist/components/form/index.d.ts.map +1 -1
- package/dist/components/form/index.js +23 -1
- package/dist/components/form/index.js.map +1 -1
- package/dist/components/imageLightbox/ImageLightbox.d.ts.map +1 -1
- package/dist/components/imageLightbox/ImageLightbox.js +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 +43 -0
- package/dist/components/smartEditor/CompletionMenu.d.ts.map +1 -0
- package/dist/components/smartEditor/CompletionMenu.js +196 -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 +164 -180
- 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 +18 -0
- package/dist/components/smartEditor/templateCompletions.d.ts.map +1 -0
- package/dist/components/smartEditor/templateCompletions.js +94 -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 +33 -1
- package/dist/components/smartEditor/types.d.ts.map +1 -1
- package/dist/components/smartEditor/useLspAutocomplete.d.ts +32 -0
- package/dist/components/smartEditor/useLspAutocomplete.d.ts.map +1 -1
- package/dist/components/smartEditor/useLspAutocomplete.js +228 -118
- 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 +279 -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/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/descriptionTooltip.d.ts +43 -0
- package/dist/helpers/descriptionTooltip.d.ts.map +1 -0
- package/dist/helpers/descriptionTooltip.js +70 -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/qorusTypeCatalogue.d.ts +53 -0
- package/dist/helpers/qorusTypeCatalogue.d.ts.map +1 -0
- package/dist/helpers/qorusTypeCatalogue.js +262 -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.js +5 -2
- package/dist/helpers/templateText.js.map +1 -1
- package/dist/helpers/templates.d.ts +41 -14
- package/dist/helpers/templates.d.ts.map +1 -1
- package/dist/helpers/templates.js +152 -9
- package/dist/helpers/templates.js.map +1 -1
- package/dist/helpers/validations.d.ts +9 -0
- package/dist/helpers/validations.d.ts.map +1 -1
- package/dist/helpers/validations.js +139 -33
- package/dist/helpers/validations.js.map +1 -1
- 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,12 @@ 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 readableColors_1 = require("../../../helpers/readableColors");
|
|
104
106
|
var colors_1 = require("@qoretechnologies/reqore/dist/helpers/colors");
|
|
105
107
|
var argumentPresence_1 = require("../expressions/argumentPresence");
|
|
106
108
|
var typeChoices_1 = require("./typeChoices");
|
|
@@ -132,10 +134,12 @@ var compactRowContext_1 = require("./compactRowContext");
|
|
|
132
134
|
var compactRowStyles_1 = require("./compactRowStyles");
|
|
133
135
|
var CompactToolbar_1 = require("./CompactToolbar");
|
|
134
136
|
var compactToolbarContext_1 = require("./compactToolbarContext");
|
|
137
|
+
var HiddenFieldsNote_1 = require("./HiddenFieldsNote");
|
|
135
138
|
var OptionFieldMessages_1 = require("./OptionFieldMessages");
|
|
136
139
|
var optionsContext_1 = require("./optionsContext");
|
|
137
140
|
var markdownRendererContext_1 = require("../../Description/markdownRendererContext");
|
|
138
141
|
var OptionsHelpDialog_1 = require("./OptionsHelpDialog");
|
|
142
|
+
var rowFocus_1 = require("./rowFocus");
|
|
139
143
|
var optionUiTypes_1 = require("../../../helpers/optionUiTypes");
|
|
140
144
|
var readFirst_1 = require("./readFirst");
|
|
141
145
|
/**
|
|
@@ -228,7 +232,7 @@ var PositiveColorEffect = {
|
|
|
228
232
|
glow: 'success',
|
|
229
233
|
};
|
|
230
234
|
// Compact (read-first) layout: flat label | value | action rows in collapsible
|
|
231
|
-
// group panels;
|
|
235
|
+
// group panels; colors come in as props so the layout follows the Reqore theme.
|
|
232
236
|
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
237
|
var $ownScroll = _a.$ownScroll;
|
|
234
238
|
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 +435,34 @@ var normalizeEmptyFieldValues = function (fields) {
|
|
|
431
435
|
return acc;
|
|
432
436
|
}, {});
|
|
433
437
|
};
|
|
438
|
+
/**
|
|
439
|
+
* The value as a host can hand it back: each field as its value, and the fields that hold nothing left out.
|
|
440
|
+
*
|
|
441
|
+
* A report of the form's is recognised by what it says, not by how the host writes it back. A host that
|
|
442
|
+
* stores only the fields holding a value (the Qorus IDE's editors) hands a report back without its empty
|
|
443
|
+
* fields; one that stores a field under its own type (the IDE stores what an `int` field reported as a
|
|
444
|
+
* `string`) hands it back with that type. Compared field for field, type and all, the report never came
|
|
445
|
+
* back as itself:
|
|
446
|
+
* - the form took it for the host's own change and went back to it, losing what had been typed since, and
|
|
447
|
+
* the two chased each other's reports on every echo;
|
|
448
|
+
* - an edit back to a value reported before (A, then B, then A again), made as the echo of B arrived, was
|
|
449
|
+
* held back as made before the host's change, and the field went back to B (qorus#646: a template
|
|
450
|
+
* field's text, deleted back to its reference, kept the text in the IDE).
|
|
451
|
+
*
|
|
452
|
+
* For recognising a value only. Whether a rebuild adds anything is still read with the empty fields in
|
|
453
|
+
* (`isMirrorOfValue`): a new schema's empty required field is a row the form has to add.
|
|
454
|
+
*/
|
|
455
|
+
var reportedValues = function (fields) {
|
|
456
|
+
return (0, reduce_1.default)(fields || {}, function (acc, field, name) {
|
|
457
|
+
var fieldValue = comparableField(field);
|
|
458
|
+
if (fieldValue !== undefined) {
|
|
459
|
+
acc[name] = fieldValue;
|
|
460
|
+
}
|
|
461
|
+
return acc;
|
|
462
|
+
}, {});
|
|
463
|
+
};
|
|
464
|
+
/** The same value, as a report coming back from a host is recognised. */
|
|
465
|
+
var sameReportedValue = function (a, b) { return (0, lodash_1.isEqual)(reportedValues(a), reportedValues(b)); };
|
|
434
466
|
/**
|
|
435
467
|
* Does this rebuild say anything the parent does not already hold?
|
|
436
468
|
*
|
|
@@ -460,6 +492,118 @@ var agreementFromRebuild = function (fixedValue, value) {
|
|
|
460
492
|
return (0, exports.isMirrorOfValue)(fixedValue, value) ? fixedValue : undefined;
|
|
461
493
|
};
|
|
462
494
|
exports.agreementFromRebuild = agreementFromRebuild;
|
|
495
|
+
/**
|
|
496
|
+
* A field as the form compares one host value with another: an empty field ('' or none, whatever its type) is
|
|
497
|
+
* the same as no field, and a field is its value, however it is written (`{ type, value }` or the bare value).
|
|
498
|
+
*/
|
|
499
|
+
var comparableField = function (field) {
|
|
500
|
+
var fieldValue = field !== null && typeof field === 'object' && !Array.isArray(field) && 'value' in field ?
|
|
501
|
+
field.value
|
|
502
|
+
: field !== null && typeof field === 'object' && !Array.isArray(field) && 'type' in field ?
|
|
503
|
+
undefined
|
|
504
|
+
: field;
|
|
505
|
+
return fieldValue === '' ? undefined : fieldValue;
|
|
506
|
+
};
|
|
507
|
+
var sameField = function (a, b) {
|
|
508
|
+
return (0, lodash_1.isEqual)(comparableField(a), comparableField(b));
|
|
509
|
+
};
|
|
510
|
+
/** A field written as `{ type, value }`, not a bare value. */
|
|
511
|
+
var isTypedField = function (field) {
|
|
512
|
+
return field !== null &&
|
|
513
|
+
typeof field === 'object' &&
|
|
514
|
+
!Array.isArray(field) &&
|
|
515
|
+
typeof field.type === 'string';
|
|
516
|
+
};
|
|
517
|
+
/**
|
|
518
|
+
* The form's copy of a field, with everything the host changed beside its value since `base`: its type, whether
|
|
519
|
+
* it is an expression, its operator, or anything else it says. `own` itself where the host changed nothing.
|
|
520
|
+
*
|
|
521
|
+
* A report of the form's is recognised by its values, and a field's value is merged by its value (see
|
|
522
|
+
* `reportedValues`, `mergeOwnEdits`), so a change the host made to a field's type alone said nothing: the form
|
|
523
|
+
* kept its own type. The Qorus IDE makes an added field's whole number true or false, holding the same field
|
|
524
|
+
* `pos`; the form kept the `int` and drew `pos` as text on the Value tab, where a true or false field shows it on
|
|
525
|
+
* its Expression tab (qorus#646).
|
|
526
|
+
*
|
|
527
|
+
* Every key but `value` is compared, not a list of the ones known today: whatever a host writes into a field
|
|
528
|
+
* 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
|
|
529
|
+
* host that stores a field under its own type does not change the form's (that is why the value alone is what
|
|
530
|
+
* recognises a report).
|
|
531
|
+
*/
|
|
532
|
+
var withHostsAttributes = function (own, host, base) {
|
|
533
|
+
if (!isTypedField(own) || !isTypedField(host)) {
|
|
534
|
+
return own;
|
|
535
|
+
}
|
|
536
|
+
var hostField = host;
|
|
537
|
+
var baseField = isTypedField(base) ? base : {};
|
|
538
|
+
var ownField = own;
|
|
539
|
+
var taken;
|
|
540
|
+
new Set(__spreadArray(__spreadArray([], Object.keys(hostField), true), Object.keys(baseField), true)).forEach(function (key) {
|
|
541
|
+
var hosts = hostField[key];
|
|
542
|
+
if (key === 'value' || (0, lodash_1.isEqual)(hosts, baseField[key]) || (0, lodash_1.isEqual)(ownField[key], hosts)) {
|
|
543
|
+
return;
|
|
544
|
+
}
|
|
545
|
+
taken = taken !== null && taken !== void 0 ? taken : __assign({}, ownField);
|
|
546
|
+
if (hosts === undefined) {
|
|
547
|
+
delete taken[key];
|
|
548
|
+
}
|
|
549
|
+
else {
|
|
550
|
+
taken[key] = hosts;
|
|
551
|
+
}
|
|
552
|
+
});
|
|
553
|
+
return taken !== null && taken !== void 0 ? taken : own;
|
|
554
|
+
};
|
|
555
|
+
/**
|
|
556
|
+
* The form's copy with what the host changed beside each field's value since `base` taken (see
|
|
557
|
+
* `withHostsAttributes`). Returns `ours` itself when there is nothing the form's copy does not have already.
|
|
558
|
+
*/
|
|
559
|
+
var takeHostsAttributes = function (theirs, ours, base) {
|
|
560
|
+
var _a;
|
|
561
|
+
var typed;
|
|
562
|
+
(0, lodash_1.forEach)(theirs || {}, function (host, name) {
|
|
563
|
+
var own = ours === null || ours === void 0 ? void 0 : ours[name];
|
|
564
|
+
var taken = withHostsAttributes(own, host, base === null || base === void 0 ? void 0 : base[name]);
|
|
565
|
+
if (taken !== own) {
|
|
566
|
+
typed = typed !== null && typed !== void 0 ? typed : __assign({}, (ours || {}));
|
|
567
|
+
typed[name] = taken;
|
|
568
|
+
}
|
|
569
|
+
});
|
|
570
|
+
return (_a = typed) !== null && _a !== void 0 ? _a : ours;
|
|
571
|
+
};
|
|
572
|
+
exports.takeHostsAttributes = takeHostsAttributes;
|
|
573
|
+
/**
|
|
574
|
+
* The host's change, with the form's own edits kept: a three-way merge of `theirs` (the `value` the host
|
|
575
|
+
* hands down now) and `ours` (the form's copy) against `base` (the `value` the form last saw).
|
|
576
|
+
*
|
|
577
|
+
* A field the form changed and the host did not keeps the form's value; every other field takes the host's,
|
|
578
|
+
* a field both changed included. The host and the form can change the value in the same commit - a host
|
|
579
|
+
* renaming something as the user's edit reaches the form - and taking either side whole lost the other's
|
|
580
|
+
* change; sending the form's copy over the host's change made the two trade places forever (qorus#646).
|
|
581
|
+
*
|
|
582
|
+
* Returns `theirs` itself when the form has nothing of its own to keep.
|
|
583
|
+
*/
|
|
584
|
+
var mergeOwnEdits = function (theirs, ours, base) {
|
|
585
|
+
var _a;
|
|
586
|
+
var merged;
|
|
587
|
+
var names = new Set(__spreadArray(__spreadArray([], Object.keys(ours || {}), true), Object.keys(base || {}), true));
|
|
588
|
+
names.forEach(function (name) {
|
|
589
|
+
var own = ours === null || ours === void 0 ? void 0 : ours[name];
|
|
590
|
+
var before = base === null || base === void 0 ? void 0 : base[name];
|
|
591
|
+
var host = theirs === null || theirs === void 0 ? void 0 : theirs[name];
|
|
592
|
+
if (sameField(own, before) || !sameField(host, before) || sameField(host, own)) {
|
|
593
|
+
return;
|
|
594
|
+
}
|
|
595
|
+
merged = merged !== null && merged !== void 0 ? merged : __assign({}, (theirs || {}));
|
|
596
|
+
if (own === undefined) {
|
|
597
|
+
delete merged[name];
|
|
598
|
+
}
|
|
599
|
+
else {
|
|
600
|
+
// the form's value, with what the host changed beside it (its type, say)
|
|
601
|
+
merged[name] = withHostsAttributes(own, host, before);
|
|
602
|
+
}
|
|
603
|
+
});
|
|
604
|
+
return (_a = merged) !== null && _a !== void 0 ? _a : theirs;
|
|
605
|
+
};
|
|
606
|
+
exports.mergeOwnEdits = mergeOwnEdits;
|
|
463
607
|
/**
|
|
464
608
|
* Should the form report `localValue` to its parent as an answer?
|
|
465
609
|
*
|
|
@@ -516,6 +660,8 @@ var getTypeAndCanBeNull = function (type, allowed_values, operatorData, operator
|
|
|
516
660
|
exports.getTypeAndCanBeNull = getTypeAndCanBeNull;
|
|
517
661
|
// Option types rendered full-width (IDE Options parity, commit 8e6b7781).
|
|
518
662
|
var STRECHABLE_TYPES = new Set(['tool-catalog']);
|
|
663
|
+
/** How faded reqore draws a panel's title icon. */
|
|
664
|
+
var PANEL_TITLE_ICON_ALPHA = 0.7;
|
|
519
665
|
var FormEngineImpl = function (_a) {
|
|
520
666
|
var _b, _c, _d, _f, _g;
|
|
521
667
|
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 +680,14 @@ var FormEngineImpl = function (_a) {
|
|
|
534
680
|
// been a no-op. Removing it from the API is a separate, breaking change —
|
|
535
681
|
// every consumer passing it today already gets the flush layout by default.
|
|
536
682
|
// 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,
|
|
683
|
+
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
684
|
// consumed by the wrapper below, which publishes it to every description this
|
|
539
685
|
// form draws; destructured here only so it cannot reach `rest` and be spread
|
|
540
686
|
// onto a DOM node
|
|
541
687
|
_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,
|
|
688
|
+
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,
|
|
689
|
+
// The form's own props, read here and never handed on to the collection drawn below (`{...rest}`).
|
|
690
|
+
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
691
|
// Built-ins + whatever the consumer declared for its own injected editors.
|
|
544
692
|
var isRendererOnly = (0, react_2.useMemo)(function () { return (0, rendererTypes_1.createRendererOnlyUiTypeCheck)(rendererOnlyUiTypes); }, [JSON.stringify(rendererOnlyUiTypes)]);
|
|
545
693
|
// Pointer CAPABILITY and viewport WIDTH are different questions and both
|
|
@@ -564,10 +712,22 @@ var FormEngineImpl = function (_a) {
|
|
|
564
712
|
enters the component, so the header, the chips, the messages, the meter and
|
|
565
713
|
the read-first summary cannot disagree about it: every one of them reads
|
|
566
714
|
`options`, and none of them has to know the rule. */
|
|
567
|
-
var _u = (0, react_2.useState)(
|
|
715
|
+
var _u = (0, react_2.useState)(optionsSchema || undefined), servedOptions = _u[0], setOptions = _u[1];
|
|
568
716
|
var options = (0, react_2.useMemo)(function () { return (0, options_1.resolveDegenerateRequiredGroups)(servedOptions); }, [servedOptions]);
|
|
717
|
+
/* Whether the schema the form holds is the one in force: its host is not waiting behind the skeleton, and a
|
|
718
|
+
schema the host hands down has been taken in (`servedOptions` follows the `options` prop a render later).
|
|
719
|
+
Until then the value is neither pruned against the schema nor emitted. A host loading the schema hands an
|
|
720
|
+
empty or an earlier one meanwhile; read against that, every stored field was "not on this instance" and
|
|
721
|
+
was removed, so a Qog state opened before its options had loaded showed them empty and, once emitted,
|
|
722
|
+
lost them (qorus#646). */
|
|
723
|
+
var hostSchemaPending = !optionsLoader &&
|
|
724
|
+
!url &&
|
|
725
|
+
!customUrl &&
|
|
726
|
+
optionsSchema !== servedOptions &&
|
|
727
|
+
JSON.stringify(optionsSchema || undefined) !== JSON.stringify(servedOptions);
|
|
728
|
+
var schemaInForce = !rest.skeleton && !hostSchemaPending;
|
|
569
729
|
// optionsLoader lifecycle: loading feeds the skeleton gate, error the banner.
|
|
570
|
-
var _v = (0, react_2.useState)(!!optionsLoader && !
|
|
730
|
+
var _v = (0, react_2.useState)(!!optionsLoader && !optionsSchema), optionsLoading = _v[0], setOptionsLoading = _v[1];
|
|
571
731
|
var _w = (0, react_2.useState)(), optionsError = _w[0], setOptionsError = _w[1];
|
|
572
732
|
// Operators: prop-provided (compact) or fetched via operatorsUrl (dpql,
|
|
573
733
|
// ported from IDE Options) — the fetch overrides the seeded prop value.
|
|
@@ -636,6 +796,8 @@ var FormEngineImpl = function (_a) {
|
|
|
636
796
|
// stays put when its status flips (e.g. becomes valid) instead of jumping to
|
|
637
797
|
// another box mid-edit and stealing focus. Keyed by option name.
|
|
638
798
|
var settledBucket = (0, react_2.useRef)({});
|
|
799
|
+
// the one field that says where it moves when it is closed: see `heldOptions`
|
|
800
|
+
var movesToNoteFor = (0, react_2.useRef)(undefined);
|
|
639
801
|
// Measured form width (not viewport — the form lives in drawers/panels of
|
|
640
802
|
// arbitrary width) drives the stacked narrow layout.
|
|
641
803
|
var _7 = (0, react_use_1.useMeasure)(), compactWrapRef = _7[0], compactWrapWidth = _7[1].width;
|
|
@@ -657,7 +819,11 @@ var FormEngineImpl = function (_a) {
|
|
|
657
819
|
measurement below takes it as a dependency, and a dependency array is
|
|
658
820
|
evaluated during render — a `const` declared further down would still be
|
|
659
821
|
in its temporal dead zone. */
|
|
660
|
-
|
|
822
|
+
/* The label column the rows are laid out with: measured from the labels (see below), the
|
|
823
|
+
default until it is. A form stacks its rows where its value column would be too narrow
|
|
824
|
+
beside it (`isCompactNarrow`), not at one form width whatever its labels are. */
|
|
825
|
+
var _9 = (0, react_2.useState)(compactRowStyles_1.COMPACT_LABEL_COL), compactLabelColumn = _9[0], setCompactLabelColumn = _9[1];
|
|
826
|
+
var compactNarrow = !!compactWrapWidth && (0, compactRowStyles_1.isCompactNarrow)(compactWrapWidth, compactLabelColumn);
|
|
661
827
|
/* How much pinned chrome sits above a status-box header.
|
|
662
828
|
|
|
663
829
|
Sticky offsets do not compose on their own: everything pinned in one
|
|
@@ -672,7 +838,7 @@ var FormEngineImpl = function (_a) {
|
|
|
672
838
|
a search row and a field picker that each hide themselves when they have
|
|
673
839
|
nothing to say, and what is left wraps differently at every form width.
|
|
674
840
|
Zero when this form draws no toolbar at all. */
|
|
675
|
-
var
|
|
841
|
+
var _10 = (0, react_2.useState)(0), compactToolbarHeight = _10[0], setCompactToolbarHeight = _10[1];
|
|
676
842
|
(0, react_2.useLayoutEffect)(function () {
|
|
677
843
|
var wrap = compactWrapNode;
|
|
678
844
|
if (!compact || !wrap || compactNested || !compactStickyBoxHeaders) {
|
|
@@ -750,15 +916,17 @@ var FormEngineImpl = function (_a) {
|
|
|
750
916
|
// take, which is what it is for; the asterisk and the `?` are chrome that has
|
|
751
917
|
// to fit beside it either way.
|
|
752
918
|
var text = Math.max(compactRowStyles_1.LABEL_COL_MIN, Math.min(compactRowStyles_1.LABEL_COL_MAX, Math.round(widest)));
|
|
753
|
-
|
|
919
|
+
var column = text + compactRowStyles_1.LABEL_AFFORDANCE_WIDTH;
|
|
920
|
+
wrap.style.setProperty(compactRowStyles_1.LABEL_COL_VAR, "".concat(column, "px"));
|
|
921
|
+
setCompactLabelColumn(column);
|
|
754
922
|
}, [compact, options, theme, compactWrapNode]);
|
|
755
923
|
// Editing rows pin min-height to the measured read row they replace, so the
|
|
756
924
|
// toggle never shifts neighbours (height varies with chrome — measure it).
|
|
757
925
|
var readRowHeights = (0, react_2.useRef)({});
|
|
758
926
|
// Required-groups linkage: hovering a group chip highlights every member row;
|
|
759
927
|
// clicking a sibling in the chip's popover scrolls to it and flashes it.
|
|
760
|
-
var
|
|
761
|
-
var
|
|
928
|
+
var _11 = (0, react_2.useState)([]), highlightedOptions = _11[0], setHighlightedOptions = _11[1];
|
|
929
|
+
var _12 = (0, react_2.useState)([]), flashedOptions = _12[0], setFlashedOptions = _12[1];
|
|
762
930
|
var flashTimeout = (0, react_2.useRef)();
|
|
763
931
|
var flashOptions = (0, react_2.useCallback)(function (optionNames, scrollToFirst) {
|
|
764
932
|
if (scrollToFirst === void 0) { scrollToFirst = false; }
|
|
@@ -810,16 +978,16 @@ var FormEngineImpl = function (_a) {
|
|
|
810
978
|
}
|
|
811
979
|
});
|
|
812
980
|
// Info panels auto-open on Tier-1 content; the per-row user override sticks.
|
|
813
|
-
var
|
|
981
|
+
var _13 = (0, react_2.useState)({}), infoPanelOverrides = _13[0], setInfoPanelOverrides = _13[1];
|
|
814
982
|
// Toolbar filters affect the listed rows only — the meter reflects the full set.
|
|
815
|
-
var
|
|
816
|
-
var
|
|
983
|
+
var _14 = (0, react_2.useState)(false), requiredOnly = _14[0], setRequiredOnly = _14[1];
|
|
984
|
+
var _15 = (0, react_2.useState)(''), compactQuery = _15[0], setCompactQuery = _15[1];
|
|
817
985
|
// Compact field sort (Fields menu → "Sort by"); 'schema' = declared order.
|
|
818
|
-
var
|
|
819
|
-
var
|
|
986
|
+
var _16 = (0, react_2.useState)('schema'), compactSort = _16[0], setCompactSort = _16[1];
|
|
987
|
+
var _17 = (0, react_2.useState)(function () { return ({
|
|
820
988
|
fields: (0, exports.fixOptions)(value, options || {}, undefined, isRendererOnly),
|
|
821
989
|
meta: undefined,
|
|
822
|
-
}); }), localValue =
|
|
990
|
+
}); }), localValue = _17[0], setLocalValue = _17[1];
|
|
823
991
|
var originalValue = (0, react_2.useRef)();
|
|
824
992
|
// Track the last value we emitted via onChange so we can skip re-applying fixOptions
|
|
825
993
|
// when the parent echoes it back as the new value prop (controlled component loop prevention)
|
|
@@ -857,16 +1025,50 @@ var FormEngineImpl = function (_a) {
|
|
|
857
1025
|
* reset the form to it: the field under the cursor went back a step and the keys typed since were lost
|
|
858
1026
|
* ("I have value" came out as "I he value" in a story under load).
|
|
859
1027
|
*/
|
|
860
|
-
var inFlight = (0, emittedValues_1.useEmittedValues)(
|
|
861
|
-
|
|
862
|
-
|
|
1028
|
+
var inFlight = (0, emittedValues_1.useEmittedValues)(sameReportedValue);
|
|
1029
|
+
/**
|
|
1030
|
+
* The `value` (and `valueKey`) as of the last commit: what a new `value` is a change from. The sync-down
|
|
1031
|
+
* merges the host's change against it, and the emit effect tells by it that the host changed the value in
|
|
1032
|
+
* the very commit it runs in. Updated by the last effect of each commit (below the sync-down).
|
|
1033
|
+
*/
|
|
1034
|
+
var seenValue = (0, react_2.useRef)(value);
|
|
1035
|
+
var seenValueKey = (0, react_2.useRef)(valueKey);
|
|
1036
|
+
/** Whether `value` is the host's own change, made since the last commit: neither seen before nor a report of
|
|
1037
|
+
* this form's coming back. */
|
|
1038
|
+
var isHostsOwnChange = function () {
|
|
1039
|
+
return valueKey !== seenValueKey.current ||
|
|
1040
|
+
(!sameReportedValue(value, seenValue.current) &&
|
|
1041
|
+
!inFlight.includes(value) &&
|
|
1042
|
+
!sameReportedValue(value, lastEmittedValue.current));
|
|
1043
|
+
};
|
|
863
1044
|
if (originalValue.current === undefined && (0, size_1.default)(value)) {
|
|
864
1045
|
originalValue.current = localValue.fields;
|
|
865
1046
|
}
|
|
866
1047
|
var unavailableOptionsCount = (0, react_2.useRef)(0);
|
|
867
|
-
var
|
|
868
|
-
var templates = (0, useTemplates_1.useTemplates)(allowTemplates,
|
|
1048
|
+
var _18 = (0, useQorusTypes_1.useQorusTypes)(), compactValue = _18.compactValue, typesLoading = _18.loading;
|
|
1049
|
+
var templates = (0, useTemplates_1.useTemplates)(allowTemplates, stringTemplates, interfaceContext);
|
|
869
1050
|
(0, react_2.useEffect)(function () {
|
|
1051
|
+
/* Nothing is emitted until the schema is in force (`schemaInForce`): read against the empty or earlier
|
|
1052
|
+
schema a host hands down while it loads its own, the value is no answer, and emitted it wiped a Qog
|
|
1053
|
+
state's stored options the moment the state was opened (qorus#646).
|
|
1054
|
+
|
|
1055
|
+
When it comes into force this check runs (it is a dependency). A host also shows the skeleton for other
|
|
1056
|
+
waits: qorus-ide shows it while the templates load, with the schema already there. The form completes the
|
|
1057
|
+
value meanwhile (a required field's default, e.g. the server's `created_by_user`), and nothing read it
|
|
1058
|
+
again when the skeleton cleared: the default was shown and never emitted, so never saved. A value that
|
|
1059
|
+
adds nothing still emits nothing. */
|
|
1060
|
+
if (!schemaInForce) {
|
|
1061
|
+
return;
|
|
1062
|
+
}
|
|
1063
|
+
/* The host changed the value in this same commit (effects run in order, and this one runs before the
|
|
1064
|
+
sync-down that takes the change in). The form's copy was made before that change: sent, it overwrote
|
|
1065
|
+
the host's change, the sync-down then took the host's value in, and the next commit sent that back -
|
|
1066
|
+
the form and the host traded places on every commit, forever (qorus#646: the Qorus IDE's OPC UA node
|
|
1067
|
+
editor, its namespace flipping between the old and the renamed one). The sync-down below merges the
|
|
1068
|
+
change with the form's own edits, and the next commit reports the result. */
|
|
1069
|
+
if (isHostsOwnChange()) {
|
|
1070
|
+
return;
|
|
1071
|
+
}
|
|
870
1072
|
if (!(0, exports.shouldEmitLocalValue)({
|
|
871
1073
|
localValue: localValue.fields,
|
|
872
1074
|
value: value,
|
|
@@ -881,15 +1083,15 @@ var FormEngineImpl = function (_a) {
|
|
|
881
1083
|
// Batched mode still emits every staged change (consumers may want to
|
|
882
1084
|
// live-validate), but flags it as a draft — persistence waits for Save.
|
|
883
1085
|
onChange === null || onChange === void 0 ? void 0 : onChange(name, toEmit, commitMode === 'batched' ? __assign(__assign({}, (meta || {})), { draft: true }) : meta);
|
|
884
|
-
}, [JSON.stringify(localValue)]);
|
|
1086
|
+
}, [JSON.stringify(localValue), schemaInForce]);
|
|
885
1087
|
(0, react_use_1.useUpdateEffect)(function () {
|
|
886
1088
|
// When a loader owns the schema, ignore controlled `options` syncs so a
|
|
887
1089
|
// late/undefined `options` prop can't clobber the loaded schema.
|
|
888
1090
|
if (optionsLoader) {
|
|
889
1091
|
return;
|
|
890
1092
|
}
|
|
891
|
-
setOptions(
|
|
892
|
-
}, [JSON.stringify(
|
|
1093
|
+
setOptions(optionsSchema);
|
|
1094
|
+
}, [JSON.stringify(optionsSchema)]);
|
|
893
1095
|
// Fetch the schema on mount and on loader identity change.
|
|
894
1096
|
(0, react_2.useEffect)(function () {
|
|
895
1097
|
if (!optionsLoader) {
|
|
@@ -1076,14 +1278,32 @@ var FormEngineImpl = function (_a) {
|
|
|
1076
1278
|
// change and re-fixes forever (e.g. byte-size / expression / ruled string fields).
|
|
1077
1279
|
// Note: compare fixedValue against value, not localValue.fields — localValue may have been
|
|
1078
1280
|
// updated by nested FormEngine emissions, so comparing against it would never skip.
|
|
1079
|
-
var normalizedValue = normalizeEmptyFieldValues(value);
|
|
1080
1281
|
/* What this rebuild lets us agree with the parent on — `undefined` when it
|
|
1081
1282
|
contributed something the parent has yet to learn. */
|
|
1082
1283
|
var agreed = (0, exports.agreementFromRebuild)(fixedValue, value);
|
|
1284
|
+
// a different record: nothing of the previous one is carried into it (see `valueKey`)
|
|
1285
|
+
var sameRecord = valueKey === seenValueKey.current;
|
|
1083
1286
|
// the echo of an emit still in flight - the last or an older one - is not the parent's change
|
|
1084
1287
|
var echo = inFlight.isEcho(value);
|
|
1085
|
-
if ((echo || (
|
|
1086
|
-
|
|
1288
|
+
if (sameRecord && (echo || sameReportedValue(value, lastEmittedValue.current))) {
|
|
1289
|
+
/* The form's own report coming back. Whatever the rebuild adds - a schema that changed in the same
|
|
1290
|
+
commit, a field the host does not store - is added to the form's copy, never by going back to the
|
|
1291
|
+
report: the report may be older than edits made since (an echo of "a" arriving after "ab" was
|
|
1292
|
+
reported lost the "b"). Nothing changes when the form's copy has it all already. */
|
|
1293
|
+
var rebuild_1 = function (fields) {
|
|
1294
|
+
return (0, exports.fixOptions)(fields, options || {}, undefined, isRendererOnly);
|
|
1295
|
+
};
|
|
1296
|
+
if (!(0, lodash_1.isEqual)(rebuild_1(localValue.fields), localValue.fields)) {
|
|
1297
|
+
// the parent has to learn what the rebuild added
|
|
1298
|
+
mirroredValue.current = undefined;
|
|
1299
|
+
}
|
|
1300
|
+
/* What the host changed beside a field's value is taken (its type, say): the report is recognised by its
|
|
1301
|
+
values (see `takeHostsAttributes`). */
|
|
1302
|
+
var base_1 = seenValue.current;
|
|
1303
|
+
setLocalValue(function (current) {
|
|
1304
|
+
var rebuilt = rebuild_1((0, exports.takeHostsAttributes)(value, current.fields, base_1));
|
|
1305
|
+
return (0, lodash_1.isEqual)(rebuilt, current.fields) ? current : { fields: rebuilt, meta: current.meta };
|
|
1306
|
+
});
|
|
1087
1307
|
return;
|
|
1088
1308
|
}
|
|
1089
1309
|
if (!originalValue.current && (0, size_1.default)(fixedValue)) {
|
|
@@ -1096,8 +1316,25 @@ var FormEngineImpl = function (_a) {
|
|
|
1096
1316
|
if (agreed !== undefined) {
|
|
1097
1317
|
lastEmittedValue.current = agreed;
|
|
1098
1318
|
}
|
|
1099
|
-
|
|
1100
|
-
|
|
1319
|
+
if (!sameRecord) {
|
|
1320
|
+
setLocalValue({ fields: fixedValue, meta: undefined });
|
|
1321
|
+
return;
|
|
1322
|
+
}
|
|
1323
|
+
// The host's change, with the form's own edits it did not touch kept (see `mergeOwnEdits`).
|
|
1324
|
+
var base = seenValue.current;
|
|
1325
|
+
setLocalValue(function (current) {
|
|
1326
|
+
var merged = (0, exports.mergeOwnEdits)(value, current.fields, base);
|
|
1327
|
+
return {
|
|
1328
|
+
fields: merged === value ? fixedValue : ((0, exports.fixOptions)(merged, options || {}, undefined, isRendererOnly)),
|
|
1329
|
+
meta: undefined,
|
|
1330
|
+
};
|
|
1331
|
+
});
|
|
1332
|
+
}, [JSON.stringify(options), JSON.stringify(value), isRendererOnly, valueKey]);
|
|
1333
|
+
// Last of the value effects: what the next commit's `value` is a change from.
|
|
1334
|
+
(0, react_2.useEffect)(function () {
|
|
1335
|
+
seenValue.current = value;
|
|
1336
|
+
seenValueKey.current = valueKey;
|
|
1337
|
+
});
|
|
1101
1338
|
var handleValueChange = (0, react_2.useCallback)(function (optionName, val, _type, isFunction) {
|
|
1102
1339
|
setLocalValue(function (_a) {
|
|
1103
1340
|
var _b, _c;
|
|
@@ -1294,8 +1531,11 @@ var FormEngineImpl = function (_a) {
|
|
|
1294
1531
|
var _a, _b;
|
|
1295
1532
|
var option = fixedValue[optionName];
|
|
1296
1533
|
if (!(options === null || options === void 0 ? void 0 : options[optionName])) {
|
|
1297
|
-
|
|
1298
|
-
|
|
1534
|
+
// not on this instance - unless the schema is not yet the one in force (see `schemaInForce`)
|
|
1535
|
+
if (schemaInForce) {
|
|
1536
|
+
unavailableOptionsCount.current += 1;
|
|
1537
|
+
removeSelectedOption(optionName);
|
|
1538
|
+
}
|
|
1299
1539
|
return newValue;
|
|
1300
1540
|
}
|
|
1301
1541
|
var rendererType = (0, exports.getType)((options[optionName].ui_type || options[optionName].type), operators, option === null || option === void 0 ? void 0 : option.op);
|
|
@@ -1315,6 +1555,7 @@ var FormEngineImpl = function (_a) {
|
|
|
1315
1555
|
unavailableOptionsCount.current,
|
|
1316
1556
|
JSON.stringify(operators),
|
|
1317
1557
|
showInvalidOptionsOnly,
|
|
1558
|
+
schemaInForce,
|
|
1318
1559
|
]);
|
|
1319
1560
|
// Per required-group: its member options, and which member (if any) already
|
|
1320
1561
|
// satisfies it — drives the "One of" chips and the "covered by" notes.
|
|
@@ -1445,12 +1686,15 @@ var FormEngineImpl = function (_a) {
|
|
|
1445
1686
|
}, [JSON.stringify(options), JSON.stringify(fixedValue), JSON.stringify(availableOptions)]);
|
|
1446
1687
|
var isOptionValid = (0, react_2.useCallback)(function (optionName, type, optionValue) {
|
|
1447
1688
|
var _a, _b, _c, _d;
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
// not
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1689
|
+
// the same "not set" the row's status reads: an empty list is no value
|
|
1690
|
+
var isEmpty = (0, readFirst_1.isOptionValueEmpty)(optionValue);
|
|
1691
|
+
// A field whose `depends_on` does not hold does not apply: it is hidden, and nothing in it can make the
|
|
1692
|
+
// form invalid - a value it holds is kept, and said in the form's note, valid or not (qorus#646).
|
|
1693
|
+
if (dependencyLockedNames.includes(optionName)) {
|
|
1694
|
+
return true;
|
|
1695
|
+
}
|
|
1696
|
+
// An empty field that is not required is not missing.
|
|
1697
|
+
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
1698
|
return true;
|
|
1455
1699
|
}
|
|
1456
1700
|
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 +1713,41 @@ var FormEngineImpl = function (_a) {
|
|
|
1469
1713
|
]);
|
|
1470
1714
|
var getValidityData = (0, react_2.useCallback)(function () {
|
|
1471
1715
|
var fields = (0, reduce_1.default)(availableOptions, function (result, option, optionName) {
|
|
1472
|
-
var _a, _b, _c;
|
|
1716
|
+
var _a, _b, _c, _d;
|
|
1473
1717
|
var type = (0, exports.getOptionFieldStorageType)(optionName, option.type, options, operators, option.op, isRendererOnly, optionHoldsExpression(option));
|
|
1474
1718
|
var optionValue = option.value;
|
|
1475
1719
|
var isRequired = (_a = options === null || options === void 0 ? void 0 : options[optionName]) === null || _a === void 0 ? void 0 : _a.required;
|
|
1476
1720
|
var hasRequiredGroups = !!((_b = options === null || options === void 0 ? void 0 : options[optionName]) === null || _b === void 0 ? void 0 : _b.required_groups);
|
|
1477
|
-
|
|
1721
|
+
// the same "not set" the row's status reads: an empty list is no value
|
|
1722
|
+
var isEmpty = (0, readFirst_1.isOptionValueEmpty)(optionValue);
|
|
1478
1723
|
var validation;
|
|
1479
|
-
/* A
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
if (isEmpty &&
|
|
1487
|
-
((!isRequired && !hasRequiredGroups) || dependencyLockedNames.includes(optionName))) {
|
|
1488
|
-
validation = { isValid: true, reasons: [] };
|
|
1724
|
+
/* A field whose host gives its own reason (`invalid_reason`) is invalid while it does, whatever the
|
|
1725
|
+
field makes of its value: the host knows something the field cannot - that a field it names
|
|
1726
|
+
is not in the record, that text around a field is not a whole number - and says it in the field,
|
|
1727
|
+
in place of the field's own message (`getOptionFieldMessages`). */
|
|
1728
|
+
var hostReason = (_c = options === null || options === void 0 ? void 0 : options[optionName]) === null || _c === void 0 ? void 0 : _c.invalid_reason;
|
|
1729
|
+
if (hostReason) {
|
|
1730
|
+
validation = { isValid: false, reason: hostReason, reasons: [hostReason] };
|
|
1489
1731
|
}
|
|
1490
1732
|
else {
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1733
|
+
/* A required field locked by an unmet `depends_on` does not apply
|
|
1734
|
+
while it is locked: it is not in "Needs attention", and an empty one
|
|
1735
|
+
does not make the form incomplete either. Otherwise a check whose
|
|
1736
|
+
kind is Equals could never be saved, because Minimum — required for
|
|
1737
|
+
Between alone — is empty; and a form whose only gaps are fields
|
|
1738
|
+
nobody can fill in would say Incomplete with nothing to act on. A
|
|
1739
|
+
locked field that still HOLDS a value is validated as before. */
|
|
1740
|
+
if (dependencyLockedNames.includes(optionName) ||
|
|
1741
|
+
(isEmpty && !isRequired && !hasRequiredGroups)) {
|
|
1742
|
+
/* A field whose `depends_on` does not hold is hidden and does not apply: nothing in it makes the
|
|
1743
|
+
form invalid, empty or holding a value (kept, and said in the form's note - qorus#646). */
|
|
1744
|
+
validation = { isValid: true, reasons: [] };
|
|
1745
|
+
}
|
|
1746
|
+
else {
|
|
1747
|
+
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]), {
|
|
1748
|
+
// The expression flag lives on the field value, not the schema.
|
|
1749
|
+
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) }));
|
|
1750
|
+
}
|
|
1494
1751
|
}
|
|
1495
1752
|
result.push({
|
|
1496
1753
|
fieldName: optionName,
|
|
@@ -1519,9 +1776,16 @@ var FormEngineImpl = function (_a) {
|
|
|
1519
1776
|
(0, react_2.useEffect)(function () {
|
|
1520
1777
|
onValidityChange === null || onValidityChange === void 0 ? void 0 : onValidityChange(optionsAreValid, validityData);
|
|
1521
1778
|
}, [JSON.stringify(validityData)]);
|
|
1779
|
+
/* A field whose `depends_on` does not hold is not shown (qorus#646, David): it is not of use until it applies,
|
|
1780
|
+
so it is left out of the form - not shown waiting, locked - and appears once its dependency holds (and
|
|
1781
|
+
flashes - see `dependencyLockedNames`). Its value is kept; one it holds meanwhile is said in the form's
|
|
1782
|
+
note (`hiddenFieldsWithValues`). */
|
|
1522
1783
|
var shownOptions = (0, react_2.useMemo)(function () {
|
|
1523
1784
|
return (0, reduce_1.default)(availableOptions, function (newValue, option, optionName) {
|
|
1524
1785
|
var _a;
|
|
1786
|
+
if (dependencyLockedNames.includes(optionName)) {
|
|
1787
|
+
return newValue;
|
|
1788
|
+
}
|
|
1525
1789
|
if (showInvalidOptionsOnly &&
|
|
1526
1790
|
isOptionValid(optionName, (0, exports.getOptionFieldStorageType)(optionName, option.type, options, operators, option.op, isRendererOnly, optionHoldsExpression(option)), option.value)) {
|
|
1527
1791
|
return newValue;
|
|
@@ -1529,6 +1793,7 @@ var FormEngineImpl = function (_a) {
|
|
|
1529
1793
|
return __assign(__assign({}, newValue), (_a = {}, _a[optionName] = option, _a));
|
|
1530
1794
|
}, {});
|
|
1531
1795
|
}, [
|
|
1796
|
+
dependencyLockedNames,
|
|
1532
1797
|
showInvalidOptionsOnly,
|
|
1533
1798
|
isRendererOnly,
|
|
1534
1799
|
JSON.stringify(availableOptions),
|
|
@@ -1542,7 +1807,7 @@ var FormEngineImpl = function (_a) {
|
|
|
1542
1807
|
var schemaMsgIntent = (0, react_2.useCallback)(function (name) {
|
|
1543
1808
|
var _a;
|
|
1544
1809
|
// Filtered, not raw: a message hidden by its own `when`/`unless` must not
|
|
1545
|
-
//
|
|
1810
|
+
// color the row or push the field into "Needs attention" — the whole point
|
|
1546
1811
|
// of a conditional warning is that it is absent while it does not apply.
|
|
1547
1812
|
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
1813
|
if (msgs.some(function (m) { return m.intent === 'danger'; }))
|
|
@@ -1612,9 +1877,10 @@ var FormEngineImpl = function (_a) {
|
|
|
1612
1877
|
}, [JSON.stringify(options), requiredGroupsInfo, getOptionStatus, dependencyLockedNames]);
|
|
1613
1878
|
// How many fields are in the "Needs attention" box — drives the header link.
|
|
1614
1879
|
var readFirstAttentionCount = (0, react_2.useMemo)(function () {
|
|
1615
|
-
return Object.keys(availableOptions || {}).filter(
|
|
1616
|
-
|
|
1617
|
-
|
|
1880
|
+
return Object.keys(availableOptions || {}).filter(
|
|
1881
|
+
// a hidden field (its `depends_on` does not hold) is not in the form, nor in its counts
|
|
1882
|
+
function (name) { return !dependencyLockedNames.includes(name) && getOptionBucket(name) === 'attention'; }).length;
|
|
1883
|
+
}, [JSON.stringify(availableOptions), getOptionBucket, dependencyLockedNames]);
|
|
1618
1884
|
var getIntent = (0, react_2.useCallback)(
|
|
1619
1885
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
1620
1886
|
function (optName, type, optValue, _op) {
|
|
@@ -1663,7 +1929,16 @@ var FormEngineImpl = function (_a) {
|
|
|
1663
1929
|
var handleOptionLabelClick = (0, react_2.useCallback)(function (optionName) {
|
|
1664
1930
|
setShowHelpForOption(optionName);
|
|
1665
1931
|
}, []);
|
|
1932
|
+
/** Whether the first-required scan below has opened its row, or is spent by the user's first move (see it). Only a
|
|
1933
|
+
* remount arms it again. */
|
|
1934
|
+
var hasAutoFocusedRef = (0, react_2.useRef)(false);
|
|
1935
|
+
/** The fields the first-required scan has looked at: it opens a field that needs an answer when the field first
|
|
1936
|
+
* appears in the form, not when one already there comes to need one. */
|
|
1937
|
+
var scannedFieldsRef = (0, react_2.useRef)(new Set());
|
|
1666
1938
|
var toggleExpandedOption = (0, react_2.useCallback)(function (optionName) {
|
|
1939
|
+
// A row the user opens or closes is where they have chosen to work: the first-required scan, if it is
|
|
1940
|
+
// still waiting for the focus to be free, does not run after it (qorus#646).
|
|
1941
|
+
hasAutoFocusedRef.current = true;
|
|
1667
1942
|
setExpandedOptions(function (prev) {
|
|
1668
1943
|
return prev.includes(optionName) ? prev.filter(function (name) { return name !== optionName; })
|
|
1669
1944
|
// single (default): opening a row collapses any other open one.
|
|
@@ -1702,6 +1977,41 @@ var FormEngineImpl = function (_a) {
|
|
|
1702
1977
|
setExpandedOptions(function (prev) { return __spreadArray(__spreadArray([], prev, true), toExpand.filter(function (name) { return !prev.includes(name); }), true); });
|
|
1703
1978
|
}, [initialExpandedOptions, compact, availableOptions]);
|
|
1704
1979
|
// --- First-attention-field autofocus (opt-in) -----------------------------
|
|
1980
|
+
/** The first row (of `names`, in order: every row by default) that needs an answer and can take one, if any: what
|
|
1981
|
+
* the first-required scan opens. */
|
|
1982
|
+
var firstAttentionRow = function (names) {
|
|
1983
|
+
if (names === void 0) { names = Object.keys(availableOptions); }
|
|
1984
|
+
return (0, readFirst_1.getFirstAttentionOptionName)(names, function (fieldName) {
|
|
1985
|
+
var schema = options === null || options === void 0 ? void 0 : options[fieldName];
|
|
1986
|
+
if (!schema) {
|
|
1987
|
+
return undefined;
|
|
1988
|
+
}
|
|
1989
|
+
return {
|
|
1990
|
+
focusable: !readOnly &&
|
|
1991
|
+
!schema.disabled &&
|
|
1992
|
+
!schema.readonly &&
|
|
1993
|
+
!dependencyLockedNames.includes(fieldName),
|
|
1994
|
+
// Single source of truth: the same bucket the read-first status boxes
|
|
1995
|
+
// show, so a filled-but-invalid required row is a target too.
|
|
1996
|
+
needsAttention: getOptionBucket(fieldName) === 'attention',
|
|
1997
|
+
};
|
|
1998
|
+
});
|
|
1999
|
+
};
|
|
2000
|
+
var openFirstAttentionRow = function (target) {
|
|
2001
|
+
if (target) {
|
|
2002
|
+
setExpandedOptions(function (prev) {
|
|
2003
|
+
return prev.includes(target) ? prev
|
|
2004
|
+
: expandMode === 'multi' ? __spreadArray(__spreadArray([], prev, true), [target], false)
|
|
2005
|
+
// `expandMode: 'single'` is a rule about what a CLICK does: opening a
|
|
2006
|
+
// row closes the one the reader last opened. It is not a licence to
|
|
2007
|
+
// close a row the HOST named through `initialExpandedOptions`. That
|
|
2008
|
+
// is an address — a statement about what the page is FOR, made before
|
|
2009
|
+
// the reader did anything — and this scan is a convenience layered on
|
|
2010
|
+
// top of it. Keep the named rows; replace only what a click could.
|
|
2011
|
+
: __spreadArray(__spreadArray([], prev.filter(function (name) { return initialExpandedOptions === null || initialExpandedOptions === void 0 ? void 0 : initialExpandedOptions.includes(name); }), true), [target], false);
|
|
2012
|
+
});
|
|
2013
|
+
}
|
|
2014
|
+
};
|
|
1705
2015
|
// With `autoFocusFirstRequired`, drop the user straight into the first field
|
|
1706
2016
|
// they must fix. We reuse the engine's own ordering (`availableOptions`), the
|
|
1707
2017
|
// very same `getOptionBucket` the status boxes use to decide "needs attention"
|
|
@@ -1711,13 +2021,17 @@ var FormEngineImpl = function (_a) {
|
|
|
1711
2021
|
// `expandedOptions` — the row's editor-focus effect does the rest. No DOM
|
|
1712
2022
|
// scraping, no synthetic clicks, no polling.
|
|
1713
2023
|
//
|
|
1714
|
-
//
|
|
1715
|
-
//
|
|
1716
|
-
//
|
|
1717
|
-
//
|
|
1718
|
-
// genuine remount (a fresh instance)
|
|
1719
|
-
//
|
|
1720
|
-
|
|
2024
|
+
// It opens one row for the life of this instance, keyed on a field's arrival: the first field that needs an
|
|
2025
|
+
// answer when it first appears in the form. A schema that arrives after the mount, or in pieces, is covered: the
|
|
2026
|
+
// fields of a later piece are looked at when they arrive, as long as the scan has opened nothing yet. A field
|
|
2027
|
+
// already in the form that comes to need an answer (a value edited, a server-driven update) is not a reason to
|
|
2028
|
+
// open it, nor to re-grab focus; only a genuine remount (a fresh instance) arms the scan again.
|
|
2029
|
+
//
|
|
2030
|
+
// It waits only for the user's first move. A form opened from a button mounts while that button holds the
|
|
2031
|
+
// focus, and the scan waits for it to be free - but the user does not wait: they open a row (which spends
|
|
2032
|
+
// the scan, `toggleExpandedOption`) or come into the form from the keyboard (which runs it, below). Waiting
|
|
2033
|
+
// past that, the scan ran the first time the focus rested on nothing, which is the Done that closes the
|
|
2034
|
+
// user's row, and opened the next row that needed an answer by itself in the middle of their work.
|
|
1721
2035
|
(0, react_2.useEffect)(function () {
|
|
1722
2036
|
// Two decisions, one scan. Both open the row that needs attention;
|
|
1723
2037
|
// `autoFocusFirstRequired` additionally promises the caret lands in it, and
|
|
@@ -1726,14 +2040,25 @@ var FormEngineImpl = function (_a) {
|
|
|
1726
2040
|
// CompactRow's tap-to-edit rule, and it declines just as firmly to take one
|
|
1727
2041
|
// that is already somewhere outside the row.
|
|
1728
2042
|
var wantsFocus = !!autoFocusFirstRequired;
|
|
1729
|
-
|
|
2043
|
+
// the schema the form holds is the one in force: not one a skeleton stands for, nor one the host has replaced
|
|
2044
|
+
if ((!wantsFocus && !expandFirstRequired) || !compact || !options || !schemaInForce) {
|
|
1730
2045
|
return;
|
|
1731
2046
|
}
|
|
1732
2047
|
if (hasAutoFocusedRef.current) {
|
|
1733
2048
|
return;
|
|
1734
2049
|
}
|
|
1735
2050
|
var orderedNames = Object.keys(availableOptions);
|
|
1736
|
-
|
|
2051
|
+
// the fields that have appeared since the scan last looked: only they can be what it opens
|
|
2052
|
+
var arrived = orderedNames.filter(function (name) { return !scannedFieldsRef.current.has(name); });
|
|
2053
|
+
if (!arrived.length) {
|
|
2054
|
+
return;
|
|
2055
|
+
}
|
|
2056
|
+
/* Read on the form the schema makes: a required field the schema brings is added to the form's value by the
|
|
2057
|
+
sync-down, an effect, so the render after the schema arrives. Read before that, the form had no row for it:
|
|
2058
|
+
the scan found nothing to open and was spent, and the field's row stayed closed (qorus#646: the Qorus IDE's
|
|
2059
|
+
pipeline processor, whose required field mappings arrive with its schema). */
|
|
2060
|
+
var formTheSchemaMakes = (0, exports.fixOptions)(fixedValue, options, undefined, isRendererOnly);
|
|
2061
|
+
if (Object.keys(formTheSchemaMakes || {}).some(function (name) { return !(name in fixedValue); })) {
|
|
1737
2062
|
return;
|
|
1738
2063
|
}
|
|
1739
2064
|
// Never grab focus from a control the user is already in — including a field
|
|
@@ -1752,55 +2077,107 @@ var FormEngineImpl = function (_a) {
|
|
|
1752
2077
|
if (wantsFocus && active && active !== document.body) {
|
|
1753
2078
|
return;
|
|
1754
2079
|
}
|
|
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
|
-
});
|
|
2080
|
+
// Looked at: a field here now is not looked at again, whatever it comes to hold.
|
|
2081
|
+
orderedNames.forEach(function (name) { return scannedFieldsRef.current.add(name); });
|
|
2082
|
+
var target = firstAttentionRow(arrived);
|
|
2083
|
+
if (!target) {
|
|
2084
|
+
// nothing that arrived needs an answer: the scan waits for the fields still to come
|
|
2085
|
+
return;
|
|
1786
2086
|
}
|
|
2087
|
+
hasAutoFocusedRef.current = true;
|
|
2088
|
+
openFirstAttentionRow(target);
|
|
1787
2089
|
}, [
|
|
1788
2090
|
autoFocusFirstRequired,
|
|
1789
2091
|
expandFirstRequired,
|
|
1790
2092
|
compact,
|
|
1791
2093
|
options,
|
|
2094
|
+
schemaInForce,
|
|
1792
2095
|
availableOptions,
|
|
2096
|
+
isRendererOnly,
|
|
1793
2097
|
readOnly,
|
|
1794
2098
|
dependencyLockedNames,
|
|
1795
2099
|
getOptionBucket,
|
|
1796
2100
|
expandMode,
|
|
1797
2101
|
initialExpandedOptions,
|
|
1798
2102
|
]);
|
|
2103
|
+
/* The two first moves a user makes in a form opened from a button, while the scan above waits for the
|
|
2104
|
+
focus to be free:
|
|
2105
|
+
- pointing into the form (a click on a row, a field, the toolbar) is choosing where to work, and spends
|
|
2106
|
+
the scan, as opening a row does (`toggleExpandedOption`);
|
|
2107
|
+
- coming into it from the keyboard (Tab from the button) chooses nothing, and runs the scan now: the user
|
|
2108
|
+
is put in the first row that needs an answer, once. Coming straight into a control they can type in
|
|
2109
|
+
(a field already open, the search box) is theirs, and spends the scan without moving them.
|
|
2110
|
+
Only while the scan still waits; it never runs twice. */
|
|
2111
|
+
var keyboardEntry = (0, react_2.useRef)();
|
|
2112
|
+
keyboardEntry.current = function (event) {
|
|
2113
|
+
if (hasAutoFocusedRef.current || !options || !Object.keys(availableOptions).length) {
|
|
2114
|
+
return;
|
|
2115
|
+
}
|
|
2116
|
+
var from = event.relatedTarget;
|
|
2117
|
+
if (from && (compactWrapNode === null || compactWrapNode === void 0 ? void 0 : compactWrapNode.contains(from))) {
|
|
2118
|
+
return;
|
|
2119
|
+
}
|
|
2120
|
+
hasAutoFocusedRef.current = true;
|
|
2121
|
+
var entered = event.target;
|
|
2122
|
+
if ((0, rowFocus_1.isTypingControl)(entered)) {
|
|
2123
|
+
return;
|
|
2124
|
+
}
|
|
2125
|
+
var target = firstAttentionRow();
|
|
2126
|
+
if (!target) {
|
|
2127
|
+
return;
|
|
2128
|
+
}
|
|
2129
|
+
// A row takes the caret only from nothing - never from an element the reader is on (see CompactRow) - so
|
|
2130
|
+
// the element the Tab landed on lets it go: the scan is what the reader came in for.
|
|
2131
|
+
entered.blur();
|
|
2132
|
+
openFirstAttentionRow(target);
|
|
2133
|
+
};
|
|
2134
|
+
(0, react_2.useEffect)(function () {
|
|
2135
|
+
if (!autoFocusFirstRequired || !compact || !compactWrapNode) {
|
|
2136
|
+
return undefined;
|
|
2137
|
+
}
|
|
2138
|
+
var onPointerDown = function () {
|
|
2139
|
+
hasAutoFocusedRef.current = true;
|
|
2140
|
+
};
|
|
2141
|
+
var onFocusIn = function (event) { var _a; return (_a = keyboardEntry.current) === null || _a === void 0 ? void 0 : _a.call(keyboardEntry, event); };
|
|
2142
|
+
// capture: the pointer is the user's choice before anything in the form answers it
|
|
2143
|
+
compactWrapNode.addEventListener('pointerdown', onPointerDown, true);
|
|
2144
|
+
compactWrapNode.addEventListener('focusin', onFocusIn);
|
|
2145
|
+
return function () {
|
|
2146
|
+
compactWrapNode.removeEventListener('pointerdown', onPointerDown, true);
|
|
2147
|
+
compactWrapNode.removeEventListener('focusin', onFocusIn);
|
|
2148
|
+
};
|
|
2149
|
+
}, [autoFocusFirstRequired, compact, compactWrapNode]);
|
|
1799
2150
|
// Read-first completion summary (how many shown options have a value set),
|
|
1800
2151
|
// surfaced as a progress meter at the top of the compact form.
|
|
1801
2152
|
var readFirstCompletion = (0, react_2.useMemo)(function () {
|
|
1802
|
-
return (0, readFirst_1.getReadFirstCompletion)(
|
|
1803
|
-
|
|
2153
|
+
return (0, readFirst_1.getReadFirstCompletion)(
|
|
2154
|
+
// a hidden field (its `depends_on` does not hold) is not in the form, nor in its meter
|
|
2155
|
+
(0, lodash_1.omit)(availableOptions, dependencyLockedNames), function (name) { return getOptionBucket(name) === 'attention'; });
|
|
2156
|
+
}, [JSON.stringify(availableOptions), getOptionBucket, dependencyLockedNames]);
|
|
2157
|
+
/* The hidden fields (their `depends_on` does not hold) that hold a value: kept, not dropped silently, so the form
|
|
2158
|
+
says so in a note - and whether the value is valid, as no field shows it (qorus#646, David). */
|
|
2159
|
+
var hiddenFieldsWithValues = (0, react_2.useMemo)(function () {
|
|
2160
|
+
return dependencyLockedNames
|
|
2161
|
+
.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); })
|
|
2162
|
+
.map(function (name) {
|
|
2163
|
+
var field = availableOptions[name];
|
|
2164
|
+
var schema = options === null || options === void 0 ? void 0 : options[name];
|
|
2165
|
+
var type = (0, exports.getOptionFieldStorageType)(name, field.type, options, operators, field.op, isRendererOnly, optionHoldsExpression(field));
|
|
2166
|
+
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) }));
|
|
2167
|
+
return {
|
|
2168
|
+
name: name,
|
|
2169
|
+
label: (schema === null || schema === void 0 ? void 0 : schema.display_name) || name,
|
|
2170
|
+
conditions: (0, OptionFieldMessages_1.describeDependencies)(((schema === null || schema === void 0 ? void 0 : schema.depends_on) || []), options || {}),
|
|
2171
|
+
invalidReason: validation.isValid ? undefined : validation.reason,
|
|
2172
|
+
};
|
|
2173
|
+
});
|
|
2174
|
+
}, [
|
|
2175
|
+
dependencyLockedNames,
|
|
2176
|
+
JSON.stringify(availableOptions),
|
|
2177
|
+
JSON.stringify(options),
|
|
2178
|
+
JSON.stringify(operators),
|
|
2179
|
+
isRendererOnly,
|
|
2180
|
+
]);
|
|
1804
2181
|
var optionalFields = (0, react_2.useMemo)(function () {
|
|
1805
2182
|
return Object.keys(filteredOptions).map(function (option) {
|
|
1806
2183
|
var _a, _b, _c, _d, _f, _g;
|
|
@@ -1999,6 +2376,9 @@ var FormEngineImpl = function (_a) {
|
|
|
1999
2376
|
// reqraft: form-level expression fields get the Visual/Text shell
|
|
2000
2377
|
// (DPQL text mode); opt out per-form via `templateFieldProps`.
|
|
2001
2378
|
allowTextExpressions: true,
|
|
2379
|
+
// a form's options enter their value on tabs: Value · Expression · Visual, or Value · Template
|
|
2380
|
+
// where only templates are taken (qorus#646); opt out per-form via `templateFieldProps`
|
|
2381
|
+
valueTabs: true,
|
|
2002
2382
|
// A fixed allowed-value field still needs its selector even when
|
|
2003
2383
|
// arbitrary custom values are forbidden. TemplateField uses this
|
|
2004
2384
|
// flag to decide whether to mount AutoFormField at all; treating
|
|
@@ -2064,7 +2444,7 @@ var FormEngineImpl = function (_a) {
|
|
|
2064
2444
|
fixedValue,
|
|
2065
2445
|
// Depend on the specific `rest` values used, not the whole `rest` object
|
|
2066
2446
|
// (which is a fresh `{...rest}` every render and would defeat the memo).
|
|
2067
|
-
|
|
2447
|
+
optionsSchema,
|
|
2068
2448
|
rest === null || rest === void 0 ? void 0 : rest.size,
|
|
2069
2449
|
handleValueChange,
|
|
2070
2450
|
handleOperatorChange,
|
|
@@ -2076,11 +2456,11 @@ var FormEngineImpl = function (_a) {
|
|
|
2076
2456
|
inheritedFromParent,
|
|
2077
2457
|
]);
|
|
2078
2458
|
// Compact (read-first) rendering.
|
|
2079
|
-
// Theme-derived
|
|
2459
|
+
// Theme-derived colors so the flat-row layout adapts to light/dark/custom themes.
|
|
2080
2460
|
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-
|
|
2461
|
+
// Text emphasis tiers via reqore's readable-color helper (key = full readable
|
|
2082
2462
|
// text, muted = its dimmed variant, faint = the dimmed variant softened
|
|
2083
|
-
// further) instead of hand-rolled hex-alpha suffixes on the raw text
|
|
2463
|
+
// further) instead of hand-rolled hex-alpha suffixes on the raw text color.
|
|
2084
2464
|
var cKey = (0, colors_1.getReadableColor)(theme);
|
|
2085
2465
|
var cMuted = (0, colors_1.getReadableColor)(theme, undefined, undefined, true);
|
|
2086
2466
|
var cFaint = "".concat(cMuted, "99");
|
|
@@ -2090,6 +2470,15 @@ var FormEngineImpl = function (_a) {
|
|
|
2090
2470
|
var cWarning = ((_d = theme === null || theme === void 0 ? void 0 : theme.intents) === null || _d === void 0 ? void 0 : _d.warning) || '#ffdf34';
|
|
2091
2471
|
var cInfo = ((_f = theme === null || theme === void 0 ? void 0 : theme.intents) === null || _f === void 0 ? void 0 : _f.info) || '#3b8eea';
|
|
2092
2472
|
var cSuccess = ((_g = theme === null || theme === void 0 ? void 0 : theme.intents) === null || _g === void 0 ? void 0 : _g.success) || '#36b37e';
|
|
2473
|
+
// the rows' own words and marks, in colors that read on every surface a row is drawn on
|
|
2474
|
+
var rowInks = (0, react_2.useMemo)(function () { return (0, readFirstColors_1.getReadFirstInks)(theme); }, [theme]);
|
|
2475
|
+
// an option panel's short description, faint: as faint as it still reads in the theme
|
|
2476
|
+
var optionDescOpacity = (0, react_2.useMemo)(function () { return (0, readableColors_1.getReadableTextOpacity)(theme, 0.3); }, [theme]);
|
|
2477
|
+
/* an invalid option's mark in its panel's title: the danger, in the shade of it that stands out as reqore draws a
|
|
2478
|
+
title icon, at 70% (danger:lighten:5 was 2.9:1) */
|
|
2479
|
+
var invalidOptionIconColor = (0, react_2.useMemo)(function () {
|
|
2480
|
+
return (0, readableColors_1.getReadableShade)(cDanger, (0, readableColors_1.getThemeSurfaces)(theme), readableColors_1.READABLE_ICON, PANEL_TITLE_ICON_ALPHA);
|
|
2481
|
+
}, [theme, cDanger]);
|
|
2093
2482
|
var cBg = (theme === null || theme === void 0 ? void 0 : theme.main) || '#181818';
|
|
2094
2483
|
var cRowBg = (0, colors_1.changeDarkness)((0, colors_1.getMainBackgroundColor)(theme), 0.01);
|
|
2095
2484
|
var cGroupLine = "".concat(cText, "1f");
|
|
@@ -2099,8 +2488,39 @@ var FormEngineImpl = function (_a) {
|
|
|
2099
2488
|
// The closure surface the extracted CompactRow reads through context. Refs and
|
|
2100
2489
|
// setters are stable; the state/memo/handler fields change identity as they do
|
|
2101
2490
|
// today, so a row re-renders exactly when its inputs do.
|
|
2491
|
+
/* An open field is held in the box it was opened in, so finishing an edit does not remount it elsewhere
|
|
2492
|
+
and take the focus (see `stableBucketOf`). Held, it says where it now belongs - otherwise a value
|
|
2493
|
+
already right sat under "Needs attention" until ✓ was pressed, with nothing saying why (David's review
|
|
2494
|
+
of qorus#646). Keyed by option name: the box it moves to when closed.
|
|
2495
|
+
|
|
2496
|
+
It is said once per form, on the first field held this way, and on no field once that one is closed:
|
|
2497
|
+
the user knows it from then on, and saying it on every field takes room (qlip build 20261008-083118;
|
|
2498
|
+
David's decision). `movesToNoteFor` is that field - undefined until one is held, null once it is
|
|
2499
|
+
closed. */
|
|
2500
|
+
var heldEntries = expandedOptions
|
|
2501
|
+
.map(function (name) { return [name, settledBucket.current[name], getOptionBucket(name)]; })
|
|
2502
|
+
.filter(function (_a) {
|
|
2503
|
+
var held = _a[1], now = _a[2];
|
|
2504
|
+
return !!held && held !== now;
|
|
2505
|
+
})
|
|
2506
|
+
.map(function (_a) {
|
|
2507
|
+
var name = _a[0], now = _a[2];
|
|
2508
|
+
return [name, now];
|
|
2509
|
+
});
|
|
2510
|
+
if (movesToNoteFor.current === undefined && heldEntries.length) {
|
|
2511
|
+
movesToNoteFor.current = heldEntries[0][0];
|
|
2512
|
+
}
|
|
2513
|
+
else if (movesToNoteFor.current && !expandedOptions.includes(movesToNoteFor.current)) {
|
|
2514
|
+
movesToNoteFor.current = null;
|
|
2515
|
+
}
|
|
2516
|
+
var heldOptionsKey = JSON.stringify(Object.fromEntries(heldEntries.filter(function (_a) {
|
|
2517
|
+
var name = _a[0];
|
|
2518
|
+
return name === movesToNoteFor.current;
|
|
2519
|
+
})));
|
|
2520
|
+
var heldOptions = (0, react_2.useMemo)(function () { return JSON.parse(heldOptionsKey); }, [heldOptionsKey]);
|
|
2102
2521
|
var compactRowContextValue = (0, react_2.useMemo)(function () { return ({
|
|
2103
2522
|
templates: templates.value,
|
|
2523
|
+
heldOptions: heldOptions,
|
|
2104
2524
|
readOnly: readOnly,
|
|
2105
2525
|
onReadOnlyActivate: onReadOnlyActivate,
|
|
2106
2526
|
commitMode: commitMode,
|
|
@@ -2110,6 +2530,8 @@ var FormEngineImpl = function (_a) {
|
|
|
2110
2530
|
focusedEditing: focusedEditing,
|
|
2111
2531
|
showFieldTypes: showFieldTypes,
|
|
2112
2532
|
codePreviewRenderer: codePreviewRenderer,
|
|
2533
|
+
readSummaries: readSummaries,
|
|
2534
|
+
cardEditorTypes: cardEditorTypes,
|
|
2113
2535
|
showAllDescriptions: showAllDescriptions,
|
|
2114
2536
|
expandedOptions: expandedOptions,
|
|
2115
2537
|
highlightedOptions: highlightedOptions,
|
|
@@ -2147,8 +2569,10 @@ var FormEngineImpl = function (_a) {
|
|
|
2147
2569
|
cWarning: cWarning,
|
|
2148
2570
|
cInfo: cInfo,
|
|
2149
2571
|
cBg: cBg,
|
|
2572
|
+
rowInks: rowInks,
|
|
2150
2573
|
}); }, [
|
|
2151
2574
|
templates.value,
|
|
2575
|
+
heldOptions,
|
|
2152
2576
|
readOnly,
|
|
2153
2577
|
commitMode,
|
|
2154
2578
|
expandMode,
|
|
@@ -2157,6 +2581,8 @@ var FormEngineImpl = function (_a) {
|
|
|
2157
2581
|
focusedEditing,
|
|
2158
2582
|
showFieldTypes,
|
|
2159
2583
|
codePreviewRenderer,
|
|
2584
|
+
readSummaries,
|
|
2585
|
+
cardEditorTypes,
|
|
2160
2586
|
showAllDescriptions,
|
|
2161
2587
|
expandedOptions,
|
|
2162
2588
|
highlightedOptions,
|
|
@@ -2194,6 +2620,7 @@ var FormEngineImpl = function (_a) {
|
|
|
2194
2620
|
cWarning,
|
|
2195
2621
|
cInfo,
|
|
2196
2622
|
cBg,
|
|
2623
|
+
rowInks,
|
|
2197
2624
|
]);
|
|
2198
2625
|
// `compactToolbar` resolved to a full object, so neither the context type nor
|
|
2199
2626
|
// the toolbar itself has to re-default anything. `null` means no toolbar.
|
|
@@ -2571,7 +2998,7 @@ var FormEngineImpl = function (_a) {
|
|
|
2571
2998
|
// "Covers"/"Covered by" chips already say which member satisfies it.
|
|
2572
2999
|
if (requiredGroupsInfo.satisfiedBy[grp])
|
|
2573
3000
|
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":
|
|
3001
|
+
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
3002
|
});
|
|
2576
3003
|
};
|
|
2577
3004
|
// One schema group inside a status box: its thin sub-label, the group's
|
|
@@ -2655,7 +3082,7 @@ var FormEngineImpl = function (_a) {
|
|
|
2655
3082
|
visible` to `auto` unless the other axis is visible or
|
|
2656
3083
|
clip, which would put the scrollport straight back. `clip`
|
|
2657
3084
|
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')) ?
|
|
3085
|
+
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
3086
|
(0, jsx_runtime_1.jsx)(reqore_1.ReqoreMessage, { flat: true, opaque: false, size: 'small', children: readOnly && !query ?
|
|
2660
3087
|
'Nothing is set.'
|
|
2661
3088
|
: 'No fields match the current filters.' })
|
|
@@ -2772,7 +3199,7 @@ var FormEngineImpl = function (_a) {
|
|
|
2772
3199
|
})
|
|
2773
3200
|
: null] }) }, box.key));
|
|
2774
3201
|
})] })), 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 ?
|
|
3202
|
+
(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
3203
|
'Apply the staged changes'
|
|
2777
3204
|
: '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
3205
|
: null] }) })] }) }) }));
|
|
@@ -2780,7 +3207,10 @@ var FormEngineImpl = function (_a) {
|
|
|
2780
3207
|
/* Which of the seven waits is holding the form, in the order they are
|
|
2781
3208
|
tested. Rendered as `data-wait` on the placeholder so a page can be asked
|
|
2782
3209
|
what it is waiting FOR instead of only that it is waiting. */
|
|
2783
|
-
var waitReason = rest.skeleton ?
|
|
3210
|
+
var waitReason = rest.skeleton ?
|
|
3211
|
+
skeletonReason ?
|
|
3212
|
+
"host:".concat(skeletonReason)
|
|
3213
|
+
: 'host'
|
|
2784
3214
|
: templates.loading ? 'templates'
|
|
2785
3215
|
: typesLoading ? 'types'
|
|
2786
3216
|
: optionsLoading ? 'options'
|
|
@@ -2816,7 +3246,7 @@ var FormEngineImpl = function (_a) {
|
|
|
2816
3246
|
: "".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
3247
|
: null, unavailableOptionsCount.current ?
|
|
2818
3248
|
(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 ?
|
|
3249
|
+
: null, (0, jsx_runtime_1.jsx)(HiddenFieldsNote_1.HiddenFieldsNote, { fields: hiddenFieldsWithValues }), children, (0, size_1.default)(filteredOptions) >= 1 && !readOnly ?
|
|
2820
3250
|
(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
3251
|
: null] })); }, sortButtonProps: { minimal: true }, showLayoutSwitch: false, style: { width: '100%' }, items: (0, map_1.default)(shownOptions, function (_a, optionName) {
|
|
2822
3252
|
var _b, _c, _d, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v;
|
|
@@ -2847,7 +3277,7 @@ var FormEngineImpl = function (_a) {
|
|
|
2847
3277
|
: options[optionName].short_desc || '',
|
|
2848
3278
|
descriptionEffect: {
|
|
2849
3279
|
textSize: '11px',
|
|
2850
|
-
opacity:
|
|
3280
|
+
opacity: optionDescOpacity,
|
|
2851
3281
|
underline: ((_l = options[optionName]) === null || _l === void 0 ? void 0 : _l.desc) ? 'underline dotted #878787' : undefined,
|
|
2852
3282
|
},
|
|
2853
3283
|
customTheme: {
|
|
@@ -2857,7 +3287,7 @@ var FormEngineImpl = function (_a) {
|
|
|
2857
3287
|
icon: !isOptionValid(optionName, type, other.value) ? 'SpamFill'
|
|
2858
3288
|
: undefined,
|
|
2859
3289
|
iconColor: !isOptionValid(optionName, type, other.value) ?
|
|
2860
|
-
|
|
3290
|
+
invalidOptionIconColor
|
|
2861
3291
|
: undefined,
|
|
2862
3292
|
transparent: false,
|
|
2863
3293
|
intent: getIntent(optionName, type, other.value, other.op),
|
|
@@ -2898,8 +3328,8 @@ var FormEngineImpl = function (_a) {
|
|
|
2898
3328
|
icon: 'HistoryLine',
|
|
2899
3329
|
className: 'options-item-revert',
|
|
2900
3330
|
onClick: function () {
|
|
2901
|
-
var _a
|
|
2902
|
-
handleValueChange(
|
|
3331
|
+
var _a;
|
|
3332
|
+
handleValueChange.apply(void 0, __spreadArray([optionName], (0, argumentPresence_1.restoredFieldChange)((_a = originalValue.current) === null || _a === void 0 ? void 0 : _a[optionName]), false));
|
|
2903
3333
|
},
|
|
2904
3334
|
},
|
|
2905
3335
|
!readOnly &&
|