platform-core-ng 21.1.0 → 21.1.2-rc.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/fesm2022/platform-core-ng.mjs +2213 -122
- package/fesm2022/platform-core-ng.mjs.map +1 -1
- package/package.json +14 -1
- package/styles/base/theme.scss +1 -0
- package/styles/components/index.scss +4 -5
- package/styles/components/mobile-list-directives.scss +24 -8
- package/types/platform-core-ng.d.ts +612 -112
- package/styles/components/mail-client.scss +0 -2165
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { from, timeout, materialize, delay, dematerialize, tap, catchError, finalize, throwError, fromEvent, Subject } from 'rxjs';
|
|
1
|
+
import { from, timeout, materialize, delay, dematerialize, tap, catchError, finalize, throwError, fromEvent, Subject, ReplaySubject } from 'rxjs';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { InjectionToken, inject, signal, computed, Directive,
|
|
3
|
+
import { InjectionToken, inject, Injectable, DestroyRef, makeEnvironmentProviders, ENVIRONMENT_INITIALIZER, signal, computed, Directive, ErrorHandler, ElementRef, Renderer2, input, booleanAttribute, effect, ChangeDetectionStrategy, Component, output, Input, viewChild, TemplateRef, contentChildren, EnvironmentInjector, NgZone, viewChildren, afterRenderEffect, forwardRef, model, ViewEncapsulation, ChangeDetectorRef, NgModule, contentChild, ContentChild, PLATFORM_ID, EventEmitter, ViewChild, Output, Injector, Pipe } from '@angular/core';
|
|
4
4
|
import { Router, RouterOutlet, RouterLink, RouterLinkActive } from '@angular/router';
|
|
5
5
|
import { __decorate } from 'tslib';
|
|
6
6
|
import { PaginationResponse, PageRequestDTO, WithSelected, BusinessException, HttpCustomException, HttpStatusException, getHttpStatusMessage } from 'platform-core-ts';
|
|
7
|
-
import { HttpContextToken, HttpContext, HttpResponse, HttpErrorResponse } from '@angular/common/http';
|
|
8
|
-
import { DOCUMENT, NgTemplateOutlet, NgOptimizedImage, NgComponentOutlet } from '@angular/common';
|
|
7
|
+
import { HttpContextToken, HttpContext, HttpResponse, HttpErrorResponse, provideHttpClient, withInterceptors, withRequestsMadeViaParent } from '@angular/common/http';
|
|
8
|
+
import { DOCUMENT, NgTemplateOutlet, NgOptimizedImage, isPlatformBrowser, NgComponentOutlet } from '@angular/common';
|
|
9
9
|
import * as i1 from 'lucide-angular';
|
|
10
|
-
import { SearchIcon, XIcon, EllipsisIcon, CheckIcon, MinimizeIcon, MaximizeIcon, BellIcon, MonitorCogIcon, GlobeIcon, LucideAngularModule, Settings2Icon, BlocksIcon, KeyRoundIcon, ShieldIcon, UsersIcon, GaugeIcon, CalendarDaysIcon, UserRoundIcon, PlusIcon, ChevronLeftIcon, ChevronRightIcon, ChevronDownIcon, SignalHighIcon, WifiHighIcon, BatteryFullIcon, EyeIcon, EyeOffIcon, LanguagesIcon, EllipsisVerticalIcon, CircleXIcon, SquareArrowOutUpRightIcon, FileIcon,
|
|
10
|
+
import { SearchIcon, XIcon, EllipsisIcon, CheckIcon, MinimizeIcon, MaximizeIcon, BellIcon, MonitorCogIcon, GlobeIcon, LucideAngularModule, Settings2Icon, BlocksIcon, KeyRoundIcon, ShieldIcon, UsersIcon, GaugeIcon, CalendarDaysIcon, UserRoundIcon, PlusIcon, ChevronLeftIcon, ChevronRightIcon, ImageIcon, RotateCcwIcon, RotateCwIcon, MinusIcon, ChevronDownIcon, SignalHighIcon, WifiHighIcon, BatteryFullIcon, EyeIcon, EyeOffIcon, LanguagesIcon, EllipsisVerticalIcon, CircleXIcon, SquareArrowOutUpRightIcon, FileIcon, Trash2Icon, PencilIcon, UploadCloudIcon, CircleCheckIcon, InfoIcon, CircleHelpIcon, TriangleAlertIcon } from 'lucide-angular';
|
|
11
11
|
import * as i1$1 from '@angular/forms';
|
|
12
12
|
import { FormsModule, NG_VALUE_ACCESSOR, FormControl, ReactiveFormsModule } from '@angular/forms';
|
|
13
13
|
import * as i1$2 from '@angular/cdk/overlay';
|
|
@@ -17,6 +17,7 @@ import { Listbox, Option } from '@angular/aria/listbox';
|
|
|
17
17
|
import { Combobox, ComboboxPopupContainer, ComboboxInput } from '@angular/aria/combobox';
|
|
18
18
|
import { MenuItem, Menu, MenuContent } from '@angular/aria/menu';
|
|
19
19
|
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
20
|
+
import { EditorComponent, TINYMCE_SCRIPT_SRC } from '@tinymce/tinymce-angular';
|
|
20
21
|
|
|
21
22
|
/**
|
|
22
23
|
* @description 用于在 Electron 环境中发送IPC请求
|
|
@@ -106,6 +107,231 @@ const coreGuestOnlyGuard = (route) => {
|
|
|
106
107
|
return router.createUrlTree([redirect]);
|
|
107
108
|
};
|
|
108
109
|
|
|
110
|
+
const HOSTED_AUTH_MESSAGE_CHANNEL = 'platform:auth';
|
|
111
|
+
const HOSTED_AUTH_MESSAGE_VERSION = 1;
|
|
112
|
+
const HOSTED_AUTH_WINDOW_EVENT_NAMES = {
|
|
113
|
+
AUTH_EXPIRED: 'platform:auth:expired',
|
|
114
|
+
LOGOUT_REQUEST: 'platform:auth:logout-request',
|
|
115
|
+
};
|
|
116
|
+
const DEFAULT_HOSTED_AUTH_EVENT_LISTENER_CONFIG = {
|
|
117
|
+
acceptedSources: [],
|
|
118
|
+
acceptAnySource: false,
|
|
119
|
+
acceptedOrigins: [],
|
|
120
|
+
acceptAnyOrigin: false,
|
|
121
|
+
acceptedMessageSources: [],
|
|
122
|
+
acceptAnyMessageSource: false,
|
|
123
|
+
requireSameOrigin: true,
|
|
124
|
+
};
|
|
125
|
+
const HOSTED_AUTH_EVENT_HANDLER = new InjectionToken('HOSTED_AUTH_EVENT_HANDLER', {
|
|
126
|
+
factory: () => null,
|
|
127
|
+
});
|
|
128
|
+
const HOSTED_AUTH_EVENT_LISTENER_CONFIG = new InjectionToken('HOSTED_AUTH_EVENT_LISTENER_CONFIG', {
|
|
129
|
+
factory: () => DEFAULT_HOSTED_AUTH_EVENT_LISTENER_CONFIG,
|
|
130
|
+
});
|
|
131
|
+
class HostedAuthTrustedMessageSourceRegistry {
|
|
132
|
+
sources = new Set();
|
|
133
|
+
register(source) {
|
|
134
|
+
if (!source) {
|
|
135
|
+
return () => undefined;
|
|
136
|
+
}
|
|
137
|
+
this.sources.add(source);
|
|
138
|
+
return () => {
|
|
139
|
+
this.sources.delete(source);
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
has(source) {
|
|
143
|
+
return !!source && this.sources.has(source);
|
|
144
|
+
}
|
|
145
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: HostedAuthTrustedMessageSourceRegistry, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
146
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: HostedAuthTrustedMessageSourceRegistry, providedIn: 'root' });
|
|
147
|
+
}
|
|
148
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: HostedAuthTrustedMessageSourceRegistry, decorators: [{
|
|
149
|
+
type: Injectable,
|
|
150
|
+
args: [{ providedIn: 'root' }]
|
|
151
|
+
}] });
|
|
152
|
+
class HostedAuthBridgeService {
|
|
153
|
+
emitAuthExpired(source, error, config = {}) {
|
|
154
|
+
this.emit('AUTH_EXPIRED', {
|
|
155
|
+
source,
|
|
156
|
+
status: error?.status,
|
|
157
|
+
url: error?.url ?? null,
|
|
158
|
+
}, config);
|
|
159
|
+
}
|
|
160
|
+
emitLogoutRequest(source, config = {}) {
|
|
161
|
+
this.emit('LOGOUT_REQUEST', { source }, config);
|
|
162
|
+
}
|
|
163
|
+
emit(type, detail, config = {}) {
|
|
164
|
+
if (typeof window === 'undefined') {
|
|
165
|
+
return;
|
|
166
|
+
}
|
|
167
|
+
window.dispatchEvent(new CustomEvent(HOSTED_AUTH_WINDOW_EVENT_NAMES[type], { detail }));
|
|
168
|
+
if (window.parent && window.parent !== window) {
|
|
169
|
+
window.parent.postMessage(createHostedAuthMessage(type, detail), config.targetOrigin ?? window.location.origin);
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: HostedAuthBridgeService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
173
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: HostedAuthBridgeService, providedIn: 'root' });
|
|
174
|
+
}
|
|
175
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: HostedAuthBridgeService, decorators: [{
|
|
176
|
+
type: Injectable,
|
|
177
|
+
args: [{ providedIn: 'root' }]
|
|
178
|
+
}] });
|
|
179
|
+
class HostedAuthEventListenerService {
|
|
180
|
+
config = inject(HOSTED_AUTH_EVENT_LISTENER_CONFIG);
|
|
181
|
+
destroyRef = inject(DestroyRef);
|
|
182
|
+
handler = inject(HOSTED_AUTH_EVENT_HANDLER);
|
|
183
|
+
trustedMessageSources = inject(HostedAuthTrustedMessageSourceRegistry);
|
|
184
|
+
started = false;
|
|
185
|
+
start() {
|
|
186
|
+
if (this.started || typeof window === 'undefined') {
|
|
187
|
+
return;
|
|
188
|
+
}
|
|
189
|
+
this.started = true;
|
|
190
|
+
for (const eventName of Object.values(HOSTED_AUTH_WINDOW_EVENT_NAMES)) {
|
|
191
|
+
window.addEventListener(eventName, this.handleWindowAuthEvent);
|
|
192
|
+
}
|
|
193
|
+
window.addEventListener('message', this.handlePostMessage);
|
|
194
|
+
this.destroyRef.onDestroy(() => this.stop());
|
|
195
|
+
}
|
|
196
|
+
stop() {
|
|
197
|
+
if (!this.started || typeof window === 'undefined') {
|
|
198
|
+
return;
|
|
199
|
+
}
|
|
200
|
+
this.started = false;
|
|
201
|
+
for (const eventName of Object.values(HOSTED_AUTH_WINDOW_EVENT_NAMES)) {
|
|
202
|
+
window.removeEventListener(eventName, this.handleWindowAuthEvent);
|
|
203
|
+
}
|
|
204
|
+
window.removeEventListener('message', this.handlePostMessage);
|
|
205
|
+
}
|
|
206
|
+
handleWindowAuthEvent = (event) => {
|
|
207
|
+
const type = getHostedAuthEventTypeFromWindowEventName(event.type);
|
|
208
|
+
if (!(event instanceof CustomEvent) || !type) {
|
|
209
|
+
return;
|
|
210
|
+
}
|
|
211
|
+
this.handleAuthEvent(type, event.detail);
|
|
212
|
+
};
|
|
213
|
+
handlePostMessage = (event) => {
|
|
214
|
+
if (!this.isAcceptedOrigin(event.origin) || !this.isAcceptedMessageSource(event.source)) {
|
|
215
|
+
return;
|
|
216
|
+
}
|
|
217
|
+
if (!isHostedAuthMessage(event.data)) {
|
|
218
|
+
return;
|
|
219
|
+
}
|
|
220
|
+
this.handleAuthEvent(event.data.type, event.data.detail);
|
|
221
|
+
};
|
|
222
|
+
handleAuthEvent(type, detail) {
|
|
223
|
+
if (!isHostedAuthEventPayload(detail) || !this.isAcceptedSource(detail.source)) {
|
|
224
|
+
return;
|
|
225
|
+
}
|
|
226
|
+
void this.handler?.({
|
|
227
|
+
type,
|
|
228
|
+
detail,
|
|
229
|
+
});
|
|
230
|
+
}
|
|
231
|
+
isAcceptedSource(source) {
|
|
232
|
+
return this.config.acceptAnySource || this.config.acceptedSources.includes(source);
|
|
233
|
+
}
|
|
234
|
+
isAcceptedOrigin(origin) {
|
|
235
|
+
if (this.config.acceptAnyOrigin || (this.config.acceptedOrigins ?? []).includes(origin)) {
|
|
236
|
+
return true;
|
|
237
|
+
}
|
|
238
|
+
return (this.config.requireSameOrigin &&
|
|
239
|
+
typeof window !== 'undefined' &&
|
|
240
|
+
origin === window.location.origin);
|
|
241
|
+
}
|
|
242
|
+
isAcceptedMessageSource(source) {
|
|
243
|
+
if (this.config.acceptAnyMessageSource) {
|
|
244
|
+
return true;
|
|
245
|
+
}
|
|
246
|
+
if (source && (this.config.acceptedMessageSources ?? []).includes(source)) {
|
|
247
|
+
return true;
|
|
248
|
+
}
|
|
249
|
+
if (this.trustedMessageSources.has(source)) {
|
|
250
|
+
return true;
|
|
251
|
+
}
|
|
252
|
+
return typeof window !== 'undefined' && (source === window || source === window.parent);
|
|
253
|
+
}
|
|
254
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: HostedAuthEventListenerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
255
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: HostedAuthEventListenerService, providedIn: 'root' });
|
|
256
|
+
}
|
|
257
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: HostedAuthEventListenerService, decorators: [{
|
|
258
|
+
type: Injectable,
|
|
259
|
+
args: [{ providedIn: 'root' }]
|
|
260
|
+
}] });
|
|
261
|
+
function provideHostedAuthEventHandler(handlerFactory, config = {}) {
|
|
262
|
+
return makeEnvironmentProviders([
|
|
263
|
+
{
|
|
264
|
+
provide: HOSTED_AUTH_EVENT_HANDLER,
|
|
265
|
+
useFactory: handlerFactory,
|
|
266
|
+
},
|
|
267
|
+
{
|
|
268
|
+
provide: HOSTED_AUTH_EVENT_LISTENER_CONFIG,
|
|
269
|
+
useValue: normalizeHostedAuthEventListenerConfig(config),
|
|
270
|
+
},
|
|
271
|
+
{
|
|
272
|
+
provide: ENVIRONMENT_INITIALIZER,
|
|
273
|
+
multi: true,
|
|
274
|
+
useValue: () => inject(HostedAuthEventListenerService).start(),
|
|
275
|
+
},
|
|
276
|
+
]);
|
|
277
|
+
}
|
|
278
|
+
function normalizeHostedAuthEventListenerConfig(config) {
|
|
279
|
+
return {
|
|
280
|
+
acceptedSources: config.acceptedSources ?? DEFAULT_HOSTED_AUTH_EVENT_LISTENER_CONFIG.acceptedSources,
|
|
281
|
+
acceptAnySource: config.acceptAnySource ?? DEFAULT_HOSTED_AUTH_EVENT_LISTENER_CONFIG.acceptAnySource,
|
|
282
|
+
acceptedOrigins: config.acceptedOrigins ?? DEFAULT_HOSTED_AUTH_EVENT_LISTENER_CONFIG.acceptedOrigins,
|
|
283
|
+
acceptAnyOrigin: config.acceptAnyOrigin ?? DEFAULT_HOSTED_AUTH_EVENT_LISTENER_CONFIG.acceptAnyOrigin,
|
|
284
|
+
acceptedMessageSources: config.acceptedMessageSources ??
|
|
285
|
+
DEFAULT_HOSTED_AUTH_EVENT_LISTENER_CONFIG.acceptedMessageSources,
|
|
286
|
+
acceptAnyMessageSource: config.acceptAnyMessageSource ??
|
|
287
|
+
DEFAULT_HOSTED_AUTH_EVENT_LISTENER_CONFIG.acceptAnyMessageSource,
|
|
288
|
+
requireSameOrigin: config.requireSameOrigin ?? DEFAULT_HOSTED_AUTH_EVENT_LISTENER_CONFIG.requireSameOrigin,
|
|
289
|
+
};
|
|
290
|
+
}
|
|
291
|
+
function createHostedAuthMessage(type, detail) {
|
|
292
|
+
return {
|
|
293
|
+
channel: HOSTED_AUTH_MESSAGE_CHANNEL,
|
|
294
|
+
version: HOSTED_AUTH_MESSAGE_VERSION,
|
|
295
|
+
type,
|
|
296
|
+
detail,
|
|
297
|
+
};
|
|
298
|
+
}
|
|
299
|
+
function getHostedAuthEventTypeFromWindowEventName(eventName) {
|
|
300
|
+
switch (eventName) {
|
|
301
|
+
case HOSTED_AUTH_WINDOW_EVENT_NAMES.AUTH_EXPIRED:
|
|
302
|
+
return 'AUTH_EXPIRED';
|
|
303
|
+
case HOSTED_AUTH_WINDOW_EVENT_NAMES.LOGOUT_REQUEST:
|
|
304
|
+
return 'LOGOUT_REQUEST';
|
|
305
|
+
default:
|
|
306
|
+
return null;
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
function isHostedAuthEventType(value) {
|
|
310
|
+
return value === 'AUTH_EXPIRED' || value === 'LOGOUT_REQUEST';
|
|
311
|
+
}
|
|
312
|
+
function isHostedAuthMessage(value) {
|
|
313
|
+
return (typeof value === 'object' &&
|
|
314
|
+
value !== null &&
|
|
315
|
+
value.channel === HOSTED_AUTH_MESSAGE_CHANNEL &&
|
|
316
|
+
value.version === HOSTED_AUTH_MESSAGE_VERSION &&
|
|
317
|
+
isHostedAuthEventType(value.type) &&
|
|
318
|
+
isHostedAuthEventPayload(value.detail));
|
|
319
|
+
}
|
|
320
|
+
function isHostedAuthEventPayload(value) {
|
|
321
|
+
return (typeof value === 'object' &&
|
|
322
|
+
value !== null &&
|
|
323
|
+
typeof value.source === 'string' &&
|
|
324
|
+
value.source.trim().length > 0 &&
|
|
325
|
+
isOptionalNumber(value.status) &&
|
|
326
|
+
isOptionalNullableString(value.url));
|
|
327
|
+
}
|
|
328
|
+
function isOptionalNumber(value) {
|
|
329
|
+
return value === undefined || (typeof value === 'number' && Number.isFinite(value));
|
|
330
|
+
}
|
|
331
|
+
function isOptionalNullableString(value) {
|
|
332
|
+
return value === undefined || value === null || typeof value === 'string';
|
|
333
|
+
}
|
|
334
|
+
|
|
109
335
|
/**
|
|
110
336
|
* 加载状态存储
|
|
111
337
|
* @author Chen Yu
|
|
@@ -625,7 +851,7 @@ function catchErrorResponse(httpRequest, error, unauthorizedHandler, config) {
|
|
|
625
851
|
return throwError(() => new BusinessException(httpErrorResponse.error?.message));
|
|
626
852
|
}
|
|
627
853
|
if (httpErrorResponse.status === 401) {
|
|
628
|
-
unauthorizedHandler?.();
|
|
854
|
+
unauthorizedHandler?.(httpErrorResponse);
|
|
629
855
|
}
|
|
630
856
|
logHttpError(errorDetails, config);
|
|
631
857
|
return throwError(() => new HttpCustomException(httpErrorResponse.status, message, httpRequest.method, httpRequest.url, errorDetails.requestHeaders, errorDetails.requestBody, errorDetails.responseBody));
|
|
@@ -808,6 +1034,63 @@ const APP_RUNTIME_CONTEXT = new InjectionToken('APP_RUNTIME_CONTEXT', {
|
|
|
808
1034
|
factory: () => DEFAULT_APP_RUNTIME_CONTEXT,
|
|
809
1035
|
});
|
|
810
1036
|
|
|
1037
|
+
const HOSTED_WORKSPACE_VIEWPORTS = new InjectionToken('HOSTED_WORKSPACE_VIEWPORTS', { factory: () => [] });
|
|
1038
|
+
function createAppRuntimeProviders(options) {
|
|
1039
|
+
const hostedWorkspaceViewports = toHostedWorkspaceViewports(options.hostedWorkspaceViewport);
|
|
1040
|
+
const provideApp = (config) => makeEnvironmentProviders([
|
|
1041
|
+
{
|
|
1042
|
+
provide: options.runtimeConfigToken,
|
|
1043
|
+
useValue: normalizeRuntimeConfig(config, options.hostedRouteBasePath),
|
|
1044
|
+
},
|
|
1045
|
+
]);
|
|
1046
|
+
return {
|
|
1047
|
+
provideApp,
|
|
1048
|
+
provideStandaloneApp: (appOptions = {}) => {
|
|
1049
|
+
const { httpInterceptors = [], ...runtimeOptions } = appOptions;
|
|
1050
|
+
return makeEnvironmentProviders([
|
|
1051
|
+
provideHttpClient(withInterceptors([...httpInterceptors, requestInterceptor, responseInterceptor])),
|
|
1052
|
+
provideApp({ ...runtimeOptions, runtime: 'standalone' }),
|
|
1053
|
+
]);
|
|
1054
|
+
},
|
|
1055
|
+
provideHostedApp: (appOptions = {}) => {
|
|
1056
|
+
const { httpInterceptors = [], ...runtimeOptions } = appOptions;
|
|
1057
|
+
return makeEnvironmentProviders([
|
|
1058
|
+
provideApp({ ...runtimeOptions, runtime: 'hosted' }),
|
|
1059
|
+
provideHostedHttp(httpInterceptors),
|
|
1060
|
+
...hostedWorkspaceViewports.map((viewport) => ({
|
|
1061
|
+
provide: HOSTED_WORKSPACE_VIEWPORTS,
|
|
1062
|
+
multi: true,
|
|
1063
|
+
useValue: viewport,
|
|
1064
|
+
})),
|
|
1065
|
+
]);
|
|
1066
|
+
},
|
|
1067
|
+
provideHostedHttp,
|
|
1068
|
+
};
|
|
1069
|
+
function provideHostedHttp(interceptors = []) {
|
|
1070
|
+
return makeEnvironmentProviders([
|
|
1071
|
+
provideHttpClient(withInterceptors([...interceptors]), withRequestsMadeViaParent()),
|
|
1072
|
+
]);
|
|
1073
|
+
}
|
|
1074
|
+
}
|
|
1075
|
+
function toHostedWorkspaceViewports(viewport) {
|
|
1076
|
+
if (!viewport) {
|
|
1077
|
+
return [];
|
|
1078
|
+
}
|
|
1079
|
+
return isHostedWorkspaceViewportArray(viewport) ? viewport : [viewport];
|
|
1080
|
+
}
|
|
1081
|
+
function isHostedWorkspaceViewportArray(value) {
|
|
1082
|
+
return Array.isArray(value);
|
|
1083
|
+
}
|
|
1084
|
+
function normalizeRuntimeConfig(config, hostedRouteBasePath) {
|
|
1085
|
+
return {
|
|
1086
|
+
runtime: config.runtime,
|
|
1087
|
+
routeBasePath: normalizeRouteBasePath(config.routeBasePath ?? (config.runtime === 'hosted' ? hostedRouteBasePath : '')),
|
|
1088
|
+
};
|
|
1089
|
+
}
|
|
1090
|
+
function normalizeRouteBasePath(value) {
|
|
1091
|
+
return value.replace(/\/+$/, '');
|
|
1092
|
+
}
|
|
1093
|
+
|
|
811
1094
|
function provideRuntimeContext(context) {
|
|
812
1095
|
return makeEnvironmentProviders([
|
|
813
1096
|
{
|
|
@@ -900,32 +1183,190 @@ class HasPermissionDirective {
|
|
|
900
1183
|
elementRef = inject((ElementRef));
|
|
901
1184
|
renderer = inject(Renderer2);
|
|
902
1185
|
permissionService = inject(PermissionService);
|
|
1186
|
+
destroyRef = inject(DestroyRef);
|
|
1187
|
+
permissionDisabled = false;
|
|
1188
|
+
hadAriaDisabledBeforePermission = false;
|
|
1189
|
+
ariaDisabledBeforePermission = null;
|
|
1190
|
+
hadDisabledAttributeBeforePermission = false;
|
|
1191
|
+
disabledAttributeBeforePermission = null;
|
|
1192
|
+
disabledPropertyBeforePermission = null;
|
|
903
1193
|
hasPermission = input(undefined, ...(ngDevMode ? [{ debugName: "hasPermission" }] : /* istanbul ignore next */ []));
|
|
904
1194
|
vHasPermission = input(undefined, { ...(ngDevMode ? { debugName: "vHasPermission" } : /* istanbul ignore next */ {}), alias: 'vHasPermission' });
|
|
905
1195
|
vHasPermissionKebab = input(undefined, { ...(ngDevMode ? { debugName: "vHasPermissionKebab" } : /* istanbul ignore next */ {}), alias: 'v-has-permission' });
|
|
1196
|
+
hasPermissionMode = input('hide', ...(ngDevMode ? [{ debugName: "hasPermissionMode" }] : /* istanbul ignore next */ []));
|
|
1197
|
+
hasPermissionDisabled = input(false, { ...(ngDevMode ? { debugName: "hasPermissionDisabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
906
1198
|
constructor() {
|
|
1199
|
+
const removeClickListener = this.renderer.listen(this.elementRef.nativeElement, 'click', (event) => this.preventInteraction(event), { capture: true });
|
|
1200
|
+
const removeKeydownListener = this.renderer.listen(this.elementRef.nativeElement, 'keydown', (event) => this.preventKeyboardInteraction(event), { capture: true });
|
|
1201
|
+
this.destroyRef.onDestroy(() => {
|
|
1202
|
+
removeClickListener();
|
|
1203
|
+
removeKeydownListener();
|
|
1204
|
+
});
|
|
907
1205
|
effect(() => {
|
|
908
1206
|
const required = this.hasPermission() ?? this.vHasPermission() ?? this.vHasPermissionKebab();
|
|
909
|
-
const
|
|
910
|
-
if (
|
|
911
|
-
this.
|
|
912
|
-
|
|
1207
|
+
const permitted = this.permissionService.hasPermission(required);
|
|
1208
|
+
if (permitted) {
|
|
1209
|
+
this.showElement();
|
|
1210
|
+
}
|
|
1211
|
+
else if (this.deniedMode() === 'disable') {
|
|
1212
|
+
this.disableElement();
|
|
913
1213
|
}
|
|
914
1214
|
else {
|
|
915
|
-
this.
|
|
916
|
-
this.renderer.setAttribute(this.elementRef.nativeElement, 'aria-hidden', 'true');
|
|
1215
|
+
this.hideElement();
|
|
917
1216
|
}
|
|
918
1217
|
});
|
|
919
1218
|
}
|
|
1219
|
+
deniedMode() {
|
|
1220
|
+
return this.hasPermissionDisabled() ? 'disable' : this.hasPermissionMode();
|
|
1221
|
+
}
|
|
1222
|
+
showElement() {
|
|
1223
|
+
const element = this.elementRef.nativeElement;
|
|
1224
|
+
this.renderer.removeStyle(element, 'display');
|
|
1225
|
+
this.renderer.removeAttribute(element, 'aria-hidden');
|
|
1226
|
+
this.clearDisabledState();
|
|
1227
|
+
}
|
|
1228
|
+
hideElement() {
|
|
1229
|
+
const element = this.elementRef.nativeElement;
|
|
1230
|
+
this.clearDisabledState();
|
|
1231
|
+
this.renderer.setStyle(element, 'display', 'none');
|
|
1232
|
+
this.renderer.setAttribute(element, 'aria-hidden', 'true');
|
|
1233
|
+
}
|
|
1234
|
+
disableElement() {
|
|
1235
|
+
const element = this.elementRef.nativeElement;
|
|
1236
|
+
if (!this.permissionDisabled) {
|
|
1237
|
+
this.rememberDisabledState(element);
|
|
1238
|
+
}
|
|
1239
|
+
this.permissionDisabled = true;
|
|
1240
|
+
this.renderer.removeStyle(element, 'display');
|
|
1241
|
+
this.renderer.removeAttribute(element, 'aria-hidden');
|
|
1242
|
+
this.renderer.setAttribute(element, 'aria-disabled', 'true');
|
|
1243
|
+
this.renderer.setAttribute(element, 'disabled', '');
|
|
1244
|
+
this.renderer.setProperty(element, 'disabled', true);
|
|
1245
|
+
}
|
|
1246
|
+
clearDisabledState() {
|
|
1247
|
+
const element = this.elementRef.nativeElement;
|
|
1248
|
+
if (!this.permissionDisabled) {
|
|
1249
|
+
return;
|
|
1250
|
+
}
|
|
1251
|
+
if (this.hadAriaDisabledBeforePermission) {
|
|
1252
|
+
this.renderer.setAttribute(element, 'aria-disabled', this.ariaDisabledBeforePermission ?? '');
|
|
1253
|
+
}
|
|
1254
|
+
else {
|
|
1255
|
+
this.renderer.removeAttribute(element, 'aria-disabled');
|
|
1256
|
+
}
|
|
1257
|
+
if (this.hadDisabledAttributeBeforePermission) {
|
|
1258
|
+
this.renderer.setAttribute(element, 'disabled', this.disabledAttributeBeforePermission ?? '');
|
|
1259
|
+
}
|
|
1260
|
+
else {
|
|
1261
|
+
this.renderer.removeAttribute(element, 'disabled');
|
|
1262
|
+
}
|
|
1263
|
+
if (this.disabledPropertyBeforePermission !== null) {
|
|
1264
|
+
this.renderer.setProperty(element, 'disabled', this.disabledPropertyBeforePermission);
|
|
1265
|
+
}
|
|
1266
|
+
this.permissionDisabled = false;
|
|
1267
|
+
this.disabledPropertyBeforePermission = null;
|
|
1268
|
+
}
|
|
1269
|
+
rememberDisabledState(element) {
|
|
1270
|
+
this.hadAriaDisabledBeforePermission = element.hasAttribute('aria-disabled');
|
|
1271
|
+
this.ariaDisabledBeforePermission = element.getAttribute('aria-disabled');
|
|
1272
|
+
this.hadDisabledAttributeBeforePermission = element.hasAttribute('disabled');
|
|
1273
|
+
this.disabledAttributeBeforePermission = element.getAttribute('disabled');
|
|
1274
|
+
this.disabledPropertyBeforePermission = this.readDisabledProperty(element);
|
|
1275
|
+
}
|
|
1276
|
+
readDisabledProperty(element) {
|
|
1277
|
+
const value = element.disabled;
|
|
1278
|
+
return typeof value === 'boolean' ? value : null;
|
|
1279
|
+
}
|
|
1280
|
+
preventKeyboardInteraction(event) {
|
|
1281
|
+
if (event.key === 'Enter' || event.key === ' ') {
|
|
1282
|
+
this.preventInteraction(event);
|
|
1283
|
+
}
|
|
1284
|
+
}
|
|
1285
|
+
preventInteraction(event) {
|
|
1286
|
+
if (!this.permissionDisabled) {
|
|
1287
|
+
return;
|
|
1288
|
+
}
|
|
1289
|
+
event.preventDefault();
|
|
1290
|
+
event.stopImmediatePropagation();
|
|
1291
|
+
}
|
|
920
1292
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: HasPermissionDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
921
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.8", type: HasPermissionDirective, isStandalone: true, selector: "[hasPermission],[vHasPermission],[v-has-permission]", inputs: { hasPermission: { classPropertyName: "hasPermission", publicName: "hasPermission", isSignal: true, isRequired: false, transformFunction: null }, vHasPermission: { classPropertyName: "vHasPermission", publicName: "vHasPermission", isSignal: true, isRequired: false, transformFunction: null }, vHasPermissionKebab: { classPropertyName: "vHasPermissionKebab", publicName: "v-has-permission", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 });
|
|
1293
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.8", type: HasPermissionDirective, isStandalone: true, selector: "[hasPermission],[vHasPermission],[v-has-permission]", inputs: { hasPermission: { classPropertyName: "hasPermission", publicName: "hasPermission", isSignal: true, isRequired: false, transformFunction: null }, vHasPermission: { classPropertyName: "vHasPermission", publicName: "vHasPermission", isSignal: true, isRequired: false, transformFunction: null }, vHasPermissionKebab: { classPropertyName: "vHasPermissionKebab", publicName: "v-has-permission", isSignal: true, isRequired: false, transformFunction: null }, hasPermissionMode: { classPropertyName: "hasPermissionMode", publicName: "hasPermissionMode", isSignal: true, isRequired: false, transformFunction: null }, hasPermissionDisabled: { classPropertyName: "hasPermissionDisabled", publicName: "hasPermissionDisabled", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 });
|
|
922
1294
|
}
|
|
923
1295
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: HasPermissionDirective, decorators: [{
|
|
924
1296
|
type: Directive,
|
|
925
1297
|
args: [{
|
|
926
1298
|
selector: '[hasPermission],[vHasPermission],[v-has-permission]',
|
|
927
1299
|
}]
|
|
928
|
-
}], ctorParameters: () => [], propDecorators: { hasPermission: [{ type: i0.Input, args: [{ isSignal: true, alias: "hasPermission", required: false }] }], vHasPermission: [{ type: i0.Input, args: [{ isSignal: true, alias: "vHasPermission", required: false }] }], vHasPermissionKebab: [{ type: i0.Input, args: [{ isSignal: true, alias: "v-has-permission", required: false }] }] } });
|
|
1300
|
+
}], ctorParameters: () => [], propDecorators: { hasPermission: [{ type: i0.Input, args: [{ isSignal: true, alias: "hasPermission", required: false }] }], vHasPermission: [{ type: i0.Input, args: [{ isSignal: true, alias: "vHasPermission", required: false }] }], vHasPermissionKebab: [{ type: i0.Input, args: [{ isSignal: true, alias: "v-has-permission", required: false }] }], hasPermissionMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "hasPermissionMode", required: false }] }], hasPermissionDisabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "hasPermissionDisabled", required: false }] }] } });
|
|
1301
|
+
|
|
1302
|
+
const PLATFORM_SCROLLBAR_STYLE_ELEMENT_ID = 'platform-core-ng-scrollbar';
|
|
1303
|
+
const PLATFORM_SCROLLBAR_VARIABLES = [
|
|
1304
|
+
{ name: '--platform-scrollbar-size', fallback: '0.375rem' },
|
|
1305
|
+
{ name: '--platform-scrollbar-track', fallback: 'transparent' },
|
|
1306
|
+
{ name: '--platform-scrollbar-thumb', fallback: 'rgba(102, 120, 138, 0.42)' },
|
|
1307
|
+
{ name: '--platform-scrollbar-thumb-hover', fallback: 'rgba(102, 120, 138, 0.58)' },
|
|
1308
|
+
];
|
|
1309
|
+
function syncPlatformScrollbarStylesToIframe(iframe, options = {}) {
|
|
1310
|
+
try {
|
|
1311
|
+
syncPlatformScrollbarStyles(iframe?.contentDocument, options);
|
|
1312
|
+
}
|
|
1313
|
+
catch {
|
|
1314
|
+
// Cross-origin frames cannot be styled from the host. In those cases the
|
|
1315
|
+
// embedded application must load platform scrollbar styles itself.
|
|
1316
|
+
}
|
|
1317
|
+
}
|
|
1318
|
+
function syncPlatformScrollbarStyles(targetDocument, options = {}) {
|
|
1319
|
+
if (!targetDocument?.head) {
|
|
1320
|
+
return;
|
|
1321
|
+
}
|
|
1322
|
+
const style = getOrCreateStyleElement(targetDocument, options.styleElementId ?? PLATFORM_SCROLLBAR_STYLE_ELEMENT_ID);
|
|
1323
|
+
style.textContent = createPlatformScrollbarStyles(options.sourceElement);
|
|
1324
|
+
}
|
|
1325
|
+
function getOrCreateStyleElement(targetDocument, id) {
|
|
1326
|
+
const existingStyle = targetDocument.getElementById(id);
|
|
1327
|
+
if (existingStyle?.tagName.toLowerCase() === 'style') {
|
|
1328
|
+
return existingStyle;
|
|
1329
|
+
}
|
|
1330
|
+
const style = targetDocument.createElement('style');
|
|
1331
|
+
style.id = id;
|
|
1332
|
+
targetDocument.head.append(style);
|
|
1333
|
+
return style;
|
|
1334
|
+
}
|
|
1335
|
+
function createPlatformScrollbarStyles(sourceElement) {
|
|
1336
|
+
const sourceWindow = sourceElement?.ownerDocument.defaultView;
|
|
1337
|
+
const sourceStyle = sourceElement && sourceWindow ? sourceWindow.getComputedStyle(sourceElement) : null;
|
|
1338
|
+
const variableDeclarations = PLATFORM_SCROLLBAR_VARIABLES
|
|
1339
|
+
.map(({ name, fallback }) => `${name}: ${sourceStyle?.getPropertyValue(name).trim() || fallback};`)
|
|
1340
|
+
.join('\n');
|
|
1341
|
+
return `
|
|
1342
|
+
:root {
|
|
1343
|
+
${variableDeclarations}
|
|
1344
|
+
}
|
|
1345
|
+
|
|
1346
|
+
* {
|
|
1347
|
+
scrollbar-color: var(--platform-scrollbar-thumb) var(--platform-scrollbar-track);
|
|
1348
|
+
scrollbar-width: thin;
|
|
1349
|
+
}
|
|
1350
|
+
|
|
1351
|
+
*::-webkit-scrollbar {
|
|
1352
|
+
width: var(--platform-scrollbar-size);
|
|
1353
|
+
height: var(--platform-scrollbar-size);
|
|
1354
|
+
}
|
|
1355
|
+
|
|
1356
|
+
*::-webkit-scrollbar-track {
|
|
1357
|
+
background: var(--platform-scrollbar-track);
|
|
1358
|
+
}
|
|
1359
|
+
|
|
1360
|
+
*::-webkit-scrollbar-thumb {
|
|
1361
|
+
border-radius: 999px;
|
|
1362
|
+
background: var(--platform-scrollbar-thumb);
|
|
1363
|
+
}
|
|
1364
|
+
|
|
1365
|
+
*::-webkit-scrollbar-thumb:hover {
|
|
1366
|
+
background: var(--platform-scrollbar-thumb-hover);
|
|
1367
|
+
}
|
|
1368
|
+
`.trim();
|
|
1369
|
+
}
|
|
929
1370
|
|
|
930
1371
|
/**
|
|
931
1372
|
* Shell配置相关的类型定义和工具函数
|
|
@@ -2273,6 +2714,30 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
|
|
|
2273
2714
|
args: [{ selector: 's-base-list', imports: [], changeDetection: ChangeDetectionStrategy.OnPush, template: "<nav class=\"nav\">\r\n <ng-content select=\"[list-actions]\"></ng-content>\r\n</nav>\r\n\r\n<main class=\"content\">\r\n <ng-content select=\"[list-table]\"></ng-content>\r\n</main>\r\n\r\n<footer>\r\n <ng-content select=\"[list-pagination]\"></ng-content>\r\n</footer>\r\n", styles: [":host{display:block;background-color:var(--color-surface);padding:var(--space-4);height:calc(100% - 2 * var(--space-4));min-width:0}.content{display:block;max-width:100%;min-width:0;overflow-x:auto}.nav{border-color:var(--color-border);padding:var(--space-2) 0;display:flex;flex-direction:column}footer{width:100%;max-width:100%;min-width:0}@media(max-width:768px){:host{display:block;min-width:0;background:none;padding:0}.nav{padding-left:0;padding-right:0}}\n"] }]
|
|
2274
2715
|
}] });
|
|
2275
2716
|
|
|
2717
|
+
class OverlayHostRegistry {
|
|
2718
|
+
hosts = new Map();
|
|
2719
|
+
register(name, element) {
|
|
2720
|
+
this.hosts.set(name, element);
|
|
2721
|
+
}
|
|
2722
|
+
unregister(name, element) {
|
|
2723
|
+
if (element && this.hosts.get(name) !== element) {
|
|
2724
|
+
return;
|
|
2725
|
+
}
|
|
2726
|
+
this.hosts.delete(name);
|
|
2727
|
+
}
|
|
2728
|
+
get(name) {
|
|
2729
|
+
return this.hosts.get(name);
|
|
2730
|
+
}
|
|
2731
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: OverlayHostRegistry, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2732
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: OverlayHostRegistry, providedIn: 'root' });
|
|
2733
|
+
}
|
|
2734
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: OverlayHostRegistry, decorators: [{
|
|
2735
|
+
type: Injectable,
|
|
2736
|
+
args: [{
|
|
2737
|
+
providedIn: 'root',
|
|
2738
|
+
}]
|
|
2739
|
+
}] });
|
|
2740
|
+
|
|
2276
2741
|
const PLATFORM_OVERLAY_VIEW_CONTAINER_REF = new InjectionToken('PLATFORM_OVERLAY_VIEW_CONTAINER_REF', {
|
|
2277
2742
|
providedIn: 'root',
|
|
2278
2743
|
factory: () => null,
|
|
@@ -2280,6 +2745,7 @@ const PLATFORM_OVERLAY_VIEW_CONTAINER_REF = new InjectionToken('PLATFORM_OVERLAY
|
|
|
2280
2745
|
class PlatformOverlayPortalHost {
|
|
2281
2746
|
document = inject(DOCUMENT);
|
|
2282
2747
|
overlay = inject(Overlay);
|
|
2748
|
+
hostRegistry = inject(OverlayHostRegistry);
|
|
2283
2749
|
defaultViewContainerRef = inject(PLATFORM_OVERLAY_VIEW_CONTAINER_REF);
|
|
2284
2750
|
attachComponent(component, options = {}) {
|
|
2285
2751
|
if (!this.document.body) {
|
|
@@ -2290,6 +2756,12 @@ class PlatformOverlayPortalHost {
|
|
|
2290
2756
|
scrollStrategy: this.overlay.scrollStrategies.noop(),
|
|
2291
2757
|
...options.config,
|
|
2292
2758
|
});
|
|
2759
|
+
const container = this.resolveContainer(options);
|
|
2760
|
+
if (container) {
|
|
2761
|
+
container.appendChild(overlayRef.hostElement);
|
|
2762
|
+
this.applyHostedOverlayPosition(overlayRef);
|
|
2763
|
+
}
|
|
2764
|
+
this.applyOverlayMetadata(overlayRef, options);
|
|
2293
2765
|
const componentRef = overlayRef.attach(new ComponentPortal(component, options.viewContainerRef ?? this.defaultViewContainerRef, options.injector ?? null));
|
|
2294
2766
|
return {
|
|
2295
2767
|
overlayRef,
|
|
@@ -2297,6 +2769,44 @@ class PlatformOverlayPortalHost {
|
|
|
2297
2769
|
dispose: () => overlayRef.dispose(),
|
|
2298
2770
|
};
|
|
2299
2771
|
}
|
|
2772
|
+
resolveContainer(options) {
|
|
2773
|
+
if (options.container) {
|
|
2774
|
+
return options.container;
|
|
2775
|
+
}
|
|
2776
|
+
if (options.host) {
|
|
2777
|
+
return this.hostRegistry.get(options.host) ?? this.document.body;
|
|
2778
|
+
}
|
|
2779
|
+
return null;
|
|
2780
|
+
}
|
|
2781
|
+
applyHostedOverlayPosition(overlayRef) {
|
|
2782
|
+
const hostElement = overlayRef.hostElement;
|
|
2783
|
+
this.disableTopLayerPopover(hostElement);
|
|
2784
|
+
hostElement.classList.add('platform-overlay-hosted');
|
|
2785
|
+
hostElement.style.position = 'absolute';
|
|
2786
|
+
hostElement.style.inset = '0';
|
|
2787
|
+
hostElement.style.width = '100%';
|
|
2788
|
+
hostElement.style.height = '100%';
|
|
2789
|
+
}
|
|
2790
|
+
disableTopLayerPopover(hostElement) {
|
|
2791
|
+
const popoverElement = hostElement;
|
|
2792
|
+
try {
|
|
2793
|
+
popoverElement.hidePopover?.();
|
|
2794
|
+
}
|
|
2795
|
+
catch {
|
|
2796
|
+
// Hosted overlays are intentionally contained in their app host.
|
|
2797
|
+
}
|
|
2798
|
+
hostElement.removeAttribute('popover');
|
|
2799
|
+
}
|
|
2800
|
+
applyOverlayMetadata(overlayRef, options) {
|
|
2801
|
+
if (options.scope) {
|
|
2802
|
+
overlayRef.hostElement.dataset['overlayScope'] = options.scope;
|
|
2803
|
+
overlayRef.overlayElement.dataset['overlayScope'] = options.scope;
|
|
2804
|
+
}
|
|
2805
|
+
if (options.owner) {
|
|
2806
|
+
overlayRef.hostElement.dataset['overlayOwner'] = options.owner;
|
|
2807
|
+
overlayRef.overlayElement.dataset['overlayOwner'] = options.owner;
|
|
2808
|
+
}
|
|
2809
|
+
}
|
|
2300
2810
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: PlatformOverlayPortalHost, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2301
2811
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: PlatformOverlayPortalHost, providedIn: 'root' });
|
|
2302
2812
|
}
|
|
@@ -2379,7 +2889,7 @@ class BsMessageContainer {
|
|
|
2379
2889
|
this.action.emit({ itemId, actionId });
|
|
2380
2890
|
}
|
|
2381
2891
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: BsMessageContainer, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2382
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: BsMessageContainer, isStandalone: true, selector: "s-message-container", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { close: "close", detail: "detail", action: "action" }, host: { attributes: { "aria-live": "polite", "aria-relevant": "additions removals" }, classAttribute: "bs-message-host" }, ngImport: i0, template: "@for (item of viewItems(); track item.id) {\r\n <div\r\n class=\"bs-message\"\r\n role=\"status\"\r\n [class.bs-message--solid]=\"item.variant === 'solid'\"\r\n [class.bs-message--has-actions]=\"item.actions.length > 0\"\r\n [class.bs-message--info]=\"item.type === 'info' || item.type === 'help' || item.type === 'loading'\"\r\n [class.bs-message--success]=\"item.type === 'success'\"\r\n [class.bs-message--warning]=\"item.type === 'warning'\"\r\n [class.bs-message--error]=\"item.type === 'error'\"\r\n >\r\n @if (item.showIcon) {\r\n <span class=\"bs-message__icon\" [class]=\"'bs-message__icon ' + iconClass(item.type)\" aria-hidden=\"true\">\r\n @switch (item.type) {\r\n @case ('success') {\r\n <svg viewBox=\"0 0 16 16\" fill=\"none\">\r\n <circle cx=\"8\" cy=\"8\" r=\"8\" fill=\"currentColor\"></circle>\r\n <path stroke=\"#fff\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.6\" d=\"M4.4 8.2 6.7 10.5 11.8 5.5\"></path>\r\n </svg>\r\n }\r\n @case ('warning') {\r\n <svg viewBox=\"0 0 16 16\" fill=\"none\">\r\n <path fill=\"currentColor\" d=\"M7.13 2.05a1 1 0 0 1 1.74 0l6.05 10.5A1 1 0 0 1 14.05 14H1.95a1 1 0 0 1-.87-1.5l6.05-10.45Z\"></path>\r\n <path stroke=\"#fff\" stroke-linecap=\"round\" stroke-width=\"1.4\" d=\"M8 5.55v4\"></path>\r\n <circle cx=\"8\" cy=\"11.8\" r=\".75\" fill=\"#fff\"></circle>\r\n </svg>\r\n }\r\n @case ('error') {\r\n <svg viewBox=\"0 0 16 16\" fill=\"none\">\r\n <circle cx=\"8\" cy=\"8\" r=\"8\" fill=\"currentColor\"></circle>\r\n <path stroke=\"#fff\" stroke-linecap=\"round\" stroke-width=\"1.6\" d=\"m5.5 5.5 5 5M10.5 5.5l-5 5\"></path>\r\n </svg>\r\n }\r\n @case ('loading') {\r\n <span class=\"bs-message__icon-dot\"></span>\r\n }\r\n @default {\r\n <svg viewBox=\"0 0 16 16\" fill=\"none\">\r\n <circle cx=\"8\" cy=\"8\" r=\"8\" fill=\"currentColor\"></circle>\r\n <path stroke=\"#fff\" stroke-linecap=\"round\" stroke-width=\"1.4\" d=\"M8 7.1v4\"></path>\r\n <circle cx=\"8\" cy=\"4.8\" r=\".75\" fill=\"#fff\"></circle>\r\n </svg>\r\n }\r\n }\r\n </span>\r\n }\r\n\r\n <div class=\"bs-message__body\">\r\n <div class=\"bs-message__headline\">\r\n <div class=\"bs-message__title-wrap\">\r\n <div class=\"bs-message__title\">{{ item.title }}</div>\r\n\r\n @if (item.repeatCount > 1) {\r\n <span class=\"bs-message__repeat\" aria-label=\"Repeated {{ item.repeatCount }} times\">\r\n * {{ item.repeatCount }}\r\n </span>\r\n }\r\n </div>\r\n\r\n @if (item.detailText && !item.description) {\r\n <button\r\n type=\"button\"\r\n class=\"bs-message__detail\"\r\n (click)=\"onDetail(item.id)\"\r\n >\r\n {{ item.detailText }}\r\n </button>\r\n }\r\n </div>\r\n\r\n @if (item.description) {\r\n <div class=\"bs-message__description\">\r\n <span class=\"bs-message__description-text\">{{ item.description }}</span>\r\n\r\n @if (item.detailText) {\r\n <button\r\n type=\"button\"\r\n class=\"bs-message__detail\"\r\n (click)=\"onDetail(item.id)\"\r\n >\r\n {{ item.detailText }}\r\n </button>\r\n }\r\n </div>\r\n }\r\n\r\n </div>\r\n\r\n @if (item.actions.length) {\r\n <div class=\"bs-message__actions\">\r\n @for (action of item.actions; track action.id) {\r\n <button\r\n type=\"button\"\r\n class=\"bs-message__action\"\r\n [class.bs-message__action--primary]=\"action.tone === 'primary'\"\r\n (click)=\"onAction(item.id, action.id)\"\r\n >\r\n {{ action.label }}\r\n </button>\r\n }\r\n </div>\r\n }\r\n\r\n @if (item.closable) {\r\n <button\r\n type=\"button\"\r\n class=\"bs-message__close\"\r\n aria-label=\"Close\"\r\n (click)=\"close.emit(item.id)\"\r\n >\r\n <svg viewBox=\"0 0 16 16\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" aria-hidden=\"true\">\r\n <path stroke-linecap=\"round\" d=\"m4 4 8 8M12 4 4 12\"></path>\r\n </svg>\r\n </button>\r\n }\r\n </div>\r\n}\r\n", styles: [":host{position:fixed;top:16px;left:50%;z-index:
|
|
2892
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: BsMessageContainer, isStandalone: true, selector: "s-message-container", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { close: "close", detail: "detail", action: "action" }, host: { attributes: { "aria-live": "polite", "aria-relevant": "additions removals" }, classAttribute: "bs-message-host" }, ngImport: i0, template: "@for (item of viewItems(); track item.id) {\r\n <div\r\n class=\"bs-message\"\r\n role=\"status\"\r\n [class.bs-message--solid]=\"item.variant === 'solid'\"\r\n [class.bs-message--has-actions]=\"item.actions.length > 0\"\r\n [class.bs-message--info]=\"item.type === 'info' || item.type === 'help' || item.type === 'loading'\"\r\n [class.bs-message--success]=\"item.type === 'success'\"\r\n [class.bs-message--warning]=\"item.type === 'warning'\"\r\n [class.bs-message--error]=\"item.type === 'error'\"\r\n >\r\n @if (item.showIcon) {\r\n <span class=\"bs-message__icon\" [class]=\"'bs-message__icon ' + iconClass(item.type)\" aria-hidden=\"true\">\r\n @switch (item.type) {\r\n @case ('success') {\r\n <svg viewBox=\"0 0 16 16\" fill=\"none\">\r\n <circle cx=\"8\" cy=\"8\" r=\"8\" fill=\"currentColor\"></circle>\r\n <path stroke=\"#fff\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.6\" d=\"M4.4 8.2 6.7 10.5 11.8 5.5\"></path>\r\n </svg>\r\n }\r\n @case ('warning') {\r\n <svg viewBox=\"0 0 16 16\" fill=\"none\">\r\n <path fill=\"currentColor\" d=\"M7.13 2.05a1 1 0 0 1 1.74 0l6.05 10.5A1 1 0 0 1 14.05 14H1.95a1 1 0 0 1-.87-1.5l6.05-10.45Z\"></path>\r\n <path stroke=\"#fff\" stroke-linecap=\"round\" stroke-width=\"1.4\" d=\"M8 5.55v4\"></path>\r\n <circle cx=\"8\" cy=\"11.8\" r=\".75\" fill=\"#fff\"></circle>\r\n </svg>\r\n }\r\n @case ('error') {\r\n <svg viewBox=\"0 0 16 16\" fill=\"none\">\r\n <circle cx=\"8\" cy=\"8\" r=\"8\" fill=\"currentColor\"></circle>\r\n <path stroke=\"#fff\" stroke-linecap=\"round\" stroke-width=\"1.6\" d=\"m5.5 5.5 5 5M10.5 5.5l-5 5\"></path>\r\n </svg>\r\n }\r\n @case ('loading') {\r\n <span class=\"bs-message__icon-dot\"></span>\r\n }\r\n @default {\r\n <svg viewBox=\"0 0 16 16\" fill=\"none\">\r\n <circle cx=\"8\" cy=\"8\" r=\"8\" fill=\"currentColor\"></circle>\r\n <path stroke=\"#fff\" stroke-linecap=\"round\" stroke-width=\"1.4\" d=\"M8 7.1v4\"></path>\r\n <circle cx=\"8\" cy=\"4.8\" r=\".75\" fill=\"#fff\"></circle>\r\n </svg>\r\n }\r\n }\r\n </span>\r\n }\r\n\r\n <div class=\"bs-message__body\">\r\n <div class=\"bs-message__headline\">\r\n <div class=\"bs-message__title-wrap\">\r\n <div class=\"bs-message__title\">{{ item.title }}</div>\r\n\r\n @if (item.repeatCount > 1) {\r\n <span class=\"bs-message__repeat\" aria-label=\"Repeated {{ item.repeatCount }} times\">\r\n * {{ item.repeatCount }}\r\n </span>\r\n }\r\n </div>\r\n\r\n @if (item.detailText && !item.description) {\r\n <button\r\n type=\"button\"\r\n class=\"bs-message__detail\"\r\n (click)=\"onDetail(item.id)\"\r\n >\r\n {{ item.detailText }}\r\n </button>\r\n }\r\n </div>\r\n\r\n @if (item.description) {\r\n <div class=\"bs-message__description\">\r\n <span class=\"bs-message__description-text\">{{ item.description }}</span>\r\n\r\n @if (item.detailText) {\r\n <button\r\n type=\"button\"\r\n class=\"bs-message__detail\"\r\n (click)=\"onDetail(item.id)\"\r\n >\r\n {{ item.detailText }}\r\n </button>\r\n }\r\n </div>\r\n }\r\n\r\n </div>\r\n\r\n @if (item.actions.length) {\r\n <div class=\"bs-message__actions\">\r\n @for (action of item.actions; track action.id) {\r\n <button\r\n type=\"button\"\r\n class=\"bs-message__action\"\r\n [class.bs-message__action--primary]=\"action.tone === 'primary'\"\r\n (click)=\"onAction(item.id, action.id)\"\r\n >\r\n {{ action.label }}\r\n </button>\r\n }\r\n </div>\r\n }\r\n\r\n @if (item.closable) {\r\n <button\r\n type=\"button\"\r\n class=\"bs-message__close\"\r\n aria-label=\"Close\"\r\n (click)=\"close.emit(item.id)\"\r\n >\r\n <svg viewBox=\"0 0 16 16\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" aria-hidden=\"true\">\r\n <path stroke-linecap=\"round\" d=\"m4 4 8 8M12 4 4 12\"></path>\r\n </svg>\r\n </button>\r\n }\r\n </div>\r\n}\r\n", styles: [":host{position:fixed;top:16px;left:50%;z-index:2000;display:flex;flex-direction:column;gap:8px;width:min(640px,100vw - 32px);transform:translate(-50%);pointer-events:none}.bs-message{--bs-message-bg: color-mix(in srgb, var(--color-info) 10%, #fff);--bs-message-border: color-mix(in srgb, var(--color-info) 28%, #fff);--bs-message-accent: var(--color-info);--bs-message-text: var(--color-text-primary);--bs-message-muted: var(--color-text-secondary);box-sizing:border-box;width:100%;padding:15px 16px;border:1px solid var(--bs-message-border);border-radius:8px;background:var(--bs-message-bg);color:var(--bs-message-text);display:flex;align-items:flex-start;gap:12px;font-size:14px;line-height:20px;pointer-events:auto}.bs-message--solid{--bs-message-bg: var(--bs-message-accent);--bs-message-border: var(--bs-message-accent);--bs-message-text: #fff;--bs-message-muted: rgba(255, 255, 255, .84)}.bs-message--success{--bs-message-bg: color-mix(in srgb, var(--color-success) 10%, #fff);--bs-message-border: color-mix(in srgb, var(--color-success) 28%, #fff);--bs-message-accent: var(--color-success)}.bs-message--warning{--bs-message-bg: color-mix(in srgb, var(--color-warning) 12%, #fff);--bs-message-border: color-mix(in srgb, var(--color-warning) 30%, #fff);--bs-message-accent: var(--color-warning)}.bs-message--error{--bs-message-bg: color-mix(in srgb, var(--color-error) 10%, #fff);--bs-message-border: color-mix(in srgb, var(--color-error) 28%, #fff);--bs-message-accent: var(--color-error)}.bs-message__icon{width:16px;height:16px;margin-top:2px;color:var(--bs-message-accent);display:inline-flex;flex:0 0 auto}.bs-message__icon svg{width:16px;height:16px}.bs-message__icon-dot{width:16px;height:16px;border:2px solid currentColor;border-right-color:transparent;border-radius:999px;animation:bs-message-spin .8s linear infinite}.bs-message__body,.bs-message__title-wrap,.bs-message__headline{min-width:0}.bs-message__body{flex:1 1 auto}.bs-message__headline,.bs-message__title-wrap{display:flex;align-items:center}.bs-message__headline{gap:12px}.bs-message__title-wrap{gap:4px}.bs-message__title{min-width:0;font-weight:var(--font-weight-semibold);word-break:break-word}.bs-message__repeat,.bs-message__description,.bs-message__action,.bs-message__close{color:var(--bs-message-muted)}.bs-message__repeat{flex:0 0 auto;white-space:nowrap}.bs-message__description{margin-top:4px}.bs-message__description-text{display:-webkit-box;overflow:hidden;text-overflow:ellipsis;-webkit-line-clamp:2;-webkit-box-orient:vertical;word-break:break-word}:is(.bs-message__detail,.bs-message__action,.bs-message__close){padding:0;border:0;background:transparent;font:inherit;font-weight:var(--font-weight-semibold);cursor:pointer}.bs-message__detail,.bs-message__action--primary{color:var(--bs-message-accent)}.bs-message__description .bs-message__detail{margin-left:8px}.bs-message__actions{margin-left:16px;display:flex;align-items:center;justify-content:flex-end;gap:16px;align-self:center;flex:0 0 auto;max-width:44%}.bs-message__action{height:24px;white-space:nowrap}.bs-message__action:hover{color:var(--bs-message-text)}.bs-message__close{width:20px;height:20px;margin-left:4px;border-radius:4px;display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto}.bs-message__close svg{width:16px;height:16px}.bs-message__close:hover{background:color-mix(in srgb,var(--bs-message-text) 6%,transparent);color:var(--bs-message-text)}:is(.bs-message__detail,.bs-message__action,.bs-message__close):focus-visible{outline:2px solid color-mix(in srgb,var(--bs-message-accent) 42%,transparent);outline-offset:2px}@media(max-width:520px){.bs-message{gap:8px;padding-right:12px;padding-left:12px}.bs-message--has-actions{flex-wrap:wrap}.bs-message--has-actions .bs-message__close{margin-left:auto;order:2}.bs-message--has-actions .bs-message__actions{order:3;width:100%;max-width:none;margin-left:28px;justify-content:flex-start}}@keyframes bs-message-spin{to{transform:rotate(360deg)}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2383
2893
|
}
|
|
2384
2894
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: BsMessageContainer, decorators: [{
|
|
2385
2895
|
type: Component,
|
|
@@ -2390,7 +2900,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
|
|
|
2390
2900
|
'aria-live': 'polite',
|
|
2391
2901
|
// 无障碍属性:关注添加和删除的内容
|
|
2392
2902
|
'aria-relevant': 'additions removals',
|
|
2393
|
-
}, template: "@for (item of viewItems(); track item.id) {\r\n <div\r\n class=\"bs-message\"\r\n role=\"status\"\r\n [class.bs-message--solid]=\"item.variant === 'solid'\"\r\n [class.bs-message--has-actions]=\"item.actions.length > 0\"\r\n [class.bs-message--info]=\"item.type === 'info' || item.type === 'help' || item.type === 'loading'\"\r\n [class.bs-message--success]=\"item.type === 'success'\"\r\n [class.bs-message--warning]=\"item.type === 'warning'\"\r\n [class.bs-message--error]=\"item.type === 'error'\"\r\n >\r\n @if (item.showIcon) {\r\n <span class=\"bs-message__icon\" [class]=\"'bs-message__icon ' + iconClass(item.type)\" aria-hidden=\"true\">\r\n @switch (item.type) {\r\n @case ('success') {\r\n <svg viewBox=\"0 0 16 16\" fill=\"none\">\r\n <circle cx=\"8\" cy=\"8\" r=\"8\" fill=\"currentColor\"></circle>\r\n <path stroke=\"#fff\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.6\" d=\"M4.4 8.2 6.7 10.5 11.8 5.5\"></path>\r\n </svg>\r\n }\r\n @case ('warning') {\r\n <svg viewBox=\"0 0 16 16\" fill=\"none\">\r\n <path fill=\"currentColor\" d=\"M7.13 2.05a1 1 0 0 1 1.74 0l6.05 10.5A1 1 0 0 1 14.05 14H1.95a1 1 0 0 1-.87-1.5l6.05-10.45Z\"></path>\r\n <path stroke=\"#fff\" stroke-linecap=\"round\" stroke-width=\"1.4\" d=\"M8 5.55v4\"></path>\r\n <circle cx=\"8\" cy=\"11.8\" r=\".75\" fill=\"#fff\"></circle>\r\n </svg>\r\n }\r\n @case ('error') {\r\n <svg viewBox=\"0 0 16 16\" fill=\"none\">\r\n <circle cx=\"8\" cy=\"8\" r=\"8\" fill=\"currentColor\"></circle>\r\n <path stroke=\"#fff\" stroke-linecap=\"round\" stroke-width=\"1.6\" d=\"m5.5 5.5 5 5M10.5 5.5l-5 5\"></path>\r\n </svg>\r\n }\r\n @case ('loading') {\r\n <span class=\"bs-message__icon-dot\"></span>\r\n }\r\n @default {\r\n <svg viewBox=\"0 0 16 16\" fill=\"none\">\r\n <circle cx=\"8\" cy=\"8\" r=\"8\" fill=\"currentColor\"></circle>\r\n <path stroke=\"#fff\" stroke-linecap=\"round\" stroke-width=\"1.4\" d=\"M8 7.1v4\"></path>\r\n <circle cx=\"8\" cy=\"4.8\" r=\".75\" fill=\"#fff\"></circle>\r\n </svg>\r\n }\r\n }\r\n </span>\r\n }\r\n\r\n <div class=\"bs-message__body\">\r\n <div class=\"bs-message__headline\">\r\n <div class=\"bs-message__title-wrap\">\r\n <div class=\"bs-message__title\">{{ item.title }}</div>\r\n\r\n @if (item.repeatCount > 1) {\r\n <span class=\"bs-message__repeat\" aria-label=\"Repeated {{ item.repeatCount }} times\">\r\n * {{ item.repeatCount }}\r\n </span>\r\n }\r\n </div>\r\n\r\n @if (item.detailText && !item.description) {\r\n <button\r\n type=\"button\"\r\n class=\"bs-message__detail\"\r\n (click)=\"onDetail(item.id)\"\r\n >\r\n {{ item.detailText }}\r\n </button>\r\n }\r\n </div>\r\n\r\n @if (item.description) {\r\n <div class=\"bs-message__description\">\r\n <span class=\"bs-message__description-text\">{{ item.description }}</span>\r\n\r\n @if (item.detailText) {\r\n <button\r\n type=\"button\"\r\n class=\"bs-message__detail\"\r\n (click)=\"onDetail(item.id)\"\r\n >\r\n {{ item.detailText }}\r\n </button>\r\n }\r\n </div>\r\n }\r\n\r\n </div>\r\n\r\n @if (item.actions.length) {\r\n <div class=\"bs-message__actions\">\r\n @for (action of item.actions; track action.id) {\r\n <button\r\n type=\"button\"\r\n class=\"bs-message__action\"\r\n [class.bs-message__action--primary]=\"action.tone === 'primary'\"\r\n (click)=\"onAction(item.id, action.id)\"\r\n >\r\n {{ action.label }}\r\n </button>\r\n }\r\n </div>\r\n }\r\n\r\n @if (item.closable) {\r\n <button\r\n type=\"button\"\r\n class=\"bs-message__close\"\r\n aria-label=\"Close\"\r\n (click)=\"close.emit(item.id)\"\r\n >\r\n <svg viewBox=\"0 0 16 16\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" aria-hidden=\"true\">\r\n <path stroke-linecap=\"round\" d=\"m4 4 8 8M12 4 4 12\"></path>\r\n </svg>\r\n </button>\r\n }\r\n </div>\r\n}\r\n", styles: [":host{position:fixed;top:16px;left:50%;z-index:
|
|
2903
|
+
}, template: "@for (item of viewItems(); track item.id) {\r\n <div\r\n class=\"bs-message\"\r\n role=\"status\"\r\n [class.bs-message--solid]=\"item.variant === 'solid'\"\r\n [class.bs-message--has-actions]=\"item.actions.length > 0\"\r\n [class.bs-message--info]=\"item.type === 'info' || item.type === 'help' || item.type === 'loading'\"\r\n [class.bs-message--success]=\"item.type === 'success'\"\r\n [class.bs-message--warning]=\"item.type === 'warning'\"\r\n [class.bs-message--error]=\"item.type === 'error'\"\r\n >\r\n @if (item.showIcon) {\r\n <span class=\"bs-message__icon\" [class]=\"'bs-message__icon ' + iconClass(item.type)\" aria-hidden=\"true\">\r\n @switch (item.type) {\r\n @case ('success') {\r\n <svg viewBox=\"0 0 16 16\" fill=\"none\">\r\n <circle cx=\"8\" cy=\"8\" r=\"8\" fill=\"currentColor\"></circle>\r\n <path stroke=\"#fff\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.6\" d=\"M4.4 8.2 6.7 10.5 11.8 5.5\"></path>\r\n </svg>\r\n }\r\n @case ('warning') {\r\n <svg viewBox=\"0 0 16 16\" fill=\"none\">\r\n <path fill=\"currentColor\" d=\"M7.13 2.05a1 1 0 0 1 1.74 0l6.05 10.5A1 1 0 0 1 14.05 14H1.95a1 1 0 0 1-.87-1.5l6.05-10.45Z\"></path>\r\n <path stroke=\"#fff\" stroke-linecap=\"round\" stroke-width=\"1.4\" d=\"M8 5.55v4\"></path>\r\n <circle cx=\"8\" cy=\"11.8\" r=\".75\" fill=\"#fff\"></circle>\r\n </svg>\r\n }\r\n @case ('error') {\r\n <svg viewBox=\"0 0 16 16\" fill=\"none\">\r\n <circle cx=\"8\" cy=\"8\" r=\"8\" fill=\"currentColor\"></circle>\r\n <path stroke=\"#fff\" stroke-linecap=\"round\" stroke-width=\"1.6\" d=\"m5.5 5.5 5 5M10.5 5.5l-5 5\"></path>\r\n </svg>\r\n }\r\n @case ('loading') {\r\n <span class=\"bs-message__icon-dot\"></span>\r\n }\r\n @default {\r\n <svg viewBox=\"0 0 16 16\" fill=\"none\">\r\n <circle cx=\"8\" cy=\"8\" r=\"8\" fill=\"currentColor\"></circle>\r\n <path stroke=\"#fff\" stroke-linecap=\"round\" stroke-width=\"1.4\" d=\"M8 7.1v4\"></path>\r\n <circle cx=\"8\" cy=\"4.8\" r=\".75\" fill=\"#fff\"></circle>\r\n </svg>\r\n }\r\n }\r\n </span>\r\n }\r\n\r\n <div class=\"bs-message__body\">\r\n <div class=\"bs-message__headline\">\r\n <div class=\"bs-message__title-wrap\">\r\n <div class=\"bs-message__title\">{{ item.title }}</div>\r\n\r\n @if (item.repeatCount > 1) {\r\n <span class=\"bs-message__repeat\" aria-label=\"Repeated {{ item.repeatCount }} times\">\r\n * {{ item.repeatCount }}\r\n </span>\r\n }\r\n </div>\r\n\r\n @if (item.detailText && !item.description) {\r\n <button\r\n type=\"button\"\r\n class=\"bs-message__detail\"\r\n (click)=\"onDetail(item.id)\"\r\n >\r\n {{ item.detailText }}\r\n </button>\r\n }\r\n </div>\r\n\r\n @if (item.description) {\r\n <div class=\"bs-message__description\">\r\n <span class=\"bs-message__description-text\">{{ item.description }}</span>\r\n\r\n @if (item.detailText) {\r\n <button\r\n type=\"button\"\r\n class=\"bs-message__detail\"\r\n (click)=\"onDetail(item.id)\"\r\n >\r\n {{ item.detailText }}\r\n </button>\r\n }\r\n </div>\r\n }\r\n\r\n </div>\r\n\r\n @if (item.actions.length) {\r\n <div class=\"bs-message__actions\">\r\n @for (action of item.actions; track action.id) {\r\n <button\r\n type=\"button\"\r\n class=\"bs-message__action\"\r\n [class.bs-message__action--primary]=\"action.tone === 'primary'\"\r\n (click)=\"onAction(item.id, action.id)\"\r\n >\r\n {{ action.label }}\r\n </button>\r\n }\r\n </div>\r\n }\r\n\r\n @if (item.closable) {\r\n <button\r\n type=\"button\"\r\n class=\"bs-message__close\"\r\n aria-label=\"Close\"\r\n (click)=\"close.emit(item.id)\"\r\n >\r\n <svg viewBox=\"0 0 16 16\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" aria-hidden=\"true\">\r\n <path stroke-linecap=\"round\" d=\"m4 4 8 8M12 4 4 12\"></path>\r\n </svg>\r\n </button>\r\n }\r\n </div>\r\n}\r\n", styles: [":host{position:fixed;top:16px;left:50%;z-index:2000;display:flex;flex-direction:column;gap:8px;width:min(640px,100vw - 32px);transform:translate(-50%);pointer-events:none}.bs-message{--bs-message-bg: color-mix(in srgb, var(--color-info) 10%, #fff);--bs-message-border: color-mix(in srgb, var(--color-info) 28%, #fff);--bs-message-accent: var(--color-info);--bs-message-text: var(--color-text-primary);--bs-message-muted: var(--color-text-secondary);box-sizing:border-box;width:100%;padding:15px 16px;border:1px solid var(--bs-message-border);border-radius:8px;background:var(--bs-message-bg);color:var(--bs-message-text);display:flex;align-items:flex-start;gap:12px;font-size:14px;line-height:20px;pointer-events:auto}.bs-message--solid{--bs-message-bg: var(--bs-message-accent);--bs-message-border: var(--bs-message-accent);--bs-message-text: #fff;--bs-message-muted: rgba(255, 255, 255, .84)}.bs-message--success{--bs-message-bg: color-mix(in srgb, var(--color-success) 10%, #fff);--bs-message-border: color-mix(in srgb, var(--color-success) 28%, #fff);--bs-message-accent: var(--color-success)}.bs-message--warning{--bs-message-bg: color-mix(in srgb, var(--color-warning) 12%, #fff);--bs-message-border: color-mix(in srgb, var(--color-warning) 30%, #fff);--bs-message-accent: var(--color-warning)}.bs-message--error{--bs-message-bg: color-mix(in srgb, var(--color-error) 10%, #fff);--bs-message-border: color-mix(in srgb, var(--color-error) 28%, #fff);--bs-message-accent: var(--color-error)}.bs-message__icon{width:16px;height:16px;margin-top:2px;color:var(--bs-message-accent);display:inline-flex;flex:0 0 auto}.bs-message__icon svg{width:16px;height:16px}.bs-message__icon-dot{width:16px;height:16px;border:2px solid currentColor;border-right-color:transparent;border-radius:999px;animation:bs-message-spin .8s linear infinite}.bs-message__body,.bs-message__title-wrap,.bs-message__headline{min-width:0}.bs-message__body{flex:1 1 auto}.bs-message__headline,.bs-message__title-wrap{display:flex;align-items:center}.bs-message__headline{gap:12px}.bs-message__title-wrap{gap:4px}.bs-message__title{min-width:0;font-weight:var(--font-weight-semibold);word-break:break-word}.bs-message__repeat,.bs-message__description,.bs-message__action,.bs-message__close{color:var(--bs-message-muted)}.bs-message__repeat{flex:0 0 auto;white-space:nowrap}.bs-message__description{margin-top:4px}.bs-message__description-text{display:-webkit-box;overflow:hidden;text-overflow:ellipsis;-webkit-line-clamp:2;-webkit-box-orient:vertical;word-break:break-word}:is(.bs-message__detail,.bs-message__action,.bs-message__close){padding:0;border:0;background:transparent;font:inherit;font-weight:var(--font-weight-semibold);cursor:pointer}.bs-message__detail,.bs-message__action--primary{color:var(--bs-message-accent)}.bs-message__description .bs-message__detail{margin-left:8px}.bs-message__actions{margin-left:16px;display:flex;align-items:center;justify-content:flex-end;gap:16px;align-self:center;flex:0 0 auto;max-width:44%}.bs-message__action{height:24px;white-space:nowrap}.bs-message__action:hover{color:var(--bs-message-text)}.bs-message__close{width:20px;height:20px;margin-left:4px;border-radius:4px;display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto}.bs-message__close svg{width:16px;height:16px}.bs-message__close:hover{background:color-mix(in srgb,var(--bs-message-text) 6%,transparent);color:var(--bs-message-text)}:is(.bs-message__detail,.bs-message__action,.bs-message__close):focus-visible{outline:2px solid color-mix(in srgb,var(--bs-message-accent) 42%,transparent);outline-offset:2px}@media(max-width:520px){.bs-message{gap:8px;padding-right:12px;padding-left:12px}.bs-message--has-actions{flex-wrap:wrap}.bs-message--has-actions .bs-message__close{margin-left:auto;order:2}.bs-message--has-actions .bs-message__actions{order:3;width:100%;max-width:none;margin-left:28px;justify-content:flex-start}}@keyframes bs-message-spin{to{transform:rotate(360deg)}}\n"] }]
|
|
2394
2904
|
}], propDecorators: { items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], close: [{ type: i0.Output, args: ["close"] }], detail: [{ type: i0.Output, args: ["detail"] }], action: [{ type: i0.Output, args: ["action"] }] } });
|
|
2395
2905
|
|
|
2396
2906
|
function uid() {
|
|
@@ -2636,6 +3146,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
|
|
|
2636
3146
|
}] });
|
|
2637
3147
|
|
|
2638
3148
|
class BsSelect {
|
|
3149
|
+
destroyRef = inject(DestroyRef);
|
|
3150
|
+
ngZone = inject(NgZone);
|
|
2639
3151
|
listBox = viewChild(Listbox, ...(ngDevMode ? [{ debugName: "listBox" }] : /* istanbul ignore next */ []));
|
|
2640
3152
|
optionRefs = viewChildren(Option, ...(ngDevMode ? [{ debugName: "optionRefs" }] : /* istanbul ignore next */ []));
|
|
2641
3153
|
combobox = viewChild(Combobox, ...(ngDevMode ? [{ debugName: "combobox" }] : /* istanbul ignore next */ []));
|
|
@@ -2686,9 +3198,15 @@ class BsSelect {
|
|
|
2686
3198
|
isDisabled = computed(() => this.disabled() || this.disabledFromCva(), ...(ngDevMode ? [{ debugName: "isDisabled" }] : /* istanbul ignore next */ []));
|
|
2687
3199
|
selectedValues = signal([], ...(ngDevMode ? [{ debugName: "selectedValues" }] : /* istanbul ignore next */ []));
|
|
2688
3200
|
disabledFromCva = signal(false, ...(ngDevMode ? [{ debugName: "disabledFromCva" }] : /* istanbul ignore next */ []));
|
|
3201
|
+
pendingSingleValues = null;
|
|
3202
|
+
pendingSingleTimer = null;
|
|
3203
|
+
activeOverlay = null;
|
|
3204
|
+
scrollListenerCleanup = null;
|
|
3205
|
+
repositionFrame = null;
|
|
2689
3206
|
onChange = () => { };
|
|
2690
3207
|
onTouched = () => { };
|
|
2691
3208
|
constructor() {
|
|
3209
|
+
this.destroyRef.onDestroy(() => this.teardownOverlayScrollListener());
|
|
2692
3210
|
afterRenderEffect(() => {
|
|
2693
3211
|
const option = this.optionRefs().find((opt) => opt.active());
|
|
2694
3212
|
setTimeout(() => option?.element.scrollIntoView({ block: 'nearest' }), 50);
|
|
@@ -2700,6 +3218,28 @@ class BsSelect {
|
|
|
2700
3218
|
});
|
|
2701
3219
|
}
|
|
2702
3220
|
onListboxValueChange(values) {
|
|
3221
|
+
if (this.multiple()) {
|
|
3222
|
+
this.commitValues(values);
|
|
3223
|
+
return;
|
|
3224
|
+
}
|
|
3225
|
+
if (!values.length && this.selectedValues().length) {
|
|
3226
|
+
return;
|
|
3227
|
+
}
|
|
3228
|
+
this.pendingSingleValues = values;
|
|
3229
|
+
if (this.pendingSingleTimer) {
|
|
3230
|
+
return;
|
|
3231
|
+
}
|
|
3232
|
+
this.pendingSingleTimer = setTimeout(() => {
|
|
3233
|
+
const nextValues = this.pendingSingleValues ?? [];
|
|
3234
|
+
this.pendingSingleValues = null;
|
|
3235
|
+
this.pendingSingleTimer = null;
|
|
3236
|
+
this.commitValues(nextValues);
|
|
3237
|
+
});
|
|
3238
|
+
}
|
|
3239
|
+
commitValues(values) {
|
|
3240
|
+
if (this.areSameValues(this.selectedValues(), values)) {
|
|
3241
|
+
return;
|
|
3242
|
+
}
|
|
2703
3243
|
this.selectedValues.set(values);
|
|
2704
3244
|
this.onChange(this.multiple() ? values : (values[0] ?? null));
|
|
2705
3245
|
this.onTouched();
|
|
@@ -2707,6 +3247,15 @@ class BsSelect {
|
|
|
2707
3247
|
this.scheduleClose();
|
|
2708
3248
|
}
|
|
2709
3249
|
}
|
|
3250
|
+
onOverlayAttached(overlay) {
|
|
3251
|
+
this.activeOverlay = overlay;
|
|
3252
|
+
this.installOverlayScrollListener();
|
|
3253
|
+
this.queueOverlayReposition();
|
|
3254
|
+
}
|
|
3255
|
+
onOverlayDetached() {
|
|
3256
|
+
this.activeOverlay = null;
|
|
3257
|
+
this.teardownOverlayScrollListener();
|
|
3258
|
+
}
|
|
2710
3259
|
onOptionClick(option) {
|
|
2711
3260
|
if (option.disabled) {
|
|
2712
3261
|
return;
|
|
@@ -2735,6 +3284,17 @@ class BsSelect {
|
|
|
2735
3284
|
this.onChange(nextValues);
|
|
2736
3285
|
this.onTouched();
|
|
2737
3286
|
}
|
|
3287
|
+
clearSelectedValue(event) {
|
|
3288
|
+
event.preventDefault();
|
|
3289
|
+
event.stopPropagation();
|
|
3290
|
+
if (this.isDisabled() || !this.hasValue()) {
|
|
3291
|
+
return;
|
|
3292
|
+
}
|
|
3293
|
+
this.selectedValues.set([]);
|
|
3294
|
+
this.onChange(null);
|
|
3295
|
+
this.onTouched();
|
|
3296
|
+
this.combobox()?.close();
|
|
3297
|
+
}
|
|
2738
3298
|
writeValue(value) {
|
|
2739
3299
|
if (this.multiple()) {
|
|
2740
3300
|
this.selectedValues.set(Array.isArray(value) ? value : this.isEmptyValue(value) ? [] : [value]);
|
|
@@ -2754,9 +3314,53 @@ class BsSelect {
|
|
|
2754
3314
|
scheduleClose() {
|
|
2755
3315
|
setTimeout(() => this.combobox()?.close());
|
|
2756
3316
|
}
|
|
3317
|
+
installOverlayScrollListener() {
|
|
3318
|
+
if (this.scrollListenerCleanup || typeof document === 'undefined') {
|
|
3319
|
+
return;
|
|
3320
|
+
}
|
|
3321
|
+
this.ngZone.runOutsideAngular(() => {
|
|
3322
|
+
const updatePosition = () => this.queueOverlayReposition();
|
|
3323
|
+
const options = { capture: true, passive: true };
|
|
3324
|
+
document.addEventListener('scroll', updatePosition, options);
|
|
3325
|
+
window.addEventListener('resize', updatePosition, options);
|
|
3326
|
+
this.scrollListenerCleanup = () => {
|
|
3327
|
+
document.removeEventListener('scroll', updatePosition, options);
|
|
3328
|
+
window.removeEventListener('resize', updatePosition, options);
|
|
3329
|
+
};
|
|
3330
|
+
});
|
|
3331
|
+
}
|
|
3332
|
+
teardownOverlayScrollListener() {
|
|
3333
|
+
this.scrollListenerCleanup?.();
|
|
3334
|
+
this.scrollListenerCleanup = null;
|
|
3335
|
+
if (this.repositionFrame !== null && typeof cancelAnimationFrame !== 'undefined') {
|
|
3336
|
+
cancelAnimationFrame(this.repositionFrame);
|
|
3337
|
+
}
|
|
3338
|
+
this.repositionFrame = null;
|
|
3339
|
+
}
|
|
3340
|
+
queueOverlayReposition() {
|
|
3341
|
+
if (!this.activeOverlay?.open) {
|
|
3342
|
+
return;
|
|
3343
|
+
}
|
|
3344
|
+
if (typeof requestAnimationFrame === 'undefined') {
|
|
3345
|
+
this.activeOverlay.overlayRef.updatePosition();
|
|
3346
|
+
return;
|
|
3347
|
+
}
|
|
3348
|
+
if (this.repositionFrame !== null) {
|
|
3349
|
+
return;
|
|
3350
|
+
}
|
|
3351
|
+
this.repositionFrame = requestAnimationFrame(() => {
|
|
3352
|
+
this.repositionFrame = null;
|
|
3353
|
+
if (this.activeOverlay?.open) {
|
|
3354
|
+
this.activeOverlay.overlayRef.updatePosition();
|
|
3355
|
+
}
|
|
3356
|
+
});
|
|
3357
|
+
}
|
|
2757
3358
|
isEmptyValue(value) {
|
|
2758
3359
|
return value == null || value === '';
|
|
2759
3360
|
}
|
|
3361
|
+
areSameValues(currentValues, nextValues) {
|
|
3362
|
+
return currentValues.length === nextValues.length && currentValues.every((value, index) => Object.is(value, nextValues[index]));
|
|
3363
|
+
}
|
|
2760
3364
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: BsSelect, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2761
3365
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: BsSelect, isStandalone: true, selector: "s-select", inputs: { labels: { classPropertyName: "labels", publicName: "labels", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, matchTriggerWidth: { classPropertyName: "matchTriggerWidth", publicName: "matchTriggerWidth", isSignal: true, isRequired: false, transformFunction: null } }, providers: [
|
|
2762
3366
|
{
|
|
@@ -2764,7 +3368,7 @@ class BsSelect {
|
|
|
2764
3368
|
useExisting: forwardRef(() => BsSelect),
|
|
2765
3369
|
multi: true,
|
|
2766
3370
|
},
|
|
2767
|
-
], viewQueries: [{ propertyName: "listBox", first: true, predicate: Listbox, descendants: true, isSignal: true }, { propertyName: "optionRefs", predicate: Option, descendants: true, isSignal: true }, { propertyName: "combobox", first: true, predicate: Combobox, descendants: true, isSignal: true }], ngImport: i0, template: "<div\r\n class=\"bs-select\"\r\n ngCombobox\r\n readonly\r\n [class.bs-select--selected]=\"hasValue()\"\r\n [class.bs-select--disabled]=\"isDisabled()\"\r\n>\r\n <div #origin class=\"bs-select__trigger\">\r\n <span class=\"bs-select__label\">\n @if (multiple() && selectedOptions().length) {\n <span class=\"bs-select__tags\">\n <button type=\"button\" class=\"bs-select__add\" (click)=\"openCombobox($event)\">\n <lucide-icon aria-hidden=\"true\" [img]=\"plusIcon\" [size]=\"13\" [strokeWidth]=\"2\" />\n <span>{{ placeholder() }}</span>\n </button>\n @for (option of visibleSelectedOptions(); track option.value) {\n <span class=\"bs-select__tag\">\n <span class=\"bs-select__tag-text\">{{ option.label }}</span>\n <button\n type=\"button\"\n class=\"bs-select__tag-remove\"\n [attr.aria-label]=\"'Remove ' + option.label\"\n (click)=\"removeSelectedValue(option.value, $event)\"\n >\n <lucide-icon aria-hidden=\"true\" [img]=\"closeIcon\" [size]=\"12\" [strokeWidth]=\"2\" />\n </button>\n </span>\n }\n @if (hiddenSelectedCount()) {\n <span class=\"bs-select__tag bs-select__tag--ellipsis\" aria-hidden=\"true\">...</span>\n }\n </span>\n } @else {\n <span class=\"bs-select__label-text\">{{ displayValue() }}</span>\n }\n </span>\n <input\r\n [attr.aria-label]=\"ariaLabel()\"\r\n [placeholder]=\"placeholder()\"\r\n [disabled]=\"isDisabled()\"\r\n ngComboboxInput\r\n />\r\n <span class=\"bs-select__arrow\" aria-hidden=\"true\"></span>\r\n </div>\r\n <ng-template ngComboboxPopupContainer>\r\n <ng-template\r\n [cdkConnectedOverlay]=\"{ origin, usePopover: 'inline', matchWidth: matchTriggerWidth() }\"\r\n [cdkConnectedOverlayOpen]=\"combobox()?.expanded() ?? false\"\r\n cdkAttachPopoverAsChild\r\n >\r\n <div class=\"bs-select__popup\">\r\n <div\r\n ngListbox\n [values]=\"selectedValues()\"\n (valuesChange)=\"onListboxValueChange($event)\"\n [multi]=\"multiple()\"\n [disabled]=\"isDisabled()\"\n >\n @for (option of normalizedOptions(); track option.value) {\r\n <div\r\n ngOption\r\n [value]=\"option.value\"\r\n [label]=\"option.label\"\r\n [disabled]=\"option.disabled ?? false\"\r\n (click)=\"onOptionClick(option)\"\r\n >\r\n <span class=\"bs-select__option-text\">{{ option.label }}</span>\r\n <span class=\"bs-select__check\" aria-hidden=\"true\"></span>\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n </ng-template>\r\n </ng-template>\r\n</div>\r\n", styles: [":host{display:inline-block;width:var(--bs-select-width, var(--platform-control-width, 10rem));min-width:var(--bs-select-min-width, var(--platform-control-width, 10rem));max-width:100%;--bs-select-height: var(--platform-control-height, 2rem);--bs-select-radius: var(--platform-control-radius, var(--radius-common-m));--bs-select-padding-x: var(--platform-control-padding-x, .625rem);--bs-select-indicator-offset: var(--platform-control-padding-x, .625rem);--bs-select-font-size: var(--platform-control-font-size, 13px);--bs-select-line-height: var(--platform-control-line-height, 20px);--bs-select-trigger-width: 100%;--bs-select-trigger-min-width: 0;--bs-select-popup-min-width: 100%}.bs-select{display:block}.bs-select.bs-select--disabled{pointer-events:none}.bs-select__trigger{position:relative;display:flex;align-items:center;box-sizing:border-box;width:var(--bs-select-trigger-width);min-width:var(--bs-select-trigger-min-width);height:var(--bs-select-height);min-height:var(--bs-select-height);color:var(--platform-control-placeholder, var(--color-text-placeholder));background-color:var(--platform-control-bg, var(--color-surface));border:1px solid var(--platform-control-border, var(--color-border));border-radius:var(--bs-select-radius);transition:border-color .15s ease,background-color .15s ease,box-shadow .15s ease}.bs-select__trigger:hover{background-color:var(--platform-control-bg-hover, var(--color-surface-soft))}.bs-select:focus-within .bs-select__trigger{border-color:var(--platform-control-focus, var(--color-primary));box-shadow:0 0 0 2px var(--platform-control-focus-ring, var(--color-primary-subtle))}.bs-select.bs-select--disabled .bs-select__trigger,.bs-select:has([ngComboboxInput][aria-disabled=true]) .bs-select__trigger{opacity:.6;cursor:default;background-color:var(--platform-control-bg-hover, var(--color-surface-soft))}[ngComboboxInput]{position:relative;z-index:0;width:100%;min-width:0;height:var(--bs-select-height);padding:0 calc(var(--bs-select-indicator-offset) + 1.75rem) 0 var(--bs-select-padding-x);border:0;outline:none;opacity:0;cursor:pointer;background:transparent}.bs-select__label{position:absolute;z-index:1;inset:0;display:flex;align-items:center;padding:0 calc(var(--bs-select-indicator-offset) + 1.75rem) 0 var(--bs-select-padding-x);pointer-events:none}.bs-select__tags{display:flex;align-items:center;gap:4px;min-width:0;width:100%;overflow:hidden;pointer-events:auto}.bs-select__add,.bs-select__tag{display:inline-flex;align-items:center;flex:0 0 auto;min-width:0;max-width:8rem;height:calc(var(--bs-select-height) - 10px);min-height:20px;padding:0 8px;border:1px solid var(--color-border);border-radius:calc(var(--bs-select-radius) - 2px);background-color:var(--color-surface-soft);color:var(--platform-control-color, var(--color-text-primary));font-size:var(--bs-select-font-size);font-family:inherit;line-height:1;white-space:nowrap}.bs-select__add{max-width:6rem;color:var(--color-primary);background-color:var(--color-surface);gap:3px;cursor:pointer}.bs-select__tag-text{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.bs-select__tag--ellipsis{flex:0 0 auto;width:28px;justify-content:center;padding:0;color:var(--color-text-muted)}.bs-select__tag-remove{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;width:14px;height:14px;margin-left:4px;padding:0;color:var(--color-text-muted);background:transparent;border:0;cursor:pointer;line-height:1;pointer-events:auto}.bs-select__tag-remove:hover{color:var(--color-text-primary)}.bs-select__label-text{overflow:hidden;color:var(--platform-control-placeholder, var(--color-text-placeholder));font-size:var(--bs-select-font-size);line-height:var(--bs-select-line-height);text-overflow:ellipsis;white-space:nowrap}.bs-select.bs-select--selected .bs-select__label-text{color:var(--platform-control-color, var(--color-text-primary))}.bs-select__arrow{position:absolute;z-index:2;right:var(--bs-select-indicator-offset);width:0;height:0;pointer-events:none;border-left:5px solid transparent;border-right:5px solid transparent;border-top:6px solid var(--platform-control-placeholder, var(--color-text-placeholder));transition:transform .15s ease-in-out}[ngComboboxInput][aria-expanded=true]~.bs-select__arrow{transform:rotate(180deg)}.bs-select__popup{width:100%;min-width:var(--bs-select-popup-min-width);margin-top:var(--space-2);padding:var(--space-2);border:1px solid var(--color-border);border-radius:var(--bs-select-radius);background-color:var(--color-surface);box-shadow:var(--shadow-common-m);max-height:11rem;overflow:hidden}[ngListbox]{display:flex;flex-direction:column;gap:2px;height:100%;overflow:auto}[ngOption]{display:flex;align-items:center;min-height:var(--bs-select-height);margin:1px;padding:0 var(--space-2);border-radius:var(--bs-select-radius);cursor:pointer;transition:background-color .15s ease,color .15s ease,outline-color .15s ease}[ngOption]:hover{background-color:var(--color-surface-soft)}[ngOption][data-active=true]{outline:2px solid var(--color-primary);outline-offset:-2px}[ngOption][aria-selected=true]{color:var(--color-primary);background-color:var(--color-primary-subtle)}[ngOption][aria-disabled=true]{opacity:.5;cursor:default}.bs-select__option-text{flex:1;min-width:0;font-size:var(--bs-select-font-size);line-height:var(--bs-select-line-height)}[ngOption]:not([aria-selected=true]) .bs-select__check{display:none}.bs-select__check{position:relative;width:1rem;height:1rem;display:inline-block;flex:0 0 1rem;align-self:center;color:var(--color-primary);line-height:0;vertical-align:middle}.bs-select__check:before{position:absolute;top:50%;left:50%;content:\"\";width:6px;height:10px;border-right:2px solid currentColor;border-bottom:2px solid currentColor;transform:translate(-50%,-73%) rotate(45deg);transform-origin:center}\n"], dependencies: [{ kind: "ngmodule", type: OverlayModule }, { kind: "directive", type: i1$2.CdkConnectedOverlay, selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]", inputs: ["cdkConnectedOverlayOrigin", "cdkConnectedOverlayPositions", "cdkConnectedOverlayPositionStrategy", "cdkConnectedOverlayOffsetX", "cdkConnectedOverlayOffsetY", "cdkConnectedOverlayWidth", "cdkConnectedOverlayHeight", "cdkConnectedOverlayMinWidth", "cdkConnectedOverlayMinHeight", "cdkConnectedOverlayBackdropClass", "cdkConnectedOverlayPanelClass", "cdkConnectedOverlayViewportMargin", "cdkConnectedOverlayScrollStrategy", "cdkConnectedOverlayOpen", "cdkConnectedOverlayDisableClose", "cdkConnectedOverlayTransformOriginOn", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayLockPosition", "cdkConnectedOverlayFlexibleDimensions", "cdkConnectedOverlayGrowAfterOpen", "cdkConnectedOverlayPush", "cdkConnectedOverlayDisposeOnNavigation", "cdkConnectedOverlayUsePopover", "cdkConnectedOverlayMatchWidth", "cdkConnectedOverlay"], outputs: ["backdropClick", "positionChange", "attach", "detach", "overlayKeydown", "overlayOutsideClick"], exportAs: ["cdkConnectedOverlay"] }, { kind: "directive", type: Option, selector: "[ngOption]", inputs: ["id", "value", "disabled", "label"], exportAs: ["ngOption"] }, { kind: "directive", type: ComboboxPopupContainer, selector: "ng-template[ngComboboxPopupContainer]", exportAs: ["ngComboboxPopupContainer"] }, { kind: "directive", type: Combobox, selector: "[ngCombobox]", inputs: ["filterMode", "disabled", "readonly", "firstMatch", "alwaysExpanded"], exportAs: ["ngCombobox"] }, { kind: "directive", type: ComboboxInput, selector: "input[ngComboboxInput]", inputs: ["value"], outputs: ["valueChange"], exportAs: ["ngComboboxInput"] }, { kind: "directive", type: Listbox, selector: "[ngListbox]", inputs: ["id", "orientation", "multi", "wrap", "softDisabled", "focusMode", "selectionMode", "typeaheadDelay", "disabled", "readonly", "values"], outputs: ["valuesChange"], exportAs: ["ngListbox"] }, { kind: "ngmodule", type: LucideAngularModule }, { kind: "component", type: i1.LucideAngularComponent, selector: "lucide-angular, lucide-icon, i-lucide, span-lucide", inputs: ["class", "name", "img", "color", "absoluteStrokeWidth", "size", "strokeWidth"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3371
|
+
], viewQueries: [{ propertyName: "listBox", first: true, predicate: Listbox, descendants: true, isSignal: true }, { propertyName: "optionRefs", predicate: Option, descendants: true, isSignal: true }, { propertyName: "combobox", first: true, predicate: Combobox, descendants: true, isSignal: true }], ngImport: i0, template: "<div\r\n class=\"bs-select\"\r\n ngCombobox\r\n readonly\r\n [class.bs-select--selected]=\"hasValue()\"\r\n [class.bs-select--disabled]=\"isDisabled()\"\r\n>\r\n <div #origin class=\"bs-select__trigger\">\r\n <span class=\"bs-select__label\">\r\n @if (multiple() && selectedOptions().length) {\r\n <span class=\"bs-select__tags\">\r\n <button type=\"button\" class=\"bs-select__add\" (click)=\"openCombobox($event)\">\r\n <lucide-icon aria-hidden=\"true\" [img]=\"plusIcon\" [size]=\"13\" [strokeWidth]=\"2\" />\r\n <span>{{ placeholder() }}</span>\r\n </button>\r\n @for (option of visibleSelectedOptions(); track option.value) {\r\n <span class=\"bs-select__tag\">\r\n <span class=\"bs-select__tag-text\">{{ option.label }}</span>\r\n <button\r\n type=\"button\"\r\n class=\"bs-select__tag-remove\"\r\n [attr.aria-label]=\"'Remove ' + option.label\"\r\n (click)=\"removeSelectedValue(option.value, $event)\"\r\n >\r\n <lucide-icon aria-hidden=\"true\" [img]=\"closeIcon\" [size]=\"12\" [strokeWidth]=\"2\" />\r\n </button>\r\n </span>\r\n }\r\n @if (hiddenSelectedCount()) {\r\n <span class=\"bs-select__tag bs-select__tag--ellipsis\" aria-hidden=\"true\">...</span>\r\n }\r\n </span>\r\n } @else {\r\n <span class=\"bs-select__label-text\">{{ displayValue() }}</span>\r\n }\r\n </span>\r\n <input\r\n [attr.aria-label]=\"ariaLabel()\"\r\n [placeholder]=\"placeholder()\"\r\n [disabled]=\"isDisabled()\"\r\n ngComboboxInput\r\n />\r\n @if (!multiple() && hasValue()) {\r\n <button\r\n type=\"button\"\r\n class=\"bs-select__clear\"\r\n aria-label=\"Clear selected option\"\r\n (click)=\"clearSelectedValue($event)\"\r\n >\r\n <lucide-icon aria-hidden=\"true\" [img]=\"closeIcon\" [size]=\"13\" [strokeWidth]=\"2\" />\r\n </button>\r\n }\r\n <span class=\"bs-select__arrow\" aria-hidden=\"true\"></span>\r\n </div>\r\n <ng-template ngComboboxPopupContainer>\r\n <ng-template\r\n #selectOverlay=\"cdkConnectedOverlay\"\r\n [cdkConnectedOverlay]=\"{ origin, usePopover: 'inline', matchWidth: matchTriggerWidth() }\"\r\n [cdkConnectedOverlayOpen]=\"combobox()?.expanded() ?? false\"\r\n cdkAttachPopoverAsChild\r\n (attach)=\"onOverlayAttached(selectOverlay)\"\r\n (detach)=\"onOverlayDetached()\"\r\n >\r\n <div class=\"bs-select__popup\">\r\n <div\r\n ngListbox\r\n [values]=\"selectedValues()\"\r\n (valuesChange)=\"onListboxValueChange($event)\"\r\n [multi]=\"multiple()\"\r\n [disabled]=\"isDisabled()\"\r\n >\r\n @for (option of normalizedOptions(); track option.value) {\r\n <div\r\n ngOption\r\n [value]=\"option.value\"\r\n [label]=\"option.label\"\r\n [disabled]=\"option.disabled ?? false\"\r\n (click)=\"onOptionClick(option)\"\r\n >\r\n <span class=\"bs-select__option-text\">{{ option.label }}</span>\r\n <span class=\"bs-select__check\" aria-hidden=\"true\"></span>\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n </ng-template>\r\n </ng-template>\r\n</div>\r\n", styles: [":host{display:inline-block;width:var(--bs-select-width, var(--platform-control-width, 10rem));min-width:var(--bs-select-min-width, var(--platform-control-width, 10rem));max-width:100%;--bs-select-height: var(--platform-control-height, 2rem);--bs-select-radius: var(--platform-control-radius, var(--radius-common-m));--bs-select-padding-x: var(--platform-control-padding-x, .625rem);--bs-select-indicator-offset: var(--platform-control-padding-x, .625rem);--bs-select-font-size: var(--platform-control-font-size, 13px);--bs-select-line-height: var(--platform-control-line-height, 20px);--bs-select-trigger-width: 100%;--bs-select-trigger-min-width: 0;--bs-select-popup-min-width: 100%}.bs-select{display:block}.bs-select.bs-select--disabled{pointer-events:none}.bs-select__trigger{position:relative;display:flex;align-items:center;box-sizing:border-box;width:var(--bs-select-trigger-width);min-width:var(--bs-select-trigger-min-width);height:var(--bs-select-height);min-height:var(--bs-select-height);color:var(--platform-control-placeholder, var(--color-text-placeholder));background-color:var(--platform-control-bg, var(--color-surface));border:1px solid var(--platform-control-border, var(--color-border));border-radius:var(--bs-select-radius);transition:border-color .15s ease,background-color .15s ease,box-shadow .15s ease}.bs-select__trigger:hover{background-color:var(--platform-control-bg-hover, var(--color-surface-soft))}.bs-select:focus-within .bs-select__trigger{border-color:var(--platform-control-focus, var(--color-primary));box-shadow:0 0 0 2px var(--platform-control-focus-ring, var(--color-primary-subtle))}.bs-select.bs-select--disabled .bs-select__trigger,.bs-select:has([ngComboboxInput][aria-disabled=true]) .bs-select__trigger{opacity:.6;cursor:default;background-color:var(--platform-control-bg-hover, var(--color-surface-soft))}[ngComboboxInput]{position:relative;z-index:0;width:100%;min-width:0;height:var(--bs-select-height);padding:0 calc(var(--bs-select-indicator-offset) + 1.75rem) 0 var(--bs-select-padding-x);border:0;outline:none;opacity:0;cursor:pointer;background:transparent}.bs-select__label{position:absolute;z-index:1;inset:0;display:flex;align-items:center;padding:0 calc(var(--bs-select-indicator-offset) + 1.75rem) 0 var(--bs-select-padding-x);pointer-events:none}.bs-select__tags{display:flex;align-items:center;gap:4px;min-width:0;width:100%;overflow:hidden;pointer-events:auto}.bs-select__add,.bs-select__tag{display:inline-flex;align-items:center;flex:0 0 auto;min-width:0;max-width:8rem;height:calc(var(--bs-select-height) - 10px);min-height:20px;padding:0 8px;border:1px solid var(--color-border);border-radius:calc(var(--bs-select-radius) - 2px);background-color:var(--color-surface-soft);color:var(--platform-control-color, var(--color-text-primary));font-size:var(--bs-select-font-size);font-family:inherit;line-height:1;white-space:nowrap}.bs-select__add{max-width:6rem;color:var(--color-primary);background-color:var(--color-surface);gap:3px;cursor:pointer}.bs-select__tag-text{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.bs-select__tag--ellipsis{flex:0 0 auto;width:28px;justify-content:center;padding:0;color:var(--color-text-muted)}.bs-select__tag-remove{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;width:14px;height:14px;margin-left:4px;padding:0;color:var(--color-text-muted);background:transparent;border:0;cursor:pointer;line-height:1;pointer-events:auto}.bs-select__tag-remove:hover{color:var(--color-text-primary)}.bs-select__label-text{overflow:hidden;color:var(--platform-control-placeholder, var(--color-text-placeholder));font-size:var(--bs-select-font-size);line-height:var(--bs-select-line-height);text-overflow:ellipsis;white-space:nowrap}.bs-select.bs-select--selected .bs-select__label-text{color:var(--platform-control-color, var(--color-text-primary))}.bs-select__arrow{position:absolute;z-index:2;right:var(--bs-select-indicator-offset);width:0;height:0;pointer-events:none;border-left:5px solid transparent;border-right:5px solid transparent;border-top:6px solid var(--platform-control-placeholder, var(--color-text-placeholder));transition:opacity .12s ease,transform .15s ease-in-out}[ngComboboxInput][aria-expanded=true]~.bs-select__arrow{transform:rotate(180deg)}.bs-select__clear{position:absolute;top:50%;right:calc(var(--bs-select-indicator-offset) - 5px);z-index:3;display:inline-flex;align-items:center;justify-content:center;width:20px;height:20px;padding:0;color:var(--platform-control-placeholder, var(--color-text-placeholder));background:transparent;border:0;border-radius:50%;cursor:pointer;line-height:0;opacity:0;pointer-events:none;transform:translateY(-50%);transition:background-color .12s ease,color .12s ease,opacity .12s ease}.bs-select__clear:hover,.bs-select__clear:focus-visible{color:var(--platform-control-color, var(--color-text-primary));background-color:var(--platform-control-bg-hover, var(--color-surface-soft));opacity:1;outline:none}.bs-select.bs-select--selected:not(.bs-select--disabled) .bs-select__clear,.bs-select.bs-select--selected:not(.bs-select--disabled) .bs-select__clear:focus-visible{pointer-events:auto}.bs-select__clear:hover~.bs-select__arrow,.bs-select__clear:focus-visible~.bs-select__arrow{opacity:0}.bs-select__popup{width:100%;min-width:var(--bs-select-popup-min-width);margin-top:var(--space-2);padding:var(--space-2);border:1px solid var(--color-border);border-radius:var(--bs-select-radius);background-color:var(--color-surface);box-shadow:var(--shadow-common-m);max-height:11rem;overflow:hidden}[ngListbox]{display:flex;flex-direction:column;gap:2px;height:100%;overflow:auto}[ngOption]{display:flex;align-items:center;min-height:var(--bs-select-height);margin:1px;padding:0 var(--space-2);border-radius:var(--bs-select-radius);cursor:pointer;transition:background-color .15s ease,color .15s ease,outline-color .15s ease}[ngOption]:hover{background-color:var(--color-surface-soft)}[ngOption][data-active=true]{outline:2px solid var(--color-primary);outline-offset:-2px}[ngOption][aria-selected=true]{color:var(--color-primary);background-color:var(--color-primary-subtle)}[ngOption][aria-disabled=true]{opacity:.5;cursor:default}.bs-select__option-text{flex:1;min-width:0;font-size:var(--bs-select-font-size);line-height:var(--bs-select-line-height)}[ngOption]:not([aria-selected=true]) .bs-select__check{display:none}.bs-select__check{position:relative;width:1rem;height:1rem;display:inline-block;flex:0 0 1rem;align-self:center;color:var(--color-primary);line-height:0;vertical-align:middle}.bs-select__check:before{position:absolute;top:50%;left:50%;content:\"\";width:6px;height:10px;border-right:2px solid currentColor;border-bottom:2px solid currentColor;transform:translate(-50%,-73%) rotate(45deg);transform-origin:center}\n"], dependencies: [{ kind: "ngmodule", type: OverlayModule }, { kind: "directive", type: i1$2.CdkConnectedOverlay, selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]", inputs: ["cdkConnectedOverlayOrigin", "cdkConnectedOverlayPositions", "cdkConnectedOverlayPositionStrategy", "cdkConnectedOverlayOffsetX", "cdkConnectedOverlayOffsetY", "cdkConnectedOverlayWidth", "cdkConnectedOverlayHeight", "cdkConnectedOverlayMinWidth", "cdkConnectedOverlayMinHeight", "cdkConnectedOverlayBackdropClass", "cdkConnectedOverlayPanelClass", "cdkConnectedOverlayViewportMargin", "cdkConnectedOverlayScrollStrategy", "cdkConnectedOverlayOpen", "cdkConnectedOverlayDisableClose", "cdkConnectedOverlayTransformOriginOn", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayLockPosition", "cdkConnectedOverlayFlexibleDimensions", "cdkConnectedOverlayGrowAfterOpen", "cdkConnectedOverlayPush", "cdkConnectedOverlayDisposeOnNavigation", "cdkConnectedOverlayUsePopover", "cdkConnectedOverlayMatchWidth", "cdkConnectedOverlay"], outputs: ["backdropClick", "positionChange", "attach", "detach", "overlayKeydown", "overlayOutsideClick"], exportAs: ["cdkConnectedOverlay"] }, { kind: "directive", type: Option, selector: "[ngOption]", inputs: ["id", "value", "disabled", "label"], exportAs: ["ngOption"] }, { kind: "directive", type: ComboboxPopupContainer, selector: "ng-template[ngComboboxPopupContainer]", exportAs: ["ngComboboxPopupContainer"] }, { kind: "directive", type: Combobox, selector: "[ngCombobox]", inputs: ["filterMode", "disabled", "readonly", "firstMatch", "alwaysExpanded"], exportAs: ["ngCombobox"] }, { kind: "directive", type: ComboboxInput, selector: "input[ngComboboxInput]", inputs: ["value"], outputs: ["valueChange"], exportAs: ["ngComboboxInput"] }, { kind: "directive", type: Listbox, selector: "[ngListbox]", inputs: ["id", "orientation", "multi", "wrap", "softDisabled", "focusMode", "selectionMode", "typeaheadDelay", "disabled", "readonly", "values"], outputs: ["valuesChange"], exportAs: ["ngListbox"] }, { kind: "ngmodule", type: LucideAngularModule }, { kind: "component", type: i1.LucideAngularComponent, selector: "lucide-angular, lucide-icon, i-lucide, span-lucide", inputs: ["class", "name", "img", "color", "absoluteStrokeWidth", "size", "strokeWidth"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2768
3372
|
}
|
|
2769
3373
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: BsSelect, decorators: [{
|
|
2770
3374
|
type: Component,
|
|
@@ -2782,7 +3386,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
|
|
|
2782
3386
|
useExisting: forwardRef(() => BsSelect),
|
|
2783
3387
|
multi: true,
|
|
2784
3388
|
},
|
|
2785
|
-
], template: "<div\r\n class=\"bs-select\"\r\n ngCombobox\r\n readonly\r\n [class.bs-select--selected]=\"hasValue()\"\r\n [class.bs-select--disabled]=\"isDisabled()\"\r\n>\r\n <div #origin class=\"bs-select__trigger\">\r\n <span class=\"bs-select__label\">\n @if (multiple() && selectedOptions().length) {\n <span class=\"bs-select__tags\">\n <button type=\"button\" class=\"bs-select__add\" (click)=\"openCombobox($event)\">\n <lucide-icon aria-hidden=\"true\" [img]=\"plusIcon\" [size]=\"13\" [strokeWidth]=\"2\" />\n <span>{{ placeholder() }}</span>\n </button>\n @for (option of visibleSelectedOptions(); track option.value) {\n <span class=\"bs-select__tag\">\n <span class=\"bs-select__tag-text\">{{ option.label }}</span>\n <button\n type=\"button\"\n class=\"bs-select__tag-remove\"\n [attr.aria-label]=\"'Remove ' + option.label\"\n (click)=\"removeSelectedValue(option.value, $event)\"\n >\n <lucide-icon aria-hidden=\"true\" [img]=\"closeIcon\" [size]=\"12\" [strokeWidth]=\"2\" />\n </button>\n </span>\n }\n @if (hiddenSelectedCount()) {\n <span class=\"bs-select__tag bs-select__tag--ellipsis\" aria-hidden=\"true\">...</span>\n }\n </span>\n } @else {\n <span class=\"bs-select__label-text\">{{ displayValue() }}</span>\n }\n </span>\n <input\r\n [attr.aria-label]=\"ariaLabel()\"\r\n [placeholder]=\"placeholder()\"\r\n [disabled]=\"isDisabled()\"\r\n ngComboboxInput\r\n />\r\n <span class=\"bs-select__arrow\" aria-hidden=\"true\"></span>\r\n </div>\r\n <ng-template ngComboboxPopupContainer>\r\n <ng-template\r\n [cdkConnectedOverlay]=\"{ origin, usePopover: 'inline', matchWidth: matchTriggerWidth() }\"\r\n [cdkConnectedOverlayOpen]=\"combobox()?.expanded() ?? false\"\r\n cdkAttachPopoverAsChild\r\n >\r\n <div class=\"bs-select__popup\">\r\n <div\r\n ngListbox\n [values]=\"selectedValues()\"\n (valuesChange)=\"onListboxValueChange($event)\"\n [multi]=\"multiple()\"\n [disabled]=\"isDisabled()\"\n >\n @for (option of normalizedOptions(); track option.value) {\r\n <div\r\n ngOption\r\n [value]=\"option.value\"\r\n [label]=\"option.label\"\r\n [disabled]=\"option.disabled ?? false\"\r\n (click)=\"onOptionClick(option)\"\r\n >\r\n <span class=\"bs-select__option-text\">{{ option.label }}</span>\r\n <span class=\"bs-select__check\" aria-hidden=\"true\"></span>\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n </ng-template>\r\n </ng-template>\r\n</div>\r\n", styles: [":host{display:inline-block;width:var(--bs-select-width, var(--platform-control-width, 10rem));min-width:var(--bs-select-min-width, var(--platform-control-width, 10rem));max-width:100%;--bs-select-height: var(--platform-control-height, 2rem);--bs-select-radius: var(--platform-control-radius, var(--radius-common-m));--bs-select-padding-x: var(--platform-control-padding-x, .625rem);--bs-select-indicator-offset: var(--platform-control-padding-x, .625rem);--bs-select-font-size: var(--platform-control-font-size, 13px);--bs-select-line-height: var(--platform-control-line-height, 20px);--bs-select-trigger-width: 100%;--bs-select-trigger-min-width: 0;--bs-select-popup-min-width: 100%}.bs-select{display:block}.bs-select.bs-select--disabled{pointer-events:none}.bs-select__trigger{position:relative;display:flex;align-items:center;box-sizing:border-box;width:var(--bs-select-trigger-width);min-width:var(--bs-select-trigger-min-width);height:var(--bs-select-height);min-height:var(--bs-select-height);color:var(--platform-control-placeholder, var(--color-text-placeholder));background-color:var(--platform-control-bg, var(--color-surface));border:1px solid var(--platform-control-border, var(--color-border));border-radius:var(--bs-select-radius);transition:border-color .15s ease,background-color .15s ease,box-shadow .15s ease}.bs-select__trigger:hover{background-color:var(--platform-control-bg-hover, var(--color-surface-soft))}.bs-select:focus-within .bs-select__trigger{border-color:var(--platform-control-focus, var(--color-primary));box-shadow:0 0 0 2px var(--platform-control-focus-ring, var(--color-primary-subtle))}.bs-select.bs-select--disabled .bs-select__trigger,.bs-select:has([ngComboboxInput][aria-disabled=true]) .bs-select__trigger{opacity:.6;cursor:default;background-color:var(--platform-control-bg-hover, var(--color-surface-soft))}[ngComboboxInput]{position:relative;z-index:0;width:100%;min-width:0;height:var(--bs-select-height);padding:0 calc(var(--bs-select-indicator-offset) + 1.75rem) 0 var(--bs-select-padding-x);border:0;outline:none;opacity:0;cursor:pointer;background:transparent}.bs-select__label{position:absolute;z-index:1;inset:0;display:flex;align-items:center;padding:0 calc(var(--bs-select-indicator-offset) + 1.75rem) 0 var(--bs-select-padding-x);pointer-events:none}.bs-select__tags{display:flex;align-items:center;gap:4px;min-width:0;width:100%;overflow:hidden;pointer-events:auto}.bs-select__add,.bs-select__tag{display:inline-flex;align-items:center;flex:0 0 auto;min-width:0;max-width:8rem;height:calc(var(--bs-select-height) - 10px);min-height:20px;padding:0 8px;border:1px solid var(--color-border);border-radius:calc(var(--bs-select-radius) - 2px);background-color:var(--color-surface-soft);color:var(--platform-control-color, var(--color-text-primary));font-size:var(--bs-select-font-size);font-family:inherit;line-height:1;white-space:nowrap}.bs-select__add{max-width:6rem;color:var(--color-primary);background-color:var(--color-surface);gap:3px;cursor:pointer}.bs-select__tag-text{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.bs-select__tag--ellipsis{flex:0 0 auto;width:28px;justify-content:center;padding:0;color:var(--color-text-muted)}.bs-select__tag-remove{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;width:14px;height:14px;margin-left:4px;padding:0;color:var(--color-text-muted);background:transparent;border:0;cursor:pointer;line-height:1;pointer-events:auto}.bs-select__tag-remove:hover{color:var(--color-text-primary)}.bs-select__label-text{overflow:hidden;color:var(--platform-control-placeholder, var(--color-text-placeholder));font-size:var(--bs-select-font-size);line-height:var(--bs-select-line-height);text-overflow:ellipsis;white-space:nowrap}.bs-select.bs-select--selected .bs-select__label-text{color:var(--platform-control-color, var(--color-text-primary))}.bs-select__arrow{position:absolute;z-index:2;right:var(--bs-select-indicator-offset);width:0;height:0;pointer-events:none;border-left:5px solid transparent;border-right:5px solid transparent;border-top:6px solid var(--platform-control-placeholder, var(--color-text-placeholder));transition:transform .15s ease-in-out}[ngComboboxInput][aria-expanded=true]~.bs-select__arrow{transform:rotate(180deg)}.bs-select__popup{width:100%;min-width:var(--bs-select-popup-min-width);margin-top:var(--space-2);padding:var(--space-2);border:1px solid var(--color-border);border-radius:var(--bs-select-radius);background-color:var(--color-surface);box-shadow:var(--shadow-common-m);max-height:11rem;overflow:hidden}[ngListbox]{display:flex;flex-direction:column;gap:2px;height:100%;overflow:auto}[ngOption]{display:flex;align-items:center;min-height:var(--bs-select-height);margin:1px;padding:0 var(--space-2);border-radius:var(--bs-select-radius);cursor:pointer;transition:background-color .15s ease,color .15s ease,outline-color .15s ease}[ngOption]:hover{background-color:var(--color-surface-soft)}[ngOption][data-active=true]{outline:2px solid var(--color-primary);outline-offset:-2px}[ngOption][aria-selected=true]{color:var(--color-primary);background-color:var(--color-primary-subtle)}[ngOption][aria-disabled=true]{opacity:.5;cursor:default}.bs-select__option-text{flex:1;min-width:0;font-size:var(--bs-select-font-size);line-height:var(--bs-select-line-height)}[ngOption]:not([aria-selected=true]) .bs-select__check{display:none}.bs-select__check{position:relative;width:1rem;height:1rem;display:inline-block;flex:0 0 1rem;align-self:center;color:var(--color-primary);line-height:0;vertical-align:middle}.bs-select__check:before{position:absolute;top:50%;left:50%;content:\"\";width:6px;height:10px;border-right:2px solid currentColor;border-bottom:2px solid currentColor;transform:translate(-50%,-73%) rotate(45deg);transform-origin:center}\n"] }]
|
|
3389
|
+
], template: "<div\r\n class=\"bs-select\"\r\n ngCombobox\r\n readonly\r\n [class.bs-select--selected]=\"hasValue()\"\r\n [class.bs-select--disabled]=\"isDisabled()\"\r\n>\r\n <div #origin class=\"bs-select__trigger\">\r\n <span class=\"bs-select__label\">\r\n @if (multiple() && selectedOptions().length) {\r\n <span class=\"bs-select__tags\">\r\n <button type=\"button\" class=\"bs-select__add\" (click)=\"openCombobox($event)\">\r\n <lucide-icon aria-hidden=\"true\" [img]=\"plusIcon\" [size]=\"13\" [strokeWidth]=\"2\" />\r\n <span>{{ placeholder() }}</span>\r\n </button>\r\n @for (option of visibleSelectedOptions(); track option.value) {\r\n <span class=\"bs-select__tag\">\r\n <span class=\"bs-select__tag-text\">{{ option.label }}</span>\r\n <button\r\n type=\"button\"\r\n class=\"bs-select__tag-remove\"\r\n [attr.aria-label]=\"'Remove ' + option.label\"\r\n (click)=\"removeSelectedValue(option.value, $event)\"\r\n >\r\n <lucide-icon aria-hidden=\"true\" [img]=\"closeIcon\" [size]=\"12\" [strokeWidth]=\"2\" />\r\n </button>\r\n </span>\r\n }\r\n @if (hiddenSelectedCount()) {\r\n <span class=\"bs-select__tag bs-select__tag--ellipsis\" aria-hidden=\"true\">...</span>\r\n }\r\n </span>\r\n } @else {\r\n <span class=\"bs-select__label-text\">{{ displayValue() }}</span>\r\n }\r\n </span>\r\n <input\r\n [attr.aria-label]=\"ariaLabel()\"\r\n [placeholder]=\"placeholder()\"\r\n [disabled]=\"isDisabled()\"\r\n ngComboboxInput\r\n />\r\n @if (!multiple() && hasValue()) {\r\n <button\r\n type=\"button\"\r\n class=\"bs-select__clear\"\r\n aria-label=\"Clear selected option\"\r\n (click)=\"clearSelectedValue($event)\"\r\n >\r\n <lucide-icon aria-hidden=\"true\" [img]=\"closeIcon\" [size]=\"13\" [strokeWidth]=\"2\" />\r\n </button>\r\n }\r\n <span class=\"bs-select__arrow\" aria-hidden=\"true\"></span>\r\n </div>\r\n <ng-template ngComboboxPopupContainer>\r\n <ng-template\r\n #selectOverlay=\"cdkConnectedOverlay\"\r\n [cdkConnectedOverlay]=\"{ origin, usePopover: 'inline', matchWidth: matchTriggerWidth() }\"\r\n [cdkConnectedOverlayOpen]=\"combobox()?.expanded() ?? false\"\r\n cdkAttachPopoverAsChild\r\n (attach)=\"onOverlayAttached(selectOverlay)\"\r\n (detach)=\"onOverlayDetached()\"\r\n >\r\n <div class=\"bs-select__popup\">\r\n <div\r\n ngListbox\r\n [values]=\"selectedValues()\"\r\n (valuesChange)=\"onListboxValueChange($event)\"\r\n [multi]=\"multiple()\"\r\n [disabled]=\"isDisabled()\"\r\n >\r\n @for (option of normalizedOptions(); track option.value) {\r\n <div\r\n ngOption\r\n [value]=\"option.value\"\r\n [label]=\"option.label\"\r\n [disabled]=\"option.disabled ?? false\"\r\n (click)=\"onOptionClick(option)\"\r\n >\r\n <span class=\"bs-select__option-text\">{{ option.label }}</span>\r\n <span class=\"bs-select__check\" aria-hidden=\"true\"></span>\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n </ng-template>\r\n </ng-template>\r\n</div>\r\n", styles: [":host{display:inline-block;width:var(--bs-select-width, var(--platform-control-width, 10rem));min-width:var(--bs-select-min-width, var(--platform-control-width, 10rem));max-width:100%;--bs-select-height: var(--platform-control-height, 2rem);--bs-select-radius: var(--platform-control-radius, var(--radius-common-m));--bs-select-padding-x: var(--platform-control-padding-x, .625rem);--bs-select-indicator-offset: var(--platform-control-padding-x, .625rem);--bs-select-font-size: var(--platform-control-font-size, 13px);--bs-select-line-height: var(--platform-control-line-height, 20px);--bs-select-trigger-width: 100%;--bs-select-trigger-min-width: 0;--bs-select-popup-min-width: 100%}.bs-select{display:block}.bs-select.bs-select--disabled{pointer-events:none}.bs-select__trigger{position:relative;display:flex;align-items:center;box-sizing:border-box;width:var(--bs-select-trigger-width);min-width:var(--bs-select-trigger-min-width);height:var(--bs-select-height);min-height:var(--bs-select-height);color:var(--platform-control-placeholder, var(--color-text-placeholder));background-color:var(--platform-control-bg, var(--color-surface));border:1px solid var(--platform-control-border, var(--color-border));border-radius:var(--bs-select-radius);transition:border-color .15s ease,background-color .15s ease,box-shadow .15s ease}.bs-select__trigger:hover{background-color:var(--platform-control-bg-hover, var(--color-surface-soft))}.bs-select:focus-within .bs-select__trigger{border-color:var(--platform-control-focus, var(--color-primary));box-shadow:0 0 0 2px var(--platform-control-focus-ring, var(--color-primary-subtle))}.bs-select.bs-select--disabled .bs-select__trigger,.bs-select:has([ngComboboxInput][aria-disabled=true]) .bs-select__trigger{opacity:.6;cursor:default;background-color:var(--platform-control-bg-hover, var(--color-surface-soft))}[ngComboboxInput]{position:relative;z-index:0;width:100%;min-width:0;height:var(--bs-select-height);padding:0 calc(var(--bs-select-indicator-offset) + 1.75rem) 0 var(--bs-select-padding-x);border:0;outline:none;opacity:0;cursor:pointer;background:transparent}.bs-select__label{position:absolute;z-index:1;inset:0;display:flex;align-items:center;padding:0 calc(var(--bs-select-indicator-offset) + 1.75rem) 0 var(--bs-select-padding-x);pointer-events:none}.bs-select__tags{display:flex;align-items:center;gap:4px;min-width:0;width:100%;overflow:hidden;pointer-events:auto}.bs-select__add,.bs-select__tag{display:inline-flex;align-items:center;flex:0 0 auto;min-width:0;max-width:8rem;height:calc(var(--bs-select-height) - 10px);min-height:20px;padding:0 8px;border:1px solid var(--color-border);border-radius:calc(var(--bs-select-radius) - 2px);background-color:var(--color-surface-soft);color:var(--platform-control-color, var(--color-text-primary));font-size:var(--bs-select-font-size);font-family:inherit;line-height:1;white-space:nowrap}.bs-select__add{max-width:6rem;color:var(--color-primary);background-color:var(--color-surface);gap:3px;cursor:pointer}.bs-select__tag-text{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.bs-select__tag--ellipsis{flex:0 0 auto;width:28px;justify-content:center;padding:0;color:var(--color-text-muted)}.bs-select__tag-remove{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;width:14px;height:14px;margin-left:4px;padding:0;color:var(--color-text-muted);background:transparent;border:0;cursor:pointer;line-height:1;pointer-events:auto}.bs-select__tag-remove:hover{color:var(--color-text-primary)}.bs-select__label-text{overflow:hidden;color:var(--platform-control-placeholder, var(--color-text-placeholder));font-size:var(--bs-select-font-size);line-height:var(--bs-select-line-height);text-overflow:ellipsis;white-space:nowrap}.bs-select.bs-select--selected .bs-select__label-text{color:var(--platform-control-color, var(--color-text-primary))}.bs-select__arrow{position:absolute;z-index:2;right:var(--bs-select-indicator-offset);width:0;height:0;pointer-events:none;border-left:5px solid transparent;border-right:5px solid transparent;border-top:6px solid var(--platform-control-placeholder, var(--color-text-placeholder));transition:opacity .12s ease,transform .15s ease-in-out}[ngComboboxInput][aria-expanded=true]~.bs-select__arrow{transform:rotate(180deg)}.bs-select__clear{position:absolute;top:50%;right:calc(var(--bs-select-indicator-offset) - 5px);z-index:3;display:inline-flex;align-items:center;justify-content:center;width:20px;height:20px;padding:0;color:var(--platform-control-placeholder, var(--color-text-placeholder));background:transparent;border:0;border-radius:50%;cursor:pointer;line-height:0;opacity:0;pointer-events:none;transform:translateY(-50%);transition:background-color .12s ease,color .12s ease,opacity .12s ease}.bs-select__clear:hover,.bs-select__clear:focus-visible{color:var(--platform-control-color, var(--color-text-primary));background-color:var(--platform-control-bg-hover, var(--color-surface-soft));opacity:1;outline:none}.bs-select.bs-select--selected:not(.bs-select--disabled) .bs-select__clear,.bs-select.bs-select--selected:not(.bs-select--disabled) .bs-select__clear:focus-visible{pointer-events:auto}.bs-select__clear:hover~.bs-select__arrow,.bs-select__clear:focus-visible~.bs-select__arrow{opacity:0}.bs-select__popup{width:100%;min-width:var(--bs-select-popup-min-width);margin-top:var(--space-2);padding:var(--space-2);border:1px solid var(--color-border);border-radius:var(--bs-select-radius);background-color:var(--color-surface);box-shadow:var(--shadow-common-m);max-height:11rem;overflow:hidden}[ngListbox]{display:flex;flex-direction:column;gap:2px;height:100%;overflow:auto}[ngOption]{display:flex;align-items:center;min-height:var(--bs-select-height);margin:1px;padding:0 var(--space-2);border-radius:var(--bs-select-radius);cursor:pointer;transition:background-color .15s ease,color .15s ease,outline-color .15s ease}[ngOption]:hover{background-color:var(--color-surface-soft)}[ngOption][data-active=true]{outline:2px solid var(--color-primary);outline-offset:-2px}[ngOption][aria-selected=true]{color:var(--color-primary);background-color:var(--color-primary-subtle)}[ngOption][aria-disabled=true]{opacity:.5;cursor:default}.bs-select__option-text{flex:1;min-width:0;font-size:var(--bs-select-font-size);line-height:var(--bs-select-line-height)}[ngOption]:not([aria-selected=true]) .bs-select__check{display:none}.bs-select__check{position:relative;width:1rem;height:1rem;display:inline-block;flex:0 0 1rem;align-self:center;color:var(--color-primary);line-height:0;vertical-align:middle}.bs-select__check:before{position:absolute;top:50%;left:50%;content:\"\";width:6px;height:10px;border-right:2px solid currentColor;border-bottom:2px solid currentColor;transform:translate(-50%,-73%) rotate(45deg);transform-origin:center}\n"] }]
|
|
2786
3390
|
}], ctorParameters: () => [], propDecorators: { listBox: [{ type: i0.ViewChild, args: [i0.forwardRef(() => Listbox), { isSignal: true }] }], optionRefs: [{ type: i0.ViewChildren, args: [i0.forwardRef(() => Option), { isSignal: true }] }], combobox: [{ type: i0.ViewChild, args: [i0.forwardRef(() => Combobox), { isSignal: true }] }], labels: [{ type: i0.Input, args: [{ isSignal: true, alias: "labels", required: false }] }], options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], multiple: [{ type: i0.Input, args: [{ isSignal: true, alias: "multiple", required: false }] }], matchTriggerWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "matchTriggerWidth", required: false }] }] } });
|
|
2787
3391
|
|
|
2788
3392
|
class Card {
|
|
@@ -2790,6 +3394,7 @@ class Card {
|
|
|
2790
3394
|
title = input('', ...(ngDevMode ? [{ debugName: "title" }] : /* istanbul ignore next */ []));
|
|
2791
3395
|
content = input('', ...(ngDevMode ? [{ debugName: "content" }] : /* istanbul ignore next */ []));
|
|
2792
3396
|
hoverable = input(false, ...(ngDevMode ? [{ debugName: "hoverable" }] : /* istanbul ignore next */ []));
|
|
3397
|
+
fill = input(false, ...(ngDevMode ? [{ debugName: "fill" }] : /* istanbul ignore next */ []));
|
|
2793
3398
|
actionText = input('', ...(ngDevMode ? [{ debugName: "actionText" }] : /* istanbul ignore next */ []));
|
|
2794
3399
|
actionTextAriaLabel = input('', ...(ngDevMode ? [{ debugName: "actionTextAriaLabel" }] : /* istanbul ignore next */ []));
|
|
2795
3400
|
menuItems = input([], ...(ngDevMode ? [{ debugName: "menuItems" }] : /* istanbul ignore next */ []));
|
|
@@ -2842,16 +3447,20 @@ class Card {
|
|
|
2842
3447
|
return action.id;
|
|
2843
3448
|
}
|
|
2844
3449
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: Card, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2845
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: Card, isStandalone: true, selector: "s-card", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, content: { classPropertyName: "content", publicName: "content", isSignal: true, isRequired: false, transformFunction: null }, hoverable: { classPropertyName: "hoverable", publicName: "hoverable", isSignal: true, isRequired: false, transformFunction: null }, actionText: { classPropertyName: "actionText", publicName: "actionText", isSignal: true, isRequired: false, transformFunction: null }, actionTextAriaLabel: { classPropertyName: "actionTextAriaLabel", publicName: "actionTextAriaLabel", isSignal: true, isRequired: false, transformFunction: null }, menuItems: { classPropertyName: "menuItems", publicName: "menuItems", isSignal: true, isRequired: false, transformFunction: null }, iconActions: { classPropertyName: "iconActions", publicName: "iconActions", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { actionTriggered: "actionTriggered", menuItemSelected: "menuItemSelected", iconActionSelected: "iconActionSelected" }, host: { listeners: { "document:click": "onDocumentClick($event)", "document:keydown.escape": "closeMenu()" } }, ngImport: i0, template: "<article class=\"card\" [class.card--hoverable]=\"hoverable()\">\
|
|
3450
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: Card, isStandalone: true, selector: "s-card", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, content: { classPropertyName: "content", publicName: "content", isSignal: true, isRequired: false, transformFunction: null }, hoverable: { classPropertyName: "hoverable", publicName: "hoverable", isSignal: true, isRequired: false, transformFunction: null }, fill: { classPropertyName: "fill", publicName: "fill", isSignal: true, isRequired: false, transformFunction: null }, actionText: { classPropertyName: "actionText", publicName: "actionText", isSignal: true, isRequired: false, transformFunction: null }, actionTextAriaLabel: { classPropertyName: "actionTextAriaLabel", publicName: "actionTextAriaLabel", isSignal: true, isRequired: false, transformFunction: null }, menuItems: { classPropertyName: "menuItems", publicName: "menuItems", isSignal: true, isRequired: false, transformFunction: null }, iconActions: { classPropertyName: "iconActions", publicName: "iconActions", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { actionTriggered: "actionTriggered", menuItemSelected: "menuItemSelected", iconActionSelected: "iconActionSelected" }, host: { listeners: { "document:click": "onDocumentClick($event)", "document:keydown.escape": "closeMenu()" } }, ngImport: i0, template: "<article class=\"card\" [class.card--hoverable]=\"hoverable()\" [class.card--fill]=\"fill()\">\n <div class=\"card__cover\">\r\n <ng-content select=\"[cardCover]\" />\r\n </div>\r\n\r\n @if (hasHeader()) {\r\n <header class=\"card__header\">\r\n <div class=\"card__header-main\">\r\n <ng-content select=\"[cardHeaderStart]\" />\r\n\r\n @if (title()) {\r\n <div class=\"card__title\">{{ title() }}</div>\r\n }\r\n </div>\r\n\r\n <div class=\"card__actions\">\r\n <ng-content select=\"[cardHeaderEnd]\" />\r\n\r\n @if (actionText()) {\r\n <button\r\n type=\"button\"\r\n class=\"card__action-text\"\r\n [attr.aria-label]=\"actionTextAriaLabel() || actionText()\"\r\n (click)=\"onActionTextClick()\"\r\n >\r\n {{ actionText() }}\r\n </button>\r\n }\r\n\r\n @if (hasMenu()) {\r\n <div class=\"card__menu\">\r\n <button\r\n type=\"button\"\r\n class=\"card__icon-button\"\r\n aria-label=\"\u6253\u5F00\u66F4\u591A\u64CD\u4F5C\"\r\n (click)=\"onMenuTriggerClick($event)\"\r\n >\r\n <i-lucide [img]=\"moreIcon\" class=\"card__icon\"></i-lucide>\r\n </button>\r\n\r\n @if (isMenuOpen()) {\r\n <div class=\"card__menu-panel\" role=\"menu\" aria-label=\"\u66F4\u591A\u64CD\u4F5C\">\r\n @for (item of menuItems(); track trackByMenuId($index, item)) {\r\n <button\r\n type=\"button\"\r\n class=\"card__menu-item\"\r\n [disabled]=\"item.disabled\"\r\n (click)=\"onMenuItemClick(item)\"\r\n >\r\n {{ item.label }}\r\n </button>\r\n }\r\n </div>\r\n }\r\n </div>\r\n }\r\n\r\n @if (hasIconActions()) {\r\n <div class=\"card__icon-actions\">\r\n @for (action of iconActions(); track trackByActionId($index, action)) {\r\n <button\r\n type=\"button\"\r\n class=\"card__icon-button\"\r\n [attr.aria-label]=\"action.ariaLabel\"\r\n [disabled]=\"action.disabled\"\r\n (click)=\"onIconActionClick(action)\"\r\n >\r\n <i-lucide [img]=\"action.icon\" class=\"card__icon\"></i-lucide>\r\n </button>\r\n }\r\n </div>\r\n }\r\n </div>\r\n </header>\r\n }\r\n\r\n <div class=\"card__subheader\">\r\n <ng-content select=\"[cardSubheader]\" />\r\n </div>\r\n\r\n <div class=\"card__body\">\r\n <div class=\"card__body-main\">\r\n <ng-content select=\"[cardBody]\" />\r\n\r\n @if (content()) {\r\n <p class=\"card__text\">{{ content() }}</p>\r\n } @else {\r\n <ng-content />\r\n }\r\n </div>\r\n\r\n <aside class=\"card__aside\">\r\n <ng-content select=\"[cardAside]\" />\r\n </aside>\r\n </div>\r\n\r\n <footer class=\"card__footer\">\r\n <ng-content select=\"[cardFooter]\" />\r\n </footer>\r\n</article>\r\n", styles: [":host{display:block}.card{border:1px solid var(--color-border);border-radius:var(--radius-common-l);background:var(--color-surface);box-shadow:none;overflow:hidden;transition:box-shadow .16s ease,transform .16s ease,border-color .16s ease}.card--hoverable:hover{box-shadow:var(--shadow-common-l);border-color:var(--color-line-light)}.card--fill{height:100%;min-height:0;display:flex;flex-direction:column}.card--fill>.card__body{flex:1 1 auto;min-height:0;align-items:stretch}.card--fill>.card__body>.card__body-main{height:100%;min-height:0}.card__cover:empty,.card__subheader:empty,.card__footer:empty,.card__aside:empty{display:none}.card__cover{border-bottom:1px solid var(--color-border)}.card__header{min-height:48px;padding:0 14px;border-bottom:1px solid var(--color-border);display:flex;align-items:center;justify-content:space-between;gap:14px}.card__header-main{min-width:0;flex:1 1 auto}.card__title{color:var(--color-text-primary);font-size:18px;font-weight:var(--font-weight-medium);line-height:25px}.card__actions{display:inline-flex;align-items:center;gap:12px;flex:0 0 auto}.card__actions--toolbar{display:flex;flex-wrap:wrap;gap:.5rem;padding:.5rem;border:1px solid var(--color-border);border-radius:var(--radius-common-m);background:var(--color-surface-soft)}.card__action-text{padding:0;border:0;background:transparent;color:var(--color-link);font-size:17px;font-weight:var(--font-weight-medium);line-height:22px;cursor:pointer}.card__action-text:hover{color:var(--color-link-hover)}.card__action-text:active{color:var(--color-link-active)}.card__menu,.card__icon-actions{position:relative;display:inline-flex;align-items:center;gap:4px}.card__icon-button{width:28px;height:28px;padding:0;border:0;border-radius:var(--radius-common-s);background:transparent;color:var(--color-text-secondary);display:inline-flex;align-items:center;justify-content:center;cursor:pointer;transition:color .16s ease,background-color .16s ease}.card__icon-button:hover:not(:disabled){background:var(--color-overlay-hover);color:var(--color-text-primary)}.card__icon-button:active:not(:disabled){background:var(--color-overlay-press)}.card__icon-button:disabled{color:var(--color-text-disabled);cursor:not-allowed}.card__icon{width:18px;height:18px;stroke-width:1.8}.card__menu-panel{position:absolute;top:calc(100% + 12px);right:0;min-width:112px;padding:8px;border:1px solid var(--color-border);border-radius:var(--radius-common-l);background:var(--color-surface);box-shadow:var(--shadow-common-l);display:grid;gap:2px;z-index:10}.card__menu-item{min-height:44px;padding:0 12px;border:0;border-radius:var(--radius-common-m);background:transparent;color:var(--color-text-primary);font-size:17px;line-height:22px;text-align:left;cursor:pointer}.card__menu-item:hover:not(:disabled){background:var(--color-surface-soft)}.card__menu-item:disabled{color:var(--color-text-disabled);cursor:not-allowed}.card__subheader{padding:0 14px;border-bottom:1px solid var(--color-border)}.card__body{padding:12px;display:flex;align-items:flex-start;justify-content:space-between;gap:14px}.card__body-main{min-width:0;flex:1 1 auto}.card__aside{flex:0 0 auto}.card__text{margin:0;color:var(--color-text-secondary);font-size:17px;line-height:22px}.card__text--rich{overflow-x:auto;overflow-wrap:anywhere;line-height:1.7}.card__text--rich :where(p,div,blockquote){max-width:100%}.card__text--rich :where(img){display:block;max-width:100%;height:auto;object-fit:contain}.card__footer{min-height:48px;padding:0 14px;border-top:1px solid var(--color-border);display:flex;align-items:center}\n"], dependencies: [{ kind: "ngmodule", type: LucideAngularModule }, { kind: "component", type: i1.LucideAngularComponent, selector: "lucide-angular, lucide-icon, i-lucide, span-lucide", inputs: ["class", "name", "img", "color", "absoluteStrokeWidth", "size", "strokeWidth"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2846
3451
|
}
|
|
2847
3452
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: Card, decorators: [{
|
|
2848
3453
|
type: Component,
|
|
2849
3454
|
args: [{ selector: 's-card', imports: [LucideAngularModule], changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
2850
3455
|
'(document:click)': 'onDocumentClick($event)',
|
|
2851
3456
|
'(document:keydown.escape)': 'closeMenu()',
|
|
2852
|
-
}, template: "<article class=\"card\" [class.card--hoverable]=\"hoverable()\">\
|
|
2853
|
-
}], propDecorators: { title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], content: [{ type: i0.Input, args: [{ isSignal: true, alias: "content", required: false }] }], hoverable: [{ type: i0.Input, args: [{ isSignal: true, alias: "hoverable", required: false }] }], actionText: [{ type: i0.Input, args: [{ isSignal: true, alias: "actionText", required: false }] }], actionTextAriaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "actionTextAriaLabel", required: false }] }], menuItems: [{ type: i0.Input, args: [{ isSignal: true, alias: "menuItems", required: false }] }], iconActions: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconActions", required: false }] }], actionTriggered: [{ type: i0.Output, args: ["actionTriggered"] }], menuItemSelected: [{ type: i0.Output, args: ["menuItemSelected"] }], iconActionSelected: [{ type: i0.Output, args: ["iconActionSelected"] }] } });
|
|
3457
|
+
}, template: "<article class=\"card\" [class.card--hoverable]=\"hoverable()\" [class.card--fill]=\"fill()\">\n <div class=\"card__cover\">\r\n <ng-content select=\"[cardCover]\" />\r\n </div>\r\n\r\n @if (hasHeader()) {\r\n <header class=\"card__header\">\r\n <div class=\"card__header-main\">\r\n <ng-content select=\"[cardHeaderStart]\" />\r\n\r\n @if (title()) {\r\n <div class=\"card__title\">{{ title() }}</div>\r\n }\r\n </div>\r\n\r\n <div class=\"card__actions\">\r\n <ng-content select=\"[cardHeaderEnd]\" />\r\n\r\n @if (actionText()) {\r\n <button\r\n type=\"button\"\r\n class=\"card__action-text\"\r\n [attr.aria-label]=\"actionTextAriaLabel() || actionText()\"\r\n (click)=\"onActionTextClick()\"\r\n >\r\n {{ actionText() }}\r\n </button>\r\n }\r\n\r\n @if (hasMenu()) {\r\n <div class=\"card__menu\">\r\n <button\r\n type=\"button\"\r\n class=\"card__icon-button\"\r\n aria-label=\"\u6253\u5F00\u66F4\u591A\u64CD\u4F5C\"\r\n (click)=\"onMenuTriggerClick($event)\"\r\n >\r\n <i-lucide [img]=\"moreIcon\" class=\"card__icon\"></i-lucide>\r\n </button>\r\n\r\n @if (isMenuOpen()) {\r\n <div class=\"card__menu-panel\" role=\"menu\" aria-label=\"\u66F4\u591A\u64CD\u4F5C\">\r\n @for (item of menuItems(); track trackByMenuId($index, item)) {\r\n <button\r\n type=\"button\"\r\n class=\"card__menu-item\"\r\n [disabled]=\"item.disabled\"\r\n (click)=\"onMenuItemClick(item)\"\r\n >\r\n {{ item.label }}\r\n </button>\r\n }\r\n </div>\r\n }\r\n </div>\r\n }\r\n\r\n @if (hasIconActions()) {\r\n <div class=\"card__icon-actions\">\r\n @for (action of iconActions(); track trackByActionId($index, action)) {\r\n <button\r\n type=\"button\"\r\n class=\"card__icon-button\"\r\n [attr.aria-label]=\"action.ariaLabel\"\r\n [disabled]=\"action.disabled\"\r\n (click)=\"onIconActionClick(action)\"\r\n >\r\n <i-lucide [img]=\"action.icon\" class=\"card__icon\"></i-lucide>\r\n </button>\r\n }\r\n </div>\r\n }\r\n </div>\r\n </header>\r\n }\r\n\r\n <div class=\"card__subheader\">\r\n <ng-content select=\"[cardSubheader]\" />\r\n </div>\r\n\r\n <div class=\"card__body\">\r\n <div class=\"card__body-main\">\r\n <ng-content select=\"[cardBody]\" />\r\n\r\n @if (content()) {\r\n <p class=\"card__text\">{{ content() }}</p>\r\n } @else {\r\n <ng-content />\r\n }\r\n </div>\r\n\r\n <aside class=\"card__aside\">\r\n <ng-content select=\"[cardAside]\" />\r\n </aside>\r\n </div>\r\n\r\n <footer class=\"card__footer\">\r\n <ng-content select=\"[cardFooter]\" />\r\n </footer>\r\n</article>\r\n", styles: [":host{display:block}.card{border:1px solid var(--color-border);border-radius:var(--radius-common-l);background:var(--color-surface);box-shadow:none;overflow:hidden;transition:box-shadow .16s ease,transform .16s ease,border-color .16s ease}.card--hoverable:hover{box-shadow:var(--shadow-common-l);border-color:var(--color-line-light)}.card--fill{height:100%;min-height:0;display:flex;flex-direction:column}.card--fill>.card__body{flex:1 1 auto;min-height:0;align-items:stretch}.card--fill>.card__body>.card__body-main{height:100%;min-height:0}.card__cover:empty,.card__subheader:empty,.card__footer:empty,.card__aside:empty{display:none}.card__cover{border-bottom:1px solid var(--color-border)}.card__header{min-height:48px;padding:0 14px;border-bottom:1px solid var(--color-border);display:flex;align-items:center;justify-content:space-between;gap:14px}.card__header-main{min-width:0;flex:1 1 auto}.card__title{color:var(--color-text-primary);font-size:18px;font-weight:var(--font-weight-medium);line-height:25px}.card__actions{display:inline-flex;align-items:center;gap:12px;flex:0 0 auto}.card__actions--toolbar{display:flex;flex-wrap:wrap;gap:.5rem;padding:.5rem;border:1px solid var(--color-border);border-radius:var(--radius-common-m);background:var(--color-surface-soft)}.card__action-text{padding:0;border:0;background:transparent;color:var(--color-link);font-size:17px;font-weight:var(--font-weight-medium);line-height:22px;cursor:pointer}.card__action-text:hover{color:var(--color-link-hover)}.card__action-text:active{color:var(--color-link-active)}.card__menu,.card__icon-actions{position:relative;display:inline-flex;align-items:center;gap:4px}.card__icon-button{width:28px;height:28px;padding:0;border:0;border-radius:var(--radius-common-s);background:transparent;color:var(--color-text-secondary);display:inline-flex;align-items:center;justify-content:center;cursor:pointer;transition:color .16s ease,background-color .16s ease}.card__icon-button:hover:not(:disabled){background:var(--color-overlay-hover);color:var(--color-text-primary)}.card__icon-button:active:not(:disabled){background:var(--color-overlay-press)}.card__icon-button:disabled{color:var(--color-text-disabled);cursor:not-allowed}.card__icon{width:18px;height:18px;stroke-width:1.8}.card__menu-panel{position:absolute;top:calc(100% + 12px);right:0;min-width:112px;padding:8px;border:1px solid var(--color-border);border-radius:var(--radius-common-l);background:var(--color-surface);box-shadow:var(--shadow-common-l);display:grid;gap:2px;z-index:10}.card__menu-item{min-height:44px;padding:0 12px;border:0;border-radius:var(--radius-common-m);background:transparent;color:var(--color-text-primary);font-size:17px;line-height:22px;text-align:left;cursor:pointer}.card__menu-item:hover:not(:disabled){background:var(--color-surface-soft)}.card__menu-item:disabled{color:var(--color-text-disabled);cursor:not-allowed}.card__subheader{padding:0 14px;border-bottom:1px solid var(--color-border)}.card__body{padding:12px;display:flex;align-items:flex-start;justify-content:space-between;gap:14px}.card__body-main{min-width:0;flex:1 1 auto}.card__aside{flex:0 0 auto}.card__text{margin:0;color:var(--color-text-secondary);font-size:17px;line-height:22px}.card__text--rich{overflow-x:auto;overflow-wrap:anywhere;line-height:1.7}.card__text--rich :where(p,div,blockquote){max-width:100%}.card__text--rich :where(img){display:block;max-width:100%;height:auto;object-fit:contain}.card__footer{min-height:48px;padding:0 14px;border-top:1px solid var(--color-border);display:flex;align-items:center}\n"] }]
|
|
3458
|
+
}], propDecorators: { title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], content: [{ type: i0.Input, args: [{ isSignal: true, alias: "content", required: false }] }], hoverable: [{ type: i0.Input, args: [{ isSignal: true, alias: "hoverable", required: false }] }], fill: [{ type: i0.Input, args: [{ isSignal: true, alias: "fill", required: false }] }], actionText: [{ type: i0.Input, args: [{ isSignal: true, alias: "actionText", required: false }] }], actionTextAriaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "actionTextAriaLabel", required: false }] }], menuItems: [{ type: i0.Input, args: [{ isSignal: true, alias: "menuItems", required: false }] }], iconActions: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconActions", required: false }] }], actionTriggered: [{ type: i0.Output, args: ["actionTriggered"] }], menuItemSelected: [{ type: i0.Output, args: ["menuItemSelected"] }], iconActionSelected: [{ type: i0.Output, args: ["iconActionSelected"] }] } });
|
|
2854
3459
|
|
|
3460
|
+
const YEAR_PANEL_SIZE = 12;
|
|
3461
|
+
function getYearPanelStart(year) {
|
|
3462
|
+
return Math.floor(year / YEAR_PANEL_SIZE) * YEAR_PANEL_SIZE;
|
|
3463
|
+
}
|
|
2855
3464
|
function startOfDay(value) {
|
|
2856
3465
|
return new Date(value.getFullYear(), value.getMonth(), value.getDate());
|
|
2857
3466
|
}
|
|
@@ -2930,6 +3539,25 @@ class DatePicker {
|
|
|
2930
3539
|
rangeHoverDate = signal(null, ...(ngDevMode ? [{ debugName: "rangeHoverDate" }] : /* istanbul ignore next */ []));
|
|
2931
3540
|
rangeSelectingPart = signal('start', ...(ngDevMode ? [{ debugName: "rangeSelectingPart" }] : /* istanbul ignore next */ []));
|
|
2932
3541
|
viewDate = signal(this.getInitialViewDate(), ...(ngDevMode ? [{ debugName: "viewDate" }] : /* istanbul ignore next */ []));
|
|
3542
|
+
shortcutText = computed(() => this.mode() === 'year' ? this.thisYearText() : this.todayText(), ...(ngDevMode ? [{ debugName: "shortcutText" }] : /* istanbul ignore next */ []));
|
|
3543
|
+
previousPanelLabel = computed(() => {
|
|
3544
|
+
if (this.mode() === 'year') {
|
|
3545
|
+
return '上一组年份';
|
|
3546
|
+
}
|
|
3547
|
+
if (this.mode() === 'month' || this.mode() === 'quarter') {
|
|
3548
|
+
return '上一年';
|
|
3549
|
+
}
|
|
3550
|
+
return '上一个月';
|
|
3551
|
+
}, ...(ngDevMode ? [{ debugName: "previousPanelLabel" }] : /* istanbul ignore next */ []));
|
|
3552
|
+
nextPanelLabel = computed(() => {
|
|
3553
|
+
if (this.mode() === 'year') {
|
|
3554
|
+
return '下一组年份';
|
|
3555
|
+
}
|
|
3556
|
+
if (this.mode() === 'month' || this.mode() === 'quarter') {
|
|
3557
|
+
return '下一年';
|
|
3558
|
+
}
|
|
3559
|
+
return '下一个月';
|
|
3560
|
+
}, ...(ngDevMode ? [{ debugName: "nextPanelLabel" }] : /* istanbul ignore next */ []));
|
|
2933
3561
|
displayValue = computed(() => {
|
|
2934
3562
|
if (this.mode() === 'range') {
|
|
2935
3563
|
const range = normalizeRangeValue(this.rangeValue());
|
|
@@ -2946,6 +3574,9 @@ class DatePicker {
|
|
|
2946
3574
|
if (!value) {
|
|
2947
3575
|
return '';
|
|
2948
3576
|
}
|
|
3577
|
+
if (this.mode() === 'year') {
|
|
3578
|
+
return `${value.getFullYear()}年`;
|
|
3579
|
+
}
|
|
2949
3580
|
if (this.mode() === 'quarter') {
|
|
2950
3581
|
return `${value.getFullYear()}年 Q${Math.floor(value.getMonth() / 3) + 1}`;
|
|
2951
3582
|
}
|
|
@@ -2968,6 +3599,10 @@ class DatePicker {
|
|
|
2968
3599
|
}, ...(ngDevMode ? [{ debugName: "displayValue" }] : /* istanbul ignore next */ []));
|
|
2969
3600
|
title = computed(() => {
|
|
2970
3601
|
const currentViewDate = this.viewDate();
|
|
3602
|
+
if (this.mode() === 'year') {
|
|
3603
|
+
const startYear = getYearPanelStart(currentViewDate.getFullYear());
|
|
3604
|
+
return `${startYear}年 - ${startYear + YEAR_PANEL_SIZE - 1}年`;
|
|
3605
|
+
}
|
|
2971
3606
|
if (this.mode() === 'month' || this.mode() === 'quarter') {
|
|
2972
3607
|
return `${currentViewDate.getFullYear()}年`;
|
|
2973
3608
|
}
|
|
@@ -3023,6 +3658,17 @@ class DatePicker {
|
|
|
3023
3658
|
{ quarter: 4, label: 'Q4', date: new Date(year, 9, 1) },
|
|
3024
3659
|
];
|
|
3025
3660
|
}, ...(ngDevMode ? [{ debugName: "quarterCells" }] : /* istanbul ignore next */ []));
|
|
3661
|
+
yearCells = computed(() => {
|
|
3662
|
+
const startYear = getYearPanelStart(this.viewDate().getFullYear());
|
|
3663
|
+
return Array.from({ length: YEAR_PANEL_SIZE }, (_, index) => {
|
|
3664
|
+
const year = startYear + index;
|
|
3665
|
+
return {
|
|
3666
|
+
year,
|
|
3667
|
+
label: `${year}年`,
|
|
3668
|
+
date: new Date(year, 0, 1),
|
|
3669
|
+
};
|
|
3670
|
+
});
|
|
3671
|
+
}, ...(ngDevMode ? [{ debugName: "yearCells" }] : /* istanbul ignore next */ []));
|
|
3026
3672
|
toggle() {
|
|
3027
3673
|
if (this.disabled()) {
|
|
3028
3674
|
return;
|
|
@@ -3080,6 +3726,16 @@ class DatePicker {
|
|
|
3080
3726
|
selectQuarter(cell) {
|
|
3081
3727
|
this.pendingDate.set(cell.date);
|
|
3082
3728
|
}
|
|
3729
|
+
selectYear(cell) {
|
|
3730
|
+
this.pendingDate.set(cell.date);
|
|
3731
|
+
}
|
|
3732
|
+
selectShortcut() {
|
|
3733
|
+
if (this.mode() === 'year') {
|
|
3734
|
+
this.selectThisYear();
|
|
3735
|
+
return;
|
|
3736
|
+
}
|
|
3737
|
+
this.selectToday();
|
|
3738
|
+
}
|
|
3083
3739
|
selectToday() {
|
|
3084
3740
|
if (this.isDateDisabled(this.today)) {
|
|
3085
3741
|
this.viewDate.set(this.today);
|
|
@@ -3108,6 +3764,12 @@ class DatePicker {
|
|
|
3108
3764
|
return;
|
|
3109
3765
|
}
|
|
3110
3766
|
const currentPendingDate = this.pendingDate() ?? this.today;
|
|
3767
|
+
if (this.mode() === 'year') {
|
|
3768
|
+
const selectedDate = new Date(currentYear, 0, 1);
|
|
3769
|
+
this.pendingDate.set(selectedDate);
|
|
3770
|
+
this.viewDate.set(selectedDate);
|
|
3771
|
+
return;
|
|
3772
|
+
}
|
|
3111
3773
|
const selectedDate = new Date(currentYear, currentPendingDate.getMonth(), 1);
|
|
3112
3774
|
this.pendingDate.set(selectedDate);
|
|
3113
3775
|
this.viewDate.set(new Date(currentYear, this.viewDate().getMonth(), 1));
|
|
@@ -3127,6 +3789,10 @@ class DatePicker {
|
|
|
3127
3789
|
}
|
|
3128
3790
|
prev() {
|
|
3129
3791
|
const current = this.viewDate();
|
|
3792
|
+
if (this.mode() === 'year') {
|
|
3793
|
+
this.viewDate.set(new Date(current.getFullYear() - YEAR_PANEL_SIZE, 0, 1));
|
|
3794
|
+
return;
|
|
3795
|
+
}
|
|
3130
3796
|
if (this.mode() === 'month' || this.mode() === 'quarter') {
|
|
3131
3797
|
this.viewDate.set(new Date(current.getFullYear() - 1, current.getMonth(), 1));
|
|
3132
3798
|
return;
|
|
@@ -3135,6 +3801,10 @@ class DatePicker {
|
|
|
3135
3801
|
}
|
|
3136
3802
|
next() {
|
|
3137
3803
|
const current = this.viewDate();
|
|
3804
|
+
if (this.mode() === 'year') {
|
|
3805
|
+
this.viewDate.set(new Date(current.getFullYear() + YEAR_PANEL_SIZE, 0, 1));
|
|
3806
|
+
return;
|
|
3807
|
+
}
|
|
3138
3808
|
if (this.mode() === 'month' || this.mode() === 'quarter') {
|
|
3139
3809
|
this.viewDate.set(new Date(current.getFullYear() + 1, current.getMonth(), 1));
|
|
3140
3810
|
return;
|
|
@@ -3169,6 +3839,10 @@ class DatePicker {
|
|
|
3169
3839
|
currentPendingDate.getFullYear() === cell.date.getFullYear() &&
|
|
3170
3840
|
Math.floor(currentPendingDate.getMonth() / 3) + 1 === cell.quarter);
|
|
3171
3841
|
}
|
|
3842
|
+
isYearSelected(cell) {
|
|
3843
|
+
const currentPendingDate = this.pendingDate();
|
|
3844
|
+
return !!currentPendingDate && currentPendingDate.getFullYear() === cell.year;
|
|
3845
|
+
}
|
|
3172
3846
|
isRangeStart(cell) {
|
|
3173
3847
|
if (this.mode() !== 'range') {
|
|
3174
3848
|
return false;
|
|
@@ -3328,7 +4002,7 @@ class DatePicker {
|
|
|
3328
4002
|
return Number.isFinite(parsedValue) ? parsedValue : fallback;
|
|
3329
4003
|
}
|
|
3330
4004
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: DatePicker, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3331
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: DatePicker, isStandalone: true, selector: "s-date-picker", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, rangeValue: { classPropertyName: "rangeValue", publicName: "rangeValue", isSignal: true, isRequired: false, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, rangeSeparator: { classPropertyName: "rangeSeparator", publicName: "rangeSeparator", isSignal: true, isRequired: false, transformFunction: null }, locale: { classPropertyName: "locale", publicName: "locale", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, minDate: { classPropertyName: "minDate", publicName: "minDate", isSignal: true, isRequired: false, transformFunction: null }, maxDate: { classPropertyName: "maxDate", publicName: "maxDate", isSignal: true, isRequired: false, transformFunction: null }, confirmText: { classPropertyName: "confirmText", publicName: "confirmText", isSignal: true, isRequired: false, transformFunction: null }, cancelText: { classPropertyName: "cancelText", publicName: "cancelText", isSignal: true, isRequired: false, transformFunction: null }, todayText: { classPropertyName: "todayText", publicName: "todayText", isSignal: true, isRequired: false, transformFunction: null }, thisYearText: { classPropertyName: "thisYearText", publicName: "thisYearText", isSignal: true, isRequired: false, transformFunction: null }, startPlaceholder: { classPropertyName: "startPlaceholder", publicName: "startPlaceholder", isSignal: true, isRequired: false, transformFunction: null }, endPlaceholder: { classPropertyName: "endPlaceholder", publicName: "endPlaceholder", isSignal: true, isRequired: false, transformFunction: null }, iconSize: { classPropertyName: "iconSize", publicName: "iconSize", isSignal: true, isRequired: false, transformFunction: null }, weekDayLabels: { classPropertyName: "weekDayLabels", publicName: "weekDayLabels", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", rangeValue: "rangeValueChange" }, host: { listeners: { "document:click": "onDocumentClick($event)", "document:keydown": "onDocumentKeydown($event)", "window:resize": "onWindowResize()" }, properties: { "class.date-picker-host--range": "mode() === 'range'", "class.date-picker-host--open": "isOpen()" } }, ngImport: i0, template: "<div\r\n class=\"date-picker s-date-range-picker\"\r\n [class.date-picker--disabled]=\"disabled()\"\r\n [class.s-date-range-picker--range]=\"mode() === 'range'\"\r\n>\r\n <button\r\n type=\"button\"\r\n class=\"date-picker__trigger s-date-range-picker__trigger\"\r\n [disabled]=\"disabled()\"\r\n (click)=\"toggle()\"\r\n >\r\n <span\r\n class=\"date-picker__value\"\r\n [class.date-picker__value--placeholder]=\"mode() !== 'range' && !displayValue()\"\r\n [class.date-picker__value--range]=\"mode() === 'range'\"\r\n >\r\n @if (mode() === 'range') {\r\n <span class=\"date-picker__range-part\" [class.date-picker__range-part--placeholder]=\"!rangeValue()?.start\">\r\n {{ rangeValue()?.start ? displayValue().split(' ' + rangeSeparator() + ' ')[0] : startPlaceholder() }}\r\n </span>\r\n <span class=\"date-picker__range-separator\">{{ rangeSeparator() }}</span>\r\n <span class=\"date-picker__range-part\" [class.date-picker__range-part--placeholder]=\"!rangeValue()?.end\">\r\n {{ rangeValue()?.end ? displayValue().split(' ' + rangeSeparator() + ' ')[1] : endPlaceholder() }}\r\n </span>\r\n } @else {\r\n {{ displayValue() || placeholder() }}\r\n }\r\n </span>\r\n @if (shouldShowClear()) {\r\n <span\r\n class=\"date-picker__trigger-icon date-picker__trigger-icon--clear\"\r\n role=\"button\"\r\n tabindex=\"-1\"\r\n aria-label=\"\u6E05\u7A7A\u65E5\u671F\"\r\n (click)=\"clearSelection($event)\"\r\n >\r\n <i-lucide [img]=\"clearIcon\" [size]=\"iconSize()\"></i-lucide>\r\n </span>\r\n } @else {\r\n <span class=\"date-picker__trigger-icon\" aria-hidden=\"true\">\r\n <i-lucide [img]=\"calendarIcon\" [size]=\"iconSize()\"></i-lucide>\r\n </span>\r\n }\r\n </button>\r\n\r\n @if (isOpen()) {\r\n <div\r\n class=\"date-picker__panel s-date-range-picker__panel\"\r\n [style.top.px]=\"panelPosition().top\"\r\n [style.left.px]=\"panelPosition().left\"\r\n >\r\n <div class=\"date-picker__header s-date-range-picker__header\">\r\n <button type=\"button\" class=\"date-picker__nav-btn\" (click)=\"prev()\" aria-label=\"\u4E0A\u4E00\u4E2A\u6708\">\r\n <i-lucide [img]=\"prevIcon\"></i-lucide>\r\n </button>\r\n <div class=\"date-picker__title\">{{ title() }}</div>\r\n <button type=\"button\" class=\"date-picker__nav-btn\" (click)=\"next()\" aria-label=\"\u4E0B\u4E00\u4E2A\u6708\">\r\n <i-lucide [img]=\"nextIcon\"></i-lucide>\r\n </button>\r\n </div>\r\n\r\n @if (mode() === 'month') {\r\n <div class=\"date-picker__months\">\r\n @for (cell of monthCells(); track cell.month) {\r\n <button\r\n type=\"button\"\r\n class=\"date-picker__month-cell\"\r\n [class.date-picker__month-cell--selected]=\"isMonthSelected(cell)\"\r\n (click)=\"selectMonth(cell)\"\r\n >\r\n {{ cell.label }}\r\n </button>\r\n }\r\n </div>\r\n } @else if (mode() === 'quarter') {\r\n <div class=\"date-picker__quarters\">\r\n @for (cell of quarterCells(); track cell.quarter) {\r\n <button\r\n type=\"button\"\r\n class=\"date-picker__quarter-cell\"\r\n [class.date-picker__quarter-cell--selected]=\"isQuarterSelected(cell)\"\r\n (click)=\"selectQuarter(cell)\"\r\n >\r\n {{ cell.label }}\r\n </button>\r\n }\r\n </div>\r\n } @else {\r\n <div class=\"date-picker__weekdays s-date-range-picker__week\">\r\n @for (label of weekDayLabels(); track label) {\r\n <div class=\"date-picker__weekday\">{{ label }}</div>\r\n }\r\n </div>\r\n\r\n <div\r\n class=\"date-picker__grid s-date-range-picker__grid\"\r\n [class.date-picker__grid--range-preview]=\"hasRangePreviewEnd()\"\r\n >\r\n @for (row of rows(); track trackByRow($index, row)) {\r\n <div class=\"date-picker__row\" [class.date-picker__row--selected]=\"isWeekSelected(row)\">\r\n @for (cell of row.cells; track trackByIso($index, cell)) {\r\n <button\r\n type=\"button\"\r\n class=\"date-picker__cell s-date-range-picker__cell s-calendar-cell\"\r\n [class.date-picker__cell--muted]=\"!cell.inCurrentMonth\"\r\n [class.date-picker__cell--disabled]=\"cell.isDisabled\"\r\n [class.date-picker__cell--today]=\"isTodayCell(cell)\"\r\n [class.date-picker__cell--selected]=\"isSelected(cell)\"\r\n [class.date-picker__cell--week-anchor]=\"isWeekAnchor(cell)\"\r\n [class.date-picker__cell--range-start]=\"isRangeStart(cell)\"\r\n [class.date-picker__cell--range-end]=\"isRangeEnd(cell)\"\r\n [class.date-picker__cell--range-middle]=\"isRangeInBetween(cell)\"\r\n [class.s-calendar-cell--outside]=\"!cell.inCurrentMonth\"\r\n [class.s-calendar-cell--disabled]=\"cell.isDisabled\"\r\n [class.s-calendar-cell--today]=\"isTodayCell(cell)\"\r\n [class.s-calendar-cell--selected-start]=\"isRangeStart(cell)\"\r\n [class.s-calendar-cell--selected-end]=\"isRangeEnd(cell)\"\r\n [class.s-calendar-cell--in-range]=\"isRangeInBetween(cell)\"\r\n [disabled]=\"cell.isDisabled\"\r\n (click)=\"mode() === 'week' ? selectWeek(row) : selectDate(cell.date)\"\r\n (mouseenter)=\"onCellHover(cell.date)\"\r\n (mouseleave)=\"onCellHover(null)\"\r\n >\r\n <span class=\"date-picker__cell-label\">{{ cell.label }}</span>\r\n </button>\r\n }\r\n </div>\r\n }\r\n </div>\r\n }\r\n\r\n <div class=\"date-picker__footer s-date-range-picker__footer\">\r\n <button type=\"button\" class=\"date-picker__today-btn\" (click)=\"selectToday()\">\r\n {{ todayText() }}\r\n </button>\r\n <div class=\"date-picker__footer-actions\">\r\n <button type=\"button\" class=\"date-picker__footer-btn\" (click)=\"cancel()\">{{ cancelText() }}</button>\r\n <button type=\"button\" class=\"date-picker__footer-btn date-picker__footer-btn--primary\" (click)=\"confirm()\">\r\n {{ confirmText() }}\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n }\r\n</div>\r\n", styles: [":host{position:relative;display:inline-block;width:var(--date-picker-width, var(--platform-control-width, 10rem));min-width:var(--date-picker-min-width, var(--platform-control-width, 10rem));max-width:100%;--date-primary: #0A84FF;--date-primary-hover: #0077E6;--date-primary-active: #006FD6;--date-primary-soft: rgba(10,132,255,.14);--date-primary-hover-soft: rgba(10,132,255,.08);--date-bg: #FFFFFF;--date-trigger-bg: #F8FAFC;--date-border: rgba(60,60,67,.1);--date-border-strong: rgba(60,60,67,.16);--date-text: #111827;--date-text-secondary: rgba(60,60,67,.68);--date-text-muted: rgba(60,60,67,.36);--date-text-disabled: rgba(60,60,67,.22);--date-shadow: 0 12px 32px rgba(0,0,0,.12);--date-trigger-height: 36px;--date-trigger-radius: 10px;--date-trigger-padding-x: 12px;--date-trigger-min-width: 252px;--date-panel-size: 252px;--date-panel-radius: 12px;--date-header-height: 32px;--date-week-height: 24px;--date-grid-height: 140px;--date-footer-height: 44px;--date-cell-height: 28px;--date-cell-dot-size: 28px;--date-button-width: 56px;--date-button-height: 32px;--date-button-radius: 8px;--date-picker-height: var(--date-trigger-height);--date-picker-radius: var(--date-trigger-radius);--date-picker-padding-x: var(--date-trigger-padding-x);--date-picker-indicator-offset: var(--date-trigger-padding-x);--date-picker-panel-padding-x: 12px;--date-picker-range-bg: var(--date-primary-soft);--calendar-selected-bg: var(--date-primary);--calendar-muted-color: rgba(60,60,67,.28)}:host(.date-picker-host--open){z-index:1000}:host([mode=range]),:host(.date-picker-host--range){width:var(--date-picker-range-width, var(--date-trigger-min-width));min-width:var(--date-picker-range-min-width, var(--date-trigger-min-width))}.date-picker{position:relative;display:inline-flex;flex-direction:column;width:100%}.date-picker__trigger,.date-picker__header,.date-picker__weekdays,.date-picker__grid,.date-picker__months,.date-picker__quarters,.date-picker__cell,.date-picker__footer,.date-picker__footer-btn,.date-picker__month-cell,.date-picker__quarter-cell{box-sizing:border-box}.date-picker__trigger{position:relative;width:100%;min-width:0;height:var(--date-picker-height);padding:0 calc(var(--date-picker-indicator-offset) + 20px) 0 var(--date-picker-padding-x);border:1px solid rgba(60,60,67,.14);border-radius:var(--date-picker-radius);background:var(--date-trigger-bg);color:var(--date-text);display:inline-flex;align-items:center;cursor:pointer;transition:border-color .15s ease,background-color .15s ease,box-shadow .15s ease}.date-picker__trigger:hover{background:#fff;border-color:var(--date-border-strong)}.date-picker__trigger:focus-visible{outline:0;border-color:var(--date-primary);box-shadow:0 0 0 3px #0a84ff29}.date-picker__value{flex:1;min-width:0;overflow:hidden;color:var(--date-text);font-size:14px;font-weight:400;line-height:20px;letter-spacing:0;text-align:left;text-overflow:ellipsis;white-space:nowrap}.date-picker__value--placeholder,.date-picker__range-part--placeholder,.date-picker__range-separator{color:var(--date-text-muted)}.date-picker__value--range{display:inline-flex;align-items:center;justify-content:space-between;gap:8px;width:100%;white-space:nowrap}.date-picker__range-part{flex:0 1 auto;min-width:0;overflow:hidden;color:var(--date-text);text-overflow:ellipsis}.date-picker__range-separator{flex:0 0 auto}.date-picker__trigger-icon,.date-picker__nav-btn,.date-picker__weekday,.date-picker__cell,.date-picker__cell-label,.date-picker__month-cell,.date-picker__quarter-cell,.date-picker__footer,.date-picker__today-btn,.date-picker__footer-actions,.date-picker__footer-btn{display:inline-flex;align-items:center;justify-content:center}.date-picker__trigger-icon{position:absolute;top:50%;right:var(--date-picker-indicator-offset);width:16px;height:16px;color:var(--date-text-muted);pointer-events:none;line-height:0;transform:translateY(-50%)}.date-picker__trigger-icon svg{width:12px;height:12px}.date-picker__trigger-icon--clear{pointer-events:auto;color:var(--date-text-secondary);cursor:pointer}.date-picker__trigger-icon--clear:hover{color:var(--date-text)}.date-picker__panel{position:fixed;width:var(--date-panel-size);height:var(--date-panel-size);overflow:hidden;border:1px solid var(--date-border);border-radius:var(--date-panel-radius);background:var(--date-bg);box-shadow:var(--date-shadow);z-index:1000}.date-picker__header,.date-picker__weekdays,.date-picker__grid{padding-right:var(--date-picker-panel-padding-x);padding-left:var(--date-picker-panel-padding-x)}.date-picker__header{display:grid;grid-template-columns:24px minmax(0,1fr) 24px;align-items:center;height:var(--date-header-height)}.date-picker__title{min-width:0;overflow:hidden;color:var(--date-text);font-size:16px;font-weight:600;line-height:22px;text-align:center;text-overflow:ellipsis;white-space:nowrap}.date-picker__nav-btn{width:24px;height:24px;padding:0;border:0;border-radius:6px;background:transparent;color:var(--date-text-secondary);cursor:pointer}.date-picker__nav-btn:hover{background:#3c3c430f;color:var(--date-text)}.date-picker__nav-btn:active{background:#3c3c431a}.date-picker__nav-btn:disabled{opacity:.35;cursor:default}.date-picker__nav-btn i-lucide{display:block}.date-picker__nav-btn svg{display:block;width:14px;height:14px}.date-picker__weekdays{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));height:var(--date-week-height);margin-top:4px}.date-picker__weekday{height:100%;color:var(--date-text-muted);font-size:12px;font-weight:400;line-height:1}.date-picker__grid{display:flex;flex-direction:column;height:var(--date-grid-height);margin-bottom:8px}.date-picker__row{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));flex:1 1 0;min-height:0}.date-picker__row--selected{background:var(--date-picker-range-bg)}.date-picker__cell{position:relative;isolation:isolate;width:100%;height:100%;min-width:0;min-height:0;padding:0;border:0;border-radius:0;background:transparent;color:var(--date-text);font-size:14px;font-weight:400;line-height:1;cursor:pointer}.date-picker__cell:before{content:\"\";position:absolute;top:50%;right:0;left:0;height:min(var(--date-cell-height),100%);background:transparent;transform:translateY(-50%);z-index:0}.date-picker__cell-label{position:relative;z-index:1;height:min(var(--date-cell-dot-size),100%);aspect-ratio:1;border-radius:8px}.date-picker__cell:hover:not(:disabled):not(.date-picker__cell--selected):not(.date-picker__cell--range-start):not(.date-picker__cell--range-end) .date-picker__cell-label{background:var(--date-primary-hover-soft);color:var(--date-primary)}.date-picker__cell--muted{color:var(--calendar-muted-color)}.date-picker__cell--today .date-picker__cell-label,.date-picker__cell--week-anchor .date-picker__cell-label{border-radius:999px;color:var(--date-primary);box-shadow:inset 0 0 0 1px var(--date-primary)}.date-picker__cell--selected .date-picker__cell-label,.date-picker__cell--range-start .date-picker__cell-label,.date-picker__cell--range-end .date-picker__cell-label{border-radius:999px;background:var(--calendar-selected-bg);color:#fff;box-shadow:none}.date-picker__grid--range-preview .date-picker__cell--range-start:before,.date-picker__grid--range-preview .date-picker__cell--range-end:before,.date-picker__cell--range-middle:before{background:var(--date-picker-range-bg)}.date-picker__cell--range-middle{color:var(--date-primary)}.date-picker__grid--range-preview .date-picker__cell--range-start:before{left:50%}.date-picker__grid--range-preview .date-picker__cell--range-end:before{right:50%}.date-picker__cell--disabled,.date-picker__cell:disabled{color:var(--date-text-disabled);cursor:not-allowed}.date-picker__cell--disabled .date-picker__cell-label,.date-picker__cell:disabled .date-picker__cell-label{background:transparent;color:var(--date-text-disabled);box-shadow:none}.date-picker__months,.date-picker__quarters{display:grid;align-content:center;height:calc(var(--date-panel-size) - var(--date-header-height) - var(--date-footer-height));gap:8px;padding:8px var(--date-picker-panel-padding-x)}.date-picker__months{grid-template-columns:repeat(3,minmax(0,1fr))}.date-picker__quarters{grid-template-columns:repeat(4,minmax(0,1fr))}.date-picker__month-cell,.date-picker__quarter-cell{height:32px;padding:0;border:0;background:transparent;color:var(--date-text);font-size:14px;line-height:1;cursor:pointer}.date-picker__month-cell:hover,.date-picker__quarter-cell:hover{background:var(--date-primary-hover-soft);color:var(--date-primary)}.date-picker__month-cell{border-radius:8px}.date-picker__quarter-cell{border-radius:999px}.date-picker__month-cell--selected{background:var(--date-primary-soft);color:var(--date-primary)}.date-picker__quarter-cell--selected{background:var(--date-primary);color:#fff}.date-picker__footer{display:flex;width:100%;height:var(--date-footer-height);padding:0 var(--date-picker-panel-padding-x);border-top:1px solid var(--date-border);justify-content:space-between}.date-picker__today-btn{height:var(--date-button-height);padding:0 8px;border:0;border-radius:var(--date-button-radius);background:transparent;color:var(--date-primary);font-size:14px;font-weight:500;line-height:1;cursor:pointer}.date-picker__today-btn:hover{background:var(--date-primary-hover-soft)}.date-picker__footer-actions{gap:8px}.date-picker__footer-btn{width:var(--date-button-width);height:var(--date-button-height);padding:0;border:1px solid var(--date-border-strong);border-radius:var(--date-button-radius);background:#fff;color:var(--date-text);font-size:14px;font-weight:500;line-height:1;cursor:pointer}.date-picker__footer-btn:hover{background:#f8fafc}.date-picker__footer-btn--primary{border-color:transparent;background:var(--date-primary);color:#fff}.date-picker__footer-btn--primary:hover{background:var(--date-primary-hover)}.date-picker__footer-btn--primary:active{background:var(--date-primary-active)}.date-picker--disabled .date-picker__trigger{opacity:.6;cursor:default;background:var(--date-trigger-bg)}\n"], dependencies: [{ kind: "ngmodule", type: LucideAngularModule }, { kind: "component", type: i1.LucideAngularComponent, selector: "lucide-angular, lucide-icon, i-lucide, span-lucide", inputs: ["class", "name", "img", "color", "absoluteStrokeWidth", "size", "strokeWidth"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
4005
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: DatePicker, isStandalone: true, selector: "s-date-picker", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, rangeValue: { classPropertyName: "rangeValue", publicName: "rangeValue", isSignal: true, isRequired: false, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, rangeSeparator: { classPropertyName: "rangeSeparator", publicName: "rangeSeparator", isSignal: true, isRequired: false, transformFunction: null }, locale: { classPropertyName: "locale", publicName: "locale", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, minDate: { classPropertyName: "minDate", publicName: "minDate", isSignal: true, isRequired: false, transformFunction: null }, maxDate: { classPropertyName: "maxDate", publicName: "maxDate", isSignal: true, isRequired: false, transformFunction: null }, confirmText: { classPropertyName: "confirmText", publicName: "confirmText", isSignal: true, isRequired: false, transformFunction: null }, cancelText: { classPropertyName: "cancelText", publicName: "cancelText", isSignal: true, isRequired: false, transformFunction: null }, todayText: { classPropertyName: "todayText", publicName: "todayText", isSignal: true, isRequired: false, transformFunction: null }, thisYearText: { classPropertyName: "thisYearText", publicName: "thisYearText", isSignal: true, isRequired: false, transformFunction: null }, startPlaceholder: { classPropertyName: "startPlaceholder", publicName: "startPlaceholder", isSignal: true, isRequired: false, transformFunction: null }, endPlaceholder: { classPropertyName: "endPlaceholder", publicName: "endPlaceholder", isSignal: true, isRequired: false, transformFunction: null }, iconSize: { classPropertyName: "iconSize", publicName: "iconSize", isSignal: true, isRequired: false, transformFunction: null }, weekDayLabels: { classPropertyName: "weekDayLabels", publicName: "weekDayLabels", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", rangeValue: "rangeValueChange" }, host: { listeners: { "document:click": "onDocumentClick($event)", "document:keydown": "onDocumentKeydown($event)", "window:resize": "onWindowResize()" }, properties: { "class.date-picker-host--range": "mode() === 'range'", "class.date-picker-host--open": "isOpen()" } }, ngImport: i0, template: "<div\r\n class=\"date-picker s-date-range-picker\"\r\n [class.date-picker--disabled]=\"disabled()\"\r\n [class.s-date-range-picker--range]=\"mode() === 'range'\"\r\n>\r\n <button\r\n type=\"button\"\r\n class=\"date-picker__trigger s-date-range-picker__trigger\"\r\n [disabled]=\"disabled()\"\r\n (click)=\"toggle()\"\r\n >\r\n <span\r\n class=\"date-picker__value\"\r\n [class.date-picker__value--placeholder]=\"mode() !== 'range' && !displayValue()\"\r\n [class.date-picker__value--range]=\"mode() === 'range'\"\r\n >\r\n @if (mode() === 'range') {\r\n <span class=\"date-picker__range-part\" [class.date-picker__range-part--placeholder]=\"!rangeValue()?.start\">\r\n {{ rangeValue()?.start ? displayValue().split(' ' + rangeSeparator() + ' ')[0] : startPlaceholder() }}\r\n </span>\r\n <span class=\"date-picker__range-separator\">{{ rangeSeparator() }}</span>\r\n <span class=\"date-picker__range-part\" [class.date-picker__range-part--placeholder]=\"!rangeValue()?.end\">\r\n {{ rangeValue()?.end ? displayValue().split(' ' + rangeSeparator() + ' ')[1] : endPlaceholder() }}\r\n </span>\r\n } @else {\r\n {{ displayValue() || placeholder() }}\r\n }\r\n </span>\r\n @if (shouldShowClear()) {\r\n <span\r\n class=\"date-picker__trigger-icon date-picker__trigger-icon--clear\"\r\n role=\"button\"\r\n tabindex=\"-1\"\r\n aria-label=\"\u6E05\u7A7A\u65E5\u671F\"\r\n (click)=\"clearSelection($event)\"\r\n >\r\n <i-lucide [img]=\"clearIcon\" [size]=\"iconSize()\"></i-lucide>\r\n </span>\r\n } @else {\r\n <span class=\"date-picker__trigger-icon\" aria-hidden=\"true\">\r\n <i-lucide [img]=\"calendarIcon\" [size]=\"iconSize()\"></i-lucide>\r\n </span>\r\n }\r\n </button>\r\n\r\n @if (isOpen()) {\r\n <div\r\n class=\"date-picker__panel s-date-range-picker__panel\"\r\n [style.top.px]=\"panelPosition().top\"\r\n [style.left.px]=\"panelPosition().left\"\n >\n <div class=\"date-picker__header s-date-range-picker__header\">\n <button type=\"button\" class=\"date-picker__nav-btn\" (click)=\"prev()\" [attr.aria-label]=\"previousPanelLabel()\">\n <i-lucide [img]=\"prevIcon\"></i-lucide>\n </button>\n <div class=\"date-picker__title\">{{ title() }}</div>\n <button type=\"button\" class=\"date-picker__nav-btn\" (click)=\"next()\" [attr.aria-label]=\"nextPanelLabel()\">\n <i-lucide [img]=\"nextIcon\"></i-lucide>\n </button>\n </div>\n\n @if (mode() === 'year') {\n <div class=\"date-picker__years\">\n @for (cell of yearCells(); track cell.year) {\n <button\n type=\"button\"\n class=\"date-picker__year-cell\"\n [class.date-picker__year-cell--selected]=\"isYearSelected(cell)\"\n (click)=\"selectYear(cell)\"\n >\n {{ cell.label }}\n </button>\n }\n </div>\n } @else if (mode() === 'month') {\n <div class=\"date-picker__months\">\n @for (cell of monthCells(); track cell.month) {\n <button\n type=\"button\"\r\n class=\"date-picker__month-cell\"\r\n [class.date-picker__month-cell--selected]=\"isMonthSelected(cell)\"\r\n (click)=\"selectMonth(cell)\"\r\n >\r\n {{ cell.label }}\r\n </button>\r\n }\r\n </div>\r\n } @else if (mode() === 'quarter') {\r\n <div class=\"date-picker__quarters\">\r\n @for (cell of quarterCells(); track cell.quarter) {\r\n <button\r\n type=\"button\"\r\n class=\"date-picker__quarter-cell\"\r\n [class.date-picker__quarter-cell--selected]=\"isQuarterSelected(cell)\"\r\n (click)=\"selectQuarter(cell)\"\r\n >\r\n {{ cell.label }}\r\n </button>\r\n }\r\n </div>\r\n } @else {\r\n <div class=\"date-picker__weekdays s-date-range-picker__week\">\r\n @for (label of weekDayLabels(); track label) {\r\n <div class=\"date-picker__weekday\">{{ label }}</div>\r\n }\r\n </div>\r\n\r\n <div\r\n class=\"date-picker__grid s-date-range-picker__grid\"\r\n [class.date-picker__grid--range-preview]=\"hasRangePreviewEnd()\"\r\n >\r\n @for (row of rows(); track trackByRow($index, row)) {\r\n <div class=\"date-picker__row\" [class.date-picker__row--selected]=\"isWeekSelected(row)\">\r\n @for (cell of row.cells; track trackByIso($index, cell)) {\r\n <button\r\n type=\"button\"\r\n class=\"date-picker__cell s-date-range-picker__cell s-calendar-cell\"\r\n [class.date-picker__cell--muted]=\"!cell.inCurrentMonth\"\r\n [class.date-picker__cell--disabled]=\"cell.isDisabled\"\r\n [class.date-picker__cell--today]=\"isTodayCell(cell)\"\r\n [class.date-picker__cell--selected]=\"isSelected(cell)\"\r\n [class.date-picker__cell--week-anchor]=\"isWeekAnchor(cell)\"\r\n [class.date-picker__cell--range-start]=\"isRangeStart(cell)\"\r\n [class.date-picker__cell--range-end]=\"isRangeEnd(cell)\"\r\n [class.date-picker__cell--range-middle]=\"isRangeInBetween(cell)\"\r\n [class.s-calendar-cell--outside]=\"!cell.inCurrentMonth\"\r\n [class.s-calendar-cell--disabled]=\"cell.isDisabled\"\r\n [class.s-calendar-cell--today]=\"isTodayCell(cell)\"\r\n [class.s-calendar-cell--selected-start]=\"isRangeStart(cell)\"\r\n [class.s-calendar-cell--selected-end]=\"isRangeEnd(cell)\"\r\n [class.s-calendar-cell--in-range]=\"isRangeInBetween(cell)\"\r\n [disabled]=\"cell.isDisabled\"\r\n (click)=\"mode() === 'week' ? selectWeek(row) : selectDate(cell.date)\"\r\n (mouseenter)=\"onCellHover(cell.date)\"\r\n (mouseleave)=\"onCellHover(null)\"\r\n >\r\n <span class=\"date-picker__cell-label\">{{ cell.label }}</span>\r\n </button>\r\n }\r\n </div>\r\n }\r\n </div>\r\n }\r\n\n <div class=\"date-picker__footer s-date-range-picker__footer\">\n <button type=\"button\" class=\"date-picker__today-btn\" (click)=\"selectShortcut()\">\n {{ shortcutText() }}\n </button>\n <div class=\"date-picker__footer-actions\">\n <button type=\"button\" class=\"date-picker__footer-btn\" (click)=\"cancel()\">{{ cancelText() }}</button>\r\n <button type=\"button\" class=\"date-picker__footer-btn date-picker__footer-btn--primary\" (click)=\"confirm()\">\r\n {{ confirmText() }}\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n }\r\n</div>\r\n", styles: [":host{position:relative;display:inline-block;width:var(--date-picker-width, var(--platform-control-width, 10rem));min-width:var(--date-picker-min-width, var(--platform-control-width, 10rem));max-width:100%;--date-primary: var(--color-primary, #0A84FF);--date-primary-hover: var(--color-primary-hover, #0077E6);--date-primary-active: var(--color-primary-active, #006FD6);--date-primary-soft: var(--calendar-range-bg, rgba(10,132,255,.14));--date-primary-hover-soft: var(--button-primary-soft-bg-hover, rgba(10,132,255,.08));--date-bg: var(--color-surface, #FFFFFF);--date-trigger-bg: var(--platform-control-bg, var(--input-bg, #FFFFFF));--date-border: var(--platform-control-border, var(--input-border, rgba(60,60,67,.1)));--date-border-strong: var(--platform-control-border-hover, var(--input-hover-border, rgba(60,60,67,.16)));--date-text: var(--platform-control-color, var(--input-text, #111827));--date-text-secondary: var(--color-text-secondary, rgba(60,60,67,.68));--date-text-muted: var(--platform-control-placeholder, var(--input-placeholder, rgba(60,60,67,.36)));--date-text-disabled: var(--platform-control-disabled-color, var(--input-disabled-text, rgba(60,60,67,.22)));--date-shadow: var(--shadow-common-l, 0 12px 32px rgba(0,0,0,.12));--date-trigger-height: var(--platform-control-height, var(--input-height, 32px));--date-trigger-radius: var(--platform-control-radius, var(--input-radius, 8px));--date-trigger-padding-x: var(--platform-control-padding-x, var(--input-padding-x, 12px));--date-trigger-min-width: var(--platform-control-range-width, 15rem);--date-panel-size: 252px;--date-panel-radius: 12px;--date-header-height: 32px;--date-week-height: 24px;--date-grid-height: 140px;--date-footer-height: 44px;--date-cell-height: 28px;--date-cell-dot-size: 28px;--date-button-width: 56px;--date-button-height: 32px;--date-button-radius: 8px;--date-picker-height: var(--date-trigger-height);--date-picker-radius: var(--date-trigger-radius);--date-picker-padding-x: var(--date-trigger-padding-x);--date-picker-indicator-offset: var(--date-trigger-padding-x);--date-picker-panel-padding-x: 12px;--date-picker-range-bg: var(--date-primary-soft);--calendar-selected-bg: var(--date-primary);--calendar-muted-color: rgba(60,60,67,.28)}:host(.date-picker-host--open){z-index:1000}:host([mode=range]),:host(.date-picker-host--range){width:var(--date-picker-range-width, var(--date-trigger-min-width));min-width:var(--date-picker-range-min-width, var(--date-trigger-min-width))}.date-picker{position:relative;display:inline-flex;flex-direction:column;width:100%}.date-picker__trigger,.date-picker__header,.date-picker__weekdays,.date-picker__grid,.date-picker__years,.date-picker__months,.date-picker__quarters,.date-picker__cell,.date-picker__footer,.date-picker__footer-btn,.date-picker__year-cell,.date-picker__month-cell,.date-picker__quarter-cell{box-sizing:border-box}.date-picker__trigger{position:relative;width:100%;min-width:0;height:var(--date-picker-height);padding:0 calc(var(--date-picker-indicator-offset) + 20px) 0 var(--date-picker-padding-x);border:1px solid var(--date-border);border-radius:var(--date-picker-radius);background:var(--date-trigger-bg);color:var(--date-text);display:inline-flex;align-items:center;cursor:pointer;transition:border-color .15s ease,background-color .15s ease,box-shadow .15s ease}.date-picker__trigger:hover{background:var(--platform-control-bg-hover, var(--date-bg));border-color:var(--date-border-strong)}.date-picker__trigger:focus-visible{outline:0;border-color:var(--platform-control-focus, var(--date-primary));box-shadow:0 0 0 2px var(--platform-control-focus-ring, rgba(10, 132, 255, .16))}.date-picker__value{flex:1;min-width:0;overflow:hidden;color:var(--date-text);font-size:var(--platform-control-font-size, var(--input-font-size, 13px));font-weight:400;line-height:var(--platform-control-line-height, 20px);letter-spacing:0;text-align:left;text-overflow:ellipsis;white-space:nowrap}.date-picker__value--placeholder,.date-picker__range-separator{color:var(--date-text-muted)}.date-picker__value--range{display:inline-flex;align-items:center;justify-content:space-between;gap:8px;width:100%;white-space:nowrap}.date-picker__range-part{flex:0 1 auto;min-width:0;overflow:hidden;color:var(--date-text);text-overflow:ellipsis}.date-picker__range-part--placeholder{color:var(--date-text-muted)}.date-picker__range-separator{flex:0 0 auto}.date-picker__trigger-icon,.date-picker__nav-btn,.date-picker__weekday,.date-picker__cell,.date-picker__cell-label,.date-picker__year-cell,.date-picker__month-cell,.date-picker__quarter-cell,.date-picker__footer,.date-picker__today-btn,.date-picker__footer-actions,.date-picker__footer-btn{display:inline-flex;align-items:center;justify-content:center}.date-picker__trigger-icon{position:absolute;top:50%;right:var(--date-picker-indicator-offset);width:16px;height:16px;color:var(--date-text-muted);pointer-events:none;line-height:0;transform:translateY(-50%)}.date-picker__trigger-icon svg{width:12px;height:12px}.date-picker__trigger-icon--clear{pointer-events:auto;color:var(--date-text-secondary);cursor:pointer}.date-picker__trigger-icon--clear:hover{color:var(--date-text)}.date-picker__panel{position:fixed;width:var(--date-panel-size);height:var(--date-panel-size);overflow:hidden;border:1px solid var(--date-border);border-radius:var(--date-panel-radius);background:var(--date-bg);box-shadow:var(--date-shadow);z-index:1000}.date-picker__header,.date-picker__weekdays,.date-picker__grid{padding-right:var(--date-picker-panel-padding-x);padding-left:var(--date-picker-panel-padding-x)}.date-picker__header{display:grid;grid-template-columns:24px minmax(0,1fr) 24px;align-items:center;height:var(--date-header-height)}.date-picker__title{min-width:0;overflow:hidden;color:var(--date-text);font-size:16px;font-weight:600;line-height:22px;text-align:center;text-overflow:ellipsis;white-space:nowrap}.date-picker__nav-btn{width:24px;height:24px;padding:0;border:0;border-radius:6px;background:transparent;color:var(--date-text-secondary);cursor:pointer}.date-picker__nav-btn:hover{background:#3c3c430f;color:var(--date-text)}.date-picker__nav-btn:active{background:#3c3c431a}.date-picker__nav-btn:disabled{opacity:.35;cursor:default}.date-picker__nav-btn i-lucide{display:block}.date-picker__nav-btn svg{display:block;width:14px;height:14px}.date-picker__weekdays{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));height:var(--date-week-height);margin-top:4px}.date-picker__weekday{height:100%;color:var(--date-text-muted);font-size:12px;font-weight:400;line-height:1}.date-picker__grid{display:flex;flex-direction:column;height:var(--date-grid-height);margin-bottom:8px}.date-picker__row{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));flex:1 1 0;min-height:0}.date-picker__row--selected{background:var(--date-picker-range-bg)}.date-picker__cell{position:relative;isolation:isolate;width:100%;height:100%;min-width:0;min-height:0;padding:0;border:0;border-radius:0;background:transparent;color:var(--date-text);font-size:14px;font-weight:400;line-height:1;cursor:pointer}.date-picker__cell:before{content:\"\";position:absolute;top:50%;right:0;left:0;height:min(var(--date-cell-height),100%);background:transparent;transform:translateY(-50%);z-index:0}.date-picker__cell-label{position:relative;z-index:1;height:min(var(--date-cell-dot-size),100%);aspect-ratio:1;border-radius:8px}.date-picker__cell:hover:not(:disabled):not(.date-picker__cell--selected):not(.date-picker__cell--range-start):not(.date-picker__cell--range-end) .date-picker__cell-label{background:var(--date-primary-hover-soft);color:var(--date-primary)}.date-picker__cell--muted{color:var(--calendar-muted-color)}.date-picker__cell--today .date-picker__cell-label,.date-picker__cell--week-anchor .date-picker__cell-label{border-radius:999px;color:var(--date-primary);box-shadow:inset 0 0 0 1px var(--date-primary)}.date-picker__cell--selected .date-picker__cell-label,.date-picker__cell--range-start .date-picker__cell-label,.date-picker__cell--range-end .date-picker__cell-label{border-radius:999px;background:var(--calendar-selected-bg);color:#fff;box-shadow:none}.date-picker__grid--range-preview .date-picker__cell--range-start:before,.date-picker__grid--range-preview .date-picker__cell--range-end:before,.date-picker__cell--range-middle:before{background:var(--date-picker-range-bg)}.date-picker__cell--range-middle{color:var(--date-primary)}.date-picker__grid--range-preview .date-picker__cell--range-start:before{left:50%}.date-picker__grid--range-preview .date-picker__cell--range-end:before{right:50%}.date-picker__cell--disabled,.date-picker__cell:disabled{color:var(--date-text-disabled);cursor:not-allowed}.date-picker__cell--disabled .date-picker__cell-label,.date-picker__cell:disabled .date-picker__cell-label{background:transparent;color:var(--date-text-disabled);box-shadow:none}.date-picker__years,.date-picker__months,.date-picker__quarters{display:grid;align-content:center;height:calc(var(--date-panel-size) - var(--date-header-height) - var(--date-footer-height));gap:8px;padding:8px var(--date-picker-panel-padding-x)}.date-picker__years,.date-picker__months{grid-template-columns:repeat(3,minmax(0,1fr))}.date-picker__quarters{grid-template-columns:repeat(4,minmax(0,1fr))}.date-picker__year-cell,.date-picker__month-cell,.date-picker__quarter-cell{height:32px;padding:0;border:0;background:transparent;color:var(--date-text);font-size:14px;line-height:1;cursor:pointer}.date-picker__year-cell:hover,.date-picker__month-cell:hover,.date-picker__quarter-cell:hover{background:var(--date-primary-hover-soft);color:var(--date-primary)}.date-picker__year-cell,.date-picker__month-cell{border-radius:8px}.date-picker__quarter-cell{border-radius:999px}.date-picker__year-cell--selected{background:var(--date-primary);color:#fff}.date-picker__month-cell--selected{background:var(--date-primary-soft);color:var(--date-primary)}.date-picker__quarter-cell--selected{background:var(--date-primary);color:#fff}.date-picker__footer{display:flex;width:100%;height:var(--date-footer-height);padding:0 var(--date-picker-panel-padding-x);border-top:1px solid var(--date-border);justify-content:space-between}.date-picker__today-btn{height:var(--date-button-height);padding:0 8px;border:0;border-radius:var(--date-button-radius);background:transparent;color:var(--date-primary);font-size:14px;font-weight:500;line-height:1;cursor:pointer}.date-picker__today-btn:hover{background:var(--date-primary-hover-soft)}.date-picker__footer-actions{gap:8px}.date-picker__footer-btn{width:var(--date-button-width);height:var(--date-button-height);padding:0;border:1px solid var(--date-border-strong);border-radius:var(--date-button-radius);background:#fff;color:var(--date-text);font-size:14px;font-weight:500;line-height:1;cursor:pointer}.date-picker__footer-btn:hover{background:#f8fafc}.date-picker__footer-btn--primary{border-color:transparent;background:var(--date-primary);color:#fff}.date-picker__footer-btn--primary:hover{background:var(--date-primary-hover)}.date-picker__footer-btn--primary:active{background:var(--date-primary-active)}.date-picker--disabled .date-picker__trigger{opacity:.6;cursor:default;background:var(--date-trigger-bg)}\n"], dependencies: [{ kind: "ngmodule", type: LucideAngularModule }, { kind: "component", type: i1.LucideAngularComponent, selector: "lucide-angular, lucide-icon, i-lucide, span-lucide", inputs: ["class", "name", "img", "color", "absoluteStrokeWidth", "size", "strokeWidth"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3332
4006
|
}
|
|
3333
4007
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: DatePicker, decorators: [{
|
|
3334
4008
|
type: Component,
|
|
@@ -3338,16 +4012,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
|
|
|
3338
4012
|
'(window:resize)': 'onWindowResize()',
|
|
3339
4013
|
'[class.date-picker-host--range]': "mode() === 'range'",
|
|
3340
4014
|
'[class.date-picker-host--open]': 'isOpen()',
|
|
3341
|
-
}, template: "<div\r\n class=\"date-picker s-date-range-picker\"\r\n [class.date-picker--disabled]=\"disabled()\"\r\n [class.s-date-range-picker--range]=\"mode() === 'range'\"\r\n>\r\n <button\r\n type=\"button\"\r\n class=\"date-picker__trigger s-date-range-picker__trigger\"\r\n [disabled]=\"disabled()\"\r\n (click)=\"toggle()\"\r\n >\r\n <span\r\n class=\"date-picker__value\"\r\n [class.date-picker__value--placeholder]=\"mode() !== 'range' && !displayValue()\"\r\n [class.date-picker__value--range]=\"mode() === 'range'\"\r\n >\r\n @if (mode() === 'range') {\r\n <span class=\"date-picker__range-part\" [class.date-picker__range-part--placeholder]=\"!rangeValue()?.start\">\r\n {{ rangeValue()?.start ? displayValue().split(' ' + rangeSeparator() + ' ')[0] : startPlaceholder() }}\r\n </span>\r\n <span class=\"date-picker__range-separator\">{{ rangeSeparator() }}</span>\r\n <span class=\"date-picker__range-part\" [class.date-picker__range-part--placeholder]=\"!rangeValue()?.end\">\r\n {{ rangeValue()?.end ? displayValue().split(' ' + rangeSeparator() + ' ')[1] : endPlaceholder() }}\r\n </span>\r\n } @else {\r\n {{ displayValue() || placeholder() }}\r\n }\r\n </span>\r\n @if (shouldShowClear()) {\r\n <span\r\n class=\"date-picker__trigger-icon date-picker__trigger-icon--clear\"\r\n role=\"button\"\r\n tabindex=\"-1\"\r\n aria-label=\"\u6E05\u7A7A\u65E5\u671F\"\r\n (click)=\"clearSelection($event)\"\r\n >\r\n <i-lucide [img]=\"clearIcon\" [size]=\"iconSize()\"></i-lucide>\r\n </span>\r\n } @else {\r\n <span class=\"date-picker__trigger-icon\" aria-hidden=\"true\">\r\n <i-lucide [img]=\"calendarIcon\" [size]=\"iconSize()\"></i-lucide>\r\n </span>\r\n }\r\n </button>\r\n\r\n @if (isOpen()) {\r\n <div\r\n class=\"date-picker__panel s-date-range-picker__panel\"\r\n [style.top.px]=\"panelPosition().top\"\r\n [style.left.px]=\"panelPosition().left\"\r\n >\r\n <div class=\"date-picker__header s-date-range-picker__header\">\r\n <button type=\"button\" class=\"date-picker__nav-btn\" (click)=\"prev()\" aria-label=\"\u4E0A\u4E00\u4E2A\u6708\">\r\n <i-lucide [img]=\"prevIcon\"></i-lucide>\r\n </button>\r\n <div class=\"date-picker__title\">{{ title() }}</div>\r\n <button type=\"button\" class=\"date-picker__nav-btn\" (click)=\"next()\" aria-label=\"\u4E0B\u4E00\u4E2A\u6708\">\r\n <i-lucide [img]=\"nextIcon\"></i-lucide>\r\n </button>\r\n </div>\r\n\r\n @if (mode() === 'month') {\r\n <div class=\"date-picker__months\">\r\n @for (cell of monthCells(); track cell.month) {\r\n <button\r\n type=\"button\"\r\n class=\"date-picker__month-cell\"\r\n [class.date-picker__month-cell--selected]=\"isMonthSelected(cell)\"\r\n (click)=\"selectMonth(cell)\"\r\n >\r\n {{ cell.label }}\r\n </button>\r\n }\r\n </div>\r\n } @else if (mode() === 'quarter') {\r\n <div class=\"date-picker__quarters\">\r\n @for (cell of quarterCells(); track cell.quarter) {\r\n <button\r\n type=\"button\"\r\n class=\"date-picker__quarter-cell\"\r\n [class.date-picker__quarter-cell--selected]=\"isQuarterSelected(cell)\"\r\n (click)=\"selectQuarter(cell)\"\r\n >\r\n {{ cell.label }}\r\n </button>\r\n }\r\n </div>\r\n } @else {\r\n <div class=\"date-picker__weekdays s-date-range-picker__week\">\r\n @for (label of weekDayLabels(); track label) {\r\n <div class=\"date-picker__weekday\">{{ label }}</div>\r\n }\r\n </div>\r\n\r\n <div\r\n class=\"date-picker__grid s-date-range-picker__grid\"\r\n [class.date-picker__grid--range-preview]=\"hasRangePreviewEnd()\"\r\n >\r\n @for (row of rows(); track trackByRow($index, row)) {\r\n <div class=\"date-picker__row\" [class.date-picker__row--selected]=\"isWeekSelected(row)\">\r\n @for (cell of row.cells; track trackByIso($index, cell)) {\r\n <button\r\n type=\"button\"\r\n class=\"date-picker__cell s-date-range-picker__cell s-calendar-cell\"\r\n [class.date-picker__cell--muted]=\"!cell.inCurrentMonth\"\r\n [class.date-picker__cell--disabled]=\"cell.isDisabled\"\r\n [class.date-picker__cell--today]=\"isTodayCell(cell)\"\r\n [class.date-picker__cell--selected]=\"isSelected(cell)\"\r\n [class.date-picker__cell--week-anchor]=\"isWeekAnchor(cell)\"\r\n [class.date-picker__cell--range-start]=\"isRangeStart(cell)\"\r\n [class.date-picker__cell--range-end]=\"isRangeEnd(cell)\"\r\n [class.date-picker__cell--range-middle]=\"isRangeInBetween(cell)\"\r\n [class.s-calendar-cell--outside]=\"!cell.inCurrentMonth\"\r\n [class.s-calendar-cell--disabled]=\"cell.isDisabled\"\r\n [class.s-calendar-cell--today]=\"isTodayCell(cell)\"\r\n [class.s-calendar-cell--selected-start]=\"isRangeStart(cell)\"\r\n [class.s-calendar-cell--selected-end]=\"isRangeEnd(cell)\"\r\n [class.s-calendar-cell--in-range]=\"isRangeInBetween(cell)\"\r\n [disabled]=\"cell.isDisabled\"\r\n (click)=\"mode() === 'week' ? selectWeek(row) : selectDate(cell.date)\"\r\n (mouseenter)=\"onCellHover(cell.date)\"\r\n (mouseleave)=\"onCellHover(null)\"\r\n >\r\n <span class=\"date-picker__cell-label\">{{ cell.label }}</span>\r\n </button>\r\n }\r\n </div>\r\n }\r\n </div>\r\n }\r\n\r\n <div class=\"date-picker__footer s-date-range-picker__footer\">\r\n <button type=\"button\" class=\"date-picker__today-btn\" (click)=\"selectToday()\">\r\n {{ todayText() }}\r\n </button>\r\n <div class=\"date-picker__footer-actions\">\r\n <button type=\"button\" class=\"date-picker__footer-btn\" (click)=\"cancel()\">{{ cancelText() }}</button>\r\n <button type=\"button\" class=\"date-picker__footer-btn date-picker__footer-btn--primary\" (click)=\"confirm()\">\r\n {{ confirmText() }}\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n }\r\n</div>\r\n", styles: [":host{position:relative;display:inline-block;width:var(--date-picker-width, var(--platform-control-width, 10rem));min-width:var(--date-picker-min-width, var(--platform-control-width, 10rem));max-width:100%;--date-primary: #0A84FF;--date-primary-hover: #0077E6;--date-primary-active: #006FD6;--date-primary-soft: rgba(10,132,255,.14);--date-primary-hover-soft: rgba(10,132,255,.08);--date-bg: #FFFFFF;--date-trigger-bg: #F8FAFC;--date-border: rgba(60,60,67,.1);--date-border-strong: rgba(60,60,67,.16);--date-text: #111827;--date-text-secondary: rgba(60,60,67,.68);--date-text-muted: rgba(60,60,67,.36);--date-text-disabled: rgba(60,60,67,.22);--date-shadow: 0 12px 32px rgba(0,0,0,.12);--date-trigger-height: 36px;--date-trigger-radius: 10px;--date-trigger-padding-x: 12px;--date-trigger-min-width: 252px;--date-panel-size: 252px;--date-panel-radius: 12px;--date-header-height: 32px;--date-week-height: 24px;--date-grid-height: 140px;--date-footer-height: 44px;--date-cell-height: 28px;--date-cell-dot-size: 28px;--date-button-width: 56px;--date-button-height: 32px;--date-button-radius: 8px;--date-picker-height: var(--date-trigger-height);--date-picker-radius: var(--date-trigger-radius);--date-picker-padding-x: var(--date-trigger-padding-x);--date-picker-indicator-offset: var(--date-trigger-padding-x);--date-picker-panel-padding-x: 12px;--date-picker-range-bg: var(--date-primary-soft);--calendar-selected-bg: var(--date-primary);--calendar-muted-color: rgba(60,60,67,.28)}:host(.date-picker-host--open){z-index:1000}:host([mode=range]),:host(.date-picker-host--range){width:var(--date-picker-range-width, var(--date-trigger-min-width));min-width:var(--date-picker-range-min-width, var(--date-trigger-min-width))}.date-picker{position:relative;display:inline-flex;flex-direction:column;width:100%}.date-picker__trigger,.date-picker__header,.date-picker__weekdays,.date-picker__grid,.date-picker__months,.date-picker__quarters,.date-picker__cell,.date-picker__footer,.date-picker__footer-btn,.date-picker__month-cell,.date-picker__quarter-cell{box-sizing:border-box}.date-picker__trigger{position:relative;width:100%;min-width:0;height:var(--date-picker-height);padding:0 calc(var(--date-picker-indicator-offset) + 20px) 0 var(--date-picker-padding-x);border:1px solid rgba(60,60,67,.14);border-radius:var(--date-picker-radius);background:var(--date-trigger-bg);color:var(--date-text);display:inline-flex;align-items:center;cursor:pointer;transition:border-color .15s ease,background-color .15s ease,box-shadow .15s ease}.date-picker__trigger:hover{background:#fff;border-color:var(--date-border-strong)}.date-picker__trigger:focus-visible{outline:0;border-color:var(--date-primary);box-shadow:0 0 0 3px #0a84ff29}.date-picker__value{flex:1;min-width:0;overflow:hidden;color:var(--date-text);font-size:14px;font-weight:400;line-height:20px;letter-spacing:0;text-align:left;text-overflow:ellipsis;white-space:nowrap}.date-picker__value--placeholder,.date-picker__range-part--placeholder,.date-picker__range-separator{color:var(--date-text-muted)}.date-picker__value--range{display:inline-flex;align-items:center;justify-content:space-between;gap:8px;width:100%;white-space:nowrap}.date-picker__range-part{flex:0 1 auto;min-width:0;overflow:hidden;color:var(--date-text);text-overflow:ellipsis}.date-picker__range-separator{flex:0 0 auto}.date-picker__trigger-icon,.date-picker__nav-btn,.date-picker__weekday,.date-picker__cell,.date-picker__cell-label,.date-picker__month-cell,.date-picker__quarter-cell,.date-picker__footer,.date-picker__today-btn,.date-picker__footer-actions,.date-picker__footer-btn{display:inline-flex;align-items:center;justify-content:center}.date-picker__trigger-icon{position:absolute;top:50%;right:var(--date-picker-indicator-offset);width:16px;height:16px;color:var(--date-text-muted);pointer-events:none;line-height:0;transform:translateY(-50%)}.date-picker__trigger-icon svg{width:12px;height:12px}.date-picker__trigger-icon--clear{pointer-events:auto;color:var(--date-text-secondary);cursor:pointer}.date-picker__trigger-icon--clear:hover{color:var(--date-text)}.date-picker__panel{position:fixed;width:var(--date-panel-size);height:var(--date-panel-size);overflow:hidden;border:1px solid var(--date-border);border-radius:var(--date-panel-radius);background:var(--date-bg);box-shadow:var(--date-shadow);z-index:1000}.date-picker__header,.date-picker__weekdays,.date-picker__grid{padding-right:var(--date-picker-panel-padding-x);padding-left:var(--date-picker-panel-padding-x)}.date-picker__header{display:grid;grid-template-columns:24px minmax(0,1fr) 24px;align-items:center;height:var(--date-header-height)}.date-picker__title{min-width:0;overflow:hidden;color:var(--date-text);font-size:16px;font-weight:600;line-height:22px;text-align:center;text-overflow:ellipsis;white-space:nowrap}.date-picker__nav-btn{width:24px;height:24px;padding:0;border:0;border-radius:6px;background:transparent;color:var(--date-text-secondary);cursor:pointer}.date-picker__nav-btn:hover{background:#3c3c430f;color:var(--date-text)}.date-picker__nav-btn:active{background:#3c3c431a}.date-picker__nav-btn:disabled{opacity:.35;cursor:default}.date-picker__nav-btn i-lucide{display:block}.date-picker__nav-btn svg{display:block;width:14px;height:14px}.date-picker__weekdays{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));height:var(--date-week-height);margin-top:4px}.date-picker__weekday{height:100%;color:var(--date-text-muted);font-size:12px;font-weight:400;line-height:1}.date-picker__grid{display:flex;flex-direction:column;height:var(--date-grid-height);margin-bottom:8px}.date-picker__row{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));flex:1 1 0;min-height:0}.date-picker__row--selected{background:var(--date-picker-range-bg)}.date-picker__cell{position:relative;isolation:isolate;width:100%;height:100%;min-width:0;min-height:0;padding:0;border:0;border-radius:0;background:transparent;color:var(--date-text);font-size:14px;font-weight:400;line-height:1;cursor:pointer}.date-picker__cell:before{content:\"\";position:absolute;top:50%;right:0;left:0;height:min(var(--date-cell-height),100%);background:transparent;transform:translateY(-50%);z-index:0}.date-picker__cell-label{position:relative;z-index:1;height:min(var(--date-cell-dot-size),100%);aspect-ratio:1;border-radius:8px}.date-picker__cell:hover:not(:disabled):not(.date-picker__cell--selected):not(.date-picker__cell--range-start):not(.date-picker__cell--range-end) .date-picker__cell-label{background:var(--date-primary-hover-soft);color:var(--date-primary)}.date-picker__cell--muted{color:var(--calendar-muted-color)}.date-picker__cell--today .date-picker__cell-label,.date-picker__cell--week-anchor .date-picker__cell-label{border-radius:999px;color:var(--date-primary);box-shadow:inset 0 0 0 1px var(--date-primary)}.date-picker__cell--selected .date-picker__cell-label,.date-picker__cell--range-start .date-picker__cell-label,.date-picker__cell--range-end .date-picker__cell-label{border-radius:999px;background:var(--calendar-selected-bg);color:#fff;box-shadow:none}.date-picker__grid--range-preview .date-picker__cell--range-start:before,.date-picker__grid--range-preview .date-picker__cell--range-end:before,.date-picker__cell--range-middle:before{background:var(--date-picker-range-bg)}.date-picker__cell--range-middle{color:var(--date-primary)}.date-picker__grid--range-preview .date-picker__cell--range-start:before{left:50%}.date-picker__grid--range-preview .date-picker__cell--range-end:before{right:50%}.date-picker__cell--disabled,.date-picker__cell:disabled{color:var(--date-text-disabled);cursor:not-allowed}.date-picker__cell--disabled .date-picker__cell-label,.date-picker__cell:disabled .date-picker__cell-label{background:transparent;color:var(--date-text-disabled);box-shadow:none}.date-picker__months,.date-picker__quarters{display:grid;align-content:center;height:calc(var(--date-panel-size) - var(--date-header-height) - var(--date-footer-height));gap:8px;padding:8px var(--date-picker-panel-padding-x)}.date-picker__months{grid-template-columns:repeat(3,minmax(0,1fr))}.date-picker__quarters{grid-template-columns:repeat(4,minmax(0,1fr))}.date-picker__month-cell,.date-picker__quarter-cell{height:32px;padding:0;border:0;background:transparent;color:var(--date-text);font-size:14px;line-height:1;cursor:pointer}.date-picker__month-cell:hover,.date-picker__quarter-cell:hover{background:var(--date-primary-hover-soft);color:var(--date-primary)}.date-picker__month-cell{border-radius:8px}.date-picker__quarter-cell{border-radius:999px}.date-picker__month-cell--selected{background:var(--date-primary-soft);color:var(--date-primary)}.date-picker__quarter-cell--selected{background:var(--date-primary);color:#fff}.date-picker__footer{display:flex;width:100%;height:var(--date-footer-height);padding:0 var(--date-picker-panel-padding-x);border-top:1px solid var(--date-border);justify-content:space-between}.date-picker__today-btn{height:var(--date-button-height);padding:0 8px;border:0;border-radius:var(--date-button-radius);background:transparent;color:var(--date-primary);font-size:14px;font-weight:500;line-height:1;cursor:pointer}.date-picker__today-btn:hover{background:var(--date-primary-hover-soft)}.date-picker__footer-actions{gap:8px}.date-picker__footer-btn{width:var(--date-button-width);height:var(--date-button-height);padding:0;border:1px solid var(--date-border-strong);border-radius:var(--date-button-radius);background:#fff;color:var(--date-text);font-size:14px;font-weight:500;line-height:1;cursor:pointer}.date-picker__footer-btn:hover{background:#f8fafc}.date-picker__footer-btn--primary{border-color:transparent;background:var(--date-primary);color:#fff}.date-picker__footer-btn--primary:hover{background:var(--date-primary-hover)}.date-picker__footer-btn--primary:active{background:var(--date-primary-active)}.date-picker--disabled .date-picker__trigger{opacity:.6;cursor:default;background:var(--date-trigger-bg)}\n"] }]
|
|
4015
|
+
}, template: "<div\r\n class=\"date-picker s-date-range-picker\"\r\n [class.date-picker--disabled]=\"disabled()\"\r\n [class.s-date-range-picker--range]=\"mode() === 'range'\"\r\n>\r\n <button\r\n type=\"button\"\r\n class=\"date-picker__trigger s-date-range-picker__trigger\"\r\n [disabled]=\"disabled()\"\r\n (click)=\"toggle()\"\r\n >\r\n <span\r\n class=\"date-picker__value\"\r\n [class.date-picker__value--placeholder]=\"mode() !== 'range' && !displayValue()\"\r\n [class.date-picker__value--range]=\"mode() === 'range'\"\r\n >\r\n @if (mode() === 'range') {\r\n <span class=\"date-picker__range-part\" [class.date-picker__range-part--placeholder]=\"!rangeValue()?.start\">\r\n {{ rangeValue()?.start ? displayValue().split(' ' + rangeSeparator() + ' ')[0] : startPlaceholder() }}\r\n </span>\r\n <span class=\"date-picker__range-separator\">{{ rangeSeparator() }}</span>\r\n <span class=\"date-picker__range-part\" [class.date-picker__range-part--placeholder]=\"!rangeValue()?.end\">\r\n {{ rangeValue()?.end ? displayValue().split(' ' + rangeSeparator() + ' ')[1] : endPlaceholder() }}\r\n </span>\r\n } @else {\r\n {{ displayValue() || placeholder() }}\r\n }\r\n </span>\r\n @if (shouldShowClear()) {\r\n <span\r\n class=\"date-picker__trigger-icon date-picker__trigger-icon--clear\"\r\n role=\"button\"\r\n tabindex=\"-1\"\r\n aria-label=\"\u6E05\u7A7A\u65E5\u671F\"\r\n (click)=\"clearSelection($event)\"\r\n >\r\n <i-lucide [img]=\"clearIcon\" [size]=\"iconSize()\"></i-lucide>\r\n </span>\r\n } @else {\r\n <span class=\"date-picker__trigger-icon\" aria-hidden=\"true\">\r\n <i-lucide [img]=\"calendarIcon\" [size]=\"iconSize()\"></i-lucide>\r\n </span>\r\n }\r\n </button>\r\n\r\n @if (isOpen()) {\r\n <div\r\n class=\"date-picker__panel s-date-range-picker__panel\"\r\n [style.top.px]=\"panelPosition().top\"\r\n [style.left.px]=\"panelPosition().left\"\n >\n <div class=\"date-picker__header s-date-range-picker__header\">\n <button type=\"button\" class=\"date-picker__nav-btn\" (click)=\"prev()\" [attr.aria-label]=\"previousPanelLabel()\">\n <i-lucide [img]=\"prevIcon\"></i-lucide>\n </button>\n <div class=\"date-picker__title\">{{ title() }}</div>\n <button type=\"button\" class=\"date-picker__nav-btn\" (click)=\"next()\" [attr.aria-label]=\"nextPanelLabel()\">\n <i-lucide [img]=\"nextIcon\"></i-lucide>\n </button>\n </div>\n\n @if (mode() === 'year') {\n <div class=\"date-picker__years\">\n @for (cell of yearCells(); track cell.year) {\n <button\n type=\"button\"\n class=\"date-picker__year-cell\"\n [class.date-picker__year-cell--selected]=\"isYearSelected(cell)\"\n (click)=\"selectYear(cell)\"\n >\n {{ cell.label }}\n </button>\n }\n </div>\n } @else if (mode() === 'month') {\n <div class=\"date-picker__months\">\n @for (cell of monthCells(); track cell.month) {\n <button\n type=\"button\"\r\n class=\"date-picker__month-cell\"\r\n [class.date-picker__month-cell--selected]=\"isMonthSelected(cell)\"\r\n (click)=\"selectMonth(cell)\"\r\n >\r\n {{ cell.label }}\r\n </button>\r\n }\r\n </div>\r\n } @else if (mode() === 'quarter') {\r\n <div class=\"date-picker__quarters\">\r\n @for (cell of quarterCells(); track cell.quarter) {\r\n <button\r\n type=\"button\"\r\n class=\"date-picker__quarter-cell\"\r\n [class.date-picker__quarter-cell--selected]=\"isQuarterSelected(cell)\"\r\n (click)=\"selectQuarter(cell)\"\r\n >\r\n {{ cell.label }}\r\n </button>\r\n }\r\n </div>\r\n } @else {\r\n <div class=\"date-picker__weekdays s-date-range-picker__week\">\r\n @for (label of weekDayLabels(); track label) {\r\n <div class=\"date-picker__weekday\">{{ label }}</div>\r\n }\r\n </div>\r\n\r\n <div\r\n class=\"date-picker__grid s-date-range-picker__grid\"\r\n [class.date-picker__grid--range-preview]=\"hasRangePreviewEnd()\"\r\n >\r\n @for (row of rows(); track trackByRow($index, row)) {\r\n <div class=\"date-picker__row\" [class.date-picker__row--selected]=\"isWeekSelected(row)\">\r\n @for (cell of row.cells; track trackByIso($index, cell)) {\r\n <button\r\n type=\"button\"\r\n class=\"date-picker__cell s-date-range-picker__cell s-calendar-cell\"\r\n [class.date-picker__cell--muted]=\"!cell.inCurrentMonth\"\r\n [class.date-picker__cell--disabled]=\"cell.isDisabled\"\r\n [class.date-picker__cell--today]=\"isTodayCell(cell)\"\r\n [class.date-picker__cell--selected]=\"isSelected(cell)\"\r\n [class.date-picker__cell--week-anchor]=\"isWeekAnchor(cell)\"\r\n [class.date-picker__cell--range-start]=\"isRangeStart(cell)\"\r\n [class.date-picker__cell--range-end]=\"isRangeEnd(cell)\"\r\n [class.date-picker__cell--range-middle]=\"isRangeInBetween(cell)\"\r\n [class.s-calendar-cell--outside]=\"!cell.inCurrentMonth\"\r\n [class.s-calendar-cell--disabled]=\"cell.isDisabled\"\r\n [class.s-calendar-cell--today]=\"isTodayCell(cell)\"\r\n [class.s-calendar-cell--selected-start]=\"isRangeStart(cell)\"\r\n [class.s-calendar-cell--selected-end]=\"isRangeEnd(cell)\"\r\n [class.s-calendar-cell--in-range]=\"isRangeInBetween(cell)\"\r\n [disabled]=\"cell.isDisabled\"\r\n (click)=\"mode() === 'week' ? selectWeek(row) : selectDate(cell.date)\"\r\n (mouseenter)=\"onCellHover(cell.date)\"\r\n (mouseleave)=\"onCellHover(null)\"\r\n >\r\n <span class=\"date-picker__cell-label\">{{ cell.label }}</span>\r\n </button>\r\n }\r\n </div>\r\n }\r\n </div>\r\n }\r\n\n <div class=\"date-picker__footer s-date-range-picker__footer\">\n <button type=\"button\" class=\"date-picker__today-btn\" (click)=\"selectShortcut()\">\n {{ shortcutText() }}\n </button>\n <div class=\"date-picker__footer-actions\">\n <button type=\"button\" class=\"date-picker__footer-btn\" (click)=\"cancel()\">{{ cancelText() }}</button>\r\n <button type=\"button\" class=\"date-picker__footer-btn date-picker__footer-btn--primary\" (click)=\"confirm()\">\r\n {{ confirmText() }}\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n }\r\n</div>\r\n", styles: [":host{position:relative;display:inline-block;width:var(--date-picker-width, var(--platform-control-width, 10rem));min-width:var(--date-picker-min-width, var(--platform-control-width, 10rem));max-width:100%;--date-primary: var(--color-primary, #0A84FF);--date-primary-hover: var(--color-primary-hover, #0077E6);--date-primary-active: var(--color-primary-active, #006FD6);--date-primary-soft: var(--calendar-range-bg, rgba(10,132,255,.14));--date-primary-hover-soft: var(--button-primary-soft-bg-hover, rgba(10,132,255,.08));--date-bg: var(--color-surface, #FFFFFF);--date-trigger-bg: var(--platform-control-bg, var(--input-bg, #FFFFFF));--date-border: var(--platform-control-border, var(--input-border, rgba(60,60,67,.1)));--date-border-strong: var(--platform-control-border-hover, var(--input-hover-border, rgba(60,60,67,.16)));--date-text: var(--platform-control-color, var(--input-text, #111827));--date-text-secondary: var(--color-text-secondary, rgba(60,60,67,.68));--date-text-muted: var(--platform-control-placeholder, var(--input-placeholder, rgba(60,60,67,.36)));--date-text-disabled: var(--platform-control-disabled-color, var(--input-disabled-text, rgba(60,60,67,.22)));--date-shadow: var(--shadow-common-l, 0 12px 32px rgba(0,0,0,.12));--date-trigger-height: var(--platform-control-height, var(--input-height, 32px));--date-trigger-radius: var(--platform-control-radius, var(--input-radius, 8px));--date-trigger-padding-x: var(--platform-control-padding-x, var(--input-padding-x, 12px));--date-trigger-min-width: var(--platform-control-range-width, 15rem);--date-panel-size: 252px;--date-panel-radius: 12px;--date-header-height: 32px;--date-week-height: 24px;--date-grid-height: 140px;--date-footer-height: 44px;--date-cell-height: 28px;--date-cell-dot-size: 28px;--date-button-width: 56px;--date-button-height: 32px;--date-button-radius: 8px;--date-picker-height: var(--date-trigger-height);--date-picker-radius: var(--date-trigger-radius);--date-picker-padding-x: var(--date-trigger-padding-x);--date-picker-indicator-offset: var(--date-trigger-padding-x);--date-picker-panel-padding-x: 12px;--date-picker-range-bg: var(--date-primary-soft);--calendar-selected-bg: var(--date-primary);--calendar-muted-color: rgba(60,60,67,.28)}:host(.date-picker-host--open){z-index:1000}:host([mode=range]),:host(.date-picker-host--range){width:var(--date-picker-range-width, var(--date-trigger-min-width));min-width:var(--date-picker-range-min-width, var(--date-trigger-min-width))}.date-picker{position:relative;display:inline-flex;flex-direction:column;width:100%}.date-picker__trigger,.date-picker__header,.date-picker__weekdays,.date-picker__grid,.date-picker__years,.date-picker__months,.date-picker__quarters,.date-picker__cell,.date-picker__footer,.date-picker__footer-btn,.date-picker__year-cell,.date-picker__month-cell,.date-picker__quarter-cell{box-sizing:border-box}.date-picker__trigger{position:relative;width:100%;min-width:0;height:var(--date-picker-height);padding:0 calc(var(--date-picker-indicator-offset) + 20px) 0 var(--date-picker-padding-x);border:1px solid var(--date-border);border-radius:var(--date-picker-radius);background:var(--date-trigger-bg);color:var(--date-text);display:inline-flex;align-items:center;cursor:pointer;transition:border-color .15s ease,background-color .15s ease,box-shadow .15s ease}.date-picker__trigger:hover{background:var(--platform-control-bg-hover, var(--date-bg));border-color:var(--date-border-strong)}.date-picker__trigger:focus-visible{outline:0;border-color:var(--platform-control-focus, var(--date-primary));box-shadow:0 0 0 2px var(--platform-control-focus-ring, rgba(10, 132, 255, .16))}.date-picker__value{flex:1;min-width:0;overflow:hidden;color:var(--date-text);font-size:var(--platform-control-font-size, var(--input-font-size, 13px));font-weight:400;line-height:var(--platform-control-line-height, 20px);letter-spacing:0;text-align:left;text-overflow:ellipsis;white-space:nowrap}.date-picker__value--placeholder,.date-picker__range-separator{color:var(--date-text-muted)}.date-picker__value--range{display:inline-flex;align-items:center;justify-content:space-between;gap:8px;width:100%;white-space:nowrap}.date-picker__range-part{flex:0 1 auto;min-width:0;overflow:hidden;color:var(--date-text);text-overflow:ellipsis}.date-picker__range-part--placeholder{color:var(--date-text-muted)}.date-picker__range-separator{flex:0 0 auto}.date-picker__trigger-icon,.date-picker__nav-btn,.date-picker__weekday,.date-picker__cell,.date-picker__cell-label,.date-picker__year-cell,.date-picker__month-cell,.date-picker__quarter-cell,.date-picker__footer,.date-picker__today-btn,.date-picker__footer-actions,.date-picker__footer-btn{display:inline-flex;align-items:center;justify-content:center}.date-picker__trigger-icon{position:absolute;top:50%;right:var(--date-picker-indicator-offset);width:16px;height:16px;color:var(--date-text-muted);pointer-events:none;line-height:0;transform:translateY(-50%)}.date-picker__trigger-icon svg{width:12px;height:12px}.date-picker__trigger-icon--clear{pointer-events:auto;color:var(--date-text-secondary);cursor:pointer}.date-picker__trigger-icon--clear:hover{color:var(--date-text)}.date-picker__panel{position:fixed;width:var(--date-panel-size);height:var(--date-panel-size);overflow:hidden;border:1px solid var(--date-border);border-radius:var(--date-panel-radius);background:var(--date-bg);box-shadow:var(--date-shadow);z-index:1000}.date-picker__header,.date-picker__weekdays,.date-picker__grid{padding-right:var(--date-picker-panel-padding-x);padding-left:var(--date-picker-panel-padding-x)}.date-picker__header{display:grid;grid-template-columns:24px minmax(0,1fr) 24px;align-items:center;height:var(--date-header-height)}.date-picker__title{min-width:0;overflow:hidden;color:var(--date-text);font-size:16px;font-weight:600;line-height:22px;text-align:center;text-overflow:ellipsis;white-space:nowrap}.date-picker__nav-btn{width:24px;height:24px;padding:0;border:0;border-radius:6px;background:transparent;color:var(--date-text-secondary);cursor:pointer}.date-picker__nav-btn:hover{background:#3c3c430f;color:var(--date-text)}.date-picker__nav-btn:active{background:#3c3c431a}.date-picker__nav-btn:disabled{opacity:.35;cursor:default}.date-picker__nav-btn i-lucide{display:block}.date-picker__nav-btn svg{display:block;width:14px;height:14px}.date-picker__weekdays{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));height:var(--date-week-height);margin-top:4px}.date-picker__weekday{height:100%;color:var(--date-text-muted);font-size:12px;font-weight:400;line-height:1}.date-picker__grid{display:flex;flex-direction:column;height:var(--date-grid-height);margin-bottom:8px}.date-picker__row{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));flex:1 1 0;min-height:0}.date-picker__row--selected{background:var(--date-picker-range-bg)}.date-picker__cell{position:relative;isolation:isolate;width:100%;height:100%;min-width:0;min-height:0;padding:0;border:0;border-radius:0;background:transparent;color:var(--date-text);font-size:14px;font-weight:400;line-height:1;cursor:pointer}.date-picker__cell:before{content:\"\";position:absolute;top:50%;right:0;left:0;height:min(var(--date-cell-height),100%);background:transparent;transform:translateY(-50%);z-index:0}.date-picker__cell-label{position:relative;z-index:1;height:min(var(--date-cell-dot-size),100%);aspect-ratio:1;border-radius:8px}.date-picker__cell:hover:not(:disabled):not(.date-picker__cell--selected):not(.date-picker__cell--range-start):not(.date-picker__cell--range-end) .date-picker__cell-label{background:var(--date-primary-hover-soft);color:var(--date-primary)}.date-picker__cell--muted{color:var(--calendar-muted-color)}.date-picker__cell--today .date-picker__cell-label,.date-picker__cell--week-anchor .date-picker__cell-label{border-radius:999px;color:var(--date-primary);box-shadow:inset 0 0 0 1px var(--date-primary)}.date-picker__cell--selected .date-picker__cell-label,.date-picker__cell--range-start .date-picker__cell-label,.date-picker__cell--range-end .date-picker__cell-label{border-radius:999px;background:var(--calendar-selected-bg);color:#fff;box-shadow:none}.date-picker__grid--range-preview .date-picker__cell--range-start:before,.date-picker__grid--range-preview .date-picker__cell--range-end:before,.date-picker__cell--range-middle:before{background:var(--date-picker-range-bg)}.date-picker__cell--range-middle{color:var(--date-primary)}.date-picker__grid--range-preview .date-picker__cell--range-start:before{left:50%}.date-picker__grid--range-preview .date-picker__cell--range-end:before{right:50%}.date-picker__cell--disabled,.date-picker__cell:disabled{color:var(--date-text-disabled);cursor:not-allowed}.date-picker__cell--disabled .date-picker__cell-label,.date-picker__cell:disabled .date-picker__cell-label{background:transparent;color:var(--date-text-disabled);box-shadow:none}.date-picker__years,.date-picker__months,.date-picker__quarters{display:grid;align-content:center;height:calc(var(--date-panel-size) - var(--date-header-height) - var(--date-footer-height));gap:8px;padding:8px var(--date-picker-panel-padding-x)}.date-picker__years,.date-picker__months{grid-template-columns:repeat(3,minmax(0,1fr))}.date-picker__quarters{grid-template-columns:repeat(4,minmax(0,1fr))}.date-picker__year-cell,.date-picker__month-cell,.date-picker__quarter-cell{height:32px;padding:0;border:0;background:transparent;color:var(--date-text);font-size:14px;line-height:1;cursor:pointer}.date-picker__year-cell:hover,.date-picker__month-cell:hover,.date-picker__quarter-cell:hover{background:var(--date-primary-hover-soft);color:var(--date-primary)}.date-picker__year-cell,.date-picker__month-cell{border-radius:8px}.date-picker__quarter-cell{border-radius:999px}.date-picker__year-cell--selected{background:var(--date-primary);color:#fff}.date-picker__month-cell--selected{background:var(--date-primary-soft);color:var(--date-primary)}.date-picker__quarter-cell--selected{background:var(--date-primary);color:#fff}.date-picker__footer{display:flex;width:100%;height:var(--date-footer-height);padding:0 var(--date-picker-panel-padding-x);border-top:1px solid var(--date-border);justify-content:space-between}.date-picker__today-btn{height:var(--date-button-height);padding:0 8px;border:0;border-radius:var(--date-button-radius);background:transparent;color:var(--date-primary);font-size:14px;font-weight:500;line-height:1;cursor:pointer}.date-picker__today-btn:hover{background:var(--date-primary-hover-soft)}.date-picker__footer-actions{gap:8px}.date-picker__footer-btn{width:var(--date-button-width);height:var(--date-button-height);padding:0;border:1px solid var(--date-border-strong);border-radius:var(--date-button-radius);background:#fff;color:var(--date-text);font-size:14px;font-weight:500;line-height:1;cursor:pointer}.date-picker__footer-btn:hover{background:#f8fafc}.date-picker__footer-btn--primary{border-color:transparent;background:var(--date-primary);color:#fff}.date-picker__footer-btn--primary:hover{background:var(--date-primary-hover)}.date-picker__footer-btn--primary:active{background:var(--date-primary-active)}.date-picker--disabled .date-picker__trigger{opacity:.6;cursor:default;background:var(--date-trigger-bg)}\n"] }]
|
|
3342
4016
|
}], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], rangeValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "rangeValue", required: false }] }, { type: i0.Output, args: ["rangeValueChange"] }], mode: [{ type: i0.Input, args: [{ isSignal: true, alias: "mode", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], rangeSeparator: [{ type: i0.Input, args: [{ isSignal: true, alias: "rangeSeparator", required: false }] }], locale: [{ type: i0.Input, args: [{ isSignal: true, alias: "locale", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], minDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "minDate", required: false }] }], maxDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxDate", required: false }] }], confirmText: [{ type: i0.Input, args: [{ isSignal: true, alias: "confirmText", required: false }] }], cancelText: [{ type: i0.Input, args: [{ isSignal: true, alias: "cancelText", required: false }] }], todayText: [{ type: i0.Input, args: [{ isSignal: true, alias: "todayText", required: false }] }], thisYearText: [{ type: i0.Input, args: [{ isSignal: true, alias: "thisYearText", required: false }] }], startPlaceholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "startPlaceholder", required: false }] }], endPlaceholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "endPlaceholder", required: false }] }], iconSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconSize", required: false }] }], weekDayLabels: [{ type: i0.Input, args: [{ isSignal: true, alias: "weekDayLabels", required: false }] }] } });
|
|
3343
4017
|
|
|
3344
4018
|
class PlatformDrawerForm {
|
|
3345
4019
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: PlatformDrawerForm, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3346
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.8", type: PlatformDrawerForm, isStandalone: true, selector: "platform-drawer-form", ngImport: i0, template: '<ng-content />', isInline: true, styles: ["platform-drawer-form{min-height:100%;width:100%;max-width:100%;min-width:0;box-sizing:border-box;display:flex;flex-direction:column;overflow-x:hidden;background:var(--color-surface)}platform-drawer-form form,platform-drawer-form .platform-drawer-form__native{display:contents}platform-drawer-section{display:block;min-width:0}platform-drawer-section>.platform-drawer-section__title{min-height:32px;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:0 20px;background:#f8fafc;color:#667085;font-size:12px;font-weight:400;line-height:1}platform-drawer-section>.platform-drawer-section__title.platform-drawer-section__title--muted{justify-content:flex-start}platform-drawer-section>.platform-drawer-section__title button,platform-drawer-section>.platform-drawer-section__title [platformDrawerSectionAction]{padding:0;border:0;background:transparent;color:var(--color-primary);font-size:12px;line-height:1;cursor:pointer}platform-drawer-section>.platform-drawer-section__content{display:grid;grid-template-columns:1fr;gap:0;padding:18px 20px 2px}platform-drawer-section>.platform-drawer-section__content.platform-drawer-section__content--plain{display:block;padding:18px 20px}platform-drawer-field{display:block;min-width:0}platform-drawer-field>.platform-drawer-field{min-width:0;display:grid;gap:7px;align-items:start;margin-bottom:16px;padding:0}platform-drawer-field>.platform-drawer-field.platform-drawer-field--full{grid-column:auto}platform-drawer-field>.platform-drawer-field.platform-drawer-field--invalid input,platform-drawer-field>.platform-drawer-field.platform-drawer-field--invalid textarea{border-color:#ff4d4f}platform-drawer-field>.platform-drawer-field.platform-drawer-field--switch{min-height:44px;display:flex;align-items:center;justify-content:space-between;gap:12px}platform-drawer-field>.platform-drawer-field textarea{min-height:80px;height:auto;padding:8px 10px;resize:vertical;line-height:1.4}platform-drawer-field .platform-drawer-field__label{color:#4b5563;font-size:13px;font-weight:400;line-height:1.4}platform-drawer-field .platform-drawer-field__label em{color:#ef4444;font-style:normal}platform-drawer-field .platform-drawer-field__switch-copy{min-width:0;display:grid;gap:2px}platform-drawer-field .platform-drawer-field__switch-copy>span{color:#4b5563;font-size:13px}platform-drawer-field .platform-drawer-field__switch-copy>small{color:#b6bdc8;font-size:12px;line-height:1.4}platform-drawer-error{display:block;color:#ff4d4f;font-size:12px;line-height:1.4}platform-drawer-error>.platform-drawer-error{display:block;color:inherit;font-size:inherit;line-height:inherit}platform-prefixed-input{position:relative;width:100%;min-width:0;display:block}platform-prefixed-input input{padding-left:3.25rem}platform-prefixed-input>.platform-prefixed-input__prefix{position:absolute;top:50%;left:.75rem;z-index:1;transform:translateY(-50%);color:#8a919f;font-family:inherit;font-size:13px;font-weight:400;line-height:normal;pointer-events:none;white-space:nowrap;-webkit-user-select:none;user-select:none}platform-drawer-checkbox-group{display:flex;flex-wrap:wrap;gap:.5rem .75rem}platform-drawer-checkbox-group.platform-drawer-checkbox-group--panel{max-height:14rem;overflow:auto;display:grid;grid-template-columns:1fr;gap:.125rem;padding:.5rem;border:1px solid #d9dee7;border-radius:.25rem;background:#fbfcfe}platform-drawer-checkbox{display:inline-flex;align-items:center;gap:.375rem;color:#1f2329;font-size:13px;line-height:1.4;cursor:pointer}platform-drawer-checkbox>.platform-drawer-checkbox{display:inline-flex;align-items:center;gap:.375rem;color:#1f2329;font-size:13px;line-height:1.4;cursor:pointer}platform-drawer-empty{display:block;color:#8a919f;font-size:13px}platform-drawer-table{min-width:0;max-height:var(--platform-drawer-table-max-height, 24rem);min-height:0;display:block;overflow:auto;border:1px solid var(--color-divider);border-radius:4px}platform-drawer-table table{width:100%;min-width:var(--platform-drawer-table-min-width, 36rem);border-collapse:collapse}platform-drawer-input-action{position:relative;width:100%;min-width:0;display:block}platform-drawer-input-action input{padding-right:2.5rem}platform-drawer-input-action>.platform-drawer-input-action__button{position:absolute;top:50%;right:.375rem;width:1.75rem;height:1.75rem;display:inline-flex;align-items:center;justify-content:center;padding:0;border:0;background:transparent;color:#8a919f;cursor:pointer;transform:translateY(-50%)}platform-drawer-input-action>.platform-drawer-input-action__button:hover,platform-drawer-input-action>.platform-drawer-input-action__button:focus-visible{color:#1677ff;outline:none}platform-switch{position:relative;display:inline-flex;align-items:center;cursor:pointer}platform-switch>.platform-switch__input{position:absolute;
|
|
4020
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.8", type: PlatformDrawerForm, isStandalone: true, selector: "platform-drawer-form", ngImport: i0, template: '<ng-content />', isInline: true, styles: ["@charset \"UTF-8\";platform-drawer-form{min-height:100%;width:100%;max-width:100%;min-width:0;box-sizing:border-box;display:flex;flex-direction:column;overflow-x:hidden;background:var(--color-surface)}platform-drawer-form form,platform-drawer-form .platform-drawer-form__native{display:contents}platform-drawer-section{display:block;min-width:0}platform-drawer-section>.platform-drawer-section__title{min-height:32px;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:0 20px;background:#f8fafc;color:#667085;font-size:12px;font-weight:400;line-height:1}platform-drawer-section>.platform-drawer-section__title.platform-drawer-section__title--muted{justify-content:flex-start}platform-drawer-section>.platform-drawer-section__title button,platform-drawer-section>.platform-drawer-section__title [platformDrawerSectionAction]{padding:0;border:0;background:transparent;color:var(--color-primary);font-size:12px;line-height:1;cursor:pointer}platform-drawer-section>.platform-drawer-section__content{display:grid;grid-template-columns:1fr;gap:0;padding:18px 20px 2px}platform-drawer-section>.platform-drawer-section__content.platform-drawer-section__content--plain{display:block;padding:18px 20px}platform-drawer-field{display:block;min-width:0}platform-drawer-field>.platform-drawer-field{min-width:0;display:grid;gap:7px;align-items:start;margin-bottom:16px;padding:0}platform-drawer-field>.platform-drawer-field.platform-drawer-field--full{grid-column:auto}platform-drawer-field>.platform-drawer-field.platform-drawer-field--invalid input,platform-drawer-field>.platform-drawer-field.platform-drawer-field--invalid textarea{border-color:#ff4d4f}platform-drawer-field>.platform-drawer-field.platform-drawer-field--switch{min-height:44px;display:flex;align-items:center;justify-content:space-between;gap:12px}platform-drawer-field>.platform-drawer-field textarea{min-height:80px;height:auto;padding:8px 10px;resize:vertical;line-height:1.4}platform-drawer-field .platform-drawer-field__label{color:#4b5563;font-size:13px;font-weight:400;line-height:1.4}platform-drawer-field .platform-drawer-field__label em{color:#ef4444;font-style:normal}platform-drawer-field .platform-drawer-field__switch-copy{min-width:0;display:grid;gap:2px}platform-drawer-field .platform-drawer-field__switch-copy>span{color:#4b5563;font-size:13px}platform-drawer-field .platform-drawer-field__switch-copy>small{color:#b6bdc8;font-size:12px;line-height:1.4}platform-drawer-error{display:block;color:#ff4d4f;font-size:12px;line-height:1.4}platform-drawer-error>.platform-drawer-error{display:block;color:inherit;font-size:inherit;line-height:inherit}platform-prefixed-input{position:relative;width:100%;min-width:0;display:block}platform-prefixed-input input{padding-left:3.25rem}platform-prefixed-input>.platform-prefixed-input__prefix{position:absolute;top:50%;left:.75rem;z-index:1;transform:translateY(-50%);color:#8a919f;font-family:inherit;font-size:13px;font-weight:400;line-height:normal;pointer-events:none;white-space:nowrap;-webkit-user-select:none;user-select:none}platform-drawer-checkbox-group{display:flex;flex-wrap:wrap;gap:.5rem .75rem}platform-drawer-checkbox-group.platform-drawer-checkbox-group--panel{max-height:14rem;overflow:auto;display:grid;grid-template-columns:1fr;gap:.125rem;padding:.5rem;border:1px solid #d9dee7;border-radius:.25rem;background:#fbfcfe}platform-drawer-checkbox{display:inline-flex;align-items:center;gap:.375rem;color:#1f2329;font-size:13px;line-height:1.4;cursor:pointer}platform-drawer-checkbox>.platform-drawer-checkbox{display:inline-flex;align-items:center;gap:.375rem;color:#1f2329;font-size:13px;line-height:1.4;cursor:pointer}platform-drawer-empty{display:block;color:#8a919f;font-size:13px}platform-drawer-table{min-width:0;max-height:var(--platform-drawer-table-max-height, 24rem);min-height:0;display:block;overflow:auto;border:1px solid var(--color-divider);border-radius:4px}platform-drawer-table table{width:100%;min-width:var(--platform-drawer-table-min-width, 36rem);border-collapse:collapse}platform-drawer-input-action{position:relative;width:100%;min-width:0;display:block}platform-drawer-input-action input{padding-right:2.5rem}platform-drawer-input-action>.platform-drawer-input-action__button{position:absolute;top:50%;right:.375rem;width:1.75rem;height:1.75rem;display:inline-flex;align-items:center;justify-content:center;padding:0;border:0;background:transparent;color:#8a919f;cursor:pointer;transform:translateY(-50%)}platform-drawer-input-action>.platform-drawer-input-action__button:hover,platform-drawer-input-action>.platform-drawer-input-action__button:focus-visible{color:#1677ff;outline:none}platform-drawer-input-action:has(>.platform-drawer-input-action__button[aria-label*=\\9009\\62e9]){display:grid;grid-template-columns:32px minmax(0,1fr);align-items:stretch}platform-drawer-input-action:has(>.platform-drawer-input-action__button[aria-label*=\\9009\\62e9]) input{order:2;padding-right:10px;border-radius:0 4px 4px 0;cursor:pointer}platform-drawer-input-action:has(>.platform-drawer-input-action__button[aria-label*=\\9009\\62e9])>.platform-drawer-input-action__button{position:static;order:1;width:32px;height:32px;border:1px solid #dfe5ec;border-right:0;border-radius:4px 0 0 4px;background:#fff;color:#667085;transform:none}platform-switch{position:relative;display:inline-flex;align-items:center;cursor:pointer}platform-switch>.platform-switch__input{position:absolute;top:0;left:0;z-index:1;width:46px;height:28px;margin:0;opacity:0;pointer-events:none}platform-switch>.platform-switch__input:checked+.platform-switch__track{border-color:#1677ff;background:#1677ff}platform-switch>.platform-switch__input:checked+.platform-switch__track .platform-switch__thumb{border-color:#fff;transform:translate(18px)}platform-switch>.platform-switch__track{width:46px;height:28px;border:1px solid #c6ccd3;border-radius:999px;display:inline-flex;align-items:center;padding:0 2px;box-sizing:border-box;background:#d7dbe0;transition:background-color .2s ease}platform-switch .platform-switch__thumb{width:22px;height:22px;border:1px solid #c7ced7;border-radius:999px;background:#fff;box-shadow:0 1px 2px #0f172a2e;transform:translate(0);transition:transform .2s ease}platform-switch.platform-switch--disabled>.platform-switch__track{opacity:.7}platform-drawer-toolbar{display:flex;align-items:center;flex-wrap:wrap;gap:24px;margin:0;padding:4px 20px 12px;color:var(--color-text-secondary);font-size:13px}platform-drawer-toolbar label{display:inline-flex;align-items:center;gap:6px;margin:0;white-space:nowrap}platform-drawer-tree{max-height:388px;min-width:0;overflow:auto;display:block;margin:0 20px;padding:.5rem .75rem;border:1px solid var(--color-divider);border-radius:.25rem}platform-drawer-tree-item{display:block}platform-drawer-tree-item>.platform-drawer-tree-item{min-height:2rem;min-width:0;display:flex;align-items:center;gap:.5rem;color:var(--color-text-primary);font-size:14px}platform-drawer-tree-item>.platform-drawer-tree-item .platform-drawer-tree-toggle{width:1rem;height:1rem;display:inline-flex;align-items:center;justify-content:center;padding:0;border:0;background:transparent;color:var(--color-text-disabled);font-size:12px;line-height:1;cursor:pointer}platform-drawer-tree-item>.platform-drawer-tree-item .platform-drawer-tree-toggle.platform-drawer-tree-toggle--hidden{visibility:hidden;pointer-events:none}platform-drawer-component-bar{min-width:0;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) 56px;gap:8px;align-items:center;padding:4px 20px 12px}platform-drawer-component-bar button{width:56px;min-width:56px;height:32px;padding:0}platform-drawer-component-list{min-width:0;display:block;margin:0 20px;border:1px solid var(--color-divider);border-radius:.25rem}platform-drawer-component-item{min-width:0;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto;gap:.75rem;align-items:center;padding:.625rem .75rem;border-bottom:1px solid var(--color-divider);color:var(--color-text-primary);font-size:14px}platform-drawer-component-item>span{min-width:0;overflow-wrap:anywhere}platform-drawer-component-item:last-child{border-bottom:0}platform-drawer-footer{display:flex;justify-content:flex-end;gap:8px;margin-top:auto;padding:10px 20px;border-top:1px solid #edf1f5;background:var(--color-surface)}platform-drawer-footer button{min-width:58px;height:32px;padding:0 10px;border-radius:3px;font-size:13px}platform-drawer-footer .primary{border-color:#1677ff;background:#1677ff;color:#fff}@media(max-width:640px){platform-drawer-component-bar,platform-drawer-component-item{grid-template-columns:1fr}platform-drawer-footer{justify-content:stretch}platform-drawer-footer>button{flex:1 1 auto}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
3347
4021
|
}
|
|
3348
4022
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: PlatformDrawerForm, decorators: [{
|
|
3349
4023
|
type: Component,
|
|
3350
|
-
args: [{ selector: 'platform-drawer-form', template: '<ng-content />', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, styles: ["platform-drawer-form{min-height:100%;width:100%;max-width:100%;min-width:0;box-sizing:border-box;display:flex;flex-direction:column;overflow-x:hidden;background:var(--color-surface)}platform-drawer-form form,platform-drawer-form .platform-drawer-form__native{display:contents}platform-drawer-section{display:block;min-width:0}platform-drawer-section>.platform-drawer-section__title{min-height:32px;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:0 20px;background:#f8fafc;color:#667085;font-size:12px;font-weight:400;line-height:1}platform-drawer-section>.platform-drawer-section__title.platform-drawer-section__title--muted{justify-content:flex-start}platform-drawer-section>.platform-drawer-section__title button,platform-drawer-section>.platform-drawer-section__title [platformDrawerSectionAction]{padding:0;border:0;background:transparent;color:var(--color-primary);font-size:12px;line-height:1;cursor:pointer}platform-drawer-section>.platform-drawer-section__content{display:grid;grid-template-columns:1fr;gap:0;padding:18px 20px 2px}platform-drawer-section>.platform-drawer-section__content.platform-drawer-section__content--plain{display:block;padding:18px 20px}platform-drawer-field{display:block;min-width:0}platform-drawer-field>.platform-drawer-field{min-width:0;display:grid;gap:7px;align-items:start;margin-bottom:16px;padding:0}platform-drawer-field>.platform-drawer-field.platform-drawer-field--full{grid-column:auto}platform-drawer-field>.platform-drawer-field.platform-drawer-field--invalid input,platform-drawer-field>.platform-drawer-field.platform-drawer-field--invalid textarea{border-color:#ff4d4f}platform-drawer-field>.platform-drawer-field.platform-drawer-field--switch{min-height:44px;display:flex;align-items:center;justify-content:space-between;gap:12px}platform-drawer-field>.platform-drawer-field textarea{min-height:80px;height:auto;padding:8px 10px;resize:vertical;line-height:1.4}platform-drawer-field .platform-drawer-field__label{color:#4b5563;font-size:13px;font-weight:400;line-height:1.4}platform-drawer-field .platform-drawer-field__label em{color:#ef4444;font-style:normal}platform-drawer-field .platform-drawer-field__switch-copy{min-width:0;display:grid;gap:2px}platform-drawer-field .platform-drawer-field__switch-copy>span{color:#4b5563;font-size:13px}platform-drawer-field .platform-drawer-field__switch-copy>small{color:#b6bdc8;font-size:12px;line-height:1.4}platform-drawer-error{display:block;color:#ff4d4f;font-size:12px;line-height:1.4}platform-drawer-error>.platform-drawer-error{display:block;color:inherit;font-size:inherit;line-height:inherit}platform-prefixed-input{position:relative;width:100%;min-width:0;display:block}platform-prefixed-input input{padding-left:3.25rem}platform-prefixed-input>.platform-prefixed-input__prefix{position:absolute;top:50%;left:.75rem;z-index:1;transform:translateY(-50%);color:#8a919f;font-family:inherit;font-size:13px;font-weight:400;line-height:normal;pointer-events:none;white-space:nowrap;-webkit-user-select:none;user-select:none}platform-drawer-checkbox-group{display:flex;flex-wrap:wrap;gap:.5rem .75rem}platform-drawer-checkbox-group.platform-drawer-checkbox-group--panel{max-height:14rem;overflow:auto;display:grid;grid-template-columns:1fr;gap:.125rem;padding:.5rem;border:1px solid #d9dee7;border-radius:.25rem;background:#fbfcfe}platform-drawer-checkbox{display:inline-flex;align-items:center;gap:.375rem;color:#1f2329;font-size:13px;line-height:1.4;cursor:pointer}platform-drawer-checkbox>.platform-drawer-checkbox{display:inline-flex;align-items:center;gap:.375rem;color:#1f2329;font-size:13px;line-height:1.4;cursor:pointer}platform-drawer-empty{display:block;color:#8a919f;font-size:13px}platform-drawer-table{min-width:0;max-height:var(--platform-drawer-table-max-height, 24rem);min-height:0;display:block;overflow:auto;border:1px solid var(--color-divider);border-radius:4px}platform-drawer-table table{width:100%;min-width:var(--platform-drawer-table-min-width, 36rem);border-collapse:collapse}platform-drawer-input-action{position:relative;width:100%;min-width:0;display:block}platform-drawer-input-action input{padding-right:2.5rem}platform-drawer-input-action>.platform-drawer-input-action__button{position:absolute;top:50%;right:.375rem;width:1.75rem;height:1.75rem;display:inline-flex;align-items:center;justify-content:center;padding:0;border:0;background:transparent;color:#8a919f;cursor:pointer;transform:translateY(-50%)}platform-drawer-input-action>.platform-drawer-input-action__button:hover,platform-drawer-input-action>.platform-drawer-input-action__button:focus-visible{color:#1677ff;outline:none}platform-switch{position:relative;display:inline-flex;align-items:center;cursor:pointer}platform-switch>.platform-switch__input{position:absolute;
|
|
4024
|
+
args: [{ selector: 'platform-drawer-form', template: '<ng-content />', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, styles: ["@charset \"UTF-8\";platform-drawer-form{min-height:100%;width:100%;max-width:100%;min-width:0;box-sizing:border-box;display:flex;flex-direction:column;overflow-x:hidden;background:var(--color-surface)}platform-drawer-form form,platform-drawer-form .platform-drawer-form__native{display:contents}platform-drawer-section{display:block;min-width:0}platform-drawer-section>.platform-drawer-section__title{min-height:32px;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:0 20px;background:#f8fafc;color:#667085;font-size:12px;font-weight:400;line-height:1}platform-drawer-section>.platform-drawer-section__title.platform-drawer-section__title--muted{justify-content:flex-start}platform-drawer-section>.platform-drawer-section__title button,platform-drawer-section>.platform-drawer-section__title [platformDrawerSectionAction]{padding:0;border:0;background:transparent;color:var(--color-primary);font-size:12px;line-height:1;cursor:pointer}platform-drawer-section>.platform-drawer-section__content{display:grid;grid-template-columns:1fr;gap:0;padding:18px 20px 2px}platform-drawer-section>.platform-drawer-section__content.platform-drawer-section__content--plain{display:block;padding:18px 20px}platform-drawer-field{display:block;min-width:0}platform-drawer-field>.platform-drawer-field{min-width:0;display:grid;gap:7px;align-items:start;margin-bottom:16px;padding:0}platform-drawer-field>.platform-drawer-field.platform-drawer-field--full{grid-column:auto}platform-drawer-field>.platform-drawer-field.platform-drawer-field--invalid input,platform-drawer-field>.platform-drawer-field.platform-drawer-field--invalid textarea{border-color:#ff4d4f}platform-drawer-field>.platform-drawer-field.platform-drawer-field--switch{min-height:44px;display:flex;align-items:center;justify-content:space-between;gap:12px}platform-drawer-field>.platform-drawer-field textarea{min-height:80px;height:auto;padding:8px 10px;resize:vertical;line-height:1.4}platform-drawer-field .platform-drawer-field__label{color:#4b5563;font-size:13px;font-weight:400;line-height:1.4}platform-drawer-field .platform-drawer-field__label em{color:#ef4444;font-style:normal}platform-drawer-field .platform-drawer-field__switch-copy{min-width:0;display:grid;gap:2px}platform-drawer-field .platform-drawer-field__switch-copy>span{color:#4b5563;font-size:13px}platform-drawer-field .platform-drawer-field__switch-copy>small{color:#b6bdc8;font-size:12px;line-height:1.4}platform-drawer-error{display:block;color:#ff4d4f;font-size:12px;line-height:1.4}platform-drawer-error>.platform-drawer-error{display:block;color:inherit;font-size:inherit;line-height:inherit}platform-prefixed-input{position:relative;width:100%;min-width:0;display:block}platform-prefixed-input input{padding-left:3.25rem}platform-prefixed-input>.platform-prefixed-input__prefix{position:absolute;top:50%;left:.75rem;z-index:1;transform:translateY(-50%);color:#8a919f;font-family:inherit;font-size:13px;font-weight:400;line-height:normal;pointer-events:none;white-space:nowrap;-webkit-user-select:none;user-select:none}platform-drawer-checkbox-group{display:flex;flex-wrap:wrap;gap:.5rem .75rem}platform-drawer-checkbox-group.platform-drawer-checkbox-group--panel{max-height:14rem;overflow:auto;display:grid;grid-template-columns:1fr;gap:.125rem;padding:.5rem;border:1px solid #d9dee7;border-radius:.25rem;background:#fbfcfe}platform-drawer-checkbox{display:inline-flex;align-items:center;gap:.375rem;color:#1f2329;font-size:13px;line-height:1.4;cursor:pointer}platform-drawer-checkbox>.platform-drawer-checkbox{display:inline-flex;align-items:center;gap:.375rem;color:#1f2329;font-size:13px;line-height:1.4;cursor:pointer}platform-drawer-empty{display:block;color:#8a919f;font-size:13px}platform-drawer-table{min-width:0;max-height:var(--platform-drawer-table-max-height, 24rem);min-height:0;display:block;overflow:auto;border:1px solid var(--color-divider);border-radius:4px}platform-drawer-table table{width:100%;min-width:var(--platform-drawer-table-min-width, 36rem);border-collapse:collapse}platform-drawer-input-action{position:relative;width:100%;min-width:0;display:block}platform-drawer-input-action input{padding-right:2.5rem}platform-drawer-input-action>.platform-drawer-input-action__button{position:absolute;top:50%;right:.375rem;width:1.75rem;height:1.75rem;display:inline-flex;align-items:center;justify-content:center;padding:0;border:0;background:transparent;color:#8a919f;cursor:pointer;transform:translateY(-50%)}platform-drawer-input-action>.platform-drawer-input-action__button:hover,platform-drawer-input-action>.platform-drawer-input-action__button:focus-visible{color:#1677ff;outline:none}platform-drawer-input-action:has(>.platform-drawer-input-action__button[aria-label*=\\9009\\62e9]){display:grid;grid-template-columns:32px minmax(0,1fr);align-items:stretch}platform-drawer-input-action:has(>.platform-drawer-input-action__button[aria-label*=\\9009\\62e9]) input{order:2;padding-right:10px;border-radius:0 4px 4px 0;cursor:pointer}platform-drawer-input-action:has(>.platform-drawer-input-action__button[aria-label*=\\9009\\62e9])>.platform-drawer-input-action__button{position:static;order:1;width:32px;height:32px;border:1px solid #dfe5ec;border-right:0;border-radius:4px 0 0 4px;background:#fff;color:#667085;transform:none}platform-switch{position:relative;display:inline-flex;align-items:center;cursor:pointer}platform-switch>.platform-switch__input{position:absolute;top:0;left:0;z-index:1;width:46px;height:28px;margin:0;opacity:0;pointer-events:none}platform-switch>.platform-switch__input:checked+.platform-switch__track{border-color:#1677ff;background:#1677ff}platform-switch>.platform-switch__input:checked+.platform-switch__track .platform-switch__thumb{border-color:#fff;transform:translate(18px)}platform-switch>.platform-switch__track{width:46px;height:28px;border:1px solid #c6ccd3;border-radius:999px;display:inline-flex;align-items:center;padding:0 2px;box-sizing:border-box;background:#d7dbe0;transition:background-color .2s ease}platform-switch .platform-switch__thumb{width:22px;height:22px;border:1px solid #c7ced7;border-radius:999px;background:#fff;box-shadow:0 1px 2px #0f172a2e;transform:translate(0);transition:transform .2s ease}platform-switch.platform-switch--disabled>.platform-switch__track{opacity:.7}platform-drawer-toolbar{display:flex;align-items:center;flex-wrap:wrap;gap:24px;margin:0;padding:4px 20px 12px;color:var(--color-text-secondary);font-size:13px}platform-drawer-toolbar label{display:inline-flex;align-items:center;gap:6px;margin:0;white-space:nowrap}platform-drawer-tree{max-height:388px;min-width:0;overflow:auto;display:block;margin:0 20px;padding:.5rem .75rem;border:1px solid var(--color-divider);border-radius:.25rem}platform-drawer-tree-item{display:block}platform-drawer-tree-item>.platform-drawer-tree-item{min-height:2rem;min-width:0;display:flex;align-items:center;gap:.5rem;color:var(--color-text-primary);font-size:14px}platform-drawer-tree-item>.platform-drawer-tree-item .platform-drawer-tree-toggle{width:1rem;height:1rem;display:inline-flex;align-items:center;justify-content:center;padding:0;border:0;background:transparent;color:var(--color-text-disabled);font-size:12px;line-height:1;cursor:pointer}platform-drawer-tree-item>.platform-drawer-tree-item .platform-drawer-tree-toggle.platform-drawer-tree-toggle--hidden{visibility:hidden;pointer-events:none}platform-drawer-component-bar{min-width:0;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) 56px;gap:8px;align-items:center;padding:4px 20px 12px}platform-drawer-component-bar button{width:56px;min-width:56px;height:32px;padding:0}platform-drawer-component-list{min-width:0;display:block;margin:0 20px;border:1px solid var(--color-divider);border-radius:.25rem}platform-drawer-component-item{min-width:0;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto;gap:.75rem;align-items:center;padding:.625rem .75rem;border-bottom:1px solid var(--color-divider);color:var(--color-text-primary);font-size:14px}platform-drawer-component-item>span{min-width:0;overflow-wrap:anywhere}platform-drawer-component-item:last-child{border-bottom:0}platform-drawer-footer{display:flex;justify-content:flex-end;gap:8px;margin-top:auto;padding:10px 20px;border-top:1px solid #edf1f5;background:var(--color-surface)}platform-drawer-footer button{min-width:58px;height:32px;padding:0 10px;border-radius:3px;font-size:13px}platform-drawer-footer .primary{border-color:#1677ff;background:#1677ff;color:#fff}@media(max-width:640px){platform-drawer-component-bar,platform-drawer-component-item{grid-template-columns:1fr}platform-drawer-footer{justify-content:stretch}platform-drawer-footer>button{flex:1 1 auto}}\n"] }]
|
|
3351
4025
|
}] });
|
|
3352
4026
|
class PlatformDrawerSection {
|
|
3353
4027
|
title = input('', ...(ngDevMode ? [{ debugName: "title" }] : /* istanbul ignore next */ []));
|
|
@@ -3700,6 +4374,11 @@ class PlatformSwitch {
|
|
|
3700
4374
|
this.handleChange(target.checked);
|
|
3701
4375
|
}
|
|
3702
4376
|
}
|
|
4377
|
+
handleTrackClick() {
|
|
4378
|
+
if (this.isDisabled)
|
|
4379
|
+
return;
|
|
4380
|
+
this.handleChange(!this.checked);
|
|
4381
|
+
}
|
|
3703
4382
|
handleTouched() {
|
|
3704
4383
|
this.onTouched();
|
|
3705
4384
|
}
|
|
@@ -3720,7 +4399,7 @@ class PlatformSwitch {
|
|
|
3720
4399
|
(change)="handleInputChange($event)"
|
|
3721
4400
|
(blur)="handleTouched()"
|
|
3722
4401
|
/>
|
|
3723
|
-
<span class="platform-switch__track" aria-hidden="true">
|
|
4402
|
+
<span class="platform-switch__track" aria-hidden="true" (click)="handleTrackClick()">
|
|
3724
4403
|
<span class="platform-switch__thumb"></span>
|
|
3725
4404
|
</span>
|
|
3726
4405
|
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
@@ -3739,7 +4418,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
|
|
|
3739
4418
|
(change)="handleInputChange($event)"
|
|
3740
4419
|
(blur)="handleTouched()"
|
|
3741
4420
|
/>
|
|
3742
|
-
<span class="platform-switch__track" aria-hidden="true">
|
|
4421
|
+
<span class="platform-switch__track" aria-hidden="true" (click)="handleTrackClick()">
|
|
3743
4422
|
<span class="platform-switch__thumb"></span>
|
|
3744
4423
|
</span>
|
|
3745
4424
|
`,
|
|
@@ -3903,11 +4582,11 @@ class EmojiPicker {
|
|
|
3903
4582
|
this.tabSelected.emit(value);
|
|
3904
4583
|
}
|
|
3905
4584
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: EmojiPicker, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3906
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: EmojiPicker, isStandalone: true, selector: "s-emoji-picker", inputs: { panelId: { classPropertyName: "panelId", publicName: "panelId", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, headerLabel: { classPropertyName: "headerLabel", publicName: "headerLabel", isSignal: true, isRequired: false, transformFunction: null }, gridLabel: { classPropertyName: "gridLabel", publicName: "gridLabel", isSignal: true, isRequired: false, transformFunction: null }, tabsLabel: { classPropertyName: "tabsLabel", publicName: "tabsLabel", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, tabs: { classPropertyName: "tabs", publicName: "tabs", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { emojiSelected: "emojiSelected", tabSelected: "tabSelected" }, ngImport: i0, template: "<section\r\n [id]=\"panelId()\"\r\n class=\"emoji-picker\"\r\n role=\"dialog\"\r\n [attr.aria-label]=\"ariaLabel()\"\r\n>\r\n <header class=\"emoji-picker__header\">{{ headerLabel() }}</header>\r\n <div class=\"emoji-picker__grid\" [attr.aria-label]=\"gridLabel()\">\r\n @for (emoji of activeOptions(); track emoji.value) {\r\n <button\r\n class=\"emoji-picker__item\"\r\n type=\"button\"\r\n [attr.aria-label]=\"emoji.label\"\r\n (click)=\"selectEmoji(emoji.value)\"\r\n >\r\n {{ emoji.value }}\r\n </button>\r\n }\r\n </div>\r\n <footer class=\"emoji-picker__tabs\" [attr.aria-label]=\"tabsLabel()\">\r\n @for (tab of tabs(); track tab.value) {\r\n <button\r\n class=\"emoji-picker__tab\"\r\n type=\"button\"\r\n [class.emoji-picker__tab--active]=\"tab.value === activeTab()\"\r\n [attr.aria-label]=\"tab.label\"\r\n (click)=\"selectTab(tab.value)\"\r\n >\r\n {{ tab.icon }}\r\n </button>\r\n }\r\n </footer>\r\n</section>\r\n", styles: [":host{display:contents}.emoji-picker{position:absolute;left:14px;bottom:60px;z-index:
|
|
4585
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: EmojiPicker, isStandalone: true, selector: "s-emoji-picker", inputs: { panelId: { classPropertyName: "panelId", publicName: "panelId", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, headerLabel: { classPropertyName: "headerLabel", publicName: "headerLabel", isSignal: true, isRequired: false, transformFunction: null }, gridLabel: { classPropertyName: "gridLabel", publicName: "gridLabel", isSignal: true, isRequired: false, transformFunction: null }, tabsLabel: { classPropertyName: "tabsLabel", publicName: "tabsLabel", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, tabs: { classPropertyName: "tabs", publicName: "tabs", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { emojiSelected: "emojiSelected", tabSelected: "tabSelected" }, ngImport: i0, template: "<section\r\n [id]=\"panelId()\"\r\n class=\"emoji-picker\"\r\n role=\"dialog\"\r\n [attr.aria-label]=\"ariaLabel()\"\r\n>\r\n <header class=\"emoji-picker__header\">{{ headerLabel() }}</header>\r\n <div class=\"emoji-picker__grid\" [attr.aria-label]=\"gridLabel()\">\r\n @for (emoji of activeOptions(); track emoji.value) {\r\n <button\r\n class=\"emoji-picker__item\"\r\n type=\"button\"\r\n [attr.aria-label]=\"emoji.label\"\r\n (click)=\"selectEmoji(emoji.value)\"\r\n >\r\n {{ emoji.value }}\r\n </button>\r\n }\r\n </div>\r\n <footer class=\"emoji-picker__tabs\" [attr.aria-label]=\"tabsLabel()\">\r\n @for (tab of tabs(); track tab.value) {\r\n <button\r\n class=\"emoji-picker__tab\"\r\n type=\"button\"\r\n [class.emoji-picker__tab--active]=\"tab.value === activeTab()\"\r\n [attr.aria-label]=\"tab.label\"\r\n (click)=\"selectTab(tab.value)\"\r\n >\r\n {{ tab.icon }}\r\n </button>\r\n }\r\n </footer>\r\n</section>\r\n", styles: [":host{display:contents}.emoji-picker{position:absolute;left:14px;bottom:60px;z-index:998;display:grid;grid-template-rows:auto minmax(0,1fr) auto;width:min(460px,100% - 28px);max-width:calc(100% - 28px);max-height:min(360px,100vh - 220px);overflow:hidden;border:1px solid #dce7f3;border-radius:8px;background:#fff;box-shadow:0 18px 44px #0f172a29}.emoji-picker__header{padding:12px 16px 8px;color:#667085;font-size:13px;font-weight:700}.emoji-picker__grid{display:grid;grid-template-columns:repeat(10,34px);gap:8px;overflow:auto;padding:8px 14px 12px}.emoji-picker__item{display:grid;place-items:center;width:34px;height:34px;padding:0;border:0;border-radius:7px;background:transparent;font:inherit;font-size:22px;line-height:1;cursor:pointer}.emoji-picker__item:hover{background:#e7f1ff}.emoji-picker__tabs{display:flex;align-items:center;gap:6px;height:48px;padding:0 10px;border-top:1px solid #e6edf5;background:#f7f9fc}.emoji-picker__tab{display:grid;place-items:center;width:50px;height:40px;padding:0;border:0;border-radius:8px;background:transparent;font:inherit;font-size:22px;line-height:1;cursor:pointer}.emoji-picker__tab:hover,.emoji-picker__tab--active{background:#fff;box-shadow:0 1px 6px #0f172a14}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3907
4586
|
}
|
|
3908
4587
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: EmojiPicker, decorators: [{
|
|
3909
4588
|
type: Component,
|
|
3910
|
-
args: [{ selector: 's-emoji-picker', changeDetection: ChangeDetectionStrategy.OnPush, template: "<section\r\n [id]=\"panelId()\"\r\n class=\"emoji-picker\"\r\n role=\"dialog\"\r\n [attr.aria-label]=\"ariaLabel()\"\r\n>\r\n <header class=\"emoji-picker__header\">{{ headerLabel() }}</header>\r\n <div class=\"emoji-picker__grid\" [attr.aria-label]=\"gridLabel()\">\r\n @for (emoji of activeOptions(); track emoji.value) {\r\n <button\r\n class=\"emoji-picker__item\"\r\n type=\"button\"\r\n [attr.aria-label]=\"emoji.label\"\r\n (click)=\"selectEmoji(emoji.value)\"\r\n >\r\n {{ emoji.value }}\r\n </button>\r\n }\r\n </div>\r\n <footer class=\"emoji-picker__tabs\" [attr.aria-label]=\"tabsLabel()\">\r\n @for (tab of tabs(); track tab.value) {\r\n <button\r\n class=\"emoji-picker__tab\"\r\n type=\"button\"\r\n [class.emoji-picker__tab--active]=\"tab.value === activeTab()\"\r\n [attr.aria-label]=\"tab.label\"\r\n (click)=\"selectTab(tab.value)\"\r\n >\r\n {{ tab.icon }}\r\n </button>\r\n }\r\n </footer>\r\n</section>\r\n", styles: [":host{display:contents}.emoji-picker{position:absolute;left:14px;bottom:60px;z-index:
|
|
4589
|
+
args: [{ selector: 's-emoji-picker', changeDetection: ChangeDetectionStrategy.OnPush, template: "<section\r\n [id]=\"panelId()\"\r\n class=\"emoji-picker\"\r\n role=\"dialog\"\r\n [attr.aria-label]=\"ariaLabel()\"\r\n>\r\n <header class=\"emoji-picker__header\">{{ headerLabel() }}</header>\r\n <div class=\"emoji-picker__grid\" [attr.aria-label]=\"gridLabel()\">\r\n @for (emoji of activeOptions(); track emoji.value) {\r\n <button\r\n class=\"emoji-picker__item\"\r\n type=\"button\"\r\n [attr.aria-label]=\"emoji.label\"\r\n (click)=\"selectEmoji(emoji.value)\"\r\n >\r\n {{ emoji.value }}\r\n </button>\r\n }\r\n </div>\r\n <footer class=\"emoji-picker__tabs\" [attr.aria-label]=\"tabsLabel()\">\r\n @for (tab of tabs(); track tab.value) {\r\n <button\r\n class=\"emoji-picker__tab\"\r\n type=\"button\"\r\n [class.emoji-picker__tab--active]=\"tab.value === activeTab()\"\r\n [attr.aria-label]=\"tab.label\"\r\n (click)=\"selectTab(tab.value)\"\r\n >\r\n {{ tab.icon }}\r\n </button>\r\n }\r\n </footer>\r\n</section>\r\n", styles: [":host{display:contents}.emoji-picker{position:absolute;left:14px;bottom:60px;z-index:998;display:grid;grid-template-rows:auto minmax(0,1fr) auto;width:min(460px,100% - 28px);max-width:calc(100% - 28px);max-height:min(360px,100vh - 220px);overflow:hidden;border:1px solid #dce7f3;border-radius:8px;background:#fff;box-shadow:0 18px 44px #0f172a29}.emoji-picker__header{padding:12px 16px 8px;color:#667085;font-size:13px;font-weight:700}.emoji-picker__grid{display:grid;grid-template-columns:repeat(10,34px);gap:8px;overflow:auto;padding:8px 14px 12px}.emoji-picker__item{display:grid;place-items:center;width:34px;height:34px;padding:0;border:0;border-radius:7px;background:transparent;font:inherit;font-size:22px;line-height:1;cursor:pointer}.emoji-picker__item:hover{background:#e7f1ff}.emoji-picker__tabs{display:flex;align-items:center;gap:6px;height:48px;padding:0 10px;border-top:1px solid #e6edf5;background:#f7f9fc}.emoji-picker__tab{display:grid;place-items:center;width:50px;height:40px;padding:0;border:0;border-radius:8px;background:transparent;font:inherit;font-size:22px;line-height:1;cursor:pointer}.emoji-picker__tab:hover,.emoji-picker__tab--active{background:#fff;box-shadow:0 1px 6px #0f172a14}\n"] }]
|
|
3911
4590
|
}], propDecorators: { panelId: [{ type: i0.Input, args: [{ isSignal: true, alias: "panelId", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], headerLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "headerLabel", required: false }] }], gridLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "gridLabel", required: false }] }], tabsLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "tabsLabel", required: false }] }], options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }], tabs: [{ type: i0.Input, args: [{ isSignal: true, alias: "tabs", required: false }] }], emojiSelected: [{ type: i0.Output, args: ["emojiSelected"] }], tabSelected: [{ type: i0.Output, args: ["tabSelected"] }] } });
|
|
3912
4591
|
|
|
3913
4592
|
class FilterSummary {
|
|
@@ -3979,33 +4658,203 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
|
|
|
3979
4658
|
}, template: "<button\r\n type=\"button\"\r\n [class]=\"buttonClass()\"\r\n [disabled]=\"disabled()\"\r\n [attr.aria-busy]=\"ariaBusy()\"\r\n (click)=\"openFileDialog()\"\r\n>\r\n <ng-content />\r\n</button>\r\n\r\n<input\r\n #fileInput\r\n class=\"file-upload-button__input\"\r\n type=\"file\"\r\n [accept]=\"accept()\"\r\n [multiple]=\"multiple()\"\r\n (change)=\"onFileChange($event)\"\r\n/>\r\n", styles: [":host{display:contents}:host(.file-upload-button-host--disabled){cursor:not-allowed}.file-upload-button__input{display:none}\n"] }]
|
|
3980
4659
|
}], propDecorators: { accept: [{ type: i0.Input, args: [{ isSignal: true, alias: "accept", required: false }] }], multiple: [{ type: i0.Input, args: [{ isSignal: true, alias: "multiple", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], buttonClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "buttonClass", required: false }] }], ariaBusy: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaBusy", required: false }] }], filesSelected: [{ type: i0.Output, args: ["filesSelected"] }], fileInput: [{ type: i0.ViewChild, args: ['fileInput', { isSignal: true }] }] } });
|
|
3981
4660
|
|
|
3982
|
-
class
|
|
3983
|
-
|
|
3984
|
-
|
|
3985
|
-
|
|
3986
|
-
|
|
3987
|
-
|
|
3988
|
-
|
|
3989
|
-
|
|
3990
|
-
|
|
3991
|
-
|
|
3992
|
-
|
|
3993
|
-
|
|
3994
|
-
|
|
3995
|
-
|
|
3996
|
-
|
|
3997
|
-
|
|
3998
|
-
|
|
3999
|
-
|
|
4000
|
-
|
|
4001
|
-
|
|
4002
|
-
|
|
4003
|
-
|
|
4004
|
-
|
|
4005
|
-
|
|
4006
|
-
|
|
4007
|
-
|
|
4008
|
-
|
|
4661
|
+
class ImagePreview {
|
|
4662
|
+
items = input([], ...(ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []));
|
|
4663
|
+
initialIndex = input(0, ...(ngDevMode ? [{ debugName: "initialIndex" }] : /* istanbul ignore next */ []));
|
|
4664
|
+
thumbnailSize = input(88, ...(ngDevMode ? [{ debugName: "thumbnailSize" }] : /* istanbul ignore next */ []));
|
|
4665
|
+
disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
4666
|
+
showCounter = input(true, ...(ngDevMode ? [{ debugName: "showCounter" }] : /* istanbul ignore next */ []));
|
|
4667
|
+
showTitle = input(true, ...(ngDevMode ? [{ debugName: "showTitle" }] : /* istanbul ignore next */ []));
|
|
4668
|
+
showThumbnails = input(true, ...(ngDevMode ? [{ debugName: "showThumbnails" }] : /* istanbul ignore next */ []));
|
|
4669
|
+
closeOnMaskClick = input(true, ...(ngDevMode ? [{ debugName: "closeOnMaskClick" }] : /* istanbul ignore next */ []));
|
|
4670
|
+
zoomStep = input(0.2, ...(ngDevMode ? [{ debugName: "zoomStep" }] : /* istanbul ignore next */ []));
|
|
4671
|
+
minZoom = input(0.4, ...(ngDevMode ? [{ debugName: "minZoom" }] : /* istanbul ignore next */ []));
|
|
4672
|
+
maxZoom = input(3, ...(ngDevMode ? [{ debugName: "maxZoom" }] : /* istanbul ignore next */ []));
|
|
4673
|
+
emptyText = input('暂无图片', ...(ngDevMode ? [{ debugName: "emptyText" }] : /* istanbul ignore next */ []));
|
|
4674
|
+
opened = output();
|
|
4675
|
+
closed = output();
|
|
4676
|
+
indexChange = output();
|
|
4677
|
+
imageError = output();
|
|
4678
|
+
closeIcon = XIcon;
|
|
4679
|
+
emptyIcon = ImageIcon;
|
|
4680
|
+
nextIcon = ChevronRightIcon;
|
|
4681
|
+
prevIcon = ChevronLeftIcon;
|
|
4682
|
+
rotateLeftIcon = RotateCcwIcon;
|
|
4683
|
+
rotateRightIcon = RotateCwIcon;
|
|
4684
|
+
zoomInIcon = PlusIcon;
|
|
4685
|
+
zoomOutIcon = MinusIcon;
|
|
4686
|
+
isOpen = signal(false, ...(ngDevMode ? [{ debugName: "isOpen" }] : /* istanbul ignore next */ []));
|
|
4687
|
+
activeIndex = signal(0, ...(ngDevMode ? [{ debugName: "activeIndex" }] : /* istanbul ignore next */ []));
|
|
4688
|
+
zoom = signal(1, ...(ngDevMode ? [{ debugName: "zoom" }] : /* istanbul ignore next */ []));
|
|
4689
|
+
rotation = signal(0, ...(ngDevMode ? [{ debugName: "rotation" }] : /* istanbul ignore next */ []));
|
|
4690
|
+
failedSources = signal(new Set(), ...(ngDevMode ? [{ debugName: "failedSources" }] : /* istanbul ignore next */ []));
|
|
4691
|
+
closeButton = viewChild('closeButton', ...(ngDevMode ? [{ debugName: "closeButton" }] : /* istanbul ignore next */ []));
|
|
4692
|
+
hasItems = computed(() => this.items().length > 0, ...(ngDevMode ? [{ debugName: "hasItems" }] : /* istanbul ignore next */ []));
|
|
4693
|
+
activeItem = computed(() => this.items()[this.safeIndex(this.activeIndex())] ?? null, ...(ngDevMode ? [{ debugName: "activeItem" }] : /* istanbul ignore next */ []));
|
|
4694
|
+
canGoPrev = computed(() => this.items().length > 1, ...(ngDevMode ? [{ debugName: "canGoPrev" }] : /* istanbul ignore next */ []));
|
|
4695
|
+
canGoNext = computed(() => this.items().length > 1, ...(ngDevMode ? [{ debugName: "canGoNext" }] : /* istanbul ignore next */ []));
|
|
4696
|
+
canZoomIn = computed(() => this.zoom() < this.normalizedMaxZoom(), ...(ngDevMode ? [{ debugName: "canZoomIn" }] : /* istanbul ignore next */ []));
|
|
4697
|
+
canZoomOut = computed(() => this.zoom() > this.normalizedMinZoom(), ...(ngDevMode ? [{ debugName: "canZoomOut" }] : /* istanbul ignore next */ []));
|
|
4698
|
+
imageTransform = computed(() => `scale(${this.zoom()}) rotate(${this.rotation()}deg)`, ...(ngDevMode ? [{ debugName: "imageTransform" }] : /* istanbul ignore next */ []));
|
|
4699
|
+
zoomPercent = computed(() => `${Math.round(this.zoom() * 100)}%`, ...(ngDevMode ? [{ debugName: "zoomPercent" }] : /* istanbul ignore next */ []));
|
|
4700
|
+
trackBySrc(index, item) {
|
|
4701
|
+
return item.src || `${index}`;
|
|
4702
|
+
}
|
|
4703
|
+
open(index) {
|
|
4704
|
+
if (this.disabled() || !this.hasItems()) {
|
|
4705
|
+
return;
|
|
4706
|
+
}
|
|
4707
|
+
this.activeIndex.set(this.safeIndex(index));
|
|
4708
|
+
this.resetTransform();
|
|
4709
|
+
this.isOpen.set(true);
|
|
4710
|
+
this.emitForIndex(this.opened, this.activeIndex());
|
|
4711
|
+
queueMicrotask(() => this.closeButton()?.nativeElement.focus());
|
|
4712
|
+
}
|
|
4713
|
+
close() {
|
|
4714
|
+
if (!this.isOpen()) {
|
|
4715
|
+
return;
|
|
4716
|
+
}
|
|
4717
|
+
this.isOpen.set(false);
|
|
4718
|
+
this.resetTransform();
|
|
4719
|
+
this.closed.emit();
|
|
4720
|
+
}
|
|
4721
|
+
closeFromMask(event) {
|
|
4722
|
+
if (!this.closeOnMaskClick() || event.target !== event.currentTarget) {
|
|
4723
|
+
return;
|
|
4724
|
+
}
|
|
4725
|
+
this.close();
|
|
4726
|
+
}
|
|
4727
|
+
previous() {
|
|
4728
|
+
this.move(-1);
|
|
4729
|
+
}
|
|
4730
|
+
next() {
|
|
4731
|
+
this.move(1);
|
|
4732
|
+
}
|
|
4733
|
+
select(index) {
|
|
4734
|
+
const safeIndex = this.safeIndex(index);
|
|
4735
|
+
if (safeIndex === this.activeIndex()) {
|
|
4736
|
+
return;
|
|
4737
|
+
}
|
|
4738
|
+
this.activeIndex.set(safeIndex);
|
|
4739
|
+
this.resetTransform();
|
|
4740
|
+
this.emitForIndex(this.indexChange, safeIndex);
|
|
4741
|
+
}
|
|
4742
|
+
zoomIn() {
|
|
4743
|
+
this.zoom.update((value) => this.clampZoom(value + this.normalizedZoomStep()));
|
|
4744
|
+
}
|
|
4745
|
+
zoomOut() {
|
|
4746
|
+
this.zoom.update((value) => this.clampZoom(value - this.normalizedZoomStep()));
|
|
4747
|
+
}
|
|
4748
|
+
rotateLeft() {
|
|
4749
|
+
this.rotation.update((value) => value - 90);
|
|
4750
|
+
}
|
|
4751
|
+
rotateRight() {
|
|
4752
|
+
this.rotation.update((value) => value + 90);
|
|
4753
|
+
}
|
|
4754
|
+
resetTransform() {
|
|
4755
|
+
this.zoom.set(1);
|
|
4756
|
+
this.rotation.set(0);
|
|
4757
|
+
}
|
|
4758
|
+
isFailed(src) {
|
|
4759
|
+
return this.failedSources().has(src);
|
|
4760
|
+
}
|
|
4761
|
+
onImageError(index, item, source = item.src) {
|
|
4762
|
+
this.failedSources.update((sources) => new Set(sources).add(source));
|
|
4763
|
+
this.imageError.emit({ index: this.safeIndex(index), item });
|
|
4764
|
+
}
|
|
4765
|
+
onDocumentKeydown(event) {
|
|
4766
|
+
if (!this.isOpen()) {
|
|
4767
|
+
return;
|
|
4768
|
+
}
|
|
4769
|
+
switch (event.key) {
|
|
4770
|
+
case 'Escape':
|
|
4771
|
+
event.preventDefault();
|
|
4772
|
+
this.close();
|
|
4773
|
+
break;
|
|
4774
|
+
case 'ArrowLeft':
|
|
4775
|
+
event.preventDefault();
|
|
4776
|
+
this.previous();
|
|
4777
|
+
break;
|
|
4778
|
+
case 'ArrowRight':
|
|
4779
|
+
event.preventDefault();
|
|
4780
|
+
this.next();
|
|
4781
|
+
break;
|
|
4782
|
+
}
|
|
4783
|
+
}
|
|
4784
|
+
move(offset) {
|
|
4785
|
+
const length = this.items().length;
|
|
4786
|
+
if (length < 2) {
|
|
4787
|
+
return;
|
|
4788
|
+
}
|
|
4789
|
+
const nextIndex = (this.activeIndex() + offset + length) % length;
|
|
4790
|
+
this.select(nextIndex);
|
|
4791
|
+
}
|
|
4792
|
+
safeIndex(index) {
|
|
4793
|
+
const length = this.items().length;
|
|
4794
|
+
if (!length) {
|
|
4795
|
+
return 0;
|
|
4796
|
+
}
|
|
4797
|
+
return Math.max(0, Math.min(length - 1, Math.trunc(index)));
|
|
4798
|
+
}
|
|
4799
|
+
clampZoom(value) {
|
|
4800
|
+
return Math.max(this.normalizedMinZoom(), Math.min(this.normalizedMaxZoom(), Number(value.toFixed(2))));
|
|
4801
|
+
}
|
|
4802
|
+
normalizedZoomStep() {
|
|
4803
|
+
return this.positiveNumberOrDefault(this.zoomStep(), 0.2);
|
|
4804
|
+
}
|
|
4805
|
+
normalizedMinZoom() {
|
|
4806
|
+
return this.positiveNumberOrDefault(this.minZoom(), 0.4);
|
|
4807
|
+
}
|
|
4808
|
+
normalizedMaxZoom() {
|
|
4809
|
+
return Math.max(this.normalizedMinZoom(), this.positiveNumberOrDefault(this.maxZoom(), 3));
|
|
4810
|
+
}
|
|
4811
|
+
positiveNumberOrDefault(value, fallback) {
|
|
4812
|
+
return Number.isFinite(value) && value > 0 ? value : fallback;
|
|
4813
|
+
}
|
|
4814
|
+
emitForIndex(emitter, index) {
|
|
4815
|
+
const item = this.items()[index];
|
|
4816
|
+
if (!item) {
|
|
4817
|
+
return;
|
|
4818
|
+
}
|
|
4819
|
+
emitter.emit({ index, item });
|
|
4820
|
+
}
|
|
4821
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: ImagePreview, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4822
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: ImagePreview, isStandalone: true, selector: "s-image-preview", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, initialIndex: { classPropertyName: "initialIndex", publicName: "initialIndex", isSignal: true, isRequired: false, transformFunction: null }, thumbnailSize: { classPropertyName: "thumbnailSize", publicName: "thumbnailSize", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, showCounter: { classPropertyName: "showCounter", publicName: "showCounter", isSignal: true, isRequired: false, transformFunction: null }, showTitle: { classPropertyName: "showTitle", publicName: "showTitle", isSignal: true, isRequired: false, transformFunction: null }, showThumbnails: { classPropertyName: "showThumbnails", publicName: "showThumbnails", isSignal: true, isRequired: false, transformFunction: null }, closeOnMaskClick: { classPropertyName: "closeOnMaskClick", publicName: "closeOnMaskClick", isSignal: true, isRequired: false, transformFunction: null }, zoomStep: { classPropertyName: "zoomStep", publicName: "zoomStep", isSignal: true, isRequired: false, transformFunction: null }, minZoom: { classPropertyName: "minZoom", publicName: "minZoom", isSignal: true, isRequired: false, transformFunction: null }, maxZoom: { classPropertyName: "maxZoom", publicName: "maxZoom", isSignal: true, isRequired: false, transformFunction: null }, emptyText: { classPropertyName: "emptyText", publicName: "emptyText", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { opened: "opened", closed: "closed", indexChange: "indexChange", imageError: "imageError" }, host: { listeners: { "document:keydown": "onDocumentKeydown($event)" } }, viewQueries: [{ propertyName: "closeButton", first: true, predicate: ["closeButton"], descendants: true, isSignal: true }], ngImport: i0, template: "<div\n class=\"image-preview\"\n [class.image-preview--disabled]=\"disabled()\"\n [style.--image-preview-thumb-size.px]=\"thumbnailSize()\"\n>\n @if (hasItems()) {\n <div class=\"image-preview__grid\" role=\"list\">\n @for (item of items(); track trackBySrc($index, item)) {\n <button\n type=\"button\"\n class=\"image-preview__thumb\"\n role=\"listitem\"\n [disabled]=\"disabled()\"\n [attr.aria-label]=\"item.alt || item.title || '\u9884\u89C8\u56FE\u7247'\"\n (click)=\"open($index)\"\n >\n @if (!isFailed(item.thumbnailSrc || item.src)) {\n <img\n class=\"image-preview__thumb-image\"\n [src]=\"item.thumbnailSrc || item.src\"\n [alt]=\"item.alt || item.title || ''\"\n (error)=\"onImageError($index, item, item.thumbnailSrc || item.src)\"\n />\n } @else {\n <span class=\"image-preview__thumb-fallback\" aria-hidden=\"true\">\n <i-lucide [img]=\"emptyIcon\"></i-lucide>\n </span>\n }\n </button>\n }\n </div>\n } @else {\n <div class=\"image-preview__empty\">\n <i-lucide [img]=\"emptyIcon\" aria-hidden=\"true\"></i-lucide>\n <span>{{ emptyText() }}</span>\n </div>\n }\n</div>\n\n@if (isOpen() && activeItem(); as item) {\n <div\n class=\"image-preview-modal\"\n role=\"dialog\"\n aria-modal=\"true\"\n [attr.aria-label]=\"item.alt || item.title || '\u56FE\u7247\u9884\u89C8'\"\n (click)=\"closeFromMask($event)\"\n >\n <div class=\"image-preview-modal__bar\">\n <div class=\"image-preview-modal__meta\">\n @if (showTitle() && item.title) {\n <div class=\"image-preview-modal__title\">{{ item.title }}</div>\n }\n @if (showCounter()) {\n <div class=\"image-preview-modal__counter\">{{ activeIndex() + 1 }} / {{ items().length }}</div>\n }\n </div>\n\n <div class=\"image-preview-modal__tools\" role=\"toolbar\" aria-label=\"\u56FE\u7247\u5DE5\u5177\u680F\">\n <button type=\"button\" class=\"image-preview-modal__tool\" [disabled]=\"!canZoomOut()\" (click)=\"zoomOut()\" aria-label=\"\u7F29\u5C0F\">\n <i-lucide [img]=\"zoomOutIcon\"></i-lucide>\n </button>\n <span class=\"image-preview-modal__zoom\">{{ zoomPercent() }}</span>\n <button type=\"button\" class=\"image-preview-modal__tool\" [disabled]=\"!canZoomIn()\" (click)=\"zoomIn()\" aria-label=\"\u653E\u5927\">\n <i-lucide [img]=\"zoomInIcon\"></i-lucide>\n </button>\n <button type=\"button\" class=\"image-preview-modal__tool\" (click)=\"rotateLeft()\" aria-label=\"\u5411\u5DE6\u65CB\u8F6C\">\n <i-lucide [img]=\"rotateLeftIcon\"></i-lucide>\n </button>\n <button type=\"button\" class=\"image-preview-modal__tool\" (click)=\"rotateRight()\" aria-label=\"\u5411\u53F3\u65CB\u8F6C\">\n <i-lucide [img]=\"rotateRightIcon\"></i-lucide>\n </button>\n <button type=\"button\" class=\"image-preview-modal__tool\" (click)=\"resetTransform()\" aria-label=\"\u91CD\u7F6E\">\n <span>1:1</span>\n </button>\n <button #closeButton type=\"button\" class=\"image-preview-modal__tool\" (click)=\"close()\" aria-label=\"\u5173\u95ED\">\n <i-lucide [img]=\"closeIcon\"></i-lucide>\n </button>\n </div>\n </div>\n\n <div class=\"image-preview-modal__stage\">\n @if (canGoPrev()) {\n <button type=\"button\" class=\"image-preview-modal__nav image-preview-modal__nav--prev\" (click)=\"previous()\" aria-label=\"\u4E0A\u4E00\u5F20\">\n <i-lucide [img]=\"prevIcon\"></i-lucide>\n </button>\n }\n\n @if (!isFailed(item.src)) {\n <img\n class=\"image-preview-modal__image\"\n [src]=\"item.src\"\n [alt]=\"item.alt || item.title || ''\"\n [style.transform]=\"imageTransform()\"\n (error)=\"onImageError(activeIndex(), item, item.src)\"\n />\n } @else {\n <div class=\"image-preview-modal__fallback\">\n <i-lucide [img]=\"emptyIcon\" aria-hidden=\"true\"></i-lucide>\n <span>\u56FE\u7247\u52A0\u8F7D\u5931\u8D25</span>\n </div>\n }\n\n @if (canGoNext()) {\n <button type=\"button\" class=\"image-preview-modal__nav image-preview-modal__nav--next\" (click)=\"next()\" aria-label=\"\u4E0B\u4E00\u5F20\">\n <i-lucide [img]=\"nextIcon\"></i-lucide>\n </button>\n }\n </div>\n\n @if (showThumbnails() && items().length > 1) {\n <div class=\"image-preview-modal__strip\" role=\"list\" aria-label=\"\u56FE\u7247\u7F29\u7565\u56FE\">\n @for (previewItem of items(); track trackBySrc($index, previewItem)) {\n <button\n type=\"button\"\n class=\"image-preview-modal__strip-item\"\n role=\"listitem\"\n [class.image-preview-modal__strip-item--active]=\"$index === activeIndex()\"\n [attr.aria-current]=\"$index === activeIndex() ? 'true' : null\"\n [attr.aria-label]=\"previewItem.alt || previewItem.title || '\u5207\u6362\u56FE\u7247'\"\n (click)=\"select($index)\"\n >\n @if (!isFailed(previewItem.thumbnailSrc || previewItem.src)) {\n <img\n [src]=\"previewItem.thumbnailSrc || previewItem.src\"\n [alt]=\"previewItem.alt || previewItem.title || ''\"\n (error)=\"onImageError($index, previewItem, previewItem.thumbnailSrc || previewItem.src)\"\n />\n } @else {\n <i-lucide [img]=\"emptyIcon\" aria-hidden=\"true\"></i-lucide>\n }\n </button>\n }\n </div>\n }\n </div>\n}\n", styles: [":host{display:block}.image-preview{--image-preview-thumb-size: 88px;color:var(--color-text-primary)}.image-preview__grid{display:flex;flex-wrap:wrap;gap:12px}.image-preview__thumb{width:var(--image-preview-thumb-size);height:var(--image-preview-thumb-size);padding:0;border:1px solid var(--color-border);border-radius:var(--radius-common-m);background:var(--color-surface-soft);overflow:hidden;cursor:pointer}.image-preview__thumb:hover:not(:disabled),.image-preview__thumb:focus-visible{border-color:var(--color-primary);outline:none;box-shadow:0 0 0 3px #1677ff2e}.image-preview__thumb:disabled{cursor:not-allowed;opacity:.65}.image-preview__thumb-image,.image-preview-modal__strip-item img{width:100%;height:100%;display:block;object-fit:cover}.image-preview__thumb-fallback,.image-preview__empty,.image-preview-modal__tool,.image-preview-modal__nav,.image-preview-modal__fallback,.image-preview-modal__strip-item{display:inline-flex;align-items:center;justify-content:center}.image-preview__thumb-fallback{width:100%;height:100%;color:var(--color-text-muted)}.image-preview__thumb-fallback i-lucide,.image-preview__empty i-lucide,.image-preview-modal__fallback i-lucide{width:28px;height:28px}.image-preview__empty{min-height:96px;border:1px dashed var(--color-border);border-radius:var(--radius-common-m);background:var(--color-surface-soft);color:var(--color-text-secondary);gap:8px;font-size:14px}.image-preview-modal{position:fixed;inset:0;z-index:1200;padding:16px;background:#000000d6;color:#fff;display:grid;grid-template-rows:auto minmax(0,1fr) auto;gap:16px}.image-preview-modal__bar{min-height:44px;display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:16px}.image-preview-modal__meta{min-width:0}.image-preview-modal__title{max-width:min(560px,58vw);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:16px;font-weight:var(--font-weight-semibold);line-height:24px}.image-preview-modal__counter{color:#ffffffb8;font-size:13px;line-height:20px}.image-preview-modal__tools{display:flex;align-items:center;gap:8px}.image-preview-modal__tool,.image-preview-modal__nav,.image-preview-modal__strip-item{border:0;color:var(--color-surface);cursor:pointer}.image-preview-modal__tool{min-width:36px;height:36px;padding:0 9px;border-radius:var(--radius-common-s);background:#ffffff24}.image-preview-modal__tool:hover,.image-preview-modal__tool:focus-visible,.image-preview-modal__nav:hover,.image-preview-modal__nav:focus-visible{background:#ffffff38;outline:none}.image-preview-modal__tool:disabled{cursor:not-allowed;opacity:.45}.image-preview-modal__tool i-lucide,.image-preview-modal__nav i-lucide{width:18px;height:18px;display:inline-flex;align-items:center;justify-content:center;line-height:0}.image-preview-modal__tool span{line-height:18px}.image-preview-modal__zoom{min-width:48px;text-align:center;font-size:13px;line-height:20px}.image-preview-modal__stage{min-height:0;position:relative;display:grid;place-items:center;overflow:hidden}.image-preview-modal__image{max-width:min(100%,1200px);max-height:100%;display:block;object-fit:contain;transform-origin:center;transition:transform .14s ease;-webkit-user-select:none;user-select:none}.image-preview-modal__nav{position:absolute;top:50%;z-index:1;width:44px;height:64px;border-radius:var(--radius-common-m);background:#00000057;transform:translateY(-50%)}.image-preview-modal__nav--prev{left:0}.image-preview-modal__nav--next{right:0}.image-preview-modal__fallback{width:min(420px,100%);min-height:220px;border:1px dashed rgba(255,255,255,.22);border-radius:var(--radius-common-m);background:#ffffff14;flex-direction:column;gap:10px;color:#ffffffb8}.image-preview-modal__strip{max-width:100%;justify-self:center;display:flex;gap:10px;overflow-x:auto;padding:4px 2px}.image-preview-modal__strip-item{width:58px;height:58px;flex:0 0 auto;padding:0;border:2px solid transparent;border-radius:var(--radius-common-s);background:#ffffff24;overflow:hidden}.image-preview-modal__strip-item--active,.image-preview-modal__strip-item:focus-visible{border-color:var(--color-primary);outline:none}\n"], dependencies: [{ kind: "ngmodule", type: LucideAngularModule }, { kind: "component", type: i1.LucideAngularComponent, selector: "lucide-angular, lucide-icon, i-lucide, span-lucide", inputs: ["class", "name", "img", "color", "absoluteStrokeWidth", "size", "strokeWidth"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
4823
|
+
}
|
|
4824
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: ImagePreview, decorators: [{
|
|
4825
|
+
type: Component,
|
|
4826
|
+
args: [{ selector: 's-image-preview', imports: [LucideAngularModule], changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
4827
|
+
'(document:keydown)': 'onDocumentKeydown($event)',
|
|
4828
|
+
}, template: "<div\n class=\"image-preview\"\n [class.image-preview--disabled]=\"disabled()\"\n [style.--image-preview-thumb-size.px]=\"thumbnailSize()\"\n>\n @if (hasItems()) {\n <div class=\"image-preview__grid\" role=\"list\">\n @for (item of items(); track trackBySrc($index, item)) {\n <button\n type=\"button\"\n class=\"image-preview__thumb\"\n role=\"listitem\"\n [disabled]=\"disabled()\"\n [attr.aria-label]=\"item.alt || item.title || '\u9884\u89C8\u56FE\u7247'\"\n (click)=\"open($index)\"\n >\n @if (!isFailed(item.thumbnailSrc || item.src)) {\n <img\n class=\"image-preview__thumb-image\"\n [src]=\"item.thumbnailSrc || item.src\"\n [alt]=\"item.alt || item.title || ''\"\n (error)=\"onImageError($index, item, item.thumbnailSrc || item.src)\"\n />\n } @else {\n <span class=\"image-preview__thumb-fallback\" aria-hidden=\"true\">\n <i-lucide [img]=\"emptyIcon\"></i-lucide>\n </span>\n }\n </button>\n }\n </div>\n } @else {\n <div class=\"image-preview__empty\">\n <i-lucide [img]=\"emptyIcon\" aria-hidden=\"true\"></i-lucide>\n <span>{{ emptyText() }}</span>\n </div>\n }\n</div>\n\n@if (isOpen() && activeItem(); as item) {\n <div\n class=\"image-preview-modal\"\n role=\"dialog\"\n aria-modal=\"true\"\n [attr.aria-label]=\"item.alt || item.title || '\u56FE\u7247\u9884\u89C8'\"\n (click)=\"closeFromMask($event)\"\n >\n <div class=\"image-preview-modal__bar\">\n <div class=\"image-preview-modal__meta\">\n @if (showTitle() && item.title) {\n <div class=\"image-preview-modal__title\">{{ item.title }}</div>\n }\n @if (showCounter()) {\n <div class=\"image-preview-modal__counter\">{{ activeIndex() + 1 }} / {{ items().length }}</div>\n }\n </div>\n\n <div class=\"image-preview-modal__tools\" role=\"toolbar\" aria-label=\"\u56FE\u7247\u5DE5\u5177\u680F\">\n <button type=\"button\" class=\"image-preview-modal__tool\" [disabled]=\"!canZoomOut()\" (click)=\"zoomOut()\" aria-label=\"\u7F29\u5C0F\">\n <i-lucide [img]=\"zoomOutIcon\"></i-lucide>\n </button>\n <span class=\"image-preview-modal__zoom\">{{ zoomPercent() }}</span>\n <button type=\"button\" class=\"image-preview-modal__tool\" [disabled]=\"!canZoomIn()\" (click)=\"zoomIn()\" aria-label=\"\u653E\u5927\">\n <i-lucide [img]=\"zoomInIcon\"></i-lucide>\n </button>\n <button type=\"button\" class=\"image-preview-modal__tool\" (click)=\"rotateLeft()\" aria-label=\"\u5411\u5DE6\u65CB\u8F6C\">\n <i-lucide [img]=\"rotateLeftIcon\"></i-lucide>\n </button>\n <button type=\"button\" class=\"image-preview-modal__tool\" (click)=\"rotateRight()\" aria-label=\"\u5411\u53F3\u65CB\u8F6C\">\n <i-lucide [img]=\"rotateRightIcon\"></i-lucide>\n </button>\n <button type=\"button\" class=\"image-preview-modal__tool\" (click)=\"resetTransform()\" aria-label=\"\u91CD\u7F6E\">\n <span>1:1</span>\n </button>\n <button #closeButton type=\"button\" class=\"image-preview-modal__tool\" (click)=\"close()\" aria-label=\"\u5173\u95ED\">\n <i-lucide [img]=\"closeIcon\"></i-lucide>\n </button>\n </div>\n </div>\n\n <div class=\"image-preview-modal__stage\">\n @if (canGoPrev()) {\n <button type=\"button\" class=\"image-preview-modal__nav image-preview-modal__nav--prev\" (click)=\"previous()\" aria-label=\"\u4E0A\u4E00\u5F20\">\n <i-lucide [img]=\"prevIcon\"></i-lucide>\n </button>\n }\n\n @if (!isFailed(item.src)) {\n <img\n class=\"image-preview-modal__image\"\n [src]=\"item.src\"\n [alt]=\"item.alt || item.title || ''\"\n [style.transform]=\"imageTransform()\"\n (error)=\"onImageError(activeIndex(), item, item.src)\"\n />\n } @else {\n <div class=\"image-preview-modal__fallback\">\n <i-lucide [img]=\"emptyIcon\" aria-hidden=\"true\"></i-lucide>\n <span>\u56FE\u7247\u52A0\u8F7D\u5931\u8D25</span>\n </div>\n }\n\n @if (canGoNext()) {\n <button type=\"button\" class=\"image-preview-modal__nav image-preview-modal__nav--next\" (click)=\"next()\" aria-label=\"\u4E0B\u4E00\u5F20\">\n <i-lucide [img]=\"nextIcon\"></i-lucide>\n </button>\n }\n </div>\n\n @if (showThumbnails() && items().length > 1) {\n <div class=\"image-preview-modal__strip\" role=\"list\" aria-label=\"\u56FE\u7247\u7F29\u7565\u56FE\">\n @for (previewItem of items(); track trackBySrc($index, previewItem)) {\n <button\n type=\"button\"\n class=\"image-preview-modal__strip-item\"\n role=\"listitem\"\n [class.image-preview-modal__strip-item--active]=\"$index === activeIndex()\"\n [attr.aria-current]=\"$index === activeIndex() ? 'true' : null\"\n [attr.aria-label]=\"previewItem.alt || previewItem.title || '\u5207\u6362\u56FE\u7247'\"\n (click)=\"select($index)\"\n >\n @if (!isFailed(previewItem.thumbnailSrc || previewItem.src)) {\n <img\n [src]=\"previewItem.thumbnailSrc || previewItem.src\"\n [alt]=\"previewItem.alt || previewItem.title || ''\"\n (error)=\"onImageError($index, previewItem, previewItem.thumbnailSrc || previewItem.src)\"\n />\n } @else {\n <i-lucide [img]=\"emptyIcon\" aria-hidden=\"true\"></i-lucide>\n }\n </button>\n }\n </div>\n }\n </div>\n}\n", styles: [":host{display:block}.image-preview{--image-preview-thumb-size: 88px;color:var(--color-text-primary)}.image-preview__grid{display:flex;flex-wrap:wrap;gap:12px}.image-preview__thumb{width:var(--image-preview-thumb-size);height:var(--image-preview-thumb-size);padding:0;border:1px solid var(--color-border);border-radius:var(--radius-common-m);background:var(--color-surface-soft);overflow:hidden;cursor:pointer}.image-preview__thumb:hover:not(:disabled),.image-preview__thumb:focus-visible{border-color:var(--color-primary);outline:none;box-shadow:0 0 0 3px #1677ff2e}.image-preview__thumb:disabled{cursor:not-allowed;opacity:.65}.image-preview__thumb-image,.image-preview-modal__strip-item img{width:100%;height:100%;display:block;object-fit:cover}.image-preview__thumb-fallback,.image-preview__empty,.image-preview-modal__tool,.image-preview-modal__nav,.image-preview-modal__fallback,.image-preview-modal__strip-item{display:inline-flex;align-items:center;justify-content:center}.image-preview__thumb-fallback{width:100%;height:100%;color:var(--color-text-muted)}.image-preview__thumb-fallback i-lucide,.image-preview__empty i-lucide,.image-preview-modal__fallback i-lucide{width:28px;height:28px}.image-preview__empty{min-height:96px;border:1px dashed var(--color-border);border-radius:var(--radius-common-m);background:var(--color-surface-soft);color:var(--color-text-secondary);gap:8px;font-size:14px}.image-preview-modal{position:fixed;inset:0;z-index:1200;padding:16px;background:#000000d6;color:#fff;display:grid;grid-template-rows:auto minmax(0,1fr) auto;gap:16px}.image-preview-modal__bar{min-height:44px;display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:16px}.image-preview-modal__meta{min-width:0}.image-preview-modal__title{max-width:min(560px,58vw);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:16px;font-weight:var(--font-weight-semibold);line-height:24px}.image-preview-modal__counter{color:#ffffffb8;font-size:13px;line-height:20px}.image-preview-modal__tools{display:flex;align-items:center;gap:8px}.image-preview-modal__tool,.image-preview-modal__nav,.image-preview-modal__strip-item{border:0;color:var(--color-surface);cursor:pointer}.image-preview-modal__tool{min-width:36px;height:36px;padding:0 9px;border-radius:var(--radius-common-s);background:#ffffff24}.image-preview-modal__tool:hover,.image-preview-modal__tool:focus-visible,.image-preview-modal__nav:hover,.image-preview-modal__nav:focus-visible{background:#ffffff38;outline:none}.image-preview-modal__tool:disabled{cursor:not-allowed;opacity:.45}.image-preview-modal__tool i-lucide,.image-preview-modal__nav i-lucide{width:18px;height:18px;display:inline-flex;align-items:center;justify-content:center;line-height:0}.image-preview-modal__tool span{line-height:18px}.image-preview-modal__zoom{min-width:48px;text-align:center;font-size:13px;line-height:20px}.image-preview-modal__stage{min-height:0;position:relative;display:grid;place-items:center;overflow:hidden}.image-preview-modal__image{max-width:min(100%,1200px);max-height:100%;display:block;object-fit:contain;transform-origin:center;transition:transform .14s ease;-webkit-user-select:none;user-select:none}.image-preview-modal__nav{position:absolute;top:50%;z-index:1;width:44px;height:64px;border-radius:var(--radius-common-m);background:#00000057;transform:translateY(-50%)}.image-preview-modal__nav--prev{left:0}.image-preview-modal__nav--next{right:0}.image-preview-modal__fallback{width:min(420px,100%);min-height:220px;border:1px dashed rgba(255,255,255,.22);border-radius:var(--radius-common-m);background:#ffffff14;flex-direction:column;gap:10px;color:#ffffffb8}.image-preview-modal__strip{max-width:100%;justify-self:center;display:flex;gap:10px;overflow-x:auto;padding:4px 2px}.image-preview-modal__strip-item{width:58px;height:58px;flex:0 0 auto;padding:0;border:2px solid transparent;border-radius:var(--radius-common-s);background:#ffffff24;overflow:hidden}.image-preview-modal__strip-item--active,.image-preview-modal__strip-item:focus-visible{border-color:var(--color-primary);outline:none}\n"] }]
|
|
4829
|
+
}], propDecorators: { items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], initialIndex: [{ type: i0.Input, args: [{ isSignal: true, alias: "initialIndex", required: false }] }], thumbnailSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "thumbnailSize", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], showCounter: [{ type: i0.Input, args: [{ isSignal: true, alias: "showCounter", required: false }] }], showTitle: [{ type: i0.Input, args: [{ isSignal: true, alias: "showTitle", required: false }] }], showThumbnails: [{ type: i0.Input, args: [{ isSignal: true, alias: "showThumbnails", required: false }] }], closeOnMaskClick: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeOnMaskClick", required: false }] }], zoomStep: [{ type: i0.Input, args: [{ isSignal: true, alias: "zoomStep", required: false }] }], minZoom: [{ type: i0.Input, args: [{ isSignal: true, alias: "minZoom", required: false }] }], maxZoom: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxZoom", required: false }] }], emptyText: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyText", required: false }] }], opened: [{ type: i0.Output, args: ["opened"] }], closed: [{ type: i0.Output, args: ["closed"] }], indexChange: [{ type: i0.Output, args: ["indexChange"] }], imageError: [{ type: i0.Output, args: ["imageError"] }], closeButton: [{ type: i0.ViewChild, args: ['closeButton', { isSignal: true }] }] } });
|
|
4830
|
+
|
|
4831
|
+
class Header {
|
|
4832
|
+
ariaLabel = input('顶部导航', ...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
|
|
4833
|
+
title = input('', ...(ngDevMode ? [{ debugName: "title" }] : /* istanbul ignore next */ []));
|
|
4834
|
+
description = input('', ...(ngDevMode ? [{ debugName: "description" }] : /* istanbul ignore next */ []));
|
|
4835
|
+
titleAlign = input('left', ...(ngDevMode ? [{ debugName: "titleAlign" }] : /* istanbul ignore next */ []));
|
|
4836
|
+
size = input('default', ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
4837
|
+
surface = input('transparent', ...(ngDevMode ? [{ debugName: "surface" }] : /* istanbul ignore next */ []));
|
|
4838
|
+
inset = input('none', ...(ngDevMode ? [{ debugName: "inset" }] : /* istanbul ignore next */ []));
|
|
4839
|
+
showBack = input(false, ...(ngDevMode ? [{ debugName: "showBack" }] : /* istanbul ignore next */ []));
|
|
4840
|
+
showDropdown = input(false, ...(ngDevMode ? [{ debugName: "showDropdown" }] : /* istanbul ignore next */ []));
|
|
4841
|
+
showDescriptionDropdown = input(false, ...(ngDevMode ? [{ debugName: "showDescriptionDropdown" }] : /* istanbul ignore next */ []));
|
|
4842
|
+
showStatusBar = input(false, ...(ngDevMode ? [{ debugName: "showStatusBar" }] : /* istanbul ignore next */ []));
|
|
4843
|
+
statusTime = input('10:00', ...(ngDevMode ? [{ debugName: "statusTime" }] : /* istanbul ignore next */ []));
|
|
4844
|
+
actions = input([], ...(ngDevMode ? [{ debugName: "actions" }] : /* istanbul ignore next */ []));
|
|
4845
|
+
backClicked = output();
|
|
4846
|
+
titleClicked = output();
|
|
4847
|
+
actionSelected = output();
|
|
4848
|
+
backIcon = ChevronLeftIcon;
|
|
4849
|
+
downIcon = ChevronDownIcon;
|
|
4850
|
+
signalIcon = SignalHighIcon;
|
|
4851
|
+
wifiIcon = WifiHighIcon;
|
|
4852
|
+
batteryIcon = BatteryFullIcon;
|
|
4853
|
+
hasActions = computed(() => this.actions().length > 0, ...(ngDevMode ? [{ debugName: "hasActions" }] : /* istanbul ignore next */ []));
|
|
4854
|
+
hasStart = computed(() => this.showBack(), ...(ngDevMode ? [{ debugName: "hasStart" }] : /* istanbul ignore next */ []));
|
|
4855
|
+
isTitleInteractive = computed(() => this.showDropdown() || this.showDescriptionDropdown(), ...(ngDevMode ? [{ debugName: "isTitleInteractive" }] : /* istanbul ignore next */ []));
|
|
4856
|
+
titleButtonAriaLabel = computed(() => this.showDropdown() || this.showDescriptionDropdown()
|
|
4857
|
+
? `${this.title() || '标题'},展开`
|
|
4009
4858
|
: this.title() || '标题', ...(ngDevMode ? [{ debugName: "titleButtonAriaLabel" }] : /* istanbul ignore next */ []));
|
|
4010
4859
|
onBackClick() {
|
|
4011
4860
|
this.backClicked.emit();
|
|
@@ -4467,19 +5316,17 @@ class ListPageLayoutComponent {
|
|
|
4467
5316
|
sidebarSlot = contentChild(ListPageSidebarSlotDirective, ...(ngDevMode ? [{ debugName: "sidebarSlot" }] : /* istanbul ignore next */ []));
|
|
4468
5317
|
sidebarComponent = contentChild(ListPageSidebarComponent, ...(ngDevMode ? [{ debugName: "sidebarComponent" }] : /* istanbul ignore next */ []));
|
|
4469
5318
|
paginationTemplate = contentChild(ListPagePaginationSlotDirective, { ...(ngDevMode ? { debugName: "paginationTemplate" } : /* istanbul ignore next */ {}), read: TemplateRef });
|
|
4470
|
-
paginationComponent = contentChild(ListPagePaginationComponent, ...(ngDevMode ? [{ debugName: "paginationComponent" }] : /* istanbul ignore next */ []));
|
|
4471
5319
|
desktopContentTemplate = contentChild(ListPageContentDesktopSlotDirective, { ...(ngDevMode ? { debugName: "desktopContentTemplate" } : /* istanbul ignore next */ {}), read: TemplateRef });
|
|
4472
5320
|
hasSidebar = computed(() => !!this.sidebarSlot() || !!this.sidebarComponent(), ...(ngDevMode ? [{ debugName: "hasSidebar" }] : /* istanbul ignore next */ []));
|
|
4473
|
-
hasPagination = computed(() => !!this.paginationTemplate() || !!this.paginationComponent(), ...(ngDevMode ? [{ debugName: "hasPagination" }] : /* istanbul ignore next */ []));
|
|
4474
5321
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: ListPageLayoutComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4475
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: ListPageLayoutComponent, isStandalone: true, selector: "s-list-page-layout", queries: [{ propertyName: "sidebarSlot", first: true, predicate: ListPageSidebarSlotDirective, descendants: true, isSignal: true }, { propertyName: "sidebarComponent", first: true, predicate: ListPageSidebarComponent, descendants: true, isSignal: true }, { propertyName: "paginationTemplate", first: true, predicate: ListPagePaginationSlotDirective, descendants: true, read: TemplateRef, isSignal: true }, { propertyName: "
|
|
5322
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: ListPageLayoutComponent, isStandalone: true, selector: "s-list-page-layout", queries: [{ propertyName: "sidebarSlot", first: true, predicate: ListPageSidebarSlotDirective, descendants: true, isSignal: true }, { propertyName: "sidebarComponent", first: true, predicate: ListPageSidebarComponent, descendants: true, isSignal: true }, { propertyName: "paginationTemplate", first: true, predicate: ListPagePaginationSlotDirective, descendants: true, read: TemplateRef, isSignal: true }, { propertyName: "desktopContentTemplate", first: true, predicate: ListPageContentDesktopSlotDirective, descendants: true, read: TemplateRef, isSignal: true }], ngImport: i0, template: "<header>\r\n <ng-content select=\"[SListPageHeader]\"/>\r\n <ng-content select=\"s-list-page-header\"/>\r\n <ng-content select=\"[SListPageSummary]\"/>\r\n <ng-content select=\"s-filter-summary\"/>\r\n</header>\r\n<main>\r\n @if (hasSidebar()) {\r\n <aside>\r\n <ng-content select=\"[SListPageSidebar]\"/>\r\n <ng-content select=\"s-list-page-sidebar\"/>\r\n </aside>\r\n }\r\n <section>\r\n @if (desktopContentTemplate(); as contentTemplate) {\r\n <ng-container [ngTemplateOutlet]=\"contentTemplate\"/>\r\n }\r\n <ng-content select=\"s-list-page-content-desktop\"/>\r\n </section>\r\n</main>\r\n<footer>\r\n @if (paginationTemplate(); as footerTemplate) {\r\n <ng-container [ngTemplateOutlet]=\"footerTemplate\"/>\r\n }\r\n <ng-content select=\"s-list-page-pagination\"/>\r\n</footer>\r\n\r\n", styles: ["s-list-page-layout{display:flex;flex-direction:column;height:100%;min-height:0;padding:var(--space-3);box-sizing:border-box;gap:var(--space-3);background:var(--color-bg);overflow:hidden}s-list-page-layout>header{flex:0 0 auto;position:sticky;top:0;z-index:2;border:1px solid var(--color-divider);border-radius:var(--radius-common-l);background:var(--color-surface);box-shadow:var(--shadow-common-s)}s-list-page-layout>main{flex:1 1 auto;display:flex;min-height:0;border:1px solid var(--color-divider);border-radius:var(--radius-common-l);background:var(--color-surface);box-shadow:var(--shadow-common-s);overflow:hidden}s-list-page-layout>main>aside{display:flex;flex:0 0 240px;width:240px;min-width:0;padding:16px;border-right:1px solid var(--color-border);background:var(--color-surface);overflow:hidden;box-sizing:border-box}s-list-page-layout>main>section{flex:1 1 auto;min-width:0;padding:16px;background:var(--color-surface);overflow:auto;box-sizing:border-box}s-list-page-layout>footer{flex:0 0 auto;height:50px;display:flex;align-items:center;padding:0 16px;border:1px solid var(--color-divider);border-radius:var(--radius-common-l);background:var(--color-surface);box-shadow:var(--shadow-common-s)}s-list-page-layout>footer:empty{display:none}s-list-page-layout>main>aside>s-list-page-sidebar,s-list-page-layout>main>aside>[SListPageSidebar]{display:flex;flex:1 1 auto;flex-direction:column;gap:var(--space-3);min-width:0;min-height:0}s-list-page-layout [SListPageSidebarSearch]{position:sticky;top:0;z-index:1;flex:0 0 auto;background:var(--color-surface)}s-list-page-layout [SListPageSidebarTree]{flex:1 1 auto;min-height:0;overflow:auto}s-list-page-layout [SListPageHeaderLayout]{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:flex-start;gap:var(--space-4);padding:var(--space-4);min-width:0;background:var(--color-surface)}s-list-page-layout [SListPageHeaderFilters]{min-width:0}s-list-page-layout [SListPageHeaderLayout]>[SListPageHeaderFilters],s-list-page-layout [SListPageHeaderLayout]>:has([SListPageHeaderFilters]){justify-self:stretch;min-width:0}s-list-page-layout [SListPageHeaderLayout]>:not([SListPageHeaderFilters]):not(:has([SListPageHeaderFilters])){justify-self:end;min-width:0}s-list-page-layout [SListPageSummary]{display:block;width:auto;margin:var(--space-2) var(--space-4) var(--space-3)}s-list-page-layout [SListPageHeaderActions]{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:var(--space-3);min-width:0;margin-left:auto}s-list-page-layout [SListPageFilterGrid]{display:flex;flex-wrap:wrap;align-items:center;gap:var(--space-3) var(--space-4);min-width:0}s-list-page-layout [SListPageFilterField]{display:inline-flex;align-items:center;gap:var(--space-2);min-width:0;color:var(--color-text-primary);font-size:var(--font-size-sm);line-height:var(--line-height-sm)}s-list-page-layout [SListPageFilterLabel],s-list-page-layout [SListPageFilterField]>span:first-child{color:var(--color-text-secondary);font-size:var(--font-size-sm);font-weight:var(--font-weight-medium);line-height:var(--line-height-sm);white-space:nowrap;flex:0 0 auto}s-list-page-layout [SListPageFilterLabel]{display:none}s-list-page-layout [SListPageFilterControl],s-list-page-layout [SListPageFilterField] input,s-list-page-layout [SListPageFilterField] select,s-list-page-layout [SListPageFilterField] s-select,s-list-page-layout [SListPageFilterField] s-date-picker{min-width:0}s-list-page-layout [SListPageFilterActions]{display:flex;flex-wrap:wrap;align-items:center;gap:var(--space-2);min-width:0}s-list-page-layout [SListPageTableWrap]{width:100%;min-height:auto;overflow-x:auto;overflow-y:visible;border:0;border-radius:var(--radius-common-m);background:var(--color-surface);box-sizing:border-box}s-list-page-layout [SListPageTableWrap][data-with-tabs]{min-height:0;height:100%;display:grid;grid-template-rows:auto minmax(0,1fr);overflow:hidden}s-list-page-layout [SListPageTabs]{display:flex;align-items:center;gap:var(--list-page-status-tabs-gap, 1.5rem);min-height:var(--list-page-status-tabs-height, 3.375rem);padding:var(--list-page-status-tabs-padding, 0 .75rem);border-bottom:1px solid var(--list-page-status-tabs-border-color, var(--color-divider));box-sizing:border-box}s-list-page-layout [SListPageTab]{position:relative;height:var(--list-page-status-tabs-height, 3.375rem);padding:0;border:0;background:transparent;color:var(--list-page-status-tabs-color, var(--color-text-secondary));font:inherit;cursor:pointer}s-list-page-layout [SListPageTab]:is(.is-active,[aria-selected=true]){color:var(--list-page-status-tabs-active-color, var(--color-primary))}s-list-page-layout [SListPageTab]:is(.is-active,[aria-selected=true]):after{position:absolute;right:0;bottom:0;left:0;height:2px;background:var(--list-page-status-tabs-active-color, var(--color-primary));content:\"\"}s-list-page-layout [SListPageTableScroll]{min-height:0;overflow:auto}s-list-page-layout table[SListPageTable]{width:100%;min-width:var(--list-page-table-min-width, 48rem);table-layout:fixed}s-list-page-layout [SListPageCellText]{display:block;width:100%;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}s-list-page-layout [SListPageCheckboxCol]{width:var(--list-page-checkbox-col-width, 3.5rem);min-width:var(--list-page-checkbox-col-width, 3.5rem);text-align:center}s-list-page-layout [SListPageActionCol]{width:var(--list-page-action-col-width, 5rem);min-width:var(--list-page-action-col-width, 5rem);white-space:nowrap}s-list-page-layout table[SListPageTable]:has(tbody td:last-child[SListPageActionCol]) thead th:last-child,s-list-page-layout table[SListPageTable]:has(tbody td:last-child[SListPageActionCol]) tbody td:last-child[SListPageActionCol]{width:var(--list-page-action-col-width, 5rem);min-width:var(--list-page-action-col-width, 5rem)}s-list-page-layout [SListPageEmpty]{height:8rem;color:var(--color-text-secondary);text-align:center}s-list-page-layout [SListPageRowActions]{position:relative;display:inline-flex;align-items:center;justify-content:center;gap:var(--space-2)}s-list-page-layout [SListPageRowActionTrigger]{min-height:1.75rem;padding:0 var(--space-2);border:0;border-radius:var(--radius-common-s);background:transparent;color:var(--color-primary);font-size:var(--font-size-xs);font-family:inherit;cursor:pointer}s-list-page-layout [SListPageRowActionDanger]{color:var(--list-page-danger-action-color, var(--color-error))}s-list-page-layout [SListPageIconButton]{display:inline-flex;align-items:center;justify-content:center;gap:var(--space-1);line-height:1}s-list-page-layout [SListPageFileAction]{cursor:pointer}s-list-page-layout [SListPageFileAction] input{display:none}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
4476
5323
|
}
|
|
4477
5324
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: ListPageLayoutComponent, decorators: [{
|
|
4478
5325
|
type: Component,
|
|
4479
|
-
args: [{ selector: 's-list-page-layout', imports: [NgTemplateOutlet], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<header>\r\n <ng-content select=\"[SListPageHeader]\"/>\r\n <ng-content select=\"s-list-page-header\"/>\r\n <ng-content select=\"[SListPageSummary]\"/>\r\n <ng-content select=\"s-filter-summary\"/>\r\n</header>\r\n<main>\r\n @if (hasSidebar()) {\r\n <aside>\r\n <ng-content select=\"[SListPageSidebar]\"/>\r\n <ng-content select=\"s-list-page-sidebar\"/>\r\n </aside>\r\n }\r\n <section>\r\n @if (desktopContentTemplate(); as contentTemplate) {\r\n <ng-container [ngTemplateOutlet]=\"contentTemplate\"/>\r\n }\r\n <ng-content select=\"s-list-page-content-desktop\"/>\r\n </section>\r\n</main>\r\n
|
|
5326
|
+
args: [{ selector: 's-list-page-layout', imports: [NgTemplateOutlet], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<header>\r\n <ng-content select=\"[SListPageHeader]\"/>\r\n <ng-content select=\"s-list-page-header\"/>\r\n <ng-content select=\"[SListPageSummary]\"/>\r\n <ng-content select=\"s-filter-summary\"/>\r\n</header>\r\n<main>\r\n @if (hasSidebar()) {\r\n <aside>\r\n <ng-content select=\"[SListPageSidebar]\"/>\r\n <ng-content select=\"s-list-page-sidebar\"/>\r\n </aside>\r\n }\r\n <section>\r\n @if (desktopContentTemplate(); as contentTemplate) {\r\n <ng-container [ngTemplateOutlet]=\"contentTemplate\"/>\r\n }\r\n <ng-content select=\"s-list-page-content-desktop\"/>\r\n </section>\r\n</main>\r\n<footer>\r\n @if (paginationTemplate(); as footerTemplate) {\r\n <ng-container [ngTemplateOutlet]=\"footerTemplate\"/>\r\n }\r\n <ng-content select=\"s-list-page-pagination\"/>\r\n</footer>\r\n\r\n", styles: ["s-list-page-layout{display:flex;flex-direction:column;height:100%;min-height:0;padding:var(--space-3);box-sizing:border-box;gap:var(--space-3);background:var(--color-bg);overflow:hidden}s-list-page-layout>header{flex:0 0 auto;position:sticky;top:0;z-index:2;border:1px solid var(--color-divider);border-radius:var(--radius-common-l);background:var(--color-surface);box-shadow:var(--shadow-common-s)}s-list-page-layout>main{flex:1 1 auto;display:flex;min-height:0;border:1px solid var(--color-divider);border-radius:var(--radius-common-l);background:var(--color-surface);box-shadow:var(--shadow-common-s);overflow:hidden}s-list-page-layout>main>aside{display:flex;flex:0 0 240px;width:240px;min-width:0;padding:16px;border-right:1px solid var(--color-border);background:var(--color-surface);overflow:hidden;box-sizing:border-box}s-list-page-layout>main>section{flex:1 1 auto;min-width:0;padding:16px;background:var(--color-surface);overflow:auto;box-sizing:border-box}s-list-page-layout>footer{flex:0 0 auto;height:50px;display:flex;align-items:center;padding:0 16px;border:1px solid var(--color-divider);border-radius:var(--radius-common-l);background:var(--color-surface);box-shadow:var(--shadow-common-s)}s-list-page-layout>footer:empty{display:none}s-list-page-layout>main>aside>s-list-page-sidebar,s-list-page-layout>main>aside>[SListPageSidebar]{display:flex;flex:1 1 auto;flex-direction:column;gap:var(--space-3);min-width:0;min-height:0}s-list-page-layout [SListPageSidebarSearch]{position:sticky;top:0;z-index:1;flex:0 0 auto;background:var(--color-surface)}s-list-page-layout [SListPageSidebarTree]{flex:1 1 auto;min-height:0;overflow:auto}s-list-page-layout [SListPageHeaderLayout]{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:flex-start;gap:var(--space-4);padding:var(--space-4);min-width:0;background:var(--color-surface)}s-list-page-layout [SListPageHeaderFilters]{min-width:0}s-list-page-layout [SListPageHeaderLayout]>[SListPageHeaderFilters],s-list-page-layout [SListPageHeaderLayout]>:has([SListPageHeaderFilters]){justify-self:stretch;min-width:0}s-list-page-layout [SListPageHeaderLayout]>:not([SListPageHeaderFilters]):not(:has([SListPageHeaderFilters])){justify-self:end;min-width:0}s-list-page-layout [SListPageSummary]{display:block;width:auto;margin:var(--space-2) var(--space-4) var(--space-3)}s-list-page-layout [SListPageHeaderActions]{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:var(--space-3);min-width:0;margin-left:auto}s-list-page-layout [SListPageFilterGrid]{display:flex;flex-wrap:wrap;align-items:center;gap:var(--space-3) var(--space-4);min-width:0}s-list-page-layout [SListPageFilterField]{display:inline-flex;align-items:center;gap:var(--space-2);min-width:0;color:var(--color-text-primary);font-size:var(--font-size-sm);line-height:var(--line-height-sm)}s-list-page-layout [SListPageFilterLabel],s-list-page-layout [SListPageFilterField]>span:first-child{color:var(--color-text-secondary);font-size:var(--font-size-sm);font-weight:var(--font-weight-medium);line-height:var(--line-height-sm);white-space:nowrap;flex:0 0 auto}s-list-page-layout [SListPageFilterLabel]{display:none}s-list-page-layout [SListPageFilterControl],s-list-page-layout [SListPageFilterField] input,s-list-page-layout [SListPageFilterField] select,s-list-page-layout [SListPageFilterField] s-select,s-list-page-layout [SListPageFilterField] s-date-picker{min-width:0}s-list-page-layout [SListPageFilterActions]{display:flex;flex-wrap:wrap;align-items:center;gap:var(--space-2);min-width:0}s-list-page-layout [SListPageTableWrap]{width:100%;min-height:auto;overflow-x:auto;overflow-y:visible;border:0;border-radius:var(--radius-common-m);background:var(--color-surface);box-sizing:border-box}s-list-page-layout [SListPageTableWrap][data-with-tabs]{min-height:0;height:100%;display:grid;grid-template-rows:auto minmax(0,1fr);overflow:hidden}s-list-page-layout [SListPageTabs]{display:flex;align-items:center;gap:var(--list-page-status-tabs-gap, 1.5rem);min-height:var(--list-page-status-tabs-height, 3.375rem);padding:var(--list-page-status-tabs-padding, 0 .75rem);border-bottom:1px solid var(--list-page-status-tabs-border-color, var(--color-divider));box-sizing:border-box}s-list-page-layout [SListPageTab]{position:relative;height:var(--list-page-status-tabs-height, 3.375rem);padding:0;border:0;background:transparent;color:var(--list-page-status-tabs-color, var(--color-text-secondary));font:inherit;cursor:pointer}s-list-page-layout [SListPageTab]:is(.is-active,[aria-selected=true]){color:var(--list-page-status-tabs-active-color, var(--color-primary))}s-list-page-layout [SListPageTab]:is(.is-active,[aria-selected=true]):after{position:absolute;right:0;bottom:0;left:0;height:2px;background:var(--list-page-status-tabs-active-color, var(--color-primary));content:\"\"}s-list-page-layout [SListPageTableScroll]{min-height:0;overflow:auto}s-list-page-layout table[SListPageTable]{width:100%;min-width:var(--list-page-table-min-width, 48rem);table-layout:fixed}s-list-page-layout [SListPageCellText]{display:block;width:100%;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}s-list-page-layout [SListPageCheckboxCol]{width:var(--list-page-checkbox-col-width, 3.5rem);min-width:var(--list-page-checkbox-col-width, 3.5rem);text-align:center}s-list-page-layout [SListPageActionCol]{width:var(--list-page-action-col-width, 5rem);min-width:var(--list-page-action-col-width, 5rem);white-space:nowrap}s-list-page-layout table[SListPageTable]:has(tbody td:last-child[SListPageActionCol]) thead th:last-child,s-list-page-layout table[SListPageTable]:has(tbody td:last-child[SListPageActionCol]) tbody td:last-child[SListPageActionCol]{width:var(--list-page-action-col-width, 5rem);min-width:var(--list-page-action-col-width, 5rem)}s-list-page-layout [SListPageEmpty]{height:8rem;color:var(--color-text-secondary);text-align:center}s-list-page-layout [SListPageRowActions]{position:relative;display:inline-flex;align-items:center;justify-content:center;gap:var(--space-2)}s-list-page-layout [SListPageRowActionTrigger]{min-height:1.75rem;padding:0 var(--space-2);border:0;border-radius:var(--radius-common-s);background:transparent;color:var(--color-primary);font-size:var(--font-size-xs);font-family:inherit;cursor:pointer}s-list-page-layout [SListPageRowActionDanger]{color:var(--list-page-danger-action-color, var(--color-error))}s-list-page-layout [SListPageIconButton]{display:inline-flex;align-items:center;justify-content:center;gap:var(--space-1);line-height:1}s-list-page-layout [SListPageFileAction]{cursor:pointer}s-list-page-layout [SListPageFileAction] input{display:none}\n"] }]
|
|
4480
5327
|
}], propDecorators: { sidebarSlot: [{ type: i0.ContentChild, args: [i0.forwardRef(() => ListPageSidebarSlotDirective), { isSignal: true }] }], sidebarComponent: [{ type: i0.ContentChild, args: [i0.forwardRef(() => ListPageSidebarComponent), { isSignal: true }] }], paginationTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => ListPagePaginationSlotDirective), { ...{
|
|
4481
5328
|
read: TemplateRef,
|
|
4482
|
-
}, isSignal: true }] }],
|
|
5329
|
+
}, isSignal: true }] }], desktopContentTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => ListPageContentDesktopSlotDirective), { ...{
|
|
4483
5330
|
read: TemplateRef,
|
|
4484
5331
|
}, isSignal: true }] }] } });
|
|
4485
5332
|
|
|
@@ -4530,6 +5377,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
|
|
|
4530
5377
|
|
|
4531
5378
|
class PlatformLoginPage {
|
|
4532
5379
|
brandMark = input('OA', ...(ngDevMode ? [{ debugName: "brandMark" }] : /* istanbul ignore next */ []));
|
|
5380
|
+
brandLogo = input('', ...(ngDevMode ? [{ debugName: "brandLogo" }] : /* istanbul ignore next */ []));
|
|
4533
5381
|
brandName = input('Workspace', ...(ngDevMode ? [{ debugName: "brandName" }] : /* istanbul ignore next */ []));
|
|
4534
5382
|
productName = input('智能办公平台', ...(ngDevMode ? [{ debugName: "productName" }] : /* istanbul ignore next */ []));
|
|
4535
5383
|
heroAriaLabel = input('工作台登录页', ...(ngDevMode ? [{ debugName: "heroAriaLabel" }] : /* istanbul ignore next */ []));
|
|
@@ -4558,6 +5406,7 @@ class PlatformLoginPage {
|
|
|
4558
5406
|
errorMessage = input('', ...(ngDevMode ? [{ debugName: "errorMessage" }] : /* istanbul ignore next */ []));
|
|
4559
5407
|
submitting = input(false, ...(ngDevMode ? [{ debugName: "submitting" }] : /* istanbul ignore next */ []));
|
|
4560
5408
|
defaultUsername = input('', ...(ngDevMode ? [{ debugName: "defaultUsername" }] : /* istanbul ignore next */ []));
|
|
5409
|
+
defaultPassword = input('', ...(ngDevMode ? [{ debugName: "defaultPassword" }] : /* istanbul ignore next */ []));
|
|
4561
5410
|
rememberDefault = input(true, ...(ngDevMode ? [{ debugName: "rememberDefault" }] : /* istanbul ignore next */ []));
|
|
4562
5411
|
showForgotPassword = input(true, ...(ngDevMode ? [{ debugName: "showForgotPassword" }] : /* istanbul ignore next */ []));
|
|
4563
5412
|
showRegister = input(true, ...(ngDevMode ? [{ debugName: "showRegister" }] : /* istanbul ignore next */ []));
|
|
@@ -4578,9 +5427,17 @@ class PlatformLoginPage {
|
|
|
4578
5427
|
rememberMe = signal(true, ...(ngDevMode ? [{ debugName: "rememberMe" }] : /* istanbul ignore next */ []));
|
|
4579
5428
|
showPassword = signal(false, ...(ngDevMode ? [{ debugName: "showPassword" }] : /* istanbul ignore next */ []));
|
|
4580
5429
|
localErrorMessage = signal('', ...(ngDevMode ? [{ debugName: "localErrorMessage" }] : /* istanbul ignore next */ []));
|
|
5430
|
+
brandLogoLabel = computed(() => {
|
|
5431
|
+
const label = [this.brandName(), this.productName()]
|
|
5432
|
+
.map((value) => value.trim())
|
|
5433
|
+
.filter(Boolean)
|
|
5434
|
+
.join(' ');
|
|
5435
|
+
return label || this.brandMark();
|
|
5436
|
+
}, ...(ngDevMode ? [{ debugName: "brandLogoLabel" }] : /* istanbul ignore next */ []));
|
|
4581
5437
|
visibleErrorMessage = computed(() => this.errorMessage() || this.localErrorMessage(), ...(ngDevMode ? [{ debugName: "visibleErrorMessage" }] : /* istanbul ignore next */ []));
|
|
4582
5438
|
ngOnInit() {
|
|
4583
5439
|
this.username.set(this.defaultUsername());
|
|
5440
|
+
this.password.set(this.defaultPassword());
|
|
4584
5441
|
this.rememberMe.set(this.rememberDefault());
|
|
4585
5442
|
}
|
|
4586
5443
|
togglePassword() {
|
|
@@ -4625,15 +5482,16 @@ class PlatformLoginPage {
|
|
|
4625
5482
|
return provider.label.trim().slice(0, 1).toUpperCase() || '?';
|
|
4626
5483
|
}
|
|
4627
5484
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: PlatformLoginPage, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4628
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: PlatformLoginPage, isStandalone: true, selector: "s-login-page", inputs: { brandMark: { classPropertyName: "brandMark", publicName: "brandMark", isSignal: true, isRequired: false, transformFunction: null }, brandName: { classPropertyName: "brandName", publicName: "brandName", isSignal: true, isRequired: false, transformFunction: null }, productName: { classPropertyName: "productName", publicName: "productName", isSignal: true, isRequired: false, transformFunction: null }, heroAriaLabel: { classPropertyName: "heroAriaLabel", publicName: "heroAriaLabel", isSignal: true, isRequired: false, transformFunction: null }, heroEyebrow: { classPropertyName: "heroEyebrow", publicName: "heroEyebrow", isSignal: true, isRequired: false, transformFunction: null }, heroTitle: { classPropertyName: "heroTitle", publicName: "heroTitle", isSignal: true, isRequired: false, transformFunction: null }, heroText: { classPropertyName: "heroText", publicName: "heroText", isSignal: true, isRequired: false, transformFunction: null }, features: { classPropertyName: "features", publicName: "features", isSignal: true, isRequired: false, transformFunction: null }, showLanguageSwitcher: { classPropertyName: "showLanguageSwitcher", publicName: "showLanguageSwitcher", isSignal: true, isRequired: false, transformFunction: null }, languageLabel: { classPropertyName: "languageLabel", publicName: "languageLabel", isSignal: true, isRequired: false, transformFunction: null }, panelEyebrow: { classPropertyName: "panelEyebrow", publicName: "panelEyebrow", isSignal: true, isRequired: false, transformFunction: null }, panelTitle: { classPropertyName: "panelTitle", publicName: "panelTitle", isSignal: true, isRequired: false, transformFunction: null }, panelSubtitle: { classPropertyName: "panelSubtitle", publicName: "panelSubtitle", isSignal: true, isRequired: false, transformFunction: null }, usernameLabel: { classPropertyName: "usernameLabel", publicName: "usernameLabel", isSignal: true, isRequired: false, transformFunction: null }, passwordLabel: { classPropertyName: "passwordLabel", publicName: "passwordLabel", isSignal: true, isRequired: false, transformFunction: null }, usernamePlaceholder: { classPropertyName: "usernamePlaceholder", publicName: "usernamePlaceholder", isSignal: true, isRequired: false, transformFunction: null }, passwordPlaceholder: { classPropertyName: "passwordPlaceholder", publicName: "passwordPlaceholder", isSignal: true, isRequired: false, transformFunction: null }, rememberLabel: { classPropertyName: "rememberLabel", publicName: "rememberLabel", isSignal: true, isRequired: false, transformFunction: null }, forgotPasswordText: { classPropertyName: "forgotPasswordText", publicName: "forgotPasswordText", isSignal: true, isRequired: false, transformFunction: null }, dividerText: { classPropertyName: "dividerText", publicName: "dividerText", isSignal: true, isRequired: false, transformFunction: null }, registerPrompt: { classPropertyName: "registerPrompt", publicName: "registerPrompt", isSignal: true, isRequired: false, transformFunction: null }, registerText: { classPropertyName: "registerText", publicName: "registerText", isSignal: true, isRequired: false, transformFunction: null }, metaText: { classPropertyName: "metaText", publicName: "metaText", isSignal: true, isRequired: false, transformFunction: null }, submitText: { classPropertyName: "submitText", publicName: "submitText", isSignal: true, isRequired: false, transformFunction: null }, submittingText: { classPropertyName: "submittingText", publicName: "submittingText", isSignal: true, isRequired: false, transformFunction: null }, emptyMessage: { classPropertyName: "emptyMessage", publicName: "emptyMessage", isSignal: true, isRequired: false, transformFunction: null }, errorMessage: { classPropertyName: "errorMessage", publicName: "errorMessage", isSignal: true, isRequired: false, transformFunction: null }, submitting: { classPropertyName: "submitting", publicName: "submitting", isSignal: true, isRequired: false, transformFunction: null }, defaultUsername: { classPropertyName: "defaultUsername", publicName: "defaultUsername", isSignal: true, isRequired: false, transformFunction: null }, rememberDefault: { classPropertyName: "rememberDefault", publicName: "rememberDefault", isSignal: true, isRequired: false, transformFunction: null }, showForgotPassword: { classPropertyName: "showForgotPassword", publicName: "showForgotPassword", isSignal: true, isRequired: false, transformFunction: null }, showRegister: { classPropertyName: "showRegister", publicName: "showRegister", isSignal: true, isRequired: false, transformFunction: null }, socialProviders: { classPropertyName: "socialProviders", publicName: "socialProviders", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { loginSubmit: "loginSubmit", forgotPasswordClick: "forgotPasswordClick", registerClick: "registerClick", languageClick: "languageClick", socialLogin: "socialLogin" }, ngImport: i0, template: "<main class=\"platform-login\">\r\n <section class=\"platform-login__stage\" [attr.aria-label]=\"heroAriaLabel()\">\r\n @if (showLanguageSwitcher()) {\r\n <button\r\n class=\"platform-login__language\"\r\n type=\"button\"\r\n aria-label=\"\u5207\u6362\u8BED\u8A00\"\r\n (click)=\"emitLanguageClick()\"\r\n >\r\n <lucide-icon [img]=\"languagesIcon\" size=\"16\" aria-hidden=\"true\" />\r\n <span>{{ languageLabel() }}</span>\r\n <lucide-icon [img]=\"chevronDownIcon\" size=\"14\" aria-hidden=\"true\" />\r\n </button>\r\n }\r\n\r\n <div class=\"platform-login__content\">\r\n <section class=\"platform-login__hero\">\r\n <div class=\"platform-login__brand\">\r\n <div class=\"platform-login__mark\" aria-hidden=\"true\">\r\n <span>{{ brandMark() }}</span>\r\n </div>\r\n <div>\r\n <p>{{ brandName() }}</p>\r\n <h1>{{ productName() }}</h1>\r\n </div>\r\n </div>\r\n\r\n <div class=\"platform-login__hero-copy\">\r\n @if (heroEyebrow()) {\r\n <p class=\"platform-login__eyebrow\">{{ heroEyebrow() }}</p>\r\n }\r\n <h2>{{ heroTitle() }}</h2>\r\n <p>{{ heroText() }}</p>\r\n </div>\r\n\r\n <div class=\"platform-login__visual\" aria-hidden=\"true\">\r\n <div class=\"platform-login__device\">\r\n <span class=\"platform-login__device-dot platform-login__device-dot--blue\"></span>\r\n <span class=\"platform-login__device-dot platform-login__device-dot--green\"></span>\r\n <div class=\"platform-login__device-row platform-login__device-row--short\"></div>\r\n <div class=\"platform-login__device-card platform-login__device-card--primary\">\r\n <span></span>\r\n <strong></strong>\r\n </div>\r\n <div class=\"platform-login__device-card platform-login__device-card--floating\">\r\n <span></span>\r\n <strong></strong>\r\n </div>\r\n <div class=\"platform-login__device-list\">\r\n <span></span>\r\n <span></span>\r\n <span></span>\r\n </div>\r\n </div>\r\n <div class=\"platform-login__chart\">\r\n <span></span>\r\n <span></span>\r\n <span></span>\r\n </div>\r\n <div class=\"platform-login__avatar\"></div>\r\n </div>\r\n\r\n @if (features().length > 0) {\r\n <div class=\"platform-login__features\" aria-label=\"\u767B\u5F55\u9875\u7279\u6027\">\r\n @for (feature of features(); track feature.label) {\r\n <div [class]=\"featureClass(feature.toneClass)\">\r\n @if (feature.icon) {\r\n <lucide-icon [img]=\"feature.icon\" size=\"20\" aria-hidden=\"true\" />\r\n }\r\n <span>{{ feature.label }}</span>\r\n @if (feature.description) {\r\n <small>{{ feature.description }}</small>\r\n }\r\n </div>\r\n }\r\n </div>\r\n }\r\n </section>\r\n\r\n <section class=\"platform-login__panel\" aria-labelledby=\"platform-login-title\">\r\n <div class=\"platform-login__header\">\r\n @if (panelEyebrow()) {\r\n <p>{{ panelEyebrow() }}</p>\r\n }\r\n <h2 id=\"platform-login-title\">{{ panelTitle() }}</h2>\r\n <span>{{ panelSubtitle() }}</span>\r\n </div>\r\n\r\n @if (visibleErrorMessage()) {\r\n <p class=\"platform-login__error\" role=\"alert\">{{ visibleErrorMessage() }}</p>\r\n }\r\n\r\n <form class=\"platform-login__form\" (ngSubmit)=\"submit()\">\r\n <label class=\"platform-login__field\">\r\n <span>{{ usernameLabel() }}</span>\r\n <div class=\"platform-login__control\">\r\n <lucide-icon [img]=\"userIcon\" size=\"17\" aria-hidden=\"true\" />\r\n <input\r\n type=\"text\"\r\n data-platform-input=\"bare\"\r\n autocomplete=\"username\"\r\n [placeholder]=\"usernamePlaceholder()\"\r\n [ngModel]=\"username()\"\r\n (ngModelChange)=\"username.set($event)\"\r\n name=\"username\"\r\n />\r\n </div>\r\n </label>\r\n\r\n <label class=\"platform-login__field\">\r\n <span>{{ passwordLabel() }}</span>\r\n <div class=\"platform-login__control\">\r\n <lucide-icon [img]=\"keyIcon\" size=\"17\" aria-hidden=\"true\" />\r\n <input\r\n [type]=\"showPassword() ? 'text' : 'password'\"\r\n data-platform-input=\"bare\"\r\n autocomplete=\"current-password\"\r\n [placeholder]=\"passwordPlaceholder()\"\r\n [ngModel]=\"password()\"\r\n (ngModelChange)=\"password.set($event)\"\r\n name=\"password\"\r\n />\r\n <button\r\n class=\"platform-login__icon-button\"\r\n type=\"button\"\r\n [attr.aria-label]=\"showPassword() ? '\u9690\u85CF\u5BC6\u7801' : '\u663E\u793A\u5BC6\u7801'\"\r\n (click)=\"togglePassword()\"\r\n >\r\n <lucide-icon [img]=\"showPassword() ? eyeOffIcon : eyeIcon\" size=\"17\" aria-hidden=\"true\" />\r\n </button>\r\n </div>\r\n </label>\r\n\r\n <div class=\"platform-login__options\">\r\n <label class=\"platform-login__remember\">\r\n <input\r\n type=\"checkbox\"\r\n [ngModel]=\"rememberMe()\"\r\n (ngModelChange)=\"rememberMe.set($event)\"\r\n name=\"rememberMe\"\r\n />\r\n <span>{{ rememberLabel() }}</span>\r\n </label>\r\n @if (showForgotPassword()) {\r\n <button class=\"platform-login__link\" type=\"button\" (click)=\"emitForgotPassword()\">\r\n {{ forgotPasswordText() }}\r\n </button>\r\n } @else if (metaText()) {\r\n <span>{{ metaText() }}</span>\r\n }\r\n </div>\r\n\r\n @if (metaText() && showForgotPassword()) {\r\n <p class=\"platform-login__meta\">{{ metaText() }}</p>\r\n }\r\n\r\n <button class=\"platform-login__submit\" type=\"submit\" [disabled]=\"submitting()\">\r\n {{ submitting() ? submittingText() : submitText() }}\r\n </button>\r\n </form>\r\n\r\n @if (socialProviders().length > 0) {\r\n <div class=\"platform-login__social\">\r\n <div class=\"platform-login__divider\">\r\n <span>{{ dividerText() }}</span>\r\n </div>\r\n <div class=\"platform-login__social-list\">\r\n @for (provider of socialProviders(); track provider.id) {\r\n <button\r\n [class]=\"socialProviderClass(provider.toneClass)\"\r\n type=\"button\"\r\n [disabled]=\"provider.disabled\"\r\n [attr.aria-label]=\"provider.label\"\r\n (click)=\"emitSocialLogin(provider)\"\r\n >\r\n @if (provider.icon) {\r\n <lucide-icon [img]=\"provider.icon\" size=\"22\" aria-hidden=\"true\" />\r\n <span class=\"platform-login__social-label\">{{ provider.label }}</span>\r\n } @else {\r\n <span>{{ socialProviderInitial(provider) }}</span>\r\n }\r\n </button>\r\n }\r\n </div>\r\n </div>\r\n }\r\n\r\n @if (showRegister()) {\r\n <p class=\"platform-login__register\">\r\n <span>{{ registerPrompt() }}</span>\r\n <button class=\"platform-login__link\" type=\"button\" (click)=\"emitRegister()\">\r\n {{ registerText() }}\r\n </button>\r\n </p>\r\n }\r\n </section>\r\n </div>\r\n </section>\r\n</main>\r\n", styles: [":host{display:block;height:100dvh;min-height:100dvh;overflow:auto;color:var(--platform-login-text, #111827);font-family:Inter,SF Pro Display,PingFang SC,Microsoft YaHei,sans-serif}.platform-login,.platform-login *{box-sizing:border-box}.platform-login{--platform-login-available-height: calc(100dvh - (var(--platform-login-page-padding, 1.875rem) * 2));height:100%;min-height:0;display:grid;place-items:center;padding:var(--platform-login-page-padding, 1.875rem);background:linear-gradient(180deg,#fffffff2,#f7fbffeb),linear-gradient(135deg,#f8fbff,#edf5ff 48%,#f6f9ff);overflow:hidden}.platform-login__stage{position:relative;width:min(100%,var(--platform-login-stage-width, 90rem));height:min(50rem,var(--platform-login-available-height));min-height:min(42rem,var(--platform-login-available-height));overflow:hidden;border:1px solid var(--platform-login-stage-border, rgba(126, 164, 232, .34));border-radius:var(--platform-login-stage-radius, 1.5rem);background:linear-gradient(110deg,#ffffffb8,#e8f2ffbd 45%,#d6e6ffdb),#eef6ff;box-shadow:var(--platform-login-stage-shadow, 0 1.375rem 3.25rem rgba(66, 111, 180, .18));isolation:isolate}.platform-login__stage:before{content:\"\";position:absolute;inset:13% -14% auto auto;width:52%;height:78%;border:1px solid rgba(255,255,255,.66);border-radius:50%;background:linear-gradient(135deg,#ffffff52,#b9d3ff26);transform:rotate(-19deg);z-index:-1}.platform-login__stage:after{content:\"\";position:absolute;inset:auto -8% -28% 44%;height:76%;border:1px solid rgba(103,151,230,.18);border-radius:50% 50% 0 0;transform:rotate(11deg);z-index:-1}.platform-login__language{position:absolute;top:2rem;right:2.375rem;z-index:2;display:inline-flex;align-items:center;gap:.375rem;min-height:2.25rem;padding:0 .375rem;border:0;border-radius:.75rem;background:transparent;color:var(--platform-login-muted, #475569);cursor:pointer;font:inherit;font-size:.875rem}.platform-login__language:hover{background:#ffffff7a;color:var(--platform-login-primary, #1677ff)}.platform-login__content{height:100%;min-height:0;display:grid;grid-template-columns:minmax(0,1.08fr) minmax(21rem,27rem);align-items:center;gap:clamp(2rem,6vw,6.5rem);padding:5.625rem clamp(2rem,6vw,5.625rem) 3.625rem}.platform-login__hero{min-width:0;display:grid;gap:1.5rem;align-content:center}.platform-login__brand,.platform-login__options,.platform-login__remember,.platform-login__social-list,.platform-login__register,.platform-login__divider{display:flex;align-items:center}.platform-login__brand{gap:.875rem}.platform-login__mark{position:relative;width:2.75rem;height:2.75rem;display:grid;place-items:center;color:#1677ff;font-size:.8125rem;font-weight:800}.platform-login__mark:before,.platform-login__mark:after{content:\"\";position:absolute;inset:.25rem;border:.25rem solid currentColor;border-radius:.75rem;transform:rotate(30deg)}.platform-login__mark:after{inset:.6875rem;border-width:.1875rem;color:#1677ff3d;transform:rotate(-30deg)}.platform-login__mark span{position:relative;z-index:1;transform:translateY(.0625rem)}.platform-login__brand p,.platform-login__brand h1,.platform-login__hero-copy p,.platform-login__hero-copy h2,.platform-login__header p,.platform-login__header h2,.platform-login__header span,.platform-login__error,.platform-login__meta,.platform-login__register{margin:0}.platform-login__brand p{color:var(--platform-login-muted, #64748b);font-size:.875rem;line-height:1.3}.platform-login__brand h1{margin-top:.25rem;color:var(--platform-login-text, #0f172a);font-size:1.75rem;line-height:1.2;font-weight:800;letter-spacing:0}.platform-login__hero-copy{max-width:35rem}.platform-login__eyebrow,.platform-login__header p{color:var(--platform-login-primary, #1677ff);font-size:.8125rem;line-height:1.5;font-weight:700}.platform-login__hero-copy h2{color:var(--platform-login-text, #0f172a);font-size:1.75rem;line-height:1.22;font-weight:800;letter-spacing:0}.platform-login__hero-copy>p:last-child{margin-top:.75rem;color:var(--platform-login-soft, #475569);font-size:1rem;line-height:1.7}.platform-login__visual{position:relative;width:min(100%,28.75rem);aspect-ratio:1.42;margin:.375rem 0 0 2rem;border-radius:2rem;background:linear-gradient(180deg,#ffffff4d,#c9dcff1f),linear-gradient(155deg,#5f91ff14,#ffffff6b);transform:perspective(54rem) rotateX(58deg) rotate(-18deg);transform-origin:50% 70%;box-shadow:0 1.625rem 3.125rem #3b76e638,inset 0 0 0 1px #ffffffa8}.platform-login__visual:before{content:\"\";position:absolute;inset:8% 8% 12%;border-radius:1.375rem;border:1px solid rgba(255,255,255,.72)}.platform-login__device{position:absolute;left:33%;bottom:18%;width:38%;height:78%;border:1px solid rgba(132,170,240,.56);border-radius:.75rem;background:linear-gradient(180deg,#ffffffd6,#dceaffa3),#f6faff;box-shadow:0 1.25rem 2.5rem #3571e033,inset 0 0 1rem #ffffffc7}.platform-login__device-dot,.platform-login__device-row,.platform-login__device-card,.platform-login__device-list,.platform-login__chart,.platform-login__avatar{position:absolute}.platform-login__device-dot{top:12%;width:.625rem;height:.625rem;border-radius:50%}.platform-login__device-dot--blue{left:13%;background:#1677ff}.platform-login__device-dot--green{left:26%;background:#00b42a}.platform-login__device-row{left:39%;right:10%;top:13%;height:.5rem;border-radius:999px;background:#96b4eb47}.platform-login__device-card{display:grid;align-items:center;grid-template-columns:2.125rem minmax(0,1fr);gap:.625rem;padding:.625rem .75rem;border-radius:.75rem;background:#ffffffc7;box-shadow:0 .875rem 1.75rem #3870dc2e,inset 0 0 0 1px #ffffffd1}.platform-login__device-card span{display:block;width:1.625rem;height:1.625rem;border-radius:50%;background:linear-gradient(135deg,#7ca3ed,#cfe0ff)}.platform-login__device-card strong{display:block;height:.5625rem;border-radius:999px;background:linear-gradient(90deg,#7aa7ff,#7aa7ff40)}.platform-login__device-card--primary{left:20%;right:-20%;top:34%}.platform-login__device-card--floating{left:72%;right:-32%;top:58%}.platform-login__device-list{left:24%;right:20%;bottom:15%;display:grid;gap:.5rem}.platform-login__device-list span{height:.4375rem;border-radius:999px;background:#759eec47}.platform-login__device-list span:nth-child(2){width:72%}.platform-login__device-list span:nth-child(3){width:86%}.platform-login__chart{left:11%;bottom:18%;width:22%;height:42%;display:flex;align-items:flex-end;justify-content:center;gap:.5rem;padding:.875rem .625rem;border:1px solid rgba(132,170,240,.48);border-radius:.875rem;background:#ffffffc7;box-shadow:0 1rem 1.875rem #3870dc2e}.platform-login__chart span{width:.625rem;border-radius:999px 999px .25rem .25rem;background:linear-gradient(180deg,#7aa7ff,#2b79ff)}.platform-login__chart span:nth-child(1){height:38%}.platform-login__chart span:nth-child(2){height:62%}.platform-login__chart span:nth-child(3){height:82%}.platform-login__avatar{left:27%;bottom:46%;width:2.5rem;height:2.5rem;border:.375rem solid rgba(255,255,255,.8);border-radius:50%;background:linear-gradient(135deg,#3182ff,#b5d0ff);box-shadow:0 .75rem 1.625rem #3182ff47}.platform-login__features{width:min(100%,34rem);display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.75rem}.platform-login__feature{min-width:0;display:grid;grid-template-columns:auto minmax(0,1fr);grid-template-rows:auto auto;align-items:center;gap:.125rem .625rem;padding:.75rem .875rem;border:1px solid rgba(255,255,255,.72);border-radius:1rem;background:#ffffff80;box-shadow:0 .625rem 1.25rem #406eb414;color:#1677ff}.platform-login__feature lucide-icon{grid-row:1/span 2;width:2.375rem;height:2.375rem;display:grid;place-items:center;border-radius:50%;background:#1677ff1a}.platform-login__feature span{min-width:0;overflow:hidden;color:var(--platform-login-text, #111827);font-size:.875rem;font-weight:700;text-overflow:ellipsis;white-space:nowrap}.platform-login__feature small{min-width:0;overflow:hidden;color:var(--platform-login-soft, #64748b);font-size:.75rem;line-height:1.4;text-overflow:ellipsis;white-space:nowrap}.platform-login__feature.is-green{color:#00b42a}.platform-login__feature.is-green lucide-icon{background:#00b42a1a}.platform-login__feature.is-amber{color:#ff9500}.platform-login__feature.is-amber lucide-icon{background:#ff95001f}.platform-login__feature.is-violet{color:#7c3aed}.platform-login__feature.is-violet lucide-icon{background:#7c3aed1a}.platform-login__panel{width:100%;align-self:center;display:grid;gap:1.125rem;padding:3rem 2.625rem 2.25rem;border:1px solid rgba(255,255,255,.72);border-radius:var(--platform-login-panel-radius, 1.5rem);background:var(--platform-login-panel-bg, rgba(255, 255, 255, .88));box-shadow:var(--platform-login-panel-shadow, 0 1.25rem 3rem rgba(42, 82, 142, .14));-webkit-backdrop-filter:blur(1.25rem);backdrop-filter:blur(1.25rem)}.platform-login__header{display:grid;gap:.5rem}.platform-login__header h2{color:var(--platform-login-text, #111827);font-size:1.625rem;line-height:1.25;font-weight:800;letter-spacing:0}.platform-login__header span{color:var(--platform-login-soft, #64748b);font-size:.875rem;line-height:1.5}.platform-login__error{padding:.625rem .75rem;border:1px solid rgba(239,68,68,.22);border-radius:.75rem;background:#fff1f2;color:#dc2626;font-size:.8125rem;line-height:1.5}.platform-login__form{display:grid;gap:1rem}.platform-login__field{display:grid;gap:.5rem}.platform-login__field>span{color:var(--platform-login-label, #1f2937);font-size:.8125rem;font-weight:700;line-height:1.5}.platform-login__control{min-height:2.75rem;display:flex;align-items:center;gap:.5rem;padding:0 .75rem;border:1px solid var(--platform-login-input-border, #d8e1ee);border-radius:var(--platform-login-input-radius, .75rem);background:var(--platform-login-input-bg, rgba(255, 255, 255, .92));color:var(--platform-login-muted, #72819a);transition:border-color .16s ease,box-shadow .16s ease,background .16s ease}.platform-login__control:focus-within{border-color:var(--platform-login-primary, #1677ff);background:#fff;box-shadow:0 0 0 .1875rem #1677ff1f}.platform-login__control input{appearance:none;width:100%;min-width:0;height:2.625rem;padding:0!important;padding-inline:0!important;border:0!important;border-radius:0;outline:0;background:transparent;box-shadow:none!important;color:var(--platform-login-text, #111827);font:inherit;font-size:.875rem}.platform-login__control input::placeholder{color:#9aa8ba}.platform-login__icon-button,.platform-login__link,.platform-login__submit,.platform-login__social-button{font:inherit}.platform-login__icon-button{width:2rem;height:2rem;flex:0 0 auto;display:grid;place-items:center;padding:0;border:0;border-radius:.625rem;background:transparent;color:var(--platform-login-muted, #72819a);cursor:pointer}.platform-login__icon-button:hover{background:#f1f6ff;color:var(--platform-login-primary, #1677ff)}.platform-login__options{justify-content:space-between;gap:.75rem;color:var(--platform-login-soft, #64748b);font-size:.8125rem}.platform-login__remember{gap:.4375rem;min-width:0}.platform-login__remember input{width:.9375rem;height:.9375rem;margin:0;accent-color:var(--platform-login-primary, #1677ff)}.platform-login__remember span{white-space:nowrap}.platform-login__link{display:inline-flex;align-items:center;min-height:1.5rem;padding:0;border:0;background:transparent;color:var(--platform-login-primary, #1677ff);cursor:pointer;font-size:.8125rem;font-weight:700}.platform-login__link:hover{color:#0958d9}.platform-login__meta{color:var(--platform-login-soft, #64748b);font-size:.75rem;line-height:1.5}.platform-login__submit{min-height:2.75rem;border:0;border-radius:var(--platform-login-button-radius, .75rem);background:var(--platform-login-button-bg, linear-gradient(180deg, #2385ff 0%, #1677ff 100%));color:#fff;box-shadow:var(--platform-login-button-shadow, 0 .875rem 1.625rem rgba(22, 119, 255, .22));cursor:pointer;font-size:.9375rem;font-weight:800}.platform-login__submit:hover:not(:disabled){background:linear-gradient(180deg,#3390ff,#0f6be8)}.platform-login__submit:disabled{cursor:progress;opacity:.72}.platform-login__social{display:grid;gap:1rem}.platform-login__divider{gap:.875rem;color:var(--platform-login-soft, #64748b);font-size:.8125rem;line-height:1.5;white-space:nowrap}.platform-login__divider:before,.platform-login__divider:after{content:\"\";height:1px;flex:1 1 auto;background:#e6edf6}.platform-login__social-list{justify-content:center;gap:1rem}.platform-login__social-button{position:relative;width:2.75rem;height:2.75rem;display:grid;place-items:center;padding:0;border:1px solid rgba(217,225,237,.86);border-radius:50%;background:#fff;color:#111827;box-shadow:0 .625rem 1.25rem #2a528e14;cursor:pointer;transition:transform .16s ease,box-shadow .16s ease,border-color .16s ease}.platform-login__social-button:hover:not(:disabled){border-color:#1677ff52;box-shadow:0 .875rem 1.625rem #2a528e1f;transform:translateY(-.125rem)}.platform-login__social-button:disabled{cursor:not-allowed;opacity:.5}.platform-login__social-button.is-wechat{color:#00b42a}.platform-login__social-button.is-dingtalk{color:#24a8ff}.platform-login__social-button.is-apple{color:#111827}.platform-login__social-label{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}.platform-login__register{justify-content:center;gap:.375rem;color:var(--platform-login-soft, #64748b);font-size:.875rem}.platform-login__language:focus-visible,.platform-login__icon-button:focus-visible,.platform-login__link:focus-visible,.platform-login__submit:focus-visible,.platform-login__social-button:focus-visible{outline:2px solid var(--platform-login-primary, #1677ff);outline-offset:2px}@media(min-width:72rem){.platform-login__hero-copy h2{font-size:2rem}}@media(min-width:64.01rem)and (max-height:52rem){.platform-login__content{gap:clamp(1.5rem,4vw,4rem);padding:4.25rem clamp(1.75rem,5vw,4.75rem) 2.5rem}.platform-login__hero{gap:1.125rem}.platform-login__visual{width:min(100%,24rem);margin-top:0}.platform-login__panel{gap:1rem;padding:2.5rem 2.375rem 2rem}}@media(min-width:64.01rem)and (max-height:42rem){.platform-login{height:auto;min-height:100%;overflow:auto}.platform-login__stage{height:auto;min-height:var(--platform-login-available-height)}.platform-login__content{height:auto;min-height:inherit}}@media(max-width:64rem){.platform-login{height:auto;min-height:100%;padding:1rem;overflow:auto}.platform-login__stage{height:auto;min-height:calc(100dvh - 2rem)}.platform-login__content{height:auto;min-height:inherit;grid-template-columns:1fr;gap:2rem;padding:5rem 1.5rem 1.5rem}.platform-login__hero{justify-items:center;text-align:center}.platform-login__brand{justify-content:center}.platform-login__visual{width:min(100%,25rem);margin:0}.platform-login__features{width:min(100%,40rem)}.platform-login__panel{width:min(100%,27rem);justify-self:center}}@media(max-width:40rem){.platform-login{place-items:start center;padding:0}.platform-login__stage{width:100%;min-height:100dvh;overflow:visible;border-width:0;border-radius:0;box-shadow:none}.platform-login__language{top:1rem;right:1rem}.platform-login__content{padding:4.25rem .875rem 1rem}.platform-login__brand h1{font-size:1.375rem}.platform-login__hero-copy h2{font-size:1.5rem}.platform-login__hero-copy>p:last-child{font-size:.9375rem}.platform-login__visual{width:min(100%,17rem)}.platform-login__features{grid-template-columns:repeat(3,minmax(0,1fr));gap:.5rem}.platform-login__feature{grid-template-columns:1fr;justify-items:center;gap:.375rem;padding:.625rem .375rem;text-align:center}.platform-login__feature lucide-icon{grid-row:auto;width:2rem;height:2rem}.platform-login__feature span{font-size:.75rem}.platform-login__feature small{display:none}.platform-login__panel{padding:1.5rem 1.125rem;border-radius:1.125rem}.platform-login__options{align-items:flex-start;flex-direction:column}}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i1$1.NgForm, selector: "form:not([ngNoForm]):not([formGroup]):not([formArray]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: LucideAngularModule }, { kind: "component", type: i1.LucideAngularComponent, selector: "lucide-angular, lucide-icon, i-lucide, span-lucide", inputs: ["class", "name", "img", "color", "absoluteStrokeWidth", "size", "strokeWidth"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
5485
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: PlatformLoginPage, isStandalone: true, selector: "s-login-page", inputs: { brandMark: { classPropertyName: "brandMark", publicName: "brandMark", isSignal: true, isRequired: false, transformFunction: null }, brandLogo: { classPropertyName: "brandLogo", publicName: "brandLogo", isSignal: true, isRequired: false, transformFunction: null }, brandName: { classPropertyName: "brandName", publicName: "brandName", isSignal: true, isRequired: false, transformFunction: null }, productName: { classPropertyName: "productName", publicName: "productName", isSignal: true, isRequired: false, transformFunction: null }, heroAriaLabel: { classPropertyName: "heroAriaLabel", publicName: "heroAriaLabel", isSignal: true, isRequired: false, transformFunction: null }, heroEyebrow: { classPropertyName: "heroEyebrow", publicName: "heroEyebrow", isSignal: true, isRequired: false, transformFunction: null }, heroTitle: { classPropertyName: "heroTitle", publicName: "heroTitle", isSignal: true, isRequired: false, transformFunction: null }, heroText: { classPropertyName: "heroText", publicName: "heroText", isSignal: true, isRequired: false, transformFunction: null }, features: { classPropertyName: "features", publicName: "features", isSignal: true, isRequired: false, transformFunction: null }, showLanguageSwitcher: { classPropertyName: "showLanguageSwitcher", publicName: "showLanguageSwitcher", isSignal: true, isRequired: false, transformFunction: null }, languageLabel: { classPropertyName: "languageLabel", publicName: "languageLabel", isSignal: true, isRequired: false, transformFunction: null }, panelEyebrow: { classPropertyName: "panelEyebrow", publicName: "panelEyebrow", isSignal: true, isRequired: false, transformFunction: null }, panelTitle: { classPropertyName: "panelTitle", publicName: "panelTitle", isSignal: true, isRequired: false, transformFunction: null }, panelSubtitle: { classPropertyName: "panelSubtitle", publicName: "panelSubtitle", isSignal: true, isRequired: false, transformFunction: null }, usernameLabel: { classPropertyName: "usernameLabel", publicName: "usernameLabel", isSignal: true, isRequired: false, transformFunction: null }, passwordLabel: { classPropertyName: "passwordLabel", publicName: "passwordLabel", isSignal: true, isRequired: false, transformFunction: null }, usernamePlaceholder: { classPropertyName: "usernamePlaceholder", publicName: "usernamePlaceholder", isSignal: true, isRequired: false, transformFunction: null }, passwordPlaceholder: { classPropertyName: "passwordPlaceholder", publicName: "passwordPlaceholder", isSignal: true, isRequired: false, transformFunction: null }, rememberLabel: { classPropertyName: "rememberLabel", publicName: "rememberLabel", isSignal: true, isRequired: false, transformFunction: null }, forgotPasswordText: { classPropertyName: "forgotPasswordText", publicName: "forgotPasswordText", isSignal: true, isRequired: false, transformFunction: null }, dividerText: { classPropertyName: "dividerText", publicName: "dividerText", isSignal: true, isRequired: false, transformFunction: null }, registerPrompt: { classPropertyName: "registerPrompt", publicName: "registerPrompt", isSignal: true, isRequired: false, transformFunction: null }, registerText: { classPropertyName: "registerText", publicName: "registerText", isSignal: true, isRequired: false, transformFunction: null }, metaText: { classPropertyName: "metaText", publicName: "metaText", isSignal: true, isRequired: false, transformFunction: null }, submitText: { classPropertyName: "submitText", publicName: "submitText", isSignal: true, isRequired: false, transformFunction: null }, submittingText: { classPropertyName: "submittingText", publicName: "submittingText", isSignal: true, isRequired: false, transformFunction: null }, emptyMessage: { classPropertyName: "emptyMessage", publicName: "emptyMessage", isSignal: true, isRequired: false, transformFunction: null }, errorMessage: { classPropertyName: "errorMessage", publicName: "errorMessage", isSignal: true, isRequired: false, transformFunction: null }, submitting: { classPropertyName: "submitting", publicName: "submitting", isSignal: true, isRequired: false, transformFunction: null }, defaultUsername: { classPropertyName: "defaultUsername", publicName: "defaultUsername", isSignal: true, isRequired: false, transformFunction: null }, defaultPassword: { classPropertyName: "defaultPassword", publicName: "defaultPassword", isSignal: true, isRequired: false, transformFunction: null }, rememberDefault: { classPropertyName: "rememberDefault", publicName: "rememberDefault", isSignal: true, isRequired: false, transformFunction: null }, showForgotPassword: { classPropertyName: "showForgotPassword", publicName: "showForgotPassword", isSignal: true, isRequired: false, transformFunction: null }, showRegister: { classPropertyName: "showRegister", publicName: "showRegister", isSignal: true, isRequired: false, transformFunction: null }, socialProviders: { classPropertyName: "socialProviders", publicName: "socialProviders", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { loginSubmit: "loginSubmit", forgotPasswordClick: "forgotPasswordClick", registerClick: "registerClick", languageClick: "languageClick", socialLogin: "socialLogin" }, ngImport: i0, template: "<main class=\"platform-login\">\r\n <section class=\"platform-login__stage\" [attr.aria-label]=\"heroAriaLabel()\">\r\n @if (showLanguageSwitcher()) {\r\n <button\r\n class=\"platform-login__language\"\r\n type=\"button\"\r\n aria-label=\"\u5207\u6362\u8BED\u8A00\"\r\n (click)=\"emitLanguageClick()\"\r\n >\r\n <lucide-icon [img]=\"languagesIcon\" size=\"16\" aria-hidden=\"true\" />\r\n <span>{{ languageLabel() }}</span>\r\n <lucide-icon [img]=\"chevronDownIcon\" size=\"14\" aria-hidden=\"true\" />\r\n </button>\r\n }\r\n\r\n <div class=\"platform-login__content\">\r\n <section class=\"platform-login__hero\">\n <div class=\"platform-login__brand\">\n @if (brandLogo()) {\n <div class=\"platform-login__brand-logo-frame\">\n <img\n class=\"platform-login__brand-logo\"\n [ngSrc]=\"brandLogo()\"\n width=\"315\"\n height=\"95\"\n [alt]=\"brandLogoLabel()\"\n draggable=\"false\"\n priority\n />\n </div>\n } @else {\n <div class=\"platform-login__mark\" aria-hidden=\"true\">\n <span>{{ brandMark() }}</span>\n </div>\n <div>\n <p>{{ brandName() }}</p>\n <h1>{{ productName() }}</h1>\n </div>\n }\n </div>\n\r\n <div class=\"platform-login__hero-copy\">\r\n @if (heroEyebrow()) {\r\n <p class=\"platform-login__eyebrow\">{{ heroEyebrow() }}</p>\r\n }\r\n <h2>{{ heroTitle() }}</h2>\r\n <p>{{ heroText() }}</p>\r\n </div>\r\n\r\n <div class=\"platform-login__visual\" aria-hidden=\"true\">\r\n <div class=\"platform-login__device\">\r\n <span class=\"platform-login__device-dot platform-login__device-dot--blue\"></span>\r\n <span class=\"platform-login__device-dot platform-login__device-dot--green\"></span>\r\n <div class=\"platform-login__device-row platform-login__device-row--short\"></div>\r\n <div class=\"platform-login__device-card platform-login__device-card--primary\">\r\n <span></span>\r\n <strong></strong>\r\n </div>\r\n <div class=\"platform-login__device-card platform-login__device-card--floating\">\r\n <span></span>\r\n <strong></strong>\r\n </div>\r\n <div class=\"platform-login__device-list\">\r\n <span></span>\r\n <span></span>\r\n <span></span>\r\n </div>\r\n </div>\r\n <div class=\"platform-login__chart\">\r\n <span></span>\r\n <span></span>\r\n <span></span>\r\n </div>\r\n <div class=\"platform-login__avatar\"></div>\r\n </div>\r\n\r\n @if (features().length > 0) {\r\n <div class=\"platform-login__features\" aria-label=\"\u767B\u5F55\u9875\u7279\u6027\">\r\n @for (feature of features(); track feature.label) {\r\n <div [class]=\"featureClass(feature.toneClass)\">\r\n @if (feature.icon) {\r\n <lucide-icon [img]=\"feature.icon\" size=\"20\" aria-hidden=\"true\" />\r\n }\r\n <span>{{ feature.label }}</span>\r\n @if (feature.description) {\r\n <small>{{ feature.description }}</small>\r\n }\r\n </div>\r\n }\r\n </div>\r\n }\r\n </section>\r\n\r\n <section class=\"platform-login__panel\" aria-labelledby=\"platform-login-title\">\r\n <div class=\"platform-login__header\">\r\n @if (panelEyebrow()) {\r\n <p>{{ panelEyebrow() }}</p>\r\n }\r\n <h2 id=\"platform-login-title\">{{ panelTitle() }}</h2>\r\n <span>{{ panelSubtitle() }}</span>\r\n </div>\r\n\r\n @if (visibleErrorMessage()) {\r\n <p class=\"platform-login__error\" role=\"alert\">{{ visibleErrorMessage() }}</p>\r\n }\r\n\r\n <form class=\"platform-login__form\" (ngSubmit)=\"submit()\">\r\n <label class=\"platform-login__field\">\r\n <span>{{ usernameLabel() }}</span>\r\n <div class=\"platform-login__control\">\r\n <lucide-icon [img]=\"userIcon\" size=\"17\" aria-hidden=\"true\" />\r\n <input\r\n type=\"text\"\r\n data-platform-input=\"bare\"\r\n autocomplete=\"username\"\r\n [placeholder]=\"usernamePlaceholder()\"\r\n [ngModel]=\"username()\"\r\n (ngModelChange)=\"username.set($event)\"\r\n name=\"username\"\r\n />\r\n </div>\r\n </label>\r\n\r\n <label class=\"platform-login__field\">\r\n <span>{{ passwordLabel() }}</span>\r\n <div class=\"platform-login__control\">\r\n <lucide-icon [img]=\"keyIcon\" size=\"17\" aria-hidden=\"true\" />\r\n <input\r\n [type]=\"showPassword() ? 'text' : 'password'\"\r\n data-platform-input=\"bare\"\r\n autocomplete=\"current-password\"\r\n [placeholder]=\"passwordPlaceholder()\"\r\n [ngModel]=\"password()\"\r\n (ngModelChange)=\"password.set($event)\"\r\n name=\"password\"\r\n />\r\n <button\r\n class=\"platform-login__icon-button\"\r\n type=\"button\"\r\n [attr.aria-label]=\"showPassword() ? '\u9690\u85CF\u5BC6\u7801' : '\u663E\u793A\u5BC6\u7801'\"\r\n (click)=\"togglePassword()\"\r\n >\r\n <lucide-icon [img]=\"showPassword() ? eyeOffIcon : eyeIcon\" size=\"17\" aria-hidden=\"true\" />\r\n </button>\r\n </div>\r\n </label>\r\n\r\n <div class=\"platform-login__options\">\r\n <label class=\"platform-login__remember\">\r\n <input\r\n type=\"checkbox\"\r\n [ngModel]=\"rememberMe()\"\r\n (ngModelChange)=\"rememberMe.set($event)\"\r\n name=\"rememberMe\"\r\n />\r\n <span>{{ rememberLabel() }}</span>\r\n </label>\r\n @if (showForgotPassword()) {\r\n <button class=\"platform-login__link\" type=\"button\" (click)=\"emitForgotPassword()\">\r\n {{ forgotPasswordText() }}\r\n </button>\r\n } @else if (metaText()) {\r\n <span>{{ metaText() }}</span>\r\n }\r\n </div>\r\n\r\n @if (metaText() && showForgotPassword()) {\r\n <p class=\"platform-login__meta\">{{ metaText() }}</p>\r\n }\r\n\r\n <button class=\"platform-login__submit\" type=\"submit\" [disabled]=\"submitting()\">\r\n {{ submitting() ? submittingText() : submitText() }}\r\n </button>\r\n </form>\r\n\r\n @if (socialProviders().length > 0) {\r\n <div class=\"platform-login__social\">\r\n <div class=\"platform-login__divider\">\r\n <span>{{ dividerText() }}</span>\r\n </div>\r\n <div class=\"platform-login__social-list\">\r\n @for (provider of socialProviders(); track provider.id) {\r\n <button\r\n [class]=\"socialProviderClass(provider.toneClass)\"\r\n type=\"button\"\r\n [disabled]=\"provider.disabled\"\r\n [attr.aria-label]=\"provider.label\"\r\n (click)=\"emitSocialLogin(provider)\"\r\n >\r\n @if (provider.icon) {\r\n <lucide-icon [img]=\"provider.icon\" size=\"22\" aria-hidden=\"true\" />\r\n <span class=\"platform-login__social-label\">{{ provider.label }}</span>\r\n } @else {\r\n <span>{{ socialProviderInitial(provider) }}</span>\r\n }\r\n </button>\r\n }\r\n </div>\r\n </div>\r\n }\r\n\r\n @if (showRegister()) {\r\n <p class=\"platform-login__register\">\r\n <span>{{ registerPrompt() }}</span>\r\n <button class=\"platform-login__link\" type=\"button\" (click)=\"emitRegister()\">\r\n {{ registerText() }}\r\n </button>\r\n </p>\r\n }\r\n </section>\r\n </div>\r\n </section>\r\n</main>\r\n", styles: [":host{display:block;height:100dvh;min-height:100dvh;overflow:auto;color:var(--platform-login-text, #111827);font-family:Inter,SF Pro Display,PingFang SC,Microsoft YaHei,sans-serif}.platform-login,.platform-login *{box-sizing:border-box}.platform-login{--platform-login-available-height: calc(100dvh - (var(--platform-login-page-padding, 1.875rem) * 2));height:100%;min-height:0;display:grid;place-items:center;padding:var(--platform-login-page-padding, 1.875rem);background:linear-gradient(180deg,#fffffff2,#f7fbffeb),linear-gradient(135deg,#f8fbff,#edf5ff 48%,#f6f9ff);overflow:hidden}.platform-login__stage{position:relative;width:min(100%,var(--platform-login-stage-width, 90rem));height:min(50rem,var(--platform-login-available-height));min-height:min(42rem,var(--platform-login-available-height));overflow:hidden;border:1px solid var(--platform-login-stage-border, rgba(126, 164, 232, .34));border-radius:var(--platform-login-stage-radius, 1.5rem);background:linear-gradient(110deg,#ffffffb8,#e8f2ffbd 45%,#d6e6ffdb),#eef6ff;box-shadow:var(--platform-login-stage-shadow, 0 1.375rem 3.25rem rgba(66, 111, 180, .18));isolation:isolate}.platform-login__stage:before{content:\"\";position:absolute;inset:13% -14% auto auto;width:52%;height:78%;border:1px solid rgba(255,255,255,.66);border-radius:50%;background:linear-gradient(135deg,#ffffff52,#b9d3ff26);transform:rotate(-19deg);z-index:-1}.platform-login__stage:after{content:\"\";position:absolute;inset:auto -8% -28% 44%;height:76%;border:1px solid rgba(103,151,230,.18);border-radius:50% 50% 0 0;transform:rotate(11deg);z-index:-1}.platform-login__language{position:absolute;top:2rem;right:2.375rem;z-index:2;display:inline-flex;align-items:center;gap:.375rem;min-height:2.25rem;padding:0 .375rem;border:0;border-radius:.75rem;background:transparent;color:var(--platform-login-muted, #475569);cursor:pointer;font:inherit;font-size:.875rem}.platform-login__language:hover{background:#ffffff7a;color:var(--platform-login-primary, #1677ff)}.platform-login__content{height:100%;min-height:0;display:grid;grid-template-columns:minmax(0,1.08fr) minmax(21rem,27rem);align-items:center;gap:clamp(2rem,6vw,6.5rem);padding:5.625rem clamp(2rem,6vw,5.625rem) 3.625rem}.platform-login__hero{min-width:0;display:grid;gap:1.5rem;align-content:center}.platform-login__brand,.platform-login__options,.platform-login__remember,.platform-login__social-list,.platform-login__register,.platform-login__divider{display:flex;align-items:center}.platform-login__brand{gap:.875rem}.platform-login__mark{position:relative;width:2.75rem;height:2.75rem;display:grid;place-items:center;color:#1677ff;font-size:.8125rem;font-weight:800}.platform-login__mark:before,.platform-login__mark:after{content:\"\";position:absolute;inset:.25rem;border:.25rem solid currentColor;border-radius:.75rem;transform:rotate(30deg)}.platform-login__mark:after{inset:.6875rem;border-width:.1875rem;color:#1677ff3d;transform:rotate(-30deg)}.platform-login__mark span{position:relative;z-index:1;transform:translateY(.0625rem)}.platform-login__brand-logo-frame{width:min(100%,16.5rem);padding:var(--platform-login-brand-logo-frame-padding, .375rem .625rem .375rem .3125rem);border:var(--platform-login-brand-logo-frame-border, 1px solid rgba(255, 255, 255, .38));border-radius:var(--platform-login-brand-logo-frame-radius, 1rem);background:var(--platform-login-brand-logo-frame-bg, linear-gradient(135deg, rgba(18, 57, 112, .96), rgba(20, 137, 132, .95)));box-shadow:var(--platform-login-brand-logo-frame-shadow, 0 .875rem 1.875rem rgba(32, 91, 151, .18))}.platform-login__brand-logo{display:block;width:100%;height:auto;object-fit:contain;object-position:left center;-webkit-user-select:none;user-select:none;-webkit-user-drag:none}.platform-login__brand p,.platform-login__brand h1,.platform-login__hero-copy p,.platform-login__hero-copy h2,.platform-login__header p,.platform-login__header h2,.platform-login__header span,.platform-login__error,.platform-login__meta,.platform-login__register{margin:0}.platform-login__brand p{color:var(--platform-login-muted, #64748b);font-size:.875rem;line-height:1.3}.platform-login__brand h1{margin-top:.25rem;color:var(--platform-login-text, #0f172a);font-size:1.75rem;line-height:1.2;font-weight:800;letter-spacing:0}.platform-login__hero-copy{max-width:35rem}.platform-login__eyebrow,.platform-login__header p{color:var(--platform-login-primary, #1677ff);font-size:.8125rem;line-height:1.5;font-weight:700}.platform-login__hero-copy h2{color:var(--platform-login-text, #0f172a);font-size:1.75rem;line-height:1.22;font-weight:800;letter-spacing:0}.platform-login__hero-copy>p:last-child{margin-top:.75rem;color:var(--platform-login-soft, #475569);font-size:1rem;line-height:1.7}.platform-login__visual{position:relative;width:min(100%,28.75rem);aspect-ratio:1.42;margin:.375rem 0 0 2rem;border-radius:2rem;background:linear-gradient(180deg,#ffffff4d,#c9dcff1f),linear-gradient(155deg,#5f91ff14,#ffffff6b);transform:perspective(54rem) rotateX(58deg) rotate(-18deg);transform-origin:50% 70%;box-shadow:0 1.625rem 3.125rem #3b76e638,inset 0 0 0 1px #ffffffa8}.platform-login__visual:before{content:\"\";position:absolute;inset:8% 8% 12%;border-radius:1.375rem;border:1px solid rgba(255,255,255,.72)}.platform-login__device{position:absolute;left:33%;bottom:18%;width:38%;height:78%;border:1px solid rgba(132,170,240,.56);border-radius:.75rem;background:linear-gradient(180deg,#ffffffd6,#dceaffa3),#f6faff;box-shadow:0 1.25rem 2.5rem #3571e033,inset 0 0 1rem #ffffffc7}.platform-login__device-dot,.platform-login__device-row,.platform-login__device-card,.platform-login__device-list,.platform-login__chart,.platform-login__avatar{position:absolute}.platform-login__device-dot{top:12%;width:.625rem;height:.625rem;border-radius:50%}.platform-login__device-dot--blue{left:13%;background:#1677ff}.platform-login__device-dot--green{left:26%;background:#00b42a}.platform-login__device-row{left:39%;right:10%;top:13%;height:.5rem;border-radius:999px;background:#96b4eb47}.platform-login__device-card{display:grid;align-items:center;grid-template-columns:2.125rem minmax(0,1fr);gap:.625rem;padding:.625rem .75rem;border-radius:.75rem;background:#ffffffc7;box-shadow:0 .875rem 1.75rem #3870dc2e,inset 0 0 0 1px #ffffffd1}.platform-login__device-card span{display:block;width:1.625rem;height:1.625rem;border-radius:50%;background:linear-gradient(135deg,#7ca3ed,#cfe0ff)}.platform-login__device-card strong{display:block;height:.5625rem;border-radius:999px;background:linear-gradient(90deg,#7aa7ff,#7aa7ff40)}.platform-login__device-card--primary{left:20%;right:-20%;top:34%}.platform-login__device-card--floating{left:72%;right:-32%;top:58%}.platform-login__device-list{left:24%;right:20%;bottom:15%;display:grid;gap:.5rem}.platform-login__device-list span{height:.4375rem;border-radius:999px;background:#759eec47}.platform-login__device-list span:nth-child(2){width:72%}.platform-login__device-list span:nth-child(3){width:86%}.platform-login__chart{left:11%;bottom:18%;width:22%;height:42%;display:flex;align-items:flex-end;justify-content:center;gap:.5rem;padding:.875rem .625rem;border:1px solid rgba(132,170,240,.48);border-radius:.875rem;background:#ffffffc7;box-shadow:0 1rem 1.875rem #3870dc2e}.platform-login__chart span{width:.625rem;border-radius:999px 999px .25rem .25rem;background:linear-gradient(180deg,#7aa7ff,#2b79ff)}.platform-login__chart span:nth-child(1){height:38%}.platform-login__chart span:nth-child(2){height:62%}.platform-login__chart span:nth-child(3){height:82%}.platform-login__avatar{left:27%;bottom:46%;width:2.5rem;height:2.5rem;border:.375rem solid rgba(255,255,255,.8);border-radius:50%;background:linear-gradient(135deg,#3182ff,#b5d0ff);box-shadow:0 .75rem 1.625rem #3182ff47}.platform-login__features{width:min(100%,34rem);display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.75rem}.platform-login__feature{min-width:0;display:grid;grid-template-columns:auto minmax(0,1fr);grid-template-rows:auto auto;align-items:center;gap:.125rem .625rem;padding:.75rem .875rem;border:1px solid rgba(255,255,255,.72);border-radius:1rem;background:#ffffff80;box-shadow:0 .625rem 1.25rem #406eb414;color:#1677ff}.platform-login__feature lucide-icon{grid-row:1/span 2;width:2.375rem;height:2.375rem;display:grid;place-items:center;border-radius:50%;background:#1677ff1a}.platform-login__feature span{min-width:0;overflow:hidden;color:var(--platform-login-text, #111827);font-size:.875rem;font-weight:700;text-overflow:ellipsis;white-space:nowrap}.platform-login__feature small{min-width:0;color:var(--platform-login-soft, #64748b);font-size:.75rem;line-height:1.4;overflow-wrap:anywhere}.platform-login__feature.is-green{color:#00b42a}.platform-login__feature.is-green lucide-icon{background:#00b42a1a}.platform-login__feature.is-amber{color:#ff9500}.platform-login__feature.is-amber lucide-icon{background:#ff95001f}.platform-login__feature.is-violet{color:#7c3aed}.platform-login__feature.is-violet lucide-icon{background:#7c3aed1a}.platform-login__panel{width:100%;align-self:center;display:grid;gap:1.125rem;padding:3rem 2.625rem 2.25rem;border:1px solid rgba(255,255,255,.72);border-radius:var(--platform-login-panel-radius, 1.5rem);background:var(--platform-login-panel-bg, rgba(255, 255, 255, .88));box-shadow:var(--platform-login-panel-shadow, 0 1.25rem 3rem rgba(42, 82, 142, .14));-webkit-backdrop-filter:blur(1.25rem);backdrop-filter:blur(1.25rem)}.platform-login__header{display:grid;gap:.5rem}.platform-login__header h2{color:var(--platform-login-text, #111827);font-size:1.625rem;line-height:1.25;font-weight:800;letter-spacing:0}.platform-login__header span{color:var(--platform-login-soft, #64748b);font-size:.875rem;line-height:1.5}.platform-login__error{padding:.625rem .75rem;border:1px solid rgba(239,68,68,.22);border-radius:.75rem;background:#fff1f2;color:#dc2626;font-size:.8125rem;line-height:1.5}.platform-login__form{display:grid;gap:1rem}.platform-login__field{display:grid;gap:.5rem}.platform-login__field>span{color:var(--platform-login-label, #1f2937);font-size:.8125rem;font-weight:700;line-height:1.5}.platform-login__control{min-height:2.75rem;display:flex;align-items:center;gap:.5rem;padding:0 .75rem;border:1px solid var(--platform-login-input-border, #d8e1ee);border-radius:var(--platform-login-input-radius, .75rem);background:var(--platform-login-input-bg, rgba(255, 255, 255, .92));color:var(--platform-login-muted, #72819a);transition:border-color .16s ease,box-shadow .16s ease,background .16s ease}.platform-login__control:focus-within{border-color:var(--platform-login-primary, #1677ff);background:#fff;box-shadow:0 0 0 .1875rem #1677ff1f}.platform-login__control input{appearance:none;width:100%;min-width:0;height:2.625rem;padding:0!important;padding-inline:0!important;border:0!important;border-radius:0;outline:0;background:transparent;box-shadow:none!important;color:var(--platform-login-text, #111827);font:inherit;font-size:.875rem}.platform-login__control input::placeholder{color:#9aa8ba}.platform-login__icon-button,.platform-login__link,.platform-login__submit,.platform-login__social-button{font:inherit}.platform-login__icon-button{width:2rem;height:2rem;flex:0 0 auto;display:grid;place-items:center;padding:0;border:0;border-radius:.625rem;background:transparent;color:var(--platform-login-muted, #72819a);cursor:pointer}.platform-login__icon-button:hover{background:#f1f6ff;color:var(--platform-login-primary, #1677ff)}.platform-login__options{justify-content:space-between;gap:.75rem;color:var(--platform-login-soft, #64748b);font-size:.8125rem}.platform-login__remember{gap:.4375rem;min-width:0}.platform-login__remember input{width:.9375rem;height:.9375rem;margin:0;accent-color:var(--platform-login-primary, #1677ff)}.platform-login__remember span{white-space:nowrap}.platform-login__link{display:inline-flex;align-items:center;min-height:1.5rem;padding:0;border:0;background:transparent;color:var(--platform-login-primary, #1677ff);cursor:pointer;font-size:.8125rem;font-weight:700}.platform-login__link:hover{color:#0958d9}.platform-login__meta{color:var(--platform-login-soft, #64748b);font-size:.75rem;line-height:1.5}.platform-login__submit{min-height:2.75rem;border:0;border-radius:var(--platform-login-button-radius, .75rem);background:var(--platform-login-button-bg, linear-gradient(180deg, #2385ff 0%, #1677ff 100%));color:#fff;box-shadow:var(--platform-login-button-shadow, 0 .875rem 1.625rem rgba(22, 119, 255, .22));cursor:pointer;font-size:.9375rem;font-weight:800}.platform-login__submit:hover:not(:disabled){background:linear-gradient(180deg,#3390ff,#0f6be8)}.platform-login__submit:disabled{cursor:progress;opacity:.72}.platform-login__social{display:grid;gap:1rem}.platform-login__divider{gap:.875rem;color:var(--platform-login-soft, #64748b);font-size:.8125rem;line-height:1.5;white-space:nowrap}.platform-login__divider:before,.platform-login__divider:after{content:\"\";height:1px;flex:1 1 auto;background:#e6edf6}.platform-login__social-list{justify-content:center;gap:1rem}.platform-login__social-button{position:relative;width:2.75rem;height:2.75rem;display:grid;place-items:center;padding:0;border:1px solid rgba(217,225,237,.86);border-radius:50%;background:#fff;color:#111827;box-shadow:0 .625rem 1.25rem #2a528e14;cursor:pointer;transition:transform .16s ease,box-shadow .16s ease,border-color .16s ease}.platform-login__social-button:hover:not(:disabled){border-color:#1677ff52;box-shadow:0 .875rem 1.625rem #2a528e1f;transform:translateY(-.125rem)}.platform-login__social-button:disabled{cursor:not-allowed;opacity:.5}.platform-login__social-button.is-wechat{color:#00b42a}.platform-login__social-button.is-dingtalk{color:#24a8ff}.platform-login__social-button.is-apple{color:#111827}.platform-login__social-label{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}.platform-login__register{justify-content:center;gap:.375rem;color:var(--platform-login-soft, #64748b);font-size:.875rem}.platform-login__language:focus-visible,.platform-login__icon-button:focus-visible,.platform-login__link:focus-visible,.platform-login__submit:focus-visible,.platform-login__social-button:focus-visible{outline:2px solid var(--platform-login-primary, #1677ff);outline-offset:2px}@media(min-width:72rem){.platform-login__hero-copy h2{font-size:2rem}}@media(min-width:64.01rem)and (max-height:52rem){.platform-login__content{gap:clamp(1.5rem,4vw,4rem);padding:4.25rem clamp(1.75rem,5vw,4.75rem) 2.5rem}.platform-login__hero{gap:1.125rem}.platform-login__visual{width:min(100%,24rem);margin-top:0}.platform-login__panel{gap:1rem;padding:2.5rem 2.375rem 2rem}}@media(min-width:64.01rem)and (max-height:42rem){.platform-login{height:auto;min-height:100%;overflow:auto}.platform-login__stage{height:auto;min-height:var(--platform-login-available-height)}.platform-login__content{height:auto;min-height:inherit}}@media(max-width:64rem){.platform-login{height:auto;min-height:100%;padding:1rem;overflow:auto}.platform-login__stage{height:auto;min-height:calc(100dvh - 2rem)}.platform-login__content{height:auto;min-height:inherit;grid-template-columns:1fr;gap:2rem;padding:5rem 1.5rem 1.5rem}.platform-login__hero{justify-items:center;text-align:center}.platform-login__brand{justify-content:center}.platform-login__visual{width:min(100%,25rem);margin:0}.platform-login__features{width:min(100%,40rem)}.platform-login__panel{width:min(100%,27rem);justify-self:center}}@media(max-width:40rem){.platform-login{place-items:start center;padding:0}.platform-login__stage{width:100%;min-height:100dvh;overflow:visible;border-width:0;border-radius:0;box-shadow:none}.platform-login__language{top:1rem;right:1rem}.platform-login__content{padding:4.25rem .875rem 1rem}.platform-login__brand h1{font-size:1.375rem}.platform-login__hero-copy h2{font-size:1.5rem}.platform-login__hero-copy>p:last-child{font-size:.9375rem}.platform-login__visual{width:min(100%,17rem)}.platform-login__features{grid-template-columns:repeat(3,minmax(0,1fr));gap:.5rem}.platform-login__feature{grid-template-columns:1fr;justify-items:center;gap:.375rem;padding:.625rem .375rem;text-align:center}.platform-login__feature lucide-icon{grid-row:auto;width:2rem;height:2rem}.platform-login__feature span{font-size:.75rem}.platform-login__feature small{display:none}.platform-login__panel{padding:1.5rem 1.125rem;border-radius:1.125rem}.platform-login__options{align-items:flex-start;flex-direction:column}}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i1$1.NgForm, selector: "form:not([ngNoForm]):not([formGroup]):not([formArray]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: LucideAngularModule }, { kind: "component", type: i1.LucideAngularComponent, selector: "lucide-angular, lucide-icon, i-lucide, span-lucide", inputs: ["class", "name", "img", "color", "absoluteStrokeWidth", "size", "strokeWidth"] }, { kind: "directive", type: NgOptimizedImage, selector: "img[ngSrc]", inputs: ["ngSrc", "ngSrcset", "sizes", "width", "height", "decoding", "loading", "priority", "loaderParams", "disableOptimizedSrcset", "fill", "placeholder", "placeholderConfig", "src", "srcset"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
4629
5486
|
}
|
|
4630
5487
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: PlatformLoginPage, decorators: [{
|
|
4631
5488
|
type: Component,
|
|
4632
|
-
args: [{ selector: 's-login-page', imports: [FormsModule, LucideAngularModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<main class=\"platform-login\">\r\n <section class=\"platform-login__stage\" [attr.aria-label]=\"heroAriaLabel()\">\r\n @if (showLanguageSwitcher()) {\r\n <button\r\n class=\"platform-login__language\"\r\n type=\"button\"\r\n aria-label=\"\u5207\u6362\u8BED\u8A00\"\r\n (click)=\"emitLanguageClick()\"\r\n >\r\n <lucide-icon [img]=\"languagesIcon\" size=\"16\" aria-hidden=\"true\" />\r\n <span>{{ languageLabel() }}</span>\r\n <lucide-icon [img]=\"chevronDownIcon\" size=\"14\" aria-hidden=\"true\" />\r\n </button>\r\n }\r\n\r\n <div class=\"platform-login__content\">\r\n <section class=\"platform-login__hero\">\r\n <div class=\"platform-login__brand\">\r\n <div class=\"platform-login__mark\" aria-hidden=\"true\">\r\n <span>{{ brandMark() }}</span>\r\n </div>\r\n <div>\r\n <p>{{ brandName() }}</p>\r\n <h1>{{ productName() }}</h1>\r\n </div>\r\n </div>\r\n\r\n <div class=\"platform-login__hero-copy\">\r\n @if (heroEyebrow()) {\r\n <p class=\"platform-login__eyebrow\">{{ heroEyebrow() }}</p>\r\n }\r\n <h2>{{ heroTitle() }}</h2>\r\n <p>{{ heroText() }}</p>\r\n </div>\r\n\r\n <div class=\"platform-login__visual\" aria-hidden=\"true\">\r\n <div class=\"platform-login__device\">\r\n <span class=\"platform-login__device-dot platform-login__device-dot--blue\"></span>\r\n <span class=\"platform-login__device-dot platform-login__device-dot--green\"></span>\r\n <div class=\"platform-login__device-row platform-login__device-row--short\"></div>\r\n <div class=\"platform-login__device-card platform-login__device-card--primary\">\r\n <span></span>\r\n <strong></strong>\r\n </div>\r\n <div class=\"platform-login__device-card platform-login__device-card--floating\">\r\n <span></span>\r\n <strong></strong>\r\n </div>\r\n <div class=\"platform-login__device-list\">\r\n <span></span>\r\n <span></span>\r\n <span></span>\r\n </div>\r\n </div>\r\n <div class=\"platform-login__chart\">\r\n <span></span>\r\n <span></span>\r\n <span></span>\r\n </div>\r\n <div class=\"platform-login__avatar\"></div>\r\n </div>\r\n\r\n @if (features().length > 0) {\r\n <div class=\"platform-login__features\" aria-label=\"\u767B\u5F55\u9875\u7279\u6027\">\r\n @for (feature of features(); track feature.label) {\r\n <div [class]=\"featureClass(feature.toneClass)\">\r\n @if (feature.icon) {\r\n <lucide-icon [img]=\"feature.icon\" size=\"20\" aria-hidden=\"true\" />\r\n }\r\n <span>{{ feature.label }}</span>\r\n @if (feature.description) {\r\n <small>{{ feature.description }}</small>\r\n }\r\n </div>\r\n }\r\n </div>\r\n }\r\n </section>\r\n\r\n <section class=\"platform-login__panel\" aria-labelledby=\"platform-login-title\">\r\n <div class=\"platform-login__header\">\r\n @if (panelEyebrow()) {\r\n <p>{{ panelEyebrow() }}</p>\r\n }\r\n <h2 id=\"platform-login-title\">{{ panelTitle() }}</h2>\r\n <span>{{ panelSubtitle() }}</span>\r\n </div>\r\n\r\n @if (visibleErrorMessage()) {\r\n <p class=\"platform-login__error\" role=\"alert\">{{ visibleErrorMessage() }}</p>\r\n }\r\n\r\n <form class=\"platform-login__form\" (ngSubmit)=\"submit()\">\r\n <label class=\"platform-login__field\">\r\n <span>{{ usernameLabel() }}</span>\r\n <div class=\"platform-login__control\">\r\n <lucide-icon [img]=\"userIcon\" size=\"17\" aria-hidden=\"true\" />\r\n <input\r\n type=\"text\"\r\n data-platform-input=\"bare\"\r\n autocomplete=\"username\"\r\n [placeholder]=\"usernamePlaceholder()\"\r\n [ngModel]=\"username()\"\r\n (ngModelChange)=\"username.set($event)\"\r\n name=\"username\"\r\n />\r\n </div>\r\n </label>\r\n\r\n <label class=\"platform-login__field\">\r\n <span>{{ passwordLabel() }}</span>\r\n <div class=\"platform-login__control\">\r\n <lucide-icon [img]=\"keyIcon\" size=\"17\" aria-hidden=\"true\" />\r\n <input\r\n [type]=\"showPassword() ? 'text' : 'password'\"\r\n data-platform-input=\"bare\"\r\n autocomplete=\"current-password\"\r\n [placeholder]=\"passwordPlaceholder()\"\r\n [ngModel]=\"password()\"\r\n (ngModelChange)=\"password.set($event)\"\r\n name=\"password\"\r\n />\r\n <button\r\n class=\"platform-login__icon-button\"\r\n type=\"button\"\r\n [attr.aria-label]=\"showPassword() ? '\u9690\u85CF\u5BC6\u7801' : '\u663E\u793A\u5BC6\u7801'\"\r\n (click)=\"togglePassword()\"\r\n >\r\n <lucide-icon [img]=\"showPassword() ? eyeOffIcon : eyeIcon\" size=\"17\" aria-hidden=\"true\" />\r\n </button>\r\n </div>\r\n </label>\r\n\r\n <div class=\"platform-login__options\">\r\n <label class=\"platform-login__remember\">\r\n <input\r\n type=\"checkbox\"\r\n [ngModel]=\"rememberMe()\"\r\n (ngModelChange)=\"rememberMe.set($event)\"\r\n name=\"rememberMe\"\r\n />\r\n <span>{{ rememberLabel() }}</span>\r\n </label>\r\n @if (showForgotPassword()) {\r\n <button class=\"platform-login__link\" type=\"button\" (click)=\"emitForgotPassword()\">\r\n {{ forgotPasswordText() }}\r\n </button>\r\n } @else if (metaText()) {\r\n <span>{{ metaText() }}</span>\r\n }\r\n </div>\r\n\r\n @if (metaText() && showForgotPassword()) {\r\n <p class=\"platform-login__meta\">{{ metaText() }}</p>\r\n }\r\n\r\n <button class=\"platform-login__submit\" type=\"submit\" [disabled]=\"submitting()\">\r\n {{ submitting() ? submittingText() : submitText() }}\r\n </button>\r\n </form>\r\n\r\n @if (socialProviders().length > 0) {\r\n <div class=\"platform-login__social\">\r\n <div class=\"platform-login__divider\">\r\n <span>{{ dividerText() }}</span>\r\n </div>\r\n <div class=\"platform-login__social-list\">\r\n @for (provider of socialProviders(); track provider.id) {\r\n <button\r\n [class]=\"socialProviderClass(provider.toneClass)\"\r\n type=\"button\"\r\n [disabled]=\"provider.disabled\"\r\n [attr.aria-label]=\"provider.label\"\r\n (click)=\"emitSocialLogin(provider)\"\r\n >\r\n @if (provider.icon) {\r\n <lucide-icon [img]=\"provider.icon\" size=\"22\" aria-hidden=\"true\" />\r\n <span class=\"platform-login__social-label\">{{ provider.label }}</span>\r\n } @else {\r\n <span>{{ socialProviderInitial(provider) }}</span>\r\n }\r\n </button>\r\n }\r\n </div>\r\n </div>\r\n }\r\n\r\n @if (showRegister()) {\r\n <p class=\"platform-login__register\">\r\n <span>{{ registerPrompt() }}</span>\r\n <button class=\"platform-login__link\" type=\"button\" (click)=\"emitRegister()\">\r\n {{ registerText() }}\r\n </button>\r\n </p>\r\n }\r\n </section>\r\n </div>\r\n </section>\r\n</main>\r\n", styles: [":host{display:block;height:100dvh;min-height:100dvh;overflow:auto;color:var(--platform-login-text, #111827);font-family:Inter,SF Pro Display,PingFang SC,Microsoft YaHei,sans-serif}.platform-login,.platform-login *{box-sizing:border-box}.platform-login{--platform-login-available-height: calc(100dvh - (var(--platform-login-page-padding, 1.875rem) * 2));height:100%;min-height:0;display:grid;place-items:center;padding:var(--platform-login-page-padding, 1.875rem);background:linear-gradient(180deg,#fffffff2,#f7fbffeb),linear-gradient(135deg,#f8fbff,#edf5ff 48%,#f6f9ff);overflow:hidden}.platform-login__stage{position:relative;width:min(100%,var(--platform-login-stage-width, 90rem));height:min(50rem,var(--platform-login-available-height));min-height:min(42rem,var(--platform-login-available-height));overflow:hidden;border:1px solid var(--platform-login-stage-border, rgba(126, 164, 232, .34));border-radius:var(--platform-login-stage-radius, 1.5rem);background:linear-gradient(110deg,#ffffffb8,#e8f2ffbd 45%,#d6e6ffdb),#eef6ff;box-shadow:var(--platform-login-stage-shadow, 0 1.375rem 3.25rem rgba(66, 111, 180, .18));isolation:isolate}.platform-login__stage:before{content:\"\";position:absolute;inset:13% -14% auto auto;width:52%;height:78%;border:1px solid rgba(255,255,255,.66);border-radius:50%;background:linear-gradient(135deg,#ffffff52,#b9d3ff26);transform:rotate(-19deg);z-index:-1}.platform-login__stage:after{content:\"\";position:absolute;inset:auto -8% -28% 44%;height:76%;border:1px solid rgba(103,151,230,.18);border-radius:50% 50% 0 0;transform:rotate(11deg);z-index:-1}.platform-login__language{position:absolute;top:2rem;right:2.375rem;z-index:2;display:inline-flex;align-items:center;gap:.375rem;min-height:2.25rem;padding:0 .375rem;border:0;border-radius:.75rem;background:transparent;color:var(--platform-login-muted, #475569);cursor:pointer;font:inherit;font-size:.875rem}.platform-login__language:hover{background:#ffffff7a;color:var(--platform-login-primary, #1677ff)}.platform-login__content{height:100%;min-height:0;display:grid;grid-template-columns:minmax(0,1.08fr) minmax(21rem,27rem);align-items:center;gap:clamp(2rem,6vw,6.5rem);padding:5.625rem clamp(2rem,6vw,5.625rem) 3.625rem}.platform-login__hero{min-width:0;display:grid;gap:1.5rem;align-content:center}.platform-login__brand,.platform-login__options,.platform-login__remember,.platform-login__social-list,.platform-login__register,.platform-login__divider{display:flex;align-items:center}.platform-login__brand{gap:.875rem}.platform-login__mark{position:relative;width:2.75rem;height:2.75rem;display:grid;place-items:center;color:#1677ff;font-size:.8125rem;font-weight:800}.platform-login__mark:before,.platform-login__mark:after{content:\"\";position:absolute;inset:.25rem;border:.25rem solid currentColor;border-radius:.75rem;transform:rotate(30deg)}.platform-login__mark:after{inset:.6875rem;border-width:.1875rem;color:#1677ff3d;transform:rotate(-30deg)}.platform-login__mark span{position:relative;z-index:1;transform:translateY(.0625rem)}.platform-login__brand p,.platform-login__brand h1,.platform-login__hero-copy p,.platform-login__hero-copy h2,.platform-login__header p,.platform-login__header h2,.platform-login__header span,.platform-login__error,.platform-login__meta,.platform-login__register{margin:0}.platform-login__brand p{color:var(--platform-login-muted, #64748b);font-size:.875rem;line-height:1.3}.platform-login__brand h1{margin-top:.25rem;color:var(--platform-login-text, #0f172a);font-size:1.75rem;line-height:1.2;font-weight:800;letter-spacing:0}.platform-login__hero-copy{max-width:35rem}.platform-login__eyebrow,.platform-login__header p{color:var(--platform-login-primary, #1677ff);font-size:.8125rem;line-height:1.5;font-weight:700}.platform-login__hero-copy h2{color:var(--platform-login-text, #0f172a);font-size:1.75rem;line-height:1.22;font-weight:800;letter-spacing:0}.platform-login__hero-copy>p:last-child{margin-top:.75rem;color:var(--platform-login-soft, #475569);font-size:1rem;line-height:1.7}.platform-login__visual{position:relative;width:min(100%,28.75rem);aspect-ratio:1.42;margin:.375rem 0 0 2rem;border-radius:2rem;background:linear-gradient(180deg,#ffffff4d,#c9dcff1f),linear-gradient(155deg,#5f91ff14,#ffffff6b);transform:perspective(54rem) rotateX(58deg) rotate(-18deg);transform-origin:50% 70%;box-shadow:0 1.625rem 3.125rem #3b76e638,inset 0 0 0 1px #ffffffa8}.platform-login__visual:before{content:\"\";position:absolute;inset:8% 8% 12%;border-radius:1.375rem;border:1px solid rgba(255,255,255,.72)}.platform-login__device{position:absolute;left:33%;bottom:18%;width:38%;height:78%;border:1px solid rgba(132,170,240,.56);border-radius:.75rem;background:linear-gradient(180deg,#ffffffd6,#dceaffa3),#f6faff;box-shadow:0 1.25rem 2.5rem #3571e033,inset 0 0 1rem #ffffffc7}.platform-login__device-dot,.platform-login__device-row,.platform-login__device-card,.platform-login__device-list,.platform-login__chart,.platform-login__avatar{position:absolute}.platform-login__device-dot{top:12%;width:.625rem;height:.625rem;border-radius:50%}.platform-login__device-dot--blue{left:13%;background:#1677ff}.platform-login__device-dot--green{left:26%;background:#00b42a}.platform-login__device-row{left:39%;right:10%;top:13%;height:.5rem;border-radius:999px;background:#96b4eb47}.platform-login__device-card{display:grid;align-items:center;grid-template-columns:2.125rem minmax(0,1fr);gap:.625rem;padding:.625rem .75rem;border-radius:.75rem;background:#ffffffc7;box-shadow:0 .875rem 1.75rem #3870dc2e,inset 0 0 0 1px #ffffffd1}.platform-login__device-card span{display:block;width:1.625rem;height:1.625rem;border-radius:50%;background:linear-gradient(135deg,#7ca3ed,#cfe0ff)}.platform-login__device-card strong{display:block;height:.5625rem;border-radius:999px;background:linear-gradient(90deg,#7aa7ff,#7aa7ff40)}.platform-login__device-card--primary{left:20%;right:-20%;top:34%}.platform-login__device-card--floating{left:72%;right:-32%;top:58%}.platform-login__device-list{left:24%;right:20%;bottom:15%;display:grid;gap:.5rem}.platform-login__device-list span{height:.4375rem;border-radius:999px;background:#759eec47}.platform-login__device-list span:nth-child(2){width:72%}.platform-login__device-list span:nth-child(3){width:86%}.platform-login__chart{left:11%;bottom:18%;width:22%;height:42%;display:flex;align-items:flex-end;justify-content:center;gap:.5rem;padding:.875rem .625rem;border:1px solid rgba(132,170,240,.48);border-radius:.875rem;background:#ffffffc7;box-shadow:0 1rem 1.875rem #3870dc2e}.platform-login__chart span{width:.625rem;border-radius:999px 999px .25rem .25rem;background:linear-gradient(180deg,#7aa7ff,#2b79ff)}.platform-login__chart span:nth-child(1){height:38%}.platform-login__chart span:nth-child(2){height:62%}.platform-login__chart span:nth-child(3){height:82%}.platform-login__avatar{left:27%;bottom:46%;width:2.5rem;height:2.5rem;border:.375rem solid rgba(255,255,255,.8);border-radius:50%;background:linear-gradient(135deg,#3182ff,#b5d0ff);box-shadow:0 .75rem 1.625rem #3182ff47}.platform-login__features{width:min(100%,34rem);display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.75rem}.platform-login__feature{min-width:0;display:grid;grid-template-columns:auto minmax(0,1fr);grid-template-rows:auto auto;align-items:center;gap:.125rem .625rem;padding:.75rem .875rem;border:1px solid rgba(255,255,255,.72);border-radius:1rem;background:#ffffff80;box-shadow:0 .625rem 1.25rem #406eb414;color:#1677ff}.platform-login__feature lucide-icon{grid-row:1/span 2;width:2.375rem;height:2.375rem;display:grid;place-items:center;border-radius:50%;background:#1677ff1a}.platform-login__feature span{min-width:0;overflow:hidden;color:var(--platform-login-text, #111827);font-size:.875rem;font-weight:700;text-overflow:ellipsis;white-space:nowrap}.platform-login__feature small{min-width:0;overflow:hidden;color:var(--platform-login-soft, #64748b);font-size:.75rem;line-height:1.4;text-overflow:ellipsis;white-space:nowrap}.platform-login__feature.is-green{color:#00b42a}.platform-login__feature.is-green lucide-icon{background:#00b42a1a}.platform-login__feature.is-amber{color:#ff9500}.platform-login__feature.is-amber lucide-icon{background:#ff95001f}.platform-login__feature.is-violet{color:#7c3aed}.platform-login__feature.is-violet lucide-icon{background:#7c3aed1a}.platform-login__panel{width:100%;align-self:center;display:grid;gap:1.125rem;padding:3rem 2.625rem 2.25rem;border:1px solid rgba(255,255,255,.72);border-radius:var(--platform-login-panel-radius, 1.5rem);background:var(--platform-login-panel-bg, rgba(255, 255, 255, .88));box-shadow:var(--platform-login-panel-shadow, 0 1.25rem 3rem rgba(42, 82, 142, .14));-webkit-backdrop-filter:blur(1.25rem);backdrop-filter:blur(1.25rem)}.platform-login__header{display:grid;gap:.5rem}.platform-login__header h2{color:var(--platform-login-text, #111827);font-size:1.625rem;line-height:1.25;font-weight:800;letter-spacing:0}.platform-login__header span{color:var(--platform-login-soft, #64748b);font-size:.875rem;line-height:1.5}.platform-login__error{padding:.625rem .75rem;border:1px solid rgba(239,68,68,.22);border-radius:.75rem;background:#fff1f2;color:#dc2626;font-size:.8125rem;line-height:1.5}.platform-login__form{display:grid;gap:1rem}.platform-login__field{display:grid;gap:.5rem}.platform-login__field>span{color:var(--platform-login-label, #1f2937);font-size:.8125rem;font-weight:700;line-height:1.5}.platform-login__control{min-height:2.75rem;display:flex;align-items:center;gap:.5rem;padding:0 .75rem;border:1px solid var(--platform-login-input-border, #d8e1ee);border-radius:var(--platform-login-input-radius, .75rem);background:var(--platform-login-input-bg, rgba(255, 255, 255, .92));color:var(--platform-login-muted, #72819a);transition:border-color .16s ease,box-shadow .16s ease,background .16s ease}.platform-login__control:focus-within{border-color:var(--platform-login-primary, #1677ff);background:#fff;box-shadow:0 0 0 .1875rem #1677ff1f}.platform-login__control input{appearance:none;width:100%;min-width:0;height:2.625rem;padding:0!important;padding-inline:0!important;border:0!important;border-radius:0;outline:0;background:transparent;box-shadow:none!important;color:var(--platform-login-text, #111827);font:inherit;font-size:.875rem}.platform-login__control input::placeholder{color:#9aa8ba}.platform-login__icon-button,.platform-login__link,.platform-login__submit,.platform-login__social-button{font:inherit}.platform-login__icon-button{width:2rem;height:2rem;flex:0 0 auto;display:grid;place-items:center;padding:0;border:0;border-radius:.625rem;background:transparent;color:var(--platform-login-muted, #72819a);cursor:pointer}.platform-login__icon-button:hover{background:#f1f6ff;color:var(--platform-login-primary, #1677ff)}.platform-login__options{justify-content:space-between;gap:.75rem;color:var(--platform-login-soft, #64748b);font-size:.8125rem}.platform-login__remember{gap:.4375rem;min-width:0}.platform-login__remember input{width:.9375rem;height:.9375rem;margin:0;accent-color:var(--platform-login-primary, #1677ff)}.platform-login__remember span{white-space:nowrap}.platform-login__link{display:inline-flex;align-items:center;min-height:1.5rem;padding:0;border:0;background:transparent;color:var(--platform-login-primary, #1677ff);cursor:pointer;font-size:.8125rem;font-weight:700}.platform-login__link:hover{color:#0958d9}.platform-login__meta{color:var(--platform-login-soft, #64748b);font-size:.75rem;line-height:1.5}.platform-login__submit{min-height:2.75rem;border:0;border-radius:var(--platform-login-button-radius, .75rem);background:var(--platform-login-button-bg, linear-gradient(180deg, #2385ff 0%, #1677ff 100%));color:#fff;box-shadow:var(--platform-login-button-shadow, 0 .875rem 1.625rem rgba(22, 119, 255, .22));cursor:pointer;font-size:.9375rem;font-weight:800}.platform-login__submit:hover:not(:disabled){background:linear-gradient(180deg,#3390ff,#0f6be8)}.platform-login__submit:disabled{cursor:progress;opacity:.72}.platform-login__social{display:grid;gap:1rem}.platform-login__divider{gap:.875rem;color:var(--platform-login-soft, #64748b);font-size:.8125rem;line-height:1.5;white-space:nowrap}.platform-login__divider:before,.platform-login__divider:after{content:\"\";height:1px;flex:1 1 auto;background:#e6edf6}.platform-login__social-list{justify-content:center;gap:1rem}.platform-login__social-button{position:relative;width:2.75rem;height:2.75rem;display:grid;place-items:center;padding:0;border:1px solid rgba(217,225,237,.86);border-radius:50%;background:#fff;color:#111827;box-shadow:0 .625rem 1.25rem #2a528e14;cursor:pointer;transition:transform .16s ease,box-shadow .16s ease,border-color .16s ease}.platform-login__social-button:hover:not(:disabled){border-color:#1677ff52;box-shadow:0 .875rem 1.625rem #2a528e1f;transform:translateY(-.125rem)}.platform-login__social-button:disabled{cursor:not-allowed;opacity:.5}.platform-login__social-button.is-wechat{color:#00b42a}.platform-login__social-button.is-dingtalk{color:#24a8ff}.platform-login__social-button.is-apple{color:#111827}.platform-login__social-label{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}.platform-login__register{justify-content:center;gap:.375rem;color:var(--platform-login-soft, #64748b);font-size:.875rem}.platform-login__language:focus-visible,.platform-login__icon-button:focus-visible,.platform-login__link:focus-visible,.platform-login__submit:focus-visible,.platform-login__social-button:focus-visible{outline:2px solid var(--platform-login-primary, #1677ff);outline-offset:2px}@media(min-width:72rem){.platform-login__hero-copy h2{font-size:2rem}}@media(min-width:64.01rem)and (max-height:52rem){.platform-login__content{gap:clamp(1.5rem,4vw,4rem);padding:4.25rem clamp(1.75rem,5vw,4.75rem) 2.5rem}.platform-login__hero{gap:1.125rem}.platform-login__visual{width:min(100%,24rem);margin-top:0}.platform-login__panel{gap:1rem;padding:2.5rem 2.375rem 2rem}}@media(min-width:64.01rem)and (max-height:42rem){.platform-login{height:auto;min-height:100%;overflow:auto}.platform-login__stage{height:auto;min-height:var(--platform-login-available-height)}.platform-login__content{height:auto;min-height:inherit}}@media(max-width:64rem){.platform-login{height:auto;min-height:100%;padding:1rem;overflow:auto}.platform-login__stage{height:auto;min-height:calc(100dvh - 2rem)}.platform-login__content{height:auto;min-height:inherit;grid-template-columns:1fr;gap:2rem;padding:5rem 1.5rem 1.5rem}.platform-login__hero{justify-items:center;text-align:center}.platform-login__brand{justify-content:center}.platform-login__visual{width:min(100%,25rem);margin:0}.platform-login__features{width:min(100%,40rem)}.platform-login__panel{width:min(100%,27rem);justify-self:center}}@media(max-width:40rem){.platform-login{place-items:start center;padding:0}.platform-login__stage{width:100%;min-height:100dvh;overflow:visible;border-width:0;border-radius:0;box-shadow:none}.platform-login__language{top:1rem;right:1rem}.platform-login__content{padding:4.25rem .875rem 1rem}.platform-login__brand h1{font-size:1.375rem}.platform-login__hero-copy h2{font-size:1.5rem}.platform-login__hero-copy>p:last-child{font-size:.9375rem}.platform-login__visual{width:min(100%,17rem)}.platform-login__features{grid-template-columns:repeat(3,minmax(0,1fr));gap:.5rem}.platform-login__feature{grid-template-columns:1fr;justify-items:center;gap:.375rem;padding:.625rem .375rem;text-align:center}.platform-login__feature lucide-icon{grid-row:auto;width:2rem;height:2rem}.platform-login__feature span{font-size:.75rem}.platform-login__feature small{display:none}.platform-login__panel{padding:1.5rem 1.125rem;border-radius:1.125rem}.platform-login__options{align-items:flex-start;flex-direction:column}}\n"] }]
|
|
4633
|
-
}], propDecorators: { brandMark: [{ type: i0.Input, args: [{ isSignal: true, alias: "brandMark", required: false }] }], brandName: [{ type: i0.Input, args: [{ isSignal: true, alias: "brandName", required: false }] }], productName: [{ type: i0.Input, args: [{ isSignal: true, alias: "productName", required: false }] }], heroAriaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "heroAriaLabel", required: false }] }], heroEyebrow: [{ type: i0.Input, args: [{ isSignal: true, alias: "heroEyebrow", required: false }] }], heroTitle: [{ type: i0.Input, args: [{ isSignal: true, alias: "heroTitle", required: false }] }], heroText: [{ type: i0.Input, args: [{ isSignal: true, alias: "heroText", required: false }] }], features: [{ type: i0.Input, args: [{ isSignal: true, alias: "features", required: false }] }], showLanguageSwitcher: [{ type: i0.Input, args: [{ isSignal: true, alias: "showLanguageSwitcher", required: false }] }], languageLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "languageLabel", required: false }] }], panelEyebrow: [{ type: i0.Input, args: [{ isSignal: true, alias: "panelEyebrow", required: false }] }], panelTitle: [{ type: i0.Input, args: [{ isSignal: true, alias: "panelTitle", required: false }] }], panelSubtitle: [{ type: i0.Input, args: [{ isSignal: true, alias: "panelSubtitle", required: false }] }], usernameLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "usernameLabel", required: false }] }], passwordLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "passwordLabel", required: false }] }], usernamePlaceholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "usernamePlaceholder", required: false }] }], passwordPlaceholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "passwordPlaceholder", required: false }] }], rememberLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "rememberLabel", required: false }] }], forgotPasswordText: [{ type: i0.Input, args: [{ isSignal: true, alias: "forgotPasswordText", required: false }] }], dividerText: [{ type: i0.Input, args: [{ isSignal: true, alias: "dividerText", required: false }] }], registerPrompt: [{ type: i0.Input, args: [{ isSignal: true, alias: "registerPrompt", required: false }] }], registerText: [{ type: i0.Input, args: [{ isSignal: true, alias: "registerText", required: false }] }], metaText: [{ type: i0.Input, args: [{ isSignal: true, alias: "metaText", required: false }] }], submitText: [{ type: i0.Input, args: [{ isSignal: true, alias: "submitText", required: false }] }], submittingText: [{ type: i0.Input, args: [{ isSignal: true, alias: "submittingText", required: false }] }], emptyMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyMessage", required: false }] }], errorMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "errorMessage", required: false }] }], submitting: [{ type: i0.Input, args: [{ isSignal: true, alias: "submitting", required: false }] }], defaultUsername: [{ type: i0.Input, args: [{ isSignal: true, alias: "defaultUsername", required: false }] }], rememberDefault: [{ type: i0.Input, args: [{ isSignal: true, alias: "rememberDefault", required: false }] }], showForgotPassword: [{ type: i0.Input, args: [{ isSignal: true, alias: "showForgotPassword", required: false }] }], showRegister: [{ type: i0.Input, args: [{ isSignal: true, alias: "showRegister", required: false }] }], socialProviders: [{ type: i0.Input, args: [{ isSignal: true, alias: "socialProviders", required: false }] }], loginSubmit: [{ type: i0.Output, args: ["loginSubmit"] }], forgotPasswordClick: [{ type: i0.Output, args: ["forgotPasswordClick"] }], registerClick: [{ type: i0.Output, args: ["registerClick"] }], languageClick: [{ type: i0.Output, args: ["languageClick"] }], socialLogin: [{ type: i0.Output, args: ["socialLogin"] }] } });
|
|
5489
|
+
args: [{ selector: 's-login-page', imports: [FormsModule, LucideAngularModule, NgOptimizedImage], changeDetection: ChangeDetectionStrategy.OnPush, template: "<main class=\"platform-login\">\r\n <section class=\"platform-login__stage\" [attr.aria-label]=\"heroAriaLabel()\">\r\n @if (showLanguageSwitcher()) {\r\n <button\r\n class=\"platform-login__language\"\r\n type=\"button\"\r\n aria-label=\"\u5207\u6362\u8BED\u8A00\"\r\n (click)=\"emitLanguageClick()\"\r\n >\r\n <lucide-icon [img]=\"languagesIcon\" size=\"16\" aria-hidden=\"true\" />\r\n <span>{{ languageLabel() }}</span>\r\n <lucide-icon [img]=\"chevronDownIcon\" size=\"14\" aria-hidden=\"true\" />\r\n </button>\r\n }\r\n\r\n <div class=\"platform-login__content\">\r\n <section class=\"platform-login__hero\">\n <div class=\"platform-login__brand\">\n @if (brandLogo()) {\n <div class=\"platform-login__brand-logo-frame\">\n <img\n class=\"platform-login__brand-logo\"\n [ngSrc]=\"brandLogo()\"\n width=\"315\"\n height=\"95\"\n [alt]=\"brandLogoLabel()\"\n draggable=\"false\"\n priority\n />\n </div>\n } @else {\n <div class=\"platform-login__mark\" aria-hidden=\"true\">\n <span>{{ brandMark() }}</span>\n </div>\n <div>\n <p>{{ brandName() }}</p>\n <h1>{{ productName() }}</h1>\n </div>\n }\n </div>\n\r\n <div class=\"platform-login__hero-copy\">\r\n @if (heroEyebrow()) {\r\n <p class=\"platform-login__eyebrow\">{{ heroEyebrow() }}</p>\r\n }\r\n <h2>{{ heroTitle() }}</h2>\r\n <p>{{ heroText() }}</p>\r\n </div>\r\n\r\n <div class=\"platform-login__visual\" aria-hidden=\"true\">\r\n <div class=\"platform-login__device\">\r\n <span class=\"platform-login__device-dot platform-login__device-dot--blue\"></span>\r\n <span class=\"platform-login__device-dot platform-login__device-dot--green\"></span>\r\n <div class=\"platform-login__device-row platform-login__device-row--short\"></div>\r\n <div class=\"platform-login__device-card platform-login__device-card--primary\">\r\n <span></span>\r\n <strong></strong>\r\n </div>\r\n <div class=\"platform-login__device-card platform-login__device-card--floating\">\r\n <span></span>\r\n <strong></strong>\r\n </div>\r\n <div class=\"platform-login__device-list\">\r\n <span></span>\r\n <span></span>\r\n <span></span>\r\n </div>\r\n </div>\r\n <div class=\"platform-login__chart\">\r\n <span></span>\r\n <span></span>\r\n <span></span>\r\n </div>\r\n <div class=\"platform-login__avatar\"></div>\r\n </div>\r\n\r\n @if (features().length > 0) {\r\n <div class=\"platform-login__features\" aria-label=\"\u767B\u5F55\u9875\u7279\u6027\">\r\n @for (feature of features(); track feature.label) {\r\n <div [class]=\"featureClass(feature.toneClass)\">\r\n @if (feature.icon) {\r\n <lucide-icon [img]=\"feature.icon\" size=\"20\" aria-hidden=\"true\" />\r\n }\r\n <span>{{ feature.label }}</span>\r\n @if (feature.description) {\r\n <small>{{ feature.description }}</small>\r\n }\r\n </div>\r\n }\r\n </div>\r\n }\r\n </section>\r\n\r\n <section class=\"platform-login__panel\" aria-labelledby=\"platform-login-title\">\r\n <div class=\"platform-login__header\">\r\n @if (panelEyebrow()) {\r\n <p>{{ panelEyebrow() }}</p>\r\n }\r\n <h2 id=\"platform-login-title\">{{ panelTitle() }}</h2>\r\n <span>{{ panelSubtitle() }}</span>\r\n </div>\r\n\r\n @if (visibleErrorMessage()) {\r\n <p class=\"platform-login__error\" role=\"alert\">{{ visibleErrorMessage() }}</p>\r\n }\r\n\r\n <form class=\"platform-login__form\" (ngSubmit)=\"submit()\">\r\n <label class=\"platform-login__field\">\r\n <span>{{ usernameLabel() }}</span>\r\n <div class=\"platform-login__control\">\r\n <lucide-icon [img]=\"userIcon\" size=\"17\" aria-hidden=\"true\" />\r\n <input\r\n type=\"text\"\r\n data-platform-input=\"bare\"\r\n autocomplete=\"username\"\r\n [placeholder]=\"usernamePlaceholder()\"\r\n [ngModel]=\"username()\"\r\n (ngModelChange)=\"username.set($event)\"\r\n name=\"username\"\r\n />\r\n </div>\r\n </label>\r\n\r\n <label class=\"platform-login__field\">\r\n <span>{{ passwordLabel() }}</span>\r\n <div class=\"platform-login__control\">\r\n <lucide-icon [img]=\"keyIcon\" size=\"17\" aria-hidden=\"true\" />\r\n <input\r\n [type]=\"showPassword() ? 'text' : 'password'\"\r\n data-platform-input=\"bare\"\r\n autocomplete=\"current-password\"\r\n [placeholder]=\"passwordPlaceholder()\"\r\n [ngModel]=\"password()\"\r\n (ngModelChange)=\"password.set($event)\"\r\n name=\"password\"\r\n />\r\n <button\r\n class=\"platform-login__icon-button\"\r\n type=\"button\"\r\n [attr.aria-label]=\"showPassword() ? '\u9690\u85CF\u5BC6\u7801' : '\u663E\u793A\u5BC6\u7801'\"\r\n (click)=\"togglePassword()\"\r\n >\r\n <lucide-icon [img]=\"showPassword() ? eyeOffIcon : eyeIcon\" size=\"17\" aria-hidden=\"true\" />\r\n </button>\r\n </div>\r\n </label>\r\n\r\n <div class=\"platform-login__options\">\r\n <label class=\"platform-login__remember\">\r\n <input\r\n type=\"checkbox\"\r\n [ngModel]=\"rememberMe()\"\r\n (ngModelChange)=\"rememberMe.set($event)\"\r\n name=\"rememberMe\"\r\n />\r\n <span>{{ rememberLabel() }}</span>\r\n </label>\r\n @if (showForgotPassword()) {\r\n <button class=\"platform-login__link\" type=\"button\" (click)=\"emitForgotPassword()\">\r\n {{ forgotPasswordText() }}\r\n </button>\r\n } @else if (metaText()) {\r\n <span>{{ metaText() }}</span>\r\n }\r\n </div>\r\n\r\n @if (metaText() && showForgotPassword()) {\r\n <p class=\"platform-login__meta\">{{ metaText() }}</p>\r\n }\r\n\r\n <button class=\"platform-login__submit\" type=\"submit\" [disabled]=\"submitting()\">\r\n {{ submitting() ? submittingText() : submitText() }}\r\n </button>\r\n </form>\r\n\r\n @if (socialProviders().length > 0) {\r\n <div class=\"platform-login__social\">\r\n <div class=\"platform-login__divider\">\r\n <span>{{ dividerText() }}</span>\r\n </div>\r\n <div class=\"platform-login__social-list\">\r\n @for (provider of socialProviders(); track provider.id) {\r\n <button\r\n [class]=\"socialProviderClass(provider.toneClass)\"\r\n type=\"button\"\r\n [disabled]=\"provider.disabled\"\r\n [attr.aria-label]=\"provider.label\"\r\n (click)=\"emitSocialLogin(provider)\"\r\n >\r\n @if (provider.icon) {\r\n <lucide-icon [img]=\"provider.icon\" size=\"22\" aria-hidden=\"true\" />\r\n <span class=\"platform-login__social-label\">{{ provider.label }}</span>\r\n } @else {\r\n <span>{{ socialProviderInitial(provider) }}</span>\r\n }\r\n </button>\r\n }\r\n </div>\r\n </div>\r\n }\r\n\r\n @if (showRegister()) {\r\n <p class=\"platform-login__register\">\r\n <span>{{ registerPrompt() }}</span>\r\n <button class=\"platform-login__link\" type=\"button\" (click)=\"emitRegister()\">\r\n {{ registerText() }}\r\n </button>\r\n </p>\r\n }\r\n </section>\r\n </div>\r\n </section>\r\n</main>\r\n", styles: [":host{display:block;height:100dvh;min-height:100dvh;overflow:auto;color:var(--platform-login-text, #111827);font-family:Inter,SF Pro Display,PingFang SC,Microsoft YaHei,sans-serif}.platform-login,.platform-login *{box-sizing:border-box}.platform-login{--platform-login-available-height: calc(100dvh - (var(--platform-login-page-padding, 1.875rem) * 2));height:100%;min-height:0;display:grid;place-items:center;padding:var(--platform-login-page-padding, 1.875rem);background:linear-gradient(180deg,#fffffff2,#f7fbffeb),linear-gradient(135deg,#f8fbff,#edf5ff 48%,#f6f9ff);overflow:hidden}.platform-login__stage{position:relative;width:min(100%,var(--platform-login-stage-width, 90rem));height:min(50rem,var(--platform-login-available-height));min-height:min(42rem,var(--platform-login-available-height));overflow:hidden;border:1px solid var(--platform-login-stage-border, rgba(126, 164, 232, .34));border-radius:var(--platform-login-stage-radius, 1.5rem);background:linear-gradient(110deg,#ffffffb8,#e8f2ffbd 45%,#d6e6ffdb),#eef6ff;box-shadow:var(--platform-login-stage-shadow, 0 1.375rem 3.25rem rgba(66, 111, 180, .18));isolation:isolate}.platform-login__stage:before{content:\"\";position:absolute;inset:13% -14% auto auto;width:52%;height:78%;border:1px solid rgba(255,255,255,.66);border-radius:50%;background:linear-gradient(135deg,#ffffff52,#b9d3ff26);transform:rotate(-19deg);z-index:-1}.platform-login__stage:after{content:\"\";position:absolute;inset:auto -8% -28% 44%;height:76%;border:1px solid rgba(103,151,230,.18);border-radius:50% 50% 0 0;transform:rotate(11deg);z-index:-1}.platform-login__language{position:absolute;top:2rem;right:2.375rem;z-index:2;display:inline-flex;align-items:center;gap:.375rem;min-height:2.25rem;padding:0 .375rem;border:0;border-radius:.75rem;background:transparent;color:var(--platform-login-muted, #475569);cursor:pointer;font:inherit;font-size:.875rem}.platform-login__language:hover{background:#ffffff7a;color:var(--platform-login-primary, #1677ff)}.platform-login__content{height:100%;min-height:0;display:grid;grid-template-columns:minmax(0,1.08fr) minmax(21rem,27rem);align-items:center;gap:clamp(2rem,6vw,6.5rem);padding:5.625rem clamp(2rem,6vw,5.625rem) 3.625rem}.platform-login__hero{min-width:0;display:grid;gap:1.5rem;align-content:center}.platform-login__brand,.platform-login__options,.platform-login__remember,.platform-login__social-list,.platform-login__register,.platform-login__divider{display:flex;align-items:center}.platform-login__brand{gap:.875rem}.platform-login__mark{position:relative;width:2.75rem;height:2.75rem;display:grid;place-items:center;color:#1677ff;font-size:.8125rem;font-weight:800}.platform-login__mark:before,.platform-login__mark:after{content:\"\";position:absolute;inset:.25rem;border:.25rem solid currentColor;border-radius:.75rem;transform:rotate(30deg)}.platform-login__mark:after{inset:.6875rem;border-width:.1875rem;color:#1677ff3d;transform:rotate(-30deg)}.platform-login__mark span{position:relative;z-index:1;transform:translateY(.0625rem)}.platform-login__brand-logo-frame{width:min(100%,16.5rem);padding:var(--platform-login-brand-logo-frame-padding, .375rem .625rem .375rem .3125rem);border:var(--platform-login-brand-logo-frame-border, 1px solid rgba(255, 255, 255, .38));border-radius:var(--platform-login-brand-logo-frame-radius, 1rem);background:var(--platform-login-brand-logo-frame-bg, linear-gradient(135deg, rgba(18, 57, 112, .96), rgba(20, 137, 132, .95)));box-shadow:var(--platform-login-brand-logo-frame-shadow, 0 .875rem 1.875rem rgba(32, 91, 151, .18))}.platform-login__brand-logo{display:block;width:100%;height:auto;object-fit:contain;object-position:left center;-webkit-user-select:none;user-select:none;-webkit-user-drag:none}.platform-login__brand p,.platform-login__brand h1,.platform-login__hero-copy p,.platform-login__hero-copy h2,.platform-login__header p,.platform-login__header h2,.platform-login__header span,.platform-login__error,.platform-login__meta,.platform-login__register{margin:0}.platform-login__brand p{color:var(--platform-login-muted, #64748b);font-size:.875rem;line-height:1.3}.platform-login__brand h1{margin-top:.25rem;color:var(--platform-login-text, #0f172a);font-size:1.75rem;line-height:1.2;font-weight:800;letter-spacing:0}.platform-login__hero-copy{max-width:35rem}.platform-login__eyebrow,.platform-login__header p{color:var(--platform-login-primary, #1677ff);font-size:.8125rem;line-height:1.5;font-weight:700}.platform-login__hero-copy h2{color:var(--platform-login-text, #0f172a);font-size:1.75rem;line-height:1.22;font-weight:800;letter-spacing:0}.platform-login__hero-copy>p:last-child{margin-top:.75rem;color:var(--platform-login-soft, #475569);font-size:1rem;line-height:1.7}.platform-login__visual{position:relative;width:min(100%,28.75rem);aspect-ratio:1.42;margin:.375rem 0 0 2rem;border-radius:2rem;background:linear-gradient(180deg,#ffffff4d,#c9dcff1f),linear-gradient(155deg,#5f91ff14,#ffffff6b);transform:perspective(54rem) rotateX(58deg) rotate(-18deg);transform-origin:50% 70%;box-shadow:0 1.625rem 3.125rem #3b76e638,inset 0 0 0 1px #ffffffa8}.platform-login__visual:before{content:\"\";position:absolute;inset:8% 8% 12%;border-radius:1.375rem;border:1px solid rgba(255,255,255,.72)}.platform-login__device{position:absolute;left:33%;bottom:18%;width:38%;height:78%;border:1px solid rgba(132,170,240,.56);border-radius:.75rem;background:linear-gradient(180deg,#ffffffd6,#dceaffa3),#f6faff;box-shadow:0 1.25rem 2.5rem #3571e033,inset 0 0 1rem #ffffffc7}.platform-login__device-dot,.platform-login__device-row,.platform-login__device-card,.platform-login__device-list,.platform-login__chart,.platform-login__avatar{position:absolute}.platform-login__device-dot{top:12%;width:.625rem;height:.625rem;border-radius:50%}.platform-login__device-dot--blue{left:13%;background:#1677ff}.platform-login__device-dot--green{left:26%;background:#00b42a}.platform-login__device-row{left:39%;right:10%;top:13%;height:.5rem;border-radius:999px;background:#96b4eb47}.platform-login__device-card{display:grid;align-items:center;grid-template-columns:2.125rem minmax(0,1fr);gap:.625rem;padding:.625rem .75rem;border-radius:.75rem;background:#ffffffc7;box-shadow:0 .875rem 1.75rem #3870dc2e,inset 0 0 0 1px #ffffffd1}.platform-login__device-card span{display:block;width:1.625rem;height:1.625rem;border-radius:50%;background:linear-gradient(135deg,#7ca3ed,#cfe0ff)}.platform-login__device-card strong{display:block;height:.5625rem;border-radius:999px;background:linear-gradient(90deg,#7aa7ff,#7aa7ff40)}.platform-login__device-card--primary{left:20%;right:-20%;top:34%}.platform-login__device-card--floating{left:72%;right:-32%;top:58%}.platform-login__device-list{left:24%;right:20%;bottom:15%;display:grid;gap:.5rem}.platform-login__device-list span{height:.4375rem;border-radius:999px;background:#759eec47}.platform-login__device-list span:nth-child(2){width:72%}.platform-login__device-list span:nth-child(3){width:86%}.platform-login__chart{left:11%;bottom:18%;width:22%;height:42%;display:flex;align-items:flex-end;justify-content:center;gap:.5rem;padding:.875rem .625rem;border:1px solid rgba(132,170,240,.48);border-radius:.875rem;background:#ffffffc7;box-shadow:0 1rem 1.875rem #3870dc2e}.platform-login__chart span{width:.625rem;border-radius:999px 999px .25rem .25rem;background:linear-gradient(180deg,#7aa7ff,#2b79ff)}.platform-login__chart span:nth-child(1){height:38%}.platform-login__chart span:nth-child(2){height:62%}.platform-login__chart span:nth-child(3){height:82%}.platform-login__avatar{left:27%;bottom:46%;width:2.5rem;height:2.5rem;border:.375rem solid rgba(255,255,255,.8);border-radius:50%;background:linear-gradient(135deg,#3182ff,#b5d0ff);box-shadow:0 .75rem 1.625rem #3182ff47}.platform-login__features{width:min(100%,34rem);display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.75rem}.platform-login__feature{min-width:0;display:grid;grid-template-columns:auto minmax(0,1fr);grid-template-rows:auto auto;align-items:center;gap:.125rem .625rem;padding:.75rem .875rem;border:1px solid rgba(255,255,255,.72);border-radius:1rem;background:#ffffff80;box-shadow:0 .625rem 1.25rem #406eb414;color:#1677ff}.platform-login__feature lucide-icon{grid-row:1/span 2;width:2.375rem;height:2.375rem;display:grid;place-items:center;border-radius:50%;background:#1677ff1a}.platform-login__feature span{min-width:0;overflow:hidden;color:var(--platform-login-text, #111827);font-size:.875rem;font-weight:700;text-overflow:ellipsis;white-space:nowrap}.platform-login__feature small{min-width:0;color:var(--platform-login-soft, #64748b);font-size:.75rem;line-height:1.4;overflow-wrap:anywhere}.platform-login__feature.is-green{color:#00b42a}.platform-login__feature.is-green lucide-icon{background:#00b42a1a}.platform-login__feature.is-amber{color:#ff9500}.platform-login__feature.is-amber lucide-icon{background:#ff95001f}.platform-login__feature.is-violet{color:#7c3aed}.platform-login__feature.is-violet lucide-icon{background:#7c3aed1a}.platform-login__panel{width:100%;align-self:center;display:grid;gap:1.125rem;padding:3rem 2.625rem 2.25rem;border:1px solid rgba(255,255,255,.72);border-radius:var(--platform-login-panel-radius, 1.5rem);background:var(--platform-login-panel-bg, rgba(255, 255, 255, .88));box-shadow:var(--platform-login-panel-shadow, 0 1.25rem 3rem rgba(42, 82, 142, .14));-webkit-backdrop-filter:blur(1.25rem);backdrop-filter:blur(1.25rem)}.platform-login__header{display:grid;gap:.5rem}.platform-login__header h2{color:var(--platform-login-text, #111827);font-size:1.625rem;line-height:1.25;font-weight:800;letter-spacing:0}.platform-login__header span{color:var(--platform-login-soft, #64748b);font-size:.875rem;line-height:1.5}.platform-login__error{padding:.625rem .75rem;border:1px solid rgba(239,68,68,.22);border-radius:.75rem;background:#fff1f2;color:#dc2626;font-size:.8125rem;line-height:1.5}.platform-login__form{display:grid;gap:1rem}.platform-login__field{display:grid;gap:.5rem}.platform-login__field>span{color:var(--platform-login-label, #1f2937);font-size:.8125rem;font-weight:700;line-height:1.5}.platform-login__control{min-height:2.75rem;display:flex;align-items:center;gap:.5rem;padding:0 .75rem;border:1px solid var(--platform-login-input-border, #d8e1ee);border-radius:var(--platform-login-input-radius, .75rem);background:var(--platform-login-input-bg, rgba(255, 255, 255, .92));color:var(--platform-login-muted, #72819a);transition:border-color .16s ease,box-shadow .16s ease,background .16s ease}.platform-login__control:focus-within{border-color:var(--platform-login-primary, #1677ff);background:#fff;box-shadow:0 0 0 .1875rem #1677ff1f}.platform-login__control input{appearance:none;width:100%;min-width:0;height:2.625rem;padding:0!important;padding-inline:0!important;border:0!important;border-radius:0;outline:0;background:transparent;box-shadow:none!important;color:var(--platform-login-text, #111827);font:inherit;font-size:.875rem}.platform-login__control input::placeholder{color:#9aa8ba}.platform-login__icon-button,.platform-login__link,.platform-login__submit,.platform-login__social-button{font:inherit}.platform-login__icon-button{width:2rem;height:2rem;flex:0 0 auto;display:grid;place-items:center;padding:0;border:0;border-radius:.625rem;background:transparent;color:var(--platform-login-muted, #72819a);cursor:pointer}.platform-login__icon-button:hover{background:#f1f6ff;color:var(--platform-login-primary, #1677ff)}.platform-login__options{justify-content:space-between;gap:.75rem;color:var(--platform-login-soft, #64748b);font-size:.8125rem}.platform-login__remember{gap:.4375rem;min-width:0}.platform-login__remember input{width:.9375rem;height:.9375rem;margin:0;accent-color:var(--platform-login-primary, #1677ff)}.platform-login__remember span{white-space:nowrap}.platform-login__link{display:inline-flex;align-items:center;min-height:1.5rem;padding:0;border:0;background:transparent;color:var(--platform-login-primary, #1677ff);cursor:pointer;font-size:.8125rem;font-weight:700}.platform-login__link:hover{color:#0958d9}.platform-login__meta{color:var(--platform-login-soft, #64748b);font-size:.75rem;line-height:1.5}.platform-login__submit{min-height:2.75rem;border:0;border-radius:var(--platform-login-button-radius, .75rem);background:var(--platform-login-button-bg, linear-gradient(180deg, #2385ff 0%, #1677ff 100%));color:#fff;box-shadow:var(--platform-login-button-shadow, 0 .875rem 1.625rem rgba(22, 119, 255, .22));cursor:pointer;font-size:.9375rem;font-weight:800}.platform-login__submit:hover:not(:disabled){background:linear-gradient(180deg,#3390ff,#0f6be8)}.platform-login__submit:disabled{cursor:progress;opacity:.72}.platform-login__social{display:grid;gap:1rem}.platform-login__divider{gap:.875rem;color:var(--platform-login-soft, #64748b);font-size:.8125rem;line-height:1.5;white-space:nowrap}.platform-login__divider:before,.platform-login__divider:after{content:\"\";height:1px;flex:1 1 auto;background:#e6edf6}.platform-login__social-list{justify-content:center;gap:1rem}.platform-login__social-button{position:relative;width:2.75rem;height:2.75rem;display:grid;place-items:center;padding:0;border:1px solid rgba(217,225,237,.86);border-radius:50%;background:#fff;color:#111827;box-shadow:0 .625rem 1.25rem #2a528e14;cursor:pointer;transition:transform .16s ease,box-shadow .16s ease,border-color .16s ease}.platform-login__social-button:hover:not(:disabled){border-color:#1677ff52;box-shadow:0 .875rem 1.625rem #2a528e1f;transform:translateY(-.125rem)}.platform-login__social-button:disabled{cursor:not-allowed;opacity:.5}.platform-login__social-button.is-wechat{color:#00b42a}.platform-login__social-button.is-dingtalk{color:#24a8ff}.platform-login__social-button.is-apple{color:#111827}.platform-login__social-label{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}.platform-login__register{justify-content:center;gap:.375rem;color:var(--platform-login-soft, #64748b);font-size:.875rem}.platform-login__language:focus-visible,.platform-login__icon-button:focus-visible,.platform-login__link:focus-visible,.platform-login__submit:focus-visible,.platform-login__social-button:focus-visible{outline:2px solid var(--platform-login-primary, #1677ff);outline-offset:2px}@media(min-width:72rem){.platform-login__hero-copy h2{font-size:2rem}}@media(min-width:64.01rem)and (max-height:52rem){.platform-login__content{gap:clamp(1.5rem,4vw,4rem);padding:4.25rem clamp(1.75rem,5vw,4.75rem) 2.5rem}.platform-login__hero{gap:1.125rem}.platform-login__visual{width:min(100%,24rem);margin-top:0}.platform-login__panel{gap:1rem;padding:2.5rem 2.375rem 2rem}}@media(min-width:64.01rem)and (max-height:42rem){.platform-login{height:auto;min-height:100%;overflow:auto}.platform-login__stage{height:auto;min-height:var(--platform-login-available-height)}.platform-login__content{height:auto;min-height:inherit}}@media(max-width:64rem){.platform-login{height:auto;min-height:100%;padding:1rem;overflow:auto}.platform-login__stage{height:auto;min-height:calc(100dvh - 2rem)}.platform-login__content{height:auto;min-height:inherit;grid-template-columns:1fr;gap:2rem;padding:5rem 1.5rem 1.5rem}.platform-login__hero{justify-items:center;text-align:center}.platform-login__brand{justify-content:center}.platform-login__visual{width:min(100%,25rem);margin:0}.platform-login__features{width:min(100%,40rem)}.platform-login__panel{width:min(100%,27rem);justify-self:center}}@media(max-width:40rem){.platform-login{place-items:start center;padding:0}.platform-login__stage{width:100%;min-height:100dvh;overflow:visible;border-width:0;border-radius:0;box-shadow:none}.platform-login__language{top:1rem;right:1rem}.platform-login__content{padding:4.25rem .875rem 1rem}.platform-login__brand h1{font-size:1.375rem}.platform-login__hero-copy h2{font-size:1.5rem}.platform-login__hero-copy>p:last-child{font-size:.9375rem}.platform-login__visual{width:min(100%,17rem)}.platform-login__features{grid-template-columns:repeat(3,minmax(0,1fr));gap:.5rem}.platform-login__feature{grid-template-columns:1fr;justify-items:center;gap:.375rem;padding:.625rem .375rem;text-align:center}.platform-login__feature lucide-icon{grid-row:auto;width:2rem;height:2rem}.platform-login__feature span{font-size:.75rem}.platform-login__feature small{display:none}.platform-login__panel{padding:1.5rem 1.125rem;border-radius:1.125rem}.platform-login__options{align-items:flex-start;flex-direction:column}}\n"] }]
|
|
5490
|
+
}], propDecorators: { brandMark: [{ type: i0.Input, args: [{ isSignal: true, alias: "brandMark", required: false }] }], brandLogo: [{ type: i0.Input, args: [{ isSignal: true, alias: "brandLogo", required: false }] }], brandName: [{ type: i0.Input, args: [{ isSignal: true, alias: "brandName", required: false }] }], productName: [{ type: i0.Input, args: [{ isSignal: true, alias: "productName", required: false }] }], heroAriaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "heroAriaLabel", required: false }] }], heroEyebrow: [{ type: i0.Input, args: [{ isSignal: true, alias: "heroEyebrow", required: false }] }], heroTitle: [{ type: i0.Input, args: [{ isSignal: true, alias: "heroTitle", required: false }] }], heroText: [{ type: i0.Input, args: [{ isSignal: true, alias: "heroText", required: false }] }], features: [{ type: i0.Input, args: [{ isSignal: true, alias: "features", required: false }] }], showLanguageSwitcher: [{ type: i0.Input, args: [{ isSignal: true, alias: "showLanguageSwitcher", required: false }] }], languageLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "languageLabel", required: false }] }], panelEyebrow: [{ type: i0.Input, args: [{ isSignal: true, alias: "panelEyebrow", required: false }] }], panelTitle: [{ type: i0.Input, args: [{ isSignal: true, alias: "panelTitle", required: false }] }], panelSubtitle: [{ type: i0.Input, args: [{ isSignal: true, alias: "panelSubtitle", required: false }] }], usernameLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "usernameLabel", required: false }] }], passwordLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "passwordLabel", required: false }] }], usernamePlaceholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "usernamePlaceholder", required: false }] }], passwordPlaceholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "passwordPlaceholder", required: false }] }], rememberLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "rememberLabel", required: false }] }], forgotPasswordText: [{ type: i0.Input, args: [{ isSignal: true, alias: "forgotPasswordText", required: false }] }], dividerText: [{ type: i0.Input, args: [{ isSignal: true, alias: "dividerText", required: false }] }], registerPrompt: [{ type: i0.Input, args: [{ isSignal: true, alias: "registerPrompt", required: false }] }], registerText: [{ type: i0.Input, args: [{ isSignal: true, alias: "registerText", required: false }] }], metaText: [{ type: i0.Input, args: [{ isSignal: true, alias: "metaText", required: false }] }], submitText: [{ type: i0.Input, args: [{ isSignal: true, alias: "submitText", required: false }] }], submittingText: [{ type: i0.Input, args: [{ isSignal: true, alias: "submittingText", required: false }] }], emptyMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyMessage", required: false }] }], errorMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "errorMessage", required: false }] }], submitting: [{ type: i0.Input, args: [{ isSignal: true, alias: "submitting", required: false }] }], defaultUsername: [{ type: i0.Input, args: [{ isSignal: true, alias: "defaultUsername", required: false }] }], defaultPassword: [{ type: i0.Input, args: [{ isSignal: true, alias: "defaultPassword", required: false }] }], rememberDefault: [{ type: i0.Input, args: [{ isSignal: true, alias: "rememberDefault", required: false }] }], showForgotPassword: [{ type: i0.Input, args: [{ isSignal: true, alias: "showForgotPassword", required: false }] }], showRegister: [{ type: i0.Input, args: [{ isSignal: true, alias: "showRegister", required: false }] }], socialProviders: [{ type: i0.Input, args: [{ isSignal: true, alias: "socialProviders", required: false }] }], loginSubmit: [{ type: i0.Output, args: ["loginSubmit"] }], forgotPasswordClick: [{ type: i0.Output, args: ["forgotPasswordClick"] }], registerClick: [{ type: i0.Output, args: ["registerClick"] }], languageClick: [{ type: i0.Output, args: ["languageClick"] }], socialLogin: [{ type: i0.Output, args: ["socialLogin"] }] } });
|
|
4634
5491
|
|
|
4635
5492
|
const DEFAULT_MENU_POSITIONS = [
|
|
4636
5493
|
{ originX: 'start', originY: 'bottom', overlayX: 'start', overlayY: 'top', offsetY: 4 },
|
|
5494
|
+
{ originX: 'end', originY: 'bottom', overlayX: 'end', overlayY: 'top', offsetY: 4 },
|
|
4637
5495
|
];
|
|
4638
5496
|
class MenuItemComponent {
|
|
4639
5497
|
closeMenu = null;
|
|
@@ -4732,11 +5590,11 @@ class MenuComponent {
|
|
|
4732
5590
|
});
|
|
4733
5591
|
}
|
|
4734
5592
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: MenuComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4735
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.8", type: MenuComponent, isStandalone: true, selector: "s-menu", inputs: { origin: { classPropertyName: "origin", publicName: "origin", isSignal: true, isRequired: true, transformFunction: null }, trigger: { classPropertyName: "trigger", publicName: "trigger", isSignal: true, isRequired: true, transformFunction: null }, positions: { classPropertyName: "positions", publicName: "positions", isSignal: true, isRequired: false, transformFunction: null }, panelWidth: { classPropertyName: "panelWidth", publicName: "panelWidth", isSignal: true, isRequired: false, transformFunction: null } }, queries: [{ propertyName: "menuItems", predicate: MenuItemComponent, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "formatMenu", first: true, predicate: ["formatMenu"], descendants: true, isSignal: true }], ngImport: i0, template: "<ng-template\
|
|
5593
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.8", type: MenuComponent, isStandalone: true, selector: "s-menu", inputs: { origin: { classPropertyName: "origin", publicName: "origin", isSignal: true, isRequired: true, transformFunction: null }, trigger: { classPropertyName: "trigger", publicName: "trigger", isSignal: true, isRequired: true, transformFunction: null }, positions: { classPropertyName: "positions", publicName: "positions", isSignal: true, isRequired: false, transformFunction: null }, panelWidth: { classPropertyName: "panelWidth", publicName: "panelWidth", isSignal: true, isRequired: false, transformFunction: null } }, queries: [{ propertyName: "menuItems", predicate: MenuItemComponent, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "formatMenu", first: true, predicate: ["formatMenu"], descendants: true, isSignal: true }], ngImport: i0, template: "<ng-template\n [cdkConnectedOverlayOpen]=\"trigger().expanded()\"\n [cdkConnectedOverlay]=\"{ origin: origin(), usePopover: 'inline' }\"\n [cdkConnectedOverlayPositions]=\"positions()\"\n cdkAttachPopoverAsChild\n>\n <div ngMenu class=\"menu\" #formatMenu=\"ngMenu\" [style.width]=\"panelWidth()\">\n <ng-template ngMenuContent>\n <ng-content />\n </ng-template>\n </div>\n</ng-template>\n", styles: [":host{display:contents}[ngMenu]{margin:0;width:15rem;padding:.25rem;border-radius:.5rem;border:1px solid var(--color-border-strong);background-color:var(--color-surface);color:var(--color-text-primary)}[ngMenu][data-visible=false]{display:none}[ngMenuItem]{color:var(--color-text-primary);outline:none;display:flex;cursor:pointer;align-items:center;gap:.5rem;padding:.5rem;font-size:.875rem;border-radius:.25rem}[ngMenuItem]:hover,[ngMenuItem][data-active=true]{background:var(--color-surface-soft);outline:1.5px solid var(--color-primary)}[ngMenuItem]:focus{outline:2px solid var(--color-link)}[ngMenuItem] .icon{opacity:.875;font-size:1.25rem}[ngMenuItem] .label{flex:1;opacity:.875;font-size:.875rem}[ngMenu] .separator{border-top:1px solid var(--color-border);margin:.25rem 0;opacity:.25}.menu-item--danger{color:var(--color-error)}\n"], dependencies: [{ kind: "ngmodule", type: OverlayModule }, { kind: "directive", type: i1$2.CdkConnectedOverlay, selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]", inputs: ["cdkConnectedOverlayOrigin", "cdkConnectedOverlayPositions", "cdkConnectedOverlayPositionStrategy", "cdkConnectedOverlayOffsetX", "cdkConnectedOverlayOffsetY", "cdkConnectedOverlayWidth", "cdkConnectedOverlayHeight", "cdkConnectedOverlayMinWidth", "cdkConnectedOverlayMinHeight", "cdkConnectedOverlayBackdropClass", "cdkConnectedOverlayPanelClass", "cdkConnectedOverlayViewportMargin", "cdkConnectedOverlayScrollStrategy", "cdkConnectedOverlayOpen", "cdkConnectedOverlayDisableClose", "cdkConnectedOverlayTransformOriginOn", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayLockPosition", "cdkConnectedOverlayFlexibleDimensions", "cdkConnectedOverlayGrowAfterOpen", "cdkConnectedOverlayPush", "cdkConnectedOverlayDisposeOnNavigation", "cdkConnectedOverlayUsePopover", "cdkConnectedOverlayMatchWidth", "cdkConnectedOverlay"], outputs: ["backdropClick", "positionChange", "attach", "detach", "overlayKeydown", "overlayOutsideClick"], exportAs: ["cdkConnectedOverlay"] }, { kind: "directive", type: Menu, selector: "[ngMenu]", inputs: ["id", "wrap", "typeaheadDelay", "disabled", "expansionDelay"], outputs: ["itemSelected"], exportAs: ["ngMenu"] }, { kind: "directive", type: MenuContent, selector: "ng-template[ngMenuContent]", exportAs: ["ngMenuContent"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
4736
5594
|
}
|
|
4737
5595
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: MenuComponent, decorators: [{
|
|
4738
5596
|
type: Component,
|
|
4739
|
-
args: [{ selector: 's-menu', imports: [OverlayModule, Menu, MenuContent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-template\
|
|
5597
|
+
args: [{ selector: 's-menu', imports: [OverlayModule, Menu, MenuContent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-template\n [cdkConnectedOverlayOpen]=\"trigger().expanded()\"\n [cdkConnectedOverlay]=\"{ origin: origin(), usePopover: 'inline' }\"\n [cdkConnectedOverlayPositions]=\"positions()\"\n cdkAttachPopoverAsChild\n>\n <div ngMenu class=\"menu\" #formatMenu=\"ngMenu\" [style.width]=\"panelWidth()\">\n <ng-template ngMenuContent>\n <ng-content />\n </ng-template>\n </div>\n</ng-template>\n", styles: [":host{display:contents}[ngMenu]{margin:0;width:15rem;padding:.25rem;border-radius:.5rem;border:1px solid var(--color-border-strong);background-color:var(--color-surface);color:var(--color-text-primary)}[ngMenu][data-visible=false]{display:none}[ngMenuItem]{color:var(--color-text-primary);outline:none;display:flex;cursor:pointer;align-items:center;gap:.5rem;padding:.5rem;font-size:.875rem;border-radius:.25rem}[ngMenuItem]:hover,[ngMenuItem][data-active=true]{background:var(--color-surface-soft);outline:1.5px solid var(--color-primary)}[ngMenuItem]:focus{outline:2px solid var(--color-link)}[ngMenuItem] .icon{opacity:.875;font-size:1.25rem}[ngMenuItem] .label{flex:1;opacity:.875;font-size:.875rem}[ngMenu] .separator{border-top:1px solid var(--color-border);margin:.25rem 0;opacity:.25}.menu-item--danger{color:var(--color-error)}\n"] }]
|
|
4740
5598
|
}], ctorParameters: () => [], propDecorators: { origin: [{ type: i0.Input, args: [{ isSignal: true, alias: "origin", required: true }] }], trigger: [{ type: i0.Input, args: [{ isSignal: true, alias: "trigger", required: true }] }], positions: [{ type: i0.Input, args: [{ isSignal: true, alias: "positions", required: false }] }], panelWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "panelWidth", required: false }] }], formatMenu: [{ type: i0.ViewChild, args: ['formatMenu', { isSignal: true }] }], menuItems: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => MenuItemComponent), { ...{ descendants: true }, isSignal: true }] }] } });
|
|
4741
5599
|
|
|
4742
5600
|
class MerchantCard {
|
|
@@ -5252,6 +6110,7 @@ class MItem {
|
|
|
5252
6110
|
active = input(false, ...(ngDevMode ? [{ debugName: "active" }] : /* istanbul ignore next */ []));
|
|
5253
6111
|
disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
5254
6112
|
itemClick = output();
|
|
6113
|
+
itemContextMenu = output();
|
|
5255
6114
|
prefixSlot;
|
|
5256
6115
|
avatarSlot;
|
|
5257
6116
|
titleSlot;
|
|
@@ -5270,19 +6129,26 @@ class MItem {
|
|
|
5270
6129
|
}
|
|
5271
6130
|
this.itemClick.emit(event);
|
|
5272
6131
|
}
|
|
6132
|
+
onContextMenu(event) {
|
|
6133
|
+
if (this.disabled()) {
|
|
6134
|
+
return;
|
|
6135
|
+
}
|
|
6136
|
+
this.itemContextMenu.emit(event);
|
|
6137
|
+
}
|
|
5273
6138
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: MItem, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
5274
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: MItem, isStandalone: true, selector: "m-item", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, layout: { classPropertyName: "layout", publicName: "layout", isSignal: true, isRequired: false, transformFunction: null }, status: { classPropertyName: "status", publicName: "status", isSignal: true, isRequired: false, transformFunction: null }, statusLabel: { classPropertyName: "statusLabel", publicName: "statusLabel", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, time: { classPropertyName: "time", publicName: "time", isSignal: true, isRequired: false, transformFunction: null }, content: { classPropertyName: "content", publicName: "content", isSignal: true, isRequired: false, transformFunction: null }, extra: { classPropertyName: "extra", publicName: "extra", isSignal: true, isRequired: false, transformFunction: null }, subtitle: { classPropertyName: "subtitle", publicName: "subtitle", isSignal: true, isRequired: false, transformFunction: null }, avatarSrc: { classPropertyName: "avatarSrc", publicName: "avatarSrc", isSignal: true, isRequired: false, transformFunction: null }, avatarText: { classPropertyName: "avatarText", publicName: "avatarText", isSignal: true, isRequired: false, transformFunction: null }, avatarAlt: { classPropertyName: "avatarAlt", publicName: "avatarAlt", isSignal: true, isRequired: false, transformFunction: null }, avatarSize: { classPropertyName: "avatarSize", publicName: "avatarSize", isSignal: true, isRequired: false, transformFunction: null }, avatarShape: { classPropertyName: "avatarShape", publicName: "avatarShape", isSignal: true, isRequired: false, transformFunction: null }, avatarIndicator: { classPropertyName: "avatarIndicator", publicName: "avatarIndicator", isSignal: true, isRequired: false, transformFunction: null }, avatarIndicatorType: { classPropertyName: "avatarIndicatorType", publicName: "avatarIndicatorType", isSignal: true, isRequired: false, transformFunction: null }, clickable: { classPropertyName: "clickable", publicName: "clickable", isSignal: true, isRequired: false, transformFunction: null }, bordered: { classPropertyName: "bordered", publicName: "bordered", isSignal: true, isRequired: false, transformFunction: null }, compact: { classPropertyName: "compact", publicName: "compact", isSignal: true, isRequired: false, transformFunction: null }, showFooter: { classPropertyName: "showFooter", publicName: "showFooter", isSignal: true, isRequired: false, transformFunction: null }, selectable: { classPropertyName: "selectable", publicName: "selectable", isSignal: true, isRequired: false, transformFunction: null }, selected: { classPropertyName: "selected", publicName: "selected", isSignal: true, isRequired: false, transformFunction: null }, active: { classPropertyName: "active", publicName: "active", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { itemClick: "itemClick" }, host: { listeners: { "click": "onActivate($event)", "keydown.enter": "onActivate($event)", "keydown.space": "onActivate($event)" }, properties: { "attr.tabindex": "clickable() ? 0 : null", "attr.role": "\"listitem\"" } }, queries: [{ propertyName: "prefixSlot", first: true, predicate: MItemPrefixSlot, descendants: true }, { propertyName: "avatarSlot", first: true, predicate: MItemAvatarSlot, descendants: true }, { propertyName: "titleSlot", first: true, predicate: MItemTitleSlot, descendants: true }, { propertyName: "summarySlot", first: true, predicate: MItemSummarySlot, descendants: true }, { propertyName: "metaSlot", first: true, predicate: MItemMetaSlot, descendants: true }, { propertyName: "footerSlot", first: true, predicate: MItemFooterSlot, descendants: true }, { propertyName: "trailingSlot", first: true, predicate: MItemTrailingSlot, descendants: true }, { propertyName: "statusSlot", first: true, predicate: MItemStatusSlot, descendants: true }, { propertyName: "actionsSlot", first: true, predicate: MItemActionsSlot, descendants: true }], ngImport: i0, template: "<article\n class=\"m-item\"\n [class.m-item--compact]=\"compact()\"\n [class.m-item--clickable]=\"clickable() && !disabled()\"\n [class.m-item--bordered]=\"bordered()\"\n [class.m-item--selectable]=\"selectable()\"\n [class.m-item--selected]=\"selected()\"\n [class.m-item--active]=\"active()\"\n [class.m-item--disabled]=\"disabled()\"\n [class.m-item--layout-one-line]=\"layout() === 'one-line'\"\n [class.m-item--layout-three-line]=\"layout() === 'three-line'\"\n [class.m-item--variant-workflow]=\"variant() === 'workflow'\"\n [class.m-item--variant-mail]=\"variant() === 'mail'\"\n [class.m-item--variant-activity]=\"variant() === 'activity'\"\n [class.m-item--variant-menu]=\"variant() === 'menu'\"\n [class.m-item--variant-request]=\"variant() === 'request'\"\n [class.m-item--variant-shortcut]=\"variant() === 'shortcut'\"\n [class.m-item--status-unread]=\"status() === 'unread'\"\n [class.m-item--status-todo]=\"status() === 'todo'\"\n [class.m-item--status-processing]=\"status() === 'processing'\"\n [class.m-item--status-warning]=\"status() === 'warning'\"\n [style.--m-item-avatar-size]=\"avatarSize() === null ? null : avatarSize() + 'px'\"\n>\n <div class=\"m-item__start\">\n <div class=\"m-item__prefix\">\n @if (prefixSlot) {\n <ng-container [ngTemplateOutlet]=\"prefixSlot.template\" />\n } @else {\n <ng-content select=\"[m-item-prefix]\" />\n <ng-content select=\"[mItemPrefix]\" />\n }\n </div>\n\n <div class=\"m-item__media\">\n @if (avatarSlot) {\n <ng-container [ngTemplateOutlet]=\"avatarSlot.template\" />\n } @else if (avatarSrc() || avatarText()) {\n <s-avatar\n class=\"m-item__default-avatar\"\n [shape]=\"avatarShape()\"\n [size]=\"avatarSize() ?? 48\"\n [src]=\"avatarSrc()\"\n [alt]=\"avatarAlt() || title()\"\n [text]=\"avatarText() || title()\"\n [indicator]=\"avatarIndicator()\"\n [indicatorType]=\"avatarIndicatorType()\"\n />\n } @else {\n <ng-content select=\"[m-item-start]\" />\n <ng-content select=\"[mItemStart]\" />\n <ng-content select=\"[m-item-avatar]\" />\n <ng-content select=\"[mItemAvatar]\" />\n }\n </div>\n </div>\n\n <div class=\"m-item__body\">\n <div class=\"m-item__row m-item__row--primary\">\n <div class=\"m-item__title-wrap\">\n <div class=\"m-item__title\">\n @if (titleSlot) {\n <ng-container [ngTemplateOutlet]=\"titleSlot.template\" />\n } @else if (title()) {\n {{ title() }}\n } @else {\n <ng-content select=\"[m-item-title]\" />\n <ng-content select=\"[mItemTitle]\" />\n <ng-content select=\"[m-item-title-text]\" />\n <ng-content select=\"[mItemTitleText]\" />\n }\n </div>\n\n @if (subtitle()) {\n <div class=\"m-item__subtitle\">{{ subtitle() }}</div>\n }\n </div>\n\n <div class=\"m-item__meta\">\n @if (trailingSlot) {\n <ng-container [ngTemplateOutlet]=\"trailingSlot.template\" />\n } @else if (time()) {\n {{ time() }}\n } @else {\n <ng-content select=\"[m-item-meta]\" />\n <ng-content select=\"[mItemMeta]\" />\n <ng-content select=\"[m-item-time]\" />\n <ng-content select=\"[mItemTime]\" />\n }\n </div>\n </div>\n\n <div class=\"m-item__row m-item__row--secondary\">\n <div class=\"m-item__description\">\n @if (summarySlot) {\n <ng-container [ngTemplateOutlet]=\"summarySlot.template\" />\n } @else if (content()) {\n {{ content() }}\n } @else {\n <ng-content select=\"[m-item-description]\" />\n <ng-content select=\"[mItemDescription]\" />\n <ng-content select=\"[m-item-content]\" />\n <ng-content select=\"[mItemContent]\" />\n <ng-content select=\"[m-item-content-text]\" />\n <ng-content select=\"[mItemContentText]\" />\n }\n </div>\n\n <div class=\"m-item__actions\">\n @if (statusSlot) {\n <ng-container [ngTemplateOutlet]=\"statusSlot.template\" />\n } @else if (status() === 'todo' || status() === 'processing' || status() === 'warning') {\n <span class=\"m-item__status-badge\">{{ statusLabel() || status() }}</span>\n } @else if (status() === 'unread' || status() === 'read') {\n <span class=\"m-item__status-dot\" [attr.aria-label]=\"statusLabel() || status()\"></span>\n }\n\n @if (actionsSlot) {\n <ng-container [ngTemplateOutlet]=\"actionsSlot.template\" />\n } @else if (extra()) {\n {{ extra() }}\n } @else {\n <ng-content select=\"[m-item-actions]\" />\n <ng-content select=\"[mItemActions]\" />\n <ng-content select=\"[m-item-end]\" />\n <ng-content select=\"[mItemEnd]\" />\n <ng-content select=\"[m-item-extra]\" />\n <ng-content select=\"[mItemExtra]\" />\n <ng-content select=\"[m-item-extra-text]\" />\n <ng-content select=\"[mItemExtraText]\" />\n <ng-content select=\"[m-item-append]\" />\n <ng-content select=\"[mItemAppend]\" />\n }\n </div>\n </div>\n\n @if (showFooter()) {\n <div class=\"m-item__footer\">\n @if (footerSlot) {\n <ng-container [ngTemplateOutlet]=\"footerSlot.template\" />\n } @else if (metaSlot) {\n <ng-container [ngTemplateOutlet]=\"metaSlot.template\" />\n } @else {\n <ng-content select=\"[m-item-footer]\" />\n <ng-content select=\"[mItemFooter]\" />\n }\n </div>\n }\n </div>\n</article>\n", styles: [":host{display:block}:host(:focus-visible){outline:none}:host(:focus-visible) .m-item--clickable{background:var(--color-surface-soft);box-shadow:inset 0 0 0 2px var(--color-primary)}:host(:last-child) .m-item--bordered:after{display:none}.m-item{--m-item-pad-x: var(--m-list-item-pad-x, 16px);--m-item-pad-y: var(--m-list-item-pad-y, 12px);--m-item-gap: var(--m-list-item-gap, 12px);--m-item-prefix-size: var(--m-list-item-prefix-size, 18px);--m-item-avatar-size: var(--m-list-item-avatar-size, 48px);--m-item-min-height: var(--m-list-item-min-height, 72px);--m-item-tone: linear-gradient(135deg, #0f8df2, #16b8a2);position:relative;display:flex;align-items:flex-start;gap:var(--m-item-gap);width:100%;min-width:0;max-width:100%;min-height:var(--m-item-min-height);box-sizing:border-box;padding:var(--m-item-pad-y) var(--m-item-pad-x);background:var(--color-surface)}.m-item--clickable{cursor:pointer}.m-item--clickable:hover{background:var(--color-surface-soft)}.m-item--clickable:active{background:var(--color-fg-press)}.m-item--active{background:var(--color-surface-soft)}.m-item--selected{box-shadow:inset 0 0 0 1px #2563eb2e}.m-item--disabled{cursor:not-allowed;opacity:.48}.m-item--variant-mail{--m-item-tone: linear-gradient(135deg, #7c3aed, #a855f7)}.m-item--variant-activity{--m-item-tone: linear-gradient(135deg, #f97316, #f59e0b)}.m-item--bordered:after{content:\"\";position:absolute;right:0;bottom:0;left:var(--m-item-pad-x);height:1px;background:#0000000a}.m-item--bordered:has(.m-item__media:not(:empty)):after{left:calc(var(--m-item-pad-x) + var(--m-item-avatar-size) + var(--m-item-gap))}.m-item--compact{--m-item-pad-x: 12px;--m-item-pad-y: 10px;--m-item-gap: 10px;--m-item-prefix-size: 18px;--m-item-avatar-size: 38px;--m-item-min-height: 68px}.m-item--variant-menu{--m-item-pad-x: var(--m-list-item-pad-x, 20px);--m-item-pad-y: 0;--m-item-gap: 14px;--m-item-avatar-size: 28px;--m-item-min-height: var(--m-list-item-min-height, 58px);align-items:center}.m-item--variant-menu.m-item--bordered:after{right:var(--m-item-pad-x);left:var(--m-item-pad-x);background:#eef1f5}.m-item--variant-menu .m-item__start,.m-item--variant-menu .m-item__prefix,.m-item--variant-menu .m-item__media{min-height:var(--m-item-min-height);align-items:center}.m-item--variant-menu .m-item__body{align-self:stretch;gap:0}.m-item--variant-menu .m-item__row--primary{min-height:var(--m-item-min-height);align-items:center;column-gap:14px}.m-item--variant-menu .m-item__row--secondary,.m-item--variant-menu .m-item__footer{display:none}.m-item--variant-menu .m-item__title{color:#151515;font-size:16px;font-weight:680;line-height:24px}.m-item--variant-menu .m-item__meta{max-width:44px;display:inline-flex;align-items:center;justify-content:flex-end;color:#98a1af;font-size:16px;line-height:24px}.m-item--variant-request{--m-item-pad-x: 16px;--m-item-pad-y: 20px;--m-item-gap: 12px;--m-item-avatar-size: 48px;--m-item-min-height: 120px}.m-item--variant-request.m-item--bordered:after,.m-item--variant-request.m-item--bordered:has(.m-item__media:not(:empty)):after{right:16px;left:88px;background:#f0f1f3;transform:none}.m-item--variant-request .m-item__body{gap:6px;padding-top:0}.m-item--variant-request .m-item__row{column-gap:12px}.m-item--variant-request .m-item__row--secondary{align-items:flex-start}.m-item--variant-request .m-item__title{color:#111;font-size:17px;font-weight:600;line-height:24px}.m-item--variant-request .m-item__meta{max-width:64px;padding-top:0;color:#8a94a6;font-size:14px;line-height:20px}.m-item--variant-request .m-item__description{color:#8a94a6;font-size:15px;line-height:22px}.m-item--variant-request .m-item__actions{max-width:180px;gap:10px;overflow:visible}.m-item--variant-shortcut{--m-item-pad-x: 16px;--m-item-pad-y: 8px;--m-item-gap: 16px;--m-item-avatar-size: 40px;--m-item-min-height: 56px;align-items:center}.m-item--variant-shortcut.m-item--bordered:after{right:var(--m-item-pad-x);left:calc(var(--m-item-pad-x) + var(--m-item-avatar-size) + var(--m-item-gap));background:#0000000f}.m-item--variant-shortcut .m-item__start,.m-item--variant-shortcut .m-item__prefix,.m-item--variant-shortcut .m-item__media{min-height:var(--m-item-avatar-size);align-items:center}.m-item--variant-shortcut .m-item__body{align-self:center;gap:0}.m-item--variant-shortcut .m-item__row--primary{min-height:var(--m-item-avatar-size);align-items:center;column-gap:12px}.m-item--variant-shortcut .m-item__row--secondary,.m-item--variant-shortcut .m-item__footer{display:none}.m-item--variant-shortcut .m-item__title{color:#111827;font-size:16px;font-weight:700;line-height:24px}.m-item--layout-one-line .m-item__row--secondary,.m-item--layout-one-line .m-item__footer,.m-item--layout-three-line .m-item__footer:empty{display:none}.m-item__start{flex:0 0 auto;display:flex;align-items:flex-start;gap:var(--m-item-gap);min-height:var(--m-item-avatar-size)}.m-item__start:has(.m-item__prefix:empty):has(.m-item__media:empty){display:none}.m-item__prefix{flex:0 0 var(--m-item-prefix-size);width:var(--m-item-prefix-size);min-height:var(--m-item-avatar-size);display:flex;align-items:flex-start;justify-content:center}.m-item__prefix:empty{display:none}.m-item__media{flex:0 0 var(--m-item-avatar-size);width:var(--m-item-avatar-size);min-height:var(--m-item-avatar-size);display:flex;align-items:flex-start;justify-content:center}.m-item__media:empty{display:none}.m-item__default-avatar{width:100%}.m-item__body{flex:1 1 auto;min-width:0;display:grid;gap:3px}.m-item__row{min-width:0;display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:flex-start;column-gap:12px}.m-item__row--secondary{min-height:20px;align-items:center}.m-item__row--secondary:has(.m-item__description:empty):has(.m-item__actions:empty){display:none}.m-item__title-wrap{min-width:0}.m-item__title{display:block;min-width:0;overflow:hidden;color:var(--color-text-primary);font-size:16px;font-weight:600;line-height:22px;text-overflow:ellipsis;white-space:nowrap}.m-item__subtitle{margin-top:2px;color:#6b7280;font-size:12px;line-height:18px}.m-item__meta{max-width:78px;min-width:0;padding-top:0;overflow:hidden;color:#6b7280;font-size:13px;line-height:18px;text-align:right;text-overflow:ellipsis;white-space:nowrap}.m-item__meta:empty{display:none}.m-item__description{min-width:0;max-width:100%;overflow:hidden;color:#6b7280;font-size:14px;line-height:20px;text-overflow:ellipsis;white-space:nowrap}.m-item__description:empty{display:none}:host ::ng-deep .m-item__description>*{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.m-item__actions{max-width:112px;min-width:0;display:inline-flex;align-items:center;justify-content:flex-end;gap:8px;overflow:hidden;color:#00000073;font-size:12px;line-height:18px;white-space:nowrap}.m-item__actions:empty{display:none}.m-item__status-badge{min-width:18px;max-width:52px;height:18px;padding:0 5px;overflow:hidden;box-sizing:border-box;border-radius:9px;background:#3b82f61f;color:#2563eb;font-size:11px;font-weight:600;line-height:18px;text-overflow:ellipsis;white-space:nowrap}.m-item__status-dot{width:6px;height:6px;border-radius:999px;background:#cbd5e1}.m-item--status-unread .m-item__status-dot{background:#f43f5e}.m-item--status-processing .m-item__status-badge{background:#10b9811f;color:#047857}.m-item--status-warning .m-item__status-badge{background:#f59e0b24;color:#b45309}.m-item__footer{min-width:0;overflow:hidden;color:#00000073;font-size:12px;line-height:18px;text-overflow:ellipsis;white-space:nowrap}.m-item__footer:empty{display:none}:host ::ng-deep .m-item__default-avatar .avatar{--avatar-size: var(--m-item-avatar-size) !important}:host ::ng-deep .m-item__default-avatar .avatar__content{background:var(--m-item-tone)}:host ::ng-deep :where([m-item-start],[mItemStart],[m-item-avatar],[mItemAvatar]){display:inline-flex;width:var(--m-item-avatar-size);height:var(--m-item-avatar-size);flex:0 0 var(--m-item-avatar-size);align-items:center;justify-content:center;overflow:visible}\n"], dependencies: [{ kind: "component", type: Avatar, selector: "s-avatar", inputs: ["src", "alt", "text", "shape", "status", "size", "indicator", "indicatorType"], outputs: ["imageError"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
6139
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: MItem, isStandalone: true, selector: "m-item", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, layout: { classPropertyName: "layout", publicName: "layout", isSignal: true, isRequired: false, transformFunction: null }, status: { classPropertyName: "status", publicName: "status", isSignal: true, isRequired: false, transformFunction: null }, statusLabel: { classPropertyName: "statusLabel", publicName: "statusLabel", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, time: { classPropertyName: "time", publicName: "time", isSignal: true, isRequired: false, transformFunction: null }, content: { classPropertyName: "content", publicName: "content", isSignal: true, isRequired: false, transformFunction: null }, extra: { classPropertyName: "extra", publicName: "extra", isSignal: true, isRequired: false, transformFunction: null }, subtitle: { classPropertyName: "subtitle", publicName: "subtitle", isSignal: true, isRequired: false, transformFunction: null }, avatarSrc: { classPropertyName: "avatarSrc", publicName: "avatarSrc", isSignal: true, isRequired: false, transformFunction: null }, avatarText: { classPropertyName: "avatarText", publicName: "avatarText", isSignal: true, isRequired: false, transformFunction: null }, avatarAlt: { classPropertyName: "avatarAlt", publicName: "avatarAlt", isSignal: true, isRequired: false, transformFunction: null }, avatarSize: { classPropertyName: "avatarSize", publicName: "avatarSize", isSignal: true, isRequired: false, transformFunction: null }, avatarShape: { classPropertyName: "avatarShape", publicName: "avatarShape", isSignal: true, isRequired: false, transformFunction: null }, avatarIndicator: { classPropertyName: "avatarIndicator", publicName: "avatarIndicator", isSignal: true, isRequired: false, transformFunction: null }, avatarIndicatorType: { classPropertyName: "avatarIndicatorType", publicName: "avatarIndicatorType", isSignal: true, isRequired: false, transformFunction: null }, clickable: { classPropertyName: "clickable", publicName: "clickable", isSignal: true, isRequired: false, transformFunction: null }, bordered: { classPropertyName: "bordered", publicName: "bordered", isSignal: true, isRequired: false, transformFunction: null }, compact: { classPropertyName: "compact", publicName: "compact", isSignal: true, isRequired: false, transformFunction: null }, showFooter: { classPropertyName: "showFooter", publicName: "showFooter", isSignal: true, isRequired: false, transformFunction: null }, selectable: { classPropertyName: "selectable", publicName: "selectable", isSignal: true, isRequired: false, transformFunction: null }, selected: { classPropertyName: "selected", publicName: "selected", isSignal: true, isRequired: false, transformFunction: null }, active: { classPropertyName: "active", publicName: "active", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { itemClick: "itemClick", itemContextMenu: "itemContextMenu" }, host: { listeners: { "click": "onActivate($event)", "contextmenu": "onContextMenu($event)", "keydown.enter": "onActivate($event)", "keydown.space": "onActivate($event)" }, properties: { "attr.tabindex": "clickable() ? 0 : null", "attr.role": "\"listitem\"" } }, queries: [{ propertyName: "prefixSlot", first: true, predicate: MItemPrefixSlot, descendants: true }, { propertyName: "avatarSlot", first: true, predicate: MItemAvatarSlot, descendants: true }, { propertyName: "titleSlot", first: true, predicate: MItemTitleSlot, descendants: true }, { propertyName: "summarySlot", first: true, predicate: MItemSummarySlot, descendants: true }, { propertyName: "metaSlot", first: true, predicate: MItemMetaSlot, descendants: true }, { propertyName: "footerSlot", first: true, predicate: MItemFooterSlot, descendants: true }, { propertyName: "trailingSlot", first: true, predicate: MItemTrailingSlot, descendants: true }, { propertyName: "statusSlot", first: true, predicate: MItemStatusSlot, descendants: true }, { propertyName: "actionsSlot", first: true, predicate: MItemActionsSlot, descendants: true }], ngImport: i0, template: "<article\n class=\"m-item\"\n [class.m-item--compact]=\"compact()\"\n [class.m-item--clickable]=\"clickable() && !disabled()\"\n [class.m-item--bordered]=\"bordered()\"\n [class.m-item--selectable]=\"selectable()\"\n [class.m-item--selected]=\"selected()\"\n [class.m-item--active]=\"active()\"\n [class.m-item--disabled]=\"disabled()\"\n [class.m-item--layout-one-line]=\"layout() === 'one-line'\"\n [class.m-item--layout-three-line]=\"layout() === 'three-line'\"\n [class.m-item--variant-workflow]=\"variant() === 'workflow'\"\n [class.m-item--variant-mail]=\"variant() === 'mail'\"\n [class.m-item--variant-activity]=\"variant() === 'activity'\"\n [class.m-item--variant-menu]=\"variant() === 'menu'\"\n [class.m-item--variant-request]=\"variant() === 'request'\"\n [class.m-item--variant-shortcut]=\"variant() === 'shortcut'\"\n [class.m-item--status-unread]=\"status() === 'unread'\"\n [class.m-item--status-todo]=\"status() === 'todo'\"\n [class.m-item--status-processing]=\"status() === 'processing'\"\n [class.m-item--status-warning]=\"status() === 'warning'\"\n [style.--m-item-avatar-size]=\"avatarSize() === null ? null : avatarSize() + 'px'\"\n>\n <div class=\"m-item__start\">\n <div class=\"m-item__prefix\">\n @if (prefixSlot) {\n <ng-container [ngTemplateOutlet]=\"prefixSlot.template\" />\n } @else {\n <ng-content select=\"[m-item-prefix]\" />\n <ng-content select=\"[mItemPrefix]\" />\n }\n </div>\n\n <div class=\"m-item__media\">\n @if (avatarSlot) {\n <ng-container [ngTemplateOutlet]=\"avatarSlot.template\" />\n } @else if (avatarSrc() || avatarText()) {\n <s-avatar\n class=\"m-item__default-avatar\"\n [shape]=\"avatarShape()\"\n [size]=\"avatarSize() ?? 48\"\n [src]=\"avatarSrc()\"\n [alt]=\"avatarAlt() || title()\"\n [text]=\"avatarText() || title()\"\n [indicator]=\"avatarIndicator()\"\n [indicatorType]=\"avatarIndicatorType()\"\n />\n } @else {\n <ng-content select=\"[m-item-start]\" />\n <ng-content select=\"[mItemStart]\" />\n <ng-content select=\"[m-item-avatar]\" />\n <ng-content select=\"[mItemAvatar]\" />\n }\n </div>\n </div>\n\n <div class=\"m-item__body\">\n <div class=\"m-item__row m-item__row--primary\">\n <div class=\"m-item__title-wrap\">\n <div class=\"m-item__title\">\n @if (titleSlot) {\n <ng-container [ngTemplateOutlet]=\"titleSlot.template\" />\n } @else if (title()) {\n {{ title() }}\n } @else {\n <ng-content select=\"[m-item-title]\" />\n <ng-content select=\"[mItemTitle]\" />\n <ng-content select=\"[m-item-title-text]\" />\n <ng-content select=\"[mItemTitleText]\" />\n }\n </div>\n\n @if (subtitle()) {\n <div class=\"m-item__subtitle\">{{ subtitle() }}</div>\n }\n </div>\n\n <div class=\"m-item__meta\">\n @if (trailingSlot) {\n <ng-container [ngTemplateOutlet]=\"trailingSlot.template\" />\n } @else if (time()) {\n {{ time() }}\n } @else {\n <ng-content select=\"[m-item-meta]\" />\n <ng-content select=\"[mItemMeta]\" />\n <ng-content select=\"[m-item-time]\" />\n <ng-content select=\"[mItemTime]\" />\n }\n </div>\n </div>\n\n <div class=\"m-item__row m-item__row--secondary\">\n <div class=\"m-item__description\">\n @if (summarySlot) {\n <ng-container [ngTemplateOutlet]=\"summarySlot.template\" />\n } @else if (content()) {\n {{ content() }}\n } @else {\n <ng-content select=\"[m-item-description]\" />\n <ng-content select=\"[mItemDescription]\" />\n <ng-content select=\"[m-item-content]\" />\n <ng-content select=\"[mItemContent]\" />\n <ng-content select=\"[m-item-content-text]\" />\n <ng-content select=\"[mItemContentText]\" />\n }\n </div>\n\n <div class=\"m-item__actions\">\n @if (statusSlot) {\n <ng-container [ngTemplateOutlet]=\"statusSlot.template\" />\n } @else if (status() === 'todo' || status() === 'processing' || status() === 'warning') {\n <span class=\"m-item__status-badge\">{{ statusLabel() || status() }}</span>\n } @else if (status() === 'unread' || status() === 'read') {\n <span class=\"m-item__status-dot\" [attr.aria-label]=\"statusLabel() || status()\"></span>\n }\n\n @if (actionsSlot) {\n <ng-container [ngTemplateOutlet]=\"actionsSlot.template\" />\n } @else if (extra()) {\n {{ extra() }}\n } @else {\n <ng-content select=\"[m-item-actions]\" />\n <ng-content select=\"[mItemActions]\" />\n <ng-content select=\"[m-item-end]\" />\n <ng-content select=\"[mItemEnd]\" />\n <ng-content select=\"[m-item-extra]\" />\n <ng-content select=\"[mItemExtra]\" />\n <ng-content select=\"[m-item-extra-text]\" />\n <ng-content select=\"[mItemExtraText]\" />\n <ng-content select=\"[m-item-append]\" />\n <ng-content select=\"[mItemAppend]\" />\n }\n </div>\n </div>\n\n @if (showFooter()) {\n <div class=\"m-item__footer\">\n @if (footerSlot) {\n <ng-container [ngTemplateOutlet]=\"footerSlot.template\" />\n } @else if (metaSlot) {\n <ng-container [ngTemplateOutlet]=\"metaSlot.template\" />\n } @else {\n <ng-content select=\"[m-item-footer]\" />\n <ng-content select=\"[mItemFooter]\" />\n }\n </div>\n }\n </div>\n</article>\n", styles: [":host{display:block}:host(:focus-visible){outline:none}:host(:focus-visible) .m-item--clickable{background:var(--m-item-focus-bg, var(--color-surface-soft));box-shadow:var(--m-item-focus-shadow, inset 0 0 0 2px var(--color-primary))}:host(:last-child) .m-item--bordered:after{display:none}.m-item{--m-item-pad-x: var(--m-list-item-pad-x, 16px);--m-item-pad-y: var(--m-list-item-pad-y, 12px);--m-item-gap: var(--m-list-item-gap, 12px);--m-item-prefix-size: var(--m-list-item-prefix-size, 18px);--m-item-avatar-size: var(--m-list-item-avatar-size, 48px);--m-item-min-height: var(--m-list-item-min-height, 72px);--m-item-tone: linear-gradient(135deg, #0f8df2, #16b8a2);position:relative;display:flex;align-items:flex-start;gap:var(--m-item-gap);width:100%;min-width:0;max-width:100%;min-height:var(--m-item-min-height);box-sizing:border-box;padding:var(--m-item-pad-y) var(--m-item-pad-x);background:var(--color-surface)}.m-item--clickable{cursor:pointer}.m-item--clickable:hover{background:var(--color-surface-soft)}.m-item--clickable:active{background:var(--color-fg-press)}.m-item--active{background:var(--m-item-active-bg, var(--color-surface-soft));box-shadow:var(--m-item-active-shadow, none)}:host(:focus-visible) .m-item--clickable.m-item--active{background:var(--m-item-active-focus-bg, var(--m-item-active-bg, var(--color-surface-soft)));box-shadow:var(--m-item-active-focus-shadow, var(--m-item-active-shadow, inset 0 0 0 2px var(--color-primary)))}.m-item--selected{box-shadow:inset 0 0 0 1px #2563eb2e}.m-item--disabled{cursor:not-allowed;opacity:.48}.m-item--variant-mail{--m-item-tone: linear-gradient(135deg, #7c3aed, #a855f7)}.m-item--variant-activity{--m-item-tone: linear-gradient(135deg, #f97316, #f59e0b)}.m-item--bordered:after{content:\"\";position:absolute;right:0;bottom:0;left:var(--m-item-pad-x);height:1px;background:#0000000a}.m-item--bordered:has(.m-item__media:not(:empty)):after{left:calc(var(--m-item-pad-x) + var(--m-item-avatar-size) + var(--m-item-gap))}.m-item--compact{--m-item-pad-x: 12px;--m-item-pad-y: 10px;--m-item-gap: 10px;--m-item-prefix-size: 18px;--m-item-avatar-size: 38px;--m-item-min-height: 68px}.m-item--variant-menu{--m-item-pad-x: var(--m-list-item-pad-x, 20px);--m-item-pad-y: 0;--m-item-gap: 14px;--m-item-avatar-size: 28px;--m-item-min-height: var(--m-list-item-min-height, 58px);align-items:center}.m-item--variant-menu.m-item--bordered:after{right:var(--m-item-pad-x);left:var(--m-item-pad-x);background:#eef1f5}.m-item--variant-menu .m-item__start,.m-item--variant-menu .m-item__prefix,.m-item--variant-menu .m-item__media{min-height:var(--m-item-min-height);align-items:center}.m-item--variant-menu .m-item__body{align-self:stretch;gap:0}.m-item--variant-menu .m-item__row--primary{min-height:var(--m-item-min-height);align-items:center;column-gap:14px}.m-item--variant-menu .m-item__row--secondary,.m-item--variant-menu .m-item__footer{display:none}.m-item--variant-menu .m-item__title{color:#151515;font-size:16px;font-weight:680;line-height:24px}.m-item--variant-menu .m-item__meta{max-width:44px;display:inline-flex;align-items:center;justify-content:flex-end;color:#98a1af;font-size:16px;line-height:24px}.m-item--variant-request{--m-item-pad-x: 16px;--m-item-pad-y: 20px;--m-item-gap: 12px;--m-item-avatar-size: 48px;--m-item-min-height: 120px}.m-item--variant-request.m-item--bordered:after,.m-item--variant-request.m-item--bordered:has(.m-item__media:not(:empty)):after{right:16px;left:88px;background:#f0f1f3;transform:none}.m-item--variant-request .m-item__body{gap:6px;padding-top:0}.m-item--variant-request .m-item__row{column-gap:12px}.m-item--variant-request .m-item__row--secondary{align-items:flex-start}.m-item--variant-request .m-item__title{color:#111;font-size:17px;font-weight:600;line-height:24px}.m-item--variant-request .m-item__meta{max-width:64px;padding-top:0;color:#8a94a6;font-size:14px;line-height:20px}.m-item--variant-request .m-item__description{color:#8a94a6;font-size:15px;line-height:22px}.m-item--variant-request .m-item__actions{max-width:180px;gap:10px;overflow:visible}.m-item--variant-shortcut{--m-item-pad-x: 16px;--m-item-pad-y: 8px;--m-item-gap: 16px;--m-item-avatar-size: 40px;--m-item-min-height: 56px;align-items:center}.m-item--variant-shortcut.m-item--bordered:after{right:var(--m-item-pad-x);left:calc(var(--m-item-pad-x) + var(--m-item-avatar-size) + var(--m-item-gap));background:#0000000f}.m-item--variant-shortcut .m-item__start,.m-item--variant-shortcut .m-item__prefix,.m-item--variant-shortcut .m-item__media{min-height:var(--m-item-avatar-size);align-items:center}.m-item--variant-shortcut .m-item__body{align-self:center;gap:0}.m-item--variant-shortcut .m-item__row--primary{min-height:var(--m-item-avatar-size);align-items:center;column-gap:12px}.m-item--variant-shortcut .m-item__row--secondary,.m-item--variant-shortcut .m-item__footer{display:none}.m-item--variant-shortcut .m-item__title{color:#111827;font-size:16px;font-weight:700;line-height:24px}.m-item--layout-one-line .m-item__row--secondary,.m-item--layout-one-line .m-item__footer,.m-item--layout-three-line .m-item__footer:empty{display:none}.m-item__start{flex:0 0 auto;display:flex;align-items:flex-start;gap:var(--m-item-gap);min-height:var(--m-item-avatar-size)}.m-item__start:has(.m-item__prefix:empty):has(.m-item__media:empty){display:none}.m-item__prefix{flex:0 0 var(--m-item-prefix-size);width:var(--m-item-prefix-size);min-height:var(--m-item-avatar-size);display:flex;align-items:flex-start;justify-content:center}.m-item__prefix:empty{display:none}.m-item__media{flex:0 0 var(--m-item-avatar-size);width:var(--m-item-avatar-size);min-height:var(--m-item-avatar-size);display:flex;align-items:flex-start;justify-content:center}.m-item__media:empty{display:none}.m-item__default-avatar{width:100%}.m-item__body{flex:1 1 auto;min-width:0;display:grid;gap:3px}.m-item__row{min-width:0;display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:flex-start;column-gap:12px}.m-item__row--secondary{min-height:20px;align-items:center}.m-item__row--secondary:has(.m-item__description:empty):has(.m-item__actions:empty){display:none}.m-item__title-wrap{min-width:0}.m-item__title{display:block;min-width:0;overflow:hidden;color:var(--color-text-primary);font-size:16px;font-weight:600;line-height:22px;text-overflow:ellipsis;white-space:nowrap}.m-item__subtitle{margin-top:2px;color:#6b7280;font-size:12px;line-height:18px}.m-item__meta{max-width:78px;min-width:0;padding-top:0;overflow:hidden;color:#6b7280;font-size:13px;line-height:18px;text-align:right;text-overflow:ellipsis;white-space:nowrap}.m-item__meta:empty{display:none}.m-item__description{min-width:0;max-width:100%;overflow:hidden;color:#6b7280;font-size:14px;line-height:20px;text-overflow:ellipsis;white-space:nowrap}.m-item__description:empty{display:none}:host ::ng-deep .m-item__description>*{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.m-item__actions{max-width:112px;min-width:0;display:inline-flex;align-items:center;justify-content:flex-end;gap:8px;overflow:hidden;color:#00000073;font-size:12px;line-height:18px;white-space:nowrap}.m-item__actions:empty{display:none}.m-item__status-badge{min-width:18px;max-width:52px;height:18px;padding:0 5px;overflow:hidden;box-sizing:border-box;border-radius:9px;background:#3b82f61f;color:#2563eb;font-size:11px;font-weight:600;line-height:18px;text-overflow:ellipsis;white-space:nowrap}.m-item__status-dot{width:6px;height:6px;border-radius:999px;background:#cbd5e1}.m-item--status-unread .m-item__status-dot{background:#f43f5e}.m-item--status-processing .m-item__status-badge{background:#10b9811f;color:#047857}.m-item--status-warning .m-item__status-badge{background:#f59e0b24;color:#b45309}.m-item__footer{min-width:0;overflow:hidden;color:#00000073;font-size:12px;line-height:18px;text-overflow:ellipsis;white-space:nowrap}.m-item__footer:empty{display:none}:host ::ng-deep .m-item__default-avatar .avatar{--avatar-size: var(--m-item-avatar-size) !important}:host ::ng-deep .m-item__default-avatar .avatar__content{background:var(--m-item-tone)}:host ::ng-deep :where([m-item-start],[mItemStart],[m-item-avatar],[mItemAvatar]){display:inline-flex;width:var(--m-item-avatar-size);height:var(--m-item-avatar-size);flex:0 0 var(--m-item-avatar-size);align-items:center;justify-content:center;overflow:visible}\n"], dependencies: [{ kind: "component", type: Avatar, selector: "s-avatar", inputs: ["src", "alt", "text", "shape", "status", "size", "indicator", "indicatorType"], outputs: ["imageError"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
5275
6140
|
}
|
|
5276
6141
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: MItem, decorators: [{
|
|
5277
6142
|
type: Component,
|
|
5278
6143
|
args: [{ selector: 'm-item', imports: [Avatar, NgTemplateOutlet, M_ITEM_SLOT_DIRECTIVES], changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
5279
6144
|
'(click)': 'onActivate($event)',
|
|
6145
|
+
'(contextmenu)': 'onContextMenu($event)',
|
|
5280
6146
|
'(keydown.enter)': 'onActivate($event)',
|
|
5281
6147
|
'(keydown.space)': 'onActivate($event)',
|
|
5282
6148
|
'[attr.tabindex]': 'clickable() ? 0 : null',
|
|
5283
6149
|
'[attr.role]': '"listitem"',
|
|
5284
|
-
}, template: "<article\n class=\"m-item\"\n [class.m-item--compact]=\"compact()\"\n [class.m-item--clickable]=\"clickable() && !disabled()\"\n [class.m-item--bordered]=\"bordered()\"\n [class.m-item--selectable]=\"selectable()\"\n [class.m-item--selected]=\"selected()\"\n [class.m-item--active]=\"active()\"\n [class.m-item--disabled]=\"disabled()\"\n [class.m-item--layout-one-line]=\"layout() === 'one-line'\"\n [class.m-item--layout-three-line]=\"layout() === 'three-line'\"\n [class.m-item--variant-workflow]=\"variant() === 'workflow'\"\n [class.m-item--variant-mail]=\"variant() === 'mail'\"\n [class.m-item--variant-activity]=\"variant() === 'activity'\"\n [class.m-item--variant-menu]=\"variant() === 'menu'\"\n [class.m-item--variant-request]=\"variant() === 'request'\"\n [class.m-item--variant-shortcut]=\"variant() === 'shortcut'\"\n [class.m-item--status-unread]=\"status() === 'unread'\"\n [class.m-item--status-todo]=\"status() === 'todo'\"\n [class.m-item--status-processing]=\"status() === 'processing'\"\n [class.m-item--status-warning]=\"status() === 'warning'\"\n [style.--m-item-avatar-size]=\"avatarSize() === null ? null : avatarSize() + 'px'\"\n>\n <div class=\"m-item__start\">\n <div class=\"m-item__prefix\">\n @if (prefixSlot) {\n <ng-container [ngTemplateOutlet]=\"prefixSlot.template\" />\n } @else {\n <ng-content select=\"[m-item-prefix]\" />\n <ng-content select=\"[mItemPrefix]\" />\n }\n </div>\n\n <div class=\"m-item__media\">\n @if (avatarSlot) {\n <ng-container [ngTemplateOutlet]=\"avatarSlot.template\" />\n } @else if (avatarSrc() || avatarText()) {\n <s-avatar\n class=\"m-item__default-avatar\"\n [shape]=\"avatarShape()\"\n [size]=\"avatarSize() ?? 48\"\n [src]=\"avatarSrc()\"\n [alt]=\"avatarAlt() || title()\"\n [text]=\"avatarText() || title()\"\n [indicator]=\"avatarIndicator()\"\n [indicatorType]=\"avatarIndicatorType()\"\n />\n } @else {\n <ng-content select=\"[m-item-start]\" />\n <ng-content select=\"[mItemStart]\" />\n <ng-content select=\"[m-item-avatar]\" />\n <ng-content select=\"[mItemAvatar]\" />\n }\n </div>\n </div>\n\n <div class=\"m-item__body\">\n <div class=\"m-item__row m-item__row--primary\">\n <div class=\"m-item__title-wrap\">\n <div class=\"m-item__title\">\n @if (titleSlot) {\n <ng-container [ngTemplateOutlet]=\"titleSlot.template\" />\n } @else if (title()) {\n {{ title() }}\n } @else {\n <ng-content select=\"[m-item-title]\" />\n <ng-content select=\"[mItemTitle]\" />\n <ng-content select=\"[m-item-title-text]\" />\n <ng-content select=\"[mItemTitleText]\" />\n }\n </div>\n\n @if (subtitle()) {\n <div class=\"m-item__subtitle\">{{ subtitle() }}</div>\n }\n </div>\n\n <div class=\"m-item__meta\">\n @if (trailingSlot) {\n <ng-container [ngTemplateOutlet]=\"trailingSlot.template\" />\n } @else if (time()) {\n {{ time() }}\n } @else {\n <ng-content select=\"[m-item-meta]\" />\n <ng-content select=\"[mItemMeta]\" />\n <ng-content select=\"[m-item-time]\" />\n <ng-content select=\"[mItemTime]\" />\n }\n </div>\n </div>\n\n <div class=\"m-item__row m-item__row--secondary\">\n <div class=\"m-item__description\">\n @if (summarySlot) {\n <ng-container [ngTemplateOutlet]=\"summarySlot.template\" />\n } @else if (content()) {\n {{ content() }}\n } @else {\n <ng-content select=\"[m-item-description]\" />\n <ng-content select=\"[mItemDescription]\" />\n <ng-content select=\"[m-item-content]\" />\n <ng-content select=\"[mItemContent]\" />\n <ng-content select=\"[m-item-content-text]\" />\n <ng-content select=\"[mItemContentText]\" />\n }\n </div>\n\n <div class=\"m-item__actions\">\n @if (statusSlot) {\n <ng-container [ngTemplateOutlet]=\"statusSlot.template\" />\n } @else if (status() === 'todo' || status() === 'processing' || status() === 'warning') {\n <span class=\"m-item__status-badge\">{{ statusLabel() || status() }}</span>\n } @else if (status() === 'unread' || status() === 'read') {\n <span class=\"m-item__status-dot\" [attr.aria-label]=\"statusLabel() || status()\"></span>\n }\n\n @if (actionsSlot) {\n <ng-container [ngTemplateOutlet]=\"actionsSlot.template\" />\n } @else if (extra()) {\n {{ extra() }}\n } @else {\n <ng-content select=\"[m-item-actions]\" />\n <ng-content select=\"[mItemActions]\" />\n <ng-content select=\"[m-item-end]\" />\n <ng-content select=\"[mItemEnd]\" />\n <ng-content select=\"[m-item-extra]\" />\n <ng-content select=\"[mItemExtra]\" />\n <ng-content select=\"[m-item-extra-text]\" />\n <ng-content select=\"[mItemExtraText]\" />\n <ng-content select=\"[m-item-append]\" />\n <ng-content select=\"[mItemAppend]\" />\n }\n </div>\n </div>\n\n @if (showFooter()) {\n <div class=\"m-item__footer\">\n @if (footerSlot) {\n <ng-container [ngTemplateOutlet]=\"footerSlot.template\" />\n } @else if (metaSlot) {\n <ng-container [ngTemplateOutlet]=\"metaSlot.template\" />\n } @else {\n <ng-content select=\"[m-item-footer]\" />\n <ng-content select=\"[mItemFooter]\" />\n }\n </div>\n }\n </div>\n</article>\n", styles: [":host{display:block}:host(:focus-visible){outline:none}:host(:focus-visible) .m-item--clickable{background:var(--color-surface-soft);box-shadow:inset 0 0 0 2px var(--color-primary)}:host(:last-child) .m-item--bordered:after{display:none}.m-item{--m-item-pad-x: var(--m-list-item-pad-x, 16px);--m-item-pad-y: var(--m-list-item-pad-y, 12px);--m-item-gap: var(--m-list-item-gap, 12px);--m-item-prefix-size: var(--m-list-item-prefix-size, 18px);--m-item-avatar-size: var(--m-list-item-avatar-size, 48px);--m-item-min-height: var(--m-list-item-min-height, 72px);--m-item-tone: linear-gradient(135deg, #0f8df2, #16b8a2);position:relative;display:flex;align-items:flex-start;gap:var(--m-item-gap);width:100%;min-width:0;max-width:100%;min-height:var(--m-item-min-height);box-sizing:border-box;padding:var(--m-item-pad-y) var(--m-item-pad-x);background:var(--color-surface)}.m-item--clickable{cursor:pointer}.m-item--clickable:hover{background:var(--color-surface-soft)}.m-item--clickable:active{background:var(--color-fg-press)}.m-item--active{background:var(--color-surface-soft)}.m-item--selected{box-shadow:inset 0 0 0 1px #2563eb2e}.m-item--disabled{cursor:not-allowed;opacity:.48}.m-item--variant-mail{--m-item-tone: linear-gradient(135deg, #7c3aed, #a855f7)}.m-item--variant-activity{--m-item-tone: linear-gradient(135deg, #f97316, #f59e0b)}.m-item--bordered:after{content:\"\";position:absolute;right:0;bottom:0;left:var(--m-item-pad-x);height:1px;background:#0000000a}.m-item--bordered:has(.m-item__media:not(:empty)):after{left:calc(var(--m-item-pad-x) + var(--m-item-avatar-size) + var(--m-item-gap))}.m-item--compact{--m-item-pad-x: 12px;--m-item-pad-y: 10px;--m-item-gap: 10px;--m-item-prefix-size: 18px;--m-item-avatar-size: 38px;--m-item-min-height: 68px}.m-item--variant-menu{--m-item-pad-x: var(--m-list-item-pad-x, 20px);--m-item-pad-y: 0;--m-item-gap: 14px;--m-item-avatar-size: 28px;--m-item-min-height: var(--m-list-item-min-height, 58px);align-items:center}.m-item--variant-menu.m-item--bordered:after{right:var(--m-item-pad-x);left:var(--m-item-pad-x);background:#eef1f5}.m-item--variant-menu .m-item__start,.m-item--variant-menu .m-item__prefix,.m-item--variant-menu .m-item__media{min-height:var(--m-item-min-height);align-items:center}.m-item--variant-menu .m-item__body{align-self:stretch;gap:0}.m-item--variant-menu .m-item__row--primary{min-height:var(--m-item-min-height);align-items:center;column-gap:14px}.m-item--variant-menu .m-item__row--secondary,.m-item--variant-menu .m-item__footer{display:none}.m-item--variant-menu .m-item__title{color:#151515;font-size:16px;font-weight:680;line-height:24px}.m-item--variant-menu .m-item__meta{max-width:44px;display:inline-flex;align-items:center;justify-content:flex-end;color:#98a1af;font-size:16px;line-height:24px}.m-item--variant-request{--m-item-pad-x: 16px;--m-item-pad-y: 20px;--m-item-gap: 12px;--m-item-avatar-size: 48px;--m-item-min-height: 120px}.m-item--variant-request.m-item--bordered:after,.m-item--variant-request.m-item--bordered:has(.m-item__media:not(:empty)):after{right:16px;left:88px;background:#f0f1f3;transform:none}.m-item--variant-request .m-item__body{gap:6px;padding-top:0}.m-item--variant-request .m-item__row{column-gap:12px}.m-item--variant-request .m-item__row--secondary{align-items:flex-start}.m-item--variant-request .m-item__title{color:#111;font-size:17px;font-weight:600;line-height:24px}.m-item--variant-request .m-item__meta{max-width:64px;padding-top:0;color:#8a94a6;font-size:14px;line-height:20px}.m-item--variant-request .m-item__description{color:#8a94a6;font-size:15px;line-height:22px}.m-item--variant-request .m-item__actions{max-width:180px;gap:10px;overflow:visible}.m-item--variant-shortcut{--m-item-pad-x: 16px;--m-item-pad-y: 8px;--m-item-gap: 16px;--m-item-avatar-size: 40px;--m-item-min-height: 56px;align-items:center}.m-item--variant-shortcut.m-item--bordered:after{right:var(--m-item-pad-x);left:calc(var(--m-item-pad-x) + var(--m-item-avatar-size) + var(--m-item-gap));background:#0000000f}.m-item--variant-shortcut .m-item__start,.m-item--variant-shortcut .m-item__prefix,.m-item--variant-shortcut .m-item__media{min-height:var(--m-item-avatar-size);align-items:center}.m-item--variant-shortcut .m-item__body{align-self:center;gap:0}.m-item--variant-shortcut .m-item__row--primary{min-height:var(--m-item-avatar-size);align-items:center;column-gap:12px}.m-item--variant-shortcut .m-item__row--secondary,.m-item--variant-shortcut .m-item__footer{display:none}.m-item--variant-shortcut .m-item__title{color:#111827;font-size:16px;font-weight:700;line-height:24px}.m-item--layout-one-line .m-item__row--secondary,.m-item--layout-one-line .m-item__footer,.m-item--layout-three-line .m-item__footer:empty{display:none}.m-item__start{flex:0 0 auto;display:flex;align-items:flex-start;gap:var(--m-item-gap);min-height:var(--m-item-avatar-size)}.m-item__start:has(.m-item__prefix:empty):has(.m-item__media:empty){display:none}.m-item__prefix{flex:0 0 var(--m-item-prefix-size);width:var(--m-item-prefix-size);min-height:var(--m-item-avatar-size);display:flex;align-items:flex-start;justify-content:center}.m-item__prefix:empty{display:none}.m-item__media{flex:0 0 var(--m-item-avatar-size);width:var(--m-item-avatar-size);min-height:var(--m-item-avatar-size);display:flex;align-items:flex-start;justify-content:center}.m-item__media:empty{display:none}.m-item__default-avatar{width:100%}.m-item__body{flex:1 1 auto;min-width:0;display:grid;gap:3px}.m-item__row{min-width:0;display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:flex-start;column-gap:12px}.m-item__row--secondary{min-height:20px;align-items:center}.m-item__row--secondary:has(.m-item__description:empty):has(.m-item__actions:empty){display:none}.m-item__title-wrap{min-width:0}.m-item__title{display:block;min-width:0;overflow:hidden;color:var(--color-text-primary);font-size:16px;font-weight:600;line-height:22px;text-overflow:ellipsis;white-space:nowrap}.m-item__subtitle{margin-top:2px;color:#6b7280;font-size:12px;line-height:18px}.m-item__meta{max-width:78px;min-width:0;padding-top:0;overflow:hidden;color:#6b7280;font-size:13px;line-height:18px;text-align:right;text-overflow:ellipsis;white-space:nowrap}.m-item__meta:empty{display:none}.m-item__description{min-width:0;max-width:100%;overflow:hidden;color:#6b7280;font-size:14px;line-height:20px;text-overflow:ellipsis;white-space:nowrap}.m-item__description:empty{display:none}:host ::ng-deep .m-item__description>*{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.m-item__actions{max-width:112px;min-width:0;display:inline-flex;align-items:center;justify-content:flex-end;gap:8px;overflow:hidden;color:#00000073;font-size:12px;line-height:18px;white-space:nowrap}.m-item__actions:empty{display:none}.m-item__status-badge{min-width:18px;max-width:52px;height:18px;padding:0 5px;overflow:hidden;box-sizing:border-box;border-radius:9px;background:#3b82f61f;color:#2563eb;font-size:11px;font-weight:600;line-height:18px;text-overflow:ellipsis;white-space:nowrap}.m-item__status-dot{width:6px;height:6px;border-radius:999px;background:#cbd5e1}.m-item--status-unread .m-item__status-dot{background:#f43f5e}.m-item--status-processing .m-item__status-badge{background:#10b9811f;color:#047857}.m-item--status-warning .m-item__status-badge{background:#f59e0b24;color:#b45309}.m-item__footer{min-width:0;overflow:hidden;color:#00000073;font-size:12px;line-height:18px;text-overflow:ellipsis;white-space:nowrap}.m-item__footer:empty{display:none}:host ::ng-deep .m-item__default-avatar .avatar{--avatar-size: var(--m-item-avatar-size) !important}:host ::ng-deep .m-item__default-avatar .avatar__content{background:var(--m-item-tone)}:host ::ng-deep :where([m-item-start],[mItemStart],[m-item-avatar],[mItemAvatar]){display:inline-flex;width:var(--m-item-avatar-size);height:var(--m-item-avatar-size);flex:0 0 var(--m-item-avatar-size);align-items:center;justify-content:center;overflow:visible}\n"] }]
|
|
5285
|
-
}], propDecorators: { variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], layout: [{ type: i0.Input, args: [{ isSignal: true, alias: "layout", required: false }] }], status: [{ type: i0.Input, args: [{ isSignal: true, alias: "status", required: false }] }], statusLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "statusLabel", required: false }] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], time: [{ type: i0.Input, args: [{ isSignal: true, alias: "time", required: false }] }], content: [{ type: i0.Input, args: [{ isSignal: true, alias: "content", required: false }] }], extra: [{ type: i0.Input, args: [{ isSignal: true, alias: "extra", required: false }] }], subtitle: [{ type: i0.Input, args: [{ isSignal: true, alias: "subtitle", required: false }] }], avatarSrc: [{ type: i0.Input, args: [{ isSignal: true, alias: "avatarSrc", required: false }] }], avatarText: [{ type: i0.Input, args: [{ isSignal: true, alias: "avatarText", required: false }] }], avatarAlt: [{ type: i0.Input, args: [{ isSignal: true, alias: "avatarAlt", required: false }] }], avatarSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "avatarSize", required: false }] }], avatarShape: [{ type: i0.Input, args: [{ isSignal: true, alias: "avatarShape", required: false }] }], avatarIndicator: [{ type: i0.Input, args: [{ isSignal: true, alias: "avatarIndicator", required: false }] }], avatarIndicatorType: [{ type: i0.Input, args: [{ isSignal: true, alias: "avatarIndicatorType", required: false }] }], clickable: [{ type: i0.Input, args: [{ isSignal: true, alias: "clickable", required: false }] }], bordered: [{ type: i0.Input, args: [{ isSignal: true, alias: "bordered", required: false }] }], compact: [{ type: i0.Input, args: [{ isSignal: true, alias: "compact", required: false }] }], showFooter: [{ type: i0.Input, args: [{ isSignal: true, alias: "showFooter", required: false }] }], selectable: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectable", required: false }] }], selected: [{ type: i0.Input, args: [{ isSignal: true, alias: "selected", required: false }] }], active: [{ type: i0.Input, args: [{ isSignal: true, alias: "active", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], itemClick: [{ type: i0.Output, args: ["itemClick"] }], prefixSlot: [{
|
|
6150
|
+
}, template: "<article\n class=\"m-item\"\n [class.m-item--compact]=\"compact()\"\n [class.m-item--clickable]=\"clickable() && !disabled()\"\n [class.m-item--bordered]=\"bordered()\"\n [class.m-item--selectable]=\"selectable()\"\n [class.m-item--selected]=\"selected()\"\n [class.m-item--active]=\"active()\"\n [class.m-item--disabled]=\"disabled()\"\n [class.m-item--layout-one-line]=\"layout() === 'one-line'\"\n [class.m-item--layout-three-line]=\"layout() === 'three-line'\"\n [class.m-item--variant-workflow]=\"variant() === 'workflow'\"\n [class.m-item--variant-mail]=\"variant() === 'mail'\"\n [class.m-item--variant-activity]=\"variant() === 'activity'\"\n [class.m-item--variant-menu]=\"variant() === 'menu'\"\n [class.m-item--variant-request]=\"variant() === 'request'\"\n [class.m-item--variant-shortcut]=\"variant() === 'shortcut'\"\n [class.m-item--status-unread]=\"status() === 'unread'\"\n [class.m-item--status-todo]=\"status() === 'todo'\"\n [class.m-item--status-processing]=\"status() === 'processing'\"\n [class.m-item--status-warning]=\"status() === 'warning'\"\n [style.--m-item-avatar-size]=\"avatarSize() === null ? null : avatarSize() + 'px'\"\n>\n <div class=\"m-item__start\">\n <div class=\"m-item__prefix\">\n @if (prefixSlot) {\n <ng-container [ngTemplateOutlet]=\"prefixSlot.template\" />\n } @else {\n <ng-content select=\"[m-item-prefix]\" />\n <ng-content select=\"[mItemPrefix]\" />\n }\n </div>\n\n <div class=\"m-item__media\">\n @if (avatarSlot) {\n <ng-container [ngTemplateOutlet]=\"avatarSlot.template\" />\n } @else if (avatarSrc() || avatarText()) {\n <s-avatar\n class=\"m-item__default-avatar\"\n [shape]=\"avatarShape()\"\n [size]=\"avatarSize() ?? 48\"\n [src]=\"avatarSrc()\"\n [alt]=\"avatarAlt() || title()\"\n [text]=\"avatarText() || title()\"\n [indicator]=\"avatarIndicator()\"\n [indicatorType]=\"avatarIndicatorType()\"\n />\n } @else {\n <ng-content select=\"[m-item-start]\" />\n <ng-content select=\"[mItemStart]\" />\n <ng-content select=\"[m-item-avatar]\" />\n <ng-content select=\"[mItemAvatar]\" />\n }\n </div>\n </div>\n\n <div class=\"m-item__body\">\n <div class=\"m-item__row m-item__row--primary\">\n <div class=\"m-item__title-wrap\">\n <div class=\"m-item__title\">\n @if (titleSlot) {\n <ng-container [ngTemplateOutlet]=\"titleSlot.template\" />\n } @else if (title()) {\n {{ title() }}\n } @else {\n <ng-content select=\"[m-item-title]\" />\n <ng-content select=\"[mItemTitle]\" />\n <ng-content select=\"[m-item-title-text]\" />\n <ng-content select=\"[mItemTitleText]\" />\n }\n </div>\n\n @if (subtitle()) {\n <div class=\"m-item__subtitle\">{{ subtitle() }}</div>\n }\n </div>\n\n <div class=\"m-item__meta\">\n @if (trailingSlot) {\n <ng-container [ngTemplateOutlet]=\"trailingSlot.template\" />\n } @else if (time()) {\n {{ time() }}\n } @else {\n <ng-content select=\"[m-item-meta]\" />\n <ng-content select=\"[mItemMeta]\" />\n <ng-content select=\"[m-item-time]\" />\n <ng-content select=\"[mItemTime]\" />\n }\n </div>\n </div>\n\n <div class=\"m-item__row m-item__row--secondary\">\n <div class=\"m-item__description\">\n @if (summarySlot) {\n <ng-container [ngTemplateOutlet]=\"summarySlot.template\" />\n } @else if (content()) {\n {{ content() }}\n } @else {\n <ng-content select=\"[m-item-description]\" />\n <ng-content select=\"[mItemDescription]\" />\n <ng-content select=\"[m-item-content]\" />\n <ng-content select=\"[mItemContent]\" />\n <ng-content select=\"[m-item-content-text]\" />\n <ng-content select=\"[mItemContentText]\" />\n }\n </div>\n\n <div class=\"m-item__actions\">\n @if (statusSlot) {\n <ng-container [ngTemplateOutlet]=\"statusSlot.template\" />\n } @else if (status() === 'todo' || status() === 'processing' || status() === 'warning') {\n <span class=\"m-item__status-badge\">{{ statusLabel() || status() }}</span>\n } @else if (status() === 'unread' || status() === 'read') {\n <span class=\"m-item__status-dot\" [attr.aria-label]=\"statusLabel() || status()\"></span>\n }\n\n @if (actionsSlot) {\n <ng-container [ngTemplateOutlet]=\"actionsSlot.template\" />\n } @else if (extra()) {\n {{ extra() }}\n } @else {\n <ng-content select=\"[m-item-actions]\" />\n <ng-content select=\"[mItemActions]\" />\n <ng-content select=\"[m-item-end]\" />\n <ng-content select=\"[mItemEnd]\" />\n <ng-content select=\"[m-item-extra]\" />\n <ng-content select=\"[mItemExtra]\" />\n <ng-content select=\"[m-item-extra-text]\" />\n <ng-content select=\"[mItemExtraText]\" />\n <ng-content select=\"[m-item-append]\" />\n <ng-content select=\"[mItemAppend]\" />\n }\n </div>\n </div>\n\n @if (showFooter()) {\n <div class=\"m-item__footer\">\n @if (footerSlot) {\n <ng-container [ngTemplateOutlet]=\"footerSlot.template\" />\n } @else if (metaSlot) {\n <ng-container [ngTemplateOutlet]=\"metaSlot.template\" />\n } @else {\n <ng-content select=\"[m-item-footer]\" />\n <ng-content select=\"[mItemFooter]\" />\n }\n </div>\n }\n </div>\n</article>\n", styles: [":host{display:block}:host(:focus-visible){outline:none}:host(:focus-visible) .m-item--clickable{background:var(--m-item-focus-bg, var(--color-surface-soft));box-shadow:var(--m-item-focus-shadow, inset 0 0 0 2px var(--color-primary))}:host(:last-child) .m-item--bordered:after{display:none}.m-item{--m-item-pad-x: var(--m-list-item-pad-x, 16px);--m-item-pad-y: var(--m-list-item-pad-y, 12px);--m-item-gap: var(--m-list-item-gap, 12px);--m-item-prefix-size: var(--m-list-item-prefix-size, 18px);--m-item-avatar-size: var(--m-list-item-avatar-size, 48px);--m-item-min-height: var(--m-list-item-min-height, 72px);--m-item-tone: linear-gradient(135deg, #0f8df2, #16b8a2);position:relative;display:flex;align-items:flex-start;gap:var(--m-item-gap);width:100%;min-width:0;max-width:100%;min-height:var(--m-item-min-height);box-sizing:border-box;padding:var(--m-item-pad-y) var(--m-item-pad-x);background:var(--color-surface)}.m-item--clickable{cursor:pointer}.m-item--clickable:hover{background:var(--color-surface-soft)}.m-item--clickable:active{background:var(--color-fg-press)}.m-item--active{background:var(--m-item-active-bg, var(--color-surface-soft));box-shadow:var(--m-item-active-shadow, none)}:host(:focus-visible) .m-item--clickable.m-item--active{background:var(--m-item-active-focus-bg, var(--m-item-active-bg, var(--color-surface-soft)));box-shadow:var(--m-item-active-focus-shadow, var(--m-item-active-shadow, inset 0 0 0 2px var(--color-primary)))}.m-item--selected{box-shadow:inset 0 0 0 1px #2563eb2e}.m-item--disabled{cursor:not-allowed;opacity:.48}.m-item--variant-mail{--m-item-tone: linear-gradient(135deg, #7c3aed, #a855f7)}.m-item--variant-activity{--m-item-tone: linear-gradient(135deg, #f97316, #f59e0b)}.m-item--bordered:after{content:\"\";position:absolute;right:0;bottom:0;left:var(--m-item-pad-x);height:1px;background:#0000000a}.m-item--bordered:has(.m-item__media:not(:empty)):after{left:calc(var(--m-item-pad-x) + var(--m-item-avatar-size) + var(--m-item-gap))}.m-item--compact{--m-item-pad-x: 12px;--m-item-pad-y: 10px;--m-item-gap: 10px;--m-item-prefix-size: 18px;--m-item-avatar-size: 38px;--m-item-min-height: 68px}.m-item--variant-menu{--m-item-pad-x: var(--m-list-item-pad-x, 20px);--m-item-pad-y: 0;--m-item-gap: 14px;--m-item-avatar-size: 28px;--m-item-min-height: var(--m-list-item-min-height, 58px);align-items:center}.m-item--variant-menu.m-item--bordered:after{right:var(--m-item-pad-x);left:var(--m-item-pad-x);background:#eef1f5}.m-item--variant-menu .m-item__start,.m-item--variant-menu .m-item__prefix,.m-item--variant-menu .m-item__media{min-height:var(--m-item-min-height);align-items:center}.m-item--variant-menu .m-item__body{align-self:stretch;gap:0}.m-item--variant-menu .m-item__row--primary{min-height:var(--m-item-min-height);align-items:center;column-gap:14px}.m-item--variant-menu .m-item__row--secondary,.m-item--variant-menu .m-item__footer{display:none}.m-item--variant-menu .m-item__title{color:#151515;font-size:16px;font-weight:680;line-height:24px}.m-item--variant-menu .m-item__meta{max-width:44px;display:inline-flex;align-items:center;justify-content:flex-end;color:#98a1af;font-size:16px;line-height:24px}.m-item--variant-request{--m-item-pad-x: 16px;--m-item-pad-y: 20px;--m-item-gap: 12px;--m-item-avatar-size: 48px;--m-item-min-height: 120px}.m-item--variant-request.m-item--bordered:after,.m-item--variant-request.m-item--bordered:has(.m-item__media:not(:empty)):after{right:16px;left:88px;background:#f0f1f3;transform:none}.m-item--variant-request .m-item__body{gap:6px;padding-top:0}.m-item--variant-request .m-item__row{column-gap:12px}.m-item--variant-request .m-item__row--secondary{align-items:flex-start}.m-item--variant-request .m-item__title{color:#111;font-size:17px;font-weight:600;line-height:24px}.m-item--variant-request .m-item__meta{max-width:64px;padding-top:0;color:#8a94a6;font-size:14px;line-height:20px}.m-item--variant-request .m-item__description{color:#8a94a6;font-size:15px;line-height:22px}.m-item--variant-request .m-item__actions{max-width:180px;gap:10px;overflow:visible}.m-item--variant-shortcut{--m-item-pad-x: 16px;--m-item-pad-y: 8px;--m-item-gap: 16px;--m-item-avatar-size: 40px;--m-item-min-height: 56px;align-items:center}.m-item--variant-shortcut.m-item--bordered:after{right:var(--m-item-pad-x);left:calc(var(--m-item-pad-x) + var(--m-item-avatar-size) + var(--m-item-gap));background:#0000000f}.m-item--variant-shortcut .m-item__start,.m-item--variant-shortcut .m-item__prefix,.m-item--variant-shortcut .m-item__media{min-height:var(--m-item-avatar-size);align-items:center}.m-item--variant-shortcut .m-item__body{align-self:center;gap:0}.m-item--variant-shortcut .m-item__row--primary{min-height:var(--m-item-avatar-size);align-items:center;column-gap:12px}.m-item--variant-shortcut .m-item__row--secondary,.m-item--variant-shortcut .m-item__footer{display:none}.m-item--variant-shortcut .m-item__title{color:#111827;font-size:16px;font-weight:700;line-height:24px}.m-item--layout-one-line .m-item__row--secondary,.m-item--layout-one-line .m-item__footer,.m-item--layout-three-line .m-item__footer:empty{display:none}.m-item__start{flex:0 0 auto;display:flex;align-items:flex-start;gap:var(--m-item-gap);min-height:var(--m-item-avatar-size)}.m-item__start:has(.m-item__prefix:empty):has(.m-item__media:empty){display:none}.m-item__prefix{flex:0 0 var(--m-item-prefix-size);width:var(--m-item-prefix-size);min-height:var(--m-item-avatar-size);display:flex;align-items:flex-start;justify-content:center}.m-item__prefix:empty{display:none}.m-item__media{flex:0 0 var(--m-item-avatar-size);width:var(--m-item-avatar-size);min-height:var(--m-item-avatar-size);display:flex;align-items:flex-start;justify-content:center}.m-item__media:empty{display:none}.m-item__default-avatar{width:100%}.m-item__body{flex:1 1 auto;min-width:0;display:grid;gap:3px}.m-item__row{min-width:0;display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:flex-start;column-gap:12px}.m-item__row--secondary{min-height:20px;align-items:center}.m-item__row--secondary:has(.m-item__description:empty):has(.m-item__actions:empty){display:none}.m-item__title-wrap{min-width:0}.m-item__title{display:block;min-width:0;overflow:hidden;color:var(--color-text-primary);font-size:16px;font-weight:600;line-height:22px;text-overflow:ellipsis;white-space:nowrap}.m-item__subtitle{margin-top:2px;color:#6b7280;font-size:12px;line-height:18px}.m-item__meta{max-width:78px;min-width:0;padding-top:0;overflow:hidden;color:#6b7280;font-size:13px;line-height:18px;text-align:right;text-overflow:ellipsis;white-space:nowrap}.m-item__meta:empty{display:none}.m-item__description{min-width:0;max-width:100%;overflow:hidden;color:#6b7280;font-size:14px;line-height:20px;text-overflow:ellipsis;white-space:nowrap}.m-item__description:empty{display:none}:host ::ng-deep .m-item__description>*{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.m-item__actions{max-width:112px;min-width:0;display:inline-flex;align-items:center;justify-content:flex-end;gap:8px;overflow:hidden;color:#00000073;font-size:12px;line-height:18px;white-space:nowrap}.m-item__actions:empty{display:none}.m-item__status-badge{min-width:18px;max-width:52px;height:18px;padding:0 5px;overflow:hidden;box-sizing:border-box;border-radius:9px;background:#3b82f61f;color:#2563eb;font-size:11px;font-weight:600;line-height:18px;text-overflow:ellipsis;white-space:nowrap}.m-item__status-dot{width:6px;height:6px;border-radius:999px;background:#cbd5e1}.m-item--status-unread .m-item__status-dot{background:#f43f5e}.m-item--status-processing .m-item__status-badge{background:#10b9811f;color:#047857}.m-item--status-warning .m-item__status-badge{background:#f59e0b24;color:#b45309}.m-item__footer{min-width:0;overflow:hidden;color:#00000073;font-size:12px;line-height:18px;text-overflow:ellipsis;white-space:nowrap}.m-item__footer:empty{display:none}:host ::ng-deep .m-item__default-avatar .avatar{--avatar-size: var(--m-item-avatar-size) !important}:host ::ng-deep .m-item__default-avatar .avatar__content{background:var(--m-item-tone)}:host ::ng-deep :where([m-item-start],[mItemStart],[m-item-avatar],[mItemAvatar]){display:inline-flex;width:var(--m-item-avatar-size);height:var(--m-item-avatar-size);flex:0 0 var(--m-item-avatar-size);align-items:center;justify-content:center;overflow:visible}\n"] }]
|
|
6151
|
+
}], propDecorators: { variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], layout: [{ type: i0.Input, args: [{ isSignal: true, alias: "layout", required: false }] }], status: [{ type: i0.Input, args: [{ isSignal: true, alias: "status", required: false }] }], statusLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "statusLabel", required: false }] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], time: [{ type: i0.Input, args: [{ isSignal: true, alias: "time", required: false }] }], content: [{ type: i0.Input, args: [{ isSignal: true, alias: "content", required: false }] }], extra: [{ type: i0.Input, args: [{ isSignal: true, alias: "extra", required: false }] }], subtitle: [{ type: i0.Input, args: [{ isSignal: true, alias: "subtitle", required: false }] }], avatarSrc: [{ type: i0.Input, args: [{ isSignal: true, alias: "avatarSrc", required: false }] }], avatarText: [{ type: i0.Input, args: [{ isSignal: true, alias: "avatarText", required: false }] }], avatarAlt: [{ type: i0.Input, args: [{ isSignal: true, alias: "avatarAlt", required: false }] }], avatarSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "avatarSize", required: false }] }], avatarShape: [{ type: i0.Input, args: [{ isSignal: true, alias: "avatarShape", required: false }] }], avatarIndicator: [{ type: i0.Input, args: [{ isSignal: true, alias: "avatarIndicator", required: false }] }], avatarIndicatorType: [{ type: i0.Input, args: [{ isSignal: true, alias: "avatarIndicatorType", required: false }] }], clickable: [{ type: i0.Input, args: [{ isSignal: true, alias: "clickable", required: false }] }], bordered: [{ type: i0.Input, args: [{ isSignal: true, alias: "bordered", required: false }] }], compact: [{ type: i0.Input, args: [{ isSignal: true, alias: "compact", required: false }] }], showFooter: [{ type: i0.Input, args: [{ isSignal: true, alias: "showFooter", required: false }] }], selectable: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectable", required: false }] }], selected: [{ type: i0.Input, args: [{ isSignal: true, alias: "selected", required: false }] }], active: [{ type: i0.Input, args: [{ isSignal: true, alias: "active", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], itemClick: [{ type: i0.Output, args: ["itemClick"] }], itemContextMenu: [{ type: i0.Output, args: ["itemContextMenu"] }], prefixSlot: [{
|
|
5286
6152
|
type: ContentChild,
|
|
5287
6153
|
args: [MItemPrefixSlot]
|
|
5288
6154
|
}], avatarSlot: [{
|
|
@@ -5312,9 +6178,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
|
|
|
5312
6178
|
}] } });
|
|
5313
6179
|
|
|
5314
6180
|
let nextMListId = 0;
|
|
6181
|
+
const DEFAULT_SKELETON_ROWS = [0, 1, 2, 3];
|
|
6182
|
+
const FEED_SKELETON_ROWS = [0, 1, 2, 3, 4];
|
|
6183
|
+
const MENU_SKELETON_ROWS = [0, 1, 2, 3, 4];
|
|
6184
|
+
const REQUEST_SKELETON_ROWS = [0, 1, 2];
|
|
5315
6185
|
class MList {
|
|
5316
6186
|
defaultSectionTitleId = `m-list-section-title-${nextMListId++}`;
|
|
5317
6187
|
variant = input('plain', ...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
|
|
6188
|
+
skeletonType = input('auto', ...(ngDevMode ? [{ debugName: "skeletonType" }] : /* istanbul ignore next */ []));
|
|
5318
6189
|
density = input('default', ...(ngDevMode ? [{ debugName: "density" }] : /* istanbul ignore next */ []));
|
|
5319
6190
|
divider = input('inset', ...(ngDevMode ? [{ debugName: "divider" }] : /* istanbul ignore next */ []));
|
|
5320
6191
|
card = input(true, ...(ngDevMode ? [{ debugName: "card" }] : /* istanbul ignore next */ []));
|
|
@@ -5338,15 +6209,34 @@ class MList {
|
|
|
5338
6209
|
isRequest = computed(() => this.variant() === 'request', ...(ngDevMode ? [{ debugName: "isRequest" }] : /* istanbul ignore next */ []));
|
|
5339
6210
|
isProfile = computed(() => this.variant() === 'profile', ...(ngDevMode ? [{ debugName: "isProfile" }] : /* istanbul ignore next */ []));
|
|
5340
6211
|
isShortcut = computed(() => this.variant() === 'shortcut', ...(ngDevMode ? [{ debugName: "isShortcut" }] : /* istanbul ignore next */ []));
|
|
6212
|
+
resolvedSkeletonType = computed(() => {
|
|
6213
|
+
const skeletonType = this.skeletonType();
|
|
6214
|
+
return skeletonType === 'auto' ? this.variant() : skeletonType;
|
|
6215
|
+
}, ...(ngDevMode ? [{ debugName: "resolvedSkeletonType" }] : /* istanbul ignore next */ []));
|
|
6216
|
+
skeletonClass = computed(() => `m-list__skeleton m-list__skeleton--${this.resolvedSkeletonType()}`, ...(ngDevMode ? [{ debugName: "skeletonClass" }] : /* istanbul ignore next */ []));
|
|
6217
|
+
skeletonRows = computed(() => {
|
|
6218
|
+
switch (this.resolvedSkeletonType()) {
|
|
6219
|
+
case 'feed':
|
|
6220
|
+
return FEED_SKELETON_ROWS;
|
|
6221
|
+
case 'menu':
|
|
6222
|
+
case 'profile':
|
|
6223
|
+
case 'shortcut':
|
|
6224
|
+
return MENU_SKELETON_ROWS;
|
|
6225
|
+
case 'request':
|
|
6226
|
+
return REQUEST_SKELETON_ROWS;
|
|
6227
|
+
default:
|
|
6228
|
+
return DEFAULT_SKELETON_ROWS;
|
|
6229
|
+
}
|
|
6230
|
+
}, ...(ngDevMode ? [{ debugName: "skeletonRows" }] : /* istanbul ignore next */ []));
|
|
5341
6231
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: MList, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
5342
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: MList, isStandalone: true, selector: "m-list", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, density: { classPropertyName: "density", publicName: "density", isSignal: true, isRequired: false, transformFunction: null }, divider: { classPropertyName: "divider", publicName: "divider", isSignal: true, isRequired: false, transformFunction: null }, card: { classPropertyName: "card", publicName: "card", isSignal: true, isRequired: false, transformFunction: null }, compact: { classPropertyName: "compact", publicName: "compact", isSignal: true, isRequired: false, transformFunction: null }, isolated: { classPropertyName: "isolated", publicName: "isolated", isSignal: true, isRequired: false, transformFunction: null }, selectable: { classPropertyName: "selectable", publicName: "selectable", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, empty: { classPropertyName: "empty", publicName: "empty", isSignal: true, isRequired: false, transformFunction: null }, emptyText: { classPropertyName: "emptyText", publicName: "emptyText", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, sectionTitle: { classPropertyName: "sectionTitle", publicName: "sectionTitle", isSignal: true, isRequired: false, transformFunction: null }, sectionTitleId: { classPropertyName: "sectionTitleId", publicName: "sectionTitleId", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.m-list-host--profile": "isProfile()" } }, ngImport: i0, template: "@if (sectionTitle()) {\r\n <h2 class=\"m-list__section-title\" [id]=\"resolvedSectionTitleId()\">\r\n {{ sectionTitle() }}\r\n </h2>\r\n}\r\n\r\n<section\r\n class=\"m-list\"\r\n role=\"list\"\r\n [attr.aria-label]=\"resolvedAriaLabel()\"\r\n [attr.aria-labelledby]=\"sectionTitle() ? resolvedSectionTitleId() : null\"\r\n [class.m-list--card]=\"isCard()\"\r\n [class.m-list--compact]=\"isCompact()\"\r\n [class.m-list--comfortable]=\"isComfortable()\"\r\n [class.m-list--isolated]=\"isIsolated()\"\r\n [class.m-list--feed]=\"isFeed()\"\n [class.m-list--menu]=\"isMenu()\"\r\n [class.m-list--request]=\"isRequest()\"\r\n [class.m-list--profile]=\"isProfile()\"\n [class.m-list--shortcut]=\"isShortcut()\"\r\n [class.m-list--divider-none]=\"divider() === 'none'\"\r\n [class.m-list--divider-full]=\"divider() === 'full'\"\r\n [class.m-list--selectable]=\"selectable()\"\r\n [class.m-list--loading]=\"loading()\"\r\n>\r\n @if (loading()) {\r\n <div class=\"m-list__skeleton\" aria-hidden=\"true\">\r\n <span></span>\r\n <span></span>\r\n <span></span>\r\n </div>\r\n } @else if (empty()) {\r\n <div class=\"m-list__empty\">{{ emptyText() }}</div>\r\n } @else {\r\n <ng-content />\r\n }\r\n</section>\r\n", styles: [":host{display:block}.m-list__section-title{margin:0 0 10px;color:#8c94a3;font-size:13px;font-weight:700;line-height:18px}:host(.m-list-host--profile) .m-list__section-title{margin:0 16px 8px;font-weight:650}.m-list{--m-list-item-pad-x: 16px;--m-list-item-pad-y: 12px;--m-list-item-gap: 12px;--m-list-item-prefix-size: 18px;--m-list-item-avatar-size: 48px;--m-list-item-min-height: 72px;width:auto;max-width:100%;box-sizing:border-box;margin:0;padding:0;list-style:none;border:1px solid rgba(0,0,0,.04);border-radius:14px;overflow:hidden;background:var(--color-surface)}.m-list--card{margin:8px;border-color:transparent;box-shadow:0 1px 2px #0000000a,0 8px 24px #00000008}.m-list--compact{--m-list-item-pad-x: 12px;--m-list-item-pad-y: 10px;--m-list-item-gap: 10px;--m-list-item-prefix-size: 18px;--m-list-item-avatar-size: 38px;--m-list-item-min-height: 68px;border-radius:10px}.m-list--comfortable{--m-list-item-pad-x: 16px;--m-list-item-pad-y: 16px;--m-list-item-gap: 14px;--m-list-item-avatar-size: 48px;--m-list-item-min-height: 88px}.m-list--isolated{display:grid;gap:12px;margin:0;border:0;overflow:visible;background:transparent;box-shadow:none}:host ::ng-deep .m-list--isolated .m-item{border-radius:14px;background:#ffffffe0;box-shadow:0 8px 24px #0f172a0d}:host ::ng-deep .m-list--isolated .m-item--bordered:after{display:none}.m-list--menu{--m-list-item-pad-x: 20px;--m-list-item-pad-y: 0;--m-list-item-gap: 14px;--m-list-item-avatar-size: 28px;--m-list-item-min-height: 58px;margin:0;border:1px solid #eef1f5;border-radius:8px;overflow:hidden;background:#fff;box-shadow:0 12px 34px #0f172a0b}.m-list--menu.m-list--compact{--m-list-item-pad-x: 20px;--m-list-item-min-height: 50px;border-radius:8px}.m-list--menu.m-list--comfortable{--m-list-item-pad-x: 20px;--m-list-item-min-height: 58px;border-radius:8px}:host ::ng-deep .m-list--menu .m-item{align-items:center;padding-block:0}:host ::ng-deep .m-list--menu .m-item--bordered:after{right:var(--m-item-pad-x);left:var(--m-item-pad-x);background:#eef1f5}:host ::ng-deep .m-list--menu.m-list--divider-full .m-item--bordered:after{right:0;left:0}:host ::ng-deep .m-list--menu .m-item--bordered:has(.m-item__media:not(:empty)):after{left:calc(var(--m-item-pad-x) + var(--m-item-avatar-size) + var(--m-item-gap))}:host ::ng-deep .m-list--menu.m-list--divider-full .m-item--bordered:has(.m-item__media:not(:empty)):after{left:0}:host ::ng-deep .m-list--menu .m-item__start,:host ::ng-deep .m-list--menu .m-item__prefix,:host ::ng-deep .m-list--menu .m-item__media{min-height:var(--m-item-min-height);align-items:center}:host ::ng-deep .m-list--menu .m-item__body{align-self:stretch;gap:0}:host ::ng-deep .m-list--menu .m-item__row--primary{min-height:var(--m-item-min-height);align-items:center;column-gap:14px}:host ::ng-deep .m-list--menu .m-item__row--secondary,:host ::ng-deep .m-list--menu .m-item__footer{display:none}:host ::ng-deep .m-list--menu .m-item__title{color:#151515;font-size:16px;font-weight:680;letter-spacing:0;line-height:24px}:host ::ng-deep .m-list--menu .m-item__meta{max-width:44px;padding-top:0;display:inline-flex;align-items:center;justify-content:flex-end;color:#98a1af;font-size:16px;line-height:24px}.m-list--profile{--m-list-item-pad-x: 16px;--m-list-item-pad-y: 8px;--m-list-item-gap: 12px;--m-list-item-avatar-size: 40px;--m-list-item-min-height: 56px;margin:0;border:0;border-radius:0;overflow:hidden;background:#fff;box-shadow:none}:host ::ng-deep .m-list--profile .m-item{align-items:center;padding-block:var(--m-item-pad-y)}:host ::ng-deep .m-list--profile .m-item--bordered:after{right:var(--m-item-pad-x);left:calc(var(--m-item-pad-x) + var(--m-item-avatar-size) + var(--m-item-gap));background:#0000000f}:host ::ng-deep .m-list--profile.m-list--divider-full .m-item--bordered:after{right:0;left:0}:host ::ng-deep .m-list--profile .m-item__start,:host ::ng-deep .m-list--profile .m-item__prefix,:host ::ng-deep .m-list--profile .m-item__media{min-height:var(--m-item-avatar-size);align-items:center}:host ::ng-deep .m-list--profile .m-item__body{align-self:center;gap:0}:host ::ng-deep .m-list--profile .m-item__row--primary{min-height:var(--m-item-avatar-size);align-items:center;column-gap:12px}:host ::ng-deep .m-list--profile .m-item__row--secondary,:host ::ng-deep .m-list--profile .m-item__footer{display:none}:host ::ng-deep .m-list--profile .m-item__title{color:#111827;font-size:17px;font-weight:500;line-height:24px}.m-list--shortcut{--m-list-item-pad-x: 16px;--m-list-item-pad-y: 8px;--m-list-item-gap: 16px;--m-list-item-avatar-size: 40px;--m-list-item-min-height: 56px;margin:0;border:0;border-radius:0;overflow:hidden;background:#fff;box-shadow:none}:host ::ng-deep .m-list--shortcut .m-item{align-items:center;padding-block:var(--m-item-pad-y)}:host ::ng-deep .m-list--shortcut .m-item--bordered:after{right:var(--m-item-pad-x);left:calc(var(--m-item-pad-x) + var(--m-item-avatar-size) + var(--m-item-gap));background:#0000000f}:host ::ng-deep .m-list--shortcut.m-list--divider-full .m-item--bordered:after{right:0;left:0}:host ::ng-deep .m-list--shortcut .m-item__start,:host ::ng-deep .m-list--shortcut .m-item__prefix,:host ::ng-deep .m-list--shortcut .m-item__media{min-height:var(--m-item-avatar-size);align-items:center}:host ::ng-deep .m-list--shortcut .m-item__body{align-self:center;gap:0}:host ::ng-deep .m-list--shortcut .m-item__row--primary{min-height:var(--m-item-avatar-size);align-items:center;column-gap:12px}:host ::ng-deep .m-list--shortcut .m-item__row--secondary,:host ::ng-deep .m-list--shortcut .m-item__footer{display:none}:host ::ng-deep .m-list--shortcut .m-item__title{color:#111827;font-size:16px;font-weight:700;line-height:24px}.m-list--request{--m-list-item-pad-x: 16px;--m-list-item-pad-y: 20px;--m-list-item-gap: 12px;--m-list-item-avatar-size: 48px;--m-list-item-min-height: 120px;margin:0;border:0;border-radius:0;overflow:hidden;background:#fff;box-shadow:none}.m-list--request.m-list--compact{--m-list-item-pad-x: 16px;--m-list-item-pad-y: 14px;--m-list-item-avatar-size: 46px;--m-list-item-min-height: 96px}.m-list--request.m-list--comfortable{--m-list-item-pad-x: 20px;--m-list-item-pad-y: 20px;--m-list-item-avatar-size: 56px;--m-list-item-min-height: 124px}:host ::ng-deep .m-list--request .m-item--bordered:after,:host ::ng-deep .m-list--request .m-item--bordered:has(.m-item__media:not(:empty)):after{right:16px;left:88px;background:#f0f1f3;transform:none}:host ::ng-deep .m-list--request.m-list--divider-full .m-item--bordered:after,:host ::ng-deep .m-list--request.m-list--divider-full .m-item--bordered:has(.m-item__media:not(:empty)):after{right:0;left:0}:host ::ng-deep .m-list--request .m-item__body{gap:6px;padding-top:0}:host ::ng-deep .m-list--request .m-item__row{column-gap:12px}:host ::ng-deep .m-list--request .m-item__row--secondary{align-items:flex-start}:host ::ng-deep .m-list--request .m-item__title{color:#111;font-size:17px;font-weight:600;line-height:24px}:host ::ng-deep .m-list--request .m-item__meta{max-width:64px;padding-top:0;color:#8a94a6;font-size:14px;line-height:20px}:host ::ng-deep .m-list--request .m-item__description{color:#8a94a6;font-size:15px;line-height:22px}:host ::ng-deep .m-list--request .m-item__actions{max-width:180px;gap:10px;overflow:visible}.m-list--divider-none{border-color:transparent}:host ::ng-deep .m-list--divider-none .m-item--bordered:after{display:none}:host ::ng-deep .m-list--divider-full .m-item--bordered:after{left:0}.m-list__empty{padding:24px 16px;color:var(--color-text-muted);font-size:14px;text-align:center}.m-list__skeleton{display:grid;gap:10px;padding:10px}.m-list__skeleton span{height:var(--m-list-item-min-height);border-radius:12px;background:linear-gradient(90deg,#f3f6fa,#edf1f6,#f3f6fa)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
6232
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: MList, isStandalone: true, selector: "m-list", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, skeletonType: { classPropertyName: "skeletonType", publicName: "skeletonType", isSignal: true, isRequired: false, transformFunction: null }, density: { classPropertyName: "density", publicName: "density", isSignal: true, isRequired: false, transformFunction: null }, divider: { classPropertyName: "divider", publicName: "divider", isSignal: true, isRequired: false, transformFunction: null }, card: { classPropertyName: "card", publicName: "card", isSignal: true, isRequired: false, transformFunction: null }, compact: { classPropertyName: "compact", publicName: "compact", isSignal: true, isRequired: false, transformFunction: null }, isolated: { classPropertyName: "isolated", publicName: "isolated", isSignal: true, isRequired: false, transformFunction: null }, selectable: { classPropertyName: "selectable", publicName: "selectable", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, empty: { classPropertyName: "empty", publicName: "empty", isSignal: true, isRequired: false, transformFunction: null }, emptyText: { classPropertyName: "emptyText", publicName: "emptyText", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, sectionTitle: { classPropertyName: "sectionTitle", publicName: "sectionTitle", isSignal: true, isRequired: false, transformFunction: null }, sectionTitleId: { classPropertyName: "sectionTitleId", publicName: "sectionTitleId", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.m-list-host--profile": "isProfile()" } }, ngImport: i0, template: "@if (sectionTitle()) {\n <h2 class=\"m-list__section-title\" [id]=\"resolvedSectionTitleId()\">\n {{ sectionTitle() }}\n </h2>\n}\n\n<section\n class=\"m-list\"\n role=\"list\"\n [attr.aria-label]=\"resolvedAriaLabel()\"\n [attr.aria-labelledby]=\"sectionTitle() ? resolvedSectionTitleId() : null\"\n [class.m-list--card]=\"isCard()\"\n [class.m-list--compact]=\"isCompact()\"\n [class.m-list--comfortable]=\"isComfortable()\"\n [class.m-list--isolated]=\"isIsolated()\"\n [class.m-list--feed]=\"isFeed()\"\n [class.m-list--menu]=\"isMenu()\"\n [class.m-list--request]=\"isRequest()\"\n [class.m-list--profile]=\"isProfile()\"\n [class.m-list--shortcut]=\"isShortcut()\"\n [class.m-list--divider-none]=\"divider() === 'none'\"\n [class.m-list--divider-full]=\"divider() === 'full'\"\n [class.m-list--selectable]=\"selectable()\"\n [class.m-list--loading]=\"loading()\"\n>\n @if (loading()) {\n <div [class]=\"skeletonClass()\" aria-hidden=\"true\">\n @for (row of skeletonRows(); track row) {\n <div class=\"m-list__skeleton-row\">\n <span class=\"m-list__skeleton-avatar\"></span>\n <span class=\"m-list__skeleton-content\">\n <span class=\"m-list__skeleton-title\"></span>\n <span class=\"m-list__skeleton-subtitle\"></span>\n </span>\n <span class=\"m-list__skeleton-meta\"></span>\n </div>\n }\n </div>\n } @else if (empty()) {\n <div class=\"m-list__empty\">{{ emptyText() }}</div>\n } @else {\n <ng-content />\n }\n</section>\n", styles: [":host{display:block}.m-list__section-title{margin:0 0 10px;color:#8c94a3;font-size:13px;font-weight:700;line-height:18px}:host(.m-list-host--profile) .m-list__section-title{margin:0 16px 8px;font-weight:650}.m-list{--m-list-item-pad-x: 16px;--m-list-item-pad-y: 12px;--m-list-item-gap: 12px;--m-list-item-prefix-size: 18px;--m-list-item-avatar-size: 48px;--m-list-item-min-height: 72px;width:auto;max-width:100%;box-sizing:border-box;margin:0;padding:0;list-style:none;border:1px solid rgba(0,0,0,.04);border-radius:14px;overflow:hidden;background:var(--color-surface)}.m-list--card{margin:8px;border-color:transparent;box-shadow:0 1px 2px #0000000a,0 8px 24px #00000008}.m-list--compact{--m-list-item-pad-x: 12px;--m-list-item-pad-y: 10px;--m-list-item-gap: 10px;--m-list-item-prefix-size: 18px;--m-list-item-avatar-size: 38px;--m-list-item-min-height: 68px;border-radius:10px}.m-list--comfortable{--m-list-item-pad-x: 16px;--m-list-item-pad-y: 16px;--m-list-item-gap: 14px;--m-list-item-avatar-size: 48px;--m-list-item-min-height: 88px}.m-list--isolated{display:grid;gap:12px;margin:0;border:0;overflow:visible;background:transparent;box-shadow:none}:host ::ng-deep .m-list--isolated .m-item{border-radius:14px;background:#ffffffe0;box-shadow:0 8px 24px #0f172a0d}:host ::ng-deep .m-list--isolated .m-item--bordered:after{display:none}.m-list--menu{--m-list-item-pad-x: 20px;--m-list-item-pad-y: 0;--m-list-item-gap: 14px;--m-list-item-avatar-size: 28px;--m-list-item-min-height: 58px;margin:0;border:1px solid #eef1f5;border-radius:8px;overflow:hidden;background:#fff;box-shadow:0 12px 34px #0f172a0b}.m-list--menu.m-list--compact{--m-list-item-pad-x: 20px;--m-list-item-min-height: 50px;border-radius:8px}.m-list--menu.m-list--comfortable{--m-list-item-pad-x: 20px;--m-list-item-min-height: 58px;border-radius:8px}:host ::ng-deep .m-list--menu .m-item{align-items:center;padding-block:0}:host ::ng-deep .m-list--menu .m-item--bordered:after{right:var(--m-item-pad-x);left:var(--m-item-pad-x);background:#eef1f5}:host ::ng-deep .m-list--menu.m-list--divider-full .m-item--bordered:after{right:0;left:0}:host ::ng-deep .m-list--menu .m-item--bordered:has(.m-item__media:not(:empty)):after{left:calc(var(--m-item-pad-x) + var(--m-item-avatar-size) + var(--m-item-gap))}:host ::ng-deep .m-list--menu.m-list--divider-full .m-item--bordered:has(.m-item__media:not(:empty)):after{left:0}:host ::ng-deep .m-list--menu .m-item__start,:host ::ng-deep .m-list--menu .m-item__prefix,:host ::ng-deep .m-list--menu .m-item__media{min-height:var(--m-item-min-height);align-items:center}:host ::ng-deep .m-list--menu .m-item__body{align-self:stretch;gap:0}:host ::ng-deep .m-list--menu .m-item__row--primary{min-height:var(--m-item-min-height);align-items:center;column-gap:14px}:host ::ng-deep .m-list--menu .m-item__row--secondary,:host ::ng-deep .m-list--menu .m-item__footer{display:none}:host ::ng-deep .m-list--menu .m-item__title{color:#151515;font-size:16px;font-weight:680;letter-spacing:0;line-height:24px}:host ::ng-deep .m-list--menu .m-item__meta{max-width:44px;padding-top:0;display:inline-flex;align-items:center;justify-content:flex-end;color:#98a1af;font-size:16px;line-height:24px}.m-list--profile{--m-list-item-pad-x: 16px;--m-list-item-pad-y: 8px;--m-list-item-gap: 12px;--m-list-item-avatar-size: 40px;--m-list-item-min-height: 56px;margin:0;border:0;border-radius:0;overflow:hidden;background:#fff;box-shadow:none}:host ::ng-deep .m-list--profile .m-item{align-items:center;padding-block:var(--m-item-pad-y)}:host ::ng-deep .m-list--profile .m-item--bordered:after{right:var(--m-item-pad-x);left:calc(var(--m-item-pad-x) + var(--m-item-avatar-size) + var(--m-item-gap));background:#0000000f}:host ::ng-deep .m-list--profile.m-list--divider-full .m-item--bordered:after{right:0;left:0}:host ::ng-deep .m-list--profile .m-item__start,:host ::ng-deep .m-list--profile .m-item__prefix,:host ::ng-deep .m-list--profile .m-item__media{min-height:var(--m-item-avatar-size);align-items:center}:host ::ng-deep .m-list--profile .m-item__body{align-self:center;gap:0}:host ::ng-deep .m-list--profile .m-item__row--primary{min-height:var(--m-item-avatar-size);align-items:center;column-gap:12px}:host ::ng-deep .m-list--profile .m-item__row--secondary,:host ::ng-deep .m-list--profile .m-item__footer{display:none}:host ::ng-deep .m-list--profile .m-item__title{color:#111827;font-size:17px;font-weight:500;line-height:24px}.m-list--shortcut{--m-list-item-pad-x: 16px;--m-list-item-pad-y: 8px;--m-list-item-gap: 16px;--m-list-item-avatar-size: 40px;--m-list-item-min-height: 56px;margin:0;border:0;border-radius:0;overflow:hidden;background:#fff;box-shadow:none}:host ::ng-deep .m-list--shortcut .m-item{align-items:center;padding-block:var(--m-item-pad-y)}:host ::ng-deep .m-list--shortcut .m-item--bordered:after{right:var(--m-item-pad-x);left:calc(var(--m-item-pad-x) + var(--m-item-avatar-size) + var(--m-item-gap));background:#0000000f}:host ::ng-deep .m-list--shortcut.m-list--divider-full .m-item--bordered:after{right:0;left:0}:host ::ng-deep .m-list--shortcut .m-item__start,:host ::ng-deep .m-list--shortcut .m-item__prefix,:host ::ng-deep .m-list--shortcut .m-item__media{min-height:var(--m-item-avatar-size);align-items:center}:host ::ng-deep .m-list--shortcut .m-item__body{align-self:center;gap:0}:host ::ng-deep .m-list--shortcut .m-item__row--primary{min-height:var(--m-item-avatar-size);align-items:center;column-gap:12px}:host ::ng-deep .m-list--shortcut .m-item__row--secondary,:host ::ng-deep .m-list--shortcut .m-item__footer{display:none}:host ::ng-deep .m-list--shortcut .m-item__title{color:#111827;font-size:16px;font-weight:700;line-height:24px}.m-list--request{--m-list-item-pad-x: 16px;--m-list-item-pad-y: 20px;--m-list-item-gap: 12px;--m-list-item-avatar-size: 48px;--m-list-item-min-height: 120px;margin:0;border:0;border-radius:0;overflow:hidden;background:#fff;box-shadow:none}.m-list--request.m-list--compact{--m-list-item-pad-x: 16px;--m-list-item-pad-y: 14px;--m-list-item-avatar-size: 46px;--m-list-item-min-height: 96px}.m-list--request.m-list--comfortable{--m-list-item-pad-x: 20px;--m-list-item-pad-y: 20px;--m-list-item-avatar-size: 56px;--m-list-item-min-height: 124px}:host ::ng-deep .m-list--request .m-item--bordered:after,:host ::ng-deep .m-list--request .m-item--bordered:has(.m-item__media:not(:empty)):after{right:16px;left:88px;background:#f0f1f3;transform:none}:host ::ng-deep .m-list--request.m-list--divider-full .m-item--bordered:after,:host ::ng-deep .m-list--request.m-list--divider-full .m-item--bordered:has(.m-item__media:not(:empty)):after{right:0;left:0}:host ::ng-deep .m-list--request .m-item__body{gap:6px;padding-top:0}:host ::ng-deep .m-list--request .m-item__row{column-gap:12px}:host ::ng-deep .m-list--request .m-item__row--secondary{align-items:flex-start}:host ::ng-deep .m-list--request .m-item__title{color:#111;font-size:17px;font-weight:600;line-height:24px}:host ::ng-deep .m-list--request .m-item__meta{max-width:64px;padding-top:0;color:#8a94a6;font-size:14px;line-height:20px}:host ::ng-deep .m-list--request .m-item__description{color:#8a94a6;font-size:15px;line-height:22px}:host ::ng-deep .m-list--request .m-item__actions{max-width:180px;gap:10px;overflow:visible}.m-list--divider-none{border-color:transparent}:host ::ng-deep .m-list--divider-none .m-item--bordered:after{display:none}:host ::ng-deep .m-list--divider-full .m-item--bordered:after{left:0}.m-list__empty{padding:24px 16px;color:var(--color-text-muted);font-size:14px;text-align:center}.m-list__skeleton{--sk-a: var(--m-list-skeleton-avatar-size, var(--m-list-item-avatar-size));--sk-h: var(--m-list-skeleton-row-min-height, var(--m-list-item-min-height));--sk-r: var(--m-list-skeleton-avatar-radius, 10px);--sk-tw: min(58%, 220px);--sk-sw: min(34%, 140px);--sk-sh: 12px;--sk-gap: 8px;--sk-track: 22px;--sk-mw: 10px;--sk-mh: 10px;--sk-mr: 999px;--sk-sd: block;--sk-md: block;display:grid;gap:0;padding:4px 0}.m-list__skeleton-row{display:grid;grid-template-columns:var(--sk-a) minmax(0,1fr) var(--sk-track);align-items:center;gap:var(--m-list-item-gap);min-height:var(--sk-h);padding:var(--m-list-item-pad-y) var(--m-list-item-pad-x);box-sizing:border-box}.m-list__skeleton-avatar,.m-list__skeleton-title,.m-list__skeleton-subtitle,.m-list__skeleton-meta{display:block;background:linear-gradient(90deg,#f3f6fa,#edf1f6 52%,#f3f6fa);background-size:220% 100%;animation:m-list-skeleton-shimmer 1.2s ease-in-out infinite}.m-list__skeleton-avatar{width:var(--sk-a);height:var(--sk-a);border-radius:var(--sk-r)}.m-list__skeleton-content{display:grid;gap:var(--sk-gap);min-width:0}.m-list__skeleton-title{width:var(--sk-tw);height:16px;border-radius:999px}.m-list__skeleton-subtitle{display:var(--sk-sd);width:var(--sk-sw);height:var(--sk-sh);border-radius:999px}.m-list__skeleton-meta{display:var(--sk-md);width:var(--sk-mw);height:var(--sk-mh);border-radius:var(--sk-mr);opacity:.78}.m-list__skeleton--feed{--sk-a: var(--m-list-skeleton-avatar-size, 48px);--sk-h: var(--m-list-skeleton-row-min-height, 72px);--sk-r: 14px;--sk-tw: min(56%, 210px);--sk-sw: min(78%, 300px);--sk-mw: 28px;--sk-mh: 12px}.m-list__skeleton--menu{--sk-a: var(--m-list-skeleton-avatar-size, 28px);--sk-h: var(--m-list-skeleton-row-min-height, 58px);--sk-r: 8px;--sk-gap: 0;--sk-tw: min(48%, 180px);--sk-sd: none;--sk-mw: 8px;--sk-mh: 18px;--sk-mr: 6px;padding:0}.m-list__skeleton--profile,.m-list__skeleton--shortcut{--sk-a: var(--m-list-skeleton-avatar-size, 40px);--sk-h: var(--m-list-skeleton-row-min-height, 56px);--sk-r: 12px;--sk-gap: 0;--sk-tw: min(42%, 180px);--sk-sd: none;--sk-md: none;--sk-track: 0;padding:0}.m-list__skeleton--request{--sk-a: var(--m-list-skeleton-avatar-size, 48px);--sk-h: var(--m-list-skeleton-row-min-height, 120px);--sk-r: 14px;--sk-gap: 10px;--sk-tw: min(46%, 220px);--sk-sw: min(86%, 420px);--sk-sh: 14px;--sk-mw: 64px;--sk-mh: 24px;padding:0}@keyframes m-list-skeleton-shimmer{0%{background-position:120% 0}to{background-position:-120% 0}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
5343
6233
|
}
|
|
5344
6234
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: MList, decorators: [{
|
|
5345
6235
|
type: Component,
|
|
5346
6236
|
args: [{ selector: 'm-list', imports: [], host: {
|
|
5347
6237
|
'[class.m-list-host--profile]': 'isProfile()',
|
|
5348
|
-
}, changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (sectionTitle()) {\r\n <h2 class=\"m-list__section-title\" [id]=\"resolvedSectionTitleId()\">\r\n {{ sectionTitle() }}\r\n </h2>\r\n}\r\n\r\n<section\r\n class=\"m-list\"\r\n role=\"list\"\r\n [attr.aria-label]=\"resolvedAriaLabel()\"\r\n [attr.aria-labelledby]=\"sectionTitle() ? resolvedSectionTitleId() : null\"\r\n [class.m-list--card]=\"isCard()\"\r\n [class.m-list--compact]=\"isCompact()\"\r\n [class.m-list--comfortable]=\"isComfortable()\"\r\n [class.m-list--isolated]=\"isIsolated()\"\r\n [class.m-list--feed]=\"isFeed()\"\n [class.m-list--menu]=\"isMenu()\"\r\n [class.m-list--request]=\"isRequest()\"\r\n [class.m-list--profile]=\"isProfile()\"\n [class.m-list--shortcut]=\"isShortcut()\"\r\n [class.m-list--divider-none]=\"divider() === 'none'\"\r\n [class.m-list--divider-full]=\"divider() === 'full'\"\r\n [class.m-list--selectable]=\"selectable()\"\r\n [class.m-list--loading]=\"loading()\"\r\n>\r\n @if (loading()) {\r\n <div class=\"m-list__skeleton\" aria-hidden=\"true\">\r\n <span></span>\r\n <span></span>\r\n <span></span>\r\n </div>\r\n } @else if (empty()) {\r\n <div class=\"m-list__empty\">{{ emptyText() }}</div>\r\n } @else {\r\n <ng-content />\r\n }\r\n</section>\r\n", styles: [":host{display:block}.m-list__section-title{margin:0 0 10px;color:#8c94a3;font-size:13px;font-weight:700;line-height:18px}:host(.m-list-host--profile) .m-list__section-title{margin:0 16px 8px;font-weight:650}.m-list{--m-list-item-pad-x: 16px;--m-list-item-pad-y: 12px;--m-list-item-gap: 12px;--m-list-item-prefix-size: 18px;--m-list-item-avatar-size: 48px;--m-list-item-min-height: 72px;width:auto;max-width:100%;box-sizing:border-box;margin:0;padding:0;list-style:none;border:1px solid rgba(0,0,0,.04);border-radius:14px;overflow:hidden;background:var(--color-surface)}.m-list--card{margin:8px;border-color:transparent;box-shadow:0 1px 2px #0000000a,0 8px 24px #00000008}.m-list--compact{--m-list-item-pad-x: 12px;--m-list-item-pad-y: 10px;--m-list-item-gap: 10px;--m-list-item-prefix-size: 18px;--m-list-item-avatar-size: 38px;--m-list-item-min-height: 68px;border-radius:10px}.m-list--comfortable{--m-list-item-pad-x: 16px;--m-list-item-pad-y: 16px;--m-list-item-gap: 14px;--m-list-item-avatar-size: 48px;--m-list-item-min-height: 88px}.m-list--isolated{display:grid;gap:12px;margin:0;border:0;overflow:visible;background:transparent;box-shadow:none}:host ::ng-deep .m-list--isolated .m-item{border-radius:14px;background:#ffffffe0;box-shadow:0 8px 24px #0f172a0d}:host ::ng-deep .m-list--isolated .m-item--bordered:after{display:none}.m-list--menu{--m-list-item-pad-x: 20px;--m-list-item-pad-y: 0;--m-list-item-gap: 14px;--m-list-item-avatar-size: 28px;--m-list-item-min-height: 58px;margin:0;border:1px solid #eef1f5;border-radius:8px;overflow:hidden;background:#fff;box-shadow:0 12px 34px #0f172a0b}.m-list--menu.m-list--compact{--m-list-item-pad-x: 20px;--m-list-item-min-height: 50px;border-radius:8px}.m-list--menu.m-list--comfortable{--m-list-item-pad-x: 20px;--m-list-item-min-height: 58px;border-radius:8px}:host ::ng-deep .m-list--menu .m-item{align-items:center;padding-block:0}:host ::ng-deep .m-list--menu .m-item--bordered:after{right:var(--m-item-pad-x);left:var(--m-item-pad-x);background:#eef1f5}:host ::ng-deep .m-list--menu.m-list--divider-full .m-item--bordered:after{right:0;left:0}:host ::ng-deep .m-list--menu .m-item--bordered:has(.m-item__media:not(:empty)):after{left:calc(var(--m-item-pad-x) + var(--m-item-avatar-size) + var(--m-item-gap))}:host ::ng-deep .m-list--menu.m-list--divider-full .m-item--bordered:has(.m-item__media:not(:empty)):after{left:0}:host ::ng-deep .m-list--menu .m-item__start,:host ::ng-deep .m-list--menu .m-item__prefix,:host ::ng-deep .m-list--menu .m-item__media{min-height:var(--m-item-min-height);align-items:center}:host ::ng-deep .m-list--menu .m-item__body{align-self:stretch;gap:0}:host ::ng-deep .m-list--menu .m-item__row--primary{min-height:var(--m-item-min-height);align-items:center;column-gap:14px}:host ::ng-deep .m-list--menu .m-item__row--secondary,:host ::ng-deep .m-list--menu .m-item__footer{display:none}:host ::ng-deep .m-list--menu .m-item__title{color:#151515;font-size:16px;font-weight:680;letter-spacing:0;line-height:24px}:host ::ng-deep .m-list--menu .m-item__meta{max-width:44px;padding-top:0;display:inline-flex;align-items:center;justify-content:flex-end;color:#98a1af;font-size:16px;line-height:24px}.m-list--profile{--m-list-item-pad-x: 16px;--m-list-item-pad-y: 8px;--m-list-item-gap: 12px;--m-list-item-avatar-size: 40px;--m-list-item-min-height: 56px;margin:0;border:0;border-radius:0;overflow:hidden;background:#fff;box-shadow:none}:host ::ng-deep .m-list--profile .m-item{align-items:center;padding-block:var(--m-item-pad-y)}:host ::ng-deep .m-list--profile .m-item--bordered:after{right:var(--m-item-pad-x);left:calc(var(--m-item-pad-x) + var(--m-item-avatar-size) + var(--m-item-gap));background:#0000000f}:host ::ng-deep .m-list--profile.m-list--divider-full .m-item--bordered:after{right:0;left:0}:host ::ng-deep .m-list--profile .m-item__start,:host ::ng-deep .m-list--profile .m-item__prefix,:host ::ng-deep .m-list--profile .m-item__media{min-height:var(--m-item-avatar-size);align-items:center}:host ::ng-deep .m-list--profile .m-item__body{align-self:center;gap:0}:host ::ng-deep .m-list--profile .m-item__row--primary{min-height:var(--m-item-avatar-size);align-items:center;column-gap:12px}:host ::ng-deep .m-list--profile .m-item__row--secondary,:host ::ng-deep .m-list--profile .m-item__footer{display:none}:host ::ng-deep .m-list--profile .m-item__title{color:#111827;font-size:17px;font-weight:500;line-height:24px}.m-list--shortcut{--m-list-item-pad-x: 16px;--m-list-item-pad-y: 8px;--m-list-item-gap: 16px;--m-list-item-avatar-size: 40px;--m-list-item-min-height: 56px;margin:0;border:0;border-radius:0;overflow:hidden;background:#fff;box-shadow:none}:host ::ng-deep .m-list--shortcut .m-item{align-items:center;padding-block:var(--m-item-pad-y)}:host ::ng-deep .m-list--shortcut .m-item--bordered:after{right:var(--m-item-pad-x);left:calc(var(--m-item-pad-x) + var(--m-item-avatar-size) + var(--m-item-gap));background:#0000000f}:host ::ng-deep .m-list--shortcut.m-list--divider-full .m-item--bordered:after{right:0;left:0}:host ::ng-deep .m-list--shortcut .m-item__start,:host ::ng-deep .m-list--shortcut .m-item__prefix,:host ::ng-deep .m-list--shortcut .m-item__media{min-height:var(--m-item-avatar-size);align-items:center}:host ::ng-deep .m-list--shortcut .m-item__body{align-self:center;gap:0}:host ::ng-deep .m-list--shortcut .m-item__row--primary{min-height:var(--m-item-avatar-size);align-items:center;column-gap:12px}:host ::ng-deep .m-list--shortcut .m-item__row--secondary,:host ::ng-deep .m-list--shortcut .m-item__footer{display:none}:host ::ng-deep .m-list--shortcut .m-item__title{color:#111827;font-size:16px;font-weight:700;line-height:24px}.m-list--request{--m-list-item-pad-x: 16px;--m-list-item-pad-y: 20px;--m-list-item-gap: 12px;--m-list-item-avatar-size: 48px;--m-list-item-min-height: 120px;margin:0;border:0;border-radius:0;overflow:hidden;background:#fff;box-shadow:none}.m-list--request.m-list--compact{--m-list-item-pad-x: 16px;--m-list-item-pad-y: 14px;--m-list-item-avatar-size: 46px;--m-list-item-min-height: 96px}.m-list--request.m-list--comfortable{--m-list-item-pad-x: 20px;--m-list-item-pad-y: 20px;--m-list-item-avatar-size: 56px;--m-list-item-min-height: 124px}:host ::ng-deep .m-list--request .m-item--bordered:after,:host ::ng-deep .m-list--request .m-item--bordered:has(.m-item__media:not(:empty)):after{right:16px;left:88px;background:#f0f1f3;transform:none}:host ::ng-deep .m-list--request.m-list--divider-full .m-item--bordered:after,:host ::ng-deep .m-list--request.m-list--divider-full .m-item--bordered:has(.m-item__media:not(:empty)):after{right:0;left:0}:host ::ng-deep .m-list--request .m-item__body{gap:6px;padding-top:0}:host ::ng-deep .m-list--request .m-item__row{column-gap:12px}:host ::ng-deep .m-list--request .m-item__row--secondary{align-items:flex-start}:host ::ng-deep .m-list--request .m-item__title{color:#111;font-size:17px;font-weight:600;line-height:24px}:host ::ng-deep .m-list--request .m-item__meta{max-width:64px;padding-top:0;color:#8a94a6;font-size:14px;line-height:20px}:host ::ng-deep .m-list--request .m-item__description{color:#8a94a6;font-size:15px;line-height:22px}:host ::ng-deep .m-list--request .m-item__actions{max-width:180px;gap:10px;overflow:visible}.m-list--divider-none{border-color:transparent}:host ::ng-deep .m-list--divider-none .m-item--bordered:after{display:none}:host ::ng-deep .m-list--divider-full .m-item--bordered:after{left:0}.m-list__empty{padding:24px 16px;color:var(--color-text-muted);font-size:14px;text-align:center}.m-list__skeleton{display:grid;gap:10px;padding:10px}.m-list__skeleton span{height:var(--m-list-item-min-height);border-radius:12px;background:linear-gradient(90deg,#f3f6fa,#edf1f6,#f3f6fa)}\n"] }]
|
|
5349
|
-
}], propDecorators: { variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], density: [{ type: i0.Input, args: [{ isSignal: true, alias: "density", required: false }] }], divider: [{ type: i0.Input, args: [{ isSignal: true, alias: "divider", required: false }] }], card: [{ type: i0.Input, args: [{ isSignal: true, alias: "card", required: false }] }], compact: [{ type: i0.Input, args: [{ isSignal: true, alias: "compact", required: false }] }], isolated: [{ type: i0.Input, args: [{ isSignal: true, alias: "isolated", required: false }] }], selectable: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectable", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], empty: [{ type: i0.Input, args: [{ isSignal: true, alias: "empty", required: false }] }], emptyText: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyText", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], sectionTitle: [{ type: i0.Input, args: [{ isSignal: true, alias: "sectionTitle", required: false }] }], sectionTitleId: [{ type: i0.Input, args: [{ isSignal: true, alias: "sectionTitleId", required: false }] }] } });
|
|
6238
|
+
}, changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (sectionTitle()) {\n <h2 class=\"m-list__section-title\" [id]=\"resolvedSectionTitleId()\">\n {{ sectionTitle() }}\n </h2>\n}\n\n<section\n class=\"m-list\"\n role=\"list\"\n [attr.aria-label]=\"resolvedAriaLabel()\"\n [attr.aria-labelledby]=\"sectionTitle() ? resolvedSectionTitleId() : null\"\n [class.m-list--card]=\"isCard()\"\n [class.m-list--compact]=\"isCompact()\"\n [class.m-list--comfortable]=\"isComfortable()\"\n [class.m-list--isolated]=\"isIsolated()\"\n [class.m-list--feed]=\"isFeed()\"\n [class.m-list--menu]=\"isMenu()\"\n [class.m-list--request]=\"isRequest()\"\n [class.m-list--profile]=\"isProfile()\"\n [class.m-list--shortcut]=\"isShortcut()\"\n [class.m-list--divider-none]=\"divider() === 'none'\"\n [class.m-list--divider-full]=\"divider() === 'full'\"\n [class.m-list--selectable]=\"selectable()\"\n [class.m-list--loading]=\"loading()\"\n>\n @if (loading()) {\n <div [class]=\"skeletonClass()\" aria-hidden=\"true\">\n @for (row of skeletonRows(); track row) {\n <div class=\"m-list__skeleton-row\">\n <span class=\"m-list__skeleton-avatar\"></span>\n <span class=\"m-list__skeleton-content\">\n <span class=\"m-list__skeleton-title\"></span>\n <span class=\"m-list__skeleton-subtitle\"></span>\n </span>\n <span class=\"m-list__skeleton-meta\"></span>\n </div>\n }\n </div>\n } @else if (empty()) {\n <div class=\"m-list__empty\">{{ emptyText() }}</div>\n } @else {\n <ng-content />\n }\n</section>\n", styles: [":host{display:block}.m-list__section-title{margin:0 0 10px;color:#8c94a3;font-size:13px;font-weight:700;line-height:18px}:host(.m-list-host--profile) .m-list__section-title{margin:0 16px 8px;font-weight:650}.m-list{--m-list-item-pad-x: 16px;--m-list-item-pad-y: 12px;--m-list-item-gap: 12px;--m-list-item-prefix-size: 18px;--m-list-item-avatar-size: 48px;--m-list-item-min-height: 72px;width:auto;max-width:100%;box-sizing:border-box;margin:0;padding:0;list-style:none;border:1px solid rgba(0,0,0,.04);border-radius:14px;overflow:hidden;background:var(--color-surface)}.m-list--card{margin:8px;border-color:transparent;box-shadow:0 1px 2px #0000000a,0 8px 24px #00000008}.m-list--compact{--m-list-item-pad-x: 12px;--m-list-item-pad-y: 10px;--m-list-item-gap: 10px;--m-list-item-prefix-size: 18px;--m-list-item-avatar-size: 38px;--m-list-item-min-height: 68px;border-radius:10px}.m-list--comfortable{--m-list-item-pad-x: 16px;--m-list-item-pad-y: 16px;--m-list-item-gap: 14px;--m-list-item-avatar-size: 48px;--m-list-item-min-height: 88px}.m-list--isolated{display:grid;gap:12px;margin:0;border:0;overflow:visible;background:transparent;box-shadow:none}:host ::ng-deep .m-list--isolated .m-item{border-radius:14px;background:#ffffffe0;box-shadow:0 8px 24px #0f172a0d}:host ::ng-deep .m-list--isolated .m-item--bordered:after{display:none}.m-list--menu{--m-list-item-pad-x: 20px;--m-list-item-pad-y: 0;--m-list-item-gap: 14px;--m-list-item-avatar-size: 28px;--m-list-item-min-height: 58px;margin:0;border:1px solid #eef1f5;border-radius:8px;overflow:hidden;background:#fff;box-shadow:0 12px 34px #0f172a0b}.m-list--menu.m-list--compact{--m-list-item-pad-x: 20px;--m-list-item-min-height: 50px;border-radius:8px}.m-list--menu.m-list--comfortable{--m-list-item-pad-x: 20px;--m-list-item-min-height: 58px;border-radius:8px}:host ::ng-deep .m-list--menu .m-item{align-items:center;padding-block:0}:host ::ng-deep .m-list--menu .m-item--bordered:after{right:var(--m-item-pad-x);left:var(--m-item-pad-x);background:#eef1f5}:host ::ng-deep .m-list--menu.m-list--divider-full .m-item--bordered:after{right:0;left:0}:host ::ng-deep .m-list--menu .m-item--bordered:has(.m-item__media:not(:empty)):after{left:calc(var(--m-item-pad-x) + var(--m-item-avatar-size) + var(--m-item-gap))}:host ::ng-deep .m-list--menu.m-list--divider-full .m-item--bordered:has(.m-item__media:not(:empty)):after{left:0}:host ::ng-deep .m-list--menu .m-item__start,:host ::ng-deep .m-list--menu .m-item__prefix,:host ::ng-deep .m-list--menu .m-item__media{min-height:var(--m-item-min-height);align-items:center}:host ::ng-deep .m-list--menu .m-item__body{align-self:stretch;gap:0}:host ::ng-deep .m-list--menu .m-item__row--primary{min-height:var(--m-item-min-height);align-items:center;column-gap:14px}:host ::ng-deep .m-list--menu .m-item__row--secondary,:host ::ng-deep .m-list--menu .m-item__footer{display:none}:host ::ng-deep .m-list--menu .m-item__title{color:#151515;font-size:16px;font-weight:680;letter-spacing:0;line-height:24px}:host ::ng-deep .m-list--menu .m-item__meta{max-width:44px;padding-top:0;display:inline-flex;align-items:center;justify-content:flex-end;color:#98a1af;font-size:16px;line-height:24px}.m-list--profile{--m-list-item-pad-x: 16px;--m-list-item-pad-y: 8px;--m-list-item-gap: 12px;--m-list-item-avatar-size: 40px;--m-list-item-min-height: 56px;margin:0;border:0;border-radius:0;overflow:hidden;background:#fff;box-shadow:none}:host ::ng-deep .m-list--profile .m-item{align-items:center;padding-block:var(--m-item-pad-y)}:host ::ng-deep .m-list--profile .m-item--bordered:after{right:var(--m-item-pad-x);left:calc(var(--m-item-pad-x) + var(--m-item-avatar-size) + var(--m-item-gap));background:#0000000f}:host ::ng-deep .m-list--profile.m-list--divider-full .m-item--bordered:after{right:0;left:0}:host ::ng-deep .m-list--profile .m-item__start,:host ::ng-deep .m-list--profile .m-item__prefix,:host ::ng-deep .m-list--profile .m-item__media{min-height:var(--m-item-avatar-size);align-items:center}:host ::ng-deep .m-list--profile .m-item__body{align-self:center;gap:0}:host ::ng-deep .m-list--profile .m-item__row--primary{min-height:var(--m-item-avatar-size);align-items:center;column-gap:12px}:host ::ng-deep .m-list--profile .m-item__row--secondary,:host ::ng-deep .m-list--profile .m-item__footer{display:none}:host ::ng-deep .m-list--profile .m-item__title{color:#111827;font-size:17px;font-weight:500;line-height:24px}.m-list--shortcut{--m-list-item-pad-x: 16px;--m-list-item-pad-y: 8px;--m-list-item-gap: 16px;--m-list-item-avatar-size: 40px;--m-list-item-min-height: 56px;margin:0;border:0;border-radius:0;overflow:hidden;background:#fff;box-shadow:none}:host ::ng-deep .m-list--shortcut .m-item{align-items:center;padding-block:var(--m-item-pad-y)}:host ::ng-deep .m-list--shortcut .m-item--bordered:after{right:var(--m-item-pad-x);left:calc(var(--m-item-pad-x) + var(--m-item-avatar-size) + var(--m-item-gap));background:#0000000f}:host ::ng-deep .m-list--shortcut.m-list--divider-full .m-item--bordered:after{right:0;left:0}:host ::ng-deep .m-list--shortcut .m-item__start,:host ::ng-deep .m-list--shortcut .m-item__prefix,:host ::ng-deep .m-list--shortcut .m-item__media{min-height:var(--m-item-avatar-size);align-items:center}:host ::ng-deep .m-list--shortcut .m-item__body{align-self:center;gap:0}:host ::ng-deep .m-list--shortcut .m-item__row--primary{min-height:var(--m-item-avatar-size);align-items:center;column-gap:12px}:host ::ng-deep .m-list--shortcut .m-item__row--secondary,:host ::ng-deep .m-list--shortcut .m-item__footer{display:none}:host ::ng-deep .m-list--shortcut .m-item__title{color:#111827;font-size:16px;font-weight:700;line-height:24px}.m-list--request{--m-list-item-pad-x: 16px;--m-list-item-pad-y: 20px;--m-list-item-gap: 12px;--m-list-item-avatar-size: 48px;--m-list-item-min-height: 120px;margin:0;border:0;border-radius:0;overflow:hidden;background:#fff;box-shadow:none}.m-list--request.m-list--compact{--m-list-item-pad-x: 16px;--m-list-item-pad-y: 14px;--m-list-item-avatar-size: 46px;--m-list-item-min-height: 96px}.m-list--request.m-list--comfortable{--m-list-item-pad-x: 20px;--m-list-item-pad-y: 20px;--m-list-item-avatar-size: 56px;--m-list-item-min-height: 124px}:host ::ng-deep .m-list--request .m-item--bordered:after,:host ::ng-deep .m-list--request .m-item--bordered:has(.m-item__media:not(:empty)):after{right:16px;left:88px;background:#f0f1f3;transform:none}:host ::ng-deep .m-list--request.m-list--divider-full .m-item--bordered:after,:host ::ng-deep .m-list--request.m-list--divider-full .m-item--bordered:has(.m-item__media:not(:empty)):after{right:0;left:0}:host ::ng-deep .m-list--request .m-item__body{gap:6px;padding-top:0}:host ::ng-deep .m-list--request .m-item__row{column-gap:12px}:host ::ng-deep .m-list--request .m-item__row--secondary{align-items:flex-start}:host ::ng-deep .m-list--request .m-item__title{color:#111;font-size:17px;font-weight:600;line-height:24px}:host ::ng-deep .m-list--request .m-item__meta{max-width:64px;padding-top:0;color:#8a94a6;font-size:14px;line-height:20px}:host ::ng-deep .m-list--request .m-item__description{color:#8a94a6;font-size:15px;line-height:22px}:host ::ng-deep .m-list--request .m-item__actions{max-width:180px;gap:10px;overflow:visible}.m-list--divider-none{border-color:transparent}:host ::ng-deep .m-list--divider-none .m-item--bordered:after{display:none}:host ::ng-deep .m-list--divider-full .m-item--bordered:after{left:0}.m-list__empty{padding:24px 16px;color:var(--color-text-muted);font-size:14px;text-align:center}.m-list__skeleton{--sk-a: var(--m-list-skeleton-avatar-size, var(--m-list-item-avatar-size));--sk-h: var(--m-list-skeleton-row-min-height, var(--m-list-item-min-height));--sk-r: var(--m-list-skeleton-avatar-radius, 10px);--sk-tw: min(58%, 220px);--sk-sw: min(34%, 140px);--sk-sh: 12px;--sk-gap: 8px;--sk-track: 22px;--sk-mw: 10px;--sk-mh: 10px;--sk-mr: 999px;--sk-sd: block;--sk-md: block;display:grid;gap:0;padding:4px 0}.m-list__skeleton-row{display:grid;grid-template-columns:var(--sk-a) minmax(0,1fr) var(--sk-track);align-items:center;gap:var(--m-list-item-gap);min-height:var(--sk-h);padding:var(--m-list-item-pad-y) var(--m-list-item-pad-x);box-sizing:border-box}.m-list__skeleton-avatar,.m-list__skeleton-title,.m-list__skeleton-subtitle,.m-list__skeleton-meta{display:block;background:linear-gradient(90deg,#f3f6fa,#edf1f6 52%,#f3f6fa);background-size:220% 100%;animation:m-list-skeleton-shimmer 1.2s ease-in-out infinite}.m-list__skeleton-avatar{width:var(--sk-a);height:var(--sk-a);border-radius:var(--sk-r)}.m-list__skeleton-content{display:grid;gap:var(--sk-gap);min-width:0}.m-list__skeleton-title{width:var(--sk-tw);height:16px;border-radius:999px}.m-list__skeleton-subtitle{display:var(--sk-sd);width:var(--sk-sw);height:var(--sk-sh);border-radius:999px}.m-list__skeleton-meta{display:var(--sk-md);width:var(--sk-mw);height:var(--sk-mh);border-radius:var(--sk-mr);opacity:.78}.m-list__skeleton--feed{--sk-a: var(--m-list-skeleton-avatar-size, 48px);--sk-h: var(--m-list-skeleton-row-min-height, 72px);--sk-r: 14px;--sk-tw: min(56%, 210px);--sk-sw: min(78%, 300px);--sk-mw: 28px;--sk-mh: 12px}.m-list__skeleton--menu{--sk-a: var(--m-list-skeleton-avatar-size, 28px);--sk-h: var(--m-list-skeleton-row-min-height, 58px);--sk-r: 8px;--sk-gap: 0;--sk-tw: min(48%, 180px);--sk-sd: none;--sk-mw: 8px;--sk-mh: 18px;--sk-mr: 6px;padding:0}.m-list__skeleton--profile,.m-list__skeleton--shortcut{--sk-a: var(--m-list-skeleton-avatar-size, 40px);--sk-h: var(--m-list-skeleton-row-min-height, 56px);--sk-r: 12px;--sk-gap: 0;--sk-tw: min(42%, 180px);--sk-sd: none;--sk-md: none;--sk-track: 0;padding:0}.m-list__skeleton--request{--sk-a: var(--m-list-skeleton-avatar-size, 48px);--sk-h: var(--m-list-skeleton-row-min-height, 120px);--sk-r: 14px;--sk-gap: 10px;--sk-tw: min(46%, 220px);--sk-sw: min(86%, 420px);--sk-sh: 14px;--sk-mw: 64px;--sk-mh: 24px;padding:0}@keyframes m-list-skeleton-shimmer{0%{background-position:120% 0}to{background-position:-120% 0}}\n"] }]
|
|
6239
|
+
}], propDecorators: { variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], skeletonType: [{ type: i0.Input, args: [{ isSignal: true, alias: "skeletonType", required: false }] }], density: [{ type: i0.Input, args: [{ isSignal: true, alias: "density", required: false }] }], divider: [{ type: i0.Input, args: [{ isSignal: true, alias: "divider", required: false }] }], card: [{ type: i0.Input, args: [{ isSignal: true, alias: "card", required: false }] }], compact: [{ type: i0.Input, args: [{ isSignal: true, alias: "compact", required: false }] }], isolated: [{ type: i0.Input, args: [{ isSignal: true, alias: "isolated", required: false }] }], selectable: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectable", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], empty: [{ type: i0.Input, args: [{ isSignal: true, alias: "empty", required: false }] }], emptyText: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyText", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], sectionTitle: [{ type: i0.Input, args: [{ isSignal: true, alias: "sectionTitle", required: false }] }], sectionTitleId: [{ type: i0.Input, args: [{ isSignal: true, alias: "sectionTitleId", required: false }] }] } });
|
|
5350
6240
|
|
|
5351
6241
|
class MobilePageHeaderSlotDirective {
|
|
5352
6242
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: MobilePageHeaderSlotDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
@@ -5454,6 +6344,121 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
|
|
|
5454
6344
|
}, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<section class=\"m-page__frame\">\r\n <header class=\"m-page__header\">\r\n <ng-content select=\"m-header,[mPageHeader]\" />\r\n </header>\r\n\r\n <main class=\"m-page__content\">\r\n <ng-content select=\"m-content,[mPageContent]\" />\r\n </main>\r\n\r\n <footer class=\"m-page__footer\">\r\n <ng-content select=\"m-footer,[mPageFooter]\" />\r\n </footer>\r\n\r\n <ng-content />\r\n</section>\r\n", styles: ["m-page{display:block;width:100%;min-width:0;min-height:100%;height:var(--m-page-height, 100%);box-sizing:border-box}m-page .m-page__frame{width:100%;min-width:0;min-height:100%;height:100%;display:grid;grid-template-rows:auto minmax(0,1fr) auto;gap:var(--m-page-gap, 0);padding:var(--m-page-padding, 0);overflow:var(--m-page-overflow, hidden);background:var(--m-page-bg, var(--color-bg));color:var(--m-page-color, var(--color-text-primary));box-sizing:border-box}m-page .m-page__header,m-page .m-page__content,m-page .m-page__footer{min-width:0;box-sizing:border-box}m-page .m-page__header{z-index:var(--m-page-header-z-index, 1);background:var(--m-page-header-bg, transparent)}m-page .m-page__header:not(:has(>*)),m-page .m-page__footer:not(:has(>*)){display:none}m-page .m-page__content{min-height:0;overflow:var(--m-page-content-overflow, auto);padding:var(--m-page-content-padding, 0);background:var(--m-page-content-bg, transparent)}m-page .m-page__footer{z-index:var(--m-page-footer-z-index, 1);padding:var(--m-page-footer-padding, 0);background:var(--m-page-footer-bg, transparent)}m-page .m-page__header>*,m-page .m-page__content>*,m-page .m-page__footer>*{min-width:0}m-page .m-page__content>m-content,m-page .m-page__content>[mPageContent]{min-height:100%}\n"] }]
|
|
5455
6345
|
}], propDecorators: { padding: [{ type: i0.Input, args: [{ isSignal: true, alias: "padding", required: false }] }] } });
|
|
5456
6346
|
|
|
6347
|
+
const DEFAULT_P_MENU_POSITIONS = [
|
|
6348
|
+
{ originX: 'start', originY: 'bottom', overlayX: 'start', overlayY: 'top', offsetY: 8 },
|
|
6349
|
+
{ originX: 'end', originY: 'bottom', overlayX: 'end', overlayY: 'top', offsetY: 8 },
|
|
6350
|
+
];
|
|
6351
|
+
class PMenuItemComponent {
|
|
6352
|
+
closeMenu = null;
|
|
6353
|
+
disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
6354
|
+
tone = input('default', ...(ngDevMode ? [{ debugName: "tone" }] : /* istanbul ignore next */ []));
|
|
6355
|
+
value = input('', ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
6356
|
+
icon = input(null, ...(ngDevMode ? [{ debugName: "icon" }] : /* istanbul ignore next */ []));
|
|
6357
|
+
select = output();
|
|
6358
|
+
menuItem = viewChild(MenuItem, ...(ngDevMode ? [{ debugName: "menuItem" }] : /* istanbul ignore next */ []));
|
|
6359
|
+
setCloseMenu(closeMenu) {
|
|
6360
|
+
this.closeMenu = closeMenu;
|
|
6361
|
+
}
|
|
6362
|
+
isTextIcon(icon) {
|
|
6363
|
+
return typeof icon === 'string';
|
|
6364
|
+
}
|
|
6365
|
+
handleSelect() {
|
|
6366
|
+
if (!this.disabled()) {
|
|
6367
|
+
this.select.emit();
|
|
6368
|
+
this.menuItem()?.close();
|
|
6369
|
+
this.closeMenu?.();
|
|
6370
|
+
}
|
|
6371
|
+
}
|
|
6372
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: PMenuItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
6373
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: PMenuItemComponent, isStandalone: true, selector: "p-menu-item", inputs: { disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, tone: { classPropertyName: "tone", publicName: "tone", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { select: "select" }, viewQueries: [{ propertyName: "menuItem", first: true, predicate: MenuItem, descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
6374
|
+
<div
|
|
6375
|
+
ngMenuItem
|
|
6376
|
+
class="p-menu-item"
|
|
6377
|
+
[class.p-menu-item--danger]="tone() === 'danger'"
|
|
6378
|
+
[value]="value()"
|
|
6379
|
+
[disabled]="disabled()"
|
|
6380
|
+
(click)="handleSelect()"
|
|
6381
|
+
>
|
|
6382
|
+
@if (icon(); as menuIcon) {
|
|
6383
|
+
@if (isTextIcon(menuIcon)) {
|
|
6384
|
+
<span class="icon" translate="no" aria-hidden="true">{{ menuIcon }}</span>
|
|
6385
|
+
} @else {
|
|
6386
|
+
<lucide-icon
|
|
6387
|
+
class="icon"
|
|
6388
|
+
[img]="menuIcon"
|
|
6389
|
+
[size]="20"
|
|
6390
|
+
[strokeWidth]="1.85"
|
|
6391
|
+
aria-hidden="true"
|
|
6392
|
+
/>
|
|
6393
|
+
}
|
|
6394
|
+
}
|
|
6395
|
+
<span class="label">
|
|
6396
|
+
<ng-content />
|
|
6397
|
+
</span>
|
|
6398
|
+
</div>
|
|
6399
|
+
`, isInline: true, styles: [":host{display:contents}[ngMenu]{margin:0;width:14rem;padding:.5rem;border:1px solid rgba(226,232,240,.9);border-radius:.5rem;background:var(--color-surface);color:var(--color-text-primary);box-shadow:0 18px 40px #0f172a24,0 2px 8px #0f172a0f}[ngMenu][data-visible=false]{display:none}[ngMenuItem]{display:flex;align-items:center;gap:.75rem;min-height:2.75rem;padding:.5rem .75rem;border-radius:.375rem;color:var(--color-text-primary);cursor:pointer;font-size:1rem;font-weight:500;line-height:1.35;outline:none;transition:background-color .16s ease,color .16s ease,box-shadow .16s ease}[ngMenuItem]:hover,[ngMenuItem][data-active=true]{background:#1677ff1f;color:var(--color-primary)}[ngMenuItem]:focus-visible{box-shadow:0 0 0 2px #1677ff38}[ngMenuItem] .icon{flex:0 0 auto;width:1.375rem;min-width:1.375rem;color:#7a7f87;font-size:1.375rem;line-height:1;transition:color .16s ease}[ngMenuItem]:hover .icon,[ngMenuItem][data-active=true] .icon{color:var(--color-primary)}[ngMenuItem] .label{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.separator{height:1px;margin:.25rem .75rem;border:0;background:#d1d5dbb8;transform:scaleY(.5);transform-origin:center}.p-menu-item--danger{color:var(--color-error)}.p-menu-item--danger:hover,.p-menu-item--danger[data-active=true]{background:#ef44441a;color:var(--color-error)}.p-menu-item--danger:hover .icon,.p-menu-item--danger[data-active=true] .icon{color:var(--color-error)}[ngMenuItem][aria-disabled=true],[ngMenuItem][data-disabled=true]{cursor:not-allowed;background:transparent;color:var(--color-text-disabled)}\n"], dependencies: [{ kind: "directive", type: MenuItem, selector: "[ngMenuItem]", inputs: ["id", "value", "disabled", "searchTerm", "submenu"], outputs: ["searchTermChange"], exportAs: ["ngMenuItem"] }, { kind: "ngmodule", type: LucideAngularModule }, { kind: "component", type: i1.LucideAngularComponent, selector: "lucide-angular, lucide-icon, i-lucide, span-lucide", inputs: ["class", "name", "img", "color", "absoluteStrokeWidth", "size", "strokeWidth"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
6400
|
+
}
|
|
6401
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: PMenuItemComponent, decorators: [{
|
|
6402
|
+
type: Component,
|
|
6403
|
+
args: [{ selector: 'p-menu-item', imports: [MenuItem, LucideAngularModule], template: `
|
|
6404
|
+
<div
|
|
6405
|
+
ngMenuItem
|
|
6406
|
+
class="p-menu-item"
|
|
6407
|
+
[class.p-menu-item--danger]="tone() === 'danger'"
|
|
6408
|
+
[value]="value()"
|
|
6409
|
+
[disabled]="disabled()"
|
|
6410
|
+
(click)="handleSelect()"
|
|
6411
|
+
>
|
|
6412
|
+
@if (icon(); as menuIcon) {
|
|
6413
|
+
@if (isTextIcon(menuIcon)) {
|
|
6414
|
+
<span class="icon" translate="no" aria-hidden="true">{{ menuIcon }}</span>
|
|
6415
|
+
} @else {
|
|
6416
|
+
<lucide-icon
|
|
6417
|
+
class="icon"
|
|
6418
|
+
[img]="menuIcon"
|
|
6419
|
+
[size]="20"
|
|
6420
|
+
[strokeWidth]="1.85"
|
|
6421
|
+
aria-hidden="true"
|
|
6422
|
+
/>
|
|
6423
|
+
}
|
|
6424
|
+
}
|
|
6425
|
+
<span class="label">
|
|
6426
|
+
<ng-content />
|
|
6427
|
+
</span>
|
|
6428
|
+
</div>
|
|
6429
|
+
`, changeDetection: ChangeDetectionStrategy.OnPush, styles: [":host{display:contents}[ngMenu]{margin:0;width:14rem;padding:.5rem;border:1px solid rgba(226,232,240,.9);border-radius:.5rem;background:var(--color-surface);color:var(--color-text-primary);box-shadow:0 18px 40px #0f172a24,0 2px 8px #0f172a0f}[ngMenu][data-visible=false]{display:none}[ngMenuItem]{display:flex;align-items:center;gap:.75rem;min-height:2.75rem;padding:.5rem .75rem;border-radius:.375rem;color:var(--color-text-primary);cursor:pointer;font-size:1rem;font-weight:500;line-height:1.35;outline:none;transition:background-color .16s ease,color .16s ease,box-shadow .16s ease}[ngMenuItem]:hover,[ngMenuItem][data-active=true]{background:#1677ff1f;color:var(--color-primary)}[ngMenuItem]:focus-visible{box-shadow:0 0 0 2px #1677ff38}[ngMenuItem] .icon{flex:0 0 auto;width:1.375rem;min-width:1.375rem;color:#7a7f87;font-size:1.375rem;line-height:1;transition:color .16s ease}[ngMenuItem]:hover .icon,[ngMenuItem][data-active=true] .icon{color:var(--color-primary)}[ngMenuItem] .label{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.separator{height:1px;margin:.25rem .75rem;border:0;background:#d1d5dbb8;transform:scaleY(.5);transform-origin:center}.p-menu-item--danger{color:var(--color-error)}.p-menu-item--danger:hover,.p-menu-item--danger[data-active=true]{background:#ef44441a;color:var(--color-error)}.p-menu-item--danger:hover .icon,.p-menu-item--danger[data-active=true] .icon{color:var(--color-error)}[ngMenuItem][aria-disabled=true],[ngMenuItem][data-disabled=true]{cursor:not-allowed;background:transparent;color:var(--color-text-disabled)}\n"] }]
|
|
6430
|
+
}], propDecorators: { disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], tone: [{ type: i0.Input, args: [{ isSignal: true, alias: "tone", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], select: [{ type: i0.Output, args: ["select"] }], menuItem: [{ type: i0.ViewChild, args: [i0.forwardRef(() => MenuItem), { isSignal: true }] }] } });
|
|
6431
|
+
class PMenuSeparatorComponent {
|
|
6432
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: PMenuSeparatorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
6433
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.8", type: PMenuSeparatorComponent, isStandalone: true, selector: "p-menu-separator", ngImport: i0, template: '<div class="separator" role="separator" aria-orientation="horizontal"></div>', isInline: true, styles: [":host{display:contents}[ngMenu]{margin:0;width:14rem;padding:.5rem;border:1px solid rgba(226,232,240,.9);border-radius:.5rem;background:var(--color-surface);color:var(--color-text-primary);box-shadow:0 18px 40px #0f172a24,0 2px 8px #0f172a0f}[ngMenu][data-visible=false]{display:none}[ngMenuItem]{display:flex;align-items:center;gap:.75rem;min-height:2.75rem;padding:.5rem .75rem;border-radius:.375rem;color:var(--color-text-primary);cursor:pointer;font-size:1rem;font-weight:500;line-height:1.35;outline:none;transition:background-color .16s ease,color .16s ease,box-shadow .16s ease}[ngMenuItem]:hover,[ngMenuItem][data-active=true]{background:#1677ff1f;color:var(--color-primary)}[ngMenuItem]:focus-visible{box-shadow:0 0 0 2px #1677ff38}[ngMenuItem] .icon{flex:0 0 auto;width:1.375rem;min-width:1.375rem;color:#7a7f87;font-size:1.375rem;line-height:1;transition:color .16s ease}[ngMenuItem]:hover .icon,[ngMenuItem][data-active=true] .icon{color:var(--color-primary)}[ngMenuItem] .label{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.separator{height:1px;margin:.25rem .75rem;border:0;background:#d1d5dbb8;transform:scaleY(.5);transform-origin:center}.p-menu-item--danger{color:var(--color-error)}.p-menu-item--danger:hover,.p-menu-item--danger[data-active=true]{background:#ef44441a;color:var(--color-error)}.p-menu-item--danger:hover .icon,.p-menu-item--danger[data-active=true] .icon{color:var(--color-error)}[ngMenuItem][aria-disabled=true],[ngMenuItem][data-disabled=true]{cursor:not-allowed;background:transparent;color:var(--color-text-disabled)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
6434
|
+
}
|
|
6435
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: PMenuSeparatorComponent, decorators: [{
|
|
6436
|
+
type: Component,
|
|
6437
|
+
args: [{ selector: 'p-menu-separator', template: '<div class="separator" role="separator" aria-orientation="horizontal"></div>', changeDetection: ChangeDetectionStrategy.OnPush, styles: [":host{display:contents}[ngMenu]{margin:0;width:14rem;padding:.5rem;border:1px solid rgba(226,232,240,.9);border-radius:.5rem;background:var(--color-surface);color:var(--color-text-primary);box-shadow:0 18px 40px #0f172a24,0 2px 8px #0f172a0f}[ngMenu][data-visible=false]{display:none}[ngMenuItem]{display:flex;align-items:center;gap:.75rem;min-height:2.75rem;padding:.5rem .75rem;border-radius:.375rem;color:var(--color-text-primary);cursor:pointer;font-size:1rem;font-weight:500;line-height:1.35;outline:none;transition:background-color .16s ease,color .16s ease,box-shadow .16s ease}[ngMenuItem]:hover,[ngMenuItem][data-active=true]{background:#1677ff1f;color:var(--color-primary)}[ngMenuItem]:focus-visible{box-shadow:0 0 0 2px #1677ff38}[ngMenuItem] .icon{flex:0 0 auto;width:1.375rem;min-width:1.375rem;color:#7a7f87;font-size:1.375rem;line-height:1;transition:color .16s ease}[ngMenuItem]:hover .icon,[ngMenuItem][data-active=true] .icon{color:var(--color-primary)}[ngMenuItem] .label{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.separator{height:1px;margin:.25rem .75rem;border:0;background:#d1d5dbb8;transform:scaleY(.5);transform-origin:center}.p-menu-item--danger{color:var(--color-error)}.p-menu-item--danger:hover,.p-menu-item--danger[data-active=true]{background:#ef44441a;color:var(--color-error)}.p-menu-item--danger:hover .icon,.p-menu-item--danger[data-active=true] .icon{color:var(--color-error)}[ngMenuItem][aria-disabled=true],[ngMenuItem][data-disabled=true]{cursor:not-allowed;background:transparent;color:var(--color-text-disabled)}\n"] }]
|
|
6438
|
+
}] });
|
|
6439
|
+
class PMenuComponent {
|
|
6440
|
+
origin = input.required(...(ngDevMode ? [{ debugName: "origin" }] : /* istanbul ignore next */ []));
|
|
6441
|
+
trigger = input.required(...(ngDevMode ? [{ debugName: "trigger" }] : /* istanbul ignore next */ []));
|
|
6442
|
+
positions = input(DEFAULT_P_MENU_POSITIONS, ...(ngDevMode ? [{ debugName: "positions" }] : /* istanbul ignore next */ []));
|
|
6443
|
+
panelWidth = input('14rem', ...(ngDevMode ? [{ debugName: "panelWidth" }] : /* istanbul ignore next */ []));
|
|
6444
|
+
formatMenu = viewChild('formatMenu', ...(ngDevMode ? [{ debugName: "formatMenu" }] : /* istanbul ignore next */ []));
|
|
6445
|
+
menuItems = contentChildren(PMenuItemComponent, { ...(ngDevMode ? { debugName: "menuItems" } : /* istanbul ignore next */ {}), descendants: true });
|
|
6446
|
+
constructor() {
|
|
6447
|
+
effect(() => {
|
|
6448
|
+
const closeMenu = () => this.trigger().close();
|
|
6449
|
+
for (const item of this.menuItems()) {
|
|
6450
|
+
item.setCloseMenu(closeMenu);
|
|
6451
|
+
}
|
|
6452
|
+
});
|
|
6453
|
+
}
|
|
6454
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: PMenuComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
6455
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.8", type: PMenuComponent, isStandalone: true, selector: "p-menu", inputs: { origin: { classPropertyName: "origin", publicName: "origin", isSignal: true, isRequired: true, transformFunction: null }, trigger: { classPropertyName: "trigger", publicName: "trigger", isSignal: true, isRequired: true, transformFunction: null }, positions: { classPropertyName: "positions", publicName: "positions", isSignal: true, isRequired: false, transformFunction: null }, panelWidth: { classPropertyName: "panelWidth", publicName: "panelWidth", isSignal: true, isRequired: false, transformFunction: null } }, queries: [{ propertyName: "menuItems", predicate: PMenuItemComponent, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "formatMenu", first: true, predicate: ["formatMenu"], descendants: true, isSignal: true }], ngImport: i0, template: "<ng-template\n [cdkConnectedOverlayOpen]=\"true\"\n [cdkConnectedOverlay]=\"{ origin: origin(), usePopover: 'inline' }\"\n [cdkConnectedOverlayPositions]=\"positions()\"\n cdkAttachPopoverAsChild\n>\n <div\n ngMenu\n class=\"p-menu\"\n #formatMenu=\"ngMenu\"\n [attr.data-visible]=\"trigger().expanded()\"\n [style.width]=\"panelWidth()\"\n >\n <ng-content />\n </div>\n</ng-template>\n", styles: [":host{display:contents}[ngMenu]{margin:0;width:14rem;padding:.5rem;border:1px solid rgba(226,232,240,.9);border-radius:.5rem;background:var(--color-surface);color:var(--color-text-primary);box-shadow:0 18px 40px #0f172a24,0 2px 8px #0f172a0f}[ngMenu][data-visible=false]{display:none}[ngMenuItem]{display:flex;align-items:center;gap:.75rem;min-height:2.75rem;padding:.5rem .75rem;border-radius:.375rem;color:var(--color-text-primary);cursor:pointer;font-size:1rem;font-weight:500;line-height:1.35;outline:none;transition:background-color .16s ease,color .16s ease,box-shadow .16s ease}[ngMenuItem]:hover,[ngMenuItem][data-active=true]{background:#1677ff1f;color:var(--color-primary)}[ngMenuItem]:focus-visible{box-shadow:0 0 0 2px #1677ff38}[ngMenuItem] .icon{flex:0 0 auto;width:1.375rem;min-width:1.375rem;color:#7a7f87;font-size:1.375rem;line-height:1;transition:color .16s ease}[ngMenuItem]:hover .icon,[ngMenuItem][data-active=true] .icon{color:var(--color-primary)}[ngMenuItem] .label{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.separator{height:1px;margin:.25rem .75rem;border:0;background:#d1d5dbb8;transform:scaleY(.5);transform-origin:center}.p-menu-item--danger{color:var(--color-error)}.p-menu-item--danger:hover,.p-menu-item--danger[data-active=true]{background:#ef44441a;color:var(--color-error)}.p-menu-item--danger:hover .icon,.p-menu-item--danger[data-active=true] .icon{color:var(--color-error)}[ngMenuItem][aria-disabled=true],[ngMenuItem][data-disabled=true]{cursor:not-allowed;background:transparent;color:var(--color-text-disabled)}\n"], dependencies: [{ kind: "ngmodule", type: OverlayModule }, { kind: "directive", type: i1$2.CdkConnectedOverlay, selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]", inputs: ["cdkConnectedOverlayOrigin", "cdkConnectedOverlayPositions", "cdkConnectedOverlayPositionStrategy", "cdkConnectedOverlayOffsetX", "cdkConnectedOverlayOffsetY", "cdkConnectedOverlayWidth", "cdkConnectedOverlayHeight", "cdkConnectedOverlayMinWidth", "cdkConnectedOverlayMinHeight", "cdkConnectedOverlayBackdropClass", "cdkConnectedOverlayPanelClass", "cdkConnectedOverlayViewportMargin", "cdkConnectedOverlayScrollStrategy", "cdkConnectedOverlayOpen", "cdkConnectedOverlayDisableClose", "cdkConnectedOverlayTransformOriginOn", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayLockPosition", "cdkConnectedOverlayFlexibleDimensions", "cdkConnectedOverlayGrowAfterOpen", "cdkConnectedOverlayPush", "cdkConnectedOverlayDisposeOnNavigation", "cdkConnectedOverlayUsePopover", "cdkConnectedOverlayMatchWidth", "cdkConnectedOverlay"], outputs: ["backdropClick", "positionChange", "attach", "detach", "overlayKeydown", "overlayOutsideClick"], exportAs: ["cdkConnectedOverlay"] }, { kind: "directive", type: Menu, selector: "[ngMenu]", inputs: ["id", "wrap", "typeaheadDelay", "disabled", "expansionDelay"], outputs: ["itemSelected"], exportAs: ["ngMenu"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
6456
|
+
}
|
|
6457
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: PMenuComponent, decorators: [{
|
|
6458
|
+
type: Component,
|
|
6459
|
+
args: [{ selector: 'p-menu', imports: [OverlayModule, Menu], changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-template\n [cdkConnectedOverlayOpen]=\"true\"\n [cdkConnectedOverlay]=\"{ origin: origin(), usePopover: 'inline' }\"\n [cdkConnectedOverlayPositions]=\"positions()\"\n cdkAttachPopoverAsChild\n>\n <div\n ngMenu\n class=\"p-menu\"\n #formatMenu=\"ngMenu\"\n [attr.data-visible]=\"trigger().expanded()\"\n [style.width]=\"panelWidth()\"\n >\n <ng-content />\n </div>\n</ng-template>\n", styles: [":host{display:contents}[ngMenu]{margin:0;width:14rem;padding:.5rem;border:1px solid rgba(226,232,240,.9);border-radius:.5rem;background:var(--color-surface);color:var(--color-text-primary);box-shadow:0 18px 40px #0f172a24,0 2px 8px #0f172a0f}[ngMenu][data-visible=false]{display:none}[ngMenuItem]{display:flex;align-items:center;gap:.75rem;min-height:2.75rem;padding:.5rem .75rem;border-radius:.375rem;color:var(--color-text-primary);cursor:pointer;font-size:1rem;font-weight:500;line-height:1.35;outline:none;transition:background-color .16s ease,color .16s ease,box-shadow .16s ease}[ngMenuItem]:hover,[ngMenuItem][data-active=true]{background:#1677ff1f;color:var(--color-primary)}[ngMenuItem]:focus-visible{box-shadow:0 0 0 2px #1677ff38}[ngMenuItem] .icon{flex:0 0 auto;width:1.375rem;min-width:1.375rem;color:#7a7f87;font-size:1.375rem;line-height:1;transition:color .16s ease}[ngMenuItem]:hover .icon,[ngMenuItem][data-active=true] .icon{color:var(--color-primary)}[ngMenuItem] .label{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.separator{height:1px;margin:.25rem .75rem;border:0;background:#d1d5dbb8;transform:scaleY(.5);transform-origin:center}.p-menu-item--danger{color:var(--color-error)}.p-menu-item--danger:hover,.p-menu-item--danger[data-active=true]{background:#ef44441a;color:var(--color-error)}.p-menu-item--danger:hover .icon,.p-menu-item--danger[data-active=true] .icon{color:var(--color-error)}[ngMenuItem][aria-disabled=true],[ngMenuItem][data-disabled=true]{cursor:not-allowed;background:transparent;color:var(--color-text-disabled)}\n"] }]
|
|
6460
|
+
}], ctorParameters: () => [], propDecorators: { origin: [{ type: i0.Input, args: [{ isSignal: true, alias: "origin", required: true }] }], trigger: [{ type: i0.Input, args: [{ isSignal: true, alias: "trigger", required: true }] }], positions: [{ type: i0.Input, args: [{ isSignal: true, alias: "positions", required: false }] }], panelWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "panelWidth", required: false }] }], formatMenu: [{ type: i0.ViewChild, args: ['formatMenu', { isSignal: true }] }], menuItems: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => PMenuItemComponent), { ...{ descendants: true }, isSignal: true }] }] } });
|
|
6461
|
+
|
|
5457
6462
|
function coerceContentGap(value) {
|
|
5458
6463
|
if (value === null || value === undefined || value === '') {
|
|
5459
6464
|
return null;
|
|
@@ -5590,47 +6595,85 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
|
|
|
5590
6595
|
}, template: "<button\r\n class=\"m-person-card-layer__backdrop\"\r\n type=\"button\"\r\n [attr.aria-label]=\"closeAriaLabel()\"\r\n [attr.title]=\"closeAriaLabel()\"\r\n (click)=\"closeRequested.emit()\"\r\n></button>\r\n\r\n<article\r\n class=\"m-person-card-layer__panel\"\r\n role=\"dialog\"\r\n [attr.aria-label]=\"ariaLabel()\"\r\n (click)=\"$event.stopPropagation()\"\r\n>\r\n <ng-content />\r\n</article>\r\n", styles: [":host{color:#141824;pointer-events:auto}.m-person-card-layer__backdrop{padding:0;border:0;background:transparent}.m-person-card-layer__panel{display:grid;align-content:start;gap:16px;min-width:0;background:#f7f9fc}:host(.m-person-card-layer--desktop){position:absolute;inset:0;z-index:60;display:block;pointer-events:none}:host(.m-person-card-layer--desktop) .m-person-card-layer__backdrop{position:fixed;inset:0;z-index:0;width:100%;height:100%;pointer-events:auto}:host(.m-person-card-layer--desktop) .m-person-card-layer__panel{position:absolute;top:68px;left:26px;z-index:1;width:min(372px,100% - 52px);max-height:min(680px,100% - 92px);padding:12px;overflow:auto;border:1px solid #e7ebf2;border-radius:8px;box-shadow:0 22px 54px #0f172a2e;opacity:0;pointer-events:auto;transform:translate3d(-10px,-6px,0) scale(.96);transition:opacity .22s cubic-bezier(.22,1,.36,1),transform .22s cubic-bezier(.22,1,.36,1)}:host(.m-person-card-layer--desktop.m-person-card-layer--active) .m-person-card-layer__panel{opacity:1;transform:translateZ(0) scale(1)}:host(.m-person-card-layer--mobile){position:fixed;inset:0;z-index:1000;display:block;overflow:auto;background:#fff;scrollbar-width:none}:host(.m-person-card-layer--mobile)::-webkit-scrollbar{display:none}:host(.m-person-card-layer--mobile) .m-person-card-layer__panel{min-height:100%;padding:max(4px,env(safe-area-inset-top,0px)) 16px calc(28px + env(safe-area-inset-bottom,0px));background:#fff;transform:translate3d(100%,0,0);transition:transform .34s cubic-bezier(.36,.66,.04,1)}:host(.m-person-card-layer--mobile.m-person-card-layer--active) .m-person-card-layer__panel{transform:translateZ(0)}:host(.m-person-card-layer--mobile:not(.m-person-card-layer--active)) .m-person-card-layer__panel{transition-duration:.26s;transition-timing-function:cubic-bezier(.4,0,.2,1)}\n"] }]
|
|
5591
6596
|
}], propDecorators: { active: [{ type: i0.Input, args: [{ isSignal: true, alias: "active", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], closeAriaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeAriaLabel", required: false }] }], closeRequested: [{ type: i0.Output, args: ["closeRequested"] }] } });
|
|
5592
6597
|
|
|
5593
|
-
|
|
5594
|
-
|
|
5595
|
-
|
|
5596
|
-
}
|
|
5597
|
-
|
|
5598
|
-
|
|
5599
|
-
|
|
5600
|
-
|
|
5601
|
-
|
|
5602
|
-
|
|
5603
|
-
|
|
5604
|
-
|
|
5605
|
-
|
|
5606
|
-
|
|
5607
|
-
|
|
5608
|
-
|
|
5609
|
-
|
|
5610
|
-
|
|
5611
|
-
|
|
5612
|
-
|
|
5613
|
-
|
|
5614
|
-
|
|
5615
|
-
|
|
6598
|
+
const emptySlide = {
|
|
6599
|
+
id: '',
|
|
6600
|
+
title: '',
|
|
6601
|
+
};
|
|
6602
|
+
class NoticeCarousel {
|
|
6603
|
+
slides = input([], ...(ngDevMode ? [{ debugName: "slides" }] : /* istanbul ignore next */ []));
|
|
6604
|
+
ariaLabel = input('置顶公告', ...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
|
|
6605
|
+
actionText = input('查看详情', ...(ngDevMode ? [{ debugName: "actionText" }] : /* istanbul ignore next */ []));
|
|
6606
|
+
intervalMs = input(4200, ...(ngDevMode ? [{ debugName: "intervalMs" }] : /* istanbul ignore next */ []));
|
|
6607
|
+
detailSelected = output();
|
|
6608
|
+
activeIndex = signal(0, ...(ngDevMode ? [{ debugName: "activeIndex" }] : /* istanbul ignore next */ []));
|
|
6609
|
+
activeSlide = computed(() => this.slides()[this.activeIndex()] ?? this.slides()[0] ?? emptySlide, ...(ngDevMode ? [{ debugName: "activeSlide" }] : /* istanbul ignore next */ []));
|
|
6610
|
+
activeMeta = computed(() => this.activeSlide().meta ?? [], ...(ngDevMode ? [{ debugName: "activeMeta" }] : /* istanbul ignore next */ []));
|
|
6611
|
+
chevronRightIcon = ChevronRightIcon;
|
|
6612
|
+
slideTimer = null;
|
|
6613
|
+
constructor() {
|
|
6614
|
+
effect((onCleanup) => {
|
|
6615
|
+
const slides = this.slides();
|
|
6616
|
+
const intervalMs = this.intervalMs();
|
|
6617
|
+
this.stopCarousel();
|
|
6618
|
+
if (slides.length <= 1) {
|
|
6619
|
+
return;
|
|
6620
|
+
}
|
|
6621
|
+
this.slideTimer = setInterval(() => {
|
|
6622
|
+
const length = this.slides().length;
|
|
6623
|
+
this.activeIndex.update((index) => (index + 1) % Math.max(length, 1));
|
|
6624
|
+
}, intervalMs);
|
|
6625
|
+
onCleanup(() => this.stopCarousel());
|
|
6626
|
+
});
|
|
6627
|
+
}
|
|
6628
|
+
ngOnDestroy() {
|
|
6629
|
+
this.stopCarousel();
|
|
6630
|
+
}
|
|
6631
|
+
selectSlide(index) {
|
|
6632
|
+
this.activeIndex.set(index);
|
|
6633
|
+
this.restartCarousel();
|
|
6634
|
+
}
|
|
6635
|
+
pauseCarousel() {
|
|
6636
|
+
this.stopCarousel();
|
|
6637
|
+
}
|
|
6638
|
+
resumeCarousel() {
|
|
6639
|
+
this.restartCarousel();
|
|
6640
|
+
}
|
|
6641
|
+
selectDetail() {
|
|
6642
|
+
this.detailSelected.emit(this.activeSlide());
|
|
6643
|
+
}
|
|
6644
|
+
metaTone(index) {
|
|
6645
|
+
return this.activeSlide().metaTones?.[index] ?? null;
|
|
6646
|
+
}
|
|
6647
|
+
slideTrackKey(index, slide) {
|
|
6648
|
+
if (typeof slide.id === 'string' && slide.id.trim().length === 0) {
|
|
6649
|
+
return `slide-${index}`;
|
|
6650
|
+
}
|
|
6651
|
+
return slide.id;
|
|
6652
|
+
}
|
|
6653
|
+
restartCarousel() {
|
|
6654
|
+
this.stopCarousel();
|
|
6655
|
+
if (this.slides().length <= 1) {
|
|
6656
|
+
return;
|
|
6657
|
+
}
|
|
6658
|
+
this.slideTimer = setInterval(() => {
|
|
6659
|
+
const length = this.slides().length;
|
|
6660
|
+
this.activeIndex.update((index) => (index + 1) % Math.max(length, 1));
|
|
6661
|
+
}, this.intervalMs());
|
|
6662
|
+
}
|
|
6663
|
+
stopCarousel() {
|
|
6664
|
+
if (!this.slideTimer) {
|
|
6665
|
+
return;
|
|
6666
|
+
}
|
|
6667
|
+
clearInterval(this.slideTimer);
|
|
6668
|
+
this.slideTimer = null;
|
|
6669
|
+
}
|
|
6670
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: NoticeCarousel, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
6671
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: NoticeCarousel, isStandalone: true, selector: "s-notice-carousel", inputs: { slides: { classPropertyName: "slides", publicName: "slides", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, actionText: { classPropertyName: "actionText", publicName: "actionText", isSignal: true, isRequired: false, transformFunction: null }, intervalMs: { classPropertyName: "intervalMs", publicName: "intervalMs", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { detailSelected: "detailSelected" }, ngImport: i0, template: "@if (slides().length) {\n <section\n class=\"s-notice-carousel\"\n [class.s-notice-carousel--text-only]=\"!activeSlide().image\"\n [attr.aria-label]=\"ariaLabel()\"\n (mouseenter)=\"pauseCarousel()\"\n (mouseleave)=\"resumeCarousel()\"\n >\n @for (slide of slides(); track slideTrackKey($index, slide); let index = $index) {\n @if (slide.image) {\n <img\n class=\"s-notice-carousel__image\"\n [class.s-notice-carousel__image--active]=\"index === activeIndex()\"\n [src]=\"slide.image\"\n [alt]=\"slide.title\"\n />\n }\n }\n\n <div class=\"s-notice-carousel__shade\"></div>\n\n <div class=\"s-notice-carousel__content\">\n <h1>{{ activeSlide().title }}</h1>\n @if (activeSlide().summary) {\n <p>{{ activeSlide().summary }}</p>\n }\n @if (activeMeta().length) {\n <div class=\"s-notice-carousel__meta\">\n @for (item of activeMeta(); track $index; let first = $first; let index = $index) {\n <span\n [class.s-notice-carousel__tag]=\"first\"\n [attr.data-notice-tone]=\"first ? metaTone(index) : null\"\n >\n {{ item }}\n </span>\n }\n </div>\n }\n\n <div class=\"s-notice-carousel__dots\" role=\"tablist\" [attr.aria-label]=\"ariaLabel() + '\u8F6E\u64AD'\">\n @for (slide of slides(); track slideTrackKey($index, slide); let index = $index) {\n <button\n class=\"s-notice-carousel__dot\"\n [class.s-notice-carousel__dot--active]=\"index === activeIndex()\"\n type=\"button\"\n role=\"tab\"\n [attr.aria-selected]=\"index === activeIndex()\"\n [attr.aria-label]=\"'\u5207\u6362' + ariaLabel() + ' ' + (index + 1)\"\n (click)=\"selectSlide(index)\"\n ></button>\n }\n </div>\n </div>\n\n <button class=\"s-notice-carousel__action\" type=\"button\" (click)=\"selectDetail()\">\n {{ actionText() }}\n <lucide-icon aria-hidden=\"true\" [img]=\"chevronRightIcon\" [size]=\"16\" [strokeWidth]=\"2\" />\n </button>\n </section>\n}\n", styles: [":host{display:block;--notice-carousel-height: 252px;--notice-carousel-radius: 8px;--notice-carousel-content-max-width: 620px;--notice-carousel-content-padding: 32px 28px 74px;--notice-carousel-title-size: 26px;--notice-carousel-action-right: 20px;--notice-carousel-action-bottom: 20px;--notice-carousel-dots-left: 28px;--notice-carousel-dots-bottom: 22px}.s-notice-carousel{position:relative;display:block;height:var(--notice-carousel-height);overflow:hidden;border:0;border-radius:var(--notice-carousel-radius);background:#0e1726}.s-notice-carousel__image{position:absolute;inset:0;z-index:0;display:block;width:100%;height:100%;object-fit:cover;object-position:center;opacity:0;transform:scale(1.015);transition:opacity .36s ease,transform .68s ease}.s-notice-carousel__image--active{opacity:1;transform:scale(1)}.s-notice-carousel__shade{position:absolute;inset:0;z-index:1;background:linear-gradient(90deg,#071123e6,#07112380 58%,#0711231f)}.s-notice-carousel__content{position:relative;z-index:2;box-sizing:border-box;height:100%;max-width:var(--notice-carousel-content-max-width);padding:var(--notice-carousel-content-padding)}.s-notice-carousel h1{margin:0;color:#fff;font-size:var(--notice-carousel-title-size);font-weight:900;line-height:1.35}.s-notice-carousel p{display:-webkit-box;overflow:hidden;margin:9px 0 0;color:#ffffffdb;font-size:14px;line-height:1.65;-webkit-box-orient:vertical;-webkit-line-clamp:3;line-clamp:3}.s-notice-carousel__meta{position:absolute;bottom:calc(var(--notice-carousel-dots-bottom) + 32px);left:var(--notice-carousel-dots-left);display:flex;flex-wrap:wrap;align-items:center;gap:8px 10px;max-width:calc(100% - var(--notice-carousel-dots-left) - 24px);margin:0;color:#ffffffb8;font-size:13px;line-height:1.4}.s-notice-carousel__tag{display:inline-flex;min-height:18px;align-items:center;padding:1px 7px;border-radius:6px;background:#fff4e6;color:#f28705;font-size:11px;font-weight:800;line-height:1.2}.s-notice-carousel__tag[data-notice-tone=notice]{background:#e8f1ff;color:#0b72ff}.s-notice-carousel__tag[data-notice-tone=announcement]{background:#fff7ed;color:#c2410c}.s-notice-carousel__tag[data-notice-tone=publicity]{background:#ecfeff;color:#0e7490}.s-notice-carousel__tag[data-notice-tone=focus]{background:#fef3c7;color:#b45309}.s-notice-carousel__tag[data-notice-tone=vision]{background:#ecfeff;color:#0e7490}.s-notice-carousel__tag[data-notice-tone=quality]{background:#ecfdf5;color:#047857}.s-notice-carousel__tag[data-notice-tone=confidentiality]{background:#f5f3ff;color:#6d28d9}.s-notice-carousel__tag[data-notice-tone=industry]{background:#eef2ff;color:#4338ca}.s-notice-carousel__tag[data-notice-tone=subsidiary]{background:#fdf2f8;color:#be185d}.s-notice-carousel__meta span+span:before{display:inline-block;width:4px;height:4px;margin-right:10px;border-radius:999px;background:#ffffff6b;content:\"\";vertical-align:2px}.s-notice-carousel__dots{position:absolute;bottom:var(--notice-carousel-dots-bottom);left:var(--notice-carousel-dots-left);z-index:3;display:inline-flex;gap:10px}.s-notice-carousel__dot{position:relative;width:22px;height:14px;padding:0;border:0;border-radius:999px;background:transparent;cursor:pointer;transition:width .18s ease,transform .18s ease}.s-notice-carousel__dot:before{position:absolute;inset:4px 0 5px;border-radius:inherit;background:#ffffff85;content:\"\";transition:background-color .18s ease}.s-notice-carousel__dot:hover,.s-notice-carousel__dot:focus-visible{transform:translateY(-1px)}.s-notice-carousel__dot:hover:before,.s-notice-carousel__dot:focus-visible:before{background:#ffffffd1}.s-notice-carousel__dot:focus-visible{outline:2px solid rgba(255,255,255,.9);outline-offset:3px}.s-notice-carousel__dot--active{width:28px}.s-notice-carousel__dot--active:before{background:#1683ff}.s-notice-carousel__action{position:absolute;right:var(--notice-carousel-action-right);bottom:var(--notice-carousel-action-bottom);z-index:2;display:inline-flex;height:36px;align-items:center;gap:4px;padding:0 14px;border:0;border-radius:8px;background:#0b72ff;color:#fff;cursor:pointer;font-size:14px;font-weight:800;white-space:nowrap}.s-notice-carousel--text-only{border:1px solid rgba(226,232,240,.82);background:#fff}.s-notice-carousel--text-only .s-notice-carousel__shade{display:none}.s-notice-carousel--text-only .s-notice-carousel__content{max-width:780px}.s-notice-carousel--text-only h1{color:#111827}.s-notice-carousel--text-only p{color:#334155}.s-notice-carousel--text-only .s-notice-carousel__meta{color:#64748b}.s-notice-carousel--text-only .s-notice-carousel__meta span+span:before,.s-notice-carousel--text-only .s-notice-carousel__dot:before{background:#cbd5e1}.s-notice-carousel--text-only .s-notice-carousel__dot:hover:before,.s-notice-carousel--text-only .s-notice-carousel__dot:focus-visible:before{background:#94a3b8}.s-notice-carousel--text-only .s-notice-carousel__dot:focus-visible{outline-color:#0b72ff59}.s-notice-carousel--text-only .s-notice-carousel__dot--active:before{background:#0b72ff}\n"], dependencies: [{ kind: "ngmodule", type: LucideAngularModule }, { kind: "component", type: i1.LucideAngularComponent, selector: "lucide-angular, lucide-icon, i-lucide, span-lucide", inputs: ["class", "name", "img", "color", "absoluteStrokeWidth", "size", "strokeWidth"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
5616
6672
|
}
|
|
5617
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type:
|
|
5618
|
-
type: Directive,
|
|
5619
|
-
args: [{
|
|
5620
|
-
selector: '[mProductShellBottom]',
|
|
5621
|
-
}]
|
|
5622
|
-
}] });
|
|
5623
|
-
class MProductShell {
|
|
5624
|
-
hosted = input(false, ...(ngDevMode ? [{ debugName: "hosted" }] : /* istanbul ignore next */ []));
|
|
5625
|
-
mobile = input(false, ...(ngDevMode ? [{ debugName: "mobile" }] : /* istanbul ignore next */ []));
|
|
5626
|
-
mobileSubpage = input(false, ...(ngDevMode ? [{ debugName: "mobileSubpage" }] : /* istanbul ignore next */ []));
|
|
5627
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: MProductShell, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
5628
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.8", type: MProductShell, isStandalone: true, selector: "m-product-shell", inputs: { hosted: { classPropertyName: "hosted", publicName: "hosted", isSignal: true, isRequired: false, transformFunction: null }, mobile: { classPropertyName: "mobile", publicName: "mobile", isSignal: true, isRequired: false, transformFunction: null }, mobileSubpage: { classPropertyName: "mobileSubpage", publicName: "mobileSubpage", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<section\r\n class=\"m-product-shell\"\r\n [class.m-product-shell--hosted]=\"hosted()\"\r\n [class.m-product-shell--mobile]=\"mobile()\"\r\n [class.m-product-shell--mobile-subpage]=\"mobileSubpage()\"\r\n>\r\n <ng-content select=\"[mProductShellRail]\" />\r\n\r\n <main class=\"m-product-shell__main\">\r\n <ng-content select=\"[mProductShellMain]\" />\r\n </main>\r\n\r\n <footer class=\"m-product-shell__bottom-dock\">\r\n <ng-content select=\"[mProductShellBottom]\" />\r\n </footer>\r\n</section>\r\n", styles: ["m-product-shell{display:block;height:100%;min-height:0}m-product-shell,m-product-shell *{box-sizing:border-box}.m-product-shell{--m-header-gap: 16px;--m-header-min-height: auto;--m-header-padding-y: 0px;--m-header-toolbar-padding-y: 10px;--m-header-toolbar-padding-bottom: 0px;--m-header-title-size: 26px;--m-header-title-weight: 820;--m-header-title-line-height: 1.2;--m-header-description-color: var(--app-muted, #667085);--m-header-description-size: 13px;--m-header-description-gap: 5px;--m-header-icon-size: 34px;--m-header-icon-radius: 999px;--m-header-icon-hover-bg: #f1f4fb;--m-header-icon-active-bg: #f0f2f6;--m-header-action-gap: 10px;--app-border: #d8e1ec;--app-border-strong: #bfccd9;--app-bg: #eef2f7;--app-panel: #f8fafc;--app-panel-strong: #ffffff;--app-primary: var(--color-primary);--app-primary-soft: #e2f0ff;--app-text: #172033;--app-muted: #667085;display:grid;grid-template-columns:78px minmax(0,1fr);height:100%;min-height:0;overflow:hidden;background:var(--app-bg);color:var(--app-text);line-height:1.4}.m-product-shell--hosted{grid-template-columns:minmax(0,1fr)}.m-product-shell__main{min-width:0;min-height:0;overflow:hidden}.m-product-shell__main>router-outlet+*{display:block;height:100%;min-height:0}.m-product-shell--mobile{--m-product-shell-mobile-page-x: 20px;--m-header-min-height: 44px;--m-header-toolbar-row-height: 44px;--m-header-title-color: #111318;--m-header-title-size: 28px;--m-header-title-weight: 850;--m-header-title-line-height: 36px;--m-header-icon-size: 38px;--m-header-icon-hover-bg: transparent;grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr) auto;width:100%;max-width:100vw;height:100dvh;min-height:100dvh;overflow:hidden;background:var(--app-panel-strong)}.m-product-shell--hosted.m-product-shell--mobile,.m-product-shell--mobile-subpage{grid-template-rows:minmax(0,1fr)}.m-product-shell--mobile .m-product-shell__main{grid-row:1}.m-product-shell--mobile m-header .m-header__actions{gap:12px;margin-right:-4px}.m-product-shell--mobile m-page>.m-page__frame>.m-page__header>m-header:not(.sidebar-top):not(.m-header--sidebar){--m-header-padding-x: var(--m-product-shell-mobile-page-x)}.m-product-shell__bottom-dock{position:relative;z-index:20;grid-row:2;min-width:0;min-height:76px;border-top:1px solid #f1f2f6;background:#fff}.m-product-shell__bottom-dock:empty{display:none}.m-product-shell--mobile-subpage .m-product-shell__bottom-dock{display:none}.m-product-shell--mobile>.m-product-shell__bottom-dock m-bottom-nav{--bottom-nav-shadow: none;--bottom-nav-tabs-grid-auto-columns: minmax(0, 1fr);--bottom-nav-tabs-padding: 6px 14px calc(7px + env(safe-area-inset-bottom, 0px)) ;--bottom-nav-tabs-item-gap: 4px;--bottom-nav-tabs-item-min-height: 58px;--bottom-nav-tabs-item-padding: 4px 0 0;--bottom-nav-tabs-color: #6f7787;--bottom-nav-tabs-active-color: #6257ff;--bottom-nav-tabs-icon-size: 25px;--bottom-nav-tabs-icon-stroke-width: 1.8;--bottom-nav-tabs-font-size: 12px;--bottom-nav-tabs-font-weight: 600;--bottom-nav-tabs-label-overflow: visible;--bottom-nav-tabs-label-text-overflow: clip;display:block}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
5629
|
-
}
|
|
5630
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: MProductShell, decorators: [{
|
|
6673
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: NoticeCarousel, decorators: [{
|
|
5631
6674
|
type: Component,
|
|
5632
|
-
args: [{ selector: '
|
|
5633
|
-
}], propDecorators: {
|
|
6675
|
+
args: [{ selector: 's-notice-carousel', imports: [LucideAngularModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (slides().length) {\n <section\n class=\"s-notice-carousel\"\n [class.s-notice-carousel--text-only]=\"!activeSlide().image\"\n [attr.aria-label]=\"ariaLabel()\"\n (mouseenter)=\"pauseCarousel()\"\n (mouseleave)=\"resumeCarousel()\"\n >\n @for (slide of slides(); track slideTrackKey($index, slide); let index = $index) {\n @if (slide.image) {\n <img\n class=\"s-notice-carousel__image\"\n [class.s-notice-carousel__image--active]=\"index === activeIndex()\"\n [src]=\"slide.image\"\n [alt]=\"slide.title\"\n />\n }\n }\n\n <div class=\"s-notice-carousel__shade\"></div>\n\n <div class=\"s-notice-carousel__content\">\n <h1>{{ activeSlide().title }}</h1>\n @if (activeSlide().summary) {\n <p>{{ activeSlide().summary }}</p>\n }\n @if (activeMeta().length) {\n <div class=\"s-notice-carousel__meta\">\n @for (item of activeMeta(); track $index; let first = $first; let index = $index) {\n <span\n [class.s-notice-carousel__tag]=\"first\"\n [attr.data-notice-tone]=\"first ? metaTone(index) : null\"\n >\n {{ item }}\n </span>\n }\n </div>\n }\n\n <div class=\"s-notice-carousel__dots\" role=\"tablist\" [attr.aria-label]=\"ariaLabel() + '\u8F6E\u64AD'\">\n @for (slide of slides(); track slideTrackKey($index, slide); let index = $index) {\n <button\n class=\"s-notice-carousel__dot\"\n [class.s-notice-carousel__dot--active]=\"index === activeIndex()\"\n type=\"button\"\n role=\"tab\"\n [attr.aria-selected]=\"index === activeIndex()\"\n [attr.aria-label]=\"'\u5207\u6362' + ariaLabel() + ' ' + (index + 1)\"\n (click)=\"selectSlide(index)\"\n ></button>\n }\n </div>\n </div>\n\n <button class=\"s-notice-carousel__action\" type=\"button\" (click)=\"selectDetail()\">\n {{ actionText() }}\n <lucide-icon aria-hidden=\"true\" [img]=\"chevronRightIcon\" [size]=\"16\" [strokeWidth]=\"2\" />\n </button>\n </section>\n}\n", styles: [":host{display:block;--notice-carousel-height: 252px;--notice-carousel-radius: 8px;--notice-carousel-content-max-width: 620px;--notice-carousel-content-padding: 32px 28px 74px;--notice-carousel-title-size: 26px;--notice-carousel-action-right: 20px;--notice-carousel-action-bottom: 20px;--notice-carousel-dots-left: 28px;--notice-carousel-dots-bottom: 22px}.s-notice-carousel{position:relative;display:block;height:var(--notice-carousel-height);overflow:hidden;border:0;border-radius:var(--notice-carousel-radius);background:#0e1726}.s-notice-carousel__image{position:absolute;inset:0;z-index:0;display:block;width:100%;height:100%;object-fit:cover;object-position:center;opacity:0;transform:scale(1.015);transition:opacity .36s ease,transform .68s ease}.s-notice-carousel__image--active{opacity:1;transform:scale(1)}.s-notice-carousel__shade{position:absolute;inset:0;z-index:1;background:linear-gradient(90deg,#071123e6,#07112380 58%,#0711231f)}.s-notice-carousel__content{position:relative;z-index:2;box-sizing:border-box;height:100%;max-width:var(--notice-carousel-content-max-width);padding:var(--notice-carousel-content-padding)}.s-notice-carousel h1{margin:0;color:#fff;font-size:var(--notice-carousel-title-size);font-weight:900;line-height:1.35}.s-notice-carousel p{display:-webkit-box;overflow:hidden;margin:9px 0 0;color:#ffffffdb;font-size:14px;line-height:1.65;-webkit-box-orient:vertical;-webkit-line-clamp:3;line-clamp:3}.s-notice-carousel__meta{position:absolute;bottom:calc(var(--notice-carousel-dots-bottom) + 32px);left:var(--notice-carousel-dots-left);display:flex;flex-wrap:wrap;align-items:center;gap:8px 10px;max-width:calc(100% - var(--notice-carousel-dots-left) - 24px);margin:0;color:#ffffffb8;font-size:13px;line-height:1.4}.s-notice-carousel__tag{display:inline-flex;min-height:18px;align-items:center;padding:1px 7px;border-radius:6px;background:#fff4e6;color:#f28705;font-size:11px;font-weight:800;line-height:1.2}.s-notice-carousel__tag[data-notice-tone=notice]{background:#e8f1ff;color:#0b72ff}.s-notice-carousel__tag[data-notice-tone=announcement]{background:#fff7ed;color:#c2410c}.s-notice-carousel__tag[data-notice-tone=publicity]{background:#ecfeff;color:#0e7490}.s-notice-carousel__tag[data-notice-tone=focus]{background:#fef3c7;color:#b45309}.s-notice-carousel__tag[data-notice-tone=vision]{background:#ecfeff;color:#0e7490}.s-notice-carousel__tag[data-notice-tone=quality]{background:#ecfdf5;color:#047857}.s-notice-carousel__tag[data-notice-tone=confidentiality]{background:#f5f3ff;color:#6d28d9}.s-notice-carousel__tag[data-notice-tone=industry]{background:#eef2ff;color:#4338ca}.s-notice-carousel__tag[data-notice-tone=subsidiary]{background:#fdf2f8;color:#be185d}.s-notice-carousel__meta span+span:before{display:inline-block;width:4px;height:4px;margin-right:10px;border-radius:999px;background:#ffffff6b;content:\"\";vertical-align:2px}.s-notice-carousel__dots{position:absolute;bottom:var(--notice-carousel-dots-bottom);left:var(--notice-carousel-dots-left);z-index:3;display:inline-flex;gap:10px}.s-notice-carousel__dot{position:relative;width:22px;height:14px;padding:0;border:0;border-radius:999px;background:transparent;cursor:pointer;transition:width .18s ease,transform .18s ease}.s-notice-carousel__dot:before{position:absolute;inset:4px 0 5px;border-radius:inherit;background:#ffffff85;content:\"\";transition:background-color .18s ease}.s-notice-carousel__dot:hover,.s-notice-carousel__dot:focus-visible{transform:translateY(-1px)}.s-notice-carousel__dot:hover:before,.s-notice-carousel__dot:focus-visible:before{background:#ffffffd1}.s-notice-carousel__dot:focus-visible{outline:2px solid rgba(255,255,255,.9);outline-offset:3px}.s-notice-carousel__dot--active{width:28px}.s-notice-carousel__dot--active:before{background:#1683ff}.s-notice-carousel__action{position:absolute;right:var(--notice-carousel-action-right);bottom:var(--notice-carousel-action-bottom);z-index:2;display:inline-flex;height:36px;align-items:center;gap:4px;padding:0 14px;border:0;border-radius:8px;background:#0b72ff;color:#fff;cursor:pointer;font-size:14px;font-weight:800;white-space:nowrap}.s-notice-carousel--text-only{border:1px solid rgba(226,232,240,.82);background:#fff}.s-notice-carousel--text-only .s-notice-carousel__shade{display:none}.s-notice-carousel--text-only .s-notice-carousel__content{max-width:780px}.s-notice-carousel--text-only h1{color:#111827}.s-notice-carousel--text-only p{color:#334155}.s-notice-carousel--text-only .s-notice-carousel__meta{color:#64748b}.s-notice-carousel--text-only .s-notice-carousel__meta span+span:before,.s-notice-carousel--text-only .s-notice-carousel__dot:before{background:#cbd5e1}.s-notice-carousel--text-only .s-notice-carousel__dot:hover:before,.s-notice-carousel--text-only .s-notice-carousel__dot:focus-visible:before{background:#94a3b8}.s-notice-carousel--text-only .s-notice-carousel__dot:focus-visible{outline-color:#0b72ff59}.s-notice-carousel--text-only .s-notice-carousel__dot--active:before{background:#0b72ff}\n"] }]
|
|
6676
|
+
}], ctorParameters: () => [], propDecorators: { slides: [{ type: i0.Input, args: [{ isSignal: true, alias: "slides", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], actionText: [{ type: i0.Input, args: [{ isSignal: true, alias: "actionText", required: false }] }], intervalMs: [{ type: i0.Input, args: [{ isSignal: true, alias: "intervalMs", required: false }] }], detailSelected: [{ type: i0.Output, args: ["detailSelected"] }] } });
|
|
5634
6677
|
|
|
5635
6678
|
const DEFAULT_PAGE_SIZE_OPTIONS = [10, 20, 50, 100];
|
|
5636
6679
|
function coerceTotalItems(value) {
|
|
@@ -5787,6 +6830,864 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
|
|
|
5787
6830
|
args: [{ selector: 's-pagination', imports: [FormsModule, ReactiveFormsModule, BsSelect, LucideAngularModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"pagination-bar\" [class.pagination-bar--compact]=\"isCompact()\">\r\n <div class=\"pagination-controls\">\r\n <div class=\"pagination-total\">\u5171 {{ totalItems() }} \u6761</div>\r\n <button\r\n type=\"button\"\r\n class=\"pagination-nav-btn pagination-nav-btn--prev\"\r\n [class.pagination-nav-btn--compact]=\"isCompact()\"\r\n [disabled]=\"!canGoPrev()\"\r\n (click)=\"prevPage()\"\r\n aria-label=\"\u4E0A\u4E00\u9875\"\r\n >\r\n <lucide-icon [img]=\"prevIcon\" [size]=\"16\" [strokeWidth]=\"2\" aria-hidden=\"true\"></lucide-icon>\r\n </button>\r\n @for (page of pages(); track trackPage($index, page)) {\r\n @if (page === '...') {\r\n <span class=\"pagination-ellipsis\" [class.pagination-ellipsis--compact]=\"isCompact()\">...</span>\r\n } @else {\r\n <button\r\n type=\"button\"\r\n class=\"pagination-page-btn\"\r\n [class.pagination-page-btn--compact]=\"isCompact()\"\r\n [class.pagination-page-btn--active]=\"page === currentPage()\"\r\n [disabled]=\"disabled()\"\r\n (click)=\"goToPage(page)\"\r\n >\r\n {{ page }}\r\n </button>\r\n }\r\n }\r\n <button\r\n type=\"button\"\r\n class=\"pagination-nav-btn\"\r\n [class.pagination-nav-btn--compact]=\"isCompact()\"\r\n [disabled]=\"!canGoNext()\"\r\n (click)=\"nextPage()\"\r\n aria-label=\"\u4E0B\u4E00\u9875\"\r\n >\r\n <lucide-icon [img]=\"nextIcon\" [size]=\"16\" [strokeWidth]=\"2\" aria-hidden=\"true\"></lucide-icon>\r\n </button>\r\n @if (showSizeChanger()) {\r\n <div class=\"pagination-size\" [class.pagination-size--compact]=\"isCompact()\">\r\n <s-select\r\n class=\"pagination-size-select\"\r\n [options]=\"pageSizeSelectOptions()\"\r\n [formControl]=\"pageSizeControl\"\r\n placeholder=\"\u6761\u6570/\u9875\"\r\n ariaLabel=\"\u6BCF\u9875\u6761\u6570\"\r\n [matchTriggerWidth]=\"false\"\r\n />\r\n </div>\r\n }\r\n @if (showQuickJumper()) {\r\n <label class=\"pagination-jumper\" [class.pagination-jumper--compact]=\"isCompact()\">\r\n <span class=\"pagination-jumper__label\">\u8DF3\u81F3</span>\r\n <input\r\n type=\"number\"\r\n min=\"1\"\r\n class=\"pagination-jumper__input\"\r\n [formControl]=\"quickJumpControl\"\r\n (blur)=\"quickJump()\"\r\n (keydown.enter)=\"quickJump()\"\r\n />\r\n <span class=\"pagination-jumper__suffix\">\u9875</span>\r\n </label>\r\n }\r\n </div>\r\n</div>\r\n", styles: [":host{display:block;width:100%;max-width:100%;min-width:0}.pagination-bar{box-sizing:border-box;width:100%;max-width:100%;min-width:0}.pagination-controls{display:flex;align-items:center;justify-content:flex-end;gap:6px;flex-wrap:wrap;min-width:0}.pagination-total,.pagination-jumper__label,.pagination-jumper__suffix{color:var(--color-text-secondary);font-size:13px;line-height:22px}.pagination-nav-btn,.pagination-page-btn,.pagination-size-select,.pagination-jumper__input{box-sizing:border-box;height:30px;border-radius:6px;font-size:13px;line-height:20px;transition:border-color .16s ease,color .16s ease,background-color .16s ease,box-shadow .16s ease}.pagination-nav-btn,.pagination-page-btn{min-width:30px;padding:0 6px;border:1px solid transparent;background:transparent;color:var(--color-text-secondary);display:inline-flex;align-items:center;justify-content:center;cursor:pointer}.pagination-nav-btn{width:30px;padding-left:0;padding-right:0}.pagination-nav-btn lucide-icon{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0}.pagination-nav-btn:hover:not(:disabled),.pagination-page-btn:hover:not(:disabled),.pagination-size-select:hover:not(:disabled),.pagination-jumper__input:hover:not(:disabled){border-color:var(--color-border);background:var(--color-surface-soft);color:var(--color-text-primary)}.pagination-nav-btn:focus-visible,.pagination-page-btn:focus-visible,.pagination-jumper__input:focus-visible{border-color:var(--color-primary);outline:none;box-shadow:0 0 0 2px var(--color-primary-subtle)}.pagination-nav-btn:disabled,.pagination-page-btn:disabled,.pagination-size-select:disabled,.pagination-jumper__input:disabled{color:rgba(var(--color-text-secondary),.35);border-color:rgba(var(--color-border),.8);background:var(--color-surface-soft);cursor:not-allowed}.pagination-page-btn--active{border-color:var(--color-primary-subtle);background:var(--color-primary-subtle);color:var(--color-primary);font-weight:var(--font-weight-medium)}.pagination-page-btn--active:hover:not(:disabled){border-color:var(--color-primary-subtle);background:var(--color-primary-subtle);color:var(--color-primary)}.pagination-ellipsis{min-width:30px;height:30px;padding:0 6px;display:inline-flex;align-items:center;justify-content:center;color:var(--color-text-secondary);font-size:13px;line-height:22px}.pagination-size{display:inline-flex;align-items:center;margin-left:4px;height:30px}.pagination-size-select{display:inline-flex;align-items:center;vertical-align:middle;--bs-select-height: 30px;--bs-select-radius: 6px;--bs-select-padding-x: 9px;--bs-select-indicator-offset: 10px;--bs-select-font-size: 13px;--bs-select-line-height: 20px;--bs-select-trigger-width: 6.25rem;--bs-select-trigger-min-width: 6.25rem;--bs-select-popup-min-width: 7.25rem;--platform-control-border: var(--color-border);--platform-control-bg-hover: var(--color-surface);--platform-control-focus-ring: transparent}.pagination-size-select ::ng-deep .bs-select__trigger{align-items:center}.pagination-size-select ::ng-deep .bs-select__label{align-items:center}.pagination-jumper{display:inline-flex;align-items:center;gap:4px;margin-left:4px}.pagination-jumper__input{width:62px;padding:0 12px;border:1px solid transparent;background:var(--color-surface);color:var(--color-text-primary);outline:none}.pagination-jumper__input:focus{border-color:var(--color-primary)}.pagination-jumper__input::-webkit-outer-spin-button,.pagination-jumper__input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.pagination-jumper__input[type=number]{-moz-appearance:textfield}.pagination-bar--compact .pagination-controls{justify-content:flex-start;gap:12px}.pagination-nav-btn--compact,.pagination-page-btn--compact{min-width:auto;height:auto;padding:0;border:0;background:transparent}.pagination-nav-btn--compact{width:24px}.pagination-page-btn--compact{width:auto;padding:0 8px}.pagination-page-btn--compact.pagination-page-btn--active{min-width:30px;height:30px;padding:0 12px;border:1px solid var(--color-primary-subtle);border-radius:6px;background:var(--color-primary-subtle)}.pagination-ellipsis--compact{min-width:auto;height:auto}.pagination-size--compact,.pagination-jumper--compact{margin-left:0}@media(max-width:768px){.pagination-controls{justify-content:flex-start;gap:6px}.pagination-total{width:100%}.pagination-bar--compact .pagination-total{width:auto}}\n"] }]
|
|
5788
6831
|
}], ctorParameters: () => [], propDecorators: { currentPage: [{ type: i0.Input, args: [{ isSignal: true, alias: "currentPage", required: false }] }, { type: i0.Output, args: ["currentPageChange"] }], pageSizeOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "pageSizeOptions", required: false }] }], totalItems: [{ type: i0.Input, args: [{ isSignal: true, alias: "totalItems", required: false }] }], maxVisiblePages: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxVisiblePages", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], showSizeChanger: [{ type: i0.Input, args: [{ isSignal: true, alias: "showSizeChanger", required: false }] }], showQuickJumper: [{ type: i0.Input, args: [{ isSignal: true, alias: "showQuickJumper", required: false }] }], pageChange: [{ type: i0.Output, args: ["pageChange"] }], pageSizeChange: [{ type: i0.Output, args: ["pageSizeChange"] }] } });
|
|
5789
6832
|
|
|
6833
|
+
const S_RICH_EDITOR_PAGEBREAK_SEPARATOR = '<!-- pagebreak -->';
|
|
6834
|
+
const S_RICH_EDITOR_DOCUMENT_ZOOM_TOOLBAR = 'sRichEditorZoomOut sRichEditorZoomReset sRichEditorZoomIn';
|
|
6835
|
+
const S_RICH_EDITOR_DOCUMENT_PAGE_METRICS = {
|
|
6836
|
+
width: 794,
|
|
6837
|
+
height: 1123,
|
|
6838
|
+
gap: 32,
|
|
6839
|
+
padding: {
|
|
6840
|
+
top: 88,
|
|
6841
|
+
right: 80,
|
|
6842
|
+
bottom: 72,
|
|
6843
|
+
left: 80,
|
|
6844
|
+
},
|
|
6845
|
+
};
|
|
6846
|
+
const DOCUMENT_ZOOM_STEPS = [
|
|
6847
|
+
0.5, 0.67, 0.75, 0.85, 1, 1.1, 1.25, 1.5, 1.75, 2,
|
|
6848
|
+
];
|
|
6849
|
+
const DOCUMENT_ZOOM_EVENT = 'sRichEditorDocumentZoomChange';
|
|
6850
|
+
const PAGEBREAK_SELECTOR = 'img.mce-pagebreak';
|
|
6851
|
+
const PAGEBREAK_SPACER_CLASS = 's-rich-editor-document-pagebreak';
|
|
6852
|
+
const AUTO_PAGEBREAK_CLASS = 's-rich-editor-document-auto-pagebreak';
|
|
6853
|
+
const PAGEBREAK_EPSILON = 6;
|
|
6854
|
+
const CONTENT_PAGEBREAK_PATTERN = /(?:<!--\s*pagebreak\s*-->|<img[^>]*class=["'][^"']*\bmce-pagebreak\b[^"']*["'][^>]*>)/gi;
|
|
6855
|
+
function splitRichEditorDocumentPages(html) {
|
|
6856
|
+
const pages = html
|
|
6857
|
+
.split(CONTENT_PAGEBREAK_PATTERN)
|
|
6858
|
+
.map((page) => page.trim())
|
|
6859
|
+
.filter(Boolean);
|
|
6860
|
+
return pages.length ? pages : [''];
|
|
6861
|
+
}
|
|
6862
|
+
function setupRichEditorDocumentPagination(editor) {
|
|
6863
|
+
let animationFrame = 0;
|
|
6864
|
+
let resizeObserver = null;
|
|
6865
|
+
const cancelScheduledSync = () => {
|
|
6866
|
+
if (!animationFrame) {
|
|
6867
|
+
return;
|
|
6868
|
+
}
|
|
6869
|
+
const editorWindow = getEditorWindow(editor);
|
|
6870
|
+
editorWindow?.cancelAnimationFrame(animationFrame);
|
|
6871
|
+
animationFrame = 0;
|
|
6872
|
+
};
|
|
6873
|
+
const scheduleSync = () => {
|
|
6874
|
+
const editorWindow = getEditorWindow(editor);
|
|
6875
|
+
if (!editorWindow) {
|
|
6876
|
+
return;
|
|
6877
|
+
}
|
|
6878
|
+
cancelScheduledSync();
|
|
6879
|
+
animationFrame = editorWindow.requestAnimationFrame(() => {
|
|
6880
|
+
animationFrame = 0;
|
|
6881
|
+
syncRichEditorDocumentPageBreaks(editor);
|
|
6882
|
+
});
|
|
6883
|
+
};
|
|
6884
|
+
editor.on(`init SetContent LoadContent Change Input Undo Redo ExecCommand NodeChange ${DOCUMENT_ZOOM_EVENT}`, scheduleSync);
|
|
6885
|
+
editor.on('init', () => {
|
|
6886
|
+
const editorWindow = getEditorWindow(editor);
|
|
6887
|
+
const ResizeObserverCtor = editorWindow?.ResizeObserver;
|
|
6888
|
+
if (!editorWindow) {
|
|
6889
|
+
return;
|
|
6890
|
+
}
|
|
6891
|
+
editorWindow.addEventListener('resize', scheduleSync);
|
|
6892
|
+
if (ResizeObserverCtor) {
|
|
6893
|
+
const nextResizeObserver = new ResizeObserverCtor(scheduleSync);
|
|
6894
|
+
resizeObserver = nextResizeObserver;
|
|
6895
|
+
nextResizeObserver.observe(editor.getBody());
|
|
6896
|
+
}
|
|
6897
|
+
});
|
|
6898
|
+
editor.on('remove', () => {
|
|
6899
|
+
cancelScheduledSync();
|
|
6900
|
+
resizeObserver?.disconnect();
|
|
6901
|
+
getEditorWindow(editor)?.removeEventListener('resize', scheduleSync);
|
|
6902
|
+
});
|
|
6903
|
+
}
|
|
6904
|
+
function setupRichEditorDocumentZoom(editor) {
|
|
6905
|
+
let zoom = 1;
|
|
6906
|
+
let wheelTarget = null;
|
|
6907
|
+
const applyZoom = (nextZoom) => {
|
|
6908
|
+
zoom = normalizeDocumentZoom(nextZoom);
|
|
6909
|
+
setRichEditorDocumentZoom(editor, zoom);
|
|
6910
|
+
editor.dispatch(DOCUMENT_ZOOM_EVENT, { zoom });
|
|
6911
|
+
};
|
|
6912
|
+
const updateZoomByStep = (direction) => {
|
|
6913
|
+
applyZoom(readNextDocumentZoomStep(zoom, direction));
|
|
6914
|
+
};
|
|
6915
|
+
const onWheel = (event) => {
|
|
6916
|
+
if (!event.ctrlKey && !event.metaKey) {
|
|
6917
|
+
return;
|
|
6918
|
+
}
|
|
6919
|
+
event.preventDefault();
|
|
6920
|
+
updateZoomByStep(event.deltaY < 0 ? 1 : -1);
|
|
6921
|
+
};
|
|
6922
|
+
editor.ui.registry.addButton('sRichEditorZoomOut', {
|
|
6923
|
+
icon: 'zoom-out',
|
|
6924
|
+
tooltip: 'Zoom out',
|
|
6925
|
+
onAction: () => updateZoomByStep(-1),
|
|
6926
|
+
onSetup: (api) => {
|
|
6927
|
+
const updateState = () => {
|
|
6928
|
+
api.setEnabled(zoom > DOCUMENT_ZOOM_STEPS[0]);
|
|
6929
|
+
};
|
|
6930
|
+
editor.on(DOCUMENT_ZOOM_EVENT, updateState);
|
|
6931
|
+
updateState();
|
|
6932
|
+
return () => editor.off(DOCUMENT_ZOOM_EVENT, updateState);
|
|
6933
|
+
},
|
|
6934
|
+
});
|
|
6935
|
+
editor.ui.registry.addButton('sRichEditorZoomReset', {
|
|
6936
|
+
text: '100%',
|
|
6937
|
+
tooltip: 'Reset zoom',
|
|
6938
|
+
onAction: () => applyZoom(1),
|
|
6939
|
+
onSetup: (api) => {
|
|
6940
|
+
const updateState = () => {
|
|
6941
|
+
api.setText(`${Math.round(zoom * 100)}%`);
|
|
6942
|
+
};
|
|
6943
|
+
editor.on(DOCUMENT_ZOOM_EVENT, updateState);
|
|
6944
|
+
updateState();
|
|
6945
|
+
return () => editor.off(DOCUMENT_ZOOM_EVENT, updateState);
|
|
6946
|
+
},
|
|
6947
|
+
});
|
|
6948
|
+
editor.ui.registry.addButton('sRichEditorZoomIn', {
|
|
6949
|
+
icon: 'zoom-in',
|
|
6950
|
+
tooltip: 'Zoom in',
|
|
6951
|
+
onAction: () => updateZoomByStep(1),
|
|
6952
|
+
onSetup: (api) => {
|
|
6953
|
+
const updateState = () => {
|
|
6954
|
+
api.setEnabled(zoom < DOCUMENT_ZOOM_STEPS[DOCUMENT_ZOOM_STEPS.length - 1]);
|
|
6955
|
+
};
|
|
6956
|
+
editor.on(DOCUMENT_ZOOM_EVENT, updateState);
|
|
6957
|
+
updateState();
|
|
6958
|
+
return () => editor.off(DOCUMENT_ZOOM_EVENT, updateState);
|
|
6959
|
+
},
|
|
6960
|
+
});
|
|
6961
|
+
editor.on('init', () => {
|
|
6962
|
+
wheelTarget = editor.getBody();
|
|
6963
|
+
wheelTarget.addEventListener('wheel', onWheel, { passive: false });
|
|
6964
|
+
applyZoom(zoom);
|
|
6965
|
+
});
|
|
6966
|
+
editor.on('remove', () => {
|
|
6967
|
+
wheelTarget?.removeEventListener('wheel', onWheel);
|
|
6968
|
+
wheelTarget = null;
|
|
6969
|
+
});
|
|
6970
|
+
}
|
|
6971
|
+
function getEditorWindow(editor) {
|
|
6972
|
+
try {
|
|
6973
|
+
return editor.getWin();
|
|
6974
|
+
}
|
|
6975
|
+
catch {
|
|
6976
|
+
return null;
|
|
6977
|
+
}
|
|
6978
|
+
}
|
|
6979
|
+
function syncRichEditorDocumentPageBreaks(editor) {
|
|
6980
|
+
const body = editor.getBody();
|
|
6981
|
+
const zoom = readDocumentZoom(body);
|
|
6982
|
+
const metrics = scaleDocumentPageMetrics(readDocumentPageMetrics(body), zoom);
|
|
6983
|
+
removeAutoPageBreaks(body);
|
|
6984
|
+
syncManualPageBreaks(body, metrics, zoom);
|
|
6985
|
+
insertAutoPageBreaks(body, metrics, zoom);
|
|
6986
|
+
syncManualPageBreaks(body, metrics, zoom);
|
|
6987
|
+
}
|
|
6988
|
+
function syncManualPageBreaks(body, metrics, zoom) {
|
|
6989
|
+
const bodyRect = body.getBoundingClientRect();
|
|
6990
|
+
const pageBreaks = Array.from(body.querySelectorAll(PAGEBREAK_SELECTOR));
|
|
6991
|
+
const pageStride = metrics.height + metrics.gap;
|
|
6992
|
+
let pageStart = 0;
|
|
6993
|
+
for (const pageBreak of pageBreaks) {
|
|
6994
|
+
const spacer = resolvePageBreakSpacer(pageBreak);
|
|
6995
|
+
const top = spacer.getBoundingClientRect().top - bodyRect.top;
|
|
6996
|
+
const naturalPageStart = Math.floor(Math.max(top, 0) / pageStride) * pageStride;
|
|
6997
|
+
pageStart = Math.max(pageStart, naturalPageStart);
|
|
6998
|
+
const fillHeight = Math.max(0, pageStart + metrics.height - top);
|
|
6999
|
+
const pageBreakHeight = fillHeight + metrics.gap + metrics.padding.top;
|
|
7000
|
+
setPageBreakStyle(spacer, fillHeight, pageBreakHeight, zoom);
|
|
7001
|
+
pageStart += pageStride;
|
|
7002
|
+
}
|
|
7003
|
+
}
|
|
7004
|
+
function insertAutoPageBreaks(body, metrics, zoom) {
|
|
7005
|
+
const maxAutoPageBreaks = Math.max(1, body.children.length);
|
|
7006
|
+
for (let index = 0; index < maxAutoPageBreaks; index += 1) {
|
|
7007
|
+
const pageBreak = findAutoPageBreakTarget(body, metrics);
|
|
7008
|
+
if (!pageBreak) {
|
|
7009
|
+
return;
|
|
7010
|
+
}
|
|
7011
|
+
const spacer = createAutoPageBreak(body.ownerDocument);
|
|
7012
|
+
pageBreak.element.before(spacer);
|
|
7013
|
+
setPageBreakStyle(spacer, pageBreak.fillHeight, pageBreak.height, zoom);
|
|
7014
|
+
}
|
|
7015
|
+
}
|
|
7016
|
+
function findAutoPageBreakTarget(body, metrics) {
|
|
7017
|
+
const bodyRect = body.getBoundingClientRect();
|
|
7018
|
+
const pageStride = metrics.height + metrics.gap;
|
|
7019
|
+
let pageStart = 0;
|
|
7020
|
+
for (const childElement of Array.from(body.children)) {
|
|
7021
|
+
const child = childElement;
|
|
7022
|
+
const rect = child.getBoundingClientRect();
|
|
7023
|
+
const top = rect.top - bodyRect.top;
|
|
7024
|
+
const bottom = rect.bottom - bodyRect.top;
|
|
7025
|
+
if (child.classList.contains(PAGEBREAK_SPACER_CLASS)) {
|
|
7026
|
+
pageStart = Math.max(pageStart + pageStride, Math.floor(Math.max(bottom, 0) / pageStride) * pageStride);
|
|
7027
|
+
continue;
|
|
7028
|
+
}
|
|
7029
|
+
if (!isPaginationElement(child)) {
|
|
7030
|
+
continue;
|
|
7031
|
+
}
|
|
7032
|
+
while (top >= pageStart + pageStride + metrics.padding.top) {
|
|
7033
|
+
pageStart += pageStride;
|
|
7034
|
+
}
|
|
7035
|
+
const pageContentTop = pageStart + metrics.padding.top;
|
|
7036
|
+
const pageContentBottom = pageStart + metrics.height - metrics.padding.bottom;
|
|
7037
|
+
if (top > pageContentTop + PAGEBREAK_EPSILON &&
|
|
7038
|
+
bottom > pageContentBottom + PAGEBREAK_EPSILON) {
|
|
7039
|
+
const fillHeight = Math.max(0, pageStart + metrics.height - top);
|
|
7040
|
+
return {
|
|
7041
|
+
element: child,
|
|
7042
|
+
fillHeight,
|
|
7043
|
+
height: fillHeight + metrics.gap + metrics.padding.top,
|
|
7044
|
+
};
|
|
7045
|
+
}
|
|
7046
|
+
}
|
|
7047
|
+
return null;
|
|
7048
|
+
}
|
|
7049
|
+
function isPaginationElement(element) {
|
|
7050
|
+
if (element.classList.contains(AUTO_PAGEBREAK_CLASS)) {
|
|
7051
|
+
return false;
|
|
7052
|
+
}
|
|
7053
|
+
if (element.getAttribute('data-mce-bogus') === 'all') {
|
|
7054
|
+
return false;
|
|
7055
|
+
}
|
|
7056
|
+
return element.getBoundingClientRect().height > 0;
|
|
7057
|
+
}
|
|
7058
|
+
function createAutoPageBreak(document) {
|
|
7059
|
+
const spacer = document.createElement('div');
|
|
7060
|
+
spacer.classList.add(PAGEBREAK_SPACER_CLASS, AUTO_PAGEBREAK_CLASS);
|
|
7061
|
+
spacer.setAttribute('contenteditable', 'false');
|
|
7062
|
+
spacer.setAttribute('data-mce-contenteditable', 'false');
|
|
7063
|
+
spacer.setAttribute('data-mce-bogus', 'all');
|
|
7064
|
+
spacer.setAttribute('aria-hidden', 'true');
|
|
7065
|
+
return spacer;
|
|
7066
|
+
}
|
|
7067
|
+
function removeAutoPageBreaks(body) {
|
|
7068
|
+
for (const pageBreak of Array.from(body.querySelectorAll(`.${AUTO_PAGEBREAK_CLASS}`))) {
|
|
7069
|
+
pageBreak.remove();
|
|
7070
|
+
}
|
|
7071
|
+
}
|
|
7072
|
+
function resolvePageBreakSpacer(pageBreak) {
|
|
7073
|
+
const parent = pageBreak.parentElement;
|
|
7074
|
+
if (parent &&
|
|
7075
|
+
parent.children.length === 1 &&
|
|
7076
|
+
parent.textContent?.trim() === '') {
|
|
7077
|
+
preparePageBreakSpacer(parent, pageBreak);
|
|
7078
|
+
return parent;
|
|
7079
|
+
}
|
|
7080
|
+
preparePageBreakSpacer(pageBreak, pageBreak);
|
|
7081
|
+
return pageBreak;
|
|
7082
|
+
}
|
|
7083
|
+
function preparePageBreakSpacer(spacer, pageBreak) {
|
|
7084
|
+
spacer.classList.add(PAGEBREAK_SPACER_CLASS);
|
|
7085
|
+
spacer.setAttribute('contenteditable', 'false');
|
|
7086
|
+
spacer.setAttribute('data-mce-contenteditable', 'false');
|
|
7087
|
+
pageBreak.setAttribute('aria-hidden', 'true');
|
|
7088
|
+
}
|
|
7089
|
+
function setRichEditorDocumentZoom(editor, zoom) {
|
|
7090
|
+
const body = editor.getBody();
|
|
7091
|
+
const normalizedZoom = formatZoom(zoom);
|
|
7092
|
+
body.style.setProperty('--s-rich-editor-document-zoom', normalizedZoom);
|
|
7093
|
+
body.style.setProperty('zoom', normalizedZoom);
|
|
7094
|
+
}
|
|
7095
|
+
function readNextDocumentZoomStep(currentZoom, direction) {
|
|
7096
|
+
const normalizedZoom = normalizeDocumentZoom(currentZoom);
|
|
7097
|
+
if (direction > 0) {
|
|
7098
|
+
return (DOCUMENT_ZOOM_STEPS.find((step) => step > normalizedZoom + 0.001) ??
|
|
7099
|
+
DOCUMENT_ZOOM_STEPS[DOCUMENT_ZOOM_STEPS.length - 1]);
|
|
7100
|
+
}
|
|
7101
|
+
return ([...DOCUMENT_ZOOM_STEPS]
|
|
7102
|
+
.reverse()
|
|
7103
|
+
.find((step) => step < normalizedZoom - 0.001) ??
|
|
7104
|
+
DOCUMENT_ZOOM_STEPS[0]);
|
|
7105
|
+
}
|
|
7106
|
+
function normalizeDocumentZoom(zoom) {
|
|
7107
|
+
const minZoom = DOCUMENT_ZOOM_STEPS[0];
|
|
7108
|
+
const maxZoom = DOCUMENT_ZOOM_STEPS[DOCUMENT_ZOOM_STEPS.length - 1];
|
|
7109
|
+
const nextZoom = Number.isFinite(zoom) ? zoom : 1;
|
|
7110
|
+
return Math.max(minZoom, Math.min(maxZoom, Number(nextZoom.toFixed(2))));
|
|
7111
|
+
}
|
|
7112
|
+
function formatZoom(zoom) {
|
|
7113
|
+
return `${normalizeDocumentZoom(zoom)}`;
|
|
7114
|
+
}
|
|
7115
|
+
function scaleDocumentPageMetrics(metrics, zoom) {
|
|
7116
|
+
return {
|
|
7117
|
+
width: scaleCssPixel(metrics.width, zoom),
|
|
7118
|
+
height: scaleCssPixel(metrics.height, zoom),
|
|
7119
|
+
gap: scaleCssPixel(metrics.gap, zoom),
|
|
7120
|
+
padding: {
|
|
7121
|
+
top: scaleCssPixel(metrics.padding.top, zoom),
|
|
7122
|
+
right: scaleCssPixel(metrics.padding.right, zoom),
|
|
7123
|
+
bottom: scaleCssPixel(metrics.padding.bottom, zoom),
|
|
7124
|
+
left: scaleCssPixel(metrics.padding.left, zoom),
|
|
7125
|
+
},
|
|
7126
|
+
};
|
|
7127
|
+
}
|
|
7128
|
+
function scaleCssPixel(value, zoom) {
|
|
7129
|
+
return Number((value * zoom).toFixed(2));
|
|
7130
|
+
}
|
|
7131
|
+
function readDocumentZoom(body) {
|
|
7132
|
+
const styles = body.ownerDocument.defaultView?.getComputedStyle(body);
|
|
7133
|
+
if (!styles) {
|
|
7134
|
+
return 1;
|
|
7135
|
+
}
|
|
7136
|
+
const parsedZoom = Number.parseFloat(styles.getPropertyValue('--s-rich-editor-document-zoom'));
|
|
7137
|
+
return normalizeDocumentZoom(Number.isFinite(parsedZoom) ? parsedZoom : 1);
|
|
7138
|
+
}
|
|
7139
|
+
function readDocumentPageMetrics(body) {
|
|
7140
|
+
const styles = body.ownerDocument.defaultView?.getComputedStyle(body);
|
|
7141
|
+
const fallback = S_RICH_EDITOR_DOCUMENT_PAGE_METRICS;
|
|
7142
|
+
if (!styles) {
|
|
7143
|
+
return fallback;
|
|
7144
|
+
}
|
|
7145
|
+
return {
|
|
7146
|
+
width: readCssPixel(styles, '--s-rich-editor-document-page-width', fallback.width),
|
|
7147
|
+
height: readCssPixel(styles, '--s-rich-editor-document-page-height', fallback.height),
|
|
7148
|
+
gap: readCssPixel(styles, '--s-rich-editor-document-page-gap', fallback.gap),
|
|
7149
|
+
padding: {
|
|
7150
|
+
top: readCssPixel(styles, '--s-rich-editor-document-padding-top', fallback.padding.top),
|
|
7151
|
+
right: readCssPixel(styles, '--s-rich-editor-document-padding-right', fallback.padding.right),
|
|
7152
|
+
bottom: readCssPixel(styles, '--s-rich-editor-document-padding-bottom', fallback.padding.bottom),
|
|
7153
|
+
left: readCssPixel(styles, '--s-rich-editor-document-padding-left', fallback.padding.left),
|
|
7154
|
+
},
|
|
7155
|
+
};
|
|
7156
|
+
}
|
|
7157
|
+
function readCssPixel(styles, propertyName, fallback) {
|
|
7158
|
+
const parsedValue = Number.parseFloat(styles.getPropertyValue(propertyName));
|
|
7159
|
+
return Number.isFinite(parsedValue) ? parsedValue : fallback;
|
|
7160
|
+
}
|
|
7161
|
+
function setPageBreakStyle(pageBreak, fillHeight, pageBreakHeight, zoom) {
|
|
7162
|
+
const zoomFactor = zoom > 0 ? 1 / zoom : 1;
|
|
7163
|
+
pageBreak.style.setProperty('--s-rich-editor-pagebreak-fill', `${Math.round(fillHeight * zoomFactor)}px`);
|
|
7164
|
+
pageBreak.style.setProperty('--s-rich-editor-pagebreak-height', `${Math.round(pageBreakHeight * zoomFactor)}px`);
|
|
7165
|
+
}
|
|
7166
|
+
|
|
7167
|
+
const S_RICH_EDITOR_DEFAULT_MODEL_EVENTS = 'change input undo redo';
|
|
7168
|
+
const S_RICH_EDITOR_DEFAULT_CLOUD_CHANNEL = '8';
|
|
7169
|
+
const S_RICH_EDITOR_DEFAULT_OUTPUT_FORMAT = 'html';
|
|
7170
|
+
const S_RICH_EDITOR_DEFAULT_CONFIG = {
|
|
7171
|
+
apiKey: 'no-api-key',
|
|
7172
|
+
cloudChannel: S_RICH_EDITOR_DEFAULT_CLOUD_CHANNEL,
|
|
7173
|
+
licenseKey: 'gpl',
|
|
7174
|
+
modelEvents: S_RICH_EDITOR_DEFAULT_MODEL_EVENTS,
|
|
7175
|
+
outputFormat: S_RICH_EDITOR_DEFAULT_OUTPUT_FORMAT,
|
|
7176
|
+
};
|
|
7177
|
+
const S_RICH_EDITOR_CONFIG = new InjectionToken('S_RICH_EDITOR_CONFIG', {
|
|
7178
|
+
providedIn: 'root',
|
|
7179
|
+
factory: () => S_RICH_EDITOR_DEFAULT_CONFIG,
|
|
7180
|
+
});
|
|
7181
|
+
const S_RICH_EDITOR_CONTENT_STYLE = `
|
|
7182
|
+
body {
|
|
7183
|
+
color: #1f2937;
|
|
7184
|
+
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
|
|
7185
|
+
font-size: 14px;
|
|
7186
|
+
line-height: 1.65;
|
|
7187
|
+
margin: 16px;
|
|
7188
|
+
}
|
|
7189
|
+
a { color: #2563eb; }
|
|
7190
|
+
img { height: auto; max-width: 100%; }
|
|
7191
|
+
table { border-collapse: collapse; width: 100%; }
|
|
7192
|
+
td, th { border: 1px solid #d1d5db; padding: 6px 8px; }
|
|
7193
|
+
blockquote {
|
|
7194
|
+
border-left: 3px solid #d1d5db;
|
|
7195
|
+
color: #4b5563;
|
|
7196
|
+
margin: 12px 0;
|
|
7197
|
+
padding-left: 12px;
|
|
7198
|
+
}
|
|
7199
|
+
`;
|
|
7200
|
+
const S_RICH_EDITOR_DOCUMENT_BODY_CLASS = 's-rich-editor-document';
|
|
7201
|
+
const page = S_RICH_EDITOR_DOCUMENT_PAGE_METRICS;
|
|
7202
|
+
const S_RICH_EDITOR_DOCUMENT_CONTENT_STYLE = `
|
|
7203
|
+
html {
|
|
7204
|
+
min-height: 100%;
|
|
7205
|
+
background: #eef2f7;
|
|
7206
|
+
overflow: auto;
|
|
7207
|
+
}
|
|
7208
|
+
body.${S_RICH_EDITOR_DOCUMENT_BODY_CLASS} {
|
|
7209
|
+
--s-rich-editor-document-zoom: 1;
|
|
7210
|
+
--s-rich-editor-document-page-width: ${page.width}px;
|
|
7211
|
+
--s-rich-editor-document-page-height: ${page.height}px;
|
|
7212
|
+
--s-rich-editor-document-page-gap: ${page.gap}px;
|
|
7213
|
+
--s-rich-editor-document-padding-top: ${page.padding.top}px;
|
|
7214
|
+
--s-rich-editor-document-padding-right: ${page.padding.right}px;
|
|
7215
|
+
--s-rich-editor-document-padding-bottom: ${page.padding.bottom}px;
|
|
7216
|
+
--s-rich-editor-document-padding-left: ${page.padding.left}px;
|
|
7217
|
+
box-sizing: border-box;
|
|
7218
|
+
width: var(--s-rich-editor-document-page-width);
|
|
7219
|
+
min-height: var(--s-rich-editor-document-page-height);
|
|
7220
|
+
margin: 32px auto;
|
|
7221
|
+
padding:
|
|
7222
|
+
var(--s-rich-editor-document-padding-top)
|
|
7223
|
+
var(--s-rich-editor-document-padding-right)
|
|
7224
|
+
var(--s-rich-editor-document-padding-bottom)
|
|
7225
|
+
var(--s-rich-editor-document-padding-left);
|
|
7226
|
+
background: #ffffff;
|
|
7227
|
+
color: #111827;
|
|
7228
|
+
border: 1px solid #e5e7eb;
|
|
7229
|
+
box-shadow: 0 1px 0 rgb(15 23 42 / 6%), 0 22px 48px rgb(15 23 42 / 16%);
|
|
7230
|
+
font-family: "Times New Roman", "SimSun", serif;
|
|
7231
|
+
font-size: 14px;
|
|
7232
|
+
line-height: 1.7;
|
|
7233
|
+
zoom: var(--s-rich-editor-document-zoom);
|
|
7234
|
+
overflow-wrap: anywhere;
|
|
7235
|
+
}
|
|
7236
|
+
body.${S_RICH_EDITOR_DOCUMENT_BODY_CLASS} :where(h1, h2, h3, h4, h5, h6, p, ul, ol, blockquote, figure, table) {
|
|
7237
|
+
display: block;
|
|
7238
|
+
color: inherit;
|
|
7239
|
+
}
|
|
7240
|
+
body.${S_RICH_EDITOR_DOCUMENT_BODY_CLASS} :where(h1, h2, h3, h4, h5, h6) {
|
|
7241
|
+
margin: 0 0 12px;
|
|
7242
|
+
font-family: "Times New Roman", "SimSun", serif;
|
|
7243
|
+
font-weight: 700;
|
|
7244
|
+
line-height: 1.35;
|
|
7245
|
+
}
|
|
7246
|
+
body.${S_RICH_EDITOR_DOCUMENT_BODY_CLASS} h1 { font-size: 28px; }
|
|
7247
|
+
body.${S_RICH_EDITOR_DOCUMENT_BODY_CLASS} h2 { font-size: 22px; }
|
|
7248
|
+
body.${S_RICH_EDITOR_DOCUMENT_BODY_CLASS} h3 { font-size: 18px; }
|
|
7249
|
+
body.${S_RICH_EDITOR_DOCUMENT_BODY_CLASS} p {
|
|
7250
|
+
margin: 0 0 10px;
|
|
7251
|
+
font-size: inherit;
|
|
7252
|
+
line-height: inherit;
|
|
7253
|
+
}
|
|
7254
|
+
body.${S_RICH_EDITOR_DOCUMENT_BODY_CLASS} :where(ul, ol) {
|
|
7255
|
+
margin: 0 0 12px;
|
|
7256
|
+
padding-left: 24px;
|
|
7257
|
+
}
|
|
7258
|
+
body.${S_RICH_EDITOR_DOCUMENT_BODY_CLASS} li {
|
|
7259
|
+
margin: 0 0 6px;
|
|
7260
|
+
}
|
|
7261
|
+
body.${S_RICH_EDITOR_DOCUMENT_BODY_CLASS} blockquote {
|
|
7262
|
+
margin: 14px 0;
|
|
7263
|
+
padding: 8px 14px;
|
|
7264
|
+
border-left: 3px solid #9ca3af;
|
|
7265
|
+
color: #374151;
|
|
7266
|
+
background: #f9fafb;
|
|
7267
|
+
}
|
|
7268
|
+
body.${S_RICH_EDITOR_DOCUMENT_BODY_CLASS} table {
|
|
7269
|
+
width: 100%;
|
|
7270
|
+
margin: 12px 0;
|
|
7271
|
+
border-collapse: collapse;
|
|
7272
|
+
}
|
|
7273
|
+
body.${S_RICH_EDITOR_DOCUMENT_BODY_CLASS} :where(th, td) {
|
|
7274
|
+
padding: 6px 8px;
|
|
7275
|
+
border: 1px solid #d1d5db;
|
|
7276
|
+
vertical-align: top;
|
|
7277
|
+
}
|
|
7278
|
+
body.${S_RICH_EDITOR_DOCUMENT_BODY_CLASS} img {
|
|
7279
|
+
max-width: 100%;
|
|
7280
|
+
height: auto;
|
|
7281
|
+
}
|
|
7282
|
+
body.${S_RICH_EDITOR_DOCUMENT_BODY_CLASS} > :first-child {
|
|
7283
|
+
margin-top: 0;
|
|
7284
|
+
}
|
|
7285
|
+
body.${S_RICH_EDITOR_DOCUMENT_BODY_CLASS} > :last-child {
|
|
7286
|
+
margin-bottom: 0;
|
|
7287
|
+
}
|
|
7288
|
+
body.${S_RICH_EDITOR_DOCUMENT_BODY_CLASS} .s-rich-editor-document-pagebreak {
|
|
7289
|
+
box-sizing: border-box;
|
|
7290
|
+
display: block;
|
|
7291
|
+
position: relative;
|
|
7292
|
+
width: calc(
|
|
7293
|
+
100% + var(--s-rich-editor-document-padding-left) +
|
|
7294
|
+
var(--s-rich-editor-document-padding-right)
|
|
7295
|
+
);
|
|
7296
|
+
max-width: none !important;
|
|
7297
|
+
height: var(
|
|
7298
|
+
--s-rich-editor-pagebreak-height,
|
|
7299
|
+
calc(
|
|
7300
|
+
var(--s-rich-editor-document-padding-bottom) +
|
|
7301
|
+
var(--s-rich-editor-document-page-gap) +
|
|
7302
|
+
var(--s-rich-editor-document-padding-top)
|
|
7303
|
+
)
|
|
7304
|
+
) !important;
|
|
7305
|
+
min-height: calc(
|
|
7306
|
+
var(--s-rich-editor-document-padding-bottom) +
|
|
7307
|
+
var(--s-rich-editor-document-page-gap) +
|
|
7308
|
+
var(--s-rich-editor-document-padding-top)
|
|
7309
|
+
);
|
|
7310
|
+
margin:
|
|
7311
|
+
0 calc(var(--s-rich-editor-document-padding-right) * -1) 0
|
|
7312
|
+
calc(var(--s-rich-editor-document-padding-left) * -1);
|
|
7313
|
+
padding: 0;
|
|
7314
|
+
border: 0;
|
|
7315
|
+
background:
|
|
7316
|
+
linear-gradient(
|
|
7317
|
+
to bottom,
|
|
7318
|
+
#ffffff 0,
|
|
7319
|
+
#ffffff var(--s-rich-editor-pagebreak-fill, 0px),
|
|
7320
|
+
#d7dee8 var(--s-rich-editor-pagebreak-fill, 0px),
|
|
7321
|
+
#d7dee8 calc(var(--s-rich-editor-pagebreak-fill, 0px) + 1px),
|
|
7322
|
+
#eef2f7 calc(var(--s-rich-editor-pagebreak-fill, 0px) + 1px),
|
|
7323
|
+
#eef2f7
|
|
7324
|
+
calc(
|
|
7325
|
+
var(--s-rich-editor-pagebreak-fill, 0px) +
|
|
7326
|
+
var(--s-rich-editor-document-page-gap)
|
|
7327
|
+
),
|
|
7328
|
+
#d7dee8
|
|
7329
|
+
calc(
|
|
7330
|
+
var(--s-rich-editor-pagebreak-fill, 0px) +
|
|
7331
|
+
var(--s-rich-editor-document-page-gap)
|
|
7332
|
+
),
|
|
7333
|
+
#d7dee8
|
|
7334
|
+
calc(
|
|
7335
|
+
var(--s-rich-editor-pagebreak-fill, 0px) +
|
|
7336
|
+
var(--s-rich-editor-document-page-gap) + 1px
|
|
7337
|
+
),
|
|
7338
|
+
#ffffff
|
|
7339
|
+
calc(
|
|
7340
|
+
var(--s-rich-editor-pagebreak-fill, 0px) +
|
|
7341
|
+
var(--s-rich-editor-document-page-gap) + 1px
|
|
7342
|
+
),
|
|
7343
|
+
#ffffff 100%
|
|
7344
|
+
);
|
|
7345
|
+
cursor: default;
|
|
7346
|
+
line-height: 0;
|
|
7347
|
+
user-select: none;
|
|
7348
|
+
}
|
|
7349
|
+
body.${S_RICH_EDITOR_DOCUMENT_BODY_CLASS} .s-rich-editor-document-pagebreak > img.mce-pagebreak,
|
|
7350
|
+
body.${S_RICH_EDITOR_DOCUMENT_BODY_CLASS} img.s-rich-editor-document-pagebreak {
|
|
7351
|
+
box-sizing: border-box;
|
|
7352
|
+
display: block;
|
|
7353
|
+
position: absolute;
|
|
7354
|
+
top: calc(var(--s-rich-editor-pagebreak-fill, 0px) + 1px);
|
|
7355
|
+
left: var(--s-rich-editor-document-padding-left);
|
|
7356
|
+
width: 1px !important;
|
|
7357
|
+
max-width: 1px !important;
|
|
7358
|
+
height: 1px !important;
|
|
7359
|
+
min-height: 0;
|
|
7360
|
+
margin: 0 !important;
|
|
7361
|
+
padding: 0;
|
|
7362
|
+
border: 0;
|
|
7363
|
+
opacity: 0;
|
|
7364
|
+
pointer-events: none;
|
|
7365
|
+
vertical-align: middle;
|
|
7366
|
+
}
|
|
7367
|
+
body.${S_RICH_EDITOR_DOCUMENT_BODY_CLASS}.mce-content-body[data-mce-placeholder]:not(.mce-visualblocks)::before {
|
|
7368
|
+
left: var(--s-rich-editor-document-padding-left);
|
|
7369
|
+
top: var(--s-rich-editor-document-padding-top);
|
|
7370
|
+
color: #9ca3af;
|
|
7371
|
+
}
|
|
7372
|
+
`;
|
|
7373
|
+
const S_RICH_EDITOR_BASE_INIT = {
|
|
7374
|
+
branding: false,
|
|
7375
|
+
browser_spellcheck: true,
|
|
7376
|
+
contextmenu: 'link image table',
|
|
7377
|
+
convert_urls: false,
|
|
7378
|
+
content_style: S_RICH_EDITOR_CONTENT_STYLE,
|
|
7379
|
+
entity_encoding: 'raw',
|
|
7380
|
+
menubar: false,
|
|
7381
|
+
promotion: false,
|
|
7382
|
+
statusbar: true,
|
|
7383
|
+
toolbar_mode: 'sliding',
|
|
7384
|
+
};
|
|
7385
|
+
const S_RICH_EDITOR_PRESET_CONFIGS = {
|
|
7386
|
+
basic: {
|
|
7387
|
+
height: 280,
|
|
7388
|
+
plugins: 'autolink link lists autoresize wordcount',
|
|
7389
|
+
toolbar: 'undo redo | bold italic underline | bullist numlist | link removeformat',
|
|
7390
|
+
},
|
|
7391
|
+
email: {
|
|
7392
|
+
autoresize_bottom_margin: 16,
|
|
7393
|
+
height: 320,
|
|
7394
|
+
min_height: 220,
|
|
7395
|
+
paste_data_images: true,
|
|
7396
|
+
plugins: 'autolink autoresize image link lists table quickbars wordcount',
|
|
7397
|
+
toolbar: 'undo redo | bold italic underline forecolor | bullist numlist | link image table | removeformat',
|
|
7398
|
+
},
|
|
7399
|
+
news: {
|
|
7400
|
+
block_formats: 'Paragraph=p; Heading 2=h2; Heading 3=h3; Heading 4=h4; Quote=blockquote',
|
|
7401
|
+
height: 480,
|
|
7402
|
+
min_height: 360,
|
|
7403
|
+
paste_data_images: true,
|
|
7404
|
+
plugins: 'autolink charmap code image link lists media pagebreak preview quickbars searchreplace table wordcount',
|
|
7405
|
+
toolbar: [
|
|
7406
|
+
'undo redo | blocks fontfamily fontsize | bold italic underline forecolor backcolor',
|
|
7407
|
+
'alignleft aligncenter alignright alignjustify | bullist numlist outdent indent',
|
|
7408
|
+
'link image media table pagebreak | removeformat code preview',
|
|
7409
|
+
],
|
|
7410
|
+
},
|
|
7411
|
+
full: {
|
|
7412
|
+
block_formats: 'Paragraph=p; Heading 1=h1; Heading 2=h2; Heading 3=h3; Heading 4=h4; Preformatted=pre',
|
|
7413
|
+
height: 560,
|
|
7414
|
+
min_height: 420,
|
|
7415
|
+
paste_data_images: true,
|
|
7416
|
+
plugins: 'advlist anchor autolink charmap code codesample fullscreen image insertdatetime link lists media nonbreaking pagebreak preview quickbars searchreplace table visualblocks visualchars wordcount',
|
|
7417
|
+
toolbar: [
|
|
7418
|
+
'undo redo | blocks fontfamily fontsize | bold italic underline strikethrough forecolor backcolor',
|
|
7419
|
+
'alignleft aligncenter alignright alignjustify | bullist numlist outdent indent',
|
|
7420
|
+
'link image media table pagebreak codesample charmap | visualblocks fullscreen preview code removeformat',
|
|
7421
|
+
],
|
|
7422
|
+
},
|
|
7423
|
+
};
|
|
7424
|
+
function getRichEditorPresetInit(preset) {
|
|
7425
|
+
return S_RICH_EDITOR_PRESET_CONFIGS[preset];
|
|
7426
|
+
}
|
|
7427
|
+
function mergeRichEditorInit(...initList) {
|
|
7428
|
+
return Object.assign({}, ...initList.filter(isRichEditorInit));
|
|
7429
|
+
}
|
|
7430
|
+
function collectRichEditorSetup(...initList) {
|
|
7431
|
+
return initList
|
|
7432
|
+
.map((init) => init?.setup)
|
|
7433
|
+
.filter((setup) => Boolean(setup));
|
|
7434
|
+
}
|
|
7435
|
+
function isRichEditorInit(init) {
|
|
7436
|
+
return Boolean(init);
|
|
7437
|
+
}
|
|
7438
|
+
|
|
7439
|
+
const S_RICH_EDITOR_UPLOAD_ADAPTER = new InjectionToken('S_RICH_EDITOR_UPLOAD_ADAPTER');
|
|
7440
|
+
function provideSRichEditorUploadAdapter(adapter) {
|
|
7441
|
+
return {
|
|
7442
|
+
provide: S_RICH_EDITOR_UPLOAD_ADAPTER,
|
|
7443
|
+
useValue: adapter,
|
|
7444
|
+
};
|
|
7445
|
+
}
|
|
7446
|
+
|
|
7447
|
+
let richEditorId = 0;
|
|
7448
|
+
class SRichEditorComponent {
|
|
7449
|
+
globalConfig = inject(S_RICH_EDITOR_CONFIG);
|
|
7450
|
+
injectedUploadAdapter = inject(S_RICH_EDITOR_UPLOAD_ADAPTER, {
|
|
7451
|
+
optional: true,
|
|
7452
|
+
});
|
|
7453
|
+
platformId = inject(PLATFORM_ID);
|
|
7454
|
+
editorId = input(`s-rich-editor-${++richEditorId}`, { ...(ngDevMode ? { debugName: "editorId" } : /* istanbul ignore next */ {}), alias: 'id' });
|
|
7455
|
+
preset = input('news', ...(ngDevMode ? [{ debugName: "preset" }] : /* istanbul ignore next */ []));
|
|
7456
|
+
layout = input('compact', ...(ngDevMode ? [{ debugName: "layout" }] : /* istanbul ignore next */ []));
|
|
7457
|
+
init = input({}, ...(ngDevMode ? [{ debugName: "init" }] : /* istanbul ignore next */ []));
|
|
7458
|
+
apiKey = input(null, ...(ngDevMode ? [{ debugName: "apiKey" }] : /* istanbul ignore next */ []));
|
|
7459
|
+
cloudChannel = input(null, ...(ngDevMode ? [{ debugName: "cloudChannel" }] : /* istanbul ignore next */ []));
|
|
7460
|
+
licenseKey = input(null, ...(ngDevMode ? [{ debugName: "licenseKey" }] : /* istanbul ignore next */ []));
|
|
7461
|
+
outputFormat = input(null, ...(ngDevMode ? [{ debugName: "outputFormat" }] : /* istanbul ignore next */ []));
|
|
7462
|
+
modelEvents = input(null, ...(ngDevMode ? [{ debugName: "modelEvents" }] : /* istanbul ignore next */ []));
|
|
7463
|
+
placeholder = input('Start writing...', ...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
|
|
7464
|
+
ariaLabel = input('Rich text editor', ...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
|
|
7465
|
+
height = input(null, ...(ngDevMode ? [{ debugName: "height" }] : /* istanbul ignore next */ []));
|
|
7466
|
+
minHeight = input(null, ...(ngDevMode ? [{ debugName: "minHeight" }] : /* istanbul ignore next */ []));
|
|
7467
|
+
maxHeight = input(null, ...(ngDevMode ? [{ debugName: "maxHeight" }] : /* istanbul ignore next */ []));
|
|
7468
|
+
disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
7469
|
+
editorReadonly = input(false, { ...(ngDevMode ? { debugName: "editorReadonly" } : /* istanbul ignore next */ {}), alias: 'readonly',
|
|
7470
|
+
transform: booleanAttribute });
|
|
7471
|
+
uploadAdapter = input(null, ...(ngDevMode ? [{ debugName: "uploadAdapter" }] : /* istanbul ignore next */ []));
|
|
7472
|
+
editorReady = output();
|
|
7473
|
+
editorBlur = output();
|
|
7474
|
+
valueChange = output();
|
|
7475
|
+
value = signal('', ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
7476
|
+
disabledFromCva = signal(false, ...(ngDevMode ? [{ debugName: "disabledFromCva" }] : /* istanbul ignore next */ []));
|
|
7477
|
+
isBrowser = isPlatformBrowser(this.platformId);
|
|
7478
|
+
isDisabled = computed(() => this.disabled() || this.disabledFromCva(), ...(ngDevMode ? [{ debugName: "isDisabled" }] : /* istanbul ignore next */ []));
|
|
7479
|
+
effectiveApiKey = computed(() => this.apiKey() ?? this.globalConfig.apiKey ?? 'no-api-key', ...(ngDevMode ? [{ debugName: "effectiveApiKey" }] : /* istanbul ignore next */ []));
|
|
7480
|
+
effectiveCloudChannel = computed(() => this.cloudChannel() ?? this.globalConfig.cloudChannel ?? '8', ...(ngDevMode ? [{ debugName: "effectiveCloudChannel" }] : /* istanbul ignore next */ []));
|
|
7481
|
+
effectiveLicenseKey = computed(() => this.licenseKey() ?? this.globalConfig.licenseKey ?? 'gpl', ...(ngDevMode ? [{ debugName: "effectiveLicenseKey" }] : /* istanbul ignore next */ []));
|
|
7482
|
+
effectiveOutputFormat = computed(() => this.outputFormat() ?? this.globalConfig.outputFormat ?? 'html', ...(ngDevMode ? [{ debugName: "effectiveOutputFormat" }] : /* istanbul ignore next */ []));
|
|
7483
|
+
effectiveModelEvents = computed(() => this.modelEvents() ??
|
|
7484
|
+
this.globalConfig.modelEvents ??
|
|
7485
|
+
'change input undo redo', ...(ngDevMode ? [{ debugName: "effectiveModelEvents" }] : /* istanbul ignore next */ []));
|
|
7486
|
+
editorInit = computed(() => this.createEditorInit(), ...(ngDevMode ? [{ debugName: "editorInit" }] : /* istanbul ignore next */ []));
|
|
7487
|
+
currentEditor = null;
|
|
7488
|
+
onChange = () => { };
|
|
7489
|
+
onTouched = () => { };
|
|
7490
|
+
writeValue(value) {
|
|
7491
|
+
this.value.set(value ?? '');
|
|
7492
|
+
}
|
|
7493
|
+
registerOnChange(fn) {
|
|
7494
|
+
this.onChange = fn;
|
|
7495
|
+
}
|
|
7496
|
+
registerOnTouched(fn) {
|
|
7497
|
+
this.onTouched = fn;
|
|
7498
|
+
}
|
|
7499
|
+
setDisabledState(isDisabled) {
|
|
7500
|
+
this.disabledFromCva.set(isDisabled);
|
|
7501
|
+
}
|
|
7502
|
+
focus() {
|
|
7503
|
+
this.currentEditor?.focus();
|
|
7504
|
+
}
|
|
7505
|
+
getContent() {
|
|
7506
|
+
return this.currentEditor?.getContent() ?? this.value();
|
|
7507
|
+
}
|
|
7508
|
+
setContent(value) {
|
|
7509
|
+
this.value.set(value);
|
|
7510
|
+
this.currentEditor?.setContent(value);
|
|
7511
|
+
this.emitValue(value);
|
|
7512
|
+
}
|
|
7513
|
+
onEditorModelChange(value) {
|
|
7514
|
+
const nextValue = value ?? '';
|
|
7515
|
+
if (nextValue === this.value()) {
|
|
7516
|
+
return;
|
|
7517
|
+
}
|
|
7518
|
+
this.value.set(nextValue);
|
|
7519
|
+
this.emitValue(nextValue);
|
|
7520
|
+
}
|
|
7521
|
+
onEditorInit(event) {
|
|
7522
|
+
this.currentEditor = event.editor;
|
|
7523
|
+
this.editorReady.emit(event);
|
|
7524
|
+
}
|
|
7525
|
+
onEditorBlur(event) {
|
|
7526
|
+
this.onTouched();
|
|
7527
|
+
this.editorBlur.emit({
|
|
7528
|
+
event: event.event,
|
|
7529
|
+
editor: event.editor,
|
|
7530
|
+
value: this.value(),
|
|
7531
|
+
});
|
|
7532
|
+
}
|
|
7533
|
+
createEditorInit() {
|
|
7534
|
+
const presetInit = getRichEditorPresetInit(this.preset());
|
|
7535
|
+
const globalInit = this.globalConfig.init ?? {};
|
|
7536
|
+
const inputInit = this.init();
|
|
7537
|
+
const editorInit = mergeRichEditorInit(S_RICH_EDITOR_BASE_INIT, presetInit, globalInit, inputInit);
|
|
7538
|
+
const setupCallbacks = collectRichEditorSetup(S_RICH_EDITOR_BASE_INIT, presetInit, globalInit, inputInit);
|
|
7539
|
+
const uploadAdapter = this.resolveUploadAdapter();
|
|
7540
|
+
editorInit.placeholder = this.placeholder();
|
|
7541
|
+
editorInit.iframe_aria_text = this.ariaLabel();
|
|
7542
|
+
if (this.layout() === 'document') {
|
|
7543
|
+
editorInit.body_class = appendClassName(editorInit.body_class, S_RICH_EDITOR_DOCUMENT_BODY_CLASS);
|
|
7544
|
+
editorInit.content_style = appendContentStyle(editorInit.content_style, S_RICH_EDITOR_DOCUMENT_CONTENT_STYLE);
|
|
7545
|
+
editorInit.plugins = appendTinyMcePlugin(editorInit.plugins, 'pagebreak');
|
|
7546
|
+
editorInit.toolbar = appendTinyMceToolbarGroup(editorInit.toolbar, S_RICH_EDITOR_DOCUMENT_ZOOM_TOOLBAR);
|
|
7547
|
+
editorInit['pagebreak_separator'] = S_RICH_EDITOR_PAGEBREAK_SEPARATOR;
|
|
7548
|
+
editorInit['pagebreak_split_block'] = true;
|
|
7549
|
+
editorInit.statusbar = false;
|
|
7550
|
+
setupCallbacks.push(setupRichEditorDocumentZoom);
|
|
7551
|
+
setupCallbacks.push(setupRichEditorDocumentPagination);
|
|
7552
|
+
}
|
|
7553
|
+
const height = this.height();
|
|
7554
|
+
if (height !== null) {
|
|
7555
|
+
editorInit.height = height;
|
|
7556
|
+
}
|
|
7557
|
+
const minHeight = this.minHeight();
|
|
7558
|
+
if (minHeight !== null) {
|
|
7559
|
+
editorInit.min_height = minHeight;
|
|
7560
|
+
}
|
|
7561
|
+
const maxHeight = this.maxHeight();
|
|
7562
|
+
if (maxHeight !== null) {
|
|
7563
|
+
editorInit.max_height = maxHeight;
|
|
7564
|
+
}
|
|
7565
|
+
if (setupCallbacks.length) {
|
|
7566
|
+
editorInit.setup = (editor) => {
|
|
7567
|
+
for (const setup of setupCallbacks) {
|
|
7568
|
+
setup(editor);
|
|
7569
|
+
}
|
|
7570
|
+
};
|
|
7571
|
+
}
|
|
7572
|
+
if (uploadAdapter && !editorInit.images_upload_handler) {
|
|
7573
|
+
editorInit.automatic_uploads = true;
|
|
7574
|
+
editorInit.images_upload_handler = (blobInfo, progress) => this.uploadImage(blobInfo, progress, uploadAdapter);
|
|
7575
|
+
}
|
|
7576
|
+
return editorInit;
|
|
7577
|
+
}
|
|
7578
|
+
resolveUploadAdapter() {
|
|
7579
|
+
return (this.uploadAdapter() ??
|
|
7580
|
+
this.injectedUploadAdapter ??
|
|
7581
|
+
this.globalConfig.uploadAdapter ??
|
|
7582
|
+
null);
|
|
7583
|
+
}
|
|
7584
|
+
async uploadImage(blobInfo, progress, uploadAdapter) {
|
|
7585
|
+
const response = await uploadAdapter.uploadImage({
|
|
7586
|
+
editor: this.currentEditor,
|
|
7587
|
+
blobInfo,
|
|
7588
|
+
file: blobInfo.blob(),
|
|
7589
|
+
filename: blobInfo.filename(),
|
|
7590
|
+
progress,
|
|
7591
|
+
});
|
|
7592
|
+
return typeof response === 'string' ? response : response.url;
|
|
7593
|
+
}
|
|
7594
|
+
emitValue(value) {
|
|
7595
|
+
this.onChange(value);
|
|
7596
|
+
this.valueChange.emit(value);
|
|
7597
|
+
}
|
|
7598
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: SRichEditorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
7599
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: SRichEditorComponent, isStandalone: true, selector: "s-rich-editor", inputs: { editorId: { classPropertyName: "editorId", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, preset: { classPropertyName: "preset", publicName: "preset", isSignal: true, isRequired: false, transformFunction: null }, layout: { classPropertyName: "layout", publicName: "layout", isSignal: true, isRequired: false, transformFunction: null }, init: { classPropertyName: "init", publicName: "init", isSignal: true, isRequired: false, transformFunction: null }, apiKey: { classPropertyName: "apiKey", publicName: "apiKey", isSignal: true, isRequired: false, transformFunction: null }, cloudChannel: { classPropertyName: "cloudChannel", publicName: "cloudChannel", isSignal: true, isRequired: false, transformFunction: null }, licenseKey: { classPropertyName: "licenseKey", publicName: "licenseKey", isSignal: true, isRequired: false, transformFunction: null }, outputFormat: { classPropertyName: "outputFormat", publicName: "outputFormat", isSignal: true, isRequired: false, transformFunction: null }, modelEvents: { classPropertyName: "modelEvents", publicName: "modelEvents", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, height: { classPropertyName: "height", publicName: "height", isSignal: true, isRequired: false, transformFunction: null }, minHeight: { classPropertyName: "minHeight", publicName: "minHeight", isSignal: true, isRequired: false, transformFunction: null }, maxHeight: { classPropertyName: "maxHeight", publicName: "maxHeight", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, editorReadonly: { classPropertyName: "editorReadonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, uploadAdapter: { classPropertyName: "uploadAdapter", publicName: "uploadAdapter", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { editorReady: "editorReady", editorBlur: "editorBlur", valueChange: "valueChange" }, host: { properties: { "class.s-rich-editor-host--disabled": "isDisabled()", "class.s-rich-editor-host--document": "layout() === \"document\"", "class.s-rich-editor-host--readonly": "editorReadonly()" } }, providers: [
|
|
7600
|
+
{
|
|
7601
|
+
provide: NG_VALUE_ACCESSOR,
|
|
7602
|
+
useExisting: forwardRef(() => SRichEditorComponent),
|
|
7603
|
+
multi: true,
|
|
7604
|
+
},
|
|
7605
|
+
], ngImport: i0, template: "<div\n class=\"s-rich-editor\"\n [class.s-rich-editor--disabled]=\"isDisabled()\"\n [class.s-rich-editor--readonly]=\"editorReadonly()\"\n>\n @if (isBrowser) {\n <editor\n class=\"s-rich-editor__editor\"\n [id]=\"editorId()\"\n [apiKey]=\"effectiveApiKey()\"\n [cloudChannel]=\"effectiveCloudChannel()\"\n [licenseKey]=\"effectiveLicenseKey()\"\n [init]=\"editorInit()\"\n [outputFormat]=\"effectiveOutputFormat()\"\n [modelEvents]=\"effectiveModelEvents()\"\n [disabled]=\"isDisabled()\"\n [readonly]=\"editorReadonly()\"\n [ngModel]=\"value()\"\n (ngModelChange)=\"onEditorModelChange($event)\"\n (onInit)=\"onEditorInit($event)\"\n (onBlur)=\"onEditorBlur($event)\"\n ></editor>\n } @else {\n <textarea\n class=\"s-rich-editor__fallback\"\n [attr.aria-label]=\"ariaLabel()\"\n [value]=\"value()\"\n readonly\n ></textarea>\n }\n</div>\n", styles: [":host{display:block;width:100%;--s-rich-editor-border: var(--platform-control-border, var(--color-border));--s-rich-editor-radius: var( --platform-control-radius, var(--radius-common-m) );--s-rich-editor-focus: var(--platform-control-focus, var(--color-primary));--s-rich-editor-focus-ring: var( --platform-control-focus-ring, var(--color-primary-subtle) );--s-rich-editor-surface: var(--platform-control-bg, var(--color-surface));--s-rich-editor-surface-soft: var( --platform-control-bg-hover, var(--color-surface-soft) );--s-rich-editor-text: var( --platform-control-color, var(--color-text-primary) );--s-rich-editor-muted: var( --platform-control-placeholder, var(--color-text-placeholder) )}.s-rich-editor{display:block;min-width:0;color:var(--s-rich-editor-text)}.s-rich-editor--disabled{opacity:.68}.s-rich-editor__editor{display:block;min-width:0}.s-rich-editor__fallback{box-sizing:border-box;display:block;width:100%;min-height:16rem;padding:var(--space-3);color:var(--s-rich-editor-text);background:var(--s-rich-editor-surface);border:1px solid var(--s-rich-editor-border);border-radius:var(--s-rich-editor-radius);font:inherit;line-height:1.6;resize:vertical}:host ::ng-deep .s-rich-editor .tox.tox-tinymce{border:1px solid var(--s-rich-editor-border);border-radius:var(--s-rich-editor-radius);box-shadow:none;transition:border-color .15s ease,box-shadow .15s ease}:host ::ng-deep .s-rich-editor .tox.tox-tinymce:focus-within{border-color:var(--s-rich-editor-focus);box-shadow:0 0 0 2px var(--s-rich-editor-focus-ring)}:host ::ng-deep .s-rich-editor .tox .tox-editor-header{background:var(--s-rich-editor-surface);border-bottom:1px solid var(--s-rich-editor-border);box-shadow:none}:host ::ng-deep .s-rich-editor .tox .tox-toolbar-overlord,:host ::ng-deep .s-rich-editor .tox .tox-toolbar,:host ::ng-deep .s-rich-editor .tox .tox-toolbar__primary,:host ::ng-deep .s-rich-editor .tox .tox-toolbar__overflow{background:var(--s-rich-editor-surface)}:host ::ng-deep .s-rich-editor .tox .tox-tbtn,:host ::ng-deep .s-rich-editor .tox .tox-split-button{border-radius:calc(var(--s-rich-editor-radius) - 2px)}:host ::ng-deep .s-rich-editor .tox .tox-tbtn:hover,:host ::ng-deep .s-rich-editor .tox .tox-tbtn:focus,:host ::ng-deep .s-rich-editor .tox .tox-split-button:hover{background:var(--s-rich-editor-surface-soft)}:host ::ng-deep .s-rich-editor .tox .tox-statusbar{color:var(--s-rich-editor-muted);background:var(--s-rich-editor-surface);border-top:1px solid var(--s-rich-editor-border)}:host(.s-rich-editor-host--document) ::ng-deep .s-rich-editor .tox.tox-tinymce{border:0;box-shadow:none}:host(.s-rich-editor-host--document) ::ng-deep .s-rich-editor .tox.tox-tinymce:focus-within{border:0;box-shadow:none}:host(.s-rich-editor-host--document) ::ng-deep .s-rich-editor .tox .tox-edit-area:before{border:0}:host(.s-rich-editor-host--document) ::ng-deep .s-rich-editor .tox .tox-edit-area__iframe{background:#eef2f7}:host ::ng-deep .s-rich-editor--readonly .tox .tox-editor-header,:host ::ng-deep .s-rich-editor--disabled .tox .tox-editor-header,:host ::ng-deep .s-rich-editor--readonly .tox .tox-statusbar,:host ::ng-deep .s-rich-editor--disabled .tox .tox-statusbar{background:var(--s-rich-editor-surface-soft)}\n"], dependencies: [{ kind: "component", type: EditorComponent, selector: "editor", inputs: ["cloudChannel", "apiKey", "licenseKey", "init", "id", "initialValue", "outputFormat", "inline", "tagName", "plugins", "toolbar", "modelEvents", "allowedEvents", "ignoreEvents", "readonly", "disabled"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
7606
|
+
}
|
|
7607
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: SRichEditorComponent, decorators: [{
|
|
7608
|
+
type: Component,
|
|
7609
|
+
args: [{ selector: 's-rich-editor', imports: [EditorComponent, FormsModule], changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
7610
|
+
{
|
|
7611
|
+
provide: NG_VALUE_ACCESSOR,
|
|
7612
|
+
useExisting: forwardRef(() => SRichEditorComponent),
|
|
7613
|
+
multi: true,
|
|
7614
|
+
},
|
|
7615
|
+
], host: {
|
|
7616
|
+
'[class.s-rich-editor-host--disabled]': 'isDisabled()',
|
|
7617
|
+
'[class.s-rich-editor-host--document]': 'layout() === "document"',
|
|
7618
|
+
'[class.s-rich-editor-host--readonly]': 'editorReadonly()',
|
|
7619
|
+
}, template: "<div\n class=\"s-rich-editor\"\n [class.s-rich-editor--disabled]=\"isDisabled()\"\n [class.s-rich-editor--readonly]=\"editorReadonly()\"\n>\n @if (isBrowser) {\n <editor\n class=\"s-rich-editor__editor\"\n [id]=\"editorId()\"\n [apiKey]=\"effectiveApiKey()\"\n [cloudChannel]=\"effectiveCloudChannel()\"\n [licenseKey]=\"effectiveLicenseKey()\"\n [init]=\"editorInit()\"\n [outputFormat]=\"effectiveOutputFormat()\"\n [modelEvents]=\"effectiveModelEvents()\"\n [disabled]=\"isDisabled()\"\n [readonly]=\"editorReadonly()\"\n [ngModel]=\"value()\"\n (ngModelChange)=\"onEditorModelChange($event)\"\n (onInit)=\"onEditorInit($event)\"\n (onBlur)=\"onEditorBlur($event)\"\n ></editor>\n } @else {\n <textarea\n class=\"s-rich-editor__fallback\"\n [attr.aria-label]=\"ariaLabel()\"\n [value]=\"value()\"\n readonly\n ></textarea>\n }\n</div>\n", styles: [":host{display:block;width:100%;--s-rich-editor-border: var(--platform-control-border, var(--color-border));--s-rich-editor-radius: var( --platform-control-radius, var(--radius-common-m) );--s-rich-editor-focus: var(--platform-control-focus, var(--color-primary));--s-rich-editor-focus-ring: var( --platform-control-focus-ring, var(--color-primary-subtle) );--s-rich-editor-surface: var(--platform-control-bg, var(--color-surface));--s-rich-editor-surface-soft: var( --platform-control-bg-hover, var(--color-surface-soft) );--s-rich-editor-text: var( --platform-control-color, var(--color-text-primary) );--s-rich-editor-muted: var( --platform-control-placeholder, var(--color-text-placeholder) )}.s-rich-editor{display:block;min-width:0;color:var(--s-rich-editor-text)}.s-rich-editor--disabled{opacity:.68}.s-rich-editor__editor{display:block;min-width:0}.s-rich-editor__fallback{box-sizing:border-box;display:block;width:100%;min-height:16rem;padding:var(--space-3);color:var(--s-rich-editor-text);background:var(--s-rich-editor-surface);border:1px solid var(--s-rich-editor-border);border-radius:var(--s-rich-editor-radius);font:inherit;line-height:1.6;resize:vertical}:host ::ng-deep .s-rich-editor .tox.tox-tinymce{border:1px solid var(--s-rich-editor-border);border-radius:var(--s-rich-editor-radius);box-shadow:none;transition:border-color .15s ease,box-shadow .15s ease}:host ::ng-deep .s-rich-editor .tox.tox-tinymce:focus-within{border-color:var(--s-rich-editor-focus);box-shadow:0 0 0 2px var(--s-rich-editor-focus-ring)}:host ::ng-deep .s-rich-editor .tox .tox-editor-header{background:var(--s-rich-editor-surface);border-bottom:1px solid var(--s-rich-editor-border);box-shadow:none}:host ::ng-deep .s-rich-editor .tox .tox-toolbar-overlord,:host ::ng-deep .s-rich-editor .tox .tox-toolbar,:host ::ng-deep .s-rich-editor .tox .tox-toolbar__primary,:host ::ng-deep .s-rich-editor .tox .tox-toolbar__overflow{background:var(--s-rich-editor-surface)}:host ::ng-deep .s-rich-editor .tox .tox-tbtn,:host ::ng-deep .s-rich-editor .tox .tox-split-button{border-radius:calc(var(--s-rich-editor-radius) - 2px)}:host ::ng-deep .s-rich-editor .tox .tox-tbtn:hover,:host ::ng-deep .s-rich-editor .tox .tox-tbtn:focus,:host ::ng-deep .s-rich-editor .tox .tox-split-button:hover{background:var(--s-rich-editor-surface-soft)}:host ::ng-deep .s-rich-editor .tox .tox-statusbar{color:var(--s-rich-editor-muted);background:var(--s-rich-editor-surface);border-top:1px solid var(--s-rich-editor-border)}:host(.s-rich-editor-host--document) ::ng-deep .s-rich-editor .tox.tox-tinymce{border:0;box-shadow:none}:host(.s-rich-editor-host--document) ::ng-deep .s-rich-editor .tox.tox-tinymce:focus-within{border:0;box-shadow:none}:host(.s-rich-editor-host--document) ::ng-deep .s-rich-editor .tox .tox-edit-area:before{border:0}:host(.s-rich-editor-host--document) ::ng-deep .s-rich-editor .tox .tox-edit-area__iframe{background:#eef2f7}:host ::ng-deep .s-rich-editor--readonly .tox .tox-editor-header,:host ::ng-deep .s-rich-editor--disabled .tox .tox-editor-header,:host ::ng-deep .s-rich-editor--readonly .tox .tox-statusbar,:host ::ng-deep .s-rich-editor--disabled .tox .tox-statusbar{background:var(--s-rich-editor-surface-soft)}\n"] }]
|
|
7620
|
+
}], propDecorators: { editorId: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], preset: [{ type: i0.Input, args: [{ isSignal: true, alias: "preset", required: false }] }], layout: [{ type: i0.Input, args: [{ isSignal: true, alias: "layout", required: false }] }], init: [{ type: i0.Input, args: [{ isSignal: true, alias: "init", required: false }] }], apiKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "apiKey", required: false }] }], cloudChannel: [{ type: i0.Input, args: [{ isSignal: true, alias: "cloudChannel", required: false }] }], licenseKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "licenseKey", required: false }] }], outputFormat: [{ type: i0.Input, args: [{ isSignal: true, alias: "outputFormat", required: false }] }], modelEvents: [{ type: i0.Input, args: [{ isSignal: true, alias: "modelEvents", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], height: [{ type: i0.Input, args: [{ isSignal: true, alias: "height", required: false }] }], minHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "minHeight", required: false }] }], maxHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxHeight", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], editorReadonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], uploadAdapter: [{ type: i0.Input, args: [{ isSignal: true, alias: "uploadAdapter", required: false }] }], editorReady: [{ type: i0.Output, args: ["editorReady"] }], editorBlur: [{ type: i0.Output, args: ["editorBlur"] }], valueChange: [{ type: i0.Output, args: ["valueChange"] }] } });
|
|
7621
|
+
function appendClassName(value, className) {
|
|
7622
|
+
const classNames = new Set((value ?? '').split(/\s+/).filter(Boolean));
|
|
7623
|
+
classNames.add(className);
|
|
7624
|
+
return Array.from(classNames).join(' ');
|
|
7625
|
+
}
|
|
7626
|
+
function appendContentStyle(value, contentStyle) {
|
|
7627
|
+
return [value, contentStyle].filter(Boolean).join('\n');
|
|
7628
|
+
}
|
|
7629
|
+
function appendTinyMcePlugin(value, plugin) {
|
|
7630
|
+
if (Array.isArray(value)) {
|
|
7631
|
+
return value.includes(plugin) ? value : [...value, plugin];
|
|
7632
|
+
}
|
|
7633
|
+
const plugins = new Set((value ?? '').split(/\s+/).filter(Boolean));
|
|
7634
|
+
plugins.add(plugin);
|
|
7635
|
+
return Array.from(plugins).join(' ');
|
|
7636
|
+
}
|
|
7637
|
+
function appendTinyMceToolbarGroup(value, toolbarGroup) {
|
|
7638
|
+
if (typeof value === 'string') {
|
|
7639
|
+
return `${value} | ${toolbarGroup}`;
|
|
7640
|
+
}
|
|
7641
|
+
if (!Array.isArray(value)) {
|
|
7642
|
+
return toolbarGroup;
|
|
7643
|
+
}
|
|
7644
|
+
if (value.every(isToolbarRow)) {
|
|
7645
|
+
const rows = [...value];
|
|
7646
|
+
const lastRow = rows.pop();
|
|
7647
|
+
return lastRow ? [...rows, `${lastRow} | ${toolbarGroup}`] : [toolbarGroup];
|
|
7648
|
+
}
|
|
7649
|
+
return [
|
|
7650
|
+
...value,
|
|
7651
|
+
{
|
|
7652
|
+
name: 'Zoom',
|
|
7653
|
+
items: toolbarGroup.split(/\s+/),
|
|
7654
|
+
},
|
|
7655
|
+
];
|
|
7656
|
+
}
|
|
7657
|
+
function isToolbarRow(value) {
|
|
7658
|
+
return typeof value === 'string';
|
|
7659
|
+
}
|
|
7660
|
+
|
|
7661
|
+
function provideSRichEditor(config = {}) {
|
|
7662
|
+
const normalizedConfig = normalizeRichEditorConfig(config);
|
|
7663
|
+
const providers = [
|
|
7664
|
+
{
|
|
7665
|
+
provide: S_RICH_EDITOR_CONFIG,
|
|
7666
|
+
useValue: normalizedConfig,
|
|
7667
|
+
},
|
|
7668
|
+
];
|
|
7669
|
+
if (normalizedConfig.scriptSrc) {
|
|
7670
|
+
providers.push({
|
|
7671
|
+
provide: TINYMCE_SCRIPT_SRC,
|
|
7672
|
+
useValue: normalizedConfig.scriptSrc,
|
|
7673
|
+
});
|
|
7674
|
+
}
|
|
7675
|
+
if (normalizedConfig.uploadAdapter) {
|
|
7676
|
+
providers.push({
|
|
7677
|
+
provide: S_RICH_EDITOR_UPLOAD_ADAPTER,
|
|
7678
|
+
useValue: normalizedConfig.uploadAdapter,
|
|
7679
|
+
});
|
|
7680
|
+
}
|
|
7681
|
+
return makeEnvironmentProviders(providers);
|
|
7682
|
+
}
|
|
7683
|
+
function normalizeRichEditorConfig(config) {
|
|
7684
|
+
return {
|
|
7685
|
+
...S_RICH_EDITOR_DEFAULT_CONFIG,
|
|
7686
|
+
...config,
|
|
7687
|
+
init: mergeRichEditorInit(S_RICH_EDITOR_DEFAULT_CONFIG.init, config.init),
|
|
7688
|
+
};
|
|
7689
|
+
}
|
|
7690
|
+
|
|
5790
7691
|
class MRailNav {
|
|
5791
7692
|
router = inject(Router, { optional: true });
|
|
5792
7693
|
ariaLabel = input('应用导航', ...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
|
|
@@ -6811,10 +8712,28 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
|
|
|
6811
8712
|
args: [{ selector: 's-upload', imports: [LucideAngularModule, NgTemplateOutlet], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\r\n class=\"upload\"\r\n [class.upload--disabled]=\"disabled()\"\r\n [class.upload--picture-card]=\"variant() === 'picture-card'\"\r\n [class.upload--file-list]=\"variant() === 'file-list'\"\r\n [class.upload--dropzone]=\"variant() === 'dropzone'\"\r\n [class.upload--button]=\"variant() === 'button'\"\r\n [style.--upload-card-size.px]=\"cardSize()\"\r\n [style.--upload-card-width.px]=\"cardWidth() ?? cardSize()\"\r\n [style.--upload-card-height.px]=\"cardHeight() ?? cardSize()\"\r\n>\r\n @if (variant() === 'dropzone') {\r\n <button\r\n type=\"button\"\r\n class=\"upload-dropzone\"\r\n [class.upload-dropzone--drag-over]=\"dragOver()\"\r\n [disabled]=\"!canAddMore()\"\r\n (click)=\"openFileDialog()\"\r\n (dragenter)=\"onDragEnter($event)\"\r\n (dragover)=\"onDragOver($event)\"\r\n (dragleave)=\"onDragLeave($event)\"\r\n (drop)=\"onDrop($event)\"\r\n >\r\n <i-lucide [img]=\"uploadIcon\" class=\"upload-dropzone__icon\"></i-lucide>\r\n <span class=\"upload-dropzone__title\">{{ dropTitle() }}</span>\r\n <span class=\"upload-dropzone__description\">{{ dropDescription() }}</span>\r\n </button>\r\n\r\n @if (hint() && showHint()) {\r\n <div class=\"upload__hint\">{{ hint() }}</div>\r\n } @if (showList() && items().length) {\r\n <ng-container [ngTemplateOutlet]=\"fileList\"></ng-container>\r\n } } @else if (variant() === 'file-list') {\r\n <div class=\"upload__toolbar\">\r\n @if (canAddMore()) {\r\n <ng-container [ngTemplateOutlet]=\"buttonTrigger\"></ng-container>\r\n } @if (hint() && showHint()) {\r\n <div class=\"upload__hint\">{{ hint() }}</div>\r\n }\r\n </div>\r\n\r\n <ng-container [ngTemplateOutlet]=\"fileList\"></ng-container>\r\n } @else if (variant() === 'button') {\r\n <ng-container [ngTemplateOutlet]=\"buttonTrigger\"></ng-container>\r\n\r\n @if (hint() && showHint()) {\r\n <div class=\"upload__hint\">{{ hint() }}</div>\r\n } @if (showList() && items().length) {\r\n <ng-container [ngTemplateOutlet]=\"fileList\"></ng-container>\r\n } } @else {\r\n <div class=\"upload-picture-grid\">\r\n @for (item of items(); track trackById($index, item)) { @let status =\r\n itemStatus(item);\r\n\r\n <div\r\n class=\"upload-picture\"\r\n [class.upload-picture--uploading]=\"status === 'uploading'\"\r\n [class.upload-picture--error]=\"status === 'error'\"\r\n [class.upload-picture--active]=\"item.active\"\r\n [class.upload-picture--interactive]=\"status !== 'uploading' && !item.disabled && !disabled()\"\r\n (click)=\"status === 'error' ? retryItem(item) : previewItem(item)\"\r\n >\r\n @if (item.thumbnailSrc) {\r\n <img\r\n class=\"upload-picture__image\"\r\n [src]=\"item.thumbnailSrc\"\r\n [alt]=\"item.alt || itemName(item)\"\r\n />\r\n } @else {\r\n <div class=\"upload-picture__placeholder\">\r\n <i-lucide\r\n [img]=\"imageIcon\"\r\n class=\"upload-picture__placeholder-icon\"\r\n ></i-lucide>\r\n </div>\r\n } @if (showRemove() && isDoneStatus(item) && !showPictureSuccessMark(item)\r\n && !item.active) {\r\n <button\r\n type=\"button\"\r\n class=\"upload-picture__remove\"\r\n (click)=\"removeItem(item, $event)\"\r\n aria-label=\"Remove\"\r\n >\r\n <i-lucide [img]=\"closeIcon\"></i-lucide>\r\n </button>\r\n } @if (status === 'uploading') {\r\n <div class=\"upload-picture__mask upload-picture__mask--uploading\">\r\n <div\r\n class=\"upload-picture__circle\"\r\n [style.--upload-progress]=\"itemProgress(item) + '%'\"\r\n >\r\n <span>{{ itemProgress(item) }}%</span>\r\n </div>\r\n <div class=\"upload-picture__status-text\">{{ uploadingLabel() }}</div>\r\n </div>\r\n } @if (status === 'error') {\r\n <div class=\"upload-picture__mask upload-picture__mask--error\">\r\n <div class=\"upload-picture__error-main\">\r\n <i-lucide\r\n [img]=\"imageIcon\"\r\n class=\"upload-picture__error-icon\"\r\n ></i-lucide>\r\n <div class=\"upload-picture__error-text\">\r\n {{ itemErrorText(item) }}\r\n </div>\r\n </div>\r\n\r\n <div class=\"upload-picture__actions\">\r\n <button\r\n type=\"button\"\r\n class=\"upload-picture__action\"\r\n (click)=\"retryItem(item, $event)\"\r\n aria-label=\"Retry\"\r\n >\r\n <i-lucide [img]=\"retryIcon\"></i-lucide>\r\n </button>\r\n @if (showRemove()) {\r\n <button\r\n type=\"button\"\r\n class=\"upload-picture__action\"\r\n (click)=\"removeItem(item, $event)\"\r\n aria-label=\"Remove\"\r\n >\r\n <i-lucide [img]=\"removeIcon\"></i-lucide>\r\n </button>\r\n }\r\n </div>\r\n </div>\r\n } @if (isDoneStatus(item)) { @if (showPictureSuccessMark(item)) {\r\n <span class=\"upload-picture__success\" aria-hidden=\"true\">\r\n <i-lucide [img]=\"checkIcon\"></i-lucide>\r\n </span>\r\n } @if (showPreview() || showReplace() || (showRemove() &&\r\n showPictureSuccessMark(item))) {\r\n <div class=\"upload-picture__mask upload-picture__mask--hover\">\r\n <div class=\"upload-picture__actions\">\r\n @if (showPreview()) {\r\n <button\r\n type=\"button\"\r\n class=\"upload-picture__action\"\r\n (click)=\"previewItem(item, $event)\"\r\n aria-label=\"Preview\"\r\n >\r\n <i-lucide [img]=\"previewIcon\"></i-lucide>\r\n <span>\u9884\u89C8</span>\r\n </button>\r\n } @if (showReplace()) {\r\n <button\r\n type=\"button\"\r\n class=\"upload-picture__action\"\r\n (click)=\"openReplaceDialog(item, $event)\"\r\n aria-label=\"Replace\"\r\n >\r\n <i-lucide [img]=\"replaceIcon\"></i-lucide>\r\n <span>\u66FF\u6362</span>\r\n </button>\r\n } @if (showRemove() && showPictureSuccessMark(item)) {\r\n <button\r\n type=\"button\"\r\n class=\"upload-picture__action upload-picture__action--icon\"\r\n (click)=\"removeItem(item, $event)\"\r\n aria-label=\"Remove\"\r\n >\r\n <i-lucide [img]=\"removeIcon\"></i-lucide>\r\n </button>\r\n }\r\n </div>\r\n </div>\r\n } }\r\n </div>\r\n } @if (canAddMore()) {\r\n <button\r\n type=\"button\"\r\n class=\"upload-picture__add\"\r\n (click)=\"openFileDialog()\"\r\n >\r\n <i-lucide [img]=\"addIcon\" class=\"upload-picture__add-icon\"></i-lucide>\r\n <span class=\"upload-picture__add-label\">{{ addLabel() }}</span>\r\n </button>\r\n }\r\n </div>\r\n\r\n @if (hint() && showHint()) {\r\n <div class=\"upload__hint\">{{ hint() }}</div>\r\n } }\r\n\r\n <input\r\n #fileInput\r\n class=\"upload__input\"\r\n type=\"file\"\r\n [accept]=\"accept()\"\r\n [multiple]=\"multiple()\"\r\n (change)=\"onFileChange($event)\"\r\n />\r\n</div>\r\n\r\n<ng-template #buttonTrigger>\r\n <button\r\n type=\"button\"\r\n class=\"upload-trigger\"\n [class.upload-trigger--primary]=\"buttonVariant() === 'primary'\"\n [class.upload-trigger--icon]=\"buttonVariant() === 'icon'\"\n [class.upload-trigger--soft-icon]=\"buttonVariant() === 'soft-icon'\"\n [disabled]=\"!canAddMore()\"\n [attr.aria-label]=\"buttonVariant() === 'icon' || buttonVariant() === 'soft-icon' ? buttonLabel() : null\"\n (click)=\"openFileDialog()\"\n >\n <i-lucide\r\n [img]=\"buttonVariant() === 'icon' ? uploadIcon : addIcon\"\r\n class=\"upload-trigger__icon\"\r\n ></i-lucide>\r\n @if (buttonVariant() !== 'icon' && buttonVariant() !== 'soft-icon') {\n <span>{{ buttonLabel() }}</span>\n }\n </button>\n</ng-template>\r\n\r\n<ng-template #fileList>\r\n <div class=\"upload-file-list\" role=\"list\">\r\n @for (item of items(); track trackById($index, item)) { @let status =\r\n itemStatus(item); @let kind = itemKind(item);\r\n\r\n <div\r\n class=\"upload-file\"\r\n role=\"listitem\"\r\n [class.upload-file--uploading]=\"status === 'uploading'\"\r\n [class.upload-file--error]=\"status === 'error'\"\r\n [class.upload-file--done]=\"isDoneStatus(item)\"\r\n [class.upload-file--interactive]=\"status !== 'uploading' && !item.disabled && !disabled()\"\r\n (click)=\"status === 'error' ? retryItem(item) : previewItem(item)\"\r\n >\r\n <div\r\n class=\"upload-file__icon\"\r\n [class]=\"'upload-file__icon upload-file__icon--' + kind\"\r\n >\r\n @if (kind === 'image' && item.thumbnailSrc) {\r\n <img [src]=\"item.thumbnailSrc\" [alt]=\"item.alt || itemName(item)\" />\r\n } @else {\r\n <span>{{ itemKindLabel(item) }}</span>\r\n }\r\n </div>\r\n\r\n <div class=\"upload-file__body\">\r\n <div class=\"upload-file__name\">{{ itemName(item) }}</div>\r\n <div class=\"upload-file__meta\">\r\n @if (status === 'error') {\r\n <span class=\"upload-file__error-text\">{{ itemErrorText(item) }}</span>\r\n } @else {\r\n <span>{{ itemMeta(item) }}</span>\r\n }\r\n </div>\r\n\r\n @if (status === 'uploading') {\r\n <div class=\"upload-file__progress\" aria-hidden=\"true\">\r\n <div\r\n class=\"upload-file__progress-bar\"\r\n [style.width.%]=\"itemProgress(item)\"\r\n ></div>\r\n </div>\r\n }\r\n </div>\r\n\r\n <div class=\"upload-file__actions\">\r\n @if (status === 'uploading') {\r\n <span class=\"upload-file__percent\">{{ itemProgress(item) }}%</span>\r\n @if (showRemove()) {\r\n <button\r\n type=\"button\"\r\n class=\"upload-file__action\"\r\n (click)=\"removeItem(item, $event)\"\r\n aria-label=\"Cancel\"\r\n >\r\n <i-lucide [img]=\"closeIcon\"></i-lucide>\r\n </button>\r\n } } @else if (status === 'error') {\r\n <button\r\n type=\"button\"\r\n class=\"upload-file__action upload-file__action--retry\"\r\n (click)=\"retryItem(item, $event)\"\r\n aria-label=\"Retry\"\r\n >\r\n <i-lucide [img]=\"retryIcon\"></i-lucide>\r\n </button>\r\n @if (showRemove()) {\r\n <button\r\n type=\"button\"\r\n class=\"upload-file__action\"\r\n (click)=\"removeItem(item, $event)\"\r\n aria-label=\"Remove\"\r\n >\r\n <i-lucide [img]=\"removeIcon\"></i-lucide>\r\n </button>\r\n } } @else { @if (showSuccessMark()) {\r\n <i-lucide [img]=\"checkIcon\" class=\"upload-file__success\"></i-lucide>\r\n } @if (showRemove()) {\r\n <button\r\n type=\"button\"\r\n class=\"upload-file__action\"\r\n (click)=\"removeItem(item, $event)\"\r\n aria-label=\"Remove\"\r\n >\r\n <i-lucide [img]=\"removeIcon\"></i-lucide>\r\n </button>\r\n } }\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n</ng-template>\r\n", styles: [":host{display:block}.upload{--upload-card-size: 120px;--upload-card-width: var(--upload-card-size);--upload-card-height: var(--upload-card-size);display:grid;gap:12px;color:var(--color-text-primary)}.upload__toolbar,.upload-picture-grid,.upload-picture__actions,.upload-file__actions,.upload-trigger{display:flex;align-items:center}.upload__toolbar,.upload-file__actions{gap:12px}.upload-picture-grid{flex-wrap:wrap;gap:16px}.upload__hint{color:var(--color-text-secondary);font-size:13px;line-height:20px}.upload__input{display:none}.upload-picture,.upload-picture__add{position:relative;width:var(--upload-card-width);height:var(--upload-card-height);border-radius:var(--radius-common-m);overflow:hidden;flex:0 0 auto}.upload-picture{border:1px solid var(--color-border);background:var(--color-surface)}.upload-picture--interactive,.upload-file--interactive,.upload-picture__add,.upload-trigger,.upload-dropzone,.upload-file__action,.upload-picture__action{cursor:pointer}.upload-picture__image,.upload-picture__placeholder{width:100%;height:100%}.upload-picture__image,.upload-file__icon img{display:block;object-fit:cover}.upload-picture__image,.upload-file__icon img{width:100%;height:100%}.upload-picture__placeholder,.upload-picture__add,.upload-picture__success,.upload-picture__action,.upload-trigger,.upload-file__icon,.upload-file__action{display:inline-flex;align-items:center;justify-content:center}.upload-picture__placeholder,.upload-picture__add{background:var(--color-surface-soft)}.upload-picture__placeholder-icon{width:34px;height:34px;color:var(--color-text-muted)}.upload-picture__mask{position:absolute;inset:0;display:flex}.upload-picture__mask--hover{align-items:center;justify-content:center;background:color-mix(in srgb,var(--color-text-primary) 58%,transparent);opacity:0;transition:opacity .16s ease}.upload-picture--interactive:hover .upload-picture__mask--hover,.upload-picture--active .upload-picture__mask--hover{opacity:1}.upload-picture--interactive:hover .upload-picture__remove{opacity:0;pointer-events:none}.upload-picture__mask--uploading,.upload-picture__mask--error{background:color-mix(in srgb,var(--color-text-primary) 58%,transparent)}.upload-picture__mask--uploading{flex-direction:column;align-items:center;justify-content:center;padding:18px;color:var(--color-surface)}.upload-picture__circle{--upload-progress: 0%;width:52px;height:52px;border-radius:999px;background:conic-gradient(var(--color-primary) var(--upload-progress),color-mix(in srgb,var(--color-surface) 42%,transparent) 0);display:inline-flex;align-items:center;justify-content:center;position:relative}.upload-picture__circle:before{content:\"\";position:absolute;inset:6px;border-radius:inherit;background:color-mix(in srgb,var(--color-text-primary) 58%,transparent)}.upload-picture__circle span{position:relative;font-size:17px;font-weight:var(--font-weight-semibold);line-height:22px;z-index:1}.upload-picture__status-text{margin-top:8px;font-size:13px;font-weight:var(--font-weight-medium);line-height:18px}.upload-picture__error-text,.upload-file__meta{font-size:12px;line-height:18px}.upload-picture__progress,.upload-file__progress{width:100%;height:3px;border-radius:999px;overflow:hidden}.upload-picture__progress{margin-top:14px;background:color-mix(in srgb,var(--color-surface) 34%,transparent)}.upload-file__progress{margin-top:4px;background:var(--color-surface-muted)}.upload-picture__progress-bar,.upload-file__progress-bar{height:100%;border-radius:inherit;background:var(--color-primary)}.upload-picture__mask--error{flex-direction:column;justify-content:space-between;padding:14px}.upload-picture__error-main{display:grid;place-items:center;gap:8px;height:100%}.upload-picture__error-icon,.upload-picture__error-text,.upload-file__error-text{color:var(--color-danger)}.upload-picture__error-icon{width:30px;height:30px}.upload-picture__success{position:absolute;top:6px;right:6px;width:22px;height:22px;border-radius:999px;background:var(--color-success);color:var(--color-surface);z-index:1}.upload-picture__success i-lucide{width:14px;height:14px}.upload-picture__remove{position:absolute;top:6px;right:6px;width:28px;height:28px;padding:0;border:0;border-radius:999px;background:color-mix(in srgb,var(--color-surface) 92%,transparent);color:var(--color-text-primary);display:inline-flex;align-items:center;justify-content:center;box-shadow:var(--shadow-common-s);cursor:pointer;z-index:2}.upload-picture__remove i-lucide{width:18px;height:18px}.upload-picture__actions{justify-content:center;gap:10px}.upload-picture__action{min-width:34px;height:34px;padding:0 8px;border:0;border-radius:var(--radius-common-s);background:color-mix(in srgb,var(--color-surface) 16%,transparent);color:var(--color-surface);gap:4px;font-size:12px;line-height:16px}.upload-picture__action--icon{width:34px;padding:0}.upload-picture__action i-lucide,.upload-trigger__icon,.upload-file__action i-lucide,.upload-file__success{width:16px;height:16px}.upload-picture__mask--hover .upload-picture__actions{gap:28px}.upload-picture__mask--hover .upload-picture__action{width:48px;min-width:48px;height:auto;padding:0;flex-direction:column;border-radius:0;background:transparent;gap:8px;font-size:14px;font-weight:var(--font-weight-medium);line-height:20px}.upload-picture__mask--hover .upload-picture__action i-lucide{width:42px;height:42px;padding:10px;border-radius:999px;background:color-mix(in srgb,var(--color-text-primary) 72%,transparent);box-sizing:border-box}.upload-trigger__icon{flex:0 0 16px;display:inline-flex;align-items:center;justify-content:center;line-height:0}.upload-trigger span{line-height:20px}.upload-picture__add{flex-direction:column;gap:10px;border:1px dashed color-mix(in srgb,var(--color-border-strong) 55%,transparent);color:var(--color-text-secondary)}.upload-picture__add:hover{border-color:var(--color-primary);color:var(--color-primary);background:var(--color-primary-subtle)}.upload-picture__add-icon{width:28px;height:28px}.upload-picture__add-label,.upload-dropzone__title,.upload-file__name{font-size:14px;line-height:20px}.upload-trigger{width:fit-content;min-height:var(--button-height-md);padding:0 18px;border:1px solid var(--button-outline-border);border-radius:var(--button-radius);background:var(--button-neutral-bg);color:var(--color-text-primary);justify-content:center;gap:8px;font-size:var(--button-font-size);font-weight:var(--button-font-weight);line-height:1}.upload-trigger:hover:not(:disabled){border-color:var(--button-outline-border-hover);color:var(--color-primary)}.upload-trigger--primary,.upload-trigger--primary:hover:not(:disabled){border-color:var(--button-primary-bg);background:var(--button-primary-bg);color:var(--color-primary-contrast)}.upload-trigger--icon,.upload-trigger--soft-icon{width:42px;min-width:42px;height:42px;min-height:42px;padding:0}.upload-trigger--soft-icon{border:0;border-radius:var(--radius-common-m);background:var(--color-surface-soft);color:var(--color-text-secondary)}.upload-dropzone{min-height:120px;padding:22px 24px;border:1px dashed color-mix(in srgb,var(--color-border-strong) 55%,transparent);border-radius:var(--radius-common-m);background:var(--color-surface-soft);color:var(--color-text-secondary);display:grid;place-items:center;gap:6px;text-align:center}.upload-dropzone:hover:not(:disabled),.upload-dropzone--drag-over{border-color:var(--color-primary);background:var(--color-primary-subtle);color:var(--color-primary)}.upload-dropzone__icon{width:34px;height:34px}.upload-dropzone__title{color:var(--color-text-primary);font-weight:var(--font-weight-medium)}.upload-file-list{display:grid;gap:8px}.upload-file{min-height:56px;padding:9px 12px;border:1px solid var(--color-border);border-radius:var(--radius-common-m);background:var(--color-surface);display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:12px}.upload-file--error{border-color:var(--color-danger-border)}.upload-file__icon{--upload-file-icon-bg: var(--color-surface-soft);--upload-file-icon-color: var(--color-text-secondary);width:32px;height:32px;border-radius:var(--radius-common-s);background:var(--upload-file-icon-bg);color:var(--upload-file-icon-color);overflow:hidden}.upload-file__icon span{font-size:10px;font-weight:var(--font-weight-semibold);line-height:1}.upload-file__icon--word{--upload-file-icon-bg: var(--color-primary);--upload-file-icon-color: var(--color-primary-contrast)}.upload-file__icon--pdf{--upload-file-icon-bg: var(--color-danger);--upload-file-icon-color: var(--color-surface)}.upload-file__icon--ppt{--upload-file-icon-bg: var(--color-warning);--upload-file-icon-color: var(--color-surface)}.upload-file__icon--sheet{--upload-file-icon-bg: var(--color-success);--upload-file-icon-color: var(--color-surface)}.upload-file__body{min-width:0}.upload-file__name,.upload-file__meta{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.upload-file__name{font-weight:var(--font-weight-medium)}.upload-file__meta,.upload-file__percent{color:var(--color-text-secondary)}.upload-file__actions{justify-content:flex-end;gap:8px}.upload-file__percent{font-size:12px;line-height:18px;text-align:right}.upload-file__success{color:var(--color-success)}.upload-file__action{width:28px;height:28px;padding:0;border:0;border-radius:var(--radius-common-s);background:transparent;color:var(--color-text-secondary)}.upload-file__action--retry{color:var(--color-primary)}.upload--disabled :is(.upload-picture,.upload-picture__add,.upload-trigger,.upload-file),.upload-trigger:disabled,.upload-dropzone:disabled{cursor:not-allowed;opacity:.7}\n"] }]
|
|
6812
8713
|
}], propDecorators: { items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], buttonVariant: [{ type: i0.Input, args: [{ isSignal: true, alias: "buttonVariant", required: false }] }], accept: [{ type: i0.Input, args: [{ isSignal: true, alias: "accept", required: false }] }], multiple: [{ type: i0.Input, args: [{ isSignal: true, alias: "multiple", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], maxCount: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxCount", required: false }] }], cardSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "cardSize", required: false }] }], cardWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "cardWidth", required: false }] }], cardHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "cardHeight", required: false }] }], addLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "addLabel", required: false }] }], buttonLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "buttonLabel", required: false }] }], uploadingLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "uploadingLabel", required: false }] }], errorFallbackText: [{ type: i0.Input, args: [{ isSignal: true, alias: "errorFallbackText", required: false }] }], emptyFileName: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyFileName", required: false }] }], dropTitle: [{ type: i0.Input, args: [{ isSignal: true, alias: "dropTitle", required: false }] }], dropDescription: [{ type: i0.Input, args: [{ isSignal: true, alias: "dropDescription", required: false }] }], hint: [{ type: i0.Input, args: [{ isSignal: true, alias: "hint", required: false }] }], showHint: [{ type: i0.Input, args: [{ isSignal: true, alias: "showHint", required: false }] }], showList: [{ type: i0.Input, args: [{ isSignal: true, alias: "showList", required: false }] }], showPreview: [{ type: i0.Input, args: [{ isSignal: true, alias: "showPreview", required: false }] }], showRemove: [{ type: i0.Input, args: [{ isSignal: true, alias: "showRemove", required: false }] }], showReplace: [{ type: i0.Input, args: [{ isSignal: true, alias: "showReplace", required: false }] }], showSuccessMark: [{ type: i0.Input, args: [{ isSignal: true, alias: "showSuccessMark", required: false }] }], filesSelected: [{ type: i0.Output, args: ["filesSelected"] }], itemPreview: [{ type: i0.Output, args: ["itemPreview"] }], itemRemove: [{ type: i0.Output, args: ["itemRemove"] }], itemRetry: [{ type: i0.Output, args: ["itemRetry"] }], itemReplace: [{ type: i0.Output, args: ["itemReplace"] }], fileInput: [{ type: i0.ViewChild, args: ['fileInput', { isSignal: true }] }] } });
|
|
6813
8714
|
|
|
8715
|
+
class WebLayoutSideNavComponent {
|
|
8716
|
+
title = input(null, ...(ngDevMode ? [{ debugName: "title" }] : /* istanbul ignore next */ []));
|
|
8717
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: WebLayoutSideNavComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
8718
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.8", type: WebLayoutSideNavComponent, isStandalone: true, selector: "app-web-layout-side-nav", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<aside class=\"web-layout-side-nav\">\n <div class=\"web-layout-side-nav__body\">\n <ng-content></ng-content>\n </div>\n</aside>\n", styles: [":host{display:block;height:100%}.web-layout-side-nav{height:100%;min-height:0;display:flex;flex-direction:column;background:#fff}.web-layout-side-nav__body{flex:1 1 auto;min-width:0;min-height:0;padding:.625rem .375rem .875rem;overflow-x:hidden;overflow-y:auto}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
8719
|
+
}
|
|
8720
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: WebLayoutSideNavComponent, decorators: [{
|
|
8721
|
+
type: Component,
|
|
8722
|
+
args: [{ selector: 'app-web-layout-side-nav', imports: [], changeDetection: ChangeDetectionStrategy.OnPush, template: "<aside class=\"web-layout-side-nav\">\n <div class=\"web-layout-side-nav__body\">\n <ng-content></ng-content>\n </div>\n</aside>\n", styles: [":host{display:block;height:100%}.web-layout-side-nav{height:100%;min-height:0;display:flex;flex-direction:column;background:#fff}.web-layout-side-nav__body{flex:1 1 auto;min-width:0;min-height:0;padding:.625rem .375rem .875rem;overflow-x:hidden;overflow-y:auto}\n"] }]
|
|
8723
|
+
}], propDecorators: { title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }] } });
|
|
8724
|
+
|
|
6814
8725
|
class DialogContainerRef {
|
|
6815
8726
|
subject = new Subject();
|
|
8727
|
+
closed = false;
|
|
6816
8728
|
afterClosed$ = this.subject.asObservable();
|
|
8729
|
+
afterClosed() {
|
|
8730
|
+
return this.afterClosed$;
|
|
8731
|
+
}
|
|
6817
8732
|
close(result) {
|
|
8733
|
+
if (this.closed) {
|
|
8734
|
+
return;
|
|
8735
|
+
}
|
|
8736
|
+
this.closed = true;
|
|
6818
8737
|
this.subject.next(result ?? null);
|
|
6819
8738
|
this.subject.complete();
|
|
6820
8739
|
}
|
|
@@ -6920,29 +8839,87 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
|
|
|
6920
8839
|
}, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"confirm-dialog__panel\">\r\n @if (showClose) {\r\n <button type=\"button\" class=\"confirm-dialog__close\" aria-label=\"\u5173\u95ED\u5F39\u7A97\" (click)=\"cancel()\">\r\n <lucide-icon [img]=\"closeIcon\" [size]=\"18\" [strokeWidth]=\"1.8\" aria-hidden=\"true\" />\r\n </button>\r\n }\r\n\r\n <div class=\"confirm-dialog__main\">\r\n <div class=\"confirm-dialog__icon\" aria-hidden=\"true\">\r\n <lucide-icon [img]=\"icon\" [size]=\"28\" [strokeWidth]=\"1.9\" />\r\n </div>\r\n\r\n <div class=\"confirm-dialog__content\">\r\n <h2 class=\"confirm-dialog__title\">{{ title }}</h2>\r\n <p class=\"confirm-dialog__message\">{{ message }}</p>\r\n\r\n @if (details.length > 0) {\r\n <dl class=\"confirm-dialog__details\" aria-label=\"\u8BE6\u60C5\u4FE1\u606F\">\r\n @for (detail of details; track detail.label) {\r\n <div class=\"confirm-dialog__detail-row\">\r\n <dt>{{ detail.label }}</dt>\r\n <dd>{{ detail.value }}</dd>\r\n </div>\r\n }\r\n </dl>\r\n }\r\n </div>\r\n </div>\r\n\r\n <footer class=\"confirm-dialog__footer\">\r\n @if (showCancel) {\r\n <button type=\"button\" class=\"confirm-dialog__button confirm-dialog__button--secondary\" (click)=\"cancel()\">\r\n {{ cancelText }}\r\n </button>\r\n }\r\n <button\r\n type=\"button\"\r\n class=\"confirm-dialog__button confirm-dialog__button--primary\"\r\n [class.confirm-dialog__button--danger]=\"primaryButtonVariant === 'danger'\"\r\n [class.confirm-dialog__button--warning]=\"primaryButtonVariant === 'warning'\"\r\n [class.confirm-dialog__button--success]=\"primaryButtonVariant === 'success'\"\r\n (click)=\"confirm()\"\r\n >\r\n {{ confirmText }}\r\n </button>\r\n </footer>\r\n</div>\r\n", styles: [":host{display:block;width:min(420px,100vw - 32px);min-width:0;background:#fff;color:#0f1f3d;--confirm-dialog-accent: #1677ff;--confirm-dialog-accent-soft: rgba(22, 119, 255, .12);--confirm-dialog-button: #1677ff;--confirm-dialog-button-hover: #3b82f6}.confirm-dialog__panel{position:relative;min-height:172px;padding:28px 28px 24px;background:radial-gradient(circle at 20% 10%,#fffffff0,#fff0 34%),linear-gradient(180deg,#f8fbfff0,#fff 60%)}:host(.confirm-dialog--danger){--confirm-dialog-accent: #ff3b30;--confirm-dialog-accent-soft: rgba(255, 59, 48, .12);--confirm-dialog-button: #ff3b30;--confirm-dialog-button-hover: #ff5157}:host(.confirm-dialog--warning){--confirm-dialog-accent: #ff9500;--confirm-dialog-accent-soft: rgba(255, 149, 0, .12);--confirm-dialog-button: #ff9500;--confirm-dialog-button-hover: #ffab2e}:host(.confirm-dialog--success){--confirm-dialog-accent: #34c759;--confirm-dialog-accent-soft: rgba(52, 199, 89, .13);--confirm-dialog-button: #f5f5f7;--confirm-dialog-button-hover: #e5e7eb}.confirm-dialog__close{position:absolute;top:18px;right:18px;display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;padding:0;border:0;border-radius:50%;background:transparent;color:#8a93a5;cursor:pointer;transition:background-color .16s ease,color .16s ease}.confirm-dialog__close:hover{background:#f2f5fa;color:#334155}.confirm-dialog__main{display:flex;align-items:flex-start;gap:20px;padding-right:32px}.confirm-dialog__icon{display:inline-flex;flex:0 0 auto;align-items:center;justify-content:center;width:56px;height:56px;border-radius:999px;background:var(--confirm-dialog-accent-soft);color:var(--confirm-dialog-accent);box-shadow:inset 0 0 0 1px #ffffffb3}.confirm-dialog__content{min-width:0;padding-top:3px}.confirm-dialog__title{margin:0;color:#0f1f3d;font-size:18px;font-weight:700;letter-spacing:0;line-height:1.2}.confirm-dialog__message{margin:10px 0 0;color:#31415e;font-size:14px;font-weight:400;line-height:1.7;white-space:pre-line}.confirm-dialog__details{display:grid;gap:0;margin:16px 0 0;padding:12px 14px;border:1px solid #edf1f7;border-radius:8px;background:#f8fafce0}.confirm-dialog__detail-row{display:grid;grid-template-columns:minmax(64px,max-content) minmax(0,1fr);gap:16px;min-height:26px;align-items:center}.confirm-dialog__detail-row dt,.confirm-dialog__detail-row dd{margin:0;font-size:13px;line-height:1}.confirm-dialog__detail-row dt{color:#5b667a;font-weight:500}.confirm-dialog__detail-row dd{min-width:0;color:#15223b;font-weight:500;overflow-wrap:anywhere}.confirm-dialog__footer{display:flex;justify-content:flex-end;gap:12px;margin-top:28px}.confirm-dialog__button{display:inline-flex;align-items:center;justify-content:center;min-width:76px;height:36px;padding:0 18px;border:1px solid transparent;border-radius:8px;cursor:pointer;font-size:14px;font-weight:600;letter-spacing:0;line-height:1;transition:background-color .16s ease,border-color .16s ease,box-shadow .16s ease,color .16s ease}.confirm-dialog__button:focus-visible,.confirm-dialog__close:focus-visible{outline:2px solid rgba(22,119,255,.32);outline-offset:2px}.confirm-dialog__button--secondary{border-color:#dce2ec;background:#f5f5f7;color:#2f3a4f}.confirm-dialog__button--secondary:hover{border-color:#ccd5e3;background:#eef2f7}.confirm-dialog__button--primary{background:var(--confirm-dialog-button);color:#fff;box-shadow:0 8px 18px #1677ff38}.confirm-dialog__button--primary:hover{background:var(--confirm-dialog-button-hover)}.confirm-dialog__button--danger{box-shadow:0 8px 18px #ff3b303d}.confirm-dialog__button--warning{color:#fff;box-shadow:0 8px 18px #ff95003d}.confirm-dialog__button--success{border-color:#dce2ec;color:#2f3a4f;box-shadow:none}@media(max-width:480px){:host{width:calc(100vw - 32px)}.confirm-dialog__panel{padding:24px 20px 20px}.confirm-dialog__main{gap:14px;padding-right:24px}.confirm-dialog__icon{width:48px;height:48px}.confirm-dialog__footer{justify-content:stretch}.confirm-dialog__button{flex:1 1 0;min-width:0}}\n"] }]
|
|
6921
8840
|
}] });
|
|
6922
8841
|
|
|
8842
|
+
function toOverlayCssSize(value) {
|
|
8843
|
+
if (typeof value === 'number') {
|
|
8844
|
+
return `${value}px`;
|
|
8845
|
+
}
|
|
8846
|
+
return value ?? '';
|
|
8847
|
+
}
|
|
8848
|
+
function toOverlayClassName(value) {
|
|
8849
|
+
return Array.isArray(value) ? value.filter(Boolean).join(' ') : value ?? '';
|
|
8850
|
+
}
|
|
8851
|
+
|
|
6923
8852
|
class DialogContainerComponent {
|
|
6924
8853
|
title = '';
|
|
6925
8854
|
showHeader = true;
|
|
6926
8855
|
size = 'small';
|
|
8856
|
+
panelClass = '';
|
|
8857
|
+
width = '';
|
|
8858
|
+
modal = true;
|
|
8859
|
+
closeOnEsc = true;
|
|
8860
|
+
closeOnMaskClick = false;
|
|
6927
8861
|
component;
|
|
6928
8862
|
injector;
|
|
6929
8863
|
close = new EventEmitter();
|
|
6930
8864
|
dialogRef;
|
|
6931
8865
|
ngAfterViewInit() {
|
|
6932
|
-
this.
|
|
8866
|
+
if (this.modal) {
|
|
8867
|
+
this.dialogRef.nativeElement.showModal();
|
|
8868
|
+
return;
|
|
8869
|
+
}
|
|
8870
|
+
this.dialogRef.nativeElement.show();
|
|
8871
|
+
}
|
|
8872
|
+
get dialogClasses() {
|
|
8873
|
+
return ['rounded-lg shadow-lg p-6 z-50', this.panelClass].filter(Boolean).join(' ');
|
|
8874
|
+
}
|
|
8875
|
+
handleCancel(event) {
|
|
8876
|
+
if (!this.closeOnEsc) {
|
|
8877
|
+
event.preventDefault();
|
|
8878
|
+
}
|
|
8879
|
+
}
|
|
8880
|
+
handleMaskClick() {
|
|
8881
|
+
if (!this.closeOnMaskClick) {
|
|
8882
|
+
return;
|
|
8883
|
+
}
|
|
8884
|
+
this.dialogRef.nativeElement.close();
|
|
8885
|
+
}
|
|
8886
|
+
handleDialogClick(event) {
|
|
8887
|
+
if (!this.closeOnMaskClick || event.target !== this.dialogRef.nativeElement) {
|
|
8888
|
+
return;
|
|
8889
|
+
}
|
|
8890
|
+
const rect = this.dialogRef.nativeElement.getBoundingClientRect();
|
|
8891
|
+
const clickedInside = event.clientX >= rect.left
|
|
8892
|
+
&& event.clientX <= rect.right
|
|
8893
|
+
&& event.clientY >= rect.top
|
|
8894
|
+
&& event.clientY <= rect.bottom;
|
|
8895
|
+
if (!clickedInside) {
|
|
8896
|
+
this.dialogRef.nativeElement.close();
|
|
8897
|
+
}
|
|
6933
8898
|
}
|
|
6934
8899
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: DialogContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
6935
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: DialogContainerComponent, isStandalone: true, selector: "s-dialog-container", inputs: { title: "title", showHeader: "showHeader", size: "size", component: "component", injector: "injector" }, outputs: { close: "close" }, viewQueries: [{ propertyName: "dialogRef", first: true, predicate: ["dialog"], descendants: true, static: true }], ngImport: i0, template: "<dialog\
|
|
8900
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: DialogContainerComponent, isStandalone: true, selector: "s-dialog-container", inputs: { title: "title", showHeader: "showHeader", size: "size", panelClass: "panelClass", width: "width", modal: "modal", closeOnEsc: "closeOnEsc", closeOnMaskClick: "closeOnMaskClick", component: "component", injector: "injector" }, outputs: { close: "close" }, host: { properties: { "class.dialog-container--contained": "!modal" } }, viewQueries: [{ propertyName: "dialogRef", first: true, predicate: ["dialog"], descendants: true, static: true }], ngImport: i0, template: "@if (!modal) {\n <div class=\"dialog-container__mask\" (click)=\"handleMaskClick()\"></div>\n}\n\n<dialog\n #dialog\n [class]=\"dialogClasses\"\n [class.dialog--chrome-content]=\"!showHeader\"\n [class.dialog--size-small]=\"size === 'small'\"\n [class.dialog--size-standard]=\"size === 'standard'\"\n [class.dialog--size-large]=\"size === 'large'\"\n [style.width]=\"width || null\"\n [attr.aria-label]=\"title || '\u5F39\u7A97'\"\n (cancel)=\"handleCancel($event)\"\n (close)=\"close.emit()\"\n (click)=\"handleDialogClick($event)\"\n>\n @if (showHeader) {\r\n <div class=\"flex justify-between items-center mb-6 px-4 py-3.5 dialog-header-bg\">\r\n <div class=\"dialog-title text-xl font-bold translate-y-[3px]\">{{ title }}</div>\r\n <button\r\n id=\"closeDialog\"\r\n class=\"dialog-close text-xl cursor-pointer test-sm\"\r\n type=\"button\"\r\n aria-label=\"\u5173\u95ED\u5F39\u7A97\"\r\n (click)=\"dialog.close()\"\r\n >\r\n <i class=\"iconfont icon-window-close test-sm\"></i>\r\n </button>\r\n </div>\r\n }\r\n <ng-container *ngComponentOutlet=\"component; injector: injector\"></ng-container>\r\n</dialog>\r\n", styles: [":host.dialog-container--contained{position:absolute;inset:0;display:block;pointer-events:none}.dialog-container__mask{position:absolute;inset:0;background:#0f172a14;pointer-events:auto}dialog{margin:auto;position:fixed;z-index:var(--dialog-z-index, 1000);inset:0;width:min(420px,100vw - 32px);min-width:0;max-width:calc(100vw - 32px);max-height:90vh;padding:0;border:0;border-radius:8px;background:#fff;box-shadow:0 16px 40px #0f172a2e;pointer-events:auto}:host.dialog-container--contained dialog{position:absolute;inset:50% auto auto 50%;max-width:calc(100% - 48px);max-height:calc(100% - 48px);margin:0;transform:translate(-50%,-50%)}form{display:flex;flex-direction:column;gap:10px;flex:1}menu{display:flex;justify-content:flex-end;gap:10px;margin-top:15px;padding:0}dialog::backdrop{background:#0f172a14}dialog.dialog--size-small{width:min(420px,100vw - 32px)}dialog.dialog--size-standard{width:min(680px,100vw - 32px)}dialog.dialog--size-large{width:min(960px,100vw - 32px)}dialog.dialog--chrome-content{border-radius:20px;overflow:hidden;box-shadow:0 24px 64px #0f172a24,0 8px 24px #0f172a14}dialog.dialog--workspace{width:min(62rem,100vw - 2rem);height:min(46rem,100vh - 2rem);min-height:32rem;max-height:calc(100vh - 2rem)}dialog.dialog--workspace>.card{height:100%;min-height:0;display:grid;grid-template-rows:auto minmax(0,1fr) auto}dialog.dialog--workspace>.card>.card__body{min-height:0;overflow:auto}dialog.dialog--workspace .input-text[contenteditable=true]{min-height:14rem;overflow:auto;line-height:1.7}.dialog-header-bg{display:flex;align-items:center;justify-content:space-between;height:45px;min-height:45px;max-height:45px;margin:0;padding:0 16px;border-bottom:1px solid #edf1f5;background:#fff;box-sizing:border-box}.dialog-title{color:#1f2937;font-size:14px;font-weight:500;line-height:20px;transform:none}.dialog-close{display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;padding:0;border:0;background:transparent;color:#9ca3af;font-size:16px;line-height:1;cursor:pointer}.dialog-close i{font-size:16px;line-height:1}.dialog-close:hover{color:#1f2937}\n"], dependencies: [{ kind: "directive", type: NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletEnvironmentInjector", "ngComponentOutletContent", "ngComponentOutletNgModule"], exportAs: ["ngComponentOutlet"] }, { kind: "ngmodule", type: FormsModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
6936
8901
|
}
|
|
6937
8902
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: DialogContainerComponent, decorators: [{
|
|
6938
8903
|
type: Component,
|
|
6939
|
-
args: [{ selector: 's-dialog-container', imports: [NgComponentOutlet, FormsModule],
|
|
8904
|
+
args: [{ selector: 's-dialog-container', imports: [NgComponentOutlet, FormsModule], host: {
|
|
8905
|
+
'[class.dialog-container--contained]': '!modal',
|
|
8906
|
+
}, changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (!modal) {\n <div class=\"dialog-container__mask\" (click)=\"handleMaskClick()\"></div>\n}\n\n<dialog\n #dialog\n [class]=\"dialogClasses\"\n [class.dialog--chrome-content]=\"!showHeader\"\n [class.dialog--size-small]=\"size === 'small'\"\n [class.dialog--size-standard]=\"size === 'standard'\"\n [class.dialog--size-large]=\"size === 'large'\"\n [style.width]=\"width || null\"\n [attr.aria-label]=\"title || '\u5F39\u7A97'\"\n (cancel)=\"handleCancel($event)\"\n (close)=\"close.emit()\"\n (click)=\"handleDialogClick($event)\"\n>\n @if (showHeader) {\r\n <div class=\"flex justify-between items-center mb-6 px-4 py-3.5 dialog-header-bg\">\r\n <div class=\"dialog-title text-xl font-bold translate-y-[3px]\">{{ title }}</div>\r\n <button\r\n id=\"closeDialog\"\r\n class=\"dialog-close text-xl cursor-pointer test-sm\"\r\n type=\"button\"\r\n aria-label=\"\u5173\u95ED\u5F39\u7A97\"\r\n (click)=\"dialog.close()\"\r\n >\r\n <i class=\"iconfont icon-window-close test-sm\"></i>\r\n </button>\r\n </div>\r\n }\r\n <ng-container *ngComponentOutlet=\"component; injector: injector\"></ng-container>\r\n</dialog>\r\n", styles: [":host.dialog-container--contained{position:absolute;inset:0;display:block;pointer-events:none}.dialog-container__mask{position:absolute;inset:0;background:#0f172a14;pointer-events:auto}dialog{margin:auto;position:fixed;z-index:var(--dialog-z-index, 1000);inset:0;width:min(420px,100vw - 32px);min-width:0;max-width:calc(100vw - 32px);max-height:90vh;padding:0;border:0;border-radius:8px;background:#fff;box-shadow:0 16px 40px #0f172a2e;pointer-events:auto}:host.dialog-container--contained dialog{position:absolute;inset:50% auto auto 50%;max-width:calc(100% - 48px);max-height:calc(100% - 48px);margin:0;transform:translate(-50%,-50%)}form{display:flex;flex-direction:column;gap:10px;flex:1}menu{display:flex;justify-content:flex-end;gap:10px;margin-top:15px;padding:0}dialog::backdrop{background:#0f172a14}dialog.dialog--size-small{width:min(420px,100vw - 32px)}dialog.dialog--size-standard{width:min(680px,100vw - 32px)}dialog.dialog--size-large{width:min(960px,100vw - 32px)}dialog.dialog--chrome-content{border-radius:20px;overflow:hidden;box-shadow:0 24px 64px #0f172a24,0 8px 24px #0f172a14}dialog.dialog--workspace{width:min(62rem,100vw - 2rem);height:min(46rem,100vh - 2rem);min-height:32rem;max-height:calc(100vh - 2rem)}dialog.dialog--workspace>.card{height:100%;min-height:0;display:grid;grid-template-rows:auto minmax(0,1fr) auto}dialog.dialog--workspace>.card>.card__body{min-height:0;overflow:auto}dialog.dialog--workspace .input-text[contenteditable=true]{min-height:14rem;overflow:auto;line-height:1.7}.dialog-header-bg{display:flex;align-items:center;justify-content:space-between;height:45px;min-height:45px;max-height:45px;margin:0;padding:0 16px;border-bottom:1px solid #edf1f5;background:#fff;box-sizing:border-box}.dialog-title{color:#1f2937;font-size:14px;font-weight:500;line-height:20px;transform:none}.dialog-close{display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;padding:0;border:0;background:transparent;color:#9ca3af;font-size:16px;line-height:1;cursor:pointer}.dialog-close i{font-size:16px;line-height:1}.dialog-close:hover{color:#1f2937}\n"] }]
|
|
6940
8907
|
}], propDecorators: { title: [{
|
|
6941
8908
|
type: Input
|
|
6942
8909
|
}], showHeader: [{
|
|
6943
8910
|
type: Input
|
|
6944
8911
|
}], size: [{
|
|
6945
8912
|
type: Input
|
|
8913
|
+
}], panelClass: [{
|
|
8914
|
+
type: Input
|
|
8915
|
+
}], width: [{
|
|
8916
|
+
type: Input
|
|
8917
|
+
}], modal: [{
|
|
8918
|
+
type: Input
|
|
8919
|
+
}], closeOnEsc: [{
|
|
8920
|
+
type: Input
|
|
8921
|
+
}], closeOnMaskClick: [{
|
|
8922
|
+
type: Input
|
|
6946
8923
|
}], component: [{
|
|
6947
8924
|
type: Input
|
|
6948
8925
|
}], injector: [{
|
|
@@ -6963,8 +8940,13 @@ class DialogContainerService {
|
|
|
6963
8940
|
const attachedRef = this.overlayHost.attachComponent(DialogContainerComponent, {
|
|
6964
8941
|
injector: this.injector,
|
|
6965
8942
|
viewContainerRef: config?.viewContainerRef,
|
|
8943
|
+
container: config?.container,
|
|
8944
|
+
host: config?.host,
|
|
8945
|
+
scope: config?.scope,
|
|
8946
|
+
owner: config?.owner,
|
|
6966
8947
|
config: {
|
|
6967
|
-
disposeOnNavigation: true,
|
|
8948
|
+
disposeOnNavigation: config?.closeOnRouteLeave ?? true,
|
|
8949
|
+
panelClass: config?.panelClass,
|
|
6968
8950
|
},
|
|
6969
8951
|
});
|
|
6970
8952
|
if (!attachedRef) {
|
|
@@ -6974,6 +8956,11 @@ class DialogContainerService {
|
|
|
6974
8956
|
containerRef.instance.title = config?.title ?? '';
|
|
6975
8957
|
containerRef.instance.showHeader = config?.showHeader ?? contentComponent.dialogChrome !== 'content';
|
|
6976
8958
|
containerRef.instance.size = config?.size ?? contentComponent.dialogSize ?? 'small';
|
|
8959
|
+
containerRef.instance.panelClass = toOverlayClassName(config?.panelClass);
|
|
8960
|
+
containerRef.instance.width = toOverlayCssSize(config?.width);
|
|
8961
|
+
containerRef.instance.modal = !config?.container && !config?.host;
|
|
8962
|
+
containerRef.instance.closeOnEsc = config?.closeOnEsc ?? true;
|
|
8963
|
+
containerRef.instance.closeOnMaskClick = config?.closeOnMaskClick ?? false;
|
|
6977
8964
|
containerRef.instance.component = component;
|
|
6978
8965
|
containerRef.instance.injector = Injector.create({
|
|
6979
8966
|
providers: [
|
|
@@ -6986,6 +8973,16 @@ class DialogContainerService {
|
|
|
6986
8973
|
dialogRef.afterClosed$.subscribe(() => {
|
|
6987
8974
|
attachedRef.dispose();
|
|
6988
8975
|
});
|
|
8976
|
+
attachedRef.overlayRef.detachments().subscribe(() => dialogRef.close());
|
|
8977
|
+
if (config?.closeOnEsc ?? true) {
|
|
8978
|
+
attachedRef.overlayRef.keydownEvents().subscribe((event) => {
|
|
8979
|
+
if (event.key !== 'Escape') {
|
|
8980
|
+
return;
|
|
8981
|
+
}
|
|
8982
|
+
event.preventDefault();
|
|
8983
|
+
dialogRef.close();
|
|
8984
|
+
});
|
|
8985
|
+
}
|
|
6989
8986
|
containerRef.instance.close.subscribe(() => dialogRef.close());
|
|
6990
8987
|
return dialogRef;
|
|
6991
8988
|
}
|
|
@@ -6999,12 +8996,54 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
|
|
|
6999
8996
|
}]
|
|
7000
8997
|
}] });
|
|
7001
8998
|
|
|
8999
|
+
class AppOverlayHostDirective {
|
|
9000
|
+
name = input('global', { ...(ngDevMode ? { debugName: "name" } : /* istanbul ignore next */ {}), alias: 'appOverlayHost' });
|
|
9001
|
+
elementRef = inject(ElementRef);
|
|
9002
|
+
registry = inject(OverlayHostRegistry);
|
|
9003
|
+
ngOnInit() {
|
|
9004
|
+
this.registry.register(this.name(), this.elementRef.nativeElement);
|
|
9005
|
+
}
|
|
9006
|
+
ngOnDestroy() {
|
|
9007
|
+
this.registry.unregister(this.name(), this.elementRef.nativeElement);
|
|
9008
|
+
}
|
|
9009
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: AppOverlayHostDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
9010
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.8", type: AppOverlayHostDirective, isStandalone: true, selector: "[appOverlayHost]", inputs: { name: { classPropertyName: "name", publicName: "appOverlayHost", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 });
|
|
9011
|
+
}
|
|
9012
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: AppOverlayHostDirective, decorators: [{
|
|
9013
|
+
type: Directive,
|
|
9014
|
+
args: [{
|
|
9015
|
+
selector: '[appOverlayHost]',
|
|
9016
|
+
}]
|
|
9017
|
+
}], propDecorators: { name: [{ type: i0.Input, args: [{ isSignal: true, alias: "appOverlayHost", required: false }] }] } });
|
|
9018
|
+
|
|
7002
9019
|
class SideDrawerRef {
|
|
7003
9020
|
subject = new Subject();
|
|
9021
|
+
componentInstanceSubject = new ReplaySubject(1);
|
|
9022
|
+
componentInstance;
|
|
9023
|
+
closed = false;
|
|
7004
9024
|
afterClosed$ = this.subject.asObservable();
|
|
9025
|
+
componentInstance$ = this.componentInstanceSubject.asObservable();
|
|
9026
|
+
get instance() {
|
|
9027
|
+
return this.componentInstance;
|
|
9028
|
+
}
|
|
9029
|
+
afterClosed() {
|
|
9030
|
+
return this.afterClosed$;
|
|
9031
|
+
}
|
|
9032
|
+
attachComponentInstance(instance) {
|
|
9033
|
+
if (this.closed) {
|
|
9034
|
+
return;
|
|
9035
|
+
}
|
|
9036
|
+
this.componentInstance = instance;
|
|
9037
|
+
this.componentInstanceSubject.next(instance);
|
|
9038
|
+
}
|
|
7005
9039
|
close(result) {
|
|
9040
|
+
if (this.closed) {
|
|
9041
|
+
return;
|
|
9042
|
+
}
|
|
9043
|
+
this.closed = true;
|
|
7006
9044
|
this.subject.next(result ?? null);
|
|
7007
9045
|
this.subject.complete();
|
|
9046
|
+
this.componentInstanceSubject.complete();
|
|
7008
9047
|
}
|
|
7009
9048
|
}
|
|
7010
9049
|
|
|
@@ -7012,9 +9051,14 @@ class SideDrawerContainerComponent {
|
|
|
7012
9051
|
static footerSelector = 'platform-drawer-footer';
|
|
7013
9052
|
elementRef = inject(ElementRef);
|
|
7014
9053
|
footerObserver;
|
|
9054
|
+
attachedComponentInstance;
|
|
9055
|
+
componentAttached = output();
|
|
9056
|
+
contentOutlet;
|
|
7015
9057
|
title = input('', ...(ngDevMode ? [{ debugName: "title" }] : /* istanbul ignore next */ []));
|
|
7016
9058
|
closeLabel = input('关闭', ...(ngDevMode ? [{ debugName: "closeLabel" }] : /* istanbul ignore next */ []));
|
|
7017
9059
|
drawerWidth = input('', ...(ngDevMode ? [{ debugName: "drawerWidth" }] : /* istanbul ignore next */ []));
|
|
9060
|
+
maskClass = input('', ...(ngDevMode ? [{ debugName: "maskClass" }] : /* istanbul ignore next */ []));
|
|
9061
|
+
contained = input(false, ...(ngDevMode ? [{ debugName: "contained" }] : /* istanbul ignore next */ []));
|
|
7018
9062
|
component = input.required(...(ngDevMode ? [{ debugName: "component" }] : /* istanbul ignore next */ []));
|
|
7019
9063
|
injector = input.required(...(ngDevMode ? [{ debugName: "injector" }] : /* istanbul ignore next */ []));
|
|
7020
9064
|
closeOnMask = input(false, ...(ngDevMode ? [{ debugName: "closeOnMask" }] : /* istanbul ignore next */ []));
|
|
@@ -7025,6 +9069,14 @@ class SideDrawerContainerComponent {
|
|
|
7025
9069
|
this.observeBodyChanges();
|
|
7026
9070
|
});
|
|
7027
9071
|
}
|
|
9072
|
+
ngAfterViewChecked() {
|
|
9073
|
+
const componentInstance = this.contentOutlet?.componentInstance;
|
|
9074
|
+
if (!componentInstance || componentInstance === this.attachedComponentInstance) {
|
|
9075
|
+
return;
|
|
9076
|
+
}
|
|
9077
|
+
this.attachedComponentInstance = componentInstance;
|
|
9078
|
+
this.componentAttached.emit(componentInstance);
|
|
9079
|
+
}
|
|
7028
9080
|
ngOnDestroy() {
|
|
7029
9081
|
this.footerObserver?.disconnect();
|
|
7030
9082
|
}
|
|
@@ -7055,16 +9107,22 @@ class SideDrawerContainerComponent {
|
|
|
7055
9107
|
footerHost.replaceChildren(footer);
|
|
7056
9108
|
}
|
|
7057
9109
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: SideDrawerContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
7058
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.8", type: SideDrawerContainerComponent, isStandalone: true, selector: "s-side-drawer-container", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, closeLabel: { classPropertyName: "closeLabel", publicName: "closeLabel", isSignal: true, isRequired: false, transformFunction: null }, drawerWidth: { classPropertyName: "drawerWidth", publicName: "drawerWidth", isSignal: true, isRequired: false, transformFunction: null }, component: { classPropertyName: "component", publicName: "component", isSignal: true, isRequired: true, transformFunction: null }, injector: { classPropertyName: "injector", publicName: "injector", isSignal: true, isRequired: true, transformFunction: null }, closeOnMask: { classPropertyName: "closeOnMask", publicName: "closeOnMask", isSignal: true, isRequired: false, transformFunction: null }, onClose: { classPropertyName: "onClose", publicName: "onClose", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div class=\"side-drawer-mask\">\
|
|
9110
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.8", type: SideDrawerContainerComponent, isStandalone: true, selector: "s-side-drawer-container", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, closeLabel: { classPropertyName: "closeLabel", publicName: "closeLabel", isSignal: true, isRequired: false, transformFunction: null }, drawerWidth: { classPropertyName: "drawerWidth", publicName: "drawerWidth", isSignal: true, isRequired: false, transformFunction: null }, maskClass: { classPropertyName: "maskClass", publicName: "maskClass", isSignal: true, isRequired: false, transformFunction: null }, contained: { classPropertyName: "contained", publicName: "contained", isSignal: true, isRequired: false, transformFunction: null }, component: { classPropertyName: "component", publicName: "component", isSignal: true, isRequired: true, transformFunction: null }, injector: { classPropertyName: "injector", publicName: "injector", isSignal: true, isRequired: true, transformFunction: null }, closeOnMask: { classPropertyName: "closeOnMask", publicName: "closeOnMask", isSignal: true, isRequired: false, transformFunction: null }, onClose: { classPropertyName: "onClose", publicName: "onClose", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { componentAttached: "componentAttached" }, host: { properties: { "class.side-drawer-container--contained": "contained()" } }, viewQueries: [{ propertyName: "contentOutlet", first: true, predicate: NgComponentOutlet, descendants: true }], ngImport: i0, template: "<div class=\"side-drawer-mask {{ maskClass() }}\" (click)=\"handleMaskClick()\">\n <aside\r\n class=\"side-drawer\"\r\n role=\"dialog\"\r\n aria-modal=\"true\"\r\n [attr.aria-label]=\"title()\"\r\n [style.width]=\"drawerWidth() || null\"\r\n (click)=\"$event.stopPropagation()\"\r\n >\r\n <header class=\"side-drawer__header\">\r\n <h2>{{ title() }}</h2>\r\n <button\r\n type=\"button\"\r\n class=\"side-drawer__close\"\r\n [attr.aria-label]=\"closeLabel()\"\r\n (click)=\"handleCloseClick()\"\r\n >\r\n \u00D7\r\n </button>\r\n </header>\r\n\r\n <div class=\"side-drawer__body\">\r\n <ng-container *ngComponentOutlet=\"component(); injector: injector()\"></ng-container>\n </div>\r\n <div class=\"side-drawer__footer-host\"></div>\r\n </aside>\r\n</div>\r\n", styles: [":host{position:fixed;inset:0;z-index:var(--side-drawer-z-index, 1300);display:flex;justify-content:flex-end}:host.side-drawer-container--contained{position:absolute}.side-drawer-mask{width:100%;display:flex;justify-content:flex-end;background:#0f172a14}.side-drawer{width:min(388px,100%);height:100%;display:grid;grid-template-rows:auto minmax(0,1fr) auto;border-left:1px solid #ebeef3;background:var(--color-surface);box-shadow:none}.side-drawer__header{min-height:42px;display:flex;align-items:center;justify-content:space-between;padding:0 20px;border-bottom:1px solid #edf1f5;box-sizing:border-box}.side-drawer__header h2{margin:0;color:#1f2937;font-size:14px;font-weight:500;line-height:1.4}.side-drawer__close{border:0;background:transparent;color:#9ca3af;line-height:1;cursor:pointer}.side-drawer__body{min-height:0;overflow:auto}.side-drawer__footer-host:empty{display:none}\n"], dependencies: [{ kind: "directive", type: NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletEnvironmentInjector", "ngComponentOutletContent", "ngComponentOutletNgModule"], exportAs: ["ngComponentOutlet"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
7059
9111
|
}
|
|
7060
9112
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: SideDrawerContainerComponent, decorators: [{
|
|
7061
9113
|
type: Component,
|
|
7062
|
-
args: [{ selector: 's-side-drawer-container', imports: [NgComponentOutlet],
|
|
7063
|
-
|
|
9114
|
+
args: [{ selector: 's-side-drawer-container', imports: [NgComponentOutlet], host: {
|
|
9115
|
+
'[class.side-drawer-container--contained]': 'contained()',
|
|
9116
|
+
}, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"side-drawer-mask {{ maskClass() }}\" (click)=\"handleMaskClick()\">\n <aside\r\n class=\"side-drawer\"\r\n role=\"dialog\"\r\n aria-modal=\"true\"\r\n [attr.aria-label]=\"title()\"\r\n [style.width]=\"drawerWidth() || null\"\r\n (click)=\"$event.stopPropagation()\"\r\n >\r\n <header class=\"side-drawer__header\">\r\n <h2>{{ title() }}</h2>\r\n <button\r\n type=\"button\"\r\n class=\"side-drawer__close\"\r\n [attr.aria-label]=\"closeLabel()\"\r\n (click)=\"handleCloseClick()\"\r\n >\r\n \u00D7\r\n </button>\r\n </header>\r\n\r\n <div class=\"side-drawer__body\">\r\n <ng-container *ngComponentOutlet=\"component(); injector: injector()\"></ng-container>\n </div>\r\n <div class=\"side-drawer__footer-host\"></div>\r\n </aside>\r\n</div>\r\n", styles: [":host{position:fixed;inset:0;z-index:var(--side-drawer-z-index, 1300);display:flex;justify-content:flex-end}:host.side-drawer-container--contained{position:absolute}.side-drawer-mask{width:100%;display:flex;justify-content:flex-end;background:#0f172a14}.side-drawer{width:min(388px,100%);height:100%;display:grid;grid-template-rows:auto minmax(0,1fr) auto;border-left:1px solid #ebeef3;background:var(--color-surface);box-shadow:none}.side-drawer__header{min-height:42px;display:flex;align-items:center;justify-content:space-between;padding:0 20px;border-bottom:1px solid #edf1f5;box-sizing:border-box}.side-drawer__header h2{margin:0;color:#1f2937;font-size:14px;font-weight:500;line-height:1.4}.side-drawer__close{border:0;background:transparent;color:#9ca3af;line-height:1;cursor:pointer}.side-drawer__body{min-height:0;overflow:auto}.side-drawer__footer-host:empty{display:none}\n"] }]
|
|
9117
|
+
}], propDecorators: { componentAttached: [{ type: i0.Output, args: ["componentAttached"] }], contentOutlet: [{
|
|
9118
|
+
type: ViewChild,
|
|
9119
|
+
args: [NgComponentOutlet]
|
|
9120
|
+
}], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], closeLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeLabel", required: false }] }], drawerWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "drawerWidth", required: false }] }], maskClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "maskClass", required: false }] }], contained: [{ type: i0.Input, args: [{ isSignal: true, alias: "contained", required: false }] }], component: [{ type: i0.Input, args: [{ isSignal: true, alias: "component", required: true }] }], injector: [{ type: i0.Input, args: [{ isSignal: true, alias: "injector", required: true }] }], closeOnMask: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeOnMask", required: false }] }], onClose: [{ type: i0.Input, args: [{ isSignal: true, alias: "onClose", required: false }] }] } });
|
|
7064
9121
|
|
|
7065
9122
|
const SIDE_DRAWER_DATA = new InjectionToken('SIDE_DRAWER_DATA');
|
|
7066
9123
|
|
|
7067
9124
|
class SideDrawerService {
|
|
9125
|
+
document = inject(DOCUMENT);
|
|
7068
9126
|
injector = inject(Injector);
|
|
7069
9127
|
overlayHost = inject(PlatformOverlayPortalHost);
|
|
7070
9128
|
open(component, config) {
|
|
@@ -7072,19 +9130,29 @@ class SideDrawerService {
|
|
|
7072
9130
|
const attachedRef = this.overlayHost.attachComponent(SideDrawerContainerComponent, {
|
|
7073
9131
|
injector: this.injector,
|
|
7074
9132
|
viewContainerRef: config?.viewContainerRef,
|
|
9133
|
+
container: config?.container,
|
|
9134
|
+
host: config?.host,
|
|
9135
|
+
scope: config?.scope,
|
|
9136
|
+
owner: config?.owner,
|
|
7075
9137
|
config: {
|
|
7076
|
-
disposeOnNavigation: true,
|
|
9138
|
+
disposeOnNavigation: config?.closeOnRouteLeave ?? true,
|
|
9139
|
+
panelClass: config?.panelClass,
|
|
7077
9140
|
},
|
|
7078
9141
|
});
|
|
7079
9142
|
if (!attachedRef) {
|
|
7080
9143
|
return drawerRef;
|
|
7081
9144
|
}
|
|
7082
9145
|
const containerRef = attachedRef.componentRef;
|
|
9146
|
+
containerRef.instance.componentAttached.subscribe((instance) => {
|
|
9147
|
+
drawerRef.attachComponentInstance(instance);
|
|
9148
|
+
});
|
|
7083
9149
|
containerRef.setInput('title', config?.title ?? '');
|
|
7084
9150
|
containerRef.setInput('closeLabel', config?.closeLabel ?? '关闭');
|
|
7085
|
-
containerRef.setInput('drawerWidth', config?.drawerWidth ?? '');
|
|
9151
|
+
containerRef.setInput('drawerWidth', toOverlayCssSize(config?.width) || (config?.drawerWidth ?? ''));
|
|
9152
|
+
containerRef.setInput('maskClass', toOverlayClassName(config?.maskClass));
|
|
9153
|
+
containerRef.setInput('contained', Boolean(config?.container || config?.host));
|
|
7086
9154
|
containerRef.setInput('component', component);
|
|
7087
|
-
containerRef.setInput('closeOnMask', config?.closeOnMask ?? false);
|
|
9155
|
+
containerRef.setInput('closeOnMask', config?.closeOnMaskClick ?? config?.closeOnMask ?? false);
|
|
7088
9156
|
containerRef.setInput('onClose', () => drawerRef.close());
|
|
7089
9157
|
containerRef.setInput('injector', Injector.create({
|
|
7090
9158
|
providers: [
|
|
@@ -7096,8 +9164,31 @@ class SideDrawerService {
|
|
|
7096
9164
|
drawerRef.afterClosed$.subscribe(() => {
|
|
7097
9165
|
attachedRef.dispose();
|
|
7098
9166
|
});
|
|
9167
|
+
attachedRef.overlayRef.detachments().subscribe(() => drawerRef.close());
|
|
9168
|
+
if (config?.closeOnEsc ?? true) {
|
|
9169
|
+
attachedRef.overlayRef.keydownEvents().subscribe((event) => {
|
|
9170
|
+
if (event.key !== 'Escape') {
|
|
9171
|
+
return;
|
|
9172
|
+
}
|
|
9173
|
+
if (this.isEscapeFromNativeDialog(event)) {
|
|
9174
|
+
return;
|
|
9175
|
+
}
|
|
9176
|
+
event.preventDefault();
|
|
9177
|
+
drawerRef.close();
|
|
9178
|
+
});
|
|
9179
|
+
}
|
|
7099
9180
|
return drawerRef;
|
|
7100
9181
|
}
|
|
9182
|
+
isEscapeFromNativeDialog(event) {
|
|
9183
|
+
const dialogElement = this.document.defaultView?.HTMLDialogElement;
|
|
9184
|
+
if (!dialogElement) {
|
|
9185
|
+
return false;
|
|
9186
|
+
}
|
|
9187
|
+
if (this.document.querySelector('dialog[open]')) {
|
|
9188
|
+
return true;
|
|
9189
|
+
}
|
|
9190
|
+
return event.composedPath().some((target) => target instanceof dialogElement);
|
|
9191
|
+
}
|
|
7101
9192
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: SideDrawerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
7102
9193
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: SideDrawerService, providedIn: 'root' });
|
|
7103
9194
|
}
|
|
@@ -7135,5 +9226,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
|
|
|
7135
9226
|
* Generated bundle index. Do not edit.
|
|
7136
9227
|
*/
|
|
7137
9228
|
|
|
7138
|
-
export { APP_RUNTIME_CONTEXT, AUTHENTICATED_STATE_GETTER, ActionMenuComponent, AppFooter, AppHeader, AppShell, Aside, Avatar, AvatarGroup, Badge, BaseListComponent, BottomNav, Breadcrumb, BreadcrumbItemComponent, BsBaseList, BsLoadingDirective, BsMessage, BsMessageService, BsSelect, CORE_AUTH_GUARD_CONFIG, Card, DeleteConfirmDialogComponent as ConfirmDialogComponent, Content, DEFAULT_APP_RUNTIME_CONTEXT, DEFAULT_EMOJI_PICKER_OPTIONS, DEFAULT_EMOJI_PICKER_TABS, DEFAULT_HTTP_RESPONSE_INTERCEPTOR_CONFIG, DEFAULT_HTTP_SUCCESS_MESSAGES, DIALOG_DATA, DatePicker, DeleteConfirmDialogComponent, DialogContainerRef, DialogContainerService, ElectronRequest, EmojiPicker, EmptyFooter, EmptySidebar, EnumPicePipe, FileUploadButtonComponent, FilterSummary, FlexColumnFillDirective, GlobalErrorHandler, HTTP_AUTH_TOKEN_GETTER, HTTP_CONFIG, HTTP_RESPONSE_INTERCEPTOR_CONFIG, HTTP_SUCCESS_MESSAGE, HTTP_UNAUTHORIZED_HANDLER, HasPermissionDirective, Header, HttpConfig, ListPageActionColDirective, ListPageCellTextDirective, ListPageCheckboxColDirective, ListPageColumnDirective, ListPageContentDesktopComponent, ListPageContentDesktopSlotDirective, ListPageEmptyDirective, ListPageFileActionDirective, ListPageFilterActionsDirective, ListPageFilterControlDirective, ListPageFilterFieldDirective, ListPageFilterGridDirective, ListPageFilterLabelDirective, ListPageFilterPanelComponent, ListPageHeaderActionsDirective, ListPageHeaderComponent, ListPageHeaderFiltersDirective, ListPageHeaderLayoutDirective, ListPageHeaderRowComponent, ListPageHeaderSlotDirective, ListPageIconButtonDirective, ListPageLayoutComponent, ListPagePaginationComponent, ListPagePaginationSlotDirective, ListPageRowActionDangerDirective, ListPageRowActionTriggerDirective, ListPageRowActionsDirective, ListPageSidebarComponent, ListPageSidebarSearchDirective, ListPageSidebarSlotDirective, ListPageSidebarTreeDirective, ListPageSummarySlotDirective, ListPageTabDirective, ListPageTableDirective, ListPageTableScrollDirective, ListPageTableWrapDirective, ListPageTabsDirective, ListPageTreeIndentDirective, ListPageTreeToggleDirective, ListSearchPanel, MAlphabet, MContent, MESSAGE_SERVICE, MFooter, MItem, MItemActionsSlot, MItemAvatarFaceDirective, MItemAvatarFrameDirective, MItemAvatarGroupDirective, MItemAvatarIconDirective, MItemAvatarPortraitDirective, MItemAvatarSlot, MItemBadgeDirective, MItemFooterSlot, MItemIndicatorDirective, MItemMarkerDirective, MItemMenuChevronDirective, MItemMenuIconDirective, MItemMetaSlot, MItemPrefixSlot, MItemPresenceDirective, MItemProfileAvatarDirective, MItemProfileNameDirective, MItemProfileTitleDirective, MItemStatusSlot, MItemSummarySlot, MItemTitleSlot, MItemTrailingSlot, MItemUnreadDotDirective, MList, MPage, MobilePageContentSlotDirective as MPageContentSlotDirective, MobilePageFooterSlotDirective as MPageFooterSlotDirective, MobilePageHeaderSlotDirective as MPageHeaderSlotDirective, MPersonCardDesktopLayer, MPersonCardMobileLayer,
|
|
9229
|
+
export { APP_RUNTIME_CONTEXT, AUTHENTICATED_STATE_GETTER, ActionMenuComponent, AppFooter, AppHeader, AppOverlayHostDirective, AppShell, Aside, Avatar, AvatarGroup, Badge, BaseListComponent, BottomNav, Breadcrumb, BreadcrumbItemComponent, BsBaseList, BsLoadingDirective, BsMessage, BsMessageService, BsSelect, CORE_AUTH_GUARD_CONFIG, Card, DeleteConfirmDialogComponent as ConfirmDialogComponent, Content, DEFAULT_APP_RUNTIME_CONTEXT, DEFAULT_EMOJI_PICKER_OPTIONS, DEFAULT_EMOJI_PICKER_TABS, DEFAULT_HTTP_RESPONSE_INTERCEPTOR_CONFIG, DEFAULT_HTTP_SUCCESS_MESSAGES, DIALOG_DATA, DatePicker, DeleteConfirmDialogComponent, DialogContainerRef, DialogContainerService, ElectronRequest, EmojiPicker, EmptyFooter, EmptySidebar, EnumPicePipe, FileUploadButtonComponent, FilterSummary, FlexColumnFillDirective, GlobalErrorHandler, HOSTED_AUTH_EVENT_HANDLER, HOSTED_AUTH_EVENT_LISTENER_CONFIG, HOSTED_AUTH_MESSAGE_CHANNEL, HOSTED_AUTH_MESSAGE_VERSION, HOSTED_AUTH_WINDOW_EVENT_NAMES, HOSTED_WORKSPACE_VIEWPORTS, HTTP_AUTH_TOKEN_GETTER, HTTP_CONFIG, HTTP_RESPONSE_INTERCEPTOR_CONFIG, HTTP_SUCCESS_MESSAGE, HTTP_UNAUTHORIZED_HANDLER, HasPermissionDirective, Header, HostedAuthBridgeService, HostedAuthEventListenerService, HostedAuthTrustedMessageSourceRegistry, HttpConfig, ImagePreview, ListPageActionColDirective, ListPageCellTextDirective, ListPageCheckboxColDirective, ListPageColumnDirective, ListPageContentDesktopComponent, ListPageContentDesktopSlotDirective, ListPageEmptyDirective, ListPageFileActionDirective, ListPageFilterActionsDirective, ListPageFilterControlDirective, ListPageFilterFieldDirective, ListPageFilterGridDirective, ListPageFilterLabelDirective, ListPageFilterPanelComponent, ListPageHeaderActionsDirective, ListPageHeaderComponent, ListPageHeaderFiltersDirective, ListPageHeaderLayoutDirective, ListPageHeaderRowComponent, ListPageHeaderSlotDirective, ListPageIconButtonDirective, ListPageLayoutComponent, ListPagePaginationComponent, ListPagePaginationSlotDirective, ListPageRowActionDangerDirective, ListPageRowActionTriggerDirective, ListPageRowActionsDirective, ListPageSidebarComponent, ListPageSidebarSearchDirective, ListPageSidebarSlotDirective, ListPageSidebarTreeDirective, ListPageSummarySlotDirective, ListPageTabDirective, ListPageTableDirective, ListPageTableScrollDirective, ListPageTableWrapDirective, ListPageTabsDirective, ListPageTreeIndentDirective, ListPageTreeToggleDirective, ListSearchPanel, MAlphabet, MContent, MESSAGE_SERVICE, MFooter, MItem, MItemActionsSlot, MItemAvatarFaceDirective, MItemAvatarFrameDirective, MItemAvatarGroupDirective, MItemAvatarIconDirective, MItemAvatarPortraitDirective, MItemAvatarSlot, MItemBadgeDirective, MItemFooterSlot, MItemIndicatorDirective, MItemMarkerDirective, MItemMenuChevronDirective, MItemMenuIconDirective, MItemMetaSlot, MItemPrefixSlot, MItemPresenceDirective, MItemProfileAvatarDirective, MItemProfileNameDirective, MItemProfileTitleDirective, MItemStatusSlot, MItemSummarySlot, MItemTitleSlot, MItemTrailingSlot, MItemUnreadDotDirective, MList, MPage, MobilePageContentSlotDirective as MPageContentSlotDirective, MobilePageFooterSlotDirective as MPageFooterSlotDirective, MobilePageHeaderSlotDirective as MPageHeaderSlotDirective, MPersonCardDesktopLayer, MPersonCardMobileLayer, MRailNav, MTabs, MToolbar, M_ALPHABET_DEFAULT_LETTERS, M_ITEM_APPEARANCE_DIRECTIVES, M_ITEM_SLOT_DIRECTIVES, MenuComponent, MenuItemComponent, MerchantCard, MinimalHeader, MobilePageContentSlotDirective, MobilePageFooterSlotDirective, MobilePageHeaderSlotDirective, MobilePageLayoutComponent, NoticeCarousel, NotificationCenter, Outlets, OverlayHostRegistry, PContent, PFooter, PLATFORM_OVERLAY_VIEW_CONTAINER_REF, PMenuComponent, PMenuItemComponent, PMenuSeparatorComponent, PPage, PPageContentSlotDirective, PPageFooterSlotDirective, PPageHeaderSlotDirective, PPageSidebarSlotDirective, PSidebar, PToolbar, Pagination, PermissionService, PlatformDrawerCheckbox, PlatformDrawerCheckboxGroup, PlatformDrawerComponentBar, PlatformDrawerComponentItem, PlatformDrawerComponentList, PlatformDrawerEmpty, PlatformDrawerError, PlatformDrawerField, PlatformDrawerFooter, PlatformDrawerForm, PlatformDrawerFormModule, PlatformDrawerInputAction, PlatformDrawerInputActionButton, PlatformDrawerSection, PlatformDrawerTable, PlatformDrawerToolbar, PlatformDrawerTree, PlatformDrawerTreeItem, PlatformDrawerTreeToggle, PlatformInputDirective, PlatformLoginPage, PlatformOverlayPortalHost, PlatformPrefixedInput, PlatformSearchComponent, PlatformSwitch, RoutePlaceholderPageComponent, RuntimeService, SHELL_CONFIG, SIDE_DRAWER_DATA, SRichEditorComponent, S_RICH_EDITOR_BASE_INIT, S_RICH_EDITOR_CONFIG, S_RICH_EDITOR_CONTENT_STYLE, S_RICH_EDITOR_DEFAULT_CLOUD_CHANNEL, S_RICH_EDITOR_DEFAULT_CONFIG, S_RICH_EDITOR_DEFAULT_MODEL_EVENTS, S_RICH_EDITOR_DEFAULT_OUTPUT_FORMAT, S_RICH_EDITOR_DOCUMENT_BODY_CLASS, S_RICH_EDITOR_DOCUMENT_CONTENT_STYLE, S_RICH_EDITOR_DOCUMENT_PAGE_METRICS, S_RICH_EDITOR_DOCUMENT_ZOOM_TOOLBAR, S_RICH_EDITOR_PAGEBREAK_SEPARATOR, S_RICH_EDITOR_PRESET_CONFIGS, S_RICH_EDITOR_UPLOAD_ADAPTER, SearchBar, SectionNav, Segmented, ShellLayout, SideDrawerRef, SideDrawerService, SidebarHeaderLayout, StatusDot, Steps, Tabs, Tag, ThrowException, Timeline, TopNavHeader, TopNavLayout, Tree, TreeSelect, Upload, WebLayoutSideNavComponent, collectRichEditorSetup, coreAuthGuard, coreGuestOnlyGuard, createAppRuntimeProviders, decreaseLoading, getRichEditorPresetInit, increaseLoading, injectShellConfig, isLoading, mergeRichEditorInit, provideAuthenticatedStateGetter, provideCoreAuthGuardConfig, provideGlobalErrorHandler, provideHostedAuthEventHandler, provideHttpAuthTokenGetter, provideHttpConfig, provideHttpResponseInterceptorConfig, provideHttpUnauthorizedHandler, provideIMessageService, provideRuntimeContext, provideSRichEditor, provideSRichEditorUploadAdapter, provideShellConfig, provideShellConfigFactory, requestInterceptor, resolveShellParts, responseInterceptor, setupRichEditorDocumentPagination, setupRichEditorDocumentZoom, splitRichEditorDocumentPages, syncPlatformScrollbarStyles, syncPlatformScrollbarStylesToIframe, toOverlayClassName, toOverlayCssSize, withHttpSuccessMessage, withoutHttpSuccessMessage };
|
|
7139
9230
|
//# sourceMappingURL=platform-core-ng.mjs.map
|