-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into cases-user-suggestions-be
- Loading branch information
Showing
109 changed files
with
1,386 additions
and
490 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
134 changes: 134 additions & 0 deletions
134
packages/core/notifications/core-notifications-browser-internal/BUILD.bazel
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,134 @@ | ||
load("@npm//@bazel/typescript:index.bzl", "ts_config") | ||
load("@build_bazel_rules_nodejs//:index.bzl", "js_library") | ||
load("//src/dev/bazel:index.bzl", "jsts_transpiler", "pkg_npm", "pkg_npm_types", "ts_project") | ||
|
||
PKG_DIRNAME = "core-notifications-browser-internal" | ||
PKG_REQUIRE_NAME = "@kbn/core-notifications-browser-internal" | ||
|
||
SOURCE_FILES = glob( | ||
[ | ||
"src/**/*.ts", | ||
"src/**/*.tsx", | ||
], | ||
exclude = [ | ||
"**/*.test.*", | ||
"**/*.stories.*", | ||
], | ||
) | ||
|
||
SRCS = SOURCE_FILES | ||
|
||
filegroup( | ||
name = "srcs", | ||
srcs = SRCS, | ||
) | ||
|
||
NPM_MODULE_EXTRA_FILES = [ | ||
"package.json", | ||
] | ||
|
||
RUNTIME_DEPS = [ | ||
"@npm//react", | ||
"@npm//react-dom", | ||
"@npm//rxjs", | ||
"@npm//lodash", | ||
"@npm//@elastic/eui", | ||
"@npm//enzyme", | ||
"//packages/kbn-i18n", | ||
"//packages/kbn-i18n-react", | ||
"//packages/core/theme/core-theme-browser-internal", | ||
"//packages/core/overlays/core-overlays-browser-mocks", | ||
"//packages/core/theme/core-theme-browser-mocks", | ||
"//packages/core/ui-settings/core-ui-settings-browser-mocks", | ||
"//packages/core/mount-utils/core-mount-utils-browser-internal", | ||
] | ||
|
||
TYPES_DEPS = [ | ||
"@npm//@types/node", | ||
"@npm//@types/jest", | ||
"@npm//@types/react", | ||
"@npm//@types/react-dom", | ||
"@npm//rxjs", | ||
"@npm//lodash", | ||
"@npm//@elastic/eui", | ||
"@npm//enzyme", | ||
"//packages/kbn-i18n-react:npm_module_types", | ||
"//packages/kbn-i18n:npm_module_types", | ||
"//packages/kbn-utility-types:npm_module_types", | ||
"//packages/core/theme/core-theme-browser:npm_module_types", | ||
"//packages/core/theme/core-theme-browser-internal:npm_module_types", | ||
"//packages/core/i18n/core-i18n-browser:npm_module_types", | ||
"//packages/core/ui-settings/core-ui-settings-browser:npm_module_types", | ||
"//packages/core/overlays/core-overlays-browser:npm_module_types", | ||
"//packages/core/notifications/core-notifications-browser:npm_module_types", | ||
"//packages/core/mount-utils/core-mount-utils-browser-internal:npm_module_types", | ||
] | ||
|
||
jsts_transpiler( | ||
name = "target_node", | ||
srcs = SRCS, | ||
build_pkg_name = package_name(), | ||
) | ||
|
||
jsts_transpiler( | ||
name = "target_web", | ||
srcs = SRCS, | ||
build_pkg_name = package_name(), | ||
web = True, | ||
) | ||
|
||
ts_config( | ||
name = "tsconfig", | ||
src = "tsconfig.json", | ||
deps = [ | ||
"//:tsconfig.base.json", | ||
"//:tsconfig.bazel.json", | ||
], | ||
) | ||
|
||
ts_project( | ||
name = "tsc_types", | ||
args = ['--pretty'], | ||
srcs = SRCS, | ||
deps = TYPES_DEPS, | ||
declaration = True, | ||
declaration_map = True, | ||
emit_declaration_only = True, | ||
out_dir = "target_types", | ||
root_dir = "src", | ||
tsconfig = ":tsconfig", | ||
) | ||
|
||
js_library( | ||
name = PKG_DIRNAME, | ||
srcs = NPM_MODULE_EXTRA_FILES, | ||
deps = RUNTIME_DEPS + [":target_node", ":target_web"], | ||
package_name = PKG_REQUIRE_NAME, | ||
visibility = ["//visibility:public"], | ||
) | ||
|
||
pkg_npm( | ||
name = "npm_module", | ||
deps = [":" + PKG_DIRNAME], | ||
) | ||
|
||
filegroup( | ||
name = "build", | ||
srcs = [":npm_module"], | ||
visibility = ["//visibility:public"], | ||
) | ||
|
||
pkg_npm_types( | ||
name = "npm_module_types", | ||
srcs = SRCS, | ||
deps = [":tsc_types"], | ||
package_name = PKG_REQUIRE_NAME, | ||
tsconfig = ":tsconfig", | ||
visibility = ["//visibility:public"], | ||
) | ||
|
||
filegroup( | ||
name = "build_types", | ||
srcs = [":npm_module_types"], | ||
visibility = ["//visibility:public"], | ||
) |
3 changes: 3 additions & 0 deletions
3
packages/core/notifications/core-notifications-browser-internal/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# @kbn/core-notifications-browser-internal | ||
|
||
This package contains the implementation and internal types for core's browser-side notifications service. |
13 changes: 13 additions & 0 deletions
13
packages/core/notifications/core-notifications-browser-internal/jest.config.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0 and the Server Side Public License, v 1; you may not use this file except | ||
* in compliance with, at your election, the Elastic License 2.0 or the Server | ||
* Side Public License, v 1. | ||
*/ | ||
|
||
module.exports = { | ||
preset: '@kbn/test', | ||
rootDir: '../../../..', | ||
roots: ['<rootDir>/packages/core/notifications/core-notifications-browser-internal'], | ||
}; |
8 changes: 8 additions & 0 deletions
8
packages/core/notifications/core-notifications-browser-internal/package.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"name": "@kbn/core-notifications-browser-internal", | ||
"private": true, | ||
"version": "1.0.0", | ||
"main": "./target_node/index.js", | ||
"browser": "./target_web/index.js", | ||
"license": "SSPL-1.0 OR Elastic License 2.0" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
packages/core/notifications/core-notifications-browser-internal/src/toasts/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0 and the Server Side Public License, v 1; you may not use this file except | ||
* in compliance with, at your election, the Elastic License 2.0 or the Server | ||
* Side Public License, v 1. | ||
*/ | ||
|
||
export { ToastsService } from './toasts_service'; | ||
export type { ToastsApi } from './toasts_api'; |
File renamed without changes.
Oops, something went wrong.