@ojiepermana/angular 22.2.15 → 22.2.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/SUPPORT.md +23 -9
- package/component/composer/README.md +3 -0
- package/component/editor/README.md +3 -0
- package/fesm2022/ojiepermana-angular-component-composer.mjs +68 -19
- package/fesm2022/ojiepermana-angular-component-editor.mjs +68 -12
- package/fesm2022/ojiepermana-angular-component-input.mjs +1 -1
- package/fesm2022/ojiepermana-angular-component-native-select.mjs +1 -1
- package/fesm2022/ojiepermana-angular-component-select.mjs +2 -2
- package/fesm2022/ojiepermana-angular-component-textarea.mjs +1 -1
- package/fesm2022/ojiepermana-angular-component-utils-core.mjs +7 -1
- package/fesm2022/{ojiepermana-angular-navigation-navigation-badge-count.component-Bx89vXtg.mjs → ojiepermana-angular-navigation-navigation-badge-count.component-RkecLYjX.mjs} +28 -18
- package/fesm2022/{ojiepermana-angular-navigation-navigation-dockbar-menu.component-CSs3QW5t.mjs → ojiepermana-angular-navigation-navigation-dockbar-menu.component-Dl7VAyfV.mjs} +3 -3
- package/fesm2022/{ojiepermana-angular-navigation-navigation-entry-grid.component-Cgq8iaRG.mjs → ojiepermana-angular-navigation-navigation-entry-grid.component-2Jw-868m.mjs} +3 -1
- package/fesm2022/{ojiepermana-angular-navigation-navigation-flyout-menu.component-7Drr8U4O.mjs → ojiepermana-angular-navigation-navigation-flyout-menu.component-QHUdqD1N.mjs} +4 -4
- package/fesm2022/{ojiepermana-angular-navigation-navigation-horizontal.component-BrRGBBcK.mjs → ojiepermana-angular-navigation-navigation-horizontal.component-CoX6X3C2.mjs} +3 -3
- package/fesm2022/{ojiepermana-angular-navigation-navigation-item.component-DAxMpuW_.mjs → ojiepermana-angular-navigation-navigation-item.component-DTVh0wjc.mjs} +13 -3
- package/fesm2022/{ojiepermana-angular-navigation-navigation-list.component-Bs6dssld.mjs → ojiepermana-angular-navigation-navigation-list.component-CRRaXJz4.mjs} +1 -1
- package/fesm2022/ojiepermana-angular-navigation.mjs +33 -12
- package/fesm2022/ojiepermana-angular-theme-component-settings.mjs +2 -1
- package/fesm2022/ojiepermana-angular-theme-layout-wrapper.mjs +24 -0
- package/fesm2022/ojiepermana-angular-theme-page-core.mjs +160 -92
- package/fesm2022/ojiepermana-angular-theme-page-filter.mjs +9 -17
- package/fesm2022/ojiepermana-angular-theme-page-root.mjs +15 -6
- package/fesm2022/ojiepermana-angular-theme-page-side.mjs +10 -18
- package/fesm2022/ojiepermana-angular-theme-shell.mjs +1 -0
- package/fesm2022/ojiepermana-angular-theme-styles.mjs +1 -1
- package/navigation/README.md +17 -0
- package/package.json +5 -5
- package/theme/page/README.md +5 -3
- package/theme/styles/css/base/components.css +90 -0
- package/theme/styles/css/base/tokens.css +13 -0
- package/types/ojiepermana-angular-component-composer.d.ts +5 -1
- package/types/ojiepermana-angular-component-editor.d.ts +4 -0
- package/types/ojiepermana-angular-navigation-types.d.ts +6 -0
- package/types/ojiepermana-angular-navigation.d.ts +12 -2
- package/types/ojiepermana-angular-theme-layout-wrapper.d.ts +11 -1
- package/types/ojiepermana-angular-theme-page-core.d.ts +8 -9
- package/types/ojiepermana-angular-theme-page-root.d.ts +1 -0
package/README.md
CHANGED
|
@@ -122,8 +122,8 @@ ng generate @ojiepermana/angular:sdk
|
|
|
122
122
|
|
|
123
123
|
## Links
|
|
124
124
|
|
|
125
|
-
- Source: git+https://github.com/ojiepermana/angular.git
|
|
126
|
-
- Documentation: https://github.com/ojiepermana/angular#readme
|
|
125
|
+
- Source: git+https://github.com/ojiepermana/angular-ui.git
|
|
126
|
+
- Documentation: https://github.com/ojiepermana/angular-ui#readme
|
|
127
127
|
|
|
128
128
|
## License
|
|
129
129
|
|
package/SUPPORT.md
CHANGED
|
@@ -1,14 +1,28 @@
|
|
|
1
1
|
# Runtime Support
|
|
2
2
|
|
|
3
|
-
The published `@ojiepermana/*` UI packages
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
|
8
|
-
|
|
|
9
|
-
| Angular 22.
|
|
10
|
-
| Angular
|
|
11
|
-
|
|
|
3
|
+
The published `@ojiepermana/*` UI packages and the showcase support client-side rendering (CSR)
|
|
4
|
+
with Angular 22.2–22.x. Their browser target combines the [Angular 22 Baseline dated May 7, 2026](https://angular.dev/reference/versions#browser-support)
|
|
5
|
+
with the [Tailwind CSS v4 requirements](https://tailwindcss.com/docs/compatibility#browser-support).
|
|
6
|
+
|
|
7
|
+
| Runtime | Support |
|
|
8
|
+
| -------------------------------------------------- | ------------------------------------------------------ |
|
|
9
|
+
| Angular 22.2–22.x CSR in browsers listed below | Supported |
|
|
10
|
+
| Angular 22.1 or earlier | Unsupported |
|
|
11
|
+
| Angular 23 or later | Unsupported until a matching package major is released |
|
|
12
|
+
| Server-side rendering, prerendering, and hydration | Unsupported |
|
|
13
|
+
|
|
14
|
+
| Browser | Minimum version |
|
|
15
|
+
| ----------------------------- | ---------------- |
|
|
16
|
+
| Chrome and Edge (desktop) | 119 |
|
|
17
|
+
| Firefox (desktop) | 128 |
|
|
18
|
+
| Safari (macOS and iOS) | 17.0 |
|
|
19
|
+
| Chrome and Firefox on Android | Current releases |
|
|
20
|
+
|
|
21
|
+
The showcase uses the dated Baseline in `.browserslistrc` with the Firefox minimum from Tailwind.
|
|
22
|
+
Consumers targeting this same browser set can use that configuration in their own builds. For
|
|
23
|
+
features newer than the browser target, use feature detection and keep a working fallback for
|
|
24
|
+
required behavior. Release checks exercise Playwright's current Chromium, Firefox, and WebKit
|
|
25
|
+
engines. They do not run against every minimum version in the table.
|
|
12
26
|
|
|
13
27
|
DOM observers, browser locale/timezone, generated client IDs, and chart style injection are browser
|
|
14
28
|
runtime contracts only. The SDK package is a Node-based schematic/code-generation tool and follows
|
|
@@ -114,6 +114,8 @@ Set `variant="input"` when the composer should align more closely with the radiu
|
|
|
114
114
|
|
|
115
115
|
`rows` sets the initial height of the native textarea surface.
|
|
116
116
|
`maxRows` caps autosize growth before the textarea begins scrolling.
|
|
117
|
+
Autosizing uses `field-sizing: content` where supported. The fallback measures the text,
|
|
118
|
+
padding, and border so the same row limits apply on older browsers.
|
|
117
119
|
|
|
118
120
|
```html
|
|
119
121
|
<Composer>
|
|
@@ -126,6 +128,7 @@ Set `variant="input"` when the composer should align more closely with the radiu
|
|
|
126
128
|
By default, keyboard submission uses `cmd-enter`, which means `Cmd+Enter` on macOS and `Ctrl+Enter` on Windows/Linux.
|
|
127
129
|
|
|
128
130
|
Use `submit="enter"` when pressing `Enter` should submit immediately. `Shift+Enter` still inserts a new line.
|
|
131
|
+
Both keyboard shortcuts wait for IME composition to finish before submitting.
|
|
129
132
|
|
|
130
133
|
```html
|
|
131
134
|
<Composer submit="enter" (submitRequested)="send()">
|
|
@@ -44,6 +44,9 @@ import {
|
|
|
44
44
|
`EditorContent` sanitizes both values written into the control and edited HTML
|
|
45
45
|
before emitting it. Applications can provide a stricter allow-list by overriding
|
|
46
46
|
`EDITOR_HTML_SANITIZER`; sanitize again at any unrelated rendering boundary.
|
|
47
|
+
Editor HTML uses Angular's built-in Trusted Types policy when enforcement is
|
|
48
|
+
enabled. Highlighted text is saved as `<mark>` and uses the theme highlight
|
|
49
|
+
color when the value is loaded again.
|
|
47
50
|
|
|
48
51
|
```ts
|
|
49
52
|
import { EDITOR_HTML_SANITIZER } from '@ojiepermana/angular/component/editor';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
|
-
import { Component, ElementRef, booleanAttribute, computed, forwardRef, inject, input, numberAttribute, output, signal } from "@angular/core";
|
|
2
|
+
import { Component, DestroyRef, ElementRef, afterRenderEffect, booleanAttribute, computed, forwardRef, inject, input, numberAttribute, output, signal } from "@angular/core";
|
|
3
3
|
import { NG_VALUE_ACCESSOR } from "@angular/forms";
|
|
4
4
|
import { cn } from "@ojiepermana/angular/component/utils/core";
|
|
5
5
|
const COMPOSER_BASE = "block w-full min-w-0 text-sm text-foreground";
|
|
@@ -55,7 +55,8 @@ var ComposerComponent = class ComposerComponent {
|
|
|
55
55
|
].join(" ")), ...ngDevMode ? [{ debugName: "bodyClasses" }] : /* istanbul ignore next */ []);
|
|
56
56
|
handleInputKeydown(event) {
|
|
57
57
|
if (this.disabled() || event.key !== "Enter" || event.defaultPrevented) return;
|
|
58
|
-
if (
|
|
58
|
+
if (event.isComposing || event.keyCode === 229) return;
|
|
59
|
+
if (!(this.submit() === "enter" ? !event.shiftKey : event.metaKey || event.ctrlKey)) return;
|
|
59
60
|
event.preventDefault();
|
|
60
61
|
this.submitRequested.emit(event);
|
|
61
62
|
if (this.submitForm()) this.requestNearestFormSubmit(event.target);
|
|
@@ -615,6 +616,8 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
615
616
|
var ComposerTextareaComponent = class ComposerTextareaComponent {
|
|
616
617
|
el = inject(ElementRef);
|
|
617
618
|
composer = inject(ComposerComponent, { optional: true });
|
|
619
|
+
destroyRef = inject(DestroyRef);
|
|
620
|
+
nativeAutosize = this.el.nativeElement.ownerDocument.defaultView?.CSS?.supports("field-sizing", "content") ?? false;
|
|
618
621
|
rows = input(2, {
|
|
619
622
|
...ngDevMode ? { debugName: "rows" } : /* istanbul ignore next */ {},
|
|
620
623
|
transform: numberAttribute
|
|
@@ -634,6 +637,10 @@ var ComposerTextareaComponent = class ComposerTextareaComponent {
|
|
|
634
637
|
transform: booleanAttribute
|
|
635
638
|
});
|
|
636
639
|
class = input("", ...ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []);
|
|
640
|
+
maxBlockSize = computed(() => {
|
|
641
|
+
const maxRows = this.maxRows();
|
|
642
|
+
return maxRows ? `calc(${Math.max(maxRows, this.rows())} * 1lh + var(--composer-block-inset, 0px))` : null;
|
|
643
|
+
}, ...ngDevMode ? [{ debugName: "maxBlockSize" }] : /* istanbul ignore next */ []);
|
|
637
644
|
disabledState = signal(false, ...ngDevMode ? [{ debugName: "disabledState" }] : /* istanbul ignore next */ []);
|
|
638
645
|
disabled = computed(() => this.disabledInput() || this.disabledState() || this.composer?.disabled() === true, ...ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []);
|
|
639
646
|
invalid = computed(() => this.invalidInput() || this.composer?.invalid() === true, ...ngDevMode ? [{ debugName: "invalid" }] : /* istanbul ignore next */ []);
|
|
@@ -644,12 +651,18 @@ var ComposerTextareaComponent = class ComposerTextareaComponent {
|
|
|
644
651
|
].join(" "), this.class()), ...ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []);
|
|
645
652
|
onChange = () => {};
|
|
646
653
|
onTouched = () => {};
|
|
654
|
+
constructor() {
|
|
655
|
+
afterRenderEffect({ mixedReadWrite: () => {
|
|
656
|
+
this.class();
|
|
657
|
+
this.resizeToContent();
|
|
658
|
+
} });
|
|
659
|
+
}
|
|
647
660
|
ngAfterViewInit() {
|
|
648
|
-
|
|
661
|
+
this.observeSize();
|
|
649
662
|
}
|
|
650
663
|
writeValue(value) {
|
|
651
664
|
this.el.nativeElement.value = value ?? "";
|
|
652
|
-
queueMicrotask(() => this.resizeToContent());
|
|
665
|
+
if (!this.nativeAutosize) queueMicrotask(() => this.resizeToContent());
|
|
653
666
|
}
|
|
654
667
|
registerOnChange(fn) {
|
|
655
668
|
this.onChange = fn;
|
|
@@ -662,23 +675,31 @@ var ComposerTextareaComponent = class ComposerTextareaComponent {
|
|
|
662
675
|
}
|
|
663
676
|
resizeToContent() {
|
|
664
677
|
const textarea = this.el.nativeElement;
|
|
665
|
-
|
|
666
|
-
const
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
678
|
+
const style = textarea.ownerDocument.defaultView?.getComputedStyle(textarea);
|
|
679
|
+
const pixels = (value) => Number.parseFloat(value ?? "") || 0;
|
|
680
|
+
const padding = pixels(style?.paddingTop) + pixels(style?.paddingBottom);
|
|
681
|
+
const border = pixels(style?.borderTopWidth) + pixels(style?.borderBottomWidth);
|
|
682
|
+
const borderBox = style?.boxSizing === "border-box";
|
|
683
|
+
if (this.nativeAutosize) {
|
|
684
|
+
textarea.style.setProperty("--composer-block-inset", `${borderBox ? padding + border : 0}px`);
|
|
670
685
|
return;
|
|
671
686
|
}
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
687
|
+
textarea.style.height = "auto";
|
|
688
|
+
textarea.style.overflowY = "hidden";
|
|
689
|
+
const contentHeight = textarea.scrollHeight;
|
|
690
|
+
const lineHeight = pixels(style?.lineHeight) || 24;
|
|
691
|
+
const rows = this.rows();
|
|
692
|
+
const maxRows = this.maxRows();
|
|
693
|
+
const limit = maxRows ? Math.ceil(lineHeight * Math.max(maxRows, rows) + padding) : Infinity;
|
|
694
|
+
const next = Math.min(contentHeight, limit) + (borderBox ? border : -padding);
|
|
695
|
+
textarea.style.height = `${Math.max(0, next)}px`;
|
|
696
|
+
textarea.style.overflowY = contentHeight > limit ? "auto" : "hidden";
|
|
676
697
|
}
|
|
677
698
|
focus() {
|
|
678
699
|
this.el.nativeElement.focus();
|
|
679
700
|
}
|
|
680
701
|
handleInput() {
|
|
681
|
-
this.resizeToContent();
|
|
702
|
+
if (!this.nativeAutosize) this.resizeToContent();
|
|
682
703
|
this.onChange(this.el.nativeElement.value);
|
|
683
704
|
}
|
|
684
705
|
handleBlur() {
|
|
@@ -688,9 +709,28 @@ var ComposerTextareaComponent = class ComposerTextareaComponent {
|
|
|
688
709
|
if (this.disabled()) return;
|
|
689
710
|
this.composer?.handleInputKeydown(event);
|
|
690
711
|
}
|
|
691
|
-
|
|
692
|
-
const
|
|
693
|
-
|
|
712
|
+
observeSize() {
|
|
713
|
+
const textarea = this.el.nativeElement;
|
|
714
|
+
const view = textarea.ownerDocument.defaultView;
|
|
715
|
+
if (!view?.ResizeObserver) return;
|
|
716
|
+
let lastWidth;
|
|
717
|
+
let lastInset;
|
|
718
|
+
const observer = new view.ResizeObserver(([entry]) => {
|
|
719
|
+
const border = entry.borderBoxSize[0];
|
|
720
|
+
if (this.nativeAutosize) {
|
|
721
|
+
const content = entry.contentBoxSize[0];
|
|
722
|
+
const inset = border.blockSize - content.blockSize;
|
|
723
|
+
if (inset !== lastInset) {
|
|
724
|
+
lastInset = inset;
|
|
725
|
+
this.resizeToContent();
|
|
726
|
+
}
|
|
727
|
+
} else if (border.inlineSize !== lastWidth) {
|
|
728
|
+
lastWidth = border.inlineSize;
|
|
729
|
+
this.resizeToContent();
|
|
730
|
+
}
|
|
731
|
+
});
|
|
732
|
+
observer.observe(textarea);
|
|
733
|
+
this.destroyRef.onDestroy(() => observer.disconnect());
|
|
694
734
|
}
|
|
695
735
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
696
736
|
minVersion: "12.0.0",
|
|
@@ -752,7 +792,10 @@ var ComposerTextareaComponent = class ComposerTextareaComponent {
|
|
|
752
792
|
properties: {
|
|
753
793
|
"class": "classes()",
|
|
754
794
|
"attr.data-slot": "\"composer-input\"",
|
|
795
|
+
"attr.data-native-autosize": "nativeAutosize ? \"\" : null",
|
|
755
796
|
"attr.rows": "rows()",
|
|
797
|
+
"style.--composer-min-rows": "rows()",
|
|
798
|
+
"style.--composer-max-block-size": "maxBlockSize()",
|
|
756
799
|
"attr.disabled": "disabled() ? \"\" : null",
|
|
757
800
|
"attr.aria-invalid": "invalid() ? \"true\" : null"
|
|
758
801
|
}
|
|
@@ -764,7 +807,8 @@ var ComposerTextareaComponent = class ComposerTextareaComponent {
|
|
|
764
807
|
}],
|
|
765
808
|
ngImport: i0,
|
|
766
809
|
template: "",
|
|
767
|
-
isInline: true
|
|
810
|
+
isInline: true,
|
|
811
|
+
styles: [":host([data-native-autosize]){field-sizing:content;block-size:auto;min-block-size:max(var(--control-height-10, 0px),calc(var(--composer-min-rows) * 1lh + var(--composer-block-inset, 0px)));max-block-size:var(--composer-max-block-size, none);overflow-y:auto}\n"]
|
|
768
812
|
});
|
|
769
813
|
};
|
|
770
814
|
i0.ɵɵngDeclareClassMetadata({
|
|
@@ -784,16 +828,21 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
784
828
|
host: {
|
|
785
829
|
"[class]": "classes()",
|
|
786
830
|
"[attr.data-slot]": "\"composer-input\"",
|
|
831
|
+
"[attr.data-native-autosize]": "nativeAutosize ? \"\" : null",
|
|
787
832
|
"[attr.rows]": "rows()",
|
|
833
|
+
"[style.--composer-min-rows]": "rows()",
|
|
834
|
+
"[style.--composer-max-block-size]": "maxBlockSize()",
|
|
788
835
|
"[attr.disabled]": "disabled() ? \"\" : null",
|
|
789
836
|
"[attr.aria-invalid]": "invalid() ? \"true\" : null",
|
|
790
837
|
"(input)": "handleInput()",
|
|
791
838
|
"(blur)": "handleBlur()",
|
|
792
839
|
"(keydown)": "handleKeydown($event)"
|
|
793
840
|
},
|
|
794
|
-
template: ""
|
|
841
|
+
template: "",
|
|
842
|
+
styles: [":host([data-native-autosize]){field-sizing:content;block-size:auto;min-block-size:max(var(--control-height-10, 0px),calc(var(--composer-min-rows) * 1lh + var(--composer-block-inset, 0px)));max-block-size:var(--composer-max-block-size, none);overflow-y:auto}\n"]
|
|
795
843
|
}]
|
|
796
844
|
}],
|
|
845
|
+
ctorParameters: () => [],
|
|
797
846
|
propDecorators: {
|
|
798
847
|
rows: [{
|
|
799
848
|
type: i0.Input,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DOCUMENT } from "@angular/common";
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
|
-
import { Component, ElementRef, InjectionToken, SecurityContext, booleanAttribute, computed, forwardRef, inject, input, output, signal } from "@angular/core";
|
|
3
|
+
import { Component, ElementRef, InjectionToken, SecurityContext, booleanAttribute, computed, forwardRef, inject, input, output, signal, viewChild } from "@angular/core";
|
|
4
4
|
import { NG_VALUE_ACCESSOR } from "@angular/forms";
|
|
5
5
|
import { cn } from "@ojiepermana/angular/component/utils/core";
|
|
6
6
|
import { DomSanitizer } from "@angular/platform-browser";
|
|
@@ -36,6 +36,7 @@ const EDITOR_CONTENT_BASE = [
|
|
|
36
36
|
"block min-h-50 max-h-125 w-full overflow-y-auto px-4 py-3 text-sm leading-6 outline-none",
|
|
37
37
|
"[&_p]:my-2 [&_h1]:mb-2 [&_h1]:mt-4 [&_h1]:text-2xl [&_h1]:font-semibold [&_h2]:mb-2 [&_h2]:mt-4 [&_h2]:text-xl [&_h2]:font-semibold [&_h3]:mb-2 [&_h3]:mt-4 [&_h3]:text-lg [&_h3]:font-semibold",
|
|
38
38
|
"[&_blockquote]:my-3 [&_blockquote]:border-l-2 [&_blockquote]:border-border [&_blockquote]:pl-3 [&_blockquote]:text-muted-foreground [&_ul]:my-2 [&_ul]:list-disc [&_ul]:pl-6 [&_ol]:my-2 [&_ol]:list-decimal [&_ol]:pl-6 [&_pre]:my-3 [&_pre]:overflow-x-auto [&_pre]:rounded-md [&_pre]:bg-muted [&_pre]:p-3 [&_pre]:font-mono [&_pre]:text-xs",
|
|
39
|
+
"[&_mark]:bg-[hsl(var(--editor-highlight,48_96%_80%))] [&_mark]:text-inherit",
|
|
39
40
|
"data-[empty=true]:before:pointer-events-none data-[empty=true]:before:text-muted-foreground data-[empty=true]:before:content-[attr(data-placeholder)]",
|
|
40
41
|
"data-[disabled=true]:cursor-not-allowed data-[disabled=true]:opacity-50"
|
|
41
42
|
].join(" ");
|
|
@@ -707,6 +708,7 @@ var EditorContentComponent = class EditorContentComponent {
|
|
|
707
708
|
editor = inject(EditorComponent, { optional: true });
|
|
708
709
|
document = inject(DOCUMENT);
|
|
709
710
|
sanitizeHtml = inject(EDITOR_HTML_SANITIZER);
|
|
711
|
+
htmlParser = viewChild("htmlParser", ...ngDevMode ? [{ debugName: "htmlParser" }] : /* istanbul ignore next */ []);
|
|
710
712
|
placeholder = input("Write something...", ...ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []);
|
|
711
713
|
ariaLabel = input("Rich text editor", {
|
|
712
714
|
...ngDevMode ? { debugName: "ariaLabel" } : /* istanbul ignore next */ {},
|
|
@@ -729,11 +731,15 @@ var EditorContentComponent = class EditorContentComponent {
|
|
|
729
731
|
invalid = computed(() => this.invalidInput() || this.editor?.invalid() === true, ...ngDevMode ? [{ debugName: "invalid" }] : /* istanbul ignore next */ []);
|
|
730
732
|
classes = computed(() => cn(EDITOR_CONTENT_BASE, this.class()), ...ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []);
|
|
731
733
|
lastKnownValue = "";
|
|
734
|
+
pendingValue;
|
|
732
735
|
onChange = () => {};
|
|
733
736
|
onTouched = () => {};
|
|
734
737
|
ngAfterViewInit() {
|
|
735
738
|
this.editor?.registerContent(this);
|
|
736
|
-
this.
|
|
739
|
+
(this.htmlParser()?.elementRef.nativeElement)?.remove();
|
|
740
|
+
const value = this.pendingValue ?? this.el.nativeElement.innerHTML;
|
|
741
|
+
this.pendingValue = void 0;
|
|
742
|
+
this.setSanitizedValue(value);
|
|
737
743
|
queueMicrotask(() => this.syncEmptyState());
|
|
738
744
|
}
|
|
739
745
|
ngOnDestroy() {
|
|
@@ -763,19 +769,48 @@ var EditorContentComponent = class EditorContentComponent {
|
|
|
763
769
|
this.el.nativeElement.focus();
|
|
764
770
|
}
|
|
765
771
|
handleInput() {
|
|
766
|
-
const
|
|
767
|
-
|
|
768
|
-
const
|
|
769
|
-
|
|
770
|
-
const html =
|
|
772
|
+
const parser = this.htmlParser();
|
|
773
|
+
if (!parser) return;
|
|
774
|
+
const current = this.serializeContent();
|
|
775
|
+
const sanitized = this.sanitizeHtml(current);
|
|
776
|
+
const html = sanitized === current ? current : this.renderHtml(parser, sanitized);
|
|
771
777
|
this.syncEmptyState();
|
|
772
778
|
if (html === this.lastKnownValue) return;
|
|
773
779
|
this.lastKnownValue = html;
|
|
774
780
|
this.onChange(html);
|
|
775
781
|
}
|
|
776
782
|
setSanitizedValue(value) {
|
|
777
|
-
|
|
778
|
-
|
|
783
|
+
const parser = this.htmlParser();
|
|
784
|
+
if (!parser) {
|
|
785
|
+
this.pendingValue = value;
|
|
786
|
+
return;
|
|
787
|
+
}
|
|
788
|
+
const html = this.sanitizeHtml(value);
|
|
789
|
+
this.lastKnownValue = html === this.serializeContent() ? html : this.renderHtml(parser, html);
|
|
790
|
+
}
|
|
791
|
+
renderHtml(parser, html) {
|
|
792
|
+
const view = parser.createEmbeddedView({ $implicit: html });
|
|
793
|
+
try {
|
|
794
|
+
view.detectChanges();
|
|
795
|
+
const template = view.rootNodes[0];
|
|
796
|
+
const element = this.el.nativeElement;
|
|
797
|
+
element.replaceChildren(template.content);
|
|
798
|
+
return element.innerHTML;
|
|
799
|
+
} finally {
|
|
800
|
+
view.destroy();
|
|
801
|
+
}
|
|
802
|
+
}
|
|
803
|
+
serializeContent() {
|
|
804
|
+
const element = this.el.nativeElement;
|
|
805
|
+
if (!element.querySelector("span[style]")) return element.innerHTML;
|
|
806
|
+
const inertDocument = this.document.createElement("template").content.ownerDocument;
|
|
807
|
+
const snapshot = inertDocument.importNode(element, true);
|
|
808
|
+
for (const span of snapshot.querySelectorAll("span[style]")) if (span.attributes.length === 1 && span.style.length === 1 && span.style.backgroundColor) {
|
|
809
|
+
const mark = inertDocument.createElement("mark");
|
|
810
|
+
mark.append(...span.childNodes);
|
|
811
|
+
span.replaceWith(mark);
|
|
812
|
+
}
|
|
813
|
+
return snapshot.innerHTML;
|
|
779
814
|
}
|
|
780
815
|
handleBlur() {
|
|
781
816
|
this.onTouched();
|
|
@@ -847,7 +882,7 @@ var EditorContentComponent = class EditorContentComponent {
|
|
|
847
882
|
target: i0.ɵɵFactoryTarget.Component
|
|
848
883
|
});
|
|
849
884
|
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
850
|
-
minVersion: "17.
|
|
885
|
+
minVersion: "17.2.0",
|
|
851
886
|
version: "22.2.6",
|
|
852
887
|
type: EditorContentComponent,
|
|
853
888
|
isStandalone: true,
|
|
@@ -915,8 +950,20 @@ var EditorContentComponent = class EditorContentComponent {
|
|
|
915
950
|
useExisting: forwardRef(() => EditorContentComponent),
|
|
916
951
|
multi: true
|
|
917
952
|
}],
|
|
953
|
+
viewQueries: [{
|
|
954
|
+
propertyName: "htmlParser",
|
|
955
|
+
first: true,
|
|
956
|
+
predicate: ["htmlParser"],
|
|
957
|
+
descendants: true,
|
|
958
|
+
isSignal: true
|
|
959
|
+
}],
|
|
918
960
|
ngImport: i0,
|
|
919
|
-
template:
|
|
961
|
+
template: `
|
|
962
|
+
<ng-content />
|
|
963
|
+
<ng-template #htmlParser let-html>
|
|
964
|
+
<template [innerHTML]="html"></template>
|
|
965
|
+
</ng-template>
|
|
966
|
+
`,
|
|
920
967
|
isInline: true
|
|
921
968
|
});
|
|
922
969
|
};
|
|
@@ -951,10 +998,19 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
951
998
|
"(blur)": "handleBlur()",
|
|
952
999
|
"(keydown)": "handleKeydown($event)"
|
|
953
1000
|
},
|
|
954
|
-
template:
|
|
1001
|
+
template: `
|
|
1002
|
+
<ng-content />
|
|
1003
|
+
<ng-template #htmlParser let-html>
|
|
1004
|
+
<template [innerHTML]="html"></template>
|
|
1005
|
+
</ng-template>
|
|
1006
|
+
`
|
|
955
1007
|
}]
|
|
956
1008
|
}],
|
|
957
1009
|
propDecorators: {
|
|
1010
|
+
htmlParser: [{
|
|
1011
|
+
type: i0.ViewChild,
|
|
1012
|
+
args: ["htmlParser", { isSignal: true }]
|
|
1013
|
+
}],
|
|
958
1014
|
placeholder: [{
|
|
959
1015
|
type: i0.Input,
|
|
960
1016
|
args: [{
|
|
@@ -8,7 +8,7 @@ const BASE = [
|
|
|
8
8
|
"text-sm transition-colors",
|
|
9
9
|
"file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground",
|
|
10
10
|
"placeholder:text-muted-foreground",
|
|
11
|
-
"focus-ring",
|
|
11
|
+
"focus-ring [--focus-ring-offset:calc(-1*var(--focus-ring-width))]",
|
|
12
12
|
"disabled:cursor-not-allowed disabled:opacity-50",
|
|
13
13
|
"aria-[invalid=true]:border-destructive aria-[invalid=true]:[--focus-ring-color:hsl(var(--destructive))]"
|
|
14
14
|
].join(" ");
|
|
@@ -5,7 +5,7 @@ const BASE = [
|
|
|
5
5
|
"block h-control-md w-full appearance-none rounded-md border border-input bg-transparent px-3 py-2",
|
|
6
6
|
"pr-10 text-sm transition-colors",
|
|
7
7
|
"text-foreground",
|
|
8
|
-
"focus-ring",
|
|
8
|
+
"focus-ring [--focus-ring-offset:calc(-1*var(--focus-ring-width))]",
|
|
9
9
|
"disabled:cursor-not-allowed disabled:opacity-50",
|
|
10
10
|
"aria-[invalid=true]:border-destructive aria-[invalid=true]:[--focus-ring-color:hsl(var(--destructive))]"
|
|
11
11
|
].join(" ");
|
|
@@ -376,7 +376,7 @@ var SelectComponent = class SelectComponent extends SelectMaterialBridge {
|
|
|
376
376
|
</ng-template>
|
|
377
377
|
`,
|
|
378
378
|
isInline: true,
|
|
379
|
-
styles: ["@keyframes _mat-select-enter{0%{opacity:0;transform:scaleY(.8)}to{opacity:1;transform:none}}@keyframes _mat-select-exit{0%{opacity:1}to{opacity:0}}.mat-mdc-select{display:inline-block;width:100%;outline:none;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;color:var(--mat-select-enabled-trigger-text-color, var(--mat-sys-on-surface));font-family:var(--mat-select-trigger-text-font, var(--mat-sys-body-large-font));line-height:var(--mat-select-trigger-text-line-height, var(--mat-sys-body-large-line-height));font-size:var(--mat-select-trigger-text-size, var(--mat-sys-body-large-size));font-weight:var(--mat-select-trigger-text-weight, var(--mat-sys-body-large-weight));letter-spacing:var(--mat-select-trigger-text-tracking, var(--mat-sys-body-large-tracking))}div.mat-mdc-select-panel{box-shadow:var( --mat-select-container-elevation-shadow, 0px 3px 1px -2px rgba(0, 0, 0, .2), 0px 2px 2px 0px rgba(0, 0, 0, .14), 0px 1px 5px 0px rgba(0, 0, 0, .12) )}.mat-mdc-select-disabled,.mat-mdc-select-disabled .mat-mdc-select-placeholder{color:var( --mat-select-disabled-trigger-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent) )}.mat-mdc-select-trigger{display:inline-flex;align-items:center;cursor:pointer;position:relative;box-sizing:border-box;width:100%}.mat-mdc-select-disabled .mat-mdc-select-trigger{-webkit-user-select:none;user-select:none;cursor:default}.mat-mdc-select-value{width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mat-mdc-select-value-text{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mat-mdc-select-arrow-wrapper{height:24px;flex-shrink:0;display:inline-flex;align-items:center}.mat-mdc-select-arrow{width:10px;height:5px;position:relative;color:var(--mat-select-enabled-arrow-color, var(--mat-sys-on-surface-variant))}.mat-select-open .mat-mdc-select-arrow{transform:rotate(180deg)}.mat-mdc-select-arrow svg{fill:currentColor;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}@media(forced-colors:active){.mat-mdc-select-arrow svg{fill:CanvasText}.mat-mdc-select-disabled .mat-mdc-select-arrow svg{fill:GrayText}}div.mat-mdc-select-panel{width:100%;max-height:275px;outline:0;overflow:auto;padding:8px 0;box-sizing:border-box;transform-origin:top center;border-radius:0 0 4px 4px;position:relative;background-color:var(--mat-select-panel-background-color, var(--mat-sys-surface-container))}.mat-mdc-select-panel-above div.mat-mdc-select-panel{border-radius:4px 4px 0 0;transform-origin:bottom center}@media(forced-colors:active){div.mat-mdc-select-panel{outline:solid 1px}}.mat-select-panel-animations-enabled{animation:_mat-select-enter .12s cubic-bezier(0,0,.2,1)}.mat-select-panel-animations-enabled.mat-select-panel-exit{animation:_mat-select-exit .1s linear}.mat-mdc-select-placeholder{transition:color .4s .1333333333333s cubic-bezier(.25,.8,.25,1);color:var(--mat-select-placeholder-text-color, var(--mat-sys-on-surface-variant))}._mat-animation-noopable .mat-mdc-select-placeholder{transition:none}.mat-mdc-select-min-line:empty:before{content:\" \";white-space:pre;width:1px;display:inline-block;visibility:hidden}\n", "selectfield.mat-mdc-select{display:flex;align-items:center;box-sizing:border-box;width:100%;height:var(--control-height-md);padding:0;border:1px solid hsl(var(--input));border-radius:var(--radius-base);background:transparent;color:hsl(var(--foreground));font-family:var(--font-sans);font-size:var(--text-sm);line-height:var(--text-sm--line-height);cursor:pointer}selectfield .mat-mdc-select-trigger{height:100%;padding:0 calc(var(--spacing-base) * 3)}selectfield.mat-mdc-select:focus{outline:none}selectfield.mat-mdc-select:focus-visible:not(.mat-select-open){outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:var(--focus-ring-offset)}selectfield.mat-mdc-select-disabled{cursor:not-allowed;opacity:.5;background:hsl(var(--muted) / .4)}selectfield.mat-mdc-select-invalid{border-color:hsl(var(--destructive))}selectfield .mat-mdc-select-value{color:hsl(var(--foreground))}selectfield .mat-mdc-select-placeholder{color:hsl(var(--muted-foreground))}selectfield .mat-mdc-select-arrow{color:hsl(var(--muted-foreground))}div.mat-mdc-select-panel.select-panel{--mat-select-panel-background-color: hsl(var(--popover));display:flex;flex-direction:column;background-color:hsl(var(--popover));color:hsl(var(--popover-foreground));border:1px solid hsl(var(--ring));border-radius:var(--radius-base);box-shadow:0 0 0 1px hsl(var(--ring)),var(--shadow-md, 0 8px 18px -14px hsl(var(--foreground) / .24));padding:calc(var(--spacing-base) * 1);overflow:hidden}.select-panel .select-options{min-height:0;overflow:auto;outline:none}.select-search{flex:0 0 auto;margin-block-end:calc(var(--spacing-base) * 1)}.select-search-input{box-sizing:border-box;width:100%;height:var(--control-height-md);border:1px solid hsl(var(--input));border-radius:var(--radius-base);outline:none;background:transparent;color:hsl(var(--popover-foreground));padding-inline:calc(var(--spacing-base) * 3);font:inherit}.select-search-input::placeholder{color:hsl(var(--muted-foreground))}.select-search-input:focus-visible{border-color:hsl(var(--input));box-shadow:none}.select-search-input::-webkit-search-cancel-button{cursor:pointer}.select-empty{color:hsl(var(--muted-foreground));padding:calc(var(--spacing-base) * 2) calc(var(--spacing-base) * 3);font-size:var(--text-sm);line-height:var(--text-sm--line-height);text-align:center}.select-panel .mat-mdc-option{--mat-option-label-text-color: hsl(var(--popover-foreground));--mat-option-label-text-font: var(--font-sans);--mat-option-label-text-size: var(--text-sm);--mat-option-label-text-line-height: var(--text-sm--line-height);--mat-option-label-text-weight: 400;--mat-option-hover-state-layer-color: hsl(var(--accent));--mat-option-focus-state-layer-color: hsl(var(--accent));--mat-option-selected-state-layer-color: hsl(var(--accent));--mat-option-selected-state-label-text-color: hsl(var(--accent-foreground));min-height:var(--control-height-md);border-radius:var(--radius-base)}.select-panel .mat-mdc-option+.mat-mdc-option{margin-block-start:calc(var(--spacing-base) * .5)}.select-panel .mat-mdc-option.mdc-list-item--selected:not(.mdc-list-item--disabled) .mdc-list-item__primary-text{color:hsl(var(--accent-foreground))}.select-panel .mat-mdc-optgroup-label{--mat-optgroup-label-text-color: hsl(var(--muted-foreground));--mat-optgroup-label-text-font: var(--font-sans);--mat-optgroup-label-text-size: var(--text-xs);min-height:var(--control-height-xs)}\n"],
|
|
379
|
+
styles: ["@keyframes _mat-select-enter{0%{opacity:0;transform:scaleY(.8)}to{opacity:1;transform:none}}@keyframes _mat-select-exit{0%{opacity:1}to{opacity:0}}.mat-mdc-select{display:inline-block;width:100%;outline:none;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;color:var(--mat-select-enabled-trigger-text-color, var(--mat-sys-on-surface));font-family:var(--mat-select-trigger-text-font, var(--mat-sys-body-large-font));line-height:var(--mat-select-trigger-text-line-height, var(--mat-sys-body-large-line-height));font-size:var(--mat-select-trigger-text-size, var(--mat-sys-body-large-size));font-weight:var(--mat-select-trigger-text-weight, var(--mat-sys-body-large-weight));letter-spacing:var(--mat-select-trigger-text-tracking, var(--mat-sys-body-large-tracking))}div.mat-mdc-select-panel{box-shadow:var( --mat-select-container-elevation-shadow, 0px 3px 1px -2px rgba(0, 0, 0, .2), 0px 2px 2px 0px rgba(0, 0, 0, .14), 0px 1px 5px 0px rgba(0, 0, 0, .12) )}.mat-mdc-select-disabled,.mat-mdc-select-disabled .mat-mdc-select-placeholder{color:var( --mat-select-disabled-trigger-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent) )}.mat-mdc-select-trigger{display:inline-flex;align-items:center;cursor:pointer;position:relative;box-sizing:border-box;width:100%}.mat-mdc-select-disabled .mat-mdc-select-trigger{-webkit-user-select:none;user-select:none;cursor:default}.mat-mdc-select-value{width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mat-mdc-select-value-text{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mat-mdc-select-arrow-wrapper{height:24px;flex-shrink:0;display:inline-flex;align-items:center}.mat-mdc-select-arrow{width:10px;height:5px;position:relative;color:var(--mat-select-enabled-arrow-color, var(--mat-sys-on-surface-variant))}.mat-select-open .mat-mdc-select-arrow{transform:rotate(180deg)}.mat-mdc-select-arrow svg{fill:currentColor;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}@media(forced-colors:active){.mat-mdc-select-arrow svg{fill:CanvasText}.mat-mdc-select-disabled .mat-mdc-select-arrow svg{fill:GrayText}}div.mat-mdc-select-panel{width:100%;max-height:275px;outline:0;overflow:auto;padding:8px 0;box-sizing:border-box;transform-origin:top center;border-radius:0 0 4px 4px;position:relative;background-color:var(--mat-select-panel-background-color, var(--mat-sys-surface-container))}.mat-mdc-select-panel-above div.mat-mdc-select-panel{border-radius:4px 4px 0 0;transform-origin:bottom center}@media(forced-colors:active){div.mat-mdc-select-panel{outline:solid 1px}}.mat-select-panel-animations-enabled{animation:_mat-select-enter .12s cubic-bezier(0,0,.2,1)}.mat-select-panel-animations-enabled.mat-select-panel-exit{animation:_mat-select-exit .1s linear}.mat-mdc-select-placeholder{transition:color .4s .1333333333333s cubic-bezier(.25,.8,.25,1);color:var(--mat-select-placeholder-text-color, var(--mat-sys-on-surface-variant))}._mat-animation-noopable .mat-mdc-select-placeholder{transition:none}.mat-mdc-select-min-line:empty:before{content:\" \";white-space:pre;width:1px;display:inline-block;visibility:hidden}\n", "selectfield.mat-mdc-select{--focus-ring-offset: calc(-1 * var(--focus-ring-width));display:flex;align-items:center;box-sizing:border-box;width:100%;height:var(--control-height-md);padding:0;border:1px solid hsl(var(--input));border-radius:var(--radius-base);background:transparent;color:hsl(var(--foreground));font-family:var(--font-sans);font-size:var(--text-sm);line-height:var(--text-sm--line-height);cursor:pointer}selectfield .mat-mdc-select-trigger{height:100%;padding:0 calc(var(--spacing-base) * 3)}selectfield.mat-mdc-select:focus{outline:none}selectfield.mat-mdc-select:focus-visible:not(.mat-select-open){outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:var(--focus-ring-offset)}selectfield.mat-mdc-select-disabled{cursor:not-allowed;opacity:.5;background:hsl(var(--muted) / .4)}selectfield.mat-mdc-select-invalid{--focus-ring-color: hsl(var(--destructive));border-color:hsl(var(--destructive))}selectfield .mat-mdc-select-value{color:hsl(var(--foreground))}selectfield .mat-mdc-select-placeholder{color:hsl(var(--muted-foreground))}selectfield .mat-mdc-select-arrow{color:hsl(var(--muted-foreground))}div.mat-mdc-select-panel.select-panel{--mat-select-panel-background-color: hsl(var(--popover));display:flex;flex-direction:column;background-color:hsl(var(--popover));color:hsl(var(--popover-foreground));border:1px solid hsl(var(--ring));border-radius:var(--radius-base);box-shadow:0 0 0 1px hsl(var(--ring)),var(--shadow-md, 0 8px 18px -14px hsl(var(--foreground) / .24));padding:calc(var(--spacing-base) * 1);overflow:hidden}.select-panel .select-options{min-height:0;overflow:auto;outline:none}.select-search{flex:0 0 auto;margin-block-end:calc(var(--spacing-base) * 1)}.select-search-input{box-sizing:border-box;width:100%;height:var(--control-height-md);border:1px solid hsl(var(--input));border-radius:var(--radius-base);outline:none;background:transparent;color:hsl(var(--popover-foreground));padding-inline:calc(var(--spacing-base) * 3);font:inherit}.select-search-input::placeholder{color:hsl(var(--muted-foreground))}.select-search-input:focus-visible{border-color:hsl(var(--input));box-shadow:none}.select-search-input::-webkit-search-cancel-button{cursor:pointer}.select-empty{color:hsl(var(--muted-foreground));padding:calc(var(--spacing-base) * 2) calc(var(--spacing-base) * 3);font-size:var(--text-sm);line-height:var(--text-sm--line-height);text-align:center}.select-panel .mat-mdc-option{--mat-option-label-text-color: hsl(var(--popover-foreground));--mat-option-label-text-font: var(--font-sans);--mat-option-label-text-size: var(--text-sm);--mat-option-label-text-line-height: var(--text-sm--line-height);--mat-option-label-text-weight: 400;--mat-option-hover-state-layer-color: hsl(var(--accent));--mat-option-focus-state-layer-color: hsl(var(--accent));--mat-option-selected-state-layer-color: hsl(var(--accent));--mat-option-selected-state-label-text-color: hsl(var(--accent-foreground));min-height:var(--control-height-md);border-radius:var(--radius-base)}.select-panel .mat-mdc-option+.mat-mdc-option{margin-block-start:calc(var(--spacing-base) * .5)}.select-panel .mat-mdc-option.mdc-list-item--selected:not(.mdc-list-item--disabled) .mdc-list-item__primary-text{color:hsl(var(--accent-foreground))}.select-panel .mat-mdc-optgroup-label{--mat-optgroup-label-text-color: hsl(var(--muted-foreground));--mat-optgroup-label-text-font: var(--font-sans);--mat-optgroup-label-text-size: var(--text-xs);min-height:var(--control-height-xs)}\n"],
|
|
380
380
|
dependencies: [
|
|
381
381
|
{
|
|
382
382
|
kind: "ngmodule",
|
|
@@ -562,7 +562,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
562
562
|
</div>
|
|
563
563
|
</ng-template>
|
|
564
564
|
`,
|
|
565
|
-
styles: ["@keyframes _mat-select-enter{0%{opacity:0;transform:scaleY(.8)}to{opacity:1;transform:none}}@keyframes _mat-select-exit{0%{opacity:1}to{opacity:0}}.mat-mdc-select{display:inline-block;width:100%;outline:none;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;color:var(--mat-select-enabled-trigger-text-color, var(--mat-sys-on-surface));font-family:var(--mat-select-trigger-text-font, var(--mat-sys-body-large-font));line-height:var(--mat-select-trigger-text-line-height, var(--mat-sys-body-large-line-height));font-size:var(--mat-select-trigger-text-size, var(--mat-sys-body-large-size));font-weight:var(--mat-select-trigger-text-weight, var(--mat-sys-body-large-weight));letter-spacing:var(--mat-select-trigger-text-tracking, var(--mat-sys-body-large-tracking))}div.mat-mdc-select-panel{box-shadow:var( --mat-select-container-elevation-shadow, 0px 3px 1px -2px rgba(0, 0, 0, .2), 0px 2px 2px 0px rgba(0, 0, 0, .14), 0px 1px 5px 0px rgba(0, 0, 0, .12) )}.mat-mdc-select-disabled,.mat-mdc-select-disabled .mat-mdc-select-placeholder{color:var( --mat-select-disabled-trigger-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent) )}.mat-mdc-select-trigger{display:inline-flex;align-items:center;cursor:pointer;position:relative;box-sizing:border-box;width:100%}.mat-mdc-select-disabled .mat-mdc-select-trigger{-webkit-user-select:none;user-select:none;cursor:default}.mat-mdc-select-value{width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mat-mdc-select-value-text{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mat-mdc-select-arrow-wrapper{height:24px;flex-shrink:0;display:inline-flex;align-items:center}.mat-mdc-select-arrow{width:10px;height:5px;position:relative;color:var(--mat-select-enabled-arrow-color, var(--mat-sys-on-surface-variant))}.mat-select-open .mat-mdc-select-arrow{transform:rotate(180deg)}.mat-mdc-select-arrow svg{fill:currentColor;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}@media(forced-colors:active){.mat-mdc-select-arrow svg{fill:CanvasText}.mat-mdc-select-disabled .mat-mdc-select-arrow svg{fill:GrayText}}div.mat-mdc-select-panel{width:100%;max-height:275px;outline:0;overflow:auto;padding:8px 0;box-sizing:border-box;transform-origin:top center;border-radius:0 0 4px 4px;position:relative;background-color:var(--mat-select-panel-background-color, var(--mat-sys-surface-container))}.mat-mdc-select-panel-above div.mat-mdc-select-panel{border-radius:4px 4px 0 0;transform-origin:bottom center}@media(forced-colors:active){div.mat-mdc-select-panel{outline:solid 1px}}.mat-select-panel-animations-enabled{animation:_mat-select-enter .12s cubic-bezier(0,0,.2,1)}.mat-select-panel-animations-enabled.mat-select-panel-exit{animation:_mat-select-exit .1s linear}.mat-mdc-select-placeholder{transition:color .4s .1333333333333s cubic-bezier(.25,.8,.25,1);color:var(--mat-select-placeholder-text-color, var(--mat-sys-on-surface-variant))}._mat-animation-noopable .mat-mdc-select-placeholder{transition:none}.mat-mdc-select-min-line:empty:before{content:\" \";white-space:pre;width:1px;display:inline-block;visibility:hidden}\n", "selectfield.mat-mdc-select{display:flex;align-items:center;box-sizing:border-box;width:100%;height:var(--control-height-md);padding:0;border:1px solid hsl(var(--input));border-radius:var(--radius-base);background:transparent;color:hsl(var(--foreground));font-family:var(--font-sans);font-size:var(--text-sm);line-height:var(--text-sm--line-height);cursor:pointer}selectfield .mat-mdc-select-trigger{height:100%;padding:0 calc(var(--spacing-base) * 3)}selectfield.mat-mdc-select:focus{outline:none}selectfield.mat-mdc-select:focus-visible:not(.mat-select-open){outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:var(--focus-ring-offset)}selectfield.mat-mdc-select-disabled{cursor:not-allowed;opacity:.5;background:hsl(var(--muted) / .4)}selectfield.mat-mdc-select-invalid{border-color:hsl(var(--destructive))}selectfield .mat-mdc-select-value{color:hsl(var(--foreground))}selectfield .mat-mdc-select-placeholder{color:hsl(var(--muted-foreground))}selectfield .mat-mdc-select-arrow{color:hsl(var(--muted-foreground))}div.mat-mdc-select-panel.select-panel{--mat-select-panel-background-color: hsl(var(--popover));display:flex;flex-direction:column;background-color:hsl(var(--popover));color:hsl(var(--popover-foreground));border:1px solid hsl(var(--ring));border-radius:var(--radius-base);box-shadow:0 0 0 1px hsl(var(--ring)),var(--shadow-md, 0 8px 18px -14px hsl(var(--foreground) / .24));padding:calc(var(--spacing-base) * 1);overflow:hidden}.select-panel .select-options{min-height:0;overflow:auto;outline:none}.select-search{flex:0 0 auto;margin-block-end:calc(var(--spacing-base) * 1)}.select-search-input{box-sizing:border-box;width:100%;height:var(--control-height-md);border:1px solid hsl(var(--input));border-radius:var(--radius-base);outline:none;background:transparent;color:hsl(var(--popover-foreground));padding-inline:calc(var(--spacing-base) * 3);font:inherit}.select-search-input::placeholder{color:hsl(var(--muted-foreground))}.select-search-input:focus-visible{border-color:hsl(var(--input));box-shadow:none}.select-search-input::-webkit-search-cancel-button{cursor:pointer}.select-empty{color:hsl(var(--muted-foreground));padding:calc(var(--spacing-base) * 2) calc(var(--spacing-base) * 3);font-size:var(--text-sm);line-height:var(--text-sm--line-height);text-align:center}.select-panel .mat-mdc-option{--mat-option-label-text-color: hsl(var(--popover-foreground));--mat-option-label-text-font: var(--font-sans);--mat-option-label-text-size: var(--text-sm);--mat-option-label-text-line-height: var(--text-sm--line-height);--mat-option-label-text-weight: 400;--mat-option-hover-state-layer-color: hsl(var(--accent));--mat-option-focus-state-layer-color: hsl(var(--accent));--mat-option-selected-state-layer-color: hsl(var(--accent));--mat-option-selected-state-label-text-color: hsl(var(--accent-foreground));min-height:var(--control-height-md);border-radius:var(--radius-base)}.select-panel .mat-mdc-option+.mat-mdc-option{margin-block-start:calc(var(--spacing-base) * .5)}.select-panel .mat-mdc-option.mdc-list-item--selected:not(.mdc-list-item--disabled) .mdc-list-item__primary-text{color:hsl(var(--accent-foreground))}.select-panel .mat-mdc-optgroup-label{--mat-optgroup-label-text-color: hsl(var(--muted-foreground));--mat-optgroup-label-text-font: var(--font-sans);--mat-optgroup-label-text-size: var(--text-xs);min-height:var(--control-height-xs)}\n"]
|
|
565
|
+
styles: ["@keyframes _mat-select-enter{0%{opacity:0;transform:scaleY(.8)}to{opacity:1;transform:none}}@keyframes _mat-select-exit{0%{opacity:1}to{opacity:0}}.mat-mdc-select{display:inline-block;width:100%;outline:none;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;color:var(--mat-select-enabled-trigger-text-color, var(--mat-sys-on-surface));font-family:var(--mat-select-trigger-text-font, var(--mat-sys-body-large-font));line-height:var(--mat-select-trigger-text-line-height, var(--mat-sys-body-large-line-height));font-size:var(--mat-select-trigger-text-size, var(--mat-sys-body-large-size));font-weight:var(--mat-select-trigger-text-weight, var(--mat-sys-body-large-weight));letter-spacing:var(--mat-select-trigger-text-tracking, var(--mat-sys-body-large-tracking))}div.mat-mdc-select-panel{box-shadow:var( --mat-select-container-elevation-shadow, 0px 3px 1px -2px rgba(0, 0, 0, .2), 0px 2px 2px 0px rgba(0, 0, 0, .14), 0px 1px 5px 0px rgba(0, 0, 0, .12) )}.mat-mdc-select-disabled,.mat-mdc-select-disabled .mat-mdc-select-placeholder{color:var( --mat-select-disabled-trigger-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent) )}.mat-mdc-select-trigger{display:inline-flex;align-items:center;cursor:pointer;position:relative;box-sizing:border-box;width:100%}.mat-mdc-select-disabled .mat-mdc-select-trigger{-webkit-user-select:none;user-select:none;cursor:default}.mat-mdc-select-value{width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mat-mdc-select-value-text{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mat-mdc-select-arrow-wrapper{height:24px;flex-shrink:0;display:inline-flex;align-items:center}.mat-mdc-select-arrow{width:10px;height:5px;position:relative;color:var(--mat-select-enabled-arrow-color, var(--mat-sys-on-surface-variant))}.mat-select-open .mat-mdc-select-arrow{transform:rotate(180deg)}.mat-mdc-select-arrow svg{fill:currentColor;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}@media(forced-colors:active){.mat-mdc-select-arrow svg{fill:CanvasText}.mat-mdc-select-disabled .mat-mdc-select-arrow svg{fill:GrayText}}div.mat-mdc-select-panel{width:100%;max-height:275px;outline:0;overflow:auto;padding:8px 0;box-sizing:border-box;transform-origin:top center;border-radius:0 0 4px 4px;position:relative;background-color:var(--mat-select-panel-background-color, var(--mat-sys-surface-container))}.mat-mdc-select-panel-above div.mat-mdc-select-panel{border-radius:4px 4px 0 0;transform-origin:bottom center}@media(forced-colors:active){div.mat-mdc-select-panel{outline:solid 1px}}.mat-select-panel-animations-enabled{animation:_mat-select-enter .12s cubic-bezier(0,0,.2,1)}.mat-select-panel-animations-enabled.mat-select-panel-exit{animation:_mat-select-exit .1s linear}.mat-mdc-select-placeholder{transition:color .4s .1333333333333s cubic-bezier(.25,.8,.25,1);color:var(--mat-select-placeholder-text-color, var(--mat-sys-on-surface-variant))}._mat-animation-noopable .mat-mdc-select-placeholder{transition:none}.mat-mdc-select-min-line:empty:before{content:\" \";white-space:pre;width:1px;display:inline-block;visibility:hidden}\n", "selectfield.mat-mdc-select{--focus-ring-offset: calc(-1 * var(--focus-ring-width));display:flex;align-items:center;box-sizing:border-box;width:100%;height:var(--control-height-md);padding:0;border:1px solid hsl(var(--input));border-radius:var(--radius-base);background:transparent;color:hsl(var(--foreground));font-family:var(--font-sans);font-size:var(--text-sm);line-height:var(--text-sm--line-height);cursor:pointer}selectfield .mat-mdc-select-trigger{height:100%;padding:0 calc(var(--spacing-base) * 3)}selectfield.mat-mdc-select:focus{outline:none}selectfield.mat-mdc-select:focus-visible:not(.mat-select-open){outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:var(--focus-ring-offset)}selectfield.mat-mdc-select-disabled{cursor:not-allowed;opacity:.5;background:hsl(var(--muted) / .4)}selectfield.mat-mdc-select-invalid{--focus-ring-color: hsl(var(--destructive));border-color:hsl(var(--destructive))}selectfield .mat-mdc-select-value{color:hsl(var(--foreground))}selectfield .mat-mdc-select-placeholder{color:hsl(var(--muted-foreground))}selectfield .mat-mdc-select-arrow{color:hsl(var(--muted-foreground))}div.mat-mdc-select-panel.select-panel{--mat-select-panel-background-color: hsl(var(--popover));display:flex;flex-direction:column;background-color:hsl(var(--popover));color:hsl(var(--popover-foreground));border:1px solid hsl(var(--ring));border-radius:var(--radius-base);box-shadow:0 0 0 1px hsl(var(--ring)),var(--shadow-md, 0 8px 18px -14px hsl(var(--foreground) / .24));padding:calc(var(--spacing-base) * 1);overflow:hidden}.select-panel .select-options{min-height:0;overflow:auto;outline:none}.select-search{flex:0 0 auto;margin-block-end:calc(var(--spacing-base) * 1)}.select-search-input{box-sizing:border-box;width:100%;height:var(--control-height-md);border:1px solid hsl(var(--input));border-radius:var(--radius-base);outline:none;background:transparent;color:hsl(var(--popover-foreground));padding-inline:calc(var(--spacing-base) * 3);font:inherit}.select-search-input::placeholder{color:hsl(var(--muted-foreground))}.select-search-input:focus-visible{border-color:hsl(var(--input));box-shadow:none}.select-search-input::-webkit-search-cancel-button{cursor:pointer}.select-empty{color:hsl(var(--muted-foreground));padding:calc(var(--spacing-base) * 2) calc(var(--spacing-base) * 3);font-size:var(--text-sm);line-height:var(--text-sm--line-height);text-align:center}.select-panel .mat-mdc-option{--mat-option-label-text-color: hsl(var(--popover-foreground));--mat-option-label-text-font: var(--font-sans);--mat-option-label-text-size: var(--text-sm);--mat-option-label-text-line-height: var(--text-sm--line-height);--mat-option-label-text-weight: 400;--mat-option-hover-state-layer-color: hsl(var(--accent));--mat-option-focus-state-layer-color: hsl(var(--accent));--mat-option-selected-state-layer-color: hsl(var(--accent));--mat-option-selected-state-label-text-color: hsl(var(--accent-foreground));min-height:var(--control-height-md);border-radius:var(--radius-base)}.select-panel .mat-mdc-option+.mat-mdc-option{margin-block-start:calc(var(--spacing-base) * .5)}.select-panel .mat-mdc-option.mdc-list-item--selected:not(.mdc-list-item--disabled) .mdc-list-item__primary-text{color:hsl(var(--accent-foreground))}.select-panel .mat-mdc-optgroup-label{--mat-optgroup-label-text-color: hsl(var(--muted-foreground));--mat-optgroup-label-text-font: var(--font-sans);--mat-optgroup-label-text-size: var(--text-xs);min-height:var(--control-height-xs)}\n"]
|
|
566
566
|
}]
|
|
567
567
|
}],
|
|
568
568
|
ctorParameters: () => [],
|
|
@@ -13,7 +13,7 @@ var TextareaComponent = class TextareaComponent {
|
|
|
13
13
|
"flex min-h-15 w-full resize-y rounded-md border border-input bg-transparent px-3 py-2",
|
|
14
14
|
"text-sm transition-colors",
|
|
15
15
|
"placeholder:text-muted-foreground",
|
|
16
|
-
"focus-ring",
|
|
16
|
+
"focus-ring [--focus-ring-offset:calc(-1*var(--focus-ring-width))]",
|
|
17
17
|
"disabled:cursor-not-allowed disabled:opacity-50",
|
|
18
18
|
"aria-[invalid=true]:border-destructive aria-[invalid=true]:[--focus-ring-color:hsl(var(--destructive))]"
|
|
19
19
|
].join(" "), this.class()), ...ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []);
|
|
@@ -338,13 +338,19 @@ var StorageCoordinator = class {
|
|
|
338
338
|
this.fail();
|
|
339
339
|
return;
|
|
340
340
|
}
|
|
341
|
+
let actionFailed = false;
|
|
341
342
|
await manager.request(LOCK_NAME, {
|
|
342
343
|
mode: "exclusive",
|
|
343
344
|
signal: controller.signal
|
|
344
345
|
}, () => {
|
|
345
346
|
clearTimeout(timeout);
|
|
346
|
-
|
|
347
|
+
try {
|
|
348
|
+
if (!this.destroyed && !controller.signal.aborted) action();
|
|
349
|
+
} catch {
|
|
350
|
+
actionFailed = true;
|
|
351
|
+
}
|
|
347
352
|
});
|
|
353
|
+
if (actionFailed) this.fail();
|
|
348
354
|
} catch {
|
|
349
355
|
this.fail();
|
|
350
356
|
} finally {
|
|
@@ -163,15 +163,20 @@ var NavigationBadgeCountComponent = class NavigationBadgeCountComponent {
|
|
|
163
163
|
ngImport: i0,
|
|
164
164
|
template: `
|
|
165
165
|
@if (resolvedBadge(); as resolved) {
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
166
|
+
<!-- The slot is layout neutral (display: contents) except under
|
|
167
|
+
badge-indicator="dot", where it anchors the dot. It sits outside the
|
|
168
|
+
badge so the dot inherits the item's text color, not the badge's. -->
|
|
169
|
+
<span data-navigation-badge-slot="true" class="contents">
|
|
170
|
+
<span
|
|
171
|
+
role="status"
|
|
172
|
+
aria-atomic="true"
|
|
173
|
+
data-navigation-badge="true"
|
|
174
|
+
[attr.data-navigation-badge-count]="resolved.count"
|
|
175
|
+
[attr.aria-label]="resolved.accessibleLabel"
|
|
176
|
+
[class]="badgeClasses()"
|
|
177
|
+
>
|
|
178
|
+
{{ resolved.display }}
|
|
179
|
+
</span>
|
|
175
180
|
</span>
|
|
176
181
|
}
|
|
177
182
|
`,
|
|
@@ -190,15 +195,20 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
190
195
|
host: { class: "contents" },
|
|
191
196
|
template: `
|
|
192
197
|
@if (resolvedBadge(); as resolved) {
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
198
|
+
<!-- The slot is layout neutral (display: contents) except under
|
|
199
|
+
badge-indicator="dot", where it anchors the dot. It sits outside the
|
|
200
|
+
badge so the dot inherits the item's text color, not the badge's. -->
|
|
201
|
+
<span data-navigation-badge-slot="true" class="contents">
|
|
202
|
+
<span
|
|
203
|
+
role="status"
|
|
204
|
+
aria-atomic="true"
|
|
205
|
+
data-navigation-badge="true"
|
|
206
|
+
[attr.data-navigation-badge-count]="resolved.count"
|
|
207
|
+
[attr.aria-label]="resolved.accessibleLabel"
|
|
208
|
+
[class]="badgeClasses()"
|
|
209
|
+
>
|
|
210
|
+
{{ resolved.display }}
|
|
211
|
+
</span>
|
|
202
212
|
</span>
|
|
203
213
|
}
|
|
204
214
|
`
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { i as hasNavigationCountBadge } from "./ojiepermana-angular-navigation-navigation-badge-count.component-
|
|
2
|
-
import { r as NavigationItemContentComponent, s as NAVIGATION_SHELL, t as NavigationItemComponent } from "./ojiepermana-angular-navigation-navigation-item.component-
|
|
3
|
-
import { t as NavigationListComponent } from "./ojiepermana-angular-navigation-navigation-list.component-
|
|
1
|
+
import { i as hasNavigationCountBadge } from "./ojiepermana-angular-navigation-navigation-badge-count.component-RkecLYjX.mjs";
|
|
2
|
+
import { r as NavigationItemContentComponent, s as NAVIGATION_SHELL, t as NavigationItemComponent } from "./ojiepermana-angular-navigation-navigation-item.component-DTVh0wjc.mjs";
|
|
3
|
+
import { t as NavigationListComponent } from "./ojiepermana-angular-navigation-navigation-list.component-CRRaXJz4.mjs";
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
import { Component, ElementRef, Injector, afterNextRender, computed, inject, input, output, signal } from "@angular/core";
|
|
6
6
|
import { cn } from "@ojiepermana/angular/component/utils/core";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as navigationPanelId, o as NavigationItemBadgeComponent, t as NavigationItemComponent } from "./ojiepermana-angular-navigation-navigation-item.component-
|
|
1
|
+
import { n as navigationPanelId, o as NavigationItemBadgeComponent, t as NavigationItemComponent } from "./ojiepermana-angular-navigation-navigation-item.component-DTVh0wjc.mjs";
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
3
|
import { Component, computed, inject, input, output, signal } from "@angular/core";
|
|
4
4
|
import { ActivatedRoute, Router, RouterLink } from "@angular/router";
|
|
@@ -263,6 +263,7 @@ var NavigationEntryGridComponent = class NavigationEntryGridComponent {
|
|
|
263
263
|
<Icon
|
|
264
264
|
name="chevron-right"
|
|
265
265
|
size="inherit"
|
|
266
|
+
data-navigation-chevron="true"
|
|
266
267
|
[class]="entryChevronClasses(child)"
|
|
267
268
|
/>
|
|
268
269
|
</button>
|
|
@@ -593,6 +594,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
593
594
|
<Icon
|
|
594
595
|
name="chevron-right"
|
|
595
596
|
size="inherit"
|
|
597
|
+
data-navigation-chevron="true"
|
|
596
598
|
[class]="entryChevronClasses(child)"
|
|
597
599
|
/>
|
|
598
600
|
</button>
|