@qoretechnologies/reqraft 0.10.65 → 0.10.66-pr.137.ga1983bf
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 +413 -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 +322 -124
- package/dist/components/form/engine/CompactRow.js.map +1 -1
- package/dist/components/form/engine/CompactToolbar.d.ts.map +1 -1
- package/dist/components/form/engine/CompactToolbar.js +29 -3
- package/dist/components/form/engine/CompactToolbar.js.map +1 -1
- package/dist/components/form/engine/FormEngine.d.ts +66 -11
- package/dist/components/form/engine/FormEngine.d.ts.map +1 -1
- package/dist/components/form/engine/FormEngine.js +570 -176
- package/dist/components/form/engine/FormEngine.js.map +1 -1
- package/dist/components/form/engine/HiddenFieldsNote.d.ts +28 -0
- package/dist/components/form/engine/HiddenFieldsNote.d.ts.map +1 -0
- package/dist/components/form/engine/HiddenFieldsNote.js +32 -0
- package/dist/components/form/engine/HiddenFieldsNote.js.map +1 -0
- package/dist/components/form/engine/OptionFieldMessages.d.ts.map +1 -1
- package/dist/components/form/engine/OptionFieldMessages.js +25 -3
- package/dist/components/form/engine/OptionFieldMessages.js.map +1 -1
- package/dist/components/form/engine/OptionsHelpDialog.d.ts.map +1 -1
- package/dist/components/form/engine/OptionsHelpDialog.js +19 -2
- package/dist/components/form/engine/OptionsHelpDialog.js.map +1 -1
- package/dist/components/form/engine/_structuredData/SchemaDataView.d.ts +2 -2
- package/dist/components/form/engine/_structuredData/SchemaDataView.d.ts.map +1 -1
- package/dist/components/form/engine/_structuredData/SchemaDataView.js +12 -6
- package/dist/components/form/engine/_structuredData/SchemaDataView.js.map +1 -1
- package/dist/components/form/engine/compactRowContext.d.ts +30 -1
- package/dist/components/form/engine/compactRowContext.d.ts.map +1 -1
- package/dist/components/form/engine/compactRowContext.js.map +1 -1
- package/dist/components/form/engine/compactRowStyles.d.ts +59 -22
- package/dist/components/form/engine/compactRowStyles.d.ts.map +1 -1
- package/dist/components/form/engine/compactRowStyles.js +102 -55
- package/dist/components/form/engine/compactRowStyles.js.map +1 -1
- package/dist/components/form/engine/compactToolbarColors.d.ts +16 -0
- package/dist/components/form/engine/compactToolbarColors.d.ts.map +1 -0
- package/dist/components/form/engine/compactToolbarColors.js +21 -0
- package/dist/components/form/engine/compactToolbarColors.js.map +1 -0
- package/dist/components/form/engine/inheritProps.d.ts +29 -0
- package/dist/components/form/engine/inheritProps.d.ts.map +1 -0
- package/dist/components/form/engine/inheritProps.js +43 -0
- package/dist/components/form/engine/inheritProps.js.map +1 -0
- package/dist/components/form/engine/operatorSummary.d.ts +26 -0
- package/dist/components/form/engine/operatorSummary.d.ts.map +1 -0
- package/dist/components/form/engine/operatorSummary.js +35 -0
- package/dist/components/form/engine/operatorSummary.js.map +1 -0
- package/dist/components/form/engine/readFirst.d.ts +24 -8
- package/dist/components/form/engine/readFirst.d.ts.map +1 -1
- package/dist/components/form/engine/readFirst.js +77 -109
- package/dist/components/form/engine/readFirst.js.map +1 -1
- package/dist/components/form/engine/readFirstColors.d.ts +30 -0
- package/dist/components/form/engine/readFirstColors.d.ts.map +1 -0
- package/dist/components/form/engine/readFirstColors.js +51 -0
- package/dist/components/form/engine/readFirstColors.js.map +1 -0
- package/dist/components/form/engine/rowFocus.d.ts +2 -0
- package/dist/components/form/engine/rowFocus.d.ts.map +1 -1
- package/dist/components/form/engine/rowFocus.js +26 -3
- package/dist/components/form/engine/rowFocus.js.map +1 -1
- package/dist/components/form/engine/typeChoices.d.ts +1 -1
- package/dist/components/form/engine/variants/VariantCalmTable.d.ts.map +1 -1
- package/dist/components/form/engine/variants/VariantCalmTable.js +2 -1
- package/dist/components/form/engine/variants/VariantCalmTable.js.map +1 -1
- package/dist/components/form/engine/variants/VariantCards.d.ts.map +1 -1
- package/dist/components/form/engine/variants/VariantCards.js +2 -1
- package/dist/components/form/engine/variants/VariantCards.js.map +1 -1
- package/dist/components/form/engine/variants/VariantFocus.js +1 -1
- package/dist/components/form/engine/variants/VariantFocus.js.map +1 -1
- package/dist/components/form/engine/variants/VariantMinimal.d.ts.map +1 -1
- package/dist/components/form/engine/variants/VariantMinimal.js +2 -1
- package/dist/components/form/engine/variants/VariantMinimal.js.map +1 -1
- package/dist/components/form/engine/variants/variantParts.d.ts +1 -1
- package/dist/components/form/engine/variants/variantParts.d.ts.map +1 -1
- package/dist/components/form/engine/variants/variantParts.js +25 -17
- package/dist/components/form/engine/variants/variantParts.js.map +1 -1
- package/dist/components/form/expressions/DpqlRendering.d.ts +1 -1
- package/dist/components/form/expressions/DpqlRendering.d.ts.map +1 -1
- package/dist/components/form/expressions/DpqlRendering.js +7 -6
- package/dist/components/form/expressions/DpqlRendering.js.map +1 -1
- package/dist/components/form/expressions/ExpressionField.d.ts +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 +43 -10
- package/dist/components/form/expressions/renderExpressionToText.js.map +1 -1
- package/dist/components/form/expressions/textOfExpression.d.ts +18 -0
- package/dist/components/form/expressions/textOfExpression.d.ts.map +1 -0
- package/dist/components/form/expressions/textOfExpression.js +49 -0
- package/dist/components/form/expressions/textOfExpression.js.map +1 -0
- package/dist/components/form/expressions/types.d.ts +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 +43 -20
- package/dist/components/form/fields/Field.js.map +1 -1
- package/dist/components/form/fields/allowed-values/AllowedValues.d.ts.map +1 -1
- package/dist/components/form/fields/allowed-values/AllowedValues.js +39 -6
- package/dist/components/form/fields/allowed-values/AllowedValues.js.map +1 -1
- package/dist/components/form/fields/allowed-values/choicePicture.d.ts +37 -0
- package/dist/components/form/fields/allowed-values/choicePicture.d.ts.map +1 -0
- package/dist/components/form/fields/allowed-values/choicePicture.js +64 -0
- package/dist/components/form/fields/allowed-values/choicePicture.js.map +1 -0
- package/dist/components/form/fields/array/ArrayAuto.d.ts.map +1 -1
- package/dist/components/form/fields/array/ArrayAuto.js +24 -0
- package/dist/components/form/fields/array/ArrayAuto.js.map +1 -1
- package/dist/components/form/fields/array/ArrayAutoField.d.ts.map +1 -1
- package/dist/components/form/fields/array/ArrayAutoField.js +36 -13
- package/dist/components/form/fields/array/ArrayAutoField.js.map +1 -1
- package/dist/components/form/fields/auto/AutoFormField.d.ts +30 -1
- package/dist/components/form/fields/auto/AutoFormField.d.ts.map +1 -1
- package/dist/components/form/fields/auto/AutoFormField.js +119 -62
- package/dist/components/form/fields/auto/AutoFormField.js.map +1 -1
- package/dist/components/form/fields/auto/hostEditorValue.d.ts +30 -0
- package/dist/components/form/fields/auto/hostEditorValue.d.ts.map +1 -0
- package/dist/components/form/fields/auto/hostEditorValue.js +53 -0
- package/dist/components/form/fields/auto/hostEditorValue.js.map +1 -0
- package/dist/components/form/fields/binary/Binary.d.ts.map +1 -1
- package/dist/components/form/fields/binary/Binary.js +23 -3
- package/dist/components/form/fields/binary/Binary.js.map +1 -1
- package/dist/components/form/fields/boolean/Boolean.d.ts +5 -0
- package/dist/components/form/fields/boolean/Boolean.d.ts.map +1 -1
- package/dist/components/form/fields/boolean/Boolean.js +9 -1
- package/dist/components/form/fields/boolean/Boolean.js.map +1 -1
- package/dist/components/form/fields/color/Color.d.ts +103 -16
- package/dist/components/form/fields/color/Color.d.ts.map +1 -1
- package/dist/components/form/fields/color/Color.js +616 -16
- package/dist/components/form/fields/color/Color.js.map +1 -1
- package/dist/components/form/fields/emittedValues.d.ts +34 -3
- package/dist/components/form/fields/emittedValues.d.ts.map +1 -1
- package/dist/components/form/fields/emittedValues.js +24 -1
- package/dist/components/form/fields/emittedValues.js.map +1 -1
- package/dist/components/form/fields/file/File.d.ts +1 -1
- package/dist/components/form/fields/file/File.d.ts.map +1 -1
- package/dist/components/form/fields/file/File.js +4 -2
- package/dist/components/form/fields/file/File.js.map +1 -1
- package/dist/components/form/fields/long-string/LongString.d.ts.map +1 -1
- package/dist/components/form/fields/long-string/LongString.js +29 -8
- package/dist/components/form/fields/long-string/LongString.js.map +1 -1
- package/dist/components/form/fields/markdown/MarkdownView.js +1 -1
- package/dist/components/form/fields/multi-select/MultiSelectFormField.d.ts.map +1 -1
- package/dist/components/form/fields/multi-select/MultiSelectFormField.js +13 -9
- package/dist/components/form/fields/multi-select/MultiSelectFormField.js.map +1 -1
- package/dist/components/form/fields/number/Number.d.ts +6 -0
- package/dist/components/form/fields/number/Number.d.ts.map +1 -1
- package/dist/components/form/fields/number/Number.js +41 -6
- package/dist/components/form/fields/number/Number.js.map +1 -1
- package/dist/components/form/fields/object/Object.d.ts +1 -1
- package/dist/components/form/fields/object/Object.d.ts.map +1 -1
- package/dist/components/form/fields/object/Object.js +4 -2
- package/dist/components/form/fields/object/Object.js.map +1 -1
- package/dist/components/form/fields/pendingEdit.d.ts +52 -0
- package/dist/components/form/fields/pendingEdit.d.ts.map +1 -0
- package/dist/components/form/fields/pendingEdit.js +79 -0
- package/dist/components/form/fields/pendingEdit.js.map +1 -0
- package/dist/components/form/fields/radio-group/RadioGroup.d.ts.map +1 -1
- package/dist/components/form/fields/radio-group/RadioGroup.js +4 -3
- package/dist/components/form/fields/radio-group/RadioGroup.js.map +1 -1
- package/dist/components/form/fields/rich-text/RichText.d.ts +20 -1
- package/dist/components/form/fields/rich-text/RichText.d.ts.map +1 -1
- package/dist/components/form/fields/rich-text/RichText.js +382 -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 +678 -107
- 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 +451 -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 -0
- package/dist/components/form/index.d.ts.map +1 -1
- package/dist/components/form/index.js +25 -1
- 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 -7
- package/dist/components/imageLightbox/ImageLightbox.js.map +1 -1
- package/dist/components/log/Log.d.ts.map +1 -1
- package/dist/components/log/Log.js +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 +584 -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 +336 -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 +562 -151
- 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/ReferencePicker.d.ts +9 -2
- package/dist/components/supportTicket/ReferencePicker.d.ts.map +1 -1
- package/dist/components/supportTicket/ReferencePicker.js +27 -6
- package/dist/components/supportTicket/ReferencePicker.js.map +1 -1
- package/dist/components/supportTicket/TicketHeader.d.ts +3 -4
- package/dist/components/supportTicket/TicketHeader.d.ts.map +1 -1
- package/dist/components/supportTicket/TicketHeader.js +20 -2
- package/dist/components/supportTicket/TicketHeader.js.map +1 -1
- package/dist/components/supportTicket/TicketMetaTags.d.ts +1 -1
- package/dist/components/ticketReferences/TicketReferences.d.ts.map +1 -1
- package/dist/components/ticketReferences/TicketReferences.js +9 -4
- package/dist/components/ticketReferences/TicketReferences.js.map +1 -1
- package/dist/components/ticketThread/TicketThread.d.ts.map +1 -1
- package/dist/components/ticketThread/TicketThread.js +38 -13
- package/dist/components/ticketThread/TicketThread.js.map +1 -1
- package/dist/helpers/allowedValues.d.ts +21 -0
- package/dist/helpers/allowedValues.d.ts.map +1 -1
- package/dist/helpers/allowedValues.js +40 -1
- package/dist/helpers/allowedValues.js.map +1 -1
- package/dist/helpers/descriptionTooltip.d.ts +46 -0
- package/dist/helpers/descriptionTooltip.d.ts.map +1 -0
- package/dist/helpers/descriptionTooltip.js +76 -0
- package/dist/helpers/descriptionTooltip.js.map +1 -0
- package/dist/helpers/domProps.d.ts +5 -0
- package/dist/helpers/domProps.d.ts.map +1 -0
- package/dist/helpers/domProps.js +47 -0
- package/dist/helpers/domProps.js.map +1 -0
- package/dist/helpers/expressions.d.ts +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/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/src/components/Description/index.tsx +0 -254
- package/src/components/Description/markdownRendererContext.tsx +0 -29
- package/src/components/FocusedEditing/index.tsx +0 -50
- package/src/components/codeSize/index.tsx +0 -79
- package/src/components/composer/Composer.stories.tsx +0 -238
- package/src/components/composer/Composer.tsx +0 -554
- package/src/components/composer/helpers.ts +0 -74
- package/src/components/composer/index.ts +0 -2
- package/src/components/dpqlEditor/DpqlEditor.stories.tsx +0 -1183
- package/src/components/dpqlEditor/DpqlEditor.tsx +0 -219
- package/src/components/dpqlEditor/dpqlHelpers.ts +0 -287
- package/src/components/dpqlEditor/dpqlInserter.ts +0 -121
- package/src/components/dpqlEditor/dpqlProbe.ts +0 -165
- package/src/components/dpqlEditor/dpqlTags.ts +0 -114
- package/src/components/dpqlEditor/index.ts +0 -41
- package/src/components/dpqlEditor/types.ts +0 -203
- package/src/components/dpqlEditor/useDpqlProbe.ts +0 -33
- package/src/components/dpqlEditor/useDpqlSession.ts +0 -411
- package/src/components/form/engine/CompactRow.tsx +0 -2620
- package/src/components/form/engine/CompactToolbar.tsx +0 -330
- package/src/components/form/engine/FormEngine.stories.tsx +0 -9920
- package/src/components/form/engine/FormEngine.tsx +0 -4569
- package/src/components/form/engine/FormEngineRemote.stories.tsx +0 -679
- package/src/components/form/engine/FormEngineStickyHeaders.stories.tsx +0 -331
- package/src/components/form/engine/FormFieldsSkeleton.tsx +0 -82
- package/src/components/form/engine/OptionFieldMessages.tsx +0 -477
- package/src/components/form/engine/OptionsHelpDialog.tsx +0 -29
- package/src/components/form/engine/__fixtures__/basicFormOptions.ts +0 -309
- package/src/components/form/engine/__fixtures__/fieldChromeOptions.ts +0 -45
- package/src/components/form/engine/_structuredData/SchemaDataView.stories.tsx +0 -233
- package/src/components/form/engine/_structuredData/SchemaDataView.tsx +0 -742
- package/src/components/form/engine/_structuredData/StructuredDataView.stories.tsx +0 -85
- package/src/components/form/engine/_structuredData/StructuredDataView.tsx +0 -75
- package/src/components/form/engine/_structuredData/structuredData.ts +0 -145
- package/src/components/form/engine/compactRowContext.ts +0 -148
- package/src/components/form/engine/compactRowStyles.ts +0 -898
- package/src/components/form/engine/compactToolbarContext.ts +0 -69
- package/src/components/form/engine/optionActions.ts +0 -128
- package/src/components/form/engine/optionsContext.ts +0 -24
- package/src/components/form/engine/readFirst.ts +0 -1077
- package/src/components/form/engine/rendererTypes.ts +0 -107
- package/src/components/form/engine/revealRow.ts +0 -123
- package/src/components/form/engine/rowFocus.ts +0 -101
- package/src/components/form/engine/rowMenuContext.ts +0 -159
- package/src/components/form/engine/rowOpenPicker.ts +0 -27
- package/src/components/form/engine/typeChoices.ts +0 -63
- package/src/components/form/engine/variants/FormEngineVariants.stories.tsx +0 -159
- package/src/components/form/engine/variants/VariantCalmTable.tsx +0 -244
- package/src/components/form/engine/variants/VariantCards.tsx +0 -212
- package/src/components/form/engine/variants/VariantFocus.tsx +0 -382
- package/src/components/form/engine/variants/VariantMinimal.tsx +0 -170
- package/src/components/form/engine/variants/focusDemo.ts +0 -145
- package/src/components/form/engine/variants/variantModel.ts +0 -223
- package/src/components/form/engine/variants/variantParts.tsx +0 -313
- package/src/components/form/expressions/DpqlRendering.tsx +0 -85
- package/src/components/form/expressions/ExpressionField.stories.tsx +0 -1395
- package/src/components/form/expressions/ExpressionField.tsx +0 -503
- package/src/components/form/expressions/argumentPresence.ts +0 -213
- package/src/components/form/expressions/builder/ExpressionBuilder.stories.tsx +0 -1683
- package/src/components/form/expressions/builder/argumentDetail.tsx +0 -17
- package/src/components/form/expressions/builder/argumentLabel.tsx +0 -146
- package/src/components/form/expressions/builder/argumentSlot.tsx +0 -101
- package/src/components/form/expressions/builder/argumentWrapper.tsx +0 -243
- package/src/components/form/expressions/builder/confirmMismatchedTypesModal.tsx +0 -120
- package/src/components/form/expressions/builder/confirmUnsupportedTypeModal.tsx +0 -69
- package/src/components/form/expressions/builder/index.tsx +0 -1545
- package/src/components/form/expressions/builder/item.tsx +0 -89
- package/src/components/form/expressions/builder/moveToPositionStrip.tsx +0 -156
- package/src/components/form/expressions/builder/renderTemplate.tsx +0 -42
- package/src/components/form/expressions/dpqlMockLanguage.ts +0 -566
- package/src/components/form/expressions/dpqlMockLsp.ts +0 -126
- package/src/components/form/expressions/mockExpressions.ts +0 -317
- package/src/components/form/expressions/renderExpressionToText.ts +0 -137
- package/src/components/form/expressions/types.ts +0 -110
- package/src/components/form/expressions/useExpressions.ts +0 -101
- package/src/components/form/expressions/useRenderExpression.ts +0 -165
- package/src/components/form/fields/Field.stories.tsx +0 -143
- package/src/components/form/fields/Field.tsx +0 -732
- package/src/components/form/fields/allowed-values/AllowedValues.tsx +0 -297
- package/src/components/form/fields/array/ArrayAuto.tsx +0 -237
- package/src/components/form/fields/array/ArrayAutoField.stories.tsx +0 -475
- package/src/components/form/fields/array/ArrayAutoField.tsx +0 -367
- package/src/components/form/fields/auto/AutoFormField.stories.tsx +0 -825
- package/src/components/form/fields/auto/AutoFormField.tsx +0 -1164
- package/src/components/form/fields/binary/Binary.stories.tsx +0 -122
- package/src/components/form/fields/binary/Binary.tsx +0 -91
- package/src/components/form/fields/boolean/Boolean.stories.tsx +0 -125
- package/src/components/form/fields/boolean/Boolean.tsx +0 -34
- package/src/components/form/fields/byte-size/ByteSize.stories.tsx +0 -87
- package/src/components/form/fields/byte-size/ByteSize.tsx +0 -58
- package/src/components/form/fields/color/Color.stories.tsx +0 -99
- package/src/components/form/fields/color/Color.tsx +0 -46
- package/src/components/form/fields/cron/Cron.stories.tsx +0 -68
- package/src/components/form/fields/cron/Cron.tsx +0 -80
- package/src/components/form/fields/date/Date.stories.tsx +0 -77
- package/src/components/form/fields/date/Date.tsx +0 -55
- package/src/components/form/fields/emittedValues.ts +0 -70
- package/src/components/form/fields/file/File.stories.tsx +0 -161
- package/src/components/form/fields/file/File.tsx +0 -227
- package/src/components/form/fields/long-string/LongString.stories.tsx +0 -120
- package/src/components/form/fields/long-string/LongString.tsx +0 -130
- package/src/components/form/fields/markdown/Markdown.stories.tsx +0 -76
- package/src/components/form/fields/markdown/Markdown.tsx +0 -81
- package/src/components/form/fields/markdown/MarkdownView.tsx +0 -222
- package/src/components/form/fields/multi-select/MultiSelectFormField.tsx +0 -139
- package/src/components/form/fields/number/Number.stories.tsx +0 -159
- package/src/components/form/fields/number/Number.tsx +0 -160
- package/src/components/form/fields/object/Object.stories.tsx +0 -398
- package/src/components/form/fields/object/Object.tsx +0 -255
- package/src/components/form/fields/radio-group/RadioGroup.stories.tsx +0 -95
- package/src/components/form/fields/radio-group/RadioGroup.tsx +0 -46
- package/src/components/form/fields/radio-group/images/java-96x128.png +0 -0
- package/src/components/form/fields/radio-group/images/python-129x128.png +0 -0
- package/src/components/form/fields/radio-group/images/qore-106x128.png +0 -0
- package/src/components/form/fields/rich-text/RichText.stories.tsx +0 -260
- package/src/components/form/fields/rich-text/RichText.tsx +0 -537
- package/src/components/form/fields/schema-definition/CatalogLeafForm.tsx +0 -242
- package/src/components/form/fields/schema-definition/CatalogNodeEditor.tsx +0 -758
- package/src/components/form/fields/schema-definition/Hint.tsx +0 -22
- package/src/components/form/fields/schema-definition/InlineValidationBanner.tsx +0 -138
- package/src/components/form/fields/schema-definition/Loader.tsx +0 -20
- package/src/components/form/fields/schema-definition/MigrationsTab.tsx +0 -187
- package/src/components/form/fields/schema-definition/SchemaDefinitionField.stories.tsx +0 -286
- package/src/components/form/fields/schema-definition/TableEditor.tsx +0 -155
- package/src/components/form/fields/schema-definition/TablesTab.tsx +0 -138
- package/src/components/form/fields/schema-definition/catalog.ts +0 -237
- package/src/components/form/fields/schema-definition/helpers.ts +0 -90
- package/src/components/form/fields/schema-definition/index.tsx +0 -418
- package/src/components/form/fields/schema-definition/mockCatalog.ts +0 -325
- package/src/components/form/fields/schema-definition/mockDefinition.ts +0 -111
- package/src/components/form/fields/schema-definition/referenceSuggestions.tsx +0 -152
- package/src/components/form/fields/schema-definition/starterTemplate.ts +0 -68
- package/src/components/form/fields/schema-definition/types.ts +0 -185
- package/src/components/form/fields/schema-definition/useSchemaOptionCatalog.ts +0 -49
- package/src/components/form/fields/select/Select.stories.tsx +0 -872
- package/src/components/form/fields/select/Select.tsx +0 -624
- package/src/components/form/fields/select/SelectCollection.tsx +0 -594
- package/src/components/form/fields/string/String.stories.tsx +0 -86
- package/src/components/form/fields/string/String.tsx +0 -43
- package/src/components/form/fields/template/ExampleValueModal.stories.tsx +0 -114
- package/src/components/form/fields/template/ExampleValueModal.tsx +0 -99
- package/src/components/form/fields/template/ReadOnlyTemplateTag.tsx +0 -47
- package/src/components/form/fields/template/TemplateField.stories.tsx +0 -1121
- package/src/components/form/fields/template/TemplateField.tsx +0 -1717
- package/src/components/form/fields/template/TemplateText.tsx +0 -115
- package/src/components/form/fields/template/__fixtures__/longExampleValue.ts +0 -7
- package/src/components/form/fields/template/__fixtures__/multiLevelTemplates.json +0 -147
- package/src/components/form/fields/template/__fixtures__/templates.json +0 -83
- package/src/components/form/fields/timeout/Timeout.stories.tsx +0 -228
- package/src/components/form/fields/timeout/Timeout.tsx +0 -87
- package/src/components/form/fields/url/Url.stories.tsx +0 -94
- package/src/components/form/fields/url/Url.tsx +0 -85
- package/src/components/form/index.tsx +0 -47
- package/src/components/imageLightbox/ImageLightbox.stories.tsx +0 -238
- package/src/components/imageLightbox/ImageLightbox.tsx +0 -236
- package/src/components/imageLightbox/index.ts +0 -1
- package/src/components/log/Log.stories.tsx +0 -333
- package/src/components/log/Log.tsx +0 -285
- package/src/components/menu/Menu.stories.tsx +0 -155
- package/src/components/menu/Menu.tsx +0 -312
- package/src/components/qonsoleSmartInput/QonsoleSmartInput.stories.tsx +0 -797
- package/src/components/qonsoleSmartInput/QonsoleSmartInput.tsx +0 -105
- package/src/components/qonsoleSmartInput/index.ts +0 -16
- package/src/components/qonsoleSmartInput/qonsoleInserter.ts +0 -77
- package/src/components/qonsoleSmartInput/types.ts +0 -133
- package/src/components/qonsoleSmartInput/useQonsoleSession.ts +0 -124
- package/src/components/searchFilterBar/SearchFilterBar.stories.tsx +0 -62
- package/src/components/searchFilterBar/SearchFilterBar.tsx +0 -144
- package/src/components/searchFilterBar/index.ts +0 -1
- package/src/components/smartEditor/MarkdownDoc.tsx +0 -190
- package/src/components/smartEditor/SmartEditor.stories.tsx +0 -475
- package/src/components/smartEditor/SmartEditor.tsx +0 -808
- package/src/components/smartEditor/__fixtures__/mockLspServer.ts +0 -205
- package/src/components/smartEditor/helpers.ts +0 -217
- package/src/components/smartEditor/index.ts +0 -35
- package/src/components/smartEditor/styling.ts +0 -45
- package/src/components/smartEditor/types.ts +0 -211
- package/src/components/smartEditor/useLspAutocomplete.ts +0 -758
- package/src/components/smartEditor/useLspDiagnosticDecorations.ts +0 -125
- package/src/components/smartEditor/useLspHover.ts +0 -230
- package/src/components/smartEditor/useLspSemanticTokens.ts +0 -298
- package/src/components/smartEditor/useLspSession.ts +0 -231
- package/src/components/smartEditor/useLspSignatureHelp.ts +0 -198
- package/src/components/supportTicket/AttachmentChips.stories.tsx +0 -171
- package/src/components/supportTicket/AttachmentChips.tsx +0 -147
- package/src/components/supportTicket/InterfaceReferenceTags.stories.tsx +0 -257
- package/src/components/supportTicket/InterfaceReferenceTags.tsx +0 -129
- package/src/components/supportTicket/ReferencePicker.stories.tsx +0 -584
- package/src/components/supportTicket/ReferencePicker.tsx +0 -563
- package/src/components/supportTicket/TicketConversation.stories.tsx +0 -121
- package/src/components/supportTicket/TicketHeader.stories.tsx +0 -183
- package/src/components/supportTicket/TicketHeader.tsx +0 -247
- package/src/components/supportTicket/TicketMetaTags.stories.tsx +0 -103
- package/src/components/supportTicket/TicketMetaTags.tsx +0 -85
- package/src/components/supportTicket/TicketReplyBox.stories.tsx +0 -354
- package/src/components/supportTicket/TicketReplyBox.tsx +0 -150
- package/src/components/supportTicket/__fixtures__/kindMarks.ts +0 -28
- package/src/components/supportTicket/attachmentAccess.ts +0 -97
- package/src/components/supportTicket/fileToAttachment.ts +0 -24
- package/src/components/supportTicket/index.ts +0 -10
- package/src/components/supportTicket/meta.ts +0 -206
- package/src/components/supportTicket/ticketModel.ts +0 -131
- package/src/components/supportTicket/useLoadedImages.ts +0 -73
- package/src/components/ticketReferences/TicketReferences.stories.tsx +0 -315
- package/src/components/ticketReferences/TicketReferences.tsx +0 -906
- package/src/components/ticketReferences/index.ts +0 -2
- package/src/components/ticketThread/TicketThread.stories.tsx +0 -829
- package/src/components/ticketThread/TicketThread.tsx +0 -719
- package/src/components/ticketThread/index.ts +0 -6
- package/src/contexts/FetchContext.tsx +0 -25
- package/src/contexts/ReqraftContext.tsx +0 -9
- package/src/contexts/StorageContext.tsx +0 -33
- package/src/global.d.ts +0 -4
- package/src/helpers/allowedValues.ts +0 -249
- package/src/helpers/choiceChip.ts +0 -227
- package/src/helpers/common.ts +0 -326
- package/src/helpers/dpqlDetection.ts +0 -209
- package/src/helpers/expressions.ts +0 -140
- package/src/helpers/optionUiTypes.ts +0 -199
- package/src/helpers/options.ts +0 -150
- package/src/helpers/providerValue.ts +0 -125
- package/src/helpers/scrollbar.ts +0 -32
- package/src/helpers/singleLineString.ts +0 -61
- package/src/helpers/templateItems.ts +0 -81
- package/src/helpers/templateText.ts +0 -350
- package/src/helpers/templates.ts +0 -602
- package/src/helpers/validations.ts +0 -2085
- package/src/hooks/useArgSchema.ts +0 -37
- package/src/hooks/useCoarsePointer.ts +0 -30
- package/src/hooks/useFetch/useFetch.stories.tsx +0 -379
- package/src/hooks/useFetch/useFetch.tsx +0 -154
- package/src/hooks/usePhoneViewport.ts +0 -34
- package/src/hooks/useQorusTypes.ts +0 -233
- package/src/hooks/useReqraftProperty.ts +0 -16
- package/src/hooks/useStorage/useStorage.stories.tsx +0 -168
- package/src/hooks/useStorage/useStorage.ts +0 -35
- package/src/hooks/useTemplates.ts +0 -123
- package/src/hooks/useValidation.ts +0 -9
- package/src/hooks/useWebSocket/useWebSocket.ts +0 -224
- package/src/hooks/useWebSocket/useWebsocket.stories.tsx +0 -640
- package/src/hooks/useWhyDidYouUpdate.ts +0 -38
- package/src/index.tsx +0 -86
- package/src/providers/FetchProvider.tsx +0 -40
- package/src/providers/ReqraftProvider.tsx +0 -52
- package/src/providers/StorageProvider.tsx +0 -131
- package/src/stores/currentUser/currentUser.stories.tsx +0 -100
- package/src/stores/currentUser/currentUser.tsx +0 -94
- package/src/stories/Data/fileFieldArgSchema.json +0 -86
- package/src/stories/Tests/utils.ts +0 -320
- package/src/stories/storyNetwork.ts +0 -92
- package/src/stories/tracking.tsx +0 -206
- package/src/tracking/browser/attach.ts +0 -186
- package/src/tracking/browser/env.ts +0 -78
- package/src/tracking/core/consent.ts +0 -37
- package/src/tracking/core/engagement.ts +0 -47
- package/src/tracking/core/experiments.ts +0 -258
- package/src/tracking/core/hash.ts +0 -26
- package/src/tracking/core/ids.ts +0 -25
- package/src/tracking/core/observable.ts +0 -23
- package/src/tracking/core/queue.ts +0 -131
- package/src/tracking/core/sections.ts +0 -166
- package/src/tracking/core/storage.ts +0 -69
- package/src/tracking/core/tracker.ts +0 -417
- package/src/tracking/core/types.ts +0 -162
- package/src/tracking/core/utm.ts +0 -23
- package/src/tracking/index.ts +0 -72
- package/src/tracking/markup.ts +0 -17
- package/src/tracking/react/Experiment.tsx +0 -44
- package/src/tracking/react/TrackingProvider.tsx +0 -56
- package/src/tracking/react/hooks.ts +0 -106
- package/src/tracking/react/index.ts +0 -13
- package/src/tracking/testing.ts +0 -108
- package/src/tracking/ui/ExperimentCard.stories.tsx +0 -296
- package/src/tracking/ui/ExperimentCard.tsx +0 -667
- package/src/tracking/ui/ExperimentsOverlay.stories.tsx +0 -155
- package/src/tracking/ui/ExperimentsOverlay.tsx +0 -437
- package/src/tracking/ui/anchor.ts +0 -180
- package/src/tracking/ui/card.ts +0 -464
- package/src/tracking/ui/client.ts +0 -117
- package/src/tracking/ui/index.ts +0 -77
- package/src/tracking/ui/types.ts +0 -110
- package/src/tracking/ui/useExperimentsAdmin.ts +0 -103
- package/src/types/Form.ts +0 -29
- package/src/types.ts +0 -14
- package/src/utils/datetime.ts +0 -10
- package/src/utils/fetch.ts +0 -457
- package/src/utils/lspClient.ts +0 -711
- package/src/utils/lspClient.types.ts +0 -211
- package/src/utils/queryUnlessCancelled.ts +0 -28
- package/src/utils/websocket.ts +0 -293
- package/vite.config.ts +0 -58
- package/vitest.config.ts +0 -69
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getReadableTextOpacity = exports.getThemeSurfaces = exports.getReadableFaded = exports.getReadableOpacity = exports.getReadableShade = exports.contrastRatio = exports.READABLE_MARGIN = exports.READABLE_ICON = exports.READABLE_TEXT = void 0;
|
|
4
|
+
var colors_1 = require("@qoretechnologies/reqore/dist/helpers/colors");
|
|
5
|
+
var polished_1 = require("polished");
|
|
6
|
+
/**
|
|
7
|
+
* Colors that stand out from what they are drawn on (WCAG 2.1 AA, qorus#646): 4.5:1 for text, 3:1 for icons and
|
|
8
|
+
* large text. Reqore has these from qoretechnologies/reqore#708 on (`getReadableAccentColorOn`, `getReadableAlpha`);
|
|
9
|
+
* until reqraft builds on that release, the read-first form picks its own colors with these.
|
|
10
|
+
*/
|
|
11
|
+
exports.READABLE_TEXT = 4.5;
|
|
12
|
+
exports.READABLE_ICON = 3;
|
|
13
|
+
/* A browser blends a color a shade differently (alphas in 255ths, its own rounding): a color that just reaches the
|
|
14
|
+
ratio here can fall a hair short on the page, so these aim a little past it. */
|
|
15
|
+
exports.READABLE_MARGIN = 0.1;
|
|
16
|
+
/** The WCAG contrast ratio of two opaque colors, unrounded (polished's getContrast rounds 4.495 up to 4.5). */
|
|
17
|
+
var contrastRatio = function (a, b) {
|
|
18
|
+
var _a = [(0, polished_1.getLuminance)(a), (0, polished_1.getLuminance)(b)].sort(function (x, y) { return y - x; }), light = _a[0], dark = _a[1];
|
|
19
|
+
return (light + 0.05) / (dark + 0.05);
|
|
20
|
+
};
|
|
21
|
+
exports.contrastRatio = contrastRatio;
|
|
22
|
+
/** `color` at `alpha` drawn over the opaque `background`. */
|
|
23
|
+
var drawnAt = function (color, alpha, background) {
|
|
24
|
+
return (0, polished_1.mix)(alpha, color, background);
|
|
25
|
+
};
|
|
26
|
+
/* how `color` stands out from the least contrasting of `backgrounds`, drawn on each at `alpha` */
|
|
27
|
+
var worst = function (color, backgrounds, alpha) {
|
|
28
|
+
if (alpha === void 0) { alpha = 1; }
|
|
29
|
+
return Math.min.apply(Math, backgrounds.map(function (background) { return (0, exports.contrastRatio)(drawnAt(color, alpha, background), background); }));
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* `color` in the shade of it that stands out by `minContrast` from every one of `backgrounds` (opaque): the color
|
|
33
|
+
* itself when it does, else moved toward white or black - whichever stands out more from the worst of them - only
|
|
34
|
+
* as far as it takes. The hue is kept: a warning stays amber, only lighter on a dark surface. `alpha` is how faded
|
|
35
|
+
* it is drawn: a mark that something else draws at 70% (reqore's panel and button icons) needs a stronger shade.
|
|
36
|
+
*/
|
|
37
|
+
var getReadableShade = function (color, backgrounds, minContrast, alpha) {
|
|
38
|
+
if (minContrast === void 0) { minContrast = exports.READABLE_TEXT; }
|
|
39
|
+
if (alpha === void 0) { alpha = 1; }
|
|
40
|
+
var target = minContrast + exports.READABLE_MARGIN;
|
|
41
|
+
if (worst(color, backgrounds, alpha) >= target) {
|
|
42
|
+
return color;
|
|
43
|
+
}
|
|
44
|
+
var toward = worst('#ffffff', backgrounds, alpha) >= worst('#000000', backgrounds, alpha) ?
|
|
45
|
+
'#ffffff'
|
|
46
|
+
: '#000000';
|
|
47
|
+
// the least of `toward` mixed in that reaches the ratio: halve the range until it is a hundredth wide
|
|
48
|
+
var low = 0;
|
|
49
|
+
var high = 1;
|
|
50
|
+
while (high - low > 0.01) {
|
|
51
|
+
var middle = (low + high) / 2;
|
|
52
|
+
if (worst((0, polished_1.mix)(middle, toward, color), backgrounds, alpha) >= target) {
|
|
53
|
+
high = middle;
|
|
54
|
+
}
|
|
55
|
+
else {
|
|
56
|
+
low = middle;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
return (0, polished_1.mix)(high, toward, color);
|
|
60
|
+
};
|
|
61
|
+
exports.getReadableShade = getReadableShade;
|
|
62
|
+
/**
|
|
63
|
+
* How faded `color` can be drawn on every one of `backgrounds` (opaque) and still stand out by `minContrast`:
|
|
64
|
+
* `alpha`, or as little more as it takes (1 when even that does not).
|
|
65
|
+
*/
|
|
66
|
+
var getReadableOpacity = function (color, backgrounds, alpha, minContrast) {
|
|
67
|
+
if (minContrast === void 0) { minContrast = exports.READABLE_TEXT; }
|
|
68
|
+
var target = minContrast + exports.READABLE_MARGIN;
|
|
69
|
+
var reads = function (at) {
|
|
70
|
+
return backgrounds.every(function (background) { return (0, exports.contrastRatio)(drawnAt(color, at, background), background) >= target; });
|
|
71
|
+
};
|
|
72
|
+
if (alpha >= 1 || reads(alpha)) {
|
|
73
|
+
return alpha;
|
|
74
|
+
}
|
|
75
|
+
if (!reads(1)) {
|
|
76
|
+
return 1;
|
|
77
|
+
}
|
|
78
|
+
var low = alpha;
|
|
79
|
+
var high = 1;
|
|
80
|
+
while (high - low > 0.005) {
|
|
81
|
+
var middle = (low + high) / 2;
|
|
82
|
+
if (reads(middle)) {
|
|
83
|
+
high = middle;
|
|
84
|
+
}
|
|
85
|
+
else {
|
|
86
|
+
low = middle;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
return Math.min(1, Math.ceil(high * 100) / 100);
|
|
90
|
+
};
|
|
91
|
+
exports.getReadableOpacity = getReadableOpacity;
|
|
92
|
+
/** A translucent `color` (rgba) at `alpha` that still stands out from `backgrounds` (see `getReadableOpacity`). */
|
|
93
|
+
var getReadableFaded = function (color, backgrounds, alpha, minContrast) {
|
|
94
|
+
if (minContrast === void 0) { minContrast = exports.READABLE_TEXT; }
|
|
95
|
+
return (0, polished_1.rgba)(color, (0, exports.getReadableOpacity)(color, backgrounds, alpha, minContrast));
|
|
96
|
+
};
|
|
97
|
+
exports.getReadableFaded = getReadableFaded;
|
|
98
|
+
/**
|
|
99
|
+
* What reqraft's components are drawn on in `theme`: its background, and a shade darker and lighter, as the page
|
|
100
|
+
* or a panel around them may be.
|
|
101
|
+
*/
|
|
102
|
+
var getThemeSurfaces = function (theme) {
|
|
103
|
+
var page = (0, colors_1.getMainBackgroundColor)(theme);
|
|
104
|
+
return [(0, colors_1.changeDarkness)(page, 0.05), page, (0, colors_1.changeLightness)(page, 0.05)];
|
|
105
|
+
};
|
|
106
|
+
exports.getThemeSurfaces = getThemeSurfaces;
|
|
107
|
+
/**
|
|
108
|
+
* How faded the theme's text can be drawn (`opacity`, a softer note) and still read on what it is drawn on in
|
|
109
|
+
* the theme (`getThemeSurfaces`): `opacity`, or as little more as it takes. An icon needs 3:1 (`READABLE_ICON`).
|
|
110
|
+
*/
|
|
111
|
+
var getReadableTextOpacity = function (theme, opacity, minContrast) {
|
|
112
|
+
if (minContrast === void 0) { minContrast = exports.READABLE_TEXT; }
|
|
113
|
+
return (0, exports.getReadableOpacity)((0, colors_1.getReadableColor)(theme), (0, exports.getThemeSurfaces)(theme), opacity, minContrast);
|
|
114
|
+
};
|
|
115
|
+
exports.getReadableTextOpacity = getReadableTextOpacity;
|
|
116
|
+
//# sourceMappingURL=readableColors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"readableColors.js","sourceRoot":"","sources":["../../src/helpers/readableColors.ts"],"names":[],"mappings":";;;AACA,uEAKsD;AACtD,qCAAmD;AAEnD;;;;GAIG;AACU,QAAA,aAAa,GAAG,GAAG,CAAC;AACpB,QAAA,aAAa,GAAG,CAAC,CAAC;AAE/B;kFACkF;AACrE,QAAA,eAAe,GAAG,GAAG,CAAC;AAEnC,+GAA+G;AACxG,IAAM,aAAa,GAAG,UAAC,CAAS,EAAE,CAAS;IAC1C,IAAA,KAAgB,CAAC,IAAA,uBAAY,EAAC,CAAC,CAAC,EAAE,IAAA,uBAAY,EAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,UAAC,CAAC,EAAE,CAAC,IAAK,OAAA,CAAC,GAAG,CAAC,EAAL,CAAK,CAAC,EAAvE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A1F,CAA0F,CAAC;AALhF,QAAA,sBAAsB,0BAK0D"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The record field reference at the start of `text` - `@pos`, `@"create.order-id"`, `@orders[*].id` - read as the
|
|
3
|
+
* template the server gives it (`$record:{create.order-id}`, `$record:{orders[*].id}`) and the length it takes, or
|
|
4
|
+
* undefined where there is none.
|
|
5
|
+
*/
|
|
6
|
+
export declare const readRecordReference: (text: string) => {
|
|
7
|
+
template: string;
|
|
8
|
+
length: number;
|
|
9
|
+
} | undefined;
|
|
10
|
+
/**
|
|
11
|
+
* The `$record:{…}` template a field reference stands for, when `reference` is exactly one field reference
|
|
12
|
+
* (`@orders[*].id` is `$record:{orders[*].id}`), or undefined.
|
|
13
|
+
*/
|
|
14
|
+
export declare const recordTemplateOfReference: (reference: string) => string | undefined;
|
|
15
|
+
//# sourceMappingURL=recordFieldReference.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"recordFieldReference.d.ts","sourceRoot":"","sources":["../../src/helpers/recordFieldReference.ts"],"names":[],"mappings":"AA2BA;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,SACxB,MAAM,KACX;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GAAG,SA0CzC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,yBAAyB,cAAe,MAAM,KAAG,MAAM,GAAG,SAGtE,CAAC"}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright 2026 Qore Technologies, s.r.o.
|
|
3
|
+
// A record field reference in DPQL text - `@pos`, `@"create.order-id"`, `@orders[*].id` - read as the `$record:{…}`
|
|
4
|
+
// template it stands for (qorus#646). Qorus reads `$record:{<path>}` as a test path (`QorusRecordPath`), and its DPQL
|
|
5
|
+
// serializer writes the same path after `@` (qore#5480: dots separate the parts of a name, quoted or bare, and a dot
|
|
6
|
+
// that is part of a key is `\.`). A field written in DPQL and the template a value holds are one record field, so they
|
|
7
|
+
// are drawn as one chip; and the stories' stand-in for the server reads the reference back to the template with this.
|
|
8
|
+
// Pure: no React, no transport.
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.recordTemplateOfReference = exports.readRecordReference = void 0;
|
|
11
|
+
/**
|
|
12
|
+
* The text in the braces of a template that decodes to `path`, as the Qorus IDE writes it (`recordTemplateOf`):
|
|
13
|
+
* every backslash and every brace is escaped, except the hash wildcard `{*}`. `Unit.Price` under `create` (the path
|
|
14
|
+
* `create.Unit\.Price`) is `$record:{create.Unit\\.Price}`.
|
|
15
|
+
*/
|
|
16
|
+
var recordTemplateText = function (path) {
|
|
17
|
+
return path.replace(/\{\*\}|[\\{}]/g, function (found) { return (found === '{*}' ? found : "\\".concat(found)); });
|
|
18
|
+
};
|
|
19
|
+
/** A key of a test path: a dot, a bracket, a brace or a backslash in it is escaped. */
|
|
20
|
+
var testPathKey = function (key) { return key.replace(/[.[{\\]/g, function (ch) { return "\\".concat(ch); }); };
|
|
21
|
+
/** The accessors a field reference may be followed by, as `dpql/parse` reads them. */
|
|
22
|
+
var ACCESSOR = /^(?:\[\*\]|\[\d+\]|\{\*\}|\.[\p{L}_](?:[\p{L}\p{M}\p{N}_]|-[a-zA-Z])*|\{"(?:\\.|[^"\\])*"\}|\{[A-Za-z_]\w*\})/u;
|
|
23
|
+
/** A field reference, bare or quoted, at the start of a text. */
|
|
24
|
+
var FIELD_REFERENCE = /^@(?:"((?:\\.|[^"\\])*)"|([\p{L}_][\p{L}\p{M}\p{N}_]*(?:\.[\p{L}\p{M}\p{N}_]+)*))/u;
|
|
25
|
+
/**
|
|
26
|
+
* The record field reference at the start of `text` - `@pos`, `@"create.order-id"`, `@orders[*].id` - read as the
|
|
27
|
+
* template the server gives it (`$record:{create.order-id}`, `$record:{orders[*].id}`) and the length it takes, or
|
|
28
|
+
* undefined where there is none.
|
|
29
|
+
*/
|
|
30
|
+
var readRecordReference = function (text) {
|
|
31
|
+
var match = FIELD_REFERENCE.exec(text);
|
|
32
|
+
if (!match)
|
|
33
|
+
return undefined;
|
|
34
|
+
var path;
|
|
35
|
+
if (match[1] !== undefined) {
|
|
36
|
+
// a quoted name: dots separate its parts, `\.` is a dot of a key, `\"` and `\\` are a quote and a backslash
|
|
37
|
+
var keys = [];
|
|
38
|
+
var key = '';
|
|
39
|
+
var quoted = match[1];
|
|
40
|
+
for (var i = 0; i < quoted.length; ++i) {
|
|
41
|
+
var ch = quoted[i];
|
|
42
|
+
if (ch === '\\' && i + 1 < quoted.length) {
|
|
43
|
+
key += quoted[++i];
|
|
44
|
+
}
|
|
45
|
+
else if (ch === '.') {
|
|
46
|
+
keys.push(key);
|
|
47
|
+
key = '';
|
|
48
|
+
}
|
|
49
|
+
else
|
|
50
|
+
key += ch;
|
|
51
|
+
}
|
|
52
|
+
keys.push(key);
|
|
53
|
+
path = keys.map(testPathKey).join('.');
|
|
54
|
+
}
|
|
55
|
+
else {
|
|
56
|
+
path = match[2];
|
|
57
|
+
}
|
|
58
|
+
var length = match[0].length;
|
|
59
|
+
for (var rest = text.slice(length), accessor = ACCESSOR.exec(rest); accessor;) {
|
|
60
|
+
var written = accessor[0];
|
|
61
|
+
if (written.startsWith('[') || written === '{*}') {
|
|
62
|
+
path += written;
|
|
63
|
+
}
|
|
64
|
+
else if (written.startsWith('.')) {
|
|
65
|
+
path += written;
|
|
66
|
+
}
|
|
67
|
+
else {
|
|
68
|
+
var key = written.startsWith('{"') ?
|
|
69
|
+
JSON.parse(written.slice(1, -1))
|
|
70
|
+
: written.slice(1, -1);
|
|
71
|
+
path += ".".concat(testPathKey(key));
|
|
72
|
+
}
|
|
73
|
+
length += written.length;
|
|
74
|
+
rest = text.slice(length);
|
|
75
|
+
accessor = ACCESSOR.exec(rest);
|
|
76
|
+
}
|
|
77
|
+
return { template: "$record:{".concat(recordTemplateText(path), "}"), length: length };
|
|
78
|
+
};
|
|
79
|
+
exports.readRecordReference = readRecordReference;
|
|
80
|
+
/**
|
|
81
|
+
* The `$record:{…}` template a field reference stands for, when `reference` is exactly one field reference
|
|
82
|
+
* (`@orders[*].id` is `$record:{orders[*].id}`), or undefined.
|
|
83
|
+
*/
|
|
84
|
+
var recordTemplateOfReference = function (reference) {
|
|
85
|
+
var read = (0, exports.readRecordReference)(reference);
|
|
86
|
+
return read && read.length === reference.length ? read.template : undefined;
|
|
87
|
+
};
|
|
88
|
+
exports.recordTemplateOfReference = recordTemplateOfReference;
|
|
89
|
+
//# sourceMappingURL=recordFieldReference.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"recordFieldReference.js","sourceRoot":"","sources":["../../src/helpers/recordFieldReference.ts"],"names":[],"mappings":";AAAA,2CAA2C;AAC3C,oHAAoH;AACpH,sHAAsH;AACtH,qHAAqH;AACrH,uHAAuH;AACvH,sHAAsH;AACtH,gCAAgC;;;AAEhC;;;;GAIG;AACH,IAAM,kBAAkB,GAAG,UAAC,IAAY;IACtC,OAAA,IAAI,CAAC,OAAO,CAAC,gBAAgB,EAAE,UAAC,KAAK,IAAK,OAAA,CAAC,KAAK,KAAK,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,YAAK,KAAK,CAAE,CAAC,EAAxC,CAAwC,CAAC;AAAnF,CAAmF,CAAC;AAEtF,uFAAuF;AACvF,IAAM,WAAW,GAAG,UAAC,GAAW,IAAa,OAAA,GAAG,CAAC,OAAO,CAAC,UAAU,EAAE,UAAC,EAAE,IAAK,OAAA,YAAK,EAAE,CAAE,EAAT,CAAS,CAAC,EAA1C,CAA0C,CAAC;AAExF,sFAAsF;AACtF,IAAM,QAAQ,GACZ,gHAAgH,CAAC;AAEnH,iEAAiE;AACjE,IAAM,eAAe,GACnB,oFAAoF,CAAC;AAEvF;;;;GAIG;AACI,IAAM,mBAAmB,GAAG,UACjC,IAAY;IAEZ,IAAM,KAAK,GAAG,eAAe,CAAC,IA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C"}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A field's template catalogue, as Qorus gives it (qorus#646; Qorus `design/template-strings.md` §8): the template
|
|
3
|
+
* contexts the field can really use where it is used - none that would fail there or always read nothing - each
|
|
4
|
+
* with what it is (a container of keys, a set of values, a formatted or an expression argument), whether it can be
|
|
5
|
+
* used whole (`$ctx:*`) and its known keys, nested, each with the exact template that reads it.
|
|
6
|
+
*
|
|
7
|
+
* Qorus gives it for a DPQL document as the language server's `dpql/templateCatalogue {uri, field_context?}`, and
|
|
8
|
+
* for any other field from REST `PUT /api/latest/system?action=getTemplateCatalogue` with the field's context as
|
|
9
|
+
* its body. The picker and typing read it as the "Template contexts" group of a field's templates
|
|
10
|
+
* (`withTemplateCatalogue`): every container has its Use, every key its row.
|
|
11
|
+
*/
|
|
12
|
+
import type { ITemplateNode } from './templateTree';
|
|
13
|
+
/** What a context is: a container of keys, a set of values, or an argument written in a format of its own. */
|
|
14
|
+
export type TTemplateCatalogueContextKind = 'container' | 'values' | 'formatted' | 'expression';
|
|
15
|
+
/** A known key of a context, or of a key that holds keys itself. */
|
|
16
|
+
export interface ITemplateCatalogueKey {
|
|
17
|
+
name: string;
|
|
18
|
+
/** Its path in its context (`s1.customer.name`). */
|
|
19
|
+
path: string;
|
|
20
|
+
/** The template that reads it (`$data:s1.customer.name`). */
|
|
21
|
+
template: string;
|
|
22
|
+
/** It holds a value that can be used whole (a hash): its own template reads all of it. */
|
|
23
|
+
use_whole?: boolean;
|
|
24
|
+
/** It holds keys that are written, not all known here. */
|
|
25
|
+
free_form_keys?: boolean;
|
|
26
|
+
/** Where Qorus knows it from (`declared`, `state-data`, `context-info`, `loop`...). */
|
|
27
|
+
source?: string;
|
|
28
|
+
display_name?: string;
|
|
29
|
+
type?: string;
|
|
30
|
+
base_type?: string;
|
|
31
|
+
description?: string;
|
|
32
|
+
keys?: ITemplateCatalogueKey[];
|
|
33
|
+
}
|
|
34
|
+
/** A template context a field can use. */
|
|
35
|
+
export interface ITemplateCatalogueContext {
|
|
36
|
+
/** Its name, as written between `$` and `:`. */
|
|
37
|
+
name: string;
|
|
38
|
+
display_name?: string;
|
|
39
|
+
description?: string;
|
|
40
|
+
kind: TTemplateCatalogueContextKind;
|
|
41
|
+
sort_priority?: number;
|
|
42
|
+
/** It can be used whole: `whole_template` (`$local:*`) reads all of it. */
|
|
43
|
+
use_whole?: boolean;
|
|
44
|
+
whole_template?: string;
|
|
45
|
+
/** Its keys are written, not all known here (`$dynamic:`). */
|
|
46
|
+
free_form_keys?: boolean;
|
|
47
|
+
needs_arg?: boolean;
|
|
48
|
+
writable?: boolean;
|
|
49
|
+
type?: string;
|
|
50
|
+
/** How its argument is written, for a context of values or a formatted or expression argument. */
|
|
51
|
+
arg_format?: string;
|
|
52
|
+
keys?: ITemplateCatalogueKey[];
|
|
53
|
+
}
|
|
54
|
+
/** Where a field is, as Qorus is told it (`field_context`): what decides the contexts the field can use. */
|
|
55
|
+
export interface ITemplateFieldContext {
|
|
56
|
+
interface_type?: 'qog' | 'workflow' | 'step' | 'service' | 'job' | 'pipeline' | 'class' | 'test' | 'alert-payload' | 'generic';
|
|
57
|
+
interface_name?: string;
|
|
58
|
+
interface_version?: string;
|
|
59
|
+
/** A draft's ID, for a configuration item of an interface not saved yet. */
|
|
60
|
+
interface_id?: string;
|
|
61
|
+
/** A Qog: as it is edited, by its draft, or saved; makes the field a Qog field. */
|
|
62
|
+
fsm?: Record<string, unknown>;
|
|
63
|
+
draft_id?: string;
|
|
64
|
+
fsmid?: number;
|
|
65
|
+
/** The Qog state the field is in (its key or ID). */
|
|
66
|
+
current_state?: string;
|
|
67
|
+
/** What runs the Qog; derived from its references when not given. */
|
|
68
|
+
hosts?: Array<{
|
|
69
|
+
type: string;
|
|
70
|
+
name: string;
|
|
71
|
+
}>;
|
|
72
|
+
record_expression?: boolean;
|
|
73
|
+
record_search?: boolean;
|
|
74
|
+
/** A record's fields, for a field outside a DPQL document (REST). */
|
|
75
|
+
record_fields?: Record<string, unknown>;
|
|
76
|
+
/** `write` for a field that names where a value is written. */
|
|
77
|
+
mode?: 'read' | 'write';
|
|
78
|
+
data_context?: unknown;
|
|
79
|
+
}
|
|
80
|
+
/** A field's catalogue: the context Qorus resolved for it and the contexts it can use. */
|
|
81
|
+
export interface ITemplateCatalogue {
|
|
82
|
+
field_context?: Record<string, unknown>;
|
|
83
|
+
contexts: ITemplateCatalogueContext[];
|
|
84
|
+
}
|
|
85
|
+
/** The id of the "Template contexts" group in a field's templates. */
|
|
86
|
+
export declare const TEMPLATE_CONTEXTS_GROUP_ID = "contexts";
|
|
87
|
+
/** A context, written to go on into it: `$local:`. */
|
|
88
|
+
export declare const catalogueContextReference: (context: ITemplateCatalogueContext) => string;
|
|
89
|
+
/**
|
|
90
|
+
* A context's node: `$local:` - a container of its keys, used whole as `$local:*` where the value takes a record
|
|
91
|
+
* and Qorus reads it whole. A context of keys written freely, or of an argument written in its own format, goes on
|
|
92
|
+
* into what is written after its `:` (`continues`) where none of its keys is known.
|
|
93
|
+
*/
|
|
94
|
+
export declare const catalogueContextNode: (context: ITemplateCatalogueContext, wholeRecords?: boolean, parentId?: string, trail?: string[]) => ITemplateNode;
|
|
95
|
+
/**
|
|
96
|
+
* A field's templates with its catalogue's contexts as the "Template contexts" group (qorus#646, David's review:
|
|
97
|
+
* every container that can be used has Use, and the picker offers what typing offers): each context the field can
|
|
98
|
+
* use, in the catalogue's order, with its keys. It replaces a "Template contexts" group read from the field's own
|
|
99
|
+
* templates, which could only guess what Qorus reads.
|
|
100
|
+
*/
|
|
101
|
+
export declare const withTemplateCatalogue: (roots: ITemplateNode[], catalogue: ITemplateCatalogue | undefined, wholeRecords?: boolean) => ITemplateNode[];
|
|
102
|
+
/** The catalogue context a reference is written in (`local` of `$local:type`), if the catalogue offers it. */
|
|
103
|
+
export declare const catalogueContextOf: (catalogue: ITemplateCatalogue | undefined, reference: string) => ITemplateCatalogueContext | undefined;
|
|
104
|
+
//# sourceMappingURL=templateCatalogue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"templateCatalogue.d.ts","sourceRoot":"","sources":["../../src/helpers/templateCatalogue.ts"],"names":[],"mappings":"AACA;;;;;;;;;;GAUG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAGpD,8GAA8G;AAC9G,MAAM,MAAM,6BAA6B,GAAG,WAAW,GAAG,QAAQ,GAAG,WAAW,GAAG,YAAY,CAAC;AAEhG,oEAAoE;AACpE,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,MAAM,CAAC;IACb,oDAAoD;IACpD,IAAI,EAAE,MAAM,CAAC;IACb,6DAA6D;IAC7D,QAAQ,EAAE,MAAM,CAAC;IACjB,0FAA0F;IAC1F,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,0DAA0D;IAC1D,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,uFAAuF;IACvF,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,qBAAqB,EAAE,CAAC;CAChC;AAED,0CAA0C;AAC1C,MAAM,WAAW,yBAAyB;IACxC,gDAAgD;IAChD,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,6BAA6B,CAAC;IACpC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,2EAA2E;IAC3E,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,8DAA8D;IAC9D,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QA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E,eAAO,MAAM,0BAA0B,aAAa,CAAC;AAErD,sDAAsD;AACtD,eAAO,MAAM,yBAAyB,YAAa,yBAAyB,KAAG,MAC1D,CAAC;AAqCtB;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,YACtB,yBAAyB,iBACnB,OAAO,6BAEf,MAAM,EAAE,KACd,aAwBF,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,UACzB,aAAa,EAAE,aACX,kBAAkB,GAAG,SAAS,iBAC1B,OAAO,KACrB,aAAa,EAsBf,CAAC;AAEF,8GAA8G;AAC9G,eAAO,MAAM,kBAAkB,cAClB,kBAAkB,GAAG,SAAS,aAC9B,MAAM,KAChB,yBAAyB,GAAG,SAG9B,CAAC"}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
14
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
15
|
+
if (ar || !(i in from)) {
|
|
16
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
17
|
+
ar[i] = from[i];
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
21
|
+
};
|
|
22
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
23
|
+
exports.catalogueContextOf = exports.withTemplateCatalogue = exports.catalogueContextNode = exports.catalogueContextReference = exports.TEMPLATE_CONTEXTS_GROUP_ID = void 0;
|
|
24
|
+
var templateTree_1 = require("./templateTree");
|
|
25
|
+
/** A type as a row names it: Qore's `auto` is any type (`any`), never an unknown one. */
|
|
26
|
+
var typeOf = function (type) { return (type === 'auto' ? 'any' : type); };
|
|
27
|
+
/** The id of the "Template contexts" group in a field's templates. */
|
|
28
|
+
exports.TEMPLATE_CONTEXTS_GROUP_ID = 'contexts';
|
|
29
|
+
/** A context, written to go on into it: `$local:`. */
|
|
30
|
+
var catalogueContextReference = function (context) {
|
|
31
|
+
return "$".concat(context.name, ":");
|
|
32
|
+
};
|
|
33
|
+
exports.catalogueContextReference = catalogueContextReference;
|
|
34
|
+
var keyNode = function (key, id, trail, trailIds, wholeRecords) {
|
|
35
|
+
var _a, _b;
|
|
36
|
+
var label = (_a = key.display_name) !== null && _a !== void 0 ? _a : key.name;
|
|
37
|
+
var children = (_b = key.keys) === null || _b === void 0 ? void 0 : _b.map(function (child, index) {
|
|
38
|
+
return keyNode(child, "".concat(id, ".").concat(index), __spreadArray(__spreadArray([], trail, true), [label], false), __spreadArray(__spreadArray([], trailIds, true), [id], false), wholeRecords);
|
|
39
|
+
});
|
|
40
|
+
return __assign({ id: id, label: label, value: key.template,
|
|
41
|
+
// what typing reaches it by: its reference without braces (`$static:order.customer-name`)
|
|
42
|
+
reference: (0, templateTree_1.unbracedReference)(key.template), kind: (0, templateTree_1.templateNodeKindOf)(key.template), type: typeOf(key.type), baseType: key.base_type,
|
|
43
|
+
// named by its display name, the key as it is written under it (`$local:type`), then what it is
|
|
44
|
+
description: key.display_name ?
|
|
45
|
+
[key.template, key.description].filter(Boolean).join(' · ')
|
|
46
|
+
: key.description,
|
|
47
|
+
// where Qorus knows it from (`declared`, `loop`) is the server's own: not said in the row
|
|
48
|
+
trail: trail, trailIds: trailIds }, ((children === null || children === void 0 ? void 0 : children.length) ?
|
|
49
|
+
// a key that holds keys: what is in it, and all of it where the value takes a record
|
|
50
|
+
{ children: children, takesWhole: wholeRecords !== false && !!key.use_whole }
|
|
51
|
+
: {}));
|
|
52
|
+
};
|
|
53
|
+
/**
|
|
54
|
+
* A context's node: `$local:` - a container of its keys, used whole as `$local:*` where the value takes a record
|
|
55
|
+
* and Qorus reads it whole. A context of keys written freely, or of an argument written in its own format, goes on
|
|
56
|
+
* into what is written after its `:` (`continues`) where none of its keys is known.
|
|
57
|
+
*/
|
|
58
|
+
var catalogueContextNode = function (context, wholeRecords, parentId, trail) {
|
|
59
|
+
var _a;
|
|
60
|
+
if (parentId === void 0) { parentId = exports.TEMPLATE_CONTEXTS_GROUP_ID; }
|
|
61
|
+
if (trail === void 0) { trail = [templateTree_1.TEMPLATE_CONTEXTS_LABEL]; }
|
|
62
|
+
var reference = (0, exports.catalogueContextReference)(context);
|
|
63
|
+
var id = "".concat(parentId, ".").concat(reference);
|
|
64
|
+
var children = (_a = context.keys) === null || _a === void 0 ? void 0 : _a.map(function (key, index) {
|
|
65
|
+
return keyNode(key, "".concat(id, ".").concat(index), __spreadArray(__spreadArray([], trail, true), [reference], false), [parentId, id], wholeRecords);
|
|
66
|
+
});
|
|
67
|
+
var whole = wholeRecords !== false && !!context.use_whole && !!context.whole_template;
|
|
68
|
+
return __assign(__assign({ id: id, label: reference, reference: reference, kind: 'context', description: [context.display_name, context.description, context.arg_format]
|
|
69
|
+
.filter(Boolean)
|
|
70
|
+
.join(' · '), type: typeOf(context.type), trail: trail, trailIds: [parentId], catalogue: context,
|
|
71
|
+
// keys written freely are not offered as one row each: what is written after the `:` is the key
|
|
72
|
+
writesKey: !!context.free_form_keys }, ((children === null || children === void 0 ? void 0 : children.length) ? { children: children } : { continues: true })), (whole ? { value: context.whole_template, takesWhole: true } : {}));
|
|
73
|
+
};
|
|
74
|
+
exports.catalogueContextNode = catalogueContextNode;
|
|
75
|
+
/**
|
|
76
|
+
* A field's templates with its catalogue's contexts as the "Template contexts" group (qorus#646, David's review:
|
|
77
|
+
* every container that can be used has Use, and the picker offers what typing offers): each context the field can
|
|
78
|
+
* use, in the catalogue's order, with its keys. It replaces a "Template contexts" group read from the field's own
|
|
79
|
+
* templates, which could only guess what Qorus reads.
|
|
80
|
+
*/
|
|
81
|
+
var withTemplateCatalogue = function (roots, catalogue, wholeRecords) {
|
|
82
|
+
var _a;
|
|
83
|
+
if (!((_a = catalogue === null || catalogue === void 0 ? void 0 : catalogue.contexts) === null || _a === void 0 ? void 0 : _a.length)) {
|
|
84
|
+
return roots;
|
|
85
|
+
}
|
|
86
|
+
var group = {
|
|
87
|
+
id: exports.TEMPLATE_CONTEXTS_GROUP_ID,
|
|
88
|
+
label: templateTree_1.TEMPLATE_CONTEXTS_LABEL,
|
|
89
|
+
kind: 'context',
|
|
90
|
+
description: 'Each context, to pick what is in it or to take it whole',
|
|
91
|
+
trail: [],
|
|
92
|
+
trailIds: [],
|
|
93
|
+
// in the order Qorus means them to be read (`sort_priority`), as it lists them where it gives none
|
|
94
|
+
children: catalogue.contexts
|
|
95
|
+
.map(function (context, index) { return ({ context: context, index: index }); })
|
|
96
|
+
.sort(function (a, b) {
|
|
97
|
+
var _a, _b;
|
|
98
|
+
return ((_a = a.context.sort_priority) !== null && _a !== void 0 ? _a : Number.MAX_SAFE_INTEGER) -
|
|
99
|
+
((_b = b.context.sort_priority) !== null && _b !== void 0 ? _b : Number.MAX_SAFE_INTEGER) || a.index - b.index;
|
|
100
|
+
})
|
|
101
|
+
.map(function (_a) {
|
|
102
|
+
var context = _a.context;
|
|
103
|
+
return (0, exports.catalogueContextNode)(context, wholeRecords);
|
|
104
|
+
}),
|
|
105
|
+
};
|
|
106
|
+
return __spreadArray(__spreadArray([], roots.filter(function (node) { return node.id !== exports.TEMPLATE_CONTEXTS_GROUP_ID; }), true), [group], false);
|
|
107
|
+
};
|
|
108
|
+
exports.withTemplateCatalogue = withTemplateCatalogue;
|
|
109
|
+
/** The catalogue context a reference is written in (`local` of `$local:type`), if the catalogue offers it. */
|
|
110
|
+
var catalogueContextOf = function (catalogue, reference) {
|
|
111
|
+
var _a;
|
|
112
|
+
var name = (_a = /^\$([\w-]+):/.exec(reference)) === null || _a === void 0 ? void 0 : _a[1];
|
|
113
|
+
return name ? catalogue === null || catalogue === void 0 ? void 0 : catalogue.contexts.find(function (context) { return context.name === name; }) : undefined;
|
|
114
|
+
};
|
|
115
|
+
exports.catalogueContextOf = catalogueContextOf;
|
|
116
|
+
//# sourceMappingURL=templateCatalogue.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"templateCatalogue.js","sourceRoot":"","sources":["../../src/helpers/templateCatalogue.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAaA,+CAAgG;AAsFhG,yFAAyF;AACzF,IAAM,MAAM,GAAG,UAAC,IAAwB,IAAyB,OAAA,CAAC,IAAI,KAAK,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,EAAhC,CAAgC,CAAC;AAElG,sEAAsE;AACzD,QAAA,0BAA0B,GAAG,UAAU,CAAC;AAErD,sDAAsD;AAC/C,IAAM,yBAAyB,GAAG,UAAC,OAAkC;IAC1E,OAAA,WAAI,OAAO,CAAC,IAAI,MAAG;AAAnB,CAAmB,CAAC;AADT,QAAA,yBAAyB,6BAChB;AAEtB,IAAM,OAAO,GAAG,UACd,GAA0B,EAC1B,EAAU,EACV,KAAe,EACf,QAAkB,EAClB,YAAsB;;IAEtB,IAAM,KAAK,GAAG,MAAA,GAAG,CAAC,YAAY,mCAAI,GAAG,CAAC,IAAI,CAAC;IAC3C,IAAM,QAAQ,GAAG,MAAA,GAAG,CAAC,IAAI,0CAAE,GAAG,CAAC,UAAC,KAAK,EAAE,KAAK;QAC1C,OAAA,OAAO,CAAC,KAAK,EAAE,UAAG,EAAE,cAAI,KAAK,CAAE,kCAAM,KAAK,UAAE,KAAK,2CAAO,QAAQ,UAAE,EAAE,WAAG,YAAY,CAAC;IAApF,CAAoF,CACrF,CAAC;IACF,kBACE,EAAE,IAAA,EACF,KAAK,OAAA,EACL,KAAK,E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OAAO,IAAK,OAAA,OAAO,CAAC,IAAI,KAAK,IAAI,EAArB,CAAqB,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;AACzF,CAAC,CAAC;AANW,QAAA,kBAAkB,sBAM7B"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The template catalogue of the fields inside it, and where they are (qorus#646): a host that knows where its fields
|
|
3
|
+
* are - an interface's editor, a Qog state's options - asks Qorus for their catalogue (REST `getTemplateCatalogue`
|
|
4
|
+
* with their field context) and gives both here. Every rich-text, template and DPQL field inside offers the
|
|
5
|
+
* catalogue's contexts without each being handed it, and a DPQL field tells its language server where it is
|
|
6
|
+
* (`field_context`), for the server's own catalogue and completions. A field's own props are its own.
|
|
7
|
+
*/
|
|
8
|
+
import { ReactNode } from 'react';
|
|
9
|
+
import type { ITemplateCatalogue, ITemplateFieldContext } from './templateCatalogue';
|
|
10
|
+
export declare const TemplateCatalogueProvider: ({ catalogue, fieldContext, children, }: {
|
|
11
|
+
catalogue?: ITemplateCatalogue;
|
|
12
|
+
fieldContext?: ITemplateFieldContext;
|
|
13
|
+
children?: ReactNode;
|
|
14
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
/** The template catalogue of the fields here, if a host gave one (`TemplateCatalogueProvider`). */
|
|
16
|
+
export declare const useTemplateCatalogue: () => ITemplateCatalogue | undefined;
|
|
17
|
+
/** Where the fields here are, if a host said (`TemplateCatalogueProvider`). */
|
|
18
|
+
export declare const useTemplateFieldContext: () => ITemplateFieldContext | undefined;
|
|
19
|
+
//# sourceMappingURL=templateCatalogueContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"templateCatalogueContext.d.ts","sourceRoot":"","sources":["../../src/helpers/templateCatalogueContext.tsx"],"names":[],"mappings":"AACA;;;;;;GAMG;AACH,OAAO,EAAiB,SAAS,EAAuB,MAAM,OAAO,CAAC;AACtE,OAAO,KAAK,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AASrF,eAAO,MAAM,yBAAyB,2CAInC;IACD,SAAS,CAAC,EAAE,kBAAkB,CAAC;IAC/B,YAAY,CAAC,EAAE,qBAAqB,CAAC;IACrC,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB,4CAGA,CAAC;AAEF,mGAAmG;AACnG,eAAO,MAAM,oBAAoB,QAAO,kBAAkB,GAAG,SACb,CAAC;AAEjD,+EAA+E;AAC/E,eAAO,MAAM,uBAAuB,QAAO,qBAAqB,GAAG,SAChB,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useTemplateFieldContext = exports.useTemplateCatalogue = exports.TemplateCatalogueProvider = void 0;
|
|
4
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
// Copyright 2026 Qore Technologies, s.r.o.
|
|
6
|
+
/**
|
|
7
|
+
* The template catalogue of the fields inside it, and where they are (qorus#646): a host that knows where its fields
|
|
8
|
+
* are - an interface's editor, a Qog state's options - asks Qorus for their catalogue (REST `getTemplateCatalogue`
|
|
9
|
+
* with their field context) and gives both here. Every rich-text, template and DPQL field inside offers the
|
|
10
|
+
* catalogue's contexts without each being handed it, and a DPQL field tells its language server where it is
|
|
11
|
+
* (`field_context`), for the server's own catalogue and completions. A field's own props are its own.
|
|
12
|
+
*/
|
|
13
|
+
var react_1 = require("react");
|
|
14
|
+
var TemplateCatalogueContext = (0, react_1.createContext)({});
|
|
15
|
+
var TemplateCatalogueProvider = function (_a) {
|
|
16
|
+
var catalogue = _a.catalogue, fieldContext = _a.fieldContext, children = _a.children;
|
|
17
|
+
var value = (0, react_1.useMemo)(function () { return ({ catalogue: catalogue, fieldContext: fieldContext }); }, [catalogue, fieldContext]);
|
|
18
|
+
return (0, jsx_runtime_1.jsx)(TemplateCatalogueContext.Provider, { value: value, children: children });
|
|
19
|
+
};
|
|
20
|
+
exports.TemplateCatalogueProvider = TemplateCatalogueProvider;
|
|
21
|
+
/** The template catalogue of the fields here, if a host gave one (`TemplateCatalogueProvider`). */
|
|
22
|
+
var useTemplateCatalogue = function () {
|
|
23
|
+
return (0, react_1.useContext)(TemplateCatalogueContext).catalogue;
|
|
24
|
+
};
|
|
25
|
+
exports.useTemplateCatalogue = useTemplateCatalogue;
|
|
26
|
+
/** Where the fields here are, if a host said (`TemplateCatalogueProvider`). */
|
|
27
|
+
var useTemplateFieldContext = function () {
|
|
28
|
+
return (0, react_1.useContext)(TemplateCatalogueContext).fieldContext;
|
|
29
|
+
};
|
|
30
|
+
exports.useTemplateFieldContext = useTemplateFieldContext;
|
|
31
|
+
//# sourceMappingURL=templateCatalogueContext.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"templateCatalogueContext.js","sourceRoot":"","sources":["../../src/helpers/templateCatalogueContext.tsx"],"names":[],"mappings":";;;;AAAA,2CAA2C;AAC3C;;;;;;GAMG;AACH,+BAAsE;AAQtE,IAAM,wBAAwB,GAAG,IAAA,qBAAa,EAAiC,EAAE,CAAC,CAAC;AAE5E,IAAM,yBAAyB,GAAG,UAAC,EAQzC;QAPC,SAAS,eAAA,EACT,YAAY,kBAAA,EACZ,QAAQ,cAAA;IAMR,IAAM,KAAK,GAAG,IAAA,eAAO,EAAC,cAAM,OAAA,CAAC,EAAE,SAAS,WAAA,EAAE,YAAY,cAAA,EAAE,CAAC,EAA7B,CAA6B,EAAE,CAAC,SAAS,EAAE,YAAY,CAAC,CAAC,CAAC;IACtF,OAAO,uBAAC,wBAAwB,CAAC,QAAQ,IAAC,KAAK,EAAE,KAAK,YAAG,QAAQ,GAAqC,CAAC;AACzG,CAAC,CAAC;AAXW,QAAA,yBAAyB,6BAWpC;AAEF,mGAAmG;AAC5F,IAAM,oBAAoB,GAAG;IAClC,OAAA,IAAA,kBAAU,EAAC,wBAAwB,CAAC,CAAC,SAAS;AAA9C,CAA8C,CAAC;AADpC,QAAA,oBAAoB,wBACgB;AAEjD,+EAA+E;AACxE,IAAM,uBAAuB,GAAG;IACrC,OAAA,IAAA,kBAAU,EAAC,wBAAwB,CAAC,CAAC,YAAY;AAAjD,CAAiD,CAAC;AADvC,QAAA,uBAAuB,2BACgB"}
|
|
@@ -40,8 +40,8 @@ export declare const templateItemsToShow: <T>(items: T[] | undefined) => T[] | u
|
|
|
40
40
|
* description into a `ReqoreTextEffect` and styled-components filters the prop
|
|
41
41
|
* off the DOM.
|
|
42
42
|
*
|
|
43
|
-
* Without a host renderer
|
|
44
|
-
*
|
|
43
|
+
* Without a host renderer a description reads as the prose its markdown renders
|
|
44
|
+
* to (`markdownToProse`): the words, none of the marks, on the row's one line.
|
|
45
45
|
*/
|
|
46
46
|
export declare const renderTemplateItemDescriptions: <T>(items: T[] | undefined, render: TMarkdownRenderer | undefined) => T[] | undefined;
|
|
47
47
|
//# sourceMappingURL=templateItems.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"templateItems.d.ts","sourceRoot":"","sources":["../../src/helpers/templateItems.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mDAAmD,CAAC;
|
|
1
|
+
{"version":3,"file":"templateItems.d.ts","sourceRoot":"","sources":["../../src/helpers/templateItems.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mDAAmD,CAAC;AAG3F;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,mBAAmB,aAAe,CAAC,EAAE,GAAG,SAAS,KAAG,CAAC,EAAE,GAAG,SAMtE,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,eAAO,MAAM,8BAA8B,aAClC,CAAC,EAAE,GAAG,SAAS,UACd,iBAAiB,GAAG,SAAS,KACpC,CAAC,EAAE,GAAG,SAyBR,CAAC"}
|
|
@@ -12,6 +12,7 @@ var __assign = (this && this.__assign) || function () {
|
|
|
12
12
|
};
|
|
13
13
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
14
|
exports.renderTemplateItemDescriptions = exports.templateItemsToShow = void 0;
|
|
15
|
+
var markdownText_1 = require("./markdownText");
|
|
15
16
|
/**
|
|
16
17
|
* What a template picker should actually list.
|
|
17
18
|
*
|
|
@@ -60,11 +61,11 @@ exports.templateItemsToShow = templateItemsToShow;
|
|
|
60
61
|
* description into a `ReqoreTextEffect` and styled-components filters the prop
|
|
61
62
|
* off the DOM.
|
|
62
63
|
*
|
|
63
|
-
* Without a host renderer
|
|
64
|
-
*
|
|
64
|
+
* Without a host renderer a description reads as the prose its markdown renders
|
|
65
|
+
* to (`markdownToProse`): the words, none of the marks, on the row's one line.
|
|
65
66
|
*/
|
|
66
67
|
var renderTemplateItemDescriptions = function (items, render) {
|
|
67
|
-
if (!
|
|
68
|
+
if (!(items === null || items === void 0 ? void 0 : items.length)) {
|
|
68
69
|
return items;
|
|
69
70
|
}
|
|
70
71
|
return items.map(function (item) {
|
|
@@ -74,7 +75,8 @@ var renderTemplateItemDescriptions = function (items, render) {
|
|
|
74
75
|
/* `compact`, for the reason the context gives: a row is a constrained
|
|
75
76
|
container, and markdown authored as a document opens with a heading
|
|
76
77
|
that would outgrow the label above it. */
|
|
77
|
-
next.description =
|
|
78
|
+
next.description =
|
|
79
|
+
render ? render({ value: entry.description, compact: true }) : (0, markdownText_1.markdownToProse)(entry.description);
|
|
78
80
|
}
|
|
79
81
|
// Only when the item HAS children — writing the key unconditionally would
|
|
80
82
|
// give every leaf an `items` a picker could read as an empty submenu.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"templateItems.js","sourceRoot":"","sources":["../../src/helpers/templateItems.ts"],"names":[],"mappings":";;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"templateItems.js","sourceRoot":"","sources":["../../src/helpers/templateItems.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AACA,+CAAiD;AAEjD;;;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C;YAC/B,IAAI,CAAC,KAAK,GAAG,IAAA,sCAA8B,EAAC,KAAK,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;QACnE,CAAC;QAED,OAAO,IAAS,CAAC;IACnB,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AA5BW,QAAA,8BAA8B,kCA4BzC"}
|
|
@@ -30,6 +30,7 @@ export interface ITemplateTextParagraph {
|
|
|
30
30
|
* floor `describeTemplateReference` documents.
|
|
31
31
|
*/
|
|
32
32
|
export declare const templateChipLabel: (templates: IReqoreFormTemplates | undefined, value: string) => string;
|
|
33
|
+
export declare const catalogueValues: (templates?: IReqoreFormTemplates) => string[];
|
|
33
34
|
/**
|
|
34
35
|
* `text` as paragraphs, one per line, with each template reference a chip.
|
|
35
36
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"templateText.d.ts","sourceRoot":"","sources":["../../src/helpers/templateText.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,oBAAoB,EAAE,MAAM,mDAAmD,CAAC;AAEzF,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAO5C,qBAAqB;AACrB,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,CAAC;CACd;AAED,6CAA6C;AAC7C,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,KAAK,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,iBAAiB,EAAE,CAAC;CAC/B;AAED,8BAA8B;AAC9B,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE,WAAW,CAAC;IAClB,QAAQ,EAAE,KAAK,CAAC,iBAAiB,GAAG,gBAAgB,CAAC,CAAC;CACvD;AAED;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,iBAAiB,cAAe,oBAAoB,GAAG,SAAS,SAAS,MAAM,KAAG,MAM9F,CAAC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