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

107
node_modules/ng-zorro-antd/code-editor/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,107 @@
import { Environment, editor } from 'monaco-editor';
import * as i0 from '@angular/core';
import { AfterViewInit, TemplateRef, EventEmitter } from '@angular/core';
import { ControlValueAccessor } from '@angular/forms';
import { OnChangeType, NzSafeAny, OnTouchedType } from 'ng-zorro-antd/core/types';
import { BehaviorSubject, Observable } from 'rxjs';
/**
* 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
*/
import IStandAloneEditorConstructionOptions = editor.IStandaloneEditorConstructionOptions;
import IDiffEditorConstructionOptions = editor.IDiffEditorConstructionOptions;
declare global {
interface Window {
MonacoEnvironment?: Environment | undefined;
}
}
type EditorOptions = IStandAloneEditorConstructionOptions;
type DiffEditorOptions = IDiffEditorConstructionOptions;
type JoinedEditorOptions = EditorOptions | DiffEditorOptions;
type NzEditorMode = 'normal' | 'diff';
declare const NzCodeEditorLoadingStatus: {
readonly UNLOAD: "unload";
readonly LOADING: "loading";
readonly LOADED: "LOADED";
};
type NzCodeEditorLoadingStatus = (typeof NzCodeEditorLoadingStatus)[keyof typeof NzCodeEditorLoadingStatus];
declare class NzCodeEditorComponent implements AfterViewInit, ControlValueAccessor {
private nzCodeEditorService;
private ngZone;
private platform;
private destroyRef;
nzEditorMode: NzEditorMode;
nzOriginalText: string;
nzLoading: boolean;
nzFullControl: boolean;
nzToolkit?: TemplateRef<void>;
set nzEditorOption(value: JoinedEditorOptions);
readonly nzEditorInitialized: EventEmitter<editor.IStandaloneCodeEditor | editor.IStandaloneDiffEditor>;
editorOptionCached: JoinedEditorOptions;
private readonly el;
private resize$;
private editorOption$;
private editorInstance;
private value;
private modelSet;
private onDidChangeContentDisposable;
constructor();
/**
* Initialize a monaco editor instance.
*/
ngAfterViewInit(): void;
writeValue(value: string): void;
registerOnChange(fn: OnChangeType): NzSafeAny;
registerOnTouched(fn: OnTouchedType): void;
onChange: OnChangeType;
onTouch: OnTouchedType;
layout(): void;
private setup;
private registerOptionChanges;
private initMonacoEditorInstance;
private registerResizeChange;
private setValue;
/**
* {@link editor.ICodeEditor}#setValue resets the cursor position to the start of the document.
* This helper memorizes the cursor position and selections and restores them after the given
* function has been called.
*/
private preservePositionAndSelections;
private setValueEmitter;
private emitValue;
private updateOptionToMonaco;
static ɵfac: i0.ɵɵFactoryDeclaration<NzCodeEditorComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<NzCodeEditorComponent, "nz-code-editor", ["nzCodeEditor"], { "nzEditorMode": { "alias": "nzEditorMode"; "required": false; }; "nzOriginalText": { "alias": "nzOriginalText"; "required": false; }; "nzLoading": { "alias": "nzLoading"; "required": false; }; "nzFullControl": { "alias": "nzFullControl"; "required": false; }; "nzToolkit": { "alias": "nzToolkit"; "required": false; }; "nzEditorOption": { "alias": "nzEditorOption"; "required": false; }; }, { "nzEditorInitialized": "nzEditorInitialized"; }, never, never, true, never>;
static ngAcceptInputType_nzLoading: unknown;
static ngAcceptInputType_nzFullControl: unknown;
}
declare class NzCodeEditorModule {
static ɵfac: i0.ɵɵFactoryDeclaration<NzCodeEditorModule, never>;
static ɵmod: i0.ɵɵNgModuleDeclaration<NzCodeEditorModule, never, [typeof NzCodeEditorComponent], [typeof NzCodeEditorComponent]>;
static ɵinj: i0.ɵɵInjectorDeclaration<NzCodeEditorModule>;
}
declare class NzCodeEditorService {
private readonly nzConfigService;
private document;
private firstEditorInitialized;
private option;
private config;
option$: BehaviorSubject<JoinedEditorOptions>;
constructor();
private _updateDefaultOption;
requestToInit(): Observable<JoinedEditorOptions>;
private loadMonacoScript;
private onLoad;
private onInit;
private getLatestOption;
static ɵfac: i0.ɵɵFactoryDeclaration<NzCodeEditorService, never>;
static ɵprov: i0.ɵɵInjectableDeclaration<NzCodeEditorService>;
}
export { NzCodeEditorComponent, NzCodeEditorLoadingStatus, NzCodeEditorModule, NzCodeEditorService };
export type { DiffEditorOptions, EditorOptions, JoinedEditorOptions, NzEditorMode };

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

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

