mirror of
https://github.com/grafana/grafana.git
synced 2025-07-31 10:52:40 +08:00

* refactor(frontend): update runtime import paths for grafana/runtime/src -> grafana/runtime * feat(runtime): introduce internal api entrypoint and exports property * refactor(frontend): update runtime imports to use internal entrypoint * chore(betterer): update results file * refactor(bookmarks): update runtime/unstable import * chore(betterer): update results file * test(frontend): fix failing tests due to mocking nested runtime imports * test(datasourcesrv): fix failing tests due to mocks * chore(alerting): clean up redundant import * fix(packages): fix default require export pointing to types declaration file * docs(packages): update readme related to exports * chore(internationalization): fix import paths * chore(betterer): update results file
13 lines
505 B
TypeScript
13 lines
505 B
TypeScript
import { config } from '@grafana/runtime';
|
|
|
|
// https://html.spec.whatwg.org/multipage/input.html#valid-e-mail-address
|
|
export const w3cStandardEmailValidator =
|
|
/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;
|
|
|
|
export function isTrial() {
|
|
const expiry = config.licenseInfo?.trialExpiry;
|
|
return !!(expiry && expiry > 0);
|
|
}
|
|
|
|
export const highlightTrial = () => isTrial() && config.featureToggles.featureHighlights;
|