This commit is contained in:
CHEVALLIER Abel
2025-11-13 16:23:22 +01:00
parent de9c515a47
commit cb235644dc
34924 changed files with 3811102 additions and 0 deletions

114
node_modules/ng-zorro-antd/notification/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,114 @@
import * as i0 from '@angular/core';
import { TemplateRef, EventEmitter } from '@angular/core';
import { NzMNComponent, NzMNContainerComponent, NzMNService } from 'ng-zorro-antd/message';
import { Subject } from 'rxjs';
import { NzSafeAny, NgStyleInterface, NgClassInterface } from 'ng-zorro-antd/core/types';
import { Direction } from '@angular/cdk/bidi';
import { NotificationConfig } from 'ng-zorro-antd/core/config';
/**
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE
*/
type NzNotificationPlacement = 'topLeft' | 'topRight' | 'bottomLeft' | 'bottomRight' | 'top' | 'bottom';
type NzNotificationContentType = string | TemplateRef<void | {
$implicit: NzNotificationComponent;
data: NzSafeAny;
}>;
interface NzNotificationDataOptions<T = {}> {
nzKey?: string;
nzStyle?: NgStyleInterface;
nzClass?: NgClassInterface | string;
nzCloseIcon?: TemplateRef<void> | string;
nzButton?: TemplateRef<{
$implicit: NzNotificationComponent;
}>;
nzPlacement?: NzNotificationPlacement;
nzData?: T;
nzDuration?: number;
nzAnimate?: boolean;
nzPauseOnHover?: boolean;
}
interface NzNotificationData {
title?: string | TemplateRef<void>;
content?: NzNotificationContentType;
createdAt?: Date;
messageId?: string;
options?: NzNotificationDataOptions;
state?: 'enter' | 'leave';
template?: TemplateRef<{}>;
type?: 'success' | 'info' | 'warning' | 'error' | 'blank' | string;
onClose?: Subject<boolean>;
onClick?: Subject<MouseEvent>;
}
type NzNotificationRef = Pick<Required<NzNotificationData>, 'onClose' | 'onClick' | 'messageId'>;
declare class NzNotificationComponent extends NzMNComponent {
instance: Required<NzNotificationData>;
index: number;
placement?: string;
readonly destroyed: EventEmitter<{
id: string;
userAction: boolean;
}>;
constructor();
onClick(event: MouseEvent): void;
close(): void;
get state(): string | undefined;
static ɵfac: i0.ɵɵFactoryDeclaration<NzNotificationComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<NzNotificationComponent, "nz-notification", ["nzNotification"], { "instance": { "alias": "instance"; "required": false; }; "index": { "alias": "index"; "required": false; }; "placement": { "alias": "placement"; "required": false; }; }, { "destroyed": "destroyed"; }, never, never, true, never>;
}
/**
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE
*/
declare class NzNotificationContainerComponent extends NzMNContainerComponent<NotificationConfig, NzNotificationData> {
dir: Direction;
bottom?: string | null;
top?: string | null;
topLeftInstances: Array<Required<NzNotificationData>>;
topRightInstances: Array<Required<NzNotificationData>>;
bottomLeftInstances: Array<Required<NzNotificationData>>;
bottomRightInstances: Array<Required<NzNotificationData>>;
topInstances: Array<Required<NzNotificationData>>;
bottomInstances: Array<Required<NzNotificationData>>;
constructor();
create(notification: NzNotificationData): Required<NzNotificationData>;
protected onCreate(instance: NzNotificationData): Required<NzNotificationData>;
protected subscribeConfigChange(): void;
protected updateConfig(): void;
private replaceNotification;
protected readyInstances(): void;
protected mergeOptions(options?: NzNotificationDataOptions): NzNotificationDataOptions;
static ɵfac: i0.ɵɵFactoryDeclaration<NzNotificationContainerComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<NzNotificationContainerComponent, "nz-notification-container", ["nzNotificationContainer"], {}, {}, never, never, true, never>;
}
/**
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE
*/
declare class NzNotificationService extends NzMNService<NzNotificationContainerComponent> {
protected componentPrefix: string;
success(title: string | TemplateRef<void>, content: NzNotificationContentType, options?: NzNotificationDataOptions): NzNotificationRef;
error(title: string | TemplateRef<void>, content: NzNotificationContentType, options?: NzNotificationDataOptions): NzNotificationRef;
info(title: string | TemplateRef<void>, content: NzNotificationContentType, options?: NzNotificationDataOptions): NzNotificationRef;
warning(title: string | TemplateRef<void>, content: NzNotificationContentType, options?: NzNotificationDataOptions): NzNotificationRef;
blank(title: string | TemplateRef<void>, content: NzNotificationContentType, options?: NzNotificationDataOptions): NzNotificationRef;
create(type: 'success' | 'info' | 'warning' | 'error' | 'blank' | string, title: string | TemplateRef<void>, content: NzNotificationContentType, options?: NzNotificationDataOptions): NzNotificationRef;
template(template: TemplateRef<{
$implicit: NzNotificationComponent;
data: NzSafeAny;
}>, options?: NzNotificationDataOptions): NzNotificationRef;
protected generateMessageId(): string;
private createInstance;
static ɵfac: i0.ɵɵFactoryDeclaration<NzNotificationService, never>;
static ɵprov: i0.ɵɵInjectableDeclaration<NzNotificationService>;
}
export { NzNotificationComponent, NzNotificationContainerComponent, NzNotificationService };
export type { NzNotificationContentType, NzNotificationData, NzNotificationDataOptions, NzNotificationPlacement, NzNotificationRef };

