@qoretechnologies/reqraft 0.10.64 → 0.10.65-pr.137.g20c3bec
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 +41 -8
- package/dist/components/dpqlEditor/DpqlEditor.js.map +1 -1
- package/dist/components/dpqlEditor/dpqlCompletions.d.ts +35 -0
- package/dist/components/dpqlEditor/dpqlCompletions.d.ts.map +1 -0
- package/dist/components/dpqlEditor/dpqlCompletions.js +122 -0
- package/dist/components/dpqlEditor/dpqlCompletions.js.map +1 -0
- package/dist/components/dpqlEditor/dpqlHelpers.d.ts +47 -5
- package/dist/components/dpqlEditor/dpqlHelpers.d.ts.map +1 -1
- package/dist/components/dpqlEditor/dpqlHelpers.js +390 -62
- 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 +59 -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 +61 -8
- package/dist/components/dpqlEditor/types.d.ts.map +1 -1
- package/dist/components/dpqlEditor/useDpqlSession.d.ts +2 -2
- package/dist/components/dpqlEditor/useDpqlSession.d.ts.map +1 -1
- package/dist/components/dpqlEditor/useDpqlSession.js +16 -7
- package/dist/components/dpqlEditor/useDpqlSession.js.map +1 -1
- package/dist/components/form/engine/CompactRow.d.ts.map +1 -1
- package/dist/components/form/engine/CompactRow.js +327 -123
- 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 +597 -173
- 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 +32 -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 +22 -10
- package/dist/components/form/engine/compactRowStyles.d.ts.map +1 -1
- package/dist/components/form/engine/compactRowStyles.js +53 -39
- 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 +66 -3
- package/dist/components/form/expressions/ExpressionField.d.ts.map +1 -1
- package/dist/components/form/expressions/ExpressionField.js +475 -100
- package/dist/components/form/expressions/ExpressionField.js.map +1 -1
- package/dist/components/form/expressions/argumentPresence.d.ts +14 -0
- package/dist/components/form/expressions/argumentPresence.d.ts.map +1 -1
- package/dist/components/form/expressions/argumentPresence.js +16 -1
- package/dist/components/form/expressions/argumentPresence.js.map +1 -1
- package/dist/components/form/expressions/builder/argumentDetail.d.ts.map +1 -1
- package/dist/components/form/expressions/builder/argumentDetail.js +4 -1
- package/dist/components/form/expressions/builder/argumentDetail.js.map +1 -1
- package/dist/components/form/expressions/builder/argumentLabel.d.ts.map +1 -1
- package/dist/components/form/expressions/builder/argumentLabel.js +27 -9
- package/dist/components/form/expressions/builder/argumentLabel.js.map +1 -1
- package/dist/components/form/expressions/builder/argumentWrapper.d.ts.map +1 -1
- package/dist/components/form/expressions/builder/argumentWrapper.js +3 -1
- package/dist/components/form/expressions/builder/argumentWrapper.js.map +1 -1
- package/dist/components/form/expressions/builder/confirmMismatchedTypesModal.d.ts.map +1 -1
- package/dist/components/form/expressions/builder/confirmMismatchedTypesModal.js +5 -4
- package/dist/components/form/expressions/builder/confirmMismatchedTypesModal.js.map +1 -1
- package/dist/components/form/expressions/builder/confirmUnsupportedTypeModal.d.ts +1 -1
- package/dist/components/form/expressions/builder/confirmUnsupportedTypeModal.d.ts.map +1 -1
- package/dist/components/form/expressions/builder/confirmUnsupportedTypeModal.js +6 -3
- package/dist/components/form/expressions/builder/confirmUnsupportedTypeModal.js.map +1 -1
- package/dist/components/form/expressions/builder/index.d.ts +29 -2
- package/dist/components/form/expressions/builder/index.d.ts.map +1 -1
- package/dist/components/form/expressions/builder/index.js +161 -78
- package/dist/components/form/expressions/builder/index.js.map +1 -1
- package/dist/components/form/expressions/builder/item.d.ts +6 -2
- package/dist/components/form/expressions/builder/item.d.ts.map +1 -1
- package/dist/components/form/expressions/builder/item.js +19 -5
- package/dist/components/form/expressions/builder/item.js.map +1 -1
- package/dist/components/form/expressions/builder/renderTemplate.js +1 -1
- package/dist/components/form/expressions/builder/renderTemplate.js.map +1 -1
- package/dist/components/form/expressions/dpqlMockRecordPath.d.ts +11 -0
- package/dist/components/form/expressions/dpqlMockRecordPath.d.ts.map +1 -0
- package/dist/components/form/expressions/dpqlMockRecordPath.js +254 -0
- package/dist/components/form/expressions/dpqlMockRecordPath.js.map +1 -0
- package/dist/components/form/expressions/expressionOperands.d.ts +16 -0
- package/dist/components/form/expressions/expressionOperands.d.ts.map +1 -0
- package/dist/components/form/expressions/expressionOperands.js +97 -0
- package/dist/components/form/expressions/expressionOperands.js.map +1 -0
- package/dist/components/form/expressions/fieldPath.d.ts +24 -0
- package/dist/components/form/expressions/fieldPath.d.ts.map +1 -0
- package/dist/components/form/expressions/fieldPath.js +152 -0
- package/dist/components/form/expressions/fieldPath.js.map +1 -0
- package/dist/components/form/expressions/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 +7 -0
- package/dist/components/form/expressions/types.d.ts.map +1 -1
- package/dist/components/form/expressions/types.js +6 -1
- package/dist/components/form/expressions/types.js.map +1 -1
- package/dist/components/form/expressions/useExpressionType.d.ts +26 -0
- package/dist/components/form/expressions/useExpressionType.d.ts.map +1 -0
- package/dist/components/form/expressions/useExpressionType.js +181 -0
- package/dist/components/form/expressions/useExpressionType.js.map +1 -0
- package/dist/components/form/expressions/useRenderExpression.d.ts.map +1 -1
- package/dist/components/form/expressions/useRenderExpression.js +13 -9
- package/dist/components/form/expressions/useRenderExpression.js.map +1 -1
- package/dist/components/form/expressions/wildcardExpressions.d.ts +27 -0
- package/dist/components/form/expressions/wildcardExpressions.d.ts.map +1 -0
- package/dist/components/form/expressions/wildcardExpressions.js +101 -0
- package/dist/components/form/expressions/wildcardExpressions.js.map +1 -0
- package/dist/components/form/fields/Field.d.ts.map +1 -1
- package/dist/components/form/fields/Field.js +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 +20 -1
- package/dist/components/form/fields/auto/AutoFormField.d.ts.map +1 -1
- package/dist/components/form/fields/auto/AutoFormField.js +91 -53
- 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 +8 -1
- package/dist/components/form/fields/rich-text/RichText.d.ts.map +1 -1
- package/dist/components/form/fields/rich-text/RichText.js +211 -85
- 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 +77 -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 +22 -0
- package/dist/components/form/fields/template/TemplateBrowser.d.ts.map +1 -0
- package/dist/components/form/fields/template/TemplateBrowser.js +54 -0
- package/dist/components/form/fields/template/TemplateBrowser.js.map +1 -0
- package/dist/components/form/fields/template/TemplateField.d.ts +103 -1
- package/dist/components/form/fields/template/TemplateField.d.ts.map +1 -1
- package/dist/components/form/fields/template/TemplateField.js +652 -104
- package/dist/components/form/fields/template/TemplateField.js.map +1 -1
- package/dist/components/form/fields/template/TemplateText.d.ts +0 -17
- package/dist/components/form/fields/template/TemplateText.d.ts.map +1 -1
- package/dist/components/form/fields/template/TemplateText.js +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 +11 -0
- package/dist/components/form/index.d.ts.map +1 -1
- package/dist/components/form/index.js +24 -1
- package/dist/components/form/index.js.map +1 -1
- package/dist/components/form/typeSentenceForm.d.ts +11 -0
- package/dist/components/form/typeSentenceForm.d.ts.map +1 -0
- package/dist/components/form/typeSentenceForm.js +40 -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 +16 -8
- package/dist/components/log/Log.js.map +1 -1
- package/dist/components/menu/Menu.d.ts.map +1 -1
- package/dist/components/menu/Menu.js +19 -10
- package/dist/components/menu/Menu.js.map +1 -1
- package/dist/components/smartEditor/CompletionMenu.d.ts +45 -0
- package/dist/components/smartEditor/CompletionMenu.d.ts.map +1 -0
- package/dist/components/smartEditor/CompletionMenu.js +207 -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 +366 -187
- package/dist/components/smartEditor/SmartEditor.js.map +1 -1
- package/dist/components/smartEditor/completionStyle.d.ts +27 -0
- package/dist/components/smartEditor/completionStyle.d.ts.map +1 -0
- package/dist/components/smartEditor/completionStyle.js +68 -0
- package/dist/components/smartEditor/completionStyle.js.map +1 -0
- package/dist/components/smartEditor/index.d.ts +5 -1
- package/dist/components/smartEditor/index.d.ts.map +1 -1
- package/dist/components/smartEditor/index.js +19 -1
- package/dist/components/smartEditor/index.js.map +1 -1
- package/dist/components/smartEditor/templateCompletions.d.ts +38 -0
- package/dist/components/smartEditor/templateCompletions.d.ts.map +1 -0
- package/dist/components/smartEditor/templateCompletions.js +126 -0
- package/dist/components/smartEditor/templateCompletions.js.map +1 -0
- package/dist/components/smartEditor/typedReferences.d.ts +21 -0
- package/dist/components/smartEditor/typedReferences.d.ts.map +1 -0
- package/dist/components/smartEditor/typedReferences.js +82 -0
- package/dist/components/smartEditor/typedReferences.js.map +1 -0
- package/dist/components/smartEditor/types.d.ts +66 -2
- package/dist/components/smartEditor/types.d.ts.map +1 -1
- package/dist/components/smartEditor/useLspAutocomplete.d.ts +62 -2
- package/dist/components/smartEditor/useLspAutocomplete.d.ts.map +1 -1
- package/dist/components/smartEditor/useLspAutocomplete.js +345 -146
- 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 +351 -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/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 +107 -2
- package/dist/helpers/expressions.d.ts.map +1 -1
- package/dist/helpers/expressions.js +223 -8
- package/dist/helpers/expressions.js.map +1 -1
- package/dist/helpers/hoveringPointer.d.ts +26 -0
- package/dist/helpers/hoveringPointer.d.ts.map +1 -0
- package/dist/helpers/hoveringPointer.js +29 -0
- package/dist/helpers/hoveringPointer.js.map +1 -0
- package/dist/helpers/markdownText.d.ts +14 -0
- package/dist/helpers/markdownText.d.ts.map +1 -0
- package/dist/helpers/markdownText.js +160 -0
- package/dist/helpers/markdownText.js.map +1 -0
- package/dist/helpers/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 +85 -0
- package/dist/helpers/qorusTypeCatalogue.d.ts.map +1 -0
- package/dist/helpers/qorusTypeCatalogue.js +301 -0
- package/dist/helpers/qorusTypeCatalogue.js.map +1 -0
- package/dist/helpers/readableColors.d.ts +36 -0
- package/dist/helpers/readableColors.d.ts.map +1 -0
- package/dist/helpers/readableColors.js +116 -0
- package/dist/helpers/readableColors.js.map +1 -0
- package/dist/helpers/recordFieldReference.d.ts +15 -0
- package/dist/helpers/recordFieldReference.d.ts.map +1 -0
- package/dist/helpers/recordFieldReference.js +89 -0
- package/dist/helpers/recordFieldReference.js.map +1 -0
- package/dist/helpers/templateItems.d.ts +2 -2
- package/dist/helpers/templateItems.d.ts.map +1 -1
- package/dist/helpers/templateItems.js +6 -4
- package/dist/helpers/templateItems.js.map +1 -1
- package/dist/helpers/templateText.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/templates.d.ts +68 -14
- package/dist/helpers/templates.d.ts.map +1 -1
- package/dist/helpers/templates.js +210 -24
- package/dist/helpers/templates.js.map +1 -1
- package/dist/helpers/validations.d.ts +28 -1
- package/dist/helpers/validations.d.ts.map +1 -1
- package/dist/helpers/validations.js +166 -37
- 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 +7 -15
- package/dist/hooks/useQorusTypes.d.ts.map +1 -1
- package/dist/hooks/useQorusTypes.js +25 -166
- package/dist/hooks/useQorusTypes.js.map +1 -1
- package/dist/hooks/useReadableIntentShade.d.ts +9 -0
- package/dist/hooks/useReadableIntentShade.d.ts.map +1 -0
- package/dist/hooks/useReadableIntentShade.js +23 -0
- package/dist/hooks/useReadableIntentShade.js.map +1 -0
- package/dist/hooks/useReadableOpacity.d.ts +6 -0
- package/dist/hooks/useReadableOpacity.d.ts.map +1 -0
- package/dist/hooks/useReadableOpacity.js +17 -0
- package/dist/hooks/useReadableOpacity.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/tracking/ui/ExperimentCard.d.ts +1 -1
- package/dist/tracking/ui/ExperimentCard.d.ts.map +1 -1
- package/dist/tracking/ui/ExperimentCard.js +26 -10
- package/dist/tracking/ui/ExperimentCard.js.map +1 -1
- package/dist/tracking/ui/card.d.ts +2 -2
- package/dist/tracking/ui/card.d.ts.map +1 -1
- package/dist/tracking/ui/card.js +2 -2
- package/dist/tracking/ui/card.js.map +1 -1
- package/dist/tracking/ui/readable.d.ts +14 -0
- package/dist/tracking/ui/readable.d.ts.map +1 -0
- package/dist/tracking/ui/readable.js +60 -0
- package/dist/tracking/ui/readable.js.map +1 -0
- package/dist/utils/fetch.d.ts +9 -2
- package/dist/utils/fetch.d.ts.map +1 -1
- package/dist/utils/fetch.js +6 -5
- package/dist/utils/fetch.js.map +1 -1
- package/dist/utils/websocket.d.ts +65 -2
- package/dist/utils/websocket.d.ts.map +1 -1
- package/dist/utils/websocket.js +276 -44
- package/dist/utils/websocket.js.map +1 -1
- package/package.json +14 -5
- package/.claude/CLAUDE.md +0 -317
- package/.tasks/EXPORT_EXPRESSION_BUILDER.md +0 -38
- package/.tasks/EXPRESSION_BUILDER_REPORT.md +0 -149
- package/.tasks/EXPRESSION_FIELD_SEAMS.md +0 -66
- package/.tasks/FIELD_STACK_REPORT.md +0 -234
- package/.tasks/FORM_ENGINE_COMPACT_READ_FIRST.md +0 -558
- package/.tasks/FORM_ENGINE_EXPRESSIONS.md +0 -197
- package/.tasks/FORM_ENGINE_OPTIONS_SYNC.md +0 -95
- package/.tasks/FORM_FIELD_EXTRAS.md +0 -72
- package/.tasks/INDEX.md +0 -111
- package/.tasks/LSP_SHARED_CONNECTION.md +0 -75
- package/.tasks/QONSOLE_ASSIST_FEATURES.md +0 -306
- package/.tasks/RENDER_EXPRESSION_LSP.md +0 -159
- package/.tasks/REQRAFT_AUTO_FIELD.md +0 -176
- package/.tasks/SCHEMA_DEFINITION_FIELD.md +0 -250
- package/.tasks/SMART_EDITOR_CONTEXT_AND_POLISH.md +0 -340
- package/.tasks/SMART_EDITOR_LSP_FEATURES.md +0 -299
- package/.tasks/SMART_EDITOR_REVIEW_FOLLOWUPS.md +0 -280
- package/.tasks/SMART_EDITOR_UX_POLISH.md +0 -383
- package/.tasks/SMART_EDITOR_VISUAL_POLISH.md +0 -246
- package/.tasks/STORY_NETWORK_ISOLATION.md +0 -98
- package/.tasks/TEMPLATE_TOKEN_GRAMMAR.md +0 -72
- package/CODE_OF_CONDUCT.md +0 -105
- package/CONTRIBUTING.MD +0 -78
- package/SECURITY.md +0 -3
- package/chromatic.config.json +0 -5
- package/design/COMPACT_ENGINE_REDESIGN.md +0 -156
- package/design/COMPACT_INFO_DISPLAY.md +0 -87
- package/design/COMPACT_PARITY.md +0 -85
- package/design/EXPRESSION_BUILDER_REPORT_STRATEGY.md +0 -92
- package/design/FORM_ENGINE_COMPACT.md +0 -300
- package/design/FORM_ENGINE_COMPACT_UX_PLAN.md +0 -353
- package/design/FORM_ENGINE_EXPRESSIONS.md +0 -257
- package/design/FORM_ENGINE_FIELD_MIGRATION.md +0 -419
- package/design/IDE_INTEGRATION.md +0 -64
- package/design/RENDER_EXPRESSION_TRANSPORT.md +0 -156
- package/design/SELECT_DIALOG_FLOOR.md +0 -86
- package/design/SMART_EDITOR_UX.md +0 -438
- package/design/TRACKING.md +0 -290
- package/design/UNAVAILABLE_ALLOWED_VALUES.md +0 -226
- package/src/components/Description/index.tsx +0 -254
- package/src/components/Description/markdownRendererContext.tsx +0 -29
- package/src/components/FocusedEditing/index.tsx +0 -50
- package/src/components/codeSize/index.tsx +0 -79
- package/src/components/composer/Composer.stories.tsx +0 -238
- package/src/components/composer/Composer.tsx +0 -554
- package/src/components/composer/helpers.ts +0 -74
- package/src/components/composer/index.ts +0 -2
- package/src/components/dpqlEditor/DpqlEditor.stories.tsx +0 -1183
- package/src/components/dpqlEditor/DpqlEditor.tsx +0 -219
- package/src/components/dpqlEditor/dpqlHelpers.ts +0 -287
- package/src/components/dpqlEditor/dpqlInserter.ts +0 -121
- package/src/components/dpqlEditor/dpqlProbe.ts +0 -165
- package/src/components/dpqlEditor/dpqlTags.ts +0 -114
- package/src/components/dpqlEditor/index.ts +0 -41
- package/src/components/dpqlEditor/types.ts +0 -203
- package/src/components/dpqlEditor/useDpqlProbe.ts +0 -33
- package/src/components/dpqlEditor/useDpqlSession.ts +0 -411
- package/src/components/form/engine/CompactRow.tsx +0 -2620
- package/src/components/form/engine/CompactToolbar.tsx +0 -330
- package/src/components/form/engine/FormEngine.stories.tsx +0 -9920
- package/src/components/form/engine/FormEngine.tsx +0 -4569
- package/src/components/form/engine/FormEngineRemote.stories.tsx +0 -679
- package/src/components/form/engine/FormEngineStickyHeaders.stories.tsx +0 -331
- package/src/components/form/engine/FormFieldsSkeleton.tsx +0 -82
- package/src/components/form/engine/OptionFieldMessages.tsx +0 -477
- package/src/components/form/engine/OptionsHelpDialog.tsx +0 -29
- package/src/components/form/engine/__fixtures__/basicFormOptions.ts +0 -309
- package/src/components/form/engine/__fixtures__/fieldChromeOptions.ts +0 -45
- package/src/components/form/engine/_structuredData/SchemaDataView.stories.tsx +0 -233
- package/src/components/form/engine/_structuredData/SchemaDataView.tsx +0 -742
- package/src/components/form/engine/_structuredData/StructuredDataView.stories.tsx +0 -85
- package/src/components/form/engine/_structuredData/StructuredDataView.tsx +0 -75
- package/src/components/form/engine/_structuredData/structuredData.ts +0 -145
- package/src/components/form/engine/compactRowContext.ts +0 -148
- package/src/components/form/engine/compactRowStyles.ts +0 -898
- package/src/components/form/engine/compactToolbarContext.ts +0 -69
- package/src/components/form/engine/optionActions.ts +0 -128
- package/src/components/form/engine/optionsContext.ts +0 -24
- package/src/components/form/engine/readFirst.ts +0 -1077
- package/src/components/form/engine/rendererTypes.ts +0 -107
- package/src/components/form/engine/revealRow.ts +0 -123
- package/src/components/form/engine/rowFocus.ts +0 -101
- package/src/components/form/engine/rowMenuContext.ts +0 -159
- package/src/components/form/engine/rowOpenPicker.ts +0 -27
- package/src/components/form/engine/typeChoices.ts +0 -63
- package/src/components/form/engine/variants/FormEngineVariants.stories.tsx +0 -159
- package/src/components/form/engine/variants/VariantCalmTable.tsx +0 -244
- package/src/components/form/engine/variants/VariantCards.tsx +0 -212
- package/src/components/form/engine/variants/VariantFocus.tsx +0 -382
- package/src/components/form/engine/variants/VariantMinimal.tsx +0 -170
- package/src/components/form/engine/variants/focusDemo.ts +0 -145
- package/src/components/form/engine/variants/variantModel.ts +0 -223
- package/src/components/form/engine/variants/variantParts.tsx +0 -313
- package/src/components/form/expressions/DpqlRendering.tsx +0 -85
- package/src/components/form/expressions/ExpressionField.stories.tsx +0 -1395
- package/src/components/form/expressions/ExpressionField.tsx +0 -503
- package/src/components/form/expressions/argumentPresence.ts +0 -213
- package/src/components/form/expressions/builder/ExpressionBuilder.stories.tsx +0 -1683
- package/src/components/form/expressions/builder/argumentDetail.tsx +0 -17
- package/src/components/form/expressions/builder/argumentLabel.tsx +0 -146
- package/src/components/form/expressions/builder/argumentSlot.tsx +0 -101
- package/src/components/form/expressions/builder/argumentWrapper.tsx +0 -243
- package/src/components/form/expressions/builder/confirmMismatchedTypesModal.tsx +0 -120
- package/src/components/form/expressions/builder/confirmUnsupportedTypeModal.tsx +0 -69
- package/src/components/form/expressions/builder/index.tsx +0 -1545
- package/src/components/form/expressions/builder/item.tsx +0 -89
- package/src/components/form/expressions/builder/moveToPositionStrip.tsx +0 -156
- package/src/components/form/expressions/builder/renderTemplate.tsx +0 -42
- package/src/components/form/expressions/dpqlMockLanguage.ts +0 -566
- package/src/components/form/expressions/dpqlMockLsp.ts +0 -126
- package/src/components/form/expressions/mockExpressions.ts +0 -317
- package/src/components/form/expressions/renderExpressionToText.ts +0 -137
- package/src/components/form/expressions/types.ts +0 -110
- package/src/components/form/expressions/useExpressions.ts +0 -101
- package/src/components/form/expressions/useRenderExpression.ts +0 -165
- package/src/components/form/fields/Field.stories.tsx +0 -143
- package/src/components/form/fields/Field.tsx +0 -732
- package/src/components/form/fields/allowed-values/AllowedValues.tsx +0 -297
- package/src/components/form/fields/array/ArrayAuto.tsx +0 -237
- package/src/components/form/fields/array/ArrayAutoField.stories.tsx +0 -475
- package/src/components/form/fields/array/ArrayAutoField.tsx +0 -367
- package/src/components/form/fields/auto/AutoFormField.stories.tsx +0 -825
- package/src/components/form/fields/auto/AutoFormField.tsx +0 -1164
- package/src/components/form/fields/binary/Binary.stories.tsx +0 -122
- package/src/components/form/fields/binary/Binary.tsx +0 -91
- package/src/components/form/fields/boolean/Boolean.stories.tsx +0 -125
- package/src/components/form/fields/boolean/Boolean.tsx +0 -34
- package/src/components/form/fields/byte-size/ByteSize.stories.tsx +0 -87
- package/src/components/form/fields/byte-size/ByteSize.tsx +0 -58
- package/src/components/form/fields/color/Color.stories.tsx +0 -99
- package/src/components/form/fields/color/Color.tsx +0 -46
- package/src/components/form/fields/cron/Cron.stories.tsx +0 -68
- package/src/components/form/fields/cron/Cron.tsx +0 -80
- package/src/components/form/fields/date/Date.stories.tsx +0 -77
- package/src/components/form/fields/date/Date.tsx +0 -55
- package/src/components/form/fields/emittedValues.ts +0 -70
- package/src/components/form/fields/file/File.stories.tsx +0 -161
- package/src/components/form/fields/file/File.tsx +0 -227
- package/src/components/form/fields/long-string/LongString.stories.tsx +0 -120
- package/src/components/form/fields/long-string/LongString.tsx +0 -130
- package/src/components/form/fields/markdown/Markdown.stories.tsx +0 -76
- package/src/components/form/fields/markdown/Markdown.tsx +0 -81
- package/src/components/form/fields/markdown/MarkdownView.tsx +0 -222
- package/src/components/form/fields/multi-select/MultiSelectFormField.tsx +0 -139
- package/src/components/form/fields/number/Number.stories.tsx +0 -159
- package/src/components/form/fields/number/Number.tsx +0 -160
- package/src/components/form/fields/object/Object.stories.tsx +0 -398
- package/src/components/form/fields/object/Object.tsx +0 -255
- package/src/components/form/fields/radio-group/RadioGroup.stories.tsx +0 -95
- package/src/components/form/fields/radio-group/RadioGroup.tsx +0 -46
- package/src/components/form/fields/radio-group/images/java-96x128.png +0 -0
- package/src/components/form/fields/radio-group/images/python-129x128.png +0 -0
- package/src/components/form/fields/radio-group/images/qore-106x128.png +0 -0
- package/src/components/form/fields/rich-text/RichText.stories.tsx +0 -260
- package/src/components/form/fields/rich-text/RichText.tsx +0 -537
- package/src/components/form/fields/schema-definition/CatalogLeafForm.tsx +0 -242
- package/src/components/form/fields/schema-definition/CatalogNodeEditor.tsx +0 -758
- package/src/components/form/fields/schema-definition/Hint.tsx +0 -22
- package/src/components/form/fields/schema-definition/InlineValidationBanner.tsx +0 -138
- package/src/components/form/fields/schema-definition/Loader.tsx +0 -20
- package/src/components/form/fields/schema-definition/MigrationsTab.tsx +0 -187
- package/src/components/form/fields/schema-definition/SchemaDefinitionField.stories.tsx +0 -286
- package/src/components/form/fields/schema-definition/TableEditor.tsx +0 -155
- package/src/components/form/fields/schema-definition/TablesTab.tsx +0 -138
- package/src/components/form/fields/schema-definition/catalog.ts +0 -237
- package/src/components/form/fields/schema-definition/helpers.ts +0 -90
- package/src/components/form/fields/schema-definition/index.tsx +0 -418
- package/src/components/form/fields/schema-definition/mockCatalog.ts +0 -325
- package/src/components/form/fields/schema-definition/mockDefinition.ts +0 -111
- package/src/components/form/fields/schema-definition/referenceSuggestions.tsx +0 -152
- package/src/components/form/fields/schema-definition/starterTemplate.ts +0 -68
- package/src/components/form/fields/schema-definition/types.ts +0 -185
- package/src/components/form/fields/schema-definition/useSchemaOptionCatalog.ts +0 -49
- package/src/components/form/fields/select/Select.stories.tsx +0 -872
- package/src/components/form/fields/select/Select.tsx +0 -624
- package/src/components/form/fields/select/SelectCollection.tsx +0 -594
- package/src/components/form/fields/string/String.stories.tsx +0 -86
- package/src/components/form/fields/string/String.tsx +0 -43
- package/src/components/form/fields/template/ExampleValueModal.stories.tsx +0 -114
- package/src/components/form/fields/template/ExampleValueModal.tsx +0 -99
- package/src/components/form/fields/template/ReadOnlyTemplateTag.tsx +0 -47
- package/src/components/form/fields/template/TemplateField.stories.tsx +0 -1121
- package/src/components/form/fields/template/TemplateField.tsx +0 -1717
- package/src/components/form/fields/template/TemplateText.tsx +0 -115
- package/src/components/form/fields/template/__fixtures__/longExampleValue.ts +0 -7
- package/src/components/form/fields/template/__fixtures__/multiLevelTemplates.json +0 -147
- package/src/components/form/fields/template/__fixtures__/templates.json +0 -83
- package/src/components/form/fields/timeout/Timeout.stories.tsx +0 -228
- package/src/components/form/fields/timeout/Timeout.tsx +0 -87
- package/src/components/form/fields/url/Url.stories.tsx +0 -94
- package/src/components/form/fields/url/Url.tsx +0 -85
- package/src/components/form/index.tsx +0 -47
- package/src/components/imageLightbox/ImageLightbox.stories.tsx +0 -238
- package/src/components/imageLightbox/ImageLightbox.tsx +0 -236
- package/src/components/imageLightbox/index.ts +0 -1
- package/src/components/log/Log.stories.tsx +0 -333
- package/src/components/log/Log.tsx +0 -285
- package/src/components/menu/Menu.stories.tsx +0 -155
- package/src/components/menu/Menu.tsx +0 -312
- package/src/components/qonsoleSmartInput/QonsoleSmartInput.stories.tsx +0 -797
- package/src/components/qonsoleSmartInput/QonsoleSmartInput.tsx +0 -105
- package/src/components/qonsoleSmartInput/index.ts +0 -16
- package/src/components/qonsoleSmartInput/qonsoleInserter.ts +0 -77
- package/src/components/qonsoleSmartInput/types.ts +0 -133
- package/src/components/qonsoleSmartInput/useQonsoleSession.ts +0 -124
- package/src/components/searchFilterBar/SearchFilterBar.stories.tsx +0 -62
- package/src/components/searchFilterBar/SearchFilterBar.tsx +0 -144
- package/src/components/searchFilterBar/index.ts +0 -1
- package/src/components/smartEditor/MarkdownDoc.tsx +0 -190
- package/src/components/smartEditor/SmartEditor.stories.tsx +0 -475
- package/src/components/smartEditor/SmartEditor.tsx +0 -808
- package/src/components/smartEditor/__fixtures__/mockLspServer.ts +0 -205
- package/src/components/smartEditor/helpers.ts +0 -217
- package/src/components/smartEditor/index.ts +0 -35
- package/src/components/smartEditor/styling.ts +0 -45
- package/src/components/smartEditor/types.ts +0 -211
- package/src/components/smartEditor/useLspAutocomplete.ts +0 -758
- package/src/components/smartEditor/useLspDiagnosticDecorations.ts +0 -125
- package/src/components/smartEditor/useLspHover.ts +0 -230
- package/src/components/smartEditor/useLspSemanticTokens.ts +0 -298
- package/src/components/smartEditor/useLspSession.ts +0 -231
- package/src/components/smartEditor/useLspSignatureHelp.ts +0 -198
- package/src/components/supportTicket/AttachmentChips.stories.tsx +0 -171
- package/src/components/supportTicket/AttachmentChips.tsx +0 -147
- package/src/components/supportTicket/InterfaceReferenceTags.stories.tsx +0 -257
- package/src/components/supportTicket/InterfaceReferenceTags.tsx +0 -129
- package/src/components/supportTicket/ReferencePicker.stories.tsx +0 -584
- package/src/components/supportTicket/ReferencePicker.tsx +0 -563
- package/src/components/supportTicket/TicketConversation.stories.tsx +0 -121
- package/src/components/supportTicket/TicketHeader.stories.tsx +0 -183
- package/src/components/supportTicket/TicketHeader.tsx +0 -247
- package/src/components/supportTicket/TicketMetaTags.stories.tsx +0 -103
- package/src/components/supportTicket/TicketMetaTags.tsx +0 -85
- package/src/components/supportTicket/TicketReplyBox.stories.tsx +0 -354
- package/src/components/supportTicket/TicketReplyBox.tsx +0 -150
- package/src/components/supportTicket/__fixtures__/kindMarks.ts +0 -28
- package/src/components/supportTicket/attachmentAccess.ts +0 -97
- package/src/components/supportTicket/fileToAttachment.ts +0 -24
- package/src/components/supportTicket/index.ts +0 -10
- package/src/components/supportTicket/meta.ts +0 -206
- package/src/components/supportTicket/ticketModel.ts +0 -131
- package/src/components/supportTicket/useLoadedImages.ts +0 -73
- package/src/components/ticketReferences/TicketReferences.stories.tsx +0 -315
- package/src/components/ticketReferences/TicketReferences.tsx +0 -906
- package/src/components/ticketReferences/index.ts +0 -2
- package/src/components/ticketThread/TicketThread.stories.tsx +0 -829
- package/src/components/ticketThread/TicketThread.tsx +0 -719
- package/src/components/ticketThread/index.ts +0 -6
- package/src/contexts/FetchContext.tsx +0 -25
- package/src/contexts/ReqraftContext.tsx +0 -9
- package/src/contexts/StorageContext.tsx +0 -33
- package/src/global.d.ts +0 -4
- package/src/helpers/allowedValues.ts +0 -249
- package/src/helpers/choiceChip.ts +0 -227
- package/src/helpers/common.ts +0 -326
- package/src/helpers/dpqlDetection.ts +0 -209
- package/src/helpers/expressions.ts +0 -140
- package/src/helpers/optionUiTypes.ts +0 -199
- package/src/helpers/options.ts +0 -150
- package/src/helpers/providerValue.ts +0 -125
- package/src/helpers/scrollbar.ts +0 -32
- package/src/helpers/singleLineString.ts +0 -61
- package/src/helpers/templateItems.ts +0 -81
- package/src/helpers/templateText.ts +0 -350
- package/src/helpers/templates.ts +0 -602
- package/src/helpers/validations.ts +0 -2085
- package/src/hooks/useArgSchema.ts +0 -37
- package/src/hooks/useCoarsePointer.ts +0 -30
- package/src/hooks/useFetch/useFetch.stories.tsx +0 -379
- package/src/hooks/useFetch/useFetch.tsx +0 -154
- package/src/hooks/usePhoneViewport.ts +0 -34
- package/src/hooks/useQorusTypes.ts +0 -233
- package/src/hooks/useReqraftProperty.ts +0 -16
- package/src/hooks/useStorage/useStorage.stories.tsx +0 -168
- package/src/hooks/useStorage/useStorage.ts +0 -35
- package/src/hooks/useTemplates.ts +0 -123
- package/src/hooks/useValidation.ts +0 -9
- package/src/hooks/useWebSocket/useWebSocket.ts +0 -224
- package/src/hooks/useWebSocket/useWebsocket.stories.tsx +0 -640
- package/src/hooks/useWhyDidYouUpdate.ts +0 -38
- package/src/index.tsx +0 -86
- package/src/providers/FetchProvider.tsx +0 -40
- package/src/providers/ReqraftProvider.tsx +0 -52
- package/src/providers/StorageProvider.tsx +0 -131
- package/src/stores/currentUser/currentUser.stories.tsx +0 -100
- package/src/stores/currentUser/currentUser.tsx +0 -94
- package/src/stories/Data/fileFieldArgSchema.json +0 -86
- package/src/stories/Tests/utils.ts +0 -320
- package/src/stories/storyNetwork.ts +0 -92
- package/src/stories/tracking.tsx +0 -206
- package/src/tracking/browser/attach.ts +0 -186
- package/src/tracking/browser/env.ts +0 -78
- package/src/tracking/core/consent.ts +0 -37
- package/src/tracking/core/engagement.ts +0 -47
- package/src/tracking/core/experiments.ts +0 -258
- package/src/tracking/core/hash.ts +0 -26
- package/src/tracking/core/ids.ts +0 -25
- package/src/tracking/core/observable.ts +0 -23
- package/src/tracking/core/queue.ts +0 -131
- package/src/tracking/core/sections.ts +0 -166
- package/src/tracking/core/storage.ts +0 -69
- package/src/tracking/core/tracker.ts +0 -417
- package/src/tracking/core/types.ts +0 -162
- package/src/tracking/core/utm.ts +0 -23
- package/src/tracking/index.ts +0 -72
- package/src/tracking/markup.ts +0 -17
- package/src/tracking/react/Experiment.tsx +0 -44
- package/src/tracking/react/TrackingProvider.tsx +0 -56
- package/src/tracking/react/hooks.ts +0 -106
- package/src/tracking/react/index.ts +0 -13
- package/src/tracking/testing.ts +0 -108
- package/src/tracking/ui/ExperimentCard.stories.tsx +0 -296
- package/src/tracking/ui/ExperimentCard.tsx +0 -667
- package/src/tracking/ui/ExperimentsOverlay.stories.tsx +0 -155
- package/src/tracking/ui/ExperimentsOverlay.tsx +0 -437
- package/src/tracking/ui/anchor.ts +0 -180
- package/src/tracking/ui/card.ts +0 -464
- package/src/tracking/ui/client.ts +0 -117
- package/src/tracking/ui/index.ts +0 -77
- package/src/tracking/ui/types.ts +0 -110
- package/src/tracking/ui/useExperimentsAdmin.ts +0 -103
- package/src/types/Form.ts +0 -29
- package/src/types.ts +0 -14
- package/src/utils/datetime.ts +0 -10
- package/src/utils/fetch.ts +0 -457
- package/src/utils/lspClient.ts +0 -711
- package/src/utils/lspClient.types.ts +0 -211
- package/src/utils/queryUnlessCancelled.ts +0 -28
- package/src/utils/websocket.ts +0 -293
- package/vite.config.ts +0 -58
- package/vitest.config.ts +0 -69
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { IReqoreTheme } from '@qoretechnologies/reqore/dist/constants/theme';
|
|
2
|
+
/**
|
|
3
|
+
* 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
|
|
4
|
+
* large text. Reqore has these from qoretechnologies/reqore#708 on (`getReadableAccentColorOn`, `getReadableAlpha`);
|
|
5
|
+
* until reqraft builds on that release, the read-first form picks its own colors with these.
|
|
6
|
+
*/
|
|
7
|
+
export declare const READABLE_TEXT = 4.5;
|
|
8
|
+
export declare const READABLE_ICON = 3;
|
|
9
|
+
export declare const READABLE_MARGIN = 0.1;
|
|
10
|
+
/** The WCAG contrast ratio of two opaque colors, unrounded (polished's getContrast rounds 4.495 up to 4.5). */
|
|
11
|
+
export declare const contrastRatio: (a: string, b: string) => number;
|
|
12
|
+
/**
|
|
13
|
+
* `color` in the shade of it that stands out by `minContrast` from every one of `backgrounds` (opaque): the color
|
|
14
|
+
* itself when it does, else moved toward white or black - whichever stands out more from the worst of them - only
|
|
15
|
+
* as far as it takes. The hue is kept: a warning stays amber, only lighter on a dark surface. `alpha` is how faded
|
|
16
|
+
* it is drawn: a mark that something else draws at 70% (reqore's panel and button icons) needs a stronger shade.
|
|
17
|
+
*/
|
|
18
|
+
export declare const getReadableShade: (color: string, backgrounds: string[], minContrast?: number, alpha?: number) => string;
|
|
19
|
+
/**
|
|
20
|
+
* How faded `color` can be drawn on every one of `backgrounds` (opaque) and still stand out by `minContrast`:
|
|
21
|
+
* `alpha`, or as little more as it takes (1 when even that does not).
|
|
22
|
+
*/
|
|
23
|
+
export declare const getReadableOpacity: (color: string, backgrounds: string[], alpha: number, minContrast?: number) => number;
|
|
24
|
+
/** A translucent `color` (rgba) at `alpha` that still stands out from `backgrounds` (see `getReadableOpacity`). */
|
|
25
|
+
export declare const getReadableFaded: (color: string, backgrounds: string[], alpha: number, minContrast?: number) => string;
|
|
26
|
+
/**
|
|
27
|
+
* What reqraft's components are drawn on in `theme`: its background, and a shade darker and lighter, as the page
|
|
28
|
+
* or a panel around them may be.
|
|
29
|
+
*/
|
|
30
|
+
export declare const getThemeSurfaces: (theme: IReqoreTheme) => string[];
|
|
31
|
+
/**
|
|
32
|
+
* How faded the theme's text can be drawn (`opacity`, a softer note) and still read on what it is drawn on in
|
|
33
|
+
* the theme (`getThemeSurfaces`): `opacity`, or as little more as it takes. An icon needs 3:1 (`READABLE_ICON`).
|
|
34
|
+
*/
|
|
35
|
+
export declare const getReadableTextOpacity: (theme: IReqoreTheme, opacity: number, minContrast?: number) => number;
|
|
36
|
+
//# sourceMappingURL=readableColors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"readableColors.d.ts","sourceRoot":"","sources":["../../src/helpers/readableColors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,+CAA+C,CAAC;AAS7E;;;;GAIG;AACH,eAAO,MAAM,aAAa,MAAM,CAAC;AACjC,eAAO,MAAM,aAAa,IAAI,CAAC;AAI/B,eAAO,MAAM,eAAe,MAAM,CAAC;AAEnC,+GAA+G;AAC/G,eAAO,MAAM,aAAa,MAAO,MAAM,KAAK,MAAM,KAAG,MAIpD,CAAC;AAYF;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,UACpB,MAAM,eACA,MAAM,EAAE,gBACR,MAAM,UACZ,MAAM,KACZ,MA0BF,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,kBAAkB,UACtB,MAAM,eACA,MAAM,EAAE,SACd,MAAM,gBACA,MAAM,KAClB,MA6BF,CAAC;AAEF,mHAAmH;AACnH,eAAO,MAAM,gBAAgB,UACpB,MAAM,eACA,MAAM,EAAE,SACd,MAAM,gBACA,MAAM,KAClB,MAAiF,CAAC;AAErF;;;GAGG;AACH,eAAO,MAAM,gBAAgB,UAAW,YAAY,KAAG,MAAM,EAI5D,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,sBAAsB,UAC1B,YAAY,WACV,MAAM,gBACF,MAAM,KAClB,MACyF,CAAC"}
|
|
@@ -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,KAAK,QAAA,EAAE,IAAI,QAA4D,CAAC;IAE/E,OAAO,CAAC,KAAK,GA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,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,IAAI,CAAC,IAAI,CAAC,CAAC;IACzC,IAAI,CAAC,KAAK;QAAE,OAAO,SA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| 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;;;;;;;;;;;;;;;;;GAiBG;AACI,IAAM,mBAAmB,GAAG,UAAK,KAAsB;IAC5D,IAAI,CAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,MAAM,MAAK,CAAC,EAAE,CAAC;QACxB,OAAO,KAAK,CAAC;IACf,CAAC;IACD,IAAM,IAAI,GAAG,KAAK,CAAC,CAAC,CAA0B,CAAC;IAC/C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raph {
|
|
|
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;
|
|
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;AA4BF,eAAO,MAAM,eAAe,eAAgB,oBAAoB,KAAG,MAAM,EAgCxE,CAAC;AAyGF;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,mBAAmB,SACxB,MAAM,cACA,oBAAoB,iBACjB,MAAM,GAAG,MAAM,KAC7B,sBAAsB,EAmBrB,CAAC;AAEL,+EAA+E;AAC/E,eAAO,MAAM,mBAAmB,WAAY,cAAc;IAAE,QAAQ,CAAC,EAAE,OAAO,EAAE,CAAA;CAAE,CAAC,KAAG,MAWvE,CAAC;AAMhB;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,oBAAoB,SACzB,MAAM,cACA,oBAAoB,iBACjB,MAAM,GAAG,MAAM,KAC7B,gBAAgB,EAmClB,CAAC;AAEF;;gEAEgE;AAChE,eAAO,MAAM,eAAe,SACpB,MAAM,cACA,oBAAoB,iBACjB,MAAM,GAAG,MAAM,KAC7B,OAC4F,CAAC"}
|
|
@@ -9,7 +9,7 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
9
9
|
return to.concat(ar || Array.prototype.slice.call(from));
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.hasTemplateText = exports.templateTextSegments = exports.templateNodesToText = exports.templateTextToNodes = exports.templateChipLabel = void 0;
|
|
12
|
+
exports.hasTemplateText = exports.templateTextSegments = exports.templateNodesToText = exports.templateTextToNodes = exports.catalogueValues = exports.templateChipLabel = void 0;
|
|
13
13
|
var dpqlHelpers_1 = require("../components/dpqlEditor/dpqlHelpers");
|
|
14
14
|
var templates_1 = require("./templates");
|
|
15
15
|
/**
|
|
@@ -42,7 +42,7 @@ exports.templateChipLabel = templateChipLabel;
|
|
|
42
42
|
* Every value the catalogue offers, longest first.
|
|
43
43
|
*
|
|
44
44
|
* A host may write its references in a grammar reqraft has never seen — a Qorus
|
|
45
|
-
* test spells one `$._case.mode`, which `
|
|
45
|
+
* test spells one `$._case.mode`, which `templateTokenSpans` cannot match
|
|
46
46
|
* because it has no `$key:` at all. Asking the field's own list which strings
|
|
47
47
|
* it NAMES settles that without reqraft guessing at anybody's syntax, and it is
|
|
48
48
|
* the same question the whole-value branch of the read row already asks
|
|
@@ -86,6 +86,7 @@ var catalogueValues = function (templates) {
|
|
|
86
86
|
catalogueValueCache.set(templates, sorted);
|
|
87
87
|
return sorted;
|
|
88
88
|
};
|
|
89
|
+
exports.catalogueValues = catalogueValues;
|
|
89
90
|
/**
|
|
90
91
|
* Where a literal catalogue value occurs in `line`, as whole references only.
|
|
91
92
|
*
|
|
@@ -152,7 +153,10 @@ var grammarSource = function (grammar) {
|
|
|
152
153
|
*/
|
|
153
154
|
var lineReferenceSpans = function (line, templates, tokenGrammar) {
|
|
154
155
|
var declared = grammarSource(tokenGrammar);
|
|
155
|
-
var candidates = __spreadArray(__spreadArray(__spreadArray([], (declared ? patternSpans(line, declared) : []), true),
|
|
156
|
+
var candidates = __spreadArray(__spreadArray(__spreadArray([], (declared ? patternSpans(line, declared) : []), true), (0, templates_1.templateTokenSpans)(line).map(function (_a) {
|
|
157
|
+
var start = _a[0], end = _a[1];
|
|
158
|
+
return ({ start: start, end: end });
|
|
159
|
+
}), true), (0, exports.catalogueValues)(templates).flatMap(function (literal) { return literalSpans(line, literal); }), true).sort(function (a, b) { return a.start - b.start || b.end - a.end; });
|
|
156
160
|
var spans = [];
|
|
157
161
|
var cursor = 0;
|
|
158
162
|
candidates.forEach(function (span) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"templateText.js","sourceRoot":"","sources":["../../src/helpers/templateText.ts"],"names":[],"mappings":";;;;;;;;;;;;AASA,oEAAmE;AAEnE,
|
|
1
|
+
{"version":3,"file":"templateText.js","sourceRoot":"","sources":["../../src/helpers/templateText.ts"],"names":[],"mappings":";;;;;;;;;;;;AASA,oEAAmE;AAEnE,yCAA4E;AA0B5E;;;;;;;;;;;GAWG;AACI,IAAM,iBAAiB,GAAG,UAAC,SAA2C,EAAE,KAAa;IACpF,IAAA,KAAkB,IAAA,qCAAyB,EAAC,SAAS,EAAE,KAAK,CAAC,EAA3D,KAAK,WAAA,EAAE,IAAI,UAAgD,CAAC;IACpE,IAAI,IAAI,EAAE,CAAC;QACT,OAAO,KAAK,CAAC;IACf,CAAC;IACD,OAAO,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAA,yBAAW,EAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;AAC1D,CAAC,CAAC;AANW,QAAA,iBAAiB,qBAM5B;AAEF,8EAA8E;AAC9E,0EAA0E;AAC1E,6EAA6E;AAC7E,4EAA4E;AAC5E,wEAAwE;AACxE,8EAA8E;AAE9E;;;;;;;;;;;;;GAaG;AACH;;6EAE6E;AAC7E,IAAM,mBAAmB,GAAG,IAAI,OAAO,EAAoB,CAAC;AAErD,IAAM,eAAe,GAAG,UAAC,SAAgC;IAC9D,IAAI,CAAC,SAAS,EAAE,CAAC;QACf,OAAO,EAAE,CAAC;IACZ,CAAC;IACD,IAAM,MAAM,GAAG,mBAAmB,CAAC,GAAG,CAAC,SAAmB,CAAC,CAAC;IAC5D,IAAI,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C,CAAC;YACzC,IAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC;YAC/C,QAAQ,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,OAAA,EAAE,IAAI,EAAE,IAAA,yBAAiB,EAAC,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,CAAC;YACjF,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC;QACpB,CAAC,CAAC,CAAC;QAEH,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;IAC/B,CAAC,CAAC,CAAC;IAEH,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAC;AAvCW,QAAA,oBAAoB,wBAuC/B;AAEF;;gEAEgE;AACzD,IAAM,eAAe,GAAG,UAC7B,IAAY,EACZ,SAAgC,EAChC,YAA8B;IAE9B,OAAA,IAAA,4BAAoB,EAAC,IAAI,EAAE,SAAS,EAAE,YAAY,CAAC,CAAC,IAAI,CAAC,UAAC,OAAO,IAAK,OAAA,OAAO,CAAC,IAAI,KAAK,KAAK,EAAtB,CAAsB,CAAC;AAA7F,CAA6F,CAAC;AALnF,QAAA,eAAe,mBAKoE"}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { TReqoreTooltipProp } from '@qoretechnologies/reqore/dist/types/global';
|
|
2
2
|
import { IReqoreFormTemplates } from '@qoretechnologies/reqore/dist/components/Textarea';
|
|
3
|
+
import { IReqoreTagProps } from '@qoretechnologies/reqore/dist/components/Tag';
|
|
3
4
|
import { TReqoreDropdownItem } from '@qoretechnologies/reqore/dist/components/Dropdown/list';
|
|
5
|
+
import { IDescriptionTooltipOptions } from './descriptionTooltip';
|
|
6
|
+
import { TTypeSentenceForm } from './qorusTypeCatalogue';
|
|
4
7
|
/**
|
|
5
8
|
* The DOM ceiling for a serialized example value in a picker item — a
|
|
6
9
|
* binary-carrying field's example (e.g. an email attachment body) can be an
|
|
@@ -20,29 +23,59 @@ export type TTemplateMeta = {
|
|
|
20
23
|
builtIn?: boolean;
|
|
21
24
|
isEventTrigger?: boolean;
|
|
22
25
|
};
|
|
26
|
+
/** What every view's reference chip is drawn with (`REFERENCE_CHIP_PROPS`). */
|
|
27
|
+
export type TReferenceChipProps = Pick<IReqoreTagProps, 'size' | 'effect' | 'wrap' | 'paddingSize'>;
|
|
28
|
+
/**
|
|
29
|
+
* A reference chip as every view draws it - the read summary (`TemplateText`), the read-only chip, the rich
|
|
30
|
+
* text editor and the expression editor: one chip, so a reference is the same size wherever it is shown, at
|
|
31
|
+
* whatever size its text is (qorus#646). One object for all of them: written out in each, the views drifted
|
|
32
|
+
* apart, and a chip jumped as a value moved between them.
|
|
33
|
+
*
|
|
34
|
+
* - `small`, never smaller: a chip is pressed (a tap opens its card, a click its list), and a control a finger
|
|
35
|
+
* must hit is not `micro` or `tiny` (BRAND_DESIGN, "Tap targets are finger-sized"). The one chip was `tiny`, a
|
|
36
|
+
* 14px box with the 14px text it sits in: the label was taller than its box and ran out of it, and the name
|
|
37
|
+
* was all but cut off (Foxhoundn on qlip #383; David, 2026-10-22: one chip for every view at `small`).
|
|
38
|
+
* - its label in the font of the text it sits in, padded inside the box;
|
|
39
|
+
* - and wrapping: a chip longer than its line wraps its label inside the line. Not wrapped, it was capped at the
|
|
40
|
+
* line's width with its label centred in it, and lost both ends - its icon, the start and the end of the path,
|
|
41
|
+
* and its remove button (Foxhoundn on qlip #383: "The template tag is overflowing, you need to wrap it").
|
|
42
|
+
*/
|
|
43
|
+
export declare const REFERENCE_CHIP_PROPS: TReferenceChipProps;
|
|
23
44
|
export declare const getTemplateTagStyle: (meta?: TTemplateMeta) => {
|
|
24
45
|
intent: 'success' | 'info' | 'custom1';
|
|
25
46
|
};
|
|
26
47
|
export declare const isValueTemplate: (value: string) => boolean;
|
|
27
48
|
export declare const getTemplateKey: (value: string) => string;
|
|
28
49
|
export declare const getTemplateValue: (value: string) => string;
|
|
29
|
-
/**
|
|
30
|
-
|
|
31
|
-
* `
|
|
32
|
-
*
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
* `{id.Created by.name}`). `isValueTemplate` above stays deliberately
|
|
37
|
-
* LOOSER (starts with `$`, has `:`): it answers "does the user mean a
|
|
38
|
-
* template here" while typing; use the strict check below when a decision
|
|
39
|
-
* must not misfire on user-typed dollar-strings.
|
|
40
|
-
*/
|
|
41
|
-
export declare const TEMPLATE_TOKEN_SOURCE = "\\$[A-Za-z_][\\w-]*(?::(?:\\{[^}]*\\}|[A-Za-z_][\\w-]*))+";
|
|
50
|
+
/** Every template token in `text`, in order and apart: each `[start, end)`. */
|
|
51
|
+
export declare const templateTokenSpans: (text: string) => Array<[number, number]>;
|
|
52
|
+
/** The record field a template names - `$record:{orders[*].id}` is `orders[*].id` - when it is that template alone
|
|
53
|
+
* (one braced segment, nothing after it); otherwise undefined. */
|
|
54
|
+
export declare const recordFieldOfTemplate: (token: string) => string | undefined;
|
|
55
|
+
/** `text` cut at its template tokens: the pieces of text and the tokens, in order, none of them empty. */
|
|
56
|
+
export declare const splitAtTemplateTokens: (text: string) => string[];
|
|
42
57
|
/** STRICT whole-value check: the entire string is one well-formed template
|
|
43
58
|
* token (`:{id.path}`, `:item`, …) — nothing before or after.
|
|
44
59
|
* `'$foo: hello'` passes the loose check but not this one. */
|
|
45
60
|
export declare const isCompleteTemplateToken: (value?: unknown) => value is string;
|
|
61
|
+
/**
|
|
62
|
+
* Text with a template in it that is not the template alone: `$record:{pos} Stk.`, `SUP-$record:{pos}`,
|
|
63
|
+
* two templates side by side. In text it is text; a whole number, a number, a yes/no or a date cannot
|
|
64
|
+
* hold it (qorus#646).
|
|
65
|
+
*/
|
|
66
|
+
export declare const hasTextAroundATemplate: (value?: unknown) => value is string;
|
|
67
|
+
/** The text around the templates in a value that is not one template alone, and how many templates it holds. */
|
|
68
|
+
export interface ITextAroundATemplate {
|
|
69
|
+
/** The pieces of text before, between and after the templates, trimmed; empty pieces left out. */
|
|
70
|
+
text: string[];
|
|
71
|
+
templates: number;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* What makes a value text rather than one template alone: `$record:{pos} Stk.` holds the text "Stk." and
|
|
75
|
+
* one template; `$record:{a}$record:{b}` no text and two. `undefined` where the value is not text with a
|
|
76
|
+
* template in it, or is one template alone (see {@link hasTextAroundATemplate}).
|
|
77
|
+
*/
|
|
78
|
+
export declare const textAroundATemplate: (value?: unknown) => ITextAroundATemplate | undefined;
|
|
46
79
|
/** A complete token carrying at least one BRACED context segment —
|
|
47
80
|
* `$data:{W2n….filename}`, `$qore-expr:{1 + 2}`. These are machine-written
|
|
48
81
|
* references nobody types by hand, so a surface may render them as a picker
|
|
@@ -129,11 +162,30 @@ export declare const describeTemplateReference: (templates: IReqoreFormTemplates
|
|
|
129
162
|
* the field's own help, which teaches the grammar with a worked example, and
|
|
130
163
|
* the picker, for the walks no list can hold.
|
|
131
164
|
*
|
|
165
|
+
* The description is drawn by the host's markdown renderer, as the template
|
|
166
|
+
* list draws the same string, and opens on a tap where there is no hover
|
|
167
|
+
* (`descriptionTooltip`, with the surface's `useDescriptionTooltips`): a hover
|
|
168
|
+
* that printed it raw showed the reader the `**` and backticks the list beside
|
|
169
|
+
* it does not, and a finger could not open it at all.
|
|
170
|
+
*
|
|
132
171
|
* Falls back to the resolved label (itself the stripped path when the catalogue
|
|
133
172
|
* explains nothing), because a surface with no catalogue must still say what
|
|
134
173
|
* the value is rather than nothing at all.
|
|
135
174
|
*/
|
|
136
|
-
export declare const templateTooltip: (templates: IReqoreFormTemplates | undefined, value: string
|
|
175
|
+
export declare const templateTooltip: (templates: IReqoreFormTemplates | undefined, value: string, descriptions: IDescriptionTooltipOptions, typeSentenceForm?: TTypeSentenceForm, host?: {
|
|
176
|
+
label?: string;
|
|
177
|
+
description?: string;
|
|
178
|
+
noDescription?: string;
|
|
179
|
+
}) => TReqoreTooltipProp;
|
|
180
|
+
/** The values a template is one of, where its catalogue says (`allowed_values`, as a field's are written). */
|
|
181
|
+
export declare const templateAllowedValues: (item: unknown) => unknown[];
|
|
182
|
+
/**
|
|
183
|
+
* What a reference's hover says under its name: what kind of value it is, in words - "A whole number." from the
|
|
184
|
+
* type's sentence form - then its description (qorus#646, David: a field's hover should say the field's type).
|
|
185
|
+
* The type was in the catalogue (its badge) and in no hover; where a hover said it, it said it raw, `(int)`.
|
|
186
|
+
* Undefined when there is neither.
|
|
187
|
+
*/
|
|
188
|
+
export declare const describedWithType: (description: unknown, typeSentenceForm: string | undefined) => string | undefined;
|
|
137
189
|
export declare const filterTemplatesByType: (templates?: IReqoreFormTemplates, fieldType?: string, hasArgSchema?: boolean) => IReqoreFormTemplates;
|
|
138
190
|
interface ITemplateItemPayload {
|
|
139
191
|
display_name?: string;
|
|
@@ -142,6 +194,8 @@ interface ITemplateItemPayload {
|
|
|
142
194
|
type?: string;
|
|
143
195
|
items?: ITemplateItemPayload[];
|
|
144
196
|
data_role?: string;
|
|
197
|
+
/** The values it is one of, written as a field's are; its hover lists them (`templateTooltip`). */
|
|
198
|
+
allowed_values?: unknown[];
|
|
145
199
|
}
|
|
146
200
|
export interface ITemplatesPayload {
|
|
147
201
|
[dataId: string]: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"templates.d.ts","sourceRoot":"","sources":["../../src/helpers/templates.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,4CAA4C,CAAC;AAChF,OAAO,EAAE,oBAAoB,EAAE,MAAM,mDAAmD,CAAC;AACzF,OAAO,EACL,mBAAmB,EAEpB,MAAM,wDAAwD,CAAC;
|
|
1
|
+
{"version":3,"file":"templates.d.ts","sourceRoot":"","sources":["../../src/helpers/templates.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,4CAA4C,CAAC;AAChF,OAAO,EAAE,oBAAoB,EAAE,MAAM,mDAAmD,CAAC;AACzF,OAAO,EAA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