@atlaskit/jql-editor 4.0.0
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/CHANGELOG.md +1048 -0
- package/LICENSE.md +13 -0
- package/README.md +3 -0
- package/dist/cjs/accessibility/index.js +12 -0
- package/dist/cjs/accessibility/styled.js +12 -0
- package/dist/cjs/analytics/constants.js +27 -0
- package/dist/cjs/analytics/index.js +57 -0
- package/dist/cjs/analytics/listener/analytics-web-client-wrapper.js +77 -0
- package/dist/cjs/analytics/listener/handle-event.js +21 -0
- package/dist/cjs/analytics/listener/helpers/logger.js +89 -0
- package/dist/cjs/analytics/listener/index.js +13 -0
- package/dist/cjs/analytics/listener/jql-editor-analytics-listener.js +52 -0
- package/dist/cjs/analytics/listener/process-event-payload.js +44 -0
- package/dist/cjs/analytics/listener/types.js +5 -0
- package/dist/cjs/analytics/types.js +5 -0
- package/dist/cjs/analytics/util.js +10 -0
- package/dist/cjs/async.js +34 -0
- package/dist/cjs/commands/select-error-command/index.js +30 -0
- package/dist/cjs/common/constants.js +11 -0
- package/dist/cjs/common/messages.js +14 -0
- package/dist/cjs/common/styled.js +15 -0
- package/dist/cjs/hooks/use-editor-theme/index.js +53 -0
- package/dist/cjs/hooks/use-editor-view-has-infos/index.js +16 -0
- package/dist/cjs/hooks/use-editor-view-has-warnings/index.js +19 -0
- package/dist/cjs/hooks/use-editor-view-is-invalid/index.js +52 -0
- package/dist/cjs/i18n/cs.js +68 -0
- package/dist/cjs/i18n/da.js +68 -0
- package/dist/cjs/i18n/de.js +68 -0
- package/dist/cjs/i18n/en.js +68 -0
- package/dist/cjs/i18n/en_GB.js +68 -0
- package/dist/cjs/i18n/en_ZZ.js +68 -0
- package/dist/cjs/i18n/es.js +68 -0
- package/dist/cjs/i18n/et.js +14 -0
- package/dist/cjs/i18n/fi.js +68 -0
- package/dist/cjs/i18n/fr.js +68 -0
- package/dist/cjs/i18n/hu.js +68 -0
- package/dist/cjs/i18n/index.js +132 -0
- package/dist/cjs/i18n/it.js +68 -0
- package/dist/cjs/i18n/ja.js +68 -0
- package/dist/cjs/i18n/ko.js +68 -0
- package/dist/cjs/i18n/nb.js +68 -0
- package/dist/cjs/i18n/nl.js +68 -0
- package/dist/cjs/i18n/pl.js +68 -0
- package/dist/cjs/i18n/pt_BR.js +68 -0
- package/dist/cjs/i18n/pt_PT.js +14 -0
- package/dist/cjs/i18n/ru.js +68 -0
- package/dist/cjs/i18n/sk.js +14 -0
- package/dist/cjs/i18n/sv.js +68 -0
- package/dist/cjs/i18n/th.js +68 -0
- package/dist/cjs/i18n/tr.js +68 -0
- package/dist/cjs/i18n/uk.js +68 -0
- package/dist/cjs/i18n/vi.js +68 -0
- package/dist/cjs/i18n/zh.js +68 -0
- package/dist/cjs/i18n/zh_TW.js +68 -0
- package/dist/cjs/index.js +52 -0
- package/dist/cjs/plugins/autocomplete/components/autocomplete/index.js +48 -0
- package/dist/cjs/plugins/autocomplete/components/autocomplete-dropdown/index.js +278 -0
- package/dist/cjs/plugins/autocomplete/components/autocomplete-dropdown/styled.js +22 -0
- package/dist/cjs/plugins/autocomplete/components/autocomplete-option/glyphs.js +104 -0
- package/dist/cjs/plugins/autocomplete/components/autocomplete-option/index.js +175 -0
- package/dist/cjs/plugins/autocomplete/components/autocomplete-option/messages.js +19 -0
- package/dist/cjs/plugins/autocomplete/components/autocomplete-option/styled.js +26 -0
- package/dist/cjs/plugins/autocomplete/components/types.js +5 -0
- package/dist/cjs/plugins/autocomplete/constants.js +35 -0
- package/dist/cjs/plugins/autocomplete/index.js +37 -0
- package/dist/cjs/plugins/autocomplete/messages.js +14 -0
- package/dist/cjs/plugins/autocomplete/types.js +5 -0
- package/dist/cjs/plugins/autocomplete/view.js +125 -0
- package/dist/cjs/plugins/common/get-document-position/index.js +99 -0
- package/dist/cjs/plugins/common/plugin-keymap.js +50 -0
- package/dist/cjs/plugins/common/react-plugin-view.js +93 -0
- package/dist/cjs/plugins/index.js +41 -0
- package/dist/cjs/plugins/jql-ast/JQLEditorErrorStrategy.js +218 -0
- package/dist/cjs/plugins/jql-ast/constants.js +15 -0
- package/dist/cjs/plugins/jql-ast/error-handlers/CustomFieldRuleErrorHandler.js +13 -0
- package/dist/cjs/plugins/jql-ast/error-handlers/ExpectedTokensErrorHandler.js +62 -0
- package/dist/cjs/plugins/jql-ast/error-handlers/FieldPropertyIdErrorHandler.js +17 -0
- package/dist/cjs/plugins/jql-ast/error-handlers/FieldRuleErrorHandler.js +20 -0
- package/dist/cjs/plugins/jql-ast/error-handlers/FunctionArgumentRuleErrorHandler.js +17 -0
- package/dist/cjs/plugins/jql-ast/error-handlers/OperandRuleErrorHandler.js +66 -0
- package/dist/cjs/plugins/jql-ast/error-handlers/OperatorRuleErrorHandler.js +18 -0
- package/dist/cjs/plugins/jql-ast/index.js +46 -0
- package/dist/cjs/plugins/jql-ast/messages.js +179 -0
- package/dist/cjs/plugins/jql-ast/utils.js +23 -0
- package/dist/cjs/plugins/jql-syntax-highlighting/index.js +69 -0
- package/dist/cjs/plugins/jql-syntax-highlighting/types.js +5 -0
- package/dist/cjs/plugins/jql-syntax-highlighting/visitor.js +89 -0
- package/dist/cjs/plugins/rich-inline-nodes/constants.js +9 -0
- package/dist/cjs/plugins/rich-inline-nodes/index.js +63 -0
- package/dist/cjs/plugins/rich-inline-nodes/nodes/index.js +10 -0
- package/dist/cjs/plugins/rich-inline-nodes/nodes/types.js +5 -0
- package/dist/cjs/plugins/rich-inline-nodes/nodes/user/index.js +41 -0
- package/dist/cjs/plugins/rich-inline-nodes/nodes/user/styled.js +35 -0
- package/dist/cjs/plugins/rich-inline-nodes/types.js +5 -0
- package/dist/cjs/plugins/rich-inline-nodes/util/create-node-spec.js +37 -0
- package/dist/cjs/plugins/rich-inline-nodes/util/react-node-view.js +129 -0
- package/dist/cjs/plugins/rich-inline-nodes/util/replace-nodes-transaction.js +138 -0
- package/dist/cjs/plugins/types.js +5 -0
- package/dist/cjs/plugins/validation-tooltip/constants.js +11 -0
- package/dist/cjs/plugins/validation-tooltip/index.js +58 -0
- package/dist/cjs/plugins/validation-tooltip/view.js +74 -0
- package/dist/cjs/schema/index.js +137 -0
- package/dist/cjs/state/analytics/index.js +56 -0
- package/dist/cjs/state/autocomplete/index.js +23 -0
- package/dist/cjs/state/hydration/index.js +92 -0
- package/dist/cjs/state/hydration/util.js +89 -0
- package/dist/cjs/state/index.js +997 -0
- package/dist/cjs/state/types.js +5 -0
- package/dist/cjs/state/util.js +176 -0
- package/dist/cjs/types.js +5 -0
- package/dist/cjs/ui/error-boundary/index.js +81 -0
- package/dist/cjs/ui/index.js +11 -0
- package/dist/cjs/ui/intl-provider/index.js +23 -0
- package/dist/cjs/ui/jql-editor/index.js +75 -0
- package/dist/cjs/ui/jql-editor/types.js +5 -0
- package/dist/cjs/ui/jql-editor-controls-content/base-expand-toggle/index.js +55 -0
- package/dist/cjs/ui/jql-editor-controls-content/base-expand-toggle/styled.js +12 -0
- package/dist/cjs/ui/jql-editor-controls-content/base-search/index.js +44 -0
- package/dist/cjs/ui/jql-editor-controls-content/base-syntax-help/index.js +33 -0
- package/dist/cjs/ui/jql-editor-controls-content/base-syntax-help/styled.js +12 -0
- package/dist/cjs/ui/jql-editor-controls-content/expand-toggle/index.js +67 -0
- package/dist/cjs/ui/jql-editor-controls-content/expand-toggle/messages.js +24 -0
- package/dist/cjs/ui/jql-editor-controls-content/index.js +17 -0
- package/dist/cjs/ui/jql-editor-controls-content/read-only-controls-content/index.js +38 -0
- package/dist/cjs/ui/jql-editor-controls-content/search/index.js +40 -0
- package/dist/cjs/ui/jql-editor-controls-content/search/messages.js +14 -0
- package/dist/cjs/ui/jql-editor-controls-content/syntax-help/index.js +62 -0
- package/dist/cjs/ui/jql-editor-controls-content/syntax-help/messages.js +19 -0
- package/dist/cjs/ui/jql-editor-footer-content/index.js +34 -0
- package/dist/cjs/ui/jql-editor-footer-content/jql-editor-help/index.js +42 -0
- package/dist/cjs/ui/jql-editor-footer-content/jql-editor-help/messages.js +24 -0
- package/dist/cjs/ui/jql-editor-footer-content/jql-editor-help/styled.js +15 -0
- package/dist/cjs/ui/jql-editor-footer-content/jql-messages/errors/index.js +70 -0
- package/dist/cjs/ui/jql-editor-footer-content/jql-messages/errors/messages.js +14 -0
- package/dist/cjs/ui/jql-editor-footer-content/jql-messages/format/index.js +34 -0
- package/dist/cjs/ui/jql-editor-footer-content/jql-messages/format/styled.js +14 -0
- package/dist/cjs/ui/jql-editor-footer-content/jql-messages/index.js +26 -0
- package/dist/cjs/ui/jql-editor-footer-content/jql-messages/infos/index.js +41 -0
- package/dist/cjs/ui/jql-editor-footer-content/jql-messages/warnings/index.js +110 -0
- package/dist/cjs/ui/jql-editor-footer-content/jql-messages/warnings/messages.js +24 -0
- package/dist/cjs/ui/jql-editor-layout/index.js +104 -0
- package/dist/cjs/ui/jql-editor-layout/styled.js +61 -0
- package/dist/cjs/ui/jql-editor-portal-provider/context.js +17 -0
- package/dist/cjs/ui/jql-editor-portal-provider/index.js +116 -0
- package/dist/cjs/ui/jql-editor-portal-provider/types.js +5 -0
- package/dist/cjs/ui/jql-editor-view/index.js +198 -0
- package/dist/cjs/ui/messages.js +14 -0
- package/dist/cjs/ui/tooltip-tag/index.js +19 -0
- package/dist/cjs/ui/tooltip-tag/styled.js +11 -0
- package/dist/cjs/ui/types.js +5 -0
- package/dist/cjs/utils/document-text/index.js +43 -0
- package/dist/cjs/utils/split-text-by-new-line/index.js +12 -0
- package/dist/es2019/accessibility/index.js +1 -0
- package/dist/es2019/accessibility/styled.js +5 -0
- package/dist/es2019/analytics/constants.js +21 -0
- package/dist/es2019/analytics/index.js +5 -0
- package/dist/es2019/analytics/listener/analytics-web-client-wrapper.js +57 -0
- package/dist/es2019/analytics/listener/handle-event.js +15 -0
- package/dist/es2019/analytics/listener/helpers/logger.js +49 -0
- package/dist/es2019/analytics/listener/index.js +7 -0
- package/dist/es2019/analytics/listener/jql-editor-analytics-listener.js +30 -0
- package/dist/es2019/analytics/listener/process-event-payload.js +29 -0
- package/dist/es2019/analytics/listener/types.js +1 -0
- package/dist/es2019/analytics/types.js +1 -0
- package/dist/es2019/analytics/util.js +4 -0
- package/dist/es2019/async.js +19 -0
- package/dist/es2019/commands/select-error-command/index.js +23 -0
- package/dist/es2019/common/constants.js +5 -0
- package/dist/es2019/common/messages.js +8 -0
- package/dist/es2019/common/styled.js +19 -0
- package/dist/es2019/hooks/use-editor-theme/index.js +33 -0
- package/dist/es2019/hooks/use-editor-view-has-infos/index.js +8 -0
- package/dist/es2019/hooks/use-editor-view-has-warnings/index.js +9 -0
- package/dist/es2019/hooks/use-editor-view-is-invalid/index.js +38 -0
- package/dist/es2019/i18n/cs.js +62 -0
- package/dist/es2019/i18n/da.js +62 -0
- package/dist/es2019/i18n/de.js +62 -0
- package/dist/es2019/i18n/en.js +62 -0
- package/dist/es2019/i18n/en_GB.js +62 -0
- package/dist/es2019/i18n/en_ZZ.js +62 -0
- package/dist/es2019/i18n/es.js +62 -0
- package/dist/es2019/i18n/et.js +8 -0
- package/dist/es2019/i18n/fi.js +62 -0
- package/dist/es2019/i18n/fr.js +62 -0
- package/dist/es2019/i18n/hu.js +62 -0
- package/dist/es2019/i18n/index.js +24 -0
- package/dist/es2019/i18n/it.js +62 -0
- package/dist/es2019/i18n/ja.js +62 -0
- package/dist/es2019/i18n/ko.js +62 -0
- package/dist/es2019/i18n/nb.js +62 -0
- package/dist/es2019/i18n/nl.js +62 -0
- package/dist/es2019/i18n/pl.js +62 -0
- package/dist/es2019/i18n/pt_BR.js +62 -0
- package/dist/es2019/i18n/pt_PT.js +8 -0
- package/dist/es2019/i18n/ru.js +62 -0
- package/dist/es2019/i18n/sk.js +8 -0
- package/dist/es2019/i18n/sv.js +62 -0
- package/dist/es2019/i18n/th.js +62 -0
- package/dist/es2019/i18n/tr.js +62 -0
- package/dist/es2019/i18n/uk.js +62 -0
- package/dist/es2019/i18n/vi.js +62 -0
- package/dist/es2019/i18n/zh.js +62 -0
- package/dist/es2019/i18n/zh_TW.js +62 -0
- package/dist/es2019/index.js +4 -0
- package/dist/es2019/plugins/autocomplete/components/autocomplete/index.js +33 -0
- package/dist/es2019/plugins/autocomplete/components/autocomplete-dropdown/index.js +245 -0
- package/dist/es2019/plugins/autocomplete/components/autocomplete-dropdown/styled.js +46 -0
- package/dist/es2019/plugins/autocomplete/components/autocomplete-option/glyphs.js +80 -0
- package/dist/es2019/plugins/autocomplete/components/autocomplete-option/index.js +159 -0
- package/dist/es2019/plugins/autocomplete/components/autocomplete-option/messages.js +13 -0
- package/dist/es2019/plugins/autocomplete/components/autocomplete-option/styled.js +51 -0
- package/dist/es2019/plugins/autocomplete/components/types.js +1 -0
- package/dist/es2019/plugins/autocomplete/constants.js +21 -0
- package/dist/es2019/plugins/autocomplete/index.js +36 -0
- package/dist/es2019/plugins/autocomplete/messages.js +8 -0
- package/dist/es2019/plugins/autocomplete/types.js +1 -0
- package/dist/es2019/plugins/autocomplete/view.js +102 -0
- package/dist/es2019/plugins/common/get-document-position/index.js +92 -0
- package/dist/es2019/plugins/common/plugin-keymap.js +30 -0
- package/dist/es2019/plugins/common/react-plugin-view.js +67 -0
- package/dist/es2019/plugins/index.js +5 -0
- package/dist/es2019/plugins/jql-ast/JQLEditorErrorStrategy.js +183 -0
- package/dist/es2019/plugins/jql-ast/constants.js +9 -0
- package/dist/es2019/plugins/jql-ast/error-handlers/CustomFieldRuleErrorHandler.js +8 -0
- package/dist/es2019/plugins/jql-ast/error-handlers/ExpectedTokensErrorHandler.js +53 -0
- package/dist/es2019/plugins/jql-ast/error-handlers/FieldPropertyIdErrorHandler.js +12 -0
- package/dist/es2019/plugins/jql-ast/error-handlers/FieldRuleErrorHandler.js +15 -0
- package/dist/es2019/plugins/jql-ast/error-handlers/FunctionArgumentRuleErrorHandler.js +12 -0
- package/dist/es2019/plugins/jql-ast/error-handlers/OperandRuleErrorHandler.js +61 -0
- package/dist/es2019/plugins/jql-ast/error-handlers/OperatorRuleErrorHandler.js +13 -0
- package/dist/es2019/plugins/jql-ast/index.js +40 -0
- package/dist/es2019/plugins/jql-ast/messages.js +173 -0
- package/dist/es2019/plugins/jql-ast/utils.js +13 -0
- package/dist/es2019/plugins/jql-syntax-highlighting/index.js +59 -0
- package/dist/es2019/plugins/jql-syntax-highlighting/types.js +1 -0
- package/dist/es2019/plugins/jql-syntax-highlighting/visitor.js +55 -0
- package/dist/es2019/plugins/rich-inline-nodes/constants.js +3 -0
- package/dist/es2019/plugins/rich-inline-nodes/index.js +48 -0
- package/dist/es2019/plugins/rich-inline-nodes/nodes/index.js +4 -0
- package/dist/es2019/plugins/rich-inline-nodes/nodes/types.js +1 -0
- package/dist/es2019/plugins/rich-inline-nodes/nodes/user/index.js +32 -0
- package/dist/es2019/plugins/rich-inline-nodes/nodes/user/styled.js +77 -0
- package/dist/es2019/plugins/rich-inline-nodes/types.js +1 -0
- package/dist/es2019/plugins/rich-inline-nodes/util/create-node-spec.js +26 -0
- package/dist/es2019/plugins/rich-inline-nodes/util/react-node-view.js +101 -0
- package/dist/es2019/plugins/rich-inline-nodes/util/replace-nodes-transaction.js +104 -0
- package/dist/es2019/plugins/types.js +1 -0
- package/dist/es2019/plugins/validation-tooltip/constants.js +5 -0
- package/dist/es2019/plugins/validation-tooltip/index.js +52 -0
- package/dist/es2019/plugins/validation-tooltip/view.js +55 -0
- package/dist/es2019/schema/index.js +117 -0
- package/dist/es2019/state/analytics/index.js +49 -0
- package/dist/es2019/state/autocomplete/index.js +15 -0
- package/dist/es2019/state/hydration/index.js +63 -0
- package/dist/es2019/state/hydration/util.js +57 -0
- package/dist/es2019/state/index.js +968 -0
- package/dist/es2019/state/types.js +1 -0
- package/dist/es2019/state/util.js +144 -0
- package/dist/es2019/types.js +1 -0
- package/dist/es2019/ui/error-boundary/index.js +55 -0
- package/dist/es2019/ui/index.js +4 -0
- package/dist/es2019/ui/intl-provider/index.js +16 -0
- package/dist/es2019/ui/jql-editor/index.js +63 -0
- package/dist/es2019/ui/jql-editor/types.js +1 -0
- package/dist/es2019/ui/jql-editor-controls-content/base-expand-toggle/index.js +48 -0
- package/dist/es2019/ui/jql-editor-controls-content/base-expand-toggle/styled.js +20 -0
- package/dist/es2019/ui/jql-editor-controls-content/base-search/index.js +35 -0
- package/dist/es2019/ui/jql-editor-controls-content/base-syntax-help/index.js +27 -0
- package/dist/es2019/ui/jql-editor-controls-content/base-syntax-help/styled.js +29 -0
- package/dist/es2019/ui/jql-editor-controls-content/expand-toggle/index.js +51 -0
- package/dist/es2019/ui/jql-editor-controls-content/expand-toggle/messages.js +18 -0
- package/dist/es2019/ui/jql-editor-controls-content/index.js +11 -0
- package/dist/es2019/ui/jql-editor-controls-content/read-only-controls-content/index.js +29 -0
- package/dist/es2019/ui/jql-editor-controls-content/search/index.js +26 -0
- package/dist/es2019/ui/jql-editor-controls-content/search/messages.js +8 -0
- package/dist/es2019/ui/jql-editor-controls-content/syntax-help/index.js +44 -0
- package/dist/es2019/ui/jql-editor-controls-content/syntax-help/messages.js +13 -0
- package/dist/es2019/ui/jql-editor-footer-content/index.js +28 -0
- package/dist/es2019/ui/jql-editor-footer-content/jql-editor-help/index.js +27 -0
- package/dist/es2019/ui/jql-editor-footer-content/jql-editor-help/messages.js +18 -0
- package/dist/es2019/ui/jql-editor-footer-content/jql-editor-help/styled.js +23 -0
- package/dist/es2019/ui/jql-editor-footer-content/jql-messages/errors/index.js +55 -0
- package/dist/es2019/ui/jql-editor-footer-content/jql-messages/errors/messages.js +8 -0
- package/dist/es2019/ui/jql-editor-footer-content/jql-messages/format/index.js +29 -0
- package/dist/es2019/ui/jql-editor-footer-content/jql-messages/format/styled.js +8 -0
- package/dist/es2019/ui/jql-editor-footer-content/jql-messages/index.js +3 -0
- package/dist/es2019/ui/jql-editor-footer-content/jql-messages/infos/index.js +30 -0
- package/dist/es2019/ui/jql-editor-footer-content/jql-messages/warnings/index.js +84 -0
- package/dist/es2019/ui/jql-editor-footer-content/jql-messages/warnings/messages.js +18 -0
- package/dist/es2019/ui/jql-editor-layout/index.js +100 -0
- package/dist/es2019/ui/jql-editor-layout/styled.js +223 -0
- package/dist/es2019/ui/jql-editor-portal-provider/context.js +8 -0
- package/dist/es2019/ui/jql-editor-portal-provider/index.js +99 -0
- package/dist/es2019/ui/jql-editor-portal-provider/types.js +1 -0
- package/dist/es2019/ui/jql-editor-view/index.js +167 -0
- package/dist/es2019/ui/messages.js +8 -0
- package/dist/es2019/ui/tooltip-tag/index.js +8 -0
- package/dist/es2019/ui/tooltip-tag/styled.js +4 -0
- package/dist/es2019/ui/types.js +1 -0
- package/dist/es2019/utils/document-text/index.js +37 -0
- package/dist/es2019/utils/split-text-by-new-line/index.js +4 -0
- package/dist/esm/accessibility/index.js +1 -0
- package/dist/esm/accessibility/styled.js +5 -0
- package/dist/esm/analytics/constants.js +21 -0
- package/dist/esm/analytics/index.js +5 -0
- package/dist/esm/analytics/listener/analytics-web-client-wrapper.js +70 -0
- package/dist/esm/analytics/listener/handle-event.js +15 -0
- package/dist/esm/analytics/listener/helpers/logger.js +83 -0
- package/dist/esm/analytics/listener/index.js +7 -0
- package/dist/esm/analytics/listener/jql-editor-analytics-listener.js +48 -0
- package/dist/esm/analytics/listener/process-event-payload.js +39 -0
- package/dist/esm/analytics/listener/types.js +1 -0
- package/dist/esm/analytics/types.js +1 -0
- package/dist/esm/analytics/util.js +4 -0
- package/dist/esm/async.js +22 -0
- package/dist/esm/commands/select-error-command/index.js +23 -0
- package/dist/esm/common/constants.js +5 -0
- package/dist/esm/common/messages.js +8 -0
- package/dist/esm/common/styled.js +9 -0
- package/dist/esm/hooks/use-editor-theme/index.js +46 -0
- package/dist/esm/hooks/use-editor-view-has-infos/index.js +9 -0
- package/dist/esm/hooks/use-editor-view-has-warnings/index.js +12 -0
- package/dist/esm/hooks/use-editor-view-is-invalid/index.js +46 -0
- package/dist/esm/i18n/cs.js +62 -0
- package/dist/esm/i18n/da.js +62 -0
- package/dist/esm/i18n/de.js +62 -0
- package/dist/esm/i18n/en.js +62 -0
- package/dist/esm/i18n/en_GB.js +62 -0
- package/dist/esm/i18n/en_ZZ.js +62 -0
- package/dist/esm/i18n/es.js +62 -0
- package/dist/esm/i18n/et.js +8 -0
- package/dist/esm/i18n/fi.js +62 -0
- package/dist/esm/i18n/fr.js +62 -0
- package/dist/esm/i18n/hu.js +62 -0
- package/dist/esm/i18n/index.js +24 -0
- package/dist/esm/i18n/it.js +62 -0
- package/dist/esm/i18n/ja.js +62 -0
- package/dist/esm/i18n/ko.js +62 -0
- package/dist/esm/i18n/nb.js +62 -0
- package/dist/esm/i18n/nl.js +62 -0
- package/dist/esm/i18n/pl.js +62 -0
- package/dist/esm/i18n/pt_BR.js +62 -0
- package/dist/esm/i18n/pt_PT.js +8 -0
- package/dist/esm/i18n/ru.js +62 -0
- package/dist/esm/i18n/sk.js +8 -0
- package/dist/esm/i18n/sv.js +62 -0
- package/dist/esm/i18n/th.js +62 -0
- package/dist/esm/i18n/tr.js +62 -0
- package/dist/esm/i18n/uk.js +62 -0
- package/dist/esm/i18n/vi.js +62 -0
- package/dist/esm/i18n/zh.js +62 -0
- package/dist/esm/i18n/zh_TW.js +62 -0
- package/dist/esm/index.js +4 -0
- package/dist/esm/plugins/autocomplete/components/autocomplete/index.js +38 -0
- package/dist/esm/plugins/autocomplete/components/autocomplete-dropdown/index.js +268 -0
- package/dist/esm/plugins/autocomplete/components/autocomplete-dropdown/styled.js +16 -0
- package/dist/esm/plugins/autocomplete/components/autocomplete-option/glyphs.js +98 -0
- package/dist/esm/plugins/autocomplete/components/autocomplete-option/index.js +165 -0
- package/dist/esm/plugins/autocomplete/components/autocomplete-option/messages.js +13 -0
- package/dist/esm/plugins/autocomplete/components/autocomplete-option/styled.js +21 -0
- package/dist/esm/plugins/autocomplete/components/types.js +1 -0
- package/dist/esm/plugins/autocomplete/constants.js +29 -0
- package/dist/esm/plugins/autocomplete/index.js +30 -0
- package/dist/esm/plugins/autocomplete/messages.js +8 -0
- package/dist/esm/plugins/autocomplete/types.js +1 -0
- package/dist/esm/plugins/autocomplete/view.js +120 -0
- package/dist/esm/plugins/common/get-document-position/index.js +93 -0
- package/dist/esm/plugins/common/plugin-keymap.js +43 -0
- package/dist/esm/plugins/common/react-plugin-view.js +84 -0
- package/dist/esm/plugins/index.js +5 -0
- package/dist/esm/plugins/jql-ast/JQLEditorErrorStrategy.js +212 -0
- package/dist/esm/plugins/jql-ast/constants.js +9 -0
- package/dist/esm/plugins/jql-ast/error-handlers/CustomFieldRuleErrorHandler.js +8 -0
- package/dist/esm/plugins/jql-ast/error-handlers/ExpectedTokensErrorHandler.js +57 -0
- package/dist/esm/plugins/jql-ast/error-handlers/FieldPropertyIdErrorHandler.js +12 -0
- package/dist/esm/plugins/jql-ast/error-handlers/FieldRuleErrorHandler.js +15 -0
- package/dist/esm/plugins/jql-ast/error-handlers/FunctionArgumentRuleErrorHandler.js +12 -0
- package/dist/esm/plugins/jql-ast/error-handlers/OperandRuleErrorHandler.js +61 -0
- package/dist/esm/plugins/jql-ast/error-handlers/OperatorRuleErrorHandler.js +13 -0
- package/dist/esm/plugins/jql-ast/index.js +39 -0
- package/dist/esm/plugins/jql-ast/messages.js +173 -0
- package/dist/esm/plugins/jql-ast/utils.js +17 -0
- package/dist/esm/plugins/jql-syntax-highlighting/index.js +62 -0
- package/dist/esm/plugins/jql-syntax-highlighting/types.js +1 -0
- package/dist/esm/plugins/jql-syntax-highlighting/visitor.js +82 -0
- package/dist/esm/plugins/rich-inline-nodes/constants.js +3 -0
- package/dist/esm/plugins/rich-inline-nodes/index.js +56 -0
- package/dist/esm/plugins/rich-inline-nodes/nodes/index.js +4 -0
- package/dist/esm/plugins/rich-inline-nodes/nodes/types.js +1 -0
- package/dist/esm/plugins/rich-inline-nodes/nodes/user/index.js +34 -0
- package/dist/esm/plugins/rich-inline-nodes/nodes/user/styled.js +28 -0
- package/dist/esm/plugins/rich-inline-nodes/types.js +1 -0
- package/dist/esm/plugins/rich-inline-nodes/util/create-node-spec.js +30 -0
- package/dist/esm/plugins/rich-inline-nodes/util/react-node-view.js +119 -0
- package/dist/esm/plugins/rich-inline-nodes/util/replace-nodes-transaction.js +131 -0
- package/dist/esm/plugins/types.js +1 -0
- package/dist/esm/plugins/validation-tooltip/constants.js +5 -0
- package/dist/esm/plugins/validation-tooltip/index.js +52 -0
- package/dist/esm/plugins/validation-tooltip/view.js +67 -0
- package/dist/esm/schema/index.js +129 -0
- package/dist/esm/state/analytics/index.js +50 -0
- package/dist/esm/state/autocomplete/index.js +17 -0
- package/dist/esm/state/hydration/index.js +85 -0
- package/dist/esm/state/hydration/util.js +83 -0
- package/dist/esm/state/index.js +991 -0
- package/dist/esm/state/types.js +1 -0
- package/dist/esm/state/util.js +169 -0
- package/dist/esm/types.js +1 -0
- package/dist/esm/ui/error-boundary/index.js +73 -0
- package/dist/esm/ui/index.js +4 -0
- package/dist/esm/ui/intl-provider/index.js +16 -0
- package/dist/esm/ui/jql-editor/index.js +63 -0
- package/dist/esm/ui/jql-editor/types.js +1 -0
- package/dist/esm/ui/jql-editor-controls-content/base-expand-toggle/index.js +49 -0
- package/dist/esm/ui/jql-editor-controls-content/base-expand-toggle/styled.js +5 -0
- package/dist/esm/ui/jql-editor-controls-content/base-search/index.js +34 -0
- package/dist/esm/ui/jql-editor-controls-content/base-syntax-help/index.js +26 -0
- package/dist/esm/ui/jql-editor-controls-content/base-syntax-help/styled.js +5 -0
- package/dist/esm/ui/jql-editor-controls-content/expand-toggle/index.js +55 -0
- package/dist/esm/ui/jql-editor-controls-content/expand-toggle/messages.js +18 -0
- package/dist/esm/ui/jql-editor-controls-content/index.js +10 -0
- package/dist/esm/ui/jql-editor-controls-content/read-only-controls-content/index.js +28 -0
- package/dist/esm/ui/jql-editor-controls-content/search/index.js +31 -0
- package/dist/esm/ui/jql-editor-controls-content/search/messages.js +8 -0
- package/dist/esm/ui/jql-editor-controls-content/syntax-help/index.js +50 -0
- package/dist/esm/ui/jql-editor-controls-content/syntax-help/messages.js +13 -0
- package/dist/esm/ui/jql-editor-footer-content/index.js +28 -0
- package/dist/esm/ui/jql-editor-footer-content/jql-editor-help/index.js +35 -0
- package/dist/esm/ui/jql-editor-footer-content/jql-editor-help/messages.js +18 -0
- package/dist/esm/ui/jql-editor-footer-content/jql-editor-help/styled.js +8 -0
- package/dist/esm/ui/jql-editor-footer-content/jql-messages/errors/index.js +60 -0
- package/dist/esm/ui/jql-editor-footer-content/jql-messages/errors/messages.js +8 -0
- package/dist/esm/ui/jql-editor-footer-content/jql-messages/format/index.js +28 -0
- package/dist/esm/ui/jql-editor-footer-content/jql-messages/format/styled.js +7 -0
- package/dist/esm/ui/jql-editor-footer-content/jql-messages/index.js +3 -0
- package/dist/esm/ui/jql-editor-footer-content/jql-messages/infos/index.js +31 -0
- package/dist/esm/ui/jql-editor-footer-content/jql-messages/warnings/index.js +100 -0
- package/dist/esm/ui/jql-editor-footer-content/jql-messages/warnings/messages.js +18 -0
- package/dist/esm/ui/jql-editor-layout/index.js +98 -0
- package/dist/esm/ui/jql-editor-layout/styled.js +56 -0
- package/dist/esm/ui/jql-editor-portal-provider/context.js +10 -0
- package/dist/esm/ui/jql-editor-portal-provider/index.js +107 -0
- package/dist/esm/ui/jql-editor-portal-provider/types.js +1 -0
- package/dist/esm/ui/jql-editor-view/index.js +190 -0
- package/dist/esm/ui/messages.js +8 -0
- package/dist/esm/ui/tooltip-tag/index.js +10 -0
- package/dist/esm/ui/tooltip-tag/styled.js +4 -0
- package/dist/esm/ui/types.js +1 -0
- package/dist/esm/utils/document-text/index.js +37 -0
- package/dist/esm/utils/split-text-by-new-line/index.js +6 -0
- package/dist/types/accessibility/index.d.ts +1 -0
- package/dist/types/accessibility/styled.d.ts +2 -0
- package/dist/types/analytics/constants.d.ts +18 -0
- package/dist/types/analytics/index.d.ts +7 -0
- package/dist/types/analytics/listener/analytics-web-client-wrapper.d.ts +9 -0
- package/dist/types/analytics/listener/handle-event.d.ts +9 -0
- package/dist/types/analytics/listener/helpers/logger.d.ts +24 -0
- package/dist/types/analytics/listener/index.d.ts +7 -0
- package/dist/types/analytics/listener/jql-editor-analytics-listener.d.ts +20 -0
- package/dist/types/analytics/listener/process-event-payload.d.ts +8 -0
- package/dist/types/analytics/listener/types.d.ts +7 -0
- package/dist/types/analytics/types.d.ts +3 -0
- package/dist/types/analytics/util.d.ts +4 -0
- package/dist/types/async.d.ts +3 -0
- package/dist/types/commands/select-error-command/index.d.ts +5 -0
- package/dist/types/common/constants.d.ts +5 -0
- package/dist/types/common/messages.d.ts +7 -0
- package/dist/types/common/styled.d.ts +3 -0
- package/dist/types/hooks/use-editor-theme/index.d.ts +38 -0
- package/dist/types/hooks/use-editor-view-has-infos/index.d.ts +1 -0
- package/dist/types/hooks/use-editor-view-has-warnings/index.d.ts +1 -0
- package/dist/types/hooks/use-editor-view-is-invalid/index.d.ts +11 -0
- package/dist/types/i18n/cs.d.ts +61 -0
- package/dist/types/i18n/da.d.ts +61 -0
- package/dist/types/i18n/de.d.ts +61 -0
- package/dist/types/i18n/en.d.ts +61 -0
- package/dist/types/i18n/en_GB.d.ts +61 -0
- package/dist/types/i18n/en_ZZ.d.ts +61 -0
- package/dist/types/i18n/es.d.ts +61 -0
- package/dist/types/i18n/et.d.ts +8 -0
- package/dist/types/i18n/fi.d.ts +61 -0
- package/dist/types/i18n/fr.d.ts +61 -0
- package/dist/types/i18n/hu.d.ts +61 -0
- package/dist/types/i18n/index.d.ts +24 -0
- package/dist/types/i18n/it.d.ts +61 -0
- package/dist/types/i18n/ja.d.ts +61 -0
- package/dist/types/i18n/ko.d.ts +61 -0
- package/dist/types/i18n/nb.d.ts +61 -0
- package/dist/types/i18n/nl.d.ts +61 -0
- package/dist/types/i18n/pl.d.ts +61 -0
- package/dist/types/i18n/pt_BR.d.ts +61 -0
- package/dist/types/i18n/pt_PT.d.ts +8 -0
- package/dist/types/i18n/ru.d.ts +61 -0
- package/dist/types/i18n/sk.d.ts +8 -0
- package/dist/types/i18n/sv.d.ts +61 -0
- package/dist/types/i18n/th.d.ts +61 -0
- package/dist/types/i18n/tr.d.ts +61 -0
- package/dist/types/i18n/uk.d.ts +61 -0
- package/dist/types/i18n/vi.d.ts +61 -0
- package/dist/types/i18n/zh.d.ts +61 -0
- package/dist/types/i18n/zh_TW.d.ts +61 -0
- package/dist/types/index.d.ts +5 -0
- package/dist/types/plugins/autocomplete/components/autocomplete/index.d.ts +4 -0
- package/dist/types/plugins/autocomplete/components/autocomplete-dropdown/index.d.ts +11 -0
- package/dist/types/plugins/autocomplete/components/autocomplete-dropdown/styled.d.ts +9 -0
- package/dist/types/plugins/autocomplete/components/autocomplete-option/glyphs.d.ts +10 -0
- package/dist/types/plugins/autocomplete/components/autocomplete-option/index.d.ts +10 -0
- package/dist/types/plugins/autocomplete/components/autocomplete-option/messages.d.ts +12 -0
- package/dist/types/plugins/autocomplete/components/autocomplete-option/styled.d.ts +11 -0
- package/dist/types/plugins/autocomplete/components/types.d.ts +38 -0
- package/dist/types/plugins/autocomplete/constants.d.ts +14 -0
- package/dist/types/plugins/autocomplete/index.d.ts +4 -0
- package/dist/types/plugins/autocomplete/messages.d.ts +7 -0
- package/dist/types/plugins/autocomplete/types.d.ts +1 -0
- package/dist/types/plugins/autocomplete/view.d.ts +19 -0
- package/dist/types/plugins/common/get-document-position/index.d.ts +9 -0
- package/dist/types/plugins/common/plugin-keymap.d.ts +7 -0
- package/dist/types/plugins/common/react-plugin-view.d.ts +48 -0
- package/dist/types/plugins/index.d.ts +5 -0
- package/dist/types/plugins/jql-ast/JQLEditorErrorStrategy.d.ts +17 -0
- package/dist/types/plugins/jql-ast/constants.d.ts +3 -0
- package/dist/types/plugins/jql-ast/error-handlers/CustomFieldRuleErrorHandler.d.ts +5 -0
- package/dist/types/plugins/jql-ast/error-handlers/ExpectedTokensErrorHandler.d.ts +11 -0
- package/dist/types/plugins/jql-ast/error-handlers/FieldPropertyIdErrorHandler.d.ts +6 -0
- package/dist/types/plugins/jql-ast/error-handlers/FieldRuleErrorHandler.d.ts +6 -0
- package/dist/types/plugins/jql-ast/error-handlers/FunctionArgumentRuleErrorHandler.d.ts +6 -0
- package/dist/types/plugins/jql-ast/error-handlers/OperandRuleErrorHandler.d.ts +9 -0
- package/dist/types/plugins/jql-ast/error-handlers/OperatorRuleErrorHandler.d.ts +6 -0
- package/dist/types/plugins/jql-ast/index.d.ts +7 -0
- package/dist/types/plugins/jql-ast/messages.d.ts +172 -0
- package/dist/types/plugins/jql-ast/utils.d.ts +4 -0
- package/dist/types/plugins/jql-syntax-highlighting/index.d.ts +4 -0
- package/dist/types/plugins/jql-syntax-highlighting/types.d.ts +5 -0
- package/dist/types/plugins/jql-syntax-highlighting/visitor.d.ts +19 -0
- package/dist/types/plugins/rich-inline-nodes/constants.d.ts +3 -0
- package/dist/types/plugins/rich-inline-nodes/index.d.ts +4 -0
- package/dist/types/plugins/rich-inline-nodes/nodes/index.d.ts +3 -0
- package/dist/types/plugins/rich-inline-nodes/nodes/types.d.ts +9 -0
- package/dist/types/plugins/rich-inline-nodes/nodes/user/index.d.ts +7 -0
- package/dist/types/plugins/rich-inline-nodes/nodes/user/styled.d.ts +7 -0
- package/dist/types/plugins/rich-inline-nodes/types.d.ts +2 -0
- package/dist/types/plugins/rich-inline-nodes/util/create-node-spec.d.ts +4 -0
- package/dist/types/plugins/rich-inline-nodes/util/react-node-view.d.ts +24 -0
- package/dist/types/plugins/rich-inline-nodes/util/replace-nodes-transaction.d.ts +3 -0
- package/dist/types/plugins/types.d.ts +16 -0
- package/dist/types/plugins/validation-tooltip/constants.d.ts +5 -0
- package/dist/types/plugins/validation-tooltip/index.d.ts +3 -0
- package/dist/types/plugins/validation-tooltip/view.d.ts +18 -0
- package/dist/types/schema/index.d.ts +28 -0
- package/dist/types/state/analytics/index.d.ts +9 -0
- package/dist/types/state/autocomplete/index.d.ts +4 -0
- package/dist/types/state/hydration/index.d.ts +3 -0
- package/dist/types/state/hydration/util.d.ts +23 -0
- package/dist/types/state/index.d.ts +796 -0
- package/dist/types/state/types.d.ts +242 -0
- package/dist/types/state/util.d.ts +16 -0
- package/dist/types/types.d.ts +5 -0
- package/dist/types/ui/error-boundary/index.d.ts +25 -0
- package/dist/types/ui/index.d.ts +4 -0
- package/dist/types/ui/intl-provider/index.d.ts +10 -0
- package/dist/types/ui/jql-editor/index.d.ts +13 -0
- package/dist/types/ui/jql-editor/types.d.ts +101 -0
- package/dist/types/ui/jql-editor-controls-content/base-expand-toggle/index.d.ts +10 -0
- package/dist/types/ui/jql-editor-controls-content/base-expand-toggle/styled.d.ts +2 -0
- package/dist/types/ui/jql-editor-controls-content/base-search/index.d.ts +9 -0
- package/dist/types/ui/jql-editor-controls-content/base-syntax-help/index.d.ts +9 -0
- package/dist/types/ui/jql-editor-controls-content/base-syntax-help/styled.d.ts +2 -0
- package/dist/types/ui/jql-editor-controls-content/expand-toggle/index.d.ts +2 -0
- package/dist/types/ui/jql-editor-controls-content/expand-toggle/messages.d.ts +17 -0
- package/dist/types/ui/jql-editor-controls-content/index.d.ts +2 -0
- package/dist/types/ui/jql-editor-controls-content/read-only-controls-content/index.d.ts +2 -0
- package/dist/types/ui/jql-editor-controls-content/search/index.d.ts +2 -0
- package/dist/types/ui/jql-editor-controls-content/search/messages.d.ts +7 -0
- package/dist/types/ui/jql-editor-controls-content/syntax-help/index.d.ts +2 -0
- package/dist/types/ui/jql-editor-controls-content/syntax-help/messages.d.ts +12 -0
- package/dist/types/ui/jql-editor-footer-content/index.d.ts +6 -0
- package/dist/types/ui/jql-editor-footer-content/jql-editor-help/index.d.ts +2 -0
- package/dist/types/ui/jql-editor-footer-content/jql-editor-help/messages.d.ts +17 -0
- package/dist/types/ui/jql-editor-footer-content/jql-editor-help/styled.d.ts +6 -0
- package/dist/types/ui/jql-editor-footer-content/jql-messages/errors/index.d.ts +2 -0
- package/dist/types/ui/jql-editor-footer-content/jql-messages/errors/messages.d.ts +7 -0
- package/dist/types/ui/jql-editor-footer-content/jql-messages/format/index.d.ts +8 -0
- package/dist/types/ui/jql-editor-footer-content/jql-messages/format/styled.d.ts +5 -0
- package/dist/types/ui/jql-editor-footer-content/jql-messages/index.d.ts +3 -0
- package/dist/types/ui/jql-editor-footer-content/jql-messages/infos/index.d.ts +3 -0
- package/dist/types/ui/jql-editor-footer-content/jql-messages/warnings/index.d.ts +3 -0
- package/dist/types/ui/jql-editor-footer-content/jql-messages/warnings/messages.d.ts +17 -0
- package/dist/types/ui/jql-editor-layout/index.d.ts +64 -0
- package/dist/types/ui/jql-editor-layout/styled.d.ts +65 -0
- package/dist/types/ui/jql-editor-portal-provider/context.d.ts +4 -0
- package/dist/types/ui/jql-editor-portal-provider/index.d.ts +7 -0
- package/dist/types/ui/jql-editor-portal-provider/types.d.ts +38 -0
- package/dist/types/ui/jql-editor-view/index.d.ts +10 -0
- package/dist/types/ui/messages.d.ts +7 -0
- package/dist/types/ui/tooltip-tag/index.d.ts +2 -0
- package/dist/types/ui/tooltip-tag/styled.d.ts +2 -0
- package/dist/types/ui/types.d.ts +9 -0
- package/dist/types/utils/document-text/index.d.ts +9 -0
- package/dist/types/utils/split-text-by-new-line/index.d.ts +4 -0
- package/dist/types-ts4.5/accessibility/index.d.ts +1 -0
- package/dist/types-ts4.5/accessibility/styled.d.ts +2 -0
- package/dist/types-ts4.5/analytics/constants.d.ts +18 -0
- package/dist/types-ts4.5/analytics/index.d.ts +7 -0
- package/dist/types-ts4.5/analytics/listener/analytics-web-client-wrapper.d.ts +9 -0
- package/dist/types-ts4.5/analytics/listener/handle-event.d.ts +9 -0
- package/dist/types-ts4.5/analytics/listener/helpers/logger.d.ts +24 -0
- package/dist/types-ts4.5/analytics/listener/index.d.ts +7 -0
- package/dist/types-ts4.5/analytics/listener/jql-editor-analytics-listener.d.ts +20 -0
- package/dist/types-ts4.5/analytics/listener/process-event-payload.d.ts +8 -0
- package/dist/types-ts4.5/analytics/listener/types.d.ts +7 -0
- package/dist/types-ts4.5/analytics/types.d.ts +3 -0
- package/dist/types-ts4.5/analytics/util.d.ts +4 -0
- package/dist/types-ts4.5/async.d.ts +3 -0
- package/dist/types-ts4.5/commands/select-error-command/index.d.ts +5 -0
- package/dist/types-ts4.5/common/constants.d.ts +5 -0
- package/dist/types-ts4.5/common/messages.d.ts +7 -0
- package/dist/types-ts4.5/common/styled.d.ts +3 -0
- package/dist/types-ts4.5/hooks/use-editor-theme/index.d.ts +38 -0
- package/dist/types-ts4.5/hooks/use-editor-view-has-infos/index.d.ts +1 -0
- package/dist/types-ts4.5/hooks/use-editor-view-has-warnings/index.d.ts +1 -0
- package/dist/types-ts4.5/hooks/use-editor-view-is-invalid/index.d.ts +11 -0
- package/dist/types-ts4.5/i18n/cs.d.ts +61 -0
- package/dist/types-ts4.5/i18n/da.d.ts +61 -0
- package/dist/types-ts4.5/i18n/de.d.ts +61 -0
- package/dist/types-ts4.5/i18n/en.d.ts +61 -0
- package/dist/types-ts4.5/i18n/en_GB.d.ts +61 -0
- package/dist/types-ts4.5/i18n/en_ZZ.d.ts +61 -0
- package/dist/types-ts4.5/i18n/es.d.ts +61 -0
- package/dist/types-ts4.5/i18n/et.d.ts +8 -0
- package/dist/types-ts4.5/i18n/fi.d.ts +61 -0
- package/dist/types-ts4.5/i18n/fr.d.ts +61 -0
- package/dist/types-ts4.5/i18n/hu.d.ts +61 -0
- package/dist/types-ts4.5/i18n/index.d.ts +24 -0
- package/dist/types-ts4.5/i18n/it.d.ts +61 -0
- package/dist/types-ts4.5/i18n/ja.d.ts +61 -0
- package/dist/types-ts4.5/i18n/ko.d.ts +61 -0
- package/dist/types-ts4.5/i18n/nb.d.ts +61 -0
- package/dist/types-ts4.5/i18n/nl.d.ts +61 -0
- package/dist/types-ts4.5/i18n/pl.d.ts +61 -0
- package/dist/types-ts4.5/i18n/pt_BR.d.ts +61 -0
- package/dist/types-ts4.5/i18n/pt_PT.d.ts +8 -0
- package/dist/types-ts4.5/i18n/ru.d.ts +61 -0
- package/dist/types-ts4.5/i18n/sk.d.ts +8 -0
- package/dist/types-ts4.5/i18n/sv.d.ts +61 -0
- package/dist/types-ts4.5/i18n/th.d.ts +61 -0
- package/dist/types-ts4.5/i18n/tr.d.ts +61 -0
- package/dist/types-ts4.5/i18n/uk.d.ts +61 -0
- package/dist/types-ts4.5/i18n/vi.d.ts +61 -0
- package/dist/types-ts4.5/i18n/zh.d.ts +61 -0
- package/dist/types-ts4.5/i18n/zh_TW.d.ts +61 -0
- package/dist/types-ts4.5/index.d.ts +5 -0
- package/dist/types-ts4.5/plugins/autocomplete/components/autocomplete/index.d.ts +4 -0
- package/dist/types-ts4.5/plugins/autocomplete/components/autocomplete-dropdown/index.d.ts +11 -0
- package/dist/types-ts4.5/plugins/autocomplete/components/autocomplete-dropdown/styled.d.ts +9 -0
- package/dist/types-ts4.5/plugins/autocomplete/components/autocomplete-option/glyphs.d.ts +10 -0
- package/dist/types-ts4.5/plugins/autocomplete/components/autocomplete-option/index.d.ts +10 -0
- package/dist/types-ts4.5/plugins/autocomplete/components/autocomplete-option/messages.d.ts +12 -0
- package/dist/types-ts4.5/plugins/autocomplete/components/autocomplete-option/styled.d.ts +11 -0
- package/dist/types-ts4.5/plugins/autocomplete/components/types.d.ts +38 -0
- package/dist/types-ts4.5/plugins/autocomplete/constants.d.ts +14 -0
- package/dist/types-ts4.5/plugins/autocomplete/index.d.ts +4 -0
- package/dist/types-ts4.5/plugins/autocomplete/messages.d.ts +7 -0
- package/dist/types-ts4.5/plugins/autocomplete/types.d.ts +1 -0
- package/dist/types-ts4.5/plugins/autocomplete/view.d.ts +19 -0
- package/dist/types-ts4.5/plugins/common/get-document-position/index.d.ts +9 -0
- package/dist/types-ts4.5/plugins/common/plugin-keymap.d.ts +7 -0
- package/dist/types-ts4.5/plugins/common/react-plugin-view.d.ts +48 -0
- package/dist/types-ts4.5/plugins/index.d.ts +5 -0
- package/dist/types-ts4.5/plugins/jql-ast/JQLEditorErrorStrategy.d.ts +17 -0
- package/dist/types-ts4.5/plugins/jql-ast/constants.d.ts +3 -0
- package/dist/types-ts4.5/plugins/jql-ast/error-handlers/CustomFieldRuleErrorHandler.d.ts +5 -0
- package/dist/types-ts4.5/plugins/jql-ast/error-handlers/ExpectedTokensErrorHandler.d.ts +11 -0
- package/dist/types-ts4.5/plugins/jql-ast/error-handlers/FieldPropertyIdErrorHandler.d.ts +6 -0
- package/dist/types-ts4.5/plugins/jql-ast/error-handlers/FieldRuleErrorHandler.d.ts +6 -0
- package/dist/types-ts4.5/plugins/jql-ast/error-handlers/FunctionArgumentRuleErrorHandler.d.ts +6 -0
- package/dist/types-ts4.5/plugins/jql-ast/error-handlers/OperandRuleErrorHandler.d.ts +9 -0
- package/dist/types-ts4.5/plugins/jql-ast/error-handlers/OperatorRuleErrorHandler.d.ts +6 -0
- package/dist/types-ts4.5/plugins/jql-ast/index.d.ts +7 -0
- package/dist/types-ts4.5/plugins/jql-ast/messages.d.ts +172 -0
- package/dist/types-ts4.5/plugins/jql-ast/utils.d.ts +4 -0
- package/dist/types-ts4.5/plugins/jql-syntax-highlighting/index.d.ts +4 -0
- package/dist/types-ts4.5/plugins/jql-syntax-highlighting/types.d.ts +5 -0
- package/dist/types-ts4.5/plugins/jql-syntax-highlighting/visitor.d.ts +19 -0
- package/dist/types-ts4.5/plugins/rich-inline-nodes/constants.d.ts +3 -0
- package/dist/types-ts4.5/plugins/rich-inline-nodes/index.d.ts +4 -0
- package/dist/types-ts4.5/plugins/rich-inline-nodes/nodes/index.d.ts +3 -0
- package/dist/types-ts4.5/plugins/rich-inline-nodes/nodes/types.d.ts +9 -0
- package/dist/types-ts4.5/plugins/rich-inline-nodes/nodes/user/index.d.ts +7 -0
- package/dist/types-ts4.5/plugins/rich-inline-nodes/nodes/user/styled.d.ts +7 -0
- package/dist/types-ts4.5/plugins/rich-inline-nodes/types.d.ts +2 -0
- package/dist/types-ts4.5/plugins/rich-inline-nodes/util/create-node-spec.d.ts +4 -0
- package/dist/types-ts4.5/plugins/rich-inline-nodes/util/react-node-view.d.ts +24 -0
- package/dist/types-ts4.5/plugins/rich-inline-nodes/util/replace-nodes-transaction.d.ts +3 -0
- package/dist/types-ts4.5/plugins/types.d.ts +16 -0
- package/dist/types-ts4.5/plugins/validation-tooltip/constants.d.ts +5 -0
- package/dist/types-ts4.5/plugins/validation-tooltip/index.d.ts +3 -0
- package/dist/types-ts4.5/plugins/validation-tooltip/view.d.ts +18 -0
- package/dist/types-ts4.5/schema/index.d.ts +28 -0
- package/dist/types-ts4.5/state/analytics/index.d.ts +9 -0
- package/dist/types-ts4.5/state/autocomplete/index.d.ts +4 -0
- package/dist/types-ts4.5/state/hydration/index.d.ts +3 -0
- package/dist/types-ts4.5/state/hydration/util.d.ts +23 -0
- package/dist/types-ts4.5/state/index.d.ts +796 -0
- package/dist/types-ts4.5/state/types.d.ts +242 -0
- package/dist/types-ts4.5/state/util.d.ts +16 -0
- package/dist/types-ts4.5/types.d.ts +5 -0
- package/dist/types-ts4.5/ui/error-boundary/index.d.ts +25 -0
- package/dist/types-ts4.5/ui/index.d.ts +4 -0
- package/dist/types-ts4.5/ui/intl-provider/index.d.ts +10 -0
- package/dist/types-ts4.5/ui/jql-editor/index.d.ts +13 -0
- package/dist/types-ts4.5/ui/jql-editor/types.d.ts +101 -0
- package/dist/types-ts4.5/ui/jql-editor-controls-content/base-expand-toggle/index.d.ts +10 -0
- package/dist/types-ts4.5/ui/jql-editor-controls-content/base-expand-toggle/styled.d.ts +2 -0
- package/dist/types-ts4.5/ui/jql-editor-controls-content/base-search/index.d.ts +9 -0
- package/dist/types-ts4.5/ui/jql-editor-controls-content/base-syntax-help/index.d.ts +9 -0
- package/dist/types-ts4.5/ui/jql-editor-controls-content/base-syntax-help/styled.d.ts +2 -0
- package/dist/types-ts4.5/ui/jql-editor-controls-content/expand-toggle/index.d.ts +2 -0
- package/dist/types-ts4.5/ui/jql-editor-controls-content/expand-toggle/messages.d.ts +17 -0
- package/dist/types-ts4.5/ui/jql-editor-controls-content/index.d.ts +2 -0
- package/dist/types-ts4.5/ui/jql-editor-controls-content/read-only-controls-content/index.d.ts +2 -0
- package/dist/types-ts4.5/ui/jql-editor-controls-content/search/index.d.ts +2 -0
- package/dist/types-ts4.5/ui/jql-editor-controls-content/search/messages.d.ts +7 -0
- package/dist/types-ts4.5/ui/jql-editor-controls-content/syntax-help/index.d.ts +2 -0
- package/dist/types-ts4.5/ui/jql-editor-controls-content/syntax-help/messages.d.ts +12 -0
- package/dist/types-ts4.5/ui/jql-editor-footer-content/index.d.ts +6 -0
- package/dist/types-ts4.5/ui/jql-editor-footer-content/jql-editor-help/index.d.ts +2 -0
- package/dist/types-ts4.5/ui/jql-editor-footer-content/jql-editor-help/messages.d.ts +17 -0
- package/dist/types-ts4.5/ui/jql-editor-footer-content/jql-editor-help/styled.d.ts +6 -0
- package/dist/types-ts4.5/ui/jql-editor-footer-content/jql-messages/errors/index.d.ts +2 -0
- package/dist/types-ts4.5/ui/jql-editor-footer-content/jql-messages/errors/messages.d.ts +7 -0
- package/dist/types-ts4.5/ui/jql-editor-footer-content/jql-messages/format/index.d.ts +8 -0
- package/dist/types-ts4.5/ui/jql-editor-footer-content/jql-messages/format/styled.d.ts +5 -0
- package/dist/types-ts4.5/ui/jql-editor-footer-content/jql-messages/index.d.ts +3 -0
- package/dist/types-ts4.5/ui/jql-editor-footer-content/jql-messages/infos/index.d.ts +3 -0
- package/dist/types-ts4.5/ui/jql-editor-footer-content/jql-messages/warnings/index.d.ts +3 -0
- package/dist/types-ts4.5/ui/jql-editor-footer-content/jql-messages/warnings/messages.d.ts +17 -0
- package/dist/types-ts4.5/ui/jql-editor-layout/index.d.ts +64 -0
- package/dist/types-ts4.5/ui/jql-editor-layout/styled.d.ts +65 -0
- package/dist/types-ts4.5/ui/jql-editor-portal-provider/context.d.ts +4 -0
- package/dist/types-ts4.5/ui/jql-editor-portal-provider/index.d.ts +7 -0
- package/dist/types-ts4.5/ui/jql-editor-portal-provider/types.d.ts +38 -0
- package/dist/types-ts4.5/ui/jql-editor-view/index.d.ts +10 -0
- package/dist/types-ts4.5/ui/messages.d.ts +7 -0
- package/dist/types-ts4.5/ui/tooltip-tag/index.d.ts +2 -0
- package/dist/types-ts4.5/ui/tooltip-tag/styled.d.ts +2 -0
- package/dist/types-ts4.5/ui/types.d.ts +9 -0
- package/dist/types-ts4.5/utils/document-text/index.d.ts +9 -0
- package/dist/types-ts4.5/utils/split-text-by-new-line/index.d.ts +4 -0
- package/i18n/package.json +15 -0
- package/package.json +127 -0
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { Plugin, PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
2
|
+
import { JQLSyntaxError } from '@atlaskit/jql-ast';
|
|
3
|
+
import getDocumentPosition from '../common/get-document-position';
|
|
4
|
+
import { getJastFromState } from '../jql-ast';
|
|
5
|
+
import { SyntaxHighlightingVisitor } from './visitor';
|
|
6
|
+
const getHighlights = state => {
|
|
7
|
+
const ast = getJastFromState(state);
|
|
8
|
+
// Get highlights for AST nodes
|
|
9
|
+
const visitor = new SyntaxHighlightingVisitor(state);
|
|
10
|
+
const highlights = ast.query ? visitor.visit(ast.query) : [];
|
|
11
|
+
// Create a highlight for the first syntax error encountered
|
|
12
|
+
const [error] = ast.errors;
|
|
13
|
+
if (error instanceof JQLSyntaxError) {
|
|
14
|
+
const documentFrom = getDocumentPosition(state.doc, error.start);
|
|
15
|
+
const documentTo = getDocumentPosition(state.doc, error.stop);
|
|
16
|
+
highlights.push({
|
|
17
|
+
tokenType: 'error',
|
|
18
|
+
documentFrom,
|
|
19
|
+
documentTo
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
return highlights;
|
|
23
|
+
};
|
|
24
|
+
const JQLSyntaxHighlightingPluginKey = new PluginKey('jql-syntax-highlighting-plugin');
|
|
25
|
+
const jqlSyntaxHighlightingPlugin = () => new Plugin({
|
|
26
|
+
key: JQLSyntaxHighlightingPluginKey,
|
|
27
|
+
appendTransaction: (_, oldState, newState) => {
|
|
28
|
+
// Avoid unnecessary transactions if document hasn't changed in the current transaction
|
|
29
|
+
if (oldState.doc === newState.doc) {
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
const transaction = newState.tr;
|
|
33
|
+
|
|
34
|
+
// Remove token marks from all inline nodes so they can be recomputed
|
|
35
|
+
transaction.removeMark(0, newState.doc.content.size);
|
|
36
|
+
|
|
37
|
+
// Create marks for computed highlights
|
|
38
|
+
const highlights = getHighlights(newState);
|
|
39
|
+
highlights.forEach(({
|
|
40
|
+
tokenType,
|
|
41
|
+
documentFrom,
|
|
42
|
+
documentTo
|
|
43
|
+
}) => {
|
|
44
|
+
// Apply mark to all text nodes within the highlighted range
|
|
45
|
+
newState.doc.nodesBetween(documentFrom, documentTo, (node, pos) => {
|
|
46
|
+
if (node.isText) {
|
|
47
|
+
const from = Math.max(pos, documentFrom);
|
|
48
|
+
const to = Math.min(pos + node.nodeSize, documentTo);
|
|
49
|
+
const mark = newState.schema.marks.token.create({
|
|
50
|
+
tokenType
|
|
51
|
+
});
|
|
52
|
+
transaction.addMark(from, to, mark);
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
});
|
|
56
|
+
return transaction;
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
export default jqlSyntaxHighlightingPlugin;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
+
import { AbstractJastVisitor, isOperandNode } from '@atlaskit/jql-ast';
|
|
3
|
+
import getDocumentPosition from '../common/get-document-position';
|
|
4
|
+
export class SyntaxHighlightingVisitor extends AbstractJastVisitor {
|
|
5
|
+
constructor(state) {
|
|
6
|
+
super();
|
|
7
|
+
_defineProperty(this, "visitCompoundOperator", compoundOperator => {
|
|
8
|
+
return compoundOperator.positions.map(position => this.createHighlight('keyword', position));
|
|
9
|
+
});
|
|
10
|
+
_defineProperty(this, "visitNotClauseOperator", notClauseOperator => {
|
|
11
|
+
return this.getHighlightsIfPosition('keyword', notClauseOperator.position);
|
|
12
|
+
});
|
|
13
|
+
_defineProperty(this, "visitOrderByOperator", orderByOperator => {
|
|
14
|
+
return this.getHighlightsIfPosition('keyword', orderByOperator.position);
|
|
15
|
+
});
|
|
16
|
+
_defineProperty(this, "visitOrderByDirection", orderByDirection => {
|
|
17
|
+
return this.getHighlightsIfPosition('keyword', orderByDirection.position);
|
|
18
|
+
});
|
|
19
|
+
_defineProperty(this, "visitField", field => {
|
|
20
|
+
return this.getHighlightsIfPosition('field', field.position);
|
|
21
|
+
});
|
|
22
|
+
_defineProperty(this, "visitOperator", operator => {
|
|
23
|
+
return this.getHighlightsIfPosition('operator', operator.position);
|
|
24
|
+
});
|
|
25
|
+
_defineProperty(this, "visitPredicateOperator", predicateOperator => {
|
|
26
|
+
return this.getHighlightsIfPosition('operator', predicateOperator.position);
|
|
27
|
+
});
|
|
28
|
+
_defineProperty(this, "getHighlightsIfPosition", (tokenType, maybePosition) => {
|
|
29
|
+
if (!maybePosition) {
|
|
30
|
+
return [];
|
|
31
|
+
}
|
|
32
|
+
return [this.createHighlight(tokenType, maybePosition)];
|
|
33
|
+
});
|
|
34
|
+
_defineProperty(this, "createHighlight", (tokenType, [start, end]) => {
|
|
35
|
+
const documentFrom = getDocumentPosition(this.state.doc, start);
|
|
36
|
+
const documentTo = getDocumentPosition(this.state.doc, end);
|
|
37
|
+
return {
|
|
38
|
+
tokenType,
|
|
39
|
+
documentFrom,
|
|
40
|
+
documentTo
|
|
41
|
+
};
|
|
42
|
+
});
|
|
43
|
+
this.state = state;
|
|
44
|
+
}
|
|
45
|
+
shouldVisitNextChild(node) {
|
|
46
|
+
// Skip visiting operand subtrees, which don't require syntax highlighting and can make a big impact on performance
|
|
47
|
+
return !isOperandNode(node);
|
|
48
|
+
}
|
|
49
|
+
aggregateResult(aggregate, nextResult) {
|
|
50
|
+
return aggregate.concat(nextResult);
|
|
51
|
+
}
|
|
52
|
+
defaultResult() {
|
|
53
|
+
return [];
|
|
54
|
+
}
|
|
55
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import mapValues from 'lodash/mapValues';
|
|
2
|
+
import { Plugin, PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
3
|
+
import { Decoration, DecorationSet } from '@atlaskit/editor-prosemirror/view';
|
|
4
|
+
import { JQLSyntaxError } from '@atlaskit/jql-ast';
|
|
5
|
+
import getDocumentPosition from '../common/get-document-position';
|
|
6
|
+
import { getJastFromState } from '../jql-ast';
|
|
7
|
+
import { ERROR_NODE, RICH_INLINE_NODE, SELECTED_NODE } from './constants';
|
|
8
|
+
import { richInlineNodes } from './nodes';
|
|
9
|
+
import { ReactNodeView } from './util/react-node-view';
|
|
10
|
+
const decorateNodesInRange = (state, decoration, from, to) => {
|
|
11
|
+
const decorations = [];
|
|
12
|
+
state.doc.nodesBetween(from, to, (node, pos) => {
|
|
13
|
+
if (node.type.spec.group === RICH_INLINE_NODE) {
|
|
14
|
+
decorations.push(Decoration.node(pos, pos + node.nodeSize, {}, {
|
|
15
|
+
type: decoration
|
|
16
|
+
}));
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
return decorations;
|
|
20
|
+
};
|
|
21
|
+
const RichInlineNodesPluginKey = new PluginKey('rich-inline-nodes-plugin');
|
|
22
|
+
const richInlineNodesPlugin = portalActions => new Plugin({
|
|
23
|
+
key: RichInlineNodesPluginKey,
|
|
24
|
+
props: {
|
|
25
|
+
decorations: state => {
|
|
26
|
+
const decorations = [];
|
|
27
|
+
|
|
28
|
+
// Apply selected decoration to node views when they are part of a text selection
|
|
29
|
+
const {
|
|
30
|
+
from,
|
|
31
|
+
to
|
|
32
|
+
} = state.selection;
|
|
33
|
+
decorations.push(...decorateNodesInRange(state, SELECTED_NODE, from, to));
|
|
34
|
+
|
|
35
|
+
// Apply error decoration to node views when they are part of AST error range
|
|
36
|
+
const ast = getJastFromState(state);
|
|
37
|
+
const [error] = ast.errors;
|
|
38
|
+
if (error instanceof JQLSyntaxError) {
|
|
39
|
+
const documentFrom = getDocumentPosition(state.doc, error.start);
|
|
40
|
+
const documentTo = getDocumentPosition(state.doc, error.stop);
|
|
41
|
+
decorations.push(...decorateNodesInRange(state, ERROR_NODE, documentFrom, documentTo));
|
|
42
|
+
}
|
|
43
|
+
return DecorationSet.create(state.doc, decorations);
|
|
44
|
+
},
|
|
45
|
+
nodeViews: mapValues(richInlineNodes, jqlNodeSpec => (node, _view, _getPos, decorations) => ReactNodeView.for(jqlNodeSpec.component, portalActions, node, decorations))
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
export default richInlineNodesPlugin;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import Avatar from '@atlaskit/avatar';
|
|
3
|
+
import { useHydratedUser } from '../../../../state';
|
|
4
|
+
import { AvatarWrapper, NameContainer, UserContainer } from './styled';
|
|
5
|
+
const User = ({
|
|
6
|
+
id,
|
|
7
|
+
name,
|
|
8
|
+
fieldName,
|
|
9
|
+
selected,
|
|
10
|
+
error
|
|
11
|
+
}) => {
|
|
12
|
+
const [user] = useHydratedUser({
|
|
13
|
+
id,
|
|
14
|
+
fieldName
|
|
15
|
+
});
|
|
16
|
+
return /*#__PURE__*/React.createElement(UserContainer, {
|
|
17
|
+
selected: selected,
|
|
18
|
+
error: error
|
|
19
|
+
}, /*#__PURE__*/React.createElement(AvatarWrapper, null, /*#__PURE__*/React.createElement(Avatar, {
|
|
20
|
+
src: user === null || user === void 0 ? void 0 : user.avatarUrl,
|
|
21
|
+
borderColor: "transparent",
|
|
22
|
+
size: "xsmall"
|
|
23
|
+
})), /*#__PURE__*/React.createElement(NameContainer, null, name));
|
|
24
|
+
};
|
|
25
|
+
export const user = {
|
|
26
|
+
component: User,
|
|
27
|
+
attrs: {
|
|
28
|
+
id: {},
|
|
29
|
+
name: {},
|
|
30
|
+
fieldName: {}
|
|
31
|
+
}
|
|
32
|
+
};
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { css } from '@emotion/react';
|
|
2
|
+
import styled from '@emotion/styled';
|
|
3
|
+
import { N0, N40, N50, N500, R400 } from '@atlaskit/theme/colors';
|
|
4
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
5
|
+
export const UserContainer = styled.span`
|
|
6
|
+
display: inline-flex;
|
|
7
|
+
align-items: center;
|
|
8
|
+
height: ${"var(--ds-space-200, 16px)"};
|
|
9
|
+
padding: 1px;
|
|
10
|
+
border-radius: 10px;
|
|
11
|
+
cursor: pointer;
|
|
12
|
+
user-select: none;
|
|
13
|
+
|
|
14
|
+
${({
|
|
15
|
+
selected,
|
|
16
|
+
error
|
|
17
|
+
}) => {
|
|
18
|
+
if (selected) {
|
|
19
|
+
if (error) {
|
|
20
|
+
return css`
|
|
21
|
+
color: ${`var(--ds-text-inverse, ${N0})`};
|
|
22
|
+
background-color: ${`var(--ds-background-danger-bold, ${R400})`};
|
|
23
|
+
text-decoration: wavy underline;
|
|
24
|
+
text-decoration-thickness: 1px;
|
|
25
|
+
text-decoration-skip-ink: none;
|
|
26
|
+
text-decoration-color: ${`var(--ds-text-inverse, ${N0})`};
|
|
27
|
+
`;
|
|
28
|
+
} else {
|
|
29
|
+
return css`
|
|
30
|
+
color: ${`var(--ds-text, ${N0})`};
|
|
31
|
+
background-color: ${`var(--ds-background-selected, ${N500})`};
|
|
32
|
+
box-shadow: 0 0 0 1px ${"var(--ds-border-selected, transparent)"};
|
|
33
|
+
`;
|
|
34
|
+
}
|
|
35
|
+
} else {
|
|
36
|
+
if (error) {
|
|
37
|
+
return css`
|
|
38
|
+
color: ${`var(--ds-text-subtle, ${N500})`};
|
|
39
|
+
background-color: ${`var(--ds-background-neutral, ${N40})`};
|
|
40
|
+
text-decoration: wavy underline;
|
|
41
|
+
text-decoration-thickness: 1px;
|
|
42
|
+
text-decoration-skip-ink: none;
|
|
43
|
+
text-decoration-color: ${`var(--ds-text-danger, ${R400})`};
|
|
44
|
+
|
|
45
|
+
&:hover {
|
|
46
|
+
background-color: ${`var(--ds-background-neutral-hovered, ${N50})`};
|
|
47
|
+
}
|
|
48
|
+
`;
|
|
49
|
+
} else {
|
|
50
|
+
return css`
|
|
51
|
+
color: ${`var(--ds-text-subtle, ${N500})`};
|
|
52
|
+
background-color: ${`var(--ds-background-neutral, ${N40})`};
|
|
53
|
+
|
|
54
|
+
&:hover {
|
|
55
|
+
background-color: ${`var(--ds-background-neutral-hovered, ${N50})`};
|
|
56
|
+
}
|
|
57
|
+
`;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}}
|
|
61
|
+
`;
|
|
62
|
+
export const NameContainer = styled.span`
|
|
63
|
+
margin-left: ${"var(--ds-space-075, 6px)"};
|
|
64
|
+
margin-right: ${"var(--ds-space-100, 8px)"};
|
|
65
|
+
`;
|
|
66
|
+
|
|
67
|
+
/* Override Avatar styles to match design spec */
|
|
68
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
69
|
+
export const AvatarWrapper = styled.span`
|
|
70
|
+
> div {
|
|
71
|
+
top: 3px;
|
|
72
|
+
|
|
73
|
+
> span {
|
|
74
|
+
margin: 0;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
`;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import mapKeys from 'lodash/mapKeys';
|
|
2
|
+
import mapValues from 'lodash/mapValues';
|
|
3
|
+
import { RICH_INLINE_NODE } from '../constants';
|
|
4
|
+
export const createNodeSpec = (name, attrs) => {
|
|
5
|
+
return {
|
|
6
|
+
group: RICH_INLINE_NODE,
|
|
7
|
+
content: 'text*',
|
|
8
|
+
inline: true,
|
|
9
|
+
atom: true,
|
|
10
|
+
// treat node as a leaf
|
|
11
|
+
attrs,
|
|
12
|
+
toDOM: node => {
|
|
13
|
+
const domAttrs = mapKeys(node.attrs, (_, attr) => `data-${attr}`);
|
|
14
|
+
return [name, domAttrs, 0];
|
|
15
|
+
},
|
|
16
|
+
parseDOM: [{
|
|
17
|
+
tag: name,
|
|
18
|
+
getAttrs: node => {
|
|
19
|
+
if (node instanceof Element) {
|
|
20
|
+
return mapValues(attrs, (_, attr) => node.getAttribute(`data-${attr}`));
|
|
21
|
+
}
|
|
22
|
+
return null; // should never™ happen
|
|
23
|
+
}
|
|
24
|
+
}]
|
|
25
|
+
};
|
|
26
|
+
};
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
|
+
import React, { useEffect, useLayoutEffect, useState } from 'react';
|
|
4
|
+
import { Subject } from 'rxjs/Subject';
|
|
5
|
+
import { v4 as uuid } from 'uuid';
|
|
6
|
+
import { useEditorViewHasFocus } from '../../../state';
|
|
7
|
+
import { ERROR_NODE, SELECTED_NODE } from '../constants';
|
|
8
|
+
export class ReactNodeView {
|
|
9
|
+
constructor(component, portalActions, _node) {
|
|
10
|
+
_defineProperty(this, "componentSubject", new Subject());
|
|
11
|
+
_defineProperty(this, "init", decorations => {
|
|
12
|
+
const Component = this.component;
|
|
13
|
+
const PortallingComponent = () => {
|
|
14
|
+
const [state, setState] = useState({
|
|
15
|
+
...this.getProps(this.node),
|
|
16
|
+
selected: this.isSelected(decorations),
|
|
17
|
+
error: this.hasError(decorations)
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
// ProseMirror keeps decorations on blur (as those are derived from editor state and focus isn't part of it),
|
|
21
|
+
// but we don't want to show node views as selected when that happens. We could build a workaround for this in
|
|
22
|
+
// richInlineNodesPlugin, but this hook will make selection behave more consistently with other focus-related features.
|
|
23
|
+
const [hasFocus] = useEditorViewHasFocus();
|
|
24
|
+
useEffect(() => {
|
|
25
|
+
// Subscribe to the RxJS subject so concrete subclasses can emit events to re-render the node view component
|
|
26
|
+
const subscription = this.componentSubject.subscribe(props => {
|
|
27
|
+
setState(props);
|
|
28
|
+
});
|
|
29
|
+
return () => subscription.unsubscribe();
|
|
30
|
+
}, []);
|
|
31
|
+
useLayoutEffect(() => {
|
|
32
|
+
if (state.error) {
|
|
33
|
+
this.dom.dataset.tokenType = 'error';
|
|
34
|
+
} else {
|
|
35
|
+
delete this.dom.dataset.tokenType;
|
|
36
|
+
}
|
|
37
|
+
}, [state]);
|
|
38
|
+
return /*#__PURE__*/React.createElement(Component, _extends({}, state, {
|
|
39
|
+
selected: state.selected && hasFocus
|
|
40
|
+
}));
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
// Ok, this is a tricky one. As everything that requires collaboration between ProseMirror and React.
|
|
44
|
+
//
|
|
45
|
+
// If we run `onCreatePortal` synchronously, ProseMirror won't insert the node view container (`this.dom`)
|
|
46
|
+
// immediately into the DOM (as init function hasn't returned yet). This can trigger race conditions in other
|
|
47
|
+
// code paths where ProseMirror may try to get DOM position for this node view before it has been inserted
|
|
48
|
+
// (e.g. calculating new autocomplete position after insertion, or setting selection after the node).
|
|
49
|
+
//
|
|
50
|
+
// With `queueMicrotask` we can schedule this operation to be run after ProseMirror is done with the element
|
|
51
|
+
// insertion, but before control of the execution context is returned to the browser's event loop. This should
|
|
52
|
+
// prevent all conflicts with other pieces of asynchronous code and still render the portal as soon as it is
|
|
53
|
+
// practically possible, so we can avoid flicker in situations where node views are reconstructed by ProseMirror.
|
|
54
|
+
// @see https://github.com/ProseMirror/prosemirror/issues/872
|
|
55
|
+
queueMicrotask(() => {
|
|
56
|
+
this.portalActions.onCreatePortal(this.portalKey, /*#__PURE__*/React.createElement(PortallingComponent, null), this.dom);
|
|
57
|
+
});
|
|
58
|
+
return this;
|
|
59
|
+
});
|
|
60
|
+
_defineProperty(this, "destroy", () => {
|
|
61
|
+
this.portalActions.onDestroyPortal(this.portalKey);
|
|
62
|
+
});
|
|
63
|
+
_defineProperty(this, "update", (node, decorations) => {
|
|
64
|
+
// Update function may be called by ProseMirror with a node that has nothing to do with this node view ¯\_(ツ)_/¯
|
|
65
|
+
// @see https://prosemirror.net/docs/ref/#view.NodeView.update
|
|
66
|
+
if (node !== this.node) {
|
|
67
|
+
return false;
|
|
68
|
+
}
|
|
69
|
+
this.componentSubject.next({
|
|
70
|
+
...this.getProps(node),
|
|
71
|
+
selected: this.isSelected(decorations),
|
|
72
|
+
error: this.hasError(decorations)
|
|
73
|
+
});
|
|
74
|
+
return true;
|
|
75
|
+
});
|
|
76
|
+
_defineProperty(this, "getProps", node => {
|
|
77
|
+
return {
|
|
78
|
+
...node.attrs
|
|
79
|
+
};
|
|
80
|
+
});
|
|
81
|
+
_defineProperty(this, "isSelected", decorations => {
|
|
82
|
+
return decorations.some(decoration => decoration.spec.type === SELECTED_NODE);
|
|
83
|
+
});
|
|
84
|
+
_defineProperty(this, "hasError", decorations => {
|
|
85
|
+
return decorations.some(decoration => decoration.spec.type === ERROR_NODE);
|
|
86
|
+
});
|
|
87
|
+
this.component = component;
|
|
88
|
+
this.portalActions = portalActions;
|
|
89
|
+
this.node = _node;
|
|
90
|
+
// Generate unique portal identifier
|
|
91
|
+
// If you read this comment in the future and TypeScript has added support for Symbols as object keys, please do
|
|
92
|
+
// JQL Editor a favor and replace this library with the native JS functionality that TS was supposed to support.
|
|
93
|
+
this.portalKey = uuid();
|
|
94
|
+
// Creating span under the assumption that all node views will be inline elements in JQL Editor
|
|
95
|
+
this.dom = document.createElement('span');
|
|
96
|
+
this.dom.setAttribute('data-testid', 'jql-editor-node-view');
|
|
97
|
+
}
|
|
98
|
+
static for(component, portalActions, node, decorations) {
|
|
99
|
+
return new ReactNodeView(component, portalActions, node).init(decorations);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
+
import { AbstractJastVisitor } from '@atlaskit/jql-ast';
|
|
3
|
+
import { JQLEditorSchema } from '../../../schema';
|
|
4
|
+
import getDocumentPosition from '../../common/get-document-position';
|
|
5
|
+
import { getJastFromState } from '../../jql-ast';
|
|
6
|
+
import { RICH_INLINE_NODE } from '../constants';
|
|
7
|
+
export const replaceRichInlineNodes = (editorState, hydratedValues) => {
|
|
8
|
+
const ast = getJastFromState(editorState);
|
|
9
|
+
const transaction = editorState.tr;
|
|
10
|
+
// Do not allow users to revert this transaction with undo command so they can't land in an unhydrated state
|
|
11
|
+
transaction.setMeta('addToHistory', false);
|
|
12
|
+
Object.entries(hydratedValues).forEach(([fieldName, values]) => {
|
|
13
|
+
values.forEach(value => {
|
|
14
|
+
if (value.type === 'user') {
|
|
15
|
+
const astNodes = getValueNodes(ast, fieldName, value.id);
|
|
16
|
+
astNodes.forEach(astNode => {
|
|
17
|
+
if (astNode.position) {
|
|
18
|
+
const [from, to] = astNode.position;
|
|
19
|
+
const documentFrom = getDocumentPosition(transaction.doc, from);
|
|
20
|
+
if (!isRichInlineNode(transaction.doc, documentFrom)) {
|
|
21
|
+
const documentTo = getDocumentPosition(transaction.doc, to);
|
|
22
|
+
const node = getRichInlineNode(fieldName, value, astNode.text);
|
|
23
|
+
transaction.replaceWith(documentFrom, documentTo, node);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
});
|
|
30
|
+
return transaction;
|
|
31
|
+
};
|
|
32
|
+
const getRichInlineNode = (fieldName, value, text) => {
|
|
33
|
+
switch (value.type) {
|
|
34
|
+
case 'user':
|
|
35
|
+
{
|
|
36
|
+
const textContent = JQLEditorSchema.text(text);
|
|
37
|
+
return JQLEditorSchema.nodes.user.create({
|
|
38
|
+
...value,
|
|
39
|
+
fieldName
|
|
40
|
+
}, textContent);
|
|
41
|
+
}
|
|
42
|
+
default:
|
|
43
|
+
{
|
|
44
|
+
throw new Error(`Unsupported hydrated value type ${value.type}`);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
const isRichInlineNode = (doc, position) => {
|
|
49
|
+
var _doc$resolve$nodeAfte;
|
|
50
|
+
return ((_doc$resolve$nodeAfte = doc.resolve(position).nodeAfter) === null || _doc$resolve$nodeAfte === void 0 ? void 0 : _doc$resolve$nodeAfte.type.spec.group) === RICH_INLINE_NODE;
|
|
51
|
+
};
|
|
52
|
+
const getValueNodes = (ast, field, value) => {
|
|
53
|
+
if (!ast.query) {
|
|
54
|
+
return [];
|
|
55
|
+
}
|
|
56
|
+
return ast.query.accept(new FindValuesVisitor(field, value));
|
|
57
|
+
};
|
|
58
|
+
class FindValuesVisitor extends AbstractJastVisitor {
|
|
59
|
+
constructor(field, value) {
|
|
60
|
+
super();
|
|
61
|
+
_defineProperty(this, "visitQuery", query => {
|
|
62
|
+
if (query.where === undefined) {
|
|
63
|
+
return [];
|
|
64
|
+
}
|
|
65
|
+
return query.where.accept(this);
|
|
66
|
+
});
|
|
67
|
+
_defineProperty(this, "visitCompoundClause", compoundClause => {
|
|
68
|
+
return compoundClause.clauses.reduce((operands, compoundClause) => {
|
|
69
|
+
return [...operands, ...compoundClause.accept(this)];
|
|
70
|
+
}, []);
|
|
71
|
+
});
|
|
72
|
+
_defineProperty(this, "visitTerminalClause", terminalClause => {
|
|
73
|
+
if (terminalClause.field.value !== this.field) {
|
|
74
|
+
return [];
|
|
75
|
+
}
|
|
76
|
+
if (terminalClause.operand === undefined) {
|
|
77
|
+
return [];
|
|
78
|
+
}
|
|
79
|
+
return terminalClause.operand.accept(this);
|
|
80
|
+
});
|
|
81
|
+
_defineProperty(this, "visitNotClause", notClause => {
|
|
82
|
+
return notClause.clause.accept(this);
|
|
83
|
+
});
|
|
84
|
+
_defineProperty(this, "visitValueOperand", valueOperand => {
|
|
85
|
+
if (valueOperand.value !== this.value) {
|
|
86
|
+
return [];
|
|
87
|
+
}
|
|
88
|
+
return [valueOperand];
|
|
89
|
+
});
|
|
90
|
+
_defineProperty(this, "visitListOperand", listOperand => {
|
|
91
|
+
return listOperand.values.reduce((values, operand) => {
|
|
92
|
+
return [...values, ...operand.accept(this)];
|
|
93
|
+
}, []);
|
|
94
|
+
});
|
|
95
|
+
this.field = field;
|
|
96
|
+
this.value = value;
|
|
97
|
+
}
|
|
98
|
+
aggregateResult(aggregate, nextResult) {
|
|
99
|
+
return [...aggregate, ...nextResult];
|
|
100
|
+
}
|
|
101
|
+
defaultResult() {
|
|
102
|
+
return [];
|
|
103
|
+
}
|
|
104
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
2
|
+
export const JQLValidationTooltipPluginKey = new PluginKey('jql-validation-tooltip-plugin');
|
|
3
|
+
export const TOOLTIP_CLASSNAME = 'jql-validation-tooltip';
|
|
4
|
+
export const TOOLTIP_ENTER_CLASSNAME = 'jql-validation-tooltip-enter';
|
|
5
|
+
export const TOOLTIP_EXIT_CLASSNAME = 'jql-validation-tooltip-exit';
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { Plugin } from '@atlaskit/editor-prosemirror/state';
|
|
2
|
+
import { JQLValidationTooltipPluginKey } from './constants';
|
|
3
|
+
import { ValidationTooltipPluginView } from './view';
|
|
4
|
+
const validationTooltipPlugin = mainId => {
|
|
5
|
+
const plugin = new Plugin({
|
|
6
|
+
key: JQLValidationTooltipPluginKey,
|
|
7
|
+
view: () => new ValidationTooltipPluginView(mainId),
|
|
8
|
+
state: {
|
|
9
|
+
init() {
|
|
10
|
+
return false;
|
|
11
|
+
},
|
|
12
|
+
// @ts-ignore
|
|
13
|
+
apply(tr, value) {
|
|
14
|
+
if (tr.getMeta(plugin) !== undefined) {
|
|
15
|
+
return tr.getMeta(plugin);
|
|
16
|
+
} else {
|
|
17
|
+
return value;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
props: {
|
|
22
|
+
handleDOMEvents: {
|
|
23
|
+
mouseover: ({
|
|
24
|
+
state,
|
|
25
|
+
dispatch
|
|
26
|
+
}, event) => {
|
|
27
|
+
const isHovered = plugin.getState(state);
|
|
28
|
+
if (event.target instanceof Element && event.target.closest('[data-token-type="error"]')) {
|
|
29
|
+
if (!isHovered) {
|
|
30
|
+
dispatch(state.tr.setMeta(plugin, true));
|
|
31
|
+
}
|
|
32
|
+
} else if (isHovered) {
|
|
33
|
+
dispatch(state.tr.setMeta(plugin, false));
|
|
34
|
+
}
|
|
35
|
+
return false;
|
|
36
|
+
},
|
|
37
|
+
mouseleave: ({
|
|
38
|
+
state,
|
|
39
|
+
dispatch
|
|
40
|
+
}) => {
|
|
41
|
+
const isHovered = plugin.getState(state);
|
|
42
|
+
if (isHovered) {
|
|
43
|
+
dispatch(state.tr.setMeta(plugin, false));
|
|
44
|
+
}
|
|
45
|
+
return false;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
return plugin;
|
|
51
|
+
};
|
|
52
|
+
export default validationTooltipPlugin;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
+
import { JQLSyntaxError } from '@atlaskit/jql-ast';
|
|
3
|
+
import getDocumentPosition from '../common/get-document-position';
|
|
4
|
+
import { getJastFromState } from '../jql-ast';
|
|
5
|
+
import { JQLValidationTooltipPluginKey, TOOLTIP_CLASSNAME, TOOLTIP_ENTER_CLASSNAME, TOOLTIP_EXIT_CLASSNAME } from './constants';
|
|
6
|
+
export class ValidationTooltipPluginView {
|
|
7
|
+
constructor(mainId) {
|
|
8
|
+
var _document$getElementB;
|
|
9
|
+
_defineProperty(this, "showTooltip", (error, start, end) => {
|
|
10
|
+
var _this$tooltip$offsetP, _box$left, _box$top;
|
|
11
|
+
// Find a center position from the selection endpoints
|
|
12
|
+
const left = (start.left + end.left) / 2;
|
|
13
|
+
|
|
14
|
+
// The box in which the container is positioned, to use as base
|
|
15
|
+
const box = (_this$tooltip$offsetP = this.tooltip.offsetParent) === null || _this$tooltip$offsetP === void 0 ? void 0 : _this$tooltip$offsetP.getBoundingClientRect();
|
|
16
|
+
this.tooltip.style.left = `${left - ((_box$left = box === null || box === void 0 ? void 0 : box.left) !== null && _box$left !== void 0 ? _box$left : 0)}px`;
|
|
17
|
+
this.tooltip.style.top = `${start.top - ((_box$top = box === null || box === void 0 ? void 0 : box.top) !== null && _box$top !== void 0 ? _box$top : 0)}px`;
|
|
18
|
+
this.tooltip.textContent = error.message;
|
|
19
|
+
this.tooltip.classList.remove(TOOLTIP_EXIT_CLASSNAME);
|
|
20
|
+
this.tooltip.classList.add(TOOLTIP_ENTER_CLASSNAME);
|
|
21
|
+
});
|
|
22
|
+
_defineProperty(this, "hideTooltip", () => {
|
|
23
|
+
this.tooltip.classList.remove(TOOLTIP_ENTER_CLASSNAME);
|
|
24
|
+
this.tooltip.classList.add(TOOLTIP_EXIT_CLASSNAME);
|
|
25
|
+
});
|
|
26
|
+
this.tooltip = document.createElement('div');
|
|
27
|
+
this.tooltip.setAttribute('data-testid', 'jql-validation-tooltip');
|
|
28
|
+
this.tooltip.classList.add(TOOLTIP_CLASSNAME);
|
|
29
|
+
(_document$getElementB = document.getElementById(mainId)) === null || _document$getElementB === void 0 ? void 0 : _document$getElementB.appendChild(this.tooltip);
|
|
30
|
+
}
|
|
31
|
+
update(view, lastState) {
|
|
32
|
+
const state = view.state;
|
|
33
|
+
const isHovered = JQLValidationTooltipPluginKey.getState(state);
|
|
34
|
+
const lastIsHovered = JQLValidationTooltipPluginKey.getState(lastState);
|
|
35
|
+
const jast = getJastFromState(state);
|
|
36
|
+
const [error] = jast.errors;
|
|
37
|
+
if (isHovered === lastIsHovered) {
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
if (isHovered) {
|
|
41
|
+
if (error instanceof JQLSyntaxError) {
|
|
42
|
+
const start = getDocumentPosition(state.doc, error.start);
|
|
43
|
+
const stop = getDocumentPosition(state.doc, error.stop);
|
|
44
|
+
const startCoords = view.coordsAtPos(start);
|
|
45
|
+
const stopCoords = view.coordsAtPos(stop);
|
|
46
|
+
this.showTooltip(error, startCoords, stopCoords);
|
|
47
|
+
}
|
|
48
|
+
} else {
|
|
49
|
+
this.hideTooltip();
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
destroy() {
|
|
53
|
+
this.tooltip.remove();
|
|
54
|
+
}
|
|
55
|
+
}
|