@ngstarter-ui/components 22.2.2 → 22.2.4

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.
Files changed (56) hide show
  1. package/ai/component-registry.json +37 -0
  2. package/content-editor/BLOCK_FORMAT.md +861 -0
  3. package/content-editor/document.schema.json +1598 -0
  4. package/fesm2022/ngstarter-ui-components-content-editor-attachment-block-rzZKJ2JH.mjs +35 -0
  5. package/fesm2022/ngstarter-ui-components-content-editor-attachment-block-rzZKJ2JH.mjs.map +1 -0
  6. package/fesm2022/{ngstarter-ui-components-content-editor-callout-block-Cnga7Z-6.mjs → ngstarter-ui-components-content-editor-callout-block-DTdApN0r.mjs} +2 -3
  7. package/fesm2022/{ngstarter-ui-components-content-editor-callout-block-Cnga7Z-6.mjs.map → ngstarter-ui-components-content-editor-callout-block-DTdApN0r.mjs.map} +1 -1
  8. package/fesm2022/{ngstarter-ui-components-content-editor-code-block.component-DSdVOJtH.mjs → ngstarter-ui-components-content-editor-code-block.component-DpONkTMU.mjs} +2 -2
  9. package/fesm2022/{ngstarter-ui-components-content-editor-code-block.component-DSdVOJtH.mjs.map → ngstarter-ui-components-content-editor-code-block.component-DpONkTMU.mjs.map} +1 -1
  10. package/fesm2022/{ngstarter-ui-components-content-editor-embed-block-DhFxtMQS.mjs → ngstarter-ui-components-content-editor-embed-block-CmhzpaRk.mjs} +2 -2
  11. package/fesm2022/{ngstarter-ui-components-content-editor-embed-block-DhFxtMQS.mjs.map → ngstarter-ui-components-content-editor-embed-block-CmhzpaRk.mjs.map} +1 -1
  12. package/fesm2022/{ngstarter-ui-components-content-editor-gallery-block-cEy-dCMa.mjs → ngstarter-ui-components-content-editor-gallery-block-gtH7yWd5.mjs} +16 -39
  13. package/fesm2022/ngstarter-ui-components-content-editor-gallery-block-gtH7yWd5.mjs.map +1 -0
  14. package/fesm2022/{ngstarter-ui-components-content-editor-grid-block-DFLGRFiO.mjs → ngstarter-ui-components-content-editor-grid-block-Pb-xV7Pw.mjs} +3 -4
  15. package/fesm2022/{ngstarter-ui-components-content-editor-grid-block-DFLGRFiO.mjs.map → ngstarter-ui-components-content-editor-grid-block-Pb-xV7Pw.mjs.map} +1 -1
  16. package/fesm2022/{ngstarter-ui-components-content-editor-heading-block.component-BYpctSPe.mjs → ngstarter-ui-components-content-editor-heading-block.component-BKe9Zy_x.mjs} +2 -2
  17. package/fesm2022/{ngstarter-ui-components-content-editor-heading-block.component-BYpctSPe.mjs.map → ngstarter-ui-components-content-editor-heading-block.component-BKe9Zy_x.mjs.map} +1 -1
  18. package/fesm2022/ngstarter-ui-components-content-editor-image-block.component-DSpBVTu-.mjs +113 -0
  19. package/fesm2022/ngstarter-ui-components-content-editor-image-block.component-DSpBVTu-.mjs.map +1 -0
  20. package/fesm2022/{ngstarter-ui-components-content-editor-list-block.component-6SMBxIl4.mjs → ngstarter-ui-components-content-editor-list-block.component-BPKPE1uY.mjs} +2 -2
  21. package/fesm2022/{ngstarter-ui-components-content-editor-list-block.component-6SMBxIl4.mjs.map → ngstarter-ui-components-content-editor-list-block.component-BPKPE1uY.mjs.map} +1 -1
  22. package/fesm2022/{ngstarter-ui-components-content-editor-nested-blocks-DSY7xfzf.mjs → ngstarter-ui-components-content-editor-nested-blocks-Dh-p3WMp.mjs} +4 -4
  23. package/fesm2022/ngstarter-ui-components-content-editor-nested-blocks-Dh-p3WMp.mjs.map +1 -0
  24. package/fesm2022/{ngstarter-ui-components-content-editor-ngstarter-ui-components-content-editor--rb3-UuO.mjs → ngstarter-ui-components-content-editor-ngstarter-ui-components-content-editor-CR-NrarE.mjs} +2058 -983
  25. package/fesm2022/ngstarter-ui-components-content-editor-ngstarter-ui-components-content-editor-CR-NrarE.mjs.map +1 -0
  26. package/fesm2022/{ngstarter-ui-components-content-editor-paragraph-block.component-JVxf_Cdx.mjs → ngstarter-ui-components-content-editor-paragraph-block.component-D5wS3m6O.mjs} +2 -2
  27. package/fesm2022/{ngstarter-ui-components-content-editor-paragraph-block.component-JVxf_Cdx.mjs.map → ngstarter-ui-components-content-editor-paragraph-block.component-D5wS3m6O.mjs.map} +1 -1
  28. package/fesm2022/{ngstarter-ui-components-content-editor-quote-block.component-7EO7z7Sr.mjs → ngstarter-ui-components-content-editor-quote-block.component-C3GFAGKF.mjs} +2 -2
  29. package/fesm2022/{ngstarter-ui-components-content-editor-quote-block.component-7EO7z7Sr.mjs.map → ngstarter-ui-components-content-editor-quote-block.component-C3GFAGKF.mjs.map} +1 -1
  30. package/fesm2022/{ngstarter-ui-components-content-editor-table-block.component-CJS-IBHw.mjs → ngstarter-ui-components-content-editor-table-block.component-DQgs_kyN.mjs} +2 -2
  31. package/fesm2022/{ngstarter-ui-components-content-editor-table-block.component-CJS-IBHw.mjs.map → ngstarter-ui-components-content-editor-table-block.component-DQgs_kyN.mjs.map} +1 -1
  32. package/fesm2022/{ngstarter-ui-components-content-editor-toggle-block-B01lhY_V.mjs → ngstarter-ui-components-content-editor-toggle-block-Cb67ChE8.mjs} +3 -4
  33. package/fesm2022/{ngstarter-ui-components-content-editor-toggle-block-B01lhY_V.mjs.map → ngstarter-ui-components-content-editor-toggle-block-Cb67ChE8.mjs.map} +1 -1
  34. package/fesm2022/ngstarter-ui-components-content-editor-upload-status-QnKI_Rfz.mjs +19 -0
  35. package/fesm2022/ngstarter-ui-components-content-editor-upload-status-QnKI_Rfz.mjs.map +1 -0
  36. package/fesm2022/ngstarter-ui-components-content-editor-video-block.component-CRa0g9Ez.mjs +134 -0
  37. package/fesm2022/ngstarter-ui-components-content-editor-video-block.component-CRa0g9Ez.mjs.map +1 -0
  38. package/fesm2022/ngstarter-ui-components-content-editor.mjs +1 -1
  39. package/fesm2022/ngstarter-ui-components-headless-editor.mjs +57 -0
  40. package/fesm2022/ngstarter-ui-components-headless-editor.mjs.map +1 -1
  41. package/package.json +3 -1
  42. package/types/ngstarter-ui-components-content-editor.d.ts +302 -18
  43. package/types/ngstarter-ui-components-headless-editor.d.ts +6 -1
  44. package/fesm2022/ngstarter-ui-components-content-editor-attachment-block-B2GUlWO2.mjs +0 -54
  45. package/fesm2022/ngstarter-ui-components-content-editor-attachment-block-B2GUlWO2.mjs.map +0 -1
  46. package/fesm2022/ngstarter-ui-components-content-editor-block-base-BHAxKEOT.mjs +0 -47
  47. package/fesm2022/ngstarter-ui-components-content-editor-block-base-BHAxKEOT.mjs.map +0 -1
  48. package/fesm2022/ngstarter-ui-components-content-editor-gallery-block-cEy-dCMa.mjs.map +0 -1
  49. package/fesm2022/ngstarter-ui-components-content-editor-image-block.component-B3MnANpi.mjs +0 -169
  50. package/fesm2022/ngstarter-ui-components-content-editor-image-block.component-B3MnANpi.mjs.map +0 -1
  51. package/fesm2022/ngstarter-ui-components-content-editor-nested-blocks-DSY7xfzf.mjs.map +0 -1
  52. package/fesm2022/ngstarter-ui-components-content-editor-ngstarter-ui-components-content-editor--rb3-UuO.mjs.map +0 -1
  53. package/fesm2022/ngstarter-ui-components-content-editor-upload-block-base-D9ELpJr-.mjs +0 -29
  54. package/fesm2022/ngstarter-ui-components-content-editor-upload-block-base-D9ELpJr-.mjs.map +0 -1
  55. package/fesm2022/ngstarter-ui-components-content-editor-video-block.component-DQUPVDwV.mjs +0 -201
  56. package/fesm2022/ngstarter-ui-components-content-editor-video-block.component-DQUPVDwV.mjs.map +0 -1