3
node_modules/ng-zorro-antd/notification/package.json generated vendored Normal file
View File

@@ -0,0 +1,3 @@
{
"module": "../fesm2022/ng-zorro-antd-notification.mjs"
}

View File

@@ -0,0 +1,3 @@
@import './index.less';
.popover-customize-bg(@notification-prefix-cls, @popover-background);

View File

@@ -0,0 +1 @@
@import './index.less';

244
node_modules/ng-zorro-antd/notification/style/index.css generated vendored Normal file
View File

@@ -0,0 +1,244 @@
/* stylelint-disable at-rule-empty-line-before,at-rule-name-space-after,at-rule-no-unknown */
/* stylelint-disable no-duplicate-selectors */
.ant-notification {
box-sizing: border-box;
margin: 0;
padding: 0;
color: rgba(0, 0, 0, 0.85);
font-size: 14px;
font-variant: tabular-nums;
line-height: 1.5715;
list-style: none;
font-feature-settings: 'tnum';
position: fixed;
z-index: 1010;
margin-right: 24px;
}
.ant-notification-close-icon {
font-size: 14px;
cursor: pointer;
}
.ant-notification-hook-holder {
position: relative;
}
.ant-notification-notice {
position: relative;
width: 384px;
max-width: calc(100vw - 24px * 2);
margin-bottom: 16px;
margin-left: auto;
padding: 16px 24px;
overflow: hidden;
line-height: 1.5715;
word-wrap: break-word;
background: #fff;
border-radius: 2px;
box-shadow: 0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 9px 28px 8px rgba(0, 0, 0, 0.05);
}
.ant-notification-top .ant-notification-notice,
.ant-notification-bottom .ant-notification-notice {
margin-right: auto;
margin-left: auto;
}
.ant-notification-topLeft .ant-notification-notice,
.ant-notification-bottomLeft .ant-notification-notice {
margin-right: auto;
margin-left: 0;
}
.ant-notification-notice-message {
margin-bottom: 8px;
color: rgba(0, 0, 0, 0.85);
font-size: 16px;
line-height: 24px;
}
.ant-notification-notice-message-single-line-auto-margin {
display: block;
width: calc(384px - 24px * 2 - 24px - 48px - 100%);
max-width: 4px;
background-color: transparent;
pointer-events: none;
}
.ant-notification-notice-message-single-line-auto-margin::before {
display: block;
content: '';
}
.ant-notification-notice-description {
font-size: 14px;
}
.ant-notification-notice-closable .ant-notification-notice-message {
padding-right: 24px;
}
.ant-notification-notice-with-icon .ant-notification-notice-message {
margin-bottom: 4px;
margin-left: 48px;
font-size: 16px;
}
.ant-notification-notice-with-icon .ant-notification-notice-description {
margin-left: 48px;
font-size: 14px;
}
.ant-notification-notice-icon {
position: absolute;
margin-left: 4px;
font-size: 24px;
line-height: 24px;
}
.anticon.ant-notification-notice-icon-success {
color: #52c41a;
}
.anticon.ant-notification-notice-icon-info {
color: #1890ff;
}
.anticon.ant-notification-notice-icon-warning {
color: #faad14;
}
.anticon.ant-notification-notice-icon-error {
color: #ff4d4f;
}
.ant-notification-notice-close {
position: absolute;
top: 16px;
right: 22px;
color: rgba(0, 0, 0, 0.45);
outline: none;
}
.ant-notification-notice-close:hover {
color: rgba(0, 0, 0, 0.67);
}
.ant-notification-notice-btn {
float: right;
margin-top: 16px;
}
.ant-notification .notification-fade-effect {
animation-duration: 0.24s;
animation-timing-function: cubic-bezier(0.645, 0.045, 0.355, 1);
animation-fill-mode: both;
}
.ant-notification-fade-enter,
.ant-notification-fade-appear {
animation-duration: 0.24s;
animation-timing-function: cubic-bezier(0.645, 0.045, 0.355, 1);
animation-fill-mode: both;
opacity: 0;
animation-play-state: paused;
}
.ant-notification-fade-leave {
animation-duration: 0.24s;
animation-timing-function: cubic-bezier(0.645, 0.045, 0.355, 1);
animation-fill-mode: both;
animation-duration: 0.2s;
animation-play-state: paused;
}
.ant-notification-fade-enter.ant-notification-fade-enter-active,
.ant-notification-fade-appear.ant-notification-fade-appear-active {
animation-name: NotificationFadeIn;
animation-play-state: running;
}
.ant-notification-fade-leave.ant-notification-fade-leave-active {
animation-name: NotificationFadeOut;
animation-play-state: running;
}
@keyframes NotificationFadeIn {
0% {
left: 384px;
opacity: 0;
}
100% {
left: 0;
opacity: 1;
}
}
@keyframes NotificationFadeOut {
0% {
max-height: 150px;
margin-bottom: 16px;
opacity: 1;
}
100% {
max-height: 0;
margin-bottom: 0;
padding-top: 0;
padding-bottom: 0;
opacity: 0;
}
}
.ant-notification-rtl {
direction: rtl;
}
.ant-notification-rtl .ant-notification-notice-closable .ant-notification-notice-message {
padding-right: 0;
padding-left: 24px;
}
.ant-notification-rtl .ant-notification-notice-with-icon .ant-notification-notice-message {
margin-right: 48px;
margin-left: 0;
}
.ant-notification-rtl .ant-notification-notice-with-icon .ant-notification-notice-description {
margin-right: 48px;
margin-left: 0;
}
.ant-notification-rtl .ant-notification-notice-icon {
margin-right: 4px;
margin-left: 0;
}
.ant-notification-rtl .ant-notification-notice-close {
right: auto;
left: 22px;
}
.ant-notification-rtl .ant-notification-notice-btn {
float: left;
}
.ant-notification-top,
.ant-notification-bottom {
margin-right: 0;
margin-left: 0;
}
.ant-notification-top .ant-notification-fade-enter.ant-notification-fade-enter-active,
.ant-notification-top .ant-notification-fade-appear.ant-notification-fade-appear-active {
animation-name: NotificationTopFadeIn;
}
.ant-notification-bottom .ant-notification-fade-enter.ant-notification-fade-enter-active,
.ant-notification-bottom .ant-notification-fade-appear.ant-notification-fade-appear-active {
animation-name: NotificationBottomFadeIn;
}
.ant-notification-topLeft,
.ant-notification-bottomLeft {
margin-right: 0;
margin-left: 24px;
}
.ant-notification-topLeft .ant-notification-fade-enter.ant-notification-fade-enter-active,
.ant-notification-bottomLeft .ant-notification-fade-enter.ant-notification-fade-enter-active,
.ant-notification-topLeft .ant-notification-fade-appear.ant-notification-fade-appear-active,
.ant-notification-bottomLeft .ant-notification-fade-appear.ant-notification-fade-appear-active {
animation-name: NotificationLeftFadeIn;
}
@keyframes NotificationTopFadeIn {
0% {
margin-top: -100%;
opacity: 0;
}
100% {
margin-top: 0;
opacity: 1;
}
}
@keyframes NotificationBottomFadeIn {
0% {
margin-bottom: -100%;
opacity: 0;
}
100% {
margin-bottom: 0;
opacity: 1;
}
}
@keyframes NotificationLeftFadeIn {
0% {
right: 384px;
opacity: 0;
}
100% {
right: 0;
opacity: 1;
}
}

