@qoretechnologies/reqraft 0.10.66-pr.145.gcb1e59d → 0.10.66
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +53 -1
- package/dist/components/Description/AllowedValuesHelp.d.ts +20 -0
- package/dist/components/Description/AllowedValuesHelp.d.ts.map +1 -0
- package/dist/components/Description/AllowedValuesHelp.js +86 -0
- package/dist/components/Description/AllowedValuesHelp.js.map +1 -0
- package/dist/components/Description/describedControl.d.ts +54 -0
- package/dist/components/Description/describedControl.d.ts.map +1 -0
- package/dist/components/Description/describedControl.js +81 -0
- package/dist/components/Description/describedControl.js.map +1 -0
- package/dist/components/Description/index.d.ts.map +1 -1
- package/dist/components/Description/index.js +3 -2
- package/dist/components/Description/index.js.map +1 -1
- package/dist/components/colorValue/colorValue.d.ts +59 -0
- package/dist/components/colorValue/colorValue.d.ts.map +1 -0
- package/dist/components/colorValue/colorValue.js +245 -0
- package/dist/components/colorValue/colorValue.js.map +1 -0
- package/dist/components/colorValue/index.d.ts +34 -0
- package/dist/components/colorValue/index.d.ts.map +1 -0
- package/dist/components/colorValue/index.js +136 -0
- package/dist/components/colorValue/index.js.map +1 -0
- package/dist/components/colorValue/labels.d.ts +12 -0
- package/dist/components/colorValue/labels.d.ts.map +1 -0
- package/dist/components/colorValue/labels.js +11 -0
- package/dist/components/colorValue/labels.js.map +1 -0
- package/dist/components/composer/Composer.d.ts +1 -1
- package/dist/components/composer/Composer.d.ts.map +1 -1
- package/dist/components/composer/Composer.js +2 -2
- package/dist/components/composer/Composer.js.map +1 -1
- package/dist/components/dpqlEditor/DpqlEditor.d.ts.map +1 -1
- package/dist/components/dpqlEditor/DpqlEditor.js +156 -10
- package/dist/components/dpqlEditor/DpqlEditor.js.map +1 -1
- package/dist/components/dpqlEditor/dpqlCompletions.d.ts +39 -0
- package/dist/components/dpqlEditor/dpqlCompletions.d.ts.map +1 -0
- package/dist/components/dpqlEditor/dpqlCompletions.js +294 -0
- package/dist/components/dpqlEditor/dpqlCompletions.js.map +1 -0
- package/dist/components/dpqlEditor/dpqlHelpers.d.ts +54 -5
- package/dist/components/dpqlEditor/dpqlHelpers.d.ts.map +1 -1
- package/dist/components/dpqlEditor/dpqlHelpers.js +420 -63
- package/dist/components/dpqlEditor/dpqlHelpers.js.map +1 -1
- package/dist/components/dpqlEditor/dpqlInserter.d.ts.map +1 -1
- package/dist/components/dpqlEditor/dpqlInserter.js +67 -29
- package/dist/components/dpqlEditor/dpqlInserter.js.map +1 -1
- package/dist/components/dpqlEditor/dpqlTags.d.ts +17 -7
- package/dist/components/dpqlEditor/dpqlTags.d.ts.map +1 -1
- package/dist/components/dpqlEditor/dpqlTags.js +44 -17
- package/dist/components/dpqlEditor/dpqlTags.js.map +1 -1
- package/dist/components/dpqlEditor/types.d.ts +94 -8
- package/dist/components/dpqlEditor/types.d.ts.map +1 -1
- package/dist/components/dpqlEditor/useDpqlSession.d.ts +7 -2
- package/dist/components/dpqlEditor/useDpqlSession.d.ts.map +1 -1
- package/dist/components/dpqlEditor/useDpqlSession.js +49 -17
- package/dist/components/dpqlEditor/useDpqlSession.js.map +1 -1
- package/dist/components/form/engine/CompactRow.d.ts.map +1 -1
- package/dist/components/form/engine/CompactRow.js +336 -243
- package/dist/components/form/engine/CompactRow.js.map +1 -1
- package/dist/components/form/engine/CompactToolbar.d.ts.map +1 -1
- package/dist/components/form/engine/CompactToolbar.js +20 -57
- package/dist/components/form/engine/CompactToolbar.js.map +1 -1
- package/dist/components/form/engine/FormEngine.d.ts +67 -59
- package/dist/components/form/engine/FormEngine.d.ts.map +1 -1
- package/dist/components/form/engine/FormEngine.js +606 -409
- package/dist/components/form/engine/FormEngine.js.map +1 -1
- package/dist/components/form/engine/HiddenFieldsNote.d.ts +28 -0
- package/dist/components/form/engine/HiddenFieldsNote.d.ts.map +1 -0
- package/dist/components/form/engine/HiddenFieldsNote.js +32 -0
- package/dist/components/form/engine/HiddenFieldsNote.js.map +1 -0
- package/dist/components/form/engine/OptionFieldMessages.d.ts +2 -18
- package/dist/components/form/engine/OptionFieldMessages.d.ts.map +1 -1
- package/dist/components/form/engine/OptionFieldMessages.js +28 -25
- package/dist/components/form/engine/OptionFieldMessages.js.map +1 -1
- package/dist/components/form/engine/OptionsHelpDialog.d.ts.map +1 -1
- package/dist/components/form/engine/OptionsHelpDialog.js +19 -2
- package/dist/components/form/engine/OptionsHelpDialog.js.map +1 -1
- package/dist/components/form/engine/_structuredData/SchemaDataView.d.ts +2 -2
- package/dist/components/form/engine/_structuredData/SchemaDataView.d.ts.map +1 -1
- package/dist/components/form/engine/_structuredData/SchemaDataView.js +11 -31
- package/dist/components/form/engine/_structuredData/SchemaDataView.js.map +1 -1
- package/dist/components/form/engine/compactRowContext.d.ts +30 -6
- package/dist/components/form/engine/compactRowContext.d.ts.map +1 -1
- package/dist/components/form/engine/compactRowContext.js.map +1 -1
- package/dist/components/form/engine/compactRowStyles.d.ts +56 -31
- package/dist/components/form/engine/compactRowStyles.d.ts.map +1 -1
- package/dist/components/form/engine/compactRowStyles.js +121 -110
- package/dist/components/form/engine/compactRowStyles.js.map +1 -1
- package/dist/components/form/engine/compactToolbarColors.d.ts +16 -0
- package/dist/components/form/engine/compactToolbarColors.d.ts.map +1 -0
- package/dist/components/form/engine/compactToolbarColors.js +21 -0
- package/dist/components/form/engine/compactToolbarColors.js.map +1 -0
- package/dist/components/form/engine/compactToolbarContext.d.ts +0 -3
- package/dist/components/form/engine/compactToolbarContext.d.ts.map +1 -1
- package/dist/components/form/engine/compactToolbarContext.js.map +1 -1
- package/dist/components/form/engine/inheritProps.d.ts +29 -0
- package/dist/components/form/engine/inheritProps.d.ts.map +1 -0
- package/dist/components/form/engine/inheritProps.js +43 -0
- package/dist/components/form/engine/inheritProps.js.map +1 -0
- package/dist/components/form/engine/operatorSummary.d.ts +26 -0
- package/dist/components/form/engine/operatorSummary.d.ts.map +1 -0
- package/dist/components/form/engine/operatorSummary.js +35 -0
- package/dist/components/form/engine/operatorSummary.js.map +1 -0
- package/dist/components/form/engine/readFirst.d.ts +26 -22
- package/dist/components/form/engine/readFirst.d.ts.map +1 -1
- package/dist/components/form/engine/readFirst.js +79 -115
- package/dist/components/form/engine/readFirst.js.map +1 -1
- package/dist/components/form/engine/readFirstColors.d.ts +30 -0
- package/dist/components/form/engine/readFirstColors.d.ts.map +1 -0
- package/dist/components/form/engine/readFirstColors.js +51 -0
- package/dist/components/form/engine/readFirstColors.js.map +1 -0
- package/dist/components/form/engine/rowFocus.d.ts +3 -9
- package/dist/components/form/engine/rowFocus.d.ts.map +1 -1
- package/dist/components/form/engine/rowFocus.js +30 -19
- package/dist/components/form/engine/rowFocus.js.map +1 -1
- package/dist/components/form/engine/typeChoices.d.ts +1 -1
- package/dist/components/form/engine/variants/VariantCalmTable.d.ts.map +1 -1
- package/dist/components/form/engine/variants/VariantCalmTable.js +2 -1
- package/dist/components/form/engine/variants/VariantCalmTable.js.map +1 -1
- package/dist/components/form/engine/variants/VariantCards.d.ts.map +1 -1
- package/dist/components/form/engine/variants/VariantCards.js +2 -1
- package/dist/components/form/engine/variants/VariantCards.js.map +1 -1
- package/dist/components/form/engine/variants/VariantFocus.js +1 -1
- package/dist/components/form/engine/variants/VariantFocus.js.map +1 -1
- package/dist/components/form/engine/variants/VariantMinimal.d.ts.map +1 -1
- package/dist/components/form/engine/variants/VariantMinimal.js +2 -1
- package/dist/components/form/engine/variants/VariantMinimal.js.map +1 -1
- package/dist/components/form/engine/variants/variantParts.d.ts +1 -1
- package/dist/components/form/engine/variants/variantParts.d.ts.map +1 -1
- package/dist/components/form/engine/variants/variantParts.js +25 -17
- package/dist/components/form/engine/variants/variantParts.js.map +1 -1
- package/dist/components/form/expressions/DpqlRendering.d.ts +1 -1
- package/dist/components/form/expressions/DpqlRendering.d.ts.map +1 -1
- package/dist/components/form/expressions/DpqlRendering.js +7 -6
- package/dist/components/form/expressions/DpqlRendering.js.map +1 -1
- package/dist/components/form/expressions/ExpressionField.d.ts +67 -3
- package/dist/components/form/expressions/ExpressionField.d.ts.map +1 -1
- package/dist/components/form/expressions/ExpressionField.js +536 -114
- package/dist/components/form/expressions/ExpressionField.js.map +1 -1
- package/dist/components/form/expressions/argumentPresence.d.ts +14 -0
- package/dist/components/form/expressions/argumentPresence.d.ts.map +1 -1
- package/dist/components/form/expressions/argumentPresence.js +16 -1
- package/dist/components/form/expressions/argumentPresence.js.map +1 -1
- package/dist/components/form/expressions/builder/argumentDetail.d.ts.map +1 -1
- package/dist/components/form/expressions/builder/argumentDetail.js +4 -1
- package/dist/components/form/expressions/builder/argumentDetail.js.map +1 -1
- package/dist/components/form/expressions/builder/argumentLabel.d.ts.map +1 -1
- package/dist/components/form/expressions/builder/argumentLabel.js +30 -11
- package/dist/components/form/expressions/builder/argumentLabel.js.map +1 -1
- package/dist/components/form/expressions/builder/argumentWrapper.d.ts.map +1 -1
- package/dist/components/form/expressions/builder/argumentWrapper.js +3 -1
- package/dist/components/form/expressions/builder/argumentWrapper.js.map +1 -1
- package/dist/components/form/expressions/builder/confirmMismatchedTypesModal.d.ts +9 -0
- package/dist/components/form/expressions/builder/confirmMismatchedTypesModal.d.ts.map +1 -1
- package/dist/components/form/expressions/builder/confirmMismatchedTypesModal.js +30 -27
- package/dist/components/form/expressions/builder/confirmMismatchedTypesModal.js.map +1 -1
- package/dist/components/form/expressions/builder/confirmUnsupportedTypeModal.d.ts +1 -1
- package/dist/components/form/expressions/builder/confirmUnsupportedTypeModal.d.ts.map +1 -1
- package/dist/components/form/expressions/builder/confirmUnsupportedTypeModal.js +7 -5
- package/dist/components/form/expressions/builder/confirmUnsupportedTypeModal.js.map +1 -1
- package/dist/components/form/expressions/builder/index.d.ts +34 -2
- package/dist/components/form/expressions/builder/index.d.ts.map +1 -1
- package/dist/components/form/expressions/builder/index.js +170 -80
- package/dist/components/form/expressions/builder/index.js.map +1 -1
- package/dist/components/form/expressions/builder/item.d.ts +6 -2
- package/dist/components/form/expressions/builder/item.d.ts.map +1 -1
- package/dist/components/form/expressions/builder/item.js +19 -5
- package/dist/components/form/expressions/builder/item.js.map +1 -1
- package/dist/components/form/expressions/builder/renderTemplate.js +1 -1
- package/dist/components/form/expressions/builder/renderTemplate.js.map +1 -1
- package/dist/components/form/expressions/dpqlMockRecordPath.d.ts +11 -0
- package/dist/components/form/expressions/dpqlMockRecordPath.d.ts.map +1 -0
- package/dist/components/form/expressions/dpqlMockRecordPath.js +254 -0
- package/dist/components/form/expressions/dpqlMockRecordPath.js.map +1 -0
- package/dist/components/form/expressions/expressionOperands.d.ts +16 -0
- package/dist/components/form/expressions/expressionOperands.d.ts.map +1 -0
- package/dist/components/form/expressions/expressionOperands.js +97 -0
- package/dist/components/form/expressions/expressionOperands.js.map +1 -0
- package/dist/components/form/expressions/fieldPath.d.ts +24 -0
- package/dist/components/form/expressions/fieldPath.d.ts.map +1 -0
- package/dist/components/form/expressions/fieldPath.js +152 -0
- package/dist/components/form/expressions/fieldPath.js.map +1 -0
- package/dist/components/form/expressions/loneValue.d.ts +17 -0
- package/dist/components/form/expressions/loneValue.d.ts.map +1 -0
- package/dist/components/form/expressions/loneValue.js +33 -0
- package/dist/components/form/expressions/loneValue.js.map +1 -0
- package/dist/components/form/expressions/mockExpressions.d.ts.map +1 -1
- package/dist/components/form/expressions/mockExpressions.js +22 -5
- package/dist/components/form/expressions/mockExpressions.js.map +1 -1
- package/dist/components/form/expressions/renderExpressionToText.d.ts +2 -0
- package/dist/components/form/expressions/renderExpressionToText.d.ts.map +1 -1
- package/dist/components/form/expressions/renderExpressionToText.js +37 -25
- package/dist/components/form/expressions/renderExpressionToText.js.map +1 -1
- package/dist/components/form/expressions/textOfExpression.d.ts +18 -0
- package/dist/components/form/expressions/textOfExpression.d.ts.map +1 -0
- package/dist/components/form/expressions/textOfExpression.js +49 -0
- package/dist/components/form/expressions/textOfExpression.js.map +1 -0
- package/dist/components/form/expressions/types.d.ts +12 -0
- package/dist/components/form/expressions/types.d.ts.map +1 -1
- package/dist/components/form/expressions/types.js +6 -1
- package/dist/components/form/expressions/types.js.map +1 -1
- package/dist/components/form/expressions/useExpressionType.d.ts +26 -0
- package/dist/components/form/expressions/useExpressionType.d.ts.map +1 -0
- package/dist/components/form/expressions/useExpressionType.js +181 -0
- package/dist/components/form/expressions/useExpressionType.js.map +1 -0
- package/dist/components/form/expressions/useRenderExpression.d.ts.map +1 -1
- package/dist/components/form/expressions/useRenderExpression.js +13 -9
- package/dist/components/form/expressions/useRenderExpression.js.map +1 -1
- package/dist/components/form/expressions/wildcardExpressions.d.ts +27 -0
- package/dist/components/form/expressions/wildcardExpressions.d.ts.map +1 -0
- package/dist/components/form/expressions/wildcardExpressions.js +101 -0
- package/dist/components/form/expressions/wildcardExpressions.js.map +1 -0
- package/dist/components/form/fields/Field.d.ts.map +1 -1
- package/dist/components/form/fields/Field.js +39 -18
- package/dist/components/form/fields/Field.js.map +1 -1
- package/dist/components/form/fields/allowed-values/AllowedValues.d.ts +0 -7
- package/dist/components/form/fields/allowed-values/AllowedValues.d.ts.map +1 -1
- package/dist/components/form/fields/allowed-values/AllowedValues.js +46 -35
- package/dist/components/form/fields/allowed-values/AllowedValues.js.map +1 -1
- package/dist/components/form/fields/allowed-values/choicePicture.d.ts +37 -0
- package/dist/components/form/fields/allowed-values/choicePicture.d.ts.map +1 -0
- package/dist/components/form/fields/allowed-values/choicePicture.js +64 -0
- package/dist/components/form/fields/allowed-values/choicePicture.js.map +1 -0
- package/dist/components/form/fields/array/ArrayAuto.d.ts.map +1 -1
- package/dist/components/form/fields/array/ArrayAuto.js +24 -0
- package/dist/components/form/fields/array/ArrayAuto.js.map +1 -1
- package/dist/components/form/fields/array/ArrayAutoField.d.ts.map +1 -1
- package/dist/components/form/fields/array/ArrayAutoField.js +36 -13
- package/dist/components/form/fields/array/ArrayAutoField.js.map +1 -1
- package/dist/components/form/fields/auto/AutoFormField.d.ts +30 -1
- package/dist/components/form/fields/auto/AutoFormField.d.ts.map +1 -1
- package/dist/components/form/fields/auto/AutoFormField.js +123 -79
- package/dist/components/form/fields/auto/AutoFormField.js.map +1 -1
- package/dist/components/form/fields/auto/hostEditorValue.d.ts +30 -0
- package/dist/components/form/fields/auto/hostEditorValue.d.ts.map +1 -0
- package/dist/components/form/fields/auto/hostEditorValue.js +53 -0
- package/dist/components/form/fields/auto/hostEditorValue.js.map +1 -0
- package/dist/components/form/fields/binary/Binary.d.ts.map +1 -1
- package/dist/components/form/fields/binary/Binary.js +23 -3
- package/dist/components/form/fields/binary/Binary.js.map +1 -1
- package/dist/components/form/fields/boolean/Boolean.d.ts +5 -0
- package/dist/components/form/fields/boolean/Boolean.d.ts.map +1 -1
- package/dist/components/form/fields/boolean/Boolean.js +9 -1
- package/dist/components/form/fields/boolean/Boolean.js.map +1 -1
- package/dist/components/form/fields/color/Color.d.ts +103 -16
- package/dist/components/form/fields/color/Color.d.ts.map +1 -1
- package/dist/components/form/fields/color/Color.js +616 -16
- package/dist/components/form/fields/color/Color.js.map +1 -1
- package/dist/components/form/fields/emittedValues.d.ts +34 -3
- package/dist/components/form/fields/emittedValues.d.ts.map +1 -1
- package/dist/components/form/fields/emittedValues.js +24 -1
- package/dist/components/form/fields/emittedValues.js.map +1 -1
- package/dist/components/form/fields/file/File.d.ts +1 -1
- package/dist/components/form/fields/file/File.d.ts.map +1 -1
- package/dist/components/form/fields/file/File.js +4 -2
- package/dist/components/form/fields/file/File.js.map +1 -1
- package/dist/components/form/fields/long-string/LongString.d.ts +1 -7
- package/dist/components/form/fields/long-string/LongString.d.ts.map +1 -1
- package/dist/components/form/fields/long-string/LongString.js +30 -13
- package/dist/components/form/fields/long-string/LongString.js.map +1 -1
- package/dist/components/form/fields/markdown/MarkdownView.js +1 -1
- package/dist/components/form/fields/multi-select/MultiSelectFormField.d.ts.map +1 -1
- package/dist/components/form/fields/multi-select/MultiSelectFormField.js +10 -7
- package/dist/components/form/fields/multi-select/MultiSelectFormField.js.map +1 -1
- package/dist/components/form/fields/number/Number.d.ts +7 -4
- package/dist/components/form/fields/number/Number.d.ts.map +1 -1
- package/dist/components/form/fields/number/Number.js +45 -18
- package/dist/components/form/fields/number/Number.js.map +1 -1
- package/dist/components/form/fields/object/Object.d.ts +1 -1
- package/dist/components/form/fields/object/Object.d.ts.map +1 -1
- package/dist/components/form/fields/object/Object.js +4 -2
- package/dist/components/form/fields/object/Object.js.map +1 -1
- package/dist/components/form/fields/pendingEdit.d.ts +52 -0
- package/dist/components/form/fields/pendingEdit.d.ts.map +1 -0
- package/dist/components/form/fields/pendingEdit.js +79 -0
- package/dist/components/form/fields/pendingEdit.js.map +1 -0
- package/dist/components/form/fields/radio-group/RadioGroup.d.ts.map +1 -1
- package/dist/components/form/fields/radio-group/RadioGroup.js +8 -13
- package/dist/components/form/fields/radio-group/RadioGroup.js.map +1 -1
- package/dist/components/form/fields/rich-text/RichText.d.ts +20 -1
- package/dist/components/form/fields/rich-text/RichText.d.ts.map +1 -1
- package/dist/components/form/fields/rich-text/RichText.js +426 -91
- package/dist/components/form/fields/rich-text/RichText.js.map +1 -1
- package/dist/components/form/fields/rich-text/useTemplateTags.d.ts +18 -0
- package/dist/components/form/fields/rich-text/useTemplateTags.d.ts.map +1 -0
- package/dist/components/form/fields/rich-text/useTemplateTags.js +80 -0
- package/dist/components/form/fields/rich-text/useTemplateTags.js.map +1 -0
- package/dist/components/form/fields/schema-definition/CatalogLeafForm.d.ts.map +1 -1
- package/dist/components/form/fields/schema-definition/CatalogLeafForm.js +4 -1
- package/dist/components/form/fields/schema-definition/CatalogLeafForm.js.map +1 -1
- package/dist/components/form/fields/schema-definition/CatalogNodeEditor.d.ts.map +1 -1
- package/dist/components/form/fields/schema-definition/CatalogNodeEditor.js +20 -5
- package/dist/components/form/fields/schema-definition/CatalogNodeEditor.js.map +1 -1
- package/dist/components/form/fields/schema-definition/TableEditor.d.ts.map +1 -1
- package/dist/components/form/fields/schema-definition/TableEditor.js +10 -2
- package/dist/components/form/fields/schema-definition/TableEditor.js.map +1 -1
- package/dist/components/form/fields/schema-definition/index.d.ts.map +1 -1
- package/dist/components/form/fields/schema-definition/index.js +8 -4
- package/dist/components/form/fields/schema-definition/index.js.map +1 -1
- package/dist/components/form/fields/select/Select.d.ts +10 -1
- package/dist/components/form/fields/select/Select.d.ts.map +1 -1
- package/dist/components/form/fields/select/Select.js +28 -14
- package/dist/components/form/fields/select/Select.js.map +1 -1
- package/dist/components/form/fields/select/SelectCollection.d.ts +5 -0
- package/dist/components/form/fields/select/SelectCollection.d.ts.map +1 -1
- package/dist/components/form/fields/select/SelectCollection.js +25 -12
- package/dist/components/form/fields/select/SelectCollection.js.map +1 -1
- package/dist/components/form/fields/select/unavailableRow.d.ts +23 -0
- package/dist/components/form/fields/select/unavailableRow.d.ts.map +1 -0
- package/dist/components/form/fields/select/unavailableRow.js +55 -0
- package/dist/components/form/fields/select/unavailableRow.js.map +1 -0
- package/dist/components/form/fields/template/ReadOnlyTemplateTag.d.ts +11 -5
- package/dist/components/form/fields/template/ReadOnlyTemplateTag.d.ts.map +1 -1
- package/dist/components/form/fields/template/ReadOnlyTemplateTag.js +21 -5
- package/dist/components/form/fields/template/ReadOnlyTemplateTag.js.map +1 -1
- package/dist/components/form/fields/template/TemplateBrowser.d.ts +16 -0
- package/dist/components/form/fields/template/TemplateBrowser.d.ts.map +1 -0
- package/dist/components/form/fields/template/TemplateBrowser.js +89 -0
- package/dist/components/form/fields/template/TemplateBrowser.js.map +1 -0
- package/dist/components/form/fields/template/TemplateField.d.ts +105 -1
- package/dist/components/form/fields/template/TemplateField.d.ts.map +1 -1
- package/dist/components/form/fields/template/TemplateField.js +706 -168
- package/dist/components/form/fields/template/TemplateField.js.map +1 -1
- package/dist/components/form/fields/template/TemplatePicker.d.ts +54 -0
- package/dist/components/form/fields/template/TemplatePicker.d.ts.map +1 -0
- package/dist/components/form/fields/template/TemplatePicker.js +459 -0
- package/dist/components/form/fields/template/TemplatePicker.js.map +1 -0
- package/dist/components/form/fields/template/TemplateText.d.ts +0 -17
- package/dist/components/form/fields/template/TemplateText.d.ts.map +1 -1
- package/dist/components/form/fields/template/TemplateText.js +22 -16
- package/dist/components/form/fields/template/TemplateText.js.map +1 -1
- package/dist/components/form/fields/template/referenceNames.d.ts +63 -0
- package/dist/components/form/fields/template/referenceNames.d.ts.map +1 -0
- package/dist/components/form/fields/template/referenceNames.js +69 -0
- package/dist/components/form/fields/template/referenceNames.js.map +1 -0
- package/dist/components/form/fields/template/writtenAsText.d.ts +61 -0
- package/dist/components/form/fields/template/writtenAsText.d.ts.map +1 -0
- package/dist/components/form/fields/template/writtenAsText.js +204 -0
- package/dist/components/form/fields/template/writtenAsText.js.map +1 -0
- package/dist/components/form/index.d.ts +12 -2
- package/dist/components/form/index.d.ts.map +1 -1
- package/dist/components/form/index.js +25 -3
- package/dist/components/form/index.js.map +1 -1
- package/dist/components/form/typeSentenceForm.d.ts +17 -0
- package/dist/components/form/typeSentenceForm.d.ts.map +1 -0
- package/dist/components/form/typeSentenceForm.js +54 -0
- package/dist/components/form/typeSentenceForm.js.map +1 -0
- package/dist/components/imageLightbox/ImageLightbox.d.ts.map +1 -1
- package/dist/components/imageLightbox/ImageLightbox.js +19 -9
- package/dist/components/imageLightbox/ImageLightbox.js.map +1 -1
- package/dist/components/log/Log.d.ts.map +1 -1
- package/dist/components/log/Log.js +20 -8
- package/dist/components/log/Log.js.map +1 -1
- package/dist/components/menu/Menu.d.ts.map +1 -1
- package/dist/components/menu/Menu.js +19 -10
- package/dist/components/menu/Menu.js.map +1 -1
- package/dist/components/smartEditor/CompletionMenu.d.ts +53 -0
- package/dist/components/smartEditor/CompletionMenu.d.ts.map +1 -0
- package/dist/components/smartEditor/CompletionMenu.js +302 -0
- package/dist/components/smartEditor/CompletionMenu.js.map +1 -0
- package/dist/components/smartEditor/MarkdownDoc.d.ts +1 -1
- package/dist/components/smartEditor/MarkdownDoc.js +3 -3
- package/dist/components/smartEditor/MarkdownDoc.js.map +1 -1
- package/dist/components/smartEditor/SmartEditor.d.ts.map +1 -1
- package/dist/components/smartEditor/SmartEditor.js +616 -190
- package/dist/components/smartEditor/SmartEditor.js.map +1 -1
- package/dist/components/smartEditor/completionStyle.d.ts +28 -0
- package/dist/components/smartEditor/completionStyle.d.ts.map +1 -0
- package/dist/components/smartEditor/completionStyle.js +79 -0
- package/dist/components/smartEditor/completionStyle.js.map +1 -0
- package/dist/components/smartEditor/contextTitle.d.ts +10 -0
- package/dist/components/smartEditor/contextTitle.d.ts.map +1 -0
- package/dist/components/smartEditor/contextTitle.js +21 -0
- package/dist/components/smartEditor/contextTitle.js.map +1 -0
- package/dist/components/smartEditor/editingAids.d.ts +64 -0
- package/dist/components/smartEditor/editingAids.d.ts.map +1 -0
- package/dist/components/smartEditor/editingAids.js +213 -0
- package/dist/components/smartEditor/editingAids.js.map +1 -0
- package/dist/components/smartEditor/index.d.ts +6 -1
- package/dist/components/smartEditor/index.d.ts.map +1 -1
- package/dist/components/smartEditor/index.js +19 -1
- package/dist/components/smartEditor/index.js.map +1 -1
- package/dist/components/smartEditor/templateCompletions.d.ts +98 -0
- package/dist/components/smartEditor/templateCompletions.d.ts.map +1 -0
- package/dist/components/smartEditor/templateCompletions.js +380 -0
- package/dist/components/smartEditor/templateCompletions.js.map +1 -0
- package/dist/components/smartEditor/typedReferences.d.ts +34 -0
- package/dist/components/smartEditor/typedReferences.d.ts.map +1 -0
- package/dist/components/smartEditor/typedReferences.js +179 -0
- package/dist/components/smartEditor/typedReferences.js.map +1 -0
- package/dist/components/smartEditor/types.d.ts +116 -2
- package/dist/components/smartEditor/types.d.ts.map +1 -1
- package/dist/components/smartEditor/useEditingAids.d.ts +38 -0
- package/dist/components/smartEditor/useEditingAids.d.ts.map +1 -0
- package/dist/components/smartEditor/useEditingAids.js +392 -0
- package/dist/components/smartEditor/useEditingAids.js.map +1 -0
- package/dist/components/smartEditor/useLspAutocomplete.d.ts +106 -3
- package/dist/components/smartEditor/useLspAutocomplete.d.ts.map +1 -1
- package/dist/components/smartEditor/useLspAutocomplete.js +592 -149
- package/dist/components/smartEditor/useLspAutocomplete.js.map +1 -1
- package/dist/components/smartEditor/useLspHover.d.ts +33 -7
- package/dist/components/smartEditor/useLspHover.d.ts.map +1 -1
- package/dist/components/smartEditor/useLspHover.js +364 -35
- package/dist/components/smartEditor/useLspHover.js.map +1 -1
- package/dist/components/smartEditor/useLspSemanticTokens.js +1 -1
- package/dist/components/smartEditor/useLspSemanticTokens.js.map +1 -1
- package/dist/components/smartEditor/useLspSession.d.ts +6 -0
- package/dist/components/smartEditor/useLspSession.d.ts.map +1 -1
- package/dist/components/smartEditor/useLspSession.js +7 -6
- package/dist/components/smartEditor/useLspSession.js.map +1 -1
- package/dist/components/smartEditor/useLspSignatureHelp.d.ts.map +1 -1
- package/dist/components/smartEditor/useLspSignatureHelp.js +6 -11
- package/dist/components/smartEditor/useLspSignatureHelp.js.map +1 -1
- package/dist/components/smartEditor/useTabCameIn.d.ts +10 -0
- package/dist/components/smartEditor/useTabCameIn.d.ts.map +1 -0
- package/dist/components/smartEditor/useTabCameIn.js +42 -0
- package/dist/components/smartEditor/useTabCameIn.js.map +1 -0
- package/dist/components/supportTicket/AttachmentChips.d.ts.map +1 -1
- package/dist/components/supportTicket/AttachmentChips.js +15 -5
- package/dist/components/supportTicket/AttachmentChips.js.map +1 -1
- package/dist/components/supportTicket/InterfaceReferenceTags.d.ts +2 -3
- package/dist/components/supportTicket/InterfaceReferenceTags.d.ts.map +1 -1
- package/dist/components/supportTicket/InterfaceReferenceTags.js.map +1 -1
- package/dist/components/supportTicket/ReferencePicker.d.ts +9 -3
- package/dist/components/supportTicket/ReferencePicker.d.ts.map +1 -1
- package/dist/components/supportTicket/ReferencePicker.js +38 -23
- package/dist/components/supportTicket/ReferencePicker.js.map +1 -1
- package/dist/components/supportTicket/TicketHeader.d.ts +3 -4
- package/dist/components/supportTicket/TicketHeader.d.ts.map +1 -1
- package/dist/components/supportTicket/TicketHeader.js +21 -6
- package/dist/components/supportTicket/TicketHeader.js.map +1 -1
- package/dist/components/supportTicket/TicketMetaTags.d.ts +1 -1
- package/dist/components/supportTicket/TicketReplyBox.d.ts.map +1 -1
- package/dist/components/supportTicket/TicketReplyBox.js +10 -29
- package/dist/components/supportTicket/TicketReplyBox.js.map +1 -1
- package/dist/components/supportTicket/useLoadedImages.d.ts +0 -10
- package/dist/components/supportTicket/useLoadedImages.d.ts.map +1 -1
- package/dist/components/supportTicket/useLoadedImages.js +1 -63
- package/dist/components/supportTicket/useLoadedImages.js.map +1 -1
- package/dist/components/ticketReferences/TicketReferences.d.ts.map +1 -1
- package/dist/components/ticketReferences/TicketReferences.js +10 -9
- package/dist/components/ticketReferences/TicketReferences.js.map +1 -1
- package/dist/components/ticketThread/TicketThread.d.ts.map +1 -1
- package/dist/components/ticketThread/TicketThread.js +52 -21
- package/dist/components/ticketThread/TicketThread.js.map +1 -1
- package/dist/helpers/allowedValues.d.ts +21 -12
- package/dist/helpers/allowedValues.d.ts.map +1 -1
- package/dist/helpers/allowedValues.js +40 -20
- package/dist/helpers/allowedValues.js.map +1 -1
- package/dist/helpers/descriptionTooltip.d.ts +46 -0
- package/dist/helpers/descriptionTooltip.d.ts.map +1 -0
- package/dist/helpers/descriptionTooltip.js +76 -0
- package/dist/helpers/descriptionTooltip.js.map +1 -0
- package/dist/helpers/domProps.d.ts +5 -0
- package/dist/helpers/domProps.d.ts.map +1 -0
- package/dist/helpers/domProps.js +47 -0
- package/dist/helpers/domProps.js.map +1 -0
- package/dist/helpers/expressions.d.ts +115 -4
- package/dist/helpers/expressions.d.ts.map +1 -1
- package/dist/helpers/expressions.js +247 -29
- package/dist/helpers/expressions.js.map +1 -1
- package/dist/helpers/hoveringPointer.d.ts +26 -0
- package/dist/helpers/hoveringPointer.d.ts.map +1 -0
- package/dist/helpers/hoveringPointer.js +29 -0
- package/dist/helpers/hoveringPointer.js.map +1 -0
- package/dist/helpers/markdownText.d.ts +14 -0
- package/dist/helpers/markdownText.d.ts.map +1 -0
- package/dist/helpers/markdownText.js +160 -0
- package/dist/helpers/markdownText.js.map +1 -0
- package/dist/helpers/noDescription.d.ts +9 -0
- package/dist/helpers/noDescription.d.ts.map +1 -0
- package/dist/helpers/noDescription.js +13 -0
- package/dist/helpers/noDescription.js.map +1 -0
- package/dist/helpers/optionUiTypes.d.ts +2 -2
- package/dist/helpers/qorusTypeCatalogue.d.ts +147 -0
- package/dist/helpers/qorusTypeCatalogue.d.ts.map +1 -0
- package/dist/helpers/qorusTypeCatalogue.js +505 -0
- package/dist/helpers/qorusTypeCatalogue.js.map +1 -0
- package/dist/helpers/readableColors.d.ts +36 -0
- package/dist/helpers/readableColors.d.ts.map +1 -0
- package/dist/helpers/readableColors.js +116 -0
- package/dist/helpers/readableColors.js.map +1 -0
- package/dist/helpers/recordFieldReference.d.ts +15 -0
- package/dist/helpers/recordFieldReference.d.ts.map +1 -0
- package/dist/helpers/recordFieldReference.js +89 -0
- package/dist/helpers/recordFieldReference.js.map +1 -0
- package/dist/helpers/singleLineString.d.ts.map +1 -1
- package/dist/helpers/singleLineString.js +0 -1
- package/dist/helpers/singleLineString.js.map +1 -1
- package/dist/helpers/templateCatalogue.d.ts +104 -0
- package/dist/helpers/templateCatalogue.d.ts.map +1 -0
- package/dist/helpers/templateCatalogue.js +116 -0
- package/dist/helpers/templateCatalogue.js.map +1 -0
- package/dist/helpers/templateCatalogueContext.d.ts +19 -0
- package/dist/helpers/templateCatalogueContext.d.ts.map +1 -0
- package/dist/helpers/templateCatalogueContext.js +31 -0
- package/dist/helpers/templateCatalogueContext.js.map +1 -0
- package/dist/helpers/templateItems.d.ts +2 -2
- package/dist/helpers/templateItems.d.ts.map +1 -1
- package/dist/helpers/templateItems.js +6 -4
- package/dist/helpers/templateItems.js.map +1 -1
- package/dist/helpers/templateText.d.ts +1 -0
- package/dist/helpers/templateText.d.ts.map +1 -1
- package/dist/helpers/templateText.js +7 -3
- package/dist/helpers/templateText.js.map +1 -1
- package/dist/helpers/templateTree.d.ts +248 -0
- package/dist/helpers/templateTree.d.ts.map +1 -0
- package/dist/helpers/templateTree.js +892 -0
- package/dist/helpers/templateTree.js.map +1 -0
- package/dist/helpers/templateType.d.ts +28 -0
- package/dist/helpers/templateType.d.ts.map +1 -0
- package/dist/helpers/templateType.js +30 -0
- package/dist/helpers/templateType.js.map +1 -0
- package/dist/helpers/templates.d.ts +86 -16
- package/dist/helpers/templates.d.ts.map +1 -1
- package/dist/helpers/templates.js +305 -45
- package/dist/helpers/templates.js.map +1 -1
- package/dist/helpers/validations.d.ts +27 -0
- package/dist/helpers/validations.d.ts.map +1 -1
- package/dist/helpers/validations.js +169 -39
- package/dist/helpers/validations.js.map +1 -1
- package/dist/helpers/webLink.d.ts +8 -0
- package/dist/helpers/webLink.d.ts.map +1 -0
- package/dist/helpers/webLink.js +29 -0
- package/dist/helpers/webLink.js.map +1 -0
- package/dist/hooks/useQorusTypes.d.ts +12 -17
- package/dist/hooks/useQorusTypes.d.ts.map +1 -1
- package/dist/hooks/useQorusTypes.js +44 -172
- package/dist/hooks/useQorusTypes.js.map +1 -1
- package/dist/hooks/useReadableIntentShade.d.ts +9 -0
- package/dist/hooks/useReadableIntentShade.d.ts.map +1 -0
- package/dist/hooks/useReadableIntentShade.js +23 -0
- package/dist/hooks/useReadableIntentShade.js.map +1 -0
- package/dist/hooks/useReadableOpacity.d.ts +6 -0
- package/dist/hooks/useReadableOpacity.d.ts.map +1 -0
- package/dist/hooks/useReadableOpacity.js +17 -0
- package/dist/hooks/useReadableOpacity.js.map +1 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +24 -1
- package/dist/index.js.map +1 -1
- package/dist/tracking/ui/ExperimentCard.d.ts +1 -1
- package/dist/tracking/ui/ExperimentCard.d.ts.map +1 -1
- package/dist/tracking/ui/ExperimentCard.js +26 -10
- package/dist/tracking/ui/ExperimentCard.js.map +1 -1
- package/dist/tracking/ui/card.d.ts +2 -2
- package/dist/tracking/ui/card.d.ts.map +1 -1
- package/dist/tracking/ui/card.js +2 -2
- package/dist/tracking/ui/card.js.map +1 -1
- package/dist/tracking/ui/readable.d.ts +14 -0
- package/dist/tracking/ui/readable.d.ts.map +1 -0
- package/dist/tracking/ui/readable.js +60 -0
- package/dist/tracking/ui/readable.js.map +1 -0
- package/dist/utils/fetch.d.ts +9 -2
- package/dist/utils/fetch.d.ts.map +1 -1
- package/dist/utils/fetch.js +6 -5
- package/dist/utils/fetch.js.map +1 -1
- package/dist/utils/lspClient.types.d.ts +2 -0
- package/dist/utils/lspClient.types.d.ts.map +1 -1
- package/dist/utils/websocket.d.ts +65 -2
- package/dist/utils/websocket.d.ts.map +1 -1
- package/dist/utils/websocket.js +276 -44
- package/dist/utils/websocket.js.map +1 -1
- package/package.json +14 -6
- package/.claude/CLAUDE.md +0 -317
- package/.tasks/EXPORT_EXPRESSION_BUILDER.md +0 -38
- package/.tasks/EXPRESSION_BUILDER_REPORT.md +0 -149
- package/.tasks/EXPRESSION_FIELD_SEAMS.md +0 -66
- package/.tasks/FIELD_STACK_REPORT.md +0 -234
- package/.tasks/FORM_ENGINE_COMPACT_READ_FIRST.md +0 -558
- package/.tasks/FORM_ENGINE_EXPRESSIONS.md +0 -197
- package/.tasks/FORM_ENGINE_OPTIONS_SYNC.md +0 -95
- package/.tasks/FORM_FIELD_EXTRAS.md +0 -72
- package/.tasks/INDEX.md +0 -111
- package/.tasks/LSP_SHARED_CONNECTION.md +0 -75
- package/.tasks/QONSOLE_ASSIST_FEATURES.md +0 -306
- package/.tasks/RENDER_EXPRESSION_LSP.md +0 -159
- package/.tasks/REQRAFT_AUTO_FIELD.md +0 -176
- package/.tasks/SCHEMA_DEFINITION_FIELD.md +0 -250
- package/.tasks/SMART_EDITOR_CONTEXT_AND_POLISH.md +0 -340
- package/.tasks/SMART_EDITOR_LSP_FEATURES.md +0 -299
- package/.tasks/SMART_EDITOR_REVIEW_FOLLOWUPS.md +0 -280
- package/.tasks/SMART_EDITOR_UX_POLISH.md +0 -383
- package/.tasks/SMART_EDITOR_VISUAL_POLISH.md +0 -246
- package/.tasks/STORY_NETWORK_ISOLATION.md +0 -98
- package/.tasks/TEMPLATE_TOKEN_GRAMMAR.md +0 -72
- package/CODE_OF_CONDUCT.md +0 -105
- package/CONTRIBUTING.MD +0 -78
- package/SECURITY.md +0 -3
- package/chromatic.config.json +0 -5
- package/design/COMPACT_ENGINE_REDESIGN.md +0 -156
- package/design/COMPACT_INFO_DISPLAY.md +0 -87
- package/design/COMPACT_PARITY.md +0 -85
- package/design/EXPRESSION_BUILDER_REPORT_STRATEGY.md +0 -92
- package/design/FORM_ENGINE_COMPACT.md +0 -300
- package/design/FORM_ENGINE_COMPACT_UX_PLAN.md +0 -353
- package/design/FORM_ENGINE_EXPRESSIONS.md +0 -257
- package/design/FORM_ENGINE_FIELD_MIGRATION.md +0 -419
- package/design/IDE_INTEGRATION.md +0 -64
- package/design/RENDER_EXPRESSION_TRANSPORT.md +0 -156
- package/design/SELECT_DIALOG_FLOOR.md +0 -86
- package/design/SMART_EDITOR_UX.md +0 -438
- package/design/TRACKING.md +0 -290
- package/design/UNAVAILABLE_ALLOWED_VALUES.md +0 -226
- package/dist/components/form/engine/formAppearance.d.ts +0 -49
- package/dist/components/form/engine/formAppearance.d.ts.map +0 -1
- package/dist/components/form/engine/formAppearance.js +0 -50
- package/dist/components/form/engine/formAppearance.js.map +0 -1
- package/dist/components/form/fields/ChoiceGroupHeading.d.ts +0 -21
- package/dist/components/form/fields/ChoiceGroupHeading.d.ts.map +0 -1
- package/dist/components/form/fields/ChoiceGroupHeading.js +0 -33
- package/dist/components/form/fields/ChoiceGroupHeading.js.map +0 -1
- package/dist/components/form/fields/allowed-values/savedValues.d.ts +0 -30
- package/dist/components/form/fields/allowed-values/savedValues.d.ts.map +0 -1
- package/dist/components/form/fields/allowed-values/savedValues.js +0 -39
- package/dist/components/form/fields/allowed-values/savedValues.js.map +0 -1
- package/dist/helpers/fieldDescription.d.ts +0 -16
- package/dist/helpers/fieldDescription.d.ts.map +0 -1
- package/dist/helpers/fieldDescription.js +0 -40
- package/dist/helpers/fieldDescription.js.map +0 -1
- package/src/components/Description/index.tsx +0 -254
- package/src/components/Description/markdownRendererContext.tsx +0 -29
- package/src/components/FocusedEditing/index.tsx +0 -50
- package/src/components/codeSize/index.tsx +0 -79
- package/src/components/composer/Composer.stories.tsx +0 -238
- package/src/components/composer/Composer.tsx +0 -554
- package/src/components/composer/helpers.ts +0 -74
- package/src/components/composer/index.ts +0 -2
- package/src/components/dpqlEditor/DpqlEditor.stories.tsx +0 -1183
- package/src/components/dpqlEditor/DpqlEditor.tsx +0 -219
- package/src/components/dpqlEditor/dpqlHelpers.ts +0 -287
- package/src/components/dpqlEditor/dpqlInserter.ts +0 -121
- package/src/components/dpqlEditor/dpqlProbe.ts +0 -165
- package/src/components/dpqlEditor/dpqlTags.ts +0 -114
- package/src/components/dpqlEditor/index.ts +0 -41
- package/src/components/dpqlEditor/types.ts +0 -203
- package/src/components/dpqlEditor/useDpqlProbe.ts +0 -33
- package/src/components/dpqlEditor/useDpqlSession.ts +0 -411
- package/src/components/form/engine/CompactRow.tsx +0 -2740
- package/src/components/form/engine/CompactToolbar.tsx +0 -399
- package/src/components/form/engine/FormEngine.stories.tsx +0 -9934
- package/src/components/form/engine/FormEngine.tsx +0 -4891
- package/src/components/form/engine/FormEngineAppearance.stories.tsx +0 -609
- package/src/components/form/engine/FormEngineRemote.stories.tsx +0 -679
- package/src/components/form/engine/FormEngineStickyHeaders.stories.tsx +0 -335
- package/src/components/form/engine/FormFieldsSkeleton.tsx +0 -82
- package/src/components/form/engine/OptionFieldMessages.tsx +0 -548
- package/src/components/form/engine/OptionsHelpDialog.tsx +0 -29
- package/src/components/form/engine/__fixtures__/basicFormOptions.ts +0 -309
- package/src/components/form/engine/__fixtures__/fieldChromeOptions.ts +0 -45
- package/src/components/form/engine/_structuredData/SchemaDataView.stories.tsx +0 -233
- package/src/components/form/engine/_structuredData/SchemaDataView.tsx +0 -755
- package/src/components/form/engine/_structuredData/StructuredDataView.stories.tsx +0 -85
- package/src/components/form/engine/_structuredData/StructuredDataView.tsx +0 -75
- package/src/components/form/engine/_structuredData/structuredData.ts +0 -145
- package/src/components/form/engine/compactRowContext.ts +0 -153
- package/src/components/form/engine/compactRowStyles.ts +0 -1087
- package/src/components/form/engine/compactToolbarContext.ts +0 -72
- package/src/components/form/engine/formAppearance.ts +0 -79
- package/src/components/form/engine/optionActions.ts +0 -128
- package/src/components/form/engine/optionsContext.ts +0 -24
- package/src/components/form/engine/readFirst.ts +0 -1090
- package/src/components/form/engine/rendererTypes.ts +0 -107
- package/src/components/form/engine/revealRow.ts +0 -123
- package/src/components/form/engine/rowFocus.ts +0 -112
- package/src/components/form/engine/rowMenuContext.ts +0 -159
- package/src/components/form/engine/rowOpenPicker.ts +0 -27
- package/src/components/form/engine/typeChoices.ts +0 -63
- package/src/components/form/engine/variants/FormEngineVariants.stories.tsx +0 -159
- package/src/components/form/engine/variants/VariantCalmTable.tsx +0 -244
- package/src/components/form/engine/variants/VariantCards.tsx +0 -212
- package/src/components/form/engine/variants/VariantFocus.tsx +0 -382
- package/src/components/form/engine/variants/VariantMinimal.tsx +0 -170
- package/src/components/form/engine/variants/focusDemo.ts +0 -145
- package/src/components/form/engine/variants/variantModel.ts +0 -223
- package/src/components/form/engine/variants/variantParts.tsx +0 -313
- package/src/components/form/expressions/DpqlRendering.tsx +0 -85
- package/src/components/form/expressions/ExpressionField.stories.tsx +0 -1395
- package/src/components/form/expressions/ExpressionField.tsx +0 -503
- package/src/components/form/expressions/argumentPresence.ts +0 -213
- package/src/components/form/expressions/builder/ExpressionBuilder.stories.tsx +0 -1683
- package/src/components/form/expressions/builder/argumentDetail.tsx +0 -17
- package/src/components/form/expressions/builder/argumentLabel.tsx +0 -146
- package/src/components/form/expressions/builder/argumentSlot.tsx +0 -101
- package/src/components/form/expressions/builder/argumentWrapper.tsx +0 -243
- package/src/components/form/expressions/builder/confirmMismatchedTypesModal.tsx +0 -120
- package/src/components/form/expressions/builder/confirmUnsupportedTypeModal.tsx +0 -69
- package/src/components/form/expressions/builder/index.tsx +0 -1545
- package/src/components/form/expressions/builder/item.tsx +0 -89
- package/src/components/form/expressions/builder/moveToPositionStrip.tsx +0 -156
- package/src/components/form/expressions/builder/renderTemplate.tsx +0 -42
- package/src/components/form/expressions/dpqlMockLanguage.ts +0 -566
- package/src/components/form/expressions/dpqlMockLsp.ts +0 -126
- package/src/components/form/expressions/mockExpressions.ts +0 -317
- package/src/components/form/expressions/renderExpressionToText.ts +0 -152
- package/src/components/form/expressions/types.ts +0 -110
- package/src/components/form/expressions/useExpressions.ts +0 -101
- package/src/components/form/expressions/useRenderExpression.ts +0 -165
- package/src/components/form/fields/ChoiceGroupHeading.tsx +0 -38
- package/src/components/form/fields/Field.stories.tsx +0 -143
- package/src/components/form/fields/Field.tsx +0 -734
- package/src/components/form/fields/allowed-values/AllowedValues.tsx +0 -321
- package/src/components/form/fields/allowed-values/savedValues.ts +0 -64
- package/src/components/form/fields/array/ArrayAuto.tsx +0 -237
- package/src/components/form/fields/array/ArrayAutoField.stories.tsx +0 -475
- package/src/components/form/fields/array/ArrayAutoField.tsx +0 -367
- package/src/components/form/fields/auto/AutoFormField.stories.tsx +0 -825
- package/src/components/form/fields/auto/AutoFormField.tsx +0 -1183
- package/src/components/form/fields/binary/Binary.stories.tsx +0 -122
- package/src/components/form/fields/binary/Binary.tsx +0 -91
- package/src/components/form/fields/boolean/Boolean.stories.tsx +0 -125
- package/src/components/form/fields/boolean/Boolean.tsx +0 -34
- package/src/components/form/fields/byte-size/ByteSize.stories.tsx +0 -87
- package/src/components/form/fields/byte-size/ByteSize.tsx +0 -58
- package/src/components/form/fields/color/Color.stories.tsx +0 -99
- package/src/components/form/fields/color/Color.tsx +0 -46
- package/src/components/form/fields/cron/Cron.stories.tsx +0 -68
- package/src/components/form/fields/cron/Cron.tsx +0 -80
- package/src/components/form/fields/date/Date.stories.tsx +0 -77
- package/src/components/form/fields/date/Date.tsx +0 -55
- package/src/components/form/fields/emittedValues.ts +0 -70
- package/src/components/form/fields/file/File.stories.tsx +0 -161
- package/src/components/form/fields/file/File.tsx +0 -227
- package/src/components/form/fields/long-string/LongString.stories.tsx +0 -147
- package/src/components/form/fields/long-string/LongString.tsx +0 -141
- package/src/components/form/fields/markdown/Markdown.stories.tsx +0 -76
- package/src/components/form/fields/markdown/Markdown.tsx +0 -81
- package/src/components/form/fields/markdown/MarkdownView.tsx +0 -222
- package/src/components/form/fields/multi-select/MultiSelectFormField.tsx +0 -140
- package/src/components/form/fields/number/Number.stories.tsx +0 -159
- package/src/components/form/fields/number/Number.tsx +0 -175
- package/src/components/form/fields/object/Object.stories.tsx +0 -398
- package/src/components/form/fields/object/Object.tsx +0 -255
- package/src/components/form/fields/radio-group/RadioGroup.stories.tsx +0 -95
- package/src/components/form/fields/radio-group/RadioGroup.tsx +0 -52
- package/src/components/form/fields/radio-group/images/java-96x128.png +0 -0
- package/src/components/form/fields/radio-group/images/python-129x128.png +0 -0
- package/src/components/form/fields/radio-group/images/qore-106x128.png +0 -0
- package/src/components/form/fields/rich-text/RichText.stories.tsx +0 -260
- package/src/components/form/fields/rich-text/RichText.tsx +0 -537
- package/src/components/form/fields/schema-definition/CatalogLeafForm.tsx +0 -242
- package/src/components/form/fields/schema-definition/CatalogNodeEditor.tsx +0 -758
- package/src/components/form/fields/schema-definition/Hint.tsx +0 -22
- package/src/components/form/fields/schema-definition/InlineValidationBanner.tsx +0 -138
- package/src/components/form/fields/schema-definition/Loader.tsx +0 -20
- package/src/components/form/fields/schema-definition/MigrationsTab.tsx +0 -187
- package/src/components/form/fields/schema-definition/SchemaDefinitionField.stories.tsx +0 -286
- package/src/components/form/fields/schema-definition/TableEditor.tsx +0 -155
- package/src/components/form/fields/schema-definition/TablesTab.tsx +0 -138
- package/src/components/form/fields/schema-definition/catalog.ts +0 -237
- package/src/components/form/fields/schema-definition/helpers.ts +0 -90
- package/src/components/form/fields/schema-definition/index.tsx +0 -418
- package/src/components/form/fields/schema-definition/mockCatalog.ts +0 -325
- package/src/components/form/fields/schema-definition/mockDefinition.ts +0 -111
- package/src/components/form/fields/schema-definition/referenceSuggestions.tsx +0 -152
- package/src/components/form/fields/schema-definition/starterTemplate.ts +0 -68
- package/src/components/form/fields/schema-definition/types.ts +0 -185
- package/src/components/form/fields/schema-definition/useSchemaOptionCatalog.ts +0 -49
- package/src/components/form/fields/select/Select.stories.tsx +0 -872
- package/src/components/form/fields/select/Select.tsx +0 -624
- package/src/components/form/fields/select/SelectCollection.tsx +0 -594
- package/src/components/form/fields/string/String.stories.tsx +0 -86
- package/src/components/form/fields/string/String.tsx +0 -43
- package/src/components/form/fields/template/ExampleValueModal.stories.tsx +0 -114
- package/src/components/form/fields/template/ExampleValueModal.tsx +0 -99
- package/src/components/form/fields/template/ReadOnlyTemplateTag.tsx +0 -47
- package/src/components/form/fields/template/TemplateField.stories.tsx +0 -1121
- package/src/components/form/fields/template/TemplateField.tsx +0 -1749
- package/src/components/form/fields/template/TemplateText.tsx +0 -115
- package/src/components/form/fields/template/__fixtures__/longExampleValue.ts +0 -7
- package/src/components/form/fields/template/__fixtures__/multiLevelTemplates.json +0 -147
- package/src/components/form/fields/template/__fixtures__/templates.json +0 -83
- package/src/components/form/fields/timeout/Timeout.stories.tsx +0 -228
- package/src/components/form/fields/timeout/Timeout.tsx +0 -87
- package/src/components/form/fields/url/Url.stories.tsx +0 -94
- package/src/components/form/fields/url/Url.tsx +0 -85
- package/src/components/form/index.tsx +0 -49
- package/src/components/imageLightbox/ImageLightbox.stories.tsx +0 -238
- package/src/components/imageLightbox/ImageLightbox.tsx +0 -238
- package/src/components/imageLightbox/index.ts +0 -1
- package/src/components/log/Log.stories.tsx +0 -333
- package/src/components/log/Log.tsx +0 -285
- package/src/components/menu/Menu.stories.tsx +0 -155
- package/src/components/menu/Menu.tsx +0 -312
- package/src/components/qonsoleSmartInput/QonsoleSmartInput.stories.tsx +0 -797
- package/src/components/qonsoleSmartInput/QonsoleSmartInput.tsx +0 -105
- package/src/components/qonsoleSmartInput/index.ts +0 -16
- package/src/components/qonsoleSmartInput/qonsoleInserter.ts +0 -77
- package/src/components/qonsoleSmartInput/types.ts +0 -133
- package/src/components/qonsoleSmartInput/useQonsoleSession.ts +0 -124
- package/src/components/searchFilterBar/SearchFilterBar.stories.tsx +0 -62
- package/src/components/searchFilterBar/SearchFilterBar.tsx +0 -144
- package/src/components/searchFilterBar/index.ts +0 -1
- package/src/components/smartEditor/MarkdownDoc.tsx +0 -190
- package/src/components/smartEditor/SmartEditor.stories.tsx +0 -475
- package/src/components/smartEditor/SmartEditor.tsx +0 -808
- package/src/components/smartEditor/__fixtures__/mockLspServer.ts +0 -205
- package/src/components/smartEditor/helpers.ts +0 -217
- package/src/components/smartEditor/index.ts +0 -35
- package/src/components/smartEditor/styling.ts +0 -45
- package/src/components/smartEditor/types.ts +0 -211
- package/src/components/smartEditor/useLspAutocomplete.ts +0 -758
- package/src/components/smartEditor/useLspDiagnosticDecorations.ts +0 -125
- package/src/components/smartEditor/useLspHover.ts +0 -230
- package/src/components/smartEditor/useLspSemanticTokens.ts +0 -298
- package/src/components/smartEditor/useLspSession.ts +0 -231
- package/src/components/smartEditor/useLspSignatureHelp.ts +0 -198
- package/src/components/supportTicket/AttachmentChips.stories.tsx +0 -171
- package/src/components/supportTicket/AttachmentChips.tsx +0 -147
- package/src/components/supportTicket/InterfaceReferenceTags.stories.tsx +0 -257
- package/src/components/supportTicket/InterfaceReferenceTags.tsx +0 -130
- package/src/components/supportTicket/ReferencePicker.stories.tsx +0 -580
- package/src/components/supportTicket/ReferencePicker.tsx +0 -573
- package/src/components/supportTicket/TicketConversation.stories.tsx +0 -120
- package/src/components/supportTicket/TicketHeader.stories.tsx +0 -183
- package/src/components/supportTicket/TicketHeader.tsx +0 -248
- package/src/components/supportTicket/TicketMetaTags.stories.tsx +0 -103
- package/src/components/supportTicket/TicketMetaTags.tsx +0 -85
- package/src/components/supportTicket/TicketReplyBox.stories.tsx +0 -357
- package/src/components/supportTicket/TicketReplyBox.tsx +0 -172
- package/src/components/supportTicket/__fixtures__/kindMarks.ts +0 -28
- package/src/components/supportTicket/attachmentAccess.ts +0 -97
- package/src/components/supportTicket/fileToAttachment.ts +0 -24
- package/src/components/supportTicket/index.ts +0 -10
- package/src/components/supportTicket/meta.ts +0 -206
- package/src/components/supportTicket/ticketModel.ts +0 -131
- package/src/components/supportTicket/useLoadedImages.ts +0 -93
- package/src/components/ticketReferences/TicketReferences.stories.tsx +0 -341
- package/src/components/ticketReferences/TicketReferences.tsx +0 -914
- package/src/components/ticketReferences/index.ts +0 -2
- package/src/components/ticketThread/TicketThread.stories.tsx +0 -898
- package/src/components/ticketThread/TicketThread.tsx +0 -706
- package/src/components/ticketThread/index.ts +0 -6
- package/src/contexts/FetchContext.tsx +0 -25
- package/src/contexts/ReqraftContext.tsx +0 -9
- package/src/contexts/StorageContext.tsx +0 -33
- package/src/global.d.ts +0 -4
- package/src/helpers/allowedValues.ts +0 -268
- package/src/helpers/choiceChip.ts +0 -227
- package/src/helpers/common.ts +0 -326
- package/src/helpers/dpqlDetection.ts +0 -209
- package/src/helpers/expressions.ts +0 -140
- package/src/helpers/fieldDescription.ts +0 -39
- package/src/helpers/optionUiTypes.ts +0 -199
- package/src/helpers/options.ts +0 -150
- package/src/helpers/providerValue.ts +0 -125
- package/src/helpers/scrollbar.ts +0 -32
- package/src/helpers/singleLineString.ts +0 -62
- package/src/helpers/templateItems.ts +0 -81
- package/src/helpers/templateText.ts +0 -350
- package/src/helpers/templates.ts +0 -602
- package/src/helpers/validations.ts +0 -2085
- package/src/hooks/useArgSchema.ts +0 -37
- package/src/hooks/useCoarsePointer.ts +0 -30
- package/src/hooks/useFetch/useFetch.stories.tsx +0 -379
- package/src/hooks/useFetch/useFetch.tsx +0 -154
- package/src/hooks/usePhoneViewport.ts +0 -34
- package/src/hooks/useQorusTypes.ts +0 -233
- package/src/hooks/useReqraftProperty.ts +0 -16
- package/src/hooks/useStorage/useStorage.stories.tsx +0 -168
- package/src/hooks/useStorage/useStorage.ts +0 -35
- package/src/hooks/useTemplates.ts +0 -123
- package/src/hooks/useValidation.ts +0 -9
- package/src/hooks/useWebSocket/useWebSocket.ts +0 -224
- package/src/hooks/useWebSocket/useWebsocket.stories.tsx +0 -640
- package/src/hooks/useWhyDidYouUpdate.ts +0 -38
- package/src/index.tsx +0 -86
- package/src/providers/FetchProvider.tsx +0 -40
- package/src/providers/ReqraftProvider.tsx +0 -52
- package/src/providers/StorageProvider.tsx +0 -131
- package/src/stores/currentUser/currentUser.stories.tsx +0 -100
- package/src/stores/currentUser/currentUser.tsx +0 -94
- package/src/stories/Data/fileFieldArgSchema.json +0 -86
- package/src/stories/Tests/utils.ts +0 -320
- package/src/stories/storyNetwork.ts +0 -92
- package/src/stories/tracking.tsx +0 -206
- package/src/tracking/browser/attach.ts +0 -186
- package/src/tracking/browser/env.ts +0 -78
- package/src/tracking/core/consent.ts +0 -37
- package/src/tracking/core/engagement.ts +0 -47
- package/src/tracking/core/experiments.ts +0 -258
- package/src/tracking/core/hash.ts +0 -26
- package/src/tracking/core/ids.ts +0 -25
- package/src/tracking/core/observable.ts +0 -23
- package/src/tracking/core/queue.ts +0 -131
- package/src/tracking/core/sections.ts +0 -166
- package/src/tracking/core/storage.ts +0 -69
- package/src/tracking/core/tracker.ts +0 -417
- package/src/tracking/core/types.ts +0 -162
- package/src/tracking/core/utm.ts +0 -23
- package/src/tracking/index.ts +0 -72
- package/src/tracking/markup.ts +0 -17
- package/src/tracking/react/Experiment.tsx +0 -44
- package/src/tracking/react/TrackingProvider.tsx +0 -56
- package/src/tracking/react/hooks.ts +0 -106
- package/src/tracking/react/index.ts +0 -13
- package/src/tracking/testing.ts +0 -108
- package/src/tracking/ui/ExperimentCard.stories.tsx +0 -296
- package/src/tracking/ui/ExperimentCard.tsx +0 -667
- package/src/tracking/ui/ExperimentsOverlay.stories.tsx +0 -155
- package/src/tracking/ui/ExperimentsOverlay.tsx +0 -437
- package/src/tracking/ui/anchor.ts +0 -180
- package/src/tracking/ui/card.ts +0 -464
- package/src/tracking/ui/client.ts +0 -117
- package/src/tracking/ui/index.ts +0 -77
- package/src/tracking/ui/types.ts +0 -110
- package/src/tracking/ui/useExperimentsAdmin.ts +0 -103
- package/src/types/Form.ts +0 -29
- package/src/types.ts +0 -14
- package/src/utils/datetime.ts +0 -10
- package/src/utils/fetch.ts +0 -457
- package/src/utils/lspClient.ts +0 -711
- package/src/utils/lspClient.types.ts +0 -211
- package/src/utils/queryUnlessCancelled.ts +0 -28
- package/src/utils/websocket.ts +0 -293
- package/vite.config.ts +0 -58
- package/vitest.config.ts +0 -69
|
@@ -1,357 +0,0 @@
|
|
|
1
|
-
import { ReqoreButton, ReqoreUIProvider } from '@qoretechnologies/reqore';
|
|
2
|
-
import { StoryObj } from '@storybook/react-vite';
|
|
3
|
-
import { expect, fn, screen, userEvent, waitFor, within } from 'storybook/test';
|
|
4
|
-
import { StoryMeta } from '../../types';
|
|
5
|
-
import { InterfaceReferenceTags } from './InterfaceReferenceTags';
|
|
6
|
-
import { TicketReplyBox } from './TicketReplyBox';
|
|
7
|
-
|
|
8
|
-
const meta = {
|
|
9
|
-
component: TicketReplyBox,
|
|
10
|
-
title: 'Components/TicketReplyBox',
|
|
11
|
-
args: {
|
|
12
|
-
onSend: fn(),
|
|
13
|
-
},
|
|
14
|
-
} as StoryMeta<typeof TicketReplyBox>;
|
|
15
|
-
|
|
16
|
-
export default meta;
|
|
17
|
-
type Story = StoryObj<typeof meta>;
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* The reply is sent with the white primary, never the Qonsole purple: a ticket reply is not a
|
|
21
|
-
* hand-off to Qonsole (instruction-files decision 002). Read from the drawn button, so a theme
|
|
22
|
-
* or a default that brings the purple back fails here.
|
|
23
|
-
*/
|
|
24
|
-
const expectWhiteSend = async (canvasElement: HTMLElement) => {
|
|
25
|
-
const send = within(canvasElement).getByText('Send reply').closest('button')!;
|
|
26
|
-
await waitFor(() => {
|
|
27
|
-
const [r, g, b] = getComputedStyle(send).backgroundColor.match(/\d+/g)!.map(Number);
|
|
28
|
-
expect(Math.min(r, g, b)).toBeGreaterThan(200);
|
|
29
|
-
});
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* The customer composer, plain-editor variant (used here for a deterministic
|
|
34
|
-
* type→send test): an attach button (no extra menu → a plain button, not a
|
|
35
|
-
* dropdown) and Send. No internal-note toggle. Typing enables Send; clicking it
|
|
36
|
-
* calls `onSend` with the body and `internal: false`.
|
|
37
|
-
*/
|
|
38
|
-
export const Default: Story = {
|
|
39
|
-
parameters: {
|
|
40
|
-
docs: {
|
|
41
|
-
description: {
|
|
42
|
-
story:
|
|
43
|
-
"Renders the customer composer's plain-editor variant — an attach button and Send, no internal-note toggle; typing a reply enables Send — the white primary, not the Qonsole purple — which calls onSend with the body and internal: false.",
|
|
44
|
-
},
|
|
45
|
-
},
|
|
46
|
-
},
|
|
47
|
-
args: { editor: 'plain' },
|
|
48
|
-
async play({ canvasElement, args }) {
|
|
49
|
-
const canvas = within(canvasElement);
|
|
50
|
-
const textarea = canvasElement.querySelector('textarea');
|
|
51
|
-
await expect(textarea).not.toBeNull();
|
|
52
|
-
await expect(canvas.queryByText('Internal note')).not.toBeInTheDocument();
|
|
53
|
-
|
|
54
|
-
await userEvent.type(textarea!, 'Here is my reply');
|
|
55
|
-
await expectWhiteSend(canvasElement);
|
|
56
|
-
await userEvent.click(canvas.getByText('Send reply'));
|
|
57
|
-
await waitFor(() =>
|
|
58
|
-
expect(args.onSend).toHaveBeenCalledWith(
|
|
59
|
-
'Here is my reply',
|
|
60
|
-
expect.objectContaining({ internal: false })
|
|
61
|
-
)
|
|
62
|
-
);
|
|
63
|
-
},
|
|
64
|
-
};
|
|
65
|
-
|
|
66
|
-
/**
|
|
67
|
-
* The staff composer (`allowInternalNote`): no toggle — the send button splits, so
|
|
68
|
-
* the primary action posts a public reply and the caret opens "Add internal note",
|
|
69
|
-
* which sends with `internal: true`.
|
|
70
|
-
*/
|
|
71
|
-
export const StaffWithInternalNote: Story = {
|
|
72
|
-
parameters: {
|
|
73
|
-
docs: {
|
|
74
|
-
description: {
|
|
75
|
-
story:
|
|
76
|
-
"Renders the staff composer with a split send button — the primary action (white, not the Qonsole purple) posts a public reply, while the caret opens 'Add internal note', which sends with internal: true.",
|
|
77
|
-
},
|
|
78
|
-
},
|
|
79
|
-
},
|
|
80
|
-
args: { allowInternalNote: true, editor: 'plain' },
|
|
81
|
-
async play({ canvasElement, args }) {
|
|
82
|
-
const canvas = within(canvasElement);
|
|
83
|
-
// no toggle any more; the primary action is a plain "Send reply"
|
|
84
|
-
await expect(canvas.queryByText('Internal note')).not.toBeInTheDocument();
|
|
85
|
-
await expect(canvas.getByText('Send reply')).toBeInTheDocument();
|
|
86
|
-
|
|
87
|
-
const textarea = canvasElement.querySelector('textarea');
|
|
88
|
-
await userEvent.type(textarea!, 'internal context');
|
|
89
|
-
await expectWhiteSend(canvasElement);
|
|
90
|
-
|
|
91
|
-
// "Add internal note" lives behind the split-send caret
|
|
92
|
-
const caret = canvasElement.querySelector('.ticket-send-more');
|
|
93
|
-
await expect(caret).not.toBeNull();
|
|
94
|
-
await userEvent.click(caret as Element);
|
|
95
|
-
await userEvent.click(await screen.findByText('Add internal note'));
|
|
96
|
-
|
|
97
|
-
await waitFor(() =>
|
|
98
|
-
expect(args.onSend).toHaveBeenCalledWith(
|
|
99
|
-
'internal context',
|
|
100
|
-
expect.objectContaining({ internal: true })
|
|
101
|
-
)
|
|
102
|
-
);
|
|
103
|
-
},
|
|
104
|
-
};
|
|
105
|
-
|
|
106
|
-
/** A closed ticket replaces the editor with a muted notice. */
|
|
107
|
-
export const Closed: Story = {
|
|
108
|
-
parameters: {
|
|
109
|
-
docs: {
|
|
110
|
-
description: {
|
|
111
|
-
story:
|
|
112
|
-
"Renders a closed ticket, where the disabled composer replaces the editor with a muted 'ticket is closed' notice.",
|
|
113
|
-
},
|
|
114
|
-
},
|
|
115
|
-
},
|
|
116
|
-
args: { disabled: true },
|
|
117
|
-
async play({ canvasElement }) {
|
|
118
|
-
await expect(within(canvasElement).getByText(/ticket is closed/i)).toBeInTheDocument();
|
|
119
|
-
await expect(canvasElement.querySelector('textarea')).toBeNull();
|
|
120
|
-
},
|
|
121
|
-
};
|
|
122
|
-
|
|
123
|
-
/**
|
|
124
|
-
* The helpdesk composer as it now ships: the shared `<Composer>` with the rich,
|
|
125
|
-
* Qonsole-style editor (`ReqoreRichTextEditor`) instead of a plain textarea. Staff
|
|
126
|
-
* split-send, an attach dropdown (Upload + injected screenshot/capture), the
|
|
127
|
-
* reference-interfaces toggle, and a reference chip below — all through the same
|
|
128
|
-
* slots. Markdown still flows to `onSend` as a plain string. This is the input the
|
|
129
|
-
* helpdesk uses.
|
|
130
|
-
*/
|
|
131
|
-
export const RichHelpdeskReply: Story = {
|
|
132
|
-
parameters: {
|
|
133
|
-
docs: {
|
|
134
|
-
description: {
|
|
135
|
-
story:
|
|
136
|
-
'Renders the shipping helpdesk composer with the rich Qonsole-style editor — staff split-send, an attach dropdown, a reference-interfaces toggle, and an interface reference chip above the input.',
|
|
137
|
-
},
|
|
138
|
-
},
|
|
139
|
-
},
|
|
140
|
-
// Rendered under the Qorus theme, as in qorus-ide / admin-portal.
|
|
141
|
-
decorators: [
|
|
142
|
-
(Story) => (
|
|
143
|
-
<ReqoreUIProvider theme={{ main: '#121212', intents: { custom1: '#762f7e' } }}>
|
|
144
|
-
<div style={{ padding: 20, background: '#121212' }}>
|
|
145
|
-
<Story />
|
|
146
|
-
</div>
|
|
147
|
-
</ReqoreUIProvider>
|
|
148
|
-
),
|
|
149
|
-
],
|
|
150
|
-
args: {
|
|
151
|
-
allowInternalNote: true,
|
|
152
|
-
defaultText:
|
|
153
|
-
"Thanks for the detailed report — we've reproduced the timeout and a fix is in review. In the meantime, can you confirm the datasource pool size configured for the sftp-partner connection?",
|
|
154
|
-
attachMenuItems: () => [
|
|
155
|
-
{ label: 'Take screenshot', icon: 'CameraAiLine', onClick: fn() },
|
|
156
|
-
{ label: 'Capture area', icon: 'CropLine', onClick: fn() },
|
|
157
|
-
],
|
|
158
|
-
// the reference toggle: a quiet icon button, like the attach button beside it
|
|
159
|
-
footerActions: (
|
|
160
|
-
<ReqoreButton icon='LinksLine' minimal flat badge={1} tooltip='Reference interfaces' />
|
|
161
|
-
),
|
|
162
|
-
// references on top of the editor (inside the bar), as quiet tags with the kind's
|
|
163
|
-
// icon — no "References" label, the chips read as the referenced interfaces on their own
|
|
164
|
-
aboveInput: (
|
|
165
|
-
<InterfaceReferenceTags
|
|
166
|
-
references={[{ interface_kind: 'connection', interface_name: 'sftp-partner' }]}
|
|
167
|
-
/>
|
|
168
|
-
),
|
|
169
|
-
},
|
|
170
|
-
async play({ canvasElement }) {
|
|
171
|
-
const canvas = within(canvasElement);
|
|
172
|
-
// rich editor renders a Slate contenteditable (not a <textarea>) …
|
|
173
|
-
await expect(canvasElement.querySelector('[contenteditable="true"]')).not.toBeNull();
|
|
174
|
-
await expect(canvasElement.querySelector('textarea')).toBeNull();
|
|
175
|
-
// … the staff split-send caret is present …
|
|
176
|
-
await expect(canvasElement.querySelector('.ticket-send-more')).not.toBeNull();
|
|
177
|
-
// … and the reference chip renders on top (no "References" label).
|
|
178
|
-
await expect(canvas.getByText('sftp-partner')).toBeInTheDocument();
|
|
179
|
-
await expect(canvas.queryByText('References')).not.toBeInTheDocument();
|
|
180
|
-
},
|
|
181
|
-
};
|
|
182
|
-
|
|
183
|
-
/**
|
|
184
|
-
* Every referenceable interface kind on one message, so the per-kind icons +
|
|
185
|
-
* chip styling can be reviewed together: workflow, service, job, fsm,
|
|
186
|
-
* connection, mapper, class, value-map, qog, ai-collection, ai-endpoint,
|
|
187
|
-
* ai-guardrail. (`qog` has no built-in icon → the generic fallback.)
|
|
188
|
-
*/
|
|
189
|
-
export const AllReferenceTypes: Story = {
|
|
190
|
-
parameters: {
|
|
191
|
-
docs: {
|
|
192
|
-
description: {
|
|
193
|
-
story:
|
|
194
|
-
'Renders a reply carrying every referenceable interface kind at once, so the per-kind icons and chip styling can be reviewed together (qog falls back to the generic glyph).',
|
|
195
|
-
},
|
|
196
|
-
},
|
|
197
|
-
},
|
|
198
|
-
decorators: [
|
|
199
|
-
(Story) => (
|
|
200
|
-
<ReqoreUIProvider theme={{ main: '#121212', intents: { custom1: '#762f7e' } }}>
|
|
201
|
-
<div style={{ padding: 20, background: '#121212' }}>
|
|
202
|
-
<Story />
|
|
203
|
-
</div>
|
|
204
|
-
</ReqoreUIProvider>
|
|
205
|
-
),
|
|
206
|
-
],
|
|
207
|
-
args: {
|
|
208
|
-
defaultText: 'This one references every interface kind.',
|
|
209
|
-
aboveInput: (
|
|
210
|
-
<InterfaceReferenceTags
|
|
211
|
-
references={[
|
|
212
|
-
{ interface_kind: 'workflow', interface_name: 'order-sync:1.2' },
|
|
213
|
-
{ interface_kind: 'service', interface_name: 'notifier' },
|
|
214
|
-
{ interface_kind: 'job', interface_name: 'nightly-recon' },
|
|
215
|
-
{ interface_kind: 'fsm', interface_name: 'onboarding' },
|
|
216
|
-
{ interface_kind: 'connection', interface_name: 'sftp-partner' },
|
|
217
|
-
{ interface_kind: 'mapper', interface_name: 'csv-to-order' },
|
|
218
|
-
{ interface_kind: 'class', interface_name: 'OrderUtils' },
|
|
219
|
-
{ interface_kind: 'value-map', interface_name: 'country-codes' },
|
|
220
|
-
{ interface_kind: 'qog', interface_name: 'daily-report' },
|
|
221
|
-
{ interface_kind: 'ai-collection', interface_name: 'kb-support' },
|
|
222
|
-
{ interface_kind: 'ai-endpoint', interface_name: 'gpt-router' },
|
|
223
|
-
{ interface_kind: 'ai-guardrail', interface_name: 'pii-filter' },
|
|
224
|
-
]}
|
|
225
|
-
/>
|
|
226
|
-
),
|
|
227
|
-
},
|
|
228
|
-
async play({ canvasElement }) {
|
|
229
|
-
const canvas = within(canvasElement);
|
|
230
|
-
await expect(canvas.getByText('workflow')).toBeInTheDocument();
|
|
231
|
-
await expect(canvas.getByText('ai-guardrail')).toBeInTheDocument();
|
|
232
|
-
},
|
|
233
|
-
};
|
|
234
|
-
|
|
235
|
-
// Stand-in app logos (a coloured rounded square + initial) as data-URIs, so the
|
|
236
|
-
// story needs no network. Real logos come from the app catalogue (`app.logo`).
|
|
237
|
-
const appLogo = (hex: string, letter: string) =>
|
|
238
|
-
`data:image/svg+xml,${encodeURIComponent(
|
|
239
|
-
`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><rect width="24" height="24" rx="6" fill="${hex}"/><text x="12" y="17" font-size="13" font-family="sans-serif" font-weight="bold" fill="#fff" text-anchor="middle">${letter}</text></svg>`
|
|
240
|
-
)}`;
|
|
241
|
-
const APP_LOGOS: Record<string, string> = {
|
|
242
|
-
Telegram: appLogo('#2AABEE', 'T'),
|
|
243
|
-
Stripe: appLogo('#635BFF', 'S'),
|
|
244
|
-
};
|
|
245
|
-
|
|
246
|
-
/**
|
|
247
|
-
* Faithful qog icons — a qog referenced by its trigger app shows that app's logo,
|
|
248
|
-
* exactly like the qogs list. The customer's IDE resolves it live from the
|
|
249
|
-
* reference's `trigger_app` via `resolveInterfaceImage` (it has the app catalogue);
|
|
250
|
-
* a stored `logo` travels to viewers that don't (staff triage, the Qonsole card).
|
|
251
|
-
* A qog with no trigger app falls back to the qog glyph.
|
|
252
|
-
*/
|
|
253
|
-
export const QogTriggerAppLogo: Story = {
|
|
254
|
-
parameters: {
|
|
255
|
-
docs: {
|
|
256
|
-
description: {
|
|
257
|
-
story:
|
|
258
|
-
"Renders qogs referenced by their trigger apps, each showing that app's logo — resolved live via resolveInterfaceImage or from a stored logo — while a qog with no trigger app falls back to the qog glyph.",
|
|
259
|
-
},
|
|
260
|
-
},
|
|
261
|
-
},
|
|
262
|
-
decorators: [
|
|
263
|
-
(Story) => (
|
|
264
|
-
<ReqoreUIProvider theme={{ main: '#121212', intents: { custom1: '#762f7e' } }}>
|
|
265
|
-
<div style={{ padding: 20, background: '#121212' }}>
|
|
266
|
-
<Story />
|
|
267
|
-
</div>
|
|
268
|
-
</ReqoreUIProvider>
|
|
269
|
-
),
|
|
270
|
-
],
|
|
271
|
-
args: {
|
|
272
|
-
defaultText: 'These qogs are referenced by their trigger apps.',
|
|
273
|
-
aboveInput: (
|
|
274
|
-
<InterfaceReferenceTags
|
|
275
|
-
references={[
|
|
276
|
-
// resolved live from trigger_app (the customer/IDE path)
|
|
277
|
-
{ interface_kind: 'qog', interface_name: 'telegram-intake', trigger_app: 'Telegram' },
|
|
278
|
-
{ interface_kind: 'qog', interface_name: 'stripe-billing', trigger_app: 'Stripe' },
|
|
279
|
-
// stored logo travels to viewers without the app catalogue (staff / Qonsole)
|
|
280
|
-
{ interface_kind: 'qog', interface_name: 'slack-alerts', logo: appLogo('#4A154B', 'S') },
|
|
281
|
-
// no trigger app → the qog glyph fallback
|
|
282
|
-
{ interface_kind: 'qog', interface_name: 'manual-recon' },
|
|
283
|
-
]}
|
|
284
|
-
resolveInterfaceImage={(ref) => (ref.trigger_app ? APP_LOGOS[ref.trigger_app] : undefined)}
|
|
285
|
-
/>
|
|
286
|
-
),
|
|
287
|
-
},
|
|
288
|
-
async play({ canvasElement }) {
|
|
289
|
-
const canvas = within(canvasElement);
|
|
290
|
-
await expect(canvas.getByText('telegram-intake')).toBeInTheDocument();
|
|
291
|
-
// the trigger-app / stored-logo qogs render their app logo image once it has
|
|
292
|
-
// loaded (the qog glyph stands in until then)
|
|
293
|
-
await waitFor(() =>
|
|
294
|
-
expect(canvasElement.querySelectorAll('.reqore-tag img').length).toBe(3)
|
|
295
|
-
);
|
|
296
|
-
},
|
|
297
|
-
};
|
|
298
|
-
|
|
299
|
-
// A stand-in "screenshot" as an SVG File so the story needs no real capture — the
|
|
300
|
-
// composer's attachment strip renders any image File as a thumbnail (the real IDE
|
|
301
|
-
// stages a PNG from captureScreenshot / captureRegion the same way).
|
|
302
|
-
const screenshotFile = () => {
|
|
303
|
-
const svg = `<svg xmlns="http://www.w3.org/2000/svg" width="260" height="150" viewBox="0 0 260 150">
|
|
304
|
-
<rect width="260" height="150" rx="8" fill="#0f0b16"/>
|
|
305
|
-
<rect width="260" height="26" fill="#1c1428"/>
|
|
306
|
-
<circle cx="16" cy="13" r="4" fill="#ff5f57"/><circle cx="32" cy="13" r="4" fill="#febc2e"/><circle cx="48" cy="13" r="4" fill="#28c840"/>
|
|
307
|
-
<rect x="16" y="44" width="110" height="12" rx="3" fill="#8e39a0"/>
|
|
308
|
-
<rect x="16" y="68" width="228" height="9" rx="3" fill="#2c2440"/>
|
|
309
|
-
<rect x="16" y="86" width="200" height="9" rx="3" fill="#2c2440"/>
|
|
310
|
-
<rect x="16" y="104" width="170" height="9" rx="3" fill="#2c2440"/>
|
|
311
|
-
<rect x="16" y="122" width="92" height="9" rx="3" fill="#2c2440"/>
|
|
312
|
-
</svg>`;
|
|
313
|
-
return new File([svg], 'region-capture.svg', { type: 'image/svg+xml' });
|
|
314
|
-
};
|
|
315
|
-
|
|
316
|
-
/**
|
|
317
|
-
* A composed reply with both a staged screenshot (the attachment strip renders any
|
|
318
|
-
* image File as a thumbnail — the real IDE stages a PNG from Take-screenshot /
|
|
319
|
-
* Capture-area) and interface references on top.
|
|
320
|
-
*/
|
|
321
|
-
export const WithScreenshotAndReferences: Story = {
|
|
322
|
-
parameters: {
|
|
323
|
-
docs: {
|
|
324
|
-
description: {
|
|
325
|
-
story:
|
|
326
|
-
'Renders a composed reply carrying both a staged screenshot thumbnail in the attachment strip and interface references above the input.',
|
|
327
|
-
},
|
|
328
|
-
},
|
|
329
|
-
},
|
|
330
|
-
decorators: [
|
|
331
|
-
(Story) => (
|
|
332
|
-
<ReqoreUIProvider theme={{ main: '#121212', intents: { custom1: '#762f7e' } }}>
|
|
333
|
-
<div style={{ padding: 20, background: '#121212' }}>
|
|
334
|
-
<Story />
|
|
335
|
-
</div>
|
|
336
|
-
</ReqoreUIProvider>
|
|
337
|
-
),
|
|
338
|
-
],
|
|
339
|
-
args: {
|
|
340
|
-
defaultText: "Here's the timeout I'm seeing on the nightly run — screenshot attached.",
|
|
341
|
-
defaultFiles: [screenshotFile()],
|
|
342
|
-
aboveInput: (
|
|
343
|
-
<InterfaceReferenceTags
|
|
344
|
-
references={[
|
|
345
|
-
{ interface_kind: 'connection', interface_name: 'sftp-partner' },
|
|
346
|
-
{ interface_kind: 'qog', interface_name: 'telegram-intake', logo: appLogo('#2AABEE', 'T') },
|
|
347
|
-
]}
|
|
348
|
-
/>
|
|
349
|
-
),
|
|
350
|
-
},
|
|
351
|
-
async play({ canvasElement }) {
|
|
352
|
-
const canvas = within(canvasElement);
|
|
353
|
-
// the staged screenshot thumbnail (an <img>) and the references both render
|
|
354
|
-
await expect(canvasElement.querySelector('img')).not.toBeNull();
|
|
355
|
-
await expect(canvas.getByText('sftp-partner')).toBeInTheDocument();
|
|
356
|
-
},
|
|
357
|
-
};
|
|
@@ -1,172 +0,0 @@
|
|
|
1
|
-
import type { TReqoreDropdownItems } from '@qoretechnologies/reqore/dist/components/Dropdown/list';
|
|
2
|
-
import { ReactNode } from 'react';
|
|
3
|
-
import {
|
|
4
|
-
Composer,
|
|
5
|
-
IComposerProps,
|
|
6
|
-
IComposerSendAction,
|
|
7
|
-
TComposerEditor,
|
|
8
|
-
} from '../composer/Composer';
|
|
9
|
-
import { fileToAttachment as defaultFileToAttachment } from './fileToAttachment';
|
|
10
|
-
import { IAttachmentUpload } from './meta';
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* A ticket reply is not a hand-off to Qonsole, so it does not wear Qonsole's look: no purple
|
|
14
|
-
* bar, no purple send (instruction-files decision 002 — a purple button means "this hands the
|
|
15
|
-
* work to Qonsole / AI" and nothing else). The bar keeps the composer's shape with the theme's
|
|
16
|
-
* own neutral edge (its `main`, a step lighter — how Reqore draws its dividers), and sending
|
|
17
|
-
* the reply is the surface's one primary action: white.
|
|
18
|
-
*/
|
|
19
|
-
const REPLY_BOX_EFFECT: IComposerProps['effect'] = {
|
|
20
|
-
gradient: { direction: 'to bottom right', colors: 'main:lighten:3' },
|
|
21
|
-
};
|
|
22
|
-
const REPLY_SEND_STYLE: Pick<IComposerSendAction, 'intent' | 'minimal'> = {
|
|
23
|
-
intent: 'white',
|
|
24
|
-
minimal: false,
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* The `items` shape ReqoreDropdown accepts. Named, not derived: `ReqoreDropdown`
|
|
29
|
-
* is a generic component, and `ComponentProps` of a generic resolves to `{}`
|
|
30
|
-
* under strict checking — so the derived type had no `items` at all.
|
|
31
|
-
*/
|
|
32
|
-
type TAttachMenuItems = TReqoreDropdownItems;
|
|
33
|
-
|
|
34
|
-
export interface ITicketReplyBoxProps {
|
|
35
|
-
/** Send the composed message. `internal` is only ever true when
|
|
36
|
-
* `allowInternalNote` is set (the staff surface). */
|
|
37
|
-
onSend: (
|
|
38
|
-
body: string,
|
|
39
|
-
options: { internal: boolean; attachments?: IAttachmentUpload[] }
|
|
40
|
-
) => void | Promise<void>;
|
|
41
|
-
/** File → base64 upload conversion; defaults to the shared `fileToAttachment`. */
|
|
42
|
-
fileToAttachment?: (file: File) => Promise<IAttachmentUpload>;
|
|
43
|
-
/** the send round-trip is in flight */
|
|
44
|
-
sending?: boolean;
|
|
45
|
-
/** the ticket can't be replied to (e.g. closed) — renders a notice instead */
|
|
46
|
-
disabled?: boolean;
|
|
47
|
-
disabledReason?: string;
|
|
48
|
-
/** placeholder text. (A function is called with `false` — the mode is chosen at
|
|
49
|
-
* send time, so there is no live internal-note mode.) */
|
|
50
|
-
placeholder?: string | ((internal: boolean) => string);
|
|
51
|
-
/** send labels; a function is called with `false` for the primary "Send reply"
|
|
52
|
-
* and `true` for the "Add internal note" split-menu item. Defaults to
|
|
53
|
-
* "Send reply" / "Add internal note". */
|
|
54
|
-
sendLabel?: string | ((internal: boolean) => string);
|
|
55
|
-
/** Staff surface: split the send button so it also offers "Add internal note"
|
|
56
|
-
* (customer composers omit it and just send a reply). */
|
|
57
|
-
allowInternalNote?: boolean;
|
|
58
|
-
/** Extra attach-menu entries beyond "Upload files" — e.g. the IDE's screenshot /
|
|
59
|
-
* region capture. Receives the composer's `addFiles`. With any entry the attach
|
|
60
|
-
* control becomes a dropdown; otherwise it's a plain button. */
|
|
61
|
-
attachMenuItems?: (addFiles: (files: File[]) => void) => TAttachMenuItems;
|
|
62
|
-
/** Extra footer controls left of the send button — e.g. the IDE's
|
|
63
|
-
* reference-interfaces toggle. */
|
|
64
|
-
footerActions?: ReactNode;
|
|
65
|
-
/** Rendered on top of the editor, inside the bar — e.g. reference chips. */
|
|
66
|
-
aboveInput?: ReactNode;
|
|
67
|
-
/** Rendered below the editor — e.g. the IDE's interface-reference picker. */
|
|
68
|
-
belowInput?: ReactNode;
|
|
69
|
-
/** Editor flavour. Helpdesk uses the rich, Qonsole-style editor by default; pass
|
|
70
|
-
* `plain` for a simple textarea (e.g. deterministic play tests). */
|
|
71
|
-
editor?: TComposerEditor;
|
|
72
|
-
/** Initial draft text to seed the editor with (e.g. a restored draft). */
|
|
73
|
-
defaultText?: string;
|
|
74
|
-
/** Initial staged files (e.g. a restored draft's attachments, or a demo). */
|
|
75
|
-
defaultFiles?: File[];
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
/**
|
|
79
|
-
* The shared ticket reply composer — now a thin adapter over the universal
|
|
80
|
-
* `<Composer>` (the input extracted from qorus-ide's Qonsole chat). It maps the
|
|
81
|
-
* ticket vocabulary onto the composer: the staff `allowInternalNote` becomes a
|
|
82
|
-
* split send (primary "Send reply" + a caret "Add internal note", mode chosen at
|
|
83
|
-
* send time), and staged files convert to `IAttachmentUpload[]` via
|
|
84
|
-
* `fileToAttachment` before `onSend`. App-specific affordances still arrive
|
|
85
|
-
* through slots (`attachMenuItems`, `footerActions`, `belowInput`), so the
|
|
86
|
-
* IDE-only bits (screenshot capture, the reference picker) stay in qorus-ide. A
|
|
87
|
-
* closed ticket renders a muted notice.
|
|
88
|
-
*/
|
|
89
|
-
export const TicketReplyBox = ({
|
|
90
|
-
onSend,
|
|
91
|
-
fileToAttachment = defaultFileToAttachment,
|
|
92
|
-
sending,
|
|
93
|
-
disabled,
|
|
94
|
-
disabledReason = 'This ticket is closed. Open a new ticket to continue the conversation.',
|
|
95
|
-
placeholder = 'Write a reply…',
|
|
96
|
-
sendLabel,
|
|
97
|
-
allowInternalNote,
|
|
98
|
-
attachMenuItems,
|
|
99
|
-
footerActions,
|
|
100
|
-
aboveInput,
|
|
101
|
-
belowInput,
|
|
102
|
-
editor = 'rich',
|
|
103
|
-
defaultText,
|
|
104
|
-
defaultFiles,
|
|
105
|
-
}: ITicketReplyBoxProps) => {
|
|
106
|
-
const resolvedPlaceholder =
|
|
107
|
-
typeof placeholder === 'function' ? placeholder(false) : placeholder;
|
|
108
|
-
// Label for a given send mode: `false` = public reply, `true` = internal note.
|
|
109
|
-
const labelFor = (note: boolean): string =>
|
|
110
|
-
sendLabel !== undefined
|
|
111
|
-
? typeof sendLabel === 'function'
|
|
112
|
-
? sendLabel(note)
|
|
113
|
-
: sendLabel
|
|
114
|
-
: note
|
|
115
|
-
? 'Add internal note'
|
|
116
|
-
: 'Send reply';
|
|
117
|
-
|
|
118
|
-
// Staff surface splits the send button; customer surface is a single "Send reply".
|
|
119
|
-
// Both send the reply as the white primary (`REPLY_SEND_STYLE`); the internal note
|
|
120
|
-
// stays amber (`warning`) so it can't be mistaken for a public reply.
|
|
121
|
-
const sendActions: IComposerSendAction[] | undefined = allowInternalNote
|
|
122
|
-
? [
|
|
123
|
-
{
|
|
124
|
-
id: 'reply',
|
|
125
|
-
label: labelFor(false),
|
|
126
|
-
icon: 'SendPlane2Line',
|
|
127
|
-
...REPLY_SEND_STYLE,
|
|
128
|
-
},
|
|
129
|
-
{
|
|
130
|
-
id: 'internal',
|
|
131
|
-
label: labelFor(true),
|
|
132
|
-
icon: 'StickyNoteLine',
|
|
133
|
-
minimal: true,
|
|
134
|
-
intent: 'warning',
|
|
135
|
-
},
|
|
136
|
-
]
|
|
137
|
-
: undefined;
|
|
138
|
-
|
|
139
|
-
const handleSend = async (
|
|
140
|
-
body: string,
|
|
141
|
-
{ files, action }: { files: File[]; action?: string }
|
|
142
|
-
): Promise<void> => {
|
|
143
|
-
const internal = action === 'internal';
|
|
144
|
-
const attachments = files.length
|
|
145
|
-
? await Promise.all(files.map(fileToAttachment))
|
|
146
|
-
: undefined;
|
|
147
|
-
await onSend(body, { internal, attachments });
|
|
148
|
-
};
|
|
149
|
-
|
|
150
|
-
return (
|
|
151
|
-
<Composer
|
|
152
|
-
editor={editor}
|
|
153
|
-
defaultText={defaultText}
|
|
154
|
-
defaultFiles={defaultFiles}
|
|
155
|
-
placeholder={resolvedPlaceholder}
|
|
156
|
-
sending={sending}
|
|
157
|
-
disabled={disabled}
|
|
158
|
-
disabledReason={disabledReason}
|
|
159
|
-
onSend={handleSend}
|
|
160
|
-
sendLabel={labelFor(false)}
|
|
161
|
-
sendIntent={REPLY_SEND_STYLE.intent}
|
|
162
|
-
sendMinimal={REPLY_SEND_STYLE.minimal}
|
|
163
|
-
sendActions={sendActions}
|
|
164
|
-
effect={REPLY_BOX_EFFECT}
|
|
165
|
-
sendMenuClassName='ticket-send-more'
|
|
166
|
-
attachMenuItems={attachMenuItems}
|
|
167
|
-
footerActions={footerActions}
|
|
168
|
-
aboveInput={aboveInput}
|
|
169
|
-
belowInput={belowInput}
|
|
170
|
-
/>
|
|
171
|
-
);
|
|
172
|
-
};
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { defaultInterfaceIcon, TInterfaceKindIcon } from '../meta';
|
|
2
|
-
|
|
3
|
-
/* Stand-ins for a host's kind marks in stories. Inline, so they load offline. */
|
|
4
|
-
|
|
5
|
-
/** A green Qog-like mark: loads. */
|
|
6
|
-
export const STORY_QOG_IMAGE = `data:image/svg+xml;utf8,${encodeURIComponent(
|
|
7
|
-
'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><rect width="24" height="24" rx="6" fill="#2e9d4f"/><circle cx="12" cy="12" r="5" fill="#fff"/></svg>'
|
|
8
|
-
)}`;
|
|
9
|
-
|
|
10
|
-
/** A trigger app's logo: loads. */
|
|
11
|
-
export const STORY_APP_LOGO = `data:image/svg+xml;utf8,${encodeURIComponent(
|
|
12
|
-
'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><rect width="24" height="24" rx="12" fill="#229ed9"/></svg>'
|
|
13
|
-
)}`;
|
|
14
|
-
|
|
15
|
-
/** An image that can never load (malformed data URI). */
|
|
16
|
-
export const STORY_BROKEN_IMAGE = 'data:image/png;base64,not-an-image';
|
|
17
|
-
|
|
18
|
-
/** The IDE's resolver: a Qog is its green mark (font icon fallback); the rest, font icons. */
|
|
19
|
-
export const storyKindMark = (kind: string): TInterfaceKindIcon =>
|
|
20
|
-
kind === 'fsm' || kind === 'qog' ?
|
|
21
|
-
{ icon: 'FlowChart', image: STORY_QOG_IMAGE }
|
|
22
|
-
: defaultInterfaceIcon(kind);
|
|
23
|
-
|
|
24
|
-
/** The same, with a Qog image that fails to load. */
|
|
25
|
-
export const storyBrokenKindMark = (kind: string): TInterfaceKindIcon =>
|
|
26
|
-
kind === 'fsm' || kind === 'qog' ?
|
|
27
|
-
{ icon: 'FlowChart', image: STORY_BROKEN_IMAGE }
|
|
28
|
-
: defaultInterfaceIcon(kind);
|
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Authed attachment byte-fetching, shared by every ticket surface.
|
|
3
|
-
*
|
|
4
|
-
* Attachment bytes can't go through the JSON fetch helpers, so each app grew its
|
|
5
|
-
* own raw-`fetch` copy: qorus-ide in `views/support/api.ts`, admin-portal in
|
|
6
|
-
* `pages/SupportTickets/helpers.ts`. The two were the same function down to the
|
|
7
|
-
* error text ("Could not download the attachment") and the anchor-click dance —
|
|
8
|
-
* they differed only in how the URL is built, which auth header is sent, and
|
|
9
|
-
* which Error subclass is thrown.
|
|
10
|
-
*
|
|
11
|
-
* Those three differences are the parameters below. Everything else — the
|
|
12
|
-
* non-OK check, `URL.createObjectURL`, the temporary anchor, revoking the object
|
|
13
|
-
* URL — lives here once.
|
|
14
|
-
*/
|
|
15
|
-
|
|
16
|
-
export interface ITicketAttachmentAccessConfig {
|
|
17
|
-
/** Absolute URL for one attachment's bytes. */
|
|
18
|
-
attachmentUrl: (ticketId: string, attachmentId: string) => string;
|
|
19
|
-
/**
|
|
20
|
-
* Headers for the byte request — typically auth. A function rather than a
|
|
21
|
-
* value because tokens are resolved per request, not at wire-up time.
|
|
22
|
-
*/
|
|
23
|
-
headers?: () => Record<string, string>;
|
|
24
|
-
/**
|
|
25
|
-
* Error to throw on a non-OK response. Defaults to a plain `Error`; apps with
|
|
26
|
-
* their own API error type (carrying the status) pass a factory.
|
|
27
|
-
*/
|
|
28
|
-
onError?: (message: string, status: number) => Error;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
export interface ITicketAttachmentAccess {
|
|
32
|
-
/** Raw bytes. `failure` is the message used if the response isn't OK. */
|
|
33
|
-
fetchBlob: (ticketId: string, attachmentId: string, failure?: string) => Promise<Blob>;
|
|
34
|
-
/**
|
|
35
|
-
* An object URL for the bytes — for inline thumbnails and the lightbox.
|
|
36
|
-
*
|
|
37
|
-
* The caller owns the returned URL and must `URL.revokeObjectURL` it when the
|
|
38
|
-
* element goes away; this cannot do it for them without breaking the img.
|
|
39
|
-
*/
|
|
40
|
-
fetchBlobUrl: (ticketId: string, attachmentId: string) => Promise<string>;
|
|
41
|
-
/** Save the attachment to disk under its original filename. */
|
|
42
|
-
download: (ticketId: string, attachmentId: string, filename: string) => Promise<void>;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
const DEFAULT_DOWNLOAD_FAILURE = 'Could not download the attachment';
|
|
46
|
-
const DEFAULT_LOAD_FAILURE = 'Could not load the attachment';
|
|
47
|
-
|
|
48
|
-
/**
|
|
49
|
-
* Save a blob to disk under `filename`, via a temporary anchor.
|
|
50
|
-
*
|
|
51
|
-
* Exported because it is the half of `download` that has nothing to do with
|
|
52
|
-
* tickets — a surface that already holds the bytes shouldn't have to re-fetch
|
|
53
|
-
* them just to reuse the save behaviour.
|
|
54
|
-
*/
|
|
55
|
-
export const saveBlobAs = (blob: Blob, filename: string): void => {
|
|
56
|
-
const url = URL.createObjectURL(blob);
|
|
57
|
-
const anchor = document.createElement('a');
|
|
58
|
-
|
|
59
|
-
anchor.href = url;
|
|
60
|
-
anchor.download = filename;
|
|
61
|
-
document.body.appendChild(anchor);
|
|
62
|
-
anchor.click();
|
|
63
|
-
anchor.remove();
|
|
64
|
-
// Safari needs the URL alive until the click is processed; a task boundary is
|
|
65
|
-
// enough and avoids leaking the blob for the life of the document.
|
|
66
|
-
setTimeout(() => URL.revokeObjectURL(url), 0);
|
|
67
|
-
};
|
|
68
|
-
|
|
69
|
-
export const createTicketAttachmentAccess = ({
|
|
70
|
-
attachmentUrl,
|
|
71
|
-
headers,
|
|
72
|
-
onError,
|
|
73
|
-
}: ITicketAttachmentAccessConfig): ITicketAttachmentAccess => {
|
|
74
|
-
const fetchBlob = async (
|
|
75
|
-
ticketId: string,
|
|
76
|
-
attachmentId: string,
|
|
77
|
-
failure: string = DEFAULT_LOAD_FAILURE
|
|
78
|
-
): Promise<Blob> => {
|
|
79
|
-
const response = await fetch(attachmentUrl(ticketId, attachmentId), {
|
|
80
|
-
headers: headers?.() ?? {},
|
|
81
|
-
});
|
|
82
|
-
|
|
83
|
-
if (!response.ok) {
|
|
84
|
-
throw onError ? onError(failure, response.status) : new Error(failure);
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
return response.blob();
|
|
88
|
-
};
|
|
89
|
-
|
|
90
|
-
return {
|
|
91
|
-
fetchBlob,
|
|
92
|
-
fetchBlobUrl: async (ticketId, attachmentId) =>
|
|
93
|
-
URL.createObjectURL(await fetchBlob(ticketId, attachmentId, DEFAULT_LOAD_FAILURE)),
|
|
94
|
-
download: async (ticketId, attachmentId, filename) =>
|
|
95
|
-
saveBlobAs(await fetchBlob(ticketId, attachmentId, DEFAULT_DOWNLOAD_FAILURE), filename),
|
|
96
|
-
};
|
|
97
|
-
};
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { IAttachmentUpload } from './meta';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Read a picked `File` into the inline base64 upload shape the support API expects
|
|
5
|
-
* (the SaaS plane accepts attachments as base64 on the create/reply payload, with
|
|
6
|
-
* no separate multipart upload). Shared by every composer so the customer and
|
|
7
|
-
* staff surfaces encode files identically.
|
|
8
|
-
*/
|
|
9
|
-
export const fileToAttachment = (file: File): Promise<IAttachmentUpload> =>
|
|
10
|
-
new Promise((resolve, reject) => {
|
|
11
|
-
const reader = new FileReader();
|
|
12
|
-
reader.onerror = () => reject(new Error(`Could not read ${file.name}`));
|
|
13
|
-
reader.onload = () => {
|
|
14
|
-
// reader.result is a data URL: "data:<type>;base64,<content>"
|
|
15
|
-
const result = String(reader.result);
|
|
16
|
-
const content = result.slice(result.indexOf(',') + 1);
|
|
17
|
-
resolve({
|
|
18
|
-
filename: file.name,
|
|
19
|
-
content_type: file.type || 'application/octet-stream',
|
|
20
|
-
content,
|
|
21
|
-
});
|
|
22
|
-
};
|
|
23
|
-
reader.readAsDataURL(file);
|
|
24
|
-
});
|