@qoretechnologies/reqraft 0.10.62 → 0.10.63-pr.142.g0b675cd
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 +21 -1
- package/dist/components/Description/describedControl.d.ts +48 -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 +10 -1
- package/dist/components/dpqlEditor/dpqlHelpers.d.ts.map +1 -1
- package/dist/components/dpqlEditor/dpqlHelpers.js +30 -13
- 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 +11 -6
- package/dist/components/dpqlEditor/dpqlTags.js.map +1 -1
- package/dist/components/dpqlEditor/types.d.ts +47 -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 +151 -83
- 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 +34 -1
- package/dist/components/form/engine/FormEngine.d.ts.map +1 -1
- package/dist/components/form/engine/FormEngine.js +487 -87
- 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 +19 -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 +0 -1
- package/dist/components/form/engine/compactRowStyles.d.ts.map +1 -1
- package/dist/components/form/engine/compactRowStyles.js +12 -20
- 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 +41 -3
- package/dist/components/form/expressions/ExpressionField.d.ts.map +1 -1
- package/dist/components/form/expressions/ExpressionField.js +396 -99
- package/dist/components/form/expressions/ExpressionField.js.map +1 -1
- package/dist/components/form/expressions/builder/argumentDetail.d.ts.map +1 -1
- package/dist/components/form/expressions/builder/argumentDetail.js +4 -1
- package/dist/components/form/expressions/builder/argumentDetail.js.map +1 -1
- package/dist/components/form/expressions/builder/argumentLabel.d.ts.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 +4 -2
- 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 +121 -77
- 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/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/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 +35 -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 +37 -0
- package/dist/components/form/expressions/textOfExpression.js.map +1 -0
- 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 +7 -7
- package/dist/components/form/expressions/useRenderExpression.js.map +1 -1
- package/dist/components/form/fields/Field.d.ts.map +1 -1
- package/dist/components/form/fields/Field.js +20 -7
- 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 +611 -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 +190 -81
- 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 +5 -5
- package/dist/components/form/fields/template/ReadOnlyTemplateTag.d.ts.map +1 -1
- package/dist/components/form/fields/template/ReadOnlyTemplateTag.js +11 -4
- 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 +83 -1
- package/dist/components/form/fields/template/TemplateField.d.ts.map +1 -1
- package/dist/components/form/fields/template/TemplateField.js +535 -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 +8 -4
- package/dist/components/form/fields/template/TemplateText.js.map +1 -1
- package/dist/components/form/fields/template/writtenAsText.d.ts +55 -0
- package/dist/components/form/fields/template/writtenAsText.d.ts.map +1 -0
- package/dist/components/form/fields/template/writtenAsText.js +188 -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 +15 -7
- 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 +1 -1
- 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 +51 -136
- 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 +66 -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/types.d.ts +12 -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 +22 -7
- package/dist/components/smartEditor/useLspHover.d.ts.map +1 -1
- package/dist/components/smartEditor/useLspHover.js +86 -17
- 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 +36 -11
- 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/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/templates.d.ts +26 -1
- package/dist/helpers/templates.d.ts.map +1 -1
- package/dist/helpers/templates.js +41 -6
- 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/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
package/src/helpers/common.ts
DELETED
|
@@ -1,326 +0,0 @@
|
|
|
1
|
-
import { IReqoreRichTextEditorProps } from '@qoretechnologies/reqore/dist/components/RichTextEditor';
|
|
2
|
-
import { TQorusFormFieldSchema, TQorusFormOperatorValue } from '@qoretechnologies/ts-toolkit';
|
|
3
|
-
import yaml from 'js-yaml';
|
|
4
|
-
|
|
5
|
-
// ─── Typed ↔ YAML helpers ──────────────────────────────────────────────────────
|
|
6
|
-
|
|
7
|
-
type TTypedValue = { type: string; value: unknown };
|
|
8
|
-
type MaybeTyped = TTypedValue | undefined;
|
|
9
|
-
|
|
10
|
-
const inferTypedValue = (raw: unknown): MaybeTyped => {
|
|
11
|
-
if (raw === null || raw === undefined) return undefined;
|
|
12
|
-
if (typeof raw === 'boolean') return { type: 'bool', value: raw };
|
|
13
|
-
if (typeof raw === 'number')
|
|
14
|
-
return Number.isInteger(raw) ? { type: 'int', value: raw } : { type: 'float', value: raw };
|
|
15
|
-
if (typeof raw === 'string') return { type: 'string', value: raw };
|
|
16
|
-
if (Array.isArray(raw)) {
|
|
17
|
-
const items = raw.map(inferTypedValue).filter(Boolean);
|
|
18
|
-
return { type: 'list', value: items };
|
|
19
|
-
}
|
|
20
|
-
if (typeof raw === 'object') {
|
|
21
|
-
const value = Object.fromEntries(
|
|
22
|
-
Object.entries(raw as Record<string, unknown>).map(([k, v]) => [k, inferTypedValue(v)])
|
|
23
|
-
);
|
|
24
|
-
return { type: 'hash', value };
|
|
25
|
-
}
|
|
26
|
-
return { type: 'any', value: raw };
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
const typedToPlain = (typed: MaybeTyped): unknown => {
|
|
30
|
-
if (typed === undefined || typed === null) return undefined;
|
|
31
|
-
// A raw primitive (string/number/bool) is already plain — e.g. a `list` whose
|
|
32
|
-
// items are bare values rather than `{ type, value }` wrappers. Destructuring it
|
|
33
|
-
// would lose the value (it became `null` items in the YAML editor).
|
|
34
|
-
if (typeof typed !== 'object') return typed;
|
|
35
|
-
const { type, value } = typed as { type?: string; value?: unknown };
|
|
36
|
-
if (type === 'list') {
|
|
37
|
-
// Guard the `.map`: a malformed/non-array list value (e.g. a string from a
|
|
38
|
-
// YAML round-trip) must not crash the editor — render it as-is instead.
|
|
39
|
-
return Array.isArray(value) ? value.map(typedToPlain) : value;
|
|
40
|
-
}
|
|
41
|
-
if (type === 'hash') {
|
|
42
|
-
return value && typeof value === 'object' && !Array.isArray(value) ?
|
|
43
|
-
Object.fromEntries(
|
|
44
|
-
Object.entries(value as Record<string, MaybeTyped>).map(([k, v]) => [k, typedToPlain(v)])
|
|
45
|
-
)
|
|
46
|
-
: value;
|
|
47
|
-
}
|
|
48
|
-
// An object with no recognised `type` wrapper is already plain data.
|
|
49
|
-
if (type === undefined) return typed;
|
|
50
|
-
return value;
|
|
51
|
-
};
|
|
52
|
-
|
|
53
|
-
export const yamlToTyped = (yamlString: string): MaybeTyped => {
|
|
54
|
-
try {
|
|
55
|
-
const raw = yaml.load(yamlString) as unknown;
|
|
56
|
-
return inferTypedValue(raw);
|
|
57
|
-
} catch {
|
|
58
|
-
return { type: 'string', value: yamlString };
|
|
59
|
-
}
|
|
60
|
-
};
|
|
61
|
-
|
|
62
|
-
export const typedToYaml = (typed: MaybeTyped): string => {
|
|
63
|
-
if (typeof typed === 'undefined') return '';
|
|
64
|
-
const plain = typedToPlain(typed);
|
|
65
|
-
try {
|
|
66
|
-
return yaml.dump(plain, { skipInvalid: true });
|
|
67
|
-
} catch {
|
|
68
|
-
return '';
|
|
69
|
-
}
|
|
70
|
-
};
|
|
71
|
-
|
|
72
|
-
export const getDefaultValue = (schema?: TQorusFormFieldSchema): unknown | undefined => {
|
|
73
|
-
// No schema, no default. A form can hold a value key its schema does not
|
|
74
|
-
// (yet) describe — a host that recomputes schema and value in separate
|
|
75
|
-
// memos renders once in between — and the compact row asks for the default
|
|
76
|
-
// of every empty row. `'default_value' in undefined` is a TypeError that
|
|
77
|
-
// takes the whole form to the error boundary; the answer is simply "none".
|
|
78
|
-
if (!schema) {
|
|
79
|
-
return undefined;
|
|
80
|
-
}
|
|
81
|
-
if ('default_value' in schema) {
|
|
82
|
-
const value: unknown = schema.default_value;
|
|
83
|
-
// The server sends a default either bare, of any type — a list or a hash
|
|
84
|
-
// included — or in a `{ type, value }` envelope; only the envelope is
|
|
85
|
-
// unwrapped.
|
|
86
|
-
if (value != null && typeof value === 'object' && !Array.isArray(value) && 'type' in value) {
|
|
87
|
-
return (value as { value?: unknown }).value;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
return value;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
return undefined;
|
|
94
|
-
};
|
|
95
|
-
|
|
96
|
-
/**
|
|
97
|
-
* Whether a rich-text document contains a template tag (a `$local:...`-style reference drawn as a chip).
|
|
98
|
-
*
|
|
99
|
-
* Such a value is resolved when the interface runs, so it can never be one of a field's fixed choices and must
|
|
100
|
-
* not be judged against them.
|
|
101
|
-
*/
|
|
102
|
-
export const richtextHasTag = (richtext: unknown): boolean => {
|
|
103
|
-
const walk = (node: any): boolean =>
|
|
104
|
-
!!node &&
|
|
105
|
-
typeof node === 'object' &&
|
|
106
|
-
(node.type === 'tag' || (Array.isArray(node.children) && node.children.some(walk)));
|
|
107
|
-
return Array.isArray(richtext) && richtext.some(walk);
|
|
108
|
-
};
|
|
109
|
-
|
|
110
|
-
export const richtextToString = (richtext: IReqoreRichTextEditorProps['value']): string => {
|
|
111
|
-
// A `richtext` ui_type option can still hold a plain scalar value (set
|
|
112
|
-
// programmatically or loaded from the server before the editor ever touched
|
|
113
|
-
// it) — only a real Slate document is an array of nodes.
|
|
114
|
-
if (!Array.isArray(richtext)) {
|
|
115
|
-
return richtext === undefined || richtext === null ? '' : String(richtext);
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
const processElement = (element: any | { text: string }): string => {
|
|
119
|
-
if (element === null || element === undefined) {
|
|
120
|
-
return '';
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
if (typeof element !== 'object') {
|
|
124
|
-
return String(element);
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
if ('text' in element) {
|
|
128
|
-
return element.text;
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
if (element.type === 'tag') {
|
|
132
|
-
return element.value?.toString() || '';
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
return Array.isArray(element.children) ? element.children.map(processElement).join('') : '';
|
|
136
|
-
};
|
|
137
|
-
|
|
138
|
-
return richtext.map(processElement).join('');
|
|
139
|
-
};
|
|
140
|
-
|
|
141
|
-
/** One piece of a richtext document, flattened to a single line: a run of
|
|
142
|
-
* plain prose (`text`) or an embedded template tag (`tag`). Used by the
|
|
143
|
-
* read-first row to render tags as `$`-chips instead of raw `$prefix:name`. */
|
|
144
|
-
export interface IRichtextSegment {
|
|
145
|
-
kind: 'text' | 'tag';
|
|
146
|
-
/** Prose for `text`; the tag's display label (or its value) for `tag`. */
|
|
147
|
-
text: string;
|
|
148
|
-
/** The raw template value for `tag` (e.g. `$local:some-richtext`). */
|
|
149
|
-
value?: string;
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
/** Like {@link richtextToString}, but keeps embedded template tags as discrete
|
|
153
|
-
* segments (adjacent prose is coalesced) so a caller can render the tags as
|
|
154
|
-
* chips. A non-document scalar collapses to a single text segment. */
|
|
155
|
-
export const richtextToSegments = (
|
|
156
|
-
richtext: IReqoreRichTextEditorProps['value']
|
|
157
|
-
): IRichtextSegment[] => {
|
|
158
|
-
if (!Array.isArray(richtext)) {
|
|
159
|
-
const text = richtext === undefined || richtext === null ? '' : String(richtext);
|
|
160
|
-
return text ? [{ kind: 'text', text }] : [];
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
const segments: IRichtextSegment[] = [];
|
|
164
|
-
const pushText = (text: string): void => {
|
|
165
|
-
if (!text) return;
|
|
166
|
-
const last = segments[segments.length - 1];
|
|
167
|
-
if (last?.kind === 'text') last.text += text;
|
|
168
|
-
else segments.push({ kind: 'text', text });
|
|
169
|
-
};
|
|
170
|
-
|
|
171
|
-
const walk = (element: any): void => {
|
|
172
|
-
if (element === null || element === undefined) return;
|
|
173
|
-
if (typeof element !== 'object') {
|
|
174
|
-
pushText(String(element));
|
|
175
|
-
return;
|
|
176
|
-
}
|
|
177
|
-
if ('text' in element) {
|
|
178
|
-
pushText(element.text);
|
|
179
|
-
return;
|
|
180
|
-
}
|
|
181
|
-
if (element.type === 'tag') {
|
|
182
|
-
const value = element.value?.toString() || '';
|
|
183
|
-
segments.push({ kind: 'tag', value, text: (element.label ?? value)?.toString() || value });
|
|
184
|
-
return;
|
|
185
|
-
}
|
|
186
|
-
if (Array.isArray(element.children)) element.children.forEach(walk);
|
|
187
|
-
};
|
|
188
|
-
|
|
189
|
-
richtext.forEach(walk);
|
|
190
|
-
return segments;
|
|
191
|
-
};
|
|
192
|
-
|
|
193
|
-
/**
|
|
194
|
-
* An operator value as the list it logically is.
|
|
195
|
-
*
|
|
196
|
-
* An option's `op` holds either one operator or a chain of them, and both
|
|
197
|
-
* spellings are legitimate on the wire. Every reader wants the list.
|
|
198
|
-
*/
|
|
199
|
-
export const fixOperatorValue = (
|
|
200
|
-
operator: TQorusFormOperatorValue
|
|
201
|
-
): (string | null | undefined)[] => (Array.isArray(operator) ? operator : [operator]);
|
|
202
|
-
|
|
203
|
-
export const insertAtIndex = (array: any[] = [], index = 0, value: any): any[] => {
|
|
204
|
-
return [...array.slice(0, index), value, ...array.slice(index)];
|
|
205
|
-
};
|
|
206
|
-
|
|
207
|
-
/** Splits a byte-size string (e.g. `"10MiB"`) into `[amount, unit]`. */
|
|
208
|
-
export const splitByteSize = (value?: string): [number | undefined, string | undefined] => {
|
|
209
|
-
const amount = String(value ?? '').match(/\d+/g);
|
|
210
|
-
const unit = String(value ?? '').match(/[a-zA-Z]+/g);
|
|
211
|
-
return [amount?.[0] ? Number(amount[0]) : undefined, unit?.[0]];
|
|
212
|
-
};
|
|
213
|
-
|
|
214
|
-
export type TTimeoutUnit = 'ms' | 'seconds' | 'minutes' | 'hours';
|
|
215
|
-
|
|
216
|
-
/** Timeout display units, smallest → largest, with the ms multiplier each one
|
|
217
|
-
* scales by and the symbol shown where space is tight (phone-width selector).
|
|
218
|
-
* The stored value is always the integer millisecond count. */
|
|
219
|
-
export const TIMEOUT_UNITS: { value: TTimeoutUnit; ms: number; short: string }[] = [
|
|
220
|
-
{ value: 'ms', ms: 1, short: 'ms' },
|
|
221
|
-
{ value: 'seconds', ms: 1000, short: 's' },
|
|
222
|
-
{ value: 'minutes', ms: 60000, short: 'm' },
|
|
223
|
-
{ value: 'hours', ms: 3600000, short: 'h' },
|
|
224
|
-
];
|
|
225
|
-
|
|
226
|
-
export const timeoutUnitToMs = (unit: TTimeoutUnit): number =>
|
|
227
|
-
TIMEOUT_UNITS.find(({ value }) => value === unit)!.ms;
|
|
228
|
-
|
|
229
|
-
export const timeoutUnitSymbol = (unit: TTimeoutUnit): string =>
|
|
230
|
-
TIMEOUT_UNITS.find(({ value }) => value === unit)!.short;
|
|
231
|
-
|
|
232
|
-
/** The largest unit that represents `value` without rounding (45000 →
|
|
233
|
-
* seconds, 90500 → ms). Zero divides evenly by everything, so it stays ms. */
|
|
234
|
-
export const getLargestExactTimeoutUnit = (value?: number): TTimeoutUnit => {
|
|
235
|
-
for (let i = TIMEOUT_UNITS.length - 1; i >= 0; i--) {
|
|
236
|
-
if (value != null && value !== 0 && value % TIMEOUT_UNITS[i].ms === 0) {
|
|
237
|
-
return TIMEOUT_UNITS[i].value;
|
|
238
|
-
}
|
|
239
|
-
}
|
|
240
|
-
return 'ms';
|
|
241
|
-
};
|
|
242
|
-
|
|
243
|
-
/** Human-readable timeout (e.g. `"45 seconds"`) — scaled to the largest unit
|
|
244
|
-
* that represents the millisecond count exactly (90500 → `"90500 ms"`). */
|
|
245
|
-
export const formatTimeoutValue = (ms: number): string => {
|
|
246
|
-
const unit = getLargestExactTimeoutUnit(ms);
|
|
247
|
-
return `${ms / timeoutUnitToMs(unit)} ${unit}`;
|
|
248
|
-
};
|
|
249
|
-
|
|
250
|
-
/** Human-readable file size, e.g. `"12.3 KB"` — whole bytes below 1 KiB, one
|
|
251
|
-
* decimal above. Shared by the ticket thread / references attachment rows. */
|
|
252
|
-
export const formatBytes = (bytes: number): string => {
|
|
253
|
-
if (bytes < 1024) {
|
|
254
|
-
return `${bytes} B`;
|
|
255
|
-
}
|
|
256
|
-
const units = ['KB', 'MB', 'GB'];
|
|
257
|
-
let value = bytes / 1024;
|
|
258
|
-
let unit = 0;
|
|
259
|
-
while (value >= 1024 && unit < units.length - 1) {
|
|
260
|
-
value /= 1024;
|
|
261
|
-
unit += 1;
|
|
262
|
-
}
|
|
263
|
-
return `${value.toFixed(1)} ${units[unit]}`;
|
|
264
|
-
};
|
|
265
|
-
|
|
266
|
-
/** True when a MIME content type is an image (`image/*`). */
|
|
267
|
-
export const isImage = (contentType: string): boolean => contentType.startsWith('image/');
|
|
268
|
-
|
|
269
|
-
// URL value splitting (IDE `urlField.tsx` behavior). Lives here rather than
|
|
270
|
-
// in the Url component so `validations.ts` can use it without pulling the
|
|
271
|
-
// component chain into non-DOM consumers (jest).
|
|
272
|
-
export const getProtocol = (v?: string): string => {
|
|
273
|
-
const valueList = v?.split('://');
|
|
274
|
-
|
|
275
|
-
if (!valueList || valueList.length <= 1) {
|
|
276
|
-
return '';
|
|
277
|
-
}
|
|
278
|
-
|
|
279
|
-
return valueList[0];
|
|
280
|
-
};
|
|
281
|
-
|
|
282
|
-
export const getAddress = (v?: string): string => {
|
|
283
|
-
const valueList = v?.split('://');
|
|
284
|
-
|
|
285
|
-
if (!valueList || valueList.length === 0) {
|
|
286
|
-
return '';
|
|
287
|
-
}
|
|
288
|
-
|
|
289
|
-
if (valueList.length === 1) {
|
|
290
|
-
return valueList[0];
|
|
291
|
-
}
|
|
292
|
-
|
|
293
|
-
// We need to join back the rest of the address in case there were :// in it
|
|
294
|
-
return valueList.slice(1).join('://');
|
|
295
|
-
};
|
|
296
|
-
|
|
297
|
-
// ─── List helpers ─────────────────────────────────────────────────────────────
|
|
298
|
-
|
|
299
|
-
/** Immutably moves a list element from `from` to `to`. */
|
|
300
|
-
export const moveItem = <T>(list: T[], from: number, to: number): T[] => {
|
|
301
|
-
if (from === to || from < 0 || to < 0 || from >= list.length) return list;
|
|
302
|
-
const next = [...list];
|
|
303
|
-
const [item] = next.splice(from, 1);
|
|
304
|
-
next.splice(Math.min(to, next.length), 0, item);
|
|
305
|
-
return next;
|
|
306
|
-
};
|
|
307
|
-
|
|
308
|
-
/** `1` → `1st`, `2` → `2nd`, `11` → `11th`. */
|
|
309
|
-
export const ordinal = (n: number): string => {
|
|
310
|
-
const mod100 = n % 100;
|
|
311
|
-
|
|
312
|
-
if (mod100 >= 11 && mod100 <= 13) {
|
|
313
|
-
return `${n}th`;
|
|
314
|
-
}
|
|
315
|
-
|
|
316
|
-
switch (n % 10) {
|
|
317
|
-
case 1:
|
|
318
|
-
return `${n}st`;
|
|
319
|
-
case 2:
|
|
320
|
-
return `${n}nd`;
|
|
321
|
-
case 3:
|
|
322
|
-
return `${n}rd`;
|
|
323
|
-
default:
|
|
324
|
-
return `${n}th`;
|
|
325
|
-
}
|
|
326
|
-
};
|
|
@@ -1,209 +0,0 @@
|
|
|
1
|
-
// Copyright 2026 Qore Technologies, s.r.o.
|
|
2
|
-
/**
|
|
3
|
-
* Noticing that text typed into a PLAIN (non-expression) field is really a
|
|
4
|
-
* DPQL expression, and deciding what to do about it.
|
|
5
|
-
*
|
|
6
|
-
* The rule this implements, in one sentence: **switch the field into
|
|
7
|
-
* expression mode only when the text cannot be a valid literal for the
|
|
8
|
-
* field's type but IS a real expression; otherwise offer, never silently
|
|
9
|
-
* reinterpret.** Quietly turning the string `a + b` into a concatenation on a
|
|
10
|
-
* `string` field would destroy a legitimate literal, so a type that accepts
|
|
11
|
-
* any text never auto-switches — it only ever offers.
|
|
12
|
-
*
|
|
13
|
-
* ## Why the server has the last word
|
|
14
|
-
*
|
|
15
|
-
* "Does this parse as DPQL?" is NOT a usable test, which is the trap here.
|
|
16
|
-
* Verified against the live LSP: `dpql/parse` reports `success: true` for
|
|
17
|
-
* `hello`, for `42`, for `2026-09-06` and for `@a` — it wraps each of them in
|
|
18
|
-
* a trivial `{exp: 'value', args: [...]}` node. Everything is a valid DPQL
|
|
19
|
-
* program, because a bare literal is one. So a text that parses tells us
|
|
20
|
-
* nothing; what tells us something is the SHAPE of the AST that comes back:
|
|
21
|
-
*
|
|
22
|
-
* | typed text | `exp` | verdict |
|
|
23
|
-
* |-------------------|------------|------------|
|
|
24
|
-
* | `hello`, `42` | `value` | a literal |
|
|
25
|
-
* | `$local:count` | `template` | a template |
|
|
26
|
-
* | `@a > 5` | `>` | expression |
|
|
27
|
-
* | `"a" + "b"` | `+` | expression |
|
|
28
|
-
* | `toInt("5")` | `toInt` | expression |
|
|
29
|
-
*
|
|
30
|
-
* `isRealExpressionAst` is that test, and it is the only authority. The
|
|
31
|
-
* lexical pass below decides nothing — its sole job is to keep a server
|
|
32
|
-
* round-trip off every keystroke of every field.
|
|
33
|
-
*/
|
|
34
|
-
import { validateField } from './validations';
|
|
35
|
-
|
|
36
|
-
/** What to do about text that turned out to be an expression. */
|
|
37
|
-
export type TDpqlDetectionOutcome =
|
|
38
|
-
/** Not an expression, or not one we may act on — leave the field alone. */
|
|
39
|
-
| 'none'
|
|
40
|
-
/** A real expression, but the text is also a valid literal here: ask. */
|
|
41
|
-
| 'offer'
|
|
42
|
-
/** A real expression, and the text cannot be a literal here: switch. */
|
|
43
|
-
| 'switch';
|
|
44
|
-
|
|
45
|
-
/**
|
|
46
|
-
* The `exp` values that mean "this is not an expression": a bare literal and
|
|
47
|
-
* a bare template reference. A template is already the template field's job
|
|
48
|
-
* (`isValueTemplate`), and a literal is what the plain field is for.
|
|
49
|
-
*/
|
|
50
|
-
const NON_EXPRESSION_OPS = new Set(['value', 'template']);
|
|
51
|
-
|
|
52
|
-
/**
|
|
53
|
-
* Operators and calls whose presence makes a server probe worth the trip.
|
|
54
|
-
* Deliberately generous — a false positive costs one debounced request that
|
|
55
|
-
* comes back `exp: 'value'`, while a false negative silently loses the whole
|
|
56
|
-
* feature.
|
|
57
|
-
*
|
|
58
|
-
* ## Why the spacing rules differ per operator
|
|
59
|
-
*
|
|
60
|
-
* `-` and `/` are ambiguous: they appear inside values nobody means as
|
|
61
|
-
* arithmetic — dates (`2026-09-06`), negative numbers (`-5`), paths (`a/b`),
|
|
62
|
-
* hyphenated names (`well-known-name`). A space next to one is what separates
|
|
63
|
-
* `@a - 1` from those, so they keep a spacing requirement.
|
|
64
|
-
*
|
|
65
|
-
* `+` is NOT ambiguous in that way, and requiring spaces around it lost the
|
|
66
|
-
* feature for the most natural way to type arithmetic: `2 + 1` was offered as
|
|
67
|
-
* an expression while `2+1` and `2+ 1` were not, which reads as the detection
|
|
68
|
-
* working only sometimes. Reported from the live IDE. `+` now counts wherever
|
|
69
|
-
* it appears; if the text turns out to be an ordinary literal the server says
|
|
70
|
-
* so and the offer never appears.
|
|
71
|
-
*
|
|
72
|
-
* The `-`/`/` rule is also relaxed from "spaces on BOTH sides" to "a space on
|
|
73
|
-
* either side", so `@a -1` and `@a- 1` are probed too while every ambiguous
|
|
74
|
-
* value above still is not.
|
|
75
|
-
*/
|
|
76
|
-
const DPQL_OPERATOR_PATTERN = new RegExp(
|
|
77
|
-
[
|
|
78
|
-
'(==|!=|<>|>=|<=)', // two-character comparisons
|
|
79
|
-
'[<>*%]', // unambiguous single-character operators
|
|
80
|
-
'(?<!=)=(?!=)', // a lone `=`, not part of `==`
|
|
81
|
-
'\\+', // `+` — unambiguous, so spacing is irrelevant
|
|
82
|
-
'(\\s[-/]|[-/]\\s)', // `-` and `/` need a space on at least one side
|
|
83
|
-
'\\b(and|or|not|like|in|contains)\\b', // word operators
|
|
84
|
-
].join('|'),
|
|
85
|
-
'i'
|
|
86
|
-
);
|
|
87
|
-
|
|
88
|
-
/** A function call — `toInt("5")`, `upper(@name)`. */
|
|
89
|
-
const DPQL_CALL_PATTERN = /\b[a-z_]\w*\s*\(/i;
|
|
90
|
-
|
|
91
|
-
/**
|
|
92
|
-
* The longest text worth probing. An expression a person types into a form
|
|
93
|
-
* field is short; anything longer is a document, and probing it on every
|
|
94
|
-
* keystroke would be a waste of a round-trip.
|
|
95
|
-
*/
|
|
96
|
-
const MAX_PROBE_LENGTH = 512;
|
|
97
|
-
|
|
98
|
-
/**
|
|
99
|
-
* Cheap, purely lexical "might this be worth asking the server about?".
|
|
100
|
-
* Never decides anything on its own — see the module comment.
|
|
101
|
-
*/
|
|
102
|
-
export const mightBeDpqlExpression = (text: unknown): boolean => {
|
|
103
|
-
if (typeof text !== 'string') {
|
|
104
|
-
return false;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
const trimmed = text.trim();
|
|
108
|
-
|
|
109
|
-
if (!trimmed || trimmed.length > MAX_PROBE_LENGTH) {
|
|
110
|
-
return false;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
return DPQL_OPERATOR_PATTERN.test(trimmed) || DPQL_CALL_PATTERN.test(trimmed);
|
|
114
|
-
};
|
|
115
|
-
|
|
116
|
-
/**
|
|
117
|
-
* The authority: does this `dpql/parse` result describe a REAL expression
|
|
118
|
-
* rather than a literal or a bare template reference? Accepts either the
|
|
119
|
-
* field-ready envelope (`{is_expression, value: {exp, args}}`) the server
|
|
120
|
-
* returns or a bare `{exp, args}` node.
|
|
121
|
-
*/
|
|
122
|
-
export const isRealExpressionAst = (expression: unknown): boolean => {
|
|
123
|
-
if (!expression || typeof expression !== 'object') {
|
|
124
|
-
return false;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
const envelope = expression as { value?: unknown; exp?: unknown };
|
|
128
|
-
const node = (
|
|
129
|
-
envelope.exp === undefined && envelope.value && typeof envelope.value === 'object'
|
|
130
|
-
? envelope.value
|
|
131
|
-
: envelope
|
|
132
|
-
) as { exp?: unknown };
|
|
133
|
-
|
|
134
|
-
return typeof node.exp === 'string' && !!node.exp && !NON_EXPRESSION_OPS.has(node.exp);
|
|
135
|
-
};
|
|
136
|
-
|
|
137
|
-
/**
|
|
138
|
-
* `true` when any diagnostic is an outright error. The server reports
|
|
139
|
-
* severity as the string `'error'` on this route and LSP proper uses `1`;
|
|
140
|
-
* both are accepted rather than assuming one.
|
|
141
|
-
*/
|
|
142
|
-
export const hasErrorDiagnostic = (
|
|
143
|
-
diagnostics?: Array<{ severity?: number | string } | undefined | null>
|
|
144
|
-
): boolean =>
|
|
145
|
-
!!diagnostics?.some((diagnostic) => {
|
|
146
|
-
const severity = diagnostic?.severity;
|
|
147
|
-
return severity === 1 || severity === 'error';
|
|
148
|
-
});
|
|
149
|
-
|
|
150
|
-
/**
|
|
151
|
-
* Could this text stand as a literal value of the field's own type? A type
|
|
152
|
-
* that accepts any text (`string`, and every type the form validator passes
|
|
153
|
-
* by default) always can, which is exactly why such a field never
|
|
154
|
-
* auto-switches. Delegates to the form's own validator so the answer is the
|
|
155
|
-
* same one the field itself would give.
|
|
156
|
-
*/
|
|
157
|
-
export const canBeLiteralOfType = (
|
|
158
|
-
text: string,
|
|
159
|
-
type?: string,
|
|
160
|
-
field?: Record<string, any>
|
|
161
|
-
): boolean => {
|
|
162
|
-
if (!type) {
|
|
163
|
-
return true;
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
try {
|
|
167
|
-
return validateField(type, text, field as any);
|
|
168
|
-
} catch {
|
|
169
|
-
// A validator that throws must not be read as "this cannot be a
|
|
170
|
-
// literal" — that would auto-switch the field on the strength of a bug.
|
|
171
|
-
return true;
|
|
172
|
-
}
|
|
173
|
-
};
|
|
174
|
-
|
|
175
|
-
export interface IClassifyTypedTextArgs {
|
|
176
|
-
/** The text the author typed into the plain field. */
|
|
177
|
-
text: string;
|
|
178
|
-
/** The field's declared type (`ui_type ?? type`). */
|
|
179
|
-
type?: string;
|
|
180
|
-
/** The field schema, for validators that consult `validation_regex` etc. */
|
|
181
|
-
field?: Record<string, any>;
|
|
182
|
-
/** The `dpql/parse` result for `text`, or `undefined` if it has not run. */
|
|
183
|
-
parsed?: {
|
|
184
|
-
success?: boolean;
|
|
185
|
-
expression?: unknown;
|
|
186
|
-
diagnostics?: Array<{ severity?: number | string }>;
|
|
187
|
-
};
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
/**
|
|
191
|
-
* The whole decision, in one pure function so it can be tested without a
|
|
192
|
-
* server, a socket or a rendered field.
|
|
193
|
-
*/
|
|
194
|
-
export const classifyTypedText = ({
|
|
195
|
-
text,
|
|
196
|
-
type,
|
|
197
|
-
field,
|
|
198
|
-
parsed,
|
|
199
|
-
}: IClassifyTypedTextArgs): TDpqlDetectionOutcome => {
|
|
200
|
-
if (!parsed?.success || !parsed.expression) {
|
|
201
|
-
return 'none';
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
if (!isRealExpressionAst(parsed.expression) || hasErrorDiagnostic(parsed.diagnostics)) {
|
|
205
|
-
return 'none';
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
return canBeLiteralOfType(text, type, field) ? 'offer' : 'switch';
|
|
209
|
-
};
|
|
@@ -1,140 +0,0 @@
|
|
|
1
|
-
// Copyright 2026 Qore Technologies, s.r.o.
|
|
2
|
-
// Expression / type-compatibility helpers — ported verbatim from qorus-ide
|
|
3
|
-
// (`src/helpers/expressions.ts` + `areQorusTypesCompatible` from
|
|
4
|
-
// `src/helpers/functions.tsx`), import paths adapted to reqraft. Used by the
|
|
5
|
-
// ported ExpressionBuilder.
|
|
6
|
-
import { isArray } from 'lodash';
|
|
7
|
-
import {
|
|
8
|
-
IExpression,
|
|
9
|
-
IExpressionSchema,
|
|
10
|
-
IExpressionSchemaArg,
|
|
11
|
-
} from '../components/form/expressions/types';
|
|
12
|
-
import { defaultQorusTypes, getQorusTypes, IQorusTypeObject } from '../hooks/useQorusTypes';
|
|
13
|
-
|
|
14
|
-
export const getArgumentType = (
|
|
15
|
-
expressions: IExpressionSchema[],
|
|
16
|
-
arg?: IExpression,
|
|
17
|
-
schema?: IExpressionSchemaArg
|
|
18
|
-
) => {
|
|
19
|
-
if (arg?.is_expression) {
|
|
20
|
-
return expressions?.find(
|
|
21
|
-
(exp) => exp.name === (arg.value as { exp?: string })?.exp
|
|
22
|
-
)?.ui_return_type;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
return arg?.type || schema?.ui_type;
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
export const argumentMatchesType = (
|
|
29
|
-
expressions: IExpressionSchema[],
|
|
30
|
-
arg: IExpression | undefined,
|
|
31
|
-
schema: IExpressionSchemaArg
|
|
32
|
-
) => {
|
|
33
|
-
const types = getQorusTypes();
|
|
34
|
-
const acceptedTypes = types.find((type) => type.name === schema.ui_type);
|
|
35
|
-
const argType = getArgumentType(expressions, arg, schema);
|
|
36
|
-
|
|
37
|
-
if (!acceptedTypes) {
|
|
38
|
-
return true;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
return (
|
|
42
|
-
argType === 'any' ||
|
|
43
|
-
!!acceptedTypes.exact_match?.includes(argType as string) ||
|
|
44
|
-
acceptedTypes.types_accepted.includes('any') ||
|
|
45
|
-
acceptedTypes.types_accepted.includes(getArgumentType(expressions, arg, schema) as string)
|
|
46
|
-
);
|
|
47
|
-
};
|
|
48
|
-
|
|
49
|
-
/**
|
|
50
|
-
* `auto` is the codebase's other spelling of `any` — `Field.tsx` maps both to
|
|
51
|
-
* one renderer, and FormEngine tests `type === 'any' || type === 'auto'` in
|
|
52
|
-
* several places — but the TYPES LIST only carries `any`.
|
|
53
|
-
*
|
|
54
|
-
* That mattered here because an unknown main type falls into the "not found"
|
|
55
|
-
* branch below and answers FALSE for every check. So an `auto`-typed field was
|
|
56
|
-
* judged incompatible with everything: `filterTemplatesByType()` removed every
|
|
57
|
-
* template from it, and the picker offered a group header with nothing under
|
|
58
|
-
* it. The field was not "a field with no templates" — it was a field whose
|
|
59
|
-
* templates had all been filtered away by a name mismatch.
|
|
60
|
-
*/
|
|
61
|
-
const normalizeAnyLikeTypeName = (name: string): string => (name === 'auto' ? 'any' : name);
|
|
62
|
-
|
|
63
|
-
export const areQorusTypesCompatible = (
|
|
64
|
-
mainType: string | string[],
|
|
65
|
-
checkType: string | string[],
|
|
66
|
-
fallbackTypes?: IQorusTypeObject[]
|
|
67
|
-
): boolean => {
|
|
68
|
-
const types = getQorusTypes() || fallbackTypes || defaultQorusTypes;
|
|
69
|
-
const mainTypes = (isArray(mainType) ? mainType : [mainType]).map(normalizeAnyLikeTypeName);
|
|
70
|
-
const checkTypes = (isArray(checkType) ? checkType : [checkType]).map(normalizeAnyLikeTypeName);
|
|
71
|
-
// Get each of the main types from the types list
|
|
72
|
-
for (const main of mainTypes) {
|
|
73
|
-
// Get the type object from the types
|
|
74
|
-
const mainTypeObject = types.find((type) => type.name === main);
|
|
75
|
-
// If the main object does not exist
|
|
76
|
-
if (!mainTypeObject) {
|
|
77
|
-
return false;
|
|
78
|
-
}
|
|
79
|
-
// If the main type includes "any" it's automatically compatible
|
|
80
|
-
if (mainTypeObject.exact_match?.includes('any')) {
|
|
81
|
-
return true;
|
|
82
|
-
}
|
|
83
|
-
// Check if any of the check types are in the main types accepted types
|
|
84
|
-
for (const check of checkTypes) {
|
|
85
|
-
if (mainTypeObject.exact_match?.includes(check)) {
|
|
86
|
-
return true;
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
// If the main type includes "any" it's automatically compatible
|
|
90
|
-
if (mainTypeObject.types_accepted.includes('any')) {
|
|
91
|
-
return true;
|
|
92
|
-
}
|
|
93
|
-
// Check if any of the check types are in the main types accepted types
|
|
94
|
-
for (const check of checkTypes) {
|
|
95
|
-
if (mainTypeObject.types_accepted.includes(check)) {
|
|
96
|
-
return true;
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
// If none of the types are compatible return false
|
|
101
|
-
return false;
|
|
102
|
-
};
|
|
103
|
-
|
|
104
|
-
/**
|
|
105
|
-
* Whether a type is text, a date or a time: what a condition cannot be. A condition is evaluated by its
|
|
106
|
-
* truthiness, so a number (0 or not), a list or hash (empty or not), binary data and an untyped result
|
|
107
|
-
* all decide it; text, dates and times do not say plainly what is meant, and are compared explicitly
|
|
108
|
-
* instead (`@status == "open"`, `@note != ""`). The Qorus server applies the same rule.
|
|
109
|
-
*/
|
|
110
|
-
export const isTextOrDateType = (type: string): boolean =>
|
|
111
|
-
/^(string|richtext|date|time)$/.test(type.replace(/^\*/, '').replace(/^soft/, ''));
|
|
112
|
-
|
|
113
|
-
/** Whether a place takes a condition: its result must be true or false (`bool`, or a list of only that). */
|
|
114
|
-
export const isConditionType = (returnType: string | string[] | undefined): boolean => {
|
|
115
|
-
const types = isArray(returnType) ? returnType : returnType ? [returnType] : [];
|
|
116
|
-
return types.length > 0 && types.every((type) => /^\*?(bool|boolean)$/.test(type));
|
|
117
|
-
};
|
|
118
|
-
|
|
119
|
-
/**
|
|
120
|
-
* Whether an operation is offered where its result must be of `returnType`: a condition (`bool`) is
|
|
121
|
-
* built from the operations whose result decides it, which is any result but text, a date or a time.
|
|
122
|
-
*
|
|
123
|
-
* Only a condition narrows the list. Any other type keeps every operation: a value of one type is often
|
|
124
|
-
* made from an operation that gives another (text from rich text, a number from an int), and the
|
|
125
|
-
* mismatch message after the choice says when it does not fit. An operation whose result is known
|
|
126
|
-
* only once it is built (`any`, or the type of its first argument) is offered everywhere.
|
|
127
|
-
*/
|
|
128
|
-
export const expressionFitsReturnType = (
|
|
129
|
-
returnType: string | string[] | undefined,
|
|
130
|
-
expression: { ui_return_type?: string; return_type_first_arg?: boolean }
|
|
131
|
-
): boolean => {
|
|
132
|
-
if (!isConditionType(returnType)) {
|
|
133
|
-
return true;
|
|
134
|
-
}
|
|
135
|
-
const result = expression.ui_return_type;
|
|
136
|
-
if (expression.return_type_first_arg || !result || result === 'any' || result === 'auto') {
|
|
137
|
-
return true;
|
|
138
|
-
}
|
|
139
|
-
return !isTextOrDateType(result);
|
|
140
|
-
};
|