@qoretechnologies/reqraft 0.10.74 → 0.10.75-pr.145.g4aa4909
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/dist/components/Description/AllowedValuesHelp.d.ts +4 -4
- package/dist/components/Description/AllowedValuesHelp.d.ts.map +1 -1
- package/dist/components/Description/AllowedValuesHelp.js +10 -7
- package/dist/components/Description/AllowedValuesHelp.js.map +1 -1
- package/dist/components/Description/index.d.ts.map +1 -1
- package/dist/components/Description/index.js +22 -4
- package/dist/components/Description/index.js.map +1 -1
- package/dist/components/FocusedEditing/index.d.ts.map +1 -1
- package/dist/components/FocusedEditing/index.js +3 -1
- package/dist/components/FocusedEditing/index.js.map +1 -1
- package/dist/components/codeSize/index.d.ts +6 -0
- package/dist/components/codeSize/index.d.ts.map +1 -1
- package/dist/components/codeSize/index.js +12 -2
- package/dist/components/codeSize/index.js.map +1 -1
- package/dist/components/colorValue/colorValue.d.ts.map +1 -1
- package/dist/components/colorValue/colorValue.js +27 -36
- package/dist/components/colorValue/colorValue.js.map +1 -1
- package/dist/components/composer/Composer.d.ts +7 -2
- package/dist/components/composer/Composer.d.ts.map +1 -1
- package/dist/components/composer/Composer.js +18 -13
- package/dist/components/composer/Composer.js.map +1 -1
- package/dist/components/composer/labels.d.ts +22 -0
- package/dist/components/composer/labels.d.ts.map +1 -0
- package/dist/components/composer/labels.js +15 -0
- package/dist/components/composer/labels.js.map +1 -0
- package/dist/components/dpqlEditor/dpqlTags.js +1 -1
- package/dist/components/dpqlEditor/dpqlTags.js.map +1 -1
- package/dist/components/form/engine/CompactRow.d.ts.map +1 -1
- package/dist/components/form/engine/CompactRow.js +133 -29
- 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 +70 -18
- package/dist/components/form/engine/CompactToolbar.js.map +1 -1
- package/dist/components/form/engine/FormEngine.d.ts +66 -2
- package/dist/components/form/engine/FormEngine.d.ts.map +1 -1
- package/dist/components/form/engine/FormEngine.js +453 -185
- package/dist/components/form/engine/FormEngine.js.map +1 -1
- package/dist/components/form/engine/ItemAttention.d.ts +12 -0
- package/dist/components/form/engine/ItemAttention.d.ts.map +1 -0
- package/dist/components/form/engine/ItemAttention.js +33 -0
- package/dist/components/form/engine/ItemAttention.js.map +1 -0
- package/dist/components/form/engine/OptionFieldMessages.d.ts +30 -2
- package/dist/components/form/engine/OptionFieldMessages.d.ts.map +1 -1
- package/dist/components/form/engine/OptionFieldMessages.js +41 -6
- package/dist/components/form/engine/OptionFieldMessages.js.map +1 -1
- package/dist/components/form/engine/_structuredData/SchemaDataView.d.ts.map +1 -1
- package/dist/components/form/engine/_structuredData/SchemaDataView.js +27 -1
- package/dist/components/form/engine/_structuredData/SchemaDataView.js.map +1 -1
- package/dist/components/form/engine/compactRowContext.d.ts +5 -0
- 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 +12 -0
- package/dist/components/form/engine/compactRowStyles.d.ts.map +1 -1
- package/dist/components/form/engine/compactRowStyles.js +79 -43
- package/dist/components/form/engine/compactRowStyles.js.map +1 -1
- package/dist/components/form/engine/compactToolbarContext.d.ts +9 -0
- 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/formAppearance.d.ts +80 -0
- package/dist/components/form/engine/formAppearance.d.ts.map +1 -0
- package/dist/components/form/engine/formAppearance.js +143 -0
- package/dist/components/form/engine/formAppearance.js.map +1 -0
- package/dist/components/form/engine/readFirst.d.ts +23 -2
- package/dist/components/form/engine/readFirst.d.ts.map +1 -1
- package/dist/components/form/engine/readFirst.js +14 -5
- package/dist/components/form/engine/readFirst.js.map +1 -1
- package/dist/components/form/engine/revealRow.d.ts +13 -0
- package/dist/components/form/engine/revealRow.d.ts.map +1 -1
- package/dist/components/form/engine/revealRow.js +24 -1
- package/dist/components/form/engine/revealRow.js.map +1 -1
- package/dist/components/form/engine/rowFocus.d.ts +9 -1
- package/dist/components/form/engine/rowFocus.d.ts.map +1 -1
- package/dist/components/form/engine/rowFocus.js +17 -4
- package/dist/components/form/engine/rowFocus.js.map +1 -1
- package/dist/components/form/engine/rowLabelled.d.ts +9 -0
- package/dist/components/form/engine/rowLabelled.d.ts.map +1 -0
- package/dist/components/form/engine/rowLabelled.js +12 -0
- package/dist/components/form/engine/rowLabelled.js.map +1 -0
- package/dist/components/form/expressions/DpqlRendering.d.ts.map +1 -1
- package/dist/components/form/expressions/DpqlRendering.js +3 -1
- package/dist/components/form/expressions/DpqlRendering.js.map +1 -1
- package/dist/components/form/expressions/ExpressionField.d.ts +5 -7
- package/dist/components/form/expressions/ExpressionField.d.ts.map +1 -1
- package/dist/components/form/expressions/ExpressionField.js +13 -11
- package/dist/components/form/expressions/ExpressionField.js.map +1 -1
- package/dist/components/form/expressions/builder/argumentLabel.d.ts.map +1 -1
- package/dist/components/form/expressions/builder/argumentLabel.js +4 -8
- package/dist/components/form/expressions/builder/argumentLabel.js.map +1 -1
- package/dist/components/form/expressions/builder/argumentSlot.d.ts.map +1 -1
- package/dist/components/form/expressions/builder/argumentSlot.js +3 -2
- package/dist/components/form/expressions/builder/argumentSlot.js.map +1 -1
- package/dist/components/form/expressions/builder/argumentWrapper.d.ts.map +1 -1
- package/dist/components/form/expressions/builder/argumentWrapper.js +6 -5
- 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 +10 -8
- package/dist/components/form/expressions/builder/confirmMismatchedTypesModal.js.map +1 -1
- package/dist/components/form/expressions/builder/confirmUnsupportedTypeModal.d.ts.map +1 -1
- package/dist/components/form/expressions/builder/confirmUnsupportedTypeModal.js +4 -2
- package/dist/components/form/expressions/builder/confirmUnsupportedTypeModal.js.map +1 -1
- package/dist/components/form/expressions/builder/index.d.ts +6 -1
- package/dist/components/form/expressions/builder/index.d.ts.map +1 -1
- package/dist/components/form/expressions/builder/index.js +53 -40
- package/dist/components/form/expressions/builder/index.js.map +1 -1
- package/dist/components/form/expressions/builder/item.d.ts.map +1 -1
- package/dist/components/form/expressions/builder/item.js +4 -2
- package/dist/components/form/expressions/builder/item.js.map +1 -1
- package/dist/components/form/expressions/builder/moveToPositionStrip.d.ts.map +1 -1
- package/dist/components/form/expressions/builder/moveToPositionStrip.js +7 -6
- package/dist/components/form/expressions/builder/moveToPositionStrip.js.map +1 -1
- package/dist/components/form/expressions/builder/renderTemplate.d.ts.map +1 -1
- package/dist/components/form/expressions/builder/renderTemplate.js +3 -1
- package/dist/components/form/expressions/builder/renderTemplate.js.map +1 -1
- package/dist/components/form/expressions/labels.d.ts +129 -0
- package/dist/components/form/expressions/labels.d.ts.map +1 -0
- package/dist/components/form/expressions/labels.js +115 -0
- package/dist/components/form/expressions/labels.js.map +1 -0
- package/dist/components/form/expressions/mockExpressions.d.ts.map +1 -1
- package/dist/components/form/expressions/mockExpressions.js +18 -0
- package/dist/components/form/expressions/mockExpressions.js.map +1 -1
- package/dist/components/form/expressions/renderExpressionToText.d.ts.map +1 -1
- package/dist/components/form/expressions/renderExpressionToText.js +15 -0
- package/dist/components/form/expressions/renderExpressionToText.js.map +1 -1
- package/dist/components/form/fields/ChoiceGroupHeading.d.ts +22 -0
- package/dist/components/form/fields/ChoiceGroupHeading.d.ts.map +1 -0
- package/dist/components/form/fields/ChoiceGroupHeading.js +40 -0
- package/dist/components/form/fields/ChoiceGroupHeading.js.map +1 -0
- package/dist/components/form/fields/Field.d.ts.map +1 -1
- package/dist/components/form/fields/Field.js +8 -4
- package/dist/components/form/fields/Field.js.map +1 -1
- package/dist/components/form/fields/allowed-values/AllowedValues.d.ts +7 -0
- package/dist/components/form/fields/allowed-values/AllowedValues.d.ts.map +1 -1
- package/dist/components/form/fields/allowed-values/AllowedValues.js +34 -10
- package/dist/components/form/fields/allowed-values/AllowedValues.js.map +1 -1
- package/dist/components/form/fields/allowed-values/savedValues.d.ts +30 -0
- package/dist/components/form/fields/allowed-values/savedValues.d.ts.map +1 -0
- package/dist/components/form/fields/allowed-values/savedValues.js +39 -0
- package/dist/components/form/fields/allowed-values/savedValues.js.map +1 -0
- package/dist/components/form/fields/array/ArrayAuto.d.ts.map +1 -1
- package/dist/components/form/fields/array/ArrayAuto.js +28 -6
- 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 +7 -5
- package/dist/components/form/fields/array/ArrayAutoField.js.map +1 -1
- package/dist/components/form/fields/auto/AutoFormField.d.ts +5 -1
- package/dist/components/form/fields/auto/AutoFormField.d.ts.map +1 -1
- package/dist/components/form/fields/auto/AutoFormField.js +37 -14
- package/dist/components/form/fields/auto/AutoFormField.js.map +1 -1
- package/dist/components/form/fields/binary/Binary.d.ts.map +1 -1
- package/dist/components/form/fields/binary/Binary.js +3 -1
- package/dist/components/form/fields/binary/Binary.js.map +1 -1
- package/dist/components/form/fields/boolean/Boolean.d.ts +7 -1
- package/dist/components/form/fields/boolean/Boolean.d.ts.map +1 -1
- package/dist/components/form/fields/boolean/Boolean.js +8 -2
- package/dist/components/form/fields/boolean/Boolean.js.map +1 -1
- package/dist/components/form/fields/file/File.d.ts.map +1 -1
- package/dist/components/form/fields/file/File.js +18 -6
- package/dist/components/form/fields/file/File.js.map +1 -1
- package/dist/components/form/fields/labels.d.ts +72 -0
- package/dist/components/form/fields/labels.d.ts.map +1 -0
- package/dist/components/form/fields/labels.js +47 -0
- package/dist/components/form/fields/labels.js.map +1 -0
- package/dist/components/form/fields/long-string/LongString.d.ts +7 -1
- package/dist/components/form/fields/long-string/LongString.d.ts.map +1 -1
- package/dist/components/form/fields/long-string/LongString.js +15 -5
- package/dist/components/form/fields/long-string/LongString.js.map +1 -1
- package/dist/components/form/fields/markdown/Markdown.d.ts.map +1 -1
- package/dist/components/form/fields/markdown/Markdown.js +3 -1
- package/dist/components/form/fields/markdown/Markdown.js.map +1 -1
- package/dist/components/form/fields/number/Number.d.ts +4 -1
- package/dist/components/form/fields/number/Number.d.ts.map +1 -1
- package/dist/components/form/fields/number/Number.js +17 -5
- package/dist/components/form/fields/number/Number.js.map +1 -1
- package/dist/components/form/fields/object/Object.d.ts.map +1 -1
- package/dist/components/form/fields/object/Object.js +8 -5
- package/dist/components/form/fields/object/Object.js.map +1 -1
- package/dist/components/form/fields/radio-group/RadioGroup.d.ts.map +1 -1
- package/dist/components/form/fields/radio-group/RadioGroup.js +13 -7
- package/dist/components/form/fields/radio-group/RadioGroup.js.map +1 -1
- package/dist/components/form/fields/rich-text/RichText.d.ts.map +1 -1
- package/dist/components/form/fields/rich-text/RichText.js +3 -2
- package/dist/components/form/fields/rich-text/RichText.js.map +1 -1
- package/dist/components/form/fields/schema-definition/CatalogLeafForm.d.ts.map +1 -1
- package/dist/components/form/fields/schema-definition/CatalogLeafForm.js +10 -8
- package/dist/components/form/fields/schema-definition/CatalogLeafForm.js.map +1 -1
- package/dist/components/form/fields/schema-definition/CatalogNodeEditor.d.ts +1 -1
- package/dist/components/form/fields/schema-definition/CatalogNodeEditor.d.ts.map +1 -1
- package/dist/components/form/fields/schema-definition/CatalogNodeEditor.js +36 -27
- package/dist/components/form/fields/schema-definition/CatalogNodeEditor.js.map +1 -1
- package/dist/components/form/fields/schema-definition/Hint.d.ts +4 -3
- package/dist/components/form/fields/schema-definition/Hint.d.ts.map +1 -1
- package/dist/components/form/fields/schema-definition/Hint.js +10 -2
- package/dist/components/form/fields/schema-definition/Hint.js.map +1 -1
- package/dist/components/form/fields/schema-definition/InlineValidationBanner.d.ts.map +1 -1
- package/dist/components/form/fields/schema-definition/InlineValidationBanner.js +3 -1
- package/dist/components/form/fields/schema-definition/InlineValidationBanner.js.map +1 -1
- package/dist/components/form/fields/schema-definition/Loader.d.ts.map +1 -1
- package/dist/components/form/fields/schema-definition/Loader.js +4 -2
- package/dist/components/form/fields/schema-definition/Loader.js.map +1 -1
- package/dist/components/form/fields/schema-definition/MigrationsTab.d.ts.map +1 -1
- package/dist/components/form/fields/schema-definition/MigrationsTab.js +17 -18
- package/dist/components/form/fields/schema-definition/MigrationsTab.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 +3 -1
- package/dist/components/form/fields/schema-definition/TableEditor.js.map +1 -1
- package/dist/components/form/fields/schema-definition/TablesTab.d.ts.map +1 -1
- package/dist/components/form/fields/schema-definition/TablesTab.js +11 -15
- package/dist/components/form/fields/schema-definition/TablesTab.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 +20 -14
- package/dist/components/form/fields/schema-definition/index.js.map +1 -1
- package/dist/components/form/fields/schema-definition/labels.d.ts +123 -0
- package/dist/components/form/fields/schema-definition/labels.d.ts.map +1 -0
- package/dist/components/form/fields/schema-definition/labels.js +113 -0
- package/dist/components/form/fields/schema-definition/labels.js.map +1 -0
- package/dist/components/form/fields/select/Select.d.ts.map +1 -1
- package/dist/components/form/fields/select/Select.js +5 -3
- package/dist/components/form/fields/select/Select.js.map +1 -1
- package/dist/components/form/fields/select/SelectCollection.d.ts +2 -2
- package/dist/components/form/fields/select/SelectCollection.d.ts.map +1 -1
- package/dist/components/form/fields/select/SelectCollection.js +11 -3
- package/dist/components/form/fields/select/SelectCollection.js.map +1 -1
- package/dist/components/form/fields/template/TemplateField.d.ts.map +1 -1
- package/dist/components/form/fields/template/TemplateField.js +36 -16
- package/dist/components/form/fields/template/TemplateField.js.map +1 -1
- package/dist/components/form/fields/template/TemplatePicker.d.ts.map +1 -1
- package/dist/components/form/fields/template/TemplatePicker.js +8 -3
- package/dist/components/form/fields/template/TemplatePicker.js.map +1 -1
- package/dist/components/form/index.d.ts +2 -0
- package/dist/components/form/index.d.ts.map +1 -1
- package/dist/components/form/index.js +2 -0
- package/dist/components/form/index.js.map +1 -1
- package/dist/components/imageLightbox/ImageLightbox.d.ts.map +1 -1
- package/dist/components/imageLightbox/ImageLightbox.js +10 -6
- package/dist/components/imageLightbox/ImageLightbox.js.map +1 -1
- package/dist/components/log/Log.d.ts +1 -1
- package/dist/components/log/Log.d.ts.map +1 -1
- package/dist/components/log/Log.js +17 -12
- package/dist/components/log/Log.js.map +1 -1
- package/dist/components/log/labels.d.ts +25 -0
- package/dist/components/log/labels.d.ts.map +1 -0
- package/dist/components/log/labels.js +22 -0
- package/dist/components/log/labels.js.map +1 -0
- package/dist/components/menu/Menu.d.ts.map +1 -1
- package/dist/components/menu/Menu.js +3 -1
- package/dist/components/menu/Menu.js.map +1 -1
- package/dist/components/qonsoleSmartInput/useQonsoleSession.d.ts.map +1 -1
- package/dist/components/qonsoleSmartInput/useQonsoleSession.js +3 -2
- package/dist/components/qonsoleSmartInput/useQonsoleSession.js.map +1 -1
- package/dist/components/smartEditor/templateCompletions.js +1 -1
- package/dist/components/smartEditor/templateCompletions.js.map +1 -1
- package/dist/components/smartEditor/useLspAutocomplete.d.ts.map +1 -1
- package/dist/components/smartEditor/useLspAutocomplete.js +5 -2
- package/dist/components/smartEditor/useLspAutocomplete.js.map +1 -1
- package/dist/components/supportTicket/AttachmentChips.d.ts.map +1 -1
- package/dist/components/supportTicket/AttachmentChips.js +4 -2
- package/dist/components/supportTicket/AttachmentChips.js.map +1 -1
- package/dist/components/supportTicket/InterfaceReferenceTags.d.ts +3 -2
- package/dist/components/supportTicket/InterfaceReferenceTags.d.ts.map +1 -1
- package/dist/components/supportTicket/InterfaceReferenceTags.js +6 -6
- package/dist/components/supportTicket/InterfaceReferenceTags.js.map +1 -1
- package/dist/components/supportTicket/ReferencePicker.d.ts +3 -2
- package/dist/components/supportTicket/ReferencePicker.d.ts.map +1 -1
- package/dist/components/supportTicket/ReferencePicker.js +35 -25
- package/dist/components/supportTicket/ReferencePicker.js.map +1 -1
- package/dist/components/supportTicket/TicketHeader.d.ts.map +1 -1
- package/dist/components/supportTicket/TicketHeader.js +4 -1
- package/dist/components/supportTicket/TicketHeader.js.map +1 -1
- package/dist/components/supportTicket/TicketMetaTags.d.ts +19 -12
- package/dist/components/supportTicket/TicketMetaTags.d.ts.map +1 -1
- package/dist/components/supportTicket/TicketMetaTags.js +57 -6
- package/dist/components/supportTicket/TicketMetaTags.js.map +1 -1
- package/dist/components/supportTicket/TicketReplyBox.d.ts +3 -2
- package/dist/components/supportTicket/TicketReplyBox.d.ts.map +1 -1
- package/dist/components/supportTicket/TicketReplyBox.js +39 -18
- package/dist/components/supportTicket/TicketReplyBox.js.map +1 -1
- package/dist/components/supportTicket/WorkspaceAccessStatus.d.ts +10 -2
- package/dist/components/supportTicket/WorkspaceAccessStatus.d.ts.map +1 -1
- package/dist/components/supportTicket/WorkspaceAccessStatus.js +45 -17
- package/dist/components/supportTicket/WorkspaceAccessStatus.js.map +1 -1
- package/dist/components/supportTicket/accessMeta.d.ts +6 -1
- package/dist/components/supportTicket/accessMeta.d.ts.map +1 -1
- package/dist/components/supportTicket/accessMeta.js +83 -65
- package/dist/components/supportTicket/accessMeta.js.map +1 -1
- package/dist/components/supportTicket/attachmentAccess.d.ts.map +1 -1
- package/dist/components/supportTicket/attachmentAccess.js +14 -26
- package/dist/components/supportTicket/attachmentAccess.js.map +1 -1
- package/dist/components/supportTicket/fileToAttachment.d.ts.map +1 -1
- package/dist/components/supportTicket/fileToAttachment.js +4 -1
- package/dist/components/supportTicket/fileToAttachment.js.map +1 -1
- package/dist/components/supportTicket/labels.d.ts +150 -0
- package/dist/components/supportTicket/labels.d.ts.map +1 -0
- package/dist/components/supportTicket/labels.js +212 -0
- package/dist/components/supportTicket/labels.js.map +1 -0
- package/dist/components/supportTicket/meta.d.ts +22 -0
- package/dist/components/supportTicket/meta.d.ts.map +1 -1
- package/dist/components/supportTicket/meta.js +91 -72
- package/dist/components/supportTicket/meta.js.map +1 -1
- package/dist/components/supportTicket/ticketAttentionInks.d.ts +23 -0
- package/dist/components/supportTicket/ticketAttentionInks.d.ts.map +1 -0
- package/dist/components/supportTicket/ticketAttentionInks.js +42 -0
- package/dist/components/supportTicket/ticketAttentionInks.js.map +1 -0
- package/dist/components/supportTicket/useLoadedImages.d.ts +10 -0
- package/dist/components/supportTicket/useLoadedImages.d.ts.map +1 -1
- package/dist/components/supportTicket/useLoadedImages.js +64 -1
- 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 +56 -45
- 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 +34 -30
- package/dist/components/ticketThread/TicketThread.js.map +1 -1
- package/dist/helpers/allowedValues.d.ts.map +1 -1
- package/dist/helpers/allowedValues.js +11 -4
- package/dist/helpers/allowedValues.js.map +1 -1
- package/dist/helpers/expressions.d.ts.map +1 -1
- package/dist/helpers/expressions.js +7 -12
- package/dist/helpers/expressions.js.map +1 -1
- package/dist/helpers/fieldDescription.d.ts +16 -0
- package/dist/helpers/fieldDescription.d.ts.map +1 -0
- package/dist/helpers/fieldDescription.js +40 -0
- package/dist/helpers/fieldDescription.js.map +1 -0
- package/dist/helpers/markdownText.d.ts +9 -0
- package/dist/helpers/markdownText.d.ts.map +1 -1
- package/dist/helpers/markdownText.js +49 -2
- package/dist/helpers/markdownText.js.map +1 -1
- package/dist/helpers/noDescription.d.ts +4 -4
- package/dist/helpers/noDescription.d.ts.map +1 -1
- package/dist/helpers/noDescription.js +8 -6
- package/dist/helpers/noDescription.js.map +1 -1
- package/dist/helpers/optionUiTypes.d.ts +3 -3
- package/dist/helpers/options.d.ts +2 -2
- package/dist/helpers/options.d.ts.map +1 -1
- package/dist/helpers/options.js +11 -8
- package/dist/helpers/options.js.map +1 -1
- package/dist/helpers/reqraftLabels.d.ts +76 -0
- package/dist/helpers/reqraftLabels.d.ts.map +1 -1
- package/dist/helpers/reqraftLabels.js +44 -1
- package/dist/helpers/reqraftLabels.js.map +1 -1
- package/dist/helpers/singleLineString.d.ts.map +1 -1
- package/dist/helpers/singleLineString.js +1 -0
- package/dist/helpers/singleLineString.js.map +1 -1
- package/dist/helpers/templates.js +1 -1
- package/dist/helpers/templates.js.map +1 -1
- package/dist/helpers/validationLabels.d.ts +190 -0
- package/dist/helpers/validationLabels.d.ts.map +1 -0
- package/dist/helpers/validationLabels.js +210 -0
- package/dist/helpers/validationLabels.js.map +1 -0
- package/dist/helpers/validations.d.ts +9 -2
- package/dist/helpers/validations.d.ts.map +1 -1
- package/dist/helpers/validations.js +164 -173
- package/dist/helpers/validations.js.map +1 -1
- package/dist/hooks/useWebSocket/useWebSocket.d.ts.map +1 -1
- package/dist/hooks/useWebSocket/useWebSocket.js +6 -5
- package/dist/hooks/useWebSocket/useWebSocket.js.map +1 -1
- package/dist/tracking/ui/ExperimentCard.d.ts +3 -3
- package/dist/tracking/ui/ExperimentCard.d.ts.map +1 -1
- package/dist/tracking/ui/ExperimentCard.js +33 -45
- package/dist/tracking/ui/ExperimentCard.js.map +1 -1
- package/dist/tracking/ui/ExperimentsOverlay.d.ts +3 -3
- package/dist/tracking/ui/ExperimentsOverlay.d.ts.map +1 -1
- package/dist/tracking/ui/ExperimentsOverlay.js +8 -6
- package/dist/tracking/ui/ExperimentsOverlay.js.map +1 -1
- package/dist/tracking/ui/card.d.ts +9 -13
- package/dist/tracking/ui/card.d.ts.map +1 -1
- package/dist/tracking/ui/card.js +96 -107
- package/dist/tracking/ui/card.js.map +1 -1
- package/dist/tracking/ui/client.d.ts +0 -6
- package/dist/tracking/ui/client.d.ts.map +1 -1
- package/dist/tracking/ui/client.js +9 -2
- package/dist/tracking/ui/client.js.map +1 -1
- package/dist/tracking/ui/labels.d.ts +198 -0
- package/dist/tracking/ui/labels.d.ts.map +1 -0
- package/dist/tracking/ui/labels.js +171 -0
- package/dist/tracking/ui/labels.js.map +1 -0
- package/package.json +1 -1
|
@@ -44,6 +44,7 @@ var templates_1 = require("./templates");
|
|
|
44
44
|
var allowedValues_1 = require("./allowedValues");
|
|
45
45
|
var colorValue_1 = require("../components/colorValue/colorValue");
|
|
46
46
|
var loneValue_1 = require("../components/form/expressions/loneValue");
|
|
47
|
+
var reqraftLabels_1 = require("./reqraftLabels");
|
|
47
48
|
/** The five cron fields, in order, as a schedule hash may name them. */
|
|
48
49
|
var CRON_FIELDS = [
|
|
49
50
|
['minutes', 'minute'],
|
|
@@ -106,6 +107,8 @@ var SEMANTIC_FORMAT_PATTERNS = {
|
|
|
106
107
|
ipv6: /^([0-9A-Fa-f]{0,4}:){2,7}[0-9A-Fa-f]{0,4}$/,
|
|
107
108
|
phone: /^\+?[0-9 ().-]{3,}$/,
|
|
108
109
|
};
|
|
110
|
+
/** The words a reason is said in, read when it is said: a host that gives others is answered in them. */
|
|
111
|
+
var words = function () { return (0, reqraftLabels_1.reqraftLabels)().validation; };
|
|
109
112
|
var validResult = function () { return ({ isValid: true, reasons: [] }); };
|
|
110
113
|
/**
|
|
111
114
|
* Why a value its field's pattern refuses is refused, in words the author can act on: what the pattern accepts,
|
|
@@ -114,19 +117,15 @@ var validResult = function () { return ({ isValid: true, reasons: [] }); };
|
|
|
114
117
|
* i.e. what doesn't match the pattern - what is the pattern"). It said "Value does not match validation pattern".
|
|
115
118
|
*/
|
|
116
119
|
var patternMismatchReason = function (field) {
|
|
117
|
-
var sentence = function (text) { return (/[.!?]$/.test(text) ? text : "".concat(text, ".")); };
|
|
118
120
|
var desc = typeof (field === null || field === void 0 ? void 0 : field.validation_regex_desc) === 'string' ? field.validation_regex_desc.trim() : '';
|
|
119
121
|
if (desc) {
|
|
120
|
-
return
|
|
122
|
+
return words().mustBe(desc);
|
|
121
123
|
}
|
|
122
124
|
var example = field === null || field === void 0 ? void 0 : field.example_value;
|
|
123
125
|
var exampleText = typeof example === 'string' ? example.trim()
|
|
124
126
|
: typeof example === 'number' || typeof example === 'boolean' ? String(example)
|
|
125
127
|
: '';
|
|
126
|
-
|
|
127
|
-
"Must match the expected form, for example ".concat(exampleText, ".")
|
|
128
|
-
: 'Must match the expected form.';
|
|
129
|
-
return (field === null || field === void 0 ? void 0 : field.validation_regex) ? "".concat(main, " Pattern: ").concat(field.validation_regex) : main;
|
|
128
|
+
return words().mustMatchExpectedForm(exampleText || undefined, (field === null || field === void 0 ? void 0 : field.validation_regex) || undefined);
|
|
130
129
|
};
|
|
131
130
|
exports.patternMismatchReason = patternMismatchReason;
|
|
132
131
|
var invalidResult = function (reason, childReasons) {
|
|
@@ -142,7 +141,10 @@ var withContext = function (result, context) {
|
|
|
142
141
|
if (result.isValid || !context) {
|
|
143
142
|
return result;
|
|
144
143
|
}
|
|
145
|
-
var
|
|
144
|
+
var checked = context;
|
|
145
|
+
var reasons = result.reasons.length > 0 ?
|
|
146
|
+
result.reasons.map(function (reason) { return words().inContext(checked, reason); })
|
|
147
|
+
: [checked];
|
|
146
148
|
return {
|
|
147
149
|
isValid: false,
|
|
148
150
|
reason: reasons[0],
|
|
@@ -178,10 +180,10 @@ var checkNumericBounds = function (value, field) {
|
|
|
178
180
|
var min = field === null || field === void 0 ? void 0 : field.min_value;
|
|
179
181
|
var max = field === null || field === void 0 ? void 0 : field.max_value;
|
|
180
182
|
if (typeof min === 'number' && Number.isFinite(min) && num < min) {
|
|
181
|
-
return invalidResult(
|
|
183
|
+
return invalidResult(words().atLeast(min));
|
|
182
184
|
}
|
|
183
185
|
if (typeof max === 'number' && Number.isFinite(max) && num > max) {
|
|
184
|
-
return invalidResult(
|
|
186
|
+
return invalidResult(words().atMost(max));
|
|
185
187
|
}
|
|
186
188
|
return validResult();
|
|
187
189
|
};
|
|
@@ -219,10 +221,7 @@ var typeInSentence = function (type) {
|
|
|
219
221
|
return (0, qorusTypeCatalogue_1.qorusTypeSentenceForm)(qorusTypeCatalogue_1.defaultQorusTypes, type);
|
|
220
222
|
};
|
|
221
223
|
/** What is said of a value that is not of its field's type, the type named where there is one (qorus#646). */
|
|
222
|
-
var valueMustBe = function (type) {
|
|
223
|
-
var named = typeInSentence(type);
|
|
224
|
-
return named ? "Value must be ".concat(named) : "Value must be of this field's type";
|
|
225
|
-
};
|
|
224
|
+
var valueMustBe = function (type) { return words().valueMustBe(typeInSentence(type)); };
|
|
226
225
|
/** The types a value is written as text in, where text around a template makes it text and not one of them. */
|
|
227
226
|
var NOT_TEXT_WITH_A_TEMPLATE = new Set([
|
|
228
227
|
'int',
|
|
@@ -244,37 +243,26 @@ var NOT_TEXT_WITH_A_TEMPLATE = new Set([
|
|
|
244
243
|
* happened?"). `undefined` where the type is text, or the value is not text around a template.
|
|
245
244
|
*/
|
|
246
245
|
var textAroundATemplateReason = function (type, value) {
|
|
247
|
-
var
|
|
248
|
-
var notA = NOT_TEXT_WITH_A_TEMPLATE.has(type)
|
|
249
|
-
? ((_a = typeInSentence(type)) !== null && _a !== void 0 ? _a : "of this field's type")
|
|
250
|
-
: undefined;
|
|
251
|
-
var around = notA ? (0, templates_1.textAroundATemplate)(value) : undefined;
|
|
246
|
+
var around = NOT_TEXT_WITH_A_TEMPLATE.has(type) ? (0, templates_1.textAroundATemplate)(value) : undefined;
|
|
252
247
|
if (!around) {
|
|
253
248
|
return undefined;
|
|
254
249
|
}
|
|
250
|
+
// the type as the catalogue names it inside a sentence; the words say it of the field's type where it has no name
|
|
251
|
+
var named = typeInSentence(type);
|
|
255
252
|
if (around.templates > 1) {
|
|
256
253
|
return around.text.length
|
|
257
|
-
?
|
|
258
|
-
:
|
|
259
|
-
}
|
|
260
|
-
return "\"".concat(around.text.join(' … '), "\" makes this text, not ").concat(notA, ". Delete it to keep the template alone.");
|
|
261
|
-
};
|
|
262
|
-
/** 1st, 2nd, 3rd, 4th, … 11th, 12th, 13th, … 21st: a position as it is written. */
|
|
263
|
-
var ordinal = function (n) {
|
|
264
|
-
var _a;
|
|
265
|
-
var tens = n % 100;
|
|
266
|
-
if (tens >= 11 && tens <= 13) {
|
|
267
|
-
return "".concat(n, "th");
|
|
254
|
+
? words().textAndTemplatesMakeText(named)
|
|
255
|
+
: words().templatesSideBySide(named);
|
|
268
256
|
}
|
|
269
|
-
return
|
|
257
|
+
return words().textAroundTemplate(around.text, named);
|
|
270
258
|
};
|
|
271
259
|
var _validateField = function (type, value, field, canBeNull) {
|
|
272
260
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
|
|
273
261
|
if (!type) {
|
|
274
262
|
if (value === undefined || value === null) {
|
|
275
|
-
return invalidResult(
|
|
263
|
+
return invalidResult(words().missingValue);
|
|
276
264
|
}
|
|
277
|
-
return invalidResult(
|
|
265
|
+
return invalidResult(words().missingType);
|
|
278
266
|
}
|
|
279
267
|
// Check if the type starts with a * to indicate it can be null
|
|
280
268
|
if (type.startsWith('*')) {
|
|
@@ -302,7 +290,7 @@ var _validateField = function (type, value, field, canBeNull) {
|
|
|
302
290
|
if ((0, templates_1.isValueTemplate)(value)) {
|
|
303
291
|
var hasKey = !!(0, templates_1.getTemplateKey)(value);
|
|
304
292
|
var hasValue = !!(0, templates_1.getTemplateValue)(value);
|
|
305
|
-
return resultFromBoolean(hasKey && hasValue,
|
|
293
|
+
return resultFromBoolean(hasKey && hasValue, words().templateNeedsKeyAndValue);
|
|
306
294
|
}
|
|
307
295
|
// Expression values (`is_expression`) carry the AST `{ exp, args }` instead of
|
|
308
296
|
// a typed literal, so the declared type says nothing about them — validate
|
|
@@ -332,7 +320,7 @@ var _validateField = function (type, value, field, canBeNull) {
|
|
|
332
320
|
// here with the field's schema (choices included) and the AST as the value.
|
|
333
321
|
var unlistedChoiceReason = type === 'expression' ? undefined : (0, allowedValues_1.getUnlistedChoiceReason)(value, field);
|
|
334
322
|
if (unlistedChoiceReason) {
|
|
335
|
-
return invalidResult(unlistedChoiceReason);
|
|
323
|
+
return __assign(__assign({}, invalidResult(unlistedChoiceReason)), { unlistedChoice: true });
|
|
336
324
|
}
|
|
337
325
|
// An interface type names another Qorus object by its name, so a non-empty
|
|
338
326
|
// string is the whole contract. `connection` is the exception: it carries
|
|
@@ -343,13 +331,13 @@ var _validateField = function (type, value, field, canBeNull) {
|
|
|
343
331
|
switch (type) {
|
|
344
332
|
case 'richtext': {
|
|
345
333
|
if (!value || !(0, size_1.default)(value)) {
|
|
346
|
-
return invalidResult(
|
|
334
|
+
return invalidResult(words().textEmpty);
|
|
347
335
|
}
|
|
348
336
|
if (typeof value === 'string') {
|
|
349
337
|
return validResult();
|
|
350
338
|
}
|
|
351
339
|
if (isRichTextWithoutValue(value)) {
|
|
352
|
-
return invalidResult(
|
|
340
|
+
return invalidResult(words().textEmpty);
|
|
353
341
|
}
|
|
354
342
|
return validResult();
|
|
355
343
|
}
|
|
@@ -360,21 +348,21 @@ var _validateField = function (type, value, field, canBeNull) {
|
|
|
360
348
|
(value === undefined && (field === null || field === void 0 ? void 0 : field.has_to_have_value) === false), valueMustBe('bool'));
|
|
361
349
|
case 'connection': {
|
|
362
350
|
if (!value) {
|
|
363
|
-
return invalidResult(
|
|
351
|
+
return invalidResult(words().connectionMissing);
|
|
364
352
|
}
|
|
365
353
|
if (field === null || field === void 0 ? void 0 : field.allowed_values) {
|
|
366
354
|
var allowedValue = field.allowed_values.find(function (val) { return (0, allowedValues_1.allowedValueOf)(val) === value || val.name === value; });
|
|
367
355
|
if (!allowedValue) {
|
|
368
|
-
return invalidResult(
|
|
356
|
+
return invalidResult(words().connectionNotAllowed);
|
|
369
357
|
}
|
|
370
358
|
if (allowedValue.disabled || ((_b = allowedValue.metadata) === null || _b === void 0 ? void 0 : _b.needs_auth)) {
|
|
371
|
-
return invalidResult(
|
|
359
|
+
return invalidResult(words().connectionDisabled);
|
|
372
360
|
}
|
|
373
361
|
}
|
|
374
362
|
if ((field === null || field === void 0 ? void 0 : field.disabled) || ((_c = field === null || field === void 0 ? void 0 : field.metadata) === null || _c === void 0 ? void 0 : _c.needs_auth)) {
|
|
375
|
-
return invalidResult(
|
|
363
|
+
return invalidResult(words().connectionDisabled);
|
|
376
364
|
}
|
|
377
|
-
return withContext((0, exports.validateFieldWithResult)('string', value, field),
|
|
365
|
+
return withContext((0, exports.validateFieldWithResult)('string', value, field), words().connectionTextInvalid);
|
|
378
366
|
}
|
|
379
367
|
// semantic string formats — permissive patterns mirror the qore DataProvider
|
|
380
368
|
// QoreStringFormatDataType backstop; a server-supplied validation_regex, if
|
|
@@ -386,20 +374,20 @@ var _validateField = function (type, value, field, canBeNull) {
|
|
|
386
374
|
case 'ipv6':
|
|
387
375
|
case 'phone': {
|
|
388
376
|
if (value === undefined || value === null || value === '' || typeof value !== 'string') {
|
|
389
|
-
return invalidResult(
|
|
377
|
+
return invalidResult(words().nonEmptyText);
|
|
390
378
|
}
|
|
391
379
|
if ((field === null || field === void 0 ? void 0 : field.validation_regex) && !value.match(field.validation_regex)) {
|
|
392
380
|
return invalidResult((0, exports.patternMismatchReason)(field));
|
|
393
381
|
}
|
|
394
|
-
return resultFromBoolean(SEMANTIC_FORMAT_PATTERNS[type].test(value),
|
|
382
|
+
return resultFromBoolean(SEMANTIC_FORMAT_PATTERNS[type].test(value), words().notValidFormat(type));
|
|
395
383
|
}
|
|
396
384
|
case 'binary': {
|
|
397
385
|
if (typeof value !== 'string') {
|
|
398
|
-
return invalidResult(
|
|
386
|
+
return invalidResult(words().binaryNotText);
|
|
399
387
|
}
|
|
400
388
|
var trimmed = value.trim();
|
|
401
389
|
if (trimmed.length === 0) {
|
|
402
|
-
return invalidResult(
|
|
390
|
+
return invalidResult(words().binaryEmpty);
|
|
403
391
|
}
|
|
404
392
|
// the canonical wire form is base64 (matching the server decode); a "data:<mime>;base64,..." URL
|
|
405
393
|
// and legacy "0x"-prefixed hex are also accepted
|
|
@@ -408,9 +396,9 @@ var _validateField = function (type, value, field, canBeNull) {
|
|
|
408
396
|
}
|
|
409
397
|
if (/^0x/i.test(trimmed)) {
|
|
410
398
|
var hex = trimmed.replace(/^0x/i, '');
|
|
411
|
-
return resultFromBoolean(hex.length % 2 === 0 && /^[0-9a-fA-F]+$/.test(hex),
|
|
399
|
+
return resultFromBoolean(hex.length % 2 === 0 && /^[0-9a-fA-F]+$/.test(hex), words().binaryHexInvalid);
|
|
412
400
|
}
|
|
413
|
-
return resultFromBoolean(/^[A-Za-z0-9+/]+={0,2}$/.test(trimmed),
|
|
401
|
+
return resultFromBoolean(/^[A-Za-z0-9+/]+={0,2}$/.test(trimmed), words().binaryForm);
|
|
414
402
|
}
|
|
415
403
|
case 'string':
|
|
416
404
|
case 'mapper':
|
|
@@ -426,7 +414,7 @@ var _validateField = function (type, value, field, canBeNull) {
|
|
|
426
414
|
case 'code-editor':
|
|
427
415
|
case 'data': {
|
|
428
416
|
if (value === undefined || value === null || value === '' || typeof value !== 'string') {
|
|
429
|
-
return invalidResult(
|
|
417
|
+
return invalidResult(words().nonEmptyText);
|
|
430
418
|
}
|
|
431
419
|
var reasons = [];
|
|
432
420
|
if ((field === null || field === void 0 ? void 0 : field.validation_regex) && !value.match(field.validation_regex)) {
|
|
@@ -438,12 +426,12 @@ var _validateField = function (type, value, field, canBeNull) {
|
|
|
438
426
|
if ((field === null || field === void 0 ? void 0 : field.has_to_be_valid_identifier) ||
|
|
439
427
|
(Array.isArray(field === null || field === void 0 ? void 0 : field.rules) && field.rules.includes('valid_identifier'))) {
|
|
440
428
|
if (value.match(/^[0-9]|\W/)) {
|
|
441
|
-
reasons.push(
|
|
429
|
+
reasons.push(words().notIdentifier);
|
|
442
430
|
}
|
|
443
431
|
}
|
|
444
432
|
if (field === null || field === void 0 ? void 0 : field.has_to_have_value) {
|
|
445
433
|
if (value === '' || value.length === 0) {
|
|
446
|
-
reasons.push(
|
|
434
|
+
reasons.push(words().required);
|
|
447
435
|
}
|
|
448
436
|
}
|
|
449
437
|
return reasons.length ? invalidResult(undefined, reasons) : validResult();
|
|
@@ -479,9 +467,9 @@ var _validateField = function (type, value, field, canBeNull) {
|
|
|
479
467
|
// Report both parts. Returning on the first failure meant a bad file name
|
|
480
468
|
// masked the content result entirely, so the form could only ever surface
|
|
481
469
|
// one problem at a time.
|
|
482
|
-
var reasons = __spreadArray(__spreadArray([], (nameResult.isValid ? [] : withContext(nameResult,
|
|
470
|
+
var reasons = __spreadArray(__spreadArray([], (nameResult.isValid ? [] : withContext(nameResult, words().fileNameInvalid).reasons), true), (contentResult.isValid
|
|
483
471
|
? []
|
|
484
|
-
: withContext(contentResult,
|
|
472
|
+
: withContext(contentResult, words().fileContentInvalid).reasons), true);
|
|
485
473
|
return reasons.length ? invalidResult(reasons) : validResult();
|
|
486
474
|
}
|
|
487
475
|
case 'collection-documents': {
|
|
@@ -499,23 +487,22 @@ var _validateField = function (type, value, field, canBeNull) {
|
|
|
499
487
|
return validResult();
|
|
500
488
|
}
|
|
501
489
|
if (!Array.isArray(value)) {
|
|
502
|
-
return invalidResult(
|
|
490
|
+
return invalidResult(words().documentsNotList);
|
|
503
491
|
}
|
|
504
492
|
var reasons_1 = [];
|
|
505
493
|
value.forEach(function (row, idx) {
|
|
506
494
|
if (!row || typeof row !== 'object') {
|
|
507
|
-
reasons_1.push(
|
|
495
|
+
reasons_1.push(words().documentRowNotObject(idx + 1));
|
|
508
496
|
return;
|
|
509
497
|
}
|
|
510
498
|
if (typeof row.name !== 'string' || !row.name) {
|
|
511
|
-
reasons_1.push(
|
|
499
|
+
reasons_1.push(words().documentRowNoName(idx + 1));
|
|
512
500
|
return;
|
|
513
501
|
}
|
|
514
502
|
var hasServerId = typeof row.ai_documentid === 'number';
|
|
515
503
|
var hasContent = typeof row.content === 'string' && !!row.content;
|
|
516
504
|
if (!hasServerId && !hasContent) {
|
|
517
|
-
reasons_1.push(
|
|
518
|
-
"content nor a server document id");
|
|
505
|
+
reasons_1.push(words().documentRowNoContent(idx + 1, row.name));
|
|
519
506
|
}
|
|
520
507
|
});
|
|
521
508
|
return reasons_1.length ? invalidResult(undefined, reasons_1) : validResult();
|
|
@@ -526,26 +513,26 @@ var _validateField = function (type, value, field, canBeNull) {
|
|
|
526
513
|
// Check if every pair has key & value
|
|
527
514
|
// assigned properly
|
|
528
515
|
if (!Array.isArray(value)) {
|
|
529
|
-
return invalidResult(
|
|
516
|
+
return invalidResult(words().notList);
|
|
530
517
|
}
|
|
531
518
|
if (!(value === null || value === void 0 ? void 0 : value.every(function (pair) {
|
|
532
519
|
return pair[field.fields[0]] !== '' && pair[field.fields[1]] !== '';
|
|
533
520
|
}))) {
|
|
534
521
|
valid = false;
|
|
535
|
-
reasons.push(
|
|
522
|
+
reasons.push(words().pairsNeedBothFields);
|
|
536
523
|
}
|
|
537
524
|
// Get a list of unique values
|
|
538
525
|
var uniqueValues = (0, uniqWith_1.default)(value, function (cur, prev) { return cur[field.fields[0]] === prev[field.fields[0]]; });
|
|
539
526
|
// Check if there are any duplicates
|
|
540
527
|
if ((0, size_1.default)(uniqueValues) !== (0, size_1.default)(value)) {
|
|
541
528
|
valid = false;
|
|
542
|
-
reasons.push(
|
|
529
|
+
reasons.push(words().pairsUniqueKeys);
|
|
543
530
|
}
|
|
544
531
|
return valid ? validResult() : invalidResult(undefined, reasons);
|
|
545
532
|
}
|
|
546
533
|
case 'class-connectors': {
|
|
547
534
|
if (!Array.isArray(value) || value.length === 0) {
|
|
548
|
-
return invalidResult(
|
|
535
|
+
return invalidResult(words().connectorRequired);
|
|
549
536
|
}
|
|
550
537
|
var valid = true;
|
|
551
538
|
var reasons = [];
|
|
@@ -555,35 +542,35 @@ var _validateField = function (type, value, field, canBeNull) {
|
|
|
555
542
|
return !!pair.name && pair.name !== '' && !!pair.method && pair.method !== '';
|
|
556
543
|
}))) {
|
|
557
544
|
valid = false;
|
|
558
|
-
reasons.push(
|
|
545
|
+
reasons.push(words().connectorNameAndMethod);
|
|
559
546
|
}
|
|
560
547
|
// Get a list of unique values
|
|
561
548
|
var uniqueValues = (0, uniqWith_1.default)(value, function (cur, prev) { return cur.name === prev.name; });
|
|
562
549
|
// Check if there are any duplicates
|
|
563
550
|
if ((0, size_1.default)(uniqueValues) !== (0, size_1.default)(value)) {
|
|
564
551
|
valid = false;
|
|
565
|
-
reasons.push(
|
|
552
|
+
reasons.push(words().connectorNamesUnique);
|
|
566
553
|
}
|
|
567
554
|
return valid ? validResult() : invalidResult(undefined, reasons);
|
|
568
555
|
}
|
|
569
556
|
// Classes check
|
|
570
557
|
case 'class-array': {
|
|
571
558
|
if (!(Array.isArray(value) && value.length > 0)) {
|
|
572
|
-
return invalidResult(
|
|
559
|
+
return invalidResult(words().classRequired);
|
|
573
560
|
}
|
|
574
561
|
var valid = true;
|
|
575
562
|
var reasons = [];
|
|
576
563
|
// Check if the fields are not empty
|
|
577
564
|
if (!(value === null || value === void 0 ? void 0 : value.every(function (pair) { return !!pair.name && pair.name !== ''; }))) {
|
|
578
565
|
valid = false;
|
|
579
|
-
reasons.push(
|
|
566
|
+
reasons.push(words().classNeedsName);
|
|
580
567
|
}
|
|
581
568
|
// Get a list of unique values
|
|
582
569
|
var uniqueValues = (0, uniqWith_1.default)(value, function (cur, prev) { return "".concat(cur.prefix).concat(cur.name) === "".concat(prev.prefix).concat(prev.name); });
|
|
583
570
|
// Check if there are any duplicates
|
|
584
571
|
if ((0, size_1.default)(uniqueValues) !== (0, size_1.default)(value)) {
|
|
585
572
|
valid = false;
|
|
586
|
-
reasons.push(
|
|
573
|
+
reasons.push(words().classNamesUnique);
|
|
587
574
|
}
|
|
588
575
|
return valid ? validResult() : invalidResult(undefined, reasons);
|
|
589
576
|
}
|
|
@@ -607,10 +594,10 @@ var _validateField = function (type, value, field, canBeNull) {
|
|
|
607
594
|
case 'multi-select':
|
|
608
595
|
case 'array':
|
|
609
596
|
case 'file-tree':
|
|
610
|
-
return resultFromBoolean(value && value.length > 0,
|
|
597
|
+
return resultFromBoolean(value && value.length > 0, words().atLeastOneValue);
|
|
611
598
|
case 'cron': {
|
|
612
599
|
if (!value) {
|
|
613
|
-
return invalidResult(
|
|
600
|
+
return invalidResult(words().cronRequired);
|
|
614
601
|
}
|
|
615
602
|
var expression = (0, exports.cronExpressionFromValue)(value);
|
|
616
603
|
// A value that is neither a cron string nor a schedule hash is INVALID,
|
|
@@ -618,15 +605,15 @@ var _validateField = function (type, value, field, canBeNull) {
|
|
|
618
605
|
// passing it a hash threw a TypeError out of validation and took the
|
|
619
606
|
// whole form down through the host's error boundary.
|
|
620
607
|
if (expression === undefined) {
|
|
621
|
-
return invalidResult(
|
|
608
|
+
return invalidResult(words().cronInvalid);
|
|
622
609
|
}
|
|
623
|
-
return resultFromBoolean((0, cron_validator_1.isValidCron)(expression, { alias: true }),
|
|
610
|
+
return resultFromBoolean((0, cron_validator_1.isValidCron)(expression, { alias: true }), words().cronInvalid);
|
|
624
611
|
}
|
|
625
612
|
case 'date':
|
|
626
613
|
return resultFromBoolean(value !== undefined &&
|
|
627
614
|
value !== null &&
|
|
628
615
|
value !== '' &&
|
|
629
|
-
new Date(value).toString() !== 'Invalid Date',
|
|
616
|
+
new Date(value).toString() !== 'Invalid Date', words().dateInvalid);
|
|
630
617
|
case 'hash':
|
|
631
618
|
case 'free-hash': {
|
|
632
619
|
var parsedValue_1 = typeof value === 'object' ? value : (0, exports.maybeParseYaml)(value);
|
|
@@ -640,7 +627,7 @@ var _validateField = function (type, value, field, canBeNull) {
|
|
|
640
627
|
}
|
|
641
628
|
return (0, exports.validateFieldWithResult)(fieldData.ui_type || fieldData.type, argValue, fieldData).isValid;
|
|
642
629
|
});
|
|
643
|
-
return resultFromBoolean(result,
|
|
630
|
+
return resultFromBoolean(result, words().hashArgumentsInvalid);
|
|
644
631
|
}
|
|
645
632
|
if (!parsedValue_1 || !(0, isPlainObject_1.default)(parsedValue_1)) {
|
|
646
633
|
return invalidResult(valueMustBe('hash'));
|
|
@@ -660,7 +647,7 @@ var _validateField = function (type, value, field, canBeNull) {
|
|
|
660
647
|
return validResult();
|
|
661
648
|
}
|
|
662
649
|
if (!(0, isArray_1.default)(parsedValue)) {
|
|
663
|
-
return invalidResult(
|
|
650
|
+
return invalidResult(words().notList);
|
|
664
651
|
}
|
|
665
652
|
if ((field === null || field === void 0 ? void 0 : field.ui_element_type) || (field === null || field === void 0 ? void 0 : field.element_type)) {
|
|
666
653
|
for (var i = 0; i < parsedValue.length; i++) {
|
|
@@ -673,7 +660,7 @@ var _validateField = function (type, value, field, canBeNull) {
|
|
|
673
660
|
// a null element.
|
|
674
661
|
(0, options_1.getListElementValue)(parsedValue[i]), field);
|
|
675
662
|
if (!itemResult.isValid) {
|
|
676
|
-
return withContext(itemResult,
|
|
663
|
+
return withContext(itemResult, words().listItemInvalid(i));
|
|
677
664
|
}
|
|
678
665
|
}
|
|
679
666
|
}
|
|
@@ -682,34 +669,34 @@ var _validateField = function (type, value, field, canBeNull) {
|
|
|
682
669
|
case 'list-of-hashes': {
|
|
683
670
|
var parsedValue = (0, exports.maybeParseYaml)(value);
|
|
684
671
|
if (!parsedValue || !(0, isArray_1.default)(parsedValue)) {
|
|
685
|
-
return invalidResult(
|
|
672
|
+
return invalidResult(words().notListOfHashes);
|
|
686
673
|
}
|
|
687
674
|
for (var i = 0; i < parsedValue.length; i++) {
|
|
688
675
|
var item = parsedValue[i];
|
|
689
676
|
if (!(0, size_1.default)(item)) {
|
|
690
|
-
return invalidResult(
|
|
677
|
+
return invalidResult(words().hashEmptyAt(i));
|
|
691
678
|
}
|
|
692
679
|
var itemResult = (0, exports.validateFieldWithResult)('hash', item);
|
|
693
680
|
if (!itemResult.isValid) {
|
|
694
|
-
return withContext(itemResult,
|
|
681
|
+
return withContext(itemResult, words().hashInvalidAt(i));
|
|
695
682
|
}
|
|
696
683
|
}
|
|
697
684
|
return validResult();
|
|
698
685
|
}
|
|
699
686
|
case 'mapper-code': {
|
|
700
687
|
if (!value) {
|
|
701
|
-
return invalidResult(
|
|
688
|
+
return invalidResult(words().mapperCodeRequired);
|
|
702
689
|
}
|
|
703
690
|
// Split the value
|
|
704
691
|
var _s = value.split('::'), code = _s[0], method = _s[1];
|
|
705
692
|
// Both fields need to be strings & filled
|
|
706
693
|
var codeResult = (0, exports.validateFieldWithResult)('string', code);
|
|
707
694
|
if (!codeResult.isValid) {
|
|
708
|
-
return withContext(codeResult,
|
|
695
|
+
return withContext(codeResult, words().mapperCodeInvalid);
|
|
709
696
|
}
|
|
710
697
|
var methodResult = (0, exports.validateFieldWithResult)('string', method);
|
|
711
698
|
if (!methodResult.isValid) {
|
|
712
|
-
return withContext(methodResult,
|
|
699
|
+
return withContext(methodResult, words().mapperMethodInvalid);
|
|
713
700
|
}
|
|
714
701
|
return validResult();
|
|
715
702
|
}
|
|
@@ -718,19 +705,19 @@ var _validateField = function (type, value, field, canBeNull) {
|
|
|
718
705
|
if ((varAction === null || varAction === void 0 ? void 0 : varAction.var_type) !== 'localvar' &&
|
|
719
706
|
(varAction === null || varAction === void 0 ? void 0 : varAction.var_type) !== 'globalvar' &&
|
|
720
707
|
(varAction === null || varAction === void 0 ? void 0 : varAction.var_type) !== 'autovar') {
|
|
721
|
-
return invalidResult(
|
|
708
|
+
return invalidResult(words().variableTypeInvalid);
|
|
722
709
|
}
|
|
723
710
|
var nameResult = (0, exports.validateFieldWithResult)('string', varAction.var_name, {
|
|
724
711
|
has_to_have_value: true,
|
|
725
712
|
});
|
|
726
713
|
if (!nameResult.isValid) {
|
|
727
|
-
return withContext(nameResult,
|
|
714
|
+
return withContext(nameResult, words().variableNameInvalid);
|
|
728
715
|
}
|
|
729
716
|
var actionResult = (0, exports.validateFieldWithResult)('string', varAction.action_type, {
|
|
730
717
|
has_to_have_value: true,
|
|
731
718
|
});
|
|
732
719
|
if (!actionResult.isValid) {
|
|
733
|
-
return withContext(actionResult,
|
|
720
|
+
return withContext(actionResult, words().variableActionTypeInvalid);
|
|
734
721
|
}
|
|
735
722
|
// If the action type is transaction, the transaction_action needs to be set
|
|
736
723
|
if (varAction.action_type === 'transaction') {
|
|
@@ -738,17 +725,17 @@ var _validateField = function (type, value, field, canBeNull) {
|
|
|
738
725
|
has_to_have_value: true,
|
|
739
726
|
});
|
|
740
727
|
if (!transactionResult.isValid) {
|
|
741
|
-
return withContext(transactionResult,
|
|
728
|
+
return withContext(transactionResult, words().transactionActionInvalid);
|
|
742
729
|
}
|
|
743
730
|
return validResult();
|
|
744
731
|
}
|
|
745
732
|
// If the variable data is missing
|
|
746
733
|
if (!((_d = field === null || field === void 0 ? void 0 : field.variableData) === null || _d === void 0 ? void 0 : _d.value)) {
|
|
747
|
-
return invalidResult(
|
|
734
|
+
return invalidResult(words().variableDataMissing);
|
|
748
735
|
}
|
|
749
736
|
// Get the variable data
|
|
750
737
|
var variableData = __assign(__assign({}, value), field.variableData.value);
|
|
751
|
-
return withContext((0, exports.validateFieldWithResult)(varAction.action_type, variableData, field),
|
|
738
|
+
return withContext((0, exports.validateFieldWithResult)(varAction.action_type, variableData, field), words().variableActionInvalid);
|
|
752
739
|
}
|
|
753
740
|
case 'type-selector':
|
|
754
741
|
case 'data-provider':
|
|
@@ -761,11 +748,11 @@ var _validateField = function (type, value, field, canBeNull) {
|
|
|
761
748
|
case 'create': {
|
|
762
749
|
var newValue = (0, providerValue_1.maybeBuildOptionProvider)(value);
|
|
763
750
|
if (!newValue) {
|
|
764
|
-
return invalidResult(
|
|
751
|
+
return invalidResult(words().providerInvalid);
|
|
765
752
|
}
|
|
766
753
|
// Api call only supports requests / response
|
|
767
754
|
if (type === 'api-call' && !value.supports_request) {
|
|
768
|
-
return invalidResult(
|
|
755
|
+
return invalidResult(words().apiCallNeedsRequests);
|
|
769
756
|
}
|
|
770
757
|
// If the provider is from FSM variables, it needs pass this
|
|
771
758
|
if ((field === null || field === void 0 ? void 0 : field.isVariable) &&
|
|
@@ -776,41 +763,41 @@ var _validateField = function (type, value, field, canBeNull) {
|
|
|
776
763
|
newValue.supports_request ||
|
|
777
764
|
newValue.supports_messages ||
|
|
778
765
|
newValue.transaction_management)) {
|
|
779
|
-
return invalidResult(
|
|
766
|
+
return invalidResult(words().variableProviderNeedsAction);
|
|
780
767
|
}
|
|
781
768
|
// Send message only supports messages
|
|
782
769
|
if (type === 'send-message' &&
|
|
783
770
|
(!newValue.supports_messages || !newValue.message_id || !newValue.message)) {
|
|
784
|
-
return invalidResult(
|
|
771
|
+
return invalidResult(words().sendMessageProviderIncomplete);
|
|
785
772
|
}
|
|
786
773
|
if (newValue.message_id) {
|
|
787
774
|
var messageIdResult = (0, exports.validateFieldWithResult)('string', newValue.message_id);
|
|
788
775
|
if (!messageIdResult.isValid) {
|
|
789
|
-
return withContext(messageIdResult,
|
|
776
|
+
return withContext(messageIdResult, words().messageIdInvalid);
|
|
790
777
|
}
|
|
791
778
|
if (!newValue.message) {
|
|
792
|
-
return invalidResult(
|
|
779
|
+
return invalidResult(words().messageContentMissing);
|
|
793
780
|
}
|
|
794
781
|
var messageResult = (0, exports.validateFieldWithResult)(newValue.message.type, newValue.message.value);
|
|
795
782
|
if (!messageResult.isValid) {
|
|
796
|
-
return withContext(messageResult,
|
|
783
|
+
return withContext(messageResult, words().messageContentInvalid);
|
|
797
784
|
}
|
|
798
785
|
}
|
|
799
786
|
if (newValue.use_args) {
|
|
800
787
|
if (((_e = newValue.args) === null || _e === void 0 ? void 0 : _e.type) !== 'nothing') {
|
|
801
788
|
if (!newValue.args) {
|
|
802
|
-
return invalidResult(
|
|
789
|
+
return invalidResult(words().argumentsMissing);
|
|
803
790
|
}
|
|
804
791
|
var argsResult = (0, exports.validateFieldWithResult)(newValue.args.type === 'hash' ? 'system-options' : newValue.args.type, newValue.args.value);
|
|
805
792
|
if (!argsResult.isValid) {
|
|
806
|
-
return withContext(argsResult,
|
|
793
|
+
return withContext(argsResult, words().argumentsInvalid);
|
|
807
794
|
}
|
|
808
795
|
}
|
|
809
796
|
}
|
|
810
797
|
if ((type === 'search-single' || type === 'search') &&
|
|
811
798
|
(0, size_1.default)(newValue.search_args) !== 0 &&
|
|
812
799
|
!(0, exports.validateFieldWithResult)('system-options-with-operators', newValue.search_args).isValid) {
|
|
813
|
-
return invalidResult(
|
|
800
|
+
return invalidResult(words().searchArgumentsInvalid);
|
|
814
801
|
}
|
|
815
802
|
var isUpdateOrCreate = type === 'update' || type === 'create';
|
|
816
803
|
if (isUpdateOrCreate) {
|
|
@@ -821,66 +808,66 @@ var _validateField = function (type, value, field, canBeNull) {
|
|
|
821
808
|
((0, size_1.default)(newValue["".concat(type, "_args_freeform")]) === 0 ||
|
|
822
809
|
!(0, exports.validateFieldWithResult)('list-of-hashes', newValue["".concat(type, "_args_freeform")]).isValid);
|
|
823
810
|
if ("".concat(type, "_args") in newValue && areNormalArgsInvalid && areFreeFormArgsInvalid) {
|
|
824
|
-
return invalidResult(
|
|
811
|
+
return invalidResult(words().updateCreateArgumentsInvalid);
|
|
825
812
|
}
|
|
826
813
|
if ("".concat(type, "_args_freeform") in newValue && areFreeFormArgsInvalid && areNormalArgsInvalid) {
|
|
827
|
-
return invalidResult(
|
|
814
|
+
return invalidResult(words().updateCreateArgumentsInvalid);
|
|
828
815
|
}
|
|
829
816
|
}
|
|
830
817
|
if ((newValue === null || newValue === void 0 ? void 0 : newValue.type) === 'factory') {
|
|
831
818
|
if (newValue.optionsChanged) {
|
|
832
|
-
return invalidResult(
|
|
819
|
+
return invalidResult(words().factoryOptionsNotSaved);
|
|
833
820
|
}
|
|
834
821
|
var options = true;
|
|
835
822
|
if (newValue.options) {
|
|
836
823
|
options = (0, exports.validateFieldWithResult)('system-options', newValue.options).isValid;
|
|
837
824
|
}
|
|
838
825
|
// Type path and name are required
|
|
839
|
-
return resultFromBoolean(!!(newValue.type && newValue.name && options),
|
|
826
|
+
return resultFromBoolean(!!(newValue.type && newValue.name && options), words().factoryIncomplete);
|
|
840
827
|
}
|
|
841
828
|
if (newValue.record_requires_search_options && newValue.searchOptionsChanged) {
|
|
842
|
-
return invalidResult(
|
|
829
|
+
return invalidResult(words().searchOptionsNotSaved);
|
|
843
830
|
}
|
|
844
831
|
if (newValue.search_options &&
|
|
845
832
|
!(0, exports.validateFieldWithResult)('system-options', newValue.search_options).isValid) {
|
|
846
|
-
return invalidResult(
|
|
833
|
+
return invalidResult(words().searchOptionsInvalid);
|
|
847
834
|
}
|
|
848
|
-
return resultFromBoolean(!!(newValue.type && newValue.name),
|
|
835
|
+
return resultFromBoolean(!!(newValue.type && newValue.name), words().providerTypeAndName);
|
|
849
836
|
}
|
|
850
837
|
case 'context-selector': {
|
|
851
838
|
if ((0, lodash_1.isString)(value)) {
|
|
852
839
|
var cont = value.split(':');
|
|
853
840
|
var contextResult = (0, exports.validateFieldWithResult)('string', cont[0]);
|
|
854
841
|
if (!contextResult.isValid) {
|
|
855
|
-
return withContext(contextResult,
|
|
842
|
+
return withContext(contextResult, words().contextPrefixInvalid);
|
|
856
843
|
}
|
|
857
844
|
var nameResult = (0, exports.validateFieldWithResult)('string', cont[1]);
|
|
858
845
|
if (!nameResult.isValid) {
|
|
859
|
-
return withContext(nameResult,
|
|
846
|
+
return withContext(nameResult, words().contextNameInvalid);
|
|
860
847
|
}
|
|
861
848
|
return validResult();
|
|
862
849
|
}
|
|
863
|
-
return resultFromBoolean(!!(value === null || value === void 0 ? void 0 : value.iface_kind) && !!(value === null || value === void 0 ? void 0 : value.name),
|
|
850
|
+
return resultFromBoolean(!!(value === null || value === void 0 ? void 0 : value.iface_kind) && !!(value === null || value === void 0 ? void 0 : value.name), words().contextSelectorIncomplete);
|
|
864
851
|
}
|
|
865
852
|
case 'service-event': {
|
|
866
853
|
var typeResult = (0, exports.validateFieldWithResult)('type-selector', value);
|
|
867
854
|
if (!typeResult.isValid) {
|
|
868
|
-
return withContext(typeResult,
|
|
855
|
+
return withContext(typeResult, words().serviceEventTypeInvalid);
|
|
869
856
|
}
|
|
870
857
|
if (!(0, size_1.default)(value.handlers) ||
|
|
871
858
|
!(0, every_1.default)(value.handlers, function (handler) { return (handler.type === 'fsm' || handler.type === 'method') && handler.value; })) {
|
|
872
|
-
return invalidResult(
|
|
859
|
+
return invalidResult(words().serviceEventHandlersInvalid);
|
|
873
860
|
}
|
|
874
861
|
return validResult();
|
|
875
862
|
}
|
|
876
863
|
case 'service-events': {
|
|
877
864
|
if (!(0, isArray_1.default)(value) || !(0, size_1.default)(value)) {
|
|
878
|
-
return invalidResult(
|
|
865
|
+
return invalidResult(words().serviceEventRequired);
|
|
879
866
|
}
|
|
880
867
|
for (var i = 0; i < value.length; i++) {
|
|
881
868
|
var serviceEventResult = (0, exports.validateFieldWithResult)('service-event', value[i]);
|
|
882
869
|
if (!serviceEventResult.isValid) {
|
|
883
|
-
return withContext(serviceEventResult,
|
|
870
|
+
return withContext(serviceEventResult, words().serviceEventInvalid(i));
|
|
884
871
|
}
|
|
885
872
|
}
|
|
886
873
|
return validResult();
|
|
@@ -889,27 +876,27 @@ var _validateField = function (type, value, field, canBeNull) {
|
|
|
889
876
|
if (!(0, exports.validateFieldWithResult)('string', value === null || value === void 0 ? void 0 : value.name).isValid ||
|
|
890
877
|
!(0, exports.validateFieldWithResult)('string', value === null || value === void 0 ? void 0 : value['rest-method']).isValid ||
|
|
891
878
|
!(0, exports.validateFieldWithResult)('string', value === null || value === void 0 ? void 0 : value.auth).isValid) {
|
|
892
|
-
return invalidResult(
|
|
879
|
+
return invalidResult(words().webhookIncomplete);
|
|
893
880
|
}
|
|
894
881
|
if (value.handler) {
|
|
895
882
|
if (value.handler.type !== 'fsm' && value.handler.type !== 'method') {
|
|
896
|
-
return invalidResult(
|
|
883
|
+
return invalidResult(words().webhookHandlerTypeInvalid);
|
|
897
884
|
}
|
|
898
885
|
var handlerResult = (0, exports.validateFieldWithResult)('string', value.handler.value);
|
|
899
886
|
if (!handlerResult.isValid) {
|
|
900
|
-
return withContext(handlerResult,
|
|
887
|
+
return withContext(handlerResult, words().webhookHandlerValueInvalid);
|
|
901
888
|
}
|
|
902
889
|
}
|
|
903
890
|
return validResult();
|
|
904
891
|
}
|
|
905
892
|
case 'service-webhooks': {
|
|
906
893
|
if (!(0, isArray_1.default)(value) || !(0, size_1.default)(value)) {
|
|
907
|
-
return invalidResult(
|
|
894
|
+
return invalidResult(words().webhookRequired);
|
|
908
895
|
}
|
|
909
896
|
for (var i = 0; i < value.length; i++) {
|
|
910
897
|
var webhookResult = (0, exports.validateFieldWithResult)('service-webhook', value[i]);
|
|
911
898
|
if (!webhookResult.isValid) {
|
|
912
|
-
return withContext(webhookResult,
|
|
899
|
+
return withContext(webhookResult, words().serviceWebhookInvalid(i));
|
|
913
900
|
}
|
|
914
901
|
}
|
|
915
902
|
return validResult();
|
|
@@ -937,7 +924,7 @@ var _validateField = function (type, value, field, canBeNull) {
|
|
|
937
924
|
parsedData = js_yaml_1.default.load(value);
|
|
938
925
|
}
|
|
939
926
|
catch (e) {
|
|
940
|
-
return invalidResult(
|
|
927
|
+
return invalidResult(words().notYaml);
|
|
941
928
|
}
|
|
942
929
|
}
|
|
943
930
|
/* A FALSY value is not an ABSENT one. `null`, `0`, `false` and `""` are
|
|
@@ -955,7 +942,7 @@ var _validateField = function (type, value, field, canBeNull) {
|
|
|
955
942
|
because that is the rule for a REQUIRED text field — a different
|
|
956
943
|
question from whether an untyped field may hold a blank string. */
|
|
957
944
|
if (parsedData === undefined) {
|
|
958
|
-
return invalidResult(
|
|
945
|
+
return invalidResult(words().valueEmpty);
|
|
959
946
|
}
|
|
960
947
|
if (parsedData === null || parsedData === '') {
|
|
961
948
|
return validResult();
|
|
@@ -967,23 +954,23 @@ var _validateField = function (type, value, field, canBeNull) {
|
|
|
967
954
|
"1" against it — "Value must be an integer", on a value that is one.
|
|
968
955
|
The author saw their field go invalid on the first character they
|
|
969
956
|
typed. */
|
|
970
|
-
return withContext((0, exports.validateFieldWithResult)((0, exports.getTypeFromValue)(parsedData), parsedData),
|
|
957
|
+
return withContext((0, exports.validateFieldWithResult)((0, exports.getTypeFromValue)(parsedData), parsedData), words().autoTypeInvalid);
|
|
971
958
|
}
|
|
972
959
|
case 'processor': {
|
|
973
960
|
if (!value || !value['processor-input-type'] || !value['processor-output-type']) {
|
|
974
|
-
return invalidResult(
|
|
961
|
+
return invalidResult(words().processorTypesRequired);
|
|
975
962
|
}
|
|
976
963
|
// Validate the input and output types
|
|
977
964
|
if (value === null || value === void 0 ? void 0 : value['processor-input-type']) {
|
|
978
965
|
var inputResult = (0, exports.validateFieldWithResult)('type-selector', value === null || value === void 0 ? void 0 : value['processor-input-type']);
|
|
979
966
|
if (!inputResult.isValid) {
|
|
980
|
-
return withContext(inputResult,
|
|
967
|
+
return withContext(inputResult, words().processorInputInvalid);
|
|
981
968
|
}
|
|
982
969
|
}
|
|
983
970
|
if (value === null || value === void 0 ? void 0 : value['processor-output-type']) {
|
|
984
971
|
var outputResult = (0, exports.validateFieldWithResult)('type-selector', value === null || value === void 0 ? void 0 : value['processor-output-type']);
|
|
985
972
|
if (!outputResult.isValid) {
|
|
986
|
-
return withContext(outputResult,
|
|
973
|
+
return withContext(outputResult, words().processorOutputInvalid);
|
|
987
974
|
}
|
|
988
975
|
}
|
|
989
976
|
return validResult();
|
|
@@ -993,23 +980,23 @@ var _validateField = function (type, value, field, canBeNull) {
|
|
|
993
980
|
// Each mapping must have an outputPath (the target field being mapped)
|
|
994
981
|
// and either an inputPath (source field) or options configured
|
|
995
982
|
if (!(0, isArray_1.default)(value)) {
|
|
996
|
-
return canBeNull ? validResult() : invalidResult(
|
|
983
|
+
return canBeNull ? validResult() : invalidResult(words().processorMappingsNotList);
|
|
997
984
|
}
|
|
998
985
|
for (var i = 0; i < value.length; i++) {
|
|
999
986
|
var mapping = value[i];
|
|
1000
987
|
if (!mapping || !(0, isPlainObject_1.default)(mapping)) {
|
|
1001
|
-
return invalidResult(
|
|
988
|
+
return invalidResult(words().mappingInvalidAt(i));
|
|
1002
989
|
}
|
|
1003
990
|
// outputPath is always required - it identifies which output field is being mapped
|
|
1004
991
|
var outputPathResult = (0, exports.validateFieldWithResult)('string', mapping.outputPath);
|
|
1005
992
|
if (!outputPathResult.isValid) {
|
|
1006
|
-
return withContext(outputPathResult,
|
|
993
|
+
return withContext(outputPathResult, words().mappingOutputPathInvalid(i));
|
|
1007
994
|
}
|
|
1008
995
|
// A mapping must have either an inputPath or options (or both)
|
|
1009
996
|
var hasInputPath = mapping.inputPath && mapping.inputPath !== '';
|
|
1010
997
|
var hasOptions = mapping.options && (0, size_1.default)(mapping.options) > 0;
|
|
1011
998
|
if (!hasInputPath && !hasOptions) {
|
|
1012
|
-
return invalidResult(
|
|
999
|
+
return invalidResult(words().mappingNeedsInput(String(mapping.outputPath)));
|
|
1013
1000
|
}
|
|
1014
1001
|
}
|
|
1015
1002
|
return validResult();
|
|
@@ -1022,12 +1009,12 @@ var _validateField = function (type, value, field, canBeNull) {
|
|
|
1022
1009
|
// "<connection>" — all tools from a connection
|
|
1023
1010
|
// "<connection>/<tool>" — a specific tool from a connection
|
|
1024
1011
|
if (!(0, isArray_1.default)(value)) {
|
|
1025
|
-
return canBeNull ? validResult() : invalidResult(
|
|
1012
|
+
return canBeNull ? validResult() : invalidResult(words().toolCatalogNotList);
|
|
1026
1013
|
}
|
|
1027
1014
|
for (var i = 0; i < value.length; i++) {
|
|
1028
1015
|
var selector = value[i];
|
|
1029
1016
|
if (typeof selector !== 'string' || selector.length === 0) {
|
|
1030
|
-
return invalidResult(
|
|
1017
|
+
return invalidResult(words().toolSelectorAt(i));
|
|
1031
1018
|
}
|
|
1032
1019
|
}
|
|
1033
1020
|
return validResult();
|
|
@@ -1035,67 +1022,67 @@ var _validateField = function (type, value, field, canBeNull) {
|
|
|
1035
1022
|
case 'fsm-list': {
|
|
1036
1023
|
// users call FSMs Qogs: this is said to them
|
|
1037
1024
|
if (!(0, isArray_1.default)(value)) {
|
|
1038
|
-
return invalidResult(
|
|
1025
|
+
return invalidResult(words().qogListNotArray);
|
|
1039
1026
|
}
|
|
1040
1027
|
for (var i = 0; i < value.length; i++) {
|
|
1041
1028
|
var itemResult = (0, exports.validateFieldWithResult)('string', (_f = value[i]) === null || _f === void 0 ? void 0 : _f.name);
|
|
1042
1029
|
if (!itemResult.isValid) {
|
|
1043
|
-
return withContext(itemResult,
|
|
1030
|
+
return withContext(itemResult, words().qogEntryNameInvalid(i));
|
|
1044
1031
|
}
|
|
1045
1032
|
}
|
|
1046
1033
|
return validResult();
|
|
1047
1034
|
}
|
|
1048
1035
|
case 'api-manager': {
|
|
1049
1036
|
if (!value) {
|
|
1050
|
-
return invalidResult(
|
|
1037
|
+
return invalidResult(words().apiManagerMissing);
|
|
1051
1038
|
}
|
|
1052
1039
|
var factoryResult = (0, exports.validateFieldWithResult)('string', value.factory);
|
|
1053
1040
|
if (!factoryResult.isValid) {
|
|
1054
|
-
return withContext(factoryResult,
|
|
1041
|
+
return withContext(factoryResult, words().apiManagerFactoryInvalid);
|
|
1055
1042
|
}
|
|
1056
1043
|
var endpointsResult = (0, exports.validateFieldWithResult)('api-endpoints', value.endpoints);
|
|
1057
1044
|
if (!endpointsResult.isValid) {
|
|
1058
|
-
return withContext(endpointsResult,
|
|
1045
|
+
return withContext(endpointsResult, words().apiManagerEndpointsInvalid);
|
|
1059
1046
|
}
|
|
1060
1047
|
return validResult();
|
|
1061
1048
|
}
|
|
1062
1049
|
case 'api-endpoints': {
|
|
1063
1050
|
if (!(0, isArray_1.default)(value) || !(0, size_1.default)(value)) {
|
|
1064
|
-
return invalidResult(
|
|
1051
|
+
return invalidResult(words().apiEndpointRequired);
|
|
1065
1052
|
}
|
|
1066
1053
|
for (var i = 0; i < value.length; i++) {
|
|
1067
1054
|
var endpointResult = (0, exports.validateFieldWithResult)('string', (_g = value[i]) === null || _g === void 0 ? void 0 : _g.value);
|
|
1068
1055
|
if (!endpointResult.isValid) {
|
|
1069
|
-
return withContext(endpointResult,
|
|
1056
|
+
return withContext(endpointResult, words().endpointValueInvalid(i));
|
|
1070
1057
|
}
|
|
1071
1058
|
var authorizationResult = (0, exports.validateFieldWithResult)('api-endpoint-authorization', (_h = value[i]) === null || _h === void 0 ? void 0 : _h.authorization, undefined, true);
|
|
1072
1059
|
if (!authorizationResult.isValid) {
|
|
1073
|
-
return withContext(authorizationResult,
|
|
1060
|
+
return withContext(authorizationResult, words().endpointAuthorizationInvalid(i));
|
|
1074
1061
|
}
|
|
1075
1062
|
}
|
|
1076
1063
|
return validResult();
|
|
1077
1064
|
}
|
|
1078
1065
|
case 'api-endpoint-authorization': {
|
|
1079
1066
|
if (!value) {
|
|
1080
|
-
return canBeNull ? validResult() : invalidResult(
|
|
1067
|
+
return canBeNull ? validResult() : invalidResult(words().authorizationMissing);
|
|
1081
1068
|
}
|
|
1082
1069
|
if (typeof value !== 'object' || (0, isArray_1.default)(value)) {
|
|
1083
|
-
return invalidResult(
|
|
1070
|
+
return invalidResult(words().authorizationNotObject);
|
|
1084
1071
|
}
|
|
1085
1072
|
if (value.mode !== undefined && !['merge', 'replace'].includes(value.mode)) {
|
|
1086
|
-
return invalidResult(
|
|
1073
|
+
return invalidResult(words().authorizationMode);
|
|
1087
1074
|
}
|
|
1088
1075
|
if (value.allow_anonymous !== undefined && typeof value.allow_anonymous !== 'boolean') {
|
|
1089
|
-
return invalidResult(
|
|
1076
|
+
return invalidResult(words().authorizationAllowAnonymous);
|
|
1090
1077
|
}
|
|
1091
1078
|
if (value.roles !== undefined) {
|
|
1092
1079
|
if (!(0, isArray_1.default)(value.roles)) {
|
|
1093
|
-
return invalidResult(
|
|
1080
|
+
return invalidResult(words().authorizationRolesNotList);
|
|
1094
1081
|
}
|
|
1095
1082
|
for (var i = 0; i < value.roles.length; i++) {
|
|
1096
1083
|
var roleResult = (0, exports.validateFieldWithResult)('string', value.roles[i]);
|
|
1097
1084
|
if (!roleResult.isValid) {
|
|
1098
|
-
return withContext(roleResult,
|
|
1085
|
+
return withContext(roleResult, words().authorizationRoleInvalid(i));
|
|
1099
1086
|
}
|
|
1100
1087
|
}
|
|
1101
1088
|
}
|
|
@@ -1110,7 +1097,7 @@ var _validateField = function (type, value, field, canBeNull) {
|
|
|
1110
1097
|
if (optionSchema === void 0) { optionSchema = {}; }
|
|
1111
1098
|
if (!options || (0, size_1.default)(options) === 0) {
|
|
1112
1099
|
if (!canBeNull) {
|
|
1113
|
-
return invalidResult(
|
|
1100
|
+
return invalidResult(words().optionsRequired);
|
|
1114
1101
|
}
|
|
1115
1102
|
return validResult();
|
|
1116
1103
|
}
|
|
@@ -1118,7 +1105,7 @@ var _validateField = function (type, value, field, canBeNull) {
|
|
|
1118
1105
|
var unresolvedRequiredOption = (0, exports.getUnresolvedRequiredOptions)(optionSchema, options)[0];
|
|
1119
1106
|
if (unresolvedRequiredOption) {
|
|
1120
1107
|
return unresolvedRequiredOption.validation
|
|
1121
|
-
? withContext(unresolvedRequiredOption.validation,
|
|
1108
|
+
? withContext(unresolvedRequiredOption.validation, words().optionInvalid(unresolvedRequiredOption.name))
|
|
1122
1109
|
: invalidResult((0, exports.getUnresolvedRequiredOptionReason)(unresolvedRequiredOption, optionSchema));
|
|
1123
1110
|
}
|
|
1124
1111
|
for (var _i = 0, _e = Object.keys(options); _i < _e.length; _i++) {
|
|
@@ -1156,7 +1143,7 @@ var _validateField = function (type, value, field, canBeNull) {
|
|
|
1156
1143
|
? (0, exports.validateFieldWithResult)((0, exports.getTypeFromValue)(optionData), optionData)
|
|
1157
1144
|
: (0, exports.validateFieldWithResult)(optionData.type, optionData.value, __assign(__assign({}, optionSchema === null || optionSchema === void 0 ? void 0 : optionSchema[option]), { optionSchema: optionSchema, options: options, isFunction: optionData.is_expression }));
|
|
1158
1145
|
if (!optionResult.isValid) {
|
|
1159
|
-
return withContext(optionResult,
|
|
1146
|
+
return withContext(optionResult, words().optionInvalid(option));
|
|
1160
1147
|
}
|
|
1161
1148
|
}
|
|
1162
1149
|
return validResult();
|
|
@@ -1165,7 +1152,7 @@ var _validateField = function (type, value, field, canBeNull) {
|
|
|
1165
1152
|
for (var i = 0; i < value.length; i++) {
|
|
1166
1153
|
var optionResult = getIsValid(value[i], field === null || field === void 0 ? void 0 : field.optionSchema);
|
|
1167
1154
|
if (!optionResult.isValid) {
|
|
1168
|
-
return withContext(optionResult,
|
|
1155
|
+
return withContext(optionResult, words().optionSetInvalid(i));
|
|
1169
1156
|
}
|
|
1170
1157
|
}
|
|
1171
1158
|
return validResult();
|
|
@@ -1178,7 +1165,7 @@ var _validateField = function (type, value, field, canBeNull) {
|
|
|
1178
1165
|
if (canBeNull) {
|
|
1179
1166
|
return validResult();
|
|
1180
1167
|
}
|
|
1181
|
-
return invalidResult(
|
|
1168
|
+
return invalidResult(words().optionsWithOperatorsRequired);
|
|
1182
1169
|
}
|
|
1183
1170
|
for (var _i = 0, _a = Object.keys(val); _i < _a.length; _i++) {
|
|
1184
1171
|
var option = _a[_i];
|
|
@@ -1187,11 +1174,11 @@ var _validateField = function (type, value, field, canBeNull) {
|
|
|
1187
1174
|
? (0, exports.validateFieldWithResult)((0, exports.getTypeFromValue)(optionData), optionData)
|
|
1188
1175
|
: (0, exports.validateFieldWithResult)(optionData.type, optionData.value);
|
|
1189
1176
|
if (!optionResult.isValid) {
|
|
1190
|
-
return withContext(optionResult,
|
|
1177
|
+
return withContext(optionResult, words().optionInvalid(option));
|
|
1191
1178
|
}
|
|
1192
1179
|
if (!optionData.op ||
|
|
1193
1180
|
!(0, common_1.fixOperatorValue)(optionData.op).every(function (operator) { return (0, exports.validateFieldWithResult)('string', operator).isValid; })) {
|
|
1194
|
-
return invalidResult(
|
|
1181
|
+
return invalidResult(words().operatorsInvalid(option));
|
|
1195
1182
|
}
|
|
1196
1183
|
}
|
|
1197
1184
|
return validResult();
|
|
@@ -1200,7 +1187,7 @@ var _validateField = function (type, value, field, canBeNull) {
|
|
|
1200
1187
|
for (var i = 0; i < value.length; i++) {
|
|
1201
1188
|
var optionResult = isValid(value[i]);
|
|
1202
1189
|
if (!optionResult.isValid) {
|
|
1203
|
-
return withContext(optionResult,
|
|
1190
|
+
return withContext(optionResult, words().optionSetInvalid(i));
|
|
1204
1191
|
}
|
|
1205
1192
|
}
|
|
1206
1193
|
return validResult();
|
|
@@ -1209,15 +1196,15 @@ var _validateField = function (type, value, field, canBeNull) {
|
|
|
1209
1196
|
}
|
|
1210
1197
|
case 'byte-size': {
|
|
1211
1198
|
if (typeof value !== 'string')
|
|
1212
|
-
return invalidResult(
|
|
1199
|
+
return invalidResult(words().byteSizeNotText);
|
|
1213
1200
|
var _t = (0, common_1.splitByteSize)(value), bytes = _t[0], sizeUnit = _t[1];
|
|
1214
1201
|
var bytesResult = (0, exports.validateFieldWithResult)('number', bytes);
|
|
1215
1202
|
if (!bytesResult.isValid) {
|
|
1216
|
-
return withContext(bytesResult,
|
|
1203
|
+
return withContext(bytesResult, words().byteSizeNumberInvalid);
|
|
1217
1204
|
}
|
|
1218
1205
|
var sizeResult = (0, exports.validateFieldWithResult)('string', sizeUnit);
|
|
1219
1206
|
if (!sizeResult.isValid) {
|
|
1220
|
-
return withContext(sizeResult,
|
|
1207
|
+
return withContext(sizeResult, words().byteSizeUnitInvalid);
|
|
1221
1208
|
}
|
|
1222
1209
|
return validResult();
|
|
1223
1210
|
}
|
|
@@ -1226,7 +1213,7 @@ var _validateField = function (type, value, field, canBeNull) {
|
|
|
1226
1213
|
// so the stored value validates as an int.
|
|
1227
1214
|
var msResult = (0, exports.validateFieldWithResult)('int', value);
|
|
1228
1215
|
if (!msResult.isValid) {
|
|
1229
|
-
return withContext(msResult,
|
|
1216
|
+
return withContext(msResult, words().timeoutMilliseconds);
|
|
1230
1217
|
}
|
|
1231
1218
|
return validResult();
|
|
1232
1219
|
}
|
|
@@ -1234,11 +1221,11 @@ var _validateField = function (type, value, field, canBeNull) {
|
|
|
1234
1221
|
case 'uri': {
|
|
1235
1222
|
var protocolResult = (0, exports.validateFieldWithResult)('string', (0, common_1.getProtocol)(value));
|
|
1236
1223
|
if (!protocolResult.isValid) {
|
|
1237
|
-
return withContext(protocolResult,
|
|
1224
|
+
return withContext(protocolResult, words().urlProtocolInvalid);
|
|
1238
1225
|
}
|
|
1239
1226
|
var addressResult = (0, exports.validateFieldWithResult)('string', (0, common_1.getAddress)(value));
|
|
1240
1227
|
if (!addressResult.isValid) {
|
|
1241
|
-
return withContext(addressResult,
|
|
1228
|
+
return withContext(addressResult, words().urlAddressInvalid);
|
|
1242
1229
|
}
|
|
1243
1230
|
return validResult();
|
|
1244
1231
|
}
|
|
@@ -1246,10 +1233,10 @@ var _validateField = function (type, value, field, canBeNull) {
|
|
|
1246
1233
|
// The minimal NEW_FIELD.md shape check, so malformed definitions can't
|
|
1247
1234
|
// silently save through FormEngine.
|
|
1248
1235
|
if (!(0, isPlainObject_1.default)(value)) {
|
|
1249
|
-
return invalidResult(
|
|
1236
|
+
return invalidResult(words().schemaDefinitionNotObject);
|
|
1250
1237
|
}
|
|
1251
1238
|
if (!(0, isPlainObject_1.default)(value.schema)) {
|
|
1252
|
-
return invalidResult(
|
|
1239
|
+
return invalidResult(words().schemaDefinitionNoSchema);
|
|
1253
1240
|
}
|
|
1254
1241
|
return validResult();
|
|
1255
1242
|
}
|
|
@@ -1271,10 +1258,10 @@ var _validateField = function (type, value, field, canBeNull) {
|
|
|
1271
1258
|
// the field's own "show invalid only" filter listed a different set of
|
|
1272
1259
|
// rows on a fast machine than on a slow one.
|
|
1273
1260
|
if (!castedValue_1) {
|
|
1274
|
-
return invalidResult(
|
|
1261
|
+
return invalidResult(words().expressionEmpty);
|
|
1275
1262
|
}
|
|
1276
1263
|
if (!((_j = castedValue_1.value) === null || _j === void 0 ? void 0 : _j.exp)) {
|
|
1277
|
-
return invalidResult(
|
|
1264
|
+
return invalidResult((0, reqraftLabels_1.reqraftLabels)().expressions.noOperationYet(false));
|
|
1278
1265
|
}
|
|
1279
1266
|
// Everything past this point needs the expression's definition, which
|
|
1280
1267
|
// only the catalogue can supply. Until it loads there is nothing to check
|
|
@@ -1286,7 +1273,7 @@ var _validateField = function (type, value, field, canBeNull) {
|
|
|
1286
1273
|
// Get the expression definition from the catalogue - a lone template's as the lone value it is (`asLoneValue`)
|
|
1287
1274
|
var expressionDefinition_1 = expressions.find(function (expr) { var _a; return expr.name === ((_a = (0, loneValue_1.asLoneValue)(castedValue_1.value)) === null || _a === void 0 ? void 0 : _a.exp); });
|
|
1288
1275
|
if (!expressionDefinition_1) {
|
|
1289
|
-
return invalidResult(
|
|
1276
|
+
return invalidResult(words().noSuchOperation(String((_k = castedValue_1.value) === null || _k === void 0 ? void 0 : _k.exp)));
|
|
1290
1277
|
}
|
|
1291
1278
|
// If the expression has no required args, we can consider it valid
|
|
1292
1279
|
var hasRequiredArgs = (_l = expressionDefinition_1.args) === null || _l === void 0 ? void 0 : _l.some(function (arg) { return arg.required; });
|
|
@@ -1296,7 +1283,7 @@ var _validateField = function (type, value, field, canBeNull) {
|
|
|
1296
1283
|
// If there are no args provided but the expression requires some (normal expressions require at least 1 arg
|
|
1297
1284
|
// because we checked for required args earlier), or min_args is set
|
|
1298
1285
|
if ((0, size_1.default)(((_o = castedValue_1.value) === null || _o === void 0 ? void 0 : _o.args) || []) < (expressionDefinition_1.min_args || 1)) {
|
|
1299
|
-
return invalidResult(
|
|
1286
|
+
return invalidResult(words().notEnoughArguments);
|
|
1300
1287
|
}
|
|
1301
1288
|
// Now we need to validate each argument, either as a normal value or as a sub-expression
|
|
1302
1289
|
var args = (_q = (_p = castedValue_1.value) === null || _p === void 0 ? void 0 : _p.args) !== null && _q !== void 0 ? _q : [];
|
|
@@ -1306,7 +1293,7 @@ var _validateField = function (type, value, field, canBeNull) {
|
|
|
1306
1293
|
var definition = expressionDefinition_1.varargs
|
|
1307
1294
|
? expressionDefinition_1.args[0]
|
|
1308
1295
|
: expressionDefinition_1.args[index];
|
|
1309
|
-
return (_b = (_a = definition === null || definition === void 0 ? void 0 : definition.display_name) !== null && _a !== void 0 ? _a : definition === null || definition === void 0 ? void 0 : definition.name) !== null && _b !== void 0 ? _b :
|
|
1296
|
+
return (_b = (_a = definition === null || definition === void 0 ? void 0 : definition.display_name) !== null && _a !== void 0 ? _a : definition === null || definition === void 0 ? void 0 : definition.name) !== null && _b !== void 0 ? _b : words().unnamedOperand(index + 1);
|
|
1310
1297
|
});
|
|
1311
1298
|
var _loop_1 = function (index) {
|
|
1312
1299
|
var argValue = args[index];
|
|
@@ -1322,10 +1309,11 @@ var _validateField = function (type, value, field, canBeNull) {
|
|
|
1322
1309
|
/* Which operand, where its name alone does not say: every operand of a call taking any number of
|
|
1323
1310
|
them is "Value" (qlip build 20261008-083118: "which "value" is the message mentioning"). Said by
|
|
1324
1311
|
its position too, as the editor shows them, left to right - and so is a lone operand of a call that
|
|
1325
|
-
can take more (David, qorus#646), as the operands that join it will be.
|
|
1326
|
-
|
|
1312
|
+
can take more (David, qorus#646), as the operands that join it will be. The words say the position
|
|
1313
|
+
their own way ("the 2nd"); it is given only where it is said. */
|
|
1314
|
+
var position = expressionDefinition_1.varargs ||
|
|
1327
1315
|
argLabels.some(function (label, other) { return other !== index && label === argLabel; })
|
|
1328
|
-
?
|
|
1316
|
+
? index + 1
|
|
1329
1317
|
: undefined;
|
|
1330
1318
|
/* An explicit null is a VALUE, and DPQL says so: `null` is a literal
|
|
1331
1319
|
that parses, serializes and round-trips like any other.
|
|
@@ -1353,7 +1341,7 @@ var _validateField = function (type, value, field, canBeNull) {
|
|
|
1353
1341
|
has_to_have_value: argDefinition === null || argDefinition === void 0 ? void 0 : argDefinition.required,
|
|
1354
1342
|
});
|
|
1355
1343
|
if (!result_1.isValid) {
|
|
1356
|
-
return { value: withContext(result_1,
|
|
1344
|
+
return { value: withContext(result_1, words().operandExpressionHasError(argLabel, position)) };
|
|
1357
1345
|
}
|
|
1358
1346
|
return "continue";
|
|
1359
1347
|
}
|
|
@@ -1376,9 +1364,9 @@ var _validateField = function (type, value, field, canBeNull) {
|
|
|
1376
1364
|
// an operand not filled in yet says what to do; one that is wrong says which and why (David's
|
|
1377
1365
|
// review of qorus#646: "Value for argument 1 ("Value") is invalid: Missing value" while building)
|
|
1378
1366
|
if ((argValue === null || argValue === void 0 ? void 0 : argValue.value) === undefined || (argValue === null || argValue === void 0 ? void 0 : argValue.value) === null || (argValue === null || argValue === void 0 ? void 0 : argValue.value) === '') {
|
|
1379
|
-
return { value: invalidResult(
|
|
1367
|
+
return { value: invalidResult(words().enterOperand(argLabel, position)) };
|
|
1380
1368
|
}
|
|
1381
|
-
return { value: withContext(result,
|
|
1369
|
+
return { value: withContext(result, words().operandInvalid(argLabel, position)) };
|
|
1382
1370
|
}
|
|
1383
1371
|
};
|
|
1384
1372
|
for (var index = 0; index < args.length; index++) {
|
|
@@ -1389,7 +1377,7 @@ var _validateField = function (type, value, field, canBeNull) {
|
|
|
1389
1377
|
return validResult();
|
|
1390
1378
|
}
|
|
1391
1379
|
case 'nothing':
|
|
1392
|
-
return invalidResult(
|
|
1380
|
+
return invalidResult(words().nothingNotValid);
|
|
1393
1381
|
default:
|
|
1394
1382
|
return validResult();
|
|
1395
1383
|
}
|
|
@@ -1419,6 +1407,9 @@ exports.readArgValue = readArgValue;
|
|
|
1419
1407
|
exports.validateFieldWithResult = (0, lodash_1.memoize)(exports._validateField, function (type, value, field, canBeNull) {
|
|
1420
1408
|
return "".concat(type, "-").concat(JSON.stringify(value), "-").concat(JSON.stringify(field), "-").concat(canBeNull);
|
|
1421
1409
|
});
|
|
1410
|
+
/* A reason kept is worded as it was when it was first asked for: when the host gives other words, the kept reasons
|
|
1411
|
+
are dropped, and the next asking words them again. */
|
|
1412
|
+
(0, reqraftLabels_1.onReqraftLabelsChange)(function () { var _a, _b; return (_b = (_a = exports.validateFieldWithResult.cache).clear) === null || _b === void 0 ? void 0 : _b.call(_a); });
|
|
1422
1413
|
var validateField = function (type, value, field, canBeNull) {
|
|
1423
1414
|
return (0, exports.validateFieldWithResult)(type, value, field, canBeNull).isValid;
|
|
1424
1415
|
};
|
|
@@ -1526,13 +1517,13 @@ var getUnresolvedRequiredOptionReason = function (_a, optionSchema) {
|
|
|
1526
1517
|
var name = _a.name, reason = _a.reason;
|
|
1527
1518
|
switch (reason) {
|
|
1528
1519
|
case 'dependency':
|
|
1529
|
-
return
|
|
1520
|
+
return words().optionDependenciesNotFulfilled(name);
|
|
1530
1521
|
case 'invalid':
|
|
1531
|
-
return
|
|
1522
|
+
return words().optionInvalid(name);
|
|
1532
1523
|
default:
|
|
1533
1524
|
return ((_b = optionSchema === null || optionSchema === void 0 ? void 0 : optionSchema[name]) === null || _b === void 0 ? void 0 : _b.required)
|
|
1534
|
-
?
|
|
1535
|
-
:
|
|
1525
|
+
? words().optionRequired(name)
|
|
1526
|
+
: words().optionRequiresValue(name);
|
|
1536
1527
|
}
|
|
1537
1528
|
};
|
|
1538
1529
|
exports.getUnresolvedRequiredOptionReason = getUnresolvedRequiredOptionReason;
|