orbiq-neural-ui-kit 1.1.28 → 1.1.30
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.
|
@@ -567,6 +567,7 @@ class NeuralButtonComponent {
|
|
|
567
567
|
}[s];
|
|
568
568
|
return [
|
|
569
569
|
'inline-flex items-center justify-center gap-2 transition-colors shrink-0',
|
|
570
|
+
this.isDisabled() ? 'cursor-not-allowed' : 'cursor-pointer',
|
|
570
571
|
stateClasses,
|
|
571
572
|
this.loading() && !this.disabled() ? 'pointer-events-none' : '',
|
|
572
573
|
focusClasses[t],
|
|
@@ -7395,7 +7396,7 @@ class NeuralSearchTriggerComponent {
|
|
|
7395
7396
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.4", type: NeuralSearchTriggerComponent, isStandalone: true, selector: "neural-search-trigger", inputs: { width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, combo: { classPropertyName: "combo", publicName: "combo", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { clicked: "clicked" }, ngImport: i0, template: `
|
|
7396
7397
|
<button
|
|
7397
7398
|
(click)="clicked.emit()"
|
|
7398
|
-
class="flex items-center justify-between h-[32px] px-3 bg-surface-gray-2 hover:bg-surface-gray-3 border border-transparent hover:border-outline-gray-2 rounded-6 transition-all group outline-none focus-visible:ring-2 focus-visible:ring-outline-gray-4 w-full"
|
|
7399
|
+
class="cursor-pointer flex items-center justify-between h-[32px] px-3 bg-surface-gray-2 hover:bg-surface-gray-3 border border-transparent hover:border-outline-gray-2 rounded-6 transition-all group outline-none focus-visible:ring-2 focus-visible:ring-outline-gray-4 w-full"
|
|
7399
7400
|
[style.width]="width()"
|
|
7400
7401
|
>
|
|
7401
7402
|
<div class="flex items-center gap-2 text-ink-gray-4 group-hover:text-ink-gray-5">
|
|
@@ -7419,7 +7420,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImpor
|
|
|
7419
7420
|
template: `
|
|
7420
7421
|
<button
|
|
7421
7422
|
(click)="clicked.emit()"
|
|
7422
|
-
class="flex items-center justify-between h-[32px] px-3 bg-surface-gray-2 hover:bg-surface-gray-3 border border-transparent hover:border-outline-gray-2 rounded-6 transition-all group outline-none focus-visible:ring-2 focus-visible:ring-outline-gray-4 w-full"
|
|
7423
|
+
class="cursor-pointer flex items-center justify-between h-[32px] px-3 bg-surface-gray-2 hover:bg-surface-gray-3 border border-transparent hover:border-outline-gray-2 rounded-6 transition-all group outline-none focus-visible:ring-2 focus-visible:ring-outline-gray-4 w-full"
|
|
7423
7424
|
[style.width]="width()"
|
|
7424
7425
|
>
|
|
7425
7426
|
<div class="flex items-center gap-2 text-ink-gray-4 group-hover:text-ink-gray-5">
|
|
@@ -8269,222 +8270,954 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImpor
|
|
|
8269
8270
|
args: ['popoverContent']
|
|
8270
8271
|
}] } });
|
|
8271
8272
|
|
|
8272
|
-
class
|
|
8273
|
+
class NeuralDialogComponent {
|
|
8273
8274
|
dialog;
|
|
8274
|
-
|
|
8275
|
-
|
|
8275
|
+
viewContainerRef;
|
|
8276
|
+
openModel = model(false, /* @ts-ignore */
|
|
8277
|
+
...(ngDevMode ? [{ debugName: "openModel" }] : /* istanbul ignore next */ []));
|
|
8278
|
+
title = input(/* @ts-ignore */
|
|
8279
|
+
...(ngDevMode ? [undefined, { debugName: "title" }] : /* istanbul ignore next */ []));
|
|
8280
|
+
message = input(/* @ts-ignore */
|
|
8281
|
+
...(ngDevMode ? [undefined, { debugName: "message" }] : /* istanbul ignore next */ []));
|
|
8282
|
+
icon = input(/* @ts-ignore */
|
|
8283
|
+
...(ngDevMode ? [undefined, { debugName: "icon" }] : /* istanbul ignore next */ []));
|
|
8284
|
+
size = input('lg', /* @ts-ignore */
|
|
8285
|
+
...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
8286
|
+
position = input('center', /* @ts-ignore */
|
|
8287
|
+
...(ngDevMode ? [{ debugName: "position" }] : /* istanbul ignore next */ []));
|
|
8288
|
+
paddingTop = input(/* @ts-ignore */
|
|
8289
|
+
...(ngDevMode ? [undefined, { debugName: "paddingTop" }] : /* istanbul ignore next */ []));
|
|
8290
|
+
actions = input([], /* @ts-ignore */
|
|
8291
|
+
...(ngDevMode ? [{ debugName: "actions" }] : /* istanbul ignore next */ []));
|
|
8276
8292
|
dismissible = input(true, /* @ts-ignore */
|
|
8277
8293
|
...(ngDevMode ? [{ debugName: "dismissible" }] : /* istanbul ignore next */ []));
|
|
8278
|
-
|
|
8279
|
-
|
|
8294
|
+
showCloseButton = input(true, /* @ts-ignore */
|
|
8295
|
+
...(ngDevMode ? [{ debugName: "showCloseButton" }] : /* istanbul ignore next */ []));
|
|
8296
|
+
bare = input(false, /* @ts-ignore */
|
|
8297
|
+
...(ngDevMode ? [{ debugName: "bare" }] : /* istanbul ignore next */ []));
|
|
8298
|
+
hasTitleSlot = input(false, /* @ts-ignore */
|
|
8299
|
+
...(ngDevMode ? [{ debugName: "hasTitleSlot" }] : /* istanbul ignore next */ []));
|
|
8300
|
+
hasActionsSlot = input(false, /* @ts-ignore */
|
|
8301
|
+
...(ngDevMode ? [{ debugName: "hasActionsSlot" }] : /* istanbul ignore next */ []));
|
|
8302
|
+
hasDefaultSlot = input(false, /* @ts-ignore */
|
|
8303
|
+
...(ngDevMode ? [{ debugName: "hasDefaultSlot" }] : /* istanbul ignore next */ []));
|
|
8304
|
+
dialogTemplate;
|
|
8280
8305
|
dialogRef = null;
|
|
8281
|
-
|
|
8282
|
-
constructor(dialog) {
|
|
8306
|
+
internalActionsState = {}; // track loading states
|
|
8307
|
+
constructor(dialog, viewContainerRef) {
|
|
8283
8308
|
this.dialog = dialog;
|
|
8309
|
+
this.viewContainerRef = viewContainerRef;
|
|
8310
|
+
effect(() => {
|
|
8311
|
+
const isOpen = this.openModel();
|
|
8312
|
+
if (isOpen && !this.dialogRef && this.dialogTemplate) {
|
|
8313
|
+
this.openDialog();
|
|
8314
|
+
}
|
|
8315
|
+
else if (!isOpen && this.dialogRef) {
|
|
8316
|
+
this.dialogRef.close();
|
|
8317
|
+
this.dialogRef = null;
|
|
8318
|
+
}
|
|
8319
|
+
});
|
|
8284
8320
|
}
|
|
8285
|
-
|
|
8286
|
-
|
|
8287
|
-
this.openSheet();
|
|
8288
|
-
}
|
|
8289
|
-
else if (!value && this._isOpen) {
|
|
8290
|
-
this.closeSheet();
|
|
8291
|
-
}
|
|
8292
|
-
}
|
|
8293
|
-
get open() {
|
|
8294
|
-
return this._isOpen;
|
|
8295
|
-
}
|
|
8296
|
-
openSheet() {
|
|
8297
|
-
if (this._isOpen)
|
|
8298
|
-
return;
|
|
8299
|
-
this._isOpen = true;
|
|
8300
|
-
this.openChange.emit(true);
|
|
8301
|
-
this.dialogRef = this.dialog.open(this.sheetTemplate, {
|
|
8302
|
-
panelClass: 'neural-bottom-sheet-panel',
|
|
8303
|
-
backdropClass: ['fixed', 'inset-0', 'z-50', 'bg-black-overlay-200', 'dark:bg-black-overlay-700'],
|
|
8304
|
-
hasBackdrop: true,
|
|
8321
|
+
openDialog() {
|
|
8322
|
+
this.dialogRef = this.dialog.open(this.dialogTemplate, {
|
|
8305
8323
|
disableClose: !this.dismissible(),
|
|
8324
|
+
backdropClass: 'bg-black-overlay-200', // To match Frappe UI
|
|
8325
|
+
panelClass: ['w-full', 'h-full', 'bg-transparent', 'shadow-none'],
|
|
8326
|
+
hasBackdrop: true,
|
|
8327
|
+
viewContainerRef: this.viewContainerRef,
|
|
8306
8328
|
});
|
|
8307
8329
|
this.dialogRef.closed.subscribe(() => {
|
|
8308
|
-
this._isOpen = false;
|
|
8309
|
-
this.openChange.emit(false);
|
|
8310
8330
|
this.dialogRef = null;
|
|
8331
|
+
if (this.openModel()) {
|
|
8332
|
+
this.openModel.set(false);
|
|
8333
|
+
}
|
|
8311
8334
|
});
|
|
8312
8335
|
}
|
|
8313
|
-
|
|
8336
|
+
close() {
|
|
8314
8337
|
if (this.dialogRef) {
|
|
8315
8338
|
this.dialogRef.close();
|
|
8316
8339
|
}
|
|
8317
8340
|
}
|
|
8318
|
-
|
|
8319
|
-
|
|
8320
|
-
|
|
8321
|
-
|
|
8322
|
-
|
|
8323
|
-
|
|
8324
|
-
but typically bottom sheets are opened programmatically or via a button -->
|
|
8325
|
-
<ng-template #sheetTemplate>
|
|
8326
|
-
<div
|
|
8327
|
-
class="fixed inset-x-0 bottom-0 z-50 mx-auto flex max-h-[90dvh] w-full max-w-2xl flex-col rounded-t-[36px] bg-surface-base shadow-lg bottom-sheet-content focus:outline-none after:pointer-events-none after:absolute after:inset-x-0 after:top-full after:h-screen after:bg-surface-base"
|
|
8328
|
-
role="dialog"
|
|
8329
|
-
[attr.aria-label]="title() || 'Bottom sheet'"
|
|
8330
|
-
data-state="open"
|
|
8331
|
-
>
|
|
8332
|
-
<div class="shrink-0 cursor-grab touch-none select-none active:cursor-grabbing">
|
|
8333
|
-
<div class="flex justify-center pb-2 pt-3">
|
|
8334
|
-
<div class="h-1.5 w-10 rounded-full bg-surface-gray-3"></div>
|
|
8335
|
-
</div>
|
|
8336
|
-
@if (title()) {
|
|
8337
|
-
<div class="px-2 pb-3 pt-2 text-center text-3xl-semibold text-ink-gray-9">
|
|
8338
|
-
{{ title() }}
|
|
8339
|
-
</div>
|
|
8340
|
-
}
|
|
8341
|
-
</div>
|
|
8342
|
-
<div class="min-h-0 touch-pan-y overflow-y-auto overscroll-contain">
|
|
8343
|
-
<ng-content></ng-content>
|
|
8344
|
-
</div>
|
|
8345
|
-
</div>
|
|
8346
|
-
</ng-template>
|
|
8347
|
-
`, isInline: true, styles: ["@keyframes bottom-sheet-content-in{0%{transform:translateY(100%)}to{transform:translateY(0)}}@keyframes bottom-sheet-content-out{0%{transform:translateY(0)}to{transform:translateY(100%)}}.bottom-sheet-content[data-state=open]:not([data-dragged]){animation:bottom-sheet-content-in .3s cubic-bezier(.32,.72,0,1)}.bottom-sheet-content[data-state=closed]{animation:bottom-sheet-content-out .2s ease-in}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: DialogModule }] });
|
|
8348
|
-
}
|
|
8349
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: NeuralBottomSheetComponent, decorators: [{
|
|
8350
|
-
type: Component,
|
|
8351
|
-
args: [{ selector: 'neural-bottom-sheet', standalone: true, imports: [CommonModule, DialogModule], template: `
|
|
8352
|
-
<!-- We don't render the trigger directly here if we want to use it as a wrapper,
|
|
8353
|
-
but typically bottom sheets are opened programmatically or via a button -->
|
|
8354
|
-
<ng-template #sheetTemplate>
|
|
8355
|
-
<div
|
|
8356
|
-
class="fixed inset-x-0 bottom-0 z-50 mx-auto flex max-h-[90dvh] w-full max-w-2xl flex-col rounded-t-[36px] bg-surface-base shadow-lg bottom-sheet-content focus:outline-none after:pointer-events-none after:absolute after:inset-x-0 after:top-full after:h-screen after:bg-surface-base"
|
|
8357
|
-
role="dialog"
|
|
8358
|
-
[attr.aria-label]="title() || 'Bottom sheet'"
|
|
8359
|
-
data-state="open"
|
|
8360
|
-
>
|
|
8361
|
-
<div class="shrink-0 cursor-grab touch-none select-none active:cursor-grabbing">
|
|
8362
|
-
<div class="flex justify-center pb-2 pt-3">
|
|
8363
|
-
<div class="h-1.5 w-10 rounded-full bg-surface-gray-3"></div>
|
|
8364
|
-
</div>
|
|
8365
|
-
@if (title()) {
|
|
8366
|
-
<div class="px-2 pb-3 pt-2 text-center text-3xl-semibold text-ink-gray-9">
|
|
8367
|
-
{{ title() }}
|
|
8368
|
-
</div>
|
|
8369
|
-
}
|
|
8370
|
-
</div>
|
|
8371
|
-
<div class="min-h-0 touch-pan-y overflow-y-auto overscroll-contain">
|
|
8372
|
-
<ng-content></ng-content>
|
|
8373
|
-
</div>
|
|
8374
|
-
</div>
|
|
8375
|
-
</ng-template>
|
|
8376
|
-
`, styles: ["@keyframes bottom-sheet-content-in{0%{transform:translateY(100%)}to{transform:translateY(0)}}@keyframes bottom-sheet-content-out{0%{transform:translateY(0)}to{transform:translateY(100%)}}.bottom-sheet-content[data-state=open]:not([data-dragged]){animation:bottom-sheet-content-in .3s cubic-bezier(.32,.72,0,1)}.bottom-sheet-content[data-state=closed]{animation:bottom-sheet-content-out .2s ease-in}\n"] }]
|
|
8377
|
-
}], ctorParameters: () => [{ type: i1$3.Dialog }], propDecorators: { title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], dismissible: [{ type: i0.Input, args: [{ isSignal: true, alias: "dismissible", required: false }] }], openChange: [{
|
|
8378
|
-
type: Output
|
|
8379
|
-
}], sheetTemplate: [{
|
|
8380
|
-
type: ViewChild,
|
|
8381
|
-
args: ['sheetTemplate']
|
|
8382
|
-
}], open: [{
|
|
8383
|
-
type: Input
|
|
8384
|
-
}] } });
|
|
8385
|
-
|
|
8386
|
-
const MONTH_NAMES = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];
|
|
8387
|
-
const DAY_NAMES = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'];
|
|
8388
|
-
function getCalendarDates(month, year) {
|
|
8389
|
-
const firstDay = new Date(year, month, 1);
|
|
8390
|
-
const lastDay = new Date(year, month + 1, 0);
|
|
8391
|
-
const dates = [];
|
|
8392
|
-
// Fill leading days from prev month
|
|
8393
|
-
for (let i = firstDay.getDay(); i > 0; i--) {
|
|
8394
|
-
dates.push(new Date(year, month, 1 - i));
|
|
8395
|
-
}
|
|
8396
|
-
// Current month days
|
|
8397
|
-
for (let d = 1; d <= lastDay.getDate(); d++) {
|
|
8398
|
-
dates.push(new Date(year, month, d));
|
|
8399
|
-
}
|
|
8400
|
-
// Fill trailing days
|
|
8401
|
-
const remaining = 42 - dates.length;
|
|
8402
|
-
for (let i = 1; i <= remaining; i++) {
|
|
8403
|
-
dates.push(new Date(year, month + 1, i));
|
|
8404
|
-
}
|
|
8405
|
-
return dates;
|
|
8406
|
-
}
|
|
8407
|
-
function isSameDay(a, b) {
|
|
8408
|
-
return a.getFullYear() === b.getFullYear() && a.getMonth() === b.getMonth() && a.getDate() === b.getDate();
|
|
8409
|
-
}
|
|
8410
|
-
function dateStr(d) {
|
|
8411
|
-
return d.toISOString().slice(0, 10);
|
|
8412
|
-
}
|
|
8413
|
-
class NeuralCalendarComponent {
|
|
8414
|
-
events = input([], /* @ts-ignore */
|
|
8415
|
-
...(ngDevMode ? [{ debugName: "events" }] : /* istanbul ignore next */ []));
|
|
8416
|
-
defaultView = input('Month', /* @ts-ignore */
|
|
8417
|
-
...(ngDevMode ? [{ debugName: "defaultView" }] : /* istanbul ignore next */ []));
|
|
8418
|
-
disableViews = input([], /* @ts-ignore */
|
|
8419
|
-
...(ngDevMode ? [{ debugName: "disableViews" }] : /* istanbul ignore next */ []));
|
|
8420
|
-
eventClick = new EventEmitter();
|
|
8421
|
-
dateClick = new EventEmitter();
|
|
8422
|
-
create = new EventEmitter();
|
|
8423
|
-
update = new EventEmitter();
|
|
8424
|
-
delete = new EventEmitter();
|
|
8425
|
-
activeView = signal('Month', /* @ts-ignore */
|
|
8426
|
-
...(ngDevMode ? [{ debugName: "activeView" }] : /* istanbul ignore next */ []));
|
|
8427
|
-
today = new Date();
|
|
8428
|
-
currentYear = signal(this.today.getFullYear(), /* @ts-ignore */
|
|
8429
|
-
...(ngDevMode ? [{ debugName: "currentYear" }] : /* istanbul ignore next */ []));
|
|
8430
|
-
currentMonth = signal(this.today.getMonth(), /* @ts-ignore */
|
|
8431
|
-
...(ngDevMode ? [{ debugName: "currentMonth" }] : /* istanbul ignore next */ []));
|
|
8432
|
-
selectedDay = signal(new Date(), /* @ts-ignore */
|
|
8433
|
-
...(ngDevMode ? [{ debugName: "selectedDay" }] : /* istanbul ignore next */ []));
|
|
8434
|
-
dayNames = DAY_NAMES;
|
|
8435
|
-
MONTH_NAMES = MONTH_NAMES;
|
|
8436
|
-
keyHandler = this.handleKey.bind(this);
|
|
8437
|
-
enabledViews = computed(() => {
|
|
8438
|
-
const all = ['Month', 'Week', 'Day'];
|
|
8439
|
-
return all.filter(v => !this.disableViews().includes(v));
|
|
8440
|
-
}, /* @ts-ignore */
|
|
8441
|
-
...(ngDevMode ? [{ debugName: "enabledViews" }] : /* istanbul ignore next */ []));
|
|
8442
|
-
monthDates = computed(() => getCalendarDates(this.currentMonth(), this.currentYear()), /* @ts-ignore */
|
|
8443
|
-
...(ngDevMode ? [{ debugName: "monthDates" }] : /* istanbul ignore next */ []));
|
|
8444
|
-
currentWeekDates = computed(() => {
|
|
8445
|
-
const d = this.selectedDay();
|
|
8446
|
-
const dow = d.getDay();
|
|
8447
|
-
const start = new Date(d);
|
|
8448
|
-
start.setDate(d.getDate() - dow);
|
|
8449
|
-
return Array.from({ length: 7 }, (_, i) => {
|
|
8450
|
-
const day = new Date(start);
|
|
8451
|
-
day.setDate(start.getDate() + i);
|
|
8452
|
-
return day;
|
|
8453
|
-
});
|
|
8454
|
-
}, /* @ts-ignore */
|
|
8455
|
-
...(ngDevMode ? [{ debugName: "currentWeekDates" }] : /* istanbul ignore next */ []));
|
|
8456
|
-
currentMonthYear = computed(() => {
|
|
8457
|
-
const v = this.activeView();
|
|
8458
|
-
if (v === 'Day') {
|
|
8459
|
-
const d = this.selectedDay();
|
|
8460
|
-
return `${DAY_NAMES[d.getDay()]}, ${d.getDate()} ${MONTH_NAMES[d.getMonth()]} ${d.getFullYear()}`;
|
|
8461
|
-
}
|
|
8462
|
-
if (v === 'Week') {
|
|
8463
|
-
const dates = this.currentWeekDates();
|
|
8464
|
-
const first = dates[0];
|
|
8465
|
-
const last = dates[6];
|
|
8466
|
-
if (first.getMonth() === last.getMonth()) {
|
|
8467
|
-
return `${MONTH_NAMES[first.getMonth()]} ${first.getFullYear()}`;
|
|
8341
|
+
onContainerClick(event) {
|
|
8342
|
+
const target = event.target;
|
|
8343
|
+
// Close if the click is on the scroll container or the flex wrapper (not inside the dialog card)
|
|
8344
|
+
if (target.classList.contains('dialog-scroll-container') || target.classList.contains('min-h-screen')) {
|
|
8345
|
+
if (this.dismissible()) {
|
|
8346
|
+
this.close();
|
|
8468
8347
|
}
|
|
8469
|
-
return `${MONTH_NAMES[first.getMonth()].slice(0, 3)} – ${MONTH_NAMES[last.getMonth()].slice(0, 3)} ${last.getFullYear()}`;
|
|
8470
8348
|
}
|
|
8471
|
-
return `${MONTH_NAMES[this.currentMonth()]} ${this.currentYear()}`;
|
|
8472
|
-
}, /* @ts-ignore */
|
|
8473
|
-
...(ngDevMode ? [{ debugName: "currentMonthYear" }] : /* istanbul ignore next */ []));
|
|
8474
|
-
ngOnInit() {
|
|
8475
|
-
this.activeView.set(this.defaultView());
|
|
8476
|
-
window.addEventListener('keydown', this.keyHandler);
|
|
8477
8349
|
}
|
|
8478
8350
|
ngOnDestroy() {
|
|
8479
|
-
|
|
8351
|
+
if (this.dialogRef) {
|
|
8352
|
+
this.dialogRef.close();
|
|
8353
|
+
}
|
|
8480
8354
|
}
|
|
8481
|
-
|
|
8482
|
-
const
|
|
8483
|
-
|
|
8484
|
-
|
|
8485
|
-
|
|
8486
|
-
|
|
8487
|
-
|
|
8355
|
+
sizeClass = computed(() => {
|
|
8356
|
+
const map = {
|
|
8357
|
+
xs: 'max-w-xs',
|
|
8358
|
+
sm: 'max-w-sm',
|
|
8359
|
+
md: 'max-w-md',
|
|
8360
|
+
lg: 'max-w-lg',
|
|
8361
|
+
xl: 'max-w-xl',
|
|
8362
|
+
'2xl': 'max-w-2xl',
|
|
8363
|
+
'3xl': 'max-w-3xl',
|
|
8364
|
+
'4xl': 'max-w-4xl',
|
|
8365
|
+
'5xl': 'max-w-5xl',
|
|
8366
|
+
'6xl': 'max-w-6xl',
|
|
8367
|
+
'7xl': 'max-w-7xl',
|
|
8368
|
+
};
|
|
8369
|
+
return map[this.size()] || 'max-w-lg';
|
|
8370
|
+
}, /* @ts-ignore */
|
|
8371
|
+
...(ngDevMode ? [{ debugName: "sizeClass" }] : /* istanbul ignore next */ []));
|
|
8372
|
+
iconName = computed(() => {
|
|
8373
|
+
const raw = this.icon();
|
|
8374
|
+
if (!raw)
|
|
8375
|
+
return '';
|
|
8376
|
+
return typeof raw === 'string' ? raw : raw.name;
|
|
8377
|
+
}, /* @ts-ignore */
|
|
8378
|
+
...(ngDevMode ? [{ debugName: "iconName" }] : /* istanbul ignore next */ []));
|
|
8379
|
+
iconTheme = computed(() => {
|
|
8380
|
+
const raw = this.icon();
|
|
8381
|
+
if (typeof raw === 'object' && raw.theme)
|
|
8382
|
+
return raw.theme;
|
|
8383
|
+
return null;
|
|
8384
|
+
}, /* @ts-ignore */
|
|
8385
|
+
...(ngDevMode ? [{ debugName: "iconTheme" }] : /* istanbul ignore next */ []));
|
|
8386
|
+
dialogIconBgClasses = computed(() => {
|
|
8387
|
+
const theme = this.iconTheme();
|
|
8388
|
+
if (!theme)
|
|
8389
|
+
return 'bg-surface-gray-2';
|
|
8390
|
+
const map = {
|
|
8391
|
+
amber: 'bg-surface-amber-2',
|
|
8392
|
+
blue: 'bg-surface-blue-2',
|
|
8393
|
+
red: 'bg-surface-red-2',
|
|
8394
|
+
green: 'bg-surface-green-2',
|
|
8395
|
+
};
|
|
8396
|
+
return map[theme] || 'bg-surface-gray-2';
|
|
8397
|
+
}, /* @ts-ignore */
|
|
8398
|
+
...(ngDevMode ? [{ debugName: "dialogIconBgClasses" }] : /* istanbul ignore next */ []));
|
|
8399
|
+
dialogIconClasses = computed(() => {
|
|
8400
|
+
const theme = this.iconTheme();
|
|
8401
|
+
if (!theme)
|
|
8402
|
+
return 'text-ink-gray-5';
|
|
8403
|
+
const map = {
|
|
8404
|
+
amber: 'text-ink-amber-5',
|
|
8405
|
+
blue: 'text-ink-blue-5',
|
|
8406
|
+
red: 'text-ink-red-7',
|
|
8407
|
+
green: 'text-ink-green-5',
|
|
8408
|
+
};
|
|
8409
|
+
return map[theme] || 'text-ink-gray-5';
|
|
8410
|
+
}, /* @ts-ignore */
|
|
8411
|
+
...(ngDevMode ? [{ debugName: "dialogIconClasses" }] : /* istanbul ignore next */ []));
|
|
8412
|
+
dialogPositionClasses = computed(() => {
|
|
8413
|
+
if (this.paddingTop())
|
|
8414
|
+
return '';
|
|
8415
|
+
return this.position() === 'top' ? 'pt-[20vh]' : 'justify-center';
|
|
8416
|
+
}, /* @ts-ignore */
|
|
8417
|
+
...(ngDevMode ? [{ debugName: "dialogPositionClasses" }] : /* istanbul ignore next */ []));
|
|
8418
|
+
dialogPositionStyles = computed(() => {
|
|
8419
|
+
const pt = this.paddingTop();
|
|
8420
|
+
return pt ? { paddingTop: pt } : {};
|
|
8421
|
+
}, /* @ts-ignore */
|
|
8422
|
+
...(ngDevMode ? [{ debugName: "dialogPositionStyles" }] : /* istanbul ignore next */ []));
|
|
8423
|
+
showHeader = computed(() => {
|
|
8424
|
+
if (this.bare())
|
|
8425
|
+
return false;
|
|
8426
|
+
if (this.hasTitleSlot())
|
|
8427
|
+
return true;
|
|
8428
|
+
if (this.title())
|
|
8429
|
+
return true;
|
|
8430
|
+
return false;
|
|
8431
|
+
}, /* @ts-ignore */
|
|
8432
|
+
...(ngDevMode ? [{ debugName: "showHeader" }] : /* istanbul ignore next */ []));
|
|
8433
|
+
reactiveActions = computed(() => {
|
|
8434
|
+
if (this.bare())
|
|
8435
|
+
return [];
|
|
8436
|
+
return this.actions().map(action => {
|
|
8437
|
+
return {
|
|
8438
|
+
...action,
|
|
8439
|
+
loading: this.internalActionsState[action.label] || false
|
|
8440
|
+
};
|
|
8441
|
+
});
|
|
8442
|
+
}, /* @ts-ignore */
|
|
8443
|
+
...(ngDevMode ? [{ debugName: "reactiveActions" }] : /* istanbul ignore next */ []));
|
|
8444
|
+
isSingleActionFullWidth = computed(() => {
|
|
8445
|
+
const smallSizes = ['xs', 'sm', 'md'];
|
|
8446
|
+
return this.actions().length === 1 && smallSizes.includes(this.size());
|
|
8447
|
+
}, /* @ts-ignore */
|
|
8448
|
+
...(ngDevMode ? [{ debugName: "isSingleActionFullWidth" }] : /* istanbul ignore next */ []));
|
|
8449
|
+
async onActionClick(action) {
|
|
8450
|
+
if (!action.onClick) {
|
|
8451
|
+
this.close();
|
|
8452
|
+
return;
|
|
8453
|
+
}
|
|
8454
|
+
this.internalActionsState[action.label] = true;
|
|
8455
|
+
// trigger change detection by recreating the reference since it's a signal reading internalState
|
|
8456
|
+
// Or we could just use a separate mechanism. Let's mutate and trust Angular template binding if we update state.
|
|
8457
|
+
// In signal components, we might need a signal for internalActionsState
|
|
8458
|
+
// For now, let's just await
|
|
8459
|
+
try {
|
|
8460
|
+
await action.onClick({ close: () => this.close() });
|
|
8461
|
+
}
|
|
8462
|
+
finally {
|
|
8463
|
+
this.internalActionsState[action.label] = false;
|
|
8464
|
+
}
|
|
8465
|
+
}
|
|
8466
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: NeuralDialogComponent, deps: [{ token: i1$3.Dialog }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
8467
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.4", type: NeuralDialogComponent, isStandalone: true, selector: "neural-dialog", inputs: { openModel: { classPropertyName: "openModel", publicName: "openModel", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, message: { classPropertyName: "message", publicName: "message", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null }, paddingTop: { classPropertyName: "paddingTop", publicName: "paddingTop", isSignal: true, isRequired: false, transformFunction: null }, actions: { classPropertyName: "actions", publicName: "actions", isSignal: true, isRequired: false, transformFunction: null }, dismissible: { classPropertyName: "dismissible", publicName: "dismissible", isSignal: true, isRequired: false, transformFunction: null }, showCloseButton: { classPropertyName: "showCloseButton", publicName: "showCloseButton", isSignal: true, isRequired: false, transformFunction: null }, bare: { classPropertyName: "bare", publicName: "bare", isSignal: true, isRequired: false, transformFunction: null }, hasTitleSlot: { classPropertyName: "hasTitleSlot", publicName: "hasTitleSlot", isSignal: true, isRequired: false, transformFunction: null }, hasActionsSlot: { classPropertyName: "hasActionsSlot", publicName: "hasActionsSlot", isSignal: true, isRequired: false, transformFunction: null }, hasDefaultSlot: { classPropertyName: "hasDefaultSlot", publicName: "hasDefaultSlot", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { openModel: "openModelChange" }, viewQueries: [{ propertyName: "dialogTemplate", first: true, predicate: ["dialogTemplate"], descendants: true }], ngImport: i0, template: `
|
|
8468
|
+
<ng-template #dialogTemplate>
|
|
8469
|
+
<div
|
|
8470
|
+
class="fixed inset-0 z-50 overflow-y-auto dialog-scroll-container"
|
|
8471
|
+
(click)="onContainerClick($event)"
|
|
8472
|
+
>
|
|
8473
|
+
<div
|
|
8474
|
+
class="flex min-h-screen flex-col items-center px-4 py-4 text-center"
|
|
8475
|
+
[class]="dialogPositionClasses()"
|
|
8476
|
+
[style]="dialogPositionStyles()"
|
|
8477
|
+
>
|
|
8478
|
+
<div
|
|
8479
|
+
class="my-8 inline-block w-full transform overflow-hidden rounded-7 bg-surface-elevation-1 text-start align-middle shadow-xl dialog-content focus-visible:outline-none"
|
|
8480
|
+
[class]="sizeClass()"
|
|
8481
|
+
>
|
|
8482
|
+
@if (bare()) {
|
|
8483
|
+
<ng-content></ng-content>
|
|
8484
|
+
} @else {
|
|
8485
|
+
<div class="bg-surface-elevation-1 px-4 pb-6 pt-5 sm:px-6">
|
|
8486
|
+
<div class="flex">
|
|
8487
|
+
<div class="w-full flex-1">
|
|
8488
|
+
@if (showHeader()) {
|
|
8489
|
+
<div class="mb-6 flex items-center justify-between">
|
|
8490
|
+
<div class="flex items-center space-x-2 flex-1">
|
|
8491
|
+
@if (icon()) {
|
|
8492
|
+
<div
|
|
8493
|
+
class="flex h-7 w-7 flex-shrink-0 items-center justify-center rounded-full"
|
|
8494
|
+
[class]="dialogIconBgClasses()"
|
|
8495
|
+
>
|
|
8496
|
+
<span [class]="iconName() + ' size-4 ' + dialogIconClasses()" aria-hidden="true"></span>
|
|
8497
|
+
</div>
|
|
8498
|
+
}
|
|
8499
|
+
<header class="flex-1">
|
|
8500
|
+
@if (hasTitleSlot()) {
|
|
8501
|
+
<ng-content select="[title]"></ng-content>
|
|
8502
|
+
} @else if (title()) {
|
|
8503
|
+
<h3 class="text-2xl-semibold leading-6 text-ink-gray-8">
|
|
8504
|
+
{{ title() }}
|
|
8505
|
+
</h3>
|
|
8506
|
+
}
|
|
8507
|
+
</header>
|
|
8508
|
+
</div>
|
|
8509
|
+
@if (showCloseButton()) {
|
|
8510
|
+
<neural-button variant="ghost" label="Close" (click)="close()">
|
|
8511
|
+
<span icon class="lucide-x size-4 text-ink-gray-9"></span>
|
|
8512
|
+
</neural-button>
|
|
8513
|
+
}
|
|
8514
|
+
</div>
|
|
8515
|
+
}
|
|
8516
|
+
|
|
8517
|
+
@if (hasDefaultSlot()) {
|
|
8518
|
+
<ng-content></ng-content>
|
|
8519
|
+
} @else if (message()) {
|
|
8520
|
+
<p class="text-p-base text-ink-gray-7">
|
|
8521
|
+
{{ message() }}
|
|
8522
|
+
</p>
|
|
8523
|
+
}
|
|
8524
|
+
</div>
|
|
8525
|
+
</div>
|
|
8526
|
+
</div>
|
|
8527
|
+
|
|
8528
|
+
@if (reactiveActions().length || hasActionsSlot()) {
|
|
8529
|
+
<div class="px-4 pb-7 pt-4 sm:px-6">
|
|
8530
|
+
@if (hasActionsSlot()) {
|
|
8531
|
+
<ng-content select="[actions]"></ng-content>
|
|
8532
|
+
} @else {
|
|
8533
|
+
<div [class]="isSingleActionFullWidth() ? '' : 'flex justify-end gap-2'">
|
|
8534
|
+
@for (action of reactiveActions(); track action.label) {
|
|
8535
|
+
<neural-button
|
|
8536
|
+
class="w-full sm:w-auto"
|
|
8537
|
+
[disabled]="action.disabled || false"
|
|
8538
|
+
[loading]="action.loading || false"
|
|
8539
|
+
[variant]="action.variant || 'solid'"
|
|
8540
|
+
[theme]="action.theme || 'gray'"
|
|
8541
|
+
(click)="onActionClick(action)"
|
|
8542
|
+
>
|
|
8543
|
+
{{ action.label }}
|
|
8544
|
+
@if (action.icon) {
|
|
8545
|
+
<span icon [class]="action.icon + ' size-4'"></span>
|
|
8546
|
+
}
|
|
8547
|
+
</neural-button>
|
|
8548
|
+
}
|
|
8549
|
+
</div>
|
|
8550
|
+
}
|
|
8551
|
+
</div>
|
|
8552
|
+
}
|
|
8553
|
+
}
|
|
8554
|
+
|
|
8555
|
+
@if (showCloseButton() && !showHeader() && !bare()) {
|
|
8556
|
+
<neural-button
|
|
8557
|
+
class="absolute right-4 top-4 z-10"
|
|
8558
|
+
variant="ghost"
|
|
8559
|
+
label="Close"
|
|
8560
|
+
(click)="close()"
|
|
8561
|
+
>
|
|
8562
|
+
<span icon class="lucide-x size-4 text-ink-gray-9"></span>
|
|
8563
|
+
</neural-button>
|
|
8564
|
+
}
|
|
8565
|
+
</div>
|
|
8566
|
+
</div>
|
|
8567
|
+
</div>
|
|
8568
|
+
</ng-template>
|
|
8569
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: DialogModule }, { kind: "component", type: NeuralButtonComponent, selector: "neural-button", inputs: ["variant", "theme", "size", "type", "disabled", "loading", "icon", "iconLeft", "iconRight", "iconOnly"], outputs: ["clicked"] }] });
|
|
8570
|
+
}
|
|
8571
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: NeuralDialogComponent, decorators: [{
|
|
8572
|
+
type: Component,
|
|
8573
|
+
args: [{
|
|
8574
|
+
selector: 'neural-dialog',
|
|
8575
|
+
standalone: true,
|
|
8576
|
+
imports: [CommonModule, DialogModule, NeuralButtonComponent],
|
|
8577
|
+
template: `
|
|
8578
|
+
<ng-template #dialogTemplate>
|
|
8579
|
+
<div
|
|
8580
|
+
class="fixed inset-0 z-50 overflow-y-auto dialog-scroll-container"
|
|
8581
|
+
(click)="onContainerClick($event)"
|
|
8582
|
+
>
|
|
8583
|
+
<div
|
|
8584
|
+
class="flex min-h-screen flex-col items-center px-4 py-4 text-center"
|
|
8585
|
+
[class]="dialogPositionClasses()"
|
|
8586
|
+
[style]="dialogPositionStyles()"
|
|
8587
|
+
>
|
|
8588
|
+
<div
|
|
8589
|
+
class="my-8 inline-block w-full transform overflow-hidden rounded-7 bg-surface-elevation-1 text-start align-middle shadow-xl dialog-content focus-visible:outline-none"
|
|
8590
|
+
[class]="sizeClass()"
|
|
8591
|
+
>
|
|
8592
|
+
@if (bare()) {
|
|
8593
|
+
<ng-content></ng-content>
|
|
8594
|
+
} @else {
|
|
8595
|
+
<div class="bg-surface-elevation-1 px-4 pb-6 pt-5 sm:px-6">
|
|
8596
|
+
<div class="flex">
|
|
8597
|
+
<div class="w-full flex-1">
|
|
8598
|
+
@if (showHeader()) {
|
|
8599
|
+
<div class="mb-6 flex items-center justify-between">
|
|
8600
|
+
<div class="flex items-center space-x-2 flex-1">
|
|
8601
|
+
@if (icon()) {
|
|
8602
|
+
<div
|
|
8603
|
+
class="flex h-7 w-7 flex-shrink-0 items-center justify-center rounded-full"
|
|
8604
|
+
[class]="dialogIconBgClasses()"
|
|
8605
|
+
>
|
|
8606
|
+
<span [class]="iconName() + ' size-4 ' + dialogIconClasses()" aria-hidden="true"></span>
|
|
8607
|
+
</div>
|
|
8608
|
+
}
|
|
8609
|
+
<header class="flex-1">
|
|
8610
|
+
@if (hasTitleSlot()) {
|
|
8611
|
+
<ng-content select="[title]"></ng-content>
|
|
8612
|
+
} @else if (title()) {
|
|
8613
|
+
<h3 class="text-2xl-semibold leading-6 text-ink-gray-8">
|
|
8614
|
+
{{ title() }}
|
|
8615
|
+
</h3>
|
|
8616
|
+
}
|
|
8617
|
+
</header>
|
|
8618
|
+
</div>
|
|
8619
|
+
@if (showCloseButton()) {
|
|
8620
|
+
<neural-button variant="ghost" label="Close" (click)="close()">
|
|
8621
|
+
<span icon class="lucide-x size-4 text-ink-gray-9"></span>
|
|
8622
|
+
</neural-button>
|
|
8623
|
+
}
|
|
8624
|
+
</div>
|
|
8625
|
+
}
|
|
8626
|
+
|
|
8627
|
+
@if (hasDefaultSlot()) {
|
|
8628
|
+
<ng-content></ng-content>
|
|
8629
|
+
} @else if (message()) {
|
|
8630
|
+
<p class="text-p-base text-ink-gray-7">
|
|
8631
|
+
{{ message() }}
|
|
8632
|
+
</p>
|
|
8633
|
+
}
|
|
8634
|
+
</div>
|
|
8635
|
+
</div>
|
|
8636
|
+
</div>
|
|
8637
|
+
|
|
8638
|
+
@if (reactiveActions().length || hasActionsSlot()) {
|
|
8639
|
+
<div class="px-4 pb-7 pt-4 sm:px-6">
|
|
8640
|
+
@if (hasActionsSlot()) {
|
|
8641
|
+
<ng-content select="[actions]"></ng-content>
|
|
8642
|
+
} @else {
|
|
8643
|
+
<div [class]="isSingleActionFullWidth() ? '' : 'flex justify-end gap-2'">
|
|
8644
|
+
@for (action of reactiveActions(); track action.label) {
|
|
8645
|
+
<neural-button
|
|
8646
|
+
class="w-full sm:w-auto"
|
|
8647
|
+
[disabled]="action.disabled || false"
|
|
8648
|
+
[loading]="action.loading || false"
|
|
8649
|
+
[variant]="action.variant || 'solid'"
|
|
8650
|
+
[theme]="action.theme || 'gray'"
|
|
8651
|
+
(click)="onActionClick(action)"
|
|
8652
|
+
>
|
|
8653
|
+
{{ action.label }}
|
|
8654
|
+
@if (action.icon) {
|
|
8655
|
+
<span icon [class]="action.icon + ' size-4'"></span>
|
|
8656
|
+
}
|
|
8657
|
+
</neural-button>
|
|
8658
|
+
}
|
|
8659
|
+
</div>
|
|
8660
|
+
}
|
|
8661
|
+
</div>
|
|
8662
|
+
}
|
|
8663
|
+
}
|
|
8664
|
+
|
|
8665
|
+
@if (showCloseButton() && !showHeader() && !bare()) {
|
|
8666
|
+
<neural-button
|
|
8667
|
+
class="absolute right-4 top-4 z-10"
|
|
8668
|
+
variant="ghost"
|
|
8669
|
+
label="Close"
|
|
8670
|
+
(click)="close()"
|
|
8671
|
+
>
|
|
8672
|
+
<span icon class="lucide-x size-4 text-ink-gray-9"></span>
|
|
8673
|
+
</neural-button>
|
|
8674
|
+
}
|
|
8675
|
+
</div>
|
|
8676
|
+
</div>
|
|
8677
|
+
</div>
|
|
8678
|
+
</ng-template>
|
|
8679
|
+
`
|
|
8680
|
+
}]
|
|
8681
|
+
}], ctorParameters: () => [{ type: i1$3.Dialog }, { type: i0.ViewContainerRef }], propDecorators: { openModel: [{ type: i0.Input, args: [{ isSignal: true, alias: "openModel", required: false }] }, { type: i0.Output, args: ["openModelChange"] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], message: [{ type: i0.Input, args: [{ isSignal: true, alias: "message", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], position: [{ type: i0.Input, args: [{ isSignal: true, alias: "position", required: false }] }], paddingTop: [{ type: i0.Input, args: [{ isSignal: true, alias: "paddingTop", required: false }] }], actions: [{ type: i0.Input, args: [{ isSignal: true, alias: "actions", required: false }] }], dismissible: [{ type: i0.Input, args: [{ isSignal: true, alias: "dismissible", required: false }] }], showCloseButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "showCloseButton", required: false }] }], bare: [{ type: i0.Input, args: [{ isSignal: true, alias: "bare", required: false }] }], hasTitleSlot: [{ type: i0.Input, args: [{ isSignal: true, alias: "hasTitleSlot", required: false }] }], hasActionsSlot: [{ type: i0.Input, args: [{ isSignal: true, alias: "hasActionsSlot", required: false }] }], hasDefaultSlot: [{ type: i0.Input, args: [{ isSignal: true, alias: "hasDefaultSlot", required: false }] }], dialogTemplate: [{
|
|
8682
|
+
type: ViewChild,
|
|
8683
|
+
args: ['dialogTemplate']
|
|
8684
|
+
}] } });
|
|
8685
|
+
|
|
8686
|
+
class NeuralAwesomeBarComponent {
|
|
8687
|
+
searchInput;
|
|
8688
|
+
// Two-way binding for dialog visibility
|
|
8689
|
+
openModel = model(false, /* @ts-ignore */
|
|
8690
|
+
...(ngDevMode ? [{ debugName: "openModel" }] : /* istanbul ignore next */ []));
|
|
8691
|
+
// Search query
|
|
8692
|
+
query = model('', /* @ts-ignore */
|
|
8693
|
+
...(ngDevMode ? [{ debugName: "query" }] : /* istanbul ignore next */ []));
|
|
8694
|
+
// Filters
|
|
8695
|
+
filters = input([], /* @ts-ignore */
|
|
8696
|
+
...(ngDevMode ? [{ debugName: "filters" }] : /* istanbul ignore next */ []));
|
|
8697
|
+
activeFilter = model('all', /* @ts-ignore */
|
|
8698
|
+
...(ngDevMode ? [{ debugName: "activeFilter" }] : /* istanbul ignore next */ []));
|
|
8699
|
+
// Show empty state manually if the parent determines there are no results or it's pristine
|
|
8700
|
+
isEmpty = input(true, /* @ts-ignore */
|
|
8701
|
+
...(ngDevMode ? [{ debugName: "isEmpty" }] : /* istanbul ignore next */ []));
|
|
8702
|
+
// Outputs
|
|
8703
|
+
onSearch = output();
|
|
8704
|
+
constructor() {
|
|
8705
|
+
effect(() => {
|
|
8706
|
+
// Auto focus input when dialog opens
|
|
8707
|
+
if (this.openModel() && this.searchInput) {
|
|
8708
|
+
setTimeout(() => {
|
|
8709
|
+
this.searchInput.nativeElement.focus();
|
|
8710
|
+
}, 50); // slight delay to allow dialog animation
|
|
8711
|
+
}
|
|
8712
|
+
});
|
|
8713
|
+
}
|
|
8714
|
+
ngAfterViewInit() {
|
|
8715
|
+
if (this.openModel() && this.searchInput) {
|
|
8716
|
+
setTimeout(() => {
|
|
8717
|
+
this.searchInput.nativeElement.focus();
|
|
8718
|
+
}, 50);
|
|
8719
|
+
}
|
|
8720
|
+
}
|
|
8721
|
+
// Computed properties for filters
|
|
8722
|
+
pinnedFilters = computed(() => {
|
|
8723
|
+
return this.filters().filter(f => f.pinned);
|
|
8724
|
+
}, /* @ts-ignore */
|
|
8725
|
+
...(ngDevMode ? [{ debugName: "pinnedFilters" }] : /* istanbul ignore next */ []));
|
|
8726
|
+
unpinnedFilters = computed(() => {
|
|
8727
|
+
return this.filters().filter(f => !f.pinned);
|
|
8728
|
+
}, /* @ts-ignore */
|
|
8729
|
+
...(ngDevMode ? [{ debugName: "unpinnedFilters" }] : /* istanbul ignore next */ []));
|
|
8730
|
+
moreFiltersOptions = computed(() => {
|
|
8731
|
+
return this.unpinnedFilters().map(filter => ({
|
|
8732
|
+
label: filter.label,
|
|
8733
|
+
onClick: () => this.selectFilter(filter.id)
|
|
8734
|
+
}));
|
|
8735
|
+
}, /* @ts-ignore */
|
|
8736
|
+
...(ngDevMode ? [{ debugName: "moreFiltersOptions" }] : /* istanbul ignore next */ []));
|
|
8737
|
+
isUnpinnedFilterActive = computed(() => {
|
|
8738
|
+
const unpinned = this.unpinnedFilters();
|
|
8739
|
+
return unpinned.some(f => f.id === this.activeFilter());
|
|
8740
|
+
}, /* @ts-ignore */
|
|
8741
|
+
...(ngDevMode ? [{ debugName: "isUnpinnedFilterActive" }] : /* istanbul ignore next */ []));
|
|
8742
|
+
showEmptyState = computed(() => {
|
|
8743
|
+
return this.isEmpty() || this.query().trim() === '';
|
|
8744
|
+
}, /* @ts-ignore */
|
|
8745
|
+
...(ngDevMode ? [{ debugName: "showEmptyState" }] : /* istanbul ignore next */ []));
|
|
8746
|
+
// Handlers
|
|
8747
|
+
onQueryChange(value) {
|
|
8748
|
+
this.query.set(value);
|
|
8749
|
+
this.onSearch.emit(value);
|
|
8750
|
+
}
|
|
8751
|
+
clearQuery() {
|
|
8752
|
+
this.query.set('');
|
|
8753
|
+
this.onSearch.emit('');
|
|
8754
|
+
this.searchInput.nativeElement.focus();
|
|
8755
|
+
}
|
|
8756
|
+
selectFilter(filterId) {
|
|
8757
|
+
this.activeFilter.set(filterId);
|
|
8758
|
+
this.searchInput.nativeElement.focus();
|
|
8759
|
+
}
|
|
8760
|
+
handleKeydown(event) {
|
|
8761
|
+
if (event.key === 'Escape') {
|
|
8762
|
+
this.openModel.set(false);
|
|
8763
|
+
}
|
|
8764
|
+
// Up, Down, Enter logic is expected to be handled externally since we project results,
|
|
8765
|
+
// or we can emit events so the parent can handle it.
|
|
8766
|
+
}
|
|
8767
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: NeuralAwesomeBarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
8768
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.4", type: NeuralAwesomeBarComponent, isStandalone: true, selector: "neural-awesome-bar", inputs: { openModel: { classPropertyName: "openModel", publicName: "openModel", isSignal: true, isRequired: false, transformFunction: null }, query: { classPropertyName: "query", publicName: "query", isSignal: true, isRequired: false, transformFunction: null }, filters: { classPropertyName: "filters", publicName: "filters", isSignal: true, isRequired: false, transformFunction: null }, activeFilter: { classPropertyName: "activeFilter", publicName: "activeFilter", isSignal: true, isRequired: false, transformFunction: null }, isEmpty: { classPropertyName: "isEmpty", publicName: "isEmpty", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { openModel: "openModelChange", query: "queryChange", activeFilter: "activeFilterChange", onSearch: "onSearch" }, viewQueries: [{ propertyName: "searchInput", first: true, predicate: ["searchInput"], descendants: true }], ngImport: i0, template: `
|
|
8769
|
+
<neural-dialog [(openModel)]="openModel" [bare]="true" size="2xl" position="top" paddingTop="10vh">
|
|
8770
|
+
<div class="flex flex-col bg-surface-base rounded-xl shadow-2xl overflow-hidden ring-1 ring-outline-gray-2 w-full max-h-[85vh]">
|
|
8771
|
+
|
|
8772
|
+
<!-- Search Input Header -->
|
|
8773
|
+
<div class="flex items-center px-4 py-3 border-b border-outline-gray-2 bg-surface-base">
|
|
8774
|
+
<i class="lucide-search size-5 text-ink-gray-5 mr-3"></i>
|
|
8775
|
+
<input
|
|
8776
|
+
#searchInput
|
|
8777
|
+
type="text"
|
|
8778
|
+
class="flex-1 bg-transparent border-none outline-none text-lg text-ink-gray-9 placeholder:text-ink-gray-4 focus:ring-0 p-0"
|
|
8779
|
+
placeholder="Buscar por cualquier cosa..."
|
|
8780
|
+
[ngModel]="query()"
|
|
8781
|
+
(ngModelChange)="onQueryChange($event)"
|
|
8782
|
+
(keydown)="handleKeydown($event)"
|
|
8783
|
+
/>
|
|
8784
|
+
@if (query()) {
|
|
8785
|
+
<button
|
|
8786
|
+
class="flex items-center justify-center size-6 rounded-md hover:bg-surface-gray-2 transition-colors ml-2"
|
|
8787
|
+
(click)="clearQuery()"
|
|
8788
|
+
>
|
|
8789
|
+
<i class="lucide-x size-4 text-ink-gray-5"></i>
|
|
8790
|
+
</button>
|
|
8791
|
+
}
|
|
8792
|
+
</div>
|
|
8793
|
+
|
|
8794
|
+
<!-- Filters (Chips) -->
|
|
8795
|
+
@if (filters().length > 0) {
|
|
8796
|
+
<div class="flex items-center gap-2 px-4 py-2 border-b border-outline-gray-2 bg-surface-gray-1 overflow-x-auto no-scrollbar">
|
|
8797
|
+
<!-- Pinned Filters -->
|
|
8798
|
+
@for (filter of pinnedFilters(); track filter.id) {
|
|
8799
|
+
<button
|
|
8800
|
+
class="px-3 py-1 rounded-full text-xs font-medium whitespace-nowrap transition-colors"
|
|
8801
|
+
[class.bg-surface-gray-9]="activeFilter() === filter.id"
|
|
8802
|
+
[class.text-white]="activeFilter() === filter.id"
|
|
8803
|
+
[class.bg-surface-base]="activeFilter() !== filter.id"
|
|
8804
|
+
[class.text-ink-gray-7]="activeFilter() !== filter.id"
|
|
8805
|
+
[class.border]="activeFilter() !== filter.id"
|
|
8806
|
+
[class.border-outline-gray-3]="activeFilter() !== filter.id"
|
|
8807
|
+
[class.hover:bg-surface-gray-2]="activeFilter() !== filter.id"
|
|
8808
|
+
(click)="selectFilter(filter.id)"
|
|
8809
|
+
>
|
|
8810
|
+
{{ filter.label }}
|
|
8811
|
+
</button>
|
|
8812
|
+
}
|
|
8813
|
+
|
|
8814
|
+
<!-- Unpinned Filters (Dropdown) -->
|
|
8815
|
+
@if (unpinnedFilters().length > 0) {
|
|
8816
|
+
<div class="ml-auto">
|
|
8817
|
+
<neural-dropdown
|
|
8818
|
+
[options]="moreFiltersOptions()"
|
|
8819
|
+
[hasTriggerSlot]="true"
|
|
8820
|
+
align="end"
|
|
8821
|
+
>
|
|
8822
|
+
<button
|
|
8823
|
+
trigger
|
|
8824
|
+
class="flex items-center gap-1.5 px-3 py-1 rounded-full text-xs font-medium whitespace-nowrap transition-colors border border-outline-gray-3 bg-surface-base text-ink-gray-7 hover:bg-surface-gray-2"
|
|
8825
|
+
[class.bg-surface-gray-9]="isUnpinnedFilterActive()"
|
|
8826
|
+
[class.text-white]="isUnpinnedFilterActive()"
|
|
8827
|
+
>
|
|
8828
|
+
<i class="lucide-menu size-3.5"></i>
|
|
8829
|
+
Más
|
|
8830
|
+
</button>
|
|
8831
|
+
</neural-dropdown>
|
|
8832
|
+
</div>
|
|
8833
|
+
}
|
|
8834
|
+
</div>
|
|
8835
|
+
}
|
|
8836
|
+
|
|
8837
|
+
<!-- Content Area -->
|
|
8838
|
+
<div class="flex-1 overflow-y-auto">
|
|
8839
|
+
@if (showEmptyState()) {
|
|
8840
|
+
<!-- Empty State -->
|
|
8841
|
+
<div class="flex flex-col items-center justify-center py-16 px-4 text-center">
|
|
8842
|
+
<div class="size-16 rounded-full bg-surface-gray-2 flex items-center justify-center mb-4">
|
|
8843
|
+
<i class="lucide-search size-8 text-ink-gray-4"></i>
|
|
8844
|
+
</div>
|
|
8845
|
+
<h3 class="text-base font-semibold text-ink-gray-9 mb-1">Buscar por cualquier cosa</h3>
|
|
8846
|
+
<p class="text-sm text-ink-gray-5 max-w-sm">
|
|
8847
|
+
Escribe para buscar a través de módulos, clientes, productos y configuraciones.
|
|
8848
|
+
</p>
|
|
8849
|
+
</div>
|
|
8850
|
+
} @else {
|
|
8851
|
+
<!-- Results Projection -->
|
|
8852
|
+
<div class="p-2">
|
|
8853
|
+
<ng-content select="[results]"></ng-content>
|
|
8854
|
+
</div>
|
|
8855
|
+
}
|
|
8856
|
+
</div>
|
|
8857
|
+
|
|
8858
|
+
<!-- Footer Shortcuts -->
|
|
8859
|
+
<div class="flex items-center justify-between px-4 py-2 bg-surface-gray-1 border-t border-outline-gray-2 text-xs text-ink-gray-5">
|
|
8860
|
+
<div class="flex items-center gap-4">
|
|
8861
|
+
<span class="flex items-center gap-1.5">
|
|
8862
|
+
<kbd class="px-1.5 py-0.5 rounded border border-outline-gray-3 bg-surface-base font-sans text-[10px] text-ink-gray-7 shadow-sm">↑</kbd>
|
|
8863
|
+
<kbd class="px-1.5 py-0.5 rounded border border-outline-gray-3 bg-surface-base font-sans text-[10px] text-ink-gray-7 shadow-sm">↓</kbd>
|
|
8864
|
+
Navegar
|
|
8865
|
+
</span>
|
|
8866
|
+
<span class="flex items-center gap-1.5">
|
|
8867
|
+
<kbd class="px-1.5 py-0.5 rounded border border-outline-gray-3 bg-surface-base font-sans text-[10px] text-ink-gray-7 shadow-sm">↵</kbd>
|
|
8868
|
+
Seleccionar
|
|
8869
|
+
</span>
|
|
8870
|
+
</div>
|
|
8871
|
+
<div class="flex items-center gap-1.5 hidden sm:flex">
|
|
8872
|
+
<kbd class="px-1.5 py-0.5 rounded border border-outline-gray-3 bg-surface-base font-sans text-[10px] text-ink-gray-7 shadow-sm">esc</kbd>
|
|
8873
|
+
Cerrar
|
|
8874
|
+
</div>
|
|
8875
|
+
</div>
|
|
8876
|
+
|
|
8877
|
+
</div>
|
|
8878
|
+
</neural-dialog>
|
|
8879
|
+
`, isInline: true, styles: [".no-scrollbar::-webkit-scrollbar{display:none}.no-scrollbar{-ms-overflow-style:none;scrollbar-width:none}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: NeuralDialogComponent, selector: "neural-dialog", inputs: ["openModel", "title", "message", "icon", "size", "position", "paddingTop", "actions", "dismissible", "showCloseButton", "bare", "hasTitleSlot", "hasActionsSlot", "hasDefaultSlot"], outputs: ["openModelChange"] }, { kind: "component", type: NeuralDropdownComponent, selector: "neural-dropdown", inputs: ["options", "side", "align", "offset", "buttonLabel", "hasTriggerSlot"] }] });
|
|
8880
|
+
}
|
|
8881
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: NeuralAwesomeBarComponent, decorators: [{
|
|
8882
|
+
type: Component,
|
|
8883
|
+
args: [{ selector: 'neural-awesome-bar', standalone: true, imports: [
|
|
8884
|
+
CommonModule,
|
|
8885
|
+
FormsModule,
|
|
8886
|
+
NeuralDialogComponent,
|
|
8887
|
+
NeuralDropdownComponent
|
|
8888
|
+
], template: `
|
|
8889
|
+
<neural-dialog [(openModel)]="openModel" [bare]="true" size="2xl" position="top" paddingTop="10vh">
|
|
8890
|
+
<div class="flex flex-col bg-surface-base rounded-xl shadow-2xl overflow-hidden ring-1 ring-outline-gray-2 w-full max-h-[85vh]">
|
|
8891
|
+
|
|
8892
|
+
<!-- Search Input Header -->
|
|
8893
|
+
<div class="flex items-center px-4 py-3 border-b border-outline-gray-2 bg-surface-base">
|
|
8894
|
+
<i class="lucide-search size-5 text-ink-gray-5 mr-3"></i>
|
|
8895
|
+
<input
|
|
8896
|
+
#searchInput
|
|
8897
|
+
type="text"
|
|
8898
|
+
class="flex-1 bg-transparent border-none outline-none text-lg text-ink-gray-9 placeholder:text-ink-gray-4 focus:ring-0 p-0"
|
|
8899
|
+
placeholder="Buscar por cualquier cosa..."
|
|
8900
|
+
[ngModel]="query()"
|
|
8901
|
+
(ngModelChange)="onQueryChange($event)"
|
|
8902
|
+
(keydown)="handleKeydown($event)"
|
|
8903
|
+
/>
|
|
8904
|
+
@if (query()) {
|
|
8905
|
+
<button
|
|
8906
|
+
class="flex items-center justify-center size-6 rounded-md hover:bg-surface-gray-2 transition-colors ml-2"
|
|
8907
|
+
(click)="clearQuery()"
|
|
8908
|
+
>
|
|
8909
|
+
<i class="lucide-x size-4 text-ink-gray-5"></i>
|
|
8910
|
+
</button>
|
|
8911
|
+
}
|
|
8912
|
+
</div>
|
|
8913
|
+
|
|
8914
|
+
<!-- Filters (Chips) -->
|
|
8915
|
+
@if (filters().length > 0) {
|
|
8916
|
+
<div class="flex items-center gap-2 px-4 py-2 border-b border-outline-gray-2 bg-surface-gray-1 overflow-x-auto no-scrollbar">
|
|
8917
|
+
<!-- Pinned Filters -->
|
|
8918
|
+
@for (filter of pinnedFilters(); track filter.id) {
|
|
8919
|
+
<button
|
|
8920
|
+
class="px-3 py-1 rounded-full text-xs font-medium whitespace-nowrap transition-colors"
|
|
8921
|
+
[class.bg-surface-gray-9]="activeFilter() === filter.id"
|
|
8922
|
+
[class.text-white]="activeFilter() === filter.id"
|
|
8923
|
+
[class.bg-surface-base]="activeFilter() !== filter.id"
|
|
8924
|
+
[class.text-ink-gray-7]="activeFilter() !== filter.id"
|
|
8925
|
+
[class.border]="activeFilter() !== filter.id"
|
|
8926
|
+
[class.border-outline-gray-3]="activeFilter() !== filter.id"
|
|
8927
|
+
[class.hover:bg-surface-gray-2]="activeFilter() !== filter.id"
|
|
8928
|
+
(click)="selectFilter(filter.id)"
|
|
8929
|
+
>
|
|
8930
|
+
{{ filter.label }}
|
|
8931
|
+
</button>
|
|
8932
|
+
}
|
|
8933
|
+
|
|
8934
|
+
<!-- Unpinned Filters (Dropdown) -->
|
|
8935
|
+
@if (unpinnedFilters().length > 0) {
|
|
8936
|
+
<div class="ml-auto">
|
|
8937
|
+
<neural-dropdown
|
|
8938
|
+
[options]="moreFiltersOptions()"
|
|
8939
|
+
[hasTriggerSlot]="true"
|
|
8940
|
+
align="end"
|
|
8941
|
+
>
|
|
8942
|
+
<button
|
|
8943
|
+
trigger
|
|
8944
|
+
class="flex items-center gap-1.5 px-3 py-1 rounded-full text-xs font-medium whitespace-nowrap transition-colors border border-outline-gray-3 bg-surface-base text-ink-gray-7 hover:bg-surface-gray-2"
|
|
8945
|
+
[class.bg-surface-gray-9]="isUnpinnedFilterActive()"
|
|
8946
|
+
[class.text-white]="isUnpinnedFilterActive()"
|
|
8947
|
+
>
|
|
8948
|
+
<i class="lucide-menu size-3.5"></i>
|
|
8949
|
+
Más
|
|
8950
|
+
</button>
|
|
8951
|
+
</neural-dropdown>
|
|
8952
|
+
</div>
|
|
8953
|
+
}
|
|
8954
|
+
</div>
|
|
8955
|
+
}
|
|
8956
|
+
|
|
8957
|
+
<!-- Content Area -->
|
|
8958
|
+
<div class="flex-1 overflow-y-auto">
|
|
8959
|
+
@if (showEmptyState()) {
|
|
8960
|
+
<!-- Empty State -->
|
|
8961
|
+
<div class="flex flex-col items-center justify-center py-16 px-4 text-center">
|
|
8962
|
+
<div class="size-16 rounded-full bg-surface-gray-2 flex items-center justify-center mb-4">
|
|
8963
|
+
<i class="lucide-search size-8 text-ink-gray-4"></i>
|
|
8964
|
+
</div>
|
|
8965
|
+
<h3 class="text-base font-semibold text-ink-gray-9 mb-1">Buscar por cualquier cosa</h3>
|
|
8966
|
+
<p class="text-sm text-ink-gray-5 max-w-sm">
|
|
8967
|
+
Escribe para buscar a través de módulos, clientes, productos y configuraciones.
|
|
8968
|
+
</p>
|
|
8969
|
+
</div>
|
|
8970
|
+
} @else {
|
|
8971
|
+
<!-- Results Projection -->
|
|
8972
|
+
<div class="p-2">
|
|
8973
|
+
<ng-content select="[results]"></ng-content>
|
|
8974
|
+
</div>
|
|
8975
|
+
}
|
|
8976
|
+
</div>
|
|
8977
|
+
|
|
8978
|
+
<!-- Footer Shortcuts -->
|
|
8979
|
+
<div class="flex items-center justify-between px-4 py-2 bg-surface-gray-1 border-t border-outline-gray-2 text-xs text-ink-gray-5">
|
|
8980
|
+
<div class="flex items-center gap-4">
|
|
8981
|
+
<span class="flex items-center gap-1.5">
|
|
8982
|
+
<kbd class="px-1.5 py-0.5 rounded border border-outline-gray-3 bg-surface-base font-sans text-[10px] text-ink-gray-7 shadow-sm">↑</kbd>
|
|
8983
|
+
<kbd class="px-1.5 py-0.5 rounded border border-outline-gray-3 bg-surface-base font-sans text-[10px] text-ink-gray-7 shadow-sm">↓</kbd>
|
|
8984
|
+
Navegar
|
|
8985
|
+
</span>
|
|
8986
|
+
<span class="flex items-center gap-1.5">
|
|
8987
|
+
<kbd class="px-1.5 py-0.5 rounded border border-outline-gray-3 bg-surface-base font-sans text-[10px] text-ink-gray-7 shadow-sm">↵</kbd>
|
|
8988
|
+
Seleccionar
|
|
8989
|
+
</span>
|
|
8990
|
+
</div>
|
|
8991
|
+
<div class="flex items-center gap-1.5 hidden sm:flex">
|
|
8992
|
+
<kbd class="px-1.5 py-0.5 rounded border border-outline-gray-3 bg-surface-base font-sans text-[10px] text-ink-gray-7 shadow-sm">esc</kbd>
|
|
8993
|
+
Cerrar
|
|
8994
|
+
</div>
|
|
8995
|
+
</div>
|
|
8996
|
+
|
|
8997
|
+
</div>
|
|
8998
|
+
</neural-dialog>
|
|
8999
|
+
`, styles: [".no-scrollbar::-webkit-scrollbar{display:none}.no-scrollbar{-ms-overflow-style:none;scrollbar-width:none}\n"] }]
|
|
9000
|
+
}], ctorParameters: () => [], propDecorators: { searchInput: [{
|
|
9001
|
+
type: ViewChild,
|
|
9002
|
+
args: ['searchInput']
|
|
9003
|
+
}], openModel: [{ type: i0.Input, args: [{ isSignal: true, alias: "openModel", required: false }] }, { type: i0.Output, args: ["openModelChange"] }], query: [{ type: i0.Input, args: [{ isSignal: true, alias: "query", required: false }] }, { type: i0.Output, args: ["queryChange"] }], filters: [{ type: i0.Input, args: [{ isSignal: true, alias: "filters", required: false }] }], activeFilter: [{ type: i0.Input, args: [{ isSignal: true, alias: "activeFilter", required: false }] }, { type: i0.Output, args: ["activeFilterChange"] }], isEmpty: [{ type: i0.Input, args: [{ isSignal: true, alias: "isEmpty", required: false }] }], onSearch: [{ type: i0.Output, args: ["onSearch"] }] } });
|
|
9004
|
+
|
|
9005
|
+
class NeuralBottomSheetComponent {
|
|
9006
|
+
dialog;
|
|
9007
|
+
title = input('', /* @ts-ignore */
|
|
9008
|
+
...(ngDevMode ? [{ debugName: "title" }] : /* istanbul ignore next */ []));
|
|
9009
|
+
dismissible = input(true, /* @ts-ignore */
|
|
9010
|
+
...(ngDevMode ? [{ debugName: "dismissible" }] : /* istanbul ignore next */ []));
|
|
9011
|
+
openChange = new EventEmitter();
|
|
9012
|
+
sheetTemplate;
|
|
9013
|
+
dialogRef = null;
|
|
9014
|
+
_isOpen = false;
|
|
9015
|
+
constructor(dialog) {
|
|
9016
|
+
this.dialog = dialog;
|
|
9017
|
+
}
|
|
9018
|
+
set open(value) {
|
|
9019
|
+
if (value && !this._isOpen) {
|
|
9020
|
+
this.openSheet();
|
|
9021
|
+
}
|
|
9022
|
+
else if (!value && this._isOpen) {
|
|
9023
|
+
this.closeSheet();
|
|
9024
|
+
}
|
|
9025
|
+
}
|
|
9026
|
+
get open() {
|
|
9027
|
+
return this._isOpen;
|
|
9028
|
+
}
|
|
9029
|
+
openSheet() {
|
|
9030
|
+
if (this._isOpen)
|
|
9031
|
+
return;
|
|
9032
|
+
this._isOpen = true;
|
|
9033
|
+
this.openChange.emit(true);
|
|
9034
|
+
this.dialogRef = this.dialog.open(this.sheetTemplate, {
|
|
9035
|
+
panelClass: 'neural-bottom-sheet-panel',
|
|
9036
|
+
backdropClass: ['fixed', 'inset-0', 'z-50', 'bg-black-overlay-200', 'dark:bg-black-overlay-700'],
|
|
9037
|
+
hasBackdrop: true,
|
|
9038
|
+
disableClose: !this.dismissible(),
|
|
9039
|
+
});
|
|
9040
|
+
this.dialogRef.closed.subscribe(() => {
|
|
9041
|
+
this._isOpen = false;
|
|
9042
|
+
this.openChange.emit(false);
|
|
9043
|
+
this.dialogRef = null;
|
|
9044
|
+
});
|
|
9045
|
+
}
|
|
9046
|
+
closeSheet() {
|
|
9047
|
+
if (this.dialogRef) {
|
|
9048
|
+
this.dialogRef.close();
|
|
9049
|
+
}
|
|
9050
|
+
}
|
|
9051
|
+
ngOnDestroy() {
|
|
9052
|
+
this.closeSheet();
|
|
9053
|
+
}
|
|
9054
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: NeuralBottomSheetComponent, deps: [{ token: i1$3.Dialog }], target: i0.ɵɵFactoryTarget.Component });
|
|
9055
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.4", type: NeuralBottomSheetComponent, isStandalone: true, selector: "neural-bottom-sheet", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, dismissible: { classPropertyName: "dismissible", publicName: "dismissible", isSignal: true, isRequired: false, transformFunction: null }, open: { classPropertyName: "open", publicName: "open", isSignal: false, isRequired: false, transformFunction: null } }, outputs: { openChange: "openChange" }, viewQueries: [{ propertyName: "sheetTemplate", first: true, predicate: ["sheetTemplate"], descendants: true }], ngImport: i0, template: `
|
|
9056
|
+
<!-- We don't render the trigger directly here if we want to use it as a wrapper,
|
|
9057
|
+
but typically bottom sheets are opened programmatically or via a button -->
|
|
9058
|
+
<ng-template #sheetTemplate>
|
|
9059
|
+
<div
|
|
9060
|
+
class="fixed inset-x-0 bottom-0 z-50 mx-auto flex max-h-[90dvh] w-full max-w-2xl flex-col rounded-t-[36px] bg-surface-base shadow-lg bottom-sheet-content focus:outline-none after:pointer-events-none after:absolute after:inset-x-0 after:top-full after:h-screen after:bg-surface-base"
|
|
9061
|
+
role="dialog"
|
|
9062
|
+
[attr.aria-label]="title() || 'Bottom sheet'"
|
|
9063
|
+
data-state="open"
|
|
9064
|
+
>
|
|
9065
|
+
<div class="shrink-0 cursor-grab touch-none select-none active:cursor-grabbing">
|
|
9066
|
+
<div class="flex justify-center pb-2 pt-3">
|
|
9067
|
+
<div class="h-1.5 w-10 rounded-full bg-surface-gray-3"></div>
|
|
9068
|
+
</div>
|
|
9069
|
+
@if (title()) {
|
|
9070
|
+
<div class="px-2 pb-3 pt-2 text-center text-3xl-semibold text-ink-gray-9">
|
|
9071
|
+
{{ title() }}
|
|
9072
|
+
</div>
|
|
9073
|
+
}
|
|
9074
|
+
</div>
|
|
9075
|
+
<div class="min-h-0 touch-pan-y overflow-y-auto overscroll-contain">
|
|
9076
|
+
<ng-content></ng-content>
|
|
9077
|
+
</div>
|
|
9078
|
+
</div>
|
|
9079
|
+
</ng-template>
|
|
9080
|
+
`, isInline: true, styles: ["@keyframes bottom-sheet-content-in{0%{transform:translateY(100%)}to{transform:translateY(0)}}@keyframes bottom-sheet-content-out{0%{transform:translateY(0)}to{transform:translateY(100%)}}.bottom-sheet-content[data-state=open]:not([data-dragged]){animation:bottom-sheet-content-in .3s cubic-bezier(.32,.72,0,1)}.bottom-sheet-content[data-state=closed]{animation:bottom-sheet-content-out .2s ease-in}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: DialogModule }] });
|
|
9081
|
+
}
|
|
9082
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: NeuralBottomSheetComponent, decorators: [{
|
|
9083
|
+
type: Component,
|
|
9084
|
+
args: [{ selector: 'neural-bottom-sheet', standalone: true, imports: [CommonModule, DialogModule], template: `
|
|
9085
|
+
<!-- We don't render the trigger directly here if we want to use it as a wrapper,
|
|
9086
|
+
but typically bottom sheets are opened programmatically or via a button -->
|
|
9087
|
+
<ng-template #sheetTemplate>
|
|
9088
|
+
<div
|
|
9089
|
+
class="fixed inset-x-0 bottom-0 z-50 mx-auto flex max-h-[90dvh] w-full max-w-2xl flex-col rounded-t-[36px] bg-surface-base shadow-lg bottom-sheet-content focus:outline-none after:pointer-events-none after:absolute after:inset-x-0 after:top-full after:h-screen after:bg-surface-base"
|
|
9090
|
+
role="dialog"
|
|
9091
|
+
[attr.aria-label]="title() || 'Bottom sheet'"
|
|
9092
|
+
data-state="open"
|
|
9093
|
+
>
|
|
9094
|
+
<div class="shrink-0 cursor-grab touch-none select-none active:cursor-grabbing">
|
|
9095
|
+
<div class="flex justify-center pb-2 pt-3">
|
|
9096
|
+
<div class="h-1.5 w-10 rounded-full bg-surface-gray-3"></div>
|
|
9097
|
+
</div>
|
|
9098
|
+
@if (title()) {
|
|
9099
|
+
<div class="px-2 pb-3 pt-2 text-center text-3xl-semibold text-ink-gray-9">
|
|
9100
|
+
{{ title() }}
|
|
9101
|
+
</div>
|
|
9102
|
+
}
|
|
9103
|
+
</div>
|
|
9104
|
+
<div class="min-h-0 touch-pan-y overflow-y-auto overscroll-contain">
|
|
9105
|
+
<ng-content></ng-content>
|
|
9106
|
+
</div>
|
|
9107
|
+
</div>
|
|
9108
|
+
</ng-template>
|
|
9109
|
+
`, styles: ["@keyframes bottom-sheet-content-in{0%{transform:translateY(100%)}to{transform:translateY(0)}}@keyframes bottom-sheet-content-out{0%{transform:translateY(0)}to{transform:translateY(100%)}}.bottom-sheet-content[data-state=open]:not([data-dragged]){animation:bottom-sheet-content-in .3s cubic-bezier(.32,.72,0,1)}.bottom-sheet-content[data-state=closed]{animation:bottom-sheet-content-out .2s ease-in}\n"] }]
|
|
9110
|
+
}], ctorParameters: () => [{ type: i1$3.Dialog }], propDecorators: { title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], dismissible: [{ type: i0.Input, args: [{ isSignal: true, alias: "dismissible", required: false }] }], openChange: [{
|
|
9111
|
+
type: Output
|
|
9112
|
+
}], sheetTemplate: [{
|
|
9113
|
+
type: ViewChild,
|
|
9114
|
+
args: ['sheetTemplate']
|
|
9115
|
+
}], open: [{
|
|
9116
|
+
type: Input
|
|
9117
|
+
}] } });
|
|
9118
|
+
|
|
9119
|
+
const MONTH_NAMES = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];
|
|
9120
|
+
const DAY_NAMES = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'];
|
|
9121
|
+
function getCalendarDates(month, year) {
|
|
9122
|
+
const firstDay = new Date(year, month, 1);
|
|
9123
|
+
const lastDay = new Date(year, month + 1, 0);
|
|
9124
|
+
const dates = [];
|
|
9125
|
+
// Fill leading days from prev month
|
|
9126
|
+
for (let i = firstDay.getDay(); i > 0; i--) {
|
|
9127
|
+
dates.push(new Date(year, month, 1 - i));
|
|
9128
|
+
}
|
|
9129
|
+
// Current month days
|
|
9130
|
+
for (let d = 1; d <= lastDay.getDate(); d++) {
|
|
9131
|
+
dates.push(new Date(year, month, d));
|
|
9132
|
+
}
|
|
9133
|
+
// Fill trailing days
|
|
9134
|
+
const remaining = 42 - dates.length;
|
|
9135
|
+
for (let i = 1; i <= remaining; i++) {
|
|
9136
|
+
dates.push(new Date(year, month + 1, i));
|
|
9137
|
+
}
|
|
9138
|
+
return dates;
|
|
9139
|
+
}
|
|
9140
|
+
function isSameDay(a, b) {
|
|
9141
|
+
return a.getFullYear() === b.getFullYear() && a.getMonth() === b.getMonth() && a.getDate() === b.getDate();
|
|
9142
|
+
}
|
|
9143
|
+
function dateStr(d) {
|
|
9144
|
+
return d.toISOString().slice(0, 10);
|
|
9145
|
+
}
|
|
9146
|
+
class NeuralCalendarComponent {
|
|
9147
|
+
events = input([], /* @ts-ignore */
|
|
9148
|
+
...(ngDevMode ? [{ debugName: "events" }] : /* istanbul ignore next */ []));
|
|
9149
|
+
defaultView = input('Month', /* @ts-ignore */
|
|
9150
|
+
...(ngDevMode ? [{ debugName: "defaultView" }] : /* istanbul ignore next */ []));
|
|
9151
|
+
disableViews = input([], /* @ts-ignore */
|
|
9152
|
+
...(ngDevMode ? [{ debugName: "disableViews" }] : /* istanbul ignore next */ []));
|
|
9153
|
+
eventClick = new EventEmitter();
|
|
9154
|
+
dateClick = new EventEmitter();
|
|
9155
|
+
create = new EventEmitter();
|
|
9156
|
+
update = new EventEmitter();
|
|
9157
|
+
delete = new EventEmitter();
|
|
9158
|
+
activeView = signal('Month', /* @ts-ignore */
|
|
9159
|
+
...(ngDevMode ? [{ debugName: "activeView" }] : /* istanbul ignore next */ []));
|
|
9160
|
+
today = new Date();
|
|
9161
|
+
currentYear = signal(this.today.getFullYear(), /* @ts-ignore */
|
|
9162
|
+
...(ngDevMode ? [{ debugName: "currentYear" }] : /* istanbul ignore next */ []));
|
|
9163
|
+
currentMonth = signal(this.today.getMonth(), /* @ts-ignore */
|
|
9164
|
+
...(ngDevMode ? [{ debugName: "currentMonth" }] : /* istanbul ignore next */ []));
|
|
9165
|
+
selectedDay = signal(new Date(), /* @ts-ignore */
|
|
9166
|
+
...(ngDevMode ? [{ debugName: "selectedDay" }] : /* istanbul ignore next */ []));
|
|
9167
|
+
dayNames = DAY_NAMES;
|
|
9168
|
+
MONTH_NAMES = MONTH_NAMES;
|
|
9169
|
+
keyHandler = this.handleKey.bind(this);
|
|
9170
|
+
enabledViews = computed(() => {
|
|
9171
|
+
const all = ['Month', 'Week', 'Day'];
|
|
9172
|
+
return all.filter(v => !this.disableViews().includes(v));
|
|
9173
|
+
}, /* @ts-ignore */
|
|
9174
|
+
...(ngDevMode ? [{ debugName: "enabledViews" }] : /* istanbul ignore next */ []));
|
|
9175
|
+
monthDates = computed(() => getCalendarDates(this.currentMonth(), this.currentYear()), /* @ts-ignore */
|
|
9176
|
+
...(ngDevMode ? [{ debugName: "monthDates" }] : /* istanbul ignore next */ []));
|
|
9177
|
+
currentWeekDates = computed(() => {
|
|
9178
|
+
const d = this.selectedDay();
|
|
9179
|
+
const dow = d.getDay();
|
|
9180
|
+
const start = new Date(d);
|
|
9181
|
+
start.setDate(d.getDate() - dow);
|
|
9182
|
+
return Array.from({ length: 7 }, (_, i) => {
|
|
9183
|
+
const day = new Date(start);
|
|
9184
|
+
day.setDate(start.getDate() + i);
|
|
9185
|
+
return day;
|
|
9186
|
+
});
|
|
9187
|
+
}, /* @ts-ignore */
|
|
9188
|
+
...(ngDevMode ? [{ debugName: "currentWeekDates" }] : /* istanbul ignore next */ []));
|
|
9189
|
+
currentMonthYear = computed(() => {
|
|
9190
|
+
const v = this.activeView();
|
|
9191
|
+
if (v === 'Day') {
|
|
9192
|
+
const d = this.selectedDay();
|
|
9193
|
+
return `${DAY_NAMES[d.getDay()]}, ${d.getDate()} ${MONTH_NAMES[d.getMonth()]} ${d.getFullYear()}`;
|
|
9194
|
+
}
|
|
9195
|
+
if (v === 'Week') {
|
|
9196
|
+
const dates = this.currentWeekDates();
|
|
9197
|
+
const first = dates[0];
|
|
9198
|
+
const last = dates[6];
|
|
9199
|
+
if (first.getMonth() === last.getMonth()) {
|
|
9200
|
+
return `${MONTH_NAMES[first.getMonth()]} ${first.getFullYear()}`;
|
|
9201
|
+
}
|
|
9202
|
+
return `${MONTH_NAMES[first.getMonth()].slice(0, 3)} – ${MONTH_NAMES[last.getMonth()].slice(0, 3)} ${last.getFullYear()}`;
|
|
9203
|
+
}
|
|
9204
|
+
return `${MONTH_NAMES[this.currentMonth()]} ${this.currentYear()}`;
|
|
9205
|
+
}, /* @ts-ignore */
|
|
9206
|
+
...(ngDevMode ? [{ debugName: "currentMonthYear" }] : /* istanbul ignore next */ []));
|
|
9207
|
+
ngOnInit() {
|
|
9208
|
+
this.activeView.set(this.defaultView());
|
|
9209
|
+
window.addEventListener('keydown', this.keyHandler);
|
|
9210
|
+
}
|
|
9211
|
+
ngOnDestroy() {
|
|
9212
|
+
window.removeEventListener('keydown', this.keyHandler);
|
|
9213
|
+
}
|
|
9214
|
+
handleKey(e) {
|
|
9215
|
+
const target = e.target;
|
|
9216
|
+
if (target?.tagName === 'INPUT' || target?.tagName === 'TEXTAREA' || target?.isContentEditable)
|
|
9217
|
+
return;
|
|
9218
|
+
if (e.key.toLowerCase() === 'm')
|
|
9219
|
+
this.activeView.set('Month');
|
|
9220
|
+
if (e.key.toLowerCase() === 'w')
|
|
8488
9221
|
this.activeView.set('Week');
|
|
8489
9222
|
if (e.key.toLowerCase() === 'd')
|
|
8490
9223
|
this.activeView.set('Day');
|
|
@@ -10360,607 +11093,194 @@ class NeuralCodeEditorComponent {
|
|
|
10360
11093
|
this.languageCompartment = new Compartment();
|
|
10361
11094
|
this.disabledCompartment = new Compartment();
|
|
10362
11095
|
this.variantCompartment = new Compartment();
|
|
10363
|
-
this.sizeCompartment = new Compartment();
|
|
10364
|
-
this.placeholderCompartment = new Compartment();
|
|
10365
|
-
const theme = buildBaseTheme(this.cmView);
|
|
10366
|
-
const highlight = await buildSyntaxHighlight(this.cmState);
|
|
10367
|
-
const updateListener = EditorView.updateListener.of((update) => {
|
|
10368
|
-
if (update.docChanged && !this.syncingFromProp) {
|
|
10369
|
-
this.modelValue.set(update.state.doc.toString());
|
|
10370
|
-
}
|
|
10371
|
-
if (update.docChanged || update.geometryChanged) {
|
|
10372
|
-
this.measureOverflow();
|
|
10373
|
-
this.syncGutterShadow();
|
|
10374
|
-
}
|
|
10375
|
-
});
|
|
10376
|
-
const blurHandler = EditorView.domEventHandlers({
|
|
10377
|
-
blur: () => {
|
|
10378
|
-
if (this.view)
|
|
10379
|
-
this.change.emit(this.view.state.doc.toString());
|
|
10380
|
-
},
|
|
10381
|
-
});
|
|
10382
|
-
const escapeHandler = EditorView.domEventHandlers({
|
|
10383
|
-
keydown: (e, v) => {
|
|
10384
|
-
if (e.key === 'Escape') {
|
|
10385
|
-
v.contentDOM.blur();
|
|
10386
|
-
return true;
|
|
10387
|
-
}
|
|
10388
|
-
return false;
|
|
10389
|
-
},
|
|
10390
|
-
});
|
|
10391
|
-
if (!this.editorRoot?.nativeElement)
|
|
10392
|
-
return;
|
|
10393
|
-
this.view = new EditorView({
|
|
10394
|
-
doc: this.modelValue() ?? '',
|
|
10395
|
-
extensions: [
|
|
10396
|
-
basicSetup,
|
|
10397
|
-
this.cmView.keymap.of([indentWithTab]),
|
|
10398
|
-
escapeHandler,
|
|
10399
|
-
this.languageCompartment.of(await this.buildLanguageExtension(this.language())),
|
|
10400
|
-
this.disabledCompartment.of(this.buildDisabled(!!this.disabled())),
|
|
10401
|
-
updateListener,
|
|
10402
|
-
blurHandler,
|
|
10403
|
-
theme,
|
|
10404
|
-
this.variantCompartment.of(this.buildVariant(this.variant(), this.disabled())),
|
|
10405
|
-
this.sizeCompartment.of(this.buildSize(this.size())),
|
|
10406
|
-
this.placeholderCompartment.of(this.buildPlaceholder(this.placeholder())),
|
|
10407
|
-
highlight,
|
|
10408
|
-
],
|
|
10409
|
-
parent: this.editorRoot.nativeElement,
|
|
10410
|
-
});
|
|
10411
|
-
this.measureOverflow();
|
|
10412
|
-
this.view.scrollDOM.addEventListener('scroll', this.syncGutterShadow, { passive: true });
|
|
10413
|
-
this.syncGutterShadow();
|
|
10414
|
-
if (typeof ResizeObserver !== 'undefined') {
|
|
10415
|
-
this.overflowObserver = new ResizeObserver(() => {
|
|
10416
|
-
this.measureOverflow();
|
|
10417
|
-
this.syncGutterShadow();
|
|
10418
|
-
});
|
|
10419
|
-
this.overflowObserver.observe(this.view.scrollDOM);
|
|
10420
|
-
}
|
|
10421
|
-
}
|
|
10422
|
-
ngOnDestroy() {
|
|
10423
|
-
this.overflowObserver?.disconnect();
|
|
10424
|
-
if (this.view) {
|
|
10425
|
-
this.view.scrollDOM.removeEventListener('scroll', this.syncGutterShadow);
|
|
10426
|
-
this.view.destroy();
|
|
10427
|
-
this.view = null;
|
|
10428
|
-
}
|
|
10429
|
-
}
|
|
10430
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: NeuralCodeEditorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
10431
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.4", type: NeuralCodeEditorComponent, isStandalone: true, selector: "neural-code-editor", inputs: { modelValue: { classPropertyName: "modelValue", publicName: "modelValue", isSignal: true, isRequired: false, transformFunction: null }, language: { classPropertyName: "language", publicName: "language", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, description: { classPropertyName: "description", publicName: "description", isSignal: true, isRequired: false, transformFunction: null }, error: { classPropertyName: "error", publicName: "error", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { modelValue: "modelValueChange", overflow: "overflow", change: "change" }, viewQueries: [{ propertyName: "editorRoot", first: true, predicate: ["editorRoot"], descendants: true }], ngImport: i0, template: `
|
|
10432
|
-
<neural-labeling-wrapper [enabled]="hasLabeling()">
|
|
10433
|
-
@if (label()) {
|
|
10434
|
-
<neural-input-label [id]="labelIdValue" [label]="label()" [required]="required()">
|
|
10435
|
-
<ng-content select="[label]"></ng-content>
|
|
10436
|
-
</neural-input-label>
|
|
10437
|
-
}
|
|
10438
|
-
|
|
10439
|
-
<div
|
|
10440
|
-
#editorRoot
|
|
10441
|
-
class="code-editor"
|
|
10442
|
-
data-slot="control"
|
|
10443
|
-
></div>
|
|
10444
|
-
|
|
10445
|
-
@if (description()) {
|
|
10446
|
-
<neural-input-description [id]="descriptionIdValue" [description]="description()">
|
|
10447
|
-
<ng-content select="[description]"></ng-content>
|
|
10448
|
-
</neural-input-description>
|
|
10449
|
-
}
|
|
10450
|
-
|
|
10451
|
-
@if (errorLines().length) {
|
|
10452
|
-
<neural-input-error [id]="errorIdValue" [lines]="errorLines()"></neural-input-error>
|
|
10453
|
-
}
|
|
10454
|
-
</neural-labeling-wrapper>
|
|
10455
|
-
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: NeuralInputLabelComponent, selector: "neural-input-label", inputs: ["id", "forId", "label", "required", "color", "disabled", "hasDefaultSlot"] }, { kind: "component", type: NeuralInputDescriptionComponent, selector: "neural-input-description", inputs: ["id", "description", "disabled", "hasDefaultSlot"] }, { kind: "component", type: NeuralInputErrorComponent, selector: "neural-input-error", inputs: ["id", "lines"] }, { kind: "component", type: NeuralLabelingWrapperComponent, selector: "neural-labeling-wrapper", inputs: ["enabled"] }] });
|
|
10456
|
-
}
|
|
10457
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: NeuralCodeEditorComponent, decorators: [{
|
|
10458
|
-
type: Component,
|
|
10459
|
-
args: [{
|
|
10460
|
-
selector: 'neural-code-editor',
|
|
10461
|
-
standalone: true,
|
|
10462
|
-
imports: [
|
|
10463
|
-
CommonModule,
|
|
10464
|
-
NeuralInputLabelComponent,
|
|
10465
|
-
NeuralInputDescriptionComponent,
|
|
10466
|
-
NeuralInputErrorComponent,
|
|
10467
|
-
NeuralLabelingWrapperComponent
|
|
10468
|
-
],
|
|
10469
|
-
template: `
|
|
10470
|
-
<neural-labeling-wrapper [enabled]="hasLabeling()">
|
|
10471
|
-
@if (label()) {
|
|
10472
|
-
<neural-input-label [id]="labelIdValue" [label]="label()" [required]="required()">
|
|
10473
|
-
<ng-content select="[label]"></ng-content>
|
|
10474
|
-
</neural-input-label>
|
|
10475
|
-
}
|
|
10476
|
-
|
|
10477
|
-
<div
|
|
10478
|
-
#editorRoot
|
|
10479
|
-
class="code-editor"
|
|
10480
|
-
data-slot="control"
|
|
10481
|
-
></div>
|
|
10482
|
-
|
|
10483
|
-
@if (description()) {
|
|
10484
|
-
<neural-input-description [id]="descriptionIdValue" [description]="description()">
|
|
10485
|
-
<ng-content select="[description]"></ng-content>
|
|
10486
|
-
</neural-input-description>
|
|
10487
|
-
}
|
|
10488
|
-
|
|
10489
|
-
@if (errorLines().length) {
|
|
10490
|
-
<neural-input-error [id]="errorIdValue" [lines]="errorLines()"></neural-input-error>
|
|
10491
|
-
}
|
|
10492
|
-
</neural-labeling-wrapper>
|
|
10493
|
-
`
|
|
10494
|
-
}]
|
|
10495
|
-
}], ctorParameters: () => [], propDecorators: { modelValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "modelValue", required: false }] }, { type: i0.Output, args: ["modelValueChange"] }], language: [{ type: i0.Input, args: [{ isSignal: true, alias: "language", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], description: [{ type: i0.Input, args: [{ isSignal: true, alias: "description", required: false }] }], error: [{ type: i0.Input, args: [{ isSignal: true, alias: "error", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], overflow: [{
|
|
10496
|
-
type: Output
|
|
10497
|
-
}], change: [{
|
|
10498
|
-
type: Output
|
|
10499
|
-
}], editorRoot: [{
|
|
10500
|
-
type: ViewChild,
|
|
10501
|
-
args: ['editorRoot']
|
|
10502
|
-
}] } });
|
|
10503
|
-
|
|
10504
|
-
class NeuralCodePreviewComponent {
|
|
10505
|
-
modelValue = input('', /* @ts-ignore */
|
|
10506
|
-
...(ngDevMode ? [{ debugName: "modelValue" }] : /* istanbul ignore next */ []));
|
|
10507
|
-
language = input('plain', /* @ts-ignore */
|
|
10508
|
-
...(ngDevMode ? [{ debugName: "language" }] : /* istanbul ignore next */ []));
|
|
10509
|
-
isPreviewLanguage = computed(() => this.language() === 'markdown' || this.language() === 'html', /* @ts-ignore */
|
|
10510
|
-
...(ngDevMode ? [{ debugName: "isPreviewLanguage" }] : /* istanbul ignore next */ []));
|
|
10511
|
-
sanitized = computed(() => {
|
|
10512
|
-
const src = this.modelValue() ?? '';
|
|
10513
|
-
if (!src)
|
|
10514
|
-
return '';
|
|
10515
|
-
if (this.language() === 'markdown') {
|
|
10516
|
-
return DOMPurify.sanitize(marked.parse(src));
|
|
10517
|
-
}
|
|
10518
|
-
if (this.language() === 'html') {
|
|
10519
|
-
return DOMPurify.sanitize(src);
|
|
10520
|
-
}
|
|
10521
|
-
return '';
|
|
10522
|
-
}, /* @ts-ignore */
|
|
10523
|
-
...(ngDevMode ? [{ debugName: "sanitized" }] : /* istanbul ignore next */ []));
|
|
10524
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: NeuralCodePreviewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
10525
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.4", type: NeuralCodePreviewComponent, isStandalone: true, selector: "neural-code-preview", inputs: { modelValue: { classPropertyName: "modelValue", publicName: "modelValue", isSignal: true, isRequired: false, transformFunction: null }, language: { classPropertyName: "language", publicName: "language", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
|
|
10526
|
-
@if (isPreviewLanguage()) {
|
|
10527
|
-
<div
|
|
10528
|
-
class="prose prose-sm max-w-none text-ink-gray-8"
|
|
10529
|
-
[innerHTML]="sanitized()"
|
|
10530
|
-
></div>
|
|
10531
|
-
}
|
|
10532
|
-
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }] });
|
|
10533
|
-
}
|
|
10534
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: NeuralCodePreviewComponent, decorators: [{
|
|
10535
|
-
type: Component,
|
|
10536
|
-
args: [{
|
|
10537
|
-
selector: 'neural-code-preview',
|
|
10538
|
-
standalone: true,
|
|
10539
|
-
imports: [CommonModule],
|
|
10540
|
-
template: `
|
|
10541
|
-
@if (isPreviewLanguage()) {
|
|
10542
|
-
<div
|
|
10543
|
-
class="prose prose-sm max-w-none text-ink-gray-8"
|
|
10544
|
-
[innerHTML]="sanitized()"
|
|
10545
|
-
></div>
|
|
10546
|
-
}
|
|
10547
|
-
`
|
|
10548
|
-
}]
|
|
10549
|
-
}], propDecorators: { modelValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "modelValue", required: false }] }], language: [{ type: i0.Input, args: [{ isSignal: true, alias: "language", required: false }] }] } });
|
|
10550
|
-
|
|
10551
|
-
class NeuralDialogComponent {
|
|
10552
|
-
dialog;
|
|
10553
|
-
viewContainerRef;
|
|
10554
|
-
openModel = model(false, /* @ts-ignore */
|
|
10555
|
-
...(ngDevMode ? [{ debugName: "openModel" }] : /* istanbul ignore next */ []));
|
|
10556
|
-
title = input(/* @ts-ignore */
|
|
10557
|
-
...(ngDevMode ? [undefined, { debugName: "title" }] : /* istanbul ignore next */ []));
|
|
10558
|
-
message = input(/* @ts-ignore */
|
|
10559
|
-
...(ngDevMode ? [undefined, { debugName: "message" }] : /* istanbul ignore next */ []));
|
|
10560
|
-
icon = input(/* @ts-ignore */
|
|
10561
|
-
...(ngDevMode ? [undefined, { debugName: "icon" }] : /* istanbul ignore next */ []));
|
|
10562
|
-
size = input('lg', /* @ts-ignore */
|
|
10563
|
-
...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
10564
|
-
position = input('center', /* @ts-ignore */
|
|
10565
|
-
...(ngDevMode ? [{ debugName: "position" }] : /* istanbul ignore next */ []));
|
|
10566
|
-
paddingTop = input(/* @ts-ignore */
|
|
10567
|
-
...(ngDevMode ? [undefined, { debugName: "paddingTop" }] : /* istanbul ignore next */ []));
|
|
10568
|
-
actions = input([], /* @ts-ignore */
|
|
10569
|
-
...(ngDevMode ? [{ debugName: "actions" }] : /* istanbul ignore next */ []));
|
|
10570
|
-
dismissible = input(true, /* @ts-ignore */
|
|
10571
|
-
...(ngDevMode ? [{ debugName: "dismissible" }] : /* istanbul ignore next */ []));
|
|
10572
|
-
showCloseButton = input(true, /* @ts-ignore */
|
|
10573
|
-
...(ngDevMode ? [{ debugName: "showCloseButton" }] : /* istanbul ignore next */ []));
|
|
10574
|
-
bare = input(false, /* @ts-ignore */
|
|
10575
|
-
...(ngDevMode ? [{ debugName: "bare" }] : /* istanbul ignore next */ []));
|
|
10576
|
-
hasTitleSlot = input(false, /* @ts-ignore */
|
|
10577
|
-
...(ngDevMode ? [{ debugName: "hasTitleSlot" }] : /* istanbul ignore next */ []));
|
|
10578
|
-
hasActionsSlot = input(false, /* @ts-ignore */
|
|
10579
|
-
...(ngDevMode ? [{ debugName: "hasActionsSlot" }] : /* istanbul ignore next */ []));
|
|
10580
|
-
hasDefaultSlot = input(false, /* @ts-ignore */
|
|
10581
|
-
...(ngDevMode ? [{ debugName: "hasDefaultSlot" }] : /* istanbul ignore next */ []));
|
|
10582
|
-
dialogTemplate;
|
|
10583
|
-
dialogRef = null;
|
|
10584
|
-
internalActionsState = {}; // track loading states
|
|
10585
|
-
constructor(dialog, viewContainerRef) {
|
|
10586
|
-
this.dialog = dialog;
|
|
10587
|
-
this.viewContainerRef = viewContainerRef;
|
|
10588
|
-
effect(() => {
|
|
10589
|
-
const isOpen = this.openModel();
|
|
10590
|
-
if (isOpen && !this.dialogRef && this.dialogTemplate) {
|
|
10591
|
-
this.openDialog();
|
|
11096
|
+
this.sizeCompartment = new Compartment();
|
|
11097
|
+
this.placeholderCompartment = new Compartment();
|
|
11098
|
+
const theme = buildBaseTheme(this.cmView);
|
|
11099
|
+
const highlight = await buildSyntaxHighlight(this.cmState);
|
|
11100
|
+
const updateListener = EditorView.updateListener.of((update) => {
|
|
11101
|
+
if (update.docChanged && !this.syncingFromProp) {
|
|
11102
|
+
this.modelValue.set(update.state.doc.toString());
|
|
10592
11103
|
}
|
|
10593
|
-
|
|
10594
|
-
this.
|
|
10595
|
-
this.
|
|
11104
|
+
if (update.docChanged || update.geometryChanged) {
|
|
11105
|
+
this.measureOverflow();
|
|
11106
|
+
this.syncGutterShadow();
|
|
10596
11107
|
}
|
|
10597
11108
|
});
|
|
10598
|
-
|
|
10599
|
-
|
|
10600
|
-
|
|
10601
|
-
|
|
10602
|
-
|
|
10603
|
-
panelClass: ['w-full', 'h-full', 'bg-transparent', 'shadow-none'],
|
|
10604
|
-
hasBackdrop: true,
|
|
10605
|
-
viewContainerRef: this.viewContainerRef,
|
|
11109
|
+
const blurHandler = EditorView.domEventHandlers({
|
|
11110
|
+
blur: () => {
|
|
11111
|
+
if (this.view)
|
|
11112
|
+
this.change.emit(this.view.state.doc.toString());
|
|
11113
|
+
},
|
|
10606
11114
|
});
|
|
10607
|
-
|
|
10608
|
-
|
|
10609
|
-
|
|
10610
|
-
|
|
10611
|
-
|
|
11115
|
+
const escapeHandler = EditorView.domEventHandlers({
|
|
11116
|
+
keydown: (e, v) => {
|
|
11117
|
+
if (e.key === 'Escape') {
|
|
11118
|
+
v.contentDOM.blur();
|
|
11119
|
+
return true;
|
|
11120
|
+
}
|
|
11121
|
+
return false;
|
|
11122
|
+
},
|
|
10612
11123
|
});
|
|
10613
|
-
|
|
10614
|
-
|
|
10615
|
-
|
|
10616
|
-
this.
|
|
10617
|
-
|
|
10618
|
-
|
|
10619
|
-
|
|
10620
|
-
|
|
10621
|
-
|
|
10622
|
-
|
|
10623
|
-
|
|
10624
|
-
|
|
10625
|
-
|
|
11124
|
+
if (!this.editorRoot?.nativeElement)
|
|
11125
|
+
return;
|
|
11126
|
+
this.view = new EditorView({
|
|
11127
|
+
doc: this.modelValue() ?? '',
|
|
11128
|
+
extensions: [
|
|
11129
|
+
basicSetup,
|
|
11130
|
+
this.cmView.keymap.of([indentWithTab]),
|
|
11131
|
+
escapeHandler,
|
|
11132
|
+
this.languageCompartment.of(await this.buildLanguageExtension(this.language())),
|
|
11133
|
+
this.disabledCompartment.of(this.buildDisabled(!!this.disabled())),
|
|
11134
|
+
updateListener,
|
|
11135
|
+
blurHandler,
|
|
11136
|
+
theme,
|
|
11137
|
+
this.variantCompartment.of(this.buildVariant(this.variant(), this.disabled())),
|
|
11138
|
+
this.sizeCompartment.of(this.buildSize(this.size())),
|
|
11139
|
+
this.placeholderCompartment.of(this.buildPlaceholder(this.placeholder())),
|
|
11140
|
+
highlight,
|
|
11141
|
+
],
|
|
11142
|
+
parent: this.editorRoot.nativeElement,
|
|
11143
|
+
});
|
|
11144
|
+
this.measureOverflow();
|
|
11145
|
+
this.view.scrollDOM.addEventListener('scroll', this.syncGutterShadow, { passive: true });
|
|
11146
|
+
this.syncGutterShadow();
|
|
11147
|
+
if (typeof ResizeObserver !== 'undefined') {
|
|
11148
|
+
this.overflowObserver = new ResizeObserver(() => {
|
|
11149
|
+
this.measureOverflow();
|
|
11150
|
+
this.syncGutterShadow();
|
|
11151
|
+
});
|
|
11152
|
+
this.overflowObserver.observe(this.view.scrollDOM);
|
|
10626
11153
|
}
|
|
10627
11154
|
}
|
|
10628
11155
|
ngOnDestroy() {
|
|
10629
|
-
|
|
10630
|
-
|
|
10631
|
-
|
|
10632
|
-
|
|
10633
|
-
|
|
10634
|
-
const map = {
|
|
10635
|
-
xs: 'max-w-xs',
|
|
10636
|
-
sm: 'max-w-sm',
|
|
10637
|
-
md: 'max-w-md',
|
|
10638
|
-
lg: 'max-w-lg',
|
|
10639
|
-
xl: 'max-w-xl',
|
|
10640
|
-
'2xl': 'max-w-2xl',
|
|
10641
|
-
'3xl': 'max-w-3xl',
|
|
10642
|
-
'4xl': 'max-w-4xl',
|
|
10643
|
-
'5xl': 'max-w-5xl',
|
|
10644
|
-
'6xl': 'max-w-6xl',
|
|
10645
|
-
'7xl': 'max-w-7xl',
|
|
10646
|
-
};
|
|
10647
|
-
return map[this.size()] || 'max-w-lg';
|
|
10648
|
-
}, /* @ts-ignore */
|
|
10649
|
-
...(ngDevMode ? [{ debugName: "sizeClass" }] : /* istanbul ignore next */ []));
|
|
10650
|
-
iconName = computed(() => {
|
|
10651
|
-
const raw = this.icon();
|
|
10652
|
-
if (!raw)
|
|
10653
|
-
return '';
|
|
10654
|
-
return typeof raw === 'string' ? raw : raw.name;
|
|
10655
|
-
}, /* @ts-ignore */
|
|
10656
|
-
...(ngDevMode ? [{ debugName: "iconName" }] : /* istanbul ignore next */ []));
|
|
10657
|
-
iconTheme = computed(() => {
|
|
10658
|
-
const raw = this.icon();
|
|
10659
|
-
if (typeof raw === 'object' && raw.theme)
|
|
10660
|
-
return raw.theme;
|
|
10661
|
-
return null;
|
|
10662
|
-
}, /* @ts-ignore */
|
|
10663
|
-
...(ngDevMode ? [{ debugName: "iconTheme" }] : /* istanbul ignore next */ []));
|
|
10664
|
-
dialogIconBgClasses = computed(() => {
|
|
10665
|
-
const theme = this.iconTheme();
|
|
10666
|
-
if (!theme)
|
|
10667
|
-
return 'bg-surface-gray-2';
|
|
10668
|
-
const map = {
|
|
10669
|
-
amber: 'bg-surface-amber-2',
|
|
10670
|
-
blue: 'bg-surface-blue-2',
|
|
10671
|
-
red: 'bg-surface-red-2',
|
|
10672
|
-
green: 'bg-surface-green-2',
|
|
10673
|
-
};
|
|
10674
|
-
return map[theme] || 'bg-surface-gray-2';
|
|
10675
|
-
}, /* @ts-ignore */
|
|
10676
|
-
...(ngDevMode ? [{ debugName: "dialogIconBgClasses" }] : /* istanbul ignore next */ []));
|
|
10677
|
-
dialogIconClasses = computed(() => {
|
|
10678
|
-
const theme = this.iconTheme();
|
|
10679
|
-
if (!theme)
|
|
10680
|
-
return 'text-ink-gray-5';
|
|
10681
|
-
const map = {
|
|
10682
|
-
amber: 'text-ink-amber-5',
|
|
10683
|
-
blue: 'text-ink-blue-5',
|
|
10684
|
-
red: 'text-ink-red-7',
|
|
10685
|
-
green: 'text-ink-green-5',
|
|
10686
|
-
};
|
|
10687
|
-
return map[theme] || 'text-ink-gray-5';
|
|
10688
|
-
}, /* @ts-ignore */
|
|
10689
|
-
...(ngDevMode ? [{ debugName: "dialogIconClasses" }] : /* istanbul ignore next */ []));
|
|
10690
|
-
dialogPositionClasses = computed(() => {
|
|
10691
|
-
if (this.paddingTop())
|
|
10692
|
-
return '';
|
|
10693
|
-
return this.position() === 'top' ? 'pt-[20vh]' : 'justify-center';
|
|
10694
|
-
}, /* @ts-ignore */
|
|
10695
|
-
...(ngDevMode ? [{ debugName: "dialogPositionClasses" }] : /* istanbul ignore next */ []));
|
|
10696
|
-
dialogPositionStyles = computed(() => {
|
|
10697
|
-
const pt = this.paddingTop();
|
|
10698
|
-
return pt ? { paddingTop: pt } : {};
|
|
10699
|
-
}, /* @ts-ignore */
|
|
10700
|
-
...(ngDevMode ? [{ debugName: "dialogPositionStyles" }] : /* istanbul ignore next */ []));
|
|
10701
|
-
showHeader = computed(() => {
|
|
10702
|
-
if (this.bare())
|
|
10703
|
-
return false;
|
|
10704
|
-
if (this.hasTitleSlot())
|
|
10705
|
-
return true;
|
|
10706
|
-
if (this.title())
|
|
10707
|
-
return true;
|
|
10708
|
-
return false;
|
|
10709
|
-
}, /* @ts-ignore */
|
|
10710
|
-
...(ngDevMode ? [{ debugName: "showHeader" }] : /* istanbul ignore next */ []));
|
|
10711
|
-
reactiveActions = computed(() => {
|
|
10712
|
-
if (this.bare())
|
|
10713
|
-
return [];
|
|
10714
|
-
return this.actions().map(action => {
|
|
10715
|
-
return {
|
|
10716
|
-
...action,
|
|
10717
|
-
loading: this.internalActionsState[action.label] || false
|
|
10718
|
-
};
|
|
10719
|
-
});
|
|
10720
|
-
}, /* @ts-ignore */
|
|
10721
|
-
...(ngDevMode ? [{ debugName: "reactiveActions" }] : /* istanbul ignore next */ []));
|
|
10722
|
-
isSingleActionFullWidth = computed(() => {
|
|
10723
|
-
const smallSizes = ['xs', 'sm', 'md'];
|
|
10724
|
-
return this.actions().length === 1 && smallSizes.includes(this.size());
|
|
10725
|
-
}, /* @ts-ignore */
|
|
10726
|
-
...(ngDevMode ? [{ debugName: "isSingleActionFullWidth" }] : /* istanbul ignore next */ []));
|
|
10727
|
-
async onActionClick(action) {
|
|
10728
|
-
if (!action.onClick) {
|
|
10729
|
-
this.close();
|
|
10730
|
-
return;
|
|
10731
|
-
}
|
|
10732
|
-
this.internalActionsState[action.label] = true;
|
|
10733
|
-
// trigger change detection by recreating the reference since it's a signal reading internalState
|
|
10734
|
-
// Or we could just use a separate mechanism. Let's mutate and trust Angular template binding if we update state.
|
|
10735
|
-
// In signal components, we might need a signal for internalActionsState
|
|
10736
|
-
// For now, let's just await
|
|
10737
|
-
try {
|
|
10738
|
-
await action.onClick({ close: () => this.close() });
|
|
10739
|
-
}
|
|
10740
|
-
finally {
|
|
10741
|
-
this.internalActionsState[action.label] = false;
|
|
11156
|
+
this.overflowObserver?.disconnect();
|
|
11157
|
+
if (this.view) {
|
|
11158
|
+
this.view.scrollDOM.removeEventListener('scroll', this.syncGutterShadow);
|
|
11159
|
+
this.view.destroy();
|
|
11160
|
+
this.view = null;
|
|
10742
11161
|
}
|
|
10743
11162
|
}
|
|
10744
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type:
|
|
10745
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.4", type:
|
|
10746
|
-
<
|
|
10747
|
-
|
|
10748
|
-
|
|
10749
|
-
|
|
10750
|
-
|
|
10751
|
-
|
|
10752
|
-
class="flex min-h-screen flex-col items-center px-4 py-4 text-center"
|
|
10753
|
-
[class]="dialogPositionClasses()"
|
|
10754
|
-
[style]="dialogPositionStyles()"
|
|
10755
|
-
>
|
|
10756
|
-
<div
|
|
10757
|
-
class="my-8 inline-block w-full transform overflow-hidden rounded-7 bg-surface-elevation-1 text-start align-middle shadow-xl dialog-content focus-visible:outline-none"
|
|
10758
|
-
[class]="sizeClass()"
|
|
10759
|
-
>
|
|
10760
|
-
@if (bare()) {
|
|
10761
|
-
<ng-content></ng-content>
|
|
10762
|
-
} @else {
|
|
10763
|
-
<div class="bg-surface-elevation-1 px-4 pb-6 pt-5 sm:px-6">
|
|
10764
|
-
<div class="flex">
|
|
10765
|
-
<div class="w-full flex-1">
|
|
10766
|
-
@if (showHeader()) {
|
|
10767
|
-
<div class="mb-6 flex items-center justify-between">
|
|
10768
|
-
<div class="flex items-center space-x-2 flex-1">
|
|
10769
|
-
@if (icon()) {
|
|
10770
|
-
<div
|
|
10771
|
-
class="flex h-7 w-7 flex-shrink-0 items-center justify-center rounded-full"
|
|
10772
|
-
[class]="dialogIconBgClasses()"
|
|
10773
|
-
>
|
|
10774
|
-
<span [class]="iconName() + ' size-4 ' + dialogIconClasses()" aria-hidden="true"></span>
|
|
10775
|
-
</div>
|
|
10776
|
-
}
|
|
10777
|
-
<header class="flex-1">
|
|
10778
|
-
@if (hasTitleSlot()) {
|
|
10779
|
-
<ng-content select="[title]"></ng-content>
|
|
10780
|
-
} @else if (title()) {
|
|
10781
|
-
<h3 class="text-2xl-semibold leading-6 text-ink-gray-8">
|
|
10782
|
-
{{ title() }}
|
|
10783
|
-
</h3>
|
|
10784
|
-
}
|
|
10785
|
-
</header>
|
|
10786
|
-
</div>
|
|
10787
|
-
@if (showCloseButton()) {
|
|
10788
|
-
<neural-button variant="ghost" label="Close" (click)="close()">
|
|
10789
|
-
<span icon class="lucide-x size-4 text-ink-gray-9"></span>
|
|
10790
|
-
</neural-button>
|
|
10791
|
-
}
|
|
10792
|
-
</div>
|
|
10793
|
-
}
|
|
11163
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: NeuralCodeEditorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
11164
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.4", type: NeuralCodeEditorComponent, isStandalone: true, selector: "neural-code-editor", inputs: { modelValue: { classPropertyName: "modelValue", publicName: "modelValue", isSignal: true, isRequired: false, transformFunction: null }, language: { classPropertyName: "language", publicName: "language", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, description: { classPropertyName: "description", publicName: "description", isSignal: true, isRequired: false, transformFunction: null }, error: { classPropertyName: "error", publicName: "error", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { modelValue: "modelValueChange", overflow: "overflow", change: "change" }, viewQueries: [{ propertyName: "editorRoot", first: true, predicate: ["editorRoot"], descendants: true }], ngImport: i0, template: `
|
|
11165
|
+
<neural-labeling-wrapper [enabled]="hasLabeling()">
|
|
11166
|
+
@if (label()) {
|
|
11167
|
+
<neural-input-label [id]="labelIdValue" [label]="label()" [required]="required()">
|
|
11168
|
+
<ng-content select="[label]"></ng-content>
|
|
11169
|
+
</neural-input-label>
|
|
11170
|
+
}
|
|
10794
11171
|
|
|
10795
|
-
|
|
10796
|
-
|
|
10797
|
-
|
|
10798
|
-
|
|
10799
|
-
|
|
10800
|
-
</p>
|
|
10801
|
-
}
|
|
10802
|
-
</div>
|
|
10803
|
-
</div>
|
|
10804
|
-
</div>
|
|
11172
|
+
<div
|
|
11173
|
+
#editorRoot
|
|
11174
|
+
class="code-editor"
|
|
11175
|
+
data-slot="control"
|
|
11176
|
+
></div>
|
|
10805
11177
|
|
|
10806
|
-
|
|
10807
|
-
|
|
10808
|
-
|
|
10809
|
-
|
|
10810
|
-
|
|
10811
|
-
|
|
10812
|
-
|
|
10813
|
-
|
|
10814
|
-
|
|
10815
|
-
|
|
10816
|
-
|
|
10817
|
-
[variant]="action.variant || 'solid'"
|
|
10818
|
-
[theme]="action.theme || 'gray'"
|
|
10819
|
-
(click)="onActionClick(action)"
|
|
10820
|
-
>
|
|
10821
|
-
{{ action.label }}
|
|
10822
|
-
@if (action.icon) {
|
|
10823
|
-
<span icon [class]="action.icon + ' size-4'"></span>
|
|
10824
|
-
}
|
|
10825
|
-
</neural-button>
|
|
10826
|
-
}
|
|
10827
|
-
</div>
|
|
10828
|
-
}
|
|
10829
|
-
</div>
|
|
10830
|
-
}
|
|
10831
|
-
}
|
|
10832
|
-
|
|
10833
|
-
@if (showCloseButton() && !showHeader() && !bare()) {
|
|
10834
|
-
<neural-button
|
|
10835
|
-
class="absolute right-4 top-4 z-10"
|
|
10836
|
-
variant="ghost"
|
|
10837
|
-
label="Close"
|
|
10838
|
-
(click)="close()"
|
|
10839
|
-
>
|
|
10840
|
-
<span icon class="lucide-x size-4 text-ink-gray-9"></span>
|
|
10841
|
-
</neural-button>
|
|
10842
|
-
}
|
|
10843
|
-
</div>
|
|
10844
|
-
</div>
|
|
10845
|
-
</div>
|
|
10846
|
-
</ng-template>
|
|
10847
|
-
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: DialogModule }, { kind: "component", type: NeuralButtonComponent, selector: "neural-button", inputs: ["variant", "theme", "size", "type", "disabled", "loading", "icon", "iconLeft", "iconRight", "iconOnly"], outputs: ["clicked"] }] });
|
|
11178
|
+
@if (description()) {
|
|
11179
|
+
<neural-input-description [id]="descriptionIdValue" [description]="description()">
|
|
11180
|
+
<ng-content select="[description]"></ng-content>
|
|
11181
|
+
</neural-input-description>
|
|
11182
|
+
}
|
|
11183
|
+
|
|
11184
|
+
@if (errorLines().length) {
|
|
11185
|
+
<neural-input-error [id]="errorIdValue" [lines]="errorLines()"></neural-input-error>
|
|
11186
|
+
}
|
|
11187
|
+
</neural-labeling-wrapper>
|
|
11188
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: NeuralInputLabelComponent, selector: "neural-input-label", inputs: ["id", "forId", "label", "required", "color", "disabled", "hasDefaultSlot"] }, { kind: "component", type: NeuralInputDescriptionComponent, selector: "neural-input-description", inputs: ["id", "description", "disabled", "hasDefaultSlot"] }, { kind: "component", type: NeuralInputErrorComponent, selector: "neural-input-error", inputs: ["id", "lines"] }, { kind: "component", type: NeuralLabelingWrapperComponent, selector: "neural-labeling-wrapper", inputs: ["enabled"] }] });
|
|
10848
11189
|
}
|
|
10849
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type:
|
|
11190
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: NeuralCodeEditorComponent, decorators: [{
|
|
10850
11191
|
type: Component,
|
|
10851
11192
|
args: [{
|
|
10852
|
-
selector: 'neural-
|
|
11193
|
+
selector: 'neural-code-editor',
|
|
10853
11194
|
standalone: true,
|
|
10854
|
-
imports: [
|
|
11195
|
+
imports: [
|
|
11196
|
+
CommonModule,
|
|
11197
|
+
NeuralInputLabelComponent,
|
|
11198
|
+
NeuralInputDescriptionComponent,
|
|
11199
|
+
NeuralInputErrorComponent,
|
|
11200
|
+
NeuralLabelingWrapperComponent
|
|
11201
|
+
],
|
|
10855
11202
|
template: `
|
|
10856
|
-
<
|
|
10857
|
-
|
|
10858
|
-
|
|
10859
|
-
|
|
10860
|
-
|
|
10861
|
-
|
|
10862
|
-
class="flex min-h-screen flex-col items-center px-4 py-4 text-center"
|
|
10863
|
-
[class]="dialogPositionClasses()"
|
|
10864
|
-
[style]="dialogPositionStyles()"
|
|
10865
|
-
>
|
|
10866
|
-
<div
|
|
10867
|
-
class="my-8 inline-block w-full transform overflow-hidden rounded-7 bg-surface-elevation-1 text-start align-middle shadow-xl dialog-content focus-visible:outline-none"
|
|
10868
|
-
[class]="sizeClass()"
|
|
10869
|
-
>
|
|
10870
|
-
@if (bare()) {
|
|
10871
|
-
<ng-content></ng-content>
|
|
10872
|
-
} @else {
|
|
10873
|
-
<div class="bg-surface-elevation-1 px-4 pb-6 pt-5 sm:px-6">
|
|
10874
|
-
<div class="flex">
|
|
10875
|
-
<div class="w-full flex-1">
|
|
10876
|
-
@if (showHeader()) {
|
|
10877
|
-
<div class="mb-6 flex items-center justify-between">
|
|
10878
|
-
<div class="flex items-center space-x-2 flex-1">
|
|
10879
|
-
@if (icon()) {
|
|
10880
|
-
<div
|
|
10881
|
-
class="flex h-7 w-7 flex-shrink-0 items-center justify-center rounded-full"
|
|
10882
|
-
[class]="dialogIconBgClasses()"
|
|
10883
|
-
>
|
|
10884
|
-
<span [class]="iconName() + ' size-4 ' + dialogIconClasses()" aria-hidden="true"></span>
|
|
10885
|
-
</div>
|
|
10886
|
-
}
|
|
10887
|
-
<header class="flex-1">
|
|
10888
|
-
@if (hasTitleSlot()) {
|
|
10889
|
-
<ng-content select="[title]"></ng-content>
|
|
10890
|
-
} @else if (title()) {
|
|
10891
|
-
<h3 class="text-2xl-semibold leading-6 text-ink-gray-8">
|
|
10892
|
-
{{ title() }}
|
|
10893
|
-
</h3>
|
|
10894
|
-
}
|
|
10895
|
-
</header>
|
|
10896
|
-
</div>
|
|
10897
|
-
@if (showCloseButton()) {
|
|
10898
|
-
<neural-button variant="ghost" label="Close" (click)="close()">
|
|
10899
|
-
<span icon class="lucide-x size-4 text-ink-gray-9"></span>
|
|
10900
|
-
</neural-button>
|
|
10901
|
-
}
|
|
10902
|
-
</div>
|
|
10903
|
-
}
|
|
11203
|
+
<neural-labeling-wrapper [enabled]="hasLabeling()">
|
|
11204
|
+
@if (label()) {
|
|
11205
|
+
<neural-input-label [id]="labelIdValue" [label]="label()" [required]="required()">
|
|
11206
|
+
<ng-content select="[label]"></ng-content>
|
|
11207
|
+
</neural-input-label>
|
|
11208
|
+
}
|
|
10904
11209
|
|
|
10905
|
-
|
|
10906
|
-
|
|
10907
|
-
|
|
10908
|
-
|
|
10909
|
-
|
|
10910
|
-
</p>
|
|
10911
|
-
}
|
|
10912
|
-
</div>
|
|
10913
|
-
</div>
|
|
10914
|
-
</div>
|
|
11210
|
+
<div
|
|
11211
|
+
#editorRoot
|
|
11212
|
+
class="code-editor"
|
|
11213
|
+
data-slot="control"
|
|
11214
|
+
></div>
|
|
10915
11215
|
|
|
10916
|
-
|
|
10917
|
-
|
|
10918
|
-
|
|
10919
|
-
|
|
10920
|
-
|
|
10921
|
-
|
|
10922
|
-
|
|
10923
|
-
|
|
10924
|
-
|
|
10925
|
-
|
|
10926
|
-
[loading]="action.loading || false"
|
|
10927
|
-
[variant]="action.variant || 'solid'"
|
|
10928
|
-
[theme]="action.theme || 'gray'"
|
|
10929
|
-
(click)="onActionClick(action)"
|
|
10930
|
-
>
|
|
10931
|
-
{{ action.label }}
|
|
10932
|
-
@if (action.icon) {
|
|
10933
|
-
<span icon [class]="action.icon + ' size-4'"></span>
|
|
10934
|
-
}
|
|
10935
|
-
</neural-button>
|
|
10936
|
-
}
|
|
10937
|
-
</div>
|
|
10938
|
-
}
|
|
10939
|
-
</div>
|
|
10940
|
-
}
|
|
10941
|
-
}
|
|
10942
|
-
|
|
10943
|
-
@if (showCloseButton() && !showHeader() && !bare()) {
|
|
10944
|
-
<neural-button
|
|
10945
|
-
class="absolute right-4 top-4 z-10"
|
|
10946
|
-
variant="ghost"
|
|
10947
|
-
label="Close"
|
|
10948
|
-
(click)="close()"
|
|
10949
|
-
>
|
|
10950
|
-
<span icon class="lucide-x size-4 text-ink-gray-9"></span>
|
|
10951
|
-
</neural-button>
|
|
10952
|
-
}
|
|
10953
|
-
</div>
|
|
10954
|
-
</div>
|
|
10955
|
-
</div>
|
|
10956
|
-
</ng-template>
|
|
11216
|
+
@if (description()) {
|
|
11217
|
+
<neural-input-description [id]="descriptionIdValue" [description]="description()">
|
|
11218
|
+
<ng-content select="[description]"></ng-content>
|
|
11219
|
+
</neural-input-description>
|
|
11220
|
+
}
|
|
11221
|
+
|
|
11222
|
+
@if (errorLines().length) {
|
|
11223
|
+
<neural-input-error [id]="errorIdValue" [lines]="errorLines()"></neural-input-error>
|
|
11224
|
+
}
|
|
11225
|
+
</neural-labeling-wrapper>
|
|
10957
11226
|
`
|
|
10958
11227
|
}]
|
|
10959
|
-
}], ctorParameters: () => [
|
|
11228
|
+
}], ctorParameters: () => [], propDecorators: { modelValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "modelValue", required: false }] }, { type: i0.Output, args: ["modelValueChange"] }], language: [{ type: i0.Input, args: [{ isSignal: true, alias: "language", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], description: [{ type: i0.Input, args: [{ isSignal: true, alias: "description", required: false }] }], error: [{ type: i0.Input, args: [{ isSignal: true, alias: "error", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], overflow: [{
|
|
11229
|
+
type: Output
|
|
11230
|
+
}], change: [{
|
|
11231
|
+
type: Output
|
|
11232
|
+
}], editorRoot: [{
|
|
10960
11233
|
type: ViewChild,
|
|
10961
|
-
args: ['
|
|
11234
|
+
args: ['editorRoot']
|
|
10962
11235
|
}] } });
|
|
10963
11236
|
|
|
11237
|
+
class NeuralCodePreviewComponent {
|
|
11238
|
+
modelValue = input('', /* @ts-ignore */
|
|
11239
|
+
...(ngDevMode ? [{ debugName: "modelValue" }] : /* istanbul ignore next */ []));
|
|
11240
|
+
language = input('plain', /* @ts-ignore */
|
|
11241
|
+
...(ngDevMode ? [{ debugName: "language" }] : /* istanbul ignore next */ []));
|
|
11242
|
+
isPreviewLanguage = computed(() => this.language() === 'markdown' || this.language() === 'html', /* @ts-ignore */
|
|
11243
|
+
...(ngDevMode ? [{ debugName: "isPreviewLanguage" }] : /* istanbul ignore next */ []));
|
|
11244
|
+
sanitized = computed(() => {
|
|
11245
|
+
const src = this.modelValue() ?? '';
|
|
11246
|
+
if (!src)
|
|
11247
|
+
return '';
|
|
11248
|
+
if (this.language() === 'markdown') {
|
|
11249
|
+
return DOMPurify.sanitize(marked.parse(src));
|
|
11250
|
+
}
|
|
11251
|
+
if (this.language() === 'html') {
|
|
11252
|
+
return DOMPurify.sanitize(src);
|
|
11253
|
+
}
|
|
11254
|
+
return '';
|
|
11255
|
+
}, /* @ts-ignore */
|
|
11256
|
+
...(ngDevMode ? [{ debugName: "sanitized" }] : /* istanbul ignore next */ []));
|
|
11257
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: NeuralCodePreviewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
11258
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.4", type: NeuralCodePreviewComponent, isStandalone: true, selector: "neural-code-preview", inputs: { modelValue: { classPropertyName: "modelValue", publicName: "modelValue", isSignal: true, isRequired: false, transformFunction: null }, language: { classPropertyName: "language", publicName: "language", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
|
|
11259
|
+
@if (isPreviewLanguage()) {
|
|
11260
|
+
<div
|
|
11261
|
+
class="prose prose-sm max-w-none text-ink-gray-8"
|
|
11262
|
+
[innerHTML]="sanitized()"
|
|
11263
|
+
></div>
|
|
11264
|
+
}
|
|
11265
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }] });
|
|
11266
|
+
}
|
|
11267
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: NeuralCodePreviewComponent, decorators: [{
|
|
11268
|
+
type: Component,
|
|
11269
|
+
args: [{
|
|
11270
|
+
selector: 'neural-code-preview',
|
|
11271
|
+
standalone: true,
|
|
11272
|
+
imports: [CommonModule],
|
|
11273
|
+
template: `
|
|
11274
|
+
@if (isPreviewLanguage()) {
|
|
11275
|
+
<div
|
|
11276
|
+
class="prose prose-sm max-w-none text-ink-gray-8"
|
|
11277
|
+
[innerHTML]="sanitized()"
|
|
11278
|
+
></div>
|
|
11279
|
+
}
|
|
11280
|
+
`
|
|
11281
|
+
}]
|
|
11282
|
+
}], propDecorators: { modelValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "modelValue", required: false }] }], language: [{ type: i0.Input, args: [{ isSignal: true, alias: "language", required: false }] }] } });
|
|
11283
|
+
|
|
10964
11284
|
class NeuralCommandPaletteComponent {
|
|
10965
11285
|
open = model(false, /* @ts-ignore */
|
|
10966
11286
|
...(ngDevMode ? [{ debugName: "open" }] : /* istanbul ignore next */ []));
|
|
@@ -15541,5 +15861,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImpor
|
|
|
15541
15861
|
* Generated bundle index. Do not edit.
|
|
15542
15862
|
*/
|
|
15543
15863
|
|
|
15544
|
-
export { NeuralAccordionComponent, NeuralAlertComponent, NeuralAvatarComponent, NeuralAxisChartComponent, NeuralBadgeComponent, NeuralBottomSheetComponent, NeuralBreadcrumbsComponent, NeuralButtonComponent, NeuralCalendarComponent, NeuralCheckboxComponent, NeuralCodeEditorComponent, NeuralCodePreviewComponent, NeuralComboboxComponent, NeuralCommandPaletteComponent, NeuralContextMenuComponent, NeuralDataTableComponent, NeuralDatePickerComponent, NeuralDesktopShellComponent, NeuralDialogComponent, NeuralDividerComponent, NeuralDonutChartComponent, NeuralDrawerComponent, NeuralDropdownComponent, NeuralDurationComponent, NeuralEChartsComponent, NeuralEntityFormComponent, NeuralErrorMessageComponent, NeuralFileUploaderComponent, NeuralFilterBuilderComponent, NeuralFloatingWindowComponent, NeuralFooterComponent, NeuralFormControlComponent, NeuralFormLabelComponent, NeuralFunnelChartComponent, NeuralHoverCardComponent, NeuralIconComponent, NeuralInputDescriptionComponent, NeuralInputErrorComponent, NeuralInputLabelComponent, NeuralItemListRowComponent, NeuralKeyboardShortcutComponent, NeuralKeyboardShortcutsDialogComponent, NeuralLabelingWrapperComponent, NeuralListViewComponent, NeuralLoadingIndicatorComponent, NeuralLoadingTextComponent, NeuralMenuComponent, NeuralMobileNavComponent, NeuralMobileNavItemComponent, NeuralMobileShellComponent, NeuralMultiEmailInputComponent, NeuralMultiSelectComponent, NeuralNotificationCenterComponent, NeuralNumberChartComponent, NeuralPageHeaderComponent, NeuralPasswordComponent, NeuralPopoverComponent, NeuralPopoverContentDirective, NeuralPopoverPanelComponent, NeuralPopoverTriggerDirective, NeuralProgressComponent, NeuralRadioComponent, NeuralRadioGroupComponent, NeuralRailComponent, NeuralRailItemComponent, NeuralRatingComponent, NeuralRequiredIndicatorComponent, NeuralScrollAreaComponent, NeuralSearchTriggerComponent, NeuralSelectComponent, NeuralSettingsContentComponent, NeuralSettingsDialogComponent, NeuralSettingsNavItemComponent, NeuralSettingsPanelComponent, NeuralSettingsSidebarComponent, NeuralSidebarComponent, NeuralSidebarItemComponent, NeuralSkeletonComponent, NeuralSliderComponent, NeuralSpinnerComponent, NeuralSubGridComponent, NeuralSwitchComponent, NeuralTabComponent, NeuralTabPanelComponent, NeuralTabsComponent, NeuralTextEditorComponent, NeuralTextInputComponent, NeuralTextareaComponent, NeuralThemeSwitcherComponent, NeuralTimePickerComponent, NeuralToastComponent, NeuralTooltipComponent, NeuralTreeComponent, NeuralTreeItemComponent, RADIO_GROUP, TABS_ROOT, ToastService, formatDuration, parseDuration };
|
|
15864
|
+
export { NeuralAccordionComponent, NeuralAlertComponent, NeuralAvatarComponent, NeuralAwesomeBarComponent, NeuralAxisChartComponent, NeuralBadgeComponent, NeuralBottomSheetComponent, NeuralBreadcrumbsComponent, NeuralButtonComponent, NeuralCalendarComponent, NeuralCheckboxComponent, NeuralCodeEditorComponent, NeuralCodePreviewComponent, NeuralComboboxComponent, NeuralCommandPaletteComponent, NeuralContextMenuComponent, NeuralDataTableComponent, NeuralDatePickerComponent, NeuralDesktopShellComponent, NeuralDialogComponent, NeuralDividerComponent, NeuralDonutChartComponent, NeuralDrawerComponent, NeuralDropdownComponent, NeuralDurationComponent, NeuralEChartsComponent, NeuralEntityFormComponent, NeuralErrorMessageComponent, NeuralFileUploaderComponent, NeuralFilterBuilderComponent, NeuralFloatingWindowComponent, NeuralFooterComponent, NeuralFormControlComponent, NeuralFormLabelComponent, NeuralFunnelChartComponent, NeuralHoverCardComponent, NeuralIconComponent, NeuralInputDescriptionComponent, NeuralInputErrorComponent, NeuralInputLabelComponent, NeuralItemListRowComponent, NeuralKeyboardShortcutComponent, NeuralKeyboardShortcutsDialogComponent, NeuralLabelingWrapperComponent, NeuralListViewComponent, NeuralLoadingIndicatorComponent, NeuralLoadingTextComponent, NeuralMenuComponent, NeuralMobileNavComponent, NeuralMobileNavItemComponent, NeuralMobileShellComponent, NeuralMultiEmailInputComponent, NeuralMultiSelectComponent, NeuralNotificationCenterComponent, NeuralNumberChartComponent, NeuralPageHeaderComponent, NeuralPasswordComponent, NeuralPopoverComponent, NeuralPopoverContentDirective, NeuralPopoverPanelComponent, NeuralPopoverTriggerDirective, NeuralProgressComponent, NeuralRadioComponent, NeuralRadioGroupComponent, NeuralRailComponent, NeuralRailItemComponent, NeuralRatingComponent, NeuralRequiredIndicatorComponent, NeuralScrollAreaComponent, NeuralSearchTriggerComponent, NeuralSelectComponent, NeuralSettingsContentComponent, NeuralSettingsDialogComponent, NeuralSettingsNavItemComponent, NeuralSettingsPanelComponent, NeuralSettingsSidebarComponent, NeuralSidebarComponent, NeuralSidebarItemComponent, NeuralSkeletonComponent, NeuralSliderComponent, NeuralSpinnerComponent, NeuralSubGridComponent, NeuralSwitchComponent, NeuralTabComponent, NeuralTabPanelComponent, NeuralTabsComponent, NeuralTextEditorComponent, NeuralTextInputComponent, NeuralTextareaComponent, NeuralThemeSwitcherComponent, NeuralTimePickerComponent, NeuralToastComponent, NeuralTooltipComponent, NeuralTreeComponent, NeuralTreeItemComponent, RADIO_GROUP, TABS_ROOT, ToastService, formatDuration, parseDuration };
|
|
15545
15865
|
//# sourceMappingURL=orbiq-neural-ui-kit.mjs.map
|