@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,129 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.ReactNodeView = void 0;
|
|
9
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
11
|
+
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
12
|
+
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
13
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
14
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
15
|
+
var _Subject = require("rxjs/Subject");
|
|
16
|
+
var _uuid = require("uuid");
|
|
17
|
+
var _state = require("../../../state");
|
|
18
|
+
var _constants = require("../constants");
|
|
19
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
20
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
21
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
22
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
23
|
+
var ReactNodeView = exports.ReactNodeView = /*#__PURE__*/function () {
|
|
24
|
+
function ReactNodeView(component, portalActions, _node) {
|
|
25
|
+
var _this = this;
|
|
26
|
+
(0, _classCallCheck2.default)(this, ReactNodeView);
|
|
27
|
+
(0, _defineProperty2.default)(this, "componentSubject", new _Subject.Subject());
|
|
28
|
+
(0, _defineProperty2.default)(this, "init", function (decorations) {
|
|
29
|
+
var Component = _this.component;
|
|
30
|
+
var PortallingComponent = function PortallingComponent() {
|
|
31
|
+
var _useState = (0, _react.useState)(_objectSpread(_objectSpread({}, _this.getProps(_this.node)), {}, {
|
|
32
|
+
selected: _this.isSelected(decorations),
|
|
33
|
+
error: _this.hasError(decorations)
|
|
34
|
+
})),
|
|
35
|
+
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
36
|
+
state = _useState2[0],
|
|
37
|
+
setState = _useState2[1];
|
|
38
|
+
|
|
39
|
+
// ProseMirror keeps decorations on blur (as those are derived from editor state and focus isn't part of it),
|
|
40
|
+
// but we don't want to show node views as selected when that happens. We could build a workaround for this in
|
|
41
|
+
// richInlineNodesPlugin, but this hook will make selection behave more consistently with other focus-related features.
|
|
42
|
+
var _useEditorViewHasFocu = (0, _state.useEditorViewHasFocus)(),
|
|
43
|
+
_useEditorViewHasFocu2 = (0, _slicedToArray2.default)(_useEditorViewHasFocu, 1),
|
|
44
|
+
hasFocus = _useEditorViewHasFocu2[0];
|
|
45
|
+
(0, _react.useEffect)(function () {
|
|
46
|
+
// Subscribe to the RxJS subject so concrete subclasses can emit events to re-render the node view component
|
|
47
|
+
var subscription = _this.componentSubject.subscribe(function (props) {
|
|
48
|
+
setState(props);
|
|
49
|
+
});
|
|
50
|
+
return function () {
|
|
51
|
+
return subscription.unsubscribe();
|
|
52
|
+
};
|
|
53
|
+
}, []);
|
|
54
|
+
(0, _react.useLayoutEffect)(function () {
|
|
55
|
+
if (state.error) {
|
|
56
|
+
_this.dom.dataset.tokenType = 'error';
|
|
57
|
+
} else {
|
|
58
|
+
delete _this.dom.dataset.tokenType;
|
|
59
|
+
}
|
|
60
|
+
}, [state]);
|
|
61
|
+
return /*#__PURE__*/_react.default.createElement(Component, (0, _extends2.default)({}, state, {
|
|
62
|
+
selected: state.selected && hasFocus
|
|
63
|
+
}));
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
// Ok, this is a tricky one. As everything that requires collaboration between ProseMirror and React.
|
|
67
|
+
//
|
|
68
|
+
// If we run `onCreatePortal` synchronously, ProseMirror won't insert the node view container (`this.dom`)
|
|
69
|
+
// immediately into the DOM (as init function hasn't returned yet). This can trigger race conditions in other
|
|
70
|
+
// code paths where ProseMirror may try to get DOM position for this node view before it has been inserted
|
|
71
|
+
// (e.g. calculating new autocomplete position after insertion, or setting selection after the node).
|
|
72
|
+
//
|
|
73
|
+
// With `queueMicrotask` we can schedule this operation to be run after ProseMirror is done with the element
|
|
74
|
+
// insertion, but before control of the execution context is returned to the browser's event loop. This should
|
|
75
|
+
// prevent all conflicts with other pieces of asynchronous code and still render the portal as soon as it is
|
|
76
|
+
// practically possible, so we can avoid flicker in situations where node views are reconstructed by ProseMirror.
|
|
77
|
+
// @see https://github.com/ProseMirror/prosemirror/issues/872
|
|
78
|
+
queueMicrotask(function () {
|
|
79
|
+
_this.portalActions.onCreatePortal(_this.portalKey, /*#__PURE__*/_react.default.createElement(PortallingComponent, null), _this.dom);
|
|
80
|
+
});
|
|
81
|
+
return _this;
|
|
82
|
+
});
|
|
83
|
+
(0, _defineProperty2.default)(this, "destroy", function () {
|
|
84
|
+
_this.portalActions.onDestroyPortal(_this.portalKey);
|
|
85
|
+
});
|
|
86
|
+
(0, _defineProperty2.default)(this, "update", function (node, decorations) {
|
|
87
|
+
// Update function may be called by ProseMirror with a node that has nothing to do with this node view ¯\_(ツ)_/¯
|
|
88
|
+
// @see https://prosemirror.net/docs/ref/#view.NodeView.update
|
|
89
|
+
if (node !== _this.node) {
|
|
90
|
+
return false;
|
|
91
|
+
}
|
|
92
|
+
_this.componentSubject.next(_objectSpread(_objectSpread({}, _this.getProps(node)), {}, {
|
|
93
|
+
selected: _this.isSelected(decorations),
|
|
94
|
+
error: _this.hasError(decorations)
|
|
95
|
+
}));
|
|
96
|
+
return true;
|
|
97
|
+
});
|
|
98
|
+
(0, _defineProperty2.default)(this, "getProps", function (node) {
|
|
99
|
+
return _objectSpread({}, node.attrs);
|
|
100
|
+
});
|
|
101
|
+
(0, _defineProperty2.default)(this, "isSelected", function (decorations) {
|
|
102
|
+
return decorations.some(function (decoration) {
|
|
103
|
+
return decoration.spec.type === _constants.SELECTED_NODE;
|
|
104
|
+
});
|
|
105
|
+
});
|
|
106
|
+
(0, _defineProperty2.default)(this, "hasError", function (decorations) {
|
|
107
|
+
return decorations.some(function (decoration) {
|
|
108
|
+
return decoration.spec.type === _constants.ERROR_NODE;
|
|
109
|
+
});
|
|
110
|
+
});
|
|
111
|
+
this.component = component;
|
|
112
|
+
this.portalActions = portalActions;
|
|
113
|
+
this.node = _node;
|
|
114
|
+
// Generate unique portal identifier
|
|
115
|
+
// If you read this comment in the future and TypeScript has added support for Symbols as object keys, please do
|
|
116
|
+
// JQL Editor a favor and replace this library with the native JS functionality that TS was supposed to support.
|
|
117
|
+
this.portalKey = (0, _uuid.v4)();
|
|
118
|
+
// Creating span under the assumption that all node views will be inline elements in JQL Editor
|
|
119
|
+
this.dom = document.createElement('span');
|
|
120
|
+
this.dom.setAttribute('data-testid', 'jql-editor-node-view');
|
|
121
|
+
}
|
|
122
|
+
(0, _createClass2.default)(ReactNodeView, null, [{
|
|
123
|
+
key: "for",
|
|
124
|
+
value: function _for(component, portalActions, node, decorations) {
|
|
125
|
+
return new ReactNodeView(component, portalActions, node).init(decorations);
|
|
126
|
+
}
|
|
127
|
+
}]);
|
|
128
|
+
return ReactNodeView;
|
|
129
|
+
}();
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.replaceRichInlineNodes = void 0;
|
|
8
|
+
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
9
|
+
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
10
|
+
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
11
|
+
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
|
|
12
|
+
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
13
|
+
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
14
|
+
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
15
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
16
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
17
|
+
var _jqlAst = require("@atlaskit/jql-ast");
|
|
18
|
+
var _schema = require("../../../schema");
|
|
19
|
+
var _getDocumentPosition = _interopRequireDefault(require("../../common/get-document-position"));
|
|
20
|
+
var _jqlAst2 = require("../../jql-ast");
|
|
21
|
+
var _constants = require("../constants");
|
|
22
|
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
23
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
24
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
25
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
26
|
+
var replaceRichInlineNodes = exports.replaceRichInlineNodes = function replaceRichInlineNodes(editorState, hydratedValues) {
|
|
27
|
+
var ast = (0, _jqlAst2.getJastFromState)(editorState);
|
|
28
|
+
var transaction = editorState.tr;
|
|
29
|
+
// Do not allow users to revert this transaction with undo command so they can't land in an unhydrated state
|
|
30
|
+
transaction.setMeta('addToHistory', false);
|
|
31
|
+
Object.entries(hydratedValues).forEach(function (_ref) {
|
|
32
|
+
var _ref2 = (0, _slicedToArray2.default)(_ref, 2),
|
|
33
|
+
fieldName = _ref2[0],
|
|
34
|
+
values = _ref2[1];
|
|
35
|
+
values.forEach(function (value) {
|
|
36
|
+
if (value.type === 'user') {
|
|
37
|
+
var astNodes = getValueNodes(ast, fieldName, value.id);
|
|
38
|
+
astNodes.forEach(function (astNode) {
|
|
39
|
+
if (astNode.position) {
|
|
40
|
+
var _astNode$position = (0, _slicedToArray2.default)(astNode.position, 2),
|
|
41
|
+
from = _astNode$position[0],
|
|
42
|
+
to = _astNode$position[1];
|
|
43
|
+
var documentFrom = (0, _getDocumentPosition.default)(transaction.doc, from);
|
|
44
|
+
if (!isRichInlineNode(transaction.doc, documentFrom)) {
|
|
45
|
+
var documentTo = (0, _getDocumentPosition.default)(transaction.doc, to);
|
|
46
|
+
var node = getRichInlineNode(fieldName, value, astNode.text);
|
|
47
|
+
transaction.replaceWith(documentFrom, documentTo, node);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
});
|
|
54
|
+
return transaction;
|
|
55
|
+
};
|
|
56
|
+
var getRichInlineNode = function getRichInlineNode(fieldName, value, text) {
|
|
57
|
+
switch (value.type) {
|
|
58
|
+
case 'user':
|
|
59
|
+
{
|
|
60
|
+
var textContent = _schema.JQLEditorSchema.text(text);
|
|
61
|
+
return _schema.JQLEditorSchema.nodes.user.create(_objectSpread(_objectSpread({}, value), {}, {
|
|
62
|
+
fieldName: fieldName
|
|
63
|
+
}), textContent);
|
|
64
|
+
}
|
|
65
|
+
default:
|
|
66
|
+
{
|
|
67
|
+
throw new Error("Unsupported hydrated value type ".concat(value.type));
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
var isRichInlineNode = function isRichInlineNode(doc, position) {
|
|
72
|
+
var _doc$resolve$nodeAfte;
|
|
73
|
+
return ((_doc$resolve$nodeAfte = doc.resolve(position).nodeAfter) === null || _doc$resolve$nodeAfte === void 0 ? void 0 : _doc$resolve$nodeAfte.type.spec.group) === _constants.RICH_INLINE_NODE;
|
|
74
|
+
};
|
|
75
|
+
var getValueNodes = function getValueNodes(ast, field, value) {
|
|
76
|
+
if (!ast.query) {
|
|
77
|
+
return [];
|
|
78
|
+
}
|
|
79
|
+
return ast.query.accept(new FindValuesVisitor(field, value));
|
|
80
|
+
};
|
|
81
|
+
var FindValuesVisitor = /*#__PURE__*/function (_AbstractJastVisitor) {
|
|
82
|
+
(0, _inherits2.default)(FindValuesVisitor, _AbstractJastVisitor);
|
|
83
|
+
var _super = _createSuper(FindValuesVisitor);
|
|
84
|
+
function FindValuesVisitor(field, value) {
|
|
85
|
+
var _this;
|
|
86
|
+
(0, _classCallCheck2.default)(this, FindValuesVisitor);
|
|
87
|
+
_this = _super.call(this);
|
|
88
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "visitQuery", function (query) {
|
|
89
|
+
if (query.where === undefined) {
|
|
90
|
+
return [];
|
|
91
|
+
}
|
|
92
|
+
return query.where.accept((0, _assertThisInitialized2.default)(_this));
|
|
93
|
+
});
|
|
94
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "visitCompoundClause", function (compoundClause) {
|
|
95
|
+
return compoundClause.clauses.reduce(function (operands, compoundClause) {
|
|
96
|
+
return [].concat((0, _toConsumableArray2.default)(operands), (0, _toConsumableArray2.default)(compoundClause.accept((0, _assertThisInitialized2.default)(_this))));
|
|
97
|
+
}, []);
|
|
98
|
+
});
|
|
99
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "visitTerminalClause", function (terminalClause) {
|
|
100
|
+
if (terminalClause.field.value !== _this.field) {
|
|
101
|
+
return [];
|
|
102
|
+
}
|
|
103
|
+
if (terminalClause.operand === undefined) {
|
|
104
|
+
return [];
|
|
105
|
+
}
|
|
106
|
+
return terminalClause.operand.accept((0, _assertThisInitialized2.default)(_this));
|
|
107
|
+
});
|
|
108
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "visitNotClause", function (notClause) {
|
|
109
|
+
return notClause.clause.accept((0, _assertThisInitialized2.default)(_this));
|
|
110
|
+
});
|
|
111
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "visitValueOperand", function (valueOperand) {
|
|
112
|
+
if (valueOperand.value !== _this.value) {
|
|
113
|
+
return [];
|
|
114
|
+
}
|
|
115
|
+
return [valueOperand];
|
|
116
|
+
});
|
|
117
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "visitListOperand", function (listOperand) {
|
|
118
|
+
return listOperand.values.reduce(function (values, operand) {
|
|
119
|
+
return [].concat((0, _toConsumableArray2.default)(values), (0, _toConsumableArray2.default)(operand.accept((0, _assertThisInitialized2.default)(_this))));
|
|
120
|
+
}, []);
|
|
121
|
+
});
|
|
122
|
+
_this.field = field;
|
|
123
|
+
_this.value = value;
|
|
124
|
+
return _this;
|
|
125
|
+
}
|
|
126
|
+
(0, _createClass2.default)(FindValuesVisitor, [{
|
|
127
|
+
key: "aggregateResult",
|
|
128
|
+
value: function aggregateResult(aggregate, nextResult) {
|
|
129
|
+
return [].concat((0, _toConsumableArray2.default)(aggregate), (0, _toConsumableArray2.default)(nextResult));
|
|
130
|
+
}
|
|
131
|
+
}, {
|
|
132
|
+
key: "defaultResult",
|
|
133
|
+
value: function defaultResult() {
|
|
134
|
+
return [];
|
|
135
|
+
}
|
|
136
|
+
}]);
|
|
137
|
+
return FindValuesVisitor;
|
|
138
|
+
}(_jqlAst.AbstractJastVisitor);
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.TOOLTIP_EXIT_CLASSNAME = exports.TOOLTIP_ENTER_CLASSNAME = exports.TOOLTIP_CLASSNAME = exports.JQLValidationTooltipPluginKey = void 0;
|
|
7
|
+
var _state = require("@atlaskit/editor-prosemirror/state");
|
|
8
|
+
var JQLValidationTooltipPluginKey = exports.JQLValidationTooltipPluginKey = new _state.PluginKey('jql-validation-tooltip-plugin');
|
|
9
|
+
var TOOLTIP_CLASSNAME = exports.TOOLTIP_CLASSNAME = 'jql-validation-tooltip';
|
|
10
|
+
var TOOLTIP_ENTER_CLASSNAME = exports.TOOLTIP_ENTER_CLASSNAME = 'jql-validation-tooltip-enter';
|
|
11
|
+
var TOOLTIP_EXIT_CLASSNAME = exports.TOOLTIP_EXIT_CLASSNAME = 'jql-validation-tooltip-exit';
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _state = require("@atlaskit/editor-prosemirror/state");
|
|
8
|
+
var _constants = require("./constants");
|
|
9
|
+
var _view = require("./view");
|
|
10
|
+
var validationTooltipPlugin = function validationTooltipPlugin(mainId) {
|
|
11
|
+
var plugin = new _state.Plugin({
|
|
12
|
+
key: _constants.JQLValidationTooltipPluginKey,
|
|
13
|
+
view: function view() {
|
|
14
|
+
return new _view.ValidationTooltipPluginView(mainId);
|
|
15
|
+
},
|
|
16
|
+
state: {
|
|
17
|
+
init: function init() {
|
|
18
|
+
return false;
|
|
19
|
+
},
|
|
20
|
+
// @ts-ignore
|
|
21
|
+
apply: function apply(tr, value) {
|
|
22
|
+
if (tr.getMeta(plugin) !== undefined) {
|
|
23
|
+
return tr.getMeta(plugin);
|
|
24
|
+
} else {
|
|
25
|
+
return value;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
props: {
|
|
30
|
+
handleDOMEvents: {
|
|
31
|
+
mouseover: function mouseover(_ref, event) {
|
|
32
|
+
var state = _ref.state,
|
|
33
|
+
dispatch = _ref.dispatch;
|
|
34
|
+
var isHovered = plugin.getState(state);
|
|
35
|
+
if (event.target instanceof Element && event.target.closest('[data-token-type="error"]')) {
|
|
36
|
+
if (!isHovered) {
|
|
37
|
+
dispatch(state.tr.setMeta(plugin, true));
|
|
38
|
+
}
|
|
39
|
+
} else if (isHovered) {
|
|
40
|
+
dispatch(state.tr.setMeta(plugin, false));
|
|
41
|
+
}
|
|
42
|
+
return false;
|
|
43
|
+
},
|
|
44
|
+
mouseleave: function mouseleave(_ref2) {
|
|
45
|
+
var state = _ref2.state,
|
|
46
|
+
dispatch = _ref2.dispatch;
|
|
47
|
+
var isHovered = plugin.getState(state);
|
|
48
|
+
if (isHovered) {
|
|
49
|
+
dispatch(state.tr.setMeta(plugin, false));
|
|
50
|
+
}
|
|
51
|
+
return false;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
return plugin;
|
|
57
|
+
};
|
|
58
|
+
var _default = exports.default = validationTooltipPlugin;
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.ValidationTooltipPluginView = void 0;
|
|
8
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
9
|
+
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
10
|
+
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
11
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
12
|
+
var _jqlAst = require("@atlaskit/jql-ast");
|
|
13
|
+
var _getDocumentPosition = _interopRequireDefault(require("../common/get-document-position"));
|
|
14
|
+
var _jqlAst2 = require("../jql-ast");
|
|
15
|
+
var _constants = require("./constants");
|
|
16
|
+
var ValidationTooltipPluginView = exports.ValidationTooltipPluginView = /*#__PURE__*/function () {
|
|
17
|
+
function ValidationTooltipPluginView(mainId) {
|
|
18
|
+
var _this = this,
|
|
19
|
+
_document$getElementB;
|
|
20
|
+
(0, _classCallCheck2.default)(this, ValidationTooltipPluginView);
|
|
21
|
+
(0, _defineProperty2.default)(this, "showTooltip", function (error, start, end) {
|
|
22
|
+
var _this$tooltip$offsetP, _box$left, _box$top;
|
|
23
|
+
// Find a center position from the selection endpoints
|
|
24
|
+
var left = (start.left + end.left) / 2;
|
|
25
|
+
|
|
26
|
+
// The box in which the container is positioned, to use as base
|
|
27
|
+
var box = (_this$tooltip$offsetP = _this.tooltip.offsetParent) === null || _this$tooltip$offsetP === void 0 ? void 0 : _this$tooltip$offsetP.getBoundingClientRect();
|
|
28
|
+
_this.tooltip.style.left = "".concat(left - ((_box$left = box === null || box === void 0 ? void 0 : box.left) !== null && _box$left !== void 0 ? _box$left : 0), "px");
|
|
29
|
+
_this.tooltip.style.top = "".concat(start.top - ((_box$top = box === null || box === void 0 ? void 0 : box.top) !== null && _box$top !== void 0 ? _box$top : 0), "px");
|
|
30
|
+
_this.tooltip.textContent = error.message;
|
|
31
|
+
_this.tooltip.classList.remove(_constants.TOOLTIP_EXIT_CLASSNAME);
|
|
32
|
+
_this.tooltip.classList.add(_constants.TOOLTIP_ENTER_CLASSNAME);
|
|
33
|
+
});
|
|
34
|
+
(0, _defineProperty2.default)(this, "hideTooltip", function () {
|
|
35
|
+
_this.tooltip.classList.remove(_constants.TOOLTIP_ENTER_CLASSNAME);
|
|
36
|
+
_this.tooltip.classList.add(_constants.TOOLTIP_EXIT_CLASSNAME);
|
|
37
|
+
});
|
|
38
|
+
this.tooltip = document.createElement('div');
|
|
39
|
+
this.tooltip.setAttribute('data-testid', 'jql-validation-tooltip');
|
|
40
|
+
this.tooltip.classList.add(_constants.TOOLTIP_CLASSNAME);
|
|
41
|
+
(_document$getElementB = document.getElementById(mainId)) === null || _document$getElementB === void 0 || _document$getElementB.appendChild(this.tooltip);
|
|
42
|
+
}
|
|
43
|
+
(0, _createClass2.default)(ValidationTooltipPluginView, [{
|
|
44
|
+
key: "update",
|
|
45
|
+
value: function update(view, lastState) {
|
|
46
|
+
var state = view.state;
|
|
47
|
+
var isHovered = _constants.JQLValidationTooltipPluginKey.getState(state);
|
|
48
|
+
var lastIsHovered = _constants.JQLValidationTooltipPluginKey.getState(lastState);
|
|
49
|
+
var jast = (0, _jqlAst2.getJastFromState)(state);
|
|
50
|
+
var _jast$errors = (0, _slicedToArray2.default)(jast.errors, 1),
|
|
51
|
+
error = _jast$errors[0];
|
|
52
|
+
if (isHovered === lastIsHovered) {
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
if (isHovered) {
|
|
56
|
+
if (error instanceof _jqlAst.JQLSyntaxError) {
|
|
57
|
+
var start = (0, _getDocumentPosition.default)(state.doc, error.start);
|
|
58
|
+
var stop = (0, _getDocumentPosition.default)(state.doc, error.stop);
|
|
59
|
+
var startCoords = view.coordsAtPos(start);
|
|
60
|
+
var stopCoords = view.coordsAtPos(stop);
|
|
61
|
+
this.showTooltip(error, startCoords, stopCoords);
|
|
62
|
+
}
|
|
63
|
+
} else {
|
|
64
|
+
this.hideTooltip();
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}, {
|
|
68
|
+
key: "destroy",
|
|
69
|
+
value: function destroy() {
|
|
70
|
+
this.tooltip.remove();
|
|
71
|
+
}
|
|
72
|
+
}]);
|
|
73
|
+
return ValidationTooltipPluginView;
|
|
74
|
+
}();
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.defaultEditorState = exports.configurePlugins = exports.clipboardTextSerializer = exports.clipboardTextParser = exports.JQLEditorSchema = void 0;
|
|
8
|
+
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
9
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
10
|
+
var _mapValues = _interopRequireDefault(require("lodash/mapValues"));
|
|
11
|
+
var _commands = require("@atlaskit/editor-prosemirror/commands");
|
|
12
|
+
var _history = require("@atlaskit/editor-prosemirror/history");
|
|
13
|
+
var _keymap = require("@atlaskit/editor-prosemirror/keymap");
|
|
14
|
+
var _model = require("@atlaskit/editor-prosemirror/model");
|
|
15
|
+
var _state = require("@atlaskit/editor-prosemirror/state");
|
|
16
|
+
var _plugins = require("../plugins");
|
|
17
|
+
var _constants = require("../plugins/rich-inline-nodes/constants");
|
|
18
|
+
var _nodes = require("../plugins/rich-inline-nodes/nodes");
|
|
19
|
+
var _createNodeSpec = require("../plugins/rich-inline-nodes/util/create-node-spec");
|
|
20
|
+
var _documentText = require("../utils/document-text");
|
|
21
|
+
var _splitTextByNewLine = require("../utils/split-text-by-new-line");
|
|
22
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
23
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
24
|
+
var createMarkWithStyle = function createMarkWithStyle(tokenType) {
|
|
25
|
+
var mark = document.createElement('span');
|
|
26
|
+
mark.className = "mark-token-".concat(tokenType);
|
|
27
|
+
mark.setAttribute('data-token-type', tokenType);
|
|
28
|
+
mark.setAttribute('spellcheck', 'false');
|
|
29
|
+
return mark;
|
|
30
|
+
};
|
|
31
|
+
var JQLEditorSchema = exports.JQLEditorSchema = new _model.Schema({
|
|
32
|
+
nodes: _objectSpread({
|
|
33
|
+
doc: {
|
|
34
|
+
content: 'paragraph+'
|
|
35
|
+
},
|
|
36
|
+
paragraph: {
|
|
37
|
+
content: "(text|".concat(_constants.RICH_INLINE_NODE, ")*"),
|
|
38
|
+
toDOM: function toDOM() {
|
|
39
|
+
return ['p', {
|
|
40
|
+
spellcheck: 'false'
|
|
41
|
+
}, 0];
|
|
42
|
+
},
|
|
43
|
+
parseDOM: [{
|
|
44
|
+
tag: 'p'
|
|
45
|
+
}]
|
|
46
|
+
},
|
|
47
|
+
text: {}
|
|
48
|
+
}, (0, _mapValues.default)(_nodes.richInlineNodes, function (spec, name) {
|
|
49
|
+
return (0, _createNodeSpec.createNodeSpec)(name, spec.attrs);
|
|
50
|
+
})),
|
|
51
|
+
marks: {
|
|
52
|
+
token: {
|
|
53
|
+
toDOM: function toDOM(_ref) {
|
|
54
|
+
var attrs = _ref.attrs;
|
|
55
|
+
return createMarkWithStyle(attrs.tokenType);
|
|
56
|
+
},
|
|
57
|
+
attrs: {
|
|
58
|
+
tokenType: {}
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
cursor: {
|
|
62
|
+
toDOM: function toDOM() {
|
|
63
|
+
return document.createElement('span');
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
var domParser = _model.DOMParser.fromSchema(JQLEditorSchema);
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Emulate the behaviour of the default https://prosemirror.net/docs/ref/#view.EditorProps.clipboardTextSerializer but
|
|
72
|
+
* preserves consecutive empty block nodes.
|
|
73
|
+
*/
|
|
74
|
+
var clipboardTextSerializer = exports.clipboardTextSerializer = function clipboardTextSerializer(slice) {
|
|
75
|
+
return (0, _documentText.getFragmentText)(slice.content, 0, slice.content.size);
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* Emulate the behaviour of the default https://prosemirror.net/docs/ref/#view.EditorProps.clipboardTextParser but
|
|
80
|
+
* preserves consecutive empty lines.
|
|
81
|
+
*/
|
|
82
|
+
var clipboardTextParser = exports.clipboardTextParser = function clipboardTextParser(text, $context) {
|
|
83
|
+
var dom = document.createElement('div');
|
|
84
|
+
// Split each line of text and wrap each in a p tag.
|
|
85
|
+
(0, _splitTextByNewLine.splitTextByNewLine)(text).forEach(function (block) {
|
|
86
|
+
dom.appendChild(document.createElement('p')).textContent = block;
|
|
87
|
+
});
|
|
88
|
+
return domParser.parseSlice(dom, {
|
|
89
|
+
context: $context,
|
|
90
|
+
preserveWhitespace: true
|
|
91
|
+
});
|
|
92
|
+
};
|
|
93
|
+
var defaultEditorState = exports.defaultEditorState = _state.EditorState.create({
|
|
94
|
+
schema: JQLEditorSchema
|
|
95
|
+
});
|
|
96
|
+
|
|
97
|
+
// @types/prosemirror-commands@1.0.1 does not export Command and Keymap types
|
|
98
|
+
// TODO: update to Command<JQLEditorSchemaType> and Keymap<JQLEditorSchemaType> if types are bumped to a newer version
|
|
99
|
+
|
|
100
|
+
var configurePlugins = exports.configurePlugins = function configurePlugins(editorState, onSearchCommand, intlRef, mainId, portalActions, enableRichInlineNodes) {
|
|
101
|
+
return editorState.reconfigure({
|
|
102
|
+
plugins: [(0, _history.history)(),
|
|
103
|
+
// Other plugins rely on having AST as part of the state during a transaction, this plugin should be kept first
|
|
104
|
+
(0, _plugins.jqlAstPlugin)(intlRef), (0, _plugins.jqlSyntaxHighlightingPlugin)()].concat((0, _toConsumableArray2.default)(portalActions !== undefined ? [(0, _plugins.autocompletePlugin)(portalActions, enableRichInlineNodes)].concat((0, _toConsumableArray2.default)(enableRichInlineNodes ? [(0, _plugins.richInlineNodesPlugin)(portalActions)] : [])) : []), [(0, _plugins.validationTooltipPlugin)(mainId),
|
|
105
|
+
// Keeping these at the bottom allows plugins to define custom key bindings to override default behavior
|
|
106
|
+
(0, _keymap.keymap)({
|
|
107
|
+
'Mod-z': _history.undo,
|
|
108
|
+
'Mod-Shift-z': _history.redo,
|
|
109
|
+
'Mod-y': _history.redo,
|
|
110
|
+
// Mimic default Enter behavior in PM's base keymap, allowing to insert new lines even when autocomplete is open
|
|
111
|
+
'Shift-Enter': _commands.baseKeymap.Enter
|
|
112
|
+
})], (0, _toConsumableArray2.default)(!onSearchCommand ? [] : [keymapNoRepeat({
|
|
113
|
+
'Mod-Enter': onSearchCommand,
|
|
114
|
+
Enter: onSearchCommand
|
|
115
|
+
})]), [(0, _keymap.keymap)(_commands.baseKeymap)])
|
|
116
|
+
});
|
|
117
|
+
};
|
|
118
|
+
var noopCommand = function noopCommand() {
|
|
119
|
+
return true;
|
|
120
|
+
};
|
|
121
|
+
function keymapNoRepeat(bindings) {
|
|
122
|
+
var handler = (0, _keymap.keydownHandler)(bindings);
|
|
123
|
+
var proxyBindings = (0, _mapValues.default)(bindings, function () {
|
|
124
|
+
return noopCommand;
|
|
125
|
+
});
|
|
126
|
+
var proxyHandler = (0, _keymap.keydownHandler)(proxyBindings);
|
|
127
|
+
return new _state.Plugin({
|
|
128
|
+
props: {
|
|
129
|
+
handleKeyDown: function handleKeyDown(view, event) {
|
|
130
|
+
if (event.repeat) {
|
|
131
|
+
return proxyHandler(view, event);
|
|
132
|
+
}
|
|
133
|
+
return handler(view, event);
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
});
|
|
137
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.onStartAutocompleteEvent = exports.ANALYTICS_DEBOUNCE_MS = void 0;
|
|
7
|
+
var _Subscription = require("rxjs/Subscription");
|
|
8
|
+
var _analytics = require("../../analytics");
|
|
9
|
+
var ANALYTICS_DEBOUNCE_MS = exports.ANALYTICS_DEBOUNCE_MS = 2000;
|
|
10
|
+
var AUTOCOMPLETE_ANALYTICS_MEASURE = 'jql-editor-autocomplete';
|
|
11
|
+
var onStartAutocompleteEvent = exports.onStartAutocompleteEvent = function onStartAutocompleteEvent() {
|
|
12
|
+
return function (_, _ref) {
|
|
13
|
+
var createAndFireAnalyticsEvent = _ref.createAndFireAnalyticsEvent;
|
|
14
|
+
performance.clearMeasures(AUTOCOMPLETE_ANALYTICS_MEASURE);
|
|
15
|
+
performance.clearMarks("".concat(AUTOCOMPLETE_ANALYTICS_MEASURE, "::start"));
|
|
16
|
+
performance.mark("".concat(AUTOCOMPLETE_ANALYTICS_MEASURE, "::start"));
|
|
17
|
+
var timeoutId = null;
|
|
18
|
+
var promise = new Promise(function (resolve) {
|
|
19
|
+
// Resolve the promise after a fixed debounce period
|
|
20
|
+
timeoutId = window.setTimeout(function () {
|
|
21
|
+
resolve();
|
|
22
|
+
}, ANALYTICS_DEBOUNCE_MS);
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
// Create a new subscription which will cancel the analytics promise when unsubscribed
|
|
26
|
+
var analyticsSubscription = new _Subscription.Subscription(function () {
|
|
27
|
+
timeoutId !== null && window.clearTimeout(timeoutId);
|
|
28
|
+
});
|
|
29
|
+
var onStopAutocompleteEvent = function onStopAutocompleteEvent(isSuccess, optionTypes, hasOptions) {
|
|
30
|
+
performance.measure(AUTOCOMPLETE_ANALYTICS_MEASURE, "".concat(AUTOCOMPLETE_ANALYTICS_MEASURE, "::start"));
|
|
31
|
+
var entry = performance.getEntriesByName(AUTOCOMPLETE_ANALYTICS_MEASURE).pop();
|
|
32
|
+
var duration = entry === null || entry === void 0 ? void 0 : entry.duration;
|
|
33
|
+
|
|
34
|
+
// Fire our analytics event once our autocomplete data is fetched AND our debounced promise is resolved
|
|
35
|
+
return promise.then(function () {
|
|
36
|
+
var attributes = {
|
|
37
|
+
optionTypes: optionTypes.sort(),
|
|
38
|
+
hasOptions: hasOptions
|
|
39
|
+
};
|
|
40
|
+
if (duration !== undefined) {
|
|
41
|
+
attributes.duration = duration;
|
|
42
|
+
}
|
|
43
|
+
createAndFireAnalyticsEvent({
|
|
44
|
+
action: isSuccess ? _analytics.Action.RETRIEVED : _analytics.Action.RETRIEVE_FAILED,
|
|
45
|
+
actionSubject: _analytics.ActionSubject.AUTOCOMPLETE_OPTION,
|
|
46
|
+
eventType: _analytics.EventType.OPERATIONAL,
|
|
47
|
+
attributes: attributes
|
|
48
|
+
});
|
|
49
|
+
});
|
|
50
|
+
};
|
|
51
|
+
return {
|
|
52
|
+
analyticsSubscription: analyticsSubscription,
|
|
53
|
+
onStopAutocompleteEvent: onStopAutocompleteEvent
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.sortOperators = exports.ORDERED_OPERATORS = void 0;
|
|
7
|
+
var _map = require("rxjs/operators/map");
|
|
8
|
+
var _jqlAst = require("@atlaskit/jql-ast");
|
|
9
|
+
// Opinionated order in which we want to render operators
|
|
10
|
+
var ORDERED_OPERATORS = exports.ORDERED_OPERATORS = [_jqlAst.OPERATOR_EQUALS, _jqlAst.OPERATOR_NOT_EQUALS, _jqlAst.OPERATOR_LIKE, _jqlAst.OPERATOR_NOT_LIKE, _jqlAst.OPERATOR_LT_EQUALS, _jqlAst.OPERATOR_GT_EQUALS, _jqlAst.OPERATOR_GT, _jqlAst.OPERATOR_LT, _jqlAst.OPERATOR_IS, _jqlAst.OPERATOR_IS_NOT, _jqlAst.OPERATOR_IN, _jqlAst.OPERATOR_NOT_IN, _jqlAst.OPERATOR_WAS, _jqlAst.OPERATOR_WAS_NOT, _jqlAst.OPERATOR_WAS_IN, _jqlAst.OPERATOR_WAS_NOT_IN, _jqlAst.OPERATOR_CHANGED];
|
|
11
|
+
var sortOperators = exports.sortOperators = function sortOperators(operators$) {
|
|
12
|
+
return operators$.pipe((0, _map.map)(function (options) {
|
|
13
|
+
return ORDERED_OPERATORS.reduce(function (result, orderedOperator) {
|
|
14
|
+
var matchingOption = options.find(function (option) {
|
|
15
|
+
return orderedOperator.toLowerCase() === option.value.toLowerCase();
|
|
16
|
+
});
|
|
17
|
+
if (matchingOption !== undefined) {
|
|
18
|
+
result.push(matchingOption);
|
|
19
|
+
}
|
|
20
|
+
return result;
|
|
21
|
+
}, []);
|
|
22
|
+
}));
|
|
23
|
+
};
|