@qoretechnologies/reqraft 0.10.66-pr.145.gcb1e59d → 0.10.66
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +53 -1
- package/dist/components/Description/AllowedValuesHelp.d.ts +20 -0
- package/dist/components/Description/AllowedValuesHelp.d.ts.map +1 -0
- package/dist/components/Description/AllowedValuesHelp.js +86 -0
- package/dist/components/Description/AllowedValuesHelp.js.map +1 -0
- package/dist/components/Description/describedControl.d.ts +54 -0
- package/dist/components/Description/describedControl.d.ts.map +1 -0
- package/dist/components/Description/describedControl.js +81 -0
- package/dist/components/Description/describedControl.js.map +1 -0
- package/dist/components/Description/index.d.ts.map +1 -1
- package/dist/components/Description/index.js +3 -2
- package/dist/components/Description/index.js.map +1 -1
- package/dist/components/colorValue/colorValue.d.ts +59 -0
- package/dist/components/colorValue/colorValue.d.ts.map +1 -0
- package/dist/components/colorValue/colorValue.js +245 -0
- package/dist/components/colorValue/colorValue.js.map +1 -0
- package/dist/components/colorValue/index.d.ts +34 -0
- package/dist/components/colorValue/index.d.ts.map +1 -0
- package/dist/components/colorValue/index.js +136 -0
- package/dist/components/colorValue/index.js.map +1 -0
- package/dist/components/colorValue/labels.d.ts +12 -0
- package/dist/components/colorValue/labels.d.ts.map +1 -0
- package/dist/components/colorValue/labels.js +11 -0
- package/dist/components/colorValue/labels.js.map +1 -0
- package/dist/components/composer/Composer.d.ts +1 -1
- package/dist/components/composer/Composer.d.ts.map +1 -1
- package/dist/components/composer/Composer.js +2 -2
- package/dist/components/composer/Composer.js.map +1 -1
- package/dist/components/dpqlEditor/DpqlEditor.d.ts.map +1 -1
- package/dist/components/dpqlEditor/DpqlEditor.js +156 -10
- package/dist/components/dpqlEditor/DpqlEditor.js.map +1 -1
- package/dist/components/dpqlEditor/dpqlCompletions.d.ts +39 -0
- package/dist/components/dpqlEditor/dpqlCompletions.d.ts.map +1 -0
- package/dist/components/dpqlEditor/dpqlCompletions.js +294 -0
- package/dist/components/dpqlEditor/dpqlCompletions.js.map +1 -0
- package/dist/components/dpqlEditor/dpqlHelpers.d.ts +54 -5
- package/dist/components/dpqlEditor/dpqlHelpers.d.ts.map +1 -1
- package/dist/components/dpqlEditor/dpqlHelpers.js +420 -63
- package/dist/components/dpqlEditor/dpqlHelpers.js.map +1 -1
- package/dist/components/dpqlEditor/dpqlInserter.d.ts.map +1 -1
- package/dist/components/dpqlEditor/dpqlInserter.js +67 -29
- package/dist/components/dpqlEditor/dpqlInserter.js.map +1 -1
- package/dist/components/dpqlEditor/dpqlTags.d.ts +17 -7
- package/dist/components/dpqlEditor/dpqlTags.d.ts.map +1 -1
- package/dist/components/dpqlEditor/dpqlTags.js +44 -17
- package/dist/components/dpqlEditor/dpqlTags.js.map +1 -1
- package/dist/components/dpqlEditor/types.d.ts +94 -8
- package/dist/components/dpqlEditor/types.d.ts.map +1 -1
- package/dist/components/dpqlEditor/useDpqlSession.d.ts +7 -2
- package/dist/components/dpqlEditor/useDpqlSession.d.ts.map +1 -1
- package/dist/components/dpqlEditor/useDpqlSession.js +49 -17
- 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 +336 -243
- 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 +20 -57
- package/dist/components/form/engine/CompactToolbar.js.map +1 -1
- package/dist/components/form/engine/FormEngine.d.ts +67 -59
- package/dist/components/form/engine/FormEngine.d.ts.map +1 -1
- package/dist/components/form/engine/FormEngine.js +606 -409
- 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 +2 -18
- package/dist/components/form/engine/OptionFieldMessages.d.ts.map +1 -1
- package/dist/components/form/engine/OptionFieldMessages.js +28 -25
- package/dist/components/form/engine/OptionFieldMessages.js.map +1 -1
- package/dist/components/form/engine/OptionsHelpDialog.d.ts.map +1 -1
- package/dist/components/form/engine/OptionsHelpDialog.js +19 -2
- package/dist/components/form/engine/OptionsHelpDialog.js.map +1 -1
- package/dist/components/form/engine/_structuredData/SchemaDataView.d.ts +2 -2
- package/dist/components/form/engine/_structuredData/SchemaDataView.d.ts.map +1 -1
- package/dist/components/form/engine/_structuredData/SchemaDataView.js +11 -31
- package/dist/components/form/engine/_structuredData/SchemaDataView.js.map +1 -1
- package/dist/components/form/engine/compactRowContext.d.ts +30 -6
- 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 +56 -31
- package/dist/components/form/engine/compactRowStyles.d.ts.map +1 -1
- package/dist/components/form/engine/compactRowStyles.js +121 -110
- 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/compactToolbarContext.d.ts +0 -3
- package/dist/components/form/engine/compactToolbarContext.d.ts.map +1 -1
- package/dist/components/form/engine/compactToolbarContext.js.map +1 -1
- package/dist/components/form/engine/inheritProps.d.ts +29 -0
- package/dist/components/form/engine/inheritProps.d.ts.map +1 -0
- package/dist/components/form/engine/inheritProps.js +43 -0
- package/dist/components/form/engine/inheritProps.js.map +1 -0
- package/dist/components/form/engine/operatorSummary.d.ts +26 -0
- package/dist/components/form/engine/operatorSummary.d.ts.map +1 -0
- package/dist/components/form/engine/operatorSummary.js +35 -0
- package/dist/components/form/engine/operatorSummary.js.map +1 -0
- package/dist/components/form/engine/readFirst.d.ts +26 -22
- package/dist/components/form/engine/readFirst.d.ts.map +1 -1
- package/dist/components/form/engine/readFirst.js +79 -115
- 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 +3 -9
- package/dist/components/form/engine/rowFocus.d.ts.map +1 -1
- package/dist/components/form/engine/rowFocus.js +30 -19
- package/dist/components/form/engine/rowFocus.js.map +1 -1
- package/dist/components/form/engine/typeChoices.d.ts +1 -1
- package/dist/components/form/engine/variants/VariantCalmTable.d.ts.map +1 -1
- package/dist/components/form/engine/variants/VariantCalmTable.js +2 -1
- package/dist/components/form/engine/variants/VariantCalmTable.js.map +1 -1
- package/dist/components/form/engine/variants/VariantCards.d.ts.map +1 -1
- package/dist/components/form/engine/variants/VariantCards.js +2 -1
- package/dist/components/form/engine/variants/VariantCards.js.map +1 -1
- package/dist/components/form/engine/variants/VariantFocus.js +1 -1
- package/dist/components/form/engine/variants/VariantFocus.js.map +1 -1
- package/dist/components/form/engine/variants/VariantMinimal.d.ts.map +1 -1
- package/dist/components/form/engine/variants/VariantMinimal.js +2 -1
- package/dist/components/form/engine/variants/VariantMinimal.js.map +1 -1
- package/dist/components/form/engine/variants/variantParts.d.ts +1 -1
- package/dist/components/form/engine/variants/variantParts.d.ts.map +1 -1
- package/dist/components/form/engine/variants/variantParts.js +25 -17
- package/dist/components/form/engine/variants/variantParts.js.map +1 -1
- package/dist/components/form/expressions/DpqlRendering.d.ts +1 -1
- package/dist/components/form/expressions/DpqlRendering.d.ts.map +1 -1
- package/dist/components/form/expressions/DpqlRendering.js +7 -6
- package/dist/components/form/expressions/DpqlRendering.js.map +1 -1
- package/dist/components/form/expressions/ExpressionField.d.ts +67 -3
- package/dist/components/form/expressions/ExpressionField.d.ts.map +1 -1
- package/dist/components/form/expressions/ExpressionField.js +536 -114
- 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 +30 -11
- 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 +9 -0
- package/dist/components/form/expressions/builder/confirmMismatchedTypesModal.d.ts.map +1 -1
- package/dist/components/form/expressions/builder/confirmMismatchedTypesModal.js +30 -27
- 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 +7 -5
- package/dist/components/form/expressions/builder/confirmUnsupportedTypeModal.js.map +1 -1
- package/dist/components/form/expressions/builder/index.d.ts +34 -2
- package/dist/components/form/expressions/builder/index.d.ts.map +1 -1
- package/dist/components/form/expressions/builder/index.js +170 -80
- package/dist/components/form/expressions/builder/index.js.map +1 -1
- package/dist/components/form/expressions/builder/item.d.ts +6 -2
- package/dist/components/form/expressions/builder/item.d.ts.map +1 -1
- package/dist/components/form/expressions/builder/item.js +19 -5
- package/dist/components/form/expressions/builder/item.js.map +1 -1
- package/dist/components/form/expressions/builder/renderTemplate.js +1 -1
- package/dist/components/form/expressions/builder/renderTemplate.js.map +1 -1
- package/dist/components/form/expressions/dpqlMockRecordPath.d.ts +11 -0
- package/dist/components/form/expressions/dpqlMockRecordPath.d.ts.map +1 -0
- package/dist/components/form/expressions/dpqlMockRecordPath.js +254 -0
- package/dist/components/form/expressions/dpqlMockRecordPath.js.map +1 -0
- package/dist/components/form/expressions/expressionOperands.d.ts +16 -0
- package/dist/components/form/expressions/expressionOperands.d.ts.map +1 -0
- package/dist/components/form/expressions/expressionOperands.js +97 -0
- package/dist/components/form/expressions/expressionOperands.js.map +1 -0
- package/dist/components/form/expressions/fieldPath.d.ts +24 -0
- package/dist/components/form/expressions/fieldPath.d.ts.map +1 -0
- package/dist/components/form/expressions/fieldPath.js +152 -0
- package/dist/components/form/expressions/fieldPath.js.map +1 -0
- package/dist/components/form/expressions/loneValue.d.ts +17 -0
- package/dist/components/form/expressions/loneValue.d.ts.map +1 -0
- package/dist/components/form/expressions/loneValue.js +33 -0
- package/dist/components/form/expressions/loneValue.js.map +1 -0
- package/dist/components/form/expressions/mockExpressions.d.ts.map +1 -1
- package/dist/components/form/expressions/mockExpressions.js +22 -5
- package/dist/components/form/expressions/mockExpressions.js.map +1 -1
- package/dist/components/form/expressions/renderExpressionToText.d.ts +2 -0
- package/dist/components/form/expressions/renderExpressionToText.d.ts.map +1 -1
- package/dist/components/form/expressions/renderExpressionToText.js +37 -25
- 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 +12 -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 +39 -18
- package/dist/components/form/fields/Field.js.map +1 -1
- package/dist/components/form/fields/allowed-values/AllowedValues.d.ts +0 -7
- package/dist/components/form/fields/allowed-values/AllowedValues.d.ts.map +1 -1
- package/dist/components/form/fields/allowed-values/AllowedValues.js +46 -35
- package/dist/components/form/fields/allowed-values/AllowedValues.js.map +1 -1
- package/dist/components/form/fields/allowed-values/choicePicture.d.ts +37 -0
- package/dist/components/form/fields/allowed-values/choicePicture.d.ts.map +1 -0
- package/dist/components/form/fields/allowed-values/choicePicture.js +64 -0
- package/dist/components/form/fields/allowed-values/choicePicture.js.map +1 -0
- package/dist/components/form/fields/array/ArrayAuto.d.ts.map +1 -1
- package/dist/components/form/fields/array/ArrayAuto.js +24 -0
- package/dist/components/form/fields/array/ArrayAuto.js.map +1 -1
- package/dist/components/form/fields/array/ArrayAutoField.d.ts.map +1 -1
- package/dist/components/form/fields/array/ArrayAutoField.js +36 -13
- package/dist/components/form/fields/array/ArrayAutoField.js.map +1 -1
- package/dist/components/form/fields/auto/AutoFormField.d.ts +30 -1
- package/dist/components/form/fields/auto/AutoFormField.d.ts.map +1 -1
- package/dist/components/form/fields/auto/AutoFormField.js +123 -79
- 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 +1 -7
- package/dist/components/form/fields/long-string/LongString.d.ts.map +1 -1
- package/dist/components/form/fields/long-string/LongString.js +30 -13
- 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 +10 -7
- package/dist/components/form/fields/multi-select/MultiSelectFormField.js.map +1 -1
- package/dist/components/form/fields/number/Number.d.ts +7 -4
- package/dist/components/form/fields/number/Number.d.ts.map +1 -1
- package/dist/components/form/fields/number/Number.js +45 -18
- package/dist/components/form/fields/number/Number.js.map +1 -1
- package/dist/components/form/fields/object/Object.d.ts +1 -1
- package/dist/components/form/fields/object/Object.d.ts.map +1 -1
- package/dist/components/form/fields/object/Object.js +4 -2
- package/dist/components/form/fields/object/Object.js.map +1 -1
- package/dist/components/form/fields/pendingEdit.d.ts +52 -0
- package/dist/components/form/fields/pendingEdit.d.ts.map +1 -0
- package/dist/components/form/fields/pendingEdit.js +79 -0
- package/dist/components/form/fields/pendingEdit.js.map +1 -0
- package/dist/components/form/fields/radio-group/RadioGroup.d.ts.map +1 -1
- package/dist/components/form/fields/radio-group/RadioGroup.js +8 -13
- package/dist/components/form/fields/radio-group/RadioGroup.js.map +1 -1
- package/dist/components/form/fields/rich-text/RichText.d.ts +20 -1
- package/dist/components/form/fields/rich-text/RichText.d.ts.map +1 -1
- package/dist/components/form/fields/rich-text/RichText.js +426 -91
- 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 +80 -0
- package/dist/components/form/fields/rich-text/useTemplateTags.js.map +1 -0
- package/dist/components/form/fields/schema-definition/CatalogLeafForm.d.ts.map +1 -1
- package/dist/components/form/fields/schema-definition/CatalogLeafForm.js +4 -1
- package/dist/components/form/fields/schema-definition/CatalogLeafForm.js.map +1 -1
- package/dist/components/form/fields/schema-definition/CatalogNodeEditor.d.ts.map +1 -1
- package/dist/components/form/fields/schema-definition/CatalogNodeEditor.js +20 -5
- package/dist/components/form/fields/schema-definition/CatalogNodeEditor.js.map +1 -1
- package/dist/components/form/fields/schema-definition/TableEditor.d.ts.map +1 -1
- package/dist/components/form/fields/schema-definition/TableEditor.js +10 -2
- package/dist/components/form/fields/schema-definition/TableEditor.js.map +1 -1
- package/dist/components/form/fields/schema-definition/index.d.ts.map +1 -1
- package/dist/components/form/fields/schema-definition/index.js +8 -4
- package/dist/components/form/fields/schema-definition/index.js.map +1 -1
- package/dist/components/form/fields/select/Select.d.ts +10 -1
- package/dist/components/form/fields/select/Select.d.ts.map +1 -1
- package/dist/components/form/fields/select/Select.js +28 -14
- package/dist/components/form/fields/select/Select.js.map +1 -1
- package/dist/components/form/fields/select/SelectCollection.d.ts +5 -0
- package/dist/components/form/fields/select/SelectCollection.d.ts.map +1 -1
- package/dist/components/form/fields/select/SelectCollection.js +25 -12
- package/dist/components/form/fields/select/SelectCollection.js.map +1 -1
- package/dist/components/form/fields/select/unavailableRow.d.ts +23 -0
- package/dist/components/form/fields/select/unavailableRow.d.ts.map +1 -0
- package/dist/components/form/fields/select/unavailableRow.js +55 -0
- package/dist/components/form/fields/select/unavailableRow.js.map +1 -0
- package/dist/components/form/fields/template/ReadOnlyTemplateTag.d.ts +11 -5
- package/dist/components/form/fields/template/ReadOnlyTemplateTag.d.ts.map +1 -1
- package/dist/components/form/fields/template/ReadOnlyTemplateTag.js +21 -5
- package/dist/components/form/fields/template/ReadOnlyTemplateTag.js.map +1 -1
- package/dist/components/form/fields/template/TemplateBrowser.d.ts +16 -0
- package/dist/components/form/fields/template/TemplateBrowser.d.ts.map +1 -0
- package/dist/components/form/fields/template/TemplateBrowser.js +89 -0
- package/dist/components/form/fields/template/TemplateBrowser.js.map +1 -0
- package/dist/components/form/fields/template/TemplateField.d.ts +105 -1
- package/dist/components/form/fields/template/TemplateField.d.ts.map +1 -1
- package/dist/components/form/fields/template/TemplateField.js +706 -168
- package/dist/components/form/fields/template/TemplateField.js.map +1 -1
- package/dist/components/form/fields/template/TemplatePicker.d.ts +54 -0
- package/dist/components/form/fields/template/TemplatePicker.d.ts.map +1 -0
- package/dist/components/form/fields/template/TemplatePicker.js +459 -0
- package/dist/components/form/fields/template/TemplatePicker.js.map +1 -0
- package/dist/components/form/fields/template/TemplateText.d.ts +0 -17
- package/dist/components/form/fields/template/TemplateText.d.ts.map +1 -1
- package/dist/components/form/fields/template/TemplateText.js +22 -16
- package/dist/components/form/fields/template/TemplateText.js.map +1 -1
- package/dist/components/form/fields/template/referenceNames.d.ts +63 -0
- package/dist/components/form/fields/template/referenceNames.d.ts.map +1 -0
- package/dist/components/form/fields/template/referenceNames.js +69 -0
- package/dist/components/form/fields/template/referenceNames.js.map +1 -0
- package/dist/components/form/fields/template/writtenAsText.d.ts +61 -0
- package/dist/components/form/fields/template/writtenAsText.d.ts.map +1 -0
- package/dist/components/form/fields/template/writtenAsText.js +204 -0
- package/dist/components/form/fields/template/writtenAsText.js.map +1 -0
- package/dist/components/form/index.d.ts +12 -2
- package/dist/components/form/index.d.ts.map +1 -1
- package/dist/components/form/index.js +25 -3
- package/dist/components/form/index.js.map +1 -1
- package/dist/components/form/typeSentenceForm.d.ts +17 -0
- package/dist/components/form/typeSentenceForm.d.ts.map +1 -0
- package/dist/components/form/typeSentenceForm.js +54 -0
- package/dist/components/form/typeSentenceForm.js.map +1 -0
- package/dist/components/imageLightbox/ImageLightbox.d.ts.map +1 -1
- package/dist/components/imageLightbox/ImageLightbox.js +19 -9
- 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 +20 -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 +53 -0
- package/dist/components/smartEditor/CompletionMenu.d.ts.map +1 -0
- package/dist/components/smartEditor/CompletionMenu.js +302 -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 +616 -190
- package/dist/components/smartEditor/SmartEditor.js.map +1 -1
- package/dist/components/smartEditor/completionStyle.d.ts +28 -0
- package/dist/components/smartEditor/completionStyle.d.ts.map +1 -0
- package/dist/components/smartEditor/completionStyle.js +79 -0
- package/dist/components/smartEditor/completionStyle.js.map +1 -0
- package/dist/components/smartEditor/contextTitle.d.ts +10 -0
- package/dist/components/smartEditor/contextTitle.d.ts.map +1 -0
- package/dist/components/smartEditor/contextTitle.js +21 -0
- package/dist/components/smartEditor/contextTitle.js.map +1 -0
- package/dist/components/smartEditor/editingAids.d.ts +64 -0
- package/dist/components/smartEditor/editingAids.d.ts.map +1 -0
- package/dist/components/smartEditor/editingAids.js +213 -0
- package/dist/components/smartEditor/editingAids.js.map +1 -0
- package/dist/components/smartEditor/index.d.ts +6 -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 +98 -0
- package/dist/components/smartEditor/templateCompletions.d.ts.map +1 -0
- package/dist/components/smartEditor/templateCompletions.js +380 -0
- package/dist/components/smartEditor/templateCompletions.js.map +1 -0
- package/dist/components/smartEditor/typedReferences.d.ts +34 -0
- package/dist/components/smartEditor/typedReferences.d.ts.map +1 -0
- package/dist/components/smartEditor/typedReferences.js +179 -0
- package/dist/components/smartEditor/typedReferences.js.map +1 -0
- package/dist/components/smartEditor/types.d.ts +116 -2
- package/dist/components/smartEditor/types.d.ts.map +1 -1
- package/dist/components/smartEditor/useEditingAids.d.ts +38 -0
- package/dist/components/smartEditor/useEditingAids.d.ts.map +1 -0
- package/dist/components/smartEditor/useEditingAids.js +392 -0
- package/dist/components/smartEditor/useEditingAids.js.map +1 -0
- package/dist/components/smartEditor/useLspAutocomplete.d.ts +106 -3
- package/dist/components/smartEditor/useLspAutocomplete.d.ts.map +1 -1
- package/dist/components/smartEditor/useLspAutocomplete.js +592 -149
- 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 +364 -35
- package/dist/components/smartEditor/useLspHover.js.map +1 -1
- package/dist/components/smartEditor/useLspSemanticTokens.js +1 -1
- package/dist/components/smartEditor/useLspSemanticTokens.js.map +1 -1
- package/dist/components/smartEditor/useLspSession.d.ts +6 -0
- package/dist/components/smartEditor/useLspSession.d.ts.map +1 -1
- package/dist/components/smartEditor/useLspSession.js +7 -6
- package/dist/components/smartEditor/useLspSession.js.map +1 -1
- package/dist/components/smartEditor/useLspSignatureHelp.d.ts.map +1 -1
- package/dist/components/smartEditor/useLspSignatureHelp.js +6 -11
- package/dist/components/smartEditor/useLspSignatureHelp.js.map +1 -1
- package/dist/components/smartEditor/useTabCameIn.d.ts +10 -0
- package/dist/components/smartEditor/useTabCameIn.d.ts.map +1 -0
- package/dist/components/smartEditor/useTabCameIn.js +42 -0
- package/dist/components/smartEditor/useTabCameIn.js.map +1 -0
- 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/InterfaceReferenceTags.d.ts +2 -3
- package/dist/components/supportTicket/InterfaceReferenceTags.d.ts.map +1 -1
- package/dist/components/supportTicket/InterfaceReferenceTags.js.map +1 -1
- package/dist/components/supportTicket/ReferencePicker.d.ts +9 -3
- package/dist/components/supportTicket/ReferencePicker.d.ts.map +1 -1
- package/dist/components/supportTicket/ReferencePicker.js +38 -23
- 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 +21 -6
- package/dist/components/supportTicket/TicketHeader.js.map +1 -1
- package/dist/components/supportTicket/TicketMetaTags.d.ts +1 -1
- package/dist/components/supportTicket/TicketReplyBox.d.ts.map +1 -1
- package/dist/components/supportTicket/TicketReplyBox.js +10 -29
- package/dist/components/supportTicket/TicketReplyBox.js.map +1 -1
- package/dist/components/supportTicket/useLoadedImages.d.ts +0 -10
- package/dist/components/supportTicket/useLoadedImages.d.ts.map +1 -1
- package/dist/components/supportTicket/useLoadedImages.js +1 -63
- package/dist/components/supportTicket/useLoadedImages.js.map +1 -1
- package/dist/components/ticketReferences/TicketReferences.d.ts.map +1 -1
- package/dist/components/ticketReferences/TicketReferences.js +10 -9
- 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 +52 -21
- package/dist/components/ticketThread/TicketThread.js.map +1 -1
- package/dist/helpers/allowedValues.d.ts +21 -12
- package/dist/helpers/allowedValues.d.ts.map +1 -1
- package/dist/helpers/allowedValues.js +40 -20
- package/dist/helpers/allowedValues.js.map +1 -1
- package/dist/helpers/descriptionTooltip.d.ts +46 -0
- package/dist/helpers/descriptionTooltip.d.ts.map +1 -0
- package/dist/helpers/descriptionTooltip.js +76 -0
- package/dist/helpers/descriptionTooltip.js.map +1 -0
- package/dist/helpers/domProps.d.ts +5 -0
- package/dist/helpers/domProps.d.ts.map +1 -0
- package/dist/helpers/domProps.js +47 -0
- package/dist/helpers/domProps.js.map +1 -0
- package/dist/helpers/expressions.d.ts +115 -4
- package/dist/helpers/expressions.d.ts.map +1 -1
- package/dist/helpers/expressions.js +247 -29
- package/dist/helpers/expressions.js.map +1 -1
- package/dist/helpers/hoveringPointer.d.ts +26 -0
- package/dist/helpers/hoveringPointer.d.ts.map +1 -0
- package/dist/helpers/hoveringPointer.js +29 -0
- package/dist/helpers/hoveringPointer.js.map +1 -0
- package/dist/helpers/markdownText.d.ts +14 -0
- package/dist/helpers/markdownText.d.ts.map +1 -0
- package/dist/helpers/markdownText.js +160 -0
- package/dist/helpers/markdownText.js.map +1 -0
- package/dist/helpers/noDescription.d.ts +9 -0
- package/dist/helpers/noDescription.d.ts.map +1 -0
- package/dist/helpers/noDescription.js +13 -0
- package/dist/helpers/noDescription.js.map +1 -0
- package/dist/helpers/optionUiTypes.d.ts +2 -2
- package/dist/helpers/qorusTypeCatalogue.d.ts +147 -0
- package/dist/helpers/qorusTypeCatalogue.d.ts.map +1 -0
- package/dist/helpers/qorusTypeCatalogue.js +505 -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/singleLineString.d.ts.map +1 -1
- package/dist/helpers/singleLineString.js +0 -1
- package/dist/helpers/singleLineString.js.map +1 -1
- package/dist/helpers/templateCatalogue.d.ts +104 -0
- package/dist/helpers/templateCatalogue.d.ts.map +1 -0
- package/dist/helpers/templateCatalogue.js +116 -0
- package/dist/helpers/templateCatalogue.js.map +1 -0
- package/dist/helpers/templateCatalogueContext.d.ts +19 -0
- package/dist/helpers/templateCatalogueContext.d.ts.map +1 -0
- package/dist/helpers/templateCatalogueContext.js +31 -0
- package/dist/helpers/templateCatalogueContext.js.map +1 -0
- package/dist/helpers/templateItems.d.ts +2 -2
- package/dist/helpers/templateItems.d.ts.map +1 -1
- package/dist/helpers/templateItems.js +6 -4
- package/dist/helpers/templateItems.js.map +1 -1
- package/dist/helpers/templateText.d.ts +1 -0
- package/dist/helpers/templateText.d.ts.map +1 -1
- package/dist/helpers/templateText.js +7 -3
- package/dist/helpers/templateText.js.map +1 -1
- package/dist/helpers/templateTree.d.ts +248 -0
- package/dist/helpers/templateTree.d.ts.map +1 -0
- package/dist/helpers/templateTree.js +892 -0
- package/dist/helpers/templateTree.js.map +1 -0
- package/dist/helpers/templateType.d.ts +28 -0
- package/dist/helpers/templateType.d.ts.map +1 -0
- package/dist/helpers/templateType.js +30 -0
- package/dist/helpers/templateType.js.map +1 -0
- package/dist/helpers/templates.d.ts +86 -16
- package/dist/helpers/templates.d.ts.map +1 -1
- package/dist/helpers/templates.js +305 -45
- package/dist/helpers/templates.js.map +1 -1
- package/dist/helpers/validations.d.ts +27 -0
- package/dist/helpers/validations.d.ts.map +1 -1
- package/dist/helpers/validations.js +169 -39
- package/dist/helpers/validations.js.map +1 -1
- package/dist/helpers/webLink.d.ts +8 -0
- package/dist/helpers/webLink.d.ts.map +1 -0
- package/dist/helpers/webLink.js +29 -0
- package/dist/helpers/webLink.js.map +1 -0
- package/dist/hooks/useQorusTypes.d.ts +12 -17
- package/dist/hooks/useQorusTypes.d.ts.map +1 -1
- package/dist/hooks/useQorusTypes.js +44 -172
- 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 +8 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +24 -1
- 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/lspClient.types.d.ts +2 -0
- package/dist/utils/lspClient.types.d.ts.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 -6
- 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/dist/components/form/engine/formAppearance.d.ts +0 -49
- package/dist/components/form/engine/formAppearance.d.ts.map +0 -1
- package/dist/components/form/engine/formAppearance.js +0 -50
- package/dist/components/form/engine/formAppearance.js.map +0 -1
- package/dist/components/form/fields/ChoiceGroupHeading.d.ts +0 -21
- package/dist/components/form/fields/ChoiceGroupHeading.d.ts.map +0 -1
- package/dist/components/form/fields/ChoiceGroupHeading.js +0 -33
- package/dist/components/form/fields/ChoiceGroupHeading.js.map +0 -1
- package/dist/components/form/fields/allowed-values/savedValues.d.ts +0 -30
- package/dist/components/form/fields/allowed-values/savedValues.d.ts.map +0 -1
- package/dist/components/form/fields/allowed-values/savedValues.js +0 -39
- package/dist/components/form/fields/allowed-values/savedValues.js.map +0 -1
- package/dist/helpers/fieldDescription.d.ts +0 -16
- package/dist/helpers/fieldDescription.d.ts.map +0 -1
- package/dist/helpers/fieldDescription.js +0 -40
- package/dist/helpers/fieldDescription.js.map +0 -1
- 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 -2740
- package/src/components/form/engine/CompactToolbar.tsx +0 -399
- package/src/components/form/engine/FormEngine.stories.tsx +0 -9934
- package/src/components/form/engine/FormEngine.tsx +0 -4891
- package/src/components/form/engine/FormEngineAppearance.stories.tsx +0 -609
- package/src/components/form/engine/FormEngineRemote.stories.tsx +0 -679
- package/src/components/form/engine/FormEngineStickyHeaders.stories.tsx +0 -335
- package/src/components/form/engine/FormFieldsSkeleton.tsx +0 -82
- package/src/components/form/engine/OptionFieldMessages.tsx +0 -548
- 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 -755
- 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 -153
- package/src/components/form/engine/compactRowStyles.ts +0 -1087
- package/src/components/form/engine/compactToolbarContext.ts +0 -72
- package/src/components/form/engine/formAppearance.ts +0 -79
- 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 -1090
- 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 -112
- 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 -152
- 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/ChoiceGroupHeading.tsx +0 -38
- package/src/components/form/fields/Field.stories.tsx +0 -143
- package/src/components/form/fields/Field.tsx +0 -734
- package/src/components/form/fields/allowed-values/AllowedValues.tsx +0 -321
- package/src/components/form/fields/allowed-values/savedValues.ts +0 -64
- 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 -1183
- 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 -147
- package/src/components/form/fields/long-string/LongString.tsx +0 -141
- 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 -140
- package/src/components/form/fields/number/Number.stories.tsx +0 -159
- package/src/components/form/fields/number/Number.tsx +0 -175
- 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 -52
- 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 -1749
- 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 -49
- package/src/components/imageLightbox/ImageLightbox.stories.tsx +0 -238
- package/src/components/imageLightbox/ImageLightbox.tsx +0 -238
- 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 -130
- package/src/components/supportTicket/ReferencePicker.stories.tsx +0 -580
- package/src/components/supportTicket/ReferencePicker.tsx +0 -573
- package/src/components/supportTicket/TicketConversation.stories.tsx +0 -120
- package/src/components/supportTicket/TicketHeader.stories.tsx +0 -183
- package/src/components/supportTicket/TicketHeader.tsx +0 -248
- 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 -357
- package/src/components/supportTicket/TicketReplyBox.tsx +0 -172
- 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 -93
- package/src/components/ticketReferences/TicketReferences.stories.tsx +0 -341
- package/src/components/ticketReferences/TicketReferences.tsx +0 -914
- package/src/components/ticketReferences/index.ts +0 -2
- package/src/components/ticketThread/TicketThread.stories.tsx +0 -898
- package/src/components/ticketThread/TicketThread.tsx +0 -706
- 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 -268
- 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/fieldDescription.ts +0 -39
- 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 -62
- 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
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
import { IReqoreFormTemplates } from '@qoretechnologies/reqore/dist/components/Textarea';
|
|
2
|
-
import { firstDeclaredType } from '../../../helpers/optionUiTypes';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* A field schema that carries a template list of its own.
|
|
6
|
-
*
|
|
7
|
-
* `templates` is deliberately NOT added to `TQorusFormFieldSchema`: that type is
|
|
8
|
-
* owned by ts-toolkit and shared with consumers that have no notion of a form
|
|
9
|
-
* engine, so the capability is read through this narrow view instead of widening
|
|
10
|
-
* the shared type from here. A schema that sets it is offering a list scoped to
|
|
11
|
-
* one field rather than to the whole form.
|
|
12
|
-
*/
|
|
13
|
-
export type TFieldWithOwnTemplates = {
|
|
14
|
-
templates?: IReqoreFormTemplates;
|
|
15
|
-
/**
|
|
16
|
-
* The token grammar this field's value is WRITTEN in.
|
|
17
|
-
*
|
|
18
|
-
* A host may spell a reference in a grammar that is not reqraft's — a Qorus
|
|
19
|
-
* test writes `$._case.mode`, which has no `$key:` in it at all — and a field
|
|
20
|
-
* that speaks one says so here, exactly as it hands down its own `templates`.
|
|
21
|
-
* Declaring it on the schema is what lets every surface that draws the value
|
|
22
|
-
* agree about it, instead of printing the raw token the author never typed.
|
|
23
|
-
*
|
|
24
|
-
* Both directions read it: the read-only renderings
|
|
25
|
-
* (`templateTextSegments`) and the rich-text editor a row opens
|
|
26
|
-
* (`templateTextToNodes`, through `RichTextFormField`'s `templateToken`
|
|
27
|
-
* prop). They resolve references with the same code, so a row and the editor
|
|
28
|
-
* it opens cannot disagree about what one is.
|
|
29
|
-
*
|
|
30
|
-
* A `RegExp` or its source: a schema that crossed a serialization boundary
|
|
31
|
-
* carries the string.
|
|
32
|
-
*/
|
|
33
|
-
templateToken?: RegExp | string;
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
* A schema entry carries two type-ish keys with different jobs:
|
|
38
|
-
*
|
|
39
|
-
* - `type` names how the value is STORED and validated (`string`, `hash`, `list`…).
|
|
40
|
-
* - `ui_type` names which EDITOR renders it.
|
|
41
|
-
*
|
|
42
|
-
* For most fields `ui_type` is a storage-compatible refinement (`long-string`,
|
|
43
|
-
* `enum`, `url`) and it is safe to let it win for both jobs. But some `ui_type`s
|
|
44
|
-
* name a bespoke editor whose value is still stored as the plainer `type` — a
|
|
45
|
-
* `cron` editor stores a string, `processor-mappings` stores a hash. Writing
|
|
46
|
-
* those renderer names into the field's `type` breaks validation and round-trips
|
|
47
|
-
* the value through the wrong branch, which is what `RENDERER_ONLY_UI_TYPES`
|
|
48
|
-
* exists to prevent.
|
|
49
|
-
*
|
|
50
|
-
* There is deliberately no derivation here: a renderer-only `ui_type` is not
|
|
51
|
-
* distinguishable from a storage-compatible one by inspecting the value or the
|
|
52
|
-
* `TQorusType` union (`code-editor` and `tool-catalog` are members of it, and
|
|
53
|
-
* the validator has cases for `cron` and `schema-definition`). It is a fact
|
|
54
|
-
* about which editor a name selects, so it has to be declared.
|
|
55
|
-
*
|
|
56
|
-
* `markdown` is the case that makes the rule concrete: the server describes a
|
|
57
|
-
* description field as `type: 'string'` with a `markdown` flag, and a string is
|
|
58
|
-
* exactly what it stores -- but the editor is the split editor/preview one, and
|
|
59
|
-
* the read-first row renders the document rather than printing its source.
|
|
60
|
-
* Without the declaration `getValueType` keeps preferring the stored `string`
|
|
61
|
-
* and neither ever fires.
|
|
62
|
-
*/
|
|
63
|
-
export const BUILT_IN_RENDERER_ONLY_UI_TYPES: readonly string[] = [
|
|
64
|
-
'active-windows',
|
|
65
|
-
'alert-threshold',
|
|
66
|
-
'code-editor',
|
|
67
|
-
'cron',
|
|
68
|
-
'dpql',
|
|
69
|
-
'markdown',
|
|
70
|
-
'processor-mappings',
|
|
71
|
-
'schema-definition',
|
|
72
|
-
'test-cases',
|
|
73
|
-
'test-value-contract',
|
|
74
|
-
'tool-catalog',
|
|
75
|
-
];
|
|
76
|
-
|
|
77
|
-
/**
|
|
78
|
-
* A `ui_type` as the predicate takes it: any name, not only a `TQorusType`.
|
|
79
|
-
* The names it exists to recognise are open-ended — `cron` is not a
|
|
80
|
-
* `TQorusType`, and neither is an editor a consumer declares — so typing the
|
|
81
|
-
* argument as the shared union made the predicate uncallable for exactly the
|
|
82
|
-
* values it is for.
|
|
83
|
-
*/
|
|
84
|
-
export type TRendererTypeName = string | readonly string[];
|
|
85
|
-
|
|
86
|
-
/**
|
|
87
|
-
* Build the renderer-only predicate for one FormEngine instance.
|
|
88
|
-
*
|
|
89
|
-
* Consumers inject their own editors through `componentOverrides`, so the set of
|
|
90
|
-
* renderer-only names is open-ended — the IDE ships editors reqraft has never
|
|
91
|
-
* heard of. `extraTypes` (the `rendererOnlyUiTypes` prop) lets a consumer declare
|
|
92
|
-
* its own without waiting on a reqraft release, which is what previously made
|
|
93
|
-
* every new IDE editor a silent value-corruption bug until this list caught up.
|
|
94
|
-
*/
|
|
95
|
-
export const createRendererOnlyUiTypeCheck = (
|
|
96
|
-
extraTypes?: readonly string[]
|
|
97
|
-
): ((type?: TRendererTypeName) => boolean) => {
|
|
98
|
-
const known = new Set<string>([...BUILT_IN_RENDERER_ONLY_UI_TYPES, ...(extraTypes ?? [])]);
|
|
99
|
-
|
|
100
|
-
return (type?: TRendererTypeName): boolean => {
|
|
101
|
-
const declared = firstDeclaredType(type);
|
|
102
|
-
return declared !== undefined && known.has(declared);
|
|
103
|
-
};
|
|
104
|
-
};
|
|
105
|
-
|
|
106
|
-
/** The default predicate — built-ins only, for module-scope callers with no props. */
|
|
107
|
-
export const isRendererOnlyUiType = createRendererOnlyUiTypeCheck();
|
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Bring a form row into view only when it is not already there, and never
|
|
3
|
-
* under a pinned header.
|
|
4
|
-
*
|
|
5
|
-
* A row that moves between status boxes (filling a field moves it from "Needs
|
|
6
|
-
* attention" to "Set") is followed so the reader does not lose it. That used
|
|
7
|
-
* to be `scrollIntoView({ block: 'center' })`, which scrolls even when the row
|
|
8
|
-
* is already in plain sight, and centres it against the whole scrollport while
|
|
9
|
-
* the box header pinned at the top hides part of it. In the qorus-ide schema
|
|
10
|
-
* editor the moved row landed with the "Needs attention" header (375-423)
|
|
11
|
-
* drawn over it (405).
|
|
12
|
-
*
|
|
13
|
-
* The visible area is the scrollport minus the pinned chrome above the row:
|
|
14
|
-
* the form's sticky toolbar and the sticky header of every status box the row
|
|
15
|
-
* sits in. Both are read from the DOM when the reveal runs, so a host's own
|
|
16
|
-
* offset, a toolbar that wraps, or a header that is not pinned at all are all
|
|
17
|
-
* accounted for without the caller knowing about them.
|
|
18
|
-
*/
|
|
19
|
-
|
|
20
|
-
/** Selectors of the elements whose header may be pinned above a row. */
|
|
21
|
-
const PINNED_HEADER_OWNERS = '.options-readfirst-group, .options-readfirst-scroll > .reqore-panel';
|
|
22
|
-
|
|
23
|
-
const isScrollable = (element: HTMLElement): boolean => {
|
|
24
|
-
const { overflowY } = getComputedStyle(element);
|
|
25
|
-
return (
|
|
26
|
-
(overflowY === 'auto' || overflowY === 'scroll' || overflowY === 'overlay') &&
|
|
27
|
-
element.scrollHeight > element.clientHeight
|
|
28
|
-
);
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
/** The nearest ancestor that actually scrolls; `undefined` means the viewport. */
|
|
32
|
-
export const findScrollContainer = (element: HTMLElement): HTMLElement | undefined => {
|
|
33
|
-
for (let parent = element.parentElement; parent; parent = parent.parentElement) {
|
|
34
|
-
if (parent === document.body || parent === document.documentElement) {
|
|
35
|
-
return undefined;
|
|
36
|
-
}
|
|
37
|
-
if (isScrollable(parent)) {
|
|
38
|
-
return parent;
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
return undefined;
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* How far below the top of the scrollport the pinned chrome above `element`
|
|
46
|
-
* reaches: the largest `top + height` of any sticky header of an enclosing
|
|
47
|
-
* status box or form toolbar. Zero when nothing above it is pinned.
|
|
48
|
-
*/
|
|
49
|
-
export const getPinnedChromeHeight = (element: HTMLElement): number => {
|
|
50
|
-
let clearance = 0;
|
|
51
|
-
for (
|
|
52
|
-
let owner = element.parentElement?.closest<HTMLElement>(PINNED_HEADER_OWNERS);
|
|
53
|
-
owner;
|
|
54
|
-
owner = owner.parentElement?.closest<HTMLElement>(PINNED_HEADER_OWNERS)
|
|
55
|
-
) {
|
|
56
|
-
const header = owner.querySelector<HTMLElement>(':scope > .reqore-panel-title');
|
|
57
|
-
if (!header || header.contains(element)) {
|
|
58
|
-
continue;
|
|
59
|
-
}
|
|
60
|
-
const style = getComputedStyle(header);
|
|
61
|
-
if (style.position !== 'sticky') {
|
|
62
|
-
continue;
|
|
63
|
-
}
|
|
64
|
-
const top = parseFloat(style.top) || 0;
|
|
65
|
-
clearance = Math.max(clearance, top + header.getBoundingClientRect().height);
|
|
66
|
-
}
|
|
67
|
-
return clearance;
|
|
68
|
-
};
|
|
69
|
-
|
|
70
|
-
/**
|
|
71
|
-
* How far below the top edge of the row's scrollport the pinned chrome reaches.
|
|
72
|
-
*
|
|
73
|
-
* A sticky `top` is measured from the scrollport's top edge INSET BY ITS
|
|
74
|
-
* PADDING, while `scrollIntoView` and `scroll-margin-top` align against the
|
|
75
|
-
* edge itself. Leaving the padding out put an opened row 16px under its box
|
|
76
|
-
* header inside a padded host scroller (the Storybook canvas, and any panel
|
|
77
|
-
* with padding).
|
|
78
|
-
*/
|
|
79
|
-
export const getRevealClearance = (element: HTMLElement): number => {
|
|
80
|
-
const container = findScrollContainer(element);
|
|
81
|
-
const inset = container ? parseFloat(getComputedStyle(container).paddingTop) || 0 : 0;
|
|
82
|
-
return inset + getPinnedChromeHeight(element);
|
|
83
|
-
};
|
|
84
|
-
|
|
85
|
-
/**
|
|
86
|
-
* Whether the whole of `element` is visible below `clearance` (measured from
|
|
87
|
-
* the top edge of its scrollport, see {@link getRevealClearance}).
|
|
88
|
-
*/
|
|
89
|
-
export const isRowInView = (element: HTMLElement, clearance: number): boolean => {
|
|
90
|
-
const container = findScrollContainer(element);
|
|
91
|
-
const viewTop = container ? container.getBoundingClientRect().top + container.clientTop : 0;
|
|
92
|
-
const viewBottom =
|
|
93
|
-
container ?
|
|
94
|
-
viewTop + container.clientHeight
|
|
95
|
-
: window.innerHeight || document.documentElement.clientHeight;
|
|
96
|
-
const rect = element.getBoundingClientRect();
|
|
97
|
-
return rect.top >= viewTop + clearance && rect.bottom <= viewBottom;
|
|
98
|
-
};
|
|
99
|
-
|
|
100
|
-
/**
|
|
101
|
-
* Scroll `element` the least distance that shows it clear of the pinned chrome
|
|
102
|
-
* above it — and not at all when it is already fully in view.
|
|
103
|
-
*
|
|
104
|
-
* `scroll-margin-top` is what keeps a row that has to come down from above from
|
|
105
|
-
* stopping under the header: `block: 'nearest'` aligns the row's margin box,
|
|
106
|
-
* so the row itself stops exactly below the pinned chrome.
|
|
107
|
-
*
|
|
108
|
-
* Returns whether a scroll was started.
|
|
109
|
-
*/
|
|
110
|
-
export const revealRow = (element: HTMLElement, behavior: ScrollBehavior = 'smooth'): boolean => {
|
|
111
|
-
// jsdom implements neither layout nor `scrollIntoView`; a missing reveal must
|
|
112
|
-
// never break a form.
|
|
113
|
-
if (typeof element.scrollIntoView !== 'function') {
|
|
114
|
-
return false;
|
|
115
|
-
}
|
|
116
|
-
const clearance = getRevealClearance(element);
|
|
117
|
-
if (isRowInView(element, clearance)) {
|
|
118
|
-
return false;
|
|
119
|
-
}
|
|
120
|
-
element.style.scrollMarginTop = `${clearance}px`;
|
|
121
|
-
element.scrollIntoView({ block: 'nearest', inline: 'nearest', behavior });
|
|
122
|
-
return true;
|
|
123
|
-
};
|
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Which control an open compact row hands the caret to.
|
|
3
|
-
*
|
|
4
|
-
* A row's editor is whatever the field's type asks for, and only some of those
|
|
5
|
-
* take typed text. A pick-one renders `ReqoreCheckbox`es (a `[tabindex]`
|
|
6
|
-
* element), a selector renders a `<button>`, a code field a `[contenteditable]`
|
|
7
|
-
* — so a scan that looked for `input`, `textarea` and `[contenteditable]` alone
|
|
8
|
-
* found nothing on most of the first questions a form asks ("which kind?",
|
|
9
|
-
* "which connection?", "which interface?"). The row opened and the caret stayed
|
|
10
|
-
* on whatever made it open.
|
|
11
|
-
*
|
|
12
|
-
* Text entry wins when the row offers it. Every editor that takes typing also
|
|
13
|
-
* draws affordances around it — a template picker, a type menu, a clear button
|
|
14
|
-
* — and those come first in document order often enough that "the first
|
|
15
|
-
* focusable element" would answer a text field with a button beside it.
|
|
16
|
-
*/
|
|
17
|
-
|
|
18
|
-
/** Controls the reader types into. `role="textbox"` is how an editor that is neither
|
|
19
|
-
* an input nor contenteditable says so: Monaco's edit area is a focusable div with that
|
|
20
|
-
* role (its own `<textarea>` is an `aria-hidden` IME helper). */
|
|
21
|
-
const TEXT_ENTRY_SELECTOR =
|
|
22
|
-
'input:not([type="hidden"]):not([disabled]), textarea:not([disabled]), [contenteditable="true"], [role="textbox"]:not([aria-disabled="true"])';
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* Everything else a row can offer. `[tabindex]` is what carries reqore's own
|
|
26
|
-
* controls: a checkbox is an icon element made focusable, not an `<input>`.
|
|
27
|
-
*/
|
|
28
|
-
const OTHER_CONTROL_SELECTOR =
|
|
29
|
-
'button:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex="-1"])';
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* Subtrees inside the row's value cell that are NOT this field's editor: a
|
|
33
|
-
* sibling field absorbed into this row (a different field, which the engine did
|
|
34
|
-
* not open) and the schema-message strip above the editor (guidance about the
|
|
35
|
-
* value, never a place to put one).
|
|
36
|
-
*/
|
|
37
|
-
const NOT_THE_FIELDS_OWN_EDITOR = '.options-readfirst-absorbed, .options-readfirst-info-panel';
|
|
38
|
-
|
|
39
|
-
const belongsToTheFieldsOwnEditor = (container: HTMLElement, element: Element): boolean => {
|
|
40
|
-
const foreign = element.closest(NOT_THE_FIELDS_OWN_EDITOR);
|
|
41
|
-
// `closest` walks past the container too, so a match only disqualifies the
|
|
42
|
-
// element when it is inside THIS container.
|
|
43
|
-
return !foreign || !container.contains(foreign);
|
|
44
|
-
};
|
|
45
|
-
|
|
46
|
-
const firstMatch = (container: HTMLElement, selector: string): HTMLElement | undefined => {
|
|
47
|
-
const matches = Array.from(container.querySelectorAll<HTMLElement>(selector));
|
|
48
|
-
return matches.find(
|
|
49
|
-
(element) =>
|
|
50
|
-
belongsToTheFieldsOwnEditor(container, element) &&
|
|
51
|
-
// An element hidden from assistive technology is not a destination for a
|
|
52
|
-
// caret either — reqore draws decorative, focusable-looking chrome that
|
|
53
|
-
// way.
|
|
54
|
-
!element.closest('[aria-hidden="true"]')
|
|
55
|
-
);
|
|
56
|
-
};
|
|
57
|
-
|
|
58
|
-
/**
|
|
59
|
-
* The control an open row should focus, or `undefined` when it offers none —
|
|
60
|
-
* a read-only preview, or an editor that has not mounted yet (see the caller,
|
|
61
|
-
* which watches for it to arrive).
|
|
62
|
-
*
|
|
63
|
-
* `textEntryOnly` is for a field that opens as a CARD (a long text, a list, source
|
|
64
|
-
* code). A card is a form in its own right, so its first button is one of several —
|
|
65
|
-
* a toolbar's "fullscreen", a list's "add" — and nobody asked for it; a caret there
|
|
66
|
-
* turns the next space typed into a press. A card takes the caret only where text
|
|
67
|
-
* goes, and waits for it when its editor mounts late (a code editor does).
|
|
68
|
-
*
|
|
69
|
-
* @param container the row's value cell
|
|
70
|
-
*/
|
|
71
|
-
export const findRowFocusTarget = (
|
|
72
|
-
container: HTMLElement | null | undefined,
|
|
73
|
-
{ textEntryOnly = false }: { textEntryOnly?: boolean } = {}
|
|
74
|
-
): HTMLElement | undefined => {
|
|
75
|
-
if (!container) {
|
|
76
|
-
return undefined;
|
|
77
|
-
}
|
|
78
|
-
const textEntry = firstMatch(container, TEXT_ENTRY_SELECTOR);
|
|
79
|
-
if (textEntry || textEntryOnly) {
|
|
80
|
-
return textEntry;
|
|
81
|
-
}
|
|
82
|
-
return firstMatch(container, OTHER_CONTROL_SELECTOR);
|
|
83
|
-
};
|
|
84
|
-
|
|
85
|
-
/**
|
|
86
|
-
* Controls whose ONLY behaviour is to reveal the choices.
|
|
87
|
-
*
|
|
88
|
-
* A row that opens hands the caret to the control it offers, and for most
|
|
89
|
-
* editors that is the end of it: a text box takes typing, a pick-one's
|
|
90
|
-
* checkboxes take a click. A PICKER is different — its closed state prints the
|
|
91
|
-
* value it already holds, which is the very thing the read row printed, so
|
|
92
|
-
* opening the row changed nothing on screen and the author had to click a
|
|
93
|
-
* second time to see the list. Read-first belongs to the collapsed row; it must
|
|
94
|
-
* not be the answer twice.
|
|
95
|
-
*
|
|
96
|
-
* Declared with `aria-haspopup`, which is what the attribute means and is
|
|
97
|
-
* already the contract with assistive technology — so a host's own editor opts
|
|
98
|
-
* in by being accessible rather than by knowing about this file. `aria-expanded`
|
|
99
|
-
* is respected: a picker that is already showing its list is not re-activated.
|
|
100
|
-
*/
|
|
101
|
-
const PICKER_TRIGGER_SELECTOR =
|
|
102
|
-
'[aria-haspopup="listbox"], [aria-haspopup="dialog"], [aria-haspopup="menu"], [aria-haspopup="tree"], [aria-haspopup="grid"]';
|
|
103
|
-
|
|
104
|
-
/**
|
|
105
|
-
* Whether this control is a picker that is still closed — i.e. whether
|
|
106
|
-
* activating it is what "open the editor" means for this row.
|
|
107
|
-
*/
|
|
108
|
-
export const isClosedPickerTrigger = (element: HTMLElement | null | undefined): boolean =>
|
|
109
|
-
!!element &&
|
|
110
|
-
typeof element.matches === 'function' &&
|
|
111
|
-
element.matches(PICKER_TRIGGER_SELECTOR) &&
|
|
112
|
-
element.getAttribute('aria-expanded') !== 'true';
|
|
@@ -1,159 +0,0 @@
|
|
|
1
|
-
// Copyright 2026 Qore Technologies, s.r.o.
|
|
2
|
-
import { IReqoreDropdownItem } from '@qoretechnologies/reqore/dist/components/Dropdown/list';
|
|
3
|
-
import {
|
|
4
|
-
createContext,
|
|
5
|
-
useCallback,
|
|
6
|
-
useContext,
|
|
7
|
-
useEffect,
|
|
8
|
-
useId,
|
|
9
|
-
useMemo,
|
|
10
|
-
useRef,
|
|
11
|
-
useState,
|
|
12
|
-
} from 'react';
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* SEAM (reqraft): an editor publishes its own actions into the row's ⋮ menu.
|
|
16
|
-
*
|
|
17
|
-
* A row already renders one overflow menu — Edit fullscreen, Remove field, and
|
|
18
|
-
* any `optionActions` the host injected — and the comment on it has always said
|
|
19
|
-
* why: *"this row already has a menu, so they reuse it rather than adding a
|
|
20
|
-
* second one beside it."* An EDITOR could not reach that menu, so an editor
|
|
21
|
-
* with affordances of its own had no choice but to draw a second ⋮ inside the
|
|
22
|
-
* value cell. The IDE's template field does exactly that, and the two menus
|
|
23
|
-
* ended up side by side on one control, at slightly different widths.
|
|
24
|
-
*
|
|
25
|
-
* `optionActions` does not solve it: that seam is host configuration, resolved
|
|
26
|
-
* from the option's name and schema before the editor exists, so it cannot know
|
|
27
|
-
* what the editor can offer *now* — whether its templates have loaded, whether
|
|
28
|
-
* the value is already an expression, which custom items the field was given.
|
|
29
|
-
*
|
|
30
|
-
* ## Why registration is keyed, and by whom
|
|
31
|
-
*
|
|
32
|
-
* Menu items carry `onClick` handlers, so they are a new array on every render
|
|
33
|
-
* and cannot be compared by value. An editor therefore publishes a `key`
|
|
34
|
-
* alongside them: a primitive describing WHICH items it is currently offering
|
|
35
|
-
* (`'expression,template'`). The row re-renders only when a publisher's key
|
|
36
|
-
* changes, so a re-rendering editor cannot drive the row into a state loop.
|
|
37
|
-
*
|
|
38
|
-
* Each registration also belongs to ONE publisher. A single shared slot let
|
|
39
|
-
* two publishers in the same row — an expression builder's operands — overwrite
|
|
40
|
-
* each other's key on every render, which re-rendered the row and both of them,
|
|
41
|
-
* which published again: a synchronous render loop that froze the page. And a
|
|
42
|
-
* slot that outlived its editor kept that editor's handlers after it unmounted,
|
|
43
|
-
* so a row closed and reopened offered items that did nothing. Registrations
|
|
44
|
-
* are therefore per publisher, withdrawn on unmount, and a click always reaches
|
|
45
|
-
* the handler from the publisher's latest render.
|
|
46
|
-
*
|
|
47
|
-
* Publish with `useRowMenuPublisher`; provide with `useRowMenuRegistry`.
|
|
48
|
-
*/
|
|
49
|
-
export interface IRowMenuRegistration {
|
|
50
|
-
/**
|
|
51
|
-
* Publish a publisher's menu items into the containing row's ⋮.
|
|
52
|
-
*
|
|
53
|
-
* @param publisherId identifies the publishing editor (one per mounted editor)
|
|
54
|
-
* @param key a primitive describing which items are being offered; the row
|
|
55
|
-
* re-renders only when it changes
|
|
56
|
-
* @param items the items to merge, or an empty array to contribute none
|
|
57
|
-
*/
|
|
58
|
-
registerRowMenuItems: (publisherId: string, key: string, items: IReqoreDropdownItem[]) => void;
|
|
59
|
-
/** Withdraw a publisher's items — when it unmounts or leaves the row. */
|
|
60
|
-
unregisterRowMenuItems: (publisherId: string) => void;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
/**
|
|
64
|
-
* Absent outside a compact row — the classic (non-compact) render path has no
|
|
65
|
-
* row menu to merge into, and an editor there keeps drawing its own control.
|
|
66
|
-
*/
|
|
67
|
-
export const RowMenuContext = createContext<IRowMenuRegistration | undefined>(undefined);
|
|
68
|
-
|
|
69
|
-
/**
|
|
70
|
-
* The row-menu channel for the row this editor is inside, or `undefined` when
|
|
71
|
-
* there is no row menu to publish into.
|
|
72
|
-
*
|
|
73
|
-
* An editor that finds it should render no menu of its own; one that does not
|
|
74
|
-
* must keep rendering its own, or its actions become unreachable.
|
|
75
|
-
*/
|
|
76
|
-
export const useRowMenu = (): IRowMenuRegistration | undefined => useContext(RowMenuContext);
|
|
77
|
-
|
|
78
|
-
/**
|
|
79
|
-
* Publish `items` into `rowMenu` for as long as the calling editor is mounted.
|
|
80
|
-
* `rowMenu` is passed rather than read here so an editor can claim the channel
|
|
81
|
-
* and hide it from what it renders (see `TemplateField`).
|
|
82
|
-
*/
|
|
83
|
-
export const useRowMenuPublisher = (
|
|
84
|
-
rowMenu: IRowMenuRegistration | undefined,
|
|
85
|
-
key: string,
|
|
86
|
-
items: IReqoreDropdownItem[]
|
|
87
|
-
): void => {
|
|
88
|
-
const publisherId = useId();
|
|
89
|
-
|
|
90
|
-
useEffect(() => {
|
|
91
|
-
rowMenu?.registerRowMenuItems(publisherId, key, items);
|
|
92
|
-
}, [rowMenu, publisherId, key, items]);
|
|
93
|
-
|
|
94
|
-
useEffect(() => () => rowMenu?.unregisterRowMenuItems(publisherId), [rowMenu, publisherId]);
|
|
95
|
-
};
|
|
96
|
-
|
|
97
|
-
/**
|
|
98
|
-
* The row side of the channel: the registration to provide, and the items the
|
|
99
|
-
* row's ⋮ should list.
|
|
100
|
-
*/
|
|
101
|
-
export const useRowMenuRegistry = (): {
|
|
102
|
-
rowMenu: IRowMenuRegistration;
|
|
103
|
-
items: IReqoreDropdownItem[];
|
|
104
|
-
} => {
|
|
105
|
-
// Which publishers are offering which item SET — the only state, so only a
|
|
106
|
-
// change of set re-renders the row.
|
|
107
|
-
const [keys, setKeys] = useState<Record<string, string>>({});
|
|
108
|
-
// Each publisher's items from its latest render, read at click time.
|
|
109
|
-
const latest = useRef<Record<string, IReqoreDropdownItem[]>>({});
|
|
110
|
-
|
|
111
|
-
const registerRowMenuItems = useCallback(
|
|
112
|
-
(publisherId: string, key: string, items: IReqoreDropdownItem[]) => {
|
|
113
|
-
latest.current[publisherId] = items;
|
|
114
|
-
setKeys((previous) =>
|
|
115
|
-
previous[publisherId] === key ? previous : { ...previous, [publisherId]: key }
|
|
116
|
-
);
|
|
117
|
-
},
|
|
118
|
-
[]
|
|
119
|
-
);
|
|
120
|
-
|
|
121
|
-
const unregisterRowMenuItems = useCallback((publisherId: string) => {
|
|
122
|
-
delete latest.current[publisherId];
|
|
123
|
-
setKeys((previous) => {
|
|
124
|
-
if (!(publisherId in previous)) {
|
|
125
|
-
return previous;
|
|
126
|
-
}
|
|
127
|
-
const next = { ...previous };
|
|
128
|
-
delete next[publisherId];
|
|
129
|
-
return next;
|
|
130
|
-
});
|
|
131
|
-
}, []);
|
|
132
|
-
|
|
133
|
-
const rowMenu = useMemo(
|
|
134
|
-
() => ({ registerRowMenuItems, unregisterRowMenuItems }),
|
|
135
|
-
[registerRowMenuItems, unregisterRowMenuItems]
|
|
136
|
-
);
|
|
137
|
-
|
|
138
|
-
const items = useMemo(
|
|
139
|
-
() =>
|
|
140
|
-
Object.keys(keys).flatMap((publisherId) =>
|
|
141
|
-
(latest.current[publisherId] ?? []).map((item, index) =>
|
|
142
|
-
item.onClick
|
|
143
|
-
? {
|
|
144
|
-
...item,
|
|
145
|
-
// Same key, same item set, so the index still names this item;
|
|
146
|
-
// the handler is whatever the publisher rendered last.
|
|
147
|
-
onClick: ((...args: unknown[]) =>
|
|
148
|
-
(latest.current[publisherId]?.[index]?.onClick as
|
|
149
|
-
| ((...clickArgs: unknown[]) => unknown)
|
|
150
|
-
| undefined)?.(...args)) as IReqoreDropdownItem['onClick'],
|
|
151
|
-
}
|
|
152
|
-
: item
|
|
153
|
-
)
|
|
154
|
-
),
|
|
155
|
-
[keys]
|
|
156
|
-
);
|
|
157
|
-
|
|
158
|
-
return { rowMenu, items };
|
|
159
|
-
};
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { createContext } from 'react';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* "The row you are in has just been opened, and the control you are is the one
|
|
5
|
-
* it offers — so show the choices."
|
|
6
|
-
*
|
|
7
|
-
* A compact row is read-first: collapsed, it prints the value; clicked, it
|
|
8
|
-
* mounts the editor. For a PICKER the editor is a closed trigger printing the
|
|
9
|
-
* same value the read row had just printed, so the row opened and nothing on
|
|
10
|
-
* screen changed — the author had to click a second time to reach the list.
|
|
11
|
-
* Read-first is the collapsed row's job; it must not be the answer twice.
|
|
12
|
-
*
|
|
13
|
-
* The row decides, because only the row knows both things that matter: that the
|
|
14
|
-
* AUTHOR opened it (a row the form opens to show a value must not throw a list
|
|
15
|
-
* over it) and WHICH control it offers (`findRowFocusTarget` — the same scan
|
|
16
|
-
* that hands over the caret). The control obeys, because only the control knows
|
|
17
|
-
* how it opens.
|
|
18
|
-
*
|
|
19
|
-
* A one-shot pulse rather than a standing flag: it is `true` for exactly the
|
|
20
|
-
* commit in which the editor acts on it, and false again afterwards, so an
|
|
21
|
-
* editor that remounts later — a picker whose catalogue reloaded, after the
|
|
22
|
-
* author had closed it — does not reopen itself off a stale instruction.
|
|
23
|
-
*
|
|
24
|
-
* Exported so a host's own editor can obey it too: read it with
|
|
25
|
-
* `useContext(RowOpenPickerContext)` and open on the rising edge.
|
|
26
|
-
*/
|
|
27
|
-
export const RowOpenPickerContext = createContext<boolean>(false);
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
// Copyright 2026 Qore Technologies, s.r.o.
|
|
2
|
-
/**
|
|
3
|
-
* Which options offer the per-type choices ("Integer", "Text", "Hash", …) in
|
|
4
|
-
* the row's menu.
|
|
5
|
-
*
|
|
6
|
-
* A field that pins no concrete type has to give the author some way to say
|
|
7
|
-
* what kind of value they mean, and the row menu is where that lives — the
|
|
8
|
-
* alternative, a standalone *"Please select data type"* control, replaces a
|
|
9
|
-
* typable field with a pick-only one.
|
|
10
|
-
*
|
|
11
|
-
* The rule was `ui_type === 'any'`, which is one of the three ways a schema
|
|
12
|
-
* says "untyped", so the choices went missing on the other two:
|
|
13
|
-
*
|
|
14
|
-
* - **`type: 'auto'` with no `ui_type` at all.** This is how the server
|
|
15
|
-
* declares an assertion's Expected Value, so that field never offered them.
|
|
16
|
-
* They appeared only inside an expression, where the OPERAND's schema does
|
|
17
|
-
* say `ui_type: 'any'` — so the same option offered them in the Visual view
|
|
18
|
-
* and not in the Text view, which reads as the menu losing items.
|
|
19
|
-
* - **A host's own untyped editor.** The IDE renders Expected Value through
|
|
20
|
-
* `test-reference`, a `ui_type` reqraft knows nothing about; the field is no
|
|
21
|
-
* less untyped for having a custom editor.
|
|
22
|
-
*
|
|
23
|
-
* `ui_type` is asked FIRST and on its own: a schema that names a concrete
|
|
24
|
-
* editor (`ui_type: 'string'`) has pinned the field even if its storage `type`
|
|
25
|
-
* is still `auto`.
|
|
26
|
-
*/
|
|
27
|
-
import type { TQorusFormFieldSchema } from '@qoretechnologies/ts-toolkit';
|
|
28
|
-
import { firstDeclaredType, UNTYPED_OPTION_TYPES } from '../../../helpers/optionUiTypes';
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
* The spellings that mean "no concrete type" wherever they appear.
|
|
32
|
-
*
|
|
33
|
-
* Re-exported from the type vocabulary in `helpers/optionUiTypes`, which is
|
|
34
|
-
* where it now lives so non-component code can ask the same question.
|
|
35
|
-
*/
|
|
36
|
-
export const BuiltInAnyLikeTypes: readonly string[] = UNTYPED_OPTION_TYPES;
|
|
37
|
-
|
|
38
|
-
/**
|
|
39
|
-
* Does this option leave its type up to the author?
|
|
40
|
-
*
|
|
41
|
-
* @param option the option's schema entry
|
|
42
|
-
* @param extraUiTypes host `ui_type` names that are untyped editors of their
|
|
43
|
-
* own — see `FormEngine`'s `anyLikeUiTypes`
|
|
44
|
-
*/
|
|
45
|
-
export const offersTypeChoices = (
|
|
46
|
-
option: TQorusFormFieldSchema | undefined,
|
|
47
|
-
extraUiTypes?: string[]
|
|
48
|
-
): boolean => {
|
|
49
|
-
if (!option) {
|
|
50
|
-
return false;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
const uiType: string | undefined = option.ui_type;
|
|
54
|
-
|
|
55
|
-
if (uiType) {
|
|
56
|
-
return BuiltInAnyLikeTypes.includes(uiType) || !!extraUiTypes?.includes(uiType);
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
// No `ui_type`: the storage type is the only thing that can pin the field,
|
|
60
|
-
// read as the field is rendered (`firstDeclaredType`).
|
|
61
|
-
const type = firstDeclaredType(option.type);
|
|
62
|
-
return type !== undefined && BuiltInAnyLikeTypes.includes(type);
|
|
63
|
-
};
|