View File

@@ -0,0 +1,207 @@
@import '../../style/themes/index';
@import '../../style/mixins/index';
.popover-customize-bg(@notification-prefix-cls, @popover-background);
@notification-prefix-cls: ~'@{ant-prefix}-notification';
@notification-width: 384px;
@notification-padding: @notification-padding-vertical @notification-padding-horizontal;
@notification-margin-bottom: 16px;
@notification-margin-edge: 24px;
.@{notification-prefix-cls} {
.reset-component();
position: fixed;
z-index: @zindex-notification;
margin-right: @notification-margin-edge;
&-close-icon {
font-size: @font-size-base;
cursor: pointer;
}
&-hook-holder {
position: relative;
}
&-notice {
position: relative;
width: @notification-width;
max-width: ~'calc(100vw - @{notification-margin-edge} * 2)';
margin-bottom: @notification-margin-bottom;
margin-left: auto;
padding: @notification-padding;
overflow: hidden;
line-height: @line-height-base;
word-wrap: break-word;
background: @notification-bg;
border-radius: @border-radius-base;
box-shadow: @shadow-2;
.@{notification-prefix-cls}-top &,
.@{notification-prefix-cls}-bottom & {
margin-right: auto;
margin-left: auto;
}
.@{notification-prefix-cls}-topLeft &,
.@{notification-prefix-cls}-bottomLeft & {
margin-right: auto;
margin-left: 0;
}
&-message {
margin-bottom: 8px;
color: @heading-color;
font-size: @font-size-lg;
line-height: 24px;
// https://github.com/ant-design/ant-design/issues/5846#issuecomment-296244140
&-single-line-auto-margin {
display: block;
width: ~'calc(@{notification-width} - @{notification-padding-horizontal} * 2 - 24px - 48px - 100%)';
max-width: 4px;
background-color: transparent;
pointer-events: none;
&::before {
display: block;
content: '';
}
}
}
&-description {
font-size: @font-size-base;
}
&-closable &-message {
padding-right: 24px;
}
&-with-icon &-message {
margin-bottom: 4px;
margin-left: 48px;
font-size: @font-size-lg;
}
&-with-icon &-description {
margin-left: 48px;
font-size: @font-size-base;
}
// Icon & color style in different selector level
// https://github.com/ant-design/ant-design/issues/16503
// https://github.com/ant-design/ant-design/issues/15512
&-icon {
position: absolute;
margin-left: 4px;
font-size: 24px;
line-height: 24px;
}
.@{iconfont-css-prefix}&-icon {
&-success {
color: @success-color;
}
&-info {
color: @info-color;
}
&-warning {
color: @warning-color;
}
&-error {
color: @error-color;
}
}
&-close {
position: absolute;
top: 16px;
right: 22px;
color: @text-color-secondary;
outline: none;
&:hover {
& when (@theme = dark) {
color: fade(@white, 85%);
}
& when not (@theme = dark) {
color: shade(@text-color-secondary, 40%);
}
}
}
&-btn {
float: right;
margin-top: 16px;
}
}
.notification-fade-effect {
animation-duration: 0.24s;
animation-timing-function: @ease-in-out;
animation-fill-mode: both;
}
&-fade-enter,
&-fade-appear {
.notification-fade-effect();
opacity: 0;
animation-play-state: paused;
}
&-fade-leave {
.notification-fade-effect();
animation-duration: 0.2s;
animation-play-state: paused;
}
&-fade-enter&-fade-enter-active,
&-fade-appear&-fade-appear-active {
animation-name: NotificationFadeIn;
animation-play-state: running;
}
&-fade-leave&-fade-leave-active {
animation-name: NotificationFadeOut;
animation-play-state: running;
}
}
@keyframes NotificationFadeIn {
0% {
left: @notification-width;
opacity: 0;
}
100% {
left: 0;
opacity: 1;
}
}
@keyframes NotificationFadeOut {
0% {
max-height: 150px;
margin-bottom: @notification-margin-bottom;
opacity: 1;
}
100% {
max-height: 0;
margin-bottom: 0;
padding-top: 0;
padding-bottom: 0;
opacity: 0;
}
}
@import './rtl';
@import './placement';

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,68 @@
.@{notification-prefix-cls} {
&-top,
&-bottom {
margin-right: 0;
margin-left: 0;
}
&-top {
.@{notification-prefix-cls}-fade-enter.@{notification-prefix-cls}-fade-enter-active,
.@{notification-prefix-cls}-fade-appear.@{notification-prefix-cls}-fade-appear-active {
animation-name: NotificationTopFadeIn;
}
}
&-bottom {
.@{notification-prefix-cls}-fade-enter.@{notification-prefix-cls}-fade-enter-active,
.@{notification-prefix-cls}-fade-appear.@{notification-prefix-cls}-fade-appear-active {
animation-name: NotificationBottomFadeIn;
}
}
&-topLeft,
&-bottomLeft {
margin-right: 0;
margin-left: @notification-margin-edge;
.@{notification-prefix-cls}-fade-enter.@{notification-prefix-cls}-fade-enter-active,
.@{notification-prefix-cls}-fade-appear.@{notification-prefix-cls}-fade-appear-active {
animation-name: NotificationLeftFadeIn;
}
}
}
@keyframes NotificationTopFadeIn {
0% {
margin-top: -100%;
opacity: 0;
}
100% {
margin-top: 0;
opacity: 1;
}
}
@keyframes NotificationBottomFadeIn {
0% {
margin-bottom: -100%;
opacity: 0;
}
100% {
margin-bottom: 0;
opacity: 1;
}
}
@keyframes NotificationLeftFadeIn {
0% {
right: @notification-width;
opacity: 0;
}
100% {
right: 0;
opacity: 1;
}
}

53
node_modules/ng-zorro-antd/notification/style/rtl.less generated vendored Normal file
View File

@@ -0,0 +1,53 @@
@import '../../style/themes/index';
@import '../../style/mixins/index';
@notification-prefix-cls: ~'@{ant-prefix}-notification';
.@{notification-prefix-cls} {
&-rtl {
direction: rtl;
}
&-notice {
&-closable &-message {
.@{notification-prefix-cls}-rtl & {
padding-right: 0;
padding-left: 24px;
}
}
&-with-icon &-message {
.@{notification-prefix-cls}-rtl & {
margin-right: 48px;
margin-left: 0;
}
}
&-with-icon &-description {
.@{notification-prefix-cls}-rtl & {
margin-right: 48px;
margin-left: 0;
}
}
&-icon {
.@{notification-prefix-cls}-rtl & {
margin-right: 4px;
margin-left: 0;
}
}
&-close {
.@{notification-prefix-cls}-rtl & {
right: auto;
left: 22px;
}
}
&-btn {
.@{notification-prefix-cls}-rtl & {
float: left;
}
}
}
}