View File

@@ -0,0 +1,3 @@
@import './index.less';
// style dependencies
@import '../../spin/style/entry.less';

241
node_modules/ng-zorro-antd/code-editor/style/index.css generated vendored Normal file
View File

@@ -0,0 +1,241 @@
/* stylelint-disable at-rule-empty-line-before,at-rule-name-space-after,at-rule-no-unknown */
/* stylelint-disable no-duplicate-selectors */
.ant-code-editor {
position: relative;
display: block;
width: 100%;
height: 100%;
background-color: #fff;
}
.ant-code-editor .ant-code-editor-loading {
position: absolute;
z-index: 100;
display: flex;
justify-content: center;
width: 100%;
height: 100%;
background-color: #fff;
}
.ant-code-editor .ant-code-editor-toolkit {
position: absolute;
top: 20px;
right: 160px;
z-index: 2;
min-width: 100px;
height: 24px;
text-align: right;
background: transparent;
}
.ant-code-editor .ant-code-editor-toolkit i,
.ant-code-editor .ant-code-editor-toolkit span[nz-icon],
.ant-code-editor .ant-code-editor-toolkit nz-icon {
position: relative;
right: 4px;
cursor: pointer;
}
.ant-code-editor .ant-code-editor-toolkit i:not(:last-child),
.ant-code-editor .ant-code-editor-toolkit span[nz-icon]:not(:last-child),
.ant-code-editor .ant-code-editor-toolkit nz-icon:not(:last-child) {
padding-right: 4px;
}
.ant-code-editor .ant-code-editor-toolkit i.active,
.ant-code-editor .ant-code-editor-toolkit span[nz-icon].active,
.ant-code-editor .ant-code-editor-toolkit nz-icon.active {
color: #1890ff;
}
.ant-spin {
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: absolute;
display: none;
color: #1890ff;
font-size: 0;
text-align: center;
vertical-align: middle;
opacity: 0;
transition: transform 0.3s cubic-bezier(0.78, 0.14, 0.15, 0.86);
}
.ant-spin-spinning {
position: static;
display: inline-block;
opacity: 1;
}
.ant-spin-nested-loading {
position: relative;
}
.ant-spin-nested-loading > div > .ant-spin {
position: absolute;
top: 0;
left: 0;
z-index: 4;
display: block;
width: 100%;
height: 100%;
max-height: 400px;
}
.ant-spin-nested-loading > div > .ant-spin .ant-spin-dot {
position: absolute;
top: 50%;
left: 50%;
margin: -10px;
}
.ant-spin-nested-loading > div > .ant-spin .ant-spin-text {
position: absolute;
top: 50%;
width: 100%;
padding-top: 5px;
font-size: 14px;
text-shadow: 0 1px 2px #fff;
}
.ant-spin-nested-loading > div > .ant-spin.ant-spin-show-text .ant-spin-dot {
margin-top: -20px;
}
.ant-spin-nested-loading > div > .ant-spin-sm .ant-spin-dot {
margin: -7px;
}
.ant-spin-nested-loading > div > .ant-spin-sm .ant-spin-text {
padding-top: 2px;
}
.ant-spin-nested-loading > div > .ant-spin-sm.ant-spin-show-text .ant-spin-dot {
margin-top: -17px;
}
.ant-spin-nested-loading > div > .ant-spin-lg .ant-spin-dot {
margin: -16px;
}
.ant-spin-nested-loading > div > .ant-spin-lg .ant-spin-text {
padding-top: 11px;
}
.ant-spin-nested-loading > div > .ant-spin-lg.ant-spin-show-text .ant-spin-dot {
margin-top: -26px;
}
.ant-spin-container {
position: relative;
transition: opacity 0.3s;
}
.ant-spin-container::after {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: 10;
display: none \9;
width: 100%;
height: 100%;
background: #fff;
opacity: 0;
transition: all 0.3s;
content: '';
pointer-events: none;
}
.ant-spin-blur {
clear: both;
opacity: 0.5;
user-select: none;
pointer-events: none;
}
.ant-spin-blur::after {
opacity: 0.4;
pointer-events: auto;
}
.ant-spin-tip {
color: rgba(0, 0, 0, 0.45);
}
.ant-spin-dot {
position: relative;
display: inline-block;
font-size: 20px;
width: 1em;
height: 1em;
}
.ant-spin-dot-item {
position: absolute;
display: block;
width: 9px;
height: 9px;
background-color: #1890ff;
border-radius: 100%;
transform: scale(0.75);
transform-origin: 50% 50%;
opacity: 0.3;
animation: antSpinMove 1s infinite linear alternate;
}
.ant-spin-dot-item:nth-child(1) {
top: 0;
left: 0;
}
.ant-spin-dot-item:nth-child(2) {
top: 0;
right: 0;
animation-delay: 0.4s;
}
.ant-spin-dot-item:nth-child(3) {
right: 0;
bottom: 0;
animation-delay: 0.8s;
}
.ant-spin-dot-item:nth-child(4) {
bottom: 0;
left: 0;
animation-delay: 1.2s;
}
.ant-spin-dot-spin {
transform: rotate(0deg);
animation: antRotate 1.2s infinite linear;
}
.ant-spin-sm .ant-spin-dot {
font-size: 14px;
}
.ant-spin-sm .ant-spin-dot i {
width: 6px;
height: 6px;
}
.ant-spin-lg .ant-spin-dot {
font-size: 32px;
}
.ant-spin-lg .ant-spin-dot i {
width: 14px;
height: 14px;
}
.ant-spin.ant-spin-show-text .ant-spin-text {
display: block;
}
@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
/* IE10+ */
.ant-spin-blur {
background: #fff;
opacity: 0.5;
}
}
@keyframes antSpinMove {
to {
opacity: 1;
}
}
@keyframes antRotate {
to {
transform: rotate(360deg);
}
}
.ant-spin-rtl {
direction: rtl;
}
.ant-spin-rtl .ant-spin-dot-spin {
transform: rotate(-45deg);
animation-name: antRotateRtl;
}
@keyframes antRotateRtl {
to {
transform: rotate(-405deg);
}
}
nz-spin {
display: block;
}

