@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
|
@@ -10,6 +10,42 @@ var __assign = (this && this.__assign) || function () {
|
|
|
10
10
|
};
|
|
11
11
|
return __assign.apply(this, arguments);
|
|
12
12
|
};
|
|
13
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
14
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
15
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
16
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
17
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
18
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
19
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
20
|
+
});
|
|
21
|
+
};
|
|
22
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
23
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
24
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
25
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
26
|
+
function step(op) {
|
|
27
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
28
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
29
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
30
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
31
|
+
switch (op[0]) {
|
|
32
|
+
case 0: case 1: t = op; break;
|
|
33
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
34
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
35
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
36
|
+
default:
|
|
37
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
38
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
39
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
40
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
41
|
+
if (t[2]) _.ops.pop();
|
|
42
|
+
_.trys.pop(); continue;
|
|
43
|
+
}
|
|
44
|
+
op = body.call(thisArg, _);
|
|
45
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
46
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
47
|
+
}
|
|
48
|
+
};
|
|
13
49
|
var __rest = (this && this.__rest) || function (s, e) {
|
|
14
50
|
var t = {};
|
|
15
51
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
@@ -21,6 +57,15 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
21
57
|
}
|
|
22
58
|
return t;
|
|
23
59
|
};
|
|
60
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
61
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
62
|
+
if (ar || !(i in from)) {
|
|
63
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
64
|
+
ar[i] = from[i];
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
68
|
+
};
|
|
24
69
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
70
|
exports.RichTextFormField = exports.getChipTooltipDescriptions = void 0;
|
|
26
71
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
@@ -28,14 +73,45 @@ var RichTextEditor_1 = require("@qoretechnologies/reqore/dist/components/RichTex
|
|
|
28
73
|
var lodash_1 = require("lodash");
|
|
29
74
|
var react_1 = require("react");
|
|
30
75
|
var react_use_1 = require("react-use");
|
|
76
|
+
var slate_1 = require("slate");
|
|
31
77
|
var slate_react_1 = require("slate-react");
|
|
32
78
|
var emittedValues_1 = require("../emittedValues");
|
|
79
|
+
var pendingEdit_1 = require("../pendingEdit");
|
|
80
|
+
var descriptionTooltip_1 = require("../../../../helpers/descriptionTooltip");
|
|
81
|
+
var typeSentenceForm_1 = require("../../typeSentenceForm");
|
|
33
82
|
var choiceChip_1 = require("../../../../helpers/choiceChip");
|
|
34
83
|
var singleLineString_1 = require("../../../../helpers/singleLineString");
|
|
35
|
-
var templateItems_1 = require("../../../../helpers/templateItems");
|
|
36
84
|
var templateText_1 = require("../../../../helpers/templateText");
|
|
37
85
|
var templates_1 = require("../../../../helpers/templates");
|
|
38
|
-
var
|
|
86
|
+
var useTemplateTags_1 = require("./useTemplateTags");
|
|
87
|
+
var CompletionMenu_1 = require("../../../smartEditor/CompletionMenu");
|
|
88
|
+
var helpers_1 = require("../../../smartEditor/helpers");
|
|
89
|
+
var noDescription_1 = require("../../../../helpers/noDescription");
|
|
90
|
+
var referenceNames_1 = require("../template/referenceNames");
|
|
91
|
+
var templateCompletions_1 = require("../../../smartEditor/templateCompletions");
|
|
92
|
+
var templateTree_1 = require("../../../../helpers/templateTree");
|
|
93
|
+
var templateCatalogue_1 = require("../../../../helpers/templateCatalogue");
|
|
94
|
+
var templateCatalogueContext_1 = require("../../../../helpers/templateCatalogueContext");
|
|
95
|
+
var typedReferences_1 = require("../../../smartEditor/typedReferences");
|
|
96
|
+
var useCoarsePointer_1 = require("../../../../hooks/useCoarsePointer");
|
|
97
|
+
var useLspAutocomplete_1 = require("../../../smartEditor/useLspAutocomplete");
|
|
98
|
+
var useTabCameIn_1 = require("../../../smartEditor/useTabCameIn");
|
|
99
|
+
/** What opens the field's template list as it is typed: a template begins with `$`. */
|
|
100
|
+
/* A `$` asks for templates; a `:` or `.` in a reference being written goes on to what is in its context, state or
|
|
101
|
+
record (qorus#646): asked anywhere else, nothing is offered (`offerTemplates`). */
|
|
102
|
+
var TEMPLATE_TRIGGERS = new Set(['$', ':', '.']);
|
|
103
|
+
/* What the list says where a context is written that nothing is listed in. One function for the editor's life:
|
|
104
|
+
the completion request is remade when it changes, and a remade request drops the one waiting to be sent. */
|
|
105
|
+
var unlistedContextMessageAt = function (plainText, offset) {
|
|
106
|
+
return (0, templateCompletions_1.unlistedContextMessage)(plainText.slice(0, offset));
|
|
107
|
+
};
|
|
108
|
+
/**
|
|
109
|
+
* A reference being typed at the end of a text: a `$` and the template after it (`$data:receive_order.`), or an
|
|
110
|
+
* `@` and the record field after it (`@po`) - an `@` that starts a word, not one in an email address.
|
|
111
|
+
*/
|
|
112
|
+
var REFERENCE_BEING_TYPED = /(?:^|[^\p{L}\p{N}_.])([$@][\p{L}\p{M}\p{N}_.:{}[\]*-]*)$/u;
|
|
113
|
+
/** Distinguishes the completion lists of the fields on a page, for each field's `aria-controls`. */
|
|
114
|
+
var textCompletionMenuCounter = 0;
|
|
39
115
|
/**
|
|
40
116
|
* What each offered template value is FOR, keyed by the value itself.
|
|
41
117
|
*
|
|
@@ -72,24 +148,55 @@ var getChipTooltipDescriptions = function (templates) {
|
|
|
72
148
|
return out;
|
|
73
149
|
};
|
|
74
150
|
exports.getChipTooltipDescriptions = getChipTooltipDescriptions;
|
|
151
|
+
/* The chip references a document holds, in order, as one comparable string. Two documents that stand for
|
|
152
|
+
the same text but chip different references differ here; two that chip the same references do not — so a
|
|
153
|
+
re-parse that recognises nothing new is not taken for a change (which would move the cursor). */
|
|
154
|
+
var chipValuesOf = function (nodes) {
|
|
155
|
+
return JSON.stringify((nodes !== null && nodes !== void 0 ? nodes : []).flatMap(function (paragraph) {
|
|
156
|
+
var _a;
|
|
157
|
+
return ((_a = paragraph === null || paragraph === void 0 ? void 0 : paragraph.children) !== null && _a !== void 0 ? _a : [])
|
|
158
|
+
.filter(function (node) { return (node === null || node === void 0 ? void 0 : node.type) === 'tag'; })
|
|
159
|
+
.map(function (node) { var _a; return String((_a = node === null || node === void 0 ? void 0 : node.value) !== null && _a !== void 0 ? _a : ''); });
|
|
160
|
+
}));
|
|
161
|
+
};
|
|
75
162
|
exports.RichTextFormField = (0, react_1.memo)(function (_a) {
|
|
76
163
|
var _b, _c;
|
|
77
|
-
var value = _a.value, onChange = _a.onChange, allowTemplates = _a.allowTemplates, templates = _a.templates, _d = _a.valueFormat, valueFormat = _d === void 0 ? 'richtext' : _d, singleLine = _a.singleLine, templateToken = _a.templateToken, allowed_values = _a.allowed_values, choiceChip = _a.choiceChip, rest = __rest(_a, ["value", "onChange", "allowTemplates", "templates", "valueFormat", "singleLine", "templateToken", "allowed_values", "choiceChip"]);
|
|
164
|
+
var value = _a.value, onChange = _a.onChange, allowTemplates = _a.allowTemplates, templates = _a.templates, ownCatalogue = _a.templateCatalogue, namingTemplates = _a.namingTemplates, _d = _a.valueFormat, valueFormat = _d === void 0 ? 'richtext' : _d, singleLine = _a.singleLine, templateToken = _a.templateToken, allowed_values = _a.allowed_values, choiceChip = _a.choiceChip, wholeRecords = _a.wholeRecords, rest = __rest(_a, ["value", "onChange", "allowTemplates", "templates", "templateCatalogue", "namingTemplates", "valueFormat", "singleLine", "templateToken", "allowed_values", "choiceChip", "wholeRecords"]);
|
|
78
165
|
var isText = valueFormat === 'text';
|
|
79
|
-
|
|
80
|
-
|
|
166
|
+
/** What chips are named from: the whole catalogue, not only what is offered (see the prop). */
|
|
167
|
+
var naming = namingTemplates !== null && namingTemplates !== void 0 ? namingTemplates : templates;
|
|
168
|
+
// the catalogue, as what follows it is keyed on: written out once a render - it is the whole catalogue
|
|
169
|
+
var namingKey = JSON.stringify(naming);
|
|
170
|
+
/* The Slate editor behind Reqore's: the two choice-chip actions below rewrite the document in place,
|
|
171
|
+
which the editor's props cannot, and the completion list reads and edits the text through it. */
|
|
81
172
|
var editorRef = (0, react_1.useRef)(null);
|
|
82
173
|
var chipBehavior = __assign(__assign({}, choiceChip_1.DEFAULT_CHOICE_CHIP_BEHAVIOR), choiceChip);
|
|
174
|
+
/* The document a rich-text value stands for. Rich text the server holds is its string type, so a value
|
|
175
|
+
arrives as a string as often as a document - a saved `$local:name`, or text - and a string handed to
|
|
176
|
+
the editor as its document was drawn as raw text, each reference spelled out rather than its chip. It
|
|
177
|
+
is read as text with references, as the `text` format reads it; until it is edited, nothing is sent
|
|
178
|
+
back, so a string held stays a string. (A field mounted through an untyped first render was handed
|
|
179
|
+
the string in the `text` format, and kept the chips it drew then, by accident: that first render is
|
|
180
|
+
gone - see `resolveAutoFieldTypes`.) */
|
|
181
|
+
var documentOf = function (held) {
|
|
182
|
+
return typeof held === 'string' ? (0, templateText_1.templateTextToNodes)(held, naming, templateToken) : held;
|
|
183
|
+
};
|
|
184
|
+
/** The same document: a chip read from a string carries `metadata: undefined`, which the editor's own
|
|
185
|
+
* copy of it may leave out. */
|
|
186
|
+
var sameDocument = function (a, b) {
|
|
187
|
+
return (0, lodash_1.isEqual)(a, b) || JSON.stringify(a) === JSON.stringify(b);
|
|
188
|
+
};
|
|
83
189
|
/* The document the editor shows for a value: a choice by its chip, a text
|
|
84
|
-
with its references as chips
|
|
190
|
+
with its references as chips (a string held in rich text read the same way,
|
|
191
|
+
see `documentOf`), a document as it is. */
|
|
85
192
|
var toLocal = function (next) {
|
|
86
193
|
if (isText) {
|
|
87
194
|
var text = String(next !== null && next !== void 0 ? next : '');
|
|
88
195
|
var choice_1 = (0, choiceChip_1.choiceForValue)(text, allowed_values);
|
|
89
|
-
return choice_1 ? (0, choiceChip_1.choiceToNodes)(choice_1) : (0, templateText_1.templateTextToNodes)(text,
|
|
196
|
+
return choice_1 ? (0, choiceChip_1.choiceToNodes)(choice_1) : (0, templateText_1.templateTextToNodes)(text, naming, templateToken);
|
|
90
197
|
}
|
|
91
198
|
var choice = (0, choiceChip_1.choiceForValue)(next, allowed_values);
|
|
92
|
-
return choice ? (0, choiceChip_1.choiceToNodes)(choice) : next;
|
|
199
|
+
return choice ? (0, choiceChip_1.choiceToNodes)(choice) : documentOf(next);
|
|
93
200
|
};
|
|
94
201
|
var _e = (0, react_1.useState)(function () { return toLocal(value); }), localValue = _e[0], setLocalValue = _e[1];
|
|
95
202
|
/* What a value stands for: the choice's value when the value is that choice
|
|
@@ -113,10 +220,19 @@ exports.RichTextFormField = (0, react_1.memo)(function (_a) {
|
|
|
113
220
|
while the next keys are typed, and rebuilding the document from it threw
|
|
114
221
|
them away. See `EmittedValues`. */
|
|
115
222
|
var emitted = (0, emittedValues_1.useEmittedValues)(lodash_1.isEqual);
|
|
223
|
+
var pendingEdit = (0, pendingEdit_1.usePendingEdit)(function (edit) {
|
|
224
|
+
emitted.record(edit);
|
|
225
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(edit);
|
|
226
|
+
});
|
|
227
|
+
var setPending = function (next) {
|
|
228
|
+
return next ? pendingEdit.hold(next.edit) : pendingEdit.release();
|
|
229
|
+
};
|
|
116
230
|
(0, react_1.useEffect)(function () {
|
|
117
231
|
if (emitted.isEcho(isText ? String(value !== null && value !== void 0 ? value : '') : value)) {
|
|
118
232
|
return;
|
|
119
233
|
}
|
|
234
|
+
// the parent has a value of its own: what was typed before it is no edit to send any more
|
|
235
|
+
pendingEdit.release();
|
|
120
236
|
if (isText) {
|
|
121
237
|
var text = String(value !== null && value !== void 0 ? value : '');
|
|
122
238
|
if (text !== lastTextRef.current) {
|
|
@@ -125,9 +241,9 @@ exports.RichTextFormField = (0, react_1.memo)(function (_a) {
|
|
|
125
241
|
}
|
|
126
242
|
return;
|
|
127
243
|
}
|
|
128
|
-
// Compared as what each stands for: a lone choice chip IS the value it
|
|
129
|
-
//
|
|
130
|
-
if (!(0, lodash_1.isEqual)(standsFor(value), standsFor(localValue))) {
|
|
244
|
+
// Compared as what each stands for: a lone choice chip IS the value it draws, and the document a string
|
|
245
|
+
// held stands for is that string - so the value coming back is not a change to either.
|
|
246
|
+
if (!(0, lodash_1.isEqual)(standsFor(value), standsFor(localValue)) && !sameDocument(documentOf(value), localValue)) {
|
|
131
247
|
setLocalValue(toLocal(value));
|
|
132
248
|
}
|
|
133
249
|
}, [JSON.stringify(value)]);
|
|
@@ -143,23 +259,54 @@ exports.RichTextFormField = (0, react_1.memo)(function (_a) {
|
|
|
143
259
|
}
|
|
144
260
|
var shown = isText ? (0, templateText_1.templateNodesToText)(localValue) : ((_a = (0, choiceChip_1.choiceValueOfNodes)(localValue)) !== null && _a !== void 0 ? _a : localValue);
|
|
145
261
|
var stored = isText ? String(value !== null && value !== void 0 ? value : '') : value;
|
|
146
|
-
|
|
262
|
+
// as it is: the same value, or the document a string held in rich text stands for (`documentOf`)
|
|
263
|
+
var showsStored = (0, lodash_1.isEqual)(shown, stored) || (!isText && sameDocument(localValue, documentOf(stored)));
|
|
264
|
+
if (showsStored && (0, choiceChip_1.choiceForValue)(stored, allowed_values)) {
|
|
147
265
|
setLocalValue(toLocal(stored));
|
|
148
266
|
}
|
|
149
267
|
}, [choiceKey]);
|
|
268
|
+
/* A reference in a string is drawn as a chip only once something can name it: the field's own grammar
|
|
269
|
+
(`templateToken`), or — for a reference neither grammar matches, a DPQL `@create` say — the catalogue
|
|
270
|
+
that NAMES it. Both can arrive AFTER the first render: the catalogue is fetched, and the effect above
|
|
271
|
+
rebuilds the document only when the stored string changes. So a preset reference the catalogue had not
|
|
272
|
+
yet named stayed raw text until the author re-picked it (qorus#646). Re-chip the string in hand when
|
|
273
|
+
what recognises its references changes — text mode only, and only when a chip is actually gained or
|
|
274
|
+
lost, so a document being edited is left exactly as it is while nothing new is recognised. A choice
|
|
275
|
+
chip is the choices' to draw (see above), so a document that is one is left alone. */
|
|
276
|
+
(0, react_1.useEffect)(function () {
|
|
277
|
+
if (!isText) {
|
|
278
|
+
return;
|
|
279
|
+
}
|
|
280
|
+
var rebuilt = (0, templateText_1.templateTextToNodes)(lastTextRef.current, naming, templateToken);
|
|
281
|
+
setLocalValue(function (current) {
|
|
282
|
+
return (0, choiceChip_1.choiceValueOfNodes)(current) !== undefined || chipValuesOf(current) === chipValuesOf(rebuilt) ?
|
|
283
|
+
current
|
|
284
|
+
: rebuilt;
|
|
285
|
+
});
|
|
286
|
+
}, [namingKey, String(templateToken)]);
|
|
287
|
+
/** What the host will hold once the emits in flight come back: what an edit is a change from. */
|
|
288
|
+
var settled = function () { return emitted.settled(isText ? String(value !== null && value !== void 0 ? value : '') : value); };
|
|
289
|
+
/** A rich-text document as it is sent: one that is nothing but a choice chip, as the choice's value. */
|
|
290
|
+
var emittedFormOf = function (document) { var _a; return ((_a = (0, choiceChip_1.choiceValueOfNodes)(document)) !== null && _a !== void 0 ? _a : document); };
|
|
291
|
+
/** Whether a rich-text document is what the host will hold already: the same choice, or the document the
|
|
292
|
+
* string it holds stands for. */
|
|
293
|
+
var isUnchanged = function (document) {
|
|
294
|
+
return (0, lodash_1.isEqual)(standsFor(emittedFormOf(document)), standsFor(settled())) ||
|
|
295
|
+
sameDocument(document, documentOf(settled()));
|
|
296
|
+
};
|
|
150
297
|
(0, react_use_1.useDebounce)(function () {
|
|
151
|
-
|
|
298
|
+
pendingEdit.release();
|
|
152
299
|
if (isText) {
|
|
153
|
-
if (lastTextRef.current !== String(value !== null && value !== void 0 ? value : '')) {
|
|
300
|
+
if (lastTextRef.current !== emitted.settled(String(value !== null && value !== void 0 ? value : ''))) {
|
|
154
301
|
emitted.record(lastTextRef.current);
|
|
155
302
|
onChange === null || onChange === void 0 ? void 0 : onChange(lastTextRef.current);
|
|
156
303
|
}
|
|
157
304
|
return;
|
|
158
305
|
}
|
|
159
|
-
// A document that is nothing but one choice chip is
|
|
160
|
-
//
|
|
161
|
-
|
|
162
|
-
|
|
306
|
+
// A document that is nothing but one choice chip is sent as the choice's value — what was stored and
|
|
307
|
+
// what the server resolves — and the document a string held stands for is that string, not an edit of it.
|
|
308
|
+
if (!isUnchanged(localValue)) {
|
|
309
|
+
var next = emittedFormOf(localValue);
|
|
163
310
|
emitted.record(next);
|
|
164
311
|
onChange === null || onChange === void 0 ? void 0 : onChange(next);
|
|
165
312
|
}
|
|
@@ -170,6 +317,8 @@ exports.RichTextFormField = (0, react_1.memo)(function (_a) {
|
|
|
170
317
|
// the typed value never reaches the form. react-use runs the latest
|
|
171
318
|
// closure from a ref, so the fresh `onChange` is used either way.
|
|
172
319
|
[localValue]);
|
|
320
|
+
/** The text as an edit to send, or nothing where it is what the host will hold. */
|
|
321
|
+
var changedFrom = function (text) { return (text === settled() ? undefined : { edit: text }); };
|
|
173
322
|
var handleChange = function (val) {
|
|
174
323
|
if (isText) {
|
|
175
324
|
var text = (0, templateText_1.templateNodesToText)(val);
|
|
@@ -177,25 +326,37 @@ exports.RichTextFormField = (0, react_1.memo)(function (_a) {
|
|
|
177
326
|
// stopped below. Flattened text is shown as the one line it now is.
|
|
178
327
|
if (singleLine && (0, singleLineString_1.hasLineBreak)(text)) {
|
|
179
328
|
lastTextRef.current = (0, singleLineString_1.flattenToSingleLine)(text);
|
|
329
|
+
setPending(changedFrom(lastTextRef.current));
|
|
180
330
|
setLocalValue(toLocal(lastTextRef.current));
|
|
181
331
|
return;
|
|
182
332
|
}
|
|
183
333
|
lastTextRef.current = text;
|
|
334
|
+
setPending(changedFrom(text));
|
|
184
335
|
setLocalValue(val);
|
|
185
336
|
return;
|
|
186
337
|
}
|
|
187
338
|
if (JSON.stringify(val) === '[{"type":"paragraph","children":[{"text":""}]}]') {
|
|
339
|
+
// the empty text a held '' stands for is no edit of it (a click into the field reports it)
|
|
340
|
+
if (sameDocument(val, documentOf(settled()))) {
|
|
341
|
+
setPending(undefined);
|
|
342
|
+
setLocalValue(val);
|
|
343
|
+
return;
|
|
344
|
+
}
|
|
345
|
+
setPending((0, lodash_1.isEqual)(undefined, settled()) ? undefined : { edit: undefined });
|
|
188
346
|
setLocalValue(undefined);
|
|
189
347
|
return;
|
|
190
348
|
}
|
|
349
|
+
setPending(isUnchanged(val) ? undefined : { edit: emittedFormOf(val) });
|
|
191
350
|
setLocalValue(val);
|
|
192
351
|
};
|
|
193
|
-
//
|
|
194
|
-
//
|
|
195
|
-
var
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
352
|
+
// A chip's hover draws its description as the picker rows draw the same
|
|
353
|
+
// string, and opens on a tap where there is no hover.
|
|
354
|
+
var descriptions = (0, descriptionTooltip_1.useDescriptionTooltips)();
|
|
355
|
+
// what the host knows of references its catalogue does not list (`referenceNames`)
|
|
356
|
+
var referenceNames = (0, referenceNames_1.useTemplateReferenceNames)();
|
|
357
|
+
// a template's hover says its type, in words
|
|
358
|
+
var getTypeSentenceForm = (0, typeSentenceForm_1.useTypeSentenceForm)();
|
|
359
|
+
var descriptionByValue = (0, react_1.useMemo)(function () { return (0, exports.getChipTooltipDescriptions)(naming); }, [namingKey]);
|
|
199
360
|
/* Opens a choice chip into its value as text and puts the cursor there.
|
|
200
361
|
A click on the chip — a non-editable node — need not have given the
|
|
201
362
|
editor focus, so focus is asked of Slate, which places the DOM caret where
|
|
@@ -229,8 +390,190 @@ exports.RichTextFormField = (0, react_1.memo)(function (_a) {
|
|
|
229
390
|
// Not mounted in a document — nothing to focus.
|
|
230
391
|
}
|
|
231
392
|
}, [localValue]);
|
|
393
|
+
// Read-only: ReqoreRichTextEditor makes the Slate surface non-editable (and
|
|
394
|
+
// disables tag click/remove) when `readOnly` is set. Honour the field-level
|
|
395
|
+
// flags — the IDE Options model passes `readonly`, the compact form passes
|
|
396
|
+
// `readOnly` + `disabled` — so a read-only form renders the formatted content
|
|
397
|
+
// rather than an editable box.
|
|
398
|
+
var readOnly = !!(rest.readOnly ||
|
|
399
|
+
rest.readonly ||
|
|
400
|
+
rest.disabled);
|
|
401
|
+
/* The field's templates, in one picker (qorus#646, David's decisions): browsed as they nest - a click, a tap or
|
|
402
|
+
Tab into the text opens it at the caret, a click on a chip opens it at the chip's group to replace it - and
|
|
403
|
+
reached by what is typed after a `$`, in the rows the same popover shows then (a group's row opens the picker
|
|
404
|
+
at its members). */
|
|
405
|
+
// the field's own catalogue, or that of the fields where it is (`TemplateCatalogueProvider`)
|
|
406
|
+
var hostCatalogue = (0, templateCatalogueContext_1.useTemplateCatalogue)();
|
|
407
|
+
var templateCatalogue = ownCatalogue !== null && ownCatalogue !== void 0 ? ownCatalogue : hostCatalogue;
|
|
408
|
+
// with the field's catalogue's contexts, where it has one: typed and picked alike
|
|
409
|
+
var templateRoots = (0, react_1.useMemo)(function () {
|
|
410
|
+
return allowTemplates !== false && !readOnly ?
|
|
411
|
+
(0, templateCatalogue_1.withTemplateCatalogue)((0, templateTree_1.templateTree)(templates, { wholeRecords: wholeRecords }), templateCatalogue, wholeRecords)
|
|
412
|
+
: [];
|
|
413
|
+
}, [allowTemplates, readOnly, templates, templateCatalogue, wholeRecords]);
|
|
414
|
+
// a lone group kept whole, for the picker to open only where nothing is added beside it (`openLoneGroup`)
|
|
415
|
+
var templateRootsKept = (0, react_1.useMemo)(function () {
|
|
416
|
+
return allowTemplates !== false && !readOnly ?
|
|
417
|
+
(0, templateCatalogue_1.withTemplateCatalogue)((0, templateTree_1.templateTree)(templates, { wholeRecords: wholeRecords, keepLoneGroup: true }), templateCatalogue, wholeRecords)
|
|
418
|
+
: [];
|
|
419
|
+
}, [allowTemplates, readOnly, templates, templateCatalogue, wholeRecords]);
|
|
420
|
+
var pickerRoots = (0, react_1.useMemo)(function () { return (0, templateTree_1.openLoneGroup)((0, templateTree_1.withTemplateContexts)(templateRootsKept, wholeRecords)); }, [templateRootsKept, wholeRecords]);
|
|
421
|
+
var completionMenuId = (0, react_1.useMemo)(function () { return "completion-menu-text-".concat(++textCompletionMenuCounter); }, []);
|
|
422
|
+
// a template's type named in its row by the catalogue the surrounding form has, never its code
|
|
423
|
+
var typeLabel = (0, typeSentenceForm_1.useTypeLabel)();
|
|
424
|
+
/* The text as the field reads it: its whole references chips (`templateTextToNodes`), for a reference typed out
|
|
425
|
+
to be drawn as its chip when the field is left, or Enter or Tab takes it - as a picked one is, and as the DPQL
|
|
426
|
+
editor draws one (qorus#646, David: `$static:order.id` stayed text). One that names nothing the field is given
|
|
427
|
+
stays text. */
|
|
428
|
+
var typedConverter = (0, react_1.useMemo)(function () { return (__assign(__assign({}, helpers_1.defaultSlateConverter), { toSlateNodes: function (text) { return (0, templateText_1.templateTextToNodes)(text, naming, templateToken); } })); }, [naming, templateToken]);
|
|
429
|
+
var namesNothing = (0, react_1.useCallback)(function (reference) { return (0, templateTree_1.referenceNamesNothing)(templateRoots, reference); }, [templateRoots]);
|
|
430
|
+
var offerTemplates = (0, react_1.useCallback)(function (plainText, offset, typedInText) { return __awaiter(void 0, void 0, void 0, function () {
|
|
431
|
+
var typed, rows;
|
|
432
|
+
var _a;
|
|
433
|
+
return __generator(this, function (_b) {
|
|
434
|
+
typed = (_a = REFERENCE_BEING_TYPED.exec(typedInText !== null && typedInText !== void 0 ? typedInText : plainText.slice(0, offset))) === null || _a === void 0 ? void 0 : _a[1];
|
|
435
|
+
if (!typed)
|
|
436
|
+
return [2 /*return*/, []];
|
|
437
|
+
rows = (0, templateCompletions_1.templateSearchItems)(templateRoots, typed, typeLabel, wholeRecords);
|
|
438
|
+
/* a context written that nothing is listed in: the list says what to write next above Browse all
|
|
439
|
+
templates, which puts a working reference in its place (`noteAt`; qorus#646, David's review) */
|
|
440
|
+
return [2 /*return*/, __spreadArray(__spreadArray([], rows, true), [(0, templateCompletions_1.browseAllTemplatesItem)()], false)];
|
|
441
|
+
});
|
|
442
|
+
}); }, [templateRoots, typeLabel, wholeRecords]);
|
|
443
|
+
var autocomplete = (0, useLspAutocomplete_1.useLspAutocomplete)({
|
|
444
|
+
getCompletions: offerTemplates,
|
|
445
|
+
isReady: !readOnly && templateRoots.length > 0,
|
|
446
|
+
triggerCharacters: TEMPLATE_TRIGGERS,
|
|
447
|
+
converter: helpers_1.defaultSlateConverter,
|
|
448
|
+
inserter: templateCompletions_1.templateChipInserter,
|
|
449
|
+
// a context written that nothing is listed in: what to write next, the list held open
|
|
450
|
+
emptyMessage: unlistedContextMessageAt,
|
|
451
|
+
noteAt: unlistedContextMessageAt,
|
|
452
|
+
// Enter or Tab where nothing more is listed: what is written at the caret, a whole reference, is its chip
|
|
453
|
+
commitTyped: function (editor) {
|
|
454
|
+
var _a;
|
|
455
|
+
return (0, typedReferences_1.commitTypedReferences)(editor, typedConverter, namesNothing, (_a = editor.selection) === null || _a === void 0 ? void 0 : _a.anchor.path[0]);
|
|
456
|
+
},
|
|
457
|
+
});
|
|
458
|
+
var openBrowse = autocomplete.openBrowse, openAtCaret = autocomplete.openAtCaret;
|
|
459
|
+
var coarse = (0, useCoarsePointer_1.useCoarsePointer)();
|
|
460
|
+
var autocompleteRef = (0, react_1.useRef)(autocomplete);
|
|
461
|
+
autocompleteRef.current = autocomplete;
|
|
462
|
+
/* A click, a tap or Tab into the text opens the picker at the caret the page put there: not on a chip, which is
|
|
463
|
+
a control of its own, nor outside the text. */
|
|
464
|
+
var tabCameIn = (0, useTabCameIn_1.useTabCameIn)(function () {
|
|
465
|
+
var editor = editorRef.current;
|
|
466
|
+
return editor ? slate_react_1.ReactEditor.toDOMNode(editor, editor) : null;
|
|
467
|
+
});
|
|
468
|
+
var browseAtPageCaret = (0, react_1.useCallback)(function (target) {
|
|
469
|
+
var _a;
|
|
470
|
+
var editor = editorRef.current;
|
|
471
|
+
if (!templateRoots.length || readOnly || !editor)
|
|
472
|
+
return;
|
|
473
|
+
try {
|
|
474
|
+
var root = slate_react_1.ReactEditor.toDOMNode(editor, editor);
|
|
475
|
+
if (!(target instanceof Node) || !root.contains(target))
|
|
476
|
+
return;
|
|
477
|
+
if (target instanceof Element && target.closest('[data-slate-void="true"]'))
|
|
478
|
+
return;
|
|
479
|
+
var page = slate_react_1.ReactEditor.getWindow(editor).getSelection();
|
|
480
|
+
if (!page || page.rangeCount === 0 || !page.isCollapsed)
|
|
481
|
+
return;
|
|
482
|
+
var caret = slate_react_1.ReactEditor.toSlateRange(editor, page, { exactMatch: false, suppressThrow: true });
|
|
483
|
+
if (!caret)
|
|
484
|
+
return;
|
|
485
|
+
var box = page.getRangeAt(0).getBoundingClientRect();
|
|
486
|
+
// a caret in an empty line has no box of its own: the text's
|
|
487
|
+
var at = box.width || box.height ? box : root.getBoundingClientRect();
|
|
488
|
+
// in an empty text the arrows have nowhere else to go: they move through the picker
|
|
489
|
+
var empty = !helpers_1.defaultSlateConverter.fromSlateNodes(editor.children).trim();
|
|
490
|
+
/* A reference being written at the caret is completed where it is: what is listed of it, what to write
|
|
491
|
+
next and Browse all templates, to put a working one in its place - not the picker's top (qorus#646,
|
|
492
|
+
David's review: a click at the end of `$dynamic:` showed the picker's top silently). */
|
|
493
|
+
// what is typed in the text the caret is in: a chip before it is a value, not a reference being written
|
|
494
|
+
var leaf = slate_1.Editor.leaf(editor, caret.anchor)[0];
|
|
495
|
+
var textBefore = ((_a = leaf.text) !== null && _a !== void 0 ? _a : '').slice(0, caret.anchor.offset);
|
|
496
|
+
if (REFERENCE_BEING_TYPED.test(textBefore)) {
|
|
497
|
+
openAtCaret(editor, caret.anchor, { left: at.left, bottom: at.bottom });
|
|
498
|
+
return;
|
|
499
|
+
}
|
|
500
|
+
openBrowse(editor, { rect: { left: at.left, bottom: at.bottom }, caret: caret.anchor, arrows: empty });
|
|
501
|
+
}
|
|
502
|
+
catch (_b) {
|
|
503
|
+
// the editor is not drawn, or the page's caret is not in it: nothing opens
|
|
504
|
+
}
|
|
505
|
+
}, [templateRoots, readOnly, openBrowse, openAtCaret]);
|
|
506
|
+
/* A click on a template chip the catalogue lists opens the picker at the chip's group, its row the keyboard's,
|
|
507
|
+
and the pick takes its place; a second click puts it away. */
|
|
508
|
+
/* A text emptied where the author is writing (cleared, or its last character deleted) offers what an empty text
|
|
509
|
+
offers: the picker at its top, as a click in it opens it (Foxhoundn on qlip #425; David: the picker offers
|
|
510
|
+
every completion in every state). */
|
|
511
|
+
var writtenRef = (0, react_1.useRef)();
|
|
512
|
+
// the value the text is drawn with (`formattedValue`, below)
|
|
513
|
+
var drawnRef = (0, react_1.useRef)();
|
|
514
|
+
var openWhereEmptied = function (nodes) {
|
|
515
|
+
var text = '';
|
|
516
|
+
try {
|
|
517
|
+
text = helpers_1.defaultSlateConverter.fromSlateNodes(nodes);
|
|
518
|
+
}
|
|
519
|
+
catch (_a) {
|
|
520
|
+
return;
|
|
521
|
+
}
|
|
522
|
+
// what it held before: its last edit's, or the value it was drawn with
|
|
523
|
+
var before = writtenRef.current;
|
|
524
|
+
if (before === undefined) {
|
|
525
|
+
try {
|
|
526
|
+
before = helpers_1.defaultSlateConverter.fromSlateNodes(drawnRef.current);
|
|
527
|
+
}
|
|
528
|
+
catch (_b) {
|
|
529
|
+
before = '';
|
|
530
|
+
}
|
|
531
|
+
}
|
|
532
|
+
writtenRef.current = text;
|
|
533
|
+
var editor = editorRef.current;
|
|
534
|
+
if (!(before === null || before === void 0 ? void 0 : before.trim()) || text.trim() || !templateRoots.length || readOnly || !editor)
|
|
535
|
+
return;
|
|
536
|
+
try {
|
|
537
|
+
if (!slate_react_1.ReactEditor.isFocused(editor))
|
|
538
|
+
return;
|
|
539
|
+
var at = slate_react_1.ReactEditor.toDOMNode(editor, editor).getBoundingClientRect();
|
|
540
|
+
openBrowse(editor, {
|
|
541
|
+
rect: { left: at.left, bottom: at.bottom },
|
|
542
|
+
caret: slate_1.Editor.start(editor, []),
|
|
543
|
+
arrows: true,
|
|
544
|
+
});
|
|
545
|
+
}
|
|
546
|
+
catch (_c) {
|
|
547
|
+
// the editor is not drawn: nothing opens
|
|
548
|
+
}
|
|
549
|
+
};
|
|
550
|
+
var templateChipClick = (0, react_1.useCallback)(function (tag) {
|
|
551
|
+
var listed = templateRoots.length && typeof tag.value === 'string' ? (0, templateTree_1.templateNodeFor)(templateRoots, tag.value) : undefined;
|
|
552
|
+
if (!listed)
|
|
553
|
+
return {};
|
|
554
|
+
return __assign(__assign({}, (coarse ? { tooltip: undefined } : {})), { onClick: function (event) {
|
|
555
|
+
var editor = editorRef.current;
|
|
556
|
+
var current = autocompleteRef.current;
|
|
557
|
+
if (!editor)
|
|
558
|
+
return;
|
|
559
|
+
if (current.browse && current.isReplaceMode) {
|
|
560
|
+
current.close();
|
|
561
|
+
return;
|
|
562
|
+
}
|
|
563
|
+
var path = (0, choiceChip_1.pathOfNode)(editor, tag);
|
|
564
|
+
if (!path)
|
|
565
|
+
return;
|
|
566
|
+
var rect = event.currentTarget.getBoundingClientRect();
|
|
567
|
+
current.openBrowse(editor, {
|
|
568
|
+
rect: { left: rect.left, bottom: rect.bottom },
|
|
569
|
+
replacementPath: path,
|
|
570
|
+
levelId: listed.trailIds[listed.trailIds.length - 1],
|
|
571
|
+
selectedValue: tag.value,
|
|
572
|
+
});
|
|
573
|
+
} });
|
|
574
|
+
}, [templateRoots, coarse]);
|
|
232
575
|
var handleGetTagProps = (0, react_1.useCallback)(function (tag) {
|
|
233
|
-
var _a, _b, _c, _d, _e, _f;
|
|
576
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
234
577
|
var tagValue = (_a = tag.value) === null || _a === void 0 ? void 0 : _a.toString();
|
|
235
578
|
if (!tagValue) {
|
|
236
579
|
return {};
|
|
@@ -247,44 +590,47 @@ exports.RichTextFormField = (0, react_1.memo)(function (_a) {
|
|
|
247
590
|
description on hover. Read at render, so a catalogue that arrives
|
|
248
591
|
after the value still names it. */
|
|
249
592
|
if (isText && tagValue.startsWith('$')) {
|
|
250
|
-
var item = (0, templates_1.describeTemplateReference)(
|
|
593
|
+
var item = (0, templates_1.describeTemplateReference)(naming, tagValue).item;
|
|
251
594
|
var metadata = item === null || item === void 0 ? void 0 : item.metadata;
|
|
252
|
-
|
|
595
|
+
// a reference nothing names says so; one the host knows wears its name (`referenceStanding`)
|
|
596
|
+
var standing = (0, referenceNames_1.referenceStanding)(naming, tagValue, referenceNames);
|
|
597
|
+
var unlisted = standing.unlisted ? (0, referenceNames_1.unlistedReferenceChipProps)(referenceNames) : undefined;
|
|
598
|
+
return __assign(__assign(__assign(__assign({ icon: 'ExchangeDollarLine', leftIconProps: { image: metadata === null || metadata === void 0 ? void 0 : metadata.image }, label: (_e = standing.label) !== null && _e !== void 0 ? _e : (0, templateText_1.templateChipLabel)(naming, tagValue), tooltip: (_f = unlisted === null || unlisted === void 0 ? void 0 : unlisted.tooltip) !== null && _f !== void 0 ? _f : (0, templates_1.templateTooltip)(naming, tagValue, descriptions, getTypeSentenceForm, (0, referenceNames_1.hostSaysOf)(tagValue, referenceNames)) }, templates_1.REFERENCE_CHIP_PROPS), (0, templates_1.getTemplateTagStyle)(metadata)), (unlisted ? { intent: unlisted.intent, className: unlisted.className } : {})), templateChipClick(tag));
|
|
253
599
|
}
|
|
254
600
|
if (tagValue.startsWith('$')) {
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
601
|
+
// named as every view names it: where it is, then its name ("Receive order › Event type")
|
|
602
|
+
var listed = (0, templates_1.describeTemplateReference)(naming, tagValue).item;
|
|
603
|
+
return __assign(__assign(__assign(__assign(__assign({ icon: 'ExchangeDollarLine', leftIconProps: {
|
|
604
|
+
image: (_g = tag.metadata) === null || _g === void 0 ? void 0 : _g.image,
|
|
605
|
+
} }, (listed ?
|
|
606
|
+
{ label: (0, templateText_1.templateChipLabel)(naming, tagValue) }
|
|
607
|
+
: { labelKey: (_h = tag.metadata) === null || _h === void 0 ? void 0 : _h.displayName })), {
|
|
258
608
|
/* Hovering a chip says what the value IS, not how it is spelled.
|
|
259
609
|
Reqore otherwise falls back to the tag's own value, so a chip
|
|
260
610
|
reading "result" reported `$.result` on hover — the reference the
|
|
261
611
|
author already chose, restating the label in engine syntax instead
|
|
262
612
|
of telling them anything. The path stays discoverable in the
|
|
263
613
|
field's help and in the picker row for an unlabelled value. */
|
|
264
|
-
/* Drawn,
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
punctuation the row no longer prints. A drawn description travels
|
|
272
|
-
as the tooltip's `content` — the prop itself is `string |
|
|
273
|
-
IReqoreTooltip`, and only the object form takes a node. Without a
|
|
274
|
-
host renderer it stays the plain string it always was. */
|
|
275
|
-
tooltip: descriptionByValue[tagValue] ?
|
|
276
|
-
renderMarkdown ?
|
|
277
|
-
{
|
|
278
|
-
content: renderMarkdown({
|
|
279
|
-
value: descriptionByValue[tagValue],
|
|
280
|
-
compact: true,
|
|
281
|
-
}),
|
|
282
|
-
}
|
|
283
|
-
: descriptionByValue[tagValue]
|
|
284
|
-
: undefined }, (0, templates_1.getTemplateTagStyle)(tag.metadata));
|
|
614
|
+
/* Drawn, as the picker row draws the same string (`descriptionTooltip`):
|
|
615
|
+
left raw, it printed the punctuation the row does not. */
|
|
616
|
+
// what the value is, or why nothing says so (qorus#646)
|
|
617
|
+
tooltip: listed ?
|
|
618
|
+
// its whole path heads the card, as every view's hover of a listed template says it
|
|
619
|
+
(0, templates_1.templateTooltip)(naming, tagValue, descriptions, getTypeSentenceForm)
|
|
620
|
+
: (0, descriptionTooltip_1.descriptionTooltip)(descriptionByValue[tagValue] || noDescription_1.NO_VALUE_DESCRIPTION, descriptions) }), templates_1.REFERENCE_CHIP_PROPS), (0, templates_1.getTemplateTagStyle)(tag.metadata)), templateChipClick(tag));
|
|
285
621
|
}
|
|
286
622
|
return {};
|
|
287
|
-
}, [
|
|
623
|
+
}, [
|
|
624
|
+
descriptionByValue,
|
|
625
|
+
descriptions,
|
|
626
|
+
getTypeSentenceForm,
|
|
627
|
+
isText,
|
|
628
|
+
naming,
|
|
629
|
+
referenceNames,
|
|
630
|
+
chipBehavior.click,
|
|
631
|
+
openChoiceChip,
|
|
632
|
+
templateChipClick,
|
|
633
|
+
]);
|
|
288
634
|
/* Leaving the field: text that is exactly one of the choices becomes its
|
|
289
635
|
chip again, as the picker would have drawn it. Only here, never while
|
|
290
636
|
typing — a choice can be the start of a longer value, and a chip drawn
|
|
@@ -295,8 +641,12 @@ exports.RichTextFormField = (0, react_1.memo)(function (_a) {
|
|
|
295
641
|
if ((0, choiceChip_1.choiceForValue)(shown, allowed_values)) {
|
|
296
642
|
setLocalValue(toLocal(shown));
|
|
297
643
|
}
|
|
644
|
+
else if (isText && editorRef.current && !readOnly) {
|
|
645
|
+
// every reference typed out in full is drawn as its chip
|
|
646
|
+
(0, typedReferences_1.commitTypedReferences)(editorRef.current, typedConverter, namesNothing);
|
|
647
|
+
}
|
|
298
648
|
(_b = (_a = rest).onBlur) === null || _b === void 0 ? void 0 : _b.call(_a, event);
|
|
299
|
-
}, [isText, localValue, choiceKey, rest.onBlur]);
|
|
649
|
+
}, [isText, localValue, choiceKey, rest.onBlur, typedConverter, namesNothing, readOnly]);
|
|
300
650
|
var handleKeyDown = (0, react_1.useCallback)(function (event) {
|
|
301
651
|
var _a, _b;
|
|
302
652
|
if (isText && singleLine && event.key === 'Enter') {
|
|
@@ -320,51 +670,36 @@ exports.RichTextFormField = (0, react_1.memo)(function (_a) {
|
|
|
320
670
|
openChoiceChip,
|
|
321
671
|
rest.onKeyDown,
|
|
322
672
|
]);
|
|
323
|
-
var tags = (0, react_1.useMemo)(function () {
|
|
324
|
-
var _tags = {};
|
|
325
|
-
if ((0, lodash_1.size)(templates === null || templates === void 0 ? void 0 : templates.items) && allowTemplates) {
|
|
326
|
-
_tags.templates = {
|
|
327
|
-
icon: 'MoneyDollarBoxLine',
|
|
328
|
-
label: 'Templates',
|
|
329
|
-
flat: false,
|
|
330
|
-
description: 'Universal values that can be used in multiple places',
|
|
331
|
-
/* The in-editor list already nests everything under "Templates", so a
|
|
332
|
-
lone category makes the author drill through TWO headers to reach
|
|
333
|
-
the only values on offer. Hoist it. */
|
|
334
|
-
/* Drawn here, at the hand-off to Reqore. A description is prose written
|
|
335
|
-
in the same markdown as every other description this package shows,
|
|
336
|
-
and printing its punctuation at the reader was the last surface still
|
|
337
|
-
doing that. Never made further up: the list is a `JSON.stringify`
|
|
338
|
-
memo key in `TemplateField`. */
|
|
339
|
-
items: (0, templateItems_1.renderTemplateItemDescriptions)((0, templateItems_1.templateItemsToShow)(templates === null || templates === void 0 ? void 0 : templates.items), renderMarkdown),
|
|
340
|
-
};
|
|
341
|
-
}
|
|
342
|
-
return _tags;
|
|
343
|
-
}, [allowTemplates, templates, renderMarkdown]);
|
|
344
673
|
var formattedValue = typeof localValue !== 'object' ? [{ type: 'paragraph', children: [{ text: String(localValue !== null && localValue !== void 0 ? localValue : '') }] }]
|
|
345
674
|
: localValue === null ? undefined
|
|
346
675
|
: localValue;
|
|
347
|
-
|
|
348
|
-
// disables tag click/remove) when `readOnly` is set. Honour the field-level
|
|
349
|
-
// flags — the IDE Options model passes `readonly`, the compact form passes
|
|
350
|
-
// `readOnly` + `disabled` — so a read-only form renders the formatted content
|
|
351
|
-
// rather than an editable box.
|
|
352
|
-
var readOnly = !!(rest.readOnly ||
|
|
353
|
-
rest.readonly ||
|
|
354
|
-
rest.disabled);
|
|
676
|
+
drawnRef.current = formattedValue;
|
|
355
677
|
/* Everything the caller passed, minus its own `tags` — see the prop's doc
|
|
356
678
|
above: on a form field that name means the chips to show, while the
|
|
357
679
|
editor's `tags` is the template catalogue this component computes. */
|
|
358
680
|
var editorProps = __assign({}, rest);
|
|
359
681
|
delete editorProps.tags;
|
|
360
|
-
return ((0, jsx_runtime_1.
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
682
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(RichTextEditor_1.ReqoreRichTextEditor, __assign({ ref: editorRef,
|
|
683
|
+
// a click, a tap or Tab into the text opens the template picker at the caret (`browseAtPageCaret`)
|
|
684
|
+
onClick: function (event) { return browseAtPageCaret(event.target); },
|
|
685
|
+
// Tab's key comes up in the editor it moved the focus into
|
|
686
|
+
onKeyUp: function (event) {
|
|
687
|
+
// only a Tab that brought the focus in: one that took a completion here asks nothing more
|
|
688
|
+
if (event.key === 'Tab' && tabCameIn())
|
|
689
|
+
browseAtPageCaret(event.target);
|
|
690
|
+
}, value: formattedValue, onChange: function (val) {
|
|
691
|
+
handleChange(val);
|
|
692
|
+
if (editorRef.current)
|
|
693
|
+
autocomplete.onSlateChange(editorRef.current, val);
|
|
694
|
+
openWhereEmptied(val);
|
|
695
|
+
} }, editorProps, { tagsListProps: __assign(__assign({ useTargetWidth: true }, useTemplateTags_1.TEMPLATE_BROWSE_LIST_PROPS), (rest.tagsListProps || {})), getTagProps: handleGetTagProps, "aria-autocomplete": 'list', "aria-expanded": autocomplete.isOpen, "aria-controls": completionMenuId, panelProps: __assign(__assign({ fluid: true }, rest.panelProps), { style: __assign({ minWidth: '150px' }, (_c = rest.panelProps) === null || _c === void 0 ? void 0 : _c.style) }), readOnly: readOnly, onKeyDown: handleKeyDown, onBlur: handleBlur,
|
|
696
|
+
/* A form field carries no document toolbar. Styling was already off, so
|
|
697
|
+
the bar held only undo and redo — drawn by Reqore as a panel as wide as
|
|
698
|
+
the tag list, which under a field reads as an empty 600px menu with two
|
|
699
|
+
greyed icons in it (they are disabled until there is history to walk).
|
|
700
|
+
Both still work from the keyboard, where every other text field's do. */
|
|
701
|
+
actions: { undo: false, redo: false, styling: false } })), (0, jsx_runtime_1.jsx)(CompletionMenu_1.CompletionMenu, { autocomplete: autocomplete, id: completionMenuId,
|
|
702
|
+
// the picker offers what typing offers: the template contexts too, each taken whole or gone into
|
|
703
|
+
templateRoots: pickerRoots, onSelect: function (item) { return editorRef.current && autocomplete.onItemSelect(item, editorRef.current); } })] }));
|
|
369
704
|
});
|
|
370
705
|
//# sourceMappingURL=RichText.js.map
|