@@ -1,29 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import { signal, inject, DestroyRef, Directive } from '@angular/core';
3
- import { C as ContentEditorBlockBase } from './ngstarter-ui-components-content-editor-block-base-BHAxKEOT.mjs';
4
- import { h as findContentEditorBlock } from './ngstarter-ui-components-content-editor-ngstarter-ui-components-content-editor--rb3-UuO.mjs';
5
-
6
- class ContentEditorUploadBlockBase extends ContentEditorBlockBase {
7
- uploading = signal(false, /* @ts-ignore */
8
- ...(ngDevMode ? [{ debugName: "uploading" }] : /* istanbul ignore next */ []));
9
- error = signal('', /* @ts-ignore */
10
- ...(ngDevMode ? [{ debugName: "error" }] : /* istanbul ignore next */ []));
11
- request = 0;
12
- constructor() {
13
- super();
14
- inject(DestroyRef).onDestroy(() => { this.request++; });
15
- }
16
- beginUpload() { this.uploading.set(true); this.error.set(''); return ++this.request; }
17
- isCurrentUpload(request) {
18
- return request === this.request && !!findContentEditorBlock(this.store.editor.document().blocks, this.id());
19
- }
20
- cancelUpload() { this.request++; this.uploading.set(false); }
21
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: ContentEditorUploadBlockBase, deps: [], target: i0.ɵɵFactoryTarget.Directive });
22
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.7", type: ContentEditorUploadBlockBase, isStandalone: true, usesInheritance: true, ngImport: i0 });
23
- }
24
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: ContentEditorUploadBlockBase, decorators: [{
25
- type: Directive
26
- }], ctorParameters: () => [] });
27
-
28
- export { ContentEditorUploadBlockBase as C };
29
- //# sourceMappingURL=ngstarter-ui-components-content-editor-upload-block-base-D9ELpJr-.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ngstarter-ui-components-content-editor-upload-block-base-D9ELpJr-.mjs","sources":["../../../projects/components/content-editor/src/_builder/upload-block-base.ts"],"sourcesContent":["import { DestroyRef, Directive, inject, signal } from '@angular/core';\nimport { ContentEditorBlockBase } from './block-base';\nimport { findContentEditorBlock } from '../document';\n\n@Directive()\nexport abstract class ContentEditorUploadBlockBase<T, S extends object = Record<string, unknown>> extends ContentEditorBlockBase<T, S> {\n readonly uploading = signal(false);\n readonly error = signal('');\n private request = 0;\n constructor() {\n super();\n inject(DestroyRef).onDestroy(() => { this.request++; });\n }\n protected beginUpload(): number { this.uploading.set(true); this.error.set(''); return ++this.request; }\n protected isCurrentUpload(request: number): boolean {\n return request === this.request && !!findContentEditorBlock(this.store.editor.document().blocks, this.id());\n }\n cancelUpload(): void { this.request++; this.uploading.set(false); }\n}\n"],"names":[],"mappings":";;;;;AAKM,MAAgB,4BAA4E,SAAQ,sBAA4B,CAAA;IAC3H,SAAS,GAAG,MAAM,CAAC,KAAK;kFAAC;IACzB,KAAK,GAAG,MAAM,CAAC,EAAE;8EAAC;IACnB,OAAO,GAAG,CAAC;AACnB,IAAA,WAAA,GAAA;AACE,QAAA,KAAK,EAAE;AACP,QAAA,MAAM,CAAC,UAAU,CAAC,CAAC,SAAS,CAAC,MAAK,EAAG,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC;IACzD;AACU,IAAA,WAAW,GAAA,EAAa,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;AAC7F,IAAA,eAAe,CAAC,OAAe,EAAA;QACvC,OAAO,OAAO,KAAK,IAAI,CAAC,OAAO,IAAI,CAAC,CAAC,sBAAsB,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC,MAAM,EAAE,IAAI,CAAC,EAAE,EAAE,CAAC;IAC7G;AACA,IAAA,YAAY,KAAW,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC;uGAZ9C,4BAA4B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAA5B,4BAA4B,EAAA,YAAA,EAAA,IAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAA5B,4BAA4B,EAAA,UAAA,EAAA,CAAA;kBADjD;;;;;"}
@@ -1,201 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import { inject, input, signal, model, viewChild, effect, untracked, forwardRef, ChangeDetectionStrategy, Component } from '@angular/core';
3
- import { UploadArea, UploadTriggerDirective } from '@ngstarter-ui/components/upload';
4
- import { ProgressBar } from '@ngstarter-ui/components/progress-bar';
5
- import { Button } from '@ngstarter-ui/components/button';
6
- import { Icon } from '@ngstarter-ui/components/icon';
7
- import { C as ContentBuilderStore, a as CONTENT_BUILDER, e as CONTENT_EDITOR_BLOCK } from './ngstarter-ui-components-content-editor-ngstarter-ui-components-content-editor--rb3-UuO.mjs';
8
- import { FormField, Label } from '@ngstarter-ui/components/form-field';
9
- import { Input } from '@ngstarter-ui/components/input';
10
- import * as i1 from '@angular/forms';
11
- import { FormsModule } from '@angular/forms';
12
- import { ResizableContainer } from '@ngstarter-ui/components/resizable-container';
13
-
14
- class VideoBlockComponent {
15
- _store = inject(ContentBuilderStore);
16
- _contentBuilder = inject(CONTENT_BUILDER);
17
- id = input.required(/* @ts-ignore */
18
- ...(ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []));
19
- content = input.required(/* @ts-ignore */
20
- ...(ngDevMode ? [{ debugName: "content" }] : /* istanbul ignore next */ []));
21
- settings = input.required(/* @ts-ignore */
22
- ...(ngDevMode ? [{ debugName: "settings" }] : /* istanbul ignore next */ []));
23
- index = input.required(/* @ts-ignore */
24
- ...(ngDevMode ? [{ debugName: "index" }] : /* istanbul ignore next */ []));
25
- props = input([], /* @ts-ignore */
26
- ...(ngDevMode ? [{ debugName: "props" }] : /* istanbul ignore next */ []));
27
- uploading = signal(false, /* @ts-ignore */
28
- ...(ngDevMode ? [{ debugName: "uploading" }] : /* istanbul ignore next */ []));
29
- selectedVideo = signal('', /* @ts-ignore */
30
- ...(ngDevMode ? [{ debugName: "selectedVideo" }] : /* istanbul ignore next */ []));
31
- _src = signal('', /* @ts-ignore */
32
- ...(ngDevMode ? [{ debugName: "_src" }] : /* istanbul ignore next */ []));
33
- _caption = model('', /* @ts-ignore */
34
- ...(ngDevMode ? [{ debugName: "_caption" }] : /* istanbul ignore next */ []));
35
- _orientation = signal('landscape', /* @ts-ignore */
36
- ...(ngDevMode ? [{ debugName: "_orientation" }] : /* istanbul ignore next */ []));
37
- _settings = model({}, /* @ts-ignore */
38
- ...(ngDevMode ? [{ debugName: "_settings" }] : /* istanbul ignore next */ []));
39
- initialized = signal(false, /* @ts-ignore */
40
- ...(ngDevMode ? [{ debugName: "initialized" }] : /* istanbul ignore next */ []));
41
- videoElement = viewChild('videoPlayer', /* @ts-ignore */
42
- ...(ngDevMode ? [{ debugName: "videoElement" }] : /* istanbul ignore next */ []));
43
- _aspectRatio = 16 / 9;
44
- constructor() {
45
- effect(() => {
46
- const content = this.content();
47
- const settings = this.settings();
48
- untracked(() => {
49
- this._src.set(content.src);
50
- this._caption.set(content.caption);
51
- this._orientation.set(content.orientation || 'landscape');
52
- this._settings.set({ ...settings });
53
- });
54
- });
55
- }
56
- ngOnInit() {
57
- this._src.set(this.content().src);
58
- this._caption.set(this.content().caption);
59
- this._orientation.set(this.content().orientation || 'landscape');
60
- this._settings.set(this.settings() || {});
61
- this.initialized.set(true);
62
- }
63
- focus() {
64
- if (this._src()) {
65
- this._contentBuilder.focusBlock(this.id());
66
- }
67
- }
68
- getData() {
69
- return {
70
- content: {
71
- src: this._src(),
72
- caption: this._caption(),
73
- orientation: this._orientation()
74
- },
75
- settings: {
76
- ...this._settings(),
77
- }
78
- };
79
- }
80
- isEmpty() {
81
- const src = this.getData().content.src;
82
- return typeof src === 'string' ? src.trim().length === 0 : !src;
83
- }
84
- cancelUploading() {
85
- this.uploading.set(false);
86
- }
87
- onFileSelected(event) {
88
- this.uploading.set(true);
89
- const reader = new FileReader();
90
- reader.addEventListener('load', () => {
91
- this.selectedVideo.set(reader.result);
92
- const video = document.createElement('video');
93
- video.preload = 'metadata';
94
- video.onloadedmetadata = () => {
95
- window.URL.revokeObjectURL(video.src);
96
- const orientation = video.videoWidth > video.videoHeight ? 'landscape' : 'portrait';
97
- this._orientation.set(orientation);
98
- this._aspectRatio = video.videoWidth / video.videoHeight;
99
- let width = video.videoWidth;
100
- let height = video.videoHeight;
101
- if (width > 704) {
102
- width = 704;
103
- height = Math.round(width / this._aspectRatio);
104
- }
105
- if (height > 1000) {
106
- width = Math.round(width / 2);
107
- height = Math.round(height / 2);
108
- }
109
- // Initial settings based on video metadata
110
- this._settings.update(s => ({
111
- ...s,
112
- actualWidth: video.videoWidth,
113
- actualHeight: video.videoHeight,
114
- width,
115
- height
116
- }));
117
- };
118
- video.src = URL.createObjectURL(event.files[0]);
119
- const uploadFn = this._contentBuilder.getBlockDefOption('video', 'uploadFn');
120
- uploadFn(event.files[0], reader.result)
121
- .then((url) => {
122
- if (!this.uploading()) {
123
- this.selectedVideo.set('');
124
- return;
125
- }
126
- this._src.set(url);
127
- this.selectedVideo.set('');
128
- this.uploading.set(false);
129
- this.update();
130
- this.focus();
131
- });
132
- }, false);
133
- reader.readAsDataURL(event.files[0]);
134
- }
135
- _onCaptionChange() {
136
- this.update();
137
- }
138
- _onVideoResized(event) {
139
- let width = event.width;
140
- if (width > 704) {
141
- width = 704;
142
- }
143
- const height = Math.round(width / this._aspectRatio);
144
- this._settings.update(s => ({
145
- ...s,
146
- width,
147
- height
148
- }));
149
- this.update();
150
- }
151
- _onVideoLoaded(event) {
152
- const video = event.target;
153
- this._aspectRatio = video.videoWidth / video.videoHeight;
154
- }
155
- handleKeyPress(event) {
156
- if (event.key === 'Enter') {
157
- event.preventDefault();
158
- event.stopPropagation();
159
- this._contentBuilder.insertEmptyBlock(this.index());
160
- }
161
- }
162
- update() {
163
- this._store.updateBlock(this.id(), { ...this.getData(), isEmpty: this.isEmpty() });
164
- this._contentBuilder.emitContentChangeEvent();
165
- }
166
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: VideoBlockComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
167
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.7", type: VideoBlockComponent, isStandalone: true, selector: "ngs-video-block", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: true, transformFunction: null }, content: { classPropertyName: "content", publicName: "content", isSignal: true, isRequired: true, transformFunction: null }, settings: { classPropertyName: "settings", publicName: "settings", isSignal: true, isRequired: true, transformFunction: null }, index: { classPropertyName: "index", publicName: "index", isSignal: true, isRequired: true, transformFunction: null }, props: { classPropertyName: "props", publicName: "props", isSignal: true, isRequired: false, transformFunction: null }, _caption: { classPropertyName: "_caption", publicName: "_caption", isSignal: true, isRequired: false, transformFunction: null }, _settings: { classPropertyName: "_settings", publicName: "_settings", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { _caption: "_captionChange", _settings: "_settingsChange" }, host: { listeners: { "keypress": "handleKeyPress($event)" }, classAttribute: "block" }, providers: [
168
- {
169
- provide: CONTENT_EDITOR_BLOCK,
170
- useExisting: forwardRef(() => VideoBlockComponent),
171
- multi: true
172
- }
173
- ], viewQueries: [{ propertyName: "videoElement", first: true, predicate: ["videoPlayer"], descendants: true, isSignal: true }], ngImport: i0, template: "@if (uploading()) {\n <div class=\"relative flex items-center justify-center overflow-hidden\">\n <div class=\"absolute inset-0 z-10 flex items-center justify-center bg-white/80\">\n <div class=\"absolute top-0 start-0 end-0 z-20\">\n <ngs-progress-bar mode=\"indeterminate\"/>\n </div>\n <div class=\"absolute end-2 top-4 w-max z-30\">\n <button ngsButton (click)=\"cancelUploading()\">\n <ngs-icon name=\"fluent:delete-24-regular\"/>\n </button>\n </div>\n <div class=\"bg-white px-3 text-sm py-1.5 rounded-lg border border-border\">Loading...</div>\n </div>\n <div [style.width.px]=\"_settings().width || null\"\n [style.height.px]=\"_settings().height || null\"\n [class.max-w-full]=\"!_settings().width\">\n <video [src]=\"selectedVideo()\" muted class=\"w-full h-auto block\"></video>\n </div>\n </div>\n} @else if (_src()) {\n <div class=\"flex items-center justify-center overflow-hidden\">\n <ngs-resizable-container (resized)=\"_onVideoResized($event)\"\n [style.width.px]=\"_settings().width || null\"\n [style.height.px]=\"_settings().height || null\"\n [class.max-w-full]=\"!_settings().width\">\n <video #videoPlayer\n [src]=\"_src()\"\n class=\"w-full h-auto block\"\n (loadedmetadata)=\"_onVideoLoaded($event)\"\n controls></video>\n </ngs-resizable-container>\n </div>\n <ngs-form-field class=\"w-full mt-5\">\n <ngs-label>Caption</ngs-label>\n <input ngsInput [(ngModel)]=\"_caption\" (ngModelChange)=\"_onCaptionChange()\">\n </ngs-form-field>\n} @else {\n <ngs-upload-area #uploadArea=\"ngsUploadArea\"\n ngsUploadTrigger accept=\"video/*\"\n (fileSelected)=\"onFileSelected($event)\" multiple=\"false\"\n class=\"cursor-pointer hover:outline-2 hover:outline-[var(--color-primary)]\">\n @if (!uploadArea.api.isDropActive) {\n Drag & drop video here or click to upload\n } @else {\n <div class=\"font-medium\">Drop video here</div>\n }\n </ngs-upload-area>\n}\n", styles: [":host{display:block}:host ngs-upload-area{--ngs-upload-area-padding: calc(var(--spacing, .25rem) * 6) calc(var(--spacing, .25rem) * 10)}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "component", type: UploadArea, selector: "ngs-upload-area", inputs: ["accept", "allowHover", "multiple"], outputs: ["fileSelected"], exportAs: ["ngsUploadArea"] }, { kind: "directive", type: UploadTriggerDirective, selector: "[ngsUploadTrigger]", inputs: ["accept", "multiple"], outputs: ["fileSelected"], exportAs: ["ngsUploadTrigger"] }, { kind: "component", type: ProgressBar, selector: "ngs-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["ngsProgressBar"] }, { kind: "component", type: Button, selector: " button[ngsButton], button[ngsIconButton], a[ngsButton], a[ngsIconButton] ", inputs: ["ngsButton", "ngsIconButton", "loading", "disabled", "disabledInteractive", "disableRipple", "reverse", "fullWidth", "hideTextOnMobile"], exportAs: ["ngsButton"] }, { kind: "component", type: Icon, selector: "ngs-icon", inputs: ["name"], exportAs: ["ngsIcon"] }, { kind: "component", type: FormField, selector: "ngs-form-field", inputs: ["labelMode", "subscriptHiddenIfEmpty", "sameHeightAsButton"], exportAs: ["ngsFormField"] }, { kind: "directive", type: Input, selector: "input[ngsInput], textarea[ngsInput]", inputs: ["id", "placeholder", "required", "disabled", "readonly", "errorStateMatcher"], exportAs: ["ngsInput"] }, { 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: Label, selector: "ngs-label" }, { kind: "component", type: ResizableContainer, selector: "ngs-resizable-container", inputs: ["minWidth"], outputs: ["resized"], exportAs: ["ngsResizableContainer"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
174
- }
175
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: VideoBlockComponent, decorators: [{
176
- type: Component,
177
- args: [{ selector: 'ngs-video-block', imports: [
178
- UploadArea,
179
- UploadTriggerDirective,
180
- ProgressBar,
181
- Button,
182
- Icon,
183
- FormField,
184
- Input,
185
- FormsModule,
186
- Label,
187
- ResizableContainer
188
- ], providers: [
189
- {
190
- provide: CONTENT_EDITOR_BLOCK,
191
- useExisting: forwardRef(() => VideoBlockComponent),
192
- multi: true
193
- }
194
- ], changeDetection: ChangeDetectionStrategy.OnPush, host: {
195
- '(keypress)': 'handleKeyPress($event)',
196
- 'class': 'block'
197
- }, template: "@if (uploading()) {\n <div class=\"relative flex items-center justify-center overflow-hidden\">\n <div class=\"absolute inset-0 z-10 flex items-center justify-center bg-white/80\">\n <div class=\"absolute top-0 start-0 end-0 z-20\">\n <ngs-progress-bar mode=\"indeterminate\"/>\n </div>\n <div class=\"absolute end-2 top-4 w-max z-30\">\n <button ngsButton (click)=\"cancelUploading()\">\n <ngs-icon name=\"fluent:delete-24-regular\"/>\n </button>\n </div>\n <div class=\"bg-white px-3 text-sm py-1.5 rounded-lg border border-border\">Loading...</div>\n </div>\n <div [style.width.px]=\"_settings().width || null\"\n [style.height.px]=\"_settings().height || null\"\n [class.max-w-full]=\"!_settings().width\">\n <video [src]=\"selectedVideo()\" muted class=\"w-full h-auto block\"></video>\n </div>\n </div>\n} @else if (_src()) {\n <div class=\"flex items-center justify-center overflow-hidden\">\n <ngs-resizable-container (resized)=\"_onVideoResized($event)\"\n [style.width.px]=\"_settings().width || null\"\n [style.height.px]=\"_settings().height || null\"\n [class.max-w-full]=\"!_settings().width\">\n <video #videoPlayer\n [src]=\"_src()\"\n class=\"w-full h-auto block\"\n (loadedmetadata)=\"_onVideoLoaded($event)\"\n controls></video>\n </ngs-resizable-container>\n </div>\n <ngs-form-field class=\"w-full mt-5\">\n <ngs-label>Caption</ngs-label>\n <input ngsInput [(ngModel)]=\"_caption\" (ngModelChange)=\"_onCaptionChange()\">\n </ngs-form-field>\n} @else {\n <ngs-upload-area #uploadArea=\"ngsUploadArea\"\n ngsUploadTrigger accept=\"video/*\"\n (fileSelected)=\"onFileSelected($event)\" multiple=\"false\"\n class=\"cursor-pointer hover:outline-2 hover:outline-[var(--color-primary)]\">\n @if (!uploadArea.api.isDropActive) {\n Drag & drop video here or click to upload\n } @else {\n <div class=\"font-medium\">Drop video here</div>\n }\n </ngs-upload-area>\n}\n", styles: [":host{display:block}:host ngs-upload-area{--ngs-upload-area-padding: calc(var(--spacing, .25rem) * 6) calc(var(--spacing, .25rem) * 10)}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"] }]
198
- }], ctorParameters: () => [], propDecorators: { id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: true }] }], content: [{ type: i0.Input, args: [{ isSignal: true, alias: "content", required: true }] }], settings: [{ type: i0.Input, args: [{ isSignal: true, alias: "settings", required: true }] }], index: [{ type: i0.Input, args: [{ isSignal: true, alias: "index", required: true }] }], props: [{ type: i0.Input, args: [{ isSignal: true, alias: "props", required: false }] }], _caption: [{ type: i0.Input, args: [{ isSignal: true, alias: "_caption", required: false }] }, { type: i0.Output, args: ["_captionChange"] }], _settings: [{ type: i0.Input, args: [{ isSignal: true, alias: "_settings", required: false }] }, { type: i0.Output, args: ["_settingsChange"] }], videoElement: [{ type: i0.ViewChild, args: ['videoPlayer', { isSignal: true }] }] } });
199
-
200
- export { VideoBlockComponent };
201
- //# sourceMappingURL=ngstarter-ui-components-content-editor-video-block.component-DQUPVDwV.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ngstarter-ui-components-content-editor-video-block.component-DQUPVDwV.mjs","sources":["../../../projects/components/content-editor/src/_builder/video-block/video-block.component.ts","../../../projects/components/content-editor/src/_builder/video-block/video-block.component.html"],"sourcesContent":["import { ChangeDetectionStrategy, Component, effect, untracked, forwardRef, inject, input, model, OnInit, signal, viewChild, ElementRef } from '@angular/core';\nimport { UploadArea, UploadFileSelectedEvent, UploadTriggerDirective } from '@ngstarter-ui/components/upload';\nimport { ProgressBar } from '@ngstarter-ui/components/progress-bar';\nimport { Button } from '@ngstarter-ui/components/button';\nimport { Icon } from '@ngstarter-ui/components/icon';\nimport {\n CONTENT_BUILDER,\n CONTENT_EDITOR_BLOCK, ContentEditorDataBlock,\n ContentEditorVideoBlockSettings,\n ContentEditorVideoContent\n} from '../../types';\nimport { FormField, Label } from '@ngstarter-ui/components/form-field';\nimport { Input } from '@ngstarter-ui/components/input';\nimport { FormsModule } from '@angular/forms';\nimport { ContentBuilderStore } from '../../content-builder.store';\nimport { ContentBuilderComponent } from '../../content-builder/content-builder.component';\nimport { ResizableContainer } from '@ngstarter-ui/components/resizable-container';\n\n@Component({\n selector: 'ngs-video-block',\n imports: [\n UploadArea,\n UploadTriggerDirective,\n ProgressBar,\n Button,\n Icon,\n FormField,\n Input,\n FormsModule,\n Label,\n ResizableContainer\n ],\n providers: [\n {\n provide: CONTENT_EDITOR_BLOCK,\n useExisting: forwardRef(() => VideoBlockComponent),\n multi: true\n }\n ],\n templateUrl: './video-block.component.html',\n styleUrl: './video-block.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '(keypress)': 'handleKeyPress($event)',\n 'class': 'block'\n }\n})\nexport class VideoBlockComponent implements OnInit, ContentEditorDataBlock {\n private _store = inject(ContentBuilderStore);\n private _contentBuilder = inject<ContentBuilderComponent>(CONTENT_BUILDER);\n\n id = input.required<string>();\n content = input.required<ContentEditorVideoContent>();\n settings = input.required<ContentEditorVideoBlockSettings>();\n index = input.required<number>();\n props = input<unknown[]>([]);\n\n uploading = signal(false);\n selectedVideo = signal<string>('');\n\n protected _src = signal<string>('');\n protected _caption = model<string>('');\n protected _orientation = signal<'portrait' | 'landscape'>('landscape');\n protected _settings = model<ContentEditorVideoBlockSettings>({});\n readonly initialized = signal(false);\n\n readonly videoElement = viewChild<ElementRef<HTMLVideoElement>>('videoPlayer');\n\n private _aspectRatio = 16 / 9;\n\n constructor() {\n effect(() => {\n const content = this.content();\n const settings = this.settings();\n untracked(() => {\n this._src.set(content.src);\n this._caption.set(content.caption);\n this._orientation.set(content.orientation || 'landscape');\n this._settings.set({ ...settings });\n });\n });\n }\n\n ngOnInit() {\n this._src.set(this.content().src);\n this._caption.set(this.content().caption);\n this._orientation.set(this.content().orientation || 'landscape');\n this._settings.set(this.settings() || {});\n this.initialized.set(true);\n }\n\n focus() {\n if (this._src()) {\n this._contentBuilder.focusBlock(this.id());\n }\n }\n\n getData(): any {\n return {\n content: {\n src: this._src(),\n caption: this._caption(),\n orientation: this._orientation()\n },\n settings: {\n ...this._settings(),\n }\n };\n }\n\n isEmpty(): boolean {\n const src = this.getData().content.src;\n return typeof src === 'string' ? src.trim().length === 0 : !src;\n }\n\n protected cancelUploading() {\n this.uploading.set(false);\n }\n\n protected onFileSelected(event: UploadFileSelectedEvent): void {\n this.uploading.set(true);\n const reader = new FileReader();\n reader.addEventListener('load', () => {\n this.selectedVideo.set(reader.result as string);\n\n const video = document.createElement('video');\n video.preload = 'metadata';\n video.onloadedmetadata = () => {\n window.URL.revokeObjectURL(video.src);\n const orientation = video.videoWidth > video.videoHeight ? 'landscape' : 'portrait';\n this._orientation.set(orientation);\n this._aspectRatio = video.videoWidth / video.videoHeight;\n\n let width = video.videoWidth;\n let height = video.videoHeight;\n\n if (width > 704) {\n width = 704;\n height = Math.round(width / this._aspectRatio);\n }\n\n if (height > 1000) {\n width = Math.round(width / 2);\n height = Math.round(height / 2);\n }\n\n // Initial settings based on video metadata\n this._settings.update(s => ({\n ...s,\n actualWidth: video.videoWidth,\n actualHeight: video.videoHeight,\n width,\n height\n }));\n };\n video.src = URL.createObjectURL(event.files[0]);\n\n const uploadFn = this._contentBuilder.getBlockDefOption('video', 'uploadFn');\n uploadFn(event.files[0], reader.result)\n .then((url: string) => {\n if (!this.uploading()) {\n this.selectedVideo.set('');\n return;\n }\n\n this._src.set(url);\n this.selectedVideo.set('');\n this.uploading.set(false);\n this.update();\n this.focus();\n });\n }, false);\n reader.readAsDataURL(event.files[0]);\n }\n\n protected _onCaptionChange() {\n this.update();\n }\n\n protected _onVideoResized(event: { width: number }) {\n let width = event.width;\n if (width > 704) {\n width = 704;\n }\n const height = Math.round(width / this._aspectRatio);\n\n this._settings.update(s => ({\n ...s,\n width,\n height\n }));\n\n this.update();\n }\n\n protected _onVideoLoaded(event: any) {\n const video = event.target as HTMLVideoElement;\n this._aspectRatio = video.videoWidth / video.videoHeight;\n }\n\n protected handleKeyPress(event: KeyboardEvent) {\n if (event.key === 'Enter') {\n event.preventDefault();\n event.stopPropagation();\n this._contentBuilder.insertEmptyBlock(this.index());\n }\n }\n\n private update() {\n this._store.updateBlock(this.id(), {...this.getData(), isEmpty: this.isEmpty()});\n this._contentBuilder.emitContentChangeEvent();\n }\n}\n","@if (uploading()) {\n <div class=\"relative flex items-center justify-center overflow-hidden\">\n <div class=\"absolute inset-0 z-10 flex items-center justify-center bg-white/80\">\n <div class=\"absolute top-0 start-0 end-0 z-20\">\n <ngs-progress-bar mode=\"indeterminate\"/>\n </div>\n <div class=\"absolute end-2 top-4 w-max z-30\">\n <button ngsButton (click)=\"cancelUploading()\">\n <ngs-icon name=\"fluent:delete-24-regular\"/>\n </button>\n </div>\n <div class=\"bg-white px-3 text-sm py-1.5 rounded-lg border border-border\">Loading...</div>\n </div>\n <div [style.width.px]=\"_settings().width || null\"\n [style.height.px]=\"_settings().height || null\"\n [class.max-w-full]=\"!_settings().width\">\n <video [src]=\"selectedVideo()\" muted class=\"w-full h-auto block\"></video>\n </div>\n </div>\n} @else if (_src()) {\n <div class=\"flex items-center justify-center overflow-hidden\">\n <ngs-resizable-container (resized)=\"_onVideoResized($event)\"\n [style.width.px]=\"_settings().width || null\"\n [style.height.px]=\"_settings().height || null\"\n [class.max-w-full]=\"!_settings().width\">\n <video #videoPlayer\n [src]=\"_src()\"\n class=\"w-full h-auto block\"\n (loadedmetadata)=\"_onVideoLoaded($event)\"\n controls></video>\n </ngs-resizable-container>\n </div>\n <ngs-form-field class=\"w-full mt-5\">\n <ngs-label>Caption</ngs-label>\n <input ngsInput [(ngModel)]=\"_caption\" (ngModelChange)=\"_onCaptionChange()\">\n </ngs-form-field>\n} @else {\n <ngs-upload-area #uploadArea=\"ngsUploadArea\"\n ngsUploadTrigger accept=\"video/*\"\n (fileSelected)=\"onFileSelected($event)\" multiple=\"false\"\n class=\"cursor-pointer hover:outline-2 hover:outline-[var(--color-primary)]\">\n @if (!uploadArea.api.isDropActive) {\n Drag & drop video here or click to upload\n } @else {\n <div class=\"font-medium\">Drop video here</div>\n }\n </ngs-upload-area>\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;MA+Ca,mBAAmB,CAAA;AACtB,IAAA,MAAM,GAAG,M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