View File

@@ -0,0 +1,49 @@
@import '../../style/themes/index';
@import '../../style/mixins/index';
@code-editor-prefix-cls: ~'@{ant-prefix}-code-editor';
.@{code-editor-prefix-cls} {
position: relative;
display: block;
width: 100%;
height: 100%;
background-color: @component-background;
.@{code-editor-prefix-cls}-loading {
position: absolute;
z-index: 100;
display: flex;
justify-content: center;
width: 100%;
height: 100%;
background-color: @component-background;
}
.@{code-editor-prefix-cls}-toolkit {
position: absolute;
top: 20px;
right: 160px;
z-index: 2;
min-width: 100px;
height: 24px;
text-align: right;
background: transparent;
i,
span[nz-icon],
nz-icon {
position: relative;
right: 4px;
cursor: pointer;
&:not(:last-child) {
padding-right: 4px;
}
&.active {
color: @primary-color;
}
}
}
}

View File

@@ -0,0 +1 @@
.ant-code-editor{position:relative;display:block;width:100%;height:100%;background-color:#fff}.ant-code-editor .ant-code-editor-loading{position:absolute;z-index:100;display:flex;justify-content:center;width:100%;height:100%;background-color:#fff}.ant-code-editor .ant-code-editor-toolkit{position:absolute;top:20px;right:160px;z-index:2;min-width:100px;height:24px;text-align:right;background:0 0}.ant-code-editor .ant-code-editor-toolkit i,.ant-code-editor .ant-code-editor-toolkit nz-icon,.ant-code-editor .ant-code-editor-toolkit span[nz-icon]{position:relative;right:4px;cursor:pointer}.ant-code-editor .ant-code-editor-toolkit i:not(:last-child),.ant-code-editor .ant-code-editor-toolkit nz-icon:not(:last-child),.ant-code-editor .ant-code-editor-toolkit span[nz-icon]:not(:last-child){padding-right:4px}.ant-code-editor .ant-code-editor-toolkit i.active,.ant-code-editor .ant-code-editor-toolkit nz-icon.active,.ant-code-editor .ant-code-editor-toolkit span[nz-icon].active{color:#1890ff}.ant-spin{box-sizing:border-box;margin:0;padding:0;color:rgba(0,0,0,.85);font-size:14px;font-variant:tabular-nums;line-height:1.5715;list-style:none;font-feature-settings:'tnum';position:absolute;display:none;color:#1890ff;font-size:0;text-align:center;vertical-align:middle;opacity:0;transition:transform .3s cubic-bezier(.78, .14, .15, .86)}.ant-spin-spinning{position:static;display:inline-block;opacity:1}.ant-spin-nested-loading{position:relative}.ant-spin-nested-loading>div>.ant-spin{position:absolute;top:0;left:0;z-index:4;display:block;width:100%;height:100%;max-height:400px}.ant-spin-nested-loading>div>.ant-spin .ant-spin-dot{position:absolute;top:50%;left:50%;margin:-10px}.ant-spin-nested-loading>div>.ant-spin .ant-spin-text{position:absolute;top:50%;width:100%;padding-top:5px;font-size:14px;text-shadow:0 1px 2px #fff}.ant-spin-nested-loading>div>.ant-spin.ant-spin-show-text .ant-spin-dot{margin-top:-20px}.ant-spin-nested-loading>div>.ant-spin-sm .ant-spin-dot{margin:-7px}.ant-spin-nested-loading>div>.ant-spin-sm .ant-spin-text{padding-top:2px}.ant-spin-nested-loading>div>.ant-spin-sm.ant-spin-show-text .ant-spin-dot{margin-top:-17px}.ant-spin-nested-loading>div>.ant-spin-lg .ant-spin-dot{margin:-16px}.ant-spin-nested-loading>div>.ant-spin-lg .ant-spin-text{padding-top:11px}.ant-spin-nested-loading>div>.ant-spin-lg.ant-spin-show-text .ant-spin-dot{margin-top:-26px}.ant-spin-container{position:relative;transition:opacity .3s}.ant-spin-container::after{position:absolute;top:0;right:0;bottom:0;left:0;z-index:10;width:100%;height:100%;background:#fff;opacity:0;transition:all .3s;content:'';pointer-events:none}.ant-spin-blur{clear:both;opacity:.5;user-select:none;pointer-events:none}.ant-spin-blur::after{opacity:.4;pointer-events:auto}.ant-spin-tip{color:rgba(0,0,0,.45)}.ant-spin-dot{position:relative;display:inline-block;font-size:20px;width:1em;height:1em}.ant-spin-dot-item{position:absolute;display:block;width:9px;height:9px;background-color:#1890ff;border-radius:100%;transform:scale(.75);transform-origin:50% 50%;opacity:.3;animation:antSpinMove 1s infinite linear alternate}.ant-spin-dot-item:first-child{top:0;left:0}.ant-spin-dot-item:nth-child(2){top:0;right:0;animation-delay:.4s}.ant-spin-dot-item:nth-child(3){right:0;bottom:0;animation-delay:.8s}.ant-spin-dot-item:nth-child(4){bottom:0;left:0;animation-delay:1.2s}.ant-spin-dot-spin{transform:rotate(0);animation:antRotate 1.2s infinite linear}.ant-spin-sm .ant-spin-dot{font-size:14px}.ant-spin-sm .ant-spin-dot i{width:6px;height:6px}.ant-spin-lg .ant-spin-dot{font-size:32px}.ant-spin-lg .ant-spin-dot i{width:14px;height:14px}.ant-spin.ant-spin-show-text .ant-spin-text{display:block}@media all and (-ms-high-contrast:none),(-ms-high-contrast:active){.ant-spin-blur{background:#fff;opacity:.5}}@keyframes antSpinMove{to{opacity:1}}@keyframes antRotate{to{transform:rotate(360deg)}}.ant-spin-rtl{direction:rtl}.ant-spin-rtl .ant-spin-dot-spin{transform:rotate(-45deg);animation-name:antRotateRtl}@keyframes antRotateRtl{to{transform:rotate(-405deg)}}nz-spin{display:block}